commit a351e9b9fc24e982ec2f0e76379a49826036da12 Author: Linus Torvalds Date: Sun Apr 30 19:47:48 2017 -0700 Linux 4.11 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97ce89f8a4eb15a1e82be419fcd6218fe4da1fbd Merge: 14e07f0 88d879d Author: Linus Torvalds Date: Sun Apr 30 11:44:18 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "The final fixes for 4.11: - prevent a triple fault with function graph tracing triggered via suspend to ram - prevent optimizing for size when function graph tracing is enabled and the compiler does not support -mfentry - prevent mwaitx() being called with a zero timeout as mwaitx() might never return. Observed on the new Ryzen CPUs" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Prevent timer value 0 for MWAITX x86/build: convert function graph '-Os' error to warning ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram commit 14e07f023ff6ed3e38850a9935a05b0b8e52fa49 Merge: 8c9a694 25e2d8c Author: Linus Torvalds Date: Sun Apr 30 11:35:00 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single fix for a cputime accounting regression which got introduced in the 4.11 cycle" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cputime: Fix ksoftirqd cputime accounting regression commit 88d879d29f9cc0de2d930b584285638cdada6625 Author: Janakarajan Natarajan Date: Tue Apr 25 16:44:03 2017 -0500 Prevent timer value 0 for MWAITX Newer hardware has uncovered a bug in the software implementation of using MWAITX for the delay function. A value of 0 for the timer is meant to indicate that a timeout will not be used to exit MWAITX. On newer hardware this can result in MWAITX never returning, resulting in NMI soft lockup messages being printed. On older hardware, some of the other conditions under which MWAITX can exit masked this issue. The AMD APM does not currently document this and will be updated. Please refer to http://marc.info/?l=kvm&m=148950623231140 for information regarding NMI soft lockup messages on an AMD Ryzen 1800X. This has been root-caused as a 0 passed to MWAITX causing it to wait indefinitely. This change has the added benefit of avoiding the unnecessary setup of MONITORX/MWAITX when the delay value is zero. Signed-off-by: Janakarajan Natarajan Link: http://lkml.kernel.org/r/1493156643-29366-1-git-send-email-Janakarajan.Natarajan@amd.com Signed-off-by: Thomas Gleixner arch/x86/lib/delay.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c9a694dc046fab9dff249555860460b92990b52 Merge: 0060e79 4fa55ce Author: Linus Torvalds Date: Sat Apr 29 14:00:42 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov iter fix from Al Viro. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix a braino in ITER_PIPE iov_iter_revert() commit 4fa55cefee1bbecadb4c9f47d40a92f65dc44351 Author: Al Viro Date: Sat Apr 29 16:42:30 2017 -0400 fix a braino in ITER_PIPE iov_iter_revert() Fixes: 27c0e3748e41 Tested-by: Dave Jones Signed-off-by: Al Viro lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0060e79a1f5231940ef38e6621745c0c808065cb Merge: 0e91178 36c02d0 Author: Linus Torvalds Date: Fri Apr 28 17:04:31 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 odd config build fix for a recent Allwinner clock driver change that got merged. The common code called code in another file that wasn't always built. This just forces it on so people don't run into this bad configuration" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: always select CCU_GATE commit 0e9117882da14e7914d05cf14781a7ac9c61c670 Merge: affb852 4c761da Author: Linus Torvalds Date: Fri Apr 28 14:13:16 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Just a couple more stragglers, I really hope this is it. 1) Don't let frags slip down into the GRO segmentation handlers, from Steffen Klassert. 2) Truesize under-estimation triggers warnings in TCP over loopback with socket filters, 2 part fix from Eric Dumazet. 3) Fix undesirable reset of bonding MTU to ETH_HLEN on slave removal, from Paolo Abeni. 4) If we flush the XFRM policy after garbage collection, it doesn't work because stray entries can be created afterwards. Fix from Xin Long. 5) Hung socket connection fixes in TIPC from Parthasarathy Bhuvaragan. 6) Fix GRO regression with IPSEC when netfilter is disabled, from Sabrina Dubroca. 7) Fix cpsw driver Kconfig dependency regression, from Arnd Bergmann" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: hso: register netdev later to avoid a race condition net: adjust skb->truesize in ___pskb_trim() tcp: do not underestimate skb->truesize in tcp_trim_head() bonding: avoid defaulting hard_header_len to ETH_HLEN on slave removal ipv4: Don't pass IP fragments to upper layer GRO handlers. cpsw/netcp: refine cpts dependency tipc: close the connection if protocol messages contain errors tipc: improve error validations for sockets in CONNECTING state tipc: Fix missing connection request handling xfrm: fix GRO for !CONFIG_NETFILTER xfrm: do the garbage collection after flushing policy commit 4c761daf8bb9a2cbda9facf53ea85d9061f4281e Author: Andreas Kemnade Date: Wed Apr 26 19:26:40 2017 +0200 net: hso: register netdev later to avoid a race condition If the netdev is accessed before the urbs are initialized, there will be NULL pointer dereferences. That is avoided by registering it when it is fully initialized. This case occurs e.g. if dhcpcd is running in the background and the device is probed, either after insmod hso or when the device appears on the usb bus. A backtrace is the following: [ 1357.356048] usb 1-2: new high-speed USB device number 12 using ehci-omap [ 1357.551177] usb 1-2: New USB device found, idVendor=0af0, idProduct=8800 [ 1357.558654] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0 [ 1357.568572] usb 1-2: Product: Globetrotter HSUPA Modem [ 1357.574096] usb 1-2: Manufacturer: Option N.V. [ 1357.685882] hso 1-2:1.5: Not our interface [ 1460.886352] hso: unloaded [ 1460.889984] usbcore: deregistering interface driver hso [ 1513.769134] hso: ../drivers/net/usb/hso.c: Option Wireless [ 1513.846771] Unable to handle kernel NULL pointer dereference at virtual address 00000030 [ 1513.887664] hso 1-2:1.5: Not our interface [ 1513.906890] usbcore: registered new interface driver hso [ 1513.937988] pgd = ecdec000 [ 1513.949890] [00000030] *pgd=acd15831, *pte=00000000, *ppte=00000000 [ 1513.956573] Internal error: Oops: 817 [#1] PREEMPT SMP ARM [ 1513.962371] Modules linked in: hso usb_f_ecm omap2430 bnep bluetooth g_ether usb_f_rndis u_ether libcomposite configfs ipv6 arc4 wl18xx wlcore mac80211 cfg80211 bq27xxx_battery panel_tpo_td028ttec1 omapdrm drm_kms_helper cfbfillrect snd_soc_simple_card syscopyarea cfbimgblt snd_soc_simple_card_utils sysfillrect sysimgblt fb_sys_fops snd_soc_omap_twl4030 cfbcopyarea encoder_opa362 drm twl4030_madc_hwmon wwan_on_off snd_soc_gtm601 pwm_omap_dmtimer generic_adc_battery connector_analog_tv pwm_bl extcon_gpio omap3_isp wlcore_sdio videobuf2_dma_contig videobuf2_memops w1_bq27000 videobuf2_v4l2 videobuf2_core omap_hdq snd_soc_omap_mcbsp ov9650 snd_soc_omap bmp280_i2c bmg160_i2c v4l2_common snd_pcm_dmaengine bmp280 bmg160_core at24 bmc150_magn_i2c nvmem_core videodev phy_twl4030_usb bmc150_accel_i2c tsc2007 [ 1514.037384] bmc150_magn bmc150_accel_core media leds_tca6507 bno055 industrialio_triggered_buffer kfifo_buf gpio_twl4030 musb_hdrc snd_soc_twl4030 twl4030_vibra twl4030_madc twl4030_pwrbutton twl4030_charger industrialio w2sg0004 ehci_omap omapdss [last unloaded: hso] [ 1514.062622] CPU: 0 PID: 3433 Comm: dhcpcd Tainted: G W 4.11.0-rc8-letux+ #1 [ 1514.071136] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 1514.077758] task: ee748240 task.stack: ecdd6000 [ 1514.082580] PC is at hso_start_net_device+0x50/0xc0 [hso] [ 1514.088287] LR is at hso_net_open+0x68/0x84 [hso] [ 1514.093231] pc : [] lr : [] psr: a00f0013 sp : ecdd7e20 ip : 00000000 fp : ffffffff [ 1514.105316] r10: 00000000 r9 : ed0e080c r8 : ecd8fe2c [ 1514.110839] r7 : bf79cef4 r6 : ecd8fe00 r5 : 00000000 r4 : ed0dbd80 [ 1514.117706] r3 : 00000000 r2 : c0020c80 r1 : 00000000 r0 : ecdb7800 [ 1514.124572] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 1514.132110] Control: 10c5387d Table: acdec019 DAC: 00000051 [ 1514.138153] Process dhcpcd (pid: 3433, stack limit = 0xecdd6218) [ 1514.144470] Stack: (0xecdd7e20 to 0xecdd8000) [ 1514.149078] 7e20: ed0dbd80 ecd8fe98 00000001 00000000 ecd8f800 ecd8fe00 ecd8fe60 00000000 [ 1514.157714] 7e40: ed0e080c bf79ced8 bf79ce70 ecd8f800 00000001 bf7a0258 ecd8f830 c068d958 [ 1514.166320] 7e60: c068d8b8 ecd8f800 00000001 00001091 00001090 c068dba4 ecd8f800 00001090 [ 1514.174926] 7e80: ecd8f940 ecd8f800 00000000 c068dc60 00000000 00000001 ed0e0800 ecd8f800 [ 1514.183563] 7ea0: 00000000 c06feaa8 c0ca39c2 beea57dc 00000020 00000000 306f7368 00000000 [ 1514.192169] 7ec0: 00000000 00000000 00001091 00000000 00000000 00000000 00000000 00008914 [ 1514.200805] 7ee0: eaa9ab60 beea57dc c0c9bfc0 eaa9ab40 00000006 00000000 00046858 c066a948 [ 1514.209411] 7f00: beea57dc eaa9ab60 ecc6b0c0 c02837b0 00000006 c0282c90 0000c000 c0283654 [ 1514.218017] 7f20: c09b0c00 c098bc31 00000001 c0c5e513 c0c5e513 00000000 c0151354 c01a20c0 [ 1514.226654] 7f40: c0c5e513 c01a3134 ecdd6000 c01a3160 ee7487f0 600f0013 00000000 ee748240 [ 1514.235260] 7f60: ee748734 00000000 ecc6b0c0 ecc6b0c0 beea57dc 00008914 00000006 00000000 [ 1514.243896] 7f80: 00046858 c02837b0 00001091 0003a1f0 00046608 0003a248 00000036 c01071e4 [ 1514.252502] 7fa0: ecdd6000 c0107040 0003a1f0 00046608 00000006 00008914 beea57dc 00001091 [ 1514.261108] 7fc0: 0003a1f0 00046608 0003a248 00000036 0003ac0c 00046608 00046610 00046858 [ 1514.269744] 7fe0: 0003a0ac beea57d4 000167eb b6f23106 400f0030 00000006 00000000 00000000 [ 1514.278411] [] (hso_start_net_device [hso]) from [] (hso_net_open+0x68/0x84 [hso]) [ 1514.288238] [] (hso_net_open [hso]) from [] (__dev_open+0xa0/0xf4) [ 1514.296600] [] (__dev_open) from [] (__dev_change_flags+0x8c/0x130) [ 1514.305023] [] (__dev_change_flags) from [] (dev_change_flags+0x18/0x48) [ 1514.313934] [] (dev_change_flags) from [] (devinet_ioctl+0x348/0x714) [ 1514.322540] [] (devinet_ioctl) from [] (sock_ioctl+0x2b0/0x308) [ 1514.330627] [] (sock_ioctl) from [] (vfs_ioctl+0x20/0x34) [ 1514.338165] [] (vfs_ioctl) from [] (do_vfs_ioctl+0x82c/0x93c) [ 1514.346038] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) [ 1514.353759] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) [ 1514.361755] Code: e3822103 e3822080 e1822781 e5981014 (e5832030) [ 1514.510833] ---[ end trace dfb3e53c657f34a0 ]--- Reported-by: H. Nikolaus Schaller Signed-off-by: Andreas Kemnade Reviewed-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/usb/hso.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c21b48cc1bbf2f5af3ef54ada559f7fadf8b508b Author: Eric Dumazet Date: Wed Apr 26 09:07:46 2017 -0700 net: adjust skb->truesize in ___pskb_trim() Andrey found a way to trigger the WARN_ON_ONCE(delta < len) in skb_try_coalesce() using syzkaller and a filter attached to a TCP socket. As we did recently in commit 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()") we can adjust skb->truesize from ___pskb_trim(), via a call to skb_condense(). If all frags were freed, then skb->truesize can be recomputed. This call can be done if skb is not yet owned, or destructor is sock_edemux(). Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Cc: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 2 ++ 1 file changed, 2 insertions(+) commit 7162fb242cb8322beb558828fd26b33c3e9fc805 Author: Eric Dumazet Date: Wed Apr 26 17:15:40 2017 -0700 tcp: do not underestimate skb->truesize in tcp_trim_head() Andrey found a way to trigger the WARN_ON_ONCE(delta < len) in skb_try_coalesce() using syzkaller and a filter attached to a TCP socket over loopback interface. I believe one issue with looped skbs is that tcp_trim_head() can end up producing skb with under estimated truesize. It hardly matters for normal conditions, since packets sent over loopback are never truncated. Bytes trimmed from skb->head should not change skb truesize, since skb->head is not reallocated. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 19cdead3e2ef8ed765c5d1ce48057ca9d97b5094 Author: Paolo Abeni Date: Thu Apr 27 19:29:34 2017 +0200 bonding: avoid defaulting hard_header_len to ETH_HLEN on slave removal On slave list updates, the bonding driver computes its hard_header_len as the maximum of all enslaved devices's hard_header_len. If the slave list is empty, e.g. on last enslaved device removal, ETH_HLEN is used. Since the bonding header_ops are set only when the first enslaved device is attached, the above can lead to header_ops->create() being called with the wrong skb headroom in place. If bond0 is configured on top of ipoib devices, with the following commands: ifup bond0 for slave in $BOND_SLAVES_LIST; do ip link set dev $slave nomaster done ping -c 1 we will obtain a skb_under_panic() with a similar call trace: skb_push+0x3d/0x40 push_pseudo_header+0x17/0x30 [ib_ipoib] ipoib_hard_header+0x4e/0x80 [ib_ipoib] arp_create+0x12f/0x220 arp_send_dst.part.19+0x28/0x50 arp_solicit+0x115/0x290 neigh_probe+0x4d/0x70 __neigh_event_send+0xa7/0x230 neigh_resolve_output+0x12e/0x1c0 ip_finish_output2+0x14b/0x390 ip_finish_output+0x136/0x1e0 ip_output+0x76/0xe0 ip_local_out+0x35/0x40 ip_send_skb+0x19/0x40 ip_push_pending_frames+0x33/0x40 raw_sendmsg+0x7d3/0xb50 inet_sendmsg+0x31/0xb0 sock_sendmsg+0x38/0x50 SYSC_sendto+0x102/0x190 SyS_sendto+0xe/0x10 do_syscall_64+0x67/0x180 entry_SYSCALL64_slow_path+0x25/0x25 This change addresses the issue avoiding updating the bonding device hard_header_len when the slaves list become empty, forbidding to shrink it below the value used by header_ops->create(). The bug is there since commit 54ef31371407 ("[PATCH] bonding: Handle large hard_header_len") but the panic can be triggered only since commit fc791b633515 ("IB/ipoib: move back IB LL address into the hard header"). Reported-by: Norbert P Fixes: 54ef31371407 ("[PATCH] bonding: Handle large hard_header_len") Fixes: fc791b633515 ("IB/ipoib: move back IB LL address into the hard header") Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b83e0319840eca758ef586776a427284ff767bf Author: Steffen Klassert Date: Fri Apr 28 10:54:32 2017 +0200 ipv4: Don't pass IP fragments to upper layer GRO handlers. Upper layer GRO handlers can not handle IP fragments, so exit GRO processing in this case. This fixes ESP GRO because the packet must be reassembled before we can decapsulate, otherwise we get authentication failures. It also aligns IPv4 to IPv6 where packets with fragmentation headers are not passed to upper layer GRO handlers. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv4/af_inet.c | 3 +++ 1 file changed, 3 insertions(+) commit 504926df6df5383cad25146de3ed0a45e02c0901 Author: Arnd Bergmann Date: Fri Apr 28 17:03:58 2017 +0200 cpsw/netcp: refine cpts dependency Tony Lindgren reports a kernel oops that resulted from my compile-time fix on the default config. This shows two problems: a) configurations that did not already enable PTP_1588_CLOCK will now miss the cpts driver b) when cpts support is disabled, the driver crashes. This is a preexisting problem that we did not notice before my patch. While the second problem is still being investigated, this modifies the dependencies again, getting us back to the original state, with another 'select NET_PTP_CLASSIFY' added in to avoid the original link error we got, and the 'depends on POSIX_TIMERS' to hide the CPTS support when turning it on would be useless. Cc: stable@vger.kernel.org # 4.11 needs this Fixes: 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers") Signed-off-by: Arnd Bergmann Tested-by: Tony Lindgren Signed-off-by: David S. Miller drivers/net/ethernet/ti/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5577e679564702664aaecce3c96036ace3ab64fa Merge: c518471 cfcf99f Author: David S. Miller Date: Fri Apr 28 15:42:11 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-04-28 1) Do garbage collecting after a policy flush to remove old bundles immediately. From Xin Long. 2) Fix GRO if netfilter is not defined. From Sabrina Dubroca. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit affb852d2fa260402cbdc77976adb0dcda3b5fae Merge: 28b2013 7c5bb4a Author: Linus Torvalds Date: Fri Apr 28 11:08:42 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: "Yet another quirk to i8042 to get touchpad recognized on some laptops" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Clevo P650RS to the i8042 reset list commit 36c02d0be4c3c8804e51f9740f0d768e17f3b566 Author: Arnd Bergmann Date: Thu Apr 27 13:02:31 2017 +0200 clk: sunxi-ng: always select CCU_GATE When the base driver is enabled but all SoC specific drivers are turned off, we now get a build error after code was added to always refer to the clk gates: drivers/clk/built-in.o: In function `ccu_pll_notifier_cb': :(.text+0x154f8): undefined reference to `ccu_gate_helper_disable' :(.text+0x15504): undefined reference to `ccu_gate_helper_enable' This changes the Kconfig to always require the gate code to be built-in when CONFIG_SUNXI_CCU is set. Fixes: 02ae2bc6febd ("clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks") Signed-off-by: Arnd Bergmann Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28b2013587e535cef8bd8d8e0eae5ad40868369b Merge: 8b5d11e 338bd52 Author: Linus Torvalds Date: Fri Apr 28 10:13:17 2017 -0700 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fix from Chris Mason: "We have one more fix for btrfs. This gets rid of a new WARN_ON from rc1 that ended up making more noise than we really want. The larger fix for the underflow got delayed a bit and it's better for now to put it under CONFIG_BTRFS_DEBUG" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: qgroup: move noisy underflow warning to debugging build commit c51847171162212618b3227812f007a654de2f4b Merge: f832460 c1be775 Author: David S. Miller Date: Fri Apr 28 12:20:43 2017 -0400 Merge branch 'tipc-socket-connection-hangs' Parthasarathy Bhuvaragan says: ==================== tipc: fix hanging socket connections This patch series contains fixes for the socket layer to prevent hanging / stale connections. ==================== Signed-off-by: David S. Miller commit c1be7756284b0fdbfe8aea8da968ce054697e0c5 Author: Parthasarathy Bhuvaragan Date: Wed Apr 26 10:05:02 2017 +0200 tipc: close the connection if protocol messages contain errors When a socket is shutting down, we notify the peer node about the connection termination by reusing an incoming message if possible. If the last received message was a connection acknowledgment message, we reverse this message and set the error code to TIPC_ERR_NO_PORT and send it to peer. In tipc_sk_proto_rcv(), we never check for message errors while processing the connection acknowledgment or probe messages. Thus this message performs the usual flow control accounting and leaves the session hanging. In this commit, we terminate the connection when we receive such error messages. Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4e0df4951e9ecb7ec026a1330ed59f12e8937a95 Author: Parthasarathy Bhuvaragan Date: Wed Apr 26 10:05:01 2017 +0200 tipc: improve error validations for sockets in CONNECTING state Until now, the checks for sockets in CONNECTING state was based on the assumption that the incoming message was always from the peer's accepted data socket. However an application using a non-blocking socket sends an implicit connect, this socket which is in CONNECTING state can receive error messages from the peer's listening socket. As we discard these messages, the application socket hangs as there due to inactivity. In addition to this, there are other places where we process errors but do not notify the user. In this commit, we process such incoming error messages and notify our users about them using sk_state_change(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 42b531de17d2f6bb9293f23398f6d9bb94635c3e Author: Parthasarathy Bhuvaragan Date: Wed Apr 26 10:05:00 2017 +0200 tipc: Fix missing connection request handling In filter_connect, we use waitqueue_active() to check for any connections to wakeup. But waitqueue_active() is missing memory barriers while accessing the critical sections, leading to inconsistent results. In this commit, we replace this with an SMP safe wq_has_sleeper() using the generic socket callback sk_data_ready(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b5d11e4b095450e2f259d5f60ea18c13d2fe0a2 Merge: 19ac447 13bf9fb Author: Linus Torvalds Date: Thu Apr 27 13:39:19 2017 -0700 Merge tag 'nfsd-4.11-3' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Thanks to Ari Kauppi and Tuomas Haanpää at Synopsis for spotting bugs in our NFSv2/v3 xdr code that could crash the server or leak memory" * tag 'nfsd-4.11-3' of git://linux-nfs.org/~bfields/linux: nfsd: stricter decoding of write-like NFSv2/v3 ops nfsd4: minor NFSv2/v3 write decoding cleanup nfsd: check for oversized NFSv2/v3 arguments commit 19ac4474203863a8141663d73d5976fe25464bfd Merge: f56fc7b 8179a10 Author: Linus Torvalds Date: Thu Apr 27 11:38:05 2017 -0700 Merge tag 'ceph-for-4.11-rc9' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a kernel stack overflow bug in ceph setattr code, marked for stable" * tag 'ceph-for-4.11-rc9' of git://github.com/ceph/ceph-client: ceph: fix recursion between ceph_set_acl() and __ceph_setattr() commit f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd Merge: 59372bb 1741937 Author: Linus Torvalds Date: Thu Apr 27 11:09:37 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: - fix orangefs handling of faults on write() - I'd missed that one back when orangefs was going through review. - readdir counterpart of "9p: cope with bogus responses from server in p9_client_{read,write}" - server might be lying or broken, and we'd better not overrun the kmalloc'ed buffer we are copying the results into. - NFS O_DIRECT read/write can leave iov_iter advanced by too much; that's what had been causing iov_iter_pipe() warnings davej had been seeing. - statx_timestamp.tv_nsec type fix (s32 -> u32). That one really should go in before 4.11. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: uapi: change the type of struct statx_timestamp.tv_nsec to unsigned fix nfs O_DIRECT advancing iov_iter too much p9_client_readdir() fix orangefs_bufmap_copy_from_iovec(): fix EFAULT handling commit 59372bbf3abd5b24a7f6f676a3968685c280f955 Author: Michael Kerrisk (man-pages) Date: Thu Apr 27 13:54:11 2017 +0200 statx: correct error handling of NULL pathname The change in commit 1e2f82d1e9d1 ("statx: Kill fd-with-NULL-path support in favour of AT_EMPTY_PATH") to error on a NULL pathname to statx() is inconsistent. It results in the error EINVAL for a NULL pathname. Other system calls with similar APIs (fchownat(), fstatat(), linkat()), return EFAULT. The solution is simply to remove the EINVAL check. As I already pointed out in [1], user_path_at*() and filename_lookup() will handle the NULL pathname as per the other APIs, to correctly produce the error EFAULT. [1] https://lkml.org/lkml/2017/4/26/561 Signed-off-by: Michael Kerrisk Cc: David Howells Cc: Al Viro Cc: Eric Sandeen Signed-off-by: Linus Torvalds fs/stat.c | 2 -- 1 file changed, 2 deletions(-) commit cfcf99f987ba321a3d122580716beb9b08d52eb8 Author: Sabrina Dubroca Date: Thu Apr 27 12:03:37 2017 +0200 xfrm: fix GRO for !CONFIG_NETFILTER In xfrm_input() when called from GRO, async == 0, and we end up skipping the processing in xfrm4_transport_finish(). GRO path will always skip the NF_HOOK, so we don't need the special-case for !NETFILTER during GRO processing. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25e2d8c1b9e327ed260edd13169cc22bc7a78bc6 Author: Frederic Weisbecker Date: Tue Apr 25 16:10:48 2017 +0200 sched/cputime: Fix ksoftirqd cputime accounting regression irq_time_read() returns the irqtime minus the ksoftirqd time. This is necessary because irq_time_read() is used to substract the IRQ time from the sum_exec_runtime of a task. If we were to include the softirq time of ksoftirqd, this task would substract its own CPU time everytime it updates ksoftirqd->sum_exec_runtime which would therefore never progress. But this behaviour got broken by: a499a5a14db ("sched/cputime: Increment kcpustat directly on irqtime account") ... which now includes ksoftirqd softirq time in the time returned by irq_time_read(). This has resulted in wrong ksoftirqd cputime reported to userspace through /proc/stat and thus "top" not showing ksoftirqd when it should after intense networking load. ksoftirqd->stime happens to be correct but it gets scaled down by sum_exec_runtime through task_cputime_adjusted(). To fix this, just account the strict IRQ time in a separate counter and use it to report the IRQ time. Reported-and-tested-by: Jesper Dangaard Brouer Signed-off-by: Frederic Weisbecker Reviewed-by: Rik van Riel Acked-by: Jesper Dangaard Brouer Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1493129448-5356-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 27 ++++++++++++++++----------- kernel/sched/sched.h | 9 +++++++-- 2 files changed, 23 insertions(+), 13 deletions(-) commit 1741937d475d91ed95abb37f07e8571e23b9a7fe Author: Dmitry V. Levin Date: Wed Apr 26 14:50:00 2017 +0100 uapi: change the type of struct statx_timestamp.tv_nsec to unsigned The comment asserting that the value of struct statx_timestamp.tv_nsec must be negative when statx_timestamp.tv_sec is negative, is wrong, as could be seen from the following example: #define _FILE_OFFSET_BITS 64 #include #include #include #include #include #include #include int main(void) { static const struct timespec ts[2] = { { .tv_nsec = UTIME_OMIT }, { .tv_sec = -2, .tv_nsec = 42 } }; assert(utimensat(AT_FDCWD, ".", ts, 0) == 0); struct stat st; assert(stat(".", &st) == 0); printf("st_mtim.tv_sec = %lld, st_mtim.tv_nsec = %lu\n", (long long) st.st_mtim.tv_sec, (unsigned long) st.st_mtim.tv_nsec); struct statx stx; assert(syscall(__NR_statx, AT_FDCWD, ".", 0, 0, &stx) == 0); printf("stx_mtime.tv_sec = %lld, stx_mtime.tv_nsec = %lu\n", (long long) stx.stx_mtime.tv_sec, (unsigned long) stx.stx_mtime.tv_nsec); return 0; } It expectedly prints: st_mtim.tv_sec = -2, st_mtim.tv_nsec = 42 stx_mtime.tv_sec = -2, stx_mtime.tv_nsec = 42 The more generic comment asserting that the value of struct statx_timestamp.tv_nsec might be negative is confusing to say the least. It contradicts both the struct stat.st_[acm]time_nsec tradition and struct timespec.tv_nsec requirements in utimensat syscall. If statx syscall ever returns a stx_[acm]time containing a negative tv_nsec that cannot be passed unmodified to utimensat syscall, it will cause an immense confusion. Fix this source of confusion by changing the type of struct statx_timestamp.tv_nsec from __s32 to __u32. Fixes: a528d35e8bfc ("statx: Add a system call to make enhanced file info available") Signed-off-by: Dmitry V. Levin Signed-off-by: David Howells cc: linux-api@vger.kernel.org cc: mtk.manpages@gmail.com Signed-off-by: Al Viro include/uapi/linux/stat.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f83246089ca09308425175d47f5e71e6da68b2ef Merge: 1e2f82d f6ebf0b Author: Linus Torvalds Date: Wed Apr 26 15:10:45 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "I didn't want the release to go out without the statx system call properly hooked up" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: Update syscall tables. sparc64: Fill in rest of HAVE_REGS_AND_STACK_ACCESS_API commit 1e2f82d1e9d12223b4cbd1feb3f2b5596f8049eb Author: David Howells Date: Wed Apr 26 22:15:55 2017 +0100 statx: Kill fd-with-NULL-path support in favour of AT_EMPTY_PATH With the new statx() syscall, the following both allow the attributes of the file attached to a file descriptor to be retrieved: statx(dfd, NULL, 0, ...); and: statx(dfd, "", AT_EMPTY_PATH, ...); Change the code to reject the first option, though this means copying the path and engaging pathwalk for the fstat() equivalent. dfd can be a non-directory provided path is "". [ The timing of this isn't wonderful, but applying this now before we have statx() in any released kernel, before anybody starts using the NULL special case. - Linus ] Fixes: a528d35e8bfc ("statx: Add a system call to make enhanced file info available") Reported-by: Michael Kerrisk Signed-off-by: David Howells cc: Eric Sandeen cc: fstests@vger.kernel.org cc: linux-api@vger.kernel.org cc: linux-man@vger.kernel.org Signed-off-by: Linus Torvalds fs/stat.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit fc08b197bb8c3bebda27b9e9884aaf7557fab53f Merge: ea3a8596 105f552 Author: Linus Torvalds Date: Wed Apr 26 13:42:32 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) MLX5 bug fixes from Saeed Mahameed et al: - released wrong resources when firmware timeout happens - fix wrong check for encapsulation size limits - UAR memory leak - ETHTOOL_GRXCLSRLALL failed to fill in info->data 2) Don't cache l3mdev on mis-matches local route, causes net devices to leak refs. From Robert Shearman. 3) Handle fragmented SKBs properly in macsec driver, the problem is that we were mis-sizing the sgvec table. From Jason A. Donenfeld. 4) We cannot have checksum offload enabled for inner UDP tunneled packet during IPSEC, from Ansis Atteka. 5) Fix double SKB free in ravb driver, from Dan Carpenter. 6) Fix CPU port handling in b53 DSA driver, from Florian Dainelli. 7) Don't use on-stack buffers for usb_control_msg() in CAN usb driver, from Maksim Salau. 8) Fix device leak in macvlan driver, from Herbert Xu. We have to purge the broadcast queue properly on port destroy. 9) Fix tx ring entry limit on EF10 devices in sfc driver. From Bert Kenward. 10) Fix memory leaks in team driver, from Pan Bian. 11) Don't setup ipv6_stub before it can be actually used, from Paolo Abeni. 12) Fix tipc socket flow control accounting, from Parthasarathy Bhuvaragan. 13) Fix crash on module unload in hso driver, from Andreas Kemnade. 14) Fix purging of bridge multicast entries, the problem is that if we don't defer it to ndo_uninit it's possible for new entries to get added after we purge. Fix from Xin Long. 15) Don't return garbage for PACKET_HDRLEN getsockopt, from Alexander Potapenko. 16) Fix autoneg stall properly in PHY layer, and revert micrel driver change that was papering over it. From Alexander Kochetkov. 17) Don't dereference an ipv4 route as an ipv6 one in the ip6_tunnnel code, from Cong Wang. 18) Clear out the congestion control private of the TCP socket in all of the right places, from Wei Wang. 19) rawv6_ioctl measures SKB length incorrectly, fix from Jamie Bainbridge. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits) ipv6: check raw payload size correctly in ioctl tcp: memset ca_priv data to 0 properly ipv6: check skb->protocol before lookup for nexthop net: core: Prevent from dereferencing null pointer when releasing SKB macsec: dynamically allocate space for sglist Revert "phy: micrel: Disable auto negotiation on startup" net: phy: fix auto-negotiation stall due to unavailable interrupt net/packet: check length in getsockopt() called with PACKET_HDRLEN net: ipv6: regenerate host route if moved to gc list bridge: move bridge multicast cleanup to ndo_uninit ipv6: fix source routing qed: Fix error in the dcbx app meta data initialization. netvsc: fix calculation of available send sections net: hso: fix module unloading tipc: fix socket flow control accounting error at tipc_recv_stream tipc: fix socket flow control accounting error at tipc_send_stream ipv6: move stub initialization after ipv6 setup completion team: fix memory leaks sfc: tx ring can only have 2048 entries for all EF10 NICs macvlan: Fix device ref leak when purging bc_queue ... commit 105f5528b9bbaa08b526d3405a5bcd2ff0c953c8 Author: Jamie Bainbridge Date: Wed Apr 26 10:43:27 2017 +1000 ipv6: check raw payload size correctly in ioctl In situations where an skb is paged, the transport header pointer and tail pointer can be the same because the skb contents are in frags. This results in ioctl(SIOCINQ/FIONREAD) incorrectly returning a length of 0 when the length to receive is actually greater than zero. skb->len is already correctly set in ip6_input_finish() with pskb_pull(), so use skb->len as it always returns the correct result for both linear and paged data. Signed-off-by: Jamie Bainbridge Signed-off-by: David S. Miller net/ipv6/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c1201444075009507a6818de6518e2822b9a87c8 Author: Wei Wang Date: Tue Apr 25 17:38:02 2017 -0700 tcp: memset ca_priv data to 0 properly Always zero out ca_priv data in tcp_assign_congestion_control() so that ca_priv data is cleared out during socket creation. Also always zero out ca_priv data in tcp_reinit_congestion_control() so that when cc algorithm is changed, ca_priv data is cleared out as well. We should still zero out ca_priv data even in TCP_CLOSE state because user could call connect() on AF_UNSPEC to disconnect the socket and leave it in TCP_CLOSE state and later call setsockopt() to switch cc algorithm on this socket. Fixes: 2b0a8c9ee ("tcp: add CDG congestion control") Reported-by: Andrey Konovalov Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_cong.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 199ab00f3cdb6f154ea93fa76fd80192861a821d Author: WANG Cong Date: Tue Apr 25 14:37:15 2017 -0700 ipv6: check skb->protocol before lookup for nexthop Andrey reported a out-of-bound access in ip6_tnl_xmit(), this is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 neigh key as an IPv6 address: neigh = dst_neigh_lookup(skb_dst(skb), &ipv6_hdr(skb)->daddr); if (!neigh) goto tx_err_link_failure; addr6 = (struct in6_addr *)&neigh->primary_key; // <=== HERE addr_type = ipv6_addr_type(addr6); if (addr_type == IPV6_ADDR_ANY) addr6 = &ipv6_hdr(skb)->daddr; memcpy(&fl6->daddr, addr6, sizeof(fl6->daddr)); Also the network header of the skb at this point should be still IPv4 for 4in6 tunnels, we shold not just use it as IPv6 header. This patch fixes it by checking if skb->protocol is ETH_P_IPV6: if it is, we are safe to do the nexthop lookup using skb_dst() and ipv6_hdr(skb)->daddr; if not (aka IPv4), we have no clue about which dest address we can pick here, we have to rely on callers to fill it from tunnel config, so just fall to ip6_route_output() to make the decision. Fixes: ea3dc9601bda ("ip6_tunnel: Add support for wildcard tunnel endpoints.") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Steffen Klassert Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 9899886d5e8ec5b343b1efe44f185a0e68dc6454 Author: Myungho Jung Date: Tue Apr 25 11:58:15 2017 -0700 net: core: Prevent from dereferencing null pointer when releasing SKB Added NULL check to make __dev_kfree_skb_irq consistent with kfree family of functions. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289 Signed-off-by: Myungho Jung Signed-off-by: David S. Miller net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 5294b83086cc1c35b4efeca03644cf9d12282e5b Author: Jason A. Donenfeld Date: Tue Apr 25 19:08:18 2017 +0200 macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Jason A. Donenfeld Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit b43bd72835a5f7adef81fe53fa1fbe7b0e43df8e Author: David S. Miller Date: Wed Apr 26 14:33:14 2017 -0400 Revert "phy: micrel: Disable auto negotiation on startup" This reverts commit 99f81afc139c6edd14d77a91ee91685a414a1c66. It was papering over the real problem, which is fixed by commit f555f34fdc58 ("net: phy: fix auto-negotiation stall due to unavailable interrupt") Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 11 ----------- 1 file changed, 11 deletions(-) commit f555f34fdc586a56204cd16d9a7c104ec6cb6650 Author: Alexander Kochetkov Date: Thu Apr 20 14:00:04 2017 +0300 net: phy: fix auto-negotiation stall due to unavailable interrupt The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet cable was plugged before the Ethernet interface was brought up. The patch trigger PHY state machine to update link state if PHY was requested to do auto-negotiation and auto-negotiation complete flag already set. During power-up cycle the PHY do auto-negotiation, generate interrupt and set auto-negotiation complete flag. Interrupt is handled by PHY state machine but doesn't update link state because PHY is in PHY_READY state. After some time MAC bring up, start and request PHY to do auto-negotiation. If there are no new settings to advertise genphy_config_aneg() doesn't start PHY auto-negotiation. PHY continue to stay in auto-negotiation complete state and doesn't fire interrupt. At the same time PHY state machine expect that PHY started auto-negotiation and is waiting for interrupt from PHY and it won't get it. Fixes: 321beec5047a ("net: phy: Use interrupts when available in NOLINK state") Signed-off-by: Alexander Kochetkov Cc: stable # v4.9+ Tested-by: Roger Quadros Tested-by: Alexandre Belloni Signed-off-by: David S. Miller drivers/net/phy/phy.c | 40 ++++++++++++++++++++++++++++++++++++---- include/linux/phy.h | 1 + 2 files changed, 37 insertions(+), 4 deletions(-) commit ea3a8596a0b394c63f9692ef5ea4fb6fc2ff91aa Merge: ea839b4 d4a2fbc Author: Linus Torvalds Date: Wed Apr 26 09:30:33 2017 -0700 Merge tag 'sound-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Since we got a bonus week, let me try to screw a few pending fixes. A slightly large fix is the locking fix in ASoC STI driver, but it's pretty board-specific, and the risk is fairly low. All the rest are small / trivial fixes, mostly marked as stable, for ALSA sequencer core, ASoC topology, ASoC Intel bytcr and Firewire drivers" * tag 'sound-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: intel: Fix PM and non-atomic crash in bytcr drivers ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type ALSA: seq: Don't break snd_use_lock_sync() loop by timeout ASoC: topology: Fix to store enum text values ASoC: STI: Fix null ptr deference in IRQ handler ALSA: oxfw: fix regression to handle Stanton SCS.1m/1d commit 35db0691218959f05efbe26fd623ee67581ebff6 Author: Xin Long Date: Mon Apr 24 15:33:39 2017 +0800 xfrm: do the garbage collection after flushing policy Now xfrm garbage collection can be triggered by 'ip xfrm policy del'. These is no reason not to do it after flushing policies, especially considering that 'garbage collection deferred' is only triggered when it reaches gc_thresh. It's no good that the policy is gone but the xdst still hold there. The worse thing is that xdst->route/orig_dst is also hold and can not be released even if the orig_dst is already expired. This patch is to do the garbage collection if there is any policy removed in xfrm_policy_flush. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 4 ++++ 1 file changed, 4 insertions(+) commit ea839b41744dffe5c77b8d9842c9bb7073460901 Merge: 8f9cedc 3d5e801 Author: Linus Torvalds Date: Tue Apr 25 14:07:24 2017 -0700 Merge tag 'arc-4.11-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fix from Vineet Gupta: "Last minute fixes for ARC: - build error in Mellanox nps platform - addressing lack of saving FPU regs in releavnt configs" * tag 'arc-4.11-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARCv2: entry: save Accumulator register pair (r58:59) if present ARC: [plat-eznps] Fix build error commit 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 Author: J. Bruce Fields Date: Fri Apr 21 15:26:30 2017 -0400 nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could be negative. Add checks to catch these. Reported-by: Tuomas Haanpää Reported-by: Ari Kauppi Reviewed-by: NeilBrown Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs3xdr.c | 4 ++++ fs/nfsd/nfsxdr.c | 2 ++ 2 files changed, 6 insertions(+) commit db44bac41bbfc0c0d9dd943092d8bded3c9db19b Author: J. Bruce Fields Date: Tue Apr 25 16:21:34 2017 -0400 nfsd4: minor NFSv2/v3 write decoding cleanup Use a couple shortcuts that will simplify a following bugfix. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs3xdr.c | 9 +++++---- fs/nfsd/nfsxdr.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) commit e6838a29ecb484c97e4efef9429643b9851fba6e Author: J. Bruce Fields Date: Fri Apr 21 16:10:18 2017 -0400 nfsd: check for oversized NFSv2/v3 arguments A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large it could leave inadequate space for the reply. This is normally OK because NFS RPC's typically have either short arguments and long replies (like READ) or long arguments and short replies (like WRITE). But a client that sends an incorrectly long reply can violate those assumptions. This was observed to cause crashes. Also, several operations increment rq_next_page in the decode routine before checking the argument size, which can leave rq_next_page pointing well past the end of the page array, causing trouble later in svc_free_pages. So, following a suggestion from Neil Brown, add a central check to enforce our expectation that no NFSv2/v3 call has both a large call and a large reply. As followup we may also want to rewrite the encoding routines to check more carefully that they aren't running off the end of the page array. We may also consider rejecting calls that have any extra garbage appended. That would be safer, and within our rights by spec, but given the age of our server and the NFS protocol, and the fact that we've never enforced this before, we may need to balance that against the possibility of breaking some oddball client. Reported-by: Tuomas Haanpää Reported-by: Ari Kauppi Cc: stable@vger.kernel.org Reviewed-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8179a101eb5f4ef0ac9a915fcea9a9d3109efa90 Author: Yan, Zheng Date: Wed Apr 19 10:01:48 2017 +0800 ceph: fix recursion between ceph_set_acl() and __ceph_setattr() ceph_set_acl() calls __ceph_setattr() if the setacl operation needs to modify inode's i_mode. __ceph_setattr() updates inode's i_mode, then calls posix_acl_chmod(). The problem is that __ceph_setattr() calls posix_acl_chmod() before sending the setattr request. The get_acl() call in posix_acl_chmod() can trigger a getxattr request. The reply of the getxattr request can restore inode's i_mode to its old value. The set_acl() call in posix_acl_chmod() sees old value of inode's i_mode, so it calls __ceph_setattr() again. Cc: stable@vger.kernel.org # needs backporting for < 4.9 Link: http://tracker.ceph.com/issues/19688 Reported-by: Jerry Lee Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Tested-by: Luis Henriques Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit fd2c83b35752f0a8236b976978ad4658df14a59f Author: Alexander Potapenko Date: Tue Apr 25 18:51:46 2017 +0200 net/packet: check length in getsockopt() called with PACKET_HDRLEN In the case getsockopt() is called with PACKET_HDRLEN and optlen < 4 |val| remains uninitialized and the syscall may behave differently depending on its value, and even copy garbage to userspace on certain architectures. To fix this we now return -EINVAL if optlen is too small. This bug has been detected with KMSAN. Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/packet/af_packet.c | 2 ++ 1 file changed, 2 insertions(+) commit 8048ced9beb21a52e3305f3332ae82020619f24e Author: David Ahern Date: Tue Apr 25 09:17:29 2017 -0700 net: ipv6: regenerate host route if moved to gc list Taking down the loopback device wreaks havoc on IPv6 routing. By extension, taking down a VRF device wreaks havoc on its table. Dmitry and Andrey both reported heap out-of-bounds reports in the IPv6 FIB code while running syzkaller fuzzer. The root cause is a dead dst that is on the garbage list gets reinserted into the IPv6 FIB. While on the gc (or perhaps when it gets added to the gc list) the dst->next is set to an IPv4 dst. A subsequent walk of the ipv6 tables causes the out-of-bounds access. Andrey's reproducer was the key to getting to the bottom of this. With IPv6, host routes for an address have the dst->dev set to the loopback device. When the 'lo' device is taken down, rt6_ifdown initiates a walk of the fib evicting routes with the 'lo' device which means all host routes are removed. That process moves the dst which is attached to an inet6_ifaddr to the gc list and marks it as dead. The recent change to keep global IPv6 addresses added a new function, fixup_permanent_addr, that is called on admin up. That function restarts dad for an inet6_ifaddr and when it completes the host route attached to it is inserted into the fib. Since the route was marked dead and moved to the gc list, re-inserting the route causes the reported out-of-bounds accesses. If the device with the address is taken down or the address is removed, the WARN_ON in fib6_del is triggered. All of those faults are fixed by regenerating the host route if the existing one has been moved to the gc list, something that can be determined by checking if the rt6i_ref counter is 0. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Reported-by: Dmitry Vyukov Reported-by: Andrey Konovalov Signed-off-by: David Ahern Acked-by: Martin KaFai Lau Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit b1b9d366028ff580e6dd80b48a69c473361456f1 Author: Xin Long Date: Tue Apr 25 22:58:37 2017 +0800 bridge: move bridge multicast cleanup to ndo_uninit During removing a bridge device, if the bridge is still up, a new mdb entry still can be added in br_multicast_add_group() after all mdb entries are removed in br_multicast_dev_del(). Like the path: mld_ifc_timer_expire -> mld_sendpack -> ... br_multicast_rcv -> br_multicast_add_group The new mp's timer will be set up. If the timer expires after the bridge is freed, it may cause use-after-free panic in br_multicast_group_expired. BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 IP: [] br_multicast_group_expired+0x28/0xb0 [bridge] Call Trace: [] call_timer_fn+0x36/0x110 [] ? br_mdb_free+0x30/0x30 [bridge] [] run_timer_softirq+0x237/0x340 [] __do_softirq+0xef/0x280 [] call_softirq+0x1c/0x30 [] do_softirq+0x65/0xa0 [] irq_exit+0x115/0x120 [] smp_apic_timer_interrupt+0x45/0x60 [] apic_timer_interrupt+0x6d/0x80 Nikolay also found it would cause a memory leak - the mdb hash is reallocated and not freed due to the mdb rehash. unreferenced object 0xffff8800540ba800 (size 2048): backtrace: [] kmemleak_alloc+0x67/0xc0 [] __kmalloc+0x1ba/0x3e0 [] br_mdb_rehash+0x5e/0x340 [bridge] [] br_multicast_new_group+0x43f/0x6e0 [bridge] [] br_multicast_add_group+0x203/0x260 [bridge] [] br_multicast_rcv+0x945/0x11d0 [bridge] [] br_dev_xmit+0x180/0x470 [bridge] [] dev_hard_start_xmit+0xbb/0x3d0 [] __dev_queue_xmit+0xb13/0xc10 [] dev_queue_xmit+0x10/0x20 [] ip6_finish_output2+0x5ca/0xac0 [ipv6] [] ip6_finish_output+0x126/0x2c0 [ipv6] [] ip6_output+0xe5/0x390 [ipv6] [] NF_HOOK.constprop.44+0x6c/0x240 [ipv6] [] mld_sendpack+0x216/0x3e0 [ipv6] [] mld_ifc_timer_expire+0x18b/0x2b0 [ipv6] This could happen when ip link remove a bridge or destroy a netns with a bridge device inside. With Nikolay's suggestion, this patch is to clean up bridge multicast in ndo_uninit after bridge dev is shutdown, instead of br_dev_delete, so that netif_running check in br_multicast_add_group can avoid this issue. v1->v2: - fix this issue by moving br_multicast_dev_del to ndo_uninit, instead of calling dev_close in br_dev_delete. (NOTE: Depends upon b6fe0440c637 ("bridge: implement missing ndo_uninit()")) Fixes: e10177abf842 ("bridge: multicast: fix handling of temp and perm entries") Reported-by: Jianwen Ji Signed-off-by: Xin Long Reviewed-by: Stephen Hemminger Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 1 + net/bridge/br_if.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit ec9c4215fef37da6668c4105f5ad3891aaa6527a Author: Sabrina Dubroca Date: Tue Apr 25 15:56:50 2017 +0200 ipv6: fix source routing Commit a149e7c7ce81 ("ipv6: sr: add support for SRH injection through setsockopt") introduced handling of IPV6_SRCRT_TYPE_4, but at the same time restricted it to only IPV6_SRCRT_TYPE_0 and IPV6_SRCRT_TYPE_4. Previously, ipv6_push_exthdr() and fl6_update_dst() would also handle other values (ie STRICT and TYPE_2). Restore previous source routing behavior, by handling IPV6_SRCRT_STRICT and IPV6_SRCRT_TYPE_2 the same way as IPV6_SRCRT_TYPE_0 in ipv6_push_exthdr() and fl6_update_dst(). Fixes: a149e7c7ce81 ("ipv6: sr: add support for SRH injection through setsockopt") Signed-off-by: Sabrina Dubroca Reviewed-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/exthdrs.c | 4 ++++ 1 file changed, 4 insertions(+) commit c8fcd133eabcbbf51a6ecfd12a975cace8877d5a Author: sudarsana.kalluru@cavium.com Date: Mon Apr 24 20:59:10 2017 -0700 qed: Fix error in the dcbx app meta data initialization. DCBX app_data array is initialized with the incorrect values for personality field. This would prevent offloaded protocols from honoring the PFC. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fdfb70d275223b9d69d5d3abe1f88507da579139 Author: stephen hemminger Date: Mon Apr 24 18:33:38 2017 -0700 netvsc: fix calculation of available send sections My change (introduced in 4.11) to use find_first_clear_bit incorrectly assumed that the size argument was words, not bits. The effect was only a small limited number of the available send sections were being actually used. This can cause performance loss with some workloads. Since map_words is now used only during initialization, it can be on stack instead of in per-device data. Fixes: b58a185801da ("netvsc: simplify get next send section") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 - drivers/net/hyperv/netvsc.c | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) commit a23f6ce6d95900ca83b44b6fa691afe6c7d4b941 Author: Andreas Kemnade Date: Mon Apr 24 21:18:39 2017 +0200 net: hso: fix module unloading keep tty driver until usb driver is unregistered rmmod hso produces traces like this without that: [40261.645904] usb 2-2: new high-speed USB device number 2 using ehci-omap [40261.854644] usb 2-2: New USB device found, idVendor=0af0, idProduct=8800 [40261.862609] usb 2-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0 [40261.872772] usb 2-2: Product: Globetrotter HSUPA Modem [40261.880279] usb 2-2: Manufacturer: Option N.V. [40262.021270] hso 2-2:1.5: Not our interface [40265.556945] hso: unloaded [40265.559875] usbcore: deregistering interface driver hso [40265.595947] Unable to handle kernel NULL pointer dereference at virtual address 00000033 [40265.604522] pgd = ecb14000 [40265.611877] [00000033] *pgd=00000000 [40265.617034] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [40265.622650] Modules linked in: hso(-) bnep bluetooth ipv6 arc4 twl4030_madc_hwmon wl18xx wlcore mac80211 cfg80211 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_omap_twl4030 snd_soc_gtm601 generic_adc_battery extcon_gpio omap3_isp videobuf2_dma_contig videobuf2_memops wlcore_sdio videobuf2_v4l2 videobuf2_core ov9650 bmp280_i2c v4l2_common bmp280 bmg160_i2c bmg160_core at24 nvmem_core videodev bmc150_accel_i2c bmc150_magn_i2c media bmc150_accel_core tsc2007 bmc150_magn leds_tca6507 bno055 snd_soc_omap_mcbsp industrialio_triggered_buffer snd_soc_omap kfifo_buf snd_pcm_dmaengine gpio_twl4030 snd_soc_twl4030 twl4030_vibra twl4030_madc wwan_on_off ehci_omap pwm_bl pwm_omap_dmtimer panel_tpo_td028ttec1 encoder_opa362 connector_analog_tv omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect [40265.698211] sysimgblt fb_sys_fops cfbcopyarea drm omapdss usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs omap2430 phy_twl4030_usb musb_hdrc twl4030_charger industrialio w2sg0004 twl4030_pwrbutton bq27xxx_battery w1_bq27000 omap_hdq [last unloaded: hso] [40265.723175] CPU: 0 PID: 2701 Comm: rmmod Not tainted 4.11.0-rc6-letux+ #6 [40265.730346] Hardware name: Generic OMAP36xx (Flattened Device Tree) [40265.736938] task: ecb81100 task.stack: ecb82000 [40265.741729] PC is at cdev_del+0xc/0x2c [40265.745666] LR is at tty_unregister_device+0x40/0x50 [40265.750915] pc : [] lr : [] psr: 600b0113 sp : ecb83ea8 ip : eca4f898 fp : 00000000 [40265.763000] r10: 00000000 r9 : 00000000 r8 : 00000001 [40265.768493] r7 : eca4f800 r6 : 00000003 r5 : 00000000 r4 : ffffffff [40265.775360] r3 : c1458d54 r2 : 00000000 r1 : 00000004 r0 : ffffffff [40265.782257] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [40265.789764] Control: 10c5387d Table: acb14019 DAC: 00000051 [40265.795806] Process rmmod (pid: 2701, stack limit = 0xecb82218) [40265.802062] Stack: (0xecb83ea8 to 0xecb84000) [40265.806640] 3ea0: ec9e8100 c04b3ecc bf737378 ed5b7c00 00000003 bf7327ec [40265.815277] 3ec0: eca4f800 00000000 ec9fd800 eca4f800 bf737070 bf7328bc eca4f820 c05a9a04 [40265.823883] 3ee0: eca4f820 00000000 00000001 eca4f820 ec9fd870 bf737070 eca4f854 ec9fd8a4 [40265.832519] 3f00: ecb82000 00000000 00000000 c04e6960 eca4f820 bf737070 bf737048 00000081 [40265.841125] 3f20: c01071e4 c04e6a60 ecb81100 bf737070 bf737070 c04e5d94 bf737020 c05a8f88 [40265.849731] 3f40: bf737100 00000800 7f5fa254 00000081 c01071e4 c01c4afc 00000000 006f7368 [40265.858367] 3f60: ecb815f4 00000000 c0cac9c4 c01071e4 ecb82000 00000000 00000000 c01512f4 [40265.866973] 3f80: ed5b3200 c01071e4 7f5fa220 7f5fa220 bea78ec9 0010711c 7f5fa220 7f5fa220 [40265.875579] 3fa0: bea78ec9 c0107040 7f5fa220 7f5fa220 7f5fa254 00000800 dd35b800 dd35b800 [40265.884216] 3fc0: 7f5fa220 7f5fa220 bea78ec9 00000081 bea78dcc 00000000 bea78bd8 00000000 [40265.892822] 3fe0: b6f70521 bea78b6c 7f5dd613 b6f70526 80070030 7f5fa254 ffffffff ffffffff [40265.901458] [] (cdev_del) from [] (tty_unregister_device+0x40/0x50) [40265.909942] [] (tty_unregister_device) from [] (hso_free_interface+0x80/0x144 [hso]) [40265.919982] [] (hso_free_interface [hso]) from [] (hso_disconnect+0xc/0x18 [hso]) [40265.929718] [] (hso_disconnect [hso]) from [] (usb_unbind_interface+0x84/0x200) [40265.939239] [] (usb_unbind_interface) from [] (device_release_driver_internal+0x138/0x1cc) [40265.949798] [] (device_release_driver_internal) from [] (driver_detach+0x60/0x6c) [40265.959503] [] (driver_detach) from [] (bus_remove_driver+0x64/0x8c) [40265.968017] [] (bus_remove_driver) from [] (usb_deregister+0x5c/0xb8) [40265.976654] [] (usb_deregister) from [] (SyS_delete_module+0x160/0x1dc) [40265.985443] [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x1c) [40265.994171] Code: c1458d54 e59f3020 e92d4010 e1a04000 (e5941034) [40266.016693] ---[ end trace 9d5ac43c7e41075c ]--- Signed-off-by: Andreas Kemnade Reviewed-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05ff8378975a9d5fdde19104b62163d2902926fb Author: Parthasarathy Bhuvaragan Date: Mon Apr 24 15:00:43 2017 +0200 tipc: fix socket flow control accounting error at tipc_recv_stream Until now in tipc_recv_stream(), we update the received unacknowledged bytes based on a stack variable and not based on the actual message size. If the user buffer passed at tipc_recv_stream() is smaller than the received skb, the size variable in stack differs from the actual message size in the skb. This leads to a flow control accounting error causing permanent congestion. In this commit, we fix this accounting error by always using the size of the incoming message. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3364d61c92ecca7a8da990659c4b0ae1fcf0fcfb Author: Parthasarathy Bhuvaragan Date: Mon Apr 24 15:00:42 2017 +0200 tipc: fix socket flow control accounting error at tipc_send_stream Until now in tipc_send_stream(), we return -1 when the socket encounters link congestion even if the socket had successfully sent partial data. This is incorrect as the application resends the same the partial data leading to data corruption at receiver's end. In this commit, we return the partially sent bytes as the return value at link congestion. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4a2fbcee0c8449ce24d6de168f3d90c5e6d7596 Merge: dfb00a5 dc9617c Author: Takashi Iwai Date: Tue Apr 25 17:43:56 2017 +0200 Merge tag 'asoc-fix-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.11 A few last minute fixes for v4.11, the STI fix is relatively large but driver specific and has been cooking in -next for a little while now: - A fix from Takashi for some suspend/resume related crashes in the Intel drivers. - A fix from Mousumi Jana for issues with incorrectly created enumeration controls generated from topology files which could cause problems for userspace. - Fixes from Arnaud Pouliquen for some crashes due to races with the interrupt handler in the STI driver. commit b7d6df57516f8e6a1c847b822ec2a62555455f88 Author: Paolo Abeni Date: Mon Apr 24 14:18:28 2017 +0200 ipv6: move stub initialization after ipv6 setup completion The ipv6 stub pointer is currently initialized before the ipv6 routing subsystem: a 3rd party can access and use such stub before the routing data is ready. Moreover, such pointer is not cleared in case of initialization error, possibly leading to dangling pointers usage. This change addresses the above moving the stub initialization at the end of ipv6 init code. Fixes: 5f81bd2e5d80 ("ipv6: export a stub for IPv6 symbols used by vxlan") Signed-off-by: Paolo Abeni Acked-by: Cong Wang Signed-off-by: David S. Miller net/ipv6/af_inet6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 72ec0bc64b9a5d8e0efcb717abfc757746b101b7 Author: Pan Bian Date: Mon Apr 24 18:29:16 2017 +0800 team: fix memory leaks In functions team_nl_send_port_list_get() and team_nl_send_options_get(), pointer skb keeps the return value of nlmsg_new(). When the call to genlmsg_put() fails, the memory is not freed(). This will result in memory leak bugs. Fixes: 9b00cf2d1024 ("team: implement multipart netlink messages for options transfers") Signed-off-by: Pan Bian Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit dc9617cb81c4130858b6dd026039f42a39e93c18 Merge: 6e4cac2 b6e38b2 d05d862 Author: Mark Brown Date: Tue Apr 25 16:25:07 2017 +0100 Merge remote-tracking branches 'asoc/fix/intel', 'asoc/fix/topology' and 'asoc/fix/sti' into asoc-linus commit fccb4422d045263fa021438e2c52a07b037683f2 Merge: a53d26e b05c73b Author: David S. Miller Date: Tue Apr 25 11:20:30 2017 -0400 Merge tag 'linux-can-fixes-for-4.11-20170425' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-04-25 this is a pull request of three patches for net/master. There are two patches by Stephane Grosjean for that add a new variant to the PCAN-Chip USB driver. The other patch is by Maksim Salau, which swtiches the memory for USB transfers from heap to stack. ==================== Signed-off-by: David S. Miller commit a53d26eb888ab1c41779c443daf1af948c641e0b Author: Bert Kenward Date: Tue Apr 25 13:44:54 2017 +0100 sfc: tx ring can only have 2048 entries for all EF10 NICs Fixes: dd248f1bc65b ("sfc: Add PCI ID for Solarflare 8000 series 10/40G NIC") Reported-by: Patrick Talbert Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.h | 5 ++++- drivers/net/ethernet/sfc/workarounds.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 6e4cac23c5a648d50b107d1b53e9c4e1120c7943 Author: Takashi Iwai Date: Mon Apr 24 14:09:55 2017 +0200 ASoC: intel: Fix PM and non-atomic crash in bytcr drivers The FE setups of Intel SST bytcr_rt5640 and bytcr_rt5651 drivers carry the ignore_suspend flag, and this prevents the suspend/resume working properly while the stream is running, since SST core code has the check of the running streams and returns -EBUSY. Drop these superfluous flags for fixing the behavior. Also, the bytcr_rt5640 driver lacks of nonatomic flag in some FE definitions, which leads to the kernel Oops at suspend/resume like: BUG: scheduling while atomic: systemd-sleep/3144/0x00000003 Call Trace: dump_stack+0x5c/0x7a __schedule_bug+0x55/0x70 __schedule+0x63c/0x8c0 schedule+0x3d/0x90 schedule_timeout+0x16b/0x320 ? del_timer_sync+0x50/0x50 ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core] ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core] ? remove_wait_queue+0x60/0x60 ? sst_prepare_and_post_msg+0x275/0x960 [snd_intel_sst_core] ? sst_pause_stream+0x9b/0x110 [snd_intel_sst_core] .... This patch addresses these appropriately, too. Signed-off-by: Takashi Iwai Acked-by: Vinod Koul Signed-off-by: Mark Brown Cc: # v4.1+ sound/soc/intel/boards/bytcr_rt5640.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit f6478218e6edc2a587b8f132f66373baa7b2497c Author: Herbert Xu Date: Thu Apr 20 20:55:12 2017 +0800 macvlan: Fix device ref leak when purging bc_queue When a parent macvlan device is destroyed we end up purging its broadcast queue without dropping the device reference count on the packet source device. This causes the source device to linger. This patch drops that reference count. Fixes: 260916dfb48c ("macvlan: Fix potential use-after free for...") Reported-by: Joe Ghalam Signed-off-by: Herbert Xu Signed-off-by: David S. Miller drivers/net/macvlan.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6f2aee0c0de65013333bbc26fe50c9c7b09a37f7 Author: Roman Spychała Date: Thu Apr 20 12:04:10 2017 +0200 usb: plusb: Add support for PL-27A1 This patch adds support for the PL-27A1 by adding the appropriate USB ID's. This chip is used in the goobay Active USB 3.0 Data Link and Unitek Y-3501 cables. Signed-off-by: Roman Spychała Signed-off-by: David S. Miller drivers/net/usb/Kconfig | 2 +- drivers/net/usb/plusb.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) commit b05c73bd1e3ec60357580eb042ee932a5ed754d5 Author: Maksim Salau Date: Sun Apr 23 20:31:40 2017 +0300 net: can: usb: gs_usb: Fix buffer on stack Allocate buffers on HEAP instead of STACK for local structures that are to be sent using usb_control_msg(). Signed-off-by: Maksim Salau Cc: linux-stable # >= v4.8 Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 71b611562f45e8798d519a38d0143d5eafd6eb35 Author: Stephane Grosjean Date: Mon Mar 27 14:36:11 2017 +0200 can: usb: Kconfig: Add PCAN-USB X6 device in help text This patch adds a text line in the help section of the CAN_PEAK_USB config item describing the support of the PCAN-USB X6 adapter, which is already included in the Kernel since 4.9. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ea8b65b596d78969629562f9728f76cbf565fbec Author: Stephane Grosjean Date: Mon Mar 27 14:36:10 2017 +0200 can: usb: Add support of PCAN-Chip USB stamp module This patch adds the support of the PCAN-Chip USB, a stamp module for customer hardware designs, which communicates via USB 2.0 with the hardware. The integrated CAN controller supports the protocols CAN 2.0 A/B as well as CAN FD. The physical CAN connection is determined by external wiring. The Stamp module with its single-sided mounting and plated half-holes is suitable for automatic assembly. Note that the chip is equipped with the same logic than the PCAN-USB FD. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 1 + drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 + drivers/net/can/usb/peak_usb/pcan_usb_core.h | 2 + drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 72 ++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+) commit 7c5bb4ac2b76d2a09256aec8a7d584bf3e2b0466 Author: Dmitry Torokhov Date: Thu Apr 13 15:36:31 2017 -0700 Input: i8042 - add Clevo P650RS to the i8042 reset list Clevo P650RS and other similar devices require i8042 to be reset in order to detect Synaptics touchpad. Reported-by: Paweł Bylica Tested-by: Ed Bordin Cc: stable@vger.kernel.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=190301 Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 38a98bceaf5f786b931d16826fbb46e73280849b Merge: 38baf3a bfcda65 Author: David S. Miller Date: Mon Apr 24 18:28:57 2017 -0400 Merge branch 'dsa-b53-58xx-fixes' Florian Fainelli says: ==================== net: dsa: b53: BCM58xx devices fixes This patch series contains fixes for the 58xx devices (Broadcom Northstar Plus), which were identified thanks to the help of Eric Anholt. ==================== Tested-by: Eric Anholt Signed-off-by: David S. Miller commit bfcda65c9ba57004533c12673347503f250c3290 Author: Florian Fainelli Date: Mon Apr 24 14:27:23 2017 -0700 net: dsa: b53: Fix CPU port for 58xx devices The 58xx devices (Northstar Plus) do actually have their CPU port wired at port 8, it was unfortunately set to port 5 (B53_CPU_PORT_25) which is incorrect, since that is the second possible management port. Fixes: 991a36bb4645 ("net: dsa: b53: Add support for BCM585xx/586xx/88312 integrated switch") Reported-by: Eric Anholt Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fb22b0534e412569dd67dec625b4a051c7c2d7e Author: Florian Fainelli Date: Mon Apr 24 14:27:22 2017 -0700 net: dsa: b53: Implement software reset for 58xx devices Implement the correct software reset sequence for 58xx devices by setting all 3 reset bits and polling for the SW_RST bit to clear itself without a given timeout. We cannot use is58xx() here because that would also include the 7445/7278 Starfighter 2 which have their own driver doing the reset earlier on due to the HW specific integration. Fixes: 991a36bb4645 ("net: dsa: b53: Add support for BCM585xx/586xx/88312 integrated switch") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 25 ++++++++++++++++++++++++- drivers/net/dsa/b53/b53_regs.h | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) commit a424f0de61638cbb5047e0a888c54da9cf471f90 Author: Florian Fainelli Date: Mon Apr 24 14:27:21 2017 -0700 net: dsa: b53: Include IMP/CPU port in dumb forwarding mode Since Broadcom tags are not enabled in b53 (DSA_PROTO_TAG_NONE), we need to make sure that the IMP/CPU port is included in the forwarding decision. Without this change, switching between non-management ports would work, but not between management ports and non-management ports thus breaking the default state in which DSA switch are brought up. Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Reported-by: Eric Anholt Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 10 ++++++++++ drivers/net/dsa/b53/b53_regs.h | 4 ++++ 2 files changed, 14 insertions(+) commit 8f9cedc76fc7d9bc916127f8fe1287a249891d40 Merge: 3d339d3 ca855a5 Author: Linus Torvalds Date: Mon Apr 24 13:31:08 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Our final fix before the 4.12 release (hopefully). It's an error leg again: the fix to not bug on empty DMA transfers is returning the wrong code and confusing the block layer" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: return correct blkprep status code in case scsi_init_io() fails. commit 3d339d3370417b627011ac2a98525ca4dec325ae Merge: 5a7ad11 edb0b6a Author: Linus Torvalds Date: Mon Apr 24 13:20:33 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Another round of 4.11 for the MIPS architecture. This time around it's mostly arch but little platforms-specific code. - PCI: Register controllers in the right order to aoid a PCI error - KGDB: Use kernel context for sleeping threads - smp-cps: Fix potentially uninitialised value of core - KASLR: Fix build - ELF: Fix BUG() warning in arch_check_elf - Fix modversioning of _mcount symbol - fix out-of-tree defconfig target builds - cevt-r4k: Fix out-of-bounds array access - perf: fix deadlock - Malta: Fix i8259 irqchip setup" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: PCI: add controllers before the specified head MIPS: KGDB: Use kernel context for sleeping threads MIPS: smp-cps: Fix potentially uninitialised value of core MIPS: KASLR: Add missing header files MIPS: Avoid BUG warning in arch_check_elf MIPS: Fix modversioning of _mcount symbol MIPS: generic: fix out-of-tree defconfig target builds MIPS: cevt-r4k: Fix out-of-bounds array access MIPS: perf: fix deadlock MIPS: Malta: Fix i8259 irqchip setup commit 38baf3a68bd2a8bca346abf0ba4b98a691543e7e Merge: fc1f8f4 5e82c9e Author: David S. Miller Date: Mon Apr 24 15:58:03 2017 -0400 Merge tag 'mlx5-fixes-2017-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-04-22 This series contains some mlx5 fixes for net. For your convenience, the series doesn't introduce any conflict with the ongoing net-next pull request. Please pull and let me know if there's any problem. For -stable: ("net/mlx5: E-Switch, Correctly deal with inline mode on ConnectX-5") kernels >= 4.10 ("net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling") kernels >= 4.8 ("net/mlx5e: Fix small packet threshold") kernels >= 4.7 ("net/mlx5: Fix driver load bad flow when having fw initializing timeout") kernels >= 4.4 ==================== Signed-off-by: David S. Miller commit fc1f8f4f310ac65b1337e2d7ba52ae4ff2b7c849 Author: David Ahern Date: Sat Apr 22 09:10:13 2017 -0700 net: ipv6: send unsolicited NA if enabled for all interfaces When arp_notify is set to 1 for either a specific interface or for 'all' interfaces, gratuitous arp requests are sent. Since ndisc_notify is the ipv6 equivalent to arp_notify, it should follow the same semantics. Commit 4a6e3c5def13 ("net: ipv6: send unsolicited NA on admin up") sends the NA on admin up. The final piece is checking devconf_all->ndisc_notify in addition to the per device setting. Add it. Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change") Signed-off-by: David Ahern Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/ipv6/ndisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9199cb7677b388b42e3d95c755090dfc5ab2b11a Author: Dan Carpenter Date: Sat Apr 22 13:46:56 2017 +0300 ravb: Double free on error in ravb_start_xmit() If skb_put_padto() fails then it frees the skb. I shifted that code up a bit to make my error handling a little simpler. Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Dan Carpenter Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b40c5f4fde22fb98eff205b3aece05b471c24eed Author: Ansis Atteka Date: Fri Apr 21 15:23:05 2017 -0700 udp: disable inner UDP checksum offloads in IPsec case Otherwise, UDP checksum offloads could corrupt ESP packets by attempting to calculate UDP checksum when this inner UDP packet is already protected by IPsec. One way to reproduce this bug is to have a VM with virtio_net driver (UFO set to ON in the guest VM); and then encapsulate all guest's Ethernet frames in Geneve; and then further encrypt Geneve with IPsec. In this case following symptoms are observed: 1. If using ixgbe NIC, then it will complain with following error message: ixgbe 0000:01:00.1: partial checksum but l4 proto=32! 2. Receiving IPsec stack will drop all the corrupted ESP packets and increase XfrmInStateProtoError counter in /proc/net/xfrm_stat. 3. iperf UDP test from the VM with packet sizes above MTU will not work at all. 4. iperf TCP test from the VM will get ridiculously low performance because. Signed-off-by: Ansis Atteka Co-authored-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv4/udp_offload.c | 3 +++ 1 file changed, 3 insertions(+) commit 4d6fa57b4dab0d77f4d8e9d9c73d1e63f6fe8fee Author: Jason A. Donenfeld Date: Fri Apr 21 23:14:48 2017 +0200 macsec: avoid heap overflow in skb_to_sgvec While this may appear as a humdrum one line change, it's actually quite important. An sk_buff stores data in three places: 1. A linear chunk of allocated memory in skb->data. This is the easiest one to work with, but it precludes using scatterdata since the memory must be linear. 2. The array skb_shinfo(skb)->frags, which is of maximum length MAX_SKB_FRAGS. This is nice for scattergather, since these fragments can point to different pages. 3. skb_shinfo(skb)->frag_list, which is a pointer to another sk_buff, which in turn can have data in either (1) or (2). The first two are rather easy to deal with, since they're of a fixed maximum length, while the third one is not, since there can be potentially limitless chains of fragments. Fortunately dealing with frag_list is opt-in for drivers, so drivers don't actually have to deal with this mess. For whatever reason, macsec decided it wanted pain, and so it explicitly specified NETIF_F_FRAGLIST. Because dealing with (1), (2), and (3) is insane, most users of sk_buff doing any sort of crypto or paging operation calls a convenient function called skb_to_sgvec (which happens to be recursive if (3) is in use!). This takes a sk_buff as input, and writes into its output pointer an array of scattergather list items. Sometimes people like to declare a fixed size scattergather list on the stack; othertimes people like to allocate a fixed size scattergather list on the heap. However, if you're doing it in a fixed-size fashion, you really shouldn't be using NETIF_F_FRAGLIST too (unless you're also ensuring the sk_buff and its frag_list children arent't shared and then you check the number of fragments in total required.) Macsec specifically does this: size += sizeof(struct scatterlist) * (MAX_SKB_FRAGS + 1); tmp = kmalloc(size, GFP_ATOMIC); *sg = (struct scatterlist *)(tmp + sg_offset); ... sg_init_table(sg, MAX_SKB_FRAGS + 1); skb_to_sgvec(skb, sg, 0, skb->len); Specifying MAX_SKB_FRAGS + 1 is the right answer usually, but not if you're using NETIF_F_FRAGLIST, in which case the call to skb_to_sgvec will overflow the heap, and disaster ensues. Signed-off-by: Jason A. Donenfeld Cc: stable@vger.kernel.org Cc: security@kernel.org Signed-off-by: David S. Miller drivers/net/macsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7c8487cb3d99509220092fe77a2464dff43f015 Author: Robert Shearman Date: Fri Apr 21 21:34:59 2017 +0100 ipv4: Avoid caching l3mdev dst on mismatched local route David reported that doing the following: ip li add red type vrf table 10 ip link set dev eth1 vrf red ip addr add 127.0.0.1/8 dev red ip link set dev eth1 up ip li set red up ping -c1 -w1 -I red 127.0.0.1 ip li del red when either policy routing IP rules are present or the local table lookup ip rule is before the l3mdev lookup results in a hang with these messages: unregister_netdevice: waiting for red to become free. Usage count = 1 The problem is caused by caching the dst used for sending the packet out of the specified interface on a local route with a different nexthop interface. Thus the dst could stay around until the route in the table the lookup was done is deleted which may be never. Address the problem by not forcing output device to be the l3mdev in the flow's output interface if the lookup didn't use the l3mdev. This then results in the dst using the right device according to the route. Changes in v2: - make the dev_out passed in by __ip_route_output_key_hash correct instead of checking the nh dev if FLOWI_FLAG_SKIP_NH_OIF is set as suggested by David. Fixes: 5f02ce24c2696 ("net: l3mdev: Allow the l3mdev to be a loopback") Reported-by: David Ahern Suggested-by: David Ahern Signed-off-by: Robert Shearman Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 11faa7b0359aaf7efd406b7a6a077fda2b037d8e Author: Dan Carpenter Date: Fri Apr 21 13:49:37 2017 +0300 net: tc35815: move free after the dereference We dereference "skb" to get "skb->len" so we should probably do that step before freeing the skb. Fixes: eea221ce4880 ("tc35815 driver update (take 2)") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/tc35815.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1510d728639e183b60bd1285b09a49c393923ba5 Author: Martin KaFai Lau Date: Thu Apr 20 21:40:12 2017 -0700 net/mlx5e: Fix race in mlx5e_sw_stats and mlx5e_vport_stats We have observed a sudden spike in rx/tx_packets and rx/tx_bytes reported under /proc/net/dev. There is a race in mlx5e_update_stats() and some of the get-stats functions (the one that we hit is the mlx5e_get_stats() which is called by ndo_get_stats64()). In particular, the very first thing mlx5e_update_sw_counters() does is 'memset(s, 0, sizeof(*s))'. For example, if mlx5e_get_stats() is unlucky at one point, rx_bytes and rx_packets could be 0. One second later, a normal (and much bigger than 0) value will be reported. This patch is to use a 'struct mlx5e_sw_stats temp' to avoid a direct memset zero on priv->stats.sw. mlx5e_update_vport_counters() has a similar race. Hence, addressed together. However, memset zero is removed instead because it is not needed. I am lucky enough to catch this 0-reset in rx multicast: eth0: 41457665 76804 70 0 0 70 0 47085 15586634 87502 3 0 0 0 3 0 eth0: 41459860 76815 70 0 0 70 0 47094 15588376 87516 3 0 0 0 3 0 eth0: 41460577 76822 70 0 0 70 0 0 15589083 87521 3 0 0 0 3 0 eth0: 41463293 76838 70 0 0 70 0 47108 15595872 87538 3 0 0 0 3 0 eth0: 41463379 76839 70 0 0 70 0 47116 15596138 87539 3 0 0 0 3 0 v2: Remove memset zero from mlx5e_update_vport_counters() v1: Use temp and memcpy Fixes: 9218b44dcc05 ("net/mlx5e: Statistics handling refactoring") Suggested-by: Eric Dumazet Suggested-by: Saeed Mahameed Signed-off-by: Martin KaFai Lau Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6ebf0bb1a983a7b60a26acf282975b5da5b3202 Author: David S. Miller Date: Sun Apr 23 18:28:55 2017 -0700 sparc: Update syscall tables. Hook up statx. Ignore pkeys system calls, we don't have protection keeys on SPARC. Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/unistd.h | 8 +++++++- arch/sparc/kernel/systbls_32.S | 1 + arch/sparc/kernel/systbls_64.S | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) commit b7c02b733c010eb65ab8957dc0d023763a3182bc Author: David S. Miller Date: Sun Apr 23 17:15:51 2017 -0700 sparc64: Fill in rest of HAVE_REGS_AND_STACK_ACCESS_API This lets us enable KPROBE_EVENTS. Signed-off-by: David S. Miller arch/sparc/Kconfig | 1 + arch/sparc/include/asm/ptrace.h | 3 ++- arch/sparc/kernel/ptrace_64.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) commit 5a7ad1146caa895ad718a534399e38bd2ba721b7 Author: Linus Torvalds Date: Sun Apr 23 16:53:00 2017 -0700 Linux 4.11-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ea33c44fb19e6cbacf65021628f8ce393ba9f34 Merge: e0f4e01 32fe905 Author: Linus Torvalds Date: Sun Apr 23 16:49:16 2017 -0700 Merge tag 'upstream-4.11-rc7' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS fixes from Richard Weinberger: "This contains fixes for issues in both UBI and UBIFS: - more O_TMPFILE fallout - RENAME_WHITEOUT regression due to a mis-merge - memory leak in ubifs_mknod() - power-cut problem in UBI's update volume feature" * tag 'upstream-4.11-rc7' of git://git.infradead.org/linux-ubifs: ubifs: Fix O_TMPFILE corner case in ubifs_link() ubifs: Fix RENAME_WHITEOUT support ubifs: Fix debug messages for an invalid filename in ubifs_dump_inode ubifs: Fix debug messages for an invalid filename in ubifs_dump_node ubifs: Remove filename from debug messages in ubifs_readdir ubifs: Fix memory leak in error path in ubifs_mknod ubi/upd: Always flush after prepared for an update commit e0f4e0134a796f0e48403adf22db48a0dffdde1d Merge: fa8d7cd 0dc9c63 Author: Linus Torvalds Date: Sun Apr 23 12:51:42 2017 -0700 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Thomas Gleixner: "The MCE atomic notifier callchain invokes callbacks which might sleep. Convert it to a blocking notifier and prevent calls from atomic context" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Make the MCE notifier a blocking one commit fa8d7cdc849e2ffa1748157277fc1d73315a4251 Merge: 94836ec b72f805 Author: Linus Torvalds Date: Sun Apr 23 12:48:05 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: "The (hopefully) final fix for the irq affinity spreading logic" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/affinity: Fix calculating vectors to assign commit 5e82c9e4ed60beba83f46a1a5a8307b99a23e982 Author: Ilan Tayari Date: Thu Mar 2 15:49:45 2017 +0200 net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling Handler for ETHTOOL_GRXCLSRLALL must set info->data to the size of the table, regardless of the amount of entries in it. Existing code does not do that, and this breaks all usage of ethtool -N or -n without explicit location, with this error: rmgr: Invalid RX class rules table size: Success Set info->data to the table size. Tested: ethtool -n ens8 ethtool -N ens8 flow-type ip4 src-ip 1.1.1.1 dst-ip 2.2.2.2 action 1 ethtool -N ens8 flow-type ip4 src-ip 1.1.1.1 dst-ip 2.2.2.2 action 1 loc 55 ethtool -n ens8 ethtool -N ens8 delete 1023 ethtool -N ens8 delete 55 Fixes: f913a72aa008 ("net/mlx5e: Add support to get ethtool flow rules") Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit cbad8cddb6ed7ef3a5f0a9a70f1711d4d7fb9a8f Author: Eugenia Emantayev Date: Wed Mar 22 11:44:14 2017 +0200 net/mlx5e: Fix small packet threshold RX packet headers are meant to be contained in SKB linear part, and chose a threshold of 128. It turns out this is not enough, i.e. for IPv6 packet over VxLAN. In this case, UDP/IPv4 needs 42 bytes, GENEVE header is 8 bytes, and 86 bytes for TCP/IPv6. In total 136 bytes that is more than current 128 bytes. In this case expand header flow is reached. The warning in skb_try_coalesce() caused by a wrong truesize was already fixed here: commit 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()"). Still, we prefer to totally avoid the expand header flow for performance reasons. Tested regular TCP_STREAM with iperf for 1 and 8 streams, no degradation was found. Fixes: 461017cb006a ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)") Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ae85b0edaa597b063ee9d8f48b830519a6e0c0f Author: Maor Gottlieb Date: Thu Apr 6 10:49:12 2017 +0300 net/mlx5: Fix UAR memory leak When UAR is released, we deallocate the device resource, but don't unmmap the UAR mapping memory. Fix the leak by unmapping this memory. Fixes: a6d51b68611e9 ('net/mlx5: Introduce blue flame register allocator) Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 + 1 file changed, 1 insertion(+) commit 225aabaffe9ab42b2dd8770359442f019083275e Author: Or Gerlitz Date: Thu Apr 6 19:28:30 2017 +0300 net/mlx5e: Make sure the FW max encap size is enough for ipv6 tunnels Otherwise the code that fills the ipv6 encapsulation headers could be writing beyond the allocated headers buffer. Fixes: ce99f6b97fcd ('net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 42 ++++++++++++++----------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 32f3671f6951836cfe9d84e1a6554908b85c61d7 Author: Or Gerlitz Date: Thu Apr 6 19:20:21 2017 +0300 net/mlx5e: Make sure the FW max encap size is enough for ipv4 tunnels Otherwise the code that fills the ipv4 encapsulation headers could be writing beyond the allocated headers buffer. Fixes: a54e20b4fcae ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 42 ++++++++++++++----------- 1 file changed, 23 insertions(+), 19 deletions(-) commit c415f704c8276bc686abcb0497bf2606038ca73c Author: Or Gerlitz Date: Thu Mar 30 15:56:10 2017 +0200 net/mlx5: E-Switch, Correctly deal with inline mode on ConnectX-5 On ConnectX5 the wqe inline mode is "none" and hence the FW reports MLX5_CAP_INLINE_MODE_NOT_REQUIRED. Fix our devlink callbacks to deal with that on get and set. Also fix the tc flow parsing code not to fail anything when inline isn't required. Fixes: bffaa916588e ('net/mlx5: E-Switch, Add control for inline mode') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 36 ++++++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) commit 55378a238e04b39cc82957d91d16499704ea719b Author: Mohamad Haj Yahia Date: Thu Mar 30 17:00:25 2017 +0300 net/mlx5: Fix driver load bad flow when having fw initializing timeout If FW is stuck in initializing state we will skip the driver load, but current error handling flow doesn't clean previously allocated command interface resources. Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94836ecf1e7378b64d37624fbb81fe48fbd4c772 Merge: 057a650 05b7278 Author: Linus Torvalds Date: Fri Apr 21 16:37:48 2017 -0700 Merge tag 'nfsd-4.11-2' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfix from Bruce Fields: "Fix a 4.11 regression that triggers a BUG() on an attempt to use an unsupported NFSv4 compound op" * tag 'nfsd-4.11-2' of git://linux-nfs.org/~bfields/linux: nfsd: fix oops on unsupported operation commit 057a650bdcb05ec5947558b6baa5305a3cb15f17 Merge: 92b4fc7 c70b17b7 Author: Linus Torvalds Date: Fri Apr 21 13:20:47 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Don't race in IPSEC dumps, from Yuejie Shi. 2) Verify lengths properly in IPSEC reqeusts, from Herbert Xu. 3) Fix out of bounds access in ipv6 segment routing code, from David Lebrun. 4) Don't write into the header of cloned SKBs in smsc95xx driver, from James Hughes. 5) Several other drivers have this bug too, fix them. From Eric Dumazet. 6) Fix access to uninitialized data in TC action cookie code, from Wolfgang Bumiller. 7) Fix double free in IPV6 segment routing, again from David Lebrun. 8) Don't let userspace set the RTF_PCPU flag, oops. From David Ahern. 9) Fix use after free in qrtr code, from Dan Carpenter. 10) Don't double-destroy devices in ip6mr code, from Nikolay Aleksandrov. 11) Don't pass out-of-range TX queue indices into drivers, from Tushar Dave. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits) netpoll: Check for skb->queue_mapping ip6mr: fix notification device destruction bpf, doc: update bpf maintainers entry net: qrtr: potential use after free in qrtr_sendmsg() bpf: Fix values type used in test_maps net: ipv6: RTF_PCPU should not be settable from userspace gso: Validate assumption of frag_list segementation kaweth: use skb_cow_head() to deal with cloned skbs ch9200: use skb_cow_head() to deal with cloned skbs lan78xx: use skb_cow_head() to deal with cloned skbs sr9700: use skb_cow_head() to deal with cloned skbs cx82310_eth: use skb_cow_head() to deal with cloned skbs smsc75xx: use skb_cow_head() to deal with cloned skbs ipv6: sr: fix double free of skb after handling invalid SRH MAINTAINERS: Add "B:" field for networking. net sched actions: allocate act cookie early qed: Fix issue in populating the PFC config paramters. qed: Fix possible system hang in the dcbnl-getdcbx() path. qed: Fix sending an invalid PFC error mask to MFW. qed: Fix possible error in populating max_tc field. ... commit c70b17b775edb21280e9de7531acf6db3b365274 Author: Tushar Dave Date: Thu Apr 20 15:57:31 2017 -0700 netpoll: Check for skb->queue_mapping Reducing real_num_tx_queues needs to be in sync with skb queue_mapping otherwise skbs with queue_mapping greater than real_num_tx_queues can be sent to the underlying driver and can result in kernel panic. One such event is running netconsole and enabling VF on the same device. Or running netconsole and changing number of tx queues via ethtool on same device. e.g. Unable to handle kernel NULL pointer dereference tsk->{mm,active_mm}->context = 0000000000001525 tsk->{mm,active_mm}->pgd = fff800130ff9a000 \|/ ____ \|/ "@'/ .. \`@" /_| \__/ |_\ \__U_/ kworker/48:1(475): Oops [#1] CPU: 48 PID: 475 Comm: kworker/48:1 Tainted: G OE 4.11.0-rc3-davem-net+ #7 Workqueue: events queue_process task: fff80013113299c0 task.stack: fff800131132c000 TSTATE: 0000004480e01600 TPC: 00000000103f9e3c TNPC: 00000000103f9e40 Y: 00000000 Tainted: G OE TPC: g0: 0000000000000000 g1: 0000000000003fff g2: 0000000000000000 g3: 0000000000000001 g4: fff80013113299c0 g5: fff8001fa6808000 g6: fff800131132c000 g7: 00000000000000c0 o0: fff8001fa760c460 o1: fff8001311329a50 o2: fff8001fa7607504 o3: 0000000000000003 o4: fff8001f96e63a40 o5: fff8001311d77ec0 sp: fff800131132f0e1 ret_pc: 000000000049ed94 RPC: l0: 0000000000000000 l1: 0000000000000800 l2: 0000000000000000 l3: 0000000000000000 l4: 000b2aa30e34b10d l5: 0000000000000000 l6: 0000000000000000 l7: fff8001fa7605028 i0: fff80013111a8a00 i1: fff80013155a0780 i2: 0000000000000000 i3: 0000000000000000 i4: 0000000000000000 i5: 0000000000100000 i6: fff800131132f1a1 i7: 00000000103fa4b0 I7: Call Trace: [00000000103fa4b0] ixgbe_xmit_frame+0x30/0xa0 [ixgbe] [0000000000998c74] netpoll_start_xmit+0xf4/0x200 [0000000000998e10] queue_process+0x90/0x160 [0000000000485fa8] process_one_work+0x188/0x480 [0000000000486410] worker_thread+0x170/0x4c0 [000000000048c6b8] kthread+0xd8/0x120 [0000000000406064] ret_from_fork+0x1c/0x2c [0000000000000000] (null) Disabling lock debugging due to kernel taint Caller[00000000103fa4b0]: ixgbe_xmit_frame+0x30/0xa0 [ixgbe] Caller[0000000000998c74]: netpoll_start_xmit+0xf4/0x200 Caller[0000000000998e10]: queue_process+0x90/0x160 Caller[0000000000485fa8]: process_one_work+0x188/0x480 Caller[0000000000486410]: worker_thread+0x170/0x4c0 Caller[000000000048c6b8]: kthread+0xd8/0x120 Caller[0000000000406064]: ret_from_fork+0x1c/0x2c Caller[0000000000000000]: (null) Signed-off-by: Tushar Dave Signed-off-by: David S. Miller net/core/netpoll.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 723b929ca0f79c0796f160c2eeda4597ee98d2b8 Author: Nikolay Aleksandrov Date: Fri Apr 21 20:42:16 2017 +0300 ip6mr: fix notification device destruction Andrey Konovalov reported a BUG caused by the ip6mr code which is caused because we call unregister_netdevice_many for a device that is already being destroyed. In IPv4's ipmr that has been resolved by two commits long time ago by introducing the "notify" parameter to the delete function and avoiding the unregister when called from a notifier, so let's do the same for ip6mr. The trace from Andrey: ------------[ cut here ]------------ kernel BUG at net/core/dev.c:6813! invalid opcode: 0000 [#1] SMP KASAN Modules linked in: CPU: 1 PID: 1165 Comm: kworker/u4:3 Not tainted 4.11.0-rc7+ #251 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: netns cleanup_net task: ffff880069208000 task.stack: ffff8800692d8000 RIP: 0010:rollback_registered_many+0x348/0xeb0 net/core/dev.c:6813 RSP: 0018:ffff8800692de7f0 EFLAGS: 00010297 RAX: ffff880069208000 RBX: 0000000000000002 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88006af90569 RBP: ffff8800692de9f0 R08: ffff8800692dec60 R09: 0000000000000000 R10: 0000000000000006 R11: 0000000000000000 R12: ffff88006af90070 R13: ffff8800692debf0 R14: dffffc0000000000 R15: ffff88006af90000 FS: 0000000000000000(0000) GS:ffff88006cb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe7e897d870 CR3: 00000000657e7000 CR4: 00000000000006e0 Call Trace: unregister_netdevice_many.part.105+0x87/0x440 net/core/dev.c:7881 unregister_netdevice_many+0xc8/0x120 net/core/dev.c:7880 ip6mr_device_event+0x362/0x3f0 net/ipv6/ip6mr.c:1346 notifier_call_chain+0x145/0x2f0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x51/0x90 net/core/dev.c:1647 call_netdevice_notifiers net/core/dev.c:1663 rollback_registered_many+0x919/0xeb0 net/core/dev.c:6841 unregister_netdevice_many.part.105+0x87/0x440 net/core/dev.c:7881 unregister_netdevice_many net/core/dev.c:7880 default_device_exit_batch+0x4fa/0x640 net/core/dev.c:8333 ops_exit_list.isra.4+0x100/0x150 net/core/net_namespace.c:144 cleanup_net+0x5a8/0xb40 net/core/net_namespace.c:463 process_one_work+0xc04/0x1c10 kernel/workqueue.c:2097 worker_thread+0x223/0x19c0 kernel/workqueue.c:2231 kthread+0x35e/0x430 kernel/kthread.c:231 ret_from_fork+0x31/0x40 arch/x86/entry/entry_64.S:430 Code: 3c 32 00 0f 85 70 0b 00 00 48 b8 00 02 00 00 00 00 ad de 49 89 47 78 e9 93 fe ff ff 49 8d 57 70 49 8d 5f 78 eb 9e e8 88 7a 14 fe <0f> 0b 48 8b 9d 28 fe ff ff e8 7a 7a 14 fe 48 b8 00 00 00 00 00 RIP: rollback_registered_many+0x348/0xeb0 RSP: ffff8800692de7f0 ---[ end trace e0b29c57e9b3292c ]--- Reported-by: Andrey Konovalov Signed-off-by: Nikolay Aleksandrov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit cdb90499187c5084453665f1b0b2de72b069bbdf Author: Daniel Borkmann Date: Thu Apr 20 17:27:58 2017 +0200 bpf, doc: update bpf maintainers entry Add various related files that have been missing under BPF entry covering essential parts of its infrastructure and also add myself as co-maintainer. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller MAINTAINERS | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 6f60f438108c66988c944894e5f673ab5d04fbc1 Author: Dan Carpenter Date: Thu Apr 20 13:21:30 2017 +0300 net: qrtr: potential use after free in qrtr_sendmsg() If skb_pad() fails then it frees the skb so we should check for errors. Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/qrtr/qrtr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 89087c456fb5cb5e534edf1c30568a8baae4c906 Author: David Miller Date: Thu Apr 20 15:20:16 2017 -0400 bpf: Fix values type used in test_maps Maps of per-cpu type have their value element size adjusted to 8 if it is specified smaller during various map operations. This makes test_maps as a 32-bit binary fail, in fact the kernel writes past the end of the value's array on the user's stack. To be quite honest, I think the kernel should reject creation of a per-cpu map that doesn't have a value size of at least 8 if that's what the kernel is going to silently adjust to later. If the user passed something smaller, it is a sizeof() calcualtion based upon the type they will actually use (just like in this testcase code) in later calls to the map operations. Fixes: df570f577231 ("samples/bpf: unit test for BPF_MAP_TYPE_PERCPU_ARRAY") Signed-off-by: David S. Miller Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov tools/testing/selftests/bpf/test_maps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 557c44be917c322860665be3d28376afa84aa936 Author: David Ahern Date: Wed Apr 19 14:19:43 2017 -0700 net: ipv6: RTF_PCPU should not be settable from userspace Andrey reported a fault in the IPv6 route code: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.0-rc7+ #250 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff880069809600 task.stack: ffff880062dc8000 RIP: 0010:ip6_rt_cache_alloc+0xa6/0x560 net/ipv6/route.c:975 RSP: 0018:ffff880062dced30 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: ffff8800670561c0 RCX: 0000000000000006 RDX: 0000000000000003 RSI: ffff880062dcfb28 RDI: 0000000000000018 RBP: ffff880062dced68 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff880062dcfb28 R14: dffffc0000000000 R15: 0000000000000000 FS: 00007feebe37e7c0(0000) GS:ffff88006cb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000205a0fe4 CR3: 000000006b5c9000 CR4: 00000000000006e0 Call Trace: ip6_pol_route+0x1512/0x1f20 net/ipv6/route.c:1128 ip6_pol_route_output+0x4c/0x60 net/ipv6/route.c:1212 ... Andrey's syzkaller program passes rtmsg.rtmsg_flags with the RTF_PCPU bit set. Flags passed to the kernel are blindly copied to the allocated rt6_info by ip6_route_info_create making a newly inserted route appear as though it is a per-cpu route. ip6_rt_cache_alloc sees the flag set and expects rt->dst.from to be set - which it is not since it is not really a per-cpu copy. The subsequent call to __ip6_dst_alloc then generates the fault. Fix by checking for the flag and failing with EINVAL. Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info") Reported-by: Andrey Konovalov Signed-off-by: David Ahern Acked-by: Martin KaFai Lau Tested-by: Andrey Konovalov Signed-off-by: David S. Miller include/uapi/linux/ipv6_route.h | 2 +- net/ipv6/route.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 43170c4e0ba709c79130c3fe5a41e66279950cd0 Author: Ilan Tayari Date: Wed Apr 19 21:26:07 2017 +0300 gso: Validate assumption of frag_list segementation Commit 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") assumes that all SKBs in a frag_list (except maybe the last one) contain the same amount of GSO payload. This assumption is not always correct, resulting in the following warning message in the log: skb_segment: too many frags For example, mlx5 driver in Striding RQ mode creates some RX SKBs with one frag, and some with 2 frags. After GRO, the frag_list SKBs end up having different amounts of payload. If this frag_list SKB is then forwarded, the aforementioned assumption is violated. Validate the assumption, and fall back to software GSO if it not true. Change-Id: Ia03983f4a47b6534dd987d7a2aad96d54d46d212 Fixes: 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") Signed-off-by: Ilan Tayari Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/core/skbuff.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 918b70244f57920db8fcb5ae63e2d0c79b509821 Merge: 95b9b88 39fba78 Author: David S. Miller Date: Fri Apr 21 13:24:07 2017 -0400 Merge branch 'skb_cow_head' Eric Dumazet says: ==================== net: use skb_cow_head() to deal with cloned skbs James Hughes found an issue with smsc95xx driver. Same problematic code is found in other drivers. ==================== Signed-off-by: David S. Miller commit 39fba7835aacda65284a86e611774cbba71dac20 Author: Eric Dumazet Date: Wed Apr 19 09:59:26 2017 -0700 kaweth: use skb_cow_head() to deal with cloned skbs We can use skb_cow_head() to properly deal with clones, especially the ones coming from TCP stack that allow their head being modified. This avoids a copy. Signed-off-by: Eric Dumazet Cc: James Hughes Signed-off-by: David S. Miller drivers/net/usb/kaweth.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 6bc6895bdd6744e0136eaa4a11fbdb20a7db4e40 Author: Eric Dumazet Date: Wed Apr 19 09:59:25 2017 -0700 ch9200: use skb_cow_head() to deal with cloned skbs We need to ensure there is enough headroom to push extra header, but we also need to check if we are allowed to change headers. skb_cow_head() is the proper helper to deal with this. Fixes: 4a476bd6d1d9 ("usbnet: New driver for QinHeng CH9200 devices") Signed-off-by: Eric Dumazet Cc: James Hughes Cc: Matthew Garrett Signed-off-by: David S. Miller drivers/net/usb/ch9200.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d4ca73591916b760478d2b04334d5dcadc028e9c Author: Eric Dumazet Date: Wed Apr 19 09:59:24 2017 -0700 lan78xx: use skb_cow_head() to deal with cloned skbs We need to ensure there is enough headroom to push extra header, but we also need to check if we are allowed to change headers. skb_cow_head() is the proper helper to deal with this. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Eric Dumazet Cc: James Hughes Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d532c1082f68176363ed766d09bf187616e282fe Author: Eric Dumazet Date: Wed Apr 19 09:59:23 2017 -0700 sr9700: use skb_cow_head() to deal with cloned skbs We need to ensure there is enough headroom to push extra header, but we also need to check if we are allowed to change headers. skb_cow_head() is the proper helper to deal with this. Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support") Signed-off-by: Eric Dumazet Cc: James Hughes Signed-off-by: David S. Miller drivers/net/usb/sr9700.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a9e840a2081ed28c2b7caa6a9a0041c950b3c37d Author: Eric Dumazet Date: Wed Apr 19 09:59:22 2017 -0700 cx82310_eth: use skb_cow_head() to deal with cloned skbs We need to ensure there is enough headroom to push extra header, but we also need to check if we are allowed to change headers. skb_cow_head() is the proper helper to deal with this. Fixes: cc28a20e77b2 ("introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driver") Signed-off-by: Eric Dumazet Cc: James Hughes Signed-off-by: David S. Miller drivers/net/usb/cx82310_eth.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b7c6d2675899cfff0180412c63fc9cbd5bacdb4d Author: Eric Dumazet Date: Wed Apr 19 09:59:21 2017 -0700 smsc75xx: use skb_cow_head() to deal with cloned skbs We need to ensure there is enough headroom to push extra header, but we also need to check if we are allowed to change headers. skb_cow_head() is the proper helper to deal with this. Fixes: d0cad871703b ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver") Signed-off-by: Eric Dumazet Cc: James Hughes Signed-off-by: David S. Miller drivers/net/usb/smsc75xx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 95b9b88d2da5e43e025400afcb492643933bf858 Author: David Lebrun Date: Wed Apr 19 16:10:19 2017 +0200 ipv6: sr: fix double free of skb after handling invalid SRH The icmpv6_param_prob() function already does a kfree_skb(), this patch removes the duplicate one. Fixes: 1ababeba4a21f3dba3da3523c670b207fb2feb62 ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)") Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/exthdrs.c | 1 - 1 file changed, 1 deletion(-) commit 92b4fc75636be07af00b1c085513ce98e6bab324 Merge: fe7ba289 be5c5e8 Author: Linus Torvalds Date: Fri Apr 21 09:34:45 2017 -0700 Merge tag 'powerpc-4.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Just two fixes. The first fixes kprobing a stdu, and is marked for stable as it's been broken for ~ever. In hindsight this could have gone in next. The other is a fix for a change we merged this cycle, where if we take a certain exception when the kernel is running relocated (currently only used for kdump), we checkstop the box. Thanks to Ravi Bangoria" * tag 'powerpc-4.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Fix HMI exception on LE with CONFIG_RELOCATABLE=y powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction commit fe7ba289332e10215b8ea423a240f5d030bb4fb3 Merge: a9aa190 b9c1153 Author: Linus Torvalds Date: Fri Apr 21 09:26:34 2017 -0700 Merge tag 'pci-v4.11-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Sorry this is so late. It's been in -next for over a week, but I forgot to send it on until now. A single fix to the DT binding of the HiSilicon PCIe host support" * tag 'pci-v4.11-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: hisi: Fix DT binding (hisi-pcie-almost-ecam) commit a9aa1908e224790e89f350cc26f21ae8d805869d Merge: 4664e32 3a07bb1 Author: Linus Torvalds Date: Fri Apr 21 09:20:35 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: "A couple of last minute fixes for regressions in this cycle. More specifically: - Two patches from Andy, adjusting the NVMe APST quirks to avoid some issues specific to one Toshiba drive, and some variant of Samsung on two specific Dell laptops. - A fix for mtip32xx, turning off mq scheduling on that device. We have a real fix for this, but it's too late in the cycle. Thankfully we already have a NO_SCHED flag we can apply here. A prep patch for this is ensuring that we honor the NO_SCHED flag when attempting to online switch schedulers, previsouly we only did so for drive load time. From Ming. - Fixing an oops in blk-mq polling with scheduling attached. This one is easily reproducible, it would be a shame to release 4.11 with that issue. From me. I'd prefer not having to send in patches at this point in time, but the above are all things that have regressed in this cycle and the fixes are relatively straight forward" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: fix potential oops with polling and blk-mq scheduler nvme: Quirk APST off on "THNSF5256GPUK TOSHIBA" nvme: Adjust the Samsung APST quirk mtip32xx: pass BLK_MQ_F_NO_SCHED block: respect BLK_MQ_F_NO_SCHED commit 4664e3221bbac68a3547b82c042cec336b43931d Merge: 11b211e fe8c470 Author: Linus Torvalds Date: Fri Apr 21 09:18:17 2017 -0700 Merge tag 'acpi-4.11-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI build fix from Rafael Wysocki: "This avoids a false-positive build warning from the compiler. Specifics: - Avoid a false-positive warning regarding a variable that may not be initialized that started to trigger after a previous general build fix (Arnd Bergmann)" * tag 'acpi-4.11-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / power: Avoid maybe-uninitialized warning commit 11b211ede81d7a077b7bc084ccfb4d6d715c5bf0 Merge: 4d4dfc1 9f32784 Author: Linus Torvalds Date: Fri Apr 21 09:15:43 2017 -0700 Merge tag 'mmc-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - kmalloc sdio scratch buffer to make it DMA-friendly MMC host: - dw_mmc: Fix behaviour for SDIO IRQs when runtime PM is used - sdhci-esdhc-imx: Correct pad I/O drive strength for UHS-DDR50 cards" * tag 'mmc-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card mmc: dw_mmc: Don't allow Runtime PM for SDIO cards mmc: sdio: fix alignment issue in struct sdio_func commit 4d4dfc1caaea95e18223f48f5c4d49f898502941 Merge: c154165e 704de48 Author: Linus Torvalds Date: Fri Apr 21 09:13:43 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixlet from Dmitry Torokhov: "An update to Elan PS/2 driver to allow working on yet another Lifebook" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled commit b0522e13b2e6266ac00dc579b79fbfee22753293 Author: David S. Miller Date: Fri Apr 21 10:44:47 2017 -0400 MAINTAINERS: Add "B:" field for networking. We want people to report bugs to the netdev list. Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3d5e80125a6e5649c6bdad8d5780e39ea422c67d Author: Vineet Gupta Date: Thu Apr 20 15:36:51 2017 -0700 ARCv2: entry: save Accumulator register pair (r58:59) if present Accumulator is present in configs with FPU and/or DSP MPY (mpy > 6) Instead of doing this in pt_regs (and thus every kernel entry/exit), this could have been done in context switch (and for user task only) as currently kernel doesn't clobber these registers for its own accord. However we will soon start using 64-bit multiply instructions for kernel which can clobber these. Also gcc folks also plan to start using these as GPRs, hence better to always save/restore them Signed-off-by: Vineet Gupta arch/arc/Kconfig | 8 ++++++++ arch/arc/include/asm/entry-arcv2.h | 10 ++++++++++ arch/arc/include/asm/ptrace.h | 4 ++++ arch/arc/kernel/setup.c | 30 +++++++++++++++++++++--------- 4 files changed, 43 insertions(+), 9 deletions(-) commit c154165e93b7f1ee9c63906fa200bc735098d47d Merge: 160062e fc280fe Author: Linus Torvalds Date: Thu Apr 20 15:31:08 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge two mm fixes from Andrew Morton. * emailed patches from Andrew Morton : mm: prevent NR_ISOLATE_* stats from going negative Revert "mm, page_alloc: only use per-cpu allocator for irq-safe requests" commit fc280fe871449ead4bdbd1665fa52c7c01c64765 Author: Rabin Vincent Date: Thu Apr 20 14:37:46 2017 -0700 mm: prevent NR_ISOLATE_* stats from going negative Commit 6afcf8ef0ca0 ("mm, compaction: fix NR_ISOLATED_* stats for pfn based migration") moved the dec_node_page_state() call (along with the page_is_file_cache() call) to after putback_lru_page(). But page_is_file_cache() can change after putback_lru_page() is called, so it should be called before putback_lru_page(), as it was before that patch, to prevent NR_ISOLATE_* stats from going negative. Without this fix, non-CONFIG_SMP kernels end up hanging in the while(too_many_isolated()) { congestion_wait() } loop in shrink_active_list() due to the negative stats. Mem-Info: active_anon:32567 inactive_anon:121 isolated_anon:1 active_file:6066 inactive_file:6639 isolated_file:4294967295 ^^^^^^^^^^ unevictable:0 dirty:115 writeback:0 unstable:0 slab_reclaimable:2086 slab_unreclaimable:3167 mapped:3398 shmem:18366 pagetables:1145 bounce:0 free:1798 free_pcp:13 free_cma:0 Fixes: 6afcf8ef0ca0 ("mm, compaction: fix NR_ISOLATED_* stats for pfn based migration") Link: http://lkml.kernel.org/r/1492683865-27549-1-git-send-email-rabin.vincent@axis.com Signed-off-by: Rabin Vincent Acked-by: Michal Hocko Cc: Ming Ling Cc: Minchan Kim Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d34b0733b452ca3ef1dee36436dab08b8aa6a85c Author: Mel Gorman Date: Thu Apr 20 14:37:43 2017 -0700 Revert "mm, page_alloc: only use per-cpu allocator for irq-safe requests" This reverts commit 374ad05ab64. While the patch worked great for userspace allocations, the fact that softirq loses the per-cpu allocator caused problems. It needs to be redone taking into account that a separate list is needed for hard/soft IRQs or alternatively find a cheap way of detecting reentry due to an interrupt. Both are possible but sufficiently tricky that it shouldn't be rushed. Jesper had one method for allowing softirqs but reported that the cost was high enough that it performed similarly to a plain revert. His figures for netperf TCP_STREAM were as follows Baseline v4.10.0 : 60316 Mbit/s Current 4.11.0-rc6: 47491 Mbit/s Jesper's patch : 60662 Mbit/s This patch : 60106 Mbit/s As this is a regression, I wish to revert to noirq allocator for now and go back to the drawing board. Link: http://lkml.kernel.org/r/20170415145350.ixy7vtrzdzve57mh@techsingularity.net Signed-off-by: Mel Gorman Reported-by: Tariq Toukan Acked-by: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 3a07bb1d7676ea24bc1585ba2a80604852c005e7 Author: Jens Axboe Date: Thu Apr 20 14:53:28 2017 -0600 blk-mq: fix potential oops with polling and blk-mq scheduler If we have a scheduler attached, blk_mq_tag_to_rq() on the scheduled tags will return NULL if a request is no longer in flight. This is different than using the normal tags, where it will always return the fixed request. Check for this condition for polling, in case we happen to enter polling for a completed request. The request address remains valid, so this check and return should be perfectly safe. Fixes: bd166ef183c2 ("blk-mq-sched: add framework for MQ capable IO schedulers") Tested-by: Stephen Bates Signed-off-by: Jens Axboe block/blk-mq.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit be56945c4edd5a3da15f8254b68d1ddb1588d0c4 Author: Andy Lutomirski Date: Thu Apr 20 13:37:56 2017 -0700 nvme: Quirk APST off on "THNSF5256GPUK TOSHIBA" There's a report that it malfunctions with APST on. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1678184 Cc: Kai-Heng Feng Signed-off-by: Andy Lutomirski Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ff5350a86b20de23991e474e006e2ff2732b218e Author: Andy Lutomirski Date: Thu Apr 20 13:37:55 2017 -0700 nvme: Adjust the Samsung APST quirk I got a couple more reports: the Samsung APST issues appears to affect multiple 950-series devices in Dell XPS 15 9550 and Precision 5510 laptops. Change the quirk: rather than blacklisting the firmware on the first problematic SSD that was reported, disable APST on all 144d:a802 devices if they're installed in the two affected Dell models. While we're at it, disable only the deepest sleep state instead of all of them -- the reporters say that this is sufficient to fix the problem. (I have a device that appears to be entirely identical to one of the affected devices, but I have a different Dell laptop, so it's not the case that all Samsung devices with firmware BXW75D0Q are broken under all circumstances.) Samsung engineers have an affected system, and hopefully they'll give us a better workaround some time soon. In the mean time, this should minimize regressions. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1678184 Cc: Kai-Heng Feng Signed-off-by: Andy Lutomirski Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 18 ++++++++---------- drivers/nvme/host/nvme.h | 5 +++++ drivers/nvme/host/pci.c | 26 +++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 11 deletions(-) commit e0535ce58b92d7baf0b33284a6c4f8f0338f943e Author: Wolfgang Bumiller Date: Thu Apr 20 14:08:26 2017 +0200 net sched actions: allocate act cookie early Policing filters do not use the TCA_ACT_* enum and the tb[] nlattr array in tcf_action_init_1() doesn't get filled for them so we should not try to look for a TCA_ACT_COOKIE attribute in the then uninitialized array. The error handling in cookie allocation then calls tcf_hash_release() leading to invalid memory access later on. Additionally, if cookie allocation fails after an already existing non-policing filter has successfully been changed, tcf_action_release() should not be called, also we would have to roll back the changes in the error handling, so instead we now allocate the cookie early and assign it on success at the end. CVE-2017-7979 Fixes: 1045ba77a596 ("net sched actions: Add support for user cookies") Signed-off-by: Wolfgang Bumiller Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 55 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit 43af390573ad5539b6087831a1197747a0e672ad Merge: e9156cd c0c5dbe Author: David S. Miller Date: Thu Apr 20 16:29:41 2017 -0400 Merge branch 'qed-dcbx-fixes' Sudarsana Reddy Kalluru says: ==================== qed: Dcbx bug fixes The series has set of bug fixes for dcbx implementation of qed driver. Please consider applying this to 'net' branch. ==================== Signed-off-by: David S. Miller commit c0c5dbe711c7d642415359ef5d216896a15a434b Author: sudarsana.kalluru@cavium.com Date: Wed Apr 19 03:19:55 2017 -0700 qed: Fix issue in populating the PFC config paramters. Change ieee_setpfc() callback implementation to populate traffic class count with the user provided value. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 ++ 1 file changed, 2 insertions(+) commit 62289ba27558553871fd047baadaaeda886c6a63 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 19 03:19:54 2017 -0700 qed: Fix possible system hang in the dcbnl-getdcbx() path. qed_dcbnl_get_dcbx() API uses kmalloc in GFT_KERNEL mode. The API gets invoked in the interrupt context by qed_dcbnl_getdcbx callback. Need to invoke this kmalloc in atomic mode. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cf75f1cebb048cfc1424b4b8ac9bbc08d5f9f66 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 19 03:19:53 2017 -0700 qed: Fix sending an invalid PFC error mask to MFW. PFC error-mask value is not supported by MFW, but this bit could be set in the pfc bit-map of the operational parameters if remote device supports it. These operational parameters are used as basis for populating the dcbx config parameters. User provided configs will be applied on top of these parameters and then send them to MFW when requested. Driver need to clear the error-mask bit before sending the config parameters to MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 ++ 1 file changed, 2 insertions(+) commit 66367dab30c7040e638e5496a47184cfc8ba39a4 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 19 03:19:52 2017 -0700 qed: Fix possible error in populating max_tc field. Some adapters may not publish the max_tc value. Populate the default value for max_tc field in case the mfw didn't provide one. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e9156cd26a495a18706e796f02a81fee41ec14f4 Author: James Hughes Date: Wed Apr 19 11:13:40 2017 +0100 smsc95xx: Use skb_cow_head to deal with cloned skbs The driver was failing to check that the SKB wasn't cloned before adding checksum data. Replace existing handling to extend/copy the header buffer with skb_cow_head. Signed-off-by: James Hughes Acked-by: Eric Dumazet Acked-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 74d209b8350a19d4f70252aa7a4e3d0b865676dd Author: Sekhar Nori Date: Wed Apr 19 14:08:24 2017 +0530 MAINTAINERS: update entry for TI's CPSW driver Mugunthan V N, who was reviewing TI's CPSW driver patches is not working for TI anymore and wont be reviewing patches for that driver. Drop Mugunthan as the maintiainer for this driver. Grygorii continues to be a reviewer. Dave Miller applies the patches directly and adding a maintainer is actually misleading since get_maintainer.pl script stops suggesting that Dave Miller be copied. Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 12a0a6c05471176a453e324d0d5e51c6f381ad63 Merge: 9d386cd 096f41d Author: David S. Miller Date: Thu Apr 20 16:19:46 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-04-19 Two fixes for af_key: 1) Add a lock to key dump to prevent a NULL pointer dereference. From Yuejie Shi. 2) Fix slab-out-of-bounds in parse_ipsecrequests. From Herbert Xu. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 9d386cd9a755c8293e8916264d4d053878a7c9c7 Author: Dan Carpenter Date: Tue Apr 18 22:14:26 2017 +0300 dp83640: don't recieve time stamps twice This patch is prompted by a static checker warning about a potential use after free. The concern is that netif_rx_ni() can free "skb" and we call it twice. When I look at the commit that added this, it looks like some stray lines were added accidentally. It doesn't make sense to me that we would recieve the same data two times. I asked the author but never recieved a response. I can't test this code, but I'm pretty sure my patch is correct. Fixes: 4b063258ab93 ("dp83640: Delay scheduled work.") Signed-off-by: Dan Carpenter Acked-by: Stefan Sørensen Signed-off-by: David S. Miller drivers/net/phy/dp83640.c | 2 -- 1 file changed, 2 deletions(-) commit 2f3bb64247b5b083d05ccecad9c2e139bbfdc294 Author: David Lebrun Date: Tue Apr 18 17:59:49 2017 +0200 ipv6: sr: fix out-of-bounds access in SRH validation This patch fixes an out-of-bounds access in seg6_validate_srh() when the trailing data is less than sizeof(struct sr6_tlv). Reported-by: Andrey Konovalov Cc: Andrey Konovalov Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6.c | 3 +++ 1 file changed, 3 insertions(+) commit c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8 Author: Mike Maloney Date: Tue Apr 18 11:14:16 2017 -0400 selftests/net: Fixes psock_fanout CBPF test case 'psock_fanout' has been failing since commit 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests"). That commit changed the CBPF filter to examine the full ethernet frame, and was tested on 'psock_tpacket' which uses SOCK_RAW. But 'psock_fanout' was also using this same CBPF in two places, for filtering and fanout, on a SOCK_DGRAM socket. Change 'psock_fanout' to use SOCK_RAW so that the CBPF program used with SO_ATTACH_FILTER can examine the entire frame. Create a new CBPF program for use with PACKET_FANOUT_DATA which ignores the header, as it cannot see the ethernet header. Tested: Ran tools/testing/selftests/net/psock_{fanout,tpacket} 10 times, and they all passed. Fixes: 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests") Signed-off-by: 'Mike Maloney ' Signed-off-by: David S. Miller tools/testing/selftests/net/psock_fanout.c | 22 ++++++++++++++++++++-- tools/testing/selftests/net/psock_lib.h | 13 +++---------- 2 files changed, 23 insertions(+), 12 deletions(-) commit 3018e947d7fd536d57e2b550c33e456d921fff8c Author: Johannes Berg Date: Thu Apr 20 21:32:16 2017 +0200 mac80211: reject ToDS broadcast data frames AP/AP_VLAN modes don't accept any real 802.11 multicast data frames, but since they do need to accept broadcast management frames the same is currently permitted for data frames. This opens a security problem because such frames would be decrypted with the GTK, and could even contain unicast L3 frames. Since the spec says that ToDS frames must always have the BSSID as the RA (addr1), reject any other data frames. The problem was originally reported in "Predicting, Decrypting, and Abusing WPA2/802.11 Group Keys" at usenix https://www.usenix.org/conference/usenixsecurity16/technical-sessions/presentation/vanhoef and brought to my attention by Jouni. Cc: stable@vger.kernel.org Reported-by: Jouni Malinen Signed-off-by: Johannes Berg -- Dave, I didn't want to send you a new pull request for a single commit yet again - can you apply this one patch as is? Signed-off-by: David S. Miller net/mac80211/rx.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 160062e19001b224370cddeaf652f258fd916fb0 Merge: 7f42589 78f7a45 Author: Linus Torvalds Date: Thu Apr 20 12:30:10 2017 -0700 Merge tag 'trace-v4.11-rc5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull two more ftrace fixes from Steven Rostedt: "While continuing my development, I uncovered two more small bugs. One is a race condition when enabling the snapshot function probe trigger. It enables the probe before allocating the snapshot, and if the probe triggers first, it stops tracing with a warning that the snapshot buffer was not allocated. The seconds is that the snapshot file should show how to use it when it is empty. But a bug fix from long ago broke the "is empty" test and the snapshot file no longer displays the help message" * tag 'trace-v4.11-rc5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ring-buffer: Have ring_buffer_iter_empty() return true when empty tracing: Allocate the snapshot buffer before enabling probe commit 7f425895926af100cfdaebd504703325e5c08d3c Merge: db5dc49 6f107fa Author: Linus Torvalds Date: Thu Apr 20 12:26:10 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: "Two last-minute regression fixes for Wacom driver from Jason Gerecke" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: Override incorrect logical maximum contact identifier HID: wacom: Treat HID_DG_TOOLSERIALNUMBER as unsigned commit db5dc4996414d61162c9c83bf73e0e2bf2636911 Merge: f205b5d a8f60d1 Author: Linus Torvalds Date: Thu Apr 20 12:20:30 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Martin Schwidefsky: "There is one more fix I would like to see in 4.11: The combination of KVM, CMMA and heavy paging can cause data corruption, the fix is to clear the _PAGE_UNUSED bit in set_pte_at()" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: fix CMMA vs KSM vs others commit f205b5dc1c9e62237ac6e21642724d8cbc85f7ee Merge: f61143c c9f838d Author: Linus Torvalds Date: Thu Apr 20 11:12:51 2017 -0700 Merge tag 'keys-fixes-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull keyrings fixes from David Howells: (1) Disallow keyrings whose name begins with a '.' to be joined [CVE-2016-9604]. (2) Change the name of the dead type to ".dead" to prevent user access [CVE-2017-6951]. (3) Fix keyctl_set_reqkey_keyring() to not leak thread keyrings [CVE-2017-7472] * tag 'keys-fixes-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings KEYS: Change the name of the dead type to ".dead" to prevent user access KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings commit 6324805979719c7183063520c4ab9c178dc2f60c Merge: 1debdc8 9e47806 Author: David S. Miller Date: Thu Apr 20 13:36:42 2017 -0400 Merge tag 'mac80211-for-davem-2017-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A single fix, for the MU-MIMO monitor mode, that fixes bad SKB accesses if the SKB was paged, which is the case for the only driver supporting this - iwlwifi. ==================== Signed-off-by: David S. Miller commit b72f8051f34b8164a62391e3676edc34523c5952 Author: Keith Busch Date: Wed Apr 19 19:51:10 2017 -0400 genirq/affinity: Fix calculating vectors to assign The vectors_per_node is calculated from the remaining available vectors. The current vector starts after pre_vectors, so we need to subtract that from the current to properly account for the number of remaining vectors to assign. Fixes: 3412386b531 ("irq/affinity: Fix extra vecs calculation") Reported-by: Andrei Vagin Signed-off-by: Keith Busch Link: http://lkml.kernel.org/r/1492645870-13019-1-git-send-email-keith.busch@intel.com Signed-off-by: Thomas Gleixner kernel/irq/affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f327845358d3dd0d8a5a7a5436b0aa5c432e757 Author: Haibo Chen Date: Wed Apr 19 10:53:51 2017 +0800 mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card Currently for DDR50 card, it need tuning in default. We meet tuning fail issue for DDR50 card and some data CRC error when DDR50 sd card works. This is because the default pad I/O drive strength can't make sure DDR50 card work stable. So increase the pad I/O drive strength for DDR50 card, and use pins_100mhz. This fixes DDR50 card support for IMX since DDR50 tuning was enabled from commit 9faac7b95ea4 ("mmc: sdhci: enable tuning for DDR50") Tested-and-reported-by: Tim Harvey Signed-off-by: Haibo Chen Cc: stable@vger.kernel.org # v4.4+ Acked-by: Dong Aisheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 1 + 1 file changed, 1 insertion(+) commit 6f107fab8f18228936cd3df88a3bb6050865c2c8 Author: Jason Gerecke Date: Wed Apr 19 14:47:24 2017 -0700 HID: wacom: Override incorrect logical maximum contact identifier It apears that devices designed around Wacom's G11 chipset (e.g. Lenovo ThinkPad Yoga 260, Lenovo ThinkPad X1 Yoga, Dell XPS 12 9250, Dell Venue 8 Pro 5855, etc.) suffer from a common issue in their HID descriptors. The logical maximum is not updated for the "Contact Identifier" usage, leaving it as just "1" despite these devices being capable of tracking far more touches. Commit 60a221869803 began ignoring usages with out-of-range values, causing problems for devices based on this chipset. Touches after the first will have an out-of-range Contact Identifier, and ignoring that usage will cause the kernel to incorrectly slot each finger's events (along with all the knock-on userspace effects that entails). This commit checks for these buggy descriptors and updates the maximum where required. Prior chipsets have used "255" as the maximum (and the G11, at least, doesn't seem to actually use IDs outside the range of 1..CONTACTMAX) so continue using this value. Cc: stable@vger.kernel.org Fixes: 60a221869803 ("HID: wacom: generic: add support for touchring") Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 78f7a45dac2a2d2002f98a3a95f7979867868d73 Author: Steven Rostedt (VMware) Date: Wed Apr 19 14:29:46 2017 -0400 ring-buffer: Have ring_buffer_iter_empty() return true when empty I noticed that reading the snapshot file when it is empty no longer gives a status. It suppose to show the status of the snapshot buffer as well as how to allocate and use it. For example: ># cat snapshot # tracer: nop # # # * Snapshot is allocated * # # Snapshot commands: # echo 0 > snapshot : Clears and frees snapshot buffer # echo 1 > snapshot : Allocates snapshot buffer, if not already allocated. # Takes a snapshot of the main buffer. # echo 2 > snapshot : Clears snapshot buffer (but does not allocate or free) # (Doesn't have to be '2' works with any number that # is not a '0' or '1') But instead it just showed an empty buffer: ># cat snapshot # tracer: nop # # entries-in-buffer/entries-written: 0/0 #P:4 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | What happened was that it was using the ring_buffer_iter_empty() function to see if it was empty, and if it was, it showed the status. But that function was returning false when it was empty. The reason was that the iter header page was on the reader page, and the reader page was empty, but so was the buffer itself. The check only tested to see if the iter was on the commit page, but the commit page was no longer pointing to the reader page, but as all pages were empty, the buffer is also. Cc: stable@vger.kernel.org Fixes: 651e22f2701b ("ring-buffer: Always reset iterator to reader page") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f61143c45077df4fa78e2f1ba455a00bbe1d5b8c Merge: 4988f7a e759030 Author: Linus Torvalds Date: Wed Apr 19 17:16:18 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" - one stm32f4 fix for a change that introduced the PLL_I2S and PLL_SAI boards - two Allwinner clk driver build fixes - two Allwinner CPU clk driver fixes where we see random CPUFreq crashes because the CPU's PLL locks up sometimes when we change the rate * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER clk: stm32f4: fix: exclude values 0 and 1 for PLLQ commit 4988f7a40f45929588d4b8f09c71eb785f55a19c Merge: 073c516 62a6cfd Author: Linus Torvalds Date: Wed Apr 19 17:12:46 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull CIFS fix from Steve French: "One more cifs fix for stable" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: cifs: Do not send echoes before Negotiate is complete commit 073c516ff73557a8f7315066856c04b50383ac34 Author: Cong Wang Date: Wed Apr 19 15:11:00 2017 -0700 nsfs: mark dentry with DCACHE_RCUACCESS Andrey reported a use-after-free in __ns_get_path(): spin_lock include/linux/spinlock.h:299 [inline] lockref_get_not_dead+0x19/0x80 lib/lockref.c:179 __ns_get_path+0x197/0x860 fs/nsfs.c:66 open_related_ns+0xda/0x200 fs/nsfs.c:143 sock_ioctl+0x39d/0x440 net/socket.c:1001 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1bf/0x1780 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 We are under rcu read lock protection at that point: rcu_read_lock(); d = atomic_long_read(&ns->stashed); if (!d) goto slow; dentry = (struct dentry *)d; if (!lockref_get_not_dead(&dentry->d_lockref)) goto slow; rcu_read_unlock(); but don't use a proper RCU API on the free path, therefore a parallel __d_free() could free it at the same time. We need to mark the stashed dentry with DCACHE_RCUACCESS so that __d_free() will be called after all readers leave RCU. Fixes: e149ed2b805f ("take the targets of /proc/*/ns/* symlinks to separate fs") Cc: Alexander Viro Cc: Andrew Morton Reported-by: Andrey Konovalov Signed-off-by: Cong Wang Signed-off-by: Linus Torvalds fs/nsfs.c | 1 + 1 file changed, 1 insertion(+) commit 80d136e138f59de35aafb0440e8ab2f51c40ccd5 Author: Michal Hocko Date: Wed Apr 19 09:52:46 2017 +0200 mm: make mm_percpu_wq non freezable Geert has reported a freeze during PM resume and some additional debugging has shown that the device_resume worker cannot make a forward progress because it waits for an event which is stuck waiting in drain_all_pages: INFO: task kworker/u4:0:5 blocked for more than 120 seconds. Not tainted 4.11.0-rc7-koelsch-00029-g005882e53d62f25d-dirty #3476 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u4:0 D 0 5 2 0x00000000 Workqueue: events_unbound async_run_entry_fn __schedule schedule schedule_timeout wait_for_common dpm_wait_for_superior device_resume async_resume async_run_entry_fn process_one_work worker_thread kthread [...] bash D 0 1703 1694 0x00000000 __schedule schedule schedule_timeout wait_for_common flush_work drain_all_pages start_isolate_page_range alloc_contig_range cma_alloc __alloc_from_contiguous cma_allocator_alloc __dma_alloc arm_dma_alloc sh_eth_ring_init sh_eth_open sh_eth_resume dpm_run_callback device_resume dpm_resume dpm_resume_end suspend_devices_and_enter pm_suspend state_store kernfs_fop_write __vfs_write vfs_write SyS_write [...] Showing busy workqueues and worker pools: [...] workqueue mm_percpu_wq: flags=0xc pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=0/0 delayed: drain_local_pages_wq, vmstat_update pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=0/0 delayed: drain_local_pages_wq BAR(1703), vmstat_update Tetsuo has properly noted that mm_percpu_wq is created as WQ_FREEZABLE so it is frozen this early during resume so we are effectively deadlocked. Fix this by dropping WQ_FREEZABLE when creating mm_percpu_wq. We really want to have it operational all the time. Fixes: ce612879ddc7 ("mm: move pcp and lru-pcp draining into single wq") Reported-and-tested-by: Geert Uytterhoeven Debugged-by: Tetsuo Handa Signed-off-by: Michal Hocko Signed-off-by: Linus Torvalds mm/vmstat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c4bac97b0d3405f760c30636ff0b2e32810507d3 Merge: 005882e 892c778 Author: Linus Torvalds Date: Wed Apr 19 14:45:51 2017 -0700 Merge tag 'backlight-for-v4.11' of git://git.linaro.org/people/daniel.thompson/linux Pull backlight fix from Daniel Thompson: "Normally pull requests for backlight come from Lee Jones (and will continue to do so) but the bug fixed here is annoying for few people so I'm providing a little holiday cover. Fix a single bug in the PWM backlight driver and make it play nice with a wider range of GPIO devices. This bug is a regression and was independently discovered by Geert Uytterhoevan and Paul Kocialkowski (and is tested by both)" * tag 'backlight-for-v4.11' of git://git.linaro.org/people/daniel.thompson/linux: backlight: pwm_bl: Fix GPIO out for unimplemented .get_direction() commit fe8c470ab87d90e4b5115902dd94eced7e3305c3 Author: Arnd Bergmann Date: Wed Apr 19 19:47:04 2017 +0200 ACPI / power: Avoid maybe-uninitialized warning gcc -O2 cannot always prove that the loop in acpi_power_get_inferred_state() is enterered at least once, so it assumes that cur_state might not get initialized: drivers/acpi/power.c: In function 'acpi_power_get_inferred_state': drivers/acpi/power.c:222:9: error: 'cur_state' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the variable to zero at the start of the loop, to ensure that there is well-defined behavior even for an empty list. This gets rid of the warning. The warning first showed up when the -Os flag got removed in a bug fix patch in linux-4.11-rc5. I would suggest merging this addon patch on top of that bug fix to avoid introducing a new warning in the stable kernels. Fixes: 61b79e16c68d (ACPI: Fix incompatibility with mcount-based function graph tracing) Cc: All applicable Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki drivers/acpi/power.c | 1 + 1 file changed, 1 insertion(+) commit 4981d04dd8f1ab19e2cce008da556d7f099b6e68 Author: Ming Lei Date: Sat Apr 15 20:38:23 2017 +0800 mtip32xx: pass BLK_MQ_F_NO_SCHED The recent introduced MQ IO scheduler breaks mtip32xx in the following way. mtip32xx use the 'request_index' passed to .init_request() as hardware tag index for initializing hardware queue, and it actually require that rq->tag is always same with 'request_index' passed to .init_request(). Current blk-mq IO scheduler can't guarantee this point, so this patch passes BLK_MQ_F_NO_SCHED and at least make mtip32xx working. This patch fixes the following strange hardware failure. The issue can be triggered easily when doing I/O with mq-deadline enabled. [ 186.972578] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993 [ 186.972578] {1}[Hardware Error]: event severity: fatal [ 186.972579] {1}[Hardware Error]: Error 0, type: fatal [ 186.972580] {1}[Hardware Error]: section_type: PCIe error [ 186.972580] {1}[Hardware Error]: port_type: 0, PCIe end point [ 186.972581] {1}[Hardware Error]: version: 1.0 [ 186.972581] {1}[Hardware Error]: command: 0x0407, status: 0x0010 [ 186.972582] {1}[Hardware Error]: device_id: 0000:07:00.0 [ 186.972582] {1}[Hardware Error]: slot: 4 [ 186.972583] {1}[Hardware Error]: secondary_bus: 0x00 [ 186.972583] {1}[Hardware Error]: vendor_id: 0x1344, device_id: 0x5150 [ 186.972584] {1}[Hardware Error]: class_code: 008001 [ 186.972585] Kernel panic - not syncing: Fatal hardware error! Reported-by: Jozef Mikovic Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a5088c8c11ac9d56f7e90acaaae9e0e98c1ff94 Author: Ming Lei Date: Sat Apr 15 20:38:22 2017 +0800 block: respect BLK_MQ_F_NO_SCHED If one driver claims that it doesn't support io scheduler via BLK_MQ_F_NO_SCHED, we should not allow to change and show the availabe io schedulers. This patch adds check to enhance this behaviour. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/elevator.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 892c7788c72480e8282b8aafe0783a244cc9f47f Author: Geert Uytterhoeven Date: Tue Apr 4 12:54:35 2017 +0200 backlight: pwm_bl: Fix GPIO out for unimplemented .get_direction() Commit 7613c922315e308a ("backlight: pwm_bl: Move the checks for initial power state to a separate function") not just moved some code, but made slight changes in semantics. If a gpiochip doesn't implement the optional .get_direction() callback, gpiod_get_direction always returns -EINVAL, which is never equal to GPIOF_DIR_IN, leading to the GPIO not being configured for output. To avoid this, invert the test and check for not GPIOF_DIR_OUT instead, like the original code did. This restores the display on r8a7740/armadillo. Fixes: 7613c922315e308a ("backlight: pwm_bl: Move the checks for initial power state to a separate function") Signed-off-by: Geert Uytterhoeven Reviewed-by: Peter Ujfalusi Acked-by: Philipp Zabel Acked-by: Daniel Thompson Signed-off-by: Daniel Thompson drivers/video/backlight/pwm_bl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit df62db5be2e5f070ecd1a5ece5945b590ee112e0 Author: Steven Rostedt (VMware) Date: Wed Apr 19 12:07:08 2017 -0400 tracing: Allocate the snapshot buffer before enabling probe Currently the snapshot trigger enables the probe and then allocates the snapshot. If the probe triggers before the allocation, it could cause the snapshot to fail and turn tracing off. It's best to allocate the snapshot buffer first, and then enable the trigger. If something goes wrong in the enabling of the trigger, the snapshot buffer is still allocated, but it can also be freed by the user by writting zero into the snapshot buffer file. Also add a check of the return status of alloc_snapshot(). Cc: stable@vger.kernel.org Fixes: 77fd5c15e3 ("tracing: Add snapshot trigger to function probes") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 286f3f478796fb4f9e003e9f7d649f3c33f08d2f Author: Jason Gerecke Date: Thu Apr 13 08:39:49 2017 -0700 HID: wacom: Treat HID_DG_TOOLSERIALNUMBER as unsigned Because HID_DG_TOOLSERIALNUMBER doesn't first cast the value recieved from HID to an unsigned type, sign-extension rules can cause the value of wacom_wac->serial[0] to inadvertently wind up with all 32 of its highest bits set if the highest bit of "value" was set. This can cause problems for Tablet PC devices which use AES sensors and the xf86-input-wacom userspace driver. It is not uncommon for AES sensors to send a serial number of '0' while the pen is entering or leaving proximity. The xf86-input-wacom driver ignores events with a serial number of '0' since it cannot match them up to an in-use tool. To ensure the xf86-input-wacom driver does not ignore the final out-of-proximity event, the kernel does not send MSC_SERIAL events when the value of wacom_wac->serial[0] is '0'. If the highest bit of HID_DG_TOOLSERIALNUMBER is set by an in-prox pen which later leaves proximity and sends a '0' for HID_DG_TOOLSERIALNUMBER, then only the lowest 32 bits of wacom_wac->serial[0] are actually cleared, causing the kernel to send an MSC_SERIAL event. Since the 'input_event' function takes an 'int' as argument, only those lowest (now-cleared) 32 bits of wacom_wac->serial[0] are sent to userspace, causing xf86-input-wacom to ignore the event. If the event was the final out-of-prox event, then xf86-input-wacom may remain in a state where it believes the pen is in proximity and refuses to allow other devices under its control (e.g. the touchscreen) to move the cursor. It should be noted that EMR devices and devices which use both the HID_DG_TOOLSERIALNUMBER and WACOM_HID_WD_SERIALHI usages (in that order) would be immune to this issue. It appears only AES devices are affected. Fixes: f85c9dc678a ("HID: wacom: generic: Support tool ID and additional tool types") Cc: stable@vger.kernel.org Signed-off-by: Jason Gerecke Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 338bd52f3c3a86a1feea8c9a121d1cee60d68d69 Author: David Sterba Date: Tue Apr 18 17:00:12 2017 +0200 btrfs: qgroup: move noisy underflow warning to debugging build The WARN_ON and warning from report_reserved_underflow can become very noisy and is visible unconditionally although this is namely for debugging. The patch "btrfs: Add WARN_ON for qgroup reserved underflow" (18dc22c19bef520cca11ce4c0807ac9dec48d31f) went to 4.11-rc1 and the plan was to get the fix as well, but this hasn't happened. CC: Qu Wenruo Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a5859c6d7b6114fc0e52be40f7b0f5451c4aba93 Author: Josh Poimboeuf Date: Tue Apr 18 16:44:29 2017 -0500 x86/build: convert function graph '-Os' error to warning For pre-4.6.0 versions of GCC, which don't have '-mfentry', the '-maccumulate-outgoing-args' option is required for function graph tracing in order to avoid GCC bug 42109. However, GCC ignores '-maccumulate-outgoing-args' when '-Os' is also set. Currently we force a build error to prevent that scenario, but that breaks randconfigs. So change the error to a warning which also disables CONFIG_CC_OPTIMIZE_FOR_SIZE. Reported-by: Andi Kleen Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: kbuild test robot Cc: kbuild-all@01.org Link: http://lkml.kernel.org/r/20170418214429.o7fbwbmf4nqosezy@treble Signed-off-by: Ingo Molnar arch/x86/Makefile | 8 ++++++++ arch/x86/kernel/ftrace.c | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 1debdc8f9ebd07daf140e417b3841596911e0066 Author: Sergei Shtylyov Date: Mon Apr 17 15:55:22 2017 +0300 sh_eth: unmap DMA buffers when freeing rings The DMA API debugging (when enabled) causes: WARNING: CPU: 0 PID: 1445 at lib/dma-debug.c:519 add_dma_entry+0xe0/0x12c DMA-API: exceeded 7 overlapping mappings of cacheline 0x01b2974d to be printed after repeated initialization of the Ether device, e.g. suspend/resume or 'ifconfig' up/down. This is because DMA buffers mapped using dma_map_single() in sh_eth_ring_format() and sh_eth_start_xmit() are never unmapped. Resolve this problem by unmapping the buffers when freeing the descriptor rings; in order to do it right, we'd have to add an extra parameter to sh_eth_txfree() (we rename this function to sh_eth_tx_free(), while at it). Based on the commit a47b70ea86bd ("ravb: unmap descriptors when freeing rings"). Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 122 +++++++++++++++++++--------------- 1 file changed, 67 insertions(+), 55 deletions(-) commit 32fe905c17f001c0eee13c59afddd0bf2eed509c Author: Richard Weinberger Date: Thu Mar 30 10:50:49 2017 +0200 ubifs: Fix O_TMPFILE corner case in ubifs_link() It is perfectly fine to link a tmpfile back using linkat(). Since tmpfiles are created with a link count of 0 they appear on the orphan list, upon re-linking the inode has to be removed from the orphan list again. Ralph faced a filesystem corruption in combination with overlayfs due to this bug. Cc: Cc: Ralph Sennhauser Cc: Amir Goldstein Reported-by: Ralph Sennhauser Tested-by: Ralph Sennhauser Reported-by: Amir Goldstein Fixes: 474b93704f321 ("ubifs: Implement O_TMPFILE") Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 005882e53d62f25dae10351a8d3f13326051e8f5 Merge: 40d9018 544f8f9 Author: Linus Torvalds Date: Tue Apr 18 13:56:51 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Two Sparc bug fixes from Daniel Jordan and Nitin Gupta" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix hugepage page table free sparc64: Use LOCKDEP_SMALL, not PROVE_LOCKING_SMALL commit 40d9018eb738f724dc9c27eec88c78cc488e0af0 Merge: fb5e215 acf167f Author: Linus Torvalds Date: Tue Apr 18 13:24:42 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) BPF tail call handling bug fixes from Daniel Borkmann. 2) Fix allowance of too many rx queues in sfc driver, from Bert Kenward. 3) Non-loopback ipv6 packets claiming src of ::1 should be dropped, from Florian Westphal. 4) Statistics requests on KSZ9031 can crash, fix from Grygorii Strashko. 5) TX ring handling fixes in mediatek driver, from Sean Wang. 6) ip_ra_control can deadlock, fix lock acquisition ordering to fix, from Cong WANG. 7) Fix use after free in ip_recv_error(), from Willem de Buijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: bpf: fix checking xdp_adjust_head on tail calls bpf: fix cb access in socket filter programs on tail calls ipv6: drop non loopback packets claiming to originate from ::1 net: ethernet: mediatek: fix inconsistency of port number carried in TXD net: ethernet: mediatek: fix inconsistency between TXD and the used buffer net: phy: micrel: fix crash when statistic requested for KSZ9031 phy net: vrf: Fix setting NLM_F_EXCL flag when adding l3mdev rule net: thunderx: Fix set_max_bgx_per_node for 81xx rgx net-timestamp: avoid use-after-free in ip_recv_error ipv4: fix a deadlock in ip_ra_control sfc: limit the number of receive queues commit 0dc9c639e6553e39c13b2c0d54c8a1b098cb95e2 Author: Vishal Verma Date: Tue Apr 18 20:42:35 2017 +0200 x86/mce: Make the MCE notifier a blocking one The NFIT MCE handler callback (for handling media errors on NVDIMMs) takes a mutex to add the location of a memory error to a list. But since the notifier call chain for machine checks (x86_mce_decoder_chain) is atomic, we get a lockdep splat like: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620 in_atomic(): 1, irqs_disabled(): 0, pid: 4, name: kworker/0:0 [..] Call Trace: dump_stack ___might_sleep __might_sleep mutex_lock_nested ? __lock_acquire nfit_handle_mce notifier_call_chain atomic_notifier_call_chain ? atomic_notifier_call_chain mce_gen_pool_process Convert the notifier to a blocking one which gets to run only in process context. Boris: remove the notifier call in atomic context in print_mce(). For now, let's print the MCE on the atomic path so that we can make sure they go out and get logged at least. Fixes: 6839a6d96f4e ("nfit: do an ARS scrub on hitting a latent media error") Reported-by: Ross Zwisler Signed-off-by: Vishal Verma Acked-by: Tony Luck Cc: Dan Williams Cc: linux-edac Cc: x86-ml Cc: Link: http://lkml.kernel.org/r/20170411224457.24777-1-vishal.l.verma@intel.com Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce-genpool.c | 2 +- arch/x86/kernel/cpu/mcheck/mce-internal.h | 2 +- arch/x86/kernel/cpu/mcheck/mce.c | 17 +++-------------- 3 files changed, 5 insertions(+), 16 deletions(-) commit 544f8f935863c5a9ca3e34306ea3316095e7b7bf Author: Nitin Gupta Date: Mon Apr 17 15:46:41 2017 -0700 sparc64: Fix hugepage page table free Make sure the start adderess is aligned to PMD_SIZE boundary when freeing page table backing a hugepage region. The issue was causing segfaults when a region backed by 64K pages was unmapped since such a region is in general not PMD_SIZE aligned. Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/hugetlbpage.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 395102db441abb8fd18fec5dd81428b5120232af Author: Daniel Jordan Date: Mon Apr 10 11:50:52 2017 -0400 sparc64: Use LOCKDEP_SMALL, not PROVE_LOCKING_SMALL CONFIG_PROVE_LOCKING_SMALL shrinks the memory usage of lockdep so the kernel text, data, and bss fit in the required 32MB limit, but this option is not set for every config that enables lockdep. A 4.10 kernel fails to boot with the console output Kernel: Using 8 locked TLB entries for main kernel image. hypervisor_tlb_lock[2000000:0:8000000071c007c3:1]: errors with f Program terminated with these config options CONFIG_LOCKDEP=y CONFIG_LOCK_STAT=y CONFIG_PROVE_LOCKING=n To fix, rename CONFIG_PROVE_LOCKING_SMALL to CONFIG_LOCKDEP_SMALL, and enable this option with CONFIG_LOCKDEP=y so we get the reduced memory usage every time lockdep is turned on. Tested that CONFIG_LOCKDEP_SMALL is set to 'y' if and only if CONFIG_LOCKDEP is set to 'y'. When other lockdep-related config options that select CONFIG_LOCKDEP are enabled (e.g. CONFIG_LOCK_STAT or CONFIG_PROVE_LOCKING), verified that CONFIG_LOCKDEP_SMALL is also enabled. Fixes: e6b5f1be7afe ("config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc") Signed-off-by: Daniel Jordan Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/Kconfig | 2 +- kernel/locking/lockdep_internals.h | 6 +++--- lib/Kconfig.debug | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit a6db2c86033bc41329770e90c20d4f1fec3824e4 Author: Douglas Anderson Date: Tue Apr 11 15:55:43 2017 -0700 mmc: dw_mmc: Don't allow Runtime PM for SDIO cards According to the SDIO standard interrupts are normally signalled in a very complicated way. They require the card clock to be running and require the controller to be paying close attention to the signals coming from the card. This simply can't happen with the clock stopped or with the controller in a low power mode. To that end, we'll disable runtime_pm when we detect that an SDIO card was inserted. This is much like with what we do with the special "SDMMC_CLKEN_LOW_PWR" bit that dw_mmc supports. NOTE: we specifically do this Runtime PM disabling at card init time rather than in the enable_sdio_irq() callback. This is _different_ than how SDHCI does it. Why do we do it differently? - Unlike SDHCI, dw_mmc uses the standard sdio_irq code in Linux (AKA dw_mmc doesn't set MMC_CAP2_SDIO_IRQ_NOTHREAD). - Because we use the standard sdio_irq code: - We see a constant stream of enable_sdio_irq(0) and enable_sdio_irq(1) calls. This is because the standard code disables interrupts while processing and re-enables them after. - While interrupts are disabled, there's technically a period where we could get runtime disabled while processing interrupts. - If we are runtime disabled while processing interrupts, we'll reset the controller at resume time (see dw_mci_runtime_resume), which seems like a terrible idea because we could possibly have another interrupt pending. To fix the above isues we'd want to put something in the standard sdio_irq code that makes sure to call pm_runtime get/put when interrupts are being actively being processed. That's possible to do, but it seems like a more complicated mechanism when we really just want the runtime pm disabled always for SDIO cards given that all the other bits needed to get Runtime PM vs. SDIO just aren't there. NOTE: at some point in time someone might come up with a fancy way to do SDIO interrupts and still allow (some) amount of runtime PM. Technically we could turn off the card clock if we used an alternate way of signaling SDIO interrupts (and out of band interrupt is one way to do this). We probably wouldn't actually want to fully runtime suspend in this case though--at least not with the current dw_mci_runtime_resume() which basically fully resets the controller at resume time. Fixes: e9ed8835e990 ("mmc: dw_mmc: add runtime PM callback") Cc: Reported-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 704de489e0e3640a2ee2d0daf173e9f7375582ba Author: Thorsten Leemhuis Date: Tue Apr 18 11:14:28 2017 -0700 Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled Temporary got a Lifebook E547 into my hands and noticed the touchpad only works after running: echo "1" > /sys/devices/platform/i8042/serio2/crc_enabled Add it to the list of machines that need this workaround. Cc: stable@vger.kernel.org Signed-off-by: Thorsten Leemhuis Reviewed-by: Ulrik De Bie Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit fb5e2154b764812705dce84881319471d27606fb Merge: 0bad6d7 9ed19c7 Author: Linus Torvalds Date: Tue Apr 18 10:19:47 2017 -0700 Merge tag 'trace-v4.11-rc5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace testcase update from Steven Rostedt: "While testing my development branch, without the fix for the pid use after free bug, the selftest that Namhyung added triggers it. I figured it would be good to add the test for the bug after the fix, such that it does not exist without the fix. I added another patch that lets the test only test part of the pid filtering, and ignores the function-fork (filtering on children as well) if the function-fork feature does not exist. This feature is added by Namhyung just before he added this test. But since the test tests both with and without the feature, it would be good to let it not fail if the feature does not exist" * tag 'trace-v4.11-rc5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: selftests: ftrace: Add check for function-fork before running pid filter test selftests: ftrace: Add a testcase for function PID filter commit 5ef1ecf060f28ecef313b5723f1fd39bf5a35f56 Author: Heiner Kallweit Date: Wed Mar 29 20:54:37 2017 +0200 mmc: sdio: fix alignment issue in struct sdio_func Certain 64-bit systems (e.g. Amlogic Meson GX) require buffers to be used for DMA to be 8-byte-aligned. struct sdio_func has an embedded small DMA buffer not meeting this requirement. When testing switching to descriptor chain mode in meson-gx driver SDIO is broken therefore. Fix this by allocating the small DMA buffer separately as kmalloc ensures that the returned memory area is properly aligned for every basic data type. Signed-off-by: Heiner Kallweit Tested-by: Helmut Klein Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_bus.c | 12 +++++++++++- include/linux/mmc/sdio_func.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) commit 9ed19c7695670d00455c1de4682d5c7f14618689 Author: Steven Rostedt (VMware) Date: Tue Apr 18 12:32:21 2017 -0400 selftests: ftrace: Add check for function-fork before running pid filter test Have the func-filter-pid test check for the function-fork option before testing it. It can still test the pid filtering, but will stop before testing the function-fork option for children inheriting the pids. This allows the test to be added before the function-fork feature, but after a bug fix that triggers one of the bugs the test can cause. Cc: Namhyung Kim Cc: Shuah Khan Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/ftrace/func-filter-pid.tc | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 0bad6d7e935a45d0dfbe6925f4ca36ad8812ff65 Merge: 5ee4c5a d879d0b Author: Linus Torvalds Date: Tue Apr 18 09:31:51 2017 -0700 Merge tag 'trace-v4.11-rc5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace fix from Steven Rostedt: "Namhyung Kim discovered a use after free bug. It has to do with adding a pid filter to function tracing in an instance, and then freeing the instance" * tag 'trace-v4.11-rc5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix function pid filter on instances commit 5ee4c5a92993458c6beaba76c087227675fc3ccd Merge: 20bb78f e6534ae Author: Linus Torvalds Date: Tue Apr 18 09:03:50 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following problems: - regression in new XTS/LRW code when used with async crypto - long-standing bug in ahash API when used with certain algos - bogus memory dereference in async algif_aead with certain algos" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_aead - Fix bogus request dereference in completion function crypto: ahash - Fix EINPROGRESS notification callback crypto: lrw - Fix use-after-free on EINPROGRESS crypto: xts - Fix use-after-free on EINPROGRESS commit 093be89a12c8724883ac803420cba8b08a947d3b Author: Namhyung Kim Date: Mon Apr 17 11:44:30 2017 +0900 selftests: ftrace: Add a testcase for function PID filter Like event pid filtering test, add function pid filtering test with the new "function-fork" option. It also tests it on an instance directory so that it can verify the bug related pid filtering on instances. Link: http://lkml.kernel.org/r/20170417024430.21194-5-namhyung@kernel.org Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Shuah Khan Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/ftrace/func-filter-pid.tc | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit c9f838d104fed6f2f61d68164712e3204bf5271b Author: Eric Biggers Date: Tue Apr 18 15:31:09 2017 +0100 KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings This fixes CVE-2017-7472. Running the following program as an unprivileged user exhausts kernel memory by leaking thread keyrings: #include int main() { for (;;) keyctl_set_reqkey_keyring(KEY_REQKEY_DEFL_THREAD_KEYRING); } Fix it by only creating a new thread keyring if there wasn't one before. To make things more consistent, make install_thread_keyring_to_cred() and install_process_keyring_to_cred() both return 0 if the corresponding keyring is already present. Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Cc: stable@vger.kernel.org # 2.6.29+ Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyctl.c | 11 ++++------- security/keys/process_keys.c | 44 +++++++++++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 24 deletions(-) commit c1644fe041ebaf6519f6809146a77c3ead9193af Author: David Howells Date: Tue Apr 18 15:31:08 2017 +0100 KEYS: Change the name of the dead type to ".dead" to prevent user access This fixes CVE-2017-6951. Userspace should not be able to do things with the "dead" key type as it doesn't have some of the helper functions set upon it that the kernel needs. Attempting to use it may cause the kernel to crash. Fix this by changing the name of the type to ".dead" so that it's rejected up front on userspace syscalls by key_get_type_from_user(). Though this doesn't seem to affect recent kernels, it does affect older ones, certainly those prior to: commit c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 Author: David Howells Date: Tue Sep 16 17:36:06 2014 +0100 KEYS: Remove key_type::match in favour of overriding default by match_preparse which went in before 3.18-rc1. Signed-off-by: David Howells cc: stable@vger.kernel.org security/keys/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee8f844e3c5a73b999edf733df1c529d6503ec2f Author: David Howells Date: Tue Apr 18 15:31:07 2017 +0100 KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings This fixes CVE-2016-9604. Keyrings whose name begin with a '.' are special internal keyrings and so userspace isn't allowed to create keyrings by this name to prevent shadowing. However, the patch that added the guard didn't fix KEYCTL_JOIN_SESSION_KEYRING. Not only can that create dot-named keyrings, it can also subscribe to them as a session keyring if they grant SEARCH permission to the user. This, for example, allows a root process to set .builtin_trusted_keys as its session keyring, at which point it has full access because now the possessor permissions are added. This permits root to add extra public keys, thereby bypassing module verification. This also affects kexec and IMA. This can be tested by (as root): keyctl session .builtin_trusted_keys keyctl add user a a @s keyctl list @s which on my test box gives me: 2 keys in keyring: 180010936: ---lswrv 0 0 asymmetric: Build time autogenerated kernel key: ae3d4a31b82daa8e1a75b49dc2bba949fd992a05 801382539: --alswrv 0 0 user: a Fix this by rejecting names beginning with a '.' in the keyctl. Signed-off-by: David Howells Acked-by: Mimi Zohar cc: linux-ima-devel@lists.sourceforge.net cc: stable@vger.kernel.org security/keys/keyctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit be5c5e843c4afa1c8397cb740b6032bd4142f32d Author: Michael Ellerman Date: Tue Apr 18 14:08:15 2017 +1000 powerpc/64: Fix HMI exception on LE with CONFIG_RELOCATABLE=y Prior to commit 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts"), the branch from hmi_exception_early() to hmi_exception_realmode() was just a bl hmi_exception_realmode, which the linker would turn into a bl to the local entry point of hmi_exception_realmode. This was broken when CONFIG_RELOCATABLE=y because hmi_exception_realmode() is not in the low part of the kernel text that is copied down to 0x0. But in fixing that, we added a new bug on little endian kernels. Because the branch is now a bctrl when CONFIG_RELOCATABLE=y, we branch to the global entry point of hmi_exception_realmode(). The global entry point must be called with r12 containing the address of hmi_exception_realmode(), because it uses that value to calculate the TOC value (r2). This may manifest as a checkstop, because we take a junk value from r12 which came from HSRR1, add a small constant to it and then use that as the TOC pointer. The HSRR1 value will have 0x9 as the top nibble, which puts it above RAM and somewhere in MMIO space. Fix it by changing the BRANCH_LINK_TO_FAR() macro to always use r12 to load the label we're branching to. This means r12 will be setup correctly on LE, fixing this bug, and r12 is also volatile across function calls on BE so it's a good choice anyway. Fixes: 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts") Reported-by: Mahesh Salgaonkar Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 8 ++++---- arch/powerpc/kernel/exceptions-64s.S | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9e1ba4f27f018742a1aa95d11e35106feba08ec1 Author: Ravi Bangoria Date: Tue Apr 11 10:38:13 2017 +0530 powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction If we set a kprobe on a 'stdu' instruction on powerpc64, we see a kernel OOPS: Bad kernel stack pointer cd93c840 at c000000000009868 Oops: Bad kernel stack pointer, sig: 6 [#1] ... GPR00: c000001fcd93cb30 00000000cd93c840 c0000000015c5e00 00000000cd93c840 ... NIP [c000000000009868] resume_kernel+0x2c/0x58 LR [c000000000006208] program_check_common+0x108/0x180 On a 64-bit system when the user probes on a 'stdu' instruction, the kernel does not emulate actual store in emulate_step() because it may corrupt the exception frame. So the kernel does the actual store operation in exception return code i.e. resume_kernel(). resume_kernel() loads the saved stack pointer from memory using lwz, which only loads the low 32-bits of the address, causing the kernel crash. Fix this by loading the 64-bit value instead. Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Ravi Bangoria Reviewed-by: Naveen N. Rao Reviewed-by: Ananth N Mavinakayanahalli [mpe: Change log massage, add stable tag] Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 096f41d3a8fcbb8dde7f71379b1ca85fe213eded Author: Herbert Xu Date: Thu Apr 13 18:35:59 2017 +0800 af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migration code had similar parsing code that's better but it also has some deficiencies. The length is overcounted first of all as it includes the header itself. It also fails to check the length before dereferencing the sa_family field. This patch fixes those problems in parse_sockaddr_pair and then uses it in parse_ipsecrequest. Reported-by: Andrey Konovalov Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/key/af_key.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) commit 20bb78f6b3d1edfdfd52b8a05d2f4f111877618e Merge: 4f7d029 3f795ce Author: Linus Torvalds Date: Mon Apr 17 15:06:34 2017 -0700 Merge branch 'parisc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "One patch which fixes get_user() for 64-bit values on 32-bit kernels. Up to now we lost the upper 32-bits of the returned 64-bit value" * 'parisc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix get_user() for 64-bit value on 32-bit kernel commit 62a6cfddcc0a5313e7da3e8311ba16226fe0ac10 Author: Sachin Prabhu Date: Sun Apr 16 20:37:24 2017 +0100 cifs: Do not send echoes before Negotiate is complete commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect long after socket reconnect") added support for Negotiate requests to be initiated by echo calls. To avoid delays in calling echo after a reconnect, I added the patch introduced by the commit b8c600120fc8 ("Call echo service immediately after socket reconnect"). This has however caused a regression with cifs shares which do not have support for echo calls to trigger Negotiate requests. On connections which need to call Negotiation, the echo calls trigger an error which triggers a reconnect which in turn triggers another echo call. This results in a loop which is only broken when an operation is performed on the cifs share. For an idle share, it can DOS a server. The patch uses the smb_operation can_echo() for cifs so that it is called only if connection has been already been setup. kernel bz: 194531 Signed-off-by: Sachin Prabhu Tested-by: Jonathan Liu Acked-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/smb1ops.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d879d0b8c183aabeb9a65eba91f3f9e3c7e7b905 Author: Namhyung Kim Date: Mon Apr 17 11:44:27 2017 +0900 ftrace: Fix function pid filter on instances When function tracer has a pid filter, it adds a probe to sched_switch to track if current task can be ignored. The probe checks the ftrace_ignore_pid from current tr to filter tasks. But it misses to delete the probe when removing an instance so that it can cause a crash due to the invalid tr pointer (use-after-free). This is easily reproducible with the following: # cd /sys/kernel/debug/tracing # mkdir instances/buggy # echo $$ > instances/buggy/set_ftrace_pid # rmdir instances/buggy ============================================================================ BUG: KASAN: use-after-free in ftrace_filter_pid_sched_switch_probe+0x3d/0x90 Read of size 8 by task kworker/0:1/17 CPU: 0 PID: 17 Comm: kworker/0:1 Tainted: G B 4.11.0-rc3 #198 Call Trace: dump_stack+0x68/0x9f kasan_object_err+0x21/0x70 kasan_report.part.1+0x22b/0x500 ? ftrace_filter_pid_sched_switch_probe+0x3d/0x90 kasan_report+0x25/0x30 __asan_load8+0x5e/0x70 ftrace_filter_pid_sched_switch_probe+0x3d/0x90 ? fpid_start+0x130/0x130 __schedule+0x571/0xce0 ... To fix it, use ftrace_clear_pids() to unregister the probe. As instance_rmdir() already updated ftrace codes, it can just free the filter safely. Link: http://lkml.kernel.org/r/20170417024430.21194-2-namhyung@kernel.org Fixes: 0c8916c34203 ("tracing: Add rmdir to remove multibuffer instances") Cc: Ingo Molnar Cc: stable@vger.kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 9 +++++++++ kernel/trace/trace.c | 1 + kernel/trace/trace.h | 2 ++ 3 files changed, 12 insertions(+) commit acf167f3f2495f0b6565f6e8ac9bd87158a0e98d Merge: 0aa8c13 c2002f9 Author: David S. Miller Date: Mon Apr 17 15:51:58 2017 -0400 Merge branch 'bpf-fixes' Daniel Borkmann says: ==================== Two BPF fixes The set fixes cb_access and xdp_adjust_head bits in struct bpf_prog, that are used for requirement checks on the program rather than f.e. heuristics. Thus, for tail calls, we cannot make any assumptions and are forced to set them. ==================== Signed-off-by: David S. Miller commit c2002f983767ea0a53acbb3e21f771e7a7e2ed28 Author: Daniel Borkmann Date: Mon Apr 17 03:12:07 2017 +0200 bpf: fix checking xdp_adjust_head on tail calls Commit 17bedab27231 ("bpf: xdp: Allow head adjustment in XDP prog") added the xdp_adjust_head bit to the BPF prog in order to tell drivers that the program that is to be attached requires support for the XDP bpf_xdp_adjust_head() helper such that drivers not supporting this helper can reject the program. There are also drivers that do support the helper, but need to check for xdp_adjust_head bit in order to move packet metadata prepended by the firmware away for making headroom. For these cases, the current check for xdp_adjust_head bit is insufficient since there can be cases where the program itself does not use the bpf_xdp_adjust_head() helper, but tail calls into another program that uses bpf_xdp_adjust_head(). As such, the xdp_adjust_head bit is still set to 0. Since the first program has no control over which program it calls into, we need to assume that bpf_xdp_adjust_head() helper is used upon tail calls. Thus, for the very same reasons in cb_access, set the xdp_adjust_head bit to 1 when the main program uses tail calls. Fixes: 17bedab27231 ("bpf: xdp: Allow head adjustment in XDP prog") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/syscall.c | 1 + 1 file changed, 1 insertion(+) commit 6b1bb01bcc5be91452bd3b5bda4300f179fd4053 Author: Daniel Borkmann Date: Mon Apr 17 03:12:06 2017 +0200 bpf: fix cb access in socket filter programs on tail calls Commit ff936a04e5f2 ("bpf: fix cb access in socket filter programs") added a fix for socket filter programs such that in i) AF_PACKET the 20 bytes of skb->cb[] area gets zeroed before use in order to not leak data, and ii) socket filter programs attached to TCP/UDP sockets need to save/restore these 20 bytes since they are also used by protocol layers at that time. The problem is that bpf_prog_run_save_cb() and bpf_prog_run_clear_cb() only look at the actual attached program to determine whether to zero or save/restore the skb->cb[] parts. There can be cases where the actual attached program does not access the skb->cb[], but the program tail calls into another program which does access this area. In such a case, the zero or save/restore is currently not performed. Since the programs we tail call into are unknown at verification time and can dynamically change, we need to assume that whenever the attached program performs a tail call, that later programs could access the skb->cb[], and therefore we need to always set cb_access to 1. Fixes: ff936a04e5f2 ("bpf: fix cb access in socket filter programs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0aa8c13eb512823bc4d60397d666a6b6260bb965 Author: Florian Westphal Date: Fri Apr 14 20:22:43 2017 +0200 ipv6: drop non loopback packets claiming to originate from ::1 We lack a saddr check for ::1. This causes security issues e.g. with acls permitting connections from ::1 because of assumption that these originate from local machine. Assuming a source address of ::1 is local seems reasonable. RFC4291 doesn't allow such a source address either, so drop such packets. Reported-by: Eric Dumazet Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_input.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 85128b2be6738fe36c224995c5ee80fe80fbb1b5 Author: Al Viro Date: Thu Apr 13 09:31:51 2017 -0400 fix nfs O_DIRECT advancing iov_iter too much It leaves the iterator advanced by the amount of IO it has requested instead of the amount actually transferred. Among other things, that confuses the hell out of generic_file_splice_read(). Signed-off-by: Al Viro fs/nfs/direct.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 71d6ad08379304128e4bdfaf0b4185d54375423e Author: Al Viro Date: Fri Apr 14 17:22:18 2017 -0400 p9_client_readdir() fix Don't assume that server is sane and won't return more data than asked for. Cc: stable@vger.kernel.org Signed-off-by: Al Viro net/9p/client.c | 4 ++++ 1 file changed, 4 insertions(+) commit 890559e34eac1fb90a4b5916d4a1387376a05d51 Author: Al Viro Date: Thu Apr 13 03:10:18 2017 -0400 orangefs_bufmap_copy_from_iovec(): fix EFAULT handling short copy here should mean instant EFAULT, not "move to the next page and hope it fails there, this time with nothing copied" Signed-off-by: Al Viro fs/orangefs/orangefs-bufmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e7590308d17e578e47f298cc3fec359108341cb6 Merge: daffad2 372fa10 Author: Stephen Boyd Date: Mon Apr 17 11:04:12 2017 -0700 Merge tag 'sunxi-clk-fixes-for-4.11-2-bis' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull Allwinner clock fixes for 4.11 from Maxime Ripard: Two build errors fixes for the sunxi-ng drivers. The two other patches fix random CPU crashes happening on the A33 since CPUFreq has been enabled in 4.11. * tag 'sunxi-clk-fixes-for-4.11-2-bis' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER commit 71947f0f91ad9c995e11c671d24bd4da5d11c0cb Merge: bfe7244 134d215 Author: David S. Miller Date: Mon Apr 17 13:33:59 2017 -0400 Merge branch 'mediatek-tx-bugs' Sean Wang says: ==================== mediatek: Fix crash caused by reporting inconsistent skb->len to BQL Changes since v1: - fix inconsistent enumeration which easily causes the potential bug The series fixes kernel BUG caused by inconsistent SKB length reported into BQL. The reason for inconsistent length comes from hardware BUG which results in different port number carried on the TXD within the lifecycle of SKB. So patch 2) is proposed for use a software way to track which port the SKB involving instead of hardware way. And patch 1) is given for another issue I found which causes TXD and SKB inconsistency that is not expected in the initial logic, so it is also being corrected it in the series. The log for the kernel BUG caused by the issue is posted as below. [ 120.825955] kernel BUG at ... lib/dynamic_queue_limits.c:26! [ 120.837684] Internal error: Oops - BUG: 0 [#1] SMP ARM [ 120.842778] Modules linked in: [ 120.845811] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1-191576-gdbcef47 #35 [ 120.853488] Hardware name: Mediatek Cortex-A7 (Device Tree) [ 120.859012] task: c1007480 task.stack: c1000000 [ 120.863510] PC is at dql_completed+0x108/0x17c [ 120.867915] LR is at 0x46 [ 120.870512] pc : [] lr : [<00000046>] psr: 80000113 [ 120.870512] sp : c1001d58 ip : c1001d80 fp : c1001d7c [ 120.881895] r10: 0000003e r9 : df6b3400 r8 : 0ed86506 [ 120.887075] r7 : 00000001 r6 : 00000001 r5 : 0ed8654c r4 : df0135d8 [ 120.893546] r3 : 00000001 r2 : df016800 r1 : 0000fece r0 : df6b3480 [ 120.900018] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 120.907093] Control: 10c5387d Table: 9e27806a DAC: 00000051 [ 120.912789] Process swapper/0 (pid: 0, stack limit = 0xc1000218) [ 120.918744] Stack: (0xc1001d58 to 0xc1002000) .... 121.085331] 1fc0: 00000000 c0a52a28 00000000 c10855d4 c1003c58 c0a52a24 c100885c 8000406a [ 121.093444] 1fe0: 410fc073 00000000 00000000 c1001ff8 8000807c c0a009cc 00000000 00000000 [ 121.101575] [] (dql_completed) from [] (mtk_napi_tx+0x1d0/0x37c) [ 121.109263] [] (mtk_napi_tx) from [] (net_rx_action+0x24c/0x3b8) [ 121.116951] [] (net_rx_action) from [] (__do_softirq+0xe4/0x35c) [ 121.124638] [] (__do_softirq) from [] (irq_exit+0xe8/0x150) [ 121.131895] [] (irq_exit) from [] (__handle_domain_irq+0x70/0xc4) [ 121.139666] [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x9c) [ 121.147953] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 121.155373] Exception stack(0xc1001ef8 to 0xc1001f40) ==================== Signed-off-by: David S. Miller commit 134d21525f5f7c89f1f6ce052a11ac09dc27b331 Author: Sean Wang Date: Fri Apr 14 11:19:12 2017 +0800 net: ethernet: mediatek: fix inconsistency of port number carried in TXD Fix port inconsistency on TXD due to hardware BUG that would cause different port number is carried on the same TXD between tx_map() and tx_unmap() with the iperf test. It would cause confusing BQL logic which leads to kernel panic when dual GMAC runs concurrently. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 +++++++++----- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 12 +++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) commit 81d2dd09ca11a2b834c8a915c6aabf8325d57ecf Author: Sean Wang Date: Fri Apr 14 11:19:11 2017 +0800 net: ethernet: mediatek: fix inconsistency between TXD and the used buffer Fix inconsistency between the TXD descriptor and the used buffer that would cause unexpected logic at mtk_tx_unmap() during skb housekeeping. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit bfe72442578bb112626e476ffe1f276504d85b95 Author: Grygorii Strashko Date: Thu Apr 13 14:11:27 2017 -0500 net: phy: micrel: fix crash when statistic requested for KSZ9031 phy Now the command: ethtool --phy-statistics eth0 will cause system crash with meassage "Unable to handle kernel NULL pointer dereference at virtual address 00000010" from: (kszphy_get_stats) from [] (ethtool_get_phy_stats+0xd8/0x210) (ethtool_get_phy_stats) from [] (dev_ethtool+0x5b8/0x228c) (dev_ethtool) from [] (dev_ioctl+0x3fc/0x964) (dev_ioctl) from [] (sock_ioctl+0x170/0x2c0) (sock_ioctl) from [] (do_vfs_ioctl+0xa8/0x95c) (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x64) (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x44) The reason: phy_driver structure for KSZ9031 phy has no .probe() callback defined. As result, struct phy_device *phydev->priv pointer will not be initializes (null). This issue will affect also following phys: KSZ8795, KSZ886X, KSZ8873MLL, KSZ9031, KSZ9021, KSZ8061, KS8737 Fix it by: - adding .probe() = kszphy_probe() callback to KSZ9031, KSZ9021 phys. The kszphy_probe() can be re-used as it doesn't do any phy specific settings. - removing statistic callbacks from other phys (KSZ8795, KSZ886X, KSZ8873MLL, KSZ8061, KS8737) as they doesn't have corresponding statistic counters. Fixes: 2b2427d06426 ("phy: micrel: Add ethtool statistics counters") Signed-off-by: Grygorii Strashko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 426c87caa2b4578b43cd3f689f02c65b743b2559 Author: David Ahern Date: Thu Apr 13 10:57:15 2017 -0600 net: vrf: Fix setting NLM_F_EXCL flag when adding l3mdev rule Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr. Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b47a57a273fc0c1a922fe8b6a139881971e3d8de Author: George Cherian Date: Thu Apr 13 07:25:01 2017 +0000 net: thunderx: Fix set_max_bgx_per_node for 81xx rgx Add the PCI_SUBSYS_DEVID_81XX_RGX and use the same to set the max bgx per node count. This fixes the issue intoduced by following commit 78aacb6f6 net: thunderx: Fix invalid mac addresses for node1 interfaces With this commit the max_bgx_per_node for 81xx is set as 2 instead of 3 because of which num_vfs is always calculated as zero. Signed-off-by: George Cherian Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 1 + drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 1 + 2 files changed, 2 insertions(+) commit 1862d6208db0aeca9c8ace44915b08d5ab2cd667 Author: Willem de Bruijn Date: Wed Apr 12 19:24:35 2017 -0400 net-timestamp: avoid use-after-free in ip_recv_error Syzkaller reported a use-after-free in ip_recv_error at line info->ipi_ifindex = skb->dev->ifindex; This function is called on dequeue from the error queue, at which point the device pointer may no longer be valid. Save ifindex on enqueue in __skb_complete_tx_timestamp, when the pointer is valid or NULL. Store it in temporary storage skb->cb. It is safe to reference skb->dev here, as called from device drivers or dev_queue_xmit. The exception is when called from tcp_ack_tstamp; in that case it is NULL and ifindex is set to 0 (invalid). Do not return a pktinfo cmsg if ifindex is 0. This maintains the current behavior of not returning a cmsg if skb->dev was NULL. On dequeue, the ipv4 path will cast from sock_exterr_skb to in_pktinfo. Both have ifindex as their first element, so no explicit conversion is needed. This is by design, introduced in commit 0b922b7a829c ("net: original ingress device index in PKTINFO"). For ipv6 ip6_datagram_support_cmsg converts to in6_pktinfo. Fixes: 829ae9d61165 ("net-timestamp: allow reading recv cmsg on errqueue with origin tstamp") Reported-by: Andrey Konovalov Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 1 + net/ipv4/ip_sockglue.c | 9 ++++----- net/ipv6/datagram.c | 10 +--------- 3 files changed, 6 insertions(+), 14 deletions(-) commit 1215e51edad1272e669172b26aa12aac94810c7f Author: WANG Cong Date: Wed Apr 12 12:32:13 2017 -0700 ipv4: fix a deadlock in ip_ra_control Similar to commit 87e9f0315952 ("ipv4: fix a potential deadlock in mcast getsockopt() path"), there is a deadlock scenario for IP_ROUTER_ALERT too: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); Fix this by always locking RTNL first on all setsockopt() paths. Note, after this patch ip_ra_lock is no longer needed either. Reported-by: Dmitry Vyukov Tested-by: Andrey Konovalov Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 1 + net/ipv4/ipmr.c | 11 ++--------- net/ipv4/raw.c | 2 ++ 3 files changed, 5 insertions(+), 9 deletions(-) commit 271a8b428f8361f3ad4c599835ccd34dd458b212 Author: Bert Kenward Date: Wed Apr 12 17:06:52 2017 +0100 sfc: limit the number of receive queues The number of rx queues is determined by the rss_cpus parameter or the cpu topology. If that is higher than EFX_MAX_RX_QUEUES the driver can corrupt state. Fixes: 8ceee660aacb ("New driver "sfc" for Solarstorm SFC4000 controller.") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 7 +++++++ drivers/net/ethernet/sfc/falcon/efx.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 4f7d029b9bf009fbee76bb10c0c4351a1870d2f3 Author: Linus Torvalds Date: Sun Apr 16 13:00:18 2017 -0700 Linux 4.11-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7395ca0f912c44e70db18b6a34c7024ba34564bd Merge: a86f106 e2647b6 Author: Linus Torvalds Date: Sun Apr 16 12:38:17 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: "Again, a batch that's been sitting a couple of weeks, mostly because I anticipated a bit more material but it didn't show up -- which is good. These are all your garden variety fixes for ARM platforms. The most visible issue fixed here is probably the SMP reset issue on OMAP, the rest are minor stuff" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: allwinner: a64: add pmu0 regs for USB PHY ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer reset: add exported __reset_control_get, return NULL if optional ARM: orion5x: only call into phylib when available ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend ARM: dts: ti: fix PCI bus dtc warnings ARM: dts: am335x-baltos: disable EEE for Atheros 8035 PHY ARM: dts: OMAP3: Fix MFG ID EEPROM ARM: sun8i: a33: add operating-points-v2 property to all nodes ARM: sun8i: a33: remove highest OPP to fix CPU crashes commit a86f106f488b170e6a0361c723c5a7ad72d4ab33 Merge: 11c994d 5a8d75a Author: Linus Torvalds Date: Sun Apr 16 12:05:09 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Four small fixes. Three of them fix the same error in NVMe, in loop, fc, and rdma respectively. The last fix from Ming fixes a regression in this series, where our bvec gap logic was wrong and causes an oops on NVMe for certain conditions" * 'for-linus' of git://git.kernel.dk/linux-block: block: fix bio_will_gap() for first bvec with offset nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability commit e2647b6de7247b8b8ed50da8d89138a1566c0293 Merge: 5fa22a6 04abaf0 Author: Olof Johansson Date: Sun Apr 16 11:52:26 2017 -0700 Merge tag 'omap-for-v4.11/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Regression fix for omap interconnect code for deferred probe. Without this fix we can get PM related warnings for devices that use deferred probe. If necessary, this fix can wait for the v4.12 merge window no problem. * tag 'omap-for-v4.11/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend ARM: dts: ti: fix PCI bus dtc warnings ARM: dts: am335x-baltos: disable EEE for Atheros 8035 PHY ARM: dts: OMAP3: Fix MFG ID EEPROM Signed-off-by: Olof Johansson commit 11c994d9a50b6ba5a96a1c1450ce0fa7bd840f1c Merge: 032aaf3 330c418 Author: Linus Torvalds Date: Sun Apr 16 11:48:10 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "Unfortunately, the commit to fix the cgroup mount race in the previous pull request can lead to hangs. The original bug has been around for a while and isn't too likely to be triggered in usual use cases. Revert the commit for now" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: Revert "cgroup: avoid attaching a cgroup root to two different superblocks" commit 032aaf3f9ff9faa039673d95ea95e02ddff3a26b Merge: 4853886 a8983d0 Author: Linus Torvalds Date: Sun Apr 16 11:35:34 2017 -0700 Merge tag 'tty-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fix from Greg KH: "Here is a single tty core revert for a patch that was reported to cause problems. The original issue is one that we have lived with for decades, so trying to scramble to fix the fix in time for 4.11-final does not make sense due to the fragility of the tty ldisc layer. Just reverting it makes sense for now" * tag 'tty-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "tty: don't panic on OOM in tty_set_ldisc()" commit 48538861b993255ec6e1012b5af1cfbb8787a4d6 Merge: d5ff081 82cc4fc Author: Linus Torvalds Date: Sun Apr 16 10:01:34 2017 -0700 Merge tag 'trace-v4.11-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace fix from Steven Rostedt: "While rewriting the function probe code, I stumbled over a long standing bug. This bug has been there sinc function tracing was added way back when. But my new development depends on this bug being fixed, and it should be fixed regardless as it causes ftrace to disable itself when triggered, and a reboot is required to enable it again. The bug is that the function probe does not disable itself properly if there's another probe of its type still enabled. For example: # cd /sys/kernel/debug/tracing # echo schedule:traceoff > set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter # echo \!do_IRQ:traceoff > /debug/tracing/set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter The above registers two traceoff probes (one for schedule and one for do_IRQ, and then removes do_IRQ. But since there still exists one for schedule, it is not done properly. When adding do_IRQ back, the breakage in the accounting is noticed by the ftrace self tests, and it causes a warning and disables ftrace" * tag 'trace-v4.11-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix removing of second function probe commit 330c418638612d7658b6314e6a244fcb5f7efac5 Author: Tejun Heo Date: Sun Apr 16 23:17:37 2017 +0900 Revert "cgroup: avoid attaching a cgroup root to two different superblocks" This reverts commit bfb0b80db5f9dca5ac0a5fd0edb765ee555e5a8e. Andrei reports CRIU test hangs with the patch applied. The bug fixed by the patch isn't too likely to trigger in actual uses. Revert the patch for now. Signed-off-by: Tejun Heo Reported-by: Andrei Vagin Link: http://lkml.kernel.org/r/20170414232737.GC20350@outlook.office365.com kernel/cgroup/cgroup-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f795cef0ecdf9bc980dd058d49bdab4b19af1d3 Author: Helge Deller Date: Sun Apr 16 10:00:14 2017 +0200 parisc: Fix get_user() for 64-bit value on 32-bit kernel This fixes a bug in which the upper 32-bits of a 64-bit value which is read by get_user() was lost on a 32-bit kernel. While touching this code, split out pre-loading of %sr2 space register and clean up code indent. Cc: # v4.9+ Signed-off-by: Helge Deller arch/parisc/include/asm/uaccess.h | 86 +++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 31 deletions(-) commit d5ff0814fda50f0306e102f39640cf5bb76af08e Merge: 403a39f 11e63f6 Author: Linus Torvalds Date: Sat Apr 15 14:07:03 2017 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull nvdimm fixes from Dan Williams: "A small crop of lockdep, sleeping while atomic, and other fixes / band-aids in advance of the full-blown reworks targeting the next merge window. The largest change here is "libnvdimm: fix blk free space accounting" which deletes a pile of buggy code that better testing would have caught before merging. The next change that is borderline too big for a late rc is switching the device-dax locking from rcu to srcu, I couldn't think of a smaller way to make that fix. The __copy_user_nocache fix will have a full replacement in 4.12 to move those pmem special case considerations into the pmem driver. The "libnvdimm: band aid btt vs clear poison locking" commit admits that our error clearing support for btt went in broken, so we just disable it in 4.11 and -stable. A replacement / full fix is in the pipeline for 4.12 Some of these would have been caught earlier had DEBUG_ATOMIC_SLEEP been enabled on my development station. I wonder if we should have: config DEBUG_ATOMIC_SLEEP default PROVE_LOCKING ...since I mistakenly thought I got both with PROVE_LOCKING=y. These have received a build success notification from the 0day robot, and some have appeared in a -next release with no reported issues" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions device-dax: switch to srcu, fix rcu_read_lock() vs pte allocation libnvdimm: band aid btt vs clear poison locking libnvdimm: fix reconfig_mutex, mmap_sem, and jbd2_handle lockdep splat libnvdimm: fix blk free space accounting acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison) commit 403a39f8b0c7b819f8c7ea14bc81f598b1d352cf Merge: be84a46 0e1bfea Author: Linus Torvalds Date: Sat Apr 15 09:42:14 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is seven small fixes which are all for user visible issues that fortunately only occur in rare circumstances. The most serious is the sr one in which QEMU can cause us to read beyond the end of a buffer (I don't think it's exploitable, but just in case). The next is the sd capacity fix which means all non 512 byte sector drives greater than 2TB fail to be correctly sized. The rest are either in new drivers (qedf) or on error legs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ipr: do not set DID_PASSTHROUGH on CHECK CONDITION scsi: aacraid: fix PCI error recovery path scsi: sd: Fix capacity calculation with 32-bit sector_t scsi: qla2xxx: Add fix to read correct register value for ISP82xx. scsi: qedf: Fix crash due to unsolicited FIP VLAN response. scsi: sr: Sanity check returned mode data scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable commit be84a46c7f6b1328abea4a5132a107f2bdbf2437 Merge: 1ec1688 409c1b2 Author: Linus Torvalds Date: Sat Apr 15 09:40:35 2017 -0700 Merge branch 'parisc-4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "Mikulas Patocka fixed a few bugs in our new pa_memcpy() assembler function, e.g. one bug made the kernel unbootable if source and destination address are the same" * 'parisc-4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix bugs in pa_memcpy commit 1ec1688c5360e14dde4094d6acbf7516bf6db37e Author: Martin Brandenburg Date: Fri Apr 14 14:22:41 2017 -0400 orangefs: free superblock when mount fails Otherwise lockdep says: [ 1337.483798] ================================================ [ 1337.483999] [ BUG: lock held when returning to user space! ] [ 1337.484252] 4.11.0-rc6 #19 Not tainted [ 1337.484423] ------------------------------------------------ [ 1337.484626] mount/14766 is leaving the kernel with locks still held! [ 1337.484841] 1 lock held by mount/14766: [ 1337.485017] #0: (&type->s_umount_key#33/1){+.+.+.}, at: [] sget_userns+0x2af/0x520 Caught by xfstests generic/413 which tried to mount with the unsupported mount option dax. Then xfstests generic/422 ran sync which deadlocks. Signed-off-by: Martin Brandenburg Acked-by: Mike Marshall Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/orangefs/devorangefs-req.c | 9 +++++++-- fs/orangefs/orangefs-kernel.h | 1 + fs/orangefs/super.c | 23 ++++++++++++++++------- 3 files changed, 24 insertions(+), 9 deletions(-) commit ca855a5e2679e9e571dfb0e64f4484b36f1992a8 Merge: 0e1bfea e7661a8 Author: James Bottomley Date: Sat Apr 15 09:36:06 2017 -0700 Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes commit c0eb027e5aef70b71e5a38ee3e264dc0b497f343 Author: Linus Torvalds Date: Sun Apr 2 17:10:08 2017 -0700 vfs: don't do RCU lookup of empty pathnames Normal pathname lookup doesn't allow empty pathnames, but using AT_EMPTY_PATH (with name_to_handle_at() or fstatat(), for example) you can trigger an empty pathname lookup. And not only is the RCU lookup in that case entirely unnecessary (because we'll obviously immediately finalize the end result), it is actively wrong. Why? An empth path is a special case that will return the original 'dirfd' dentry - and that dentry may not actually be RCU-free'd, resulting in a potential use-after-free if we were to initialize the path lazily under the RCU read lock and depend on complete_walk() finalizing the dentry. Found by syzkaller and KASAN. Reported-by: Dmitry Vyukov Reported-by: Vegard Nossum Acked-by: Al Viro Signed-off-by: Linus Torvalds fs/namei.c | 3 +++ 1 file changed, 3 insertions(+) commit 409c1b250e30ad0e48b4d15d7319b4e18c046c4f Author: Mikulas Patocka Date: Fri Apr 14 14:15:20 2017 -0400 parisc: fix bugs in pa_memcpy The patch 554bfeceb8a22d448cd986fc9efce25e833278a1 ("parisc: Fix access fault handling in pa_memcpy()") reimplements the pa_memcpy function. Unfortunatelly, it makes the kernel unbootable. The crash happens in the function ide_complete_cmd where memcpy is called with the same source and destination address. This patch fixes a few bugs in pa_memcpy: * When jumping to .Lcopy_loop_16 for the first time, don't skip the instruction "ldi 31,t0" (this bug made the kernel unbootable) * Use the COND macro when comparing length, so that the comparison is 64-bit (a theoretical issue, in case the length is greater than 0xffffffff) * Don't use the COND macro after the "extru" instruction (the PA-RISC specification says that the upper 32-bits of extru result are undefined, although they are set to zero in practice) * Fix exception addresses in .Lcopy16_fault and .Lcopy8_fault * Rename .Lcopy_loop_4 to .Lcopy_loop_8 (so that it is consistent with .Lcopy8_fault) Cc: # v4.9+ Fixes: 554bfeceb8a2 ("parisc: Fix access fault handling in pa_memcpy()") Signed-off-by: Mikulas Patocka Signed-off-by: Helge Deller arch/parisc/lib/lusercopy.S | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 1bf4b1268e66d9364fc6fd41f906bc01458530ac Merge: 7e703ec 5376366 Author: Linus Torvalds Date: Fri Apr 14 17:51:16 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 small update to xpad driver to recognize yet another gamepad, and another change making sure userio.h is exported" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - add support for Razer Wildcat gamepad uapi: add missing install of userio.h commit 7e703eccf02a4a6aac6574f5fd4680a0619fdbfb Merge: 9117439 f4c13c8 Author: Linus Torvalds Date: Fri Apr 14 17:38:24 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Things seem to be settling down as far as networking is concerned, let's hope this trend continues... 1) Add iov_iter_revert() and use it to fix the behavior of skb_copy_datagram_msg() et al., from Al Viro. 2) Fix the protocol used in the synthetic SKB we cons up for the purposes of doing a simulated route lookup for RTM_GETROUTE requests. From Florian Larysch. 3) Don't add noop_qdisc to the per-device qdisc hashes, from Cong Wang. 4) Don't call netdev_change_features with the team lock held, from Xin Long. 5) Revert TCP F-RTO extension to catch more spurious timeouts because it interacts very badly with some middle-boxes. From Yuchung Cheng. 6) Fix the loss of error values in l2tp {s,g}etsockopt calls, from Guillaume Nault. 7) ctnetlink uses bit positions where it should be using bit masks, fix from Liping Zhang. 8) Missing RCU locking in netfilter helper code, from Gao Feng. 9) Avoid double frees and use-after-frees in tcp_disconnect(), from Eric Dumazet. 10) Don't do a changelink before we register the netdevice in bridging, from Ido Schimmel. 11) Lock the ipv6 device address list properly, from Rabin Vincent" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits) netfilter: ipt_CLUSTERIP: Fix wrong conntrack netns refcnt usage netfilter: nft_hash: do not dump the auto generated seed drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201 ipv6: Fix idev->addr_list corruption net: xdp: don't export dev_change_xdp_fd() bridge: netlink: register netdevice before executing changelink bridge: implement missing ndo_uninit() bpf: reference may_access_skb() from __bpf_prog_run() tcp: clear saved_syn in tcp_disconnect() netfilter: nf_ct_expect: use proper RCU list traversal/update APIs netfilter: ctnetlink: skip dumping expect when nfct_help(ct) is NULL netfilter: make it safer during the inet6_dev->addr_list traversal netfilter: ctnetlink: make it safer when checking the ct helper name netfilter: helper: Add the rcu lock when call __nf_conntrack_helper_find netfilter: ctnetlink: using bit to represent the ct event netfilter: xt_TCPMSS: add more sanity tests on tcph->doff net: tcp: Increase TCP_MIB_OUTRSTS even though fail to alloc skb l2tp: don't mask errors in pppol2tp_getsockopt() l2tp: don't mask errors in pppol2tp_setsockopt() tcp: restrict F-RTO to work-around broken middle-boxes ... commit 91174391bf5a368c9837b63b84d7f5a813efd719 Merge: 07c7016 7f00f38 Author: Linus Torvalds Date: Fri Apr 14 17:00:01 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of small fixes for x86: - fix locking in RDT to prevent memory leaks and freeing in use memory - prevent setting invalid values for vdso32_enabled which cause inconsistencies for user space resulting in application crashes. - plug a race in the vdso32 code between fork and sysctl which causes inconsistencies for user space resulting in application crashes. - make MPX signal delivery work in compat mode - make the dmesg output of traps and faults readable again" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel_rdt: Fix locking in rdtgroup_schemata_write() x86/debug: Fix the printk() debug output of signal_fault(), do_trap() and do_general_protection() x86/vdso: Plug race between mapping and ELF header setup x86/vdso: Ensure vdso32_enabled gets set to valid values only x86/signals: Fix lower/upper bound reporting in compat siginfo commit 07c7016de7896493e95bef64fe913ac849509d6e Merge: d295917 f2200ac Author: Linus Torvalds Date: Fri Apr 14 16:58:38 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two small fixes for perf: - the move to support cross arch annotation introduced per arch initialization requirements, fullfill them for s/390 (Christian Borntraeger) - add the missing initialization to the LBR entries to avoid exposing random or stale data" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32() perf annotate s390: Fix perf annotate error -95 (4.10 regression) commit d295917a47e99fe43f1efb14261612e67120e4bb Merge: f399ecb 75eb5e1 Author: Linus Torvalds Date: Fri Apr 14 16:57:14 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: "The irq department provides: - two fixes for the CPU affinity spread infrastructure to prevent unbalanced spreading in corner cases which leads to horrible performance, because interrupts are rather aggregated than spread - add a missing spinlock initializer in the imx-gpcv2 init code" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-imx-gpcv2: Fix spinlock initialization irq/affinity: Fix extra vecs calculation irq/affinity: Fix CPU spread for unbalanced nodes commit f399ecb4b49b3b6afb5bbb613bfa3728682a3e4f Merge: 4b31ac4 6f6266a Author: Linus Torvalds Date: Fri Apr 14 16:55:33 2017 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Thomas Gleixner: "Three fixes from EFI land: - prevent accessing a Graphic Output Device (GOP) which the kernel does not know to handle - prevent PCI reconfiguration to modify a BAR which covers the framebuffer because that's already in use through the EFI GOP interface - avoid reserving EFI runtime regions as this results in bogus memory mappings" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Don't try to reserve runtime regions efi/fb: Avoid reconfiguration of BAR that covers the framebuffer efi/libstub: Skip GOP with PIXEL_BLT_ONLY format commit 4b31ac485daabc50483598500055d63ce5677cc3 Merge: 5466f4d a967efb Author: Linus Torvalds Date: Fri Apr 14 16:53:45 2017 -0700 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Dave Sterba collected a few more fixes for the last rc. These aren't marked for stable, but I'm putting them in with a batch were testing/sending by hand for this release" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix potential use-after-free for cloned bio Btrfs: fix segmentation fault when doing dio read Btrfs: fix invalid dereference in btrfs_retry_endio btrfs: drop the nossd flag when remounting with -o ssd commit 5466f4dfce857a7954f19bc9acfc7ca4a73321b6 Merge: 82f1faa 67dbea2 Author: Linus Torvalds Date: Fri Apr 14 16:51:29 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull more CIFS fixes from Steve French: "As promised, here is the remaining set of cifs/smb3 fixes for stable (and a fix for one regression) now that they have had additional review and testing" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Fix SMB3 mount without specifying a security mechanism CIFS: store results of cifs_reopen_file to avoid infinite wait CIFS: remove bad_network_name flag CIFS: reconnect thread reschedule itself CIFS: handle guest access errors to Windows shares CIFS: Fix null pointer deref during read resp processing commit 82cc4fc2e70ec5baeff8f776f2773abc8b2cc0ae Author: Steven Rostedt (VMware) Date: Fri Apr 14 17:45:45 2017 -0400 ftrace: Fix removing of second function probe When two function probes are added to set_ftrace_filter, and then one of them is removed, the update to the function locations is not performed, and the record keeping of the function states are corrupted, and causes an ftrace_bug() to occur. This is easily reproducable by adding two probes, removing one, and then adding it back again. # cd /sys/kernel/debug/tracing # echo schedule:traceoff > set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter # echo \!do_IRQ:traceoff > /debug/tracing/set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter Causes: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1098 at kernel/trace/ftrace.c:2369 ftrace_get_addr_curr+0x143/0x220 Modules linked in: [...] CPU: 2 PID: 1098 Comm: bash Not tainted 4.10.0-test+ #405 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012 Call Trace: dump_stack+0x68/0x9f __warn+0x111/0x130 ? trace_irq_work_interrupt+0xa0/0xa0 warn_slowpath_null+0x1d/0x20 ftrace_get_addr_curr+0x143/0x220 ? __fentry__+0x10/0x10 ftrace_replace_code+0xe3/0x4f0 ? ftrace_int3_handler+0x90/0x90 ? printk+0x99/0xb5 ? 0xffffffff81000000 ftrace_modify_all_code+0x97/0x110 arch_ftrace_update_code+0x10/0x20 ftrace_run_update_code+0x1c/0x60 ftrace_run_modify_code.isra.48.constprop.62+0x8e/0xd0 register_ftrace_function_probe+0x4b6/0x590 ? ftrace_startup+0x310/0x310 ? debug_lockdep_rcu_enabled.part.4+0x1a/0x30 ? update_stack_state+0x88/0x110 ? ftrace_regex_write.isra.43.part.44+0x1d3/0x320 ? preempt_count_sub+0x18/0xd0 ? mutex_lock_nested+0x104/0x800 ? ftrace_regex_write.isra.43.part.44+0x1d3/0x320 ? __unwind_start+0x1c0/0x1c0 ? _mutex_lock_nest_lock+0x800/0x800 ftrace_trace_probe_callback.isra.3+0xc0/0x130 ? func_set_flag+0xe0/0xe0 ? __lock_acquire+0x642/0x1790 ? __might_fault+0x1e/0x20 ? trace_get_user+0x398/0x470 ? strcmp+0x35/0x60 ftrace_trace_onoff_callback+0x48/0x70 ftrace_regex_write.isra.43.part.44+0x251/0x320 ? match_records+0x420/0x420 ftrace_filter_write+0x2b/0x30 __vfs_write+0xd7/0x330 ? do_loop_readv_writev+0x120/0x120 ? locks_remove_posix+0x90/0x2f0 ? do_lock_file_wait+0x160/0x160 ? __lock_is_held+0x93/0x100 ? rcu_read_lock_sched_held+0x5c/0xb0 ? preempt_count_sub+0x18/0xd0 ? __sb_start_write+0x10a/0x230 ? vfs_write+0x222/0x240 vfs_write+0xef/0x240 SyS_write+0xab/0x130 ? SyS_read+0x130/0x130 ? trace_hardirqs_on_caller+0x182/0x280 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL_64_fastpath+0x18/0xad RIP: 0033:0x7fe61c157c30 RSP: 002b:00007ffe87890258 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: ffffffff8114a410 RCX: 00007fe61c157c30 RDX: 0000000000000010 RSI: 000055814798f5e0 RDI: 0000000000000001 RBP: ffff8800c9027f98 R08: 00007fe61c422740 R09: 00007fe61ca53700 R10: 0000000000000073 R11: 0000000000000246 R12: 0000558147a36400 R13: 00007ffe8788f160 R14: 0000000000000024 R15: 00007ffe8788f15c ? trace_hardirqs_off_caller+0xc0/0x110 ---[ end trace 99fa09b3d9869c2c ]--- Bad trampoline accounting at: ffffffff81cc3b00 (do_IRQ+0x0/0x150) Cc: stable@vger.kernel.org Fixes: 59df055f1991 ("ftrace: trace different functions with a different tracer") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 5a8d75a1b8c99bdc926ba69b7b7dbe4fae81a5af Author: Ming Lei Date: Fri Apr 14 13:58:29 2017 -0600 block: fix bio_will_gap() for first bvec with offset Commit 729204ef49ec("block: relax check on sg gap") allows us to merge bios, if both are physically contiguous. This change can merge a huge number of small bios, through mkfs for example, mkfs.ntfs running time can be decreased to ~1/10. But if one rq starts with a non-aligned buffer (the 1st bvec's bv_offset is non-zero) and if we allow the merge, it is quite difficult to respect sg gap limit, especially the max segment size, or we risk having an unaligned virtual boundary. This patch tries to avoid the issue by disallowing a merge, if the req starts with an unaligned buffer. Also add comments to explain why the merged segment can't end in unaligned virt boundary. Fixes: 729204ef49ec ("block: relax check on sg gap") Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei Rewrote parts of the commit message and comments. Signed-off-by: Jens Axboe include/linux/blkdev.h | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 6492f09e864417d382e22b922ae30693a7ce2982 Author: Noam Camus Date: Tue Apr 4 11:00:41 2017 +0300 ARC: [plat-eznps] Fix build error Make ATOMIC_INIT available for all ARC platforms (including plat-eznps) Cc: # 4.9+ Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/include/asm/atomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82f1faa86727de976e38eade5e96a1846742d71e Merge: e16d8b6 e68d490 Author: Linus Torvalds Date: Fri Apr 14 09:18:17 2017 -0700 Merge tag 'fbdev-v4.11-rc6' of git://github.com/bzolnier/linux Pull fbdev fixes from Bartlomiej Zolnierkiewicz: - fix probing time checks in omapfb driver (regression fix) - fix optional VBAT support in ssd1307fb driver (regression fix) - fix connecting to backend in xen-fbfront driver * tag 'fbdev-v4.11-rc6' of git://github.com/bzolnier/linux: fbdev: omapfb: delete check_required_callbacks() xen, fbfront: fix connecting to backend fbdev/ssd1307fb: fix optional VBAT support commit e16d8b6e1f8b67eda0a746a3b9ee7c37fc3b688b Merge: 321ae37 66803c9 Author: Linus Torvalds Date: Fri Apr 14 09:16:23 2017 -0700 Merge tag 'pm-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a cpufreq core regression related to CPU online/offline and several issues in the turbostat and cpupower utilities. Specifics: - Allow CPUs to be put back online even if the cpufreq driver is unable to work with them (eg. due to missing information from platform firmware), which was the previous behavior expected by users, but changed in the 4.9 time frame (Chen Yu). - Fix a few minor issues in the turbostat utility, introduced mostly during the recent update of it (Len Brown, Doug Smythies). - Fix a cpupower utility bug causing it to report incorrect values for turbo frequencies in some cases (Ben Hutchings)" * tag 'pm-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores cpufreq: Bring CPUs up even if cpufreq_online() failed tools/power turbostat: update version number tools/power turbostat: fix impossibly large CPU%c1 value tools/power turbostat: turbostat.8 add missing column definitions tools/power turbostat: update HWP dump to decimal from hex tools/power turbostat: enable package THERM_INTERRUPT dump tools/power turbostat: show missing Core and GFX power on SKL and KBL tools/power turbostat: bugfix: GFXMHz column not changing commit 321ae379af3d7707c31c8b3170308ade7faa199f Merge: 1882e56 f83e13f Author: Linus Torvalds Date: Fri Apr 14 09:05:42 2017 -0700 Merge tag 'acpi-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert a recent ACPICA commit that turned out to be problematic and fix a device enumeration breakage from the 4.8 cycle. Specifics: - Revert a recent ACPICA commit targeted at catching firmware bugs which promptly did that and caused functional problems to appear (Rafael Wysocki). - Fix a device enumeration problem introduced in the 4.8 time frame which caused the ACPI docking station driver to report incorrect status via sysfs among other things (Rafael Wysocki)" * tag 'acpi-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPICA: Resources: Not a valid resource if buffer length too long" ACPI / scan: Set the visited flag for all enumerated devices commit 1882e562d37c8d4ed01a7ee7161c04fbaa428565 Merge: 7873933 a4866aa Author: Linus Torvalds Date: Fri Apr 14 08:57:20 2017 -0700 Merge tag 'devmem-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull CONFIG_STRICT_DEVMEM fix from Kees Cook: "Fixes /dev/mem to read back zeros for System RAM areas in the 1MB exception area on x86 to avoid exposing RAM or tripping hardened usercopy" * tag 'devmem-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: mm: Tighten x86 /dev/mem with zeroing reads commit 787393338557456d2ad2dd49c45080624e39cbe5 Merge: a232591 2f8dc3a Author: Linus Torvalds Date: Fri Apr 14 08:49:39 2017 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael S. Tsirkin: "virtio oops fixes The virtio pci rework using shared interrupts caused a lot of issues. We tried to fix them but run out of time. Revert for now, and revisit the issue for the next kernel. Luckily we are able to do this without loosing automatic interrupt NUMA affinity which was the main motivator for the rework" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio-pci: Remove affinity hint before freeing the interrupt Revert "virtio_pci: remove struct virtio_pci_vq_info" Revert "virtio_pci: use shared interrupts for virtqueues" Revert "virtio_pci: don't duplicate the msix_enable flag in struct pci_dev" Revert "virtio_pci: simplify MSI-X setup" Revert "virtio_pci: fix out of bound access for msix_names" MAINTAINERS: fix virtio file pattern virtio_console: fix uninitialized variable use virtio_net: clear MTU when out of range virtio: allow drivers to validate features virtio_net: enable big packets for large MTU values commit f4c13c8ec56e70eeff3e365e0c5fcdad16845b32 Merge: 14cf4a7 fe50543 Author: David S. Miller Date: Fri Apr 14 10:47:13 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Missing TCP header sanity check in TCPMSS target, from Eric Dumazet. 2) Incorrect event message type for related conntracks created via ctnetlink, from Liping Zhang. 3) Fix incorrect rcu locking when handling helpers from ctnetlink, from Gao feng. 4) Fix missing rcu locking when updating helper, from Liping Zhang. 5) Fix missing read_lock_bh when iterating over list of device addresses from TPROXY and redirect, also from Liping. 6) Fix crash when trying to dump expectations from conntrack with no helper via ctnetlink, from Liping. 7) Missing RCU protection to expecation list update given ctnetlink iterates over the list under rcu read lock side, from Liping too. 8) Don't dump autogenerated seed in nft_hash to userspace, this is very confusing to the user, again from Liping. 9) Fix wrong conntrack netns module refcount in ipt_CLUSTERIP, from Gao feng. ==================== Signed-off-by: David S. Miller commit e68d490def9f7d726eea6dc62ebd692af64ec8b5 Author: Aaro Koskinen Date: Fri Apr 14 13:38:32 2017 +0200 fbdev: omapfb: delete check_required_callbacks() Commit 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional") made panel callbacks optional but forgot to update check_required_callbacks(). As a result many (all?) OMAP systems using omapfb will crash at boot. Fix by deleting the whole function. Fixes: 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional") Signed-off-by: Aaro Koskinen Cc: Tomi Valkeinen Cc: Lars-Peter Clausen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/omapfb_main.c | 15 --------------- 1 file changed, 15 deletions(-) commit f83e13f94e14d27c9610f917e40e23a6c2bbeaf0 Merge: f406270 1315f01 Author: Rafael J. Wysocki Date: Fri Apr 14 13:11:43 2017 +0200 Merge branches 'acpi-scan-fixes' and 'acpica-fixes' * acpi-scan-fixes: ACPI / scan: Set the visited flag for all enumerated devices * acpica-fixes: Revert "ACPICA: Resources: Not a valid resource if buffer length too long" commit 66803c946ee6065bc49a7f029b0a48d93467f228 Merge: c4a3fa2 4cca045 Author: Rafael J. Wysocki Date: Fri Apr 14 13:11:09 2017 +0200 Merge branches 'pm-cpufreq-fixes' and 'pm-tools-fixes' * pm-cpufreq-fixes: cpufreq: Bring CPUs up even if cpufreq_online() failed * pm-tools-fixes: cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores tools/power turbostat: update version number tools/power turbostat: fix impossibly large CPU%c1 value tools/power turbostat: turbostat.8 add missing column definitions tools/power turbostat: update HWP dump to decimal from hex tools/power turbostat: enable package THERM_INTERRUPT dump tools/power turbostat: show missing Core and GFX power on SKL and KBL tools/power turbostat: bugfix: GFXMHz column not changing commit 34a477e5297cbaa6ecc6e17c042a866e1cbe80d6 Author: Josh Poimboeuf Date: Thu Apr 13 17:53:55 2017 -0500 ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram On x86-32, with CONFIG_FIRMWARE and multiple CPUs, if you enable function graph tracing and then suspend to RAM, it will triple fault and reboot when it resumes. The first fault happens when booting a secondary CPU: startup_32_smp() load_ucode_ap() prepare_ftrace_return() ftrace_graph_is_dead() (accesses 'kill_ftrace_graph') The early head_32.S code calls into load_ucode_ap(), which has an an ftrace hook, so it calls prepare_ftrace_return(), which calls ftrace_graph_is_dead(), which tries to access the global 'kill_ftrace_graph' variable with a virtual address, causing a fault because the CPU is still in real mode. The fix is to add a check in prepare_ftrace_return() to make sure it's running in protected mode before continuing. The check makes sure the stack pointer is a virtual kernel address. It's a bit of a hack, but it's not very intrusive and it works well enough. For reference, here are a few other (more difficult) ways this could have potentially been fixed: - Move startup_32_smp()'s call to load_ucode_ap() down to *after* paging is enabled. (No idea what that would break.) - Track down load_ucode_ap()'s entire callee tree and mark all the functions 'notrace'. (Probably not realistic.) - Pause graph tracing in ftrace_suspend_notifier_call() or bringup_cpu() or __cpu_up(), and ensure that the pause facility can be queried from real mode. Reported-by: Paul Menzel Signed-off-by: Josh Poimboeuf Tested-by: Paul Menzel Reviewed-by: Steven Rostedt (VMware) Cc: "Rafael J . Wysocki" Cc: linux-acpi@vger.kernel.org Cc: Borislav Petkov Cc: stable@kernel.org Cc: Len Brown Link: http://lkml.kernel.org/r/5c1272269a580660703ed2eccf44308e790c7a98.1492123841.git.jpoimboe@redhat.com Signed-off-by: Thomas Gleixner arch/x86/kernel/ftrace.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a8983d01f9b7d600fbdb3916899edf395954cc83 Author: Greg Kroah-Hartman Date: Fri Apr 14 10:57:52 2017 +0200 Revert "tty: don't panic on OOM in tty_set_ldisc()" This reverts commit 5362544bebe85071188dd9e479b5a5040841c895 as it is reported to cause a reproducable crash. Fixes: 5362544bebe8 ("tty: don't panic on OOM in tty_set_ldisc()") Reported-by: Vegard Nossum Cc: Dmitry Vyukov Cc: Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Hurley Cc: One Thousand Gnomes Cc: Linus Torvalds Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org drivers/tty/tty_ldisc.c | 85 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 16 deletions(-) commit 75eb5e1e7b4edbc8e8f930de59004d21cb46961f Author: Tyler Baker Date: Thu Apr 13 15:27:31 2017 -0700 irqchip/irq-imx-gpcv2: Fix spinlock initialization The raw_spinlock in the IMX GPCV2 interupt chip is not initialized before usage. That results in a lockdep splat: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Add the missing raw_spin_lock_init() to the setup code. Fixes: e324c4dc4a59 ("irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources") Signed-off-by: Tyler Baker Reviewed-by: Fabio Estevam Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: shawnguo@kernel.org Cc: andrew.smirnov@gmail.com Cc: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170413222731.5917-1-tyler.baker@linaro.org Signed-off-by: Thomas Gleixner drivers/irqchip/irq-imx-gpcv2.c | 2 ++ 1 file changed, 2 insertions(+) commit f2200ac311302fcdca6556fd0c5127eab6c65a3e Author: Peter Zijlstra Date: Tue Apr 11 10:10:28 2017 +0200 perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32() When the perf_branch_entry::{in_tx,abort,cycles} fields were added, intel_pmu_lbr_read_32() wasn't updated to initialize them. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: Fixes: 135c5612c460 ("perf/x86/intel: Support Haswell/v4 LBR format") Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 3 +++ 1 file changed, 3 insertions(+) commit dfb00a56935186171abb5280b3407c3f910011f1 Author: Takashi Sakamoto Date: Fri Apr 14 12:43:01 2017 +0900 ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type An abstraction of asynchronous transaction for transmission of MIDI messages was introduced in Linux v4.4. Each driver can utilize this abstraction to transfer MIDI messages via fixed-length payload of transaction to a certain unit address. Filling payload of the transaction is done by callback. In this callback, each driver can return negative error code, however current implementation assigns the return value to unsigned variable. This commit changes type of the variable to fix the bug. Reported-by: Julia Lawall Cc: # 4.4+ Fixes: 585d7cba5e1f ("ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a232591ba289a1a397e0005c9f276a126c1bc1b1 Merge: d8a6e3a 5714320 Author: Linus Torvalds Date: Thu Apr 13 20:08:33 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "11 fixes. The presence of 'thp: reduce indentation level in change_huge_pmd()' is unfortunate. But the patchset had been decently reviewed and tested before we decided it was needed in -stable and I felt it best not to churn things at the last minute" * emailed patches from Andrew Morton : mailmap: add Martin Kepplinger's email zsmalloc: expand class bit zram: do not use copy_page with non-page aligned address zram: fix operator precedence to get offset hugetlbfs: fix offset overflow in hugetlbfs mmap thp: fix MADV_DONTNEED vs clear soft dirty race thp: fix MADV_DONTNEED vs. MADV_FREE race mm: drop unused pmdp_huge_get_and_clear_notify() thp: fix MADV_DONTNEED vs. numa balancing race thp: reduce indentation level in change_huge_pmd() z3fold: fix page locking in z3fold_alloc() commit e7661a8e5ce10b5321882d0bbaf3f81070903319 Author: Johannes Thumshirn Date: Wed Apr 12 09:21:19 2017 +0200 scsi: return correct blkprep status code in case scsi_init_io() fails. When instrumenting the SCSI layer to run into the !blk_rq_nr_phys_segments(rq) case the following warning emitted from the block layer: blk_peek_request: bad return=-22 This happens because since commit fd3fc0b4d730 ("scsi: don't BUG_ON() empty DMA transfers") we return the wrong error value from scsi_prep_fn() back to the block layer. [mkp: silenced checkpatch] Signed-off-by: Johannes Thumshirn Fixes: fd3fc0b4d730 scsi: don't BUG_ON() empty DMA transfers Cc: Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5714320d316ae6e830bfc463bfdaf288695f6b62 Author: Martin Kepplinger Date: Thu Apr 13 14:56:43 2017 -0700 mailmap: add Martin Kepplinger's email Set the partly deprecated companies' email addresses as alias for the personal one. Link: http://lkml.kernel.org/r/1491984622-17321-1-git-send-email-martin.kepplinger@ginzinger.com Signed-off-by: Martin Kepplinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 85d492f28d056c40629fc25d79f54da618a29dc4 Author: Minchan Kim Date: Thu Apr 13 14:56:40 2017 -0700 zsmalloc: expand class bit Now 64K page system, zsamlloc has 257 classes so 8 class bit is not enough. With that, it corrupts the system when zsmalloc stores 65536byte data(ie, index number 256) so that this patch increases class bit for simple fix for stable backport. We should clean up this mess soon. index size 0 32 1 288 .. .. 204 52256 256 65536 Fixes: 3783689a1 ("zsmalloc: introduce zspage structure") Link: http://lkml.kernel.org/r/1492042622-12074-3-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d72e9a7a93e4f8e9e52491921d99e0c8aa89eb4e Author: Minchan Kim Date: Thu Apr 13 14:56:37 2017 -0700 zram: do not use copy_page with non-page aligned address The copy_page is optimized memcpy for page-alinged address. If it is used with non-page aligned address, it can corrupt memory which means system corruption. With zram, it can happen with 1. 64K architecture 2. partial IO 3. slub debug Partial IO need to allocate a page and zram allocates it via kmalloc. With slub debug, kmalloc(PAGE_SIZE) doesn't return page-size aligned address. And finally, copy_page(mem, cmem) corrupts memory. So, this patch changes it to memcpy. Actuaully, we don't need to change zram_bvec_write part because zsmalloc returns page-aligned address in case of PAGE_SIZE class but it's not good to rely on the internal of zsmalloc. Note: When this patch is merged to stable, clear_page should be fixed, too. Unfortunately, recent zram removes it by "same page merge" feature so it's hard to backport this patch to -stable tree. I will handle it when I receive the mail from stable tree maintainer to merge this patch to backport. Fixes: 42e99bd ("zram: optimize memory operations with clear_page()/copy_page()") Link: http://lkml.kernel.org/r/1492042622-12074-2-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ca82dabc9fbf7bc5322aa54d802cb3cb7b125c5 Author: Minchan Kim Date: Thu Apr 13 14:56:35 2017 -0700 zram: fix operator precedence to get offset In zram_rw_page, the logic to get offset is wrong by operator precedence (i.e., "<<" is higher than "&"). With wrong offset, zram can corrupt the user's data. This patch fixes it. Fixes: 8c7f01025 ("zram: implement rw_page operation of zram") Link: http://lkml.kernel.org/r/1492042622-12074-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 045c7a3f53d9403b62d396b6d051c4be5044cdb4 Author: Mike Kravetz Date: Thu Apr 13 14:56:32 2017 -0700 hugetlbfs: fix offset overflow in hugetlbfs mmap If mmap() maps a file, it can be passed an offset into the file at which the mapping is to start. Offset could be a negative value when represented as a loff_t. The offset plus length will be used to update the file size (i_size) which is also a loff_t. Validate the value of offset and offset + length to make sure they do not overflow and appear as negative. Found by syzcaller with commit ff8c0c53c475 ("mm/hugetlb.c: don't call region_abort if region_chg fails") applied. Prior to this commit, the overflow would still occur but we would luckily return ENOMEM. To reproduce: mmap(0, 0x2000, 0, 0x40021, 0xffffffffffffffffULL, 0x8000000000000000ULL); Resulted in, kernel BUG at mm/hugetlb.c:742! Call Trace: hugetlbfs_evict_inode+0x80/0xa0 evict+0x24a/0x620 iput+0x48f/0x8c0 dentry_unlink_inode+0x31f/0x4d0 __dentry_kill+0x292/0x5e0 dput+0x730/0x830 __fput+0x438/0x720 ____fput+0x1a/0x20 task_work_run+0xfe/0x180 exit_to_usermode_loop+0x133/0x150 syscall_return_slowpath+0x184/0x1c0 entry_SYSCALL_64_fastpath+0xab/0xad Fixes: ff8c0c53c475 ("mm/hugetlb.c: don't call region_abort if region_chg fails") Link: http://lkml.kernel.org/r/1491951118-30678-1-git-send-email-mike.kravetz@oracle.com Reported-by: Vegard Nossum Signed-off-by: Mike Kravetz Acked-by: Hillf Danton Cc: Dmitry Vyukov Cc: Michal Hocko Cc: "Kirill A . Shutemov" Cc: Andrey Ryabinin Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 5b7abeae3af8c08c577e599dd0578b9e3ee6687b Author: Kirill A. Shutemov Date: Thu Apr 13 14:56:28 2017 -0700 thp: fix MADV_DONTNEED vs clear soft dirty race Yet another instance of the same race. Fix is identical to change_huge_pmd(). See "thp: fix MADV_DONTNEED vs. numa balancing race" for more details. Link: http://lkml.kernel.org/r/20170302151034.27829-5-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 58ceeb6bec86d9140f9d91d71a710e963523d063 Author: Kirill A. Shutemov Date: Thu Apr 13 14:56:26 2017 -0700 thp: fix MADV_DONTNEED vs. MADV_FREE race Both MADV_DONTNEED and MADV_FREE handled with down_read(mmap_sem). It's critical to not clear pmd intermittently while handling MADV_FREE to avoid race with MADV_DONTNEED: CPU0: CPU1: madvise_free_huge_pmd() pmdp_huge_get_and_clear_full() madvise_dontneed() zap_pmd_range() pmd_trans_huge(*pmd) == 0 (without ptl) // skip the pmd set_pmd_at(); // pmd is re-established It results in MADV_DONTNEED skipping the pmd, leaving it not cleared. It violates MADV_DONTNEED interface and can result is userspace misbehaviour. Basically it's the same race as with numa balancing in change_huge_pmd(), but a bit simpler to mitigate: we don't need to preserve dirty/young flags here due to MADV_FREE functionality. [kirill.shutemov@linux.intel.com: Urgh... Power is special again] Link: http://lkml.kernel.org/r/20170303102636.bhd2zhtpds4mt62a@black.fi.intel.com Link: http://lkml.kernel.org/r/20170302151034.27829-4-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Minchan Kim Cc: Minchan Kim Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c0c379e2931b05facef538e53bf3b21f283d9a0b Author: Kirill A. Shutemov Date: Thu Apr 13 14:56:23 2017 -0700 mm: drop unused pmdp_huge_get_and_clear_notify() Dave noticed that after fixing MADV_DONTNEED vs numa balancing race the last pmdp_huge_get_and_clear_notify() user is gone. Let's drop the helper. Link: http://lkml.kernel.org/r/20170306112047.24809-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Dave Hansen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmu_notifier.h | 13 ------------- 1 file changed, 13 deletions(-) commit ced108037c2aa542b3ed8b7afd1576064ad1362a Author: Kirill A. Shutemov Date: Thu Apr 13 14:56:20 2017 -0700 thp: fix MADV_DONTNEED vs. numa balancing race In case prot_numa, we are under down_read(mmap_sem). It's critical to not clear pmd intermittently to avoid race with MADV_DONTNEED which is also under down_read(mmap_sem): CPU0: CPU1: change_huge_pmd(prot_numa=1) pmdp_huge_get_and_clear_notify() madvise_dontneed() zap_pmd_range() pmd_trans_huge(*pmd) == 0 (without ptl) // skip the pmd set_pmd_at(); // pmd is re-established The race makes MADV_DONTNEED miss the huge pmd and don't clear it which may break userspace. Found by code analysis, never saw triggered. Link: http://lkml.kernel.org/r/20170302151034.27829-3-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 0a85e51d37645e9ce57e5e1a30859e07810ed07c Author: Kirill A. Shutemov Date: Thu Apr 13 14:56:17 2017 -0700 thp: reduce indentation level in change_huge_pmd() Patch series "thp: fix few MADV_DONTNEED races" For MADV_DONTNEED to work properly with huge pages, it's critical to not clear pmd intermittently unless you hold down_write(mmap_sem). Otherwise MADV_DONTNEED can miss the THP which can lead to userspace breakage. See example of such race in commit message of patch 2/4. All these races are found by code inspection. I haven't seen them triggered. I don't think it's worth to apply them to stable@. This patch (of 4): Restructure code in preparation for a fix. Link: http://lkml.kernel.org/r/20170302151034.27829-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 76e32a2a084ed71b48179023cd8fdb3787c8a6ad Author: Vitaly Wool Date: Thu Apr 13 14:56:14 2017 -0700 z3fold: fix page locking in z3fold_alloc() Stress testing of the current z3fold implementation on a 8-core system revealed it was possible that a z3fold page deleted from its unbuddied list in z3fold_alloc() would be put on another unbuddied list by z3fold_free() while z3fold_alloc() is still processing it. This has been introduced with commit 5a27aa822 ("z3fold: add kref refcounting") due to the removal of special handling of a z3fold page not on any list in z3fold_free(). To fix this, the z3fold page lock should be taken in z3fold_alloc() before the pool lock is released. To avoid deadlocking, we just try to lock the page as soon as we get a hold of it, and if trylock fails, we drop this page and take the next one. Signed-off-by: Vitaly Wool Cc: Dan Streetman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d8a6e3aed955342dd68dd72e0feaf2cd32be683b Author: Jan Beulich Date: Thu Apr 13 11:06:00 2017 -0700 ia64: restore symbol versions for symbols defined in assembly The ia64 build generates many warnings like this: WARNING: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. Besides adding the necessary header this also requires fiddling with some explicit .S -> .o rules. Cc: IA64-ML Signed-off-by: Jan Beulich Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds arch/ia64/include/asm/asm-prototypes.h | 29 +++++++++++++++++++++++++++++ arch/ia64/lib/Makefile | 16 ++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) commit 3412386b531244f24a27c79ee003506a52a00848 Author: Keith Busch Date: Thu Apr 13 13:28:12 2017 -0400 irq/affinity: Fix extra vecs calculation This fixes a math error calculating the extra_vecs. The error assumed only 1 cpu per vector, but the value needs to account for the actual number of cpus per vector in order to get the correct remainder for extra CPU assignment. Fixes: 7bf8222b9bd0 ("irq/affinity: Fix CPU spread for unbalanced nodes") Reported-by: Xiaolong Ye Signed-off-by: Keith Busch Link: http://lkml.kernel.org/r/1492104492-19943-1-git-send-email-keith.busch@intel.com Signed-off-by: Thomas Gleixner kernel/irq/affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe50543c194e2e1aee2f3eba41fcafd187b3dbde Author: Gao Feng Date: Thu Apr 6 09:45:22 2017 +0800 netfilter: ipt_CLUSTERIP: Fix wrong conntrack netns refcnt usage Current codes invoke wrongly nf_ct_netns_get in the destroy routine, it should use nf_ct_netns_put, not nf_ct_netns_get. It could cause some modules could not be unloaded. Fixes: ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put") Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79e09ef96b6a5fb888f5241f3aa707e9ad0b1cce Author: Liping Zhang Date: Mon Apr 3 16:34:38 2017 +0800 netfilter: nft_hash: do not dump the auto generated seed This can prevent the nft utility from printing out the auto generated seed to the user, which is unnecessary and confusing. Fixes: cb1b69b0b15b ("netfilter: nf_tables: add hash expression") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 14cf4a771b3098e431d2677e3533bdd962e478d8 Author: Daniele Palmas Date: Mon Apr 10 17:34:23 2017 +0200 drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201 Telit LE920A4 uses the same pid 0x1201 of LE920, but modem implementation is different, since it requires DTR to be set for answering to qmi messages. This patch replaces QMI_FIXED_INTF with QMI_QUIRK_SET_DTR: tests on LE920 have been performed in order to verify backward compatibility. Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1315f01632da417f1f27074bc6631df8eaf223bb Author: Rafael J. Wysocki Date: Thu Apr 13 18:14:55 2017 +0200 Revert "ACPICA: Resources: Not a valid resource if buffer length too long" Revert commit 57707a9a7780 (ACPICA: Resources: Not a valid resource if buffer length too long) as it is reported to prevent the TPM module from loading on Lenovo X60 with Coreboot. It also causes new confusing warnings to show up in the kernel log. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195311 Reported-by: Paul Menzel Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utresrc.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 2760078203a6b46b96307f4b06030ab0b801c97e Merge: ee921c7 7036502 Author: Linus Torvalds Date: Thu Apr 13 09:08:29 2017 -0700 Merge tag 'pinctrl-v4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two pin control fixes arriving late, these are hopefully the last pin control fixes I send this kernel cycle. A Chromebook and an Exynos SoC thingie. The Exynos patch is pretty big, it is fixing unbroken a breakage caused by yours truly when trying to figure out the merge mess with the different Samsung platforms for this merge window. Sorry about that. We have countered this situation by assigning a Samsung pin control submaintainer to catch stuff earlier. Summary: - Make the Acer Chromebook keyboard work again with the Intel Cherryview driver. - Fix a merge error in the Exynos 5433 driver" * tag 'pinctrl-v4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again pinctrl: samsung: Add missing part for PINCFG_TYPE_DRV of Exynos5433 commit 05b7278d510a6a1c23624caee5b0a9667a72e745 Author: Olga Kornievskaia Date: Thu Mar 23 14:36:20 2017 -0400 nfsd: fix oops on unsupported operation I'm hitting the BUG in nfsd4_max_reply() at fs/nfsd/nfs4proc.c:2495 when client sends an operation the server doesn't support. in nfsd4_max_reply() it checks for NULL rsize_bop but a non-supported operation wouldn't have that set. Cc: Kinglong Mee Fixes: 2282cd2c05e2 "NFSD: Get response size before operation..." Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67dbea2ce6873f8ba57988ba3e608e8bf61c347f Author: Pavel Shilovsky Date: Wed Apr 12 13:32:07 2017 -0700 CIFS: Fix SMB3 mount without specifying a security mechanism Commit ef65aaede23f ("smb2: Enforce sec= mount option") changed the behavior of a mount command to enforce a specified security mechanism during mounting. On another hand according to the spec if SMB3 server doesn't respond with a security context it implies that it supports NTLMSSP. The current code doesn't keep it in mind and fails a mount for such servers if no security mechanism is specified. Fix this by indicating that a server supports NTLMSSP if a security context isn't returned during negotiate phase. This allows the code to use NTLMSSP by default for SMB3 mounts. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4cca0457686e4ee1677d69469e4ddfd94d389a80 Author: Ben Hutchings Date: Tue Apr 11 00:29:44 2017 +0100 cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores The switch that conditionally sets CPUPOWER_CAP_HAS_TURBO_RATIO and CPUPOWER_CAP_IS_SNB flags is missing a break, so all cores get both flags set and an assumed base clock of 100 MHz for turbo values. Reported-by: GSR Tested-by: GSR References: https://bugs.debian.org/859978 Fixes: 8fb2e440b223 (cpupower: Show Intel turbo ratio support via ...) Signed-off-by: Ben Hutchings Signed-off-by: Rafael J. Wysocki tools/power/cpupower/utils/helpers/cpuid.c | 1 + 1 file changed, 1 insertion(+) commit ad0d9c3bca6722824284c0243708d7f7d511465c Merge: 39da7c5 5f9bf02 Author: Rafael J. Wysocki Date: Thu Apr 13 14:50:11 2017 +0200 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat utility fixes for v4.11 from Len Brown. * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: update version number tools/power turbostat: fix impossibly large CPU%c1 value tools/power turbostat: turbostat.8 add missing column definitions tools/power turbostat: update HWP dump to decimal from hex tools/power turbostat: enable package THERM_INTERRUPT dump tools/power turbostat: show missing Core and GFX power on SKL and KBL tools/power turbostat: bugfix: GFXMHz column not changing commit 9e478066eae41211c92a8f63cc69aafc391bd6ab Author: Johannes Berg Date: Thu Apr 13 14:23:49 2017 +0200 mac80211: fix MU-MIMO follow-MAC mode There are two bugs in the follow-MAC code: * it treats the radiotap header as the 802.11 header (therefore it can't possibly work) * it doesn't verify that the skb data it accesses is actually present in the header, which is mitigated by the first point Fix this by moving all of this out into a separate function. This function copies the data it needs using skb_copy_bits() to make sure it can be accessed if it's paged, and offsets that by the possibly present vendor radiotap header. This also makes all those conditions more readable. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/rx.c | 65 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 18 deletions(-) commit 4e7655fd4f47c23e5249ea260dc802f909a64611 Author: Takashi Iwai Date: Sun Apr 9 10:41:27 2017 +0200 ALSA: seq: Don't break snd_use_lock_sync() loop by timeout The snd_use_lock_sync() (thus its implementation snd_use_lock_sync_helper()) has the 5 seconds timeout to break out of the sync loop. It was introduced from the beginning, just to be "safer", in terms of avoiding the stupid bugs. However, as Ben Hutchings suggested, this timeout rather introduces a potential leak or use-after-free that was apparently fixed by the commit 2d7d54002e39 ("ALSA: seq: Fix race during FIFO resize"): for example, snd_seq_fifo_event_in() -> snd_seq_event_dup() -> copy_from_user() could block for a long time, and snd_use_lock_sync() goes timeout and still leaves the cell at releasing the pool. For fixing such a problem, we remove the break by the timeout while still keeping the warning. Suggested-by: Ben Hutchings Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_lock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 372fa10172a2f9e1bfbc70778449628e82b72341 Author: Chen-Yu Tsai Date: Thu Apr 13 10:13:53 2017 +0800 clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change This patch utilizes the new PLL clk notifier to gate then ungate the PLL CPU clock after rate changes. This should mitigate the system hangs observed after the introduction of cpufreq for the A33. Signed-off-by: Chen-Yu Tsai Tested-by: Quentin Schulz Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 02ae2bc6febd90cf3de61b6a1bdf491966ed410f Author: Chen-Yu Tsai Date: Thu Apr 13 10:13:52 2017 +0800 clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks In common PLL designs, changes to the dividers take effect almost immediately, while changes to the multipliers (implemented as dividers in the feedback loop) take a few cycles to work into the feedback loop for the PLL to stablize. Sometimes when the PLL clock rate is changed, the decrease in the divider is too much for the decrease in the multiplier to catch up. The PLL clock rate will spike, and in some cases, might lock up completely. This is especially the case if the divider changed is the pre-divider, which affects the reference frequency. This patch introduces a clk notifier callback that will gate and then ungate a clk after a rate change, effectively resetting it, so it continues to work, despite any possible lockups. Care must be taken to reparent any consumers to other temporary clocks during the rate change, and that this notifier callback must be the first to be registered. This is intended to fix occasional lockups with cpufreq on newer Allwinner SoCs, such as the A33 and the H3. Previously it was thought that reparenting the cpu clock away from the PLL while it stabilized was enough, as this worked quite well on the A31. On the A33, hangs have been observed after cpufreq was recently introduced. With the H3, a more thorough test [1] showed that reparenting alone isn't enough. The system still locks up unless the dividers are limited to 1. A hunch was if the PLL was stuck in some unknown state, perhaps gating then ungating it would bring it back to normal. Tests done by Icenowy Zheng using Ondrej's test firmware shows this to be a valid solution. [1] http://www.spinics.net/lists/arm-kernel/msg552501.html Reported-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Tested-by: Icenowy Zheng Tested-by: Quentin Schulz Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_common.c | 49 +++++++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu_common.h | 12 ++++++++++ 2 files changed, 61 insertions(+) commit e87741ac6c578b240409a8114b9350a58b0f9e93 Author: Tobias Regnery Date: Mon Apr 10 14:15:44 2017 +0200 clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver The ccu-sun9i-a80 driver uses the ccu_mult_ops struct, but unlike the other users it doesen't select the corresponding Kconfig symbol under which the struct is compiled in. This results in the following link error with CONFIG_SUN9I_A80_CCU=y and CONFIG_SUNXI_CCU_MULT=n: drivers/built-in.o:(.data+0x2d638): undefined reference to 'ccu_mult_ops' Fix this by explicitly selecting CONFIG_SUNXI_CCU_MULT like the other users of the struct. Signed-off-by: Tobias Regnery Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit aa01338c018469274848a973bcbd287ef341937c Author: Tobias Regnery Date: Mon Mar 27 11:57:53 2017 +0200 clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER With CONFIG_RESET_CONTROLLER=n we get the following link error in the sunxi-ng clk driver: drivers/built-in.o: In function `sunxi_ccu_probe': mux-core.c:(.text+0x12fe68): undefined reference to 'reset_controller_register' mux-core.c:(.text+0x12fe68): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'reset_controller_register' Fix this by adding the appropriate select statement. Signed-off-by: Tobias Regnery Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ee921c762cf90652add60ebacb5b90636ac108df Merge: 827c30a 2ca62d8 Author: Linus Torvalds Date: Wed Apr 12 23:36:23 2017 -0700 Merge tag 'drm-fixes-for-v4.11-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "i915, gvt, nouveau, udl and etnaviv fixes. I was away the end of last week, so some of these would have been in rc6, and it's Easter from tomorrow, so I decided I better dequeue what I have now. The nouveau changes, just add a hw enable for GP107 display (like a pci id addition really), and fix a couple of regressions. i915 has some more gvt fixes, along with a few run of the mill ones, the rcu one seems like a few people have hit it. Otherwise a small udl and small etnaviv fix" * tag 'drm-fixes-for-v4.11-rc7' of git://people.freedesktop.org/~airlied/linux: (22 commits) drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit() drm/udl: Fix unaligned memory access in udl_render_hline drm/i915: Don't call synchronize_rcu_expedited under struct_mutex drm/i915: Suspend GuC prior to GPU Reset during GEM suspend drm/nouveau: initial support (display-only) for GP107 drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane state drm/nouveau/kms/nv50: fix setting of HeadSetRasterVertBlankDmi method drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one drm/nouveau/mpeg: mthd returns true on success now drm/i915/gvt: set the correct default value of CTX STATUS PTR drm/i915/gvt: Fix firmware loading interface for GVT-g golden HW state drm/i915: Use a dummy timeline name for a signaled fence drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex drm/i915/gvt: remove the redundant info NULL check drm/i915/gvt: adjust mem size for low resolution type drm/i915: Avoid lock dropping between rescheduling drm/i915/gvt: exclude cfg space from failsafe mode drm/i915/gvt: Activate/de-activate vGPU in mdev ops. drm/i915/execlists: Wrap tail pointer after reset tweaking drm/i915/perf: remove user triggerable warn ... commit 827c30a758392d00ce46d5d0c0a243cdecf5826e Merge: b9b3322 a900152 Author: Linus Torvalds Date: Wed Apr 12 23:29:45 2017 -0700 Merge tag 'pwm/for-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "This contain a fix for the atomic update support recently added to the Rockchip driver where the clock reference count would become unbalanced and result in the clock feeding the PWM to always be disabled. Another fix to the Intel LPSS driver that adds an update bit quirk required for a specific configuration" * tag 'pwm/for-4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: rockchip: State of PWM clock should synchronize with PWM enabled state pwm: lpss: Set enable-bit before waiting for update-bit to go low pwm: lpss: Split Tangier configuration commit 6f6266a561306e206e0e31a5038f029b6a7b1d89 Author: Omar Sandoval Date: Wed Apr 12 16:27:19 2017 +0100 x86/efi: Don't try to reserve runtime regions Reserving a runtime region results in splitting the EFI memory descriptors for the runtime region. This results in runtime region descriptors with bogus memory mappings, leading to interesting crashes like the following during a kexec: general protection fault: 0000 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1 #53 Hardware name: Wiwynn Leopard-Orv2/Leopard-DDR BW, BIOS LBM05 09/30/2016 RIP: 0010:virt_efi_set_variable() ... Call Trace: efi_delete_dummy_variable() efi_enter_virtual_mode() start_kernel() ? set_init_arg() x86_64_start_reservations() x86_64_start_kernel() start_cpu() ... Kernel panic - not syncing: Fatal exception Runtime regions will not be freed and do not need to be reserved, so skip the memmap modification in this case. Signed-off-by: Omar Sandoval Signed-off-by: Matt Fleming Cc: # v4.9+ Cc: Ard Biesheuvel Cc: Dave Young Cc: Linus Torvalds Cc: Peter Jones Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 8e80632fb23f ("efi/esrt: Use efi_mem_reserve() and avoid a kmalloc()") Link: http://lkml.kernel.org/r/20170412152719.9779-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit f406270bf73d71ea7b35ee3f7a08a44f6594c9b1 Author: Rafael J. Wysocki Date: Tue Apr 11 00:23:42 2017 +0200 ACPI / scan: Set the visited flag for all enumerated devices Commit 10c7e20b2ff3 (ACPI / scan: fix enumeration (visited) flags for bus rescans) attempted to fix a problem with ACPI-based enumerateion of I2C/SPI devices, but it forgot to ensure that the visited flag will be set for all of the other enumerated devices, so fix that. Fixes: 10c7e20b2ff3 (ACPI / scan: fix enumeration (visited) flags for bus rescans) Link: https://bugzilla.kernel.org/show_bug.cgi?id=194885 Reported-and-tested-by: Kevin Locke Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Cc: 4.8+ # 4.8+ drivers/acpi/scan.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit c4a3fa261b16858416f1fd7db03a33d7ef5fc0b3 Author: Chen Yu Date: Sun Apr 9 13:45:16 2017 +0800 cpufreq: Bring CPUs up even if cpufreq_online() failed There is a report that after commit 27622b061eb4 ("cpufreq: Convert to hotplug state machine"), the normal CPU offline/online cycle fails on some platforms. According to the ftrace result, this problem was triggered on platforms using acpi-cpufreq as the default cpufreq driver, and due to the lack of some ACPI freq method (eg. _PCT), cpufreq_online() failed and returned a negative value, so the CPU hotplug state machine rolled back the CPU online process. Actually, from the user's perspective, the failure of cpufreq_online() should not prevent that CPU from being brought up, although cpufreq might not work on that CPU. BTW, during system startup cpufreq_online() is not invoked via CPU online but by the cpufreq device creation process, so the APs can be brought up even though cpufreq_online() fails in that stage. This patch ignores the return value of cpufreq_online/offline() and lets the cpufreq framework deal with the failure. cpufreq_online() itself will do a proper rollback in that case and if _PCT is missing, the ACPI cpufreq driver will print a warning if the corresponding debug options have been enabled. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=194581 Fixes: 27622b061eb4 ("cpufreq: Convert to hotplug state machine") Reported-and-tested-by: Tomasz Maciej Nowak Signed-off-by: Chen Yu Acked-by: Viresh Kumar Cc: 4.9+ # 4.9+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5f9bf02a58f0f62d111994805212d0a775499862 Author: Len Brown Date: Sat Mar 4 17:26:29 2017 -0500 tools/power turbostat: update version number Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95149369c1c28b10f7318dfde54018ab107277d0 Author: Len Brown Date: Wed Apr 12 19:44:51 2017 -0400 tools/power turbostat: fix impossibly large CPU%c1 value Most CPUs do not have a hardware c1 counter, and so turbostat derives c1 residency: c1 = TSC - MPERF - other_core_cstate_counters As it is not possible to atomically read these coutners, measurement jitter can case this calcuation to "go negative" when very close to 0. Turbostat detect that case and simply prints c1 = 0.00% But that check neglected to account for systems where the TSC crystal clock domain and the MPERF BCLK domain are differ by a small amount. That allowed very small negative c1 numbers to escape this check and be printed as huge positve numbers. This code begs for a bit of cleanup, but this patch is the minimal change to fix the issue. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab23d1146a8e7bd045507fe8a380827dc03e056d Author: Doug Smythies Date: Sat Mar 4 14:48:49 2017 -0800 tools/power turbostat: turbostat.8 add missing column definitions Add GFX%rc6 and GFXMHz to the column descriptions section of the turbostat man page. Signed-off-by: Doug Smythies Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 ++ 1 file changed, 2 insertions(+) commit 6dbd25a24599db07d88a805615bad1f4d48a5749 Author: Len Brown Date: Sat Mar 4 18:18:28 2017 -0500 tools/power turbostat: update HWP dump to decimal from hex Syntax only. The HWP CAPABILTIES and REQUEST ratios are more easily viewed in decimal -- just multiply by 100 and you get MHz... new: cpu0: MSR_HWP_CAPABILITIES: 0x010c1b23 (high 35 guar 27 eff 12 low 1) cpu0: MSR_HWP_REQUEST: 0x80002301 (min 1 max 35 des 0 epp 0x80 window 0x0 pkg 0x0) old: cpu0: MSR_HWP_CAPABILITIES: 0x010c1b23 (high 0x23 guar 0x1b eff 0xc low 0x1) cpu0: MSR_HWP_REQUEST: 0x80002301 (min 0x1 max 0x23 des 0x0 epp 0x80 window 0x0 pkg 0x0) Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f4896fa502b81c5bce93f375bd17b14725c01826 Author: Len Brown Date: Sat Mar 4 18:10:45 2017 -0500 tools/power turbostat: enable package THERM_INTERRUPT dump cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00641400 (100 C) cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x884b0800 (25 C) cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C) Enable the same per-core output, but hide it behind --debug because it is too verbose on big systems. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 818249216d7dc9340a7d2332f6d07b462e818ee5 Author: Len Brown Date: Sat Mar 4 17:23:07 2017 -0500 tools/power turbostat: show missing Core and GFX power on SKL and KBL While the current SDM is silent on the matter, the Core and GFX RAPL power meters on SKL and KBL appear to work -- so show them. Reported-by: Yaroslav Isakov Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ca62d8a606a95e098799f128f6a40a6300d2a2a Merge: 88b0b92 da2ba56 Author: Dave Airlie Date: Thu Apr 13 09:56:05 2017 +1000 Merge branch 'linux-4.11' of git://github.com/skeggsb/linux into drm-fixes GP107 modesetting support (just recognising the chipset, no other changes until 4.12) a couple of regression fixes, one of them a rather serious double-free issue that appeared in 4.10. * 'linux-4.11' of git://github.com/skeggsb/linux: drm/nouveau: initial support (display-only) for GP107 drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane state drm/nouveau/kms/nv50: fix setting of HeadSetRasterVertBlankDmi method drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one drm/nouveau/mpeg: mthd returns true on success now commit 88b0b92bdaadfc43b11dc4172219ff0972673790 Merge: 97d93f3 c053b5a Author: Dave Airlie Date: Thu Apr 13 09:13:04 2017 +1000 Merge tag 'drm-intel-fixes-2017-04-12' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.11-rc7 one rcu related fix, and a few GVT fixes. * tag 'drm-intel-fixes-2017-04-12' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Don't call synchronize_rcu_expedited under struct_mutex drm/i915: Suspend GuC prior to GPU Reset during GEM suspend drm/i915/gvt: set the correct default value of CTX STATUS PTR drm/i915/gvt: Fix firmware loading interface for GVT-g golden HW state drm/i915: Use a dummy timeline name for a signaled fence drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex drm/i915/gvt: remove the redundant info NULL check drm/i915/gvt: adjust mem size for low resolution type drm/i915: Avoid lock dropping between rescheduling drm/i915/gvt: exclude cfg space from failsafe mode drm/i915/gvt: Activate/de-activate vGPU in mdev ops. drm/i915/execlists: Wrap tail pointer after reset tweaking drm/i915/perf: remove user triggerable warn drm/i915/perf: destroy stream on sample_flags mismatch drm/i915: Align "unfenced" tiled access on gen2, early gen3 commit 97d93f35493f39c2b79e3379b30c17a2d00ec19d Merge: c7aae62 0c45b36 Author: Dave Airlie Date: Thu Apr 13 09:12:26 2017 +1000 Merge tag 'drm-misc-fixes-2017-04-11' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes drm-misc-fixes for 2017-04-11 Core changes: - None Driver changes - udl: Fix unaligned memory access on SPARC (Jonathan) * tag 'drm-misc-fixes-2017-04-11' of git://anongit.freedesktop.org/git/drm-misc: drm/udl: Fix unaligned memory access in udl_render_hline commit c7aae6221f73312bb66464c353eb45d91433aea1 Merge: 39da7c5 45abdf3 Author: Dave Airlie Date: Thu Apr 13 09:11:24 2017 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes Single etnaviv error path fix. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit() commit edb0b6a0b4490014924d56c4c7117c7c8fc608ca Author: Mathias Kresin Date: Sun Mar 26 19:05:36 2017 +0200 MIPS: PCI: add controllers before the specified head With commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") new controllers are added after the specified head where they where added before the specified head previously. Use list_add_tail to restore the former order. This patches fixes the following PCI error on lantiq: pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000) Fixes: 23dac14d058f ("MIPS: PCI: Use struct list_head lists") Signed-off-by: Mathias Kresin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15808/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11e63f6d920d6f2dfd3cd421e939a4aec9a58dcd Author: Dan Williams Date: Thu Apr 6 09:04:31 2017 -0700 x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions Before we rework the "pmem api" to stop abusing __copy_user_nocache() for memcpy_to_pmem() we need to fix cases where we may strand dirty data in the cpu cache. The problem occurs when copy_from_iter_pmem() is used for arbitrary data transfers from userspace. There is no guarantee that these transfers, performed by dax_iomap_actor(), will have aligned destinations or aligned transfer lengths. Backstop the usage __copy_user_nocache() with explicit cache management in these unaligned cases. Yes, copy_from_iter_pmem() is now too big for an inline, but addressing that is saved for a later patch that moves the entirety of the "pmem api" into the pmem driver directly. Fixes: 5de490daec8b ("pmem: add copy_from_iter_pmem() and clear_pmem()") Cc: Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Matthew Wilcox Reviewed-by: Ross Zwisler Signed-off-by: Toshi Kani Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit 956a4cd2c957acf638ff29951aabaa9d8e92bbc2 Author: Dan Williams Date: Fri Apr 7 16:42:08 2017 -0700 device-dax: switch to srcu, fix rcu_read_lock() vs pte allocation The following warning triggers with a new unit test that stresses the device-dax interface. =============================== [ ERR: suspicious RCU usage. ] 4.11.0-rc4+ #1049 Tainted: G O ------------------------------- ./include/linux/rcupdate.h:521 Illegal context switch in RCU read-side critical section! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 0 2 locks held by fio/9070: #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x167/0x4f0 #1: (rcu_read_lock){......}, at: [] dax_dev_huge_fault+0x32/0x620 [dax] Call Trace: dump_stack+0x86/0xc3 lockdep_rcu_suspicious+0xd7/0x110 ___might_sleep+0xac/0x250 __might_sleep+0x4a/0x80 __alloc_pages_nodemask+0x23a/0x360 alloc_pages_current+0xa1/0x1f0 pte_alloc_one+0x17/0x80 __pte_alloc+0x1e/0x120 __get_locked_pte+0x1bf/0x1d0 insert_pfn.isra.70+0x3a/0x100 ? lookup_memtype+0xa6/0xd0 vm_insert_mixed+0x64/0x90 dax_dev_huge_fault+0x520/0x620 [dax] ? dax_dev_huge_fault+0x32/0x620 [dax] dax_dev_fault+0x10/0x20 [dax] __do_fault+0x1e/0x140 __handle_mm_fault+0x9af/0x10d0 handle_mm_fault+0x16d/0x370 ? handle_mm_fault+0x47/0x370 __do_page_fault+0x28c/0x4f0 trace_do_page_fault+0x58/0x2a0 do_async_page_fault+0x1a/0xa0 async_page_fault+0x28/0x30 Inserting a page table entry may trigger an allocation while we are holding a read lock to keep the device instance alive for the duration of the fault. Use srcu for this keep-alive protection. Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Cc: Signed-off-by: Dan Williams drivers/dax/Kconfig | 1 + drivers/dax/dax.c | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 162b270c664dca2e0944308e92f9fcc887151a72 Author: James Hogan Date: Thu Mar 30 16:06:02 2017 +0100 MIPS: KGDB: Use kernel context for sleeping threads KGDB is a kernel debug stub and it can't be used to debug userland as it can only safely access kernel memory. On MIPS however KGDB has always got the register state of sleeping processes from the userland register context at the beginning of the kernel stack. This is meaningless for kernel threads (which never enter userland), and for user threads it prevents the user seeing what it is doing while in the kernel: (gdb) info threads Id Target Id Frame ... 3 Thread 2 (kthreadd) 0x0000000000000000 in ?? () 2 Thread 1 (init) 0x000000007705c4b4 in ?? () 1 Thread -2 (shadowCPU0) 0xffffffff8012524c in arch_kgdb_breakpoint () at arch/mips/kernel/kgdb.c:201 Get the register state instead from the (partial) kernel register context stored in the task's thread_struct for resume() to restore. All threads now correctly appear to be in context_switch(): (gdb) info threads Id Target Id Frame ... 3 Thread 2 (kthreadd) context_switch (rq=, cookie=..., next=, prev=0x0) at kernel/sched/core.c:2903 2 Thread 1 (init) context_switch (rq=, cookie=..., next=, prev=0x0) at kernel/sched/core.c:2903 1 Thread -2 (shadowCPU0) 0xffffffff8012524c in arch_kgdb_breakpoint () at arch/mips/kernel/kgdb.c:201 Call clobbered registers which aren't saved and exception registers (BadVAddr & Cause) which can't be easily determined without stack unwinding are reported as 0. The PC is taken from the return address, such that the state presented matches that found immediately after returning from resume(). Fixes: 8854700115ec ("[MIPS] kgdb: add arch support for the kernel's kgdb core") Signed-off-by: James Hogan Cc: Jason Wessel Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15829/ Signed-off-by: Ralf Baechle arch/mips/kernel/kgdb.c | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) commit bac06cf0fb9dfd79877a4eaa2ec7c09a6b853ffa Author: Matt Redfearn Date: Fri Mar 31 11:51:08 2017 +0100 MIPS: smp-cps: Fix potentially uninitialised value of core Turning on DEBUG in smp-cps.c, or compiling the kernel with CONFIG_DYNAMIC_DEBUG enabled results the build error: arch/mips/kernel/smp-cps.c: In function 'play_dead': ./include/linux/dynamic_debug.h:126:3: error: 'core' may be used uninitialized in this function [-Werror=maybe-uninitialized] Fix this by always initialising the variable. Fixes: 0d2808f338c7 ("MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors") Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Masahiro Yamada Cc: Paul Burton Cc: Ingo Molnar Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15848/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a4866aa812518ed1a37d8ea0c881dc946409de94 Author: Kees Cook Date: Wed Apr 5 09:39:08 2017 -0700 mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and then read by things like x86info or dd, which would trip hardened usercopy: usercopy: kernel memory exposure attempt detected from ffff880000090000 (dma-kmalloc-256) (4096 bytes) This changes the x86 exception for the low 1MB by reading back zeros for System RAM areas instead of blindly allowing them. More work is needed to extend this to mmap, but currently mmap doesn't go through usercopy, so hardened usercopy won't Oops the kernel. Reported-by: Tommi Rantala Tested-by: Tommi Rantala Signed-off-by: Kees Cook arch/x86/mm/init.c | 41 +++++++++++++++++++-------- drivers/char/mem.c | 82 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 82 insertions(+), 41 deletions(-) commit a2d6cbb0670d54806f18192cb0db266b4a6d285a Author: Rabin Vincent Date: Mon Apr 10 08:36:39 2017 +0200 ipv6: Fix idev->addr_list corruption addrconf_ifdown() removes elements from the idev->addr_list without holding the idev->lock. If this happens while the loop in __ipv6_dev_get_saddr() is handling the same element, that function ends up in an infinite loop: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 23s! [test:1719] Call Trace: ipv6_get_saddr_eval+0x13c/0x3a0 __ipv6_dev_get_saddr+0xe4/0x1f0 ipv6_dev_get_saddr+0x1b4/0x204 ip6_dst_lookup_tail+0xcc/0x27c ip6_dst_lookup_flow+0x38/0x80 udpv6_sendmsg+0x708/0xba8 sock_sendmsg+0x18/0x30 SyS_sendto+0xb8/0xf8 syscall_common+0x34/0x58 Fixes: 6a923934c33 (Revert "ipv6: Revert optional address flusing on ifdown.") Signed-off-by: Rabin Vincent Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b9c1153f7a9cb2d53b845615a0edd510f7fe8341 Author: Dongdong Liu Date: Thu Mar 23 21:18:17 2017 +0800 PCI: hisi: Fix DT binding (hisi-pcie-almost-ecam) The "hisilicon,pcie-almost-ecam" binding goes against the usual DT conventions, and is non-sensical in that it describes the IP based on what it isn't. Fix the DT binding with "hisilicon,hip06-pcie-ecam" and "hisilicon,hip07-pcie-ecam". Signed-off-by: Mark Rutland Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Documentation/devicetree/bindings/pci/hisilicon-pcie.txt | 10 ++++++++-- drivers/pci/dwc/pcie-hisi.c | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit 45abdf35cf82e4270328c7237e7812de960ac560 Author: Wei Yongjun Date: Wed Apr 12 00:31:16 2017 +0000 drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit() Add the missing unlock before return from function etnaviv_gpu_submit() in the error handling case. lst: fixed label name. Fixes: f3cd1b064f11 ("drm/etnaviv: (re-)protect fence allocation with GPU mutex") CC: stable@vger.kernel.org #4.9+ Signed-off-by: Wei Yongjun Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec62a3bd84df90a19b7d59d032fa807bbfea7cbb Author: Matt Redfearn Date: Fri Mar 31 11:51:33 2017 +0100 MIPS: KASLR: Add missing header files After the split of linux/sched.h, KASLR stopped building. Fix this by including the correct header file for init_thread_union Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Marcin Nowakowski Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15849/ Signed-off-by: Ralf Baechle arch/mips/kernel/relocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df7dd8fc965c665e83b71a649378cdf200ff36df Author: Johannes Berg Date: Wed Apr 12 09:32:07 2017 +0200 net: xdp: don't export dev_change_xdp_fd() Since dev_change_xdp_fd() is only used in rtnetlink, which must be built-in, there's no reason to export dev_change_xdp_fd(). Signed-off-by: Johannes Berg Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/dev.c | 1 - 1 file changed, 1 deletion(-) commit 0e1bfea999daa27c801b19617a6ef8b8ec4adc75 Merge: 0917ac4 785a470 Author: James Bottomley Date: Wed Apr 12 07:29:17 2017 -0700 Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes commit c46f59e90226fa5bfcc83650edebe84ae47d454b Author: James Cowgill Date: Tue Apr 11 13:51:07 2017 +0100 MIPS: Avoid BUG warning in arch_check_elf arch_check_elf contains a usage of current_cpu_data that will call smp_processor_id() with preemption enabled and therefore triggers a "BUG: using smp_processor_id() in preemptible" warning when an fpxx executable is loaded. As a follow-up to commit b244614a60ab ("MIPS: Avoid a BUG warning during prctl(PR_SET_FP_MODE, ...)"), apply the same fix to arch_check_elf by using raw_current_cpu_data instead. The rationale quoted from the previous commit: "It is assumed throughout the kernel that if any CPU has an FPU, then all CPUs would have an FPU as well, so it is safe to perform the check with preemption enabled - change the code to use raw_ variant of the check to avoid the warning." Fixes: 46490b572544 ("MIPS: kernel: elf: Improve the overall ABI and FPU mode checks") Signed-off-by: James Cowgill CC: # 4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15951/ Signed-off-by: Ralf Baechle arch/mips/kernel/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0211327f068901ce654ba78951c35bc69fdc1de Author: James Cowgill Date: Tue Apr 11 13:51:08 2017 +0100 MIPS: Fix modversioning of _mcount symbol In commit 827456e71036 ("MIPS: Export _mcount alongside its definition") the EXPORT_SYMBOL macro exporting _mcount was moved from C code into assembly. Unlike C, exported assembly symbols need to have a function prototype in asm/asm-prototypes.h for modversions to work properly. Without this, modpost prints out this warning: WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. Fix by including asm/ftrace.h (where _mcount is declared) in asm/asm-prototypes.h. Fixes: 827456e71036 ("MIPS: Export _mcount alongside its definition") Signed-off-by: James Cowgill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15952/ Signed-off-by: Ralf Baechle arch/mips/include/asm/asm-prototypes.h | 1 + 1 file changed, 1 insertion(+) commit b9b3322f13f350587f17f0a76f008830e3a420d3 Merge: 025def9 264d509 Author: Linus Torvalds Date: Wed Apr 12 00:02:33 2017 -0700 Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit Pull audit fix from Paul Moore: "One more small audit fix, this should be the last for v4.11. Seth Forshee noticed a problem where the audit retry queue wasn't being flushed properly when audit was enabled and the audit daemon wasn't running; this patches fixes the problem (see the commit description for more details on the change). Both Seth and I have tested this and everything looks good" * 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit: audit: make sure we don't let the retry queue grow without bounds commit 025def92dd6b5b84b0d6d9069e2bb24e51e48c17 Merge: 06ea4c3 a5d68ba Author: Linus Torvalds Date: Tue Apr 11 23:51:58 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "There has been work in a number of different areas over the last weeks, including: - Fix target-core-user (TCMU) back-end bi-directional handling (Xiubo Li + Mike Christie + Ilias Tsitsimpis) - Fix iscsi-target TMR reference leak during session shutdown (Rob Millner + Chu Yuan Lin) - Fix target_core_fabric_configfs.c race between LUN shutdown + mapped LUN creation (James Shen) - Fix target-core unknown fabric callback queue-full errors (Potnuri Bharat Teja) - Fix iscsi-target + iser-target queue-full handling in order to support iw_cxgb4 RNICs. (Potnuri Bharat Teja + Sagi Grimberg) - Fix ALUA transition state race between multiple initiator (Mike Christie) - Drop work-around for legacy GlobalSAN initiator, to allow QLogic 57840S + 579xx offload HBAs to work out-of-the-box in MSFT environments. (Martin Svec + Arun Easi) Note that a number are CC'ed for stable, and although the queue-full bug-fixes required for iser-target to work with iw_cxgb4 aren't CC'ed here, they'll be posted to Greg-KH separately" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case iscsi-target: Drop work-around for legacy GlobalSAN initiator target: Fix ALUA transition state race between multiple initiators iser-target: avoid posting a recv buffer twice iser-target: Fix queue-full response handling iscsi-target: Propigate queue_data_in + queue_status errors target: Fix unknown fabric callback queue-full errors tcmu: Fix wrongly calculating of the base_command_size tcmu: Fix possible overwrite of t_data_sg's last iov[] target: Avoid mappedlun symlink creation during lun shutdown iscsi-target: Fix TMR reference leak during session shutdown usb: gadget: Correct usb EP argument for BOT status request tcmu: Allow cmd_time_out to be set to zero (disabled) commit 06ea4c38bce80f3eb99b01d7c17419eb1a49fec2 Merge: af94bdf bfb0b80 Author: Linus Torvalds Date: Tue Apr 11 23:38:16 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "This contains fixes for two long standing subtle bugs: - kthread_bind() on a new kthread binds it to specific CPUs and prevents userland from messing with the affinity or cgroup membership. Unfortunately, for cgroup membership, there's a window between kthread creation and kthread_bind*() invocation where the kthread can be moved into a non-root cgroup by userland. Depending on what controllers are in effect, this can assign the kthread unexpected attributes. For example, in the reported case, workqueue workers ended up in a non-root cpuset cgroups and had their CPU affinities overridden. This broke workqueue invariants and led to workqueue stalls. Fixed by closing the window between kthread creation and kthread_bind() as suggested by Oleg. - There was a bug in cgroup mount path which could allow two competing mount attempts to attach the same cgroup_root to two different superblocks. This was caused by mishandling return value from kernfs_pin_sb(). Fixed" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: avoid attaching a cgroup root to two different superblocks cgroup, kthread: close race window where new kthreads can be migrated to non-root cgroups commit af94bdfa798b7da92cc82609acca61a287a004a4 Merge: fe251c4 3cf8645 Author: Linus Torvalds Date: Tue Apr 11 23:36:46 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Two libata fixes. One to disable hotplug on VT6420 which never worked properly. The other reverts an earlier patch which disabled the second port on SB600/700. There were some confusions due to earlier datasheets which incorrectly indicated that the second port is not implemented on both SB600 and 700" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: sata_via: Enable hotplug only on VT6421 Revert "pata_atiixp: Don't use unconnected secondary port on SB600/SB700" commit fe251c4b9a272af45983ebc7dd538789e78fcf2e Merge: c08e611 84379d8 Author: Linus Torvalds Date: Tue Apr 11 23:35:14 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - revert of a commit that switched all Synaptics touchpads over to be driven by hid-rmi. It turns out that this caused several user-visible regressions, and therefore we revert back to the original state before all the reported issues have been fixed. - a new uclogic device ID addition, from Xiaolei Yu. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: Revert "HID: rmi: Handle all Synaptics touchpads using hid-rmi" HID: uclogic: add support for Ugee Tablet EX07S commit a8f60d1fadf7b8b54449fcc9d6b15248917478ba Author: Christian Borntraeger Date: Sun Apr 9 22:09:38 2017 +0200 s390/mm: fix CMMA vs KSM vs others On heavy paging with KSM I see guest data corruption. Turns out that KSM will add pages to its tree, where the mapping return true for pte_unused (or might become as such later). KSM will unmap such pages and reinstantiate with different attributes (e.g. write protected or special, e.g. in replace_page or write_protect_page)). This uncovered a bug in our pagetable handling: We must remove the unused flag as soon as an entry becomes present again. Cc: stable@vger.kernel.org Signed-of-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) commit fc9c89b19c56813434c3d2967652a4fa6906926a Merge: 96a94cc 5b8d542 Author: David S. Miller Date: Tue Apr 11 22:22:45 2017 -0400 Merge branch 'bridge-register-netdev-before-changelink' Ido Schimmel says: ==================== bridge: Fix kernel oops during bridge creation First patch adds a missing ndo_uninit() in the bridge driver, which is a prerequisite for the second patch that actually fixes the oops. Please consider both patches for 4.4.y, 4.9.y and 4.10.y ==================== Signed-off-by: David S. Miller commit 5b8d5429daa05bebef6ffd3297df3b502cc6f184 Author: Ido Schimmel Date: Mon Apr 10 14:59:28 2017 +0300 bridge: netlink: register netdevice before executing changelink Peter reported a kernel oops when executing the following command: $ ip link add name test type bridge vlan_default_pvid 1 [13634.939408] BUG: unable to handle kernel NULL pointer dereference at 0000000000000190 [13634.939436] IP: __vlan_add+0x73/0x5f0 [...] [13634.939783] Call Trace: [13634.939791] ? pcpu_next_unpop+0x3b/0x50 [13634.939801] ? pcpu_alloc+0x3d2/0x680 [13634.939810] ? br_vlan_add+0x135/0x1b0 [13634.939820] ? __br_vlan_set_default_pvid.part.28+0x204/0x2b0 [13634.939834] ? br_changelink+0x120/0x4e0 [13634.939844] ? br_dev_newlink+0x50/0x70 [13634.939854] ? rtnl_newlink+0x5f5/0x8a0 [13634.939864] ? rtnl_newlink+0x176/0x8a0 [13634.939874] ? mem_cgroup_commit_charge+0x7c/0x4e0 [13634.939886] ? rtnetlink_rcv_msg+0xe1/0x220 [13634.939896] ? lookup_fast+0x52/0x370 [13634.939905] ? rtnl_newlink+0x8a0/0x8a0 [13634.939915] ? netlink_rcv_skb+0xa1/0xc0 [13634.939925] ? rtnetlink_rcv+0x24/0x30 [13634.939934] ? netlink_unicast+0x177/0x220 [13634.939944] ? netlink_sendmsg+0x2fe/0x3b0 [13634.939954] ? _copy_from_user+0x39/0x40 [13634.939964] ? sock_sendmsg+0x30/0x40 [13634.940159] ? ___sys_sendmsg+0x29d/0x2b0 [13634.940326] ? __alloc_pages_nodemask+0xdf/0x230 [13634.940478] ? mem_cgroup_commit_charge+0x7c/0x4e0 [13634.940592] ? mem_cgroup_try_charge+0x76/0x1a0 [13634.940701] ? __handle_mm_fault+0xdb9/0x10b0 [13634.940809] ? __sys_sendmsg+0x51/0x90 [13634.940917] ? entry_SYSCALL_64_fastpath+0x1e/0xad The problem is that the bridge's VLAN group is created after setting the default PVID, when registering the netdevice and executing its ndo_init(). Fix this by changing the order of both operations, so that br_changelink() is only processed after the netdevice is registered, when the VLAN group is already initialized. Fixes: b6677449dff6 ("bridge: netlink: call br_changelink() during br_dev_newlink()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel Reported-by: Peter V. Saveliev Tested-by: Peter V. Saveliev Signed-off-by: David S. Miller net/bridge/br_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b6fe0440c63716e09cfc0d1484e3898a0f29d1d1 Author: Ido Schimmel Date: Mon Apr 10 14:59:27 2017 +0300 bridge: implement missing ndo_uninit() While the bridge driver implements an ndo_init(), it was missing a symmetric ndo_uninit(), causing the different de-initialization operations to be scattered around its dellink() and destructor(). Implement a symmetric ndo_uninit() and remove the overlapping operations from its dellink() and destructor(). This is a prerequisite for the next patch, as it allows us to have a proper cleanup upon changelink() failure during the bridge's newlink(). Fixes: b6677449dff6 ("bridge: netlink: call br_changelink() during br_dev_newlink()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller net/bridge/br_device.c | 20 +++++++++++--------- net/bridge/br_if.c | 1 - net/bridge/br_multicast.c | 7 +++++-- net/bridge/br_private.h | 5 +++++ 4 files changed, 21 insertions(+), 12 deletions(-) commit 785a470496d8e0a32e3d39f376984eb2c98ca5b3 Author: Mauricio Faria de Oliveira Date: Tue Apr 11 11:46:04 2017 -0300 scsi: ipr: do not set DID_PASSTHROUGH on CHECK CONDITION On a dual controller setup with multipath enabled, some MEDIUM ERRORs caused both paths to be failed, thus I/O got queued/blocked since the 'queue_if_no_path' feature is enabled by default on IPR controllers. This example disabled 'queue_if_no_path' so the I/O failure is seen at the sg_dd program. Notice that after the sg_dd test-case, both paths are in 'failed' state, and both path/priority groups are in 'enabled' state (not 'active') -- which would block I/O with 'queue_if_no_path'. # sg_dd if=/dev/dm-2 bs=4096 count=1 dio=1 verbose=4 blk_sgio=0 <...> read(unix): count=4096, res=-1 sg_dd: reading, skip=0 : Input/output error <...> # dmesg [...] sd 2:2:16:0: [sds] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [...] sd 2:2:16:0: [sds] Sense Key : Medium Error [current] [...] sd 2:2:16:0: [sds] Add. Sense: Unrecovered read error - recommend rewrite the data [...] sd 2:2:16:0: [sds] CDB: Read(10) 28 00 00 00 00 00 00 00 20 00 [...] blk_update_request: I/O error, dev sds, sector 0 [...] device-mapper: multipath: Failing path 65:32. <...> [...] device-mapper: multipath: Failing path 65:224. # multipath -l 1IBM_IPR-0_59C2AE0000001F80 dm-2 IBM ,IPR-0 59C2AE00 size=5.2T features='0' hwhandler='1 alua' wp=rw |-+- policy='service-time 0' prio=0 status=enabled | `- 2:2:16:0 sds 65:32 failed undef running `-+- policy='service-time 0' prio=0 status=enabled `- 1:2:7:0 sdae 65:224 failed undef running This is not the desired behavior. The dm-multipath explicitly checks for the MEDIUM ERROR case (and a few others) so not to fail the path (e.g., I/O to other sectors could potentially happen without problems). See dm-mpath.c :: do_end_io_bio() -> noretry_error() !->! fail_path(). The problem trace is: 1) ipr_scsi_done() // SENSE KEY/CHECK CONDITION detected, go to.. 2) ipr_erp_start() // ipr_is_gscsi() and masked_ioasc OK, go to.. 3) ipr_gen_sense() // masked_ioasc is IPR_IOASC_MED_DO_NOT_REALLOC, // so set DID_PASSTHROUGH. 4) scsi_decide_disposition() // check for DID_PASSTHROUGH and return // early on, faking a DID_OK.. *instead* // of reaching scsi_check_sense(). // Had it reached the latter, that would // set host_byte to DID_MEDIUM_ERROR. 5) scsi_finish_command() 6) scsi_io_completion() 7) __scsi_error_from_host_byte() // That would be converted to -ENODATA <...> 8) dm_softirq_done() 9) multipath_end_io() 10) do_end_io() 11) noretry_error() // And that is checked in dm-mpath :: noretry_error() // which would cause fail_path() not to be called. With this patch applied, the I/O is failed but the paths are not. This multipath device continues accepting more I/O requests without blocking. (and notice the different host byte/driver byte handling per SCSI layer). # dmesg [...] sd 2:2:7:0: [sdaf] Done: SUCCESS Result: hostbyte=0x13 driverbyte=DRIVER_OK [...] sd 2:2:7:0: [sdaf] CDB: Read(10) 28 00 00 00 00 00 00 00 40 00 [...] sd 2:2:7:0: [sdaf] Sense Key : Medium Error [current] [...] sd 2:2:7:0: [sdaf] Add. Sense: Unrecovered read error - recommend rewrite the data [...] blk_update_request: critical medium error, dev sdaf, sector 0 [...] blk_update_request: critical medium error, dev dm-6, sector 0 [...] sd 2:2:7:0: [sdaf] Done: SUCCESS Result: hostbyte=0x13 driverbyte=DRIVER_OK [...] sd 2:2:7:0: [sdaf] CDB: Read(10) 28 00 00 00 00 00 00 00 10 00 [...] sd 2:2:7:0: [sdaf] Sense Key : Medium Error [current] [...] sd 2:2:7:0: [sdaf] Add. Sense: Unrecovered read error - recommend rewrite the data [...] blk_update_request: critical medium error, dev sdaf, sector 0 [...] blk_update_request: critical medium error, dev dm-6, sector 0 [...] Buffer I/O error on dev dm-6, logical block 0, async page read # multipath -l 1IBM_IPR-0_59C2AE0000001F80 1IBM_IPR-0_59C2AE0000001F80 dm-6 IBM ,IPR-0 59C2AE00 size=5.2T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw |-+- policy='service-time 0' prio=0 status=active | `- 2:2:7:0 sdaf 65:240 active undef running `-+- policy='service-time 0' prio=0 status=enabled `- 1:2:7:0 sdh 8:112 active undef running Signed-off-by: Mauricio Faria de Oliveira Acked-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 911e572e98656056ebbbb4274d8fe61434188646 Author: Guilherme G. Piccoli Date: Thu Apr 6 18:12:09 2017 -0300 scsi: aacraid: fix PCI error recovery path During a PCI error recovery, if aac_check_health() is not aware that a PCI error happened and we have an offline PCI channel, it might trigger some errors (like NULL pointer dereference) and inhibit the error recovery process to complete. This patch makes the health check procedure aware of PCI channel issues, and in case of error recovery process, the function aac_adapter_check_health() returns -1 and let the recovery process to complete successfully. This patch was tested on upstream kernel v4.11-rc5 in PowerPC ppc64le architecture with adapter 9005:028d (VID:DID) - the error recovery procedure was able to recover fine. Fixes: 5c63f7f710bd ("aacraid: Added EEH support") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Guilherme G. Piccoli Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 11 ++++++++--- drivers/scsi/aacraid/commsup.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) commit 0718b334068475d5eac4e25f1a88981880917f1d Merge: c08e611 3c1a427 Author: Ingo Molnar Date: Tue Apr 11 21:41:39 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.11-20170411' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull 'perf annotate' fix for s390: - The move to support cross arch annotation introduced per arch initialization requirements, fullfill them for s/390 (Christian Borntraeger) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit b6e38b2944f1153199becefb14ae3ee01778863e Author: Mousumi Jana Date: Tue Apr 11 13:06:22 2017 +0530 ASoC: topology: Fix to store enum text values Add missing enum texts store in soc_enum. Signed-off-by: Mousumi Jana Signed-off-by: Pardha Saradhi K Signed-off-by: Kranthikumar, GudishaX Signed-off-by: Subhransu S. Prusty Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 1 + 1 file changed, 1 insertion(+) commit a967efb30b3afa3d858edd6a17f544f9e9e46eea Author: Liu Bo Date: Mon Apr 10 12:36:26 2017 -0700 Btrfs: fix potential use-after-free for cloned bio KASAN reports that there is a use-after-free case of bio in btrfs_map_bio. If we need to submit IOs to several disks at a time, the original bio would get cloned and mapped to the destination disk, but we really should use the original bio instead of a cloned bio to do the sanity check because cloned bios are likely to be freed by its endio. Reported-by: Diego Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97bf5a5589aa3a59c60aa775fc12ec0483fc5002 Author: Liu Bo Date: Fri Apr 7 13:11:10 2017 -0700 Btrfs: fix segmentation fault when doing dio read Commit 2dabb3248453 ("Btrfs: Direct I/O read: Work on sectorsized blocks") introduced this bug during iterating bio pages in dio read's endio hook, and it could end up with segment fault of the dio reading task. So the reason is 'if (nr_sectors--)', and it makes the code assume that there is one more block in the same page, so page offset is increased and the bio which is created to repair the bad block then has an incorrect bvec.bv_offset, and a later access of the page content would throw a segmentation fault. This also adds ASSERT to check page offset against page size. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2e949b0a5592664f8b3eb3e2e48213f514892561 Author: Liu Bo Date: Wed Apr 5 14:04:19 2017 -0700 Btrfs: fix invalid dereference in btrfs_retry_endio When doing directIO repair, we have this oops: [ 1458.532816] general protection fault: 0000 [#1] SMP ... [ 1458.536291] Workqueue: btrfs-endio-repair btrfs_endio_repair_helper [btrfs] [ 1458.536893] task: ffff88082a42d100 task.stack: ffffc90002b3c000 [ 1458.537499] RIP: 0010:btrfs_retry_endio+0x7e/0x1a0 [btrfs] ... [ 1458.543261] Call Trace: [ 1458.543958] ? rcu_read_lock_sched_held+0xc4/0xd0 [ 1458.544374] bio_endio+0xed/0x100 [ 1458.544750] end_workqueue_fn+0x3c/0x40 [btrfs] [ 1458.545257] normal_work_helper+0x9f/0x900 [btrfs] [ 1458.545762] btrfs_endio_repair_helper+0x12/0x20 [btrfs] [ 1458.546224] process_one_work+0x34d/0xb70 [ 1458.546570] ? process_one_work+0x29e/0xb70 [ 1458.546938] worker_thread+0x1cf/0x960 [ 1458.547263] ? process_one_work+0xb70/0xb70 [ 1458.547624] kthread+0x17d/0x180 [ 1458.547909] ? kthread_create_on_node+0x70/0x70 [ 1458.548300] ret_from_fork+0x31/0x40 It turns out that btrfs_retry_endio is trying to get inode from a directIO page. This fixes the problem by using the saved inode pointer, done->inode. btrfs_retry_endio_nocsum has the same problem, and it's fixed as well. Also cleanup unused @start (which is too trivial for a separate patch). Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 951e7966398b0fd6bacebec2d87ffd61c3f68b18 Author: Adam Borowski Date: Fri Mar 31 17:19:04 2017 +0200 btrfs: drop the nossd flag when remounting with -o ssd The opposite case was already handled right in the very next switch entry. And also when turning on nossd, drop ssd_spread. Reported-by: Hans van Kranenburg Signed-off-by: Adam Borowski Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 3 +++ 1 file changed, 3 insertions(+) commit 96a94cc5158859943b7e4e72ae69e572815f5413 Author: Johannes Berg Date: Tue Apr 11 12:10:58 2017 +0200 bpf: reference may_access_skb() from __bpf_prog_run() It took me quite some time to figure out how this was linked, so in order to save the next person the effort of finding it add a comment in __bpf_prog_run() that indicates what exactly determines that a program can access the ctx == skb. Signed-off-by: Johannes Berg Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0c45b36f8acc89cb94c8696a27574f01e0e411dc Author: Jonathan Neuschäfer Date: Fri Apr 7 22:02:29 2017 +0200 drm/udl: Fix unaligned memory access in udl_render_hline On SPARC, the udl driver filled my kernel log with these messages: [186668.910612] Kernel unaligned access at TPC[76609c] udl_render_hline+0x13c/0x3a0 Use put_unaligned_be16 to avoid them. On x86 this results in the same code, but on SPARC the compiler emits two single-byte stores. Signed-off-by: Jonathan Neuschäfer Acked-by: David Airlie Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170407200229.20642-1-j.neuschaefer@gmx.net drivers/gpu/drm/udl/udl_transfer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 337b775b6cf5d093295961c1aa6ac76693b5f847 Author: Marcin Nowakowski Date: Mon Mar 13 15:57:14 2017 +0100 MIPS: generic: fix out-of-tree defconfig target builds When specifying a generic defconfig target with O=... option set, make is invoked in the output location before a target makefile wrapper is created. Ensure that the correct makefile is used by specifying the kernel source makefile during make invocation. This fixes the either of the following errors: $ make sead3_defoncifg ARCH=mips O=test make[1]: Entering directory '/mnt/ssd/MIPS/linux-next/test' make[2]: *** No rule to make target '32r2el_defconfig'. Stop. arch/mips/Makefile:506: recipe for target 'sead3_defconfig' failed make[1]: *** [sead3_defconfig] Error 2 make[1]: Leaving directory '/mnt/ssd/MIPS/linux-next/test' Makefile:152: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 $ make 32r2el_defconfig ARCH=mips O=test make[1]: Entering directory '/mnt/ssd/MIPS/linux-next/test' Using ../arch/mips/configs/generic_defconfig as base Merging ../arch/mips/configs/generic/32r2.config Merging ../arch/mips/configs/generic/el.config Merging ../arch/mips/configs/generic/board-sead-3.config ! ! merged configuration written to .config (needs make) ! make[2]: *** No rule to make target 'olddefconfig'. Stop. arch/mips/Makefile:489: recipe for target '32r2el_defconfig' failed make[1]: *** [32r2el_defconfig] Error 2 make[1]: Leaving directory '/mnt/ssd/MIPS/linux-next/test' Makefile:152: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 Fixes: eed0eabd12ef ('MIPS: generic: Introduce generic DT-based board support') Fixes: 3f5f0a4475e1 ('MIPS: generic: Convert SEAD-3 to a generic board') Signed-off-by: Marcin Nowakowski Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15464/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c053b5a506d3afc038c485a86e3d461f6c7fb207 Author: Joonas Lahtinen Date: Fri Apr 7 13:49:34 2017 +0300 drm/i915: Don't call synchronize_rcu_expedited under struct_mutex Only call synchronize_rcu_expedited after unlocking struct_mutex to avoid deadlock because the workqueues depend on struct_mutex. >From original patch by Andrea: synchronize_rcu/synchronize_sched/synchronize_rcu_expedited() will hang until its own workqueues are run. The i915 gem workqueues will wait on the struct_mutex to be released. So we cannot wait for a quiescent state using those rcu primitives while holding the struct_mutex or it creates a circular lock dependency resulting in kernel hangs (which is reproducible but goes undetected by lockdep). kswapd0 D 0 700 2 0x00000000 Call Trace: ? __schedule+0x1a5/0x660 ? schedule+0x36/0x80 ? _synchronize_rcu_expedited.constprop.65+0x2ef/0x300 ? wake_up_bit+0x20/0x20 ? rcu_stall_kick_kthreads.part.54+0xc0/0xc0 ? rcu_exp_wait_wake+0x530/0x530 ? i915_gem_shrink+0x34b/0x4b0 ? i915_gem_shrinker_scan+0x7c/0x90 ? i915_gem_shrinker_scan+0x7c/0x90 ? shrink_slab.part.61.constprop.72+0x1c1/0x3a0 ? shrink_zone+0x154/0x160 ? kswapd+0x40a/0x720 ? kthread+0xf4/0x130 ? try_to_free_pages+0x450/0x450 ? kthread_create_on_node+0x40/0x40 ? ret_from_fork+0x23/0x30 plasmashell D 0 4657 4614 0x00000000 Call Trace: ? __schedule+0x1a5/0x660 ? schedule+0x36/0x80 ? schedule_preempt_disabled+0xe/0x10 ? __mutex_lock.isra.4+0x1c9/0x790 ? i915_gem_close_object+0x26/0xc0 ? i915_gem_close_object+0x26/0xc0 ? drm_gem_object_release_handle+0x48/0x90 ? drm_gem_handle_delete+0x50/0x80 ? drm_ioctl+0x1fa/0x420 ? drm_gem_handle_create+0x40/0x40 ? pipe_write+0x391/0x410 ? __vfs_write+0xc6/0x120 ? do_vfs_ioctl+0x8b/0x5d0 ? SyS_ioctl+0x3b/0x70 ? entry_SYSCALL_64_fastpath+0x13/0x94 kworker/0:0 D 0 29186 2 0x00000000 Workqueue: events __i915_gem_free_work Call Trace: ? __schedule+0x1a5/0x660 ? schedule+0x36/0x80 ? schedule_preempt_disabled+0xe/0x10 ? __mutex_lock.isra.4+0x1c9/0x790 ? del_timer_sync+0x44/0x50 ? update_curr+0x57/0x110 ? __i915_gem_free_objects+0x31/0x300 ? __i915_gem_free_objects+0x31/0x300 ? __i915_gem_free_work+0x2d/0x40 ? process_one_work+0x13a/0x3b0 ? worker_thread+0x4a/0x460 ? kthread+0xf4/0x130 ? process_one_work+0x3b0/0x3b0 ? kthread_create_on_node+0x40/0x40 ? ret_from_fork+0x23/0x30 Fixes: 3d3d18f086cd ("drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker)") Reported-by: Andrea Arcangeli Signed-off-by: Joonas Lahtinen Cc: Andrea Arcangeli Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Reviewed-by: Chris Wilson (cherry picked from commit 8f612d055183545070ca1009ac2eb1f2e044cc20) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_shrinker.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 63987bfebd8869e00b34e2bdd12e59d71909bec0 Author: Sagar Arun Kamble Date: Wed Apr 5 15:51:50 2017 +0530 drm/i915: Suspend GuC prior to GPU Reset during GEM suspend i915 is currently doing a full GPU reset at the end of i915_gem_suspend() followed by GuC suspend in i915_drm_suspend(). This GPU reset clobbers the GuC, causing the suspend request to then fail, leaving the GuC in an undefined state. We need to tell the GuC to suspend before we do the direct intel_gpu_reset(). v2: Commit message update. (Chris, Daniele) Fixes: 1c777c5d1dcd ("drm/i915/hsw: Fix GPU hang during resume from S3-devices state") Cc: Jeff McGee Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Imre Deak Cc: Mika Kuoppala Signed-off-by: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/1491387710-20553-1-git-send-email-sagar.a.kamble@intel.com Reviewed-by: Daniele Ceraolo Spurio Acked-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit fd08923384385400101c71ac0d21d37d6b23b00d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 2 -- drivers/gpu/drm/i915/i915_gem.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit e5199a37f7ed0effc74d3aaeedd6ce3f816a91d1 Merge: cf082a4 a34f836 Author: Jani Nikula Date: Tue Apr 11 12:51:47 2017 +0300 Merge tag 'gvt-fixes-2017-04-07' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-04-07 - execlist csb initial read ptr fix (Min) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170407084240.4d2ig5ja2umcnsq3@zhen-hp.sh.intel.com commit 84379d83d8e536aef2c706744ff22c136d0be6c9 Author: Jiri Kosina Date: Tue Apr 11 11:10:16 2017 +0200 Revert "HID: rmi: Handle all Synaptics touchpads using hid-rmi" This reverts commit 279967a65b320d174a507498aea7d44db3fee7f4. Multiple regressions [1] [2] [3] have been reported. The hid-rmi support would have to fixed and redone in 4.11+. [1] http://lkml.kernel.org/r/b79b88c8-770a-13f6-5668-c3a94254e5e0@gmail.com [2] http://lkml.kernel.org/r/375e67b5-2cb8-3491-1d71-d8650d6e9451@gmail.com [3] https://bugzilla.kernel.org/show_bug.cgi?id=195287 Reported-by: Cameron Gutman Reported-by: Gabriele Mazzotta Reported-by: Lorenzo J. Lucchini Reported-by: Thorsten Leemhuis Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7036502783729c2aaf7a3c24c89087c58721430f Author: Mika Westerberg Date: Mon Apr 10 13:16:33 2017 +0300 pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again After commit 47c950d10202 ("pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain") the driver does not add all GPIOs to the irqdomain. The reason for that is that those GPIOs cannot generate IRQs at all, only GPEs (General Purpose Events). This causes Linux virtual IRQ numbering to change. However, it seems some CYAN Chromebooks, including Acer Chromebook hardcodes these Linux IRQ numbers in the ACPI tables of the machine. Since the numbering is different now, the IRQ meant for keyboard does not match the Linux virtual IRQ number anymore making the keyboard non-functional. Work this around by adding special quirk just for these machines where we add back all GPIOs to the irqdomain. Rest of the Cherryview/Braswell based machines will not be affected by the change. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945 Fixes: 47c950d10202 ("pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain") Reported-by: Adam S Levy Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 7f00f388712b29005782bad7e4b25942620f3b9c Author: Jiri Olsa Date: Tue Apr 11 09:14:46 2017 +0200 x86/intel_rdt: Fix locking in rdtgroup_schemata_write() The schemata lock is released before freeing the resource's temporary tmp_cbms allocation. That's racy versus another write which allocates and uses new temporary storage, resulting in memory leaks, freeing in use memory, double a free or any combination of those. Move the unlock after the release code. Fixes: 60ec2440c63d ("x86/intel_rdt: Add schemata file") Signed-off-by: Jiri Olsa Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Shaohua Li Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170411071446.15241-1-jolsa@kernel.org Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_schemata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c99a6874133ebf4513504ef7c32ce1f532d323f Author: Markus Trippelsdorf Date: Fri Apr 7 14:09:04 2017 +0200 x86/debug: Fix the printk() debug output of signal_fault(), do_trap() and do_general_protection() Since commit: 4bcc595ccd80 "printk: reinstate KERN_CONT for printing" ... the debug output of signal_fault(), do_trap() and do_general_protection() looks garbled, e.g.: traps: conftest[9335] trap invalid opcode ip:400428 sp:7ffeaba1b0d8 error:0 in conftest[400000+1000] (note the unintended line break.) Fix the bug by adding KERN_CONTs. Signed-off-by: Markus Trippelsdorf Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/signal.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1fa839b4986d648b907d117275869a0e46c324b9 Author: Germano Percossi Date: Fri Apr 7 12:29:38 2017 +0100 CIFS: store results of cifs_reopen_file to avoid infinite wait This fixes Continuous Availability when errors during file reopen are encountered. cifs_user_readv and cifs_user_writev would wait for ever if results of cifs_reopen_file are not stored and for later inspection. In fact, results are checked and, in case of errors, a chain of function calls leading to reads and writes to be scheduled in a separate thread is skipped. These threads will wake up the corresponding waiters once reads and writes are done. However, given the return value is not stored, when rc is checked for errors a previous one (always zero) is inspected instead. This leads to pending reads/writes added to the list, making cifs_user_readv and cifs_user_writev wait for ever. Signed-off-by: Germano Percossi Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a0918f1ce6a43ac980b42b300ec443c154970979 Author: Germano Percossi Date: Fri Apr 7 12:29:37 2017 +0100 CIFS: remove bad_network_name flag STATUS_BAD_NETWORK_NAME can be received during node failover, causing the flag to be set and making the reconnect thread always unsuccessful, thereafter. Once the only place where it is set is removed, the remaining bits are rendered moot. Removing it does not prevent "mount" from failing when a non existent share is passed. What happens when the share really ceases to exist while the share is mounted is undefined now as much as it was before. Signed-off-by: Germano Percossi Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 - fs/cifs/smb2pdu.c | 5 ----- 2 files changed, 6 deletions(-) commit 18ea43113f5b74a97dd4be9bddbac10d68b1a6ce Author: Germano Percossi Date: Fri Apr 7 12:29:36 2017 +0100 CIFS: reconnect thread reschedule itself In case of error, smb2_reconnect_server reschedule itself with a delay, to avoid being too aggressive. Signed-off-by: Germano Percossi Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/smb2pdu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 40920c2bb119fd49ba03e2f97a172171781be442 Author: Mark Syms Date: Tue Nov 29 11:36:46 2016 +0000 CIFS: handle guest access errors to Windows shares Commit 1a967d6c9b39c226be1b45f13acd4d8a5ab3dc44 ("correctly to anonymous authentication for the NTLM(v2) authentication") introduces a regression in handling errors related to attempting a guest connection to a Windows share which requires authentication. This should result in a permission denied error but actually causes the kernel module to enter a never-ending loop trying to follow a DFS referal which doesn't exist. The base cause of this is the failure now occurs later in the process during tree connect and not at the session setup setup and all errors in tree connect are interpreted as needing to follow the DFS paths which isn't in this case correct. So, check the returned error against EACCES and fail if this is returned error. Feedback from Aurelien: PS> net user guest /activate:no PS> mkdir C:\guestshare PS> icacls C:\guestshare /grant 'Everyone:(OI)(CI)F' PS> new-smbshare -name guestshare -path C:\guestshare -fullaccess Everyone I've tested v3.10, v4.4, master, master+your patch using default options (empty or no user "NU") and user=abc (U). NT_LOGON_FAILURE in session setup: LF This is what you seem to have in 3.10. NT_ACCESS_DENIED in tree connect to the share: AD This is what you get before your infinite loop. | NU U -------------------------------- 3.10 | LF LF 4.4 | LF LF master | AD LF master+patch | AD LF No infinite DFS loop :( All these issues result in mount failing very fast with permission denied. I guess it could be from either the Windows version or the share/folder ACL. A deeper analysis of the packets might reveal more. In any case I did not notice any issues for on a basic DFS setup with the patch so I don't think it introduced any regressions, which is probably all that matters. It still bothers me a little I couldn't hit the bug. I've included kernel output w/ debugging output and network capture of my tests if anyone want to have a look at it. (master+patch = ml-guestfix). Signed-off-by: Mark Syms Reviewed-by: Aurelien Aptel Tested-by: Aurelien Aptel Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/connect.c | 3 +++ 1 file changed, 3 insertions(+) commit 350be257ea83029daee974c72b1fe2e6f1f8e615 Author: Pavel Shilovsky Date: Mon Apr 10 10:31:33 2017 -0700 CIFS: Fix null pointer deref during read resp processing Currently during receiving a read response mid->resp_buf can be NULL when it is being passed to cifs_discard_remaining_data() from cifs_readv_discard(). Fix it by always passing server->smallbuf instead and initializing mid->resp_buf at the end of read response processing. Signed-off-by: Pavel Shilovsky CC: Stable Acked-by: Sachin Prabhu Signed-off-by: Steve French fs/cifs/cifsproto.h | 3 +-- fs/cifs/cifssmb.c | 15 ++++++++------- fs/cifs/smb2ops.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit 5376366886251e2f8f248704adb620a4bc4c0937 Author: Cameron Gutman Date: Mon Apr 10 20:44:25 2017 -0700 Input: xpad - add support for Razer Wildcat gamepad Cc: stable@vger.kernel.org Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit 4aa5615e080a9855e607accc75b07ab79b252dde Author: Dan Williams Date: Fri Apr 7 12:25:52 2017 -0700 libnvdimm: band aid btt vs clear poison locking The following warning results from holding a lane spinlock, preempt_disable(), or the btt map spinlock and then trying to take the reconfig_mutex to walk the poison list and potentially add new entries. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 0, pid: 17159, name: dd [..] Call Trace: dump_stack+0x85/0xc8 ___might_sleep+0x184/0x250 __might_sleep+0x4a/0x90 __mutex_lock+0x58/0x9b0 ? nvdimm_bus_lock+0x21/0x30 [libnvdimm] ? __nvdimm_bus_badblocks_clear+0x2f/0x60 [libnvdimm] ? acpi_nfit_forget_poison+0x79/0x80 [nfit] ? _raw_spin_unlock+0x27/0x40 mutex_lock_nested+0x1b/0x20 nvdimm_bus_lock+0x21/0x30 [libnvdimm] nvdimm_forget_poison+0x25/0x50 [libnvdimm] nvdimm_clear_poison+0x106/0x140 [libnvdimm] nsio_rw_bytes+0x164/0x270 [libnvdimm] btt_write_pg+0x1de/0x3e0 [nd_btt] ? blk_queue_enter+0x30/0x290 btt_make_request+0x11a/0x310 [nd_btt] ? blk_queue_enter+0xb7/0x290 ? blk_queue_enter+0x30/0x290 generic_make_request+0x118/0x3b0 As a minimal fix, disable error clearing when the BTT is enabled for the namespace. For the final fix a larger rework of the poison list locking is needed. Note that this is not a problem in the blk case since that path never calls nvdimm_clear_poison(). Cc: Fixes: 82bf1037f2ca ("libnvdimm: check and clear poison before writing to pmem") Cc: Dave Jiang [jeff: dynamically disable error clearing in the btt case] Suggested-by: Jeff Moyer Reviewed-by: Jeff Moyer Reported-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/claim.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0beb2012a1722633515c8aaa263c73449636c893 Author: Dan Williams Date: Fri Apr 7 09:47:24 2017 -0700 libnvdimm: fix reconfig_mutex, mmap_sem, and jbd2_handle lockdep splat Holding the reconfig_mutex over a potential userspace fault sets up a lockdep dependency chain between filesystem-DAX and the libnvdimm ioctl path. Move the user access outside of the lock. [ INFO: possible circular locking dependency detected ] 4.11.0-rc3+ #13 Tainted: G W O ------------------------------------------------------- fallocate/16656 is trying to acquire lock: (&nvdimm_bus->reconfig_mutex){+.+.+.}, at: [] nvdimm_bus_lock+0x21/0x30 [libnvdimm] but task is already holding lock: (jbd2_handle){++++..}, at: [] start_this_handle+0x104/0x460 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (jbd2_handle){++++..}: lock_acquire+0xbd/0x200 start_this_handle+0x16a/0x460 jbd2__journal_start+0xe9/0x2d0 __ext4_journal_start_sb+0x89/0x1c0 ext4_dirty_inode+0x32/0x70 __mark_inode_dirty+0x235/0x670 generic_update_time+0x87/0xd0 touch_atime+0xa9/0xd0 ext4_file_mmap+0x90/0xb0 mmap_region+0x370/0x5b0 do_mmap+0x415/0x4f0 vm_mmap_pgoff+0xd7/0x120 SyS_mmap_pgoff+0x1c5/0x290 SyS_mmap+0x22/0x30 entry_SYSCALL_64_fastpath+0x1f/0xc2 -> #1 (&mm->mmap_sem){++++++}: lock_acquire+0xbd/0x200 __might_fault+0x70/0xa0 __nd_ioctl+0x683/0x720 [libnvdimm] nvdimm_ioctl+0x8b/0xe0 [libnvdimm] do_vfs_ioctl+0xa8/0x740 SyS_ioctl+0x79/0x90 do_syscall_64+0x6c/0x200 return_from_SYSCALL_64+0x0/0x7a -> #0 (&nvdimm_bus->reconfig_mutex){+.+.+.}: __lock_acquire+0x16b6/0x1730 lock_acquire+0xbd/0x200 __mutex_lock+0x88/0x9b0 mutex_lock_nested+0x1b/0x20 nvdimm_bus_lock+0x21/0x30 [libnvdimm] nvdimm_forget_poison+0x25/0x50 [libnvdimm] nvdimm_clear_poison+0x106/0x140 [libnvdimm] pmem_do_bvec+0x1c2/0x2b0 [nd_pmem] pmem_make_request+0xf9/0x270 [nd_pmem] generic_make_request+0x118/0x3b0 submit_bio+0x75/0x150 Cc: Fixes: 62232e45f4a2 ("libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices") Cc: Dave Jiang Reported-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3cf864520e877505158f09075794a08abab11bbe Author: Ondrej Zary Date: Fri Mar 31 20:35:42 2017 +0200 sata_via: Enable hotplug only on VT6421 Commit 57e5568fda27 ("sata_via: Implement hotplug for VT6421") adds hotplug IRQ handler for VT6421 but enables hotplug on all chips. This is a bug because it causes "irq xx: nobody cared" error on VT6420 when hot-(un)plugging a drive: [ 381.839948] irq 20: nobody cared (try booting with the "irqpoll" option) [ 381.840014] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc5+ #148 [ 381.840066] Hardware name: P4VM800/P4VM800, BIOS P1.60 05/29/2006 [ 381.840117] Call Trace: [ 381.840167] [ 381.840225] ? dump_stack+0x44/0x58 [ 381.840278] ? __report_bad_irq+0x14/0x97 [ 381.840327] ? handle_edge_irq+0xa5/0xa5 [ 381.840376] ? note_interrupt+0x155/0x1cf [ 381.840426] ? handle_edge_irq+0xa5/0xa5 [ 381.840474] ? handle_irq_event_percpu+0x32/0x38 [ 381.840524] ? handle_irq_event+0x1f/0x38 [ 381.840573] ? handle_fasteoi_irq+0x69/0xb8 [ 381.840625] ? handle_irq+0x4f/0x5d [ 381.840672] [ 381.840726] ? do_IRQ+0x2e/0x8b [ 381.840782] ? common_interrupt+0x2c/0x34 [ 381.840836] ? mwait_idle+0x60/0x82 [ 381.840892] ? arch_cpu_idle+0x6/0x7 [ 381.840949] ? do_idle+0x96/0x18e [ 381.841002] ? cpu_startup_entry+0x16/0x1a [ 381.841057] ? start_kernel+0x319/0x31c [ 381.841111] ? startup_32_smp+0x166/0x168 [ 381.841165] handlers: [ 381.841219] [] ata_bmdma_interrupt [ 381.841274] Disabling IRQ #20 Seems that VT6420 can do hotplug too (there's no documentation) but the comments say that SCR register access (required for detecting hotplug events) can cause problems on these chips. For now, just keep hotplug disabled on anything other than VT6421. Signed-off-by: Ondrej Zary Signed-off-by: Tejun Heo drivers/ata/sata_via.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit bfb0b80db5f9dca5ac0a5fd0edb765ee555e5a8e Author: Zefan Li Date: Fri Apr 7 16:51:55 2017 +0800 cgroup: avoid attaching a cgroup root to two different superblocks Run this: touch file0 for ((; ;)) { mount -t cpuset xxx file0 } And this concurrently: touch file1 for ((; ;)) { mount -t cpuset xxx file1 } We'll trigger a warning like this: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 4675 at lib/percpu-refcount.c:317 percpu_ref_kill_and_confirm+0x92/0xb0 percpu_ref_kill_and_confirm called more than once on css_release! CPU: 1 PID: 4675 Comm: mount Not tainted 4.11.0-rc5+ #5 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 Call Trace: dump_stack+0x63/0x84 __warn+0xd1/0xf0 warn_slowpath_fmt+0x5f/0x80 percpu_ref_kill_and_confirm+0x92/0xb0 cgroup_kill_sb+0x95/0xb0 deactivate_locked_super+0x43/0x70 deactivate_super+0x46/0x60 ... ---[ end trace a79f61c2a2633700 ]--- Here's a race: Thread A Thread B cgroup1_mount() # alloc a new cgroup root cgroup_setup_root() cgroup1_mount() # no sb yet, returns NULL kernfs_pin_sb() # but succeeds in getting the refcnt, # so re-use cgroup root percpu_ref_tryget_live() # alloc sb with cgroup root cgroup_do_mount() cgroup_kill_sb() # alloc another sb with same root cgroup_do_mount() cgroup_kill_sb() We end up using the same cgroup root for two different superblocks, so percpu_ref_kill() will be called twice on the same root when the two superblocks are destroyed. We should fix to make sure the superblock pinning is really successful. Cc: stable@vger.kernel.org # 3.16+ Reported-by: Dmitry Vyukov Signed-off-by: Zefan Li Signed-off-by: Tejun Heo kernel/cgroup/cgroup-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f8dc3a01f1cf8ed17b1e295812ad12b688be5d3 Author: Marc Zyngier Date: Wed Mar 8 08:09:27 2017 +0000 virtio-pci: Remove affinity hint before freeing the interrupt virtio-pci registers a per-vq affinity hint when using MSIX, but fails to remove it when freeing the interrupt, resulting in this type of splat: [ 31.111202] WARNING: CPU: 0 PID: 2823 at kernel/irq/manage.c:1503 __free_irq+0x2c4/0x2c8 [ 31.114689] Modules linked in: [ 31.116101] CPU: 0 PID: 2823 Comm: kexec Not tainted 4.10.0+ #6941 [ 31.118911] Hardware name: Generic DT based system [ 31.121319] [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) [ 31.125017] [] (show_stack) from [] (dump_stack+0x84/0x98) [ 31.128427] [] (dump_stack) from [] (__warn+0xf4/0x10c) [ 31.131910] [] (__warn) from [] (warn_slowpath_null+0x28/0x30) [ 31.135543] [] (warn_slowpath_null) from [] (__free_irq+0x2c4/0x2c8) [ 31.139355] [] (__free_irq) from [] (free_irq+0x44/0x78) [ 31.142909] [] (free_irq) from [] (vp_del_vqs+0x68/0x1c0) [ 31.146299] [] (vp_del_vqs) from [] (pci_device_shutdown+0x3c/0x78) The obvious fix is to drop the affinity hint before freeing the interrupt. Signed-off-by: Marc Zyngier Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0a9b3f47da5b8a2c4bf4f2f2199761f49ac0a54e Author: Michael S. Tsirkin Date: Tue Apr 4 21:44:44 2017 +0300 Revert "virtio_pci: remove struct virtio_pci_vq_info" This reverts commit 5c34d002dcc7a6dd665a19d098b4f4cd5501ba1a. Conflicts: drivers/virtio/virtio_pci_common.c The cleanup seems to be one of the changes that broke hybernation for some users. We are still not sure why but revert helps. This reverts the cleanup changes but keeps the affinity support. Tested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 128 ++++++++++++++++++++++++++----------- drivers/virtio/virtio_pci_common.h | 25 +++++++- drivers/virtio/virtio_pci_legacy.c | 6 +- drivers/virtio/virtio_pci_modern.c | 6 +- 4 files changed, 122 insertions(+), 43 deletions(-) commit 0b0f9dc52ed0333fa52a9314b53d0b2b248b821d Author: Michael S. Tsirkin Date: Tue Apr 4 21:15:41 2017 +0300 Revert "virtio_pci: use shared interrupts for virtqueues" This reverts commit 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507. Conflicts: drivers/virtio/virtio_pci_common.c Unfortunately the idea does not work with threadirqs as more than 32 queues can then map to a single interrupts. Further, the cleanup seems to be one of the changes that broke hybernation for some users. We are still not sure why but revert helps. This reverts the cleanup changes but keeps the affinity support. Tested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 244 ++++++++++++++++++++----------------- drivers/virtio/virtio_pci_common.h | 16 ++- 2 files changed, 148 insertions(+), 112 deletions(-) commit 2008c1544c73d5190f81ef1790fa5bd2fade5bd0 Author: Michael S. Tsirkin Date: Tue Apr 4 21:09:20 2017 +0300 Revert "virtio_pci: don't duplicate the msix_enable flag in struct pci_dev" This reverts commit 53a020c661741f3b87ad3ac6fa545088aaebac9b. The cleanup seems to be one of the changes that broke hybernation for some users. We are still not sure why but revert helps. Tested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 5 +++-- drivers/virtio/virtio_pci_common.h | 2 ++ drivers/virtio/virtio_pci_legacy.c | 2 +- drivers/virtio/virtio_pci_modern.c | 2 +- include/uapi/linux/virtio_pci.h | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) commit bf951b1045cc5d694b5e767c4f4d05df4f2cbe89 Author: Michael S. Tsirkin Date: Tue Apr 4 21:08:54 2017 +0300 Revert "virtio_pci: simplify MSI-X setup" This reverts commit 52a61516125fa9a21b3bdf4f90928308e2e5573f. Conflicts: drivers/virtio/virtio_pci_common.c The cleanup seems to be one of the changes that broke hybernation for some users. We are still not sure why but revert helps. This reverts the cleanup changes but keeps the affinity support. Tested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 8f10d0149fb983aa84a02a92f9c2113d69e23cb8 Author: Michael S. Tsirkin Date: Tue Apr 4 21:04:23 2017 +0300 Revert "virtio_pci: fix out of bound access for msix_names" This reverts commit de85ec8b07f82c8c84de7687f769e74bf4c26a1e. Follow-up patches will revert 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") that triggered the problem so no need for this one anymore. Tested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c08e611b7d0169b513e3b4515ffd51ac7f37f22c Merge: 39da7c5 40c98cb Author: Linus Torvalds Date: Mon Apr 10 09:37:43 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a number of bugs in the caam driver: - device creation fails after release - error-path NULL-pointer dereference - spurious hardware error in RNG deinstantiation" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - fix RNG deinstantiation error checking crypto: caam - fix invalid dereference in caam_rsa_init_tfm() crypto: caam - fix JR platform device subsequent (re)creations commit 6fdc6dd90272ce7e75d744f71535cfbd8d77da81 Author: Thomas Gleixner Date: Mon Apr 10 17:14:28 2017 +0200 x86/vdso: Plug race between mapping and ELF header setup The vsyscall32 sysctl can racy against a concurrent fork when it switches from disabled to enabled: arch_setup_additional_pages() if (vdso32_enabled) --> No mapping sysctl.vsysscall32() --> vdso32_enabled = true create_elf_tables() ARCH_DLINFO_IA32 if (vdso32_enabled) { --> Add VDSO entry with NULL pointer Make ARCH_DLINFO_IA32 check whether the VDSO mapping has been set up for the newly forked process or not. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Mathias Krause Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170410151723.602367196@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c06989da39cdb10604d572c8c7ea8c8c97f3c483 Author: Mathias Krause Date: Mon Apr 10 17:14:27 2017 +0200 x86/vdso: Ensure vdso32_enabled gets set to valid values only vdso_enabled can be set to arbitrary integer values via the kernel command line 'vdso32=' parameter or via 'sysctl abi.vsyscall32'. load_vdso32() only maps VDSO if vdso_enabled == 1, but ARCH_DLINFO_IA32 merily checks for vdso_enabled != 0. As a consequence the AT_SYSINFO_EHDR auxiliary vector for the VDSO_ENTRY is emitted with a NULL pointer which causes a segfault when the application tries to use the VDSO. Restrict the valid arguments on the command line and the sysctl to 0 and 1. Fixes: b0b49f2673f0 ("x86, vdso: Remove compat vdso support") Signed-off-by: Mathias Krause Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: stable@vger.kernel.org Cc: Roland McGrath Link: http://lkml.kernel.org/r/1491424561-7187-1-git-send-email-minipli@googlemail.com Link: http://lkml.kernel.org/r/20170410151723.518412863@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/entry/vdso/vdso32-setup.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 264d509637d95f9404e52ced5003ad352e0f6a26 Author: Paul Moore Date: Mon Apr 10 11:16:59 2017 -0400 audit: make sure we don't let the retry queue grow without bounds The retry queue is intended to provide a temporary buffer in the case of transient errors when communicating with auditd, it is not meant as a long life queue, that functionality is provided by the hold queue. This patch fixes a problem identified by Seth where the retry queue could grow uncontrollably if an auditd instance did not connect to the kernel to drain the queues. This commit fixes this by doing the following: * Make sure we always call auditd_reset() if we decide the connection with audit is really dead. There were some cases in kauditd_hold_skb() where we did not reset the connection, this patch relocates the reset calls to kauditd_thread() so all the error conditions are caught and the connection reset. As a side effect, this means we could move auditd_reset() and get rid of the forward definition at the top of kernel/audit.c. * We never checked the status of the auditd connection when processing the main audit queue which meant that the retry queue could grow unchecked. This patch adds a call to auditd_reset() after the main queue has been processed if auditd is not connected, the auditd_reset() call will make sure the retry and hold queues are correctly managed/flushed so that the retry queue remains reasonable. Cc: # 4.10.x-: 5b52330bbfe6 Reported-by: Seth Forshee Signed-off-by: Paul Moore kernel/audit.c | 67 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 35 deletions(-) commit 9d7f29cdb4ca53506115cf1d7a02ce6013894df0 Author: James Hogan Date: Wed Apr 5 16:32:45 2017 +0100 MIPS: cevt-r4k: Fix out-of-bounds array access calculate_min_delta() may incorrectly access a 4th element of buf2[] which only has 3 elements. This may trigger undefined behaviour and has been reported to cause strange crashes in start_kernel() sometime after timer initialization when built with GCC 5.3, possibly due to register/stack corruption: sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns CPU 0 Unable to handle kernel paging request at virtual address ffffb0aa, epc == 8067daa8, ra == 8067da84 Oops[#1]: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.18 #51 task: 8065e3e0 task.stack: 80644000 $ 0 : 00000000 00000001 00000000 00000000 $ 4 : 8065b4d0 00000000 805d0000 00000010 $ 8 : 00000010 80321400 fffff000 812de408 $12 : 00000000 00000000 00000000 ffffffff $16 : 00000002 ffffffff 80660000 806a666c $20 : 806c0000 00000000 00000000 00000000 $24 : 00000000 00000010 $28 : 80644000 80645ed0 00000000 8067da84 Hi : 00000000 Lo : 00000000 epc : 8067daa8 start_kernel+0x33c/0x500 ra : 8067da84 start_kernel+0x318/0x500 Status: 11000402 KERNEL EXL Cause : 4080040c (ExcCode 03) BadVA : ffffb0aa PrId : 0501992c (MIPS 1004Kc) Modules linked in: Process swapper/0 (pid: 0, threadinfo=80644000, task=8065e3e0, tls=00000000) Call Trace: [<8067daa8>] start_kernel+0x33c/0x500 Code: 24050240 0c0131f9 24849c64 41606020 000000c0 0c1a45e6 00000000 0c1a5f44 UBSAN also detects the same issue: ================================================================ UBSAN: Undefined behaviour in arch/mips/kernel/cevt-r4k.c:85:41 load of address 80647e4c with insufficient space for an object of type 'unsigned int' CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.18 #47 Call Trace: [<80028f70>] show_stack+0x88/0xa4 [<80312654>] dump_stack+0x84/0xc0 [<8034163c>] ubsan_epilogue+0x14/0x50 [<803417d8>] __ubsan_handle_type_mismatch+0x160/0x168 [<8002dab0>] r4k_clockevent_init+0x544/0x764 [<80684d34>] time_init+0x18/0x90 [<8067fa5c>] start_kernel+0x2f0/0x500 ================================================================= buf2[] is intentionally only 3 elements so that the last element is the median once 5 samples have been inserted, so explicitly prevent the possibility of comparing against the 4th element rather than extending the array. Fixes: 1fa405552e33f2 ("MIPS: cevt-r4k: Dynamically calculate min_delta_ns") Reported-by: Rabin Vincent Signed-off-by: James Hogan Tested-by: Rabin Vincent Cc: linux-mips@linux-mips.org Cc: # 4.7.x- Patchwork: https://patchwork.linux-mips.org/patch/15892/ Signed-off-by: Ralf Baechle arch/mips/kernel/cevt-r4k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6534aebb26e32fbab14df9c713c65e8507d17e4 Author: Herbert Xu Date: Mon Apr 10 17:59:07 2017 +0800 crypto: algif_aead - Fix bogus request dereference in completion function The algif_aead completion function tries to deduce the aead_request from the crypto_async_request argument. This is broken because the API does not guarantee that the same request will be pased to the completion function. Only the value of req->data can be used in the completion function. This patch fixes it by storing a pointer to sk in areq and using that instead of passing in sk through req->data. Fixes: 83094e5e9e49 ("crypto: af_alg - add async support to...") Cc: Signed-off-by: Herbert Xu crypto/algif_aead.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ef0579b64e93188710d48667cb5e014926af9f1b Author: Herbert Xu Date: Mon Apr 10 17:27:57 2017 +0800 crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the request gets an EBUSY on a full queue, an EINPROGRESS callback is made while the request is still ongoing. In this case the ahash API will incorrectly call its own callback. This patch fixes the problem by creating a temporary request object on the stack which is used to relay EINPROGRESS back to the original completion function. This patch also adds code to preserve the original flags value. Fixes: ab6bf4e5e5e4 ("crypto: hash - Fix the pointer voodoo in...") Cc: Reported-by: Sabrina Dubroca Tested-by: Sabrina Dubroca Signed-off-by: Herbert Xu crypto/ahash.c | 79 ++++++++++++++++++++++++++---------------- include/crypto/internal/hash.h | 10 ++++++ 2 files changed, 60 insertions(+), 29 deletions(-) commit 4702bbeefb490e315189636a5588628c1151223d Author: Herbert Xu Date: Mon Apr 10 17:15:48 2017 +0800 crypto: lrw - Fix use-after-free on EINPROGRESS When we get an EINPROGRESS completion in lrw, we will end up marking the request as done and freeing it. This then blows up when the request is really completed as we've already freed the memory. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Cc: Signed-off-by: Herbert Xu crypto/lrw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit aa4a829bdaced81e70c215a84ef6595ce8bd4308 Author: Herbert Xu Date: Sat Apr 8 10:02:46 2017 +0800 crypto: xts - Fix use-after-free on EINPROGRESS When we get an EINPROGRESS completion in xts, we will end up marking the request as done and freeing it. This then blows up when the request is really completed as we've already freed the memory. Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Cc: Reported-by: Nathan Royce Reported-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu Tested-by: Krzysztof Kozlowski crypto/xts.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f2b42866b1bb30c1f62a84f6d829b8789495da95 Author: Rabin Vincent Date: Wed Apr 5 15:14:08 2017 +0200 MIPS: perf: fix deadlock mipsxx_pmu_handle_shared_irq() calls irq_work_run() while holding the pmuint_rwlock for read. irq_work_run() can, via perf_pending_event(), call try_to_wake_up() which can try to take rq->lock. However, perf can also call perf_pmu_enable() (and thus take the pmuint_rwlock for write) while holding the rq->lock, from finish_task_switch() via perf_event_context_sched_in(). This leads to an ABBA deadlock: PID: 3855 TASK: 8f7ce288 CPU: 2 COMMAND: "process" #0 [89c39ac8] __delay at 803b5be4 #1 [89c39ac8] do_raw_spin_lock at 8008fdcc #2 [89c39af8] try_to_wake_up at 8006e47c #3 [89c39b38] pollwake at 8018eab0 #4 [89c39b68] __wake_up_common at 800879f4 #5 [89c39b98] __wake_up at 800880e4 #6 [89c39bc8] perf_event_wakeup at 8012109c #7 [89c39be8] perf_pending_event at 80121184 #8 [89c39c08] irq_work_run_list at 801151f0 #9 [89c39c38] irq_work_run at 80115274 #10 [89c39c50] mipsxx_pmu_handle_shared_irq at 8002cc7c PID: 1481 TASK: 8eaac6a8 CPU: 3 COMMAND: "process" #0 [8de7f900] do_raw_write_lock at 800900e0 #1 [8de7f918] perf_event_context_sched_in at 80122310 #2 [8de7f938] __perf_event_task_sched_in at 80122608 #3 [8de7f958] finish_task_switch at 8006b8a4 #4 [8de7f998] __schedule at 805e4dc4 #5 [8de7f9f8] schedule at 805e5558 #6 [8de7fa10] schedule_hrtimeout_range_clock at 805e9984 #7 [8de7fa70] poll_schedule_timeout at 8018e8f8 #8 [8de7fa88] do_select at 8018f338 #9 [8de7fd88] core_sys_select at 8018f5cc #10 [8de7fee0] sys_select at 8018f854 #11 [8de7ff28] syscall_common at 80028fc8 The lock seems to be there to protect the hardware counters so there is no need to hold it across irq_work_run(). Signed-off-by: Rabin Vincent Signed-off-by: Ralf Baechle arch/mips/kernel/perf_event_mipsxx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9eec1c01a073fe1fdba4e50e53bd953d1c59ad00 Author: Matt Redfearn Date: Thu Apr 6 16:58:09 2017 +0100 MIPS: Malta: Fix i8259 irqchip setup Since commit 4cfffcfa5106 ("irqchip/mips-gic: Fix local interrupts"), the gic driver has been allocating virq's for local interrupts during its initialisation. Unfortunately on Malta platforms, these are the first IRQs to be allocated and so are allocated virqs 1-3. The i8259 driver uses a legacy irq domain which expects to map virqs 0-15. Probing of that driver therefore fails because some of those virqs are already taken, with the warning: WARNING: CPU: 0 PID: 0 at kernel/irq/irqdomain.c:344 irq_domain_associate+0x1e8/0x228 error: virq1 is already associated Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc6-00011-g4cfffcfa5106 #368 Stack : 00000000 00000000 807ae03a 0000004d 00000000 806c1010 0000000b ffff0a01 80725467 807258f4 806a64a4 00000000 00000000 807a9acc 00000100 80713e68 806d5598 8017593c 8072bf90 8072bf94 806ac358 00000000 806abb60 80713ce4 00000100 801b22d4 806d5598 8017593c 807ae03a 00000000 80713ce4 80720000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ... Call Trace: [<8010c480>] show_stack+0x88/0xa4 [<80376758>] dump_stack+0x88/0xd0 [<8012c4a8>] __warn+0x104/0x118 [<8012c4ec>] warn_slowpath_fmt+0x30/0x3c [<8017edfc>] irq_domain_associate+0x1e8/0x228 [<8017efd0>] irq_domain_add_legacy+0x7c/0xb0 [<80764c50>] __init_i8259_irqs+0x64/0xa0 [<80764ca4>] i8259_of_init+0x18/0x74 [<8076ddc0>] of_irq_init+0x19c/0x310 [<80752dd8>] arch_init_irq+0x28/0x19c [<80750a08>] start_kernel+0x2a8/0x434 Fix this by reserving the required i8259 virqs in malta platform code before probing any irq chips. Fixes: 4cfffcfa5106 ("irqchip/mips-gic: Fix local interrupts") Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15919/ Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-int.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dbc9d69edfa0fc3b44156f32747a5add3fbdfb8b Author: Chanwoo Choi Date: Wed Mar 22 17:03:31 2017 +0900 pinctrl: samsung: Add missing part for PINCFG_TYPE_DRV of Exynos5433 The commit 1259feddd0f8("pinctrl: samsung: Fix the width of PINCFG_TYPE_DRV bitfields for Exynos5433") already fixed the different width of PINCFG_TYPE_DRV from previous Exynos SoC. However wrong merge conflict resolution was chosen in commit 7f36f5d11cda ("Merge tag 'v4.10-rc6' into devel") effectively dropping the changes for PINCFG_TYPE_DRV. Re-do them here. The macro EXYNOS_PIN_BANK_EINTW is no longer used so remove it. Fixes: 7f36f5d11cda ("Merge tag 'v4.10-rc6' into devel") Signed-off-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 80 ++++++++++++++++---------------- drivers/pinctrl/samsung/pinctrl-exynos.h | 11 ----- 2 files changed, 40 insertions(+), 51 deletions(-) commit 17c3060b1701fc69daedb4c90be6325d3d9fca8e Author: Eric Dumazet Date: Sat Apr 8 08:07:33 2017 -0700 tcp: clear saved_syn in tcp_disconnect() In the (very unlikely) case a passive socket becomes a listener, we do not want to duplicate its saved SYN headers. This would lead to double frees, use after free, and please hackers and various fuzzers Tested: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, IPPROTO_TCP, TCP_SAVE_SYN, [1], 4) = 0 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 5) = 0 +0 < S 0:0(0) win 32972 +0 > S. 0:0(0) ack 1 <...> +.1 < . 1:1(0) ack 1 win 257 +0 accept(3, ..., ...) = 4 +0 connect(4, AF_UNSPEC, ...) = 0 +0 close(3) = 0 +0 bind(4, ..., ...) = 0 +0 listen(4, 5) = 0 +0 < S 0:0(0) win 32972 +0 > S. 0:0(0) ack 1 <...> +.1 < . 1:1(0) ack 1 win 257 Fixes: cd8ae85299d5 ("tcp: provide SYN headers for passive connections") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 1 + 1 file changed, 1 insertion(+) commit c6c64a942c87faa6fca68f5dd208094b8cf61236 Author: Sagi Grimberg Date: Thu Apr 6 09:15:52 2017 +0300 nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability both our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong. Reported-by: Trapp, Darren Reported-by: Daniel Verkamp Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1af76ddaa80e3bca8001b535e44aaaebd3e1907e Author: Sagi Grimberg Date: Thu Apr 6 09:15:51 2017 +0300 nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability both our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong. Reported-by: Trapp, Darren Reported-by: Daniel Verkamp Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 096e9e912ba8c973213e57701e0591e01064be26 Author: Sagi Grimberg Date: Thu Apr 6 09:15:50 2017 +0300 nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability both our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong. Reported-by: Trapp, Darren Reported-by: Daniel Verkamp Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 Author: Linus Torvalds Date: Sun Apr 9 09:49:44 2017 -0700 Linux 4.11-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84ced7fd06dac98aa630dcfd5f008e3f3c323737 Merge: 462e9a3 806a28e Author: Linus Torvalds Date: Sun Apr 9 09:10:02 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull CIFS fixes from Steve French: "This is a set of CIFS/SMB3 fixes for stable. There is another set of four SMB3 reconnect fixes for stable in progress but they are still being reviewed/tested, so didn't want to wait any longer to send these five below" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: Reset TreeId to zero on SMB2 TREE_CONNECT CIFS: Fix build failure with smb2 Introduce cifs_copy_file_range() SMB3: Rename clone_range to copychunk_range Handle mismatched open calls commit 462e9a355e7488fde3712c3b2585fc2f2a2c263d Merge: 5b50be7 3872fe8 Author: Linus Torvalds Date: Sun Apr 9 09:05:25 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A number of ARM fixes: - prevent oopses caused by dma_get_sgtable() and declared DMA coherent memory - fix boot failure on nommu caused by ID_PFR1 access - a number of kprobes fixes from Jon Medhurst and Masami Hiramatsu" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8665/1: nommu: access ID_PFR1 only if CPUID scheme ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory arm: kprobes: Align stack to 8-bytes in test code arm: kprobes: Fix the return address of multiple kretprobes arm: kprobes: Skip single-stepping in recursing path if possible arm: kprobes: Allow to handle reentered kprobe on single-stepping commit 5b50be743f495b000891d430ecba7372cc59bb64 Merge: 62e1fd0 27f395b Author: Linus Torvalds Date: Sun Apr 9 09:03:51 2017 -0700 Merge tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are 3 small fixes for 4.11-rc6. One resolves a reported issue with sysfs files that NeilBrown found, one is a documenatation fix for the stable kernel rules, and the last is a small MAINTAINERS file update for kernfs" * tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: MAINTAINERS: separate out kernfs maintainership sysfs: be careful of error returns from ops->show() Documentation: stable-kernel-rules: fix stable-tag format commit 62e1fd08ede3ea2af25b3aa5f81c6c525bac2ce3 Merge: 2a610b8 97fbfef Author: Linus Torvalds Date: Sun Apr 9 09:02:31 2017 -0700 Merge tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver rfixes from Greg KH: "Here are a number of small IIO and staging driver fixes for 4.11-rc6. Nothing big here, just iio fixes for reported issues, and an ashmem fix for a very old bug that has been reported by a number of Android vendors" * tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ashmem: lseek failed due to no FMODE_LSEEK. iio: hid-sensor-attributes: Fix sensor property setting failure. iio: accel: hid-sensor-accel-3d: Fix duplicate scan index error iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values iio: st_pressure: initialize lps22hb bootime iio: bmg160: reset chip when probing iio: cros_ec_sensors: Fix return value to get raw and calibbias data. commit 2a610b8aa8e5bd449ba270e517b0e72295d62c9c Merge: 78d91a7 a8e2844 Author: Linus Torvalds Date: Sun Apr 9 08:26:21 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS fixes from Al Viro: "statx followup fixes and a fix for stack-smashing on alpha" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: alpha: fix stack smashing in old_adjtimex(2) statx: Include a mask for stx_attributes in struct statx statx: Reserve the top bit of the mask for future struct expansion xfs: report crtime and attribute flags to statx ext4: Add statx support statx: optimize copy of struct statx to userspace statx: remove incorrect part of vfs_statx() comment statx: reject unknown flags when using NULL path Documentation/filesystems: fix documentation for ->getattr() commit 7cddd967bfc2e4fc6b3218c2ddc67fbeed433ad3 Author: Liping Zhang Date: Sun Apr 2 18:25:37 2017 +0800 netfilter: nf_ct_expect: use proper RCU list traversal/update APIs We should use proper RCU list APIs to manipulate help->expectations, as we can dump the conntrack's expectations via nfnetlink, i.e. in ctnetlink_exp_ct_dump_table(), where only rcu_read_lock is acquired. So for list traversal, use hlist_for_each_entry_rcu; for list add/del, use hlist_add_head_rcu and hlist_del_rcu. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 4 ++-- net/netfilter/nf_conntrack_netlink.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 207df81501021f6d1a935cebf8e1f34d6d25564b Author: Liping Zhang Date: Sun Apr 2 18:01:33 2017 +0800 netfilter: ctnetlink: skip dumping expect when nfct_help(ct) is NULL For IPCTNL_MSG_EXP_GET, if the CTA_EXPECT_MASTER attr is specified, then the NLM_F_DUMP request will dump the expectations related to this connection tracking. But we forget to check whether the conntrack has nf_conn_help or not, so if nfct_help(ct) is NULL, oops will happen: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: ctnetlink_exp_ct_dump_table+0xf9/0x1e0 [nf_conntrack_netlink] Call Trace: ? ctnetlink_exp_ct_dump_table+0x75/0x1e0 [nf_conntrack_netlink] netlink_dump+0x124/0x2a0 __netlink_dump_start+0x161/0x190 ctnetlink_dump_exp_ct+0x16c/0x1bc [nf_conntrack_netlink] ? ctnetlink_exp_fill_info.constprop.33+0xf0/0xf0 [nf_conntrack_netlink] ? ctnetlink_glue_seqadj+0x20/0x20 [nf_conntrack_netlink] ctnetlink_get_expect+0x32e/0x370 [nf_conntrack_netlink] ? debug_lockdep_rcu_enabled+0x1d/0x20 nfnetlink_rcv_msg+0x60a/0x6a9 [nfnetlink] ? nfnetlink_rcv_msg+0x1b9/0x6a9 [nfnetlink] [...] Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0c7930e5763bdd189bd50035c025a9cbe5e82f23 Author: Liping Zhang Date: Sun Apr 2 17:27:53 2017 +0800 netfilter: make it safer during the inet6_dev->addr_list traversal inet6_dev->addr_list is protected by inet6_dev->lock, so only using rcu_read_lock is not enough, we should acquire read_lock_bh(&idev->lock) before the inet6_dev->addr_list traversal. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_redirect.c | 2 ++ net/netfilter/xt_TPROXY.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 3173d5b8c89e67fa3176292ff9af06f09f365348 Author: Liping Zhang Date: Sat Apr 1 20:55:44 2017 +0800 netfilter: ctnetlink: make it safer when checking the ct helper name One CPU is doing ctnetlink_change_helper(), while another CPU is doing unhelp() at the same time. So even if help->helper is not NULL at first, the later statement strcmp(help->helper->name, ...) may still access the NULL pointer. So we must use rcu_read_lock and rcu_dereference to avoid such _bad_ thing happen. Fixes: f95d7a46bc57 ("netfilter: ctnetlink: Fix regression in CTA_HELP processing") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8b5995d0633b04f9a0d321a7cc77e386440730cf Author: Gao Feng Date: Wed Mar 29 19:11:27 2017 +0800 netfilter: helper: Add the rcu lock when call __nf_conntrack_helper_find When invoke __nf_conntrack_helper_find, it needs the rcu lock to protect the helper module which would not be unloaded. Now there are two caller nf_conntrack_helper_try_module_get and ctnetlink_create_expect which don't hold rcu lock. And the other callers left like ctnetlink_change_helper, ctnetlink_create_conntrack, and ctnetlink_glue_attach_expect, they already hold the rcu lock or spin_lock_bh. Remove the rcu lock in functions nf_ct_helper_expectfn_find_by_name and nf_ct_helper_expectfn_find_by_symbol. Because they return one pointer which needs rcu lock, so their caller should hold the rcu lock, not in these two functions. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 17 ++++++++++++----- net/netfilter/nf_conntrack_netlink.c | 10 ++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) commit 97aae0df1de4d7dd80905fb067e28b032a132995 Author: Liping Zhang Date: Sat Apr 1 20:31:32 2017 +0800 netfilter: ctnetlink: using bit to represent the ct event Otherwise, creating a new conntrack via nfnetlink: # conntrack -I -p udp -s 1.1.1.1 -d 2.2.2.2 -t 10 --sport 10 --dport 20 will emit the wrong ct events(where UPDATE should be NEW): # conntrack -E [UPDATE] udp 17 10 src=1.1.1.1 dst=2.2.2.2 sport=10 dport=20 [UNREPLIED] src=2.2.2.2 dst=1.1.1.1 sport=20 dport=10 mark=0 Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2638fd0f92d4397884fd991d8f4925cb3f081901 Author: Eric Dumazet Date: Mon Apr 3 10:55:11 2017 -0700 netfilter: xt_TCPMSS: add more sanity tests on tcph->doff Denys provided an awesome KASAN report pointing to an use after free in xt_TCPMSS I have provided three patches to fix this issue, either in xt_TCPMSS or in xt_tcpudp.c. It seems xt_TCPMSS patch has the smallest possible impact. Signed-off-by: Eric Dumazet Reported-by: Denys Fedoryshchenko Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_TCPMSS.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 78d91a75b40fcf6a08506d308abf2413a29b7e30 Merge: c3df1c7 6d8c6c0 Author: Linus Torvalds Date: Sat Apr 8 11:56:58 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Here's a pull request for 4.11-rc, fixing a set of issues mostly centered around the new scheduling framework. These have been brewing for a while, but split up into what we absolutely need in 4.11, and what we can defer until 4.12. These are well tested, on both single queue and multiqueue setups, and with and without shared tags. They fix several hangs that have happened in testing. This is obviously larger than I would have preferred at this point in time, but I don't think we can shave much off this and still get the desired results. In detail, this pull request contains: - a set of five fixes for NVMe, mostly from Christoph and one from Roland. - a series from Bart, fixing issues with dm-mq and SCSI shared tags and scheduling. Note that one of those patches commit messages may read like an optimization, but it is in fact an important fix for queue restarts in particular. - a series from Omar, most importantly fixing a hang with multiple hardware queues when we fail to get a driver tag. Another important fix in there is for resizing hardware queues, which nbd does when handling multiple sockets for one connection. - fixing an imbalance in putting the ctx for hctx request allocations from Minchan" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: Restart a single queue if tag sets are shared dm rq: Avoid that request processing stalls sporadically scsi: Avoid that SCSI queues get stuck blk-mq: Introduce blk_mq_delay_run_hw_queue() blk-mq: remap queues when adding/removing hardware queues blk-mq-sched: fix crash in switch error path blk-mq-sched: set up scheduler tags when bringing up new queues blk-mq-sched: refactor scheduler initialization blk-mq: use the right hctx when getting a driver tag fails nvmet: fix byte swap in nvmet_parse_io_cmd nvmet: fix byte swap in nvmet_execute_write_zeroes nvmet: add missing byte swap in nvmet_get_smart_log nvme: add missing byte swap in nvme_setup_discard nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 block: do not put mq context in blk_mq_alloc_request_hctx commit c3df1c7c36aa55fa76d77d57383af334856ab9f8 Merge: 894ca30 6118714 Author: Linus Torvalds Date: Sat Apr 8 11:43:38 2017 -0700 Merge tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "This late fix for pin control is hopefully the last I send this cycle. The problem was detected early in the v4.11 release cycle and there has been some back and forth on how to solve it. Sadly the proper fix arrives late, but at least not too late. An issue was detected with pin control on the Freescale i.MX after the refactorings for more general group and function handling. We now have the proper fix for this" * tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable() commit 894ca30cf6ddf891aa17c39a4b8d511c0a8cf2e9 Merge: cf01fb9 4749228 Author: Linus Torvalds Date: Sat Apr 8 11:06:12 2017 -0700 Merge tag 'powerpc-4.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 4.11: Headed to stable: - disable HFSCR[TM] if TM is not supported, fixes a potential host kernel crash triggered by a hostile guest, but only in configurations that no one uses - don't try to fix up misaligned load-with-reservation instructions - fix flush_(d|i)cache_range() called from modules on little endian kernels - add missing global TLB invalidate if cxl is active - fix missing preempt_disable() in crc32c-vpmsum And a fix for selftests build changes that went in this release: - selftests/powerpc: Fix standalone powerpc build Thanks to: Benjamin Herrenschmidt, Frederic Barrat, Oliver O'Halloran, Paul Mackerras" * tag 'powerpc-4.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable() powerpc/mm: Add missing global TLB invalidate if cxl is active powerpc/64: Fix flush_(d|i)cache_range() called from modules powerpc: Don't try to fix up misaligned load-with-reservation instructions powerpc: Disable HFSCR[TM] if TM is not supported selftests/powerpc: Fix standalone powerpc build commit cf01fb9985e8deb25ccf0ea54d916b8871ae0e62 Author: Chris Salls Date: Fri Apr 7 23:48:11 2017 -0700 mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls Signed-off-by: Linus Torvalds mm/mempolicy.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 425fffd886bae3d127a08fa6a17f2e31e24ed7ff Author: Liping Zhang Date: Fri Apr 7 23:51:07 2017 +0800 sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec Currently, inputting the following command will succeed but actually the value will be truncated: # echo 0x12ffffffff > /proc/sys/net/ipv4/tcp_notsent_lowat This is not friendly to the user, so instead, we should report error when the value is larger than UINT_MAX. Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") Signed-off-by: Liping Zhang Cc: Subash Abhinov Kasiviswanathan Cc: Andrew Morton Cc: Eric W. Biederman Signed-off-by: Linus Torvalds kernel/sysctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 27f395b857abee5bced8356d39e1a491ff08748a Author: Tejun Heo Date: Thu Mar 23 13:34:47 2017 -0400 MAINTAINERS: separate out kernfs maintainership Separate out kernfs from driver core and add myself as a co-maintainer. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit df59577d8c6fecc53e0ea8e98519ee83b4ca5b04 Merge: 7cc2b04 ca257b9 Author: David S. Miller Date: Sat Apr 8 08:48:50 2017 -0700 Merge tag 'linux-can-fixes-for-4.12-20170404' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-04-04 this is a pull request of two patches for net/master. The first patch by Markus Marb fixes a register read access in the ifi driver. The second patch by Geert Uytterhoeven for the rcar driver remove the printing of a kernel virtual address. ==================== Signed-off-by: David S. Miller commit c8a139d001a1aab1ea8734db14b22dac9dd143b6 Author: NeilBrown Date: Mon Apr 3 11:30:34 2017 +1000 sysfs: be careful of error returns from ops->show() ops->show() can return a negative error code. Commit 65da3484d9be ("sysfs: correctly handle short reads on PREALLOC attrs.") (in v4.4) caused this to be stored in an unsigned 'size_t' variable, so errors would look like large numbers. As a result, if an error is returned, sysfs_kf_read() will return the value of 'count', typically 4096. Commit 17d0774f8068 ("sysfs: correctly handle read offset on PREALLOC attrs") (in v4.8) extended this error to use the unsigned large 'len' as a size for memmove(). Consequently, if ->show returns an error, then the first read() on the sysfs file will return 4096 and could return uninitialized memory to user-space. If the application performs a subsequent read, this will trigger a memmove() with extremely large count, and is likely to crash the machine is bizarre ways. This bug can currently only be triggered by reading from an md sysfs attribute declared with __ATTR_PREALLOC() during the brief period between when mddev_put() deletes an mddev from the ->all_mddevs list, and when mddev_delayed_delete() - which is scheduled on a workqueue - completes. Before this, an error won't be returned by the ->show() After this, the ->show() won't be called. I can reproduce it reliably only by putting delay like usleep_range(500000,700000); early in mddev_delayed_delete(). Then after creating an md device md0 run echo clear > /sys/block/md0/md/array_state; cat /sys/block/md0/md/array_state The bug can be triggered without the usleep. Fixes: 65da3484d9be ("sysfs: correctly handle short reads on PREALLOC attrs.") Fixes: 17d0774f8068 ("sysfs: correctly handle read offset on PREALLOC attrs") Cc: stable@vger.kernel.org Signed-off-by: NeilBrown Acked-by: Tejun Heo Reported-and-tested-by: Miroslav Benes Signed-off-by: Greg Kroah-Hartman fs/sysfs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cf903e9d3a97f89b224d2d07be37c0f160db8192 Author: Johan Hovold Date: Mon Apr 3 15:53:34 2017 +0200 Documentation: stable-kernel-rules: fix stable-tag format A patch documenting how to specify which kernels a particular fix should be backported to (seemingly) inadvertently added a minus sign after the kernel version. This particular stable-tag format had never been used prior to this patch, and was neither present when the patch in question was first submitted (it was added in v2 without any comment). Drop the minus sign to avoid any confusion. Fixes: fdc81b7910ad ("stable_kernel_rules: Add clause about specification of kernel versions to patch.") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Documentation/process/stable-kernel-rules.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cc2b043bc3f1e8139e807528c8041c15924a411 Author: Gao Feng Date: Thu Apr 6 23:05:49 2017 +0800 net: tcp: Increase TCP_MIB_OUTRSTS even though fail to alloc skb Because TCP_MIB_OUTRSTS is an important count, so always increase it whatever send it successfully or not. Now move the increment of TCP_MIB_OUTRSTS to the top of tcp_send_active_reset to make sure it is increased always even though fail to alloc skb. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3aecfbb19ca746a62575de90957c14e03b9c5d23 Merge: cc663f4 321a52a Author: David S. Miller Date: Sat Apr 8 08:29:05 2017 -0700 Merge branch 'l2tp-sockopt-errors' Guillaume Nault says: ==================== l2tp: fix error handling of PPPoL2TP socket options Fix pppol2tp_[gs]etsockopt() so that they don't ignore errors returned by their helper functions. ==================== Signed-off-by: David S. Miller commit 321a52a39189d5e4af542f7dcdc07bba4545cf5d Author: Guillaume Nault Date: Thu Apr 6 18:31:21 2017 +0200 l2tp: don't mask errors in pppol2tp_getsockopt() pppol2tp_getsockopt() doesn't take into account the error code returned by pppol2tp_tunnel_getsockopt() or pppol2tp_session_getsockopt(). If error occurs there, pppol2tp_getsockopt() continues unconditionally and reports erroneous values. 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 364700cf8fd54f54ad08313464105a414e3bccb7 Author: Guillaume Nault Date: Thu Apr 6 18:31:20 2017 +0200 l2tp: don't mask errors in pppol2tp_setsockopt() pppol2tp_setsockopt() unconditionally overwrites the error value returned by pppol2tp_tunnel_setsockopt() or pppol2tp_session_setsockopt(), thus hiding errors from userspace. 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 | 2 -- 1 file changed, 2 deletions(-) commit 97fbfef6bd597888485b653175fb846c6998b60c Author: Shuxiao Zhang Date: Thu Apr 6 22:30:29 2017 +0800 staging: android: ashmem: lseek failed due to no FMODE_LSEEK. vfs_llseek will check whether the file mode has FMODE_LSEEK, no return failure. But ashmem can be lseek, so add FMODE_LSEEK to ashmem file. Comment From Greg Hackmann: ashmem_llseek() passes the llseek() call through to the backing shmem file. 91360b02ab48 ("ashmem: use vfs_llseek()") changed this from directly calling the file's llseek() op into a VFS layer call. This also adds a check for the FMODE_LSEEK bit, so without that bit ashmem_llseek() now always fails with -ESPIPE. Fixes: 91360b02ab48 ("ashmem: use vfs_llseek()") Signed-off-by: Shuxiao Zhang Tested-by: Greg Hackmann Cc: stable # 3.18+ Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 1 + 1 file changed, 1 insertion(+) commit 8b65bb57d87a66cd156f856f28f2bd72d7b2395e Merge: 542380a 86e1066 Author: Linus Torvalds Date: Sat Apr 8 01:42:05 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Several fixes here, mostly having to due with either build errors or memory corruptions depending upon whether you have THP enabled or not" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: remove unused wp_works_ok macro sparc32: Export vac_cache_size to fix build error sparc64: Fix memory corruption when THP is enabled sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write() arch/sparc: Avoid DCTI Couples sparc64: kern_addr_valid regression sparc64: Add support for 2G hugepages sparc64: Fix size check in huge_pte_alloc commit 542380a208c5eda9c27f9db099daa9d544626960 Merge: 62fedca 8786fa6 Author: Linus Torvalds Date: Sat Apr 8 01:39:43 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - Fix a problem with GICv3 userspace save/restore - Clarify GICv2 userspace save/restore ABI - Be more careful in clearing GIC LRs - Add missing synchronization primitive to our MMU handling code PPC: - Check for a NULL return from kzalloc s390: - Prevent translation exception errors on valid page tables for the instruction-exection-protection support x86: - Fix Page-Modification Logging when running a nested guest" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: PPC: Book3S HV: Check for kmalloc errors in ioctl KVM: nVMX: initialize PML fields in vmcs02 KVM: nVMX: do not leak PML full vmexit to L1 KVM: arm/arm64: vgic: Fix GICC_PMR uaccess on GICv3 and clarify ABI KVM: arm64: Ensure LRs are clear when they should be kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd KVM: s390: remove change-recording override support arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm commit 62fedca5cefb9a89f9e3c0e631afa505da7417a8 Merge: 56c2997 ab6434a Author: Linus Torvalds Date: Sat Apr 8 01:37:25 2017 -0700 Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit Pull audit cleanup from Paul Moore: "A week later than I had hoped, but as promised, here is the audit uninline-fix we talked about during the last audit pull request. The patch is slightly different than what we originally discussed as it made more sense to keep the audit_signal_info() function in auditsc.c rather than move it and bunch of other related variables/definitions into audit.c/audit.h. At some point in the future I need to look at how the audit code is organized across kernel/audit*, I suspect we could do things a bit better, but it doesn't seem like a -rc release is a good place for that ;) Regardless, this patch passes our tests without problem and looks good for v4.11" * 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit: audit: move audit_signal_info() into kernel/auditsc.c commit 56c29979653f6313b6c47b22f54ed54150fd92ed Merge: cefdc26 ce61287 Author: Linus Torvalds Date: Sat Apr 8 01:35:32 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : mm: move pcp and lru-pcp draining into single wq mailmap: update Yakir Yang email address mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() dax: fix radix tree insertion race mm, thp: fix setting of defer+madvise thp defrag mode ptrace: fix PTRACE_LISTEN race corrupting task->state vmlinux.lds: add missing VMLINUX_SYMBOL macros mm/page_alloc.c: fix print order in show_free_areas() userfaultfd: report actual registered features in fdinfo mm: fix page_vma_mapped_walk() for ksm pages commit ce612879ddc78ea7e4de4be80cba4ebf9caa07ee Author: Michal Hocko Date: Fri Apr 7 16:05:05 2017 -0700 mm: move pcp and lru-pcp draining into single wq We currently have 2 specific WQ_RECLAIM workqueues in the mm code. vmstat_wq for updating pcp stats and lru_add_drain_wq dedicated to drain per cpu lru caches. This seems more than necessary because both can run on a single WQ. Both do not block on locks requiring a memory allocation nor perform any allocations themselves. We will save one rescuer thread this way. On the other hand drain_all_pages() queues work on the system wq which doesn't have rescuer and so this depend on memory allocation (when all workers are stuck allocating and new ones cannot be created). Initially we thought this would be more of a theoretical problem but Hugh Dickins has reported: : 4.11-rc has been giving me hangs after hours of swapping load. At : first they looked like memory leaks ("fork: Cannot allocate memory"); : but for no good reason I happened to do "cat /proc/sys/vm/stat_refresh" : before looking at /proc/meminfo one time, and the stat_refresh stuck : in D state, waiting for completion of flush_work like many kworkers. : kthreadd waiting for completion of flush_work in drain_all_pages(). This worker should be using WQ_RECLAIM as well in order to guarantee a forward progress. We can reuse the same one as for lru draining and vmstat. Link: http://lkml.kernel.org/r/20170307131751.24936-1-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Tetsuo Handa Acked-by: Vlastimil Babka Acked-by: Mel Gorman Tested-by: Yang Li Tested-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 7 +++++++ mm/page_alloc.c | 9 ++++++++- mm/swap.c | 27 ++++++++------------------- mm/vmstat.c | 15 +++++++++------ 4 files changed, 32 insertions(+), 26 deletions(-) commit cdcf4330d5660998d06fcd899b443693ab3d652f Author: Jeffy Chen Date: Fri Apr 7 16:05:02 2017 -0700 mailmap: update Yakir Yang email address Set current email address to replace previous employers email addresses. Link: http://lkml.kernel.org/r/1491450722-6633-1-git-send-email-jeffy.chen@rock-chips.com Signed-off-by: Jeffy Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit 460bcec84e11c75122ace5976214abbc596eb91b Author: David Rientjes Date: Fri Apr 7 16:05:00 2017 -0700 mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() We got need_resched() warnings in swap_cgroup_swapoff() because swap_cgroup_ctrl[type].length is particularly large. Reschedule when needed. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1704061315270.80559@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_cgroup.c | 2 ++ 1 file changed, 2 insertions(+) commit e11f8b7b6c4ea13bf8af6b8f42b45e15b554a92b Author: Ross Zwisler Date: Fri Apr 7 16:04:57 2017 -0700 dax: fix radix tree insertion race While running generic/340 in my test setup I hit the following race. It can happen with kernels that support FS DAX PMDs, so v4.10 thru v4.11-rc5. Thread 1 Thread 2 -------- -------- dax_iomap_pmd_fault() grab_mapping_entry() spin_lock_irq() get_unlocked_mapping_entry() 'entry' is NULL, can't call lock_slot() spin_unlock_irq() radix_tree_preload() dax_iomap_pmd_fault() grab_mapping_entry() spin_lock_irq() get_unlocked_mapping_entry() ... lock_slot() spin_unlock_irq() dax_pmd_insert_mapping() spin_lock_irq() __radix_tree_insert() fails with -EEXIST The issue is that we have to drop mapping->tree_lock while calling radix_tree_preload(), but since we didn't have a radix tree entry to lock (unlike in the pmd_downgrade case) we have no protection against Thread 2 coming along and inserting a PMD at the same index. For 4k entries we handled this with a special-case response to -EEXIST coming from the __radix_tree_insert(), but this doesn't save us for PMDs because the -EEXIST case can also mean that we collided with a 4k entry in the radix tree at a different index, but one that is covered by our PMD range. So, correctly handle both the 4k and 2M collision cases by explicitly re-checking the radix tree for an entry at our index once we reacquire mapping->tree_lock. This patch has made it through a clean xfstests run with the current v4.11-rc5 based linux/master, and it also ran generic/340 500 times in a loop. It used to fail within the first 10 iterations. Link: http://lkml.kernel.org/r/20170406212944.2866-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: "Darrick J. Wong" Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Jan Kara Cc: Matthew Wilcox Cc: [4.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 4fad7fb6b0279a85e16e6a63e0f1f7d98cedddf1 Author: David Rientjes Date: Fri Apr 7 16:04:54 2017 -0700 mm, thp: fix setting of defer+madvise thp defrag mode Setting thp defrag mode of "defer+madvise" actually sets "defer" in the kernel due to the name similarity and the out-of-order way the string is checked in defrag_store(). Check the string in the correct order so that TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_OR_MADV_FLAG is set appropriately for "defer+madvise". Fixes: 21440d7eb904 ("mm, thp: add new defer+madvise defrag option") Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1704051814420.137626@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5402e97af667e35e54177af8f6575518bf251d51 Author: bsegall@google.com Date: Fri Apr 7 16:04:51 2017 -0700 ptrace: fix PTRACE_LISTEN race corrupting task->state In PT_SEIZED + LISTEN mode STOP/CONT signals cause a wakeup against __TASK_TRACED. If this races with the ptrace_unfreeze_traced at the end of a PTRACE_LISTEN, this can wake the task /after/ the check against __TASK_TRACED, but before the reset of state to TASK_TRACED. This causes it to instead clobber TASK_WAKING, allowing a subsequent wakeup against TRACED while the task is still on the rq wake_list, corrupting it. Oleg said: "The kernel can crash or this can lead to other hard-to-debug problems. In short, "task->state = TASK_TRACED" in ptrace_unfreeze_traced() assumes that nobody else can wake it up, but PTRACE_LISTEN breaks the contract. Obviusly it is very wrong to manipulate task->state if this task is already running, or WAKING, or it sleeps again" [akpm@linux-foundation.org: coding-style fixes] Fixes: 9899d11f ("ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL") Link: http://lkml.kernel.org/r/xm26y3vfhmkp.fsf_-_@bsegall-linux.mtv.corp.google.com Signed-off-by: Ben Segall Acked-by: Oleg Nesterov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ptrace.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d79bf21e0e02f8ad24219f0587cc599a7e67f6c6 Author: Jessica Yu Date: Fri Apr 7 16:04:48 2017 -0700 vmlinux.lds: add missing VMLINUX_SYMBOL macros When __{start,end}_ro_after_init is referenced from C code, we run into the following build errors on blackfin: kernel/extable.c:169: undefined reference to `__start_ro_after_init' kernel/extable.c:169: undefined reference to `__end_ro_after_init' The build error is due to the fact that blackfin is one of the few arches that prepends an underscore '_' to all symbols defined in C. Fix this by wrapping __{start,end}_ro_after_init in vmlinux.lds.h with VMLINUX_SYMBOL(), which adds the necessary prefix for arches that have HAVE_UNDERSCORE_SYMBOL_PREFIX. Link: http://lkml.kernel.org/r/1491259387-15869-1-git-send-email-jeyu@redhat.com Signed-off-by: Jessica Yu Acked-by: Kees Cook Cc: Arnd Bergmann Cc: Eddie Kovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/vmlinux.lds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f06b81aea5ecba2c1f8afd87e0ba1b9f8f90160 Author: Alexander Polakov Date: Fri Apr 7 16:04:45 2017 -0700 mm/page_alloc.c: fix print order in show_free_areas() Fixes: 11fb998986a72a ("mm: move most file-based accounting to the node") Link: http://lkml.kernel.org/r/1490377730.30219.2.camel@beget.ru Signed-off-by: Alexander Polyakov Acked-by: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 045098e944959d4cbd56bbf33e2f26045863b7ca Author: Mike Rapoport Date: Fri Apr 7 16:04:42 2017 -0700 userfaultfd: report actual registered features in fdinfo fdinfo for userfault file descriptor reports UFFD_API_FEATURES. Up until recently, the UFFD_API_FEATURES was defined as 0, therefore corresponding field in fdinfo always contained zero. Now, with introduction of several additional features, UFFD_API_FEATURES is not longer 0 and it seems better to report actual features requested for the userfaultfd object described by the fdinfo. First, the applications that were using userfault will still see zero at the features field in fdinfo. Next, reporting actual features rather than available features, gives clear indication of what userfault features are used by an application. Link: http://lkml.kernel.org/r/1491140181-22121-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d75450ff40df0199bf13dfb19f435519ff947138 Author: Hugh Dickins Date: Fri Apr 7 16:04:39 2017 -0700 mm: fix page_vma_mapped_walk() for ksm pages Doug Smythies reports oops with KSM in this backtrace, I've been seeing the same: page_vma_mapped_walk+0xe6/0x5b0 page_referenced_one+0x91/0x1a0 rmap_walk_ksm+0x100/0x190 rmap_walk+0x4f/0x60 page_referenced+0x149/0x170 shrink_active_list+0x1c2/0x430 shrink_node_memcg+0x67a/0x7a0 shrink_node+0xe1/0x320 kswapd+0x34b/0x720 Just as observed in commit 4b0ece6fa016 ("mm: migrate: fix remove_migration_pte() for ksm pages"), you cannot use page->index calculations on ksm pages. page_vma_mapped_walk() is relying on __vma_address(), where a ksm page can lead it off the end of the page table, and into whatever nonsense is in the next page, ending as an oops inside check_pte()'s pte_page(). KSM tells page_vma_mapped_walk() exactly where to look for the page, it does not need any page->index calculation: and that's so also for all the normal and file and anon pages - just not for THPs and their subpages. Get out early in most cases: instead of a PageKsm test, move down the earlier not-THP-page test, as suggested by Kirill. I'm also slightly worried that this loop can stray into other vmas, so added a vm_end test to prevent surprises; though I have not imagined anything worse than a very contrived case, in which a page mlocked in the next vma might be reclaimed because it is not mlocked in this vma. Fixes: ace71a19cec5 ("mm: introduce page_vma_mapped_walk()") Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1704031104400.1118@eggly.anvils Signed-off-by: Hugh Dickins Reported-by: Doug Smythies Tested-by: Doug Smythies Reviewed-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_vma_mapped.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 5fa22a6e1a8883fd4100809e0d4fa18c23d08b85 Merge: 12d28f9 d43e85b7 Author: Olof Johansson Date: Fri Apr 7 16:50:16 2017 -0700 Merge tag 'mvebu-fixes-4.11-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.11 (part 1) Fix build of the board code for orion5x when some parts are configured as module. * tag 'mvebu-fixes-4.11-1' of git://git.infradead.org/linux-mvebu: ARM: orion5x: only call into phylib when available Signed-off-by: Olof Johansson commit 12d28f94eb35d6309c8d86dad75ece76ee5c392e Merge: d4ee21e 0d98479 Author: Olof Johansson Date: Fri Apr 7 16:49:43 2017 -0700 Merge tag 'sunxi-fixes-for-4.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.11, bis Two fixes for the recent A33 cpufreq support, and one to fix a missing register in the A64 USB PHY node. * tag 'sunxi-fixes-for-4.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: a64: add pmu0 regs for USB PHY ARM: sun8i: a33: add operating-points-v2 property to all nodes ARM: sun8i: a33: remove highest OPP to fix CPU crashes Signed-off-by: Olof Johansson commit d4ee21ef61dfcaeba7542cdc1c9242364a8ca5c0 Merge: 0fa974b 62e24c5 Author: Olof Johansson Date: Fri Apr 7 16:49:08 2017 -0700 Merge tag 'reset-fixes-for-4.11-2' of git://git.pengutronix.de/git/pza/linux into fixes Reset controller fixes for v4.11 Fix devm_reset_controller_get_optional to return NULL for non-DT devices, if the RESET_CONTROLLER Kconfig option is enabled. This fixes probe failures of the 8250_dw driver on Intel platforms after commit acbdad8dd1ab ("serial: 8250_dw: simplify optional reset handling"). * tag 'reset-fixes-for-4.11-2' of git://git.pengutronix.de/git/pza/linux: reset: add exported __reset_control_get, return NULL if optional Signed-off-by: Olof Johansson commit 7c856152cb92f8eee2df29ef325a1b1f43161aff Author: Martin K. Petersen Date: Tue Apr 4 10:42:30 2017 -0400 scsi: sd: Fix capacity calculation with 32-bit sector_t We previously made sure that the reported disk capacity was less than 0xffffffff blocks when the kernel was not compiled with large sector_t support (CONFIG_LBDAF). However, this check assumed that the capacity was reported in units of 512 bytes. Add a sanity check function to ensure that we only enable disks if the entire reported capacity can be expressed in terms of sector_t. Cc: Reported-by: Steve Magnani Cc: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit bf6061b17a8d47ef0d9344d3ef576a4ff0edf793 Author: Sawan Chandak Date: Fri Mar 31 14:37:03 2017 -0700 scsi: qla2xxx: Add fix to read correct register value for ISP82xx. Add fix to read correct register value for ISP82xx, during check for register disconnect.ISP82xx has different base register. Fixes: a465537ad1a4 ("qla2xxx: Disable the adapter and skip error recovery in case of register disconnect") Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Cc: Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8eaf7dfcfcf222e56f7d1e0a9ffdd7be0f300c2f Author: Chad Dupuis Date: Thu Mar 23 06:58:47 2017 -0700 scsi: qedf: Fix crash due to unsolicited FIP VLAN response. We need to initialize qedf->fipvlan_compl in __qedf_probe so that if we receive an unsolicited FIP VLAN response, the system doesn't crash due to trying to complete an uninitialized completion. Also add a check to see if there are any waiters on the completion so we don't inadvertantly kick start the discovery process due to the unsolicited frame. Fixed the crash: <1>BUG: unable to handle kernel NULL pointer dereference at (null) <1>IP: [] __wake_up_common+0x31/0x90 <4>PGD 0 <4>Oops: 0000 [#1] SMP <4>last sysfs file: /sys/devices/system/cpu/online <4>CPU 7 <4>Modules linked in: autofs4 nfs lockd fscache auth_rpcgss nfs_acl sunrpc target_core_iblock target_core_file target_core_pscsi target_core_mod configfs bnx2fc cnic fcoe 8021q garp stp llc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 vfat fat uinput ipmi_devintf microcode power_meter acpi_ipmi ipmi_si ipmi_msghandler iTCO_wdt iTCO_vendor_support dcdbas sg joydev sb_edac edac_core lpc_ich mfd_core shpchp tg3 ptp pps_core ext4 jbd2 mbcache sr_mod cdrom sd_mod crc_t10dif qedi(U) iscsi_boot_sysfs libiscsi scsi_transport_iscsi uio qedf(U) libfcoe libfc scsi_transport_fc scsi_tgt qede(U) qed(U) ahci megaraid_sas wmi dm_mirror dm_region_hash dm_log dm_mod [last unloaded: speedstep_lib] <4> <4>Pid: 1485, comm: qedf_11_ll2 Not tainted 2.6.32-642.el6.x86_64 #1 Dell Inc. PowerEdge R730/0599V5 <4>RIP: 0010:[] [] __wake_up_common+0x31/0x90 <4>RSP: 0018:ffff881068a83d50 EFLAGS: 00010086 <4>RAX: ffffffffffffffe8 RBX: ffff88106bf42de0 RCX: 0000000000000000 <4>RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffff88106bf42de0 <4>RBP: ffff881068a83d90 R08: 0000000000000000 R09: 00000000fffffffe <4>R10: 0000000000000000 R11: 000000000000000b R12: 0000000000000286 <4>R13: ffff88106bf42de8 R14: 0000000000000000 R15: 0000000000000000 <4>FS: 0000000000000000(0000) GS:ffff88089c460000(0000) knlGS:0000000000000000 <4>CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b <4>CR2: 0000000000000000 CR3: 0000000001a8d000 CR4: 00000000001407e0 <4>DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 <4>DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 <4>Process qedf_11_ll2 (pid: 1485, threadinfo ffff881068a80000, task ffff881068a70040) <4>Stack: <4> ffff88106ef00090 0000000300000001 ffff881068a83d90 ffff88106bf42de0 <4> 0000000000000286 ffff88106bf42dd8 ffff88106bf40a50 0000000000000002 <4> ffff881068a83dc0 ffffffff810634c7 ffff881000000003 000000000000000b <4>Call Trace: <4> [] complete+0x47/0x60 <4> [] qedf_fip_recv+0x1c7/0x450 [qedf] <4> [] qedf_ll2_recv_thread+0x33b/0x510 [qedf] <4> [] ? qedf_ll2_recv_thread+0x0/0x510 [qedf] <4> [] kthread+0x9e/0xc0 <4> [] child_rip+0xa/0x20 <4> [] ? kthread+0x0/0xc0 <4> [] ? child_rip+0x0/0x20 <4>Code: 41 56 41 55 41 54 53 48 83 ec 18 0f 1f 44 00 00 89 75 cc 89 55 c8 4c 8d 6f 08 48 8b 57 08 41 89 cf 4d 89 c6 48 8d 42 e8 49 39 d5 <48> 8b 58 18 74 3f 48 83 eb 18 eb 0a 0f 1f 00 48 89 d8 48 8d 5a <1>RIP [] __wake_up_common+0x31/0x90 <4> RSP <4>CR2: 0000000000000000 Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_fip.c | 3 ++- drivers/scsi/qedf/qedf_main.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit a00a7862513089f17209b732f230922f1942e0b9 Author: Martin K. Petersen Date: Fri Mar 17 08:47:14 2017 -0400 scsi: sr: Sanity check returned mode data Kefeng Wang discovered that old versions of the QEMU CD driver would return mangled mode data causing us to walk off the end of the buffer in an attempt to parse it. Sanity check the returned mode sense data. Cc: Reported-by: Kefeng Wang Tested-by: Kefeng Wang Signed-off-by: Martin K. Petersen drivers/scsi/sr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6780414519f91c2a84da9baa963a940ac916f803 Author: Fam Zheng Date: Tue Mar 28 12:41:26 2017 +0800 scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable If device reports a small max_xfer_blocks and a zero opt_xfer_blocks, we end up using BLK_DEF_MAX_SECTORS, which is wrong and r/w of that size may get error. [mkp: tweaked to avoid setting rw_max twice and added typecast] Cc: # v4.4+ Fixes: ca369d51b3e ("block/sd: Fix device-imposed transfer length limits") Signed-off-by: Fam Zheng Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cefdc26e86728812aea54248a534fd4a5da2a43d Author: Martin Brandenburg Date: Thu Apr 6 18:11:00 2017 -0400 orangefs: move features validation to fix filesystem hang Without this fix (and another to the userspace component itself described later), the kernel will be unable to process any OrangeFS requests after the userspace component is restarted (due to a crash or at the administrator's behest). The bug here is that inside orangefs_remount, the orangefs_request_mutex is locked. When the userspace component restarts while the filesystem is mounted, it sends a ORANGEFS_DEV_REMOUNT_ALL ioctl to the device, which causes the kernel to send it a few requests aimed at synchronizing the state between the two. While this is happening the orangefs_request_mutex is locked to prevent any other requests going through. This is only half of the bugfix. The other half is in the userspace component which outright ignores(!) requests made before it considers the filesystem remounted, which is after the ioctl returns. Of course the ioctl doesn't return until after the userspace component responds to the request it ignores. The userspace component has been changed to allow ORANGEFS_VFS_OP_FEATURES regardless of the mount status. Mike Marshall says: "I've tested this patch against the fixed userspace part. This patch is real important, I hope it can make it into 4.11... Here's what happens when the userspace daemon is restarted, without the patch: ============================================= [ INFO: possible recursive locking detected ] [ 4.10.0-00007-ge98bdb3 #1 Not tainted ] --------------------------------------------- pvfs2-client-co/29032 is trying to acquire lock: (orangefs_request_mutex){+.+.+.}, at: service_operation+0x3c7/0x7b0 [orangefs] but task is already holding lock: (orangefs_request_mutex){+.+.+.}, at: dispatch_ioctl_command+0x1bf/0x330 [orangefs] CPU: 0 PID: 29032 Comm: pvfs2-client-co Not tainted 4.10.0-00007-ge98bdb3 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.fc25 04/01/2014 Call Trace: __lock_acquire+0x7eb/0x1290 lock_acquire+0xe8/0x1d0 mutex_lock_killable_nested+0x6f/0x6e0 service_operation+0x3c7/0x7b0 [orangefs] orangefs_remount+0xea/0x150 [orangefs] dispatch_ioctl_command+0x227/0x330 [orangefs] orangefs_devreq_ioctl+0x29/0x70 [orangefs] do_vfs_ioctl+0xa3/0x6e0 SyS_ioctl+0x79/0x90" Signed-off-by: Martin Brandenburg Acked-by: Mike Marshall Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/orangefs/super.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c2eb7beac7638566f20f705cee48e0a3cd4e48b7 Merge: 81d4bab 794a860 Author: Linus Torvalds Date: Fri Apr 7 12:26:36 2017 -0700 Merge tag 'pci-v4.11-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix ThunderX legacy firmware resources - fix ARTPEC-6 and DesignWare platform driver NULL pointer dereferences - fix HiSilicon link error * tag 'pci-v4.11-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: dwc: Fix dw_pcie_ops NULL pointer dereference PCI: dwc: Select PCI_HOST_COMMON for hisi PCI: thunder-pem: Fix legacy firmware PEM-specific resources commit cc663f4d4c97b7297fb45135ab23cfd508b35a77 Author: Yuchung Cheng Date: Fri Apr 7 11:42:05 2017 -0700 tcp: restrict F-RTO to work-around broken middle-boxes The recent extension of F-RTO 89fe18e44 ("tcp: extend F-RTO to catch more spurious timeouts") interacts badly with certain broken middle-boxes. These broken boxes modify and falsely raise the receive window on the ACKs. During a timeout induced recovery, F-RTO would send new data packets to probe if the timeout is false or not. Since the receive window is falsely raised, the receiver would silently drop these F-RTO packets. The recovery would take N (exponentially backoff) timeouts to repair N packet losses. A TCP performance killer. Due to this unfortunate situation, this patch removes this extension to revert F-RTO back to the RFC specification. Fixes: 89fe18e44f7e ("tcp: extend F-RTO to catch more spurious timeouts") Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 6d8c6c0f97ad8a3517c42b179c1dc8e77397d0e2 Author: Bart Van Assche Date: Fri Apr 7 12:40:09 2017 -0600 blk-mq: Restart a single queue if tag sets are shared To improve scalability, if hardware queues are shared, restart a single hardware queue in round-robin fashion. Rename blk_mq_sched_restart_queues() to reflect the new semantics. Remove blk_mq_sched_mark_restart_queue() because this function has no callers. Remove flag QUEUE_FLAG_RESTART because this patch removes the code that uses this flag. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-sched.c | 63 ++++++++++++++++++++++++++++++++++++++++++-------- block/blk-mq-sched.h | 16 +------------ block/blk-mq.c | 2 +- include/linux/blkdev.h | 1 - 4 files changed, 55 insertions(+), 27 deletions(-) commit 6077c2d706097c00d8f2fed57d3f3c45cd228ee8 Author: Bart Van Assche Date: Fri Apr 7 11:16:54 2017 -0700 dm rq: Avoid that request processing stalls sporadically While running the srp-test software I noticed that request processing stalls sporadically at the beginning of a test, namely when mkfs is run against a dm-mpath device. Every time when that happened the following command was sufficient to resume request processing: echo run >/sys/kernel/debug/block/dm-0/state This patch avoids that such request processing stalls occur. The test I ran is as follows: while srp-test/run_tests -d -r 30 -t 02-mq; do :; done Signed-off-by: Bart Van Assche Cc: Mike Snitzer Cc: dm-devel@redhat.com Signed-off-by: Jens Axboe drivers/md/dm-rq.c | 1 + 1 file changed, 1 insertion(+) commit 36e3cf273977da34a760d513e1bef8431a9abaa0 Author: Bart Van Assche Date: Fri Apr 7 11:16:53 2017 -0700 scsi: Avoid that SCSI queues get stuck If a .queue_rq() function returns BLK_MQ_RQ_QUEUE_BUSY then the block driver that implements that function is responsible for rerunning the hardware queue once requests can be queued again successfully. commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") removed the blk_mq_stop_hw_queue() call from scsi_queue_rq() for the BLK_MQ_RQ_QUEUE_BUSY case. Hence change all calls to functions that are intended to rerun a busy queue such that these examine all hardware queues instead of only stopped queues. Since no other functions than scsi_internal_device_block() and scsi_internal_device_unblock() should ever stop or restart a SCSI queue, change the blk_mq_delay_queue() call into a blk_mq_delay_run_hw_queue() call. Fixes: commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") Fixes: commit 7e79dadce222 ("blk-mq: stop hardware queue in blk_mq_delay_queue()") Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: James Bottomley Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Long Li Cc: K. Y. Srinivasan Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7587a5ae7eef0439f7be31f1b5959af062bbc5ec Author: Bart Van Assche Date: Fri Apr 7 11:16:52 2017 -0700 blk-mq: Introduce blk_mq_delay_run_hw_queue() Introduce a function that runs a hardware queue unconditionally after a delay. Note: there is already a function that stops and restarts a hardware queue after a delay, namely blk_mq_delay_queue(). This function will be used in the next patch in this series. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Long Li Cc: K. Y. Srinivasan Signed-off-by: Jens Axboe block/blk-mq.c | 32 ++++++++++++++++++++++++++++++-- include/linux/blk-mq.h | 2 ++ 2 files changed, 32 insertions(+), 2 deletions(-) commit 81d4bab4ce87228c37ab14a885438544af5c9ce6 Merge: dc25ad3 86e3e83 Author: Linus Torvalds Date: Fri Apr 7 10:47:20 2017 -0700 Merge tag 'dm-4.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - two stable fixes for the verity target's FEC support - a stable fix for raid target's raid1 support (when no bitmap is used) - a 4.11 cache metadata v2 format fix to properly test blocks are clean * tag 'dm-4.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm verity fec: fix bufio leaks dm raid: fix NULL pointer dereference for raid1 without bitmap dm cache metadata: fix metadata2 format's blocks_are_clean_separate_dirty dm verity fec: limit error correction recursion commit dc25ad3fe1152559d5bbc792c1cb1f080a55f233 Merge: 4f0d14b 6ae979a Author: Linus Torvalds Date: Fri Apr 7 10:43:22 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "We've got a regression fix for the signal raised when userspace makes an unsupported unaligned access and a revert of the contiguous (hugepte) support for hugetlb, which has once again been found to be broken. One day, maybe, we'll get it right. Summary: - restore previous SIGBUS behaviour for unhandled unaligned user accesses - revert broken support for the contiguous bit in hugetlb (again...)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Revert "Revert "arm64: hugetlb: partial revert of 66b3923a1a0f"" arm64: mm: unaligned access by user-land should be received as SIGBUS commit 4f0d14b0c93ba0a60079605bdf0d3ecabadc7fde Merge: 7ab6618 b884a19 Author: Linus Torvalds Date: Fri Apr 7 10:11:53 2017 -0700 Merge tag 'metag-for-v4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull metag usercopy fixes from James Hogan: "Metag usercopy fault handling fixes These patches fix a bunch of longstanding (some over a decade old) metag user copy fault handling bugs. Thanks go to Al Viro for spotting some of the questionable code in the first place" * tag 'metag-for-v4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: metag/usercopy: Add missing fixups metag/usercopy: Fix src fixup in from user rapf loops metag/usercopy: Set flags before ADDZ metag/usercopy: Zero rest of buffer from copy_from_user metag/usercopy: Add early abort to copy_to_user metag/usercopy: Fix alignment error checking metag/usercopy: Drop unused macros commit 7ab661856bd7b30ef9e3b516330df7b5a5ea0c2c Merge: 50bdd7a dc752d54 Author: Linus Torvalds Date: Fri Apr 7 10:01:45 2017 -0700 Merge tag 'acpi-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes a core device enumeration code change made in 4.10, in order to address a reported issue, that went too far. Specifics: - Refine the check for the existence of _HID in find_child_checks() so that it doesn't trigger for device objects with device IDs made up by the kernel (Rafael Wysocki)" * tag 'acpi-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / scan: Prefer devices without _HID for _ADR matching commit 50bdd7a0c99afc78e8dd9403c10b947efc4af4f5 Merge: 5380e56 ac4cde3 Author: Linus Torvalds Date: Fri Apr 7 09:58:01 2017 -0700 Merge tag 'for-linus-4.11b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull Xen fix from Juergen Gross: "A fix for error path cleanup in the xenbus handler" * tag 'for-linus-4.11b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xenbus: remove transaction holder from list before freeing commit 5380e5644afbba9e3d229c36771134976f05c91e Author: Liping Zhang Date: Fri Apr 7 23:51:06 2017 +0800 sysctl: don't print negative flag for proc_douintvec I saw some very confusing sysctl output on my system: # cat /proc/sys/net/core/xfrm_aevent_rseqth -2 # cat /proc/sys/net/core/xfrm_aevent_etime -10 # cat /proc/sys/net/ipv4/tcp_notsent_lowat -4294967295 Because we forget to set the *negp flag in proc_douintvec, so it will become a garbage value. Since the value related to proc_douintvec is always an unsigned integer, so we can set *negp to false explictily to fix this issue. Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") Signed-off-by: Liping Zhang Cc: Subash Abhinov Kasiviswanathan Cc: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 1 + 1 file changed, 1 insertion(+) commit 1680a3868f00be638a8a213a321e88d11ce7e9f7 Author: Liping Zhang Date: Fri Apr 7 23:51:05 2017 +0800 sysctl: add sanity check for proc_douintvec Commit e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") introduced the proc_douintvec helper function, but it forgot to add the related sanity check when doing register_sysctl_table. So add it now. Signed-off-by: Liping Zhang Cc: Subash Abhinov Kasiviswanathan Cc: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 1 + 1 file changed, 1 insertion(+) commit 3c1a427954399fd1bda1ee7e1b356f47b61cee74 Author: Christian Borntraeger Date: Thu Apr 6 09:51:51 2017 +0200 perf annotate s390: Fix perf annotate error -95 (4.10 regression) since 4.10 perf annotate exits on s390 with an "unknown error -95". Turns out that commit 786c1b51844d ("perf annotate: Start supporting cross arch annotation") added a hard requirement for architecture support when objdump is used but only provided x86 and arm support. Meanwhile power was added so lets add s390 as well. While at it make sure to implement the branch and jump types. Signed-off-by: Christian Borntraeger Cc: Andreas Krebbel Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Peter Zijlstra Cc: linux-s390 Cc: stable@kernel.org # v4.10+ Fixes: 786c1b51844 "perf annotate: Start supporting cross arch annotation" Link: http://lkml.kernel.org/r/1491465112-45819-2-git-send-email-borntraeger@de.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9121b15b5628b38b4695282dc18c553440e0f79b Author: Juergen Gross Date: Fri Apr 7 17:28:23 2017 +0200 xen, fbfront: fix connecting to backend Connecting to the backend isn't working reliably in xen-fbfront: in case XenbusStateInitWait of the backend has been missed the backend transition to XenbusStateConnected will trigger the connected state only without doing the actions required when the backend has connected. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/xen-fbfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfc5b2b551d8c089079e754525839101b1b43624 Author: Bastian Stender Date: Fri Apr 7 17:28:23 2017 +0200 fbdev/ssd1307fb: fix optional VBAT support SSD1306 needs VBAT when it is wired in charge pump configuration only. Other controllers of the SSD1307 family do not need it at all. This was introduced by commit ba14301e0356 ("fbdev/ssd1307fb: add support to enable VBAT"). Without VBAT configuration the driver now fails with: failed to get VBAT regulator: -19 This is caused by misinterpretation of devm_regulator_get_optional which "returns a struct regulator corresponding to the regulator producer or IS_ERR() condition". Handle -ENODEV without bailing out and making VBAT support really optional. Signed-off-by: Bastian Stender Cc: Tomi Valkeinen Cc: Jyri Sarha Cc: Roger Quadros [b.zolnierkie: minor fixups] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/ssd1307fb.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit ebe8bddb6e30d7a02775b9972099271fc5910f37 Author: Omar Sandoval Date: Fri Apr 7 08:53:11 2017 -0600 blk-mq: remap queues when adding/removing hardware queues blk_mq_update_nr_hw_queues() used to remap hardware queues, which is the behavior that drivers expect. However, commit 4e68a011428a changed blk_mq_queue_reinit() to not remap queues for the case of CPU hotplugging, inadvertently making blk_mq_update_nr_hw_queues() not remap queues as well. This breaks, for example, NBD's multi-connection mode, leaving the added hardware queues unused. Fix it by making blk_mq_update_nr_hw_queues() explicitly remap the queues. Fixes: 4e68a011428a ("blk-mq: don't redistribute hardware queues on a CPU hotplug event") Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 54d5329d425650fafaf90660a139c771d2d49cae Author: Omar Sandoval Date: Fri Apr 7 08:52:27 2017 -0600 blk-mq-sched: fix crash in switch error path In elevator_switch(), if blk_mq_init_sched() fails, we attempt to fall back to the original scheduler. However, at this point, we've already torn down the original scheduler's tags, so this causes a crash. Doing the fallback like the legacy elevator path is much harder for mq, so fix it by just falling back to none, instead. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 13 +++++-- block/blk-mq-sched.h | 2 +- block/blk-mq.c | 2 -- block/blk-sysfs.c | 2 +- block/elevator.c | 94 +++++++++++++++++++++++++++--------------------- include/linux/elevator.h | 2 +- 6 files changed, 67 insertions(+), 48 deletions(-) commit 93252632e828da3e90241a1c0e766556abf71598 Author: Omar Sandoval Date: Wed Apr 5 12:01:31 2017 -0700 blk-mq-sched: set up scheduler tags when bringing up new queues If a new hardware queue is added at runtime, we don't allocate scheduler tags for it, leading to a crash. This hooks up the scheduler framework to blk_mq_{init,exit}_hctx() to make sure everything gets properly initialized/freed. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 22 ++++++++++++++++++++++ block/blk-mq-sched.h | 5 +++++ block/blk-mq.c | 9 ++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) commit 6917ff0b5bd4139e08a3f3146529dcb3b95ba7a6 Author: Omar Sandoval Date: Wed Apr 5 12:01:30 2017 -0700 blk-mq-sched: refactor scheduler initialization Preparation cleanup for the next couple of fixes, push blk_mq_sched_setup() and e->ops.mq.init_sched() into a helper. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 82 ++++++++++++++++++++++++++++------------------------ block/blk-mq-sched.h | 2 +- block/elevator.c | 32 ++++++++------------ 3 files changed, 57 insertions(+), 59 deletions(-) commit 81380ca10778b99dce98940cfc993214712df335 Author: Omar Sandoval Date: Fri Apr 7 08:56:26 2017 -0600 blk-mq: use the right hctx when getting a driver tag fails While dispatching requests, if we fail to get a driver tag, we mark the hardware queue as waiting for a tag and put the requests on a hctx->dispatch list to be run later when a driver tag is freed. However, blk_mq_dispatch_rq_list() may dispatch requests from multiple hardware queues if using a single-queue scheduler with a multiqueue device. If blk_mq_get_driver_tag() fails, it doesn't update the hardware queue we are processing. This means we end up using the hardware queue of the previous request, which may or may not be the same as that of the current request. If it isn't, the wrong hardware queue will end up waiting for a tag, and the requests will be on the wrong dispatch list, leading to a hang. The fix is twofold: 1. Make sure we save which hardware queue we were trying to get a request for in blk_mq_get_driver_tag() regardless of whether it succeeds or not. 2. Make blk_mq_dispatch_rq_list() take a request_queue instead of a blk_mq_hw_queue to make it clear that it must handle multiple hardware queues, since I've already messed this up on a couple of occasions. This didn't appear in testing with nvme and mq-deadline because nvme has more driver tags than the default number of scheduler tags. However, with the blk_mq_update_nr_hw_queues() fix, it showed up with nbd. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 9 +++++---- block/blk-mq.c | 25 +++++++++++++------------ block/blk-mq.h | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) commit 404a5c392dccf1ebcfc54bc39d2c200eb30f8fff Author: Cornelia Huck Date: Thu Mar 30 13:13:32 2017 +0200 MAINTAINERS: fix virtio file pattern The pattern did not catch include/linux/virtio.h. Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2055997f983c6db7b5c3940ce5f8f822657d5bc3 Author: Michael S. Tsirkin Date: Wed Mar 29 23:22:04 2017 +0300 virtio_console: fix uninitialized variable use We try to disable callbacks on c_ivq even without multiport even though that vq is not initialized in this configuration. Fixes: c743d09dbd01 ("virtio: console: Disable callbacks for virtqueues at start of S4 freeze") Suggested-by: Mike Galbraith Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fe36cbe0671e868cbd2f534a50ac60273fa5acf2 Author: Michael S. Tsirkin Date: Wed Mar 29 19:09:14 2017 +0300 virtio_net: clear MTU when out of range virtio attempts to clear the MTU feature bit if the value is out of the supported range, but this has no real effect since FEATURES_OK has already been set. Fix this up by checking the MTU in the new validate callback. Fixes: 14de9d114a82 ("virtio-net: Add initial MTU advice feature") Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 404123c2db798027e852480ed9c4accef9f1d9e6 Author: Michael S. Tsirkin Date: Wed Mar 29 19:06:20 2017 +0300 virtio: allow drivers to validate features Some drivers can't support all features in all configurations. At the moment we blindly set FEATURES_OK and later FAILED. Support this better by adding a callback drivers can use to do some early checks. Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio.c | 6 ++++++ include/linux/virtio.h | 1 + 2 files changed, 7 insertions(+) commit 2e123b44a3c19de75f40ee0081d6d4fc04adfdc7 Author: Michael S. Tsirkin Date: Wed Mar 8 02:14:25 2017 +0200 virtio_net: enable big packets for large MTU values If one enables e.g. jumbo frames without mergeable buffers, packets won't fit in 1500 byte buffers we use. Switch to big packet mode instead. TODO: make sizing more exact, possibly extend small packet mode to use larger pages. Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 4 ++++ 1 file changed, 4 insertions(+) commit 806a28efe9b78ffae5e2757e1ee924b8e50c08ab Author: Jan-Marek Glogowski Date: Mon Feb 20 12:25:58 2017 +0100 Reset TreeId to zero on SMB2 TREE_CONNECT Currently the cifs module breaks the CIFS specs on reconnect as described in http://msdn.microsoft.com/en-us/library/cc246529.aspx: "TreeId (4 bytes): Uniquely identifies the tree connect for the command. This MUST be 0 for the SMB2 TREE_CONNECT Request." Signed-off-by: Jan-Marek Glogowski Reviewed-by: Aurelien Aptel Tested-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable fs/cifs/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4fa8e504e5c0d7db9280ac96a4ac92192f1041f5 Author: Tobias Regnery Date: Thu Mar 30 12:34:14 2017 +0200 CIFS: Fix build failure with smb2 I saw the following build error during a randconfig build: fs/cifs/smb2ops.c: In function 'smb2_new_lease_key': fs/cifs/smb2ops.c:1104:2: error: implicit declaration of function 'generate_random_uuid' [-Werror=implicit-function-declaration] Explicit include the right header to fix this issue. Signed-off-by: Tobias Regnery Reviewed-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/smb2ops.c | 1 + 1 file changed, 1 insertion(+) commit 620d8745b35daaf507186c26b40c7ea02aed131e Author: Sachin Prabhu Date: Fri Feb 10 16:03:51 2017 +0530 Introduce cifs_copy_file_range() The earlier changes to copy range for cifs unintentionally disabled the more common form of server side copy. The patch introduces the file_operations helper cifs_copy_file_range() which is used by the syscall copy_file_range. The new file operations helper allows us to perform server side copies for SMB2.0 and 2.1 servers as well as SMB 3.0+ servers which do not support the ioctl FSCTL_DUPLICATE_EXTENTS_TO_FILE. The new helper uses the ioctl FSCTL_SRV_COPYCHUNK_WRITE to perform server side copies. The helper is called by vfs_copy_file_range() only once an attempt to clone the file using the ioctl FSCTL_DUPLICATE_EXTENTS_TO_FILE has failed. Signed-off-by: Sachin Prabhu Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/cifsfs.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/cifsfs.h | 5 ++++ fs/cifs/cifsglob.h | 6 ++-- fs/cifs/ioctl.c | 60 ++----------------------------------- fs/cifs/smb2ops.c | 20 ++++++++----- 5 files changed, 110 insertions(+), 68 deletions(-) commit 312bbc5946c4b73dfc1d64c1dd5b0f9df8016587 Author: Sachin Prabhu Date: Tue Apr 4 02:12:04 2017 -0500 SMB3: Rename clone_range to copychunk_range Server side copy is one of the most important mechanisms smb2/smb3 supports and it was unintentionally disabled for most use cases. Renaming calls to reflect the underlying smb2 ioctl called. This is similar to the name duplicate_extents used for a similar ioctl which is also used to duplicate files by reusing fs blocks. The name change is to avoid confusion. Signed-off-by: Sachin Prabhu CC: Stable Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 3 ++- fs/cifs/ioctl.c | 16 ++++++++-------- fs/cifs/smb2ops.c | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) commit 38bd49064a1ecb67baad33598e3d824448ab11ec Author: Sachin Prabhu Date: Fri Mar 3 15:41:38 2017 -0800 Handle mismatched open calls A signal can interrupt a SendReceive call which result in incoming responses to the call being ignored. This is a problem for calls such as open which results in the successful response being ignored. This results in an open file resource on the server. The patch looks into responses which were cancelled after being sent and in case of successful open closes the open fids. For this patch, the check is only done in SendReceive2() RH-bz: 1403319 Signed-off-by: Sachin Prabhu Reviewed-by: Pavel Shilovsky Cc: Stable fs/cifs/cifsglob.h | 11 ++++++++++ fs/cifs/cifsproto.h | 3 ++- fs/cifs/cifssmb.c | 11 ++++++---- fs/cifs/connect.c | 13 ++++++++++-- fs/cifs/smb2misc.c | 46 +++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2ops.c | 8 +++++-- fs/cifs/smb2proto.h | 7 +++++++ fs/cifs/smb2transport.c | 55 +++++++++++++++++++++++++++++++++++++++++++++---- fs/cifs/transport.c | 2 ++ 9 files changed, 143 insertions(+), 13 deletions(-) commit dc752d54fd3a69c882d24133810edeb22dda2d0d Merge: a71c9a1 fdad4e7 Author: Rafael J. Wysocki Date: Fri Apr 7 13:48:26 2017 +0200 Merge branch 'acpi-scan-fixes' * acpi-scan-fixes: ACPI / scan: Prefer devices without _HID for _ADR matching commit 6ae979ab39a368c18ceb0424bf824d172d6ab56f Author: Will Deacon Date: Fri Mar 31 12:23:43 2017 +0100 Revert "Revert "arm64: hugetlb: partial revert of 66b3923a1a0f"" The use of the contiguous bit by our hugetlb implementation violates the break-before-make requirements of the architecture and can lead to silent data corruption or TLB conflict aborts. Once again, disable these hugetlb sizes whilst it gets worked out. This reverts commit ab2e1b89230fa80328262c91d2d0a539a2790d6f. Conflicts: arch/arm64/mm/hugetlbpage.c Signed-off-by: Will Deacon arch/arm64/mm/hugetlbpage.c | 14 -------------- 1 file changed, 14 deletions(-) commit 4749228f022893faf54a3dbc70796f78b7d4f342 Author: Michael Ellerman Date: Thu Apr 6 23:34:38 2017 +1000 powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable() In crc32c_vpmsum() we call enable_kernel_altivec() without first disabling preemption, which is not allowed: WARNING: CPU: 9 PID: 2949 at ../arch/powerpc/kernel/process.c:277 enable_kernel_altivec+0x100/0x120 Modules linked in: dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c vmx_crypto ... CPU: 9 PID: 2949 Comm: docker Not tainted 4.11.0-rc5-compiler_gcc-6.3.1-00033-g308ac7563944 #381 ... NIP [c00000000001e320] enable_kernel_altivec+0x100/0x120 LR [d000000003df0910] crc32c_vpmsum+0x108/0x150 [crc32c_vpmsum] Call Trace: 0xc138fd09 (unreliable) crc32c_vpmsum+0x108/0x150 [crc32c_vpmsum] crc32c_vpmsum_update+0x3c/0x60 [crc32c_vpmsum] crypto_shash_update+0x88/0x1c0 crc32c+0x64/0x90 [libcrc32c] dm_bm_checksum+0x48/0x80 [dm_persistent_data] sb_check+0x84/0x120 [dm_thin_pool] dm_bm_validate_buffer.isra.0+0xc0/0x1b0 [dm_persistent_data] dm_bm_read_lock+0x80/0xf0 [dm_persistent_data] __create_persistent_data_objects+0x16c/0x810 [dm_thin_pool] dm_pool_metadata_open+0xb0/0x1a0 [dm_thin_pool] pool_ctr+0x4cc/0xb60 [dm_thin_pool] dm_table_add_target+0x16c/0x3c0 table_load+0x184/0x400 ctl_ioctl+0x2f0/0x560 dm_ctl_ioctl+0x38/0x50 do_vfs_ioctl+0xd8/0x920 SyS_ioctl+0x68/0xc0 system_call+0x38/0xfc It used to be sufficient just to call pagefault_disable(), because that also disabled preemption. But the two were decoupled in commit 8222dbe21e79 ("sched/preempt, mm/fault: Decouple preemption from the page fault logic") in mid 2015. So add the missing preempt_disable/enable(). We should also call disable_kernel_fp(), although it does nothing by default, there is a debug switch to make it active and all enables should be paired with disables. Fixes: 6dd7a82cc54e ("crypto: powerpc - Add POWER8 optimised crc32c") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Michael Ellerman arch/powerpc/crypto/crc32c-vpmsum_glue.c | 3 +++ 1 file changed, 3 insertions(+) commit 6118714275f0a313ecc296a87ed1af32d9691bed Author: Tony Lindgren Date: Thu Mar 30 09:16:39 2017 -0700 pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable() Recent pinctrl changes to allow dynamic allocation of pins exposed one more issue with the pinctrl pins claimed early by the controller itself. This caused a regression for IMX6 pinctrl hogs. Before enabling the pin controller driver we need to wait until it has been properly initialized, then claim the hogs, and only then enable it. To fix the regression, split the code into pinctrl_claim_hogs() and pinctrl_enable(). And then let's require that pinctrl_enable() is always called by the pin controller driver when ready after calling pinctrl_register_and_init(). Depends-on: 950b0d91dc10 ("pinctrl: core: Fix regression caused by delayed work for hogs") Fixes: df61b366af26 ("pinctrl: core: Use delayed work for hogs") Fixes: e566fc11ea76 ("pinctrl: imx: use generic pinctrl helpers for managing groups") Cc: Haojian Zhuang Cc: Masahiro Yamada Cc: Mika Penttilä Cc: Mika Westerberg Cc: Nishanth Menon Cc: Shawn Guo Cc: Stefan Agner Tested-by: Geert Uytterhoeven Tested-by: Gary Bisson Tested-by: Fabio Estevam Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij Documentation/pinctrl.txt | 8 ++- drivers/pinctrl/core.c | 97 +++++++++++++++++++++------------ drivers/pinctrl/freescale/pinctrl-imx.c | 2 +- drivers/pinctrl/pinctrl-single.c | 2 +- drivers/pinctrl/sh-pfc/pinctrl.c | 11 +++- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 2 + include/linux/pinctrl/pinctrl.h | 3 +- 7 files changed, 83 insertions(+), 42 deletions(-) commit 269c930e6698e6afa6d4606bfd241f4497597e79 Merge: 977674c bf9216f Author: Linus Torvalds Date: Thu Apr 6 14:42:05 2017 -0700 Merge tag 'xfs-4.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS fixes from Darrick Wong: "Here are three more fixes for 4.11. The first one reworks the inline directory verifier to check the working copy of the directory metadata and to avoid triggering a periodic crash in xfs/348. The second patch fixes a regression in hole punching at EOF that corrupts files; and the third patch closes a kernel memory disclosure bug. Summary: - rework the inline directory verifier to avoid crashes on disk corruption - don't change file size when punching holes w/ KEEP_SIZE - close a kernel memory exposure bug" * tag 'xfs-4.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix kernel memory exposure problems xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files xfs: rework the inline directory verifiers commit 16cf72bb085626ae1323e59985d6cbb58a8f71d8 Author: Xin Long Date: Thu Apr 6 13:41:28 2017 +0800 team: call netdev_change_features out of team lock Commit f6988cb63a4e ("team: don't call netdev_change_features under team->lock") fixed the issue calling netdev_change_features under team->lock for team_compute_features. But there are still two places where it calls netdev_change_features under team->lock, team_port_add and team_port_del. It may cause a dead lock when the slave port with LRO enabled is added. This patch is to fix this dead lock by moving netdev_change_features out of team_port_add and team_port_del, and call it after unlocking the team lock. Reported-by: Patrick Talbert Signed-off-by: Xin Long Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 34b2789f1d9bf8dcca9b5cb553d076ca2cd898ee Author: Xin Long Date: Thu Apr 6 13:10:52 2017 +0800 sctp: listen on the sock only when it's state is listening or closed Now sctp doesn't check sock's state before listening on it. It could even cause changing a sock with any state to become a listening sock when doing sctp_listen. This patch is to fix it by checking sock's state in sctp_listen, so that it will listen on the sock with right state. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 3 +++ 1 file changed, 3 insertions(+) commit 6c22fce07c97f765af1808ec3be007847e0b47d1 Author: Oliver Neukum Date: Wed Apr 5 14:14:39 2017 +0200 usbnet: make sure no NULL pointer is passed through Coverity reports: ** CID 751368: Null pointer dereferences (FORWARD_NULL) /drivers/net/usb/usbnet.c: 1925 in __usbnet_read_cmd() ________________________________________________________________________________________________________ *** CID 751368: Null pointer dereferences (FORWARD_NULL) /drivers/net/usb/usbnet.c: 1925 in __usbnet_read_cmd() 1919 EXPORT_SYMBOL(usbnet_link_change); 1920 1921 /*-------------------------------------------------------------------------*/ 1922 static int __usbnet_read_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, 1923 u16 value, u16 index, void *data, u16 size) 1924 { >>> CID 751368: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "buf" = "NULL". 1925 void *buf = NULL; 1926 int err = -ENOMEM; 1927 1928 netdev_dbg(dev->net, "usbnet_read_cmd cmd=0x%02x reqtype=%02x" 1929 " value=0x%04x index=0x%04x size=%d\n", 1930 cmd, reqtype, value, index, size); ** CID 751370: Null pointer dereferences (FORWARD_NULL) /drivers/net/usb/usbnet.c: 1952 in __usbnet_write_cmd() ________________________________________________________________________________________________________ *** CID 751370: Null pointer dereferences (FORWARD_NULL) /drivers/net/usb/usbnet.c: 1952 in __usbnet_write_cmd() 1946 } 1947 1948 static int __usbnet_write_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, 1949 u16 value, u16 index, const void *data, 1950 u16 size) 1951 { >>> CID 751370: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "buf" = "NULL". 1952 void *buf = NULL; 1953 int err = -ENOMEM; 1954 1955 netdev_dbg(dev->net, "usbnet_write_cmd cmd=0x%02x reqtype=%02x" 1956 " value=0x%04x index=0x%04x size=%d\n", 1957 cmd, reqtype, value, index, size); ** CID 1325026: Null pointer dereferences (FORWARD_NULL) /drivers/net/usb/ch9200.c: 143 in control_write() It is valid to offer commands without a buffer, but then you need a size of zero. This should actually be checked. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 977674c06b189dd54729a91331c05761688ad064 Merge: 4691f4a db8466c Author: Linus Torvalds Date: Thu Apr 6 13:16:34 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Lantiq: - Fix adding xbar resoures causing a panic Loongson3: - Some Loongson 3A don't identify themselves as having an FTLB so hardwire that knowledge into CPU probing. - Handle Loongson 3 TLB peculiarities in the fast path of the RDHWR emulation. - Fix invalid FTLB entries with huge page on VTLB+FTLB platforms - Add missing calculation of S-cache and V-cache cache-way size Ralink: - Fix typos in rt3883 pinctrl data Generic: - Force o32 fp64 support on 32bit MIPS64r6 kernels - Yet another build fix after the linux/sched.h changes - Wire up statx system call - Fix stack unwinding after introduction of IRQ stack - Fix spinlock code to build even for microMIPS with recent binutils SMP-CPS: - Fix retrieval of VPE mask on big endian CPUs" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: IRQ Stack: Unwind IRQ stack onto task stack MIPS: c-r4k: Fix Loongson-3's vcache/scache waysize calculation MIPS: Flush wrong invalid FTLB entry for huge page MIPS: Check TLB before handle_ri_rdhwr() for Loongson-3 MIPS: Add MIPS_CPU_FTLB for Loongson-3A R2 MIPS: Lantiq: fix missing xbar kernel panic MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs MIPS: Wire up statx system call MIPS: Include asm/ptrace.h now linux/sched.h doesn't MIPS: ralink: Fix typos in rt3883 pinctrl MIPS: End spinlocks with .insn MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels commit 4691f4a6d4aadb67eab06c6659136bc2b00db851 Merge: ea6b172 62277de Author: Linus Torvalds Date: Thu Apr 6 13:12:12 2017 -0700 Merge tag 'trace-v4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Wei Yongjun fixed a long standing bug in the ring buffer startup test. If for some unknown reason, the kthread that is created fails to be created, the return from kthread_create() is an PTR_ERR and not a NULL. The test incorrectly checks for NULL instead of an error" * tag 'trace-v4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ring-buffer: Fix return value check in test_ringbuffer() commit 92f9170621a13e4ba4eda6dfb070318d5405a0cf Author: WANG Cong Date: Tue Apr 4 18:51:30 2017 -0700 net_sched: check noop_qdisc before qdisc_hash_add() Dmitry reported a crash when injecting faults in attach_one_default_qdisc() and dev->qdisc is still a noop_disc, the check before qdisc_hash_add() fails to catch it because it tests NULL. We should test against noop_qdisc since it is the default qdisc at this point. Fixes: 59cc1f61f09c ("net: sched: convert qdisc linked list to hashtable") Reported-by: Dmitry Vyukov Cc: Jiri Kosina Signed-off-by: Cong Wang Acked-by: Jiri Kosina Signed-off-by: David S. Miller net/sched/sch_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8801799c6975601fd58ae62f48964caec2eb83f Author: Florian Larysch Date: Mon Apr 3 16:46:09 2017 +0200 net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to ip_route_input when iif is given. If a multipath route is present for the designated destination, ip_multipath_icmp_hash ends up being called, which uses the source/destination addresses within the skb to calculate a hash. However, those are not set in the synthetic skb, causing it to return an arbitrary and incorrect result. Instead, use UDP, which gets no such special treatment. Signed-off-by: Florian Larysch Signed-off-by: David S. Miller net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86e1066fe2af51dce4351c2357223e0d902dfc7a Author: Mathias Krause Date: Wed Apr 5 21:24:20 2017 +0200 sparc: remove unused wp_works_ok macro It's unused for ages, used to be required for ksyms.c back in the v1.1 times. Signed-off-by: Mathias Krause Acked-by: David S. Miller Signed-off-by: David S. Miller arch/sparc/include/asm/processor_32.h | 6 ------ arch/sparc/include/asm/processor_64.h | 4 ---- 2 files changed, 10 deletions(-) commit 9d262d95114cf2e2ac5e0ff358347fa2e214eda5 Author: Guenter Roeck Date: Sat Apr 1 13:47:44 2017 -0700 sparc32: Export vac_cache_size to fix build error sparc32:allmodconfig fails to build with the following error. ERROR: "vac_cache_size" [drivers/infiniband/sw/rxe/rdma_rxe.ko] undefined! Fixes: cb8864559631 ("infiniband: Fix alignment of mmap cookies ...") Cc: Jason Gunthorpe Cc: Doug Ledford Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller arch/sparc/mm/srmmu.c | 1 + 1 file changed, 1 insertion(+) commit 76811263b3fa6347699a446cddeb63badf3e6095 Author: Nitin Gupta Date: Fri Mar 31 15:48:53 2017 -0700 sparc64: Fix memory corruption when THP is enabled The memory corruption was happening due to incorrect TLB/TSB flushing of hugepages. Reported-by: David S. Miller Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/tlb.c | 6 +++--- arch/sparc/mm/tsb.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9ae34dbd8afd790cb5f52467e4f816434379eafa Author: Tom Hromatka Date: Fri Mar 31 16:31:42 2017 -0600 sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write() This commit moves sparc64's prototype of pmd_write() outside of the CONFIG_TRANSPARENT_HUGEPAGE ifdef. In 2013, commit a7b9403f0e6d ("sparc64: Encode huge PMDs using PTE encoding.") exposed a path where pmd_write() could be called without CONFIG_TRANSPARENT_HUGEPAGE defined. This can result in the panic below. The diff is awkward to read, but the changes are straightforward. pmd_write() was moved outside of #ifdef CONFIG_TRANSPARENT_HUGEPAGE. Also, __HAVE_ARCH_PMD_WRITE was defined. kernel BUG at include/asm-generic/pgtable.h:576! \|/ ____ \|/ "@'/ .. \`@" /_| \__/ |_\ \__U_/ oracle_8114_cdb(8114): Kernel bad sw trap 5 [#1] CPU: 120 PID: 8114 Comm: oracle_8114_cdb Not tainted 4.1.12-61.7.1.el6uek.rc1.sparc64 #1 task: fff8400700a24d60 ti: fff8400700bc4000 task.ti: fff8400700bc4000 TSTATE: 0000004411e01607 TPC: 00000000004609f8 TNPC: 00000000004609fc Y: 00000005 Not tainted TPC: g0: 000000000001c000 g1: 0000000000ef3954 g2: 0000000000000000 g3: 0000000000000001 g4: fff8400700a24d60 g5: fff8001fa5c10000 g6: fff8400700bc4000 g7: 0000000000000720 o0: 0000000000bc5058 o1: 0000000000000240 o2: 0000000000006000 o3: 0000000000001c00 o4: 0000000000000000 o5: 0000048000080000 sp: fff8400700bc6ab1 ret_pc: 00000000004609f0 RPC: l0: fff8400700bc74fc l1: 0000000000020000 l2: 0000000000002000 l3: 0000000000000000 l4: fff8001f93250950 l5: 000000000113f800 l6: 0000000000000004 l7: 0000000000000000 i0: fff8400700ca46a0 i1: bd0000085e800453 i2: 000000026a0c4000 i3: 000000026a0c6000 i4: 0000000000000001 i5: fff800070c958de8 i6: fff8400700bc6b61 i7: 0000000000460dd0 I7: Call Trace: [0000000000460dd0] gup_pud_range+0x170/0x1a0 [0000000000460e84] get_user_pages_fast+0x84/0x120 [00000000006f5a18] iov_iter_get_pages+0x98/0x240 [00000000005fa744] do_direct_IO+0xf64/0x1e00 [00000000005fbbc0] __blockdev_direct_IO+0x360/0x15a0 [00000000101f74fc] ext4_ind_direct_IO+0xdc/0x400 [ext4] [00000000101af690] ext4_ext_direct_IO+0x1d0/0x2c0 [ext4] [00000000101af86c] ext4_direct_IO+0xec/0x220 [ext4] [0000000000553bd4] generic_file_read_iter+0x114/0x140 [00000000005bdc2c] __vfs_read+0xac/0x100 [00000000005bf254] vfs_read+0x54/0x100 [00000000005bf368] SyS_pread64+0x68/0x80 Signed-off-by: Tom Hromatka Signed-off-by: David S. Miller arch/sparc/include/asm/pgtable_64.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 0e4c0ee580749502e25609b83082ac8d92c13023 Merge: ea6b172 3278682 Author: David S. Miller Date: Thu Apr 6 11:57:04 2017 -0700 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs commit d05d862ead8eca5e7d4ccf82d39d9189579ee5b1 Author: Arnaud Pouliquen Date: Tue Mar 28 15:04:55 2017 +0200 ASoC: STI: Fix null ptr deference in IRQ handler With RTlinux a race condition has been found that leads to NULL ptr crash: - On CPU 0: uni_player_irq_handler is called to treat XRUN "(player->state == UNIPERIF_STATE_STOPPED)" is FALSE so status is checked, dev_err(player->dev, "FIFO underflow error detected") is printed and then snd_pcm_stream_lock should be called to lock stream for stopping. - On CPU 1: application stop and close the stream. Issue is that the stop and shutdown functions are executed while "FIFO underflow error detected" is printed. So when CPU 0 calls snd_pcm_stream_lock, player->substream is already null. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/sti/uniperif.h | 1 + sound/soc/sti/uniperif_player.c | 35 ++++++++++++++++++++++++----------- sound/soc/sti/uniperif_reader.c | 24 ++++++++++++++++++++---- 3 files changed, 45 insertions(+), 15 deletions(-) commit a900152b5c29aea8134cc7a4c5db25552b3cd8f7 Author: David Wu Date: Wed Mar 1 19:10:55 2017 +0800 pwm: rockchip: State of PWM clock should synchronize with PWM enabled state If the PWM was not enabled at U-Boot loader, PWM could not work for clock always disabled at PWM driver. The PWM clock is enabled at beginning of pwm_apply(), but disabled at end of pwm_apply(). If the PWM was enabled at U-Boot loader, PWM clock is always enabled unless closed by ATF. The pwm-backlight might turn off the power at early suspend, should disable PWM clock for saving power consume. It is important to provide opportunity to enable/disable clock at PWM driver, the PWM consumer should ensure correct order to call PWM enable and disable, and PWM driver ensure state of PWM clock synchronized with PWM enabled state. Fixes: 2bf1c98aa5a4 ("pwm: rockchip: Add support for atomic update") Cc: stable@vger.kernel.org Signed-off-by: David Wu Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-rockchip.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) commit fe1a83b43869790501ed82b58dc8229023c69f74 Author: Xiaolei Yu Date: Thu Mar 30 19:43:09 2017 +0800 HID: uclogic: add support for Ugee Tablet EX07S This device has a different vendor id but responds to initialization. Signed-off-by: Xiaolei Yu Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-uclogic.c | 2 ++ 3 files changed, 6 insertions(+) commit b997e3edca4fb4ab7732ab7240c545da0c360a44 Author: Hans de Goede Date: Thu Apr 6 14:54:01 2017 +0300 pwm: lpss: Set enable-bit before waiting for update-bit to go low At least on cherrytrail, the update bit will never go low when the enabled bit is not set. This causes the backlight on my cube iwork8 air tablet to never turn on again after being turned off because in the pwm_lpss_apply enable path pwm_lpss_update will fail causing an error exit and the enable-bit to never get set. Any following pwm_lpss_apply calls will fail the pwm_lpss_is_updating check. Since the docs say that the update bit should be set before the enable-bit, split pwm_lpss_update into setting the update-bit and pwm_lpss_wait_for_update, and move the pwm_lpss_wait_for_update call in the enable path to after setting the enable-bit. Fixes: 10d56a4 ("pwm: lpss: Avoid reconfiguring while UPDATE bit...") Cc: Ilkka Koskinen Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss-pci.c | 1 + drivers/pwm/pwm-lpss-platform.c | 1 + drivers/pwm/pwm-lpss.c | 19 +++++++++++++------ drivers/pwm/pwm-lpss.h | 1 + 4 files changed, 16 insertions(+), 6 deletions(-) commit 3c1460e934f371bf91963b49a2cf173ee73c2cae Author: Andy Shevchenko Date: Thu Apr 6 14:54:00 2017 +0300 pwm: lpss: Split Tangier configuration As a preparation for special treatment for Broxton we split Tangier configuration. Fixes: b89b4b7a3d0a ("pwm: lpss: pci: Enable PWM module on Intel Edison") Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss-pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8786fa667a2b3dd263868dd09142937bd207520f Merge: 6fd6410 abd80dc Author: Radim Krčmář Date: Thu Apr 6 14:41:39 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc From: Paul Mackerras A check for a NULL return from kzalloc in recently-added code. commit 0d98479738b950e30bb4f782d60099d44076ad67 Author: Icenowy Zheng Date: Wed Apr 5 22:30:34 2017 +0800 arm64: allwinner: a64: add pmu0 regs for USB PHY The USB PHY in A64 has a "pmu0" region, which controls the EHCI/OHCI controller pair that can be connected to the PHY0. Add the MMIO region for PHY node. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit abd80dcbc400fac878202136645e9acf0e0bfbd9 Author: Dan Carpenter Date: Fri Mar 17 23:41:14 2017 +0300 KVM: PPC: Book3S HV: Check for kmalloc errors in ioctl kzalloc() won't actually fail because sizeof(*resize) is small, but static checkers complain. Signed-off-by: Dan Carpenter Acked-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 ++++ 1 file changed, 4 insertions(+) commit da2ba564a6dcf46df4f828624ff55531ff11d5b0 Author: Ben Skeggs Date: Thu Apr 6 10:35:26 2017 +1000 drm/nouveau: initial support (display-only) for GP107 Forked from GP106 implementation. Split out from commit enabling secboot/gr support so that it can be added to earlier kernels. Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2907e8670b6ef253bffb33bf47fd2182969cf2a0 Author: Ben Skeggs Date: Wed Apr 5 18:16:14 2017 +1000 drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane state When the atomic support was added to nouveau, the DRM core did not do this. However, later in the same merge window, a commit (drm/fence: add in-fences support) was merged that added it, leading to use-after-frees of the fence object. Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 2 -- 1 file changed, 2 deletions(-) commit d639fbcc102745187f747a21bdcffcf628e174c8 Author: Ben Skeggs Date: Wed Apr 5 09:12:54 2017 +1000 drm/nouveau/kms/nv50: fix setting of HeadSetRasterVertBlankDmi method Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f94773b9f5ecd1df7c88c2e921924dd41d2020cc Author: Ilia Mirkin Date: Sat Mar 18 16:23:10 2017 -0400 drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP and PCI varieties, rather than a core PCIE chip with a bridge for AGP/PCI as necessary. As a result, it appears that the MMU is also non-functional. For AGP cards, the vast majority of the NV4A lineup, this worked out since we force AGP cards to use the nv04 mmu. However for PCI variants, this did not work. Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for the suggestion. This should be a no-op for NV4A AGP boards, as they were using it already. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388 Signed-off-by: Ilia Mirkin Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83bce9c2baa51e439480a713119a73d3c8b61083 Author: Ilia Mirkin Date: Sat Mar 18 21:53:05 2017 -0400 drm/nouveau/mpeg: mthd returns true on success now Signed-off-by: Ilia Mirkin Fixes: 590801c1a3 ("drm/nouveau/mpeg: remove dependence on namedb/engctx lookup") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ea6b1720ce25f92f7a17b2e0c2b653d20773d10a Merge: aeb4a57 c383bdd Author: Linus Torvalds Date: Wed Apr 5 20:17:38 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Reject invalid updates to netfilter expectation policies, from Pablo Neira Ayuso. 2) Fix memory leak in nfnl_cthelper, from Jeffy Chen. 3) Don't do stupid things if we get a neigh_probe() on a neigh entry whose ops lack a solicit method. From Eric Dumazet. 4) Don't transmit packets in r8152 driver when the carrier is off, from Hayes Wang. 5) Fix ipv6 packet type detection in aquantia driver, from Pavel Belous. 6) Don't write uninitialized data into hw registers in bna driver, from Arnd Bergmann. 7) Fix locking in ping_unhash(), from Eric Dumazet. 8) Make BPF verifier range checks able to understand certain sequences emitted by LLVM, from Alexei Starovoitov. 9) Fix use after free in ipconfig, from Mark Rutland. 10) Fix refcount leak on force commit in openvswitch, from Jarno Rajahalme. 11) Fix various overflow checks in AF_PACKET, from Andrey Konovalov. 12) Fix endianness bug in be2net driver, from Suresh Reddy. 13) Don't forget to wake TX queues when processing a timeout, from Grygorii Strashko. 14) ARP header on-stack storage is wrong in flow dissector, from Simon Horman. 15) Lost retransmit and reordering SNMP stats in TCP can be underreported. From Yuchung Cheng. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (82 commits) nfp: fix potential use after free on xdp prog tcp: fix reordering SNMP under-counting tcp: fix lost retransmit SNMP under-counting sctp: get sock from transport in sctp_transport_update_pmtu net: ethernet: ti: cpsw: fix race condition during open() l2tp: fix PPP pseudo-wire auto-loading bnx2x: fix spelling mistake in macros HW_INTERRUT_ASSERT_SET_* l2tp: take reference on sessions being dumped tcp: minimize false-positives on TCP/GRO check sctp: check for dst and pathmtu update in sctp_packet_config flow dissector: correct size of storage for ARP net: ethernet: ti: cpsw: wake tx queues on ndo_tx_timeout l2tp: take a reference on sessions used in genetlink handlers l2tp: hold session while sending creation notifications l2tp: fix duplicate session creation l2tp: ensure session can't get removed during pppol2tp_session_ioctl() l2tp: fix race in l2tp_recv_common() sctp: use right in and out stream cnt bpf: add various verifier test cases for self-tests bpf, verifier: fix rejection of unaligned access checks for map_value_adj ... commit a34f83639490a5cc11a9d5c1b3773d4b6eb69a9e Author: Min He Date: Thu Apr 6 11:01:45 2017 +0800 drm/i915/gvt: set the correct default value of CTX STATUS PTR Fix wrong initial csb read pointer value. This fixes the random engine timeout issue in guest when guest boots up. Fixes: 8453d674ae7e ("drm/i915/gvt: vGPU execlist virtualization") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Min He Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c383bdd14f91562babd269aa7c36b46fee7b6c75 Author: Jakub Kicinski Date: Tue Apr 4 15:56:55 2017 -0700 nfp: fix potential use after free on xdp prog We should unregister the net_device first, before we give back our reference on xdp_prog. Otherwise xdp_prog may be freed before .ndo_stop() disabled the datapath. Found by code inspection. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d2517ee314ef1de0517f74d06c2825fbf597ba3 Author: Yuchung Cheng Date: Tue Apr 4 14:15:40 2017 -0700 tcp: fix reordering SNMP under-counting Currently the reordering SNMP counters only increase if a connection sees a higher degree then it has previously seen. It ignores if the reordering degree is not greater than the default system threshold. This significantly under-counts the number of reordering events and falsely convey that reordering is rare on the network. This patch properly and faithfully records the number of reordering events detected by the TCP stack, just like the comment says "this exciting event is worth to be remembered". Note that even so TCP still under-estimate the actual reordering events because TCP requires TS options or certain packet sequences to detect reordering (i.e. ACKing never-retransmitted sequence in recovery or disordered state). Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit ecde8f36f8a05a023b9d026e9094571aab421d36 Author: Yuchung Cheng Date: Tue Apr 4 14:15:39 2017 -0700 tcp: fix lost retransmit SNMP under-counting The lost retransmit SNMP stat is under-counting retransmission that uses segment offloading. This patch fixes that so all retransmission related SNMP counters are consistent. Fixes: 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time") Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3872fe83a2fbb7366daa93ca533a22138e2d483e Merge: 3cc070c 974310d Author: Russell King Date: Wed Apr 5 23:43:03 2017 +0100 Merge branch 'kprobe-fixes' of https://git.linaro.org/people/tixy/kernel into fixes commit 3d016d57fdc5e6caa4cd67896f4b081bccad6e2c Author: Takashi Sakamoto Date: Mon Apr 3 21:13:40 2017 +0900 ALSA: oxfw: fix regression to handle Stanton SCS.1m/1d At a commit 6c29230e2a5f ("ALSA: oxfw: delayed registration of sound card"), ALSA oxfw driver fails to handle SCS.1m/1d, due to -EBUSY at a call of snd_card_register(). The cause is that the driver manages to register two rawmidi instances with the same device number 0. This is a regression introduced since kernel 4.7. This commit fixes the regression, by fixing up device property after discovering stream formats. Fixes: 6c29230e2a5f ("ALSA: oxfw: delayed registration of sound card") Cc: # 4.7+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeb4a5768179f525dd7ec9393f34012c147e78cf Merge: 9f0bffa b237640 Author: Linus Torvalds Date: Wed Apr 5 09:04:26 2017 -0700 Merge tag 'mfd-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD bug fix from Lee Jones: "Increase buffer size om cros-ec to allow for SPI messages" * tag 'mfd-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: cros-ec: Fix host command buffer size commit 9f0bffa18cbbe9f88838faa89d85447c4f6120e5 Merge: 308ac75 9be3213 Author: Linus Torvalds Date: Wed Apr 5 08:37:28 2017 -0700 Merge tag 'kbuild-fixes-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - hand-off primary maintainership of Kbuild - fix build warnings - fix build error when GCOV is enabled with old compiler - fix HAVE_ASM_GOTO check when GCC plugin is enabled * tag 'kbuild-fixes-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: gconfig: remove misleading parentheses around a condition jump label: fix passing kbuild_cflags when checking for asm goto support Kbuild: use cc-disable-warning consistently for maybe-uninitialized kbuild: external module build warnings when KBUILD_OUTPUT set and W=1 MAINTAINERS: add Masahiro Yamada as a Kbuild maintainer commit 6fd6410311d618d80748b0a5dd3e8d6cd17662bc Merge: 1fb883b 6d56111 Author: Radim Krčmář Date: Wed Apr 5 16:27:47 2017 +0200 Merge tag 'kvm-arm-for-v4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm From: Christoffer Dall KVM/ARM Fixes for v4.11-rc6 Fixes include: - Fix a problem with GICv3 userspace save/restore - Clarify GICv2 userspace save/restore ABI - Be more careful in clearing GIC LRs - Add missing synchronization primitive to our MMU handling code commit b884a190afcecdbef34ca508ea5ee88bb7c77861 Author: James Hogan Date: Tue Apr 4 08:51:34 2017 +0100 metag/usercopy: Add missing fixups The rapf copy loops in the Meta usercopy code is missing some extable entries for HTP cores with unaligned access checking enabled, where faults occur on the instruction immediately after the faulting access. Add the fixup labels and extable entries for these cases so that corner case user copy failures don't cause kernel crashes. Fixes: 373cd784d0fc ("metag: Memory handling") Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 72 +++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 24 deletions(-) commit 2c0b1df88b987a12d95ea1d6beaf01894f3cc725 Author: James Hogan Date: Mon Apr 3 17:41:40 2017 +0100 metag/usercopy: Fix src fixup in from user rapf loops The fixup code to rewind the source pointer in __asm_copy_from_user_{32,64}bit_rapf_loop() always rewound the source by a single unit (4 or 8 bytes), however this is insufficient if the fault didn't occur on the first load in the loop, as the source pointer will have been incremented but nothing will have been stored until all 4 register [pairs] are loaded. Read the LSM_STEP field of TXSTATUS (which is already loaded into a register), a bit like the copy_to_user versions, to determine how many iterations of MGET[DL] have taken place, all of which need rewinding. Fixes: 373cd784d0fc ("metag: Memory handling") Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit fd40eee1290ad7add7aa665e3ce6b0f9fe9734b4 Author: James Hogan Date: Tue Apr 4 11:43:26 2017 +0100 metag/usercopy: Set flags before ADDZ The fixup code for the copy_to_user rapf loops reads TXStatus.LSM_STEP to decide how far to rewind the source pointer. There is a special case for the last execution of an MGETL/MGETD, since it leaves LSM_STEP=0 even though the number of MGETLs/MGETDs attempted was 4. This uses ADDZ which is conditional upon the Z condition flag, but the AND instruction which masked the TXStatus.LSM_STEP field didn't set the condition flags based on the result. Fix that now by using ANDS which does set the flags, and also marking the condition codes as clobbered by the inline assembly. Fixes: 373cd784d0fc ("metag: Memory handling") Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 563ddc1076109f2b3f88e6d355eab7b6fd4662cb Author: James Hogan Date: Fri Mar 31 11:14:02 2017 +0100 metag/usercopy: Zero rest of buffer from copy_from_user Currently we try to zero the destination for a failed read from userland in fixup code in the usercopy.c macros. The rest of the destination buffer is then zeroed from __copy_user_zeroing(), which is used for both copy_from_user() and __copy_from_user(). Unfortunately we fail to zero in the fixup code as D1Ar1 is set to 0 before the fixup code entry labels, and __copy_from_user() shouldn't even be zeroing the rest of the buffer. Move the zeroing out into copy_from_user() and rename __copy_user_zeroing() to raw_copy_from_user() since it no longer does any zeroing. This also conveniently matches the name needed for RAW_COPY_USER support in a later patch. Fixes: 373cd784d0fc ("metag: Memory handling") Reported-by: Al Viro Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/include/asm/uaccess.h | 15 ++++++----- arch/metag/lib/usercopy.c | 57 +++++++++++++--------------------------- 2 files changed, 26 insertions(+), 46 deletions(-) commit 3ebfdf082184d04f6e73b30cd9446613dc7f8c02 Author: Xin Long Date: Tue Apr 4 13:39:55 2017 +0800 sctp: get sock from transport in sctp_transport_update_pmtu This patch is almost to revert commit 02f3d4ce9e81 ("sctp: Adjust PMTU updates to accomodate route invalidation."). As t->asoc can't be NULL in sctp_transport_update_pmtu, it could get sk from asoc, and no need to pass sk into that function. It is also to remove some duplicated codes from that function. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 5 ++--- include/net/sctp/structs.h | 6 +++--- net/sctp/associola.c | 6 +++--- net/sctp/input.c | 4 ++-- net/sctp/output.c | 4 ++-- net/sctp/socket.c | 6 +++--- net/sctp/transport.c | 19 +++++++------------ 7 files changed, 22 insertions(+), 28 deletions(-) commit fb8ea062a8f2e85256e13f55696c5c5f0dfdcc8b Author: James Hogan Date: Fri Mar 31 13:35:01 2017 +0100 metag/usercopy: Add early abort to copy_to_user When copying to userland on Meta, if any faults are encountered immediately abort the copy instead of continuing on and repeatedly faulting, and worse potentially copying further bytes successfully to subsequent valid pages. Fixes: 373cd784d0fc ("metag: Memory handling") Reported-by: Al Viro Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2257211942bbbf6c798ab70b487d7e62f7835a1a Author: James Hogan Date: Fri Mar 31 11:23:18 2017 +0100 metag/usercopy: Fix alignment error checking Fix the error checking of the alignment adjustment code in raw_copy_from_user(), which mistakenly considers it safe to skip the error check when aligning the source buffer on a 2 or 4 byte boundary. If the destination buffer was unaligned it may have started to copy using byte or word accesses, which could well be at the start of a new (valid) source page. This would result in it appearing to have copied 1 or 2 bytes at the end of the first (invalid) page rather than none at all. Fixes: 373cd784d0fc ("metag: Memory handling") Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ef62a2d81f73d9cddef14bc3d9097a57010d551c Author: James Hogan Date: Fri Mar 31 10:37:44 2017 +0100 metag/usercopy: Drop unused macros Metag's lib/usercopy.c has a bunch of copy_from_user macros for larger copies between 5 and 16 bytes which are completely unused. Before fixing zeroing lets drop these macros so there is less to fix. Signed-off-by: James Hogan Cc: Al Viro Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/lib/usercopy.c | 113 ---------------------------------------------- 1 file changed, 113 deletions(-) commit 62277de758b155dc04b78f195a1cb5208c37b2df Author: Wei Yongjun Date: Fri Jun 17 17:33:59 2016 +0000 ring-buffer: Fix return value check in test_ringbuffer() In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Link: http://lkml.kernel.org/r/1466184839-14927-1-git-send-email-weiyj_lk@163.com Cc: stable@vger.kernel.org Fixes: 6c43e554a ("ring-buffer: Add ring buffer startup selftest") Signed-off-by: Wei Yongjun Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 40c98cb57cdbc377456116ad4582c89e329721b0 Author: Horia Geantă Date: Wed Apr 5 11:41:03 2017 +0300 crypto: caam - fix RNG deinstantiation error checking RNG instantiation was previously fixed by commit 62743a4145bb9 ("crypto: caam - fix RNG init descriptor ret. code checking") while deinstantiation was not addressed. Since the descriptors used are similar, in the sense that they both end with a JUMP HALT command, checking for errors should be similar too, i.e. status code 7000_0000h should be considered successful. Cc: # 3.13+ Fixes: 1005bccd7a4a6 ("crypto: caam - enable instantiation of all RNG4 state handles") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33fa46d7b310e06d2cb2ab5417c100af120bfb65 Author: Horia Geantă Date: Mon Apr 3 18:30:07 2017 +0300 crypto: caam - fix invalid dereference in caam_rsa_init_tfm() In case caam_jr_alloc() fails, ctx->dev carries the error code, thus accessing it with dev_err() is incorrect. Cc: # 4.8+ Fixes: 8c419778ab57e ("crypto: caam - add support for RSA algorithm") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caampkc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec360607a25fae97c81eef2f02268ae8ed3649b4 Author: Horia Geantă Date: Mon Apr 3 18:12:04 2017 +0300 crypto: caam - fix JR platform device subsequent (re)creations The way Job Ring platform devices are created and released does not allow for multiple create-release cycles. JR0 Platform device creation error JR0 Platform device creation error caam 2100000.caam: no queues configured, terminating caam: probe of 2100000.caam failed with error -12 The reason is that platform devices are created for each job ring: for_each_available_child_of_node(nprop, np) if (of_device_is_compatible(np, "fsl,sec-v4.0-job-ring") || of_device_is_compatible(np, "fsl,sec4.0-job-ring")) { ctrlpriv->jrpdev[ring] = of_platform_device_create(np, NULL, dev); which sets OF_POPULATED on the device node, but then it cleans these up: /* Remove platform devices for JobRs */ for (ring = 0; ring < ctrlpriv->total_jobrs; ring++) { if (ctrlpriv->jrpdev[ring]) of_device_unregister(ctrlpriv->jrpdev[ring]); } which leaves OF_POPULATED set. Use of_platform_populate / of_platform_depopulate instead. This allows for a bit of driver clean-up, jrpdev is no longer needed. Logic changes a bit too: -exit in case of_platform_populate fails, since currently even QI backend depends on JR; true, we no longer support the case when "some" of the JR DT nodes are incorrect -when cleaning up, caam_remove() would also depopulate RTIC in case it would have been populated somewhere else - not the case for now Cc: Fixes: 313ea293e9c4d ("crypto: caam - Add Platform driver for Job Ring") Reported-by: Russell King Suggested-by: Rob Herring Signed-off-by: Horia Geantă Acked-by: Rob Herring Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 63 +++++++++++++------------------------------- drivers/crypto/caam/intern.h | 1 - 2 files changed, 19 insertions(+), 45 deletions(-) commit b2376407f98920c9b0c411948675f58a9640be35 Author: Vic Yang Date: Fri Mar 24 18:44:01 2017 +0100 mfd: cros-ec: Fix host command buffer size For SPI, we can get up to 32 additional bytes for response preamble. The current overhead (2 bytes) may cause problems when we try to receive a big response. Update it to 32 bytes. Without this fix we could see a kernel BUG when we receive a big response from the Chrome EC when is connected via SPI. Signed-off-by: Vic Yang Tested-by: Enric Balletbo i Serra Signed-off-by: Lee Jones include/linux/mfd/cros_ec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88b1bf7268f56887ca88eb09c6fb0f4fc970121a Author: Frederic Barrat Date: Wed Mar 29 19:19:42 2017 +0200 powerpc/mm: Add missing global TLB invalidate if cxl is active Commit 4c6d9acce1f4 ("powerpc/mm: Add hooks for cxl") converted local TLB invalidates to global if the cxl driver is active. This is necessary because the CAPP snoops invalidations to forward them to the PSL on the cxl adapter. However one path was forgotten. native_flush_hash_range() still does local TLB invalidates, as found out the hard way recently. This patch fixes it by following the same logic as previously: if the cxl driver is active, the local TLB invalidates are 'upgraded' to global. Fixes: 4c6d9acce1f4 ("powerpc/mm: Add hooks for cxl") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Frederic Barrat Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_native_64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8f5f525d5b83f7d76a6baf9c4e94d4bf312ea7f6 Author: Oliver O'Halloran Date: Mon Apr 3 13:25:12 2017 +1000 powerpc/64: Fix flush_(d|i)cache_range() called from modules When the kernel is compiled to use 64bit ABIv2 the _GLOBAL() macro does not include a global entry point. A function's global entry point is used when the function is called from a different TOC context and in the kernel this typically means a call from a module into the vmlinux (or vice-versa). There are a few exported asm functions declared with _GLOBAL() and calling them from a module will likely crash the kernel since any TOC relative load will yield garbage. flush_icache_range() and flush_dcache_range() are both exported to modules, and use the TOC, so must use _GLOBAL_TOC(). Fixes: 721aeaa9fdf3 ("powerpc: Build little endian ppc64 kernel with ABIv2") Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55d728a40d368ba80443be85c02e641fc9082a3f Author: Ard Biesheuvel Date: Tue Apr 4 16:27:44 2017 +0100 efi/fb: Avoid reconfiguration of BAR that covers the framebuffer On UEFI systems, the PCI subsystem is enumerated by the firmware, and if a graphical framebuffer is exposed via a PCI device, its base address and size are exposed to the OS via the Graphics Output Protocol (GOP). On arm64 PCI systems, the entire PCI hierarchy is reconfigured from scratch at boot. This may result in the GOP framebuffer address to become stale, if the BAR covering the framebuffer is modified. This will cause the framebuffer to become unresponsive, and may in some cases result in unpredictable behavior if the range is reassigned to another device. So add a non-x86 quirk to the EFI fb driver to find the BAR associated with the GOP base address, and claim the BAR resource so that the PCI core will not move it. Signed-off-by: Ard Biesheuvel Cc: # v4.7+ Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Jones Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: leif.lindholm@linaro.org Cc: linux-efi@vger.kernel.org Cc: lorenzo.pieralisi@arm.com Fixes: 9822504c1fa5 ("efifb: Enable the efi-framebuffer platform driver ...") Link: http://lkml.kernel.org/r/20170404152744.26687-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/video/fbdev/efifb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit cfac6dfa42bddfa9711b20d486e521d1a41ab09f Author: Joerg Roedel Date: Tue Apr 4 18:15:01 2017 +0200 x86/signals: Fix lower/upper bound reporting in compat siginfo Put the right values from the original siginfo into the userspace compat-siginfo. This fixes the 32-bit MPX "tabletest" testcase on 64-bit kernels. Signed-off-by: Joerg Roedel Acked-by: Dave Hansen Cc: # v4.8+ Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: a4455082dc6f0 ('x86/signals: Add missing signal_compat code for x86 features') Link: http://lkml.kernel.org/r/1491322501-5054-1-git-send-email-joro@8bytes.org Signed-off-by: Ingo Molnar arch/x86/kernel/signal_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 540f4c0e894f7e46a66dfa424b16424cbdc12c38 Author: Cohen, Eugene Date: Tue Apr 4 16:27:43 2017 +0100 efi/libstub: Skip GOP with PIXEL_BLT_ONLY format The UEFI Specification permits Graphics Output Protocol (GOP) instances without direct framebuffer access. This is indicated in the Mode structure with a PixelFormat enumeration value of PIXEL_BLT_ONLY. Given that the kernel does not know how to drive a Blt() only framebuffer (which is only permitted before ExitBootServices() anyway), we should disregard such framebuffers when looking for a GOP instance that is suitable for use as the boot console. So modify the EFI GOP initialization to not use a PIXEL_BLT_ONLY instance, preventing attempts later in boot to use an invalid screen_info.lfb_base address. Signed-off-by: Eugene Cohen [ Moved the Blt() only check into the loop and clarified that Blt() only GOPs are unusable by the kernel. ] Signed-off-by: Ard Biesheuvel Cc: # v4.7+ Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: leif.lindholm@linaro.org Cc: linux-efi@vger.kernel.org Cc: lorenzo.pieralisi@arm.com Fixes: 9822504c1fa5 ("efifb: Enable the efi-framebuffer platform driver ...") Link: http://lkml.kernel.org/r/20170404152744.26687-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/gop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fe514739d8538783749d3ce72f78e5a999ea5668 Author: Dan Williams Date: Tue Apr 4 15:08:36 2017 -0700 libnvdimm: fix blk free space accounting Commit a1f3e4d6a0c3 "libnvdimm, region: update nd_region_available_dpa() for multi-pmem support" reworked blk dpa (DIMM Physical Address) accounting to comprehend multiple pmem namespace allocations aliasing with a given blk-dpa range. The following call trace is a result of failing to account for allocated blk capacity. WARNING: CPU: 1 PID: 2433 at tools/testing/nvdimm/../../../drivers/nvdimm/names 4 size_store+0x6f3/0x930 [libnvdimm] nd_region region5: allocation underrun: 0x0 of 0x1000000 bytes [..] Call Trace: dump_stack+0x86/0xc3 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 size_store+0x6f3/0x930 [libnvdimm] dev_attr_store+0x18/0x30 If a given blk-dpa allocation does not alias with any pmem ranges then the full allocation should be accounted as busy space, not the size of the current pmem contribution to the region. The thinkos that led to this confusion was not realizing that the struct resource management is already guaranteeing no collisions between pmem allocations and blk allocations on the same dimm. Also, we do not try to support blk allocations in aliased pmem holes. This patch also fixes a case where the available blk goes negative. Cc: Fixes: a1f3e4d6a0c3 ("libnvdimm, region: update nd_region_available_dpa() for multi-pmem support"). Reported-by: Dariusz Dokupil Reported-by: Dave Jiang Reported-by: Vishal Verma Tested-by: Dave Jiang Tested-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/dimm_devs.c | 77 +++++++--------------------------------------- 1 file changed, 11 insertions(+), 66 deletions(-) commit 308ac7563944787f8afc508568a3cda601c35a48 Merge: b824a957 693bdaa Author: Linus Torvalds Date: Tue Apr 4 11:40:20 2017 -0700 Merge tag 'gpio-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull late GPIO fixes from Linus Walleij: "Some late coming ACPI fixes for GPIO. We're dealing with ACPI issues here. The first is related to wake IRQs on Bay Trail/Cherry Trail CPUs which are common in laptops. The second is about proper probe deferral when reading _CRS properties. For my untrained eye it seems there was some quarrel between the BIOS and the kernel about who is supposed to deal with wakeups from GPIO lines" * tag 'gpio-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: ACPI / gpio: do not fall back to parsing _CRS when we get a deferral gpio: acpi: Call enable_irq_wake for _IAE GpioInts with Wake set commit e90be21b1c1c37964756f0e9fbb18d4026b93b5f Merge: 30c57f0 d77facb Author: David S. Miller Date: Tue Apr 4 11:36:54 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.11 iwlwifi * an RCU fix * a fix for a potential out-of-bounds access crash * a fix for IBSS which has been broken since DQA was enabled rtlwifi * fix scheduling while atomic regression brcmfmac * fix use-after-free bug found by KASAN ==================== Signed-off-by: David S. Miller commit b824a957bfb3f7f5ab2f7216239882f9092d2c27 Merge: 1a589c0 921d701 Author: Linus Torvalds Date: Tue Apr 4 11:16:52 2017 -0700 Merge tag 'nios2-v4.11-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 fix from Ley Foon Tan: - nios2: reserve boot memory for device tree * tag 'nios2-v4.11-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: reserve boot memory for device tree commit 30c57f073449e09ae42f908bfff56c08c8751a6f Author: Sekhar Nori Date: Mon Apr 3 17:34:28 2017 +0530 net: ethernet: ti: cpsw: fix race condition during open() TI's cpsw driver handles both OF and non-OF case for phy connect. Unfortunately of_phy_connect() returns NULL on error while phy_connect() returns ERR_PTR(). To handle this, cpsw_slave_open() overrides the return value from phy_connect() to make it NULL or error. This leaves a small window, where cpsw_adjust_link() may be invoked for a slave while slave->phy pointer is temporarily set to -ENODEV (or some other error) before it is finally set to NULL. _cpsw_adjust_link() only handles the NULL case, and an oops results when ERR_PTR() is seen by it. Note that cpsw_adjust_link() checks PHY status for each slave whenever it is invoked. It can so happen that even though phy_connect() for a given slave returns error, _cpsw_adjust_link() is still called for that slave because the link status of another slave changed. Fix this by using a temporary pointer to store return value of {of_}phy_connect() and do a one-time write to slave->phy. Reviewed-by: Grygorii Strashko Reported-by: Yan Liu Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1a589c0443e498078f5f2acedef5575bc705dcd7 Merge: 08e4e0d 130e35e Author: Linus Torvalds Date: Tue Apr 4 10:12:15 2017 -0700 Merge tag 'drm-fixes-for-v4.11-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is just mostly stuff that missed rc5, from vmwgfx and msm drivers" * tag 'drm-fixes-for-v4.11-rc6' of git://people.freedesktop.org/~airlied/linux: drm/msm: Make sure to detach the MMU during GPU cleanup drm/msm/hdmi: redefinitions of macros not required drm/msm/mdp5: Update SSPP_MAX value drm/msm/dsi: Fix bug in dsi_mgr_phy_enable drm/msm: Don't allow zero sized buffer objects drm/msm: Fix wrong pointer check in a5xx_destroy drm/msm: adreno: fix build error without debugfs drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl() drm/vmwgfx: Remove getparam error message drm/ttm: Avoid calling drm_ht_remove from atomic context drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl() drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() drm/vmwgfx: Type-check lookups of fence objects commit 249ee819e24c180909f43c1173c8ef6724d21faf Author: Guillaume Nault Date: Mon Apr 3 13:23:15 2017 +0200 l2tp: fix PPP pseudo-wire auto-loading PPP pseudo-wire type is 7 (11 is L2TP_PWTYPE_IP). Fixes: f1f39f911027 ("l2tp: auto load type modules") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8919661d78b90d747b3514197e49ecf8727d08c Author: Colin Ian King Date: Mon Apr 3 11:19:10 2017 +0100 bnx2x: fix spelling mistake in macros HW_INTERRUT_ASSERT_SET_* Trival fix, rename HW_INTERRUT_ASSERT_SET_* to HW_INTERRUPT_ASSERT_SET_* Signed-off-by: Colin Ian King Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) commit e08293a4ccbcc993ded0fdc46f1e57926b833d63 Author: Guillaume Nault Date: Mon Apr 3 12:03:13 2017 +0200 l2tp: take reference on sessions being dumped Take a reference on the sessions returned by l2tp_session_find_nth() (and rename it l2tp_session_get_nth() to reflect this change), so that caller is assured that the session isn't going to disappear while processing it. For procfs and debugfs handlers, the session is held in the .start() callback and dropped in .show(). Given that pppol2tp_seq_session_show() dereferences the associated PPPoL2TP socket and that l2tp_dfs_seq_session_show() might call pppol2tp_show(), we also need to call the session's .ref() callback to prevent the socket from going away from under us. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Fixes: 0ad6614048cf ("l2tp: Add debugfs files for dumping l2tp debug info") Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 8 ++++++-- net/l2tp/l2tp_core.h | 3 ++- net/l2tp/l2tp_debugfs.c | 10 +++++++--- net/l2tp/l2tp_netlink.c | 7 +++++-- net/l2tp/l2tp_ppp.c | 10 +++++++--- 5 files changed, 27 insertions(+), 11 deletions(-) commit ca257b9e2d807ab6cb2678ecc7b74aaf4651f597 Author: Geert Uytterhoeven Date: Mon Apr 3 12:11:26 2017 +0200 can: rcar_can: Do not print virtual addresses During probe, the rcar_can driver prints: rcar_can e6e80000.can: device registered (regs @ e08bc000, IRQ76) The "regs" value is a virtual address, exposing internal information, hence stop printing it. The (useful) physical address is already printed as part of the device name. Fixes: fd1159318e55e901 ("can: add Renesas R-Car CAN driver") Signed-off-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04abaf07f6d5cdf22b7a478a86e706dfeeeef960 Author: Dave Gerlach Date: Thu Mar 30 14:58:18 2017 -0500 ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer Starting from commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") pm_runtime core now changes device runtime_status back to after RPM_SUSPENDED after a probe defer. Certain OMAP devices make use of "ti,no-idle-on-init" flag which causes omap_device_enable to be called during the BUS_NOTIFY_ADD_DEVICE event during probe, along with pm_runtime_set_active. This call to pm_runtime_set_active typically will prevent a call to pm_runtime_get in a driver probe function from re-enabling the omap_device. However, in the case of a probe defer that happens before the driver probe function is able to run, such as a missing pinctrl states defer, pm_runtime_reinit will set the device as RPM_SUSPENDED and then once driver probe is actually able to run, pm_runtime_get will see the device as suspended and call through to the omap_device layer, attempting to enable the already enabled omap_device and causing errors like this: omap-gpmc 50000000.gpmc: omap_device: omap_device_enable() called from invalid state 1 omap-gpmc 50000000.gpmc: use pm_runtime_put_sync_suspend() in driver? We can avoid this error by making sure the pm_runtime status of a device matches the omap_device state before a probe attempt. By extending the omap_device bus notifier to act on the BUS_NOTIFY_BIND_DRIVER event we can check if a device is enabled in omap_device but with a pm_runtime status of RPM_SUSPENDED and once again mark the device as RPM_ACTIVE to avoid a second incorrect call to omap_device_enable. Fixes: 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Tested-by: Franklin S Cooper Jr. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 57c1d4c33e8f7ec90976d79127059c1919cc0651 Author: Markus Marb Date: Fri Mar 17 23:14:47 2017 +0100 can: ifi: use correct register to read rx status The incorrect offset was used when trying to read the RXSTCMD register. Signed-off-by: Markus Marb Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62e24c5775ecb387a3eb33701378ccfa6dbc98ee Author: Philipp Zabel Date: Fri Feb 5 13:41:39 2016 +0100 reset: add exported __reset_control_get, return NULL if optional Rename the internal __reset_control_get/put functions to __reset_control_get/put_internal and add an exported __reset_control_get equivalent to __of_reset_control_get that takes a struct device parameter. This avoids the confusing call to __of_reset_control_get in the non-DT case and fixes the devm_reset_control_get_optional function to return NULL if RESET_CONTROLLER is enabled but dev->of_node == NULL. Fixes: bb475230b8e5 ("reset: make optional functions really optional") Reported-by: Andy Shevchenko Tested-by: Andy Shevchenko Cc: Ramiro Oliveira Signed-off-by: Philipp Zabel drivers/reset/core.c | 22 ++++++++++++++++------ include/linux/reset.h | 22 ++++++++++++++-------- 2 files changed, 30 insertions(+), 14 deletions(-) commit 8945927cb7cc5953cc1554053452f50248159c88 Merge: ac77a0c 793c7ed Author: Jens Axboe Date: Tue Apr 4 08:35:01 2017 -0600 Merge branch 'nvme-4.11-rc' of git://git.infradead.org/nvme into for-linus Sagi writes: We have one spec mis-match fix from Roland and several sparse fixes from Christoph. commit 1fb883bb827ee8efc1cc9ea0154f953f8a219d38 Author: Ladi Prosek Date: Tue Apr 4 14:18:53 2017 +0200 KVM: nVMX: initialize PML fields in vmcs02 L2 was running with uninitialized PML fields which led to incomplete dirty bitmap logging. This manifested as all kinds of subtle erratic behavior of the nested guest. Fixes: 843e4330573c ("KVM: VMX: Add PML support in VMX") Signed-off-by: Ladi Prosek Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ac4cde398a96c1d28b1c28a0f69b6efd892a1c8a Author: Jan Beulich Date: Tue Apr 4 06:27:22 2017 -0600 xenbus: remove transaction holder from list before freeing After allocation the item is being placed on the list right away. Consequently it needs to be taken off the list before freeing in the case xenbus_dev_request_and_reply() failed, as in that case the callback (xenbus_dev_queue_reply()) is not being called (and if it was called, it should do both). Fixes: 5584ea250ae44f929feb4c7bd3877d1c5edbf813 Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_dev_frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ab007cc94ff9d82f5a8db8363b3becbd946e58cf Author: Ladi Prosek Date: Fri Mar 31 10:19:26 2017 +0200 KVM: nVMX: do not leak PML full vmexit to L1 The PML feature is not exposed to guests so we should not be forwarding the vmexit either. This commit fixes BSOD 0x20001 (HYPERVISOR_ERROR) when running Hyper-V enabled Windows Server 2016 in L1 on hardware that supports PML. Fixes: 843e4330573c ("KVM: VMX: Add PML support in VMX") Signed-off-by: Ladi Prosek Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 +++ 1 file changed, 3 insertions(+) commit 794a8604fe6e4a311373cde57a86ad4aab9d32b8 Author: Niklas Cassel Date: Mon Apr 3 17:35:12 2017 -0500 PCI: dwc: Fix dw_pcie_ops NULL pointer dereference Fix a crash from dereferencing a NULL dw_pcie_ops pointer. For example, on ARTPEC-6: Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = c0204000 [00000004] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc3-next-20170321 #1 Hardware name: Axis ARTPEC-6 Platform task: db098000 task.stack: db096000 PC is at dw_pcie_writel_dbi+0x2c/0xd0 Prior to 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures"), every driver had a struct pcie_host_ops with function pointers, typically used as: if (pp->ops->readl_rc) return pp->ops->readl_rc(...); 442ec4c04d12 split struct pcie_host_ops into two pieces: struct dw_pcie_host_ops and struct dw_pcie_ops, so the above became: if (pci->ops->readl_dbi) return pci->ops->readl_dbi(...); But pcie-artpec6.c and pcie-designware-plat.c don't need the dw_pcie_ops pointers and didn't supply a pci->ops struct, which leads to NULL pointer dereferences. Supply an empty struct dw_pcie_ops to avoid the NULL pointer dereferences. [bhelgaas: changelog] Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures") Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I Acked-by: Joao Pinto drivers/pci/dwc/pcie-artpec6.c | 4 ++++ drivers/pci/dwc/pcie-designware-plat.c | 4 ++++ 2 files changed, 8 insertions(+) commit 48fe9e9488743eec9b7c1addd3c93f12f2123d54 Author: Paul Mackerras Date: Tue Apr 4 14:56:05 2017 +1000 powerpc: Don't try to fix up misaligned load-with-reservation instructions In the past, there was only one load-with-reservation instruction, lwarx, and if a program attempted a lwarx on a misaligned address, it would take an alignment interrupt and the kernel handler would emulate it as though it was lwzx, which was not really correct, but benign since it is loading the right amount of data, and the lwarx should be paired with a stwcx. to the same address, which would also cause an alignment interrupt which would result in a SIGBUS being delivered to the process. We now have 5 different sizes of load-with-reservation instruction. Of those, lharx and ldarx cause an immediate SIGBUS by luck since their entries in aligninfo[] overlap instructions which were not fixed up, but lqarx overlaps with lhz and will be emulated as such. lbarx can never generate an alignment interrupt since it only operates on 1 byte. To straighten this out and fix the lqarx case, this adds code to detect the l[hwdq]arx instructions and return without fixing them up, resulting in a SIGBUS being delivered to the process. Cc: stable@vger.kernel.org Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kernel/align.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 34fcf05b1557f1f8d6801d9dde30ac1d13213ba3 Merge: a71c9a1 232b8e3 Author: Radim Krčmář Date: Tue Apr 4 14:42:51 2017 +0200 Merge tag 'kvm-s390-master-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux From: Christian Borntraeger KVM: s390: Fix instruction-execution-protection/change-recording override This is a fix that prevents translation exception errors on valid page tables for the instruction-exection-protection support. This feature was added during the 4.11 merge window. We have to remove an old check that would trigger if the change-recording override is not available (e.g. edat1 disabled via cpu model). commit 6d56111c92d247bb64301029fe88365aa4caf16e Author: Christoffer Dall Date: Tue Mar 21 22:05:22 2017 +0100 KVM: arm/arm64: vgic: Fix GICC_PMR uaccess on GICv3 and clarify ABI As an oversight, for GICv2, we accidentally export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level. Since GICv3 supports the full 8 bits of priority masking in the ICH_VMCR, we have to fix the value we export when emulating a GICv2 on top of a hardware GICv3 and exporting the emulated GICv2 state to userspace. Take the chance to clarify this aspect of the ABI. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/arm-vgic.txt | 6 ++++++ include/linux/irqchip/arm-gic.h | 3 +++ virt/kvm/arm/vgic/vgic-mmio-v2.c | 20 ++++++++++++++++++-- virt/kvm/arm/vgic/vgic-v2.c | 8 ++++---- virt/kvm/arm/vgic/vgic.h | 9 ++++++++- 5 files changed, 39 insertions(+), 7 deletions(-) commit 5b0d2cc2805897c14257f6dbb949639c499c3c25 Author: Christoffer Dall Date: Sat Mar 18 13:56:56 2017 +0100 KVM: arm64: Ensure LRs are clear when they should be We currently have some code to clear the list registers on GICv3, but we never call this code, because the caller got nuked when removing the old vgic. We also used to have a similar GICv2 part, but that got lost in the process too. Let's reintroduce the logic for GICv2 and call the logic when we initialize the use of hypervisors on the CPU, for example when first loading KVM or when exiting a low power state. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/arm.c | 3 +++ include/kvm/arm_vgic.h | 1 + virt/kvm/arm/vgic/vgic-init.c | 19 +++++++++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 15 +++++++++++++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 5 files changed, 40 insertions(+) commit 8b3405e345b5a098101b0c31b264c812bba045d9 Author: Suzuki K Poulose Date: Mon Apr 3 15:12:43 2017 +0100 kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling unmap_stage2_range() on the entire memory range for the guest. This could cause problems with other callers (e.g, munmap on a memslot) trying to unmap a range. And since we have to unmap the entire Guest memory range holding a spinlock, make sure we yield the lock if necessary, after we unmap each PUD range. Fixes: commit d5d8184d35c9 ("KVM: ARM: Memory virtualization setup") Cc: stable@vger.kernel.org # v3.10+ Cc: Paolo Bonzini Cc: Marc Zyngier Cc: Christoffer Dall Cc: Mark Rutland Signed-off-by: Suzuki K Poulose [ Avoid vCPU starvation and lockup detector warnings ] Signed-off-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Christoffer Dall arch/arm/kvm/mmu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 09a6adf53d42ca3088fa3fb41f40b768efc711ed Author: Victor Kamensky Date: Mon Apr 3 22:51:01 2017 -0700 arm64: mm: unaligned access by user-land should be received as SIGBUS After 52d7523 (arm64: mm: allow the kernel to handle alignment faults on user accesses) commit user-land accesses that produce unaligned exceptions like in case of aarch32 ldm/stm/ldrd/strd instructions operating on unaligned memory received by user-land as SIGSEGV. It is wrong, it should be reported as SIGBUS as it was before 52d7523 commit. Changed do_bad_area function to take signal and code parameters out of esr value using fault_info table, so in case of do_alignment_fault fault user-land will receive SIGBUS. Wrapped access to fault_info table into esr_to_fault_info function. Cc: Fixes: 52d7523 (arm64: mm: allow the kernel to handle alignment faults on user accesses) Signed-off-by: Victor Kamensky Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 7bf8222b9bd0ba867e18b7f4537b61ef2e92eee8 Author: Keith Busch Date: Mon Apr 3 15:25:53 2017 -0400 irq/affinity: Fix CPU spread for unbalanced nodes The irq_create_affinity_masks routine is responsible for assigning a number of interrupt vectors to CPUs. The optimal assignemnet will spread requested vectors to all CPUs, with the fewest CPUs sharing a vector. The algorithm may fail to assign some vectors to any CPUs if a node's CPU count is lower than the average number of vectors per node. These vectors are unusable and create an un-optimal spread. Recalculate the number of vectors to assign at each node iteration by using the remaining number of vectors and nodes to be assigned, not exceeding the number of CPUs in that node. This will guarantee that every CPU is assigned at least one vector. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Cc: linux-nvme@lists.infradead.org Link: http://lkml.kernel.org/r/1491247553-7603-1-git-send-email-keith.busch@intel.com Signed-off-by: Thomas Gleixner kernel/irq/affinity.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 0b9aefea860063bb39e36bd7fe6c7087fed0ba87 Author: Marcelo Ricardo Leitner Date: Sat Apr 1 11:00:21 2017 -0300 tcp: minimize false-positives on TCP/GRO check Markus Trippelsdorf reported that after commit dcb17d22e1c2 ("tcp: warn on bogus MSS and try to amend it") the kernel started logging the warning for a NIC driver that doesn't even support GRO. It was diagnosed that it was possibly caused on connections that were using TCP Timestamps but some packets lacked the Timestamps option. As we reduce rcv_mss when timestamps are used, the lack of them would cause the packets to be bigger than expected, although this is a valid case. As this warning is more as a hint, getting a clean-cut on the threshold is probably not worth the execution time spent on it. This patch thus alleviates the false-positives with 2 quick checks: by accounting for the entire TCP option space and also checking against the interface MTU if it's available. These changes, specially the MTU one, might mask some real positives, though if they are really happening, it's possible that sooner or later it will be triggered anyway. Reported-by: Markus Trippelsdorf Cc: Eric Dumazet Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit daffad2123fc3efcc2c70bd6e905960a31886556 Author: Gabriel Fernandez Date: Thu Mar 16 09:16:40 2017 +0100 clk: stm32f4: fix: exclude values 0 and 1 for PLLQ 0000: PLLQ = 0, wrong configuration 0001: PLLQ = 1, wrong configuration ... 0010: PLLQ = 2 0011: PLLQ = 3 0100: PLLQ = 4 ... 1111: PLLQ = 1 Use divider table to exclude 0 and 1 values. Fixes: 83135ad3c517 ("clk: stm32f4: Add PLL_I2S & PLL_SAI for STM32F429/469 boards") Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 08e4e0d0456d0ca8427b2d1ddffa30f1c3e774d7 Merge: 4ad7255 1493aa6 Author: Linus Torvalds Date: Mon Apr 3 17:56:32 2017 -0700 Merge tag 'xtensa-20170403' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - make __pa work with uncached KSEG addresses, it fixes DMA memory mmapping and DMA debug - fix torn stack dump output - wire up statx syscall * tag 'xtensa-20170403' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: wire up statx system call xtensa: fix stack dump output xtensa: make __pa work with uncached KSEG addresses commit 130e35e4bbceb2c04ff0ad9b1a0bcef7acc11498 Merge: 84c4ba5 028402d Author: Dave Airlie Date: Tue Apr 4 10:13:40 2017 +1000 Merge branch 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux into drm-fixes misc msm fixes. * 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux: drm/msm: Make sure to detach the MMU during GPU cleanup drm/msm/hdmi: redefinitions of macros not required drm/msm/mdp5: Update SSPP_MAX value drm/msm/dsi: Fix bug in dsi_mgr_phy_enable drm/msm: Don't allow zero sized buffer objects drm/msm: Fix wrong pointer check in a5xx_destroy drm/msm: adreno: fix build error without debugfs commit df2729c3238ed89fb8ccf850d38c732858a5bade Author: Xin Long Date: Sat Apr 1 17:15:59 2017 +0800 sctp: check for dst and pathmtu update in sctp_packet_config This patch is to move sctp_transport_dst_check into sctp_packet_config from sctp_packet_transmit and add pathmtu check in sctp_packet_config. With this fix, sctp can update dst or pathmtu before appending chunks, which can void dropping packets in sctp_packet_transmit when dst is obsolete or dst's mtu is changed. This patch is also to improve some other codes in sctp_packet_config. It updates packet max_size with gso_max_size, checks for dst and pathmtu, and appends ecne chunk only when packet is empty and asoc is not NULL. It makes sctp flush work better, as we only need to set up them once for one flush schedule. It's also safe, since asoc is NULL only when the packet is created by sctp_ootb_pkt_new in which it just gets the new dst, no need to do more things for it other than set packet with transport's pathmtu. 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 | 17 ++++++++++--- net/sctp/output.c | 67 ++++++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 34 deletions(-) commit ac6a3722fed67c658a435187d0254ae119d845d3 Author: Simon Horman Date: Mon Apr 3 15:42:58 2017 -0400 flow dissector: correct size of storage for ARP The last argument to __skb_header_pointer() should be a buffer large enough to store struct arphdr. This can be a pointer to a struct arphdr structure. The code was previously using a pointer to a pointer to struct arphdr. By my counting the storage available both before and after is 8 bytes on x86_64. Fixes: 55733350e5e8 ("flow disector: ARP support") Reported-by: Nicolas Iooss Signed-off-by: Simon Horman Signed-off-by: David S. Miller net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6665f8a307696a0edd4c1233b4cc0f5ed6083525 Author: Arnd Bergmann Date: Mon Apr 3 16:17:11 2017 -0500 PCI: dwc: Select PCI_HOST_COMMON for hisi Without PCI_HOST_COMMON support enabled, we get a link error: drivers/pci/dwc/built-in.o: In function `hisi_pcie_map_bus': pcie-hisi.c:(.text+0x8860): undefined reference to `pci_ecam_map_bus' drivers/pci/dwc/built-in.o: In function `hisi_pcie_almost_ecam_probe': pcie-hisi.c:(.text+0x88b4): undefined reference to `pci_host_common_probe' Add an explicit 'select', as the other users have. Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han drivers/pci/dwc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit feb199ebef488a9f2c3550fb10524f3dac9d8abe Author: Tomasz Nowicki Date: Fri Mar 31 17:06:44 2017 +0200 PCI: thunder-pem: Fix legacy firmware PEM-specific resources SZ_16M PEM resource size includes PEM-specific register and its children resources. Reservation of the whole SZ_16M range leads to child device driver failure when pcieport driver is requesting resources: pcieport 0004:1f:00.0: can't enable device: BAR 0 [mem 0x87e0c0f00000-0x87e0c0ffffff 64bit] not claimed So we cannot reserve full 16M here and instead we want to reserve PEM-specific register only which is SZ_64K. At the end increase PEM resource to SZ_16M since this is what thunder_pem_init() call expects for proper initialization. Fixes: 9abb27c7594a ("PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller") Signed-off-by: Tomasz Nowicki Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.10+ drivers/pci/host/pci-thunder-pem.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 028402d4bcfd3e99421504674cc41b0cd32768c8 Author: Jordan Crouse Date: Mon Feb 6 10:39:29 2017 -0700 drm/msm: Make sure to detach the MMU during GPU cleanup We should be detaching the MMU before destroying the address space. To do this cleanly, the detach has to happen in adreno_gpu_cleanup() because it needs access to structs in adreno_gpu.c. Plus it is better symmetry to have the attach and detach at the same code level. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 29 +++++++++++++++++++---------- drivers/gpu/drm/msm/msm_gpu.c | 3 --- 2 files changed, 19 insertions(+), 13 deletions(-) commit d322a693f585832130c3d09f2175b8f2b3ae99e1 Author: Vinay Simha BN Date: Tue Mar 14 10:55:56 2017 +0530 drm/msm/hdmi: redefinitions of macros not required 4 macros already defined in hdmi.h, which is not required to redefine in hdmi_audio.c Signed-off-by: Vinay Simha BN Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 7 ------- 1 file changed, 7 deletions(-) commit 30512040ed8e1982e5ba16bb3e3a7f000ff65427 Author: Archit Taneja Date: Fri Mar 17 09:09:48 2017 +0530 drm/msm/mdp5: Update SSPP_MAX value 'SSPP_MAX + 1' is the max number of hwpipes that can be present on a MDP5 platform. Recently, 2 new cursor hwpipes were added, which caused overflows in arrays that used SSPP_MAX to represent the number of elements. Update the SSPP_MAX value to incorporate the extra hwpipes. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a5fef535c529b64b622f9d7eafb3ab86850f5f8f Author: Archit Taneja Date: Thu Feb 16 16:29:04 2017 +0530 drm/msm/dsi: Fix bug in dsi_mgr_phy_enable A recent commit introduces a bug in dsi_mgr_phy_enable. In the non dual DSI mode, we reset the mdsi (master DSI) PHY. This isn't right since master and slave DSI exist only in dual DSI mode. For the normal mode of operation, we should simply reset the PHY of the DSI device (i.e. msm_dsi) corresponding to the current bridge. Usage of the wrong DSI pointer also resulted in a static checker warning. That too is resolved with this fix. Fixes: b62aa70a98c5 (drm/msm/dsi: Move PHY operations out of host) Reported-by: Dan Carpenter Signed-off-by: Archit Taneja Reviewed-by: Rob Clark Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a5dff5d74e55608a9632a1d030bb79196e0755c Author: Jordan Crouse Date: Tue Mar 7 10:02:51 2017 -0700 drm/msm: Don't allow zero sized buffer objects Zero sized buffer objects tend to make various bits of the GEM infrastructure complain: WARNING: CPU: 1 PID: 2323 at drivers/gpu/drm/drm_mm.c:389 drm_mm_insert_node_generic+0x258/0x2f0 Modules linked in: CPU: 1 PID: 2323 Comm: drm-api-test Tainted: G W 4.9.0-rc4-00906-g693af44 #213 Hardware name: Qualcomm Technologies, Inc. DB820c (DT) task: ffff8000d7353400 task.stack: ffff8000d7720000 PC is at drm_mm_insert_node_generic+0x258/0x2f0 LR is at drm_vma_offset_add+0x4c/0x70 Zero sized buffers serve no appreciable value to the user so disallow them at create time. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f456d348b6320a2597a3f1fff3ad0011c5678603 Author: Jordan Crouse Date: Tue Mar 7 09:50:27 2017 -0700 drm/msm: Fix wrong pointer check in a5xx_destroy Instead of checking for a5xx_gpu->gpmu_iova during destroy we accidently check a5xx_gpu->gpmu_bo. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 280489daa68bd20364b322c11e3f429a0212c611 Author: Arnd Bergmann Date: Mon Mar 13 17:43:48 2017 +0100 drm/msm: adreno: fix build error without debugfs The newly added a5xx support fails to build when debugfs is diabled: drivers/gpu/drm/msm/adreno/a5xx_gpu.c:849:4: error: 'struct msm_gpu_funcs' has no member named 'show' drivers/gpu/drm/msm/adreno/a5xx_gpu.c:849:11: error: 'a5xx_show' undeclared here (not in a function); did you mean 'a5xx_irq'? This adds a missing #ifdef. Fixes: b5f103ab98c7 ("drm/msm: gpu: Add A5XX target support") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++ 1 file changed, 2 insertions(+) commit 84c4ba54f4a52f4d045c956dbc9801f27eb300b7 Merge: a71c9a1 e7e11f9 Author: Dave Airlie Date: Tue Apr 4 05:45:27 2017 +1000 Merge branch 'vmwgfx-fixes-4.11' of git://people.freedesktop.org/~thomash/linux into drm-fixes Set of vmwgfx fixes * 'vmwgfx-fixes-4.11' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl() drm/vmwgfx: Remove getparam error message drm/ttm: Avoid calling drm_ht_remove from atomic context drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl() drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() drm/vmwgfx: Type-check lookups of fence objects commit bf9216f922612d2db7666aae01e65064da2ffb3a Author: Darrick J. Wong Date: Mon Apr 3 12:22:39 2017 -0700 xfs: fix kernel memory exposure problems Fix a memory exposure problems in inumbers where we allocate an array of structures with holes, fail to zero the holes, then blindly copy the kernel memory contents (junk and all) into userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_itable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dd09d5a8589c640abb49cfcf92b4ed669eafad1 Author: Calvin Owens Date: Mon Apr 3 12:22:29 2017 -0700 xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files When punching past EOF on XFS, fallocate(mode=PUNCH_HOLE|KEEP_SIZE) will round the file size up to the nearest multiple of PAGE_SIZE: calvinow@vm-disks/generic-xfs-1 ~$ dd if=/dev/urandom of=test bs=2048 count=1 calvinow@vm-disks/generic-xfs-1 ~$ stat test Size: 2048 Blocks: 8 IO Block: 4096 regular file calvinow@vm-disks/generic-xfs-1 ~$ fallocate -n -l 2048 -o 2048 -p test calvinow@vm-disks/generic-xfs-1 ~$ stat test Size: 4096 Blocks: 8 IO Block: 4096 regular file Commit 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") replaced xfs_zero_remaining_bytes() with calls to iomap helpers. The new helpers don't enforce that [pos,offset) lies strictly on [0,i_size) when being called from xfs_free_file_space(), so by "leaking" these ranges into xfs_zero_range() we get this buggy behavior. Fix this by reintroducing the checks xfs_zero_remaining_bytes() did against i_size at the bottom of xfs_free_file_space(). Reported-by: Aaron Gao Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig Cc: Brian Foster Cc: # 4.8+ Signed-off-by: Calvin Owens Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 78420281a9d74014af7616958806c3aba056319e Author: Darrick J. Wong Date: Mon Apr 3 12:22:20 2017 -0700 xfs: rework the inline directory verifiers The inline directory verifiers should be called on the inode fork data, which means after iformat_local on the read side, and prior to ifork_flush on the write side. This makes the fork verifier more consistent with the way buffer verifiers work -- i.e. they will operate on the memory buffer that the code will be reading and writing directly. Furthermore, revise the verifier function to return -EFSCORRUPTED so that we don't flood the logs with corruption messages and assert notices. This has been a particular problem with xfs/348, which triggers the XFS_WANT_CORRUPTED_RETURN assertions, which halts the kernel when CONFIG_XFS_DEBUG=y. Disk corruption isn't supposed to do that, at least not in a verifier. Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_dir2_priv.h | 3 +- fs/xfs/libxfs/xfs_dir2_sf.c | 63 +++++++++++++++++++++++++++--------------- fs/xfs/libxfs/xfs_inode_fork.c | 35 +++++++++-------------- fs/xfs/libxfs/xfs_inode_fork.h | 2 +- fs/xfs/xfs_inode.c | 19 +++++++------ 5 files changed, 66 insertions(+), 56 deletions(-) commit 4ad72555b8421a9dceb2085079aeaee871c4888e Merge: 3ccfcdc d09c537 Author: Linus Torvalds Date: Mon Apr 3 08:44:43 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Four bug fixes, two of them for stable: - avoid initrd corruptions in the kernel decompressor - prevent inconsistent dumps if the boot CPU does not have address zero - fix the new pkey interface added with the merge window for 4.11 - a fix for a fix, another issue with user copy zero padding" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/uaccess: get_user() should zero on failure (again) s390/pkey: Fix wrong handling of secure key with old MKVP s390/smp: fix ipl from cpu with non-zero address s390/decompressor: fix initrd corruption caused by bss clear commit 3ccfcdc9efe861983d26d56f1f0ecae3f61a3a09 Merge: a71c9a1 cc66afe Author: Linus Torvalds Date: Mon Apr 3 08:36:24 2017 -0700 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Thomas Gleixner: "Prevent dmesg from being spammed when MCE logging is active" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Don't print MCEs when mcelog is active commit cf082a4a264d5e0bb79f0055be02d255438836a4 Merge: ecf8e89 aa4ce44 Author: Jani Nikula Date: Mon Apr 3 18:14:06 2017 +0300 Merge tag 'gvt-fixes-2017-04-01' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-04-01 - Fix cfg space in failsafe (Changbin) - Fix a race for irq inject with vgpu release (Zhi) - Fix golden state firmware load (Zhi) Link: http://patchwork.freedesktop.org/patch/msgid/20170401080650.6cvqon7nsbziwnyc@zhen-hp.sh.intel.com Signed-off-by: Jani Nikula commit a6d361404d81a03107a3475876afc22e1b84d5de Merge: c02ed2e bba6d9e Author: Greg Kroah-Hartman Date: Mon Apr 3 15:28:14 2017 +0200 Merge tag 'iio-fixes-for-4.11d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus 4th set of IIO fixes for the 4.12 cycle. core - fix IIO_VAL_FRACTIONAL_LOG2 handling for negative values. bmg160 - reset chip on probe to avoid a failure on some systems cros_ec - return type correctly when reading raw and calibbias data. hid-sensor-accel - fix a duplicate scan index error due to wrong number of channels for gravity sensor. hid-sensors - ensure a get_feature is always done before the first set feature to avoid issues with wrong cached values. st-pressure - initalize lps22hb boot time to avoid giving stale data. commit 232b8e3b1d4946a45e3b9dd4c282b12a085dd39d Author: Heiko Carstens Date: Fri Mar 31 12:50:48 2017 +0200 KVM: s390: remove change-recording override support Change-recording override (CO) was never implemented in any machine. According to the architecture it is unpredictable if a translation-specification exception will be recognized if the bit is set and EDAT1 does not apply. Therefore the easiest solution is to simply ignore the bit. This also fixes commit cd1836f583d7 ("KVM: s390: instruction-execution-protection support"). A guest may enable instruction-execution-protection (IEP) but not EDAT1. In such a case the guest_translate() function (arch/s390/kvm/gaccess.c) will report a specification exception on pages that have the IEP bit set while it should not. It might make sense to add full IEP support to guest_translate() and the GACC_IFETCH case. However, as far as I can tell the GACC_IFETCH case is currently only used after an instruction was executed in order to fetch the failing instruction. So there is no additional problem *currently*. Fixes: cd1836f583d7 ("KVM: s390: instruction-execution-protection support") Signed-off-by: Heiko Carstens Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 89e357d83c06b6fac581c3ca7f0ee3ae7e67109e Author: Yuejie Shi Date: Fri Mar 31 15:10:20 2017 +0800 af_key: Add lock to key dump A dump may come in the middle of another dump, modifying its dump structure members. This race condition will result in NULL pointer dereference in kernel. So add a lock to prevent that race. Fixes: 83321d6b9872 ("[AF_KEY]: Dump SA/SP entries non-atomically") Signed-off-by: Yuejie Shi Signed-off-by: Steffen Klassert net/key/af_key.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) commit a8e28440016bfb23bec266c4c66eacca6ea2d48b Merge: 2b5efc0 3209f68 Author: Al Viro Date: Mon Apr 3 01:06:59 2017 -0400 Merge branch 'work.statx' into for-next commit 2b5efc089769cd2aa583880d29416d00e7441f39 Author: Al Viro Date: Sat Mar 25 00:43:43 2017 -0400 alpha: fix stack smashing in old_adjtimex(2) Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3209f68b3ca4667069923a325c88b21131bfdf9f Author: David Howells Date: Fri Mar 31 18:32:17 2017 +0100 statx: Include a mask for stx_attributes in struct statx Include a mask in struct stat to indicate which bits of stx_attributes the filesystem actually supports. This would also be useful if we add another system call that allows you to do a 'bulk attribute set' and pass in a statx struct with the masks appropriately set to say what you want to set. Signed-off-by: David Howells Signed-off-by: Al Viro fs/ext4/inode.c | 6 ++++++ fs/stat.c | 1 + include/linux/stat.h | 1 + include/uapi/linux/stat.h | 4 ++-- samples/statx/test-statx.c | 12 ++++++++---- 5 files changed, 18 insertions(+), 6 deletions(-) commit 47071aee6a1956524b9929b3b821f6d2f8cae23c Author: David Howells Date: Fri Mar 31 18:32:10 2017 +0100 statx: Reserve the top bit of the mask for future struct expansion Reserve the top bit of the mask for future expansion of the statx struct and give an error if statx() sees it set. All the other bits are ignored if we see them set but don't support the bit; we just clear the bit in the returned mask. Signed-off-by: David Howells Signed-off-by: Al Viro fs/stat.c | 2 ++ include/uapi/linux/stat.h | 1 + 2 files changed, 3 insertions(+) commit 5f955f26f3d42d04aba65590a32eb70eedb7f37d Author: Darrick J. Wong Date: Fri Mar 31 18:32:03 2017 +0100 xfs: report crtime and attribute flags to statx statx has the ability to report inode creation times and inode flags, so hook up di_crtime and di_flags to that functionality. Signed-off-by: Darrick J. Wong Signed-off-by: David Howells Signed-off-by: Al Viro fs/xfs/xfs_iops.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 99652ea56a4186bc5bf8a3721c5353f41b35ebcb Author: David Howells Date: Fri Mar 31 18:31:56 2017 +0100 ext4: Add statx support Return enhanced file attributes from the Ext4 filesystem. This includes the following: (1) The inode creation time (i_crtime) as stx_btime, setting STATX_BTIME. (2) Certain FS_xxx_FL flags are mapped to stx_attribute flags. This requires that all ext4 inodes have a getattr call, not just some of them, so to this end, split the ext4_getattr() function and only call part of it where appropriate. Example output: [root@andromeda ~]# touch foo [root@andromeda ~]# chattr +ai foo [root@andromeda ~]# /tmp/test-statx foo statx(foo) = 0 results=fff Size: 0 Blocks: 0 IO Block: 4096 regular file Device: 08:12 Inode: 2101950 Links: 1 Access: (0644/-rw-r--r--) Uid: 0 Gid: 0 Access: 2016-02-11 17:08:29.031795451+0000 Modify: 2016-02-11 17:08:29.031795451+0000 Change: 2016-02-11 17:11:11.987790114+0000 Birth: 2016-02-11 17:08:29.031795451+0000 Attributes: 0000000000000030 (-------- -------- -------- -------- -------- -------- -------- --ai----) Signed-off-by: David Howells Signed-off-by: Al Viro fs/ext4/ext4.h | 1 + fs/ext4/file.c | 2 +- fs/ext4/inode.c | 35 ++++++++++++++++++++++++++++++++--- fs/ext4/namei.c | 2 ++ fs/ext4/symlink.c | 3 +++ 5 files changed, 39 insertions(+), 4 deletions(-) commit 64bd72048a2ac07efed70debe606a1c6e5e03554 Author: Eric Biggers Date: Fri Mar 31 18:31:48 2017 +0100 statx: optimize copy of struct statx to userspace I found that statx() was significantly slower than stat(). As a microbenchmark, I compared 10,000,000 invocations of fstat() on a tmpfs file to the same with statx() passed a NULL path: $ time ./stat_benchmark real 0m1.464s user 0m0.275s sys 0m1.187s $ time ./statx_benchmark real 0m5.530s user 0m0.281s sys 0m5.247s statx is expected to be a little slower than stat because struct statx is larger than struct stat, but not by *that* much. It turns out that most of the overhead was in copying struct statx to userspace, mostly in all the stac/clac instructions that got generated for each __put_user() call. (This was on x86_64, but some other architectures, e.g. arm64, have something similar now too.) stat() instead initializes its struct on the stack and copies it to userspace with a single call to copy_to_user(). This turns out to be much faster, and changing statx to do this makes it almost as fast as stat: $ time ./statx_benchmark real 0m1.624s user 0m0.270s sys 0m1.354s For zeroing the reserved fields, start by zeroing the full struct with memset. This makes it clear that every byte copied to userspace is initialized, even implicit padding bytes (though there are none currently). In the scenarios I tested, it also performed the same as a designated initializer. Manually initializing each field was still slightly faster, but would have been more error-prone and less verifiable. Also rename statx_set_result() to cp_statx() for consistency with cp_old_stat() et al., and make it noinline so that struct statx doesn't add to the stack usage during the main portion of the syscall execution. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: Al Viro fs/stat.c | 74 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 32 insertions(+), 42 deletions(-) commit b15fb70b82299f92bb8d591c9d1731cb23fa8290 Author: Eric Biggers Date: Fri Mar 31 18:31:40 2017 +0100 statx: remove incorrect part of vfs_statx() comment request_mask and query_flags are function arguments, not passed in struct kstat. So remove the part of the comment which claims otherwise. This was apparently left over from an earlier version of the statx patch. Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: Christoph Hellwig Signed-off-by: Al Viro fs/stat.c | 3 --- 1 file changed, 3 deletions(-) commit 8c7493aa3e9ae90f90196f4d4c1398ad143cba7b Author: Eric Biggers Date: Fri Mar 31 18:31:32 2017 +0100 statx: reject unknown flags when using NULL path The statx() system call currently accepts unknown flags when called with a NULL path to operate on a file descriptor. Left unchanged, this could make it hard to introduce new query flags in the future, since applications may not be able to tell whether a given flag is supported. Fix this by failing the system call with EINVAL if any flags other than KSTAT_QUERY_FLAGS are specified in combination with a NULL path. Arguably, we could still permit known lookup-related flags such as AT_SYMLINK_NOFOLLOW. However, that would be inconsistent with how sys_utimensat() behaves when passed a NULL path, which seems to be the closest precedent. And given that the NULL path case is (I believe) mainly intended to be used to implement a wrapper function like fstatx() that doesn't have a path argument, I think rejecting lookup-related flags too is probably the best choice. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: Al Viro fs/stat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 75dd7e4bb663c7047c7d1bd4dad26f8c048851be Author: Eric Biggers Date: Fri Mar 31 18:31:25 2017 +0100 Documentation/filesystems: fix documentation for ->getattr() Following the recent merge of statx, correct the documented prototype for the ->getattr() inode operation, and add an entry to the porting file. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: Al Viro Documentation/filesystems/Locking | 3 +-- Documentation/filesystems/porting | 6 ++++++ Documentation/filesystems/vfs.txt | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) commit 921d701e6f31e1ffaca3560416af1aa04edb4c4f Author: Tobias Klauser Date: Sun Apr 2 20:08:04 2017 -0700 nios2: reserve boot memory for device tree Make sure to reserve the boot memory for the flattened device tree. Otherwise it might get overwritten, e.g. when initial_boot_params is copied, leading to a corrupted FDT and a boot hang/crash: bootconsole [early0] enabled Early console on uart16650 initialized at 0xf8001600 OF: fdt: Error -11 processing FDT Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree! ---[ end Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree! Guenter Roeck says: > I think I found the problem. In unflatten_and_copy_device_tree(), with added > debug information: > > OF: fdt: initial_boot_params=c861e400, dt=c861f000 size=28874 (0x70ca) > > ... and then initial_boot_params is copied to dt, which results in corrupted > fdt since the memory overlaps. Looks like the initial_boot_params memory > is not reserved and (re-)allocated by early_init_dt_alloc_memory_arch(). Cc: stable@vger.kernel.org Reported-by: Guenter Roeck Reference: http://lkml.kernel.org/r/20170226210338.GA19476@roeck-us.net Tested-by: Guenter Roeck Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/kernel/prom.c | 7 +++++++ arch/nios2/kernel/setup.c | 3 +++ 2 files changed, 10 insertions(+) commit 75514b6654859e0130b512396dc964d2a9e84967 Author: Grygorii Strashko Date: Fri Mar 31 18:41:23 2017 -0500 net: ethernet: ti: cpsw: wake tx queues on ndo_tx_timeout In case, if TX watchdog is fired some or all netdev TX queues will be stopped and as part of recovery it is required not only to drain and reinitailize CPSW TX channeles, but also wake up stoppted TX queues what doesn't happen now and netdevice will stop transmiting data until reopenned. Hence, add netif_tx_wake_all_queues() call in .ndo_tx_timeout() to complete recovery and restore TX path. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 ++ 1 file changed, 2 insertions(+) commit a71c9a1c779f2499fb2afc0553e543f18aff6edf Author: Linus Torvalds Date: Sun Apr 2 17:23:54 2017 -0700 Linux 4.11-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f49237bfcdfca0ea6e03f8f98d583ee9b7d92875 Merge: 496dcc5 23f963e9 Author: Linus Torvalds Date: Sun Apr 2 16:29:34 2017 -0700 Merge tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "A couple of minor fixes for 4.11: - array bound fix for __get_unmap_pool() - cyclic period splitting for bcm2835" * tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: Fix array index out of bounds warning in __get_unmap_pool() dmaengine: bcm2835: Fix cyclic DMA period splitting commit a5d68ba85801a78c892a0eb8efb711e293ed314b Author: Xiubo Li Date: Fri Mar 31 10:35:25 2017 +0800 tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case For the bidirectional case, the Data-Out buffer blocks will always at the head of the tcmu_cmd's bitmap, and before gathering the Data-In buffer, first of all it should skip the Data-Out ones, or the device supporting BIDI commands won't work. Fixed: 26418649eead ("target/user: Introduce data_bitmap, replace data_length/data_head/data_tail") Reported-by: Ilias Tsitsimpis Tested-by: Ilias Tsitsimpis Signed-off-by: Xiubo Li Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 48 +++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 15 deletions(-) commit 1c99de981f30b3e7868b8d20ce5479fa1c0fea46 Author: Nicholas Bellinger Date: Sun Apr 2 13:36:44 2017 -0700 iscsi-target: Drop work-around for legacy GlobalSAN initiator Once upon a time back in 2009, a work-around was added to support the GlobalSAN iSCSI initiator v3.3 for MacOSX, which during login did not propose nor respond to MaxBurstLength, FirstBurstLength, DefaultTime2Wait and DefaultTime2Retain keys. The work-around in iscsi_check_proposer_for_optional_reply() allowed the missing keys to be proposed, but did not require waiting for a response before moving to full feature phase operation. This allowed GlobalSAN v3.3 to work out-of-the box, and for many years we didn't run into login interopt issues with any other initiators.. Until recently, when Martin tried a QLogic 57840S iSCSI Offload HBA on Windows 2016 which completed login, but subsequently failed with: Got unknown iSCSI OpCode: 0x43 The issue was QLogic MSFT side did not propose DefaultTime2Wait + DefaultTime2Retain, so LIO proposes them itself, and immediately transitions to full feature phase because of the GlobalSAN hack. However, the QLogic MSFT side still attempts to respond to DefaultTime2Retain + DefaultTime2Wait, even though LIO has set ISCSI_FLAG_LOGIN_NEXT_STAGE3 + ISCSI_FLAG_LOGIN_TRANSIT in last login response. So while the QLogic MSFT side should have been proposing these two keys to start, it was doing the correct thing per RFC-3720 attempting to respond to proposed keys before transitioning to full feature phase. All that said, recent versions of GlobalSAN iSCSI (v5.3.0.541) does correctly propose the four keys during login, making the original work-around moot. So in order to allow QLogic MSFT to run unmodified as-is, go ahead and drop this long standing work-around. Reported-by: Martin Svec Cc: Martin Svec Cc: Himanshu Madhani Cc: Arun Easi Cc: stable@vger.kernel.org # 3.1+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_parameters.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 496dcc5091e4c79f18ebae514e0e79e44a72993a Merge: 128c434 6b1cc94 Author: Linus Torvalds Date: Sun Apr 2 09:27:02 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 update provides: - prevent KASLR from randomizing EFI regions - restrict the usage of -maccumulate-outgoing-args and document when and why it is required. - make the Global Physical Address calculation for UV4 systems work correctly. - address a copy->paste->forgot-edit problem in the MCE exception table entries. - assign a name to AMD MCA bank 3, so the sysfs file registration works. - add a missing include in the boot code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Include missing header file x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs x86/build: Mostly disable '-maccumulate-outgoing-args' x86/mm/KASLR: Exclude EFI region from KASLR VA space randomization x86/mce: Fix copy/paste error in exception table entries x86/platform/uv: Fix calculation of Global Physical Address commit 128c434a70996a3738c7ca4aa2ee91942e4c48f0 Merge: 0a89b5e 658b299 Author: Linus Torvalds Date: Sun Apr 2 09:25:10 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "This update provides: - make the scheduler clock switch to unstable mode smooth so the timestamps stay at microseconds granularity instead of switching to tick granularity. - unbreak perf test tsc by taking the new offset into account which was added in order to proveide better sched clock continuity - switching sched clock to unstable mode runs all clock related computations which affect the sched clock output itself from a work queue. In case of preemption sched clock uses half updated data and provides wrong timestamps. Keep the math in the protected context and delegate only the static key switch to workqueue context. - remove a duplicate header include" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/headers: Remove duplicate #include line sched/clock: Fix broken stable to unstable transfer sched/clock, x86/perf: Fix "perf test tsc" sched/clock: Fix clear_sched_clock_stable() preempt wobbly commit 0a89b5eb818aee2efe8b092bb303aec56486a3d3 Merge: 4a6808f 79a21d5 Author: Linus Torvalds Date: Sun Apr 2 09:23:31 2017 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Thomas Gleixner: "Downgrade the missing ESRT header printk to warning level and remove a useless error printk which just generates noise for no value" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/esrt: Cleanup bad memory map log messages commit 4a6808f347a3f969e56e8e4274e70849ecdc33de Merge: 907977b 8d09617 Author: Linus Torvalds Date: Sun Apr 2 09:22:03 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: "Two small fixes for the new CLKEVT_OF infrastructure" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: vmlinux.lds: Add __clkevt_of_table to kernel clockevents: Fix syntax error in clkevt-of macro commit 907977b2a22c5d1f465fbe9657d0003f057f9b1e Merge: ada63c6 a89eae6 Author: Linus Torvalds Date: Sun Apr 2 09:20:34 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: "Two small fixlets: - select a required Kconfig to make the MVEBU driver compile - add the missing MIPS local GIC interrupts which prevent drivers to probe successfully" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips-gic: Fix Local compare interrupt irqchip/mvebu-odmi: Select GENERIC_MSI_IRQ_DOMAIN commit ada63c6159474aeb9d5f420d3378c3d340ceba17 Merge: 346ce1d 854fbd6 Author: Linus Torvalds Date: Sun Apr 2 09:18:59 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fix from Thomas Gleixner: "Prevent leaking kernel memory via /proc/$pid/syscall when the queried task is not in a syscall" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lib/syscall: Clear return values when no stack commit 3278682123811dd8ef07de5eb701fc4548fcebf2 Author: Al Viro Date: Fri Feb 17 20:16:34 2017 -0500 make skb_copy_datagram_msg() et.al. preserve ->msg_iter on error Fixes the mess observed in e.g. rsync over a noisy link we'd been seeing since last Summer. What happens is that we copy part of a datagram before noticing a checksum mismatch. Datagram will be resent, all right, but we want the next try go into the same place, not after it... All this family of primitives (copy/checksum and copy a datagram into destination) is "all or nothing" sort of interface - either we get 0 (meaning that copy had been successful) or we get an error (and no way to tell how much had been copied before we ran into whatever error it had been). Make all of them leave iterator unadvanced in case of errors - all callers must be able to cope with that (an error might've been caught before the iterator had been advanced), it costs very little to arrange, it's safer for callers and actually fixes at least one bug in said callers. Cc: stable@vger.kernel.org Signed-off-by: Al Viro net/core/datagram.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 27c0e3748e41ca79171ffa3e97415a20af6facd0 Author: Al Viro Date: Fri Feb 17 18:42:24 2017 -0500 [iov_iter] new privimitive: iov_iter_revert() opposite to iov_iter_advance(); the caller is responsible for never using it to move back past the initial position. Cc: stable@vger.kernel.org Signed-off-by: Al Viro include/linux/uio.h | 6 ++++- lib/iov_iter.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) commit bba6d9e47f3ea894e501f94b086a59ffe28241ac Author: Song Hongyan Date: Tue Mar 28 22:23:55 2017 +0800 iio: hid-sensor-attributes: Fix sensor property setting failure. When system bootup without get sensor property, set sensor property will be fail. If no get_feature operation done before set_feature, the sensor properties will all be the initialized value, which is not the same with sensor real properties. When set sensor property it will write back to sensor the changed perperty data combines with other sensor properties data, it is not right and may be dangerous. In order to get all sensor properties, choose to read one of the sensor properties(no matter read any sensor peroperty, driver will get all the peroperties and return the requested one). Fixes: 73c6768b710a ("iio: hid-sensors: Common attribute and trigger") Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Cc: Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 862d1d89ad9e5b117f1fb2a472cef6fc92c0007a Author: Srinivas Pandruvada Date: Wed Mar 29 16:23:35 2017 -0700 iio: accel: hid-sensor-accel-3d: Fix duplicate scan index error When both accel_3d and gravity sensor are present, iio_device_register() fails with "Duplicate scan index" error. The reason for this is setting of indio_dev->num_channels based on accel_3d channel for both gravity and accel-3d sensor. But number of channels are not same, so for gravity it is pointing to some invalid memory and getting scan_index to compare which may match. To fix this issue, set the indio_dev->num_channels correctly based on the sensor type. Fixes: 0e377f3b9ae9 ('iio: Add gravity sensor support') Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/accel/hid-sensor-accel-3d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7fd6592d1287046f61bfd3cda3c03cd35be490f7 Author: Nikolaus Schulz Date: Fri Mar 24 13:41:51 2017 +0100 iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values Fix formatting of negative values of type IIO_VAL_FRACTIONAL_LOG2 by switching from do_div(), which can't handle negative numbers, to div_s64_rem(). Also use shift_right for shifting, which is safe with negative values. Signed-off-by: Nikolaus Schulz Reviewed-by: Lars-Peter Clausen Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 51f528a1636f352ad776a912ac86026ac7a89a2a Author: Shrirang Bagul Date: Thu Mar 30 23:47:21 2017 +0800 iio: st_pressure: initialize lps22hb bootime This patch initializes the bootime in struct st_sensor_settings for lps22hb sensor. Without this, sensor channels read from sysfs always report stale values. Signed-off-by: Shrirang Bagul Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_core.c | 1 + 1 file changed, 1 insertion(+) commit 793c7ed9d785411a5cd6fe7e998cd7ee2870b38b Author: Christoph Hellwig Date: Fri Mar 31 17:00:08 2017 +0200 nvmet: fix byte swap in nvmet_parse_io_cmd We need to do arithmetics after byte swapping, not before. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/io-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78ce3daa7d703028c00eff2e03ad22efd116e549 Author: Christoph Hellwig Date: Fri Mar 31 17:00:07 2017 +0200 nvmet: fix byte swap in nvmet_execute_write_zeroes The length field in the Write Zeroes command is a 16-bit field. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/io-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ac5fcc6c7a2339a34c876a9b6926a7f17225493 Author: Christoph Hellwig Date: Fri Mar 31 17:00:06 2017 +0200 nvmet: add missing byte swap in nvmet_get_smart_log In this case entirely harmless as it's all-ones, but still nice to shut up sparse. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/admin-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1dd03a84dbf3e5ca91295a3d04c882b8bd86251 Author: Christoph Hellwig Date: Fri Mar 31 17:00:05 2017 +0200 nvme: add missing byte swap in nvme_setup_discard Fixes: b35ba01e ("nvme: support ranged discard requests") Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf17aa36c0f199f5b254262e77eaefda7da0f50b Author: Roland Dreier Date: Wed Mar 1 18:22:01 2017 -0800 nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 The enum values for QPTYPE, PRTYPE and CMS are off by 1 from the values defined in figure 42 of the NVM Express over Fabrics 1.0: http://www.nvmexpress.org/wp-content/uploads/NVMe_over_Fabrics_1_0_Gold_20160605-1.pdf Fix our enums to match the final spec. Signed-off-by: Roland Dreier Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg include/linux/nvme.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e5c1e5198068ed896a8a80b8ed9e202bbab18851 Merge: afe8996 2777e2a Author: David S. Miller Date: Sat Apr 1 20:16:42 2017 -0700 Merge branch 'l2tp_session_find-fixes' Guillaume Nault says: ==================== l2tp: fix usage of l2tp_session_find() l2tp_session_find() doesn't take a reference on the session returned to its caller. Virtually all l2tp_session_find() users are racy, either because the session can disappear from under them or because they take a reference too late. This leads to bugs like 'use after free' or failure to notice duplicate session creations. In some cases, taking a reference on the session is not enough. The special callbacks .ref() and .deref() also have to be called in cases where the PPP pseudo-wire uses the socket associated with the session. Therefore, when looking up a session, we also have to pass a flag indicating if the .ref() callback has to be called. In the future, we probably could drop the .ref() and .deref() callbacks entirely by protecting the .sock field of struct pppol2tp_session with RCU, thus allowing it to be freed and set to NULL even if the L2TP session is still alive. ==================== Signed-off-by: David S. Miller commit 2777e2ab5a9cf2b4524486c6db1517a6ded25261 Author: Guillaume Nault Date: Fri Mar 31 13:02:30 2017 +0200 l2tp: take a reference on sessions used in genetlink handlers Callers of l2tp_nl_session_find() need to hold a reference on the returned session since there's no guarantee that it isn't going to disappear from under them. Relying on the fact that no l2tp netlink message may be processed concurrently isn't enough: sessions can be deleted by other means (e.g. by closing the PPPOL2TP socket of a ppp pseudowire). l2tp_nl_cmd_session_delete() is a bit special: it runs a callback function that may require a previous call to session->ref(). In particular, for ppp pseudowires, the callback is l2tp_session_delete(), which then calls pppol2tp_session_close() and dereferences the PPPOL2TP socket. The socket might already be gone at the moment l2tp_session_delete() calls session->ref(), so we need to take a reference during the session lookup. So we need to pass the do_ref variable down to l2tp_session_get() and l2tp_session_get_by_ifname(). Since all callers have to be updated, l2tp_session_find_by_ifname() and l2tp_nl_session_find() are renamed to reflect their new behaviour. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 9 +++++++-- net/l2tp/l2tp_core.h | 3 ++- net/l2tp/l2tp_netlink.c | 39 ++++++++++++++++++++++++++------------- 3 files changed, 35 insertions(+), 16 deletions(-) commit 5e6a9e5a3554a5b3db09cdc22253af1849c65dff Author: Guillaume Nault Date: Fri Mar 31 13:02:29 2017 +0200 l2tp: hold session while sending creation notifications l2tp_session_find() doesn't take any reference on the returned session. Therefore, the session may disappear while sending the notification. Use l2tp_session_get() instead and decrement session's refcount once the notification is sent. Fixes: 33f72e6f0c67 ("l2tp : multicast notification to the registered listeners") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dbdbc73b44782e22b3b4b6e8b51e7a3d245f3086 Author: Guillaume Nault Date: Fri Mar 31 13:02:27 2017 +0200 l2tp: fix duplicate session creation l2tp_session_create() relies on its caller for checking for duplicate sessions. This is racy since a session can be concurrently inserted after the caller's verification. Fix this by letting l2tp_session_create() verify sessions uniqueness upon insertion. Callers need to be adapted to check for l2tp_session_create()'s return code instead of calling l2tp_session_find(). pppol2tp_connect() is a bit special because it has to work on existing sessions (if they're not connected) or to create a new session if none is found. When acting on a preexisting session, a reference must be held or it could go away on us. So we have to use l2tp_session_get() instead of l2tp_session_find() and drop the reference before exiting. Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support") 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 | 70 +++++++++++++++++++++++++++++++++++++++------------- net/l2tp/l2tp_eth.c | 10 ++------ net/l2tp/l2tp_ppp.c | 60 ++++++++++++++++++++++---------------------- 3 files changed, 84 insertions(+), 56 deletions(-) commit 57377d63547861919ee634b845c7caa38de4a452 Author: Guillaume Nault Date: Fri Mar 31 13:02:26 2017 +0200 l2tp: ensure session can't get removed during pppol2tp_session_ioctl() Holding a reference on session is required before calling pppol2tp_session_ioctl(). The session could get freed while processing the ioctl otherwise. Since pppol2tp_session_ioctl() uses the session's socket, we also need to take a reference on it in l2tp_session_get(). 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 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 61b9a047729bb230978178bca6729689d0c50ca2 Author: Guillaume Nault Date: Fri Mar 31 13:02:25 2017 +0200 l2tp: fix race in l2tp_recv_common() Taking a reference on sessions in l2tp_recv_common() is racy; this has to be done by the callers. To this end, a new function is required (l2tp_session_get()) to atomically lookup a session and take a reference on it. Callers then have to manually drop this reference. 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 | 73 ++++++++++++++++++++++++++++++++++++++++++---------- net/l2tp/l2tp_core.h | 3 +++ net/l2tp/l2tp_ip.c | 17 ++++++++---- net/l2tp/l2tp_ip6.c | 18 +++++++++---- 4 files changed, 88 insertions(+), 23 deletions(-) commit afe89962ee0799955b606cc7637ac86a296923a6 Author: Xin Long Date: Fri Mar 31 17:57:28 2017 +0800 sctp: use right in and out stream cnt Since sctp reconf was added in sctp, the real cnt of in/out stream have not been c.sinit_max_instreams and c.sinit_num_ostreams any more. This patch is to replace them with stream->in/outcnt. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/outqueue.c | 3 +-- net/sctp/proc.c | 4 ++-- net/sctp/sm_statefuns.c | 6 +++--- net/sctp/socket.c | 10 +++++----- 4 files changed, 11 insertions(+), 12 deletions(-) commit 346ce1d75c20ac74b131c28022ef814453d37564 Merge: 7d34ddb 476e75a Author: Linus Torvalds Date: Sat Apr 1 20:11:35 2017 -0700 Merge branch 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Al Viro reported that - in case of read faults - our copy_from_user() implementation may claim to have copied more bytes than it actually did. In order to fix this bug and because of the way how gcc optimizes register usage for inline assembly in C code, we had to replace our pa_memcpy() function with a pure assembler implementation. While fixing the memcpy bug we noticed some other issues with our get_user() and put_user() functions, e.g. nested faults may return wrong data. This is now fixed by a common fixup handler for get_user/put_user in the exception handler which additionally makes generated code smaller and faster. The third patch is a trivial one-line fix for a patch which went in during 4.11-rc and which avoids stalled CPU warnings after power shutdown (for parisc machines which can't plug power off themselves). Due to the rewrite of pa_memcpy() into assembly this patch got bigger than what I wanted to have sent at this stage. Those patches have been running in production during the last few days on our debian build servers without any further issues" * 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Avoid stalled CPU warnings after system shutdown parisc: Clean up fixup routines for get_user()/put_user() parisc: Fix access fault handling in pa_memcpy() commit 7d34ddbe476e2f00851002bfdec7cafde02b4311 Merge: 978e0f9 0917ac4 Author: Linus Torvalds Date: Sat Apr 1 20:07:31 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Thirteen small fixes: The hopefully final effort to get the lpfc nvme kconfig problems sorted, there's one important sg fix (user can induce read after end of buffer) and one minor enhancement (adding an extra PCI ID to qedi). The rest are a set of minor fixes, which mostly occur as user visible in error legs or on specific devices" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: remove the duplicated checking for supporting clkscaling scsi: lpfc: fix building without debugfs support scsi: lpfc: Fix PT2PT PRLI reject scsi: hpsa: fix volume offline state scsi: libsas: fix ata xfer length scsi: scsi_dh_alua: Warn if the first argument of alua_rtpg_queue() is NULL scsi: scsi_dh_alua: Ensure that alua_activate() calls the completion function scsi: scsi_dh_alua: Check scsi_device_get() return value scsi: sg: check length passed to SG_NEXT_CMD_LEN scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR scsi: qedi: Add PCI device-ID for QL41xxx adapters. scsi: aacraid: Fix potential null access scsi: qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr commit 978e0f92cdc2d2148b09eb6082704ae7a10df255 Merge: a9f6b6b 13a6798 Author: Linus Torvalds Date: Sat Apr 1 19:45:05 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "11 fixes" * emailed patches from Andrew Morton : kasan: do not sanitize kexec purgatory drivers/rapidio/devices/tsi721.c: make module parameter variable name unique mm/hugetlb.c: don't call region_abort if region_chg fails kasan: report only the first error by default hugetlbfs: initialize shared policy as part of inode allocation mm: fix section name for .data..ro_after_init mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() mm: workingset: fix premature shadow node shrinking with cgroups mm: rmap: fix huge file mmap accounting in the memcg stats mm: move mm_percpu_wq initialization earlier mm: migrate: fix remove_migration_pte() for ksm pages commit 612307c6bebc0651cf36b6bf76249898f595fd64 Merge: 0989bd0 7d65f82 Author: David S. Miller Date: Sat Apr 1 13:31:15 2017 -0700 Merge tag 'mac80211-for-davem-2017-03-31' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two fixes: * don't block netdev queues (indefinitely!) if mac80211 manages traffic queueing itself * check wiphy registration before checking for ops on resume, to avoid crash ==================== Signed-off-by: David S. Miller commit 0989bd034a125cef29bd6351514d588fc616b39a Merge: d5b07cc 02ea80b Author: David S. Miller Date: Sat Apr 1 12:36:38 2017 -0700 Merge branch 'bpf-map_value_adj-reg-types-fixes' Daniel Borkmann says: ==================== BPF fixes on map_value_adj reg types This set adds two fixes for map_value_adj register type in the verifier and user space tests along with them for the BPF self test suite. For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit 02ea80b1850e48abbce77878896229d7cc5cb230 Author: Daniel Borkmann Date: Fri Mar 31 02:24:04 2017 +0200 bpf: add various verifier test cases for self-tests Add a couple of test cases, for example, probing for xadd on a spilled pointer to packet and map_value_adj register, various other map_value_adj tests including the unaligned load/store, and trying out pointer arithmetic on map_value_adj register itself. For the unaligned load/store, we need to figure out whether the architecture has efficient unaligned access and need to mark affected tests accordingly. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/include/linux/filter.h | 10 ++ tools/testing/selftests/bpf/Makefile | 9 +- tools/testing/selftests/bpf/test_verifier.c | 270 +++++++++++++++++++++++++++- 3 files changed, 283 insertions(+), 6 deletions(-) commit 79adffcd6489ef43bda2dfded3d637d7fb4fac80 Author: Daniel Borkmann Date: Fri Mar 31 02:24:03 2017 +0200 bpf, verifier: fix rejection of unaligned access checks for map_value_adj Currently, the verifier doesn't reject unaligned access for map_value_adj register types. Commit 484611357c19 ("bpf: allow access into map value arrays") added logic to check_ptr_alignment() extending it from PTR_TO_PACKET to also PTR_TO_MAP_VALUE_ADJ, but for PTR_TO_MAP_VALUE_ADJ no enforcement is in place, because reg->id for PTR_TO_MAP_VALUE_ADJ reg types is never non-zero, meaning, we can cause BPF_H/_W/_DW-based unaligned access for architectures not supporting efficient unaligned access, and thus worst case could raise exceptions on some archs that are unable to correct the unaligned access or perform a different memory access to the actual requested one and such. i) Unaligned load with !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on r0 (map_value_adj): 0: (bf) r2 = r10 1: (07) r2 += -8 2: (7a) *(u64 *)(r2 +0) = 0 3: (18) r1 = 0x42533a00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+11 R0=map_value(ks=8,vs=48,id=0),min_value=0,max_value=0 R10=fp 7: (61) r1 = *(u32 *)(r0 +0) 8: (35) if r1 >= 0xb goto pc+9 R0=map_value(ks=8,vs=48,id=0),min_value=0,max_value=0 R1=inv,min_value=0,max_value=10 R10=fp 9: (07) r0 += 3 10: (79) r7 = *(u64 *)(r0 +0) R0=map_value_adj(ks=8,vs=48,id=0),min_value=3,max_value=3 R1=inv,min_value=0,max_value=10 R10=fp 11: (79) r7 = *(u64 *)(r0 +2) R0=map_value_adj(ks=8,vs=48,id=0),min_value=3,max_value=3 R1=inv,min_value=0,max_value=10 R7=inv R10=fp [...] ii) Unaligned store with !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on r0 (map_value_adj): 0: (bf) r2 = r10 1: (07) r2 += -8 2: (7a) *(u64 *)(r2 +0) = 0 3: (18) r1 = 0x4df16a00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+19 R0=map_value(ks=8,vs=48,id=0),min_value=0,max_value=0 R10=fp 7: (07) r0 += 3 8: (7a) *(u64 *)(r0 +0) = 42 R0=map_value_adj(ks=8,vs=48,id=0),min_value=3,max_value=3 R10=fp 9: (7a) *(u64 *)(r0 +2) = 43 R0=map_value_adj(ks=8,vs=48,id=0),min_value=3,max_value=3 R10=fp 10: (7a) *(u64 *)(r0 -2) = 44 R0=map_value_adj(ks=8,vs=48,id=0),min_value=3,max_value=3 R10=fp [...] For the PTR_TO_PACKET type, reg->id is initially zero when skb->data was fetched, it later receives a reg->id from env->id_gen generator once another register with UNKNOWN_VALUE type was added to it via check_packet_ptr_add(). The purpose of this reg->id is twofold: i) it is used in find_good_pkt_pointers() for setting the allowed access range for regs with PTR_TO_PACKET of same id once verifier matched on data/data_end tests, and ii) for check_ptr_alignment() to determine that when not having efficient unaligned access and register with UNKNOWN_VALUE was added to PTR_TO_PACKET, that we're only allowed to access the content bytewise due to unknown unalignment. reg->id was never intended for PTR_TO_MAP_VALUE{,_ADJ} types and thus is always zero, the only marking is in PTR_TO_MAP_VALUE_OR_NULL that was added after 484611357c19 via 57a09bf0a416 ("bpf: Detect identical PTR_TO_MAP_VALUE_OR_NULL registers"). Above tests will fail for non-root environment due to prohibited pointer arithmetic. The fix splits register-type specific checks into their own helper instead of keeping them combined, so we don't run into a similar issue in future once we extend check_ptr_alignment() further and forget to add reg->type checks for some of the checks. Fixes: 484611357c19 ("bpf: allow access into map value arrays") Signed-off-by: Daniel Borkmann Reviewed-by: Josef Bacik Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 58 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 20 deletions(-) commit fce366a9dd0ddc47e7ce05611c266e8574a45116 Author: Daniel Borkmann Date: Fri Mar 31 02:24:02 2017 +0200 bpf, verifier: fix alu ops against map_value{, _adj} register types While looking into map_value_adj, I noticed that alu operations directly on the map_value() resp. map_value_adj() register (any alu operation on a map_value() register will turn it into a map_value_adj() typed register) are not sufficiently protected against some of the operations. Two non-exhaustive examples are provided that the verifier needs to reject: i) BPF_AND on r0 (map_value_adj): 0: (bf) r2 = r10 1: (07) r2 += -8 2: (7a) *(u64 *)(r2 +0) = 0 3: (18) r1 = 0xbf842a00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+2 R0=map_value(ks=8,vs=48,id=0),min_value=0,max_value=0 R10=fp 7: (57) r0 &= 8 8: (7a) *(u64 *)(r0 +0) = 22 R0=map_value_adj(ks=8,vs=48,id=0),min_value=0,max_value=8 R10=fp 9: (95) exit from 6 to 9: R0=inv,min_value=0,max_value=0 R10=fp 9: (95) exit processed 10 insns ii) BPF_ADD in 32 bit mode on r0 (map_value_adj): 0: (bf) r2 = r10 1: (07) r2 += -8 2: (7a) *(u64 *)(r2 +0) = 0 3: (18) r1 = 0xc24eee00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+2 R0=map_value(ks=8,vs=48,id=0),min_value=0,max_value=0 R10=fp 7: (04) (u32) r0 += (u32) 0 8: (7a) *(u64 *)(r0 +0) = 22 R0=map_value_adj(ks=8,vs=48,id=0),min_value=0,max_value=0 R10=fp 9: (95) exit from 6 to 9: R0=inv,min_value=0,max_value=0 R10=fp 9: (95) exit processed 10 insns Issue is, while min_value / max_value boundaries for the access are adjusted appropriately, we change the pointer value in a way that cannot be sufficiently tracked anymore from its origin. Operations like BPF_{AND,OR,DIV,MUL,etc} on a destination register that is PTR_TO_MAP_VALUE{,_ADJ} was probably unintended, in fact, all the test cases coming with 484611357c19 ("bpf: allow access into map value arrays") perform BPF_ADD only on the destination register that is PTR_TO_MAP_VALUE_ADJ. Only for UNKNOWN_VALUE register types such operations make sense, f.e. with unknown memory content fetched initially from a constant offset from the map value memory into a register. That register is then later tested against lower / upper bounds, so that the verifier can then do the tracking of min_value / max_value, and properly check once that UNKNOWN_VALUE register is added to the destination register with type PTR_TO_MAP_VALUE{,_ADJ}. This is also what the original use-case is solving. Note, tracking on what is being added is done through adjust_reg_min_max_vals() and later access to the map value enforced with these boundaries and the given offset from the insn through check_map_access_adj(). Tests will fail for non-root environment due to prohibited pointer arithmetic, in particular in check_alu_op(), we bail out on the is_pointer_value() check on the dst_reg (which is false in root case as we allow for pointer arithmetic via env->allow_ptr_leaks). Similarly to PTR_TO_PACKET, one way to fix it is to restrict the allowed operations on PTR_TO_MAP_VALUE{,_ADJ} registers to 64 bit mode BPF_ADD. The test_verifier suite runs fine after the patch and it also rejects mentioned test cases. Fixes: 484611357c19 ("bpf: allow access into map value arrays") Signed-off-by: Daniel Borkmann Reviewed-by: Josef Bacik Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit d5b07ccc1bf5fd2ccc6bf9da5677fc448a972e32 Author: René Rebe Date: Tue Mar 28 07:56:51 2017 +0200 r8152: The Microsoft Surface docks also use R8152 v2 Without this the generic cdc_ether grabs the device, and does not really work. Signed-off-by: René Rebe Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 15 +++++++++++++++ drivers/net/usb/r8152.c | 3 +++ 2 files changed, 18 insertions(+) commit 6f56f6186c18e3fd54122b73da68e870687b8c59 Author: Yi-Hung Wei Date: Thu Mar 30 12:36:03 2017 -0700 openvswitch: Fix ovs_flow_key_update() ovs_flow_key_update() is called when the flow key is invalid, and it is used to update and revalidate the flow key. Commit 329f45bc4f19 ("openvswitch: add mac_proto field to the flow key") introduces mac_proto field to flow key and use it to determine whether the flow key is valid. However, the commit does not update the code path in ovs_flow_key_update() to revalidate the flow key which may cause BUG_ON() on execute_recirc(). This patch addresses the aforementioned issue. Fixes: 329f45bc4f19 ("openvswitch: add mac_proto field to the flow key") Signed-off-by: Yi-Hung Wei Acked-by: Jiri Benc Signed-off-by: David S. Miller net/openvswitch/flow.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3af887c38f1ae0db66c00c4ee2e8a0b1e99ffc29 Author: Mark Brown Date: Thu Mar 30 17:00:12 2017 +0100 net/faraday: Explicitly include linux/of.h and linux/property.h This driver uses interfaces from linux/of.h and linux/property.h but relies on implict inclusion of those headers which means that changes in other headers could break the build, as happened in -next for arm today. Add a explicit includes. Signed-off-by: Mark Brown Acked-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 2 ++ 1 file changed, 2 insertions(+) commit b917078c1c107ce34264af893e436e6115eeb9f6 Author: Daode Huang Date: Thu Mar 30 16:37:41 2017 +0100 net: hns: Add ACPI support to check SFP present The current code only supports DT to check SFP present. This patch adds ACPI support as well. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 11 +++++---- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 28 +++++++++++++++++++++- 2 files changed, 34 insertions(+), 5 deletions(-) commit a9f6b6b8cd2f5c935e9cd78b322897c08fe3ad82 Merge: b3ff4fa a7f12a2 Author: Linus Torvalds Date: Sat Apr 1 11:50:25 2017 -0700 Merge tag 'usb-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 4.11-rc5. The usual xhci fixes are here, as well as a fix for yet-another-bug- found-by-KASAN, those developers are doing great stuff here. And there's a phy build warning fix that showed up in 4.11-rc1. All of these have been in linux-next with no reported issues" * tag 'usb-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: phy: isp1301: Fix build warning when CONFIG_OF is disabled xhci: Manually give back cancelled URB if we can't queue it for cancel xhci: Set URB actual length for stopped control transfers xhci: plat: Register shutdown for xhci_plat USB: fix linked-list corruption in rh_call_control() commit b3ff4fac96295e0a92bdcee34887fad5cbb63d3b Merge: 7ece03b e53e597 Author: Linus Torvalds Date: Sat Apr 1 11:47:36 2017 -0700 Merge tag 'tty-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small fixes for some serial drivers and Kconfig help text for 4.11-rc5. Nothing major here at all, a few things resolving reported bugs in some random serial drivers. I don't think these made the last linux-next due to me getting to them yesterday, but I am not sure, they might have snuck in. The patches only affect drivers that the maintainers of sent me these patches for, so we should be safe here :)" * tag 'tty-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: pl011: fix earlycon work-around for QDF2400 erratum 44 serial: 8250_EXAR: fix duplicate Kconfig text and add missing help text tty/serial: atmel: fix TX path in atmel_console_write() tty/serial: atmel: fix race condition (TX+DMA) serial: mxs-auart: Fix baudrate calculation commit 7ece03b08549f0495e64ddf34034d759af9527d4 Merge: 0d2ceec a079306 Author: Linus Torvalds Date: Sat Apr 1 11:22:05 2017 -0700 Merge tag 'acpi-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two issues related to IOAPIC hotplug, an overzealous build optimization that prevents the function graph tracer from working with the ACPI subsystem correctly and an RCU synchronization issue in the ACPI APEI code. Specifics: - drop the unconditional setting of the '-Os' gcc flag from the ACPI Makefile to make the function graph tracer work correctly with the ACPI subsystem (Josh Poimboeuf). - add missing synchronize_rcu() to ghes_remove() which removes an element from an RCU-protected list, but fails to synchronize it properly afterward (James Morse). - fix two problems related to IOAPIC hotplug, a local variable initialization in setup_res() and the creation of platform device objects for IO(x)APICs which are (a) unused and (b) leaked on hot-removal (Joerg Roedel)" * tag 'acpi-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Fix incompatibility with mcount-based function graph tracing ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal ACPI: Do not create a platform_device for IOAPIC/IOxAPIC ACPI: ioapic: Clear on-stack resource before using it commit 0d2ceec687cfc0da85f4fe5c39851b1e405a7f85 Merge: 1300dc6 46e1d5e Author: Linus Torvalds Date: Sat Apr 1 11:17:48 2017 -0700 Merge tag 'pm-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a cpufreq core issue with the initialization of the cpufreq sysfs interface and a cpuidle powernv driver initialization issue. Specifics: - symbolic links from CPU directories to the corresponding cpufreq policy directories in sysfs are not created during initialization in some cases which confuses user space, so prevent that from happening (Rafael Wysocki). - the powernv cpuidle driver fails to pass a correct cpumaks to the cpuidle core in some cases which causes subsequent failures to occur, so fix it (Vaidyanathan Srinivasan)" * tag 'pm-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: powernv: Pass correct drv->cpumask for registration cpufreq: Fix creation of symbolic links to policy directories commit 1300dc689f66e7fafcbc28e88c0c839161a3507d Merge: dcbcb49 0bf9e12 Author: Linus Torvalds Date: Sat Apr 1 11:13:31 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two bugfixes from I2C, specifically the I2C mux section. Thanks to peda for collecting them" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mux: pca954x: Add missing pca9546 definition to chip_desc Revert "i2c: mux: pca954x: Add ACPI support for pca954x" commit dcbcb49155be1934d13887e50b9b728e153b15c3 Merge: 09c8b3d 4c6fabd Author: Linus Torvalds Date: Sat Apr 1 10:52:19 2017 -0700 Merge tag 'arc-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "Accumulated fixes for ARC which I've been been sitting on for a while: - reading clk from driver vs device tree [Vlad] - fix support for UIO in VDK platform [Alexey] - SLC busy bit reading workaround - build warning with kprobes header reorg" * tag 'arc-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: fix build warnings with !CONFIG_KPROBES ARCv2: SLC: Make sure busy bit is set properly on SLC flushing ARC: vdk: Fix support of UIO ARCv2: make unimplemented vectors as no-ops rather than halt core ARC: get rate from clk driver instead of reading device tree ARC: [dts] add cpu nodes to ARCHS SMP device tree ARC: [dts] add input clocks for cpu nodes commit 09c8b3d1d6433860e9c51f5fc72f22a9b56ebb52 Merge: fe8e12b 23abec2 Author: Linus Torvalds Date: Sat Apr 1 10:43:37 2017 -0700 Merge tag 'nfsd-4.11-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "The restriction of NFSv4 to TCP went overboard and also broke the backchannel; fix. Also some minor refinements to the nfsd version-setting interface that we'd like to get fixed before release" * tag 'nfsd-4.11-1' of git://linux-nfs.org/~bfields/linux: svcrdma: set XPT_CONG_CTRL flag for bc xprt NFSD: fix nfsd_reset_versions for NFSv4. NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) NFSD: further refinement of content of /proc/fs/nfsd/versions nfsd: map the ENOKEY to nfserr_perm for avoiding warning SUNRPC/backchanel: set XPT_CONG_CTRL flag for bc xprt commit e53e597fd4c4a0b6ae58e57d76a240927fd17eaa Author: Timur Tabi Date: Fri Mar 31 17:05:02 2017 -0500 tty: pl011: fix earlycon work-around for QDF2400 erratum 44 The work-around for the Qualcomm Datacenter Technologies QDF2400 erratum 44 sets the "qdf2400_e44_present" global variable if the work-around is needed. However, this check does not happen until after earlycon is initialized, which means the work-around is not used, and the console hangs as soon as it displays one character. Fixes: d8a4995bcea1 ("tty: pl011: Work around QDF2400 E44 stuck BUSY bit") Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit aa4ce4493c88dc324911152d1ccd25469366dba3 Author: Zhi Wang Date: Sat Apr 1 00:00:53 2017 +0800 drm/i915/gvt: Fix firmware loading interface for GVT-g golden HW state Firmware loading interface for GVT-g golden HW state has been broken before. This patch fixes GVT-g firmware loading interface. A user should apply this patch if he wants to load GVT-g golden HW state from firmware interface. Fixes: 579cea5 ("drm/i915/gvt: golden virtual HW state management") Cc: Zhenyu Wang Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fe8e12b5032536d37751c47e1c0446f17e974e5c Merge: f9799ad 41a75a6 Author: Linus Torvalds Date: Fri Mar 31 17:58:48 2017 -0700 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "We have three small fixes queued up in my for-linus-4.11 branch" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix an integer overflow check btrfs: Change qgroup_meta_rsv to 64bit Btrfs: bring back repair during read commit 13a6798e4a03096b11bf402a063786a7be55d426 Author: Mike Galbraith Date: Fri Mar 31 15:12:12 2017 -0700 kasan: do not sanitize kexec purgatory Fixes this: kexec: Undefined symbol: __asan_load8_noabort kexec-bzImage64: Loading purgatory failed Link: http://lkml.kernel.org/r/1489672155.4458.7.camel@gmx.de Signed-off-by: Mike Galbraith Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/purgatory/Makefile | 1 + 1 file changed, 1 insertion(+) commit 4785603bd05b0b029c647080937674d9991600f9 Author: Randy Dunlap Date: Fri Mar 31 15:12:10 2017 -0700 drivers/rapidio/devices/tsi721.c: make module parameter variable name unique kbuild test robot reported a non-static variable name collision between a staging driver and a RapidIO driver, with a generic variable name of 'dbg_level'. Both drivers should be changed so that they don't use this generic public variable name. This patch fixes the RapidIO driver but does not change the user interface (name) for the module parameter. drivers/staging/built-in.o:(.bss+0x109d0): multiple definition of `dbg_level' drivers/rapidio/built-in.o:(.bss+0x16c): first defined here Link: http://lkml.kernel.org/r/ab527fc5-aa3c-4b07-5d48-eef5de703192@infradead.org Signed-off-by: Randy Dunlap Reported-by: kbuild test robot Cc: Greg Kroah-Hartman Cc: Matt Porter Cc: Alexandre Bounine Cc: Jérémy Lefaure Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 4 ++-- drivers/rapidio/devices/tsi721.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ff8c0c53c47530ffea82c22a0a6df6332b56c957 Author: Mike Kravetz Date: Fri Mar 31 15:12:07 2017 -0700 mm/hugetlb.c: don't call region_abort if region_chg fails Changes to hugetlbfs reservation maps is a two step process. The first step is a call to region_chg to determine what needs to be changed, and prepare that change. This should be followed by a call to call to region_add to commit the change, or region_abort to abort the change. The error path in hugetlb_reserve_pages called region_abort after a failed call to region_chg. As a result, the adds_in_progress counter in the reservation map is off by 1. This is caught by a VM_BUG_ON in resv_map_release when the reservation map is freed. syzkaller fuzzer (when using an injected kmalloc failure) found this bug, that resulted in the following: kernel BUG at mm/hugetlb.c:742! Call Trace: hugetlbfs_evict_inode+0x7b/0xa0 fs/hugetlbfs/inode.c:493 evict+0x481/0x920 fs/inode.c:553 iput_final fs/inode.c:1515 [inline] iput+0x62b/0xa20 fs/inode.c:1542 hugetlb_file_setup+0x593/0x9f0 fs/hugetlbfs/inode.c:1306 newseg+0x422/0xd30 ipc/shm.c:575 ipcget_new ipc/util.c:285 [inline] ipcget+0x21e/0x580 ipc/util.c:639 SYSC_shmget ipc/shm.c:673 [inline] SyS_shmget+0x158/0x230 ipc/shm.c:657 entry_SYSCALL_64_fastpath+0x1f/0xc2 RIP: resv_map_release+0x265/0x330 mm/hugetlb.c:742 Link: http://lkml.kernel.org/r/1490821682-23228-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Dmitry Vyukov Acked-by: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b0845ce58379d11dcad4cdb6824a6410de260216 Author: Mark Rutland Date: Fri Mar 31 15:12:04 2017 -0700 kasan: report only the first error by default Disable kasan after the first report. There are several reasons for this: - Single bug quite often has multiple invalid memory accesses causing storm in the dmesg. - Write OOB access might corrupt metadata so the next report will print bogus alloc/free stacktraces. - Reports after the first easily could be not bugs by itself but just side effects of the first one. Given that multiple reports usually only do harm, it makes sense to disable kasan after the first one. If user wants to see all the reports, the boot-time parameter kasan_multi_shot must be used. [aryabinin@virtuozzo.com: wrote changelog and doc, added missing include] Link: http://lkml.kernel.org/r/20170323154416.30257-1-aryabinin@virtuozzo.com Signed-off-by: Mark Rutland Signed-off-by: Andrey Ryabinin Cc: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 6 +++++ include/linux/kasan.h | 3 +++ lib/test_kasan.c | 10 +++++++ mm/kasan/kasan.h | 5 ---- mm/kasan/report.c | 36 +++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 5 deletions(-) commit 4742a35d9de745e867405b4311e1aac412f0ace1 Author: Mike Kravetz Date: Fri Mar 31 15:12:01 2017 -0700 hugetlbfs: initialize shared policy as part of inode allocation Any time after inode allocation, destroy_inode can be called. The hugetlbfs inode contains a shared_policy structure, and mpol_free_shared_policy is unconditionally called as part of hugetlbfs_destroy_inode. Initialize the policy as part of inode allocation so that any quick (error path) calls to destroy_inode will be handed an initialized policy. syzkaller fuzzer found this bug, that resulted in the following: BUG: KASAN: user-memory-access in atomic_inc include/asm-generic/atomic-instrumented.h:87 [inline] at addr 000000131730bd7a BUG: KASAN: user-memory-access in __lock_acquire+0x21a/0x3a80 kernel/locking/lockdep.c:3239 at addr 000000131730bd7a Write of size 4 by task syz-executor6/14086 CPU: 3 PID: 14086 Comm: syz-executor6 Not tainted 4.11.0-rc3+ #364 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: atomic_inc include/asm-generic/atomic-instrumented.h:87 [inline] __lock_acquire+0x21a/0x3a80 kernel/locking/lockdep.c:3239 lock_acquire+0x1ee/0x590 kernel/locking/lockdep.c:3762 __raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] _raw_write_lock+0x33/0x50 kernel/locking/spinlock.c:295 mpol_free_shared_policy+0x43/0xb0 mm/mempolicy.c:2536 hugetlbfs_destroy_inode+0xca/0x120 fs/hugetlbfs/inode.c:952 alloc_inode+0x10d/0x180 fs/inode.c:216 new_inode_pseudo+0x69/0x190 fs/inode.c:889 new_inode+0x1c/0x40 fs/inode.c:918 hugetlbfs_get_inode+0x40/0x420 fs/hugetlbfs/inode.c:734 hugetlb_file_setup+0x329/0x9f0 fs/hugetlbfs/inode.c:1282 newseg+0x422/0xd30 ipc/shm.c:575 ipcget_new ipc/util.c:285 [inline] ipcget+0x21e/0x580 ipc/util.c:639 SYSC_shmget ipc/shm.c:673 [inline] SyS_shmget+0x158/0x230 ipc/shm.c:657 entry_SYSCALL_64_fastpath+0x1f/0xc2 Analysis provided by Tetsuo Handa Link: http://lkml.kernel.org/r/1490477850-7944-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Dmitry Vyukov Acked-by: Hillf Danton Cc: Tetsuo Handa Cc: Michal Hocko Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 906f2a51c941e251ca196d5128953d9899a608ef Author: Kees Cook Date: Fri Mar 31 15:11:58 2017 -0700 mm: fix section name for .data..ro_after_init A section name for .data..ro_after_init was added by both: commit d07a980c1b8d ("s390: add proper __ro_after_init support") and commit d7c19b066dcf ("mm: kmemleak: scan .data.ro_after_init") The latter adds incorrect wrapping around the existing s390 section, and came later. I'd prefer the s390 naming, so this moves the s390-specific name up to the asm-generic/sections.h and renames the section as used by kmemleak (and in the future, kernel/extable.c). Link: http://lkml.kernel.org/r/20170327192213.GA129375@beast Signed-off-by: Kees Cook Acked-by: Heiko Carstens [s390 parts] Acked-by: Jakub Kicinski Cc: Eddie Kovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/sections.h | 1 - arch/s390/kernel/vmlinux.lds.S | 2 -- include/asm-generic/sections.h | 6 +++--- include/asm-generic/vmlinux.lds.h | 4 ++-- mm/kmemleak.c | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) commit c9d398fa237882ea07167e23bcfc5e6847066518 Author: Naoya Horiguchi Date: Fri Mar 31 15:11:55 2017 -0700 mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() I found the race condition which triggers the following bug when move_pages() and soft offline are called on a single hugetlb page concurrently. Soft offlining page 0x119400 at 0x700000000000 BUG: unable to handle kernel paging request at ffffea0011943820 IP: follow_huge_pmd+0x143/0x190 PGD 7ffd2067 PUD 7ffd1067 PMD 0 [61163.582052] Oops: 0000 [#1] SMP Modules linked in: binfmt_misc ppdev virtio_balloon parport_pc pcspkr i2c_piix4 parport i2c_core acpi_cpufreq ip_tables xfs libcrc32c ata_generic pata_acpi virtio_blk 8139too crc32c_intel ata_piix serio_raw libata virtio_pci 8139cp virtio_ring virtio mii floppy dm_mirror dm_region_hash dm_log dm_mod [last unloaded: cap_check] CPU: 0 PID: 22573 Comm: iterate_numa_mo Tainted: P OE 4.11.0-rc2-mm1+ #2 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:follow_huge_pmd+0x143/0x190 RSP: 0018:ffffc90004bdbcd0 EFLAGS: 00010202 RAX: 0000000465003e80 RBX: ffffea0004e34d30 RCX: 00003ffffffff000 RDX: 0000000011943800 RSI: 0000000000080001 RDI: 0000000465003e80 RBP: ffffc90004bdbd18 R08: 0000000000000000 R09: ffff880138d34000 R10: ffffea0004650000 R11: 0000000000c363b0 R12: ffffea0011943800 R13: ffff8801b8d34000 R14: ffffea0000000000 R15: 000077ff80000000 FS: 00007fc977710740(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffea0011943820 CR3: 000000007a746000 CR4: 00000000001406f0 Call Trace: follow_page_mask+0x270/0x550 SYSC_move_pages+0x4ea/0x8f0 SyS_move_pages+0xe/0x10 do_syscall_64+0x67/0x180 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7fc976e03949 RSP: 002b:00007ffe72221d88 EFLAGS: 00000246 ORIG_RAX: 0000000000000117 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc976e03949 RDX: 0000000000c22390 RSI: 0000000000001400 RDI: 0000000000005827 RBP: 00007ffe72221e00 R08: 0000000000c2c3a0 R09: 0000000000000004 R10: 0000000000c363b0 R11: 0000000000000246 R12: 0000000000400650 R13: 00007ffe72221ee0 R14: 0000000000000000 R15: 0000000000000000 Code: 81 e4 ff ff 1f 00 48 21 c2 49 c1 ec 0c 48 c1 ea 0c 4c 01 e2 49 bc 00 00 00 00 00 ea ff ff 48 c1 e2 06 49 01 d4 f6 45 bc 04 74 90 <49> 8b 7c 24 20 40 f6 c7 01 75 2b 4c 89 e7 8b 47 1c 85 c0 7e 2a RIP: follow_huge_pmd+0x143/0x190 RSP: ffffc90004bdbcd0 CR2: ffffea0011943820 ---[ end trace e4f81353a2d23232 ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: disabled This bug is triggered when pmd_present() returns true for non-present hugetlb, so fixing the present check in follow_huge_pmd() prevents it. Using pmd_present() to determine present/non-present for hugetlb is not correct, because pmd_present() checks multiple bits (not only _PAGE_PRESENT) for historical reason and it can misjudge hugetlb state. Fixes: e66f17ff7177 ("mm/hugetlb: take page table lock in follow_huge_pmd()") Link: http://lkml.kernel.org/r/1490149898-20231-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Acked-by: Hillf Danton Cc: Hugh Dickins Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0cefabdaf757a6455d75f00cb76874e62703ed18 Author: Johannes Weiner Date: Fri Mar 31 15:11:52 2017 -0700 mm: workingset: fix premature shadow node shrinking with cgroups Commit 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") enabled cgroup-awareness in the shadow node shrinker, but forgot to also enable cgroup-awareness in the list_lru the shadow nodes sit on. Consequently, all shadow nodes are sitting on a global (per-NUMA node) list, while the shrinker applies the limits according to the amount of cache in the cgroup its shrinking. The result is excessive pressure on the shadow nodes from cgroups that have very little cache. Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits are applied to per-cgroup lists. Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") Link: http://lkml.kernel.org/r/20170322005320.8165-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Michal Hocko Cc: [4.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 553af430e7c981e6e8fa5007c5b7b5773acc63dd Author: Johannes Weiner Date: Fri Mar 31 15:11:50 2017 -0700 mm: rmap: fix huge file mmap accounting in the memcg stats Huge pages are accounted as single units in the memcg's "file_mapped" counter. Account the correct number of base pages, like we do in the corresponding node counter. Link: http://lkml.kernel.org/r/20170322005111.3156-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 6 ++++++ mm/rmap.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 597b7305dd8bafdb3aef4957d97128bc90af8e9f Author: Michal Hocko Date: Fri Mar 31 15:11:47 2017 -0700 mm: move mm_percpu_wq initialization earlier Yang Li has reported that drain_all_pages triggers a WARN_ON which means that this function is called earlier than the mm_percpu_wq is initialized on arm64 with CMA configured: WARNING: CPU: 2 PID: 1 at mm/page_alloc.c:2423 drain_all_pages+0x244/0x25c Modules linked in: CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc1-next-20170310-00027-g64dfbc5 #127 Hardware name: Freescale Layerscape 2088A RDB Board (DT) task: ffffffc07c4a6d00 task.stack: ffffffc07c4a8000 PC is at drain_all_pages+0x244/0x25c LR is at start_isolate_page_range+0x14c/0x1f0 [...] drain_all_pages+0x244/0x25c start_isolate_page_range+0x14c/0x1f0 alloc_contig_range+0xec/0x354 cma_alloc+0x100/0x1fc dma_alloc_from_contiguous+0x3c/0x44 atomic_pool_init+0x7c/0x208 arm64_dma_init+0x44/0x4c do_one_initcall+0x38/0x128 kernel_init_freeable+0x1a0/0x240 kernel_init+0x10/0xfc ret_from_fork+0x10/0x20 Fix this by moving the whole setup_vmstat which is an initcall right now to init_mm_internals which will be called right after the WQ subsystem is initialized. Link: http://lkml.kernel.org/r/20170315164021.28532-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Yang Li Tested-by: Yang Li Tested-by: Xiaolong Ye Cc: Mel Gorman Cc: Vlastimil Babka Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 ++ init/main.c | 2 ++ mm/vmstat.c | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) commit 4b0ece6fa0167b22c004ff69e137dc94ee2e469e Author: Naoya Horiguchi Date: Fri Mar 31 15:11:44 2017 -0700 mm: migrate: fix remove_migration_pte() for ksm pages I found that calling page migration for ksm pages causes the following bug: page:ffffea0004d51180 count:2 mapcount:2 mapping:ffff88013c785141 index:0x913 flags: 0x57ffffc0040068(uptodate|lru|active|swapbacked) raw: 0057ffffc0040068 ffff88013c785141 0000000000000913 0000000200000001 raw: ffffea0004d5f9e0 ffffea0004d53f60 0000000000000000 ffff88007d81b800 page dumped because: VM_BUG_ON_PAGE(!PageLocked(page)) page->mem_cgroup:ffff88007d81b800 ------------[ cut here ]------------ kernel BUG at /src/linux-dev/mm/rmap.c:1086! invalid opcode: 0000 [#1] SMP Modules linked in: ppdev parport_pc virtio_balloon i2c_piix4 pcspkr parport i2c_core acpi_cpufreq ip_tables xfs libcrc32c ata_generic pata_acpi ata_piix 8139too libata virtio_blk 8139cp crc32c_intel mii virtio_pci virtio_ring serio_raw virtio floppy dm_mirror dm_region_hash dm_log dm_mod CPU: 0 PID: 3162 Comm: bash Not tainted 4.11.0-rc2-mm1+ #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:do_page_add_anon_rmap+0x1ba/0x260 RSP: 0018:ffffc90002473b30 EFLAGS: 00010282 RAX: 0000000000000021 RBX: ffffea0004d51180 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff88007dc0dfe0 RBP: ffffc90002473b58 R08: 00000000fffffffe R09: 00000000000001c1 R10: 0000000000000005 R11: 00000000000001c0 R12: ffff880139ab3d80 R13: 0000000000000000 R14: 0000700000000200 R15: 0000160000000000 FS: 00007f5195f50740(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd450287000 CR3: 000000007a08e000 CR4: 00000000001406f0 Call Trace: page_add_anon_rmap+0x18/0x20 remove_migration_pte+0x220/0x2c0 rmap_walk_ksm+0x143/0x220 rmap_walk+0x55/0x60 remove_migration_ptes+0x53/0x80 migrate_pages+0x8ed/0xb60 soft_offline_page+0x309/0x8d0 store_soft_offline_page+0xaf/0xf0 dev_attr_store+0x18/0x30 sysfs_kf_write+0x3a/0x50 kernfs_fop_write+0xff/0x180 __vfs_write+0x37/0x160 vfs_write+0xb2/0x1b0 SyS_write+0x55/0xc0 do_syscall_64+0x67/0x180 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f51956339e0 RSP: 002b:00007ffcfa0dffc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f51956339e0 RDX: 000000000000000c RSI: 00007f5195f53000 RDI: 0000000000000001 RBP: 00007f5195f53000 R08: 000000000000000a R09: 00007f5195f50740 R10: 000000000000000b R11: 0000000000000246 R12: 00007f5195907400 R13: 000000000000000c R14: 0000000000000001 R15: 0000000000000000 Code: fe ff ff 48 81 c2 00 02 00 00 48 89 55 d8 e8 2e c3 fd ff 48 8b 55 d8 e9 42 ff ff ff 48 c7 c6 e0 52 a1 81 48 89 df e8 46 ad fe ff <0f> 0b 48 83 e8 01 e9 7f fe ff ff 48 83 e8 01 e9 96 fe ff ff 48 RIP: do_page_add_anon_rmap+0x1ba/0x260 RSP: ffffc90002473b30 ---[ end trace a679d00f4af2df48 ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception The problem is in the following lines: new = page - pvmw.page->index + linear_page_index(vma, pvmw.address); The 'new' is calculated with 'page' which is given by the caller as a destination page and some offset adjustment for thp. But this doesn't properly work for ksm pages because pvmw.page->index doesn't change for each address but linear_page_index() changes, which means that 'new' points to different pages for each addresses backed by the ksm page. As a result, we try to set totally unrelated pages as destination pages, and that causes kernel crash. This patch fixes the miscalculation and makes ksm page migration work fine. Fixes: 3fe87967c536 ("mm: convert remove_migration_pte() to use page_vma_mapped_walk()") Link: http://lkml.kernel.org/r/1489717683-29905-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Mel Gorman Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1493aa65ad076293722908f03bab3d4bf3dc3638 Author: Max Filippov Date: Fri Mar 31 16:26:21 2017 -0700 xtensa: wire up statx system call Signed-off-by: Max Filippov arch/xtensa/include/uapi/asm/unistd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e640cc306388b6f9dc8109d5c5d0550d7e69e5f7 Author: Max Filippov Date: Fri Mar 31 15:58:40 2017 -0700 xtensa: fix stack dump output Use %pB in pr_cont format string instead of calling print_symbol separately. It turns [ 19.166249] Call Trace: [ 19.167265] [] [ 19.167843] __warn+0x92/0xa0 [ 19.169656] [] [ 19.170059] warn_slowpath_fmt+0x3c/0x40 [ 19.171934] [] back into [ 18.123240] Call Trace: [ 18.125039] [] __warn+0x92/0xa0 [ 18.126961] [] warn_slowpath_fmt+0x3c/0x40 Signed-off-by: Max Filippov arch/xtensa/kernel/traps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fdad4e7a876a2cb3d2c1f04e5418c324e79fffef Author: Rafael J. Wysocki Date: Sat Apr 1 00:45:52 2017 +0200 ACPI / scan: Prefer devices without _HID for _ADR matching Commit c2a6bbaf0c5f (ACPI / scan: Prefer devices without _HID/_CID for _ADR matching) added a list_empty(&adev->pnp.ids) check to find_child_checks() so as to catch situations in which the ACPI core attempts to decode _ADR for a device having a _HID too which is strictly against the spec. However, it overlooked the fact that the adev->pnp.ids list for the devices taken into account by find_child_checks() may contain device IDs set internally by the kernel, like "LNXVIDEO" (thanks to Zhang Rui for that realization), and it broke the enumeration of those devices as a result. To unbreak it, replace the overly coarse grained list_empty() check with a much more precise check against the pnp.type.platform_id flag which is only set for devices having a _HID (that's how it should be done from the start, as having both _ADR and _CID is actually permitted). Fixes: c2a6bbaf0c5f (ACPI / scan: Prefer devices without _HID/_CID for _ADR matching) Link: https://bugzilla.kernel.org/show_bug.cgi?id=194889 Reported-and-tested-by: Mike Tested-by: Hans de Goede Cc: 4.10+ # 4.10+ Signed-off-by: Rafael J. Wysocki drivers/acpi/glue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 46e1d5e972db830379533f4d2d282cbb812dbb9b Merge: c02ed2e 2f0ba79 293d264 Author: Rafael J. Wysocki Date: Fri Mar 31 23:00:53 2017 +0200 Merge branches 'pm-cpufreq-fixes' and 'pm-cpuidle-fixes' * pm-cpufreq-fixes: cpufreq: Fix creation of symbolic links to policy directories * pm-cpuidle-fixes: cpuidle: powernv: Pass correct drv->cpumask for registration commit a07930662e3097144d6cbbc1b9211867fd1a173e Merge: 08f63d9 61b79e1 7d64f82 Author: Rafael J. Wysocki Date: Fri Mar 31 22:50:14 2017 +0200 Merge branches 'acpi-hotplug-fixes', 'acpi-build-fixes' and 'acpi-apei-fixes' * acpi-hotplug-fixes: ACPI: Do not create a platform_device for IOAPIC/IOxAPIC ACPI: ioapic: Clear on-stack resource before using it * acpi-build-fixes: ACPI: Fix incompatibility with mcount-based function graph tracing * acpi-apei-fixes: ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal commit 86e3e83b443669dd2bcc5c8a83b23e3aa0694c0d Author: Sami Tolvanen Date: Fri Mar 31 12:32:45 2017 -0700 dm verity fec: fix bufio leaks Buffers read through dm_bufio_read() were not released in all code paths. Fixes: a739ff3f543a ("dm verity: add support for forward error correction") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Sami Tolvanen Signed-off-by: Mike Snitzer drivers/md/dm-verity-fec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f9799ad21b5e4a41633f54dfab407ebb37abbd8a Merge: e39bccf f17f8a1 Author: Linus Torvalds Date: Fri Mar 31 12:29:03 2017 -0700 Merge tag 'nfs-for-4.11-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "Here are a few more bugfixes that came in over the last couple of weeks. Most of these fix various hangs and loops that people found, but we also had a few error handling fixes. Stable Bugfixes: - fix infinite loop on BAD_STATEID error Other Bugfixes: - fix old dentry rehash after move - fix pnfs GETDEVINFO hangs - fix pnfs fallback to MDS on commit errors - fix flexfiles kernel oops" * tag 'nfs-for-4.11-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: nfs: flexfiles: fix kernel OOPS if MDS returns unsupported DS type NFSv4.1 fix infinite loop on IO BAD_STATEID error PNFS fix fallback to MDS if got error on commit to DS NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes NFS store nfs4_deviceid in struct nfs4_filelayout_segment NFS cleanup struct nfs4_filelayout_segment NFS: Fix old dentry rehash after move commit e39bccf20483ce3d6a55da23ab6dc3b7ad4f49e0 Merge: 035f0cd 9b3403a Author: Linus Torvalds Date: Fri Mar 31 12:21:48 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main thing is a fix for a NULL dereference on systems that boot using spin-tables or the ACPI parking protocol, but there are also a couple of trivial one-liners too. We're currently debugging a page flags corruption issue under syzkaller, but we're still some way from fixing that as it's proving fiddly to reproduce. Summary: - fix cpu_die() NULL dereference when booting secondary CPUs using spin-table - remove redundant #include - remove obsolete .gitignore entry" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: drop non-existing vdso-offsets.h from .gitignore arm64: remove redundant header file in current.h arm64: fix NULL dereference in have_cpu_die() commit 035f0cd3f8d86db900cde083d8ed8a7b0ce1221a Merge: 728f4b3 9df0eb1 Author: Linus Torvalds Date: Fri Mar 31 12:11:32 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following issues: - memory corruption when kmalloc fails in xts/lrw - mark some CCP DMA channels as private - fix reordering race in padata - regression in omap-rng DT description" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: xts,lrw - fix out-of-bounds write after kmalloc failure crypto: ccp - Make some CCP DMA channels private padata: avoid race in reordering dt-bindings: rng: clocks property on omap_rng not always mandatory commit 728f4b3aa6621aba12e9f9c2f006f2912a90463a Merge: 0fc04f91 d091876 Author: Linus Torvalds Date: Fri Mar 31 12:05:05 2017 -0700 Merge tag 'mmc-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.11 rc5. MMC host: - sdhci: Fix bug when using SDIO IRQ - sdhci-of-at91: Fix eMMC DDR52 card detection" * tag 'mmc-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection mmc: sdhci: Disable runtime pm when the sdio_irq is enabled commit 0fc04f911374594de1c6b50cde53f5802241e668 Merge: eee551d 2f726ae Author: Linus Torvalds Date: Fri Mar 31 11:53:49 2017 -0700 Merge tag 'sound-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "At this time, most of changes are for ASoC, while we got one fix for yet another race of ALSA sequencer core and a usual HD-audio quirk. The ASoC changes are mostly small and device-specific fixes. A slightly large volume is seen in sun8i-codec, which is a new code in 4.11, and we'd like to fix user-visible stuff before the official 4.1 release" * tag 'sound-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits) ALSA: hda - fix a problem for lineout on a Dell AIO machine ASoC: simple-card: fix simple_dai clk lookup ASoC: STI: Fix reader substream pointer set ALSA: seq: Fix race during FIFO resize ARM: dts: sun8i: Update audio-routing with renamed widgets ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN ASoC: sun8i-codec: Fix space on audio-routing widget ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE ASoC: sun8i-codec: Remove analog "HP" widget ASoC: rt5665: fix wrong shift rt5665_if2_1_adc_in_enum ASoC: rt5665: fix define of RT5665_HP_DRIVER_5X ASoC: rcar: dma: remove unnecessary "volatile" ASoC: rcar: clear DE bit only in PDMACHCR when it stops ASoC: rsnd: fix sound route path when using SRC6/SRC9 ASoC: don't dereference NULL pcm_{new,free} ASoC: rt5665: CLKDET is also a power of ASRC ASoC: rt5665: Vref3 is necessary for Mono Amp ASoC: rt5665: increase LDO level ASoC: rt5665: fix getting wrong work handler container ASoC: atmel-classd: fix audio clock rate ... commit eee551df28b4cf8e1a07d229a2e4c65649f11472 Merge: 5559394 4d20c33 Author: Linus Torvalds Date: Fri Mar 31 11:50:31 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - Wacom regression fixes, from Aaron Armstrong Skomra - new device ID addition by Peter Stein * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: call _query_tablet_data() for BAMBOO_TOUCH HID: wacom: Don't add ghost interface as shared data HID: xinmo: fix for out of range for THT 2P arcade controller. commit 5559394d18442bb4abce68348de662d222634022 Merge: d456226 3a2d782 Author: Linus Torvalds Date: Fri Mar 31 11:34:06 2017 -0700 Merge tag 'drm-fixes-for-v4.11-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Seems to be quietening down, which means someone will make a liar of me for rc6. Just one vc4, one etnvaiv, one radeon, and a few i915 GVT fixes, and one i915 normal fixes" * tag 'drm-fixes-for-v4.11-rc5' of git://people.freedesktop.org/~airlied/linux: drm/vc4: Allocate the right amount of space for boot-time CRTC state. drm/etnaviv: (re-)protect fence allocation with GPU mutex drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags drm/i915: Restore marking context objects as dirty on pinning drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request drm/i915/gvt: set shadow entry to scratch page while p2m failed drm/i915/gvt: Fix guest fail to read EDID leading to black guest console issue. drm/i915/gvt: fix wrong offset when loading RCS mocs drm/i915/gvt: add write handler for mmio mbctl drm/i915/kvmgt: Hold struct kvm reference commit f17f8a14e82cdf34cd6473e3644f3c672b3884f6 Author: Tigran Mkrtchyan Date: Thu Mar 30 17:31:18 2017 +0200 nfs: flexfiles: fix kernel OOPS if MDS returns unsupported DS type this fix aims to fix dereferencing of a mirror in an error state when MDS returns unsupported DS type (IOW, not v3), which causes the following oops: [ 220.370709] BUG: unable to handle kernel NULL pointer dereference at 0000000000000065 [ 220.370842] IP: ff_layout_mirror_valid+0x2d/0x110 [nfs_layout_flexfiles] [ 220.370920] PGD 0 [ 220.370972] Oops: 0000 [#1] SMP [ 220.371013] Modules linked in: nfnetlink_queue nfnetlink_log bluetooth nfs_layout_flexfiles rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security iptable_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security ebtable_filter ebtables ip6table_filter ip6_tables binfmt_misc intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel btrfs kvm arc4 snd_hda_codec_hdmi iwldvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel intel_cstate mac80211 xor uvcvideo [ 220.371814] videobuf2_vmalloc videobuf2_memops snd_hda_codec_idt mei_wdt videobuf2_v4l2 snd_hda_codec_generic iTCO_wdt ppdev videobuf2_core iTCO_vendor_support dell_rbtn dell_wmi iwlwifi sparse_keymap dell_laptop dell_smbios snd_hda_intel dcdbas videodev snd_hda_codec dell_smm_hwmon snd_hda_core media cfg80211 intel_uncore snd_hwdep raid6_pq snd_seq intel_rapl_perf snd_seq_device joydev i2c_i801 rfkill lpc_ich snd_pcm parport_pc mei_me parport snd_timer dell_smo8800 mei snd shpchp soundcore tpm_tis tpm_tis_core tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc i915 nouveau mxm_wmi ttm i2c_algo_bit drm_kms_helper crc32c_intel e1000e drm sdhci_pci firewire_ohci sdhci serio_raw mmc_core firewire_core ptp crc_itu_t pps_core wmi fjes video [ 220.372568] CPU: 7 PID: 4988 Comm: cat Not tainted 4.10.5-200.fc25.x86_64 #1 [ 220.372647] Hardware name: Dell Inc. Latitude E6520/0J4TFW, BIOS A06 07/11/2011 [ 220.372729] task: ffff94791f6ea580 task.stack: ffffb72b88c0c000 [ 220.372802] RIP: 0010:ff_layout_mirror_valid+0x2d/0x110 [nfs_layout_flexfiles] [ 220.372883] RSP: 0018:ffffb72b88c0f970 EFLAGS: 00010246 [ 220.372945] RAX: 0000000000000000 RBX: ffff9479015ca600 RCX: ffffffffffffffed [ 220.373025] RDX: ffffffffffffffed RSI: ffff9479753dc980 RDI: 0000000000000000 [ 220.373104] RBP: ffffb72b88c0f988 R08: 000000000001c980 R09: ffffffffc0ea6112 [ 220.373184] R10: ffffef17477d9640 R11: ffff9479753dd6c0 R12: ffff9479211c7440 [ 220.373264] R13: ffff9478f45b7790 R14: 0000000000000001 R15: ffff9479015ca600 [ 220.373345] FS: 00007f555fa3e700(0000) GS:ffff9479753c0000(0000) knlGS:0000000000000000 [ 220.373435] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 220.373506] CR2: 0000000000000065 CR3: 0000000196044000 CR4: 00000000000406e0 [ 220.373586] Call Trace: [ 220.373627] nfs4_ff_layout_prepare_ds+0x5e/0x200 [nfs_layout_flexfiles] [ 220.373708] ff_layout_pg_init_read+0x81/0x160 [nfs_layout_flexfiles] [ 220.373806] __nfs_pageio_add_request+0x11f/0x4a0 [nfs] [ 220.373886] ? nfs_create_request.part.14+0x37/0x330 [nfs] [ 220.373967] nfs_pageio_add_request+0xb2/0x260 [nfs] [ 220.374042] readpage_async_filler+0xaf/0x280 [nfs] [ 220.374103] read_cache_pages+0xef/0x1b0 [ 220.374166] ? nfs_read_completion+0x210/0x210 [nfs] [ 220.374239] nfs_readpages+0x129/0x200 [nfs] [ 220.374293] __do_page_cache_readahead+0x1d0/0x2f0 [ 220.374352] ondemand_readahead+0x17d/0x2a0 [ 220.374403] page_cache_sync_readahead+0x2e/0x50 [ 220.374460] generic_file_read_iter+0x6c8/0x950 [ 220.374532] ? nfs_mapping_need_revalidate_inode+0x17/0x40 [nfs] [ 220.374617] nfs_file_read+0x6e/0xc0 [nfs] [ 220.374670] __vfs_read+0xe2/0x150 [ 220.374715] vfs_read+0x96/0x130 [ 220.374758] SyS_read+0x55/0xc0 [ 220.374801] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 220.374856] RIP: 0033:0x7f555f570bd0 [ 220.374900] RSP: 002b:00007ffeb73e1b38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 220.374986] RAX: ffffffffffffffda RBX: 00007f555f839ae0 RCX: 00007f555f570bd0 [ 220.375066] RDX: 0000000000020000 RSI: 00007f555fa41000 RDI: 0000000000000003 [ 220.375145] RBP: 0000000000021010 R08: ffffffffffffffff R09: 0000000000000000 [ 220.375226] R10: 00007f555fa40010 R11: 0000000000000246 R12: 0000000000022000 [ 220.375305] R13: 0000000000021010 R14: 0000000000001000 R15: 0000000000002710 [ 220.375386] Code: 66 66 90 55 48 89 e5 41 54 53 49 89 fc 48 83 ec 08 48 85 f6 74 2e 48 8b 4e 30 48 89 f3 48 81 f9 00 f0 ff ff 77 1e 48 85 c9 74 15 <48> 83 79 78 00 b8 01 00 00 00 74 2c 48 83 c4 08 5b 41 5c 5d c3 [ 220.375653] RIP: ff_layout_mirror_valid+0x2d/0x110 [nfs_layout_flexfiles] RSP: ffffb72b88c0f970 [ 220.375748] CR2: 0000000000000065 [ 220.403538] ---[ end trace bcdca752211b7da9 ]--- Signed-off-by: Tigran Mkrtchyan Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayoutdev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0e3d3e5df07dcf8a50d96e0ecd6ab9a888f55dfc Author: Olga Kornievskaia Date: Thu Mar 30 13:49:03 2017 -0400 NFSv4.1 fix infinite loop on IO BAD_STATEID error Commit 63d63cbf5e03 "NFSv4.1: Don't recheck delegations that have already been checked" introduced a regression where when a client received BAD_STATEID error it would not send any TEST_STATEID and instead go into an infinite loop of resending the IO that caused the BAD_STATEID. Fixes: 63d63cbf5e03 ("NFSv4.1: Don't recheck delegations that have already been checked") Signed-off-by: Olga Kornievskaia Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 49e1590c2ead870f4ae5568816241c4cb9bc1606 Author: Paul Gortmaker Date: Mon Mar 27 19:39:10 2017 -0400 serial: 8250_EXAR: fix duplicate Kconfig text and add missing help text In commit d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 ("serial: exar: split out the exar code from 8250_pci") the exar driver got its own Kconfig. However the text for the new option was never changed from the original 8250_PCI text, and hence it appears confusing when you get asked the same question twice: 8250/16550 PCI device support (SERIAL_8250_PCI) [Y/n/m/?] (NEW) 8250/16550 PCI device support (SERIAL_8250_EXAR) [Y/n/m] (NEW) Adding to the confusion, is that there is no help text for this new option to indicate it is specific to a certain family of cards. Fix both issues at the same time, as well as the space vs. tab issues introduced in the same commit. Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci") Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Sudip Mukherjee Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 497e1e16f45c70574dc9922c7f75c642c2162119 Author: Nicolas Ferre Date: Mon Mar 20 16:38:57 2017 +0100 tty/serial: atmel: fix TX path in atmel_console_write() A side effect of 89d8232411a8 ("tty/serial: atmel_serial: BUG: stop DMA from transmitting in stop_tx") is that the console can be called with TX path disabled. Then the system would hang trying to push charecters out in atmel_console_putchar(). Signed-off-by: Nicolas Ferre Fixes: 89d8232411a8 ("tty/serial: atmel_serial: BUG: stop DMA from transmitting in stop_tx") Cc: stable #4.4+ Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 3 +++ 1 file changed, 3 insertions(+) commit 31ca2c63fdc0aee725cbd4f207c1256f5deaabde Author: Richard Genoud Date: Mon Mar 20 11:52:41 2017 +0100 tty/serial: atmel: fix race condition (TX+DMA) If uart_flush_buffer() is called between atmel_tx_dma() and atmel_complete_tx_dma(), the circular buffer has been cleared, but not atmel_port->tx_len. That leads to a circular buffer overflow (dumping (UART_XMIT_SIZE - atmel_port->tx_len) bytes). Tested-by: Nicolas Ferre Signed-off-by: Richard Genoud Cc: stable # 3.12+ Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 5 +++++ 1 file changed, 5 insertions(+) commit a6040bc610554c66088fda3608ae5d6307c548e4 Author: Uwe Kleine-König Date: Mon Mar 20 10:05:38 2017 +0100 serial: mxs-auart: Fix baudrate calculation The reference manual for the i.MX28 recommends to calculate the divisor as divisor = (UARTCLK * 32) / baud rate, rounded to the nearest integer , so let's do this. For a typical setup of UARTCLK = 24 MHz and baud rate = 115200 this changes the divisor from 6666 to 6667 and so the actual baud rate improves from 115211.521 Bd (error ≅ 0.01 %) to 115194.240 Bd (error ≅ 0.005 %). Signed-off-by: Uwe Kleine-König Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a0c5c5b834fb60764b494b0e39c239da3b0774b Author: Dmitry Bilunov Date: Thu Mar 30 18:14:26 2017 +0300 dm raid: fix NULL pointer dereference for raid1 without bitmap Commit 4257e08 ("dm raid: support to change bitmap region size") introduced a bitmap resize call during preresume phase. User can create a DM device with "raid" target configured as raid1 with no metadata devices to hold superblock/bitmap info. It can be achieved using the following sequence: truncate -s 32M /dev/shm/raid-test LOOP=$(losetup --show -f /dev/shm/raid-test) dmsetup create raid-test-linear0 --table "0 1024 linear $LOOP 0" dmsetup create raid-test-linear1 --table "0 1024 linear $LOOP 1024" dmsetup create raid-test --table "0 1024 raid raid1 1 2048 2 - /dev/mapper/raid-test-linear0 - /dev/mapper/raid-test-linear1" This results in the following crash: [ 4029.110216] device-mapper: raid: Ignoring chunk size parameter for RAID 1 [ 4029.110217] device-mapper: raid: Choosing default region size of 4MiB [ 4029.111349] md/raid1:mdX: active with 2 out of 2 mirrors [ 4029.114770] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [ 4029.114802] IP: bitmap_resize+0x25/0x7c0 [md_mod] [ 4029.114816] PGD 0 … [ 4029.115059] Hardware name: Aquarius Pro P30 S85 BUY-866/B85M-E, BIOS 2304 05/25/2015 [ 4029.115079] task: ffff88015cc29a80 task.stack: ffffc90001a5c000 [ 4029.115097] RIP: 0010:bitmap_resize+0x25/0x7c0 [md_mod] [ 4029.115112] RSP: 0018:ffffc90001a5fb68 EFLAGS: 00010246 [ 4029.115127] RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000000 [ 4029.115146] RDX: 0000000000000000 RSI: 0000000000000400 RDI: 0000000000000000 [ 4029.115166] RBP: ffffc90001a5fc28 R08: 0000000800000000 R09: 00000008ffffffff [ 4029.115185] R10: ffffea0005661600 R11: ffff88015cc29a80 R12: ffff88021231f058 [ 4029.115204] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 4029.115223] FS: 00007fe73a6b4740(0000) GS:ffff88021ea80000(0000) knlGS:0000000000000000 [ 4029.115245] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4029.115261] CR2: 0000000000000030 CR3: 0000000159a74000 CR4: 00000000001426e0 [ 4029.115281] Call Trace: [ 4029.115291] ? raid_iterate_devices+0x63/0x80 [dm_raid] [ 4029.115309] ? dm_table_all_devices_attribute.isra.23+0x41/0x70 [dm_mod] [ 4029.115329] ? dm_table_set_restrictions+0x225/0x2d0 [dm_mod] [ 4029.115346] raid_preresume+0x81/0x2e0 [dm_raid] [ 4029.115361] dm_table_resume_targets+0x47/0xe0 [dm_mod] [ 4029.115378] dm_resume+0xa8/0xd0 [dm_mod] [ 4029.115391] dev_suspend+0x123/0x250 [dm_mod] [ 4029.115405] ? table_load+0x350/0x350 [dm_mod] [ 4029.115419] ctl_ioctl+0x1c2/0x490 [dm_mod] [ 4029.115433] dm_ctl_ioctl+0xe/0x20 [dm_mod] [ 4029.115447] do_vfs_ioctl+0x8d/0x5a0 [ 4029.115459] ? ____fput+0x9/0x10 [ 4029.115470] ? task_work_run+0x79/0xa0 [ 4029.115481] SyS_ioctl+0x3c/0x70 [ 4029.115493] entry_SYSCALL_64_fastpath+0x13/0x94 The raid_preresume() function incorrectly assumes that the raid_set has a bitmap enabled if RT_FLAG_RS_BITMAP_LOADED is set. But RT_FLAG_RS_BITMAP_LOADED is getting set in __load_dirty_region_bitmap() even if there is no bitmap present (and bitmap_load() happily returns 0 even if a bitmap isn't present). So the only way forward in the near-term is to check if the bitmap is present by seeing if mddev->bitmap is not NULL after bitmap_load() has been called. By doing so the above NULL pointer is avoided. Fixes: 4257e08 ("dm raid: support to change bitmap region size") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Dmitry Bilunov Signed-off-by: Andrey Smetanin Acked-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89eae62254e56f4987ed920d4e1637ff86e7873 Merge: 920c634 4296989 Author: Thomas Gleixner Date: Fri Mar 31 16:54:48 2017 +0200 Merge tag 'irq-fixes-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier - Fix mvebu-odmi dependency selection - Fix mips-gic virtual/hw mapping commit 42969893b45a7a1864192f5634a8d2626e546a7b Author: Matt Redfearn Date: Fri Mar 31 12:05:32 2017 +0100 irqchip/mips-gic: Fix Local compare interrupt Commit 4cfffcfa5106 ("irqchip/mips-gic: Fix local interrupts") added mapping of several local interrupts during initialisation of the gic driver. This associates virq numbers with these interrupts. Unfortunately, as not all of the interrupts are mapped in hardware order, when drivers subsequently request these interrupts they conflict with the mappings that have already been set up. For example, this manifests itself in the gic clocksource driver, which fails to probe with the message: clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0x7350c9738, max_idle_ns: 440795203769 ns GIC timer IRQ 25 setup failed: -22 This is because virq 25 (the correct IRQ number specified via device tree) was allocated to the PERFCTR interrupt (and 24 to the timer, 26 to the FDC). To fix this, map all of these local interrupts in the hardware order so as to associate their virq numbers with the correct hw interrupts. Fixes: 4cfffcfa5106 ("irqchip/mips-gic: Fix local interrupts") Acked-by: Ralf Baechle Signed-off-by: Matt Redfearn Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 4 ++++ 1 file changed, 4 insertions(+) commit ecf8e89917d600fe846ebda911a9e690c6babfd0 Author: Chris Wilson Date: Thu Mar 30 12:16:14 2017 +0100 drm/i915: Use a dummy timeline name for a signaled fence Michał Winiarski pointed out that the debugging infrastructure (such as trace_dma_fence_release) likes to pretty print the timeline name, long after we have freed the timeline. Our timelines currently live as part of the GTT (due to the strict ordering we currently use through each) which belong to the context. We aim to free the context and release its hardware resources as soon as we able to (i.e. when the last fence/request using it has been signaled and retired). As the .get_timeline_name is purely a debug feature, rather than extending the lifetime of the context, or splitting it into many different release phases just to keep the name around, replace the timeline name with a constant after the fence has been signaled. This avoids the potential use-after-free. Reported-by: Krzysztof Olinski Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines") Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170330111614.29757-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Michał Winiarski (cherry picked from commit 05506b5be081b728353f1612b05c8ff689772832) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_request.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1383aeca92b72f4179420820c3a64dfb5909cc97 Author: Chris Wilson Date: Thu Mar 30 09:53:41 2017 +0100 drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex Since commit 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking"), i915_gem_object_put_pages() and specifically the i915_gem_gtt_finish_pages() may be called from outside of the struct_mutex and so we can no longer pass I915_WAIT_LOCKED to i915_gem_wait_for_idle. Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170330085341.20311-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 228ec87ccd040b620c467cd61d594bfaa4f8a12e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ba2a6261de49588714a25f49db80bbe961b870a Author: Tina Zhang Date: Fri Mar 24 01:56:54 2017 -0400 drm/i915/gvt: remove the redundant info NULL check The variable info is never NULL, which is checked by the caller. This patch removes the redundant info NULL check logic. Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err") Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang (cherry picked from commit 865f03d42ed0c90c9faf3301775176834ba13eba) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gvt/kvmgt.c | 7 ------- 1 file changed, 7 deletions(-) commit 729a0cd45c886a8d1ae0b3063b20d525fc729523 Author: Zhenyu Wang Date: Mon Mar 27 17:41:02 2017 +0800 drm/i915/gvt: adjust mem size for low resolution type From commit d1a513be1f0a ("drm/i915/gvt: add resolution definition for vGPU type"), small type has been restricted to small resolution, so not require larger high GM size any more. Change to smaller 384M for more VM creation with vGPU enabled which still perform reasonable workload. Fixes: d1a513be1f0a ("drm/i915/gvt: add resolution definition for vGPU type") Signed-off-by: Zhenyu Wang (cherry picked from commit bf39ec335eb8cc51b4e1c9303ef92b380d204bb1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c9a8cdad48a04795dbc35ac3370afa3180045ae Author: Chris Wilson Date: Mon Mar 27 21:21:43 2017 +0100 drm/i915: Avoid lock dropping between rescheduling Unlocking is dangerous. In this case we combine an early update to the out-of-queue request, because we know that it will be inserted into the correct FIFO priority-ordered slot when it becomes ready in the future. However, given sufficient enthusiasm, it may become ready as we are continuing to reschedule, and so may gazump the FIFO if we have since dropped its spinlock. The result is that it may be executed too early, before its dependencies. v2: Move all work into the second phase over the topological sort. This removes the shortcut on the out-of-rbtree request to ensure that we only adjust its priority after adjusting all of its dependencies. Fixes: 20311bd35060 ("drm/i915/scheduler: Execute requests in order of priorities") Testcase: igt/gem_exec_whisper Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170327202143.7972-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit a79a524e9260d4ffaff88348615e70fb3d393692) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 53 ++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit 2f726aec19a9d2c63bec9a8a53a3910ffdcd09f8 Author: Hui Wang Date: Fri Mar 31 10:31:40 2017 +0800 ALSA: hda - fix a problem for lineout on a Dell AIO machine On this Dell AIO machine, the lineout jack does not work. We found the pin 0x1a is assigned to lineout on this machine, and in the past, we applied ALC298_FIXUP_DELL1_MIC_NO_PRESENCE to fix the heaset-set mic problem for this machine, this fixup will redefine the pin 0x1a to headphone-mic, as a result the lineout doesn't work anymore. After consulting with Dell, they told us this machine doesn't support microphone via headset jack, so we add a new fixup which only defines the pin 0x18 as the headset-mic. [rearranged the fixup insertion position by tiwai in order to make the merge with other branches easier -- tiwai] Fixes: 59ec4b57bcae ("ALSA: hda - Fix headset mic detection problem for two dell machines") Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6b1cc946ddfcfc17d66c7d02eafa14deeb183437 Author: Zhengyi Shen Date: Wed Mar 29 15:00:20 2017 +0800 x86/boot: Include missing header file Sparse complains about missing forward declarations: arch/x86/boot/compressed/error.c:8:6: warning: symbol 'warn' was not declared. Should it be static? arch/x86/boot/compressed/error.c:15:6: warning: symbol 'error' was not declared. Should it be static? Include the missing header file. Signed-off-by: Zhengyi Shen Acked-by: Kess Cook Link: http://lkml.kernel.org/r/1490770820-24472-1-git-send-email-shenzhengyi@gmail.com Signed-off-by: Thomas Gleixner arch/x86/boot/compressed/error.c | 1 + 1 file changed, 1 insertion(+) commit 29f72ce3e4d18066ec75c79c857bee0618a3504b Author: Yazen Ghannam Date: Thu Mar 30 13:17:14 2017 +0200 x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs MCA bank 3 is reserved on systems pre-Fam17h, so it didn't have a name. However, MCA bank 3 is defined on Fam17h systems and can be accessed using legacy MSRs. Without a name we get a stack trace on Fam17h systems when trying to register sysfs files for bank 3 on kernels that don't recognize Scalable MCA. Call MCA bank 3 "decode_unit" since this is what it represents on Fam17h. This will allow kernels without SMCA support to see this bank on Fam17h+ and prevent the stack trace. This will not affect older systems since this bank is reserved on them, i.e. it'll be ignored. Tested on AMD Fam15h and Fam17h systems. WARNING: CPU: 26 PID: 1 at lib/kobject.c:210 kobject_add_internal kobject: (ffff88085bb256c0): attempted to be registered with empty name! ... Call Trace: kobject_add_internal kobject_add kobject_create_and_add threshold_create_device threshold_init_device Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1490102285-3659-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a2d78228a4fd3dadff2b528528aa8901f724a87 Merge: b61d607 6d6e500 Author: Dave Airlie Date: Fri Mar 31 17:29:26 2017 +1000 Merge tag 'drm-misc-fixes-2017-03-31' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Just one vc4 fix from Eric, cc: stable * tag 'drm-misc-fixes-2017-03-31' of git://anongit.freedesktop.org/git/drm-misc: drm/vc4: Allocate the right amount of space for boot-time CRTC state. commit d19c4643a52f0a56a7ccc86b145f207a57f40116 Author: Mike Christie Date: Wed Mar 29 00:19:24 2017 -0500 target: Fix ALUA transition state race between multiple initiators Multiple threads could be writing to alua_access_state at the same time, or there could be multiple STPGs in flight (different initiators sending them or one initiator sending them to different ports), or a combo of both and the core_alua_do_transition_tg_pt calls will race with each other. Because from the last patches we no longer delay running core_alua_do_transition_tg_pt_work, there does not seem to be any point in running that in a workqueue. And, we always wait for it to complete one way or another, so we can sleep in this code path. So, this patch made over target-pending just adds a mutex and does the work core_alua_do_transition_tg_pt_work was doing in core_alua_do_transition_tg_pt. There is also no need to use an atomic for the tg_pt_gp_alua_access_state. In core_alua_do_transition_tg_pt we will test and set it under the transition mutex. And, it is a int/32 bits so in the other places where it is read, we will never see it partially updated. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 136 ++++++++++++---------------------- drivers/target/target_core_configfs.c | 2 +- include/target/target_core_base.h | 8 +- 3 files changed, 51 insertions(+), 95 deletions(-) commit 7a56dc8888be23f44158a85b92da45d545cbf548 Author: Sagi Grimberg Date: Wed Mar 22 17:07:30 2017 +0200 iser-target: avoid posting a recv buffer twice We pre-allocate our send-queues and might overflow them in case we have multi work-request operations which tend to occur for large RDMA transfers over devices with limited allowed sg elements. When we get to a queue-full condition we might retry again later, so track our receive buffers so we don't repost them for a retry case. Reported-by: Potnuri Bharat Teja Tested-by: Potnuri Bharat Teja Reviewed-by: Potnuri Bharat Teja Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 12 ++++++++++++ drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 555a65f66c3c4d9dd46a565418b0b655d861a723 Author: Nicholas Bellinger Date: Sun Oct 30 18:58:39 2016 -0700 iser-target: Fix queue-full response handling This patch addresses two queue-full handling bugs in iser-target. The first is propagating isert_rdma_rw_ctx_post() return back to target-core via isert_put_datain() + isert_get_dataout() callbacks, in order to trigger queue-full logic in target-core. Note target-core expects -EAGAIN or -ENOMEM error to signal RDMA WRITE/READ data-transfer callbacks should be retried, after queue-full logic been invoked. Other types of errors propagated up from RDMA RW API will result in target-core generating internal CHECK_CONDITION status, avoiding subsequent isert_put_datain() and isert_get_dataout() iscsit_transport callback retry attempts. The second is to use transport_generic_request_failure() during T10-PI hw-offload errors in isert_rdma_write_done() and isert_rdma_read_done(), so CHECK_CONDITION queue-full is handled internally by target-core. Also add isert_put_response() T10-PI failure case fixme in isert_rdma_write_done(), which is currently not internally retried or released until session reinstatement. Reported-by: Potnuri Bharat Teja Reviewed-by: Potnuri Bharat Teja Tested-by: Potnuri Bharat Teja Cc: Potnuri Bharat Teja Reported-by: Steve Wise Cc: Steve Wise Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 53 ++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 18 deletions(-) commit a4467018c2a7228f4ef58051f0511bd037bff264 Author: Nicholas Bellinger Date: Sun Oct 30 17:30:08 2016 -0700 iscsi-target: Propigate queue_data_in + queue_status errors This patch changes iscsi-target to propagate iscsit_transport ->iscsit_queue_data_in() and ->iscsit_queue_status() callback errors, back up into target-core. This allows target-core to retry failed iscsit_transport callbacks using internal queue-full logic. Reported-by: Potnuri Bharat Teja Reviewed-by: Potnuri Bharat Teja Tested-by: Potnuri Bharat Teja Cc: Potnuri Bharat Teja Reported-by: Steve Wise Cc: Steve Wise Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 3 +-- drivers/target/iscsi/iscsi_target_configfs.c | 13 +++++-------- drivers/target/iscsi/iscsi_target_util.c | 5 +++-- drivers/target/iscsi/iscsi_target_util.h | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) commit fa7e25cf13a6d0b82b5ed1008246f44d42e8422c Author: Nicholas Bellinger Date: Sun Oct 30 17:28:16 2016 -0700 target: Fix unknown fabric callback queue-full errors This patch fixes a set of queue-full response handling bugs, where outgoing responses are leaked when a fabric driver is propagating non -EAGAIN or -ENOMEM errors to target-core. It introduces TRANSPORT_COMPLETE_QF_ERR state used to signal when CHECK_CONDITION status should be generated, when fabric driver ->write_pending(), ->queue_data_in(), or ->queue_status() callbacks fail with non -EAGAIN or -ENOMEM errors, and data-transfer should not be retried. Note all fabric driver -EAGAIN and -ENOMEM errors are still retried indefinately with associated data-transfer callbacks, following existing queue-full logic. Also fix two missing ->queue_status() queue-full cases related to CMD_T_ABORTED w/ TAS status handling. Reported-by: Potnuri Bharat Teja Reviewed-by: Potnuri Bharat Teja Tested-by: Potnuri Bharat Teja Cc: Potnuri Bharat Teja Reported-by: Steve Wise Cc: Steve Wise Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 102 ++++++++++++++++++++++----------- include/target/target_core_base.h | 1 + 2 files changed, 69 insertions(+), 34 deletions(-) commit b61d60753dc6c7c62669ebb9cacd7dfa5313cd1e Merge: 4adf043 0abfe7e Author: Dave Airlie Date: Fri Mar 31 11:50:56 2017 +1000 Merge tag 'drm-intel-fixes-2017-03-29' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.11-rc5 * tag 'drm-intel-fixes-2017-03-29' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Restore marking context objects as dirty on pinning drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request drm/i915/gvt: set shadow entry to scratch page while p2m failed drm/i915/gvt: Fix guest fail to read EDID leading to black guest console issue. drm/i915/gvt: fix wrong offset when loading RCS mocs drm/i915/gvt: add write handler for mmio mbctl drm/i915/kvmgt: Hold struct kvm reference commit 4adf04361b97ae198394cf44839e481aac317023 Merge: 7502add ce4b4f2 Author: Dave Airlie Date: Fri Mar 31 11:50:30 2017 +1000 Merge branch 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes One small fix for radeon. * 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags commit 7502add2210f8cd9f761c9f25c46f566d1b7305e Merge: c02ed2e f3cd1b0 Author: Dave Airlie Date: Fri Mar 31 11:50:04 2017 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes a single fix to keep fence seqnos of completed jobs monotonically increasing, as expected in various locations of the driver code. Also tagged for stable. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: (re-)protect fence allocation with GPU mutex commit 4c6fabda1ad1dec6d274c098ef0a91809c74f2e3 Author: Vineet Gupta Date: Thu Mar 30 10:02:57 2017 -0700 ARC: fix build warnings with !CONFIG_KPROBES | CC lib/nmi_backtrace.o | In file included from ../include/linux/kprobes.h:43:0, | from ../lib/nmi_backtrace.c:17: | ../arch/arc/include/asm/kprobes.h:57:13: warning: 'trap_is_kprobe' defined but not used [-Wunused-function] | static void trap_is_kprobe(unsigned long address, struct pt_regs *regs) | ^~~~~~~~~~~~~~ The warning started with 7d134b2ce6 ("kprobes: move kprobe declarations to asm-generic/kprobes.h") which started including unconditionally into exposing a stub function for !CONFIG_KPROBES to rest of world. Fix that by making the stub a macro Signed-off-by: Vineet Gupta arch/arc/include/asm/kprobes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c70c473396cbdec1168a6eff60e13029c0916854 Author: Alexey Brodkin Date: Wed Mar 29 17:15:11 2017 +0300 ARCv2: SLC: Make sure busy bit is set properly on SLC flushing As reported in STAR 9001165532, an SLC control reg read (for checking busy state) right after SLC invalidate command may incorrectly return NOT busy causing software to NOT spin-wait while operation is underway. (and for some reason this only happens if L1 cache is also disabled - as required by IOC programming model) Suggested workaround is to do an additional Control Reg read, which ensures the 2nd read gets the right status. Cc: stable@vger.kernel.org #4.10 Signed-off-by: Alexey Brodkin [vgupta: reworte changelog a bit] Signed-off-by: Vineet Gupta arch/arc/mm/cache.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b98ca2a45e35dfe02f4512fa30b9f5a9900cb29 Author: Suresh Reddy Date: Thu Mar 30 00:58:32 2017 -0400 be2net: Fix endian issue in logical link config command Use cpu_to_le32() for link_config variable in set_logical_link_config command as this variable is of type u32. Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d4562267b995fa3917717cc7773dad9c1f1ca658 Merge: 89970a0 9abb27c Author: Linus Torvalds Date: Thu Mar 30 15:08:38 2017 -0700 Merge tag 'pci-v4.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix iProc memory corruption - fix ThunderX usage of unregistered PNP/ACPI ID - fix ThunderX resource reservation on early firmware * tag 'pci-v4.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller PCI: thunder-pem: Use Cavium assigned hardware ID for ThunderX host controller PCI: iproc: Save host bridge window resource in struct iproc_pcie commit 2b83878dd74a7c73bedcb6600663c1c46836e8af Author: Max Filippov Date: Wed Mar 29 15:44:47 2017 -0700 xtensa: make __pa work with uncached KSEG addresses When __pa is applied to virtual address in uncached KSEG region the result is incorrect. Fix it by checking if the original address is in the uncached KSEG and adjusting the result. It looks better than masking off bits because pfn_valid would correctly work with new __pa results and it may be made working in noMMU case, once we get definition for uncached memory view. This is required for the dma_common_mmap and DMA debug code to work correctly: they both indirectly use __pa with coherent DMA addresses. In case of DMA debug the visible effect is false reports that an address mapped for DMA is accessed by CPU. Cc: stable@vger.kernel.org Tested-by: Boris Brezillon Reviewed-by: Boris Brezillon Signed-off-by: Max Filippov arch/xtensa/include/asm/page.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d0918764c17b94c30bbb2619929b1719ff52707a Author: Ludovic Desroches Date: Tue Mar 28 11:00:45 2017 +0200 mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection The controller has different timings for MMC_TIMING_UHS_DDR50 and MMC_TIMING_MMC_DDR52. Configuring the controller with SDHCI_CTRL_UHS_DDR50, when MMC_TIMING_MMC_DDR52 timings are requested, is not correct and can lead to unexpected behavior. Signed-off-by: Ludovic Desroches Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC") Cc: # 4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 923713b357455cfb9aca2cd3429cb0806a724ed2 Author: Hans de Goede Date: Sun Mar 26 13:14:45 2017 +0200 mmc: sdhci: Disable runtime pm when the sdio_irq is enabled SDIO cards may need clock to send the card interrupt to the host. On a cherrytrail tablet with a RTL8723BS wifi chip, without this patch pinging the tablet results in: PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data. 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=78.6 ms 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1760 ms 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=753 ms 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=3.88 ms 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=795 ms 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1841 ms 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=810 ms 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1860 ms 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=812 ms 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=48.6 ms Where as with this patch I get: PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data. 64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=3.96 ms 64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=1.97 ms 64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=17.2 ms 64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=2.46 ms 64 bytes from 192.168.1.14: icmp_seq=5 ttl=64 time=2.83 ms 64 bytes from 192.168.1.14: icmp_seq=6 ttl=64 time=1.40 ms 64 bytes from 192.168.1.14: icmp_seq=7 ttl=64 time=2.10 ms 64 bytes from 192.168.1.14: icmp_seq=8 ttl=64 time=1.40 ms 64 bytes from 192.168.1.14: icmp_seq=9 ttl=64 time=2.04 ms 64 bytes from 192.168.1.14: icmp_seq=10 ttl=64 time=1.40 ms Cc: Dong Aisheng Cc: Ian W MORRISON Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Acked-by: Dong Aisheng Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9b3403ae56e13cdf45252f34db196a8f5f52b6ac Author: Masahiro Yamada Date: Fri Mar 31 02:44:17 2017 +0900 arm64: drop non-existing vdso-offsets.h from .gitignore Since commit a66649dab350 ("arm64: fix vdso-offsets.h dependency"), include/generated/vdso-offsets.h is directly generated without arch/arm64/kernel/vdso/vdso-offsets.h. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon arch/arm64/kernel/vdso/.gitignore | 1 - 1 file changed, 1 deletion(-) commit 34d04f25a98cbc1065e87f10d94798bbe9a8af94 Author: Shaokun Zhang Date: Thu Mar 30 20:41:49 2017 +0800 arm64: remove redundant header file in current.h Commint 9d84fb27fa1 ("arm64: restore get_current() optimisation") has removed read_sysreg() and asm/sysreg.h is redundant. This patch removes asm/sysreg.h header file. Acked-by: Mark Rutland Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon arch/arm64/include/asm/current.h | 2 -- 1 file changed, 2 deletions(-) commit 3dbcc105d5561e18ccd0842c7baab1c835562a37 Author: Xin Long Date: Thu Mar 30 01:00:53 2017 +0800 sctp: alloc stream info when initializing asoc When sending a msg without asoc established, sctp will send INIT packet first and then enqueue chunks. Before receiving INIT_ACK, stream info is not yet alloced. But enqueuing chunks needs to access stream info, like out stream state and out stream cnt. This patch is to fix it by allocing out stream info when initializing an asoc, allocing in stream and re-allocing out stream when processing init. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 ++- net/sctp/associola.c | 7 ++++++- net/sctp/sm_make_chunk.c | 9 ++------- net/sctp/stream.c | 43 +++++++++++++++++++++++++++++++++++-------- 4 files changed, 45 insertions(+), 17 deletions(-) commit bcc5364bdcfe131e6379363f089e7b4108d35b70 Author: Andrey Konovalov Date: Wed Mar 29 16:11:22 2017 +0200 net/packet: fix overflow in check for tp_reserve When calculating po->tp_hdrlen + po->tp_reserve the result can overflow. Fix by checking that tp_reserve <= INT_MAX on assign. Signed-off-by: Andrey Konovalov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f8d28e4d6d815a391285e121c3a53a0b6cb9e7b Author: Andrey Konovalov Date: Wed Mar 29 16:11:21 2017 +0200 net/packet: fix overflow in check for tp_frame_nr When calculating rb->frames_per_block * req->tp_block_nr the result can overflow. Add a check that tp_block_size * tp_block_nr <= UINT_MAX. Since frames_per_block <= tp_block_size, the expression would never overflow. Signed-off-by: Andrey Konovalov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 2 ++ 1 file changed, 2 insertions(+) commit 2b6867c2ce76c596676bec7d2d525af525fdc6e2 Author: Andrey Konovalov Date: Wed Mar 29 16:11:20 2017 +0200 net/packet: fix overflow in check for priv area size Subtracting tp_sizeof_priv from tp_block_size and casting to int to check whether one is less then the other doesn't always work (both of them are unsigned ints). Compare them as is instead. Also cast tp_sizeof_priv to u64 before using BLK_PLUS_PRIV, as it can overflow inside BLK_PLUS_PRIV otherwise. Signed-off-by: Andrey Konovalov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dfcce42b09cde01b2b1f5527ed91112a04a8ab0 Merge: 2d7d540 2ddaa676 Author: Takashi Iwai Date: Thu Mar 30 20:03:25 2017 +0200 Merge tag 'asoc-fix-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.11 A relatively large pile of fixes for mainline, the first since the merge window. The biggest block of changes here by volume is the sun8i-codec set, the driver was newly added in the merge window but it was realized that renaming some of the user visible controls was required so these are being pushed for v4.11 to avoid the original code appearing in a release. Otherwise it's all fairly standard bugfix stuff. commit fabbbee0eb0f4b763576ac1e2db4fc3bf6dcc0cc Author: Olga Kornievskaia Date: Thu Mar 30 10:10:55 2017 -0400 PNFS fix fallback to MDS if got error on commit to DS Upong receiving some errors (EACCES) on commit to the DS the code doesn't fallback to MDS and intead retrieds to the same DS again. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d77facb88448cdeaaa3adba5b9704a48ac2ac8d6 Author: Arend Van Spriel Date: Tue Mar 28 09:11:30 2017 +0100 brcmfmac: use local iftype avoiding use-after-free of virtual interface A use-after-free was found using KASAN. In brcmf_p2p_del_if() the virtual interface is removed using call to brcmf_remove_interface(). After that the virtual interface instance has been freed and should not be referenced. Solve this by storing the nl80211 iftype in local variable, which is used in a couple of places anyway. Cc: stable@vger.kernel.org # 4.10.x, 4.9.x Reported-by: Daniel J Blueman Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 893dc68f1b18451e6d550b1884fc6be76e1bb90c Author: Larry Finger Date: Tue Mar 21 09:24:11 2017 -0500 rtlwifi: Fix scheduling while atomic splat Following commit cceb0a597320 ("rtlwifi: Add work queue for c2h cmd."), the following BUG is reported when rtl8723be is used: BUG: sleeping function called from invalid context at mm/slab.h:432 in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0 CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.11.0-rc3-wl+ #276 Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014 Call Trace: dump_stack+0x63/0x89 ___might_sleep+0xe9/0x130 __might_sleep+0x4a/0x90 kmem_cache_alloc_trace+0x19f/0x200 ? rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi] rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi] rtl8723be_c2h_packet_handler+0xac/0xc0 [rtl8723be] rtl8723be_rx_command_packet+0x37/0x5c [rtl8723be] _rtl_pci_rx_interrupt+0x200/0x6b0 [rtl_pci] _rtl_pci_interrupt+0x20c/0x5d0 [rtl_pci] __handle_irq_event_percpu+0x3f/0x1d0 handle_irq_event_percpu+0x23/0x60 handle_irq_event+0x3c/0x60 handle_fasteoi_irq+0xa2/0x170 handle_irq+0x20/0x30 do_IRQ+0x48/0xd0 common_interrupt+0x89/0x89 ... Although commit cceb0a597320 converted most c2h commands to use a work queue, the Bluetooth coexistence routines can be in atomic mode when they execute such a call. Fixes: cceb0a597320 ("rtlwifi: Add work queue for c2h cmd.") Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d8a531cf79df5bf3b0fc2e6559cfeee9c1238152 Merge: 6be3b6c 4d33998 Author: Kalle Valo Date: Thu Mar 30 19:38:15 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes iwlwifi fixes for 4.11 Here are three patches intended for 4.11. The first one is an RCU fix by Sari. The second one is a fix for a potential out-of-bounds access crash by Dan. And finally, the third and bigger one, is a fix for IBSS, which has been broken since DQA was enabled in the driver. commit 335d2c2d192266358c5dfa64953a4c162f46e464 Author: Mark Salter Date: Fri Mar 24 09:53:56 2017 -0400 arm64: fix NULL dereference in have_cpu_die() Commit 5c492c3f5255 ("arm64: smp: Add function to determine if cpus are stuck in the kernel") added a helper function to determine if die() is supported in cpu_ops. This function assumes a cpu will have a valid cpu_ops entry, but that may not be the case for cpu0 is spin-table or parking protocol is used to boot secondary cpus. In that case, there is a NULL dereference if have_cpu_die() is called by cpu0. So add a check for a valid cpu_ops before dereferencing it. Fixes: 5c492c3f5255 ("arm64: smp: Add function to determine if cpus are stuck in the kernel") Signed-off-by: Mark Salter Signed-off-by: Will Deacon arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d6e500391875cc372336c88e9a8af377be19c36 Author: Eric Anholt Date: Tue Mar 28 13:13:43 2017 -0700 drm/vc4: Allocate the right amount of space for boot-time CRTC state. Without this, the first modeset would dereference past the allocation when trying to free the mm node. Signed-off-by: Eric Anholt Tested-by: Stefan Wahren Link: http://patchwork.freedesktop.org/patch/msgid/20170328201343.4884-1-eric@anholt.net Fixes: d8dbf44f13b9 ("drm/vc4: Make the CRTCs cooperate on allocating display lists.") Cc: # v4.6+ Reviewed-by: Daniel Vetter drivers/gpu/drm/vc4/vc4_crtc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit d43e85b7d7c759a01f92fa09bba5d6eb6e406795 Author: Arnd Bergmann Date: Tue Mar 28 12:15:41 2017 +0200 ARM: orion5x: only call into phylib when available Board code cannot call mdiobus_register_board_info() when phylib or mdio_device is a loadable module: arch/arm/plat-orion/common.o: In function `orion_ge00_switch_init': :(.init.text+0x474): undefined reference to `mdiobus_register_board_info' I had a number of ideas for how this could be solved, but after the MDIO code got split out from PHYLIB it has gotten too hard, so I'm basically giving up, and only call the mdiobus_register_board_info() function if the MDIO layer is built-in to avoid the link error. This is similar to how we handle PHY registration on other ARM platforms. Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Fixes: 648ea0134069 ("net: phy: Allow pre-declaration of MDIO devices") Signed-off-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/mach-orion5x/Kconfig | 1 + arch/arm/plat-orion/common.c | 5 +++++ 2 files changed, 6 insertions(+) commit 0bf9e1270b56b2376ba3b16d951cd0ed7c573f54 Merge: 97da385 dbe4d69 Author: Wolfram Sang Date: Thu Mar 30 16:53:48 2017 +0200 Merge branch 'i2c-mux/for-current' of https://github.com/peda-r/i2c-mux into i2c/for-current Pull in changes for 4.11 from the i2c-mux subsubsystem: "Here are some changes for the pca954x driver. It's a revert of the un-endorsed ACPI support and a fixup in the handling of PCA9546." commit ac77a0c463c1d7d659861f7b6d1261970dd3282a Author: Minchan Kim Date: Thu Mar 30 14:20:45 2017 +0900 block: do not put mq context in blk_mq_alloc_request_hctx In blk_mq_alloc_request_hctx, blk_mq_sched_get_request doesn't get sw context so we don't need to put the context with blk_mq_put_ctx. Unless, we will see preempt counter underflow. Cc: Omar Sandoval Signed-off-by: Minchan Kim Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) commit 3f135e57a4f76d24ae8d8a490314331f0ced40c5 Author: Josh Poimboeuf Date: Thu Mar 16 14:31:33 2017 -0500 x86/build: Mostly disable '-maccumulate-outgoing-args' The GCC '-maccumulate-outgoing-args' flag is enabled for most configs, mostly because of issues which are no longer relevant. For most configs, and with most recent versions of GCC, it's no longer needed. Clarify which cases need it, and only enable it for those cases. Also produce a compile-time error for the ftrace graph + mcount + '-Os' case, which will otherwise cause runtime failures. The main benefit of '-maccumulate-outgoing-args' is that it prevents an ugly prologue for functions which have aligned stacks. But removing the option also has some benefits: more readable argument saves, smaller text size, and (presumably) slightly improved performance. Here are the object size savings for 32-bit and 64-bit defconfig kernels: text data bss dec hex filename 10006710 3543328 1773568 15323606 e9d1d6 vmlinux.x86-32.before 9706358 3547424 1773568 15027350 e54c96 vmlinux.x86-32.after text data bss dec hex filename 10652105 4537576 843776 16033457 f4a6b1 vmlinux.x86-64.before 10639629 4537576 843776 16020981 f475f5 vmlinux.x86-64.after That comes out to a 3% text size improvement on x86-32 and a 0.1% text size improvement on x86-64. Signed-off-by: Josh Poimboeuf Cc: Andrew Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170316193133.zrj6gug53766m6nn@treble Signed-off-by: Ingo Molnar arch/x86/Makefile | 35 +++++++++++++++++++++++++++++++---- arch/x86/Makefile_32.cpu | 18 ------------------ arch/x86/kernel/ftrace.c | 6 ++++++ scripts/Kbuild.include | 4 ++++ 4 files changed, 41 insertions(+), 22 deletions(-) commit f85726905745fb4f6e15c68e2ade9da5390f8d89 Author: Changbin Du Date: Thu Mar 30 11:32:05 2017 +0800 drm/i915/gvt: exclude cfg space from failsafe mode When test GVTg as below scenario: VM boot --> failsafe --> kill qemu --> VM boot. Qemu report error at the second boot: ERROR: PCI region size must be pow2 type=0x0, size=0x1fa1000 Qemu need access PCI_ROM_ADDRESS reg to determine the size of expansion PCI rom. The mechanism just like the BAR reg (write-read) and we should return the size 0 since we have no rom. If we reject the write to PCI_ROM_ADDRESS, Qemu cannot get the correct size of rom. Essentially, GVTg failsafe mode should not break PCI function. So we exclude cfg space from failsafe mode. This can fix above issue. v2: add Fixes and Bugzilla link. Fixes: fd64be636708d ("drm/i915/gvt: introduced failsafe mode into vgpu") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100296 Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 3 --- 1 file changed, 3 deletions(-) commit e7e11f99564222d82f0ce84bd521e57d78a6b678 Author: Li Qiang Date: Mon Mar 27 20:10:53 2017 -0700 drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl() In vmw_surface_define_ioctl(), the 'num_sizes' is the sum of the 'req->mip_levels' array. This array can be assigned any value from the user space. As both the 'num_sizes' and the array is uint32_t, it is easy to make 'num_sizes' overflow. The later 'mip_levels' is used as the loop count. This can lead an oob write. Add the check of 'req->mip_levels' to avoid this. Cc: Signed-off-by: Li Qiang Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 53e16798b0864464c5444a204e1bb93ae246c429 Author: Thomas Hellstrom Date: Mon Mar 27 13:06:05 2017 +0200 drm/vmwgfx: Remove getparam error message The mesa winsys sometimes uses unimplemented parameter requests to check for features. Remove the error message to avoid bloating the kernel log. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 2 -- 1 file changed, 2 deletions(-) commit 3ce7803cf3a7bc52c0eb9f516de8b72a0305ad57 Author: Thomas Hellstrom Date: Mon Mar 27 12:38:25 2017 +0200 drm/ttm: Avoid calling drm_ht_remove from atomic context On recent kernels, calling drm_ht_remove triggers a might_sleep() warning from within vfree(). So avoid calling it from atomic context. The use-cases we fix here are both from destructors so there should be no concurrent use of the hash tables. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/ttm/ttm_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fe25deb7737ce6c0879ccf79c99fa1221d428bf2 Author: Thomas Hellstrom Date: Mon Mar 27 11:21:25 2017 +0200 drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces Previously, when a surface was opened using a legacy (non prime) handle, it was verified to have been created by a client in the same master realm. Relax this so that opening is also allowed recursively if the client already has the surface open. This works around a regression in svga mesa where opening of a shared surface is used recursively to obtain surface information. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/ttm/ttm_object.c | 10 +++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 22 +++++++++------------- include/drm/ttm/ttm_object.h | 5 ++++- 5 files changed, 24 insertions(+), 23 deletions(-) commit 63774069d9527a1aeaa4aa20e929ef5e8e9ecc38 Author: Murray McAllister Date: Mon Mar 27 11:15:12 2017 +0200 drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl() In vmw_get_cap_3d_ioctl(), a user can supply 0 for a size that is used in vzalloc(). This eventually calls dump_stack() (in warn_alloc()), which can leak useful addresses to dmesg. Add check to avoid a size of 0. Cc: Signed-off-by: Murray McAllister Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36274ab8c596f1240c606bb514da329add2a1bcd Author: Murray McAllister Date: Mon Mar 27 11:12:53 2017 +0200 drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() Before memory allocations vmw_surface_define_ioctl() checks the upper-bounds of a user-supplied size, but does not check if the supplied size is 0. Add check to avoid NULL pointer dereferences. Cc: Signed-off-by: Murray McAllister Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7652afa8eadb416b23eb57dec6f158529942041 Author: Thomas Hellstrom Date: Mon Mar 27 11:09:08 2017 +0200 drm/vmwgfx: Type-check lookups of fence objects A malicious caller could otherwise hand over handles to other objects causing all sorts of interesting problems. Testing done: Ran a Fedora 25 desktop using both Xorg and gnome-shell/Wayland. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 77 +++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 27 deletions(-) commit 4d20c332de377fa5b06c46f6f34174c10dd998e4 Author: Aaron Armstrong Skomra Date: Wed Mar 29 11:41:28 2017 -0700 HID: wacom: call _query_tablet_data() for BAMBOO_TOUCH Commit a544c619a54b ("HID: wacom: do not attempt to switch mode while in probe") introduces delayed work for querying (setting the mode) on all tablets. Bamboo Touch (056a:00d0) has a ghost interface which claims to be a pen device. Though this device can be removed, we have to set the mode on the ghost pen interface before we remove it. After the aforementioned delay was introduced the device was being removed before the mode setting could be executed. Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+) commit 8b4073596997f2ccbf68d8e72e07b827388a4536 Author: Aaron Armstrong Skomra Date: Wed Mar 29 10:35:39 2017 -0700 HID: wacom: Don't add ghost interface as shared data A previous commit (below) adds a check for already probed interfaces to Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen (CTL-460) to match itself to its 'ghost' touch interface. After subsequent changes to the driver this match to the ghost causes the kernel to crash. This patch avoids calling wacom_add_shared_data() for the BAMBOO_PEN's ghost touch interface. Fixes: 41372d5d40e7 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC") Cc: stable # 4.9 Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 693bdaa164b40b7aa6018b98af6f7e40dbd52457 Author: Dmitry Torokhov Date: Thu Mar 23 13:21:38 2017 -0700 ACPI / gpio: do not fall back to parsing _CRS when we get a deferral If, while locating GPIOs by name, we get probe deferral, we should immediately report it to caller rather than trying to fall back to parsing unnamed GPIOs from _CRS block. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Acked-by: Mika Westerberg Acked-and-Tested-by: Hans de Goede Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8a146fbe1f1461aebc9b8f06a0f22e1a8a4f0dd1 Author: Hans de Goede Date: Fri Mar 24 11:08:47 2017 +0100 gpio: acpi: Call enable_irq_wake for _IAE GpioInts with Wake set On Bay Trail / Cherry Trail systems with a LID switch, the LID switch is often connect to a gpioint handled by an _IAE event handler. Before this commit such systems would not wake up when opening the lid, requiring the powerbutton to be pressed after opening the lid to wakeup. Note that Bay Trail / Cherry Trail systems use suspend-to-idle, so the interrupts are generated anyway on those lines on lid switch changes, but they are treated by the IRQ subsystem as spurious while suspended if not marked as wakeup IRQs. This commit calls enable_irq_wake() for _IAE GpioInts with a valid event handler which have their Wake flag set. This fixes such systems not waking up when opening the lid. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit abe342a5b4b5aa579f6bf40ba73447c699e6b579 Author: Xiubo Li Date: Mon Mar 27 17:07:41 2017 +0800 tcmu: Fix wrongly calculating of the base_command_size The t_data_nents and t_bidi_data_nents are the numbers of the segments, but it couldn't be sure the block size equals to size of the segment. For the worst case, all the blocks are discontiguous and there will need the same number of iovecs, that's to say: blocks == iovs. So here just set the number of iovs to block count needed by tcmu cmd. Tested-by: Ilias Tsitsimpis Reviewed-by: Mike Christie Signed-off-by: Xiubo Li Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ab22d2604c86ceb01bb2725c9860b88a7dd383bb Author: Xiubo Li Date: Mon Mar 27 17:07:40 2017 +0800 tcmu: Fix possible overwrite of t_data_sg's last iov[] If there has BIDI data, its first iov[] will overwrite the last iov[] for se_cmd->t_data_sg. To fix this, we can just increase the iov pointer, but this may introuduce a new memory leakage bug: If the se_cmd->data_length and se_cmd->t_bidi_data_sg->length are all not aligned up to the DATA_BLOCK_SIZE, the actual length needed maybe larger than just sum of them. So, this could be avoided by rounding all the data lengthes up to DATA_BLOCK_SIZE. Reviewed-by: Mike Christie Tested-by: Ilias Tsitsimpis Reviewed-by: Bryant G. Ly Signed-off-by: Xiubo Li Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) commit 49cb77e297dc611a1b795cfeb79452b3002bd331 Author: Nicholas Bellinger Date: Mon Mar 27 16:12:43 2017 -0700 target: Avoid mappedlun symlink creation during lun shutdown This patch closes a race between se_lun deletion during configfs unlink in target_fabric_port_unlink() -> core_dev_del_lun() -> core_tpg_remove_lun(), when transport_clear_lun_ref() blocks waiting for percpu_ref RCU grace period to finish, but a new NodeACL mappedlun is added before the RCU grace period has completed. This can happen in target_fabric_mappedlun_link() because it only checks for se_lun->lun_se_dev, which is not cleared until after transport_clear_lun_ref() percpu_ref RCU grace period finishes. This bug originally manifested as NULL pointer dereference OOPsen in target_stat_scsi_att_intr_port_show_attr_dev() on v4.1.y code, because it dereferences lun->lun_se_dev without a explicit NULL pointer check. In post v4.1 code with target-core RCU conversion, the code in target_stat_scsi_att_intr_port_show_attr_dev() no longer uses se_lun->lun_se_dev, but the same race still exists. To address the bug, go ahead and set se_lun>lun_shutdown as early as possible in core_tpg_remove_lun(), and ensure new NodeACL mappedlun creation in target_fabric_mappedlun_link() fails during se_lun shutdown. Reported-by: James Shen Cc: James Shen Tested-by: James Shen Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_fabric_configfs.c | 5 +++++ drivers/target/target_core_tpg.c | 4 ++++ include/target/target_core_base.h | 1 + 3 files changed, 10 insertions(+) commit efb2ea770bb3b0f40007530bc8b0c22f36e1c5eb Author: Nicholas Bellinger Date: Thu Mar 23 17:19:24 2017 -0700 iscsi-target: Fix TMR reference leak during session shutdown This patch fixes a iscsi-target specific TMR reference leak during session shutdown, that could occur when a TMR was quiesced before the hand-off back to iscsi-target code via transport_cmd_check_stop_to_fabric(). The reference leak happens because iscsit_free_cmd() was incorrectly skipping the final target_put_sess_cmd() for TMRs when transport_generic_free_cmd() returned zero because the se_cmd->cmd_kref did not reach zero, due to the missing se_cmd assignment in original code. The result was iscsi_cmd and it's associated se_cmd memory would be freed once se_sess->sess_cmd_map where released, but the associated se_tmr_req was leaked and remained part of se_device->dev_tmr_list. This bug would manfiest itself as kernel paging request OOPsen in core_tmr_lun_reset(), when a left-over se_tmr_req attempted to dereference it's se_cmd pointer that had already been released during normal session shutdown. To address this bug, go ahead and treat ISCSI_OP_SCSI_CMD and ISCSI_OP_SCSI_TMFUNC the same when there is an extra se_cmd->cmd_kref to drop in iscsit_free_cmd(), and use op_scsi to signal __iscsit_free_cmd() when the former needs to clear any further iscsi related I/O state. Reported-by: Rob Millner Cc: Rob Millner Reported-by: Chu Yuan Lin Cc: Chu Yuan Lin Tested-by: Chu Yuan Lin Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_util.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit afea03fcf3d5db8a968f4b97797b8b83ada0dba3 Author: Manish Narani Date: Mon Mar 20 15:05:29 2017 +0530 usb: gadget: Correct usb EP argument for BOT status request This patch corrects the argument in usb_ep_free_request as it is mistakenly set to ep_out. It should be ep_in for status request. Signed-off-by: Manish Narani Acked-by: Felipe Balbi Signed-off-by: Nicholas Bellinger drivers/usb/gadget/function/f_tcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 740372b76e7966604e0f4dd0de13135513024f0d Author: Nicholas Bellinger Date: Mon Mar 20 21:04:05 2017 -0700 tcmu: Allow cmd_time_out to be set to zero (disabled) The new cmd_time_out configfs attribute for TCMU is allowed to be disabled, so go ahead and drop the tcmu_cmd_time_out_store() check. Reported-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 5 ----- 1 file changed, 5 deletions(-) commit c3d9fda688742c06e89aa1f0f8fd943fc11468cb Author: Felix Fietkau Date: Mon Mar 6 10:04:25 2017 +0100 ubifs: Fix RENAME_WHITEOUT support Remove faulty leftover check in do_rename(), apparently introduced in a merge that combined whiteout support changes with commit f03b8ad8d386 ("fs: support RENAME_NOREPLACE for local filesystems") Fixes: f03b8ad8d386 ("fs: support RENAME_NOREPLACE for local filesystems") Fixes: 9e0a1fff8db5 ("ubifs: Implement RENAME_WHITEOUT") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 3 --- 1 file changed, 3 deletions(-) commit 33fda9fa9fb081fae165348f32e3244414991fad Author: Hyunchul Lee Date: Wed Mar 15 10:31:05 2017 +0900 ubifs: Fix debug messages for an invalid filename in ubifs_dump_inode instead of filenames, print inode numbers, file types, and length. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e328379a18c5293c123bc56c32f19f9365384686 Author: Hyunchul Lee Date: Wed Mar 15 10:31:04 2017 +0900 ubifs: Fix debug messages for an invalid filename in ubifs_dump_node if a character is not printable, print '?' instead of that. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b20e2d9999506bb445e9958efa407e84d1a579cc Author: Hyunchul Lee Date: Wed Mar 15 10:31:03 2017 +0900 ubifs: Remove filename from debug messages in ubifs_readdir if filename is encrypted, filename could have no printable characters. so remove it. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63ed657362509b54635fe17af980fba722a008d8 Author: Richard Weinberger Date: Fri Feb 10 17:46:01 2017 +0100 ubifs: Fix memory leak in error path in ubifs_mknod When fscrypt_setup_filename() fails we have to free dev. Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cd9a21ce070be8a918ffd3381468315a7a76ba6 Author: Sebastian Siewior Date: Wed Feb 22 17:15:21 2017 +0100 ubi/upd: Always flush after prepared for an update In commit 6afaf8a484cb ("UBI: flush wl before clearing update marker") I managed to trigger and fix a similar bug. Now here is another version of which I assumed it wouldn't matter back then but it turns out UBI has a check for it and will error out like this: |ubi0 warning: validate_vid_hdr: inconsistent used_ebs |ubi0 error: validate_vid_hdr: inconsistent VID header at PEB 592 All you need to trigger this is? "ubiupdatevol /dev/ubi0_0 file" + a powercut in the middle of the operation. ubi_start_update() sets the update-marker and puts all EBs on the erase list. After that userland can proceed to write new data while the old EB aren't erased completely. A powercut at this point is usually not that much of a tragedy. UBI won't give read access to the static volume because it has the update marker. It will most likely set the corrupted flag because it misses some EBs. So we are all good. Unless the size of the image that has been written differs from the old image in the magnitude of at least one EB. In that case UBI will find two different values for `used_ebs' and refuse to attach the image with the error message mentioned above. So in order not to get in the situation, the patch will ensure that we wait until everything is removed before it tries to write any data. The alternative would be to detect such a case and remove all EBs at the attached time after we processed the volume-table and see the update-marker set. The patch looks bigger and I doubt it is worth it since usually the write() will wait from time to time for a new EB since usually there not that many spare EB that can be used. Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Richard Weinberger drivers/mtd/ubi/upd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d09c5373e8e4eaaa09233552cbf75dc4c4f21203 Author: Heiko Carstens Date: Mon Mar 27 09:48:04 2017 +0200 s390/uaccess: get_user() should zero on failure (again) Commit fd2d2b191fe7 ("s390: get_user() should zero on failure") intended to fix s390's get_user() implementation which did not zero the target operand if the read from user space faulted. Unfortunately the patch has no effect: the corresponding inline assembly specifies that the operand is only written to ("=") and the previous value is discarded. Therefore the compiler is free to and actually does omit the zero initialization. To fix this simply change the contraint modifier to "+", so the compiler cannot omit the initialization anymore. Fixes: c9ca78415ac1 ("s390/uaccess: provide inline variants of get_user/put_user") Fixes: fd2d2b191fe7 ("s390: get_user() should zero on failure") Cc: stable@vger.kernel.org Cc: Al Viro Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b79c52aef3cdee903017c1e9834b53996d70010e Author: Zhi Wang Date: Thu Mar 30 01:48:39 2017 +0800 drm/i915/gvt: Activate/de-activate vGPU in mdev ops. This patch introduces two functions for activating/de-activating vGPU in mdev ops. A racing condition was found between virtual vblank emulation and KVGMT mdev release path. V-blank emulation will emulate and inject V-blank interrupt for every active vGPU with holding gvt->lock, while in mdev release path, it will directly release hypervisor handle without changing vGPU status or taking gvt->lock, so a kernel oops is encountered when vblank emulation is injecting a interrupt with a invalid hypervisor handle. (Reported by Terrence) To solve this problem, we factor out vGPU activation/de-activation from vGPU creation/destruction path and let KVMGT mdev release ops de-activate the vGPU before release hypervisor handle. Once a vGPU is de-activated, GVT-g will not emulate v-blank for it or touch the hypervisor handle. Fixes: 659643f ("drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT") Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 2 ++ drivers/gpu/drm/i915/gvt/gvt.h | 5 ++++- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++++ drivers/gpu/drm/i915/gvt/vgpu.c | 43 +++++++++++++++++++++++++++++++++++----- 4 files changed, 48 insertions(+), 6 deletions(-) commit 89970a04d70c6c9e5e4492fd4096c0b5630a478c Merge: 806276b 3ea3217 Author: Linus Torvalds Date: Wed Mar 29 19:59:49 2017 -0700 Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management fixes from Zhang Rui: - Fix a potential deadlock in cpu_cooling driver, which was introduced in 4.11-rc1. (Matthew Wilcox) - Fix the cpu_cooling and devfreq_cooling code to handle possible error return value from OPP calls, together with three minor fixes in the same patch series. (Viresh Kumar) * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: cpu_cooling: Check OPP for errors thermal: cpu_cooling: Replace dev_warn with dev_err thermal: devfreq: Check OPP for errors thermal: devfreq_cooling: Replace dev_warn with dev_err thermal: devfreq: Simplify expression thermal: Fix potential deadlock in cpu_cooling commit 8f1f7eeb22c16a197159cf7b35d1350695193ead Merge: 358e78b 77c1c03 Author: David S. Miller Date: Wed Mar 29 14:35:25 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 a rather large update with Netfilter fixes, specifically targeted to incorrect RCU usage in several spots and the userspace conntrack helper infrastructure (nfnetlink_cthelper), more specifically they are: 1) expect_class_max is incorrect set via cthelper, as in kernel semantics mandate that this represents the array of expectation classes minus 1. Patch from Liping Zhang. 2) Expectation policy updates via cthelper are currently broken for several reasons: This code allows illegal changes in the policy such as changing the number of expeciation classes, it is leaking the updated policy and such update occurs with no RCU protection at all. Fix this by adding a new nfnl_cthelper_update_policy() that describes what is really legal on the update path. 3) Fix several memory leaks in cthelper, from Jeffy Chen. 4) synchronize_rcu() is missing in the removal path of several modules, this may lead to races since CPU may still be running on code that has just gone. Also from Liping Zhang. 5) Don't use the helper hashtable from cthelper, it is not safe to walk over those bits without the helper mutex. Fix this by introducing a new independent list for userspace helpers. From Liping Zhang. 6) nf_ct_extend_unregister() needs synchronize_rcu() to make sure no packets are walking on any conntrack extension that is gone after module removal, again from Liping. 7) nf_nat_snmp may crash if we fail to unregister the helper due to accidental leftover code, from Gao Feng. 8) Fix leak in nfnetlink_queue with secctx support, from Liping Zhang. ==================== Signed-off-by: David S. Miller commit 806276b7f07a39a1cc3f38bb1ef5c573d4594a38 Merge: 52b9c81 abbbdf1 Author: Linus Torvalds Date: Wed Mar 29 14:30:19 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Five fixes for this series: - a fix from me to ensure that blk-mq drivers that terminate IO in their ->queue_rq() handler by returning QUEUE_ERROR don't stall with a scheduler enabled. - four nbd fixes from Josef and Ratna, fixing various problems that are critical enough to go in for this cycle. They have been well tested" * 'for-linus' of git://git.kernel.dk/linux-block: nbd: replace kill_bdev() with __invalidate_device() nbd: set queue timeout properly nbd: set rq->errors to actual error code nbd: handle ERESTARTSYS properly blk-mq: include errors in did_work calculation commit 358e78b5f445c35f5b7f9241425fb499ee9fe3e2 Author: Zakharov Vlad Date: Wed Mar 29 13:41:46 2017 +0300 ezchip: nps_enet: check if napi has been completed After a new NAPI_STATE_MISSED state was added to NAPI we can get into this state and in such case we have to reschedule NAPI as some work is still pending and we have to process it. napi_complete_done() function returns false if we have to reschedule something (e.g. in case we were in MISSED state) as current polling have not been completed yet. nps_enet driver hasn't been verifying the return value of napi_complete_done() and has been forcibly enabling interrupts. That is not correct as we should not enable interrupts before we have processed all scheduled work. As a result we were getting trapped in interrupt hanlder chain as we had never been able to disabale ethernet interrupts again. So this patch makes nps_enet_poll() func verify return value of napi_complete_done() and enable interrupts only in case all scheduled work has been completed. Signed-off-by: Vlad Zakharov Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a1801cc83f351bc12c6acebf1164be2de6810379 Merge: e91793b 3ed3a83 Author: David S. Miller Date: Wed Mar 29 14:05:34 2017 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Small misc. fixes. Fix a NULL pointer crash in open failure path, wrong arguments when printing error messages, and a DMA unmap bug in XDP shutdown path. ==================== Signed-off-by: David S. Miller commit 3ed3a83e3f3871c57b18cef09b148e96921236ed Author: Michael Chan Date: Tue Mar 28 19:47:31 2017 -0400 bnxt_en: Fix DMA unmapping of the RX buffers in XDP mode during shutdown. In bnxt_free_rx_skbs(), which is called to free up all RX buffers during shutdown, we need to unmap the page if we are running in XDP mode. Fixes: c61fb99cae51 ("bnxt_en: Add RX page mode support.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 23e12c893489ed12ecfccbf866fc62af1bead4b0 Author: Sankar Patchineelam Date: Tue Mar 28 19:47:30 2017 -0400 bnxt_en: Correct the order of arguments to netdev_err() in bnxt_set_tpa() Signed-off-by: Sankar Patchineelam 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 2247925f0942dc4e7c09b1cde45ca18461d94c5f Author: Sankar Patchineelam Date: Tue Mar 28 19:47:29 2017 -0400 bnxt_en: Fix NULL pointer dereference in reopen failure path Net device reset can fail when the h/w or f/w is in a bad state. Subsequent netdevice open fails in bnxt_hwrm_stat_ctx_alloc(). The cleanup invokes bnxt_hwrm_resource_free() which inturn calls bnxt_disable_int(). In this routine, the code segment if (ring->fw_ring_id != INVALID_HW_RING_ID) BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); results in NULL pointer dereference as cpr->cp_doorbell is not yet initialized, and fw_ring_id is zero. The fix is to initialize cpr fw_ring_id to INVALID_HW_RING_ID before bnxt_init_chip() is invoked. Signed-off-by: Sankar Patchineelam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 293d264f13cbde328d5477f49e3103edbc1dc191 Author: Vaidyanathan Srinivasan Date: Thu Mar 23 20:52:46 2017 +0530 cpuidle: powernv: Pass correct drv->cpumask for registration drv->cpumask defaults to cpu_possible_mask in __cpuidle_driver_init(). On PowerNV platform cpu_present could be less than cpu_possible in cases where firmware detects the cpu, but it is not available to the OS. When CONFIG_HOTPLUG_CPU=n, such cpus are not hotplugable at runtime and hence we skip creating cpu_device. This breaks cpuidle on powernv where register_cpu() is not called for cpus in cpu_possible_mask that cannot be hot-added at runtime. Trying cpuidle_register_device() on cpu without cpu_device will cause crash like this: cpu 0xf: Vector: 380 (Data SLB Access) at [c000000ff1503490] pc: c00000000022c8bc: string+0x34/0x60 lr: c00000000022ed78: vsnprintf+0x284/0x42c sp: c000000ff1503710 msr: 9000000000009033 dar: 6000000060000000 current = 0xc000000ff1480000 paca = 0xc00000000fe82d00 softe: 0 irq_happened: 0x01 pid = 1, comm = swapper/8 Linux version 4.11.0-rc2 (sv@sagarika) (gcc version 4.9.4 (Buildroot 2017.02-00004-gc28573e) ) #15 SMP Fri Mar 17 19:32:02 IST 2017 enter ? for help [link register ] c00000000022ed78 vsnprintf+0x284/0x42c [c000000ff1503710] c00000000022ebb8 vsnprintf+0xc4/0x42c (unreliable) [c000000ff1503800] c00000000022ef40 vscnprintf+0x20/0x44 [c000000ff1503830] c0000000000ab61c vprintk_emit+0x94/0x2cc [c000000ff15038a0] c0000000000acc9c vprintk_func+0x60/0x74 [c000000ff15038c0] c000000000619694 printk+0x38/0x4c [c000000ff15038e0] c000000000224950 kobject_get+0x40/0x60 [c000000ff1503950] c00000000022507c kobject_add_internal+0x60/0x2c4 [c000000ff15039e0] c000000000225350 kobject_init_and_add+0x70/0x78 [c000000ff1503a60] c00000000053c288 cpuidle_add_sysfs+0x9c/0xe0 [c000000ff1503ae0] c00000000053aeac cpuidle_register_device+0xd4/0x12c [c000000ff1503b30] c00000000053b108 cpuidle_register+0x98/0xcc [c000000ff1503bc0] c00000000085eaf0 powernv_processor_idle_init+0x140/0x1e0 [c000000ff1503c60] c00000000000cd60 do_one_initcall+0xc0/0x15c [c000000ff1503d20] c000000000833e84 kernel_init_freeable+0x1a0/0x25c [c000000ff1503dc0] c00000000000d478 kernel_init+0x24/0x12c [c000000ff1503e30] c00000000000b564 ret_from_kernel_thread+0x5c/0x78 This patch fixes the bug by passing correct cpumask from powernv-cpuidle driver. Signed-off-by: Vaidyanathan Srinivasan Reviewed-by: Gautham R. Shenoy Acked-by: Michael Ellerman [ rjw: Comment massage ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-powernv.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 52b9c816807abd46c285cd8ab183fe93194bfb3f Merge: 72c3373 f843ee6 Author: Linus Torvalds Date: Wed Mar 29 13:26:22 2017 -0700 Merge branch 'apw' (xfrm_user fixes) Merge xfrm_user validation fixes from Andy Whitcroft: "Two patches we are applying to Ubuntu for XFRM_MSG_NEWAE validation issue reported by ZDI. The first of these is the primary fix, and the second is for a more theoretical issue that Kees pointed out when reviewing the first" * emailed patches from Andy Whitcroft : xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window commit 41a75a6eb2bf4e75e0d93862171bebb3ca4efec7 Merge: e1699d2 457ae72 Author: Chris Mason Date: Wed Mar 29 13:10:25 2017 -0700 Merge branch 'for-chris-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.11 commit 476e75a44b56038bee9207242d4bc718f6b4de06 Author: Helge Deller Date: Wed Mar 29 08:25:30 2017 +0200 parisc: Avoid stalled CPU warnings after system shutdown Commit 73580dac7618 ("parisc: Fix system shutdown halt") introduced an endless loop for systems which don't provide a software power off function. But the soft lockup detector will detect this and report stalled CPUs after some time. Avoid those unwanted warnings by disabling the soft lockup detector. Fixes: 73580dac7618 ("parisc: Fix system shutdown halt") Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.9+ arch/parisc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit d19f5e41b344a057bb2450024a807476f30978d2 Author: Helge Deller Date: Sat Mar 25 11:59:15 2017 +0100 parisc: Clean up fixup routines for get_user()/put_user() Al Viro noticed that userspace accesses via get_user()/put_user() can be simplified a lot with regard to usage of the exception handling. This patch implements a fixup routine for get_user() and put_user() in such that the exception handler will automatically load -EFAULT into the register %r8 (the error value) in case on a fault on userspace. Additionally the fixup routine will zero the target register on fault in case of a get_user() call. The target register is extracted out of the faulting assembly instruction. This patch brings a few benefits over the old implementation: 1. Exception handling gets much cleaner, easier and smaller in size. 2. Helper functions like fixup_get_user_skip_1 (all of fixup.S) can be dropped. 3. No need to hardcode %r9 as target register for get_user() any longer. This helps the compiler register allocator and thus creates less assembler statements. 4. No dependency on the exception_data contents any longer. 5. Nested faults will be handled cleanly. Reported-by: Al Viro Cc: # v4.9+ Signed-off-by: Helge Deller arch/parisc/include/asm/uaccess.h | 59 +++++++++++++---------- arch/parisc/kernel/parisc_ksyms.c | 10 ---- arch/parisc/lib/Makefile | 2 +- arch/parisc/lib/fixup.S | 98 --------------------------------------- arch/parisc/mm/fault.c | 17 +++++++ 5 files changed, 52 insertions(+), 134 deletions(-) commit 554bfeceb8a22d448cd986fc9efce25e833278a1 Author: Helge Deller Date: Wed Mar 29 21:41:05 2017 +0200 parisc: Fix access fault handling in pa_memcpy() pa_memcpy() is the major memcpy implementation in the parisc kernel which is used to do any kind of userspace/kernel memory copies. Al Viro noticed various bugs in the implementation of pa_mempcy(), most notably that in case of faults it may report back to have copied more bytes than it actually did. Fixing those bugs is quite hard in the C-implementation, because the compiler is messing around with the registers and we are not guaranteed that specific variables are always in the same processor registers. This makes proper fault handling complicated. This patch implements pa_memcpy() in assembler. That way we have correct fault handling and adding a 64-bit copy routine was quite easy. Runtime tested with 32- and 64bit kernels. Reported-by: Al Viro Cc: # v4.9+ Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/lib/lusercopy.S | 318 ++++++++++++++++++++++++++++++ arch/parisc/lib/memcpy.c | 461 +------------------------------------------- 2 files changed, 321 insertions(+), 458 deletions(-) commit 3cc070c1c81948b33ebe2ea68cd39307ce2b312d Author: afzal mohammed Date: Thu Mar 23 13:49:32 2017 +0100 ARM: 8665/1: nommu: access ID_PFR1 only if CPUID scheme Greg upon trying to boot no-MMU Kernel on ARM926EJ reported boot failure. He root caused it to ID_PFR1 access introduced by the commit mentioned in the fixes tag below. All CP15 processors need not have processor feature registers, only for architectures defined by CPUID scheme would have it. Hence check for it before accessing processor feature register, ID_PFR1. Fixes: f8300a0b5de0 ("ARM: 8647/2: nommu: dynamic exception base address setting") Reported-by: Greg Ungerer Signed-off-by: afzal mohammed Tested-by: Greg Ungerer Signed-off-by: Russell King arch/arm/mm/nommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 916a008b4b8ecc02fbd035cfb133773dba1ff3d7 Author: Russell King Date: Wed Mar 29 17:12:47 2017 +0100 ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory dma_get_sgtable() tries to create a scatterlist table containing valid struct page pointers for the coherent memory allocation passed in to it. However, memory can be declared via dma_declare_coherent_memory(), or via other reservation schemes which means that coherent memory is not guaranteed to be backed by struct pages. In such cases, the resulting scatterlist table contains pointers to invalid pages, which causes kernel oops later. This patch adds detection of such memory, and refuses to create a scatterlist table for such memory. Reported-by: Shuah Khan Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit e91793bb615cf6cdd59c0b6749fe173687bb0947 Author: Guillaume Nault Date: Wed Mar 29 08:45:29 2017 +0200 l2tp: purge socket queues in the .destruct() callback The Rx path may grab the socket right before pppol2tp_release(), but nothing guarantees that it will enqueue packets before skb_queue_purge(). Therefore, the socket can be destroyed without its queues fully purged. Fix this by purging queues in pppol2tp_session_destruct() where we're guaranteed nothing is still referencing the socket. Fixes: 9e9cb6221aa7 ("l2tp: fix userspace reception on plain L2TP sockets") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 94d7ee0baa8b764cf64ad91ed69464c1a6a0066b Author: Guillaume Nault Date: Wed Mar 29 08:44:59 2017 +0200 l2tp: hold tunnel socket when handling control frames in l2tp_ip and l2tp_ip6 The code following l2tp_tunnel_find() expects that a new reference is held on sk. Either sk_receive_skb() or the discard_put error path will drop a reference from the tunnel's socket. This issue exists in both l2tp_ip and l2tp_ip6. Fixes: a3c18422a4b4 ("l2tp: hold socket before dropping lock in l2tp_ip{, 6}_recv()") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 5 +++-- net/l2tp/l2tp_ip6.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 72c33734b5fa8a788734ad2312a89b944589c5a0 Merge: fe82203 d3805c5 Author: Linus Torvalds Date: Wed Mar 29 08:55:25 2017 -0700 Merge branch 'regset' (PTRACE_SETREGSET data leakage) Merge PTRACE_SETREGSET leakage fixes from Dave Martin: "This series is the collection of fixes I proposed on this topic, that have not yet appeared upstream or in the stable branches, The issue can leak kernel stack, but doesn't appear to allow userspace to attack the kernel directly. The affected architectures are c6x, h8300, metag, mips and sparc. [ Mark Salter points out that c6x has no MMU or other mechanism to prevent userspace access to kernel code or data on c6x, but it doesn't hurt to clean that case up too. ] The bugs arise from use of user_regset_copyin(). Users of user_regset_copyin() can work in one of two ways: 1) Copy directly to thread_struct or equivalent. (This seems to be the design assumption of the regset API, and is the most common approach.) 2) Copy to a local variable and then transfer to thread_struct. (A significant minority of cases.) Buggy code typically involves approach 2" * emailed patches from Dave Martin : sparc/ptrace: Preserve previous registers for short regset write mips/ptrace: Preserve previous registers for short regset write metag/ptrace: Reject partial NT_METAG_RPIPE writes metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS metag/ptrace: Preserve previous registers for short regset write h8300/ptrace: Fix incorrect register transfer count c6x/ptrace: Remove useless PTRACE_SETREGSET implementation commit d3805c546b275c8cc7d40f759d029ae92c7175f2 Author: Dave Martin Date: Mon Mar 27 15:10:59 2017 +0100 sparc/ptrace: Preserve previous registers for short regset write Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill all the registers, the thread's old registers are preserved. Signed-off-by: Dave Martin Acked-by: David S. Miller Signed-off-by: Linus Torvalds arch/sparc/kernel/ptrace_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d614fd58a2834cfe4efa472c33c8f3ce2338b09b Author: Dave Martin Date: Mon Mar 27 15:10:58 2017 +0100 mips/ptrace: Preserve previous registers for short regset write Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill all the registers, the thread's old registers are preserved. Signed-off-by: Dave Martin Signed-off-by: Linus Torvalds arch/mips/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7195ee3120d878259e8d94a5d9f808116f34d5ea Author: Dave Martin Date: Mon Mar 27 15:10:57 2017 +0100 metag/ptrace: Reject partial NT_METAG_RPIPE writes It's not clear what behaviour is sensible when doing partial write of NT_METAG_RPIPE, so just don't bother. This patch assumes that userspace will never rely on a partial SETREGSET in this case, since it's not clear what should happen anyway. Signed-off-by: Dave Martin Acked-by: James Hogan Signed-off-by: Linus Torvalds arch/metag/kernel/ptrace.c | 2 ++ 1 file changed, 2 insertions(+) commit 5fe81fe98123ce41265c65e95d34418d30d005d1 Author: Dave Martin Date: Mon Mar 27 15:10:56 2017 +0100 metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill TXSTATUS, a well-defined default value is used, based on the task's current value. Suggested-by: James Hogan Signed-off-by: Dave Martin Signed-off-by: Linus Torvalds arch/metag/kernel/ptrace.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit a78ce80d2c9178351b34d78fec805140c29c193e Author: Dave Martin Date: Mon Mar 27 15:10:55 2017 +0100 metag/ptrace: Preserve previous registers for short regset write Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill all the registers, the thread's old registers are preserved. Signed-off-by: Dave Martin Acked-by: James Hogan Signed-off-by: Linus Torvalds arch/metag/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 502585c7555083d4a949c08350306b9ec196779e Author: Dave Martin Date: Mon Mar 27 15:10:54 2017 +0100 h8300/ptrace: Fix incorrect register transfer count regs_set() and regs_get() are vulnerable to an off-by-1 buffer overrun if CONFIG_CPU_H8S is set, since this adds an extra entry to register_offset[] but not to user_regs_struct. So, iterate over user_regs_struct based on its actual size, not based on the length of register_offset[]. Signed-off-by: Dave Martin Signed-off-by: Linus Torvalds arch/h8300/kernel/ptrace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fb411b837b587a32046dc4f369acb93a10b1def8 Author: Dave Martin Date: Mon Mar 27 15:10:53 2017 +0100 c6x/ptrace: Remove useless PTRACE_SETREGSET implementation gpr_set won't work correctly and can never have been tested, and the correct behaviour is not clear due to the endianness-dependent task layout. So, just remove it. The core code will now return -EOPNOTSUPPORT when trying to set NT_PRSTATUS on this architecture until/unless a correct implementation is supplied. Signed-off-by: Dave Martin Signed-off-by: Linus Torvalds arch/c6x/kernel/ptrace.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) commit f843ee6dd019bcece3e74e76ad9df0155655d0df Author: Andy Whitcroft Date: Thu Mar 23 07:45:44 2017 +0000 xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder Kees Cook has pointed out that xfrm_replay_state_esn_len() is subject to wrapping issues. To ensure we are correctly ensuring that the two ESN structures are the same size compare both the overall size as reported by xfrm_replay_state_esn_len() and the internal length are the same. CVE-2017-7184 Signed-off-by: Andy Whitcroft Acked-by: Steffen Klassert Signed-off-by: Linus Torvalds net/xfrm/xfrm_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 677e806da4d916052585301785d847c3b3e6186a Author: Andy Whitcroft Date: Wed Mar 22 07:29:31 2017 +0000 xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to update this replay_esn via a XFRM_MSG_NEWAE call. There we again validate the size of the supplied buffer matches the existing state and if so inject the contents. We do not at this point check that the replay_window is within the allocated memory. This leads to out-of-bounds reads and writes triggered by netlink packets. This leads to memory corruption and the potential for priviledge escalation. We already attempt to validate the incoming replay information in xfrm_new_ae() via xfrm_replay_verify_len(). This confirms that the user is not trying to change the size of the replay state buffer which includes the replay_esn. It however does not check the replay_window remains within that buffer. Add validation of the contained replay_window. CVE-2017-7184 Signed-off-by: Andy Whitcroft Acked-by: Steffen Klassert Signed-off-by: Linus Torvalds net/xfrm/xfrm_user.c | 3 +++ 1 file changed, 3 insertions(+) commit 0917ac4f5346d01cee1d568ff5dc0b99be02829e Merge: ca4a213 a3902ee9 Author: James Bottomley Date: Wed Mar 29 10:10:30 2017 -0400 Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes commit f3cd1b064f1179d9e6188c6d67297a2360880e10 Author: Lucas Stach Date: Wed Mar 22 12:07:23 2017 +0100 drm/etnaviv: (re-)protect fence allocation with GPU mutex The fence allocation needs to be protected by the GPU mutex, otherwise the fence seqnos of concurrent submits might not match the insertion order of the jobs in the kernel ring. This breaks the assumption that jobs complete with monotonically increasing fence seqnos. Fixes: d9853490176c (drm/etnaviv: take GPU lock later in the submit process) CC: stable@vger.kernel.org #4.9+ Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd68f2ba0720e76c3a5bfa3f639c546f926792f5 Author: Chris Wilson Date: Wed Mar 29 13:13:15 2017 +0100 drm/i915/execlists: Wrap tail pointer after reset tweaking If the request->wa_tail is 0 (because it landed exactly on the end of the ringbuffer), when we reconstruct request->tail following a reset we fill in an illegal value (-8 or 0x001ffff8). As a result, RING_HEAD is never able to catch up with RING_TAIL and the GPU spins endlessly. If the ring contains a couple of breadcrumbs, even our hangcheck is unable to catch the busy-looping as the ACTHD and seqno continually advance. v2: Move the wrap into a common intel_ring_wrap(). Fixes: a3aabe86a340 ("drm/i915/execlists: Reinitialise context image after GPU hang") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170327130009.4678-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit 450362d3fe866b14304f309b5fffba0c33fbfbc3) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170329121315.1290-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 4 +++- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 457ae7268b29c33dee1c0feb143a15f6029d177b Author: Dan Carpenter Date: Fri Mar 17 23:51:20 2017 +0300 Btrfs: fix an integer overflow check This isn't super serious because you need CAP_ADMIN to run this code. I added this integer overflow check last year but apparently I am rubbish at writing integer overflow checks... There are two issues. First, access_ok() works on unsigned long type and not u64 so on 32 bit systems the access_ok() could be checking a truncated size. The other issue is that we should be using a stricter limit so we don't overflow the kzalloc() setting ctx->clone_roots later in the function after the access_ok(): alloc_size = sizeof(struct clone_root) * (arg->clone_sources_count + 1); sctx->clone_roots = kzalloc(alloc_size, GFP_KERNEL | __GFP_NOWARN); Fixes: f5ecec3ce21f ("btrfs: send: silence an integer overflow warning") Signed-off-by: Dan Carpenter Reviewed-by: David Sterba [ added comment ] Signed-off-by: David Sterba fs/btrfs/send.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ce0dcee626c482183b42d45b6ea43198c7223fc7 Author: Goldwyn Rodrigues Date: Tue Mar 14 05:25:09 2017 -0500 btrfs: Change qgroup_meta_rsv to 64bit Using an int value is causing qg->reserved to become negative and exclusive -EDQUOT to be reached prematurely. This affects exclusive qgroups only. TEST CASE: DEVICE=/dev/vdb MOUNTPOINT=/mnt SUBVOL=$MOUNTPOINT/tmp umount $SUBVOL umount $MOUNTPOINT mkfs.btrfs -f $DEVICE mount /dev/vdb $MOUNTPOINT btrfs quota enable $MOUNTPOINT btrfs subvol create $SUBVOL umount $MOUNTPOINT mount /dev/vdb $MOUNTPOINT mount -o subvol=tmp $DEVICE $SUBVOL btrfs qgroup limit -e 3G $SUBVOL btrfs quota rescan /mnt -w for i in `seq 1 44000`; do dd if=/dev/zero of=/mnt/tmp/test_$i bs=10k count=1 if [[ $? > 0 ]]; then btrfs qgroup show -pcref $SUBVOL exit 1 fi done Signed-off-by: Goldwyn Rodrigues [ add reproducer to changelog ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/qgroup.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit 9d0d1c8b1c9d80b17cfa86ecd50c8933a742585c Author: Liu Bo Date: Fri Mar 24 15:04:50 2017 -0700 Btrfs: bring back repair during read Commit 20a7db8ab3f2 ("btrfs: add dummy callback for readpage_io_failed and drop checks") made a cleanup around readpage_io_failed_hook, and it was supposed to keep the original sematics, but it also unexpectedly disabled repair during read for dup, raid1 and raid10. This fixes the problem by letting data's inode call the generic readpage_io_failed callback by returning -EAGAIN from its readpage_io_failed_hook in order to notify end_bio_extent_readpage to do the rest. We don't call it directly because the generic one takes an offset from end_bio_extent_readpage() to calculate the index in the checksum array and inode's readpage_io_failed_hook doesn't offer that offset. Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba [ keep the const function attribute ] Signed-off-by: David Sterba fs/btrfs/extent_io.c | 46 ++++++++++++++++++++++++++++------------------ fs/btrfs/inode.c | 6 +++--- 2 files changed, 31 insertions(+), 21 deletions(-) commit 7d65f82954dadbbe7b6e1aec7e07ad17bc6d958b Author: Johannes Berg Date: Wed Mar 29 14:15:24 2017 +0200 mac80211: unconditionally start new netdev queues with iTXQ support When internal mac80211 TXQs aren't supported, netdev queues must always started out started even when driver queues are stopped while the interface is added. This is necessary because with the internal TXQ support netdev queues are never stopped and packet scheduling/dropping is done in mac80211. Cc: stable@vger.kernel.org # 4.9+ Fixes: 80a83cfc434b1 ("mac80211: skip netdev queue control with software queuing") Reported-and-tested-by: Sven Eckelmann Signed-off-by: Johannes Berg net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ddaa6762696db4bb35726063b421782a9e0436f Merge: 367b130 83749ab 971edb0 3c9d3f1 eb3abae Author: Mark Brown Date: Wed Mar 29 12:55:08 2017 +0100 Merge remote-tracking branches 'asoc/fix/rt5665', 'asoc/fix/simple', 'asoc/fix/sti' and 'asoc/fix/sun8i' into asoc-linus commit 367b1301ccbeae11adc4134182a055e7728aa9fe Merge: 0cb3a12 7b4af79 cd3ac9a 2fe42dd 72cedf5 Author: Mark Brown Date: Wed Mar 29 12:55:06 2017 +0100 Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/atmel', 'asoc/fix/hdac-hdmi' and 'asoc/fix/mtk' into asoc-linus commit 0cb3a12f2a5827ff8692ff247538683b1b1f979d Merge: 4368c27 9986943 Author: Mark Brown Date: Wed Mar 29 12:55:05 2017 +0100 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit 4368c27666df1f1e80aa525baf49d29073c28ce7 Merge: d6c098a d1a6fe4 Author: Mark Brown Date: Wed Mar 29 12:55:05 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit aa62acfd63e7367872291c15290cb9c29d140926 Author: Matthew Auld Date: Mon Mar 27 21:32:36 2017 +0100 drm/i915/perf: remove user triggerable warn Don't throw a warning if we are given an invalid property id. While here let's also bring back Robert' original idea of catching unhandled enumeration values at compile time. Fixes: eec688e1420d ("drm/i915: Add i915 perf infrastructure") Signed-off-by: Matthew Auld Cc: Robert Bragg Reviewed-by: Robert Bragg Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170327203236.18276-1-matthew.auld@intel.com (cherry picked from commit 0a309f9e3dfaa4f5db0bf1b0cab54571744b491a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4e5f713ffc202c49a4374897cb0d2b218b391ff7 Author: Matthew Auld Date: Mon Mar 27 21:34:59 2017 +0100 drm/i915/perf: destroy stream on sample_flags mismatch If we were to ever encounter a sample_flags mismatch we need to ensure we destroy the stream when we bail. Fixes: d79651522e89 ("drm/i915: Enable i915 perf stream for Haswell OA unit") Signed-off-by: Matthew Auld Cc: Robert Bragg Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170327203459.18398-1-matthew.auld@intel.com (cherry picked from commit 22f880ca8246c6c80c4f48731c6a7d5d15042f56) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e1764309f577a88a0d5250fea6a080a6ad43556 Author: Chris Wilson Date: Sat Mar 25 11:32:43 2017 +0000 drm/i915: Align "unfenced" tiled access on gen2, early gen3 Old devices have quite severe restrictions for using fences, and unlike more recent device (anything from Pineview onwards) we need to enforce those restrictions even for unfenced tiled access from the render pipeline. Fixes: 944397f04f24 ("drm/i915: Store required fence size/alignment for GGTT vma") Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Joonas Lahtinen Cc: # v4.11-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170325113243.16438-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter Reviewed-by: Joonas Lahtinen Tested-by: Ville Syrjälä (cherry picked from commit f4ce766f28cd0efa0cb4d869a84905d573ef7e70) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 77c1c03c5b8ef28e55bb0aff29b1e006037ca645 Author: Liping Zhang Date: Tue Mar 28 22:59:25 2017 +0800 netfilter: nfnetlink_queue: fix secctx memory leak We must call security_release_secctx to free the memory returned by security_secid_to_secctx, otherwise memory may be leaked forever. Fixes: ef493bd930ae ("netfilter: nfnetlink_queue: add security context information") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_queue.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a7f12a21f6b32bdd8d76d3af81eef9e72ce41ec0 Author: Javier Martinez Canillas Date: Tue Mar 28 15:07:38 2017 -0400 usb: phy: isp1301: Fix build warning when CONFIG_OF is disabled Commit fd567653bdb9 ("usb: phy: isp1301: Add OF device ID table") added an OF device ID table, but used the of_match_ptr() macro that will lead to a build warning if CONFIG_OF symbol is disabled: drivers/usb/phy//phy-isp1301.c:36:34: warning: ‘isp1301_of_match’ defined but not used [-Wunused-const-variable=] static const struct of_device_id isp1301_of_match[] = { ^~~~~~~~~~~~~~~~ Fixes: fd567653bdb9 ("usb: phy: isp1301: Add OF device ID table") Reported-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3519b9d9606991a1305596348b6d690bfa3eb27 Author: Mathias Nyman Date: Tue Mar 28 15:55:30 2017 +0300 xhci: Manually give back cancelled URB if we can't queue it for cancel xhci needs to take care of four scenarios when asked to cancel a URB. 1 URB is not queued or already given back. usb_hcd_check_unlink_urb() will return an error, we pass the error on 2 We fail to find xhci internal structures from urb private data such as virtual device and endpoint ring. Give back URB immediately, can't do anything about internal structures. 3 URB private data has valid pointers to xhci internal data, but host is not responding. give back URB immedately and remove the URB from the endpoint lists. 4 Everyting is working add URB to cancel list, queue a command to stop the endpoint, after which the URB can be turned to no-op or skipped, removed from lists, and given back. We failed to give back the urb in case 2 where the correct device and endpoint pointers could not be retrieved from URB private data. This caused a hang on Dell Inspiron 5558/0VNM2T at resume from suspend as urb was never returned. [ 245.270505] INFO: task rtsx_usb_ms_1:254 blocked for more than 120 seconds. [ 245.272244] Tainted: G W 4.11.0-rc3-ARCH #2 [ 245.273983] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 245.275737] rtsx_usb_ms_1 D 0 254 2 0x00000000 [ 245.277524] Call Trace: [ 245.279278] __schedule+0x2d3/0x8a0 [ 245.281077] schedule+0x3d/0x90 [ 245.281961] usb_kill_urb.part.3+0x6c/0xa0 [usbcore] [ 245.282861] ? wake_atomic_t_function+0x60/0x60 [ 245.283760] usb_kill_urb+0x21/0x30 [usbcore] [ 245.284649] usb_start_wait_urb+0xe5/0x170 [usbcore] [ 245.285541] ? try_to_del_timer_sync+0x53/0x80 [ 245.286434] usb_bulk_msg+0xbd/0x160 [usbcore] [ 245.287326] rtsx_usb_send_cmd+0x63/0x90 [rtsx_usb] Reported-by: diego.viola@gmail.com Tested-by: diego.viola@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit 0ab2881a406b9fd46224a3e8253bbc0141b4f844 Author: Mathias Nyman Date: Tue Mar 28 15:55:29 2017 +0300 xhci: Set URB actual length for stopped control transfers A control transfer that stopped at the status stage incorrectly warned about a "unexpected TRB Type 4", and did not set the transferred actual_length for the URB. The URB actual_length for control transfers should contain the bytes transferred in the data stage. Bytes of a partially sent setup stage and missing bytes from status stage should be left out. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 3 +++ 1 file changed, 3 insertions(+) commit b07c12517f2aed0add8ce18146bb426b14099392 Author: Adam Wallis Date: Tue Mar 28 15:55:28 2017 +0300 xhci: plat: Register shutdown for xhci_plat Shutdown should be called for xhci_plat devices especially for situations where kexec might be used by stopping DMA transactions. Signed-off-by: Adam Wallis Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) commit b3ef5520c1eabb56064474043c7c55a1a65b8708 Author: Arend Van Spriel Date: Tue Mar 28 09:11:31 2017 +0100 cfg80211: check rdev resume callback only for registered wiphy We got the following use-after-free KASAN report: BUG: KASAN: use-after-free in wiphy_resume+0x591/0x5a0 [cfg80211] at addr ffff8803fc244090 Read of size 8 by task kworker/u16:24/2587 CPU: 6 PID: 2587 Comm: kworker/u16:24 Tainted: G B 4.9.13-debug+ Hardware name: Dell Inc. XPS 15 9550/0N7TVV, BIOS 1.2.19 12/22/2016 Workqueue: events_unbound async_run_entry_fn ffff880425d4f9d8 ffffffffaeedb541 ffff88042b80ef00 ffff8803fc244088 ffff880425d4fa00 ffffffffae84d7a1 ffff880425d4fa98 ffff8803fc244080 ffff88042b80ef00 ffff880425d4fa88 ffffffffae84da3a ffffffffc141f7d9 Call Trace: [] dump_stack+0x85/0xc4 [] kasan_object_err+0x21/0x70 [] kasan_report_error+0x1fa/0x500 [] ? cfg80211_bss_age+0x39/0xc0 [cfg80211] [] ? cfg80211_bss_age+0x9a/0xc0 [cfg80211] [] ? trace_hardirqs_on+0xd/0x10 [] ? wiphy_suspend+0xc70/0xc70 [cfg80211] [] __asan_report_load8_noabort+0x61/0x70 [] ? wiphy_suspend+0xbb0/0xc70 [cfg80211] [] ? wiphy_resume+0x591/0x5a0 [cfg80211] [] wiphy_resume+0x591/0x5a0 [cfg80211] [] ? wiphy_suspend+0xc70/0xc70 [cfg80211] [] dpm_run_callback+0x6e/0x4f0 [] device_resume+0x1c2/0x670 [] async_resume+0x1d/0x50 [] async_run_entry_fn+0xfe/0x610 [] process_one_work+0x716/0x1a50 [] ? process_one_work+0x679/0x1a50 [] ? _raw_spin_unlock_irq+0x3d/0x60 [] ? pwq_dec_nr_in_flight+0x2b0/0x2b0 [] worker_thread+0xe0/0x1460 [] ? process_one_work+0x1a50/0x1a50 [] kthread+0x222/0x2e0 [] ? kthread_park+0x80/0x80 [] ? kthread_park+0x80/0x80 [] ? kthread_park+0x80/0x80 [] ret_from_fork+0x2a/0x40 Object at ffff8803fc244088, in cache kmalloc-1024 size: 1024 Allocated: PID = 71 save_stack_trace+0x1b/0x20 save_stack+0x46/0xd0 kasan_kmalloc+0xad/0xe0 kasan_slab_alloc+0x12/0x20 __kmalloc_track_caller+0x134/0x360 kmemdup+0x20/0x50 brcmf_cfg80211_attach+0x10b/0x3a90 [brcmfmac] brcmf_bus_start+0x19a/0x9a0 [brcmfmac] brcmf_pcie_setup+0x1f1a/0x3680 [brcmfmac] brcmf_fw_request_nvram_done+0x44c/0x11b0 [brcmfmac] request_firmware_work_func+0x135/0x280 process_one_work+0x716/0x1a50 worker_thread+0xe0/0x1460 kthread+0x222/0x2e0 ret_from_fork+0x2a/0x40 Freed: PID = 2568 save_stack_trace+0x1b/0x20 save_stack+0x46/0xd0 kasan_slab_free+0x71/0xb0 kfree+0xe8/0x2e0 brcmf_cfg80211_detach+0x62/0xf0 [brcmfmac] brcmf_detach+0x14a/0x2b0 [brcmfmac] brcmf_pcie_remove+0x140/0x5d0 [brcmfmac] brcmf_pcie_pm_leave_D3+0x198/0x2e0 [brcmfmac] pci_pm_resume+0x186/0x220 dpm_run_callback+0x6e/0x4f0 device_resume+0x1c2/0x670 async_resume+0x1d/0x50 async_run_entry_fn+0xfe/0x610 process_one_work+0x716/0x1a50 worker_thread+0xe0/0x1460 kthread+0x222/0x2e0 ret_from_fork+0x2a/0x40 Memory state around the buggy address: ffff8803fc243f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8803fc244000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8803fc244080: fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8803fc244100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8803fc244180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb What is happening is that brcmf_pcie_resume() detects a device that is no longer responsive and it decides to unbind resulting in a wiphy_unregister() and wiphy_free() call. Now the wiphy instance remains allocated, because PM needs to call wiphy_resume() for it. However, brcmfmac already does a kfree() for the struct cfg80211_registered_device::ops field. Change the checks in wiphy_resume() to only access the struct cfg80211_registered_device::ops if the wiphy instance is still registered at this time. Cc: stable@vger.kernel.org # 4.10.x, 4.9.x Reported-by: Daniel J Blueman Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/sysfs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b768b16de58d5e0b1d7c3f936825b25327ced20c Author: Jarno Rajahalme Date: Tue Mar 28 11:25:26 2017 -0700 openvswitch: Fix refcount leak on force commit. The reference count held for skb needs to be released when the skb's nfct pointer is cleared regardless of if nf_ct_delete() is called or not. Failing to release the skb's reference cound led to deferred conntrack cleanup spinning forever within nf_conntrack_cleanup_net_list() when cleaning up a network namespace:    kworker/u16:0-19025 [004] 45981067.173642: sched_switch: kworker/u16:0:19025 [120] R ==> rcu_preempt:7 [120]    kworker/u16:0-19025 [004] 45981067.173651: kernel_stack: => ___preempt_schedule (ffffffffa001ed36) => _raw_spin_unlock_bh (ffffffffa0713290) => nf_ct_iterate_cleanup (ffffffffc00a4454) => nf_conntrack_cleanup_net_list (ffffffffc00a5e1e) => nf_conntrack_pernet_exit (ffffffffc00a63dd) => ops_exit_list.isra.1 (ffffffffa06075f3) => cleanup_net (ffffffffa0607df0) => process_one_work (ffffffffa0084c31) => worker_thread (ffffffffa008592b) => kthread (ffffffffa008bee2) => ret_from_fork (ffffffffa071b67c) Fixes: dd41d33f0b03 ("openvswitch: Add force commit.") Reported-by: Yang Song Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16b8b6de32572207abeb4dfb74ab7bd8409a5690 Author: Arnd Bergmann Date: Tue Mar 28 16:11:18 2017 +0200 rocker: fix Wmaybe-uninitialized false-positive gcc-7 reports a warning that earlier versions did not have: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_port_stp_update': arch/x86/include/asm/string_32.h:79:22: error: '*((void *)&prev_ctrls+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] *((short *)to + 2) = *((short *)from + 2); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/rocker/rocker_ofdpa.c:2218:7: note: '*((void *)&prev_ctrls+4)' was declared here This is clearly a variation of the warning about 'prev_state' that was shut up using uninitialized_var(). We can slightly simplify the code and get rid of the warning by unconditionally saving the prev_state and prev_ctrls variables. The inlined memcpy is not particularly expensive here, as it just has to read five bytes from one or two cache lines. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 23abec20aa7034c5d49b62c0a668f7291c819fab Author: Chuck Lever Date: Sun Mar 26 19:27:35 2017 -0400 svcrdma: set XPT_CONG_CTRL flag for bc xprt Same change as Kinglong Mee's fix for the TCP backchannel service. Fixes: 5283b03ee5cd ("nfs/nfsd/sunrpc: enforce transport...") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 + 1 file changed, 1 insertion(+) commit e497ec680c4cd51e76bfcdd49363d9ab8d32a757 Author: Talat Batheesh Date: Tue Mar 28 16:13:41 2017 +0300 net/mlx5: Avoid dereferencing uninitialized pointer In NETDEV_CHANGEUPPER event the upper_info field is valid only when linking is true. Otherwise it should be ignored. Fixes: 7907f23adc18 (net/mlx5: Implement RoCE LAG feature) Signed-off-by: Talat Batheesh Reviewed-by: Aviv Heller Reviewed-by: Moni Shoua Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/lag.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c2b341a620018d4eaeb0e85c16274ac4e5f153d4 Author: Jonas Jensen Date: Tue Mar 28 12:12:38 2017 +0200 net: moxa: fix TX overrun memory leak moxart_mac_start_xmit() doesn't care where tx_tail is, tx_head can catch and pass tx_tail, which is bad because moxart_tx_finished() isn't guaranteed to catch up on freeing resources from tx_tail. Add a check in moxart_mac_start_xmit() stopping the queue at the end of the circular buffer. Also add a check in moxart_tx_finished() waking the queue if the buffer has TX_WAKE_THRESHOLD or more free descriptors. While we're at it, move spin_lock_irq() to happen before our descriptor pointer is assigned in moxart_mac_start_xmit(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=99451 Signed-off-by: Jonas Jensen Signed-off-by: David S. Miller drivers/net/ethernet/moxa/moxart_ether.c | 20 ++++++++++++++++++-- drivers/net/ethernet/moxa/moxart_ether.h | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) commit af109a2cf6a9a6271fa420ae2d64d72d86c92b7d Author: Arnd Bergmann Date: Tue Mar 28 12:11:07 2017 +0200 isdn: kcapi: avoid uninitialized data gcc-7 points out that the AVMB1_ADDCARD ioctl results in an unintialized value ending up in the cardnr parameter: drivers/isdn/capi/kcapi.c: In function 'old_capi_manufacturer': drivers/isdn/capi/kcapi.c:1042:24: error: 'cdef.cardnr' may be used uninitialized in this function [-Werror=maybe-uninitialized] cparams.cardnr = cdef.cardnr; This has been broken since before the start of the git history, so either the value is not used for anything important, or the ioctl command doesn't get called in practice. Setting the cardnr to zero avoids the warning and makes sure we have consistent behavior. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/isdn/capi/kcapi.c | 1 + 1 file changed, 1 insertion(+) commit f9ba3501d50317697811ff3c48f623f08d616fc8 Author: Xin Long Date: Mon Mar 27 00:21:15 2017 +0800 sctp: change to save MSG_MORE flag into assoc David Laight noticed the support for MSG_MORE with datamsg->force_delay didn't really work as we expected, as the first msg with MSG_MORE set would always block the following chunks' dequeuing. This Patch is to rewrite it by saving the MSG_MORE flag into assoc as David Laight suggested. asoc->force_delay is used to save MSG_MORE flag before a msg is sent. All chunks in queue would not be sent out if asoc->force_delay is set by the msg with MSG_MORE flag, until a new msg without MSG_MORE flag clears asoc->force_delay. Note that this change would not affect the flush is generated by other triggers, like asoc->state != ESTABLISHED, queue size > pmtu etc. v1->v2: Not clear asoc->force_delay after sending the msg with MSG_MORE flag. Fixes: 4ea0c32f5f42 ("sctp: add support for MSG_MORE") Signed-off-by: Xin Long Acked-by: David Laight Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/output.c | 2 +- net/sctp/socket.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 61b79e16c68d703dde58c25d3935d67210b7d71b Author: Josh Poimboeuf Date: Thu Mar 16 08:56:28 2017 -0500 ACPI: Fix incompatibility with mcount-based function graph tracing Paul Menzel reported a warning: WARNING: CPU: 0 PID: 774 at /build/linux-ROBWaj/linux-4.9.13/kernel/trace/trace_functions_graph.c:233 ftrace_return_to_handler+0x1aa/0x1e0 Bad frame pointer: expected f6919d98, received f6919db0 from func acpi_pm_device_sleep_wake return to c43b6f9d The warning means that function graph tracing is broken for the acpi_pm_device_sleep_wake() function. That's because the ACPI Makefile unconditionally sets the '-Os' gcc flag to optimize for size. That's an issue because mcount-based function graph tracing is incompatible with '-Os' on x86, thanks to the following gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109 I have another patch pending which will ensure that mcount-based function graph tracing is never used with CONFIG_CC_OPTIMIZE_FOR_SIZE on x86. But this patch is needed in addition to that one because the ACPI Makefile overrides that config option for no apparent reason. It has had this flag since the beginning of git history, and there's no related comment, so I don't know why it's there. As far as I can tell, there's no reason for it to be there. The appropriate behavior is for it to honor CONFIG_CC_OPTIMIZE_FOR_{SIZE,PERFORMANCE} like the rest of the kernel. Reported-by: Paul Menzel Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt (VMware) Signed-off-by: Rafael J. Wysocki Cc: All applicable drivers/acpi/Makefile | 1 - 1 file changed, 1 deletion(-) commit 7d64f82cceb21e6d95db312d284f5f195e120154 Author: James Morse Date: Thu Mar 16 14:30:39 2017 +0000 ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal When removing a GHES device notified by SCI, list_del_rcu() is used, ghes_remove() should call synchronize_rcu() before it goes on to call kfree(ghes), otherwise concurrent RCU readers may still hold this list entry after it has been freed. Signed-off-by: James Morse Reviewed-by: "Huang, Ying" Fixes: 81e88fdc432a (ACPI, APEI, Generic Hardware Error Source POLL/IRQ/NMI notification type support) Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 1 + 1 file changed, 1 insertion(+) commit 08f63d97749185fab942a3a47ed80f5bd89b8b7d Author: Joerg Roedel Date: Wed Mar 22 18:33:25 2017 +0100 ACPI: Do not create a platform_device for IOAPIC/IOxAPIC No platform-device is required for IO(x)APICs, so don't even create them. [ rjw: This fixes a problem with leaking platform device objects after IOAPIC/IOxAPIC hot-removal events.] Signed-off-by: Joerg Roedel Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_platform.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e3d5092b6756b9e0b08f94bbeafcc7afe19f0996 Author: Joerg Roedel Date: Wed Mar 22 18:33:23 2017 +0100 ACPI: ioapic: Clear on-stack resource before using it The on-stack resource-window 'win' in setup_res() is not properly initialized. This causes the pointers in the embedded 'struct resource' to contain stale addresses. These pointers (in my case the ->child pointer) later get propagated to the global iomem_resources list, causing a #GP exception when the list is traversed in iomem_map_sanity_check(). Fixes: c183619b63ec (x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug) Signed-off-by: Joerg Roedel Signed-off-by: Rafael J. Wysocki drivers/acpi/ioapic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fe82203b63e598c34d96e846dea49679a726fc7a Merge: 050fc52 f0bb2d5 Author: Linus Torvalds Date: Tue Mar 28 11:43:35 2017 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Fixes to multiple issues in virtio. Most notably a regression fix for crashes reported by Fedora users. Hibernate is still reportedly broken, working on it" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: prevent uninitialized variable use virtio-balloon: use actual number of stats for stats queue buffers virtio_balloon: init 1st buffer in stats vq virtio_pci: fix out of bound access for msix_names commit 050fc52d83c47279ddc115636741105ec1d4886a Merge: ad0376e 2beb6dad Author: Linus Torvalds Date: Tue Mar 28 11:33:34 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "All x86-specific, apart from some arch-independent syzkaller fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: cleanup the page tracking SRCU instance KVM: nVMX: fix nested EPT detection KVM: pci-assign: do not map smm memory slot pages in vt-d page tables KVM: kvm_io_bus_unregister_dev() should never fail KVM: VMX: Fix enable VPID conditions KVM: nVMX: Fix nested VPID vmx exec control KVM: x86: correct async page present tracepoint kvm: vmx: Flush TLB when the APIC-access address changes KVM: x86: use pic/ioapic destructor when destroy vm KVM: x86: check existance before destroy KVM: x86: clear bus pointer when destroyed KVM: Documentation: document MCE ioctls KVM: nVMX: don't reset kvm mmu twice PTP: fix ptr_ret.cocci warnings kvm: fix usage of uninit spinlock in avic_vm_destroy() KVM: VMX: downgrade warning on unexpected exit code commit f0bb2d50dfcc519f06f901aac88502be6ff1df2c Author: Arnd Bergmann Date: Tue Mar 28 18:46:59 2017 +0200 virtio_balloon: prevent uninitialized variable use The latest gcc-7.0.1 snapshot reports a new warning: virtio/virtio_balloon.c: In function 'update_balloon_stats': virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:261:56: error: 'events[18]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:262:56: error: 'events[17]' is used uninitialized in this function [-Werror=uninitialized] This seems absolutely right, so we should add an extra check to prevent copying uninitialized stack data into the statistics. >From all I can tell, this has been broken since the statistics code was originally added in 2.6.34. Fixes: 9564e138b1f6 ("virtio: Add memory statistics reporting to the balloon driver (V4)") Signed-off-by: Arnd Bergmann Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) commit 9646b26e85896ef0256e66649f7937f774dc18a6 Author: Ladi Prosek Date: Tue Mar 28 18:46:58 2017 +0200 virtio-balloon: use actual number of stats for stats queue buffers The virtio balloon driver contained a not-so-obvious invariant that update_balloon_stats has to update exactly VIRTIO_BALLOON_S_NR counters in order to send valid stats to the host. This commit fixes it by having update_balloon_stats return the actual number of counters, and its callers use it when pushing buffers to the stats virtqueue. Note that it is still out of spec to change the number of counters at run-time. "Driver MUST supply the same subset of statistics in all buffers submitted to the statsq." Suggested-by: Arnd Bergmann Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit fc8653228c8588a120f6b5dad6983b7b61ff669e Author: Ladi Prosek Date: Thu Mar 23 08:04:18 2017 +0100 virtio_balloon: init 1st buffer in stats vq When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. Alternative fixes: * Push an empty buffer in init_vqs. Not easily done with the current virtio implementation and violates the spec "Driver MUST supply the same subset of statistics in all buffers submitted to the statsq". * Push a buffer with invalid tags in init_vqs. Violates the same spec clause, plus "invalid tag" is not really defined. Note: the spec says: When using the legacy interface, the device SHOULD ignore all values in the first buffer in the statsq supplied by the driver after device initialization. Note: Historically, drivers supplied an uninitialized buffer in the first buffer. Unfortunately QEMU does not seem to implement the recommendation even for the legacy interface. Cc: stable@vger.kernel.org Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) commit de85ec8b07f82c8c84de7687f769e74bf4c26a1e Author: Jason Wang Date: Thu Mar 23 13:07:16 2017 +0800 virtio_pci: fix out of bound access for msix_names Fedora has received multiple reports of crashes when running 4.11 as a guest https://bugzilla.redhat.com/show_bug.cgi?id=1430297 https://bugzilla.redhat.com/show_bug.cgi?id=1434462 https://bugzilla.kernel.org/show_bug.cgi?id=194911 https://bugzilla.redhat.com/show_bug.cgi?id=1433899 The crashes are not always consistent but they are generally some flavor of oops or GPF in virtio related code. Multiple people have done bisections (Thank you Thorsten Leemhuis and Richard W.M. Jones) and found this commit to be at fault 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507 is the first bad commit commit 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507 Author: Christoph Hellwig Date: Sun Feb 5 18:15:19 2017 +0100 virtio_pci: use shared interrupts for virtqueues The issue seems to be an out of bounds access to the msix_names array corrupting kernel memory. Fixes: 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") Reported-by: Laura Abbott Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin Reviewed-by: Christoph Hellwig Tested-by: Richard W.M. Jones Tested-by: Thorsten Leemhuis drivers/virtio/virtio_pci_common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8d40b0f14846f7d45c7c72d343fe62cb866dda34 Author: Andy Adamson Date: Mon Mar 20 18:07:02 2017 -0400 NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes Fix a filelayout GETDEVICEINFO call hang triggered from the LAYOUTGET pnfs_layout_process where the GETDEVICEINFO call is waiting for a session slot, and the LAYOUGET call is waiting for pnfs_layout_process to complete before freeing the slot GETDEVICEINFO is waiting for.. This occurs in testing against the pynfs pNFS server where the the on-wire reply highest_slotid and slot id are zero, and the target high slot id is 8 (negotiated in CREATE_SESSION). The internal fore channel slot table max_slotid, the maximum allowed table slotid value, has been reduced via nfs41_set_max_slotid_locked from 8 to 1. Thus there is one slot (slotid 0) available for use but it has not been freed by LAYOUTGET proir to the GETDEVICEINFO request. In order to ensure that layoutrecall callbacks are processed in the correct order, nfs4_proc_layoutget processing needs to be finished e.g. pnfs_layout_process) before giving up the slot that identifies the layoutget (see referring_call_exists). Move the filelayout_check_layout nfs4_find_get_device call outside of the pnfs_layout_process call tree. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 138 +++++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 47 deletions(-) commit 629dc8704b922f0c46f3025bd3486c2bc51eb7a6 Author: Andy Adamson Date: Mon Mar 20 18:07:01 2017 -0400 NFS store nfs4_deviceid in struct nfs4_filelayout_segment In preparation for moving the filelayout getdeviceinfo call from filelayout_alloc_lseg called by pnfs_process_layout Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 13 +++++-------- fs/nfs/filelayout/filelayout.h | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) commit 2beb6dad2e8f95d710159d5befb390e4f62ab5cf Author: Paolo Bonzini Date: Mon Mar 27 17:53:50 2017 +0200 KVM: x86: cleanup the page tracking SRCU instance SRCU uses a delayed work item. Skip cleaning it up, and the result is use-after-free in the work item callbacks. Reported-by: Dmitry Vyukov Suggested-by: Dmitry Vyukov Cc: stable@vger.kernel.org Fixes: 0eb05bf290cfe8610d9680b49abef37febd1c38a Reviewed-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_page_track.h | 1 + arch/x86/kvm/page_track.c | 8 ++++++++ arch/x86/kvm/x86.c | 1 + 3 files changed, 10 insertions(+) commit 7ed23e1bae8bf7e37fd555066550a00b95a3a98b Author: Benjamin Herrenschmidt Date: Mon Mar 20 17:49:03 2017 +1100 powerpc: Disable HFSCR[TM] if TM is not supported On Power8 & Power9 the early CPU inititialisation in __init_HFSCR() turns on HFSCR[TM] (Hypervisor Facility Status and Control Register [Transactional Memory]), but that doesn't take into account that TM might be disabled by CPU features, or disabled by the kernel being built with CONFIG_PPC_TRANSACTIONAL_MEM=n. So later in boot, when we have setup the CPU features, clear HSCR[TM] if the TM CPU feature has been disabled. We use CPU_FTR_TM_COMP to account for the CONFIG_PPC_TRANSACTIONAL_MEM=n case. Without this a KVM guest might try use TM, even if told not to, and cause an oops in the host kernel. Typically the oops is seen in __kvmppc_vcore_entry() and may or may not be fatal to the host, but is always bad news. In practice all shipping CPU revisions do support TM, and all host kernels we are aware of build with TM support enabled, so no one should actually be able to hit this in the wild. Fixes: 2a3563b023e5 ("powerpc: Setup in HFSCR for POWER8") Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Benjamin Herrenschmidt Tested-by: Sam Bobroff [mpe: Rewrite change log with input from Sam, add Fixes/stable] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7ad658b693536741c37b16aeb07840a2ce75f5b9 Author: Ladi Prosek Date: Thu Mar 23 07:18:08 2017 +0100 KVM: nVMX: fix nested EPT detection The nested_ept_enabled flag introduced in commit 7ca29de2136 was not computed correctly. We are interested only in L1's EPT state, not the the combined L0+L1 value. In particular, if L0 uses EPT but L1 does not, nested_ept_enabled must be false to make sure that PDPSTRs are loaded based on CR3 as usual, because the special case described in 26.3.2.4 Loading Page-Directory- Pointer-Table Entries does not apply. Fixes: 7ca29de21362 ("KVM: nVMX: fix CR3 load if L2 uses PAE paging and EPT") Cc: qemu-stable@nongnu.org Reported-by: Wanpeng Li Reviewed-by: David Hildenbrand Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0292e169b2d9c8377a168778f0b16eadb1f578fd Author: Herongguang (Stephen) Date: Mon Mar 27 15:21:17 2017 +0800 KVM: pci-assign: do not map smm memory slot pages in vt-d page tables or VM memory are not put thus leaked in kvm_iommu_unmap_memslots() when destroy VM. This is consistent with current vfio implementation. Signed-off-by: herongguang Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 658b299580da2830a69eea44a8b6da1c2579a32e Author: Ingo Molnar Date: Tue Mar 28 09:53:00 2017 +0200 sched/headers: Remove duplicate #include line Vito Caputo reported that the sched.h split-up series introduced a duplicate #include line in drivers/tty/vt/keyboard.c. Remove it. Reported-by: Vito Caputo Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Alan Cox Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/tty/vt/keyboard.c | 1 - 1 file changed, 1 deletion(-) commit 8d09617b076fd03ee9ae124abce94dda17bf3723 Author: Alexander Kochetkov Date: Wed Mar 22 17:29:06 2017 +0300 vmlinux.lds: Add __clkevt_of_table to kernel The code introduced by commit 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of") refer to __clkevt_of_table what doesn't exist in the vmlinux. As a result kernel build failed with error: "clkevt-probe.c:63: undefined reference to `__clkevt_of_table’" Fixes: 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of") Signed-off-by: Alexander Kochetkov Signed-off-by: Daniel Lezcano include/asm-generic/vmlinux.lds.h | 2 ++ 1 file changed, 2 insertions(+) commit 07de36b378a58f1d1426829acf0ab7cf86f651f3 Author: Alexander Kochetkov Date: Wed Mar 22 17:32:49 2017 +0300 clockevents: Fix syntax error in clkevt-of macro The patch fix syntax errors introduced by commit 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of"). Fixes: 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of") Signed-off-by: Alexander Kochetkov Signed-off-by: Daniel Lezcano drivers/clocksource/clkevt-probe.c | 2 +- include/linux/clockchips.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cc66afea58f858ff6da7f79b8a595a67bbb4f9a9 Author: Andi Kleen Date: Mon Mar 27 11:32:59 2017 +0200 x86/mce: Don't print MCEs when mcelog is active Since: cd9c57cad3fe ("x86/MCE: Dump MCE to dmesg if no consumers") all MCEs are printed even when mcelog is running. Fix the regression to not print to dmesg when mcelog is running as it is a consumer too. Signed-off-by: Andi Kleen [ Massage commit message. ] Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Cc: stable@vger.kernel.org # 4.10.. Fixes: cd9c57cad3fe ("x86/MCE: Dump MCE to dmesg if no consumers") Link: http://lkml.kernel.org/r/20170327093304.10683-2-bp@alien8.de Signed-off-by: Ingo Molnar Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b03b99a329a14b7302f37c3ea6da3848db41c8c5 Author: Dan Williams Date: Mon Mar 27 21:53:38 2017 -0700 acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison) While reviewing the -stable patch for commit 86ef58a4e35e "nfit, libnvdimm: fix interleave set cookie calculation" Ben noted: "This is returning an int, thus it's effectively doing a 32-bit comparison and not the 64-bit comparison you say is needed." Update the compare operation to be immune to this integer demotion problem. Cc: Cc: Nicholas Moulin Fixes: 86ef58a4e35e ("nfit, libnvdimm: fix interleave set cookie calculation") Reported-by: Ben Hutchings Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0ae2d26ffe70c32d4a7fe77593f0a55ce416c09e Author: Babu Moger Date: Fri Mar 17 14:52:21 2017 -0600 arch/sparc: Avoid DCTI Couples Avoid un-intended DCTI Couples. Use of DCTI couples is deprecated. Also address the "Programming Note" for optimal performance. Here is the complete text from Oracle SPARC Architecture Specs. 6.3.4.7 DCTI Couples "A delayed control transfer instruction (DCTI) in the delay slot of another DCTI is referred to as a “DCTI couple”. The use of DCTI couples is deprecated in the Oracle SPARC Architecture; no new software should place a DCTI in the delay slot of another DCTI, because on future Oracle SPARC Architecture implementations DCTI couples may execute either slowly or differently than the programmer assumes it will. SPARC V8 and SPARC V9 Compatibility Note The SPARC V8 architecture left behavior undefined for a DCTI couple. The SPARC V9 architecture defined behavior in that case, but as of UltraSPARC Architecture 2005, use of DCTI couples was deprecated. Software should not expect high performance from DCTI couples, and performance of DCTI couples should be expected to decline further in future processors. Programming Note As noted in TABLE 6-5 on page 115, an annulled branch-always (branch-always with a = 1) instruction is not architecturally a DCTI. However, since not all implementations make that distinction, for optimal performance, a DCTI should not be placed in the instruction word immediately following an annulled branch-always instruction (BA,A or BPA,A)." Signed-off-by: Babu Moger Reviewed-by: Rob Gardner Signed-off-by: David S. Miller arch/sparc/kernel/head_64.S | 4 ++++ arch/sparc/kernel/misctrap.S | 1 + arch/sparc/kernel/rtrap_64.S | 1 + arch/sparc/kernel/spiterrs.S | 1 + arch/sparc/kernel/sun4v_tlb_miss.S | 1 + arch/sparc/kernel/urtt_fill.S | 1 + arch/sparc/kernel/winfixup.S | 2 ++ arch/sparc/lib/NG2memcpy.S | 4 ++++ arch/sparc/lib/NG4memcpy.S | 1 + arch/sparc/lib/NG4memset.S | 1 + arch/sparc/lib/NGmemcpy.S | 1 + 11 files changed, 18 insertions(+) commit adfae8a5d833fa2b46577a8081f350e408851f5b Author: bob picco Date: Fri Mar 10 14:31:19 2017 -0500 sparc64: kern_addr_valid regression I encountered this bug when using /proc/kcore to examine the kernel. Plus a coworker inquired about debugging tools. We computed pa but did not use it during the maximum physical address bits test. Instead we used the identity mapped virtual address which will always fail this test. I believe the defect came in here: [bpicco@zareason linus.git]$ git describe --contains bb4e6e85daa52 v3.18-rc1~87^2~4 . Signed-off-by: Bob Picco Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85b1da7c47052330af9485a5f5c7e54ede882e65 Author: Nitin Gupta Date: Thu Mar 9 14:22:23 2017 -0800 sparc64: Add support for 2G hugepages Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/include/asm/page_64.h | 3 ++- arch/sparc/mm/hugetlbpage.c | 7 +++++++ arch/sparc/mm/init_64.c | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit 59f1183dd368f12c0a80da3c91a4a42afa4e1d38 Author: Nitin Gupta Date: Fri Mar 3 14:40:44 2017 -0800 sparc64: Fix size check in huge_pte_alloc Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/hugetlbpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffefb6f4d6ad699a2b5484241bc46745a53235d0 Author: Mark Rutland Date: Mon Mar 27 18:00:14 2017 +0100 net: ipconfig: fix ic_close_devs() use-after-free Our chosen ic_dev may be anywhere in our list of ic_devs, and we may free it before attempting to close others. When we compare d->dev and ic_dev->dev, we're potentially dereferencing memory returned to the allocator. This causes KASAN to scream for each subsequent ic_dev we check. As there's a 1-1 mapping between ic_devs and netdevs, we can instead compare d and ic_dev directly, which implicitly handles the !ic_dev case, and avoids the use-after-free. The ic_dev pointer may be stale, but we will not dereference it. Original splat: [ 6.487446] ================================================================== [ 6.494693] BUG: KASAN: use-after-free in ic_close_devs+0xc4/0x154 at addr ffff800367efa708 [ 6.503013] Read of size 8 by task swapper/0/1 [ 6.507452] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc3-00002-gda42158 #8 [ 6.514993] Hardware name: AppliedMicro Mustang/Mustang, BIOS 3.05.05-beta_rc Jan 27 2016 [ 6.523138] Call trace: [ 6.525590] [] dump_backtrace+0x0/0x570 [ 6.530976] [] show_stack+0x20/0x30 [ 6.536017] [] dump_stack+0x120/0x188 [ 6.541231] [] kasan_object_err+0x24/0xa0 [ 6.546790] [] kasan_report_error+0x244/0x738 [ 6.552695] [] __asan_report_load8_noabort+0x54/0x80 [ 6.559204] [] ic_close_devs+0xc4/0x154 [ 6.564590] [] ip_auto_config+0x2ed4/0x2f1c [ 6.570321] [] do_one_initcall+0xcc/0x370 [ 6.575882] [] kernel_init_freeable+0x5f8/0x6c4 [ 6.581959] [] kernel_init+0x18/0x190 [ 6.587171] [] ret_from_fork+0x10/0x40 [ 6.592468] Object at ffff800367efa700, in cache kmalloc-128 size: 128 [ 6.598969] Allocated: [ 6.601324] PID = 1 [ 6.603427] save_stack_trace_tsk+0x0/0x418 [ 6.607603] save_stack_trace+0x20/0x30 [ 6.611430] kasan_kmalloc+0xd8/0x188 [ 6.615087] ip_auto_config+0x8c4/0x2f1c [ 6.619002] do_one_initcall+0xcc/0x370 [ 6.622832] kernel_init_freeable+0x5f8/0x6c4 [ 6.627178] kernel_init+0x18/0x190 [ 6.630660] ret_from_fork+0x10/0x40 [ 6.634223] Freed: [ 6.636233] PID = 1 [ 6.638334] save_stack_trace_tsk+0x0/0x418 [ 6.642510] save_stack_trace+0x20/0x30 [ 6.646337] kasan_slab_free+0x88/0x178 [ 6.650167] kfree+0xb8/0x478 [ 6.653131] ic_close_devs+0x130/0x154 [ 6.656875] ip_auto_config+0x2ed4/0x2f1c [ 6.660875] do_one_initcall+0xcc/0x370 [ 6.664705] kernel_init_freeable+0x5f8/0x6c4 [ 6.669051] kernel_init+0x18/0x190 [ 6.672534] ret_from_fork+0x10/0x40 [ 6.676098] Memory state around the buggy address: [ 6.680880] ffff800367efa600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 6.688078] ffff800367efa680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 6.695276] >ffff800367efa700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 6.702469] ^ [ 6.705952] ffff800367efa780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 6.713149] ffff800367efa800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 6.720343] ================================================================== [ 6.727536] Disabling lock debugging due to kernel taint Signed-off-by: Mark Rutland Cc: Alexey Kuznetsov Cc: David S. Miller Cc: Hideaki YOSHIFUJI Cc: James Morris Cc: Patrick McHardy Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3902ee98304324f681088203391b5c0353ce977 Author: Jaehoon Chung Date: Tue Mar 21 21:19:57 2017 +0900 scsi: ufs: remove the duplicated checking for supporting clkscaling There are same conditions for checking whether supporting clkscaling or not. When ufshcd is supporting clkscaling, active_reqs should be decreased by one. [mkp: addressed comment from Bartlomiej] Signed-off-by: Jaehoon Chung Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 -- 1 file changed, 2 deletions(-) commit 248ccd5ee644fcf68984d945cffcdc364992ddbf Author: Florian Fainelli Date: Mon Mar 27 10:48:11 2017 -0700 MAINTAINERS: Add Andrew Lunn as co-maintainer of PHYLIB Andrew has been contributing a lot to PHYLIB over the past months and his feedback on patches is more than welcome. Signed-off-by: Florian Fainelli Acked-by: Andrew Lunn Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 551afbb85b3898e78068405d78708245999c19c0 Author: Andy Adamson Date: Mon Mar 20 18:07:00 2017 -0400 NFS cleanup struct nfs4_filelayout_segment Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ce4b4f228e51219b0b79588caf73225b08b5b779 Author: Michel Dänzer Date: Fri Mar 24 19:01:09 2017 +0900 drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags We were accidentally only overriding the first VRAM placement. For BOs with the RADEON_GEM_NO_CPU_ACCESS flag set, radeon_ttm_placement_from_domain creates a second VRAM placment with fpfn == 0. If VRAM is almost full, the first VRAM placement with fpfn > 0 may not work, but the second one with fpfn == 0 always will (the BO's current location trivially satisfies it). Because "moving" the BO to its current location puts it back on the LRU list, this results in an infinite loop. Fixes: 2a85aedd117c ("drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first") Reported-by: Zachary Michaels Reported-and-Tested-by: Julien Isorce Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab6434a1377a768a1e6d3e6cf819eb21724a99c2 Author: Paul Moore Date: Mon Mar 27 14:30:06 2017 -0400 audit: move audit_signal_info() into kernel/auditsc.c Commit 5b52330bbfe6 ("audit: fix auditd/kernel connection state tracking") made inlining audit_signal_info() a bit pointless as it was always calling into auditd_test_task() so let's remove the inline function in kernel/audit.h and convert __audit_signal_info() in kernel/auditsc.c into audit_signal_info(). Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.h | 8 +------- kernel/auditsc.c | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) commit ad0376eb1483bd9880770b346f6592aece669e4c Merge: 85f91d5 819f60f Author: Linus Torvalds Date: Mon Mar 27 11:09:00 2017 -0700 Merge tag 'edac_for_4.11_2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "A new EDAC driver for the Pondicherry2 memory controller IP found in the Intel Apollo Lake platform and the Denverton microserver. Plus small fixlets. Normally I had this queued for 4.12 but Tony requested for the pnd2_edac driver to possibly land in 4.11 therefore I'm sending it to you now. It is a driver for new hardware which people don't have yet so it shouldn't cause any regressions. The couple of patches ontop of it show that Qiuxu actually did test it on the hardware he has access to :)" * tag 'edac_for_4.11_2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, pnd2_edac: Fix reported DIMM number EDAC, pnd2_edac: Fix !EDAC_DEBUG build EDAC: Select DEBUG_FS EDAC, pnd2_edac: Add new EDAC driver for Intel SoC platforms EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro EDAC, xgene: Fix wrongly spelled "procesing" commit 85f91d5c51efd7d68969dccc06c64fbb9fd439a1 Merge: d3e68ce d7402de Author: Linus Torvalds Date: Mon Mar 27 10:58:02 2017 -0700 Merge tag 'pinctrl-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull more pin control fixes from Linus Walleij: "Here is a bunch of pin control fixes again A bit more than I'd like for this subsystem at this point, but what can I do. They are all driver fixes for hardware issues, as like "we forgot", "we didn't think of the fact that this could happen", "oops that one goes there" etc - Kconfig fixup for the TI IOdelay pinctrl-single add-on - fix up a typo in the meson i2c ao groups - switch a remapping back to use devm_ioremap() as devm_ioremap_resource() does not allow for sharing memory regions - do not clear the Qualcomm irq status bit in irq_unmask(), as this can lead to missing interrupts while the irq handler is executing - add irq_request/release_resources() on the ST driver - add a bunch of mysteriously missing pingroups for high numbered pins in the Qualcomm ipq4019 driver" * tag 'pinctrl-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 pinctrl: st: add irq_request/release_resources callbacks pinctrl: qcom: Don't clear status bit on irq_unmask pinctrl: samsung: Fix memory mapping code pinctrl: meson-gxbb: Fix typo in i2c ao groups pinctrl: ti: The IODelay driver is a DRA7xxx feature so depend on that SoC commit a431ecd2d459da3c91a612061f09eb422ffe78e2 Author: Tejun Heo Date: Mon Mar 27 13:52:00 2017 -0400 Revert "pata_atiixp: Don't use unconnected secondary port on SB600/SB700" This reverts commit 5946fdaee4ba449e8fbb5d403e1ed69437f916e8. The original commit's assumption that the secondary port is unconnected turns out to be false. Signed-off-by: Tejun Heo Reported-by: Markku Pesonen Fixes: 5946fdaee4ba ("pata_atiixp: Don't use unconnected secondary port on SB600/SB700") Cc: Darren Stevens drivers/ata/pata_atiixp.c | 5 ----- 1 file changed, 5 deletions(-) commit d3e68cef893c5582a1d54db4126d81245b8382f9 Merge: c02ed2e e3b1ebd Author: Linus Torvalds Date: Mon Mar 27 10:44:51 2017 -0700 Merge tag 'm68k-for-v4.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - build warning fix - defconfig updates - wire up new statx syscall * tag 'm68k-for-v4.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Wire up statx m68k/defconfig: Update defconfigs for v4.11-rc1 m68k/bitops: Correct signature of test_bit() commit 2f0ba790df51721794c11abc7a076d407392f648 Author: Rafael J. Wysocki Date: Mon Mar 27 19:33:09 2017 +0200 cpufreq: Fix creation of symbolic links to policy directories The cpufreq core only tries to create symbolic links from CPU directories in sysfs to policy directories in cpufreq_add_dev(), either when a given CPU is registered or when the cpufreq driver is registered, whichever happens first. That is not sufficient, however, because cpufreq_add_dev() may be called for an offline CPU whose policy object has not been created yet and, quite obviously, the symbolic cannot be added in that case. Fix that by making cpufreq_online() attempt to add symbolic links to policy objects for the CPUs in the related_cpus mask of every new policy object created by it. The cpufreq_driver_lock locking around the for_each_cpu() loop in cpufreq_online() is dropped, because it is not necessary and the code is somewhat simpler without it. Moreover, failures to create a symbolic link will not be regarded as hard errors any more and the CPUs without those links will not be taken offline automatically, but that should not be problematic in practice. Reported-and-tested-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki Cc: 4.9+ # 4.9+ drivers/cpufreq/cpufreq.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit d4ea7e3c5c0e341c15b073016dbf3ab6c65f12f3 Author: Benjamin Coddington Date: Wed Mar 15 21:50:09 2017 -0400 NFS: Fix old dentry rehash after move Now that nfs_rename()'s d_move has moved within the RPC task's rpc_call_done callback, rehashing new_dentry will actually rehash the old dentry's name in nfs_rename(). d_move() is going to rehash the new dentry for us anyway, so doing it again here is unnecessary. Reported-by: Chuck Lever Fixes: 920b4530fb80 ("NFS: nfs_rename() handle -ERESTARTSYS dentry left behind") Signed-off-by: Benjamin Coddington Tested-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/dir.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 351b7c490700747d1dba1b0a10fbfe3448d11c35 Author: Tony Lindgren Date: Wed Mar 22 11:01:48 2017 -0700 ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot Commit 3251885285e1 ("ARM: OMAP4+: Reset CPU1 properly for kexec") started unconditionally resetting CPU1 because of a kexec boot issue I was seeing earlier on omap4 when doing kexec boot between two different kernel versions. This caused issues on some systems. We should only reset CPU1 as a last resort option, and try to avoid it where possible. Doing an unconditional CPU1 reset causes issues for example when booting a bootloader configured secure OS running on CPU1 as reported by Andrew F. Davis . We can't completely remove the reset of CPU1 as it would break kexec booting from older kernels. But we can limit the CPU1 reset to cases where CPU1 is wrongly parked within the memory area used by the booting kernel. Then later on we can add support for parking CPU1 for kexec out of the SDRAM back to bootrom. So let's first fix the regression reported by Andrew by making CPU1 reset conditional. To do this, we need to: 1. Save configured AUX_CORE_BOOT_1 for later 2. Modify AUX_CORE_BOOT_0 reading code to for HS SoCs to return the whole register instead of the CPU mask 3. Check if CPU1 is wrongly parked into the booting kernel by the previous kernel and reset if needed Fixes: 3251885285e1 ("ARM: OMAP4+: Reset CPU1 properly for kexec") Reported-by: Andrew F. Davis Cc: Andrew F. Davis Cc: Keerthy Cc: Russell King Cc: Santosh Shilimkar Cc: Tero Kristo Tested-by: Keerthy Tested-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/omap-hotplug.c | 2 +- arch/arm/mach-omap2/omap-mpuss-lowpower.c | 22 ++++++-- arch/arm/mach-omap2/omap-smc.S | 1 - arch/arm/mach-omap2/omap-smp.c | 90 ++++++++++++++++++++++++++----- 5 files changed, 96 insertions(+), 20 deletions(-) commit 9bcf53f34a2c1cebc45cc12e273dcd5f51fbc099 Author: Reizer, Eyal Date: Sun Mar 26 08:53:10 2017 +0000 ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend mmc2 used for wl12xx was missing the keep-power-in suspend parameter. As a result the board couldn't reach suspend state. Signed-off-by: Eyal Reizer Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evmsk.dts | 1 + 1 file changed, 1 insertion(+) commit 75c689dca98851d65ef5a27e5ce26b625b68751c Author: Gao Feng Date: Sat Mar 25 18:24:36 2017 +0800 netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register In the commit 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper"), the snmp_helper is replaced by nf_nat_snmp_hook. So the snmp_helper is never registered. But it still tries to unregister the snmp_helper, it could cause the panic. Now remove the useless snmp_helper and the unregister call in the error handler. Fixes: 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper") Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_snmp_basic.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 9c3f3794926a997b1cab6c42480ff300efa2d162 Author: Liping Zhang Date: Sat Mar 25 16:35:29 2017 +0800 netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister If one cpu is doing nf_ct_extend_unregister while another cpu is doing __nf_ct_ext_add_length, then we may hit BUG_ON(t == NULL). Moreover, there's no synchronize_rcu invocation after set nf_ct_ext_types[id] to NULL, so it's possible that we may access invalid pointer. But actually, most of the ct extends are built-in, so the problem listed above will not happen. However, there are two exceptions: NF_CT_EXT_NAT and NF_CT_EXT_SYNPROXY. For _EXT_NAT, the panic will not happen, since adding the nat extend and unregistering the nat extend are located in the same file(nf_nat_core.c), this means that after the nat module is removed, we cannot add the nat extend too. For _EXT_SYNPROXY, synproxy extend may be added by init_conntrack, while synproxy extend unregister will be done by synproxy_core_exit. So after nf_synproxy_core.ko is removed, we may still try to add the synproxy extend, then kernel panic may happen. I know it's very hard to reproduce this issue, but I can play a tricky game to make it happen very easily :) Step 1. Enable SYNPROXY for tcp dport 1234 at FORWARD hook: # iptables -I FORWARD -p tcp --dport 1234 -j SYNPROXY Step 2. Queue the syn packet to the userspace at raw table OUTPUT hook. Also note, in the userspace we only add a 20s' delay, then reinject the syn packet to the kernel: # iptables -t raw -I OUTPUT -p tcp --syn -j NFQUEUE --queue-num 1 Step 3. Using "nc 2.2.2.2 1234" to connect the server. Step 4. Now remove the nf_synproxy_core.ko quickly: # iptables -F FORWARD # rmmod ipt_SYNPROXY # rmmod nf_synproxy_core Step 5. After 20s' delay, the syn packet is reinjected to the kernel. Now you will see the panic like this: kernel BUG at net/netfilter/nf_conntrack_extend.c:91! Call Trace: ? __nf_ct_ext_add_length+0x53/0x3c0 [nf_conntrack] init_conntrack+0x12b/0x600 [nf_conntrack] nf_conntrack_in+0x4cc/0x580 [nf_conntrack] ipv4_conntrack_local+0x48/0x50 [nf_conntrack_ipv4] nf_reinject+0x104/0x270 nfqnl_recv_verdict+0x3e1/0x5f9 [nfnetlink_queue] ? nfqnl_recv_verdict+0x5/0x5f9 [nfnetlink_queue] ? nla_parse+0xa0/0x100 nfnetlink_rcv_msg+0x175/0x6a9 [nfnetlink] [...] One possible solution is to make NF_CT_EXT_SYNPROXY extend built-in, i.e. introduce nf_conntrack_synproxy.c and only do ct extend register and unregister in it, similar to nf_conntrack_timeout.c. But having such a obscure restriction of nf_ct_extend_unregister is not a good idea, so we should invoke synchronize_rcu after set nf_ct_ext_types to NULL, and check the NULL pointer when do __nf_ct_ext_add_length. Then it will be easier if we add new ct extend in the future. Last, we use kfree_rcu to free nf_ct_ext, so rcu_barrier() is unnecessary anymore, remove it too. Signed-off-by: Liping Zhang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_extend.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 83d90219a5df8d950855ce73229a97b63605c317 Author: Liping Zhang Date: Sat Mar 25 12:09:15 2017 +0800 netfilter: nfnl_cthelper: fix a race when walk the nf_ct_helper_hash table The nf_ct_helper_hash table is protected by nf_ct_helper_mutex, while nfct_helper operation is protected by nfnl_lock(NFNL_SUBSYS_CTHELPER). So it's possible that one CPU is walking the nf_ct_helper_hash for cthelper add/get/del, another cpu is doing nf_conntrack_helpers_unregister at the same time. This is dangrous, and may cause use after free error. Note, delete operation will flush all cthelpers added via nfnetlink, so using rcu to do protect is not easy. Now introduce a dummy list to record all the cthelpers added via nfnetlink, then we can walk the dummy list instead of walking the nf_ct_helper_hash. Also, keep nfnl_cthelper_dump_table unchanged, it may be invoked without nfnl_lock(NFNL_SUBSYS_CTHELPER) held. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 177 +++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 96 deletions(-) commit 3b7dabf029478bb80507a6c4500ca94132a2bc0b Author: Liping Zhang Date: Sat Mar 25 08:53:12 2017 +0800 netfilter: invoke synchronize_rcu after set the _hook_ to NULL Otherwise, another CPU may access the invalid pointer. For example: CPU0 CPU1 - rcu_read_lock(); - pfunc = _hook_; _hook_ = NULL; - mod unload - - pfunc(); // invalid, panic - rcu_read_unlock(); So we must call synchronize_rcu() to wait the rcu reader to finish. Also note, in nf_nat_snmp_basic_fini, synchronize_rcu() will be invoked by later nf_conntrack_helper_unregister, but I'm inclined to add a explicit synchronize_rcu after set the nf_nat_snmp_hook to NULL. Depend on such obscure assumptions is not a good idea. Last, in nfnetlink_cttimeout, we use kfree_rcu to free the time object, so in cttimeout_exit, invoking rcu_barrier() is not necessary at all, remove it too. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_snmp_basic.c | 1 + net/netfilter/nf_conntrack_ecache.c | 2 ++ net/netfilter/nf_conntrack_netlink.c | 1 + net/netfilter/nf_nat_core.c | 2 ++ net/netfilter/nfnetlink_cttimeout.c | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) commit 0abfe7e2570d7c729a7662e82c09a23f00f29346 Author: Chris Wilson Date: Wed Mar 22 20:59:30 2017 +0000 drm/i915: Restore marking context objects as dirty on pinning Commit e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc") converted the legacy intel_ringbuffer submission to the same context pinning mechanism as execlists - that is to pin the context until the subsequent request is retired. Previously it used the vma retirement of the context object to keep itself pinned until the next request (after i915_vma_move_to_active()). In the conversion, I missed that the vma retirement was also responsible for marking the object as dirty. Mark the context object as dirty when pinning (equivalent to execlists) which ensures that if the context is swapped out due to mempressure or suspend/hibernation, when it is loaded back in it does so with the previous state (and not all zero). Fixes: e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc") Reported-by: Dennis Gilmore Reported-by: Mathieu Marquer Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99993 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100181 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.11-rc1 Link: http://patchwork.freedesktop.org/patch/msgid/20170322205930.12762-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 5d4bac5503fcc67dd7999571e243cee49371aef7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b09cc5a9debc86c903c2eff8f8a1fdef773c649 Author: Pavel Tatashin Date: Wed Mar 22 16:24:17 2017 -0400 sched/clock: Fix broken stable to unstable transfer When it is determined that the clock is actually unstable, and we switch from stable to unstable, the __clear_sched_clock_stable() function is eventually called. In this function we set gtod_offset so the following holds true: sched_clock() + raw_offset == ktime_get_ns() + gtod_offset But instead of getting the latest timestamps, we use the last values from scd, so instead of sched_clock() we use scd->tick_raw, and instead of ktime_get_ns() we use scd->tick_gtod. However, later, when we use gtod_offset sched_clock_local() we do not add it to scd->tick_gtod to calculate the correct clock value when we determine the boundaries for min/max clocks. This can result in tick granularity sched_clock() values, so fix it. Signed-off-by: Pavel Tatashin Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Fixes: 5680d8094ffa ("sched/clock: Provide better clock continuity") Link: http://lkml.kernel.org/r/1490214265-899964-2-git-send-email-pasha.tatashin@oracle.com Signed-off-by: Ingo Molnar kernel/sched/clock.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 69653f626ef31107878c14883a603c1afca5edb9 Merge: c02ed2e bc2d4b6 Author: Jani Nikula Date: Mon Mar 27 11:01:16 2017 +0300 Merge tag 'gvt-fixes-2017-03-23' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-03-23 - KVM reference fix from Alex - shadow gtt entry partial update fix from Xiaoguang - gvt context notification check (Changbin) - other misc fixes. Signed-off-by: Jani Nikula commit 1633682053a7ee8058e10c76722b9b28e97fb73f Author: Alan Stern Date: Fri Mar 24 13:38:28 2017 -0400 USB: fix linked-list corruption in rh_call_control() Using KASAN, Dmitry found a bug in the rh_call_control() routine: If buffer allocation fails, the routine returns immediately without unlinking its URB from the control endpoint, eventually leading to linked-list corruption. This patch fixes the problem by jumping to the end of the routine (where the URB is unlinked) when an allocation failure occurs. Signed-off-by: Alan Stern Reported-and-tested-by: Dmitry Vyukov CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2db2c250dd3d1e74a50d4ab5f44c44ca5cb4e42b Author: Michael Ellerman Date: Mon Mar 27 15:11:44 2017 +1100 selftests/powerpc: Fix standalone powerpc build The changes to enable building with a separate output directory, in commit a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") broke building the powerpc selftests on their own, eg: $ cd tools/testing/selftests/powerpc; make It was partially fixed in commit e53aff45c490 ("selftests: lib.mk Fix individual test builds"), which defined OUTPUT for standalone tests. But that only defines OUTPUT within the Makefile, the value is not exported so sub-shells can't see it. We could export OUTPUT, but it's actually cleaner to just expand the value of OUTPUT before we invoke the shell. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c02ed2e75ef4c74e41e421acb4ef1494671585e8 Author: Linus Torvalds Date: Sun Mar 26 14:15:16 2017 -0700 Linux 4.11-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dc82fa59b9d82469799c354d3307d48e13d5d5e Merge: 9e54ef9 5c1724c Author: Linus Torvalds Date: Sun Mar 26 11:15:54 2017 -0700 Merge tag 'char-misc-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "A smattering of different small fixes for some random driver subsystems. Nothing all that major, just resolutions for reported issues and bugs. All have been in linux-next with no reported issues" * tag 'char-misc-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits) extcon: int3496: Set the id pin to direction-input if necessary extcon: int3496: Use gpiod_get instead of gpiod_get_index extcon: int3496: Add dependency on X86 as it's Intel specific extcon: int3496: Add GPIO ACPI mapping table extcon: int3496: Rename GPIO pins in accordance with binding vmw_vmci: handle the return value from pci_alloc_irq_vectors correctly ppdev: fix registering same device name parport: fix attempt to write duplicate procfiles auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches Drivers: hv: vmbus: Don't leak memory when a channel is rescinded Drivers: hv: vmbus: Don't leak channel ids Drivers: hv: util: don't forget to init host_ts.lock Drivers: hv: util: move waiting for release to hv_utils_transport itself vmbus: remove hv_event_tasklet_disable/enable vmbus: use rcu for per-cpu channel list mei: don't wait for os version message reply mei: fix deadlock on mei reset intel_th: pci: Add Gemini Lake support intel_th: pci: Add Denverton SOC support intel_th: Don't leak module refcount on failure to activate ... commit 9e54ef9da519d9febfa61fa9392276fbfa6ce79c Merge: f1638fc 966fa72 Author: Linus Torvalds Date: Sun Mar 26 11:05:42 2017 -0700 Merge tag 'driver-core-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is a single kernfs fix for 4.11-rc4 that resolves a reported issue. It has been in linux-next with no reported issues" * tag 'driver-core-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kernfs: Check KERNFS_HAS_RELEASE before calling kernfs_release_file() commit f1638fc65ee23875cf4021e342e8a564debe33e4 Merge: 53b4d59 a4a3e06 Author: Linus Torvalds Date: Sun Mar 26 11:03:42 2017 -0700 Merge tag 'tty-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some tty and serial driver fixes for 4.11-rc4. One of these fix a long-standing issue in the ldisc code that was found by Dmitry Vyukov with his great fuzzing work. The other fixes resolve other reported issues, and there is one revert of a patch in 4.11-rc1 that wasn't correct. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: fix data race in tty_ldisc_ref_wait() tty: don't panic on OOM in tty_set_ldisc() Revert "tty: serial: pl011: add ttyAMA for matching pl011 console" tty: acpi/spcr: QDF2400 E44 checks for wrong OEM revision serial: 8250_dw: Fix breakage when HAVE_CLK=n serial: 8250_dw: Honor clk_round_rate errors in dw8250_set_termios commit 53b4d5911d6adef3f543e1ad23643068c5c343ac Merge: e431e0e 43c4993 Author: Linus Torvalds Date: Sun Mar 26 11:02:00 2017 -0700 Merge tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO driver fixes from Greg KH: "Here are some small IIO driver fixes for 4.11-rc4 that resolve a number of tiny reported issues. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: imu: st_lsm6dsx: fix FIFO_CTRL2 overwrite during watermark configuration iio: adc: ti_am335x_adc: fix fifo overrun recovery iio: sw-device: Fix config group initialization iio: magnetometer: ak8974: remove incorrect __exit markups iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3 commit e431e0e427799805461390df1db1e3478d4c475c Merge: 42234bf fd290e7 Author: Linus Torvalds Date: Sun Mar 26 10:52:52 2017 -0700 Merge tag 'usb-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are a number of small USB and PHY driver fixes for 4.11-rc4. Nothing major here, just an bunch of small fixes, and a handfull of good fixes from Johan for devices with crazy descriptors. There are a few new device ids in here as well. All of these have been in linux-next with no reported issues" * tag 'usb-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held usb: gadget: udc: remove pointer dereference after free usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval usb: gadget: acm: fix endianness in notifications usb: dwc3: gadget: delay unmap of bounced requests USB: serial: qcserial: add Dell DW5811e usb: hub: Fix crash after failure to read BOS descriptor ACM gadget: fix endianness in notifications USB: usbtmc: fix probe error path USB: usbtmc: add missing endpoint sanity check USB: serial: option: add Quectel UC15, UC20, EC21, and EC25 modems usb: musb: fix possible spinlock deadlock usb: musb: dsps: fix iounmap in error and exit paths usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk uwb: i1480-dfu: fix NULL-deref at probe uwb: hwa-rc: fix NULL-deref at probe USB: wusbcore: fix NULL-deref at probe USB: uss720: fix NULL-deref at probe ... commit 42234bf8320aeedaf0bff81e38a7020582c93a6f Merge: 1c23de6 cc638a4 Author: Linus Torvalds Date: Sun Mar 26 10:34:10 2017 -0700 Merge tag 'powerpc-4.11-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc fixes from Michael Ellerman: "These are all pretty minor. The fix for idle wakeup would be a bad bug but has not been observed in practice. The update to the gcc-plugins docs was Cc'ed to Kees and Jon, Kees OK'ed it going via powerpc and I didn't hear from Jon. - cxl: Route eeh events to all slices for pci_channel_io_perm_failure state - powerpc/64s: Fix idle wakeup potential to clobber registers - Revert "powerpc/64: Disable use of radix under a hypervisor" - gcc-plugins: update architecture list in documentation Thanks to: Andrew Donnellan, Nicholas Piggin, Paul Mackerras, Vaibhav Jain" * tag 'powerpc-4.11-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: gcc-plugins: update architecture list in documentation Revert "powerpc/64: Disable use of radix under a hypervisor" powerpc/64s: Fix idle wakeup potential to clobber registers cxl: Route eeh events to all slices for pci_channel_io_perm_failure state commit 1c23de630886e423ab298bce32a71486577bda5d Merge: a643f90 d67d64f Author: Linus Torvalds Date: Sun Mar 26 10:29:21 2017 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix a memory leak on an error path, and two races when modifying inodes relating to the inline_data and metadata checksum features" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix two spelling nits ext4: lock the xattr block before checksuming it jbd2: don't leak memory if setting up journal fails ext4: mark inode dirty after converting inline directory commit 819f60fb7db169d851186d04e571e9bca27321e8 Author: Qiuxu Zhuo Date: Sat Mar 25 19:29:01 2017 +0800 EDAC, pnd2_edac: Fix reported DIMM number DIMM number passed to edac_mc_handle_error() was accidentally hardcoded to zero. Pass in the correct daddr->dimm value. Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov drivers/edac/pnd2_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac3b77a6ffff7513ff86b684aa256ea01c0e5b5 Author: Alexey Khoroshilov Date: Sat Mar 25 01:48:08 2017 +0300 irda: vlsi_ir: fix check for DMA mapping errors vlsi_alloc_ring() checks for DMA mapping errors by comparing returned address with zero, while pci_dma_mapping_error() should be used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/irda/vlsi_ir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 834a61d455ff8069552f44140b2c1de85e6bc84d Author: Arnd Bergmann Date: Fri Mar 24 23:02:50 2017 +0100 net: hns: avoid gcc-7.0.1 warning for uninitialized data hns_dsaf_set_mac_key() calls dsaf_set_field() on an uninitialized field, which will then change only a few of its bits, causing a warning with the latest gcc: hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_set_mac_uc_entry': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] (origin) &= (~(mask)); \ ^~ hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_set_mac_mc_entry': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_add_mac_mc_port': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_del_mac_entry': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_rm_mac_addr': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_del_mac_mc_port': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_get_mac_uc_entry': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_get_mac_mc_entry': hisilicon/hns/hns_dsaf_reg.h:1046:12: error: 'mac_key.low.bits.port_vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code is actually correct since we always set all 16 bits of the port_vlan field, but gcc correctly points out that the first access does contain uninitialized data. This initializes the field to zero first before setting the individual bits. Fixes: 5483bfcb169c ("net: hns: modify tcam table and set mac key") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 1 + 1 file changed, 1 insertion(+) commit a17f1861b5ea4327f9f35e9edb3c5fadceaa7c64 Author: Arnd Bergmann Date: Fri Mar 24 23:02:49 2017 +0100 net: hns: fix uninitialized data use When dev_dbg() is enabled, we print uninitialized data, as gcc-7.0.1 now points out: ethernet/hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_set_promisc_tcam': ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.low.val' may be used uninitialized in this function [-Werror=maybe-uninitialized] ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.high.val' may be used uninitialized in this function [-Werror=maybe-uninitialized] We also pass the data into hns_dsaf_tcam_mc_cfg(), which might later use it (not sure about that), so it seems safer to just always initialize the tbl_tcam_data structure. Fixes: 1f5fa2dd1cfa ("net: hns: fix for promisc mode in HNS driver") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a643f9054c21f4fae0fbb4add663462fea7a47f0 Merge: a00da40 94840e3 Author: Linus Torvalds Date: Sat Mar 25 15:36:56 2017 -0700 Merge tag 'fscrypt-for-linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypto fixes from Ted Ts'o: "A code cleanup and bugfix for fs/crypto" * tag 'fscrypt-for-linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: eliminate ->prepare_context() operation fscrypt: remove broken support for detecting keyring key revocation commit a00da40fc7a4f5000302d003dd469f132f7dfa55 Merge: 4a01fa5 a2125d0 Author: Linus Torvalds Date: Sat Mar 25 15:31:50 2017 -0700 Merge tag 'hwmon-for-linus-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - bug fixes in asus_atk0110, it87 and max31790 drivers - added missing API definition to hwmon core * tag 'hwmon-for-linus-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (asus_atk0110) fix uninitialized data access hwmon: Add missing HWMON_T_ALARM hwmon: (it87) Avoid registering the same chip on both SIO addresses hwmon: (max31790) Set correct PWM value commit 4a01fa5e7506ec5e9537fbd0fb87faa14f4bded3 Merge: 4c3de7e f6aafac Author: Linus Torvalds Date: Sat Mar 25 15:25:58 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 has been a slow -rc cycle for the RDMA subsystem. We really haven't had a lot of rc fixes come in. This pull request is the first of this entire rc cycle and it has all of the suitable fixes so far and it's still only about 20 patches. The fix for the minor breakage cause by the dma mapping patchset is in here, as well as a couple other potential oops fixes, but the rest is more minor. Summary: - fix for dma_ops change in this kernel, resolving the s390, powerpc, and IOMMU operation - a few other oops fixes - the rest are all minor fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/qib: fix false-postive maybe-uninitialized warning RDMA/iser: Fix possible mr leak on device removal event IB/device: Convert ib-comp-wq to be CPU-bound IB/cq: Don't process more than the given budget IB/rxe: increment msn only when completing a request uapi: fix rdma/mlx5-abi.h userspace compilation errors IB/core: Restore I/O MMU, s390 and powerpc support IB/rxe: Update documentation link RDMA/ocrdma: fix a type issue in ocrdma_put_pd_num() IB/rxe: double free on error RDMA/vmw_pvrdma: Activate device on ethernet link up RDMA/vmw_pvrdma: Dont hardcode QP header page RDMA/vmw_pvrdma: Cleanup unused variables infiniband: Fix alignment of mmap cookies to support VIPT caching IB/core: Protect against self-requeue of a cq work item i40iw: Receive netdev events post INET_NOTIFIER state commit 4c3de7e5bfbeb0ac1f702d1903ef69ad3a7f590c Merge: 424b689 5b52330 Author: Linus Torvalds Date: Sat Mar 25 15:13:55 2017 -0700 Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit Pull audit fix from Paul Moore: "We've got an audit fix, and unfortunately it is big. While I'm not excited that we need to be sending you something this large during the -rcX phase, it does fix some very real, and very tangled, problems relating to locking, backlog queues, and the audit daemon connection. This code has passed our testsuite without problem and it has held up to my ad-hoc stress tests (arguably better than the existing code), please consider pulling this as fix for the next v4.11-rcX tag" * 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit: audit: fix auditd/kernel connection state tracking commit d67d64f423147cf4fe8212658255e1160a4ef02c Author: Theodore Ts'o Date: Sat Mar 25 17:33:31 2017 -0400 ext4: fix two spelling nits Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 2 +- fs/ext4/move_extent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dac7a4b4b1f664934e8b713f529b629f67db313c Author: Theodore Ts'o Date: Sat Mar 25 17:22:47 2017 -0400 ext4: lock the xattr block before checksuming it We must lock the xattr block before calculating or verifying the checksum in order to avoid spurious checksum failures. https://bugzilla.kernel.org/show_bug.cgi?id=193661 Reported-by: Colin Ian King Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/xattr.c | 65 +++++++++++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 34 deletions(-) commit 424b6898c8b24f7e89d2c13a141914984ce0f886 Merge: d07c6f4 7f0b97d Author: Linus Torvalds Date: Sat Mar 25 10:34:56 2017 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of Sunxi and Rockchip clk driver fixes and a core framework one where we need to copy a string because we can't guarantee it isn't freed sometime later" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: fix recalc_rate formula of NKMP clocks clk: sunxi-ng: Fix div/mult settings for osc12M on A64 clk: rockchip: Make uartpll a child of the gpll on rk3036 clk: rockchip: add "," to mux_pll_src_apll_dpll_gpll_usb480m_p on rk3036 clk: core: Copy connection id dt-bindings: arm: update Armada CP110 system controller binding clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock clk: sunxi: ccu-sun5i needs nkmp clk: sunxi-ng: mp: Adjust parent rate for pre-dividers commit 4bdc9029685ac03be50b320b29691766d2326c2b Author: Quentin Schulz Date: Tue Mar 21 16:52:14 2017 +0100 iio: bmg160: reset chip when probing The gyroscope chip might need to be reset to be used. Without the chip being reset, the driver stopped at the first regmap_read (to get the CHIP_ID) and failed to probe. The datasheet of the gyroscope says that a minimum wait of 30ms after the reset has to be done. This patch has been checked on a BMX055 and the datasheet of the BMG160 and the BMI055 give the same reset register and bits. Signed-off-by: Quentin Schulz Cc: Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a096926ed4532eac38d4ec92aaba8c7f2149d89a Author: Enric Balletbo i Serra Date: Fri Mar 24 18:44:02 2017 +0100 iio: cros_ec_sensors: Fix return value to get raw and calibbias data. The cros_ec_sensors_read function must return the type of value on all cases. This was always true except for RAW and CALIBBIAS data which returned an error or 0. This patch just fixes the mistake I introduced when submitting the series. Fixes: commit c14dca07a31d (iio: cros_ec_sensors: add ChromeOS EC Contiguous Sensors driver) Signed-off-by: Enric Balletbo i Serra Signed-off-by: Jonathan Cameron drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5659495a7a1455665ce1466d156597ad1bda8772 Author: Naohiro Aota Date: Fri Mar 24 23:04:44 2017 -0700 uapi: add missing install of userio.h While commit 5523662edd4f ("Input: add userio module") added userio.h under the uapi/ directory, it forgot to add the header file to Kbuild. Thus, the file was missing from header installation. Signed-off-by: Naohiro Aota Reviewed-by: Lyude Paul Signed-off-by: Dmitry Torokhov include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit b1977682a3858b5584ffea7cfb7bd863f68db18d Author: Alexei Starovoitov Date: Fri Mar 24 15:57:33 2017 -0700 bpf: improve verifier packet range checks llvm can optimize the 'if (ptr > data_end)' checks to be in the order slightly different than the original C code which will confuse verifier. Like: if (ptr + 16 > data_end) return TC_ACT_SHOT; // may be followed by if (ptr + 14 > data_end) return TC_ACT_SHOT; while llvm can see that 'ptr' is valid for all 16 bytes, the verifier could not. Fix verifier logic to account for such case and add a test. Reported-by: Huapeng Zhou Fixes: 969bf05eb3ce ("bpf: direct packet access") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 +++-- tools/testing/selftests/bpf/test_verifier.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) commit 43a6684519ab0a6c52024b5e25322476cabad893 Author: Eric Dumazet Date: Fri Mar 24 19:36:13 2017 -0700 ping: implement proper locking We got a report of yet another bug in ping http://www.openwall.com/lists/oss-security/2017/03/24/6 ->disconnect() is not called with socket lock held. Fix this by acquiring ping rwlock earlier. Thanks to Daniel, Alexander and Andrey for letting us know this problem. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Signed-off-by: Eric Dumazet Reported-by: Daniel Jiang Reported-by: Solar Designer Reported-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv4/ping.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f6aafac184a3e46e919769dd4faa8bf0dc436534 Author: Arnd Bergmann Date: Tue Mar 14 13:18:45 2017 +0100 IB/qib: fix false-postive maybe-uninitialized warning aarch64-linux-gcc-7 complains about code it doesn't fully understand: drivers/infiniband/hw/qib/qib_iba7322.c: In function 'qib_7322_txchk_change': include/asm-generic/bitops/non-atomic.h:105:35: error: 'shadow' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code is right, and despite trying hard, I could not come up with a version that I liked better than just adding a fake initialization here to shut up the warning. Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") Signed-off-by: Arnd Bergmann Acked-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea174c9573b0e0c8bc1a7a90fe9360ccb7aa9cbb Author: Sagi Grimberg Date: Mon Feb 27 20:16:33 2017 +0200 RDMA/iser: Fix possible mr leak on device removal event When the rdma device is removed, we must cleanup all the rdma resources within the DEVICE_REMOVAL event handler to let the device teardown gracefully. When this happens with live I/O, some memory regions are occupied. Thus, track them too and dereg all the mr's. We are safe with mr access by iscsi_iser_cleanup_task. Reported-by: Raju Rangoju Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Max Gurtovoy Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.h | 2 ++ drivers/infiniband/ulp/iser/iser_verbs.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 13a8cd191a2b470cfd435b3b57dbd21aa65ff78c Author: Alexander Duyck Date: Fri Mar 24 15:01:42 2017 -0700 i40e: Do not enable NAPI on q_vectors that have no rings When testing the epoll w/ busy poll code I found that I could get into a state where the i40e driver had q_vectors w/ active NAPI that had no rings. This was resulting in a divide by zero error. To correct it I am updating the driver code so that we only support NAPI on q_vectors that have 1 or more rings allocated to them. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 28ee1b746f493b7c62347d714f58fbf4f70df4f0 Author: Florian Westphal Date: Fri Mar 24 19:42:37 2017 +0100 secure_seq: downgrade to per-host timestamp offsets Unfortunately too many devices (not under our control) use tcp_tw_recycle=1, which depends on timestamps being identical of the same saddr. Although tcp_tw_recycle got removed in net-next we can't make such end hosts disappear so downgrade to per-host timestamp offsets. Cc: Soheil Hassas Yeganeh Cc: Eric Dumazet Cc: Neal Cardwell Cc: Yuchung Cheng Reported-by: Yvan Vanrossomme Fixes: 95a22caee396c ("tcp: randomize tcp timestamp offsets for each connection") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/secure_seq.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit b7363e67b23e04c23c2a99437feefac7292a88bc Author: Sagi Grimberg Date: Wed Mar 8 22:03:17 2017 +0200 IB/device: Convert ib-comp-wq to be CPU-bound This workqueue is used by our storage target mode ULPs via the new CQ API. Recent observations when working with very high-end flash storage devices reveal that UNBOUND workqueue threads can migrate between cpu cores and even numa nodes (although some numa locality is accounted for). While this attribute can be useful in some workloads, it does not fit in very nicely with the normal run-to-completion model we usually use in our target-mode ULPs and the block-mq irq<->cpu affinity facilities. The whole block-mq concept is that the completion will land on the same cpu where the submission was performed. The fact that our submitter thread is migrating cpus can break this locality. We assume that as a target mode ULP, we will serve multiple initiators/clients and we can spread the load enough without having to use unbound kworkers. Also, while we're at it, expose this workqueue via sysfs which is harmless and can be useful for debug. Signed-off-by: Sagi Grimberg Reviewed-by: Bart Van Assche -- Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fedd9e1f75828992ace5833379116f38c66ad7bb Author: Sagi Grimberg Date: Thu Mar 16 18:57:00 2017 +0200 IB/cq: Don't process more than the given budget The caller might not want this overhead. Reviewed-by: Bart Van Assche Reviewed-by: Leon Romanovsky Signed-off-by: Sagi Grimberg Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9fcd67d1772c43d2f23e8fca56acc7219e991676 Author: David Marchand Date: Fri Feb 24 15:38:26 2017 +0100 IB/rxe: increment msn only when completing a request According to C9-147, MSN should only be incremented when the last packet of a multi packet request has been received. "Logically, the requester associates a sequential Send Sequence Number (SSN) with each WQE posted to the send queue. The SSN bears a one- to-one relationship to the MSN returned by the responder in each re- sponse packet. Therefore, when the requester receives a response, it in- terprets the MSN as representing the SSN of the most recent request completed by the responder to determine which send WQE(s) can be completed." Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: David Marchand Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 812755d69efcf7c12fded57983d456647a0bbadd Author: Dmitry V. Levin Date: Fri Feb 24 03:28:13 2017 +0300 uapi: fix rdma/mlx5-abi.h userspace compilation errors Consistently use types from linux/types.h to fix the following rdma/mlx5-abi.h userspace compilation errors: /usr/include/rdma/mlx5-abi.h:69:25: error: 'u64' undeclared here (not in a function) MLX5_LIB_CAP_4K_UAR = (u64)1 << 0, /usr/include/rdma/mlx5-abi.h:69:29: error: expected ',' or '}' before numeric constant MLX5_LIB_CAP_4K_UAR = (u64)1 << 0, Include to fix the following rdma/mlx5-abi.h userspace compilation error: /usr/include/rdma/mlx5-abi.h:286:12: error: 'ETH_ALEN' undeclared here (not in a function) __u8 dmac[ETH_ALEN]; Signed-off-by: Dmitry V. Levin Signed-off-by: Doug Ledford include/uapi/rdma/mlx5-abi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0957c29f78af7d890c4ac506eda8f76bfc5a137a Author: Bart Van Assche Date: Tue Mar 7 22:56:53 2017 +0000 IB/core: Restore I/O MMU, s390 and powerpc support Avoid that the following error message is reported on the console while loading an RDMA driver with I/O MMU support enabled: DMAR: Allocating domain for mlx5_0 failed Ensure that DMA mapping operations that use to_pci_dev() to access to struct pci_dev see the correct PCI device. E.g. the s390 and powerpc DMA mapping operations use to_pci_dev() even with I/O MMU support disabled. This patch preserves the following changes of the DMA mapping updates patch series: - Introduction of dma_virt_ops. - Removal of ib_device.dma_ops. - Removal of struct ib_dma_mapping_ops. - Removal of an if-statement from each ib_dma_*() operation. - IB HW drivers no longer set dma_device directly. Reported-by: Sebastian Ott Reported-by: Parav Pandit Fixes: commit 99db9494035f ("IB/core: Remove ib_device.dma_device") Signed-off-by: Bart Van Assche Reviewed-by: parav@mellanox.com Tested-by: parav@mellanox.com Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 26 ++++++++++++++++++++------ include/rdma/ib_verbs.h | 30 +++++++++++++++++------------- 2 files changed, 37 insertions(+), 19 deletions(-) commit a1c5dd13228a1f9e5087375f9702422dfc2adbf1 Author: Leon Romanovsky Date: Tue Feb 28 21:42:53 2017 +0200 IB/rxe: Update documentation link All Soft-RoCE (rxe) is handled now in rdma-core user space library, so the documentation. The patch below updates the documentation link to that new location. Reported-by: Josh Beavers Signed-off-by: Leon Romanovsky Reviewed-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 004d18ea99b0f3b7b3d5790e4dc5ca7d5238706d Author: Dan Carpenter Date: Thu Feb 23 13:40:16 2017 +0300 RDMA/ocrdma: fix a type issue in ocrdma_put_pd_num() We want to return zero on success or negative error codes. The type should be int and not u8. Signed-off-by: Dan Carpenter Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ded260235308f340b979258a4c736e06ba12c747 Author: Dan Carpenter Date: Wed Mar 8 08:21:52 2017 +0300 IB/rxe: double free on error "goto err;" has it's own kfree_skb() call so it's a double free. We only need to free on the "goto exit;" path. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b172679b0d3b93a6197b2ff892794e7178e3c448 Author: Aditya Sarwade Date: Wed Feb 22 17:22:58 2017 -0800 RDMA/vmw_pvrdma: Activate device on ethernet link up Restore device state when ethernet link changes to active. Acked-by: George Zhang Acked-by: Jorgen Hansen Acked-by: Bryan Tan Signed-off-by: Aditya Sarwade Signed-off-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit e51c2fb0331cb3440d7dc83ee78019ee8c7bb366 Author: Adit Ranadive Date: Wed Feb 22 17:22:57 2017 -0800 RDMA/vmw_pvrdma: Dont hardcode QP header page Moved the header page count to a macro. Reported-by: Yuval Shaia Signed-off-by: Adit Ranadive Reviewed-by: Aditya Sarwade Tested-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 1 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 6332dee83d8eab80d6d502cc51135b998fe6df79 Author: Adit Ranadive Date: Wed Feb 22 17:22:56 2017 -0800 RDMA/vmw_pvrdma: Cleanup unused variables Removed the unused nreq and redundant index variables. Moved hardcoded async and cq ring pages number to macro. Reported-by: Yuval Shaia Signed-off-by: Adit Ranadive Reviewed-by: Aditya Sarwade Tested-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 2 ++ drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 4 ++-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 33 ++++++++++---------------- 3 files changed, 17 insertions(+), 22 deletions(-) commit 95f255211396958c718aef8c45e3923b5211ea7b Author: Alexander Duyck Date: Fri Mar 24 09:38:03 2017 -0700 net: Do not allow negative values for busy_read and busy_poll sysctl interfaces This change basically codifies what I think was already the limitations on the busy_poll and busy_read sysctl interfaces. We weren't checking the lower bounds and as such could input negative values. The behavior when that was used was dependent on the architecture. In order to prevent any issues with that I am just disabling support for values less than 0 since this way we don't have to worry about any odd behaviors. By limiting the sysctl values this way it also makes it consistent with how we handle the SO_BUSY_POLL socket option since the value appears to be reported as a signed integer value and negative values are rejected. Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sysctl_net_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit abbbdf12497d36b001e0865bc5bc6cc363f3a5e1 Author: Ratna Manoj Bolla Date: Fri Mar 24 14:08:29 2017 -0400 nbd: replace kill_bdev() with __invalidate_device() When a filesystem is mounted on a nbd device and on a disconnect, because of kill_bdev(), and resetting bdev size to zero, buffer_head mappings are getting destroyed under mounted filesystem. After a bdev size reset(i.e bdev->bd_inode->i_size = 0) on a disconnect, followed by a sys_umount(), generic_shutdown_super()->... ->__sync_blockdev()->... -blkdev_writepages()->... ->do_invalidatepage()->... -discard_buffer() is discarding superblock buffer_head assumed to be in mapped state by ext4_commit_super(). [mlin: ported to 4.11-rc2] Signed-off-by: Ratna Manoj Bolla Signed-off-by: Jens Axboe drivers/block/nbd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f8586855031a1d6b243f013c3082631346fddfad Author: Josef Bacik Date: Fri Mar 24 14:08:28 2017 -0400 nbd: set queue timeout properly We can't just set the timeout on the tagset, we have to set it on the queue as it would have been setup already at this point. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c103b4dac8f69ca55196afcd57c4cdd6d3ab88eb Author: Josef Bacik Date: Fri Mar 24 14:08:27 2017 -0400 nbd: set rq->errors to actual error code We've been relying on the block layer to assume rq->errors being set translates into -EIO. I noticed in testing that sometimes this isn't true, and really there's not much of a reason to have a counter instead of just using -EIO. So set it properly so we don't leak random numbers to unsuspecting victims. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9dd5d3ab49f74e1a3fab92c432a7600bd9081ccc Author: Josef Bacik Date: Fri Mar 24 14:08:26 2017 -0400 nbd: handle ERESTARTSYS properly We can submit IO in a processes context, which means there can be pending signals. This isn't a fatal error for NBD, but it does require some finesse. If the signal happens before we transmit anything then we are ok, just requeue the request and carry on. However if we've done a partial transmit we can't allow anything else to be transmitted on this socket until we transmit the remaining part of the request. Deal with this by keeping track of how much we've sent for the current request, and if we get an ERESTARTSYS during any part of our transmission save the state of that request and requeue the IO. If anybody tries to submit a request that isn't our pending request then requeue that request until we are able to service the one that is pending. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 115 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 26 deletions(-) commit 93efe9817e651607d83e5f100076ae62d0ce0b93 Author: Jens Axboe Date: Fri Mar 24 12:04:19 2017 -0600 blk-mq: include errors in did_work calculation Currently we return true in blk_mq_dispatch_rq_list() if we queued IO successfully, but we really want to return whether or not the we made progress. Progress includes if we got an error return. If we don't, this can lead to a hang in blk_mq_sched_dispatch_requests() when a driver is draining IO by returning BLK_MQ_QUEUE_ERROR instead of manually ending the IO in error and return BLK_MQ_QUEUE_OK. Tested-by: Josef Bacik Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d07c6f46c441c32c55076a45479530707170c55c Merge: 04e904a 65b1ade Author: Linus Torvalds Date: Fri Mar 24 14:39:36 2017 -0700 Merge tag 'vfio-v4.11-rc4' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "Rework sanity check for mdev driver group notifier de-registration (Alex Williamson)" * tag 'vfio-v4.11-rc4' of git://github.com/awilliam/linux-vfio: vfio: Rework group release notifier warning commit 04e904aa79ccdeede66d58e72e4c5402e4b9bd70 Merge: 59d9cb9 95a4960 Author: Linus Torvalds Date: Fri Mar 24 14:37:12 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes for the current series that should go into -rc4. This contains: - a fix for a potential corruption of un-started requests from Ming. - a blk-stat fix from Omar, ensuring we flush the stat batch before checking nr_samples. - a set of fixes from Sagi for the nvmeof family" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: don't complete un-started request in timeout handler nvme-loop: handle cpu unplug when re-establishing the controller nvme-rdma: handle cpu unplug when re-establishing the controller nvmet-rdma: Fix a possible uninitialized variable dereference nvmet: confirm sq percpu has scheduled and switched to atomic nvme-loop: fix a possible use-after-free when destroying the admin queue blk-stat: fix blk_stat_sum() if all samples are batched commit 59d9cb91d07236b5255a3b1999f6f2d9985b3657 Merge: 2056b7c 633ee407 Author: Linus Torvalds Date: Fri Mar 24 14:35:39 2017 -0700 Merge tag 'ceph-for-4.11-rc4' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a writeback deadlock caused by a GFP_KERNEL allocation on the reclaim path, tagged for stable" * tag 'ceph-for-4.11-rc4' of git://github.com/ceph/ceph-client: libceph: force GFP_NOIO for socket allocations commit 2056b7c7df94d9c3e81bcee7430fe2417158e455 Merge: 42ea16f 0fa974b Author: Linus Torvalds Date: Fri Mar 24 14:32:21 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: - a couple of OMAP 4.11 regression fixes, including a boot regression for SmartReflex, hypervisor mode in thumb2 mode, and reference counting of device nodes - a fix for cpu_idle on at91 - minor DT fixes on across several platforms: sunxi, bcm53xx, at91, nsp, ns2, ux500, omap - a fix to correct an API change in the reset controllers * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits) arm64: dts: NS2: Add dma-coherent to relevant DT entries reset: fix optional reset_control_get stubs to return NULL ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings ARM: dts: NSP: GPIO reboot open-source ARM: at91: pm: cpu_idle: switch DDR to power-down mode ARM: dts: add the AB8500 clocks to the device tree ARM: dts: imx6sx-udoo-neo: Fix reboot hang ARM: sun8i: Fix the mali clock rate ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags ARM: dts: BCM5301X: Fix memory start address ARM: dts: BCM5301X: Fix UARTs on bcm953012k Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node" ARM: OMAP2+: Release device node after it is no longer needed. ARM: OMAP2+: Fix device node reference counts ARM: OMAP2+: Remove legacy gpmc-nand.c ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure ARM: dts: am335x-pcm953: Fix legacy wakeup source binding ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI ... commit 42ea16f815e7adb155557eb3017510e635edbcfe Merge: 69917da 1914f0c Author: Linus Torvalds Date: Fri Mar 24 14:29:23 2017 -0700 Merge tag 'for-linus-4.11b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Fixes for PM under Xen" * tag 'for-linus-4.11b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/acpi: upload PM state from init-domain to Xen xen/acpi: Replace hard coded "ACPI0007" commit 69917da73a4fa03b2c13fde976ba1aad950d9181 Merge: e8fe23f afd0e5a Author: Linus Torvalds Date: Fri Mar 24 14:21:09 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "There's a kaslr fix and then two patches to update our native and compat syscall tables. Arnd asked that we take the addition of statx to the asm-generic unistd.h via arm64, as he didn't have anything queued in the asm-generic tree. Summary: - Fix mapping of kernel image under certain kaslr offsets - Hook up new statx syscall in asm-generic syscall table - Update compat syscall table to match arch/arm/ (pkeys and statx)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kaslr: Fix up the kernel image alignment arm64: compat: Update compat syscalls generic syscalls: Wire up statx syscall commit e8fe23ffc9bb43cbaade86dfb0701fb35b785d06 Merge: 213e4eb 8c75704 Author: Linus Torvalds Date: Fri Mar 24 14:11:36 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes regressions in the crypto ccp driver and the hwrng drivers for amd and geode" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: geode - Revert managed API changes hwrng: amd - Revert managed API changes crypto: ccp - Assign DMA commands to the channel's CCP commit cb8864559631754ac93d5734b165ccd0cad4728c Author: Jason Gunthorpe Date: Fri Mar 10 11:34:20 2017 -0700 infiniband: Fix alignment of mmap cookies to support VIPT caching When vmalloc_user is used to create memory that is supposed to be mmap'd to user space, it is necessary for the mmap cookie (eg the offset) to be aligned to SHMLBA. This creates a situation where all virtual mappings of the same physical page share the same virtual cache index and guarantees VIPT coherence. Otherwise the cache is non-coherent and the kernel will not see writes by userspace when reading the shared page (or vice-versa). Reported-by: Josh Beavers Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mmap.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_mmap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9f47a48e6eb97d793db85373e3ef4c55d876d334 Author: Jeff Kirsher Date: Thu Mar 23 20:47:15 2017 -0700 Revert "e1000e: driver trying to free already-free irq" This reverts commit 7e54d9d063fa239c95c21548c5267f0ef419ff56. After additional regression testing, several users are experiencing kernel panics during shutdown on e1000e devices. Reverting this change resolves the issue. Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 213e4eb2da7e4fa716560b20752b05b80b5b0da9 Merge: 9a31328 11cd338 Author: Linus Torvalds Date: Fri Mar 24 13:42:17 2017 -0700 Merge tag 'iommu-fixes-v4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "A few fixes piled up: - fix a NULL-ptr dereference that happens in VT-d on some platforms - a fix for ARM MSI region reporting, so that a sane interface makes it to a released kernel - fixes for leaf-checking in ARM io-page-table code - two fixes for IO/TLB flushing code on ARM Exynos platforms" * tag 'iommu-fixes-v4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Disambiguate MSI region types iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5 iommu/exynos: Block SYSMMU while invalidating FLPD cache iommu/vt-d: Fix NULL pointer dereference in device_to_iommu iommu/io-pgtable-arm-v7s: Check for leaf entry before dereferencing it iommu/io-pgtable-arm: Check for leaf entry before dereferencing it commit 86f46aba8d1ac3ed0904542158a9b9cb9c7a143c Author: Sagi Grimberg Date: Wed Mar 8 22:00:52 2017 +0200 IB/core: Protect against self-requeue of a cq work item We need to make sure that the cq work item does not run when we are destroying the cq. Unlike flush_work, cancel_work_sync protects against self-requeue of the work item (which we can do in ib_cq_poll_work). Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche -- Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a31328f310d6281a8afbcf9e15832aef8e0695e Merge: e887118 027fb89 Author: Linus Torvalds Date: Fri Mar 24 13:37:40 2017 -0700 Merge tag 'mmc-v4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull mmc fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.11 rc4. MMC core: - Fix initialization of HS400-ES eMMC cards - A couple of fixes for the mmc block device driver - Resolved a compiler warning MMC host: - sdhci: Do not disable IRQs while waiting for clock - sdhci-pci: Do not disable IRQs in sdhci_intel_set_power - sdhci-of-arasan: Fix incorrect timeout clock - mediatek: Fix bug for setting wrong clock frequency - sdhci-of-at91: Use regulator to fix cmd timeout errors - ushc: Fix NULL-deref at probe - rockchip-dw-mshc: Rename RK1108 to RV1108 in DT" * tag 'mmc-v4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci: Do not disable interrupts in sdhci_intel_set_power mmc: sdhci: Do not disable interrupts while waiting for clock mmc: ushc: fix NULL-deref at probe mmc: sdhci-of-at91: Support external regulators mmc: core: mmc_blk_rw_cmd_err - remove unused variable mmc: mediatek: Fixed bug where clock frequency could be set wrong mmc: block: Fix cmd error reset failure path mmc: block: Fix is_waiting_last_req set incorrectly mmc: core: Fix access to HS400-ES devices mmc: sdhci-of-arasan: fix incorrect timeout clock dt-bindings: rockchip-dw-mshc: rename RK1108 to RV1108 commit ae9955aeb8e47c4f60a02add47acf9850ca0ead7 Author: Alexey Brodkin Date: Thu Mar 23 20:34:45 2017 +0300 ARC: vdk: Fix support of UIO MotherBoard section has its "ranges" set to 0xE000_0000-0xF000_0000. But UIO node maps 4 different areas in different memory locations and all outside MB's ranges. That obviously breaks UIO mappings in runtime. Cc: Ruud Derwig Cc: stable@vger.kernel.org Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit e88711860dee6ce0dba459abf6be446ccfc64443 Merge: 86b7eab 24a47426 Author: Linus Torvalds Date: Fri Mar 24 13:34:16 2017 -0700 Merge tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - dvb-usb-firmware: don't do DMA on stack - coda/imx-vdoa: platform_driver should not be const - bdisp: Clean up file handle in open() error path - exynos-gsc: Do not swap cb/cr for semi planar formats * tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] exynos-gsc: Do not swap cb/cr for semi planar formats [media] bdisp: Clean up file handle in open() error path [media] coda/imx-vdoa: platform_driver should not be const [media] dvb-usb-firmware: don't do DMA on stack commit 871a8623d3b40221ad1103aff715dfee0aa4dacf Author: Shiraz Saleem Date: Fri Mar 17 18:30:07 2017 -0500 i40iw: Receive netdev events post INET_NOTIFIER state Netdev notification events are de-registered only when all client iwdev instances are removed. If a single client is closed and re-opened, netdev events could arrive even before the Control Queue-Pair (CQP) is created, causing a NULL pointer dereference crash in i40iw_get_cqp_request. Fix this by allowing netdev event notification only after we have reached the INET_NOTIFIER state with respect to device initialization. Reported-by: Stefan Assmann Signed-off-by: Shiraz Saleem Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 86b7eab29dbe27acd5b67a7f110e244a0c3f4b96 Merge: ebe6482 d64a047 Author: Linus Torvalds Date: Fri Mar 24 13:15:52 2017 -0700 Merge tag 'drm-fixes-for-v4.11-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: - one core drm/fbdev regression fix - a set of i915 fixes including a few GVT related fixes, along with some reset fixes - one new PCI id for amdgpu, and some minor workaround regression fixes - .. and a set of exynos fixes, dropping support for an old unsupported SoC, some vblank timing fixes, and an info leak fix * tag 'drm-fixes-for-v4.11-rc4' of git://people.freedesktop.org/~airlied/linux: (34 commits) drm/fb-helper: Allow var->x/yres(_virtual) < fb->width/height again drm/i915: make context status notifier head be per engine drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) drm/exynos/dsi: make te-gpios optional drm/exynos: Print kernel pointers in a restricted form drm/exynos/decon5433: fix software trigger mask drm/exynos/fimd: signal frame done interrupt at front porch drm/exynos/decon5433: signal frame done interrupt at front porch drm/exynos/decon5433: fix vblank event handling drm/exynos: move crtc event handling to drivers callbacks drm/exynos: Remove support for Exynos4415 (SoC not supported anymore) drm/exynos/decon5433: & vs | typo drm/amd/amdgpu: add POLARIS12 PCI ID drm/i915/gvt: Fix gvt scheduler interval time drm/i915/gvt: GVT pin/unpin shadow context drm/i915/gvt: scan shadow indirect context image when valid drm/i915/kvmgt: fix suspicious rcu dereference usage drm/i915/gvt: add enable_execlists check before enable gvt drm/i915/gvt: Remove bogus retry around i915_wait_request drm/i915/gvt: correct the ggtt valid bit check in pipe control command ... commit a80db69e47d764bbcaf2fec54b1f308925e7c490 Author: WANG Cong Date: Thu Mar 23 11:03:31 2017 -0700 kcm: return immediately after copy_from_user() failure There is no reason to continue after a copy_from_user() failure. Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Cc: Tom Herbert Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/kcm/kcmsock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a5af83925363eb85d467933e3d6ec5a87001eb7c Author: Arnd Bergmann Date: Thu Mar 23 17:07:26 2017 +0100 bna: avoid writing uninitialized data into hw registers The latest gcc-7 snapshot warns about bfa_ioc_send_enable/bfa_ioc_send_disable writing undefined values into the hardware registers: drivers/net/ethernet/brocade/bna/bfa_ioc.c: In function 'bfa_iocpf_sm_disabling_entry': arch/arm/include/asm/io.h:109:22: error: '*((void *)&disable_req+4)' is used uninitialized in this function [-Werror=uninitialized] arch/arm/include/asm/io.h:109:22: error: '*((void *)&disable_req+8)' is used uninitialized in this function [-Werror=uninitialized] The two functions look like they should do the same thing, but only one of them initializes the time stamp and clscode field. The fact that we only get a warning for one of the two functions seems to be arbitrary, based on the inlining decisions in the compiler. To address this, I'm making both functions do the same thing: - set the clscode from the ioc structure in both - set the time stamp from ktime_get_real_seconds (which also avoids the signed-integer overflow in 2038 and extends the well-defined behavior until 2106). - zero-fill the reserved field Fixes: 8b230ed8ec96 ("bna: Brocade 10Gb Ethernet device driver") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bfa_ioc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 1f3466a0538cde69b03f2aba13e6da72208e56cd Merge: 031b8c6 90b14dc Author: David S. Miller Date: Fri Mar 24 12:40:00 2017 -0700 Merge branch 's390-net' Ursula Braun says: ==================== s390/qeth patches for net here are 2 s390/qeth patches built for net fixing a problem with AF_IUCV traffic through HiperSockets. And we come up with an update for the MAINTAINERS file to establish Julian as Co-Maintainer for drivers/s390/net and net/iucv. ==================== Signed-off-by: David S. Miller commit 90b14dc731b1b4aac8ba01850b530bf7ba26462f Author: Ursula Braun Date: Thu Mar 23 14:55:10 2017 +0100 MAINTAINERS: add Julian Wiedmann Add Julian Wiedmann as additional maintainer for drivers/s390/net and net/iucv. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit acd9776b5c45ef02d1a210969a6fcc058afb76e3 Author: Julian Wiedmann Date: Thu Mar 23 14:55:09 2017 +0100 s390/qeth: no ETH header for outbound AF_IUCV With AF_IUCV traffic, the skb passed to hard_start_xmit() has a 14 byte slot at skb->data, intended for an ETH header. qeth_l3_fill_af_iucv_hdr() fills this ETH header... and then immediately moves it to the skb's headroom, where it disappears and is never seen again. But it's still possible for us to return NETDEV_TX_BUSY after the skb has been modified. Since we didn't get a private copy of the skb, the next time the skb is delivered to hard_start_xmit() it no longer has the expected layout (we moved the ETH header to the headroom, so skb->data now starts at the IUCV_TRANS header). So when qeth_l3_fill_af_iucv_hdr() does another round of rebuilding, the resulting qeth header ends up all wrong. On transmission, the buffer is then rejected by the HiperSockets device with SBALF15 = x'04'. When this error is passed back to af_iucv as TX_NOTIFY_UNREACHABLE, it tears down the offending socket. As the ETH header for AF_IUCV serves no purpose, just align the code to what we do for IP traffic on L3 HiperSockets: keep the ETH header at skb->data, and pass down data_offset = ETH_HLEN to qeth_fill_buffer(). When mapping the payload into the SBAL elements, the ETH header is then stripped off. This avoids the skb manipulations in qeth_l3_fill_af_iucv_hdr(), and any buffer re-entering hard_start_xmit() after NETDEV_TX_BUSY is now processed properly. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 7d969d2e8890f546c8cec634b3aa5f57d4eef883 Author: Julian Wiedmann Date: Thu Mar 23 14:55:08 2017 +0100 s390/qeth: size calculation outbound buffers Depending on the device type, hard_start_xmit() builds different output buffer formats. For instance with HiperSockets, on both L2 and L3 we strip the ETH header from the skb - L3 doesn't need it, and L2 carries it in the buffer's header element. For this, we pass data_offset = ETH_HLEN all the way down to __qeth_fill_buffer(), where skb->data is then adjusted accordingly. But the initial size calculation still considers the *full* skb length (including the ETH header). So qeth_get_elements_no() can erroneously reject a skb as too big, even though it would actually fit into an output buffer once the ETH header has been trimmed off later. Fix this by passing an additional offset to qeth_get_elements_no(), that indicates where in the skb the on-wire data actually begins. Since the current code uses data_offset=-1 for some special handling on OSA, we need to clamp data_offset to 0... On HiperSockets this helps when sending ~MTU-size skbs with weird page alignment. No change for OSA or AF_IUCV. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 ++- drivers/s390/net/qeth_core_main.c | 5 +++-- drivers/s390/net/qeth_l2_main.c | 5 +++-- drivers/s390/net/qeth_l3_main.c | 5 +++-- 4 files changed, 11 insertions(+), 7 deletions(-) commit 031b8c6d1d1c9555ebb4d14fe07fef45ef804947 Merge: 2f25abe 5d73bb8 Author: David S. Miller Date: Fri Mar 24 12:32:20 2017 -0700 Merge branch 'aquantia-fixes' Pavel Belous says: ==================== net:ethernet:aquantia: Misc fixes for atlantic driver. The following patchset containg several fixes for aQuantia AQtion driver for net tree: A couple fixes for IPv6 and other fixes. v1->v2: Fix compilation error (using HW_ATL_A0_TXD_CTL_CMD_IPV6 instead HW_ATL_B0_TXD_CTL_CMD_IPV6). v2->v3: Added "Fixes" tags. ==================== Signed-off-by: David S. Miller commit 5d73bb863c2ef3aa1a28b5885c85ede7307df8ea Author: Pavel Belous Date: Thu Mar 23 14:19:45 2017 +0300 net:ethernet:aquantia: Reset is_gso flag when EOP reached. We need to reset is_gso flag when EOP reached (entire LSO packet processed). Fixes: bab6de8fd180 ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions.") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 1 + drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 1 + 2 files changed, 2 insertions(+) commit 386aff88e32ec3f82e3f032217bad0c8c8846349 Author: Pavel Belous Date: Thu Mar 23 14:19:44 2017 +0300 net:ethernet:aquantia: Fix for LSO with IPv6. Fix Context Command bit: L3 type = "0" for IPv4, "1" for IPv6. Fixes: bab6de8fd180 ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions.") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +++ drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 3 ++- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 3 +++ drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) commit 9f0dd8c322e89f137c44b437d6fbecc9dea12204 Author: Pavel Belous Date: Thu Mar 23 14:19:43 2017 +0300 net:ethernet:aquantia: Missing spinlock initialization. Fix for missing initialization aq_ring header.lock spinlock. Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 1 + 1 file changed, 1 insertion(+) commit ea0504f554c8f989eab58549300d15582d36f039 Author: Pavel Belous Date: Thu Mar 23 14:19:42 2017 +0300 net:ethernet:aquantia: Fix packet type detection (TCP/UDP) for IPv6. In order for the checksum offloads to work correctly we need to set the packet type bit (TCP/UDP) in the TX context buffer. Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Pavel Belous Tested-by: David Arcari Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 1adbddef118ae8bf6409c13208645d28c29731c1 Author: Pavel Belous Date: Thu Mar 23 14:19:41 2017 +0300 net:ethernet:aquantia: Remove adapter re-opening when MTU changed. Closing/opening the adapter is not needed at all. The new MTU settings take effect immediately. Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 5 ----- 1 file changed, 5 deletions(-) commit 2f25abe6bac573928a990ccbdac75873add8127e Author: hayeswang Date: Thu Mar 23 19:14:19 2017 +0800 r8152: prevent the driver from transmitting packets with carrier off The linking status may be changed when autosuspend. And, after autoresume, the driver may try to transmit packets when the device is carrier off, because the interrupt transfer doesn't update the linking status, yet. And, if the device is in ALDPS mode, the device would stop working. The another similar case is 1. unplug the cable. 2. interrupt transfer queue a work_queue for linking change. 3. device enters the ALDPS mode. 4. a tx occurs before the work_queue is called. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 49d52e8108a21749dc2114b924c907db43358984 Author: Nathan Sullivan Date: Wed Mar 22 15:27:01 2017 -0500 net: phy: handle state correctly in phy_stop_machine If the PHY is halted on stop, then do not set the state to PHY_UP. This ensures the phy will be restarted later in phy_start when the machine is started again. Fixes: 00db8189d984 ("This patch adds a PHY Abstraction Layer to the Linux Kernel, enabling ethernet drivers to remain as ignorant as is reasonable of the connected PHY's design and operation details.") Signed-off-by: Nathan Sullivan Signed-off-by: Brad Mouring Acked-by: Xander Huff Acked-by: Kyle Roeschley Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 971edb0a0087b65bd3726d23b2dffff405d48f72 Author: Lucas Stach Date: Thu Mar 23 15:05:26 2017 +0100 ASoC: simple-card: fix simple_dai clk lookup The clock needs to be stored in the simple_dai structure, so it can be enabled later on. This has been broken during the conversion to use devm_* functions for the clk lookup. Fixes: e984fd61e860 (ASoC: simple-card: use devm_get_clk_from_child()) Signed-off-by: Lucas Stach Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 1 + 1 file changed, 1 insertion(+) commit 3c9d3f1bc2defd418b5933bbc928096c9c686d3b Author: Arnaud Pouliquen Date: Thu Mar 23 19:39:54 2017 +0100 ASoC: STI: Fix reader substream pointer set reader->substream is used in IRQ handler for error case but is never set. Set value to pcm substream on DAI startup and clean it on dai shutdown. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/sti/uniperif_reader.c | 3 +++ 1 file changed, 3 insertions(+) commit 0fa974b8b6106e053595e5481ef6fdbf5c60b457 Merge: bf3f530 f0c0cb9 Author: Arnd Bergmann Date: Fri Mar 24 17:51:50 2017 +0100 Merge tag 'arm-soc/for-4.11/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux into fixes Pull "Broadcom arm64 Device Tree fixes for 4.11" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoCs Device Tree fixes for 4.11, please pull the following: - Jon adds missing "dma-coherent" property to the Northstar 2 DTS include file in order to fix both performance and cache problems for: PCIe, Ethernet, PDC/mailbox, SATA3 and SDHCI * tag 'arm-soc/for-4.11/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux: arm64: dts: NS2: Add dma-coherent to relevant DT entries commit bf3f53089c2f51d8907398051f9a7dcf2788c4b5 Merge: 6479ca8 acfa28b Author: Arnd Bergmann Date: Fri Mar 24 17:49:40 2017 +0100 Merge tag 'arm-soc/for-4.11/devicetree-fixes-2' of http://github.com/Broadcom/stblinux into fixes Pull "Broadcom arm Device Tree fixes for 4.11 (part 2)" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 4.11, please pull the following: - Jon fixes a reboot issue on most Northstar Plus platforms by adding the "open-source" property to the "gpio-restart" Device Tree nodes * tag 'arm-soc/for-4.11/devicetree-fixes-2' of http://github.com/Broadcom/stblinux: ARM: dts: NSP: GPIO reboot open-source commit 2d7d54002e396c180db0c800c1046f0a3c471597 Author: Takashi Iwai Date: Fri Mar 24 17:07:57 2017 +0100 ALSA: seq: Fix race during FIFO resize When a new event is queued while processing to resize the FIFO in snd_seq_fifo_clear(), it may lead to a use-after-free, as the old pool that is being queued gets removed. For avoiding this race, we need to close the pool to be deleted and sync its usage before actually deleting it. The issue was spotted by syzkaller. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_fifo.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4d339989acd730f17bc814b5ddb9c54e405766b6 Author: Liad Kaufman Date: Tue Mar 21 17:13:16 2017 +0200 iwlwifi: mvm: support ibss in dqa mode Allow working IBSS also when working in DQA mode. This is done by setting it to treat the queues the same as a BSS AP treats the queues. Fixes: 7948b87308a4 ("iwlwifi: mvm: enable dynamic queue allocation mode") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 ++++++--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) commit 251fe09f13bfb54c1ede66ee8bf8ddd0061c4f7c Author: Dan Carpenter Date: Thu Mar 23 13:40:00 2017 +0300 iwlwifi: mvm: writing zero bytes to debugfs causes a crash This is a static analysis fix. The warning is: drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c:912 iwl_mvm_fw_dbg_collect() warn: integer overflows 'sizeof(*desc) + len' I guess this code is supposed to take a NUL character, but if we write zero bytes then it tries to write -1 characters and crashes. Fixes: c91b865cb14d ("iwlwifi: mvm: support description for user triggered fw dbg collection") Signed-off-by: Dan Carpenter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit a95600294157ca7527ee7c70249fb53e09d8c566 Author: Sara Sharon Date: Thu Jan 26 14:43:32 2017 +0200 iwlwifi: mvm: fix accessing fw_id_to_mac_id Access should be by rcu_dereference. Issue was found by sparse. Fixes: 65e254821cee ("iwlwifi: mvm: use firmware station PM notification for AP_LINK_PS") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9257821c5a1dc57ef3a37f7cbcebaf548395c964 Author: Peter Stein Date: Fri Feb 17 00:00:50 2017 -0800 HID: xinmo: fix for out of range for THT 2P arcade controller. There is a new clone of the XIN MO arcade controller which has same issue with out of range like the original. This fix will solve the issue where 2 directions on the joystick are not recognized by the new THT 2P arcade controller with device ID 0x75e1. In details the new device ID is added the hid-id list and the hid-xinmo source code. Signed-off-by: Peter Stein Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-xinmo.c | 1 + 3 files changed, 3 insertions(+) commit 9df0eb180c2074451f25556eb566d89c7057c2ac Author: Eric Biggers Date: Thu Mar 23 13:39:46 2017 -0700 crypto: xts,lrw - fix out-of-bounds write after kmalloc failure In the generic XTS and LRW algorithms, for input data > 128 bytes, a temporary buffer is allocated to hold the values to be XOR'ed with the data before and after encryption or decryption. If the allocation fails, the fixed-size buffer embedded in the request buffer is meant to be used as a fallback --- resulting in more calls to the ECB algorithm, but still producing the correct result. However, we weren't correctly limiting subreq->cryptlen in this case, resulting in pre_crypt() overrunning the embedded buffer. Fix this by setting subreq->cryptlen correctly. Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Cc: stable@vger.kernel.org # v4.10+ Reported-by: Dmitry Vyukov Signed-off-by: Eric Biggers Acked-by: David S. Miller Signed-off-by: Herbert Xu crypto/lrw.c | 7 +++++-- crypto/xts.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit efc989fce8703914bac091dcc4b8ff7a72ccf987 Author: Gary R Hook Date: Thu Mar 23 12:53:30 2017 -0500 crypto: ccp - Make some CCP DMA channels private The CCP registers its queues as channels capable of handling general DMA operations. The NTB driver will use DMA if directed, but as public channels can be reserved for use in asynchronous operations some channels should be held back as private. Since the public/private determination is handled at a device level, reserve the "other" (secondary) CCP channels as private. Add a module parameter that allows for override, to be applied to all channels on all devices. CC: # 4.10.x- Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 1 + drivers/crypto/ccp/ccp-dev.h | 5 +++++ drivers/crypto/ccp/ccp-dmaengine.c | 41 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit de5540d088fe97ad583cc7d396586437b32149a5 Author: Jason A. Donenfeld Date: Thu Mar 23 12:24:43 2017 +0100 padata: avoid race in reordering Under extremely heavy uses of padata, crashes occur, and with list debugging turned on, this happens instead: [87487.298728] WARNING: CPU: 1 PID: 882 at lib/list_debug.c:33 __list_add+0xae/0x130 [87487.301868] list_add corruption. prev->next should be next (ffffb17abfc043d0), but was ffff8dba70872c80. (prev=ffff8dba70872b00). [87487.339011] [] dump_stack+0x68/0xa3 [87487.342198] [] ? console_unlock+0x281/0x6d0 [87487.345364] [] __warn+0xff/0x140 [87487.348513] [] warn_slowpath_fmt+0x4a/0x50 [87487.351659] [] __list_add+0xae/0x130 [87487.354772] [] ? _raw_spin_lock+0x64/0x70 [87487.357915] [] padata_reorder+0x1e6/0x420 [87487.361084] [] padata_do_serial+0xa5/0x120 padata_reorder calls list_add_tail with the list to which its adding locked, which seems correct: spin_lock(&squeue->serial.lock); list_add_tail(&padata->list, &squeue->serial.list); spin_unlock(&squeue->serial.lock); This therefore leaves only place where such inconsistency could occur: if padata->list is added at the same time on two different threads. This pdata pointer comes from the function call to padata_get_next(pd), which has in it the following block: next_queue = per_cpu_ptr(pd->pqueue, cpu); padata = NULL; reorder = &next_queue->reorder; if (!list_empty(&reorder->list)) { padata = list_entry(reorder->list.next, struct padata_priv, list); spin_lock(&reorder->lock); list_del_init(&padata->list); atomic_dec(&pd->reorder_objects); spin_unlock(&reorder->lock); pd->processed++; goto out; } out: return padata; I strongly suspect that the problem here is that two threads can race on reorder list. Even though the deletion is locked, call to list_entry is not locked, which means it's feasible that two threads pick up the same padata object and subsequently call list_add_tail on them at the same time. The fix is thus be hoist that lock outside of that block. Signed-off-by: Jason A. Donenfeld Acked-by: Steffen Klassert Signed-off-by: Herbert Xu kernel/padata.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 74d1cf4897f919837efc4e34d800b996936eb38e Author: Thomas Petazzoni Date: Fri Mar 17 13:58:39 2017 +0100 dt-bindings: rng: clocks property on omap_rng not always mandatory Commit 52060836f79 ("dt-bindings: omap-rng: Document SafeXcel IP-76 device variant") update the omap_rng Device Tree binding to add support for the IP-76 variation of the IP. As part of this change, a "clocks" property was added, but is indicated as "Required", without indicated it's actually only required for some compatible strings. This commit fixes that, by explicitly stating that the clocks property is only required with the inside-secure,safexcel-eip76 compatible string. Fixes: 52060836f79 ("dt-bindings: omap-rng: Document SafeXcel IP-76 device variant") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/omap_rng.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dbe4d69d252e9e65c6c46826980b77b11a142065 Author: Mike Looijmans Date: Thu Mar 23 10:00:36 2017 +0100 i2c: mux: pca954x: Add missing pca9546 definition to chip_desc The spec for the pca9546 was missing. This chip is the same as the pca9545 except that it lacks interrupt lines. While the i2c_device_id table mapped the pca9546 to the pca9545 definition the compatible table did not. Signed-off-by: Mike Looijmans Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a46f60d76004965e5669dbf3fc21ef3bc3632eb4 Author: Baoquan He Date: Fri Mar 24 12:59:52 2017 +0800 x86/mm/KASLR: Exclude EFI region from KASLR VA space randomization Currently KASLR is enabled on three regions: the direct mapping of physical memory, vamlloc and vmemmap. However the EFI region is also mistakenly included for VA space randomization because of misusing EFI_VA_START macro and assuming EFI_VA_START < EFI_VA_END. (This breaks kexec and possibly other things that rely on stable addresses.) The EFI region is reserved for EFI runtime services virtual mapping which should not be included in KASLR ranges. In Documentation/x86/x86_64/mm.txt, we can see: ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space EFI uses the space from -4G to -64G thus EFI_VA_START > EFI_VA_END, Here EFI_VA_START = -4G, and EFI_VA_END = -64G. Changing EFI_VA_START to EFI_VA_END in mm/kaslr.c fixes this problem. Signed-off-by: Baoquan He Reviewed-by: Bhupesh Sharma Acked-by: Dave Young Acked-by: Thomas Garnier Cc: #4.8+ Cc: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1490331592-31860-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/kaslr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 854fbd6e5f60fe99e8e3a569865409fca378f143 Author: Kees Cook Date: Thu Mar 23 15:46:16 2017 -0700 lib/syscall: Clear return values when no stack Commit: aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()") ... added logic to handle a process stack not existing, but left sp and pc uninitialized, which can be later reported via /proc/$pid/syscall for zombie processes, potentially exposing kernel memory to userspace. Zombie /proc/$pid/syscall before: -1 0xffffffff9a060100 0xffff92f42d6ad900 Zombie /proc/$pid/syscall after: -1 0x0 0x0 Reported-by: Robert Święcki Signed-off-by: Kees Cook Reviewed-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org # v4.9+ Fixes: aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()") Link: http://lkml.kernel.org/r/20170323224616.GA92694@beast Signed-off-by: Ingo Molnar lib/syscall.c | 1 + 1 file changed, 1 insertion(+) commit 48481c8fa16410ffa45939b13b6c53c2ca609e5f Author: Eric Dumazet Date: Thu Mar 23 12:39:21 2017 -0700 net: neigh: guard against NULL solicit() method Dmitry posted a nice reproducer of a bug triggering in neigh_probe() when dereferencing a NULL neigh->ops->solicit method. This can happen for arp_direct_ops/ndisc_direct_ops and similar, which can be used for NUD_NOARP neighbours (created when dev->header_ops is NULL). Admin can then force changing nud_state to some other state that would fire neigh timer. Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/core/neighbour.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ebe64824e9de4b3ab3bd3928312b4b2bc57b4b7e Merge: 02a2cad 90ff2b7 Author: Linus Torvalds Date: Thu Mar 23 20:00:39 2017 -0700 Merge tag 'pm-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "One of these is an intel_pstate regression fix and it is not a small change, but it mostly removes code that shouldn't be there. That code was acquired by mistake and has been a source of constant pain since then, so the time has come to get rid of it finally. We have not seen problems with this change in the lab, so fingers crossed. The rest is more usual: one more intel_pstate commit removing useless code, a cpufreq core fix to make it restore policy limits on CPU online (which prevents the limits from being reset over system suspend/resume), a schedutil cpufreq governor initialization fix to make it actually work as advertised on all systems and an extra sanity check in the cpuidle core to prevent crashes from happening if the arch code messes things up. Specifics: - Make intel_pstate use one set of global P-state limits in the active mode regardless of the scaling_governor settings for individual CPUs instead of switching back and forth between two of them in a way that is hard to control (Rafael Wysocki). - Drop a useless function from intel_pstate to prevent it from modifying the maximum supported frequency value unexpectedly which may confuse the cpufreq core (Rafael Wysocki). - Fix the cpufreq core to restore policy limits on CPU online so that the limits are not reset over system suspend/resume, among other things (Viresh Kumar). - Fix the initialization of the schedutil cpufreq governor to make the IO-wait boosting mechanism in it actually work on systems with one CPU per cpufreq policy (Rafael Wysocki). - Add a sanity check to the cpuidle core to prevent crashes from happening if the architecture code initialization fails to set up things as expected (Vaidyanathan Srinivasan)" * tag 'pm-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Restore policy min/max limits on CPU online cpuidle: Validate cpu_dev in cpuidle_add_sysfs() cpufreq: intel_pstate: Fix policy data management in passive mode cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start() cpufreq: intel_pstate: One set of global limits in active mode commit 02a2cad8e83817524cd4e14fc1c68c8c94768723 Merge: d038e3d 47e6fb4 Author: Linus Torvalds Date: Thu Mar 23 19:51:06 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Fixes to various USB drivers to validate existence of endpoints before trying to use them, fixes to APLS v8 protocol, and a couple of i8042 quirks" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix trackstick button handling on V8 devices Input: ALPS - fix V8+ protocol handling (73 03 28) Input: sur40 - validate number of endpoints before using them Input: kbtab - validate number of endpoints before using them Input: hanwang - validate number of endpoints before using them Input: yealink - validate number of endpoints before using them Input: ims-pcu - validate number of endpoints before using them Input: cm109 - validate number of endpoints before using them Input: iforce - validate number of endpoints before using them Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list Input: synaptics-rmi4 - prevent null pointer dereference in f30 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000 commit d64a04720b0e64c1cd0726a3a27b360822fbee22 Merge: f505a5c cf8c73a Author: Dave Airlie Date: Fri Mar 24 11:05:06 2017 +1000 Merge branch 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few small fixes for 4.11 * 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/amd/amdgpu: add POLARIS12 PCI ID drm/amdgpu: fix the clearing wb size drm/amdgpu: reinstate oland workaround for sclk drm/radeon: reinstate oland workaround for sclk commit f505a5c0ec9b8c19632cd572ed58feb178f45fbf Merge: 8201f1e 12ffed9 Author: Dave Airlie Date: Fri Mar 24 11:04:52 2017 +1000 Merge tag 'drm-misc-fixes-2017-03-23' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes One fbdev regression fix from Michel * tag 'drm-misc-fixes-2017-03-23' of git://anongit.freedesktop.org/git/drm-misc: drm/fb-helper: Allow var->x/yres(_virtual) < fb->width/height again commit 8201f1e86b1cce21ac5895230cb2cf9a56b7f6e7 Merge: d08997c 22e098d Author: Dave Airlie Date: Fri Mar 24 11:04:08 2017 +1000 Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Just several fixups, - fix page fault and vblank timeout issues due to delayed vblank handling. - fix panel driver probing to fail without te-gpios property. - fix potential security hole by using "%pK" format. - fix wrong if statement condition. And one cleanup which removes Exynos4415 SoC support which is not supported anymore. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos/dsi: make te-gpios optional drm/exynos: Print kernel pointers in a restricted form drm/exynos/decon5433: fix software trigger mask drm/exynos/fimd: signal frame done interrupt at front porch drm/exynos/decon5433: signal frame done interrupt at front porch drm/exynos/decon5433: fix vblank event handling drm/exynos: move crtc event handling to drivers callbacks drm/exynos: Remove support for Exynos4415 (SoC not supported anymore) drm/exynos/decon5433: & vs | typo commit f35ec35e5e726e7137deaee0dec24f8cbf07a48f Author: Florian Fainelli Date: Wed Mar 22 22:40:30 2017 -0700 net: phy: Export mdiobus_register_board_info() We can build modular code that uses mdiobus_register_board_info() which would lead to linking failure since this symbol is not expoerted. Fixes: 648ea0134069 ("net: phy: Allow pre-declaration of MDIO devices") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-boardinfo.c | 1 + 1 file changed, 1 insertion(+) commit 90ff2b729e181fba628b854eac2097e5ccc22e66 Merge: 6488294 ad0a45f Author: Rafael J. Wysocki Date: Fri Mar 24 00:43:46 2017 +0100 Merge branch 'pm-cpuidle-fixes' * pm-cpuidle-fixes: cpuidle: Validate cpu_dev in cpuidle_add_sysfs() commit 6488294e4a6328ca260b9d872c04cbd7db09e17e Merge: ff01047 4296f23 64897b2 Author: Rafael J. Wysocki Date: Fri Mar 24 00:43:26 2017 +0100 Merge branches 'pm-cpufreq-fixes', 'pm-cpufreq-sched-fixes' and 'intel_pstate-fixes' * pm-cpufreq-fixes: cpufreq: Restore policy min/max limits on CPU online * pm-cpufreq-sched-fixes: cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start() * intel_pstate-fixes: cpufreq: intel_pstate: Fix policy data management in passive mode cpufreq: intel_pstate: One set of global limits in active mode commit 7f0b97d5bb4c1c99c38dd6770ad11f714ea42583 Merge: f8ba2d6 b467e08 Author: Stephen Boyd Date: Thu Mar 23 16:08:46 2017 -0700 Merge tag 'sunxi-clk-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-fixes Pull Allwinner clock fixes from Maxime Ripard: A few fixes for a bunch of clocks on a few SoCs. The most important one is probably one that fixes the NKMP clock frequency calculation and could end up with clocking the CPU frequency to out of bounds rates. * tag 'sunxi-clk-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: clk: sunxi-ng: fix recalc_rate formula of NKMP clocks clk: sunxi-ng: Fix div/mult settings for osc12M on A64 clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock clk: sunxi: ccu-sun5i needs nkmp clk: sunxi-ng: mp: Adjust parent rate for pre-dividers commit 9abb27c7594a62bbf6385e20b7f5a90b4eceae2f Author: Tomasz Nowicki Date: Thu Mar 23 17:10:16 2017 -0500 PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller During early days of PCI quirks support, ThunderX firmware did not provide PNP0c02 node with PCI configuration space and PEM-specific register ranges. This means that for legacy FW we are not reserving these resources and cannot gather PEM-specific resources for further PEM initialization. To support already deployed legacy FW, calculate PEM-specific ranges and provide resources reservation as fallback scenario into PEM driver when we could not gather PEM reg base from ACPI tables. Tested-by: Robert Richter Signed-off-by: Tomasz Nowicki Signed-off-by: Vadim Lomovtsev Signed-off-by: Bjorn Helgaas Acked-by: Robert Richter CC: stable@vger.kernel.org # v4.10+ drivers/pci/host/pci-thunder-pem.c | 56 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) commit 81caa91b72fd6a0b8dfc5eb10942c34f7efd2bc5 Author: Tomasz Nowicki Date: Thu Mar 23 17:10:10 2017 -0500 PCI: thunder-pem: Use Cavium assigned hardware ID for ThunderX host controller "CAV" is the only PNP/ACPI hardware ID vendor prefix assigned to Cavium so fix this as it should be from day one. Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller") Tested-by: Robert Richter Signed-off-by: Tomasz Nowicki Signed-off-by: Bjorn Helgaas Acked-by: Robert Richter CC: stable@vger.kernel.org # v4.10+ drivers/pci/host/pci-thunder-pem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e88162f9dad426f3c83e23150b7f28b7d9486df8 Author: Andy Shevchenko Date: Tue Mar 21 21:13:09 2017 +0200 Revert "i2c: mux: pca954x: Add ACPI support for pca954x" In ACPI world any ID should be carefully chosen and registered officially. The commit bbf9d262a147 seems did a wrong assumption because PCA is the registered PNP ID for "PHILIPS BU ADD ON CARD". I'm pretty sure this prefix has nothing to do with the driver in question. Moreover, newer ACPI specification has a support of _DSD method and special device IDs to allow drivers be enumerated via compatible string. The slight change to support this kind of enumeration will be added in sequential patch against pca954x.c. Revert the commit bbf9d262a147 for good. Cc: Tin Huynh Signed-off-by: Andy Shevchenko Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit fd290e7096bd4441fdd61e241ee997b16e04afbd Merge: 5617c05 436ecf5 Author: Greg Kroah-Hartman Date: Thu Mar 23 22:07:22 2017 +0100 Merge tag 'usb-serial-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.11-rc4 Some more device ids for option and qcserial. Signed-off-by: Johan Hovold commit 5617c05d44ebd7b75973b5b31a9f2e55e5882d3f Merge: 22db87b 25cd972 Author: Greg Kroah-Hartman Date: Thu Mar 23 22:05:10 2017 +0100 Merge tag 'fixes-for-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.11-rc4 f_acm got an endianness fix by Oliver Neukum. This has been around for a long time but it's finally fixed. f_hid learned that it should never access hidg->req without first grabbing the spinlock. Roger Quadros fixed two bugs in the f_uvc function driver. Janusz Dziedzic fixed a very peculiar bug with EP0, one that's rather difficult to trigger. When we're dealing with bounced EP0 requests, we should delay unmap until after ->complete() is called. UDC class got a use-after-free fix. commit 22db87ba6bbefcb12493ae9c7be2037f5f12639d Merge: 7b2db29 1a09b6a Author: Greg Kroah-Hartman Date: Thu Mar 23 22:04:26 2017 +0100 Merge tag 'phy-for-4.11-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.11-rc *) Revert USB3 PHY support for Broadcom NSP SoC *) Fix compiler error on qcom-usb-hs when depends on EXTCON is not added *) Fix error handling in phy-exynos-pcie Signed-off-by: Kishon Vijay Abraham I commit a2125d02443e9a4e68bcfd9f8004fa23239e8329 Author: Arnd Bergmann Date: Thu Mar 23 16:03:11 2017 +0100 hwmon: (asus_atk0110) fix uninitialized data access The latest gcc-7 snapshot adds a warning to point out that when atk_read_value_old or atk_read_value_new fails, we copy uninitialized data into sensor->cached_value: drivers/hwmon/asus_atk0110.c: In function 'atk_input_show': drivers/hwmon/asus_atk0110.c:651:26: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] Adding an error check avoids this. All versions of the driver are affected. Fixes: 2c03d07ad54d ("hwmon: Add Asus ATK0110 support") Signed-off-by: Arnd Bergmann Reviewed-by: Luca Tettamanti Signed-off-by: Guenter Roeck drivers/hwmon/asus_atk0110.c | 3 +++ 1 file changed, 3 insertions(+) commit d038e3dcfff6e3de132726a9c7174d8170032aa4 Merge: 131fbf4 3f30783 Author: Linus Torvalds Date: Thu Mar 23 11:58:08 2017 -0700 Merge tag 'sound-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains the collection of small fixes for 4.11 that were pending during my vacation: - a few HD-audio quirks (more Dell headset support, docking station support on HP laptops) - a regression fix for the previous ctxfi DMA mask fix - a correction of the new CONFIG_SND_X86 menu entry - a fix for the races in ALSA sequencer core spotted by syzkaller" * tag 'sound-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Adding a group of pin definition to fix headset problem ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() ALSA: x86: Make CONFIG_SND_X86 bool ALSA: hda - add support for docking station for HP 840 G3 ALSA: hda - add support for docking station for HP 820 G2 ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call commit 7d79f6098d82f8c09914d7799bc96891ad9c3baf Author: Rob Herring Date: Tue Mar 21 21:03:01 2017 -0500 ARM: dts: ti: fix PCI bus dtc warnings dtc recently added PCI bus checks. Fix these warnings. Signed-off-by: Rob Herring Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ce2899428ec0249512023aecaa3530c29f775a4f Author: Yegor Yefremov Date: Mon Mar 13 10:03:14 2017 +0100 ARM: dts: am335x-baltos: disable EEE for Atheros 8035 PHY Though cpsw doesn't support EEE feature, Atheros 8035 provides automatic EEE support that is enabled by default. This causes occasional link drops when link partner also announces EEE support. These link drops occur on both 100Mbit/s and 1000Mbit/s speeds. So disable EEE advertising completely. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 06e1a5cc570703796ff1bd3a712e8e3b15c6bb0d Author: Adam Ford Date: Mon Mar 6 12:56:55 2017 -0600 ARM: dts: OMAP3: Fix MFG ID EEPROM The manufacturing information is stored in the EEPROM. This chip is an AT24C64 not not (nor has it ever been) 24C02. This patch will correctly address the EEPROM to read the entire contents and not just 256 bytes (of 0xff). Fixes: 5e3447a29a38 ("ARM: dts: LogicPD Torpedo: Add AT24 EEPROM Support") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 131fbf4f9c096adadde27ad4bc70ea1632d720a4 Merge: f341d9f e1699d2 Author: Linus Torvalds Date: Thu Mar 23 11:39:33 2017 -0700 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Zygo tracked down a very old bug with inline compressed extents. I didn't tag this one for stable because I want to do individual tested backports. It's a little tricky and I'd rather do some extra testing on it along the way" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: add missing memset while reading compressed inline extents Btrfs: fix regression in lock_delalloc_pages btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h commit f341d9f08ae01d90d8d0c135ae2edf4423e724c9 Merge: 093b995 68c3865 Author: Linus Torvalds Date: Thu Mar 23 11:29:49 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Several netfilter fixes from Pablo and the crew: - Handle fragmented packets properly in netfilter conntrack, from Florian Westphal. - Fix SCTP ICMP packet handling, from Ying Xue. - Fix big-endian bug in nftables, from Liping Zhang. - Fix alignment of fake conntrack entry, from Steven Rostedt. 2) Fix feature flags setting in fjes driver, from Taku Izumi. 3) Openvswitch ipv6 tunnel source address not set properly, from Or Gerlitz. 4) Fix jumbo MTU handling in amd-xgbe driver, from Thomas Lendacky. 5) sk->sk_frag.page not released properly in some cases, from Eric Dumazet. 6) Fix RTNL deadlocks in nl80211, from Johannes Berg. 7) Fix erroneous RTNL lockdep splat in crypto, from Herbert Xu. 8) Cure improper inflight handling during AF_UNIX GC, from Andrey Ulanov. 9) sch_dsmark doesn't write to packet headers properly, from Eric Dumazet. 10) Fix SCM_TIMESTAMPING_OPT_STATS handling in TCP, from Soheil Hassas Yeganeh. 11) Add some IDs for Motorola qmi_wwan chips, from Tony Lindgren. 12) Fix nametbl deadlock in tipc, from Ying Xue. 13) GRO and LRO packets not counted correctly in mlx5 driver, from Gal Pressman. 14) Fix reset of internal PHYs in bcmgenet, from Doug Berger. 15) Fix hashmap allocation handling, from Alexei Starovoitov. 16) nl_fib_input() needs stronger netlink message length checking, from Eric Dumazet. 17) Fix double-free of sk->sk_filter during sock clone, from Daniel Borkmann. 18) Fix RX checksum offloading in aquantia driver, from Pavel Belous. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits) net:ethernet:aquantia: Fix for RX checksum offload. amd-xgbe: Fix the ECC-related bit position definitions sfc: cleanup a condition in efx_udp_tunnel_del() Bluetooth: btqcomsmd: fix compile-test dependency inet: frag: release spinlock before calling icmp_send() tcp: initialize icsk_ack.lrcvtime at session start time genetlink: fix counting regression on ctrl_dumpfamily() socket, bpf: fix sk_filter use after free in sk_clone_lock ipv4: provide stronger user input validation in nl_fib_input() bpf: fix hashmap extra_elems logic enic: update enic maintainers net: bcmgenet: remove bcmgenet_internal_phy_setup() ipv6: make sure to initialize sockc.tsflags before first use fjes: Do not load fjes driver if extended socket device is not power on. fjes: Do not load fjes driver if system does not have extended socket device. net/mlx5e: Count LRO packets correctly net/mlx5e: Count GSO packets correctly net/mlx5: Increase number of max QPs in default profile net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps net/mlx5e: Use the proper UAPI values when offloading TC vlan actions ... commit 90db10434b163e46da413d34db8d0e77404cc645 Author: David Hildenbrand Date: Thu Mar 23 18:24:19 2017 +0100 KVM: kvm_io_bus_unregister_dev() should never fail No caller currently checks the return value of kvm_io_bus_unregister_dev(). This is evil, as all callers silently go on freeing their device. A stale reference will remain in the io_bus, getting at least used again, when the iobus gets teared down on kvm_destroy_vm() - leading to use after free errors. There is nothing the callers could do, except retrying over and over again. So let's simply remove the bus altogether, print an error and make sure no one can access this broken bus again (returning -ENOMEM on any attempt to access it). Fixes: e93f8a0f821e ("KVM: convert io_bus to SRCU") Cc: stable@vger.kernel.org # 3.4+ Reported-by: Dmitry Vyukov Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 4 ++-- virt/kvm/eventfd.c | 3 ++- virt/kvm/kvm_main.c | 42 +++++++++++++++++++++++++----------------- 3 files changed, 29 insertions(+), 20 deletions(-) commit 08d839c4b134b8328ec42f2157a9ca4b93227c03 Author: Wanpeng Li Date: Thu Mar 23 05:30:08 2017 -0700 KVM: VMX: Fix enable VPID conditions This can be reproduced by running L2 on L1, and disable VPID on L0 if w/o commit "KVM: nVMX: Fix nested VPID vmx exec control", the L2 crash as below: KVM: entry failed, hardware error 0x7 EAX=00000000 EBX=00000000 ECX=00000000 EDX=000306c3 ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000 EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 00000000 0000ffff 00009300 CS =f000 ffff0000 0000ffff 00009b00 SS =0000 00000000 0000ffff 00009300 DS =0000 00000000 0000ffff 00009300 FS =0000 00000000 0000ffff 00009300 GS =0000 00000000 0000ffff 00009300 LDT=0000 00000000 0000ffff 00008200 TR =0000 00000000 0000ffff 00008b00 GDT= 00000000 0000ffff IDT= 00000000 0000ffff CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Reference SDM 30.3 INVVPID: Protected Mode Exceptions - #UD - If not in VMX operation. - If the logical processor does not support VPIDs (IA32_VMX_PROCBASED_CTLS2[37]=0). - If the logical processor supports VPIDs (IA32_VMX_PROCBASED_CTLS2[37]=1) but does not support the INVVPID instruction (IA32_VMX_EPT_VPID_CAP[32]=0). So we should check both VPID enable bit in vmx exec control and INVVPID support bit in vmx capability MSRs to enable VPID. This patch adds the guarantee to not enable VPID if either INVVPID or single-context/all-context invalidation is not exposed in vmx capability MSRs. Reviewed-by: David Hildenbrand Reviewed-by: Jim Mattson Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 63cb6d5f004ca44f9b8e562b6dd191f717a4960e Author: Wanpeng Li Date: Mon Mar 20 21:18:53 2017 -0700 KVM: nVMX: Fix nested VPID vmx exec control This can be reproduced by running kvm-unit-tests/vmx.flat on L0 w/ vpid disabled. Test suite: VPID Unhandled exception 6 #UD at ip 00000000004051a6 error_code=0000 rflags=00010047 cs=00000008 rax=0000000000000000 rcx=0000000000000001 rdx=0000000000000047 rbx=0000000000402f79 rbp=0000000000456240 rsi=0000000000000001 rdi=0000000000000000 r8=000000000000000a r9=00000000000003f8 r10=0000000080010011 r11=0000000000000000 r12=0000000000000003 r13=0000000000000708 r14=0000000000000000 r15=0000000000000000 cr0=0000000080010031 cr2=0000000000000000 cr3=0000000007fff000 cr4=0000000000002020 cr8=0000000000000000 STACK: @4051a6 40523e 400f7f 402059 40028f We should hide and forbid VPID in L1 if it is disabled on L0. However, nested VPID enable bit is set unconditionally during setup nested vmx exec controls though VPID is not exposed through nested VMX capablity. This patch fixes it by don't set nested VPID enable bit if it is disabled on L0. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: stable@vger.kernel.org Fixes: 5c614b3583e (KVM: nVMX: nested VPID emulation) Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 24dccf83a121b8a4ad5c2ad383a8184ef6c266ee Author: Wanpeng Li Date: Mon Mar 20 21:18:55 2017 -0700 KVM: x86: correct async page present tracepoint After async pf setup successfully, there is a broadcast wakeup w/ special token 0xffffffff which tells vCPU that it should wake up all processes waiting for APFs though there is no real process waiting at the moment. The async page present tracepoint print prematurely and fails to catch the special token setup. This patch fixes it by moving the async page present tracepoint after the special token setup. Before patch: qemu-system-x86-8499 [006] ...1 5973.473292: kvm_async_pf_ready: token 0x0 gva 0x0 After patch: qemu-system-x86-8499 [006] ...1 5973.473292: kvm_async_pf_ready: token 0xffffffff gva 0x0 Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb6c8198431311027c3434d4e94ab8bc040f7aea Author: Jim Mattson Date: Thu Mar 16 13:53:59 2017 -0700 kvm: vmx: Flush TLB when the APIC-access address changes Quoting from the Intel SDM, volume 3, section 28.3.3.4: Guidelines for Use of the INVEPT Instruction: If EPT was in use on a logical processor at one time with EPTP X, it is recommended that software use the INVEPT instruction with the "single-context" INVEPT type and with EPTP X in the INVEPT descriptor before a VM entry on the same logical processor that enables EPT with EPTP X and either (a) the "virtualize APIC accesses" VM-execution control was changed from 0 to 1; or (b) the value of the APIC-access address was changed. In the nested case, the burden falls on L1, unless L0 enables EPT in vmcs02 when L1 doesn't enable EPT in vmcs12. Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit c761159cf81b8641290f7559a8d8e30f6ab92669 Author: Peter Xu Date: Wed Mar 15 16:01:19 2017 +0800 KVM: x86: use pic/ioapic destructor when destroy vm We have specific destructors for pic/ioapic, we'd better use them when destroying the VM as well. Signed-off-by: Peter Xu Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 950712eb8ef03e4a62ac5b3067efde7ec2f8a91e Author: Peter Xu Date: Wed Mar 15 16:01:18 2017 +0800 KVM: x86: check existance before destroy Mostly used for split irqchip mode. In that case, these two things are not inited at all, so no need to release. Signed-off-by: Peter Xu Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 3 +++ arch/x86/kvm/ioapic.c | 3 +++ 2 files changed, 6 insertions(+) commit 1914f0cd203c941bba72f9452c8290324f1ef3dc Author: Ankur Arora Date: Tue Mar 21 15:43:38 2017 -0700 xen/acpi: upload PM state from init-domain to Xen This was broken in commit cd979883b9ed ("xen/acpi-processor: fix enabling interrupts on syscore_resume"). do_suspend (from xen/manage.c) and thus xen_resume_notifier never get called on the initial-domain at resume (it is if running as guest.) The rationale for the breaking change was that upload_pm_data() potentially does blocking work in syscore_resume(). This patch addresses the original issue by scheduling upload_pm_data() to execute in workqueue context. Cc: Stanislaw Gruszka Cc: stable@vger.kernel.org Based-on-patch-by: Konrad Wilk Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Stanislaw Gruszka Signed-off-by: Ankur Arora Signed-off-by: Boris Ostrovsky drivers/xen/xen-acpi-processor.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 223b78ea212852726dfa86ef267a9c8a323d5cc2 Author: Arnd Bergmann Date: Thu Mar 23 15:53:45 2017 +0100 scsi: lpfc: fix building without debugfs support On a randconfig build without CONFIG_SCSI_LPFC_DEBUG_FS, I ran into multiple compile failures: drivers/scsi/lpfc/lpfc_debugfs.h: In function 'lpfc_debug_dump_wq': drivers/scsi/lpfc/lpfc_debugfs.h:405:15: error: 'DUMP_FCP' undeclared (first use in this function); did you mean 'DUMP_VAR'? drivers/scsi/lpfc/lpfc_debugfs.h:405:15: note: each undeclared identifier is reported only once for each function it appears in drivers/scsi/lpfc/lpfc_debugfs.h:408:22: error: 'DUMP_NVME' undeclared (first use in this function); did you mean 'DUMP_NONE'? drivers/scsi/lpfc/lpfc_nvmet.c: In function 'lpfc_nvmet_xmt_ls_rsp_cmp': drivers/scsi/lpfc/lpfc_nvmet.c:109:2: error: implicit declaration of function 'lpfc_nvmeio_data'; did you mean 'lpfc_mem_free'? [-Werror=implicit-function-declaration] drivers/scsi/lpfc/lpfc_nvmet.c: In function 'lpfc_nvmet_xmt_fcp_op': drivers/scsi/lpfc/lpfc_nvmet.c:523:10: error: unused variable 'id' [-Werror=unused-variable] They are all trivial to fix, so I'm doing it in a combined patch here. Fixes: 1d9d5a9879ad ("scsi: lpfc: refactor debugfs queue dump routines") Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support") Fixes: 2b65e18202fd ("scsi: lpfc: NVME Target: Add debugfs support") Signed-off-by: Arnd Bergmann Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.h | 22 ++++++++++++++-------- drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) commit a71e3cdcfce4880a4578915e110e3eaed1659765 Author: Dick Kennedy Date: Thu Mar 23 08:47:18 2017 -0400 scsi: lpfc: Fix PT2PT PRLI reject lpfc cannot establish connection with targets that send PRLI in P2P configurations. If lpfc rejects a PRLI that is sent from a target the target will not resend and will reject the PRLI send from the initiator. [mkp: applied by hand] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb94588dabec82e012281608949a860f64752914 Author: Tomas Henzl Date: Mon Mar 20 16:42:48 2017 +0100 scsi: hpsa: fix volume offline state In a previous patch a hpsa_scsi_dev_t.volume_offline update line has been removed, so let us put it back.. Fixes: 85b29008d8 (hpsa: update check for logical volume status) Signed-off-by: Tomas Henzl Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 1 + 1 file changed, 1 insertion(+) commit 12ffed96d4369f086261ba2ee734fa8c932d7f55 Author: Michel Dänzer Date: Thu Mar 23 17:53:26 2017 +0900 drm/fb-helper: Allow var->x/yres(_virtual) < fb->width/height again Otherwise this can also prevent modesets e.g. for switching VTs, when multiple monitors with different native resolutions are connected. The depths must match though, so keep the != test for that. Also update the DRM_DEBUG output to be slightly more accurate, this doesn't only affect requests from userspace. Bugzilla: https://bugs.freedesktop.org/99841 Fixes: 865afb11949e ("drm/fb-helper: reject any changes to the fbdev") Signed-off-by: Michel Dänzer Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170323085326.20185-1-michel@daenzer.net drivers/gpu/drm/drm_fb_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c2593cc8fd5960f8861de1be67135851f884836 Author: Ankur Arora Date: Tue Mar 21 15:43:37 2017 -0700 xen/acpi: Replace hard coded "ACPI0007" Replace hard coded "ACPI0007" with ACPI_PROCESSOR_DEVICE_HID Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Ankur Arora Signed-off-by: Boris Ostrovsky drivers/xen/xen-acpi-processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1be315ac9766fe83e4fb788d5d9fe032a9b877 Author: Borislav Petkov Date: Sat Mar 18 18:26:34 2017 +0100 EDAC, pnd2_edac: Fix !EDAC_DEBUG build Provide debugfs function stubs when EDAC_DEBUG is not enabled so that we don't fail the build: drivers/edac/pnd2_edac.c: In function ‘pnd2_init’: drivers/edac/pnd2_edac.c:1521:2: error: implicit declaration of function ‘setup_pnd2_debug’ [-Werror=implicit-function-declaration] setup_pnd2_debug(); ^ drivers/edac/pnd2_edac.c: In function ‘pnd2_exit’: drivers/edac/pnd2_edac.c:1529:2: error: implicit declaration of function ‘teardown_pnd2_debug’ [-Werror=implicit-function-declaration] teardown_pnd2_debug(); ^ Signed-off-by: Borislav Petkov drivers/edac/pnd2_edac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1c5bf78114d38c2761721108a2d925bccb496027 Author: Borislav Petkov Date: Sat Mar 18 18:25:05 2017 +0100 EDAC: Select DEBUG_FS The debugfs.c functionality relies on DEBUG_FS so select it. Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 633ee407b9d15a75ac9740ba9d3338815e1fcb95 Author: Ilya Dryomov Date: Tue Mar 21 13:44:28 2017 +0100 libceph: force GFP_NOIO for socket allocations sock_alloc_inode() allocates socket+inode and socket_wq with GFP_KERNEL, which is not allowed on the writeback path: Workqueue: ceph-msgr con_work [libceph] ffff8810871cb018 0000000000000046 0000000000000000 ffff881085d40000 0000000000012b00 ffff881025cad428 ffff8810871cbfd8 0000000000012b00 ffff880102fc1000 ffff881085d40000 ffff8810871cb038 ffff8810871cb148 Call Trace: [] schedule+0x29/0x70 [] schedule_timeout+0x1bd/0x200 [] ? ttwu_do_wakeup+0x2c/0x120 [] ? ttwu_do_activate.constprop.135+0x66/0x70 [] wait_for_completion+0xbf/0x180 [] ? try_to_wake_up+0x390/0x390 [] flush_work+0x165/0x250 [] ? worker_detach_from_pool+0xd0/0xd0 [] xlog_cil_force_lsn+0x81/0x200 [xfs] [] ? __slab_free+0xee/0x234 [] _xfs_log_force_lsn+0x4d/0x2c0 [xfs] [] ? lookup_page_cgroup_used+0xe/0x30 [] ? xfs_reclaim_inode+0xa3/0x330 [xfs] [] xfs_log_force_lsn+0x3f/0xf0 [xfs] [] ? xfs_reclaim_inode+0xa3/0x330 [xfs] [] xfs_iunpin_wait+0xc6/0x1a0 [xfs] [] ? wake_atomic_t_function+0x40/0x40 [] xfs_reclaim_inode+0xa3/0x330 [xfs] [] xfs_reclaim_inodes_ag+0x257/0x3d0 [xfs] [] xfs_reclaim_inodes_nr+0x33/0x40 [xfs] [] xfs_fs_free_cached_objects+0x15/0x20 [xfs] [] super_cache_scan+0x178/0x180 [] shrink_slab_node+0x14e/0x340 [] ? mem_cgroup_iter+0x16b/0x450 [] shrink_slab+0x100/0x140 [] do_try_to_free_pages+0x335/0x490 [] try_to_free_pages+0xb9/0x1f0 [] ? __alloc_pages_direct_compact+0x69/0x1be [] __alloc_pages_nodemask+0x69a/0xb40 [] alloc_pages_current+0x9e/0x110 [] new_slab+0x2c5/0x390 [] __slab_alloc+0x33b/0x459 [] ? sock_alloc_inode+0x2d/0xd0 [] ? inet_sendmsg+0x71/0xc0 [] ? sock_alloc_inode+0x2d/0xd0 [] kmem_cache_alloc+0x1a2/0x1b0 [] sock_alloc_inode+0x2d/0xd0 [] alloc_inode+0x26/0xa0 [] new_inode_pseudo+0x1a/0x70 [] sock_alloc+0x1e/0x80 [] __sock_create+0x95/0x220 [] sock_create_kern+0x24/0x30 [] con_work+0xef9/0x2050 [libceph] [] ? rbd_img_request_submit+0x4c/0x60 [rbd] [] process_one_work+0x159/0x4f0 [] worker_thread+0x11b/0x530 [] ? create_worker+0x1d0/0x1d0 [] kthread+0xc9/0xe0 [] ? flush_kthread_worker+0x90/0x90 [] ret_from_fork+0x58/0x90 [] ? flush_kthread_worker+0x90/0x90 Use memalloc_noio_{save,restore}() to temporarily force GFP_NOIO here. Cc: stable@vger.kernel.org # 3.10+, needs backporting Link: http://tracker.ceph.com/issues/19309 Reported-by: Sergey Jerusalimov Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton net/ceph/messenger.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d7402de48efae57bbb0072e53d3800c30de57ea5 Author: Christian Lamparter Date: Thu Mar 16 21:36:07 2017 +0100 pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 This patch adds the missing PINGROUP for GPIO70-99. This fixes a crash that happens in pinctrl-msm, if any of the GPIO70-99 are accessed. Fixes: 5303f7827fcd41d ("pinctrl: qcom: ipq4019: set ngpios to correct value") Signed-off-by: Christian Lamparter Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ipq4019.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e855fa9a65c40788b5069abb0d094537daa22e05 Author: Patrice Chotard Date: Thu Mar 16 18:26:02 2017 +0100 pinctrl: st: add irq_request/release_resources callbacks When using GPIO as IRQ source, the GPIO must be configured in INPUT. Callbacks dedicated for this was missing in pinctrl-st driver. This fix the following kernel error when trying to lock a gpio as IRQ: [ 7.521095] gpio gpiochip7: (PIO11): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ [ 7.526018] gpio gpiochip7: (PIO11): unable to lock HW IRQ 6 for IRQ [ 7.529405] genirq: Failed to request resources for 0-0053 (irq 81) on irqchip GPIO Signed-off-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit a6566710adaa4a7dd5e0d99820ff9c9c30ee5951 Author: Bjorn Andersson Date: Tue Mar 14 08:23:26 2017 -0700 pinctrl: qcom: Don't clear status bit on irq_unmask Clearing the status bit on irq_unmask will discard any pending interrupt that did arrive after the irq_ack, i.e. while the IRQ handler function was executing. Fixes: f365be092572 ("pinctrl: Add Qualcomm TLMM driver") Cc: stable@vger.kernel.org Cc: Stephen Boyd Reported-by: Timur Tabi Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 4 ---- 1 file changed, 4 deletions(-) commit 59f34e80c4910bc69ca643a2bb93fcce51366d83 Author: Andrzej Hajda Date: Thu Feb 23 11:12:40 2017 +0100 pinctrl: samsung: Fix memory mapping code Some pinctrls share memory regions, and devm_ioremap_resource does not allow to share resources, in opposition to devm_ioremap. This patch restores back usage of devm_ioremap function, but with proper error handling and logging. Fixes: baafaca ("pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data()") Signed-off-by: Andrzej Hajda Tested-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 08a7f260c88f8d52be52ff2113119b3464b69874 Author: Neil Armstrong Date: Tue Mar 7 14:31:00 2017 +0100 pinctrl: meson-gxbb: Fix typo in i2c ao groups Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e790555b6cae4da9c578376ff500861337fcfc1 Author: Peter Robinson Date: Thu Mar 2 17:46:36 2017 +0000 pinctrl: ti: The IODelay driver is a DRA7xxx feature so depend on that SoC As the IODelay driver is a hardware feature of the DRA7xxx SoC depend on that SoC and compile test. Signed-off-by: Peter Robinson Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/ti/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f307834e695f59dac4337a40316bdecfb9d0508 Author: Hui Wang Date: Thu Mar 23 10:00:25 2017 +0800 ALSA: hda - Adding a group of pin definition to fix headset problem A new Dell laptop needs to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to fix the headset problem, and the pin definiton of this machine is not in the pin quirk table yet, now adding it to the table. Signed-off-by: Hui Wang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 027fb89e61054b4aedd962adb3e2003dec78a716 Author: Adrian Hunter Date: Mon Mar 20 19:50:30 2017 +0200 mmc: sdhci-pci: Do not disable interrupts in sdhci_intel_set_power Disabling interrupts for even a millisecond can cause problems for some devices. That can happen when Intel host controllers wait for the present state to propagate. The spin lock is not necessary here. Anything that is racing with changes to the I/O state is already broken. The mmc core already provides synchronization via "claiming" the host. Although the spin lock probably should be removed from the code paths that lead to this point, such a patch would touch too much code to be suitable for stable trees. Consequently, for this patch, just drop the spin lock while waiting. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit e2ebfb2142acefecc2496e71360f50d25726040b Author: Adrian Hunter Date: Mon Mar 20 19:50:29 2017 +0200 mmc: sdhci: Do not disable interrupts while waiting for clock Disabling interrupts for even a millisecond can cause problems for some devices. That can happen when sdhci changes clock frequency because it waits for the clock to become stable under a spin lock. The spin lock is not necessary here. Anything that is racing with changes to the I/O state is already broken. The mmc core already provides synchronization via "claiming" the host. Although the spin lock probably should be removed from the code paths that lead to this point, such a patch would touch too much code to be suitable for stable trees. Consequently, for this patch, just drop the spin lock while waiting. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 698eff6355f735d46d1b7113df8b422874cd7988 Author: Peter Zijlstra Date: Fri Mar 17 12:48:18 2017 +0100 sched/clock, x86/perf: Fix "perf test tsc" People reported that commit: 5680d8094ffa ("sched/clock: Provide better clock continuity") broke "perf test tsc". That commit added another offset to the reported clock value; so take that into account when computing the provided offset values. Reported-by: Adrian Hunter Reported-by: Arnaldo Carvalho de Melo Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 5680d8094ffa ("sched/clock: Provide better clock continuity") Signed-off-by: Ingo Molnar arch/x86/events/core.c | 9 ++++++--- arch/x86/include/asm/timer.h | 2 ++ arch/x86/kernel/tsc.c | 4 ++-- include/linux/sched/clock.h | 13 +++++++------ kernel/sched/clock.c | 22 +++++++++++----------- 5 files changed, 28 insertions(+), 22 deletions(-) commit 71fdb70eb48784c1f28cdf2e67c4c587dd7f2594 Author: Peter Zijlstra Date: Mon Mar 13 13:46:21 2017 +0100 sched/clock: Fix clear_sched_clock_stable() preempt wobbly Paul reported a problems with clear_sched_clock_stable(). Since we run all of __clear_sched_clock_stable() from workqueue context, there's a preempt problem. Solve it by only running the static_key_disable() from workqueue. Reported-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: fweisbec@gmail.com Link: http://lkml.kernel.org/r/20170313124621.GA3328@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/clock.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 68c386590375b2aea5a3154f17882a30170707bf Author: Pavel Belous Date: Thu Mar 23 02:20:39 2017 +0300 net:ethernet:aquantia: Fix for RX checksum offload. Since AQC-100/107/108 chips supports hardware checksums for RX we should indicate this via NETIF_F_RXCSUM flag. v1->v2: 'Signed-off-by' tag added. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0_internal.h | 1 + drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 1 + 2 files changed, 2 insertions(+) commit f43feef4e6acde10857fcbfdede790d6b3f2c71d Author: Lendacky, Thomas Date: Wed Mar 22 17:25:27 2017 -0500 amd-xgbe: Fix the ECC-related bit position definitions The ECC bit positions that describe whether the ECC interrupt is for Tx, Rx or descriptor memory and whether the it is a single correctable or double detected error were defined in incorrectly (reversed order). Fix the bit position definitions for these settings so that the proper ECC handling is performed. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit c04ca616eed02b9abe7afd311382c3ed5eef5c40 Author: Dan Carpenter Date: Wed Mar 22 12:10:02 2017 +0300 sfc: cleanup a condition in efx_udp_tunnel_del() Presumably if there is an "add" function, there is also a "del" function. But it causes a static checker warning because it looks like a common cut and paste bug. Signed-off-by: Dan Carpenter Acked-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e9e6cc8f4e4f2cd67931510c9f39abf3d9e0d3b Author: Arnd Bergmann Date: Mon Mar 20 15:31:10 2017 -0700 Bluetooth: btqcomsmd: fix compile-test dependency compile-testing fails when QCOM_SMD is a loadable module: drivers/bluetooth/built-in.o: In function `btqcomsmd_send': btqca.c:(.text+0xa8): undefined reference to `qcom_smd_send' drivers/bluetooth/built-in.o: In function `btqcomsmd_probe': btqca.c:(.text+0x3ec): undefined reference to `qcom_wcnss_open_channel' btqca.c:(.text+0x46c): undefined reference to `qcom_smd_set_drvdata' This clarifies the dependency to allow compile-testing only when SMD is completely disabled, otherwise the dependency on QCOM_SMD will make sure we can link against it. Fixes: e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled") Signed-off-by: Arnd Bergmann [bjorn: Restructure and clarify dependency to QCOM_WCNSS_CTRL] Signed-off-by: Bjorn Andersson Acked-by: Marcel Holtmann Signed-off-by: David S. Miller drivers/bluetooth/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d08997cb416ae4f502b34b20b1edba48a43fe418 Merge: 97da385 590379a Author: Dave Airlie Date: Thu Mar 23 11:47:17 2017 +1000 Merge tag 'drm-intel-fixes-2017-03-22' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.11-rc4 * tag 'drm-intel-fixes-2017-03-22' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: make context status notifier head be per engine drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) drm/i915/gvt: Fix gvt scheduler interval time drm/i915/gvt: GVT pin/unpin shadow context drm/i915/gvt: scan shadow indirect context image when valid drm/i915/kvmgt: fix suspicious rcu dereference usage drm/i915/gvt: add enable_execlists check before enable gvt drm/i915/gvt: Remove bogus retry around i915_wait_request drm/i915/gvt: correct the ggtt valid bit check in pipe control command drm/i915/gvt: replace the gvt_err with gvt_vgpu_err drm/i915/gvt: handle force-nonpriv registers, cmd parser part drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC drm/i915: Reject HDMI 12bpc if the sink doesn't indicate support drm/i915: Always call i915_gem_reset_finish() following i915_gem_reset_prepare() drm/i915: Stop using RP_DOWN_EI on Baytrail drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. drm/i915: Only enable hotplug interrupts if the display interrupts are enabled drm/i915: Disable engine->irq_tasklet around resets drm/i915: Split GEM resetting into 3 phases commit 11cd3386a1987a0515d7ce11ee87b242e5015dfe Merge: 9d3a4de a03849e Author: Joerg Roedel Date: Wed Mar 22 23:59:56 2017 +0100 Merge branch 'for-joerg/arm-smmu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into iommu/fixes commit ec4fbd64751de18729eaa816ec69e4b504b5a7a2 Author: Eric Dumazet Date: Wed Mar 22 08:57:15 2017 -0700 inet: frag: release spinlock before calling icmp_send() Dmitry reported a lockdep splat [1] (false positive) that we can fix by releasing the spinlock before calling icmp_send() from ip_expire() This is a false positive because sending an ICMP message can not possibly re-enter the IP frag engine. [1] [ INFO: possible circular locking dependency detected ] 4.10.0+ #29 Not tainted ------------------------------------------------------- modprobe/12392 is trying to acquire lock: (_xmit_ETHER#2){+.-...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] (_xmit_ETHER#2){+.-...}, at: [] __netif_tx_lock include/linux/netdevice.h:3486 [inline] (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180 but task is already holding lock: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] (&(&q->lock)->rlock){+.-...}, at: [] ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(&q->lock)->rlock){+.-...}: validate_chain kernel/locking/lockdep.c:2267 [inline] __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340 lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:299 [inline] ip_defrag+0x3a2/0x4130 net/ipv4/ip_fragment.c:669 ip_check_defrag+0x4e3/0x8b0 net/ipv4/ip_fragment.c:713 packet_rcv_fanout+0x282/0x800 net/packet/af_packet.c:1459 deliver_skb net/core/dev.c:1834 [inline] dev_queue_xmit_nit+0x294/0xa90 net/core/dev.c:1890 xmit_one net/core/dev.c:2903 [inline] dev_hard_start_xmit+0x16b/0xab0 net/core/dev.c:2923 sch_direct_xmit+0x31f/0x6d0 net/sched/sch_generic.c:182 __dev_xmit_skb net/core/dev.c:3092 [inline] __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358 dev_queue_xmit+0x17/0x20 net/core/dev.c:3423 neigh_resolve_output+0x6b9/0xb10 net/core/neighbour.c:1308 neigh_output include/net/neighbour.h:478 [inline] ip_finish_output2+0x8b8/0x15a0 net/ipv4/ip_output.c:228 ip_do_fragment+0x1d93/0x2720 net/ipv4/ip_output.c:672 ip_fragment.constprop.54+0x145/0x200 net/ipv4/ip_output.c:545 ip_finish_output+0x82d/0xe10 net/ipv4/ip_output.c:314 NF_HOOK_COND include/linux/netfilter.h:246 [inline] ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404 dst_output include/net/dst.h:486 [inline] ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124 ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492 ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512 raw_sendmsg+0x26de/0x3a00 net/ipv4/raw.c:655 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:761 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x4a3/0x9f0 net/socket.c:1985 __sys_sendmmsg+0x25c/0x750 net/socket.c:2075 SYSC_sendmmsg net/socket.c:2106 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2101 do_syscall_64+0x2e8/0x930 arch/x86/entry/common.c:281 return_from_SYSCALL_64+0x0/0x7a -> #0 (_xmit_ETHER#2){+.-...}: check_prev_add kernel/locking/lockdep.c:1830 [inline] check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940 validate_chain kernel/locking/lockdep.c:2267 [inline] __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340 lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:299 [inline] __netif_tx_lock include/linux/netdevice.h:3486 [inline] sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180 __dev_xmit_skb net/core/dev.c:3092 [inline] __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358 dev_queue_xmit+0x17/0x20 net/core/dev.c:3423 neigh_hh_output include/net/neighbour.h:468 [inline] neigh_output include/net/neighbour.h:476 [inline] ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228 ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:246 [inline] ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404 dst_output include/net/dst.h:486 [inline] ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124 ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492 ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512 icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394 icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754 ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239 call_timer_fn+0x241/0x820 kernel/time/timer.c:1268 expire_timers kernel/time/timer.c:1307 [inline] __run_timers+0x960/0xcf0 kernel/time/timer.c:1601 run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614 __do_softirq+0x31f/0xbe7 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:657 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707 __read_once_size include/linux/compiler.h:254 [inline] atomic_read arch/x86/include/asm/atomic.h:26 [inline] rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline] __rcu_is_watching kernel/rcu/tree.c:1133 [inline] rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147 rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293 radix_tree_deref_slot include/linux/radix-tree.h:238 [inline] filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335 do_fault_around mm/memory.c:3231 [inline] do_read_fault mm/memory.c:3265 [inline] do_fault+0xbd5/0x2080 mm/memory.c:3370 handle_pte_fault mm/memory.c:3600 [inline] __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714 handle_mm_fault+0x1e2/0x480 mm/memory.c:3751 __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397 do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460 page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&q->lock)->rlock); lock(_xmit_ETHER#2); lock(&(&q->lock)->rlock); lock(_xmit_ETHER#2); *** DEADLOCK *** 10 locks held by modprobe/12392: #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x2b8/0xb60 arch/x86/mm/fault.c:1336 #1: (rcu_read_lock){......}, at: [] filemap_map_pages+0x1e6/0x1570 mm/filemap.c:2324 #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: [] pte_alloc_one_map mm/memory.c:2944 [inline] #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: [] alloc_set_pte+0x13b8/0x1b90 mm/memory.c:3072 #3: (((&q->timer))){+.-...}, at: [] lockdep_copy_map include/linux/lockdep.h:175 [inline] #3: (((&q->timer))){+.-...}, at: [] call_timer_fn+0x1c2/0x820 kernel/time/timer.c:1258 #4: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] #4: (&(&q->lock)->rlock){+.-...}, at: [] ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201 #5: (rcu_read_lock){......}, at: [] ip_expire+0x1b3/0x6c0 net/ipv4/ip_fragment.c:216 #6: (slock-AF_INET){+.-...}, at: [] spin_trylock include/linux/spinlock.h:309 [inline] #6: (slock-AF_INET){+.-...}, at: [] icmp_xmit_lock net/ipv4/icmp.c:219 [inline] #6: (slock-AF_INET){+.-...}, at: [] icmp_send+0x803/0x1c80 net/ipv4/icmp.c:681 #7: (rcu_read_lock_bh){......}, at: [] ip_finish_output2+0x2c1/0x15a0 net/ipv4/ip_output.c:198 #8: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x23e/0x1e60 net/core/dev.c:3324 #9: (dev->qdisc_running_key ?: &qdisc_running_key){+.....}, at: [] dev_queue_xmit+0x17/0x20 net/core/dev.c:3423 stack backtrace: CPU: 0 PID: 12392 Comm: modprobe Not tainted 4.10.0+ #29 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+0x2ee/0x3ef lib/dump_stack.c:52 print_circular_bug+0x307/0x3b0 kernel/locking/lockdep.c:1204 check_prev_add kernel/locking/lockdep.c:1830 [inline] check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940 validate_chain kernel/locking/lockdep.c:2267 [inline] __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340 lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:299 [inline] __netif_tx_lock include/linux/netdevice.h:3486 [inline] sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180 __dev_xmit_skb net/core/dev.c:3092 [inline] __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358 dev_queue_xmit+0x17/0x20 net/core/dev.c:3423 neigh_hh_output include/net/neighbour.h:468 [inline] neigh_output include/net/neighbour.h:476 [inline] ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228 ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:246 [inline] ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404 dst_output include/net/dst.h:486 [inline] ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124 ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492 ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512 icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394 icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754 ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239 call_timer_fn+0x241/0x820 kernel/time/timer.c:1268 expire_timers kernel/time/timer.c:1307 [inline] __run_timers+0x960/0xcf0 kernel/time/timer.c:1601 run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614 __do_softirq+0x31f/0xbe7 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:657 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707 RIP: 0010:__read_once_size include/linux/compiler.h:254 [inline] RIP: 0010:atomic_read arch/x86/include/asm/atomic.h:26 [inline] RIP: 0010:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline] RIP: 0010:__rcu_is_watching kernel/rcu/tree.c:1133 [inline] RIP: 0010:rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147 RSP: 0000:ffff8801c391f120 EFLAGS: 00000a03 ORIG_RAX: ffffffffffffff10 RAX: dffffc0000000000 RBX: ffff8801c391f148 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000055edd4374000 RDI: ffff8801dbe1ae0c RBP: ffff8801c391f1a0 R08: 0000000000000002 R09: 0000000000000000 R10: dffffc0000000000 R11: 0000000000000002 R12: 1ffff10038723e25 R13: ffff8801dbe1ae00 R14: ffff8801c391f680 R15: dffffc0000000000 rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293 radix_tree_deref_slot include/linux/radix-tree.h:238 [inline] filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335 do_fault_around mm/memory.c:3231 [inline] do_read_fault mm/memory.c:3265 [inline] do_fault+0xbd5/0x2080 mm/memory.c:3370 handle_pte_fault mm/memory.c:3600 [inline] __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714 handle_mm_fault+0x1e2/0x480 mm/memory.c:3751 __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397 do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460 page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011 RIP: 0033:0x7f83172f2786 RSP: 002b:00007fffe859ae80 EFLAGS: 00010293 RAX: 000055edd4373040 RBX: 00007f83175111c8 RCX: 000055edd4373238 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f8317510970 RBP: 00007fffe859afd0 R08: 0000000000000009 R09: 0000000000000000 R10: 0000000000000064 R11: 0000000000000000 R12: 000055edd4373040 R13: 0000000000000000 R14: 00007fffe859afe8 R15: 0000000000000000 Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 15bb7745e94a665caf42bfaabf0ce062845b533b Author: Eric Dumazet Date: Wed Mar 22 08:10:21 2017 -0700 tcp: initialize icsk_ack.lrcvtime at session start time icsk_ack.lrcvtime has a 0 value at socket creation time. tcpi_last_data_recv can have bogus value if no payload is ever received. This patch initializes icsk_ack.lrcvtime for active sessions in tcp_finish_connect(), and for passive sessions in tcp_create_openreq_child() Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_minisocks.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 1d2a6a5e4bf2921531071fcff8538623dce74efa Author: Stanislaw Gruszka Date: Wed Mar 22 16:08:33 2017 +0100 genetlink: fix counting regression on ctrl_dumpfamily() Commit 2ae0f17df1cd ("genetlink: use idr to track families") replaced if (++n < fams_to_skip) continue; into: if (n++ < fams_to_skip) continue; This subtle change cause that on retry ctrl_dumpfamily() call we omit one family that failed to do ctrl_fill_info() on previous call, because cb->args[0] = n number counts also family that failed to do ctrl_fill_info(). Patch fixes the problem and avoid confusion in the future just decrease n counter when ctrl_fill_info() fail. User visible problem caused by this bug is failure to get access to some genetlink family i.e. nl80211. However problem is reproducible only if number of registered genetlink families is big enough to cause second call of ctrl_dumpfamily(). Cc: Xose Vazquez Perez Cc: Larry Finger Cc: Johannes Berg Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") Signed-off-by: Stanislaw Gruszka Acked-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/genetlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a97e50cc4cb67e1e7bff56f6b41cda62ca832336 Author: Daniel Borkmann Date: Wed Mar 22 13:08:08 2017 +0100 socket, bpf: fix sk_filter use after free in sk_clone_lock In sk_clone_lock(), we create a new socket and inherit most of the parent's members via sock_copy() which memcpy()'s various sections. Now, in case the parent socket had a BPF socket filter attached, then newsk->sk_filter points to the same instance as the original sk->sk_filter. sk_filter_charge() is then called on the newsk->sk_filter to take a reference and should that fail due to hitting max optmem, we bail out and release the newsk instance. The issue is that commit 278571baca2a ("net: filter: simplify socket charging") wrongly combined the dismantle path with the failure path of xfrm_sk_clone_policy(). This means, even when charging failed, we call sk_free_unlock_clone() on the newsk, which then still points to the same sk_filter as the original sk. Thus, sk_free_unlock_clone() calls into __sk_destruct() eventually where it tests for present sk_filter and calls sk_filter_uncharge() on it, which potentially lets sk_omem_alloc wrap around and releases the eBPF prog and sk_filter structure from the (still intact) parent. Fix it by making sure that when sk_filter_charge() failed, we reset newsk->sk_filter back to NULL before passing to sk_free_unlock_clone(), so that we don't mess with the parents sk_filter. Only if xfrm_sk_clone_policy() fails, we did reach the point where either the parent's filter was NULL and as a result newsk's as well or where we previously had a successful sk_filter_charge(), thus for that case, we do need sk_filter_uncharge() to release the prior taken reference on sk_filter. Fixes: 278571baca2a ("net: filter: simplify socket charging") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/sock.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c64c0b3cac4c5b8cb093727d2c19743ea3965c0b Author: Eric Dumazet Date: Tue Mar 21 19:22:28 2017 -0700 ipv4: provide stronger user input validation in nl_fib_input() Alexander reported a KMSAN splat caused by reads of uninitialized field (tb_id_in) from user provided struct fib_result_nl It turns out nl_fib_input() sanity tests on user input is a bit wrong : User can pretend nlh->nlmsg_len is big enough, but provide at sendmsg() time a too small buffer. Reported-by: Alexander Potapenko Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8c290e60fa2a51806159522331c9ed41252a8fb3 Author: Alexei Starovoitov Date: Tue Mar 21 19:05:04 2017 -0700 bpf: fix hashmap extra_elems logic In both kmalloc and prealloc mode the bpf_map_update_elem() is using per-cpu extra_elems to do atomic update when the map is full. There are two issues with it. The logic can be misused, since it allows max_entries+num_cpus elements to be present in the map. And alloc_extra_elems() at map creation time can fail percpu alloc for large map values with a warn: WARNING: CPU: 3 PID: 2752 at ../mm/percpu.c:892 pcpu_alloc+0x119/0xa60 illegal size (32824) or align (8) for percpu allocation The fixes for both of these issues are different for kmalloc and prealloc modes. For prealloc mode allocate extra num_possible_cpus elements and store their pointers into extra_elems array instead of actual elements. Hence we can use these hidden(spare) elements not only when the map is full but during bpf_map_update_elem() that replaces existing element too. That also improves performance, since pcpu_freelist_pop/push is avoided. Unfortunately this approach cannot be used for kmalloc mode which needs to kfree elements after rcu grace period. Therefore switch it back to normal kmalloc even when full and old element exists like it was prior to commit 6c9059817432 ("bpf: pre-allocate hash map elements"). Add tests to check for over max_entries and large map values. Reported-by: Dave Jones Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 144 ++++++++++++++++---------------- tools/testing/selftests/bpf/test_maps.c | 29 ++++++- 2 files changed, 97 insertions(+), 76 deletions(-) commit dd1ef79120e1600cb48320cf80a612ee6510110c Author: Govindarajulu Varadarajan Date: Tue Mar 21 15:07:48 2017 -0700 enic: update enic maintainers update enic maintainers Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 31739eae738ccbe8b9d627c3f2251017ca03f4d2 Author: Doug Berger Date: Tue Mar 21 14:01:06 2017 -0700 net: bcmgenet: remove bcmgenet_internal_phy_setup() Commit 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset") removed the bcmgenet_mii_reset() function from bcmgenet_power_up() and bcmgenet_internal_phy_setup() functions. In so doing it broke the reset of the internal PHY devices used by the GENETv1-GENETv3 which required this reset before the UniMAC was enabled. It also broke the internal GPHY devices used by the GENETv4 because the config_init that installed the AFE workaround was no longer occurring after the reset of the GPHY performed by bcmgenet_phy_power_set() in bcmgenet_internal_phy_setup(). In addition the code in bcmgenet_internal_phy_setup() related to the "enable APD" comment goes with the bcmgenet_mii_reset() so it should have also been removed. Commit bd4060a6108b ("net: bcmgenet: Power on integrated GPHY in bcmgenet_power_up()") moved the bcmgenet_phy_power_set() call to the bcmgenet_power_up() function, but failed to remove it from the bcmgenet_internal_phy_setup() function. Had it done so, the bcmgenet_internal_phy_setup() function would have been empty and could have been removed at that time. Commit 5dbebbb44a6a ("net: bcmgenet: Software reset EPHY after power on") was submitted to correct the functional problems introduced by commit 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset"). It was included in v4.4 and made available on 4.3-stable. Unfortunately, it didn't fully revert the commit because this bcmgenet_mii_reset() doesn't apply the soft reset to the internal GPHY used by GENETv4 like the previous one did. This prevents the restoration of the AFE work- arounds for internal GPHY devices after the bcmgenet_phy_power_set() in bcmgenet_internal_phy_setup(). This commit takes the alternate approach of removing the unnecessary bcmgenet_internal_phy_setup() function which shouldn't have been in v4.3 so that when bcmgenet_mii_reset() was restored it should have only gone into bcmgenet_power_up(). This will avoid the problems while also removing the redundancy (and hopefully some of the confusion). Fixes: 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 15 --------------- 1 file changed, 15 deletions(-) commit d515684d78148884d5fc425ba904c50f03844020 Author: Alexander Potapenko Date: Tue Mar 21 17:14:27 2017 +0100 ipv6: make sure to initialize sockc.tsflags before first use In the case udp_sk(sk)->pending is AF_INET6, udpv6_sendmsg() would jump to do_append_data, skipping the initialization of sockc.tsflags. Fix the problem by moving sockc.tsflags initialization earlier. The bug was detected with KMSAN. Fixes: c14ac9451c34 ("sock: enable timestamping using control messages") Signed-off-by: Alexander Potapenko Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv6/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b33c0d2a1885b64dbd9e4c4513b8051c4d984c9 Merge: efad54a 2b396d3 Author: David S. Miller Date: Wed Mar 22 12:38:17 2017 -0700 Merge branch 'fjes-fixes' YASUAKI ISHIMATSU says: ==================== fjes: Do not load fjes driver The fjes driver is used only by FUJITSU servers and almost of all servers in the world never use it. But currently if ACPI PNP0C02 is defined in the ACPI table, the following message is always shown: "FUJITSU Extended Socket Network Device Driver - version 1.2 - Copyright (c) 2015 FUJITSU LIMITED" The message makes users confused because there is no reason that the message is shown in other vendor servers. To avoid the confusion, the patch adds several checks. v3: - Rebase on latest net tree. - Add _STA method check to avoid loading fjes driver. v2: - Order local variable declarations from longest to shortest line ==================== Signed-off-by: David S. Miller commit 2b396d302650f1ebb770ed758ddcf5a64328ffd5 Author: Yasuaki Ishimatsu Date: Tue Mar 21 11:46:35 2017 -0400 fjes: Do not load fjes driver if extended socket device is not power on. The extended device socket cannot turn on/off while system is running. So when system boots up and the device is not power on, the fjes driver does not need be loaded. To check the status of the device, the patch adds ACPI _STA method check. Signed-off-by: Yasuaki Ishimatsu CC: Taku Izumi Signed-off-by: David S. Miller drivers/net/fjes/fjes_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ac23d3cac1f339febd95c403a245ae072dfd0e84 Author: Yasuaki Ishimatsu Date: Tue Mar 21 11:44:25 2017 -0400 fjes: Do not load fjes driver if system does not have extended socket device. The fjes driver is used only by FUJITSU servers and almost of all servers in the world never use it. But currently if ACPI PNP0C02 is defined in the ACPI table, the following message is always shown: "FUJITSU Extended Socket Network Device Driver - version 1.2 - Copyright (c) 2015 FUJITSU LIMITED" The message makes users confused because there is no reason that the message is shown in other vendor servers. To avoid the confusion, the patch adds a check that the server has a extended socket device or not. Signed-off-by: Yasuaki Ishimatsu CC: Taku Izumi Signed-off-by: David S. Miller drivers/net/fjes/fjes_main.c | 52 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit efad54a115c22c5eee5ac89a027d07e06fafb706 Merge: bf601fe 8ab7e2a Author: David S. Miller Date: Wed Mar 22 12:11:14 2017 -0700 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox mlx5 fixes 2017-03-21 This series contains some mlx5 core and ethernet driver fixes. For -stable: net/mlx5e: Count LRO packets correctly (for kernel >= 4.2) net/mlx5e: Count GSO packets correctly (for kernel >= 4.2) net/mlx5: Increase number of max QPs in default profile (for kernel >= 4.0) net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps (for kernel >= 4.10) net/mlx5e: Use the proper UAPI values when offloading TC vlan actions (for kernel >= v4.9) net/mlx5: E-Switch, Don't allow changing inline mode when flows are configured (for kernel >= 4.10) net/mlx5e: Change the TC offload rule add/del code path to be per NIC or E-Switch (for kernel >= 4.10) net/mlx5: Add missing entries for set/query rate limit commands (for kernel >= 4.8) ==================== Signed-off-by: David S. Miller commit 8ab7e2ae15d84ba758b2c8c6f4075722e9bd2a08 Author: Gal Pressman Date: Tue Mar 21 15:59:19 2017 +0200 net/mlx5e: Count LRO packets correctly RX packets statistics ('rx_packets' counter) used to count LRO packets as one, even though it contains multiple segments. This patch will increment the counter by the number of segments, and align the driver with the behavior of other drivers in the stack. Note that no information is lost in this patch due to 'rx_lro_packets' counter existence. Before, ethtool showed: $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets" rx_packets: 435277 rx_lro_packets: 35847 rx_packets_phy: 1935066 Now, we will see the more logical statistics: $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets" rx_packets: 1935066 rx_lro_packets: 35847 rx_packets_phy: 1935066 Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Gal Pressman Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++++ 1 file changed, 4 insertions(+) commit d3a4e4da54c7adb420d5f48e89be913b14bdeff1 Author: Gal Pressman Date: Tue Mar 21 15:59:18 2017 +0200 net/mlx5e: Count GSO packets correctly TX packets statistics ('tx_packets' counter) used to count GSO packets as one, even though it contains multiple segments. This patch will increment the counter by the number of segments, and align the driver with the behavior of other drivers in the stack. Note that no information is lost in this patch due to 'tx_tso_packets' counter existence. Before, ethtool showed: $ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets" tx_packets: 61340 tx_tso_packets: 60954 tx_packets_phy: 2451115 Now, we will see the more logical statistics: $ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets" tx_packets: 2451115 tx_tso_packets: 60954 tx_packets_phy: 2451115 Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Gal Pressman Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5f40b4ed975c26016cf41953b7510fe90718e21c Author: Maor Gottlieb Date: Tue Mar 21 15:59:17 2017 +0200 net/mlx5: Increase number of max QPs in default profile With ConnectX-4 sharing SRQs from the same space as QPs, we hit a limit preventing some applications to allocate needed QPs amount. Double the size to 256K. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ad9a00ae0efc2e9337148d6c382fad3d27bf99a Author: Paul Blakey Date: Tue Mar 21 15:59:16 2017 +0200 net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps This was added to allow the TC offloading code to identify offloading encap/decap vxlan rules. The VF reps are effectively related to the same mlx5 PCI device as the PF. Since the kernel invokes the (say) delete ndo for each netdev, the FW erred on multiple vxlan dst port deletes when the port was deleted from the system. We fix that by keeping the registration to be carried out only by the PF. Since the PF serves as the uplink device, the VF reps will look up a port there and realize if they are ok to offload that. Tested: ip link add vxlan1 type vxlan id 44 dev ens5f0 dstport 9999 ip link set vxlan1 up ip link del dev vxlan1 Fixes: 4a25730eb202 ('net/mlx5e: Add ndo_udp_tunnel_add to VF representors') Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +++++++-- 4 files changed, 11 insertions(+), 12 deletions(-) commit 09c91ddf2cd33489c2c14edfef43ae38d412888e Author: Or Gerlitz Date: Tue Mar 21 15:59:15 2017 +0200 net/mlx5e: Use the proper UAPI values when offloading TC vlan actions Currently we use the non UAPI values and we miss erring on the modify action which is not supported, fix that. Fixes: 8b32580df1cb ('net/mlx5e: Add TC vlan action for SRIOV offloads') Signed-off-by: Or Gerlitz Reported-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 375f51e2b5b7b9a42b3139aea519cbb1bfc5d6ef Author: Roi Dayan Date: Tue Mar 21 15:59:14 2017 +0200 net/mlx5: E-Switch, Don't allow changing inline mode when flows are configured Changing the eswitch inline mode can potentially cause already configured flows not to match the policy. E.g. set policy L4, add some L4 rules, set policy to L2 --> bad! Hence we disallow it. Keep track of how many offloaded rules are now set and refuse inline mode changes if this isn't zero. Fixes: bffaa916588e ("net/mlx5: E-Switch, Add control for inline mode") Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit d85cdccbb3fe9a632ec9d0f4e4526c8c84fc3523 Author: Or Gerlitz Date: Tue Mar 21 15:59:13 2017 +0200 net/mlx5e: Change the TC offload rule add/del code path to be per NIC or E-Switch Refactor the code to deal with add/del TC rules to have handler per NIC/E-switch offloading use case, and push the latter into the e-switch code. This provides better separation and is to be used in down-stream patch for applying a fix. Fixes: bffaa916588e ("net/mlx5: E-Switch, Add control for inline mode") Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 59 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 ++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 14 +++++ 3 files changed, 58 insertions(+), 20 deletions(-) commit 1f30a86c58093046dc3e49c23d2618894e098f7a Author: Or Gerlitz Date: Tue Mar 21 15:59:12 2017 +0200 net/mlx5: Add missing entries for set/query rate limit commands The switch cases for the rate limit set and query commands were missing, which could get us wrong under fw error or driver reset flow, fix that. Fixes: 1466cc5b23d1 ('net/mlx5: Rate limit tables support') Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++ 1 file changed, 4 insertions(+) commit bf601fe52e8392082e1c0587ab5e34df97675a97 Merge: 557d054c 6be3b6c Author: David S. Miller Date: Wed Mar 22 12:06:49 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.11 iwlwifi * fix a user reported warning in DQA mwifiex * fix a potential double free * fix lost early debug logs * fix init wakeup warning message from device framework * add Ganapathi and Xinming as maintainers ath10k * fix regression with QCA6174 during resume and firmware crash ==================== Signed-off-by: David S. Miller commit 557d054c01da0337ca81de9e9d9206d57245b57e Author: Ying Xue Date: Tue Mar 21 10:47:49 2017 +0100 tipc: fix nametbl deadlock at tipc_nametbl_unsubscribe Until now, tipc_nametbl_unsubscribe() is called at subscriptions reference count cleanup. Usually the subscriptions cleanup is called at subscription timeout or at subscription cancel or at subscriber delete. We have ignored the possibility of this being called from other locations, which causes deadlock as we try to grab the tn->nametbl_lock while holding it already. CPU1: CPU2: ---------- ---------------- tipc_nametbl_publish spin_lock_bh(&tn->nametbl_lock) tipc_nametbl_insert_publ tipc_nameseq_insert_publ tipc_subscrp_report_overlap tipc_subscrp_get tipc_subscrp_send_event tipc_close_conn tipc_subscrb_release_cb tipc_subscrb_delete tipc_subscrp_put tipc_subscrp_put tipc_subscrp_kref_release tipc_nametbl_unsubscribe spin_lock_bh(&tn->nametbl_lock) <> CPU1: CPU2: ---------- ---------------- tipc_nametbl_stop spin_lock_bh(&tn->nametbl_lock) tipc_purge_publications tipc_nameseq_remove_publ tipc_subscrp_report_overlap tipc_subscrp_get tipc_subscrp_send_event tipc_close_conn tipc_subscrb_release_cb tipc_subscrb_delete tipc_subscrp_put tipc_subscrp_put tipc_subscrp_kref_release tipc_nametbl_unsubscribe spin_lock_bh(&tn->nametbl_lock) <> In this commit, we advance the calling of tipc_nametbl_unsubscribe() from the refcount cleanup to the intended callers. Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete") Reported-by: John Thompson Acked-by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/subscr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 581947787eaf1ad801959d00b42b9d0131aacb6a Author: Xin Long Date: Mon Mar 20 18:00:28 2017 +0800 sctp: remove useless err from sctp_association_init This patch is to remove the unnecessary temporary variable 'err' from sctp_association_init. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/associola.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1511949c61ec63e4b646c34d602ac6990b38ce30 Author: Xin Long Date: Mon Mar 20 17:46:27 2017 +0800 sctp: declare struct sctp_stream before using it sctp_stream_free uses struct sctp_stream as a param, but struct sctp_stream is defined after it's declaration. This patch is to declare struct sctp_stream before sctp_stream_free. Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf") Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + 1 file changed, 1 insertion(+) commit 07fef3623407444e51c12ea57cd91df38c1069e0 Author: Arnd Bergmann Date: Mon Mar 20 09:58:33 2017 +0100 cpsw/netcp: cpts depends on posix_timers With posix timers having become optional, we get a build error with the cpts time sync option of the CPSW driver: drivers/net/ethernet/ti/cpts.c: In function 'cpts_find_ts': drivers/net/ethernet/ti/cpts.c:291:23: error: implicit declaration of function 'ptp_classify_raw';did you mean 'ptp_classifier_init'? [-Werror=implicit-function-declaration] This adds a hard dependency on PTP_CLOCK to avoid the problem, as building it without PTP support makes no sense anyway. Fixes: baa73d9e478f ("posix-timers: Make them configurable") Cc: Nicolas Pitre Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Acked-by: Nicolas Pitre Signed-off-by: David S. Miller drivers/net/ethernet/ti/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be9ca0d33c850192198c22518eeb1f41401268e8 Author: Arnd Bergmann Date: Mon Mar 20 09:52:50 2017 +0100 cpsw/netcp: work around reverse cpts dependency The dependency is reversed: cpsw and netcp call into cpts, but cpts depends on the other two in Kconfig. This can lead to cpts being a loadable module and its callers built-in: drivers/net/ethernet/ti/cpsw.o: In function `cpsw_remove': cpsw.c:(.text.cpsw_remove+0xd0): undefined reference to `cpts_release' drivers/net/ethernet/ti/cpsw.o: In function `cpsw_rx_handler': cpsw.c:(.text.cpsw_rx_handler+0x2dc): undefined reference to `cpts_rx_timestamp' drivers/net/ethernet/ti/cpsw.o: In function `cpsw_tx_handler': cpsw.c:(.text.cpsw_tx_handler+0x7c): undefined reference to `cpts_tx_timestamp' drivers/net/ethernet/ti/cpsw.o: In function `cpsw_ndo_stop': As a workaround, I'm introducing another Kconfig symbol to control the compilation of cpts, while making the actual module controlled by a silent symbol that is =y when necessary. Fixes: 6246168b4a38 ("net: ethernet: ti: netcp: add support of cpts") Signed-off-by: Arnd Bergmann Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/Kconfig | 8 +++++++- drivers/net/ethernet/ti/Makefile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) commit 8fb106b28c68d6c81cf6d69773b8cfdbf657b94e Merge: a05d4fd b20cb60 Author: David S. Miller Date: Wed Mar 22 10:50:37 2017 -0700 Merge branch 'r8152-rx-settings' Hayes Wang says: ==================== r8152: fix the rx settings of RTL8153 The RMS and the rx early size should base on the same rx size. However, the RMS is set to 9K bytes now and the rx early depends on mtu. For using the rx buffer effectively, sync the two settings according to the mtu. ==================== Signed-off-by: David S. Miller commit b20cb60e2b865638459e6ec82ad3536d3734e555 Author: hayeswang Date: Mon Mar 20 16:13:45 2017 +0800 r8152: fix the rx early size of RTL8153 revert commit a59e6d815226 ("r8152: correct the rx early size") and fix the rx early size as (rx buffer size - rx packet size - rx desc size - alignment) / 4 Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 210c4f70b4c630b27f0840c8043c138c955edc9e Author: hayeswang Date: Mon Mar 20 16:13:44 2017 +0800 r8152: set the RMS of RTL8153 according to the mtu Set the received maximum size (RMS) according to the mtu size. It is unnecessary to receive a packet which is more than the size we could transmit. Besides, this could let the rx buffer be used effectively. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit a05d4fd9176003e0c1f9c3d083f4dac19fd346ab Author: Tejun Heo Date: Tue Mar 14 19:25:56 2017 -0400 cgroup, net_cls: iterate the fds of only the tasks which are being migrated The net_cls controller controls the classid field of each socket which is associated with the cgroup. Because the classid is per-socket attribute, when a task migrates to another cgroup or the configured classid of the cgroup changes, the controller needs to walk all sockets and update the classid value, which was implemented by 3b13758f51de ("cgroups: Allow dynamically changing net_classid"). While the approach is not scalable, migrating tasks which have a lot of fds attached to them is rare and the cost is born by the ones initiating the operations. However, for simplicity, both the migration and classid config change paths call update_classid() which scans all fds of all tasks in the target css. This is an overkill for the migration path which only needs to cover a much smaller subset of tasks which are actually getting migrated in. On cgroup v1, this can lead to unexpected scalability issues when one tries to migrate a task or process into a net_cls cgroup which already contains a lot of fds. Even if the migration traget doesn't have many to get scanned, update_classid() ends up scanning all fds in the target cgroup which can be extremely numerous. Unfortunately, on cgroup v2 which doesn't use net_cls, the problem is even worse. Before bfc2cf6f61fc ("cgroup: call subsys->*attach() only for subsystems which are actually affected by migration"), cgroup core would call the ->css_attach callback even for controllers which don't see actual migration to a different css. As net_cls is always disabled but still mounted on cgroup v2, whenever a process is migrated on the cgroup v2 hierarchy, net_cls sees identity migration from root to root and cgroup core used to call ->css_attach callback for those. The net_cls ->css_attach ends up calling update_classid() on the root net_cls css to which all processes on the system belong to as the controller isn't used. This makes any cgroup v2 migration O(total_number_of_fds_on_the_system) which is horrible and easily leads to noticeable stalls triggering RCU stall warnings and so on. The worst symptom is already fixed in upstream by bfc2cf6f61fc ("cgroup: call subsys->*attach() only for subsystems which are actually affected by migration"); however, backporting that commit is too invasive and we want to avoid other cases too. This patch updates net_cls's cgrp_attach() to iterate fds of only the processes which are actually getting migrated. This removes the surprising migration cost which is dependent on the total number of fds in the target cgroup. As this leaves write_classid() the only user of update_classid(), open-code the helper into write_classid(). Reported-by: David Goode Fixes: 3b13758f51de ("cgroups: Allow dynamically changing net_classid") Cc: stable@vger.kernel.org # v4.4+ Cc: Nina Schiff Cc: David S. Miller Signed-off-by: Tejun Heo Signed-off-by: David S. Miller net/core/netclassid_cgroup.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit f0c0cb99f74c03e2407ea553f6d46eb611e262b5 Author: Jon Mason Date: Tue Mar 21 16:51:19 2017 -0400 arm64: dts: NS2: Add dma-coherent to relevant DT entries Cache related issues with DMA rings and performance issues related to caching are being caused by not properly setting the "dma-coherent" flag in the device tree entries. Adding it here to correct the issue. Signed-off-by: Jon Mason Fixes: fd5e5dd56 ("arm64: dts: Add PCIe0 and PCIe4 DT nodes for NS2") Fixes: dddc3c9d7 ("arm64: dts: NS2: add AMAC ethernet support") Fixes: e79249143 ("arm64: dts: Add Broadcom Northstar2 device tree entries for PDC driver") Fixes: ac9aae00f ("arm64: dts: Add SATA3 AHCI and SATA3 PHY DT nodes for NS2") Fixes: efc877676 ("arm64: dts: Add SDHCI DT node for NS2") Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit afd0e5a876703accb95894f23317a13e2c49b523 Author: Neeraj Upadhyay Date: Wed Mar 22 17:08:25 2017 +0530 arm64: kaslr: Fix up the kernel image alignment If kernel image extends across alignment boundary, existing code increases the KASLR offset by size of kernel image. The offset is masked after resizing. There are cases, where after masking, we may still have kernel image extending across boundary. This eventually results in only 2MB block getting mapped while creating the page tables. This results in data aborts while accessing unmapped regions during second relocation (with kaslr offset) in __primary_switch. To fix this problem, round up the kernel image size, by swapper block size, before adding it for correction. For example consider below case, where kernel image still crosses 1GB alignment boundary, after masking the offset, which is fixed by rounding up kernel image size. SWAPPER_TABLE_SHIFT = 30 Swapper using section maps with section size 2MB. CONFIG_PGTABLE_LEVELS = 3 VA_BITS = 39 _text : 0xffffff8008080000 _end : 0xffffff800aa1b000 offset : 0x1f35600000 mask = ((1UL << (VA_BITS - 2)) - 1) & ~(SZ_2M - 1) (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c (_end + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d offset after existing correction (before mask) = 0x1f37f9b000 (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d (_end + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d offset (after mask) = 0x1f37e00000 (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c (_end + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d new offset w/ rounding up = 0x1f38000000 (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d (_end + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR") Cc: Reviewed-by: Ard Biesheuvel Signed-off-by: Neeraj Upadhyay Signed-off-by: Srinivas Ramana Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 9d3a4de4cb8db8e71730e36736272ef041836f68 Author: Robin Murphy Date: Thu Mar 16 17:00:16 2017 +0000 iommu: Disambiguate MSI region types The introduction of reserved regions has left a couple of rough edges which we could do with sorting out sooner rather than later. Since we are not yet addressing the potential dynamic aspect of software-managed reservations and presenting them at arbitrary fixed addresses, it is incongruous that we end up displaying hardware vs. software-managed MSI regions to userspace differently, especially since ARM-based systems may actually require one or the other, or even potentially both at once, (which iommu-dma currently has no hope of dealing with at all). Let's resolve the former user-visible inconsistency ASAP before the ABI has been baked into a kernel release, in a way that also lays the groundwork for the latter shortcoming to be addressed by follow-up patches. For clarity, rename the software-managed type to IOMMU_RESV_SW_MSI, use IOMMU_RESV_MSI to describe the hardware type, and document everything a little bit. Since the x86 MSI remapping hardware falls squarely under this meaning of IOMMU_RESV_MSI, apply that type to their regions as well, so that we tell the same story to userspace across all platforms. Secondly, as the various region types require quite different handling, and it really makes little sense to ever try combining them, convert the bitfield-esque #defines to a plain enum in the process before anyone gets the wrong impression. Fixes: d30ddcaa7b02 ("iommu: Add a new type field in iommu_resv_region") Reviewed-by: Eric Auger CC: Alex Williamson CC: David Woodhouse CC: kvm@vger.kernel.org Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/arm-smmu-v3.c | 2 +- drivers/iommu/arm-smmu.c | 2 +- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/iommu.c | 5 +++-- drivers/vfio/vfio_iommu_type1.c | 7 +++---- include/linux/iommu.h | 18 +++++++++++++----- 7 files changed, 23 insertions(+), 15 deletions(-) commit cd37a296a9f890586665bb8974a8b17ee2f17d6d Author: Marek Szyprowski Date: Mon Mar 20 10:17:57 2017 +0100 iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5 For some unknown reasons, in some cases, FLPD cache invalidation doesn't work properly with SYSMMU v5 controllers found in Exynos5433 SoCs. This can be observed by a firmware crash during initialization phase of MFC video decoder available in the mentioned SoCs when IOMMU support is enabled. To workaround this issue perform a full TLB/FLPD invalidation in case of replacing any first level page descriptors in case of SYSMMU v5. Fixes: 740a01eee9ada ("iommu/exynos: Add support for v5 SYSMMU") CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski Tested-by: Andrzej Hajda Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7d2aa6b814476a2e2794960f844344519246df72 Author: Marek Szyprowski Date: Mon Mar 20 10:17:56 2017 +0100 iommu/exynos: Block SYSMMU while invalidating FLPD cache Documentation specifies that SYSMMU should be in blocked state while performing TLB/FLPD cache invalidation, so add needed calls to sysmmu_block/unblock. Fixes: 66a7ed84b345d ("iommu/exynos: Apply workaround of caching fault page table entries") CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 95a49603707d982b25d17c5b70e220a05556a2f9 Author: Ming Lei Date: Wed Mar 22 10:14:43 2017 +0800 blk-mq: don't complete un-started request in timeout handler When iterating busy requests in timeout handler, if the STARTED flag of one request isn't set, that means the request is being processed in block layer or driver, and isn't submitted to hardware yet. In current implementation of blk_mq_check_expired(), if the request queue becomes dying, un-started requests are handled as being completed/freed immediately. This way is wrong, and can cause rq corruption or double allocation[1][2], when doing I/O and removing&resetting NVMe device at the sametime. This patch fixes several issues reported by Yi Zhang. [1]. oops log 1 [ 581.789754] ------------[ cut here ]------------ [ 581.789758] kernel BUG at block/blk-mq.c:374! [ 581.789760] invalid opcode: 0000 [#1] SMP [ 581.789761] Modules linked in: vfat fat ipmi_ssif intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm nvme irqbypass crct10dif_pclmul nvme_core crc32_pclmul ghash_clmulni_intel intel_cstate ipmi_si mei_me ipmi_devintf intel_uncore sg ipmi_msghandler intel_rapl_perf iTCO_wdt mei iTCO_vendor_support mxm_wmi lpc_ich dcdbas shpchp pcspkr acpi_power_meter wmi nfsd auth_rpcgss nfs_acl lockd dm_multipath grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm ahci libahci crc32c_intel tg3 libata megaraid_sas i2c_core ptp fjes pps_core dm_mirror dm_region_hash dm_log dm_mod [ 581.789796] CPU: 1 PID: 1617 Comm: kworker/1:1H Not tainted 4.10.0.bz1420297+ #4 [ 581.789797] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.2.5 09/06/2016 [ 581.789804] Workqueue: kblockd blk_mq_timeout_work [ 581.789806] task: ffff8804721c8000 task.stack: ffffc90006ee4000 [ 581.789809] RIP: 0010:blk_mq_end_request+0x58/0x70 [ 581.789810] RSP: 0018:ffffc90006ee7d50 EFLAGS: 00010202 [ 581.789811] RAX: 0000000000000001 RBX: ffff8802e4195340 RCX: ffff88028e2f4b88 [ 581.789812] RDX: 0000000000001000 RSI: 0000000000001000 RDI: 0000000000000000 [ 581.789813] RBP: ffffc90006ee7d60 R08: 0000000000000003 R09: ffff88028e2f4b00 [ 581.789814] R10: 0000000000001000 R11: 0000000000000001 R12: 00000000fffffffb [ 581.789815] R13: ffff88042abe5780 R14: 000000000000002d R15: ffff88046fbdff80 [ 581.789817] FS: 0000000000000000(0000) GS:ffff88047fc00000(0000) knlGS:0000000000000000 [ 581.789818] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 581.789819] CR2: 00007f64f403a008 CR3: 000000014d078000 CR4: 00000000001406e0 [ 581.789820] Call Trace: [ 581.789825] blk_mq_check_expired+0x76/0x80 [ 581.789828] bt_iter+0x45/0x50 [ 581.789830] blk_mq_queue_tag_busy_iter+0xdd/0x1f0 [ 581.789832] ? blk_mq_rq_timed_out+0x70/0x70 [ 581.789833] ? blk_mq_rq_timed_out+0x70/0x70 [ 581.789840] ? __switch_to+0x140/0x450 [ 581.789841] blk_mq_timeout_work+0x88/0x170 [ 581.789845] process_one_work+0x165/0x410 [ 581.789847] worker_thread+0x137/0x4c0 [ 581.789851] kthread+0x101/0x140 [ 581.789853] ? rescuer_thread+0x3b0/0x3b0 [ 581.789855] ? kthread_park+0x90/0x90 [ 581.789860] ret_from_fork+0x2c/0x40 [ 581.789861] Code: 48 85 c0 74 0d 44 89 e6 48 89 df ff d0 5b 41 5c 5d c3 48 8b bb 70 01 00 00 48 85 ff 75 0f 48 89 df e8 7d f0 ff ff 5b 41 5c 5d c3 <0f> 0b e8 71 f0 ff ff 90 eb e9 0f 1f 40 00 66 2e 0f 1f 84 00 00 [ 581.789882] RIP: blk_mq_end_request+0x58/0x70 RSP: ffffc90006ee7d50 [ 581.789889] ---[ end trace bcaf03d9a14a0a70 ]--- [2]. oops log2 [ 6984.857362] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 6984.857372] IP: nvme_queue_rq+0x6e6/0x8cd [nvme] [ 6984.857373] PGD 0 [ 6984.857374] [ 6984.857376] Oops: 0000 [#1] SMP [ 6984.857379] Modules linked in: ipmi_ssif vfat fat intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ipmi_si iTCO_wdt iTCO_vendor_support mxm_wmi ipmi_devintf intel_cstate sg dcdbas intel_uncore mei_me intel_rapl_perf mei pcspkr lpc_ich ipmi_msghandler shpchp acpi_power_meter wmi nfsd auth_rpcgss dm_multipath nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect crc32c_intel sysimgblt fb_sys_fops ttm nvme drm nvme_core ahci libahci i2c_core tg3 libata ptp megaraid_sas pps_core fjes dm_mirror dm_region_hash dm_log dm_mod [ 6984.857416] CPU: 7 PID: 1635 Comm: kworker/7:1H Not tainted 4.10.0-2.el7.bz1420297.x86_64 #1 [ 6984.857417] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.2.5 09/06/2016 [ 6984.857427] Workqueue: kblockd blk_mq_run_work_fn [ 6984.857429] task: ffff880476e3da00 task.stack: ffffc90002e90000 [ 6984.857432] RIP: 0010:nvme_queue_rq+0x6e6/0x8cd [nvme] [ 6984.857433] RSP: 0018:ffffc90002e93c50 EFLAGS: 00010246 [ 6984.857434] RAX: 0000000000000000 RBX: ffff880275646600 RCX: 0000000000001000 [ 6984.857435] RDX: 0000000000000fff RSI: 00000002fba2a000 RDI: ffff8804734e6950 [ 6984.857436] RBP: ffffc90002e93d30 R08: 0000000000002000 R09: 0000000000001000 [ 6984.857437] R10: 0000000000001000 R11: 0000000000000000 R12: ffff8804741d8000 [ 6984.857438] R13: 0000000000000040 R14: ffff880475649f80 R15: ffff8804734e6780 [ 6984.857439] FS: 0000000000000000(0000) GS:ffff88047fcc0000(0000) knlGS:0000000000000000 [ 6984.857440] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6984.857442] CR2: 0000000000000010 CR3: 0000000001c09000 CR4: 00000000001406e0 [ 6984.857443] Call Trace: [ 6984.857451] ? mempool_free+0x2b/0x80 [ 6984.857455] ? bio_free+0x4e/0x60 [ 6984.857459] blk_mq_dispatch_rq_list+0xf5/0x230 [ 6984.857462] blk_mq_process_rq_list+0x133/0x170 [ 6984.857465] __blk_mq_run_hw_queue+0x8c/0xa0 [ 6984.857467] blk_mq_run_work_fn+0x12/0x20 [ 6984.857473] process_one_work+0x165/0x410 [ 6984.857475] worker_thread+0x137/0x4c0 [ 6984.857478] kthread+0x101/0x140 [ 6984.857480] ? rescuer_thread+0x3b0/0x3b0 [ 6984.857481] ? kthread_park+0x90/0x90 [ 6984.857489] ret_from_fork+0x2c/0x40 [ 6984.857490] Code: 8b bd 70 ff ff ff 89 95 50 ff ff ff 89 8d 58 ff ff ff 44 89 95 60 ff ff ff e8 b7 dd 12 e1 8b 95 50 ff ff ff 48 89 85 68 ff ff ff <4c> 8b 48 10 44 8b 58 18 8b 8d 58 ff ff ff 44 8b 95 60 ff ff ff [ 6984.857511] RIP: nvme_queue_rq+0x6e6/0x8cd [nvme] RSP: ffffc90002e93c50 [ 6984.857512] CR2: 0000000000000010 [ 6984.895359] ---[ end trace 2d7ceb528432bf83 ]--- Cc: stable@vger.kernel.org Reported-by: Yi Zhang Tested-by: Yi Zhang Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 24a47426066c8ba16a4db1b20a41d63187281195 Author: Thibault Saunier Date: Wed Feb 1 18:05:21 2017 -0200 [media] exynos-gsc: Do not swap cb/cr for semi planar formats In the case of semi planar formats cb and cr are in the same plane in memory, meaning that will be set to 'cb' whatever the format is, and whatever the (packed) order of those components are. Suggested-by: Nicolas Dufresne Signed-off-by: Thibault Saunier Signed-off-by: Javier Martinez Canillas Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 2 -- 1 file changed, 2 deletions(-) commit 389e3f0d57e6ab50c207bee5ea2c4a5982a029c2 Author: Shailendra Verma Date: Fri Dec 2 02:48:01 2016 -0200 [media] bdisp: Clean up file handle in open() error path The File handle is not yet added in the vdev list.So no need to call v4l2_fh_del(&ctx->fh)if it fails to create control. Signed-off-by: Shailendra Verma Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e2e0eea072f6f82ac0afbcfa8dc38dcc3a29fa4 Author: Arnd Bergmann Date: Thu Feb 9 13:09:08 2017 -0200 [media] coda/imx-vdoa: platform_driver should not be const The device driver platform is actually written to during registration, for setting the owner field, so platform_driver_register() does not take a const pointer: drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_init': drivers/media/platform/coda/imx-vdoa.c:333:213: error: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] module_platform_driver(vdoa_driver); In file included from drivers/media/platform/coda/imx-vdoa.c:22:0: include/linux/platform_device.h:199:12: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *' extern int __platform_driver_register(struct platform_driver *, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_exit': drivers/media/platform/coda/imx-vdoa.c:333:626: error: passing argument 1 of 'platform_driver_unregister' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] Remove the modifier again. Fixes: d2fe28feaebb ("[media] coda/imx-vdoa: constify structs") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f83bf8da1135ca635aac8f062cad3f001fcf3a26 Author: Jeffy Chen Date: Tue Mar 21 15:07:10 2017 +0800 netfilter: nfnl_cthelper: Fix memory leak We have memory leaks of nf_conntrack_helper & expect_policy. Signed-off-by: Jeffy Chen Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 2c422257550f123049552b39f7af6e3428a60f43 Author: Pablo Neira Ayuso Date: Tue Mar 21 13:32:37 2017 +0100 netfilter: nfnl_cthelper: fix runtime expectation policy updates We only allow runtime updates of expectation policies for timeout and maximum number of expectations, otherwise reject the update. Signed-off-by: Pablo Neira Ayuso Acked-by: Liping Zhang net/netfilter/nfnetlink_cthelper.c | 86 +++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) commit 5c1724c42dc1d60addaa67106a4f25c2a9a140de Merge: c342356 70216fd Author: Greg Kroah-Hartman Date: Wed Mar 22 12:03:17 2017 +0100 Merge tag 'extcon-fixes-for-4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus Chanwoo writes: Update extcon for v4.11-rc3 This patch fixes issues for Intel INT3496 ACPI device as following: - Propagate error code of gpiod_to_irq(). - Set the ID pin as the input direction if firmware has the bug - Rename the gpio name for bining according to the documentation. - Add gpio acpi mapping table and the dependency on X86. - Use the devm_gpiod_get() instead of gpiod_get_index because of acpi mapping table. commit 43c49938bf72b2862aa12b5d66e710e15ce0f7b7 Merge: 4495c08 6985bd5 Author: Greg Kroah-Hartman Date: Wed Mar 22 12:02:01 2017 +0100 Merge tag 'iio-fixes-for-4.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Thirds set of IIO fixes for the 4.11 cycle. * core - iio sw-device - ensure configfs is enabled both when building as module and built in. * ak8974 - drop incorrect __exit markup on remove. * hid-sensor-trigger - code reorganise to avoid losing settings if a power cycle occurs during S3. * lsm6dsx - fix incorrect overwrite of parts of FIFO_CTRL2 register during watermark configuration. * ti-am335x - fix a hard to hit bug when reenabling from a fifo overrun by waiting for current cycle to finish. commit 5003ae1e735e6bfe4679d9bed6846274f322e77e Author: Koos Vriezen Date: Wed Mar 1 21:02:50 2017 +0100 iommu/vt-d: Fix NULL pointer dereference in device_to_iommu The function device_to_iommu() in the Intel VT-d driver lacks a NULL-ptr check, resulting in this oops at boot on some platforms: BUG: unable to handle kernel NULL pointer dereference at 00000000000007ab IP: [] device_to_iommu+0x11a/0x1a0 PGD 0 [...] Call Trace: ? find_or_alloc_domain.constprop.29+0x1a/0x300 ? dw_dma_probe+0x561/0x580 [dw_dmac_core] ? __get_valid_domain_for_dev+0x39/0x120 ? __intel_map_single+0x138/0x180 ? intel_alloc_coherent+0xb6/0x120 ? sst_hsw_dsp_init+0x173/0x420 [snd_soc_sst_haswell_pcm] ? mutex_lock+0x9/0x30 ? kernfs_add_one+0xdb/0x130 ? devres_add+0x19/0x60 ? hsw_pcm_dev_probe+0x46/0xd0 [snd_soc_sst_haswell_pcm] ? platform_drv_probe+0x30/0x90 ? driver_probe_device+0x1ed/0x2b0 ? __driver_attach+0x8f/0xa0 ? driver_probe_device+0x2b0/0x2b0 ? bus_for_each_dev+0x55/0x90 ? bus_add_driver+0x110/0x210 ? 0xffffffffa11ea000 ? driver_register+0x52/0xc0 ? 0xffffffffa11ea000 ? do_one_initcall+0x32/0x130 ? free_vmap_area_noflush+0x37/0x70 ? kmem_cache_alloc+0x88/0xd0 ? do_init_module+0x51/0x1c4 ? load_module+0x1ee9/0x2430 ? show_taint+0x20/0x20 ? kernel_read_file+0xfd/0x190 ? SyS_finit_module+0xa3/0xb0 ? do_syscall_64+0x4a/0xb0 ? entry_SYSCALL64_slow_path+0x25/0x25 Code: 78 ff ff ff 4d 85 c0 74 ee 49 8b 5a 10 0f b6 9b e0 00 00 00 41 38 98 e0 00 00 00 77 da 0f b6 eb 49 39 a8 88 00 00 00 72 ce eb 8f <41> f6 82 ab 07 00 00 04 0f 85 76 ff ff ff 0f b6 4d 08 88 0e 49 RIP [] device_to_iommu+0x11a/0x1a0 RSP CR2: 00000000000007ab ---[ end trace 16f974b6d58d0aad ]--- Add the missing pointer check. Fixes: 1c387188c60f53b338c20eee32db055dfe022a9b ("iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions") Signed-off-by: Koos Vriezen Cc: stable@vger.kernel.org # 4.8.15+ Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8466c581cca1a08b505f1319c3ecd246f16fa8 Author: Matt Redfearn Date: Tue Mar 21 14:52:25 2017 +0000 MIPS: IRQ Stack: Unwind IRQ stack onto task stack When the separate IRQ stack was introduced, stack unwinding only proceeded as far as the top of the IRQ stack, leading to kernel backtraces being less useful, lacking the trace of what was interrupted. Fix this by providing a means for the kernel to unwind the IRQ stack onto the interrupted task stack. The processor state is saved to the kernel task stack on interrupt. The IRQ_STACK_START macro reserves an unsigned long at the top of the IRQ stack where the interrupted task stack pointer can be saved. After the active stack is switched to the IRQ stack, save the interrupted tasks stack pointer to the reserved location. Fix the stack unwinding code to look for the frame being the top of the IRQ stack and if so get the next frame from the saved location. The existing test does not work with the separate stack since the ra is no longer pointed at ret_from_{irq,exception}. The test to stop unwinding the stack 32 bytes from the top of a stack must be modified to allow unwinding to continue up to the location of the saved task stack pointer when on the IRQ stack. The low / high marks of the stack are set depending on whether the sp is on an irq stack or not. Signed-off-by: Matt Redfearn Cc: Paolo Bonzini Cc: Marcin Nowakowski Cc: Masanari Iida Cc: Chris Metcalf Cc: James Hogan Cc: Paul Burton Cc: Ingo Molnar Cc: Jason A. Donenfeld Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15788/ Signed-off-by: Ralf Baechle arch/mips/include/asm/irq.h | 15 +++++++++++ arch/mips/kernel/asm-offsets.c | 1 + arch/mips/kernel/genex.S | 8 ++++-- arch/mips/kernel/process.c | 56 ++++++++++++++++++++++++++++-------------- 4 files changed, 60 insertions(+), 20 deletions(-) commit 70216fd937fea79c20705400540fa48f86ddf1c5 Author: Hans de Goede Date: Mon Mar 13 12:28:34 2017 +0100 extcon: int3496: Set the id pin to direction-input if necessary With the new more strict ACPI gpio code the dsdt's IoRestriction flags are honored on gpiod_get, but in some dsdt's it is wrong, so explicitly call gpiod_direction_input on the id gpio if necessary. This fixes the following errors when the int3496 code is used together with the new more strict ACPI gpio code: [ 2382.484415] gpio gpiochip1: (INT33FF:01): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ [ 2382.484425] gpio gpiochip1: (INT33FF:01): unable to lock HW IRQ 3 for IRQ [ 2382.484429] genirq: Failed to request resources for INT3496:00 (irq 174) on irqchip chv-gpio [ 2382.484518] intel-int3496 INT3496:00: can't request IRQ for USB ID GPIO: -22 [ 2382.500359] intel-int3496: probe of INT3496:00 failed with error -22 Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 3 +++ 1 file changed, 3 insertions(+) commit 408c5b41d215b317ab58c98b959454407ee4a53d Author: Hans de Goede Date: Fri Mar 10 21:52:08 2017 +0100 extcon: int3496: Use gpiod_get instead of gpiod_get_index Now that we've an acpi mapping table we should be using gpiod_get instead of gpiod_get_index. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 059c7874b87575e48d2c7702849ff56017059195 Author: Peter Robinson Date: Thu Mar 2 18:10:10 2017 +0000 extcon: int3496: Add dependency on X86 as it's Intel specific Add dependency on X86 so it doesn't show up on other arches and add a option for compile test so it still gets build coverage. Signed-off-by: Peter Robinson Signed-off-by: Chanwoo Choi drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cb2cbae45ae46b1e1be16950670d5c5d4408474 Author: Andy Shevchenko Date: Fri Feb 24 14:35:55 2017 +0200 extcon: int3496: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi Documentation/extcon/intel-int3496.txt | 5 +++++ drivers/extcon/extcon-intel-int3496.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 90400c5884b89a5db232049721ef4dc1ab2f1f1c Author: Andy Shevchenko Date: Fri Feb 24 14:35:54 2017 +0200 extcon: int3496: Rename GPIO pins in accordance with binding Update GPIO pin names in extcon-intel-int3496.c driver to follow the existing extcon binding. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25cd9721c2b16ee0d775e36ec3af31f392003f80 Author: Krzysztof Opasiak Date: Tue Jan 31 18:12:31 2017 +0100 usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held hidg->req should be accessed only with write_spinlock held as it is set to NULL when we get disabled by host. Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1f459262b0e1649a1e5ad12fa4c66eb76c2220ce Author: Gustavo A. R. Silva Date: Fri Mar 10 15:39:32 2017 -0600 usb: gadget: udc: remove pointer dereference after free Remove pointer dereference after free. Addresses-Coverity-ID: 1091173 Acked-by: Michal Nazarewicz Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pch_udc.c | 1 - 1 file changed, 1 deletion(-) commit 16bb05d98c904a4f6c5ce7e2d992299f794acbf2 Author: Roger Quadros Date: Wed Mar 8 16:05:44 2017 +0200 usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed As per USB3.0 Specification "Table 9-20. Standard Endpoint Descriptor", for interrupt and isochronous endpoints, wMaxPacketSize must be set to 1024 if the endpoint defines bMaxBurst to be greater than zero. Reviewed-by: Laurent Pinchart Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uvc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 09424c50b7dff40cb30011c09114404a4656e023 Author: Roger Quadros Date: Wed Mar 8 16:05:43 2017 +0200 usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval The streaming_maxburst module parameter is 0 offset (0..15) so we must add 1 while using it for wBytesPerInterval calculation for the SuperSpeed companion descriptor. Without this host uvcvideo driver will always see the wrong wBytesPerInterval for SuperSpeed uvc gadget and may not find a suitable video interface endpoint. e.g. for streaming_maxburst = 0 case it will always fail as wBytePerInterval was evaluating to 0. Cc: stable@vger.kernel.org Reviewed-by: Laurent Pinchart Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74098c4ac782afd71b35ac56f9536ae2f5cd7da7 Author: Oliver Neukum Date: Tue Mar 14 12:09:56 2017 +0100 usb: gadget: acm: fix endianness in notifications The gadget code exports the bitfield for serial status changes over the wire in its internal endianness. The fix is to convert to little endian before sending it over the wire. Signed-off-by: Oliver Neukum Tested-by: 家瑋 CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_acm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit de288e36fe33f7e06fa272bc8e2f85aa386d99aa Author: Janusz Dziedzic Date: Mon Mar 13 14:11:32 2017 +0200 usb: dwc3: gadget: delay unmap of bounced requests In the case of bounced ep0 requests, we must delay DMA operation until after ->complete() otherwise we might overwrite contents of req->buf. This caused problems with RNDIS gadget. Signed-off-by: Janusz Dziedzic Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 26a37ab319a26d330bab298770d692bb9c852aff Author: Tony Luck Date: Mon Mar 20 14:40:30 2017 -0700 x86/mce: Fix copy/paste error in exception table entries Back in commit: 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()") ... I made a copy/paste error setting up the exception table entries and ended up with two for label .L_cache_w3 and none for .L_cache_w2. This means that if we take a machine check on: .L_cache_w2: movq 2*8(%rsi), %r10 then we don't have an exception table entry for this instruction and we can't recover. Fix: s/3/2/ Signed-off-by: Tony Luck Cc: 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 Fixes: 92b0729c34cab ("x86/mm, x86/mce: Add memcpy_mcsafe()") Link: http://lkml.kernel.org/r/1490046030-25862-1-git-send-email-tony.luck@intel.com Signed-off-by: Ingo Molnar arch/x86/lib/memcpy_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca681ec860d6533b8debda4f6ab2e70e6d519d89 Author: Harald Freudenberger Date: Wed Mar 15 10:58:07 2017 +0100 s390/pkey: Fix wrong handling of secure key with old MKVP When a secure key with an old Master Key Verification Pattern was given to the pkey_findcard function, there was no responsible card found because only the current MKVP of each card was compared. With this fix also the old MKVP values are considered and so a matching card able to handle the key is reported back to the caller. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/pkey_api.c | 53 +++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit 0861b5a754fd5539f527b445aaa61538185c8264 Author: Heiko Carstens Date: Thu Mar 16 11:02:36 2017 +0100 s390/smp: fix ipl from cpu with non-zero address Commit af51160ebd3c ("s390/smp: initialize cpu_present_mask in setup_arch") initializes the cpu_present_mask much earlier than before. However the cpu detection code relies on the fact that iff logical cpu 0 is marked present then also the corresponding physical cpu address within the pcpu_devices array slot is valid. Since commit 44fd22992cb7 ("[PATCH] Register the boot-cpu in the cpu maps earlier") this assumption is not true anymore. The patch marks logical cpu 0 as present in common code without that architecture code had a chance to setup the logical to physical map. With that change the cpu detection code assumes that the physical cpu address of cpu 0 is also 0, which is not necessarily true. Subsequently the physical cpu address of the ipl cpu will be mapped to a different logical cpu. If that cpu is brought online later the ipl cpu will send itself an initial cpu reset sigp signal. This in turn completely resets the ipl cpu and the system stops working. A dump of such a system looks like a "store status" has been forgotten. But actually the kernel itself removed all traces which would allow to easily tell what went wrong. To fix this initialize the logical to physical cpu address already in smp_setup_processor_id(). In addition remove the initialization of the cpu_present_mask and cpu_online_mask for cpu 0, since that has already been done. Also add a sanity check, just in case common code will be changed again... The problem can be easily reproduced within a z/VM guest: > chcpu -d 0 > vmcp ipl Fixes: af51160ebd3c ("s390/smp: initialize cpu_present_mask in setup_arch") Reported-by: Sebastian Ott Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d82c0d12c92705ef468683c9b7a8298dd61ed191 Author: Marcelo Henrique Cerri Date: Mon Mar 13 12:14:58 2017 -0300 s390/decompressor: fix initrd corruption caused by bss clear Reorder the operations in decompress_kernel() to ensure initrd is moved to a safe location before the bss section is zeroed. During decompression bss can overlap with the initrd and this can corrupt the initrd contents depending on the size of the compressed kernel (which affects where the initrd is placed by the bootloader) and the size of the bss section of the decompressor. Also use the correct initrd size when checking for overlaps with parmblock. Fixes: 06c0dd72aea3 ([S390] fix boot failures with compressed kernels) Cc: stable@vger.kernel.org Reviewed-by: Joy Latten Reviewed-by: Vineetha HariPai Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/misc.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit a5023a99393dab276069cd60dad3e61d57720fda Author: Peter Huewe Date: Fri Mar 17 00:28:56 2017 +0100 hwmon: Add missing HWMON_T_ALARM Unfortunately the HWMON_T_ALARM define was missing, although the associated entry was present in hwmon_temp_attributes. This is needed to convert drivers to the new interface which use channel based alarms. Signed-off-by: Peter Huewe Signed-off-by: Guenter Roeck include/linux/hwmon.h | 1 + 1 file changed, 1 insertion(+) commit 8358378b22518d92424597503d3c1cd302a490b6 Author: Guenter Roeck Date: Sun Mar 12 06:18:58 2017 -0700 hwmon: (it87) Avoid registering the same chip on both SIO addresses IT8705F is known to respond on both SIO addresses. Registering it twice may result in system lockups. Reported-by: Russell King Fixes: e84bd9535e2b ("hwmon: (it87) Add support for second Super-IO chip") Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit dd7406dd334a98ada3ff5371847a3eeb4ba16313 Author: Alex Hemme Date: Tue Mar 7 14:38:29 2017 -0500 hwmon: (max31790) Set correct PWM value Traced fans not spinning to incorrect PWM value being written. The passed in value was written instead of the calulated value. Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API") Signed-off-by: Alex Hemme Signed-off-by: Guenter Roeck drivers/hwmon/max31790.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea33c2c2051a266f68d9cd920c789cec828c8f11 Author: Quentin Schulz Date: Tue Mar 21 16:36:01 2017 +0100 ARM: sun8i: a33: add operating-points-v2 property to all nodes The OPP are declared as shared but no operating points are declared for cpu1, 2 and 3. Thus, the following error happens during the boot: cpu cpu1: dev_pm_opp_of_get_sharing_cpus: Couldn't find tcpu_dev node. This patch applies the operating points to each cpu of the A33. Fixes: 03749eb88e63 ("ARM: dts: sun8i: add opp-v2 table for A33") Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ad4830051aac0b967add82ac168f49edf11f01a0 Author: Mike Travis Date: Tue Mar 21 18:16:47 2017 -0500 x86/platform/uv: Fix calculation of Global Physical Address The calculation of the global physical address (GPA) on UV4 is incorrect. The gnode_extra/upper global offset should only be applied for fixed address space systems (UV1..3). Tested-by: John Estabrook Signed-off-by: Mike Travis Cc: Dimitri Sivanich Cc: John Estabrook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170321231646.667689538@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_hub.h | 8 +++++--- arch/x86/kernel/apic/x2apic_uv_x.c | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) commit bc2d4b62db67f817b09c782219996630e9c2f5e2 Author: Changbin Du Date: Wed Mar 22 12:35:31 2017 +0800 drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request In my previous Commit ab9da627906a ("drm/i915: make context status notifier head be per engine") rely on scheduler->current_workload[x] to distinguish gvt spacial request from i915 request. But this is not always true since no synchronization between workload_thread and lrc irq handler. lrc irq handler workload_thread ---- ---- pick i915 requests; intel_vgpu_submit_execlist(); current_workload[x] = xxx; shadow_context_status_change(); Then current_workload[x] is not null but current request is of i915 self. So instead we check ctx flag CONTEXT_FORCE_SINGLE_SUBMISSION. Only gvt request set this flag and always set. v2: Reverse the order of multi-condition 'if' statement. Fixes: ab9da6279 ("drm/i915: make context status notifier head be per engine") Signed-off-by: Changbin Du Reviewed-by: Yulei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4071898bf0f4d79ff353db327af2a15123272548 Author: Tony Lindgren Date: Sun Mar 19 09:19:57 2017 -0700 net: qmi_wwan: Add USB IDs for MDM6600 modem on Motorola Droid 4 This gets qmicli working with the MDM6600 modem. Cc: Bjørn Mork Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 4 ++++ 1 file changed, 4 insertions(+) commit e8f1f34a344d060eaf1918089369c4c1172a153b Author: Zi Shen Lim Date: Sun Mar 19 23:03:14 2017 -0700 selftests/bpf: fix broken build, take 2 Merge of 'linux-kselftest-4.11-rc1': 1. Partially removed use of 'test_objs' target, breaking force rebuild of BPFOBJ, introduced in commit d498f8719a09 ("bpf: Rebuild bpf.o for any dependency update"). Update target so dependency on BPFOBJ is restored. 2. Introduced commit 2047f1d8ba28 ("selftests: Fix the .c linking rule") which fixes order of LDLIBS. Commit d02d8986a768 ("bpf: Always test unprivileged programs") added libcap dependency into CFLAGS. Use LDLIBS instead to fix linking of test_verifier. 3. Introduced commit d83c3ba0b926 ("selftests: Fix selftests build to just build, not run tests"). Reordering the Makefile allows us to remove the 'all' target. Tested both: selftests/bpf$ make and selftests$ make TARGETS=bpf on Ubuntu 16.04.2. Signed-off-by: Zi Shen Lim Acked-by: Daniel Borkmann Tested-by: Daniel Borkmann Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Acked-by: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 4ef1b2869447411ad3ef91ad7d4891a83c1a509a Author: Soheil Hassas Yeganeh Date: Sat Mar 18 17:03:00 2017 -0400 tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS SOF_TIMESTAMPING_OPT_STATS can be enabled and disabled while packets are collected on the error queue. So, checking SOF_TIMESTAMPING_OPT_STATS in sk->sk_tsflags is not enough to safely assume that the skb contains OPT_STATS data. Add a bit in sock_exterr_skb to indicate whether the skb contains opt_stats data. Fixes: 1c885808e456 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING") Reported-by: JongHwan Kim Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/linux/errqueue.h | 2 ++ net/core/skbuff.c | 17 +++++++++++------ net/socket.c | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit 8605330aac5a5785630aec8f64378a54891937cc Author: Soheil Hassas Yeganeh Date: Sat Mar 18 17:02:59 2017 -0400 tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timestamp are from the error queue, containing OPT_STATS in the content of the skb. This results in accessing invalid memory or generating junk data. To fix this, set skb->pkt_type to PACKET_OUTGOING for packets on the error queue. This is safe because on the receive path on local sockets skb->pkt_type is never set to PACKET_OUTGOING. With that, copy OPT_STATS from a packet, only if its pkt_type is PACKET_OUTGOING. Fixes: 1c885808e456 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING") Reported-by: JongHwan Kim Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 10 ++++++++++ net/socket.c | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit ff010472fb75670cb5c08671e820eeea3af59c87 Author: Viresh Kumar Date: Tue Mar 21 11:36:06 2017 +0530 cpufreq: Restore policy min/max limits on CPU online On CPU online the cpufreq core restores the previous governor (or the previous "policy" setting for ->setpolicy drivers), but it does not restore the min/max limits at the same time, which is confusing, inconsistent and real pain for users who set the limits and then suspend/resume the system (using full suspend), in which case the limits are reset on all CPUs except for the boot one. Fix this by making cpufreq_online() restore the limits when an inactive policy is brought online. The commit log and patch are inspired from Rafael's earlier work. Reported-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar Cc: 4.3+ # 4.3+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) commit 23bb09cfbe04076ef647da3889a5a5ab6cbe6f15 Author: Xin Long Date: Sat Mar 18 20:03:59 2017 +0800 sctp: out_qlen should be updated when pruning unsent queue This patch is to fix the issue that sctp_prsctp_prune_sent forgot to update q->out_qlen when removing a chunk from unsent queue. Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/outqueue.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1f904495b79003cd3d881de8731377d48fcbc7e3 Author: Xin Long Date: Sat Mar 18 19:27:23 2017 +0800 sctp: define dst_pending_confirm as a bit in sctp_transport As tp->dst_pending_confirm's value can only be set 0 or 1, this patch is to change to define it as a bit instead of __u32. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 486a43db2e26b87125b5629e1ade516f90833934 Author: Xin Long Date: Sat Mar 18 19:12:22 2017 +0800 sctp: remove temporary variable confirm from sctp_packet_transmit Commit c86a773c7802 ("sctp: add dst_pending_confirm flag") introduced a temporary variable "confirm" in sctp_packet_transmit. But it broke the rule that longer lines should be above shorter ones. Besides, this variable is not necessary, so this patch is to just remove it and use tp->dst_pending_confirm directly. Fixes: c86a773c7802 ("sctp: add dst_pending_confirm flag") Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/output.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3dc857f0e8fc22610a59cbb346ba62c6e921863f Author: David Ahern Date: Fri Mar 17 16:07:11 2017 -0700 net: vrf: Reset rt6i_idev in local dst after put The VRF driver takes a reference to the inet6_dev on the VRF device for its rt6_local dst when handling local traffic through the VRF device as a loopback. When the device is deleted the driver does a put on the idev but does not reset rt6i_idev in the rt6_info struct. When the dst is destroyed, dst_destroy calls ip6_dst_destroy which does a second put for what is essentially the same reference causing it to be prematurely freed. Reset rt6i_idev after the put in the vrf driver. Fixes: b4869aa2f881e ("net: vrf: ipv6 support for local traffic to local addresses") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13e2d5187f6b965ba3556caedb914baf81b98ed2 Author: Dan Carpenter Date: Fri Mar 17 23:52:35 2017 +0300 bna: integer overflow bug in debugfs We could allocate less memory than intended because we do: bnad->regdata = kzalloc(len << 2, GFP_KERNEL); The shift can overflow leading to a crash. This is debugfs code so the impact is very small. Fixes: 7afc5dbde091 ("bna: Add debugfs interface.") Signed-off-by: Dan Carpenter Acked-by: Rasesh Mody Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6479ca8e59d1df54f8406e4c604bc2bf47241b2b Merge: 6014ce8 60b89f1 Author: Olof Johansson Date: Tue Mar 21 17:32:54 2017 -0700 Merge tag 'at91-ab-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes Fixes for 4.11: - Fix USB host for sama5d2 - Fix cpuidle on sama5 * tag 'at91-ab-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: pm: cpu_idle: switch DDR to power-down mode Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node" Signed-off-by: Olof Johansson commit 6014ce8559934580c919485fdc96b4d2d4b18c12 Merge: 2b25930 0ca10b6 Author: Olof Johansson Date: Tue Mar 21 17:30:51 2017 -0700 Merge tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux into fixes Reset controller fixes for v4.11 Fix optional reset_control_get_stubs to return NULL and remove warnings from reset_control_* stubs. This fixes commit bb475230b8e5 ("reset: make optional functions really optional"), which was merged in reset-for-4.11, and would cause consumer drivers depending on the new behaviour of optional resets to fail probing if RESET_CONTROLLER Kconfig option is disabled. * tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux: reset: fix optional reset_control_get stubs to return NULL Signed-off-by: Olof Johansson commit 2b259300d2641101847e4ad9ad1723525ad9c476 Merge: fe64ccb 9693219 Author: Olof Johansson Date: Tue Mar 21 17:30:16 2017 -0700 Merge tag 'sunxi-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes Allwinner fixes for 4.11 A bunch of device tree fixes for various boards / SoCs. * tag 'sunxi-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings ARM: sun8i: Fix the mali clock rate Signed-off-by: Olof Johansson commit fe64ccb2f539defc662523b61eae69fd184afde0 Merge: 42d5d46 12aff99 Author: Olof Johansson Date: Tue Mar 21 17:29:50 2017 -0700 Merge tag 'imx-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.11: - A fix to reboot hang seen on imx6sx-udoo-neo board, by removing arm-supply and soc-supply and using LDO enabled mode. * tag 'imx-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6sx-udoo-neo: Fix reboot hang Signed-off-by: Olof Johansson commit 6bd845d1cf98b45c634baacb8381436dad3c2dd0 Author: Bjørn Mork Date: Fri Mar 17 17:20:48 2017 +0100 qmi_wwan: add Dell DW5811e This is a Dell branded Sierra Wireless EM7455. It is operating in MBIM mode by default, but can be configured to provide two QMI/RMNET functions. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 2 ++ 1 file changed, 2 insertions(+) commit aea92fb2e09e29653b023d4254ac9fbf94221538 Author: Eric Dumazet Date: Fri Mar 17 08:05:28 2017 -0700 sch_dsmark: fix invalid skb_cow() usage skb_cow(skb, sizeof(ip header)) is not very helpful in this context. First we need to use pskb_may_pull() to make sure the ip header is in skb linear part, then use skb_try_make_writable() to address clones issues. Fixes: 4c30719f4f55 ("[PKT_SCHED] dsmark: handle cloned and non-linear skb's") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_dsmark.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 09050957fae896e001498af1aa35c446a11cb47d Author: Yaroslav Isakov Date: Thu Mar 16 22:44:10 2017 +0300 tun: fix inability to set offloads after disabling them via ethtool Added missing logic in tun driver, which prevents apps to set offloads using tun ioctl, if offloads were previously disabled via ethtool Signed-off-by: Yaroslav Isakov Signed-off-by: David S. Miller drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) commit 7df9c24625b9981779afb8fcdbe2bb4765e61147 Author: Andrey Ulanov Date: Tue Mar 14 20:16:42 2017 -0700 net: unix: properly re-increment inflight counter of GC discarded candidates Dmitry has reported that a BUG_ON() condition in unix_notinflight() may be triggered by a simple code that forwards unix socket in an SCM_RIGHTS message. That is caused by incorrect unix socket GC implementation in unix_gc(). The GC first collects list of candidates, then (a) decrements their "children's" inflight counter, (b) checks which inflight counters are now 0, and then (c) increments all inflight counters back. (a) and (c) are done by calling scan_children() with inc_inflight or dec_inflight as the second argument. Commit 6209344f5a37 ("net: unix: fix inflight counting bug in garbage collector") changed scan_children() such that it no longer considers sockets that do not have UNIX_GC_CANDIDATE flag. It also added a block of code that that unsets this flag _before_ invoking scan_children(, dec_iflight, ). This may lead to incorrect inflight counters for some sockets. This change fixes this bug by changing order of operations: UNIX_GC_CANDIDATE is now unset only after all inflight counters are restored to the original state. kernel BUG at net/unix/garbage.c:149! RIP: 0010:[] [] unix_notinflight+0x3b4/0x490 net/unix/garbage.c:149 Call Trace: [] unix_detach_fds.isra.19+0xff/0x170 net/unix/af_unix.c:1487 [] unix_destruct_scm+0xf9/0x210 net/unix/af_unix.c:1496 [] skb_release_head_state+0x101/0x200 net/core/skbuff.c:655 [] skb_release_all+0x1a/0x60 net/core/skbuff.c:668 [] __kfree_skb+0x1a/0x30 net/core/skbuff.c:684 [] kfree_skb+0x184/0x570 net/core/skbuff.c:705 [] unix_release_sock+0x5b5/0xbd0 net/unix/af_unix.c:559 [] unix_release+0x49/0x90 net/unix/af_unix.c:836 [] sock_release+0x92/0x1f0 net/socket.c:570 [] sock_close+0x1b/0x20 net/socket.c:1017 [] __fput+0x34e/0x910 fs/file_table.c:208 [] ____fput+0x1a/0x20 fs/file_table.c:244 [] task_work_run+0x1a0/0x280 kernel/task_work.c:116 [< inline >] exit_task_work include/linux/task_work.h:21 [] do_exit+0x183a/0x2640 kernel/exit.c:828 [] do_group_exit+0x14e/0x420 kernel/exit.c:931 [] get_signal+0x663/0x1880 kernel/signal.c:2307 [] do_signal+0xc5/0x2190 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0x1ea/0x2d0 arch/x86/entry/common.c:156 [< inline >] prepare_exit_to_usermode arch/x86/entry/common.c:190 [] syscall_return_slowpath+0x4d3/0x570 arch/x86/entry/common.c:259 [] entry_SYSCALL_64_fastpath+0xc4/0xc6 Link: https://lkml.org/lkml/2017/3/6/252 Signed-off-by: Andrey Ulanov Reported-by: Dmitry Vyukov Fixes: 6209344 ("net: unix: fix inflight counting bug in garbage collector") Signed-off-by: David S. Miller net/unix/garbage.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0be032c190abcdcfa948082b6a1e0d461184ba4d Author: Huacai Chen Date: Thu Mar 16 21:00:29 2017 +0800 MIPS: c-r4k: Fix Loongson-3's vcache/scache waysize calculation If scache.waysize is 0, r4k___flush_cache_all() will do nothing and then cause bugs. BTW, though vcache.waysize isn't being used by now, we also fix its calculation. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15756/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 2 ++ 1 file changed, 2 insertions(+) commit a59d376d9e4d2f9284e046a26dd7790a6781b00e Merge: 8a0f5cc 380feae Author: David S. Miller Date: Tue Mar 21 14:41:47 2017 -0700 Merge branch 'vsock-pkt-cancel' Peng Tao says: ==================== vsock: cancel connect packets when failing to connect Currently, if a connect call fails on a signal or timeout (e.g., guest is still in the process of starting up), we'll just return to caller and leave the connect packet queued and they are sent even though the connection is considered a failure, which can confuse applications with unwanted false connect attempt. The patchset enables vsock (both host and guest) to cancel queued packets when a connect attempt is considered to fail. v5 changelog: - change virtio_vsock_pkt->cancel_token back to virtio_vsock_pkt->vsk v4 changelog: - drop two unnecessary void * cast - update new callback comment v3 changelog: - define cancel_pkt callback in struct vsock_transport rather than struct virtio_transport - rename virtio_vsock_pkt->vsk to virtio_vsock_pkt->cancel_token v2 changelog: - fix queued_replies counting and resume tx/rx when necessary ==================== Signed-off-by: David S. Miller commit 380feae0def7e6a115124a3219c3ec9b654dca32 Author: Peng Tao Date: Wed Mar 15 09:32:17 2017 +0800 vsock: cancel packets when failing to connect Otherwise we'll leave the packets queued until releasing vsock device. E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest will get the connect requests from failed host sockets. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Peng Tao Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 073b4f2c50fe67c7c66a059a4d6db52bb1465490 Author: Peng Tao Date: Wed Mar 15 09:32:16 2017 +0800 vsock: add pkt cancel capability Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 16320f363ae128d9b9c70e60f00f2a572f57c23d Author: Peng Tao Date: Wed Mar 15 09:32:15 2017 +0800 vhost-vsock: add pkt cancel capability To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Peng Tao Signed-off-by: David S. Miller drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) commit 36d277bac8080202684e67162ebb157f16631581 Author: Peng Tao Date: Wed Mar 15 09:32:14 2017 +0800 vsock: track pkt owner vsock So that we can cancel a queued pkt later if necessary. Signed-off-by: Peng Tao Signed-off-by: David S. Miller include/linux/virtio_vsock.h | 3 +++ net/vmw_vsock/virtio_transport_common.c | 7 +++++++ 2 files changed, 10 insertions(+) commit 8a0f5ccfb33b0b8b51de65b7b3bf342ba10b4fb6 Author: Herbert Xu Date: Tue Mar 14 18:25:57 2017 +0800 crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex On Tue, Mar 14, 2017 at 10:44:10AM +0100, Dmitry Vyukov wrote: > > Yes, please. > Disregarding some reports is not a good way long term. Please try this patch. ---8<--- Subject: netlink: Annotate nlk cb_mutex by protocol Currently all occurences of nlk->cb_mutex are annotated by lockdep as a single class. This causes a false lcokdep cycle involving genl and crypto_user. This patch fixes it by dividing cb_mutex into individual classes based on the netlink protocol. As genl and crypto_user do not use the same netlink protocol this breaks the false dependency loop. Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/netlink/af_netlink.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 98d068ab52b4b11d403995ed14154660797e7136 Author: hayeswang Date: Tue Mar 14 14:15:20 2017 +0800 r8152: fix the list rx_done may be used without initialization The list rx_done would be initialized when the linking on occurs. Therefore, if a napi is scheduled without any linking on before, the following kernel panic would happen. BUG: unable to handle kernel NULL pointer dereference at 000000000000008 IP: [] r8152_poll+0xe1e/0x1210 [r8152] PGD 0 Oops: 0002 [#1] SMP Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) commit ad0a45fd9c14feebd000b6e84189d0edff265170 Author: Vaidyanathan Srinivasan Date: Sun Mar 19 00:51:59 2017 +0530 cpuidle: Validate cpu_dev in cpuidle_add_sysfs() If a given cpu is not in cpu_present and cpu hotplug is disabled, arch can skip setting up the cpu_dev. Arch cpuidle driver should pass correct cpu mask for registration, but failing to do so by the driver causes error to propagate and crash like this: [ 30.076045] Unable to handle kernel paging request for data at address 0x00000048 [ 30.076100] Faulting instruction address: 0xc0000000007b2f30 cpu 0x4d: Vector: 300 (Data Access) at [c000003feb18b670] pc: c0000000007b2f30: kobject_get+0x20/0x70 lr: c0000000007b3c94: kobject_add_internal+0x54/0x3f0 sp: c000003feb18b8f0 msr: 9000000000009033 dar: 48 dsisr: 40000000 current = 0xc000003fd2ed8300 paca = 0xc00000000fbab500 softe: 0 irq_happened: 0x01 pid = 1, comm = swapper/0 Linux version 4.11.0-rc2-svaidy+ (sv@sagarika) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #10 SMP Sun Mar 19 00:08:09 IST 2017 enter ? for help [c000003feb18b960] c0000000007b3c94 kobject_add_internal+0x54/0x3f0 [c000003feb18b9f0] c0000000007b43a4 kobject_init_and_add+0x64/0xa0 [c000003feb18ba70] c000000000e284f4 cpuidle_add_sysfs+0xb4/0x130 [c000003feb18baf0] c000000000e26038 cpuidle_register_device+0x118/0x1c0 [c000003feb18bb30] c000000000e26c48 cpuidle_register+0x78/0x120 [c000003feb18bbc0] c00000000168fd9c powernv_processor_idle_init+0x110/0x1c4 [c000003feb18bc40] c00000000000cff8 do_one_initcall+0x68/0x1d0 [c000003feb18bd00] c0000000016242f4 kernel_init_freeable+0x280/0x360 [c000003feb18bdc0] c00000000000d864 kernel_init+0x24/0x160 [c000003feb18be30] c00000000000b4e8 ret_from_kernel_thread+0x5c/0x74 Validating cpu_dev fixes the crash and reports correct error message like: [ 30.163506] Failed to register cpuidle device for cpu136 [ 30.173329] Registration of powernv driver failed. Signed-off-by: Vaidyanathan Srinivasan [ rjw: Comment massage ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/sysfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 64897b20eed29cee2b998fb5ba362e65523dba3c Author: Rafael J. Wysocki Date: Tue Mar 21 22:19:07 2017 +0100 cpufreq: intel_pstate: Fix policy data management in passive mode The policy->cpuinfo.max_freq and policy->max updates in intel_cpufreq_turbo_update() are excessive as they are done for no good reason and may lead to problems in principle, so they should be dropped. However, after dropping them intel_cpufreq_turbo_update() becomes almost entirely pointless, because the check made by it is made again down the road in intel_pstate_prepare_request(). The only thing in it that still needs to be done is the call to update_turbo_state(), so drop intel_cpufreq_turbo_update() altogether and make its callers invoke update_turbo_state() directly instead of it. In addition to that, fix intel_cpufreq_verify_policy() so that it checks global.no_turbo in addition to global.turbo_disabled when updating policy->cpuinfo.max_freq to make it consistent with intel_pstate_verify_policy(). Fixes: 001c76f05b01 (cpufreq: intel_pstate: Generic governors support) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 093b995e3b55a0ae0670226ddfcb05bfbf0099ae Author: Huang Ying Date: Mon Mar 20 14:26:42 2017 +0800 mm, swap: Remove WARN_ON_ONCE() in free_swap_slot() Before commit 452b94b8c8c7 ("mm/swap: don't BUG_ON() due to uninitialized swap slot cache"), the following bug is reported, ------------[ cut here ]------------ kernel BUG at mm/swap_slots.c:270! invalid opcode: 0000 [#1] SMP CPU: 5 PID: 1745 Comm: (sd-pam) Not tainted 4.11.0-rc1-00243-g24c534bb161b #1 Hardware name: System manufacturer System Product Name/Z170-K, BIOS 1803 05/06/2016 RIP: 0010:free_swap_slot+0xba/0xd0 Call Trace: swap_free+0x36/0x40 do_swap_page+0x360/0x6d0 __handle_mm_fault+0x880/0x1080 handle_mm_fault+0xd0/0x240 __do_page_fault+0x232/0x4d0 do_page_fault+0x20/0x70 page_fault+0x22/0x30 ---[ end trace aefc9ede53e0ab21 ]--- This is raised by the BUG_ON(!swap_slot_cache_initialized) in free_swap_slot(). This is incorrect, because even if the swap slots cache fails to be initialized, the swap should operate properly without the swap slots cache. And the use_swap_slot_cache check later in the function will protect the uninitialized swap slots cache case. In commit 452b94b8c8c7, the BUG_ON() is replaced by WARN_ON_ONCE(). In the patch, the WARN_ON_ONCE() is removed too. Reported-by: Linus Torvalds Acked-by: Tim Chen Cc: Michal Hocko Signed-off-by: "Huang, Ying" Signed-off-by: Linus Torvalds mm/swap_slots.c | 2 -- 1 file changed, 2 deletions(-) commit 0115f6cbf26663c86496bc56eeea293f85b77897 Author: Huacai Chen Date: Thu Mar 16 21:00:27 2017 +0800 MIPS: Flush wrong invalid FTLB entry for huge page On VTLB+FTLB platforms (such as Loongson-3A R2), FTLB's pagesize is usually configured the same as PAGE_SIZE. In such a case, Huge page entry is not suitable to write in FTLB. Unfortunately, when a huge page is created, its page table entries haven't created immediately. Then the TLB refill handler will fetch an invalid page table entry which has no "HUGE" bit, and this entry may be written to FTLB. Since it is invalid, TLB load/store handler will then use tlbwi to write the valid entry at the same place. However, the valid entry is a huge page entry which isn't suitable for FTLB. Our solution is to modify build_huge_handler_tail. Flush the invalid old entry (whether it is in FTLB or VTLB, this is in order to reduce branches) and use tlbwr to write the valid new entry. Signed-off-by: Rui Wang Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15754/ Signed-off-by: Ralf Baechle arch/mips/mm/tlbex.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 5a34133167dce36666ea054e30a561b7f4413b7f Author: Huacai Chen Date: Thu Mar 16 21:00:26 2017 +0800 MIPS: Check TLB before handle_ri_rdhwr() for Loongson-3 Loongson-3's micro TLB (ITLB) is not strictly a subset of JTLB. That means: when a JTLB entry is replaced by hardware, there may be an old valid entry exists in ITLB. So, a TLB miss exception may occur while handle_ri_rdhwr() is running because it try to access EPC's content. However, handle_ri_rdhwr() doesn't clear EXL, which makes a TLB Refill exception be treated as a TLB Invalid exception and tlbp may fail. In this case, if FTLB (which is usually set-associative instead of set- associative) is enabled, a tlbp failure will cause an invalid tlbwi, which will hang the whole system. This patch rename handle_ri_rdhwr_vivt to handle_ri_rdhwr_tlbp and use it for Loongson-3. It try to solve the same problem described as below, but more straightforwards. https://patchwork.linux-mips.org/patch/12591/ I think Loongson-2 has the same problem, but it has no FTLB, so we just keep it as is. Signed-off-by: Huacai Chen Cc: Rui Wang Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15753/ Signed-off-by: Ralf Baechle arch/mips/kernel/genex.S | 4 ++-- arch/mips/kernel/traps.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) commit 033cffeedbd11c140952b98e8639bf652091a17d Author: Huacai Chen Date: Thu Mar 16 21:00:25 2017 +0800 MIPS: Add MIPS_CPU_FTLB for Loongson-3A R2 Loongson-3A R2 and newer CPU have FTLB, but Config0.MT is 1, so add MIPS_CPU_FTLB to the CPU options. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15752/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ef90877eee63a0d03e83183bb44b64229b624e6 Author: Hauke Mehrtens Date: Wed Mar 15 23:26:42 2017 +0100 MIPS: Lantiq: fix missing xbar kernel panic Commit 08b3c894e565 ("MIPS: lantiq: Disable xbar fpi burst mode") accidentally requested the resources from the pmu address region instead of the xbar registers region, but the check for the return value of request_mem_region() was wrong. Commit 98ea51cb0c8c ("MIPS: Lantiq: Fix another request_mem_region() return code check") fixed the check of the return value of request_mem_region() which made the kernel panics. This patch now makes use of the correct memory region for the cross bar. Fixes: 08b3c894e565 ("MIPS: lantiq: Disable xbar fpi burst mode") Signed-off-by: Hauke Mehrtens Cc: John Crispin Cc: james.hogan@imgtec.com Cc: arnd@arndb.de Cc: sergei.shtylyov@cogentembedded.com Cc: john@phrozen.org Cc: # 4.4.x- Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15751 Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/sysctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f02071358301e376f5a54e40531db37a1d7c7ab Merge: 2c867ac ca4a213 Author: Linus Torvalds Date: Tue Mar 21 13:10:17 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Nine small fixes: the biggest is probably finally sorting out Kconfig issues with lpfc nvme. There are some performance fixes for megaraid and hpsa and a static checker fix" [ Johannes Thumshirn points out that there still seems to be more lpfc vs nvme config issues. Oh well. - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Finalize Kconfig options for nvme scsi: ufs: don't check unsigned type for a negative value scsi: hpsa: do not timeout reset operations scsi: hpsa: limit outstanding rescans scsi: hpsa: update check for logical volume status scsi: megaraid_sas: Driver version upgrade scsi: megaraid_sas: raid6 also require cpuSel check same as raid5 scsi: megaraid_sas: add correct return type check for ldio hint logic for raid1 scsi: megaraid_sas: enable intx only if msix request fails commit 2c867ac3957de0f7b6886d1d9ce7d4dafd3c7b33 Merge: 4719177 6e5364f Author: Linus Torvalds Date: Tue Mar 21 13:07:18 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - regression fixes for Wacom devices, from Aaron Armstrong Skomra and Ping Cheng - memory leak in hid-sony driver from Roderick Colenbrander - new device IDs support from Oscar Campos and Daniel Drake * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: generic: Wacom mouse is only provided for opaque tablets HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to hid-corsair HID: corsair: support for K65-K70 Rapidfire and Scimitar Pro RGB HID: wacom: don't manually release resources for the EKR HID: wacom: Correct Intuos Pro 2 resolution HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT HID: chicony: Add support for another ASUS Zen AiO keyboard commit 47191777804faf0560af9ba33b3871b4c4039c9c Merge: 8a01150 2cd29f2 Author: Linus Torvalds Date: Tue Mar 21 13:01:53 2017 -0700 Merge tag 'gpio-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here is the first set of GPIO fixes for 4.11. It was delayed a bit beacuse I was chicken when linux-next was not rotating last week. This hits the ST serial driver in drivers/tty/serial and that has an ACK from Greg, he suggested to keep the old GPIO fwnode API around to smoothen things in the merge Windod and those have now served their purpose so we take them out and convert the last driver to the new API. Apart from that it's fixes as usual. Summary: - set the parent on the Altera A10SR driver, also fix high level IRQs. - fix error path on the mockup driver. - compilation noise about unused functions fixed. - fix missed interrupts on the MCP23S08 expander, this is also tagged for stable. - retire the interrim helpers devm_get_gpiod_from_child() used to smoothen merging in the merge window" * tag 'gpio-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio:mcp23s08 Fixed missing interrupts serial: st-asc: Use new GPIOD API to obtain RTS pin gpio: altera: Use handle_level_irq when configured as a level_high gpio: xgene: mark PM functions as __maybe_unused gpio: mockup: return -EFAULT if copy_from_user() fails gpio: altera-a10sr: Set gpio_chip parent property commit 8a011508409a6f3064e4e53ea62c8c0bda1bd31f Merge: 689b957 c3104aa Author: Linus Torvalds Date: Tue Mar 21 12:54:12 2017 -0700 Merge tag 'rproc-v4.11-fixes' of git://github.com/andersson/remoteproc Pull remoteproc fix from Bjorn Andersson: "This fixes a Kbuild dependency issue related to the Qualcomm remoteproc drivers" * tag 'rproc-v4.11-fixes' of git://github.com/andersson/remoteproc: remoteproc: qcom: fix QCOM_SMD dependencies commit fb2155e3c30dc2043b52020e26965067a3e7779c Author: Matt Redfearn Date: Tue Mar 21 14:39:19 2017 +0000 MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs The vpe_mask member of struct core_boot_config is of type atomic_t, which is a 32bit type. In cps-vec.S this member was being retrieved by a PTR_L macro, which on 64bit systems is a 64bit load. On little endian systems this is OK, since the double word that is retrieved will have the required less significant word in the correct position. However, on big endian systems the less significant word of the load is retrieved from address+4, and the more significant from address+0. The destination register therefore ends up with the required word in the more significant word e.g. when starting the second VP of a big endian 64bit system, the load PTR_L ta2, COREBOOTCFG_VPEMASK(a0) ends up setting register ta2 to 0x0000000300000000 When this value is written to the CPC it is ignored, since it is invalid to write anything larger than 4 bits. This results in any VP other than VP0 in a core failing to start in 64bit big endian systems. Change the load to a 32bit load word instruction to fix the bug. Fixes: f12401d7219f ("MIPS: smp-cps: Pull boot config retrieval out of mips_cps_boot_vpes") Signed-off-by: Matt Redfearn Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15787/ Signed-off-by: Ralf Baechle arch/mips/kernel/cps-vec.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689b957baf4412f8d737ce67b6d07cab043becd3 Merge: 97da385 7041d5d Author: Linus Torvalds Date: Tue Mar 21 12:27:06 2017 -0700 Merge tag 'for-f2fs-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: - fix performance regression reported by lkp-rebot - fix potential data lost after power-cut due to SSR reallocation * tag 'for-f2fs-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: combine nat_bits and free_nid_bitmap cache f2fs: skip scanning free nid bitmap of full NAT blocks f2fs: use __set{__clear}_bit_le f2fs: declare static functions f2fs: don't overwrite node block by SSR commit 65b1adebfe43c642dfe3b109edb5d992db5fbe72 Author: Alex Williamson Date: Tue Mar 21 13:19:09 2017 -0600 vfio: Rework group release notifier warning The intent of the original warning is make sure that the mdev vendor driver has removed any group notifiers at the point where the group is closed by the user. Theoretically this would be through an orderly shutdown where any devices are release prior to the group release. We can't always count on an orderly shutdown, the user can close the group before the notifier can be removed or the user task might be killed. We'd like to add this sanity test when the group is idle and the only references are from the devices within the group themselves, but we don't have a good way to do that. Instead check both when the group itself is removed and when the group is opened. A bit later than we'd prefer, but better than the current over aggressive approach. Fixes: ccd46dbae77d ("vfio: support notifier chain in vfio_group") Signed-off-by: Alex Williamson Cc: # v4.10 Cc: Jike Song drivers/vfio/vfio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 713cc9df6473f0cc8d699987d990482d432c0679 Author: Will Deacon Date: Tue Mar 21 18:04:26 2017 +0000 arm64: compat: Update compat syscalls Hook up three pkey syscalls (which we don't implement) and the new statx syscall, as has been done for arch/arm/. Signed-off-by: Will Deacon arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 9be3213b14d44f6328281941193d97f3b97e7d4c Author: Nicolas Iooss Date: Mon Mar 13 20:33:41 2017 +0100 gconfig: remove misleading parentheses around a condition When building the kernel with clang, the compiler complains about the presence of a condition inside two pairs of parentheses: scripts/kconfig/gconf.c:917:19: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] } else if ((col == COL_OPTION)) { ~~~~^~~~~~~~~~~~~ scripts/kconfig/gconf.c:917:19: note: remove extraneous parentheses around the comparison to silence this warning } else if ((col == COL_OPTION)) { ~ ^ ~ scripts/kconfig/gconf.c:917:19: note: use '=' to turn this equality comparison into an assignment } else if ((col == COL_OPTION)) { ^~ = Silence this warning by removing a level of parentheses. Signed-off-by: Nicolas Iooss Signed-off-by: Masahiro Yamada scripts/kconfig/gconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7292ae3d5a18fb922be496e6bb687647193569b4 Author: Gleb Fotengauer-Malinovskiy Date: Mon Mar 20 20:15:53 2017 +0300 jump label: fix passing kbuild_cflags when checking for asm goto support The latest change of asm goto support check added passing of KBUILD_CFLAGS to compiler. When these flags reference gcc plugins that are not built yet, the check fails. When one runs "make bzImage" followed by "make modules", the kernel is always built with HAVE_JUMP_LABEL disabled, while the modules are built depending on CONFIG_JUMP_LABEL. If HAVE_JUMP_LABEL macro happens to be different, modules are built with undefined references, e.g.: ERROR: "static_key_slow_inc" [net/netfilter/xt_TEE.ko] undefined! ERROR: "static_key_slow_dec" [net/netfilter/xt_TEE.ko] undefined! ERROR: "static_key_slow_dec" [net/netfilter/nft_meta.ko] undefined! ERROR: "static_key_slow_inc" [net/netfilter/nft_meta.ko] undefined! ERROR: "nf_hooks_needed" [net/netfilter/ipvs/ip_vs.ko] undefined! ERROR: "nf_hooks_needed" [net/ipv6/ipv6.ko] undefined! ERROR: "static_key_count" [net/ipv6/ipv6.ko] undefined! ERROR: "static_key_slow_inc" [net/ipv6/ipv6.ko] undefined! This change moves the check before all these references are added to KBUILD_CFLAGS. This is correct because subsequent KBUILD_CFLAGS modifications are not relevant to this check. Reported-by: Anton V. Boyarshinov Fixes: 35f860f9ba6a ("jump label: pass kbuild_cflags when checking for asm goto support") Cc: stable@vger.kernel.org # v4.10 Signed-off-by: Gleb Fotengauer-Malinovskiy Signed-off-by: Dmitry V. Levin Acked-by: Steven Rostedt (VMware) Acked-by: David Lin Signed-off-by: Masahiro Yamada Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0ca10b60ceeb5372da01798ca68c116ae45a6eb6 Author: Philipp Zabel Date: Mon Mar 20 11:25:16 2017 +0100 reset: fix optional reset_control_get stubs to return NULL When RESET_CONTROLLER is not enabled, the optional reset_control_get stubs should now also return NULL. Since it is now valid for reset_control_assert/deassert/reset/status/put to be called unconditionally, with NULL as an argument for optional resets, the stubs are not allowed to warn anymore. Fixes: bb475230b8e5 ("reset: make optional functions really optional") Reported-by: Andrzej Hajda Tested-by: Andrzej Hajda Reviewed-by: Andrzej Hajda Cc: Ramiro Oliveira Signed-off-by: Philipp Zabel include/linux/reset.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a457d08e117e7d228588cb673d061ea58a0c8b2f Merge: efd4b81 945dd5b Author: Jens Axboe Date: Tue Mar 21 11:03:53 2017 -0600 Merge branch 'nvme-4.11-rc' of git://git.infradead.org/nvme into for-linus Sagi writes: This consists of some fixes for issues reported lately: - loop and rdma host driver cpu hotplug fixes - fix loop use-after-free - nvmet percpu_ref confirmation fix to fail ongoing requests - nvmet-rdma fix a non-initialized commands deref commit 945dd5bacc8978439af276976b5dcbbd42333dbc Author: Sagi Grimberg Date: Mon Mar 13 13:27:51 2017 +0200 nvme-loop: handle cpu unplug when re-establishing the controller If a cpu unplug event has occured, we need to take the minimum of the provided nr_io_queues and the number of online cpus, otherwise we won't be able to connect them as blk-mq mapping won't dispatch to those queues. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 88 ++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 38 deletions(-) commit c248c64387fac5a6b31b343d9acb78f478e8619c Author: Sagi Grimberg Date: Thu Mar 9 13:26:07 2017 +0200 nvme-rdma: handle cpu unplug when re-establishing the controller If a cpu unplug event has occured, we need to take the minimum of the provided nr_io_queues and the number of online cpus, otherwise we won't be able to connect them as blk-mq mapping won't dispatch to those queues. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 974310d047f3c7788a51d10c8d255eebdb1fa857 Author: Jon Medhurst Date: Thu Mar 2 13:04:09 2017 +0000 arm: kprobes: Align stack to 8-bytes in test code kprobes test cases need to have a stack that is aligned to an 8-byte boundary because they call other functions (and the ARM ABI mandates that alignment) and because test cases include 64-bit accesses to the stack. Unfortunately, GCC doesn't ensure this alignment for inline assembler and for the code in question seems to always misalign it by pushing just the LR register onto the stack. We therefore need to explicitly perform stack alignment at the start of each test case. Without this fix, some test cases will generate alignment faults on systems where alignment is enforced. Even if the kernel is configured to handle these faults in software, triggering them is ugly. It also exposes limitations in the fault handling code which doesn't cope with writes to the stack. E.g. when handling this instruction strd r6, [sp, #-64]! the fault handling code will write to a stack location below the SP value at the point the fault occurred, which coincides with where the exception handler has pushed the saved register context. This results in corruption of those registers. Signed-off-by: Jon Medhurst arch/arm/probes/kprobes/test-core.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 06553175f585b52509c7df37d6f4a50aacb7b211 Author: Masami Hiramatsu Date: Tue Feb 14 00:05:59 2017 +0900 arm: kprobes: Fix the return address of multiple kretprobes This is arm port of commit 737480a0d525 ("kprobes/x86: Fix the return address of multiple kretprobes"). Fix the return address of subsequent kretprobes when multiple kretprobes are set on the same function. For example: # cd /sys/kernel/debug/tracing # echo "r:event1 sys_symlink" > kprobe_events # echo "r:event2 sys_symlink" >> kprobe_events # echo 1 > events/kprobes/enable # ln -s /tmp/foo /tmp/bar (without this patch) # cat trace | grep -v ^# ln-82 [000] dn.2 68.446525: event1: (kretprobe_trampoline+0x0/0x18 <- SyS_symlink) ln-82 [000] dn.2 68.447831: event2: (ret_fast_syscall+0x0/0x1c <- SyS_symlink) (with this patch) # cat trace | grep -v ^# ln-81 [000] dn.1 39.463469: event1: (ret_fast_syscall+0x0/0x1c <- SyS_symlink) ln-81 [000] dn.1 39.464701: event2: (ret_fast_syscall+0x0/0x1c <- SyS_symlink) Signed-off-by: Masami Hiramatsu Cc: KUMANO Syuhei Signed-off-by: Jon Medhurst arch/arm/probes/kprobes/core.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 91fc862c613ab7a0ef6b0b7755c33619127f4e5a Author: Masami Hiramatsu Date: Tue Feb 14 00:04:48 2017 +0900 arm: kprobes: Skip single-stepping in recursing path if possible Kprobes/arm skips single-stepping (moreover handling the event) if the conditional instruction must not be executed. This also apply the rule when we hit the recursing kprobe, so that kprobe does not count nmissed up in that case. Signed-off-by: Masami Hiramatsu Signed-off-by: Jon Medhurst arch/arm/probes/kprobes/core.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit f3fbd7ec62dec1528fb8044034e2885f2b257941 Author: Masami Hiramatsu Date: Tue Feb 14 00:03:38 2017 +0900 arm: kprobes: Allow to handle reentered kprobe on single-stepping This is arm port of commit 6a5022a56ac3 ("kprobes/x86: Allow to handle reentered kprobe on single-stepping") Since the FIQ handlers can interrupt in the single stepping (or preparing the single stepping, do_debug etc.), we should consider a kprobe is hit in the NMI handler. Even in that case, the kprobe is allowed to be reentered as same as the kprobes hit in kprobe handlers (KPROBE_HIT_ACTIVE or KPROBE_HIT_SSDONE). The real issue will happen when a kprobe hit while another reentered kprobe is processing (KPROBE_REENTER), because we already consumed a saved-area for the previous kprobe. Signed-off-by: Masami Hiramatsu Signed-off-by: Jon Medhurst arch/arm/probes/kprobes/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit df630b8c1e851b5e265dc2ca9c87222e342c093b Author: Peter Xu Date: Wed Mar 15 16:01:17 2017 +0800 KVM: x86: clear bus pointer when destroyed When releasing the bus, let's clear the bus pointers to mark it out. If any further device unregister happens on this bus, we know that we're done if we found the bus being released already. Signed-off-by: Peter Xu Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 28787bf47b11b08290918dcf91b08764cb5fe122 Author: Quentin Schulz Date: Mon Mar 20 12:25:51 2017 +0100 ARM: sun8i: a33: remove highest OPP to fix CPU crashes The highest supported frequency (1.2GHz) requires to "overvolt" the CPU. However, some boards still do not have the cpu-supply DT property in the cpu DT node which means that the CPU will always run with the same input voltage but try to run at 1.2GHz frequency. This is the source of (experienced) CPU crashes. Remove the OPP which requires overvolting the CPU until all boards have a cpu-supply property. Fixes: 03749eb88e63 ("ARM: dts: sun8i: add opp-v2 table for A33") Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit 5b52330bbfe63b3305765354d6046c9f7f89c011 Author: Paul Moore Date: Tue Mar 21 11:26:35 2017 -0400 audit: fix auditd/kernel connection state tracking What started as a rather straightforward race condition reported by Dmitry using the syzkaller fuzzer ended up revealing some major problems with how the audit subsystem managed its netlink sockets and its connection with the userspace audit daemon. Fixing this properly had quite the cascading effect and what we are left with is this rather large and complicated patch. My initial goal was to try and decompose this patch into multiple smaller patches, but the way these changes are intertwined makes it difficult to split these changes into meaningful pieces that don't break or somehow make things worse for the intermediate states. The patch makes a number of changes, but the most significant are highlighted below: * The auditd tracking variables, e.g. audit_sock, are now gone and replaced by a RCU/spin_lock protected variable auditd_conn which is a structure containing all of the auditd tracking information. * We no longer track the auditd sock directly, instead we track it via the network namespace in which it resides and we use the audit socket associated with that namespace. In spirit, this is what the code was trying to do prior to this patch (at least I think that is what the original authors intended), but it was done rather poorly and added a layer of obfuscation that only masked the underlying problems. * Big backlog queue cleanup, again. In v4.10 we made some pretty big changes to how the audit backlog queues work, here we haven't changed the queue design so much as cleaned up the implementation. Brought about by the locking changes, we've simplified kauditd_thread() quite a bit by consolidating the queue handling into a new helper function, kauditd_send_queue(), which allows us to eliminate a lot of very similar code and makes the looping logic in kauditd_thread() clearer. * All netlink messages sent to auditd are now sent via auditd_send_unicast_skb(). Other than just making sense, this makes the lock handling easier. * Change the audit_log_start() sleep behavior so that we never sleep on auditd events (unchanged) or if the caller is holding the audit_cmd_mutex (changed). Previously we didn't sleep if the caller was auditd or if the message type fell between a certain range; the type check was a poor effort of doing what the cmd_mutex check now does. Richard Guy Briggs originally proposed not sleeping the cmd_mutex owner several years ago but his patch wasn't acceptable at the time. At least the idea lives on here. * A problem with the lost record counter has been resolved. Steve Grubb and I both happened to notice this problem and according to some quick testing by Steve, this problem goes back quite some time. It's largely a harmless problem, although it may have left some careful sysadmins quite puzzled. Cc: # 4.10.x- Reported-by: Dmitry Vyukov Signed-off-by: Paul Moore kernel/audit.c | 639 ++++++++++++++++++++++++++++++++++--------------------- kernel/audit.h | 9 +- kernel/auditsc.c | 6 +- 3 files changed, 399 insertions(+), 255 deletions(-) commit 590379aef2e3fb7d00a093ed556c0a2714f86916 Author: Changbin Du Date: Tue Mar 21 14:47:20 2017 +0000 drm/i915: make context status notifier head be per engine GVTg has introduced the context status notifier to schedule the GVTg workload. At that time, the notifier is bound to GVTg context only, so GVTg is not aware of host workloads. Now we are going to improve GVTg's guest workload scheduler policy, and add Guc emulation support for new Gen graphics. Both these two features require acknowledgment for all contexts running on hardware. (But will not alter host workload.) So here try to make some change. The change is simple: 1. Move the context status notifier head from i915_gem_context to intel_engine_cs. Which means there is a notifier head per engine instead of per context. Execlist driver still call notifier for each context sched-in/out events of current engine. 2. At GVTg side, it binds a notifier_block for each physical engine at GVTg initialization period. Then GVTg can hear all context status events. In this patch, GVTg do nothing for host context event, but later will add a function there. But in any case, the notifier callback is a noop if this is no active vGPU. Since intel_gvt_init() is called at early initialization stage and require the status notifier head has been initiated, I initiate it in intel_engine_setup(). v2: remove a redundant newline. (chris) Fixes: 3c7ba6359d70 ("drm/i915: Introduce execlist context status change notification") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100232 Signed-off-by: Changbin Du Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Zhi Wang Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170313024711.28591-1-changbin.du@intel.com Acked-by: Zhenyu Wang Signed-off-by: Chris Wilson (cherry picked from commit 3fc03069bc6e6c316f19bb526e3c8ce784677477) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170321144720.17020-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 45 ++++++++++++++------------------- drivers/gpu/drm/i915/i915_gem_context.c | 1 - drivers/gpu/drm/i915/i915_gem_context.h | 3 --- drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/intel_lrc.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 7 files changed, 27 insertions(+), 32 deletions(-) commit 3d3d18f086cdda72ee18a454db70ca72c6e3246c Author: Chris Wilson Date: Tue Mar 21 14:45:31 2017 +0000 drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) The rcu_barrier() takes the cpu_hotplug mutex which itself is not reclaim-safe, and so rcu_barrier() is illegal from inside the shrinker. [ 309.661373] ========================================================= [ 309.661376] [ INFO: possible irq lock inversion dependency detected ] [ 309.661380] 4.11.0-rc1-CI-CI_DRM_2333+ #1 Tainted: G W [ 309.661383] --------------------------------------------------------- [ 309.661386] gem_exec_gttfil/6435 just changed the state of lock: [ 309.661389] (rcu_preempt_state.barrier_mutex){+.+.-.}, at: [] _rcu_barrier+0x31/0x160 [ 309.661399] but this lock took another, RECLAIM_FS-unsafe lock in the past: [ 309.661402] (cpu_hotplug.lock){+.+.+.} [ 309.661404] and interrupts could create inverse lock ordering between them. [ 309.661410] other info that might help us debug this: [ 309.661414] Possible interrupt unsafe locking scenario: [ 309.661417] CPU0 CPU1 [ 309.661419] ---- ---- [ 309.661421] lock(cpu_hotplug.lock); [ 309.661425] local_irq_disable(); [ 309.661432] lock(rcu_preempt_state.barrier_mutex); [ 309.661441] lock(cpu_hotplug.lock); [ 309.661446] [ 309.661448] lock(rcu_preempt_state.barrier_mutex); [ 309.661453] *** DEADLOCK *** [ 309.661460] 4 locks held by gem_exec_gttfil/6435: [ 309.661464] #0: (sb_writers#10){.+.+.+}, at: [] vfs_write+0x17d/0x1f0 [ 309.661475] #1: (debugfs_srcu){......}, at: [] debugfs_use_file_start+0x41/0xa0 [ 309.661486] #2: (&attr->mutex){+.+.+.}, at: [] simple_attr_write+0x37/0xe0 [ 309.661495] #3: (&dev->struct_mutex){+.+.+.}, at: [] i915_drop_caches_set+0x3a/0x150 [i915] [ 309.661540] the shortest dependencies between 2nd lock and 1st lock: [ 309.661547] -> (cpu_hotplug.lock){+.+.+.} ops: 829 { [ 309.661553] HARDIRQ-ON-W at: [ 309.661560] __lock_acquire+0x5e5/0x1b50 [ 309.661565] lock_acquire+0xc9/0x220 [ 309.661572] __mutex_lock+0x6e/0x990 [ 309.661576] mutex_lock_nested+0x16/0x20 [ 309.661583] get_online_cpus+0x61/0x80 [ 309.661590] kmem_cache_create+0x25/0x1d0 [ 309.661596] debug_objects_mem_init+0x30/0x249 [ 309.661602] start_kernel+0x341/0x3fe [ 309.661607] x86_64_start_reservations+0x2a/0x2c [ 309.661612] x86_64_start_kernel+0x173/0x186 [ 309.661619] verify_cpu+0x0/0xfc [ 309.661622] SOFTIRQ-ON-W at: [ 309.661627] __lock_acquire+0x611/0x1b50 [ 309.661632] lock_acquire+0xc9/0x220 [ 309.661636] __mutex_lock+0x6e/0x990 [ 309.661641] mutex_lock_nested+0x16/0x20 [ 309.661646] get_online_cpus+0x61/0x80 [ 309.661650] kmem_cache_create+0x25/0x1d0 [ 309.661655] debug_objects_mem_init+0x30/0x249 [ 309.661660] start_kernel+0x341/0x3fe [ 309.661664] x86_64_start_reservations+0x2a/0x2c [ 309.661669] x86_64_start_kernel+0x173/0x186 [ 309.661674] verify_cpu+0x0/0xfc [ 309.661677] RECLAIM_FS-ON-W at: [ 309.661682] mark_held_locks+0x6f/0xa0 [ 309.661687] lockdep_trace_alloc+0xb3/0x100 [ 309.661693] kmem_cache_alloc_trace+0x31/0x2e0 [ 309.661699] __smpboot_create_thread.part.1+0x27/0xe0 [ 309.661704] smpboot_create_threads+0x61/0x90 [ 309.661709] cpuhp_invoke_callback+0x9c/0x8a0 [ 309.661713] cpuhp_up_callbacks+0x31/0xb0 [ 309.661718] _cpu_up+0x7a/0xc0 [ 309.661723] do_cpu_up+0x5f/0x80 [ 309.661727] cpu_up+0xe/0x10 [ 309.661734] smp_init+0x71/0xb3 [ 309.661738] kernel_init_freeable+0x94/0x19e [ 309.661743] kernel_init+0x9/0xf0 [ 309.661748] ret_from_fork+0x2e/0x40 [ 309.661752] INITIAL USE at: [ 309.661757] __lock_acquire+0x234/0x1b50 [ 309.661761] lock_acquire+0xc9/0x220 [ 309.661766] __mutex_lock+0x6e/0x990 [ 309.661771] mutex_lock_nested+0x16/0x20 [ 309.661775] get_online_cpus+0x61/0x80 [ 309.661780] __cpuhp_setup_state+0x44/0x170 [ 309.661785] page_alloc_init+0x23/0x3a [ 309.661790] start_kernel+0x124/0x3fe [ 309.661794] x86_64_start_reservations+0x2a/0x2c [ 309.661799] x86_64_start_kernel+0x173/0x186 [ 309.661804] verify_cpu+0x0/0xfc [ 309.661807] } [ 309.661813] ... key at: [] cpu_hotplug+0xb0/0x100 [ 309.661817] ... acquired at: [ 309.661821] lock_acquire+0xc9/0x220 [ 309.661825] __mutex_lock+0x6e/0x990 [ 309.661829] mutex_lock_nested+0x16/0x20 [ 309.661833] get_online_cpus+0x61/0x80 [ 309.661837] _rcu_barrier+0x9f/0x160 [ 309.661841] rcu_barrier+0x10/0x20 [ 309.661847] netdev_run_todo+0x5f/0x310 [ 309.661852] rtnl_unlock+0x9/0x10 [ 309.661856] default_device_exit_batch+0x133/0x150 [ 309.661862] ops_exit_list.isra.0+0x4d/0x60 [ 309.661866] cleanup_net+0x1d8/0x2c0 [ 309.661872] process_one_work+0x1f4/0x6d0 [ 309.661876] worker_thread+0x49/0x4a0 [ 309.661881] kthread+0x107/0x140 [ 309.661884] ret_from_fork+0x2e/0x40 [ 309.661890] -> (rcu_preempt_state.barrier_mutex){+.+.-.} ops: 179 { [ 309.661896] HARDIRQ-ON-W at: [ 309.661901] __lock_acquire+0x5e5/0x1b50 [ 309.661905] lock_acquire+0xc9/0x220 [ 309.661910] __mutex_lock+0x6e/0x990 [ 309.661914] mutex_lock_nested+0x16/0x20 [ 309.661919] _rcu_barrier+0x31/0x160 [ 309.661923] rcu_barrier+0x10/0x20 [ 309.661928] netdev_run_todo+0x5f/0x310 [ 309.661932] rtnl_unlock+0x9/0x10 [ 309.661936] default_device_exit_batch+0x133/0x150 [ 309.661941] ops_exit_list.isra.0+0x4d/0x60 [ 309.661946] cleanup_net+0x1d8/0x2c0 [ 309.661951] process_one_work+0x1f4/0x6d0 [ 309.661955] worker_thread+0x49/0x4a0 [ 309.661960] kthread+0x107/0x140 [ 309.661964] ret_from_fork+0x2e/0x40 [ 309.661968] SOFTIRQ-ON-W at: [ 309.661972] __lock_acquire+0x611/0x1b50 [ 309.661977] lock_acquire+0xc9/0x220 [ 309.661981] __mutex_lock+0x6e/0x990 [ 309.661986] mutex_lock_nested+0x16/0x20 [ 309.661990] _rcu_barrier+0x31/0x160 [ 309.661995] rcu_barrier+0x10/0x20 [ 309.661999] netdev_run_todo+0x5f/0x310 [ 309.662003] rtnl_unlock+0x9/0x10 [ 309.662008] default_device_exit_batch+0x133/0x150 [ 309.662013] ops_exit_list.isra.0+0x4d/0x60 [ 309.662017] cleanup_net+0x1d8/0x2c0 [ 309.662022] process_one_work+0x1f4/0x6d0 [ 309.662027] worker_thread+0x49/0x4a0 [ 309.662031] kthread+0x107/0x140 [ 309.662035] ret_from_fork+0x2e/0x40 [ 309.662039] IN-RECLAIM_FS-W at: [ 309.662043] __lock_acquire+0x638/0x1b50 [ 309.662048] lock_acquire+0xc9/0x220 [ 309.662053] __mutex_lock+0x6e/0x990 [ 309.662058] mutex_lock_nested+0x16/0x20 [ 309.662062] _rcu_barrier+0x31/0x160 [ 309.662067] rcu_barrier+0x10/0x20 [ 309.662089] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662109] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662114] simple_attr_write+0xc7/0xe0 [ 309.662119] full_proxy_write+0x4f/0x70 [ 309.662124] __vfs_write+0x23/0x120 [ 309.662128] vfs_write+0xc6/0x1f0 [ 309.662133] SyS_write+0x44/0xb0 [ 309.662138] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662142] INITIAL USE at: [ 309.662147] __lock_acquire+0x234/0x1b50 [ 309.662151] lock_acquire+0xc9/0x220 [ 309.662156] __mutex_lock+0x6e/0x990 [ 309.662160] mutex_lock_nested+0x16/0x20 [ 309.662165] _rcu_barrier+0x31/0x160 [ 309.662169] rcu_barrier+0x10/0x20 [ 309.662174] netdev_run_todo+0x5f/0x310 [ 309.662178] rtnl_unlock+0x9/0x10 [ 309.662183] default_device_exit_batch+0x133/0x150 [ 309.662188] ops_exit_list.isra.0+0x4d/0x60 [ 309.662192] cleanup_net+0x1d8/0x2c0 [ 309.662197] process_one_work+0x1f4/0x6d0 [ 309.662202] worker_thread+0x49/0x4a0 [ 309.662206] kthread+0x107/0x140 [ 309.662210] ret_from_fork+0x2e/0x40 [ 309.662214] } [ 309.662220] ... key at: [] rcu_preempt_state+0x508/0x780 [ 309.662225] ... acquired at: [ 309.662229] check_usage_forwards+0x12b/0x130 [ 309.662233] mark_lock+0x360/0x6f0 [ 309.662237] __lock_acquire+0x638/0x1b50 [ 309.662241] lock_acquire+0xc9/0x220 [ 309.662245] __mutex_lock+0x6e/0x990 [ 309.662249] mutex_lock_nested+0x16/0x20 [ 309.662253] _rcu_barrier+0x31/0x160 [ 309.662257] rcu_barrier+0x10/0x20 [ 309.662279] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662298] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662303] simple_attr_write+0xc7/0xe0 [ 309.662307] full_proxy_write+0x4f/0x70 [ 309.662311] __vfs_write+0x23/0x120 [ 309.662315] vfs_write+0xc6/0x1f0 [ 309.662319] SyS_write+0x44/0xb0 [ 309.662323] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662329] stack backtrace: [ 309.662335] CPU: 1 PID: 6435 Comm: gem_exec_gttfil Tainted: G W 4.11.0-rc1-CI-CI_DRM_2333+ #1 [ 309.662342] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.13 07/14/2011 [ 309.662348] Call Trace: [ 309.662354] dump_stack+0x67/0x92 [ 309.662359] print_irq_inversion_bug.part.19+0x1a4/0x1b0 [ 309.662365] check_usage_forwards+0x12b/0x130 [ 309.662369] mark_lock+0x360/0x6f0 [ 309.662374] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 309.662379] __lock_acquire+0x638/0x1b50 [ 309.662383] ? __mutex_unlock_slowpath+0x3e/0x2e0 [ 309.662388] ? trace_hardirqs_on+0xd/0x10 [ 309.662392] ? _rcu_barrier+0x31/0x160 [ 309.662396] lock_acquire+0xc9/0x220 [ 309.662400] ? _rcu_barrier+0x31/0x160 [ 309.662404] ? _rcu_barrier+0x31/0x160 [ 309.662409] __mutex_lock+0x6e/0x990 [ 309.662412] ? _rcu_barrier+0x31/0x160 [ 309.662416] ? _rcu_barrier+0x31/0x160 [ 309.662421] ? synchronize_rcu_expedited+0x35/0xb0 [ 309.662426] ? _raw_spin_unlock_irqrestore+0x52/0x60 [ 309.662434] mutex_lock_nested+0x16/0x20 [ 309.662438] _rcu_barrier+0x31/0x160 [ 309.662442] rcu_barrier+0x10/0x20 [ 309.662464] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662484] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662489] simple_attr_write+0xc7/0xe0 [ 309.662494] full_proxy_write+0x4f/0x70 [ 309.662498] __vfs_write+0x23/0x120 [ 309.662503] ? rcu_read_lock_sched_held+0x75/0x80 [ 309.662507] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 309.662512] ? __sb_start_write+0x102/0x210 [ 309.662516] ? vfs_write+0x17d/0x1f0 [ 309.662520] vfs_write+0xc6/0x1f0 [ 309.662524] ? trace_hardirqs_on_caller+0xe7/0x200 [ 309.662529] SyS_write+0x44/0xb0 [ 309.662533] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662537] RIP: 0033:0x7f507eac24a0 [ 309.662541] RSP: 002b:00007fffda8720e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 309.662548] RAX: ffffffffffffffda RBX: ffffffff81482bd3 RCX: 00007f507eac24a0 [ 309.662552] RDX: 0000000000000005 RSI: 00007fffda8720f0 RDI: 0000000000000005 [ 309.662557] RBP: ffffc9000048bf88 R08: 0000000000000000 R09: 000000000000002c [ 309.662561] R10: 0000000000000014 R11: 0000000000000246 R12: 00007fffda872230 [ 309.662566] R13: 00007fffda872228 R14: 0000000000000201 R15: 00007fffda8720f0 [ 309.662572] ? __this_cpu_preempt_check+0x13/0x20 Fixes: 0eafec6d3244 ("drm/i915: Enable lockless lookup of request tracking via RCU") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100192 Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: # v4.9+ Link: http://patchwork.freedesktop.org/patch/msgid/20170314115019.18127-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter (cherry picked from commit bd784b7cc41af7a19cfb705fa6d800e511c4ab02) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170321144531.12344-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae5c682113f9f94cc5e76f92cf041ee624c173ee Author: Liping Zhang Date: Sun Mar 19 22:35:59 2017 +0800 netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max The helper->expect_class_max must be set to the total number of expect_policy minus 1, since we will use the statement "if (class > helper->expect_class_max)" to validate the CTA_EXPECT_CLASS attr in ctnetlink_alloc_expect. So for compatibility, set the helper->expect_class_max to the NFCTH_POLICY_SET_NUM attr's value minus 1. Also: it's invalid when the NFCTH_POLICY_SET_NUM attr's value is zero. 1. this will result "expect_policy = kzalloc(0, GFP_KERNEL);"; 2. we cannot set the helper->expect_class_max to a proper value. So if nla_get_be32(tb[NFCTH_POLICY_SET_NUM]) is zero, report -EINVAL to the userspace. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 6e5364f5f472d4ea66d37459e299071b0190362c Author: Ping Cheng Date: Tue Mar 14 17:08:16 2017 -0700 HID: wacom: generic: Wacom mouse is only provided for opaque tablets Commit f85c9dc ("Support tool ID and additional tool types") introduced mouse and lens cursor tools to generic codepath, which covers both display (direct) and opaque tablets (indirect devices). However, mouse and lens cursor tools are only provided for opaque tablets. This patch ignores mouse and lens cursor tools if the device is a display tablet. Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 01adc47e885f1127b29d76d0dfb21d8262f9d6b4 Author: Oscar Campos Date: Mon Mar 6 21:02:39 2017 +0000 HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to hid-corsair This mouse sold by Corsair as Scimitar PRO RGB defines two consecutive Logical Minimum items in its Application (Consumer.0001) report making it non parseable. This patch fixes the report descriptor overriding byte 77 in rdesc from 0x16 (Logical Minimum with 16 bits value) to 0x26 (Logical Maximum with 16 bits value). Signed-off-by: Oscar Campos Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-corsair.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) commit deaba636997557fce46ca7bcb509bff5ea1b0558 Author: Oscar Campos Date: Fri Feb 10 18:23:00 2017 +0000 HID: corsair: support for K65-K70 Rapidfire and Scimitar Pro RGB Add quirks for several corsair gaming devices to avoid long delays on report initialization Supported devices: - Corsair K65RGB Rapidfire Gaming Keyboard - Corsair K70RGB Rapidfire Gaming Keyboard - Corsair Scimitar Pro RGB Gaming Mouse Signed-off-by: Oscar Campos Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 3 +++ 2 files changed, 6 insertions(+) commit b6b1f19b06b7d4dcc261a88d74c5fb0a53988b4e Author: Aaron Armstrong Skomra Date: Mon Mar 6 10:54:58 2017 -0800 HID: wacom: don't manually release resources for the EKR Commit 5b779fc introduces the manual release of resources in wacom_remove() as an addition to the driver's use of devm. The EKR resources can only be released through wacom_remote_destroy_one() so we skip the manual release for it. Fixes: 5b779fc ("HID: wacom: release the resources before leaving despite devm") Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 49cc4c217c0dbb7d09c402472d1f85a81c093f9f Author: Aaron Armstrong Skomra Date: Mon Mar 6 10:54:57 2017 -0800 HID: wacom: Correct Intuos Pro 2 resolution The features struct for the second gen Intuos Pro uses the wrong constant for the resolution. This fix is for commit 4922cd2. Fixes: 4922cd2 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c520ff3d03f0b5db7146d9beed6373ad5d2a5e0e Author: Takashi Iwai Date: Tue Mar 21 13:56:04 2017 +0100 ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() When snd_seq_pool_done() is called, it marks the closing flag to refuse the further cell insertions. But snd_seq_pool_done() itself doesn't clear the cells but just waits until all cells are cleared by the caller side. That is, it's racy, and this leads to the endless stall as syzkaller spotted. This patch addresses the racy by splitting the setup of pool->closing flag out of snd_seq_pool_done(), and calling it properly before snd_seq_pool_done(). BugLink: http://lkml.kernel.org/r/CACT4Y+aqqy8bZA1fFieifNxR2fAfFQQABcBHj801+u5ePV0URw@mail.gmail.com Reported-and-tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 1 + sound/core/seq/seq_fifo.c | 3 +++ sound/core/seq/seq_memory.c | 17 +++++++++++++---- sound/core/seq/seq_memory.h | 1 + 4 files changed, 18 insertions(+), 4 deletions(-) commit c6736a94d0e527ddc0d1eb99dbc59886a9ecf471 Author: Takashi Iwai Date: Tue Mar 21 13:26:02 2017 +0100 ALSA: x86: Make CONFIG_SND_X86 bool CONFIG_SND_X86 is a menu config to filter only for x86-specific drivers in its sub-menu, and this doesn't have to be tristate but rather it should be a bool. Also, like other sub-menu configs, it's more user-friendly to be default=y; it's merely a menu config and the actual drivers are configured in the sub-menu, after all. Fixes: 287599cf2d77 ("ALSA: add Intel HDMI LPE audio driver for BYT/CHT-T") Signed-off-by: Takashi Iwai sound/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb3abaea7ea42619a48fa84e4b1ff48f1b18d863 Author: Mylène Josserand Date: Sat Mar 18 08:55:09 2017 +0100 ARM: dts: sun8i: Update audio-routing with renamed widgets The digital AIF interfaces has been renamed in the sun8i audio codec driver so the audio-routing in the device tree must be renamed too. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown arch/arm/boot/dts/sun8i-a33.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1792285ca63e17f8a7eb42efa48834c261a2d8f Author: Mylène Josserand Date: Sat Mar 18 08:55:08 2017 +0100 ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Update the driver to use SND_SOC_DAPM_AIF_IN instead of SND_SOC_DAPM_DAC. Rename the interface's widgets to be more precise on which slot the interface is connected. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 79e26de81448fad80f6c15ae1e3c9e7fca2740cd Author: Mylène Josserand Date: Sat Mar 18 08:55:07 2017 +0100 ASoC: sun8i-codec: Fix space on audio-routing widget An unwanted space is present in an audio widget's name on the dapm routing. It causes an error on the recognition of this widget (error: ("no dapm match for AIF1 Slot 0 Right"). Remove the space fixes it. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 649d55436137b397accb6a9d1b6975598c693bcd Author: Mylène Josserand Date: Sat Mar 18 08:55:06 2017 +0100 ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Update the driver to use the new SOC_DAPM_DOUBLE definition on the digital DAC mixer. Update the names accordingly as, when they are shared, the controls are not prefixed with the widget's name anymore. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 24 deletions(-) commit a82f16188a32a3c889916c582ea2d9188e3c2734 Author: Mylène Josserand Date: Sat Mar 18 08:55:05 2017 +0100 ASoC: sun8i-codec: Remove analog "HP" widget The "HP" widget is already present and take part to the analog part (sun8i-codec-analog). Remove it from the digital part as it is unnecessary. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 6 ------ 1 file changed, 6 deletions(-) commit cc638a488a5205713b51eabd047be6ea641cc328 Author: Andrew Donnellan Date: Mon Mar 20 17:55:22 2017 +1100 gcc-plugins: update architecture list in documentation Commit 65c059bcaa73 ("powerpc: Enable support for GCC plugins") enabled GCC plugins on powerpc, but neglected to update the architecture list in the docs. Rectify this. Fixes: 65c059bcaa73 ("powerpc: Enable support for GCC plugins") Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Documentation/gcc-plugins.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc36a903265c18d124cefaba364a7fa71b21be61 Author: Paul Mackerras Date: Tue Mar 21 12:38:02 2017 +1100 Revert "powerpc/64: Disable use of radix under a hypervisor" This reverts commit 3f91a89d424a79f8082525db5a375e438887bb3e. Now that we do have the machinery for using the radix MMU under a hypervisor, the extra check and comment introduced in 3f91a89d424a are no longer correct. The result is that when booted under a hypervisor that only allows use of radix, we clear the MMU_FTR_TYPE_RADIX and then set it again, and print a warning about ignoring the disable_radix command line option, even though the command line does not include "disable_radix". Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 22e098daae7e53763493b9d9976ef8c65190017e Author: Andrzej Hajda Date: Wed Mar 15 12:20:42 2017 +0100 drm/exynos/dsi: make te-gpios optional DSI forwards te-gpios interrupts to display controller, but if display controller works in HW-TRIGGER mode this interrupt is not necessary. Making te-gpios property optional allows to avoid generating spare interrupts. And also if panel device node of command mode panel device doesn't provide te-gpios property then the panel driver failed to probe. This was a critial issue. With this patch we can not only get rid of 60 interrupt callbacks per second but also fix the critial issues. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9cdf0ed25a9b34fd82cb0eb47a8bdc47dc9f4ff5 Author: Krzysztof Kozlowski Date: Tue Mar 14 20:38:04 2017 +0200 drm/exynos: Print kernel pointers in a restricted form Printing raw kernel pointers might reveal information which sometimes we try to hide (e.g. with Kernel Address Space Layout Randomization). Use the "%pK" format so these pointers will be hidden for unprivileged users. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 22 +++++++++++----------- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) commit f07d9c2864d4ccf0a0b5bd2dd6491f5204eab5fe Author: Andrzej Hajda Date: Tue Mar 14 09:28:00 2017 +0100 drm/exynos/decon5433: fix software trigger mask The patch fixes copy/paste bug introduced during code refactoring. Reported-by: Dan Carpenter Fixes: b93c2e8b5d9d ("drm/exynos/decon5433: configure sysreg in case of hardware trigger")Fixes: Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82a01783252be726d76cdbbababc16540f582cec Author: Andrzej Hajda Date: Tue Mar 14 09:27:59 2017 +0100 drm/exynos/fimd: signal frame done interrupt at front porch VBLANK interrupt should be signalled as soon as scanout ends, front porch is the best moment. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3cce673e1c11112c536fbc8e6912c5414d7141f Author: Andrzej Hajda Date: Tue Mar 14 09:27:58 2017 +0100 drm/exynos/decon5433: signal frame done interrupt at front porch DECON in case of video mode generates interrupt by default at start of vertical back porch. As this interrupt is used to generate VBLANK events more optimal point is start of vertical front porch. Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- include/video/exynos5433_decon.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 73488331eb9460d14974a1e2c734f77ce8869183 Author: Andrzej Hajda Date: Tue Mar 14 09:27:57 2017 +0100 drm/exynos/decon5433: fix vblank event handling Current implementation of event handling assumes that vblank interrupt is always called at the right time. It is not true, it can be delayed due to various reasons. As a result different races can happen. The patch fixes the issue by using hardware frame counter present in DECON to serialize vblank and commit completion events. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 78 ++++++++++++++++++++++++++- include/video/exynos5433_decon.h | 8 +++ 2 files changed, 85 insertions(+), 1 deletion(-) commit a392276d1dec63e5aabe6f527c37de29a729559a Author: Andrzej Hajda Date: Tue Mar 14 09:27:56 2017 +0100 drm/exynos: move crtc event handling to drivers callbacks CRTC event is currently send with next vblank, or instantly in case crtc is being disabled. This approach usually works, but in corner cases it can result in premature event generation. Only device driver is able to verify if the event can be sent. This patch is a first step in that direction - it moves event handling to the drivers. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1 + drivers/gpu/drm/exynos/exynos_drm_crtc.c | 29 +++++++++++++++------------ drivers/gpu/drm/exynos/exynos_drm_crtc.h | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 ++ drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 + drivers/gpu/drm/exynos/exynos_mixer.c | 1 + 7 files changed, 24 insertions(+), 13 deletions(-) commit 6bdc92ee4980ca10171a8de338fad612f00bb48f Author: Krzysztof Kozlowski Date: Sat Mar 11 20:04:16 2017 +0200 drm/exynos: Remove support for Exynos4415 (SoC not supported anymore) Support for Exynos4415 is going away because there are no internal nor external users. Since commit 46dcf0ff0de3 ("ARM: dts: exynos: Remove exynos4415.dtsi"), the platform cannot be instantiated so remove also the drivers. Signed-off-by: Krzysztof Kozlowski Acked-by: Kukjin Kim Acked-by: Rob Herring Signed-off-by: Inki Dae .../devicetree/bindings/display/exynos/exynos_dsim.txt | 1 - .../bindings/display/exynos/samsung-fimd.txt | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 15 +-------------- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 18 ++---------------- 4 files changed, 3 insertions(+), 32 deletions(-) commit ac7ce78ba036c0f9952d9706b1941c7d80c78680 Author: Dan Carpenter Date: Tue Feb 14 10:46:20 2017 +0300 drm/exynos/decon5433: & vs | typo "&" was obviously intended instead of "|". The original condition is always true. Fixes: b93c2e8b5d9d ("drm/exynos/decon5433: configure sysreg in case of hardware trigger") Signed-off-by: Dan Carpenter Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 359b69310014511901bd61cc5f7680cb5de1faef Author: Xiaoguang Chen Date: Tue Mar 21 10:54:21 2017 +0800 drm/i915/gvt: set shadow entry to scratch page while p2m failed Sometimes guest driver will only update partial of the GGTT entry then access it. In this situation a failure will happen while translating the gpa to hpa. Now in this situation we let the corresponding shadow entry pointing to a scratch page. Signed-off-by: Zhi Wang Signed-off-by: Xiaoguang Chen Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 14f5ba26aa7060b4cad9c4c288b9a785bd0cd1a8 Author: Xu Han Date: Tue Mar 21 10:00:59 2017 +0800 drm/i915/gvt: Fix guest fail to read EDID leading to black guest console issue. It appears missing slaves on the i2c should cause 0xff to be returned rather than 0. So, when the Windows driver tried to address a slave at 0x40 and got 0’s back rather than 0xff’s it must have confused it. Signed-off-by: Paul Durrant Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a53148868493bd5e0b18a9814aaa20bf74e3b26 Author: Chuanxiao Dong Date: Tue Mar 21 09:32:19 2017 +0800 drm/i915/gvt: fix wrong offset when loading RCS mocs Fix the wrong offset of the RCS specific mocs Fixes: 178657139307 ("drm/i915/gvt: vGPU context switch") Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 814a585038e36cd158bee4ef964e579136cf24c6 Author: Vineet Gupta Date: Mon Mar 20 18:46:15 2017 -0700 ARCv2: make unimplemented vectors as no-ops rather than halt core Signed-off-by: Vineet Gupta arch/arc/kernel/entry-arcv2.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 4296f23ed49a15d36949458adcc66ff993dee2a8 Author: Rafael J. Wysocki Date: Sun Mar 19 14:30:02 2017 +0100 cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start() sugov_start() only initializes struct sugov_cpu per-CPU structures for shared policies, but it should do that for single-CPU policies too. That in particular makes the IO-wait boost mechanism work in the cases when cpufreq policies correspond to individual CPUs. Fixes: 21ca6d2c52f8 (cpufreq: schedutil: Add iowait boosting) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: 4.9+ # 4.9+ kernel/sched/cpufreq_schedutil.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit c3104aae5d8cc443556f8613466e16737326e215 Author: Arnd Bergmann Date: Mon Mar 13 17:36:25 2017 +0100 remoteproc: qcom: fix QCOM_SMD dependencies qcom_smd_register_edge() is provided by either QCOM_SMD or RPMSG_QCOM_SMD, and if both of them are disabled, it does nothing. The check for the PIL drivers however only checks for QCOM_SMD, so it breaks with QCOM_SMD=n && RPMSG_QCOM_SMD=m: drivers/remoteproc/built-in.o: In function `smd_subdev_remove': qcom_wcnss_iris.c:(.text+0x231c): undefined reference to `qcom_smd_unregister_edge' drivers/remoteproc/built-in.o: In function `smd_subdev_probe': qcom_wcnss_iris.c:(.text+0x2344): undefined reference to `qcom_smd_register_edge' drivers/remoteproc/built-in.o: In function `smd_subdev_probe': qcom_q6v5_pil.c:(.text+0x3538): undefined reference to `qcom_smd_register_edge' qcom_q6v5_pil.c:(.text+0x3538): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_smd_register_edge' This clarifies the Kconfig dependency. Fixes: 4b48921a8f74 ("remoteproc: qcom: Use common SMD edge handler") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d963b6e650d9d5533223f3dbcde7dda466df65c Author: Joe Thornber Date: Mon Mar 20 11:54:11 2017 -0400 dm cache metadata: fix metadata2 format's blocks_are_clean_separate_dirty The dm_bitset_cursor_begin() call was using the incorrect nr_entries. Also, the last dm_bitset_cursor_next() must be avoided if we're at the end of the cursor. Fixes: 7f1b21591a6 ("dm cache metadata: use cursor api in blocks_are_clean_separate_dirty()") Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3aa53859d23e1b9cf1a60f82a9008e35ef10bd6a Author: Luiz Capitulino Date: Mon Mar 13 09:08:20 2017 -0400 KVM: Documentation: document MCE ioctls Signed-off-by: Luiz Capitulino Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 6d1b3ad2cd87150fc89bad2331beab173a8ad24d Author: Wanpeng Li Date: Sun Mar 12 00:53:52 2017 -0800 KVM: nVMX: don't reset kvm mmu twice kvm mmu is reset once successfully loading CR3 as part of emulating vmentry in nested_vmx_load_cr3(). We should not reset kvm mmu twice. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 -- 1 file changed, 2 deletions(-) commit 49e190ec332e96ba28f24b86f7a92f614707819b Author: kbuild test robot Date: Sat Jan 28 05:01:51 2017 +0800 PTP: fix ptr_ret.cocci warnings drivers/ptp/ptp_kvm.c:229:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci CC: Marcelo Tosatti Signed-off-by: Fengguang Wu Signed-off-by: Radim Krčmář drivers/ptp/ptp_kvm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3863dff0c3dd72984395c93b12383b393c5c3989 Author: Dmitry Vyukov Date: Tue Jan 24 14:06:48 2017 +0100 kvm: fix usage of uninit spinlock in avic_vm_destroy() If avic is not enabled, avic_vm_init() does nothing and returns early. However, avic_vm_destroy() still tries to destroy what hasn't been created. The only bad consequence of this now is that avic_vm_destroy() uses svm_vm_data_hash_lock that hasn't been initialized (and is not meant to be used at all if avic is not enabled). Return early from avic_vm_destroy() if avic is not enabled. It has nothing to destroy. Signed-off-by: Dmitry Vyukov Cc: Joerg Roedel Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: David Hildenbrand Cc: kvm@vger.kernel.org Cc: syzkaller@googlegroups.com Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 3 +++ 1 file changed, 3 insertions(+) commit 6c6c5e0311c83ffe75e14260fb83e05e21e1d488 Author: Radim Krčmář Date: Fri Jan 13 18:59:04 2017 +0100 KVM: VMX: downgrade warning on unexpected exit code We never needed the call trace and we better rate-limit if it can be triggered by a guest. Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6be3b6cce1e225f189b68b4e84fc711d19b4277b Author: Ryan Hsu Date: Mon Mar 13 15:49:03 2017 -0700 ath10k: fix incorrect wlan_mac_base in qca6174_regs In the 'commit ebee76f7fa46 ("ath10k: allow setting coverage class")', it inherits the design and the address offset from ath9k, but the address is not applicable to QCA6174, which leads to a random crash while doing the resume() operation, since the set_coverage_class.ops will be called from ieee80211_reconfig() when resume() (if the wow is not configured). Fix the incorrect address offset here to avoid the random crash. Verified on QCA6174/hw3.0 with firmware WLAN.RM.4.4-00022-QCARMSWPZ-2. kvalo: this also seems to fix a regression with firmware restart. Fixes: ebee76f7fa46 ("ath10k: allow setting coverage class") Cc: # v4.10 Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7041d5d286fb54635f540c1bb3b43980ed65513a Author: Chao Yu Date: Wed Mar 8 20:07:49 2017 +0800 f2fs: combine nat_bits and free_nid_bitmap cache Both nat_bits cache and free_nid_bitmap cache provide same functionality as a intermediate cache between free nid cache and disk, but with different granularity of indicating free nid range, and different persistence policy. nat_bits cache provides better persistence ability, and free_nid_bitmap provides better granularity. In this patch we combine advantage of both caches, so finally policy of the intermediate cache would be: - init: load free nid status from nat_bits into free_nid_bitmap - lookup: scan free_nid_bitmap before load NAT blocks - update: update free_nid_bitmap in real-time - persistence: udpate and persist nat_bits in checkpoint This patch also resolves performance regression reported by lkp-robot. commit: 4ac912427c4214d8031d9ad6fbc3bc75e71512df ("f2fs: introduce free nid bitmap") d00030cf9cd0bb96fdccc41e33d3c91dcbb672ba ("f2fs: use __set{__clear}_bit_le") 1382c0f3f9d3f936c8bc42ed1591cf7a593ef9f7 ("f2fs: combine nat_bits and free_nid_bitmap cache") 4ac912427c4214d8 d00030cf9cd0bb96fdccc41e33 1382c0f3f9d3f936c8bc42ed15 ---------------- -------------------------- -------------------------- %stddev %change %stddev %change %stddev \ | \ | \ 77863 ± 0% +2.1% 79485 ± 1% +50.8% 117404 ± 0% aim7.jobs-per-min 231.63 ± 0% -2.0% 227.01 ± 1% -33.6% 153.80 ± 0% aim7.time.elapsed_time 231.63 ± 0% -2.0% 227.01 ± 1% -33.6% 153.80 ± 0% aim7.time.elapsed_time.max 896604 ± 0% -0.8% 889221 ± 3% -20.2% 715260 ± 1% aim7.time.involuntary_context_switches 2394 ± 1% +4.6% 2503 ± 1% +3.7% 2481 ± 2% aim7.time.maximum_resident_set_size 6240 ± 0% -1.5% 6145 ± 1% -14.1% 5360 ± 1% aim7.time.system_time 1111357 ± 3% +1.9% 1132509 ± 2% -6.2% 1041932 ± 2% aim7.time.voluntary_context_switches ... Signed-off-by: Chao Yu Tested-by: Xiaolong Ye Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 125 ++++++++++++++++++++++----------------------------------- 1 file changed, 47 insertions(+), 78 deletions(-) commit 586d1492f301982e349797cfb05d9f343002ffa2 Author: Chao Yu Date: Wed Mar 1 17:09:07 2017 +0800 f2fs: skip scanning free nid bitmap of full NAT blocks This patch adds to account free nids for each NAT blocks, and while scanning all free nid bitmap, do check count and skip lookuping in full NAT block. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 1 + fs/f2fs/f2fs.h | 2 ++ fs/f2fs/node.c | 33 +++++++++++++++++++++++++++------ 3 files changed, 30 insertions(+), 6 deletions(-) commit 23380b8568b85cd4b7a056891f4dbf131f7b871d Author: Jaegeuk Kim Date: Tue Mar 7 14:11:06 2017 -0800 f2fs: use __set{__clear}_bit_le This patch uses __set{__clear}_bit_le for highter speed. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 +- fs/f2fs/node.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 9f7e4a2c49fd166f17cf4125766a68dce8716764 Author: Jaegeuk Kim Date: Fri Mar 10 09:39:57 2017 -0800 f2fs: declare static functions This is to avoid build warning reported by kbuild test robot. Signed-off-by: Fengguang Wu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 720037f939fa50fc3531035ae61b4cf4b0ff35e5 Author: Jaegeuk Kim Date: Mon Mar 6 11:59:56 2017 -0800 f2fs: don't overwrite node block by SSR This patch fixes that SSR can overwrite previous warm node block consisting of a node chain since the last checkpoint. Fixes: 5b6c6be2d878 ("f2fs: use SSR for warm node as well") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9702c67c6066f583b629cf037d2056245bb7a8e6 Author: John Garry Date: Thu Mar 16 23:07:28 2017 +0800 scsi: libsas: fix ata xfer length The total ata xfer length may not be calculated properly, in that we do not use the proper method to get an sg element dma length. According to the code comment, sg_dma_len() should be used after dma_map_sg() is called. This issue was found by turning on the SMMUv3 in front of the hisi_sas controller in hip07. Multiple sg elements were being combined into a single element, but the original first element length was being use as the total xfer length. Cc: Fixes: ff2aeb1eb64c8a4770a6 ("libata: convert to chained sg") Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdfe4a393e9cd8c92f4489ca207d410f44d05043 Author: Stafford Horne Date: Mon Mar 13 23:45:21 2017 +0900 generic syscalls: Wire up statx syscall The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table. Fixes: a528d35e8bfcc ("statx: Add a system call to make enhanced file info available") Cc: Thomas Gleixner Cc: Al Viro Cc: David Howells Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Stafford Horne Signed-off-by: Will Deacon include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83749abaafed348cdac6a63b5f76aa9b1b42409b Author: Bard Liao Date: Mon Mar 20 10:20:53 2017 +0800 ASoC: rt5665: fix wrong shift rt5665_if2_1_adc_in_enum The shift is RT5665_IF2_1_ADC_IN_SFT not RT5665_IF3_ADC_IN_SFT. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc3a47a248d7791ef0d2c81a35c46769e55e4c6c Author: Jaroslav Kysela Date: Thu Mar 9 13:30:09 2017 +0100 ALSA: hda - add support for docking station for HP 840 G3 This tested patch adds missing initialization for Line-In/Out PINs for the docking station for HP 840 G3. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 04d5466a976b096364a39a63ac264c1b3a5f8fa1 Author: Jaroslav Kysela Date: Thu Mar 9 13:29:13 2017 +0100 ALSA: hda - add support for docking station for HP 820 G2 This tested patch adds missing initialization for Line-In/Out PINs for the docking station for HP 820 G2. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 72f310481a08db821b614e7b5d00febcc9064b36 Author: Marc Zyngier Date: Thu Mar 16 18:20:50 2017 +0000 arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region We don't hold the mmap_sem while searching for VMAs (via find_vma), in kvm_arch_prepare_memory_region, which can end up in expected failures. Fixes: commit 8eef91239e57 ("arm/arm64: KVM: map MMIO regions at creation time") Cc: Ard Biesheuvel Cc: Eric Auger Cc: stable@vger.kernel.org # v3.18+ Reviewed-by: Christoffer Dall [ Handle dirty page logging failure case ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm/kvm/mmu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 90f6e150e44a0dc3883110eeb3ab35d1be42b6bb Author: Marc Zyngier Date: Thu Mar 16 18:20:49 2017 +0000 arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm We don't hold the mmap_sem while searching for the VMAs when we try to unmap each memslot for a VM. Fix this properly to avoid unexpected results. Fixes: commit 957db105c997 ("arm/arm64: KVM: Introduce stage2_unmap_vm") Cc: stable@vger.kernel.org # v3.19+ Reviewed-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm/kvm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) commit e3b1ebd673876f2cdb0b84205e52a33b94a9860f Author: Geert Uytterhoeven Date: Mon Mar 6 11:04:22 2017 +0100 m68k: Wire up statx Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 1 + arch/m68k/kernel/syscalltable.S | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 3820ed470e71d7aa3d355495f7fd1cd8457e7c96 Author: Geert Uytterhoeven Date: Mon Mar 6 10:40:02 2017 +0100 m68k/defconfig: Update defconfigs for v4.11-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 14 +++++++++++++- arch/m68k/configs/apollo_defconfig | 14 +++++++++++++- arch/m68k/configs/atari_defconfig | 14 +++++++++++++- arch/m68k/configs/bvme6000_defconfig | 14 +++++++++++++- arch/m68k/configs/hp300_defconfig | 14 +++++++++++++- arch/m68k/configs/mac_defconfig | 14 +++++++++++++- arch/m68k/configs/multi_defconfig | 14 +++++++++++++- arch/m68k/configs/mvme147_defconfig | 14 +++++++++++++- arch/m68k/configs/mvme16x_defconfig | 14 +++++++++++++- arch/m68k/configs/q40_defconfig | 14 +++++++++++++- arch/m68k/configs/sun3_defconfig | 14 +++++++++++++- arch/m68k/configs/sun3x_defconfig | 14 +++++++++++++- 12 files changed, 156 insertions(+), 12 deletions(-) commit 066def56dc712329561abadcea15be9cad7393b6 Author: Geert Uytterhoeven Date: Mon Jan 2 13:51:43 2017 +0100 m68k/bitops: Correct signature of test_bit() mm/filemap.c: In function ‘clear_bit_unlock_is_negative_byte’: mm/filemap.c:933: warning: passing argument 2 of ‘test_bit’ discards qualifiers from pointer target type Make the bitmask pointed to by the "vaddr" parameter volatile to fix this, like is done on other architectures. Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f13eed7abba7f3df76287e084e7d46c24935dd61 Merge: b7048ea 2958b90 Author: Jani Nikula Date: Mon Mar 20 12:10:26 2017 +0200 Merge tag 'gvt-fixes-2017-03-17' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-03-17 - force_nonpriv reg handling in cmd parser (Yan) - gvt error message cleanup (Tina) - i915_wait_request fix from Chris - KVM srcu warning fix (Changbin) - ensure shadow ctx pinned (Chuanxiao) - critical gvt scheduler interval time fix (Zhenyu) - etc. Signed-off-by: Jani Nikula commit 6d98ce0be541d4a3cfbb52cd75072c0339ebb500 Author: Nicholas Piggin Date: Fri Mar 17 15:13:20 2017 +1000 powerpc/64s: Fix idle wakeup potential to clobber registers We concluded there may be a window where the idle wakeup code could get to pnv_wakeup_tb_loss() (which clobbers non-volatile GPRs), but the hardware may set SRR1[46:47] to 01b (no state loss) which would result in the wakeup code failing to restore non-volatile GPRs. I was not able to trigger this condition with trivial tests on real hardware or simulator, but the ISA (at least 2.07) seems to allow for it, and Gautham says that it can happen if there is an exception pending when the sleep/winkle instruction is executed. Fixes: 1706567117ba ("powerpc/kvm: make hypervisor state restore a function") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Nicholas Piggin Acked-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit b467e08a15563dede0d37d3233baa24fb97a7310 Author: Icenowy Zheng Date: Sat Mar 18 04:19:43 2017 +0800 clk: sunxi-ng: fix recalc_rate formula of NKMP clocks In commit e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets"), the final formula of NKMP clocks' recalc_rate is refactored; however, the refactored formula broke the calculation due to some C language operand priority problem -- the priority of operand >> is lower than * and /, makes the formula being parsed as "(parent_rate * n * k) >> (p / m)", but it should be "(parent_rate * n * k >> p) / m". Add the pair of parentheses to fix up this issue. This pair of parentheses used to exist in the old formula. Fixes: e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07f5ab6002a4f0b633f3495157166f9f6180871b Author: Vaibhav Jain Date: Thu Feb 23 08:57:26 2017 +0530 cxl: Route eeh events to all slices for pci_channel_io_perm_failure state Fix a boundary condition where in some cases an eeh event with state == pci_channel_io_perm_failure wont be passed on to a driver attached to the virtual PCI device associated with a slice. This will happen in case the slice just before (n-1) doesn't have any vPHB bus associated with it, that results in an early return from cxl_pci_error_detected() callback. With state == pci_channel_io_perm_failure, the adapter will be removed irrespective of the return value of cxl_vphb_error_detected(). So we now always return PCI_ERS_RESULT_DISCONNECTED for this case i.e even if the AFU isn't using a vPHB (currently returns PCI_ERS_RESULT_NONE). Fixes: e4f5fc001a6("cxl: Do not create vPHB if there are no AFU configuration records") Signed-off-by: Vaibhav Jain Reviewed-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit f363a06642f28caaa78cb6446bbad90c73fe183c Author: Takashi Iwai Date: Mon Mar 20 10:08:19 2017 +0100 ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call In the commit [15c75b09f8d1: ALSA: ctxfi: Fallback DMA mask to 32bit], I forgot to put "!" at dam_set_mask() call check in cthw20k1.c (while cthw20k2.c is OK). This patch fixes that obvious bug. (As a side note: although the original commit was completely wrong, it's still working for most of machines, as it sets to 32bit DMA mask in the end. So the bug severity is low.) Fixes: 15c75b09f8d1 ("ALSA: ctxfi: Fallback DMA mask to 32bit") Cc: Signed-off-by: Takashi Iwai sound/pci/ctxfi/cthw20k1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe686babf4cf62b9b214b99847c735baa35a9fa2 Author: Philipp Tomsich Date: Wed Mar 15 12:23:58 2017 +0100 clk: sunxi-ng: Fix div/mult settings for osc12M on A64 The mult/div for osc12M was previously backwards (giving a 48M rate for osc12M). Fix it. Signed-off-by: Philipp Tomsich Tested-by: Christoph Muellner Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 975629c3f76ce3d86e1f943db9847e0312a98daf Author: Pei Zhang Date: Mon Mar 20 23:49:19 2017 +0800 drm/i915/gvt: add write handler for mmio mbctl Guest will write mmio mbctl which need a special handler in gvt to clear the bit 4 to inidcate the write operation success. V2: use bit definition macro to make code readable. Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9693219aa61dc7a75ac015e5c011e889cb821eec Author: Icenowy Zheng Date: Sat Mar 18 05:23:15 2017 +0800 ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI The bl_en_pin GPIO pinmux is configured as "gpio_in", which makes it conflicts with the real GPIO usage (out), and makes the backlight not usable. Drop the GPIO pinmux for it, thus this GPIO can be correctly used. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 7 ------- 1 file changed, 7 deletions(-) commit 0cdefd5b5485ee6eb3512a75739d09a4090176ed Author: Florian Fainelli Date: Sat Mar 18 21:53:20 2017 -0700 ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings The CPU port of the BCM53125 is configured with RGMII (no delays) but this should actually be RGMII with transmit delay (rgmii-txid) because STMMAC takes care of inserting the transmitter delay. This fixes occasional packet loss encountered. Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board") Reported-by: Hartmut Knaack Signed-off-by: Florian Fainelli Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93a15b58cfb8a24e666ffca432f19fe65c1cd7d1 Author: Alex Williamson Date: Sun Mar 19 20:38:40 2017 -0600 drm/i915/kvmgt: Hold struct kvm reference The kvmgt code keeps a pointer to the struct kvm associated with the device, but doesn't actually hold a reference to it. If we do unclean shutdown testing (ie. killing the user process), then we can see the kvm association to the device unset, which causes kvmgt to trigger a device release via a work queue. Naturally we cannot guarantee that the cached struct kvm pointer is still valid at this point without holding a reference. The observed failure in this case is a stuck cpu trying to acquire the spinlock from the invalid reference, but other failure modes are clearly possible. Hold a reference to avoid this. Signed-off-by: Alex Williamson Cc: stable@vger.kernel.org #v4.10 Cc: Jike Song Cc: Paolo Bonzini Cc: Zhenyu Wang Cc: Zhi Wang Reviewed-by: Jike Song Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 2 ++ 1 file changed, 2 insertions(+) commit 97da3854c526d3a6ee05c849c96e48d21527606c Author: Linus Torvalds Date: Sun Mar 19 19:09:39 2017 -0700 Linux 4.11-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 452b94b8c8c7eb7dd0d0fa9a9776e0d02cd73b97 Author: Linus Torvalds Date: Sun Mar 19 19:00:47 2017 -0700 mm/swap: don't BUG_ON() due to uninitialized swap slot cache This BUG_ON() triggered for me once at shutdown, and I don't see a reason for the check. The code correctly checks whether the swap slot cache is usable or not, so an uninitialized swap slot cache is not actually problematic afaik. I've temporarily just switched the BUG_ON() to a WARN_ON_ONCE(), since I'm not sure why that seemingly pointless check was there. I suspect the real fix is to just remove it entirely, but for now we'll warn about it but not bring the machine down. Cc: "Huang, Ying" Cc: Tim Chen Cc: Michal Hocko Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_slots.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a07a6e4121f1d4e1bbaead8210404a7f37139267 Merge: 4571bc5 8971e1c Author: Linus Torvalds Date: Sun Mar 19 18:49:28 2017 -0700 Merge tag 'powerpc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc fixes from Michael Ellerman: "A couple of minor powerpc fixes for 4.11: - wire up statx() syscall - don't print a warning on memory hotplug when HPT resizing isn't available Thanks to: David Gibson, Chandan Rajendra" * tag 'powerpc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Don't give a warning when HPT resizing isn't available powerpc: Wire up statx() syscall commit 4571bc5abfba3bed8cb18f640bfcaf336473aee3 Merge: 8aa3417 73580da Author: Linus Torvalds Date: Sun Mar 19 18:11:13 2017 -0700 Merge branch 'parisc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Mikulas Patocka added support for R_PARISC_SECREL32 relocations in modules with CONFIG_MODVERSIONS. - Dave Anglin optimized the cache flushing for vmap ranges. - Arvind Yadav provided a fix for a potential NULL pointer dereference in the parisc perf code (and some code cleanups). - I wired up the new statx system call, fixed some compiler warnings with the access_ok() macro and fixed shutdown code to really halt a system at shutdown instead of crashing & rebooting. * 'parisc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix system shutdown halt parisc: perf: Fix potential NULL pointer dereference parisc: Avoid compiler warnings with access_ok() parisc: Wire up statx system call parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range parisc: support R_PARISC_SECREL32 relocation in modules commit 8aa3417255fababc0cab7128dd7520d3af344ab8 Merge: 1b8df61 6c611d1 Author: Linus Torvalds Date: Sun Mar 19 18:06:31 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "The bulk of the changes are in qla2xxx target driver code to address various issues found during Cavium/QLogic's internal testing (stable CC's included), along with a few other stability and smaller miscellaneous improvements. There are also a couple of different patch sets from Mike Christie, which have been a result of his work to use target-core ALUA logic together with tcm-user backend driver. Finally, a patch to address some long standing issues with pass-through SCSI export of TYPE_TAPE + TYPE_MEDIUM_CHANGER devices, which will make folks using physical (or virtual) magnetic tape happy" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (28 commits) qla2xxx: Update driver version to 9.00.00.00-k qla2xxx: Fix delayed response to command for loop mode/direct connect. qla2xxx: Change scsi host lookup method. qla2xxx: Add DebugFS node to display Port Database qla2xxx: Use IOCB interface to submit non-critical MBX. qla2xxx: Add async new target notification qla2xxx: Export DIF stats via debugfs qla2xxx: Improve T10-DIF/PI handling in driver. qla2xxx: Allow relogin to proceed if remote login did not finish qla2xxx: Fix sess_lock & hardware_lock lock order problem. qla2xxx: Fix inadequate lock protection for ABTS. qla2xxx: Fix request queue corruption. qla2xxx: Fix memory leak for abts processing qla2xxx: Allow vref count to timeout on vport delete. tcmu: Convert cmd_time_out into backend device attribute tcmu: make cmd timeout configurable tcmu: add helper to check if dev was configured target: fix race during implicit transition work flushes target: allow userspace to set state to transitioning target: fix ALUA transition timeout handling ... commit 1b8df61908bde12946877b4c079bb73fc0bd3409 Merge: 93afaa4 52084f8 Author: Linus Torvalds Date: Sun Mar 19 15:45:02 2017 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull device-dax fixes from Dan Williams: "The device-dax driver was not being careful to handle falling back to smaller fault-granularity sizes. The driver already fails fault attempts that are smaller than the device's alignment, but it also needs to handle the cases where a larger page mapping could be established. For simplicity of the immediate fix the implementation just signals VM_FAULT_FALLBACK until fault-size == device-alignment. One fix is for -stable to address pmd-to-pte fallback from the original implementation, another fix is for the new (introduced in 4.11-rc1) pud-to-pmd regression, and a typo fix comes along for the ride. These have received a build success notification from the kbuild robot" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fix debug output typo device-dax: fix pud fault fallback handling device-dax: fix pmd/pte fault fallback handling commit 0aeccdfe220c360ab888816da06b8eb67d910ff6 Author: Bart Van Assche Date: Fri Mar 17 17:02:03 2017 -0700 scsi: scsi_dh_alua: Warn if the first argument of alua_rtpg_queue() is NULL Callers must provide a valid port group to alua_rtpg_queue(). Issue a kernel warning if that is not the case. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Tang Junhui Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cb689fe42927281b8d98606ae5450173fcc66a9 Author: Bart Van Assche Date: Fri Mar 17 17:02:02 2017 -0700 scsi: scsi_dh_alua: Ensure that alua_activate() calls the completion function Callers of scsi_dh_activate(), e.g. dm-mpath, assume that this function either returns an error code or calls the completion function. Make alua_activate() call the completion function even if scsi_device_get() fails. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Tang Junhui Cc: Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 625fe857e4fac6518716f3c0ff5e5deb8ec6d238 Author: Bart Van Assche Date: Fri Mar 17 17:02:01 2017 -0700 scsi: scsi_dh_alua: Check scsi_device_get() return value Do not queue ALUA work nor call scsi_device_put() if the scsi_device_get() call fails. This patch fixes the following crash: general protection fault: 0000 [#1] SMP RIP: 0010:scsi_device_put+0xb/0x30 Call Trace: scsi_disk_put+0x2d/0x40 sd_release+0x3d/0xb0 __blkdev_put+0x29e/0x360 blkdev_put+0x49/0x170 dm_put_table_device+0x58/0xc0 [dm_mod] dm_put_device+0x70/0xc0 [dm_mod] free_priority_group+0x92/0xc0 [dm_multipath] free_multipath+0x70/0xc0 [dm_multipath] multipath_dtr+0x19/0x20 [dm_multipath] dm_table_destroy+0x67/0x120 [dm_mod] dev_suspend+0xde/0x240 [dm_mod] ctl_ioctl+0x1f5/0x520 [dm_mod] dm_ctl_ioctl+0xe/0x20 [dm_mod] do_vfs_ioctl+0x8f/0x700 SyS_ioctl+0x3c/0x70 entry_SYSCALL_64_fastpath+0x18/0xad Fixes: commit 03197b61c5ec ("scsi_dh_alua: Use workqueue for RTPG") Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Tang Junhui Cc: Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6985bd5e21901c2d2bfc924b114887e20c002901 Author: Lorenzo Bianconi Date: Tue Mar 14 22:05:20 2017 +0100 iio: imu: st_lsm6dsx: fix FIFO_CTRL2 overwrite during watermark configuration Fixes: 290a6ce11d93 (iio: imu: add support to lsm6dsx driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c611d18f386d37cce3afbd921568e2a895bd86e Author: Himanshu Madhani Date: Wed Mar 15 09:48:56 2017 -0700 qla2xxx: Update driver version to 9.00.00.00-k Signed-off-by: Himanshu Madhani signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec7193e26055112bc824929fd943035f9a30b06f Author: Quinn Tran Date: Wed Mar 15 09:48:55 2017 -0700 qla2xxx: Fix delayed response to command for loop mode/direct connect. Current driver wait for FW to be in the ready state before processing in-coming commands. For Arbitrated Loop or Point-to- Point (not switch), FW Ready state can take a while. FW will transition to ready state after all Nports have been logged in. In the mean time, certain initiators have completed the login and starts IO. Driver needs to start processing all queues if FW is already started. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 10 ++++++++-- drivers/scsi/qla2xxx/qla_init.c | 12 ++++++++++++ drivers/scsi/qla2xxx/qla_isr.c | 14 +++++++++++++- drivers/scsi/qla2xxx/qla_mbx.c | 6 +++--- drivers/scsi/qla2xxx/qla_os.c | 21 ++++++++++++++++++++- drivers/scsi/qla2xxx/qla_target.c | 38 +++++++++++++++++++++++++------------- 6 files changed, 81 insertions(+), 20 deletions(-) commit 482c9dc79204bb83c3433a59680c787a0b98c000 Author: Quinn Tran Date: Wed Mar 15 09:48:54 2017 -0700 qla2xxx: Change scsi host lookup method. For target mode, when new scsi command arrive, driver first performs a look up of the SCSI Host. The current look up method is based on the ALPA portion of the NPort ID. For Cisco switch, the ALPA can not be used as the index. Instead, the new search method is based on the full value of the Nport_ID via btree lib. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/Kconfig | 1 + drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_init.c | 14 +++--- drivers/scsi/qla2xxx/qla_mbx.c | 28 ++++-------- drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 92 +++++++++++++++++++++++++++++++++------ 7 files changed, 100 insertions(+), 40 deletions(-) commit c423437e3ff41b8ca551ab6621baf11538dbfe9d Author: Himanshu Madhani Date: Wed Mar 15 09:48:53 2017 -0700 qla2xxx: Add DebugFS node to display Port Database Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_dfs.c | 92 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 4 deletions(-) commit 15f30a5752287f20c7de428423c34bc51cfbe465 Author: Quinn Tran Date: Wed Mar 15 09:48:52 2017 -0700 qla2xxx: Use IOCB interface to submit non-critical MBX. The Mailbox interface is currently over subscribed. We like to reserve the Mailbox interface for the chip managment and link initialization. Any non essential Mailbox command will be routed through the IOCB interface. The IOCB interface is able to absorb more commands. Following commands are being routed through IOCB interface - Get ID List (007Ch) - Get Port DB (0064h) - Get Link Priv Stats (006Dh) Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 12 +- drivers/scsi/qla2xxx/qla_gbl.h | 10 +- drivers/scsi/qla2xxx/qla_init.c | 46 +------ drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_mbx.c | 270 ++++++++++++++++++++++++++++++++++++-- drivers/scsi/qla2xxx/qla_target.c | 4 +- 6 files changed, 279 insertions(+), 65 deletions(-) commit f1443eebca7792b3b8b41b27652d67ddc5d31fa2 Author: Quinn Tran Date: Wed Mar 15 09:48:51 2017 -0700 qla2xxx: Add async new target notification Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 6 +++--- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 54b9993c8cf2d77c0f23be828a22e0817f742442 Author: Anil Gurumurthy Date: Wed Mar 15 09:48:50 2017 -0700 qla2xxx: Export DIF stats via debugfs Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 12 ++++++++++++ drivers/scsi/qla2xxx/qla_dfs.c | 15 +++++++++++++++ 2 files changed, 27 insertions(+) commit be25152c0d9e236076323abbe9def9714234b761 Author: Quinn Tran Date: Wed Mar 15 09:48:49 2017 -0700 qla2xxx: Improve T10-DIF/PI handling in driver. Add routines to support T10 DIF tag. Signed-off-by: Quinn Tran Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dbg.h | 1 + drivers/scsi/qla2xxx/qla_def.h | 10 + drivers/scsi/qla2xxx/qla_gbl.h | 6 +- drivers/scsi/qla2xxx/qla_iocb.c | 13 +- drivers/scsi/qla2xxx/qla_target.c | 540 ++++++++++++++++++++++--------------- drivers/scsi/qla2xxx/qla_target.h | 38 ++- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 49 ++-- 7 files changed, 406 insertions(+), 251 deletions(-) commit 5b33469a055c77001fd2c62b0f985c991b0e5b65 Author: Quinn Tran Date: Wed Mar 15 09:48:48 2017 -0700 qla2xxx: Allow relogin to proceed if remote login did not finish If the remote port have started the login process, then the PLOGI and PRLI should be back to back. Driver will allow the remote port to complete the process. For the case where the remote port decide to back off from sending PRLI, this local port sets an expiration timer for the PRLI. Once the expiration time passes, the relogin retry logic is allowed to go through and perform login with the remote port. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 12 ++++++++++-- drivers/scsi/qla2xxx/qla_isr.c | 25 +++++++++++++++++++------ drivers/scsi/qla2xxx/qla_target.c | 1 + 4 files changed, 32 insertions(+), 8 deletions(-) commit f159b3c7cd45c550d0f73806451a10b6b6bc08ae Author: Quinn Tran Date: Wed Mar 15 09:48:47 2017 -0700 qla2xxx: Fix sess_lock & hardware_lock lock order problem. The main lock that needs to be held for CMD or TMR submission to upper layer is the sess_lock. The sess_lock is used to serialize cmd submission and session deletion. The addition of hardware_lock being held is not necessary. This patch removes hardware_lock dependency from CMD/TMR submission. Use hardware_lock only for error response in this case. Path1 CPU0 CPU1 ---- ---- lock(&(&ha->tgt.sess_lock)->rlock); lock(&(&ha->hardware_lock)->rlock); lock(&(&ha->tgt.sess_lock)->rlock); lock(&(&ha->hardware_lock)->rlock); Path2/deadlock *** DEADLOCK *** Call Trace: dump_stack+0x85/0xc2 print_circular_bug+0x1e3/0x250 __lock_acquire+0x1425/0x1620 lock_acquire+0xbf/0x210 _raw_spin_lock_irqsave+0x53/0x70 qlt_sess_work_fn+0x21d/0x480 [qla2xxx] process_one_work+0x1f4/0x6e0 Cc: Cc: Bart Van Assche Reported-by: Bart Van Assche Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 41 +++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit 8f6fc8d4e7ae2347d6261d11a7eb2b247d2954d8 Author: Quinn Tran Date: Wed Mar 15 09:48:46 2017 -0700 qla2xxx: Fix inadequate lock protection for ABTS. Normally, ABTS is sent to Target Core as Task MGMT command. In the case of error, qla2xxx needs to send response, hardware_lock is required to prevent request queue corruption. Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 8b666809e10cda9814af3e8be339d35b83909056 Author: Quinn Tran Date: Wed Mar 15 09:48:45 2017 -0700 qla2xxx: Fix request queue corruption. When FW notify driver or driver detects low FW resource, driver tries to send out Busy SCSI Status to tell Initiator side to back off. During the send process, the lock was not held. Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit ae940f2c472a62904dc18234de5cf3ed28f195ee Author: Quinn Tran Date: Wed Mar 15 09:48:44 2017 -0700 qla2xxx: Fix memory leak for abts processing Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 2 ++ 1 file changed, 2 insertions(+) commit c4a9b538ab2a109c5f9798bea1f8f4bf93aadfb9 Author: Joe Carnuccio Date: Wed Mar 15 09:48:43 2017 -0700 qla2xxx: Allow vref count to timeout on vport delete. Cc: Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_attr.c | 4 +--- drivers/scsi/qla2xxx/qla_def.h | 6 +++++- drivers/scsi/qla2xxx/qla_init.c | 1 + drivers/scsi/qla2xxx/qla_mid.c | 14 ++++++++------ drivers/scsi/qla2xxx/qla_os.c | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) commit 7d7a743543905a8297dce53b36e793e5307da5d7 Author: Nicholas Bellinger Date: Sat Mar 18 15:04:13 2017 -0700 tcmu: Convert cmd_time_out into backend device attribute Instead of putting cmd_time_out under ../target/core/user_0/foo/control, which has historically been used by parameters needed for initial backend device configuration, go ahead and move cmd_time_out into a backend device attribute. In order to do this, tcmu_module_init() has been updated to create a local struct configfs_attribute **tcmu_attrs, that is based upon the existing passthrough_attrib_attrs along with the new cmd_time_out attribute. Once **tcm_attrs has been setup, go ahead and point it at tcmu_ops->tb_dev_attrib_attrs so it's picked up by target-core. Also following MNC's previous change, ->cmd_time_out is stored in milliseconds but exposed via configfs in seconds. Also, note this patch restricts the modification of ->cmd_time_out to before + after the TCMU device has been configured, but not while it has active fabric exports. Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 94 ++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 26 deletions(-) commit af980e46a26ac8805685bb70c8572dbc47abb126 Author: Mike Christie Date: Thu Mar 9 02:42:09 2017 -0600 tcmu: make cmd timeout configurable A single daemon could implement multiple types of devices using multuple types of real devices that may not support restarting from crashes and/or handling tcmu timeouts. This makes the cmd timeout configurable, so handlers that do not support it can turn if off for now. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 41 +++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) commit 972c7f167974fa41ea8a2eed4b857cc59f59c42c Author: Mike Christie Date: Thu Mar 9 02:42:08 2017 -0600 tcmu: add helper to check if dev was configured This adds a helper to check if the dev was configured. It will be used in the next patch to prevent updates to some config settings after the device has been setup. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 93afaa4513bb08e69a3d6988ab4c3bf6c7cf07d3 Merge: 3e51f89 363dad5 Author: Linus Torvalds Date: Sat Mar 18 15:50:39 2017 -0700 Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixes from Stafford Horne: "OpenRISC fixes for build issues that were exposed by kbuild robots after 4.11 merge. All from allmodconfig builds. This includes: - bug in the handling of 8-byte get_user() calls - module build failure due to multile missing symbol exports" * tag 'openrisc-for-linus' of git://github.com/openrisc/linux: openrisc: Export symbols needed by modules openrisc: fix issue handling 8 byte get_user calls openrisc: xchg: fix `computed is not used` warning commit 760bf578edf8122f2503a3a6a3f4b0de3b6ce0bb Author: Mike Christie Date: Thu Mar 2 04:59:50 2017 -0600 target: fix race during implicit transition work flushes This fixes the following races: 1. core_alua_do_transition_tg_pt could have read tg_pt_gp_alua_access_state and gone into this if chunk: if (!explicit && atomic_read(&tg_pt_gp->tg_pt_gp_alua_access_state) == ALUA_ACCESS_STATE_TRANSITION) { and then core_alua_do_transition_tg_pt_work could update the state. core_alua_do_transition_tg_pt would then only set tg_pt_gp_alua_pending_state and the tg_pt_gp_alua_access_state would not get updated with the second calls state. 2. core_alua_do_transition_tg_pt could be setting tg_pt_gp_transition_complete while the tg_pt_gp_transition_work is already completing. core_alua_do_transition_tg_pt then waits on the completion that will never be called. To handle these issues, we just call flush_work which will return when core_alua_do_transition_tg_pt_work has completed so there is no need to do the complete/wait. And, if core_alua_do_transition_tg_pt_work was running, instead of trying to sneak in the state change, we just schedule up another core_alua_do_transition_tg_pt_work call. Note that this does not handle a possible race where there are multiple threads call core_alua_do_transition_tg_pt at the same time. I think we need a mutex in target_tg_pt_gp_alua_access_state_store. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 1ca4d4fa3bfcbe8964f81e5818a9b90436466eb0 Author: Mike Christie Date: Thu Mar 2 04:59:49 2017 -0600 target: allow userspace to set state to transitioning Userspace target_core_user handlers like tcmu-runner may want to set the ALUA state to transitioning while it does implicit transitions. This patch allows that state when set from configfs. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit d7175373f2745ed4abe5b388d5aabd06304f801e Author: Mike Christie Date: Thu Mar 2 04:59:48 2017 -0600 target: fix ALUA transition timeout handling The implicit transition time tells initiators the min time to wait before timing out a transition. We currently schedule the transition to occur in tg_pt_gp_implicit_trans_secs seconds so there is no room for delays. If core_alua_do_transition_tg_pt_work->core_alua_update_tpg_primary_metadata needs to write out info to a remote file, then the initiator can easily time out the operation. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 23 ++++++++--------------- include/target/target_core_base.h | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) commit 207ee84133c00a8a2a5bdec94df4a5b37d78881c Author: Mike Christie Date: Wed Mar 1 23:13:26 2017 -0600 target: Use system workqueue for ALUA transitions If tcmu-runner is processing a STPG and needs to change the kernel's ALUA state then we cannot use the same work queue for task management requests and ALUA transitions, because we could deadlock. The problem occurs when a STPG times out before tcmu-runner is able to call into target_tg_pt_gp_alua_access_state_store-> core_alua_do_port_transition -> core_alua_do_transition_tg_pt -> queue_work. In this case, the tmr is on the work queue waiting for the STPG to complete, but the STPG transition is now queued behind the waiting tmr. Note: This bug will also be fixed by this patch: http://www.spinics.net/lists/target-devel/msg14560.html which switches the tmr code to use the system workqueues. For both, I am not sure if we need a dedicated workqueue since it is not a performance path and I do not think we need WQ_MEM_RECLAIM to make forward progress to free up memory like the block layer does. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0a4145729871ef29afe8b0c57560a1f5bd736416 Author: Mike Christie Date: Wed Mar 1 23:13:25 2017 -0600 target: fail ALUA transitions for pscsi We do not setup the LU group for pscsi devices, so if you write a state to alua_access_state that will cause a transition you will get a NULL pointer dereference. This patch will fail attempts to try and transition the path for backend devices that set the TRANSPORT_FLAG_PASSTHROUGH_ALUA flag. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 3 +++ 1 file changed, 3 insertions(+) commit 530c6891b1220cba780b6c18f4691d85a3435080 Author: Mike Christie Date: Wed Mar 1 23:13:24 2017 -0600 target: allow ALUA setup for some passthrough backends This patch allows passthrough backends to use the core/base LIO ALUA setup and state checks, but still handle the execution of commands. This will allow the target_core_user module to execute STPG and RTPG in userspace, and not have to duplicate the ALUA state checks, path information (needed so we can check if command is executable on specific paths) and setup (rtslib sets/updates the configfs ALUA interface like it does for iblock or file). For STPG, the target_core_user userspace daemon, tcmu-runner will still execute the STPG, and to update the core/base LIO state it will use the existing configfs interface. For RTPG, tcmu-runner will loop over configfs and/or cache the state. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 9 +++++---- drivers/target/target_core_pscsi.c | 3 ++- drivers/target/target_core_tpg.c | 3 ++- include/target/target_core_backend.h | 7 ++++++- 4 files changed, 15 insertions(+), 7 deletions(-) commit 2579325ca0acc598fdf41ba12b2871d3467f28df Author: Mike Christie Date: Wed Mar 1 23:14:40 2017 -0600 tcmu: return on first Opt parse failure We only were returing failure if the last opt to be parsed failed. This has a return failure when we first detect a failure. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 3 +++ 1 file changed, 3 insertions(+) commit 3abaa2bfdb1e6bb33d38a2e82cf3bb82ec0197bf Author: Mike Christie Date: Wed Mar 1 23:14:39 2017 -0600 tcmu: allow hw_max_sectors greater than 128 tcmu hard codes the hw_max_sectors to 128 which is a litle small. Userspace uses the max_sectors to report the optimal IO size and some initiators perform better with larger IOs (open-iscsi seems to do better with 256 to 512 depending on the test). (Fix do not display hw max sectors twice - MNC) Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 54 +++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 19 deletions(-) commit 9c28ca4ff8bad7486182291a55b4f67a70af718d Author: Nicholas Bellinger Date: Wed Mar 8 00:09:59 2017 -0800 target: Drop pointless tfo->check_stop_free check All in-tree fabric drivers provide a tfo->check_stop_free(), so there is no need to do the extra check within existing transport_cmd_check_stop_to_fabric() code. Just to be sure, add a check in target_fabric_tf_ops_check() to notify any out-of-tree drivers that might be missing it. Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 4 ++++ drivers/target/target_core_transport.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 73580dac7618e4bcd21679f553cf3c97323fec46 Author: Helge Deller Date: Sat Mar 18 17:13:27 2017 +0100 parisc: Fix system shutdown halt On those parisc machines which don't provide a software power off function, the system currently kills the init process at the end of a shutdown and unexpectedly restarts insteads of halting. Fix it by adding a loop which will not return. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.9+ arch/parisc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit 74e3f6e63da6c8e8246fba1689e040bc926b4a1a Author: Arvind Yadav Date: Tue Mar 14 15:24:51 2017 +0530 parisc: perf: Fix potential NULL pointer dereference Fix potential NULL pointer dereference and clean up coding style errors (code indent, trailing whitespaces). Signed-off-by: Arvind Yadav Signed-off-by: Helge Deller arch/parisc/kernel/perf.c | 94 ++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 45 deletions(-) commit 3e51f893de98296ba64a88d93a94d17e3df5de0b Merge: 8d94099 dc434e0 Author: Linus Torvalds Date: Sat Mar 18 08:33:44 2017 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug fix from Thomas Gleixner: "A single fix preventing the concurrent execution of the CPU hotplug callback install/invocation machinery. Long standing bug caused by a massive brain slip of that Gleixner dude, which went unnoticed for almost a year" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Serialize callback invocations proper commit 436ecf5519d892397af133a79ccd38a17c25fa51 Author: Bjørn Mork Date: Fri Mar 17 17:21:28 2017 +0100 USB: serial: qcserial: add Dell DW5811e This is a Dell branded Sierra Wireless EM7455. Cc: Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d940990f51df8b18b89f8ca0592904cfe02f556 Merge: 8841b5f 8b766e0 Author: Linus Torvalds Date: Fri Mar 17 17:25:14 2017 -0700 Merge tag 'pm-4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a few more intel_pstate issues and one small issue in the cpufreq core. Specifics: - Fix breakage in the intel_pstate's debugfs interface for PID controller tuning (Rafael Wysocki) - Fix computations related to P-state limits in intel_pstate to avoid excessive rounding errors leading to visible inaccuracies (Srinivas Pandruvada, Rafael Wysocki) - Add a missing newline to a message printed by one function in the cpufreq core and clean up that function (Rafael Wysocki)" * tag 'pm-4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Fix and clean up show_cpuinfo_cur_freq() cpufreq: intel_pstate: Avoid percentages in limits-related computations cpufreq: intel_pstate: Correct frequency setting in the HWP mode cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set() commit 7de32556dfc62b9e1203730cc26b71292da8a244 Author: Rafael J. Wysocki Date: Sat Mar 18 00:57:39 2017 +0100 cpufreq: intel_pstate: One set of global limits in active mode In the active mode intel_pstate currently uses two sets of global limits, each associated with one of the possible scaling_governor settings in that mode: "powersave" or "performance". The driver switches over from one of those sets to the other depending on the scaling_governor setting for the last CPU whose per-policy cpufreq interface in sysfs was last used to change parameters exposed in there. That obviously leads to no end of issues when the scaling_governor settings differ between CPUs. The most recent issue was introduced by commit a240c4aa5d0f (cpufreq: intel_pstate: Do not reinit performance limits in ->setpolicy) that eliminated the reinitialization of "performance" limits in intel_pstate_set_policy() preventing the max limit from being set to anything below 100, among other things. Namely, an undesirable side effect of commit a240c4aa5d0f is that now, after setting scaling_governor to "performance" in the active mode, the per-policy limits for the CPU in question go to the highest level and stay there even when it is switched back to "powersave" later. As it turns out, some distributions set scaling_governor to "performance" temporarily for all CPUs to speed-up system initialization, so that change causes them to misbehave later. To fix that, get rid of the performance/powersave global limits split and use just one set of global limits for everything. From the user's persepctive, after this modification, when scaling_governor is switched from "performance" to "powersave" or the other way around on one CPU, the limits settings (ie. the global max/min_perf_pct and per-policy scaling_max/min_freq for any CPUs) will not change. Still, switching from "performance" to "powersave" or the other way around changes the way in which P-states are selected and in particular "performance" causes the driver to always request the highest P-state it is allowed to ask for for the given CPU. Fixes: a240c4aa5d0f (cpufreq: intel_pstate: Do not reinit performance limits in ->setpolicy) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 142 +++++++++++++---------------------------- 1 file changed, 46 insertions(+), 96 deletions(-) commit 8b766e05d8ec80b6b1daa2675509adcab6519038 Merge: 9b4f603 e4c204c Author: Rafael J. Wysocki Date: Sat Mar 18 00:45:09 2017 +0100 Merge branches 'pm-cpufreq-fixes' and 'intel_pstate-fixes' * pm-cpufreq-fixes: cpufreq: Fix and clean up show_cpuinfo_cur_freq() * intel_pstate-fixes: cpufreq: intel_pstate: Avoid percentages in limits-related computations cpufreq: intel_pstate: Correct frequency setting in the HWP mode cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set() commit 47e6fb4212d09f325c0847d05985dd3d71553095 Author: Masaki Ota Date: Fri Mar 17 14:19:40 2017 -0700 Input: ALPS - fix trackstick button handling on V8 devices Alps stick devices always have physical buttons, so we should not check ALPS_BUTTONPAD flag to decide whether we should report them. Fixes: 4777ac220c43 ("Input: ALPS - add touchstick support for SS5 hardware") Signed-off-by: Masaki Ota Acked-by: Pali Rohar Tested-by: Paul Donohue Tested-by: Nick Fletcher Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e7348396c6d51b57c95c6646c390cd078e038e19 Author: Masaki Ota Date: Fri Mar 17 14:10:57 2017 -0700 Input: ALPS - fix V8+ protocol handling (73 03 28) Devices identified as E7="73 03 28" use slightly modified version of V8 protocol, with lower count per electrode, different offsets, and different feature bits in OTP data. Fixes: aeaa881f9b17 ("Input: ALPS - set DualPoint flag for 74 03 28 devices") Signed-off-by: Masaki Ota Acked-by: Pali Rohar Tested-by: Paul Donohue Tested-by: Nick Fletcher Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 66 +++++++++++++++++++++++++++++++++++----------- drivers/input/mouse/alps.h | 11 ++++++++ 2 files changed, 61 insertions(+), 16 deletions(-) commit 8841b5f0cdc71a0b8e42ef93d6eee9a081c67309 Merge: eab60d4 da066f3 Author: Linus Torvalds Date: Fri Mar 17 14:16:22 2017 -0700 Merge tag 'nfs-for-4.11-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "We have a handful of stable fixes to fix kernel warnings and other bugs that have been around for a while. We've also found a few other reference counting bugs and memory leaks since the initial 4.11 pull. Stable Bugfixes: - Fix decrementing nrequests in NFS v4.2 COPY to fix kernel warnings - Prevent a double free in async nfs4_exchange_id() - Squelch a kbuild sparse complaint for xprtrdma Other Bugfixes: - Fix a typo (NFS_ATTR_FATTR_GROUP_NAME) that causes a memory leak - Fix a reference leak that causes kernel warnings - Make nfs4_cb_sv_ops static to fix a sparse warning - Respect a server's max size in CREATE_SESSION - Handle errors from nfs4_pnfs_ds_connect - Flexfiles layout shouldn't mark devices as unavailable" * tag 'nfs-for-4.11-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: pNFS/flexfiles: never nfs4_mark_deviceid_unavailable pNFS: return status from nfs4_pnfs_ds_connect NFSv4.1 respect server's max size in CREATE_SESSION NFS prevent double free in async nfs4_exchange_id nfs: make nfs4_cb_sv_ops static xprtrdma: Squelch kbuild sparse complaint NFS: fix the fault nrequests decreasing for nfs_inode COPY NFSv4: fix a reference leak caused WARNING messages nfs4: fix a typo of NFS_ATTR_FATTR_GROUP_NAME commit eab60d4e5bcc8990b7901829069b22e3b99e5889 Merge: ae13373 6bce725 Author: Linus Torvalds Date: Fri Mar 17 14:05:03 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: "An assorted pile of fixes along with some hardware enablement: - a fix for a KASAN / branch profiling related boot failure - some more fallout of the PUD rework - a fix for the Always Running Timer which is not initialized when the TSC frequency is known at boot time (via MSR/CPUID) - a resource leak fix for the RDT filesystem - another unwinder corner case fixup - removal of the warning for duplicate NMI handlers because there are legitimate cases where more than one handler can be registered at the last level - make a function static - found by sparse - a set of updates for the Intel MID platform which got delayed due to merge ordering constraints. It's hardware enablement for a non mainstream platform, so there is no risk" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mpx: Make unnecessarily global function static x86/intel_rdt: Put group node in rdtgroup_kn_unlock x86/unwind: Fix last frame check for aligned function stacks mm, x86: Fix native_pud_clear build error x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y x86/platform/intel-mid: Add power button support for Merrifield x86/platform/intel-mid: Use common power off sequence x86/platform: Remove warning message for duplicate NMI handlers x86/tsc: Fix ART for TSC_KNOWN_FREQ x86/platform/intel-mid: Correct MSI IRQ line for watchdog device commit ae13373319606fed3f84e1f6d27b40c7f0df6231 Merge: a7fc726 a77d6cd Author: Linus Torvalds Date: Fri Mar 17 14:01:40 2017 -0700 Merge branch 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 acpi fixes from Thomas Gleixner: "This update deals with the fallout of the recent work to make cpuid/node mappings persistent. It turned out that the boot time ACPI based mapping tripped over ACPI inconsistencies and caused regressions. It's partially reverted and the fragile part replaced by an implementation which makes the mapping persistent when a CPU goes online for the first time" * 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: acpi/processor: Check for duplicate processor ids at hotplug time acpi/processor: Implement DEVICE operator for processor enumeration x86/acpi: Restore the order of CPU IDs Revert"x86/acpi: Enable MADT APIs to return disabled apicids" Revert "x86/acpi: Set persistent cpuid <-> nodeid mapping when booting" commit a7fc726bb2e3ab3e960064392aa7cb66999d6927 Merge: cd21deb a01851f Author: Linus Torvalds Date: Fri Mar 17 13:59:52 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A set of perf related fixes: - fix a CR4.PCE propagation issue caused by usage of mm instead of active_mm and therefore propagated the wrong value. - perf core fixes, which plug a use-after-free issue and make the event inheritance on fork more robust. - a tooling fix for symbol handling" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf symbols: Fix symbols__fixup_end heuristic for corner cases x86/perf: Clarify why x86_pmu_event_mapped() isn't racy x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm perf/core: Better explain the inherit magic perf/core: Simplify perf_event_free_task() perf/core: Fix event inheritance on fork() perf/core: Fix use-after-free in perf_release() commit e1699d2d7bf6e6cce3e1baff19f9dd4595a58664 Author: Zygo Blaxell Date: Fri Mar 10 16:45:44 2017 -0500 btrfs: add missing memset while reading compressed inline extents This is a story about 4 distinct (and very old) btrfs bugs. Commit c8b978188c ("Btrfs: Add zlib compression support") added three data corruption bugs for inline extents (bugs #1-3). Commit 93c82d5750 ("Btrfs: zero page past end of inline file items") fixed bug #1: uncompressed inline extents followed by a hole and more extents could get non-zero data in the hole as they were read. The fix was to add a memset in btrfs_get_extent to zero out the hole. Commit 166ae5a418 ("btrfs: fix inline compressed read err corruption") fixed bug #2: compressed inline extents which contained non-zero bytes might be replaced with zero bytes in some cases. This patch removed an unhelpful memset from uncompress_inline, but the case where memset is required was missed. There is also a memset in the decompression code, but this only covers decompressed data that is shorter than the ram_bytes from the extent ref record. This memset doesn't cover the region between the end of the decompressed data and the end of the page. It has also moved around a few times over the years, so there's no single patch to refer to. This patch fixes bug #3: compressed inline extents followed by a hole and more extents could get non-zero data in the hole as they were read (i.e. bug #3 is the same as bug #1, but s/uncompressed/compressed/). The fix is the same: zero out the hole in the compressed case too, by putting a memset back in uncompress_inline, but this time with correct parameters. The last and oldest bug, bug #0, is the cause of the offending inline extent/hole/extent pattern. Bug #0 is a subtle and mostly-harmless quirk of behavior somewhere in the btrfs write code. In a few special cases, an inline extent and hole are allowed to persist where they normally would be combined with later extents in the file. A fast reproducer for bug #0 is presented below. A few offending extents are also created in the wild during large rsync transfers with the -S flag. A Linux kernel build (git checkout; make allyesconfig; make -j8) will produce a handful of offending files as well. Once an offending file is created, it can present different content to userspace each time it is read. Bug #0 is at least 4 and possibly 8 years old. I verified every vX.Y kernel back to v3.5 has this behavior. There are fossil records of this bug's effects in commits all the way back to v2.6.32. I have no reason to believe bug #0 wasn't present at the beginning of btrfs compression support in v2.6.29, but I can't easily test kernels that old to be sure. It is not clear whether bug #0 is worth fixing. A fix would likely require injecting extra reads into currently write-only paths, and most of the exceptional cases caused by bug #0 are already handled now. Whether we like them or not, bug #0's inline extents followed by holes are part of the btrfs de-facto disk format now, and we need to be able to read them without data corruption or an infoleak. So enough about bug #0, let's get back to bug #3 (this patch). An example of on-disk structure leading to data corruption found in the wild: item 61 key (606890 INODE_ITEM 0) itemoff 9662 itemsize 160 inode generation 50 transid 50 size 47424 nbytes 49141 block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0 flags 0x0(none) item 62 key (606890 INODE_REF 603050) itemoff 9642 itemsize 20 inode ref index 3 namelen 10 name: DB_File.so item 63 key (606890 EXTENT_DATA 0) itemoff 8280 itemsize 1362 inline extent data size 1341 ram 4085 compress(zlib) item 64 key (606890 EXTENT_DATA 4096) itemoff 8227 itemsize 53 extent data disk byte 5367308288 nr 20480 extent data offset 0 nr 45056 ram 45056 extent compression(zlib) Different data appears in userspace during each read of the 11 bytes between 4085 and 4096. The extent in item 63 is not long enough to fill the first page of the file, so a memset is required to fill the space between item 63 (ending at 4085) and item 64 (beginning at 4096) with zero. Here is a reproducer from Liu Bo, which demonstrates another method of creating the same inline extent and hole pattern: Using 'page_poison=on' kernel command line (or enable CONFIG_PAGE_POISONING) run the following: # touch foo # chattr +c foo # xfs_io -f -c "pwrite -W 0 1000" foo # xfs_io -f -c "falloc 4 8188" foo # od -x foo # echo 3 >/proc/sys/vm/drop_caches # od -x foo This produce the following on my box: Correct output: file contains 1000 data bytes followed by zeros: 0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd * 0001740 cdcd cdcd cdcd cdcd 0000 0000 0000 0000 0001760 0000 0000 0000 0000 0000 0000 0000 0000 * 0020000 Actual output: the data after the first 1000 bytes will be different each run: 0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd * 0001740 cdcd cdcd cdcd cdcd 6c63 7400 635f 006d 0001760 5f74 6f43 7400 435f 0053 5f74 7363 7400 0002000 435f 0056 5f74 6164 7400 645f 0062 5f74 (...) Signed-off-by: Zygo Blaxell Reviewed-by: Liu Bo Reviewed-by: Chris Mason Signed-off-by: Chris Mason fs/btrfs/inode.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 49d4a334727057af57048ded99697d17b016d91b Author: Liu Bo Date: Mon Mar 6 18:20:56 2017 -0800 Btrfs: fix regression in lock_delalloc_pages The bug is a regression after commit (da2c7009f6ca "btrfs: teach __process_pages_contig about PAGE_LOCK operation") and commit (76c0021db8fd "Btrfs: use helper to simplify lock/unlock pages"). So if the dirty pages which are under writeback got truncated partially before we lock the dirty pages, we couldn't find all pages mapping to the delalloc range, and the bug didn't return an error so it kept going on and found that the delalloc range got truncated and got to unlock the dirty pages, and then the ASSERT could caught the error, and showed ----------------------------------------------------------------------------- assertion failed: page_ops & PAGE_LOCK, file: fs/btrfs/extent_io.c, line: 1716 ----------------------------------------------------------------------------- This fixes the bug by returning the proper -EAGAIN. Cc: David Sterba Reported-by: Dave Jones Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd21debe5318842a0bbd38c0327cfde2a3b90d65 Merge: b5f1308 2317d5f Author: Linus Torvalds Date: Fri Mar 17 13:19:07 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: "From the scheduler departement: - a bunch of sched deadline related fixes which deal with various buglets and corner cases. - two fixes for the loadavg spikes which are caused by the delayed NOHZ accounting" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Use deadline instead of period when calculating overflow sched/deadline: Throttle a constrained deadline task activated after the deadline sched/deadline: Make sure the replenishment timer fires in the next period sched/loadavg: Use {READ,WRITE}_ONCE() for sample window sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting sched/deadline: Add missing update_rq_clock() in dl_task_timer() commit b5f13082b19dc09378660226011ebfb033358ea6 Merge: 18f48c9 17fcbd5 Author: Linus Torvalds Date: Fri Mar 17 13:16:24 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: "Three fixes related to locking: - fix a SIGKILL issue for RWSEM_GENERIC_SPINLOCK which has been fixed for the XCHGADD variant already - plug a potential use after free in the futex code - prevent leaking a held spinlock in an futex error handling code path" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y futex: Add missing error handling to FUTEX_REQUEUE_PI futex: Fix potential use-after-free in FUTEX_REQUEUE_PI commit 18f48c9f3c88ec9fbf50c8a193f81969847ebb21 Merge: 57fd0b7 33d8c15 Author: Linus Torvalds Date: Fri Mar 17 13:13:35 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "Just a simple revert of a new sched_clock implementation which turned out to be buggy" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" commit da066f3f039eba3e72e97b2ccad0dd8b45ba84bd Author: Weston Andros Adamson Date: Thu Mar 9 12:56:49 2017 -0500 pNFS/flexfiles: never nfs4_mark_deviceid_unavailable The flexfiles layout should never mark a device unavailable. Move nfs4_mark_deviceid_unavailable out of nfs4_pnfs_ds_connect and call directly from files layout where it's still needed. The flexfiles driver still handles marked devices in error paths, but will now print a rate limited warning. Signed-off-by: Weston Andros Adamson Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayoutdev.c | 1 + fs/nfs/flexfilelayout/flexfilelayout.h | 14 +++++++++++++- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- fs/nfs/pnfs_nfs.c | 24 ++++++++++++++++-------- 4 files changed, 31 insertions(+), 10 deletions(-) commit a33e4b036d4612f62220f37a9fa29d273b6fd0ca Author: Weston Andros Adamson Date: Thu Mar 9 12:56:48 2017 -0500 pNFS: return status from nfs4_pnfs_ds_connect The nfs4_pnfs_ds_connect path can call rpc_create which can fail or it can wait on another context to reach the same failure. This checks that the rpc_create succeeded and returns the error to the caller. When an error is returned, both the files and flexfiles layouts will return NULL from _prepare_ds(). The flexfiles layout will also return the layout with the error NFS4ERR_NXIO. Signed-off-by: Weston Andros Adamson Signed-off-by: Anna Schumaker fs/nfs/client.c | 25 ++++++++++++++++++++++++- fs/nfs/filelayout/filelayoutdev.c | 7 ++++++- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 3 ++- fs/nfs/internal.h | 2 ++ fs/nfs/pnfs.h | 2 +- fs/nfs/pnfs_nfs.c | 15 +++++++++++++-- 6 files changed, 48 insertions(+), 6 deletions(-) commit 033853325fe3bdc70819a8b97915bd3bca41d3af Author: Olga Kornievskaia Date: Wed Mar 8 14:39:15 2017 -0500 NFSv4.1 respect server's max size in CREATE_SESSION Currently client doesn't respect max sizes server returns in CREATE_SESSION. nfs4_session_set_rwsize() gets called and server->rsize, server->wsize are 0 so they never get set to the sizes returned by the server. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63513232f8cd219dcaa5eafae028740ed3067d83 Author: Olga Kornievskaia Date: Mon Mar 13 10:36:19 2017 -0400 NFS prevent double free in async nfs4_exchange_id Since rpc_task is async, the release function should be called which will free the impl_id, scope, and owner. Trond pointed at 2 more problems: -- use of client pointer after free in the nfs4_exchangeid_release() function -- cl_count mismatch if rpc_run_task() isn't run Fixes: 8d89bd70bc9 ("NFS setup async exchange_id") Signed-off-by: Olga Kornievskaia Cc: stable@vger.kernel.org # 4.9 Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 05fae7bbc237bc7de0ee9c3dcf85b2572a80e3b5 Author: Jason Yan Date: Fri Mar 10 10:48:13 2017 +0800 nfs: make nfs4_cb_sv_ops static Fixes the following sparse warning: fs/nfs/callback.c:235:21: warning: symbol 'nfs4_cb_sv_ops' was not declared. Should it be static? Signed-off-by: Jason Yan Signed-off-by: Anna Schumaker fs/nfs/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eed50879d64ab1b9f76445dbab822e43a098b309 Author: Chuck Lever Date: Sat Mar 11 15:52:47 2017 -0500 xprtrdma: Squelch kbuild sparse complaint New complaint from kbuild for 4.9.y: net/sunrpc/xprtrdma/verbs.c:489:19: sparse: incompatible types in comparison expression (different type sizes) verbs.c: 489 max_sge = min(ia->ri_device->attrs.max_sge, RPCRDMA_MAX_SEND_SGES); I can't reproduce this running sparse here. Likewise, "make W=1 net/sunrpc/xprtrdma/verbs.o" never indicated any issue. A little poking suggests that because the range of its values is small, gcc can make the actual width of RPCRDMA_MAX_SEND_SGES smaller than the width of an unsigned integer. Fixes: 16f906d66cd7 ("xprtrdma: Reduce required number of send SGEs") Signed-off-by: Chuck Lever Cc: stable@kernel.org Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 38a33101dd5fb8f07244e7e6dd04747a6cd2e3fb Author: Kinglong Mee Date: Thu Mar 9 11:36:36 2017 +0800 NFS: fix the fault nrequests decreasing for nfs_inode COPY The nfs_commit_file for NFSv4.2's COPY operation goes through the commit path for normal WRITE, but without increase nrequests, so, the nrequests decreased in nfs_commit_release_pages is fault. After that, the nrequests will be wrong. [ 5670.299881] ------------[ cut here ]------------ [ 5670.300295] WARNING: CPU: 0 PID: 27656 at fs/nfs/inode.c:127 nfs_clear_inode+0x66/0x90 [nfs] [ 5670.300558] Modules linked in: nfsv4(E) nfs(E) fscache(E) tun bridge stp llc fuse ip_set nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event ppdev f2fs coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_ens1371 intel_rapl_perf gameport snd_ac97_codec vmw_balloon ac97_bus snd_seq snd_pcm joydev snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc parport acpi_cpufreq tpm_tis tpm_tis_core tpm i2c_piix4 vmw_vmci shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm e1000 crc32c_intel mptspi scsi_transport_spi serio_raw mptscsih mptbase ata_generic pata_acpi fjes [last unloaded: fscache] [ 5670.302925] CPU: 0 PID: 27656 Comm: umount.nfs4 Tainted: G W E 4.11.0-rc1+ #519 [ 5670.303292] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 5670.304094] Call Trace: [ 5670.304510] dump_stack+0x63/0x86 [ 5670.304917] __warn+0xcb/0xf0 [ 5670.305276] warn_slowpath_null+0x1d/0x20 [ 5670.305661] nfs_clear_inode+0x66/0x90 [nfs] [ 5670.306093] nfs4_evict_inode+0x61/0x70 [nfsv4] [ 5670.306480] evict+0xbb/0x1c0 [ 5670.306888] dispose_list+0x4d/0x70 [ 5670.307233] evict_inodes+0x178/0x1a0 [ 5670.307579] generic_shutdown_super+0x44/0xf0 [ 5670.307985] nfs_kill_super+0x21/0x40 [nfs] [ 5670.308325] deactivate_locked_super+0x43/0x70 [ 5670.308698] deactivate_super+0x5a/0x60 [ 5670.309036] cleanup_mnt+0x3f/0x90 [ 5670.309407] __cleanup_mnt+0x12/0x20 [ 5670.309837] task_work_run+0x80/0xa0 [ 5670.310162] exit_to_usermode_loop+0x89/0x90 [ 5670.310497] syscall_return_slowpath+0xaa/0xb0 [ 5670.310875] entry_SYSCALL_64_fastpath+0xa7/0xa9 [ 5670.311197] RIP: 0033:0x7f1bb3617fe7 [ 5670.311545] RSP: 002b:00007ffecbabb828 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6 [ 5670.311906] RAX: 0000000000000000 RBX: 0000000001dca1f0 RCX: 00007f1bb3617fe7 [ 5670.312239] RDX: 000000000000000c RSI: 0000000000000001 RDI: 0000000001dc83c0 [ 5670.312653] RBP: 0000000001dc83c0 R08: 0000000000000001 R09: 0000000000000000 [ 5670.312998] R10: 0000000000000755 R11: 0000000000000206 R12: 00007ffecbabc66a [ 5670.313335] R13: 0000000001dc83a0 R14: 0000000000000000 R15: 0000000000000000 [ 5670.313758] ---[ end trace bf4bfe7764e4eb40 ]--- Cc: linux-kernel@vger.kernel.org Fixes: 67911c8f18 ("NFS: Add nfs_commit_file()") Signed-off-by: Kinglong Mee Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Anna Schumaker fs/nfs/write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 79a21d572cf66968a2272fdf9711f835518256d9 Merge: d1eb981 822f584 Author: Thomas Gleixner Date: Fri Mar 17 20:34:30 2017 +0100 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent Pull a single UEFI fix from Ard: - Reduce the severity of the notice that appears when the ESRT table points to memory that is not covered by the memory map. It is scaring our users and interfering with their nice splash screens. Note that the ESRT may still be perfectly usable, and is currently (to my knowledge) not widely used to begin with. commit 57fd0b77d659d5733434d3ce37cf606273abb1e8 Merge: c79d5ff c5051c7 Author: Linus Torvalds Date: Fri Mar 17 12:16:44 2017 -0700 Merge tag 'afs-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Fixes to the AFS filesystem in the kernel. They fix a variety of bugs. These include some issues fixed for consistency with other AFS implementations: - handle AFS mode bits better - use the client mtime rather than the server mtime in the protocol - handle the server returning more or less data than was requested in a FetchData call - distinguish mountpoints from symlinks based on the mode bits rather than preemptively reading every symlink to find out what it actually represents One other notable change for the user is that files are now flushed on close analogously with other network filesystems" * tag 'afs-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (28 commits) afs: Don't wait for page writeback with the page lock held afs: ->writepage() shouldn't call clear_page_dirty_for_io() afs: Fix abort on signal while waiting for call completion afs: Fix an off-by-one error in afs_send_pages() afs: Fix afs_kill_pages() afs: Fix page leak in afs_write_begin() afs: Don't set PG_error on local EINTR or ENOMEM when filling a page afs: Populate and use client modification time afs: Better abort and net error handling afs: Invalid op ID should abort with RXGEN_OPCODE afs: Fix the maths in afs_fs_store_data() afs: Use a bvec rather than a kvec in afs_send_pages() afs: Make struct afs_read::remain 64-bit afs: Fix AFS read bug afs: Prevent callback expiry timer overflow afs: Migrate vlocation fields to 64-bit afs: security: Replace rcu_assign_pointer() with RCU_INIT_POINTER() afs: inode: Replace rcu_assign_pointer() with RCU_INIT_POINTER() afs: Distinguish mountpoints from symlinks by file mode alone afs: Flush outstanding writes when an fd is closed ... commit c79d5ff0e249824674e70e89142f55b52f261722 Merge: f89406c a1016e9 Author: Linus Torvalds Date: Fri Mar 17 12:14:49 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one change to add the statx syscall this time around" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: wire up statx syscall commit 822f5845f710e57d7e2df1fd1ee00d6e19d334fe Author: Daniel Drake Date: Tue Feb 7 13:08:23 2017 -0600 efi/esrt: Cleanup bad memory map log messages The Intel Compute Stick STCK1A8LFC and Weibu F3C platforms both log 2 error messages during boot: efi: requested map not found. esrt: ESRT header is not in the memory map. Searching the web, this seems to affect many other platforms too. Since these messages are logged as errors, they appear on-screen during the boot process even when using the "quiet" boot parameter used by distros. Demote the ESRT error to a warning so that it does not appear on-screen, and delete the error logging from efi_mem_desc_lookup; both callsites of that function log more specific messages upon failure. Out of curiosity I looked closer at the Weibu F3C. There is no entry in the UEFI-provided memory map which corresponds to the ESRT pointer, but hacking the code to map it anyway, the ESRT does appear to be valid with 2 entries. Signed-off-by: Daniel Drake Cc: Matt Fleming Acked-by: Peter Jones Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 1 - drivers/firmware/efi/esrt.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit cf8c73afb3abf0f8905efbaddd4ce11a0deec9da Author: Evan Quan Date: Fri Mar 17 10:22:51 2017 +0800 drm/amd/amdgpu: add POLARIS12 PCI ID Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) commit f89406ca1f454506f4177cfaa51de44e3247cd0d Merge: 102ed8c c5f7c5a Author: Linus Torvalds Date: Fri Mar 17 11:25:46 2017 -0700 Merge tag 'for-linus-4.11b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A minor fix for using the appropriate refcount_t instead of atomic_t" * tag 'for-linus-4.11b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: drivers, xen: convert grant_map.users from atomic_t to refcount_t commit 102ed8c35ab27e74b29f3050af50600d605e186d Merge: d528ae0 27b713c Author: Linus Torvalds Date: Fri Mar 17 11:19:52 2017 -0700 Merge tag 'drm-fixes-for-v4.11-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Bunch of fixes across the drivers, in a St Patrick's day pull request (please turn terminal colors to green on black or black on green for full effect). On the arm side, tilcdc, omap and malidp got fixes, while amd has some powermanagement fixes, and intel has a set of fixes across the driver. Nothing seems to bad or scary at this point" * tag 'drm-fixes-for-v4.11-rc3' of git://people.freedesktop.org/~airlied/linux: (27 commits) drm/amd/amdgpu: Fix debugfs reg read/write address width drm/amdgpu/si: add dpm quirk for Oland drm/radeon/si: add dpm quirk for Oland drm: amd: remove broken include path drm/amd/powerplay: fix copy error in smu7_clockpoweragting.c drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create() drm/i915: Fix forcewake active domain tracking drm/i915: Nuke skl_update_plane debug message from the pipe update critical section drm/i915: use correct node for handling cache domain eviction uapi: fix drm/omap_drm.h userspace compilation errors drm/omap: fix dmabuf mmap for dma_alloc'ed buffers drm/amdgpu: fix parser init error path to avoid crash in parser fini drm/amd/amdgpu: Disable GFX_PG on Carrizo until compute issues solved drm: mali-dp: Fix smart layer not going to composition drm: mali-dp: Remove mclk rate management drm/i915: Drain the freed state from the tail of the next commit drm/i915: Nuke debug messages from the pipe update critical section drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl drm/i915: Store a permanent error in obj->mm.pages ... commit 77f88796cee819b9c4562b0b6b44691b3b7755b1 Author: Tejun Heo Date: Thu Mar 16 16:54:24 2017 -0400 cgroup, kthread: close race window where new kthreads can be migrated to non-root cgroups Creation of a kthread goes through a couple interlocked stages between the kthread itself and its creator. Once the new kthread starts running, it initializes itself and wakes up the creator. The creator then can further configure the kthread and then let it start doing its job by waking it up. In this configuration-by-creator stage, the creator is the only one that can wake it up but the kthread is visible to userland. When altering the kthread's attributes from userland is allowed, this is fine; however, for cases where CPU affinity is critical, kthread_bind() is used to first disable affinity changes from userland and then set the affinity. This also prevents the kthread from being migrated into non-root cgroups as that can affect the CPU affinity and many other things. Unfortunately, the cgroup side of protection is racy. While the PF_NO_SETAFFINITY flag prevents further migrations, userland can win the race before the creator sets the flag with kthread_bind() and put the kthread in a non-root cgroup, which can lead to all sorts of problems including incorrect CPU affinity and starvation. This bug got triggered by userland which periodically tries to migrate all processes in the root cpuset cgroup to a non-root one. Per-cpu workqueue workers got caught while being created and ended up with incorrected CPU affinity breaking concurrency management and sometimes stalling workqueue execution. This patch adds task->no_cgroup_migration which disallows the task to be migrated by userland. kthreadd starts with the flag set making every child kthread start in the root cgroup with migration disallowed. The flag is cleared after the kthread finishes initialization by which time PF_NO_SETAFFINITY is set if the kthread should stay in the root cgroup. It'd be better to wait for the initialization instead of failing but I couldn't think of a way of implementing that without adding either a new PF flag, or sleeping and retrying from waiting side. Even if userland depends on changing cgroup membership of a kthread, it either has to be synchronized with kthread_create() or periodically repeat, so it's unlikely that this would break anything. v2: Switch to a simpler implementation using a new task_struct bit field suggested by Oleg. Signed-off-by: Tejun Heo Suggested-by: Oleg Nesterov Cc: Linus Torvalds Cc: Andrew Morton Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Reported-and-debugged-by: Chris Mason Cc: stable@vger.kernel.org # v4.3+ (we can't close the race on < v4.3) Signed-off-by: Tejun Heo include/linux/cgroup.h | 21 +++++++++++++++++++++ include/linux/sched.h | 4 ++++ kernel/cgroup/cgroup.c | 9 +++++---- kernel/kthread.c | 3 +++ 4 files changed, 33 insertions(+), 4 deletions(-) commit a01851faab4b485e94c2ceaa1d0208a8d16ce367 Merge: 4b07372 e7ede72 Author: Ingo Molnar Date: Fri Mar 17 15:13:28 2017 +0100 Merge tag 'perf-urgent-for-mingo-4.11-20170317' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Fix symbols__fixup_end heuristic for corner cases, such as JITted eBPF programs, that are loaded at page aligned addresses, just after the kernel proper (Daniel Borkmann) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit e7ede72a6d40cb3a30c087142d79381ca8a31dab Author: Daniel Borkmann Date: Wed Mar 15 22:53:37 2017 +0100 perf symbols: Fix symbols__fixup_end heuristic for corner cases The current symbols__fixup_end() heuristic for the last entry in the rb tree is suboptimal as it leads to not being able to recognize the symbol in the call graph in a couple of corner cases, for example: i) If the symbol has a start address (f.e. exposed via kallsyms) that is at a page boundary, then the roundup(curr->start, 4096) for the last entry will result in curr->start == curr->end with a symbol length of zero. ii) If the symbol has a start address that is shortly before a page boundary, then also here, curr->end - curr->start will just be very few bytes, where it's unrealistic that we could perform a match against. Instead, change the heuristic to roundup(curr->start, 4096) + 4096, so that we can catch such corner cases and have a better chance to find that specific symbol. It's still just best effort as the real end of the symbol is unknown to us (and could even be at a larger offset than the current range), but better than the current situation. Alexei reported that he recently run into case i) with a JITed eBPF program (these are all page aligned) as the last symbol which wasn't properly shown in the call graph (while other eBPF program symbols in the rb tree were displayed correctly). Since this is a generic issue, lets try to improve the heuristic a bit. Reported-and-Tested-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Fixes: 2e538c4a1847 ("perf tools: Improve kernel/modules symbol lookup") Link: http://lkml.kernel.org/r/bb5c80d27743be6f12afc68405f1956a330e1bc9.1489614365.git.daniel@iogearbox.net Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2958b9013fcbabeeba221161d0712f5259f1e15d Author: Zhenyu Wang Date: Fri Mar 17 12:11:20 2017 +0800 drm/i915/gvt: Fix gvt scheduler interval time Fix to correctly assign 1ms for gvt scheduler interval time, as previous code using HZ is pretty broken. And use no delay for start gvt scheduler function. Fixes: 4b63960ebd3f ("drm/i915/gvt: vGPU schedule policy framework") Cc: Zhi Wang Cc: stable@vger.kernel.org # v4.10+ Acked-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cd23b828b37bd5ccf4b40132f12dbf20d7afdb6 Author: Chuanxiao Dong Date: Thu Mar 16 09:47:58 2017 +0800 drm/i915/gvt: GVT pin/unpin shadow context When handling guest request, GVT needs to populate/update shadow_ctx with guest context. This behavior needs to make sure the shadow_ctx is pinned. The current implementation is relying on i195 allocate request to pin but this way cannot guarantee the i915 not to unpin the shadow_ctx when GVT update the guest context from shadow_ctx. So GVT should pin/unpin the shadow_ctx by itself. Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 17f1b1a6d4e5f41df161eb2a90af22c003a243fc Author: Tina Zhang Date: Wed Mar 15 23:16:01 2017 -0400 drm/i915/gvt: scan shadow indirect context image when valid The shadow indirect context image should be only scanned when valid. So far, Only RCS ring has the shadow indirect context image. This patch limits the scan logic only for RCS ring. v2. refine description of the subject v3. fix alignment. (Zhenyu) Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5180edc2421117766fcb9c2d2dc6bfaeefdeb709 Author: Changbin Du Date: Thu Mar 16 09:45:09 2017 +0800 drm/i915/kvmgt: fix suspicious rcu dereference usage The srcu read lock must be held while accessing kvm memslots. This patch fix below warning for function kvmgt_rw_gpa(). [ 165.345093] [ ERR: suspicious RCU usage. ] [ 165.416538] Call Trace: [ 165.418989] dump_stack+0x85/0xc2 [ 165.422310] lockdep_rcu_suspicious+0xd7/0x110 [ 165.426769] kvm_read_guest_page+0x195/0x1b0 [kvm] [ 165.431574] kvm_read_guest+0x50/0x90 [kvm] [ 165.440492] kvmgt_rw_gpa+0x43/0xa0 [kvmgt] [ 165.444683] kvmgt_read_gpa+0x11/0x20 [kvmgt] [ 165.449061] gtt_get_entry64+0x4d/0xc0 [i915] [ 165.453438] ppgtt_populate_shadow_page_by_guest_entry+0x380/0xdc0 [i915] [ 165.460254] shadow_mm+0xd1/0x460 [i915] [ 165.472488] intel_vgpu_create_mm+0x1ab/0x210 [i915] [ 165.477472] intel_vgpu_g2v_create_ppgtt_mm+0x5f/0xc0 [i915] [ 165.483154] pvinfo_mmio_write+0x19b/0x1d0 [i915] [ 165.499068] intel_vgpu_emulate_mmio_write+0x3f9/0x600 [i915] [ 165.504827] intel_vgpu_rw+0x114/0x150 [kvmgt] [ 165.509281] intel_vgpu_write+0x16f/0x1a0 [kvmgt] [ 165.513993] vfio_mdev_write+0x20/0x30 [vfio_mdev] [ 165.518793] vfio_device_fops_write+0x24/0x30 [vfio] [ 165.523770] __vfs_write+0x28/0x120 [ 165.540529] vfs_write+0xce/0x1f0 v2: fix Cc format for stable Signed-off-by: Changbin Du Cc: # v4.10+ Reviewed-by: Xiao Guangrong Reviewed-by: Jike Song Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf2135ca3d50d6468e9216fef3d0d33c31af635b Author: Chuanxiao Dong Date: Thu Mar 9 23:07:12 2017 +0800 drm/i915/gvt: add enable_execlists check before enable gvt The GVT-g needs execlists to be enabled otherwise gvt should be disabled. Add a check for enable_execlists before enabling gvt. v2: use DRM_INFO in response to the user action Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3dce2aca02929f180ab66171b333fa48fe485a03 Author: Chris Wilson Date: Wed Mar 8 22:08:08 2017 +0000 drm/i915/gvt: Remove bogus retry around i915_wait_request commit 8f1117abb408 ("drm/i915/gvt: handle workload lifecycle properly") includes some nonsense to retry a indefinite wait - i915_wait_request() does not return until the request is completed when used from an uninterruptible context. Fixes: 8f1117abb408 ("drm/i915/gvt: handle workload lifecycle properly" Signed-off-by: Chris Wilson Cc: Chuanxiao Dong Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 3f765a341798ebd4e0ece7cce34399a8fd4a7f9f Author: Yulei Zhang Date: Mon Mar 13 23:21:27 2017 +0800 drm/i915/gvt: correct the ggtt valid bit check in pipe control command GGTT valid bit in pipe control command move to DWORD1 after SNB, so change the valid check code correspondingly. v2: per Zhenyu's comment, replace the bit check with MACRO define PIPE_CONTROL_GLOBAL_GTT_IVB Signed-off-by: Yulei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 695fbc08d80f93ecca18a1abd8f52c2ab77fdc8d Author: Tina Zhang Date: Fri Mar 10 04:26:53 2017 -0500 drm/i915/gvt: replace the gvt_err with gvt_vgpu_err gvt_err should be used only for the very few critical error message during host i915 drvier initialization. This patch 1. removes the redundant gvt_err; 2. creates a new gvt_vgpu_err to show errors caused by vgpu; 3. replaces the most gvt_err with gvt_vgpu_err; 4. leaves very few gvt_err for dumping gvt error during host gvt initialization. v2. change name to gvt_vgpu_err and add vgpu id to the message. (Kevin) add gpu id to gvt_vgpu_err. (Zhi) v3. remove gpu id from gvt_vgpu_err caller. (Zhi) v4. add vgpu check to the gvt_vgpu_err macro. (Zhiyuan) v5. add comments for v3 and v4. v6. split the big patch into two, with this patch only for checking gvt_vgpu_err. (Zhenyu) v7. rebase to staging branch v8. rebase to fix branch Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/aperture_gm.c | 8 ++-- drivers/gpu/drm/i915/gvt/cmd_parser.c | 84 +++++++++++++++++++--------------- drivers/gpu/drm/i915/gvt/debug.h | 8 ++++ drivers/gpu/drm/i915/gvt/edid.c | 13 +++--- drivers/gpu/drm/i915/gvt/execlist.c | 29 ++++++------ drivers/gpu/drm/i915/gvt/gtt.c | 74 +++++++++++++++--------------- drivers/gpu/drm/i915/gvt/handlers.c | 28 ++++++------ drivers/gpu/drm/i915/gvt/kvmgt.c | 33 +++++++------ drivers/gpu/drm/i915/gvt/mmio.c | 38 +++++++-------- drivers/gpu/drm/i915/gvt/opregion.c | 10 ++-- drivers/gpu/drm/i915/gvt/render.c | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 11 +++-- 12 files changed, 180 insertions(+), 158 deletions(-) commit 4938ca90166d6d3061793789e2eef42cd934fa97 Author: Zhao Yan Date: Thu Mar 9 10:09:44 2017 +0800 drm/i915/gvt: handle force-nonpriv registers, cmd parser part this patch adds force non-priv registers check in LRI cmds handler v4: transform is_force_nonpriv_mmio() from macro to inline fuction to eliminate checkpatch warning v3: per zhenyu's comment, fix some style warnings v2: per zhenyu's comment, refine the code to remove cascaded ifs Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/handlers.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/gvt/mmio.h | 3 +++ 3 files changed, 43 insertions(+) commit 2cd29f2387be70de9feb4c9f8dbc7c0bd55748ce Author: Robert Middleton Date: Wed Mar 15 16:56:47 2017 -0400 gpio:mcp23s08 Fixed missing interrupts When an interrupt occurs on an MCP23S08 chip, the INTF register will only contain one bit as causing the interrupt. If more than two pins change at the same time on the chip, this causes one of the pins to not be reported. This patch fixes the logic for checking if a pin has changed, so that multiple pins will always cause more than one change. Cc: stable@vger.kernel.org Signed-off-by: Robert Middleton Tested-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-mcp23s08.c | 65 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 5 deletions(-) commit 4b07372a32c0c1505a7634ad7e607d83340ef645 Author: Andy Lutomirski Date: Thu Mar 16 12:59:40 2017 -0700 x86/perf: Clarify why x86_pmu_event_mapped() isn't racy Naively, it looks racy, but ->mmap_sem saves it. Add a comment and a lockdep assertion. Signed-off-by: Andy Lutomirski Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/03a1e629063899168dfc4707f3bb6e581e21f5c6.1489694270.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5dc855d44c2ad960a86f593c60461f1ae1566b6d Author: Andy Lutomirski Date: Thu Mar 16 12:59:39 2017 -0700 x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm If one thread mmaps a perf event while another thread in the same mm is in some context where active_mm != mm (which can happen in the scheduler, for example), refresh_pce() would write the wrong value to CR4.PCE. This broke some PAPI tests. Reported-and-tested-by: Vince Weaver Signed-off-by: Andy Lutomirski Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 7911d3f7af14 ("perf/x86: Only allow rdpmc if a perf_event is mapped") Link: http://lkml.kernel.org/r/0c5b38a76ea50e405f9abe07a13dfaef87c173a1.1489694270.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8971e1c79d3f6c9a5e6f7a65c50c41f434a4dae6 Author: Michael Ellerman Date: Fri Mar 17 16:02:35 2017 +1100 powerpc/pseries: Don't give a warning when HPT resizing isn't available As of commit 438cc81a41e8 ("powerpc/pseries: Automatically resize HPT for memory hot add/remove"), when running on the pseries platform, we always attempt to use the PAPR extension to resize the hashed page table (HPT) when we add or remove memory. This is fine, but when the extension is not available we'll give a harmless, but scary warning. Instead check if the firmware supports HPT resizing before populating the mmu_hash_ops.resize_hpt pointer. Signed-off-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/lpar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a4a3e061149f09c075f108b6f1cf04d9739a6bc2 Author: Dmitry Vyukov Date: Sat Mar 4 13:46:12 2017 +0100 tty: fix data race in tty_ldisc_ref_wait() tty_ldisc_ref_wait() checks tty->ldisc under tty->ldisc_sem. But if ldisc==NULL it releases them sem and reloads tty->ldisc without holding the sem. This is wrong and can lead to returning non-NULL ldisc without protection. Don't reload tty->ldisc second time. Signed-off-by: Dmitry Vyukov Cc: syzkaller@googlegroups.com Cc: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Hurley Cc: One Thousand Gnomes Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5362544bebe85071188dd9e479b5a5040841c895 Author: Dmitry Vyukov Date: Sat Mar 4 14:55:19 2017 +0100 tty: don't panic on OOM in tty_set_ldisc() If tty_ldisc_open() fails in tty_set_ldisc(), it tries to go back to the old discipline or N_TTY. But that can fail as well, in such case it panics. This is not a graceful way to handle OOM. Leave ldisc==NULL if all attempts fail instead. Also use existing tty_ldisc_reinit() helper function instead of tty_ldisc_restore(). Also don't WARN/BUG in tty_ldisc_reinit() if N_TTY fails, which would have the same net effect of bringing kernel down on OOM. Instead print a single line message about what has happened. Signed-off-by: Dmitry Vyukov Cc: syzkaller@googlegroups.com Cc: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Hurley Cc: One Thousand Gnomes Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 85 ++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 69 deletions(-) commit b767ad726c2aa6219318bf0da83fbe690e653d9a Author: Aleksey Makarov Date: Wed Mar 1 18:23:02 2017 +0300 Revert "tty: serial: pl011: add ttyAMA for matching pl011 console" The original patch makes the condition always true, so it is wrong. It masks (but not fixes) the bug described in the commit message but introduces a regression (no console is selected by SPCR) in regular (no 'console=ttyAMA') case. s/||/&&/ would not fix the problem as the root cause was identified incorrectly. This reverts commit aea9a80ba98a0c9b4de88850260e9fbdcc98360b. Signed-off-by: Aleksey Makarov Signed-off-by: Greg Kroah-Hartman Acked-by: Sudeep Holla Tested-by: Jayachandran C Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db7f00b8dba6d687b6ab1f2e9309acfd214fcb4b Author: Eric Dumazet Date: Thu Mar 16 15:43:19 2017 -0700 tcp: tcp_get_info() should read tcp_time_stamp later Commit b369e7fd41f7 ("tcp: make TCP_INFO more consistent") moved lock_sock_fast() earlier in tcp_get_info() This has the minor effect that jiffies value being sampled at the beginning of tcp_get_info() is more likely to be off by one, and we report big tcpi_last_data_sent values (like 0xFFFFFFFF). Since we lock the socket, fetching tcp_time_stamp right before doing the jiffies_to_msecs() calls is enough to remove these wrong values. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b2db29fbb4e766fcd02207eb2e2087170bd6ebc Author: Guenter Roeck Date: Wed Mar 8 10:19:36 2017 -0800 usb: hub: Fix crash after failure to read BOS descriptor If usb_get_bos_descriptor() returns an error, usb->bos will be NULL. Nevertheless, it is dereferenced unconditionally in hub_set_initial_usb2_lpm_policy() if usb2_hw_lpm_capable is set. This results in a crash. usb 5-1: unable to get BOS descriptor ... Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = ffffffc00165f000 [00000008] *pgd=000000000174f003, *pud=000000000174f003, *pmd=0000000001750003, *pte=00e8000001751713 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: uinput uvcvideo videobuf2_vmalloc cmac [ ... ] CPU: 5 PID: 3353 Comm: kworker/5:3 Tainted: G B 4.4.52 #480 Hardware name: Google Kevin (DT) Workqueue: events driver_set_config_work task: ffffffc0c3690000 ti: ffffffc0ae9a8000 task.ti: ffffffc0ae9a8000 PC is at hub_port_init+0xc3c/0xd10 LR is at hub_port_init+0xc3c/0xd10 ... Call trace: [] hub_port_init+0xc3c/0xd10 [] usb_reset_and_verify_device+0x15c/0x82c [] usb_reset_device+0xe4/0x298 [] rtl8152_probe+0x84/0x9b0 [r8152] [] usb_probe_interface+0x244/0x2f8 [] driver_probe_device+0x180/0x3b4 [] __device_attach_driver+0xb4/0xe0 [] bus_for_each_drv+0xb4/0xe4 [] __device_attach+0xd0/0x158 [] device_initial_probe+0x24/0x30 [] bus_probe_device+0x50/0xe4 [] device_add+0x414/0x738 [] usb_set_configuration+0x89c/0x914 [] driver_set_config_work+0xc0/0xf0 [] process_one_work+0x390/0x6b8 [] worker_thread+0x480/0x610 [] kthread+0x164/0x178 [] ret_from_fork+0x10/0x40 Since we don't know anything about LPM capabilities without BOS descriptor, don't attempt to enable LPM if it is not available. Fixes: 890dae886721 ("xhci: Enable LPM support only for hardwired ...") Cc: stable Cc: Mathias Nyman Signed-off-by: Guenter Roeck Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e14b4db7a567ff507453ecd9c64da51bbc2b6d23 Author: stephen hemminger Date: Thu Mar 16 12:21:32 2017 -0700 netvsc: fix race during initialization When device is being setup on boot, there is a small race where network device callback is registered, but the netvsc_device pointer is not set yet. This can cause a NULL ptr dereference if packet arrives during this window. Fixes: 46b4f7f5d1f7 ("netvsc: eliminate per-device outstanding send counter") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d12c917691b45d9dffcfe7c2362d25caa40905fd Author: WANG Cong Date: Thu Mar 16 10:32:42 2017 -0700 bridge: resolve a false alarm of lockdep Andrei reported a false alarm of lockdep at net/bridge/br_fdb.c:109, this is because in Andrei's case, a spin_bug() was already triggered before this, therefore the debug_locks is turned off, lockdep_is_held() is no longer accurate after that. We should use lockdep_assert_held_once() instead of lockdep_is_held() to respect debug_locks. Fixes: 410b3d48f5111 ("bridge: fdb: add proper lock checks in searching functions") Reported-by: Andrei Vagin Signed-off-by: Cong Wang Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 2 +- net/bridge/br_private.h | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) commit 4d4a6ac73e7466c2085c307fac41f74ce4568a45 Author: David Howells Date: Thu Mar 16 16:27:10 2017 +0000 rxrpc: Ignore BUSY packets on old calls If we receive a BUSY packet for a call we think we've just completed, the packet is handed off to the connection processor to deal with - but the connection processor doesn't expect a BUSY packet and so flags a protocol error. Fix this by simply ignoring the BUSY packet for the moment. The symptom of this may appear as a system call failing with EPROTO. This may be triggered by pressing ctrl-C under some circumstances. This comes about we abort calls due to interruption by a signal (which we shouldn't do, but that's going to be a large fix and mostly in fs/afs/). What happens is that we abort the call and may also abort follow up calls too (this needs offloading somehoe). So we see a transmission of something like the following sequence of packets: DATA for call N ABORT call N DATA for call N+1 ABORT call N+1 in very quick succession on the same channel. However, the peer may have deferred the processing of the ABORT from the call N to a background thread and thus sees the DATA message from the call N+1 coming in before it has cleared the channel. Thus it sends a BUSY packet[*]. [*] Note that some implementations (OpenAFS, for example) mark the BUSY packet with one plus the callNumber of the call prior to call N. Ordinarily, this would be call N, but there's no requirement for the calls on a channel to be numbered strictly sequentially (the number is required to increase). This is wrong and means that the callNumber in the BUSY packet should be ignored (it really ought to be N+1 since that's what it's in response to). Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/conn_event.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9501df3cd9204f5859f649182431616a31ee88a1 Author: Nathan Fontenot Date: Wed Mar 15 23:38:07 2017 -0400 ibmvnic: Free tx/rx scrq pointer array when releasing sub-crqs The pointer array for the tx/rx sub crqs should be free'ed when releasing the tx/rx sub crqs. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 ++ 1 file changed, 2 insertions(+) commit cdd7928df0d2efaa3270d711963773a08a4cc8ab Author: Oliver Neukum Date: Tue Mar 14 12:09:56 2017 +0100 ACM gadget: fix endianness in notifications The gadget code exports the bitfield for serial status changes over the wire in its internal endianness. The fix is to convert to little endian before sending it over the wire. Signed-off-by: Oliver Neukum Tested-by: 家瑋 CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_acm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2e47c53503eb9faff42b3cfa144a833344dd1f89 Author: Johan Hovold Date: Tue Mar 14 17:55:46 2017 +0100 USB: usbtmc: fix probe error path Make sure to initialise the return value to avoid having allocation failures going unnoticed when allocating interrupt-endpoint resources. This prevents use-after-free or worse when the device is later unbound. Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.") Cc: stable # 4.6 Cc: Dave Penkler Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 687e0687f71ec00e0132a21fef802dee88c2f1ad Author: Johan Hovold Date: Tue Mar 14 17:55:45 2017 +0100 USB: usbtmc: add missing endpoint sanity check USBTMC devices are required to have a bulk-in and a bulk-out endpoint, but the driver failed to verify this, something which could lead to the endpoint addresses being taken from uninitialised memory. Make sure to zero all private data as part of allocation, and add the missing endpoint sanity check. Note that this also addresses a more recently introduced issue, where the interrupt-in-presence flag would also be uninitialised whenever the optional interrupt-in endpoint is not present. This in turn could lead to an interrupt urb being allocated, initialised and submitted based on uninitialised values. Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.") Fixes: 5b775f672cc9 ("USB: add USB test and measurement class driver") Cc: stable # 2.6.28 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4ee39733fbecf04cf9f346de2d64788c35028079 Author: David Ahern Date: Wed Mar 15 18:14:33 2017 -0700 net: ipv6: set route type for anycast routes Anycast routes have the RTF_ANYCAST flag set, but when dumping routes for userspace the route type is not set to RTN_ANYCAST. Make it so. Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes") CC: Hideaki YOSHIFUJI Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 ++ 1 file changed, 2 insertions(+) commit 61733c91c454a61be0ffc93fe46a5d5f2f048c1c Author: David Ahern Date: Mon Mar 13 16:49:10 2017 -0700 net: mpls: Fix nexthop alive tracking on down events Alive tracking of nexthops can account for a link twice if the carrier goes down followed by an admin down of the same link rendering multipath routes useless. This is similar to 79099aab38c8 for UNREGISTER events and DOWN events. Fix by tracking number of alive nexthops in mpls_ifdown similar to the logic in mpls_ifup. Checking the flags per nexthop once after all events have been processed is simpler than trying to maintian a running count through all event combinations. Also, WRITE_ONCE is used instead of ACCESS_ONCE to set rt_nhn_alive per a comment from checkpatch: WARNING: Prefer WRITE_ONCE(, ) over ACCESS_ONCE() = Fixes: c89359a42e2a4 ("mpls: support for dead routes") Signed-off-by: David Ahern Acked-by: Robert Shearman Signed-off-by: David S. Miller net/mpls/af_mpls.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit bc9ab9231ec8c08352ea860480523d88a221a68f Author: David Arcari Date: Mon Mar 13 19:07:16 2017 -0400 net: ethernet: aquantia: set net_device mtu when mtu is changed When the aquantia device mtu is changed the net_device structure is not updated. As a result the ip command does not properly reflect the mtu change. Commit 5513e16421cb incorrectly assumed that __dev_set_mtu() was making the assignment ndev->mtu = new_mtu; This is not true in the case where the driver has a ndo_change_mtu routine. Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu") Cc: Pavel Belous Signed-off-by: David Arcari Tested-by: Pavel Belous Reviewed-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + 1 file changed, 1 insertion(+) commit 4cbe4dac82e423ecc9a0ba46af24a860853259f4 Author: Jack Morgenstein Date: Mon Mar 13 19:29:08 2017 +0200 net/mlx4_core: Avoid delays during VF driver device shutdown Some Hypervisors detach VFs from VMs by instantly causing an FLR event to be generated for a VF. In the mlx4 case, this will cause that VF's comm channel to be disabled before the VM has an opportunity to invoke the VF device's "shutdown" method. For such Hypervisors, there is a race condition between the VF's shutdown method and its internal-error detection/reset thread. The internal-error detection/reset thread (which runs every 5 seconds) also detects a disabled comm channel. If the internal-error detection/reset flow wins the race, we still get delays (while that flow tries repeatedly to detect comm-channel recovery). The cited commit fixed the command timeout problem when the internal-error detection/reset flow loses the race. This commit avoids the unneeded delays when the internal-error detection/reset flow wins. Fixes: d585df1c5ccf ("net/mlx4_core: Avoid command timeouts during VF driver device shutdown") Signed-off-by: Jack Morgenstein Reported-by: Simon Xiao Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 11 +++++++++++ drivers/net/ethernet/mellanox/mlx4/main.c | 11 +++++++++++ include/linux/mlx4/device.h | 1 + 3 files changed, 23 insertions(+) commit 966fa72a716ceafc69de901a31f7cc1f52b35f81 Author: Vaibhav Jain Date: Tue Mar 14 08:17:00 2017 +0530 kernfs: Check KERNFS_HAS_RELEASE before calling kernfs_release_file() Recently started seeing a kernel oops when a module tries removing a memory mapped sysfs bin_attribute. On closer investigation the root cause seems to be kernfs_release_file() trying to call kernfs_op.release() callback that's NULL for such sysfs bin_attributes. The oops occurs when kernfs_release_file() is called from kernfs_drain_open_files() to cleanup any open handles with active memory mappings. The patch fixes this by checking for flag KERNFS_HAS_RELEASE before calling kernfs_release_file() in function kernfs_drain_open_files(). On ppc64-le arch with cxl module the oops back-trace is of the form below: [ 861.381126] Unable to handle kernel paging request for instruction fetch [ 861.381360] Faulting instruction address: 0x00000000 [ 861.381428] Oops: Kernel access of bad area, sig: 11 [#1] .... [ 861.382481] NIP: 0000000000000000 LR: c000000000362c60 CTR: 0000000000000000 .... Call Trace: [c000000f1680b750] [c000000000362c34] kernfs_drain_open_files+0x104/0x1d0 (unreliable) [c000000f1680b790] [c00000000035fa00] __kernfs_remove+0x260/0x2c0 [c000000f1680b820] [c000000000360da0] kernfs_remove_by_name_ns+0x60/0xe0 [c000000f1680b8b0] [c0000000003638f4] sysfs_remove_bin_file+0x24/0x40 [c000000f1680b8d0] [c00000000062a164] device_remove_bin_file+0x24/0x40 [c000000f1680b8f0] [d000000009b7b22c] cxl_sysfs_afu_remove+0x144/0x170 [cxl] [c000000f1680b940] [d000000009b7c7e4] cxl_remove+0x6c/0x1a0 [cxl] [c000000f1680b990] [c00000000052f694] pci_device_remove+0x64/0x110 [c000000f1680b9d0] [c0000000006321d4] device_release_driver_internal+0x1f4/0x2b0 [c000000f1680ba20] [c000000000525cb0] pci_stop_bus_device+0xa0/0xd0 [c000000f1680ba60] [c000000000525e80] pci_stop_and_remove_bus_device+0x20/0x40 [c000000f1680ba90] [c00000000004a6c4] pci_hp_remove_devices+0x84/0xc0 [c000000f1680bad0] [c00000000004a688] pci_hp_remove_devices+0x48/0xc0 [c000000f1680bb10] [c0000000009dfda4] eeh_reset_device+0xb0/0x290 [c000000f1680bbb0] [c000000000032b4c] eeh_handle_normal_event+0x47c/0x530 [c000000f1680bc60] [c000000000032e64] eeh_handle_event+0x174/0x350 [c000000f1680bd10] [c000000000033228] eeh_event_handler+0x1e8/0x1f0 [c000000f1680bdc0] [c0000000000d384c] kthread+0x14c/0x190 [c000000f1680be30] [c00000000000b5a0] ret_from_kernel_thread+0x5c/0xbc Fixes: f83f3c515654 ("kernfs: fix locking around kernfs_ops->release() callback") Signed-off-by: Vaibhav Jain Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d528ae0d3dfedea553812c957a6ed1e87feeed8a Merge: d11507e 15c9e10 Author: Linus Torvalds Date: Thu Mar 16 18:23:02 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "6 fixes" * emailed patches from Andrew Morton : drivers core: remove assert_held_device_hotplug() mm: add private lock to serialize memory hotplug operations mm: don't warn when vmalloc() fails due to a fatal signal mm, x86: fix native_pud_clear build error kasan: add a prototype of task_struct to avoid warning z3fold: fix spinlock unlocking in page reclaim commit 15c9e10d9ad4d41d076148bbff1de7f659f68852 Author: Heiko Carstens Date: Thu Mar 16 16:40:33 2017 -0700 drivers core: remove assert_held_device_hotplug() The last caller of assert_held_device_hotplug() is gone, so remove it again. Link: http://lkml.kernel.org/r/20170314125226.16779-3-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Acked-by: Dan Williams Cc: Michal Hocko Cc: "Rafael J. Wysocki" Cc: Vladimir Davydov Cc: Ben Hutchings Cc: Gerald Schaefer Cc: Martin Schwidefsky Cc: Sebastian Ott Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/core.c | 5 ----- include/linux/device.h | 1 - 2 files changed, 6 deletions(-) commit 55adc1d05dca9e949cdf46c747cb1e91c0e9143d Author: Heiko Carstens Date: Thu Mar 16 16:40:30 2017 -0700 mm: add private lock to serialize memory hotplug operations Commit bfc8c90139eb ("mem-hotplug: implement get/put_online_mems") introduced new functions get/put_online_mems() and mem_hotplug_begin/end() in order to allow similar semantics for memory hotplug like for cpu hotplug. The corresponding functions for cpu hotplug are get/put_online_cpus() and cpu_hotplug_begin/done() for cpu hotplug. The commit however missed to introduce functions that would serialize memory hotplug operations like they are done for cpu hotplug with cpu_maps_update_begin/done(). This basically leaves mem_hotplug.active_writer unprotected and allows concurrent writers to modify it, which may lead to problems as outlined by commit f931ab479dd2 ("mm: fix devm_memremap_pages crash, use mem_hotplug_{begin, done}"). That commit was extended again with commit b5d24fda9c3d ("mm, devm_memremap_pages: hold device_hotplug lock over mem_hotplug_{begin, done}") which serializes memory hotplug operations for some call sites by using the device_hotplug lock. In addition with commit 3fc21924100b ("mm: validate device_hotplug is held for memory hotplug") a sanity check was added to mem_hotplug_begin() to verify that the device_hotplug lock is held. This in turn triggers the following warning on s390: WARNING: CPU: 6 PID: 1 at drivers/base/core.c:643 assert_held_device_hotplug+0x4a/0x58 Call Trace: assert_held_device_hotplug+0x40/0x58) mem_hotplug_begin+0x34/0xc8 add_memory_resource+0x7e/0x1f8 add_memory+0xda/0x130 add_memory_merged+0x15c/0x178 sclp_detect_standby_memory+0x2ae/0x2f8 do_one_initcall+0xa2/0x150 kernel_init_freeable+0x228/0x2d8 kernel_init+0x2a/0x140 kernel_thread_starter+0x6/0xc One possible fix would be to add more lock_device_hotplug() and unlock_device_hotplug() calls around each call site of mem_hotplug_begin/end(). But that would give the device_hotplug lock additional semantics it better should not have (serialize memory hotplug operations). Instead add a new memory_add_remove_lock which has the similar semantics like cpu_add_remove_lock for cpu hotplug. To keep things hopefully a bit easier the lock will be locked and unlocked within the mem_hotplug_begin/end() functions. Link: http://lkml.kernel.org/r/20170314125226.16779-2-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Reported-by: Sebastian Ott Acked-by: Dan Williams Acked-by: Rafael J. Wysocki Cc: Michal Hocko Cc: Vladimir Davydov Cc: Ben Hutchings Cc: Gerald Schaefer Cc: Martin Schwidefsky Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 4 ---- mm/memory_hotplug.c | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) commit 171012f561274784160f666f8398af8b42216e1f Author: Dmitry Vyukov Date: Thu Mar 16 16:40:27 2017 -0700 mm: don't warn when vmalloc() fails due to a fatal signal When vmalloc() fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However, vmalloc() can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably. Don't warn when vmalloc() fails due to fatal signal pending. Link: http://lkml.kernel.org/r/20170313114425.72724-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Reviewed-by: Matthew Wilcox Acked-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d0f33ac9ae7b2a727fb678235ae37baf1d0608d5 Author: Arnd Bergmann Date: Thu Mar 16 16:40:24 2017 -0700 mm, x86: fix native_pud_clear build error We still get a build error in random configurations, after this has been modified a few times: In file included from include/linux/mm.h:68:0, from include/linux/suspend.h:8, from arch/x86/kernel/asm-offsets.c:12: arch/x86/include/asm/pgtable.h:66:26: error: redefinition of 'native_pud_clear' #define pud_clear(pud) native_pud_clear(pud) My interpretation is that the build error comes from a typo in __PAGETABLE_PUD_FOLDED, so fix that typo now, and remove the incorrect #ifdef around the native_pud_clear definition. Fixes: 3e761a42e19c ("mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear()") Fixes: a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") Link: http://lkml.kernel.org/r/20170314121330.182155-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Ackedy-by: Dave Jiang Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Garnier Cc: Kees Cook Cc: Dave Hansen Cc: Hugh Dickins Cc: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable-3level.h | 3 --- arch/x86/include/asm/pgtable.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit 5be9b730b09c45c358bbfe7f51d254e306cccc07 Author: Masami Hiramatsu Date: Thu Mar 16 16:40:21 2017 -0700 kasan: add a prototype of task_struct to avoid warning Add a prototype of task_struct to fix below warning on arm64. In file included from arch/arm64/kernel/probes/kprobes.c:19:0: include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] static inline void kasan_unpoison_task_stack(struct task_struct *task) {} As same as other types (kmem_cache, page, and vm_struct) this adds a prototype of task_struct data structure on top of kasan.h. [arnd] A related warning was fixed before, but now appears in a different line in the same file in v4.11-rc2. The patch from Masami Hiramatsu still seems appropriate, so let's take his version. Fixes: 71af2ed5eeea ("kasan, sched/headers: Remove from ") Link: https://patchwork.kernel.org/patch/9569839/ Link: http://lkml.kernel.org/r/20170313141517.3397802-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Masami Hiramatsu Acked-by: Alexander Potapenko Acked-by: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 1 + 1 file changed, 1 insertion(+) commit 271df90e4e530c17f237b27034d6341cb2c2f536 Author: Vitaly Wool Date: Thu Mar 16 16:40:19 2017 -0700 z3fold: fix spinlock unlocking in page reclaim Commmit 5a27aa822029 ("z3fold: add kref refcounting") introduced a bug in z3fold_reclaim_page() with function exit that may leave pool->lock spinlock held. Here comes the trivial fix. Fixes: 5a27aa822029 ("z3fold: add kref refcounting") Link: http://lkml.kernel.org/r/20170311222239.7b83d8e7ef1914e05497649f@gmail.com Reported-by: Alexey Khoroshilov Signed-off-by: Vitaly Wool Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 1 + 1 file changed, 1 insertion(+) commit bf33f87dd04c371ea33feb821b60d63d754e3124 Author: peter chang Date: Wed Feb 15 14:11:54 2017 -0800 scsi: sg: check length passed to SG_NEXT_CMD_LEN The user can control the size of the next command passed along, but the value passed to the ioctl isn't checked against the usable max command size. Cc: Signed-off-by: Peter Chang Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 ++ 1 file changed, 2 insertions(+) commit acfa28b3649ec07775efaac0c00de2db39d71634 Author: Jon Mason Date: Wed Mar 1 18:02:28 2017 -0500 ARM: dts: NSP: GPIO reboot open-source The libgpio code pre-sets the GPIO values for the gpio-reset in the device tree. This results in the device being reset during bringup. To prevent this pre-setting, use the "open-source" flag in the device tree. Signed-off-by: Jon Mason Fixes: b1aaf88 ("ARM: dts: NSP: Add GPIO reboot method to bcm958625hr DTS file") Fixes: 10baed1 ("ARM: dts: NSP: Add GPIO reboot method to bcm958625xmc DTS file") Fixes: 088e3148 ("ARM: dts: NSP: Add new DT file for bcm958522er") Fixes: e3227c1 ("ARM: dts: NSP: Add new DT file for bcm958525er") Fixes: 2f8bc00 ("ARM: dts: NSP: Add new DT file for bcm958622hr") Fixes: d454c37 ("ARM: dts: NSP: Add new DT file for bcm958623hr") Fixes: f27eacf ("ARM: dts: NSP: Add new DT file for bcm988312hr") Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958522er.dts | 1 + arch/arm/boot/dts/bcm958525er.dts | 1 + arch/arm/boot/dts/bcm958525xmc.dts | 1 + arch/arm/boot/dts/bcm958622hr.dts | 1 + arch/arm/boot/dts/bcm958623hr.dts | 1 + arch/arm/boot/dts/bcm958625hr.dts | 1 + arch/arm/boot/dts/bcm988312hr.dts | 1 + 7 files changed, 7 insertions(+) commit 92461f5d723037530c1f36cce93640770037812c Author: Johan Hovold Date: Thu Mar 16 11:43:09 2017 -0700 Input: sur40 - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory that lie beyond the end of the endpoint array should a malicious device lack the expected endpoints. Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40... ") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 3.13 Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sur40.c | 3 +++ 1 file changed, 3 insertions(+) commit cb1b494663e037253337623bf1ef2df727883cb7 Author: Johan Hovold Date: Thu Mar 16 11:41:55 2017 -0700 Input: kbtab - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/tablet/kbtab.c | 3 +++ 1 file changed, 3 insertions(+) commit ba340d7b83703768ce566f53f857543359aa1b98 Author: Johan Hovold Date: Thu Mar 16 11:39:29 2017 -0700 Input: hanwang - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: bba5394ad3bd ("Input: add support for Hanwang tablets") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 2.6.37 Signed-off-by: Dmitry Torokhov drivers/input/tablet/hanwang.c | 3 +++ 1 file changed, 3 insertions(+) commit 5cc4a1a9f5c179795c8a1f2b0f4361829d6a070e Author: Johan Hovold Date: Thu Mar 16 11:37:01 2017 -0700 Input: yealink - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: aca951a22a1d ("[PATCH] input-driver-yealink-P1K-usb-phone") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 2.6.14 Signed-off-by: Dmitry Torokhov drivers/input/misc/yealink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1916d319271664241b7aa0cd2b05e32bdb310ce9 Author: Johan Hovold Date: Thu Mar 16 11:36:13 2017 -0700 Input: ims-pcu - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack control-interface endpoints. Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 3.10 Signed-off-by: Dmitry Torokhov drivers/input/misc/ims-pcu.c | 4 ++++ 1 file changed, 4 insertions(+) commit ac2ee9ba953afe88f7a673e1c0c839227b1d7891 Author: Johan Hovold Date: Thu Mar 16 11:35:12 2017 -0700 Input: cm109 - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: c04148f915e5 ("Input: add driver for USB VoIP phones with CM109...") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 2.6.28 Signed-off-by: Dmitry Torokhov drivers/input/misc/cm109.c | 4 ++++ 1 file changed, 4 insertions(+) commit 59cf8bed44a79ec42303151dd014fdb6434254bb Author: Johan Hovold Date: Thu Mar 16 11:34:02 2017 -0700 Input: iforce - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory that lie beyond the end of the endpoint array should a malicious device lack the expected endpoints. Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-usb.c | 3 +++ 1 file changed, 3 insertions(+) commit d11507e197242aaab172d7f1d0fe4771fbffa530 Merge: 325513d 630a04e Author: Linus Torvalds Date: Thu Mar 16 12:30:43 2017 -0700 Merge tag 'xfs-4.11-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "Here's a single fix for -rc3 to improve input validation on inline directory data to prevent buffer overruns due to corrupt metadata" * tag 'xfs-4.11-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: verify inline directory data forks commit b124f413323e90398b868a9848e63149d0fed8ce Merge: 8f3dbfd7 1a9070e Author: David S. Miller Date: Thu Mar 16 12:05:38 2017 -0700 Merge tag 'batadv-net-for-davem-20170316' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfixes: - Keep fragments equally sized, avoids some problems with too small fragments, by Sven Eckelmann - Initialize gateway class correctly when BATMAN V is compiled in, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 8f3dbfd79ed9ef9770305a7cc4e13dfd31ad2cd0 Author: Kris Murphy Date: Thu Mar 16 10:51:28 2017 -0500 openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement in ip_tun_from_nlattr in order to prevent the default case returning an error. Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area") Signed-off-by: Kris Murphy Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 325513d9b54cae3a4439948f6b17039850aeac66 Merge: 3009b30 0e4c0e6 Author: Linus Torvalds Date: Thu Mar 16 11:47:28 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes/cleanups from Catalin Marinas: "In Will's absence I'm sending the arm64 fixes he queued for 4.11-rc3: - fix arm64 kernel boot warning when DEBUG_VIRTUAL and KASAN are enabled - enable KEYS_COMPAT for keyctl compat support - use cpus_have_const_cap() for system_uses_ttbr0_pan() (slight performance improvement) - update kerneldoc for cpu_suspend() rename - remove the arm64-specific kprobe_exceptions_notify (weak generic variant defined)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kernel: Update kerneldoc for cpu_suspend() rename arm64: use const cap for system_uses_ttbr0_pan() arm64: support keyctl() system call in 32-bit mode arm64: kasan: avoid bad virt_to_pfn() arm64: kprobes: remove kprobe_exceptions_notify commit 3009b303b0f9868295205d5f750a2d088e3965ce Merge: 69eea5a 11353b9 Author: Linus Torvalds Date: Thu Mar 16 11:43:48 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: - fix a parity calculation bug of raid5 cache by Song - fix a potential deadlock issue by me - fix two endian issues by Jason - fix a disk limitation issue by Neil - other small fixes and cleanup * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid1: fix a trivial typo in comments md/r5cache: fix set_syndrome_sources() for data in cache md: fix incorrect use of lexx_to_cpu in does_sb_need_changing md: fix super_offset endianness in super_1_rdev_size_change md/raid1/10: fix potential deadlock md: don't impose the MD_SB_DISKS limit on arrays without metadata. md: move funcs from pers->resize to update_size md-cluster: remove useless memset from gather_all_resync_info md-cluster: free md_cluster_info if node leave cluster md: delete dead code md/raid10: submit bio directly to replacement disk commit b334e19ae9381f12a7521976883022385d2b7eef Author: Arnd Bergmann Date: Fri Jan 13 16:40:01 2017 +0100 Kbuild: use cc-disable-warning consistently for maybe-uninitialized In commit a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1""), I reverted another change that happened to fix a problem with old compilers, and now we get this report again with old compilers (prior to gcc-4.8) and GCOV enabled: cc1: warnings being treated as errors drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page': drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function At top level: >> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" The problem is that we turn off the warning conditionally in a number of places as we should, but one of them does it unconditionally. Instead, change it to call cc-disable-warning as we do elsewhere. The original patch that caused it was merged into linux-4.7, then 4.8 removed the change and 4.9 brought it back, so we probably want a backport to 4.9 once this is merged. Use a ':=' assignment instead of '=' to force the cc-disable-warning call to only be evaluated once instead of every time. Cc: stable@vger.kernel.org Fixes: a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"") Fixes: e72e2dfe7c16 ("gcov: disable -Wmaybe-uninitialized warning") Reported-by: kbuild test robot Signed-off-by: Arnd Bergmann Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b25634e2a051bef4b2524b11adddfbfa6448f6cd Author: Sagi Grimberg Date: Thu Mar 9 13:45:52 2017 +0200 nvmet-rdma: Fix a possible uninitialized variable dereference When handling a new recv command, we grab a new rsp resource and check for the queue state being live. In case the queue is not in live state, we simply restore the rsp back to the free list. However in this flow we didn't set rsp->queue yet, so we cannot dereference it. Instead, make sure to initialize rsp->queue (and other rsp members) as soon as possible so we won't reference uninitialized variables. Reported-by: Yi Zhang Reported-by: Raju Rangoju Reviewed-by: Christoph Hellwig Tested-by: Raju Rangoju Signed-off-by: Sagi Grimberg drivers/nvme/target/rdma.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d11ea004a458b982e19b188c386e25a9b66ec446 Author: Sagi Grimberg Date: Mon Mar 6 18:46:20 2017 +0200 nvmet: confirm sq percpu has scheduled and switched to atomic percpu_ref_kill is not enough to prevent subsequent percpu_ref_tryget_live from failing. Hence call perfcpu_ref_kill_confirm to make it safe. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/core.c | 11 ++++++++++- drivers/nvme/target/nvmet.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) commit e4c5d3762e2d6d274bd1cc948c47063becfa2103 Author: Sagi Grimberg Date: Mon Feb 27 18:44:45 2017 +0200 nvme-loop: fix a possible use-after-free when destroying the admin queue we need to destroy the nvmet sq and let it finish gracefully before continue to cleanup the queue. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5051c7bc777dffa5661569dec5997f432b9a34a Author: David Howells Date: Thu Mar 16 16:27:49 2017 +0000 afs: Don't wait for page writeback with the page lock held Drop the page lock before waiting for page writeback. Signed-off-by: David Howells fs/afs/write.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 65a151094edeb04e8f5f6f1502028e2383e81bb8 Author: David Howells Date: Thu Mar 16 16:27:49 2017 +0000 afs: ->writepage() shouldn't call clear_page_dirty_for_io() The ->writepage() op shouldn't call clear_page_dirty_for_io() as that has already been called by the caller. Fix afs_writepage() by moving the call out of afs_write_back_from_locked_page() to afs_writepages_region() where it is needed. Signed-off-by: David Howells fs/afs/write.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 954cd6dc02a65065aecb7150962c0870c5b0e322 Author: David Howells Date: Thu Mar 16 16:27:49 2017 +0000 afs: Fix abort on signal while waiting for call completion Fix the way in which a call that's in progress and being waited for is aborted in the case that EINTR is detected. We should be sending RX_USER_ABORT rather than RX_CALL_DEAD as the abort code. Note that since the only two ways out of the loop are if the call completes or if a signal happens, the kill-the-call clause after the loop has finished can only happen in the case of EINTR. This means that we only have one abort case to deal with, not two, and the "KWC" case can never happen and so can be deleted. Note further that simply aborting the call isn't necessarily the best thing here since at this point: the request has been entirely sent and it's likely the server will do the operation anyway - whether we abort it or not. In future, we should punt the handling of the remainder of the call off to a background thread. Reported-by: Marc Dionne Signed-off-by: David Howells fs/afs/rxrpc.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 445783d0ec173a52bef2e9b129de7d716a19b9fa Author: David Howells Date: Thu Mar 16 16:27:48 2017 +0000 afs: Fix an off-by-one error in afs_send_pages() afs_send_pages() should only put the call into the AFS_CALL_AWAIT_REPLY state if it has sent all the pages - but the check it makes is incorrect and sometimes it will finish the loop early. Signed-off-by: David Howells fs/afs/rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7286a35e893176169b09715096a4aca557e2ccd2 Author: David Howells Date: Thu Mar 16 16:27:48 2017 +0000 afs: Fix afs_kill_pages() Fix afs_kill_pages() in two ways: (1) If a writeback has been partially flushed, then if we try and kill the pages it contains, some of them may no longer be undergoing writeback and end_page_writeback() will assert. Fix this by checking to see whether the page in question is actually undergoing writeback before ending that writeback. (2) The loop that scans for pages to kill doesn't increase the first page index, and so the loop may not terminate, but it will try to process the same pages over and over again. Fix this by increasing the first page index to one after the last page we processed. Signed-off-by: David Howells fs/afs/write.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6d06b0d25209c80e99c1e89700f1e09694a3766b Author: David Howells Date: Thu Mar 16 16:27:48 2017 +0000 afs: Fix page leak in afs_write_begin() afs_write_begin() leaks a ref and a lock on a page if afs_fill_page() fails. Fix the leak by unlocking and releasing the page in the error path. Signed-off-by: David Howells fs/afs/write.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 68ae849d7e674b83610bc7fdf74b21621a09b9ac Author: David Howells Date: Thu Mar 16 16:27:48 2017 +0000 afs: Don't set PG_error on local EINTR or ENOMEM when filling a page Don't set PG_error on a page if we get local EINTR or ENOMEM when filling a page for writing. Signed-off-by: David Howells fs/afs/file.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ab94f5d0dd6fd82e7eeca5e7c8096eaea0a0261f Author: Marc Dionne Date: Thu Mar 16 16:27:47 2017 +0000 afs: Populate and use client modification time The inode timestamps should be set from the client time in the status received from the server, rather than the server time which is meant for internal server use. Set AFS_SET_MTIME and populate the mtime for operations that take an input status, such as file/dir creation and StoreData. If an input time is not provided the server will set the vnode times based on the current server time. In a situation where the server has some skew with the client, this could lead to the client seeing a timestamp in the future for a file that it just created or wrote. Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/fsclient.c | 18 +++++++++--------- fs/afs/inode.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 70af0e3bd65142f9e674961c975451638a7ce1d5 Author: David Howells Date: Thu Mar 16 16:27:47 2017 +0000 afs: Better abort and net error handling If we receive a network error, a remote abort or a protocol error whilst we're still transmitting data, make sure we return an appropriate error to the caller rather than ESHUTDOWN or ECONNABORTED. Signed-off-by: David Howells fs/afs/rxrpc.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 1157f153f37a8586765034470e4f00a4a6c4ce6f Author: David Howells Date: Thu Mar 16 16:27:47 2017 +0000 afs: Invalid op ID should abort with RXGEN_OPCODE When we are given an invalid operation ID, we should abort that with RXGEN_OPCODE rather than RX_INVALID_OPERATION. Also map RXGEN_OPCODE to -ENOTSUPP. Signed-off-by: David Howells fs/afs/misc.c | 2 ++ fs/afs/rxrpc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 146a1192783697810b63a1e41c4d59fc93387340 Author: David Howells Date: Thu Mar 16 16:27:47 2017 +0000 afs: Fix the maths in afs_fs_store_data() afs_fs_store_data() works out of the size of the write it's going to make, but it uses 32-bit unsigned subtraction in one place that gets automatically cast to loff_t. However, if to < offset, then the number goes negative, but as the result isn't signed, this doesn't get sign-extended to 64-bits when placed in a loff_t. Fix by casting the operands to loff_t. Signed-off-by: David Howells fs/afs/fsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f5705a5c805e7f761f2228820656bb9363a3d8c Author: David Howells Date: Thu Mar 16 16:27:46 2017 +0000 afs: Use a bvec rather than a kvec in afs_send_pages() Use a bvec rather than a kvec in afs_send_pages() as we don't then have to call kmap() in advance. This allows us to pass the array of contiguous pages that we extracted through to rxrpc in one go rather than passing a single page at a time. Signed-off-by: David Howells fs/afs/rxrpc.c | 97 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 45 deletions(-) commit 6a0e3999e5cb3daa0468073fcdee0767422a4056 Author: David Howells Date: Thu Mar 16 16:27:46 2017 +0000 afs: Make struct afs_read::remain 64-bit Make struct afs_read::remain 64-bit so that it can handle huge transfers if we ever request them or the server decides to give us a bit extra data (the other fields there are already 64-bit). Signed-off-by: David Howells Tested-by: Marc Dionne fs/afs/fsclient.c | 8 ++++---- fs/afs/internal.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 29f069853287dcb46eaf45a50dbf1232c1444ac6 Author: David Howells Date: Thu Mar 16 16:27:46 2017 +0000 afs: Fix AFS read bug Fix a bug in AFS read whereby the request page afs_read::index isn't incremented after calling ->page_done() if ->remain reaches 0, indicating that the data read is complete. Without this a NULL pointer exception happens when ->page_done() is called twice for the last page because the page clearing loop will call it also and afs_readpages_page_done() clears the current entry in the page list. BUG: unable to handle kernel NULL pointer dereference at (null) IP: afs_readpages_page_done+0x21/0xa4 [kafs] PGD 0 Oops: 0002 [#1] SMP Modules linked in: kafs(E) CPU: 2 PID: 3002 Comm: md5sum Tainted: G E 4.10.0-fscache #485 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 task: ffff8804017d86c0 task.stack: ffff8803fc1d8000 RIP: 0010:afs_readpages_page_done+0x21/0xa4 [kafs] RSP: 0018:ffff8803fc1db978 EFLAGS: 00010282 RAX: ffff880405d39af8 RBX: 0000000000000000 RCX: ffff880407d83ed4 RDX: 0000000000000000 RSI: ffff880405d39a00 RDI: ffff880405c6f400 RBP: ffff8803fc1db988 R08: 0000000000000000 R09: 0000000000000001 R10: ffff8803fc1db820 R11: ffff88040cf56000 R12: ffff8804088f1780 R13: ffff8804017d86c0 R14: ffff8804088f1780 R15: 0000000000003840 FS: 00007f8154469700(0000) GS:ffff88041fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000004016ec000 CR4: 00000000001406e0 Call Trace: afs_deliver_fs_fetch_data+0x5b9/0x60e [kafs] ? afs_make_call+0x316/0x4e8 [kafs] ? afs_make_call+0x359/0x4e8 [kafs] afs_deliver_to_call+0x173/0x2e8 [kafs] ? afs_make_call+0x316/0x4e8 [kafs] afs_make_call+0x37a/0x4e8 [kafs] ? wake_up_q+0x4f/0x4f ? __init_waitqueue_head+0x36/0x49 afs_fs_fetch_data+0x21c/0x227 [kafs] ? afs_fs_fetch_data+0x21c/0x227 [kafs] afs_vnode_fetch_data+0xf3/0x1d2 [kafs] afs_readpages+0x314/0x3fd [kafs] __do_page_cache_readahead+0x208/0x2c5 ondemand_readahead+0x3a2/0x3b7 ? ondemand_readahead+0x3a2/0x3b7 page_cache_async_readahead+0x5e/0x67 generic_file_read_iter+0x23b/0x70c ? __inode_security_revalidate+0x2f/0x62 __vfs_read+0xc4/0xe8 vfs_read+0xd1/0x15a SyS_read+0x4c/0x89 do_syscall_64+0x80/0x191 entry_SYSCALL64_slow_path+0x25/0x25 Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne fs/afs/fsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56e714312e7dbd6bb83b2f78d3ec19a404c7649f Author: Tina Ruchandani Date: Thu Mar 16 16:27:46 2017 +0000 afs: Prevent callback expiry timer overflow get_seconds() returns real wall-clock seconds. On 32-bit systems this value will overflow in year 2038 and beyond. This patch changes afs_vnode record to use ktime_get_real_seconds() instead, for the fields cb_expires and cb_expires_at. Signed-off-by: Tina Ruchandani Signed-off-by: David Howells fs/afs/fsclient.c | 2 +- fs/afs/inode.c | 7 ++++--- fs/afs/internal.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) commit 8a79790bf0b7da216627ffb85f52cfb4adbf1e4e Author: Tina Ruchandani Date: Thu Mar 16 16:27:46 2017 +0000 afs: Migrate vlocation fields to 64-bit get_seconds() returns real wall-clock seconds. On 32-bit systems this value will overflow in year 2038 and beyond. This patch changes afs's vlocation record to use ktime_get_real_seconds() instead, for the fields time_of_death and update_at. Signed-off-by: Tina Ruchandani Signed-off-by: David Howells fs/afs/callback.c | 7 ++++--- fs/afs/internal.h | 7 ++++--- fs/afs/server.c | 6 +++--- fs/afs/vlocation.c | 16 +++++++++------- 4 files changed, 20 insertions(+), 16 deletions(-) commit df8a09d1b8f9e693ec3f6b7e0162fc817f2cf0db Author: Andreea-Cristina Bernat Date: Thu Mar 16 16:27:45 2017 +0000 afs: security: Replace rcu_assign_pointer() with RCU_INIT_POINTER() The use of "rcu_assign_pointer()" is NULLing out the pointer. According to RCU_INIT_POINTER()'s block comment: "1. This use of RCU_INIT_POINTER() is NULLing out the pointer" it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) Signed-off-by: Andreea-Cristina Bernat Signed-off-by: David Howells fs/afs/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d7e4ebf291d3103466006926329e39aa355944f Author: Andreea-Cristina Bernat Date: Thu Mar 16 16:27:45 2017 +0000 afs: inode: Replace rcu_assign_pointer() with RCU_INIT_POINTER() The use of "rcu_assign_pointer()" is NULLing out the pointer. According to RCU_INIT_POINTER()'s block comment: "1. This use of RCU_INIT_POINTER() is NULLing out the pointer" it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) Signed-off-by: Andreea-Cristina Bernat Signed-off-by: David Howells fs/afs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 944c74f472f926785b1948efa0e73e2f1b3b539b Author: David Howells Date: Thu Mar 16 16:27:45 2017 +0000 afs: Distinguish mountpoints from symlinks by file mode alone In AFS, mountpoints appear as symlinks with mode 0644 and normal symlinks have mode 0777, so use this to distinguish them rather than reading the content and parsing it. In the case of a mountpoint, the symlink body is a formatted string indicating the location of the target volume. Note that with this, kAFS no longer 'pre-fetches' the contents of symlinks, so afs_readpage() may fail with an access-denial because when the VFS calls d_automount(), it wraps the call in an credentials override that sets the initial creds - thereby preventing access to the caller's keyrings and the authentication keys held therein. To this end, a patch reverting that change to the VFS is required also. Reported-by: Jeffrey Altman Signed-off-by: David Howells fs/afs/inode.c | 29 +++++++++++++++-------------- fs/afs/internal.h | 1 - fs/afs/mntpt.c | 53 ----------------------------------------------------- 3 files changed, 15 insertions(+), 68 deletions(-) commit 58fed94dfb17e89556b5705f20f90e5b2971b6a1 Author: David Howells Date: Thu Mar 16 16:27:45 2017 +0000 afs: Flush outstanding writes when an fd is closed Flush outstanding writes in afs when an fd is closed. This is what NFS and CIFS do. Reported-by: Marc Dionne Signed-off-by: David Howells fs/afs/file.c | 1 + fs/afs/internal.h | 1 + fs/afs/write.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+) commit e8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6 Author: David Howells Date: Thu Mar 16 16:27:44 2017 +0000 afs: Handle a short write to an AFS page Handle the situation where afs_write_begin() is told to expect that a full-page write will be made, but this doesn't happen (EFAULT, CTRL-C, etc.), and so afs_write_end() sees a partial write took place. Currently, no attempt is to deal with the discrepency. Fix this by loading the gap from the server. Reported-by: Al Viro Signed-off-by: David Howells fs/afs/fsclient.c | 4 +++- fs/afs/internal.h | 2 +- fs/afs/write.c | 28 +++++++++++++++++++--------- 3 files changed, 23 insertions(+), 11 deletions(-) commit 3448e6521755862446aed28e29abf12565d8844e Author: David Howells Date: Thu Mar 16 16:27:44 2017 +0000 afs: Kill struct afs_read::pg_offset Kill struct afs_read::pg_offset as nothing uses it. It's unnecessary as pos can be masked off. Signed-off-by: David Howells fs/afs/internal.h | 1 - 1 file changed, 1 deletion(-) commit 6db3ac3c4bc552837d232ec794559a2fae2815a0 Author: David Howells Date: Thu Mar 16 16:27:44 2017 +0000 afs: Handle better the server returning excess or short data When an AFS server is given an FS.FetchData{,64} request to read data from a file, it is permitted by the protocol to return more or less than was requested. kafs currently relies on the latter behaviour in readpage{,s} to handle a partial page at the end of the file (we just ask for a whole page and clear space beyond the short read). However, we don't handle all cases. Add: (1) Handle excess data by discarding it rather than aborting. Note that we use a common static buffer to discard into so that the decryption algorithm advances the PCBC state. (2) Handle a short read that affects more than just the last page. Note that if a read comes up unexpectedly short of long, it's possible that the server's copy of the file changed - in which case the data version number will have been incremented and the callback will have been broken - in which case all the pages currently attached to the inode will be zapped anyway at some point. Signed-off-by: David Howells fs/afs/file.c | 7 +++++-- fs/afs/fsclient.c | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 16 deletions(-) commit bcd89270d93b7edebb5de5e5e7dca1a77a33496e Author: Marc Dionne Date: Thu Mar 16 16:27:44 2017 +0000 afs: Deal with an empty callback array Servers may send a callback array that is the same size as the FID array, or an empty array. If the callback count is 0, the code would attempt to read (fid_count * 12) bytes of data, which would fail and result in an unmarshalling error. This would lead to stale data for remotely modified files or directories. Store the callback array size in the internal afs_call structure and use that to determine the amount of data to read. Signed-off-by: Marc Dionne fs/afs/cmservice.c | 11 +++++------ fs/afs/internal.h | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) commit 627f46943ff90bcc32ddeb675d881c043c6fa2ae Author: Marc Dionne Date: Thu Mar 16 16:27:44 2017 +0000 afs: Adjust mode bits processing Mode bits for an afs file should not be enforced in the usual way. For files, the absence of user bits can restrict file access with respect to what is granted by the server. These bits apply regardless of the owner or the current uid; the rest of the mode bits (group, other) are ignored. Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/security.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6186f0788b31f44affceeedc7b48eb10faea120d Author: Marc Dionne Date: Thu Mar 16 16:27:43 2017 +0000 afs: Populate group ID from vnode status The group was hard coded to GLOBAL_ROOT_GID; use the group ID that was received from the server. Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5611ef280d814042825ee17688f5751266fc538b Author: David Howells Date: Thu Mar 16 16:27:43 2017 +0000 afs: Fix page overput in afs_fill_page() afs_fill_page() loads the page it wants to fill into the afs_read request without incrementing its refcount - but then calls afs_put_read() to clean up afterwards, which then releases a ref on the page. Fix this by getting a ref on the page before calling afs_vnode_fetch_data(). This causes sync after a write to hang in afs_writepages_region() because find_get_pages_tag() gets confused and doesn't return. Fixes: 196ee9cd2d04 ("afs: Make afs_fs_fetch_data() take a list of pages") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne fs/afs/write.c | 1 + 1 file changed, 1 insertion(+) commit 29c8bbbd6e21daa0997d1c3ee886b897ee7ad652 Author: David Howells Date: Thu Mar 16 16:27:43 2017 +0000 afs: Fix missing put_page() In afs_writepages_region(), inside the loop where we find dirty pages to deal with, one of the if-statements is missing a put_page(). Signed-off-by: David Howells fs/afs/write.c | 1 + 1 file changed, 1 insertion(+) commit efd4b81abbe1ac753717f2f10cd3dab8bed6c103 Author: Omar Sandoval Date: Thu Mar 16 09:46:14 2017 -0600 blk-stat: fix blk_stat_sum() if all samples are batched We need to flush the batch _before_ we check the number of samples, otherwise we'll miss all of the batched samples. Fixes: cf43e6b ("block: add scalable completion tracking of requests") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 181302dc7239add8ab1449c23ecab193f52ee6ab Author: Johan Hovold Date: Mon Mar 13 13:40:22 2017 +0100 mmc: ushc: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: 53f3a9e26ed5 ("mmc: USB SD Host Controller (USHC) driver") Cc: stable # 2.6.37 Cc: David Vrabel Signed-off-by: Johan Hovold Signed-off-by: Ulf Hansson drivers/mmc/host/ushc.c | 3 +++ 1 file changed, 3 insertions(+) commit 2ce0c7b65505e0d915e99389cced45b478dc935d Author: Romain Izard Date: Thu Mar 9 16:18:20 2017 +0100 mmc: sdhci-of-at91: Support external regulators The SDHCI controller in the SAMA5D2 chip requires a valid voltage set in the power control register, otherwise commands will fail with a timeout error. When using the regulator framework to specify the regulator used by the mmc device, the voltage is not configured, and it is not possible to use the connected device. Implement a custom 'set_power' function for this specific hardware, that configures the voltage in the register in all cases. Signed-off-by: Romain Izard Acked-by: Ludovic Desroches Cc: stable@vger.kernel.org #4.9+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8bcd37d8b21de13d068414c018c9599281294a01 Author: Winkler, Tomas Date: Thu Mar 9 16:58:21 2017 +0200 mmc: core: mmc_blk_rw_cmd_err - remove unused variable Fix compilation warning: drivers/mmc/core/block.c:1563:24: warning: variable ‘mq_rq’ set but not used [-Wunused-but-set-variable] struct mmc_queue_req *mq_rq; Signed-off-by: Tomas Winkler Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 --- 1 file changed, 3 deletions(-) commit 763811987d5088d0461164f80e9d16869847a040 Author: Bard Liao Date: Thu Mar 16 13:58:40 2017 +0800 ASoC: rt5665: fix define of RT5665_HP_DRIVER_5X It is (0x3 << 2), not (0x2 << 2). Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9986943ef5d61a9bea3c86000d91d3b789f0060e Author: Kuninori Morimoto Date: Thu Mar 16 04:22:09 2017 +0000 ASoC: rcar: dma: remove unnecessary "volatile" commit 2a3af642eb20("ASoC: rcar: clear DE bit only in PDMACHCR...") added rsnd_dmapp_bset(), but it used copy-paste. Thus, it had unnecessary "volatile", and had below warning on x86. This patch fix it. sound/soc/sh/rcar/dma.c: In function 'rsnd_dmapp_bset': >> sound/soc/sh/rcar/dma.c:463:21: warning: passing argument 1 of \ 'ioread32' discards 'volatile' qualifier from pointer target \ type [-Wdiscarded-qualifiers] u32 val = ioread32(addr); ^~~~ In file included from arch/x86/include/asm/io.h:203:0, from arch/x86/include/asm/realmode.h:5, from arch/x86/include/asm/acpi.h:33, from arch/x86/include/asm/fixmap.h:19, from arch/x86/include/asm/apic.h:10, from arch/x86/include/asm/smp.h:12, from include/linux/smp.h:59, from include/linux/topology.h:33, from include/linux/gfp.h:8, from include/linux/idr.h:16, from include/linux/kernfs.h:14, from include/linux/sysfs.h:15, from include/linux/kobject.h:21, from include/linux/of.h:21, from include/linux/of_dma.h:16, from sound/soc/sh/rcar/dma.c:12: include/asm-generic/iomap.h:31:21: note: expected 'void *' \ but argument is of type 'volatile void *' extern unsigned int ioread32(void __iomem *); ^~~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60a970a6c58dedb4c6b2d90b75f8d6ad7c7b34dc Author: Huang Rui Date: Wed Mar 15 10:13:32 2017 +0800 drm/amdgpu: fix the clearing wb size The clearing wb size should be the one that it is assigned. Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e11ddff68a7c455e63c4b46154a3e75c699a7b55 Author: Alex Deucher Date: Wed Mar 15 21:13:25 2017 -0400 drm/amdgpu: reinstate oland workaround for sclk Higher sclks seem to be unstable on some boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=100222 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 66822d815ae61ecb2d9dba9031517e8a8476969d Author: Alex Deucher Date: Wed Mar 15 21:11:46 2017 -0400 drm/radeon: reinstate oland workaround for sclk Higher sclks seem to be unstable on some boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=100222 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f1a880a93baaadb14c10a348fd199f1cdb6bcccd Author: Sami Tolvanen Date: Wed Mar 15 15:12:23 2017 -0700 dm verity fec: limit error correction recursion If the hash tree itself is sufficiently corrupt in addition to data blocks, it's possible for error correction to end up in a deep recursive loop, which eventually causes a kernel panic. This change limits the recursion to a reasonable level during a single I/O operation. Fixes: a739ff3f543a ("dm verity: add support for forward error correction") Signed-off-by: Sami Tolvanen Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org # v4.5+ drivers/md/dm-verity-fec.c | 12 +++++++++++- drivers/md/dm-verity-fec.h | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit d8a8cfc76919b6c830305266b23ba671623f37ff Author: Peter Zijlstra Date: Thu Mar 16 13:47:51 2017 +0100 perf/core: Better explain the inherit magic While going through the event inheritance code Oleg got confused. Add some comments to better explain the silent dissapearance of orphaned events. So what happens is that at perf_event_release_kernel() time; when an event looses its connection to userspace (and ceases to exist from the user's perspective) we can still have an arbitrary amount of inherited copies of the event. We want to synchronously find and remove all these child events. Since that requires a bit of lock juggling, there is the possibility that concurrent clone()s will create new child events. Therefore we first mark the parent event as DEAD, which marks all the extant child events as orphaned. We then avoid copying orphaned events; in order to avoid getting more of them. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Dmitry Vyukov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: fweisbec@gmail.com Link: http://lkml.kernel.org/r/20170316125823.289567442@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) commit 15121c789e001168decac6483d192bdb7ea29e74 Author: Peter Zijlstra Date: Thu Mar 16 13:47:50 2017 +0100 perf/core: Simplify perf_event_free_task() We have ctx->event_list that contains all events; no need to repeatedly iterate the group lists to find them all. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Dmitry Vyukov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: fweisbec@gmail.com Link: http://lkml.kernel.org/r/20170316125823.239678244@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit e7cc4865f0f31698ef2f7aac01a50e78968985b7 Author: Peter Zijlstra Date: Thu Mar 16 13:47:49 2017 +0100 perf/core: Fix event inheritance on fork() While hunting for clues to a use-after-free, Oleg spotted that perf_event_init_context() can loose an error value with the result that fork() can succeed even though we did not fully inherit the perf event context. Spotted-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Dmitry Vyukov Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: oleg@redhat.com Cc: stable@vger.kernel.org Fixes: 889ff0150661 ("perf/core: Split context's event group list into pinned and non-pinned lists") Link: http://lkml.kernel.org/r/20170316125823.190342547@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e552a8389aa409e257b7dcba74f67f128f979ccc Author: Peter Zijlstra Date: Thu Mar 16 13:47:48 2017 +0100 perf/core: Fix use-after-free in perf_release() Dmitry reported syzcaller tripped a use-after-free in perf_release(). After much puzzlement Oleg spotted the below scenario: Task1 Task2 fork() perf_event_init_task() /* ... */ goto bad_fork_$foo; /* ... */ perf_event_free_task() mutex_lock(ctx->lock) perf_free_event(B) perf_event_release_kernel(A) mutex_lock(A->child_mutex) list_for_each_entry(child, ...) { /* child == B */ ctx = B->ctx; get_ctx(ctx); mutex_unlock(A->child_mutex); mutex_lock(A->child_mutex) list_del_init(B->child_list) mutex_unlock(A->child_mutex) /* ... */ mutex_unlock(ctx->lock); put_ctx() /* >0 */ free_task(); mutex_lock(ctx->lock); mutex_lock(A->child_mutex); /* ... */ mutex_unlock(A->child_mutex); mutex_unlock(ctx->lock) put_ctx() /* 0 */ ctx->task && !TOMBSTONE put_task_struct() /* UAF */ This patch closes the hole by making perf_event_free_task() destroy the task <-> ctx relation such that perf_event_release_kernel() will no longer observe the now dead task. Spotted-by: Oleg Nesterov Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: fweisbec@gmail.com Cc: oleg@redhat.com Cc: stable@vger.kernel.org Fixes: c6e5b73242d2 ("perf: Synchronously clean up child events") Link: http://lkml.kernel.org/r/20170314155949.GE32474@worktop Link: http://lkml.kernel.org/r/20170316125823.140295131@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 40ceda09c8c84694c2ca6b00bcc6dc71e8e62d96 Author: yong mao Date: Sat Mar 4 15:10:03 2017 +0800 mmc: mediatek: Fixed bug where clock frequency could be set wrong This patch can fix two issues: Issue 1: In previous code, div may be overflow when setting clock frequency as f_min. We can use DIV_ROUND_UP to fix this boundary related issue. Issue 2: In previous code, we can not set the correct clock frequency when div equals 0xff. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing Reviewed-by: Daniel Kurtz Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c71ad17f97e84d6d7e11a8e193d5d96890ed2ed Author: Tony Luck Date: Thu Mar 9 01:45:39 2017 +0800 EDAC, pnd2_edac: Add new EDAC driver for Intel SoC platforms Initial target for this driver is the Intel Apollo Lake platform and Denverton micro-server, they use the same internal memory controller IP called Pondicherry2. Memory controller registers are not in PCI config space like earlier Intel memory controllers. For Apollo Lake platform they are accessed via a "side-band" interface, for Denverton micro-server they are access via PCI config space and memory map I/O. This driver is for Apollo Lake and Denverton, but only the Denverton is fully enabled while we wait for the sideband driver. Apollo lake driver and initial cut at Denverton driver by Tony Luck. Extensive cleanup, refactoring and basic verification by Qiuxu Zhuo. Signed-off-by: Tony Luck Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170308174539.14432-1-qiuxu.zhuo@intel.com Signed-off-by: Borislav Petkov MAINTAINERS | 6 + drivers/edac/Kconfig | 9 + drivers/edac/Makefile | 1 + drivers/edac/pnd2_edac.c | 1542 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/pnd2_edac.h | 301 +++++++++ 5 files changed, 1859 insertions(+) commit f717629c7f834ab2efa05c7dbf0826f1d7c32ade Author: Chandan Rajendra Date: Thu Mar 16 14:37:11 2017 +0530 powerpc: Wire up statx() syscall Test runs on a ppc64 BE guest succeeded. linux/samples/statx/test-statx program was executed on the following file types, 1. Regular file 2. Directory 3. device file 4. symlink 5. Named pipe The test run also included invoking test-statx with the runtime options provided in the main() function of test-statx.c Signed-off-by: Chandan Rajendra Signed-off-by: Michael Ellerman arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/unistd.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 8c75704ebcac2ffa31ee7bcc359baf701b52bf00 Author: Prarit Bhargava Date: Tue Mar 14 07:36:02 2017 -0400 hwrng: geode - Revert managed API changes After commit e9afc746299d ("hwrng: geode - Use linux/io.h instead of asm/io.h") the geode-rng driver uses devres with pci_dev->dev to keep track of resources, but does not actually register a PCI driver. This results in the following issues: 1. The driver leaks memory because the driver does not attach to a device. The driver only uses the PCI device as a reference. devm_*() functions will release resources on driver detach, which the geode-rng driver will never do. As a result, 2. The driver cannot be reloaded because there is always a use of the ioport and region after the first load of the driver. Revert the changes made by e9afc746299d ("hwrng: geode - Use linux/io.h instead of asm/io.h"). Cc: Signed-off-by: Prarit Bhargava Fixes: 6e9b5e76882c ("hwrng: geode - Migrate to managed API") Cc: Matt Mackall Cc: Corentin LABBE Cc: PrasannaKumar Muralidharan Cc: Wei Yongjun Cc: linux-crypto@vger.kernel.org Cc: linux-geode@lists.infradead.org Signed-off-by: Herbert Xu drivers/char/hw_random/geode-rng.c | 50 ++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 15 deletions(-) commit 69db7009318758769d625b023402161c750f7876 Author: Prarit Bhargava Date: Tue Mar 14 07:36:01 2017 -0400 hwrng: amd - Revert managed API changes After commit 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"), the amd-rng driver uses devres with pci_dev->dev to keep track of resources, but does not actually register a PCI driver. This results in the following issues: 1. The message WARNING: CPU: 2 PID: 621 at drivers/base/dd.c:349 driver_probe_device+0x38c is output when the i2c_amd756 driver loads and attempts to register a PCI driver. The PCI & device subsystems assume that no resources have been registered for the device, and the WARN_ON() triggers since amd-rng has already do so. 2. The driver leaks memory because the driver does not attach to a device. The driver only uses the PCI device as a reference. devm_*() functions will release resources on driver detach, which the amd-rng driver will never do. As a result, 3. The driver cannot be reloaded because there is always a use of the ioport and region after the first load of the driver. Revert the changes made by 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"). Cc: Signed-off-by: Prarit Bhargava Fixes: 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"). Cc: Matt Mackall Cc: Corentin LABBE Cc: PrasannaKumar Muralidharan Cc: Wei Yongjun Cc: linux-crypto@vger.kernel.org Cc: linux-geode@lists.infradead.org Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 42 ++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) commit 7c468447f40645fbf2a033dfdaa92b1957130d50 Author: Gary R Hook Date: Fri Mar 10 12:28:18 2017 -0600 crypto: ccp - Assign DMA commands to the channel's CCP The CCP driver generally uses a round-robin approach when assigning operations to available CCPs. For the DMA engine, however, the DMA mappings of the SGs are associated with a specific CCP. When an IOMMU is enabled, the IOMMU is programmed based on this specific device. If the DMA operations are not performed by that specific CCP then addressing errors and I/O page faults will occur. Update the CCP driver to allow a specific CCP device to be requested for an operation and use this in the DMA engine support. Cc: # 4.9.x- Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 5 ++++- drivers/crypto/ccp/ccp-dmaengine.c | 1 + include/linux/ccp.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit ea90e0dc8cecba6359b481e24d9c37160f6f524f Author: Johannes Berg Date: Wed Mar 15 14:26:04 2017 +0100 nl80211: fix dumpit error path RTNL deadlocks Sowmini pointed out Dmitry's RTNL deadlock report to me, and it turns out to be perfectly accurate - there are various error paths that miss unlock of the RTNL. To fix those, change the locking a bit to not be conditional in all those nl80211_prepare_*_dump() functions, but make those require the RTNL to start with, and fix the buggy error paths. This also let me use sparse (by appropriately overriding the rtnl_lock/rtnl_unlock functions) to validate the changes. Cc: stable@vger.kernel.org Reported-by: Sowmini Varadhan Reported-by: Dmitry Vyukov Signed-off-by: Johannes Berg net/wireless/nl80211.c | 127 ++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 71 deletions(-) commit 2317d5f1c34913bac5971d93d69fb6c31bb74670 Author: Steven Rostedt (VMware) Date: Thu Mar 2 15:10:59 2017 +0100 sched/deadline: Use deadline instead of period when calculating overflow I was testing Daniel's changes with his test case, and tweaked it a little. Instead of having the runtime equal to the deadline, I increased the deadline ten fold. Daniel's test case had: attr.sched_runtime = 2 * 1000 * 1000; /* 2 ms */ attr.sched_deadline = 2 * 1000 * 1000; /* 2 ms */ attr.sched_period = 2 * 1000 * 1000 * 1000; /* 2 s */ To make it more interesting, I changed it to: attr.sched_runtime = 2 * 1000 * 1000; /* 2 ms */ attr.sched_deadline = 20 * 1000 * 1000; /* 20 ms */ attr.sched_period = 2 * 1000 * 1000 * 1000; /* 2 s */ The results were rather surprising. The behavior that Daniel's patch was fixing came back. The task started using much more than .1% of the CPU. More like 20%. Looking into this I found that it was due to the dl_entity_overflow() constantly returning true. That's because it uses the relative period against relative runtime vs the absolute deadline against absolute runtime. runtime / (deadline - t) > dl_runtime / dl_period There's even a comment mentioning this, and saying that when relative deadline equals relative period, that the equation is the same as using deadline instead of period. That comment is backwards! What we really want is: runtime / (deadline - t) > dl_runtime / dl_deadline We care about if the runtime can make its deadline, not its period. And then we can say "when the deadline equals the period, the equation is the same as using dl_period instead of dl_deadline". After correcting this, now when the task gets enqueued, it can throttle correctly, and Daniel's fix to the throttling of sleeping deadline tasks works even when the runtime and deadline are not the same. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Romulo Silva de Oliveira Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/02135a27f1ae3fe5fd032568a5a2f370e190e8d7.1488392936.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit df8eac8cafce7d086be3bd5cf5a838fa37594dfb Author: Daniel Bristot de Oliveira Date: Thu Mar 2 15:10:58 2017 +0100 sched/deadline: Throttle a constrained deadline task activated after the deadline During the activation, CBS checks if it can reuse the current task's runtime and period. If the deadline of the task is in the past, CBS cannot use the runtime, and so it replenishes the task. This rule works fine for implicit deadline tasks (deadline == period), and the CBS was designed for implicit deadline tasks. However, a task with constrained deadline (deadine < period) might be awakened after the deadline, but before the next period. In this case, replenishing the task would allow it to run for runtime / deadline. As in this case deadline < period, CBS enables a task to run for more than the runtime / period. In a very loaded system, this can cause a domino effect, making other tasks miss their deadlines. To avoid this problem, in the activation of a constrained deadline task after the deadline but before the next period, throttle the task and set the replenishing timer to the begin of the next period, unless it is boosted. Reproducer: --------------- %< --------------- int main (int argc, char **argv) { int ret; int flags = 0; unsigned long l = 0; struct timespec ts; struct sched_attr attr; memset(&attr, 0, sizeof(attr)); attr.size = sizeof(attr); attr.sched_policy = SCHED_DEADLINE; attr.sched_runtime = 2 * 1000 * 1000; /* 2 ms */ attr.sched_deadline = 2 * 1000 * 1000; /* 2 ms */ attr.sched_period = 2 * 1000 * 1000 * 1000; /* 2 s */ ts.tv_sec = 0; ts.tv_nsec = 2000 * 1000; /* 2 ms */ ret = sched_setattr(0, &attr, flags); if (ret < 0) { perror("sched_setattr"); exit(-1); } for(;;) { /* XXX: you may need to adjust the loop */ for (l = 0; l < 150000; l++); /* * The ideia is to go to sleep right before the deadline * and then wake up before the next period to receive * a new replenishment. */ nanosleep(&ts, NULL); } exit(0); } --------------- >% --------------- On my box, this reproducer uses almost 50% of the CPU time, which is obviously wrong for a task with 2/2000 reservation. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Romulo Silva de Oliveira Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/edf58354e01db46bf42df8d2dd32418833f68c89.1488392936.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 5ac69d37784b237707a7b15d199cdb6c6fdb6780 Author: Daniel Bristot de Oliveira Date: Thu Mar 2 15:10:57 2017 +0100 sched/deadline: Make sure the replenishment timer fires in the next period Currently, the replenishment timer is set to fire at the deadline of a task. Although that works for implicit deadline tasks because the deadline is equals to the begin of the next period, that is not correct for constrained deadline tasks (deadline < period). For instance: f.c: --------------- %< --------------- int main (void) { for(;;); } --------------- >% --------------- # gcc -o f f.c # trace-cmd record -e sched:sched_switch \ -e syscalls:sys_exit_sched_setattr \ chrt -d --sched-runtime 490000000 \ --sched-deadline 500000000 \ --sched-period 1000000000 0 ./f # trace-cmd report | grep "{pid of ./f}" After setting parameters, the task is replenished and continue running until being throttled: f-11295 [003] 13322.113776: sys_exit_sched_setattr: 0x0 The task is throttled after running 492318 ms, as expected: f-11295 [003] 13322.606094: sched_switch: f:11295 [-1] R ==> watchdog/3:32 [0] But then, the task is replenished 500719 ms after the first replenishment: -0 [003] 13322.614495: sched_switch: swapper/3:0 [120] R ==> f:11295 [-1] Running for 490277 ms: f-11295 [003] 13323.104772: sched_switch: f:11295 [-1] R ==> swapper/3:0 [120] Hence, in the first period, the task runs 2 * runtime, and that is a bug. During the first replenishment, the next deadline is set one period away. So the runtime / period starts to be respected. However, as the second replenishment took place in the wrong instant, the next replenishment will also be held in a wrong instant of time. Rather than occurring in the nth period away from the first activation, it is taking place in the (nth period - relative deadline). Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Luca Abeni Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Romulo Silva de Oliveira Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/ac50d89887c25285b47465638354b63362f8adff.1488392936.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c3423563c68fc454b805b46cb69fd4816db933e2 Author: Christoph Hellwig Date: Fri Mar 3 07:58:06 2017 -0700 vmw_vmci: handle the return value from pci_alloc_irq_vectors correctly It returns the number of vectors allocated when successful, so check for a negative error only. Fixes: 3bb434cd ("vmw_vmci: switch to pci_irq_alloc_vectors") Signed-off-by: Christoph Hellwig Reported-by: Loïc Yhuel Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_guest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a69645dde1188723d80745c1bc6ee9af2cbe2a7 Author: Sudip Mukherjee Date: Mon Mar 6 23:23:43 2017 +0000 ppdev: fix registering same device name Usually every parallel port will have a single pardev registered with it. But ppdev driver is an exception. This userspace parallel port driver allows to create multiple parrallel port devices for a single parallel port. And as a result we were having a big warning like: "sysfs: cannot create duplicate filename '/devices/parport0/ppdev0.0'". And with that many parallel port printers stopped working. We have been using the minor number as the id field while registering a parralel port device with a parralel port. But when there are multiple parrallel port device for one single parallel port, they all tried to register with the same name like 'pardev0.0' and everything started failing. Use an incremented index as the id instead of the minor number. Fixes: 8b7d3a9d903e ("ppdev: use new parport device model") Cc: stable # v4.9+ Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1414656 Bugzilla: https://bugs.archlinux.org/task/52322 Tested-by: James Feeney Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/char/ppdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 03270c6ac6207fc55bbf9d20d195029dca210c79 Author: Sudip Mukherjee Date: Mon Mar 6 23:23:42 2017 +0000 parport: fix attempt to write duplicate procfiles Usually every parallel port will have a single pardev registered with it. But ppdev driver is an exception. This userspace parallel port driver allows to create multiple parrallel port devices for a single parallel port. And as a result we were having a nice warning like: "sysctl table check failed: /dev/parport/parport0/devices/ppdev0/timeslice Sysctl already exists" Use the same logic as used in parport_register_device() and register the proc files only once for each parallel port. Fixes: 6fa45a226897 ("parport: add device-model to parport subsystem") Cc: stable # v4.4+ Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1414656 Bugzilla: https://bugs.archlinux.org/task/52322 Tested-by: James Feeney Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/share.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 17fcbd590d0c3e35bd9646e2215f86586378bc42 Author: Niklas Cassel Date: Sat Feb 25 01:17:53 2017 +0100 locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y We hang if SIGKILL has been sent, but the task is stuck in down_read() (after do_exit()), even though no task is doing down_write() on the rwsem in question: INFO: task libupnp:21868 blocked for more than 120 seconds. libupnp D 0 21868 1 0x08100008 ... Call Trace: __schedule() schedule() __down_read() do_exit() do_group_exit() __wake_up_parent() This bug has already been fixed for CONFIG_RWSEM_XCHGADD_ALGORITHM=y in the following commit: 04cafed7fc19 ("locking/rwsem: Fix down_write_killable()") ... however, this bug also exists for CONFIG_RWSEM_GENERIC_SPINLOCK=y. Signed-off-by: Niklas Cassel Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Andrew Morton Cc: Linus Torvalds Cc: Niklas Cassel Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d47996082f52 ("locking/rwsem: Introduce basis for down_write_killable()") Link: http://lkml.kernel.org/r/1487981873-12649-1-git-send-email-niklass@axis.com Signed-off-by: Ingo Molnar kernel/locking/rwsem-spinlock.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit caeb5882979bc6f3c8766fcf59c6269b38f521bc Author: Matt Fleming Date: Fri Feb 17 12:07:31 2017 +0000 sched/loadavg: Use {READ,WRITE}_ONCE() for sample window 'calc_load_update' is accessed without any kind of locking and there's a clear assumption in the code that only a single value is read or written. Make this explicit by using READ_ONCE() and WRITE_ONCE(), and avoid unintentionally seeing multiple values, or having the load/stores split. Technically the loads in calc_global_*() don't require this since those are the only functions that update 'calc_load_update', but I've added the READ_ONCE() for consistency. Suggested-by: Peter Zijlstra Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20170217120731.11868-3-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/loadavg.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 6e5f32f7a43f45ee55c401c0b9585eb01f9629a8 Author: Matt Fleming Date: Fri Feb 17 12:07:30 2017 +0000 sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting If we crossed a sample window while in NO_HZ we will add LOAD_FREQ to the pending sample window time on exit, setting the next update not one window into the future, but two. This situation on exiting NO_HZ is described by: this_rq->calc_load_update < jiffies < calc_load_update In this scenario, what we should be doing is: this_rq->calc_load_update = calc_load_update [ next window ] But what we actually do is: this_rq->calc_load_update = calc_load_update + LOAD_FREQ [ next+1 window ] This has the effect of delaying load average updates for potentially up to ~9seconds. This can result in huge spikes in the load average values due to per-cpu uninterruptible task counts being out of sync when accumulated across all CPUs. It's safe to update the per-cpu active count if we wake between sample windows because any load that we left in 'calc_load_idle' will have been zero'd when the idle load was folded in calc_global_load(). This issue is easy to reproduce before, commit 9d89c257dfb9 ("sched/fair: Rewrite runnable load and utilization average tracking") just by forking short-lived process pipelines built from ps(1) and grep(1) in a loop. I'm unable to reproduce the spikes after that commit, but the bug still seems to be present from code review. Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Fixes: commit 5167e8d ("sched/nohz: Rewrite and fix load-avg computation -- again") Link: http://lkml.kernel.org/r/20170217120731.11868-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/loadavg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcc3b5ffe1b32771c9a22e2c916fb94c4fcf5b79 Author: Wanpeng Li Date: Mon Mar 6 21:51:28 2017 -0800 sched/deadline: Add missing update_rq_clock() in dl_task_timer() The following warning can be triggered by hot-unplugging the CPU on which an active SCHED_DEADLINE task is running on: ------------[ cut here ]------------ WARNING: CPU: 7 PID: 0 at kernel/sched/sched.h:833 replenish_dl_entity+0x71e/0xc40 rq->clock_update_flags < RQCF_ACT_SKIP CPU: 7 PID: 0 Comm: swapper/7 Tainted: G B 4.11.0-rc1+ #24 Hardware name: LENOVO ThinkCentre M8500t-N000/SHARKBAY, BIOS FBKTC1AUS 02/16/2016 Call Trace: dump_stack+0x85/0xc4 __warn+0x172/0x1b0 warn_slowpath_fmt+0xb4/0xf0 ? __warn+0x1b0/0x1b0 ? debug_check_no_locks_freed+0x2c0/0x2c0 ? cpudl_set+0x3d/0x2b0 replenish_dl_entity+0x71e/0xc40 enqueue_task_dl+0x2ea/0x12e0 ? dl_task_timer+0x777/0x990 ? __hrtimer_run_queues+0x270/0xa50 dl_task_timer+0x316/0x990 ? enqueue_task_dl+0x12e0/0x12e0 ? enqueue_task_dl+0x12e0/0x12e0 __hrtimer_run_queues+0x270/0xa50 ? hrtimer_cancel+0x20/0x20 ? hrtimer_interrupt+0x119/0x600 hrtimer_interrupt+0x19c/0x600 ? trace_hardirqs_off+0xd/0x10 local_apic_timer_interrupt+0x74/0xe0 smp_apic_timer_interrupt+0x76/0xa0 apic_timer_interrupt+0x93/0xa0 The DL task will be migrated to a suitable later deadline rq once the DL timer fires and currnet rq is offline. The rq clock of the new rq should be updated. This patch fixes it by updating the rq clock after holding the new rq's rq lock. Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Matt Fleming Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1488865888-15894-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 1 + 1 file changed, 1 insertion(+) commit 6bce725a78de1b171928ce66dec2bae4b569e5d1 Author: Tobias Klauser Date: Wed Mar 8 14:30:34 2017 +0100 x86/mpx: Make unnecessarily global function static Make the function get_user_bd_entry() static as it is not used outside of arch/x86/mm/mpx.c This fixes a sparse warning. Signed-off-by: Tobias Klauser Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/mpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf8c44d42c4f4f38468a53e9ce2a0314e7ebeaa1 Author: Amitkumar Karwar Date: Tue Feb 28 18:54:31 2017 +0530 MAINTAINERS: update for mwifiex driver maintainers Ganapathi & Xinming are starting to take a more active role in the mwifiex driver maintainership here onwards on account of organizational changes. CC: Xinming Hu CC: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Nishant Sarmukadam Signed-off-by: Cathy Luo Signed-off-by: Kalle Valo MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 36908c4e5b1063eff3e11336fab544a76c625b69 Author: Brian Norris Date: Fri Mar 10 17:39:23 2017 -0800 mwifiex: uninit wakeup info when removing device We manually init wakeup info, but we don't detach it on device removal. This means that if we (for example) rmmod + modprobe the driver, the device framework might return -EEXIST the second time, and we'll complain in the logs: [ 839.311881] mwifiex_pcie 0000:01:00.0: fail to init wakeup for mwifiex AFAICT, there's no other negative effect. But we can fix this by disabling wakeup on remove, similar to what a few other drivers do (e.g., the power supply framework). This code (and bug) has existed on SDIO for a while, but it got moved around and enabled for PCIe with commit 853402a00823 ("mwifiex: Enable WoWLAN for both sdio and pcie"). Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 3 +++ 1 file changed, 3 insertions(+) commit ba1c7e45ec224cc8d2df33ecaee1946d48e79231 Author: Brian Norris Date: Fri Mar 10 17:39:22 2017 -0800 mwifiex: set adapter->dev before starting to use mwifiex_dbg() The mwifiex_dbg() log handler utilizes the struct device in adapter->dev. Without it, it decides not to print anything. As of commit 2e02b5814217 ("mwifiex: Allow mwifiex early access to device structure"), we started assigning that pointer only after we finished mwifiex_register() -- this effectively neuters any mwifiex_dbg() logging done before this point. Let's move the device assignment into mwifiex_register(). Fixes: 2e02b5814217 ("mwifiex: Allow mwifiex early access to device structure") Cc: Rajat Jain Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4e841d3eb9294ce4137fdb5d0a88f1bceab9c212 Author: Brian Norris Date: Fri Mar 10 17:39:21 2017 -0800 mwifiex: pcie: don't leak DMA buffers when removing When PCIe FLR support was added, much of the remove/release code for PCIe was migrated to ->down_dev(), but ->down_dev() is never called for device removal. Let's refactor the cleanup to be done in both cases. Also, drop the comments above mwifiex_cleanup_pcie(), because they were clearly wrong, and it's better to have clear and obvious code than to detail the code steps in comments anyway. Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Cc: Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit abda288bb207e5c681306299126af8c022709c18 Author: Dmitry Torokhov Date: Sun Feb 19 16:33:35 2017 -0800 auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches The OF device table must be terminated, otherwise we'll be walking past it and into areas unknown. Fixes: 0cad855fbd08 ("auxdisplay: img-ascii-lcd: driver for simple ASCII...") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Tested-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/img-ascii-lcd.c | 1 + 1 file changed, 1 insertion(+) commit b7048ea12fbb2724ee0cd30752d4fac43cab0651 Author: Ville Syrjälä Date: Wed Mar 15 16:31:58 2017 +0200 drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks Currently ILK-BDW explicitly disable LP1+ watermarks from their .init_clock_gating() hooks. Unfortunately that hook gets called way too late since by that time we've already initialized all the watermark state tracking which then gets out of sync with the hardware state. We may eventually want to consider killing off the explicit LP1+ disable from .init_clock_gating(). In the meantime however, we can avoid the problem by reordering the init sequence such that intel_modeset_init_hw()->intel_init_clock_gating() gets called prior to the hardware state takeover. I suppose prior to the two stage watermark programming we were magically saved by something that forced the watermarks to be reprogrammed fully after .init_clock_gating() got called. But now that no longer happens. Note that the diff might look a bit odd as it kills off one call of intel_update_cdclk(), but that's fine because intel_modeset_init_hw() does the exact same thing. Previously we just did it twice. Actually even this new init sequence is pretty bogus as .init_clock_gating() really should be called before any gem hardware init since it can configure various clock gating workarounds and whatnot that affect the GT side as well. Also intel_modeset_init() really should get split up into better defined init stages. Another "fun" detail is that intel_modeset_gem_init() is where RPS/RC6 gets configured. Why that is done from the display code is beyond me. I've decided to leave all this be for now, and just try to fix the init sequence enough for watermarks to work. Cc: stable@vger.kernel.org Cc: Gabriele Mazzotta Cc: David Purton Cc: Matt Roper Cc: Maarten Lankhorst Reported-by: Gabriele Mazzotta Reported-by: David Purton Tested-by: Gabriele Mazzotta Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96645 Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170220140443.30891-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170315143158.31780-1-ville.syrjala@linux.intel.com (cherry picked from commit 5be6e33400992d3450e1c8234a5af353e1560580) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9a3fcf912ef7f5c6e18f9af6875dd13f7311f7aa Author: Sara Sharon Date: Tue Mar 14 09:50:35 2017 +0200 iwlwifi: mvm: cleanup pending frames in DQA mode When a station is asleep, the fw will set it as "asleep". All queues that are used only by one station will be stopped by the fw. In pre-DQA mode this was relevant for aggregation queues. However, in DQA mode a queue is owned by one station only, so all queues will be stopped. As a result, we don't expect to get filtered frames back to mac80211 and don't have to maintain the entire pending_frames state logic, the same way as we do in aggregations. The correct behavior is to align DQA behavior with the aggregation queue behaviour pre-DQA: - Don't count pending frames. - Let mac80211 know we have frames in these queues so that it can properly handle trigger frames. When a trigger frame is received, mac80211 tells the driver to send frames from the queues using release_buffered_frames. The driver will tell the fw to let frames out even if the station is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count. Reported-and-tested-by: Jens Axboe Reported-by: Linus Torvalds Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 +++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 41 ++++++++++------------- 4 files changed, 28 insertions(+), 31 deletions(-) commit 5e030d5ce9d99a899b648413139ff65bab12b038 Author: K. Y. Srinivasan Date: Sun Mar 12 20:00:30 2017 -0700 Drivers: hv: vmbus: Don't leak memory when a channel is rescinded When we close a channel that has been rescinded, we will leak memory since vmbus_teardown_gpadl() returns an error. Fix this so that we can properly cleanup the memory allocated to the ring buffers. Fixes: ccb61f8a99e6 ("Drivers: hv: vmbus: Fix a rescind handling bug") Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 9a5476020a5f06a0fc6f17097efc80275d2f03cd Author: K. Y. Srinivasan Date: Mon Mar 13 15:57:09 2017 -0700 Drivers: hv: vmbus: Don't leak channel ids If we cannot allocate memory for the channel, free the relid associated with the channel. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 1 + 1 file changed, 1 insertion(+) commit 5a16dfc855127906fcd2935fb039bc8989313915 Author: Dexuan Cui Date: Sat Mar 4 18:14:00 2017 -0700 Drivers: hv: util: don't forget to init host_ts.lock Without the patch, I always get a "BUG: spinlock bad magic" warning. Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source") Signed-off-by: Dexuan Cui Cc: Vitaly Kuznetsov Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 2 ++ 1 file changed, 2 insertions(+) commit e9c18ae6eb2b312f16c63e34b43ea23926daa398 Author: Vitaly Kuznetsov Date: Sat Mar 4 18:13:59 2017 -0700 Drivers: hv: util: move waiting for release to hv_utils_transport itself Waiting for release_event in all three drivers introduced issues on release as on_reset() hook is not always called. E.g. if the device was never opened we will never get the completion. Move the waiting code to hvutil_transport_destroy() and make sure it is only called when the device is open. hvt->lock serialization should guarantee the absence of races. Fixes: 5a66fecbf6aa ("Drivers: hv: util: kvp: Fix a rescind processing issue") Fixes: 20951c7535b5 ("Drivers: hv: util: Fcopy: Fix a rescind processing issue") Fixes: d77044d142e9 ("Drivers: hv: util: Backup: Fix a rescind processing issue") Reported-by: Dexuan Cui Tested-by: Dexuan Cui Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_fcopy.c | 4 ---- drivers/hv/hv_kvp.c | 4 ---- drivers/hv/hv_snapshot.c | 4 ---- drivers/hv/hv_utils_transport.c | 12 ++++++++---- drivers/hv/hv_utils_transport.h | 1 + 5 files changed, 9 insertions(+), 16 deletions(-) commit dad72a1d28442b03aac86836a42de2d00a1014ab Author: Dexuan Cui Date: Sat Mar 4 18:13:58 2017 -0700 vmbus: remove hv_event_tasklet_disable/enable With the recent introduction of per-channel tasklet, we need to update the way we handle the 3 concurrency issues: 1. hv_process_channel_removal -> percpu_channel_deq vs. vmbus_chan_sched -> list_for_each_entry(..., percpu_list); 2. vmbus_process_offer -> percpu_channel_enq/deq vs. vmbus_chan_sched. 3. vmbus_close_internal vs. the per-channel tasklet vmbus_on_event; The first 2 issues can be handled by Stephen's recent patch "vmbus: use rcu for per-cpu channel list", and the third issue can be handled by calling tasklet_disable in vmbus_close_internal here. We don't need the original hv_event_tasklet_disable/enable since we now use per-channel tasklet instead of the previous per-CPU tasklet, and actually we must remove them due to the side effect now: vmbus_process_offer -> hv_event_tasklet_enable -> tasklet_schedule will start the per-channel callback prematurely, cauing NULL dereferencing (the channel may haven't been properly configured to run the callback yet). Fixes: 631e63a9f346 ("vmbus: change to per channel tasklet") Signed-off-by: Dexuan Cui Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Tested-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 12 ++++-------- drivers/hv/channel_mgmt.c | 19 ------------------- include/linux/hyperv.h | 3 --- 3 files changed, 4 insertions(+), 30 deletions(-) commit 8200f2085abe7f29a016381f3122000cc7b2a760 Author: Stephen Hemminger Date: Sat Mar 4 18:13:57 2017 -0700 vmbus: use rcu for per-cpu channel list The per-cpu channel list is now referred to in the interrupt routine. This is mostly safe since the host will not normally generate an interrupt when channel is being deleted but if it did then there would be a use after free problem. To solve, this use RCU protection on ther per-cpu list. Fixes: 631e63a9f346 ("vmbus: change to per channel tasklet") Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 7 ++++--- drivers/hv/vmbus_drv.c | 6 +++++- include/linux/hyperv.h | 7 +++++++ 3 files changed, 16 insertions(+), 4 deletions(-) commit c6240cacdb2c3cb56a21fb3ea0c105154ab87a2a Author: Alexander Usyskin Date: Sun Mar 5 21:40:42 2017 +0200 mei: don't wait for os version message reply The driver still struggles with firmwares that do not replay to the OS version request. It is safe not waiting for the replay. First, the driver doesn't do anything with the replay second the connection is closed immediately, hence the packet will be just safely discarded in case it is received and last the driver won't get stuck if the firmware won't reply. Cc: #4.10+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus-fixup.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit a733ded50b6ea846200073e7381a302df71e13b3 Author: Tomas Winkler Date: Sun Mar 5 21:40:41 2017 +0200 mei: fix deadlock on mei reset This patch fixes 'mei: synchronize irq before initiating a reset' The patch had introduced a deadlock between irq thread and mei_reset() as they are both holding the same device lock. ---> device_lock: mei_reset() <---- interrupt thread device_lock ---> synchornize_irq() wait on interrupt thread == (dead lock) The fix is to call synchronize_irq prior to call locked mei_reset function. Cc: #4.10+ Fixes: f302bb0de6ac (mei: synchronize irq before initiating a reset) Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 603980cecc71564e1c6289cd4d0704f11788dc3a Merge: 4495c08 340837f Author: Greg Kroah-Hartman Date: Thu Mar 16 10:46:33 2017 +0900 Merge tag 'stm-fixes-for-greg-20170315' of git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm into char-misc-linus Alexander writes: intel_th: Fixes for 4.11 These are: * fix for a module refcount leak * two new PCI IDs commit 27b713c2e08ef27d500a79166098d42b24977500 Merge: 4daad1b 801a6aa9a6 Author: Dave Airlie Date: Thu Mar 16 11:28:44 2017 +1000 Merge branch 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few amd fixes. * 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/amd/amdgpu: Fix debugfs reg read/write address width drm/amdgpu/si: add dpm quirk for Oland drm/radeon/si: add dpm quirk for Oland drm: amd: remove broken include path drm/amd/powerplay: fix copy error in smu7_clockpoweragting.c drm/amdgpu: fix parser init error path to avoid crash in parser fini drm/amd/amdgpu: Disable GFX_PG on Carrizo until compute issues solved commit 69eea5a4ab9c705496e912b55a9d312325de19e6 Merge: 95422de 9c62110 Author: Linus Torvalds Date: Wed Mar 15 16:54:58 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Four small fixes for this cycle: - followup fix from Neil for a fix that went in before -rc2, ensuring that we always see the full per-task bio_list. - fix for blk-mq-sched from me that ensures that we retain similar direct-to-issue behavior on running the queue. - fix from Sagi fixing a potential NULL pointer dereference in blk-mq on spurious CPU unplug. - a memory leak fix in writeback from Tahsin, fixing a case where device removal of a mounted device can leak a struct wb_writeback_work" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly() writeback: fix memory leak in wb_queue_work() blk-mq: Fix tagset reinit in the presence of cpu hot-unplug blk: Ensure users for current->bio_list can see the full list. commit 9b4f603e7a9f4282aec451063ffbbb8bb410dcd9 Author: Rafael J. Wysocki Date: Wed Mar 15 00:12:16 2017 +0100 cpufreq: Fix and clean up show_cpuinfo_cur_freq() There is a missing newline in show_cpuinfo_cur_freq(), so add it, but while at it clean that function up somewhat too. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: All applicable drivers/cpufreq/cpufreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 645b8ef5943f95b74240568105ce2be21c6640b4 Author: Tomas Winkler Date: Tue Mar 14 14:19:36 2017 +0200 scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR IS_ERR and ERR_PTR already forcefully cast their argument, hence there is no need for additional (complex) casting. Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 046885251ae24b0fa1adbc5e3ca4a4bc9930c1f3 Author: Manish Rangankar Date: Wed Mar 15 01:32:53 2017 -0700 scsi: qedi: Add PCI device-ID for QL41xxx adapters. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) commit e498520edec6655e93ac5e768b04f4fd2299fe4d Author: Raghava Aditya Renukunta Date: Tue Mar 14 09:20:19 2017 -0700 scsi: aacraid: Fix potential null access Currently, command threads fails to return ioctls commands for older controller versions, since it returns when all the fibs have been allocated. Another issue is even all the fibs have not been allocated, the correct allocated fibs is not updated nor freed. Fixes: 113156bcea9ef1e6 (scsi: aacraid: Reworked aac_command_thread) Reported-by: Tomas Henzl Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 5f7c2beef819d9ea2d1b814edf6f5981420e9cf8 Author: Bill Kuzeja Date: Tue Mar 14 13:28:44 2017 -0400 scsi: qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr After a Qlogic card breaks when initializing (test case), the system can crash in qla2xxx_eh_abort if processing anything but a scsi command type srb. Fixes: 1535aa75a3d8 ("scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove") Signed-off-by: Bill Kuzeja Acked-By: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22a0e18eac7a9e986fec76c60fa4a2926d1291e2 Author: Eric Dumazet Date: Wed Mar 15 13:21:28 2017 -0700 net: properly release sk_frag.page I mistakenly added the code to release sk->sk_frag in sk_common_release() instead of sk_destruct() TCP sockets using sk->sk_allocation == GFP_ATOMIC do no call sk_common_release() at close time, thus leaking one (order-3) page. iSCSI is using such sockets. Fixes: 5640f7685831 ("net: use a per task frag allocator") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 622c36f143fc9566ba49d7cec994c2da1182d9e2 Author: Lendacky, Thomas Date: Wed Mar 15 15:11:23 2017 -0500 amd-xgbe: Fix jumbo MTU processing on newer hardware Newer hardware does not provide a cumulative payload length when multiple descriptors are needed to handle the data. Once the MTU increases beyond the size that can be handled by a single descriptor, the SKB does not get built properly by the driver. The driver will now calculate the size of the data buffers used by the hardware. The first buffer of the first descriptor is for packet headers or packet headers and data when the headers can't be split. Subsequent descriptors in a multi-descriptor chain will not use the first buffer. The second buffer is used by all the descriptors in the chain for payload data. Based on whether the driver is processing the first, intermediate, or last descriptor it can calculate the buffer usage and build the SKB properly. Tested and verified on both old and new hardware. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 6 +- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 20 +++--- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 102 +++++++++++++++++----------- 3 files changed, 78 insertions(+), 50 deletions(-) commit 5371bbf4b295eea334ed453efa286afa2c3ccff3 Author: Florian Fainelli Date: Wed Mar 15 12:57:21 2017 -0700 net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled Suspending the PHY would be putting it in a low power state where it may no longer allow us to do Wake-on-LAN. Fixes: cc013fb48898 ("net: bcmgenet: correctly suspend and resume PHY device") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 88d339e2d3be955848a034970970931a7ed33956 Author: Pablo Neira Date: Wed Mar 15 18:39:46 2017 +0100 MAINTAINERS: remove MACVLAN and VLAN entries macvlan.c file seems to be both in VLAN and MACVLAN DRIVER, so remove the MACVLAN DRIVER since this is redundant. I propose with this patch to remove the VLAN (802.1Q) entry so this just falls into the NETWORKING [GENERAL]. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller MAINTAINERS | 15 --------------- 1 file changed, 15 deletions(-) commit e11607aad5edf4c41617a27291731c660f7d519d Merge: 3d20f1f 4494dbc Author: David S. Miller Date: Wed Mar 15 15:13:13 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, a rather large batch of fixes targeted to nf_tables, conntrack and bridge netfilter. More specifically, they are: 1) Don't track fragmented packets if the socket option IP_NODEFRAG is set. From Florian Westphal. 2) SCTP protocol tracker assumes that ICMP error messages contain the checksum field, what results in packet drops. From Ying Xue. 3) Fix inconsistent handling of AH traffic from nf_tables. 4) Fix new bitmap set representation with big endian. Fix mismatches in nf_tables due to incorrect big endian handling too. Both patches from Liping Zhang. 5) Bridge netfilter doesn't honor maximum fragment size field, cap to largest fragment seen. From Florian Westphal. 6) Fake conntrack entry needs to be aligned to 8 bytes since the 3 LSB bits are now used to store the ctinfo. From Steven Rostedt. 7) Fix element comments with the bitmap set type. Revert the flush field in the nft_set_iter structure, not required anymore after fixing up element comments. 8) Missing error on invalid conntrack direction from nft_ct, also from Liping Zhang. ==================== Signed-off-by: David S. Miller commit 3d20f1f7bd575d147ffa75621fa560eea0aec690 Author: Or Gerlitz Date: Wed Mar 15 18:10:47 2017 +0200 net/openvswitch: Set the ipv6 source tunnel key address attribute correctly When dealing with ipv6 source tunnel key address attribute (OVS_TUNNEL_KEY_ATTR_IPV6_SRC) we are wrongly setting the tunnel dst ip, fix that. Fixes: 6b26ba3a7d95 ('openvswitch: netlink attributes for IPv6 tunneling') Signed-off-by: Or Gerlitz Reported-by: Paul Blakey Acked-by: Jiri Benc Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 186ecf14e58befba434f0774eea89e35f64d3c6a Author: Helge Deller Date: Wed Mar 15 21:48:42 2017 +0100 parisc: Avoid compiler warnings with access_ok() Commit 09b871ffd4d8 (parisc: Define access_ok() as macro) missed to mark uaddr as used, which then gives compiler warnings about unused variables. Fix it by comparing uaddr to uaddr which then gets optimized away by the compiler. Signed-off-by: Helge Deller Fixes: 09b871ffd4d8 ("parisc: Define access_ok() as macro") arch/parisc/include/asm/uaccess.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 801a6aa9a63c90724e8899982ad8c7f16be1e2cd Author: Tom St Denis Date: Wed Mar 15 05:34:25 2017 -0400 drm/amd/amdgpu: Fix debugfs reg read/write address width The MMIO space is wider now so we mask the lower 22 bits instead of 18. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18a8de1bc37e97dff1c96ee6cf49adbd02a0f775 Author: Alex Deucher Date: Tue Mar 14 19:24:19 2017 -0400 drm/amdgpu/si: add dpm quirk for Oland OLAND 0x1002:0x6604 0x1028:0x066F 0x00 seems to have problems with higher sclks. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0f424de1fd9bc4ab24bd1fe5430ab5618e803e31 Author: Alex Deucher Date: Tue Mar 14 14:42:03 2017 -0400 drm/radeon/si: add dpm quirk for Oland OLAND 0x1002:0x6604 0x1028:0x066F 0x00 seems to have problems with higher sclks. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 63d32d1e09cb2fc65b084b261976c06b40d19115 Author: Helge Deller Date: Wed Mar 15 21:10:17 2017 +0100 parisc: Wire up statx system call Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/unistd.h | 3 ++- arch/parisc/kernel/syscall_table.S | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 316ec0624f951166daedbe446988ef92ae72b59f Author: John David Anglin Date: Sat Mar 11 18:03:34 2017 -0500 parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range The previously submitted patch did not resolve the random segmentation faults observed on the phantom buildd system. There are still unresolved problems with the Debian 4.8 and 4.9 kernels on C8000. The attached patch removes the flush of the offset map pages and does a whole data cache flush for large ranges. No other arch flushes the offset map in these routines as far as I can tell. I have not observed any random segmentation faults on rp3440 in two weeks of testing with 4.10.0 and 4.10.1. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Helge Deller arch/parisc/include/asm/cacheflush.h | 23 ++--------------------- arch/parisc/kernel/cache.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) commit 5f655322b1ba4bd46e26e307d04098f9c84df764 Author: Mikulas Patocka Date: Tue Mar 14 11:47:29 2017 -0400 parisc: support R_PARISC_SECREL32 relocation in modules The parisc kernel doesn't work with CONFIG_MODVERSIONS since the commit 71810db27c1c853b335675bee335d893bc3d324b. It can't load modules with the error: "module unix: Unknown relocation: 41". The commit changes __kcrctab from 64-bit valus to 32-bit values. The assembler generates R_PARISC_SECREL32 secrel relocation for them and the module loader doesn't support this relocation. This patch adds the R_PARISC_SECREL32 relocation to the module loader. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Helge Deller arch/parisc/kernel/module.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e83bb3e6f3efa21f4a9d883a25d0ecd9dfb431e1 Author: Michael Engl Date: Tue Oct 3 13:57:00 2017 +0100 iio: adc: ti_am335x_adc: fix fifo overrun recovery The tiadc_irq_h(int irq, void *private) function is handling FIFO overruns by clearing flags, disabling and enabling the ADC to recover. If the ADC is running in continuous mode a FIFO overrun happens regularly. If the disabling of the ADC happens concurrently with a new conversion. It might happen that the enabling of the ADC is ignored by the hardware. This stops the ADC permanently. No more interrupts are triggered. According to the AM335x Reference Manual (SPRUH73H October 2011 - Revised April 2013 - Chapter 12.4 and 12.5) it is necessary to check the ADC FSM bits in REG_ADCFSM before enabling the ADC again. Because the disabling of the ADC is done right after the current conversion has been finished. To trigger this bug it is necessary to run the ADC in continuous mode. The ADC values of all channels need to be read in an endless loop. The bug appears within the first 6 hours (~5.4 million handled FIFO overruns). The user space application will hang on reading new values from the character device. Fixes: ca9a563805f7a ("iio: ti_am335x_adc: Add continuous sampling support") Signed-off-by: Michael Engl Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ti_am335x_adc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit fe8daf5fa715f7214952f06a387e4b7de818c5be Author: Taku Izumi Date: Wed Mar 15 13:47:50 2017 +0900 fjes: Fix wrong netdevice feature flags This patch fixes netdev->features for Extended Socket network device. Currently Extended Socket network device's netdev->feature claims NETIF_F_HW_CSUM, however this is completely wrong. There's no feature of checksum offloading. That causes invalid TCP/UDP checksum and packet rejection when IP forwarding from Extended Socket network device to other network device. NETIF_F_HW_CSUM should be omitted. Signed-off-by: Taku Izumi Signed-off-by: David S. Miller drivers/net/fjes/fjes_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd9cb405e0b948363811dc74dbb2890f56f2cb87 Author: Eric Biggers Date: Wed Mar 15 15:08:48 2017 -0400 jbd2: don't leak memory if setting up journal fails In journal_init_common(), if we failed to allocate the j_wbuf array, or if we failed to create the buffer_head for the journal superblock, we leaked the memory allocated for the revocation tables. Fix this. Cc: stable@vger.kernel.org # 4.9 Fixes: f0c9fd5458bacf7b12a9a579a727dc740cbe047e Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/jbd2/journal.c | 22 +++++++++++----------- fs/jbd2/revoke.c | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) commit b9cf625d6ecde0d372e23ae022feead72b4228a6 Author: Eric Biggers Date: Wed Mar 15 14:52:02 2017 -0400 ext4: mark inode dirty after converting inline directory If ext4_convert_inline_data() was called on a directory with inline data, the filesystem was left in an inconsistent state (as considered by e2fsck) because the file size was not increased to cover the new block. This happened because the inode was not marked dirty after i_disksize was updated. Fix this by marking the inode dirty at the end of ext4_finish_convert_inline_dir(). This bug was probably not noticed before because most users mark the inode dirty afterwards for other reasons. But if userspace executed FS_IOC_SET_ENCRYPTION_POLICY with invalid parameters, as exercised by 'kvm-xfstests -c adv generic/396', then the inode was never marked dirty after updating i_disksize. Cc: stable@vger.kernel.org # 3.10+ Fixes: 3c47d54170b6a678875566b1b8d6dcf57904e49b Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/inline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ca4a213db0b66513ba384d5f397fa60f1d0550d0 Merge: a11be42 7d70803 Author: James Bottomley Date: Wed Mar 15 11:28:54 2017 -0700 Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes commit 94840e3c802daa1a62985957f36ac48faf8ceedd Author: Eric Biggers Date: Wed Feb 22 13:25:14 2017 -0800 fscrypt: eliminate ->prepare_context() operation The only use of the ->prepare_context() fscrypt operation was to allow ext4 to evict inline data from the inode before ->set_context(). However, there is no reason why this cannot be done as simply the first step in ->set_context(), and in fact it makes more sense to do it that way because then the policy modes and flags get validated before any real work is done. Therefore, merge ext4_prepare_context() into ext4_set_context(), and remove ->prepare_context(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 7 ------- fs/ext4/super.c | 10 ++++------ include/linux/fscrypt_common.h | 1 - 3 files changed, 4 insertions(+), 14 deletions(-) commit 95422dec6bd4a7c57444743f7b1bb375335a6298 Merge: aabcf5f a11be42 Author: Linus Torvalds Date: Wed Mar 15 10:44:19 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a rather large set of fixes. The bulk are for lpfc correcting a lot of issues in the new NVME driver code which just went in in the merge window. The others are: - fix a hang in the vmware paravirt driver caused by incorrect handling of the new MSI vector allocation - long standing bug in storvsc, which recent block changes turned from being a harmless annoyance into a hang - yet more fallout (in mpt3sas) from the changes to device blocking The remainder are small fixes and updates" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (34 commits) scsi: lpfc: Add shutdown method for kexec scsi: storvsc: Workaround for virtual DVD SCSI version scsi: lpfc: revise version number to 11.2.0.10 scsi: lpfc: code cleanups in NVME initiator discovery scsi: lpfc: code cleanups in NVME initiator base scsi: lpfc: correct rdp diag portnames scsi: lpfc: remove dead sli3 nvme code scsi: lpfc: correct double print scsi: lpfc: Rename LPFC_MAX_EQ_DELAY to LPFC_MAX_EQ_DELAY_EQID_CNT scsi: lpfc: Rework lpfc Kconfig for NVME options scsi: lpfc: add transport eh_timed_out reference scsi: lpfc: Fix eh_deadline setting for sli3 adapters. scsi: lpfc: add NVME exchange aborts scsi: lpfc: Fix nvme allocation bug on failed nvme_fc_register_localport scsi: lpfc: Fix IO submission if WQ is full scsi: lpfc: Fix NVME CMD IU byte swapped word 1 problem scsi: lpfc: Fix RCTL value on NVME LS request and response scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters scsi: lpfc: fix missing spin_unlock on sql_list_lock scsi: lpfc: don't dereference dma_buf->iocbq before null check ... commit 7d7080335f8d93a51e8238b6e85be8af4ba452b6 Author: James Smart Date: Wed Mar 8 14:36:01 2017 -0800 scsi: lpfc: Finalize Kconfig options for nvme Reviewing the result of what was just added for Kconfig, we made a poor choice. It worked well for full kernel builds, but not so much for how it would be deployed on a distro. Here's the final result: - lpfc will compile in NVME initiator and/or NVME target support based on whether the kernel has the corresponding subsystem support. Kconfig is not used to drive this specifically for lpfc. - There is a module parameter, lpfc_enable_fc4_type, that indicates whether the ports will do FCP-only or FCP & NVME (NVME-only not yet possible due to dependency on fc transport). As FCP & NVME divvys up exchange resources, and given NVME will not be often initially, the default is changed to FCP only. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 14 -------------- drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- drivers/scsi/lpfc/lpfc_init.c | 7 +++++++ drivers/scsi/lpfc/lpfc_nvme.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvmet.c | 8 ++++---- 5 files changed, 17 insertions(+), 24 deletions(-) commit 949d7fa158b2b1af533bdb1af0dda8ab103ac58d Author: Tomas Winkler Date: Sun Mar 12 12:22:02 2017 +0200 scsi: ufs: don't check unsigned type for a negative value Fix compilation warning: drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX)) Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ef2884980873081a4edae92f9d88dd580c85f6e Author: Don Brace Date: Fri Mar 10 14:35:23 2017 -0600 scsi: hpsa: do not timeout reset operations Resets can take longer than DEFAULT_TIMEOUT. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Tomas Henzl Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87b9e6aa87d9411f1059aa245c0c79976bc557ac Author: Don Brace Date: Fri Mar 10 14:35:17 2017 -0600 scsi: hpsa: limit outstanding rescans Avoid rescan storms. No need to queue another if one is pending. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Tomas Henzl Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 16 +++++++++++++++- drivers/scsi/hpsa.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 85b29008d8af6d94a0723aaa8d93cfb6e041158b Author: Don Brace Date: Fri Mar 10 14:35:11 2017 -0600 scsi: hpsa: update check for logical volume status - Add in a new case for volume offline. Resolves internal testing bug for multilun array management. - Return correct status for failed TURs. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 35 ++++++++++++++++------------------- drivers/scsi/hpsa_cmd.h | 2 ++ 2 files changed, 18 insertions(+), 19 deletions(-) commit 62a10498afb27370ec6018e9d802b74850fd8d9a Author: Kuninori Morimoto Date: Tue Mar 14 09:34:49 2017 +0900 ASoC: rcar: clear DE bit only in PDMACHCR when it stops R-Car datasheet indicates "Clear DE in PDMACHCR" for transfer stop, but current code clears all bits in PDMACHCR. Because of this, DE bit might never been cleared, and it causes CMD overflow. This patch fixes this issue. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/dma.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 1b53cf9815bb4744958d41f3795d5d5a1d365e2d Author: Eric Biggers Date: Tue Feb 21 15:07:11 2017 -0800 fscrypt: remove broken support for detecting keyring key revocation Filesystem encryption ostensibly supported revoking a keyring key that had been used to "unlock" encrypted files, causing those files to become "locked" again. This was, however, buggy for several reasons, the most severe of which was that when key revocation happened to be detected for an inode, its fscrypt_info was immediately freed, even while other threads could be using it for encryption or decryption concurrently. This could be exploited to crash the kernel or worse. This patch fixes the use-after-free by removing the code which detects the keyring key having been revoked, invalidated, or expired. Instead, an encrypted inode that is "unlocked" now simply remains unlocked until it is evicted from memory. Note that this is no worse than the case for block device-level encryption, e.g. dm-crypt, and it still remains possible for a privileged user to evict unused pages, inodes, and dentries by running 'sync; echo 3 > /proc/sys/vm/drop_caches', or by simply unmounting the filesystem. In fact, one of those actions was already needed anyway for key revocation to work even somewhat sanely. This change is not expected to break any applications. In the future I'd like to implement a real API for fscrypt key revocation that interacts sanely with ongoing filesystem operations --- waiting for existing operations to complete and blocking new operations, and invalidating and sanitizing key material and plaintext from the VFS caches. But this is a hard problem, and for now this bug must be fixed. This bug affected almost all versions of ext4, f2fs, and ubifs encryption, and it was potentially reachable in any kernel configured with encryption support (CONFIG_EXT4_ENCRYPTION=y, CONFIG_EXT4_FS_ENCRYPTION=y, CONFIG_F2FS_FS_ENCRYPTION=y, or CONFIG_UBIFS_FS_ENCRYPTION=y). Note that older kernels did not use the shared fs/crypto/ code, but due to the potential security implications of this bug, it may still be worthwhile to backport this fix to them. Fixes: b7236e21d55f ("ext4 crypto: reorganize how we store keys in the inode") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Acked-by: Michael Halcrow fs/crypto/crypto.c | 10 +-------- fs/crypto/fname.c | 2 +- fs/crypto/fscrypt_private.h | 4 ---- fs/crypto/keyinfo.c | 52 ++++++++------------------------------------- 4 files changed, 11 insertions(+), 57 deletions(-) commit aabcf5fcd01b1841b2701e423a1e9c531e3e374d Merge: defc7d7 28ea06c Author: Linus Torvalds Date: Wed Mar 15 09:33:15 2017 -0700 Merge tag 'gfs2-4.11-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Bob Peterson: "This is an emergency patch for 4.11-rc3 The GFS2 developers uncovered a really nasty problem that can lead to random corruption and kernel panic, much like the last one. Andreas Gruenbacher wrote a simple one-line patch to fix the problem." * tag 'gfs2-4.11-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Avoid alignment hole in struct lm_lockname commit defc7d752265c2d8d212aee9fb499243260883e9 Merge: ae50dfd 28b62b1 Author: Linus Torvalds Date: Wed Mar 15 09:26:04 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: - self-test failure of crc32c on powerpc - regressions of ecb(aes) when used with xts/lrw in s5p-sss - a number of bugs in the omap RNG driver * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: s5p-sss - Fix spinlock recursion on LRW(AES) hwrng: omap - Do not access INTMASK_REG on EIP76 hwrng: omap - use devm_clk_get() instead of of_clk_get() hwrng: omap - write registers after enabling the clock crypto: s5p-sss - Fix completing crypto request in IRQ handler crypto: powerpc - Fix initialisation of crc32c context commit 4494dbc6dec37817f2cc2aa7604039a9e87ada18 Author: Liping Zhang Date: Wed Mar 15 22:22:08 2017 +0800 netfilter: nft_ct: do cleanup work when NFTA_CT_DIRECTION is invalid We should jump to invoke __nft_ct_set_destroy() instead of just return error. Fixes: edee4f1e9245 ("netfilter: nft_ct: add zone id set support") Signed-off-by: Liping Zhang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4c204ced0ac25e02e58679f07096c5bac0b0d96 Author: Rafael J. Wysocki Date: Tue Mar 14 16:18:34 2017 +0100 cpufreq: intel_pstate: Avoid percentages in limits-related computations Currently, intel_pstate_update_perf_limits() first converts the policy minimum and maximum limits into percentages of the maximum turbo frequency (rounding up to an integer) and then converts these percentages to fractions (by using fixed-point arithmetic to divide them by 100). That introduces a rounding error unnecessarily, because the fractions can be obtained by carrying out fixed-point divisions directly on the input numbers. Rework the computations in intel_pstate_hwp_set() to use fractions instead of percentages (and drop redundant local variables from there) and modify intel_pstate_update_perf_limits() to compute the fractions directly and percentages out of them. While at it, introduce percent_ext_fp() for converting percentages to fractions (with extended number of fraction bits) and use it in the computations. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 363dad58e4a0f72dce0bf12d361d617239a80317 Author: Stafford Horne Date: Tue Mar 14 22:52:49 2017 +0900 openrisc: Export symbols needed by modules This was detected by allmodconfig, errors reported: ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined! ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined! ERROR: "empty_zero_page" [fs/nfs/objlayout/objlayoutdriver.ko] undefined! ERROR: "empty_zero_page" [fs/exofs/exofs.ko] undefined! ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined! ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined! ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined! ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined! ERROR: "__clear_user" [drivers/md/dm-mod.ko] undefined! ERROR: "__clear_user" [net/netfilter/x_tables.ko] undefined! Signed-off-by: Stafford Horne arch/openrisc/kernel/or32_ksyms.c | 4 ++++ arch/openrisc/kernel/process.c | 1 + 2 files changed, 5 insertions(+) commit 154e67cd8e8f964809d0e75e44bb121b169c75b3 Author: Stafford Horne Date: Mon Mar 13 07:44:45 2017 +0900 openrisc: fix issue handling 8 byte get_user calls Was getting the following error with allmodconfig: ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined! This was simply a missing break statement, causing an unwanted fall through. Signed-off-by: Stafford Horne arch/openrisc/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8af42949d1681379c1a97d230de9242c1f4f326a Author: Stafford Horne Date: Mon Mar 13 07:41:55 2017 +0900 openrisc: xchg: fix `computed is not used` warning When building allmodconfig this warning shows. fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is not used [-Wunused-value] ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) ^ Applying the same patch logic that was done to the cmpxchg macro. Signed-off-by: Stafford Horne arch/openrisc/include/asm/cmpxchg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 28ea06c46fbcab63fd9a55531387b7928a18a590 Author: Andreas Gruenbacher Date: Mon Mar 6 12:58:42 2017 -0500 gfs2: Avoid alignment hole in struct lm_lockname Commit 88ffbf3e03 switches to using rhashtables for glocks, hashing over the entire struct lm_lockname instead of its individual fields. On some architectures, struct lm_lockname contains a hole of uninitialized memory due to alignment rules, which now leads to incorrect hash values. Get rid of that hole. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson CC: #v4.3+ fs/gfs2/incore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 340837f985c2cb87ca0868d4aa9ce42b0fab3a21 Author: Alexander Shishkin Date: Thu Jun 30 16:10:51 2016 +0300 intel_th: pci: Add Gemini Lake support This adds Intel(R) Trace Hub PCI ID for Gemini Lake SOC. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5118ccd34780f4637a9360be580f41f4c1feab48 Author: Alexander Shishkin Date: Tue Sep 8 14:03:55 2015 +0300 intel_th: pci: Add Denverton SOC support This adds Intel(R) Trace Hub PCI ID for Denverton SOC. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit e609ccef5222c73b46b322be7d3796d60bff353d Author: Alexander Shishkin Date: Fri Feb 24 16:04:15 2017 +0200 intel_th: Don't leak module refcount on failure to activate Output 'activation' may fail for the reasons of the output driver, for example, if msc's buffer is not allocated. We forget, however, to drop the module reference in this case. So each attempt at activation in this case leaks a reference, preventing the module from ever unloading. This patch adds the missing module_put() in the activation error path. Signed-off-by: Alexander Shishkin Cc: stable@vger.kernel.org # v4.8+ drivers/hwtracing/intel_th/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e67351d56a709853046fbe652b981fb7ca4c3dcc Author: Ander Conselvan de Oliveira Date: Wed Mar 15 11:57:47 2017 +0200 drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC Geminilake's DMC is not yet available in the linux-firmware repository. To prevent userspace tools such as mkinitramfs to complain about missing firmware, remove the MODULE_FIRMWARE() tag for now. Fixes: dbb28b5c3d3c ("drm/i915/DMC/GLK: Load DMC on GLK") Cc: Rodrigo Vivi Cc: Anusha Srivatsa Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Signed-off-by: Ander Conselvan de Oliveira Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170306085651.14008-1-ander.conselvan.de.oliveira@intel.com Link: http://patchwork.freedesktop.org/patch/msgid/20170315095747.21845-1-ander.conselvan.de.oliveira@intel.com (cherry picked from commit d9321a03efcda867b3a8c6327e01808516f0acd7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_csr.c | 1 - 1 file changed, 1 deletion(-) commit 630a04e79dd41ff746b545d4fc052e0abb836120 Author: Darrick J. Wong Date: Wed Mar 15 00:24:25 2017 -0700 xfs: verify inline directory data forks When we're reading or writing the data fork of an inline directory, check the contents to make sure we're not overflowing buffers or eating garbage data. xfs/348 corrupts an inline symlink into an inline directory, triggering a buffer overflow bug. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster --- v2: add more checks consistent with _dir2_sf_check and make the verifier usable from anywhere. fs/xfs/libxfs/xfs_dir2_priv.h | 2 + fs/xfs/libxfs/xfs_dir2_sf.c | 87 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_inode_fork.c | 26 +++++++++++-- fs/xfs/libxfs/xfs_inode_fork.h | 2 +- fs/xfs/xfs_dir2_readdir.c | 11 ------ fs/xfs/xfs_inode.c | 12 ++++-- 6 files changed, 122 insertions(+), 18 deletions(-) commit ae50dfd61665086e617cc9e554a1285d52765670 Merge: 352526f 1e6a1cd Author: Linus Torvalds Date: Tue Mar 14 21:31:23 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Ensure that mtu is at least IPV6_MIN_MTU in ipv6 VTI tunnel driver, from Steffen Klassert. 2) Fix crashes when user tries to get_next_key on an LPM bpf map, from Alexei Starovoitov. 3) Fix detection of VLAN fitlering feature for bnx2x VF devices, from Michal Schmidt. 4) We can get a divide by zero when TCP socket are morphed into listening state, fix from Eric Dumazet. 5) Fix socket refcounting bugs in skb_complete_wifi_ack() and skb_complete_tx_timestamp(). From Eric Dumazet. 6) Use after free in dccp_feat_activate_values(), also from Eric Dumazet. 7) Like bonding team needs to use ETH_MAX_MTU as netdev->max_mtu, from Jarod Wilson. 8) Fix use after free in vrf_xmit(), from David Ahern. 9) Don't do UDP Fragmentation Offload on IPComp ipsec packets, from Alexey Kodanev. 10) Properly check napi_complete_done() return value in order to decide whether to re-enable IRQs or not in amd-xgbe driver, from Thomas Lendacky. 11) Fix double free of hwmon device in marvell phy driver, from Andrew Lunn. 12) Don't crash on malformed netlink attributes in act_connmark, from Etienne Noss. 13) Don't remove routes with a higher metric in ipv6 ECMP route replace, from Sabrina Dubroca. 14) Don't write into a cloned SKB in ipv6 fragmentation handling, from Florian Westphal. 15) Fix routing redirect races in dccp and tcp, basically the ICMP handler can't modify the socket's cached route in it's locked by the user at this moment. From Jon Maxwell. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (108 commits) qed: Enable iSCSI Out-of-Order qed: Correct out-of-bound access in OOO history qed: Fix interrupt flags on Rx LL2 qed: Free previous connections when releasing iSCSI qed: Fix mapping leak on LL2 rx flow qed: Prevent creation of too-big u32-chains qed: Align CIDs according to DORQ requirement mlxsw: reg: Fix SPVMLR max record count mlxsw: reg: Fix SPVM max record count net: Resend IGMP memberships upon peer notification. dccp: fix memory leak during tear-down of unsuccessful connection request tun: fix premature POLLOUT notification on tun devices dccp/tcp: fix routing redirect race ucc/hdlc: fix two little issue vxlan: fix ovs support net: use net->count to check whether a netns is alive or not bridge: drop netfilter fake rtable unconditionally ipv6: avoid write to a possibly cloned skb net: wimax/i2400m: fix NULL-deref at probe isdn/gigaset: fix NULL-deref at probe ... commit 4daad1b2b087eb43611653a7e1b0ecb01f4f7481 Merge: 490b898 6aef660 Author: Dave Airlie Date: Wed Mar 15 11:32:46 2017 +1000 Merge tag 'drm-intel-fixes-2017-03-14' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.11-rc3 * tag 'drm-intel-fixes-2017-03-14' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Fix forcewake active domain tracking drm/i915: Nuke skl_update_plane debug message from the pipe update critical section drm/i915: use correct node for handling cache domain eviction drm/i915: Drain the freed state from the tail of the next commit drm/i915: Nuke debug messages from the pipe update critical section drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl drm/i915: Store a permanent error in obj->mm.pages drm/i915: Move updating color management to before vblank evasion drm/i915/gen9: Increase PCODE request timeout to 50ms drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3 drm/i915: Remove the vma from the drm_mm if binding fails drm/i915/fbdev: Stop repeating tile configuration on stagnation drm/i915/glk: Fix watermark computations for third sprite plane drm/i915: Squelch any ktime/jiffie rounding errors for wait-ioctl commit 490b89813c24f2362f46fea3bbc222a273a0a7a8 Merge: 6ed5117 d1479f6 Author: Dave Airlie Date: Wed Mar 15 11:30:46 2017 +1000 Merge branch 'for-upstream/malidp-fixes' of git://linux-arm.org/linux-ld into drm-fixes * 'for-upstream/malidp-fixes' of git://linux-arm.org/linux-ld: drm: mali-dp: Fix smart layer not going to composition drm: mali-dp: Remove mclk rate management commit 6ed511757702abaa1b9925fd87e049bae3489f05 Merge: e7bb405 337ba7f Author: Dave Airlie Date: Wed Mar 15 11:30:14 2017 +1000 Merge tag 'omapdrm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes omapdrm fixes for v4.11 - Fix types in omapdrm uapi header to avoid userspace compilation errors - Fix dmabuf mmap for dma_alloc'ed buffers * tag 'omapdrm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: uapi: fix drm/omap_drm.h userspace compilation errors drm/omap: fix dmabuf mmap for dma_alloc'ed buffers commit e7bb40565c43e23956b4aada28008a4eb0628410 Merge: 4495c08 11abbc9 Author: Dave Airlie Date: Wed Mar 15 11:29:33 2017 +1000 Merge tag 'tilcdc-4.11-fixes' of https://github.com/jsarha/linux into drm-fixes drm/tilcdc fixes for Linux v4.11 * tag 'tilcdc-4.11-fixes' of https://github.com/jsarha/linux: drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create() commit 655d9ca9ac075da1ef2a45012ba48a39f6eb1f58 Author: Arnd Bergmann Date: Tue Mar 14 22:27:11 2017 +0100 drm: amd: remove broken include path The AMD ACP driver adds "-I../acp -I../acp/include" to the gcc command line, which makes no sense, since these are evaluated relative to the build directory. When we build with "make W=1", they instead cause a warning: cc1: error: ../acp/: No such file or directory [-Werror=missing-include-dirs] cc1: error: ../acp/include: No such file or directory [-Werror=missing-include-dirs] cc1: all warnings being treated as errors ../scripts/Makefile.build:289: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o' failed ../scripts/Makefile.build:289: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.o' failed ../scripts/Makefile.build:289: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.o' failed This removes the subdir-ccflags variable that evidently did not serve any purpose here. Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/acp/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 352526f45387cb96671f13b003bdd5b249e509bd Merge: 6517569 b6a6759 Author: Linus Torvalds Date: Tue Mar 14 15:11:19 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Three cgroup fixes. Nothing critical: - the pids controller could trigger suspicious RCU warning spuriously. Fixed. - in the debug controller, %p -> %pK to protect kernel pointer from getting exposed. - documentation formatting fix" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroups: censor kernel pointer in debug files cgroup/pids: remove spurious suspicious RCU usage warning cgroup: Fix indenting in PID controller documentation commit 6517569d4ef33fe52b0d0ce8161349a55f88dded Merge: bc25887 6022c5c Author: Linus Torvalds Date: Tue Mar 14 15:00:43 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Three libata fixes: - fix for a circular reference bug in sysfs code which prevented pata_legacy devices from being released after probe failure, which in turn prevented devres from releasing the associated resources. - drop spurious WARN in the command issue path which can be triggered by a legitimate passthrough command. - an ahci_qoriq specific fix" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: qoriq: correct the sata ecc setting error libata: drop WARN from protocol error in ata_sff_qc_issue() libata: transport: Remove circular dependency at free time commit bc25887935dba31be8f253dd5129e5004a346d97 Merge: 83e6322 637fdba Author: Linus Torvalds Date: Tue Mar 14 14:52:08 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "If a delayed work is queued with NULL @wq, workqueue code explodes after the timer expires at which point it's difficult to tell who the culprit was. This actually happened and the offender was net/smc this time. Add an explicit sanity check for it in the queueing path" * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq commit 83e632267591bc2e0d2d13e41b64340c2d3cedfe Merge: fb5fe0f 8a1df54 Author: Linus Torvalds Date: Tue Mar 14 14:48:50 2017 -0700 Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu fixes from Tejun Heo: - the allocation path was updating pcpu_nr_empty_pop_pages without the required locking which can lead to incorrect handling of empty chunks (e.g. keeping too many around), which is buggy but shouldn't lead to critical failures. Fixed by adding the locking - a trivial patch to drop an unused param from pcpu_get_pages() * 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: remove unused chunk_alloc parameter from pcpu_get_pages() percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages commit 49ec8f5b6ae3ab60385492cad900ffc8a523c895 Author: Jiri Olsa Date: Tue Mar 14 15:20:53 2017 +0100 x86/intel_rdt: Put group node in rdtgroup_kn_unlock The rdtgroup_kn_unlock waits for the last user to release and put its node. But it's calling kernfs_put on the node which calls the rdtgroup_kn_unlock, which might not be the group's directory node, but another group's file node. This race could be easily reproduced by running 2 instances of following script: mount -t resctrl resctrl /sys/fs/resctrl/ pushd /sys/fs/resctrl/ mkdir krava echo "krava" > krava/schemata rmdir krava popd umount /sys/fs/resctrl It triggers the slub debug error message with following command line config: slub_debug=,kernfs_node_cache. Call kernfs_put on the group's node to fix it. Fixes: 60cf5e101fd4 ("x86/intel_rdt: Add mkdir to resctrl file system") Signed-off-by: Jiri Olsa Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Shaohua Li Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1489501253-20248-1-git-send-email-jolsa@kernel.org Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87a6b2975f0d340c75b7488d22d61d2f98fb8abf Author: Josh Poimboeuf Date: Mon Mar 13 23:27:47 2017 -0500 x86/unwind: Fix last frame check for aligned function stacks Pavel Machek reported the following warning on x86-32: WARNING: kernel stack frame pointer at f50cdf98 in swapper/2:0 has bad value (null) The warning is caused by the unwinder not realizing that it reached the end of the stack, due to an unusual prologue which gcc sometimes generates for aligned stacks. The prologue is based on a gcc feature called the Dynamic Realign Argument Pointer (DRAP). It's almost always enabled for aligned stacks when -maccumulate-outgoing-args isn't set. This issue is similar to the one fixed by the following commit: 8023e0e2a48d ("x86/unwind: Adjust last frame check for aligned function stacks") ... but that fix was specific to x86-64. Make the fix more generic to cover x86-32 as well, and also ensure that the return address referred to by the frame pointer is a copy of the original return address. Fixes: acb4608ad186 ("x86/unwind: Create stack frames for saved syscall registers") Reported-by: Pavel Machek Signed-off-by: Josh Poimboeuf Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/50d4924db716c264b14f1633037385ec80bf89d2.1489465609.git.jpoimboe@redhat.com Signed-off-by: Thomas Gleixner arch/x86/kernel/unwind_frame.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 9bbb25afeb182502ca4f2c4f3f88af0681b34cae Author: Peter Zijlstra Date: Sat Mar 4 10:27:19 2017 +0100 futex: Add missing error handling to FUTEX_REQUEUE_PI Thomas spotted that fixup_pi_state_owner() can return errors and we fail to unlock the rt_mutex in that case. Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Darren Hart Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170304093558.867401760@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 2 ++ 1 file changed, 2 insertions(+) commit c236c8e95a3d395b0494e7108f0d41cf36ec107c Author: Peter Zijlstra Date: Sat Mar 4 10:27:18 2017 +0100 futex: Fix potential use-after-free in FUTEX_REQUEUE_PI While working on the futex code, I stumbled over this potential use-after-free scenario. Dmitry triggered it later with syzkaller. pi_mutex is a pointer into pi_state, which we drop the reference on in unqueue_me_pi(). So any access to that pointer after that is bad. Since other sites already do rt_mutex_unlock() with hb->lock held, see for example futex_lock_pi(), simply move the unlock before unqueue_me_pi(). Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Darren Hart Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170304093558.801744246@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit d434936e4cbb10181463622962f30b989d3e9e19 Author: Arnd Bergmann Date: Tue Mar 14 13:12:53 2017 +0100 mm, x86: Fix native_pud_clear build error We still get a build error in random configurations, after this has been modified a few times: In file included from include/linux/mm.h:68:0, from include/linux/suspend.h:8, from arch/x86/kernel/asm-offsets.c:12: arch/x86/include/asm/pgtable.h:66:26: error: redefinition of 'native_pud_clear' #define pud_clear(pud) native_pud_clear(pud) My interpretation is that the build error comes from a typo in __PAGETABLE_PUD_FOLDED, so fix that typo now, and remove the incorrect #ifdef around the native_pud_clear definition. Fixes: 3e761a42e19c ("mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear()") Fixes: a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") Signed-off-by: Arnd Bergmann Acked-by: Dave Jiang Cc: Kees Cook Cc: Dave Hansen Cc: Hugh Dickins Cc: Andrew Morton Cc: Borislav Petkov Cc: Thomas Garnier Link: http://lkml.kernel.org/r/20170314121330.182155-1-arnd@arndb.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/pgtable-3level.h | 3 --- arch/x86/include/asm/pgtable.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit 1e6a1cd888de06b09d2341d782aadb20c6034210 Merge: a8aa395 6b116b1 Author: David S. Miller Date: Tue Mar 14 11:37:06 2017 -0700 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed: Fixes series This address several different issues in qed. The more significant portions: Patch #1 would cause timeout when qedr utilizes the highest CIDs availble for it [or when future qede adapters would utilize queues in some constellations]. Patch #4 fixes a leak of mapped addresses; When iommu is enabled, offloaded storage protocols might eventually run out of resources and fail to map additional buffers. Patches #6,#7 were missing in the initial iSCSI infrastructure submissions, and would hamper qedi's stability when it reaches out-of-order scenarios. ==================== Signed-off-by: David S. Miller commit 6b116b1d6a521a1907b3c18cb7a8592a655f660c Author: Mintz, Yuval Date: Tue Mar 14 15:26:04 2017 +0200 qed: Enable iSCSI Out-of-Order Missing in the initial submission, qed fails to propagate qedi's request to enable OOO to firmware. Fixes: fc831825f99e ("qed: Add support for hardware offloaded iSCSI") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 3 +++ 1 file changed, 3 insertions(+) commit db31d330e8b0ad8926725eb2af6f6422c07ca7ab Author: Mintz, Yuval Date: Tue Mar 14 15:26:03 2017 +0200 qed: Correct out-of-bound access in OOO history Need to set the number of entries in database, otherwise the logic would quickly surpass the array. Fixes: 1d6cff4fca43 ("qed: Add iSCSI out of order packet handling") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ooo.c | 2 ++ 1 file changed, 2 insertions(+) commit 1df2adedcce17ad4a39fba74f0e2b611f797fe10 Author: Ram Amrani Date: Tue Mar 14 15:26:02 2017 +0200 qed: Fix interrupt flags on Rx LL2 Before iterating over the the LL2 Rx ring, the ring's spinlock is taken via spin_lock_irqsave(). The actual processing of the packet [including handling by the protocol driver] is done without said lock, so qed releases the spinlock and re-claims it afterwards. Problem is that the final spin_lock_irqrestore() at the end of the iteration uses the original flags saved from the initial irqsave() instead of the flags from the most recent irqsave(). So it's possible that the interrupt status would be incorrect at the end of the processing. Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support"); CC: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4621ceb279d065151eb940ce8a4728b10c0646c7 Author: Mintz, Yuval Date: Tue Mar 14 15:26:01 2017 +0200 qed: Free previous connections when releasing iSCSI Fixes: fc831825f99e ("qed: Add support for hardware offloaded iSCSI") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 752ecb2da11124a948567076b60767dc8034cfa5 Author: Mintz, Yuval Date: Tue Mar 14 15:26:00 2017 +0200 qed: Fix mapping leak on LL2 rx flow When receiving an Rx LL2 packet, qed fails to unmap the previous buffer. Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support"); Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 ++ 1 file changed, 2 insertions(+) commit 3ef310a7d99216e0fbdff29f0cb13bc54180373a Author: Tomer Tayar Date: Tue Mar 14 15:25:59 2017 +0200 qed: Prevent creation of too-big u32-chains Current Logic would allow the creation of a chain with U32_MAX + 1 elements, when the actual maximum supported by the driver infrastructure is U32_MAX. Fixes: a91eb52abb50 ("qed: Revisit chain implementation") Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f3e48119b97f56fb09310c95d49da122a27003d7 Author: Ram Amrani Date: Tue Mar 14 15:25:58 2017 +0200 qed: Align CIDs according to DORQ requirement The Doorbell HW block can be configured at a granularity of 16 x CIDs, so we need to make sure that the actual number of CIDs configured would be a multiplication of 16. Today, when RoCE is enabled - given that the number is unaligned, doorbelling the higher CIDs would fail to reach the firmware and would eventually timeout. Fixes: dbb799c39717 ("qed: Initialize hardware for new protocols") Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8aa39530269371c786391f3417d8cff07656676 Merge: 37c343b e9093b1 Author: David S. Miller Date: Tue Mar 14 11:35:11 2017 -0700 Merge branch 'mlxsw-small-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Couple or small fixes. ==================== Signed-off-by: David S. Miller commit e9093b1183bbac462d2caef3eac165778c0b1bf1 Author: Jiri Pirko Date: Tue Mar 14 14:00:01 2017 +0100 mlxsw: reg: Fix SPVMLR max record count The num_rec field is 8 bit, so the maximal count number is 255. This fixes vlans learning not being enabled for wider ranges than 255. Fixes: a4feea74cd7a ("mlxsw: reg: Add Switch Port VLAN MAC Learning register definition") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f004ec065b4879d6bc9ba0211af2169b3ce3097f Author: Jiri Pirko Date: Tue Mar 14 14:00:00 2017 +0100 mlxsw: reg: Fix SPVM max record count The num_rec field is 8 bit, so the maximal count number is 255. This fixes vlans not being enabled for wider ranges than 255. Fixes: b2e345f9a454 ("mlxsw: reg: Add Switch Port VID and Switch Port VLAN Membership registers definitions") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37c343b4f4e70e9dc328ab04903c0ec8d154c1a4 Author: Vlad Yasevich Date: Tue Mar 14 08:58:08 2017 -0400 net: Resend IGMP memberships upon peer notification. When we notify peers of potential changes, it's also good to update IGMP memberships. For example, during VM migration, updating IGMP memberships will redirect existing multicast streams to the VM at the new location. Signed-off-by: Vladislav Yasevich Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit dc434e056fe1dada20df7ba07f32739d3a701adf Author: Sebastian Andrzej Siewior Date: Tue Mar 14 16:06:45 2017 +0100 cpu/hotplug: Serialize callback invocations proper The setup/remove_state/instance() functions in the hotplug core code are serialized against concurrent CPU hotplug, but unfortunately not serialized against themself. As a consequence a concurrent invocation of these function results in corruption of the callback machinery because two instances try to invoke callbacks on remote cpus at the same time. This results in missing callback invocations and initiator threads waiting forever on the completion. The obvious solution to replace get_cpu_online() with cpu_hotplug_begin() is not possible because at least one callsite calls into these functions from a get_online_cpu() locked region. Extend the protection scope of the cpuhp_state_mutex from solely protecting the state arrays to cover the callback invocation machinery as well. Fixes: 5b7aa87e0482 ("cpu/hotplug: Implement setup/removal interface") Reported-and-tested-by: Bart Van Assche Signed-off-by: Sebastian Andrzej Siewior Cc: hpa@zytor.com Cc: mingo@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20170314150645.g4tdyoszlcbajmna@linutronix.de Signed-off-by: Thomas Gleixner kernel/cpu.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 11353b9d10392e79e32603d2178e75feb25eaf0d Author: Zhilong Liu Date: Tue Mar 14 15:52:26 2017 +0800 md/raid1: fix a trivial typo in comments raid1.c: fix a trivial typo in comments of freeze_array(). Cc: Jack Wang Cc: Guoqing Jiang Cc: John Stoffel Acked-by: Coly Li Signed-off-by: Zhilong Liu Signed-off-by: Shaohua Li drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c53ad2139137dd4bf506a2c2b888de3816e8f75 Author: Rex Zhu Date: Mon Mar 13 15:14:08 2017 +0800 drm/amd/powerplay: fix copy error in smu7_clockpoweragting.c Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c62110454b088b4914ffe375c2dbc19643eac34 Author: Jens Axboe Date: Tue Mar 14 11:51:59 2017 -0600 blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly() If we have scheduling enabled, we jump directly to insert-and-run. That's fine, but we run the queue async and we don't pass in information on whether we can block from this context or not. Fixup both these cases. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0977762f6d15f13caccc20d71a5dec47d098907d Author: Song Liu Date: Mon Mar 13 13:44:35 2017 -0700 md/r5cache: fix set_syndrome_sources() for data in cache Before this patch, device InJournal will be included in prexor (SYNDROME_SRC_WANT_DRAIN) but not in reconstruct (SYNDROME_SRC_WRITTEN). So it will break parity calculation. With srctype == SYNDROME_SRC_WRITTEN, we need include both dev with non-null ->written and dev with R5_InJournal. This fixes logic in 1e6d690(md/r5cache: caching phase of r5cache) Cc: stable@vger.kernel.org (v4.10+) Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ecc34448e24e9e8a8f3a9b37be70b43c6af5288 Author: Adrian Hunter Date: Mon Mar 13 14:36:33 2017 +0200 mmc: block: Fix cmd error reset failure path Commit 4e1f780032c5 ("mmc: block: break out mmc_blk_rw_cmd_abort()") assumed the request had not completed, but in one case it had. Fix that. Fixes: 4e1f780032c5 ("mmc: block: break out mmc_blk_rw_cmd_abort()") Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2602b740e45cc64feb55d5a9ee8db744ab3becbb Author: Adrian Hunter Date: Mon Mar 13 14:36:32 2017 +0200 mmc: block: Fix is_waiting_last_req set incorrectly Commit 15520111500c ("mmc: core: Further fix thread wake-up") allowed a queue to release the host with is_waiting_last_req set to true. A queue waiting to claim the host will not reset it, which can result in the queue getting stuck in a loop. Fixes: 15520111500c ("mmc: core: Further fix thread wake-up") Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+) commit 773dc118756b1f38766063e90e582016be868f09 Author: Guenter Roeck Date: Wed Mar 1 14:11:47 2017 -0800 mmc: core: Fix access to HS400-ES devices HS400-ES devices fail to initialize with the following error messages. mmc1: power class selection to bus width 8 ddr 0 failed mmc1: error -110 whilst initialising MMC card This was seen on Samsung Chromebook Plus. Code analysis points to commit 3d4ef329757c ("mmc: core: fix multi-bit bus width without high-speed mode"), which attempts to set the bus width for all but HS200 devices unconditionally. However, for HS400-ES, the bus width is already selected. Cc: Anssi Hannula Cc: Douglas Anderson Cc: Brian Norris Fixes: 3d4ef329757c ("mmc: core: fix multi-bit bus width ...") Signed-off-by: Guenter Roeck Reviewed-by: Douglas Anderson Reviewed-by: Shawn Lin Tested-by: Heiko Stuebner Cc: Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c31b087348cb2b5e668261f2eee2f224b3780b5 Author: Ville Syrjälä Date: Mon Feb 13 19:58:18 2017 +0200 drm/i915: Reject HDMI 12bpc if the sink doesn't indicate support Check that the sink really declared 12bpc support before we enable it. This should not actually never happen since it's mandatory for HDMI sinks to support 12bpc if they support any deep color modes. But reality disagrees with the theory and there are actually sinks in the wild that violate the spec. v2: Fix the output_types check Update commit message to state that these things are in fact real Cc: stable@vger.kernel.org Cc: Nicholas Sielicki Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99250 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170213175818.24958-1-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma (cherry picked from commit c750bdd3e7e204cc88b32806c3864487a03cd84b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_hdmi.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 16681037e75ce08f2980ac5dbb03414429c7a55d Author: Anssi Hannula Date: Mon Feb 13 14:06:10 2017 +0200 mmc: sdhci-of-arasan: fix incorrect timeout clock sdhci_arasan_get_timeout_clock() divides the frequency it has with (1 << (13 + divisor)). However, the divisor is not some Arasan-specific value, but instead is just the Data Timeout Counter Value from the SDHCI Timeout Control Register. Applying it here like this is wrong as the sdhci driver already takes that value into account when calculating timeouts, and in fact it *sets* that register value based on how long a timeout is wanted. Additionally, sdhci core interprets the .get_timeout_clock callback return value as if it were read from hardware registers, i.e. the unit should be kHz or MHz depending on SDHCI_TIMEOUT_CLK_UNIT capability bit. This bit is set at least on the tested Zynq-7000 SoC. With the tested hardware (SDHCI_TIMEOUT_CLK_UNIT set) this results in too high a timeout clock rate being reported, causing the core to use longer-than-needed timeouts. Additionally, on a partitioned MMC (therefore having erase_group_def bit set) mmc_calc_max_discard() disables discard support as it looks like controller does not support the long timeouts needed for that. Do not apply the extra divisor and return the timeout clock in the expected unit. Tested with a Zynq-7000 SoC and a partitioned Toshiba THGBMAG5A1JBAWR eMMC card. Signed-off-by: Anssi Hannula Fixes: e3ec3a3d11ad ("mmc: arasan: Add driver for Arasan SDHCI") Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 318465adace471387cfd5f768daa64bb4c623695 Author: Andy Yan Date: Mon Feb 13 19:02:39 2017 +0800 dt-bindings: rockchip-dw-mshc: rename RK1108 to RV1108 Rockchip finally named the SOC as RV1108, so change it. Signed-off-by: Andy Yan Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa23b9d1b89fdc34f296f02e496a20aeff5736be Author: Arnd Bergmann Date: Tue Mar 14 13:54:12 2017 +0100 irqchip/mvebu-odmi: Select GENERIC_MSI_IRQ_DOMAIN This driver uses the MSI domain but has no strict dependency on PCI_MSI, so we may run into a build failure when CONFIG_GENERIC_MSI_IRQ_DOMAIN is disabled: drivers/irqchip/irq-mvebu-odmi.c:152:15: error: variable 'odmi_msi_ops' has initializer but incomplete type static struct msi_domain_ops odmi_msi_ops = { ^~~~~~~~~~~~~~ drivers/irqchip/irq-mvebu-odmi.c:155:15: error: variable 'odmi_msi_domain_info' has initializer but incomplete type static struct msi_domain_info odmi_msi_domain_info = { ^~~~~~~~~~~~~~~ drivers/irqchip/irq-mvebu-odmi.c:156:3: error: 'struct msi_domain_info' has no member named 'flags' .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS), ^~~~~ drivers/irqchip/irq-mvebu-odmi.c:156:12: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function) .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS), ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/irqchip/irq-mvebu-odmi.c:156:39: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function); did you mean 'MSI_FLAG_USE_DEF_DOM_OPS'? Selecting the option from this driver seems to solve this nicely, though I could not find any other instance of this in irqchip drivers. Signed-off-by: Arnd Bergmann Acked-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1b2e5ea0b7061be3ffdcd85918c2f428edace4ba Author: Chris Wilson Date: Sun Feb 12 17:19:59 2017 +0000 drm/i915: Always call i915_gem_reset_finish() following i915_gem_reset_prepare() As i915_gem_reset_finish() undoes the steps from i915_gem_reset_prepare() to leave the system in a fully-working state, e.g. to be able to free the breadcrumb signal threads, make sure that we always call it even on the error path. Fixes: da9a796f5475 ("drm/i915: Split GEM resetting into 3 phases") Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit 8d613c539c74fa9055f88f4116196d7c820bd98f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11abbc9f39e002a2b25657e00abac8056cb39e93 Author: Jyri Sarha Date: Wed Mar 1 10:30:28 2017 +0200 drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled Touching HW while clocks are off is a serious error and for instance breaks suspend functionality. After this patch tilcdc_crtc_update_fb() always updates the primary plane's framebuffer pointer, increases fb's reference count and stores vblank event. tilcdc_crtc_update_fb() only writes the fb's DMA address to HW if the crtc is enabled, as tilcdc_crtc_enable() takes care of writing the address on enable. This patch also refactors the tilcdc_crtc_update_fb() a bit. Number of subsequent small changes had made it almost unreadable. There should be no other functional changes but checking the CRTC's enable state. However, the locking goes a bit differently and some of the redundant checks have been removed in this new version. The enable_lock should be enough to protect the access to tilcdc_crtc->enabled. The irq_lock protects the access to last_vblank and next_fb. The check for vrefresh and last_vblank being valid is redundant, as the vrefresh should be always valid if the CRTC is enabled and now last_vblank should be too, because it is initialized to current time when CRTC raster is enabled. If for some reason the values are not correctly initialized the division by zero warning is quite appropriate. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit abf8315f71dc5a2ee56fb60830dcb2861982dc91 Author: Jyri Sarha Date: Tue Jan 31 16:18:42 2017 +0200 drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create() Fix badly hardcoded return return value under fail-label. All goto branches to the label set the "ret"-variable accordingly. Signed-off-by: Jyri Sarha Reviewed-by: Gabriel Krisman Bertazi drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f68d591d4765b2e1ce9d916ac7bc5583285c4ad Author: Chris Wilson Date: Mon Mar 13 17:06:17 2017 +0000 drm/i915: Stop using RP_DOWN_EI on Baytrail On Baytrail, we manually calculate busyness over the evaluation interval to avoid issues with miscaluations with RC6 enabled. However, it turns out that the DOWN_EI interrupt generator is completely bust - it operates in two modes, continuous or never. Neither of which are conducive to good behaviour. Stop unmask the DOWN_EI interrupt and just compute everything from the UP_EI which does seem to correspond to the desired interval. v2: Fixup gen6_rps_pm_mask() as well v3: Inline vlv_c0_above() to combine the now identical elapsed calculation for up/down and simplify the threshold testing Fixes: 43cf3bf084ba ("drm/i915: Improved w/a for rps on Baytrail") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v4.1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170309211232.28878-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170313170617.31564-1-chris@chris-wilson.co.uk (cherry picked from commit e0e8c7cb6eb68e9256de2d8cbeb481d3701c05ac) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 73 ++++++++++++++++------------------------- drivers/gpu/drm/i915/intel_pm.c | 5 +-- 3 files changed, 32 insertions(+), 48 deletions(-) commit 0f5418e564ac6452b9086295646e602a9addc4bf Author: Kenneth Graunke Date: Mon Mar 13 17:04:33 2017 +0000 drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. This patch makes the I915_PARAM_HAS_EXEC_CONSTANTS getparam return 0 (indicating the optional feature is not supported), and makes execbuf always return -EINVAL if the flags are used. Apparently, no userspace ever shipped which used this optional feature: I checked the git history of Mesa, xf86-video-intel, libva, and Beignet, and there were zero commits showing a use of these flags. Kernel commit 72bfa19c8deb4 apparently introduced the feature prematurely. According to Chris, the intention was to use this in cairo-drm, but "the use was broken for gen6", so I don't think it ever happened. 'relative_constants_mode' has always been tracked per-device, but this has actually been wrong ever since hardware contexts were introduced, as the INSTPM register is saved (and automatically restored) as part of the render ring context. The software per-device value could therefore get out of sync with the hardware per-context value. This meant that using them is actually unsafe: a client which tried to use them could damage the state of other clients, causing the GPU to interpret their BO offsets as absolute pointers, leading to bogus memory reads. These flags were also never ported to execlist mode, making them no-ops on Gen9+ (which requires execlists), and Gen8 in the default mode. On Gen8+, userspace can write these registers directly, achieving the same effect. On Gen6-7.5, it likely makes sense to extend the command parser to support them. I don't think anyone wants this on Gen4-5. Based on a patch by Dave Gordon. v3: Return -ENODEV for the getparam, as this is what we do for other obsolete features. Suggested by Chris Wilson. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448 Signed-off-by: Kenneth Graunke Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170215093446.21291-1-kenneth@whitecape.org Acked-by: Daniel Vetter Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170313170433.26843-1-chris@chris-wilson.co.uk (cherry picked from commit ef0f411f51475f4eebf9fc1b19a85be698af19ff) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 4 +-- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem.c | 2 -- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 52 ++---------------------------- 4 files changed, 3 insertions(+), 57 deletions(-) commit 35a3abfd198e6c69a6644784bb09a2d951fc6b21 Author: Chris Wilson Date: Mon Mar 13 17:02:31 2017 +0000 drm/i915: Only enable hotplug interrupts if the display interrupts are enabled In order to prevent accessing the hpd registers outside of the display power wells, we should refrain from writing to the registers before the display interrupts are enabled. [ 4.740136] WARNING: CPU: 1 PID: 221 at drivers/gpu/drm/i915/intel_uncore.c:795 __unclaimed_reg_debug+0x44/0x50 [i915] [ 4.740155] Unclaimed read from register 0x1e1110 [ 4.740168] Modules linked in: i915(+) intel_gtt drm_kms_helper prime_numbers [ 4.740190] CPU: 1 PID: 221 Comm: systemd-udevd Not tainted 4.10.0-rc6+ #384 [ 4.740203] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 4.740220] Call Trace: [ 4.740236] dump_stack+0x4d/0x6f [ 4.740251] __warn+0xc1/0xe0 [ 4.740265] warn_slowpath_fmt+0x4a/0x50 [ 4.740281] ? insert_work+0x77/0xc0 [ 4.740355] ? fwtable_write32+0x90/0x130 [i915] [ 4.740431] __unclaimed_reg_debug+0x44/0x50 [i915] [ 4.740507] fwtable_read32+0xd8/0x130 [i915] [ 4.740575] i915_hpd_irq_setup+0xa5/0x100 [i915] [ 4.740649] intel_hpd_init+0x68/0x80 [i915] [ 4.740716] i915_driver_load+0xe19/0x1380 [i915] [ 4.740784] i915_pci_probe+0x32/0x90 [i915] [ 4.740799] pci_device_probe+0x8b/0xf0 [ 4.740815] driver_probe_device+0x2b6/0x450 [ 4.740828] __driver_attach+0xda/0xe0 [ 4.740841] ? driver_probe_device+0x450/0x450 [ 4.740853] bus_for_each_dev+0x5b/0x90 [ 4.740865] driver_attach+0x19/0x20 [ 4.740878] bus_add_driver+0x166/0x260 [ 4.740892] driver_register+0x5b/0xd0 [ 4.740906] ? 0xffffffffa0166000 [ 4.740920] __pci_register_driver+0x47/0x50 [ 4.740985] i915_init+0x5c/0x5e [i915] [ 4.740999] do_one_initcall+0x3e/0x160 [ 4.741015] ? __vunmap+0x7c/0xc0 [ 4.741029] ? kmem_cache_alloc+0xcf/0x120 [ 4.741045] do_init_module+0x55/0x1c4 [ 4.741060] load_module+0x1f3f/0x25b0 [ 4.741073] ? __symbol_put+0x40/0x40 [ 4.741086] ? kernel_read_file+0x100/0x190 [ 4.741100] SYSC_finit_module+0xbc/0xf0 [ 4.741112] SyS_finit_module+0x9/0x10 [ 4.741125] entry_SYSCALL_64_fastpath+0x17/0x98 [ 4.741135] RIP: 0033:0x7f8559a140f9 [ 4.741145] RSP: 002b:00007fff7509a3e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 4.741161] RAX: ffffffffffffffda RBX: 00007f855aba02d1 RCX: 00007f8559a140f9 [ 4.741172] RDX: 0000000000000000 RSI: 000055b6db0914f0 RDI: 0000000000000011 [ 4.741183] RBP: 0000000000020000 R08: 0000000000000000 R09: 000000000000000e [ 4.741193] R10: 0000000000000011 R11: 0000000000000246 R12: 000055b6db0854d0 [ 4.741204] R13: 000055b6db091150 R14: 0000000000000000 R15: 000055b6db035924 v2: Set dev_priv->display_irqs_enabled to true for all platforms other than vlv/chv that manually control the display power domain. Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97798 Suggested-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Lyude Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Hans de Goede Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170215131547.5064-1-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/20170313170231.18633-1-chris@chris-wilson.co.uk (cherry picked from commit 262fd485ac6b476479f41f00bb104f6a1766ae66) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_hotplug.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) commit 4565bf58d45b8aded94e446666839955cdb5030c Author: Chris Wilson Date: Mon Mar 13 16:59:58 2017 +0000 drm/i915: Disable engine->irq_tasklet around resets When we restart the engines, and we have active requests, a request on the first engine may complete and queue a request to the second engine before we try to restart the second engine. That queueing of the request may race with the engine to restart, and so may corrupt the current state. Disabling the engine->irq_tasklet prevents the two paths from writing into ELSP simultaneously (and modifyin the execlists_port[] at the same time). Include fixup 1d309634bcf4 ("drm/i915: Kill the tasklet then disable") Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Testcase: igt/gem_exec_fence/await-hang Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-3-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/20170313165958.13970-2-chris@chris-wilson.co.uk (cherry picked from commit 1f7b847d72c3583df5048d83bd945d0c2c524c28) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit da9a796f5475b4d3a339083af719982b7ab4a12b Author: Chris Wilson Date: Mon Mar 13 16:59:57 2017 +0000 drm/i915: Split GEM resetting into 3 phases Currently we do a reset prepare/finish around the call to reset the GPU, but it looks like we need a later stage after the hw has been reinitialised to allow GEM to restart itself. Start by splitting the 2 GEM phases into 3: prepare - before the reset, check if GEM recovered, then stop GEM reset - after the reset, update GEM bookkeeping finish - after the re-initialisation following the reset, restart GEM Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-2-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/20170313165958.13970-1-chris@chris-wilson.co.uk (cherry picked from commit d80270931314a88d79d9bd5e0a5df93c12196375) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) commit 60b89f1928af80b546b5c3fd8714a62f6f4b8844 Author: Nicolas Ferre Date: Tue Mar 14 09:38:04 2017 +0100 ARM: at91: pm: cpu_idle: switch DDR to power-down mode On some DDR controllers, compatible with the sama5d3 one, the sequence to enter/exit/re-enter the self-refresh mode adds more constrains than what is currently written in the at91_idle driver. An actual access to the DDR chip is needed between exit and re-enter of this mode which is somehow difficult to implement. This sequence can completely hang the SoC. It is particularly experienced on parts which embed a L2 cache if the code run between IDLE calls fits in it... Moreover, as the intention is to enter and exit pretty rapidly from IDLE, the power-down mode is a good candidate. So now we use power-down instead of self-refresh. As we can simplify the code for sama5d3 compatible DDR controllers, we instantiate a new sama5d3_ddr_standby() function. Signed-off-by: Nicolas Ferre Cc: # v4.1+ Fixes: 017b5522d5e3 ("ARM: at91: Add new binding for sama5d3-ddramc") Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 6e9f44eaaef0df7b846e9316fa9ca72a02025d44 Author: Dan Williams Date: Thu Mar 9 11:32:28 2017 -0600 USB: serial: option: add Quectel UC15, UC20, EC21, and EC25 modems Add Quectel UC15, UC20, EC21, and EC25. The EC20 is handled by qcserial due to a USB VID/PID conflict with an existing Acer device. Signed-off-by: Dan Williams Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 0043c1dfbec7b6e2427409059b05347d6f51aa9f Author: Lee Jones Date: Wed Feb 8 09:24:25 2017 +0000 serial: st-asc: Use new GPIOD API to obtain RTS pin The commits mentioned below adapt the GPIO API to allow more information to be passed directly through devm_get_gpiod_from_child() in the first instance. This facilitates the removal of subsequent calls, such as gpiod_direction_output(). This patch firstly moves to utilise the new API and secondly removes the now superfluous call do set the direction. Reported-by: Stephen Rothwell Suggested-by: Boris Brezillon Signed-off-by: Lee Jones [Also drop the header file dummies that only this driver was using] Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij drivers/tty/serial/st-asc.c | 11 ++++++----- include/linux/gpio/consumer.h | 16 ---------------- 2 files changed, 6 insertions(+), 21 deletions(-) commit bc1e2154542071e3cfe1734b143af9b8bdacf8bd Author: Bin Liu Date: Fri Mar 10 14:43:37 2017 -0600 usb: musb: fix possible spinlock deadlock The DSPS glue calls del_timer_sync() in its musb_platform_disable() implementation, which requires the caller to not hold a lock. But musb_remove() calls musb_platform_disable() will musb->lock held. This could causes spinlock deadlock. So change musb_remove() to call musb_platform_disable() without holds musb->lock. This doesn't impact the musb_platform_disable implementation in other glue drivers. root@am335x-evm:~# modprobe -r musb-dsps [ 126.134879] musb-hdrc musb-hdrc.1: remove, state 1 [ 126.140465] usb usb2: USB disconnect, device number 1 [ 126.146178] usb 2-1: USB disconnect, device number 2 [ 126.416985] musb-hdrc musb-hdrc.1: USB bus 2 deregistered [ 126.423943] [ 126.425525] ====================================================== [ 126.431997] [ INFO: possible circular locking dependency detected ] [ 126.438564] 4.11.0-rc1-00003-g1557f13bca04-dirty #77 Not tainted [ 126.444852] ------------------------------------------------------- [ 126.451414] modprobe/778 is trying to acquire lock: [ 126.456523] (((&glue->timer))){+.-...}, at: [] del_timer_sync+0x0/0xd0 [ 126.464403] [ 126.464403] but task is already holding lock: [ 126.470511] (&(&musb->lock)->rlock){-.-...}, at: [] musb_remove+0x50/0x1 30 [musb_hdrc] [ 126.479965] [ 126.479965] which lock already depends on the new lock. [ 126.479965] [ 126.488531] [ 126.488531] the existing dependency chain (in reverse order) is: [ 126.496368] [ 126.496368] -> #1 (&(&musb->lock)->rlock){-.-...}: [ 126.502968] otg_timer+0x80/0xec [musb_dsps] [ 126.507990] call_timer_fn+0xb4/0x390 [ 126.512372] expire_timers+0xf0/0x1fc [ 126.516754] run_timer_softirq+0x80/0x178 [ 126.521511] __do_softirq+0xc4/0x554 [ 126.525802] irq_exit+0xe8/0x158 [ 126.529735] __handle_domain_irq+0x58/0xb8 [ 126.534583] __irq_usr+0x54/0x80 [ 126.538507] [ 126.538507] -> #0 (((&glue->timer))){+.-...}: [ 126.544636] del_timer_sync+0x40/0xd0 [ 126.549066] musb_remove+0x6c/0x130 [musb_hdrc] [ 126.554370] platform_drv_remove+0x24/0x3c [ 126.559206] device_release_driver_internal+0x14c/0x1e0 [ 126.565225] bus_remove_device+0xd8/0x108 [ 126.569970] device_del+0x1e4/0x308 [ 126.574170] platform_device_del+0x24/0x8c [ 126.579006] platform_device_unregister+0xc/0x20 [ 126.584394] dsps_remove+0x14/0x30 [musb_dsps] [ 126.589595] platform_drv_remove+0x24/0x3c [ 126.594432] device_release_driver_internal+0x14c/0x1e0 [ 126.600450] driver_detach+0x38/0x6c [ 126.604740] bus_remove_driver+0x4c/0xa0 [ 126.609407] SyS_delete_module+0x11c/0x1e4 [ 126.614252] __sys_trace_return+0x0/0x10 Fixes: ea2f35c01d5ea ("usb: musb: Fix sleeping function called from invalid context for hdrc glue") Cc: #4.9+ Acked-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b7ad496084e3d8ffa844a02e0f7f76f3eb82203 Author: Bin Liu Date: Fri Mar 10 14:43:36 2017 -0600 usb: musb: dsps: fix iounmap in error and exit paths Cleanly iounmap the pointer in error and exit paths. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0090114d336a9604aa2d90bc83f20f7cd121b76c Author: Bin Liu Date: Fri Mar 10 14:43:35 2017 -0600 usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer The CPPI 4.1 driver polls register to workaround the premature TX interrupt issue, but it causes audio playback underrun when triggered in Isoch transfers. Isoch doesn't do back-to-back transfers, the TX should be done by the time the next transfer is scheduled. So skip this polling workaround for Isoch transfer. Fixes: a655f481d83d6 ("usb: musb: musb_cppi41: handle pre-mature TX complete interrupt") Cc: #4.1+ Reported-by: Alexandre Bailon Acked-by: Sebastian Andrzej Siewior Tested-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 3243367b209faed5c320a4e5f9a565ee2a2ba958 Author: Samuel Thibault Date: Mon Mar 13 20:50:08 2017 +0100 usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk Some USB 2.0 devices erroneously report millisecond values in bInterval. The generic config code manages to catch most of them, but in some cases it's not completely enough. The case at stake here is a USB 2.0 braille device, which wants to announce 10ms and thus sets bInterval to 10, but with the USB 2.0 computation that yields to 64ms. It happens that one can type fast enough to reach this interval and get the device buffers overflown, leading to problematic latencies. The generic config code does not catch this case because the 64ms is considered a sane enough value. This change thus adds a USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL quirk to mark devices which actually report milliseconds in bInterval, and marks Vario Ultra devices as needing it. Signed-off-by: Samuel Thibault Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 10 ++++++++++ drivers/usb/core/quirks.c | 8 ++++++++ include/linux/usb/quirks.h | 6 ++++++ 3 files changed, 24 insertions(+) commit 4ce362711d78a4999011add3115b8f4b0bc25e8c Author: Johan Hovold Date: Mon Mar 13 13:47:53 2017 +0100 uwb: i1480-dfu: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Note that the dereference happens in the cmd and wait_init_done callbacks which are called during probe. Fixes: 1ba47da52712 ("uwb: add the i1480 DFU driver") Cc: stable # 2.6.28 Cc: Inaky Perez-Gonzalez Cc: David Vrabel Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/uwb/i1480/dfu/usb.c | 3 +++ 1 file changed, 3 insertions(+) commit daf229b15907fbfdb6ee183aac8ca428cb57e361 Author: Johan Hovold Date: Mon Mar 13 13:47:52 2017 +0100 uwb: hwa-rc: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Note that the dereference happens in the start callback which is called during probe. Fixes: de520b8bd552 ("uwb: add HWA radio controller driver") Cc: stable # 2.6.28 Cc: Inaky Perez-Gonzalez Cc: David Vrabel Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/uwb/hwa-rc.c | 3 +++ 1 file changed, 3 insertions(+) commit 03ace948a4eb89d1cf51c06afdfc41ebca5fdb27 Author: Johan Hovold Date: Mon Mar 13 13:47:51 2017 +0100 USB: wusbcore: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. This specifically fixes the NULL-pointer dereference when probing HWA HC devices. Fixes: df3654236e31 ("wusb: add the Wire Adapter (WA) core") Cc: stable # 2.6.28 Cc: Inaky Perez-Gonzalez Cc: David Vrabel Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-hc.c | 3 +++ 1 file changed, 3 insertions(+) commit f259ca3eed6e4b79ac3d5c5c9fb259fb46e86217 Author: Johan Hovold Date: Mon Mar 13 13:47:50 2017 +0100 USB: uss720: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Note that the endpoint access that causes the NULL-deref is currently only used for debugging purposes during probe so the oops only happens when dynamic debugging is enabled. This means the driver could be rewritten to continue to accept device with only two endpoints, should such devices exist. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/uss720.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1dc56c52d2484be09c7398a5207d6b11a4256be9 Author: Johan Hovold Date: Mon Mar 13 13:47:49 2017 +0100 USB: lvtest: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should the probed device lack endpoints. Note that this driver does not bind to any devices by default. Fixes: ce21bfe603b3 ("USB: Add LVS Test device driver") Cc: stable # 3.17 Cc: Pratyush Anand Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 4 ++++ 1 file changed, 4 insertions(+) commit b0addd3fa6bcd119be9428996d5d4522479ab240 Author: Johan Hovold Date: Mon Mar 13 13:47:48 2017 +0100 USB: idmouse: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/idmouse.c | 3 +++ 1 file changed, 3 insertions(+) commit 72ef9c4125c7b257e3a714d62d778ab46583d6a3 Author: Hannes Frederic Sowa Date: Mon Mar 13 00:01:30 2017 +0100 dccp: fix memory leak during tear-down of unsuccessful connection request This patch fixes a memory leak, which happens if the connection request is not fulfilled between parsing the DCCP options and handling the SYN (because e.g. the backlog is full), because we forgot to free the list of ack vectors. Reported-by: Jianwen Ji Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/dccp/ccids/ccid2.c | 1 + 1 file changed, 1 insertion(+) commit b20e2d54789c6acbf6bd0efdbec2cf5fa4d90ef1 Author: Hannes Frederic Sowa Date: Mon Mar 13 00:00:26 2017 +0100 tun: fix premature POLLOUT notification on tun devices aszlig observed failing ssh tunnels (-w) during initialization since commit cc9da6cc4f56e0 ("ipv6: addrconf: use stable address generator for ARPHRD_NONE"). We already had reports that the mentioned commit breaks Juniper VPN connections. I can't clearly say that the Juniper VPN client has the same problem, but it is worth a try to hint to this patch. Because of the early generation of link local addresses, the kernel now can start asking for routers on the local subnet much earlier than usual. Those router solicitation packets arrive inside the ssh channels and should be transmitted to the tun fd before the configuration scripts might have upped the interface and made it ready for transmission. ssh polls on the interface and receives back a POLL_OUT. It tries to send the earily router solicitation packet to the tun interface. Unfortunately it hasn't been up'ed yet by config scripts, thus failing with -EIO. ssh doesn't retry again and considers the tun interface broken forever. Link: https://bugzilla.kernel.org/show_bug.cgi?id=121131 Fixes: cc9da6cc4f56 ("ipv6: addrconf: use stable address generator for ARPHRD_NONE") Cc: Bjørn Mork Reported-by: Valdis Kletnieks Cc: Valdis Kletnieks Reported-by: Jonas Lippuner Cc: Jonas Lippuner Reported-by: aszlig Cc: aszlig Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/tun.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 45caeaa5ac0b4b11784ac6f932c0ad4c6b67cda0 Author: Jon Maxwell Date: Fri Mar 10 16:40:33 2017 +1100 dccp/tcp: fix routing redirect race As Eric Dumazet pointed out this also needs to be fixed in IPv6. v2: Contains the IPv6 tcp/Ipv6 dccp patches as well. We have seen a few incidents lately where a dst_enty has been freed with a dangling TCP socket reference (sk->sk_dst_cache) pointing to that dst_entry. If the conditions/timings are right a crash then ensues when the freed dst_entry is referenced later on. A Common crashing back trace is: #8 [] page_fault at ffffffff8163e648 [exception RIP: __tcp_ack_snd_check+74] . . #9 [] tcp_rcv_established at ffffffff81580b64 #10 [] tcp_v4_do_rcv at ffffffff8158b54a #11 [] tcp_v4_rcv at ffffffff8158cd02 #12 [] ip_local_deliver_finish at ffffffff815668f4 #13 [] ip_local_deliver at ffffffff81566bd9 #14 [] ip_rcv_finish at ffffffff8156656d #15 [] ip_rcv at ffffffff81566f06 #16 [] __netif_receive_skb_core at ffffffff8152b3a2 #17 [] __netif_receive_skb at ffffffff8152b608 #18 [] netif_receive_skb at ffffffff8152b690 #19 [] vmxnet3_rq_rx_complete at ffffffffa015eeaf [vmxnet3] #20 [] vmxnet3_poll_rx_only at ffffffffa015f32a [vmxnet3] #21 [] net_rx_action at ffffffff8152bac2 #22 [] __do_softirq at ffffffff81084b4f #23 [] call_softirq at ffffffff8164845c #24 [] do_softirq at ffffffff81016fc5 #25 [] irq_exit at ffffffff81084ee5 #26 [] do_IRQ at ffffffff81648ff8 Of course it may happen with other NIC drivers as well. It's found the freed dst_entry here: 224 static bool tcp_in_quickack_mode(struct sock *sk)↩ 225 {↩ 226 ▹ const struct inet_connection_sock *icsk = inet_csk(sk);↩ 227 ▹ const struct dst_entry *dst = __sk_dst_get(sk);↩ 228 ↩ 229 ▹ return (dst && dst_metric(dst, RTAX_QUICKACK)) ||↩ 230 ▹ ▹ (icsk->icsk_ack.quick && !icsk->icsk_ack.pingpong);↩ 231 }↩ But there are other backtraces attributed to the same freed dst_entry in netfilter code as well. All the vmcores showed 2 significant clues: - Remote hosts behind the default gateway had always been redirected to a different gateway. A rtable/dst_entry will be added for that host. Making more dst_entrys with lower reference counts. Making this more probable. - All vmcores showed a postitive LockDroppedIcmps value, e.g: LockDroppedIcmps 267 A closer look at the tcp_v4_err() handler revealed that do_redirect() will run regardless of whether user space has the socket locked. This can result in a race condition where the same dst_entry cached in sk->sk_dst_entry can be decremented twice for the same socket via: do_redirect()->__sk_dst_check()-> dst_release(). Which leads to the dst_entry being prematurely freed with another socket pointing to it via sk->sk_dst_cache and a subsequent crash. To fix this skip do_redirect() if usespace has the socket locked. Instead let the redirect take place later when user space does not have the socket locked. The dccp/IPv6 code is very similar in this respect, so fixing it there too. As Eric Garver pointed out the following commit now invalidates routes. Which can set the dst->obsolete flag so that ipv4_dst_check() returns null and triggers the dst_release(). Fixes: ceb3320610d6 ("ipv4: Kill routes during PMTU/redirect updates.") Cc: Eric Garver Cc: Hannes Sowa Signed-off-by: Jon Maxwell Signed-off-by: David S. Miller net/dccp/ipv4.c | 3 ++- net/dccp/ipv6.c | 8 +++++--- net/ipv4/tcp_ipv4.c | 3 ++- net/ipv6/tcp_ipv6.c | 8 +++++--- 4 files changed, 14 insertions(+), 8 deletions(-) commit 02bb56ddc6711639c549d81c7b9f6d845da243a9 Author: Zhao Qiang Date: Tue Mar 14 09:38:33 2017 +0800 ucc/hdlc: fix two little issue 1. modify bd_status from u32 to u16 in function hdlc_rx_done, because bd_status register is 16bits 2. write bd_length register before writing bd_status register Signed-off-by: Zhao Qiang Signed-off-by: David S. Miller drivers/net/wan/fsl_ucc_hdlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23f963e91fd81f44f6b316b1c24db563354c6be8 Author: Matthias Kaehlcke Date: Mon Mar 13 14:30:29 2017 -0700 dmaengine: Fix array index out of bounds warning in __get_unmap_pool() This fixes the following warning when building with clang and CONFIG_DMA_ENGINE_RAID=n : drivers/dma/dmaengine.c:1102:11: error: array index 2 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds] return &unmap_pool[2]; ^ ~ drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here static struct dmaengine_unmap_pool unmap_pool[] = { ^ drivers/dma/dmaengine.c:1104:11: error: array index 3 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds] return &unmap_pool[3]; ^ ~ drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here static struct dmaengine_unmap_pool unmap_pool[] = { Signed-off-by: Matthias Kaehlcke Reviewed-by: Dan Williams Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 2 ++ 1 file changed, 2 insertions(+) commit 22487b66594f18f2a7c211f3ab8bb02dec74d37b Author: Shivasharan S Date: Fri Mar 10 03:22:15 2017 -0800 scsi: megaraid_sas: Driver version upgrade 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.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 874d025da667d19b728141437ccbefe9dbaf9e7b Author: Shivasharan S Date: Fri Mar 10 03:22:14 2017 -0800 scsi: megaraid_sas: raid6 also require cpuSel check same as raid5 Without this fix, raid6 performance will not be optimal. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49524b3c6e12375627ddd870613fcc6b24909898 Author: Shivasharan S Date: Fri Mar 10 03:22:13 2017 -0800 scsi: megaraid_sas: add correct return type check for ldio hint logic for raid1 Return value check of atomic_dec_if_positive is required as it returns old value minus one. Without this fix, driver will send small ios to firmware path and that will be a performance issue. Not critical, but good to have r1_ldio_hint as default value in sdev private. 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_base.c | 3 +++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 64ff64b90e62c860772fd0be50b7cfcef1d8a9b2 Author: Shivasharan S Date: Fri Mar 10 03:22:12 2017 -0800 scsi: megaraid_sas: enable intx only if msix request fails Without this fix, driver will enable INTx Interrupt pin even though MSI-x vectors are enabled. See below lspci output. DisINTx is unset for MSIx setup. lspci -s 85:00.0 -vvv |grep INT |grep Control Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- After applying this fix, driver will enable INTx Interrupt pin only if Legacy interrupt method is required. See below lspci output. DisINTx is set for MSIx setup. lspci -s 85:00.0 -vvv |grep INT |grep Control Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+ Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 3f8ed54aee491bbb83656592c2d0ad7b78d045ca Author: Srinivas Pandruvada Date: Mon Mar 13 18:30:12 2017 -0700 cpufreq: intel_pstate: Correct frequency setting in the HWP mode In the functions intel_pstate_hwp_set(), min/max range from HWP capability MSR along with max_perf_pct and min_perf_pct, is used to set the HWP request MSR. In some cases this doesn't result in the correct HWP max/min in HWP request. For example: In the following case: HWP capabilities from MSR 0x771 0x70a1220 Here cpufreq min/max frequencies from above MSR dump are 700MHz and 3.2GHz respectively. This will result in hwp_min = 0x07 hwp_max = 0x20 To limit max frequency to 2GHz: perf_limits->max_perf_pct = 63 (2GHz as a percent of 3.2GHz rounded up) With the current calculation: adj_range = max_perf_pct * range / 100; adj_range = 63 * (32 - 7) / 100 adj_range = 15 max = hw_min + adj_range; max = 7 + 15 = 22 This will result in HWP request of 0x160f, which will result in a frequency cap of 2.2GHz not 2GHz. The problem with the above calculation is that hwp_min of 7 is treated as 0% in the range. But max_perf_pct is calculated with respect to minimum as 0 and max as 3.2GHz or hwp_max, so adding hwp_min to it will result in more than the desired. Since the min_perf_pct and max_perf_pct is already a percent of max frequency or hwp_max, this min/max HWP request value can be calculated directly applying these percentage to hwp_max. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 542ed784671d4678406c77ed6dd01593a0cdbea1 Author: Timur Tabi Date: Tue Feb 28 14:30:33 2017 -0600 tty: acpi/spcr: QDF2400 E44 checks for wrong OEM revision For Qualcomm Technologies QDF2400 SOCs that are affected by erratum E44, the ACPI oem_revision field is actually set to 1, not 0. Fixes: d8a4995bcea1 ("tty: pl011: Work around QDF2400 E44 stuck BUSY bit") Tested-by: Manoj Iyer Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman drivers/acpi/spcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb5fe0fd626c425ed41842c4318aa7ab6f3c2db7 Merge: 065f3e4 7b9f71f9 Author: Linus Torvalds Date: Mon Mar 13 19:48:22 2017 -0700 Merge tag 'powerpc-4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull some more powerpc fixes from Michael Ellerman: "The main item is the addition of the Power9 Machine Check handler. This was delayed to make sure some details were correct, and is as minimal as possible. The rest is small fixes, two for the Power9 PMU, two dealing with obscure toolchain problems, two for the PowerNV IOMMU code (used by VFIO), and one to fix a crash on 32-bit machines with macio devices due to missing dma_ops. Thanks to: Alexey Kardashevskiy, Cyril Bur, Larry Finger, Madhavan Srinivasan, Nicholas Piggin" * tag 'powerpc-4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: POWER9 machine check handler powerpc/64s: allow machine check handler to set severity and initiator powerpc/64s: fix handling of non-synchronous machine checks powerpc/pmac: Fix crash in dma-mapping.h with NULL dma_ops powerpc/powernv/ioda2: Update iommu table base on ownership change powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested selftests/powerpc: Replace stxvx and lxvx with stxvd2x/lxvd2x powerpc/perf: Handle sdar_mode for marked event in power9 powerpc/perf: Fix perf_get_data_addr() for power9 DD1 powerpc/boot: Fix zImage TOC alignment commit b15bfbe6427712d1b992bf806a6df9c05002a0a4 Author: James Hogan Date: Sat Mar 4 13:09:58 2017 +0000 serial: 8250_dw: Fix breakage when HAVE_CLK=n Commit 6a171b299379 ("serial: 8250_dw: Allow hardware flow control to be used") recently broke the 8250_dw driver on platforms which don't select HAVE_CLK, as dw8250_set_termios() gets confused by the behaviour of the fallback HAVE_CLK=n clock API in linux/clk.h which pretends everything is fine but returns (valid) NULL clocks and 0 HZ clock rates. That 0 rate is written into the uartclk resulting in a crash at boot, e.g. on Cavium Octeon III based UTM-8 we get something like this: 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 41, base_baud = 25000000) is a OCTEON ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1 at drivers/tty/serial/serial_core.c:441 uart_get_baud_rate+0xfc/0x1f0 ... Call Trace: ... [] uart_get_baud_rate+0xfc/0x1f0 [] serial8250_do_set_termios+0xb0/0x440 [] uart_set_options+0xe8/0x190 [] serial8250_console_setup+0x84/0x158 [] univ8250_console_setup+0x54/0x70 [] register_console+0x1c8/0x418 [] uart_add_one_port+0x434/0x4b0 [] serial8250_register_8250_port+0x2d8/0x440 [] dw8250_probe+0x388/0x5e8 ... The clock API is defined such that NULL is a valid clock handle so it wouldn't be right to check explicitly for NULL. Instead treat a clk_round_rate() return value of 0 as an error which prevents uartclk being overwritten. Fixes: 6a171b299379 ("serial: 8250_dw: Allow hardware flow control to be used") Signed-off-by: James Hogan Cc: Kefeng Wang Cc: David Daney Cc: Russell King Cc: linux-serial@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: bcm-kernel-feedback-list@broadcom.com Reviewed-by: Andy Shevchenko Reviewed-by: Jason Uy Reviewed-by: Heiko Stuebner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 2 ++ 1 file changed, 2 insertions(+) commit 09498087f922bb623b66db9e89c6fd11a3799867 Author: Heiko Stuebner Date: Thu Mar 9 07:41:16 2017 +0100 serial: 8250_dw: Honor clk_round_rate errors in dw8250_set_termios clk_round_rate returns a signed long and may possibly return errors in it, for example if there is no possible rate. Till now dw8250_set_termios ignored any error, the signednes and would just use the value as input to clk_set_rate. This of course falls apart if there is an actual error, so check for errors and only try to set a rate if the value is actually valid. This turned up on some Rockchip platforms after commit 6a171b299379 ("serial: 8250_dw: Allow hardware flow control to be used") enabled set_termios callback in all cases, not only ACPI. Fixes: 6a171b299379 ("serial: 8250_dw: Allow hardware flow control to be used") Signed-off-by: Heiko Stuebner Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c80498e36d4ef3e24599d363c622fbf22a1293cc Author: Nicolas Dichtel Date: Mon Mar 13 16:24:03 2017 +0100 vxlan: fix ovs support The required changes in the function vxlan_dev_create() were missing in commit 8bcdc4f3a20b. The vxlan device is not registered anymore after this patch and the error path causes an stack dump: WARNING: CPU: 3 PID: 1498 at net/core/dev.c:6713 rollback_registered_many+0x9d/0x3f0 Fixes: 8bcdc4f3a20b ("vxlan: add changelink support") CC: Roopa Prabhu Signed-off-by: Nicolas Dichtel Acked-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 73 +++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 33 deletions(-) commit 91864f5852f9996210fad400cf70fb85af091243 Author: Andrey Vagin Date: Sun Mar 12 21:36:18 2017 -0700 net: use net->count to check whether a netns is alive or not The previous idea was to check whether a net namespace is in net_exit_list or not. It doesn't work, because net->exit_list is used in __register_pernet_operations and __unregister_pernet_operations where all namespaces are added to a temporary list to make cleanup in a error case, so list_empty(&net->exit_list) always returns false. Reported-by: Mantas Mikulėnas Fixes: 002d8a1a6c11 ("net: skip genenerating uevents for network namespaces that are exiting") Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit be3606ff739d1c1be36389f8737c577ad87e1f57 Author: Andrey Ryabinin Date: Mon Mar 13 19:33:37 2017 +0300 x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y The kernel doesn't boot with both PROFILE_ANNOTATED_BRANCHES=y and KASAN=y options selected. With branch profiling enabled we end up calling ftrace_likely_update() before kasan_early_init(). ftrace_likely_update() is built with KASAN instrumentation, so calling it before kasan has been initialized leads to crash. Use DISABLE_BRANCH_PROFILING define to make sure that we don't call ftrace_likely_update() from early code before kasan_early_init(). Fixes: ef7f0d6a6ca8 ("x86_64: add KASan support") Reported-by: Fengguang Wu Signed-off-by: Andrey Ryabinin Cc: kasan-dev@googlegroups.com Cc: Alexander Potapenko Cc: stable@vger.kernel.org Cc: Andrew Morton Cc: lkp@01.org Cc: Dmitry Vyukov Link: http://lkml.kernel.org/r/20170313163337.1704-1-aryabinin@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/kernel/head64.c | 1 + arch/x86/mm/kasan_init_64.c | 1 + 2 files changed, 2 insertions(+) commit 6e7408acd04d06c04981c0c0fb5a2462b16fae4f Author: Rafael J. Wysocki Date: Sun Mar 12 18:12:56 2017 +0100 cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set() Fix the debugfs interface for PID tuning to actually update pid_params.sample_rate_ns on PID parameters updates, as changing pid_params.sample_rate_ms via debugfs has no effect now. Fixes: a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/intel_pstate.c | 1 + 1 file changed, 1 insertion(+) commit 42d5d460ada7d59e96d5f65497166ff3662eb7ea Merge: f40624e e24bce8 Author: Olof Johansson Date: Mon Mar 13 15:12:39 2017 -0700 Merge tag 'omap-for-v4.11/fixes-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.11-rc cycle: - Fix smartreflex platform data regression where I accidentally removed legacy platform data still in use - Fix hypervisor mode for thumb2 kernel - Fix misplaced tpic2810 to move it to right bus - Enable INPUT_MOUSEDEV as a loadable module have mice working - Fix use of gpio-key,wakeup and use wakeup-source instead as this accidentally sneaked in during the merge window - Fix error handling for onenand to properly return error - Remove legacy gpmc-nand.c that's now dead code, this also removes dependency to the MTD tree for further driver changes - Fix device node reference count errors for omap3 and related to it also release device nodes after no longer needed * tag 'omap-for-v4.11/fixes-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Release device node after it is no longer needed. ARM: OMAP2+: Fix device node reference counts ARM: OMAP2+: Remove legacy gpmc-nand.c ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure ARM: dts: am335x-pcm953: Fix legacy wakeup source binding ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build ARM: OMAP3: Fix smartreflex platform data regression Signed-off-by: Olof Johansson commit f40624e85bfe44c789320d0901a7762411790170 Merge: 9aea151 0c2bf9f Author: Olof Johansson Date: Mon Mar 13 15:12:01 2017 -0700 Merge tag 'arm-soc/for-4.11/devicetree-fixes' of http://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-based SoC Device Tree fixes for 4.11, please pull the following: - Jon fixes the UART output on the Broadcom bcm953012k reference board by using the proper clock reference instead of hard-coding the baud rate - Jon also fixes the memory map on the bcm953012k reference board by using the appropriate physical RAM start address - Jon finally fixes the interrupt type for the Cortex A9 global and local timers found in the BCM5301X SoC (Norsthar). * tag 'arm-soc/for-4.11/devicetree-fixes' of http://github.com/Broadcom/stblinux: ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags ARM: dts: BCM5301X: Fix memory start address ARM: dts: BCM5301X: Fix UARTs on bcm953012k Signed-off-by: Olof Johansson commit 9aea151f282df2b82a44fd7058a239334437c266 Author: Linus Walleij Date: Sun Feb 26 01:02:09 2017 +0100 ARM: dts: add the AB8500 clocks to the device tree This adds the AB8500 clocks to the device tree using the new bindings from the clk subsystem, making audio work again. Cc: Lee Jones Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/ste-dbx5x0.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/ste-href.dtsi | 9 --------- arch/arm/boot/dts/ste-snowball.dts | 9 --------- 3 files changed, 19 insertions(+), 18 deletions(-) commit 859bb6d59066b96341020e0991f191631cabe59d Author: Andy Shevchenko Date: Wed Mar 8 13:24:22 2017 +0200 x86/platform/intel-mid: Add power button support for Merrifield Intel Merrifield platform has a Basin Cove PMIC to handle in particular power button events. Add necessary bits to enable it. Signed-off-by: Andy Shevchenko Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170308112422.67533-2-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/platform/intel-mid/device_libs/Makefile | 1 + .../device_libs/platform_mrfld_power_btn.c | 82 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) commit c836e5cf0d0880d6668966476c4ffe727f29f69a Author: Andy Shevchenko Date: Wed Mar 8 13:24:21 2017 +0200 x86/platform/intel-mid: Use common power off sequence Intel Medfield may use common for Intel MID devices power sequence. Remove unneded custom power off stub. While here, remove function forward declaration. Signed-off-by: Andy Shevchenko Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170308112422.67533-1-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/platform/intel-mid/mfld.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit c42f8218610aa09d7d3795e5810387673c1f84b6 Author: Lars-Peter Clausen Date: Thu Mar 9 17:20:04 2017 +0100 iio: sw-device: Fix config group initialization Use the IS_ENABLED() helper macro to ensure that the configfs group is initialized either when configfs is built-in or when configfs is built as a module. Otherwise software device creation will result in undefined behaviour when configfs is built as a module since the configfs group for the device not properly initialized. Similar to commit b2f0c09664b7 ("iio: sw-trigger: Fix config group initialization"). Fixes: 0f3a8c3f34f7 ("iio: Add support for creating IIO devices via configfs") Reported-by: Miguel Robles Signed-off-by: Lars-Peter Clausen Acked-by: Daniel Baluta Cc: Signed-off-by: Jonathan Cameron include/linux/iio/sw_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 065f3e4951f11701729ad310ca0b610f61d91e2a Merge: ce70df0 d1c4e9b Author: Linus Torvalds Date: Mon Mar 13 13:23:43 2017 -0700 Merge tag 'platform-drivers-x86-v4.11-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Asus fixes for the airplane LED and a long awaited fujitsu cleanup. asus-wmi: - Remove quirk_no_rfkill - Detect quirk_no_rfkill from the DSDT fujitsu-laptop: - remove redundant MODULE_ALIAS entries - autodetect LCD interface on all models - simplify acpi_bus_register_driver() error handling - remove redundant forward declarations - replace numeric values with constants - rename FUNC_RFKILL to FUNC_FLAGS - make platform-related variables match naming convention - replace "hotkey" with "laptop" in symbol names - clearly denote backlight-related symbols" * tag 'platform-drivers-x86-v4.11-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: asus-wmi: Remove quirk_no_rfkill platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT platform/x86: fujitsu-laptop: remove redundant MODULE_ALIAS entries platform/x86: fujitsu-laptop: autodetect LCD interface on all models platform/x86: fujitsu-laptop: simplify acpi_bus_register_driver() error handling platform/x86: fujitsu-laptop: remove redundant forward declarations platform/x86: fujitsu-laptop: replace numeric values with constants platform/x86: fujitsu-laptop: rename FUNC_RFKILL to FUNC_FLAGS platform/x86: fujitsu-laptop: make platform-related variables match naming convention platform/x86: fujitsu-laptop: replace "hotkey" with "laptop" in symbol names platform/x86: fujitsu-laptop: clearly denote backlight-related symbols commit a13b2082ece95247779b9995c4e91b4246bed023 Author: Florian Westphal Date: Mon Mar 13 17:38:17 2017 +0100 bridge: drop netfilter fake rtable unconditionally Andreas reports kernel oops during rmmod of the br_netfilter module. Hannes debugged the oops down to a NULL rt6info->rt6i_indev. Problem is that br_netfilter has the nasty concept of adding a fake rtable to skb->dst; this happens in a br_netfilter prerouting hook. A second hook (in bridge LOCAL_IN) is supposed to remove these again before the skb is handed up the stack. However, on module unload hooks get unregistered which means an skb could traverse the prerouting hook that attaches the fake_rtable, while the 'fake rtable remove' hook gets removed from the hooklist immediately after. Fixes: 34666d467cbf1e2e3c7 ("netfilter: bridge: move br_netfilter out of the core") Reported-by: Andreas Karis Debugged-by: Hannes Frederic Sowa Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/bridge/br_input.c | 1 + net/bridge/br_netfilter_hooks.c | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) commit 79e49503efe53a8c51d8b695bedc8a346c5e4a87 Author: Florian Westphal Date: Mon Mar 13 16:24:28 2017 +0100 ipv6: avoid write to a possibly cloned skb ip6_fragment, in case skb has a fraglist, checks if the skb is cloned. If it is, it will move to the 'slow path' and allocates new skbs for each fragment. However, right before entering the slowpath loop, it updates the nexthdr value of the last ipv6 extension header to NEXTHDR_FRAGMENT, to account for the fragment header that will be inserted in the new ipv6-fragment skbs. In case original skb is cloned this munges nexthdr value of another skb. Avoid this by doing the nexthdr update for each of the new fragment skbs separately. This was observed with tcpdump on a bridge device where netfilter ipv6 reassembly is active: tcpdump shows malformed fragment headers as the l4 header (icmpv6, tcp, etc). is decoded as a fragment header. Cc: Hannes Frederic Sowa Reported-by: Andreas Karis Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0d443b70cc92d741cbc1dcbf1079897b3d8bc3cc Author: Mike Travis Date: Tue Mar 7 15:08:42 2017 -0600 x86/platform: Remove warning message for duplicate NMI handlers Remove the WARNING message associated with multiple NMI handlers as there are at least two that are legitimate. These are the KGDB and the UV handlers and both want to be called if the NMI has not been claimed by any other NMI handler. Use of the UNKNOWN NMI call chain dramatically lowers the NMI call rate when high frequency NMI tools are in use, notably the perf tools. It is required on systems that cannot sustain a high NMI call rate without adversely affecting the system operation. Signed-off-by: Mike Travis Reviewed-by: Dimitri Sivanich Cc: Don Zickus Cc: Peter Zijlstra Cc: Russ Anderson Cc: Frank Ramsay Cc: Tony Ernst Link: http://lkml.kernel.org/r/20170307210841.730959611@asylum.americas.sgi.com Signed-off-by: Thomas Gleixner arch/x86/kernel/nmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6e526fdff7be4f13b24f929a04c0e9ae6761291e Author: Johan Hovold Date: Mon Mar 13 13:42:03 2017 +0100 net: wimax/i2400m: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. The endpoints are specifically dereferenced in the i2400m_bootrom_init path during probe (e.g. in i2400mu_tx_bulk_out). Fixes: f398e4240fce ("i2400m/USB: probe/disconnect, dev init/shutdown and reset backends") Cc: Inaky Perez-Gonzalez Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/wimax/i2400m/usb.c | 3 +++ 1 file changed, 3 insertions(+) commit 68c32f9c2a36d410aa242e661506e5b2c2764179 Author: Johan Hovold Date: Mon Mar 13 13:39:01 2017 +0100 isdn/gigaset: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: cf7776dc05b8 ("[PATCH] isdn4linux: Siemens Gigaset drivers - direct USB connection") Cc: stable # 2.6.17 Cc: Hansjoerg Lipp Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/isdn/gigaset/bas-gigaset.c | 3 +++ 1 file changed, 3 insertions(+) commit 67e194007be08d071294456274dd53e0a04fdf90 Author: Sabrina Dubroca Date: Mon Mar 13 13:28:09 2017 +0100 ipv6: make ECMP route replacement less greedy Commit 27596472473a ("ipv6: fix ECMP route replacement") introduced a loop that removes all siblings of an ECMP route that is being replaced. However, this loop doesn't stop when it has replaced siblings, and keeps removing other routes with a higher metric. We also end up triggering the WARN_ON after the loop, because after this nsiblings < 0. Instead, stop the loop when we have taken care of all routes with the same metric as the route being replaced. Reproducer: =========== #!/bin/sh ip netns add ns1 ip netns add ns2 ip -net ns1 link set lo up for x in 0 1 2 ; do ip link add veth$x netns ns2 type veth peer name eth$x netns ns1 ip -net ns1 link set eth$x up ip -net ns2 link set veth$x up done ip -net ns1 -6 r a 2000::/64 nexthop via fe80::0 dev eth0 \ nexthop via fe80::1 dev eth1 nexthop via fe80::2 dev eth2 ip -net ns1 -6 r a 2000::/64 via fe80::42 dev eth0 metric 256 ip -net ns1 -6 r a 2000::/64 via fe80::43 dev eth0 metric 2048 echo "before replace, 3 routes" ip -net ns1 -6 r | grep -v '^fe80\|^ff00' echo ip -net ns1 -6 r c 2000::/64 nexthop via fe80::4 dev eth0 \ nexthop via fe80::5 dev eth1 nexthop via fe80::6 dev eth2 echo "after replace, only 2 routes, metric 2048 is gone" ip -net ns1 -6 r | grep -v '^fe80\|^ff00' Fixes: 27596472473a ("ipv6: fix ECMP route replacement") Signed-off-by: Sabrina Dubroca Acked-by: Nicolas Dichtel Reviewed-by: Xin Long Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 2 ++ 1 file changed, 2 insertions(+) commit 44fee88cea43d3c2cac962e0439cb10a3cabff6d Author: Peter Zijlstra Date: Mon Mar 13 15:57:12 2017 +0100 x86/tsc: Fix ART for TSC_KNOWN_FREQ Subhransu reported that convert_art_to_tsc() isn't working for him. The ART to TSC relation is only set up for systems which use the refined TSC calibration. Systems with known TSC frequency (available via CPUID 15) are not using the refined calibration and therefor the ART to TSC relation is never established. Add the setup to the known frequency init path which skips ART calibration. The init code needs to be duplicated as for systems which use refined calibration the ART setup must be delayed until calibration has been done. The problem has been there since the ART support was introdduced, but only detected now because Subhransu tested the first time on hardware which has TSC frequency enumerated via CPUID 15. Note for stable: The conditional has changed from TSC_RELIABLE to TSC_KNOWN_FREQUENCY. [ tglx: Rewrote changelog and identified the proper 'Fixes' commit ] Fixes: f9677e0f8308 ("x86/tsc: Always Running Timer (ART) correlated clocksource") Reported-by: "Prusty, Subhransu S" Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Cc: christopher.s.hall@intel.com Cc: kevin.b.stanton@intel.com Cc: john.stultz@linaro.org Cc: akataria@vmware.com Link: http://lkml.kernel.org/r/20170313145712.GI3312@twins.programming.kicks-ass.net Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc.c | 2 ++ 1 file changed, 2 insertions(+) commit c5f7c5a9a0f84c511a8a336491f9b8a3060b6517 Author: Elena Reshetova Date: Mon Mar 6 16:21:16 2017 +0200 drivers, xen: convert grant_map.users from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Boris Ostrovsky drivers/xen/gntdev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 04166f48d9593af4513ae06c0f966c0cee300a20 Author: Pablo Neira Ayuso Date: Mon Mar 13 13:24:03 2017 +0100 Revert "netfilter: nf_tables: add flush field to struct nft_set_iter" This reverts commit 1f48ff6c5393aa7fe290faf5d633164f105b0aa7. This patch is not required anymore now that we keep a dummy list of set elements in the bitmap set implementation, so revert this before we forget this code has no clients. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 1 - net/netfilter/nf_tables_api.c | 4 ---- 2 files changed, 5 deletions(-) commit ce70df089143c49385b4f32f39d41fb50fbf6a7c Author: Kirill A. Shutemov Date: Mon Mar 13 08:22:13 2017 +0300 mm, gup: fix typo in gup_p4d_range() gup_p4d_range() should call gup_pud_range(), not itself. [ This was not noticed on x86: this is the HAVE_GENERIC_RCU_GUP code used by arm[64] and powerpc - Linus ] Fixes: c2febafc6773 ("mm: convert generic code to 5-level paging") Signed-off-by: Kirill A. Shutemov Reported-by: Chris Packham Reported-by: Anton Blanchard Acked-by: Michal Hocko Acked-by: Mark Rutland Signed-off-by: Linus Torvalds mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6aef660370a9c246956ba6d01eebd8063c4214cb Author: Tvrtko Ursulin Date: Fri Mar 10 09:32:49 2017 +0000 drm/i915: Fix forcewake active domain tracking In commit 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask") I forgot to adjust the newly introduce fw_domains_active state across reset. This caused the assert_forcewakes_inactive to trigger during suspend and resume if there were user held forcewakes. v2: Bitmask checks are required since vfuncs are not always present. v3: Move bitmask tracking to get/put vfunc for simplicity. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask") Testcase: igt/drv_suspend/forcewake Cc: Tvrtko Ursulin Cc: "Paneri, Praveen" Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: v4.10+ Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170310093249.4484-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit b8473050805f35add97f3ff57570d55a01808df5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_uncore.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 3a0d137de035cc8c70194d9988ded61825b5ff8a Author: Maarten Lankhorst Date: Wed Mar 8 13:00:07 2017 +0100 drm/i915: Nuke skl_update_plane debug message from the pipe update critical section printks are slow so we should not be doing them from the vblank evade critical section. These could explain why we sometimes seem to blow past our 100 usec deadline. The problem has been there ever since commit c331879ce8ea ("drm/i915: skylake sprite plane scaling using shared scalers.") but it may not have been readily visible until commit e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.") increased our chances of noticing it. Signed-off-by: Maarten Lankhorst Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1488974407-25175-1-git-send-email-maarten.lankhorst@linux.intel.com Fixes: c331879ce8ea ("drm/i915: skylake sprite plane scaling using shared scalers") Cc: # v4.2+ Reviewed-by: Ville Syrjälä [mlankhorst: Add missing tags, point to the correct offending commit] (cherry picked from commit d38146b9ee16264ff9a88bf3391ab9f2f5af3646) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_sprite.c | 3 --- 1 file changed, 3 deletions(-) commit aac66bf5f916f645bd57029490a72c3f91f2c274 Author: Matthew Auld Date: Mon Mar 6 23:54:01 2017 +0000 drm/i915: use correct node for handling cache domain eviction It looks like we were incorrectly comparing vma->node against itself instead of the target node, when evicting for a node on systems where we need guard pages between regions with different cache domains. As a consequence we can end up trying to needlessly evict neighbouring nodes, even if they have the same cache domain, and if they were pinned we would fail the eviction. Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306235414.23407-3-matthew.auld@intel.com Signed-off-by: Chris Wilson (cherry picked from commit fe65cbdbc97929e4a522716ed279a36783656142) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_evict.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 366a1569bff3fe14abfdf9285e31e05e091745f5 Author: Kinglong Mee Date: Mon Mar 6 22:29:14 2017 +0800 NFSv4: fix a reference leak caused WARNING messages Because nfs4_opendata_access() has close the state when access is denied, so the state isn't leak. Rather than revert the commit a974deee47, I'd like clean the strange state close. [ 1615.094218] ------------[ cut here ]------------ [ 1615.094607] WARNING: CPU: 0 PID: 23702 at lib/list_debug.c:31 __list_add_valid+0x8e/0xa0 [ 1615.094913] list_add double add: new=ffff9d7901d9f608, prev=ffff9d7901d9f608, next=ffff9d7901ee8dd0. [ 1615.095458] Modules linked in: nfsv4(E) nfs(E) nfsd(E) tun bridge stp llc fuse ip_set nfnetlink vmw_vsock_vmci_transport vsock f2fs snd_seq_midi snd_seq_midi_event fscrypto coretemp ppdev crct10dif_pclmul crc32_pclmul ghash_clmulni_intel intel_rapl_perf vmw_balloon snd_ens1371 joydev gameport snd_ac97_codec ac97_bus snd_seq snd_pcm snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc parport acpi_cpufreq tpm_tis tpm_tis_core tpm i2c_piix4 vmw_vmci shpchp auth_rpcgss nfs_acl lockd(E) grace sunrpc(E) xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel mptspi e1000 serio_raw scsi_transport_spi mptscsih mptbase ata_generic pata_acpi fjes [last unloaded: nfs] [ 1615.097663] CPU: 0 PID: 23702 Comm: fstest Tainted: G W E 4.11.0-rc1+ #517 [ 1615.098015] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 1615.098807] Call Trace: [ 1615.099183] dump_stack+0x63/0x86 [ 1615.099578] __warn+0xcb/0xf0 [ 1615.099967] warn_slowpath_fmt+0x5f/0x80 [ 1615.100370] __list_add_valid+0x8e/0xa0 [ 1615.100760] nfs4_put_state_owner+0x75/0xc0 [nfsv4] [ 1615.101136] __nfs4_close+0x109/0x140 [nfsv4] [ 1615.101524] nfs4_close_state+0x15/0x20 [nfsv4] [ 1615.101949] nfs4_close_context+0x21/0x30 [nfsv4] [ 1615.102691] __put_nfs_open_context+0xb8/0x110 [nfs] [ 1615.103155] put_nfs_open_context+0x10/0x20 [nfs] [ 1615.103586] nfs4_file_open+0x13b/0x260 [nfsv4] [ 1615.103978] do_dentry_open+0x20a/0x2f0 [ 1615.104369] ? nfs4_copy_file_range+0x30/0x30 [nfsv4] [ 1615.104739] vfs_open+0x4c/0x70 [ 1615.105106] ? may_open+0x5a/0x100 [ 1615.105469] path_openat+0x623/0x1420 [ 1615.105823] do_filp_open+0x91/0x100 [ 1615.106174] ? __alloc_fd+0x3f/0x170 [ 1615.106568] do_sys_open+0x130/0x220 [ 1615.106920] ? __put_cred+0x3d/0x50 [ 1615.107256] SyS_open+0x1e/0x20 [ 1615.107588] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 1615.107922] RIP: 0033:0x7fab599069b0 [ 1615.108247] RSP: 002b:00007ffcf0600d78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 1615.108575] RAX: ffffffffffffffda RBX: 00007fab59bcfae0 RCX: 00007fab599069b0 [ 1615.108896] RDX: 0000000000000200 RSI: 0000000000000200 RDI: 00007ffcf060255e [ 1615.109211] RBP: 0000000000040010 R08: 0000000000000000 R09: 0000000000000016 [ 1615.109515] R10: 00000000000006a1 R11: 0000000000000246 R12: 0000000000041000 [ 1615.109806] R13: 0000000000040010 R14: 0000000000001000 R15: 0000000000002710 [ 1615.110152] ---[ end trace 96ed63b1306bf2f3 ]--- Fixes: a974deee47 ("NFSv4: Fix memory and state leak in...") Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 -- 1 file changed, 2 deletions(-) commit 6f1f622019f95d79d6e2f8bb3781144ad0aff75f Author: Kinglong Mee Date: Mon Mar 6 17:49:42 2017 +0800 nfs4: fix a typo of NFS_ATTR_FATTR_GROUP_NAME This typo cause a memory leak, and a bad client's group id. unreferenced object 0xffff96d8073998d0 (size 8): comm "kworker/0:3", pid 34224, jiffies 4295361338 (age 761.752s) hex dump (first 8 bytes): 30 00 39 07 d8 96 ff ff 0.9..... backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc+0x140/0x220 [] xdr_stream_decode_string_dup+0x7c/0x110 [sunrpc] [] decode_getfattr_attrs+0x940/0x1630 [nfsv4] [] decode_getfattr_generic.constprop.108+0x9b/0x100 [nfsv4] [] nfs4_xdr_dec_open+0xcf/0x100 [nfsv4] [] rpcauth_unwrap_resp+0xa7/0xe0 [sunrpc] [] call_decode+0x1e0/0x810 [sunrpc] [] __rpc_execute+0x8d/0x420 [sunrpc] [] rpc_async_schedule+0x12/0x20 [sunrpc] [] process_one_work+0x197/0x430 [] worker_thread+0x4e/0x4a0 [] kthread+0x101/0x140 [] ret_from_fork+0x2c/0x40 [] 0xffffffffffffffff Fixes: 686a816ab6 ("NFSv4: Clean up owner/group attribute decode") Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a3a485b1ed0e109718cc8c9d094fa0f552de9b2 Author: Tahsin Erdogan Date: Fri Mar 10 12:09:49 2017 -0800 writeback: fix memory leak in wb_queue_work() When WB_registered flag is not set, wb_queue_work() skips queuing the work, but does not perform the necessary clean up. In particular, if work->auto_free is true, it should free the memory. The leak condition can be reprouced by following these steps: mount /dev/sdb /mnt/sdb /* In qemu console: device_del sdb */ umount /dev/sdb Above will result in a wb_queue_work() call on an unregistered wb and thus leak memory. Reported-by: John Sperbeck Signed-off-by: Tahsin Erdogan Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 0067d4b020ea07a58540acb2c5fcd3364bf326e0 Author: Sagi Grimberg Date: Mon Mar 13 16:10:11 2017 +0200 blk-mq: Fix tagset reinit in the presence of cpu hot-unplug In case cpu was unplugged, we need to make sure not to assume that the tags for that cpu are still allocated. so check for null tags when reinitializing a tagset. Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq-tag.c | 3 +++ 1 file changed, 3 insertions(+) commit a1c2ff53726907aff5feb37e4cfd45c1ff626431 Author: Hiroyuki Yokoyama Date: Wed Mar 1 03:51:00 2017 +0000 ASoC: rsnd: fix sound route path when using SRC6/SRC9 This patch fixes the problem that the missing value of the route path setting table and incorrect values are set in the CMD_ROUTE_SELECT register. Signed-off-by: Hiroyuki Yokoyama [Kuninori: shared data on MIX and non-MIX case] Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/cmd.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit e920dde5160887d07b738f5a7f593b1fa9b1e32e Author: Pablo Neira Ayuso Date: Fri Mar 10 18:32:31 2017 +0100 netfilter: nft_set_bitmap: keep a list of dummy elements Element comments may come without any prior set flag, so we have to keep a list of dummy struct nft_set_ext to keep this information around. This is only useful for set dumps to userspace. From the packet path, this set type relies on the bitmap representation. This patch simplifies the logic since we don't need to allocate the dummy nft_set_ext structure anymore on the fly at the cost of increasing memory consumption because of the list of dummy struct nft_set_ext. Fixes: 665153ff5752 ("netfilter: nf_tables: add bitmap set type") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_bitmap.c | 146 +++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 80 deletions(-) commit 170a1fb9c01bc40b7e8fd57a32ac9a0e131ec5b6 Author: Steven Rostedt (VMware) Date: Sat Mar 11 00:25:26 2017 -0500 netfilter: Force fake conntrack entry to be at least 8 bytes aligned Since the nfct and nfctinfo have been combined, the nf_conn structure must be at least 8 bytes aligned, as the 3 LSB bits are used for the nfctinfo. But there's a fake nf_conn structure to denote untracked connections, which is created by a PER_CPU construct. This does not guarantee that it will be 8 bytes aligned and can break the logic in determining the correct nfctinfo. I triggered this on a 32bit machine with the following error: BUG: unable to handle kernel NULL pointer dereference at 00000af4 IP: nf_ct_deliver_cached_events+0x1b/0xfb *pdpt = 0000000031962001 *pde = 0000000000000000 Oops: 0000 [#1] SMP [Modules linked in: ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 crc_ccitt ppdev r8169 parport_pc parport OK ] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-test+ #75 Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014 task: c126ec00 task.stack: c1258000 EIP: nf_ct_deliver_cached_events+0x1b/0xfb EFLAGS: 00010202 CPU: 0 EAX: 0021cd01 EBX: 00000000 ECX: 27b0c767 EDX: 32bcb17a ESI: f34135c0 EDI: f34135c0 EBP: f2debd60 ESP: f2debd3c DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 CR0: 80050033 CR2: 00000af4 CR3: 309a0440 CR4: 001406f0 Call Trace: ? ipv6_skip_exthdr+0xac/0xcb ipv6_confirm+0x10c/0x119 [nf_conntrack_ipv6] nf_hook_slow+0x22/0xc7 nf_hook+0x9a/0xad [ipv6] ? ip6t_do_table+0x356/0x379 [ip6_tables] ? ip6_fragment+0x9e9/0x9e9 [ipv6] ip6_output+0xee/0x107 [ipv6] ? ip6_fragment+0x9e9/0x9e9 [ipv6] dst_output+0x36/0x4d [ipv6] NF_HOOK.constprop.37+0xb2/0xba [ipv6] ? icmp6_dst_alloc+0x2c/0xfd [ipv6] ? local_bh_enable+0x14/0x14 [ipv6] mld_sendpack+0x1c5/0x281 [ipv6] ? mark_held_locks+0x40/0x5c mld_ifc_timer_expire+0x1f6/0x21e [ipv6] call_timer_fn+0x135/0x283 ? detach_if_pending+0x55/0x55 ? mld_dad_timer_expire+0x3e/0x3e [ipv6] __run_timers+0x111/0x14b ? mld_dad_timer_expire+0x3e/0x3e [ipv6] run_timer_softirq+0x1c/0x36 __do_softirq+0x185/0x37c ? test_ti_thread_flag.constprop.19+0xd/0xd do_softirq_own_stack+0x22/0x28 irq_exit+0x5a/0xa4 smp_apic_timer_interrupt+0x2a/0x34 apic_timer_interrupt+0x37/0x3c By using DEFINE/DECLARE_PER_CPU_ALIGNED we can enforce at least 8 byte alignment as all cache line sizes are at least 8 bytes or more. Fixes: a9e419dc7be6 ("netfilter: merge ctinfo into nfct pointer storage area") Signed-off-by: Steven Rostedt (VMware) Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 2 +- net/netfilter/nf_conntrack_core.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4ca60d08cbe65f501baad64af50fceba79c19fbb Author: Florian Westphal Date: Thu Mar 9 23:22:30 2017 +0100 netfilter: bridge: honor frag_max_size when refragmenting consider a bridge with mtu 9000, but end host sending smaller packets to another host with mtu < 9000. In this case, after reassembly, bridge+defrag would refragment, and then attempt to send the reassembled packet as long as it was below 9k. Instead we have to cap by the largest fragment size seen. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 10596608c4d62cb8c1c2b806debcbd32fe657e71 Author: Liping Zhang Date: Wed Mar 8 22:54:18 2017 +0800 netfilter: nf_tables: fix mismatch in big-endian system Currently, there are two different methods to store an u16 integer to the u32 data register. For example: u32 *dest = ®s->data[priv->dreg]; 1. *dest = 0; *(u16 *) dest = val_u16; 2. *dest = val_u16; For method 1, the u16 value will be stored like this, either in big-endian or little-endian system: 0 15 31 +-+-+-+-+-+-+-+-+-+-+-+-+ | Value | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+ For method 2, in little-endian system, the u16 value will be the same as listed above. But in big-endian system, the u16 value will be stored like this: 0 15 31 +-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | Value | +-+-+-+-+-+-+-+-+-+-+-+-+ So later we use "memcmp(®s->data[priv->sreg], data, 2);" to do compare in nft_cmp, nft_lookup expr ..., method 2 will get the wrong result in big-endian system, as 0~15 bits will always be zero. For the similar reason, when loading an u16 value from the u32 data register, we should use "*(u16 *) sreg;" instead of "(u16)*sreg;", the 2nd method will get the wrong value in the big-endian system. So introduce some wrapper functions to store/load an u8 or u16 integer to/from the u32 data register, and use them in the right place. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 29 +++++++++++++++++++++++++++ net/ipv4/netfilter/nft_masq_ipv4.c | 8 ++++---- net/ipv4/netfilter/nft_redir_ipv4.c | 8 ++++---- net/ipv6/netfilter/nft_masq_ipv6.c | 8 ++++---- net/ipv6/netfilter/nft_redir_ipv6.c | 8 ++++---- net/netfilter/nft_ct.c | 18 +++++++++-------- net/netfilter/nft_meta.c | 40 +++++++++++++++++++------------------ net/netfilter/nft_nat.c | 8 ++++---- 8 files changed, 80 insertions(+), 47 deletions(-) commit fd89b23a4632d3cbdee398048497e026edadfb71 Author: Liping Zhang Date: Mon Mar 6 00:02:52 2017 +0800 netfilter: nft_set_bitmap: fetch the element key based on the set->klen Currently we just assume the element key as a u32 integer, regardless of the set key length. This is incorrect, for example, the tcp port number is only 16 bits. So when we use the nft_payload expr to get the tcp dport and store it to dreg, the dport will be stored at 0~15 bits, and 16~31 bits will be padded with zero. So the reg->data[dreg] will be looked like as below: 0 15 31 +-+-+-+-+-+-+-+-+-+-+-+-+ | tcp dport | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+ But for these big-endian systems, if we treate this register as a u32 integer, the element key will be larger than 65535, so the following lookup in bitmap set will cause out of bound access. Another issue is that if we add element with comments in bitmap set(although the comments will be ignored eventually), the element will vanish strangely. Because we treate the element key as a u32 integer, so the comments will become the part of the element key, then the element key will also be larger than 65535 and out of bound access will happen: # nft add element t s { 1 comment test } Since set->klen is 1 or 2, it's fine to treate the element key as a u8 or u16 integer. Fixes: 665153ff5752 ("netfilter: nf_tables: add bitmap set type") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_bitmap.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 337ba7fbf0fbc12242359c4af114878618b90951 Author: Dmitry V. Levin Date: Sat Feb 25 16:29:50 2017 +0300 uapi: fix drm/omap_drm.h userspace compilation errors Consistently use types from linux/types.h like in other uapi drm/*_drm.h header files to fix the following drm/omap_drm.h userspace compilation errors: /usr/include/drm/omap_drm.h:36:2: error: unknown type name 'uint64_t' uint64_t param; /* in */ /usr/include/drm/omap_drm.h:37:2: error: unknown type name 'uint64_t' uint64_t value; /* in (set_param), out (get_param) */ /usr/include/drm/omap_drm.h:56:2: error: unknown type name 'uint32_t' uint32_t bytes; /* (for non-tiled formats) */ /usr/include/drm/omap_drm.h:58:3: error: unknown type name 'uint16_t' uint16_t width; /usr/include/drm/omap_drm.h:59:3: error: unknown type name 'uint16_t' uint16_t height; /usr/include/drm/omap_drm.h:65:2: error: unknown type name 'uint32_t' uint32_t flags; /* in */ /usr/include/drm/omap_drm.h:66:2: error: unknown type name 'uint32_t' uint32_t handle; /* out */ /usr/include/drm/omap_drm.h:67:2: error: unknown type name 'uint32_t' uint32_t __pad; /usr/include/drm/omap_drm.h:77:2: error: unknown type name 'uint32_t' uint32_t handle; /* buffer handle (in) */ /usr/include/drm/omap_drm.h:78:2: error: unknown type name 'uint32_t' uint32_t op; /* mask of omap_gem_op (in) */ /usr/include/drm/omap_drm.h:82:2: error: unknown type name 'uint32_t' uint32_t handle; /* buffer handle (in) */ /usr/include/drm/omap_drm.h:83:2: error: unknown type name 'uint32_t' uint32_t op; /* mask of omap_gem_op (in) */ /usr/include/drm/omap_drm.h:88:2: error: unknown type name 'uint32_t' uint32_t nregions; /usr/include/drm/omap_drm.h:89:2: error: unknown type name 'uint32_t' uint32_t __pad; /usr/include/drm/omap_drm.h:93:2: error: unknown type name 'uint32_t' uint32_t handle; /* buffer handle (in) */ /usr/include/drm/omap_drm.h:94:2: error: unknown type name 'uint32_t' uint32_t pad; /usr/include/drm/omap_drm.h:95:2: error: unknown type name 'uint64_t' uint64_t offset; /* mmap offset (out) */ /usr/include/drm/omap_drm.h:102:2: error: unknown type name 'uint32_t' uint32_t size; /* virtual size for mmap'ing (out) */ /usr/include/drm/omap_drm.h:103:2: error: unknown type name 'uint32_t' uint32_t __pad; Fixes: ef6503e89194 ("drm: Kbuild: add omap_drm.h to the installed headers") Signed-off-by: Dmitry V. Levin Signed-off-by: Tomi Valkeinen include/uapi/drm/omap_drm.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 9fa1d7537242bd580ffa99c4725a0407096aad26 Author: Tomi Valkeinen Date: Tue Feb 28 10:11:45 2017 +0200 drm/omap: fix dmabuf mmap for dma_alloc'ed buffers omap_gem_dmabuf_mmap() returns an error (with a WARN) when called for a buffer which is allocated with dma_alloc_*(). This prevents dmabuf mmap from working on SoCs without DMM, e.g. AM4 and OMAP3. I could not find any reason for omap_gem_dmabuf_mmap() rejecting such buffers, and just removing the if() fixes the limitation. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 3 --- 1 file changed, 3 deletions(-) commit 80354c29025833acd72ddac1ffa21c6cb50128cd Author: Andy Shevchenko Date: Sun Mar 12 17:07:44 2017 +0200 x86/platform/intel-mid: Correct MSI IRQ line for watchdog device The interrupt line used for the watchdog is 12, according to the official Intel Edison BSP code. And indeed after fixing it we start getting an interrupt and thus the watchdog starts working again: [ 191.699951] Kernel panic - not syncing: Kernel Watchdog Signed-off-by: Andy Shevchenko Cc: Borislav Petkov Cc: David Cohen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 78a3bb9e408b ("x86: intel-mid: add watchdog platform code for Merrifield") Link: http://lkml.kernel.org/r/20170312150744.45493-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65869a47f3488253f5fd88cc4f14e0a4e2601a55 Author: Daniel Borkmann Date: Sat Mar 11 16:55:49 2017 +0100 bpf: improve read-only handling Improve bpf_{prog,jit_binary}_{un,}lock_ro() by throwing a one-time warning in case of an error when the image couldn't be set read-only, and also mark struct bpf_prog as locked when bpf_prog_lock_ro() was called. Reason for the latter is that bpf_prog_unlock_ro() is called from various places including error paths, and we shouldn't mess with page attributes when really not needed. For bpf_jit_binary_unlock_ro() this is not needed as jited flag implicitly indicates this, thus for archs with ARCH_HAS_SET_MEMORY we're guaranteed to have a previously locked image. Overall, this should also help us to identify any further potential issues with set_memory_*() helpers. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 1da8ac7c49fb2879ba95006d8bd1095e6870ea1a Author: Alexei Starovoitov Date: Fri Mar 10 22:05:55 2017 -0800 selftests/bpf: fix broken build Recent merge of 'linux-kselftest-4.11-rc1' tree broke bpf test build. None of the tests were building and test_verifier.c had tons of compiler errors. Fix it and add #ifdef CAP_IS_SUPPORTED to support old versions of libcap. Tested on centos 6.8 and 7 Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Tested-by: Daniel Borkmann Signed-off-by: David S. Miller tools/include/uapi/linux/bpf_perf_event.h | 18 ++++++++++++++++++ tools/testing/selftests/bpf/Makefile | 4 +++- tools/testing/selftests/bpf/test_verifier.c | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 79099aab38c8f5c746748b066ae74ba984fe2cc8 Author: David Ahern Date: Fri Mar 10 14:11:39 2017 -0800 mpls: Do not decrement alive counter for unregister events Multipath routes can be rendered usesless when a device in one of the paths is deleted. For example: $ ip -f mpls ro ls 100 nexthop as to 200 via inet 172.16.2.2 dev virt12 nexthop as to 300 via inet 172.16.3.2 dev br0 101 nexthop as to 201 via inet6 2000:2::2 dev virt12 nexthop as to 301 via inet6 2000:3::2 dev br0 $ ip li del br0 When br0 is deleted the other hop is not considered in mpls_select_multipath because of the alive check -- rt_nhn_alive is 0. rt_nhn_alive is decremented once in mpls_ifdown when the device is taken down (NETDEV_DOWN) and again when it is deleted (NETDEV_UNREGISTER). For a 2 hop route, deleting one device drops the alive count to 0. Since devices are taken down before unregistering, the decrement on NETDEV_UNREGISTER is redundant. Fixes: c89359a42e2a4 ("mpls: support for dead routes") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b17075d5c1988b83f840d272c795ac17d57ce804 Author: Igor Druzhinin Date: Fri Mar 10 21:36:22 2017 +0000 xen-netback: fix race condition on XenBus disconnect In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 26 +++++++++++++++++--------- drivers/net/xen-netback/netback.c | 2 +- drivers/net/xen-netback/xenbus.c | 20 ++++++++++---------- 3 files changed, 28 insertions(+), 20 deletions(-) commit e37791ec1ad785b59022ae211f63a16189bacebf Author: David Ahern Date: Fri Mar 10 09:46:15 2017 -0800 mpls: Send route delete notifications when router module is unloaded When the mpls_router module is unloaded, mpls routes are deleted but notifications are not sent to userspace leaving userspace caches out of sync. Add the call to mpls_notify_route in mpls_net_exit as routes are freed. Fixes: 0189197f44160 ("mpls: Basic routing support") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 1 + 1 file changed, 1 insertion(+) commit 52491c7607c5527138095edf44c53169dc1ddb82 Author: Etienne Noss Date: Fri Mar 10 16:55:32 2017 +0100 act_connmark: avoid crashing on malformed nlattrs with null parms tcf_connmark_init does not check in its configuration if TCA_CONNMARK_PARMS is set, resulting in a null pointer dereference when trying to access it. [501099.043007] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 [501099.043039] IP: [] tcf_connmark_init+0x8b/0x180 [act_connmark] ... [501099.044334] Call Trace: [501099.044345] [] ? tcf_action_init_1+0x198/0x1b0 [501099.044363] [] ? tcf_action_init+0xb0/0x120 [501099.044380] [] ? tcf_exts_validate+0xc4/0x110 [501099.044398] [] ? u32_set_parms+0xa7/0x270 [cls_u32] [501099.044417] [] ? u32_change+0x680/0x87b [cls_u32] [501099.044436] [] ? tc_ctl_tfilter+0x4dd/0x8a0 [501099.044454] [] ? security_capable+0x41/0x60 [501099.044471] [] ? rtnetlink_rcv_msg+0xe1/0x220 [501099.044490] [] ? rtnl_newlink+0x870/0x870 [501099.044507] [] ? netlink_rcv_skb+0xa1/0xc0 [501099.044524] [] ? rtnetlink_rcv+0x24/0x30 [501099.044541] [] ? netlink_unicast+0x184/0x230 [501099.044558] [] ? netlink_sendmsg+0x2f8/0x3b0 [501099.044576] [] ? sock_sendmsg+0x30/0x40 [501099.044592] [] ? SYSC_sendto+0xd3/0x150 [501099.044608] [] ? __do_page_fault+0x2d1/0x510 [501099.044626] [] ? system_call_fast_compare_end+0xc/0x9b Fixes: 22a5dc0e5e3e ("net: sched: Introduce connmark action") Signed-off-by: Étienne Noss Signed-off-by: Victorien Molle Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_connmark.c | 3 +++ 1 file changed, 3 insertions(+) commit 88a7cddce2506b0b6c06a9f6e51379d0d275353b Author: Neil Jerram Date: Fri Mar 10 12:24:57 2017 +0000 Make IP 'forwarding' doc more precise It wasn't clear if the 'forwarding' setting needs to be enabled on the interface that packets are received from, or on the interface that packets are forwarded to, or both. In fact (according to my code reading) the setting is relevant on the interface that packets are received from, so this change updates the doc to say that. Signed-off-by: Neil Jerram Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7ce101246655935b014b11d81f815342921f5654 Author: stephen hemminger Date: Thu Mar 9 14:58:29 2017 -0800 netvsc: handle select_queue when device is being removed Move the send indirection table from the inner device (netvsc) to the network device context. It is possible that netvsc_device is not present (remove in progress). This solves potential use after free issues when packet is being created during MTU change, shutdown, or queue count changes. Fixes: d8e18ee0fa96 ("netvsc: enhance transmit select_queue") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 ++- drivers/net/hyperv/netvsc.c | 8 ++------ drivers/net/hyperv/netvsc_drv.c | 11 +++-------- 3 files changed, 7 insertions(+), 15 deletions(-) commit ecd052250b51c8cee4d9720adea05690dfc77c64 Author: David Arcari Date: Thu Mar 9 13:28:33 2017 -0500 net: ethernet: aquantia: call set_irq_affinity_hint before free_irq When a network interface controlled by the aquantia ethernet driver is brought down a warning is output in dmesg (see below). The problem is that aq_pci_func_free_irqs() is calling free_irq() before it is calling irq_set_affinity_hint(). WARNING: CPU: 4 PID: 10068 at kernel/irq/manage.c:1503 __free_irq+0x24d/0x2b0 Call Trace: dump_stack+0x63/0x87 __warn+0xd1/0xf0 warn_slowpath_null+0x1d/0x20 __free_irq+0x24d/0x2b0 free_irq+0x39/0x90 aq_pci_func_free_irqs+0x52/0xa0 [atlantic] aq_nic_stop+0xca/0xd0 [atlantic] aq_ndev_close+0x1d/0x40 [atlantic] __dev_close_many+0x99/0x100 __dev_close+0x67/0xb0 Fixes: 36a4a50f4048 ("net: ethernet: aquantia: switch to pci_alloc_irq_vectors") Cc: Christoph Hellwig Cc: Pavel Belous Signed-off-by: David Arcari Tested-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bafa687dccbe16cbf9b1824409836d79d6dc6543 Author: Andy Shevchenko Date: Thu Feb 23 12:31:54 2017 +0200 extcon: int3496: Propagate error code of gpiod_to_irq() gpiod_to_irq() doesn't return 0. Thus, we just adjust condition and replace -EINVAL by actual error code it returns. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ea3217cf91804be6ed9b368ef4ac7911eb1dadc Author: Viresh Kumar Date: Tue Feb 7 09:40:05 2017 +0530 thermal: cpu_cooling: Check OPP for errors It is possible for dev_pm_opp_find_freq_exact() to return errors. It was all fine earlier as dev_pm_opp_get_voltage() had a check within it to check for invalid OPPs, but dev_pm_opp_put() doesn't have any similar checks and the callers need to make sure OPP is valid before calling them. Also update the later dev_warn_ratelimited() to not print the error message as the OPP is guaranteed to be valid now. Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/cpu_cooling.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9aec9082bf3c0fb83020a0f562c9cc8078ac91f1 Author: Viresh Kumar Date: Tue Feb 7 09:40:04 2017 +0530 thermal: cpu_cooling: Replace dev_warn with dev_err There isn't much the user can do on seeing these warnings, as the hardware is actually okay. dev_err suits much better here. Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/cpu_cooling.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit afd1f4e0a76f0c56422af7056942f28578f1643e Author: Viresh Kumar Date: Tue Feb 7 09:40:03 2017 +0530 thermal: devfreq: Check OPP for errors It is possible for dev_pm_opp_find_freq_exact() to return errors. It was all fine earlier as dev_pm_opp_get_voltage() had a check within it to check for invalid OPPs, but dev_pm_opp_put() doesn't have any similar checks and the callers need to make sure OPP is valid before calling them. Also update the later dev_warn_ratelimited() to not print the error message as the OPP is guaranteed to be valid now. Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/devfreq_cooling.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8327b830f293ff48eaade64b4fc2e247b7655615 Author: Viresh Kumar Date: Tue Feb 7 09:40:02 2017 +0530 thermal: devfreq_cooling: Replace dev_warn with dev_err There isn't much the user can do on seeing this warning, as the hardware is actually okay. dev_err suits much better here. Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/devfreq_cooling.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a4e49c9bc98d099b2a19933b9da55cd0ad1da421 Author: Viresh Kumar Date: Tue Feb 7 09:40:01 2017 +0530 thermal: devfreq: Simplify expression There is no need to check for IS_ERR() as we are looking for a very particular error value here. Drop the first check. Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/devfreq_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 088db931e065bd3b159fa2e588eab859ef0d9d23 Author: Matthew Wilcox Date: Fri Mar 10 18:33:28 2017 +0000 thermal: Fix potential deadlock in cpu_cooling cooling_list_lock is covering not just cpufreq_dev_count, but also the calls to cpufreq_register_notifier() and cpufreq_unregister_notifier(). Since cooling_list_lock is also used within cpufreq_thermal_notifier(), lockdep reports a potential deadlock. Fix it by testing the condition under cooling_list_lock and dropping the lock before calling cpufreq_register_notifier(). And variable cpufreq_dev_count is removed at the same time, because it's no longer needed after the fix. Fixes: ae606089621e ("thermal: convert cpu_cooling to use an IDA") Reported-and-Tested-by: Russell King Signed-off-by: Matthew Wilcox Acked-by: Rafael J. Wysocki drivers/thermal/cpu_cooling.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit d1c4e9bf73e739b937ddd9dc4cf0f6de2e6117da Author: João Paulo Rechi Vita Date: Mon Feb 20 14:50:23 2017 -0500 platform/x86: asus-wmi: Remove quirk_no_rfkill With the detection introduced in the previous patches, we don't need these static DMI-based quirks anymore. This reverts the following commits: 56a37a72002b "asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UA" a961a285b479 "asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UF" 6b7ff2af5286 "asus-wmi: Add quirk_no_rfkill for the Asus Z550MA" 02db9ff7af18 "asus-wmi: Add quirk_no_rfkill for the Asus U303LB" 2d735244b798 "asus-wmi: Add quirk_no_rfkill for the Asus N552VW" a977e59c0c67 "asus-wmi: Create quirk for airplane_mode LED" Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko [dvhart: minor commit message corrections] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-nb-wmi.c | 49 ++------------------------------------ drivers/platform/x86/asus-wmi.c | 5 +--- drivers/platform/x86/asus-wmi.h | 1 - 3 files changed, 3 insertions(+), 52 deletions(-) commit 4495c08e84729385774601b5146d51d9e5849f81 Author: Linus Torvalds Date: Sun Mar 12 14:47:08 2017 -0700 Linux 4.11-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56b24d1bbcff213dc9e1625eea5b8e13bb50feb8 Merge: 5a45a5a 8bd49ac Author: Linus Torvalds Date: Sun Mar 12 14:22:25 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - four patches to get the new cputime code in shape for s390 - add the new statx system call - a few bug fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: wire up statx system call KVM: s390: Fix guest migration for huge guests resulting in panic s390/ipl: always use load normal for CCW-type re-IPL s390/timex: micro optimization for tod_to_ns s390/cputime: provide archicture specific cputime_to_nsecs s390/cputime: reset all accounting fields on fork s390/cputime: remove last traces of cputime_t s390: fix in-kernel program checks s390/crypt: fix missing unlock in ctr_paes_crypt on error path commit 5a45a5a881aeb82ce31dd1886afe04146965df23 Merge: ecade11 2c4ea6e Author: Linus Torvalds Date: Sun Mar 12 14:18:49 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: - a fix for the kexec/purgatory regression which was introduced in the merge window via an innocent sparse fix. We could have reverted that commit, but on deeper inspection it turned out that the whole machinery is neither documented nor robust. So a proper cleanup was done instead - the fix for the TLB flush issue which was discovered recently - a simple typo fix for a reboot quirk * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tlb: Fix tlb flushing when lguest clears PGE kexec, x86/purgatory: Unbreak it and clean it up x86/reboot/quirks: Fix typo in ASUS EeeBook X205TA reboot quirk commit ecade114250555720aa8a6232b09a2ce2e47ea99 Merge: 106e4da 920c634 Author: Linus Torvalds Date: Sun Mar 12 14:11:38 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: - a workaround for a GIC erratum - a missing stub function for CONFIG_IRQDOMAIN=n - fixes for a couple of type inconsistencies * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/crossbar: Fix incorrect type of register size irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065 irqdomain: Add empty irq_domain_check_msi_remap irqchip/crossbar: Fix incorrect type of local variables commit a11be42a278e6526d4d297ddf6676e934318d7c3 Merge: e2a3a673 85e8a23 Author: James Bottomley Date: Sun Mar 12 09:02:56 2017 -0700 Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes commit 2c4ea6e28dbf15ab93632c5c189f3948366b8885 Author: Daniel Borkmann Date: Sat Mar 11 01:31:19 2017 +0100 x86/tlb: Fix tlb flushing when lguest clears PGE Fengguang reported random corruptions from various locations on x86-32 after commits d2852a224050 ("arch: add ARCH_HAS_SET_MEMORY config") and 9d876e79df6a ("bpf: fix unlocking of jited image when module ronx not set") that uses the former. While x86-32 doesn't have a JIT like x86_64, the bpf_prog_lock_ro() and bpf_prog_unlock_ro() got enabled due to ARCH_HAS_SET_MEMORY, whereas Fengguang's test kernel doesn't have module support built in and therefore never had the DEBUG_SET_MODULE_RONX setting enabled. After investigating the crashes further, it turned out that using set_memory_ro() and set_memory_rw() didn't have the desired effect, for example, setting the pages as read-only on x86-32 would still let probe_kernel_write() succeed without error. This behavior would manifest itself in situations where the vmalloc'ed buffer was accessed prior to set_memory_*() such as in case of bpf_prog_alloc(). In cases where it wasn't, the page attribute changes seemed to have taken effect, leading to the conclusion that a TLB invalidate didn't happen. Moreover, it turned out that this issue reproduced with qemu in "-cpu kvm64" mode, but not for "-cpu host". When the issue occurs, change_page_attr_set_clr() did trigger a TLB flush as expected via __flush_tlb_all() through cpa_flush_range(), though. There are 3 variants for issuing a TLB flush: invpcid_flush_all() (depends on CPU feature bits X86_FEATURE_INVPCID, X86_FEATURE_PGE), cr4 based flush (depends on X86_FEATURE_PGE), and cr3 based flush. For "-cpu host" case in my setup, the flush used invpcid_flush_all() variant, whereas for "-cpu kvm64", the flush was cr4 based. Switching the kvm64 case to cr3 manually worked fine, and further investigating the cr4 one turned out that X86_CR4_PGE bit was not set in cr4 register, meaning the __native_flush_tlb_global_irq_disabled() wrote cr4 twice with the same value instead of clearing X86_CR4_PGE in the first write to trigger the flush. It turned out that X86_CR4_PGE was cleared from cr4 during init from lguest_arch_host_init() via adjust_pge(). The X86_FEATURE_PGE bit is also cleared from there due to concerns of using PGE in guest kernel that can lead to hard to trace bugs (see bff672e630a0 ("lguest: documentation V: Host") in init()). The CPU feature bits are cleared in dynamic boot_cpu_data, but they never propagated to __flush_tlb_all() as it uses static_cpu_has() instead of boot_cpu_has() for testing which variant of TLB flushing to use, meaning they still used the old setting of the host kernel. Clearing via setup_clear_cpu_cap(X86_FEATURE_PGE) so this would propagate to static_cpu_has() checks is too late at this point as sections have been patched already, so for now, it seems reasonable to switch back to boot_cpu_has(X86_FEATURE_PGE) as it was prior to commit c109bf95992b ("x86/cpufeature: Remove cpu_has_pge"). This lets the TLB flush trigger via cr3 as originally intended, properly makes the new page attributes visible and thus fixes the crashes seen by Fengguang. Fixes: c109bf95992b ("x86/cpufeature: Remove cpu_has_pge") Reported-by: Fengguang Wu Signed-off-by: Daniel Borkmann Cc: bp@suse.de Cc: Kees Cook Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: Rusty Russell Cc: Alexei Starovoitov Cc: Linus Torvalds Cc: lkp@01.org Cc: Laura Abbott Cc: stable@vger.kernel.org Link: http://lkml.kernrl.org/r/20170301125426.l4nf65rx4wahohyl@wfg-t540p.sh.intel.com Link: http://lkml.kernel.org/r/25c41ad9eca164be4db9ad84f768965b7eb19d9e.1489191673.git.daniel@iogearbox.net Signed-off-by: Thomas Gleixner arch/x86/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5fe1b51905df7cfe4fdfd85c5fb7bc5b71a094f Author: NeilBrown Date: Fri Mar 10 17:00:47 2017 +1100 blk: Ensure users for current->bio_list can see the full list. Commit 79bd99596b73 ("blk: improve order of bio handling in generic_make_request()") changed current->bio_list so that it did not contain *all* of the queued bios, but only those submitted by the currently running make_request_fn. There are two places which walk the list and requeue selected bios, and others that check if the list is empty. These are no longer correct. So redefine current->bio_list to point to an array of two lists, which contain all queued bios, and adjust various code to test or walk both lists. Signed-off-by: NeilBrown Fixes: 79bd99596b73 ("blk: improve order of bio handling in generic_make_request()") Signed-off-by: Jens Axboe block/bio.c | 12 +++++++++--- block/blk-core.c | 30 ++++++++++++++++++------------ drivers/md/dm.c | 29 ++++++++++++++++------------- drivers/md/raid10.c | 3 ++- 4 files changed, 45 insertions(+), 29 deletions(-) commit 106e4da60209b508894956b6adf4688f84c1766d Merge: 4b050f2 6a29b51 Author: Linus Torvalds Date: Sat Mar 11 14:24:58 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM updates from Marc Zyngier: - vgic updates: - Honour disabling the ITS - Don't deadlock when deactivating own interrupts via MMIO - Correctly expose the lact of IRQ/FIQ bypass on GICv3 - I/O virtualization: - Make KVM_CAP_NR_MEMSLOTS big enough for large guests with many PCIe devices - General bug fixes: - Gracefully handle exception generated with syndroms that the host doesn't understand - Properly invalidate TLBs on VHE systems x86: - improvements in emulation of VMCLEAR, VMX MSR bitmaps, and VCPU reset * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nVMX: do not warn when MSR bitmap address is not backed KVM: arm64: Increase number of user memslots to 512 KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 KVM: Add documentation for KVM_CAP_NR_MEMSLOTS KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled arm64: KVM: Survive unknown traps from guests arm: KVM: Survive unknown traps from guests KVM: arm/arm64: Let vcpu thread modify its own active state KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset kvm: nVMX: VMCLEAR should not cause the vCPU to shut down KVM: arm/arm64: vgic-v3: Don't pretend to support IRQ/FIQ bypass arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs commit 4b050f22b5c68fab3f96641249a364ebfe354493 Merge: 84c37c1 0acf611 Author: Linus Torvalds Date: Sat Mar 11 14:16:50 2017 -0800 Merge tag 'extable-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull extable.h fix from Paul Gortmaker: "Fixup for arch/score after extable.h introduction. It seems that Guenter is the only one on the planet doing builds for arch/score -- we don't have compile coverage for it in linux-next or in the kbuild-bot either. Guenter couldn't even recall where he got his toolchain, but was kind enough to share it with me so I could validate this change and also add arch/score to my build coverage. I sat on this a bit in case there was any other fallout in other arch dirs, but since this still seems to be the only one, I might as well send it on its way" * tag 'extable-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: score: Fix implicit includes now failing build after extable change commit 33d8c15559df4f0bce25d7e16ebb5879e249f2e7 Author: Romain Izard Date: Thu Mar 9 17:58:38 2017 +0100 Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" This reverts commit 7b9f1d16e6d1 ("clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"). In the current state, the kernel warns against a late registration of the new sched_clock, the printk clock resets after only a few minutes, and it seems that scheduling can be affected as well. Signed-off-by: Romain Izard Signed-off-by: Daniel Lezcano drivers/clocksource/tcb_clksrc.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 84c37c168c0e49a412d7021cda3183a72adac0d0 Merge: 434fd63 db61ffe Author: Linus Torvalds Date: Sat Mar 11 09:08:47 2017 -0800 Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull random updates from Ted Ts'o: "Change get_random_{int,log} to use the CRNG used by /dev/urandom and getrandom(2). It's faster and arguably more secure than cut-down MD5 that we had been using. Also do some code cleanup" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block random: convert get_random_int/long into get_random_u32/u64 random: use chacha20 for get_random_int/long random: fix comment for unused random_min_urandom_seed random: remove variable limit random: remove stale urandom_init_wait random: remove stale maybe_reseed_primary_crng commit 0acf611997d9d05dbfb559c3c6e379c861eb5957 Author: Guenter Roeck Date: Wed Feb 22 11:07:57 2017 -0800 score: Fix implicit includes now failing build after extable change After changing from module.h to extable.h, score builds fail with: arch/score/kernel/traps.c: In function 'do_ri': arch/score/kernel/traps.c:248:4: error: implicit declaration of function 'user_disable_single_step' arch/score/mm/extable.c: In function 'fixup_exception': arch/score/mm/extable.c:32:38: error: dereferencing pointer to incomplete type arch/score/mm/extable.c:34:24: error: dereferencing pointer to incomplete type because extable.h doesn't drag in the same amount of headers as the module.h did. Add in the headers which were implicitly expected. Fixes: 90858794c960 ("module.h: remove extable.h include now users have migrated") Signed-off-by: Guenter Roeck [PG: tweak commit log; refresh for sched header refactoring.] Signed-off-by: Paul Gortmaker arch/score/kernel/traps.c | 1 + arch/score/mm/extable.c | 2 ++ 2 files changed, 3 insertions(+) commit a77d6cd968497792e072b74dff45b891ba778ddb Author: Dou Liyang Date: Fri Mar 3 16:02:27 2017 +0800 acpi/processor: Check for duplicate processor ids at hotplug time The check for duplicate processor ids happens at boot time based on the ACPI table contents, but the final sanity checks for a processor happen at hotplug time. At hotplug time, where the physical information is available, which might differ from the ACPI table information, a check for duplicate processor ids is missing. Add it to the hotplug checks and rename the function so it better reflects its purpose. Signed-off-by: Dou Liyang Tested-by: Xiaolong Ye Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: guzheng1@huawei.com Cc: izumi.taku@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1488528147-2279-6-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/acpi_processor.c | 13 ++++++++++--- include/linux/acpi.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) commit 8c8cb30f49b86333d8e036e1945cf1a78c03577e Author: Dou Liyang Date: Fri Mar 3 16:02:26 2017 +0800 acpi/processor: Implement DEVICE operator for processor enumeration ACPI allows to declare processors either with the PROCESSOR or with the DEVICE operator. The current implementation handles only the PROCESSOR operator. On a system which uses the DEVICE operator for processor enumeration the evaluation fails. Check for the ACPI type of the ACPI handle and evaluate PROCESSOR and DEVICE types separately. Signed-off-by: Dou Liyang Tested-by: Xiaolong Ye Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: guzheng1@huawei.com Cc: izumi.taku@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1488528147-2279-5-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/acpi_processor.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) commit 2b85b3d22920db7473e5fed5719e7955c0ec323e Author: Dou Liyang Date: Fri Mar 3 16:02:25 2017 +0800 x86/acpi: Restore the order of CPU IDs The following commits: f7c28833c2 ("x86/acpi: Enable acpi to register all possible cpus at boot time") and 8f54969dc8 ("x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping") ... registered all the possible CPUs at boot time via ACPI tables to make the mapping of cpuid <-> apicid fixed. Both enabled and disabled CPUs could have a logical CPU ID after boot time. But, ACPI tables are unreliable. the number amd order of Local APIC entries which depends on the firmware is often inconsistent with the physical devices. Even if they are consistent, The disabled CPUs which take up some logical CPU IDs will also make the order discontinuous. Revert the part of disabled CPUs registration, keep the allocation logic of logical CPU IDs and also keep some code location changes. Signed-off-by: Dou Liyang Tested-by: Xiaolong Ye Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: guzheng1@huawei.com Cc: izumi.taku@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1488528147-2279-4-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/kernel/acpi/boot.c | 7 ++++++- arch/x86/kernel/apic/apic.c | 26 +++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) commit 09c3f2bd5c7e5f18687663acb6adc6b167484ca5 Author: Dou Liyang Date: Fri Mar 3 16:02:24 2017 +0800 Revert"x86/acpi: Enable MADT APIs to return disabled apicids" Revert: 8ad893faf2ea ("x86/acpi: Enable MADT APIs to return disabled apicids") Remove the leftovers of the boot time 'cpuid <-> nodeid' mapping approach. Signed-off-by: Dou Liyang Tested-by: Xiaolong Ye Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: guzheng1@huawei.com Cc: izumi.taku@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1488528147-2279-3-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/processor_core.c | 60 ++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 38 deletions(-) commit c962cff17dfa11f4a8227ac16de2b28aea3312e4 Author: Dou Liyang Date: Fri Mar 3 16:02:23 2017 +0800 Revert "x86/acpi: Set persistent cpuid <-> nodeid mapping when booting" Revert: dc6db24d2476 ("x86/acpi: Set persistent cpuid <-> nodeid mapping when booting") The mapping of "cpuid <-> nodeid" is established at boot time via ACPI tables to keep associations of workqueues and other node related items consistent across cpu hotplug. But, ACPI tables are unreliable and failures with that boot time mapping have been reported on machines where the ACPI table and the physical information which is retrieved at actual hotplug is inconsistent. Revert the mapping implementation so it can be replaced with a less error prone approach. Signed-off-by: Dou Liyang Tested-by: Xiaolong Ye Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: guzheng1@huawei.com Cc: izumi.taku@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1488528147-2279-2-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/kernel/acpi/boot.c | 2 +- drivers/acpi/acpi_processor.c | 5 --- drivers/acpi/bus.c | 1 - drivers/acpi/processor_core.c | 73 ------------------------------------------- include/linux/acpi.h | 3 -- 5 files changed, 1 insertion(+), 83 deletions(-) commit 434fd6353b4c83938029ca6ea7dfa4fc82d602bd Merge: 8529880 f98c7bc Author: Linus Torvalds Date: Sat Mar 11 00:20:12 2017 -0800 Merge tag 'tty-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes frpm Greg KH: "Here are two bugfixes for tty stuff for 4.11-rc2. One of them resolves the pretty bad bug in the n_hdlc code that Alexander Popov found and fixed and has been reported everywhere. The other just fixes a samsung serial driver issue when DMA fails on some systems. Both have been in linux-next with no reported issues" * tag 'tty-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: samsung: Continue to work if DMA request fails tty: n_hdlc: get rid of racy n_hdlc.tbuf commit 85298808617299fe713ed3e03114058883ce3d8a Merge: 46552bf 69eb159 Author: Linus Torvalds Date: Sat Mar 11 00:13:28 2017 -0800 Merge tag 'staging-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are two small build warning fixes for some staging drivers that Arnd has found on his valiant quest to get the kernel to build properly with no warnings. Both of these have been in linux-next this week and resolve the reported issues" * tag 'staging-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: octeon: remove unused variable staging/vc04_services: add CONFIG_OF dependency commit 46552bf4337b99322c0cc65f6003e59b7f36bf15 Merge: cb853a8 dcc7620 Author: Linus Torvalds Date: Sat Mar 11 00:08:39 2017 -0800 Merge tag 'usb-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here is a number of different USB fixes for 4.11-rc2. Seems like there were a lot of unresolved issues that people have been finding for this subsystem, and a bunch of good security auditing happening as well from Johan Hovold. There's the usual batch of gadget driver fixes and xhci issues resolved as well. All of these have been in linux-next with no reported issues" * tag 'usb-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits) usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers usb: host: xhci-dbg: HCIVERSION should be a binary number usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct usb: xhci-mtk: check hcc_params after adding primary hcd USB: serial: digi_acceleport: fix OOB-event processing MAINTAINERS: usb251xb: remove reference inexistent file doc: dt-bindings: usb251xb: mark reg as required usb: usb251xb: dt: add unit suffix to oc-delay and power-on-time usb: usb251xb: remove max_{power,current}_{sp,bp} properties usb-storage: Add ignore-residue quirk for Initio INIC-3619 USB: iowarrior: fix NULL-deref in write USB: iowarrior: fix NULL-deref at probe usb: phy: isp1301: Add OF device ID table usb: ohci-at91: Do not drop unhandled USB suspend control requests USB: serial: safe_serial: fix information leak in completion handler USB: serial: io_ti: fix information leak in completion handler USB: serial: omninet: drop open callback USB: serial: omninet: fix reference leaks at open USB: serial: io_ti: fix NULL-deref in interrupt callback usb: dwc3: gadget: make to increment req->remaining in all cases ... commit cb853a82dfe48a60b63831191e8d1d8a1b8b116c Merge: 24c534b 96e1ce8 Author: Linus Torvalds Date: Sat Mar 11 00:06:18 2017 -0800 Merge tag 'pinctrl-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fixes from Linus Walleij: "Two smaller pin control fixes for the v4.11 series: - Add a get_direction() function to the qcom driver - Fix two pin names in the uniphier driver" * tag 'pinctrl-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: uniphier: change pin names of aio/xirq for LD11 pinctrl: qcom: add get_direction function commit 52084f89b38cdd896b59627c629915ef1a7bf615 Author: Dave Jiang Date: Thu Mar 9 16:56:01 2017 -0700 device-dax: fix debug output typo The debug output for return the return data of pgoff_to_phys() in the fault handlers has 'phys' and 'pgoff' incorrectly swapped. Reported-by: Jeff Moyer Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/dax/dax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70b085b06c4560a69e95607f77bb4c2b2e41943c Author: Dave Jiang Date: Fri Mar 10 13:24:27 2017 -0700 device-dax: fix pud fault fallback handling Jeff Moyer reports: With a device dax alignment of 4KB or 2MB, I get sigbus when running the attached fio job file for the current kernel (4.11.0-rc1+). If I specify an alignment of 1GB, it works. I turned on debug output, and saw that it was failing in the huge fault code. dax dax1.0: dax_open dax dax1.0: dax_mmap dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf60) dax dax1.0: dax_release fio config for reproduce: [global] ioengine=dev-dax direct=0 filename=/dev/dax0.0 bs=2m [write] rw=write [read] stonewall rw=read The driver fails to fallback when taking a fault that is larger than the device alignment, or handling a larger fault when a smaller mapping is already established. While we could support larger mappings for a device with a smaller alignment, that change is too large for the immediate fix. The simplest change is to force fallback until the fault size matches the alignment. Reported-by: Jeff Moyer Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/dax/dax.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4607ebf04b8190d2c7aa5504959e9fddfc0cd736 Author: Allan, Bruce W Date: Tue Mar 7 15:48:23 2017 -0800 kbuild: external module build warnings when KBUILD_OUTPUT set and W=1 Commit db547ef19064 ("Kbuild: don't add obj tree in additional includes") causes warnings (-Wmissing-include-dirs) when compiling external modules with KBUILD_OUTPUT set and W=1. This is because $src can be an absolute path to the external module source which when prefixed with -I$(srctree)/ generates an incorrect directory path. Signed-off-by: Bruce Allan Acked-by: Arnd Bergmann Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0134ed4fb9e78672ee9f7b18007114404c81e63f Author: Dave Jiang Date: Fri Mar 10 13:24:22 2017 -0700 device-dax: fix pmd/pte fault fallback handling Jeff Moyer reports: With a device dax alignment of 4KB or 2MB, I get sigbus when running the attached fio job file for the current kernel (4.11.0-rc1+). If I specify an alignment of 1GB, it works. I turned on debug output, and saw that it was failing in the huge fault code. dax dax1.0: dax_open dax dax1.0: dax_mmap dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf60 dax dax1.0: dax_release fio config for reproduce: [global] ioengine=dev-dax direct=0 filename=/dev/dax0.0 bs=2m [write] rw=write [read] stonewall rw=read The driver fails to fallback when taking a fault that is larger than the device alignment, or handling a larger fault when a smaller mapping is already established. While we could support larger mappings for a device with a smaller alignment, that change is too large for the immediate fix. The simplest change is to force fallback until the fault size matches the alignment. Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Cc: Reported-by: Jeff Moyer Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/dax/dax.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 92ef6f97a66e580189a41a132d0f8a9f78d6ddce Author: Matjaz Hegedic Date: Fri Mar 10 14:33:09 2017 -0800 Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw EeeBook X205TA is yet another ASUS device with a special touchpad firmware that needs to be accounted for during initialization, or else the touchpad will go into an invalid state upon suspend/resume. Adding the appropriate ic_type and product_id check fixes the problem. Signed-off-by: Matjaz Hegedic Acked-by: KT Liao Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit a4c2a13129f7c5bcf81704c06851601593303fd5 Author: Dmitry Torokhov Date: Tue Feb 28 17:14:41 2017 -0800 Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list TUXEDO BU1406 does not implement active multiplexing mode properly, and takes around 550 ms in i8042_set_mux_mode(). Given that the device does not have external AUX port, there is no downside in disabling the MUX mode. Reported-by: Paul Menzel Suggested-by: Vojtech Pavlik Reviewed-by: Marcos Paulo de Souza Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 800a938f0bf9130c8256116649c0cc5806bfb2fd Author: NeilBrown Date: Fri Mar 10 11:36:39 2017 +1100 NFSD: fix nfsd_reset_versions for NFSv4. If you write "-2 -3 -4" to the "versions" file, it will notice that no versions are enabled, and nfsd_reset_versions() is called. This enables all major versions, not no minor versions. So we lose the invariant that NFSv4 is only advertised when at least one minor is enabled. Fix the code to explicitly enable minor versions for v4, change it to use nfsd_vers() to test and set, and simplify the code. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 928c6fb3a9bfd6c5b287aa3465226add551c13c0 Author: NeilBrown Date: Fri Mar 10 11:36:39 2017 +1100 NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) Current code will return 1 if the version is supported, and -1 if it isn't. This is confusing and inconsistent with the one place where this is used. So change to return 1 if it is supported, and zero if not. i.e. an error is never returned. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit abcb4dacb098a1baca746406a8775e9930f47f3f Author: NeilBrown Date: Fri Mar 10 11:36:39 2017 +1100 NFSD: further refinement of content of /proc/fs/nfsd/versions Prior to e35659f1b03c ("NFSD: correctly range-check v4.x minor version when setting versions.") v4.0 could not be disabled without disabling all NFSv4 protocols. So the 'versions' file contained ±4 ±4.1 ±4.2. Writing "-4" would disable all v4 completely. Writing +4 would enabled those minor versions that are currently enabled, either by default or otherwise. After that commit, it was possible to disable v4.0 independently. To maximize backward compatibility with use cases which never disabled v4.0, the "versions" file would never contain "+4.0" - that was implied by "+4", unless explicitly negated by "-4.0". This introduced an inconsistency in that it was possible to disable all minor versions, but still have the major version advertised. e.g. "-4.0 -4.1 -4.2 +4" would result in NFSv4 support being advertised, but all attempts to use it rejected. Commit d3635ff07e8c ("nfsd: fix configuration of supported minor versions") and following removed this inconsistency. If all minor version were disabled, the major would be disabled too. If any minor was enabled, the major would be disabled. This patch also treated "+4" as equivalent to "+4.0" and "-4" as "-4.0". A consequence of this is that writing "-4" would only disable 4.0. This is a regression against the earlier behaviour, in a use case that rpc.nfsd actually uses. The command "rpc.nfsd -N 4" will write "+2 +3 -4" to the versions files. Previously, that would disable v4 completely. Now it will only disable v4.0. Also "4.0" never appears in the "versions" file when read. So if only v4.1 is available, the previous kernel would have reported "+4 -4.0 +4.1 -4.2" the current kernel reports "-4 +4.1 -4.2" which could easily confuse. This patch restores the implication that "+4" and "-4" apply more globals and do not imply "4.0". Specifically: writing "-4" will disable all 4.x minor versions. writing "+4" will enable all 4.1 minor version if none are currently enabled. rpc.nfsd will list minor versions before major versions, so rpc.nfsd -V 4.2 -N 4.1 will write "-4.1 +4.2 +2 +3 +4" so it would be a regression for "+4" to enable always all versions. reading "-4" implies that no v4.x are enabled reading "+4" implies that some v4.x are enabled, and that v4.0 is enabled unless "-4.0" is also present. All other minor versions will explicitly be listed. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) commit c952cd4e949ab3d07287efc2e80246e03727d15d Author: Kinglong Mee Date: Fri Mar 10 09:52:20 2017 +0800 nfsd: map the ENOKEY to nfserr_perm for avoiding warning Now that Ext4 and f2fs filesystems support encrypted directories and files, attempts to access those files may return ENOKEY, resulting in the following WARNING. Map ENOKEY to nfserr_perm instead of nfserr_io. [ 1295.411759] ------------[ cut here ]------------ [ 1295.411787] WARNING: CPU: 0 PID: 12786 at fs/nfsd/nfsproc.c:796 nfserrno+0x74/0x80 [nfsd] [ 1295.411806] nfsd: non-standard errno: -126 [ 1295.411816] Modules linked in: nfsd nfs_acl auth_rpcgss nfsv4 nfs lockd fscache tun bridge stp llc fuse ip_set nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event coretemp crct10dif_pclmul crc32_generic crc32_pclmul snd_ens1371 gameport ghash_clmulni_intel snd_ac97_codec f2fs intel_rapl_perf ac97_bus snd_seq ppdev snd_pcm snd_rawmidi snd_timer vmw_balloon snd_seq_device snd joydev soundcore parport_pc parport nfit acpi_cpufreq tpm_tis vmw_vmci tpm_tis_core tpm shpchp i2c_piix4 grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel e1000 mptspi scsi_transport_spi serio_raw mptscsih mptbase ata_generic pata_acpi fjes [last unloaded: nfs_acl] [ 1295.412522] CPU: 0 PID: 12786 Comm: nfsd Tainted: G W 4.11.0-rc1+ #521 [ 1295.412959] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 1295.413814] Call Trace: [ 1295.414252] dump_stack+0x63/0x86 [ 1295.414666] __warn+0xcb/0xf0 [ 1295.415087] warn_slowpath_fmt+0x5f/0x80 [ 1295.415502] ? put_filp+0x42/0x50 [ 1295.415927] nfserrno+0x74/0x80 [nfsd] [ 1295.416339] nfsd_open+0xd7/0x180 [nfsd] [ 1295.416746] nfs4_get_vfs_file+0x367/0x3c0 [nfsd] [ 1295.417182] ? security_inode_permission+0x41/0x60 [ 1295.417591] nfsd4_process_open2+0x9b2/0x1200 [nfsd] [ 1295.418007] nfsd4_open+0x481/0x790 [nfsd] [ 1295.418409] nfsd4_proc_compound+0x395/0x680 [nfsd] [ 1295.418812] nfsd_dispatch+0xb8/0x1f0 [nfsd] [ 1295.419233] svc_process_common+0x4d9/0x830 [sunrpc] [ 1295.419631] svc_process+0xfe/0x1b0 [sunrpc] [ 1295.420033] nfsd+0xe9/0x150 [nfsd] [ 1295.420420] kthread+0x101/0x140 [ 1295.420802] ? nfsd_destroy+0x60/0x60 [nfsd] [ 1295.421199] ? kthread_park+0x90/0x90 [ 1295.421598] ret_from_fork+0x2c/0x40 [ 1295.421996] ---[ end trace 0d5a969cd7852e1f ]--- Signed-off-by: Kinglong Mee Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfsproc.c | 1 + 1 file changed, 1 insertion(+) commit 1345921393ba23b60d3fcf15933e699232ad25ae Author: Jason Yan Date: Fri Mar 10 11:49:12 2017 +0800 md: fix incorrect use of lexx_to_cpu in does_sb_need_changing The sb->layout is of type __le32, so we shoud use le32_to_cpu. Signed-off-by: Jason Yan Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fb632e40d7667d8bedfabc28850ac06d5493f54 Author: Jason Yan Date: Fri Mar 10 11:27:23 2017 +0800 md: fix super_offset endianness in super_1_rdev_size_change The sb->super_offset should be big-endian, but the rdev->sb_start is in host byte order, so fix this by adding cpu_to_le64. Signed-off-by: Jason Yan Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40c50c1fecdf012a3bf055ec813f0ef2eda2749c Author: Thomas Gleixner Date: Fri Mar 10 13:17:18 2017 +0100 kexec, x86/purgatory: Unbreak it and clean it up The purgatory code defines global variables which are referenced via a symbol lookup in the kexec code (core and arch). A recent commit addressing sparse warnings made these static and thereby broke kexec_file. Why did this happen? Simply because the whole machinery is undocumented and lacks any form of forward declarations. The variable names are unspecific and lack a prefix, so adding forward declarations creates shadow variables in the core code. Aside of that the code relies on magic constants and duplicate struct definitions with no way to ensure that these things stay in sync. The section placement of the purgatory variables happened by chance and not by design. Unbreak kexec and cleanup the mess: - Add proper forward declarations and document the usage - Use common struct definition - Use the proper common defines instead of magic constants - Add a purgatory_ prefix to have a proper name space - Use ARRAY_SIZE() instead of a homebrewn reimplementation - Add proper sections to the purgatory variables [ From Mike ] Fixes: 72042a8c7b01 ("x86/purgatory: Make functions and variables static") Reported-by: Mike Galbraith < Signed-off-by: Thomas Gleixner Cc: Nicholas Mc Guire Cc: Borislav Petkov Cc: Vivek Goyal Cc: "Tobin C. Harding" Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1703101315140.3681@nanos Signed-off-by: Thomas Gleixner arch/powerpc/purgatory/trampoline.S | 12 ++++++------ arch/x86/include/asm/purgatory.h | 20 ++++++++++++++++++++ arch/x86/kernel/machine_kexec_64.c | 9 ++++++--- arch/x86/purgatory/purgatory.c | 35 +++++++++++++++++------------------ arch/x86/purgatory/purgatory.h | 8 -------- arch/x86/purgatory/setup-x86_64.S | 2 +- arch/x86/purgatory/sha256.h | 1 - include/linux/purgatory.h | 23 +++++++++++++++++++++++ kernel/kexec_file.c | 8 ++++---- kernel/kexec_internal.h | 6 +----- 10 files changed, 78 insertions(+), 46 deletions(-) commit 607523d19c9d67ba4cf7bdaced644f11ed04992c Author: Dave Airlie Date: Fri Mar 10 12:13:04 2017 +1000 drm/amdgpu: fix parser init error path to avoid crash in parser fini If we don't reset the chunk info in the error path, the subsequent fini path will double free. Reviewed-by: Christian König Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++ 1 file changed, 2 insertions(+) commit d8a8ed9758241e138933c67e40db2db2790eca19 Author: Tom St Denis Date: Thu Mar 9 13:21:07 2017 -0500 drm/amd/amdgpu: Disable GFX_PG on Carrizo until compute issues solved Currently compute jobs will stall if GFX_PG is enabled. Until this is resolved we'll disable GFX_PG. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24c534bb161b8c95f261b34cbe44bbd043e829fc Merge: 2baf380 7cc5e38 Author: Linus Torvalds Date: Fri Mar 10 11:05:47 2017 -0800 Merge tag 'ceph-for-4.11-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: - a fix for the recently discovered misdirected requests bug present in jewel and later on the server side and all stable kernels - a fixup for -rc1 CRUSH changes - two usability enhancements: osd_request_timeout option and supported_features bus attribute. * tag 'ceph-for-4.11-rc2' of git://github.com/ceph/ceph-client: libceph: osd_request_timeout option rbd: supported_features bus attribute libceph: don't set weight to IN when OSD is destroyed libceph: fix crush_decode() for older maps commit a03849e7210277fa212779b7cd9c30e1ab6194b2 Author: Oleksandr Tyshchenko Date: Mon Feb 27 14:30:26 2017 +0200 iommu/io-pgtable-arm-v7s: Check for leaf entry before dereferencing it Do a check for already installed leaf entry at the current level before dereferencing it in order to avoid walking the page table down with wrong pointer to the next level. Signed-off-by: Oleksandr Tyshchenko CC: Will Deacon CC: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ed46e66cc1b3d684042f92dfa2ab15ee917b4cac Author: Oleksandr Tyshchenko Date: Mon Feb 27 14:30:25 2017 +0200 iommu/io-pgtable-arm: Check for leaf entry before dereferencing it Do a check for already installed leaf entry at the current level before dereferencing it in order to avoid walking the page table down with wrong pointer to the next level. Signed-off-by: Oleksandr Tyshchenko CC: Will Deacon CC: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b6573da139ecbee6f2c77392b51266d4521d50ac Author: Benjamin Tissoires Date: Fri Mar 10 10:10:54 2017 -0800 Input: synaptics-rmi4 - prevent null pointer dereference in f30 If the platform data has f30_data.disable set, f30 in rmi_f30_config() might be null. Prevent a kernel oops by checking for non-null f30. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f30.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0e4c0e6ea7d4a988a5ae2791c7cb5769b5256dad Author: Geert Uytterhoeven Date: Fri Feb 17 15:25:08 2017 +0100 arm64: kernel: Update kerneldoc for cpu_suspend() rename Commit af391b15f7b56ce1 ("arm64: kernel: rename __cpu_suspend to keep it aligned with arm") renamed cpu_suspend() to arm_cpuidle_suspend(), but forgot to update the kerneldoc header. Fixes: af391b15f7b56ce1 ("arm64: kernel: rename __cpu_suspend to keep it aligned with arm") Signed-off-by: Geert Uytterhoeven Signed-off-by: Will Deacon arch/arm64/kernel/cpuidle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 609a807a95301cec7edb446241a35b402f85b4c3 Merge: 702f2ac ea29bd3 Author: David S. Miller Date: Fri Mar 10 10:03:27 2017 -0800 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox mlx5 fixes 2017-03-09 This series contains some mlx5 core and ethernet driver fixes. For -stable: net/mlx5e: remove IEEE/CEE mode check when setting DCBX mode (for kernel >= 4.10) net/mlx5e: Avoid wrong identification of rules on deletion (for kernel >= 4.9) net/mlx5: Don't save PCI state when PCI error is detected (for kernel >= 4.9) net/mlx5: Fix create autogroup prev initializer (for kernel >=4.9) ==================== Signed-off-by: David S. Miller commit ea29bd304d7b522f6162a36f394e690c579b5a63 Author: Eugenia Emantayev Date: Fri Mar 10 14:33:05 2017 +0200 net/mlx5e: Fix loopback selftest Change packet type handler to ETH_P_IP instead of ETH_P_ALL since we are already expecting an IP packet. Also, using ETH_P_ALL will cause the loopback test packet type handler to be called on all outgoing packets, especially our own self loopback test SKB, which will be validated on xmit as well, and we don't want that. Tested with: ethtool -t ethX validated that the loopback test passes. Fixes: 0952da791c97 ('net/mlx5e: Add support for loopback selftest') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 65ba8fb7d5c6803ec236bb8d6650465fed7f9769 Author: Or Gerlitz Date: Fri Mar 10 14:33:04 2017 +0200 net/mlx5e: Avoid wrong identification of rules on deletion When deleting offloaded TC flows, we must correctly identify E-switch rules. The current check could get us wrong w.r.t to rules set on the PF. Since it's possible to set NIC rules on the PF, switch to SRIOV offloads mode and then attempt to delete a NIC rule. To solve that, we add a flags field to offloaded rules, set it on creation time and use that over the code where currently needed. Fixes: 8b32580df1cb ('net/mlx5e: Add TC vlan action for SRIOV offloads') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 33 ++++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 33e21c59526e9147d7c68913995298f10c35cd6f Author: Huy Nguyen Date: Fri Mar 10 14:33:03 2017 +0200 net/mlx5e: remove IEEE/CEE mode check when setting DCBX mode Currently, the function setdcbx fails if the request dcbx mode is either IEEE or CEE. We remove the IEEE/CEE mode check because we support both IEEE and CEE interfaces. Fixes: 3a6a931dfb8e ("net/mlx5e: Support DCBX CEE API") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5d47f6c89d568ab61712d8c40676fbb020b68752 Author: Daniel Jurgens Date: Fri Mar 10 14:33:02 2017 +0200 net/mlx5: Don't save PCI state when PCI error is detected When a PCI error is detected the PCI state could be corrupt, don't save it in that flow. Save the state after initialization. After restoring the PCI state during slot reset save it again, restoring the state destroys the previously saved state info. Fixes: 05ac2c0b7438 ('net/mlx5: Fix race between PCI error handlers and health work') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit af36370569eb37420e1e78a2e60c277b781fcd00 Author: Paul Blakey Date: Fri Mar 10 14:33:01 2017 +0200 net/mlx5: Fix create autogroup prev initializer The autogroups list is a list of non overlapping group boundaries sorted by their start index. If the autogroups list wasn't empty and an empty group slot was found at the start of the list, the new group was added to the end of the list instead of the beginning, as the prev initializer was incorrect. When this was repeated, it caused multiple groups to have overlapping boundaries. Fixed that by correctly initializing the prev pointer to the start of the list. Fixes: eccec8da3b4e ('net/mlx5: Keep autogroups list ordered') Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2baf38095cd79bb18108bc6131aec84ea85ae368 Merge: 7c7fba9 806dbb2 Author: Linus Torvalds Date: Fri Mar 10 09:56:16 2017 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Here are some driver bugfixes from I2C. Unusual this time are the two reverts. One because I accidently picked a patch from the list which I should have pulled from my co-maintainer instead ("missing of_node_put"). And one which I wrongly assumed to be an easy fix but it turned out already that it needs more iterations ("copy device properties")" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: Revert "i2c: copy device properties when using i2c_register_board_info()" Revert "i2c: add missing of_node_put in i2c_mux_del_adapters" i2c: exynos5: Avoid transaction timeouts due TRANSFER_DONE_AUTO not set i2c: designware: add reset interface i2c: meson: fix wrong variable usage in meson_i2c_put_data i2c: copy device properties when using i2c_register_board_info() i2c: m65xx: drop superfluous quirk structure i2c: brcmstb: Fix START and STOP conditions i2c: add missing of_node_put in i2c_mux_del_adapters i2c: riic: fix restart condition i2c: add missing of_node_put in i2c_mux_del_adapters commit 7c7fba984d39077a5c3d7a3cb9dcacf21be7508b Merge: baeedc71 3f81e13 Author: Linus Torvalds Date: Fri Mar 10 09:53:00 2017 -0800 Merge tag 'drm-fixes-for-4.11-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Intel, amd and mxsfb fixes. These are the drm fixes I've collected for rc2. Mostly i915 GVT only fixes, along with a single EDID fix, some mxsfb fixes and a few minor amd fixes" * tag 'drm-fixes-for-4.11-rc2' of git://people.freedesktop.org/~airlied/linux: (38 commits) drm: mxsfb: Implement drm_panel handling drm: mxsfb_crtc: Fix the framebuffer misplacement drm: mxsfb: Fix crash when provided invalid DT bindings drm: mxsfb: fix pixel clock polarity drm: mxsfb: use bus_format to determine LCD bus width drm/amdgpu: bump driver version for some new features drm/amdgpu: validate paramaters in the gem ioctl drm/amd/amdgpu: fix console deadlock if late init failed drm/i915/gvt: change some gvt_err to gvt_dbg_cmd drm/i915/gvt: protect RO and Rsvd bits of virtual vgpu configuration space drm/i915/gvt: handle workload lifecycle properly drm/edid: Add EDID_QUIRK_FORCE_8BPC quirk for Rotel RSX-1058 drm/i915/gvt: fix an error for F_RO flag drm/i915/gvt: use pfn_valid for better checking drm/i915/gvt: set SFUSE_STRAP properly for vitual monitor detection drm/i915/gvt: fix an error for one register drm/i915/gvt: add more registers into handlers list drm/i915/gvt: have more registers with F_CMD_ACCESS flags set drm/i915/gvt: add some new MMIOs to cmd_access white list drm/i915/gvt: fix pcode mailbox write emulation of BDW ... commit 14088540ad63c648e5cdf490412033f792d16b6b Author: Mark Rutland Date: Fri Mar 10 17:44:18 2017 +0000 arm64: use const cap for system_uses_ttbr0_pan() Since commit 4b65a5db362783ab ("arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1"), system_uses_ttbr0_pan() has used cpus_have_cap() to determine whether PAN is present. Since commit a4023f682739439b ("arm64: Add hypervisor safe helper for checking constant capabilities"), which was introduced around the same time, cpus_have_cap() doesn't try to use a static key, and must always perform a load, test, and consitional branch (likely a tbnz for the latter two). Elsewhere, we moved to using cpus_have_const_cap(), which can use a static key (i.e. a non-conditional branch), which is patched at runtime when the feature is detected. This patch makes system_uses_ttbr0_pan() use cpus_have_const_cap(). The static key is likely a win for hot-paths like the uacccess primitives, and this makes our usage consistent regardless. Signed-off-by: Mark Rutland Reviewed-by: Suzuki K Poulose Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c2a625937ba49bc691089370638223d310cda9a Author: Eric Biggers Date: Wed Mar 8 16:27:04 2017 -0800 arm64: support keyctl() system call in 32-bit mode As is the case for a number of other architectures that have a 32-bit compat mode, enable KEYS_COMPAT if both COMPAT and KEYS are enabled. This allows AArch32 programs to use the keyctl() system call when running on an AArch64 kernel. Signed-off-by: Eric Biggers Signed-off-by: Will Deacon arch/arm64/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit b0de0ccc8b9edd8846828e0ecdc35deacdf186b0 Author: Mark Rutland Date: Mon Mar 6 19:06:40 2017 +0000 arm64: kasan: avoid bad virt_to_pfn() Booting a v4.11-rc1 kernel with DEBUG_VIRTUAL and KASAN enabled produces the following splat (trimmed for brevity): [ 0.000000] virt_to_phys used for non-linear address: ffff200008080000 (0xffff200008080000) [ 0.000000] WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x48/0x70 [ 0.000000] PC is at __virt_to_phys+0x48/0x70 [ 0.000000] LR is at __virt_to_phys+0x48/0x70 [ 0.000000] Call trace: [ 0.000000] [] __virt_to_phys+0x48/0x70 [ 0.000000] [] kasan_init+0x1c0/0x498 [ 0.000000] [] setup_arch+0x2fc/0x948 [ 0.000000] [] start_kernel+0xb8/0x570 [ 0.000000] [] __primary_switched+0x6c/0x74 This is because we use virt_to_pfn() on a kernel image address when trying to figure out its nid, so that we can allocate its shadow from the same node. As with other recent changes, this patch uses lm_alias() to solve this. We could instead use NUMA_NO_NODE, as x86 does for all shadow allocations, though we'll likely want the "real" memory shadow to be backed from its corresponding nid anyway, so we may as well be consistent and find the nid for the image shadow. Cc: Catalin Marinas Cc: Will Deacon Acked-by: Laura Abbott Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/mm/kasan_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb6950b7152fb3760942f9cb16bd2a35e5a1bfd1 Author: Naveen N. Rao Date: Tue Mar 7 00:34:57 2017 +0530 arm64: kprobes: remove kprobe_exceptions_notify Commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") introduces a generic empty version of the function for architectures that don't need special handling, like arm64. As such, remove the arch/arm64/ specific handler. Signed-off-by: Naveen N. Rao Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 6 ------ 1 file changed, 6 deletions(-) commit 702f2ac87a9a8da23bf8506466bc70175fc970b2 Author: David Howells Date: Fri Mar 10 07:48:49 2017 +0000 rxrpc: Wake up the transmitter if Rx window size increases on the peer The RxRPC ACK packet may contain an extension that includes the peer's current Rx window size for this call. We adjust the local Tx window size to match. However, the transmitter can stall if the receive window is reduced to 0 by the peer and then reopened. This is because the normal way that the transmitter is re-energised is by dropping something out of our Tx queue and thus making space. When a single gap is made, the transmitter is woken up. However, because there's nothing in the Tx queue at this point, this doesn't happen. To fix this, perform a wake_up() any time we see the peer's Rx window size increasing. The observable symptom is that calls start failing on ETIMEDOUT and the following: kAFS: SERVER DEAD state=-62 appears in dmesg. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/input.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit baeedc7158da5b0f489d04125ba6adfba532a6f7 Merge: 8fe3cca 90eceff Author: Linus Torvalds Date: Fri Mar 10 08:59:07 2017 -0800 Merge branch 'prep-for-5level' Merge 5-level page table prep from Kirill Shutemov: "Here's relatively low-risk part of 5-level paging patchset. Merging it now will make x86 5-level paging enabling in v4.12 easier. The first patch is actually x86-specific: detect 5-level paging support. It boils down to single define. The rest of patchset converts Linux MMU abstraction from 4- to 5-level paging. Enabling of new abstraction in most cases requires adding single line of code in arch-specific code. The rest is taken care by asm-generic/. Changes to mm/ code are mostly mechanical: add support for new page table level -- p4d_t -- where we deal with pud_t now. v2: - fix build on microblaze (Michal); - comment for __ARCH_HAS_5LEVEL_HACK in kasan_populate_zero_shadow(); - acks from Michal" * emailed patches from Kirill A Shutemov : mm: introduce __p4d_alloc() mm: convert generic code to 5-level paging asm-generic: introduce arch, mm: convert all architectures to use 5level-fixup.h asm-generic: introduce __ARCH_USE_5LEVEL_HACK asm-generic: introduce 5level-fixup.h x86/cpufeature: Add 5-level paging detection commit 8fe3ccaed080a7804bc459c42e0419253973be92 Merge: 9db61d6 2378cd6 Author: Linus Torvalds Date: Fri Mar 10 08:34:42 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "26 fixes" * emailed patches from Andrew Morton : (26 commits) userfaultfd: remove wrong comment from userfaultfd_ctx_get() fat: fix using uninitialized fields of fat_inode/fsinfo_inode sh: cayman: IDE support fix kasan: fix races in quarantine_remove_cache() kasan: resched in quarantine_remove_cache() mm: do not call mem_cgroup_free() from within mem_cgroup_alloc() thp: fix another corner case of munlock() vs. THPs rmap: fix NULL-pointer dereference on THP munlocking mm/memblock.c: fix memblock_next_valid_pfn() userfaultfd: selftest: vm: allow to build in vm/ directory userfaultfd: non-cooperative: userfaultfd_remove revalidate vma in MADV_DONTNEED userfaultfd: non-cooperative: fix fork fctx->new memleak mm/cgroup: avoid panic when init with low memory drivers/md/bcache/util.h: remove duplicate inclusion of blkdev.h mm/vmstats: add thp_split_pud event for clarity include/linux/fs.h: fix unsigned enum warning with gcc-4.2 userfaultfd: non-cooperative: release all ctx in dup_userfaultfd_complete userfaultfd: non-cooperative: robustness check userfaultfd: non-cooperative: rollback userfaultfd_exit x86, mm: unify exit paths in gup_pte_range() ... commit 8b38f890eff6efc153130254a96452570f971159 Author: Masahiro Yamada Date: Fri Mar 10 10:41:50 2017 +0900 MAINTAINERS: add Masahiro Yamada as a Kbuild maintainer It has been difficult lately for Michal to work on Kbuild on his regular basis. We discussed the maintainership of Kbuild, and I decided to be a co-maintainer. Add myself to the maintainer field, and replace the repository with my own. Signed-off-by: Masahiro Yamada Acked-by: Michal Marek MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1479f6108006555fe33d7cfe8db4f95ad614b9a Author: Mihail Atanassov Date: Thu Feb 9 11:32:00 2017 +0000 drm: mali-dp: Fix smart layer not going to composition Use rectangle 1 as a generic plane. Existing code already sets the smart layer bounding box size + offset. The rectangles' offsets are relative to the bounding box, so there is no need to set R1's offset (reset value is 0), just its size which is the same as the bounding box. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 18 ++++++++++++++++-- drivers/gpu/drm/arm/malidp_regs.h | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) commit 9a8b0a230aca55ee142fd76f4765f1da1799da93 Author: Mihail Atanassov Date: Wed Feb 15 14:00:15 2017 +0000 drm: mali-dp: Remove mclk rate management The rate of mclk depends on the use-case. If no downscaling is required, then mclk == pxlclk is a valid option; with downscaling however, the rate at which mclk runs determines how much a plane can be downscaled before composition. This is a system integration + power management issue that is more suited to firmware rather than this driver. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bba8376aea1dcbbe22bbda118c52abee317c7609 Author: Matjaz Hegedic Date: Thu Mar 9 14:00:17 2017 +0100 x86/reboot/quirks: Fix typo in ASUS EeeBook X205TA reboot quirk The reboot quirk for ASUS EeeBook X205TA contains a typo in DMI_PRODUCT_NAME, improperly referring to X205TAW instead of X205TA, which prevents the quirk from being triggered. The model X205TAW already has a reboot quirk of its own. This fix simply removes the inappropriate final letter W. Fixes: 90b28ded88dd ("x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk") Signed-off-by: Matjaz Hegedic Link: http://lkml.kernel.org/r/1489064417-7445-1-git-send-email-matjaz.hegedic@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1016e94cce9fb6ea56d7602263783e2d95d6e92 Author: Russell King Date: Thu Mar 9 17:14:32 2017 +0000 ARM: wire up statx syscall Wire up the new statx syscall for ARM. Signed-off-by: Russell King arch/arm/tools/syscall.tbl | 1 + 1 file changed, 1 insertion(+) commit 296739839fa2851e6badc77dcfc45050094cb102 Author: Andrew Lunn Date: Thu Mar 9 20:53:31 2017 +0100 net: phy: marvell: Fix double free of hwmon device The hwmon temperature sensor devices is registered using a devm_hwmon API call. The marvell_release() would then manually free the device, not using a devm_hmon API, resulting in the device being removed twice, leading to a crash in kernfs_find_ns() during the second removal. Remove the manual removal, which makes marvell_release() empty, so remove it as well. Signed-off-by: Andrew Lunn Fixes: 0b04680fdae4 ("phy: marvell: Add support for temperature sensor") Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 15 --------------- 1 file changed, 15 deletions(-) commit 7b9f71f974a12740e79e918cfd58c2fce0b5b580 Author: Nicholas Piggin Date: Tue Feb 28 12:00:48 2017 +1000 powerpc/64s: POWER9 machine check handler Add POWER9 machine check handler. There are several new types of errors added, so logging messages for those are also added. This doesn't attempt to reuse any of the P7/8 defines or functions, because that becomes too complex. The better option in future is to use a table driven approach. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 4 + arch/powerpc/include/asm/mce.h | 105 +++++++++++++++++ arch/powerpc/kernel/cputable.c | 3 + arch/powerpc/kernel/mce.c | 83 ++++++++++++++ arch/powerpc/kernel/mce_power.c | 231 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 426 insertions(+) commit c1bbf387d6191e6e18f3adc4db45b922822c2ba4 Author: Nicholas Piggin Date: Tue Feb 28 12:00:47 2017 +1000 powerpc/64s: allow machine check handler to set severity and initiator Currently severity and initiator are always set to MCE_SEV_ERROR_SYNC and MCE_INITIATOR_CPU in the core mce code. Allow them to be set by the machine specific mce handlers. No functional change for existing handlers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mce.h | 3 ++- arch/powerpc/kernel/mce.c | 5 +++-- arch/powerpc/kernel/mce_power.c | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-) commit 1363875bdb6317a2d0798284d7aaf320f0782f6d Author: Nicholas Piggin Date: Tue Feb 28 12:00:46 2017 +1000 powerpc/64s: fix handling of non-synchronous machine checks A synchronous machine check is an exception raised by the attempt to execute the current instruction. If the error can't be corrected, it can make sense to SIGBUS the currently running process. In other cases, the error condition is not related to the current instruction, so killing the current process is not the right thing to do. Today, all machine checks are MCE_SEV_ERROR_SYNC, so this has no practical change. It will be used to handle POWER9 asynchronous machine checks. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 46f401c4297a2232a037ad8801b6c83c90414cf7 Author: Larry Finger Date: Thu Mar 9 20:33:51 2017 -0600 powerpc/pmac: Fix crash in dma-mapping.h with NULL dma_ops Commit 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata into struct device") introduced a crash for macio devices, an example backtrace being: kernel BUG at ./include/linux/dma-mapping.h:465! Oops: Exception in kernel mode, sig: 5 [#1] ... NIP [c031ddb0] dmam_alloc_coherent+0x74/0x140 LR [c031de70] dmam_alloc_coherent+0x134/0x140 Call Trace: dmam_alloc_coherent+0x134/0x140 (unreliable) pata_macio_port_start+0x3c/0x8c ata_host_start.part.5+0xfc/0x208 ata_host_activate+0x128/0x154 pata_macio_common_init+0x2f0/0x538 pata_macio_attach+0xd8/0x180 macio_device_probe+0x5c/0xec driver_probe_device+0x21c/0x314 __driver_attach+0xcc/0xd0 bus_for_each_dev+0x68/0xb4 bus_add_driver+0x1dc/0x244 driver_register+0x88/0x130 pata_macio_init+0x5c/0x88 do_one_initcall+0x40/0x170 kernel_init_freeable+0x134/0x1d0 kernel_init+0x18/0x110 ret_from_kernel_thread+0x5c/0x64 This was caused by the device having NULL dma_ops, triggering the BUG_ON(). Previously the device inherited its dma_ops via the assignment to dev->ofdev.dev.archdata. However after commit 5657933dbb6e the dma_ops are moved into dev->ofdev.dev, and so they need to be explicitly copied. Fixes: 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata into struct device") Signed-off-by: Larry Finger Suggested-by: Benjamin Herrenschmidt [mpe: Rewrite change log, add backtrace] Signed-off-by: Michael Ellerman drivers/macintosh/macio_asic.c | 1 + 1 file changed, 1 insertion(+) commit b3b8812e66511b7da3c4fed140da5f751c38cd7a Merge: d7aba64 6d22fe1 Author: David S. Miller Date: Thu Mar 9 18:39:03 2017 -0800 Merge branch 'bcmgenet-minor-bug-fixes' Doug Berger says: ==================== net: bcmgenet: minor bug fixes v2: Accidentally sent the wrong set after rebasing. This collection contains a number of fixes for minor issues with the bcmgenet driver most of which were present in the initial submission of the driver. Some bugs were uncovered by inspection prior to the upcoming update for GENETv5 support: net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values net: bcmgenet: correct MIB access of UniMAC RUNT counters net: bcmgenet: reserved phy revisions must be checked first net: bcmgenet: synchronize irq0 status between the isr and task Others bugs were found in power management testing: net: bcmgenet: power down internal phy if open or resume fails net: bcmgenet: Power up the internal PHY before probing the MII net: bcmgenet: decouple flow control from bcmgenet_tx_reclaim net: bcmgenet: add begin/complete ethtool ops Doug Berger (7): net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values net: bcmgenet: correct MIB access of UniMAC RUNT counters net: bcmgenet: reserved phy revisions must be checked first net: bcmgenet: power down internal phy if open or resume fails net: bcmgenet: synchronize irq0 status between the isr and task net: bcmgenet: Power up the internal PHY before probing the MII net: bcmgenet: decouple flow control from bcmgenet_tx_reclaim Edwin Chan (1): net: bcmgenet: add begin/complete ethtool ops ==================== Signed-off-by: David S. Miller commit 6d22fe14005ce66d1a120495ac16499b944feb95 Author: Doug Berger Date: Thu Mar 9 16:58:50 2017 -0800 net: bcmgenet: decouple flow control from bcmgenet_tx_reclaim The bcmgenet_tx_reclaim() function is used to reclaim transmit resources in different places within the driver. Most of them should not affect the state of the transmit flow control. This commit relocates the logic for waking tx queues based on freed resources to the napi polling function where it is more appropriate. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 89316fa34ab8afac8d693f41a5bc268673f1da15 Author: Edwin Chan Date: Thu Mar 9 16:58:49 2017 -0800 net: bcmgenet: add begin/complete ethtool ops Make sure clock is enabled for ethtool ops. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Edwin Chan Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6be371b053dc86f11465cc1abce2e99bda0a0574 Author: Doug Berger Date: Thu Mar 9 16:58:48 2017 -0800 net: bcmgenet: Power up the internal PHY before probing the MII When using the internal PHY it must be powered up when the MII is probed or the PHY will not be detected. Since the PHY is powered up at reset this has not been a problem. However, when the kernel is restarted with kexec the PHY will likely be powered down when the kernel starts so it will not be detected and the Ethernet link will not be established. This commit explicitly powers up the internal PHY when the GENET driver is probed to correct this behavior. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 07c52d6a0b955a8a28834f9354793cfc4b81d0e9 Author: Doug Berger Date: Thu Mar 9 16:58:47 2017 -0800 net: bcmgenet: synchronize irq0 status between the isr and task Add a spinlock to ensure that irq0_stat is not unintentionally altered as the result of preemption. Also removed unserviced irq0 interrupts and removed irq1_stat since there is no bottom half service for those interrupts. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 73 ++++++++++++++------------ drivers/net/ethernet/broadcom/genet/bcmgenet.h | 6 ++- 2 files changed, 44 insertions(+), 35 deletions(-) commit 7627409cc4970e8c8b9de6945ad86a575290a94e Author: Doug Berger Date: Thu Mar 9 16:58:46 2017 -0800 net: bcmgenet: power down internal phy if open or resume fails Since the internal PHY is powered up during the open and resume functions it should be powered back down if the functions fail. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++++ 1 file changed, 4 insertions(+) commit eca4bad73409aedc6ff22f823c18b67a4f08c851 Author: Doug Berger Date: Thu Mar 9 16:58:45 2017 -0800 net: bcmgenet: reserved phy revisions must be checked first The reserved gphy_rev value of 0x01ff must be tested before the old or new scheme for GPHY major versioning are tested, otherwise it will be treated as 0xff00 according to the old scheme. Fixes: b04a2f5b9ff5 ("net: bcmgenet: add support for new GENET PHY revision scheme") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1ad3d225e5a40ca6c586989b4baaca710544c15a Author: Doug Berger Date: Thu Mar 9 16:58:44 2017 -0800 net: bcmgenet: correct MIB access of UniMAC RUNT counters The gap between the Tx status counters and the Rx RUNT counters is now being added to allow correct reporting of the registers. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ffff71328a3c321f7c14cc1edd33577717037744 Author: Doug Berger Date: Thu Mar 9 16:58:43 2017 -0800 net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values The location of the RBUF overflow and error counters has moved between different version of the GENET MAC. This commit corrects the driver to read from the correct locations depending on the version of the GENET MAC. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 60 +++++++++++++++++++++++--- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 10 +++-- 2 files changed, 60 insertions(+), 10 deletions(-) commit d7aba644ffdebf756e51e26a2229055211838e89 Author: Lendacky, Thomas Date: Thu Mar 9 17:48:23 2017 -0600 amd-xgbe: Enable IRQs only if napi_complete_done() is true Depending on the hardware, the amd-xgbe driver may use disable_irq_nosync() and enable_irq() when an interrupt is received to process Rx packets. If the napi_complete_done() return value isn't checked an unbalanced enable for the IRQ could result, generating a warning stack trace. Update the driver to only enable interrupts if napi_complete_done() returns true. Reported-by: Jeremy Linton Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 6fc166d62c6f9f6eda5ea300f671d34e89bdd3c8 Author: David Howells Date: Thu Mar 9 08:10:32 2017 +0000 rxrpc: rxrpc_kernel_send_data() needs to handle failed call better If rxrpc_kernel_send_data() is asked to send data through a call that has already failed (due to a remote abort, received protocol error or network error), then return the associated error code saved in the call rather than ESHUTDOWN. This allows the caller to work out whether to ask for the abort code or not based on this. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/sendmsg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4b3b45edba9222e518a1ec72df841eba3609fe34 Author: Alexey Kodanev Date: Thu Mar 9 13:56:46 2017 +0300 udp: avoid ufo handling on IP payload compression packets commit c146066ab802 ("ipv4: Don't use ufo handling on later transformed packets") and commit f89c56ce710a ("ipv6: Don't use ufo handling on later transformed packets") added a check that 'rt->dst.header_len' isn't zero in order to skip UFO, but it doesn't include IPcomp in transport mode where it equals zero. Packets, after payload compression, may not require further fragmentation, and if original length exceeds MTU, later compressed packets will be transmitted incorrectly. This can be reproduced with LTP udp_ipsec.sh test on veth device with enabled UFO, MTU is 1500 and UDP payload is 2000: * IPv4 case, offset is wrong + unnecessary fragmentation udp_ipsec.sh -p comp -m transport -s 2000 & tcpdump -ni ltp_ns_veth2 ... IP (tos 0x0, ttl 64, id 45203, offset 0, flags [+], proto Compressed IP (108), length 49) 10.0.0.2 > 10.0.0.1: IPComp(cpi=0x1000) IP (tos 0x0, ttl 64, id 45203, offset 1480, flags [none], proto UDP (17), length 21) 10.0.0.2 > 10.0.0.1: ip-proto-17 * IPv6 case, sending small fragments udp_ipsec.sh -6 -p comp -m transport -s 2000 & tcpdump -ni ltp_ns_veth2 ... IP6 (flowlabel 0x6b9ba, hlim 64, next-header Compressed IP (108) payload length: 37) fd00::2 > fd00::1: IPComp(cpi=0x1000) IP6 (flowlabel 0x6b9ba, hlim 64, next-header Compressed IP (108) payload length: 21) fd00::2 > fd00::1: IPComp(cpi=0x1000) Fix it by checking 'rt->dst.xfrm' pointer to 'xfrm_state' struct, skip UFO if xfrm is set. So the new check will include both cases: IPcomp and IPsec. Fixes: c146066ab802 ("ipv4: Don't use ufo handling on later transformed packets") Fixes: f89c56ce710a ("ipv6: Don't use ufo handling on later transformed packets") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv4/ip_output.c | 2 +- net/ipv6/ip6_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cdfbabfb2f0ce983fdaa42f20e5f7842178fc01e Author: David Howells Date: Thu Mar 9 08:09:05 2017 +0000 net: Work around lockdep limitation in sockets that use sockets Lockdep issues a circular dependency warning when AFS issues an operation through AF_RXRPC from a context in which the VFS/VM holds the mmap_sem. The theory lockdep comes up with is as follows: (1) If the pagefault handler decides it needs to read pages from AFS, it calls AFS with mmap_sem held and AFS begins an AF_RXRPC call, but creating a call requires the socket lock: mmap_sem must be taken before sk_lock-AF_RXRPC (2) afs_open_socket() opens an AF_RXRPC socket and binds it. rxrpc_bind() binds the underlying UDP socket whilst holding its socket lock. inet_bind() takes its own socket lock: sk_lock-AF_RXRPC must be taken before sk_lock-AF_INET (3) Reading from a TCP socket into a userspace buffer might cause a fault and thus cause the kernel to take the mmap_sem, but the TCP socket is locked whilst doing this: sk_lock-AF_INET must be taken before mmap_sem However, lockdep's theory is wrong in this instance because it deals only with lock classes and not individual locks. The AF_INET lock in (2) isn't really equivalent to the AF_INET lock in (3) as the former deals with a socket entirely internal to the kernel that never sees userspace. This is a limitation in the design of lockdep. Fix the general case by: (1) Double up all the locking keys used in sockets so that one set are used if the socket is created by userspace and the other set is used if the socket is created by the kernel. (2) Store the kern parameter passed to sk_alloc() in a variable in the sock struct (sk_kern_sock). This informs sock_lock_init(), sock_init_data() and sk_clone_lock() as to the lock keys to be used. Note that the child created by sk_clone_lock() inherits the parent's kern setting. (3) Add a 'kern' parameter to ->accept() that is analogous to the one passed in to ->create() that distinguishes whether kernel_accept() or sys_accept4() was the caller and can be passed to sk_alloc(). Note that a lot of accept functions merely dequeue an already allocated socket. I haven't touched these as the new socket already exists before we get the parameter. Note also that there are a couple of places where I've made the accepted socket unconditionally kernel-based: irda_accept() rds_rcp_accept_one() tcp_accept_from_sock() because they follow a sock_create_kern() and accept off of that. Whilst creating this, I noticed that lustre and ocfs don't create sockets through sock_create_kern() and thus they aren't marked as for-kernel, though they appear to be internal. I wonder if these should do that so that they use the new set of lock keys. Signed-off-by: David Howells Signed-off-by: David S. Miller crypto/af_alg.c | 9 ++- crypto/algif_hash.c | 9 ++- drivers/staging/lustre/lnet/lnet/lib-socket.c | 4 +- fs/dlm/lowcomms.c | 2 +- fs/ocfs2/cluster/tcp.c | 2 +- include/crypto/if_alg.h | 2 +- include/linux/net.h | 2 +- include/net/inet_common.h | 3 +- include/net/inet_connection_sock.h | 2 +- include/net/sctp/structs.h | 3 +- include/net/sock.h | 9 ++- net/atm/svc.c | 5 +- net/ax25/af_ax25.c | 3 +- net/bluetooth/l2cap_sock.c | 2 +- net/bluetooth/rfcomm/sock.c | 3 +- net/bluetooth/sco.c | 2 +- net/core/sock.c | 106 ++++++++++++++------------ net/decnet/af_decnet.c | 5 +- net/ipv4/af_inet.c | 5 +- net/ipv4/inet_connection_sock.c | 2 +- net/irda/af_irda.c | 5 +- net/iucv/af_iucv.c | 2 +- net/llc/af_llc.c | 4 +- net/netrom/af_netrom.c | 3 +- net/nfc/llcp_sock.c | 2 +- net/phonet/pep.c | 6 +- net/phonet/socket.c | 4 +- net/rds/tcp_listen.c | 2 +- net/rose/af_rose.c | 3 +- net/sctp/ipv6.c | 5 +- net/sctp/protocol.c | 5 +- net/sctp/socket.c | 4 +- net/smc/af_smc.c | 2 +- net/socket.c | 4 +- net/tipc/socket.c | 8 +- net/unix/af_unix.c | 5 +- net/vmw_vsock/af_vsock.c | 3 +- net/x25/af_x25.c | 3 +- 38 files changed, 142 insertions(+), 108 deletions(-) commit 9db61d6fd65f53eaee13fbb451fd761ce926dea9 Merge: 794fe78 2fcc319 Author: Linus Torvalds Date: Thu Mar 9 18:11:28 2017 -0800 Merge tag 'xfs-4.11-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are some bug fixes for -rc2 to clean up the copy on write handling and to remove a cause of hangs. - Fix various iomap bugs - Fix overly aggressive CoW preallocation garbage collection - Fixes to CoW endio error handling - Fix some incorrect geometry calculations - Remove a potential system hang in bulkstat - Try to allocate blocks more aggressively to reduce ENOSPC errors" * tag 'xfs-4.11-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: try any AG when allocating the first btree block when reflinking xfs: use iomap new flag for newly allocated delalloc blocks xfs: remove kmem_zalloc_greedy xfs: Use xfs_icluster_size_fsb() to calculate inode alignment mask xfs: fix and streamline error handling in xfs_end_io xfs: only reclaim unwritten COW extents periodically iomap: invalidate page caches should be after iomap_dio_complete() in direct write commit 794fe7891d77fb9ee095313c60805a8ed609e2a7 Merge: c1aa905 dcc2352 Author: Linus Torvalds Date: Thu Mar 9 18:05:41 2017 -0800 Merge tag 'gcc-plugins-v4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins fix from Kees Cook: "Fixes a typo in sancov plugin, exposed in earlier compiler versions" * tag 'gcc-plugins-v4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: fix sancov_plugin for gcc-5 commit 81dca07b3be974e81cff250a19282473d67a870b Merge: 6cbac98 520ad89 Author: David S. Miller Date: Thu Mar 9 17:38:32 2017 -0800 Merge branch 'bnxt_en-misc-small-fixes' Michael Chan says: ==================== bnxt_en: Misc. small fixes. Fixes include moving the initial function reset, notifying the RDMA driver during tx timeout, setting dcbx_cap properly depending on whether the firmware agent is running or not, and an autoneg related improvement. ==================== Signed-off-by: David S. Miller commit 520ad89a54edea84496695d528f73ddcf4a52ea4 Author: Michael Chan Date: Wed Mar 8 18:44:35 2017 -0500 bnxt_en: Ignore 0 value in autoneg supported speed from firmware. In some situations, the firmware will return 0 for autoneg supported speed. This may happen if the firmware detects no SFP module, for example. The driver should ignore this so that we don't end up with an invalid autoneg setting with nothing advertised. When SFP module is inserted, we'll get the updated settings from firmware at that time. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bc39f885a9c3bdbff0a96ecaf07b162a78eff6e4 Author: Michael Chan Date: Wed Mar 8 18:44:34 2017 -0500 bnxt_en: Check if firmware LLDP agent is running. Set DCB_CAP_DCBX_HOST capability flag only if the firmware LLDP agent is not running. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) commit b386cd362ffea09d05c56bfa85d104562e860647 Author: Michael Chan Date: Wed Mar 8 18:44:33 2017 -0500 bnxt_en: Call bnxt_ulp_stop() during tx timeout. If we call bnxt_reset_task() due to tx timeout, we should call bnxt_ulp_stop() to inform the RDMA driver about the error and the impending reset. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3c2217a675bac22afb149166e0de71809189850d Author: Michael Chan Date: Wed Mar 8 18:44:32 2017 -0500 bnxt_en: Perform function reset earlier during probe. The firmware call to do function reset is done too late. It is causing the rings that have been reserved to be freed. In NPAR mode, this bug is causing us to run out of rings. Fixes: 391be5c27364 ("bnxt_en: Implement new scheme to reserve tx rings.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6cbac9828627b89487144c1e4448d7e0a6ab22ca Author: LABBE Corentin Date: Wed Mar 8 16:46:57 2017 +0100 tun: remove copyright printing Printing copyright does not give any useful information on the boot process. Furthermore, the email address printed is obsolete since commit ba57b6f20429 ("MAINTAINERS: fix bouncing tun/tap entries") Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/tun.c | 1 - 1 file changed, 1 deletion(-) commit 9f138fa609c47403374a862a08a41394be53d461 Author: Alexander Potapenko Date: Wed Mar 8 18:08:16 2017 +0100 net: initialize msg.msg_flags in recvfrom KMSAN reports a use of uninitialized memory in put_cmsg() because msg.msg_flags in recvfrom haven't been initialized properly. The flag values don't affect the result on this path, but it's still a good idea to initialize them explicitly. Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/socket.c | 1 + 1 file changed, 1 insertion(+) commit 3f81e1340706e9a7f854808e2f580c3106805d0c Author: Fabio Estevam Date: Wed Feb 1 15:19:47 2017 -0200 drm: mxsfb: Implement drm_panel handling Currently when the 'power-supply' regulator is passed via device tree it does not actually work since drm_panel_prepare()/drm_panel_enable() are never called. Quoting Thierry Reding: "It should really call drm_panel_prepare() and drm_panel_enable() while switching on the display pipeline and drm_panel_disable(), followed by drm_panel_unprepare() while switching off the display pipeline." So do as suggested, so that the 'power-supply' regulator can be functional. Reported-by: Breno Lima Suggested-by: Thierry Reding Signed-off-by: Fabio Estevam Tested-by: Marek Vasut Signed-off-by: Dave Airlie drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit d42986b6c600da4215973878f1c889cdabbdd122 Author: Fabio Estevam Date: Thu Feb 2 19:26:38 2017 -0200 drm: mxsfb_crtc: Fix the framebuffer misplacement Currently the framebuffer content is displayed with incorrect offsets in both the vertical and horizontal directions. The fbdev version of the driver does not show this problem. Breno Lima dumped the eLCDIF controller registers on both the drm and fbdev drivers and noticed that the VDCTRL3 register is configured incorrectly in the drm driver. The fbdev driver calculates the vertical and horizontal wait counts of the VDCTRL3 register by doing: back porch + sync length. Looking at the horizontal and vertical timing diagram from include/drm/drm_modes.h this value corresponds to: crtc_[hv]total - crtc_[hv]sync_start So fix the VDCTRL3 register setting accordingly so that the eLCDIF controller can properly show the framebuffer content in the correct position. Reported-by: Breno Lima Signed-off-by: Fabio Estevam Tested-by: Breno Lima Tested-by: Marek Vasut Signed-off-by: Dave Airlie drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ad7a5acfb96215216f46b9848bd2d341663358f Author: Marek Vasut Date: Sat Jan 28 18:01:57 2017 +0100 drm: mxsfb: Fix crash when provided invalid DT bindings The mxsfb driver will crash if the mxsfb DT node has a subnode, but the content of the subnode is not of-graph binding with an endpoint linking to panel. The crash was triggered by providing old-style panel bindings to the mxsfb driver instead of the new of-graph ones. The problem happens in mxsfb_create_output(), which is invoked from mxsfb_load(). The mxsfb_create_output() iterates over all mxsfb DT subnode endpoints and tries to bind a panel on each endpoint. If there is any problem binding the panel, that is, mxsfb->panel == NULL, this function will return an error code, otherwise success 0 is returned. If the subnodes do not specify of-graph binding with an endpoint, the iteration over endpoints in mxsfb_create_output() will have zero cycles and the function will immediatelly return 0, but the mxsfb->panel will remain NULL. This is propagated back into the mxsfb_load(), which does not detect any problem and expects that the mxsfb->panel is valid, thus calls mxsfb_panel_attach(). But since mxsfb->panel == NULL, mxsfb_panel_attach() is called with first argument NULL and this crashes the kernel. This patch fixes the problem by explicitly checking for valid mxsfb->panel at the end of the iteration in mxsfb_create_output(). Signed-off-by: Marek Vasut Cc: Daniel Vetter Cc: Dave Airlie Cc: Stefan Agner Cc: Breno Matheus Lima Tested-by: Breno Lima Signed-off-by: Dave Airlie drivers/gpu/drm/mxsfb/mxsfb_out.c | 4 ++++ 1 file changed, 4 insertions(+) commit 53990e416bb7adaa59d045f325a47f31a11b75ee Author: Stefan Agner Date: Wed Dec 14 12:48:09 2016 -0800 drm: mxsfb: fix pixel clock polarity The DRM subsystem specifies the pixel clock polarity from a controllers perspective: DRM_BUS_FLAG_PIXDATA_NEGEDGE means the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge). Also change the data enable logic to be high active by default and only change if explicitly requested via bus_flags. With that defaults are: - Data enable: high active - Pixel clock polarity: controller drives data on negative edge Signed-off-by: Stefan Agner Acked-by: Marek Vasut Signed-off-by: Dave Airlie drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 10f2889ba35aeb251b9945ec4c461af8c124c41f Author: Stefan Agner Date: Wed Dec 14 17:28:41 2016 -0800 drm: mxsfb: use bus_format to determine LCD bus width The LCD bus width does not need to align with the pixel format. The LCDIF controller automatically converts between pixel formats and bus width by padding or dropping LSBs. The DRM subsystem has the notion of bus_format which allows to determine what bus_formats are supported by the display. Choose the first available or fallback to 24 bit if none are available. Signed-off-by: Stefan Agner Acked-by: Marek Vasut Signed-off-by: Dave Airlie drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 34 ++++++++++++++++++++++++++++++++-- drivers/gpu/drm/mxsfb/mxsfb_regs.h | 1 + 2 files changed, 33 insertions(+), 2 deletions(-) commit 9813527abc558415dbe4dc0bb5bfbd12aab2c457 Merge: 31aec64 a5b11da Author: Dave Airlie Date: Fri Mar 10 11:07:34 2017 +1000 Merge branch 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes * 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: bump driver version for some new features drm/amdgpu: validate paramaters in the gem ioctl drm/amd/amdgpu: fix console deadlock if late init failed commit 31aec642c4eef442b05a96bdd064529099e65729 Merge: aa717ae 70647f9 Author: Dave Airlie Date: Fri Mar 10 11:07:13 2017 +1000 Merge tag 'drm-intel-fixes-2017-03-09' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes flushing out gvt-g fixes * tag 'drm-intel-fixes-2017-03-09' of git://anongit.freedesktop.org/git/drm-intel: (29 commits) drm/i915/gvt: change some gvt_err to gvt_dbg_cmd drm/i915/gvt: protect RO and Rsvd bits of virtual vgpu configuration space drm/i915/gvt: handle workload lifecycle properly drm/i915/gvt: fix an error for F_RO flag drm/i915/gvt: use pfn_valid for better checking drm/i915/gvt: set SFUSE_STRAP properly for vitual monitor detection drm/i915/gvt: fix an error for one register drm/i915/gvt: add more registers into handlers list drm/i915/gvt: have more registers with F_CMD_ACCESS flags set drm/i915/gvt: add some new MMIOs to cmd_access white list drm/i915/gvt: fix pcode mailbox write emulation of BDW drm/i915/gvt: add resolution definition for vGPU type drm/i915/gvt: Add more edid definition support drm/i915/gvt: adjust to fixed vGPU types drm/i915/gvt: remove unnecessary error msg from gtt write drm/i915/gvt: refine pcode write emulation drm/i915/gvt: clear the vGPU reset logic drm/i915/gvt: decrease priority of output msg for untracked mmio drm/i915/gvt: set default value to 0 for unhandled mmio regs drm/i915/gvt: add cmd_access to GEN7_HALF_SLICE_CHICKEN1 ... commit aa717ae1b60f849a8019847d333709417d1a539e Merge: c1ae3cf 36fc579 Author: Dave Airlie Date: Fri Mar 10 11:06:46 2017 +1000 Merge tag 'drm-misc-fixes-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Just 1 8bpc quirk from Ville, cc: stable * tag 'drm-misc-fixes-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc: drm/edid: Add EDID_QUIRK_FORCE_8BPC quirk for Rotel RSX-1058 commit 2378cd6181edd94748d699448823609977283b11 Author: David Hildenbrand Date: Thu Mar 9 16:17:40 2017 -0800 userfaultfd: remove wrong comment from userfaultfd_ctx_get() It's a void function, so there is no return value; Link: http://lkml.kernel.org/r/20170309150817.7510-1-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 -- 1 file changed, 2 deletions(-) commit c0d0e351285161a515396b7b1ee53ec9ffd97e3c Author: OGAWA Hirofumi Date: Thu Mar 9 16:17:37 2017 -0800 fat: fix using uninitialized fields of fat_inode/fsinfo_inode Recently fallocate patch was merged and it uses MSDOS_I(inode)->mmu_private at fat_evict_inode(). However, fat_inode/fsinfo_inode that was introduced in past didn't initialize MSDOS_I(inode) properly. With those combinations, it became the cause of accessing random entry in FAT area. Link: http://lkml.kernel.org/r/87pohrj4i8.fsf@mail.parknet.co.jp Signed-off-by: OGAWA Hirofumi Reported-by: Moreno Bartalucci Tested-by: Moreno Bartalucci Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit ca5b58ea3db88b5e69ba2a1f6bc3cf239cdcc64f Author: Bartlomiej Zolnierkiewicz Date: Thu Mar 9 16:17:34 2017 -0800 sh: cayman: IDE support fix Remove incorrect CONFIG_IDE ifdef (CONFIG_IDE config option is for internal drivers/ide/ use) and make IDE hardware interface always initialized (not only when IDE subsystem is built-in). This patch allows Cayman board to work with modular IDE subsystem support and removes the requirement of having the whole core IDE subsystem built-in when using libata PATA support. Link: http://lkml.kernel.org/r/1990884.yFoE6lSB9G@amdc3058 Signed-off-by: Bartlomiej Zolnierkiewicz Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/boards/mach-cayman/setup.c | 2 -- 1 file changed, 2 deletions(-) commit ce5bec54bb5debbbe51b40270d8f209a23cadae4 Author: Dmitry Vyukov Date: Thu Mar 9 16:17:32 2017 -0800 kasan: fix races in quarantine_remove_cache() quarantine_remove_cache() frees all pending objects that belong to the cache, before we destroy the cache itself. However there are currently two possibilities how it can fail to do so. First, another thread can hold some of the objects from the cache in temp list in quarantine_put(). quarantine_put() has a windows of enabled interrupts, and on_each_cpu() in quarantine_remove_cache() can finish right in that window. These objects will be later freed into the destroyed cache. Then, quarantine_reduce() has the same problem. It grabs a batch of objects from the global quarantine, then unlocks quarantine_lock and then frees the batch. quarantine_remove_cache() can finish while some objects from the cache are still in the local to_free list in quarantine_reduce(). Fix the race with quarantine_put() by disabling interrupts for the whole duration of quarantine_put(). In combination with on_each_cpu() in quarantine_remove_cache() it ensures that quarantine_remove_cache() either sees the objects in the per-cpu list or in the global list. Fix the race with quarantine_reduce() by protecting quarantine_reduce() with srcu critical section and then doing synchronize_srcu() at the end of quarantine_remove_cache(). I've done some assessment of how good synchronize_srcu() works in this case. And on a 4 CPU VM I see that it blocks waiting for pending read critical sections in about 2-3% of cases. Which looks good to me. I suspect that these races are the root cause of some GPFs that I episodically hit. Previously I did not have any explanation for them. BUG: unable to handle kernel NULL pointer dereference at 00000000000000c8 IP: qlist_free_all+0x2e/0xc0 mm/kasan/quarantine.c:155 PGD 6aeea067 PUD 60ed7067 PMD 0 Oops: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 13667 Comm: syz-executor2 Not tainted 4.10.0+ #60 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88005f948040 task.stack: ffff880069818000 RIP: 0010:qlist_free_all+0x2e/0xc0 mm/kasan/quarantine.c:155 RSP: 0018:ffff88006981f298 EFLAGS: 00010246 RAX: ffffea0000ffff00 RBX: 0000000000000000 RCX: ffffea0000ffff1f RDX: 0000000000000000 RSI: ffff88003fffc3e0 RDI: 0000000000000000 RBP: ffff88006981f2c0 R08: ffff88002fed7bd8 R09: 00000001001f000d R10: 00000000001f000d R11: ffff88006981f000 R12: ffff88003fffc3e0 R13: ffff88006981f2d0 R14: ffffffff81877fae R15: 0000000080000000 FS: 00007fb911a2d700(0000) GS:ffff88003ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000c8 CR3: 0000000060ed6000 CR4: 00000000000006f0 Call Trace: quarantine_reduce+0x10e/0x120 mm/kasan/quarantine.c:239 kasan_kmalloc+0xca/0xe0 mm/kasan/kasan.c:590 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:544 slab_post_alloc_hook mm/slab.h:456 [inline] slab_alloc_node mm/slub.c:2718 [inline] kmem_cache_alloc_node+0x1d3/0x280 mm/slub.c:2754 __alloc_skb+0x10f/0x770 net/core/skbuff.c:219 alloc_skb include/linux/skbuff.h:932 [inline] _sctp_make_chunk+0x3b/0x260 net/sctp/sm_make_chunk.c:1388 sctp_make_data net/sctp/sm_make_chunk.c:1420 [inline] sctp_make_datafrag_empty+0x208/0x360 net/sctp/sm_make_chunk.c:746 sctp_datamsg_from_user+0x7e8/0x11d0 net/sctp/chunk.c:266 sctp_sendmsg+0x2611/0x3970 net/sctp/socket.c:1962 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:761 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 SYSC_sendto+0x660/0x810 net/socket.c:1685 SyS_sendto+0x40/0x50 net/socket.c:1653 I am not sure about backporting. The bug is quite hard to trigger, I've seen it few times during our massive continuous testing (however, it could be cause of some other episodic stray crashes as it leads to memory corruption...). If it is triggered, the consequences are very bad -- almost definite bad memory corruption. The fix is non trivial and has chances of introducing new bugs. I am also not sure how actively people use KASAN on older releases. [dvyukov@google.com: - sorted includes[ Link: http://lkml.kernel.org/r/20170309094028.51088-1-dvyukov@google.com Link: http://lkml.kernel.org/r/20170308151532.5070-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/quarantine.c | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit 68fd814a3391c7e017ae6ace8855788748edd981 Author: Dmitry Vyukov Date: Thu Mar 9 16:17:28 2017 -0800 kasan: resched in quarantine_remove_cache() We see reported stalls/lockups in quarantine_remove_cache() on machines with large amounts of RAM. quarantine_remove_cache() needs to scan whole quarantine in order to take out all objects belonging to the cache. Quarantine is currently 1/32-th of RAM, e.g. on a machine with 256GB of memory that will be 8GB. Moreover quarantine scanning is a walk over uncached linked list, which is slow. Add cond_resched() after scanning of each non-empty batch of objects. Batches are specifically kept of reasonable size for quarantine_put(). On a machine with 256GB of RAM we should have ~512 non-empty batches, each with 16MB of objects. Link: http://lkml.kernel.org/r/20170308154239.25440-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Greg Thelen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/quarantine.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 40e952f9d687928b32db20226f085ae660a7237c Author: Tahsin Erdogan Date: Thu Mar 9 16:17:26 2017 -0800 mm: do not call mem_cgroup_free() from within mem_cgroup_alloc() mem_cgroup_free() indirectly calls wb_domain_exit() which is not prepared to deal with a struct wb_domain object that hasn't executed wb_domain_init(). For instance, the following warning message is printed by lockdep if alloc_percpu() fails in mem_cgroup_alloc(): INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 1950 Comm: mkdir Not tainted 4.10.0+ #151 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x67/0x99 register_lock_class+0x36d/0x540 __lock_acquire+0x7f/0x1a30 lock_acquire+0xcc/0x200 del_timer_sync+0x3c/0xc0 wb_domain_exit+0x14/0x20 mem_cgroup_free+0x14/0x40 mem_cgroup_css_alloc+0x3f9/0x620 cgroup_apply_control_enable+0x190/0x390 cgroup_mkdir+0x290/0x3d0 kernfs_iop_mkdir+0x58/0x80 vfs_mkdir+0x10e/0x1a0 SyS_mkdirat+0xa8/0xd0 SyS_mkdir+0x14/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Add __mem_cgroup_free() which skips wb_domain_exit(). This is used by both mem_cgroup_free() and mem_cgroup_alloc() clean up. Fixes: 0b8f73e104285 ("mm: memcontrol: clean up alloc, online, offline, free functions") Link: http://lkml.kernel.org/r/20170306192122.24262-1-tahsin@google.com Signed-off-by: Tahsin Erdogan Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6ebb4a1b848fe75323135f93e72c78f8780fd268 Author: Kirill A. Shutemov Date: Thu Mar 9 16:17:23 2017 -0800 thp: fix another corner case of munlock() vs. THPs The following test case triggers BUG() in munlock_vma_pages_range(): int main(int argc, char *argv[]) { int fd; system("mount -t tmpfs -o huge=always none /mnt"); fd = open("/mnt/test", O_CREAT | O_RDWR); ftruncate(fd, 4UL << 20); mmap(NULL, 4UL << 20, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED | MAP_LOCKED, fd, 0); mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, fd, 0); munlockall(); return 0; } The second mmap() create PTE-mapping of the first huge page in file. It makes kernel munlock the page as we never keep PTE-mapped page mlocked. On munlockall() when we handle vma created by the first mmap(), munlock_vma_page() returns page_mask == 0, as the page is not mlocked anymore. On next iteration follow_page_mask() return tail page, but page_mask is HPAGE_NR_PAGES - 1. It makes us skip to the first tail page of the next huge page and step on VM_BUG_ON_PAGE(PageMlocked(page)). The fix is not use the page_mask from follow_page_mask() at all. It has no use for us. Link: http://lkml.kernel.org/r/20170302150252.34120-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8346242a7e32c4c93316684ad8f45473932586b9 Author: Kirill A. Shutemov Date: Thu Mar 9 16:17:20 2017 -0800 rmap: fix NULL-pointer dereference on THP munlocking The following test case triggers NULL-pointer derefernce in try_to_unmap_one(): #include #include #include #include int main(int argc, char *argv[]) { int fd; system("mount -t tmpfs -o huge=always none /mnt"); fd = open("/mnt/test", O_CREAT | O_RDWR); ftruncate(fd, 2UL << 20); mmap(NULL, 2UL << 20, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED | MAP_LOCKED, fd, 0); mmap(NULL, 2UL << 20, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, fd, 0); munlockall(); return 0; } Apparently, there's a case when we call try_to_unmap() on huge PMDs: it's TTU_MUNLOCK. Let's handle this case correctly. Fixes: c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use page_vma_mapped_walk()") Link: http://lkml.kernel.org/r/20170302151159.30592-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit c9a1b80daeb50e39f21fd7e62f7224f317ac85f0 Author: AKASHI Takahiro Date: Thu Mar 9 16:17:17 2017 -0800 mm/memblock.c: fix memblock_next_valid_pfn() Obviously, we should not access memblock.memory.regions[right] if 'right' is outside of [0..memblock.memory.cnt>. Fixes: b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") Link: http://lkml.kernel.org/r/20170303023745.9104-1-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Cc: Paul Burton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 46aa6a302b53f543f8e8b8e1714dc5e449ad36a6 Author: Andrea Arcangeli Date: Thu Mar 9 16:17:14 2017 -0800 userfaultfd: selftest: vm: allow to build in vm/ directory linux/tools/testing/selftests/vm $ make gcc -Wall -I ../../../../usr/include compaction_test.c -lrt -o /compaction_test /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file /compaction_test: Permission denied collect2: error: ld returned 1 exit status make: *** [../lib.mk:54: /compaction_test] Error 1 Since commit a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") selftests/vm build fails if run from the "selftests/vm" directory, but it works in the selftests/ directory. It's quicker to be able to do a local vm-only build after a tree wipe and this patch allows for it again. Link: http://lkml.kernel.org/r/20170302173738.18994-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 70ccb92fdd90b35bb6f9200093d4ffd6cb38156b Author: Andrea Arcangeli Date: Thu Mar 9 16:17:11 2017 -0800 userfaultfd: non-cooperative: userfaultfd_remove revalidate vma in MADV_DONTNEED userfaultfd_remove() has to be execute before zapping the pagetables or UFFDIO_COPY could keep filling pages after zap_page_range returned, which would result in non zero data after a MADV_DONTNEED. However userfaultfd_remove() may have to release the mmap_sem. This was handled correctly in MADV_REMOVE, but MADV_DONTNEED accessed a potentially stale vma (the very vma passed to zap_page_range(vma, ...)). The fix consists in revalidating the vma in case userfaultfd_remove() had to release the mmap_sem. This also optimizes away an unnecessary down_read/up_read in the MADV_REMOVE case if UFFD_EVENT_FORK had to be delivered. It all remains zero runtime cost in case CONFIG_USERFAULTFD=n as userfaultfd_remove() will be defined as "true" at build time. Link: http://lkml.kernel.org/r/20170302173738.18994-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 9 +++------ include/linux/userfaultfd_k.h | 7 +++---- mm/madvise.c | 44 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 13 deletions(-) commit 7eb76d457fd758d396bc2e65cb0ace5aae614149 Author: Mike Rapoport Date: Thu Mar 9 16:17:09 2017 -0800 userfaultfd: non-cooperative: fix fork fctx->new memleak We have a memleak in the ->new ctx if the uffd of the parent is closed before the fork event is read, nothing frees the new context. Link: http://lkml.kernel.org/r/20170302173738.18994-2-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Reported-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bfc7228b9a9647e1c353e50b40297a2929801759 Author: Laurent Dufour Date: Thu Mar 9 16:17:06 2017 -0800 mm/cgroup: avoid panic when init with low memory The system may panic when initialisation is done when almost all the memory is assigned to the huge pages using the kernel command line parameter hugepage=xxxx. Panic may occur like this: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc000000000302b88 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=2048 [ 0.082424] NUMA pSeries Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-15-generic #16-Ubuntu task: c00000021ed01600 task.stack: c00000010d108000 NIP: c000000000302b88 LR: c000000000270e04 CTR: c00000000016cfd0 REGS: c00000010d10b2c0 TRAP: 0300 Not tainted (4.9.0-15-generic) MSR: 8000000002009033 [ 0.082770] CR: 28424422 XER: 00000000 CFAR: c0000000003d28b8 DAR: 0000000000000000 DSISR: 40000000 SOFTE: 1 GPR00: c000000000270e04 c00000010d10b540 c00000000141a300 c00000010fff6300 GPR04: 0000000000000000 00000000026012c0 c00000010d10b630 0000000487ab0000 GPR08: 000000010ee90000 c000000001454fd8 0000000000000000 0000000000000000 GPR12: 0000000000004400 c00000000fb80000 00000000026012c0 00000000026012c0 GPR16: 00000000026012c0 0000000000000000 0000000000000000 0000000000000002 GPR20: 000000000000000c 0000000000000000 0000000000000000 00000000024200c0 GPR24: c0000000016eef48 0000000000000000 c00000010fff7d00 00000000026012c0 GPR28: 0000000000000000 c00000010fff7d00 c00000010fff6300 c00000010d10b6d0 NIP mem_cgroup_soft_limit_reclaim+0xf8/0x4f0 LR do_try_to_free_pages+0x1b4/0x450 Call Trace: do_try_to_free_pages+0x1b4/0x450 try_to_free_pages+0xf8/0x270 __alloc_pages_nodemask+0x7a8/0xff0 new_slab+0x104/0x8e0 ___slab_alloc+0x620/0x700 __slab_alloc+0x34/0x60 kmem_cache_alloc_node_trace+0xdc/0x310 mem_cgroup_init+0x158/0x1c8 do_one_initcall+0x68/0x1d0 kernel_init_freeable+0x278/0x360 kernel_init+0x24/0x170 ret_from_kernel_thread+0x5c/0x74 Instruction dump: eb81ffe0 eba1ffe8 ebc1fff0 ebe1fff8 4e800020 3d230001 e9499a42 3d220004 3929acd8 794a1f24 7d295214 eac90100 2fa90000 419eff74 3b200000 ---[ end trace 342f5208b00d01b6 ]--- This is a chicken and egg issue where the kernel try to get free memory when allocating per node data in mem_cgroup_init(), but in that path mem_cgroup_soft_limit_reclaim() is called which assumes that these data are allocated. As mem_cgroup_soft_limit_reclaim() is best effort, it should return when these data are not yet allocated. This patch also fixes potential null pointer access in mem_cgroup_remove_from_trees() and mem_cgroup_update_tree(). Link: http://lkml.kernel.org/r/1487856999-16581-2-git-send-email-ldufour@linux.vnet.ibm.com Signed-off-by: Laurent Dufour Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Balbir Singh Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f4b7ac68f438fa8521bbbf421f194ff10b0a7577 Author: Masanari Iida Date: Thu Mar 9 16:17:03 2017 -0800 drivers/md/bcache/util.h: remove duplicate inclusion of blkdev.h Link: http://lkml.kernel.org/r/20170226060230.11555-1-standby24x7@gmail.com Signed-off-by: Masanari Iida Acked-by: Coly Li Cc: Kent Overstreet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/md/bcache/util.h | 1 - 1 file changed, 1 deletion(-) commit ce9311cf95ad8baf044a014738d76973d93b739a Author: Yisheng Xie Date: Thu Mar 9 16:17:00 2017 -0800 mm/vmstats: add thp_split_pud event for clarity We added support for PUD-sized transparent hugepages, however we count the event "thp split pud" into thp_split_pmd event. To separate the event count of thp split pud from pmd, add a new event named thp_split_pud. Link: http://lkml.kernel.org/r/1488282380-5076-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Cc: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Joonsoo Kim Cc: Sebastian Siewior Cc: Hugh Dickins Cc: Christoph Lameter Cc: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: David Rientjes Cc: Hanjun Guo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vm_event_item.h | 3 +++ mm/huge_memory.c | 2 +- mm/vmstat.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) commit cbfd0c1001bedb4b051cf4a1f5df24f1500381bc Author: Arnd Bergmann Date: Thu Mar 9 16:16:57 2017 -0800 include/linux/fs.h: fix unsigned enum warning with gcc-4.2 With arm-linux-gcc-4.2, almost every file we build in the kernel ends up with this warning: include/linux/fs.h:2648: warning: comparison of unsigned expression < 0 is always false Later versions don't have this problem, but it's easy enough to work around. Link: http://lkml.kernel.org/r/20161216105634.235457-12-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Russell King Cc: Brendan Gregg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c9e7bb7a41f2bbd54b2caefb274fb3de239819f Author: Andrea Arcangeli Date: Thu Mar 9 16:16:54 2017 -0800 userfaultfd: non-cooperative: release all ctx in dup_userfaultfd_complete Don't stop running dup_fctx() even if userfaultfd_event_wait_completion fails as it has to run userfaultfd_ctx_put on all ctx to pair against the userfaultfd_ctx_get that was run on all fctx->orig in dup_userfaultfd. Link: http://lkml.kernel.org/r/20170224181957.19736-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 9a69a829f9b656c2a220d65a94ecf7b5887c5da1 Author: Andrea Arcangeli Date: Thu Mar 9 16:16:52 2017 -0800 userfaultfd: non-cooperative: robustness check Similar to the handle_userfault() case, also make sure to never attempt to send any event past the PF_EXITING point of no return. This is purely a robustness check. Link: http://lkml.kernel.org/r/20170224181957.19736-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dd0db88d8094a6d9d4d1fc5fcd56ab619f54ccf8 Author: Andrea Arcangeli Date: Thu Mar 9 16:16:49 2017 -0800 userfaultfd: non-cooperative: rollback userfaultfd_exit Patch series "userfaultfd non-cooperative further update for 4.11 merge window". Unfortunately I noticed one relevant bug in userfaultfd_exit while doing more testing. I've been doing testing before and this was also tested by kbuild bot and exercised by the selftest, but this bug never reproduced before. I dropped userfaultfd_exit as result. I dropped it because of implementation difficulty in receiving signals in __mmput and because I think -ENOSPC as result from the background UFFDIO_COPY should be enough already. Before I decided to remove userfaultfd_exit, I noticed userfaultfd_exit wasn't exercised by the selftest and when I tried to exercise it, after moving it to a more correct place in __mmput where it would make more sense and where the vma list is stable, it resulted in the event_wait_completion in D state. So then I added the second patch to be sure even if we call userfaultfd_event_wait_completion too late during task exit(), we won't risk to generate tasks in D state. The same check exists in handle_userfault() for the same reason, except it makes a difference there, while here is just a robustness check and it's run under WARN_ON_ONCE. While looking at the userfaultfd_event_wait_completion() function I looked back at its callers too while at it and I think it's not ok to stop executing dup_fctx on the fcs list because we relay on userfaultfd_event_wait_completion to execute userfaultfd_ctx_put(fctx->orig) which is paired against userfaultfd_ctx_get(fctx->orig) in dup_userfault just before list_add(fcs). This change only takes care of fctx->orig but this area also needs further review looking for similar problems in fctx->new. The only patch that is urgent is the first because it's an use after free during a SMP race condition that affects all processes if CONFIG_USERFAULTFD=y. Very hard to reproduce though and probably impossible without SLUB poisoning enabled. This patch (of 3): I once reproduced this oops with the userfaultfd selftest, it's not easily reproducible and it requires SLUB poisoning to reproduce. general protection fault: 0000 [#1] SMP Modules linked in: CPU: 2 PID: 18421 Comm: userfaultfd Tainted: G ------------ T 3.10.0+ #15 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014 task: ffff8801f83b9440 ti: ffff8801f833c000 task.ti: ffff8801f833c000 RIP: 0010:[] [] userfaultfd_exit+0x29/0xa0 RSP: 0018:ffff8801f833fe80 EFLAGS: 00010202 RAX: ffff8801f833ffd8 RBX: 6b6b6b6b6b6b6b6b RCX: ffff8801f83b9440 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800baf18600 RBP: ffff8801f833fee8 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: ffffffff8127ceb3 R12: 0000000000000000 R13: ffff8800baf186b0 R14: ffff8801f83b99f8 R15: 00007faed746c700 FS: 0000000000000000(0000) GS:ffff88023fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007faf0966f028 CR3: 0000000001bc6000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: do_exit+0x297/0xd10 SyS_exit+0x17/0x20 tracesys+0xdd/0xe2 Code: 00 00 66 66 66 66 90 55 48 89 e5 41 54 53 48 83 ec 58 48 8b 1f 48 85 db 75 11 eb 73 66 0f 1f 44 00 00 48 8b 5b 10 48 85 db 74 64 <4c> 8b a3 b8 00 00 00 4d 85 e4 74 eb 41 f6 84 24 2c 01 00 00 80 RIP [] userfaultfd_exit+0x29/0xa0 RSP ---[ end trace 9fecd6dcb442846a ]--- In the debugger I located the "mm" pointer in the stack and walking mm->mmap->vm_next through the end shows the vma->vm_next list is fully consistent and it is null terminated list as expected. So this has to be an SMP race condition where userfaultfd_exit was running while the vma list was being modified by another CPU. When userfaultfd_exit() run one of the ->vm_next pointers pointed to SLAB_POISON (RBX is the vma pointer and is 0x6b6b..). The reason is that it's not running in __mmput but while there are still other threads running and it's not holding the mmap_sem (it can't as it has to wait the even to be received by the manager). So this is an use after free that was happening for all processes. One more implementation problem aside from the race condition: userfaultfd_exit has really to check a flag in mm->flags before walking the vma or it's going to slowdown the exit() path for regular tasks. One more implementation problem: at that point signals can't be delivered so it would also create a task in D state if the manager doesn't read the event. The major design issue: it overall looks superfluous as the manager can check for -ENOSPC in the background transfer: if (mmget_not_zero(ctx->mm)) { [..] } else { return -ENOSPC; } It's safer to roll it back and re-introduce it later if at all. [rppt@linux.vnet.ibm.com: documentation fixup after removal of UFFD_EVENT_EXIT] Link: http://lkml.kernel.org/r/1488345437-4364-1-git-send-email-rppt@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/20170224181957.19736-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Signed-off-by: Mike Rapoport Acked-by: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/userfaultfd.txt | 4 ---- fs/userfaultfd.c | 28 ---------------------------- include/linux/userfaultfd_k.h | 6 ------ include/uapi/linux/userfaultfd.h | 5 +---- kernel/exit.c | 1 - 5 files changed, 1 insertion(+), 43 deletions(-) commit b2e593e271b0760ebc8999e5f9dd068ae2b9d30a Author: Dan Williams Date: Thu Mar 9 16:16:45 2017 -0800 x86, mm: unify exit paths in gup_pte_range() All exit paths from gup_pte_range() require pte_unmap() of the original pte page before returning. Refactor the code to have a single exit point to do the unmap. This mirrors the flow of the generic gup_pte_range() in mm/gup.c. Link: http://lkml.kernel.org/r/148804251828.36605.14910389618497006945.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Dave Hansen Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/gup.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit ef947b2529f918d9606533eb9c32b187ed6a5ede Author: Dan Williams Date: Thu Mar 9 16:16:42 2017 -0800 x86, mm: fix gup_pte_range() vs DAX mappings gup_pte_range() fails to check pte_allows_gup() before translating a DAX pte entry, pte_devmap(), to a page. This allows writes to read-only mappings, and bypasses the DAX cacheline dirty tracking due to missed 'mkwrite' faults. The gup_huge_pmd() path and the gup_huge_pud() path correctly check pte_allows_gup() before checking for _devmap() entries. Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Link: http://lkml.kernel.org/r/148804251312.36605.12665024794196605053.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams Reported-by: Dave Hansen Reported-by: Ross Zwisler Cc: Xiong Zhou Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/gup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d19469e8415813cceaa494b6f538e327b9a95f3b Author: Aneesh Kumar K.V Date: Thu Mar 9 16:16:39 2017 -0800 power/mm: update pte_write and pte_wrprotect to handle savedwrite We use pte_write() to check whethwer the pte entry is writable. This is mostly used to later mark the pte read only if it is writable. The other use of pte_write() is to check whether the pte_entry is writable so that hardware page table entry can be marked accordingly. This is used in kvm where we look at qemu page table entry and update hardware hash page table for the guest with correct write enable bit. With the above, for the first usage we should also check the savedwrite bit so that we can correctly clear the savedwite bit. For the later, we add a new variant __pte_write(). With this we can revert write_protect_page part of 595cd8f256d2 ("mm/ksm: handle protnone saved writes when making page write protect"). But I left it as it is as an example code for savedwrite check. Fixes: c137a2757b886 ("powerpc/mm/autonuma: switch ppc64 to its own implementation of saved write") Link: http://lkml.kernel.org/r/1488203787-17849-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Rik van Riel Cc: Mel Gorman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/pgtable.h | 24 +++++++++++++++++++----- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) commit 52c50ca75c534c0772b71900a29b3a71439b32ef Author: Aneesh Kumar K.V Date: Thu Mar 9 16:16:36 2017 -0800 powerpc/mm: handle protnone ptes on fork We need to mark pages of parent process read only on fork. Numa fault pte needs a protnone ptes variant with saved write flag set. On fork we need to make sure we remove the saved write bit. Instead of adding the protnone check in the caller update ptep_set_wrprotect variants to clear savedwrite bit. Without this we see random segfaults in application on fork. Fixes: c137a2757b886 ("powerpc/mm/autonuma: switch ppc64 to its own implementation of saved write") Link: http://lkml.kernel.org/r/1488203787-17849-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Rik van Riel Cc: Mel Gorman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/pgtable.h | 73 ++++++++++++++++------------ 1 file changed, 42 insertions(+), 31 deletions(-) commit 505d3085d7120a9f4cd0d6ffaa876968854b3baa Author: Masahiro Yamada Date: Thu Mar 9 16:16:33 2017 -0800 scripts/spelling.txt: add "overide" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: overide||override While we are here, fix the doubled "address" in the touched line Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt. Also, fix the comment block style in the touched hunks in drivers/media/dvb-frontends/drx39xyj/drx_driver.h. Link: http://lkml.kernel.org/r/1481573103-11329-21-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt | 2 +- drivers/block/paride/pcd.c | 2 +- drivers/block/paride/pd.c | 2 +- drivers/block/paride/pf.c | 2 +- drivers/block/paride/pg.c | 2 +- drivers/block/paride/pt.c | 2 +- drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 8 +++----- drivers/net/ethernet/qlogic/qlge/qlge.h | 2 +- include/dt-bindings/sound/cs42l42.h | 2 +- include/net/irda/timer.h | 2 +- kernel/trace/trace_stack.c | 2 +- scripts/spelling.txt | 1 + tools/lguest/lguest.c | 2 +- tools/lib/bpf/Makefile | 2 +- tools/lib/traceevent/Makefile | 2 +- tools/lib/traceevent/event-parse.h | 2 +- 16 files changed, 18 insertions(+), 19 deletions(-) commit 8a1115ff6b6d90cf1066ec3a0c4e51276553eebe Author: Masahiro Yamada Date: Thu Mar 9 16:16:31 2017 -0800 scripts/spelling.txt: add "disble(d)" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: disble||disable disbled||disabled I kept the TSL2563_INT_DISBLED in /drivers/iio/light/tsl2563.c untouched. The macro is not referenced at all, but this commit is touching only comment blocks just in case. Link: http://lkml.kernel.org/r/1481573103-11329-20-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/dev-tools/kcov.rst | 2 +- arch/cris/arch-v32/drivers/cryptocop.c | 2 +- arch/x86/kernel/ftrace.c | 2 +- drivers/crypto/ux500/cryp/cryp.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/hv/channel.c | 2 +- drivers/isdn/hisax/st5481_b.c | 2 +- drivers/mtd/spi-nor/spi-nor.c | 2 +- drivers/net/ethernet/qlogic/qlge/qlge.h | 2 +- drivers/scsi/aic7xxx/aic79xx_core.c | 2 +- drivers/usb/gadget/legacy/inode.c | 3 +-- drivers/usb/host/xhci.c | 4 ++-- include/linux/regulator/machine.h | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/events/core.c | 2 +- scripts/spelling.txt | 2 ++ sound/soc/amd/acp-pcm-dma.c | 2 +- 17 files changed, 19 insertions(+), 18 deletions(-) commit 6bbc4a4144b1a69743022ac68dfaf6e7d993abb9 Author: Andrea Arcangeli Date: Thu Mar 9 16:16:28 2017 -0800 userfaultfd: shmem: __do_fault requires VM_FAULT_NOPAGE __do_fault assumes vmf->page has been initialized and is valid if VM_FAULT_NOPAGE is not returned by vma->vm_ops->fault(vma, vmf). handle_userfault() in turn should return VM_FAULT_NOPAGE if it doesn't return VM_FAULT_SIGBUS or VM_FAULT_RETRY (the other two possibilities). This VM_FAULT_NOPAGE case is only invoked when signal are pending and it didn't matter for anonymous memory before. It only started to matter since shmem was introduced. hugetlbfs also takes a different path and doesn't exercise __do_fault. Link: http://lkml.kernel.org/r/20170228154201.GH5816@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Dmitry Vyukov Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1aa905a304e4b5e6a3fe112ec62d9c1c7b0c155 Merge: 144c766 32d3b06 Author: Linus Torvalds Date: Thu Mar 9 16:30:37 2017 -0800 Merge tag 'pm-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix several issues in the intel_pstate driver and one issue in the schedutil cpufreq governor, clean up that governor a bit and hook up existing code for disabling cpufreq to a new kernel command line option. Specifics: - Three fixes for intel_pstate problems related to the passive mode (in which it acts as a regular cpufreq scaling driver), two for the handling of global P-state limits and one for the handling of the cpu_frequency tracepoint in that mode (Rafael Wysocki). - Three fixes for the handling of P-state limits in intel_pstate in the active mode (Rafael Wysocki). - Introduction of a new cpufreq.off=1 kernel command line argument that will disable cpufreq entirely if passed to the kernel and is simply hooked up to the existing code used by Xen (Len Brown). - Fix for the schedutil cpufreq governor to prevent it from using stale raw frequency values in configurations with mutiple CPUs sharing one policy object and a cleanup for it reducing its overhead slightly (Viresh Kumar)" * tag 'pm-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Do not reinit performance limits in ->setpolicy cpufreq: intel_pstate: Fix intel_pstate_verify_policy() cpufreq: intel_pstate: Fix global settings in active mode cpufreq: Add the "cpufreq.off=1" cmdline option cpufreq: schedutil: Pass sg_policy to get_next_freq() cpufreq: schedutil: move cached_raw_freq to struct sugov_policy cpufreq: intel_pstate: Avoid triggering cpu_frequency tracepoint unnecessarily cpufreq: intel_pstate: Fix intel_cpufreq_verify_policy() cpufreq: intel_pstate: Do not use performance_limits in passive mode commit 144c7666b535aa5d402bf37db84df90aebf1f563 Merge: 34bbce9 3bd7db6 Author: Linus Torvalds Date: Thu Mar 9 16:02:04 2017 -0800 Merge tag 'pci-v4.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "PCI fixes: - fix NULL pointer dereference in Exynos driver - fix NULL pointer dereference in ASPM with pre-1.1 PCIe devices - blacklist QLogic ISP2722 to prevent panics while reading VPD" * tag 'pci-v4.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove PCI: Prevent VPD access for QLogic ISP2722 PCI: exynos: Initialize elbi_base even when using PHY framework commit 34bbce9e344b47e8871273409632f525973afad4 Merge: bb61ce5 672a2c8 Author: Linus Torvalds Date: Thu Mar 9 15:53:25 2017 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Sending this a bit sooner than I otherwise would have, as a fix in the merge window had some unfortunate issues and side effects for some folks. This contains: - Fixes from Jan for the bdi registration/unregistration. These have been tested by the various parties reporting issues, and should be solid at this point. - Also from Jan, fix for axonram gendisk registration. - A stable fix for zram from Johannes. - A small series from Ming, fixing up some long standing issues with blk-mq hardware queue kobject initialization and registration. - A fix for sed opal from Jon, fixing a nonsensical range check and some set-but-not-used variables. - A fix from Neil for a long standing deadlock issue for stacking device drivers. With this in place, dm/md don't have to work around the issue anymore, and can be properly fixed up" * 'for-linus' of git://git.kernel.dk/linux-block: axonram: Fix gendisk handling blk: improve order of bio handling in generic_make_request() Revert "scsi, block: fix duplicate bdi name registration crashes" block: Make del_gendisk() safer for disks without queues bdi: Fix use-after-free in wb_congested_put() block: Allow bdi re-registration block/sed: Fix opal user range check and unused variables zram: set physical queue limits to avoid array out of bounds accesses blk-mq: free hctx->cpumask in release handler of hctx's kobject blk-mq: make lifetime consistent between hctx and its kobject blk-mq: make lifetime consitent between q/ctx and its kobject blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue() commit bb61ce54e8986ea18f7eb13cfa4a6fa8eb311bbd Merge: cb2113c 8c71fff Author: Linus Torvalds Date: Thu Mar 9 15:50:56 2017 -0800 Merge tag 'media/v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Media regression fixes: - serial_ir: fix a Kernel crash during boot on Kernel 4.11-rc1, due to an IRQ code called too early - other IR regression fixes at lirc and at the raw IR decoding - a deadlock fix at the RC nuvoton driver - fix another issue with DMA on stack at dw2102 driver There's an extra patch there that change a driver interface for the SoC VSP1 driver, with is shared between the DRM and V4L2 driver. The patch itself is trivial, and was acked by David Arlie" * tag 'media/v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] v4l: vsp1: Adapt vsp1_du_setup_lif() interface to use a structure [media] dw2102: don't do DMA on stack [media] rc: protocol is not set on register for raw IR devices [media] rc: raw decoder for keymap protocol is not loaded on register [media] rc: nuvoton: fix deadlock in nvt_write_wakeup_codes [media] lirc: fix dead lock between open and wakeup_filter [media] serial_ir: ensure we're ready to receive interrupts commit 8bd49ac86677ca43d64f08c45864e438283d6a76 Author: Heiko Carstens Date: Mon Mar 6 09:57:17 2017 +0100 s390: wire up statx system call Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/unistd.h | 4 +++- arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/syscalls.S | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) commit a5b11dac1f57c4b327c2d6eccb8fdd01499f9e17 Author: Alex Deucher Date: Wed Mar 8 17:23:21 2017 -0500 drm/amdgpu: bump driver version for some new features We added new gem ioctl flags and the new fences ioctl, but forgot to bump the version. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 834e0f8ae4e104fa026ffe5cdee58491f3078403 Author: Alex Deucher Date: Wed Mar 8 17:40:17 2017 -0500 drm/amdgpu: validate paramaters in the gem ioctl Reject it if there are any invalid flags or domains. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 8ddbb3124da9b1ea73567374ff01de5f62a6637b Merge: 745cb7f 4fe8435 Author: David S. Miller Date: Thu Mar 9 13:27:18 2017 -0800 Merge branch 'bpf-htab-fixes' Alexei Starovoitov says: ==================== bpf: htab fixes Two bpf hashtable fixes. See individual patches for details. ==================== Signed-off-by: David S. Miller commit 4fe8435909fddc97b81472026aa954e06dd192a5 Author: Alexei Starovoitov Date: Tue Mar 7 20:00:13 2017 -0800 bpf: convert htab map to hlist_nulls when all map elements are pre-allocated one cpu can delete and reuse htab_elem while another cpu is still walking the hlist. In such case the lookup may miss the element. Convert hlist to hlist_nulls to avoid such scenario. When bucket lock is taken there is no need to take such precautions, so only convert map_lookup and map_get_next to nulls. The race window is extremely small and only reproducible with explicit udelay() inside lookup_nulls_elem_raw() Similar to hlist add hlist_nulls_for_each_entry_safe() and hlist_nulls_entry_safe() helpers. Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements") Reported-by: Jonathan Perry Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/list_nulls.h | 5 +++ include/linux/rculist_nulls.h | 14 +++++++ kernel/bpf/hashtab.c | 94 +++++++++++++++++++++++++++---------------- 3 files changed, 79 insertions(+), 34 deletions(-) commit 9f691549f76d488a0c74397b3e51e943865ea01f Author: Alexei Starovoitov Date: Tue Mar 7 20:00:12 2017 -0800 bpf: fix struct htab_elem layout when htab_elem is removed from the bucket list the htab_elem.hash_node.next field should not be overridden too early otherwise we have a tiny race window between lookup and delete. The bug was discovered by manual code analysis and reproducible only with explicit udelay() in lookup_elem_raw(). Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements") Reported-by: Jonathan Perry Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 745cb7f8a5de0805cade3de3991b7a95317c7c73 Author: Dmitry V. Levin Date: Tue Mar 7 23:50:50 2017 +0300 uapi: fix linux/packet_diag.h userspace compilation error Replace MAX_ADDR_LEN with its numeric value to fix the following linux/packet_diag.h userspace compilation error: /usr/include/linux/packet_diag.h:67:17: error: 'MAX_ADDR_LEN' undeclared here (not in a function) __u8 pdmc_addr[MAX_ADDR_LEN]; This is not the first case in the UAPI where the numeric value of MAX_ADDR_LEN is used instead of symbolic one, uapi/linux/if_link.h already does the same: $ grep MAX_ADDR_LEN include/uapi/linux/if_link.h __u8 mac[32]; /* MAX_ADDR_LEN */ There are no UAPI headers besides these two that use MAX_ADDR_LEN. Signed-off-by: Dmitry V. Levin Acked-by: Pavel Emelyanov Signed-off-by: David S. Miller include/uapi/linux/packet_diag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 294acf1c01bace5cea5d30b510504238bf5f7c25 Author: Paolo Abeni Date: Tue Mar 7 18:33:31 2017 +0100 net/tunnel: set inner protocol in network gro hooks The gso code of several tunnels type (gre and udp tunnels) takes for granted that the skb->inner_protocol is properly initialized and drops the packet elsewhere. On the forwarding path no one is initializing such field, so gro encapsulated packets are dropped on forward. Since commit 38720352412a ("gre: Use inner_proto to obtain inner header protocol"), this can be reproduced when the encapsulated packets use gre as the tunneling protocol. The issue happens also with vxlan and geneve tunnels since commit 8bce6d7d0d1e ("udp: Generalize skb_udp_segment"), if the forwarding host's ingress nic has h/w offload for such tunnel and a vxlan/geneve device is configured on top of it, regardless of the configured peer address and vni. To address the issue, this change initialize the inner_protocol field for encapsulated packets in both ipv4 and ipv6 gro complete callbacks. Fixes: 38720352412a ("gre: Use inner_proto to obtain inner header protocol") Fixes: 8bce6d7d0d1e ("udp: Generalize skb_udp_segment") Signed-off-by: Paolo Abeni Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/af_inet.c | 4 +++- net/ipv6/ip6_offload.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 8aad6f14c09d78862fc04e47214d398add9bb8ce Author: robert.foss@collabora.com Date: Tue Mar 7 11:46:25 2017 -0500 qed: Fix copy of uninitialized memory In qed_ll2_start_ooo() the ll2_info variable is uninitialized and then passed to qed_ll2_acquire_connection() where it is copied into a new memory space. This shouldn't cause any issue as long as non of the copied memory is every read. But the potential for a bug being introduced by reading this memory is real. Detected by CoverityScan, CID#1399632 ("Uninitialized scalar variable") Signed-off-by: Robert Foss Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c021aaca5feb39f5853d10fdedb17043848b48b9 Merge: 3b12f73 36fa35d Author: David S. Miller Date: Thu Mar 9 13:12:42 2017 -0800 Merge branch 'thunderx-misc-fixes' Sunil Goutham says: ==================== net: thunderx: Miscellaneous fixes This patch set fixes multiple issues such as IOMMU translation faults when kernel is booted with IOMMU enabled on host, incorrect MAC ID reading from ACPI tables and IPv6 UDP packet drop due to failure of checksum validation. Changes from v1: - As suggested by David Miller, got rid of conditional calling of DMA map/unmap APIs. Also updated commit message in 'IOMMU translation faults' patch. ==================== Signed-off-by: David S. Miller commit 36fa35d22bffc78c85b5e68adbdd99e914bec764 Author: Thanneeru Srinivasulu Date: Tue Mar 7 18:09:11 2017 +0530 net: thunderx: Allow IPv6 frames with zero UDP checksum Do not consider IPv6 frames with zero UDP checksum as frames with bad checksum and drop them. Signed-off-by: Thanneeru Srinivasulu Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 78aacb6f6eeea3c581a29b4a50438d0bdf85ad0b Author: Sunil Goutham Date: Tue Mar 7 18:09:10 2017 +0530 net: thunderx: Fix invalid mac addresses for node1 interfaces When booted with ACPI, random mac addresses are being assigned to node1 interfaces due to mismatch of bgx_id in BGX driver and ACPI tables. This patch fixes this issue by setting maximum BGX devices per node based on platform/soc instead of a macro. This change will set the bgx_id appropriately. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 58 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 1 - 2 files changed, 45 insertions(+), 14 deletions(-) commit 18de7ba95f6e5ab150e482618123d92ee2240dc0 Author: Sunil Goutham Date: Tue Mar 7 18:09:09 2017 +0530 net: thunderx: Fix LMAC mode debug prints for QSGMII mode When BGX/LMACs are in QSGMII mode, for some LMACs, mode info is not being printed. This patch will fix that. With changes already done to not do any sort of serdes 2 lane mapping config calculation in kernel driver, we can get rid of this logic. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 6 ------ 1 file changed, 6 deletions(-) commit 83abb7d7c91f4ac20e47c3089a10bb93b2ea8994 Author: Sunil Goutham Date: Tue Mar 7 18:09:08 2017 +0530 net: thunderx: Fix IOMMU translation faults ACPI support has been added to ARM IOMMU driver in 4.10 kernel and that has resulted in VNIC interfaces throwing translation faults when kernel is booted with ACPI as driver was not using DMA API. This patch fixes the issue by using DMA API which inturn will create translation tables when IOMMU is enabled. Also VNIC doesn't have a seperate receive buffer ring per receive queue, so there is no 1:1 descriptor index matching between CQE_RX and the index in buffer ring from where a buffer has been used for DMA'ing. Unlike other NICs, here it's not possible to maintain dma address to virt address mappings within the driver. This leaves us no other choice but to use IOMMU's IOVA address conversion API to get buffer's virtual address which can be given to network stack for processing. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_main.c | 12 +- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 178 ++++++++++++++++----- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 4 +- 4 files changed, 156 insertions(+), 39 deletions(-) commit 3b12f73a5c2977153f28a224392fd4729b50d1dc Author: Zhu Yanjun Date: Tue Mar 7 02:48:36 2017 -0500 rds: ib: add error handle In the function rds_ib_setup_qp, the error handle is missing. When some error occurs, it is possible that memory leak occurs. As such, error handle is added. Cc: Joe Jin Reviewed-by: Junxiao Bi Reviewed-by: Guanglei Li Signed-off-by: Zhu Yanjun Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_cm.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) commit 67e303e0c7683957eb4e530453705a43a6d4f966 Author: VSR Burru Date: Mon Mar 6 18:45:59 2017 -0800 liquidio: improve UDP TX performance Improve UDP TX performance by: * reducing the ring size from 2K to 512 * replacing the numerous streaming DMA allocations for info buffers and gather lists with one large consistent DMA allocation per ring BQL is not effective here. We reduced the ring size because there is heavy overhead with dma_map_single every so often. With iommu=on, dma_map_single in PF Tx data path was taking longer time (~700usec) for every ~250 packets. Debugged intel_iommu code, and found that PF driver is utilizing too many static IO virtual address mapping entries (for gather list entries and info buffers): about 100K entries for two PF's each using 8 rings. Also, finding an empty entry (in rbtree of device domain's iova mapping in kernel) during Tx path becomes a bottleneck every so often; the loop to find the empty entry goes through over 40K iterations; this is too costly and was the major overhead. Overhead is low when this loop quits quickly. Netperf benchmark numbers before and after patch: PF UDP TX +--------+--------+------------+------------+---------+ | | | Before | After | | | Number | | Patch | Patch | | | of | Packet | Throughput | Throughput | Percent | | Flows | Size | (Gbps) | (Gbps) | Change | +--------+--------+------------+------------+---------+ | | 360 | 0.52 | 0.93 | +78.9 | | 1 | 1024 | 1.62 | 2.84 | +75.3 | | | 1518 | 2.44 | 4.21 | +72.5 | +--------+--------+------------+------------+---------+ | | 360 | 0.45 | 1.59 | +253.3 | | 4 | 1024 | 1.34 | 5.48 | +308.9 | | | 1518 | 2.27 | 8.31 | +266.1 | +--------+--------+------------+------------+---------+ | | 360 | 0.40 | 1.61 | +302.5 | | 8 | 1024 | 1.64 | 4.24 | +158.5 | | | 1518 | 2.87 | 6.52 | +127.2 | +--------+--------+------------+------------+---------+ VF UDP TX +--------+--------+------------+------------+---------+ | | | Before | After | | | Number | | Patch | Patch | | | of | Packet | Throughput | Throughput | Percent | | Flows | Size | (Gbps) | (Gbps) | Change | +--------+--------+------------+------------+---------+ | | 360 | 1.28 | 1.49 | +16.4 | | 1 | 1024 | 4.44 | 4.39 | -1.1 | | | 1518 | 6.08 | 6.51 | +7.1 | +--------+--------+------------+------------+---------+ | | 360 | 2.35 | 2.35 | 0.0 | | 4 | 1024 | 6.41 | 8.07 | +25.9 | | | 1518 | 9.56 | 9.54 | -0.2 | +--------+--------+------------+------------+---------+ | | 360 | 3.41 | 3.65 | +7.0 | | 8 | 1024 | 9.35 | 9.34 | -0.1 | | | 1518 | 9.56 | 9.57 | +0.1 | +--------+--------+------------+------------+---------+ Signed-off-by: VSR Burru Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 110 ++++++++++----------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 104 ++++++++++--------- .../net/ethernet/cavium/liquidio/octeon_config.h | 6 +- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 17 +--- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 4 +- drivers/net/ethernet/cavium/liquidio/octeon_main.h | 42 -------- .../net/ethernet/cavium/liquidio/octeon_network.h | 43 +++++--- 7 files changed, 144 insertions(+), 182 deletions(-) commit 5be083cedc087b2d457ef2e9c2d5698c94d3d5e4 Author: David Ahern Date: Mon Mar 6 15:57:31 2017 -0800 net: ipv6: Remove redundant RTA_OIF in multipath routes Dinesh reported that RTA_MULTIPATH nexthops are 8-bytes larger with IPv6 than IPv4. The recent refactoring for multipath support in netlink messages does discriminate between non-multipath which needs the OIF and multipath which adds a rtnexthop struct for each hop making the RTA_OIF attribute redundant. Resolve by adding a flag to the info function to skip the oif for multipath. Fixes: beb1afac518d ("net: ipv6: Add support to dump multipath routes via RTA_MULTIPATH attribute") Reported-by: Dinesh Dutt Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit cb2113cb983f0aadfb63668fe97f9780478313d7 Merge: ea6200e d825adb Author: Linus Torvalds Date: Thu Mar 9 12:23:30 2017 -0800 Merge tag 'for-linus-4.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix and cleanup from Juergen Gross: "This contains one fix for MSIX handling under Xen and a trivial cleanup patch" * tag 'for-linus-4.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xenbus: Remove duplicate inclusion of linux/init.h xen: do not re-use pirq number cached in pci device msi msg data commit 5427290d64c752b97d6a2af7506771c7d10eb750 Author: Kinglong Mee Date: Tue Mar 7 17:22:43 2017 +0800 SUNRPC/backchanel: set XPT_CONG_CTRL flag for bc xprt The xprt for backchannel is created separately, not in TCP/UDP code. It needs the XPT_CONG_CTRL flag set on it too--otherwise requests on the NFSv4.1 backchannel are rjected in svc_process_common(): 1191 if (versp->vs_need_cong_ctrl && 1192 !test_bit(XPT_CONG_CTRL, &rqstp->rq_xprt->xpt_flags)) 1193 goto err_bad_vers; Fixes: 5283b03ee5 ("nfs/nfsd/sunrpc: enforce transport...") Signed-off-by: Kinglong Mee Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/svcsock.c | 1 + 1 file changed, 1 insertion(+) commit 90eceff1a375f6ffa78caf8654e787c0a8a591ef Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:08 2017 +0300 mm: introduce __p4d_alloc() For full 5-level paging we need a helper to allocate p4d page table. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds mm/memory.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit c2febafc67734a62196c1b9dfba926412d4077ba Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:07 2017 +0300 mm: convert generic code to 5-level paging Convert all non-architecture-specific code to 5-level paging. It's mostly mechanical adding handling one more page table level in places where we deal with pud_t. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds drivers/misc/sgi-gru/grufault.c | 9 +- fs/userfaultfd.c | 6 +- include/asm-generic/pgtable.h | 48 +++++++++- include/linux/hugetlb.h | 5 +- include/linux/kasan.h | 1 + include/linux/mm.h | 31 ++++-- lib/ioremap.c | 39 +++++++- mm/gup.c | 46 +++++++-- mm/huge_memory.c | 7 +- mm/hugetlb.c | 29 +++--- mm/kasan/kasan_init.c | 44 ++++++++- mm/memory.c | 207 +++++++++++++++++++++++++++++++++------- mm/mlock.c | 1 + mm/mprotect.c | 26 ++++- mm/mremap.c | 13 ++- mm/page_vma_mapped.c | 6 +- mm/pagewalk.c | 32 ++++++- mm/pgtable-generic.c | 6 ++ mm/rmap.c | 7 +- mm/sparse-vmemmap.c | 22 ++++- mm/swapfile.c | 26 ++++- mm/userfaultfd.c | 23 +++-- mm/vmalloc.c | 81 ++++++++++++---- 23 files changed, 595 insertions(+), 120 deletions(-) commit 048456dcf2c56ad6f6248e2899dda92fb6a613f6 Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:06 2017 +0300 asm-generic: introduce Like with pgtable-nopud.h for 4-level paging, this new header is base for converting an architectures to properly folded p4d_t level. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/asm-generic/pgtable-nop4d.h | 56 +++++++++++++++++++++++++++++++++++++ include/asm-generic/pgtable-nopud.h | 43 ++++++++++++++-------------- include/asm-generic/tlb.h | 14 ++++++++-- 3 files changed, 89 insertions(+), 24 deletions(-) commit 9849a5697d3defb2087cb6b9be5573a142697889 Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:05 2017 +0300 arch, mm: convert all architectures to use 5level-fixup.h If an architecture uses 4level-fixup.h we don't need to do anything as it includes 5level-fixup.h. If an architecture uses pgtable-nop*d.h, define __ARCH_USE_5LEVEL_HACK before inclusion of the header. It makes asm-generic code to use 5level-fixup.h. If an architecture has 4-level paging or folds levels on its own, include 5level-fixup.h directly. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds arch/arc/include/asm/hugepage.h | 1 + arch/arc/include/asm/pgtable.h | 1 + arch/arm/include/asm/pgtable.h | 1 + arch/arm64/include/asm/pgtable-types.h | 4 ++++ arch/avr32/include/asm/pgtable-2level.h | 1 + arch/cris/include/asm/pgtable.h | 1 + arch/frv/include/asm/pgtable.h | 1 + arch/h8300/include/asm/pgtable.h | 1 + arch/hexagon/include/asm/pgtable.h | 1 + arch/ia64/include/asm/pgtable.h | 2 ++ arch/metag/include/asm/pgtable.h | 1 + arch/microblaze/include/asm/page.h | 3 ++- arch/mips/include/asm/pgtable-32.h | 1 + arch/mips/include/asm/pgtable-64.h | 1 + arch/mn10300/include/asm/page.h | 1 + arch/nios2/include/asm/pgtable.h | 1 + arch/openrisc/include/asm/pgtable.h | 1 + arch/powerpc/include/asm/book3s/32/pgtable.h | 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 3 +++ arch/powerpc/include/asm/nohash/32/pgtable.h | 1 + arch/powerpc/include/asm/nohash/64/pgtable-4k.h | 3 +++ arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 1 + arch/s390/include/asm/pgtable.h | 1 + arch/score/include/asm/pgtable.h | 1 + arch/sh/include/asm/pgtable-2level.h | 1 + arch/sh/include/asm/pgtable-3level.h | 1 + arch/sparc/include/asm/pgtable_64.h | 1 + arch/tile/include/asm/pgtable_32.h | 1 + arch/tile/include/asm/pgtable_64.h | 1 + arch/um/include/asm/pgtable-2level.h | 1 + arch/um/include/asm/pgtable-3level.h | 1 + arch/unicore32/include/asm/pgtable.h | 1 + arch/x86/include/asm/pgtable_types.h | 4 ++++ arch/xtensa/include/asm/pgtable.h | 1 + 34 files changed, 46 insertions(+), 1 deletion(-) commit 30ec842660bd0d056d4a7028ac5bd4a82b113d4f Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:04 2017 +0300 asm-generic: introduce __ARCH_USE_5LEVEL_HACK We are going to introduce to provide abstraction for properly (in opposite to 5level-fixup.h hack) folded p4d level. The new header will be included from pgtable-nopud.h. If an architecture uses , we cannot use 5level-fixup.h directly to quickly convert the architecture to 5-level paging as it would conflict with pgtable-nop4d.h. With this patch an architecture can define __ARCH_USE_5LEVEL_HACK before inclusion to use 5level-fixup.h. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/asm-generic/pgtable-nop4d-hack.h | 62 ++++++++++++++++++++++++++++++++ include/asm-generic/pgtable-nopud.h | 5 +++ 2 files changed, 67 insertions(+) commit 505a60e225606fbd3d2eadc31ff793d939ba66f1 Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:03 2017 +0300 asm-generic: introduce 5level-fixup.h We are going to switch core MM to 5-level paging abstraction. This is preparation step which adds As with 4level-fixup.h, the new header allows quickly make all architectures compatible with 5-level paging in core MM. In long run we would like to switch architectures to properly folded p4d level by using , but it requires more changes to arch-specific code. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/asm-generic/4level-fixup.h | 3 ++- include/asm-generic/5level-fixup.h | 41 ++++++++++++++++++++++++++++++++++++++ include/linux/mm.h | 3 +++ 3 files changed, 46 insertions(+), 1 deletion(-) commit 6fb895692a034393d58679cd8d00c9e229719a5f Author: Kirill A. Shutemov Date: Thu Mar 9 17:24:02 2017 +0300 x86/cpufeature: Add 5-level paging detection Look for 'la57' in /proc/cpuinfo to see if your machine supports 5-level paging. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds arch/x86/include/asm/cpufeatures.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80 Author: Bjorn Helgaas Date: Thu Mar 9 11:27:07 2017 -0600 PCI: iproc: Save host bridge window resource in struct iproc_pcie The host bridge memory window resource is inserted into the iomem_resource tree and cannot be deallocated until the host bridge itself is removed. Previously, the window was on the stack, which meant the iomem_resource entry pointed into the stack and was corrupted as soon as the probe function returned, which caused memory corruption and errors like this: pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff] Move the memory window resource from the stack into struct iproc_pcie so its lifetime matches that of the host bridge. Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources") Reported-and-tested-by: Rafał Miłecki Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.8+ drivers/pci/host/pcie-iproc-bcma.c | 24 ++++++++++++------------ drivers/pci/host/pcie-iproc-platform.c | 19 ++++++++++--------- drivers/pci/host/pcie-iproc.h | 1 + 3 files changed, 23 insertions(+), 21 deletions(-) commit 61eb2b43b99ebdc9bc6bc83d9792257b243e7cb3 Author: Shaohua Li Date: Tue Feb 28 13:00:20 2017 -0800 md/raid1/10: fix potential deadlock Neil Brown pointed out a potential deadlock in raid 10 code with bio_split/chain. The raid1 code could have the same issue, but recent barrier rework makes it less likely to happen. The deadlock happens in below sequence: 1. generic_make_request(bio), this will set current->bio_list 2. raid10_make_request will split bio to bio1 and bio2 3. __make_request(bio1), wait_barrer, add underlayer disk bio to current->bio_list 4. __make_request(bio2), wait_barrer If raise_barrier happens between 3 & 4, since wait_barrier runs at 3, raise_barrier waits for IO completion from 3. And since raise_barrier sets barrier, 4 waits for raise_barrier. But IO from 3 can't be dispatched because raid10_make_request() doesn't finished yet. The solution is to adjust the IO ordering. Quotes from Neil: " It is much safer to: if (need to split) { split = bio_split(bio, ...) bio_chain(...) make_request_fn(split); generic_make_request(bio); } else make_request_fn(mddev, bio); This way we first process the initial section of the bio (in 'split') which will queue some requests to the underlying devices. These requests will be queued in generic_make_request. Then we queue the remainder of the bio, which will be added to the end of the generic_make_request queue. Then we return. generic_make_request() will pop the lower-level device requests off the queue and handle them first. Then it will process the remainder of the original bio once the first section has been fully processed. " Note, this only happens in read path. In write path, the bio is flushed to underlaying disks either by blk flush (from schedule) or offladed to raid1/10d. It's queued in current->bio_list. Cc: Coly Li Cc: stable@vger.kernel.org (v3.14+, only the raid10 part) Suggested-by: NeilBrown Reviewed-by: Jack Wang Signed-off-by: Shaohua Li drivers/md/raid1.c | 25 +++++++++++++++++++++++-- drivers/md/raid10.c | 18 ++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) commit 1b3bae49fba52f1ec499c36c53bc07761a9f6c4d Author: NeilBrown Date: Wed Mar 1 07:31:28 2017 +1100 md: don't impose the MD_SB_DISKS limit on arrays without metadata. These arrays, created with "mdadm --build" don't benefit from a limit. The default will be used, which is '0' and is interpreted as "don't impose a limit". Reported-by: ian_bruce@mail.ru Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c94836342192b05d599d6aa3397f732f7a238689 Author: Guoqing Jiang Date: Fri Feb 24 11:15:23 2017 +0800 md: move funcs from pers->resize to update_size raid1_resize and raid5_resize should also check the mddev->queue if run underneath dm-raid. And both set_capacity and revalidate_disk are used in pers->resize such as raid1, raid10 and raid5. So move them from personality file to common code. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 8 ++++++-- drivers/md/raid1.c | 2 -- drivers/md/raid10.c | 4 ---- drivers/md/raid5.c | 2 -- 4 files changed, 6 insertions(+), 10 deletions(-) commit 75df023f4f2188c21181996e28234fef9351ef45 Author: Guoqing Jiang Date: Fri Feb 24 11:15:13 2017 +0800 md-cluster: remove useless memset from gather_all_resync_info This memset is not needed. The lvb is already zeroed because it was recently allocated by lockres_init, which uses kzalloc(), and read_resync_info() doesn't need it to be zero anyway. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 1 - 1 file changed, 1 deletion(-) commit 9c8043f337f14d1743006dfc59c03e80a42e3884 Author: Guoqing Jiang Date: Fri Feb 24 11:15:12 2017 +0800 md-cluster: free md_cluster_info if node leave cluster To avoid memory leak, we need to free the cinfo which is allocated when node join cluster. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 1 + 1 file changed, 1 insertion(+) commit 99b3d74ec05c4a4c57766a90d65b53d78ab06404 Author: Shaohua Li Date: Thu Feb 23 12:31:10 2017 -0800 md: delete dead code Nobody is using mddev_check_plugged(), so delete the dead code Signed-off-by: Shaohua Li drivers/md/md.c | 8 -------- drivers/md/md.h | 6 ------ 2 files changed, 14 deletions(-) commit 6d399783e9d4e9bd44931501948059d24ad96ff8 Author: Shaohua Li Date: Thu Feb 23 12:26:41 2017 -0800 md/raid10: submit bio directly to replacement disk Commit 57c67df(md/raid10: submit IO from originating thread instead of md thread) submits bio directly for normal disks but not for replacement disks. There is no point we shouldn't do this for replacement disks. Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit dcc7620cad5ad1326a78f4031a7bf4f0e5b42984 Author: Guenter Roeck Date: Thu Mar 9 15:39:37 2017 +0200 usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers Upstream commit 98d74f9ceaef ("xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers") fixes a problem with hot pluggable PCI xhci controllers which can result in excessive timeouts, to the point where the system reports a deadlock. The same problem is seen with hot pluggable xhci controllers using the xhci-plat driver, such as the driver used for Type-C ports on rk3399. Similar to hot-pluggable PCI controllers, the driver for this chip removes the xhci controller from the system when the Type-C cable is disconnected. The solution for PCI devices works just as well for non-PCI devices and avoids the problem. Signed-off-by: Guenter Roeck Cc: stable Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 2 ++ 1 file changed, 2 insertions(+) commit f95e60a7dbecd2de816bb3ad517b3d4fbc20b507 Author: Peter Chen Date: Thu Mar 9 15:39:36 2017 +0200 usb: host: xhci-dbg: HCIVERSION should be a binary number According to xHCI spec, HCIVERSION containing a BCD encoding of the xHCI specification revision number, 0100h corresponds to xHCI version 1.0. Change "100" as "0x100". Cc: Lu Baolu Cc: stable Fixes: 04abb6de2825 ("xhci: Read and parse new xhci 1.1 capability register") Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20e4e37e4a2f1bfd43bcc8c3e666e47665036cc3 Author: Chunfeng Yun Date: Thu Mar 9 15:39:35 2017 +0200 usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct because hcd_priv_size is already size of xhci_hcd struct, extra_priv_size is not needed anymore for MTK and tegra drivers. Signed-off-by: Chunfeng Yun Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 1 - drivers/usb/host/xhci-tegra.c | 1 - 2 files changed, 2 deletions(-) commit 94a631d91ad341b3b4bdac72d1104d9f090e0ca9 Author: Chunfeng Yun Date: Thu Mar 9 15:39:34 2017 +0200 usb: xhci-mtk: check hcc_params after adding primary hcd hcc_params is set in xhci_gen_setup() called from usb_add_hcd(), so checks the Maximum Primary Stream Array Size in the hcc_params register after adding primary hcd. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6022c5cadf1a43ca30f431f128daa6163909ad60 Author: Yuantian Tang Date: Thu Mar 9 17:13:29 2017 +0800 ahci: qoriq: correct the sata ecc setting error Sata ecc is controlled by only 1 bit which is 24bit in big-endian in ecc register. So only setting 24bit to disable sata ecc prevents other bits from being overwritten in ecc register. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 806dbb20efde821910b5f747befed794077a9109 Author: Wolfram Sang Date: Thu Mar 9 16:41:48 2017 +0100 Revert "i2c: copy device properties when using i2c_register_board_info()" This reverts commit b0c1e95ab44feaad8831f2c06a3473c974003b49. It contains a flaw and the next version has more features added which makes me want to move it to the next cycle. Signed-off-by: Wolfram Sang drivers/i2c/i2c-boardinfo.c | 10 ---------- 1 file changed, 10 deletions(-) commit e61dfc836b8a95c54e5b41d2247df258b0593a1b Merge: 8ce0928e 2e1e494 Author: Wolfram Sang Date: Thu Mar 9 16:34:41 2017 +0100 Merge branch 'i2c-mux/for-current' of https://github.com/peda-r/i2c-mux into i2c/for-current commit 8ce0928e6867fda4d208d7bddf251bce96ab8431 Author: Wolfram Sang Date: Thu Mar 9 16:32:17 2017 +0100 Revert "i2c: add missing of_node_put in i2c_mux_del_adapters" This reverts commit 02dbfa5e5583523035f05636c614a0eca77f1aab. I grabbed the wrong version from the list and will pull the proper one from Peter Rosin's mux tree. Signed-off-by: Wolfram Sang drivers/i2c/i2c-mux.c | 2 -- 1 file changed, 2 deletions(-) commit 9ad224744218a352964f31007a1420f2420a08a0 Author: Javier Martinez Canillas Date: Thu Mar 9 11:05:33 2017 -0300 i2c: exynos5: Avoid transaction timeouts due TRANSFER_DONE_AUTO not set After commit 7999eecb7e56 ("i2c: exynos5: fix arbitration lost handling"), some I2C transactions are failing because the TRANSFER_DONE_AUTO field is not set in the I2C_TRANS_STATUS register so the i2c->status value is left to -EINVAL causing the i2c->msg_complete completion to never be signaled. For example, when reading the time of an I2C rtc on an Exynos5800 machine: $ cat /sys/class/rtc/rtc0/time [ 25.924594] exynos5-hsi2c 12e10000.i2c: rx timeout [ 65.028365] max77686-rtc max77802-rtc: Fail to read time reg(-22) cat: /sys/class/rtc/rtc0/time: Invalid argument The Exynos5422 manual states clearly that most I2C_TRANS_STATUS reg bits (including TRANSFER_DONE_AUTO) are cleared after the register is read. So reading has side effects and should only be done if HSI2C_INT_I2C was set. Fixes: 7999eecb7e56 ("i2c: exynos5: fix arbitration lost handling") Signed-off-by: Javier Martinez Canillas Reviewed-by: Andrzej Hajda Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6a29b512cf1ebc2ceff6dbc1a256dbde3e259a2b Merge: 05d8d34 955a3fc Author: Radim Krčmář Date: Thu Mar 9 15:48:42 2017 +0100 Merge tag 'kvm-arm-for-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM updates for v4.11-rc2 vgic updates: - Honour disabling the ITS - Don't deadlock when deactivating own interrupts via MMIO - Correctly expose the lact of IRQ/FIQ bypass on GICv3 I/O virtualization: - Make KVM_CAP_NR_MEMSLOTS big enough for large guests with many PCIe devices General bug fixes: - Gracefully handle exception generated with syndroms that the host doesn't understand - Properly invalidate TLBs on VHE systems commit 05d8d34611139f8435af90ac54b65eb31e82e388 Author: Radim Krčmář Date: Tue Mar 7 17:51:49 2017 +0100 KVM: nVMX: do not warn when MSR bitmap address is not backed Before trying to do nested_get_page() in nested_vmx_merge_msr_bitmap(), we have already checked that the MSR bitmap address is valid (4k aligned and within physical limits). SDM doesn't specify what happens if the there is no memory mapped at the valid address, but Intel CPUs treat the situation as if the bitmap was configured to trap all MSRs. KVM already does that by returning false and a correct handling doesn't need the guest-trigerrable warning that was reported by syzkaller: (The warning was originally there to catch some possible bugs in nVMX.) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709 nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline] WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709 nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 7832 Comm: syz-executor1 Not tainted 4.10.0+ #229 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51 panic+0x1fb/0x412 kernel/panic.c:179 __warn+0x1c4/0x1e0 kernel/panic.c:540 warn_slowpath_null+0x2c/0x40 kernel/panic.c:583 nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline] nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640 enter_vmx_non_root_mode arch/x86/kvm/vmx.c:10471 [inline] nested_vmx_run+0x6186/0xaab0 arch/x86/kvm/vmx.c:10561 handle_vmlaunch+0x1a/0x20 arch/x86/kvm/vmx.c:7312 vmx_handle_exit+0xfc0/0x3f00 arch/x86/kvm/vmx.c:8526 vcpu_enter_guest arch/x86/kvm/x86.c:6982 [inline] vcpu_run arch/x86/kvm/x86.c:7044 [inline] kvm_arch_vcpu_ioctl_run+0x1418/0x4840 arch/x86/kvm/x86.c:7205 kvm_vcpu_ioctl+0x673/0x1120 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2570 Reported-by: Dmitry Vyukov Reviewed-by: Jim Mattson [Jim Mattson explained the bare metal behavior: "I believe this behavior would be documented in the chipset data sheet rather than the SDM, since the chipset returns all 1s for an unclaimed read."] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 32d3b06a39783fbe849176774037b44f209979ea Merge: fd8e57d 655cb1e Author: Rafael J. Wysocki Date: Thu Mar 9 15:12:55 2017 +0100 Merge branch 'pm-cpufreq-sched' * pm-cpufreq-sched: cpufreq: schedutil: Pass sg_policy to get_next_freq() cpufreq: schedutil: move cached_raw_freq to struct sugov_policy commit fd8e57d5d3041a93b87bb892d7819cd89d7445db Merge: c1ae3cf a240c4a Author: Rafael J. Wysocki Date: Thu Mar 9 15:12:27 2017 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: intel_pstate: Do not reinit performance limits in ->setpolicy cpufreq: intel_pstate: Fix intel_pstate_verify_policy() cpufreq: intel_pstate: Fix global settings in active mode cpufreq: Add the "cpufreq.off=1" cmdline option cpufreq: intel_pstate: Avoid triggering cpu_frequency tracepoint unnecessarily cpufreq: intel_pstate: Fix intel_cpufreq_verify_policy() cpufreq: intel_pstate: Do not use performance_limits in passive mode commit d6c098a1db468b7fd4635e831f276851dfd8852c Author: Brian Norris Date: Wed Mar 8 15:18:54 2017 -0800 ASoC: don't dereference NULL pcm_{new,free} Not all platform drivers have pcm_{new,free} callbacks. Seen with a "snd-soc-dummy" codec from sound/soc/rockchip/rk3399_gru_sound.c. Fixes: 99b04f4c4051 ("ASoC: add Component level pcm_new/pcm_free") Signed-off-by: Brian Norris Signed-off-by: Mark Brown sound/soc/soc-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 920c634aff6cb66e7f352668521eb1313897e93c Merge: b28ace1 4b9de5d Author: Thomas Gleixner Date: Thu Mar 9 12:06:41 2017 +0100 Merge tag 'irq-fixes-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip/irqdomain updates for 4.11-rc2 from Marc Zyngier - irqchip/crossbar: Some type tidying up - irqchip/gicv3-its: Workaround for a Qualcomm erratum - irqdomain: Compile for for systems that don't use CONFIG_IRQ_DOMAIN Fixed up minor conflict in the crossbar driver. commit 28b62b1458685d8f68f67d9b2d511bf8fa32b746 Author: Krzysztof Kozlowski Date: Wed Mar 8 23:14:20 2017 +0200 crypto: s5p-sss - Fix spinlock recursion on LRW(AES) Running TCRYPT with LRW compiled causes spinlock recursion: testing speed of async lrw(aes) (lrw(ecb-aes-s5p)) encryption tcrypt: test 0 (256 bit key, 16 byte blocks): 19007 operations in 1 seconds (304112 bytes) tcrypt: test 1 (256 bit key, 64 byte blocks): 15753 operations in 1 seconds (1008192 bytes) tcrypt: test 2 (256 bit key, 256 byte blocks): 14293 operations in 1 seconds (3659008 bytes) tcrypt: test 3 (256 bit key, 1024 byte blocks): 11906 operations in 1 seconds (12191744 bytes) tcrypt: test 4 (256 bit key, 8192 byte blocks): BUG: spinlock recursion on CPU#1, irq/84-10830000/89  lock: 0xeea99a68, .magic: dead4ead, .owner: irq/84-10830000/89, .owner_cpu: 1 CPU: 1 PID: 89 Comm: irq/84-10830000 Not tainted 4.11.0-rc1-00001-g897ca6d0800d #559 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x78/0x8c) [] (dump_stack) from [] (do_raw_spin_lock+0x11c/0x120) [] (do_raw_spin_lock) from [] (_raw_spin_lock_irqsave+0x20/0x28) [] (_raw_spin_lock_irqsave) from [] (s5p_aes_crypt+0x2c/0xb4) [] (s5p_aes_crypt) from [] (do_encrypt+0x78/0xb0 [lrw]) [] (do_encrypt [lrw]) from [] (encrypt_done+0x24/0x54 [lrw]) [] (encrypt_done [lrw]) from [] (s5p_aes_complete+0x60/0xcc) [] (s5p_aes_complete) from [] (s5p_aes_interrupt+0x134/0x1a0) [] (s5p_aes_interrupt) from [] (irq_thread_fn+0x1c/0x54) [] (irq_thread_fn) from [] (irq_thread+0x12c/0x1e0) [] (irq_thread) from [] (kthread+0x108/0x138) [] (kthread) from [] (ret_from_fork+0x14/0x3c) Interrupt handling routine was calling req->base.complete() under spinlock. In most cases this wasn't fatal but when combined with some of the cipher modes (like LRW) this caused recursion - starting the new encryption (s5p_aes_crypt()) while still holding the spinlock from previous round (s5p_aes_complete()). Beside that, the s5p_aes_interrupt() error handling path could execute two completions in case of error for RX and TX blocks. Rewrite the interrupt handling routine and the completion by: 1. Splitting the operations on scatterlist copies from s5p_aes_complete() into separate s5p_sg_done(). This still should be done under lock. The s5p_aes_complete() now only calls req->base.complete() and it has to be called outside of lock. 2. Moving the s5p_aes_complete() out of spinlock critical sections. In interrupt service routine s5p_aes_interrupts(), it appeared in few places, including error paths inside other functions called from ISR. This code was not so obvious to read so simplify it by putting the s5p_aes_complete() only within ISR level. Reported-by: Nathan Royce Cc: # v4.10.x: 07de4bc88c crypto: s5p-sss - Fix completing Cc: # v4.10.x Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 127 ++++++++++++++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 45 deletions(-) commit feec467f3995c1639e5f12eca7c7885c8b1d411d Merge: 2f68214 8c76d7c Author: Greg Kroah-Hartman Date: Thu Mar 9 11:14:06 2017 +0100 Merge tag 'usb-serial-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.11-rc2 Here's a fix for a digi_acceleport regression in -rc1, and some fixes for long-standing issues in three other drivers, including a NULL-pointer dereference and a couple of information leaks that could be triggered by a malicious device. Signed-off-by: Johan Hovold commit 1a09b6a7c10e22c489a8b212dd6862b1fd9674ad Author: Stephen Boyd Date: Thu Mar 9 13:45:44 2017 +0530 phy: qcom-usb-hs: Add depends on EXTCON We get the following compile errors if EXTCON is enabled as a module but this driver is builtin: drivers/built-in.o: In function `qcom_usb_hs_phy_power_off': phy-qcom-usb-hs.c:(.text+0x1089): undefined reference to `extcon_unregister_notifier' drivers/built-in.o: In function `qcom_usb_hs_phy_probe': phy-qcom-usb-hs.c:(.text+0x11b5): undefined reference to `extcon_get_edev_by_phandle' drivers/built-in.o: In function `qcom_usb_hs_phy_power_on': phy-qcom-usb-hs.c:(.text+0x128e): undefined reference to `extcon_get_state' phy-qcom-usb-hs.c:(.text+0x12a9): undefined reference to `extcon_register_notifier' so let's mark this as needing to follow the modular status of the extcon framework. Fixes: 9994a33865f4 e2427b09ba929c2b9 (phy: Add support for Qualcomm's USB HS phy") Signed-off-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 11d94e026b962eee6e1fbc4237f2cbfbec839067 Author: Jaehoon Chung Date: Wed Mar 8 17:22:42 2017 +0900 phy: phy-exynos-pcie: fix the wrong error return When it doesn't get the blk_base's resource, it was returned the error about phy_base, not blk_base. This patch is for fixing the wrong error return about blk_base. Fixes: cf0adb8e281b ("phy: phy-exynos-pcie: Add support for Exynos PCIe PHY") Signed-off-by: Jaehoon Chung Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 677941a304b72620f519e542fb7c370424dcc297 Author: Rafał Miłecki Date: Thu Feb 9 00:30:23 2017 +0100 Revert "dt-bindings: phy: Add documentation for NSP USB3 PHY" This reverts commit c8ca631f9480 ("dt-bindings: phy: Add documentation for NSP USB3 PHY") to match reverting commit adding the new PHY driver. Please note we revert this commit before it reached stable release. If new compatible string is needed it should be added to the existing bcm-ns-usb3-phy.txt which already describes this PHY. Acked-by: Jon Mason Acked-by: Rob Herring Signed-off-by: Rafał Miłecki .../devicetree/bindings/phy/brcm,nsp-usb3-phy.txt | 39 ---------------------- 1 file changed, 39 deletions(-) commit 9200c6f177638909dbbaded8aeeeccbd48744400 Author: Rafał Miłecki Date: Thu Feb 9 00:30:22 2017 +0100 Revert "phy: Add USB3 PHY support for Broadcom NSP SoC" This reverts commit d7bc1a7d41bf ("phy: Add USB3 PHY support for Broadcom NSP SoC") as we already have driver for this PHY (shared by NS and NSP). It was added in commit e5666281d9ea ("phy: bcm-ns-usb3: new driver for USB 3.0 PHY on Northstar"). Instead of adding separated driver & duplicating code we should work on improving existing (old) one. Thanks to work done by Broadcom we know there is MDIO bus we weren't aware of & we know register names which makes initialization more clear. This is very valuable info and we should work on using it in existing driver afterwards. Acked-by: Jon Mason Signed-off-by: Rafał Miłecki drivers/phy/Kconfig | 8 -- drivers/phy/Makefile | 1 - drivers/phy/phy-bcm-nsp-usb3.c | 177 ----------------------------------------- 3 files changed, 186 deletions(-) commit 2f6821462fe3ace62df3f1b5a9463153e8288298 Author: Johan Hovold Date: Fri Feb 24 19:11:28 2017 +0100 USB: serial: digi_acceleport: fix OOB-event processing A recent change claimed to fix an off-by-one error in the OOB-port completion handler, but instead introduced such an error. This could specifically led to modem-status changes going unnoticed, effectively breaking TIOCMGET. Note that the offending commit fixes a loop-condition underflow and is marked for stable, but should not be backported without this fix. Reported-by: Ben Hutchings Fixes: 2d380889215f ("USB: serial: digi_acceleport: fix OOB data sanity check") Cc: stable # v2.6.30 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/digi_acceleport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 829b84db0c0c120ae5855a69cc0c94ff75fafabb Author: Richard Leitner Date: Mon Mar 6 09:24:23 2017 +0100 MAINTAINERS: usb251xb: remove reference inexistent file The platform_data header file was dropped in the merged version of the USB251xB driver. Therefore remove its reference from the MAINTAINERS file. Signed-off-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit fa56fe4ca4a1e4d9715f144857c98074e41bc94f Author: Richard Leitner Date: Mon Mar 6 09:24:22 2017 +0100 doc: dt-bindings: usb251xb: mark reg as required Mark the reg property as required and furthermore fix some typos and spellings in the documentation. Signed-off-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 7f7d8ba3b2140d993887a7db7a83d85c1f8db0e8 Author: Richard Leitner Date: Mon Mar 6 09:24:21 2017 +0100 usb: usb251xb: dt: add unit suffix to oc-delay and power-on-time Rename oc-delay-* to oc-delay-us and make it expect a time value. Furthermore add -ms suffix to power-on-time. There changes were suggested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. Signed-off-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 10 ++++--- drivers/usb/misc/usb251xb.c | 35 ++++++++++++---------- 2 files changed, 26 insertions(+), 19 deletions(-) commit cfa47afe77b393e2c24a57e7e9611857a0b064f1 Author: Richard Leitner Date: Mon Mar 6 09:24:20 2017 +0100 usb: usb251xb: remove max_{power,current}_{sp,bp} properties Remove the max_{power,current}_{sp,bp} properties of the usb251xb driver from devicetree. This is done to simplify the dt bindings as requested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. If those properties are ever needed by somebody they can be enabled again easily. Signed-off-by: Richard Leitner Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 20 ------------------ drivers/usb/misc/usb251xb.c | 24 ++++------------------ 2 files changed, 4 insertions(+), 40 deletions(-) commit d595259fbb7a7afed241b1afb2c4fe4b47de47fa Author: Tobias Jakobi Date: Tue Feb 28 00:46:58 2017 +0100 usb-storage: Add ignore-residue quirk for Initio INIC-3619 This USB-SATA bridge chip is used in a StarTech enclosure for optical drives. Without the quirk MakeMKV fails during the key exchange with an installed BluRay drive: > Error 'Scsi error - ILLEGAL REQUEST:COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED' > occurred while issuing SCSI command AD010..080002400 to device 'SG:dev_11:2' Signed-off-by: Tobias Jakobi Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit de46e56653de7b3b54baa625bd582635008b8d05 Author: Johan Hovold Date: Tue Mar 7 16:11:04 2017 +0100 USB: iowarrior: fix NULL-deref in write Make sure to verify that we have the required interrupt-out endpoint for IOWarrior56 devices to avoid dereferencing a NULL-pointer in write should a malicious device lack such an endpoint. Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.") Cc: stable # 2.6.21 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b7321e81fc369abe353cf094d4f0dc2fe11ab95f Author: Johan Hovold Date: Tue Mar 7 16:11:03 2017 +0100 USB: iowarrior: fix NULL-deref at probe Make sure to check for the required interrupt-in endpoint to avoid dereferencing a NULL-pointer should a malicious device lack such an endpoint. Note that a fairly recent change purported to fix this issue, but added an insufficient test on the number of endpoints only, a test which can now be removed. Fixes: 4ec0ef3a8212 ("USB: iowarrior: fix oops with malicious USB descriptors") Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.") Cc: stable # 2.6.21 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit fd567653bdb908009b650f079bfd4b63169e2ac4 Author: Javier Martinez Canillas Date: Wed Feb 22 15:23:22 2017 -0300 usb: phy: isp1301: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 85550f9148a852ed363a386577ad31b97b95dfb8 Author: Jelle Martijn Kok Date: Tue Feb 21 12:48:18 2017 +0100 usb: ohci-at91: Do not drop unhandled USB suspend control requests In patch 2e2aa1bc7eff90ecm, USB suspend and wakeup control requests are passed to SFR_OHCIICR register. If a processor does not have such a register, this hub control request will be dropped. If no such a SFR register is available, all USB suspend control requests will now be processed using ohci_hub_control() (like before patch 2e2aa1bc7eff90ecm.) Tested on an Atmel AT91SAM9G20 with an on-board TI TUSB2046B hub chip If the last USB device is unplugged from the USB hub, the hub goes into sleep and will not wakeup when an USB devices is inserted. Fixes: 2e2aa1bc7eff90ec ("usb: ohci-at91: Forcibly suspend ports while USB suspend") Signed-off-by: Jelle Martijn Kok Tested-by: Wenyou Yang Cc: Wenyou Yang Cc: Alan Stern Cc: stable Acked-by: Nicolas Ferre Reviewed-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db08e1d53034a54fe177ced70476fda73954b9e9 Author: Alexey Kardashevskiy Date: Tue Feb 21 13:41:31 2017 +1100 powerpc/powernv/ioda2: Update iommu table base on ownership change On POWERNV platform, in order to do DMA via IOMMU (i.e. 32bit DMA in our case), a device needs an iommu_table pointer set via set_iommu_table_base(). The codeflow is: - pnv_pci_ioda2_setup_dma_pe() - pnv_pci_ioda2_setup_default_config() - pnv_ioda_setup_bus_dma() [1] pnv_pci_ioda2_setup_dma_pe() creates IOMMU groups, pnv_pci_ioda2_setup_default_config() does default DMA setup, pnv_ioda_setup_bus_dma() takes a bus PE (on IODA2, all physical function PEs as bus PEs except NPU), walks through all underlying buses and devices, adds all devices to an IOMMU group and sets iommu_table. On IODA2, when VFIO is used, it takes ownership over a PE which means it removes all tables and creates new ones (with a possibility of sharing them among PEs). So when the ownership is returned from VFIO to the kernel, the iommu_table pointer written to a device at [1] is stale and needs an update. This adds an "add_to_group" parameter to pnv_ioda_setup_bus_dma() (in fact re-adds as it used to be there a while ago for different reasons) to tell the helper if a device needs to be added to an IOMMU group with an iommu_table update or just the latter. This calls pnv_ioda_setup_bus_dma(..., false) from pnv_ioda2_release_ownership() so when the ownership is restored, 32bit DMA can work again for a device. This does the same thing on obtaining ownership as the iommu_table point is stale at this point anyway and it is safer to have NULL there. We did not hit this earlier as all tested devices in recent years were only using 64bit DMA; the rare exception for this is MPT3 SAS adapter which uses both 32bit and 64bit DMA access and it has not been tested with VFIO much. Signed-off-by: Alexey Kardashevskiy Acked-by: Gavin Shan Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 955a3fc6d2a1c11d6d00bce4f3816100ce0530cf Author: Linu Cherian Date: Wed Mar 8 11:38:35 2017 +0530 KVM: arm64: Increase number of user memslots to 512 Having only 32 memslots is a real constraint for the maximum number of PCI devices that can be assigned to a single guest. Assuming each PCI device/virtual function having two memory BAR regions, we could assign only 15 devices/virtual functions to a guest. Hence increase KVM_USER_MEM_SLOTS to 512 as done in other archs like powerpc. Reviewed-by: Christoffer Dall Signed-off-by: Linu Cherian Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e92f94a3b8e925a6dd7ec88a5794b2084b5fb65 Author: Linu Cherian Date: Wed Mar 8 11:38:34 2017 +0530 KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused arm/arm64 architecture doesnt use private memslots, hence removing KVM_PRIVATE_MEM_SLOTS macro definition. Reviewed-by: Christoffer Dall Signed-off-by: Linu Cherian Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 1 - arch/arm64/include/asm/kvm_host.h | 1 - 2 files changed, 2 deletions(-) commit 7af4df85796589e60a2dfc0f821eca0c4bbce4d2 Author: Linu Cherian Date: Wed Mar 8 11:38:33 2017 +0530 KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 Return KVM_USER_MEM_SLOTS for userspace capability query on NR_MEMSLOTS. Reviewed-by: Christoffer Dall Signed-off-by: Linu Cherian Signed-off-by: Marc Zyngier arch/arm/kvm/arm.c | 3 +++ 1 file changed, 3 insertions(+) commit a677e7046ab5edb33d051bda60cb3be0d60a48cc Author: Linu Cherian Date: Wed Mar 8 11:38:32 2017 +0530 KVM: Add documentation for KVM_CAP_NR_MEMSLOTS Add documentation for KVM_CAP_NR_MEMSLOTS capability. Reviewed-by: Christoffer Dall Signed-off-by: Linu Cherian Signed-off-by: Marc Zyngier Documentation/virtual/kvm/api.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 88767cc1971d9b6d48698246e6c778e8b8d307cf Merge: c1ae3cf 35b2719 Author: Greg Kroah-Hartman Date: Thu Mar 9 10:12:54 2017 +0100 Merge tag 'fixes-for-v4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.11-rc2 dwc3 got a few fixes this time around: Fixed an old bug where a broken endpoint descriptor passed in via userspace through f_fs could prevent dwc3 from working because when calculating max bursts, we could overwrite top 16 bits of a register. Also fixed a bug on dwc3's ep_dequeue implementation which wasn't properly incrementing our TRB dequeue pointer. dwc3 on omap got two fixes: one for system suspend/resume and another added a missing break statement on dwc3_omap_set_mailbox(). Apart from these, we have a set of smaller fixes including memory leak in configfs, build warning fix in atmel udc and a revert of a broken patch that went in during the merge window commit 5a8cf90d743f2d05433c6109f6c1b9b904b0cdb7 Author: Chris Wilson Date: Thu Feb 2 20:47:41 2017 +0000 drm/i915: Drain the freed state from the tail of the next commit If we have any residual freed atomic state from earlier commits, flush the freed list after performing the current modeset. This prevents the freed list from ever-growing if userspace manages to starve the kernel threads (i.e. we are never able to run our free state worker and eventually the system may even oom). Fixes: 6f0f02dc56f1 ("drm/i915: Move atomic state free from out of fence release") Testcase: igt/kms_cursor/legacy/all-pipes-single-bo Reported-by: Maarten Lankhorst Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202204741.18231-1-chris@chris-wilson.co.uk Reviewed-by: Maarten Lankhorst (cherry picked from commit ba318c61a9719577b6f451c055f364e4116874b2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit edd06b8353772dca7afcd4640dafa83b521edd55 Author: Ville Syrjälä Date: Tue Mar 7 22:54:19 2017 +0200 drm/i915: Nuke debug messages from the pipe update critical section printks are slow so we should not be doing them from the vblank evade critical section. These could explain why we sometimes seem to blow past our 100 usec deadline. The problem has been there ever since commit bfd16b2a23dc ("drm/i915: Make updating pipe without modeset atomic.") but it may not have been readily visible until commit e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.") increased our chances of noticing it. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: bfd16b2a23dc ("drm/i915: Make updating pipe without modeset atomic.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170307205419.19447-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit c3f8ad57a01a31397e5a0349a226a32f35ddc19c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 4e6fdafa7ac395ad47a80a0e7b4fd1e11550f862 Author: Chris Wilson Date: Tue Mar 7 12:03:38 2017 +0000 drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl Before we instantiate/pin the backing store for our use, we can prepopulate the shmemfs filp efficiently using a write into the pagecache. We avoid the penalty of instantiating all the pages, important if the user is just writing to a few and never uses the object on the GPU, and using a direct write into shmemfs allows it to avoid the cost of retrieving a page (mostly the clear-before-use, but in theory we could curtail swapin) before it is overwritten. This can be extended later to provide additional specialisation for other backends (other than shmemfs). For now it provides a defense against very large write-only allocations from exhausting all of system memory. v2: Smelling fixes. Fixes: fe115628d567 ("drm/i915: Implement pwrite without struct-mutex") References: https://bugs.freedesktop.org/show_bug.cgi?id=99107 Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: # v4.10+ Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170307120338.7277-2-chris@chris-wilson.co.uk (cherry picked from commit 7c55e2c5772dcf3cbacd0fa2bcfeefae416b73f7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 78 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_object.h | 3 ++ 2 files changed, 81 insertions(+) commit 0d9dc306e15b59bf50db87ebcb1e2248586d4733 Author: Chris Wilson Date: Tue Mar 7 13:20:31 2017 +0000 drm/i915: Store a permanent error in obj->mm.pages Once the object has been truncated, it is unrecoverable. To facilitate detection of this state store the error in obj->mm.pages. This is required for the next patch which should be applied to v4.10 (via stable), so we also need to mark this patch for backporting. In that regard, let's consider this to be a fix/improvement too. v2: Avoid dereferencing the ERR_PTR when freeing the object. Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170307132031.32461-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 4e5462ee843c883790e9609cf560d88960ea4227) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 38230243ef316ac696956d75dc78a22e3aa789b9 Author: Maarten Lankhorst Date: Tue Feb 28 15:28:47 2017 +0100 drm/i915: Move updating color management to before vblank evasion This cannot be done reliably during vblank evasasion since the color management registers are not double buffered. The original commit that moved it always during vblank evasion was wrong, so revert it to before vblank evasion again. Signed-off-by: Maarten Lankhorst Fixes: 20a34e78f0d7 ("drm/i915: Update color management during vblank evasion.") Cc: stable@vger.kernel.org # v4.7+ Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä (cherry picked from commit 567f0792a6ad11c0c2620944b8eeb777359fb85a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit d253371c4c2f5fc2d884ef25f64decd7549aff5a Author: Imre Deak Date: Fri Feb 24 16:32:10 2017 +0200 drm/i915/gen9: Increase PCODE request timeout to 50ms After commit 2c7d0602c815277f7cb7c932b091288710d8aba7 Author: Imre Deak Date: Mon Dec 5 18:27:37 2016 +0200 drm/i915/gen9: Fix PCODE polling during CDCLK change notification there is still one report of the CDCLK-change request timing out on a KBL machine, see the Reference link. On that machine the maximum time the request took to succeed was 34ms, so increase the timeout to 50ms. v2: - Change timeout from 100 to 50 ms to maintain the current 50 ms limit for atomic waits in the driver. (Chris, Tvrtko) Reference: https://bugs.freedesktop.org/show_bug.cgi?id=99345 Cc: Ville Syrjälä Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Signed-off-by: Imre Deak Acked-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1487946730-17162-1-git-send-email-imre.deak@intel.com (cherry picked from commit 0129936ddda26afd5d9d207c4e86b2425952579f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 34dc8993eef63681b062871413a9484008a2a78f Author: Mika Kuoppala Date: Wed Feb 15 15:52:59 2017 +0200 drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3 Certain Baytrails, namely the 4 cpu core variants, have been plaqued by spurious system hangs, mostly occurring with light loads. Multiple bisects by various people point to a commit which changes the reclocking strategy for Baytrail to follow its bigger brethen: commit 8fb55197e64d ("drm/i915: Agressive downclocking on Baytrail") There is also a review comment attached to this commit from Deepak S on avoiding punit access on Cherryview and thus it was excluded on common reclocking path. By taking the same approach and omitting the punit access by not tweaking the thresholds when the hardware has been asked to move into different frequency, considerable gains in stability have been observed. With J1900 box, light render/video load would end up in system hang in usually less than 12 hours. With this patch applied, the cumulative uptime has now been 34 days without issues. To provoke system hang, light loads on both render and bsd engines in parallel have been used: glxgears >/dev/null 2>/dev/null & mpv --vo=vaapi --hwdec=vaapi --loop=inf vid.mp4 So far, author has not witnessed system hang with above load and this patch applied. Reports from the tenacious people at kernel bugzilla are also promising. Considering that the punit access frequency with this patch is considerably less, there is a possibility that this will push the, still unknown, root cause past the triggering point on most loads. But as we now can reliably reproduce the hang independently, we can reduce the pain that users are having and use a static thresholds until a root cause is found. v3: don't break debugfs and simplification (Chris Wilson) References: https://bugzilla.kernel.org/show_bug.cgi?id=109051 Cc: Chris Wilson Cc: Ville Syrjälä Cc: Len Brown Cc: Daniel Vetter Cc: Jani Nikula Cc: fritsch@xbmc.org Cc: miku@iki.fi Cc: Ezequiel Garcia CC: Michal Feix Cc: Hans de Goede Cc: Deepak S Cc: Jarkko Nikula Cc: # v4.2+ Acked-by: Daniel Vetter Acked-by: Chris Wilson Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1487166779-26945-1-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 6067a27d1f0184596d51decbac1c1fdc4acb012f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c9923707f30ff56d9fd242053594b18f38d8036 Author: Chris Wilson Date: Mon Feb 27 12:26:54 2017 +0000 drm/i915: Remove the vma from the drm_mm if binding fails As we track whether a vma has been inserted into the drm_mm using the vma->flags, if we fail to bind the vma into the GTT we do not update those bits and will attempt to reinsert the vma into the drm_mm on future passes. To prevent that, we want to unwind i915_vma_insert() if we fail in our attempt to bind. Fixes: 59bfa1248e22 ("drm/i915: Start passing around i915_vma from execbuffer") Testcase: igt/drv_selftest/live_gtt Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.9+ Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170227122654.27651-3-chris@chris-wilson.co.uk (cherry picked from commit 31c7effa39f21f0fea1b3250ae9ff32b9c7e1ae5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_vma.c | 57 ++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 20 deletions(-) commit b717a0392530ae8da0da041abe5c3a6098b55660 Author: Chris Wilson Date: Fri Feb 24 11:43:06 2017 +0000 drm/i915/fbdev: Stop repeating tile configuration on stagnation If we cease making progress in finding matching outputs for a tiled configuration, stop looping over the remaining unconfigured outputs. v2: Use conn_seq (instead of pass) to only apply tile configuration on first pass. Fixes: b0ee9e7fa5b4 ("drm/fb: add support for tiled monitor configurations. (v2)") Signed-off-by: Chris Wilson Cc: Tomasz Lis Cc: Dave Airlie Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: # v3.19+ Reviewed-by: Tomasz Lis Link: http://patchwork.freedesktop.org/patch/msgid/20170224114306.4400-1-chris@chris-wilson.co.uk (cherry picked from commit 754a76591b12c88f57ad8b4ca533a5c9566a1922) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1d972d6021a1388021df51a58248e68372ce2b5d Author: Ander Conselvan de Oliveira Date: Thu Feb 23 09:15:57 2017 +0200 drm/i915/glk: Fix watermark computations for third sprite plane Geminilake has a third sprite plane (or fourth universal plane) that is independent from the cursor. Make sure that for_each_plane_id_on_crtc() is aware of that extra plane so that the watermark code takes it into account. Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly") Cc: Ander Conselvan de Oliveira Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-2-ander.conselvan.de.oliveira@intel.com (cherry picked from commit 19c3164db457e0fc65d4501fd354506228576241) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 1 + 1 file changed, 1 insertion(+) commit 89cf83d4e065ff9fbd2ddc674489c8058eeca758 Author: Chris Wilson Date: Thu Feb 16 12:54:41 2017 +0000 drm/i915: Squelch any ktime/jiffie rounding errors for wait-ioctl We wait upon jiffies, but report the time elapsed using a high-resolution timer. This discrepancy can lead to us timing out the wait prior to us reporting the elapsed time as complete. This restores the squelching lost in commit e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers"). Fixes: e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170216125441.30923-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit c1d2061b28c2aa25ec39b60d9c248e6beebd7315) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e61555c29c28a4a3b6ba6207f4a0883ee236004d Author: Jérémy Lefaure Date: Wed Mar 8 20:18:09 2017 -0500 EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro The MTR_DRAM_WIDTH macro returns the data width. It is sometimes used as if it returned a boolean true if the width if 8. Fix the tests where MTR_DRAM_WIDTH is misused. Signed-off-by: Jérémy Lefaure Cc: linux-edac Link: http://lkml.kernel.org/r/20170309011809.8340-1-jeremy.lefaure@lse.epita.fr Signed-off-by: Borislav Petkov drivers/edac/i5000_edac.c | 2 +- drivers/edac/i5400_edac.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 7aafac11e308d37ed3c509829bb43d80c1811ac3 Author: Alexey Kardashevskiy Date: Wed Feb 22 15:43:59 2017 +1100 powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested The IODA2 specification says that a 64 DMA address cannot use top 4 bits (3 are reserved and one is a "TVE select"); bottom page_shift bits cannot be used for multilevel table addressing either. The existing IODA2 table allocation code aligns the minimum TCE table size to PAGE_SIZE so in the case of 64K system pages and 4K IOMMU pages, we have 64-4-12=48 bits. Since 64K page stores 8192 TCEs, i.e. needs 13 bits, the maximum number of levels is 48/13 = 3 so we physically cannot address more and EEH happens on DMA accesses. This adds a check that too many levels were requested. It is still possible to have 5 levels in the case of 4K system page size. Signed-off-by: Alexey Kardashevskiy Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 3 +++ 1 file changed, 3 insertions(+) commit 713c43b315fc160dc4ff3da0020ebe09b8a65587 Author: Jiri Pirko Date: Mon Mar 6 21:22:09 2017 +0100 mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy This warnings may be hit even in case they should not - in case user puts a TC-flower rule which failed to be offloaded. So just remove them. Reported-by: Petr Machata Reported-by: Ido Schimmel Fixes: commit 7aa0f5aa9030 ("mlxsw: spectrum: Implement TC flower offload") Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7887d40e541f74402df0684a1463c0a0bb68c68 Author: David Ahern Date: Mon Mar 6 08:53:04 2017 -0800 vrf: Fix use-after-free in vrf_xmit KASAN detected a use-after-free: [ 269.467067] BUG: KASAN: use-after-free in vrf_xmit+0x7f1/0x827 [vrf] at addr ffff8800350a21c0 [ 269.467067] Read of size 4 by task ssh/1879 [ 269.467067] CPU: 1 PID: 1879 Comm: ssh Not tainted 4.10.0+ #249 [ 269.467067] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 269.467067] Call Trace: [ 269.467067] dump_stack+0x81/0xb6 [ 269.467067] kasan_object_err+0x21/0x78 [ 269.467067] kasan_report+0x2f7/0x450 [ 269.467067] ? vrf_xmit+0x7f1/0x827 [vrf] [ 269.467067] ? ip_output+0xa4/0xdb [ 269.467067] __asan_load4+0x6b/0x6d [ 269.467067] vrf_xmit+0x7f1/0x827 [vrf] ... Which corresponds to the skb access after xmit handling. Fix by saving skb->len and using the saved value to update stats. Fixes: 193125dbd8eb2 ("net: Introduce VRF device driver") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3331aa378e9bcbd0d16de9034b0c20f4050e26b4 Author: Jarod Wilson Date: Mon Mar 6 08:48:58 2017 -0500 team: use ETH_MAX_MTU as max mtu This restores the ability to set a team device's mtu to anything higher than 1500. Similar to the reported issue with bonding, the team driver calls ether_setup(), which sets an initial max_mtu of 1500, while the underlying hardware can handle something much larger. Just set it to ETH_MAX_MTU to support all possible values, and the limitations of the underlying devices will prevent setting anything too large. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") CC: Cong Wang CC: Jiri Pirko CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/team/team.c | 1 + 1 file changed, 1 insertion(+) commit aac1561ad98e74f6ea43337f9b9714ab0b1f493e Author: David S. Miller Date: Wed Mar 8 22:17:10 2017 -0800 net: Revert ksettings conversions. Those were supposed to go into the net-next tree not the net tree. Oops... Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 51 ++++++------ drivers/net/ethernet/sun/cassini.c | 98 +++++++++++------------ drivers/net/ethernet/sun/niu.c | 37 ++++----- drivers/net/ethernet/sun/sungem.c | 98 ++++++++++------------- drivers/net/ethernet/sun/sunhme.c | 62 +++++++------- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 51 +++++------- drivers/net/ethernet/toshiba/spider_net_ethtool.c | 24 +++--- 7 files changed, 188 insertions(+), 233 deletions(-) commit b793f081674e363f71699b0b32fc9a1890e52db2 Author: Christian Lamparter Date: Mon Mar 6 14:34:27 2017 +0100 net: ibm: emac: fix regression caused by emac_dt_phy_probe() Julian Margetson reported a panic on his SAM460EX with Kernel 4.11-rc1: | Unable to handle kernel paging request for data at address 0x00000014 | Oops: Kernel access of bad area, sig: 11 [#1] | PREEMPT | Canyonlands | Modules linked in: | CPU: 0 PID: 1 Comm: swapper Not tainted [...] | task: ea838000 task.stack: ea836000 | NIP: c0599f5c LR: c0599dd8 CTR: 00000000 | REGS: ea837c80 TRAP: 0300 Not tainted [...] | MSR: 00029000 | CR: 24371242 XER: 20000000 | DEAR: 00000014 ESR: 00000000 | GPR00: c0599ce8 ea837d30 ea838000 c0e52dcc c0d56ffb [...] | NIP [c0599f5c] emac_probe+0xfb4/0x1304 | LR [c0599dd8] emac_probe+0xe30/0x1304 | Call Trace: | [ea837d30] [c0599ce8] emac_probe+0xd40/0x1304 (unreliable) | [ea837d80] [c0533504] platform_drv_probe+0x48/0x90 | [ea837da0] [c0531c14] driver_probe_device+0x15c/0x2c4 | [ea837dd0] [c0531e04] __driver_attach+0x88/0xb0 | ---[ end trace ... ]--- The problem is caused by emac_dt_phy_probe() returing success (0) for existing device-trees configurations that do not specify a "phy-handle" property. This caused the code to skip the existing phy probe and setup. Which led to essential phy related data-structures being uninitialized. This patch also removes the unused variable in emac_dt_phy_connect(). Fixes: a577ca6badb5261d ("net: emac: add support for device-tree based PHY discovery and setup") Reported-by: Julian Margetson Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 50ad480e4d64fde941fcac39db1ab29a83d86703 Author: Philippe Reynes Date: Sun Mar 5 23:46:00 2017 +0100 net: toshiba: spider_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/spider_net_ethtool.c | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit f441df6b9ff41e1af7289b69d5ce379053f900a5 Author: Philippe Reynes Date: Sun Mar 5 23:21:06 2017 +0100 net: toshiba: ps3_genic_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Geoff Levand Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_net.c | 51 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 22 deletions(-) commit 8103015df56d97cc3a4167d2e070ee14cc022bae Author: Philippe Reynes Date: Sun Mar 5 22:25:39 2017 +0100 net: sun: sunhme: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunhme.c | 62 +++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 28 deletions(-) commit 9dff2defef3ce1933a44d59ec139987e19645841 Author: Philippe Reynes Date: Sun Mar 5 00:04:18 2017 +0100 net: sun: sungem: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/sungem.c | 98 +++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 41 deletions(-) commit 56c07e9501e875883584c00fe6977c3addb1f873 Author: Philippe Reynes Date: Sat Mar 4 17:50:06 2017 +0100 net: sun: niu: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 15883a43af0bcd10b3f3173bca4a0e60518bc154 Author: Philippe Reynes Date: Sat Mar 4 16:16:12 2017 +0100 net: sun: cassini: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 98 ++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 46 deletions(-) commit 7b022a1b706f7684341e285e627a74a98e730301 Author: Philippe Reynes Date: Sat Mar 4 12:42:39 2017 +0100 net: smsc: smc91x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Robert Jarzmik Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 47 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 22 deletions(-) commit b78125e00fce0a858c7827dd47ce500320d6d0f7 Author: Philippe Reynes Date: Tue Feb 28 23:49:38 2017 +0100 net: smsc: smc911x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 51 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) commit 605df8d674ac65e044a0bf4998b28c2f350b7f9e Author: Cyril Bur Date: Tue Mar 7 11:39:31 2017 +1100 selftests/powerpc: Replace stxvx and lxvx with stxvd2x/lxvd2x On POWER8 (ISA 2.07) lxvx and stxvx are defined to be extended mnemonics of lxvd2x and stxvd2x. For POWER9 (ISA 3.0) the HW architects in their infinite wisdom made lxvx and stxvx instructions in their own right. POWER9 aware GCC will use the POWER9 instruction for lxvx and stxvx causing these selftests to fail on POWER8. Further compounding the issue, because of the way -mvsx works it will cause the power9 instructions to be used regardless of -mcpu=power8 to GCC or -mpower8 to AS. The safest way to address the problem for now is to not use the extended mnemonic. We don't care how the CPU loads the values from memory since the tests only performs register comparisons, so using stdvd2x/lxvd2x does not impact the test. Signed-off-by: Cyril Bur Acked-by: Balbir Singh Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/include/vsx_asm.h | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 78b4416aa249365dd3c1b64da4d3a232014320b0 Author: Madhavan Srinivasan Date: Mon Feb 20 19:29:03 2017 +0530 powerpc/perf: Handle sdar_mode for marked event in power9 MMCRA[SDAR_MODE] specifices how the SDAR should be updated in continous sampling mode. On P9 it must be set to 0b00 when MMCRA[63] is set. Fixes: c7c3f568beff2 ('powerpc/perf: macros for power9 format encoding') Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/isa207-common.c | 43 ++++++++++++++++++++++++++++++++------- arch/powerpc/perf/isa207-common.h | 1 + 2 files changed, 37 insertions(+), 7 deletions(-) commit f04d108029063a8a67528a88449c412aecf4d3d8 Author: Madhavan Srinivasan Date: Mon Feb 20 19:26:30 2017 +0530 powerpc/perf: Fix perf_get_data_addr() for power9 DD1 Power9 DD1 do not support PMU_HAS_SIER flag and sdsync in perf_get_data_addr() defaults to MMCRA_SDSYNC which is wrong. Since power9 MMCRA does not support SDSYNC bit, patch includes PPMU_NO_SIAR flag to the check and set the sdsync with MMCRA_SAMPLE_ENABLE; Fixes: 27593d72c4ad ("powerpc/perf: Use MSR to report privilege level on P9 DD1") Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 2 ++ 1 file changed, 2 insertions(+) commit 67b0503db9c29b04eadfeede6bebbfe5ddad94ef Author: Stefan Brüns Date: Sun Feb 12 13:02:13 2017 -0200 [media] dvb-usb-firmware: don't do DMA on stack The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") but the same applies for the reset value. Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") Cc: stable@vger.kernel.org Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit ea6200e84182989a3cce9687cf79a23ac44ec4db Merge: b4fb8f6 fc69910 Author: Linus Torvalds Date: Wed Mar 8 14:45:31 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull sched.h split-up fixes for MIPS from Ingo Molnar: "These are the fixes for MIPS build failures due to the sched.h split-up, from Arnd Bergmann" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MIPS: Add missing include files commit c085bd5119d5d0bdf3ef591a5563566be7dedced Author: Jim Qu Date: Wed Mar 1 15:53:29 2017 +0800 drm/amd/amdgpu: fix console deadlock if late init failed Signed-off-by: Jim Qu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b4fb8f66f1ae2e167d06c12d018025a8d4d3ba7e Author: Tony Luck Date: Wed Mar 8 09:35:39 2017 -0800 mm, page_alloc: Add missing check for memory holes Commit 13ad59df67f1 ("mm, page_alloc: avoid page_to_pfn() when merging buddies") moved the check for memory holes out of page_is_buddy() and had the callers do the check. But this wasn't done correctly in one place which caused ia64 to crash very early in boot. Update to fix that and make ia64 boot again. [ v2: Vlastimil pointed out we don't need to call page_to_pfn() since we already have the result of that in "buddy_pfn" ] Fixes: 13ad59df67f1 ("avoid page_to_pfn() when merging buddies") Cc: Mel Gorman Cc: Joonsoo Kim Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Johannes Weiner Cc: Andrew Morton Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8557b8e43a1de99b12b0d61384742e0d5d0adf84 Merge: 04bb94b f7c6401 Author: Linus Torvalds Date: Wed Mar 8 11:06:05 2017 -0800 Merge tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest fixes from Steven Rostedt: "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 locked up in an infinite loop while doing the make mrproper. Looking into the cause I noticed that a recent update to the function run_command (used for running all shell commands, including "make mrproper") changed the internal loop to use the function wait_for_input. The wait_for_input function uses select to look at two file descriptors. One is the file descriptor of the command it is running, the other is STDIN. The STDIN check was not checking the return status of the sysread call, and was also just writing a lot of data into syswrite without regard to the size of the data read. Changing the code to check the return status of sysread, and also to still process the passed in descriptor data without looping back to the select fixed Greg's problem. While looking at this code I also realized that the loop did not honor the timeout if STDIN always had input (or for some reason return error). this could prevent wait_for_input to timeout on the file descriptor it is suppose to be waiting for. That is fixed too" * tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Make sure wait_for_input does honor the timeout ktest: Fix while loop in wait_for_input commit 04bb94b13c02e9dbc92d622cddf88937127bd7ed Author: Linus Torvalds Date: Wed Mar 8 10:42:13 2017 -0800 overlayfs: remove now unnecessary header file include This removes the extra include header file that was added in commit e58bc927835a "Pull overlayfs updates from Miklos Szeredi" now that it is no longer needed. There are probably other such includes that got added during the scheduler header splitup series, but this is the one that annoyed me personally and I know about. Signed-off-by: Linus Torvalds fs/overlayfs/util.c | 1 - 1 file changed, 1 deletion(-) commit 2fcc319d2467a5f5b78f35f79fd6e22741a31b1e Author: Christoph Hellwig Date: Wed Mar 8 10:38:53 2017 -0800 xfs: try any AG when allocating the first btree block when reflinking When a reflink operation causes the bmap code to allocate a btree block we're currently doing single-AG allocations due to having ->firstblock set and then try any higher AG due a little reflink quirk we've put in when adding the reflink code. But given that we do not have a minleft reservation of any kind in this AG we can still not have any space in the same or higher AG even if the file system has enough free space. To fix this use a XFS_ALLOCTYPE_FIRST_AG allocation in this fall back path instead. [And yes, we need to redo this properly instead of piling hacks over hacks. I'm working on that, but it's not going to be a small series. In the meantime this fixes the customer reported issue] Also add a warning for failing allocations to make it easier to debug. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 10 +++++++--- fs/xfs/libxfs/xfs_bmap_btree.c | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) commit bd0f9b356d00aa241ced36fb075a07041c28d3b8 Author: Linus Torvalds Date: Tue Mar 7 15:33:14 2017 -0800 sched/headers: fix up header file dependency on The scheduler header file split and cleanups ended up exposing a few nasty header file dependencies, and in particular it showed how we in ended up depending on "signal_pending()", which now comes from . That's a very subtle and annoying dependency, which already caused a semantic merge conflict (see commit e58bc927835a "Pull overlayfs updates from Miklos Szeredi", which added that fixup in the merge commit). It turns out that we can avoid this dependency _and_ improve code generation by moving the guts of the fairly nasty helper #define __wait_event_interruptible_locked() to out-of-line code. The code that includes the signal_pending() check is all in the slow-path where we actually go to sleep waiting for the event anyway, so using a helper function is the right thing to do. Using a helper function is also what we already did for the non-locked versions, see the "__wait_event*()" macros and the "prepare_to_wait*()" set of helper functions. We might want to try to unify all these macro games, we have a _lot_ of subtly different wait-event loops. But this is the minimal patch to fix the annoying header dependency. Acked-by: Ingo Molnar Signed-off-by: Linus Torvalds include/linux/wait.h | 31 ++++++++++--------------------- kernel/sched/wait.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 21 deletions(-) commit f65e6fad293b3a5793b7fa2044800506490e7a2e Author: Brian Foster Date: Wed Mar 8 09:58:08 2017 -0800 xfs: use iomap new flag for newly allocated delalloc blocks Commit fa7f138 ("xfs: clear delalloc and cache on buffered write failure") fixed one regression in the iomap error handling code and exposed another. The fundamental problem is that if a buffered write is a rewrite of preexisting delalloc blocks and the write fails, the failure handling code can punch out preexisting blocks with valid file data. This was reproduced directly by sub-block writes in the LTP kernel/syscalls/write/write03 test. A first 100 byte write allocates a single block in a file. A subsequent 100 byte write fails and punches out the block, including the data successfully written by the previous write. To address this problem, update the ->iomap_begin() handler to distinguish newly allocated delalloc blocks from preexisting delalloc blocks via the IOMAP_F_NEW flag. Use this flag in the ->iomap_end() handler to decide when a failed or short write should punch out delalloc blocks. This introduces the subtle requirement that ->iomap_begin() should never combine newly allocated delalloc blocks with existing blocks in the resulting iomap descriptor. This can occur when a new delalloc reservation merges with a neighboring extent that is part of the current write, for example. Therefore, drop the post-allocation extent lookup from xfs_bmapi_reserve_delalloc() and just return the record inserted into the fork. This ensures only new blocks are returned and thus that preexisting delalloc blocks are always handled as "found" blocks and not punched out on a failed rewrite. Reported-by: Xiong Zhou Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 24 ++++++++++++++---------- fs/xfs/xfs_iomap.c | 25 ++++++++++++++++++------- 2 files changed, 32 insertions(+), 17 deletions(-) commit 672a2c87c83649fb0167202342ce85af9a3b4f1c Author: Jan Kara Date: Wed Mar 8 14:56:05 2017 +0100 axonram: Fix gendisk handling It is invalid to call del_gendisk() when disk->queue is NULL. Fix error handling in axon_ram_probe() to avoid doing that. Also del_gendisk() does not drop a reference to gendisk allocated by alloc_disk(). That has to be done by put_disk(). Add that call where needed. Reported-by: Dan Carpenter Signed-off-by: Jan Kara Signed-off-by: Jens Axboe arch/powerpc/sysdev/axonram.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 79bd99596b7305ab08109a8bf44a6a4511dbf1cd Author: NeilBrown Date: Wed Mar 8 07:38:05 2017 +1100 blk: improve order of bio handling in generic_make_request() To avoid recursion on the kernel stack when stacked block devices are in use, generic_make_request() will, when called recursively, queue new requests for later handling. They will be handled when the make_request_fn for the current bio completes. If any bios are submitted by a make_request_fn, these will ultimately be handled seqeuntially. If the handling of one of those generates further requests, they will be added to the end of the queue. This strict first-in-first-out behaviour can lead to deadlocks in various ways, normally because a request might need to wait for a previous request to the same device to complete. This can happen when they share a mempool, and can happen due to interdependencies particular to the device. Both md and dm have examples where this happens. These deadlocks can be erradicated by more selective ordering of bios. Specifically by handling them in depth-first order. That is: when the handling of one bio generates one or more further bios, they are handled immediately after the parent, before any siblings of the parent. That way, when generic_make_request() calls make_request_fn for some particular device, we can be certain that all previously submited requests for that device have been completely handled and are not waiting for anything in the queue of requests maintained in generic_make_request(). An easy way to achieve this would be to use a last-in-first-out stack instead of a queue. However this will change the order of consecutive bios submitted by a make_request_fn, which could have unexpected consequences. Instead we take a slightly more complex approach. A fresh queue is created for each call to a make_request_fn. After it completes, any bios for a different device are placed on the front of the main queue, followed by any bios for the same device, followed by all bios that were already on the queue before the make_request_fn was called. This provides the depth-first approach without reordering bios on the same level. This, by itself, it not enough to remove all deadlocks. It just makes it possible for drivers to take the extra step required themselves. To avoid deadlocks, drivers must never risk waiting for a request after submitting one to generic_make_request. This includes never allocing from a mempool twice in the one call to a make_request_fn. A common pattern in drivers is to call bio_split() in a loop, handling the first part and then looping around to possibly split the next part. Instead, a driver that finds it needs to split a bio should queue (with generic_make_request) the second part, handle the first part, and then return. The new code in generic_make_request will ensure the requests to underlying bios are processed first, then the second bio that was split off. If it splits again, the same process happens. In each case one bio will be completely handled before the next one is attempted. With this is place, it should be possible to disable the punt_bios_to_recover() recovery thread for many block devices, and eventually it may be possible to remove it completely. Ref: http://www.spinics.net/lists/raid/msg54680.html Tested-by: Jinpu Wang Inspired-by: Lars Ellenberg Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/blk-core.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit c01228db4ba965986511a5b28c478bddd7e2726e Author: Jan Kara Date: Wed Mar 8 17:48:34 2017 +0100 Revert "scsi, block: fix duplicate bdi name registration crashes" This reverts commit 0dba1314d4f81115dce711292ec7981d17231064. It causes leaking of device numbers for SCSI when SCSI registers multiple gendisks for one request_queue in succession. It can be easily reproduced using Omar's script [1] on kernel with CONFIG_DEBUG_TEST_DRIVER_REMOVE. Furthermore the protection provided by this commit is not needed anymore as the problem it was fixing got also fixed by commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()". [1]: http://marc.info/?l=linux-block&m=148554717109098&w=2 Signed-off-by: Jan Kara Acked-by: Dan Williams Tested-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 2 -- block/genhd.c | 21 --------------------- drivers/scsi/sd.c | 41 ++++++++--------------------------------- include/linux/blkdev.h | 1 - include/linux/genhd.h | 8 -------- 5 files changed, 8 insertions(+), 65 deletions(-) commit 90f16fddcc2802726142b8386c65ccb89f044613 Author: Jan Kara Date: Wed Mar 8 17:48:33 2017 +0100 block: Make del_gendisk() safer for disks without queues Commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" added disk->queue dereference to del_gendisk(). Although del_gendisk() is not supposed to be called without disk->queue valid and blk_unregister_queue() warns in that case, this change will make it oops instead. Return to the old more robust behavior of just warning when del_gendisk() gets called for gendisk with disk->queue being NULL. Reported-by: Dan Carpenter Signed-off-by: Jan Kara Tested-by: Omar Sandoval Signed-off-by: Jens Axboe block/genhd.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit df23de55615fa7a190a85f49a950ccecdd9102f3 Author: Jan Kara Date: Wed Mar 8 17:48:32 2017 +0100 bdi: Fix use-after-free in wb_congested_put() bdi_writeback_congested structures get created for each blkcg and bdi regardless whether bdi is registered or not. When they are created in unregistered bdi and the request queue (and thus bdi) is then destroyed while blkg still holds reference to bdi_writeback_congested structure, this structure will be referencing freed bdi and last wb_congested_put() will try to remove the structure from already freed bdi. With commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()", SCSI started to destroy bdis without calling bdi_unregister() first (previously it was calling bdi_unregister() even for unregistered bdis) and thus the code detaching bdi_writeback_congested in cgwb_bdi_destroy() was not triggered and we started hitting this use-after-free bug. It is enough to boot a KVM instance with virtio-scsi device to trigger this behavior. Fix the problem by detaching bdi_writeback_congested structures in bdi_exit() instead of bdi_unregister(). This is also more logical as they can get attached to bdi regardless whether it ever got registered or not. Fixes: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820 Signed-off-by: Jan Kara Tested-by: Omar Sandoval Signed-off-by: Jens Axboe mm/backing-dev.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit b6f8fec4448aa52a8c36a392aa1ca2ea99acd460 Author: Jan Kara Date: Wed Mar 8 17:48:31 2017 +0100 block: Allow bdi re-registration SCSI can call device_add_disk() several times for one request queue when a device in unbound and bound, creating new gendisk each time. This will lead to bdi being repeatedly registered and unregistered. This was not a big problem until commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" since bdi was only registered repeatedly (bdi_register() handles repeated calls fine, only we ended up leaking reference to gendisk due to overwriting bdi->owner) but unregistered only in blk_cleanup_queue() which didn't get called repeatedly. After 165a5e22fafb we were doing correct bdi_register() - bdi_unregister() cycles however bdi_unregister() is not prepared for it. So make sure bdi_unregister() cleans up bdi in such a way that it is prepared for a possible following bdi_register() call. An easy way to provoke this behavior is to enable CONFIG_DEBUG_TEST_DRIVER_REMOVE and use scsi_debug driver to create a scsi disk which immediately hangs without this fix. Fixes: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820 Signed-off-by: Jan Kara Tested-by: Omar Sandoval Signed-off-by: Jens Axboe mm/backing-dev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 568af6de058cb2b0c5b98d98ffcf37cdc6bc38a7 Author: Pablo Neira Ayuso Date: Sat Mar 4 19:53:47 2017 +0100 netfilter: nf_tables: set pktinfo->thoff at AH header if found Phil Sutter reports that IPv6 AH header matching is broken. From userspace, nft generates bytecode that expects to find the AH header at NFT_PAYLOAD_TRANSPORT_HEADER both for IPv4 and IPv6. However, pktinfo->thoff is set to the inner header after the AH header in IPv6, while in IPv4 pktinfo->thoff points to the AH header indeed. This behaviour is inconsistent. This patch fixes this problem by updating ipv6_find_hdr() to get the IP6_FH_F_AUTH flag so this function stops at the AH header, so both IPv4 and IPv6 pktinfo->thoff point to the AH header. This is also inconsistent when trying to match encapsulated headers: 1) A packet that looks like IPv4 + AH + TCP dport 22 will *not* match. 2) A packet that looks like IPv6 + AH + TCP dport 22 will match. Reported-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_ipv6.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ab809fd81fde3d416f8656d8f814a0777fb9b65e Author: Zhangfei Gao Date: Tue Dec 27 22:22:40 2016 +0800 i2c: designware: add reset interface Some platforms like hi3660 need do reset first to allow accessing registers Signed-off-by: Zhangfei Gao Reviewed-by: Andy Shevchenko Tested-by: Ramiro Oliveira Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 1 + drivers/i2c/busses/i2c-designware-platdrv.c | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) commit 3b0277f198ac928f323c42e180680d2f79aa980d Author: Heiner Kallweit Date: Tue Mar 7 21:06:38 2017 +0100 i2c: meson: fix wrong variable usage in meson_i2c_put_data Most likely a copy & paste error. Signed-off-by: Heiner Kallweit Acked-by: Jerome Brunet Signed-off-by: Wolfram Sang Fixes: 30021e3707a7 ("i2c: add support for Amlogic Meson I2C controller") drivers/i2c/busses/i2c-meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0c1e95ab44feaad8831f2c06a3473c974003b49 Author: Dmitry Torokhov Date: Tue Feb 28 11:10:51 2017 -0800 i2c: copy device properties when using i2c_register_board_info() This will allow marking device property lists as __initdata, the same as board info structures themselves. Signed-off-by: Dmitry Torokhov Signed-off-by: Wolfram Sang drivers/i2c/i2c-boardinfo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8e05ba7f848475bdc3aa546cf88418f7e51a6671 Author: Ying Xue Date: Sat Mar 4 18:00:02 2017 +0800 netfilter: nf_nat_sctp: fix ICMP packet to be dropped accidently Regarding RFC 792, the first 64 bits of the original SCTP datagram's data could be contained in ICMP packet, such as: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | unused | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Internet Header + 64 bits of Original Data Datagram | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ However, according to RFC 4960, SCTP datagram header is as below: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port Number | Destination Port Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Verification Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ It means only the first three fields of SCTP header can be carried in ICMP packet except for Checksum field. At present in sctp_manip_pkt(), no matter whether the packet is ICMP or not, it always calculates SCTP packet checksum. However, not only the calculation of checksum is unnecessary for ICMP, but also it causes another fatal issue that ICMP packet is dropped. The header size of SCTP is used to identify whether the writeable length of skb is bigger than skb->len through skb_make_writable() in sctp_manip_pkt(). But when it deals with ICMP packet, skb_make_writable() directly returns false as the writeable length of skb is bigger than skb->len. Subsequently ICMP is dropped. Now we correct this misbahavior. When sctp_manip_pkt() handles ICMP packet, 8 bytes rather than the whole SCTP header size is used to check if writeable length of skb is overflowed. Meanwhile, as it's meaningless to calculate checksum when packet is ICMP, the computation of checksum is ignored as well. Signed-off-by: Ying Xue Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_proto_sctp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 1945250d979203ed326b5a44fd705b6b2c46eec5 Author: Wolfram Sang Date: Mon Feb 27 20:25:05 2017 +0100 i2c: m65xx: drop superfluous quirk structure All length fields in Linux I2C are u16, so a HW length limitation of 16 bit lengths is not a limitation. Remove the quirk structure. Tested-by: Jun Gao Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt65xx.c | 9 --------- 1 file changed, 9 deletions(-) commit 7b4fdf77a450ec0fdcb2f677b080ddbf2c186544 Author: Florian Westphal Date: Fri Mar 3 21:44:00 2017 +0100 netfilter: don't track fragmented packets Andrey reports syzkaller splat caused by NF_CT_ASSERT(!ip_is_fragment(ip_hdr(skb))); in ipv4 nat. But this assertion (and the comment) are wrong, this function does see fragments when IP_NODEFRAG setsockopt is used. As conntrack doesn't track packets without complete l4 header, only the first fragment is tracked. Because applying nat to first packet but not the rest makes no sense this also turns off tracking of all fragments. Reported-by: Andrey Konovalov Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 4 ++++ net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) commit 2de3ec4f1d4ba6ee380478055104eb918bd50cce Author: Jaedon Shin Date: Fri Mar 3 10:55:03 2017 +0900 i2c: brcmstb: Fix START and STOP conditions The BSC data buffers to send and receive data are each of size 32 bytes or 8 bytes 'xfersz' depending on SoC. The problem observed for all the combined message transfer was if length of data transfer was a multiple of 'xfersz' a repeated START was being transmitted by BSC driver. Fixed this by appropriately setting START/STOP conditions for such transfers. Fixes: dd1aa2524bc5 ("i2c: brcmstb: Add Broadcom settop SoC i2c controller driver") Signed-off-by: Jaedon Shin Acked-by: Kamal Dasu Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-brcmstb.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 02dbfa5e5583523035f05636c614a0eca77f1aab Author: Qi Hou Date: Fri Mar 3 15:57:11 2017 +0800 i2c: add missing of_node_put in i2c_mux_del_adapters Refcount of of_node is increased with of_node_get() in i2c_mux_add_adapter(). It must be decreased with of_node_put() in i2c_mux_del_adapters(). Signe-off-by: Qi Hou Reviewed-by: Zhang Xiao Acked-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/i2c-mux.c | 2 ++ 1 file changed, 2 insertions(+) commit b0bfdfc2bf7fa85317824c6a389fc373dfcef5bc Author: Jon Derrick Date: Mon Mar 6 08:41:04 2017 -0700 block/sed: Fix opal user range check and unused variables Fixes check that the opal user is within the range, and cleans up unused method variables. Signed-off-by: Jon Derrick Reviewed-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 0bc315381fe9ed9fb91db8b0e82171b645ac008f Author: Johannes Thumshirn Date: Mon Mar 6 11:23:35 2017 +0100 zram: set physical queue limits to avoid array out of bounds accesses zram can handle at most SECTORS_PER_PAGE sectors in a bio's bvec. When using the NVMe over Fabrics loopback target which potentially sends a huge bulk of pages attached to the bio's bvec this results in a kernel panic because of array out of bounds accesses in zram_decompress_page(). Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Sergey Senozhatsky Signed-off-by: Jens Axboe drivers/block/zram/zram_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 01388df37627d2e89f0b835377c0eb39d81f671c Author: Ming Lei Date: Wed Feb 22 18:14:02 2017 +0800 blk-mq: free hctx->cpumask in release handler of hctx's kobject It is obviously that hctx->cpumask is per hctx, and both share same lifetime, so this patch moves freeing of hctx->cpumask into release handler of hctx's kobject. Signed-off-by: Ming Lei Tested-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 1 + block/blk-mq.c | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) commit 6c8b232efea1ad3d263ff8b9c16b7e8767a77488 Author: Ming Lei Date: Wed Feb 22 18:14:01 2017 +0800 blk-mq: make lifetime consistent between hctx and its kobject This patch removes kobject_put() over hctx in __blk_mq_unregister_dev(), and trys to keep lifetime consistent between hctx and hctx's kobject. Now blk_mq_sysfs_register() and blk_mq_sysfs_unregister() become totally symmetrical, and kobject's refcounter drops to zero just when the hctx is freed. Signed-off-by: Ming Lei Tested-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 15 ++++++++++----- block/blk-mq.c | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) commit 7ea5fe31c12dd8bcf4a9c5a4a7e8e23826a9a3b8 Author: Ming Lei Date: Wed Feb 22 18:14:00 2017 +0800 blk-mq: make lifetime consitent between q/ctx and its kobject Currently from kobject view, both q->mq_kobj and ctx->kobj can be released during one cycle of blk_mq_register_dev() and blk_mq_unregister_dev(). Actually, sw queue's lifetime is same with its request queue's, which is covered by request_queue->kobj. So we don't need to call kobject_put() for the two kinds of kobject in __blk_mq_unregister_dev(), instead we do that in release handler of request queue. Signed-off-by: Ming Lei Tested-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 20 +++++++++++++------- block/blk-mq.c | 7 ++++++- block/blk-mq.h | 1 + 3 files changed, 20 insertions(+), 8 deletions(-) commit 737f98cfe7de8df7433a4d846850aa8efa44bd48 Author: Ming Lei Date: Wed Feb 22 18:13:59 2017 +0800 blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue() Both q->mq_kobj and sw queues' kobjects should have been initialized once, instead of doing that each add_disk context. Also this patch removes clearing of ctx in blk_mq_init_cpu_queues() because percpu allocator fills zero to allocated variable. This patch fixes one issue[1] reported from Omar. [1] kernel wearning when doing unbind/bind on one scsi-mq device [ 19.347924] kobject (ffff8800791ea0b8): tried to init an initialized object, something is seriously wrong. [ 19.349781] CPU: 1 PID: 84 Comm: kworker/u8:1 Not tainted 4.10.0-rc7-00210-g53f39eeaa263 #34 [ 19.350686] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-20161122_114906-anatol 04/01/2014 [ 19.350920] Workqueue: events_unbound async_run_entry_fn [ 19.350920] Call Trace: [ 19.350920] dump_stack+0x63/0x83 [ 19.350920] kobject_init+0x77/0x90 [ 19.350920] blk_mq_register_dev+0x40/0x130 [ 19.350920] blk_register_queue+0xb6/0x190 [ 19.350920] device_add_disk+0x1ec/0x4b0 [ 19.350920] sd_probe_async+0x10d/0x1c0 [sd_mod] [ 19.350920] async_run_entry_fn+0x48/0x150 [ 19.350920] process_one_work+0x1d0/0x480 [ 19.350920] worker_thread+0x48/0x4e0 [ 19.350920] kthread+0x101/0x140 [ 19.350920] ? process_one_work+0x480/0x480 [ 19.350920] ? kthread_create_on_node+0x60/0x60 [ 19.350920] ret_from_fork+0x2c/0x40 Cc: Omar Sandoval Signed-off-by: Ming Lei Tested-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 4 +--- block/blk-mq.c | 4 +++- block/blk-mq.h | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) commit 2501c1bb054290679baad0ff7f4f07c714251f4c Author: Chris Brandt Date: Mon Mar 6 15:20:51 2017 -0500 i2c: riic: fix restart condition While modifying the driver to use the STOP interrupt, the completion of the intermediate transfers need to wake the driver back up in order to initiate the next transfer (restart condition). Otherwise you get never ending interrupts and only the first transfer sent. Fixes: 71ccea095ea1 ("i2c: riic: correctly finish transfers") Reported-by: Simon Horman Signed-off-by: Chris Brandt Tested-by: Simon Horman Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f7c6401ff84ab8ffffc281a29aa0a787f7eb346e Author: Steven Rostedt (VMware) Date: Wed Mar 8 10:36:59 2017 -0500 ktest: Make sure wait_for_input does honor the timeout The function wait_for_input takes in a timeout, and even has a default timeout. But if for some reason the STDIN descriptor keeps sending in data, the function will never time out. The timout is to wait for the data from the passed in file descriptor, not for STDIN. Adding a test in the case where there's no data from the passed in file descriptor that checks to see if the timeout passed, will ensure that it will timeout properly even if there's input in STDIN. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 99c014a87979c9244806685f3c3fc7767f79f645 Author: Steven Rostedt (VMware) Date: Wed Mar 8 10:16:17 2017 -0500 ktest: Fix while loop in wait_for_input The run_command function was changed to use the wait_for_input function to allow having a timeout if the command to run takes too much time. There was a bug in the wait_for_input where it could end up going into an infinite loop. There's two issues here. One is that the return value of the sysread wasn't used for the write (to write a proper size), and that it should continue processing the passed in file descriptor too even if there was input. There was no check for error, if for some reason STDIN returned an error, the function would go into an infinite loop and never exit. Reported-by: Greg Kroah-Hartman Tested-by: Greg Kroah-Hartman Fixes: 6e98d1b4415f ("ktest: Add timeout to ssh command") Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8c76d7cd520ebffc1ea9ea0850d87a224a50c7f2 Author: Johan Hovold Date: Mon Mar 6 17:36:41 2017 +0100 USB: serial: safe_serial: fix information leak in completion handler Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that could be triggered by a malicious device. This avoids leaking up to 56 bytes from after the URB transfer buffer to user space. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/safe_serial.c | 5 +++++ 1 file changed, 5 insertions(+) commit 654b404f2a222f918af9b0cd18ad469d0c941a8e Author: Johan Hovold Date: Mon Mar 6 17:36:40 2017 +0100 USB: serial: io_ti: fix information leak in completion handler Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that can be triggered by a malicious device. This avoids leaking 128 kB of memory content from after the URB transfer buffer to user space. Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # 2.6.30 Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 367ec1706745912702c187722065285cd4d2aee7 Author: Johan Hovold Date: Mon Mar 6 17:36:39 2017 +0100 USB: serial: omninet: drop open callback Remove the now redundant open callback and let core call the generic handler for us instead. Signed-off-by: Johan Hovold drivers/usb/serial/omninet.c | 7 ------- 1 file changed, 7 deletions(-) commit 30572418b445d85fcfe6c8fe84c947d2606767d8 Author: Johan Hovold Date: Mon Mar 6 17:36:38 2017 +0100 USB: serial: omninet: fix reference leaks at open This driver needlessly took another reference to the tty on open, a reference which was then never released on close. This lead to not just a leak of the tty, but also a driver reference leak that prevented the driver from being unloaded after a port had once been opened. Fixes: 4a90f09b20f4 ("tty: usb-serial krefs") Cc: stable # 2.6.28 Signed-off-by: Johan Hovold drivers/usb/serial/omninet.c | 6 ------ 1 file changed, 6 deletions(-) commit 0b1d250afb8eb9d65afb568bac9b9f9253a82b49 Author: Johan Hovold Date: Mon Mar 6 17:36:37 2017 +0100 USB: serial: io_ti: fix NULL-deref in interrupt callback Fix a NULL-pointer dereference in the interrupt callback should a malicious device send data containing a bad port number by adding the missing sanity check. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 09b50c3703cc354100fe36202ef5e52ee128b904 Author: Bard Liao Date: Wed Mar 8 19:05:32 2017 +0800 ASoC: rt5665: CLKDET is also a power of ASRC We need to power on CLKDET to use ASRC function. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 3 +++ 1 file changed, 3 insertions(+) commit 8f365313beb20742b68cb29a7d1ca6b27c036d81 Author: Bard Liao Date: Wed Mar 8 19:05:31 2017 +0800 ASoC: rt5665: Vref3 is necessary for Mono Amp Vref3 is necessary for Mono Amp. So add it to dapm routes Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 1 + 1 file changed, 1 insertion(+) commit 593dd5d9fb66c0345cef5fc8caf4199bb6d4e093 Author: Bard Liao Date: Wed Mar 8 19:05:29 2017 +0800 ASoC: rt5665: increase LDO level Too low LDO level will cause a few functions unstable. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1994a9c0930de4b2244816e62120cad08283cdc Author: Bard Liao Date: Wed Mar 8 19:03:10 2017 +0800 ASoC: rt5665: fix getting wrong work handler container We got rt5665 private data from wrong work. It will result in kernel panic. Signed-off-by: Bard Liao Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/rt5665.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35b2719e72d375f3e32c819858165668d948d5f2 Author: Felipe Balbi Date: Wed Mar 8 13:56:37 2017 +0200 usb: dwc3: gadget: make to increment req->remaining in all cases Sometimes, we might get a completion for a TRB which is left with HWO bit. Even in these cases, we should increment req->remaining to properly report total transferred size. I noticed this while debuggin a separate problem seen with MSC tests from USBCV. Sometimes we would erroneously report a completion for a 512-byte transfer when, in reality, we transferred 0 bytes. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12aff99723901bcc0e2a6a34343a4f62c371fdd9 Author: Fabio Estevam Date: Tue Feb 7 17:14:14 2017 -0200 ARM: dts: imx6sx-udoo-neo: Fix reboot hang After issuing a 'reboot' command the imx6sx-udoo-neo board does not reboot as expected and it just hangs instead. In mainline kernel only LDO enabled mode is supported. Do not provide arm-supply/soc-supply nodes in the device tree, so that the board operates in LDO enabled mode and can then successfully reboot via watchdog. Fixes: 76e691fc7653b85d39 ("ARM: dts: imx6sx: Add UDOO Neo support") Signed-off-by: Fabio Estevam Tested-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit 9cb74b5e134c9f133001dd1585deef5353cd85f1 Author: James Hogan Date: Sat Mar 4 00:41:25 2017 +0000 MIPS: Wire up statx system call Wire up the statx system call for MIPS, which was introduced in commit a528d35e8bfc ("statx: Add a system call to make enhanced file info available"). Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15387/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------ arch/mips/kernel/scall32-o32.S | 1 + arch/mips/kernel/scall64-64.S | 1 + arch/mips/kernel/scall64-n32.S | 1 + arch/mips/kernel/scall64-o32.S | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) commit 0c7e2bc87ea6c2eb6f369998f74a0278e64863e4 Author: James Hogan Date: Sat Mar 4 00:32:03 2017 +0000 MIPS: Include asm/ptrace.h now linux/sched.h doesn't Use of the task_pt_regs() based macros in MIPS' asm/processor.h for accessing the user context on the kernel stack need the definition of struct pt_regs from asm/ptrace.h. __own_fpu() in asm/fpu.h uses these macros but implicitly depended on linux/sched.h to include asm/ptrace.h. Since commit f780d89a0e82 ("sched/headers: Remove from ") however linux/sched.h no longer includes asm/ptrace.h, so include it explicitly from asm/fpu.h where it is needed instead. This fixes build errors such as: ./arch/mips/include/asm/fpu.h: In function '__own_fpu': ./arch/mips/include/asm/processor.h:385:31: error: invalid application of 'sizeof' to incomplete type 'struct pt_regs' THREAD_SIZE - 32 - sizeof(struct pt_regs)) ^ Fixes: f780d89a0e82 ("sched/headers: Remove from ") Signed-off-by: James Hogan Acked-by: Ingo Molnar Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15386/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu.h | 1 + 1 file changed, 1 insertion(+) commit 7c5a3d813050ee235817b0220dd8c42359a9efd8 Author: John Crispin Date: Sat Feb 25 11:54:23 2017 +0100 MIPS: ralink: Fix typos in rt3883 pinctrl There are two copy & paste errors in the definition of the 5GHz LNA and second ethernet pinmux. Fixes: f576fb6a0700 ("MIPS: ralink: cleanup the soc specific pinmux data") Signed-off-by: John Crispin Signed-off-by: Daniel Golle Cc: linux-mips@linux-mips.org Cc: # 3.19.x- Patchwork: https://patchwork.linux-mips.org/patch/15328/ Signed-off-by: James Hogan arch/mips/ralink/rt3883.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70647f9163aa4fc7090b0d6795d026ebe3897928 Merge: 77e14ae 627c845 Author: Jani Nikula Date: Wed Mar 8 12:21:40 2017 +0200 Merge tag 'gvt-fixes-2017-03-08' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-03-08 - MMIO cmd access flag cleanup - Virtual display fixes from Weinan and Bing - config space reset fix from Changbin - better workload submission error path fix from Chuanxiao - other misc fixes Signed-off-by: Jani Nikula commit 4b5347a24a0f2d3272032c120664b484478455de Author: Paul Burton Date: Thu Feb 23 14:50:24 2017 +0000 MIPS: End spinlocks with .insn When building for microMIPS we need to ensure that the assembler always knows that there is code at the target of a branch or jump. Recent toolchains will fail to link a microMIPS kernel when this isn't the case due to what it thinks is a branch to non-microMIPS code. mips-mti-linux-gnu-ld kernel/built-in.o: .spinlock.text+0x2fc: Unsupported branch between ISA modes. mips-mti-linux-gnu-ld final link failed: Bad value This is due to inline assembly labels in spinlock.h not being followed by an instruction mnemonic, either due to a .subsection pseudo-op or the end of the inline asm block. Fix this with a .insn direction after such labels. Signed-off-by: Paul Burton Signed-off-by: James Hogan Reviewed-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: Peter Zijlstra Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Patchwork: https://patchwork.linux-mips.org/patch/15325/ Signed-off-by: James Hogan arch/mips/include/asm/spinlock.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2e6c7747730296a6d4fd700894286db1132598c4 Author: James Hogan Date: Thu Feb 16 12:39:01 2017 +0000 MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels When a 32-bit kernel is configured to support MIPS64r6 (CPU_MIPS64_R6), MIPS_O32_FP64_SUPPORT won't be selected as it should be because MIPS32_O32 is disabled (o32 is already the default ABI available on 32-bit kernels). This results in userland FP breakage as CP0_Status.FR is read-only 1 since r6 (when an FPU is present) so __enable_fpu() will fail to clear FR. This causes the FPU emulator to get used which will incorrectly emulate 32-bit FPU registers. Force o32 fp64 support in this case by also selecting MIPS_O32_FP64_SUPPORT from CPU_MIPS64_R6 if 32BIT. Fixes: 4e9d324d4288 ("MIPS: Require O32 FP64 support for MIPS64 with O32 compat") Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.0.x- Patchwork: https://patchwork.linux-mips.org/patch/15310/ Signed-off-by: James Hogan arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77e14ae6d785b436be4961b5f5dff80490e35227 Merge: c1ae3cf d1a513b Author: Jani Nikula Date: Wed Mar 8 11:42:23 2017 +0200 Merge tag 'gvt-next-2017-02-24' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-next-2017-02-24 - Min's vGPU failsafe to guard against non-secured guest - Some guest warning fix and host error message cleanup - Fixed vGPU type refinement for usability issue - environ string fix from Takashi Iwai - one kernel oops fix from Chuanxiao - other misc fixes Signed-off-by: Jani Nikula commit fc69910f329d61821897871e0e957eda39beb3d8 Author: Arnd Bergmann Date: Wed Mar 8 08:29:31 2017 +0100 MIPS: Add missing include files After the split of linux/sched.h, several platforms in arch/mips stopped building. Add the respective additional #include statements to fix the problem I first tried adding these into asm/processor.h, but ran into circular header dependencies with that which I could not figure out. The commit I listed as causing the problem is the branch merge, as there is likely a combination of multiple patches in that branch. Signed-off-by: Arnd Bergmann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: ralf@linux-mips.org Fixes: 1827adb11ad2 ("Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") Link: http://lkml.kernel.org/r/20170308072931.3836696-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/mips/cavium-octeon/cpu.c | 2 ++ arch/mips/cavium-octeon/crypto/octeon-crypto.c | 1 + arch/mips/cavium-octeon/smp.c | 1 + arch/mips/include/asm/fpu.h | 1 + arch/mips/kernel/smp-bmips.c | 1 + arch/mips/kernel/smp-mt.c | 1 + arch/mips/loongson64/loongson-3/cop2-ex.c | 1 + arch/mips/netlogic/common/smp.c | 1 + arch/mips/netlogic/xlp/cop2-ex.c | 3 +++ arch/mips/sgi-ip22/ip28-berr.c | 1 + arch/mips/sgi-ip27/ip27-berr.c | 2 ++ arch/mips/sgi-ip27/ip27-smp.c | 3 +++ arch/mips/sgi-ip32/ip32-berr.c | 1 + arch/mips/sgi-ip32/ip32-reset.c | 1 + 14 files changed, 20 insertions(+) commit 69eb1596b4df8ca834ba6f9a3df40f78943f6dca Author: Arnd Bergmann Date: Fri Feb 17 15:32:23 2017 +0100 staging: octeon: remove unused variable A cleanup patch left one local variable without a reference: drivers/staging/octeon/ethernet-rx.c:339:28: warning: unused variable 'priv' [-Wunused-variable] This removes the declaration too. Fixes: 66812da3a689 ("staging: octeon: Use net_device_stats from struct net_device") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 1 - 1 file changed, 1 deletion(-) commit 13603685c1f12c67a7a2427f00b63f39a2b6f7c9 Author: Max Lohrmann Date: Tue Mar 7 22:09:56 2017 -0800 target: Fix VERIFY_16 handling in sbc_parse_cdb As reported by Max, the Windows 2008 R2 chkdsk utility expects VERIFY_16 to be supported, and does not handle the returned CHECK_CONDITION properly, resulting in an infinite loop. The kernel will log huge amounts of this error: kernel: TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x8f, sending CHECK_CONDITION. Signed-off-by: Max Lohrmann Cc: Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a04e54f2c35823ca32d56afcd5cea5b783e2f51a Author: Nicholas Bellinger Date: Thu Nov 3 23:06:53 2016 -0700 target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export The following fixes a divide by zero OOPs with TYPE_TAPE due to pscsi_tape_read_blocksize() failing causing a zero sd->sector_size being propigated up via dev_attrib.hw_block_size. It also fixes another long-standing bug where TYPE_TAPE and TYPE_MEDIMUM_CHANGER where using pscsi_create_type_other(), which does not call scsi_device_get() to take the device reference. Instead, rename pscsi_create_type_rom() to pscsi_create_type_nondisk() and use it for all cases. Finally, also drop a dump_stack() in pscsi_get_blocks() for non TYPE_DISK, which in modern target-core can get invoked via target_sense_desc_format() during CHECK_CONDITION. Reported-by: Malcolm Haak Cc: Signed-off-by: Nicholas Bellinger drivers/target/target_core_pscsi.c | 47 ++++++++++---------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) commit b985735be7afea3a5e0570ce2ea0b662c0e12e19 Author: Thomas Petazzoni Date: Tue Mar 7 15:14:48 2017 +0100 hwrng: omap - Do not access INTMASK_REG on EIP76 The INTMASK_REG register does not exist on EIP76. Due to this, the call: omap_rng_write(priv, RNG_INTMASK_REG, RNG_SHUTDOWN_OFLO_MASK); ends up, through the reg_map_eip76[] array, in accessing the register at offset 0, which is the RNG_OUTPUT_0_REG. This by itself doesn't cause any problem, but clearly doesn't enable the interrupt as it was expected. On EIP76, the register that allows to enable the interrupt is RNG_CONTROL_REG. And just like RNG_INTMASK_REG, it's bit 1 of this register that allows to enable the shutdown_oflo interrupt. Fixes: 383212425c926 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 761c2510283066324cab7859930777ee34cbca78 Author: Thomas Petazzoni Date: Tue Mar 7 15:14:47 2017 +0100 hwrng: omap - use devm_clk_get() instead of of_clk_get() The omap-rng driver currently uses of_clk_get() to get a reference to the clock, but never releases that reference. This commit fixes that by using devm_clk_get() instead. Fixes: 383212425c926 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45c2fdde01299b02a6e3225e848598a3c1e55539 Author: Thomas Petazzoni Date: Tue Mar 7 15:14:46 2017 +0100 hwrng: omap - write registers after enabling the clock Commit 383212425c926 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") added support for the SafeXcel IP-76 variant of the IP. This modification included getting a reference and enabling a clock. Unfortunately, this was done *after* writing to the RNG_INTMASK_REG register. This generally works fine when the driver is built-in because the clock might have been left enabled by the bootloader, but fails short when the driver is built as a module: it causes a system hang because a register is being accessed while the clock is not enabled. This commit fixes that by making the register access *after* enabling the clock. This issue was found by the kernelci.org testing effort. Fixes: 383212425c926 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 07de4bc88ce6a4d898cad9aa4c99c1df7e87702d Author: Krzysztof Kozlowski Date: Sun Mar 5 19:14:07 2017 +0200 crypto: s5p-sss - Fix completing crypto request in IRQ handler In a regular interrupt handler driver was finishing the crypt/decrypt request by calling complete on crypto request. This is disallowed since converting to skcipher in commit b286d8b1a690 ("crypto: skcipher - Add skcipher walk interface") and causes a warning: WARNING: CPU: 0 PID: 0 at crypto/skcipher.c:430 skcipher_walk_first+0x13c/0x14c The interrupt is marked shared but in fact there are no other users sharing it. Thus the simplest solution seems to be to just use a threaded interrupt handler, after converting it to oneshot. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aa2be9b3d6d2d699e9ca7cbfc00867c80e5da213 Author: Daniel Axtens Date: Fri Mar 3 17:56:55 2017 +1100 crypto: powerpc - Fix initialisation of crc32c context Turning on crypto self-tests on a POWER8 shows: alg: hash: Test 1 failed for crc32c-vpmsum 00000000: ff ff ff ff Comparing the code with the Intel CRC32c implementation on which ours is based shows that we are doing an init with 0, not ~0 as CRC32c requires. This probably wasn't caught because btrfs does its own weird open-coded initialisation. Initialise our internal context to ~0 on init. This makes the self-tests pass, and btrfs continues to work. Fixes: 6dd7a82cc54e ("crypto: powerpc - Add POWER8 optimised crc32c") Cc: Anton Blanchard Cc: stable@vger.kernel.org Signed-off-by: Daniel Axtens Acked-by: Anton Blanchard Signed-off-by: Herbert Xu arch/powerpc/crypto/crc32c-vpmsum_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08b005f1333154ae5b404ca28766e0ffb9f1c150 Author: Darrick J. Wong Date: Mon Mar 6 11:58:20 2017 -0800 xfs: remove kmem_zalloc_greedy The sole remaining caller of kmem_zalloc_greedy is bulkstat, which uses it to grab 1-4 pages for staging of inobt records. The infinite loop in the greedy allocation function is causing hangs[1] in generic/269, so just get rid of the greedy allocator in favor of kmem_zalloc_large. This makes bulkstat somewhat more likely to ENOMEM if there's really no pages to spare, but eliminates a source of hangs. [1] http://lkml.kernel.org/r/20170301044634.rgidgdqqiiwsmfpj%40XZHOUW.usersys.redhat.com Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- v2: remove single-page fallback fs/xfs/kmem.c | 18 ------------------ fs/xfs/kmem.h | 2 -- fs/xfs/xfs_itable.c | 6 ++---- 3 files changed, 2 insertions(+), 24 deletions(-) commit d5825712ee98d68a2c17bc89dad2c30276894cba Author: Chandan Rajendra Date: Thu Mar 2 15:06:33 2017 -0800 xfs: Use xfs_icluster_size_fsb() to calculate inode alignment mask When block size is larger than inode cluster size, the call to XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size) returns 0. Also, mkfs.xfs would have set xfs_sb->sb_inoalignmt to 0. Hence in xfs_set_inoalignment(), xfs_mount->m_inoalign_mask gets initialized to -1 instead of 0. However, xfs_mount->m_sinoalign would get correctly intialized to 0 because for every positive value of xfs_mount->m_dalign, the condition "!(mp->m_dalign & mp->m_inoalign_mask)" would evaluate to false. Also, xfs_imap() worked fine even with xfs_mount->m_inoalign_mask having -1 as the value because blks_per_cluster variable would have the value 1 and hence we would never have a need to use xfs_mount->m_inoalign_mask to compute the inode chunk's agbno and offset within the chunk. Signed-off-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_mount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 787eb485509f9d58962bd8b4dbc6a5ac6e2034fe Author: Christoph Hellwig Date: Thu Mar 2 15:02:51 2017 -0800 xfs: fix and streamline error handling in xfs_end_io There are two different cases of buffered I/O errors: - first we can have an already shutdown fs. In that case we should skip any on-disk operations and just clean up the appen transaction if present and destroy the ioend - a real I/O error. In that case we should cleanup any lingering COW blocks. This gets skipped in the current code and is fixed by this patch. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 59 +++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 32 deletions(-) commit 627c845c0907894a1e5cd2d90ff4fc86c9e4458e Author: Tina Zhang Date: Tue Mar 7 04:08:34 2017 -0500 drm/i915/gvt: change some gvt_err to gvt_dbg_cmd gvt_err should be used for dumping error message. This patch changes some gvt_err to gvt_dbg_cmd, as they are only debugging message, not errors. Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 85e8a23936ab3442de0c42da97d53b29f004ece1 Author: Anton Blanchard Date: Mon Feb 13 08:49:20 2017 +1100 scsi: lpfc: Add shutdown method for kexec We see lpfc devices regularly fail during kexec. Fix this by adding a shutdown method which mirrors the remove method. Cc: Signed-off-by: Anton Blanchard Reviewed-by: Mauricio Faria de Oliveira Tested-by: Mauricio Faria de Oliveira Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+) commit f1c635b439a5c01776fe3a25b1e2dc546ea82e6f Author: Stephen Hemminger Date: Tue Mar 7 09:15:53 2017 -0800 scsi: storvsc: Workaround for virtual DVD SCSI version Hyper-V host emulation of SCSI for virtual DVD device reports SCSI version 0 (UNKNOWN) but is still capable of supporting REPORTLUN. Without this patch, a GEN2 Linux guest on Hyper-V will not boot 4.11 successfully with virtual DVD ROM device. What happens is that the SCSI scan process falls back to doing sequential probing by INQUIRY. But the storvsc driver has a previous workaround that masks/blocks all errors reports from INQUIRY (or MODE_SENSE) commands. This workaround causes the scan to then populate a full set of bogus LUN's on the target and then sends kernel spinning off into a death spiral doing block reads on the non-existent LUNs. By setting the correct blacklist flags, the target with the DVD device is scanned with REPORTLUN and that works correctly. Patch needs to go in current 4.11, it is safe but not necessary in older kernels. Signed-off-by: Stephen Hemminger Reviewed-by: K. Y. Srinivasan Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 3802a345321a08093ba2ddb1849e736f84e8d450 Author: Christoph Hellwig Date: Tue Mar 7 16:45:58 2017 -0800 xfs: only reclaim unwritten COW extents periodically We only want to reclaim preallocations from our periodic work item. Currently this is archived by looking for a dirty inode, but that check is rather fragile. Instead add a flag to xfs_reflink_cancel_cow_* so that the caller can ask for just cancelling unwritten extents in the COW fork. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: fix typos in commit message] Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_icache.c | 2 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_reflink.c | 23 ++++++++++++++++------- fs/xfs/xfs_reflink.h | 4 ++-- fs/xfs/xfs_super.c | 2 +- 6 files changed, 22 insertions(+), 13 deletions(-) commit 97ee351b50a49717543533cfb85b4bf9d88c9680 Author: Michael Ellerman Date: Tue Mar 7 16:14:49 2017 +1100 powerpc/boot: Fix zImage TOC alignment Recent toolchains force the TOC to be 256 byte aligned. We need to enforce this alignment in the zImage linker script, otherwise pointers to our TOC variables (__toc_start) could be incorrect. If the actual start of the TOC and __toc_start don't have the same value we crash early in the zImage wrapper. Cc: stable@vger.kernel.org Suggested-by: Alan Modra Signed-off-by: Michael Ellerman arch/powerpc/boot/zImage.lds.S | 1 + 1 file changed, 1 insertion(+) commit e2a3a67302fbe2431fc6d7c313073da5b2b4c293 Merge: c1ae3cf eeb8108 Author: James Bottomley Date: Tue Mar 7 15:13:02 2017 -0800 Merge remote-tracking branch 'mkp-scsi/fixes' into fixes commit 8474c8caac7e06b50fa366022ecd109b955822cb Merge: 15e6680 e3dc847 Author: David S. Miller Date: Tue Mar 7 14:59:24 2017 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-03-06 1) Fix lockdep splat on xfrm policy subsystem initialization. From Florian Westphal. 2) When using socket policies on IPv4-mapped IPv6 addresses, we access the flow informations of the wrong address family what leads to an out of bounds access. Fix this by using the family we get with the dst_entry, like we do it for the standard policy lookup. 3) vti6 can report a PMTU below IPV6_MIN_MTU. Fix this by adding a check for that before sending a ICMPV6_PKT_TOOBIG message. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 15e668070a64bb97f102ad9cf3bccbca0545cda8 Author: WANG Cong Date: Sun Mar 5 12:34:53 2017 -0800 ipv6: reorder icmpv6_init() and ip6_mr_init() Andrey reported the following kernel crash: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 14446 Comm: syz-executor6 Not tainted 4.10.0+ #82 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88001f311700 task.stack: ffff88001f6e8000 RIP: 0010:ip6mr_sk_done+0x15a/0x3d0 net/ipv6/ip6mr.c:1618 RSP: 0018:ffff88001f6ef418 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 1ffff10003edde8c RCX: ffffc900043ee000 RDX: 0000000000000004 RSI: ffffffff83e3b3f8 RDI: 0000000000000020 RBP: ffff88001f6ef508 R08: fffffbfff0dcc5d8 R09: 0000000000000000 R10: ffffffff86e62ec0 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88001f6ef4e0 R15: ffff8800380a0040 FS: 00007f7a52cec700(0000) GS:ffff88003ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000061c500 CR3: 000000001f1ae000 CR4: 00000000000006f0 DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: rawv6_close+0x4c/0x80 net/ipv6/raw.c:1217 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:425 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:432 sock_release+0x8d/0x1e0 net/socket.c:597 __sock_create+0x39d/0x880 net/socket.c:1226 sock_create_kern+0x3f/0x50 net/socket.c:1243 inet_ctl_sock_create+0xbb/0x280 net/ipv4/af_inet.c:1526 icmpv6_sk_init+0x163/0x500 net/ipv6/icmp.c:954 ops_init+0x10a/0x550 net/core/net_namespace.c:115 setup_net+0x261/0x660 net/core/net_namespace.c:291 copy_net_ns+0x27e/0x540 net/core/net_namespace.c:396 9pnet_virtio: no channels available for device ./file1 create_new_namespaces+0x437/0x9b0 kernel/nsproxy.c:106 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:205 SYSC_unshare kernel/fork.c:2281 [inline] SyS_unshare+0x64e/0x1000 kernel/fork.c:2231 entry_SYSCALL_64_fastpath+0x1f/0xc2 This is because net->ipv6.mr6_tables is not initialized at that point, ip6mr_rules_init() is not called yet, therefore on the error path when we iterator the list, we trigger this oops. Fix this by reordering ip6mr_rules_init() before icmpv6_sk_init(). Reported-by: Andrey Konovalov Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv6/af_inet6.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ec3b93ae0bf4742e9cbb40e1964129926c1464e0 Merge: 8a91723 f285330 Author: Linus Torvalds Date: Tue Mar 7 14:47:24 2017 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes and minor updates all over the place: - an SGI/UV fix - a defconfig update - a build warning fix - move the boot_params file to the arch location in debugfs - a pkeys fix - selftests fix - boot message fixes - sparse fixes - a resume warning fix - ioapic hotplug fixes - reboot quirks ... plus various minor cleanups" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build/x86_64_defconfig: Enable CONFIG_R8169 x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk x86/hpet: Prevent might sleep splat on resume x86/boot: Correct setup_header.start_sys name x86/purgatory: Fix sparse warning, symbol not declared x86/purgatory: Make functions and variables static x86/events: Remove last remnants of old filenames x86/pkeys: Check against max pkey to avoid overflows x86/ioapic: Split IOAPIC hot-removal into two steps x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC x86/intel_rdt: Remove duplicate inclusion of linux/cpu.h x86/vmware: Remove duplicate inclusion of asm/timer.h x86/hyperv: Hide unused label x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register x86/selftests: Add clobbers for int80 on x86_64 x86/apic: Simplify enable_IR_x2apic(), remove try_to_enable_IR() x86/apic: Fix a warning message in logical CPU IDs allocation x86/kdebugfs: Move boot params hierarchy under (debugfs)/x86/ commit 8a9172356f747dc3734cc8043a44bbe158f44749 Merge: 609b07b fa3aa7a Author: Linus Torvalds Date: Tue Mar 7 14:45:22 2017 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "This includes a fix for lockups caused by incorrect nsecs related cleanup, and a capabilities check fix for timerfd" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC timerfd: Only check CAP_WAKE_ALARM when it is needed commit 609b07b72d3caaa8eed3a238886467946b78fa5e Merge: c3abcab f94c8d1 Author: Linus Torvalds Date: Tue Mar 7 14:42:34 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "A fix for KVM's scheduler clock which (erroneously) was always marked unstable, a fix for RT/DL load balancing, plus latency fixes" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface sched/core: Fix pick_next_task() for RT,DL sched/fair: Make select_idle_cpu() more aggressive commit c3abcabe813b4a0976b58f7e6c1e63b2070c8dda Merge: 500e1af 9d020d3 Author: Linus Torvalds Date: Tue Mar 7 14:38:16 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "This includes a fix for a crash if certain special addresses are kprobed, plus does a rename of two Kconfig variables that were a minor misnomer" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed commit 500e1af25209a048daa1f1f86083d4849d5c555b Merge: 26db8f9 857811a Author: Linus Torvalds Date: Tue Mar 7 14:33:11 2017 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: - Change the new refcount_t warnings from WARN() to WARN_ONCE() - two ww_mutex fixes - plus a new lockdep self-consistency check for a bug that triggered in practice * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/ww_mutex: Adjust the lock number for stress test locking/lockdep: Add nest_lock integrity test locking/ww_mutex: Replace cpu_relax() with cond_resched() for tests locking/refcounts: Change WARN() to WARN_ONCE() commit 26db8f992444a87465fc01b264b0317a3943e2b6 Merge: 21f8577 b28ace1 Author: Linus Torvalds Date: Tue Mar 7 14:29:19 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: "Fix an ARM TI DRA7XX SoC irqchip driver local variables type bug/warning" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/crossbar: Fix incorrect type of local variables commit 21f85778bd037f6d7652a79a60657599edf39ef6 Merge: c688f14 d1eb981 Author: Linus Torvalds Date: Tue Mar 7 14:25:48 2017 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "A boot crash fix, and a secure boot related boot messages fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm: Fix boot crash with CONFIG_CPUMASK_OFFSTACK=y efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled commit 62f8f4d9066c1c6f2474845d1ca7e2891f2ae3fd Author: Eric Dumazet Date: Sun Mar 5 10:52:16 2017 -0800 dccp: fix use-after-free in dccp_feat_activate_values Dmitry reported crashes in DCCP stack [1] Problem here is that when I got rid of listener spinlock, I missed the fact that DCCP stores a complex state in struct dccp_request_sock, while TCP does not. Since multiple cpus could access it at the same time, we need to add protection. [1] BUG: KASAN: use-after-free in dccp_feat_activate_values+0x967/0xab0 net/dccp/feat.c:1541 at addr ffff88003713be68 Read of size 8 by task syz-executor2/8457 CPU: 2 PID: 8457 Comm: syz-executor2 Not tainted 4.10.0-rc7+ #127 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x292/0x398 lib/dump_stack.c:51 kasan_object_err+0x1c/0x70 mm/kasan/report.c:162 print_address_description mm/kasan/report.c:200 [inline] kasan_report_error mm/kasan/report.c:289 [inline] kasan_report.part.1+0x20e/0x4e0 mm/kasan/report.c:311 kasan_report mm/kasan/report.c:332 [inline] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:332 dccp_feat_activate_values+0x967/0xab0 net/dccp/feat.c:1541 dccp_create_openreq_child+0x464/0x610 net/dccp/minisocks.c:121 dccp_v6_request_recv_sock+0x1f6/0x1960 net/dccp/ipv6.c:457 dccp_check_req+0x335/0x5a0 net/dccp/minisocks.c:186 dccp_v6_rcv+0x69e/0x1d00 net/dccp/ipv6.c:711 ip6_input_finish+0x46d/0x17a0 net/ipv6/ip6_input.c:279 NF_HOOK include/linux/netfilter.h:257 [inline] ip6_input+0xdb/0x590 net/ipv6/ip6_input.c:322 dst_input include/net/dst.h:507 [inline] ip6_rcv_finish+0x289/0x890 net/ipv6/ip6_input.c:69 NF_HOOK include/linux/netfilter.h:257 [inline] ipv6_rcv+0x12ec/0x23d0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x1ae5/0x3400 net/core/dev.c:4190 __netif_receive_skb+0x2a/0x170 net/core/dev.c:4228 process_backlog+0xe5/0x6c0 net/core/dev.c:4839 napi_poll net/core/dev.c:5202 [inline] net_rx_action+0xe70/0x1900 net/core/dev.c:5267 __do_softirq+0x2fb/0xb7d kernel/softirq.c:284 do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:902 do_softirq.part.17+0x1e8/0x230 kernel/softirq.c:328 do_softirq kernel/softirq.c:176 [inline] __local_bh_enable_ip+0x1f2/0x200 kernel/softirq.c:181 local_bh_enable include/linux/bottom_half.h:31 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:971 [inline] ip6_finish_output2+0xbb0/0x23d0 net/ipv6/ip6_output.c:123 ip6_finish_output+0x302/0x960 net/ipv6/ip6_output.c:148 NF_HOOK_COND include/linux/netfilter.h:246 [inline] ip6_output+0x1cb/0x8d0 net/ipv6/ip6_output.c:162 ip6_xmit+0xcdf/0x20d0 include/net/dst.h:501 inet6_csk_xmit+0x320/0x5f0 net/ipv6/inet6_connection_sock.c:179 dccp_transmit_skb+0xb09/0x1120 net/dccp/output.c:141 dccp_xmit_packet+0x215/0x760 net/dccp/output.c:280 dccp_write_xmit+0x168/0x1d0 net/dccp/output.c:362 dccp_sendmsg+0x79c/0xb10 net/dccp/proto.c:796 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:744 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 SYSC_sendto+0x660/0x810 net/socket.c:1687 SyS_sendto+0x40/0x50 net/socket.c:1655 entry_SYSCALL_64_fastpath+0x1f/0xc2 RIP: 0033:0x4458b9 RSP: 002b:00007f8ceb77bb58 EFLAGS: 00000282 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000017 RCX: 00000000004458b9 RDX: 0000000000000023 RSI: 0000000020e60000 RDI: 0000000000000017 RBP: 00000000006e1b90 R08: 00000000200f9fe1 R09: 0000000000000020 R10: 0000000000008010 R11: 0000000000000282 R12: 00000000007080a8 R13: 0000000000000000 R14: 00007f8ceb77c9c0 R15: 00007f8ceb77c700 Object at ffff88003713be50, in cache kmalloc-64 size: 64 Allocated: PID = 8446 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:502 set_track mm/kasan/kasan.c:514 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:605 kmem_cache_alloc_trace+0x82/0x270 mm/slub.c:2738 kmalloc include/linux/slab.h:490 [inline] dccp_feat_entry_new+0x214/0x410 net/dccp/feat.c:467 dccp_feat_push_change+0x38/0x220 net/dccp/feat.c:487 __feat_register_sp+0x223/0x2f0 net/dccp/feat.c:741 dccp_feat_propagate_ccid+0x22b/0x2b0 net/dccp/feat.c:949 dccp_feat_server_ccid_dependencies+0x1b3/0x250 net/dccp/feat.c:1012 dccp_make_response+0x1f1/0xc90 net/dccp/output.c:423 dccp_v6_send_response+0x4ec/0xc20 net/dccp/ipv6.c:217 dccp_v6_conn_request+0xaba/0x11b0 net/dccp/ipv6.c:377 dccp_rcv_state_process+0x51e/0x1650 net/dccp/input.c:606 dccp_v6_do_rcv+0x213/0x350 net/dccp/ipv6.c:632 sk_backlog_rcv include/net/sock.h:893 [inline] __sk_receive_skb+0x36f/0xcc0 net/core/sock.c:479 dccp_v6_rcv+0xba5/0x1d00 net/dccp/ipv6.c:742 ip6_input_finish+0x46d/0x17a0 net/ipv6/ip6_input.c:279 NF_HOOK include/linux/netfilter.h:257 [inline] ip6_input+0xdb/0x590 net/ipv6/ip6_input.c:322 dst_input include/net/dst.h:507 [inline] ip6_rcv_finish+0x289/0x890 net/ipv6/ip6_input.c:69 NF_HOOK include/linux/netfilter.h:257 [inline] ipv6_rcv+0x12ec/0x23d0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x1ae5/0x3400 net/core/dev.c:4190 __netif_receive_skb+0x2a/0x170 net/core/dev.c:4228 process_backlog+0xe5/0x6c0 net/core/dev.c:4839 napi_poll net/core/dev.c:5202 [inline] net_rx_action+0xe70/0x1900 net/core/dev.c:5267 __do_softirq+0x2fb/0xb7d kernel/softirq.c:284 Freed: PID = 15 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:502 set_track mm/kasan/kasan.c:514 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:578 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2954 [inline] kfree+0xe8/0x2b0 mm/slub.c:3874 dccp_feat_entry_destructor.part.4+0x48/0x60 net/dccp/feat.c:418 dccp_feat_entry_destructor net/dccp/feat.c:416 [inline] dccp_feat_list_pop net/dccp/feat.c:541 [inline] dccp_feat_activate_values+0x57f/0xab0 net/dccp/feat.c:1543 dccp_create_openreq_child+0x464/0x610 net/dccp/minisocks.c:121 dccp_v6_request_recv_sock+0x1f6/0x1960 net/dccp/ipv6.c:457 dccp_check_req+0x335/0x5a0 net/dccp/minisocks.c:186 dccp_v6_rcv+0x69e/0x1d00 net/dccp/ipv6.c:711 ip6_input_finish+0x46d/0x17a0 net/ipv6/ip6_input.c:279 NF_HOOK include/linux/netfilter.h:257 [inline] ip6_input+0xdb/0x590 net/ipv6/ip6_input.c:322 dst_input include/net/dst.h:507 [inline] ip6_rcv_finish+0x289/0x890 net/ipv6/ip6_input.c:69 NF_HOOK include/linux/netfilter.h:257 [inline] ipv6_rcv+0x12ec/0x23d0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x1ae5/0x3400 net/core/dev.c:4190 __netif_receive_skb+0x2a/0x170 net/core/dev.c:4228 process_backlog+0xe5/0x6c0 net/core/dev.c:4839 napi_poll net/core/dev.c:5202 [inline] net_rx_action+0xe70/0x1900 net/core/dev.c:5267 __do_softirq+0x2fb/0xb7d kernel/softirq.c:284 Memory state around the buggy address: ffff88003713bd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88003713bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88003713be00: fc fc fc fc fc fc fc fc fc fc fb fb fb fb fb fb ^ Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: David S. Miller include/linux/dccp.h | 1 + net/dccp/minisocks.c | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) commit 068d9f90a6978c3e3a662d9e85204a7d6be240d2 Author: Thomas Falcon Date: Sun Mar 5 12:18:42 2017 -0600 ibmvnic: Allocate number of rx/tx buffers agreed on by firmware The amount of TX/RX buffers that the vNIC driver currently allocates is different from the amount agreed upon in negotiation with firmware. Correct that by allocating the requested number of buffers confirmed by firmware. 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 142c0ac445792c492579cb01f1cfd4e32e6dfcce Author: Thomas Falcon Date: Sun Mar 5 12:18:41 2017 -0600 ibmvnic: Fix overflowing firmware/hardware TX queue Use a counter to track the number of outstanding transmissions sent that have not received completions. If the counter reaches the maximum number of queue entries, stop transmissions on that queue. As we receive more completions from firmware, wake the queue once the counter reaches an acceptable level. This patch prevents hardware/firmware TX queue from filling up and and generating errors. Since incorporating this fix, internal testing has reported that these firmware errors have stopped. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 27 ++++++++++++++++++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) commit 6c4dc75c251721f517e9daeb5370ea606b5b35ce Author: Alexey Khoroshilov Date: Sun Mar 5 03:01:55 2017 +0300 net/sched: act_skbmod: remove unneeded rcu_read_unlock in tcf_skbmod_dump Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_skbmod.c | 1 - 1 file changed, 1 deletion(-) commit 72c3fbf8dc90988bd04123b88b70ffffa206582d Merge: fa4c7fb b21dd45 Author: David S. Miller Date: Tue Mar 7 14:09:59 2017 -0800 Merge branch 'rds-fixes' Sowmini Varadhan says: ==================== rds: tcp: fix various rds-tcp issues during netns create/delete sequences Dmitry Vyukov reported some syszkaller panics during netns deletion. While I have not been able to reproduce those exact panics, my attempts to do so uncovered a few other problems, which are fixed patch 2 and patch 3 of this patch series. In addition, as mentioned in, https://www.spinics.net/lists/netdev/msg422997.html code-inspection points that the rds_connection needs to take an explicit refcnt on the struct net so that it is held down until all cleanup is completed for netns removal, and this is fixed by patch1. The following scripts were run concurrently to uncover/test patch{2, 3} while simultaneously running rds-ping to 12.0.0.18 from another system: # cat del.rds while [ 1 ]; do modprobe rds_tcp modprobe -r rds-tcp done # cat del.netns while [ 1 ]; do ip netns delete blue ip netns add blue ip link add link eth1 address a:b:c:d:e:f blue0 type macvlan ip link set blue0 netns blue ip netns exec blue ip addr add 12.0.0.18/24 dev blue0 ip netns exec blue ifconfig blue0 up sleep 3; done ==================== Signed-off-by: David S. Miller commit b21dd4506b71bdb9c5a20e759255cd2513ea7ebe Author: Sowmini Varadhan Date: Sat Mar 4 08:57:35 2017 -0800 rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races Commit a93d01f5777e ("RDS: TCP: avoid bad page reference in rds_tcp_listen_data_ready") added the function rds_tcp_listen_sock_def_readable() to handle the case when a partially set-up acceptor socket drops into rds_tcp_listen_data_ready(). However, if the listen socket (rtn->rds_tcp_listen_sock) is itself going through a tear-down via rds_tcp_listen_stop(), the (*ready)() will be null and we would hit a panic of the form BUG: unable to handle kernel NULL pointer dereference at (null) IP: (null) : ? rds_tcp_listen_data_ready+0x59/0xb0 [rds_tcp] tcp_data_queue+0x39d/0x5b0 tcp_rcv_established+0x2e5/0x660 tcp_v4_do_rcv+0x122/0x220 tcp_v4_rcv+0x8b7/0x980 : In the above case, it is not fatal to encounter a NULL value for ready- we should just drop the packet and let the flush of the acceptor thread finish gracefully. In general, the tear-down sequence for listen() and accept() socket that is ensured by this commit is: rtn->rds_tcp_listen_sock = NULL; /* prevent any new accepts */ In rds_tcp_listen_stop(): serialize with, and prevent, further callbacks using lock_sock() flush rds_wq flush acceptor workq sock_release(listen socket) Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 15 ++++++++++----- net/rds/tcp.h | 2 +- net/rds/tcp_listen.c | 9 +++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) commit 16c09b1c7657522a321b04aa7f4300865b7cb292 Author: Sowmini Varadhan Date: Sat Mar 4 08:57:34 2017 -0800 rds: tcp: Reorder initialization sequence in rds_tcp_init to avoid races Order of initialization in rds_tcp_init needs to be done so that resources are set up and destroyed in the correct synchronization sequence with both the data path, as well as netns create/destroy path. Specifically, - we must call register_pernet_subsys and get the rds_tcp_netid before calling register_netdevice_notifier, otherwise we risk the sequence 1. register_netdevice_notifier sets up netdev notifier callback 2. rds_tcp_dev_event -> rds_tcp_kill_sock uses netid 0, and finds the wrong rtn, resulting in a panic with string that is of the form: BUG: unable to handle kernel NULL pointer dereference at 000000000000000d IP: rds_tcp_kill_sock+0x3a/0x1d0 [rds_tcp] : - the rds_tcp_incoming_slab kmem_cache must be initialized before the datapath starts up. The latter can happen any time after the pernet_subsys registration of rds_tcp_net_ops, whose -> init function sets up the listen socket. If the rds_tcp_incoming_slab has not been set up at that time, a panic of the form below may be encountered BUG: unable to handle kernel NULL pointer dereference at 0000000000000014 IP: kmem_cache_alloc+0x90/0x1c0 : rds_tcp_data_recv+0x1e7/0x370 [rds_tcp] tcp_read_sock+0x96/0x1c0 rds_tcp_recv_path+0x65/0x80 [rds_tcp] : Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 8edc3affc0770886c7bfb3436b0fdd09bce13167 Author: Sowmini Varadhan Date: Sat Mar 4 08:57:33 2017 -0800 rds: tcp: Take explicit refcounts on struct net It is incorrect for the rds_connection to piggyback on the sock_net() refcount for the netns because this gives rise to a chicken-and-egg problem during rds_conn_destroy. Instead explicitly take a ref on the net, and hold the netns down till the connection tear-down is complete. Reported-by: Dmitry Vyukov Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/connection.c | 1 + net/rds/rds.h | 6 +++--- net/rds/tcp.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit fa4c7fb2ad2ea5dae57eb875915d0efb1e068543 Merge: 146d8fe 9ac25fc Author: David S. Miller Date: Tue Mar 7 14:06:15 2017 -0800 Merge branch 'sock_hold-misuses' Eric Dumazet says: ==================== net: fix possible sock_hold() misuses skb_complete_wifi_ack() and skb_complete_tx_timestamp() currently call sock_hold() on sockets that might have transitioned their sk_refcnt to zero already. ==================== Signed-off-by: David S. Miller commit 9ac25fc063751379cb77434fef9f3b088cd3e2f7 Author: Eric Dumazet Date: Fri Mar 3 21:01:03 2017 -0800 net: fix socket refcounting in skb_complete_tx_timestamp() TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt By the time TX completion happens, sk_refcnt might be already 0. sock_hold()/sock_put() would then corrupt critical state, like sk_wmem_alloc and lead to leaks or use after free. Fixes: 62bccb8cdb69 ("net-timestamp: Make the clone operation stand-alone from phy timestamping") Signed-off-by: Eric Dumazet Cc: Alexander Duyck Cc: Johannes Berg Cc: Soheil Hassas Yeganeh Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/core/skbuff.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit dd4f10722aeb10f4f582948839f066bebe44e5fb Author: Eric Dumazet Date: Fri Mar 3 21:01:02 2017 -0800 net: fix socket refcounting in skb_complete_wifi_ack() TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt By the time TX completion happens, sk_refcnt might be already 0. sock_hold()/sock_put() would then corrupt critical state, like sk_wmem_alloc. Fixes: bf7fa551e0ce ("mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path") Signed-off-by: Eric Dumazet Cc: Alexander Duyck Cc: Johannes Berg Cc: Soheil Hassas Yeganeh Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/core/skbuff.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c688f14ccd4266289fd51e76210c13fdf67f1d9d Merge: 9e91c14 5c51f4a Author: Linus Torvalds Date: Tue Mar 7 14:02:56 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: "A couple of sched.h splitup related build fixes, plus an objtool fix" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix another GCC jump table detection issue drivers/char/nwbutton: Fix build breakage caused by include file reshuffling h8300: Fix build breakage caused by header file changes avr32: Fix build error caused by include file reshuffling commit 146d8fef9da1ba854de7fa28b9cb9eb147535f88 Author: David Howells Date: Sat Mar 4 00:01:41 2017 +0000 rxrpc: Call state should be read with READ_ONCE() under some circumstances The call state may be changed at any time by the data-ready routine in response to received packets, so if the call state is to be read and acted upon several times in a function, READ_ONCE() must be used unless the call state lock is held. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/input.c | 12 +++++++----- net/rxrpc/recvmsg.c | 4 ++-- net/rxrpc/sendmsg.c | 48 ++++++++++++++++++++++++++++++------------------ 3 files changed, 39 insertions(+), 25 deletions(-) commit 02b2faaf0af1d85585f6d6980e286d53612acfc2 Author: Eric Dumazet Date: Fri Mar 3 14:08:21 2017 -0800 tcp: fix various issues for sockets morphing to listen state Dmitry Vyukov reported a divide by 0 triggered by syzkaller, exploiting tcp_disconnect() path that was never really considered and/or used before syzkaller ;) I was not able to reproduce the bug, but it seems issues here are the three possible actions that assumed they would never trigger on a listener. 1) tcp_write_timer_handler 2) tcp_delack_timer_handler 3) MTU reduction Only IPv6 MTU reduction was properly testing TCP_CLOSE and TCP_LISTEN states from tcp_v6_mtu_reduced() Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 7 +++++-- net/ipv4/tcp_timer.c | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit b73d2da8c724bb26885512e1ba47b91e2a9f48c3 Merge: 239870f e395132 Author: David S. Miller Date: Tue Mar 7 13:47:16 2017 -0800 Merge branch 'bnx2x-fixes' Michal Schmidt says: ==================== bnx2x: PTP crash, VF VLAN fixes here are fixes for a crash with PTP, a crash in setting of VF multicast addresses, and non-working VLAN filters configuration from the VF side. ==================== Signed-off-by: David S. Miller commit e39513259450a8312cb98a9a3b16bb924310dbcc Author: Michal Schmidt Date: Fri Mar 3 17:08:34 2017 +0100 bnx2x: add missing configuration of VF VLAN filters Configuring VLANs from the VF side had no effect, because the PF ignored filters of type VFPF_VLAN_FILTER in the VF-PF message. Add the missing filter type to configure. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 74bcbeb7d77ec92e4262fc340cb436ef7d98ba01 Author: Michal Schmidt Date: Fri Mar 3 17:08:33 2017 +0100 bnx2x: fix incorrect filter count in an error message filters->count is the number of filters we were supposed to configure. There is no reason to increase it by +1 when printing the count in an error message. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78d5505432436516456c12abbe705ec8dee7ee2b Author: Michal Schmidt Date: Fri Mar 3 17:08:32 2017 +0100 bnx2x: do not rollback VF MAC/VLAN filters we did not configure On failure to configure a VF MAC/VLAN filter we should not attempt to rollback filters that we failed to configure with -EEXIST. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 8 +++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit 83bd9eb8fc69cdd5135ed6e1f066adc8841800fd Author: Michal Schmidt Date: Fri Mar 3 17:08:31 2017 +0100 bnx2x: fix detection of VLAN filtering feature for VF VFs are currently missing the VLAN filtering feature, because we were checking the PF's acquire response before actually performing the acquire. Fix it by setting the feature flag later when we have the PF response. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 22118d861cec5da6ed525aaf12a3de9bfeffc58f Author: Michal Schmidt Date: Fri Mar 3 17:08:30 2017 +0100 bnx2x: fix possible overrun of VFPF multicast addresses array It is too late to check for the limit of the number of VF multicast addresses after they have already been copied to the req->multicast[] array, possibly overflowing it. Do the check before copying. Also fix the error path to not skip unlocking vf2pf_mutex. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 850268d320f0c7c5eb7ad0a62ef21859fa331ded Author: Michal Schmidt Date: Fri Mar 3 17:08:29 2017 +0100 bnx2x: lower verbosity of VF stats debug messages When BNX2X_MSG_IOV is enabled, the driver produces too many VF statistics messages. Lower the verbosity of the VF stats messages similarly as in commit 76ca70fabbdaa3 ("bnx2x: [Debug] change verbosity of some prints"). Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 466e8bf10ac104d96e1ea813e8126e11cb72ea20 Author: Michal Schmidt Date: Fri Mar 3 17:08:28 2017 +0100 bnx2x: prevent crash when accessing PTP with interface down It is possible to crash the kernel by accessing a PTP device while its associated bnx2x interface is down. Before the interface is brought up, the timecounter is not initialized, so accessing it results in NULL dereference. Fix it by checking if the interface is up. Use -ENETDOWN as the error code when the interface is down. -EFAULT in bnx2x_ptp_adjfreq() did not seem right. Tested using phc_ctl get/set/adj/freq commands. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 239870f2a0ebf75cc8f6d987dc528c5243f93d69 Author: Blomme, Maarten Date: Thu Mar 2 13:08:49 2017 +0100 spi_ks8995: regs_size incorrect for some devices Signed-off-by: Maarten Blomme Signed-off-by: David S. Miller drivers/net/phy/spi_ks8995.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4342696df764ec65dcdfbd0c10d90ea52505f8ba Author: Blomme, Maarten Date: Thu Mar 2 13:08:36 2017 +0100 spi_ks8995: fix "BUG: key accdaa28 not in .data!" Signed-off-by: Maarten Blomme Signed-off-by: David S. Miller drivers/net/phy/spi_ks8995.c | 1 + 1 file changed, 1 insertion(+) commit 0253f2681f4445e9003fb27dc743ef7d25e8f3b9 Author: Arnd Bergmann Date: Tue Feb 28 22:12:04 2017 +0100 net/mlx5e: add IPV6 dependency The ethernet support now calls directly into the ipv6 core code, which fails if IPV6 is a loadable module but mlx5 is built-in: drivers/net/ethernet/mellanox/mlx5/core/en_tc.o: In function `mlx5e_create_encap_header_ipv6': en_tc.c:(.text.mlx5e_create_encap_header_ipv6+0x110): undefined reference to `ip6_route_output_flags' This adds a dependency to ensure that MLX5_CORE_EN can only be built if we are able link the kernel successfully. The downside is that the ethernet option can be hidden. Alternatively we could make MLX5_CORE depend on "IPV6 || !IPV6", which would force MLX5_CORE to be a module when IPV6 is, including in configurations where we don't use the ethernet support at all. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3bd7db63a841e8c5297bb18ad801df67d5e38ad2 Author: Yinghai Lu Date: Wed Mar 1 00:25:40 2017 -0800 PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove We call pcie_aspm_exit_link_state() when we remove a device. If the device is the last PCIe function to be removed below a bridge and the bridge has an ASPM link_state struct, we disable ASPM on the link. Disabling ASPM requires link->downstream (used in pcie_config_aspm_link()). We previously set link->downstream in pcie_aspm_cap_init(), but only if the device was not blacklisted. Removing the blacklisted device caused a NULL pointer dereference in the pcie_aspm_exit_link_state() -> pcie_config_aspm_link() path: # echo 1 > /sys/bus/pci/devices/0000\:0b\:00.0/remove ... BUG: unable to handle kernel NULL pointer dereference at 0000000000000080 IP: pcie_config_aspm_link+0x5d/0x2b0 Call Trace: pcie_aspm_exit_link_state+0x75/0x130 pci_stop_bus_device+0xa4/0xb0 pci_stop_and_remove_bus_device_locked+0x1a/0x30 remove_store+0x50/0x70 dev_attr_store+0x18/0x30 sysfs_kf_write+0x44/0x60 kernfs_fop_write+0x10e/0x190 __vfs_write+0x28/0x110 ? rcu_read_lock_sched_held+0x5d/0x80 ? rcu_sync_lockdep_assert+0x2c/0x60 ? __sb_start_write+0x173/0x1a0 ? vfs_write+0xb3/0x180 vfs_write+0xc4/0x180 SyS_write+0x49/0xa0 do_syscall_64+0xa6/0x1c0 entry_SYSCALL64_slow_path+0x25/0x25 ---[ end trace bd187ee0267df5d9 ]--- To avoid this, set link->downstream in alloc_pcie_link_state(), so every pcie_link_state structure has a valid link->downstream pointer. [bhelgaas: changelog] Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas Acked-by: Rajat Jain CC: stable@vger.kernel.org drivers/pci/pcie/aspm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0d5370d1d85251e5893ab7c90a429464de2e140b Author: Ethan Zhao Date: Mon Feb 27 17:08:44 2017 +0900 PCI: Prevent VPD access for QLogic ISP2722 QLogic ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter has the VPD access issue too, while read the common pci-sysfs access interface shown as /sys/devices/pci0000:00/0000:00:03.2/0000:0b:00.0/vpd with simple 'cat' could cause system hang and panic: Kernel panic - not syncing: An NMI occurred. Depending on your system the reason for the NMI is logged in any one of the following resources: 1. Integrated Management Log (IML) 2. OA Syslog 3. OA Forward Progress Log 4. iLO Event Log CPU: 0 PID: 15070 Comm: udevadm Not tainted 4.1.12 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 12/27/2015 0000000000000086 000000007f0cdf51 ffff880c4fa05d58 ffffffff817193de ffffffffa00b42d8 0000000000000075 ffff880c4fa05dd8 ffffffff81714072 0000000000000008 ffff880c4fa05de8 ffff880c4fa05d88 000000007f0cdf51 Call Trace: [] dump_stack+0x63/0x81 [] panic+0xd0/0x20e [] hpwdt_pretimeout+0xdd/0xe0 [hpwdt] [] ? sched_clock+0x9/0x10 [] nmi_handle+0x91/0x170 [] ? nmi_handle+0x9c/0x170 [] io_check_error+0x1e/0xa0 [] default_do_nmi+0x99/0x140 [] do_nmi+0xf4/0x170 [] end_repeat_nmi+0x1a/0x1e [] ? pci_conf1_read+0xeb/0x120 [] ? pci_conf1_read+0xeb/0x120 [] ? pci_conf1_read+0xeb/0x120 <> [] raw_pci_read+0x23/0x40 [] pci_read+0x2c/0x30 [] pci_user_read_config_word+0x72/0x110 [] pci_vpd_pci22_wait+0x96/0x130 [] pci_vpd_pci22_read+0xdb/0x1a0 [] pci_read_vpd+0x20/0x30 [] read_vpd_attr+0x30/0x40 [] sysfs_kf_bin_read+0x47/0x70 [] kernfs_fop_read+0xae/0x180 [] __vfs_read+0x37/0x100 [] ? security_file_permission+0x84/0xa0 [] ? rw_verify_area+0x56/0xe0 [] vfs_read+0x86/0x140 [] SyS_read+0x55/0xd0 [] system_call_fastpath+0x12/0x71 Shutting down cpus with NMI Kernel Offset: disabled drm_kms_helper: panic occurred, switching back to text console So blacklist the access to its VPD. Signed-off-by: Ethan Zhao Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.6+ drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+) commit a3a4a816b4b194c45d0217e8b9e08b2639802cda Author: Christian Lamparter Date: Mon Feb 27 21:54:50 2017 +0100 dt: emac: document device-tree based phy discovery and setup This patch adds documentation for a new "phy-handle" property, "fixed-link" and "mdio" sub-node. These allows the enumeration of PHYs which are supported by the phy library under drivers/net/phy. The EMAC ethernet controller in IBM and AMCC 4xx chips is currently stuck with a few privately defined phy implementations. It has no support for PHYs which are supported by the generic phylib. Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller .../devicetree/bindings/powerpc/4xx/emac.txt | 62 +++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) commit f98c7bce570bdbe344b74ff5daa7dfeef3f22929 Author: Krzysztof Kozlowski Date: Sat Feb 25 18:36:44 2017 +0200 serial: samsung: Continue to work if DMA request fails If DMA is not available (even when configured in DeviceTree), the driver will fail the startup procedure thus making serial console not available. For example this causes boot failure on QEMU ARMv7 (Exynos4210, SMDKC210): [    1.302575] OF: amba_device_add() failed (-19) for /amba/pdma@12680000 ... [   11.435732] samsung-uart 13800000.serial: DMA request failed [   72.963893] samsung-uart 13800000.serial: DMA request failed [   73.143361] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 DMA is not necessary for serial to work, so continue with UART startup after emitting a warning. Fixes: 62c37eedb74c ("serial: samsung: add dma reqest/release functions") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9e91c144e689bb780b412c2c7908b9cf7b96f31f Merge: f7d6a72 f0f3f2d Author: Linus Torvalds Date: Tue Mar 7 10:52:26 2017 -0800 Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax Pull idr fix (and new tests) from Matthew Wilcox: "One urgent patch in here; freeing the correct IDA bitmap. Everything else is changes to the test suite" * 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax: radix tree test suite: Specify -m32 in LDFLAGS too ida: Free correct IDA bitmap radix tree test suite: Depend on Makefile and quieten grep radix tree test suite: Fix build with --as-needed radix tree test suite: Build 32 bit binaries radix tree test suite: Add performance test for radix_tree_join() radix tree test suite: Add performance test for radix_tree_split() radix tree test suite: Add performance benchmarks radix tree test suite: Add test for radix_tree_clear_tags() radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove() radix tree test suite: Add test for idr_get_next() commit 544714d8e17c33822319d5a1a00e5ddc4db502b6 Author: Jaehoon Chung Date: Tue Mar 7 19:54:05 2017 +0900 PCI: exynos: Initialize elbi_base even when using PHY framework Even when using the PHY framework, we need the elbi_base. Before this patch, we didn't initialize elbi_base, which caused NULL pointer dereferences later. Fixes: e7cd7ef58e1f ("PCI: exynos: Support the PHY generic framework") Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-exynos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7d6a7283aa1de430c6323a9714d1a787bc2d1ea Merge: 8c2c8ed a7d2475 Author: Linus Torvalds Date: Tue Mar 7 10:46:10 2017 -0800 Merge tag 'powerpc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Five fairly small fixes for things that went in this cycle. A fairly large patch to rework the CAS logic on Power9, necessitated by a late change to the firmware API, and we can't boot without it. Three fixes going to stable, allowing more instructions to be emulated on LE, fixing a boot crash on 32-bit Freescale BookE machines, and the OPAL XICS workaround. And a patch from me to sort the selects under CONFIG PPC. Annoying churn, but worth it in the long run, and best for it to go in now to avoid conflicts. Thanks to: Alexey Kardashevskiy, Anton Blanchard, Balbir Singh, Gautham R. Shenoy, Laurentiu Tudor, Nicholas Piggin, Paul Mackerras, Ravi Bangoria, Sachin Sant, Shile Zhang, Suraj Jitindar Singh" * tag 'powerpc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Sort the selects under CONFIG_PPC powerpc/64: Fix L1D cache shape vector reporting L1I values powerpc/64: Avoid panic during boot due to divide by zero in init_cache_info() powerpc: Update to new option-vector-5 format for CAS powerpc: Parse the command line before calling CAS powerpc/xics: Work around limitations of OPAL XICS priority handling powerpc/64: Fix checksum folding in csum_add() powerpc/powernv: Fix opal tracepoints with JUMP_LABEL=n powerpc/booke: Fix boot crash due to null hugepd powerpc: Fix compiling a BE kernel with a powerpc64le toolchain selftest/powerpc: Fix false failures for skipped tests powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop powerpc/64: Invalidate process table caching after setting process table powerpc: emulate_step() tests for load/store instructions powerpc: Emulation support for load/store instructions on LE commit 8c2c8ed8b85d4012d26caf1c221c291c687d89f0 Merge: 304362a 69369f5 Author: Linus Torvalds Date: Tue Mar 7 10:23:17 2017 -0800 Merge branch 'stable/for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb updates from Konrad Rzeszutek Wilk: "Two tiny implementations of the DMA API for callback in ARM (for Xen)" * 'stable/for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb-xen: implement xen_swiotlb_get_sgtable callback swiotlb-xen: implement xen_swiotlb_dma_mmap callback commit f0f3f2d0a3e0f7c48163fd8b45f5909d46e7f371 Author: Matthew Wilcox Date: Fri Mar 3 12:28:37 2017 -0500 radix tree test suite: Specify -m32 in LDFLAGS too Michael's patch to use the default make rule for linking and the patch from Rehas to use -m32 if building a 32-bit test-suite on a 64-bit platform don't work well together. Reported-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/Makefile | 1 + 1 file changed, 1 insertion(+) commit 4ecd9542dbc3e07f3bd3870aac12839f72b47db4 Author: Matthew Wilcox Date: Fri Mar 3 12:16:10 2017 -0500 ida: Free correct IDA bitmap There's a relatively rare race where we look at the per-cpu preallocated IDA bitmap, see it's NULL, allocate a new one, and atomically update it. If the kmalloc() happened to sleep and we were rescheduled to a different CPU, or an interrupt came in at the exact right time, another task might have successfully allocated a bitmap and already deposited it. I forgot what the semantics of cmpxchg() were and ended up freeing the wrong bitmap leading to KASAN reporting a use-after-free. Dmitry found the bug with syzkaller & wrote the patch. I wrote the test case that will reproduce the bug without his patch being applied. Reported-by: Dmitry Vyukov Signed-off-by: Matthew Wilcox lib/radix-tree.c | 4 ++-- tools/testing/radix-tree/idr-test.c | 34 +++++++++++++++++++++++++++++++--- tools/testing/radix-tree/main.c | 1 + tools/testing/radix-tree/test.h | 1 + 4 files changed, 35 insertions(+), 5 deletions(-) commit 3f1b6f9d49ba5a209d745fa2448657d8b66ed0c0 Author: Matthew Wilcox Date: Thu Mar 2 12:24:28 2017 -0500 radix tree test suite: Depend on Makefile and quieten grep Changing the CFLAGS in the Makefile didn't always lead to a recompilation because the OFILES didn't depend on the Makefile. Also, after doing make clean, grep would still complain about a missing map-shift.h; we need -s as well as -q. Signed-off-by: Matthew Wilcox tools/testing/radix-tree/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 284d96a494d705b9c5330c900e976fceda885b9f Author: Michael Ellerman Date: Thu Mar 2 04:29:00 2017 -0500 radix tree test suite: Fix build with --as-needed Currently the radix tree test suite doesn't build with toolchains that use --as-needed by default, for example Ubuntu's: cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -lpthread -lurcu main.o ... -o main /usr/bin/ld: regression1.o: undefined reference to symbol 'pthread_join@@GLIBC_2.17' /lib/powerpc64le-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status This is caused by the custom makefile rules placing LDFLAGS before the .o files that need the libraries. We could fix it by using --no-as-needed, or rewriting the custom rules. But we can also just drop the custom rules and move the libraries to LDLIBS, and then the default rules work correctly - with the one caveat that we need to add -fsanitize=address to LDFLAGS because that must be passed to the linker as well as the compiler. Signed-off-by: Michael Ellerman Signed-off-by: Matthew Wilcox tools/testing/radix-tree/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c4634b08d9eb9c13be2296230bf33c79390dbf9c Author: Rehas Sachdeva Date: Mon Feb 27 08:49:00 2017 -0500 radix tree test suite: Build 32 bit binaries Add option 'make BUILD=32' for building 32-bit binaries. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 54f4d3341c8fe31e20915e2c1fb322ff8a069832 Author: Rehas Sachdeva Date: Mon Feb 27 08:11:00 2017 -0500 radix tree test suite: Add performance test for radix_tree_join() Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/benchmark.c | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 6478581c85cd3091a6188a2433a8093f335f8f2a Author: Rehas Sachdeva Date: Mon Feb 27 07:53:00 2017 -0500 radix tree test suite: Add performance test for radix_tree_split() Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/benchmark.c | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 0d4a41c1a0335dc515c6e7fabd447263b57f6457 Author: Rehas Sachdeva Date: Sun Feb 26 16:17:00 2017 -0500 radix tree test suite: Add performance benchmarks Add performance benchmarks for radix tree insertion, tagging and deletion. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/benchmark.c | 82 +++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 7 deletions(-) commit c629a344accd15022dd6d87fa28c8e22f978fbda Author: Rehas Sachdeva Date: Sun Feb 26 06:33:00 2017 -0500 radix tree test suite: Add test for radix_tree_clear_tags() Assert that radix_tree_clear_tags() clears the tags on the passed node and slot. Assert that the case where the radix tree has only one entry at index zero and the node is NULL, is also handled. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/tag_check.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 166bb1f532fd9fe1b81c6b411ad5d5c9dd21a685 Author: Rehas Sachdeva Date: Mon Feb 20 06:40:00 2017 -0500 radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove() Assert that ida_simple_get() allocates an id in the passed range or returns error on failure, and ida_simple_remove() releases an allocated id. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/idr-test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2eacc79c27eb683c4a3ded80c2629387ee0d4e04 Author: Rehas Sachdeva Date: Sat Feb 18 07:31:00 2017 -0500 radix tree test suite: Add test for idr_get_next() Assert that idr_get_next() returns the next populated entry in the tree with an ID greater than or equal to the value pointed to by @nextid argument. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/idr-test.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 304362a8bce1a5b7f9491be5a0643cd14a52364d Merge: f26db96 040757f Author: Linus Torvalds Date: Tue Mar 7 10:06:25 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace fix from Eric Biederman: "This fixes a race between put_ucounts and get_ucounts that can cause a use after free. The fix works by simplifying the code and so there is not even a temptation to be clever and play spinlock vs atomic reference games" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ucount: Remove the atomicity from ucount->count commit 82f2341c94d270421f383641b7cd670e474db56b Author: Alexander Popov Date: Tue Feb 28 19:54:40 2017 +0300 tty: n_hdlc: get rid of racy n_hdlc.tbuf Currently N_HDLC line discipline uses a self-made singly linked list for data buffers and has n_hdlc.tbuf pointer for buffer retransmitting after an error. The commit be10eb7589337e5defbe214dae038a53dd21add8 ("tty: n_hdlc add buffer flushing") introduced racy access to n_hdlc.tbuf. After tx error concurrent flush_tx_queue() and n_hdlc_send_frames() can put one data buffer to tx_free_buf_list twice. That causes double free in n_hdlc_release(). Let's use standard kernel linked list and get rid of n_hdlc.tbuf: in case of tx error put current data buffer after the head of tx_buf_list. Signed-off-by: Alexander Popov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/n_hdlc.c | 132 +++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 63 deletions(-) commit 45838660e34d90db8d4f7cbc8fd66e8aff79f4fe Author: Kai-Heng Feng Date: Tue Mar 7 09:31:29 2017 -0800 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000 The aux port does not get detected without noloop quirk, so external PS/2 mouse cannot work as result. The PS/2 mouse can work with this quirk. BugLink: https://bugs.launchpad.net/bugs/1591053 Signed-off-by: Kai-Heng Feng Reviewed-by: Marcos Paulo de Souza Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit f26db9649af36b8eb76850108113d4056f494537 Merge: c1ae3cf 65a50c6 Author: Linus Torvalds Date: Tue Mar 7 09:37:28 2017 -0800 Merge tag 'trace-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "There was some breakage with the changes for jump labels in the 4.11 merge window: - powerpc broke as jump labels uses the two LSB bits as flags in initialization. A check was added to make sure that all jump label entries were 4 bytes aligned, but powerpc didn't work that way for modules. Adding an alignment in the module linker script appeared to be the best solution. - Jump labels also added an anonymous union to access those LSB bits as a normal long. But because this structure had static initialization, it broke older compilers that could not statically initialize anonymous unions without brackets. - The command line parameter for setting function graph filter broke the "EMPTY_HASH" descriptor by modifying it instead of creating a new hash to hold the entries. - The command line parameter ftrace_graph_max_depth was added to allow its setting at boot time. It uses existing code and only the command line hook was added. This is not really a fix, but as it uses existing code without affecting anything else, I added it to this release. It was ready before the merge window closed, but I wanted to let it sit in linux-next for a couple of days first" * tag 'trace-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace/graph: Add ftrace_graph_max_depth kernel parameter tracing: Add #undef to fix compile error jump_label: Add comment about initialization order for anonymous unions jump_label: Fix anonymous union initialization module: set __jump_table alignment to 8 ftrace/graph: Do not modify the EMPTY_HASH for the function_graph filter tracing: Fix code comment for ftrace_ops_get_func() commit 8c71fff434e5ecf5ff27bd61db1bc9ac4c2b2a1b Author: Kieran Bingham Date: Fri Mar 3 06:31:48 2017 -0300 [media] v4l: vsp1: Adapt vsp1_du_setup_lif() interface to use a structure The interface to configure the LIF in the VSP1 requires adapting the function prototype for any changes. This makes extending the interface difficult. Change the function prototype to pass a structure which can be easily extended. This changes the means of disabling the pipeline, by now passing a NULL configuration rather than passing either a 0 width or height. [Fixed kerneldoc, made vsp1_du_setup_lif() cfg argument const] Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Acked-by: Dave Airlie Signed-off-by: Mauro Carvalho Chehab drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 8 ++++++-- drivers/media/platform/vsp1/vsp1_drm.c | 33 ++++++++++++++++----------------- include/media/vsp1.h | 13 +++++++++++-- 3 files changed, 33 insertions(+), 21 deletions(-) commit a5e1e6ca94a8cec51571fd62e3eaec269717969c Author: Andre Przywara Date: Thu Feb 16 10:41:20 2017 +0000 KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled The ITS spec says that ITS commands are only processed when the ITS is enabled (section 8.19.4, Enabled, bit[0]). Our emulation was not taking this into account. Fix this by checking the enabled state before handling CWRITER writes. On the other hand that means that CWRITER could advance while the ITS is disabled, and enabling it would need those commands to be processed. Fix this case as well by refactoring actual command processing and calling this from both the GITS_CWRITER and GITS_CTLR handlers. Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 109 ++++++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 44 deletions(-) commit ba4dd156eabdca93501d92a980ba27fa5f4bbd27 Author: Mark Rutland Date: Mon Feb 20 12:30:12 2017 +0000 arm64: KVM: Survive unknown traps from guests Currently we BUG() if we see an ESR_EL2.EC value we don't recognise. As configurable disables/enables are added to the architecture (controlled by RES1/RES0 bits respectively), with associated synchronous exceptions, it may be possible for a guest to trigger exceptions with classes that we don't recognise. While we can't service these exceptions in a manner useful to the guest, we can avoid bringing down the host. Per ARM DDI 0487A.k_iss10775, page D7-1937, EC values within the range 0x00 - 0x2c are reserved for future use with synchronous exceptions, and EC values within the range 0x2d - 0x3f may be used for either synchronous or asynchronous exceptions. The patch makes KVM handle any unknown EC by injecting an UNDEFINED exception into the guest, with a corresponding (ratelimited) warning in the host dmesg. We could later improve on this with with a new (opt-in) exit to the host userspace. Cc: Dave Martin Cc: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier arch/arm64/kvm/handle_exit.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit f050fe7a9164945dd1c28be05bf00e8cfb082ccf Author: Mark Rutland Date: Mon Feb 20 12:30:11 2017 +0000 arm: KVM: Survive unknown traps from guests Currently we BUG() if we see a HSR.EC value we don't recognise. As configurable disables/enables are added to the architecture (controlled by RES1/RES0 bits respectively), with associated synchronous exceptions, it may be possible for a guest to trigger exceptions with classes that we don't recognise. While we can't service these exceptions in a manner useful to the guest, we can avoid bringing down the host. Per ARM DDI 0406C.c, all currently unallocated HSR EC encodings are reserved, and per ARM DDI 0487A.k_iss10775, page G6-4395, EC values within the range 0x00 - 0x2c are reserved for future use with synchronous exceptions, and EC values within the range 0x2d - 0x3f may be used for either synchronous or asynchronous exceptions. The patch makes KVM handle any unknown EC by injecting an UNDEFINED exception into the guest, with a corresponding (ratelimited) warning in the host dmesg. We could later improve on this with with a new (opt-in) exit to the host userspace. Cc: Dave Martin Cc: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_arm.h | 1 + arch/arm/kvm/handle_exit.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) commit 370a0ec1819990f8e2a93df7cc9c0146980ed45f Author: Jintack Lim Date: Mon Mar 6 05:42:37 2017 -0800 KVM: arm/arm64: Let vcpu thread modify its own active state Currently, if a vcpu thread tries to change the active state of an interrupt which is already on the same vcpu's AP list, it will loop forever. Since the VGIC mmio handler is called after a vcpu has already synced back the LR state to the struct vgic_irq, we can just let it proceed safely. Cc: stable@vger.kernel.org Reviewed-by: Marc Zyngier Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 2f707d97982286b307ef2a9b034e19aabc1abb56 Author: Wanpeng Li Date: Mon Mar 6 04:03:28 2017 -0800 KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset Reported by syzkaller: WARNING: CPU: 1 PID: 27742 at arch/x86/kvm/vmx.c:11029 nested_vmx_vmexit+0x5c35/0x74d0 arch/x86/kvm/vmx.c:11029 CPU: 1 PID: 27742 Comm: a.out Not tainted 4.10.0+ #229 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51 panic+0x1fb/0x412 kernel/panic.c:179 __warn+0x1c4/0x1e0 kernel/panic.c:540 warn_slowpath_null+0x2c/0x40 kernel/panic.c:583 nested_vmx_vmexit+0x5c35/0x74d0 arch/x86/kvm/vmx.c:11029 vmx_leave_nested arch/x86/kvm/vmx.c:11136 [inline] vmx_set_msr+0x1565/0x1910 arch/x86/kvm/vmx.c:3324 kvm_set_msr+0xd4/0x170 arch/x86/kvm/x86.c:1099 do_set_msr+0x11e/0x190 arch/x86/kvm/x86.c:1128 __msr_io arch/x86/kvm/x86.c:2577 [inline] msr_io+0x24b/0x450 arch/x86/kvm/x86.c:2614 kvm_arch_vcpu_ioctl+0x35b/0x46a0 arch/x86/kvm/x86.c:3497 kvm_vcpu_ioctl+0x232/0x1120 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2721 vfs_ioctl fs/ioctl.c:43 [inline] do_vfs_ioctl+0x1bf/0x1790 fs/ioctl.c:683 SYSC_ioctl fs/ioctl.c:698 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:689 entry_SYSCALL_64_fastpath+0x1f/0xc2 The syzkaller folks reported a nested_run_pending warning during userspace clear VMX capability which is exposed to L1 before. The warning gets thrown while doing (*(uint32_t*)0x20aecfe8 = (uint32_t)0x1); (*(uint32_t*)0x20aecfec = (uint32_t)0x0); (*(uint32_t*)0x20aecff0 = (uint32_t)0x3a); (*(uint32_t*)0x20aecff4 = (uint32_t)0x0); (*(uint64_t*)0x20aecff8 = (uint64_t)0x0); r[29] = syscall(__NR_ioctl, r[4], 0x4008ae89ul, 0x20aecfe8ul, 0, 0, 0, 0, 0, 0); i.e. KVM_SET_MSR ioctl with struct kvm_msrs { .nmsrs = 1, .pad = 0, .entries = { {.index = MSR_IA32_FEATURE_CONTROL, .reserved = 0, .data = 0} } } The VMLANCH/VMRESUME emulation should be stopped since the CPU is going to reset here. This patch resets the nested_run_pending since the CPU is going to be reset hence there should be nothing pending. Reported-by: Dmitry Vyukov Suggested-by: Radim Krčmář Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Dmitry Vyukov Cc: David Hildenbrand Signed-off-by: Wanpeng Li Reviewed-by: David Hildenbrand Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4b9de5da7e120c7f02395da729f0ec77ce7a6044 Author: Franck Demathieu Date: Mon Mar 6 14:41:06 2017 +0100 irqchip/crossbar: Fix incorrect type of register size The 'size' variable is unsigned according to the dt-bindings. As this variable is used as integer in other places, create a new variable that allows to fix the following sparse issue (-Wtypesign): drivers/irqchip/irq-crossbar.c:279:52: warning: incorrect type in argument 3 (different signedness) drivers/irqchip/irq-crossbar.c:279:52: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:279:52: got int * Signed-off-by: Franck Demathieu Signed-off-by: Marc Zyngier drivers/irqchip/irq-crossbar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 90922a2d03d84de36bf8a9979d62580102f31a92 Author: Shanker Donthineni Date: Tue Mar 7 08:20:38 2017 -0600 irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065 On Qualcomm Datacenter Technologies QDF2400 SoCs, the ITS hardware implementation uses 16Bytes for Interrupt Translation Entry (ITE), but reports an incorrect value of 8Bytes in GITS_TYPER.ITTE_size. It might cause kernel memory corruption depending on the number of MSI(x) that are configured and the amount of memory that has been allocated for ITEs in its_create_device(). This patch fixes the potential memory corruption by setting the correct ITE size to 16Bytes. Cc: stable@vger.kernel.org Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 10 ++++++++++ drivers/irqchip/irq-gic-v3-its.c | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) commit cd3ac9affc43b44f49d7af70d275f0bd426ba643 Author: Songjun Wu Date: Fri Feb 24 15:10:43 2017 +0800 ASoC: atmel-classd: fix audio clock rate Fix the audio clock rate according to the datasheet. Reported-by: Dushara Jayasinghe Signed-off-by: Songjun Wu Acked-by: Nicolas Ferre Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/atmel/atmel-classd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1a6fe41d3c4ff0d26f0b186d774493555ca5282 Author: Takashi Sakamoto Date: Fri Feb 24 11:48:41 2017 +0900 ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer In 'skl_tplg_set_module_init_data()', a pointer to 'params' member of 'struct skl_algo_data' is calculated, then casted to (u32 *) and assigned to a member of configuration data. The configuration data is passed to the other functions and used to process intel IPC. In this processing, the value of member is used to get message data, however this can bring invalid memory access in 'skl_set_module_params()' as a result of calculation of a pointer for actual message data. (sound/soc/intel/skylake/skl-topology.c) skl_tplg_init_pipe_modules() ->skl_tplg_set_module_init_data() (has this bug) ->skl_tplg_set_module_params() (sound/soc/intel/skylake/skl-messages.c) ->skl_set_module_params() ((char *)param) + data_offset This commit fixes the bug. Fixes: abb740033b56 ("ASoC: Intel: Skylake: Add support to configure module params") Signed-off-by: Takashi Sakamoto Acked-by: Vinod Koul Signed-off-by: Mark Brown Cc: # v4.5+ sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8ba2d68e54fbca340ad0fce97397291ba9637bc Author: Heiko Stuebner Date: Wed Mar 1 22:00:42 2017 +0100 clk: rockchip: Make uartpll a child of the gpll on rk3036 The shared uart-pll is on boot a child of the apll that can get changed by cpu frequency scaling. So move it away to the more stable gpll to make sure the uart doesn't break on cpu frequency changes. This turned up during the 4.11 merge-window when commit 6a171b299379 ("serial: 8250_dw: Allow hardware flow control to be used") added general termios enablement making the uart on rk3036 change frequency and thus making it susceptible for the frequency scaling issue. Signed-off-by: Heiko Stuebner Signed-off-by: Stephen Boyd drivers/clk/rockchip/clk-rk3036.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9b1b23f03abdd25ffde8bbfe5824b89bc0448c28 Author: Heiko Stuebner Date: Wed Mar 1 22:00:41 2017 +0100 clk: rockchip: add "," to mux_pll_src_apll_dpll_gpll_usb480m_p on rk3036 The mux_pll_src_apll_dpll_gpll_usb480m_p parent list was missing a "," between the 3rd and 4th parent names, making them fall together and thus lookups fail. Fix that. Fixes: 5190c08b2989 ("clk: rockchip: add clock controller for rk3036") Signed-off-by: Heiko Stuebner Signed-off-by: Stephen Boyd drivers/clk/rockchip/clk-rk3036.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cc5e38f2f0b0b58a22a4c18a56348dd99a71270 Author: Ilya Dryomov Date: Sun Feb 12 17:11:07 2017 +0100 libceph: osd_request_timeout option osd_request_timeout specifies how many seconds to wait for a response from OSDs before returning -ETIMEDOUT from an OSD request. 0 (default) means no limit. osd_request_timeout is osdkeepalive-precise -- in-flight requests are swept through every osdkeepalive seconds. With ack vs commit behaviour gone, abort_request() is really simple. This is based on a patch from Artur Molchanov . Tested-by: Artur Molchanov Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/ceph/libceph.h | 2 ++ include/linux/ceph/osd_client.h | 1 + net/ceph/ceph_common.c | 15 +++++++++++++++ net/ceph/osd_client.c | 36 +++++++++++++++++++++++++++++++++++- 4 files changed, 53 insertions(+), 1 deletion(-) commit 8767b293a4ab6632f9288f34bcf2ab9ba20dca3a Author: Ilya Dryomov Date: Thu Mar 2 19:56:57 2017 +0100 rbd: supported_features bus attribute ... so that userspace can generate meaningful error messages and spell out unsupported features that need to be disabled. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil drivers/block/rbd.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b581a5854eee4b7851dedb0f8c2ceb54fb902c06 Author: Ilya Dryomov Date: Wed Mar 1 17:33:27 2017 +0100 libceph: don't set weight to IN when OSD is destroyed Since ceph.git commit 4e28f9e63644 ("osd/OSDMap: clear osd_info, osd_xinfo on osd deletion"), weight is set to IN when OSD is deleted. This changes the result of applying an incremental for clients, not just OSDs. Because CRUSH computations are obviously affected, pre-4e28f9e63644 servers disagree with post-4e28f9e63644 clients on object placement, resulting in misdirected requests. Mirrors ceph.git commit a6009d1039a55e2c77f431662b3d6cc5a8e8e63f. Fixes: 930c53286977 ("libceph: apply new_state before new_up_client on incrementals") Link: http://tracker.ceph.com/issues/19122 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/osdmap.c | 1 - 1 file changed, 1 deletion(-) commit 9afd30dbc82a9dbea4101aba57beb2a2a7e1b8d5 Author: Ilya Dryomov Date: Tue Feb 28 18:53:53 2017 +0100 libceph: fix crush_decode() for older maps Older (shorter) CRUSH maps too need to be finalized. Fixes: 66a0e2d579db ("crush: remove mutable part of CRUSH map") Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 253160a8ad06bcc1c1db16a58b1f06d5128f6c5e Author: Leonard Crestez Date: Mon Feb 20 15:20:56 2017 +0200 clk: core: Copy connection id Some drivers use sprintf to build clk connection id names but the clk core will save those strings and occasionally print them back. Duplicate the con_id strings instead of fixing all the users. Signed-off-by: Leonard Crestez Signed-off-by: Stephen Boyd drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cda82ace3d4eff6a38f00a65db435fe35a3916f0 Author: Thomas Petazzoni Date: Wed Dec 21 11:26:55 2016 +0100 dt-bindings: arm: update Armada CP110 system controller binding It turns out that in the CP110 HW block present in Marvell Armada 7K/8K SoCs, gatable clock n°18 not only controls SD/MMC, but also the GOP block. This commit updates the Device Tree binding for this piece of hardware accordingly. Signed-off-by: Thomas Petazzoni Signed-off-by: Stephen Boyd .../devicetree/bindings/arm/marvell/cp110-system-controller0.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68598d2ea886322f9b4b0058e5b288418622de95 Author: Dmitry V. Levin Date: Wed Mar 1 02:12:50 2017 +0300 btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h btrfs_err_str function is not called from anywhere and is replicated in the userspace headers for btrfs-progs. It's removal also fixes the following linux/btrfs.h userspace compilation error: /usr/include/linux/btrfs.h: In function 'btrfs_err_str': /usr/include/linux/btrfs.h:740:11: error: 'NULL' undeclared (first use in this function) return NULL; Suggested-by: Jeff Mahoney Signed-off-by: Dmitry V. Levin Reviewed-by: David Sterba Signed-off-by: David Sterba include/uapi/linux/btrfs.h | 27 --------------------------- 1 file changed, 27 deletions(-) commit 7b4af793a7a4f8e04175eb6600ba9c8ba855ad20 Author: Charles Keepax Date: Mon Mar 6 16:54:34 2017 +0000 ASoC: wm_adsp: Acknowledge controls should also check the DSP is running We should not be writing acknowledge controls until the firmware is running, as in the case of preloaded firmwares the DSP memory may be unaccessible to whilst in the preloaded state. This means a write to the control during this time could be lost. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67430a39ca7a6af28aade5acb92d43ee257c1014 Author: Charles Keepax Date: Mon Mar 6 16:54:33 2017 +0000 ASoC: wm_adsp: Return an error on write to a disabled volatile control Volatile controls should only be accessed when the firmware is active, currently however writes to these controls will succeed, but the data will be lost, if the firmware is powered down. Update this behaviour such that an error is returned the same as it is for reads. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2 Author: Frederic Weisbecker Date: Tue Mar 7 10:55:34 2017 +0100 jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC commit 93825f2ec736 converted NSEC_PER_SEC to TICK_NSEC because the author confused NSEC_PER_JIFFY with NSEC_PER_SEC. As a result, the calculation of refined jiffies got broken, triggering lockups. Fixes: 93825f2ec736 ("jiffies: Reuse TICK_NSEC instead of NSEC_PER_JIFFY") Reported-and-tested-by: Meelis Roos Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1488880534-3777-1-git-send-email-fweisbec@gmail.com Signed-off-by: Thomas Gleixner kernel/time/jiffies.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c51f4ae84df0f9df33ac08aa5be50061a8b4242 Author: Josh Poimboeuf Date: Thu Mar 2 16:57:23 2017 -0600 objtool: Fix another GCC jump table detection issue Arnd Bergmann reported a (false positive) objtool warning: drivers/infiniband/sw/rxe/rxe_resp.o: warning: objtool: rxe_responder()+0xfe: sibling call from callable instruction with changed frame pointer The issue is in find_switch_table(). It tries to find a switch statement's jump table by walking backwards from an indirect jump instruction, looking for a relocation to the .rodata section. In this case it stopped walking prematurely: the first .rodata relocation it encountered was for a variable (resp_state_name) instead of a jump table, so it just assumed there wasn't a jump table. The fix is to ignore any .rodata relocation which refers to an ELF object symbol. This works because the jump tables are anonymous and have no symbols associated with them. Reported-by: Arnd Bergmann Tested-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") Link: http://lkml.kernel.org/r/20170302225723.3ndbsnl4hkqbne7a@treble Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 15 ++++++++++++--- tools/objtool/elf.c | 12 ++++++++++++ tools/objtool/elf.h | 1 + 3 files changed, 25 insertions(+), 3 deletions(-) commit bb35e4515411396219431fa235bf21bf9c2794e9 Author: Guenter Roeck Date: Sun Mar 5 17:13:31 2017 -0800 drivers/char/nwbutton: Fix build breakage caused by include file reshuffling Fix: drivers/char/nwbutton.c: In function 'button_sequence_finished': drivers/char/nwbutton.c:134:3: error: implicit declaration of function 'kill_cad_pid' The declaration has been moved from one include file to another. Signed-off-by: Guenter Roeck Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: c3edc4010e9d102 ("sched/headers: Move task_struct::signal and ...") Link: http://lkml.kernel.org/r/1488762811-9022-1-git-send-email-linux@roeck-us.net Signed-off-by: Ingo Molnar drivers/char/nwbutton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80aa1a54f054a1c71cc88e0cad6cfa0d20a10f23 Author: Guenter Roeck Date: Sun Mar 5 10:27:14 2017 -0800 h8300: Fix build breakage caused by header file changes Fix the following h8300 build failures: arch/h8300/kernel/ptrace_h.c: In function ‘trace_trap’: arch/h8300/kernel/ptrace_h.c:253:3: error: implicit declaration of function ‘force_sig’ Signed-off-by: Guenter Roeck Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Fixes: c3edc4010e9d ("sched/headers: Move task_struct::signal and ...") Link: http://lkml.kernel.org/r/1488738434-3504-1-git-send-email-linux@roeck-us.net Signed-off-by: Ingo Molnar arch/h8300/kernel/ptrace_h.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fbdbcea80056acfc8c8506594744f5ec52208c1 Author: Guenter Roeck Date: Sun Mar 5 17:05:57 2017 -0800 avr32: Fix build error caused by include file reshuffling Various avr32 builds fail: arch/avr32/oprofile/backtrace.c:58: error: dereferencing pointer to incomplete type arch/avr32/oprofile/backtrace.c:60: error: implicit declaration of function 'user_mode' Signed-off-by: Guenter Roeck Acked-by: Hans-Christian Noren Egtvedt Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Robert Richter Cc: Thomas Gleixner Cc: oprofile-list@lists.sf.net Fixes: f780d89a0e82 ("sched/headers: Remove from ...") Link: http://lkml.kernel.org/r/1488762357-4500-1-git-send-email-linux@roeck-us.net Signed-off-by: Ingo Molnar arch/avr32/oprofile/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeb810849a20e32aa1b60335e46ea5446ba07e1f Author: James Smart Date: Sat Mar 4 09:30:40 2017 -0800 scsi: lpfc: revise version number to 11.2.0.10 Revise lpfc version number to 11.2.0.10 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5ccc7d61c76006f839b41c6f15876342b46cb02 Author: James Smart Date: Sat Mar 4 09:30:39 2017 -0800 scsi: lpfc: code cleanups in NVME initiator discovery This patch addresses the smatch issues identified by Dan Carpenter in http://www.spinics.net/lists/linux-scsi/msg105665.html The issues are: drivers/scsi/lpfc/lpfc_ct.c:943 lpfc_cmpl_ct_cmd_gft_id() error: we previously assumed 'ndlp' could be null (see line 928) Action: moved under if check drivers/scsi/lpfc/lpfc_nvmet.c:1694 lpfc_nvmet_unsol_issue_abort() error: we previously assumed 'ndlp' could be null (see line 1690) Action: conditionalized arg in printf stmt drivers/scsi/lpfc/lpfc_nvmet.c:1792 lpfc_nvmet_sol_fcp_issue_abort() error: we previously assumed 'ndlp' could be null (see line 1788) Action: conditionalized arg in printf stmt Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2ade92ae6d6572858acb2bde6d3664af3ad592e2 Author: James Smart Date: Sat Mar 4 09:30:38 2017 -0800 scsi: lpfc: code cleanups in NVME initiator base This patch addresses the smatch issues identified by Dan Carpenter in http://www.spinics.net/lists/linux-scsi/msg105663.html The issues are: drivers/scsi/lpfc/lpfc_hbadisc.c:316 lpfc_dev_loss_tmo_handler() warn: we tested 'vport->load_flag & 2' before and it was 'false' Action: removed item from test drivers/scsi/lpfc/lpfc_hbadisc.c:701 lpfc_work_done() warn: test_bit() takes a bit number Action: changed definition so bit number drivers/scsi/lpfc/lpfc_hbadisc.c:2206 lpfc_mbx_cmpl_fcf_scan_read_fcf_rec() error: uninitialized symbol 'vlan_id'. drivers/scsi/lpfc/lpfc_hbadisc.c:2582 lpfc_mbx_cmpl_fcf_rr_read_fcf_rec() error: uninitialized symbol 'vlan_id'. drivers/scsi/lpfc/lpfc_hbadisc.c:2683 lpfc_mbx_cmpl_read_fcf_rec() error: uninitialized symbol 'vlan_id'. Action: initilized value drivers/scsi/lpfc/lpfc_hbadisc.c:4025 lpfc_register_remote_port() error: we previously assumed 'rdata' could be null (see line 4023) Action: refactored check block drivers/scsi/lpfc/lpfc_hbadisc.c:4613 lpfc_sli4_dequeue_nport_iocbs() error: double unlock 'irq:' Action: removed inner irq reference Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) commit cd46cdedb3238f1f878c42650ec05c6344c7083d Author: James Smart Date: Sat Mar 4 09:30:37 2017 -0800 scsi: lpfc: correct rdp diag portnames NVME merge reverted diag port names to the physical port. They should be the vport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ba3bd6e2a9a2753439a1fd1fe39e8d5162fb3aa9 Author: James Smart Date: Sat Mar 4 09:30:36 2017 -0800 scsi: lpfc: remove dead sli3 nvme code Remove nvme teardown calls that should not be there on sli3 devices Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 5 ----- 1 file changed, 5 deletions(-) commit da6b044a28fe603fe2c3fd908cda8150aa0abe74 Author: James Smart Date: Sat Mar 4 09:30:35 2017 -0800 scsi: lpfc: correct double print Correct a merge error that had debug data printed twice for the same element Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 43140ca68d1a071ddbe92f10a3256e01701ae390 Author: James Smart Date: Sat Mar 4 09:30:34 2017 -0800 scsi: lpfc: Rename LPFC_MAX_EQ_DELAY to LPFC_MAX_EQ_DELAY_EQID_CNT Without apriori understanding of what the define is, the name gives a very different impression of what it is (a max delay value for an EQ). Rename the define so it reflects what it is: the number of EQ IDs that can be set in one instance of the MODIFY_EQ_DELAY mbx command. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 3 ++- drivers/scsi/lpfc/lpfc_hw4.h | 4 ++-- drivers/scsi/lpfc/lpfc_init.c | 7 ++----- drivers/scsi/lpfc/lpfc_sli.c | 5 ++++- 4 files changed, 10 insertions(+), 9 deletions(-) commit 166d721120c1cf768af11706c3e0411324bf138f Author: James Smart Date: Sat Mar 4 09:30:33 2017 -0800 scsi: lpfc: Rework lpfc Kconfig for NVME options Reworked Kconfig so that lfpc only requires the scsi stack. NVME Initiator and NVME Target support can be enabled if the other NVMe subsystems have been enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 19 ++++++++++++++++--- drivers/scsi/lpfc/lpfc_nvme.c | 18 +++++++++++++++--- drivers/scsi/lpfc/lpfc_nvmet.c | 10 ++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) commit 856984b71cefab1580e9439e5382db1247d689b0 Author: James Smart Date: Sat Mar 4 09:30:32 2017 -0800 scsi: lpfc: add transport eh_timed_out reference Christoph's prior patch missed the template for the sli3 adapters, which is now the "no host reset" template. Add the transport eh_timed_out handler to the no host reset template Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 1 + 1 file changed, 1 insertion(+) commit 96418b5e2c8867da3279d877f5d1ffabfe460c3d Author: James Smart Date: Sat Mar 4 09:30:31 2017 -0800 scsi: lpfc: Fix eh_deadline setting for sli3 adapters. A previous change unilaterally removed the hba reset entry point from the sli3 host template. This was done to allow tape devices being used for back up from being removed. Why was this done ? When there was non-responding device on the fabric, the error escalation policy would escalate to the reset handler. When the reset handler was called, it would reset the adapter, dropping link, thus logging out and terminating all i/o's - on any target. If there was a tape device on the same adapter that wasn't in error, it would kill the tape i/o's, effectively killing the tape device state. With the reset point removed, the adapter reset avoided the fabric logout, allowing the other devices to continue to operate unaffected. A hack - yes. Hint: we really need a transport I_T nexus reset callback added to the eh process (in between the SCSI target reset and hba reset points), so a fc logout could occur to the one bad target only and stop the error escalation process. This patch commonizes the approach so it can be used for sli3 and sli4 adapters, but mandates the admin, via module parameter, specifically identify which adapters the resets are to be removed for. Additionally, bus_reset, which sends Target Reset TMFs to all targets, is also removed from the template as it too has the same effect as the adapter reset. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Laurence Oberman Tested-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_attr.c | 6 +++++ drivers/scsi/lpfc/lpfc_crtn.h | 4 ++- drivers/scsi/lpfc/lpfc_init.c | 61 ++++++++++++++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_scsi.c | 3 +-- 5 files changed, 69 insertions(+), 6 deletions(-) commit 318083ad9230ff13cdac34ae4c4135e0c4e2d9ad Author: James Smart Date: Sat Mar 4 09:30:30 2017 -0800 scsi: lpfc: add NVME exchange aborts previous code did little more than log a message. This patch adds abort path support, modeled after the SCSI code paths. Currently addresses only the initiator path. Target path under development, but stubbed out. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_hbadisc.c | 2 ++ drivers/scsi/lpfc/lpfc_init.c | 7 +++++ drivers/scsi/lpfc/lpfc_nvme.c | 64 ++++++++++++++++++++++++++++++++++++---- drivers/scsi/lpfc/lpfc_nvme.h | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 21 +++++++++++-- drivers/scsi/lpfc/lpfc_sli.c | 51 ++++++++++++++++++++++++++++++-- drivers/scsi/lpfc/lpfc_sli4.h | 6 ++++ 8 files changed, 143 insertions(+), 10 deletions(-) commit 3ebd9b4701ef77358030a0ef9cb6586db2149712 Author: James Smart Date: Sat Mar 4 09:30:29 2017 -0800 scsi: lpfc: Fix nvme allocation bug on failed nvme_fc_register_localport nvme bufs get allocated even when the registration fails. Move allocation into the rsgistration success path. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5068b46958870633ea340692f301507ef78d00b Author: James Smart Date: Sat Mar 4 09:30:28 2017 -0800 scsi: lpfc: Fix IO submission if WQ is full For both initiator and target: if WQ is full, return -EBUSY. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit b06a622ffe8dddcc09dad23dc768f7d1540fb4d6 Author: James Smart Date: Sat Mar 4 09:30:27 2017 -0800 scsi: lpfc: Fix NVME CMD IU byte swapped word 1 problem Word 1 in NVME CMD IU appears byte swapped from value placed in WQE Should be Big Endian value in WQE word 16 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 8b3616392d32d2b04ce649caf6684da1b7050d8c Author: James Smart Date: Sat Mar 4 09:30:26 2017 -0800 scsi: lpfc: Fix RCTL value on NVME LS request and response NVME LS requests and responses had wrong R_CTL values. Use the FC4 ELS Request and Response defines (defines badly named, they are FC4 LS's) instead of the base ELS values. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5d181531bc6169e19a02a27d202cf0e982db9d0e Author: James Smart Date: Sat Mar 4 09:30:25 2017 -0800 scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters if REG_VPI fails, the driver was incorrectly issuing INIT_VFI (a SLI4 command) on a SLI3 adapter. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d11f54b7d1d40463024be3b40ab7be2c8a84fa43 Author: James Smart Date: Sat Mar 4 09:30:24 2017 -0800 scsi: lpfc: fix missing spin_unlock on sql_list_lock From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out of the while loop and the exit path will then unlock and return NULL as was the original intention. Detected by CoverityScan, CID#1411635 ("Missing unlock") Signed-off-by: Colin Ian King Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 332ba3b5d6d27a60d445704ed7c88c7e9f958a30 Author: James Smart Date: Sat Mar 4 09:30:23 2017 -0800 scsi: lpfc: don't dereference dma_buf->iocbq before null check From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug. Fix this by only dereferencing it only once we have passed a null check on the pointer. Detected by CoverityScan, CID#1411652 ("Dereference before null check") Signed-off-by: Colin Ian King Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aabe84b8a1bb7c3f75fb6a23dc96f8999bdcc8f Author: James Smart Date: Sat Mar 4 09:30:22 2017 -0800 scsi: lpfc: sanity check hrq is null before dereferencing it From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected by CoverityScan, CID#1411650 ("Dereference before null check") Signed-off-by: Colin Ian King Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 70e5afd57d6d97d69bf5fd0187c2bb5a79990504 Author: James Smart Date: Sat Mar 4 09:30:21 2017 -0800 scsi: lpfc: remove redundant assignment of sgel From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan, CID#1411658 ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 - 1 file changed, 1 deletion(-) commit 33cc559a81397bc813c392617d40ddfdfa3cffbd Author: Tomas Jasek Date: Fri Mar 3 13:45:48 2017 +0100 scsi: lpfc: replace init_timer by setup_timer This patch shortens every init_timer in lpfc module followed by function and data assignment using setup_timer. This is purely cleanup patch, it does not add new functionality nor remove any existing functionality. An init_timer call in this form: init_timer(&vport->fc_disctmo); vport->fc_disctmo.function = lpfc_disc_timeout; vport->fc_disctmo.data = vport; is shortened to: setup_timer(&vport->fc_disctmo, lpfc_disc_timeout, vport); It increases readability and reduces chances of mistakes done by developers. Signed-off-by: Tomas Jasek Signed-off-by: Jiri Slaby Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hbadisc.c | 5 ++--- drivers/scsi/lpfc/lpfc_init.c | 47 +++++++++++++++------------------------- 2 files changed, 19 insertions(+), 33 deletions(-) commit fd2b18b4a7bf01453324733a18297ae9a197a4ae Author: Joe Perches Date: Mon Mar 6 10:32:27 2017 -0800 scsi: qedf: Use vsprintf extension %pad Using %llx for a dma_addr_t can lead to format/argument mismatches. Use %pad and the address of the dma_addr_t instead. Signed-off-by: Joe Perches Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db6b2060bcae1ce1f9bde73a423e710b625ae1ef Author: Joe Perches Date: Sat Mar 4 00:07:04 2017 -0800 scsi: qedf: Fix defective logging format and argument mismatches Add __printf compiler verification of format and arguments. Fix fallout. Signed-off-by: Joe Perches Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_dbg.h | 13 ++++++++----- drivers/scsi/qedf/qedf_fip.c | 2 +- drivers/scsi/qedf/qedf_io.c | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) commit c527de41aea24c2cdb6638818008d810013b4d39 Author: Christoph Hellwig Date: Fri Mar 3 07:57:16 2017 -0700 scsi: vmw_pvscsi: handle the return value from pci_alloc_irq_vectors correctly It returns the number of vectors allocated when successful, so check for a negative error only. Fixes: 2e48e349 ("scsi: vmw_pvscsi: switch to pci_alloc_irq_vectors") Signed-off-by: Christoph Hellwig Reported-by: Loïc Yhuel Tested-by: Loïc Yhuel Signed-off-by: Martin K. Petersen drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23456565acf6d452e0368f7380aecd584c019c67 Author: Joe Perches Date: Thu Mar 2 17:14:47 2017 -0800 scsi: qla2xxx: Fix ql_dump_buffer Recent printk changes for KERN_CONT cause this logging to be defectively emitted on multiple lines. Fix it. Also reduces object size a trivial amount. $ size drivers/scsi/qla2xxx/qla_dbg.o* text data bss dec hex filename 39125 0 0 39125 98d5 drivers/scsi/qla2xxx/qla_dbg.o.new 39164 0 0 39164 98fc drivers/scsi/qla2xxx/qla_dbg.o.old Signed-off-by: Joe Perches Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 934767c56b0d9dbb95a40e9e6e4d9dcdc3a165ad Author: Raghava Aditya Renukunta Date: Thu Mar 2 09:21:33 2017 -0800 scsi: aacraid: Fix typo in blink status The return status of the adapter check on KERNEL_PANIC is supposed to be the upper 16 bits of the OMR status register. Fixes: c421530bf848604e (scsi: aacraid: Reorder Adpater status check) Reported-by: Dan Carpenter Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd571195c9535c0b074fc7cd1b541b93817ed647 Author: Arnd Bergmann Date: Thu Mar 2 15:58:03 2017 +0100 scsi: qedi: fix build error without DEBUG_FS Without CONFIG_DEBUG_FS, we run into a link error: drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_poll': qedi_iscsi.c:(.text.qedi_ep_poll+0x134): undefined reference to `do_not_recover' drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_disconnect': qedi_iscsi.c:(.text.qedi_ep_disconnect+0x36c): undefined reference to `do_not_recover' drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_connect': qedi_iscsi.c:(.text.qedi_ep_connect+0x350): undefined reference to `do_not_recover' drivers/scsi/qedi/qedi_fw.o: In function `qedi_tmf_work': qedi_fw.c:(.text.qedi_tmf_work+0x3b4): undefined reference to `do_not_recover' This defines the symbol as a constant in this case, as there is no way to set it to anything other than zero without DEBUG_FS. In addition, I'm renaming it to qedi_do_not_recover in order to put it into a driver specific namespace, as "do_not_recover" is a really bad name for a kernel-wide global identifier when it is used only in one driver. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Reviewed-by: Johannes Thumshirn Signed-off-by: Arnd Bergmann Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_debugfs.c | 16 ++++++++-------- drivers/scsi/qedi/qedi_fw.c | 4 ++-- drivers/scsi/qedi/qedi_gbl.h | 8 +++++++- drivers/scsi/qedi/qedi_iscsi.c | 8 ++++---- 4 files changed, 21 insertions(+), 15 deletions(-) commit 040757f738e13caaa9c5078bca79aa97e11dde88 Author: Eric W. Biederman Date: Sun Mar 5 15:03:22 2017 -0600 ucount: Remove the atomicity from ucount->count Always increment/decrement ucount->count under the ucounts_lock. The increments are there already and moving the decrements there means the locking logic of the code is simpler. This simplification in the locking logic fixes a race between put_ucounts and get_ucounts that could result in a use-after-free because the count could go zero then be found by get_ucounts and then be freed by put_ucounts. A bug presumably this one was found by a combination of syzkaller and KASAN. JongWhan Kim reported the syzkaller failure and Dmitry Vyukov spotted the race in the code. Cc: stable@vger.kernel.org Fixes: f6b2db1a3e8d ("userns: Make the count of user namespaces per user") Reported-by: JongHwan Kim Reported-by: Dmitry Vyukov Reviewed-by: Andrei Vagin Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 2 +- kernel/ucount.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 8a1df543de8ad879d3c80bdda4c67ac4f82e7ee0 Author: Tahsin Erdogan Date: Sat Feb 25 12:59:26 2017 -0800 percpu: remove unused chunk_alloc parameter from pcpu_get_pages() pcpu_get_pages() doesn't use chunk_alloc parameter, remove it. Fixes: fbbb7f4e149f ("percpu: remove the usage of separate populated bitmap in percpu-vm") Signed-off-by: Tahsin Erdogan Signed-off-by: Tejun Heo mm/percpu-vm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 320661b08dd6f1746d5c7ab4eb435ec64b97cd45 Author: Tahsin Erdogan Date: Sat Feb 25 13:00:19 2017 -0800 percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages Update to pcpu_nr_empty_pop_pages in pcpu_alloc() is currently done without holding pcpu_lock. This can lead to bad updates to the variable. Add missing lock calls. Fixes: b539b87fed37 ("percpu: implmeent pcpu_nr_empty_pop_pages and chunk->nr_populated") Signed-off-by: Tahsin Erdogan Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v3.18+ mm/percpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 637fdbae60d6cb9f6e963c1079d7e0445c86ff7d Author: Tejun Heo Date: Mon Mar 6 15:33:42 2017 -0500 workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq If queue_delayed_work() gets called with NULL @wq, the kernel will oops asynchronuosly on timer expiration which isn't too helpful in tracking down the offender. This actually happened with smc. __queue_delayed_work() already does several input sanity checks synchronously. Add NULL @wq check. Reported-by: Dave Jones Link: http://lkml.kernel.org/r/20170227171439.jshx3qplflyrgcv7@codemonkey.org.uk Signed-off-by: Tejun Heo kernel/workqueue.c | 1 + 1 file changed, 1 insertion(+) commit 0580b762a4d6b70817476b90042813f8573283fa Author: Tejun Heo Date: Mon Mar 6 15:26:54 2017 -0500 libata: drop WARN from protocol error in ata_sff_qc_issue() ata_sff_qc_issue() expects upper layers to never issue commands on a command protocol that it doesn't implement. While the assumption holds fine with the usual IO path, nothing filters based on the command protocol in the passthrough path (which was added later), allowing the warning to be tripped with a passthrough command with the right (well, wrong) protocol. Failing with AC_ERR_SYSTEM is the right thing to do anyway. Remove the unnecessary WARN. Reported-by: Dmitry Vyukov Link: http://lkml.kernel.org/r/CACT4Y+bXkvevNZU8uP6X0QVqsj6wNoUA_1exfTSOzc+SmUtMOA@mail.gmail.com Signed-off-by: Tejun Heo drivers/ata/libata-sff.c | 1 - 1 file changed, 1 deletion(-) commit d85fc67dd11e9a32966140677d4d6429ca540b25 Author: Gwendal Grignou Date: Fri Mar 3 09:00:09 2017 -0800 libata: transport: Remove circular dependency at free time Without this patch, failed probe would not free resources like irq. ata port tdev object currently hold a reference to the ata port object. Therefore the ata port object release function will not get called until the ata_tport_release is called. But that would never happen, releasing the last reference of ata port dev is done by scsi_host_release, which is called by ata_host_release when the ata port object is released. The ata device objects actually do not need to explicitly hold a reference to their real counterpart, given the transport objects are the children of these objects and device_add() is call for each child. We know the parent will not be deleted until we call the child's device_del(). Reported-by: Matthew Whitehead Tested-by: Matthew Whitehead Suggested-by: Tejun Heo Signed-off-by: Gwendal Grignou Signed-off-by: Tejun Heo drivers/ata/libata-transport.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b6a6759daf55dade2b65089957832759d502acfb Author: Kees Cook Date: Sat Feb 25 01:56:48 2017 -0800 cgroups: censor kernel pointer in debug files As found in grsecurity, this avoids exposing a kernel pointer through the cgroup debug entries. Signed-off-by: Kees Cook Signed-off-by: Tejun Heo kernel/cgroup/cgroup-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d18c2747f937f1b5ec65ce6bf4ccb9ca1aea9e8 Author: Tejun Heo Date: Wed Mar 1 15:39:07 2017 -0500 cgroup/pids: remove spurious suspicious RCU usage warning pids_can_fork() is special in that the css association is guaranteed to be stable throughout the function and thus doesn't need RCU protection around task_css access. When determining the css to charge the pid, task_css_check() is used to override the RCU sanity check. While adding a warning message on fork rejection from pids limit, 135b8b37bd91 ("cgroup: Add pids controller event when fork fails because of pid limit") incorrectly added a task_css access which is neither RCU protected or explicitly annotated. This triggers the following suspicious RCU usage warning when RCU debugging is enabled. cgroup: fork rejected by pids controller in =============================== [ ERR: suspicious RCU usage. ] 4.10.0-work+ #1 Not tainted ------------------------------- ./include/linux/cgroup.h:435 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 0 1 lock held by bash/1748: #0: (&cgroup_threadgroup_rwsem){+++++.}, at: [] _do_fork+0xe6/0x6e0 stack backtrace: CPU: 3 PID: 1748 Comm: bash Not tainted 4.10.0-work+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.fc25 04/01/2014 Call Trace: dump_stack+0x68/0x93 lockdep_rcu_suspicious+0xd7/0x110 pids_can_fork+0x1c7/0x1d0 cgroup_can_fork+0x67/0xc0 copy_process.part.58+0x1709/0x1e90 _do_fork+0xe6/0x6e0 SyS_clone+0x19/0x20 do_syscall_64+0x5c/0x140 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f7853fab93a RSP: 002b:00007ffc12d05c90 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7853fab93a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007ffc12d05cc0 R08: 0000000000000000 R09: 00007f78548db700 R10: 00007f78548db9d0 R11: 0000000000000246 R12: 00000000000006d4 R13: 0000000000000001 R14: 0000000000000000 R15: 000055e3ebe2c04d /asdf There's no reason to dereference task_css again here when the associated css is already available. Fix it by replacing the task_cgroup() call with css->cgroup. Signed-off-by: Tejun Heo Reported-by: Mike Galbraith Fixes: 135b8b37bd91 ("cgroup: Add pids controller event when fork fails because of pid limit") Cc: Kenny Yu Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Tejun Heo kernel/cgroup/pids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 312eb712e15868236dd03c67971ab2c1d79b4ce6 Author: Tobias Klauser Date: Fri Feb 17 18:44:11 2017 +0100 cgroup: Fix indenting in PID controller documentation Follow the common documentation style in the file and indent the interface file description by a tab instead of just a space. Signed-off-by: Tobias Klauser Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c771c14baa3319c85512e575671bf0bb18824c11 Author: Eryu Guan Date: Thu Mar 2 15:02:06 2017 -0800 iomap: invalidate page caches should be after iomap_dio_complete() in direct write After XFS switching to iomap based DIO (commit acdda3aae146 ("xfs: use iomap_dio_rw")), I started to notice dio29/dio30 tests failures from LTP run on ppc64 hosts, and they can be reproduced on x86_64 hosts with 512B/1k block size XFS too. dio29 diotest3 -b 65536 -n 100 -i 1000 -o 1024000 dio30 diotest6 -b 65536 -n 100 -i 1000 -o 1024000 The failure message is like: bufcmp: offset 0: Expected: 0x62, got 0x0 diotest03 1 TPASS : Read with Direct IO, Write without diotest03 2 TFAIL : diotest3.c:142: comparsion failed; child=98 offset=1425408 diotest03 3 TFAIL : diotest3.c:194: Write Direct-child 98 failed Direct write wrote 0x62 but buffer read got zero. This is because, when doing direct write to a hole or preallocated file, we invalidate the page caches before converting the extent from unwritten state to normal state, which is done by iomap_dio_complete(), thus leave a window for other buffer reader to cache the unwritten state extent. Consider this case, with sub-page blocksize XFS, two processes are direct writing to different blocksize-aligned regions (say 512B) of the same preallocated file, and reading the region back via buffered I/O to compare contents. process A, region [0,512] process B, region [512,1024] xfs_file_write_iter xfs_file_aio_dio_write iomap_dio_rw iomap_apply invalidate_inode_pages2_range xfs_file_write_iter xfs_file_aio_dio_write iomap_dio_rw iomap_apply invalidate_inode_pages2_range iomap_dio_complete xfs_file_read_iter xfs_file_buffered_aio_read generic_file_read_iter do_generic_file_read iomap_dio_complete xfs_file_read_iter Process A first invalidates page caches, at this point the underlying extent is still in unwritten state (iomap_dio_complete not called yet), and process B finishs direct write and populates page caches via readahead, which caches zeros in page for region A, then process A reads zeros from page cache, instead of the actual data. Fix it by invalidating page caches after converting unwritten extent to make sure we read content from disk after extent state changed, as what we did before switching to iomap based dio. Also introduce a new 'start' variable to save the original write offset (iomap_dio_complete() updates iocb->ki_pos), and a 'err' variable for invalidating caches result, cause we can't reuse 'ret' anymore. Signed-off-by: Eryu Guan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit e24bce8fb4c26bd0d8eca74cbbee1ad049246be3 Merge: b92675d c1ae3cf Author: Tony Lindgren Date: Mon Mar 6 08:37:53 2017 -0800 Merge tag 'v4.11-rc1' into omap-for-v4.11/fixes Linux 4.11-rc1 commit 587d7e72aedca91cee80c0a56811649c3efab765 Author: Jim Mattson Date: Thu Mar 2 12:41:48 2017 -0800 kvm: nVMX: VMCLEAR should not cause the vCPU to shut down VMCLEAR should silently ignore a failure to clear the launch state of the VMCS referenced by the operand. Signed-off-by: Jim Mattson [Changed "kvm_write_guest(vcpu->kvm" to "kvm_vcpu_write_guest(vcpu".] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 4bd035eae255a4f1464dca063885fa415e58c12e Author: Colin Ian King Date: Thu Feb 23 00:26:09 2017 +0000 EDAC, xgene: Fix wrongly spelled "procesing" Fix spelling mistake in dev_err message. Signed-off-by: Colin Ian King Reviewed-by: Loc Ho Cc: linux-edac Link: http://lkml.kernel.org/r/20170223002609.9440-1-colin.king@canonical.com Signed-off-by: Borislav Petkov drivers/edac/xgene_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef5e2fa9f65befa12f1113c734602d2c1964d2a5 Author: Raz Manor Date: Thu Feb 9 09:41:08 2017 +0200 usb: gadget: udc: net2280: Fix tmp reusage in net2280 driver In the function scan_dma_completions() there is a reusage of tmp variable. That coused a wrong value being used in some case when reading a short packet terminated transaction from an endpoint, in 2 concecutive reads. This was my logic for the patch: The req->td->dmadesc equals to 0 iff: -- There was a transaction ending with a short packet, and -- The read() to read it was shorter than the transaction length, and -- The read() to complete it is longer than the residue. I believe this is true from the printouts of various cases, but I can't be positive it is correct. Entering this if, there should be no more data in the endpoint (a short packet terminated the transaction). If there is, the transaction wasn't really done and we should exit and wait for it to finish entirely. That is the inner if. That inner if should never happen, but it is there to be on the safe side. That is why it is marked with the comment /* paranoia */. The size of the data available in the endpoint is ep->dma->dmacount and it is read to tmp. This entire clause is based on my own educated guesses. If we passed that inner if without breaking in the original code, than tmp & DMA_BYTE_MASK_COUNT== 0. That means we will always pass dma bytes count of 0 to dma_done(), meaning all the requested bytes were read. dma_done() reports back to the upper layer that the request (read()) was done and how many bytes were read. In the original code that would always be the request size, regardless of the actual size of the data. That did not make sense to me at all. However, the original value of tmp is req->td->dmacount, which is the dmacount value when the request's dma transaction was finished. And that is a much more reasonable value to report back to the caller. To recreate the problem: Read from a bulk out endpoint in a loop, 1024 * n bytes in each iteration. Connect the PLX to a host you can control. Send to that endpoint 1024 * n + x bytes, such that 0 < x < 1024 * n and (x % 1024) != 0 You would expect the first read() to return 1024 * n and the second read() to return x. But you will get the first read to return 1024 * n and the second one to return 1024 * n. That is true for every positive integer n. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Raz Manor Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2280.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit df7545719a14fa7b481896fb8689e23d0a00f682 Author: Petr Cvek Date: Fri Feb 24 02:54:56 2017 +0100 usb: gadget: pxa27x: Test for a valid argument pointer A call usb_put_phy(udc->transceiver) must be tested for a valid pointer. Use an already existing test for usb_unregister_notifier call. Acked-by: Robert Jarzmik Reported-by: Robert Jarzmik Signed-off-by: Petr Cvek Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0913750f9fb6f26bcd00c8f9dd9a8d1b8d031246 Author: Roger Quadros Date: Wed Feb 15 13:38:22 2017 +0200 usb: dwc3-omap: Fix missing break in dwc3_omap_set_mailbox() We need to break from all cases if we want to treat each one of them separately. Reported-by: Gustavo A. R. Silva Fixes: d2728fb3e01f ("usb: dwc3: omap: Pass VBUS and ID events transparently") Cc: #v4.8+ Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-omap.c | 1 + 1 file changed, 1 insertion(+) commit 1551e35ea4189c1f7199fe278395fc94196715f2 Author: Roger Quadros Date: Wed Feb 15 14:16:26 2017 +0200 usb: dwc3: gadget: Fix system suspend/resume on TI platforms On TI platforms (dra7, am437x), the DWC3_DSTS_DEVCTRLHLT bit is not set after the device controller is stopped via DWC3_DCTL_RUN_STOP. If we don't disconnect and stop the gadget, it stops working after a system resume with the trace below. There is no point in preventing gadget disconnect and gadget stop during system suspend/resume as we're going to suspend in any case, whether DEVCTRLHLT timed out or not. [ 141.727480] ------------[ cut here ]------------ [ 141.732349] WARNING: CPU: 1 PID: 2135 at drivers/usb/dwc3/gadget.c:2384 dwc3_stop_active_transfer.constprop.4+0xc4/0xe4 [dwc3] [ 141.744299] Modules linked in: usb_f_ss_lb g_zero libcomposite xhci_plat_hcd xhci_hcd usbcore dwc3 evdev udc_core m25p80 usb_common spi_nor snd_soc_davinci_mcasp snd_soc_simple_card snd_soc_edma snd_soc_tlv3e [ 141.792163] CPU: 1 PID: 2135 Comm: irq/456-dwc3 Not tainted 4.10.0-rc8 #1138 [ 141.799547] Hardware name: Generic DRA74X (Flattened Device Tree) [ 141.805940] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 141.814066] [] (show_stack) from [] (dump_stack+0xac/0xe0) [ 141.821648] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 141.828955] [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [ 141.836902] [] (warn_slowpath_null) from [] (dwc3_stop_active_transfer.constprop.4+0xc4/0xe4 [dwc3]) [ 141.848329] [] (dwc3_stop_active_transfer.constprop.4 [dwc3]) from [] (__dwc3_gadget_ep_disable+0x64/0x528 [dwc3]) [ 141.861034] [] (__dwc3_gadget_ep_disable [dwc3]) from [] (dwc3_gadget_ep_disable+0x3c/0xc8 [dwc3]) [ 141.872280] [] (dwc3_gadget_ep_disable [dwc3]) from [] (usb_ep_disable+0x11c/0x18c [udc_core]) [ 141.883160] [] (usb_ep_disable [udc_core]) from [] (disable_ep+0x18/0x54 [usb_f_ss_lb]) [ 141.893408] [] (disable_ep [usb_f_ss_lb]) from [] (disable_endpoints+0x18/0x50 [usb_f_ss_lb]) [ 141.904168] [] (disable_endpoints [usb_f_ss_lb]) from [] (disable_source_sink+0x2c/0x34 [usb_f_ss_lb]) [ 141.915771] [] (disable_source_sink [usb_f_ss_lb]) from [] (reset_config+0x48/0x7c [libcomposite]) [ 141.927012] [] (reset_config [libcomposite]) from [] (composite_disconnect+0x2c/0x54 [libcomposite]) [ 141.938444] [] (composite_disconnect [libcomposite]) from [] (usb_gadget_udc_reset+0x10/0x34 [udc_core]) [ 141.950237] [] (usb_gadget_udc_reset [udc_core]) from [] (dwc3_gadget_reset_interrupt+0x64/0x698 [dwc3]) [ 141.962022] [] (dwc3_gadget_reset_interrupt [dwc3]) from [] (dwc3_thread_interrupt+0x618/0x1a3c [dwc3]) [ 141.973723] [] (dwc3_thread_interrupt [dwc3]) from [] (irq_thread_fn+0x1c/0x54) [ 141.983215] [] (irq_thread_fn) from [] (irq_thread+0x120/0x1f0) [ 141.991247] [] (irq_thread) from [] (kthread+0xf8/0x138) [ 141.998641] [] (kthread) from [] (ret_from_fork+0x14/0x24) [ 142.006213] ---[ end trace b4ecfe9f175b9a9c ]--- Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3ba534df815f233535b5a3dd3de41055666bbd21 Author: Janusz Dziedzic Date: Thu Feb 16 14:54:12 2017 +0100 Revert "usb: gadget: f_fs: Fix ExtCompat descriptor validation" This reverts commit ac670a3a650b899fc020b81f63e810d06015b865. This introduce bug we already fixed in commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 wof OS_DESC_EXT_COMPAT") Next FFS (adb) SS enumeration fail with Windows OS. Signed-off-by: Janusz Dziedzic Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6e7aeeaf235901c42ec35de4633c7c69501d303 Author: Christophe JAILLET Date: Tue Feb 21 22:33:11 2017 +0100 USB: gadgetfs: Fix a potential memory leak in 'dev_config()' 'kbuf' is allocated just a few lines above using 'memdup_user()'. If the 'if (dev->buf)' test fails, this memory is never released. Signed-off-by: Christophe JAILLET Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4242820277b5378c9e4064e79306f326d731472f Author: Arnd Bergmann Date: Wed Feb 22 11:33:27 2017 +0100 usb: gadget: udc: atmel: fix debug output The debug output now contains the wrong variable, as seen from the compiler warning: drivers/usb/gadget/udc/atmel_usba_udc.c: In function 'usba_ep_enable': drivers/usb/gadget/udc/atmel_usba_udc.c:632:550: error: 'ept_cfg' may be used uninitialized in this function [-Werror=maybe-uninitialized] DBG(DBG_ERR, "%s: EPT_CFG = 0x%lx (maxpacket = %lu)\n", This changes the debug output the same way as the other code. Fixes: 741d2558bf0a ("usb: gadget: udc: atmel: Update endpoint allocation scheme") Signed-off-by: Arnd Bergmann Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73561128eb72ca04c3be6e240f162a861bf68a86 Author: Franck Demathieu Date: Mon Feb 27 11:52:46 2017 +0100 usb: dwc3: Fix incorrect type for utmi mode The utmi mode is unsigned according the dt-bindings. Fix sparse issue (-Wtypesign): drivers/usb/dwc3/dwc3-omap.c:391:50: warning: incorrect type in argument 3 (different signedness) drivers/usb/dwc3/dwc3-omap.c:391:50: expected unsigned int [usertype] *out_value drivers/usb/dwc3/dwc3-omap.c:391:50: got int * Signed-off-by: Franck Demathieu Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38355b2a44776c25b0f2ad466e8c51bb805b3032 Author: John Keeping Date: Tue Feb 28 10:55:30 2017 +0000 usb: gadget: configs: plug memory leak When binding a gadget to a device, "name" is stored in gi->udc_name, but this does not happen when unregistering and the string is leaked. Signed-off-by: John Keeping Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+) commit b3e228473e6cec7cf83b4025b4570c8066ab2dd8 Author: Mian Yousaf Kaukab Date: Thu Mar 2 16:11:47 2017 +0100 irqdomain: Add empty irq_domain_check_msi_remap Fix following build error for s390: drivers/vfio/vfio_iommu_type1.c: In function 'vfio_iommu_type1_attach_group': drivers/vfio/vfio_iommu_type1.c:1290:25: error: implicit declaration of function 'irq_domain_check_msi_remap' Acked-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Marc Zyngier include/linux/irqdomain.h | 4 ++++ 1 file changed, 4 insertions(+) commit 077dbaee9df53c597df532a08d721d03f4570f3d Author: Franck Demathieu Date: Thu Feb 23 10:48:55 2017 +0100 irqchip/crossbar: Fix incorrect type of local variables The max and entry variables are unsigned according to the dt-bindings. Fix following 3 sparse issues (-Wtypesign): drivers/irqchip/irq-crossbar.c:222:52: warning: incorrect type in argument 3 (different signedness) drivers/irqchip/irq-crossbar.c:222:52: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:222:52: got int * drivers/irqchip/irq-crossbar.c:245:56: warning: incorrect type in argument 4 (different signedness) drivers/irqchip/irq-crossbar.c:245:56: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:245:56: got int * drivers/irqchip/irq-crossbar.c:263:56: warning: incorrect type in argument 4 (different signedness) drivers/irqchip/irq-crossbar.c:263:56: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:263:56: got int * Signed-off-by: Franck Demathieu Signed-off-by: Marc Zyngier drivers/irqchip/irq-crossbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5bbc852676ae08e818241cf66a3ffe4be44225c4 Author: Peter Chen Date: Tue Feb 28 14:25:45 2017 +0800 usb: gadget: dummy_hcd: clear usb_gadget region before registration When the user does device unbind and rebind test, the kernel will show below dump due to usb_gadget memory region is dirty after unbind. Clear usb_gadget region for every new probe. root@imx6qdlsolo:/sys/bus/platform/drivers/dummy_udc# echo dummy_udc.0 > bind [ 102.523312] kobject (eddd78b0): tried to init an initialized object, something is seriously wrong. [ 102.532447] CPU: 0 PID: 734 Comm: sh Not tainted 4.10.0-rc7-00872-g1b2b8e9 #1298 [ 102.539866] Hardware name: Freescale i.MX6 SoloX (Device Tree) [ 102.545717] Backtrace: [ 102.548225] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 102.555822] r7:ede34000 r6:60010013 r5:00000000 r4:c0f29418 [ 102.561512] [] (show_stack) from [] (dump_stack+0xb4/0xe8) [ 102.568764] [] (dump_stack) from [] (kobject_init+0x80/0x9c) [ 102.576187] r10:0000001f r9:eddd7000 r8:eeaf8c10 r7:eddd78a8 r6:c177891c r5:c0f3b060 [ 102.584036] r4:eddd78b0 r3:00000000 [ 102.587641] [] (kobject_init) from [] (device_initialize+0x28/0xf8) [ 102.595665] r5:eebc4800 r4:eddd78a8 [ 102.599268] [] (device_initialize) from [] (device_register+0x14/0x20) [ 102.607556] r7:eddd78a8 r6:00000000 r5:eebc4800 r4:eddd78a8 [ 102.613256] [] (device_register) from [] (usb_add_gadget_udc_release+0x8c/0x1ec) [ 102.622410] r5:eebc4800 r4:eddd7860 [ 102.626015] [] (usb_add_gadget_udc_release) from [] (usb_add_gadget_udc+0x14/0x18) [ 102.635351] r10:0000001f r9:eddd7000 r8:eddd788c r7:bf003770 r6:eddd77f8 r5:eddd7818 [ 102.643198] r4:eddd785c r3:eddd7b24 [ 102.646834] [] (usb_add_gadget_udc) from [] (dummy_udc_probe+0x170/0x1c4 [dummy_hcd]) [ 102.656458] [] (dummy_udc_probe [dummy_hcd]) from [] (platform_drv_probe+0x54/0xb8) [ 102.665881] r10:00000008 r9:c1778960 r8:bf004128 r7:fffffdfb r6:bf004128 r5:eeaf8c10 [ 102.673727] r4:eeaf8c10 [ 102.676293] [] (platform_drv_probe) from [] (driver_probe_device+0x264/0x474) [ 102.685186] r7:00000000 r6:00000000 r5:c1778960 r4:eeaf8c10 [ 102.690876] [] (driver_probe_device) from [] (bind_store+0xb8/0x14c) [ 102.698994] r10:eeb3bb4c r9:ede34000 r8:0000000c r7:eeaf8c44 r6:bf004128 r5:c0f3b668 [ 102.706840] r4:eeaf8c10 [ 102.709402] [] (bind_store) from [] (drv_attr_store+0x28/0x34) [ 102.716998] r9:ede34000 r8:00000000 r7:ee3863c0 r6:ee3863c0 r5:c0538c80 r4:c053970c [ 102.724776] [] (drv_attr_store) from [] (sysfs_kf_write+0x50/0x54) [ 102.732711] r5:c0538c80 r4:0000000c [ 102.736313] [] (sysfs_kf_write) from [] (kernfs_fop_write+0x100/0x214) [ 102.744599] r7:ee3863c0 r6:eeb3bb40 r5:00000000 r4:00000000 [ 102.750287] [] (kernfs_fop_write) from [] (__vfs_write+0x34/0x120) [ 102.758231] r10:00000000 r9:ede34000 r8:c0108bc4 r7:0000000c r6:ede35f80 r5:c029bd84 [ 102.766077] r4:ee223780 [ 102.768638] [] (__vfs_write) from [] (vfs_write+0xa8/0x170) [ 102.775974] r9:ede34000 r8:c0108bc4 r7:ede35f80 r6:01861cb0 r5:ee223780 r4:0000000c [ 102.783743] [] (vfs_write) from [] (SyS_write+0x4c/0xa8) [ 102.790818] r9:ede34000 r8:c0108bc4 r7:0000000c r6:01861cb0 r5:ee223780 r4:ee223780 [ 102.798595] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) [ 102.806188] r7:00000004 r6:b6e83d58 r5:01861cb0 r4:0000000c Fixes: 90fccb529d24 ("usb: gadget: Gadget directory cleanup - group UDC drivers") Cc: stable Acked-by: Alan Stern Signed-off-by: Peter Chen Tested-by: Xiaolong Ye Reported-by: Fengguang Wu Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 2 ++ 1 file changed, 2 insertions(+) commit eb38d913c27f32f4df173791051fecf6aca34173 Author: Roger Quadros Date: Thu Mar 2 10:44:58 2017 +0200 Revert "usb: gadget: uvc: Add missing call for additional setup data" This reverts commit 4fbac5206afd01b717d4bdc58793d471f3391b4b. This commit breaks g_webcam when used with uvc-gadget [1]. The user space application (e.g. uvc-gadget) is responsible for sending response to UVC class specific requests on control endpoint in uvc_send_response() in uvc_v4l2.c. The bad commit was causing a duplicate response to be sent with incorrect response data thus causing UVC probe to fail at the host and broken control transfer endpoint at the gadget. [1] - git://git.ideasonboard.org/uvc-gadget.git Cc: # v4.9+ Acked-by: Laurent Pinchart Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uvc.c | 7 ------- 1 file changed, 7 deletions(-) commit a687c5765b5ae19fe559e14615ddc87ebb46d409 Author: Roderick Colenbrander Date: Fri Feb 24 16:14:15 2017 -0800 HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT When a user connects a DS4 twice using USB and BT, we reject the second device connection after the setup work. We then perform a cleanup, but during cleanup we are not removing the touchpad device. This leads to leakage of an input device, which we would never remove. It can likely result into a kernel oops as well when the touchpad evdev node is accessed and the underlaying HID device has been removed from the system. [jkosina@suse.cz: added stable annotation] Fixes: ac797b95f532 ("HID: sony: Make the DS4 touchpad a separate device") Cc: stable@vger.kernel.org Signed-off-by: Roderick Colenbrander Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 2 ++ 1 file changed, 2 insertions(+) commit f2f10b7e722a75c6d75a7f7cd06b0eee3ae20f7c Author: Daniel Drake Date: Fri Feb 17 07:40:52 2017 -0600 HID: chicony: Add support for another ASUS Zen AiO keyboard Add support for media keys on the keyboard that comes with the Asus V221ID and ZN241IC All In One computers. The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. This device is not visibly branded as Chicony, and the USB Vendor ID suggests that it is a JESS device. However this seems like the right place to put it: the usage codes are identical to the currently supported devices, and this driver already supports the ASUS AIO keyboard AK1D. Signed-off-by: Daniel Drake Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 4 ++-- drivers/hid/hid-chicony.c | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) commit b3bd0f2849f4480fc4f40bb954d27e58f4f0786b Author: Arnd Bergmann Date: Wed Mar 1 23:50:19 2017 +0100 staging/vc04_services: add CONFIG_OF dependency After several hours of debugging this obviously bogus but elaborate gcc-7.0.1 warning, drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'vchiq_complete_bulk': drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:603:4: error: argument 2 null where non-null expected [-Werror=nonnull] memcpy((char *)page_address(pages[0]) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pagelist->offset, ~~~~~~~~~~~~~~~~~ fragments, ~~~~~~~~~~ head_bytes); ~~~~~~~~~~~ In file included from include/linux/string.h:18:0, from include/linux/bitmap.h:8, from include/linux/cpumask.h:11, from include/linux/interrupt.h:9, from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:37: arch/arm/include/asm/string.h:16:15: note: in a call to function 'memcpy' declared here extern void * memcpy(void *, const void *, __kernel_size_t) __nocapture(2); ^~~~~~ I have concluded that gcc was technically right in the first place: vchiq_complete_bulk is an externally visible function that calls free_pagelist(), which in turn derives a pointer from the global g_fragments_base variable. g_fragments_base is initialized in vchiq_platform_init(), but we only get there if of_property_read_u32() successfully reads the cache line size. When CONFIG_OF is disabled, this always fails, and g_fragments_base is guaranteed to be NULL when vchiq_complete_bulk() gets called. This adds a CONFIG_OF Kconfig dependency, which is also technically correct but nonobvious, and thus seems like a good fit for the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 96e1ce8fcd66d850196758c038bd9d6f7857c518 Author: Kunihiko Hayashi Date: Mon Feb 20 21:00:42 2017 +0900 pinctrl: uniphier: change pin names of aio/xirq for LD11 This patch changes pin names of AIO and XIRQ according to updated specification. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8e51533780ba223a3562ff4382c6b6f350c7e9a4 Author: Timur Tabi Date: Fri Feb 10 17:21:00 2017 -0600 pinctrl: qcom: add get_direction function The get_direction callback function allows gpiolib to know the current direction (input vs output) for a given GPIO. This is particularly useful on ACPI systems, where the GPIOs are configured only by firmware (typically UEFI), so the only way to know the initial values to query the hardware directly. Without this function, gpiolib thinks that all GPIOs are configured for input. Signed-off-by: Timur Tabi Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f759921cfbf4847319d197a6ed7c9534d593f8bc Author: Phil Reid Date: Mon Feb 20 09:41:45 2017 +0800 gpio: altera: Use handle_level_irq when configured as a level_high When a threaded irq handler is chained attached to one of the gpio pins when configure for level irq the altera_gpio_irq_leveL_high_handler does not mask the interrupt while being handled by the chained irq. This resulting in the threaded irq not getting enough cycles to complete quickly enough before the irq was disabled as faulty. handle_level_irq should be used in this situation instead of handle_simple_irq. In gpiochip_irqchip_add set default handler to handle_bad_irq as per Documentation/gpio/driver.txt. Then set the correct handler in the set_type callback. Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit b115bebc07f282067eccc06fd5aa3060ab1426da Author: Arnd Bergmann Date: Fri Feb 17 16:13:44 2017 +0100 gpio: xgene: mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get a warning about unused functions: drivers/gpio/gpio-xgene.c:155:12: warning: 'xgene_gpio_resume' defined but not used [-Wunused-function] static int xgene_gpio_resume(struct device *dev) ^~~~~~~~~~~~~~~~~ drivers/gpio/gpio-xgene.c:142:12: warning: 'xgene_gpio_suspend' defined but not used [-Wunused-function] static int xgene_gpio_suspend(struct device *dev) The warnings are harmless and can be avoided by simplifying the code and marking the functions as __maybe_unused. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/gpio/gpio-xgene.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit fa6256db033067b57318decdc1c583512a1f8f68 Author: Dan Carpenter Date: Wed Feb 15 02:02:06 2017 +0300 gpio: mockup: return -EFAULT if copy_from_user() fails copy_from_user() returns the number of bytes remaining to be copied but we want to return negative error codes on failue. Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs") Signed-off-by: Dan Carpenter Acked-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9ce9f7999741f342eeffd036ab09213a2fa93040 Author: Thor Thayer Date: Mon Feb 13 13:49:58 2017 -0600 gpio: altera-a10sr: Set gpio_chip parent property Set the gpio_chip parent property since some recent functions such as devprop_gpiochip_set_names() can use it. Signed-off-by: Thor Thayer Signed-off-by: Linus Walleij drivers/gpio/gpio-altera-a10sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 606142af57dad981b78707234cfbd15f9f7b7125 Author: Jonathan McDowell Date: Wed Feb 15 18:29:15 2017 -0200 [media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with them. The device was non-functional as a result. So, switch this driver over to use a buffer within the device state structure, as has been done with other DVB-USB drivers. Tested with TechnoTrend TT-connect S2-4600. [mchehab@osg.samsung.com: fixed a warning at su3000_i2c_transfer() that state var were dereferenced before check 'd'] Signed-off-by: Jonathan McDowell Cc: Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 244 ++++++++++++++++++++++--------------- 1 file changed, 145 insertions(+), 99 deletions(-) commit a7d2475af7aedcb9b5c6343989a8bfadbf84429b Author: Michael Ellerman Date: Mon Mar 6 22:53:59 2017 +1100 powerpc: Sort the selects under CONFIG_PPC We have a big list of selects under CONFIG_PPC, and currently they're completely unsorted. This means people tend to add new selects at the bottom of the list, and so two commits which both add a new select will often conflict. Instead sort it alphabetically. This is nicer in and of itself, but also means two commits that add a new select will have a greater chance of not conflicting. Add a note at the top and bottom asking people to keep it sorted. And while we're here pad out the 'if' expressions to make them stand out. Suggested-by: Stephen Rothwell Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 138 +++++++++++++++++++++++++++------------------------ 1 file changed, 72 insertions(+), 66 deletions(-) commit 9c7a00868c3a77c86ab07a2c51f3bb4897bd8550 Author: Michael Ellerman Date: Mon Mar 6 21:51:32 2017 +1100 powerpc/64: Fix L1D cache shape vector reporting L1I values It seems we didn't pay quite enough attention when testing the new cache shape vectors, which means we didn't notice the bug where the vector for the L1D was using the L1I values. Fix it, resulting in eg: L1I cache size: 0x8000 32768B 32K L1I line size: 0x80 8-way associative L1D cache size: 0x10000 65536B 64K L1D line size: 0x80 8-way associative Fixes: 98a5f361b862 ("powerpc: Add new cache geometry aux vectors") Cut-and-paste-bug-by: Benjamin Herrenschmidt Badly-reviewed-by: Michael Ellerman Signed-off-by: Michael Ellerman arch/powerpc/include/asm/elf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2853308b6409b97799b0beceacd9da43a82fe43 Author: Andy Shevchenko Date: Mon Mar 6 10:57:48 2017 +0200 x86/build/x86_64_defconfig: Enable CONFIG_R8169 Very common PCIe ethernet card. Already enabled in i386_defconfig. Signed-off-by: Andy Shevchenko Cc: Peter Zijlstra Cc: Konstantin Khlebnikov Link: http://lkml.kernel.org/r/20170306085748.85957-1-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/configs/x86_64_defconfig | 1 + 1 file changed, 1 insertion(+) commit 3b3e78552d3077ec70d2640e629e07e3ab416a6a Author: Matjaz Hegedic Date: Sun Mar 5 19:16:44 2017 +0100 x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk Without the parameter reboot=a, ASUS EeeBook X205TA/W will hang when it should reboot. This adds the appropriate quirk, thus fixing the problem. Signed-off-by: Matjaz Hegedic Link: http://lkml.kernel.org/r/1488737804-20681-1-git-send-email-matjaz.hegedic@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/reboot.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6ba422c75facb1b1e0e206c464ee121b8073f7e0 Author: Anton Blanchard Date: Sun Mar 5 10:54:34 2017 +1100 powerpc/64: Avoid panic during boot due to divide by zero in init_cache_info() I see a panic in early boot when building with a recent gcc toolchain. The issue is a divide by zero, which is undefined. Older toolchains let us get away with it: int foo(int a) { return a / 0; } foo: li 9,0 divw 3,3,9 extsw 3,3 blr But newer ones catch it: foo: trap Add a check to avoid the divide by zero. Fixes: e2827fe5c156 ("powerpc/64: Clean up ppc64_caches using a struct per cache") Signed-off-by: Anton Blanchard Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 014d02cbf16b3106dc8e93281d2a9c189751ed5e Author: Suraj Jitindar Singh Date: Tue Feb 28 17:03:48 2017 +1100 powerpc: Update to new option-vector-5 format for CAS On POWER9 the ibm,client-architecture-support (CAS) negotiation process has been updated to change how the host to guest negotiation is done for the new hash/radix mmu as well as the nest mmu, process tables and guest translation shootdown (GTSE). This is documented in the unreleased PAPR ACR "CAS option vector additions for P9". The host tells the guest which options it supports in ibm,arch-vec-5-platform-support. The guest then chooses a subset of these to request in the CAS call and these are agreed to in the ibm,architecture-vec-5 property of the chosen node. Thus we read ibm,arch-vec-5-platform-support and make our selection before calling CAS. We then parse the ibm,architecture-vec-5 property of the chosen node to check whether we should run as hash or radix. ibm,arch-vec-5-platform-support format: index value pairs: ... index: Option vector 5 byte number val: Some representation of supported values Signed-off-by: Suraj Jitindar Singh Acked-by: Paul Mackerras [mpe: Don't print about unknown options, be consistent with OV5_FEAT] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/prom.h | 18 ++++--- arch/powerpc/kernel/prom_init.c | 110 +++++++++++++++++++++++++++++++++++++++- arch/powerpc/mm/init_64.c | 36 ++++++++++--- 3 files changed, 150 insertions(+), 14 deletions(-) commit 12cc9fd6b2d8ee307a735b3b9faed0d17b719463 Author: Suraj Jitindar Singh Date: Tue Feb 28 17:03:47 2017 +1100 powerpc: Parse the command line before calling CAS On POWER9 the hypervisor requires the guest to decide whether it would like to use a hash or radix mmu model at the time it calls ibm,client-architecture-support (CAS) based on what the hypervisor has said it's allowed to do. It is possible to disable radix by passing "disable_radix" on the command line. The next patch will add support for the new CAS format, thus we need to parse the command line before calling CAS so we can correctly select which mmu we would like to use. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Paul Mackerras Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a69e2fb70350a66f91175cd2625f1e8215c5b6e9 Author: Balbir Singh Date: Fri Mar 3 11:58:44 2017 +1100 powerpc/xics: Work around limitations of OPAL XICS priority handling The CPPR (Current Processor Priority Register) of a XICS interrupt presentation controller contains a value N, such that only interrupts with a priority "more favoured" than N will be received by the CPU, where "more favoured" means "less than". So if the CPPR has the value 5 then only interrupts with a priority of 0-4 inclusive will be received. In theory the CPPR can support a value of 0 to 255 inclusive. In practice Linux only uses values of 0, 4, 5 and 0xff. Setting the CPPR to 0 rejects all interrupts, setting it to 0xff allows all interrupts. The values 4 and 5 are used to differentiate IPIs from external interrupts. Setting the CPPR to 5 allows IPIs to be received but not external interrupts. The CPPR emulation in the OPAL XICS implementation only directly supports priorities 0 and 0xff. All other priorities are considered equivalent, and mapped to a single priority value internally. This means when using icp-opal we can not allow IPIs but not externals. This breaks Linux's use of priority values when a CPU is hot unplugged. After migrating IRQs away from the CPU that is being offlined, we set the priority to 5, meaning we still want the offline CPU to receive IPIs. But the effect of the OPAL XICS emulation's use of a single priority value is that all interrupts are rejected by the CPU. With the CPU offline, and not receiving IPIs, we may not be able to wake it up to bring it back online. The first part of the fix is in icp_opal_set_cpu_priority(). CPPR values of 0 to 4 inclusive will correctly cause all interrupts to be rejected, so we pass those CPPR values through to OPAL. However if we are called with a CPPR of 5 or greater, the caller is expecting to be able to allow IPIs but not external interrupts. We know this doesn't work, so instead of rejecting all interrupts we choose the opposite which is to allow all interrupts. This is still not correct behaviour, but we know for the only existing caller (xics_migrate_irqs_away()), that it is the better option. The other part of the fix is in xics_migrate_irqs_away(). Instead of setting priority (CPPR) to 0, and then back to 5 before migrating IRQs, we migrate the IRQs before setting the priority back to 5. This should have no effect on an ICP backend with a working set_priority(), and on icp-opal it means we will keep all interrupts blocked until after we've finished doing the IRQ migration. Additionally we wait for 5ms after doing the migration to make sure there are no IRQs in flight. Fixes: d74361881f0d ("powerpc/xics: Add ICP OPAL backend") Cc: stable@vger.kernel.org # v4.8+ Suggested-by: Michael Ellerman Reported-by: Vaidyanathan Srinivasan Tested-by: Vaidyanathan Srinivasan Signed-off-by: Balbir Singh [mpe: Rewrote comments and change log, change delay to 5ms] Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xics/icp-opal.c | 10 ++++++++++ arch/powerpc/sysdev/xics/xics-common.c | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) commit 2fe42dd0f13812d38daaf05bcb1fd996afd0e87a Author: Jeeja KP Date: Wed Mar 1 22:41:24 2017 +0530 ASoC: hdac_hdmi: don't update the iterator in pcm list remove Fix not to update the iterator element, instead use list_del to remove entry from the list. This fixes the following coccinelle and static checker warning: sound/soc/codecs/hdac_hdmi.c:1884:2-21:iterator with update on line 1885 sound/soc/codecs/hdac_hdmi.c:2011 hdac_hdmi_dev_remove() error: potential NULL dereference 'port'. Fixes: e0e5d3e5a53b('ASoC: hdac_hdmi: Add support for multiple ports to a PCM') Reported-by: Julia Lawall Reported-by: Dan Carpenter Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 04c8f2bf9117de7b8e8bc0b90e8c4bff15f4f613 Author: Jeeja KP Date: Wed Mar 1 22:41:23 2017 +0530 ASoC: hdac_hdmi: avoid reference to invalid variable of the pin list Using pin list array iterator outside the iteration of the list can point to dummy element, which can be invalid. So don't use pin variable outside the pin list iteration. This fixes the following coccinelle warning: sound/soc/codecs/hdac_hdmi.c:1419:5-8: ERROR: invalid reference to the index variable of the iterator Fixes: 2acd8309a3a4('ASoC: hdac_hdmi: Add support to handle MST capable pin') Reported-by: Julia Lawall Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4dfc050571523ac2bc02cbf948dd47621f7dd83f Author: Marc Zyngier Date: Tue Feb 21 11:32:47 2017 +0000 KVM: arm/arm64: vgic-v3: Don't pretend to support IRQ/FIQ bypass Our GICv3 emulation always presents ICC_SRE_EL1 with DIB/DFB set to zero, which implies that there is a way to bypass the GIC and inject raw IRQ/FIQ by driving the CPU pins. Of course, we don't allow that when the GIC is configured, but we fail to indicate that to the guest. The obvious fix is to set these bits (and never let them being changed again). Reported-by: Peter Maydell Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 2 ++ virt/kvm/arm/vgic/vgic-v3.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 68925176296a8b995e503349200e256674bfe5ac Author: Marc Zyngier Date: Fri Feb 17 14:32:18 2017 +0000 arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs When invalidating guest TLBs, special care must be taken to actually shoot the guest TLBs and not the host ones if we're running on a VHE system. This is controlled by the HCR_EL2.TGE bit, which we forget to clear before invalidating TLBs. Address the issue by introducing two wrappers (__tlb_switch_to_guest and __tlb_switch_to_host) that take care of both the VTTBR_EL2 and HCR_EL2.TGE switching. Reported-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Reviewed-by: Christoffer Dall Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/tlb.c | 64 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 9 deletions(-) commit 4b30eebfc35c67771b5f58d9274d3e321b72d7a8 Author: Kuninori Morimoto Date: Fri Mar 3 04:25:09 2017 +0000 ASoC: rcar: avoid SSI_MODEx settings for SSI8 SSI8 is is sharing pin with SSI7, and nothing to do for SSI_MODEx. It is special pin and it needs special settings whole system, but we can't confirm it, because we never have SSI8 available board. This patch fixup SSI_MODEx settings error for SSI8 on connection test, but should be confirmed behavior on real board in the future. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c2e04fdab33181b53b5a2f9662b7b607b720f79f Author: Changbin Du Date: Mon Mar 6 17:08:30 2017 +0800 drm/i915/gvt: protect RO and Rsvd bits of virtual vgpu configuration space Per PCI specification, Configuration Register has different types (RO, RW, RW1C, Rsvd). For RO Register bits are read-only and cannot be altered by software. For RW1C Register bits indicate status when read. A Set bit indicates a status event which is Cleared by writing a 1b. Writing a 0b to RW1C bits has no effect. Reserved Register is for future implementations, and they are read-only and must return zero when read. Current vGPU configuration write emulation just copy the value as it is. So we haven't emulated RO, RW1C and Rsvd Registers correctly. This patch is following the Spec to correct emulation logic. We add a function vgpu_cfg_mem_write to wrap the access to vGPU configuration memory. The write function uses a RW Register bitmap to avoid RO bits be overwritten, and emulate RW1C behavior for the particular status Register. v2: new = src[i] --> new = src[i] & mask (zhenyu) Signed-off-by: Changbin Du Cc: Xiaoguang Chen Cc: Zhiyuan Lv Cc: Min He Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 54 ++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) commit 8f1117abb408808af9cc4c948925c726bec4755a Author: Chuanxiao Dong Date: Mon Mar 6 13:05:24 2017 +0800 drm/i915/gvt: handle workload lifecycle properly Currently i915 has a request replay mechanism which can make sure the request can be replayed after a GPU reset. With this mechanism, gvt should wait until the GVT request seqno passed before complete the current workload. So that there should be a context switch interrupt come before gvt free the workload. In this way, workload lifecylce matches with the i915 request lifecycle. The workload can only be freed after the request is completed. v2: use gvt_dbg_sched instead of gvt_err to print when wait again Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 49 ++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) commit 2e46565cf622dd0534a9d8bffe152a577b48d7aa Author: Johan Hovold Date: Fri Feb 24 19:11:28 2017 +0100 USB: serial: digi_acceleport: fix OOB-event processing A recent change claimed to fix an off-by-one error in the OOB-port completion handler, but instead introduced such an error. This could specifically led to modem-status changes going unnoticed, effectively breaking TIOCMGET. Note that the offending commit fixes a loop-condition underflow and is marked for stable, but should not be backported without this fix. Reported-by: Ben Hutchings Fixes: 2d380889215f ("USB: serial: digi_acceleport: fix OOB data sanity check") Cc: stable # v2.6.30: 2d380889215f Signed-off-by: Johan Hovold drivers/usb/serial/digi_acceleport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf3113d893d4427b166ec8695460efa7aa660923 Author: Felipe Balbi Date: Fri Feb 17 11:12:44 2017 +0200 usb: dwc3: gadget: properly increment dequeue pointer on ep_dequeue If request was already started, this means we had to stop the transfer. With that we also need to ignore all TRBs used by the request, however TRBs can only be modified after completion of END_TRANSFER command. So what we have to do here is wait for END_TRANSFER completion and only after that jump over TRBs by clearing HWO and incrementing dequeue pointer. Note that we have 2 possible types of transfers here: i) Linear buffer request ii) SG-list based request SG-list based requests will have r->num_pending_sgs set to a valid number (> 0). Linear requests, normally use a single TRB. For each of these two cases, if r->unaligned flag is set, one extra TRB has been used to align transfer size to wMaxPacketSize. All of these cases need to be taken into consideration so we don't mess up our TRB ring pointers. Tested-by: Janusz Dziedzic Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 2bfa0719ac2a9b2f3c91345873d3cdebd0296ba9 Author: Felipe Balbi Date: Tue Jan 31 14:54:45 2017 +0200 usb: gadget: function: f_fs: pass companion descriptor along If we're dealing with SuperSpeed endpoints, we need to make sure to pass along the companion descriptor and initialize fields needed by the Gadget API. Eventually, f_fs.c should be converted to use config_ep_by_speed() like all other functions, though. Cc: Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 7369090a9fb57c3fc705ce355d2e4523a5a24716 Author: Felipe Balbi Date: Tue Jan 31 13:24:54 2017 +0200 usb: dwc3: gadget: make Set Endpoint Configuration macros safe Some gadget drivers are bad, bad boys. We notice that ADB was passing bad Burst Size which caused top bits of param0 to be overwritten which confused DWC3 when running this command. In order to avoid future issues, we're going to make sure values passed by macros are always safe for the controller. Note that ADB still needs a fix to *not* pass bad values. Cc: # v3.2+ Reported-by: Mohamed Abbas Sugested-by: Adam Andruszak Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 36fc579761b50784b63dafd0f2e796b659e0f5ee Author: Tomeu Vizoso Date: Mon Feb 20 16:25:45 2017 +0100 drm/edid: Add EDID_QUIRK_FORCE_8BPC quirk for Rotel RSX-1058 Rotel RSX-1058 is a receiver with 4 HDMI inputs and a HDMI output, all 1.1. When a sink that supports deep color is connected to the output, the receiver will send EDIDs that advertise this capability, even if it isn't possible with HDMI versions earlier than 1.3. Currently the kernel is assuming that deep color is possible and the sink displays an error. This quirk will make sure that deep color isn't used with this particular receiver. Fixes: 7a0baa623446 ("Revert "drm/i915: Disable 12bpc hdmi for now"") Signed-off-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20170220152545.13153-1-tomeu.vizoso@collabora.com Cc: stable@vger.kernel.org Cc: Matt Horan Tested-by: Matt Horan Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99869 Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) commit 39319f504b5d91e853f5ec7753a56e43915fcaf4 Author: Maxime Ripard Date: Wed Nov 30 12:05:03 2016 +0100 ARM: sun8i: Fix the mali clock rate The Mali clock rate was improperly assumed to be 408MHz, while it was really 384Mhz, 408MHz being the "extreme" frequency, and definitely not stable. Switch for the stable, correct frequency for the GPU. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ad0bb39fce319d7b92c17d306ed0a9f70a02e7d Author: Chen-Yu Tsai Date: Tue Feb 14 10:23:32 2017 +0800 clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit. Reported-by: Bob Ham Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Cc: stable@vger.kernel.org # 4.9.x- Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69c9ae5041309553472ee798d7683be31bcdc434 Author: Arnd Bergmann Date: Tue Feb 14 22:29:45 2017 +0100 clk: sunxi: ccu-sun5i needs nkmp A randconfig build ran into this rare link error: drivers/clk/sunxi-ng/ccu-sun5i.o:(.data.__compound_literal.1+0x4): undefined reference to `ccu_nkmp_ops' drivers/clk/sunxi-ng/ccu-sun5i.o:(.data.__compound_literal.7+0x4): undefined reference to `ccu_nkmp_ops' This adds the missing 'select'. Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver") Signed-off-by: Arnd Bergmann Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ac8616e4c81dded650dfade49a7da283565d37ce Author: Chen-Yu Tsai Date: Tue Feb 14 11:35:22 2017 +0800 clk: sunxi-ng: mp: Adjust parent rate for pre-dividers The MP style clocks support an mux with pre-dividers. While the driver correctly accounted for them in the .determine_rate callback, it did not in the .recalc_rate and .set_rate callbacks. This means when calculating the factors in the .set_rate callback, they would be off by a factor of the active pre-divider. Same goes for reading back the clock rate after it is set. Cc: stable@vger.kernel.org Fixes: 2ab836db5097 ("clk: sunxi-ng: Add M-P factor clock support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7f35144cea219104fe42e7c6cd0ee5103016da2e Author: Vlad Zakharov Date: Fri Mar 3 14:30:02 2017 +0300 ARC: get rate from clk driver instead of reading device tree We were reading clock rate directly from device tree "clock-frequency" property of corresponding clock node in show_cpuinfo function. Such approach is correct only in case cpu is always clocked by "fixed-clock". If we use clock driver that allows rate to be changed this won't work as rate may change during the time or even "clock-frequency" property may not be presented at all. So this commit replaces reading device tree with getting rate from clock driver. This approach is much more flexible and will work for both fixed and mutable clocks. Signed-off-by: Vlad Zakharov Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 4ed10958ae461168be310b4bbee13f745e4c1547 Author: Vlad Zakharov Date: Fri Mar 3 14:30:01 2017 +0300 ARC: [dts] add cpu nodes to ARCHS SMP device tree Trying to get clock for CPU cores on SMP systems I found that I was only able to get clock for core[0]. That was because only one cpu@0 node was represented in ARC HS device tree and it was impossible to get clock for "non-existing" cores. So as ARC HS may have up to 4 cores we update device tree to match maximum possible cores quantity. Signed-off-by: Vlad Zakharov Signed-off-by: Vineet Gupta arch/arc/boot/dts/skeleton_hs_idu.dtsi | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 854c11e250730eaffec2ad56e9224c6be8a7979d Author: Vlad Zakharov Date: Fri Mar 3 14:30:00 2017 +0300 ARC: [dts] add input clocks for cpu nodes ARC CPU cores are driven by core_clk so we add corresponding "clocks" property to ARC cpu nodes. Signed-off-by: Vlad Zakharov Signed-off-by: Vineet Gupta arch/arc/boot/dts/skeleton.dtsi | 1 + arch/arc/boot/dts/skeleton_hs.dtsi | 1 + arch/arc/boot/dts/skeleton_hs_idu.dtsi | 1 + 3 files changed, 3 insertions(+) commit 2201ac6129fa162ac24da089a034bb0971648ebb Author: Matthias Reichl Date: Mon Feb 20 20:01:16 2017 +0100 dmaengine: bcm2835: Fix cyclic DMA period splitting The code responsible for splitting periods into chunks that can be handled by the DMA controller missed to update total_len, the number of bytes processed in the current period, when there are more chunks to follow. Therefore total_len was stuck at 0 and the code didn't work at all. This resulted in a wrong control block layout and audio issues because the cyclic DMA callback wasn't executing on period boundaries. Fix this by adding the missing total_len update. Signed-off-by: Matthias Reichl Signed-off-by: Martin Sperl Tested-by: Clive Messer Reviewed-by: Eric Anholt Signed-off-by: Vinod Koul drivers/dma/bcm2835-dma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0878fff1f42c18e448ab5b8b4f6a3eb32365b5b6 Author: Florian Fainelli Date: Sun Mar 5 12:34:49 2017 -0800 net: phy: Do not perform software reset for Generic PHY The Generic PHY driver is a catch-all PHY driver and it should preserve whatever prior initialization has been done by boot loader or firmware agents. For specific PHY device configuration it is expected that a specialized PHY driver would take over that role. Resetting the generic PHY was a bad idea that has lead to several complaints and downstream workarounds e.g: in OpenWrt/LEDE so restore the behavior prior to 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()"). Reported-by: Felix Fietkau Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- include/linux/phy.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit f38837b08d23e66de17d46d030e0d9ac5172ad1f Author: Alexei Starovoitov Date: Sun Mar 5 09:41:08 2017 -0800 bpf: add get_next_key callback to LPM map map_get_next_key callback is mandatory. Supply dummy handler. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Reported-by: Dmitry Vyukov Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/lpm_trie.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0c2bf9f95983fe30aa2f6463cb761cd42c2d521a Author: Jon Mason Date: Thu Mar 2 19:21:32 2017 -0500 ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags GIC_PPI flags were misconfigured for the timers, resulting in errors like: [ 0.000000] GIC: PPI11 is secure or misconfigured Changing them to being edge triggered corrects the issue Suggested-by: Rafał Miłecki Signed-off-by: Jon Mason Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC") Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88d1fa70c21d7b431386cfe70cdc514d98b0c9c4 Author: Jon Mason Date: Wed Feb 8 15:37:12 2017 -0500 ARM: dts: BCM5301X: Fix memory start address Memory starts at 0x80000000, not 0. 0 "works" due to mirrior of the first 128M of RAM to that address. Anything greater than 128M will quickly find nothing there. Correcting the starting address has everything working again. Signed-off-by: Jon Mason Fixes: 7eb05f6d ("ARM: dts: bcm5301x: Add BCM SVK DT files") Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm953012k.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e51b999e11b84a766d78347afe9287e2c5b91c97 Author: Jon Mason Date: Wed Feb 8 15:37:11 2017 -0500 ARM: dts: BCM5301X: Fix UARTs on bcm953012k The UARTs are outputting garbage on the console. This is due to a speed issue. We can simply use the clock speed (which is now defined in the DTSI file) and everything works fine. Signed-off-by: Jon Mason Fixes: cdc36b22 ("ARM: dts: enable clock support for BCM5301X") Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm953012k.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a240c4aa5d0f9c8bb0db380ab9c1ec1f68b923ad Author: Rafael J. Wysocki Date: Thu Mar 2 23:29:12 2017 +0100 cpufreq: intel_pstate: Do not reinit performance limits in ->setpolicy If the current P-state selection algorithm is set to "performance" in intel_pstate_set_policy(), the limits may be initialized from scratch, but only if no_turbo is not set and the maximum frequency allowed for the given CPU (i.e. the policy object representing it) is at least equal to the max frequency supported by the CPU. In all of the other cases, the limits will not be updated. For example, the following can happen: # cat intel_pstate/status active # echo performance > cpufreq/policy0/scaling_governor # cat intel_pstate/min_perf_pct 100 # echo 94 > intel_pstate/min_perf_pct # cat intel_pstate/min_perf_pct 100 # cat cpufreq/policy0/scaling_max_freq 3100000 echo 3000000 > cpufreq/policy0/scaling_max_freq # cat intel_pstate/min_perf_pct 94 # echo 95 > intel_pstate/min_perf_pct # cat intel_pstate/min_perf_pct 95 That is confusing for two reasons. First, the initial attempt to change min_perf_pct to 94 seems to have no effect, even though setting the global limits should always work. Second, after changing scaling_max_freq for policy0 the global min_perf_pct attribute shows 94, even though it should have not been affected by that operation in principle. Moreover, the final attempt to change min_perf_pct to 95 worked as expected, because scaling_max_freq for the only policy with scaling_governor equal to "performance" was different from the maximum at that time. To make all that confusion go away, modify intel_pstate_set_policy() so that it doesn't reinitialize the limits at all. At the same time, change intel_pstate_set_performance_limits() to set min_sysfs_pct to 100 in the "performance" limits set so that switching the P-state selection algorithm to "performance" causes intel_pstate/min_perf_pct in sysfs to go to 100 (or whatever value min_sysfs_pct in the "performance" limits is set to later). That requires per-CPU limits to be initialized explicitly rather than by copying the global limits to avoid setting min_sysfs_pct in the per-CPU limits to 100. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit d74b19929130c9b5395a497030dcf161353cd526 Author: Rafael J. Wysocki Date: Wed Mar 1 00:11:05 2017 +0100 cpufreq: intel_pstate: Fix intel_pstate_verify_policy() The code added to intel_pstate_verify_policy() by commit 1443ebbacfd7 (cpufreq: intel_pstate: Fix sysfs limits enforcement for performance policy) should use perf_limits instead of limits, because otherwise setting global limits via sysfs may affect policies inconsistently. For example, in the sequence of shell commands below, the scaling_min_freq attribute for policy1 and policy2 should be affected in the same way, because scaling_governor is set in the same way for both of them: # cat cpufreq/policy1/scaling_governor powersave # cat cpufreq/policy2/scaling_governor powersave # echo performance > cpufreq/policy0/scaling_governor # echo 94 > intel_pstate/min_perf_pct # cat cpufreq/policy0/scaling_min_freq 2914000 # cat cpufreq/policy1/scaling_min_freq 2914000 # cat cpufreq/policy2/scaling_min_freq 800000 The are affected differently, because intel_pstate_verify_policy() is invoked with limits set to &performance_limits (left behind by policy0) for policy1 and with limits set to &powersave_limits (left behind by policy1) for policy2. Since perf_limits is set to the set of limits matching the policy being updated, using it instead of limits fixes the inconsistency. Fixes: 1443ebbacfd7 (cpufreq: intel_pstate: Fix sysfs limits enforcement for performance policy) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd59b4bed9d11a2aefc4bb44eed9de0e6c1eea06 Author: Rafael J. Wysocki Date: Wed Mar 1 00:07:36 2017 +0100 cpufreq: intel_pstate: Fix global settings in active mode Commit 111b8b3fe4fa (cpufreq: intel_pstate: Always keep all limits settings in sync) changed intel_pstate to invoke cpufreq_update_policy() for every registered CPU on global sysfs attributes updates, but that led to undesirable effects in the active mode if the "performance" P-state selection algorithm is configufred for one CPU and the "powersave" one is chosen for all of the other CPUs. Namely, in that case, the following is possible: # cd /sys/devices/system/cpu/ # cat intel_pstate/max_perf_pct 100 # cat intel_pstate/min_perf_pct 26 # echo performance > cpufreq/policy0/scaling_governor # cat intel_pstate/max_perf_pct 100 # cat intel_pstate/min_perf_pct 100 # echo 94 > intel_pstate/min_perf_pct # cat intel_pstate/min_perf_pct 26 The reason why this happens is because intel_pstate attempts to maintain two sets of global limits in the active mode, one for the "performance" P-state selection algorithm and one for the "powersave" P-state selection algorithm, but the P-state selection algorithms are set per policy, so the global limits cannot reflect all of them at the same time if they are different for different policies. In the particular situation above, the attempt to change min_perf_pct to 94 caused cpufreq_update_policy() to be run for a CPU with the "powersave" P-state selection algorithm and intel_pstate_set_policy() called by it silently switched the global limits to the "powersave" set which finally was reflected by the sysfs interface. To prevent that from happening, modify intel_pstate_update_policies() to always switch back to the set of limits that was used right before it has been invoked. Fixes: 111b8b3fe4fa (cpufreq: intel_pstate: Always keep all limits settings in sync) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit d82f26925599cae83c38d17d07ae982356e81318 Author: Len Brown Date: Tue Feb 28 16:44:16 2017 -0500 cpufreq: Add the "cpufreq.off=1" cmdline option Add the "cpufreq.off=1" cmdline option. At boot-time, this allows a user to request CONFIG_CPU_FREQ=n behavior from a kernel built with CONFIG_CPU_FREQ=y. This is analogous to the existing "cpuidle.off=1" option and CONFIG_CPU_IDLE=y This capability is valuable when we need to debug end-user issues in the BIOS or in Linux. It is also convenient for enabling comparisons, which may otherwise require a new kernel, or help from BIOS SETUP, which may be buggy or unavailable. Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki Documentation/admin-guide/kernel-parameters.txt | 3 +++ drivers/cpufreq/cpufreq.c | 1 + 2 files changed, 4 insertions(+) commit 655cb1ebff4b7918fc560502c3297af2d3c7d114 Author: Viresh Kumar Date: Thu Mar 2 14:03:21 2017 +0530 cpufreq: schedutil: Pass sg_policy to get_next_freq() get_next_freq() uses sg_cpu only to get sg_policy, which the callers of get_next_freq() already have. Pass sg_policy instead of sg_cpu to get_next_freq(), to make it more efficient. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6c4f0fa643cb9e775dcc976e3db00d649468ff1d Author: Viresh Kumar Date: Thu Mar 2 14:03:20 2017 +0530 cpufreq: schedutil: move cached_raw_freq to struct sugov_policy cached_raw_freq applies to the entire cpufreq policy and not individual CPUs. Apart from wasting per-cpu memory, it is actually wrong to keep it in struct sugov_cpu as we may end up comparing next_freq with a stale cached_raw_freq of a random CPU. Move cached_raw_freq to struct sugov_policy. Fixes: 5cbea46984d6 (cpufreq: schedutil: map raw required frequency to driver frequency) Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e10889a3177340dcda7d29c6d8fbd97247b007b Author: Romain Izard Date: Fri Feb 17 16:12:50 2017 +0100 Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node" This reverts commit cab43282682e ("ARM: at91/dt: sama5d2: Use new compatible for ohci node") It depends from commit 7150bc9b4d43 ("usb: ohci-at91: Forcibly suspend ports while USB suspend") which was reverted and implemented differently. With the new implementation, the compatible string must remain the same. The compatible string introduced by this commit has been used in the default SAMA5D2 dtsi starting from Linux 4.8. As it has never been working correctly in an official release, removing it should not be breaking the stability rules. Fixes: cab43282682e ("ARM: at91/dt: sama5d2: Use new compatible for ohci node") Signed-off-by: Romain Izard cc: Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 Author: Linus Torvalds Date: Sun Mar 5 12:59:56 2017 -0800 Linux 4.11-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ff861f59f6c1f5bf2bc03d2cd36ac3f992cbc06 Author: Dmitry Torokhov Date: Wed Mar 1 15:37:57 2017 -0800 iio: magnetometer: ak8974: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8974.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bec247474469f769af41e8c80d3a100dd97dd76 Author: Song Hongyan Date: Wed Feb 22 17:17:38 2017 +0800 iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3 In function _hid_sensor_power_state(), when hid_sensor_read_poll_value() is called, sensor's all properties will be updated by the value from sensor hardware/firmware. In some implementation, sensor hardware/firmware will do a power cycle during S3. In this case, after resume, once hid_sensor_read_poll_value() is called, sensor's all properties which are kept by driver during S3 will be changed to default value. But instead, if a set feature function is called first, sensor hardware/firmware will be recovered to the last status. So change the sensor_hub_set_feature() calling order to behind of set feature function to avoid sensor properties lose. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Cc: Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8d70eeb84ab277377c017af6a21d0a337025dede Merge: 2d62e07 f78ef7c Author: Linus Torvalds Date: Sat Mar 4 17:31:39 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix double-free in batman-adv, from Sven Eckelmann. 2) Fix packet stats for fast-RX path, from Joannes Berg. 3) Netfilter's ip_route_me_harder() doesn't handle request sockets properly, fix from Florian Westphal. 4) Fix sendmsg deadlock in rxrpc, from David Howells. 5) Add missing RCU locking to transport hashtable scan, from Xin Long. 6) Fix potential packet loss in mlxsw driver, from Ido Schimmel. 7) Fix race in NAPI handling between poll handlers and busy polling, from Eric Dumazet. 8) TX path in vxlan and geneve need proper RCU locking, from Jakub Kicinski. 9) SYN processing in DCCP and TCP need to disable BH, from Eric Dumazet. 10) Properly handle net_enable_timestamp() being invoked from IRQ context, also from Eric Dumazet. 11) Fix crash on device-tree systems in xgene driver, from Alban Bedel. 12) Do not call sk_free() on a locked socket, from Arnaldo Carvalho de Melo. 13) Fix use-after-free in netvsc driver, from Dexuan Cui. 14) Fix max MTU setting in bonding driver, from WANG Cong. 15) xen-netback hash table can be allocated from softirq context, so use GFP_ATOMIC. From Anoob Soman. 16) Fix MAC address change bug in bgmac driver, from Hari Vyas. 17) strparser needs to destroy strp_wq on module exit, from WANG Cong. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits) strparser: destroy workqueue on module exit sfc: fix IPID endianness in TSOv2 sfc: avoid max() in array size rds: remove unnecessary returned value check rxrpc: Fix potential NULL-pointer exception nfp: correct DMA direction in XDP DMA sync nfp: don't tell FW about the reserved buffer space net: ethernet: bgmac: mac address change bug net: ethernet: bgmac: init sequence bug xen-netback: don't vfree() queues under spinlock xen-netback: keep a local pointer for vif in backend_disconnect() netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups netfilter: nf_conntrack_sip: fix wrong memory initialisation can: flexcan: fix typo in comment can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer can: gs_usb: fix coding style can: gs_usb: Don't use stack memory for USB transfers ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines ixgbe: update the rss key on h/w, when ethtool ask for it ... commit 22048c5485503749754b3b5daf9d99ef89fcacdc Author: Len Brown Date: Sat Mar 4 15:42:48 2017 -0500 tools/power turbostat: bugfix: GFXMHz column not changing turbostat displays a GFXMHz column, which comes from reading /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz But GFXMHz was not changing, even when a manual cat /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz showed a new value. It turns out that a rewind() on the open file is not sufficient, fflush() (or a close/open) is needed to read fresh values. Reported-by: Yaroslav Isakov Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2d62e0768d3c28536d4cfe4c40ba1e5e8e442a93 Merge: be834aa 16ce771 Author: Linus Torvalds Date: Sat Mar 4 11:36:19 2017 -0800 Merge tag 'kvm-4.11-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Radim Krčmář: "Second batch of KVM changes for the 4.11 merge window: PPC: - correct assumption about ASDR on POWER9 - fix MMIO emulation on POWER9 x86: - add a simple test for ioperm - cleanup TSS (going through KVM tree as the whole undertaking was caused by VMX's use of TSS) - fix nVMX interrupt delivery - fix some performance counters in the guest ... and two cleanup patches" * tag 'kvm-4.11-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nVMX: Fix pending events injection x86/kvm/vmx: remove unused variable in segment_base() selftests/x86: Add a basic selftest for ioperm x86/asm: Tidy up TSS limit code kvm: convert kvm.users_count from atomic_t to refcount_t KVM: x86: never specify a sample period for virtualized in_tx_cp counters KVM: PPC: Book3S HV: Don't use ASDR for real-mode HPT faults on POWER9 KVM: PPC: Book3S HV: Fix software walk of guest process page tables commit be834aafdf5f8a37c191e697ac8ee6d53ab5020c Merge: 91aff98 fd5d666 Author: Linus Torvalds Date: Sat Mar 4 11:32:18 2017 -0800 Merge tag 'docs-4.11-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A few fixes for the docs tree, including one for a 4.11 build regression" * tag 'docs-4.11-fixes' of git://git.lwn.net/linux: Documentation/sphinx: fix primary_domain configuration docs: Fix htmldocs build failure doc/ko_KR/memory-barriers: Update control-dependencies section pcieaer doc: update the link Documentation: Update path to sysrq.txt commit 91aff98b79f10bf38c0d51b2d8538ecca35f916e Merge: 33a8b3e a45e47f Author: Linus Torvalds Date: Sat Mar 4 11:26:18 2017 -0800 Merge tag 'staging-4.11-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver fixes from Greg KH: "Here are a few small staging and IIO driver fixes for issues that showed up after the big set if changes you merged last week. Nothing major, just small bugs resolved in some IIO drivers, a lustre allocation fix, and some RaspberryPi driver fixes for reported problems, as well as a MAINTAINERS entry update. All of these have been in linux-next for a week with no reported issues" * tag 'staging-4.11-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: fsl-mc: fix warning in DT ranges parser MAINTAINERS: Remove Noralf Trønnes as fbtft maintainer staging: vchiq_2835_arm: Make cache-line-size a required DT property staging: bcm2835/mmal-vchiq: unlock on error in buffer_from_host() staging/lustre/lnet: Fix allocation size for sv_cpt_data iio: adc: xilinx: Fix error handling iio: 104-quad-8: Fix off-by-one error when addressing flag register iio: adc: handle unknow of_device_id data commit 33a8b3e99dc68abfe25e140144ad268e70660be3 Merge: 0710f3f 5839f55 Author: Linus Torvalds Date: Sat Mar 4 10:42:53 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: - vmalloc stack regression in CCM - Build problem in CRC32 on ARM - Memory leak in cavium - Missing Kconfig dependencies in atmel and mediatek - XTS Regression on some platforms (s390 and ppc) - Memory overrun in CCM test vector * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: vmx - Use skcipher for xts fallback crypto: vmx - Use skcipher for cbc fallback crypto: testmgr - Pad aes_ccm_enc_tv_template vector crypto: arm/crc32 - add build time test for CRC instruction support crypto: arm/crc32 - fix build error with outdated binutils crypto: ccm - move cbcmac input off the stack crypto: xts - Propagate NEED_FALLBACK bit crypto: api - Add crypto_requires_off helper crypto: atmel - CRYPTO_DEV_MEDIATEK should depend on HAS_DMA crypto: atmel - CRYPTO_DEV_ATMEL_TDES and CRYPTO_DEV_ATMEL_SHA should depend on HAS_DMA crypto: cavium - fix leak on curr if curr->head fails to be allocated crypto: cavium - Fix couple of static checker errors commit 1a9070ec91b37234fe915849b767c61584c64a44 Author: Sven Eckelmann Date: Sat Mar 4 15:48:50 2017 +0100 batman-adv: Initialize gw sel_class via batadv_algo The gateway selection class variable is shared between different algorithm versions. But the interpretation of the content is algorithm specific. The initialization is therefore also algorithm specific. But this was implemented incorrectly and the initialization for BATMAN_V always overwrote the value previously written for BATMAN_IV. This could only be avoided when BATMAN_V was disabled during compile time. Using a special batadv_algo hook for this initialization avoids this problem. Fixes: 50164d8f500f ("batman-adv: B.A.T.M.A.N. V - implement GW selection logic") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 11 +++++++++++ net/batman-adv/bat_v.c | 14 +++++++++++--- net/batman-adv/gateway_common.c | 5 +++++ net/batman-adv/soft-interface.c | 1 - net/batman-adv/types.h | 2 ++ 5 files changed, 29 insertions(+), 4 deletions(-) commit 1c2bcc766be44467809f1798cd4ceacafe20a852 Author: Sven Eckelmann Date: Wed Feb 22 17:25:42 2017 +0100 batman-adv: Keep fragments equally sized The batman-adv fragmentation packets have the design problem that they cannot be refragmented and cannot handle padding by the underlying link. The latter often leads to problems when networks are incorrectly configured and don't use a common MTU. The sender could for example fragment a 1271 byte frame (plus external ethernet header (14) and batadv unicast header (10)) to fit in a 1280 bytes large MTU of the underlying link (max. 1294 byte frames). This would create a 1294 bytes large frame (fragment 2) and a 55 bytes large frame (fragment 1). The extra 54 bytes are the fragment header (20) added to each fragment and the external ethernet header (14) for the second fragment. Let us assume that the next hop is then not able to transport 1294 bytes to its next hop. The 1294 byte large frame will be dropped but the 55 bytes large fragment will still be forwarded to its destination. Or let us assume that the underlying hardware requires that each frame has a minimum size (e.g. 60 bytes). Then it will pad the 55 bytes frame to 60 bytes. The receiver of the 60 bytes frame will no longer be able to correctly assemble the two frames together because it is not aware that 5 bytes of the 60 bytes frame are padding and don't belong to the reassembled frame. This can partly be avoided by splitting frames more equally. In this example, the 675 and 674 bytes large fragment frames could both potentially reach its destination without being too large or too small. Reported-by: Martin Weinelt Fixes: ee75ed88879a ("batman-adv: Fragment and send skbs larger than mtu") Signed-off-by: Sven Eckelmann Acked-by: Linus Lüssing Signed-off-by: Simon Wunderlich net/batman-adv/fragmentation.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b92675d998a9fa37fe9e0e35053a95b4a23c158b Author: Guenter Roeck Date: Sat Mar 4 07:02:11 2017 -0800 ARM: OMAP2+: Release device node after it is no longer needed. The device node returned by of_find_node_by_name() needs to be released after it is no longer needed to avoid a device node leak. Signed-off-by: Guenter Roeck Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 10e5778f54765c96fe0c8f104b7a030e5b35bc72 Author: Guenter Roeck Date: Sat Mar 4 07:02:10 2017 -0800 ARM: OMAP2+: Fix device node reference counts After commit 0549bde0fcb1 ("of: fix of_node leak caused in of_find_node_opts_by_path"), the following error may be reported when running omap images. OF: ERROR: Bad of_node_put() on /ocp@68000000 CPU: 0 PID: 0 Comm: swapper Not tainted 4.10.0-rc7-next-20170210 #1 Hardware name: Generic OMAP3-GP (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x98/0xac) [] (dump_stack) from [] (kobject_release+0x48/0x7c) [] (kobject_release) from [] (of_find_node_by_name+0x74/0x94) [] (of_find_node_by_name) from [] (omap3xxx_hwmod_is_hs_ip_block_usable+0x24/0x2c) [] (omap3xxx_hwmod_is_hs_ip_block_usable) from [] (omap3xxx_hwmod_init+0x180/0x274) [] (omap3xxx_hwmod_init) from [] (omap3_init_early+0xa0/0x11c) [] (omap3_init_early) from [] (omap3430_init_early+0x8/0x30) [] (omap3430_init_early) from [] (setup_arch+0xc04/0xc34) [] (setup_arch) from [] (start_kernel+0x68/0x38c) [] (start_kernel) from [<8020807c>] (0x8020807c) of_find_node_by_name() drops the reference to the passed device node. The commit referenced above exposes this problem. To fix the problem, use of_get_child_by_name() instead of of_find_node_by_name(); of_get_child_by_name() does not drop the reference count of passed device nodes. While semantically different, we only look for immediate children of the passed device node, so of_get_child_by_name() is a more appropriate function to use anyway. Release the reference to the device node obtained with of_get_child_by_name() after it is no longer needed to avoid another device node leak. While at it, clean up the code and change the return type of omap3xxx_hwmod_is_hs_ip_block_usable() to bool to match its use and the return type of of_device_is_available(). Cc: Qi Hou Cc: Peter Rosin Cc: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6ad966d7303b70165228dba1ee8da1a05c10eefe Author: Shile Zhang Date: Sat Feb 4 17:03:40 2017 +0800 powerpc/64: Fix checksum folding in csum_add() Paul's patch to fix checksum folding, commit b492f7e4e07a ("powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold") missed a case in csum_add(). Fix it. Signed-off-by: Shile Zhang Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a9c4f40ab2c281f95d41577ff0f7f78668feb73 Author: Alexey Kardashevskiy Date: Thu Mar 2 17:41:24 2017 +1100 powerpc/powernv: Fix opal tracepoints with JUMP_LABEL=n The recent commit to allow calling OPAL calls in real mode, commit ab9bad0ead9a ("powerpc/powernv: Remove separate entry for OPAL real mode calls"), introduced a bug when CONFIG_JUMP_LABEL=n. The commit moved the "mfmsr r12" prior to the call to OPAL_BRANCH, but we missed that OPAL_BRANCH clobbers r12 when jump labels are disabled. This leads to us using the tracepoint refcount as the MSR value, typically zero, and saving that into PACASAVEDMSR. When we return from OPAL we use that value as the MSR value for rfid, meaning we switch to 32-bit BE real mode - hilarity ensues. Fix it by using r11 in OPAL_BRANCH, which is not live at the time the macro is used in OPAL_CALL. Fixes: ab9bad0ead9a ("powerpc/powernv: Remove separate entry for OPAL real mode calls") Suggested-by: Paul Mackerras Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-wrappers.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0710f3ff91ecc4a715db6e4d0690472b13c4dac6 Merge: a3b4924 eec1153 Author: Linus Torvalds Date: Fri Mar 3 21:44:35 2017 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc final vfs updates from Al Viro: "A few unrelated patches that got beating in -next. Everything else will have to go into the next window ;-/" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: hfs: fix hfs_readdir() selftest for default_file_splice_read() infoleak 9p: constify ->d_name handling commit a3b4924b027f9a4b95ce89a914c1e0459e76f18a Merge: 0b94da8 42a70ab Author: Linus Torvalds Date: Fri Mar 3 21:36:56 2017 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "This is the set of stuff that didn't quite make the initial pull and a set of fixes for stuff which did. The new stuff is basically lpfc (nvme), qedi and aacraid. The fixes cover a lot of previously submitted stuff, the most important of which probably covers some of the failing irq vectors allocation and other fallout from having the SCSI command allocated as part of the block allocation functions" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (59 commits) scsi: qedi: Fix memory leak in tmf response processing. scsi: aacraid: remove redundant zero check on ret scsi: lpfc: use proper format string for dma_addr_t scsi: lpfc: use div_u64 for 64-bit division scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m scsi: cciss: correct check map error. scsi: qla2xxx: fix spelling mistake: "seperator" -> "separator" scsi: aacraid: Fixed expander hotplug for SMART family scsi: mpt3sas: switch to pci_alloc_irq_vectors scsi: qedf: fixup compilation warning about atomic_t usage scsi: remove scsi_execute_req_flags scsi: merge __scsi_execute into scsi_execute scsi: simplify scsi_execute_req_flags scsi: make the sense header argument to scsi_test_unit_ready mandatory scsi: sd: improve TUR handling in sd_check_events scsi: always zero sshdr in scsi_normalize_sense scsi: scsi_dh_emc: return success in clariion_std_inquiry() scsi: fix memory leak of sdpk on when gd fails to allocate scsi: sd: make sd_devt_release() static scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework. ... commit f78ef7cd9a0686b979679d0de061c6dbfd8d649e Author: WANG Cong Date: Fri Mar 3 12:21:14 2017 -0800 strparser: destroy workqueue on module exit Fixes: 43a0c6751a32 ("strparser: Stream parser for messages") Cc: Tom Herbert Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/strparser/strparser.c | 1 + 1 file changed, 1 insertion(+) commit 20b83643abbc714342f3c52c5c273eeca649d3f9 Merge: 4511555 25e94a9 Author: David S. Miller Date: Fri Mar 3 20:40:06 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Missing check for full sock in ip_route_me_harder(), from Florian Westphal. 2) Incorrect sip helper structure initilization that breaks it when several ports are used, from Christophe Leroy. 3) Fix incorrect assumption when looking up for matching with adjacent intervals in the nft_set_rbtree. 4) Fix broken netlink event error reporting in nf_tables that results in misleading ESRCH errors propagated to userspace listeners. ==================== Signed-off-by: David S. Miller commit 0b94da8dfc26ec2eb3e6640726e434abf8c53e49 Merge: e27fd02 86ef58a Author: Linus Torvalds Date: Fri Mar 3 16:48:48 2017 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A fix and regression test case for nvdimm namespace label compatibility. Details: - An "nvdimm namespace label" is metadata on an nvdimm that provisions dimm capacity into a "namespace" that can host a block device / dax-filesytem, or a device-dax character device. A namespace is an object that other operating environment and platform firmware needs to comprehend for capabilities like booting from an nvdimm. The label metadata contains a checksum that Linux was not calculating correctly leading to other environments rejecting the Linux label. These have received a build success notification from the kbuild robot, and a positive test result from Nick who reported the problem" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit, libnvdimm: fix interleave set cookie calculation tools/testing/nvdimm: make iset cookie predictable commit e27fd02d92817845471a196b3020c5694cbe5ff3 Merge: f47e2db 2a7275a Author: Linus Torvalds Date: Fri Mar 3 16:44:21 2017 -0800 Merge tag 'pci-v4.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix NULL pointer dereferences in many DesignWare-based drivers due to refactoring error - fix Altera config write breakage due to my refactoring error * tag 'pci-v4.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: altera: Fix TLP_CFG_DW0 for TLP write PCI: dwc: Fix crashes seen due to missing assignments commit 6407829901f074cf6beef566d6af9a0b0e238f0d Author: Rafael J. Wysocki Date: Fri Mar 3 23:51:31 2017 +0100 cpufreq: intel_pstate: Avoid triggering cpu_frequency tracepoint unnecessarily In the passive mode the cpu_frequency trace event is already triggered by the cpufreq core or by scaling governors, so intel_pstate should not trigger it once again for the same P-state updates. In addition to that, the frequency returned by intel_cpufreq_fast_switch() and passed via freqs.new from intel_cpufreq_target() to cpufreq_freq_transition_end() should reflect the P-state actually set, so make that happen. Fixes: 001c76f05b01 (cpufreq: intel_pstate: Generic governors support) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7f17326fc0b69afbda7aed6c4ce8e2328b74203b Author: Rafael J. Wysocki Date: Thu Mar 2 23:24:36 2017 +0100 cpufreq: intel_pstate: Fix intel_cpufreq_verify_policy() The intel_pstate_update_perf_limits() called from intel_cpufreq_verify_policy() may cause global P-state limits to change which is generally confusing and unnecessary. In the passive mode the global limits are only applied to the frequency selected by the scaling governor (they are not taken into account by governors when making decisions anyway), so making them follow the per-policy limits serves no purpose and may go against user expectations (as it generally causes the global attributes in sysfs to change even though they have not been written to in some cases). Fix that by dropping the intel_pstate_update_perf_limits() invocation from intel_cpufreq_verify_policy() (which also reduces the code size by a few lines). This change does not affect the per-CPU limits case, because those limits allow any P-state to be set by default in the passive mode and it removes the only piece of code updating them in that mode, so the per-policy settings will be the only ones taken into account in that case as expected. Fixes: 001c76f05b01 (cpufreq: intel_pstate: Generic governors support) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 10 ---------- 1 file changed, 10 deletions(-) commit 2bc756e7dde20972300bb8e2e46dd430d6d2d5db Author: Rafael J. Wysocki Date: Thu Mar 2 23:22:29 2017 +0100 cpufreq: intel_pstate: Do not use performance_limits in passive mode Using performance_limits in the passive mode doesn't make sense, because in that mode the global limits are applied to the frequency selected by the scaling governor. The maximum and minimum P-state limits in performance_limits are both set to 100 percent which will put all CPUs into the turbo range regardless of what governor is used and what frequencies are selected by it (that is particularly undesirable on CPUs with the generic powersave governor attached). For this reason, make intel_pstate_register_driver() always point limits to powersave_limits in the passive mode. Fixes: 001c76f05b01 (cpufreq: intel_pstate: Generic governors support) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f47e2db43d6865358f35a7e2c7aa035321a6537a Merge: 606ed72 ef470a6 Author: Linus Torvalds Date: Fri Mar 3 16:20:06 2017 -0800 Merge branch 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes and cleanups from Helge Deller: "Nothing really important in this patchset: fix resource leaks in error paths, coding style cleanups and code removal" * 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Remove flush_user_dcache_range and flush_user_icache_range parisc: fix a printk parisc: ccio-dma: Handle return NULL error from ioremap_nocache parisc: Define access_ok() as macro parisc: eisa: Fix resource leaks in error paths parisc: eisa: Remove coding style errors commit 606ed721afdbba2f560db87f33cbdb72463a5d7b Merge: a1a0db3 b46dcfa Author: Linus Torvalds Date: Fri Mar 3 16:17:55 2017 -0800 Merge tag 'xtensa-20170303' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - clean up bootable image build targets: provide separate 'Image', 'zImage' and 'uImage' make targets that only build corresponding image type. Make 'all' build all images appropriate for a platform - allow merging vectors code into .text section as a preparation step for XIP support - fix handling external FDT when the kernel is built without BLK_DEV_INITRD support * tag 'xtensa-20170303' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: allow merging vectors into .text section xtensa: clean up bootable image build targets xtensa: move parse_tag_fdt out of #ifdef CONFIG_BLK_DEV_INITRD commit a1a0db36d8c89243d989186108fe9196ad0e2c2d Merge: 0a040b2 ca2dea4 Author: Linus Torvalds Date: Fri Mar 3 16:15:48 2017 -0800 Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC late DT updates from Arnd Bergmann: "These updates have been kept in a separate branch mostly because they rely on updates to the respective clk drivers to keep the shared header files in sync. This includes two branches for arm64 dt updates, both following up on earlier changes for the same platforms that are already merged: Samsung: - add USB3 support in Exynos7 - minor PM related updates Amlogic: - new machines: WeTek Set-top-boxes - various devices added to DT There are also a couple of bugfixes that trickled in since the start of the merge window: - The moxart_defconfig was not building the intended platform - CPU-hotplug was broken on ux500 - Coresight was broken on Juno (never worked)" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits) ARM: deconfig: fix the moxart defconfig ARM: ux500: resume the second core properly arm64: dts: juno: update definition for programmable replicator arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost arm64: dts: exynos: Add USB 3.0 controller node for Exynos7 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7 pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e ARM64: dts: meson-gxbb-p200: add ADC laddered keys ARM64: dts: meson: meson-gx: add the SAR ADC ARM64: dts: meson-gxl: add the pwm_ao_b pin ARM64: dts: meson-gx: add the missing pwm_AO_ab node clk: gxbb: fix CLKID_ETH defined twice ARM64: dts: meson-gxl: rename Nexbox A95x for consistency clk: gxbb: add the SAR ADC clocks and expose them dt-bindings: amlogic: Add WeTek boards ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play dt-bindings: vendor-prefix: Add wetek vendor prefix ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes ... commit 0a040b2113ec226bcf56fcbe02d035bb5b30c35e Merge: 4e66c42 ef65aae Author: Linus Torvalds Date: Fri Mar 3 16:00:59 2017 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull SMB3 fixes from Steve French: "Some small bug fixes as well as SMB2.1/SMB3 enablement for DFS (global namespace) which previously was only enabled for CIFS" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: smb2: Enforce sec= mount option CIFS: Fix sparse warnings CIFS: implement get_dfs_refer for SMB2+ CIFS: use DFS pathnames in SMB2+ Create requests CIFS: set signing flag in SMB2+ TreeConnect if needed CIFS: let ses->ipc_tid hold smb2 TreeIds CIFS: add use_ipc flag to SMB2_ioctl() CIFS: add build_path_from_dentry_optional_prefix() CIFS: move DFS response parsing out of SMB1 code CIFS: Fix possible use after free in demultiplex thread commit fd5d666932d51b2552ecc0280047d6b35d9b6cd1 Author: John Keeping Date: Fri Mar 3 12:24:05 2017 +0000 Documentation/sphinx: fix primary_domain configuration With Sphinx 1.5.3 I get the warning: WARNING: primary_domain 'C' not found, ignored. It seems that domain names in Sphinx are case-sensitive and for the C domain the name must be lower case. Signed-off-by: John Keeping Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3fc83e55533b9fddac1d4eda79956768df569ea Author: Martyn Welch Date: Fri Mar 3 22:43:30 2017 +0000 docs: Fix htmldocs build failure Build of HTML docs failing due to conversion of deviceiobook.tmpl in 8a8a602f and regulator.tmpl in 028f2533 to RST without removing from DOCBOOKS in Makefile, resulting (in the case of deviceiobook) the following error: make[1]: *** No rule to make target 'Documentation/DocBook/deviceiobook.xml', needed by 'Documentation/DocBook/deviceiobook.aux.xml'. Stop. Makefile:1452: recipe for target 'htmldocs' failed make: *** [htmldocs] Error 2 Update DOCBOOKS to reflect available books. Signed-off-by: Martyn Welch Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9857b1ad4740ec2429e8ec0a39946d45a8d2cff9 Author: SeongJae Park Date: Fri Mar 3 15:44:02 2017 +0900 doc/ko_KR/memory-barriers: Update control-dependencies section This commit applies upstream change, commit c8241f8553e8 ("doc: Update control-dependencies section of memory-barriers.txt"), to Korean translation. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet .../translations/ko_KR/memory-barriers.txt | 68 ++++++++++++---------- 1 file changed, 37 insertions(+), 31 deletions(-) commit 2eb6a4b26d13c51bdb8d5aefdfc846c0624b8ce4 Author: Cao jin Date: Wed Mar 1 17:05:28 2017 +0800 pcieaer doc: update the link The original link is empty, replace it. Signed-off-by: Cao jin Signed-off-by: Jonathan Corbet Documentation/PCI/pcieaer-howto.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3c1a297b6fe60fe7be637cb067b27fca46be504 Author: Krzysztof Kozlowski Date: Fri Feb 24 10:42:14 2017 +0200 Documentation: Update path to sysrq.txt Commit 9d85025b0418 ("docs-rst: create an user's manual book") moved the sysrq.txt leaving old paths in the kernel docs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/media/v4l-drivers/bttv.rst | 2 +- Documentation/s390/Debugging390.txt | 2 +- Documentation/sysctl/kernel.txt | 2 +- Documentation/virtual/uml/UserModeLinux-HOWTO.txt | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 4e66c42c60fdf9be81837857454a41b39bf1b773 Merge: e58bc92 9a87ad3 Author: Linus Torvalds Date: Fri Mar 3 12:14:13 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse update from Miklos Szeredi: "A bugfix and cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: release: private_data cannot be NULL fuse: cleanup fuse_file refcounting fuse: add missing FR_FORCE commit e58bc927835a6f5ddbe4d2e069c9082b706810e7 Merge: 590dce2 51f8f3c Author: Linus Torvalds Date: Fri Mar 3 11:55:57 2017 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "Because copy up can take a long time, serialized copy ups could be a big performance bottleneck. This update allows concurrent copy up of regular files eliminating this potential problem. There are also minor fixes" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials ovl: properly implement sync_filesystem() ovl: concurrent copy up of regular files ovl: introduce copy up waitqueue ovl: copy up regular file using O_TMPFILE ovl: rearrange code in ovl_copy_up_locked() ovl: check if upperdir fs supports O_TMPFILE commit 590dce2d4934fb909b112cd80c80486362337744 Merge: e0d0722 a528d35 Author: Linus Torvalds Date: Fri Mar 3 11:38:56 2017 -0800 Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs 'statx()' update from Al Viro. This adds the new extended stat() interface that internally subsumes our previous stat interfaces, and allows user mode to specify in more detail what kind of information it wants. It also allows for some explicit synchronization information to be passed to the filesystem, which can be relevant for network filesystems: is the cached value ok, or do you need open/close consistency, or what? From David Howells. Andreas Dilger points out that the first version of the extended statx interface was posted June 29, 2010: https://www.spinics.net/lists/linux-fsdevel/msg33831.html * 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: statx: Add a system call to make enhanced file info available commit e0d072250a54669dce876d8ade70e417356aae74 Merge: 1827adb 165a5e2 Author: Linus Torvalds Date: Fri Mar 3 10:53:35 2017 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: "A collection of fixes for this merge window, either fixes for existing issues, or parts that were waiting for acks to come in. This pull request contains: - Allocation of nvme queues on the right node from Shaohua. This was ready long before the merge window, but waiting on an ack from Bjorn on the PCI bit. Now that we have that, the three patches can go in. - Two fixes for blk-mq-sched with nvmeof, which uses hctx specific request allocations. This caused an oops. One part from Sagi, one part from Omar. - A loop partition scan deadlock fix from Omar, fixing a regression in this merge window. - A three-patch series from Keith, closing up a hole on clearing out requests on shutdown/resume. - A stable fix for nbd from Josef, fixing a leak of sockets. - Two fixes for a regression in this window from Jan, fixing a problem with one of his earlier patches dealing with queue vs bdi life times. - A fix for a regression with virtio-blk, causing an IO stall if scheduling is used. From me. - A fix for an io context lock ordering problem. From me" * 'for-linus' of git://git.kernel.dk/linux-block: block: Move bdi_unregister() to del_gendisk() blk-mq: ensure that bd->last is always set correctly block: don't call ioc_exit_icq() with the queue lock held for blk-mq block: Initialize bd_bdi on inode initialization loop: fix LO_FLAGS_PARTSCAN hang nvme: Complete all stuck requests blk-mq: Provide freeze queue timeout blk-mq: Export blk_mq_freeze_queue_wait nbd: stop leaking sockets blk-mq: move update of tags->rqs to __blk_mq_alloc_request() blk-mq: kill blk_mq_set_alloc_data() blk-mq: make blk_mq_alloc_request_hctx() allocate a scheduler request blk-mq-sched: Allocate sched reserved tags as specified in the original queue tagset nvme: allocate nvme_queue in correct node PCI: add an API to get node from vector blk-mq: allocate blk_mq_tags and requests in correct node commit 1827adb11ad26b2290dc9fe2aaf54976b2439865 Merge: 7876991 5eca1c1 Author: Linus Torvalds Date: Fri Mar 3 10:16:38 2017 -0800 Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull sched.h split-up from Ingo Molnar: "The point of these changes is to significantly reduce the header footprint, to speed up the kernel build and to have a cleaner header structure. After these changes the new 's typical preprocessed size goes down from a previous ~0.68 MB (~22K lines) to ~0.45 MB (~15K lines), which is around 40% faster to build on typical configs. Not much changed from the last version (-v2) posted three weeks ago: I eliminated quirks, backmerged fixes plus I rebased it to an upstream SHA1 from yesterday that includes most changes queued up in -next plus all sched.h changes that were pending from Andrew. I've re-tested the series both on x86 and on cross-arch defconfigs, and did a bisectability test at a number of random points. I tried to test as many build configurations as possible, but some build breakage is probably still left - but it should be mostly limited to architectures that have no cross-compiler binaries available on kernel.org, and non-default configurations" * 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (146 commits) sched/headers: Clean up sched/headers: Remove #ifdefs from sched/headers: Remove the include from sched/headers, hrtimer: Remove the include from sched/headers, x86/apic: Remove the header inclusion from sched/headers, timers: Remove the include from sched/headers: Remove from sched/headers: Remove from sched/core: Remove unused prefetch_stack() sched/headers: Remove from sched/headers: Remove the 'init_pid_ns' prototype from sched/headers: Remove from sched/headers: Remove from sched/headers: Remove the runqueue_is_locked() prototype sched/headers: Remove from sched/headers: Remove from sched/headers: Remove from sched/headers: Remove from sched/headers: Remove the include from sched/headers: Remove from ... commit 78769912f680fc0a79a67e798a0ae76f07e63a7b Merge: c82be9d e53aff4 Author: Linus Torvalds Date: Fri Mar 3 10:13:12 2017 -0800 Merge tag 'linux-kselftest-4.11-rc1-urgent_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fix from Shuah Khan: "This update consists of an urgent fix for individual test build failures introduced in the 4.11-rc1 update" * tag 'linux-kselftest-4.11-rc1-urgent_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: lib.mk Fix individual test builds commit 45115553f32ddbedb1633a6b73751a75a4a4f43a Merge: 48051c3 6d43131 Author: David S. Miller Date: Fri Mar 3 10:06:39 2017 -0800 Merge branch 'sfx-fixes' Edward Cree says: ==================== sfc: couple of fixes First patch addresses a construct that causes sparse to error out. With that fixed, sparse makes some warnings on ef10.c, second patch fixes one of them. ==================== Signed-off-by: David S. Miller commit 6d43131c158f42e2138d83495d19c70ed5cc0ffe Author: Edward Cree Date: Fri Mar 3 15:22:27 2017 +0000 sfc: fix IPID endianness in TSOv2 The value we read from the header is in network byte order, whereas EFX_POPULATE_QWORD_* takes values in host byte order (which it then converts to little-endian, as MCDI is little-endian). Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0346b033899b9affa4da8c32bfb574dfb89859e Author: Edward Cree Date: Fri Mar 3 15:22:09 2017 +0000 sfc: avoid max() in array size It confuses sparse, which thinks the size isn't constant. Let's achieve the same thing with a BUILD_BUG_ON, since we know which one should be bigger and don't expect them ever to change. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 48051c375cac3e0f8f52ccda30329e35da980066 Merge: a8d63a5 66ddb82 Author: David S. Miller Date: Fri Mar 3 09:58:17 2017 -0800 Merge tag 'linux-can-fixes-for-4.11-20170303' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-03-03 this is a pull request for the upcoming v4.11 release. There are two patches by Ethan Zonca for the gs_usb driver, the first one fixes the memory used for USB transfers, the second one the coding style. The last two patches are by me, one fixing a memory leak in the usb_8dev driver the other a typo in the flexcan driver. ==================== Signed-off-by: David S. Miller commit a8d63a53b3eac8626f62336dcc327c18f1bbca78 Author: Zhu Yanjun Date: Fri Mar 3 00:44:26 2017 -0500 rds: remove unnecessary returned value check The function rds_trans_register always returns 0. As such, it is not necessary to check the returned value. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.c | 6 +----- net/rds/rds.h | 2 +- net/rds/tcp.c | 6 +----- net/rds/transport.c | 4 +--- 4 files changed, 4 insertions(+), 14 deletions(-) commit 37411cad633f5e41f8a13007654909d21b19363a Author: David Howells Date: Thu Mar 2 23:48:52 2017 +0000 rxrpc: Fix potential NULL-pointer exception Fix a potential NULL-pointer exception in rxrpc_do_sendmsg(). The call state check that I added should have gone into the else-body of the if-statement where we actually have a call to check. Found by CoverityScan CID#1414316 ("Dereference after null check"). Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Reported-by: Colin Ian King Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/sendmsg.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit b3b6157a6ad69941e5a2eba1aa2edf9a53cd28dd Merge: e285998 d58cebb Author: David S. Miller Date: Fri Mar 3 09:46:54 2017 -0800 Merge branch 'nfp-fixes' Jakub Kicinski says: ==================== nfp: RX and XDP buffer fixes Two trivial fixes for code introduced with XDP support. First one corrects the buffer size we populate a register with. The register is designed to be used for scatter transfers which the driver (and most FWs) don't support so it's not critical. The other one for DMA direction is mostly cosmetic, DMA API doesn't seem to care today about the precise direction in sync calls. ==================== Signed-off-by: David S. Miller commit d58cebb79b62ff84b537a35423b8d6b7f0746985 Author: Jakub Kicinski Date: Thu Mar 2 15:26:21 2017 -0800 nfp: correct DMA direction in XDP DMA sync dma_sync_single_for_*() takes the direction in which the buffer was mapped, not the direction of the sync. We should sync XDP buffers bidirectionally. Fixes: ecd63a0217d5 ("nfp: add XDP support in the driver") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9383b33771e566fa547daa2d09c6e0f1aaa298c3 Author: Jakub Kicinski Date: Thu Mar 2 15:26:20 2017 -0800 nfp: don't tell FW about the reserved buffer space Since commit c0f031bc8866 ("nfp_net: use alloc_frag() and build_skb()") we are allocating buffers which have to hold both the data and skb to be created in place by build_skb(). FW should only be told about the buffer space it can DMA to, that is without the build_skb() headroom and tailroom. Note: firmware applications should validate the buffers against both MTU and free list buffer size so oversized packets would not pass through the NIC anyway. Fixes: c0f031bc8866 ("nfp: use alloc_frag() and build_skb()") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e28599800a1274357492d85a653012ed3220b45c Merge: 2ddbcea fa42245 Author: David S. Miller Date: Fri Mar 3 09:44:28 2017 -0800 Merge branch 'bgmac-fixes' Jon Mason says: ==================== net: ethernet: bgmac: bug fixes Changes in v5: * Rebased to the latest code and fixed up a compile error due to the mac_addr struct going away (found by David Miller) Changes in v4: * Added the udelays from the previous code (per David Miller) Changes in v3: * Reworked the init sequence patch to only remove the device reset if the device is actually in reset. Given that this code doesn't bear much resemblance to the original code, I'm changing the author of the patch. This was tested on NS2 SVK. Changes in v2: * Reworked the first match to make it more obvious what portions of the register were being preserved (Per Rafal Mileki) * Style change to reorder the function variables in patch 2 (per Sergei Shtylyov) Bug fixes for bgmac driver ==================== Signed-off-by: David S. Miller commit fa42245dff4a5f2f8f208da542acbd80c22f7c65 Author: Hari Vyas Date: Thu Mar 2 17:59:57 2017 -0500 net: ethernet: bgmac: mac address change bug ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to bgmac_set_mac_address() but code assumed u8 *. This caused two bytes chopping and the wrong mac address was configured. Signed-off-by: Hari Vyas Signed-off-by: Jon Mason Fixes: 4e209001b86 ("bgmac: write mac address to hardware in ndo_set_mac_address") Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 16206524f6ea57d6dcd56fe46f9f4a06d4a1b113 Author: Jon Mason Date: Thu Mar 2 17:59:56 2017 -0500 net: ethernet: bgmac: init sequence bug Fix a bug in the 'bgmac' driver init sequence that blind writes for init sequence where it should preserve most bits other than the ones it is deliberately manipulating. The code now checks to see if the adapter needs to be brought out of reset (where as before it was doing an IDM write to bring it out of reset regardless of whether it was in reset or not). Also, removed unnecessary usleeps (as there is already a read present to flush the IDM writes). Signed-off-by: Zac Schroff Signed-off-by: Jon Mason Fixes: f6a95a24957 ("net: ethernet: bgmac: Add platform device support") Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-platform.c | 27 +++++++++++++++++--------- drivers/net/ethernet/broadcom/bgmac.h | 16 +++++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) commit 2ddbcea75a36dac2ff62ee33a0a8df37e994201e Merge: f7bb3d8 a254d8f Author: David S. Miller Date: Fri Mar 3 09:36:15 2017 -0800 Merge branch 'xen-netback-fixes' Paul Durrant says: ==================== xen-netback: update memory leak fix to avoid BUG Commit 9a6cdf52b85e "xen-netback: fix memory leaks on XenBus disconnect" added missing code to fix a memory leak by calling vfree() in the appropriate place. Unfortunately subsequent commit f16f1df65f1c "xen-netback: protect resource cleaning on XenBus disconnect" then wrapped this call to vfree() in a spin lock, leading to a BUG due to incorrect context. Patch #1 makes the existing code more readable Patch #2 fixes the problem ==================== Signed-off-by: David S. Miller commit a254d8f9a8a928772ef4608342125ccb35b79d5d Author: Paul Durrant Date: Thu Mar 2 12:54:26 2017 +0000 xen-netback: don't vfree() queues under spinlock This leads to a BUG of the following form: [ 174.512861] switch: port 2(vif3.0) entered disabled state [ 174.522735] BUG: sleeping function called from invalid context at /home/build/linux-linus/mm/vmalloc.c:1441 [ 174.523451] in_atomic(): 1, irqs_disabled(): 0, pid: 28, name: xenwatch [ 174.524131] CPU: 1 PID: 28 Comm: xenwatch Tainted: G W 4.10.0upstream-11073-g4977ab6-dirty #1 [ 174.524819] Hardware name: MSI MS-7680/H61M-P23 (MS-7680), BIOS V17.0 03/14/2011 [ 174.525517] Call Trace: [ 174.526217] show_stack+0x23/0x60 [ 174.526899] dump_stack+0x5b/0x88 [ 174.527562] ___might_sleep+0xde/0x130 [ 174.528208] __might_sleep+0x35/0xa0 [ 174.528840] ? _raw_spin_unlock_irqrestore+0x13/0x20 [ 174.529463] ? __wake_up+0x40/0x50 [ 174.530089] remove_vm_area+0x20/0x90 [ 174.530724] __vunmap+0x1d/0xc0 [ 174.531346] ? delete_object_full+0x13/0x20 [ 174.531973] vfree+0x40/0x80 [ 174.532594] set_backend_state+0x18a/0xa90 [ 174.533221] ? dwc_scan_descriptors+0x24d/0x430 [ 174.533850] ? kfree+0x5b/0xc0 [ 174.534476] ? xenbus_read+0x3d/0x50 [ 174.535101] ? xenbus_read+0x3d/0x50 [ 174.535718] ? xenbus_gather+0x31/0x90 [ 174.536332] ? ___might_sleep+0xf6/0x130 [ 174.536945] frontend_changed+0x6b/0xd0 [ 174.537565] xenbus_otherend_changed+0x7d/0x80 [ 174.538185] frontend_changed+0x12/0x20 [ 174.538803] xenwatch_thread+0x74/0x110 [ 174.539417] ? woken_wake_function+0x20/0x20 [ 174.540049] kthread+0xe5/0x120 [ 174.540663] ? xenbus_printf+0x50/0x50 [ 174.541278] ? __kthread_init_worker+0x40/0x40 [ 174.541898] ret_from_fork+0x21/0x2c [ 174.548635] switch: port 2(vif3.0) entered disabled state This patch defers the vfree() until after the spinlock is released. Reported-by: Juergen Gross Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/xenbus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d67ce7da3b1eda838db7bdca86d7ec28ef37068e Author: Paul Durrant Date: Thu Mar 2 12:54:25 2017 +0000 xen-netback: keep a local pointer for vif in backend_disconnect() This patch replaces use of 'be->vif' with 'vif' and hence generally makes the function look tidier. No semantic change. Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/xenbus.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit f7bb3d86a64775e0a7636d211dbd80cbeea6e618 Merge: 9f674e4 c74042f Author: David S. Miller Date: Fri Mar 3 09:29:49 2017 -0800 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-03-02 This series contains fixes to ixgbe only. Paolo fixes the driver so that you can actually update the RSS key value via ethtool. Alex fixes an issue on architectures that have a cache line size larger than 64 Bytes, where the amount of headroom for the frame starts shrinking. To take this into account, Alex adds one small check so that we compare the max_frame to the amount of actual data we can store, so we will automatically enable 3K receive buffers as soon as the maximum frame size we can handle drops below the standard Ethernet MTU. ==================== Signed-off-by: David S. Miller commit 65a50c656276b0846bea09dd011c0a3d35b77f3e Author: Todd Brandt Date: Thu Mar 2 16:12:15 2017 -0800 ftrace/graph: Add ftrace_graph_max_depth kernel parameter Early trace callgraphs can be extremely large on systems with several seconds of boot time. The max_depth parameter limits how deep the graph trace goes and reduces the output size. This parameter is the same as the max_graph_depth file in tracefs. Link: http://lkml.kernel.org/r/1488499935-23216-1-git-send-email-todd.e.brandt@linux.intel.com Signed-off-by: Todd Brandt [ changed comments about debugfs to tracefs ] Signed-off-by: Steven Rostedt (VMware) Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ kernel/trace/ftrace.c | 9 +++++++++ 2 files changed, 15 insertions(+) commit bf7165cfa23695c51998231c4efa080fe1d3548d Author: Rik van Riel Date: Wed Sep 28 22:55:54 2016 -0400 tracing: Add #undef to fix compile error There are several trace include files that define TRACE_INCLUDE_FILE. Include several of them in the same .c file (as I currently have in some code I am working on), and the compile will blow up with a "warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls" Every other include file in include/trace/events/ avoids that issue by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h should have one, too. Link: http://lkml.kernel.org/r/20160928225554.13bd7ac6@annuminas.surriel.com Cc: stable@vger.kernel.org Fixes: b8007ef74222 ("tracing: Separate raw syscall from syscall tracer") Signed-off-by: Rik van Riel Signed-off-by: Steven Rostedt (VMware) include/trace/events/syscalls.h | 1 + 1 file changed, 1 insertion(+) commit b17ef2ed624aa7c1f68ed11acd16ecbf80fe01d7 Author: Steven Rostedt (VMware) Date: Thu Mar 2 17:28:45 2017 -0500 jump_label: Add comment about initialization order for anonymous unions Commit 3821fd35b58d ("jump_label: Reduce the size of struct static_key") broke old compilers that could not handle static initialization of anonymous unions. Boris fixed it with a patch that added brackets around the static initializer. But this creates a dependency between those initializers and the structure's order of its fields. Document this dependency in case new fields are added to struct static_key in the future. Noted-by: Boris Ostrovsky Suggested-by: Chris Mason Signed-off-by: Steven Rostedt (VMware) include/linux/jump_label.h | 7 +++++++ 1 file changed, 7 insertions(+) commit cd8d860dcce906cd477be7d0648ba6f56a52eaa6 Author: Boris Ostrovsky Date: Tue Feb 28 11:32:22 2017 -0500 jump_label: Fix anonymous union initialization Pre-4.6 gcc do not allow direct static initialization of members of anonymous structs/unions. After commit 3821fd35b58d ("jump_label: Reduce the size of struct static_key") STATIC_KEY_INIT_{TRUE|FALSE} definitions cannot be compiled with those older compilers. Placing initializers inside curved brackets works around this problem. Link: http://lkml.kernel.org/r/1488299542-30765-1-git-send-email-boris.ostrovsky@oracle.com Fixes: 3821fd35b58d ("jump_label: Reduce the size of struct static_key") Reviewed-by: Jason Baron Compiled-by: Chris Mason Signed-off-by: Boris Ostrovsky Signed-off-by: Steven Rostedt (VMware) include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab42632156becd35d3884ee5c14da2bedbf3149a Author: David Daney Date: Wed Mar 1 14:04:53 2017 -0800 module: set __jump_table alignment to 8 For powerpc the __jump_table section in modules is not aligned, this causes a WARN_ON() splat when loading a module containing a __jump_table. Strict alignment became necessary with commit 3821fd35b58d ("jump_label: Reduce the size of struct static_key"), currently in linux-next, which uses the two least significant bits of pointers to __jump_table elements. Fix by forcing __jump_table to 8, which is the same alignment used for this section in the kernel proper. Link: http://lkml.kernel.org/r/20170301220453.4756-1-david.daney@cavium.com Reviewed-by: Jason Baron Acked-by: Jessica Yu Acked-by: Michael Ellerman (powerpc) Tested-by: Sachin Sant Signed-off-by: David Daney Signed-off-by: Steven Rostedt (VMware) scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+) commit 92ad18ec26611e8a47639e600bd9dc42fbe2edcf Author: Steven Rostedt (VMware) Date: Thu Mar 2 12:53:26 2017 -0500 ftrace/graph: Do not modify the EMPTY_HASH for the function_graph filter On boot up, if the kernel command line sets a graph funtion with the kernel command line options "ftrace_graph_filter" or "ftrace_graph_notrace" then it updates the corresponding function graph hash, ftrace_graph_hash or ftrace_graph_notrace_hash respectively. Unfortunately, at boot up, these variables are pointers to the "EMPTY_HASH" which is a constant used as a placeholder when a hash has no entities. The problem was that the comand line version to set the hashes updated the actual EMPTY_HASH instead of creating a new hash for the function graph. This broke the EMPTY_HASH because not only did it modify a constant (not sure how that was allowed to happen, except maybe because it was done at early boot, const variables were still mutable), but it made the filters have functions listed in them when they were actually empty. The kernel command line function needs to allocate a new hash for the function graph filters and assign the necessary variables to that new hash instead. Link: http://lkml.kernel.org/r/1488420091.7212.17.camel@linux.intel.com Cc: Namhyung Kim Fixes: b9b0c831bed2 ("ftrace: Convert graph filter to use hash tables") Reported-by: Todd Brandt Tested-by: Todd Brandt Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 25e94a997b324b5f167f56d56d7106d38b78c9de Author: Pablo Neira Ayuso Date: Wed Mar 1 12:52:31 2017 +0100 netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails The underlying nlmsg_multicast() already sets sk->sk_err for us to notify socket overruns, so we should not do anything with this return value. So we just call nfnetlink_set_err() if: 1) We fail to allocate the netlink message. or 2) We don't have enough space in the netlink message to place attributes, which means that we likely need to allocate a larger message. Before this patch, the internal ESRCH netlink error code was propagated to userspace, which is quite misleading. Netlink semantics mandate that listeners just hit ENOBUFS if the socket buffer overruns. Reported-by: Alexander Alemayhu Tested-by: Alexander Alemayhu Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 6 +- net/netfilter/nf_tables_api.c | 133 ++++++++++++++++---------------------- 2 files changed, 58 insertions(+), 81 deletions(-) commit f9121355eb6f9babadb97bf5b34ab0cce7764406 Author: Pablo Neira Ayuso Date: Wed Mar 1 18:15:11 2017 +0100 netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups In case of adjacent ranges, we may indeed see either the high part of the range in first place or the low part of it. Remove this incorrect assumption, let's make sure we annotate the low part of the interval in case of we have adjacent interva intervals so we hit a matching in lookups. Reported-by: Simon Hanisch Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_rbtree.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit da2f27e9e615d1c799c9582b15262458da61fddc Author: Christophe Leroy Date: Wed Mar 1 15:33:26 2017 +0100 netfilter: nf_conntrack_sip: fix wrong memory initialisation In commit 82de0be6862cd ("netfilter: Add helper array register/unregister functions"), struct nf_conntrack_helper sip[MAX_PORTS][4] was changed to sip[MAX_PORTS * 4], so the memory init should have been changed to memset(&sip[4 * i], 0, 4 * sizeof(sip[i])); But as the sip[] table is allocated in the BSS, it is already set to 0 Fixes: 82de0be6862cd ("netfilter: Add helper array register/unregister functions") Signed-off-by: Christophe Leroy Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 2 -- 1 file changed, 2 deletions(-) commit 66ddb82129df66a94219844c509074adb4330a28 Author: Marc Kleine-Budde Date: Thu Mar 2 15:42:49 2017 +0100 can: flexcan: fix typo in comment This patch fixes the typo "Disble" -> "Disable". Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c42631376306fb3f34d51fda546b50a9b6dd6ec Author: Marc Kleine-Budde Date: Thu Mar 2 12:03:40 2017 +0100 can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer The priv->cmd_msg_buffer is allocated in the probe function, but never kfree()ed. This patch converts the kzalloc() to resource-managed kzalloc. Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/usb_8dev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 540a27aef355e3fd8c598600d4a3c8f92127ee05 Author: Ethan Zonca Date: Fri Feb 24 11:00:34 2017 -0500 can: gs_usb: fix coding style This patch fixes five minor style issues, spaces are between bitwise OR operators. Signed-off-by: Ethan Zonca Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit c919a3069c775c1c876bec55e00b2305d5125caa Author: Ethan Zonca Date: Fri Feb 24 11:27:36 2017 -0500 can: gs_usb: Don't use stack memory for USB transfers Fixes: 05ca5270005c can: gs_usb: add ethtool set_phys_id callback to locate physical device The gs_usb driver is performing USB transfers using buffers allocated on the stack. This causes the driver to not function with vmapped stacks. Instead, allocate memory for the transfer buffers. Signed-off-by: Ethan Zonca Cc: linux-stable # >= v4.8 Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) commit 5df62771c556e4ec9d7ecea1f070ff6da4bce151 Author: Sean Young Date: Thu Feb 23 06:11:21 2017 -0300 [media] rc: protocol is not set on register for raw IR devices ir_raw_event_register() sets up change_protocol(), and without that set, rc_setup_rx_device() does not set the protocol for the device on register. The standard udev rules run ir-keytable, which writes to the protocols file again, which hides this problem. Fixes: 7ff2c2b ("[media] rc-main: split setup and unregister functions") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 413808685dd7c9b54bbc5af79da2eaddd0fc3cb2 Author: Sean Young Date: Wed Feb 22 18:48:01 2017 -0300 [media] rc: raw decoder for keymap protocol is not loaded on register When the protocol is set via the sysfs protocols attribute, the decoder is loaded. However, when it is not when a device is first plugged in or registered. Fixes: acc1c3c ("[media] media: rc: load decoder modules on-demand") Signed-off-by: Sean Young Cc: # v4.5+ Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c1305a40722f3e02f3d971acc22f5991aff239a6 Author: Heiner Kallweit Date: Sun Feb 12 15:01:22 2017 -0200 [media] rc: nuvoton: fix deadlock in nvt_write_wakeup_codes nvt_write_wakeup_codes acquires the same lock as the ISR but doesn't disable interrupts on the local CPU. This caused the following deadlock. Fix this by using spin_lock_irqsave. [ 432.362008] ================================ [ 432.362074] WARNING: inconsistent lock state [ 432.362144] 4.10.0-rc7-next-20170210 #1 Not tainted [ 432.362219] -------------------------------- [ 432.362286] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. [ 432.362379] swapper/0/0 [HC1[1]:SC0[0]:HE0:SE1] takes: [ 432.362457] (&(&nvt->lock)->rlock){?.+...}, at: [] nvt_cir_isr+0x2d/0x520 [nuvoton_cir] [ 432.362611] {HARDIRQ-ON-W} state was registered at: [ 432.362686] [ 432.362698] [] __lock_acquire+0x5dc/0x1260 [ 432.362812] [ 432.362817] [] lock_acquire+0xe9/0x1d0 [ 432.362927] [ 432.362934] [] _raw_spin_lock+0x33/0x50 [ 432.363045] [ 432.363051] [] nvt_write_wakeup_codes.isra.12+0x22/0xe0 [nuvoton_cir] [ 432.363193] [ 432.363199] [] wakeup_data_store+0xdf/0xf0 [nuvoton_cir] [ 432.363327] [ 432.363333] [] dev_attr_store+0x13/0x20 [ 432.363441] [ 432.363449] [] sysfs_kf_write+0x40/0x50 [ 432.363558] [ 432.363564] [] kernfs_fop_write+0x150/0x1e0 [ 432.363676] [ 432.363685] [] __vfs_write+0x23/0x120 [ 432.363791] [ 432.363798] [] vfs_write+0xc3/0x1e0 [ 432.363902] [ 432.363909] [] SyS_write+0x44/0xa0 [ 432.364012] [ 432.364021] [] do_syscall_64+0x57/0x140 [ 432.364129] [ 432.364135] [] return_from_SYSCALL_64+0x0/0x7a [ 432.364252] irq event stamp: 415118 [ 432.364313] hardirqs last enabled at (415115): [] cpuidle_enter_state+0x11b/0x370 [ 432.364445] hardirqs last disabled at (415116): [] common_interrupt+0x8b/0x90 [ 432.364573] softirqs last enabled at (415118): [] _local_bh_enable+0x1c/0x50 [ 432.364699] softirqs last disabled at (415117): [] irq_enter+0x43/0x60 [ 432.364814] other info that might help us debug this: [ 432.364909] Possible unsafe locking scenario: [ 432.367821] CPU0 [ 432.370645] ---- [ 432.373432] lock(&(&nvt->lock)->rlock); [ 432.376228] [ 432.378982] lock(&(&nvt->lock)->rlock); [ 432.381757] *** DEADLOCK *** [ 432.389888] no locks held by swapper/0/0. [ 432.392574] stack backtrace: [ 432.397774] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc7-next-20170210 #1 [ 432.400375] Hardware name: ZOTAC ZBOX-CI321NANO/ZBOX-CI321NANO, BIOS B246P105 06/01/2015 [ 432.403023] Call Trace: [ 432.405636] [ 432.408208] dump_stack+0x68/0x93 [ 432.410775] print_usage_bug+0x1dd/0x1f0 [ 432.413334] mark_lock+0x559/0x5c0 [ 432.415871] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 432.418431] __lock_acquire+0x6b1/0x1260 [ 432.420941] lock_acquire+0xe9/0x1d0 [ 432.423396] ? nvt_cir_isr+0x2d/0x520 [nuvoton_cir] [ 432.425844] _raw_spin_lock+0x33/0x50 [ 432.428252] ? nvt_cir_isr+0x2d/0x520 [nuvoton_cir] [ 432.430670] nvt_cir_isr+0x2d/0x520 [nuvoton_cir] [ 432.433085] __handle_irq_event_percpu+0x43/0x330 [ 432.435493] handle_irq_event_percpu+0x1e/0x50 [ 432.437884] handle_irq_event+0x34/0x60 [ 432.440236] handle_edge_irq+0x6a/0x150 [ 432.442561] handle_irq+0x15/0x20 [ 432.444854] do_IRQ+0x57/0x110 [ 432.447115] common_interrupt+0x90/0x90 [ 432.449380] RIP: 0010:cpuidle_enter_state+0x120/0x370 [ 432.451653] RSP: 0018:ffffffff81c03dd8 EFLAGS: 00000206 ORIG_RAX: ffffffffffffffcc [ 432.453994] RAX: ffffffff81c14500 RBX: 0000000000000008 RCX: 00000064aac6f2d2 [ 432.456349] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff81c14500 [ 432.458704] RBP: ffffffff81c03e18 R08: cccccccccccccccd R09: 0000000000000018 [ 432.461072] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880100a21260 [ 432.463450] R13: ffffffff81c7e6f8 R14: 0000000000000008 R15: ffffffff81c7e6e0 [ 432.465819] [ 432.468104] ? cpuidle_enter_state+0x11b/0x370 [ 432.470413] cpuidle_enter+0x12/0x20 [ 432.472698] call_cpuidle+0x1e/0x40 [ 432.474967] do_idle+0xe3/0x1c0 [ 432.477172] cpu_startup_entry+0x18/0x20 [ 432.479376] rest_init+0x130/0x140 [ 432.481565] start_kernel+0x3cc/0x3d9 [ 432.483750] x86_64_start_reservations+0x2a/0x2c [ 432.485980] x86_64_start_kernel+0x178/0x18b [ 432.488222] start_cpu+0x14/0x14 [ 432.490453] ? start_cpu+0x14/0x14 Fixes: 97c129747af5 "[media] rc: nuvoton-cir: Add support wakeup via sysfs filter callback" Signed-off-by: Heiner Kallweit Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit db5b15b74ed9a5c04bb808d18ffa2c773f5c18c0 Author: Sean Young Date: Mon Feb 13 10:35:44 2017 -0200 [media] lirc: fix dead lock between open and wakeup_filter The locking in lirc needs improvement, but for now just fix this potential deadlock. ====================================================== [ INFO: possible circular locking dependency detected ] 4.10.0-rc1+ #1 Not tainted ------------------------------------------------------- bash/2502 is trying to acquire lock: (ir_raw_handler_lock){+.+.+.}, at: [] ir_raw_encode_scancode+0x3e/0xb0 [rc_core] but task is already holding lock: (&dev->lock){+.+.+.}, at: [] store_filter+0x9f/0x240 [rc_core] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&dev->lock){+.+.+.}: [] lock_acquire+0xfd/0x200 [] mutex_lock_nested+0x77/0x6d0 [] rc_open+0x2a/0x80 [rc_core] [] lirc_dev_fop_open+0xda/0x1e0 [lirc_dev] [] chrdev_open+0xb0/0x210 [] do_dentry_open+0x20a/0x2f0 [] vfs_open+0x4c/0x80 [] path_openat+0x5bc/0xc00 [] do_filp_open+0x91/0x100 [] do_sys_open+0x130/0x220 [] SyS_open+0x1e/0x20 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 -> #1 (lirc_dev_lock){+.+.+.}: [] lock_acquire+0xfd/0x200 [] mutex_lock_nested+0x77/0x6d0 [] lirc_register_driver+0x67/0x59b [lirc_dev] [] ir_lirc_register+0x1f4/0x260 [ir_lirc_codec] [] ir_raw_handler_register+0x7c/0xb0 [rc_core] [] 0xffffffffc0398010 [] do_one_initcall+0x52/0x1b0 [] do_init_module+0x5f/0x1fa [] load_module+0x2675/0x2b00 [] SYSC_finit_module+0xdf/0x110 [] SyS_finit_module+0xe/0x10 [] do_syscall_64+0x6c/0x1f0 [] return_from_SYSCALL_64+0x0/0x7a -> #0 (ir_raw_handler_lock){+.+.+.}: [] __lock_acquire+0x10f7/0x1290 [] lock_acquire+0xfd/0x200 [] mutex_lock_nested+0x77/0x6d0 [] ir_raw_encode_scancode+0x3e/0xb0 [rc_core] [] loop_set_wakeup_filter+0x62/0xbd [rc_loopback] [] store_filter+0x1aa/0x240 [rc_core] [] dev_attr_store+0x18/0x30 [] sysfs_kf_write+0x45/0x60 [] kernfs_fop_write+0x155/0x1e0 [] __vfs_write+0x37/0x160 [] vfs_write+0xc8/0x1e0 [] SyS_write+0x58/0xc0 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 other info that might help us debug this: Chain exists of: ir_raw_handler_lock --> lirc_dev_lock --> &dev->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->lock); lock(lirc_dev_lock); lock(&dev->lock); lock(ir_raw_handler_lock); *** DEADLOCK *** 4 locks held by bash/2502: #0: (sb_writers#4){.+.+.+}, at: [] vfs_write+0x195/0x1e0 #1: (&of->mutex){+.+.+.}, at: [] kernfs_fop_write+0x11f/0x1e0 #2: (s_active#215){.+.+.+}, at: [] kernfs_fop_write+0x128/0x1e0 #3: (&dev->lock){+.+.+.}, at: [] store_filter+0x9f/0x240 [rc_core] stack backtrace: CPU: 3 PID: 2502 Comm: bash Not tainted 4.10.0-rc1+ #1 Hardware name: /DG45ID, BIOS IDG4510H.86A.0135.2011.0225.1100 02/25/2011 Call Trace: dump_stack+0x86/0xc3 print_circular_bug+0x1be/0x210 __lock_acquire+0x10f7/0x1290 lock_acquire+0xfd/0x200 ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core] ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core] mutex_lock_nested+0x77/0x6d0 ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core] ? loop_set_wakeup_filter+0x44/0xbd [rc_loopback] ir_raw_encode_scancode+0x3e/0xb0 [rc_core] loop_set_wakeup_filter+0x62/0xbd [rc_loopback] ? loop_set_tx_duty_cycle+0x70/0x70 [rc_loopback] store_filter+0x1aa/0x240 [rc_core] dev_attr_store+0x18/0x30 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x155/0x1e0 __vfs_write+0x37/0x160 ? rcu_read_lock_sched_held+0x4a/0x80 ? rcu_sync_lockdep_assert+0x2f/0x60 ? __sb_start_write+0x10c/0x220 ? vfs_write+0x195/0x1e0 ? security_file_permission+0x3b/0xc0 vfs_write+0xc8/0x1e0 SyS_write+0x58/0xc0 entry_SYSCALL_64_fastpath+0x1f/0xc2 Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e1e4949f9dfb053122785cd73540bb1e61f768b Author: Qi Hou Date: Fri Mar 3 15:57:11 2017 +0800 i2c: add missing of_node_put in i2c_mux_del_adapters Refcount of of_node is increased with of_node_get() in i2c_mux_add_adapter(). It must be decreased with of_node_put() in i2c_mux_del_adapters(). Cc: stable@vger.kernel.org Signed-off-by: Qi Hou Reviewed-by: Zhang Xiao Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 2 ++ 1 file changed, 2 insertions(+) commit 0265634eb9e04a16ae99941c320718c38eb865e0 Author: Sean Young Date: Sat Feb 25 08:28:16 2017 -0300 [media] serial_ir: ensure we're ready to receive interrupts When the interrupt requested with devm_request_irq(), serial_ir.rcdev is still null so will cause null deference if the irq handler is called early on. Also ensure that timeout_timer is setup. Link: http://lkml.kernel.org/r/CA+55aFxsh2uF8gi5sN_guY3Z+tiLv7LpJYKBw+y8vqLzp+TsnQ@mail.gmail.com [mchehab@s-opensource.com: moved serial_ir_probe() back to its original place] Cc: # 4.10 Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/serial_ir.c | 123 ++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 61 deletions(-) commit ef65aaede23f75977af56a8c330bb9be8c6e125c Author: Sachin Prabhu Date: Wed Jan 18 15:35:57 2017 +0530 smb2: Enforce sec= mount option If the security type specified using a mount option is not supported, the SMB2 session setup code changes the security type to RawNTLMSSP. We should instead fail the mount and return an error. The patch changes the code for SMB2 to make it similar to the code used for SMB1. Like in SMB1, we now use the global security flags to select the security method to be used when no security method is specified and to return an error when the requested auth method is not available. For SMB2, we also use ntlmv2 as a synonym for nltmssp. Signed-off-by: Sachin Prabhu Acked-by: Pavel Shilovsky Acked-by: Jeff Layton Signed-off-by: Steve French fs/cifs/cifsglob.h | 3 +++ fs/cifs/cifsproto.h | 2 ++ fs/cifs/connect.c | 3 ++- fs/cifs/sess.c | 4 ++-- fs/cifs/smb1ops.c | 1 + fs/cifs/smb2ops.c | 4 ++++ fs/cifs/smb2pdu.c | 37 +++++++++++++++++++++++++++++++++---- fs/cifs/smb2proto.h | 2 ++ 8 files changed, 49 insertions(+), 7 deletions(-) commit 284316dd42a2027afe37df34c5199eb4eabed8fd Author: Steve French Date: Thu Mar 2 15:42:48 2017 -0600 CIFS: Fix sparse warnings Fix two minor sparse compile check warnings Signed-off-by: Steve French Acked-by: Pavel Shilovsky Reviewed-by: Aurelien Aptel fs/cifs/cifs_unicode.h | 6 +++--- fs/cifs/cifssmb.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit c74042f3b3ca982652af99cad85252a2655c6064 Author: Alexander Duyck Date: Fri Feb 3 09:19:40 2017 -0800 ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines On architectures that have a cache line size larger than 64 Bytes we start running into issues where the amount of headroom for the frame starts shrinking. The size of skb_shared_info on a system with a 64B L1 cache line size is 320. This increases to 384 with a 128B cache line, and 512 with a 256B cache line. In addition the NET_SKB_PAD value increases as well consistent with the cache line size. As a result when we get to a 256B cache line as seen on the s390 we end up 768 bytes used by padding and shared info leaving us with only 1280 bytes to use for data storage. On architectures such as this we should default to using 3K Rx buffers out of a 8K page instead of trying to do 1.5K buffers out of a 4K page. To take all of this into account I have added one small check so that we compare the max_frame to the amount of actual data we can store. This was already occurring for igb, but I had overlooked it for ixgbe as it doesn't have strict limits for 82599 once we enable jumbo frames. By adding this check we will automatically enable 3K Rx buffers as soon as the maximum frame size we can handle drops below the standard Ethernet MTU. I also went through and fixed one small typo that I found where I had left an IGB in a variable name due to a copy/paste error. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f Author: David Howells Date: Tue Jan 31 16:46:22 2017 +0000 statx: Add a system call to make enhanced file info available Add a system call to make extended file information available, including file creation and some attribute flags where available through the underlying filesystem. The getattr inode operation is altered to take two additional arguments: a u32 request_mask and an unsigned int flags that indicate the synchronisation mode. This change is propagated to the vfs_getattr*() function. Functions like vfs_stat() are now inline wrappers around new functions vfs_statx() and vfs_statx_fd() to reduce stack usage. ======== OVERVIEW ======== The idea was initially proposed as a set of xattrs that could be retrieved with getxattr(), but the general preference proved to be for a new syscall with an extended stat structure. A number of requests were gathered for features to be included. The following have been included: (1) Make the fields a consistent size on all arches and make them large. (2) Spare space, request flags and information flags are provided for future expansion. (3) Better support for the y2038 problem [Arnd Bergmann] (tv_sec is an __s64). (4) Creation time: The SMB protocol carries the creation time, which could be exported by Samba, which will in turn help CIFS make use of FS-Cache as that can be used for coherency data (stx_btime). This is also specified in NFSv4 as a recommended attribute and could be exported by NFSD [Steve French]. (5) Lightweight stat: Ask for just those details of interest, and allow a netfs (such as NFS) to approximate anything not of interest, possibly without going to the server [Trond Myklebust, Ulrich Drepper, Andreas Dilger] (AT_STATX_DONT_SYNC). (6) Heavyweight stat: Force a netfs to go to the server, even if it thinks its cached attributes are up to date [Trond Myklebust] (AT_STATX_FORCE_SYNC). And the following have been left out for future extension: (7) Data version number: Could be used by userspace NFS servers [Aneesh Kumar]. Can also be used to modify fill_post_wcc() in NFSD which retrieves i_version directly, but has just called vfs_getattr(). It could get it from the kstat struct if it used vfs_xgetattr() instead. (There's disagreement on the exact semantics of a single field, since not all filesystems do this the same way). (8) BSD stat compatibility: Including more fields from the BSD stat such as creation time (st_btime) and inode generation number (st_gen) [Jeremy Allison, Bernd Schubert]. (9) Inode generation number: Useful for FUSE and userspace NFS servers [Bernd Schubert]. (This was asked for but later deemed unnecessary with the open-by-handle capability available and caused disagreement as to whether it's a security hole or not). (10) Extra coherency data may be useful in making backups [Andreas Dilger]. (No particular data were offered, but things like last backup timestamp, the data version number and the DOS archive bit would come into this category). (11) Allow the filesystem to indicate what it can/cannot provide: A filesystem can now say it doesn't support a standard stat feature if that isn't available, so if, for instance, inode numbers or UIDs don't exist or are fabricated locally... (This requires a separate system call - I have an fsinfo() call idea for this). (12) Store a 16-byte volume ID in the superblock that can be returned in struct xstat [Steve French]. (Deferred to fsinfo). (13) Include granularity fields in the time data to indicate the granularity of each of the times (NFSv4 time_delta) [Steve French]. (Deferred to fsinfo). (14) FS_IOC_GETFLAGS value. These could be translated to BSD's st_flags. Note that the Linux IOC flags are a mess and filesystems such as Ext4 define flags that aren't in linux/fs.h, so translation in the kernel may be a necessity (or, possibly, we provide the filesystem type too). (Some attributes are made available in stx_attributes, but the general feeling was that the IOC flags were to ext[234]-specific and shouldn't be exposed through statx this way). (15) Mask of features available on file (eg: ACLs, seclabel) [Brad Boyer, Michael Kerrisk]. (Deferred, probably to fsinfo. Finding out if there's an ACL or seclabal might require extra filesystem operations). (16) Femtosecond-resolution timestamps [Dave Chinner]. (A __reserved field has been left in the statx_timestamp struct for this - if there proves to be a need). (17) A set multiple attributes syscall to go with this. =============== NEW SYSTEM CALL =============== The new system call is: int ret = statx(int dfd, const char *filename, unsigned int flags, unsigned int mask, struct statx *buffer); The dfd, filename and flags parameters indicate the file to query, in a similar way to fstatat(). There is no equivalent of lstat() as that can be emulated with statx() by passing AT_SYMLINK_NOFOLLOW in flags. There is also no equivalent of fstat() as that can be emulated by passing a NULL filename to statx() with the fd of interest in dfd. Whether or not statx() synchronises the attributes with the backing store can be controlled by OR'ing a value into the flags argument (this typically only affects network filesystems): (1) AT_STATX_SYNC_AS_STAT tells statx() to behave as stat() does in this respect. (2) AT_STATX_FORCE_SYNC will require a network filesystem to synchronise its attributes with the server - which might require data writeback to occur to get the timestamps correct. (3) AT_STATX_DONT_SYNC will suppress synchronisation with the server in a network filesystem. The resulting values should be considered approximate. mask is a bitmask indicating the fields in struct statx that are of interest to the caller. The user should set this to STATX_BASIC_STATS to get the basic set returned by stat(). It should be noted that asking for more information may entail extra I/O operations. buffer points to the destination for the data. This must be 256 bytes in size. ====================== MAIN ATTRIBUTES RECORD ====================== The following structures are defined in which to return the main attribute set: struct statx_timestamp { __s64 tv_sec; __s32 tv_nsec; __s32 __reserved; }; struct statx { __u32 stx_mask; __u32 stx_blksize; __u64 stx_attributes; __u32 stx_nlink; __u32 stx_uid; __u32 stx_gid; __u16 stx_mode; __u16 __spare0[1]; __u64 stx_ino; __u64 stx_size; __u64 stx_blocks; __u64 __spare1[1]; struct statx_timestamp stx_atime; struct statx_timestamp stx_btime; struct statx_timestamp stx_ctime; struct statx_timestamp stx_mtime; __u32 stx_rdev_major; __u32 stx_rdev_minor; __u32 stx_dev_major; __u32 stx_dev_minor; __u64 __spare2[14]; }; The defined bits in request_mask and stx_mask are: STATX_TYPE Want/got stx_mode & S_IFMT STATX_MODE Want/got stx_mode & ~S_IFMT STATX_NLINK Want/got stx_nlink STATX_UID Want/got stx_uid STATX_GID Want/got stx_gid STATX_ATIME Want/got stx_atime{,_ns} STATX_MTIME Want/got stx_mtime{,_ns} STATX_CTIME Want/got stx_ctime{,_ns} STATX_INO Want/got stx_ino STATX_SIZE Want/got stx_size STATX_BLOCKS Want/got stx_blocks STATX_BASIC_STATS [The stuff in the normal stat struct] STATX_BTIME Want/got stx_btime{,_ns} STATX_ALL [All currently available stuff] stx_btime is the file creation time, stx_mask is a bitmask indicating the data provided and __spares*[] are where as-yet undefined fields can be placed. Time fields are structures with separate seconds and nanoseconds fields plus a reserved field in case we want to add even finer resolution. Note that times will be negative if before 1970; in such a case, the nanosecond fields will also be negative if not zero. The bits defined in the stx_attributes field convey information about a file, how it is accessed, where it is and what it does. The following attributes map to FS_*_FL flags and are the same numerical value: STATX_ATTR_COMPRESSED File is compressed by the fs STATX_ATTR_IMMUTABLE File is marked immutable STATX_ATTR_APPEND File is append-only STATX_ATTR_NODUMP File is not to be dumped STATX_ATTR_ENCRYPTED File requires key to decrypt in fs Within the kernel, the supported flags are listed by: KSTAT_ATTR_FS_IOC_FLAGS [Are any other IOC flags of sufficient general interest to be exposed through this interface?] New flags include: STATX_ATTR_AUTOMOUNT Object is an automount trigger These are for the use of GUI tools that might want to mark files specially, depending on what they are. Fields in struct statx come in a number of classes: (0) stx_dev_*, stx_blksize. These are local system information and are always available. (1) stx_mode, stx_nlinks, stx_uid, stx_gid, stx_[amc]time, stx_ino, stx_size, stx_blocks. These will be returned whether the caller asks for them or not. The corresponding bits in stx_mask will be set to indicate whether they actually have valid values. If the caller didn't ask for them, then they may be approximated. For example, NFS won't waste any time updating them from the server, unless as a byproduct of updating something requested. If the values don't actually exist for the underlying object (such as UID or GID on a DOS file), then the bit won't be set in the stx_mask, even if the caller asked for the value. In such a case, the returned value will be a fabrication. Note that there are instances where the type might not be valid, for instance Windows reparse points. (2) stx_rdev_*. This will be set only if stx_mode indicates we're looking at a blockdev or a chardev, otherwise will be 0. (3) stx_btime. Similar to (1), except this will be set to 0 if it doesn't exist. ======= TESTING ======= The following test program can be used to test the statx system call: samples/statx/test-statx.c Just compile and run, passing it paths to the files you want to examine. The file is built automatically if CONFIG_SAMPLES is enabled. Here's some example output. Firstly, an NFS directory that crosses to another FSID. Note that the AUTOMOUNT attribute is set because transiting this directory will cause d_automount to be invoked by the VFS. [root@andromeda ~]# /tmp/test-statx -A /warthog/data statx(/warthog/data) = 0 results=7ff Size: 4096 Blocks: 8 IO Block: 1048576 directory Device: 00:26 Inode: 1703937 Links: 125 Access: (3777/drwxrwxrwx) Uid: 0 Gid: 4041 Access: 2016-11-24 09:02:12.219699527+0000 Modify: 2016-11-17 10:44:36.225653653+0000 Change: 2016-11-17 10:44:36.225653653+0000 Attributes: 0000000000001000 (-------- -------- -------- -------- -------- -------- ---m---- --------) Secondly, the result of automounting on that directory. [root@andromeda ~]# /tmp/test-statx /warthog/data statx(/warthog/data) = 0 results=7ff Size: 4096 Blocks: 8 IO Block: 1048576 directory Device: 00:27 Inode: 2 Links: 125 Access: (3777/drwxrwxrwx) Uid: 0 Gid: 4041 Access: 2016-11-24 09:02:12.219699527+0000 Modify: 2016-11-17 10:44:36.225653653+0000 Change: 2016-11-17 10:44:36.225653653+0000 Signed-off-by: David Howells Signed-off-by: Al Viro Documentation/filesystems/Locking | 3 +- Documentation/filesystems/vfs.txt | 3 +- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + drivers/base/devtmpfs.c | 3 +- drivers/block/loop.c | 3 +- drivers/mtd/ubi/build.c | 2 +- drivers/mtd/ubi/kapi.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 9 +- .../staging/lustre/lustre/llite/llite_internal.h | 3 +- fs/9p/vfs_inode.c | 10 +- fs/9p/vfs_inode_dotl.c | 5 +- fs/afs/inode.c | 8 +- fs/afs/internal.h | 2 +- fs/bad_inode.c | 4 +- fs/btrfs/inode.c | 6 +- fs/ceph/inode.c | 6 +- fs/ceph/super.h | 4 +- fs/cifs/cifsfs.h | 2 +- fs/cifs/inode.c | 5 +- fs/coda/coda_linux.h | 2 +- fs/coda/inode.c | 7 +- fs/ecryptfs/inode.c | 13 +- fs/exportfs/expfs.c | 3 +- fs/ext4/ext4.h | 3 +- fs/ext4/inode.c | 6 +- fs/f2fs/f2fs.h | 4 +- fs/f2fs/file.c | 6 +- fs/fat/fat.h | 4 +- fs/fat/file.c | 5 +- fs/fuse/dir.c | 6 +- fs/gfs2/inode.c | 11 +- fs/kernfs/inode.c | 8 +- fs/kernfs/kernfs-internal.h | 4 +- fs/libfs.c | 12 +- fs/minix/inode.c | 11 +- fs/minix/minix.h | 2 +- fs/nfs/inode.c | 13 +- fs/nfs/namespace.c | 9 +- fs/nfsd/nfs4xdr.c | 4 +- fs/nfsd/vfs.h | 3 +- fs/ocfs2/file.c | 11 +- fs/ocfs2/file.h | 4 +- fs/orangefs/inode.c | 13 +- fs/orangefs/orangefs-kernel.h | 5 +- fs/overlayfs/copy_up.c | 6 +- fs/overlayfs/dir.c | 10 +- fs/overlayfs/inode.c | 7 +- fs/proc/base.c | 12 +- fs/proc/generic.c | 6 +- fs/proc/internal.h | 2 +- fs/proc/proc_net.c | 6 +- fs/proc/proc_sysctl.c | 5 +- fs/proc/root.c | 6 +- fs/stat.c | 214 ++++++++++++++--- fs/sysv/itree.c | 7 +- fs/sysv/sysv.h | 2 +- fs/ubifs/dir.c | 6 +- fs/ubifs/ubifs.h | 4 +- fs/udf/symlink.c | 5 +- fs/xfs/xfs_iops.c | 9 +- include/linux/fs.h | 35 ++- include/linux/nfs_fs.h | 2 +- include/linux/stat.h | 24 +- include/linux/syscalls.h | 3 + include/uapi/linux/fcntl.h | 5 + include/uapi/linux/stat.h | 131 +++++++++++ mm/shmem.c | 6 +- samples/Kconfig | 6 + samples/Makefile | 2 +- samples/statx/Makefile | 10 + samples/statx/test-statx.c | 254 +++++++++++++++++++++ 72 files changed, 822 insertions(+), 214 deletions(-) commit c82be9d2244aacea9851c86f4fb74694c99cd874 Merge: 3f80dd6 6bff9c6 Author: Linus Torvalds Date: Thu Mar 2 17:41:27 2017 -0800 Merge tag 'pm-turbostat-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull turbostat utility updates from Rafael Wysocki: "Power management turbostat utility updates. These update turbostat significantly and in particular: - default output is now verbose, --debug is no longer required to get all counters. As a result, some options have been added to specify exactly what output is wanted. - added --quiet to skip system configuration output - added --list, --show and --hide parameters - added --cpu parameter - enhanced Baytrail SoC support - added Gemini Lake SoC support - added sysfs C-state columns Also the symbol definitions in arch/x86/include/asm/intel-family.h and arch/x86/include/asm/msr-index.h are updated and the intel_idle and intel_pstate drivers are modified to use the updated symbols. Credits to Len Brown for all of these changes" * tag 'pm-turbostat-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits) tools/power turbostat: version 17.02.24 tools/power turbostat: bugfix: --add u32 was printed as u64 tools/power turbostat: show error on exec tools/power turbostat: dump p-state software config tools/power turbostat: show package number, even without --debug tools/power turbostat: support "--hide C1" etc. tools/power turbostat: move --Package and --processor into the --cpu option tools/power turbostat: turbostat.8 update tools/power turbostat: update --list feature tools/power turbostat: use wide columns to display large numbers tools/power turbostat: Add --list option to show available header names tools/power turbostat: fix zero IRQ count shown in one-shot command mode tools/power turbostat: add --cpu parameter tools/power turbostat: print sysfs C-state stats tools/power turbostat: extend --add option to accept /sys path tools/power turbostat: skip unused counters on BDX tools/power turbostat: fix decoding for GLM, DNV, SKX turbo-ratio limits tools/power turbostat: skip unused counters on SKX tools/power turbostat: Denverton: use HW CC1 counter, skip C3, C7 tools/power turbostat: initial Gemini Lake SOC support ... commit 3f80dd67c367878aaad16e458eebc3c8980bb841 Merge: 080e416 0cb3b79 Author: Linus Torvalds Date: Thu Mar 2 17:38:30 2017 -0800 Merge tag 'acpi-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes an apparent, but actually artificial, resource conflict between the ACPI NVS memory region and the ACPI BERT (Boot Error Record Table) address range (Huang Ying)" * tag 'acpi-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: APEI: Fix BERT resources conflict with ACPI NVS area commit 080e4168c0834ccc853c48259e16a5c556c7ecba Merge: bbe08c0 9b5e9cb Author: Linus Torvalds Date: Thu Mar 2 17:33:52 2017 -0800 Merge tag 'pm-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates deom Rafael Wysocki: "These fix two bugs introduced by recent power management updates (in the cpuidle menu governor and intel_pstate) and a few other issues, clean up things and remove unused code. Specifics: - Fix for a cpuidle menu governor problem that started to take an unnecessary spinlock after one of the recent updates and that did not play well with the RT patch (Rafael Wysocki). - Fix for the new intel_pstate operation mode switching feature added recently that did not reinitialize P-state limits properly when switching operation modes (Rafael Wysocki). - Removal of unused global notifiers from the PM QoS framework (Viresh Kumar). - Generic power domains framework update to make it handle asynchronous invocations of PM callbacks in the "noirq" phases of system suspend/hibernation correctly (Ulf Hansson). - Two hibernation core cleanups (Rafael Wysocki). - intel_idle cleanup related to the sysfs interface (Len Brown). - Off-by-one bug fix in the OPP (Operating Performance Points) framework (Andrzej Hajda). - OPP framework's documentation fix (Viresh Kumar). - cpufreq qoriq driver cleanup (Tang Yuantian). - Fixes for typos in comments in the device runtime PM framework (Christophe Jaillet)" * tag 'pm-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / OPP: Documentation: Fix opp-microvolt in examples intel_idle: stop exposing platform acronyms in sysfs cpufreq: intel_pstate: Fix limits issue with operation mode switching PM / hibernate: Define pr_fmt() and use pr_*() instead of printk() PM / hibernate: Untangle power_down() cpuidle: menu: Avoid taking spinlock for accessing QoS values PM / QoS: Remove global notifiers PM / runtime: Fix some typos cpufreq: qoriq: clean up unused code PM / OPP: fix off-by-one bug in dev_pm_opp_get_max_volt_latency loop PM / Domains: Power off masters immediately in the power off sequence PM / Domains: Rename is_async to one_dev_on for genpd_power_off() PM / Domains: Move genpd_power_off() above genpd_power_on() commit d3aa9c9f212a729e46653d4c1eb6a9ab190efe3a Author: Paolo Abeni Date: Thu Dec 15 15:20:34 2016 +0100 ixgbe: update the rss key on h/w, when ethtool ask for it Currently ixgbe_set_rxfh() updates the rss_key copy in the driver memory, but does not push the new value into the h/w. This commit add a new helper for the latter operation and call it in ixgbe_set_rxfh(), so that the h/w rss key value can be really updated via ethtool. Signed-off-by: Paolo Abeni Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 19 ++++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) commit 5eca1c10cbaa9c366c18ca79f81f21c731e3dcc7 Author: Ingo Molnar Date: Mon Feb 6 22:06:35 2017 +0100 sched/headers: Clean up Now that dependencies have been sorted out, do various trivial cleanups: - remove unnecessary structure predeclarations - fix various typos - update comments where necessary - remove pointless comments - use consistent types - tabulate consistently - use a consistent comment style - clean up the header section a bit - use a consistent style of a single field per line - remove line-breaks where they make the code look worse - etc ... No change in functionality. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1222 ++++++++++++++++++++++++++----------------------- 1 file changed, 651 insertions(+), 571 deletions(-) commit 7f5f8e8d97d77edf33f2836259d1f19c6f4d94f5 Author: Ingo Molnar Date: Mon Feb 6 11:44:12 2017 +0100 sched/headers: Remove #ifdefs from We can remove two pairs of #ifdefs by defining structures in a smarter way. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit ee6a3d19f15b9b10075481088b8d4537f286d7b4 Author: Ingo Molnar Date: Mon Feb 6 10:01:09 2017 +0100 sched/headers: Remove the include from It's used only by a single (rarely used) inline function (task_node(p)), which we can move to . ( Add , because we rely on that. ) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/mips/sgi-ip27/ip27-smp.c | 1 + include/linux/sched.h | 7 +------ include/linux/sched/topology.h | 7 +++++++ 3 files changed, 9 insertions(+), 6 deletions(-) commit 283cb90305cf1686594ed537c7a8cb188eba1a4d Author: Ingo Molnar Date: Mon Feb 6 09:59:47 2017 +0100 sched/headers, hrtimer: Remove the include from In our quest to simplify 's header dependencies, remove the inclusion from - which does not appear to be necessary, as hrtimer.h does not use waitqueues. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/hrtimer.h | 1 - 1 file changed, 1 deletion(-) commit 1a79a72c65b8f1b4f44e166d1fb5cad560461b26 Author: Ingo Molnar Date: Mon Feb 6 09:58:35 2017 +0100 sched/headers, x86/apic: Remove the header inclusion from We want to simplify 's header dependencies, but one roadblock to that is 's inclusion of pm.h, which brings in other, problematic headers. Remove it, as it appears to be entirely spurious, apic.h does not actually make use of any PM facilities. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/apic.h | 1 - 1 file changed, 1 deletion(-) commit b2d5bfea2d00a0000da18f7667c2b0e2c2f168d9 Author: Ingo Molnar Date: Mon Feb 6 09:56:40 2017 +0100 sched/headers, timers: Remove the include from So we want to simplify 's header dependencies, but one roadblock of that is 's inclusion of sysctl.h, which brings in other, problematic headers. Note that timer.h's inclusion of sysctl.h can be avoided if we pre-declare ctl_table - so do that. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/timer.h | 2 +- include/linux/user_namespace.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 50ff9d130014f7b19541dbf607a615a72b75b778 Author: Ingo Molnar Date: Sun Feb 5 16:03:58 2017 +0100 sched/headers: Remove from It's not used by any of the scheduler methods, but needs it to pick up STACK_END_MAGIC. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - kernel/cgroup/cgroup-v1.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 5c0d0f36414f9f8a292b42e797f9284b127d79c2 Author: Ingo Molnar Date: Wed Feb 8 18:51:59 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/init.h | 2 -- 1 file changed, 2 deletions(-) commit 2c873d55cd838deef8218b6d5fe9bd336cb3113a Author: Ingo Molnar Date: Sun Feb 5 12:11:03 2017 +0100 sched/core: Remove unused prefetch_stack() prefetch_stack() is defined by IA64, but not actually used anywhere anymore. Remove it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/ia64/include/asm/processor.h | 2 -- arch/ia64/kernel/entry.S | 23 ----------------------- include/linux/sched.h | 6 ------ 3 files changed, 31 deletions(-) commit b68070e146b9c2b4ece8d869a4fab9a4f14bbfb4 Author: Ingo Molnar Date: Sat Feb 4 01:27:20 2017 +0100 sched/headers: Remove from We don't actually need the full rculist.h header anymore, include the smaller rcupdate.h header instead. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d1954e038435765a623884b626731784cde768f Author: Ingo Molnar Date: Sat Feb 4 01:16:15 2017 +0100 sched/headers: Remove the 'init_pid_ns' prototype from pid.h already defines it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- 1 file changed, 2 deletions(-) commit 192c9414516e7178a44f9ed48d47501c4c19771c Author: Ingo Molnar Date: Fri Feb 3 23:47:37 2017 +0100 sched/headers: Remove from Instead of including the full , only include the types-only header in , to further decouple the scheduler header from the signal headers. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit cd9c513be34ceaae8bf211474b91b6897574efdd Author: Ingo Molnar Date: Wed Feb 8 18:51:58 2017 +0100 sched/headers: Remove from This is a stray header that is not needed by anything in sched.h, so remove it. Update files that relied on the stray inclusion. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- include/linux/user_namespace.h | 1 + kernel/utsname_sysctl.c | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) commit fae3c30c2d1ae3ff93877f64e5d55e2443d8f82f Author: Ingo Molnar Date: Wed Feb 8 12:00:08 2017 +0100 sched/headers: Remove the runqueue_is_locked() prototype Remove the runqueue_is_locked() prototype, the function does not exist anymore. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- 1 file changed, 2 deletions(-) commit a906086ef35129d522047a296e7c4237af75fdcb Author: Ingo Molnar Date: Wed Feb 8 18:51:57 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/hotplug.h | 2 -- 1 file changed, 2 deletions(-) commit 4f079e98a0db5f067c0981a526ff8938e21c52e2 Author: Ingo Molnar Date: Wed Feb 8 18:51:57 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/debug.h | 2 -- 1 file changed, 2 deletions(-) commit b0145d9b332a5117bd0abbb980ab89586a1d5f6c Author: Ingo Molnar Date: Wed Feb 8 18:51:57 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/nohz.h | 2 -- 1 file changed, 2 deletions(-) commit dc1995392d79b0eeee147a792482b991f74c1494 Author: Ingo Molnar Date: Wed Feb 8 18:51:57 2017 +0100 sched/headers: Remove from The file is a largely self-contained header and users of it either don't need - or have already included it. ( Keep the dependency.) This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/stat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0a0eb699967f4f51567b563818bafe4017bef73 Author: Ingo Molnar Date: Thu Feb 2 20:56:33 2017 +0100 sched/headers: Remove the include from This reduces sched.h header dependencies. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit 9c6da18109d603a99915b257929c0370c9d3ae40 Author: Ingo Molnar Date: Fri Feb 3 10:08:30 2017 +0100 sched/headers: Remove from This reduces header dependencies. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit f780d89a0e820a529cf91fb78b52565e1b37b774 Author: Ingo Molnar Date: Fri Feb 3 10:03:42 2017 +0100 sched/headers: Remove from This reduces header dependencies. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/sh/include/asm/fpu.h | 2 ++ arch/sh/mm/extable_32.c | 2 ++ include/linux/sched.h | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) commit e26512fea5bcd6602dbf02a551ed073cd4529449 Author: Ingo Molnar Date: Thu Feb 2 17:54:15 2017 +0100 sched/headers: Remove inclusion from This reduces header dependencies and speeds up the build. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit 71af2ed5eeea639339e3a1497a0196bab7de4b57 Author: Ingo Molnar Date: Fri Feb 3 09:57:00 2017 +0100 kasan, sched/headers: Remove from is a low level header that is included early in affected kernel headers. But it includes which complicates the cleanup of sched.h dependencies. Remove it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/kasan.h | 1 - 1 file changed, 1 deletion(-) commit ed53742d793bd92ed32114081370b199dc94467d Author: Ingo Molnar Date: Wed Feb 8 18:51:55 2017 +0100 sched/headers: Remove from Make the file a self-contained header and remove the dependency: users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/cpufreq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa829c7679a13fca667f772db1f0ea03adc29122 Author: Ingo Molnar Date: Thu Feb 2 11:54:05 2017 +0100 sched/headers: Remove from It's not used by anything in anymore. This reduces the preprocessed size of and speeds up the build a bit. Also fix code that implicitly relied on headers included by . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - include/target/target_core_base.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit ac4e620967bb72f86371154935aa8b67cf54e225 Author: Ingo Molnar Date: Thu Feb 2 11:44:31 2017 +0100 sched/headers: Remove #include from The header does not actually make use of any types or APIs defined in , so remove its inclusion. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit de8deb0ad79f8a49cea5110c006c8676a11611f7 Author: Ingo Molnar Date: Wed Feb 8 18:51:55 2017 +0100 sched/headers: Remove from If we add then becomes a self-contained header and users of it either don't need or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 556725839e543bc2b45bd73121c0b1c1d6c23714 Author: Ingo Molnar Date: Thu Feb 2 10:31:24 2017 +0100 sched/headers: Remove unused 'task_can_switch_user()' prototype The function does not exist anymore. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 3 --- 1 file changed, 3 deletions(-) commit ae1cc8823204bb938d039afa43c28a84591ada9f Author: Ingo Molnar Date: Wed Feb 8 18:51:54 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. Include . This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/coredump.h | 1 - 1 file changed, 1 deletion(-) commit b8d6d80b37a98e3910f1b4e799f8ebea88e94bfa Author: Ingo Molnar Date: Wed Feb 8 18:51:54 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. Include kernel.h and atomic.h. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/mm.h | 2 ++ 1 file changed, 2 insertions(+) commit 5fd73157bdfb57370b69be7c0067f08e610e7daa Author: Ingo Molnar Date: Wed Feb 8 18:51:54 2017 +0100 sched/headers: Remove from The file is a largely self-contained header and users of it either don't need - or have already included it. Add a 'task_struct' predeclaration to make it build standalone. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/autogroup.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5a2d6880f461faa416c0d329d46a128cf342c1eb Author: Ingo Molnar Date: Wed Feb 8 18:51:54 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/loadavg.h | 2 -- 1 file changed, 2 deletions(-) commit cc689c5b352d4a7510b11c975c5c94d4785b37e7 Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Remove and from The file is a self-contained header and users of it either don't need and - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/delayacct.h | 2 -- include/linux/fault-inject.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit ea94763950e49d1aa622c59218ee2fc3b434ba6b Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Remove from The file is a largely self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/clock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f411229e1dd623a3dee623824d094546789977e0 Author: Ingo Molnar Date: Wed Feb 1 18:49:05 2017 +0100 sched/headers: Remove tsk_is_polling() It's not used by anything. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/idle.h | 5 ----- 1 file changed, 5 deletions(-) commit c03cb28e7c44055cd00d11b8581b9fa46a3e3764 Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Remove from The file is a self-contained header and users of it either don't need - or have already included it. This reduces the size of the header dependency graph. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/topology.h | 2 -- 1 file changed, 2 deletions(-) commit 6f175fc9536355d8aa5c2d4854848a97c244a031 Author: Ingo Molnar Date: Mon Feb 6 11:12:45 2017 +0100 sched/headers: Move the sched_exec() prototype to sched_exec() better fits into the task lifetime APIs than into the core scheduler APIs. This reduces the size of a bit. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 7 ------- include/linux/sched/task.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit cda66725c1444db67127115d611c982b62b45d8c Author: Ingo Molnar Date: Sun Feb 5 15:30:50 2017 +0100 sched/headers: Move the get_task_struct()/put_task_struct() and related APIs from to These belong into the task lifetime API header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 14 -------------- include/linux/sched/task.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) commit dcc2dc45f7cf267d37843059ff75b70260596c69 Author: Ingo Molnar Date: Sun Feb 5 15:05:49 2017 +0100 sched/headers, mm: Move 'struct tlbflush_unmap_batch' from to Unclutter some more. Also move the CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH condition inside the structure body definition, to remove a pair of #ifdefs from sched.h. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/mm_types_task.h | 22 ++++++++++++++++++++++ include/linux/sched.h | 21 --------------------- 2 files changed, 22 insertions(+), 21 deletions(-) commit 93b5a9a7051e51ce50109046af0235268a261ba0 Author: Ingo Molnar Date: Sun Feb 5 14:53:36 2017 +0100 sched/headers, timekeeping: Move the timer tick function prototypes to Move the update_process_times() and xtime_update() prototypes to . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - include/linux/time.h | 2 -- include/linux/timekeeping.h | 4 ++++ 3 files changed, 4 insertions(+), 3 deletions(-) commit c5a21921d55a2aee9d1e031a78cef6cda3eab78b Author: Ingo Molnar Date: Sun Feb 5 14:47:12 2017 +0100 sched/headers: Move _init() prototypes from to trap_init() and cpu_init() belong into , sched_init*() into . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 5 ----- include/linux/sched/init.h | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) commit 42011db0ed5a9c92b1281e1300eb3d026f3764a8 Author: Ingo Molnar Date: Sun Feb 5 14:35:41 2017 +0100 sched/headers: Move exit_files() and exit_itimers() from to These two functions are task management related, not core scheduler APIs. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ---- include/linux/sched/task.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) commit 9049863a32fad5d7158318e45f0a41a0f2192c0c Author: Ingo Molnar Date: Sun Feb 5 14:31:22 2017 +0100 sched/headers: Move kstack_end() from to This is a task-stack related API, not core scheduler functionality. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 10 ---------- include/linux/sched/task_stack.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 28851755990c832d7050d5e1e2c91ed9d9e6fe59 Author: Ingo Molnar Date: Sun Feb 5 14:24:31 2017 +0100 sched/headers, vfs/execve: Move the do_execve*() prototypes from to These are not scheduler related. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/binfmts.h | 10 ++++++++++ include/linux/sched.h | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) commit a2d7a7463c38dd14b845721aac3583a26a97c66d Author: Ingo Molnar Date: Sun Feb 5 12:07:04 2017 +0100 sched/headers: Move sched_info_on() and force_schedstat_enabled() from to These APIs are not core scheduler but scheduler statistics related. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 16 ---------------- include/linux/sched/stat.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) commit 1050b27c52f615bc0e772b3119881e5304ccde6b Author: Ingo Molnar Date: Sun Feb 5 11:48:36 2017 +0100 sched/headers: Move cputime functionality from and into Move cputime related functionality out of , as most code that includes does not use that functionality. Move data types that are not included in task_struct directly to the signal definitions, into . Also merge the (small) existing header into . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/cputime.h | 13 --- include/linux/sched.h | 89 --------------------- include/linux/sched/cputime.h | 182 +++++++++++++++++++++++++++++++++++++++++- include/linux/sched/signal.h | 33 ++++++++ kernel/sched/stats.h | 111 -------------------------- 5 files changed, 214 insertions(+), 214 deletions(-) commit 56cd697366b6d6f67acb6c58ac7f3b185d11ef07 Author: Ingo Molnar Date: Mon Feb 6 10:57:33 2017 +0100 sched/headers: Move the task_lock()/unlock() APIs to The task_lock()/task_unlock() APIs are not realated to core scheduling, they are task lifetime APIs, i.e. they belong into . Move them. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 20 -------------------- include/linux/sched/task.h | 20 ++++++++++++++++++++ kernel/cgroup/cgroup-v1.c | 1 + kernel/cgroup/namespace.c | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) commit cdc75e9f7b14f29efcf4b162a3c673733e96db79 Author: Ingo Molnar Date: Sat Feb 4 01:20:53 2017 +0100 sched/headers: Move 'init_task' and 'init_thread_union' from to 'init_task' is really not part of core scheduler APIs but part of the fork() interface between the scheduler and process management. So move the declarations. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 3 --- include/linux/sched/task.h | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 77ba809e8b39b4e384df0433e2bd3dd0907dad29 Author: Ingo Molnar Date: Sat Feb 4 00:16:44 2017 +0100 sched/headers: Remove the dependency from Use the freshly introduced, reduced size header instead. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/video/fbdev/auo_k190x.c | 1 + include/linux/sched.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 9e7d2e44dd88ba7e29c165b6fca428e384afa5a8 Author: Ingo Molnar Date: Sat Feb 4 00:12:19 2017 +0100 mm/headers, sched/headers: Move task related MM types from to Separate all the MM types that are embedded directly in 'struct task_struct' into the header. The goal is to include this header in , not the full header, to reduce the size, complexity and coupling of . (This patch does not change yet.) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/mm_types.h | 49 -------------------------------------- include/linux/mm_types_task.h | 55 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 49 deletions(-) commit 76960dbf9b235b957d9d730be2c6c2a70f709026 Author: Ingo Molnar Date: Fri Feb 3 23:43:50 2017 +0100 signals: Move signal data types from to Separate out just the pure data types - sched.h will be able to use this reduced size header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/signal.h | 54 ---------------------------------------- include/linux/signal_types.h | 59 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 54 deletions(-) commit 70806b21e4d64f01193a2b64a053b75ff53a2b10 Author: Ingo Molnar Date: Fri Feb 3 23:15:21 2017 +0100 sched/headers: Move the 'root_task_group' declaration to Also remove the duplicate declaration from . ( That declaration was originally duplicated for dependency hell reasons, but there's no problem including the much smaller header now, to pick up the right prototype. ) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/init_task.h | 2 -- include/linux/sched.h | 4 ---- include/linux/sched/autogroup.h | 5 +++++ 3 files changed, 5 insertions(+), 6 deletions(-) commit f3ac60671954c8d413532627b1be13a76f394c49 Author: Ingo Molnar Date: Fri Feb 3 22:59:33 2017 +0100 sched/headers: Move task-stack related APIs from to Split out the task->stack related functionality, which is not really part of the core scheduler APIs. Only keep task_thread_info() because it's used by sched.h. Update the code that uses those facilities. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/mips/kernel/smp-cps.c | 2 +- arch/mips/sibyte/sb1250/smp.c | 2 +- include/linux/sched.h | 115 +++------------------------------------ include/linux/sched/task_stack.h | 104 +++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+), 108 deletions(-) commit d04b0ad37e4b6ac39a56c823ae76ab37cd044dc7 Author: Ingo Molnar Date: Fri Feb 3 22:07:57 2017 +0100 sched/headers: Move the PREEMPT_COUNT defines from to These defines are not really part of the scheduler's driver API, but are related to the preempt count - so move them to . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/preempt.h | 21 +++++++++++++++++++++ include/linux/sched.h | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit c7af7877eeacfeaaf6a1b6f54c481292ef116837 Author: Ingo Molnar Date: Fri Feb 3 22:01:58 2017 +0100 sched/core: Move, sort and clean up structure predeclarations Most of the structure predeclarations were at the head of sched.h, but not all of them - there were a number of lines spread around sched.h, in random places. Move them to the head, and also sort them alphabetically. Remove unused entries. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 56 +++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 33 deletions(-) commit 6bfbaa51ed47774492d83d182a86068cc35aa4c6 Author: Ingo Molnar Date: Fri Feb 3 21:37:49 2017 +0100 sched/headers, RCU: Move rcu_copy_process() from to kernel/fork.c Move rcu_copy_process() into kernel/fork.c, which is the only user of this inline function. This simplifies to the level that does not have to be included in it anymore - which change is done in a subsequent patch. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/task.h | 15 --------------- kernel/fork.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) commit 901b14bd946a8b7ea211105b6207e082ddd36846 Author: Ingo Molnar Date: Fri Feb 3 15:24:12 2017 +0100 sched/headers: Move task lifetime APIs from to There's a fair amount of task lifetime management (a.k.a fork()/exit()) related APIs in , but only a small fraction of the users of the generic sched.h header make use of them. Move these functions to the header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 91 ------------------------------------------- include/linux/sched/task.h | 97 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 91 deletions(-) commit 0ca0156973a47e689f3bc817e26e15fff3f84eec Author: Ingo Molnar Date: Fri Feb 3 14:52:01 2017 +0100 sched/headers: Split hotplug CPU interfaces out of into Split the CPU hotplug scheduler APIs out of the common header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 15 --------------- include/linux/sched/hotplug.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 15 deletions(-) commit 70b8157e61d0143fb44ae9482557d7aca365da3d Author: Ingo Molnar Date: Fri Feb 3 12:11:00 2017 +0100 sched/headers: Move include from the middle of to the header portion Linux-0.01 already defined 'current' in the middle of sched.h, so this is an ancient historical precedent - but still in a modern kernel it looks a bit weird that we have: #include in the middle of the header. Move it further up. If this was done for some obscure dependency reasons then we'll trigger and document it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63cc9d6fca8c220c2406f1376100a9acb55197af Author: Ingo Molnar Date: Fri Feb 3 12:04:39 2017 +0100 sched/headers, time/timekeeping: Move the xtime_update() prototype from to This was in only for hysterical raisins. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- include/linux/time.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit d3d1e320d43a7bad9603acf0214406a1e8795c63 Author: Ingo Molnar Date: Fri Feb 3 11:16:09 2017 +0100 sched/headers: Move debugging functions from to Collect the various scheduler and task state debugging APIs scattered around into the new header. In particular the show_regs() and show_stack() prototype affects many files, update them. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 36 ----------------------------------- include/linux/sched/debug.h | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 36 deletions(-) commit 752b3ca734cbc17c0456b846ae886c0ed39c5703 Author: Ingo Molnar Date: Fri Feb 3 11:12:59 2017 +0100 sched/headers: Move the NOHZ APIs from to There's a number of NOHZ/dyntics related functionality in , but only a handful of timer files are making use of them. Move them into their own header. This better documents these APIs and unclutters . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 35 ----------------------------------- include/linux/sched/nohz.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 35 deletions(-) commit 3605df49556ebb7641d1f8ec2e7eeecf4dd734bf Author: Ingo Molnar Date: Fri Feb 3 11:03:12 2017 +0100 sched/headers: Move task statistics APIs from to There are a number of task statistics related variables and methods exported via sched.h - collect them into and include it from their usage sites. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/s390/appldata/appldata_base.c | 1 + include/linux/sched.h | 10 ---------- include/linux/sched/stat.h | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 10 deletions(-) commit 74444edaa0b2ef946e846d5ddf1ba90efcd7c200 Author: Ingo Molnar Date: Thu Feb 2 20:43:54 2017 +0100 sched/headers: Move the memalloc_noio_*() APIs to In preparation to remove the include from . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 22 ---------------------- include/linux/sched/mm.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) commit 2a1f062a4acf0be50516ceece92a7182a173d55a Author: Ingo Molnar Date: Thu Feb 2 19:15:33 2017 +0100 sched/headers: Move signal wakeup & sigpending methods from into This reduces the size of . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 51 ------------------------------------------ include/linux/sched/signal.h | 53 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 52 deletions(-) commit 9a07000400c853c57477c2a5138ae9f556c40897 Author: Ingo Molnar Date: Thu Feb 2 19:10:05 2017 +0100 sched/headers: Move CONFIG_TASK_XACCT bits from to The CONFIG_TASK_XACCT=y accounting inline functions are only used by fs/read_write.c, so move them into their separate header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 38 -------------------------------------- include/linux/sched/xacct.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 38 deletions(-) commit 30a1baab81189f01c427c4939610b2dde2dbec37 Author: Ingo Molnar Date: Fri Feb 3 10:06:45 2017 +0100 sched/headers: Remove various unrelated headers from Remove the following header inclusions from : #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include because they are either not required, or are already included naturally as part of the remaining headers. Acked-by: Linus Torvalds Cc: Mike Galbraith 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, 28 deletions(-) commit c41cfc6c5ba46050b416c0b0b2621cbe68c4669c Author: Ingo Molnar Date: Thu Feb 2 12:45:58 2017 +0100 sched/headers: Move the JOBCTL_ defines and methods from to Only a small fraction of sched.h users actually utilizes these defines, and they are not scheduler functionality in any case, so move them into their separate header. (Also make a self-contained header.) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 30 ------------------------------ include/linux/sched/jobctl.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 30 deletions(-) commit 5647028d550c959577527cec9c0f29fbcea029ea Author: Ingo Molnar Date: Thu Feb 2 12:39:17 2017 +0100 sched/headers: Move the NUMA balancing interfaces from to Split out the interface between the scheduler and the MM which deals with page fault driven NUMA balancing, into the new header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 35 ------------------------------- include/linux/sched/numa_balancing.h | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 35 deletions(-) commit d026ce796cbca3c49678a68bb4a39fb4b9cf8192 Author: Ingo Molnar Date: Thu Feb 2 12:32:21 2017 +0100 sched/headers: Move in_vfork() from to The in_vfork() function deals with task->mm, so it better belongs into . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 26 -------------------------- include/linux/sched/mm.h | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) commit abe722a1c59728c6c0ea4e4d5efcfe397c8abebc Author: Ingo Molnar Date: Thu Feb 2 12:27:56 2017 +0100 sched/headers: Move the 'init_mm' declaration from to Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/mm_types.h | 2 ++ include/linux/sched.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4240c8bf877f1145571106a2934c5cea0b51b178 Author: Ingo Molnar Date: Thu Feb 2 12:18:24 2017 +0100 sched/headers: Move more mm_struct related functionality from to Neither the mmap_layout nor the mm_update_next_owner() methods need to be in - move them to the more appropriate header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 21 --------------------- include/linux/sched/mm.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) commit 7284c6d419b5a6ae9806927f1fd4f0cfd19a16f5 Author: Ingo Molnar Date: Thu Feb 2 12:14:19 2017 +0100 sched/headers: Move the cpufreq interfaces to No need to have this in the generic header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 17 ----------------- include/linux/sched/cpufreq.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) commit 8d88460edc05224b8d7ae3372173153876a02825 Author: Ingo Molnar Date: Thu Feb 2 12:06:10 2017 +0100 sched/headers: Move 'struct pacct_struct' and 'struct cpu_itimer' form to These structures are actually part of 'struct signal', so move them to where they belong. This further decreases the size and complexity of . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 13 ------------- include/linux/sched/signal.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 13 deletions(-) commit d151b27d3f86589308cd8c891fdfd2db5f8e80d6 Author: Ingo Molnar Date: Thu Feb 2 11:17:23 2017 +0100 sched/headers: Move softlockup detector watchdog methods to These methods don't belong into , they are neither directly related to task_struct or are scheduler functionality. Put them next to the other watchdog methods in . ( Arguably that header's name is a misnomer, and this patch makes it more so - but it should be renamed in another patch. ) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/nmi.h | 37 +++++++++++++++++++++++++++++++++++++ include/linux/sched.h | 37 ------------------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) commit bcbb6a5bf7df6e37ba652d1f426eab042ec4f56b Author: Ingo Molnar Date: Thu Feb 2 10:22:42 2017 +0100 sched/headers: Move 'struct user_struct' definition and APIs to the new header 'struct user_struct' was added to sched.h historically, but it's actually entirely independent of task_struct and of scheduler details, so move it to its own header. Fix up .c files using those facilities. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 53 --------------------------------------------- include/linux/sched/user.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 53 deletions(-) commit c3edc4010e9d102eb7b8f17d15c2ebc425fed63c Author: Ingo Molnar Date: Thu Feb 2 08:35:14 2017 +0100 sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into task_struct::signal and task_struct::sighand are pointers, which would normally make it straightforward to not define those types in sched.h. That is not so, because the types are accompanied by a myriad of APIs (macros and inline functions) that dereference them. Split the types and the APIs out of sched.h and move them into a new header, . With this change sched.h does not know about 'struct signal' and 'struct sighand' anymore, trying to put accessors into sched.h as a test fails the following way: ./include/linux/sched.h: In function ‘test_signal_types’: ./include/linux/sched.h:2461:18: error: dereferencing pointer to incomplete type ‘struct signal_struct’ ^ This reduces the size and complexity of sched.h significantly. Update all headers and .c code that relied on getting the signal handling functionality from to include . The list of affected files in the preparatory patch was partly generated by grepping for the APIs, and partly by doing coverage build testing, both all[yes|mod|def|no]config builds on 64-bit and 32-bit x86, and an array of cross-architecture builds. Nevertheless some (trivial) build breakage is still expected related to rare Kconfig combinations and in-flight patches to various kernel code, but most of it should be handled by this patch. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/nwfpe/fpmodule.c | 2 +- arch/sh/kernel/cpu/sh4/fpu.c | 3 +- drivers/net/tap.c | 2 +- include/linux/sched.h | 499 +----------------------------------------- include/linux/sched/signal.h | 502 +++++++++++++++++++++++++++++++++++++++++++ kernel/cgroup/cgroup-v1.c | 1 + mm/vmalloc.c | 2 +- net/smc/af_smc.c | 2 + net/smc/smc_clc.c | 2 + net/smc/smc_close.c | 2 + net/smc/smc_rx.c | 2 + net/smc/smc_tx.c | 2 + 12 files changed, 520 insertions(+), 501 deletions(-) commit 11701c6768367294c5086738d49196192aaf3d60 Author: Ingo Molnar Date: Wed Feb 1 19:21:47 2017 +0100 sched/headers: Move task->mm coredumping related defines and methods from to This further reduces the size and complexity of . These are the definitions and APIs that are moved: # MMF_*: fs/binfmt_elf.c fs/binfmt_elf_fdpic.c fs/exec.c fs/proc/base.c include/linux/khugepaged.h include/linux/ksm.h include/linux/sched/coredump.h kernel/events/uprobes.c kernel/fork.c mm/huge_memory.c mm/khugepaged.c mm/ksm.c mm/memory.c mm/oom_kill.c # SUID_DUMP_*: arch/ia64/include/asm/processor.h fs/coredump.c fs/exec.c fs/proc/internal.h include/linux/sched/coredump.h kernel/ptrace.c kernel/sys.c kernel/sysctl.c # get_dumpable(): arch/ia64/include/asm/processor.h fs/coredump.c fs/exec.c fs/proc/internal.h include/linux/sched/coredump.h kernel/ptrace.c kernel/sys.c # set_dumpable(): fs/exec.c include/linux/sched/coredump.h kernel/cred.c kernel/sys.c Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 68 ----------------------------------------- include/linux/sched/coredump.h | 69 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 68 deletions(-) commit 68e21be2916b359fd8afb536c1911dc014cfd03e Author: Ingo Molnar Date: Wed Feb 1 19:08:20 2017 +0100 sched/headers: Move task->mm handling methods to Move the following task->mm helper APIs into a new header file, , to further reduce the size and complexity of . Here are how the APIs are used in various kernel files: # mm_alloc(): arch/arm/mach-rpc/ecard.c fs/exec.c include/linux/sched/mm.h kernel/fork.c # __mmdrop(): arch/arc/include/asm/mmu_context.h include/linux/sched/mm.h kernel/fork.c # mmdrop(): arch/arm/mach-rpc/ecard.c arch/m68k/sun3/mmu_emu.c arch/x86/mm/tlb.c drivers/gpu/drm/amd/amdkfd/kfd_process.c drivers/gpu/drm/i915/i915_gem_userptr.c drivers/infiniband/hw/hfi1/file_ops.c drivers/vfio/vfio_iommu_spapr_tce.c fs/exec.c fs/proc/base.c fs/proc/task_mmu.c fs/proc/task_nommu.c fs/userfaultfd.c include/linux/mmu_notifier.h include/linux/sched/mm.h kernel/fork.c kernel/futex.c kernel/sched/core.c mm/khugepaged.c mm/ksm.c mm/mmu_context.c mm/mmu_notifier.c mm/oom_kill.c virt/kvm/kvm_main.c # mmdrop_async_fn(): include/linux/sched/mm.h # mmdrop_async(): include/linux/sched/mm.h kernel/fork.c # mmget_not_zero(): fs/userfaultfd.c include/linux/sched/mm.h mm/oom_kill.c # mmput(): arch/arc/include/asm/mmu_context.h arch/arc/kernel/troubleshoot.c arch/frv/mm/mmu-context.c arch/powerpc/platforms/cell/spufs/context.c arch/sparc/include/asm/mmu_context_32.h drivers/android/binder.c drivers/gpu/drm/etnaviv/etnaviv_gem.c drivers/gpu/drm/i915/i915_gem_userptr.c drivers/infiniband/core/umem.c drivers/infiniband/core/umem_odp.c drivers/infiniband/core/uverbs_main.c drivers/infiniband/hw/mlx4/main.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/usnic/usnic_uiom.c drivers/iommu/amd_iommu_v2.c drivers/iommu/intel-svm.c drivers/lguest/lguest_user.c drivers/misc/cxl/fault.c drivers/misc/mic/scif/scif_rma.c drivers/oprofile/buffer_sync.c drivers/vfio/vfio_iommu_type1.c drivers/vhost/vhost.c drivers/xen/gntdev.c fs/exec.c fs/proc/array.c fs/proc/base.c fs/proc/task_mmu.c fs/proc/task_nommu.c fs/userfaultfd.c include/linux/sched/mm.h kernel/cpuset.c kernel/events/core.c kernel/events/uprobes.c kernel/exit.c kernel/fork.c kernel/ptrace.c kernel/sys.c kernel/trace/trace_output.c kernel/tsacct.c mm/memcontrol.c mm/memory.c mm/mempolicy.c mm/migrate.c mm/mmu_notifier.c mm/nommu.c mm/oom_kill.c mm/process_vm_access.c mm/rmap.c mm/swapfile.c mm/util.c virt/kvm/async_pf.c # mmput_async(): include/linux/sched/mm.h kernel/fork.c mm/oom_kill.c # get_task_mm(): arch/arc/kernel/troubleshoot.c arch/powerpc/platforms/cell/spufs/context.c drivers/android/binder.c drivers/gpu/drm/etnaviv/etnaviv_gem.c drivers/infiniband/core/umem.c drivers/infiniband/core/umem_odp.c drivers/infiniband/hw/mlx4/main.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/usnic/usnic_uiom.c drivers/iommu/amd_iommu_v2.c drivers/iommu/intel-svm.c drivers/lguest/lguest_user.c drivers/misc/cxl/fault.c drivers/misc/mic/scif/scif_rma.c drivers/oprofile/buffer_sync.c drivers/vfio/vfio_iommu_type1.c drivers/vhost/vhost.c drivers/xen/gntdev.c fs/proc/array.c fs/proc/base.c fs/proc/task_mmu.c include/linux/sched/mm.h kernel/cpuset.c kernel/events/core.c kernel/exit.c kernel/fork.c kernel/ptrace.c kernel/sys.c kernel/trace/trace_output.c kernel/tsacct.c mm/memcontrol.c mm/memory.c mm/mempolicy.c mm/migrate.c mm/mmu_notifier.c mm/nommu.c mm/util.c # mm_access(): fs/proc/base.c include/linux/sched/mm.h kernel/fork.c mm/process_vm_access.c # mm_release(): arch/arc/include/asm/mmu_context.h fs/exec.c include/linux/sched/mm.h include/uapi/linux/sched.h kernel/exit.c kernel/fork.c Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/smp.c | 2 +- arch/arc/kernel/smp.c | 2 +- arch/arm/kernel/smp.c | 2 +- arch/arm64/kernel/smp.c | 2 +- arch/blackfin/mach-common/smp.c | 2 +- arch/hexagon/kernel/smp.c | 2 +- arch/ia64/kernel/setup.c | 2 +- arch/m32r/kernel/setup.c | 2 +- arch/metag/kernel/smp.c | 2 +- arch/mips/kernel/traps.c | 2 +- arch/parisc/kernel/smp.c | 2 +- arch/powerpc/kernel/smp.c | 2 +- arch/s390/kernel/processor.c | 2 + arch/score/kernel/traps.c | 1 + arch/sh/kernel/smp.c | 2 +- arch/sparc/kernel/leon_smp.c | 2 +- arch/sparc/kernel/smp_64.c | 2 +- arch/sparc/kernel/sun4d_smp.c | 2 +- arch/sparc/kernel/sun4m_smp.c | 2 +- arch/sparc/kernel/traps_32.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/tile/kernel/smpboot.c | 2 +- arch/x86/kernel/cpu/common.c | 2 +- arch/xtensa/kernel/smp.c | 1 + include/linux/sched.h | 95 ----------------------------------------- include/linux/sched/mm.h | 95 +++++++++++++++++++++++++++++++++++++++++ 26 files changed, 120 insertions(+), 116 deletions(-) commit 3fb66a70a4ae886445743354e4b60e54058bb3ff Author: Laurentiu Tudor Date: Thu Feb 16 09:11:29 2017 -0600 powerpc/booke: Fix boot crash due to null hugepd On 32-bit book-e machines, hugepd_ok() no longer takes into account null hugepd values, causing this crash at boot: Unable to handle kernel paging request for data at address 0x80000000 ... NIP [c0018378] follow_huge_addr+0x38/0xf0 LR [c001836c] follow_huge_addr+0x2c/0xf0 Call Trace: follow_huge_addr+0x2c/0xf0 (unreliable) follow_page_mask+0x40/0x3e0 __get_user_pages+0xc8/0x450 get_user_pages_remote+0x8c/0x250 copy_strings+0x110/0x390 copy_strings_kernel+0x2c/0x50 do_execveat_common+0x478/0x630 do_execve+0x2c/0x40 try_to_run_init_process+0x18/0x60 kernel_init+0xbc/0x110 ret_from_kernel_thread+0x5c/0x64 This impacts all nxp (ex-freescale) 32-bit booke platforms. This was caused by the change of hugepd_t.pd from signed to unsigned, and the update to the nohash version of hugepd_ok(). Previously hugepd_ok() could exclude all non-huge and NULL pgds using > 0, whereas now we need to explicitly check that the value is not zero and also that PD_HUGE is *clear*. This isn't protected by the pgd_none() check in __find_linux_pte_or_hugepte() because on 32-bit we use pgtable-nopud.h, which causes the pgd_none() check to be always false. Fixes: 20717e1ff526 ("powerpc/mm: Fix little-endian 4K hugetlb") Cc: stable@vger.kernel.org # v4.7+ Reported-by: Madalin-Cristian Bucur Signed-off-by: Laurentiu Tudor [mpe: Flesh out change log details.] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nohash/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dc831aa88132f835cefe876aa0206977c4d7710 Author: Nicholas Piggin Date: Sun Nov 27 13:46:20 2016 +1100 powerpc: Fix compiling a BE kernel with a powerpc64le toolchain GCC can compile with either endian, but the default ABI version is set based on the default endianness of the toolchain. Alan Modra says: you need both -mbig and -mabi=elfv1 to make a powerpc64le gcc generate powerpc64 code The opposite is true for powerpc64 when generating -mlittle it requires -mabi=elfv2 to generate v2 ABI, which we were already doing. This change adds ABI annotations together with endianness for all cases, LE and BE. This fixes the case of building a BE kernel with a toolchain that is LE by default. Signed-off-by: Nicholas Piggin Tested-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a6d8a21596df041f36f4c2ccc260c459e3e851f1 Author: Sachin Sant Date: Sun Feb 26 11:38:39 2017 +0530 selftest/powerpc: Fix false failures for skipped tests Tests under alignment subdirectory are skipped when executed on previous generation hardware, but harness still marks them as failed. test: test_copy_unaligned tags: git_version:unknown [SKIP] Test skipped on line 26 skip: test_copy_unaligned selftests: copy_unaligned [FAIL] The MAGIC_SKIP_RETURN_VALUE value assigned to rc variable is retained till the program exit which causes the test to be marked as failed. This patch resets the value before returning to the main() routine. With this patch the test o/p is as follows: test: test_copy_unaligned tags: git_version:unknown [SKIP] Test skipped on line 26 skip: test_copy_unaligned selftests: copy_unaligned [PASS] Signed-off-by: Sachin Sant Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/harness.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 424f8acd328a111319ae30bf384e5dfb9bc8f8cb Author: Gautham R. Shenoy Date: Mon Feb 27 11:10:07 2017 +0530 powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop Commit 09206b600c76 ("powernv: Pass PSSCR value and mask to power9_idle_stop") added additional code in power_enter_stop() to distinguish between stop requests whose PSSCR had ESL=EC=1 from those which did not. When ESL=EC=1, we do a forward-jump to a location labelled by "1", which had the code to handle the ESL=EC=1 case. Unfortunately just a couple of instructions before this label, is the macro IDLE_STATE_ENTER_SEQ() which also has a label "1" in its expansion. As a result, the current code can result in directly executing stop instruction for deep stop requests with PSSCR ESL=EC=1, without saving the hypervisor state. Fix this BUG by labeling the location that handles ESL=EC=1 case with a more descriptive label ".Lhandle_esl_ec_set" (local label suggestion a la .Lxx from Anton Blanchard). While at it, rename the label "2" labelling the location of the code handling entry into deep stop states with ".Lhandle_deep_stop". For a good measure, change the label in IDLE_STATE_ENTER_SEQ() macro to an not-so commonly used value in order to avoid similar mishaps in the future. Fixes: 09206b600c76 ("powernv: Pass PSSCR value and mask to power9_idle_stop") Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 4 ++-- arch/powerpc/kernel/idle_book3s.S | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit 7a70d7288c926ae88e0c773fbb506aa374e99c2d Author: Paul Mackerras Date: Mon Feb 27 14:32:41 2017 +1100 powerpc/64: Invalidate process table caching after setting process table The POWER9 MMU reads and caches entries from the process table. When we kexec from one kernel to another, the second kernel sets its process table pointer but doesn't currently do anything to make the CPU invalidate any cached entries from the old process table. This adds a tlbie (TLB invalidate entry) instruction with parameters to invalidate caching of the process table after the new process table is installed. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4ceae137bdab2232e57b2e6fd5631a22a0160938 Author: Ravi Bangoria Date: Tue Feb 14 14:46:43 2017 +0530 powerpc: emulate_step() tests for load/store instructions Add new selftest that test emulate_step for Normal, Floating Point, Vector and Vector Scalar - load/store instructions. Test should run at boot time if CONFIG_KPROBES_SANITY_TEST and CONFIG_PPC64 is set. Sample log: emulate_step_test: ld : PASS emulate_step_test: lwz : PASS emulate_step_test: lwzx : PASS emulate_step_test: std : PASS emulate_step_test: ldarx / stdcx. : PASS emulate_step_test: lfsx : PASS emulate_step_test: stfsx : PASS emulate_step_test: lfdx : PASS emulate_step_test: stfdx : PASS emulate_step_test: lvx : PASS emulate_step_test: stvx : PASS emulate_step_test: lxvd2x : PASS emulate_step_test: stxvd2x : PASS Signed-off-by: Ravi Bangoria [mpe: Drop start/complete lines, make it all __init] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 7 + arch/powerpc/lib/Makefile | 1 + arch/powerpc/lib/test_emulate_step.c | 434 ++++++++++++++++++++++++++++++++++ 3 files changed, 442 insertions(+) commit e148bd17f48bd17fca2f4f089ec879fa6e47e34c Author: Ravi Bangoria Date: Tue Feb 14 14:46:42 2017 +0530 powerpc: Emulation support for load/store instructions on LE emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Cc: stable@vger.kernel.org # v3.18+ Reported-by: Anton Blanchard Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 20 -------------------- 1 file changed, 20 deletions(-) commit bbe08c0a43e2c5ee3a00de68c0e867a08a9aa990 Merge: 94e877d e9f467d Author: Linus Torvalds Date: Thu Mar 2 16:03:00 2017 -0800 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull more btrfs updates from Chris Mason: "Btrfs round two. These are mostly a continuation of Dave Sterba's collection of cleanups, but Filipe also has some bug fixes and performance improvements" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (69 commits) btrfs: add dummy callback for readpage_io_failed and drop checks btrfs: drop checks for mandatory extent_io_ops callbacks btrfs: document existence of extent_io ops callbacks btrfs: let writepage_end_io_hook return void btrfs: do proper error handling in btrfs_insert_xattr_item btrfs: handle allocation error in update_dev_stat_item btrfs: remove BUG_ON from __tree_mod_log_insert btrfs: derive maximum output size in the compression implementation btrfs: use predefined limits for calculating maximum number of pages for compression btrfs: export compression buffer limits in a header btrfs: merge nr_pages input and output parameter in compress_pages btrfs: merge length input and output parameter in compress_pages btrfs: constify name of subvolume in creation helpers btrfs: constify buffers used by compression helpers btrfs: constify input buffer of btrfs_csum_data btrfs: constify device path passed to relevant helpers btrfs: make btrfs_inode_resume_unlocked_dio take btrfs_inode btrfs: make btrfs_inode_block_unlocked_dio take btrfs_inode btrfs: Make btrfs_add_nondir take btrfs_inode btrfs: Make btrfs_add_link take btrfs_inode ... commit 0cb3b79efabd4174ddeee40c2c1e5499ba67e067 Merge: 43e31e4 41139ac Author: Rafael J. Wysocki Date: Fri Mar 3 00:45:22 2017 +0100 Merge branch 'acpi-apei' * acpi-apei: ACPI: APEI: Fix BERT resources conflict with ACPI NVS area commit 9b5e9cb164ee93ae19c4c6593e8188a55481f78b Merge: 21ff03c de09cdd c3a49c8 2872de1 Author: Rafael J. Wysocki Date: Fri Mar 3 00:43:11 2017 +0100 Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-sleep' * pm-cpuidle: intel_idle: stop exposing platform acronyms in sysfs cpuidle: menu: Avoid taking spinlock for accessing QoS values * pm-cpufreq: cpufreq: intel_pstate: Fix limits issue with operation mode switching cpufreq: qoriq: clean up unused code * pm-sleep: PM / hibernate: Define pr_fmt() and use pr_*() instead of printk() PM / hibernate: Untangle power_down() commit 21ff03c484a86e6ea28fcd1cd2a2fd2c924fb6e9 Merge: 02c3de1 35bfa99 d08d1b2 2da8354 28db0c7 Author: Rafael J. Wysocki Date: Fri Mar 3 00:34:44 2017 +0100 Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp' * pm-core: PM / runtime: Fix some typos * pm-qos: PM / QoS: Remove global notifiers * pm-domains: PM / Domains: Power off masters immediately in the power off sequence PM / Domains: Rename is_async to one_dev_on for genpd_power_off() PM / Domains: Move genpd_power_off() above genpd_power_on() * pm-opp: PM / OPP: Documentation: Fix opp-microvolt in examples PM / OPP: fix off-by-one bug in dev_pm_opp_get_max_volt_latency loop commit 94e877d0fb43bec0540d6a37d49cb4f7f05a5348 Merge: 69fd110 653a774 Author: Linus Torvalds Date: Thu Mar 2 15:20:00 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs pile two from Al Viro: - orangefs fix - series of fs/namei.c cleanups from me - VFS stuff coming from overlayfs tree * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: orangefs: Use RCU for destroy_inode vfs: use helper for calling f_op->fsync() mm: use helper for calling f_op->mmap() vfs: use helpers for calling f_op->{read,write}_iter() vfs: pass type instead of fn to do_{loop,iter}_readv_writev() vfs: extract common parts of {compat_,}do_readv_writev() vfs: wrap write f_ops with file_{start,end}_write() vfs: deny copy_file_range() for non regular files vfs: deny fallocate() on directory vfs: create vfs helper vfs_tmpfile() namei.c: split unlazy_walk() namei.c: fold the check for DCACHE_OP_REVALIDATE into d_revalidate() lookup_fast(): clean up the logics around the fallback to non-rcu mode namei: fold unlazy_link() into its sole caller commit 69fd110eb650ea7baa82158f3b89a7d86da1d056 Merge: 821fd6f 4038a2a3 Author: Linus Torvalds Date: Thu Mar 2 15:16:38 2017 -0800 Merge branch 'work.sendmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs sendmsg updates from Al Viro: "More sendmsg work. This is a fairly separate isolated stuff (there's a continuation around lustre, but that one was too late to soak in -next), thus the separate pull request" * 'work.sendmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ncpfs: switch to sock_sendmsg() ncpfs: don't mess with manually advancing iovec on send ncpfs: sendmsg does *not* bugger iovec these days ceph_tcp_sendpage(): use ITER_BVEC sendmsg afs_send_pages(): use ITER_BVEC rds: remove dead code ceph: switch to sock_recvmsg() usbip_recv(): switch to sock_recvmsg() iscsi_target: deal with short writes on the tx side [nbd] pass iov_iter to nbd_xmit() [nbd] switch sock_xmit() to sock_{send,recv}msg() [drbd] use sock_sendmsg() commit 165a5e22fafb127ecb5914e12e8c32a1f0d3f820 Author: Jan Kara Date: Wed Feb 8 08:05:56 2017 +0100 block: Move bdi_unregister() to del_gendisk() Commit 6cd18e711dd8 "block: destroy bdi before blockdev is unregistered." moved bdi unregistration (at that time through bdi_destroy()) from blk_release_queue() to blk_cleanup_queue() because it needs to happen before blk_unregister_region() call in del_gendisk() for MD. SCSI though will free up the device number from sd_remove() called through a maze of callbacks from device_del() in __scsi_remove_device() before blk_cleanup_queue() and thus similar races as described in 6cd18e711dd8 can happen for SCSI as well as reported by Omar [1]. Moving bdi_unregister() to del_gendisk() works for MD and fixes the problem for SCSI since del_gendisk() gets called from sd_remove() before freeing the device number. This also makes device_add_disk() (calling bdi_register_owner()) more symmetric with del_gendisk(). [1] http://marc.info/?l=linux-block&m=148554717109098&w=2 Tested-by: Lekshmi Pillai Acked-by: Tejun Heo Signed-off-by: Jan Kara Tested-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 1 - block/genhd.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 9d49640a21bffd730a6ebf2a0032e022f7caf84a Author: Aurelien Aptel Date: Mon Feb 13 16:16:49 2017 +0100 CIFS: implement get_dfs_refer for SMB2+ in SMB2+ the get_dfs_refer operation uses a FSCTL. The request can be made on any Tree Connection according to the specs. Since Samba only accepted it on an IPC connection until recently, try that first. https://lists.samba.org/archive/samba-technical/2017-February/118859.html 3.2.4.20.3 Application Requests DFS Referral Information: > The client MUST search for an existing Session and TreeConnect to any > share on the server identified by ServerName for the user identified by > UserCredentials. If no Session and TreeConnect are found, the client > MUST establish a new Session and TreeConnect to IPC$ on the target > server as described in section 3.2.4.2 using the supplied ServerName and > UserCredentials. Signed-off-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2ops.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.h | 8 +++++ 2 files changed, 109 insertions(+) commit f0712928be1a66c99c35f871b4df7fa23ec1574a Author: Aurelien Aptel Date: Wed Feb 22 14:47:17 2017 +0100 CIFS: use DFS pathnames in SMB2+ Create requests When connected to a DFS capable share, the client must set the SMB2_FLAGS_DFS_OPERATIONS flag in the SMB2 header and use DFS path names: "\\" *without* leading \\. Sources: [MS-SMB2] 3.2.5.5 Receiving an SMB2 TREE_CONNECT Response > TreeConnect.IsDfsShare MUST be set to TRUE, if the SMB2_SHARE_CAP_DFS > bit is set in the Capabilities field of the response. [MS-SMB2] 3.2.4.3 Application Requests Opening a File > If TreeConnect.IsDfsShare is TRUE, the SMB2_FLAGS_DFS_OPERATIONS flag > is set in the Flags field. [MS-SMB2] 2.2.13 SMB2 CREATE Request, NameOffset: > If SMB2_FLAGS_DFS_OPERATIONS is set in the Flags field of the SMB2 > header, the file name includes a prefix that will be processed during > DFS name normalization as specified in section 3.3.5.9. Otherwise, the > file name is relative to the share that is identified by the TreeId in > the SMB2 header. Signed-off-by: Aurelien Aptel Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 96 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 16 deletions(-) commit 821fd6f6cb6500cd04a6c7e8f701f9b311a5c2b3 Merge: ca4c7d7 c87ba9c Author: Linus Torvalds Date: Thu Mar 2 14:52:05 2017 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "The highlights this round include: - enable dual mode (initiator + target) qla2xxx operation. (Quinn + Himanshu) - add a framework for qla2xxx async fabric discovery. (Quinn + Himanshu) - enable iscsi PDU DDP completion offload in cxgbit/T6 NICs. (Varun) - fix target-core handling of aborted failed commands. (Bart) - fix a long standing target-core issue NULL pointer dereference with active I/O LUN shutdown. (Rob Millner + Bryant + nab)" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits) target: Add counters for ABORT_TASK success + failure iscsi-target: Fix early login failure statistics misses target: Fix NULL dereference during LUN lookup + active I/O shutdown target: Delete tmr from list before processing target: Fix handling of aborted failed commands uapi: fix linux/target_core_user.h userspace compilation errors target: export protocol identifier qla2xxx: Fix a warning reported by the "smatch" static checker target/iscsi: Fix unsolicited data seq_end_offset calculation target/cxgbit: add T6 iSCSI DDP completion feature target/cxgbit: Enable DDP for T6 only if data sequence and pdu are in order target/cxgbit: Use T6 specific macros to get ETH/IP hdr len target/cxgbit: use cxgb4_tp_smt_idx() to get smt idx target/iscsi: split iscsit_check_dataout_hdr() target: Remove command flag CMD_T_DEV_ACTIVE target: Remove command flag CMD_T_BUSY target: Move session check from target_put_sess_cmd() into target_release_cmd_kref() target: Inline transport_cmd_check_stop() target: Remove an overly chatty debug message target: Stop execution if CMD_T_STOP has been set ... commit 9f674e48c13dcbc31ac903433727837795b81efe Author: Anoob Soman Date: Thu Mar 2 10:50:20 2017 +0000 xen-netback: Use GFP_ATOMIC to allocate hash Allocation of new_hash, inside xenvif_new_hash(), always happen in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new hash allocation. Signed-off-by: Anoob Soman Signed-off-by: David S. Miller drivers/net/xen-netback/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31c05415f5b471fd333fe42629788364faea8e0d Author: WANG Cong Date: Thu Mar 2 12:24:36 2017 -0800 bonding: use ETH_MAX_MTU as max mtu This restores the ability of setting bond device's mtu to 9000. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") Reported-by: daznis@gmail.com Reported-by: Brad Campbell Cc: Jarod Wilson Signed-off-by: Cong Wang Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) commit 152669bd3cd2407d6f556009b95ee249c0c1a462 Author: Dexuan Cui Date: Thu Mar 2 13:00:53 2017 +0000 netvsc: fix use-after-free in netvsc_change_mtu() 'nvdev' is freed in rndis_filter_device_remove -> netvsc_device_remove -> free_netvsc_device, so we mustn't access it, before it's re-created in rndis_filter_device_add -> netvsc_device_add. Signed-off-by: Dexuan Cui Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 35576ee17f7c15a5ec776570088fd2eff1dbdc2d Merge: 1c296a3 eb1e011 Author: David S. Miller Date: Thu Mar 2 14:39:17 2017 -0800 Merge tag 'mac80211-for-davem-2017-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== This contains just the average.h change in order to get it into the tree before adding new users through -next trees. ==================== Signed-off-by: David S. Miller commit 1c296a3ea853ca785351fe4e6f389a967758ac60 Merge: 9d6acb3 1657b8f Author: David S. Miller Date: Thu Mar 2 14:38:42 2017 -0800 Merge tag 'wireless-drivers-for-davem-2017-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.11 Add back a fixed version of an ath10k patch which was reverted during the merge window. ==================== Signed-off-by: David S. Miller commit ca4c7d7c2b6b4bfb293c24da1442cf0336c1912a Merge: 54d7989 2664f3c Author: Linus Torvalds Date: Thu Mar 2 14:36:00 2017 -0800 Merge tag 'dm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a dm-raid stable@ fix for possible corruption when triggering a raid reshape via lvm2; and an additional small patch ontop to bump version of the dm-raid target outside of the stable@ fix - a dm-raid fix for a 'dm-4.11-changes' regression introduced by a commit that was meant to only cleanup confusing branching. * tag 'dm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm raid: bump the target version dm raid: fix data corruption on reshape request dm raid: fix raid "check" regression due to improper cleanup in raid_message() commit 9d6acb3bc9058d1fd7a5297d71f14213679bb4bd Author: WANG Cong Date: Wed Mar 1 20:48:39 2017 -0800 ipv6: ignore null_entry in inet6_rtm_getroute() too Like commit 1f17e2f2c8a8 ("net: ipv6: ignore null_entry on route dumps"), we need to ignore null entry in inet6_rtm_getroute() too. Return -ENETUNREACH here to sync with IPv4 behavior, as suggested by David. Fixes: a1a22c1206 ("net: ipv6: Keep nexthop of multipath route on admin down") Reported-by: Dmitry Vyukov Cc: David Ahern Signed-off-by: Cong Wang Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 6 ++++++ 1 file changed, 6 insertions(+) commit be12502e2e64854dbe0a2ddff6d26ec1143d6890 Author: Dmitry Torokhov Date: Wed Mar 1 17:24:47 2017 -0800 drivers: net: ethernet: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller drivers/net/ethernet/amd/declance.c | 30 +++++++++++++++--------------- drivers/net/ethernet/broadcom/sb1250-mac.c | 4 ++-- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 4 ++-- drivers/net/ethernet/seeq/sgiseeq.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) commit ca2dea434d10e3a676482fdf6df17d20cdb3e907 Merge: 332524e 7e6a69e Author: Arnd Bergmann Date: Thu Mar 2 17:54:34 2017 +0100 Merge tag 'juno-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/late Merge "ARMv8 Juno DT fix for v4.11" from Sudeep Holla: Just single patch to fix replicator in order to prevent overflows at the source and reduce the back pressure by splitting the trace output to TPIU and ETR. * tag 'juno-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: update definition for programmable replicator commit 332524eaf739296bfc86c26d1b86a8c0040d7818 Author: Linus Walleij Date: Tue Feb 21 21:42:30 2017 +0100 ARM: deconfig: fix the moxart defconfig The moxart defconfig wasn't even building a kernel for Moxart, it was building a kernel for V4T on the nothing platform. Switch to MULTI_V4 and keep the right drivers, update a few selections. Now it (presumably) builds a minimalist Moxart kernel again. Cc: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/moxart_defconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7db92362d2fee5887f6b0c41653b8c9f8f5d6020 Author: Wei Wang Date: Wed Mar 1 13:29:48 2017 -0800 tcp: fix potential double free issue for fastopen_req tp->fastopen_req could potentially be double freed if a malicious user does the following: 1. Enable TCP_FASTOPEN_CONNECT sockopt and do a connect() on the socket. 2. Call connect() with AF_UNSPEC to disconnect the socket. 3. Make this socket a listening socket by calling listen(). 4. Accept incoming connections and generate child sockets. All child sockets will get a copy of the pointer of fastopen_req. 5. Call close() on all sockets. fastopen_req will get freed multiple times. Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support") Reported-by: Andrey Konovalov Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 54d7989f476ca57fc3c5cc71524c480ccb74c481 Merge: 0f221a3 c4baad5 Author: Linus Torvalds Date: Thu Mar 2 13:53:13 2017 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost updates from Michael Tsirkin: "virtio, vhost: optimizations, fixes Looks like a quiet cycle for vhost/virtio, just a couple of minor tweaks. Most notable is automatic interrupt affinity for blk and scsi. Hopefully other devices are not far behind" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio-console: avoid DMA from stack vhost: introduce O(1) vq metadata cache virtio_scsi: use virtio IRQ affinity virtio_blk: use virtio IRQ affinity blk-mq: provide a default queue mapping for virtio device virtio: provide a method to get the IRQ affinity mask for a virtqueue virtio: allow drivers to request IRQ affinity when creating VQs virtio_pci: simplify MSI-X setup virtio_pci: don't duplicate the msix_enable flag in struct pci_dev virtio_pci: use shared interrupts for virtqueues virtio_pci: remove struct virtio_pci_vq_info vhost: try avoiding avail index access when getting descriptor virtio_mmio: expose header to userspace commit 113285b473824922498d07d7f82459507b9792eb Author: Jens Axboe Date: Thu Mar 2 13:26:04 2017 -0700 blk-mq: ensure that bd->last is always set correctly When drivers are called with a request in blk-mq, blk-mq flags the state such that the driver knows if this is the last request in this call chain or not. The driver can then use that information to defer kicking off IO until bd->last is true. However, with blk-mq and scheduling, we need to allocate a driver tag for a request before it can be issued. If we fail to allocate such a tag, we could end up in the situation where the last request issued did not have bd->last == true set. This can then cause a driver hang. This fixes a hang with virtio-blk, which uses bd->last as a hint on whether to kick the queue or not. Reported-by: Chris Mason Tested-by: Chris Mason Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) commit 0f221a3102bba2d982d01bad38eb68507c343830 Merge: 4f1f2b8 2651225b Author: Linus Torvalds Date: Thu Mar 2 13:22:18 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem fixes from James Morris: "Two fixes for the security subsystem: - keys: split both rcu_dereference_key() and user_key_payload() into versions which can be called with or without holding the key semaphore. - SELinux: fix Android init(8) breakage due to new cgroup security labeling support when using older policy" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: selinux: wrap cgroup seclabel support with its own policy capability KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload() commit 94352d45092c23874532221b4d1e4721df9d63df Author: Arnaldo Carvalho de Melo Date: Wed Mar 1 16:35:08 2017 -0300 net: Introduce sk_clone_lock() error path routine When handling problems in cloning a socket with the sk_clone_locked() function we need to perform several steps that were open coded in it and its callers, so introduce a routine to avoid this duplication: sk_free_unlock_clone(). Cc: Cong Wang Cc: Dmitry Vyukov Cc: Eric Dumazet Cc: Gerrit Renker Cc: Thomas Gleixner Link: http://lkml.kernel.org/n/net-ui6laqkotycunhtmqryl9bfx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller include/net/sock.h | 1 + net/core/sock.c | 16 +++++++++++----- net/dccp/minisocks.c | 6 +----- 3 files changed, 13 insertions(+), 10 deletions(-) commit d5afb6f9b6bb2c57bd0c05e76e12489dc0d037d9 Author: Arnaldo Carvalho de Melo Date: Wed Mar 1 16:35:07 2017 -0300 dccp: Unlock sock before calling sk_free() The code where sk_clone() came from created a new socket and locked it, but then, on the error path didn't unlock it. This problem stayed there for a long while, till b0691c8ee7c2 ("net: Unlock sock before calling sk_free()") fixed it, but unfortunately the callers of sk_clone() (now sk_clone_locked()) were not audited and the one in dccp_create_openreq_child() remained. Now in the age of the syskaller fuzzer, this was finally uncovered, as reported by Dmitry: ---- 8< ---- I've got the following report while running syzkaller fuzzer on 86292b33d4b7 ("Merge branch 'akpm' (patches from Andrew)") [ BUG: held lock freed! ] 4.10.0+ #234 Not tainted ------------------------- syz-executor6/6898 is freeing memory ffff88006286cac0-ffff88006286d3b7, with a lock still held there! (slock-AF_INET6){+.-...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] (slock-AF_INET6){+.-...}, at: [] sk_clone_lock+0x3d9/0x12c0 net/core/sock.c:1504 5 locks held by syz-executor6/6898: #0: (sk_lock-AF_INET6){+.+.+.}, at: [] lock_sock include/net/sock.h:1460 [inline] #0: (sk_lock-AF_INET6){+.+.+.}, at: [] inet_stream_connect+0x44/0xa0 net/ipv4/af_inet.c:681 #1: (rcu_read_lock){......}, at: [] inet6_csk_xmit+0x12a/0x5d0 net/ipv6/inet6_connection_sock.c:126 #2: (rcu_read_lock){......}, at: [] __skb_unlink include/linux/skbuff.h:1767 [inline] #2: (rcu_read_lock){......}, at: [] __skb_dequeue include/linux/skbuff.h:1783 [inline] #2: (rcu_read_lock){......}, at: [] process_backlog+0x264/0x730 net/core/dev.c:4835 #3: (rcu_read_lock){......}, at: [] ip6_input_finish+0x0/0x1700 net/ipv6/ip6_input.c:59 #4: (slock-AF_INET6){+.-...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] #4: (slock-AF_INET6){+.-...}, at: [] sk_clone_lock+0x3d9/0x12c0 net/core/sock.c:1504 Fix it just like was done by b0691c8ee7c2 ("net: Unlock sock before calling sk_free()"). Reported-by: Dmitry Vyukov Cc: Cong Wang Cc: Eric Dumazet Cc: Gerrit Renker Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170301153510.GE15145@kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller net/dccp/minisocks.c | 1 + 1 file changed, 1 insertion(+) commit 6ab2b999e7babba1ae20c64a90889723c07ade72 Merge: f1304f7 51c6b42 Author: David S. Miller Date: Thu Mar 2 13:16:08 2017 -0800 Merge tag 'batadv-net-for-davem-20170301' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfixes: - fix a potential double free when fragment merges fail, by Sven Eckelmann - fix failing tranmission of the 16th (last) fragment if that exists, by Linus Lüssing ==================== Signed-off-by: David S. Miller commit f1304f7ba3981e71dcf2ac7db92949eeab49b1bf Author: Peter Downs Date: Wed Mar 1 01:01:17 2017 -0800 openvswitch: actions: fixed a brace coding style warning Fixed a brace coding style warning reported by checkpatch.pl Signed-off-by: Peter Downs Signed-off-by: David S. Miller net/openvswitch/actions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 11bd44f62d86115796109b0349e6e191bc99b45a Author: Ganesh Goudar Date: Wed Mar 1 11:18:53 2017 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number to 1.16.33.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 7b36a7189fc320f0b783dd51bd1f541db56cfbdd Author: Jens Axboe Date: Thu Mar 2 13:59:08 2017 -0700 block: don't call ioc_exit_icq() with the queue lock held for blk-mq For legacy scheduling, we always call ioc_exit_icq() with both the ioc and queue lock held. This poses a problem for blk-mq with scheduling, since the queue lock isn't what we use in the scheduler. And since we don't need the queue lock held for ioc exit there, don't grab it and leave any extra locking up to the blk-mq scheduler. Reported-by: Paolo Valente Tested-by: Paolo Valente Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-ioc.c | 44 +++++++++++++++++++++++++++++++------------- block/blk-sysfs.c | 2 -- block/elevator.c | 2 -- 3 files changed, 31 insertions(+), 17 deletions(-) commit a2d35d0b9412b201fbc236c4e6ab62c4517b2515 Merge: 9aea777 2697ea5 Author: David S. Miller Date: Thu Mar 2 12:57:54 2017 -0800 Merge branch 'amd-xgbe-fixes' Tom Lendacky says: ==================== amd-xgbe: AMD XGBE driver fixes 2017-02-28 This patch series addresses some issues in the AMD XGBE driver. The following fixes are included in this driver update series: - Stop the PHY before disabling and releasing device interrupts so that MDIO requests issued by the device can be properly handled - Set the MDIO communication mode on device startup, not just device probe - Do not overwrite SFP settings when mod_absent is detected This patch series is based on net. ==================== Signed-off-by: David S. Miller commit 2697ea5a859b83ca49511dcfd98daf42584eb3cf Author: Lendacky, Thomas Date: Tue Feb 28 15:03:10 2017 -0600 amd-xgbe: Don't overwrite SFP PHY mod_absent settings If an SFP module is not present, xgbe_phy_sfp_phy_settings() should return after applying the default settings. Currently there is no return statement and the default settings are overwritten. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 2 ++ 1 file changed, 2 insertions(+) commit b42c6761fd1651f564491b53016046c9ebf0b2a9 Author: Lendacky, Thomas Date: Tue Feb 28 15:03:01 2017 -0600 amd-xgbe: Be sure to set MDIO modes on device (re)start The MDIO register mode is set when the device is probed. But when the device is brought down and then back up, the MDIO register mode has been reset. Be sure to reset the mode during device startup and only change the mode of the address specified. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit 402168b4c2dc0734b8fbd282eff77da0275c5129 Author: Lendacky, Thomas Date: Tue Feb 28 15:02:51 2017 -0600 amd-xgbe: Stop the PHY before releasing interrupts Some configurations require the use of the hardware's MDIO support to communicate with external PHYs. The MDIO commands indicate completion through the device interrupt. When bringing down the device the interrupts were released before stopping the external PHY, resulting in MDIO command timeouts. Move the stopping of the PHY to before the releasing of the interrupts. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16ce771b93ab569490fd27415694132a7ade0d79 Merge: acc9ab6 4e5acdc Author: Radim Krčmář Date: Thu Mar 2 21:53:25 2017 +0100 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into next Two bug fixes for HV KVM on POWER9 machines. commit 9aea7779b764a11e357d3c74af6aee3cf90f2045 Author: Alban Bedel Date: Tue Feb 28 18:08:55 2017 +0100 drivers: net: xgene: Fix crash on DT systems On DT systems the driver require a clock, but the probe just print a warning and continue, leading to a crash when resetting the device. To fix this crash and properly handle probe deferals only ignore the missing clock if DT isn't used or if the clock doesn't exist. Signed-off-by: Alban Bedel Acked-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4f1f2b8f0818af9b0e21ba4b17ab615e29b4650d Merge: 474c901 9ad82f1 Author: Linus Torvalds Date: Thu Mar 2 12:45:46 2017 -0800 Merge tag 'watchdog-for-linus-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull more watchdog updates from Guenter Roeck: - fix fallout from enabling COMPILE_TEST - fix gcc-4.3 build of kempld watchdog driver - use hrtimer in softdog * tag 'watchdog-for-linus-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: watchdog: retu: restore MFD dependency watchdog: db8500: add back prmcu dependency watchdog: kempld: fix gcc-4.3 build watchdog: softdog: fire watchdog even if softirqs do not get to run watchdog: kempld: revert to full dependency watchdog: bcm2835: add CONFIG_OF dependency watchdog: sp805: add back AMBA dependency watchdog: menf21bmc: add I2C dependency watchdog: geode: restore hard CS5535_MFGPT dependency watchdog: wm831x watchdog really needs mfd commit e3330039ea28dc199e3b2da993895ff742a91adf Author: WANG Cong Date: Mon Feb 27 16:07:43 2017 -0800 ipv6: check for ip6_null_entry in __ip6_del_rt_siblings() Andrey reported a NULL pointer deref bug in ipv6_route_ioctl() -> ip6_route_del() -> __ip6_del_rt_siblings() code path. This is because ip6_null_entry is returned in this path since ip6_null_entry is kinda default for a ipv6 route table root node. Quote from David Ahern: ip6_null_entry is the root of all ipv6 fib tables making it integrated into the table ... We should ignore any attempt of trying to delete it, like we do in __ip6_del_rt() path and several others. Reported-by: Andrey Konovalov Fixes: 0ae8133586ad ("net: ipv6: Allow shorthand delete of all nexthops in multipath route") Cc: David Ahern Cc: Eric Dumazet Signed-off-by: Cong Wang Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 474c90156c8dcc2fa815e6716cc9394d7930cb9c Author: Linus Torvalds Date: Thu Mar 2 12:17:22 2017 -0800 give up on gcc ilog2() constant optimizations gcc-7 has an "optimization" pass that completely screws up, and generates the code expansion for the (impossible) case of calling ilog2() with a zero constant, even when the code gcc compiles does not actually have a zero constant. And we try to generate a compile-time error for anybody doing ilog2() on a constant where that doesn't make sense (be it zero or negative). So now gcc7 will fail the build due to our sanity checking, because it created that constant-zero case that didn't actually exist in the source code. There's a whole long discussion on the kernel mailing about how to work around this gcc bug. The gcc people themselevs have discussed their "feature" in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 but it's all water under the bridge, because while it looked at one point like it would be solved by the time gcc7 was released, that was not to be. So now we have to deal with this compiler braindamage. And the only simple approach seems to be to just delete the code that tries to warn about bad uses of ilog2(). So now "ilog2()" will just return 0 not just for the value 1, but for any non-positive value too. It's not like I can recall anybody having ever actually tried to use this function on any invalid value, but maybe the sanity check just meant that such code never made it out in public. Reported-by: Laura Abbott Cc: John Stultz , Cc: Thomas Gleixner Cc: Ard Biesheuvel Signed-off-by: Linus Torvalds include/linux/log2.h | 13 ++----------- tools/include/linux/log2.h | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) commit 3131d970f0d86bea41811766d55fc638e382daf3 Author: Linus Walleij Date: Mon Feb 27 10:13:38 2017 +0100 ARM: ux500: resume the second core properly The pen hold/release scheme was copied over to Ux500 from the ARM reference designs like most of these at the time. It is not needed at all, and was mostly removed in commit c00def71efd9 "ARM: ux500: simplify secondary CPU boot". However on the suspend/resume path and hot plug/unplug of CPUs, the .cpu_die() callback was still waiting for the pen to be released which made it spin forever and the second core never come back online after suspend/resume. Fix this by simply replacing the strange custom .cpu_die() with a oneline wfi() just like e.g. the qcom platform does. This fixes the issue and makes the second core come up properly after suspend/resume. As a side effect, this rids us of the completely surplus local setup.h and hotplug.c files, and we just compile this into platsmp.c with everything else SMP. Cc: stable@vger.kernel.org Fixes: c00def71efd9 ("ARM: ux500: simplify secondary CPU boot") Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/mach-ux500/Makefile | 3 --- arch/arm/mach-ux500/cpu-db8500.c | 2 -- arch/arm/mach-ux500/hotplug.c | 37 ------------------------------------- arch/arm/mach-ux500/platsmp.c | 9 +++++++-- arch/arm/mach-ux500/setup.h | 16 ---------------- 5 files changed, 7 insertions(+), 60 deletions(-) commit d4b80d9aacfa760cf0f363caec33b6d54f3afa2b Merge: b2e3c43 3e01103 Author: Arnd Bergmann Date: Thu Mar 2 17:52:44 2017 +0100 Merge branch 'next/late' with mainline * next/late: (25 commits) arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost arm64: dts: exynos: Add USB 3.0 controller node for Exynos7 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7 pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e ARM64: dts: meson-gxbb-p200: add ADC laddered keys ARM64: dts: meson: meson-gx: add the SAR ADC ARM64: dts: meson-gxl: add the pwm_ao_b pin ARM64: dts: meson-gx: add the missing pwm_AO_ab node clk: gxbb: fix CLKID_ETH defined twice clk: samsung: exynos5433: Add data for 250MHz and 278MHz PLL rates clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks ARM64: dts: meson-gxl: rename Nexbox A95x for consistency clk: gxbb: add the SAR ADC clocks and expose them dt-bindings: amlogic: Add WeTek boards ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play dt-bindings: vendor-prefix: Add wetek vendor prefix ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes ARM64: dts: meson-gxbb-vega-s95: Add LED ... Signed-off-by: Arnd Bergmann commit 2e4d88009f57057df7672fa69a32b5224af54d37 Author: Janosch Frank Date: Thu Mar 2 15:23:42 2017 +0100 KVM: s390: Fix guest migration for huge guests resulting in panic While we can technically not run huge page guests right now, we can setup a guest with huge pages. Trying to migrate it will trigger a VM_BUG_ON and, if the kernel is not configured to panic on a BUG, it will happily try to work on non-existing page table entries. With this patch, we always return "dirty" if we encounter a large page when migrating. This at least fixes the immediate problem until we have proper handling for both kind of pages. Fixes: 15f36eb ("KVM: s390: Add proper dirty bitmap support to S390 kvm.") Cc: # 3.16+ Signed-off-by: Janosch Frank Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/mm/pgtable.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 7afbeb6df2aa5f9e3a0fc228817a85c16dea0faa Author: Heiko Carstens Date: Fri Feb 24 12:56:12 2017 +0100 s390/ipl: always use load normal for CCW-type re-IPL commit 14890678687c ("s390/ipl: use load normal for LPAR re-ipl") missed to convert one code path to use load normal semantics for re-IPL. Convert the missing code path as well. Fixes: 14890678687c ("s390/ipl: use load normal for LPAR re-ipl") Reported-by: Michael Holzheu Acked-by: Michael Holzheu Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 2 ++ 1 file changed, 2 insertions(+) commit a5a79d00017c9eee68a9bcb40d5dfd6f45f17461 Author: Jan Kara Date: Thu Mar 2 16:50:13 2017 +0100 block: Initialize bd_bdi on inode initialization So far we initialized bd_bdi only in bdget(). That is fine for normal bdev inodes however for the special case of the root inode of blockdev_superblock that function is never called and thus bd_bdi is left uninitialized. As a result bdev_evict_inode() may oops doing bdi_put(root->bd_bdi) on that inode as can be seen when doing: mount -t bdev none /mnt Fix the problem by initializing bd_bdi when first allocating the inode and then reinitializing bd_bdi in bdev_evict_inode(). Thanks to syzkaller team for finding the problem. Reported-by: Dmitry Vyukov Fixes: b1d2dc5659b4 ("block: Make blk_get_backing_dev_info() safe without open bdev") Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e02898b423802b1f3a3aaa7f16e896da069ba8f7 Author: Omar Sandoval Date: Wed Mar 1 10:42:38 2017 -0800 loop: fix LO_FLAGS_PARTSCAN hang loop_reread_partitions() needs to do I/O, but we just froze the queue, so we end up waiting forever. This can easily be reproduced with losetup -P. Fix it by moving the reread to after we unfreeze the queue. Fixes: ecdd09597a57 ("block/loop: fix race between I/O and set_status") Reported-by: Tejun Heo Cc: stable@vger.kernel.org Signed-off-by: Omar Sandoval Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/loop.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 302ad8cc09339ea261eef58a8d5f4a116a8ffda5 Author: Keith Busch Date: Wed Mar 1 14:22:12 2017 -0500 nvme: Complete all stuck requests If the nvme driver is shutting down its controller, the drievr will not start the queues up again, preventing blk-mq's hot CPU notifier from making forward progress. To fix that, this patch starts a request_queue freeze when the driver resets a controller so no new requests may enter. The driver will wait for frozen after IO queues are restarted to ensure the queue reference can be reinitialized when nvme requests to unfreeze the queues. If the driver is doing a safe shutdown, the driver will wait for the controller to successfully complete all inflight requests so that we don't unnecessarily fail them. Once the controller has been disabled, the queues will be restarted to force remaining entered requests to end in failure so that blk-mq's hot cpu notifier may progress. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 4 ++++ drivers/nvme/host/pci.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 79 insertions(+), 5 deletions(-) commit f91328c40a559362b6e7b7bfee01ca17fda87592 Author: Keith Busch Date: Wed Mar 1 14:22:11 2017 -0500 blk-mq: Provide freeze queue timeout A driver may wish to take corrective action if queued requests do not complete within a set time. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 9 +++++++++ include/linux/blk-mq.h | 2 ++ 2 files changed, 11 insertions(+) commit 6bae363ee3057a14eec93440826813603559273a Author: Keith Busch Date: Wed Mar 1 14:22:10 2017 -0500 blk-mq: Export blk_mq_freeze_queue_wait Drivers can start a freeze, so this provides a way to wait for frozen. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq.c | 3 ++- include/linux/blk-mq.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 6a8a21546507a3ec88e81c2ec927a3fb63efa8ff Author: Josef Bacik Date: Wed Mar 1 11:47:22 2017 -0500 nbd: stop leaking sockets This was introduced in the multi-connection patch, we've been leaking socket's ever since. Fixes: 9561a7a ("nbd: add multi-connection support") cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 562bef4259776c19cb2423d43af1f99183910a4d Author: Omar Sandoval Date: Mon Feb 27 09:47:55 2017 -0800 blk-mq: move update of tags->rqs to __blk_mq_alloc_request() No functional difference, it just makes a little more sense to update the tag map where we actually allocate the tag. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe Tested-by: Sagi Grimberg block/blk-mq-sched.c | 2 -- block/blk-mq.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 59748398992c9c3e9d600e56cb2a5c0c546fe129 Author: Omar Sandoval Date: Mon Feb 27 09:47:54 2017 -0800 blk-mq: kill blk_mq_set_alloc_data() Nothing is using it anymore. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe Tested-by: Sagi Grimberg block/blk-mq.h | 10 ---------- 1 file changed, 10 deletions(-) commit 6d2809d51a5079f01a416d91dd63b0766cb685d0 Author: Omar Sandoval Date: Mon Feb 27 10:28:27 2017 -0800 blk-mq: make blk_mq_alloc_request_hctx() allocate a scheduler request blk_mq_alloc_request_hctx() allocates a driver request directly, unlike its blk_mq_alloc_request() counterpart. It also crashes because it doesn't update the tags->rqs map. Fix it by making it allocate a scheduler request. Reported-by: Sagi Grimberg Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe Tested-by: Sagi Grimberg block/blk-mq-sched.c | 11 +++++------ block/blk-mq.c | 33 +++++++++++++++------------------ 2 files changed, 20 insertions(+), 24 deletions(-) commit 415b806de5576b656f3ff94366589af9a161d0c8 Author: Sagi Grimberg Date: Mon Feb 27 10:04:39 2017 -0700 blk-mq-sched: Allocate sched reserved tags as specified in the original queue tagset Signed-off-by: Sagi Grimberg Modified by me to also check at driver tag allocation time if the original request was reserved, so we can be sure to allocate a properly reserved tag at that point in time, too. Signed-off-by: Jens Axboe block/blk-mq-sched.c | 3 ++- block/blk-mq-tag.c | 2 +- block/blk-mq-tag.h | 6 ++++++ block/blk-mq.c | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) commit d3af3ecdc62c46fa67ce7a681f173acb1d750e33 Author: Shaohua Li Date: Wed Feb 1 09:53:16 2017 -0800 nvme: allocate nvme_queue in correct node nvme_queue is per-cpu queue (mostly). Allocating it in node where blk-mq will use it. Signed-off-by: Shaohua Li Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 27ddb689909cd0bab30524a5f720ae3a3e55acac Author: Shaohua Li Date: Wed Feb 1 09:53:15 2017 -0800 PCI: add an API to get node from vector Next patch will use the API to get the node from vector for nvme device Signed-off-by: Shaohua Li Reviewed-by: Christoph Hellwig Acked-by: Bjorn Helgaas Signed-off-by: Jens Axboe drivers/pci/msi.c | 16 ++++++++++++++++ include/linux/pci.h | 6 ++++++ 2 files changed, 22 insertions(+) commit 59f082e464ae0533813d5a1c3149b22563da93d7 Author: Shaohua Li Date: Wed Feb 1 09:53:14 2017 -0800 blk-mq: allocate blk_mq_tags and requests in correct node blk_mq_tags/requests of specific hardware queue are mostly used in specific cpus, which might not be in the same numa node as disk. For example, a nvme card is in node 0. half hardware queue will be used by node 0, the other node 1. Signed-off-by: Shaohua Li Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit e53aff45c490ea04aa5d9e3cffa65b6b54397455 Author: Shuah Khan Date: Wed Mar 1 15:15:07 2017 -0700 selftests: lib.mk Fix individual test builds In commit a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT"), added support to generate compile targets in a user specified directory. OUTPUT variable controls the location which is undefined when tests are built in the test directory or with "make -C tools/testing/selftests/x86". make -C tools/testing/selftests/x86/ make: Entering directory '/lkml/linux_4.11/tools/testing/selftests/x86' Makefile:44: warning: overriding recipe for target 'clean' ../lib.mk:51: warning: ignoring old recipe for target 'clean' gcc -m64 -o /single_step_syscall_64 -O2 -g -std=gnu99 -pthread -Wall single_step_syscall.c -lrt -ldl /usr/bin/ld: cannot open output file /single_step_syscall_64: Permission denied collect2: error: ld returned 1 exit status Makefile:50: recipe for target '/single_step_syscall_64' failed make: *** [/single_step_syscall_64] Error 1 make: Leaving directory '/lkml/linux_4.11/tools/testing/selftests/x86' Same failure with "cd tools/testing/selftests/x86/;make" run. Fix this with a change to lib.mk to define OUTPUT to be the pwd when MAKELEVEL is 0. This covers both cases mentioned above. Reported-by: Ingo Molnar Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 4 ++++ 1 file changed, 4 insertions(+) commit 653a7746fa2f5369985f5368ffc162b6510db6c8 Merge: f6c99aa 0eb8af4 Author: Al Viro Date: Thu Mar 2 06:41:22 2017 -0500 Merge remote-tracking branch 'ovl/for-viro' into for-linus Overlayfs-related series from Miklos and Amir commit f6c99aad4d9f3521fe38e552fd2a2e12cdc52418 Merge: 0695d7d 4675ac3 Author: Al Viro Date: Thu Mar 2 06:41:12 2017 -0500 Merge branch 'work.namei' into for-linus commit 0695d7dc1d9f19b82ec2cae24856bddce278cfe6 Author: Peter Zijlstra Date: Fri Feb 24 16:43:36 2017 +0100 orangefs: Use RCU for destroy_inode freeing of inodes must be RCU-delayed on all filesystems Cc: stable@vger.kernel.org Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Al Viro fs/orangefs/super.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5839f555fa576be57371686265206398d9ea1480 Author: Paulo Flabiano Smorigo Date: Wed Mar 1 11:00:00 2017 -0300 crypto: vmx - Use skcipher for xts fallback Cc: stable@vger.kernel.org #4.10 Signed-off-by: Paulo Flabiano Smorigo Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_xts.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit c96d0a1c47abd5c4fa544dcedb5fac4d020ac58b Author: Paulo Flabiano Smorigo Date: Wed Mar 1 10:58:20 2017 -0300 crypto: vmx - Use skcipher for cbc fallback Cc: stable@vger.kernel.org #4.10 Signed-off-by: Paulo Flabiano Smorigo Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_cbc.c | 47 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit 1657b8f84ed9fc1d2a100671f1d42d6286f20073 Author: Waldemar Rymarkiewicz Date: Fri Feb 24 23:30:03 2017 +0100 ath10k: search SMBIOS for OEM board file extension Board Data File (BDF) is loaded upon driver boot-up procedure. The right board data file is identified, among others, by device and sybsystem ids. The problem, however, can occur when the (default) board data file cannot fulfill with the vendor requirements and it is necessary to use a different board data file. To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name Extension to specify the extension/variant name. The driver will take the extension suffix into consideration and will load the right (non-default) board data file if necessary. If it is unnecessary to use extension board data file, please leave the SMBIOS field blank and default configuration will be used. Example: If a default board data file for a specific board is identified by a string "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028, subsystem-device=0310" then the OEM specific data file, if used, could be identified by variant suffix: "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028, subsystem-device=0310,variant=DE_1AB" If board data file name extension is set but board-2.bin does not contain board data file for the variant, the driver will fallback to the default board data file not to break backward compatibility. This was first applied in commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file extension") but later reverted in commit 005c3490e9db ("Revert "ath10k: Search SMBIOS for OEM board file extension"". This patch is now otherwise the same as commit f2593cb1b291 except the regression fixed. Signed-off-by: Waldemar Rymarkiewicz Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 101 ++++++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/core.h | 19 +++++++ 2 files changed, 117 insertions(+), 3 deletions(-) commit bb1a2c26165640ba2cbcfe06c81e9f9d6db4e643 Author: Thomas Gleixner Date: Wed Mar 1 21:10:17 2017 +0100 x86/hpet: Prevent might sleep splat on resume Sergey reported a might sleep warning triggered from the hpet resume path. It's caused by the call to disable_irq() from interrupt disabled context. The problem with the low level resume code is that it is not accounted as a special system_state like we do during the boot process. Calling the same code during system boot would not trigger the warning. That's inconsistent at best. In this particular case it's trivial to replace the disable_irq() with disable_hardirq() because this particular code path is solely used from system resume and the involved hpet interrupts can never be force threaded. Reported-and-tested-by: Sergey Senozhatsky Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Sergey Senozhatsky Cc: Borislav Petkov Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1703012108460.3684@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 857811a37129f5d2ba162d7be3986eff44724014 Author: Boqun Feng Date: Wed Mar 1 23:01:38 2017 +0800 locking/ww_mutex: Adjust the lock number for stress test Because there are only 12 bits in held_lock::references, so we only support 4095 nested lock held in the same time, adjust the lock number for ww_mutex stress test to kill one lockdep splat: [ ] [ BUG: bad unlock balance detected! ] [ ] kworker/u2:0/5 is trying to release lock (ww_class_mutex) at: [ ] ww_mutex_unlock() [ ] but there are no more locks to release! ... Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Fengguang Wu Cc: Linus Torvalds Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170301150138.hdixnmafzfsox7nn@tardis.cn.ibm.com Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fb4a2cea6b18dab56d609530d077f168169ed6b Author: Peter Zijlstra Date: Wed Mar 1 16:23:30 2017 +0100 locking/lockdep: Add nest_lock integrity test Boqun reported that hlock->references can overflow. Add a debug test for that to generate a clear error when this happens. Without this, lockdep is likely to report a mysterious failure on unlock. Reported-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Linus Torvalds Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2b232e0c3b3a09f3e33750aa20e314f1b80e5361 Author: Chris Wilson Date: Tue Feb 28 09:40:11 2017 +0000 locking/ww_mutex: Replace cpu_relax() with cond_resched() for tests When busy-spinning on a ww_mutex_trylock(), we depend upon the other thread advancing and releasing the lock. This can not happen on a single CPU unless we relinquish it: [ ] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [kworker/0:1:18] ... [ ] Call Trace: [ ] mutex_trylock() [ ] test_mutex_work+0x31/0x56 [ ] process_one_work+0x1b4/0x2f9 [ ] worker_thread+0x1b0/0x27c [ ] kthread+0xd1/0xd3 [ ] ret_from_fork+0x19/0x30 Reported-by: Fengguang Wu Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: f2a5fec17395 ("locking/ww_mutex: Begin kselftests for ww_mutex") Link: http://lkml.kernel.org/r/20170228094011.2595-1-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2679aecf1060063b97bf187ba1c61430aab0701 Merge: 9dcfe2c 4977ab6 Author: Ingo Molnar Date: Thu Mar 2 08:51:32 2017 +0100 Merge branch 'linus' into locking/urgent, to pick up fixes commit f94c8d116997597fc00f0812b0ab9256e7b0c58f Author: Peter Zijlstra Date: Wed Mar 1 15:53:38 2017 +0100 sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface Wanpeng Li reported that since the following commit: acb04058de49 ("sched/clock: Fix hotplug crash") ... KVM always runs with unstable sched-clock even though KVM's kvm_clock _is_ stable. The problem is that we've tied clear_sched_clock_stable() to the TSC state, and overlooked that sched_clock() is a paravirt function. Solve this by doing two things: - tie the sched_clock() stable state more clearly to the TSC stable state for the normal (!paravirt) case. - only call clear_sched_clock_stable() when we mark TSC unstable when we use native_sched_clock(). The first means we can actually run with stable sched_clock in more situations then before, which is good. And since commit: 12907fbb1a69 ("sched/clock, clocksource: Add optional cs::mark_unstable() method") ... this should be reliable. Since any detection of TSC fail now results in marking the TSC unstable. Reported-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: acb04058de49 ("sched/clock: Fix hotplug crash") Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 4 ---- arch/x86/kernel/cpu/centaur.c | 2 -- arch/x86/kernel/cpu/common.c | 3 --- arch/x86/kernel/cpu/cyrix.c | 1 - arch/x86/kernel/cpu/intel.c | 4 ---- arch/x86/kernel/cpu/transmeta.c | 2 -- arch/x86/kernel/tsc.c | 35 +++++++++++++++++++++++------------ 7 files changed, 23 insertions(+), 28 deletions(-) commit 0ba87bb27d66b78e278167ac7e20c66520b8a612 Author: Peter Zijlstra Date: Wed Mar 1 10:51:47 2017 +0100 sched/core: Fix pick_next_task() for RT,DL Pavan noticed that the following commit: 49ee576809d8 ("sched/core: Optimize pick_next_task() for idle_sched_class") ... broke RT,DL balancing by robbing them of the opportinty to do new-'idle' balancing when their last runnable task (on that runqueue) goes away. Reported-by: Pavan Kondeti Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: 49ee576809d8 ("sched/core: Optimize pick_next_task() for idle_sched_class") Signed-off-by: Ingo Molnar kernel/sched/core.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4c77b18cf8b7ab37c7d5737b4609010d2ceec5f0 Author: Peter Zijlstra Date: Wed Mar 1 11:24:35 2017 +0100 sched/fair: Make select_idle_cpu() more aggressive Kitsunyan reported desktop latency issues on his Celeron 887 because of commit: 1b568f0aabf2 ("sched/core: Optimize SCHED_SMT") ... even though his CPU doesn't do SMT. The effect of running the SMT code on a !SMT part is basically a more aggressive select_idle_cpu(). Removing the avg condition fixed things for him. I also know FB likes this test gone, even though other workloads like having it. For now, take it out by default, until we get a better idea. Reported-by: kitsunyan Signed-off-by: Peter Zijlstra (Intel) Cc: Chris Mason Cc: Linus Torvalds Cc: Mike Galbraith Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- kernel/sched/features.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit de8f1c77313d8c908b2897f268d466c13df161d4 Author: Ingo Molnar Date: Wed Feb 1 18:41:24 2017 +0100 sched/headers: Move autogroup APIs into Further reduce the size of sched.h. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 18 ------------------ include/linux/sched/autogroup.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) commit dea38c74cb9205341f52b8d8ae18f61247a43ea8 Author: Ingo Molnar Date: Wed Feb 1 18:25:37 2017 +0100 sched/headers: Move loadavg related definitions from to Move these bits to , to reduce the size and complexity of . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 27 --------------------------- include/linux/sched/loadavg.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) commit e2d1e2aec572a2138dea74d53be54a1406d419c0 Author: Ingo Molnar Date: Wed Feb 1 18:07:51 2017 +0100 sched/headers: Move various ABI definitions to Move scheduler ABI types (struct sched_attr, struct sched_param, etc.) into the new UAPI header. This further reduces the size and complexity of . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 70 ++-------------------------------------- include/uapi/linux/sched/types.h | 68 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 68 deletions(-) commit 47913d4ebd99c827c82c4f29eb282a119c3f2aeb Author: Ingo Molnar Date: Wed Feb 1 18:00:26 2017 +0100 sched/headers, delayacct: Move the 'struct task_delay_info' definition from to The 'struct task_delay_info' definition does not have to be in sched.h, because task_struct only has a pointer to it. So move it to to reduce the size of . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/delayacct.h | 36 ++++++++++++++++++++++++++++++++++++ include/linux/sched.h | 39 ++++----------------------------------- 2 files changed, 40 insertions(+), 35 deletions(-) commit 5689810360c2e88ce1619e8bcfa859852f9a1d1a Author: Ingo Molnar Date: Tue Feb 7 12:07:18 2017 +0100 sched/headers: Move scheduler clock interfaces to Move the sched_clock interfaces into a separate header file, to reduce the size of sched.h. Include in all files that made use of one of the Acked-by: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 100 -------------------------------------------- include/linux/sched/clock.h | 98 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 100 deletions(-) commit eb61baf69871b9836783a81bc451189edb0d9de2 Author: Ingo Molnar Date: Wed Feb 1 17:09:06 2017 +0100 sched/headers: Move the wake-queue types and interfaces from sched.h into Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 54 ++++---------------------------------------- include/linux/sched/wake_q.h | 47 ++++++++++++++++++++++++++++++++++++++ ipc/msg.c | 1 - 3 files changed, 51 insertions(+), 51 deletions(-) commit 5dbe91de599423d243738a205367506444ebb4a4 Author: Ingo Molnar Date: Wed Feb 1 18:47:28 2017 +0100 sched/headers: Move idle polling methods to Further reduce the size of by moving these APIs: tsk_is_polling() __current_set_polling() current_set_polling_and_test() __current_clr_polling() current_clr_polling_and_test() current_clr_polling() Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 76 ---------------------------------------------- include/linux/sched/idle.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) commit 4437722b0486c36dc90a1adf584fca4cea6cf1de Author: Ingo Molnar Date: Wed Feb 1 16:58:52 2017 +0100 sched/headers: Move the wake_up_if_idle() prototype to No need to clutter with this rarely used prototype. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- include/linux/sched/idle.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit b768917d2c08edc4b5616c86a569e524d190434b Author: Ingo Molnar Date: Wed Feb 1 16:51:00 2017 +0100 sched/headers: Move the 'cpu_idle_type' enum from to Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 7 ------- include/linux/sched/idle.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit a60b9eda67beac2318fa159545ba7d022f780736 Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Move scheduler topology interfaces to The vast majority of sched.h users does not require the topology types and interfaces, so split them out into . This reduces the size of linux/sched.h by ~6%. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 212 ---------------------------------------- include/linux/sched/topology.h | 213 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 212 deletions(-) commit b69339ba109549beeaf45c45c52ac7025bfcd954 Author: Ingo Molnar Date: Sun Feb 5 16:15:03 2017 +0100 sched/headers: Prepare to remove spurious inclusion dependencies In the following patches we are going to remove various headers from sched.h and other headers that sched.h includes. To make those patches build cleanly prepare the scene by adding dependencies to various files that learned to rely on those to-be-removed dependencies. These changes all make sense standalone: they add a header for a data type that a particular .c or .h file is using. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/misc/vmw_vmci/vmci_resource.c | 1 + include/linux/sched.h | 1 + include/sound/control.h | 1 + include/target/target_core_base.h | 1 + 4 files changed, 4 insertions(+) commit 50d34394cee68dd12c5e01fff073d1167700bfce Author: Ingo Molnar Date: Sun Feb 5 16:03:58 2017 +0100 sched/headers: Prepare to remove the include from Update files that depend on the magic.h inclusion. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/dax/dax.c | 1 + drivers/virtio/virtio_balloon.c | 1 + include/linux/sched/task_stack.h | 1 + mm/zsmalloc.c | 1 + security/integrity/evm/evm_main.c | 2 ++ 5 files changed, 6 insertions(+) commit 0881e7bd341e2158b314596bcf2059e88e68f04e Author: Ingo Molnar Date: Sun Feb 5 15:30:50 2017 +0100 sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from to But first update usage sites with the new header dependency. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/dma/dmatest.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 + drivers/infiniband/core/umem_odp.c | 1 + drivers/infiniband/hw/mlx4/main.c | 1 + drivers/infiniband/hw/mlx5/main.c | 1 + drivers/md/persistent-data/dm-block-manager.c | 1 + drivers/misc/cxl/main.c | 2 ++ drivers/net/xen-netback/interface.c | 1 + drivers/oprofile/buffer_sync.c | 1 + drivers/tty/tty_ldsem.c | 1 + drivers/usb/usbip/usbip_common.h | 1 + kernel/irq/manage.c | 1 + 12 files changed, 13 insertions(+) commit 1777e4635507265ba53d8dc4cd248e7d7c306fa0 Author: Ingo Molnar Date: Sun Feb 5 14:47:12 2017 +0100 sched/headers: Prepare to move _init() prototypes from to But first introduce a trivial header and update usage sites. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/ia64/kernel/setup.c | 1 + arch/m32r/kernel/traps.c | 1 + arch/s390/kernel/setup.c | 1 + include/linux/cpu.h | 2 ++ include/linux/sched/init.h | 6 ++++++ init/main.c | 1 + kernel/sched/sched.h | 1 + 7 files changed, 13 insertions(+) commit 61855b6b03df9b6a15bd265c2c3ae7b5e23da312 Author: Ingo Molnar Date: Sun Feb 5 14:35:41 2017 +0100 sched/headers: Prepare to move exit_files() and exit_itimers() from to But first update the usage site. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/time/posix-timers.c | 1 + 1 file changed, 1 insertion(+) commit 3f8c24529b42fc5044c2a44bdb8ba69aec2bee37 Author: Ingo Molnar Date: Sun Feb 5 14:31:22 2017 +0100 sched/headers: Prepare to move kstack_end() from to But first update the usage sites with the new header dependency. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/m32r/kernel/traps.c | 2 ++ arch/metag/kernel/stacktrace.c | 1 + arch/openrisc/kernel/traps.c | 1 + arch/um/kernel/sysrq.c | 1 + arch/xtensa/kernel/traps.c | 1 + mm/slab.c | 1 + 6 files changed, 7 insertions(+) commit 5c2c5c5514393e31859439ef83a34051d7c68332 Author: Ingo Molnar Date: Sun Feb 5 14:24:31 2017 +0100 sched/headers, vfs/execve: Prepare to move the do_execve*() prototypes from to But first update the usage sites with the new header dependency. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar init/main.c | 1 + kernel/kmod.c | 1 + 2 files changed, 2 insertions(+) commit 3905f9ad455e0fd2ddb557566c5561b4a3027c07 Author: Ingo Molnar Date: Sun Feb 5 12:07:04 2017 +0100 sched/headers: Prepare to move sched_info_on() and force_schedstat_enabled() from to But first update usage sites with the new header dependency. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kvm/cpuid.c | 2 ++ arch/x86/kvm/x86.c | 2 ++ fs/proc/base.c | 1 + kernel/latencytop.c | 1 + kernel/profile.c | 2 ++ 5 files changed, 8 insertions(+) commit 32ef5517c298042ed58408545f475df43afe1f24 Author: Ingo Molnar Date: Sun Feb 5 11:48:36 2017 +0100 sched/headers: Prepare to move cputime functionality from into Introduce a trivial, mostly empty header to prepare for the moving of cputime functionality out of sched.h. Update all code that relies on these facilities. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 1 + arch/ia64/kernel/time.c | 2 +- arch/powerpc/kernel/time.c | 2 +- arch/s390/kernel/idle.c | 2 +- arch/s390/kernel/vtime.c | 2 +- arch/x86/kernel/apm_32.c | 1 + arch/x86/kvm/hyperv.c | 2 ++ drivers/isdn/mISDN/stack.c | 1 + drivers/s390/cio/cio.c | 2 +- fs/binfmt_elf.c | 1 + fs/binfmt_elf_fdpic.c | 1 + fs/proc/array.c | 1 + fs/proc/stat.c | 2 +- include/linux/sched/cputime.h | 7 +++++++ kernel/acct.c | 2 ++ kernel/delayacct.c | 1 + kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/sched/cputime.c | 2 +- kernel/sched/sched.h | 1 + kernel/signal.c | 1 + kernel/sys.c | 1 + kernel/time/itimer.c | 1 + kernel/time/posix-cpu-timers.c | 1 + kernel/tsacct.c | 1 + 25 files changed, 33 insertions(+), 7 deletions(-) commit f719ff9bcee2a422647790f12d53d3755f47c727 Author: Ingo Molnar Date: Mon Feb 6 10:57:33 2017 +0100 sched/headers: Prepare to move the task_lock()/unlock() APIs to But first update the code that uses these facilities with the new header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/mips/math-emu/dsemul.c | 1 + block/blk-ioc.c | 1 + block/ioprio.c | 1 + drivers/staging/android/ion/ion.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec.c | 1 + fs/proc/internal.h | 1 + fs/proc/proc_net.c | 1 + fs/proc_namespace.c | 2 ++ include/linux/cpuset.h | 1 + ipc/namespace.c | 1 + kernel/cgroup/cpuset.c | 1 + kernel/sched/debug.c | 1 + kernel/utsname.c | 1 + mm/mempolicy.c | 1 + mm/mmu_context.c | 1 + net/core/net_namespace.c | 2 ++ net/core/netclassid_cgroup.c | 2 ++ net/core/netprio_cgroup.c | 2 ++ 18 files changed, 22 insertions(+) commit b2d091031075ac9a1598e3cc3a29c28f02e64c0d Author: Ingo Molnar Date: Sat Feb 4 01:27:20 2017 +0100 sched/headers: Prepare to use instead of in We don't actually need the full rculist.h header in sched.h anymore, we will be able to include the smaller rcupdate.h header instead. But first update code that relied on the implicit header inclusion. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/powerpc/kvm/book3s_mmu_hpte.c | 1 + arch/x86/kvm/irq_comm.c | 2 ++ arch/x86/kvm/page_track.c | 2 ++ drivers/md/bcache/btree.c | 2 ++ drivers/misc/vmw_vmci/vmci_event.c | 1 + drivers/nvme/target/admin-cmd.c | 2 ++ drivers/nvme/target/core.c | 2 ++ drivers/s390/cio/qdio_thinint.c | 2 ++ drivers/scsi/libfc/fc_disc.c | 2 ++ drivers/scsi/libfc/fc_rport.c | 2 ++ include/linux/dmar.h | 2 +- include/linux/pid.h | 2 +- include/linux/rhashtable.h | 2 +- include/linux/sched/signal.h | 1 + include/net/bluetooth/hci_core.h | 2 ++ kernel/trace/trace_events_hist.c | 1 + kernel/trace/trace_events_trigger.c | 1 + kernel/trace/trace_kprobe.c | 1 + kernel/trace/trace_uprobe.c | 1 + lib/bug.c | 1 + lib/rhashtable.c | 1 + net/mac80211/mesh_plink.c | 2 ++ net/mac802154/llsec.c | 2 ++ security/apparmor/policy.c | 1 + security/tomoyo/domain.c | 2 ++ security/tomoyo/group.c | 2 ++ security/tomoyo/util.c | 2 ++ 27 files changed, 41 insertions(+), 3 deletions(-) commit 9164bb4a18dfa592cd0aca455ea57abf89ca4526 Author: Ingo Molnar Date: Sat Feb 4 01:20:53 2017 +0100 sched/headers: Prepare to move 'init_task' and 'init_thread_union' from to Update all usage sites first. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm64/kernel/setup.c | 1 + arch/arm64/mm/kasan_init.c | 1 + arch/frv/mm/init.c | 1 + arch/metag/mm/init.c | 1 + arch/nios2/kernel/setup.c | 1 + arch/powerpc/kernel/paca.c | 1 + arch/um/kernel/skas/process.c | 1 + arch/um/kernel/um_arch.c | 2 ++ arch/x86/kernel/cpu/common.c | 1 + arch/x86/mm/kasan_init_64.c | 1 + fs/namespace.c | 2 ++ include/linux/sched/signal.h | 1 + init/init_task.c | 1 + kernel/delayacct.c | 1 + lib/is_single_threaded.c | 1 + mm/vmacache.c | 1 + 16 files changed, 18 insertions(+) commit 589ee62844e042b0b7d19ef57fb4cff77f3ca294 Author: Ingo Molnar Date: Sat Feb 4 00:16:44 2017 +0100 sched/headers: Prepare to remove the dependency from Update code that relied on sched.h including various MM types for them. This will allow us to remove the include from . Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/include/asm/a.out-core.h | 1 + arch/alpha/include/asm/mmu_context.h | 2 ++ arch/arc/mm/tlb.c | 2 ++ arch/arm/include/asm/mmu_context.h | 2 ++ arch/arm/include/asm/tlbflush.h | 7 ++++--- arch/arm/kernel/suspend.c | 1 + arch/arm/kernel/swp_emulate.c | 1 + arch/arm/mm/idmap.c | 1 + arch/arm64/include/asm/mmu_context.h | 1 + arch/arm64/kernel/traps.c | 1 + arch/avr32/include/asm/mmu_context.h | 2 ++ arch/blackfin/include/asm/mmu_context.h | 2 ++ arch/blackfin/kernel/flat.c | 1 + arch/blackfin/kernel/process.c | 1 + arch/blackfin/mm/sram-alloc.c | 2 ++ arch/cris/arch-v10/mm/tlb.c | 2 ++ arch/cris/arch-v32/mm/tlb.c | 1 + arch/cris/include/asm/pgtable.h | 2 +- arch/cris/mm/tlb.c | 2 ++ arch/h8300/kernel/traps.c | 1 + arch/hexagon/include/asm/mmu_context.h | 2 ++ arch/hexagon/kernel/smp.c | 1 + arch/ia64/include/asm/mmu_context.h | 1 + arch/ia64/include/asm/pgtable.h | 2 +- arch/ia64/sn/kernel/sn2/sn2_smp.c | 1 + arch/m32r/include/asm/mmu_context.h | 2 ++ arch/m68k/include/asm/a.out-core.h | 1 + arch/m68k/include/asm/mmu_context.h | 1 + arch/metag/include/asm/mmu_context.h | 1 + arch/microblaze/include/asm/mmu_context_mm.h | 2 ++ arch/microblaze/mm/pgtable.c | 1 + arch/mips/include/asm/elf.h | 2 ++ arch/mips/include/asm/mmu_context.h | 2 ++ arch/mips/kernel/smp.c | 2 +- arch/mips/math-emu/dsemul.c | 1 + arch/mips/mm/ioremap.c | 1 + arch/mn10300/include/asm/mmu_context.h | 2 ++ arch/mn10300/kernel/smp.c | 2 +- arch/mn10300/mm/tlb-smp.c | 2 +- arch/nios2/include/asm/mmu_context.h | 2 ++ arch/nios2/kernel/process.c | 1 + arch/powerpc/kernel/io-workarounds.c | 2 +- arch/powerpc/kvm/e500_mmu_host.c | 2 +- arch/powerpc/lib/feature-fixups.c | 1 + arch/powerpc/mm/hash_utils_64.c | 2 +- arch/powerpc/mm/pgtable-book3s64.c | 2 ++ arch/powerpc/mm/pgtable-hash64.c | 2 ++ arch/powerpc/mm/pgtable-radix.c | 2 +- arch/powerpc/mm/slb.c | 2 ++ arch/s390/include/asm/elf.h | 2 +- arch/s390/include/asm/mmu_context.h | 1 + arch/s390/kernel/processor.c | 1 + arch/s390/kvm/gaccess.c | 2 ++ arch/s390/kvm/priv.c | 2 ++ arch/score/include/asm/mmu_context.h | 2 ++ arch/score/kernel/traps.c | 1 + arch/sh/include/asm/mmu_context.h | 2 ++ arch/sparc/include/asm/mmu_context_64.h | 2 ++ arch/sparc/include/asm/pgtable_64.h | 3 +++ arch/sparc/kernel/asm-offsets.c | 1 + arch/sparc/kernel/traps_32.c | 1 + arch/sparc/mm/tsb.c | 2 ++ arch/tile/include/asm/mmu_context.h | 2 ++ arch/um/include/asm/mmu_context.h | 2 ++ arch/um/kernel/exec.c | 2 +- arch/um/kernel/reboot.c | 1 + arch/um/kernel/skas/process.c | 3 ++- arch/x86/entry/vsyscall/vsyscall_64.c | 1 + arch/x86/events/core.c | 2 +- arch/x86/include/asm/a.out-core.h | 2 ++ arch/x86/include/asm/mpx.h | 2 ++ arch/x86/mm/mpx.c | 1 + arch/x86/um/syscalls_64.c | 1 + arch/x86/xen/mmu.c | 2 +- arch/xtensa/include/asm/mmu_context.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 2 ++ drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/media/v4l2-core/videobuf-dma-sg.c | 2 +- fs/binfmt_misc.c | 2 +- fs/kernfs/file.c | 2 +- include/drm/drm_mm.h | 1 + include/linux/init_task.h | 1 + include/linux/sched/mm.h | 1 + kernel/sched/debug.c | 2 +- kernel/sched/fair.c | 2 +- kernel/signal.c | 2 +- lib/is_single_threaded.c | 1 + 89 files changed, 125 insertions(+), 25 deletions(-) commit 2e58f173ab89b29a1373088b8727133dbf7322b0 Author: Ingo Molnar Date: Sat Feb 4 00:12:19 2017 +0100 mm/headers, sched/headers: Prepare to split out of We are going to separate all the MM types that are embedded directly in 'struct task_struct' into the new header. Create a new that only contains some includes from mm_types.h itself. This should be trivially correct and easy to bisect to. (This patch does not materially move the types yet.) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/mm_types.h | 6 +++--- include/linux/mm_types_task.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit f361bf4a66c9bfabace46f6ff5d97005c9b524fe Author: Ingo Molnar Date: Fri Feb 3 23:47:37 2017 +0100 sched/headers: Prepare for the reduction of 's signal API dependency Instead of including the full , we are going to include the types-only header in , to further decouple the scheduler header from the signal headers. This means that various files which relied on the full need to be updated to gain an explicit dependency on it. Update the code that relies on sched.h's inclusion of the header. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm64/kernel/sys_compat.c | 1 + drivers/gpu/drm/i915/i915_gem_request.c | 1 + drivers/isdn/mISDN/stack.c | 2 ++ fs/btrfs/extent-tree.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/buffer.c | 1 + fs/ceph/addr.c | 1 + fs/dax.c | 1 + fs/ioctl.c | 2 ++ fs/iomap.c | 2 ++ fs/ocfs2/super.c | 1 + include/linux/sched.h | 1 + include/linux/sched/signal.h | 1 + kernel/pid_namespace.c | 1 + mm/page-writeback.c | 1 + 15 files changed, 18 insertions(+) commit e6d930b4e0115eb0732eec0efb11c3b09a8000fc Author: Ingo Molnar Date: Fri Feb 3 23:43:50 2017 +0100 signals: Prepare to split out from Introduce dummy header and add dependencies to places that will depend on it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/mips/include/asm/abi.h | 2 ++ include/linux/signal.h | 3 +-- include/linux/signal_types.h | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) commit dfc3401a33086a3fd465468e171ea0e82430569b Author: Ingo Molnar Date: Fri Feb 3 23:15:21 2017 +0100 sched/headers: Prepare to move the 'root_task_group' declaration to Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/init_task.h | 1 + kernel/sched/sched.h | 1 + 2 files changed, 2 insertions(+) commit 68db0cf10678630d286f4bbbbdfa102951a35faa Author: Ingo Molnar Date: Wed Feb 8 18:51:37 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 1 + arch/alpha/kernel/process.c | 1 + arch/alpha/kernel/ptrace.c | 1 + arch/alpha/kernel/signal.c | 1 + arch/arc/kernel/kgdb.c | 1 + arch/arc/kernel/process.c | 1 + arch/arc/kernel/ptrace.c | 1 + arch/arc/kernel/signal.c | 2 ++ arch/arm/kernel/perf_regs.c | 1 + arch/arm/kernel/process.c | 1 + arch/arm/kernel/ptrace.c | 1 + arch/arm/kernel/smp.c | 1 + arch/arm/kernel/traps.c | 1 + arch/arm64/include/asm/compat.h | 1 + arch/arm64/kernel/debug-monitors.c | 1 + arch/arm64/kernel/kgdb.c | 2 ++ arch/arm64/kernel/perf_regs.c | 1 + arch/arm64/kernel/process.c | 1 + arch/arm64/kernel/ptrace.c | 1 + arch/arm64/kernel/smp.c | 1 + arch/arm64/kernel/stacktrace.c | 1 + arch/arm64/kernel/traps.c | 1 + arch/avr32/kernel/process.c | 1 + arch/avr32/kernel/ptrace.c | 1 + arch/avr32/kernel/stacktrace.c | 1 + arch/blackfin/kernel/process.c | 1 + arch/blackfin/kernel/ptrace.c | 1 + arch/blackfin/kernel/signal.c | 1 + arch/blackfin/kernel/stacktrace.c | 1 + arch/blackfin/mach-common/smp.c | 1 + arch/c6x/kernel/process.c | 1 + arch/c6x/kernel/ptrace.c | 1 + arch/cris/arch-v10/kernel/process.c | 1 + arch/cris/arch-v10/kernel/ptrace.c | 1 + arch/cris/arch-v10/kernel/signal.c | 1 + arch/cris/arch-v32/kernel/process.c | 1 + arch/cris/arch-v32/kernel/ptrace.c | 1 + arch/cris/arch-v32/kernel/signal.c | 1 + arch/frv/kernel/process.c | 1 + arch/h8300/kernel/process.c | 1 + arch/h8300/kernel/signal.c | 1 + arch/hexagon/kernel/kgdb.c | 1 + arch/hexagon/kernel/process.c | 1 + arch/hexagon/kernel/ptrace.c | 1 + arch/hexagon/kernel/signal.c | 2 ++ arch/hexagon/kernel/stacktrace.c | 1 + arch/hexagon/kernel/traps.c | 1 + arch/ia64/kernel/perfmon.c | 1 + arch/ia64/kernel/process.c | 1 + arch/ia64/kernel/ptrace.c | 1 + arch/ia64/kernel/setup.c | 1 + arch/ia64/kernel/sys_ia64.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/ptrace.c | 1 + arch/m68k/kernel/process.c | 1 + arch/m68k/kernel/ptrace.c | 1 + arch/metag/kernel/process.c | 1 + arch/metag/kernel/ptrace.c | 2 ++ arch/metag/kernel/signal.c | 1 + arch/metag/kernel/smp.c | 1 + arch/metag/kernel/traps.c | 1 + arch/microblaze/kernel/process.c | 1 + arch/microblaze/kernel/ptrace.c | 1 + arch/microblaze/kernel/unwind.c | 1 + arch/mips/include/asm/fpu.h | 1 + arch/mips/kernel/crash.c | 1 + arch/mips/kernel/perf_event.c | 1 + arch/mips/kernel/process.c | 1 + arch/mips/kernel/ptrace.c | 1 + arch/mips/kernel/ptrace32.c | 1 + arch/mips/kernel/stacktrace.c | 1 + arch/mips/kernel/syscall.c | 1 + arch/mips/loongson64/loongson-3/smp.c | 1 + arch/mips/paravirt/paravirt-smp.c | 1 + arch/mips/sibyte/bcm1480/smp.c | 1 + arch/mn10300/kernel/process.c | 1 + arch/mn10300/kernel/ptrace.c | 1 + arch/nios2/kernel/process.c | 1 + arch/nios2/kernel/ptrace.c | 1 + arch/openrisc/kernel/process.c | 1 + arch/openrisc/kernel/ptrace.c | 1 + arch/parisc/kernel/process.c | 1 + arch/powerpc/kernel/process.c | 1 + arch/powerpc/mm/fault.c | 1 + arch/powerpc/perf/perf_regs.c | 1 + arch/s390/include/asm/compat.h | 1 + arch/s390/include/asm/kprobes.h | 1 + arch/s390/kernel/compat_signal.c | 1 + arch/s390/kernel/dumpstack.c | 1 + arch/s390/kernel/process.c | 1 + arch/s390/kernel/ptrace.c | 1 + arch/s390/kernel/runtime_instr.c | 2 ++ arch/s390/kernel/signal.c | 1 + arch/s390/kernel/smp.c | 1 + arch/s390/kernel/uprobes.c | 2 ++ arch/score/kernel/process.c | 1 + arch/score/kernel/ptrace.c | 1 + arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/dumpstack.c | 1 + arch/sh/kernel/kgdb.c | 2 ++ arch/sh/kernel/process.c | 1 + arch/sh/kernel/process_32.c | 1 + arch/sh/kernel/process_64.c | 1 + arch/sh/kernel/ptrace_32.c | 1 + arch/sh/kernel/ptrace_64.c | 1 + arch/sh/kernel/signal_32.c | 1 + arch/sh/kernel/sys_sh32.c | 1 + arch/sh/kernel/traps.c | 1 + arch/sh/kernel/traps_32.c | 2 ++ arch/sparc/kernel/process_32.c | 1 + arch/sparc/kernel/process_64.c | 1 + arch/sparc/kernel/ptrace_64.c | 1 + arch/tile/kernel/compat_signal.c | 1 + arch/tile/kernel/kgdb.c | 2 ++ arch/tile/kernel/process.c | 1 + arch/tile/kernel/ptrace.c | 2 ++ arch/tile/kernel/signal.c | 1 + arch/tile/kernel/stack.c | 1 + arch/um/kernel/exec.c | 1 + arch/um/kernel/process.c | 1 + arch/um/kernel/skas/process.c | 1 + arch/unicore32/kernel/process.c | 1 + arch/unicore32/kernel/ptrace.c | 1 + arch/unicore32/kernel/traps.c | 1 + arch/x86/entry/common.c | 1 + arch/x86/entry/vdso/vma.c | 1 + arch/x86/ia32/ia32_aout.c | 1 + arch/x86/ia32/ia32_signal.c | 1 + arch/x86/kernel/dumpstack.c | 1 + arch/x86/kernel/fpu/regset.c | 1 + arch/x86/kernel/ioport.c | 1 + arch/x86/kernel/irq_64.c | 1 + arch/x86/kernel/perf_regs.c | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/process_32.c | 1 + arch/x86/kernel/process_64.c | 1 + arch/x86/kernel/ptrace.c | 1 + arch/x86/kernel/signal.c | 1 + arch/x86/kernel/smpboot.c | 1 + arch/x86/kernel/stacktrace.c | 1 + arch/x86/kernel/step.c | 1 + arch/x86/kernel/traps.c | 1 + arch/x86/kernel/unwind_frame.c | 1 + arch/x86/kernel/vm86_32.c | 1 + arch/x86/mm/fault.c | 1 + arch/xtensa/kernel/process.c | 1 + arch/xtensa/kernel/ptrace.c | 1 + arch/xtensa/kernel/signal.c | 1 + arch/xtensa/kernel/smp.c | 1 + block/blk-map.c | 1 + drivers/hv/vmbus_drv.c | 2 ++ drivers/ide/ide-cd.c | 1 + drivers/md/bcache/closure.h | 1 + drivers/misc/lkdtm_usercopy.c | 1 + drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 + fs/binfmt_aout.c | 1 + fs/binfmt_elf.c | 1 + fs/binfmt_elf_fdpic.c | 3 ++- fs/binfmt_flat.c | 1 + fs/coredump.c | 1 + include/linux/elfcore.h | 2 ++ include/linux/perf_regs.h | 2 ++ include/linux/sched/task_stack.h | 6 ++++++ init/main.c | 1 + kernel/events/callchain.c | 2 ++ kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/printk/printk.c | 1 + kernel/sched/sched.h | 1 + kernel/seccomp.c | 1 + kernel/signal.c | 1 + kernel/trace/trace_stack.c | 1 + lib/debugobjects.c | 1 + lib/dma-debug.c | 1 + lib/syscall.c | 1 + mm/kasan/kasan.c | 1 + mm/kmemleak.c | 1 + mm/util.c | 1 + 178 files changed, 198 insertions(+), 1 deletion(-) commit 299300258d1bc4e997b7db340a2e06636757fe2e Author: Ingo Molnar Date: Wed Feb 8 18:51:36 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/process.c | 1 + arch/arc/kernel/process.c | 2 ++ arch/arm/kernel/process.c | 1 + arch/arm/mm/init.c | 1 + arch/arm64/kernel/process.c | 1 + arch/avr32/kernel/process.c | 1 + arch/blackfin/kernel/process.c | 1 + arch/blackfin/kernel/trace.c | 1 + arch/c6x/kernel/process.c | 1 + arch/cris/arch-v10/kernel/process.c | 1 + arch/cris/arch-v32/kernel/process.c | 1 + arch/cris/kernel/process.c | 1 + arch/frv/kernel/process.c | 1 + arch/frv/mm/mmu-context.c | 1 + arch/h8300/kernel/process.c | 1 + arch/hexagon/kernel/process.c | 1 + arch/ia64/kernel/mca.c | 1 + arch/ia64/kernel/perfmon.c | 1 + arch/ia64/kernel/process.c | 1 + arch/ia64/kernel/ptrace.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/smpboot.c | 1 + arch/m68k/kernel/process.c | 1 + arch/metag/kernel/process.c | 1 + arch/metag/kernel/traps.c | 1 + arch/microblaze/kernel/process.c | 1 + arch/mips/kernel/mips-mt-fpaff.c | 1 + arch/mips/kernel/process.c | 1 + arch/mn10300/kernel/process.c | 1 + arch/mn10300/kernel/smp.c | 1 + arch/nios2/kernel/process.c | 1 + arch/openrisc/kernel/process.c | 1 + arch/parisc/kernel/process.c | 1 + arch/powerpc/kernel/process.c | 1 + arch/s390/kernel/process.c | 1 + arch/s390/kernel/setup.c | 1 + arch/score/kernel/process.c | 1 + arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/process_32.c | 1 + arch/sh/kernel/process_64.c | 1 + arch/sh/mm/asids-debugfs.c | 1 + arch/sparc/kernel/process_32.c | 1 + arch/sparc/kernel/process_64.c | 1 + arch/tile/kernel/process.c | 1 + arch/tile/kernel/smpboot.c | 1 + arch/tile/kernel/unaligned.c | 1 + arch/tile/mm/fault.c | 2 ++ arch/um/kernel/exec.c | 1 + arch/um/kernel/process.c | 1 + arch/um/kernel/reboot.c | 1 + arch/unicore32/kernel/process.c | 1 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 1 + arch/x86/kernel/fpu/init.c | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/process_32.c | 1 + arch/x86/kernel/process_64.c | 1 + arch/x86/kernel/unwind_frame.c | 1 + arch/xtensa/kernel/process.c | 1 + drivers/misc/kgdbts.c | 2 ++ drivers/tty/sysrq.c | 2 +- drivers/tty/tty_io.c | 1 + fs/exec.c | 1 + fs/fcntl.c | 1 + fs/fs_struct.c | 1 + fs/proc/array.c | 1 + fs/proc/kcore.c | 1 + include/linux/sched/task.h | 6 ++++++ init/main.c | 1 + kernel/cgroup/cgroup.c | 1 + kernel/cpu.c | 1 + kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/kmod.c | 1 + kernel/kthread.c | 1 + kernel/locking/lockdep.c | 1 + kernel/pid.c | 1 + kernel/pid_namespace.c | 1 + kernel/power/process.c | 1 + kernel/ptrace.c | 1 + kernel/sched/sched.h | 1 + kernel/signal.c | 1 + kernel/smpboot.c | 1 + kernel/sys.c | 1 + kernel/trace/ftrace.c | 1 + kernel/tracepoint.c | 1 + lib/dma-debug.c | 1 + mm/kmemleak.c | 1 + mm/memory-failure.c | 1 + mm/memory.c | 1 + mm/oom_kill.c | 1 + mm/rmap.c | 1 + mm/swapfile.c | 1 + mm/usercopy.c | 2 ++ security/keys/keyctl.c | 1 + security/selinux/hooks.c | 1 + 95 files changed, 104 insertions(+), 1 deletion(-) commit ef8bd77f332bb0a4e467d7171bbfc6c57aa08a88 Author: Ingo Molnar Date: Wed Feb 8 18:51:36 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/kernel/smp.c | 1 + arch/arm64/include/asm/mmu_context.h | 1 + arch/arm64/kernel/smp.c | 1 + arch/ia64/kernel/process.c | 1 + arch/metag/kernel/smp.c | 1 + arch/mips/cavium-octeon/smp.c | 1 + arch/mips/kernel/smp-bmips.c | 1 + arch/mips/kernel/smp-cps.c | 1 + arch/mips/loongson64/loongson-3/smp.c | 1 + arch/powerpc/platforms/85xx/smp.c | 1 + arch/powerpc/platforms/powermac/smp.c | 1 + arch/powerpc/platforms/powernv/smp.c | 1 + arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 + arch/s390/kernel/smp.c | 1 + arch/sh/kernel/smp.c | 1 + arch/sparc/kernel/smp_64.c | 1 + arch/x86/kernel/smpboot.c | 1 + arch/xtensa/kernel/smp.c | 1 + include/linux/sched/hotplug.h | 6 ++++++ kernel/cpu.c | 1 + kernel/sched/core.c | 1 + kernel/sched/sched.h | 4 +++- 22 files changed, 29 insertions(+), 1 deletion(-) commit b17b01533b719e9949e437abf66436a875739b40 Author: Ingo Molnar Date: Wed Feb 8 18:51:35 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/process.c | 1 + arch/alpha/kernel/traps.c | 1 + arch/arc/kernel/ctx_sw.c | 1 + arch/arc/kernel/stacktrace.c | 2 ++ arch/arc/kernel/troubleshoot.c | 1 + arch/arm/kernel/process.c | 1 + arch/arm/kernel/stacktrace.c | 1 + arch/arm/kernel/traps.c | 1 + arch/arm/mm/alignment.c | 1 + arch/arm/mm/fault.c | 1 + arch/arm/probes/kprobes/core.c | 1 + arch/arm64/kernel/probes/kprobes.c | 1 + arch/arm64/kernel/process.c | 1 + arch/arm64/kernel/stacktrace.c | 1 + arch/arm64/kernel/traps.c | 1 + arch/arm64/mm/fault.c | 1 + arch/avr32/kernel/nmi_debug.c | 1 + arch/avr32/kernel/process.c | 1 + arch/blackfin/kernel/dumpstack.c | 2 ++ arch/blackfin/kernel/early_printk.c | 1 + arch/blackfin/kernel/nmi.c | 1 + arch/blackfin/kernel/process.c | 1 + arch/blackfin/kernel/trace.c | 1 + arch/blackfin/kernel/traps.c | 1 + arch/blackfin/mach-common/ints-priority.c | 1 + arch/blackfin/mm/isram-driver.c | 1 + arch/c6x/kernel/traps.c | 1 + arch/cris/arch-v10/kernel/process.c | 1 + arch/cris/arch-v10/kernel/traps.c | 2 ++ arch/cris/arch-v32/kernel/process.c | 1 + arch/cris/arch-v32/kernel/traps.c | 2 ++ arch/cris/kernel/irq.c | 1 + arch/cris/kernel/stacktrace.c | 2 +- arch/cris/kernel/traps.c | 1 + arch/frv/kernel/process.c | 1 + arch/frv/kernel/traps.c | 1 + arch/h8300/kernel/process.c | 1 + arch/h8300/kernel/traps.c | 1 + arch/hexagon/kernel/process.c | 1 + arch/hexagon/kernel/traps.c | 1 + arch/hexagon/kernel/vm_events.c | 1 + arch/ia64/hp/sim/simserial.c | 1 + arch/ia64/kernel/mca.c | 1 + arch/ia64/kernel/process.c | 1 + arch/ia64/kernel/traps.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/traps.c | 1 + arch/m68k/kernel/process.c | 1 + arch/m68k/kernel/traps.c | 1 + arch/m68k/mac/macints.c | 1 + arch/metag/kernel/process.c | 1 + arch/metag/kernel/stacktrace.c | 1 + arch/metag/kernel/traps.c | 1 + arch/metag/mm/fault.c | 1 + arch/microblaze/kernel/exceptions.c | 1 + arch/microblaze/kernel/process.c | 1 + arch/microblaze/kernel/traps.c | 1 + arch/mips/kernel/process.c | 1 + arch/mips/kernel/stacktrace.c | 1 + arch/mips/kernel/traps.c | 1 + arch/mips/sgi-ip22/ip28-berr.c | 1 + arch/mips/sgi-ip27/ip27-berr.c | 1 + arch/mips/sgi-ip32/ip32-berr.c | 1 + arch/mips/sgi-ip32/ip32-irq.c | 1 + arch/mn10300/kernel/process.c | 1 + arch/mn10300/kernel/traps.c | 1 + arch/nios2/kernel/process.c | 1 + arch/nios2/kernel/traps.c | 1 + arch/nios2/mm/fault.c | 1 + arch/openrisc/kernel/process.c | 1 + arch/openrisc/kernel/traps.c | 1 + arch/parisc/kernel/pa7300lc.c | 1 + arch/parisc/kernel/process.c | 1 + arch/parisc/kernel/signal.c | 1 + arch/parisc/kernel/traps.c | 1 + arch/parisc/kernel/unaligned.c | 1 + arch/parisc/mm/fault.c | 1 + arch/powerpc/kernel/process.c | 1 + arch/powerpc/kernel/stacktrace.c | 1 + arch/powerpc/kernel/traps.c | 1 + arch/s390/kernel/dumpstack.c | 1 + arch/s390/kernel/process.c | 1 + arch/s390/kernel/stacktrace.c | 1 + arch/s390/kernel/traps.c | 1 + arch/s390/mm/fault.c | 1 + arch/score/kernel/traps.c | 1 + arch/sh/kernel/dumpstack.c | 1 + arch/sh/kernel/nmi_debug.c | 1 + arch/sh/kernel/process_32.c | 1 + arch/sh/kernel/process_64.c | 1 + arch/sh/kernel/stacktrace.c | 1 + arch/sh/kernel/traps.c | 1 + arch/sh/kernel/traps_64.c | 1 + arch/sparc/kernel/process_32.c | 1 + arch/sparc/kernel/process_64.c | 1 + arch/sparc/kernel/stacktrace.c | 1 + arch/sparc/kernel/sun4m_irq.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 1 + arch/sparc/kernel/sys_sparc_64.c | 1 + arch/sparc/kernel/traps_32.c | 1 + arch/sparc/kernel/traps_64.c | 1 + arch/sparc/mm/fault_64.c | 1 + arch/tile/include/asm/stack.h | 2 ++ arch/tile/kernel/process.c | 1 + arch/tile/kernel/signal.c | 1 + arch/tile/kernel/stack.c | 1 + arch/tile/kernel/traps.c | 1 + arch/tile/kernel/unaligned.c | 1 + arch/tile/mm/fault.c | 1 + arch/um/drivers/mconsole_kern.c | 1 + arch/um/kernel/process.c | 1 + arch/um/kernel/sysrq.c | 2 ++ arch/um/kernel/trap.c | 1 + arch/unicore32/kernel/process.c | 1 + arch/unicore32/kernel/stacktrace.c | 1 + arch/unicore32/kernel/traps.c | 1 + arch/unicore32/mm/alignment.c | 1 + arch/x86/kernel/amd_gart_64.c | 1 + arch/x86/kernel/doublefault.c | 1 + arch/x86/kernel/dumpstack.c | 1 + arch/x86/kernel/dumpstack_32.c | 1 + arch/x86/kernel/dumpstack_64.c | 1 + arch/x86/kernel/kprobes/core.c | 1 + arch/x86/kernel/nmi.c | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/stacktrace.c | 1 + arch/x86/mm/extable.c | 2 ++ arch/x86/platform/uv/uv_nmi.c | 1 + arch/x86/um/sysrq_32.c | 1 + arch/x86/um/sysrq_64.c | 1 + arch/xtensa/kernel/process.c | 1 + arch/xtensa/kernel/traps.c | 1 + drivers/base/power/main.c | 1 + drivers/tty/sysrq.c | 2 ++ drivers/tty/tty_ldsem.c | 1 + drivers/tty/vt/keyboard.c | 2 ++ fs/proc/base.c | 1 + include/linux/sched/debug.h | 6 ++++++ kernel/debug/kdb/kdb_bt.c | 1 + kernel/debug/kdb/kdb_main.c | 1 + kernel/hung_task.c | 1 + kernel/latencytop.c | 1 + kernel/locking/mutex.c | 1 + kernel/locking/rtmutex-debug.c | 1 + kernel/locking/rtmutex.c | 1 + kernel/locking/rwsem-spinlock.c | 1 + kernel/locking/rwsem-xadd.c | 1 + kernel/locking/rwsem.c | 1 + kernel/locking/semaphore.c | 1 + kernel/panic.c | 1 + kernel/power/process.c | 1 + kernel/printk/printk.c | 1 + kernel/rcu/tree.c | 1 + kernel/rcu/tree_plugin.h | 1 + kernel/rcu/update.c | 1 + kernel/sched/completion.c | 1 + kernel/sched/sched.h | 2 +- kernel/sched/wait.c | 1 + kernel/signal.c | 1 + kernel/time/alarmtimer.c | 1 + kernel/time/hrtimer.c | 1 + kernel/time/timer.c | 1 + kernel/watchdog.c | 1 + kernel/watchdog_hld.c | 2 ++ lib/dump_stack.c | 1 + lib/nmi_backtrace.c | 1 + 166 files changed, 181 insertions(+), 2 deletions(-) commit 370c91355c76cbcaad8ff79b4bb15a7f2ea59433 Author: Ingo Molnar Date: Wed Feb 8 18:51:35 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/nohz.h | 6 ++++++ kernel/sched/sched.h | 1 + kernel/time/hrtimer.c | 1 + kernel/time/tick-sched.c | 1 + kernel/time/timer.c | 1 + 5 files changed, 10 insertions(+) commit 03441a3482a31462c93509939a388877e3cd9261 Author: Ingo Molnar Date: Wed Feb 8 18:51:35 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/powerpc/kvm/book3s_hv.c | 1 + arch/s390/appldata/appldata_os.c | 1 + crypto/mcryptd.c | 1 + drivers/cpuidle/governors/menu.c | 1 + fs/proc/loadavg.c | 1 + fs/proc/root.c | 1 + fs/proc/stat.c | 1 + include/linux/sched/stat.h | 6 ++++++ kernel/debug/kdb/kdb_main.c | 1 + kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/sched/sched.h | 1 + kernel/sys.c | 1 + kernel/time/tick-sched.c | 1 + virt/kvm/kvm_main.c | 1 + 15 files changed, 20 insertions(+) commit fd7712337ff09a248df424c5843c149586a3f017 Author: Ingo Molnar Date: Thu Feb 2 20:56:33 2017 +0100 sched/headers: Prepare to remove the include from is still needed - also update other headers and .c files that depend on sched.h including gfp.h (and its sub-headers) for them. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 1 + include/linux/sched/mm.h | 1 + lib/percpu_ida.c | 1 + 3 files changed, 3 insertions(+) commit 5b3cc15aff243cb518cbeed8b1a220cbfd023d9c Author: Ingo Molnar Date: Thu Feb 2 20:43:54 2017 +0100 sched/headers: Prepare to move the memalloc_noio_*() APIs to Update the .c files that depend on these APIs. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/base/power/runtime.c | 2 +- drivers/md/dm-bufio.c | 1 + drivers/md/dm-ioctl.c | 1 + drivers/usb/core/hub.c | 2 +- fs/ocfs2/cluster/tcp.c | 1 + fs/xfs/kmem.c | 1 + fs/xfs/xfs_buf.c | 1 + mm/page_alloc.c | 1 + mm/vmscan.c | 1 + net/ceph/crypto.c | 1 + 10 files changed, 10 insertions(+), 2 deletions(-) commit 174cd4b1e5fbd0d74c68cf3a74f5bd4923485512 Author: Ingo Molnar Date: Thu Feb 2 19:15:33 2017 +0100 sched/headers: Prepare to move signal wakeup & sigpending methods from into Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/common/bL_switcher.c | 2 +- arch/cris/arch-v10/drivers/sync_serial.c | 2 +- arch/cris/arch-v32/drivers/sync_serial.c | 2 +- arch/mips/kernel/rtlx.c | 2 ++ arch/mips/kvm/mips.c | 2 ++ arch/powerpc/kvm/book3s_hv.c | 2 +- arch/powerpc/kvm/powerpc.c | 1 + arch/powerpc/platforms/83xx/suspend.c | 1 + arch/powerpc/platforms/cell/spufs/sched.c | 2 +- arch/powerpc/platforms/cell/spufs/spufs.h | 1 + arch/s390/crypto/prng.c | 2 ++ arch/s390/kvm/kvm-s390.c | 2 ++ arch/s390/kvm/vsie.c | 2 ++ arch/sh/kernel/cpu/fpu.c | 2 +- arch/sh/kernel/disassemble.c | 2 ++ arch/sh/kernel/process.c | 2 +- arch/um/drivers/random.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- block/blk-cgroup.c | 1 + block/blk-mq.c | 1 + crypto/algboss.c | 2 +- crypto/algif_aead.c | 1 + crypto/algif_skcipher.c | 1 + crypto/api.c | 2 +- drivers/atm/horizon.c | 1 + drivers/base/core.c | 1 + drivers/base/power/wakeup.c | 2 +- drivers/block/drbd/drbd_main.c | 1 + drivers/block/drbd/drbd_receiver.c | 1 + drivers/block/drbd/drbd_worker.c | 2 +- drivers/block/swim3.c | 2 +- drivers/char/applicom.c | 2 +- drivers/char/hpet.c | 1 + drivers/char/hw_random/core.c | 1 + drivers/char/ipmi/ipmi_watchdog.c | 1 + drivers/char/lp.c | 2 +- drivers/char/ppdev.c | 2 +- drivers/char/rtc.c | 2 +- drivers/char/snsc.c | 2 +- drivers/dma-buf/dma-fence.c | 1 + drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 1 + drivers/gpu/vga/vgaarb.c | 2 +- drivers/hid/hid-debug.c | 2 +- drivers/hid/hid-roccat.c | 2 +- drivers/hid/hidraw.c | 2 +- drivers/hid/usbhid/hiddev.c | 1 + drivers/hsi/clients/cmt_speech.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 ++ drivers/i2c/busses/i2c-mpc.c | 2 +- drivers/iio/industrialio-buffer.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 + drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 1 + drivers/isdn/capi/kcapi.c | 2 +- drivers/isdn/mISDN/timerdev.c | 2 ++ drivers/lguest/core.c | 1 + drivers/macintosh/adb.c | 2 +- drivers/macintosh/smu.c | 1 + drivers/macintosh/via-pmu.c | 2 +- drivers/mailbox/mailbox-test.c | 1 + drivers/md/dm.c | 1 + drivers/media/dvb-core/dvb_ca_en50221.c | 2 +- drivers/media/dvb-core/dvb_demux.c | 2 +- drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/pci/cx18/cx18-driver.h | 2 +- drivers/media/pci/ivtv/ivtv-driver.h | 35 +++++++++++----------- drivers/media/pci/pt1/pt1.c | 1 + drivers/media/pci/pt3/pt3.c | 1 + drivers/media/pci/solo6x10/solo6x10-i2c.c | 1 + drivers/media/pci/zoran/zoran_device.c | 1 + drivers/media/platform/vivid/vivid-radio-rx.c | 2 ++ drivers/media/platform/vivid/vivid-radio-tx.c | 1 + drivers/media/rc/lirc_dev.c | 2 +- drivers/media/usb/cpia2/cpia2_core.c | 1 + drivers/media/usb/gspca/cpia1.c | 2 ++ drivers/misc/cxl/fault.c | 2 +- drivers/misc/cxl/file.c | 2 +- drivers/misc/ibmasm/r_heartbeat.c | 2 +- drivers/misc/lis3lv02d/lis3lv02d.c | 1 + drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/client.c | 2 +- drivers/misc/mei/main.c | 2 +- drivers/misc/mic/scif/scif_main.h | 2 +- drivers/misc/vexpress-syscfg.c | 2 +- drivers/mtd/tests/mtd_test.h | 2 +- drivers/net/bonding/bond_options.c | 2 ++ drivers/net/bonding/bond_sysfs.c | 2 +- drivers/net/can/softing/softing_fw.c | 2 +- drivers/net/ethernet/broadcom/tg3.c | 1 + drivers/net/ethernet/cavium/liquidio/octeon_main.h | 2 ++ drivers/net/ethernet/sfc/falcon/falcon.c | 2 ++ drivers/net/irda/stir4200.c | 1 + drivers/net/macvtap.c | 2 +- drivers/net/ppp/ppp_generic.c | 1 + drivers/net/tun.c | 1 + drivers/net/usb/hso.c | 2 +- drivers/net/usb/qmi_wwan.c | 1 + drivers/net/wan/cosa.c | 2 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 1 + drivers/net/wireless/broadcom/b43legacy/main.c | 2 +- drivers/net/wireless/intersil/hostap/hostap_hw.c | 2 +- .../net/wireless/intersil/hostap/hostap_ioctl.c | 2 +- drivers/oprofile/event_buffer.c | 2 +- drivers/parport/daisy.c | 2 +- drivers/parport/ieee1284.c | 2 +- drivers/parport/ieee1284_ops.c | 2 +- drivers/parport/parport_ip32.c | 2 +- drivers/parport/parport_pc.c | 2 +- drivers/parport/share.c | 2 +- drivers/pci/access.c | 2 +- drivers/pci/hotplug/cpci_hotplug_core.c | 1 + drivers/pci/hotplug/cpqphp.h | 2 +- drivers/pci/hotplug/pciehp.h | 2 +- drivers/pci/hotplug/shpchp.h | 2 +- drivers/rtc/rtc-dev.c | 2 +- drivers/s390/cio/device.c | 1 + drivers/scsi/lpfc/lpfc_vport.c | 1 + drivers/scsi/osst.c | 2 +- drivers/scsi/st.c | 2 +- drivers/soc/fsl/qbman/dpaa_sys.h | 1 + drivers/staging/comedi/comedi_fops.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 2 +- drivers/staging/dgnc/dgnc_utils.c | 2 +- drivers/staging/greybus/uart.c | 2 +- .../lustre/lustre/include/lustre/lustre_user.h | 1 + drivers/staging/lustre/lustre/include/lustre_lib.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 ++ drivers/staging/media/lirc/lirc_sir.c | 2 +- drivers/staging/media/lirc/lirc_zilog.c | 2 +- drivers/staging/speakup/speakup_soft.c | 2 +- drivers/target/iscsi/cxgbit/cxgbit_target.c | 2 ++ drivers/tty/n_gsm.c | 2 +- drivers/tty/serial/crisv10.c | 2 +- drivers/tty/serial/serial_core.c | 1 + drivers/tty/tty_ioctl.c | 2 +- drivers/tty/tty_port.c | 2 +- drivers/uio/uio.c | 2 +- drivers/usb/class/cdc-acm.c | 1 + drivers/usb/class/usblp.c | 2 +- drivers/usb/gadget/function/f_fs.c | 1 + drivers/usb/image/mdc800.c | 2 +- drivers/usb/misc/adutux.c | 1 + drivers/usb/misc/idmouse.c | 1 + drivers/usb/misc/rio500.c | 2 +- drivers/usb/misc/uss720.c | 1 + drivers/usb/mon/mon_bin.c | 1 + drivers/usb/mon/mon_text.c | 1 + drivers/usb/serial/digi_acceleport.c | 1 + drivers/usb/serial/generic.c | 1 + drivers/vhost/net.c | 1 + drivers/vhost/vhost.c | 1 + drivers/video/fbdev/cobalt_lcdfb.c | 1 + .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- fs/afs/rxrpc.c | 2 ++ fs/aio.c | 2 +- fs/btrfs/ctree.h | 1 + fs/ceph/caps.c | 2 +- fs/cifs/inode.c | 2 ++ fs/coda/psdev.c | 2 +- fs/dlm/user.c | 1 + fs/ecryptfs/read_write.c | 2 ++ fs/eventfd.c | 2 +- fs/eventpoll.c | 2 +- fs/ext4/ext4.h | 1 + fs/f2fs/data.c | 1 + fs/fuse/dev.c | 1 + fs/gfs2/lock_dlm.c | 1 + fs/gfs2/super.c | 2 +- fs/hpfs/hpfs_fn.h | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/jffs2/nodemgmt.c | 2 +- fs/nfs/inode.c | 2 +- fs/nilfs2/segment.c | 2 ++ fs/notify/fanotify/fanotify_user.c | 1 + fs/notify/inotify/inotify_user.c | 2 +- fs/ntfs/file.c | 2 +- fs/ocfs2/alloc.c | 1 + fs/ocfs2/dlm/dlmdomain.c | 1 + fs/ocfs2/dlmfs/userdlm.c | 1 + fs/ocfs2/dlmglue.c | 1 + fs/orangefs/orangefs-kernel.h | 2 +- fs/overlayfs/copy_up.c | 2 +- fs/splice.c | 2 ++ fs/userfaultfd.c | 2 +- fs/xfs/xfs_linux.h | 2 +- include/drm/drm_os_linux.h | 1 + include/linux/sunrpc/types.h | 1 + include/media/v4l2-ioctl.h | 1 + include/net/busy_poll.h | 1 + kernel/locking/mutex.c | 2 +- kernel/locking/rtmutex.c | 2 +- kernel/locking/rwsem-spinlock.c | 2 +- kernel/locking/rwsem-xadd.c | 2 +- kernel/rcu/rcutorture.c | 2 +- kernel/sched/completion.c | 2 +- kernel/sched/swait.c | 2 +- kernel/sched/wait.c | 2 +- kernel/time/alarmtimer.c | 1 + kernel/time/hrtimer.c | 2 +- kernel/time/timer.c | 2 +- lib/percpu_ida.c | 2 +- mm/compaction.c | 1 + mm/gup.c | 2 +- mm/hugetlb.c | 1 + mm/memory_hotplug.c | 1 + mm/shmem.c | 1 + mm/userfaultfd.c | 1 + net/atm/svc.c | 2 +- net/bluetooth/af_bluetooth.c | 2 ++ net/bluetooth/cmtp/capi.c | 2 +- net/bluetooth/hci_request.c | 2 ++ net/bluetooth/l2cap_sock.c | 1 + net/bluetooth/rfcomm/sock.c | 1 + net/bluetooth/sco.c | 1 + net/bridge/br_sysfs_br.c | 1 + net/bridge/br_sysfs_if.c | 1 + net/core/ethtool.c | 2 +- net/core/net-sysfs.c | 1 + net/dccp/output.c | 1 + net/ipv4/devinet.c | 1 + net/ipv6/addrconf.c | 1 + net/irda/ircomm/ircomm_tty.c | 2 +- net/irda/irnet/irnet_ppp.c | 3 +- net/iucv/af_iucv.c | 2 +- net/kcm/kcmsock.c | 2 ++ net/llc/af_llc.c | 2 ++ net/nfc/llcp_sock.c | 1 + net/phonet/pep.c | 1 + net/phonet/socket.c | 2 ++ net/rxrpc/conn_client.c | 2 ++ net/rxrpc/recvmsg.c | 2 ++ net/rxrpc/sendmsg.c | 2 ++ net/tipc/socket.c | 2 ++ net/vmw_vsock/af_vsock.c | 1 + net/vmw_vsock/virtio_transport_common.c | 1 + sound/core/control.c | 1 + sound/core/hwdep.c | 1 + sound/core/oss/pcm_oss.c | 1 + sound/core/pcm_lib.c | 1 + sound/core/pcm_native.c | 1 + sound/core/rawmidi.c | 2 +- sound/core/seq/oss/seq_oss_device.h | 2 +- sound/core/seq/oss/seq_oss_writeq.c | 1 + sound/core/seq/seq_fifo.c | 2 ++ sound/core/seq/seq_memory.c | 1 + sound/core/timer.c | 1 + sound/firewire/bebob/bebob.h | 1 + sound/firewire/dice/dice.h | 1 + sound/firewire/digi00x/digi00x.h | 1 + sound/firewire/fireworks/fireworks.h | 1 + sound/firewire/oxfw/oxfw.h | 1 + sound/firewire/tascam/tascam.h | 1 + sound/isa/gus/gus_pcm.c | 2 ++ sound/isa/msnd/msnd.c | 1 + sound/isa/sb/emu8000.c | 2 +- sound/isa/sb/emu8000_patch.c | 2 ++ sound/isa/sb/emu8000_pcm.c | 2 ++ sound/isa/wavefront/wavefront_synth.c | 1 + sound/oss/dmabuf.c | 2 ++ sound/oss/dmasound/dmasound_core.c | 1 + sound/oss/midibuf.c | 2 ++ sound/oss/msnd_pinnacle.c | 2 ++ sound/oss/sound_config.h | 1 + sound/oss/swarm_cs4297a.c | 2 +- virt/kvm/kvm_main.c | 2 +- 265 files changed, 319 insertions(+), 139 deletions(-) commit b12fb7f46af7d548503d75be59f493f958c6d1b3 Author: Ingo Molnar Date: Wed Feb 8 18:51:33 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the .c file that is going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/read_write.c | 3 ++- include/linux/sched/xacct.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit cc5efc2323a89dcf1a02c17b9b9f255c5a6e0492 Author: Ingo Molnar Date: Fri Feb 3 10:06:45 2017 +0100 sched/headers: Prepare for the removal of various unrelated headers from We are going to remove the following header inclusions from : #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include Fix up a single .h file that got hold of via one of these headers. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/user_namespace.h | 1 + 1 file changed, 1 insertion(+) commit 037741a6d4ab2e4b0580dae97aca963d8a8dc68f Author: Ingo Molnar Date: Fri Feb 3 10:08:30 2017 +0100 sched/headers: Prepare for the removal of from Fix up missing #includes in other places that rely on sched.h doing that for them. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/i2c.h | 1 + kernel/fork.c | 1 + kernel/locking/locktorture.c | 1 + kernel/rcu/tree.h | 1 + 4 files changed, 4 insertions(+) commit 4cf421e55d69016989548e0fb8585e69f54bd283 Author: Ingo Molnar Date: Fri Feb 3 10:03:42 2017 +0100 sched/headers: Prepare for the removal of from Fix up missing #includes in other places that rely on sched.h doing that for them. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/math-emu/math.c | 1 + arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/process.c | 1 + drivers/oprofile/cpu_buffer.c | 2 ++ 4 files changed, 5 insertions(+) commit 5b825c3af1d8a0af4deb4a5eb349d0d0050c62e5 Author: Ingo Molnar Date: Thu Feb 2 17:54:15 2017 +0100 sched/headers: Prepare to remove inclusion from Add #include dependencies to all .c files rely on sched.h doing that for them. Note that even if the count where we need to add extra headers seems high, it's still a net win, because is included in over 2,200 files ... Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/kernel/sys_oabi-compat.c | 1 + arch/mips/kernel/mips-mt-fpaff.c | 1 + arch/x86/include/asm/intel_rdt.h | 1 + arch/x86/kernel/cpu/intel_cacheinfo.c | 1 + block/ioprio.c | 1 + drivers/misc/eeprom/eeprom.c | 1 + drivers/misc/lkdtm_heap.c | 1 + drivers/misc/vmw_vmci/vmci_context.c | 1 + drivers/misc/vmw_vmci/vmci_host.c | 1 + drivers/staging/lustre/lustre/include/lustre_compat.h | 1 + drivers/staging/lustre/lustre/ptlrpc/sec.c | 1 + drivers/xen/balloon.c | 1 + fs/9p/v9fs.c | 1 + fs/affs/inode.c | 1 + fs/affs/super.c | 1 + fs/autofs4/dev-ioctl.c | 1 + fs/befs/linuxvfs.c | 1 + fs/binfmt_elf.c | 1 + fs/cachefiles/internal.h | 1 + fs/compat.c | 1 + fs/exportfs/expfs.c | 1 + fs/ext2/balloc.c | 1 + fs/ext4/ialloc.c | 2 ++ fs/file_table.c | 1 + fs/gfs2/inode.c | 1 + fs/gfs2/sys.c | 1 + fs/hfs/inode.c | 1 + fs/hfsplus/inode.c | 1 + fs/isofs/inode.c | 1 + fs/jffs2/fs.c | 1 + fs/libfs.c | 1 + fs/namespace.c | 1 + fs/ncpfs/ioctl.c | 1 + fs/notify/fanotify/fanotify.c | 1 + fs/notify/inotify/inotify_fsnotify.c | 1 + fs/omfs/inode.c | 1 + fs/overlayfs/copy_up.c | 1 + fs/overlayfs/inode.c | 1 + fs/overlayfs/namei.c | 1 + fs/overlayfs/super.c | 1 + fs/overlayfs/util.c | 1 + fs/posix_acl.c | 1 + fs/proc/proc_sysctl.c | 1 + fs/proc/root.c | 1 + fs/quota/dquot.c | 1 + fs/stat.c | 1 + fs/xfs/xfs_ioctl.c | 1 + include/linux/cred.h | 1 + include/linux/sched/signal.h | 1 + include/linux/wait.h | 1 + include/net/scm.h | 1 + include/rdma/ib.h | 1 + ipc/namespace.c | 1 + kernel/pid_namespace.c | 1 + kernel/ucount.c | 1 + kernel/uid16.c | 1 + kernel/utsname.c | 1 + mm/usercopy.c | 1 + net/dns_resolver/dns_query.c | 2 ++ net/netfilter/xt_owner.c | 2 ++ net/sunrpc/auth.c | 1 + security/apparmor/policy.c | 1 + security/keys/internal.h | 1 + security/keys/keyctl.c | 1 + security/keys/persistent.c | 2 ++ 65 files changed, 69 insertions(+) commit 7fce777cd4eacc0bdcb33017e5a4c495d28afed1 Author: Ingo Molnar Date: Thu Feb 2 14:47:27 2017 +0100 sched/headers: Prepare header dependency changes, move the include to kernel/sched/sched.h Recent header reorganizations unearthed this hidden dependency: kernel/sched/core.c:199:25: error: 'paravirt_steal_rq_enabled' undeclared (first use in this function) kernel/sched/core.c:200:11: error: implicit declaration of function 'paravirt_steal_clock' [-Werror=implicit-function-declaration] So move the asm/paravirt.h include from kernel/sched/cpuclock.c to kernel/sched/sched.h. ( NOTE: We do this change before doing the changes that introduce the build failure, so the series remains fully bisectable. ) Reported-by: kbuild test robot Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 4 ---- kernel/sched/sched.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit 1e4bae6468375f81a3d4bdf436deaa9ea294e12b Author: Ingo Molnar Date: Wed Feb 8 18:51:32 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the file that is going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/jobctl.h | 4 ++++ include/linux/sched/signal.h | 1 + 2 files changed, 5 insertions(+) commit 6a3827d7509cbf96b7e961f8957c1f01d1bcf894 Author: Ingo Molnar Date: Wed Feb 8 18:51:31 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/exec.c | 1 + fs/proc/array.c | 1 + include/linux/sched/numa_balancing.h | 6 ++++++ include/trace/events/sched.h | 2 +- kernel/fork.c | 1 + kernel/sched/sched.h | 1 + mm/huge_memory.c | 1 + mm/memory.c | 1 + mm/mempolicy.c | 1 + 9 files changed, 14 insertions(+), 1 deletion(-) commit 010426079ec1228a7f980d2eef766a84c0f9241a Author: Ingo Molnar Date: Wed Feb 8 18:51:31 2017 +0100 sched/headers: Prepare for new header dependencies before moving more code to We are going to split more MM APIs out of , which will have to be picked up from a couple of .c files. The APIs that we are going to move are: arch_pick_mmap_layout() arch_get_unmapped_area() arch_get_unmapped_area_topdown() mm_update_next_owner() Include the header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 1 + arch/arc/mm/mmap.c | 3 ++- arch/arm/mm/mmap.c | 1 + arch/arm64/mm/mmap.c | 1 + arch/frv/mm/elf-fdpic.c | 1 + arch/ia64/kernel/sys_ia64.c | 1 + arch/mips/mm/mmap.c | 1 + arch/parisc/kernel/cache.c | 1 + arch/parisc/kernel/sys_parisc.c | 1 + arch/parisc/mm/hugetlbpage.c | 1 + arch/powerpc/mm/mmap.c | 1 + arch/s390/mm/mmap.c | 1 + arch/sh/mm/mmap.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 1 + arch/sparc/kernel/sys_sparc_64.c | 1 + arch/sparc/mm/hugetlbpage.c | 1 + arch/tile/mm/hugetlbpage.c | 1 + arch/tile/mm/mmap.c | 1 + arch/x86/kernel/sys_x86_64.c | 1 + arch/x86/mm/hugetlbpage.c | 1 + arch/x86/mm/mmap.c | 1 + arch/xtensa/kernel/syscall.c | 1 + 22 files changed, 23 insertions(+), 1 deletion(-) commit 55687da166bf51129ed6b110d7711f4c7560abe2 Author: Ingo Molnar Date: Wed Feb 8 18:51:31 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/cpufreq/cpufreq_governor.c | 1 - drivers/cpufreq/cpufreq_governor.h | 1 + drivers/cpufreq/cpufreq_ondemand.c | 1 + drivers/cpufreq/intel_pstate.c | 2 +- include/linux/sched/cpufreq.h | 6 ++++++ kernel/sched/sched.h | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) commit 38b8d208a4544c9a26b10baec89b8a21042e5305 Author: Ingo Molnar Date: Wed Feb 8 18:51:31 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to move softlockup APIs out of , which will have to be picked up from other headers and a couple of .c files. already includes . Include the header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 1 + arch/ia64/kernel/uncached.c | 1 + arch/powerpc/kernel/swsusp_64.c | 1 + arch/x86/kernel/pvclock.c | 2 ++ arch/x86/xen/smp.c | 1 + drivers/ide/ide-taskfile.c | 1 + drivers/mtd/nand/nand_base.c | 1 + drivers/video/fbdev/nvidia/nv_accel.c | 2 ++ init/main.c | 1 + kernel/debug/debug_core.c | 1 + kernel/power/hibernate.c | 1 + kernel/power/snapshot.c | 1 + kernel/sched/clock.c | 1 + kernel/time/tick-sched.c | 1 + kernel/time/timekeeping.c | 1 + 15 files changed, 17 insertions(+) commit 8703e8a465b1e9cadc3680b4b1248f5987e54518 Author: Ingo Molnar Date: Wed Feb 8 18:51:30 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar block/ioprio.c | 1 + include/linux/cred.h | 2 +- include/linux/sched/user.h | 6 ++++++ ipc/mqueue.c | 1 + kernel/fork.c | 1 + kernel/signal.c | 1 + kernel/user.c | 1 + mm/mlock.c | 1 + net/core/scm.c | 1 + security/keys/process_keys.c | 1 + 10 files changed, 15 insertions(+), 1 deletion(-) commit 3f07c0144132e4f59d88055ac8ff3e691a5fa2b8 Author: Ingo Molnar Date: Wed Feb 8 18:51:30 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 2 +- arch/alpha/kernel/signal.c | 2 +- arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arc/kernel/traps.c | 2 +- arch/arc/mm/fault.c | 2 +- arch/arm/kernel/ptrace.c | 2 +- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/alignment.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm/mm/init.c | 1 + arch/arm/mm/mmap.c | 2 +- arch/arm/vfp/vfpmodule.c | 2 +- arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kernel/traps.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/arm64/mm/mmap.c | 2 +- arch/avr32/kernel/traps.c | 2 +- arch/blackfin/kernel/trace.c | 2 +- arch/blackfin/kernel/traps.c | 1 + arch/cris/mm/fault.c | 1 + arch/frv/kernel/traps.c | 2 +- arch/h8300/kernel/ptrace_s.c | 2 +- arch/hexagon/kernel/traps.c | 2 +- arch/hexagon/mm/vm_fault.c | 1 + arch/ia64/kernel/asm-offsets.c | 2 +- arch/ia64/kernel/brl_emu.c | 2 +- arch/ia64/kernel/mca.c | 2 +- arch/ia64/kernel/traps.c | 2 +- arch/ia64/kernel/unaligned.c | 2 +- arch/ia64/mm/fault.c | 2 +- arch/ia64/mm/init.c | 1 + arch/mips/kernel/branch.c | 2 +- arch/mips/kernel/signal_o32.c | 1 + arch/mips/mm/mmap.c | 2 +- arch/mips/sgi-ip22/ip22-berr.c | 2 +- arch/mips/sgi-ip22/ip22-reset.c | 2 +- arch/mn10300/kernel/fpu.c | 2 ++ arch/openrisc/mm/fault.c | 2 +- arch/parisc/kernel/sys_parisc.c | 1 + arch/parisc/kernel/unaligned.c | 2 +- arch/parisc/math-emu/driver.c | 3 ++- arch/powerpc/kvm/book3s_64_vio.c | 1 + arch/powerpc/mm/mmap.c | 2 +- arch/powerpc/mm/mmu_context_iommu.c | 2 +- arch/powerpc/platforms/cell/spufs/fault.c | 2 +- arch/powerpc/xmon/xmon.c | 2 +- arch/s390/kernel/nmi.c | 3 +++ arch/s390/mm/mmap.c | 1 + arch/score/kernel/traps.c | 2 +- arch/sh/kernel/cpu/sh2a/fpu.c | 2 +- arch/sh/kernel/hw_breakpoint.c | 1 + arch/sh/kernel/traps.c | 2 ++ arch/sh/math-emu/math.c | 2 +- arch/sh/mm/asids-debugfs.c | 2 ++ arch/sh/mm/fault.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/sparc/kernel/unaligned_32.c | 2 +- arch/tile/mm/mmap.c | 2 +- arch/um/drivers/line.c | 3 ++- arch/um/kernel/reboot.c | 2 +- arch/um/kernel/skas/mmu.c | 3 ++- arch/um/kernel/tlb.c | 3 ++- arch/um/kernel/trap.c | 2 +- arch/unicore32/kernel/fpu-ucf64.c | 2 +- arch/unicore32/kernel/traps.c | 1 + arch/unicore32/mm/fault.c | 2 +- arch/x86/entry/vsyscall/vsyscall_64.c | 1 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- arch/x86/kvm/mmu.c | 1 + arch/x86/mm/mmap.c | 2 +- arch/xtensa/kernel/traps.c | 2 +- drivers/android/binder.c | 2 +- drivers/block/drbd/drbd_int.h | 2 +- drivers/char/snsc_event.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- drivers/gpu/drm/drm_lock.c | 2 ++ drivers/gpu/drm/ttm/ttm_lock.c | 2 +- drivers/infiniband/core/umem.c | 2 +- drivers/infiniband/hw/hfi1/user_pages.c | 2 +- drivers/infiniband/hw/qib/qib_user_pages.c | 1 + drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- drivers/isdn/i4l/isdn_tty.c | 1 + drivers/isdn/mISDN/l1oip_core.c | 2 ++ drivers/md/md.c | 1 + drivers/md/raid1.c | 3 +++ drivers/md/raid5.c | 2 ++ drivers/misc/genwqe/card_dev.c | 2 +- drivers/misc/mic/cosm/cosm_scif_server.c | 2 ++ drivers/misc/mic/cosm_client/cosm_scif_client.c | 2 ++ drivers/misc/mic/scif/scif_rma.c | 1 + drivers/net/slip/slip.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- drivers/parisc/power.c | 2 +- drivers/ps3/ps3-sys-manager.c | 1 + drivers/s390/char/fs3270.c | 1 + drivers/s390/char/keyboard.c | 2 +- drivers/scsi/bnx2fc/bnx2fc.h | 2 +- drivers/scsi/bnx2i/bnx2i.h | 2 +- drivers/scsi/libiscsi.c | 1 + drivers/staging/android/lowmemorykiller.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 2 +- drivers/staging/rtl8712/osdep_service.h | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 1 + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 2 +- drivers/target/iscsi/iscsi_target.c | 1 + drivers/target/iscsi/iscsi_target_erl0.c | 2 ++ drivers/target/iscsi/iscsi_target_login.c | 1 + drivers/target/iscsi/iscsi_target_nego.c | 1 + drivers/tty/pty.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/tty_io.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- drivers/tty/vt/vt.c | 2 +- drivers/tty/vt/vt_ioctl.c | 2 +- drivers/usb/atm/usbatm.c | 2 +- drivers/usb/core/devio.c | 1 + drivers/usb/gadget/function/f_mass_storage.c | 1 + drivers/vfio/vfio_iommu_spapr_tce.c | 1 + drivers/vfio/vfio_iommu_type1.c | 2 +- drivers/w1/w1_family.c | 2 +- drivers/w1/w1_int.c | 1 + fs/attr.c | 1 + fs/autofs4/waitq.c | 1 + fs/cifs/connect.c | 1 + fs/coda/upcall.c | 2 +- fs/coredump.c | 2 +- fs/exec.c | 1 + fs/file.c | 2 +- fs/fs_struct.c | 2 +- fs/jffs2/background.c | 2 +- fs/lockd/svc.c | 2 +- fs/ncpfs/inode.c | 1 + fs/ncpfs/sock.c | 1 + fs/nfs/callback.c | 1 + fs/nfsd/nfssvc.c | 2 +- fs/proc/fd.c | 2 +- fs/select.c | 4 ++-- include/linux/oom.h | 2 +- include/linux/ptrace.h | 1 + include/linux/sched/signal.h | 6 ++++++ include/linux/signalfd.h | 2 +- include/linux/taskstats_kern.h | 2 +- ipc/mqueue.c | 1 + kernel/bpf/syscall.c | 1 + kernel/cpu.c | 2 +- kernel/debug/gdbstub.c | 1 + kernel/debug/kdb/kdb_bt.c | 2 +- kernel/hung_task.c | 2 ++ kernel/rcu/update.c | 2 +- kernel/sched/sched.h | 1 + kernel/time/itimer.c | 1 + kernel/time/posix-cpu-timers.c | 2 +- kernel/time/tick-sched.c | 2 +- kernel/tracepoint.c | 2 +- kernel/tsacct.c | 2 +- kernel/user_namespace.c | 1 + lib/is_single_threaded.c | 3 +-- mm/filemap.c | 1 + mm/kmemleak.c | 2 +- mm/memory-failure.c | 2 +- mm/vmacache.c | 2 +- net/9p/client.c | 2 +- net/atm/common.c | 2 +- net/ax25/af_ax25.c | 2 +- net/caif/caif_socket.c | 2 +- net/core/stream.c | 1 + net/decnet/af_decnet.c | 2 +- net/irda/af_irda.c | 1 + net/netrom/af_netrom.c | 2 +- net/rose/af_rose.c | 2 +- net/sctp/socket.c | 1 + net/sunrpc/svc.c | 2 +- net/unix/af_unix.c | 2 +- net/x25/af_x25.c | 2 +- security/selinux/hooks.c | 2 +- 180 files changed, 204 insertions(+), 121 deletions(-) commit f7ccbae45c5e2c1077654b0e857e7efb1aa31c92 Author: Ingo Molnar Date: Wed Feb 8 18:51:30 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/binfmt_elf.c | 1 + fs/binfmt_elf_fdpic.c | 1 + fs/coredump.c | 1 + fs/exec.c | 1 + fs/proc/base.c | 1 + fs/proc/internal.h | 1 + include/linux/khugepaged.h | 3 ++- include/linux/ksm.h | 1 + include/linux/sched/coredump.h | 6 ++++++ kernel/cred.c | 1 + kernel/events/uprobes.c | 1 + kernel/fork.c | 1 + kernel/ptrace.c | 1 + kernel/sys.c | 1 + kernel/sysctl.c | 1 + mm/huge_memory.c | 1 + mm/khugepaged.c | 1 + mm/ksm.c | 1 + mm/memory.c | 1 + mm/oom_kill.c | 1 + 20 files changed, 26 insertions(+), 1 deletion(-) commit 6e84f31522f931027bf695752087ece278c10d3f Author: Ingo Molnar Date: Wed Feb 8 18:51:29 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. The APIs that are going to be moved first are: mm_alloc() __mmdrop() mmdrop() mmdrop_async_fn() mmdrop_async() mmget_not_zero() mmput() mmput_async() get_task_mm() mm_access() mm_release() Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arc/include/asm/mmu_context.h | 1 + arch/arc/kernel/troubleshoot.c | 2 ++ arch/arm/mach-rpc/ecard.c | 1 + arch/frv/mm/mmu-context.c | 1 + arch/m68k/sun3/mmu_emu.c | 1 + arch/powerpc/platforms/cell/spufs/context.c | 2 ++ drivers/android/binder.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_userptr.c | 1 + drivers/infiniband/core/umem.c | 1 + drivers/infiniband/core/umem_odp.c | 1 + drivers/infiniband/hw/hfi1/file_ops.c | 1 + drivers/infiniband/hw/mlx4/main.c | 2 ++ drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/usnic/usnic_uiom.c | 1 + drivers/iommu/amd_iommu_v2.c | 1 + drivers/iommu/intel-svm.c | 1 + drivers/lguest/lguest_user.c | 1 + drivers/misc/cxl/fault.c | 1 + drivers/misc/mic/scif/scif_rma.c | 2 ++ drivers/oprofile/buffer_sync.c | 1 + drivers/vfio/vfio_iommu_spapr_tce.c | 2 ++ drivers/vfio/vfio_iommu_type1.c | 1 + drivers/vhost/vhost.c | 1 + drivers/xen/gntdev.c | 1 + fs/exec.c | 1 + fs/proc/array.c | 1 + fs/proc/base.c | 1 + fs/proc/task_mmu.c | 1 + fs/proc/task_nommu.c | 2 ++ fs/userfaultfd.c | 1 + include/linux/sched/mm.h | 6 ++++++ kernel/cgroup/cpuset.c | 1 + kernel/events/core.c | 1 + kernel/events/uprobes.c | 1 + kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/futex.c | 1 + kernel/ptrace.c | 1 + kernel/sched/sched.h | 1 + kernel/sys.c | 1 + kernel/trace/trace_output.c | 1 + kernel/tsacct.c | 1 + mm/khugepaged.c | 1 + mm/ksm.c | 1 + mm/memcontrol.c | 1 + mm/memory.c | 1 + mm/mempolicy.c | 1 + mm/migrate.c | 1 + mm/mmu_context.c | 1 + mm/mmu_notifier.c | 1 + mm/nommu.c | 1 + mm/oom_kill.c | 1 + mm/process_vm_access.c | 1 + mm/rmap.c | 1 + mm/swapfile.c | 1 + mm/util.c | 1 + virt/kvm/async_pf.c | 1 + virt/kvm/kvm_main.c | 1 + 60 files changed, 71 insertions(+) commit 4eb5aaa3af8a54e5e9bac90e2b42bbab1f1ee5a3 Author: Ingo Molnar Date: Wed Feb 8 18:51:29 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/proc/base.c | 1 + include/linux/sched/autogroup.h | 6 ++++++ kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/sched/autogroup.h | 1 + kernel/sys.c | 1 + 6 files changed, 11 insertions(+) commit 4f17722c7256af8e17c2c4f29f170247264bdf48 Author: Ingo Molnar Date: Wed Feb 8 08:45:17 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/m68k/kernel/time.c | 1 + arch/microblaze/kernel/heartbeat.c | 1 + arch/powerpc/platforms/cell/cpufreq_spudemand.c | 1 + arch/powerpc/platforms/cell/spufs/sched.c | 1 + arch/s390/appldata/appldata_os.c | 1 + arch/sh/drivers/heartbeat.c | 1 + arch/sparc/kernel/led.c | 1 + drivers/cpuidle/governors/menu.c | 1 + drivers/leds/trigger/ledtrig-heartbeat.c | 1 + drivers/platform/x86/intel_ips.c | 1 + fs/proc/loadavg.c | 1 + include/linux/sched/loadavg.h | 6 ++++++ kernel/debug/kdb/kdb_main.c | 1 + kernel/sched/core.c | 1 + kernel/sched/loadavg.c | 1 + kernel/sys.c | 1 + kernel/time/timekeeping.c | 1 + net/sched/em_meta.c | 1 + 18 files changed, 23 insertions(+) commit ae7e81c077d60507dcec139e40a6d10cf932cf4b Author: Ingo Molnar Date: Wed Feb 1 18:07:51 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to move scheduler ABI details to , which will be used from a number of .c files. Create empty placeholder header that maps to . Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/common/bL_switcher.c | 1 + crypto/crypto_engine.c | 1 + drivers/acpi/acpi_pad.c | 1 + drivers/block/drbd/drbd_receiver.c | 1 + drivers/firmware/psci_checker.c | 1 + drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 1 + drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 + drivers/media/pci/ivtv/ivtv-driver.c | 1 + drivers/mmc/core/sdio_irq.c | 1 + drivers/spi/spi.c | 1 + drivers/staging/android/ion/ion_heap.c | 1 + drivers/thermal/intel_powerclamp.c | 1 + drivers/tty/serial/sc16is7xx.c | 1 + include/uapi/linux/sched/types.h | 6 ++++++ kernel/irq/manage.c | 1 + kernel/kthread.c | 1 + kernel/locking/locktorture.c | 1 + kernel/rcu/rcuperf.c | 1 + kernel/rcu/rcutorture.c | 1 + kernel/rcu/tree.c | 1 + kernel/rcu/tree_plugin.h | 1 + kernel/sched/core.c | 1 + kernel/sched/cpufreq_schedutil.c | 1 + kernel/trace/ring_buffer_benchmark.c | 1 + kernel/trace/trace_selftest.c | 1 + kernel/watchdog.c | 1 + 26 files changed, 31 insertions(+) commit e601757102cfd3eeae068f53b3bc1234f3a2b2e9 Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/mach-bcm/platsmp.c | 1 + arch/arm/mach-omap2/pm-debug.c | 1 + arch/arm/probes/kprobes/test-core.c | 1 + arch/cris/kernel/time.c | 2 +- arch/ia64/kernel/setup.c | 1 + arch/microblaze/kernel/timer.c | 1 + arch/mn10300/kernel/time.c | 1 + arch/parisc/kernel/setup.c | 1 + arch/parisc/kernel/time.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/s390/kernel/time.c | 1 + arch/sparc/kernel/ds.c | 1 + arch/sparc/kernel/viohs.c | 1 + arch/tile/kernel/time.c | 1 + arch/x86/events/amd/ibs.c | 1 + arch/x86/events/core.c | 1 + arch/x86/kernel/cpu/amd.c | 1 + arch/x86/kernel/cpu/centaur.c | 1 + arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/cpu/cyrix.c | 1 + arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/cpu/transmeta.c | 1 + arch/x86/kernel/kvmclock.c | 1 + arch/x86/kernel/nmi.c | 1 + arch/x86/kernel/tsc.c | 1 + block/cfq-iosched.c | 1 + drivers/acpi/apei/ghes.c | 1 + drivers/clocksource/arm_arch_timer.c | 1 + drivers/clocksource/pxa_timer.c | 1 + drivers/clocksource/timer-digicolor.c | 1 + drivers/cpuidle/cpuidle.c | 1 + drivers/firmware/tegra/bpmp.c | 1 + drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/md/bcache/bset.c | 1 + drivers/md/bcache/btree.c | 1 + drivers/md/bcache/sysfs.c | 1 + drivers/md/bcache/util.c | 1 + drivers/md/bcache/util.h | 1 + drivers/md/bcache/writeback.c | 1 + drivers/misc/cxl/native.c | 1 + drivers/net/irda/pxaficp_ir.c | 1 + drivers/perf/arm_pmu.c | 1 + drivers/vhost/net.c | 1 + include/linux/blkdev.h | 1 + include/linux/sched/clock.h | 6 ++++++ include/linux/skbuff.h | 1 + include/net/busy_poll.h | 1 + kernel/events/core.c | 1 + kernel/locking/lockdep.c | 1 + kernel/locking/qspinlock_stat.h | 1 + kernel/printk/printk.c | 1 + kernel/sched/clock.c | 1 + kernel/sched/core.c | 1 + kernel/sched/sched.h | 1 + kernel/time/sched_clock.c | 1 + kernel/time/tick-sched.c | 1 + kernel/torture.c | 1 + kernel/trace/ring_buffer.c | 1 + kernel/trace/trace_clock.c | 1 + kernel/trace/trace_hwlat.c | 1 + kernel/trace/trace_output.c | 1 + kernel/watchdog.c | 1 + lib/plist.c | 1 + net/ipv4/tcp_cdg.c | 2 ++ 65 files changed, 72 insertions(+), 1 deletion(-) commit 84f001e15737f8214b0f5f0f7dfec0fb1027938f Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched/wake_q.h | 6 ++++++ ipc/mqueue.c | 1 + ipc/msg.c | 1 + ipc/sem.c | 1 + kernel/futex.c | 1 + kernel/locking/mutex.c | 1 + kernel/locking/rtmutex.c | 1 + kernel/locking/rtmutex_common.h | 1 + kernel/locking/rwsem-xadd.c | 3 ++- kernel/sched/sched.h | 1 + 10 files changed, 16 insertions(+), 1 deletion(-) commit 4c822698cba8bdd93724117eded12bf34eb80252 Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mwait.h | 1 + arch/x86/kernel/process.c | 1 + drivers/cpuidle/driver.c | 1 + include/linux/sched/idle.h | 6 ++++++ include/linux/sched/topology.h | 2 ++ kernel/sched/idle.c | 1 + kernel/smp.c | 1 + 7 files changed, 13 insertions(+) commit 105ab3d8ce7269887d24d224054677125e18037c Author: Ingo Molnar Date: Wed Feb 1 16:36:40 2017 +0100 sched/headers: Prepare for new header dependencies before moving code to We are going to split out of , which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder file that just maps to to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/kernel/topology.c | 1 + arch/arm64/kernel/topology.c | 1 + arch/powerpc/kernel/smp.c | 1 + arch/s390/kernel/topology.c | 1 + arch/x86/kernel/smpboot.c | 1 + block/blk-mq.c | 1 + block/blk-softirq.c | 1 + include/linux/cpuset.h | 1 + include/linux/sched/topology.h | 6 ++++++ kernel/sched/fair.c | 2 ++ kernel/sched/sched.h | 1 + 11 files changed, 17 insertions(+) commit af8601ad420f6afa6445c927ad9f36d9700d96d6 Author: Ingo Molnar Date: Fri Feb 3 09:57:00 2017 +0100 kasan, sched/headers: Uninline kasan_enable/disable_current() is a low level header that is included early in affected kernel headers. But it includes which complicates the cleanup of sched.h dependencies. But kasan.h has almost no need for sched.h: its only use of scheduler functionality is in two inline functions which are not used very frequently - so uninline kasan_enable_current() and kasan_disable_current(). Also add a dependency to a .c file that depended on kasan.h including it. This paves the way to remove the include from kasan.h. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/kasan.h | 10 ++-------- lib/sbitmap.c | 1 + mm/kasan/kasan.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) commit 314ff7851fc8ea66cbf48eaa93d8ebfb5ca084a9 Author: Ingo Molnar Date: Fri Feb 3 11:03:31 2017 +0100 mm/vmacache, sched/headers: Introduce 'struct vmacache' and move it from to The header includes various vmacache related defines, which are arguably misplaced. Move them to mm_types.h and minimize the sched.h impact by putting all task vmacache state into a new 'struct vmacache' structure. No change in functionality. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/mm_types.h | 12 ++++++++++++ include/linux/sched.h | 11 ++++------- include/linux/vmacache.h | 2 +- kernel/debug/debug_core.c | 4 ++-- mm/nommu.c | 2 +- mm/vmacache.c | 10 +++++----- 6 files changed, 25 insertions(+), 16 deletions(-) commit 780de9dd2720debc14c501dab4dc80d1f75ad50e Author: Ingo Molnar Date: Thu Feb 2 11:50:56 2017 +0100 sched/headers, cgroups: Remove the threadgroup_change_*() wrappery threadgroup_change_begin()/end() is a pointless wrapper around cgroup_threadgroup_change_begin()/end(), minus a might_sleep() in the !CONFIG_CGROUPS=y case. Remove the wrappery, move the might_sleep() (the down_read() already has a might_sleep() check). This debloats a bit and simplifies this API. Update all call sites. No change in functionality. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/exec.c | 6 +++--- include/linux/cgroup-defs.h | 13 ++++++++----- include/linux/sched.h | 28 ---------------------------- kernel/cgroup/pids.c | 2 +- kernel/fork.c | 6 +++--- kernel/signal.c | 6 +++--- 6 files changed, 18 insertions(+), 43 deletions(-) commit f9411ebe3d85cbbea06298241e6053d031d281fc Author: Ingo Molnar Date: Mon Feb 6 09:50:49 2017 +0100 rcu: Separate the RCU synchronization types and APIs into So rcupdate.h is a pretty complex header, in particular it includes which includes - creating a dependency that includes in , which prevents the isolation of from the derived header. Solve part of the problem by decoupling rcupdate.h from completions: this can be done by separating out the rcu_synchronize types and APIs, and updating their usage sites. Since this is a mostly RCU-internal types this will not just simplify 's dependencies, but will make all the hundreds of .c files that include rcupdate.h but not completions or wait.h build faster. ( For rcutiny this means that two dependent APIs have to be uninlined, but that shouldn't be much of a problem as they are rare variants. ) Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/autofs4/autofs_i.h | 1 + include/linux/dcache.h | 1 + include/linux/rcupdate.h | 40 ---------------------------------- include/linux/rcupdate_wait.h | 50 +++++++++++++++++++++++++++++++++++++++++++ include/linux/rcutiny.h | 11 ++-------- kernel/rcu/srcu.c | 2 +- kernel/rcu/tiny.c | 14 +++++++++++- kernel/rcu/tree.c | 2 +- kernel/rcu/update.c | 1 + kernel/sched/core.c | 1 + 10 files changed, 71 insertions(+), 52 deletions(-) commit 4b53a3412d6663214ce9c754eff9373a9cff9dee Author: Ingo Molnar Date: Sun Feb 5 15:41:03 2017 +0100 sched/core: Remove the tsk_nr_cpus_allowed() wrapper tsk_nr_cpus_allowed() too is a pretty pointless wrapper that is not used consistently and which makes the code both harder to read and longer as well. So remove it - this also shrinks a bit. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 5 ----- kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 28 ++++++++++++++-------------- kernel/sched/rt.c | 24 ++++++++++++------------ 4 files changed, 27 insertions(+), 32 deletions(-) commit 0c98d344fe5c27f6e4bce42ac503e9e9a51c7d1d Author: Ingo Molnar Date: Sun Feb 5 15:38:10 2017 +0100 sched/core: Remove the tsk_cpus_allowed() wrapper So the original intention of tsk_cpus_allowed() was to 'future-proof' the field - but it's pretty ineffectual at that, because half of the code uses ->cpus_allowed directly ... Also, the wrapper makes the code longer than the original expression! So just get rid of it. This also shrinks a bit. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/powerpc/kernel/smp.c | 2 +- arch/powerpc/platforms/cell/spufs/sched.c | 2 +- arch/sparc/kernel/sysfs.c | 2 +- drivers/cpufreq/sparc-us2e-cpufreq.c | 4 ++-- drivers/cpufreq/sparc-us3-cpufreq.c | 4 ++-- drivers/infiniband/hw/hfi1/affinity.c | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 2 +- include/linux/sched.h | 3 --- kernel/sched/core.c | 20 ++++++++++---------- kernel/sched/cpudeadline.c | 4 ++-- kernel/sched/cpupri.c | 4 ++-- kernel/sched/deadline.c | 7 +++---- kernel/sched/fair.c | 25 ++++++++++++------------- kernel/sched/rt.c | 5 ++--- lib/smp_processor_id.c | 2 +- samples/trace_events/trace-events-sample.c | 2 +- 16 files changed, 42 insertions(+), 48 deletions(-) commit 59ddbcb2f45b958cf1f11f122b666cbcf50cd57b Author: Ingo Molnar Date: Fri Feb 3 23:37:48 2017 +0100 sched/core: Move the get_preempt_disable_ip() inline to sched/core.c It's defined in , but nothing outside the scheduler uses it - so move it to the sched/core.c usage site. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 9 --------- kernel/sched/core.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit c930b2c0de32f45ce8f67affe936ce7a05b07b00 Author: Ingo Molnar Date: Fri Feb 3 12:22:54 2017 +0100 sched/core: Convert ___assert_task_state() link time assert to BUILD_BUG_ON() The length of TASK_STATE_TO_CHAR_STR was still checked using the old link-time manual error method - convert it to BUILD_BUG_ON(). This has a couple of advantages: - it's more obvious what's going on - it reduces the size and complexity of - BUILD_BUG_ON() will fail during compilation, with a clearer error message than the link time assert. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 3 --- kernel/sched/core.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 9ccd27cc2e8bfbec502d7c64a353dc4489536b81 Author: Ingo Molnar Date: Fri Feb 3 21:11:09 2017 +0100 sched/headers: Make all include/linux/sched/*.h headers build standalone Make each header self-sufficient, so that it can be built successfully both in an allnoconfig and allyesconfig kernel. Also standardize the naming of their header guards. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/deadline.h | 8 +++++--- include/linux/sched/prio.h | 6 +++--- include/linux/sched/rt.h | 10 ++++++---- include/linux/sched/sysctl.h | 10 +++++++--- 4 files changed, 21 insertions(+), 13 deletions(-) commit eb1e011a14748a1d9df9a7d7df9a5711721a1bdb Author: Johannes Berg Date: Wed Feb 15 09:49:26 2017 +0100 average: change to declare precision, not factor Declaring the factor is counter-intuitive, and people are prone to using small(-ish) values even when that makes no sense. Change the DECLARE_EWMA() macro to take the fractional precision, in bits, rather than a factor, and update all users. While at it, add some more documentation. Acked-by: David S. Miller Signed-off-by: Johannes Berg drivers/net/virtio_net.c | 2 +- drivers/net/wireless/ath/ath5k/ath5k.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 +- include/linux/average.h | 61 +++++++++++++++++++---------- net/batman-adv/types.h | 2 +- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/sta_info.h | 2 +- 7 files changed, 47 insertions(+), 26 deletions(-) commit 4ec3dd89052a437304e1451733c989b8cec681af Author: Zhao Yan Date: Thu Mar 2 15:12:47 2017 +0800 drm/i915/gvt: fix an error for F_RO flag the ro_mask is not stored into each mmio entry Fixes: 12d14cc43b34 ("drm/i915/gvt: Introduce a framework for tracking HW registers.") Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 1 + 1 file changed, 1 insertion(+) commit d1eb98143c56f24fef125f5bbed49ae0b52fb7d6 Author: Ard Biesheuvel Date: Wed Mar 1 19:05:54 2017 +0000 efi/arm: Fix boot crash with CONFIG_CPUMASK_OFFSTACK=y On ARM and arm64, we use a dedicated mm_struct to map the UEFI Runtime Services regions, which allows us to map those regions on demand, and in a way that is guaranteed to be compatible with incoming kernels across kexec. As it turns out, we don't fully initialize the mm_struct in the same way as process mm_structs are initialized on fork(), which results in the following crash on ARM if CONFIG_CPUMASK_OFFSTACK=y is enabled: ... EFI Variables Facility v0.08 2004-May-17 Unable to handle kernel NULL pointer dereference at virtual address 00000000 [...] Process swapper/0 (pid: 1) ... __memzero() check_and_switch_context() virt_efi_get_next_variable() efivar_init() efivars_sysfs_init() do_one_initcall() ... This is due to a missing call to mm_init_cpumask(), so add it. Signed-off-by: Ard Biesheuvel Cc: # v4.5+ Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1488395154-29786-1-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/arm-runtime.c | 1 + 1 file changed, 1 insertion(+) commit 52e51f16407b7b34e26affb500a21e250d9fce0b Author: Ard Biesheuvel Date: Wed Mar 1 19:04:35 2017 +0000 efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled The newly refactored code that infers the firmware's Secure Boot state prints the following error when the EFI variable 'SecureBoot' does not exist: EFI stub: ERROR: Could not determine UEFI Secure Boot status. However, this variable is only guaranteed to be defined on a system that is Secure Boot capable to begin with, and so it is not an error if it is missing. So report Secure Boot as being disabled in this case, without printing any error messages. 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/1488395076-29712-2-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/secureboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d020d33fc1b2faa0eb35859df1381ca5dc94ffe Merge: 6b0b755 4977ab6 Author: Ingo Molnar Date: Thu Mar 2 08:05:45 2017 +0100 Merge branch 'linus' into perf/urgent, to resolve conflict Conflicts: arch/powerpc/configs/85xx/kmp204x_defconfig Signed-off-by: Ingo Molnar commit 48cac18ecf1de82f76259a54402c3adb7839ad01 Author: Eric Dumazet Date: Wed Mar 1 14:45:06 2017 -0800 ipv6: orphan skbs in reassembly unit Andrey reported a use-after-free in IPv6 stack. Issue here is that we free the socket while it still has skb in TX path and in some queues. It happens here because IPv6 reassembly unit messes skb->truesize, breaking skb_set_owner_w() badly. We fixed a similar issue for IPV4 in commit 8282f27449bf ("inet: frag: Always orphan skbs inside ip_defrag()") Acked-by: Joe Stringer ================================================================== BUG: KASAN: use-after-free in sock_wfree+0x118/0x120 Read of size 8 at addr ffff880062da0060 by task a.out/4140 page:ffffea00018b6800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x100000000008100(slab|head) raw: 0100000000008100 0000000000000000 0000000000000000 0000000180130013 raw: dead000000000100 dead000000000200 ffff88006741f140 0000000000000000 page dumped because: kasan: bad access detected CPU: 0 PID: 4140 Comm: a.out Not tainted 4.10.0-rc3+ #59 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 dump_stack+0x292/0x398 lib/dump_stack.c:51 describe_address mm/kasan/report.c:262 kasan_report_error+0x121/0x560 mm/kasan/report.c:370 kasan_report mm/kasan/report.c:392 __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:413 sock_flag ./arch/x86/include/asm/bitops.h:324 sock_wfree+0x118/0x120 net/core/sock.c:1631 skb_release_head_state+0xfc/0x250 net/core/skbuff.c:655 skb_release_all+0x15/0x60 net/core/skbuff.c:668 __kfree_skb+0x15/0x20 net/core/skbuff.c:684 kfree_skb+0x16e/0x4e0 net/core/skbuff.c:705 inet_frag_destroy+0x121/0x290 net/ipv4/inet_fragment.c:304 inet_frag_put ./include/net/inet_frag.h:133 nf_ct_frag6_gather+0x1125/0x38b0 net/ipv6/netfilter/nf_conntrack_reasm.c:617 ipv6_defrag+0x21b/0x350 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:68 nf_hook_entry_hookfn ./include/linux/netfilter.h:102 nf_hook_slow+0xc3/0x290 net/netfilter/core.c:310 nf_hook ./include/linux/netfilter.h:212 __ip6_local_out+0x52c/0xaf0 net/ipv6/output_core.c:160 ip6_local_out+0x2d/0x170 net/ipv6/output_core.c:170 ip6_send_skb+0xa1/0x340 net/ipv6/ip6_output.c:1722 ip6_push_pending_frames+0xb3/0xe0 net/ipv6/ip6_output.c:1742 rawv6_push_pending_frames net/ipv6/raw.c:613 rawv6_sendmsg+0x2cff/0x4130 net/ipv6/raw.c:927 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:744 sock_sendmsg_nosec net/socket.c:635 sock_sendmsg+0xca/0x110 net/socket.c:645 sock_write_iter+0x326/0x620 net/socket.c:848 new_sync_write fs/read_write.c:499 __vfs_write+0x483/0x760 fs/read_write.c:512 vfs_write+0x187/0x530 fs/read_write.c:560 SYSC_write fs/read_write.c:607 SyS_write+0xfb/0x230 fs/read_write.c:599 entry_SYSCALL_64_fastpath+0x1f/0xc2 arch/x86/entry/entry_64.S:203 RIP: 0033:0x7ff26e6f5b79 RSP: 002b:00007ff268e0ed98 EFLAGS: 00000206 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff268e0f9c0 RCX: 00007ff26e6f5b79 RDX: 0000000000000010 RSI: 0000000020f50fe1 RDI: 0000000000000003 RBP: 00007ff26ebc1220 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ff268e0f9c0 R14: 00007ff26efec040 R15: 0000000000000003 The buggy address belongs to the object at ffff880062da0000 which belongs to the cache RAWv6 of size 1504 The buggy address ffff880062da0060 is located 96 bytes inside of 1504-byte region [ffff880062da0000, ffff880062da05e0) Freed by task 4113: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:502 set_track mm/kasan/kasan.c:514 kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:578 slab_free_hook mm/slub.c:1352 slab_free_freelist_hook mm/slub.c:1374 slab_free mm/slub.c:2951 kmem_cache_free+0xb2/0x2c0 mm/slub.c:2973 sk_prot_free net/core/sock.c:1377 __sk_destruct+0x49c/0x6e0 net/core/sock.c:1452 sk_destruct+0x47/0x80 net/core/sock.c:1460 __sk_free+0x57/0x230 net/core/sock.c:1468 sk_free+0x23/0x30 net/core/sock.c:1479 sock_put ./include/net/sock.h:1638 sk_common_release+0x31e/0x4e0 net/core/sock.c:2782 rawv6_close+0x54/0x80 net/ipv6/raw.c:1214 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:425 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:431 sock_release+0x8d/0x1e0 net/socket.c:599 sock_close+0x16/0x20 net/socket.c:1063 __fput+0x332/0x7f0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x19b/0x270 kernel/task_work.c:116 exit_task_work ./include/linux/task_work.h:21 do_exit+0x186b/0x2800 kernel/exit.c:839 do_group_exit+0x149/0x420 kernel/exit.c:943 SYSC_exit_group kernel/exit.c:954 SyS_exit_group+0x1d/0x20 kernel/exit.c:952 entry_SYSCALL_64_fastpath+0x1f/0xc2 arch/x86/entry/entry_64.S:203 Allocated by task 4115: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:502 set_track mm/kasan/kasan.c:514 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:605 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:544 slab_post_alloc_hook mm/slab.h:432 slab_alloc_node mm/slub.c:2708 slab_alloc mm/slub.c:2716 kmem_cache_alloc+0x1af/0x250 mm/slub.c:2721 sk_prot_alloc+0x65/0x2a0 net/core/sock.c:1334 sk_alloc+0x105/0x1010 net/core/sock.c:1396 inet6_create+0x44d/0x1150 net/ipv6/af_inet6.c:183 __sock_create+0x4f6/0x880 net/socket.c:1199 sock_create net/socket.c:1239 SYSC_socket net/socket.c:1269 SyS_socket+0xf9/0x230 net/socket.c:1249 entry_SYSCALL_64_fastpath+0x1f/0xc2 arch/x86/entry/entry_64.S:203 Memory state around the buggy address: ffff880062d9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880062d9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff880062da0000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff880062da0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880062da0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Reported-by: Andrey Konovalov Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/netfilter/nf_conntrack_reasm.c | 1 + net/openvswitch/conntrack.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 13baa00ad01bb3a9f893e3a08cbc2d072fc0c15d Author: Eric Dumazet Date: Wed Mar 1 14:28:39 2017 -0800 net: net_enable_timestamp() can be called from irq contexts It is now very clear that silly TCP listeners might play with enabling/disabling timestamping while new children are added to their accept queue. Meaning net_enable_timestamp() can be called from BH context while current state of the static key is not enabled. Lets play safe and allow all contexts. The work queue is scheduled only under the problematic cases, which are the static key enable/disable transition, to not slow down critical paths. This extends and improves what we did in commit 5fa8bbda38c6 ("net: use a work queue to defer net_disable_timestamp() work") Fixes: b90e5794c5bd ("net: dont call jump_label_dec from irq context") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/core/dev.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 540e2894f7905538740aaf122bd8e0548e1c34a4 Author: Alexander Potapenko Date: Wed Mar 1 12:57:20 2017 +0100 net: don't call strlen() on the user buffer in packet_bind_spkt() KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of uninitialized memory in packet_bind_spkt(): Acked-by: Eric Dumazet ================================================================== BUG: KMSAN: use of unitialized memory CPU: 0 PID: 1074 Comm: packet Not tainted 4.8.0-rc6+ #1891 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 0000000000000000 ffff88006b6dfc08 ffffffff82559ae8 ffff88006b6dfb48 ffffffff818a7c91 ffffffff85b9c870 0000000000000092 ffffffff85b9c550 0000000000000000 0000000000000092 00000000ec400911 0000000000000002 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x238/0x290 lib/dump_stack.c:51 [] kmsan_report+0x276/0x2e0 mm/kmsan/kmsan.c:1003 [] __msan_warning+0x5b/0xb0 mm/kmsan/kmsan_instr.c:424 [< inline >] strlen lib/string.c:484 [] strlcpy+0x9d/0x200 lib/string.c:144 [] packet_bind_spkt+0x144/0x230 net/packet/af_packet.c:3132 [] SYSC_bind+0x40d/0x5f0 net/socket.c:1370 [] SyS_bind+0x82/0xa0 net/socket.c:1356 [] entry_SYSCALL_64_fastpath+0x13/0x8f arch/x86/entry/entry_64.o:? chained origin: 00000000eba00911 [] save_stack_trace+0x27/0x50 arch/x86/kernel/stacktrace.c:67 [< inline >] kmsan_save_stack_with_flags mm/kmsan/kmsan.c:322 [< inline >] kmsan_save_stack mm/kmsan/kmsan.c:334 [] kmsan_internal_chain_origin+0x118/0x1e0 mm/kmsan/kmsan.c:527 [] __msan_set_alloca_origin4+0xc3/0x130 mm/kmsan/kmsan_instr.c:380 [] SYSC_bind+0x129/0x5f0 net/socket.c:1356 [] SyS_bind+0x82/0xa0 net/socket.c:1356 [] entry_SYSCALL_64_fastpath+0x13/0x8f arch/x86/entry/entry_64.o:? origin description: ----address@SYSC_bind (origin=00000000eb400911) ================================================================== (the line numbers are relative to 4.8-rc6, but the bug persists upstream) , when I run the following program as root: ===================================== #include #include #include #include int main() { struct sockaddr addr; memset(&addr, 0xff, sizeof(addr)); addr.sa_family = AF_PACKET; int fd = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ALL)); bind(fd, &addr, sizeof(addr)); return 0; } ===================================== This happens because addr.sa_data copied from the userspace is not zero-terminated, and copying it with strlcpy() in packet_bind_spkt() results in calling strlen() on the kernel copy of that non-terminated buffer. Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/packet/af_packet.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8953de2f02ad7b15e4964c82f9afd60f128e4e98 Author: Mike Manning Date: Wed Mar 1 09:55:28 2017 +0000 net: bridge: allow IPv6 when multicast flood is disabled Even with multicast flooding turned off, IPv6 ND should still work so that IPv6 connectivity is provided. Allow this by continuing to flood multicast traffic originated by us. Fixes: b6cb5ac8331b ("net: bridge: add per-port multicast flood flag") Cc: Nikolay Aleksandrov Signed-off-by: Mike Manning Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_forward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9043cc5b99e9c93596a28647fd9f526f5bfa22c Author: Aurelien Aptel Date: Mon Feb 13 16:19:04 2017 +0100 CIFS: set signing flag in SMB2+ TreeConnect if needed cifs_enable_signing() already sets server->sign according to what the server requires/offers and what mount options allows/forbids, so use that. this is required for IPC tcon that connects to signing-required servers. Signed-off-by: Aurelien Aptel Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f9f6d2ec51449a20bc35359c9e190bf861b57e1 Author: Aurelien Aptel Date: Tue Feb 28 15:26:30 2017 +0100 CIFS: let ses->ipc_tid hold smb2 TreeIds the TreeId field went from 2 bytes in CIFS to 4 bytes in SMB2+. this commit updates the size of the ipc_tid field of a cifs_ses, which was still using 2 bytes. Signed-off-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51146625f34b348c15d55c378b5ae5c2fb963fc8 Author: Aurelien Aptel Date: Tue Feb 28 15:08:41 2017 +0100 CIFS: add use_ipc flag to SMB2_ioctl() when set, use the session IPC tree id instead of the tid in the provided tcon. Signed-off-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2file.c | 3 ++- fs/cifs/smb2ops.c | 23 ++++++++++++++++------- fs/cifs/smb2pdu.c | 17 +++++++++++++++-- fs/cifs/smb2proto.h | 3 ++- 4 files changed, 35 insertions(+), 11 deletions(-) commit 268a635d414df45a4a8da699d431da8f8ffcf014 Author: Aurelien Aptel Date: Mon Feb 13 16:14:17 2017 +0100 CIFS: add build_path_from_dentry_optional_prefix() this function does the same thing as add build_path_from_dentry() but takes a boolean parameter to decide whether or not to prefix the path with the tree name. we cannot rely on tcon->Flags & SMB_SHARE_IS_IN_DFS for SMB2 as smb2 code never sets tcon->Flags but it sets tcon->share_flags and it seems the SMB_SHARE_IS_IN_DFS has different semantics in SMB2: the prefix shouldn't be added everytime it was in SMB1. Signed-off-by: Aurelien Aptel Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifs_dfs_ref.c | 4 +++- fs/cifs/cifsproto.h | 2 ++ fs/cifs/dir.c | 13 ++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) commit 4ecce920e13ace16a5ba45efe8909946c28fb2ad Author: Aurelien Aptel Date: Mon Feb 13 16:03:47 2017 +0100 CIFS: move DFS response parsing out of SMB1 code since the DFS payload is not tied to the SMB version we can: * isolate the DFS payload in its own struct, and include that struct in packet structs * move the function that parses the response to misc.c and make it work on the new DFS payload struct (add payload size and utf16 flag as a result). Signed-off-by: Aurelien Aptel Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifspdu.h | 16 ++++--- fs/cifs/cifsproto.h | 5 +++ fs/cifs/cifssmb.c | 119 +++------------------------------------------------- fs/cifs/misc.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 120 deletions(-) commit 8893cf6cb1cf56334c05120e23092dbfc9423ebb Author: Bart Van Assche Date: Wed Mar 1 09:00:36 2017 -0800 scsi: mpt3sas: Avoid sleeping in interrupt context Commit 669f044170d8 ("scsi: srp_transport: Move queuecommand() wait code to SCSI core") can make scsi_internal_device_block() sleep. However, the mpt3sas driver can call this function from an interrupt handler. Hence add a second argument to scsi_internal_device_block() that restores the old behavior of this function for the mpt3sas handler. The call chain that triggered an "IRQ handler enabled interrupts" complaint is as follows: _base_interrupt() -> _base_async_event() -> mpt3sas_scsih_event_callback() -> _scsih_check_topo_delete_events() -> _scsih_block_io_to_children_attached_directly() -> _scsih_block_io_device() -> _scsih_internal_device_block() -> scsi_internal_device_block() Reported-by: Omar Sandoval Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Sathya Prakash Cc: Chaitra P B Cc: Suganath Prabu Subramani Cc: Sreekanth Reddy Cc: # v4.10+ Tested-by: Omar Sandoval Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 3 --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- drivers/scsi/scsi_lib.c | 14 ++++++++++---- drivers/scsi/scsi_priv.h | 3 --- include/scsi/scsi_device.h | 4 ++++ 5 files changed, 16 insertions(+), 12 deletions(-) commit c46f09175dabd5dd6a1507f36250bfa734a0156e Author: Damien Le Moal Date: Wed Mar 1 17:27:00 2017 +0900 scsi: sd: Check for unaligned partial completion Commit ("mpt3sas: Force request partial completion alignment") was not considering the case of commands not operating on logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned partial replies). In this case, forcing alignment of resid to the device logical block size can break the command result, e.g. in the case of REQ_OP_ZONE_REPORT, the exact number of zone reported by the device. Move the partial completion alignement check of mpt3sas to a generic implementation in sd_done(). The check is added within the default section of the initial req_op() switch case so that the report and reset zone commands are ignored. In addition, as sd_done() is not called for passthrough requests, resid corrections are not done as intended by the initial mpt3sas patch. Fixes: f2e767bb5d6e ("mpt3sas: Force request partial completion alignment") Cc: # v4.10 Signed-off-by: Damien Le Moal Acked-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 --------------- drivers/scsi/sd.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) commit a4b0e8a4e92b1baa860e744847fbdb84a50a5071 Author: Potomski, MichalX Date: Thu Feb 23 09:05:30 2017 +0000 scsi: ufs: Factor out ufshcd_read_desc_param Since in UFS 2.1 specification some of the descriptor lengths differs from 2.0 specification and some devices, which are reporting spec version 2.0 have different descriptor lengths we can not rely on hardcoded values taken from 2.0 specification. This patch introduces reading these lengths per each device from descriptor headers at probe time to ensure their correctness. Signed-off-by: Michal' Potomski Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 22 ++--- drivers/scsi/ufs/ufshcd.c | 231 ++++++++++++++++++++++++++++++++++------------ drivers/scsi/ufs/ufshcd.h | 15 +++ 3 files changed, 196 insertions(+), 72 deletions(-) commit 4977ab6e92e267afe9d8f78438c3db330ca8434c Merge: 8f03cf5 e390f9a Author: Linus Torvalds Date: Wed Mar 1 17:04:50 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool relocation fixes from Ingo Molnar: "Two fixes related to the module loading regression introduced by the recent objtool changes" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool, modules: Discard objtool annotation sections for modules objtool, compiler.h: Fix __unreachable section relocation size commit 8f03cf50bc9443e92d6e54ac4d599357d6cb7cbb Merge: 25c4e6c ed92d8c Author: Linus Torvalds Date: Wed Mar 1 16:10:30 2017 -0800 Merge tag 'nfs-for-4.11-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Highlights include: Stable bugfixes: - NFSv4: Fix memory and state leak in _nfs4_open_and_get_state - xprtrdma: Fix Read chunk padding - xprtrdma: Per-connection pad optimization - xprtrdma: Disable pad optimization by default - xprtrdma: Reduce required number of send SGEs - nlm: Ensure callback code also checks that the files match - pNFS/flexfiles: If the layout is invalid, it must be updated before retrying - NFSv4: Fix reboot recovery in copy offload - Revert "NFSv4.1: Handle NFS4ERR_BADSESSION/NFS4ERR_DEADSESSION replies to OP_SEQUENCE" - NFSv4: fix getacl head length estimation - NFSv4: fix getacl ERANGE for sum ACL buffer sizes Features: - Add and use dprintk_cont macros - Various cleanups to NFS v4.x to reduce code duplication and complexity - Remove unused cr_magic related code - Improvements to sunrpc "read from buffer" code - Clean up sunrpc timeout code and allow changing TCP timeout parameters - Remove duplicate mw_list management code in xprtrdma - Add generic functions for encoding and decoding xdr streams Bugfixes: - Clean up nfs_show_mountd_netid - Make layoutreturn_ops static and use NULL instead of 0 to fix sparse warnings - Properly handle -ERESTARTSYS in nfs_rename() - Check if register_shrinker() failed during rpcauth_init() - Properly clean up procfs/pipefs entries - Various NFS over RDMA related fixes - Silence unititialized variable warning in sunrpc" * tag 'nfs-for-4.11-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (64 commits) NFSv4: fix getacl ERANGE for some ACL buffer sizes NFSv4: fix getacl head length estimation Revert "NFSv4.1: Handle NFS4ERR_BADSESSION/NFS4ERR_DEADSESSION replies to OP_SEQUENCE" NFSv4: Fix reboot recovery in copy offload pNFS/flexfiles: If the layout is invalid, it must be updated before retrying NFSv4: Clean up owner/group attribute decode SUNRPC: Add a helper function xdr_stream_decode_string_dup() NFSv4: Remove bogus "struct nfs_client" argument from decode_ace() NFSv4: Fix the underestimation of delegation XDR space reservation NFSv4: Replace callback string decode function with a generic NFSv4: Replace the open coded decode_opaque_inline() with the new generic NFSv4: Replace ad-hoc xdr encode/decode helpers with xdr_stream_* generics SUNRPC: Add generic helpers for xdr_stream encode/decode sunrpc: silence uninitialized variable warning nlm: Ensure callback code also checks that the files match sunrpc: Allow xprt->ops->timer method to sleep xprtrdma: Refactor management of mw_list field xprtrdma: Handle stale connection rejection xprtrdma: Properly recover FRWRs with in-flight FASTREG WRs xprtrdma: Shrink send SGEs array ... commit 25c4e6c3f0c14d1575aa488ff4ca47e045ae51a0 Merge: 6053dc9 900f736 Author: Linus Torvalds Date: Wed Mar 1 15:55:04 2017 -0800 Merge tag 'for-f2fs-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "This round introduces several interesting features such as on-disk NAT bitmaps, IO alignment, and a discard thread. And it includes a couple of major bug fixes as below. Enhancements: - introduce on-disk bitmaps to avoid scanning NAT blocks when getting free nids - support IO alignment to prepare open-channel SSD integration in future - introduce a discard thread to avoid long latency during checkpoint and fstrim - use SSR for warm node and enable inline_xattr by default - introduce in-memory bitmaps to check FS consistency for debugging - improve write_begin by avoiding needless read IO Bug fixes: - fix broken zone_reset behavior for SMR drive - fix wrong victim selection policy during GC - fix missing behavior when preparing discard commands - fix bugs in atomic write support and fiemap - workaround to handle multiple f2fs_add_link calls having same name ... and it includes a bunch of clean-up patches as well" * tag 'for-f2fs-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (97 commits) f2fs: avoid to flush nat journal entries f2fs: avoid to issue redundant discard commands f2fs: fix a plint compile warning f2fs: add f2fs_drop_inode tracepoint f2fs: Fix zoned block device support f2fs: remove redundant set_page_dirty() f2fs: fix to enlarge size of write_io_dummy mempool f2fs: fix memory leak of write_io_dummy mempool during umount f2fs: fix to update F2FS_{CP_}WB_DATA count correctly f2fs: use MAX_FREE_NIDS for the free nids target f2fs: introduce free nid bitmap f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpoint f2fs: update the comment of default nr_pages to skipping f2fs: drop the duplicate pval in f2fs_getxattr f2fs: Don't update the xattr data that same as the exist f2fs: kill __is_extent_same f2fs: avoid bggc->fggc when enough free segments are avaliable after cp f2fs: select target segment with closer temperature in SSR mode f2fs: show simple call stack in fault injection message f2fs: no need lock_op in f2fs_write_inline_data ... commit c4baad50297d84bde1a7ad45e50c73adae4a2192 Author: Omar Sandoval Date: Wed Feb 1 00:02:27 2017 -0800 virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval Signed-off-by: Michael S. Tsirkin Reviewed-by: Amit Shah drivers/char/virtio_console.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f889491380582b4ba2981cf0b0d7d6a40fb30ab7 Author: Jason Wang Date: Tue Feb 28 17:56:02 2017 +0800 vhost: introduce O(1) vq metadata cache When device IOTLB is enabled, all address translations were stored in interval tree. O(lgN) searching time could be slow for virtqueue metadata (avail, used and descriptors) since they were accessed much often than other addresses. So this patch introduces an O(1) array which points to the interval tree nodes that store the translations of vq metadata. Those array were update during vq IOTLB prefetching and were reset during each invalidation and tlb update. Each time we want to access vq metadata, this small array were queried before interval tree. This would be sufficient for static mappings but not dynamic mappings, we could do optimizations on top. Test were done with l2fwd in guest (2M hugepage): noiommu | before | after tx 1.32Mpps | 1.06Mpps(82%) | 1.30Mpps(98%) rx 2.33Mpps | 1.46Mpps(63%) | 2.29Mpps(98%) We can almost reach the same performance as noiommu mode. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 136 ++++++++++++++++++++++++++++++++++++++++---------- drivers/vhost/vhost.h | 8 +++ 2 files changed, 118 insertions(+), 26 deletions(-) commit 2651225b5ebcdde60f684c4db8ec7e9e3800a74f Author: Stephen Smalley Date: Tue Feb 28 10:35:56 2017 -0500 selinux: wrap cgroup seclabel support with its own policy capability commit 1ea0ce40690dff38935538e8dab7b12683ded0d3 ("selinux: allow changing labels for cgroupfs") broke the Android init program, which looks up security contexts whenever creating directories and attempts to assign them via setfscreatecon(). When creating subdirectories in cgroup mounts, this would previously be ignored since cgroup did not support userspace setting of security contexts. However, after the commit, SELinux would attempt to honor the requested context on cgroup directories and fail due to permission denial. Avoid breaking existing userspace/policy by wrapping this change with a conditional on a new cgroup_seclabel policy capability. This preserves existing behavior until/unless a new policy explicitly enables this capability. Reported-by: John Stultz Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore Signed-off-by: James Morris security/selinux/hooks.c | 7 ++++--- security/selinux/include/security.h | 2 ++ security/selinux/selinuxfs.c | 3 ++- security/selinux/ss/services.c | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) commit 0837e49ab3fa8d903a499984575d71efee8097ce Author: David Howells Date: Wed Mar 1 15:11:23 2017 +0000 KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload() rcu_dereference_key() and user_key_payload() are currently being used in two different, incompatible ways: (1) As a wrapper to rcu_dereference() - when only the RCU read lock used to protect the key. (2) As a wrapper to rcu_dereference_protected() - when the key semaphor is used to protect the key and the may be being modified. Fix this by splitting both of the key wrappers to produce: (1) RCU accessors for keys when caller has the key semaphore locked: dereference_key_locked() user_key_payload_locked() (2) RCU accessors for keys when caller holds the RCU read lock: dereference_key_rcu() user_key_payload_rcu() This should fix following warning in the NFS idmapper =============================== [ INFO: suspicious RCU usage. ] 4.10.0 #1 Tainted: G W ------------------------------- ./include/keys/user-type.h:53 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 0 1 lock held by mount.nfs/5987: #0: (rcu_read_lock){......}, at: [] nfs_idmap_get_key+0x15c/0x420 [nfsv4] stack backtrace: CPU: 1 PID: 5987 Comm: mount.nfs Tainted: G W 4.10.0 #1 Call Trace: dump_stack+0xe8/0x154 (unreliable) lockdep_rcu_suspicious+0x140/0x190 nfs_idmap_get_key+0x380/0x420 [nfsv4] nfs_map_name_to_uid+0x2a0/0x3b0 [nfsv4] decode_getfattr_attrs+0xfac/0x16b0 [nfsv4] decode_getfattr_generic.constprop.106+0xbc/0x150 [nfsv4] nfs4_xdr_dec_lookup_root+0xac/0xb0 [nfsv4] rpcauth_unwrap_resp+0xe8/0x140 [sunrpc] call_decode+0x29c/0x910 [sunrpc] __rpc_execute+0x140/0x8f0 [sunrpc] rpc_run_task+0x170/0x200 [sunrpc] nfs4_call_sync_sequence+0x68/0xa0 [nfsv4] _nfs4_lookup_root.isra.44+0xd0/0xf0 [nfsv4] nfs4_lookup_root+0xe0/0x350 [nfsv4] nfs4_lookup_root_sec+0x70/0xa0 [nfsv4] nfs4_find_root_sec+0xc4/0x100 [nfsv4] nfs4_proc_get_rootfh+0x5c/0xf0 [nfsv4] nfs4_get_rootfh+0x6c/0x190 [nfsv4] nfs4_server_common_setup+0xc4/0x260 [nfsv4] nfs4_create_server+0x278/0x3c0 [nfsv4] nfs4_remote_mount+0x50/0xb0 [nfsv4] mount_fs+0x74/0x210 vfs_kern_mount+0x78/0x220 nfs_do_root_mount+0xb0/0x140 [nfsv4] nfs4_try_mount+0x60/0x100 [nfsv4] nfs_fs_mount+0x5ec/0xda0 [nfs] mount_fs+0x74/0x210 vfs_kern_mount+0x78/0x220 do_mount+0x254/0xf70 SyS_mount+0x94/0x100 system_call+0x38/0xe0 Reported-by: Jan Stancek Signed-off-by: David Howells Tested-by: Jan Stancek Signed-off-by: James Morris Documentation/security/keys.txt | 17 +++++++++++++++-- drivers/md/dm-crypt.c | 2 +- fs/cifs/connect.c | 2 +- fs/crypto/keyinfo.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 2 +- fs/fscache/object-list.c | 2 +- fs/nfs/nfs4idmap.c | 2 +- include/keys/user-type.h | 9 +++++++-- include/linux/key.h | 5 ++++- lib/digsig.c | 2 +- net/dns_resolver/dns_query.c | 4 ++-- security/keys/dh.c | 2 +- security/keys/encrypted-keys/encrypted.c | 4 ++-- security/keys/trusted.c | 4 ++-- security/keys/user_defined.c | 6 +++--- 15 files changed, 43 insertions(+), 22 deletions(-) commit 16c54ac903042aca583e51a40bbe2f5503fe53c7 Merge: 449809a 19d19e9 Author: David S. Miller Date: Wed Mar 1 15:08:34 2017 -0800 Merge tag 'mac80211-for-davem-2017-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== First round of fixes - details in the commits: * use a valid hrtimer clock ID in mac80211_hwsim * don't reorder frames prior to BA session * flush a delayed work at suspend so the state is all valid before suspend/resume * fix packet statistics in fast-RX, the RX packets counter increment was simply missing * don't try to re-transmit filtered frames in an aggregation session * shorten (for tracing) a debug message * typo fix in another debug message * fix nul-termination with HWSIM_ATTR_RADIO_NAME in hwsim * fix mgmt RX processing when station is looked up by driver/device ==================== Signed-off-by: David S. Miller commit 449809a66c1d0b1563dee84493e14bf3104d2d7e Author: Eric Dumazet Date: Wed Mar 1 08:39:49 2017 -0800 tcp/dccp: block BH for SYN processing SYN processing really was meant to be handled from BH. When I got rid of BH blocking while processing socket backlog in commit 5413d1babe8f ("net: do not block BH while processing socket backlog"), I forgot that a malicious user could transition to TCP_LISTEN from a state that allowed (SYN) packets to be parked in the socket backlog while socket is owned by the thread doing the listen() call. Sure enough syzkaller found this and reported the bug ;) ================================= [ INFO: inconsistent lock state ] 4.10.0+ #60 Not tainted --------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor0/5090 [HC0[0]:SC0[0]:HE1:SE1] takes: (&(&hashinfo->ehash_locks[i])->rlock){+.?...}, at: [] spin_lock include/linux/spinlock.h:299 [inline] (&(&hashinfo->ehash_locks[i])->rlock){+.?...}, at: [] inet_ehash_insert+0x240/0xad0 net/ipv4/inet_hashtables.c:407 {IN-SOFTIRQ-W} state was registered at: mark_irqflags kernel/locking/lockdep.c:2923 [inline] __lock_acquire+0xbcf/0x3270 kernel/locking/lockdep.c:3295 lock_acquire+0x241/0x580 kernel/locking/lockdep.c:3753 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:299 [inline] inet_ehash_insert+0x240/0xad0 net/ipv4/inet_hashtables.c:407 reqsk_queue_hash_req net/ipv4/inet_connection_sock.c:753 [inline] inet_csk_reqsk_queue_hash_add+0x1b7/0x2a0 net/ipv4/inet_connection_sock.c:764 tcp_conn_request+0x25cc/0x3310 net/ipv4/tcp_input.c:6399 tcp_v4_conn_request+0x157/0x220 net/ipv4/tcp_ipv4.c:1262 tcp_rcv_state_process+0x802/0x4130 net/ipv4/tcp_input.c:5889 tcp_v4_do_rcv+0x56b/0x940 net/ipv4/tcp_ipv4.c:1433 tcp_v4_rcv+0x2e12/0x3210 net/ipv4/tcp_ipv4.c:1711 ip_local_deliver_finish+0x4ce/0xc40 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:257 [inline] ip_local_deliver+0x1ce/0x710 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:492 [inline] ip_rcv_finish+0xb1d/0x2110 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:257 [inline] ip_rcv+0xd90/0x19c0 net/ipv4/ip_input.c:487 __netif_receive_skb_core+0x1ad1/0x3400 net/core/dev.c:4179 __netif_receive_skb+0x2a/0x170 net/core/dev.c:4217 netif_receive_skb_internal+0x1d6/0x430 net/core/dev.c:4245 napi_skb_finish net/core/dev.c:4602 [inline] napi_gro_receive+0x4e6/0x680 net/core/dev.c:4636 e1000_receive_skb drivers/net/ethernet/intel/e1000/e1000_main.c:4033 [inline] e1000_clean_rx_irq+0x5e0/0x1490 drivers/net/ethernet/intel/e1000/e1000_main.c:4489 e1000_clean+0xb9a/0x2910 drivers/net/ethernet/intel/e1000/e1000_main.c:3834 napi_poll net/core/dev.c:5171 [inline] net_rx_action+0xe70/0x1900 net/core/dev.c:5236 __do_softirq+0x2fb/0xb7d kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x19e/0x1d0 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:658 [inline] do_IRQ+0x81/0x1a0 arch/x86/kernel/irq.c:250 ret_from_intr+0x0/0x20 native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:53 arch_safe_halt arch/x86/include/asm/paravirt.h:98 [inline] default_idle+0x8f/0x410 arch/x86/kernel/process.c:271 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:262 default_idle_call+0x36/0x60 kernel/sched/idle.c:96 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x348/0x440 kernel/sched/idle.c:243 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:345 start_secondary+0x344/0x440 arch/x86/kernel/smpboot.c:272 verify_cpu+0x0/0xfc irq event stamp: 1741 hardirqs last enabled at (1741): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (1741): [] _raw_spin_unlock_irqrestore+0xf7/0x1a0 kernel/locking/spinlock.c:191 hardirqs last disabled at (1740): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1740): [] _raw_spin_lock_irqsave+0xa2/0x110 kernel/locking/spinlock.c:159 softirqs last enabled at (1738): [] __do_softirq+0x7cf/0xb7d kernel/softirq.c:310 softirqs last disabled at (1571): [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:902 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&hashinfo->ehash_locks[i])->rlock); lock(&(&hashinfo->ehash_locks[i])->rlock); *** DEADLOCK *** 1 lock held by syz-executor0/5090: #0: (sk_lock-AF_INET6){+.+.+.}, at: [] lock_sock include/net/sock.h:1460 [inline] #0: (sk_lock-AF_INET6){+.+.+.}, at: [] sock_setsockopt+0x233/0x1e40 net/core/sock.c:683 stack backtrace: CPU: 1 PID: 5090 Comm: syz-executor0 Not tainted 4.10.0+ #60 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x292/0x398 lib/dump_stack.c:51 print_usage_bug+0x3ef/0x450 kernel/locking/lockdep.c:2387 valid_state kernel/locking/lockdep.c:2400 [inline] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] mark_lock+0xf30/0x1410 kernel/locking/lockdep.c:3065 mark_irqflags kernel/locking/lockdep.c:2941 [inline] __lock_acquire+0x6dc/0x3270 kernel/locking/lockdep.c:3295 lock_acquire+0x241/0x580 kernel/locking/lockdep.c:3753 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:299 [inline] inet_ehash_insert+0x240/0xad0 net/ipv4/inet_hashtables.c:407 reqsk_queue_hash_req net/ipv4/inet_connection_sock.c:753 [inline] inet_csk_reqsk_queue_hash_add+0x1b7/0x2a0 net/ipv4/inet_connection_sock.c:764 dccp_v6_conn_request+0xada/0x11b0 net/dccp/ipv6.c:380 dccp_rcv_state_process+0x51e/0x1660 net/dccp/input.c:606 dccp_v6_do_rcv+0x213/0x350 net/dccp/ipv6.c:632 sk_backlog_rcv include/net/sock.h:896 [inline] __release_sock+0x127/0x3a0 net/core/sock.c:2052 release_sock+0xa5/0x2b0 net/core/sock.c:2539 sock_setsockopt+0x60f/0x1e40 net/core/sock.c:1016 SYSC_setsockopt net/socket.c:1782 [inline] SyS_setsockopt+0x2fb/0x3a0 net/socket.c:1765 entry_SYSCALL_64_fastpath+0x1f/0xc2 RIP: 0033:0x4458b9 RSP: 002b:00007fe8b26c2b58 EFLAGS: 00000292 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000004458b9 RDX: 000000000000001a RSI: 0000000000000001 RDI: 0000000000000006 RBP: 00000000006e2110 R08: 0000000000000010 R09: 0000000000000000 R10: 00000000208c3000 R11: 0000000000000292 R12: 0000000000708000 R13: 0000000020000000 R14: 0000000000001000 R15: 0000000000000000 Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/dccp/input.c | 10 ++++++++-- net/ipv4/tcp_input.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) commit eba38a968258b5ad9d70722ab8c584e1753f4b16 Author: Gary Lin Date: Wed Mar 1 16:25:51 2017 +0800 bpf: update the comment about the length of analysis Commit 07016151a446 ("bpf, verifier: further improve search pruning") increased the limit of processed instructions from 32k to 64k, but the comment still mentioned the 32k limit. This commit updates the comment to reflect the change. Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Gary Lin Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df2c43343b47a7138431f431118eb5819e205365 Author: Yotam Gigi Date: Wed Mar 1 16:50:45 2017 +0200 bridge: Fix error path in nbp_vlan_init Fix error path order in nbp_vlan_init, so if switchdev_port_attr_set call failes, the vlan_hash wouldn't be destroyed before inited. Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") CC: Roopa Prabhu Signed-off-by: Yotam Gigi Acked-by: Roopa Prabhu Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/bridge/br_vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61cfac6f267dabcf2740a7ec8a0295833b28b5f5 Author: Pavel Shilovsky Date: Tue Feb 28 16:05:19 2017 -0800 CIFS: Fix possible use after free in demultiplex thread The recent changes that added SMB3 encryption support introduced a possible use after free in the demultiplex thread. When we process an encrypted packed we obtain a pointer to SMB session but do not obtain a reference. This can possibly lead to a situation when this session was freed before we copy a decryption key from there. Fix this by obtaining a copy of the key rather than a pointer to the session under a spinlock. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2ops.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 6bff9c609f3df4e325da08783f691cab9316d643 Merge: 02c3de1 e3942ed Author: Rafael J. Wysocki Date: Wed Mar 1 23:34:38 2017 +0100 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull changes related to turbostat for v4.11 from Len Brown. * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (44 commits) tools/power turbostat: version 17.02.24 tools/power turbostat: bugfix: --add u32 was printed as u64 tools/power turbostat: show error on exec tools/power turbostat: dump p-state software config tools/power turbostat: show package number, even without --debug tools/power turbostat: support "--hide C1" etc. tools/power turbostat: move --Package and --processor into the --cpu option tools/power turbostat: turbostat.8 update tools/power turbostat: update --list feature tools/power turbostat: use wide columns to display large numbers tools/power turbostat: Add --list option to show available header names tools/power turbostat: fix zero IRQ count shown in one-shot command mode tools/power turbostat: add --cpu parameter tools/power turbostat: print sysfs C-state stats tools/power turbostat: extend --add option to accept /sys path tools/power turbostat: skip unused counters on BDX tools/power turbostat: fix decoding for GLM, DNV, SKX turbo-ratio limits tools/power turbostat: skip unused counters on SKX tools/power turbostat: Denverton: use HW CC1 counter, skip C3, C7 tools/power turbostat: initial Gemini Lake SOC support ... commit 28db0c7b1c7fbca3637994c1ce3c4ffe142e2755 Author: Viresh Kumar Date: Wed Mar 1 16:39:55 2017 +0530 PM / OPP: Documentation: Fix opp-microvolt in examples The triplet present in "opp-microvolt" property should be in the order , while all the examples have it in the order . Fix it. Luckily all of the users of "opp-microvolt" property have applied brain instead of copying the examples from documentation and none of the actual dts files have it wrong. Reported-by: Rob Herring Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/opp/opp.txt | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit b46dcfa378b0cdea1ee832802c9e36750e0fffa9 Author: Max Filippov Date: Wed Jan 4 10:40:49 2017 -0800 xtensa: allow merging vectors into .text section Currently code for exception/IRQ vectors is stored in kernel image as initialization data and is copied to its working addresses during startup. It doesn't always make sense. In many cases vectors location can be automatically decided at kernel link time and code can be placed right there. This is especially useful for XIP kernel. Signed-off-by: Max Filippov arch/xtensa/include/asm/vectors.h | 4 ++++ arch/xtensa/kernel/setup.c | 3 +++ arch/xtensa/kernel/vmlinux.lds.S | 41 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 9a736fcb096b43b68af8329eb12abc8256dceaba Author: Max Filippov Date: Sun Dec 25 04:58:57 2016 -0800 xtensa: clean up bootable image build targets Currently xtensa uses 'zImage' as a synonym of 'all', but in fact xtensa supports three targets: 'Image' (ELF image with reset vector), 'zImage' (compressed redboot image) and 'uImage' (U-Boot image). Provide separate 'Image', 'zImage' and 'uImage' make targets that only build corresponding image type. Make 'all' build all images appropriate for a platform. Signed-off-by: Max Filippov arch/xtensa/Makefile | 8 +++----- arch/xtensa/boot/Makefile | 23 ++++++++++++++++------- arch/xtensa/boot/boot-elf/Makefile | 2 +- arch/xtensa/boot/boot-redboot/Makefile | 2 +- arch/xtensa/boot/boot-uboot/Makefile | 14 -------------- 5 files changed, 21 insertions(+), 28 deletions(-) commit 4ab18701c66552944188dbcd0ce0012729baab84 Author: Max Filippov Date: Tue Jan 3 09:37:34 2017 -0800 xtensa: move parse_tag_fdt out of #ifdef CONFIG_BLK_DEV_INITRD FDT tag parsing is not related to whether BLK_DEV_INITRD is configured or not, move it out of the corresponding #ifdef/#endif block. This fixes passing external FDT to the kernel configured w/o BLK_DEV_INITRD support. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e390f9a9689a42f477a6073e2e7df530a4c1b740 Author: Josh Poimboeuf Date: Wed Mar 1 12:04:44 2017 -0600 objtool, modules: Discard objtool annotation sections for modules The '__unreachable' and '__func_stack_frame_non_standard' sections are only used at compile time. They're discarded for vmlinux but they should also be discarded for modules. Since this is a recurring pattern, prefix the section names with ".discard.". It's a nice convention and vmlinux.lds.h already discards such sections. Also remove the 'a' (allocatable) flag from the __unreachable section since it doesn't make sense for a discarded section. Suggested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Jessica Yu Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Link: http://lkml.kernel.org/r/20170301180444.lhd53c5tibc4ns77@treble Signed-off-by: Ingo Molnar arch/x86/kernel/vmlinux.lds.S | 2 -- include/linux/compiler-gcc.h | 2 +- include/linux/frame.h | 2 +- scripts/mod/modpost.c | 1 + scripts/module-common.lds | 5 ++++- tools/objtool/builtin-check.c | 6 +++--- 6 files changed, 10 insertions(+), 8 deletions(-) commit 6053dc981449718d90a429933e99b441e1adaea6 Merge: b286ced 638f863 Author: Linus Torvalds Date: Wed Mar 1 10:32:30 2017 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main fix here addresses a kernel panic triggered on Qualcomm QDF2400 due to incorrect register usage in an erratum workaround introduced during the merge window. Summary: - Fix kernel panic on specific Qualcomm platform due to broken erratum workaround - Revert contiguous bit support due to TLB conflict aborts in simulation - Don't treat all CPU ID register fields as 4-bit quantities" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/cpufeature: check correct field width when updating sys_val Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate" arm64: Avoid clobbering mm in erratum workaround on QDF2400 commit 3b45a4106f146c336cbcaccb9d8d0fa0e5c3dc1d Author: Liping Zhang Date: Mon Feb 27 20:59:39 2017 +0800 net: route: add missing nla_policy entry for RTA_MARK attribute This will add stricter validating for RTA_MARK attribute. Signed-off-by: Liping Zhang Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 1 + net/ipv6/route.c | 1 + 2 files changed, 2 insertions(+) commit 8c171d6ca56c6891372a97af26b58b2cfad7fd9a Author: Felix Jia Date: Mon Feb 27 12:41:23 2017 +1300 net/ipv6: avoid possible dead locking on addr_gen_mode sysctl The addr_gen_mode variable can be accessed by both sysctl and netlink. Repleacd rtnl_lock() with rtnl_trylock() protect the sysctl operation to avoid the possbile dead lock.` Signed-off-by: Felix Jia Signed-off-by: David S. Miller net/ipv6/addrconf.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit b286cedd473006b33d5ae076afac509e6b2c3bf4 Merge: 522214d 9f3768e Author: Linus Torvalds Date: Wed Mar 1 10:10:16 2017 -0800 Merge tag 'powerpc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc updates from Michael Ellerman: "Highlights include: - an update of the disassembly code used by xmon to the latest versions in binutils. We've received permission from all the authors of the relevant binutils changes to relicense their changes to the relevant files from GPLv3 to GPLv2, for inclusion in Linux. Thanks to Peter Bergner for doing the leg work to get permission from everyone. - addition of the "architected" Power9 CPU table entry, allowing us to boot in Power9 architected mode under a hypervisor. - updates to the Power9 PMU code. - implementation of clear_bit_unlock_is_negative_byte() to optimise unlock_page(). - Freescale updates from Scott: "Highlights include 8xx breakpoints and perf, t1042rdb display support, and board updates." Thanks to: Al Viro, Andrew Donnellan, Aneesh Kumar K.V, Balbir Singh, Douglas Miller, Frédéric Weisbecker, Gavin Shan, Madhavan Srinivasan, Michael Roth, Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Peter Bergner, Paul E. McKenney, Rashmica Gupta, Russell Currey, Sahil Mehta, Stewart Smith" * tag 'powerpc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (48 commits) powerpc: Remove leftover cputime_to_nsecs call causing build error powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU powerpc/optprobes: Fix TOC handling in optprobes trampoline powerpc/pseries: Advertise Hot Plug Event support to firmware cxl: fix nested locking hang during EEH hotplug powerpc/xmon: Dump memory in CPU endian format powerpc/pseries: Revert 'Auto-online hotplugged memory' powerpc/powernv: Make PCI non-optional powerpc/64: Implement clear_bit_unlock_is_negative_byte() powerpc/powernv: Remove unused variable in pnv_pci_sriov_disable() powerpc/kernel: Remove error message in pcibios_setup_phb_resources() powerpc/mm: Fix typo in set_pte_at() pci/hotplug/pnv-php: Disable MSI and PCI device properly pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts pci/hotplug/pnv-php: Remove WARN_ON() in pnv_php_put_slot() powerpc: Add POWER9 architected mode to cputable powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags() powerpc/perf: Avoid FAB_*_MATCH checks for power9 powerpc/perf: Add restrictions to PMC5 in power9 DD1 powerpc/perf: Use Instruction Counter value ... commit 522214d9be9c9f00f34ed89cb95e901b7ac31c59 Author: Benjamin Tissoires Date: Wed Mar 1 09:57:00 2017 +0100 Input: rmi4 - f30: detect INPUT_PROP_BUTTONPAD from the button count INPUT_PROP_BUTTONPAD is currently only set through the platform data. The RMI4 header doc says that this property is there to force the buttonpad property, so we also need to detect it by looking at the exported buttons count. Signed-off-by: Benjamin Tissoires Reported-and-tested-by: Linus Torvalds Signed-off-by: Linus Torvalds drivers/input/rmi4/rmi_f30.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 044d5dfd6262d0ef91f6f5b19e3973f82fc7e1d2 Merge: 544a068 f3ac9f7 Author: Linus Torvalds Date: Wed Mar 1 09:59:21 2017 -0800 Merge tag 'sound-fix-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few last-minute fixes for rc1: - ALSA core timer and sequencer fixes for bugs spotted by syzkaller - a couple of trivial HD-audio fixups - additional PCI / codec IDs for Intel Geminilake - fixes for CT-XFi DMA mask bugs" * tag 'sound-fix-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix link corruption by event error handling ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming ALSA: ctxfi: Fallback DMA mask to 32bit ALSA: timer: Reject user params with too small ticks ALSA: hda: Add Geminilake HDMI codec ID ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine ALSA: hda - Add Geminilake PCI ID commit a3695e9751b3c616170b552f8561b5a7c5b7a3ca Merge: 39e6c82 a717e3f Author: David S. Miller Date: Wed Mar 1 09:58:46 2017 -0800 Merge branch 'vxlan-geneve-rcu-fixes' Jakub Kicinski says: ==================== VXLAN/geneve RCU fixes VXLAN and GENEVE need to take RCU lock explicitly because TX path only has the _bh() flavour of RCU locked. Making the reconfiguration path wait for both normal and _bh() RCU would be bigger hassle so just acquire the lock, as suggested by Pravin: https://www.mail-archive.com/netdev@vger.kernel.org/msg155583.html ==================== Signed-off-by: David S. Miller commit a717e3f740803cc88bd5c9a70c93504f6a368663 Author: Jakub Kicinski Date: Fri Feb 24 11:43:37 2017 -0800 geneve: lock RCU on TX path There is no guarantees that callers of the TX path will hold the RCU lock. Grab it explicitly. Fixes: fceb9c3e3825 ("geneve: avoid using stale geneve socket.") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/geneve.c | 2 ++ 1 file changed, 2 insertions(+) commit 56de859e9967c070464a9a9f4f18d73f9447298e Author: Jakub Kicinski Date: Fri Feb 24 11:43:36 2017 -0800 vxlan: lock RCU on TX path There is no guarantees that callers of the TX path will hold the RCU lock. Grab it explicitly. Fixes: c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/vxlan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 544a068f1f88da89254d2e334a7d4f0dc4ae9ab7 Merge: 545b282 6fefe19 Author: Linus Torvalds Date: Wed Mar 1 09:54:32 2017 -0800 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - add thermal driver for R-Car Gen3 thermal sensors. - add thermal driver for ZTE' zx2967 family thermal sensors. - convert thermal ID allocation from IDR to IDA. - fix a possible NULL dereference in imx thermal driver. - fix a ti-soc-thermal driver dependency issue so that critical thermal control is still available when CPU_THERMAL is not defined. - update binding information for QorIQ thermal driver. - a couple of cleanups in thermal core, intel_powerclamp, exynos, dra752-thermal, mtk-thermal driver. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: powerpc/mpc85xx: Update TMU device tree node for T1023/T1024 powerpc/mpc85xx: Update TMU device tree node for T1040/T1042 dt-bindings: Update QorIQ TMU thermal bindings thermal: mtk_thermal: Staticise a number of data variables thermal: arm: dra752: Remove all TSHUT related definitions thermal: arm: dra752: Remove TSHUT configuration thermal: ti-soc-thermal: Remove CPU_THERMAL Dependency from TI_THERMAL thermal: imx: Fix possible NULL dereference. thermal: exynos: Remove parsing unused samsung,tmu_cal_mode property thermal: zx2967: add thermal driver for ZTE's zx2967 family thermal: use cpumask_var_t for on-stack cpu masks dt: bindings: add documentation for zx2967 family thermal sensor thermal/intel_powerclamp: Remove set-but-not-used variables thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal: convert devfreq_cooling to use an IDA thermal: convert cpu_cooling to use an IDA thermal: convert clock cooling to use an IDA thermal core: convert ID allocation to IDA commit 39e6c8208d7b6fb9d2047850fb3327db567b564b Author: Eric Dumazet Date: Tue Feb 28 10:34:50 2017 -0800 net: solve a NAPI race While playing with mlx4 hardware timestamping of RX packets, I found that some packets were received by TCP stack with a ~200 ms delay... Since the timestamp was provided by the NIC, and my probe was added in tcp_v4_rcv() while in BH handler, I was confident it was not a sender issue, or a drop in the network. This would happen with a very low probability, but hurting RPC workloads. A NAPI driver normally arms the IRQ after the napi_complete_done(), after NAPI_STATE_SCHED is cleared, so that the hard irq handler can grab it. Problem is that if another point in the stack grabs NAPI_STATE_SCHED bit while IRQ are not disabled, we might have later an IRQ firing and finding this bit set, right before napi_complete_done() clears it. This can happen with busy polling users, or if gro_flush_timeout is used. But some other uses of napi_schedule() in drivers can cause this as well. thread 1 thread 2 (could be on same cpu, or not) // busy polling or napi_watchdog() napi_schedule(); ... napi->poll() device polling: read 2 packets from ring buffer Additional 3rd packet is available. device hard irq // does nothing because NAPI_STATE_SCHED bit is owned by thread 1 napi_schedule(); napi_complete_done(napi, 2); rearm_irq(); Note that rearm_irq() will not force the device to send an additional IRQ for the packet it already signaled (3rd packet in my example) This patch adds a new NAPI_STATE_MISSED bit, that napi_schedule_prep() can set if it could not grab NAPI_STATE_SCHED Then napi_complete_done() properly reschedules the napi to make sure we do not miss something. Since we manipulate multiple bits at once, use cmpxchg() like in sk_busy_loop() to provide proper transactions. In v2, I changed napi_watchdog() to use a relaxed variant of napi_schedule_prep() : No need to set NAPI_STATE_MISSED from this point. In v3, I added more details in the changelog and clears NAPI_STATE_MISSED in busy_poll_stop() In v4, I added the ideas given by Alexander Duyck in v3 review Signed-off-by: Eric Dumazet Cc: Alexander Duyck Signed-off-by: David S. Miller include/linux/netdevice.h | 29 ++++++------------ net/core/dev.c | 76 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 81 insertions(+), 24 deletions(-) commit b2d0fe35471d1a71471f99147ffb5986bd60e744 Author: Dan Carpenter Date: Tue Feb 28 15:02:15 2017 +0300 net/mlx4: && vs & typo Bitwise & was obviously intended here. Fixes: 745d8ae4622c ("net/mlx4: Spoofcheck and zero MAC can't coexist") Signed-off-by: Dan Carpenter Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller include/linux/mlx4/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f3de46f7a57a8ecc16c7ef69c6917b3731a7c5f Author: Colin Ian King Date: Tue Feb 28 11:58:22 2017 +0000 net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode The call to asix_write_medium_mode is not updating the return code ret and yet ret is being checked for an error. Fix this by assigning ret to the return code from the call asix_write_medium_mode. Detected by CoverityScan, CID#1357148 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bf09c397e13b70ab6064eb2af69b8fa8e68a24e Author: Baruch Siach Date: Tue Feb 28 10:39:48 2017 +0200 MAINTAINERS: Orphan usb/net/hso driver The email address of Jan Dumon bounces, and there is not relevant information in the linked website. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f7df4923fa986247e93ec2cdff5ca168fff14dcf Author: Ido Schimmel Date: Tue Feb 28 08:55:40 2017 +0100 mlxsw: spectrum_router: Avoid potential packets loss When the structure of the LPM tree changes (f.e., due to the addition of a new prefix), we unbind the old tree and then bind the new one. This may result in temporary packet loss. Instead, overwrite the old binding with the new one. Fixes: 6b75c4807db3 ("mlxsw: spectrum_router: Add virtual router management") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 4f7bfb3982e02aacc5fb6e1a121e5326c1778ac3 Author: Zhu Yanjun Date: Tue Feb 28 01:45:40 2017 -0500 rds: ib: add the static type to the variables The variables rds_ib_mr_1m_pool_size and rds_ib_mr_8k_pool_size are used only in the ib.c file. As such, the static type is added to limit them in this file. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.c | 4 ++-- net/rds/ib_mr.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 5179b26694c92373275e4933f5d0ff32d585c675 Author: Xin Long Date: Tue Feb 28 12:41:29 2017 +0800 sctp: call rcu_read_lock before checking for duplicate transport nodes Commit cd2b70875058 ("sctp: check duplicate node before inserting a new transport") called rhltable_lookup() to check for the duplicate transport node in transport rhashtable. But rhltable_lookup() doesn't call rcu_read_lock inside, it could cause a use-after-free issue if it tries to dereference the node that another cpu has freed it. Note that sock lock can not avoid this as it is per sock. This patch is to fix it by calling rcu_read_lock before checking for duplicate transport nodes. Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new transport") Reported-by: Andrey Konovalov Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/input.c | 3 +++ 1 file changed, 3 insertions(+) commit 540b1c48c37ac0ad66212004db21e1ff7e2d78be Author: David Howells Date: Mon Feb 27 15:43:06 2017 +0000 rxrpc: Fix deadlock between call creation and sendmsg/recvmsg All the routines by which rxrpc is accessed from the outside are serialised by means of the socket lock (sendmsg, recvmsg, bind, rxrpc_kernel_begin_call(), ...) and this presents a problem: (1) If a number of calls on the same socket are in the process of connection to the same peer, a maximum of four concurrent live calls are permitted before further calls need to wait for a slot. (2) If a call is waiting for a slot, it is deep inside sendmsg() or rxrpc_kernel_begin_call() and the entry function is holding the socket lock. (3) sendmsg() and recvmsg() or the in-kernel equivalents are prevented from servicing the other calls as they need to take the socket lock to do so. (4) The socket is stuck until a call is aborted and makes its slot available to the waiter. Fix this by: (1) Provide each call with a mutex ('user_mutex') that arbitrates access by the users of rxrpc separately for each specific call. (2) Make rxrpc_sendmsg() and rxrpc_recvmsg() unlock the socket as soon as they've got a call and taken its mutex. Note that I'm returning EWOULDBLOCK from recvmsg() if MSG_DONTWAIT is set but someone else has the lock. Should I instead only return EWOULDBLOCK if there's nothing currently to be done on a socket, and sleep in this particular instance because there is something to be done, but we appear to be blocked by the interrupt handler doing its ping? (3) Make rxrpc_new_client_call() unlock the socket after allocating a new call, locking its user mutex and adding it to the socket's call tree. The call is returned locked so that sendmsg() can add data to it immediately. From the moment the call is in the socket tree, it is subject to access by sendmsg() and recvmsg() - even if it isn't connected yet. (4) Lock new service calls in the UDP data_ready handler (in rxrpc_new_incoming_call()) because they may already be in the socket's tree and the data_ready handler makes them live immediately if a user ID has already been preassigned. Note that the new call is locked before any notifications are sent that it is live, so doing mutex_trylock() *ought* to always succeed. Userspace is prevented from doing sendmsg() on calls that are in a too-early state in rxrpc_do_sendmsg(). (5) Make rxrpc_new_incoming_call() return the call with the user mutex held so that a ping can be scheduled immediately under it. Note that it might be worth moving the ping call into rxrpc_new_incoming_call() and then we can drop the mutex there. (6) Make rxrpc_accept_call() take the lock on the call it is accepting and release the socket after adding the call to the socket's tree. This is slightly tricky as we've dequeued the call by that point and have to requeue it. Note that requeuing emits a trace event. (7) Make rxrpc_kernel_send_data() and rxrpc_kernel_recv_data() take the new mutex immediately and don't bother with the socket mutex at all. This patch has the nice bonus that calls on the same socket are now to some extent parallelisable. Note that we might want to move rxrpc_service_prealloc() calls out from the socket lock and give it its own lock, so that we don't hang progress in other calls because we're waiting for the allocator. We probably also want to avoid calling rxrpc_notify_socket() from within the socket lock (rxrpc_accept_call()). Signed-off-by: David Howells Tested-by: Marc Dionne Signed-off-by: David S. Miller include/trace/events/rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 12 +++++++--- net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_accept.c | 48 +++++++++++++++++++++++++++++++++++++ net/rxrpc/call_object.c | 18 ++++++++++++-- net/rxrpc/input.c | 1 + net/rxrpc/recvmsg.c | 39 +++++++++++++++++++++++++----- net/rxrpc/sendmsg.c | 57 +++++++++++++++++++++++++++++++++++--------- 8 files changed, 156 insertions(+), 22 deletions(-) commit 545b2820c4a48245412d97030134cc1d38918726 Merge: 3437f9f 38b0a52 Author: Linus Torvalds Date: Wed Mar 1 09:46:02 2017 -0800 Merge tag 'pwm/for-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set contains mostly fixes to existing drivers as well as cleanup of code that's not been in active use for a while" * tag 'pwm/for-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (27 commits) acpi: lpss: call pwm_add_table() for BSW PWM device pwm: Try to load modules during pwm_get() pwm: Don't hold pwm_lookup_lock longer than necessary pwm: Make the PWM_POLARITY flag in DTB optional pwm: Print error messages with pr_err() instead of pr_debug() pwm: imx: Add polarity inversion support to i.MX's PWMv2 pwm: imx: doc: Update imx-pwm.txt documentation entry pwm: imx: Remove redundant i.MX PWMv2 code pwm: imx: Provide atomic PWM support for i.MX PWMv2 pwm: imx: Move PWMv2 wait for fifo slot code to a separate function pwm: imx: Move PWMv2 software reset code to a separate function pwm: imx: Rewrite v1 code to facilitate switch to atomic PWM pwm: imx: Add separate set of PWM ops for v1 and v2 pwm: imx: Remove ipg clock and enable per clock when required pwm: lpss: Add Intel Gemini Lake PCI ID pwm: lpss: Do not export board infos for different PWM types pwm: lpss: Avoid reconfiguring while UPDATE bit is still enabled pwm: lpss: Switch to new atomic API pwm: lpss: Allow duty cycle to be 0 pwm: lpss: Avoid potential overflow of base_unit ... commit 3437f9f0a69c7c9e926f702fb0d1abd1f750a40e Merge: f3ecc84 9bb92f5 Author: Linus Torvalds Date: Wed Mar 1 09:42:42 2017 -0800 Merge tag 'drm-ast-2500-for-v4.11' of git://people.freedesktop.org/~airlied/linux Pull drm AST2500 support from Dave Airlie: "This is a set of changes to enable the AST2500 BMC hardware, and also fix some bugs interacting with the older AST hardware. Some of the bug fixes are cc'ed to stable" * tag 'drm-ast-2500-for-v4.11' of git://people.freedesktop.org/~airlied/linux: drm/ast: Call open_key before enable_mmio in POST code drm/ast: Fix test for VGA enabled drm/ast: POST code for the new AST2500 drm/ast: Rename ast_init_dram_2300 to ast_post_chip_2300 drm/ast: Factor mmc_test code in POST code drm/ast: Fixed vram size incorrect issue on POWER drm/ast: Base support for AST2500 drm/ast: Fix calculation of MCLK drm/ast: Remove spurious include drm/ast: const'ify mode setting tables drm/ast: Handle configuration without P2A bridge drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS commit f3ecc84b09df461639d59a313f50dc21d205e0b1 Merge: 2d6be4a a44ddbc Author: Linus Torvalds Date: Wed Mar 1 08:50:33 2017 -0800 Merge tag 'drm-fixes-for-v4.11-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Misc fixes for v4.11-rc1. This is a selection of fixes for recent bugs, the vmwgfx one is important to avoid a regression, and compat ioctl one is pretty urgent for stable. Otherwise nothing too much. I've got a separate pull req for some AST hw IBM need to enable" * tag 'drm-fixes-for-v4.11-rc1' of git://people.freedesktop.org/~airlied/linux: dma-buf: add support for compat ioctl drm/vmwgfx: Work around drm removal of control nodes drm/rockchip: cdn-dp: Fix error handling drm/rockchip: add extcon dependency for DP drm: zte: fix static checker warning on variable 'fmt' commit acc9ab60132739e0c5ab40644444cd7b22d12886 Author: Wanpeng Li Date: Mon Feb 27 04:24:39 2017 -0800 KVM: nVMX: Fix pending events injection L2 fails to boot on a non-APICv box dues to 'commit 0ad3bed6c5ec ("kvm: nVMX: move nested events check to kvm_vcpu_running")' KVM internal error. Suberror: 3 extra data[0]: 800000ef extra data[1]: 1 RAX=0000000000000000 RBX=ffffffff81f36140 RCX=0000000000000000 RDX=0000000000000000 RSI=0000000000000000 RDI=0000000000000000 RBP=ffff88007c92fe90 RSP=ffff88007c92fe90 R8 =ffff88007fccdca0 R9 =0000000000000000 R10=00000000fffedb3d R11=0000000000000000 R12=0000000000000003 R13=0000000000000000 R14=0000000000000000 R15=ffff88007c92c000 RIP=ffffffff810645e6 RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 ffffffff 00c00000 CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA] SS =0000 0000000000000000 ffffffff 00c00000 DS =0000 0000000000000000 ffffffff 00c00000 FS =0000 0000000000000000 ffffffff 00c00000 GS =0000 ffff88007fcc0000 ffffffff 00c00000 LDT=0000 0000000000000000 ffffffff 00c00000 TR =0040 ffff88007fcd4200 00002087 00008b00 DPL=0 TSS64-busy GDT= ffff88007fcc9000 0000007f IDT= ffffffffff578000 00000fff CR0=80050033 CR2=00000000ffffffff CR3=0000000001e0a000 CR4=003406e0 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000fffe0ff0 DR7=0000000000000400 EFER=0000000000000d01 We should try to reinject previous events if any before trying to inject new event if pending. If vmexit is triggered by L2 guest and L0 interested in, we should reinject IDT-vectoring info to L2 through vmcs02 if any, otherwise, we can consider new IRQs/NMIs which can be injected and call nested events callback to switch from L2 to L1 if needed and inject the proper vmexit events. However, 'commit 0ad3bed6c5ec ("kvm: nVMX: move nested events check to kvm_vcpu_running")' results in the handle events order reversely on non-APICv box. This patch fixes it by bailing out for pending events and not consider new events in this scenario. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jan Kiszka Signed-off-by: Wanpeng Li Fixes: 0ad3bed6c5ec ("kvm: nVMX: move nested events check to kvm_vcpu_running") Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0fce546f9f07b94ccc9de09cf48d35e18946d2fa Author: Jérémy Lefaure Date: Sat Feb 25 17:46:53 2017 -0500 x86/kvm/vmx: remove unused variable in segment_base() The pointer 'struct desc_struct *d' is unused since commit 8c2e41f7ae12 ("x86/kvm/vmx: Simplify segment_base()") so let's remove it. Signed-off-by: Jérémy Lefaure Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) commit 0eb1d0fa6a68324b51db4f7ae16d9b042c5b2de4 Author: Andy Lutomirski Date: Wed Feb 22 07:36:17 2017 -0800 selftests/x86: Add a basic selftest for ioperm This doesn't fully exercise the interaction between KVM and ioperm(), but it does test basic functionality. Signed-off-by: Andy Lutomirski Signed-off-by: Radim Krčmář tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/ioperm.c | 170 +++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) commit b7ceaec112aa35aa287325754d8c52b8304892cd Author: Andy Lutomirski Date: Wed Feb 22 07:36:16 2017 -0800 x86/asm: Tidy up TSS limit code In an earlier version of the patch ("x86/kvm/vmx: Defer TR reload after VM exit") that introduced TSS limit validity tracking, I confused which helper was which. On reflection, the names I chose sucked. Rename the helpers to make it more obvious what's going on and add some comments. While I'm at it, clear __tss_limit_invalid when force-reloading as well as when contitionally reloading, since any TR reload fixes the limit. Signed-off-by: Andy Lutomirski Signed-off-by: Radim Krčmář arch/x86/include/asm/desc.h | 18 +++++++++++------- arch/x86/kernel/ioport.c | 8 +++++++- arch/x86/kernel/process.c | 6 +++--- 3 files changed, 21 insertions(+), 11 deletions(-) commit e3736c3eb3a6f7c0966923b629c9f92b558aa9c7 Author: Elena Reshetova Date: Mon Feb 20 13:06:21 2017 +0200 kvm: convert kvm.users_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Radim Krčmář include/linux/kvm_host.h | 3 ++- virt/kvm/kvm_main.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 9ad82f117f057ed04643cc60ce16fbf59e1b167f Author: Arnd Bergmann Date: Wed Mar 1 10:15:31 2017 +0100 watchdog: retu: restore MFD dependency The retu watchdog calls into the respective mfd driver, but fails to link if that is diabled: drivers/watchdog/built-in.o: In function `retu_wdt_set_timeout': ziirave_wdt.c:(.text+0x8c88): undefined reference to `retu_write' ziirave_wdt.c:(.text+0x8c88): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write' drivers/watchdog/built-in.o: In function `retu_wdt_start': ziirave_wdt.c:(.text+0x8cc8): undefined reference to `retu_write' ziirave_wdt.c:(.text+0x8cc8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write' This restores the dependency as it was before Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9297b652bd0a11e29251ffaac93369b8ad45932d Author: Arnd Bergmann Date: Wed Mar 1 10:15:30 2017 +0100 watchdog: db8500: add back prmcu dependency When the db8500 watchdog is enabled without the PRCMU, we get a lot of warnings about duplicate or missing helper functions: In file included from drivers/watchdog/ux500_wdt.c:21:0: include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read' static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) This restores the dependency as it was. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3736d4eb6af37492aeded7fec0072dedd959c842 Author: Arnd Bergmann Date: Wed Mar 1 10:15:29 2017 +0100 watchdog: kempld: fix gcc-4.3 build gcc-4.3 can't decide whether the constant value in kempld_prescaler[PRESCALER_21] is built-time constant or not, and gets confused by the logic in do_div(): drivers/watchdog/kempld_wdt.o: In function `kempld_wdt_set_stage_timeout': kempld_wdt.c:(.text.kempld_wdt_set_stage_timeout+0x130): undefined reference to `__aeabi_uldivmod' This adds a call to ACCESS_ONCE() to force it to not consider it to be constant, and leaves the more efficient normal case in place for modern compilers, using an #ifdef to annotate why we do this hack. Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/kempld_wdt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8d5755b3f77b57447ce5de253ef704ad028474d3 Author: Niklas Cassel Date: Mon Feb 27 13:49:09 2017 +0100 watchdog: softdog: fire watchdog even if softirqs do not get to run Checking for timer expiration is done from the softirq TIMER_SOFTIRQ. Since commit 4cd13c21b207 ("softirq: Let ksoftirqd do its job"), pending softirqs are no longer always handled immediately, instead, if there are pending softirqs, and ksoftirqd is in state TASK_RUNNING, the handling of the softirqs are deferred, and are instead supposed to be handled by ksoftirqd, when ksoftirqd gets scheduled. If a user space process with a real-time policy starts to misbehave by never relinquishing the CPU while ksoftirqd is in state TASK_RUNNING, what will happen is that all softirqs will get deferred, while ksoftirqd, which is supposed to handle the deferred softirqs, will never get to run. To make sure that the watchdog is able to fire even when we do not get to run softirqs, replace the timers with hrtimers. Signed-off-by: Niklas Cassel Signed-off-by: Guenter Roeck drivers/watchdog/softdog.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit ed4a9eca66720366d117d9b39f2335ca9b0a7aae Author: Arnd Bergmann Date: Tue Feb 28 22:01:23 2017 +0100 watchdog: kempld: revert to full dependency The kempld watchdog driver requires the respective MFD driver: drivers/watchdog/built-in.o: In function `kempld_wdt_probe': kempld_wdt.c:(.text+0x5c78): undefined reference to `kempld_get_mutex' kempld_wdt.c:(.text+0x5c84): undefined reference to `kempld_read8' kempld_wdt.c:(.text+0x5c8e): undefined reference to `kempld_release_mutex' kempld_wdt.c:(.text+0x5d1c): undefined reference to `kempld_read8' kempld_wdt.c:(.text+0x5d2c): undefined reference to `kempld_write8' This adds the Kconfig dependency back. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2672b7e01abbe147a0a391216bc0dbd656608e0a Author: Arnd Bergmann Date: Tue Feb 28 22:01:22 2017 +0100 watchdog: bcm2835: add CONFIG_OF dependency Without CONFIG_OF, the driver fails to link: drivers/watchdog/built-in.o: In function `bcm2835_power_off': bcm2835_wdt.c:(.text+0x1946): undefined reference to `of_find_device_by_node' This adds a new dependency, to allow the COMPILE_TEST check to succeed. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eafee95643360d22c6725ea2188bd700c09c986 Author: Arnd Bergmann Date: Tue Feb 28 22:01:21 2017 +0100 watchdog: sp805: add back AMBA dependency The driver fails to link if ARM_AMBA is disabled: drivers/watchdog/sp805_wdt.o: In function `sp805_wdt_driver_init': sp805_wdt.c:(.init.text+0x4): undefined reference to `amba_driver_register' It seems that the COMPILE_TEST was added in the wrong place, as there is no architecture dependency, but a bus dependency. This moves the dependency accordingly. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fb303a81a0b106e7f5522df929bbf4596780c48 Author: Arnd Bergmann Date: Tue Feb 28 22:01:20 2017 +0100 watchdog: menf21bmc: add I2C dependency This driver fails to link when CONFIG_I2C is disabled or a loadable module while the watchdog is built-in: drivers/watchdog/built-in.o: In function `menf21bmc_wdt_shutdown': menf21bmc_wdt.c:(.text+0x9b44): undefined reference to `i2c_smbus_write_word_data' menf21bmc_wdt.c:(.text+0x9b44): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `i2c_smbus_write_word_data' This adds a Kconfig dependency for it, to enforce a valid configuration. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0369fdf2e1169896529bd53c3b5fb15511768276 Author: Arnd Bergmann Date: Tue Feb 28 22:01:19 2017 +0100 watchdog: geode: restore hard CS5535_MFGPT dependency Wtihout CONFIG_CS5535_MFGPT, the driver does not link right: drivers/watchdog/built-in.o: In function `geodewdt_probe': geodewdt.c:(.init.text+0xca3): undefined reference to `cs5535_mfgpt_alloc_timer' geodewdt.c:(.init.text+0xcd4): undefined reference to `cs5535_mfgpt_write' geodewdt.c:(.init.text+0xcef): undefined reference to `cs5535_mfgpt_toggle_event' This adds back the dependency on this base driver. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0e32fba85d5b7902db2715a9d5540fb0efdba83 Author: Arnd Bergmann Date: Tue Feb 28 22:01:18 2017 +0100 watchdog: wm831x watchdog really needs mfd The wm831x watchdog driver can now be built without the wm831x mfd driver, which results in a link error: (.text+0x1a95c): undefined reference to `wm831x_set_bits' (.text+0x1a95c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_set_bits' (.text+0x1a968): undefined reference to `wm831x_reg_lock' (.text+0x1a968): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_lock' (.text+0x1a9dc): undefined reference to `wm831x_reg_unlock' (.text+0x1a9dc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_unlock' This adds back the dependency that was removed. We can still build test this driver on all architectures by enabling the MFD driver for it first. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55149d06534ae2a7ba5f7a078353deb89b3fe891 Author: Josh Poimboeuf Date: Wed Mar 1 00:05:04 2017 -0600 objtool, compiler.h: Fix __unreachable section relocation size Linus reported the following commit broke module loading on his laptop: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") It showed errors like the following: module: overflow in relocation type 10 val ffffffffc02afc81 module: 'nvme' likely not compiled with -mcmodel=kernel The problem is that the __unreachable section addresses are stored using the '.long' asm directive, which isn't big enough for .text section kernel addresses. Use relative addresses instead: ".long %c0b - .\t\n" Suggested-by: Linus Torvalds Reported-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Link: http://lkml.kernel.org/r/20170301060504.oltm3iws6fmubnom@treble Signed-off-by: Ingo Molnar include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bba82fd75694832b59433bf4e9d7ede8de1dfd42 Author: Robert O'Callahan Date: Wed Feb 1 17:06:11 2017 +1300 KVM: x86: never specify a sample period for virtualized in_tx_cp counters pmc_reprogram_counter() always sets a sample period based on the value of pmc->counter. However, hsw_hw_config() rejects sample periods less than 2^31 - 1. So for example, if a KVM guest does struct perf_event_attr attr; memset(&attr, 0, sizeof(attr)); attr.type = PERF_TYPE_RAW; attr.size = sizeof(attr); attr.config = 0x2005101c4; // conditional branches retired IN_TXCP attr.sample_period = 0; int fd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0); ioctl(fd, PERF_EVENT_IOC_DISABLE, 0); ioctl(fd, PERF_EVENT_IOC_ENABLE, 0); the guest kernel counts some conditional branch events, then updates the virtual PMU register with a nonzero count. The host reaches pmc_reprogram_counter() with nonzero pmc->counter, triggers EOPNOTSUPP in hsw_hw_config(), prints "kvm_pmu: event creation failed" in pmc_reprogram_counter(), and silently (from the guest's point of view) stops counting events. We fix event counting by forcing attr.sample_period to always be zero for in_tx_cp counters. Sampling doesn't work, but it already didn't work and can't be fixed without major changes to the approach in hsw_hw_config(). Signed-off-by: Robert O'Callahan Signed-off-by: Radim Krčmář arch/x86/kvm/pmu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 25b68a8f0ab13a98de02650208ec927796659898 Author: Stephen Smalley Date: Fri Feb 17 10:13:59 2017 -0500 timerfd: Only check CAP_WAKE_ALARM when it is needed timerfd_create() and do_timerfd_settime() evaluate capable(CAP_WAKE_ALARM) unconditionally although CAP_WAKE_ALARM is only required for CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM. This can cause extraneous audit messages when using a LSM such as SELinux, incorrectly causes PF_SUPERPRIV to be set even when no privilege was exercised, and is inefficient. Flip the order of the tests in both functions so that we only call capable() if the capability is truly required for the operation. Signed-off-by: Stephen Smalley Cc: linux-security-module@vger.kernel.org Cc: selinux@tycho.nsa.gov Link: http://lkml.kernel.org/r/1487344439-22293-1-git-send-email-sds@tycho.nsa.gov Signed-off-by: Thomas Gleixner fs/timerfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1c68bb0f62bf8de8bb30123ea840d5168f25abea Author: Laura Abbott Date: Tue Feb 28 14:07:25 2017 -0800 crypto: testmgr - Pad aes_ccm_enc_tv_template vector Running with KASAN and crypto tests currently gives BUG: KASAN: global-out-of-bounds in __test_aead+0x9d9/0x2200 at addr ffffffff8212fca0 Read of size 16 by task cryptomgr_test/1107 Address belongs to variable 0xffffffff8212fca0 CPU: 0 PID: 1107 Comm: cryptomgr_test Not tainted 4.10.0+ #45 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.1-1.fc24 04/01/2014 Call Trace: dump_stack+0x63/0x8a kasan_report.part.1+0x4a7/0x4e0 ? __test_aead+0x9d9/0x2200 ? crypto_ccm_init_crypt+0x218/0x3c0 [ccm] kasan_report+0x20/0x30 check_memory_region+0x13c/0x1a0 memcpy+0x23/0x50 __test_aead+0x9d9/0x2200 ? kasan_unpoison_shadow+0x35/0x50 ? alg_test_akcipher+0xf0/0xf0 ? crypto_skcipher_init_tfm+0x2e3/0x310 ? crypto_spawn_tfm2+0x37/0x60 ? crypto_ccm_init_tfm+0xa9/0xd0 [ccm] ? crypto_aead_init_tfm+0x7b/0x90 ? crypto_alloc_tfm+0xc4/0x190 test_aead+0x28/0xc0 alg_test_aead+0x54/0xd0 alg_test+0x1eb/0x3d0 ? alg_find_test+0x90/0x90 ? __sched_text_start+0x8/0x8 ? __wake_up_common+0x70/0xb0 cryptomgr_test+0x4d/0x60 kthread+0x173/0x1c0 ? crypto_acomp_scomp_free_ctx+0x60/0x60 ? kthread_create_on_node+0xa0/0xa0 ret_from_fork+0x2c/0x40 Memory state around the buggy address: ffffffff8212fb80: 00 00 00 00 01 fa fa fa fa fa fa fa 00 00 00 00 ffffffff8212fc00: 00 01 fa fa fa fa fa fa 00 00 00 00 01 fa fa fa >ffffffff8212fc80: fa fa fa fa 00 05 fa fa fa fa fa fa 00 00 00 00 ^ ffffffff8212fd00: 01 fa fa fa fa fa fa fa 00 00 00 00 01 fa fa fa ffffffff8212fd80: fa fa fa fa 00 00 00 00 00 05 fa fa fa fa fa fa This always happens on the same IV which is less than 16 bytes. Per Ard, "CCM IVs are 16 bytes, but due to the way they are constructed internally, the final couple of bytes of input IV are dont-cares. Apparently, we do read all 16 bytes, which triggers the KASAN errors." Fix this by padding the IV with null bytes to be at least 16 bytes. Cc: stable@vger.kernel.org Fixes: 0bc5a6c5c79a ("crypto: testmgr - Disable rfc4309 test and convert test vectors") Acked-by: Ard Biesheuvel Signed-off-by: Laura Abbott Signed-off-by: Herbert Xu crypto/testmgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efa7cebdbfde8506b54acd8947822394768cd476 Author: Ard Biesheuvel Date: Tue Feb 28 14:36:57 2017 +0000 crypto: arm/crc32 - add build time test for CRC instruction support The accelerated CRC32 module for ARM may use either the scalar CRC32 instructions, the NEON 64x64 to 128 bit polynomial multiplication (vmull.p64) instruction, or both, depending on what the current CPU supports. However, this also requires support in binutils, and as it turns out, versions of binutils exist that support the vmull.p64 instruction but not the crc32 instructions. So refactor the Makefile logic so that this module only gets built if binutils has support for both. Signed-off-by: Ard Biesheuvel Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Herbert Xu arch/arm/crypto/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 1fb1683cb343d80736625f3048de2107cf5bbf79 Author: Ard Biesheuvel Date: Tue Feb 28 14:36:56 2017 +0000 crypto: arm/crc32 - fix build error with outdated binutils Annotate a vmov instruction with an explicit element size of 32 bits. This is inferred by recent toolchains, but apparently, older versions need some help figuring this out. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/crc32-ce-core.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8392f16d38bb5222c03073a3906b7fd272386faf Author: Borislav Petkov Date: Tue Feb 21 19:36:39 2017 +0100 x86/boot: Correct setup_header.start_sys name It is called start_sys_seg elsewhere so rename it to that. It is an obsolete field so we could just as well directly call it __u16 __pad... No functional change. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170221183639.16554-1-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/uapi/asm/bootparam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e98fe5127b9cc8ab33d1094b81c19deb1f9082bf Author: Tobin C. Harding Date: Mon Feb 20 10:12:36 2017 +1100 x86/purgatory: Fix sparse warning, symbol not declared Sparse emits warning, 'symbol not declared' for a function that has neither file scope nor a forward declaration. The functions only call site is an ASM file. Add a header file with the function declaration. Include the header file in the C source file defining the function in order to fix the sparse warning. Include the header file in ASM file containing the call site to document the usage. Signed-off-by: Tobin C. Harding Link: http://lkml.kernel.org/r/1487545956-2547-3-git-send-email-me@tobin.cc Signed-off-by: Thomas Gleixner arch/x86/purgatory/purgatory.c | 1 + arch/x86/purgatory/purgatory.h | 8 ++++++++ arch/x86/purgatory/setup-x86_64.S | 1 + 3 files changed, 10 insertions(+) commit 72042a8c7b01048a36ece216aaf206b7d60ca661 Author: Tobin C. Harding Date: Mon Feb 20 10:12:35 2017 +1100 x86/purgatory: Make functions and variables static Sparse emits several 'symbol not declared' warnings for various functions and variables. Add static keyword to functions and variables which have file scope only. Signed-off-by: Tobin C. Harding Link: http://lkml.kernel.org/r/1487545956-2547-2-git-send-email-me@tobin.cc Signed-off-by: Thomas Gleixner arch/x86/purgatory/purgatory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 940b2f2fd963c043418ce8af64605783b2b19140 Author: Borislav Petkov Date: Sat Feb 18 12:31:40 2017 +0100 x86/events: Remove last remnants of old filenames Update to the new file paths, remove them from introductory comments. Signed-off-by: Borislav Petkov Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170218113140.8051-1-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/events/amd/core.c | 2 +- arch/x86/events/intel/cstate.c | 2 +- arch/x86/events/intel/rapl.c | 2 +- arch/x86/events/intel/uncore.h | 6 +++--- tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 58ab9a088ddac4efe823471275859d64f735577e Author: Dave Hansen Date: Thu Feb 23 14:26:03 2017 -0800 x86/pkeys: Check against max pkey to avoid overflows Kirill reported a warning from UBSAN about undefined behavior when using protection keys. He is running on hardware that actually has support for it, which is not widely available. The warning triggers because of very large shifts of integers when doing a pkey_free() of a large, invalid value. This happens because we never check that the pkey "fits" into the mm_pkey_allocation_map(). I do not believe there is any danger here of anything bad happening other than some aliasing issues where somebody could do: pkey_free(35); and the kernel would effectively execute: pkey_free(8); While this might be confusing to an app that was doing something stupid, it has to do something stupid and the effects are limited to the app shooting itself in the foot. Signed-off-by: Dave Hansen Cc: stable@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: shuah@kernel.org Cc: kirill.shutemov@linux.intel.com Link: http://lkml.kernel.org/r/20170223222603.A022ED65@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/pkeys.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f2ae5da726172fcf82f7be801489dd585f6a38eb Author: Rui Wang Date: Tue Feb 28 21:34:29 2017 +0800 x86/ioapic: Split IOAPIC hot-removal into two steps The hot removal of IOAPIC is handling PCI and ACPI removal in one go. That only works when the PCI drivers released the interrupt resources, but breaks when a IOAPIC interrupt is still associated to a PCI device. The new pcibios_release_device() callback allows to solve that problem by splitting the removal into two steps: 1) PCI removal: Release all PCI resources including eventually not yet released IOAPIC interrupts via the new pcibios_release_device() callback. 2) ACPI removal: After release of all PCI resources the ACPI resources can be released without issue. [ tglx: Rewrote changelog ] Signed-off-by: Rui Wang Cc: tony.luck@intel.com Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: fengguang.wu@intel.com Cc: helgaas@kernel.org Cc: kbuild-all@01.org Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1488288869-31290-3-git-send-email-rui.y.wang@intel.com Signed-off-by: Thomas Gleixner drivers/acpi/internal.h | 2 ++ drivers/acpi/ioapic.c | 22 ++++++++++++++++------ drivers/acpi/pci_root.c | 4 ++-- 3 files changed, 20 insertions(+), 8 deletions(-) commit 153654dbe595a68845ba14d5b0bfe299fa6a7e99 Author: Rui Wang Date: Tue Feb 28 21:34:28 2017 +0800 x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC The revert of 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") causes a problem for IOAPIC hotplug. The problem is that IRQs are allocated and freed in pci_enable_device() and pci_disable_device(). But there are some drivers which don't call pci_disable_device(), and they have good reasons not calling it, so if they're using IOAPIC their IRQs won't have a chance to be released from the IOAPIC. When this happens IOAPIC hot-removal fails with a kernel stack dump and an error message like this: [149335.697989] pin16 on IOAPIC2 is still in use. It turns out that we can fix it in a different way without moving IRQ allocation into pcibios_alloc_irq(), thus avoiding the regression of 991de2e59090. We can keep the allocation and freeing of IRQs as is within pci_enable_device()/pci_disable_device(), without breaking any previous assumption of the rest of the system, keeping compatibility with both the legacy and the modern drivers. We can accomplish this by implementing the existing __weak hook of pcibios_release_device() thus when a pci device is about to be deleted we get notified in the hook and take the chance to release its IRQ, if any, from the IOAPIC. Implement pcibios_release_device() for x86 to release any IRQ not released by the driver. Signed-off-by: Rui Wang Cc: tony.luck@intel.com Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: fengguang.wu@intel.com Cc: helgaas@kernel.org Cc: kbuild-all@01.org Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1488288869-31290-2-git-send-email-rui.y.wang@intel.com Signed-off-by: Thomas Gleixner arch/x86/pci/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e86a2d2d34e20289ae7d46692e16d43c3a785db9 Author: Masanari Iida Date: Mon Feb 27 22:07:03 2017 +0900 x86/intel_rdt: Remove duplicate inclusion of linux/cpu.h Signed-off-by: Masanari Iida Cc: fenghua.yu@intel.com Link: http://lkml.kernel.org/r/20170227130703.26968-1-standby24x7@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 1 - 1 file changed, 1 deletion(-) commit aa5ec3f715d576353c7d8f4f8085634bd845b73f Author: Masanari Iida Date: Mon Feb 27 21:29:22 2017 +0900 x86/vmware: Remove duplicate inclusion of asm/timer.h Signed-off-by: Masanari Iida Cc: akataria@vmware.com Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170227122922.26230-1-standby24x7@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/vmware.c | 1 - 1 file changed, 1 deletion(-) commit 73667e31a153a66da97feb1584726222504924f8 Author: Arnd Bergmann Date: Tue Feb 14 22:17:17 2017 +0100 x86/hyperv: Hide unused label This new 32-bit warning just showed up: arch/x86/hyperv/hv_init.c: In function 'hyperv_init': arch/x86/hyperv/hv_init.c:167:1: error: label 'register_msr_cs' defined but not used [-Werror=unused-label] The easiest solution is to move the label up into the existing #ifdef that has the goto. Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource") Signed-off-by: Arnd Bergmann Acked-by: Stephen Hemminger Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: devel@linuxdriverproject.org Cc: Vitaly Kuznetsov Cc: "K. Y. Srinivasan" Link: http://lkml.kernel.org/r/20170214211736.2641241-1-arnd@arndb.de Signed-off-by: Thomas Gleixner arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90b28ded88dda8bea82b4a86923e73ba0746d884 Author: Matjaz Hegedic Date: Sun Feb 19 19:32:48 2017 +0100 x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk Without the parameter reboot=a, ASUS EeeBook X205TA will hang when it should reboot. This adds the appropriate quirk, thus fixing the problem. Signed-off-by: Matjaz Hegedic 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 Signed-off-by: Ingo Molnar arch/x86/kernel/reboot.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1b17c6df852851b40c3c27c66b8fa2fd99cf25d8 Author: Andrew Banman Date: Fri Feb 17 11:07:49 2017 -0600 x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register Writing to the software acknowledge clear register when there are no pending messages causes a HUB error to assert. The original intent of this write was to clear the pending bits before start of operation, but this is an incorrect method and has been determined to be unnecessary. Signed-off-by: Andrew Banman Acked-by: Mike Travis Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: rja@hpe.com Cc: sivanich@hpe.com Link: http://lkml.kernel.org/r/1487351269-181133-1-git-send-email-abanman@hpe.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 1 - 1 file changed, 1 deletion(-) commit 6b0b7551428e4caae1e2c023a529465a9a9ae2d4 Author: Anton Blanchard Date: Thu Feb 16 17:00:50 2017 +1100 perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS We have uses of CONFIG_UPROBE_EVENT and CONFIG_KPROBE_EVENT as well as CONFIG_UPROBE_EVENTS and CONFIG_KPROBE_EVENTS. Consistently use the plurals. Signed-off-by: Anton Blanchard Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: davem@davemloft.net Cc: sparclinux@vger.kernel.org Link: http://lkml.kernel.org/r/20170216060050.20866-1-anton@ozlabs.org Signed-off-by: Ingo Molnar Documentation/trace/kprobetrace.txt | 2 +- Documentation/trace/uprobetracer.txt | 2 +- arch/powerpc/configs/85xx/kmp204x_defconfig | 2 +- arch/s390/configs/default_defconfig | 2 +- arch/s390/configs/gcov_defconfig | 2 +- arch/s390/configs/performance_defconfig | 2 +- arch/s390/defconfig | 2 +- kernel/trace/Kconfig | 6 +++--- kernel/trace/Makefile | 4 ++-- kernel/trace/trace.c | 10 +++++----- kernel/trace/trace_probe.h | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) commit 2a4d0c627f5374f365a873dea4e10ae0bb437680 Author: Dmitry Safonov Date: Mon Feb 13 13:13:36 2017 +0300 x86/selftests: Add clobbers for int80 on x86_64 Kernel erases R8..R11 registers prior returning to userspace from int80: https://lkml.org/lkml/2009/10/1/164 GCC can reuse these registers and doesn't expect them to change during syscall invocation. I met this kind of bug in CRIU once GCC 6.1 and CLANG stored local variables in those registers and the kernel zerofied them during syscall: https://github.com/xemul/criu/commit/990d33f1a1cdd17bca6c2eb059ab3be2564f7fa2 By that reason I suggest to add those registers to clobbers in selftests. Also, as noted by Andy - removed unneeded clobber for flags in INT $0x80 inline asm. Signed-off-by: Dmitry Safonov Acked-by: Andy Lutomirski Cc: 0x7f454c46@gmail.com 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: Shuah Khan Cc: Thomas Gleixner Cc: linux-kselftest@vger.kernel.org Link: http://lkml.kernel.org/r/20170213101336.20486-1-dsafonov@virtuozzo.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/fsgsbase.c | 2 +- tools/testing/selftests/x86/ldt_gdt.c | 16 +++++++++++----- tools/testing/selftests/x86/ptrace_syscall.c | 3 ++- tools/testing/selftests/x86/single_step_syscall.c | 5 ++++- 4 files changed, 18 insertions(+), 8 deletions(-) commit 11277aabcbbe13916151af897d29a5e9f71ca73f Author: Dou Liyang Date: Thu Feb 23 17:16:41 2017 +0800 x86/apic: Simplify enable_IR_x2apic(), remove try_to_enable_IR() The following commit: 2e63ad4bd5dd ("x86/apic: Do not init irq remapping if ioapic is disabled") ... added a check for skipped IO-APIC setup to enable_IR_x2apic(), but this check is also duplicated in try_to_enable_IR() - and it will never succeed in calling irq_remapping_enable(). Remove the whole irq_remapping_enable() complication: if the IO-APIC is disabled we cannot enable IRQ remapping. Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: nicstange@gmail.com Cc: wanpeng.li@hotmail.com Link: http://lkml.kernel.org/r/1487841401-1543-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit bb3f0a52630c84807fca9bdd76ac2f5dcec82689 Author: Dou Liyang Date: Tue Feb 28 13:50:52 2017 +0800 x86/apic: Fix a warning message in logical CPU IDs allocation The current warning message in allocate_logical_cpuid() is somewhat confusing: Only 1 processors supported.Processor 2/0x2 and the rest are ignored. As it might imply that there's only one CPU in the system - while what we ran into here is a kernel limitation. Fix the warning message to clarify all that: APIC: NR_CPUS/possible_cpus limit of 2 reached. Processor 2/0x2 and the rest are ignored. ( Also update the error return from -1 to -EINVAL, which is the more canonical return value. ) Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: nicstange@gmail.com Cc: wanpeng.li@hotmail.com Link: http://lkml.kernel.org/r/1488261052-25753-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b28ace12661fbcfd90959c1e84ff5a85113a82a1 Author: Franck Demathieu Date: Thu Feb 23 10:48:55 2017 +0100 irqchip/crossbar: Fix incorrect type of local variables The max and entry variables are unsigned according to the dt-bindings. Fix following 3 sparse issues (-Wtypesign): drivers/irqchip/irq-crossbar.c:222:52: warning: incorrect type in argument 3 (different signedness) drivers/irqchip/irq-crossbar.c:222:52: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:222:52: got int * drivers/irqchip/irq-crossbar.c:245:56: warning: incorrect type in argument 4 (different signedness) drivers/irqchip/irq-crossbar.c:245:56: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:245:56: got int * drivers/irqchip/irq-crossbar.c:263:56: warning: incorrect type in argument 4 (different signedness) drivers/irqchip/irq-crossbar.c:263:56: expected unsigned int [usertype] *out_value drivers/irqchip/irq-crossbar.c:263:56: got int * Signed-off-by: Franck Demathieu Cc: marc.zyngier@arm.com Cc: jason@lakedaemon.net Link: http://lkml.kernel.org/r/20170223094855.6546-1-fdemathieu@gmail.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-crossbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d03bd0454b101adb94d0b5a9cc11396182943cb4 Author: Martin Schwidefsky Date: Wed Mar 1 09:47:57 2017 +0100 s390/timex: micro optimization for tod_to_ns The conversion of a TOD value to nano-seconds currently uses a 32/32 bit split with the calculation for "nsecs = (TOD * 125) >> 9". Using a 55/9 bit split saves an instruction. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/timex.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit e53051e757d6cd66741955b93581e54415e48a70 Author: Martin Schwidefsky Date: Wed Mar 1 09:21:10 2017 +0100 s390/cputime: provide archicture specific cputime_to_nsecs The generic cputime_to_nsecs function first converts the cputime to micro-seconds and then multiplies the result with 1000. This looses some bits of accuracy, provide our own version of cputime_to_nsecs that does not loose precision. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cputime.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3c915bdc1775acfa214195da1ffb39dabdd1a389 Author: Martin Schwidefsky Date: Wed Mar 1 09:18:34 2017 +0100 s390/cputime: reset all accounting fields on fork copy_thread has to reset all cputime related field in the task struct, not only user_timer and system_timer. Signed-off-by: Martin Schwidefsky arch/s390/kernel/process.c | 3 +++ 1 file changed, 3 insertions(+) commit e69ca822ce0ed3ba006ce384d7d205c81d92373f Author: Martin Schwidefsky Date: Wed Mar 1 09:16:03 2017 +0100 s390/cputime: remove last traces of cputime_t The cputime_t type is a thing of the past, replace the last occurences of the type in the s390 code with a simple u64. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cputime.h | 14 ++------------ arch/s390/kernel/vtime.c | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) commit d9fcf2a1cbd1ff65d0109b1b400938808007fcd5 Author: Martin Schwidefsky Date: Tue Feb 28 07:42:01 2017 +0100 s390: fix in-kernel program checks A program check inside the kernel takes a slightly different path in entry.S compare to a normal user fault. A recent change moved the store of the breaking event address into the path taken for in-kernel program checks as well, but %r14 has not been setup to point to the correct location. A wild store is the consequence. Move the store of the breaking event address to the code path for user space faults. Fixes: 34525e1f7e8d ("s390: store breaking event address only for program checks") Reported-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e7c95effcd3a7a0c9535c809141ca499fede2c31 Author: Martin Schwidefsky Date: Tue Feb 28 07:05:59 2017 +0100 s390/crypt: fix missing unlock in ctr_paes_crypt on error path The ctr mode of protected key aes uses the ctrblk page if the ctrblk_lock could be acquired. If the protected key has to be reestablished and this operation fails the unlock for the ctrblk_lock is missing. Add it. Signed-off-by: Martin Schwidefsky arch/s390/crypto/paes_s390.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 10bce8410607a18eb3adf5d2739db8c8593e110d Author: Borislav Petkov Date: Mon Feb 27 23:50:58 2017 +0100 x86/kdebugfs: Move boot params hierarchy under (debugfs)/x86/ ... since this is all x86-specific data and it makes sense to have it under x86/ logically instead in the toplevel debugfs dir. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170227225058.27289-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/kdebugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75013fb16f8484898eaa8d0b08fed942d790f029 Author: Masami Hiramatsu Date: Wed Mar 1 01:23:24 2017 +0900 kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed Fix to the exception table entry check by using probed address instead of the address of copied instruction. This bug may cause unexpected kernel panic if user probe an address where an exception can happen which should be fixup by __ex_table (e.g. copy_from_user.) Unless user puts a kprobe on such address, this doesn't cause any problem. This bug has been introduced years ago, by commit: 464846888d9a ("x86/kprobes: Fix a bug which can modify kernel code permanently"). Signed-off-by: Masami Hiramatsu Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 464846888d9a ("x86/kprobes: Fix a bug which can modify kernel code permanently") Link: http://lkml.kernel.org/r/148829899399.28855.12581062400757221722.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/common.h | 2 +- arch/x86/kernel/kprobes/core.c | 6 +++--- arch/x86/kernel/kprobes/opt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 86ef58a4e35e8fa66afb5898cf6dec6a3bb29f67 Author: Dan Williams Date: Tue Feb 28 18:32:48 2017 -0800 nfit, libnvdimm: fix interleave set cookie calculation The interleave-set cookie is a sum that sanity checks the composition of an interleave set has not changed from when the namespace was initially created. The checksum is calculated by sorting the DIMMs by their location in the interleave-set. The comparison for the sort must be 64-bit wide, not byte-by-byte as performed by memcmp() in the broken case. Fix the implementation to accept correct cookie values in addition to the Linux "memcmp" order cookies, but only allow correct cookies to be generated going forward. It does mean that namespaces created by third-party-tooling, or created by newer kernels with this fix, will not validate on older kernels. However, there are a couple mitigating conditions: 1/ platforms with namespace-label capable NVDIMMs are not widely available. 2/ interleave-sets with a single-dimm are by definition not affected (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case. The cookie stored in the namespace label will be fixed by any write the namespace label, the most straightforward way to achieve this is to write to the "alt_name" attribute of a namespace in sysfs. Cc: Fixes: eaf961536e16 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure") Reported-by: Nicholas Moulin Tested-by: Nicholas Moulin Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 16 +++++++++++++++- drivers/nvdimm/namespace_devs.c | 18 ++++++++++++++---- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/region_devs.c | 9 +++++++++ include/linux/libnvdimm.h | 2 ++ 5 files changed, 41 insertions(+), 5 deletions(-) commit 9dcfe2c75b51f454f39c2de4756e841228865b47 Author: Ingo Molnar Date: Wed Mar 1 09:25:55 2017 +0100 locking/refcounts: Change WARN() to WARN_ONCE() Linus noticed that the new refcount.h APIs used WARN(), which would turn into a dmesg DoS if it triggers frequently on some buggy driver. So make sure we only warn once. These warnings are never supposed to happen, so it's typically not a problem to lose subsequent warnings. Suggested-by: Linus Torvalds Cc: Peter Zijlstra (Intel) Cc: Elena Reshetova Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/CA+55aFzbYUTZ=oqZ2YgDjY0C2_n6ODhTfqj6V+m5xWmDxsuB0w@mail.gmail.com Signed-off-by: Ingo Molnar lib/refcount.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a45e47f4b342884dcf9e40a530033f64c379ffc7 Author: Arnd Bergmann Date: Mon Feb 27 21:42:16 2017 +0100 staging: fsl-mc: fix warning in DT ranges parser The fsl-mc-bus driver in staging contains a copy of the standard 'ranges' property parsing algorithm with a hack to treat a missing property the same way as an empty one. This code produces false-positive warnings for me in an allmodconfig build: drivers/staging/fsl-mc/bus/fsl-mc-bus.c: In function 'fsl_mc_bus_probe': drivers/staging/fsl-mc/bus/fsl-mc-bus.c:645:6: error: 'mc_size_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/staging/fsl-mc/bus/fsl-mc-bus.c:682:8: error: 'mc_addr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/staging/fsl-mc/bus/fsl-mc-bus.c:644:6: note: 'mc_addr_cells' was declared here drivers/staging/fsl-mc/bus/fsl-mc-bus.c:684:8: error: 'paddr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/staging/fsl-mc/bus/fsl-mc-bus.c:643:6: note: 'paddr_cells' was declared here To avoid the warnings, I'm simplifying the argument handling to pass the number of valid ranges in the property as the function return code rather than passing it by reference. With this change, gcc can see that we don't evaluate the cell numbers for an missing ranges property. Signed-off-by: Arnd Bergmann Acked-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 87bfbddd0935f7a3acf36b883707aee816d4bb49 Author: Noralf Trønnes Date: Sun Feb 26 15:44:42 2017 +0100 MAINTAINERS: Remove Noralf Trønnes as fbtft maintainer Due to personal reasons I'm unable to continue as fbtft maintainer. Signed-off-by: Noralf Trønnes Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit df06a2d57711a1472ced72207373eeb6422d4721 Author: Dan Williams Date: Wed Mar 1 00:03:37 2017 -0800 tools/testing/nvdimm: make iset cookie predictable For testing changes to the iset cookie algorithm we need a value that is constant from run-to-run. Stop including dynamic data in the emulated region_offset values. Also, pick values that sort in a different order depending on whether the comparison is a memcmp() of two 8-byte arrays or subtraction of two 64-bit values. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b6b6fbc8310e1b12b05717da9df6953b138f812b Author: Chuanxiao Dong Date: Wed Mar 1 14:34:52 2017 +0800 drm/i915/gvt: use pfn_valid for better checking Before get the page from pfn, use pfn_valid to check if pfn is able to translate to page structure. Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3942ed8c66bcff496abee5182422cd542962d9e Author: Len Brown Date: Sat Jan 21 02:33:23 2017 -0500 tools/power turbostat: version 17.02.24 The turbostat before this last set of changes is obsolete. This new version can do a lot more, but it also has some different defaults, that might catch some off-guard. So it seems a good time to give a new version number. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f3aea57773dc7f788e374994636ffc0234a355f Author: Len Brown Date: Thu Feb 23 18:10:27 2017 -0500 tools/power turbostat: bugfix: --add u32 was printed as u64 When the "u32" keyword is used with --add, it means that the output should be truncated to 32-bits. This was not happening and all 64-bits were printed. Also, when no column name was used for an added MSR, The default column name was in deximal, eg. MSR16. Users report that they tend to use hex MSR numbers, so print them in hex. To always fit into the columns, use the syntax M0x10. Note that the user can always supply any column header that they want. eg --add msr0x10,MY_TSC Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 0815a3d09baf2cd330f75020bdaad0f1adac0ecb Author: Len Brown Date: Thu Feb 23 17:00:51 2017 -0500 tools/power turbostat: show error on exec When turbostat is run in one-shot command mode, the parent takes the 'before' counter snapshot, fork/exec/wait for the child to exit, takes the 'after' counter snapshot, and prints the results. however, if the child fails to exec the command, it immediately returns, without indicating that anythign was wrong. Add an error message showing that exec failed: sudo turbostat sleeeep 4 ... turbostat: exec sleeeep: No such file or directory ... Note that the parent will still print out the statistics, because it can't tell the difference between the failed exec and a command that is purposefully returning the same status. Unfortunately, this may obscure the error message. However, if the --out parameter is used, the error message is evident on stderr. Reported-by: Wendy Wang Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit 7293fccdffdec0ab0c36c4e4cffacb3ff114928e Author: Len Brown Date: Wed Feb 22 00:11:12 2017 -0500 tools/power turbostat: dump p-state software config cpu1: cpufreq driver: acpi-cpufreq cpu1: cpufreq governor: ondemand cpufreq boost: 1 or cpu0: cpufreq driver: intel_pstate cpu0: cpufreq governor: powersave cpufreq intel_pstate no_turbo: 0 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 7da6e3e2125d24040b3648ddc61edf70eb533849 Author: Len Brown Date: Tue Feb 21 23:43:41 2017 -0500 tools/power turbostat: show package number, even without --debug On multi-package systems, the "Package" column was being displayed only if --debug was used. Show it always. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd778a5e6bbd0f52f34c61ae9b42b725c5f22398 Author: Len Brown Date: Tue Feb 21 23:21:13 2017 -0500 tools/power turbostat: support "--hide C1" etc. Originally, the only way to hide the sysfs C-state statistics columns was with "--hide sysfs". This was because we process "--hide" before we probe for those columns. hack --hide to remember deferred hide requests, and apply them when sysfs is probed. "--hide sysfs" is still available as short-hand to refer to the entire group of counters. The down-side of this change is that we no longer error check for bogus --hide column names. But the user will quickly figure that out if a column they mean to hide is still there... Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 +- tools/power/x86/turbostat/turbostat.c | 115 +++++++++++++++++++++------------- 2 files changed, 73 insertions(+), 44 deletions(-) commit 4e4e1e7c6eaf387f8ec803f37f154fdd60e303c0 Author: Len Brown Date: Tue Feb 21 22:33:42 2017 -0500 tools/power turbostat: move --Package and --processor into the --cpu option --Package is now "--cpu package", which will display just the 1st CPU in each package --processor is not "--cpu core" which will display just the 1st CPU in each core Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 6 +----- tools/power/x86/turbostat/turbostat.c | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 16 deletions(-) commit da67e2b9fd1d846a41978690da0a899d8e4378ec Author: Len Brown Date: Wed Feb 15 00:30:22 2017 -0500 tools/power turbostat: turbostat.8 update update examples to show recently updated features. In particular --add --show --hide --cpu --list Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 238 ++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 98 deletions(-) commit 6168c2e0fb5084d187aa8f3ec4093db5e161d4dc Author: Len Brown Date: Thu Feb 16 23:07:51 2017 -0500 tools/power turbostat: update --list feature Make it possible to take the entire un-edited output from `turbostat --list` and feed it to "turbostat --show" or "turbostat --hide". To do this, the leading comma was removed (no mater what columns are active) and also they dynamic C-state "C1, C2, C3" etc are replaced by the string "sysfs", which refers to them as a group. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 219 ++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 106 deletions(-) commit 0de6c0df4ecc32ffaf064fea3a43846ba4474bd0 Author: Len Brown Date: Wed Feb 15 21:45:40 2017 -0500 tools/power turbostat: use wide columns to display large numbers When a counter overlfows 7 columns, it shifts the remaining columns to the right, so they no longer line up under their column header. Update turbostat to dectect when it is handling large numbers, and switch to wider columns where, necessary. Reported-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 68 ++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 13 deletions(-) commit c8ade3616a1a5cf7767c0338d2b02007796f5d88 Author: Len Brown Date: Wed Feb 15 17:15:11 2017 -0500 tools/power turbostat: Add --list option to show available header names It is handy to know the list of column header names, so that they can be used with --add and --skip The new --list option shows them: sudo ./turbostat --list --hide sysfs ,Core,CPU,Avg_MHz,Busy%,Bzy_MHz,TSC_MHz,IRQ,SMI,CPU%c1,CPU%c3,CPU%c6,CPU%c7,CoreTmp,PkgTmp,GFX%rc6,GFXMHz,PkgWatt,CorWatt,GFXWatt Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 118 +++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 52 deletions(-) commit 218f0e8d5c388767be9c78fd2c5bc0a6f416d6d0 Author: Len Brown Date: Tue Feb 14 22:07:52 2017 -0500 tools/power turbostat: fix zero IRQ count shown in one-shot command mode The IRQ column has been working for periodic mode, but not in one-shot command mode, it shows only 0. until now. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1ef7d21afe2197013aefe0e93641aa2c5a9ac3db Author: Len Brown Date: Fri Feb 10 23:54:15 2017 -0500 tools/power turbostat: add --cpu parameter With the --cpu parameter, turbostat prints only lines for the specified set of CPUs: sudo ./turbostat --quiet --show Core,CPU --cpu 0,1,3..5,6-7 Core CPU - - 0 0 0 4 1 1 1 5 2 6 3 3 3 7 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 + tools/power/x86/turbostat/turbostat.c | 95 ++++++++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 2 deletions(-) commit 41618e63f2a869902f8534f0db337e85d6bd04c8 Author: Len Brown Date: Thu Feb 9 18:25:22 2017 -0500 tools/power turbostat: print sysfs C-state stats When turbostat shows % of time in a CPU idle power state, it has always been showing information from underlying hardware residency counters. While this reflects what the hardware is doing, and is thus useful for understanding the hardware, it doesn't directly tell us what Linux requested -- which is useful for tuning Linux itself. Here we add columns to turbostat to show the Linux cpuidle sub-system statistics: /sys/devices/system/cpu/cpu*/cpuidle/state*/* The first group of columns are the "usage", which is the number of times software requested that C-state in the measurement interval. eg C1 below. The second group of columns are the "time", which is the percentage of the measurement interval time that software has requested the specified C-state. eg C1% below. These software counters can be compared to the underlying hardware residency counters (eg CPU%c1 CPU%c3 CPU%c6 CPU%c7) to compare what sofware requested to what the hardware delivered. These sysfs attributes are discovered when turbostat starts, rather than being "built in". So the --show and --hide parameters do not know about these dynamic column names. However "--show sysfs" and "--hide sysfs" act on the entire group of columns: turbostat --show sysfs ... cpu4: POLL: CPUIDLE CORE POLL IDLE cpu4: C1: MWAIT 0x00 cpu4: C1E: MWAIT 0x01 cpu4: C3: MWAIT 0x10 cpu4: C6: MWAIT 0x20 cpu4: C7s: MWAIT 0x32 ... C1 C1E C3 C6 C7s C1% C1E% C3% C6% C7s% 3 6 5 1 188 0.00 0.02 0.00 0.00 99.93 0 6 5 0 58 0.00 0.16 0.02 0.00 99.70 0 0 0 0 9 0.00 0.00 0.00 0.00 99.96 0 0 0 1 24 0.00 0.00 0.00 0.02 99.93 0 0 0 0 9 0.00 0.00 0.00 0.00 99.97 0 0 0 0 32 0.00 0.00 0.00 0.00 99.96 0 0 0 0 7 0.00 0.00 0.00 0.00 99.98 2 0 0 0 36 0.00 0.00 0.00 0.00 99.97 1 0 0 0 13 0.00 0.00 0.00 0.00 99.98 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 4 +- tools/power/x86/turbostat/turbostat.c | 161 ++++++++++++++++++++++++++++++---- 2 files changed, 147 insertions(+), 18 deletions(-) commit 495c7654ccfb771d19ce1b9fbc7be21e45b14636 Author: Len Brown Date: Wed Feb 8 02:41:51 2017 -0500 tools/power turbostat: extend --add option to accept /sys path Previously, the --add option could specify only an MSR. Here is is extended so an arbitrary /sys attribute, as specified by an absolute file path name. sudo ./turbostat --add /sys/devices/system/cpu/cpu0/cpuidle/state5/usage Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 92 ++++++++++++++++++++++++++--------- 1 file changed, 69 insertions(+), 23 deletions(-) commit ade0ebacdf03591b3dab642e6e92da60c20ebdb3 Author: Len Brown Date: Fri Feb 10 01:56:47 2017 -0500 tools/power turbostat: skip unused counters on BDX Skip these two counters on BDX, as they are always zero: cc7, pc7 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 31e07522be566cd039ff7a770550076cc1707a0c Author: Len Brown Date: Tue Jan 31 23:07:49 2017 -0500 tools/power turbostat: fix decoding for GLM, DNV, SKX turbo-ratio limits Newer processors do not hard-code the the number of cpus in each bin to {1, 2, 3, 4, 5, 6, 7, 8} Rather, they can specify any number of CPUS in each of the 8 bins: eg. ... 37 * 100.0 = 3600.0 MHz max turbo 4 active cores 38 * 100.0 = 3700.0 MHz max turbo 3 active cores 39 * 100.0 = 3800.0 MHz max turbo 2 active cores 39 * 100.0 = 3900.0 MHz max turbo 1 active cores could now look something like this: ... 37 * 100.0 = 3600.0 MHz max turbo 16 active cores 38 * 100.0 = 3700.0 MHz max turbo 8 active cores 39 * 100.0 = 3800.0 MHz max turbo 4 active cores 39 * 100.0 = 3900.0 MHz max turbo 2 active cores Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 90 ++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 23 deletions(-) commit 34c7619762f7b4ebbd5157b312e6022b725c031e Author: Len Brown Date: Fri Jan 27 02:36:41 2017 -0500 tools/power turbostat: skip unused counters on SKX Skip these four counters on SKX, as they are always zero: cc3, pc3 cc7, pc7 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7170a374377d7c70d63a2d3eb38f8fe32e6ffadd Author: Len Brown Date: Fri Jan 27 02:13:27 2017 -0500 tools/power turbostat: Denverton: use HW CC1 counter, skip C3, C7 The CC1 column in tubostat can be computed by subtracting the core c-state residency countes from the total Cx residency. CC1 = (Idle_time_as_measured by MPERF) - (all core C-states with residency counters) However, as the underlying counter reads are not atomic, error can be noticed in this calculations, especially when the numbers are small. Denverton has a hardware CC1 residency counter to improve the accuracy of the cc1 statistic -- use it. At the same time, Denverton has no concept of CC3, PC3, CC7, PC7, so skip collecting and printing those columns. Finally, a note of clarification. Turbostat prints the standard PC2 residency counter, but on Denverton hardware, that actually means PC1E. Turbostat prints the standard PC6 residency counter, but on Denverton hardware, that actually means PC2. At this point, we document that differnce in this commit message, rather than adding a quirk to the software. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ac01ac1371d01beb02827f89fff9aac9d7941e91 Author: Len Brown Date: Fri Jan 27 01:45:35 2017 -0500 tools/power turbostat: initial Gemini Lake SOC support Gemini Lake is similar to Apollo Lake (Broxton/Goldmont) Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 5 +++++ 1 file changed, 5 insertions(+) commit 311f77708f362c1af0a999ba5ebbbc062fdc5601 Author: Len Brown Date: Thu Feb 16 23:48:50 2017 -0500 x86: intel-family.h: Add GEMINI_LAKE SOC Cc: x86@kernel.org Signed-off-by: Len Brown arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+) commit 0f47c08d8ccf8252a5c007502919bdc2126ffb1f Author: Len Brown Date: Fri Jan 27 00:50:45 2017 -0500 tools/power turbostat: bug fixes to --add, --show/--hide features Fix a bug with --add, where the title of the column is un-initialized if not specified by the user. The initial implementation of --show and --hide neglected to handle the pc8/pc9/pc10 counters. Fix a bug where "--show Core" only worked with --debug Reported-by: Wendy Wang Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 138 +++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 61 deletions(-) commit 008d396eb219ee5a1c98c9ef01c35752d35f0d6c Author: Len Brown Date: Fri Feb 10 00:29:51 2017 -0500 tools/power turbostat: use tsc_tweak everwhere it is needed The CPU ticks at a rate in the "bus clock" domain. eg. 100 MHz * bus_ratio. On newer processors, the TSC has been moved out of this BCLK domain and into a separate crystal-clock domain. While the TSC ticks "close to" the base frequency, those that look closely at the numbers will notice small errors in calculations that mix units of TSC clocks and bus clocks. "tsc_tweak" was introduced to address the most visible mixing -- the %Busy and the the Busy_MHz calculations. (A simplification as since removed TSC from the BusyMHz calculation) Here we apply the tsc_tweak to everyplace where BCLK and TSC units are mixed. The results is that on a system which is 100% idle, the sum of the C-states are now much more likely to be closer to 100%. Reported-by: Travis Downs Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 48 ++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 96e4715857cf184536ef46e6ea92465f58a7b12d Author: Len Brown Date: Sat Jan 21 02:26:00 2017 -0500 tools/power turbostat: print system config, unless --quiet Some users want turbostat to tell them everything, by default. Some users want turbostat to be quiet, by default. I find that I'm in the 1st camp, and so I've never liked needing to type the --debug parameter to decode the system configuration. So here we change the default and print the system configuration, by default. (The --debug option is now un-documented, though it does still exist for debugging turbostat internals) When you do not want to see the system configuration header, use the new "--quiet" option. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 7 +-- tools/power/x86/turbostat/turbostat.c | 105 +++++++++++++++++----------------- 2 files changed, 52 insertions(+), 60 deletions(-) commit fee86541d28934da4eb235367f7e2137acb1b359 Author: Len Brown Date: Sat Jan 21 01:59:12 2017 -0500 tools/power turbostat: show all columns, independent of --debug Some time ago, turbostat overflowed 80 columns. So on the assumption that a "casual" user would always want topology and frequency columns, we hid the rest of the columns and the system configuration decoding behind the --debug option. Not everybody liked that change -- including me. I use --debug 99% of the time... Well, now we have "-o file" to put turbostat output into a file, so unless you are watching real-time in a small window, column count is less frequently a factor. And more recently, we got the "--hide columnA,columnB" option to specify columns to skip. So now we "un-hide" the rest of the columns from behind --debug, and show them all, by default. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 7 ------- 1 file changed, 7 deletions(-) commit 33148d671cc191fceaca5017e1bb060e9f30fbf7 Author: Len Brown Date: Sat Jan 21 01:26:16 2017 -0500 tools/power turbostat: decode MSR_MISC_FEATURE_CONTROL useful for observing if the BIOS disabled prefetch Not architectural, but docuemented as present on NHM, SNB and is present on others. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 98af74599ea0757098a5776ea29e581b661dcf6f Author: Len Brown Date: Sat Jan 21 01:15:09 2017 -0500 x86 msr_index.h: Define MSR_MISC_FEATURE_CONTROL This non-architectural MSR has disable bits for various prefetchers on modern processors. While these bits are generally touched only by the BIOS, say, via BIOS SETUP, it is useful to dump them when examining options that can alter performance. Cc: x86@kernel.org Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 1 + 1 file changed, 1 insertion(+) commit b3a34e9382a4aacfa7c0b24f9548737bbb20338e Author: Len Brown Date: Sat Jan 21 00:50:08 2017 -0500 tools/power turbostat: decode CPUID(6).TURBO show the CPUID feature for turbo to clarify the case when it may not be shown in MISC_ENABLE CPUID(6): APERF, TURBO, DTS, PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, EPB cpu4: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT TURBO) Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0f7887c49b0c454aef9936a6eadabe1c91b5af55 Author: Len Brown Date: Thu Jan 12 23:49:18 2017 -0500 tools/power turbostat: dump Atom P-states correctly Turbostat dumps MSR_TURBO_RATIO_LIMIT on Core Architecture. But Atom Architecture uses MSR_ATOM_CORE_RATIOS and MSR_ATOM_CORE_TURBO_RATIOS. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 103 +++++++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 21 deletions(-) commit 92134bdbc6272da6e98e9242cc6f1576cedc0735 Author: Len Brown Date: Sat Feb 25 16:55:17 2017 -0500 intel_pstate: use MSR_ATOM_RATIOS definitions from msr-index.h Originally, these MSRs were locally defined in this driver. Now the definitions are in msr-index.h -- use them. Signed-off-by: Len Brown drivers/cpufreq/intel_pstate.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 8a34fd0226eaae64d61ff9a113d276e28acb6b5c Author: Len Brown Date: Thu Jan 12 23:22:28 2017 -0500 x86 msr-index.h: Define Atom specific core ratio MSR locations These MSRs are currently used by the intel_pstate driver, using a local definition. Cc: x86@kernel.org Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 6 ++++++ 1 file changed, 6 insertions(+) commit e651262477c6d8cba79dffc1a6039da43d9c96b0 Author: Len Brown Date: Wed Jan 11 23:17:24 2017 -0500 tools/power turbostat: further decode MSR_IA32_MISC_ENABLE Decode MISC_ENABLE.NO_TURBO, also use the #defines in msr-index.h for decoding this register cpu0: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT TURBO) Although it is not architectural, decode also MSR_IA32_MISC_ENABLE.prefetch-disable (bit-9). documented to be present on: Core, P4, Intel-Xeon reserved on: Atom, Silvermont, Nehalem, SNB, PHI ec. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 710f273ba96182fd93ee8540ae06583c7d889d7c Author: Len Brown Date: Wed Jan 11 22:12:25 2017 -0500 tools/power turbostat: add precision to --debug frequency output Add a digit of precision to the --debug output for frequency range. This is useful when BCLK is not an integer. old: 6 * 83 = 500 MHz max efficiency frequency 26 * 83 = 2166 MHz base frequency new: 6 * 83.3 = 499.8 MHz max efficiency frequency 26 * 83.3 = 2165.8 MHz base frequency Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) commit 0539ba118fe241b0d03202fda0cd19cb758b7fbd Author: Len Brown Date: Fri Feb 10 00:27:20 2017 -0500 tools/power turbostat: Baytrail c-state support The Baytrail SOC, with its Silvermont core, has some unique properties: 1. a hardware CC1 residency counter 2. a module-c6 residency counter 3. a package-c6 counter at traditional package-c7 counter address. The SOC does not support c3, pc3, c7 or pc7 counters. Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 2 ++ tools/power/x86/turbostat/turbostat.c | 46 ++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 9 deletions(-) commit 419c9e986ea453d07140bffb9708d730b6317e8e Author: Len Brown Date: Sat Jan 7 23:26:22 2017 -0500 x86: msr-index.h: Remove unused MSR_NHM_SNB_PKG_CST_CFG_CTL The two users, intel_idle driver and turbostat utility are using the new name, MSR_PKG_CST_CONFIG_CONTROL Cc: x86@kernel.org Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 1 - 1 file changed, 1 deletion(-) commit 1df2e55abce64e2f3117fac3968a9ac382fbc9c3 Author: Len Brown Date: Sat Jan 7 23:24:57 2017 -0500 tools/power turbostat: use new name for MSR_PKG_CST_CONFIG_CONTROL Previously called MSR_NHM_SNB_PKG_CST_CFG_CTL Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6cfb2374f83bc70b8acb0ddb989988ba3f140b61 Author: Len Brown Date: Sat Jan 7 23:23:25 2017 -0500 intel_idle: use new name for MSR_PKG_CST_CONFIG_CONTROL previously known as MSR_NHM_SNB_PKG_CST_CFG_CTL Signed-off-by: Len Brown drivers/idle/intel_idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 40496c8ee73a5ca4fa581badf2247418980586b1 Author: Len Brown Date: Sat Jan 7 23:21:18 2017 -0500 x86: msr-index.h: Define MSR_PKG_CST_CONFIG_CONTROL define MSR_PKG_CST_CONFIG_CONTROL (0xE2), which is the string used by Intel Documentation. We use this MSR in intel_idle and turbostat by a previous name, to be updated in the next patch. Cc: x86@kernel.org Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 1 + 1 file changed, 1 insertion(+) commit 2d6be4abf514fc26c83d239c7f31da1f95e4a31d Merge: cf39319 eb99459 Author: Linus Torvalds Date: Tue Feb 28 21:06:30 2017 -0800 Merge tag 'for-linus-4.11' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull IPMI updates from Corey Minyard: "This is a few small fixes to the main IPMI driver, make some things const, fix typos, etc. The last patch came in about a week ago, but IMHO it's best to go in now. It is not for the main driver, it's for the bt-bmc driver, which runs on the managment controller side, not on the host side, so the scope is limited and the change is necessary" * tag 'for-linus-4.11' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: bt-bmc: Use a regmap for register access char: ipmi: constify ipmi_smi_handlers structures acpi:ipmi: Make IPMI user handler const ipmi: make ipmi_usr_hndl const Documentation: Fix a typo in IPMI.txt. commit cf393195c3ba5d4c0a8e237eb00f7ef104876ee5 Merge: 5ecc5ac c6ce3e2 Author: Linus Torvalds Date: Tue Feb 28 20:29:41 2017 -0800 Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax Pull IDR rewrite from Matthew Wilcox: "The most significant part of the following is the patch to rewrite the IDR & IDA to be clients of the radix tree. But there's much more, including an enhancement of the IDA to be significantly more space efficient, an IDR & IDA test suite, some improvements to the IDR API (and driver changes to take advantage of those improvements), several improvements to the radix tree test suite and RCU annotations. The IDR & IDA rewrite had a good spin in linux-next and Andrew's tree for most of the last cycle. Coupled with the IDR test suite, I feel pretty confident that any remaining bugs are quite hard to hit. 0-day did a great job of watching my git tree and pointing out problems; as it hit them, I added new test-cases to be sure not to be caught the same way twice" Willy goes on to expand a bit on the IDR rewrite rationale: "The radix tree and the IDR use very similar data structures. Merging the two codebases lets us share the memory allocation pools, and results in a net deletion of 500 lines of code. It also opens up the possibility of exposing more of the features of the radix tree to users of the IDR (and I have some interesting patches along those lines waiting for 4.12) It also shrinks the size of the 'struct idr' from 40 bytes to 24 which will shrink a fair few data structures that embed an IDR" * 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax: (32 commits) radix tree test suite: Add config option for map shift idr: Add missing __rcu annotations radix-tree: Fix __rcu annotations radix-tree: Add rcu_dereference and rcu_assign_pointer calls radix tree test suite: Run iteration tests for longer radix tree test suite: Fix split/join memory leaks radix tree test suite: Fix leaks in regression2.c radix tree test suite: Fix leaky tests radix tree test suite: Enable address sanitizer radix_tree_iter_resume: Fix out of bounds error radix-tree: Store a pointer to the root in each node radix-tree: Chain preallocated nodes through ->parent radix tree test suite: Dial down verbosity with -v radix tree test suite: Introduce kmalloc_verbose idr: Return the deleted entry from idr_remove radix tree test suite: Build separate binaries for some tests ida: Use exceptional entries for small IDAs ida: Move ida_bitmap to a percpu variable Reimplement IDR and IDA using the radix tree radix-tree: Add radix_tree_iter_delete ... commit 5ecc5ac215bc4d88243a2f4909e70ccc1bda710f Merge: 8313064c b7a42b9 Author: Linus Torvalds Date: Tue Feb 28 20:18:44 2017 -0800 Merge tag 'iommu-fix-v4.11-rc0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Fix an issue introduced this merge window into the AMD and Intel IOMMU drivers that causes an oops when the vendor-specific sysfs-entries are accessed. The reason for this issue is that I forgot to update the sysfs code in the drivers when moving the iommu 'struct device' to the iommu-core" * tag 'iommu-fix-v4.11-rc0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix crash when accessing AMD-Vi sysfs entries iommu/vt-d: Fix crash when accessing VT-d sysfs entries commit 6f8830f5bbab16e54f261de187f3df4644a5b977 Author: Chris Leech Date: Mon Feb 27 16:58:36 2017 -0800 scsi: libiscsi: add lock around task lists to fix list corruption regression There's a rather long standing regression from the commit "libiscsi: Reduce locking contention in fast path" Depending on iSCSI target behavior, it's possible to hit the case in iscsi_complete_task where the task is still on a pending list (!list_empty(&task->running)). When that happens the task is removed from the list while holding the session back_lock, but other task list modification occur under the frwd_lock. That leads to linked list corruption and eventually a panicked system. Rather than back out the session lock split entirely, in order to try and keep some of the performance gains this patch adds another lock to maintain the task lists integrity. Major enterprise supported kernels have been backing out the lock split for while now, thanks to the efforts at IBM where a lab setup has the most reliable reproducer I've seen on this issue. This patch has been tested there successfully. Signed-off-by: Chris Leech Fixes: 659743b02c41 ("[SCSI] libiscsi: Reduce locking contention in fast path") Reported-by: Prashantha Subbarao Reviewed-by: Guilherme G. Piccoli Cc: # v3.15+ Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 26 +++++++++++++++++++++++++- include/scsi/libiscsi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) commit d1a9ccc4b1374a5a7762031fd8e4e398c68549e6 Author: Colin Ian King Date: Tue Feb 28 11:02:48 2017 +0000 scsi: qedi: fix missing return error code check on call to qedi_setup_int The call to qedi_setup_int is not updating the return code rc yet rc is being checked for an error. Fix this by assigning rc to the return code from the call to qedi_setup_int. Signed-off-by: Colin Ian King 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 858b0f571d30916bd69c45922045f24f26d6bfc9 Author: Bing Niu Date: Tue Feb 28 11:39:48 2017 -0500 drm/i915/gvt: set SFUSE_STRAP properly for vitual monitor detection update the correct virtual montior connection status to vreg v2: address yulei's comment on commit message Signed-off-by: Bing Niu Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 1f58af304cce9e4a25b62b3619e69c586203c8ca Author: Zhao Yan Date: Tue Feb 28 15:41:03 2017 +0800 drm/i915/gvt: fix an error for one register register 0x20e0 should be mode register v2: rebased to latest code base Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9112caafdf01439a6e43f4d8c09ceed7dc613d4a Author: Zhao Yan Date: Tue Feb 28 15:40:10 2017 +0800 drm/i915/gvt: add more registers into handlers list those registers are render registers with F_CMD_ACCESS flag set Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0aa5277c3a6dbe9d5991c490ef23fe900254d931 Author: Zhao Yan Date: Tue Feb 28 15:39:25 2017 +0800 drm/i915/gvt: have more registers with F_CMD_ACCESS flags set those registers are render registers, should have F_CMD_ACCESS flag set v4: rebase to lastest code base v3: per zhenyu's comments, move newly added registers to a separate patch v2: per Kevin's comments, move newly added registers to the tails of lists. Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 223 ++++++++++++++++++++---------------- 1 file changed, 123 insertions(+), 100 deletions(-) commit 4e5acdc23a3dcbd6ad6dc93a9783dd9c838987c8 Author: Paul Mackerras Date: Tue Feb 28 11:05:47 2017 +1100 KVM: PPC: Book3S HV: Don't use ASDR for real-mode HPT faults on POWER9 In HPT mode on POWER9, the ASDR register is supposed to record segment information for hypervisor page faults. It turns out that POWER9 DD1 does not record the page size information in the ASDR for faults in guest real mode. We have the necessary information in memory already, so by moving the checks for real mode that already existed, we can use the in-memory copy. Since a load is likely to be faster than reading an SPR, we do this unconditionally (not just for POWER9 DD1). Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 70cd4c10b290dd77fff6dc702a9a2c8c679df121 Author: Paul Mackerras Date: Mon Feb 27 11:51:37 2017 +1100 KVM: PPC: Book3S HV: Fix software walk of guest process page tables This fixes some bugs in the code that walks the guest's page tables. These bugs cause MMIO emulation to fail whenever the guest is in virtial mode (MMU on), leading to the guest hanging if it tried to access a virtio device. The first bug was that when reading the guest's process table, we were using the whole of arch->process_table, not just the field that contains the process table base address. The second bug was that the mask used when reading the process table entry to get the radix tree base address, RPDB_MASK, had the wrong value. Fixes: 9e04ba69beec ("KVM: PPC: Book3S HV: Add basic infrastructure for radix guests") Fixes: e99833448c5f ("powerpc/mm/radix: Add partition table format & callback") Signed-off-by: Paul Mackerras arch/powerpc/include/asm/book3s/64/mmu.h | 3 ++- arch/powerpc/kvm/book3s_64_mmu_radix.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit de09cdd09fa12c3f837902680c3011d96e811821 Author: Len Brown Date: Tue Feb 28 16:32:44 2017 -0500 intel_idle: stop exposing platform acronyms in sysfs Cosmetic only -- no functional change in this patch. sysfs before: state4/desc:MWAIT 0x20 state4/name:C6-HSW sysfs after: state4/desc:MWAIT 0x20 state4/name:C6 We remove the platform acronyms from the end of the state name (-HSW in this case) for three reasonse. 1. more consistency with acpi_idle, which prints C1, C2, C3 etc. 2. users know what platform they are on already an acronym for the processor code name here seems to cause more confusion than clarity. 3. less clutter in "cpupower monitor" output, which truncates the names to 4 columns. The precise definition of the state continues to be available in "desc". Reported-by: Artem Bityutskiy Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 172 +++++++++++++++++++++++----------------------- 1 file changed, 86 insertions(+), 86 deletions(-) commit 8313064c2e75542201e557e2b496668811c2484a Merge: b2deee2 ff7d117 Author: Linus Torvalds Date: Tue Feb 28 15:39:09 2017 -0800 Merge tag 'nfsd-4.11' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "The nfsd update this round is mainly a lot of miscellaneous cleanups and bugfixes. A couple changes could theoretically break working setups on upgrade. I don't expect complaints in practice, but they seem worth calling out just in case: - NFS security labels are now off by default; a new security_label export flag reenables it per export. But, having them on by default is a disaster, as it generally only makes sense if all your clients and servers have similar enough selinux policies. Thanks to Jason Tibbitts for pointing this out. - NFSv4/UDP support is off. It was never really supported, and the spec explicitly forbids it. We only ever left it on out of laziness; thanks to Jeff Layton for finally fixing that" * tag 'nfsd-4.11' of git://linux-nfs.org/~bfields/linux: (34 commits) nfsd: Fix display of the version string nfsd: fix configuration of supported minor versions sunrpc: don't register UDP port with rpcbind when version needs congestion control nfs/nfsd/sunrpc: enforce transport requirements for NFSv4 sunrpc: flag transports as having congestion control sunrpc: turn bitfield flags in svc_version into bools nfsd: remove superfluous KERN_INFO nfsd: special case truncates some more nfsd: minor nfsd_setattr cleanup NFSD: Reserve adequate space for LOCKT operation NFSD: Get response size before operation for all RPCs nfsd/callback: Drop a useless data copy when comparing sessionid nfsd/callback: skip the callback tag nfsd/callback: Cleanup callback cred on shutdown nfsd/idmap: return nfserr_inval for 0-length names SUNRPC/Cache: Always treat the invalid cache as unexpired SUNRPC: Drop all entries from cache_detail when cache_purge() svcrdma: Poll CQs in "workqueue" mode svcrdma: Combine list fields in struct svc_rdma_op_ctxt svcrdma: Remove unused sc_dto_q field ... commit b2deee2dc06db7cdf99b84346e69bdb9db9baa85 Merge: d4f4cf7 54ea004 Author: Linus Torvalds Date: Tue Feb 28 15:36:09 2017 -0800 Merge tag 'ceph-for-4.11-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "This time around we have: - support for rbd data-pool feature, which enables rbd images on erasure-coded pools (myself). CEPH_PG_MAX_SIZE has been bumped to allow erasure-coded profiles with k+m up to 32. - a patch for ceph_d_revalidate() performance regression introduced in 4.9, along with some cleanups in the area (Jeff Layton) - a set of fixes for unsafe ->d_parent accesses in CephFS (Jeff Layton) - buffered reads are now processed in rsize windows instead of rasize windows (Andreas Gerstmayr). The new default for rsize mount option is 64M. - ack vs commit distinction is gone, greatly simplifying ->fsync() and MOSDOpReply handling code (myself) ... also a few filesystem bug fixes from Zheng, a CRUSH sync up (CRUSH computations are still serialized though) and several minor fixes and cleanups all over" * tag 'ceph-for-4.11-rc1' of git://github.com/ceph/ceph-client: (52 commits) libceph, rbd, ceph: WRITE | ONDISK -> WRITE libceph: get rid of ack vs commit ceph: remove special ack vs commit behavior ceph: tidy some white space in get_nonsnap_parent() crush: fix dprintk compilation crush: do is_out test only if we do not collide ceph: remove req from unsafe list when unregistering it rbd: constify device_type structure rbd: kill obj_request->object_name and rbd_segment_name_cache rbd: store and use obj_request->object_no rbd: RBD_V{1,2}_DATA_FORMAT macros rbd: factor out __rbd_osd_req_create() rbd: set offset and length outside of rbd_obj_request_create() rbd: support for data-pool feature rbd: introduce rbd_init_layout() rbd: use rbd_obj_bytes() more rbd: remove now unused rbd_obj_request_wait() and helpers rbd: switch rbd_obj_method_sync() to ceph_osdc_call() libceph: pass reply buffer length through ceph_osdc_call() rbd: do away with obj_request in rbd_obj_read_sync() ... commit e9f467d028cd7d8bee2a4d6c4fb806caf8cd580b Merge: ef6ebf3 20a7db8 Author: Chris Mason Date: Tue Feb 28 14:35:09 2017 -0800 Merge branch 'for-chris-4.11-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.11 commit 2664f3c94abc7181171b7c05b2aaa76ea7d9d613 Author: Mike Snitzer Date: Tue Feb 28 15:31:44 2017 -0500 dm raid: bump the target version This version bump reflects that the reshape corruption fix (commit 92a39f6cc "dm raid: fix data corruption on reshape request") is present. Done as a separate fix because the above referenced commit is marked for stable and target version bumps in a stable@ fix are a recipe for the fix to never get backported to stable@ kernels (because of target version number conflicts). Also, move RESUME_STAY_FROZEN_FLAGS up with the reset the the _FLAGS definitions now that we don't need to worry about stable@ conflicts as a result of missing context. Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d36a19541fe8f392778ac137d60f9be8dfdd8f9d Author: Heinz Mauelshagen Date: Tue Feb 28 19:17:49 2017 +0100 dm raid: fix data corruption on reshape request The lvm2 sequence to manage dm-raid constructor flags that trigger a rebuild or a reshape is defined as: 1) load table with flags (e.g. rebuild/delta_disks/data_offset) 2) clear out the flags in lvm2 metadata 3) store the lvm2 metadata, reload the table to reset the flags previously established during the initial load (1) -- in order to prevent repeatedly requesting a rebuild or a reshape on activation Currently, loading an inactive table with rebuild/reshape flags specified will cause dm-raid to rebuild/reshape on resume and thus start updating the raid metadata (about the progress). When the second table reload, to reset the flags, occurs the constructor accesses the volatile progress state kept in the raid superblocks. Because the active mapping is still processing the rebuild/reshape, that position will be stale by the time the device is resumed. In the reshape case, this causes data corruption by processing already reshaped stripes again. In the rebuild case, it does _not_ cause data corruption but instead involves superfluous rebuilds. Fix by keeping the raid set frozen during the first resume and then allow the rebuild/reshape during the second resume. Fixes: 9dbd1aa3a ("dm raid: add reshaping support to the target") Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org # 4.8+ drivers/md/dm-raid.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ad47047220777460c6d7dc8333808591f29e5c17 Author: Mike Snitzer Date: Tue Feb 28 11:55:16 2017 -0500 dm raid: fix raid "check" regression due to improper cleanup in raid_message() While cleaning up awkward branching in raid_message() a raid set "check" regression was introduced because "check" needs both MD_RECOVERY_SYNC and MD_RECOVERY_REQUESTED flags set. Fix this regression by explicitly setting both flags for the "check" case (like is also done for the "repair" case, but redundant set_bit()s are perfectly fine because it adds clarity to what is needed in response to both messages -- in addition this isn't fast path code). Fixes: 105db59912 ("dm raid: cleanup awkward branching in raid_message() option processing") Reported-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f3ac9f737603da80c2da3e84b89e74429836bb6d Author: Takashi Iwai Date: Tue Feb 28 22:15:51 2017 +0100 ALSA: seq: Fix link corruption by event error handling The sequencer FIFO management has a bug that may lead to a corruption (shortage) of the cell linked list. When a sequencer client faces an error at the event delivery, it tries to put back the dequeued cell. When the first queue was put back, this forgot the tail pointer tracking, and the link will be screwed up. Although there is no memory corruption, the sequencer client may stall forever at exit while flushing the pending FIFO cells in snd_seq_pool_done(), as spotted by syzkaller. This patch addresses the missing tail pointer tracking at snd_seq_fifo_cell_putback(). Also the patch makes sure to clear the cell->enxt pointer at snd_seq_fifo_event_in() for avoiding a similar mess-up of the FIFO linked list. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_fifo.c | 3 +++ 1 file changed, 3 insertions(+) commit 2a7275a3d867b228216886aae35e1f64291180b1 Author: Ley Foon Tan Date: Tue Feb 28 18:37:16 2017 +0800 PCI: altera: Fix TLP_CFG_DW0 for TLP write eb5767122feb ("PCI: altera: Simplify TLB_CFG_DW0 usage") used TLP_FMTTYPE_CFGRD* (instead of TLP_FMTTYPE_CFGWR*) for TLP writes, which causes writing to configuration space to fail. Fix it by using correct FMTTYPE for write operation. Fixes: eb5767122feb ("PCI: altera: Simplify TLB_CFG_DW0 usage") Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.9+ drivers/pci/host/pcie-altera.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d4f4cf77b37eaea58ef863a4cbc95dad3880b524 Merge: f89db78 17a870b Author: Linus Torvalds Date: Tue Feb 28 11:50:53 2017 -0800 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - nommu updates from Afzal Mohammed cleaning up the vectors support - allow DMA memory "mapping" for nommu Benjamin Gaignard - fixing a correctness issue with R_ARM_PREL31 relocations in the module linker - add strlen() prototype for the decompressor - support for DEBUG_VIRTUAL from Florian Fainelli - adjusting memory bounds after memory reservations have been registered - unipher cache handling updates from Masahiro Yamada - initrd and Thumb Kconfig cleanups * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (23 commits) ARM: mm: round the initrd reservation to page boundaries ARM: mm: clean up initrd initialisation ARM: mm: move initrd init code out of arm_memblock_init() ARM: 8655/1: improve NOMMU definition of pgprot_*() ARM: 8654/1: decompressor: add strlen prototype ARM: 8652/1: cache-uniphier: clean up active way setup code ARM: 8651/1: cache-uniphier: include instead of ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly ARM: 8649/2: nommu: remove Hivecs configuration is asm ARM: 8648/2: nommu: display vectors base ARM: 8647/2: nommu: dynamic exception base address setting ARM: 8646/1: mmu: decouple VECTORS_BASE from Kconfig ARM: 8644/1: Reduce "CPU: shutdown" message to debug level ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol ARM: 8640/1: Add support for CONFIG_DEBUG_VIRTUAL ARM: 8639/1: Define KERNEL_START and KERNEL_END ARM: 8638/1: mtd: lart: Rename partition defines to be prefixed with PART_ ARM: 8637/1: Adjust memory boundaries after reservations ARM: 8636/1: Cleanup sanity_check_meminfo ARM: add CPU_THUMB_CAPABLE to indicate possible Thumb support ... commit f89db789de2157441d3b5e879a742437ed69cbbc Merge: 65314ed 8312593 Author: Linus Torvalds Date: Tue Feb 28 11:46:00 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 documentation updates, plus a debugging annotation fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/crash: Update the stale comment in reserve_crashkernel() x86/irq, trace: Add __irq_entry annotation to x86's platform IRQ handlers Documentation, x86, resctrl: Recommend locking for resctrlfs commit 65314ed08e9c4a94ba85f7d52a7ad324050b152e Merge: 3f26b0c 96b7774 Author: Linus Torvalds Date: Tue Feb 28 11:44:01 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two rq-clock warnings related fixes, plus a cgroups related crash fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cgroup: Move sched_online_group() back into css_online() to fix crash sched/fair: Update rq clock before changing a task's CPU affinity sched/core: Fix update_rq_clock() splat on hotplug (and suspend/resume) commit 3f26b0c876bbfeed74325ada0329de53efbdf7a6 Merge: 74efe07 1572e45 Author: Linus Torvalds Date: Tue Feb 28 11:38:18 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes on the kernel and tooling side - nothing in particular stands out" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) perf/core: Fix the perf_cpu_time_max_percent check perf/core: Fix perf_event_enable_on_exec() timekeeping (again) perf/core: Remove confusing comment and move put_ctx() perf record: Honor --quiet option properly perf annotate: Add -q/--quiet option perf diff: Add -q/--quiet option perf report: Add -q/--quiet option perf utils: Check verbose flag properly perf utils: Add perf_quiet_option() perf record: Add -a as default target perf stat: Add -a as default target perf tools: Fail on using multiple bits long terms without value perf tools: Move new_term arguments into struct parse_events_term template perf build: Add special fixdep cleaning rule perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map perf header: Make build_cpu_topology skip offline/absent CPUs perf cpumap: Add cpu__max_present_cpu() perf session: Fix DEBUG=1 build with clang tools lib traceevent: It's preempt not prempt perf python: Filter out -specs=/a/b/c from the python binding cc options ... commit 74efe07bc38c538ba7ac40a895910f4f3bee3152 Merge: e72e58f 318b1de Author: Linus Torvalds Date: Tue Feb 28 10:44:16 2017 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "The main change is the uninlining of large refcount_t APIs, plus a header dependency fix. Note that the uninlining allowed us to enable the underflow/overflow warnings unconditionally and remove the debug Kconfig switch: this might trigger new warnings in buggy code and turn crashes/use-after-free bugs into less harmful memory leaks" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/refcounts: Add missing kernel.h header to have UINT_MAX defined locking/refcounts: Out-of-line everything commit e72e58faa709d554f95431dbafd3374db5ed3fbb Merge: 74e3f63 4e4636c Author: Linus Torvalds Date: Tue Feb 28 10:15:59 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "A handful of objtool fixes related to unreachable code, plus a build fix for out of tree modules" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Enclose contents of unreachable() macro in a block objtool: Prevent GCC from merging annotate_unreachable() objtool: Improve detection of BUG() and other dead ends objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules commit 74e3f63ce60eb81fbd39aa6c0353059b7e2cb5f7 Merge: c2eca00 96297ae Author: Linus Torvalds Date: Tue Feb 28 10:13:40 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE updates from David Miller: "Just one actual change here this time around, adding some init data annotations. The other change was bogus and got reverted" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: palm_bk3710: add __initdata to palm_bk3710_port_info Revert "ide: Fix interface autodetection in legacy IDE driver (trial #2)" ide: Fix interface autodetection in legacy IDE driver (trial #2) commit c2eca00fec40a9b3551f0605834acad9336099d1 Merge: 86292b3 2f44f75 Author: Linus Torvalds Date: Tue Feb 28 10:00:39 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Don't save TIPC header values before the header has been validated, from Jon Paul Maloy. 2) Fix memory leak in RDS, from Zhu Yanjun. 3) We miss to initialize the UID in the flow key in some paths, from Julian Anastasov. 4) Fix latent TOS masking bug in the routing cache removal from years ago, also from Julian. 5) We forget to set the sockaddr port in sctp_copy_local_addr_list(), fix from Xin Long. 6) Missing module ref count drop in packet scheduler actions, from Roman Mashak. 7) Fix RCU annotations in rht_bucket_nested, from Herbert Xu. 8) Fix use after free which happens because L2TP's ipv4 support returns non-zero values from it's backlog_rcv function which ipv4 interprets as protocol values. Fix from Paul Hüber. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits) qed: Don't use attention PTT for configuring BW qed: Fix race with multiple VFs l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv xfrm: provide correct dst in xfrm_neigh_lookup rhashtable: Fix RCU dereference annotation in rht_bucket_nested rhashtable: Fix use before NULL check in bucket_table_free net sched actions: do not overwrite status of action creation. rxrpc: Kernel calls get stuck in recvmsg net sched actions: decrement module reference count after table flush. lib: Allow compile-testing of parman ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt sctp: set sin_port for addr param when checking duplicate address net/mlx4_en: fix overflow in mlx4_en_init_timestamp() netfilter: nft_set_bitmap: incorrect bitmap size net: s2io: fix typo argumnet argument net: vxge: fix typo argumnet argument netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value. ipv4: mask tos for input route ipv4: add missing initialization for flowi4_uid lib: fix spelling mistake: "actualy" -> "actually" ... commit 900f736251c81886f3064c9d489c85eddee921b7 Author: Jaegeuk Kim Date: Mon Feb 27 21:28:53 2017 -0800 f2fs: avoid to flush nat journal entries This patch adds a missing condition which flushes nat journal entries unnecessarily introduced by: f2fs: add bitmaps for empty or full NAT blocks Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac28e47ccc3ff8dabce1aec6b224760c3e524044 Author: Ladislav Michl Date: Tue Feb 21 10:44:45 2017 +0100 ARM: OMAP2+: Remove legacy gpmc-nand.c This code is no longer used and can be removed as we are using device tree. Removing this code also removes a dependency between drivers/mtd and arch/arm/mach-omap2 making furhter driver changes easier. Signed-off-by: Ladislav Michl [tony@atomide.com: removed from header too, updated comments] Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Makefile | 3 - arch/arm/mach-omap2/gpmc-nand.c | 154 ---------------------------------------- include/linux/omap-gpmc.h | 11 --- 3 files changed, 168 deletions(-) commit 7807e086a2d1f69cc1a57958cac04fea79fc2112 Author: Ladislav Michl Date: Sat Feb 11 14:02:49 2017 +0100 ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure gpmc_probe_onenand_child returns success even on gpmc_onenand_init failure. Fix that. Signed-off-by: Ladislav Michl Acked-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/mach-omap2/gpmc-onenand.c | 10 ++++++---- drivers/memory/omap-gpmc.c | 4 +--- include/linux/omap-gpmc.h | 5 +++-- 3 files changed, 10 insertions(+), 9 deletions(-) commit 493de342748cc6f52938096f5480cf291da58a0b Author: Takashi Iwai Date: Tue Feb 28 17:27:57 2017 +0100 ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming Dell Inspiron 17 7000 Gaming laptop needs a similar quirk like Inspiron 7599 to support its subwoofer speaker. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=194191 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 15c75b09f8d190f89ab4db463b87d411ca349dfe Author: Takashi Iwai Date: Tue Feb 28 17:16:48 2017 +0100 ALSA: ctxfi: Fallback DMA mask to 32bit Currently ctxfi driver tries to set only the 64bit DMA mask on 64bit architectures, and bails out if it fails. This causes a problem on some platforms since the 64bit DMA isn't always guaranteed. We should fall back to the default 32bit DMA when 64bit DMA fails. Fixes: 6d74b86d3c0f ("ALSA: ctxfi - Allow 64bit DMA") Cc: Signed-off-by: Takashi Iwai sound/pci/ctxfi/cthw20k1.c | 19 ++++++------------- sound/pci/ctxfi/cthw20k2.c | 19 ++++++------------- 2 files changed, 12 insertions(+), 26 deletions(-) commit 1bd49882d78a9b976fe7380ec1bdeb454d68a358 Merge: 0341735 4838589 Author: Tony Lindgren Date: Tue Feb 28 08:46:30 2017 -0800 Merge branch 'gpio-key-wakeup-fix' into omap-for-v4.11/fixes commit 48385896e9c53e1061f103e1271a6be9a7ea00c4 Author: Teresa Remmet Date: Fri Feb 10 13:29:07 2017 +0100 ARM: dts: am335x-pcm953: Fix legacy wakeup source binding Replaced the legacy binding "gpio-key,wakeup" with "wakeup-source" as noted in the kernel documentation. Signed-off-by: Teresa Remmet Reported-by: Sudeep Holla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-pcm-953.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0341735226dcfa9d3727ff001e030f879ab91ca2 Author: Tony Lindgren Date: Fri Feb 17 06:51:17 2017 -0800 ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules Otherwise mice won't be happy. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit f5432f01240ef69a391940d623b6a51768aefd65 Author: Sekhar Nori Date: Wed Feb 15 20:42:52 2017 +0530 ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI commit 50e95b6b854c ("ARM: dts: am57xx-idk: Add Industrial output support") added the TPIC2810 device-tree node under SPI bus instead of I2C1. Fix it. Tested on AM572x IDK by driving on-board LEDs connected to TPIC2810 Fixes: 50e95b6b854c ("ARM: dts: am57xx-idk: Add Industrial output support") Signed-off-by: Sekhar Nori Acked-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-idk-common.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 715e82cf93ec9e8f728e42284abe9998dec2888e Merge: c470abd 448c077 Author: Tony Lindgren Date: Tue Feb 28 07:45:36 2017 -0800 Merge branch 'omap-for-v4.10/fixes' into omap-for-v4.11/fixes commit b7a42b9d38063e58cdf201c575da75943f71051e Author: Joerg Roedel Date: Tue Feb 28 13:57:18 2017 +0100 iommu/amd: Fix crash when accessing AMD-Vi sysfs entries The link between the iommu sysfs-device and the struct amd_iommu is no longer stored as driver-data. Update the code to the new correct way of getting from device to amd_iommu. Reported-by: Dave Jones Fixes: 39ab9555c241 ('iommu: Add sysfs bindings for struct iommu_device') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 4 ++-- drivers/iommu/amd_iommu_types.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit a7fdb6e648fb10a4174483b5fc4dac9c25bd2093 Author: Joerg Roedel Date: Tue Feb 28 13:57:18 2017 +0100 iommu/vt-d: Fix crash when accessing VT-d sysfs entries The link between the iommu sysfs-device and the struct intel_iommu is no longer stored as driver-data. Update the code to use the new access method. Reported-by: Dave Jones Fixes: 39ab9555c241 ('iommu: Add sysfs bindings for struct iommu_device') Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 71321eb3f2d0df4e6c327e0b936eec4458a12054 Author: Takashi Iwai Date: Tue Feb 28 14:49:07 2017 +0100 ALSA: timer: Reject user params with too small ticks When a user sets a too small ticks with a fine-grained timer like hrtimer, the kernel tries to fire up the timer irq too frequently. This may lead to the condensed locks, eventually the kernel spinlock lockup with warnings. For avoiding such a situation, we define a lower limit of the resolution, namely 1ms. When the user passes a too small tick value that results in less than that, the kernel returns -EINVAL now. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 20a7db8ab3f2057a518448b1728d504ffadef65e Author: David Sterba Date: Fri Feb 17 16:24:29 2017 +0100 btrfs: add dummy callback for readpage_io_failed and drop checks Make extent_io_ops::readpage_io_failed_hook callback mandatory and define a dummy function for btrfs_extent_io_ops. As the failed IO callback is not performance critical, the branch vs extra trade off does not hurt. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) commit 20c9801d393d9f077c476f40440b481daaccb9d6 Author: David Sterba Date: Fri Feb 17 15:59:35 2017 +0100 btrfs: drop checks for mandatory extent_io_ops callbacks We know that eadpage_end_io_hook, submit_bio_hook and merge_bio_hook are always defined so we can drop the checks before we call them. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0 Author: David Sterba Date: Fri Feb 17 15:27:44 2017 +0100 btrfs: document existence of extent_io ops callbacks Some of the callbacks defined in btree_extent_io_ops and btrfs_extent_io_ops do always exist so we don't need to check the existence before each call. This patch just reorders the definition and documents which are mandatory/optional. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 7 +++++-- fs/btrfs/extent_io.h | 23 ++++++++++++++++------- fs/btrfs/inode.c | 7 +++++-- 3 files changed, 26 insertions(+), 11 deletions(-) commit c3988d630a4dfec5c09f2b6496734f320949ea9c Author: David Sterba Date: Fri Feb 17 15:18:32 2017 +0100 btrfs: let writepage_end_io_hook return void There's no error path in any of the instances, always return 0. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 9 +++------ fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-) commit b9d04c607c21fafe0a346792d0d358e7ab9a768e Author: David Sterba Date: Fri Feb 17 19:42:43 2017 +0100 btrfs: do proper error handling in btrfs_insert_xattr_item The space check in btrfs_insert_xattr_item is duplicated in it's caller (do_setxattr) so we won't hit the BUG_ON. Continuing without any check could be disasterous so turn it to a proper error handling. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/dir-item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa2529923d3bc5f0b39ff7a7c52be74c4aea6f2a Author: David Sterba Date: Wed Feb 15 09:35:01 2017 +0100 btrfs: handle allocation error in update_dev_stat_item Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 047e5e17c1e3551ef0fb34b629c66bec0591db0d Author: David Sterba Date: Tue Feb 14 17:33:27 2017 +0100 btrfs: remove BUG_ON from __tree_mod_log_insert All callers dereference the 'tm' parameter before it gets to this function, the NULL check does not make much sense here. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 -- 1 file changed, 2 deletions(-) commit e5d74902362f1a06ea3674042d09f1af178c0a20 Author: David Sterba Date: Tue Feb 14 19:45:05 2017 +0100 btrfs: derive maximum output size in the compression implementation The value of max_out can be calculated from the parameters passed to the compressors, which is number of pages and the page size, and we don't have to needlessly pass it around. Signed-off-by: David Sterba fs/btrfs/compression.c | 6 ++---- fs/btrfs/compression.h | 6 ++---- fs/btrfs/inode.c | 3 +-- fs/btrfs/lzo.c | 4 ++-- fs/btrfs/zlib.c | 4 ++-- 5 files changed, 9 insertions(+), 14 deletions(-) commit 069eac7850890acf0d3c21a6c8ca9f33ddb34a0d Author: David Sterba Date: Tue Feb 14 19:36:54 2017 +0100 btrfs: use predefined limits for calculating maximum number of pages for compression Signed-off-by: David Sterba fs/btrfs/inode.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ff7638665c9a82894cabd18d26a9f8957f280f55 Author: David Sterba Date: Tue Feb 14 19:30:39 2017 +0100 btrfs: export compression buffer limits in a header Move the buffer limit definitions out of compress_file_range. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/compression.h | 15 +++++++++++++++ fs/btrfs/inode.c | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) commit 4d3a800ebb1299944408f3b40b5b6b996477fba2 Author: David Sterba Date: Tue Feb 14 19:04:07 2017 +0100 btrfs: merge nr_pages input and output parameter in compress_pages The parameter saying how many pages can be allocated at maximum can be merged with the output page counter, to save some stack space. The compression implementation will sink the parameter to a local variable so everything works as before. The nr_pages variables can also be simply merged in compress_file_range into one. Signed-off-by: David Sterba fs/btrfs/compression.c | 7 +++---- fs/btrfs/compression.h | 2 -- fs/btrfs/inode.c | 13 ++++++------- fs/btrfs/lzo.c | 2 +- fs/btrfs/zlib.c | 2 +- 5 files changed, 11 insertions(+), 15 deletions(-) commit 38c31464089f639630b7c28ce933a4d60e135a02 Author: David Sterba Date: Tue Feb 14 19:04:07 2017 +0100 btrfs: merge length input and output parameter in compress_pages The length parameter is basically duplicated for input and output in the top level caller of the compress_pages chain. We can simply use one variable for that and reduce stack consumption. The compression implementation will sink the parameter to a local variable so everything works as before. Signed-off-by: David Sterba fs/btrfs/compression.c | 24 +++++++++++------------- fs/btrfs/compression.h | 5 ++--- fs/btrfs/inode.c | 2 +- fs/btrfs/lzo.c | 4 ++-- fs/btrfs/zlib.c | 3 ++- 5 files changed, 18 insertions(+), 20 deletions(-) commit 52f75f4fe74ce86376d68b30c94d5fb11cb4019e Author: David Sterba Date: Tue Feb 14 18:33:53 2017 +0100 btrfs: constify name of subvolume in creation helpers Signed-off-by: David Sterba fs/btrfs/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 14a3357b4097d94ac6401c597abc2d02965e0fdd Author: David Sterba Date: Tue Feb 14 17:58:04 2017 +0100 btrfs: constify buffers used by compression helpers Signed-off-by: David Sterba fs/btrfs/compression.c | 2 +- fs/btrfs/compression.h | 2 +- fs/btrfs/lzo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9ed573674ae607bc616c804657bfaf5b6ea5889d Author: David Sterba Date: Tue Feb 14 18:03:49 2017 +0100 btrfs: constify input buffer of btrfs_csum_data The function does not modify the input buffer, also update a typecast in one caller. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/disk-io.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit da353f6b30bc02da29b54f5f024039698fbd23f4 Author: David Sterba Date: Tue Feb 14 17:55:53 2017 +0100 btrfs: constify device path passed to relevant helpers Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 5 +++-- fs/btrfs/dev-replace.h | 5 +++-- fs/btrfs/volumes.c | 18 ++++++++++-------- fs/btrfs/volumes.h | 12 ++++++------ 4 files changed, 22 insertions(+), 18 deletions(-) commit c3a49c8991212e1ef795c7a46881ac5cc7766993 Author: Rafael J. Wysocki Date: Tue Feb 28 00:05:01 2017 +0100 cpufreq: intel_pstate: Fix limits issue with operation mode switching There is a problem with intel_pstate operation mode switching introduced by commit fb1fe1041c04 (cpufreq: intel_pstate: Operation mode control from sysfs), because the global sysfs limits are preserved across operation modes while per-policy limits are reinitialized from scratch on a mode switch and both sets of limits may get out of sync this way. Fix that by always reinitializing the global limits upon the registration of the driver. Fixes: fb1fe1041c04 (cpufreq: intel_pstate: Operation mode control from sysfs) Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada drivers/cpufreq/intel_pstate.c | 65 ++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 43 deletions(-) commit 29e09229d9f26129a39462fae0ddabc4d9533989 Author: Florian Westphal Date: Fri Feb 17 08:39:28 2017 +0100 netfilter: use skb_to_full_sk in ip_route_me_harder inet_sk(skb->sk) is illegal in case skb is attached to request socket. Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") Reported by: Daniel J Blueman Signed-off-by: Florian Westphal Tested-by: Daniel J Blueman Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 17a870bea3b86f464706b6ba2736210cb8602693 Merge: 9e34404 cdcc5fa c466bda Author: Russell King Date: Tue Feb 28 11:08:11 2017 +0000 Merge branches 'fixes' and 'misc'; commit 'kuser^{/add CPU_THUMB_CAPABLE to indicate}' into for-linus commit cdcc5fa0415d943288c6316bd32e76befb1027c5 Author: Russell King Date: Mon Jan 16 15:21:05 2017 +0000 ARM: mm: round the initrd reservation to page boundaries Round the initrd memblock reservation to page boundaries to prevent other data sharing the initrd pages. This prevents an allocation possibly overlapping with the initrd, which would later get trampled on in free_initrd_mem(). Signed-off-by: Russell King arch/arm/mm/init.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 68b32f361f3892fc376051b1702954b2dc692d13 Author: Russell King Date: Mon Jan 16 15:13:25 2017 +0000 ARM: mm: clean up initrd initialisation Rather than repeatedly testing phys_initrd_size to see if the initrd is still enabled, return from the new function to avoid executing the remaining initialisation. Signed-off-by: Russell King arch/arm/mm/init.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 3928624812dcfa39b6a67f9de46efcb51c573ad0 Author: Russell King Date: Mon Jan 16 15:11:10 2017 +0000 ARM: mm: move initrd init code out of arm_memblock_init() Move the ARM initrd initialisation code out of arm_memblock_init() into its own function, so it can be cleaned up. Signed-off-by: Russell King arch/arm/mm/init.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e2fce0a28d8f4293d68abf6485956e7794a30124 Author: Arnd Bergmann Date: Thu Feb 2 13:30:40 2017 +0100 ARM: 8655/1: improve NOMMU definition of pgprot_*() The tegra DRM driver produces a harmless warning when built for NOMMU: drivers/gpu/drm/tegra/gem.c: In function 'tegra_drm_mmap': drivers/gpu/drm/tegra/gem.c:508:12: unused variable 'prot' This is because pgprot_writecombine() on ARM returns a constant and ignores its argument. The version in asm-generic doesn't have that problem, so let's use that one instead. We don't actually care about the value on NOMMU, and this is consistent with what some other architectures do. Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Russell King arch/arm/include/asm/pgtable-nommu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b96ddd02ec33d705df02260e2d5dcfb1d498f4b Author: Arnd Bergmann Date: Thu Feb 2 13:29:36 2017 +0100 ARM: 8654/1: decompressor: add strlen prototype The decompress.c file contains a declaration for strstr() so we can include some compression library code. With the updated LZ4 implementation, we run into the same problem again for strlen(): In file included from ../include/linux/rcupdate.h:40:0, from ../include/linux/srcu.h:33, from ../include/linux/notifier.h:15, from ../include/linux/memory_hotplug.h:6, from ../include/linux/mmzone.h:749, from ../include/linux/gfp.h:5, from ../include/linux/kmod.h:22, from ../include/linux/module.h:13, from ../arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39, from ../arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:13, from ../arch/arm/boot/compressed/decompress.c:55: include/linux/cpumask.h: In function 'cpumask_parse': include/linux/cpumask.h:592:53: error: implicit declaration of function 'strlen';did you mean 'strstr'? [-Werror=implicit-function-declaration] This adds another declaration to work around the new problem. Fixes: ce83d9ab80d6 ("lib: update LZ4 compressor module") Signed-off-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/boot/compressed/decompress.c | 1 + 1 file changed, 1 insertion(+) commit 06369a1e58bd5eb89c02f9a2cf1a35152cbf1154 Author: Masahiro Yamada Date: Wed Feb 1 14:30:09 2017 +0100 ARM: 8652/1: cache-uniphier: clean up active way setup code Now, the active way setup function is called with a fixed value zero for the second argument. The code can be simpler. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King arch/arm/mm/cache-uniphier.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 1c63d4c5e16394698072d671029e753715af100a Author: Masahiro Yamada Date: Wed Feb 1 14:29:22 2017 +0100 ARM: 8651/1: cache-uniphier: include instead of Nothing in this header file depends on . Rather, should be included for -ENODEV. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King arch/arm/include/asm/hardware/cache-uniphier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 050d18d1c65113b4558d86d53465ebe1d04910fb Author: Ard Biesheuvel Date: Mon Jan 30 18:29:28 2017 +0100 ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly According to the spec 'ELF for the ARM Architecture' (IHI 0044E), addends for R_ARM_PREL31 relocations are 31-bit signed quantities, so we need to sign extend the value to 32 bits before it can be used as an offset in the calculation of the relocated value. We have not been bitten by this because these relocations are usually emitted against the start of a section, which means the addends never assume negative values in practice. But it is a bug nonetheless, so fix it. Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/kernel/module.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ad475117d2015781789364d599b85c67254680a1 Author: Afzal Mohammed Date: Wed Feb 1 13:47:34 2017 +0100 ARM: 8649/2: nommu: remove Hivecs configuration is asm Now that exception based address is handled dynamically for processors with CP15, remove Hivecs configuration in assembly. Signed-off-by: afzal mohammed Tested-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/kernel/head-nommu.S | 5 ----- 1 file changed, 5 deletions(-) commit 58c16709f9cad7e6daabeaa5c94ac4dcb260aedd Author: Afzal Mohammed Date: Wed Feb 1 13:39:18 2017 +0100 ARM: 8648/2: nommu: display vectors base VECTORS_BASE displays the exception base address. Now on no-MMU as the exception base address is dynamically estimated, define VECTORS_BASE to the variable holding it. As it is the case, limit VECTORS_BASE constant definition to MMU. Suggested-by: Russell King Signed-off-by: afzal mohammed Tested-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/memory.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f8300a0b5de08c09db105db3c34a2a1c618e147e Author: Afzal Mohammed Date: Wed Feb 1 13:46:36 2017 +0100 ARM: 8647/2: nommu: dynamic exception base address setting No-MMU dynamic exception base address configuration on CP15 processors. In the case of low vectors, decision based on whether security extensions are enabled & whether remap vectors to RAM CONFIG option is selected. For no-MMU without CP15, current default value of 0x0 is retained. Signed-off-by: afzal mohammed Tested-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/nommu.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit d2ca5f2491c1246adf3847101fdc538a3b89439c Author: Afzal Mohammed Date: Sun Jan 29 17:31:32 2017 +0100 ARM: 8646/1: mmu: decouple VECTORS_BASE from Kconfig For MMU configurations, VECTORS_BASE is always 0xffff0000, a macro definition will suffice. For no-MMU, exception base address is dynamically determined in subsequent patches. To preserve bisectability, now make the macro applicable for no-MMU scenario too. Thanks to 0-DAY kernel test infrastructure that found the bisectability issue. This macro will be restricted to MMU case upon dynamically determining exception base address for no-MMU. Once exception address is handled dynamically for no-MMU, VECTORS_BASE can be removed from Kconfig. Signed-off-by: afzal mohammed Tested-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/memory.h | 2 ++ arch/arm/mach-berlin/platsmp.c | 3 ++- arch/arm/mm/dump.c | 5 +++-- arch/arm/mm/init.c | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) commit 035e787543de709f29b38752251d4724200ec353 Author: Florian Fainelli Date: Thu Jan 19 01:26:28 2017 +0100 ARM: 8644/1: Reduce "CPU: shutdown" message to debug level Similar to c68b0274fb3c ("ARM: reduce "Booted secondary processor" message to debug level"), demote the "CPU: shutdown" pr_notice() into a pr_debug(). Signed-off-by: Florian Fainelli Signed-off-by: Russell King arch/arm/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64fc2a947a9873700929ec0ef02b4654a04e0476 Author: Florian Fainelli Date: Sun Jan 15 03:59:29 2017 +0100 ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol All low-level PM/SMP code using virt_to_phys() should actually use __pa_symbol() against kernel symbols. Update code where relevant to move away from virt_to_phys(). Acked-by: Russell King Reviewed-by: Laura Abbott Signed-off-by: Florian Fainelli Signed-off-by: Russell King arch/arm/common/mcpm_entry.c | 12 ++++++------ arch/arm/mach-alpine/platsmp.c | 2 +- arch/arm/mach-axxia/platsmp.c | 2 +- arch/arm/mach-bcm/bcm63xx_smp.c | 2 +- arch/arm/mach-bcm/platsmp-brcmstb.c | 2 +- arch/arm/mach-bcm/platsmp.c | 4 ++-- arch/arm/mach-berlin/platsmp.c | 2 +- arch/arm/mach-exynos/firmware.c | 4 ++-- arch/arm/mach-exynos/mcpm-exynos.c | 2 +- arch/arm/mach-exynos/platsmp.c | 4 ++-- arch/arm/mach-exynos/pm.c | 6 +++--- arch/arm/mach-exynos/suspend.c | 6 +++--- arch/arm/mach-hisi/platmcpm.c | 2 +- arch/arm/mach-hisi/platsmp.c | 6 +++--- arch/arm/mach-imx/platsmp.c | 2 +- arch/arm/mach-imx/pm-imx6.c | 2 +- arch/arm/mach-imx/src.c | 2 +- arch/arm/mach-mediatek/platsmp.c | 2 +- arch/arm/mach-mvebu/pm.c | 2 +- arch/arm/mach-mvebu/pmsu.c | 2 +- arch/arm/mach-mvebu/system-controller.c | 2 +- arch/arm/mach-omap2/control.c | 8 ++++---- arch/arm/mach-omap2/omap-mpuss-lowpower.c | 12 ++++++------ arch/arm/mach-omap2/omap-smp.c | 4 ++-- arch/arm/mach-prima2/platsmp.c | 2 +- arch/arm/mach-prima2/pm.c | 2 +- arch/arm/mach-pxa/palmz72.c | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/pxa3xx.c | 2 +- arch/arm/mach-realview/platsmp-dt.c | 2 +- arch/arm/mach-rockchip/platsmp.c | 4 ++-- arch/arm/mach-rockchip/pm.c | 2 +- arch/arm/mach-s3c24xx/mach-jive.c | 2 +- arch/arm/mach-s3c24xx/pm-s3c2410.c | 2 +- arch/arm/mach-s3c24xx/pm-s3c2416.c | 2 +- arch/arm/mach-s3c64xx/pm.c | 2 +- arch/arm/mach-s5pv210/pm.c | 2 +- arch/arm/mach-sa1100/pm.c | 2 +- arch/arm/mach-shmobile/platsmp-apmu.c | 6 +++--- arch/arm/mach-shmobile/platsmp-scu.c | 4 ++-- arch/arm/mach-socfpga/platsmp.c | 4 ++-- arch/arm/mach-spear/platsmp.c | 2 +- arch/arm/mach-sti/platsmp.c | 2 +- arch/arm/mach-sunxi/platsmp.c | 4 ++-- arch/arm/mach-tango/platsmp.c | 2 +- arch/arm/mach-tango/pm.c | 2 +- arch/arm/mach-tegra/reset.c | 4 ++-- arch/arm/mach-ux500/platsmp.c | 2 +- arch/arm/mach-vexpress/dcscb.c | 2 +- arch/arm/mach-vexpress/platsmp.c | 2 +- arch/arm/mach-vexpress/tc2_pm.c | 4 ++-- arch/arm/mach-zx/platsmp.c | 4 ++-- arch/arm/mach-zynq/platsmp.c | 2 +- 54 files changed, 86 insertions(+), 86 deletions(-) commit e377cd8221ebbe0b517861aa3d823bb42f9abbd4 Author: Florian Fainelli Date: Sun Jan 15 03:59:00 2017 +0100 ARM: 8640/1: Add support for CONFIG_DEBUG_VIRTUAL x86 has an option: CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately. This includes caller using __virt_to_phys() on image addresses instead of __pa_symbol(). This is a generally useful debug feature to spot bad code (particulary in drivers). Acked-by: Russell King Acked-by: Laura Abbott Signed-off-by: Florian Fainelli Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/include/asm/memory.h | 15 ++++++++++-- arch/arm/mm/Makefile | 1 + arch/arm/mm/physaddr.c | 57 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) commit 399f157afd30ad942e08dfa0ab28734c50bc6b00 Merge: a09975b 1a08e3d Author: Russell King Date: Tue Feb 28 11:05:54 2017 +0000 Merge branch 'devel-stable' into misc commit a09975bf6c756e4555a95258ff4b2286dcfddc4e Author: Florian Fainelli Date: Sun Jan 15 03:57:40 2017 +0100 ARM: 8639/1: Define KERNEL_START and KERNEL_END In preparation for adding CONFIG_DEBUG_VIRTUAL support, define a set of common constants: KERNEL_START and KERNEL_END which abstract CONFIG_XIP_KERNEL vs. !CONFIG_XIP_KERNEL. Update the code where relevant. Acked-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Russell King arch/arm/include/asm/memory.h | 7 +++++++ arch/arm/mm/init.c | 7 ++----- arch/arm/mm/mmu.c | 6 +----- 3 files changed, 10 insertions(+), 10 deletions(-) commit 4e23612bb09809ef89eb396fd5f568392e0f1ec7 Author: Florian Fainelli Date: Sun Jan 15 03:57:03 2017 +0100 ARM: 8638/1: mtd: lart: Rename partition defines to be prefixed with PART_ In preparation for defining KERNEL_START on ARM, rename KERNEL_START to PART_KERNEL_START, and to be consistent, do this for all partition-related constants. Acked-by: Boris Brezillon Signed-off-by: Florian Fainelli Signed-off-by: Russell King drivers/mtd/devices/lart.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 985626564eedc470ce2866e53938303368ad41b7 Author: Laura Abbott Date: Fri Jan 13 22:51:45 2017 +0100 ARM: 8637/1: Adjust memory boundaries after reservations adjust_lowmem_bounds is responsible for setting up the boundary for lowmem/highmem. This needs to be setup before memblock reservations can occur. At the time memblock reservations can occur, memory can also be removed from the system. The lowmem/highmem boundary and end of memory may be affected by this but it is currently not recalculated. On some systems this may be harmless, on others this may result in incorrect ranges being passed to the main memory allocator. Correct this by recalculating the lowmem/highmem boundary after all reservations have been made. Tested-by: Magnus Lilja Signed-off-by: Laura Abbott Signed-off-by: Russell King arch/arm/kernel/setup.c | 6 ++++++ arch/arm/mm/mmu.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit 374d446d25d6271ee615952a3b7f123ba4983c35 Author: Laura Abbott Date: Fri Jan 13 22:51:08 2017 +0100 ARM: 8636/1: Cleanup sanity_check_meminfo The logic for sanity_check_meminfo has become difficult to follow. Clean up the code so it's more obvious what the code is actually trying to do. Additionally, meminfo is now removed so rename the function to better describe its purpose. Tested-by: Magnus Lilja Reviewed-by: Nicolas Pitre Signed-off-by: Laura Abbott Signed-off-by: Laura Abbott Signed-off-by: Russell King arch/arm/kernel/setup.c | 4 +-- arch/arm/mm/mmu.c | 66 ++++++++++++++++++------------------------------- arch/arm/mm/nommu.c | 8 +++--- 3 files changed, 30 insertions(+), 48 deletions(-) commit 0b581701d9771c55a908c612ca49850e6088fe08 Author: Nikolay Borisov Date: Mon Feb 20 13:51:11 2017 +0200 btrfs: make btrfs_inode_resume_unlocked_dio take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 5 ++--- fs/btrfs/inode.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit abcefb1eeeff04734a59b4dd3724abbf0688252c Author: Nikolay Borisov Date: Mon Feb 20 13:51:10 2017 +0200 btrfs: make btrfs_inode_block_unlocked_dio take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 4 ++-- fs/btrfs/inode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit cef415af208984650de925e28d40aa4a6e8513f4 Author: Nikolay Borisov Date: Mon Feb 20 13:51:09 2017 +0200 btrfs: Make btrfs_add_nondir take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit db0a669fb002416faafe34481d6a6e21cdf0e926 Author: Nikolay Borisov Date: Mon Feb 20 13:51:08 2017 +0200 btrfs: Make btrfs_add_link take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 39 ++++++++++++++++++++------------------- fs/btrfs/tree-log.c | 8 +++++--- 3 files changed, 26 insertions(+), 23 deletions(-) commit 9e3e97f45c1f4debe53f72ad309ec06890d3aac2 Author: Nikolay Borisov Date: Mon Feb 20 13:51:07 2017 +0200 btrfs: Make btrfs_del_delalloc_inode take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fc4f21b1d8d023cf0a2b1b050ae18e15dbe7068e Author: Nikolay Borisov Date: Mon Feb 20 13:51:06 2017 +0200 btrfs: Make get_extent_t take btrfs_inode In addition to changing the signature, this patch also switches all the functions which are used as an argument to also take btrfs_inode. Namely those are: btrfs_get_extent and btrfs_get_extent_filemap. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 12 ++++++------ fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/extent_io.h | 2 +- fs/btrfs/file.c | 7 ++++--- fs/btrfs/inode.c | 34 ++++++++++++++++++---------------- fs/btrfs/ioctl.c | 2 +- fs/btrfs/tests/inode-tests.c | 44 +++++++++++++++++++++++--------------------- 8 files changed, 59 insertions(+), 54 deletions(-) commit 1c8c9c5216295711c79d0e512dc8b3d5f1bfc35d Author: Nikolay Borisov Date: Mon Feb 20 13:51:05 2017 +0200 btrfs: Make check_extent_to_block take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/scrub.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a2f392e4015a45c896528d5fdfcec4bad3ddd121 Author: Nikolay Borisov Date: Mon Feb 20 13:51:04 2017 +0200 btrfs: Make clone_update_extent_map take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ioctl.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 6fc0ef687029760476e309aa85d437a47313eb08 Author: Nikolay Borisov Date: Mon Feb 20 13:51:03 2017 +0200 btrfs: Make btrfs_clear_bit_hook take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 ++- fs/btrfs/extent_io.h | 6 ++++-- fs/btrfs/inode.c | 37 +++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 21 deletions(-) commit 9cdc51241090a36d3b7b4ff374fb18b764b3b3a4 Author: Nikolay Borisov Date: Mon Feb 20 13:51:02 2017 +0200 btrfs: Make btrfs_extent_item_to_extent_map take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/file-item.c | 10 +++++----- fs/btrfs/inode.c | 3 ++- fs/btrfs/ioctl.c | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) commit 19df27a9e47085dcc81cbf9e7b464e7402511e18 Author: Nikolay Borisov Date: Mon Feb 20 13:51:01 2017 +0200 btrfs: make btrfs_log_inode_parent take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit aefa6115c04ee561302e133ab5916246cd3695f7 Author: Nikolay Borisov Date: Mon Feb 20 13:51:00 2017 +0200 btrfs: Make check_parent_dirs_for_sync take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 73f2e545b68f6af033fd2c083ca9dc3079e79083 Author: Nikolay Borisov Date: Mon Feb 20 13:50:59 2017 +0200 btrfs: Make btrfs_orphan_add take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 ++- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/inode.c | 39 ++++++++++++++++++++------------------- fs/btrfs/relocation.c | 2 +- 4 files changed, 24 insertions(+), 22 deletions(-) commit 3d6ae7bb6a64b7dbc516863eeb99c3182d499aba Author: Nikolay Borisov Date: Mon Feb 20 13:50:58 2017 +0200 btrfs: make btrfs_orphan_del take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 7ab7956ec3fc77667739d065748d96f87bff6c5d Author: Nikolay Borisov Date: Mon Feb 20 13:50:57 2017 +0200 btrfs: make btrfs_free_io_failure_record take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/extent_io.h | 3 ++- fs/btrfs/inode.c | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) commit b30cb441fcf8786773dab590739ca4ebc2b4628b Author: Nikolay Borisov Date: Mon Feb 20 13:50:56 2017 +0200 btrfs: make clean_io_failure take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 21 +++++++++++---------- fs/btrfs/extent_io.h | 4 ++-- fs/btrfs/inode.c | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) commit 9d4f7f8ad69112137da0bbe4036b94739ae25f78 Author: Nikolay Borisov Date: Mon Feb 20 13:50:55 2017 +0200 btrfs: make repair_io_failure take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 13 +++++++------ fs/btrfs/extent_io.h | 8 ++++---- fs/btrfs/scrub.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) commit f898ac6ae339782bc304b2b15c9e187e438da9f7 Author: Nikolay Borisov Date: Mon Feb 20 13:50:54 2017 +0200 btrfs: make check_compressed_csum take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/compression.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0970a22e58d4c49f2c3e84519613a9db8f00f579 Author: Nikolay Borisov Date: Mon Feb 20 13:50:53 2017 +0200 btrfs: make btrfs_print_data_csum_error take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 8 ++++---- fs/btrfs/compression.c | 5 +++-- fs/btrfs/inode.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit 4ac1f4acd7c60c95e3efa63d463418093aff9ce5 Author: Nikolay Borisov Date: Mon Feb 20 13:50:52 2017 +0200 btrfs: make free_io_failure take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 +++++++------- fs/btrfs/extent_io.h | 4 +++- fs/btrfs/inode.c | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) commit 2cff578cfceba883eef199c52674a301a8f91d19 Author: Nikolay Borisov Date: Mon Feb 20 13:50:51 2017 +0200 btrfs: Make lock_and_cleanup_extent_if_need take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 85b7ab6705d9a2e6173361f5da7cbf8f9eb07864 Author: Nikolay Borisov Date: Mon Feb 20 13:50:50 2017 +0200 btrfs: Make check_can_nocow take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit a776c6fa1feba7a84519170ebdb7f4a4155b89d6 Author: Nikolay Borisov Date: Mon Feb 20 13:50:49 2017 +0200 btrfs: Make btrfs_lookup_ordered_range take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/file.c | 4 ++-- fs/btrfs/inode.c | 11 ++++++----- fs/btrfs/ordered-data.c | 9 ++++----- fs/btrfs/ordered-data.h | 7 ++++--- fs/btrfs/scrub.c | 2 +- 6 files changed, 19 insertions(+), 18 deletions(-) commit 7a6d7067958c32d1c76e0bfd1a0d46be06340b2e Author: Nikolay Borisov Date: Mon Feb 20 13:50:48 2017 +0200 btrfs: Make btrfs_mark_extent_written take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 8 ++++---- fs/btrfs/inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit a012a74e78d99aa27f8487c050e9ac3183bc3785 Author: Nikolay Borisov Date: Mon Feb 20 13:50:47 2017 +0200 btrfs: Make fill_holes take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 35339c245b5939315e8763deb7f9b68fffe54912 Author: Nikolay Borisov Date: Mon Feb 20 13:50:46 2017 +0200 btrfs: Make hole_mergeable take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit dcdbc059f01e242f92e3239654a1a57d15b0da5a Author: Nikolay Borisov Date: Mon Feb 20 13:50:45 2017 +0200 btrfs: Make btrfs_drop_extent_cache take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 11 ++++++----- fs/btrfs/inode.c | 31 +++++++++++++++++-------------- fs/btrfs/ioctl.c | 2 +- fs/btrfs/relocation.c | 8 ++++---- fs/btrfs/tests/inode-tests.c | 2 +- 6 files changed, 30 insertions(+), 26 deletions(-) commit 46e59791836c75210bdf1f715592b49836fad848 Author: Nikolay Borisov Date: Mon Feb 20 13:50:44 2017 +0200 btrfs: Make btrfs_requeue_inode_defrag take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6158e1ce1cc620df650ebdcfb3cc08a3d86f5a4c Author: Nikolay Borisov Date: Mon Feb 20 13:50:43 2017 +0200 btrfs: Make (__)btrfs_add_inode_defrag take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 22 +++++++++++----------- fs/btrfs/inode.c | 9 +++++---- 3 files changed, 17 insertions(+), 16 deletions(-) commit 691fa059673b3b33c25d7925acb0a58e8204dbd6 Author: Nikolay Borisov Date: Mon Feb 20 13:50:42 2017 +0200 btrfs: all btrfs_delalloc_release_metadata take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 18 +++++++++--------- fs/btrfs/file.c | 5 +++-- fs/btrfs/free-space-cache.c | 3 ++- fs/btrfs/inode-map.c | 2 +- fs/btrfs/inode.c | 7 ++++--- fs/btrfs/relocation.c | 4 ++-- 7 files changed, 22 insertions(+), 19 deletions(-) commit 9f3db423f98c5c6c53b47f4bb2729901500bc330 Author: Nikolay Borisov Date: Mon Feb 20 13:50:41 2017 +0200 btrfs: Make btrfs_delalloc_reserve_metadata take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 69 +++++++++++++++++++++++++------------------------- fs/btrfs/file.c | 3 ++- fs/btrfs/relocation.c | 3 ++- 4 files changed, 39 insertions(+), 38 deletions(-) commit 703b391a0362e0ee35260dd16d7d0c7a12fef0e6 Author: Nikolay Borisov Date: Mon Feb 20 13:50:40 2017 +0200 btrfs: Make btrfs_orphan_release_metadata take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 10 +++++----- fs/btrfs/inode.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 8ed7a2a0e0732b62d925041ff04a5e9621e0e58b Author: Nikolay Borisov Date: Mon Feb 20 13:50:39 2017 +0200 btrfs: Make btrfs_orphan_reserve_metadata take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 10 +++++----- fs/btrfs/inode.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 0e6bf9b13caa41b34592369c47faab916233343b Author: Nikolay Borisov Date: Mon Feb 20 13:50:38 2017 +0200 btrfs: Make calc_csum_metadata_size take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit baa3ba39b91bdfa270b3f6db6fdc81a1a6b4ab34 Author: Nikolay Borisov Date: Mon Feb 20 13:50:37 2017 +0200 btrfs: Make drop_outstanding_extent take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 04f4f916531adc7d2ca6fdb16a68b6f2ff2a8a3b Author: Nikolay Borisov Date: Mon Feb 20 13:50:36 2017 +0200 btrfs: make btrfs_alloc_data_chunk_ondemand take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 8 ++++---- fs/btrfs/file.c | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) commit 70ddc553b5522b96e65a162be1cecba532630841 Author: Nikolay Borisov Date: Mon Feb 20 13:50:35 2017 +0200 btrfs: make btrfs_is_free_space_inode take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 8 ++++---- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/file-item.c | 2 +- fs/btrfs/inode.c | 23 ++++++++++++----------- 5 files changed, 20 insertions(+), 19 deletions(-) commit 6ef06d27903d9c15505dc1a3ccf424f5018562f7 Author: Nikolay Borisov Date: Mon Feb 20 13:50:34 2017 +0200 btrfs: Make btrfs_i_size_write take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 6 +++--- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/inode.c | 19 +++++++++---------- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/transaction.c | 2 +- fs/btrfs/tree-log.c | 2 +- 7 files changed, 18 insertions(+), 19 deletions(-) commit 877574e2548bbfd792b0b1200d4b46eef54c05f5 Author: Nikolay Borisov Date: Mon Feb 20 13:50:33 2017 +0200 btrfs: Make btrfs_set_inode_index take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 22 +++++++++++----------- fs/btrfs/ioctl.c | 2 +- fs/btrfs/transaction.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) commit 4c570655f4f95609e9f682a36647f84b54b8a721 Author: Nikolay Borisov Date: Mon Feb 20 13:50:32 2017 +0200 btrfs: make btrfs_set_inode_index_count take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8e7611cf38765f1bf1324ed1190f1f8e76ab9546 Author: Nikolay Borisov Date: Mon Feb 20 13:50:31 2017 +0200 btrfs: Make btrfs_insert_dir_item take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/dir-item.c | 6 +++--- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/transaction.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit d0a0b78de4a641ff0924687bfd5a9698f1a97f7a Author: Nikolay Borisov Date: Mon Feb 20 13:50:30 2017 +0200 btrfs: Make btrfs_log_all_parents take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3b30460c5b0ed762be75a004e924ec3f8711e032 Author: Ard Biesheuvel Date: Mon Feb 27 15:30:56 2017 +0000 crypto: ccm - move cbcmac input off the stack Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver") refactored the CCM driver to allow separate implementations of the underlying MAC to be provided by a platform. However, in doing so, it moved some data from the linear region to the stack, which violates the SG constraints when the stack is virtually mapped. So move idata/odata back to the request ctx struct, of which we can reasonably expect that it has been allocated using kmalloc() et al. Reported-by: Johannes Berg Fixes: f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver") Signed-off-by: Ard Biesheuvel Tested-by: Johannes Berg Signed-off-by: Herbert Xu crypto/ccm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 86292b33d4b79ee03e2f43ea0381ef85f077c760 Merge: 1ac884f 3e761a4 Author: Linus Torvalds Date: Mon Feb 27 23:09:29 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: - a few MM remainders - misc things - autofs updates - signals - affs updates - ipc - nilfs2 - spelling.txt updates * emailed patches from Andrew Morton : (78 commits) mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear() mm: add arch-independent testcases for RODATA hfs: atomically read inode size mm: clarify mm_struct.mm_{users,count} documentation mm: use mmget_not_zero() helper mm: add new mmget() helper mm: add new mmgrab() helper checkpatch: warn when formats use %Z and suggest %z lib/vsprintf.c: remove %Z support scripts/spelling.txt: add some typo-words scripts/spelling.txt: add "followings" pattern and fix typo instances scripts/spelling.txt: add "therfore" pattern and fix typo instances scripts/spelling.txt: add "overwriten" pattern and fix typo instances scripts/spelling.txt: add "overwritting" pattern and fix typo instances scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances scripts/spelling.txt: add "disassocation" pattern and fix typo instances scripts/spelling.txt: add "omited" pattern and fix typo instances scripts/spelling.txt: add "explictely" pattern and fix typo instances scripts/spelling.txt: add "applys" pattern and fix typo instances scripts/spelling.txt: add "configuartion" pattern and fix typo instances ... commit 1ac884f173d4842216f6a24c03c9833e3ce6e982 Merge: 08e32dc 5739438 Author: Linus Torvalds Date: Mon Feb 27 23:07:59 2017 -0800 Merge tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: "These are various fixes that I have made and never got around to pushing. I've been asked to get the upstream repo back up-to-date" * tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Add variable run_command_status to save status of commands executed ktest.pl: Powercycle the box on reboot if no connection can be made ktest: Add timeout to ssh command ktest: Fix child exit code processing ktest: Have POST_TEST run after the test has totally completed commit 08e32dcc86e10db1c444942b23bd418968955842 Merge: 3f5595e 73ec494 Author: Linus Torvalds Date: Mon Feb 27 23:05:42 2017 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68nommu update from Greg Ungerer: "Only a single change, to update the amcore board defconfig" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k/defconfig: amcore board defconfig tuning commit 3f5595e3d0180305cfef9a9c7c6265d7ade85dea Merge: 12dfdfe fb94a68 Author: Linus Torvalds Date: Mon Feb 27 23:03:04 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Martin Schwidefsky: "Next to the usual bug fixes (including the TASK_SIZE fix), there is one larger crypto item. It allows to use protected keys with the in-kernel crypto API The protected key support has two parts, the pkey user space API to convert key formats and the paes crypto module that uses a protected key instead of a standard AES key" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: TASK_SIZE for kernel threads s390/crypt: Add protected key AES module s390/dasd: fix spelling mistake: "supportet" -> "supported" s390/pkey: Introduce pkey kernel module s390/zcrypt: export additional symbols s390/zcrypt: Rework CONFIG_ZCRYPT Kconfig text. s390/zcrypt: Cleanup leftover module code. s390/nmi: purge tlbs after control register validation s390/nmi: fix order of register validation s390/crypto: Add PCKMO inline function s390/zcrypt: Enable request count reset for cards and queues. s390/mm: use _SEGMENT_ENTRY_EMPTY in the code s390/chsc: Add exception handler for CHSC instruction s390: opt into HAVE_COPY_THREAD_TLS s390: restore address space when returning to user space s390: rename CIF_ASCE to CIF_ASCE_PRIMARY commit 4e4636cf981b5b629fbfb78aa9f232e015f7d521 Author: Josh Poimboeuf Date: Mon Feb 27 22:21:16 2017 -0600 objtool: Enclose contents of unreachable() macro in a block Guenter Roeck reported a boot failure in mips64. It was bisected to the following commit: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") The unreachable() macro was formerly only composed of a single statement. The above commit added a second statement, but neglected to enclose the statements in a block. Suggested-by: Guenter Roeck Reported-by: Guenter Roeck Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Link: http://lkml.kernel.org/r/20170228042116.glmwmwiohcix7o4a@treble Signed-off-by: Ingo Molnar include/linux/compiler-gcc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19d19e960598161be92a7e4828eb7706c6410ce6 Author: Johannes Berg Date: Mon Feb 27 09:38:11 2017 +0100 mac80211: use driver-indicated transmitter STA only for data frames When I originally introduced using the driver-indicated station as an optimisation to avoid the hashtable lookup/iteration, of course it wasn't intended to really functionally change anything. I neglected, however, to take into account VLAN interfaces, which have the property that management and data frames are handled differently: data frames go directly to the station and the VLAN while management frames continue to be processed over the underlying/associated AP-type interface. As a consequence, when a driver used this optimisation for management frames and the user enabled VLANs, my change broke things since any management frames, particularly disassoc/deauth, were missed by hostapd. Fix this by restoring the original code path for non-data frames, they aren't critical for performance to begin with. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=194713. Big thanks goes to Jarek who bisected the issue and provided a very detailed bug report, including the crucial information that he was using VLANs in his configuration. Cc: stable@vger.kernel.org Fixes: 771e846bea9e ("mac80211: allow passing transmitter station on RX") Reported-and-tested-by: Jarek Kamiński Signed-off-by: Johannes Berg net/mac80211/rx.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 12dfdfedbf8ce3b1464e2cea80014fa0a92ed3e2 Merge: f7878dc a45463c Author: Linus Torvalds Date: Mon Feb 27 22:12:20 2017 -0800 Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue update from Tejun Heo: "Just one patch to silence clang's warnings" * 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: avoid clang warning commit f7878dc3a9d3d900c86a66d9742f7e06681b06cd Merge: fb15a78 f83f3c5 Author: Linus Torvalds Date: Mon Feb 27 21:41:08 2017 -0800 Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Several noteworthy changes. - Parav's rdma controller is finally merged. It is very straight forward and can limit the abosolute numbers of common rdma constructs used by different cgroups. - kernel/cgroup.c got too chubby and disorganized. Created kernel/cgroup/ subdirectory and moved all cgroup related files under kernel/ there and reorganized the core code. This hurts for backporting patches but was long overdue. - cgroup v2 process listing reimplemented so that it no longer depends on allocating a buffer large enough to cache the entire result to sort and uniq the output. v2 has always mangled the sort order to ensure that users don't depend on the sorted output, so this shouldn't surprise anybody. This makes the pid listing functions use the same iterators that are used internally, which have to have the same iterating capabilities anyway. - perf cgroup filtering now works automatically on cgroup v2. This patch was posted a long time ago but somehow fell through the cracks. - misc fixes asnd documentation updates" * 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (27 commits) kernfs: fix locking around kernfs_ops->release() callback cgroup: drop the matching uid requirement on migration for cgroup v2 cgroup, perf_event: make perf_event controller work on cgroup2 hierarchy cgroup: misc cleanups cgroup: call subsys->*attach() only for subsystems which are actually affected by migration cgroup: track migration context in cgroup_mgctx cgroup: cosmetic update to cgroup_taskset_add() rdmacg: Fixed uninitialized current resource usage cgroup: Add missing cgroup-v2 PID controller documentation. rdmacg: Added documentation for rdmacg IB/core: added support to use rdma cgroup controller rdmacg: Added rdma cgroup controller cgroup: fix a comment typo cgroup: fix RCU related sparse warnings cgroup: move namespace code to kernel/cgroup/namespace.c cgroup: rename functions for consistency cgroup: move v1 mount functions to kernel/cgroup/cgroup-v1.c cgroup: separate out cgroup1_kf_syscall_ops cgroup: refactor mount path and clearly distinguish v1 and v2 paths cgroup: move cgroup v1 specific code to kernel/cgroup/cgroup-v1.c ... commit fb15a78210f169cf39a42df208cff09cdac86574 Merge: 5782fd1 aaf0f2f Author: Linus Torvalds Date: Mon Feb 27 21:39:19 2017 -0800 Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu update from Tejun Heo: "This contains just one minor cleanup patch which gets rid of an unnecessary irqsave/restore in the cpu dead callback" * 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu_counter: percpu_counter_hotcpu_callback() cleanup commit 5782fd14aaecc72f27473f380ba2044c7598b14a Merge: 45554b2 d4f6c6f Author: Linus Torvalds Date: Mon Feb 27 19:59:21 2017 -0800 Merge tag 'rtc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem: - constify rtc_class_ops structures New driver: - STM32 Drivers: - armada38x: fix errata, Armada 7K/8K support - ds3232: fix wakeup support - gemini: DT support - m48t86: huge cleanup and platform_data removal - mcp795: alarm support - sun6i: proper oscillator handling - tegra: proper clock handling - tps65910: calibration support" * tag 'rtc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (44 commits) rtc: ds3232: Call device_init_wakeup before device_register rtc: pcf2127: bulk read only date and time registers. rtc: armada38x: Add support for Armada 7K/8K rtc: armada38x: Prepare driver to manage different versions rtc: ds3232: Add regmap max_register definition. rtc: ds3232: Cleanup whitespace around register and bit definitions. rtc: m48t86: remove unused platform_data ARM: Orion5x: ts78xx: allow rtc-m48t86 to manage it's own resources ARM: Orion5x: ts78xx: remove RTC detection ARM: ep93xx: ts72xx: allow rtc-m48t86 to manage its own resources rtc: m48t86: verify that the RTC is actually present rtc: m48t86: add NVRAM support rtc: m48t86: allow driver to manage its resources rtc: m48t86: shorten register name defines bindings: rtc: correct wrong reference in required properties rtc: sun6i: Fix return value check in sun6i_rtc_clk_init() rtc: sun6i: extend test coverage rtc: sun6i: Fix compatibility with old DT binding rtc: snvs: add a missing write sync rtc: bq32000: add support to enable disable the trickle charge FET bypass ... commit 9bb92f51558f2ef5f56c257bdcea0588f31d857e Author: Y.C. Chen Date: Wed Feb 22 15:14:19 2017 +1100 drm/ast: Call open_key before enable_mmio in POST code open_key enables access the registers used by enable_mmio Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Tested-by: Y.C. Chen Cc: Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 905f21a49d388de3e99438235f3301cabf0c0ef4 Author: Y.C. Chen Date: Wed Feb 22 15:10:50 2017 +1100 drm/ast: Fix test for VGA enabled The test to see if VGA was already enabled is doing an unnecessary second test from a register that may or may not have been initialized to a valid value. Remove it. Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt Cc: Acked-by: Joel Stanley Tested-by: Y.C. Chen Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_post.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 42a70abddd90374518057e989f5b7289b7b535d8 Author: Dupuis, Chad Date: Fri Feb 24 00:31:56 2017 -0800 scsi: qedi: Fix memory leak in tmf response processing. Signed-off-by: Manish Rangankar Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fbdab3e7fd547e1ce558db1521659707bdf02cc6 Author: Colin Ian King Date: Fri Feb 24 14:43:30 2017 +0000 scsi: aacraid: remove redundant zero check on ret The check for ret being zero is redundant as a few statements earlier we break out of the while loop if ret is non-zero. Thus we can remove the zero check and also the dead-code non-zero case too. Detected by CoverityScan, CID#1411632 ("Logically Dead Code") Signed-off-by: Colin Ian King Acked-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 94fdc2a86a927b409d9a09ba28bcb08e34f3ac8d Author: Y.C. Chen Date: Fri Feb 17 14:45:07 2017 +1100 drm/ast: POST code for the new AST2500 This is used when the BMC isn't running any code and thus has to be initialized by the host. The code originates from Aspeed (Y.C. Chen) and has been cleaned up for coding style purposes by BenH. Signed-off-by: Y.C. Chen Acked-by: Joel Stanley Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_dram_tables.h | 62 +++++ drivers/gpu/drm/ast/ast_post.c | 417 +++++++++++++++++++++++++++++++++- 2 files changed, 476 insertions(+), 3 deletions(-) commit d95618ef0a05236a2642d1a829fffd90de88e5f0 Author: Benjamin Herrenschmidt Date: Fri Feb 17 13:51:34 2017 +1100 drm/ast: Rename ast_init_dram_2300 to ast_post_chip_2300 The function does more than initializing the DRAM and in turns calls other functions to do the actual init. This will keeping things more consistent with the upcoming AST2500 POST code. Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Tested-by: Y.C. Chen Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_post.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b368e53aae7694e0fb2bdec9667c9acc5108b629 Author: Benjamin Herrenschmidt Date: Sat Feb 18 14:19:10 2017 +1100 drm/ast: Factor mmc_test code in POST code There's a some duplication for what's essentially copies of two loops, so factor it. The upcoming AST2500 POST code adds more of them. Also cleanup return types for the test functions, most of them return a boolean, some return a u32. Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Tested-by: Y.C. Chen Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_post.c | 82 ++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 51 deletions(-) commit bad09da6deab157440a3f0dd5e6c03cdc60c0a91 Author: Y.C. Chen Date: Fri Feb 17 10:56:47 2017 +0800 drm/ast: Fixed vram size incorrect issue on POWER The default value of VGA scratch may incorrect. Should initial h/w before get vram info. Acked-by: Joel Stanley Tested-by: Y.C. Chen Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_main.c | 6 +++--- drivers/gpu/drm/ast/ast_post.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9f93c8b3c08f8c456aad86fd05caa6a1688320ff Author: Y.C. Chen Date: Fri Feb 17 14:36:46 2017 +1100 drm/ast: Base support for AST2500 Add detection and mode setting updates for AST2500 generation chip, code originally from Aspeed and slightly reworked for coding style mostly by Ben. This doesn't contain the BMC DRAM POST code which is in a separate patch. Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_drv.h | 2 ++ drivers/gpu/drm/ast/ast_main.c | 32 +++++++++++++++++++--- drivers/gpu/drm/ast/ast_mode.c | 30 ++++++++++++++++----- drivers/gpu/drm/ast/ast_tables.h | 58 +++++++++++++++++++++++++++++++++------- 4 files changed, 103 insertions(+), 19 deletions(-) commit 6475a7cce61967fca4dd793b60acf5a7dc70bc9a Author: Benjamin Herrenschmidt Date: Fri Feb 17 13:57:30 2017 +1100 drm/ast: Fix calculation of MCLK Some braces were missing causing an incorrect calculation. Y.C. Chen from Aspeed provided me with the right formula which I tested on AST2400 and 2500. The MCLK isn't currently used by the driver (it will eventually to filter modes) so the issue isn't catastrophic. Also make the printed value a bit more meaningful Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Tested-by: Y.C. Chen Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cf2f6bd402470caed4e4d75b783d2d48277a3568 Author: Benjamin Herrenschmidt Date: Fri Feb 17 13:55:58 2017 +1100 drm/ast: Remove spurious include Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_main.c | 2 -- 1 file changed, 2 deletions(-) commit 22acdbb1bdbd56cc9939e18516dfcf214a9d835b Author: Benjamin Herrenschmidt Date: Fri Feb 17 13:45:24 2017 +1100 drm/ast: const'ify mode setting tables And fix some comment alignment & space/tabs while at it Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_drv.h | 4 +- drivers/gpu/drm/ast/ast_mode.c | 8 +-- drivers/gpu/drm/ast/ast_tables.h | 106 +++++++++++++++++++-------------------- 3 files changed, 59 insertions(+), 59 deletions(-) commit 71f677a91046599ece96ebab21df956ce909c456 Author: Russell Currey Date: Fri Feb 17 14:33:01 2017 +1100 drm/ast: Handle configuration without P2A bridge The ast driver configures a window to enable access into BMC memory space in order to read some configuration registers. If this window is disabled, which it can be from the BMC side, the ast driver can't function. Closing this window is a necessity for security if a machine's host side and BMC side are controlled by different parties; i.e. a cloud provider offering machines "bare metal". A recent patch went in to try to check if that window is open but it does so by trying to access the registers in question and testing if the result is 0xffffffff. This method will trigger a PCIe error when the window is closed which on some systems will be fatal (it will trigger an EEH for example on POWER which will take out the device). This patch improves this in two ways: - First, if the firmware has put properties in the device-tree containing the relevant configuration information, we use these. - Otherwise, a bit in one of the SCU scratch registers (which are readable via the VGA register space and writeable by the BMC) will indicate if the BMC has closed the window. This bit has been defined by Y.C Chen from Aspeed. If the window is closed and the configuration isn't available from the device-tree, some sane defaults are used. Those defaults are hopefully sufficient for standard video modes used on a server. Signed-off-by: Russell Currey Acked-by: Joel Stanley Cc: Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_main.c | 264 +++++++++++++++++++++++++---------------- drivers/gpu/drm/ast/ast_post.c | 7 +- 3 files changed, 168 insertions(+), 109 deletions(-) commit 3856081eede297b617560b85e948cfb00bb395ec Author: Y.C. Chen Date: Thu Feb 23 15:52:33 2017 +0800 drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS The current POST code for the AST2300/2400 family doesn't work properly if the chip hasn't been initialized previously by either the BMC own FW or the VBIOS. This fixes it. Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt Tested-by: Y.C. Chen Acked-by: Joel Stanley Cc: Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_post.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit 825c6abbc316f496cd2b66e1fa72892cf4b49a9f Author: Arnd Bergmann Date: Mon Feb 27 21:37:12 2017 +0100 scsi: lpfc: use proper format string for dma_addr_t dma_addr_t may be either u32 or u64, depending on the kernel configuration, and we get a warning for the 32-bit case: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_req': drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_abort': drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] printk has a special "%pad" format string that passes the dma address by reference to solve this problem. Fixes: 01649561a8b4 ("scsi: lpfc: NVME Initiator: bind to nvme_fc api") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 90ec7c9dff07d676c0b9b499286b931005c6b051 Author: Arnd Bergmann Date: Mon Feb 27 21:31:43 2017 +0100 scsi: lpfc: use div_u64 for 64-bit division The new debugfs output causes a link error on 32-bit architectures: ERROR: "__aeabi_uldivmod" [drivers/scsi/lpfc/lpfc.ko] undefined! This code is not performance critical, so we can simply use div_u64(). [mkp: fixed up whitespace] Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support") Fixes: 2b65e18202fd ("scsi: lpfc: NVME Target: Add debugfs support") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 3e761a42e19c63b624ebac94d918d8a15e07e2a7 Author: Dave Jiang Date: Mon Feb 27 14:30:25 2017 -0800 mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear() Looks like I also missed the build config that includes CONFIG_HIGHMEM64G && CONFIG_PARAVIRT to export the native_pud_clear() dummy function. Fixes: a00cc7d9dd93d ("mm, x86: add support for PUD-sized transparent hugepages") Link: http://lkml.kernel.org/r/148823188084.56076.17451228917824355200.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang Reported-by: Laura Abbott Reported-by: Boris Ostrovsky Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable-3level.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2959a5f726f6510d6dd7c958f8877e08d0cf589c Author: Jinbum Park Date: Mon Feb 27 14:30:22 2017 -0800 mm: add arch-independent testcases for RODATA This patch makes arch-independent testcases for RODATA. Both x86 and x86_64 already have testcases for RODATA, But they are arch-specific because using inline assembly directly. And cacheflush.h is not a suitable location for rodata-test related things. Since they were in cacheflush.h, If someone change the state of CONFIG_DEBUG_RODATA_TEST, It cause overhead of kernel build. To solve the above issues, write arch-independent testcases and move it to shared location. [jinb.park7@gmail.com: fix config dependency] Link: http://lkml.kernel.org/r/20170209131625.GA16954@pjb1027-Latitude-E5410 Link: http://lkml.kernel.org/r/20170129105436.GA9303@pjb1027-Latitude-E5410 Signed-off-by: Jinbum Park Acked-by: Kees Cook Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Arjan van de Ven Cc: Laura Abbott Cc: Russell King Cc: Valentin Rothberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig.debug | 8 ----- arch/x86/include/asm/cacheflush.h | 10 ------ arch/x86/kernel/Makefile | 1 - arch/x86/kernel/test_rodata.c | 75 --------------------------------------- arch/x86/mm/init_32.c | 4 --- arch/x86/mm/init_64.c | 5 --- include/linux/rodata_test.h | 23 ++++++++++++ init/main.c | 6 ++-- mm/Kconfig.debug | 6 ++++ mm/Makefile | 1 + mm/rodata_test.c | 56 +++++++++++++++++++++++++++++ 11 files changed, 90 insertions(+), 105 deletions(-) commit 8d85063adbb1eb3d168e226fef96995391462c20 Author: Fabian Frederick Date: Mon Feb 27 14:30:19 2017 -0800 hfs: atomically read inode size See i_size_read() comments in include/linux/fs.h Link: http://lkml.kernel.org/r/20170123175245.3272-1-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfs/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b279ddc3382426f8e05068de3488a2993f68dc26 Author: Vegard Nossum Date: Mon Feb 27 14:30:16 2017 -0800 mm: clarify mm_struct.mm_{users,count} documentation Clarify documentation relating to mm_users and mm_count, and switch to kernel-doc syntax. Link: http://lkml.kernel.org/r/20161218123229.22952-4-vegard.nossum@oracle.com Signed-off-by: Vegard Nossum Acked-by: Michal Hocko Acked-by: Peter Zijlstra (Intel) Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 388f79345502232d335467e8fa6f8e55a18844e1 Author: Vegard Nossum Date: Mon Feb 27 14:30:13 2017 -0800 mm: use mmget_not_zero() helper We already have the helper, we can convert the rest of the kernel mechanically using: git grep -l 'atomic_inc_not_zero.*mm_users' | xargs sed -i 's/atomic_inc_not_zero(&\(.*\)->mm_users)/mmget_not_zero\(\1\)/' This is needed for a later patch that hooks into the helper, but might be a worthwhile cleanup on its own. Link: http://lkml.kernel.org/r/20161218123229.22952-3-vegard.nossum@oracle.com Signed-off-by: Vegard Nossum Acked-by: Michal Hocko Acked-by: Peter Zijlstra (Intel) Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/iommu/intel-svm.c | 2 +- fs/proc/base.c | 4 ++-- fs/proc/task_mmu.c | 4 ++-- fs/proc/task_nommu.c | 2 +- kernel/events/uprobes.c | 2 +- mm/swapfile.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit 3fce371bfac2be0396ffc1e763600e6c6b1bb52a Author: Vegard Nossum Date: Mon Feb 27 14:30:10 2017 -0800 mm: add new mmget() helper Apart from adding the helper function itself, the rest of the kernel is converted mechanically using: git grep -l 'atomic_inc.*mm_users' | xargs sed -i 's/atomic_inc(&\(.*\)->mm_users);/mmget\(\1\);/' git grep -l 'atomic_inc.*mm_users' | xargs sed -i 's/atomic_inc(&\(.*\)\.mm_users);/mmget\(\&\1\);/' This is needed for a later patch that hooks into the helper, but might be a worthwhile cleanup on its own. (Michal Hocko provided most of the kerneldoc comment.) Link: http://lkml.kernel.org/r/20161218123229.22952-2-vegard.nossum@oracle.com Signed-off-by: Vegard Nossum Acked-by: Michal Hocko Acked-by: Peter Zijlstra (Intel) Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/kernel/smp.c | 2 +- arch/blackfin/mach-common/smp.c | 2 +- arch/frv/mm/mmu-context.c | 2 +- arch/metag/kernel/smp.c | 2 +- arch/sh/kernel/smp.c | 2 +- arch/xtensa/kernel/smp.c | 2 +- include/linux/sched.h | 21 +++++++++++++++++++++ kernel/fork.c | 4 ++-- mm/swapfile.c | 10 +++++----- virt/kvm/async_pf.c | 2 +- 10 files changed, 35 insertions(+), 14 deletions(-) commit f1f1007644ffc8051a4c11427d58b1967ae7b75a Author: Vegard Nossum Date: Mon Feb 27 14:30:07 2017 -0800 mm: add new mmgrab() helper Apart from adding the helper function itself, the rest of the kernel is converted mechanically using: git grep -l 'atomic_inc.*mm_count' | xargs sed -i 's/atomic_inc(&\(.*\)->mm_count);/mmgrab\(\1\);/' git grep -l 'atomic_inc.*mm_count' | xargs sed -i 's/atomic_inc(&\(.*\)\.mm_count);/mmgrab\(\&\1\);/' This is needed for a later patch that hooks into the helper, but might be a worthwhile cleanup on its own. (Michal Hocko provided most of the kerneldoc comment.) Link: http://lkml.kernel.org/r/20161218123229.22952-1-vegard.nossum@oracle.com Signed-off-by: Vegard Nossum Acked-by: Michal Hocko Acked-by: Peter Zijlstra (Intel) Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/kernel/smp.c | 2 +- arch/arc/kernel/smp.c | 2 +- arch/arm/kernel/smp.c | 2 +- arch/arm64/kernel/smp.c | 2 +- arch/blackfin/mach-common/smp.c | 2 +- arch/hexagon/kernel/smp.c | 2 +- arch/ia64/kernel/setup.c | 2 +- arch/m32r/kernel/setup.c | 2 +- arch/metag/kernel/smp.c | 2 +- arch/mips/kernel/traps.c | 2 +- arch/mn10300/kernel/smp.c | 2 +- arch/parisc/kernel/smp.c | 2 +- arch/powerpc/kernel/smp.c | 2 +- arch/s390/kernel/processor.c | 2 +- arch/score/kernel/traps.c | 2 +- arch/sh/kernel/smp.c | 2 +- arch/sparc/kernel/leon_smp.c | 2 +- arch/sparc/kernel/smp_64.c | 2 +- arch/sparc/kernel/sun4d_smp.c | 2 +- arch/sparc/kernel/sun4m_smp.c | 2 +- arch/sparc/kernel/traps_32.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/tile/kernel/smpboot.c | 2 +- arch/x86/kernel/cpu/common.c | 4 ++-- arch/xtensa/kernel/smp.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- fs/proc/base.c | 4 ++-- fs/userfaultfd.c | 2 +- include/linux/sched.h | 22 ++++++++++++++++++++++ kernel/exit.c | 2 +- kernel/futex.c | 2 +- kernel/sched/core.c | 4 ++-- mm/khugepaged.c | 2 +- mm/ksm.c | 2 +- mm/mmu_context.c | 2 +- mm/mmu_notifier.c | 2 +- mm/oom_kill.c | 4 ++-- virt/kvm/kvm_main.c | 2 +- 40 files changed, 65 insertions(+), 43 deletions(-) commit 522b837c672eba9e9fb69f9f52bced0256dc6697 Author: Alexey Dobriyan Date: Mon Feb 27 14:30:05 2017 -0800 checkpatch: warn when formats use %Z and suggest %z vsnprintf extension %Z is non-standard C. Suggest the use of %z instead. Miscellanea: - Correct the misuse of type string PRINTF_0xDECIMAL type strings are supposed to be uppercase only. Fix this and add tr/[a-z]/[A-Z] to the type check in case I forget this again sometime in the future. - Improve the mechanism to find these defects so all 3 current checks are done on the format string [joe@perches.com: correct the misuse of type string PRINTF_0xDECIMAL, improve the mechanism to find these defects] Link: http://lkml.kernel.org/r/4e3ad74b0c9dc229b06018a2d79655308ddbbebd.1484014173.git.joe@perches.com Link: http://lkml.kernel.org/r/20170109235955.GA6787@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 5b5e0928f742cfa853b2411400a1b19fa379d758 Author: Alexey Dobriyan Date: Mon Feb 27 14:30:02 2017 -0800 lib/vsprintf.c: remove %Z support Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan Cc: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/bsg.c | 6 +-- drivers/atm/ambassador.c | 7 +-- drivers/atm/eni.c | 6 +-- drivers/atm/firestream.c | 12 ++--- drivers/atm/horizon.c | 7 +-- drivers/atm/lanai.c | 16 +++--- drivers/char/pcmcia/cm4000_cs.c | 2 +- drivers/char/pcmcia/cm4040_cs.c | 2 +- drivers/gpu/drm/mga/mga_drv.h | 4 +- drivers/ide/ide-acpi.c | 2 +- drivers/ide/ide-tape.c | 4 +- drivers/input/touchscreen/cyttsp4_core.c | 62 +++++++++++----------- drivers/media/dvb-frontends/helene.c | 2 +- drivers/media/dvb-frontends/or51132.c | 2 +- drivers/media/dvb-frontends/tda10048.c | 2 +- drivers/media/pci/saa7164/saa7164-fw.c | 2 +- drivers/media/tuners/xc5000.c | 2 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 4 +- drivers/misc/vmw_vmci/vmci_context.c | 2 +- drivers/net/arcnet/arcnet.c | 2 +- drivers/net/ethernet/cadence/macb.c | 2 +- drivers/net/gtp.c | 2 +- drivers/net/usb/rndis_host.c | 2 +- drivers/net/usb/sierra_net.c | 2 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 30 +++++------ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 16 +++--- drivers/parport/ieee1284_ops.c | 2 +- drivers/scsi/osd/osd_initiator.c | 2 +- drivers/scsi/osst.c | 6 +-- drivers/scsi/qla2xxx/qla_init.c | 10 ++-- drivers/tty/n_hdlc.c | 2 +- drivers/usb/gadget/legacy/inode.c | 2 +- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/misc/adutux.c | 6 +-- drivers/usb/misc/legousbtower.c | 2 +- drivers/usb/misc/uss720.c | 8 +-- drivers/video/fbdev/metronomefb.c | 2 +- fs/afs/dir.c | 14 ++--- fs/ncpfs/sock.c | 4 +- fs/nfs/blocklayout/blocklayout.c | 2 +- fs/nfs/filelayout/filelayout.c | 4 +- fs/nfs/flexfilelayout/flexfilelayout.c | 4 +- fs/nfs/objlayout/objlayout.c | 2 +- fs/nfsd/nfscache.c | 2 +- kernel/relay.c | 2 +- lib/vsprintf.c | 8 +-- mm/dmapool.c | 2 +- net/appletalk/ddp.c | 4 +- net/atm/mpc.c | 2 +- net/bridge/netfilter/ebt_among.c | 2 +- net/ieee802154/socket.c | 4 +- net/ipv4/fib_trie.c | 2 +- net/ipv4/ipmr.c | 2 +- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 +- net/ipv4/netfilter/nf_log_arp.c | 2 +- net/ipv6/netfilter/nf_log_ipv6.c | 2 +- net/irda/irnet/irnet_ppp.c | 12 ++--- net/l2tp/l2tp_core.c | 4 +- net/netfilter/ipvs/ip_vs_conn.c | 2 +- net/netfilter/ipvs/ip_vs_dh.c | 4 +- net/netfilter/ipvs/ip_vs_lblc.c | 4 +- net/netfilter/ipvs/ip_vs_lblcr.c | 4 +- net/netfilter/ipvs/ip_vs_sh.c | 4 +- net/netfilter/ipvs/ip_vs_sync.c | 2 +- net/netfilter/nf_conntrack_ftp.c | 2 +- net/sctp/output.c | 2 +- net/sunrpc/auth_gss/auth_gss.c | 2 +- net/sunrpc/svc.c | 2 +- net/sunrpc/svcsock.c | 4 +- net/sunrpc/xprtsock.c | 8 +-- security/selinux/ss/ebitmap.c | 2 +- security/selinux/ss/policydb.c | 2 +- sound/pci/korg1212/korg1212.c | 4 +- sound/pci/pcxhr/pcxhr_hwdep.c | 2 +- sound/pcmcia/vx/vxp_ops.c | 2 +- sound/soc/soc-core.c | 2 +- 79 files changed, 187 insertions(+), 201 deletions(-) commit d7f6724366c5ccb52b9b2e403b0a9383803bd47a Author: Jinbum Park Date: Mon Feb 27 14:29:59 2017 -0800 scripts/spelling.txt: add some typo-words I wrote a simple script to find new typo not in spelling.txt. (https://github.com/jinb-park/find-linux-kernel-typo) and get following result: [ rank ] 63 paramaters 18 alignement 9 strucuture .... The number means how many files include the typo. This patch adds these common typo. Link: http://lkml.kernel.org/r/20170112113452.GA7042@pjb1027-Latitude-E5410 Signed-off-by: Jinbum Park Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4091fb95b5f8dea37568d1a94c8227244bade891 Author: Masahiro Yamada Date: Mon Feb 27 14:29:56 2017 -0800 scripts/spelling.txt: add "followings" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: followings||following While we are here, add a missing colon in the boilerplate in DT binding documents. The "you SoC" in allwinner,sunxi-pinctrl.txt was fixed as well. I reworded "as the followings:" to "as follows:" for drivers/usb/gadget/udc/renesas_usb3.c. Link: http://lkml.kernel.org/r/1481573103-11329-32-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/DocBook/libata.tmpl | 2 +- Documentation/acpi/method-tracing.txt | 2 +- Documentation/blockdev/mflash.txt | 2 +- Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | 2 +- Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 2 +- Documentation/devicetree/bindings/soc/rockchip/grf.txt | 4 ++-- Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 4 ++-- Documentation/devicetree/bindings/sound/sun4i-codec.txt | 2 +- Documentation/devicetree/bindings/sound/sun4i-i2s.txt | 4 ++-- Documentation/memory-hotplug.txt | 4 ++-- Documentation/sound/hd-audio/notes.rst | 2 +- drivers/ata/libata-eh.c | 2 +- drivers/atm/iphase.c | 2 +- drivers/atm/iphase.h | 2 +- drivers/devfreq/devfreq.c | 2 +- drivers/hwmon/g762.c | 2 +- drivers/isdn/hardware/eicon/debug.c | 2 +- drivers/pci/quirks.c | 2 +- drivers/staging/gs_fpgaboot/gs_fpgaboot.h | 2 +- drivers/usb/gadget/udc/renesas_usb3.c | 4 ++-- include/linux/kconfig.h | 2 +- mm/percpu.c | 2 +- scripts/spelling.txt | 1 + sound/pci/hda/patch_ca0132.c | 2 +- sound/ppc/snd_ps3.c | 2 +- sound/soc/fsl/fsl_asrc.c | 2 +- 26 files changed, 31 insertions(+), 30 deletions(-) commit 608595ed9b33ff8dd77ba12b96023212846e39ff Author: Masahiro Yamada Date: Mon Feb 27 14:29:53 2017 -0800 scripts/spelling.txt: add "therfore" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: therfore||therefore Besides, tidy up comment blocks for 80-col wrapping. Link: http://lkml.kernel.org/r/1481573103-11329-31-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/sw/rdmavt/mad.c | 6 +++--- drivers/scsi/aacraid/linit.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- scripts/spelling.txt | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) commit b8a14f3379a637f61deed4ce3e5180f1f34d40d1 Author: Masahiro Yamada Date: Mon Feb 27 14:29:50 2017 -0800 scripts/spelling.txt: add "overwriten" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: overwrien||overwritten Link: http://lkml.kernel.org/r/1481573103-11329-30-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/hw/qib/qib_iba6120.c | 2 +- drivers/infiniband/hw/qib/qib_iba7220.c | 2 +- drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +- drivers/parport/parport_pc.c | 2 +- scripts/spelling.txt | 1 + sound/pci/cs46xx/cs46xx_dsp_task_types.h | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) commit 9a284e5c9e04a3533f72eda8956162dfc77684a9 Author: Masahiro Yamada Date: Mon Feb 27 14:29:48 2017 -0800 scripts/spelling.txt: add "overwritting" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: overwritting||overwriting Link: http://lkml.kernel.org/r/1481573103-11329-29-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/lib/copy_template.S | 2 +- drivers/net/ethernet/adi/bfin_mac.c | 2 +- drivers/net/ethernet/intel/igb/e1000_phy.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.h | 2 +- drivers/usb/usbip/usbip_common.c | 2 +- scripts/spelling.txt | 1 + 7 files changed, 7 insertions(+), 6 deletions(-) commit 1cce200081d182e0ae6b40bcb1cfdecfdfc09fe4 Author: Masahiro Yamada Date: Mon Feb 27 14:29:45 2017 -0800 scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: deintializing||deinitializing deintialize||deinitialize deintialized||deinitialized Link: http://lkml.kernel.org/r/1481573103-11329-28-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/crypto/caam/ctrl.c | 2 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- scripts/spelling.txt | 3 +++ sound/soc/amd/acp-pcm-dma.c | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) commit 66f00449086f76a6d859dfcbe7a2a151240b233c Author: Masahiro Yamada Date: Mon Feb 27 14:29:42 2017 -0800 scripts/spelling.txt: add "disassocation" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: disassocation||disassociation Link: http://lkml.kernel.org/r/1481573103-11329-27-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- include/net/cfg80211.h | 2 +- scripts/spelling.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) commit 0cf2a848efc657554cf0a9b3d8fa0039002026a9 Author: Masahiro Yamada Date: Mon Feb 27 14:29:39 2017 -0800 scripts/spelling.txt: add "omited" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: omited||omitted omiting||omitting Link: http://lkml.kernel.org/r/1481573103-11329-26-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 2 +- drivers/nfc/pn533/pn533.c | 2 +- drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- scripts/spelling.txt | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) commit 34dcaf40c1e0316038ffdad621fc7603373c89f1 Author: Masahiro Yamada Date: Mon Feb 27 14:29:36 2017 -0800 scripts/spelling.txt: add "explictely" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: explictely||explicitly Link: http://lkml.kernel.org/r/1481573103-11329-25-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/device-mapper/dm-raid.txt | 2 +- drivers/char/pcmcia/cm4000_cs.c | 2 +- scripts/spelling.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit a6ab4eff19ff52d5f1891ef919f7125bbd22b6b3 Author: Masahiro Yamada Date: Mon Feb 27 14:29:34 2017 -0800 scripts/spelling.txt: add "applys" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: applys||applies The "applyes" in drivers/video/fbdev/aty/radeon_monitor.c is a different pattern but it was fixed in this commit. The "This functions" in the same line was fixed as well. Link: http://lkml.kernel.org/r/1481573103-11329-24-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/v4l2-core/tuner-core.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 2 +- drivers/video/fbdev/aty/radeon_monitor.c | 2 +- scripts/spelling.txt | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) commit 2c149601001ba25b5b4e5aa9dd481d677cae15ae Author: Masahiro Yamada Date: Mon Feb 27 14:29:31 2017 -0800 scripts/spelling.txt: add "configuartion" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: configuartion||configuration While we are here, fix the "ouput" as well in the touched hunk in drivers/media/dvb-frontends/drx39xyj/drx_driver.h. Link: http://lkml.kernel.org/r/1481573103-11329-23-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 4 ++-- drivers/media/dvb-frontends/drx39xyj/drxj.c | 16 ++++++++-------- drivers/media/dvb-frontends/drx39xyj/drxj.h | 4 ++-- drivers/media/dvb-frontends/drxk_hard.c | 2 +- drivers/net/wireless/ti/wl18xx/main.c | 2 +- scripts/spelling.txt | 1 + 6 files changed, 15 insertions(+), 14 deletions(-) commit 03671057c3b769c0adbf9212bf695481d3f59279 Author: Masahiro Yamada Date: Mon Feb 27 14:29:28 2017 -0800 scripts/spelling.txt: add "overrided" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: overrided||overridden Link: http://lkml.kernel.org/r/1481573103-11329-22-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/acpi/method-customizing.txt | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- drivers/acpi/resource.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- drivers/net/ethernet/micrel/ksz884x.c | 8 ++++---- drivers/pinctrl/bcm/Kconfig | 2 +- scripts/spelling.txt | 1 + tools/lib/bpf/bpf.c | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) commit 3f8b6fb7f279c769c0973431be1cd7f15e8b2755 Author: Masahiro Yamada Date: Mon Feb 27 14:29:25 2017 -0800 scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: comsume||consume comsumer||consumer comsuming||consuming I see some variable names with this pattern, but this commit is only touching comment blocks to avoid unexpected impact. Link: http://lkml.kernel.org/r/1481573103-11329-19-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/hid/hid-kye.c | 2 +- drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 +- drivers/net/ethernet/sis/sis900.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- drivers/tty/serial/ioc4_serial.c | 2 +- fs/ext4/extents_status.c | 2 +- mm/page-writeback.c | 2 +- scripts/spelling.txt | 3 +++ 8 files changed, 11 insertions(+), 8 deletions(-) commit d7f3153e228c7eee657e9286d6209b2d403ab73b Author: Masahiro Yamada Date: Mon Feb 27 14:29:23 2017 -0800 scripts/spelling.txt: add "initialiazation" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: initialiazation||initialization While we are here, fix the "overriden" in the touched line in drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c. Link: http://lkml.kernel.org/r/1481573103-11329-17-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/sonypi.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 +- scripts/spelling.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 183b8021fc0a5fadecdf9c0ccac1f48b5c326278 Author: Masahiro Yamada Date: Mon Feb 27 14:29:20 2017 -0800 scripts/spelling.txt: add "intialization" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: intialization||initialization The "inintialization" in drivers/acpi/spcr.c is a different pattern but I fixed it as well in this commit. Link: http://lkml.kernel.org/r/1481573103-11329-16-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mach-omap2/omap_twl.c | 2 +- drivers/acpi/spcr.c | 2 +- drivers/firewire/core-device.c | 4 ++-- drivers/mmc/host/mmci_qcom_dml.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- drivers/net/wireless/ti/wlcore/init.c | 2 +- drivers/power/avs/smartreflex.c | 6 +++--- drivers/scsi/ipr.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 14 +++++++------- drivers/scsi/scsi_transport_sas.c | 2 +- drivers/scsi/storvsc_drv.c | 2 +- drivers/usb/gadget/udc/fsl_udc_core.c | 4 ++-- scripts/spelling.txt | 1 + sound/soc/qcom/lpass.h | 2 +- sound/soc/soc-topology.c | 4 ++-- 16 files changed, 28 insertions(+), 27 deletions(-) commit 4d39f0ac8e5aeaa5e56c2d2a0f737ac8bb826bca Author: Masahiro Yamada Date: Mon Feb 27 14:29:17 2017 -0800 scripts/spelling.txt: add "unneded" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: unneded||unneeded Link: http://lkml.kernel.org/r/1481573103-11329-15-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 2 +- scripts/spelling.txt | 1 + sound/soc/codecs/wm_hubs.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 176180c2b4ae673394b4b37474cfd3e3fd9d0c5e Author: Masahiro Yamada Date: Mon Feb 27 14:29:14 2017 -0800 scripts/spelling.txt: add "neded" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: neded||needed While we are here, fix the "overriden", "wont", and "etc" in the same hunk in drivers/media/usb/tm6000/tm6000-input.c. Link: http://lkml.kernel.org/r/1481573103-11329-14-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/usb/gspca/t613.c | 6 +++--- drivers/media/usb/tm6000/tm6000-input.c | 2 +- scripts/spelling.txt | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) commit 57366a8d0bf24181fea3e9d5b772175059914a3c Author: Masahiro Yamada Date: Mon Feb 27 14:29:12 2017 -0800 scripts/spelling.txt: add "againt" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: againt||against While we are here, fix the "capabilites" as well in the touched hunk in drivers/gpu/drm/drm_probe_helper.c. Link: http://lkml.kernel.org/r/1481573103-11329-13-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/drm_probe_helper.c | 4 ++-- fs/ecryptfs/kthread.c | 2 +- scripts/spelling.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) commit b43daedc0e786e17943680dde410b553a33cd174 Author: Masahiro Yamada Date: Mon Feb 27 14:29:09 2017 -0800 scripts/spelling.txt: add "embeded" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: embeded||embedded Link: http://lkml.kernel.org/r/1481573103-11329-12-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/blk-throttle.c | 2 +- drivers/nvme/host/rdma.c | 2 +- drivers/scsi/osd/osd_initiator.c | 2 +- scripts/spelling.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) commit b564d62e67560423965c43d60249a09d8e70a27a Author: Masahiro Yamada Date: Mon Feb 27 14:29:06 2017 -0800 scripts/spelling.txt: add "varible" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: varible||variable While we are here, tidy up the comment blocks that fit in a single line for drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c and net/sctp/transport.c. Link: http://lkml.kernel.org/r/1481573103-11329-11-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/scsi/ChangeLog.megaraid_sas | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 +--- drivers/net/wimax/i2400m/usb-fw.c | 2 +- kernel/torture.c | 2 +- net/sctp/transport.c | 4 +--- scripts/spelling.txt | 1 + 6 files changed, 6 insertions(+), 9 deletions(-) commit 4e0385dd7469d933c4adf84a617f872ca547aa07 Author: Masahiro Yamada Date: Mon Feb 27 14:29:03 2017 -0800 scripts/spelling.txt: add "efective" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: efective||effective While we are here, fix the "addres" as well in the touched line in arch/openrisc/kernel/entry.S. Link: http://lkml.kernel.org/r/1481573103-11329-10-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m68k/ifpsp060/src/isp.S | 2 +- arch/openrisc/kernel/entry.S | 2 +- scripts/spelling.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 89d790ab31d033d67635f6362d57ea64e47708fa Author: Masahiro Yamada Date: Mon Feb 27 14:29:01 2017 -0800 scripts/spelling.txt: add "algined" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: algined||aligned While we are here, fix the "appplication" in the touched line in drivers/block/loop.c. Also, fix the "may not naturally ..." to "may not be naturally ..." in the touched line in mm/page_alloc. Link: http://lkml.kernel.org/r/1481573103-11329-9-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/loop.c | 2 +- mm/page_alloc.c | 2 +- scripts/spelling.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 550116d21a656e8b5670073e586315e5a6d12f01 Author: Masahiro Yamada Date: Mon Feb 27 14:28:58 2017 -0800 scripts/spelling.txt: add "aligment" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: aligment||alignment I did not touch the "N_BYTE_ALIGMENT" macro in drivers/net/wireless/realtek/rtlwifi/wifi.h to avoid unpredictable impact. I fixed "_aligment_handler" in arch/openrisc/kernel/entry.S because it is surrounded by #if 0 ... #endif. It is surely safe and I confirmed "_alignment_handler" is correct. I also fixed the "controler" I found in the same hunk in arch/openrisc/kernel/head.S. Link: http://lkml.kernel.org/r/1481573103-11329-8-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/kernel/unwind.c | 4 ++-- arch/openrisc/kernel/entry.S | 4 ++-- arch/openrisc/kernel/head.S | 6 +++--- arch/openrisc/kernel/vmlinux.lds.S | 4 ++-- drivers/gpu/drm/amd/include/atombios.h | 6 +++--- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/radeon/atombios.h | 4 ++-- drivers/media/platform/exynos4-is/fimc-core.h | 2 +- drivers/net/wireless/ath/ath9k/ani.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c | 4 ++-- drivers/scsi/bfa/bfi_ms.h | 2 +- net/netfilter/x_tables.c | 2 +- scripts/spelling.txt | 1 + 13 files changed, 23 insertions(+), 22 deletions(-) commit 8ab102d60a0c19df602f3758848d55f0703bf9bb Author: Masahiro Yamada Date: Mon Feb 27 14:28:55 2017 -0800 scripts/spelling.txt: add "partiton" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: partiton||partition Link: http://lkml.kernel.org/r/1481573103-11329-7-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/mach/flash.h | 2 +- arch/ia64/sn/kernel/sn2/sn_hwperf.c | 2 +- arch/powerpc/boot/dts/fsl/mpc8569mds.dts | 2 +- arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/fsl_hcalls.h | 2 +- arch/powerpc/platforms/pseries/iommu.c | 2 +- arch/sparc/kernel/visemul.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- drivers/watchdog/bcm2835_wdt.c | 6 +++--- include/linux/mtd/qinfo.h | 2 +- include/linux/spi/flash.h | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) commit 0f5e1558306076adec7255b317b89480d8aaa304 Author: Masahiro Yamada Date: Mon Feb 27 14:28:52 2017 -0800 scripts/spelling.txt: add "an one" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: an one||a one I dropped the "an" before "one or more" in drivers/net/ethernet/sfc/mcdi_pcol.h. Link: http://lkml.kernel.org/r/1481573103-11329-6-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/vtime.c | 2 +- drivers/net/ethernet/sfc/mcdi_pcol.h | 2 +- drivers/usb/core/devio.c | 2 +- scripts/spelling.txt | 1 + tools/perf/util/dso.c | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) commit 03440c4e5e2f167764997a7e0f2dbb279d8078e6 Author: Masahiro Yamada Date: Mon Feb 27 14:28:49 2017 -0800 scripts/spelling.txt: add "an union" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: an union||a union Link: http://lkml.kernel.org/r/1481573103-11329-5-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/media/uapi/dvb/dvb-frontend-parameters.rst | 4 ++-- arch/x86/include/asm/desc_defs.h | 2 +- drivers/acpi/acpica/dbconvert.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfeval.c | 4 ++-- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 2 +- include/linux/dcache.h | 4 ++-- include/media/v4l2-ctrls.h | 4 ++-- include/xen/interface/grant_table.h | 2 +- scripts/spelling.txt | 1 + sound/pci/ice1712/wm8766.c | 2 +- sound/pci/ice1712/wm8776.c | 2 +- tools/perf/util/probe-finder.c | 4 ++-- tools/perf/util/sort.h | 2 +- 14 files changed, 19 insertions(+), 18 deletions(-) commit 9332ef9dbd172d4ab0a0141df7cb21c696a5ce96 Author: Masahiro Yamada Date: Mon Feb 27 14:28:47 2017 -0800 scripts/spelling.txt: add "an user" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: an user||a user an userspace||a userspace I also added "userspace" to the list since it is a common word in Linux. I found some instances for "an userfaultfd", but I did not add it to the list. I felt it is endless to find words that start with "user" such as "userland" etc., so must draw a line somewhere. Link: http://lkml.kernel.org/r/1481573103-11329-4-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/ras.rst | 2 +- Documentation/devicetree/bindings/opp/opp.txt | 2 +- Documentation/filesystems/quota.txt | 2 +- Documentation/kselftest.txt | 4 ++-- Documentation/media/dvb-drivers/ci.rst | 2 +- Documentation/networking/cdc_mbim.txt | 4 ++-- Documentation/vm/userfaultfd.txt | 2 +- arch/Kconfig | 2 +- arch/powerpc/xmon/ppc-opc.c | 2 +- arch/x86/kvm/mmu.c | 2 +- drivers/media/dvb-core/dvb_ringbuffer.h | 4 ++-- drivers/scsi/lpfc/lpfc_attr.c | 2 +- fs/userfaultfd.c | 6 +++--- include/net/mac80211.h | 2 +- kernel/irq/manage.c | 2 +- net/bluetooth/hci_sock.c | 6 +++--- net/netfilter/nfnetlink_cthelper.c | 2 +- scripts/spelling.txt | 2 ++ tools/perf/Documentation/tips.txt | 2 +- 19 files changed, 27 insertions(+), 25 deletions(-) commit c6efb58db4e76ab1322b5e869d4f9eb9ce30bd40 Author: Masahiro Yamada Date: Mon Feb 27 14:28:44 2017 -0800 scripts/spelling.txt: add "swithc" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: swithc||switch swithced||switched swithcing||switching Link: http://lkml.kernel.org/r/1481573103-11329-3-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/extcon/extcon-rt8973a.c | 2 +- drivers/media/i2c/adv7183_regs.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- scripts/spelling.txt | 3 +++ 5 files changed, 8 insertions(+), 5 deletions(-) commit 08a7e621ff81dec64ddf1eab16353c0c217fdd89 Author: Masahiro Yamada Date: Mon Feb 27 14:28:41 2017 -0800 scripts/spelling.txt: add "swith" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: swith||switch swithable||switchable swithed||switched swithing||switching While we are here, fix the "update" to "updates" in the touched hunk in drivers/net/wireless/marvell/mwifiex/wmm.c. Link: http://lkml.kernel.org/r/1481573103-11329-2-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 2 +- Documentation/devicetree/bindings/power/pd-samsung.txt | 2 +- arch/arm/boot/compressed/head.S | 2 +- arch/arm/mm/cache-v7.S | 2 +- arch/arm/mm/cache-v7m.S | 2 +- arch/sh/kernel/irq.c | 2 +- arch/sparc/include/asm/switch_to_32.h | 2 +- drivers/gpu/drm/amd/include/atombios.h | 2 +- drivers/gpu/drm/radeon/atombios.h | 2 +- drivers/isdn/mISDN/dsp_core.c | 2 +- drivers/net/usb/kalmia.c | 2 +- drivers/net/wireless/marvell/mwifiex/wmm.c | 4 ++-- net/mac80211/mesh.c | 2 +- scripts/recordmcount.pl | 2 +- scripts/spelling.txt | 4 ++++ sound/pci/ac97/ac97_patch.c | 2 +- 16 files changed, 20 insertions(+), 16 deletions(-) commit f3048d17d1127f003db10fb8ac9a68610923f783 Author: Geliang Tang Date: Mon Feb 27 14:28:38 2017 -0800 nilfs2: use i_blocksize() Since i_blocksize() helper has been defined in fs.h, use it instead of open-coding. Link: http://lkml.kernel.org/r/1485184655-3895-3-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Geliang Tang Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/alloc.c | 2 +- fs/nilfs2/btree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1508ddc39ab421c0d0569017b9ca3a5b99b0815b Author: Geliang Tang Date: Mon Feb 27 14:28:35 2017 -0800 nilfs2: use nilfs_btree_node_size() Use nilfs_btree_node_size() instead of open-coding. Link: http://lkml.kernel.org/r/1485184655-3895-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Geliang Tang Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93407472a21b82f39c955ea7787e5bc7da100642 Author: Fabian Frederick Date: Mon Feb 27 14:28:32 2017 -0800 fs: add i_blocksize() Replace all 1 << inode->i_blkbits and (1 << inode->i_blkbits) in fs branch. This patch also fixes multiple checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Thanks to Andrew Morton for suggesting more appropriate function instead of macro. [geliangtang@gmail.com: truncate: use i_blocksize()] Link: http://lkml.kernel.org/r/9c8b2cd83c8f5653805d43debde9fa8817e02fc4.1484895804.git.geliangtang@gmail.com Link: http://lkml.kernel.org/r/1481319905-10126-1-git-send-email-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Geliang Tang Cc: Alexander Viro Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 2 +- fs/btrfs/file.c | 2 +- fs/buffer.c | 12 ++++++------ fs/ceph/addr.c | 2 +- fs/direct-io.c | 2 +- fs/ext4/inode.c | 6 +++--- fs/ext4/mballoc.c | 2 +- fs/ext4/move_extent.c | 2 +- fs/iomap.c | 10 +++++----- fs/jfs/super.c | 4 ++-- fs/mpage.c | 2 +- fs/nfsd/blocklayout.c | 6 +++--- fs/nilfs2/btnode.c | 2 +- fs/nilfs2/inode.c | 4 ++-- fs/nilfs2/mdt.c | 4 ++-- fs/nilfs2/segment.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/file.c | 2 +- fs/orangefs/orangefs-utils.c | 4 ++-- fs/reiserfs/file.c | 2 +- fs/reiserfs/inode.c | 2 +- fs/stat.c | 2 +- fs/udf/inode.c | 2 +- fs/xfs/xfs_aops.c | 16 ++++++++-------- fs/xfs/xfs_file.c | 4 ++-- include/linux/fs.h | 5 +++++ mm/truncate.c | 2 +- 27 files changed, 56 insertions(+), 51 deletions(-) commit d31712009709774506e536a3cc1f7c512f550a0c Author: Gilad Ben-Yossef Date: Mon Feb 27 14:28:29 2017 -0800 scatterlist: do not disable IRQs in sg_copy_buffer Commit 50bed2e2862a ("sg: disable interrupts inside sg_copy_buffer") introduced disabling interrupts in sg_copy_buffer() since atomic uses of miter required it due to use of kmap_atomic(). However, as commit 8290e2d2dcbf ("scatterlist: atomic sg_mapping_iter() no longer needs disabled IRQs") acknowledges disabling interrupts is no longer needed for calls to kmap_atomic() and therefore unneeded for miter ops either, so remove it from sg_copy_buffer(). Link: http://lkml.kernel.org/r/1486040150-14109-3-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/scatterlist.c | 4 ---- 1 file changed, 4 deletions(-) commit 1d5210ef706523529d3cc16fd70be0a466253466 Author: Gilad Ben-Yossef Date: Mon Feb 27 14:28:27 2017 -0800 scatterlist: reorder compound boolean expression Test the cheaper boolean expression with no side effects first. Link: http://lkml.kernel.org/r/1486040150-14109-2-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95e91b831f87ac8e1f8ed50c14d709089b4e01b8 Author: Davidlohr Bueso Date: Mon Feb 27 14:28:24 2017 -0800 ipc/shm: Fix shmat mmap nil-page protection The issue is described here, with a nice testcase: https://bugzilla.kernel.org/show_bug.cgi?id=192931 The problem is that shmat() calls do_mmap_pgoff() with MAP_FIXED, and the address rounded down to 0. For the regular mmap case, the protection mentioned above is that the kernel gets to generate the address -- arch_get_unmapped_area() will always check for MAP_FIXED and return that address. So by the time we do security_mmap_addr(0) things get funky for shmat(). The testcase itself shows that while a regular user crashes, root will not have a problem attaching a nil-page. There are two possible fixes to this. The first, and which this patch does, is to simply allow root to crash as well -- this is also regular mmap behavior, ie when hacking up the testcase and adding mmap(... |MAP_FIXED). While this approach is the safer option, the second alternative is to ignore SHM_RND if the rounded address is 0, thus only having MAP_SHARED flags. This makes the behavior of shmat() identical to the mmap() case. The downside of this is obviously user visible, but does make sense in that it maintains semantics after the round-down wrt 0 address and mmap. Passes shm related ltp tests. Link: http://lkml.kernel.org/r/1486050195-18629-1-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reported-by: Gareth Evans Cc: Manfred Spraul Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit eac0b1c3681676f83d154915723f2853c38d5d1b Author: Luc Van Oostenryck Date: Mon Feb 27 14:28:21 2017 -0800 ipc/mqueue: add missing sparse annotation Link: http://lkml.kernel.org/r/20170128235704.45302-1-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/mqueue.c | 1 + 1 file changed, 1 insertion(+) commit 9de5ab8a2eeea9ae4b63b6f6353b415b93e020c0 Author: Manfred Spraul Date: Mon Feb 27 14:28:18 2017 -0800 ipc/sem: add hysteresis sysv sem has two lock modes: One with per-semaphore locks, one lock mode with a single global lock for the whole array. When switching from the per-semaphore locks to the global lock, all per-semaphore locks must be scanned for ongoing operations. The patch adds a hysteresis for switching from the global lock to the per semaphore locks. This reduces how often the per-semaphore locks must be scanned. Compared to the initial patch, this is a simplified solution: Setting USE_GLOBAL_LOCK_HYSTERESIS to 1 restores the current behavior. In theory, a workload with exactly 10 simple sops and then one complex op now scales a bit worse, but this is pure theory: If there is concurrency, the it won't be exactly 10:1:10:1:10:1:... If there is no concurrency, then there is no need for scalability. Link: http://lkml.kernel.org/r/1476851896-3590-3-git-send-email-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Peter Zijlstra Cc: Davidlohr Bueso Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: <1vier1@web.de> Cc: kernel test robot Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sem.h | 2 +- ipc/sem.c | 86 +++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 62 insertions(+), 26 deletions(-) commit 27d7be1801a4824ecccbc735593101d72c038f13 Author: Manfred Spraul Date: Mon Feb 27 14:28:15 2017 -0800 ipc/sem.c: avoid using spin_unlock_wait() a) The ACQUIRE in spin_lock() applies to the read, not to the store, at least for powerpc. This forces to add a smp_mb() into the fast path. b) The memory barrier provided by spin_unlock_wait() is right now arch dependent. Therefore: Use spin_lock()/spin_unlock() instead of spin_unlock_wait(). Advantage: faster single op semop calls(), observed +8.9% on x86. (the other solution would be arch dependencies in ipc/sem). Disadvantage: slower complex op semop calls, if (and only if) there are no sleeping operations. The next patch adds hysteresis, this further reduces the probability that the slow path is used. Link: http://lkml.kernel.org/r/1476851896-3590-2-git-send-email-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Peter Zijlstra Cc: Davidlohr Bueso Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: <1vier1@web.de> Cc: kernel test robot Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit 08865514805d2de8e7002fa8149c5de3e391f412 Author: Lokesh Vutla Date: Mon Feb 27 14:28:12 2017 -0800 initramfs: finish fput() before accessing any binary from initramfs Commit 4a9d4b024a31 ("switch fput to task_work_add") implements a schedule_work() for completing fput(), but did not guarantee calling __fput() after unpacking initramfs. Because of this, there is a possibility that during boot a driver can see ETXTBSY when it tries to load a binary from initramfs as fput() is still pending on that binary. This patch makes sure that fput() is completed after unpacking initramfs and removes the call to flush_delayed_fput() in kernel_init() which happens very late after unpacking initramfs. Link: http://lkml.kernel.org/r/20170201140540.22051-1-lokeshvutla@ti.com Signed-off-by: Lokesh Vutla Reported-by: Murali Karicheri Cc: Al Viro Cc: Tero Kristo Cc: Sekhar Nori Cc: Nishanth Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/initramfs.c | 2 ++ init/main.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit 7bcae82621df080a35cb5e708ef333a821effd96 Author: Randy Dunlap Date: Mon Feb 27 14:28:09 2017 -0800 lib/fonts/Kconfig: keep non-Sparc fonts listed together Keep fonts together and indented (in menu) as much as possible. This moves the Sparc font choices to the end of the menu since they have different dependencies. Link: http://lkml.kernel.org/r/de6d8977-c6d6-a82d-c953-f2a2fefdb8a5@infradead.org Signed-off-by: Randy Dunlap Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/fonts/Kconfig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0d31a194d517ce77a1c3a06cd8708184bb6e7862 Author: Amit Pundir Date: Mon Feb 27 14:28:06 2017 -0800 config: android-base: enable hardened usercopy and kernel ASLR Enable CONFIG_HARDENED_USERCOPY and CONFIG_RANDOMIZE_BASE in Android base config fragment. Reviewed at https://android-review.googlesource.com/#/c/283659/ Reviewed at https://android-review.googlesource.com/#/c/278133/ Link: http://lkml.kernel.org/r/1481113148-29204-2-git-send-email-amit.pundir@linaro.org Signed-off-by: Amit Pundir Cc: Rob Herring Cc: John Stultz Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-base.config | 2 ++ 1 file changed, 2 insertions(+) commit 2d75cb59a5c6ade417d3c8b7f3654408ca6a71d5 Author: Daniel Micay Date: Mon Feb 27 14:28:03 2017 -0800 config: android-recommended: disable aio support The aio interface adds substantial attack surface for a feature that's not being exposed by Android at all. It's unlikely that anyone is using the kernel feature directly either. This feature is rarely used even on servers. The glibc POSIX aio calls really use thread pools. The lack of widespread usage also means this is relatively poorly audited/tested. The kernel's aio rarely provides performance benefits over using a thread pool and is quite incomplete in terms of system call coverage along with having edge cases where blocking can occur. Part of the performance issue is the fact that it only supports direct io, not buffered io. The existing API is considered fundamentally flawed and it's unlikely it will be expanded, but rather replaced: https://marc.info/?l=linux-aio&m=145255815216051&w=2 Since ext4 encryption means no direct io support, kernel aio isn't even going to work properly on Android devices using file-based encryption. Reviewed-at: https://android-review.googlesource.com/#/c/292158/ Link: http://lkml.kernel.org/r/1481113148-29204-1-git-send-email-amit.pundir@linaro.org Signed-off-by: Daniel Micay Signed-off-by: Amit Pundir Cc: Rob Herring Cc: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-recommended.config | 1 + 1 file changed, 1 insertion(+) commit b3b42c0deaa1a2fb84508b808385b8a78819f4df Author: Fabian Frederick Date: Mon Feb 27 14:28:00 2017 -0800 fs/affs: make export work with cold dcache This adds get_parent function so that nfs client can still work after cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches) [weiyongjun1@huawei.com: fix return value check in affs_get_parent()] Link: http://lkml.kernel.org/r/20170123141018.2331-1-weiyj.lk@gmail.com Link: http://lkml.kernel.org/r/20170109191208.6085-8-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Wei Yongjun Suggested-by: Alexander Viro Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/namei.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f567accb3ff4a6ac9a2a50d33e29a076afc7dd2e Author: Fabian Frederick Date: Mon Feb 27 14:27:57 2017 -0800 fs/affs/namei.c: forward declarations clean-up Move dentry_operations structures and remove forward declarations. Link: http://lkml.kernel.org/r/20170109191208.6085-7-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/namei.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit c1618208511f070883a3d079ef7f78024e7faf90 Author: Fabian Frederick Date: Mon Feb 27 14:27:54 2017 -0800 fs/affs: add prefix to some functions secs_to_datestamp(time64_t secs, struct affs_date *ds); prot_to_mode(u32 prot); mode_to_prot(struct inode *inode); were declared without affs_ prefix Link: http://lkml.kernel.org/r/20170109191208.6085-6-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/affs.h | 6 +++--- fs/affs/amigaffs.c | 6 +++--- fs/affs/inode.c | 9 +++++---- fs/affs/namei.c | 6 +++--- fs/affs/super.c | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) commit 1bafd6f164d9ec9bf2fa9829051fbeb36342be0b Author: Fabian Frederick Date: Mon Feb 27 14:27:52 2017 -0800 fs/affs: use octal for permissions According to commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead") Link: http://lkml.kernel.org/r/20170109191208.6085-5-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/amigaffs.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit ed4433d72394131244276d6e7590a7b24a2c9f64 Author: Fabian Frederick Date: Mon Feb 27 14:27:49 2017 -0800 fs/affs: make affs exportable Add standard functions making AFFS work with NFS. Functions based on ext4 implementation. Tested on loop device. Link: http://lkml.kernel.org/r/20170109191208.6085-4-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/affs.h | 1 + fs/affs/namei.c | 40 ++++++++++++++++++++++++++++++++++++++++ fs/affs/super.c | 1 + 3 files changed, 42 insertions(+) commit d5de9fd594eba1b94f0ef701c044f567f605bc9e Author: Fabian Frederick Date: Mon Feb 27 14:27:46 2017 -0800 fs/affs: add validation block function Avoid repeating 4 times the same calculation. Link: http://lkml.kernel.org/r/20170109191208.6085-3-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/affs.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7981a05a0edecab540611785063a8facafd2b46d Author: Fabian Frederick Date: Mon Feb 27 14:27:43 2017 -0800 fs/affs: remove reference to affs_parent_ino() Patch series "make FS exportable plus some clean-up", v7. This small patchset makes AFFS work with NFS for standard operations. THis patch (of 7): affs_parent_ino() was removed a long time ago. Link: http://lkml.kernel.org/r/20170109191208.6085-2-fabf@skynet.be Signed-off-by: Fabian Frederick Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/affs/affs.h | 1 - 1 file changed, 1 deletion(-) commit c857ab640c0cddf451cf743f1b70f9ad7f103090 Author: Cyrill Gorcunov Date: Mon Feb 27 14:27:40 2017 -0800 fs,eventpoll: don't test for bitfield with stack value In case if epoll_ctl is called with operation EPOLL_CTL_DEL then @epds.events variable allocated on stack may contain random bits which we test then for EPOLLEXCLUSIVE. Since currently the test look like if (epds.events & EPOLLEXCLUSIVE) { if (op == EPOLL_CTL_MOD) goto error_tgt_fput; if (op == EPOLL_CTL_ADD && (is_file_epoll(tf.file) || (epds.events & ~EPOLLEXCLUSIVE_OK_BITS))) goto error_tgt_fput; } Nothing serious will happen even if epds.events has this bit set, still better to be on safe side and make sure that we're to test this bit at all. Link: http://lkml.kernel.org/r/20170214154935.GG1850@uranus.lan Signed-off-by: Cyrill Gorcunov Cc: Al Viro Cc: Andrey Vagin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b5a342ab9643b4079c8d417d90519388469341 Author: Tetsuo Handa Date: Mon Feb 27 14:27:37 2017 -0800 include/linux/pid.h: use for_each_thread() in do_each_pid_thread() while_each_pid_thread() is using while_each_thread(), which is unsafe under RCU lock according to commit 0c740d0afc3b ("introduce for_each_thread() to replace the buggy while_each_thread()"). Use for_each_thread() in do_each_pid_thread() which is safe under RCU lock. Link: http://lkml.kernel.org/r/201702011947.DBD56740.OMVHOLOtSJFFFQ@I-love.SAKURA.ne.jp Link: http://lkml.kernel.org/r/1486041779-4401-2-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 369f2679f7e73996bf29ecd3ec79df3cce1be27d Author: Lorenzo Stoakes Date: Mon Feb 27 14:27:34 2017 -0800 rapidio: use get_user_pages_unlocked() Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Link: http://lkml.kernel.org/r/20170103205024.6704-1-lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 464920104bf7adac12722035bfefb3d772eb04d8 Author: Pratyush Anand Date: Mon Feb 27 14:27:31 2017 -0800 /proc/kcore: update physical address for kcore ram and text Currently all the p_paddr of PT_LOAD headers are assigned to 0, which is not true and could be misleading, since 0 is a valid physical address. User space tools like makedumpfile needs to know physical address for PT_LOAD segments of direct mapped regions. Therefore this patch updates paddr for such regions. It also sets an invalid paddr (-1) for other regions, so that user space tool can know whether a physical address provided in PT_LOAD is correct or not. I do not know why it was 0, which is a valid physical address. But certainly, it might break some user space tools, and those need to be fixed. For example, see following code from kexec-tools kexec/kexec-elf.c:build_mem_phdrs() if ((phdr->p_paddr + phdr->p_memsz) < phdr->p_paddr) { /* The memory address wraps */ if (probe_debug) { fprintf(stderr, "ELF address wrap around\n"); } return -1; } We do not need to perform above check for an invalid physical address. I think, kexec-tools and makedumpfile will need fixup. I already have those fixup which will be sent upstream once this patch makes through. Pro with this approach is that, it will help to calculate variable like page_offset, phys_base from PT_LOAD even when they are randomized and therefore will reduce many variable and version specific values in user space tools. Having an ASLR offset information can help to translate an identity mapped virtual address to a physical address. But that would be an additional field in PT_LOAD header structure and an arch dependent value. Moreover, sending a valid physical address like 0 does not seem right. So, IMHO it is better to fix that and send valid physical address when available (identity mapped). Link: http://lkml.kernel.org/r/f951340d2917cdd2a329fae9837a83f2059dc3b2.1485318868.git.panand@redhat.com Signed-off-by: Pratyush Anand Cc: Baoquan He Cc: Dave Young Cc: Dave Anderson Cc: Atsushi Kumagai Cc: Simon Horman Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/kcore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0c49ad4155122ae7684cc744bc5a181ba28518b5 Author: Stas Sergeev Date: Mon Feb 27 14:27:28 2017 -0800 tools/testing/selftests/sigaltstack/sas.c: improve output of sigaltstack testcase Currently it uses %i for bitmasks, which makes it difficult to properly decode the values. Use %x instead. Link: http://lkml.kernel.org/r/b7b4c45d-2f21-de6c-d1c8-16c8386da27c@list.ru Signed-off-by: Stas Sergeev Cc: Shuah Khan Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/sigaltstack/sas.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 441398d378f29a5ad6d0fcda07918e54e4961800 Author: Stas Sergeev Date: Mon Feb 27 14:27:25 2017 -0800 sigaltstack: support SS_AUTODISARM for CONFIG_COMPAT Currently SS_AUTODISARM is not supported in compatibility mode, but does not return -EINVAL either. This makes dosemu built with -m32 on x86_64 to crash. Also the kernel's sigaltstack selftest fails if compiled with -m32. This patch adds the needed support. Link: http://lkml.kernel.org/r/20170205101213.8163-2-stsp@list.ru Signed-off-by: Stas Sergeev Cc: Milosz Tanski Cc: Andy Lutomirski Cc: Al Viro Cc: Arnd Bergmann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Oleg Nesterov Cc: Nicolas Pitre Cc: Waiman Long Cc: Dave Hansen Cc: Dmitry Safonov Cc: Wang Xiaoqiang Cc: Oleg Nesterov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compat.h | 4 +++- kernel/signal.c | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit b899ba7d8c71e2e1c2be281222877c7a1c2ba60d Author: Fabian Frederick Date: Mon Feb 27 14:27:22 2017 -0800 fs/reiserfs: atomically read inode size See i_size_read() comments in include/linux/fs.h Link: http://lkml.kernel.org/r/20170123174701.30394-1-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/reiserfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3f2235012cbafdfc0863367c88e29ed789a24f6 Author: Fabian Frederick Date: Mon Feb 27 14:27:19 2017 -0800 hfsplus: atomically read inode size See i_size_read() comments in include/linux/fs.h Link: http://lkml.kernel.org/r/20170123175338.3840-1-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfsplus/wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 092a53452bb7a6ca436b2d3859e7b1f1ec45479f Author: Ian Kent Date: Mon Feb 27 14:27:16 2017 -0800 autofs: take more care to not update last_used on path walk GUI environments seem to be becoming more agressive at scanning filesystems, to the point where autofs cannot expire mounts at all. This is one key reason the update of the autofs dentry info last_used field is done in the expire system when the dentry is seen to be in use. But somewhere along the way instances of the update has crept back into the autofs path walk functions which, with the more aggressive file access patterns, is preventing expiration. Changing the update in the path walk functions allows autofs to at least make progress in spite of frequent immediate re-mounts from file accesses. Link: http://lkml.kernel.org/r/148577167169.9801.1377050092212016834.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Tomohiro Kusumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3bb2fbdaba16386f520b5750d649a30643a4ab9e Author: Tomohiro Kusumi Date: Mon Feb 27 14:27:14 2017 -0800 autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition This macro is already defined in uapi header. Also use this macro where possible. Link: http://lkml.kernel.org/r/148577166656.9801.10322423666945951186.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 | 2 -- include/uapi/linux/auto_dev-ioctl.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 0fae77feca339699dbd6c079ded37bbd72432eb3 Author: Tomohiro Kusumi Date: Mon Feb 27 14:27:11 2017 -0800 autofs: add command enum/macros for root-dir ioctls Sync root-dir ioctl with misc-char-dev ioctl's enum/macro format since these two types of ioctls aren't completely independent of each other in terms of command nr. No functional changes. Link: http://lkml.kernel.org/r/148577166143.9801.15511796506678428145.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_dev-ioctl.h | 2 -- include/uapi/linux/auto_fs.h | 25 ++++++++++++++++++------- include/uapi/linux/auto_fs4.h | 16 +++++++++++----- 3 files changed, 29 insertions(+), 14 deletions(-) commit 88488080946c2da0d998a3ac0a0a5aebf8dc62c8 Author: Tomohiro Kusumi Date: Mon Feb 27 14:27:08 2017 -0800 autofs: update ioctl documentation regarding struct autofs_dev_ioctl This is the same as bf72eda5 except that it's a different file. Sync documentation with changes made by 730c9eec in 2009. Link: http://lkml.kernel.org/r/148577165630.9801.6081791213151121657.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .../filesystems/autofs4-mount-control.txt | 1 + Documentation/filesystems/autofs4.txt | 32 ++++++++++++++-------- 2 files changed, 22 insertions(+), 11 deletions(-) commit c5dd2ea06475850c8eeea574020dc9b29dc883eb Author: Tomohiro Kusumi Date: Mon Feb 27 14:27:05 2017 -0800 autofs: fix wrong ioctl documentation regarding devid This is the same as d8732841 except that it's a different file. A caller has no devid input, and devid is obtained via superblock. Link: http://lkml.kernel.org/r/148577165119.9801.16967562019122274820.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/autofs4.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d0846dd5af4a92d8a97b7689a870d2098dc6aba5 Author: Tomohiro Kusumi Date: Mon Feb 27 14:27:02 2017 -0800 autofs: fix typo in Documentation Link: http://lkml.kernel.org/r/148577164606.9801.12571810310561599401.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/autofs4.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8723890d1d5d9216634ed662e55ee5bdacbe1ac7 Author: Tomohiro Kusumi Date: Mon Feb 27 14:26:59 2017 -0800 autofs: remove wrong comment This format seems to have been taken from device mapper header, but autofs has no such file:function in both kernel and userspace. Link: http://lkml.kernel.org/r/148577164094.9801.4775075118014742496.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_dev-ioctl.h | 4 ---- 1 file changed, 4 deletions(-) commit 7d134b2ce639448199052fd573a324f7e7cd5ed8 Author: Luis R. Rodriguez Date: Mon Feb 27 14:26:56 2017 -0800 kprobes: move kprobe declarations to asm-generic/kprobes.h Often all is needed is these small helpers, instead of compiler.h or a full kprobes.h. This is important for asm helpers, in fact even some asm/kprobes.h make use of these helpers... instead just keep a generic asm file with helpers useful for asm code with the least amount of clutter as possible. Likewise we need now to also address what to do about this file for both when architectures have CONFIG_HAVE_KPROBES, and when they do not. Then for when architectures have CONFIG_HAVE_KPROBES but have disabled CONFIG_KPROBES. Right now most asm/kprobes.h do not have guards against CONFIG_KPROBES, this means most architecture code cannot include asm/kprobes.h safely. Correct this and add guards for architectures missing them. Additionally provide architectures that not have kprobes support with the default asm-generic solution. This lets us force asm/kprobes.h on the header include/linux/kprobes.h always, but most importantly we can now safely include just asm/kprobes.h on architecture code without bringing the full kitchen sink of header files. Two architectures already provided a guard against CONFIG_KPROBES on its kprobes.h: sh, arch. The rest of the architectures needed gaurds added. We avoid including any not-needed headers on asm/kprobes.h unless kprobes have been enabled. In a subsequent atomic change we can try now to remove compiler.h from include/linux/kprobes.h. During this sweep I've also identified a few architectures defining a common macro needed for both kprobes and ftrace, that of the definition of the breakput instruction up. Some refer to this as BREAKPOINT_INSTRUCTION. This must be kept outside of the #ifdef CONFIG_KPROBES guard. [mcgrof@kernel.org: fix arm64 build] Link: http://lkml.kernel.org/r/CAB=NE6X1WMByuARS4mZ1g9+W=LuVBnMDnh_5zyN0CLADaVh=Jw@mail.gmail.com [sfr@canb.auug.org.au: fixup for kprobes declarations moving] Link: http://lkml.kernel.org/r/20170214165933.13ebd4f4@canb.auug.org.au Link: http://lkml.kernel.org/r/20170203233139.32682-1-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: Stephen Rothwell Acked-by: Masami Hiramatsu Cc: Arnd Bergmann Cc: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S. Miller Cc: Ingo Molnar Cc: Thomas Gleixner Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1 + arch/alpha/include/asm/Kbuild | 1 + arch/arc/include/asm/kprobes.h | 6 ++++-- arch/arm/include/asm/kprobes.h | 4 ++++ arch/arm/probes/decode.h | 1 + arch/arm64/include/asm/kprobes.h | 4 ++++ arch/arm64/kernel/armv8_deprecated.c | 1 + arch/arm64/kernel/insn.c | 1 + arch/arm64/kernel/probes/decode-insn.h | 2 ++ arch/avr32/include/asm/kprobes.h | 7 ++++++- arch/blackfin/include/asm/Kbuild | 1 + arch/c6x/include/asm/Kbuild | 1 + arch/cris/include/asm/Kbuild | 1 + arch/frv/include/asm/Kbuild | 1 + arch/h8300/include/asm/Kbuild | 1 + arch/hexagon/include/asm/Kbuild | 1 + arch/ia64/include/asm/kprobes.h | 12 +++++++++--- arch/m32r/include/asm/Kbuild | 1 + arch/m68k/include/asm/Kbuild | 1 + arch/metag/include/asm/Kbuild | 1 + arch/microblaze/include/asm/Kbuild | 1 + arch/mips/include/asm/kprobes.h | 6 +++++- arch/mn10300/include/asm/kprobes.h | 7 ++++++- arch/nios2/include/asm/Kbuild | 1 + arch/openrisc/include/asm/Kbuild | 1 + arch/parisc/include/asm/Kbuild | 1 + arch/powerpc/include/asm/kprobes.h | 3 +++ arch/powerpc/lib/code-patching.c | 1 + arch/s390/include/asm/kprobes.h | 7 ++++++- arch/score/include/asm/Kbuild | 1 + arch/sh/include/asm/kprobes.h | 5 ++++- arch/sparc/include/asm/kprobes.h | 10 ++++++++-- arch/tile/include/asm/kprobes.h | 6 +++++- arch/um/include/asm/Kbuild | 1 + arch/unicore32/include/asm/Kbuild | 1 + arch/x86/include/asm/kprobes.h | 9 ++++++++- arch/xtensa/include/asm/Kbuild | 1 + include/asm-generic/kprobes.h | 25 +++++++++++++++++++++++++ include/linux/compiler.h | 8 -------- include/linux/kprobes.h | 19 +++---------------- 40 files changed, 125 insertions(+), 38 deletions(-) commit fd5bb66cd934987e49557455b6497fc006521940 Author: Dan Streetman Date: Mon Feb 27 14:26:53 2017 -0800 zswap: don't param_set_charp while holding spinlock Change the zpool/compressor param callback function to release the zswap_pools_lock spinlock before calling param_set_charp, since that function may sleep when it calls kmalloc with GFP_KERNEL. While this problem has existed for a while, I wasn't able to trigger it using a tight loop changing either/both the zpool and compressor params; I think it's very unlikely to be an issue on the stable kernels, especially since most zswap users will change the compressor and/or zpool from sysfs only one time each boot - or zero times, if they add the params to the kernel boot. Fixes: c99b42c3529e ("zswap: use charp for zswap param strings") Link: http://lkml.kernel.org/r/20170126155821.4545-1-ddstreet@ieee.org Signed-off-by: Dan Streetman Reported-by: Sergey Senozhatsky Cc: Michal Hocko Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit bae21db88b7075662f28a0aa57e97016a2fdabfd Author: Dan Streetman Date: Mon Feb 27 14:26:50 2017 -0800 zswap: clear compressor or zpool param if invalid at init If either the compressor and/or zpool param are invalid at boot, and their default value is also invalid, set the param to the empty string to indicate there is no compressor and/or zpool configured. This allows users to check the sysfs interface to see which param needs changing. Link: http://lkml.kernel.org/r/20170124200259.16191-4-ddstreet@ieee.org Signed-off-by: Dan Streetman Cc: Seth Jennings Cc: Michal Hocko Cc: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) commit ae3d89a7e0871bc7b57ef8d3c4dd7fdda43c285c Author: Dan Streetman Date: Mon Feb 27 14:26:47 2017 -0800 zswap: allow initialization at boot without pool Allow zswap to initialize at boot even if it can't create its pool due to a failure to create a zpool and/or compressor. Allow those to be created later, from the sysfs module param interface. Link: http://lkml.kernel.org/r/20170124200259.16191-3-ddstreet@ieee.org Signed-off-by: Dan Streetman Cc: Seth Jennings Cc: Michal Hocko Cc: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) commit 01cddfe99008da87dd4f6b8fbfa31e09257b9133 Author: Arnd Bergmann Date: Mon Feb 27 14:26:44 2017 -0800 mm,fs,dax: mark dax_iomap_pmd_fault as const The two alternative implementations of dax_iomap_fault have different prototypes, and one of them is obviously wrong as seen from this build warning: fs/dax.c: In function 'dax_iomap_fault': fs/dax.c:1462:35: error: passing argument 2 of 'dax_iomap_pmd_fault' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] This marks the argument 'const' as in all the related functions. Fixes: a2d581675d48 ("mm,fs,dax: change ->pmd_fault to ->huge_fault") Link: http://lkml.kernel.org/r/20170227203349.3318733-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a44ddbcbbd72ba8569df1ecbb4b1372506454dff Merge: 45554b2 888022c Author: Dave Airlie Date: Tue Feb 28 12:28:00 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-02-27' of git://anongit.freedesktop.org/git/drm-misc into drm-next Misc fixes for the 4.11 merge window. - vmwgfx drm_control node compat patch - rockchip&zte fix - compat32 support for dma-buf ioctl (cc: stable ofc, since this is a massive fumble. oops) * tag 'drm-misc-next-fixes-2017-02-27' of git://anongit.freedesktop.org/git/drm-misc: dma-buf: add support for compat ioctl drm/vmwgfx: Work around drm removal of control nodes drm/rockchip: cdn-dp: Fix error handling drm/rockchip: add extcon dependency for DP drm: zte: fix static checker warning on variable 'fmt' commit 96297aee8bce237961b0e1b99e22913c5726af12 Author: Bhumika Goyal Date: Fri Dec 30 14:50:02 2016 +0530 ide: palm_bk3710: add __initdata to palm_bk3710_port_info The object palm_bk3710_port_info of type ide_port_info is never referenced anywhere after initialization by palm_bk3710_probe. It is also passed as a parameter to ide_host_add which is called from the init function but this call doesn't store the object reference anywhere, and it only dereferences the values of the fields. Therefore add __initdata to its declaration. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/ide/palm_bk3710.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff7d11797e728efbd1da8cfaa6f7c37585784ca5 Author: Trond Myklebust Date: Wed Feb 22 18:35:33 2017 -0500 nfsd: Fix display of the version string The current display code assumes that v4 minor version 0 is tracked by the call to nfsd_vers(). Now it is tracked by nfsd_minorversion(), and so we need to adjust the display code. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 56 ++++++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 30 deletions(-) commit d3635ff07e8ca598d44f72bbf5d6c65b8ebeeb46 Author: Trond Myklebust Date: Wed Feb 22 18:35:32 2017 -0500 nfsd: fix configuration of supported minor versions When the user turns off all minor versions of NFSv4, that should be equivalent to turning off NFSv4 support, so a mount attempt using NFSv4 should get RPC_PROG_MISMATCH, not NFSERR_MINOR_VERS_MISMATCH. Allow the user to use either '4.0' or '4' to enable or disable minor version 0. Other minor versions are still enabled or disabled using the '4.x' format. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 16 ++++++++-------- fs/nfsd/nfssvc.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) commit dcc235279a52d49023d4f1af7c3ed468a97015ae Author: Arnd Bergmann Date: Mon Feb 27 21:29:03 2017 +0100 gcc-plugins: fix sancov_plugin for gcc-5 The name of the local variable was inadvertantly changed from sancov_plugin_pass_info to sancov_pass_info: scripts/gcc-plugins/sancov_plugin.c: In function ‘int plugin_init(plugin_name_args*, plugin_gcc_version*)’: scripts/gcc-plugins/sancov_plugin.c:136:67: error: ‘sancov_plugin_pass_info’ was not declared in this scope This changes the conditional reference to this variable as well. Fixes: 5a45a4c5c3f5 ("gcc-plugins: consolidate on PASS_INFO macro") Signed-off-by: Arnd Bergmann Signed-off-by: Kees Cook scripts/gcc-plugins/sancov_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41139ac3cd76c6dff8286102a8ac62933c680463 Author: Huang Ying Date: Mon Feb 20 09:12:58 2017 +0800 ACPI: APEI: Fix BERT resources conflict with ACPI NVS area It was reported that on some machines, there is overlap between ACPI NVS area and BERT address range. This appears reasonable because BERT contents need to be non-volatile across reboot. But this will cause resources conflict in current Linux kernel implementation because the ACPI NVS area is marked as busy. The resource conflict is fixed via excluding the ACPI NVS area when requesting IO resources for BERT. When accessing the BERT contents, the whole BERT address range will be ioremapped and accessed. Reported-and-tested-by: Hans Kristian Rosbach Signed-off-by: Ying Huang Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/bert.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 8b107f5b97772c7c0c218302e9a4d15b4edf50b4 Author: Jaegeuk Kim Date: Mon Feb 27 11:57:11 2017 -0800 f2fs: avoid to issue redundant discard commands If segs_per_sec is over 1 like under SMR, previously f2fs issues discard commands redundantly on the same section, since we didn't move end position for the previous discard command. E.g., start end | | prefree_bitmap = [01111100111100] And, after issue discard for this section, end start | | prefree_bitmap = [01111100111100] Select this section again by searching from (end + 1), start end | | prefree_bitmap = [01111100111100] Fixes: 36abef4e796d38 ("f2fs: introduce mode=lfs mount option") Cc: Cc: Damien Le Moal Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit 45554b2357d5782497e59f09146cc3636d6ad551 Merge: 79b17ea f447c19 Author: Linus Torvalds Date: Mon Feb 27 13:36:19 2017 -0800 Merge tag 'trace-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull another tracing update from Steven Rostedt: "Commit 79c6f448c8b79c ("tracing: Fix hwlat kthread migration") fixed a bug that was caused by a race condition in initializing the hwlat thread. When fixing this code, I realized that it should have been done differently. Instead of doing the rewrite and sending that to stable, I just sent the above commit to fix the bug that should be back ported. This commit is on top of the quick fix commit to rewrite the code the way it should have been written in the first place" * tag 'trace-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Clean up the hwlat binding code commit 79b17ea740d9fab178d6a1aa15d848b5e6c01b82 Merge: e5d56ef 67d04bb Author: Linus Torvalds Date: Mon Feb 27 13:26:17 2017 -0800 Merge tag 'trace-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "This release has no new tracing features, just clean ups, minor fixes and small optimizations" * tag 'trace-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (25 commits) tracing: Remove outdated ring buffer comment tracing/probes: Fix a warning message to show correct maximum length tracing: Fix return value check in trace_benchmark_reg() tracing: Use modern function declaration jump_label: Reduce the size of struct static_key tracing/probe: Show subsystem name in messages tracing/hwlat: Update old comment about migration timers: Make flags output in the timer_start tracepoint useful tracing: Have traceprobe_probes_write() not access userspace unnecessarily tracing: Have COMM event filter key be treated as a string ftrace: Have set_graph_function handle multiple functions in one write ftrace: Do not hold references of ftrace_graph_{notrace_}hash out of graph_lock tracing: Reset parser->buffer to allow multiple "puts" ftrace: Have set_graph_functions handle write with RDWR ftrace: Reset fgd->hash in ftrace_graph_write() ftrace: Replace (void *)1 with a meaningful macro name FTRACE_GRAPH_EMPTY ftrace: Create a slight optimization on searching the ftrace_hash tracing: Add ftrace_hash_key() helper function ftrace: Convert graph filter to use hash tables ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip ... commit ef6ebf324216eaea95ff30da5a8e78e2a4311eba Merge: 6288d6e 263d399 Author: Chris Mason Date: Mon Feb 27 13:11:53 2017 -0800 Merge branch 'for-chris-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.11 commit 0d9f0a52c8b9f7a003fe1650b7d5fb8518efabe0 Author: Christoph Hellwig Date: Sun Feb 5 18:15:26 2017 +0100 virtio_scsi: use virtio IRQ affinity Use automatic IRQ affinity assignment in the virtio layer if available, and build the blk-mq queues based on it. Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin drivers/scsi/virtio_scsi.c | 126 +++++---------------------------------------- include/linux/cpuhotplug.h | 1 - 2 files changed, 12 insertions(+), 115 deletions(-) commit ad71473d9c43725c917fc5a86d54ceb7001ee28c Author: Christoph Hellwig Date: Sun Feb 5 18:15:25 2017 +0100 virtio_blk: use virtio IRQ affinity Use automatic IRQ affinity assignment in the virtio layer if available, and build the blk-mq queues based on it. Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 73473427bb551686e4b68ecd99bfd27e6635286a Author: Christoph Hellwig Date: Sun Feb 5 18:15:24 2017 +0100 blk-mq: provide a default queue mapping for virtio device Similar to the PCI version, just calling into virtio instead. Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin block/Kconfig | 5 ++++ block/Makefile | 1 + block/blk-mq-virtio.c | 54 +++++++++++++++++++++++++++++++++++++++++++ include/linux/blk-mq-virtio.h | 10 ++++++++ 4 files changed, 70 insertions(+) commit bbaba479563910aaa51e59bb9027a09e396d3a3c Author: Christoph Hellwig Date: Sun Feb 5 18:15:23 2017 +0100 virtio: provide a method to get the IRQ affinity mask for a virtqueue This basically passed up the pci_irq_get_affinity information through virtio through an optional get_vq_affinity method. It is only implemented by the PCI backend for now, and only when we use per-virtqueue IRQs. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 11 +++++++++++ drivers/virtio/virtio_pci_common.h | 2 ++ drivers/virtio/virtio_pci_legacy.c | 1 + drivers/virtio/virtio_pci_modern.c | 2 ++ include/linux/virtio_config.h | 3 +++ 5 files changed, 19 insertions(+) commit fb5e31d970ce8b4941f03ed765d7dbefc39f22d9 Author: Christoph Hellwig Date: Sun Feb 5 18:15:22 2017 +0100 virtio: allow drivers to request IRQ affinity when creating VQs Add a struct irq_affinity pointer to the find_vqs methods, which if set is used to tell the PCI layer to create the MSI-X vectors for our I/O virtqueues with the proper affinity from the start. Compared to after the fact affinity hints this gives us an instantly working setup and allows to allocate the irq descritors node-local and avoid interconnect traffic. Last but not least this will allow blk-mq queues are created based on the interrupt affinity for storage drivers. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 3 ++- drivers/char/virtio_console.c | 2 +- drivers/crypto/virtio/virtio_crypto_core.c | 2 +- drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- drivers/misc/mic/vop/vop_main.c | 2 +- drivers/net/caif/caif_virtio.c | 3 ++- drivers/net/virtio_net.c | 2 +- drivers/remoteproc/remoteproc_virtio.c | 3 ++- drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- drivers/s390/virtio/kvm_virtio.c | 3 ++- drivers/s390/virtio/virtio_ccw.c | 3 ++- drivers/scsi/virtio_scsi.c | 3 ++- drivers/virtio/virtio_balloon.c | 3 ++- drivers/virtio/virtio_input.c | 3 ++- drivers/virtio/virtio_mmio.c | 3 ++- drivers/virtio/virtio_pci_common.c | 19 ++++++++++++------- drivers/virtio/virtio_pci_common.h | 5 ++--- drivers/virtio/virtio_pci_modern.c | 7 +++---- include/linux/virtio_config.h | 9 +++++---- net/vmw_vsock/virtio_transport.c | 3 ++- 20 files changed, 48 insertions(+), 34 deletions(-) commit 52a61516125fa9a21b3bdf4f90928308e2e5573f Author: Christoph Hellwig Date: Sun Feb 5 18:15:21 2017 +0100 virtio_pci: simplify MSI-X setup Try to grab the MSI-X vectors early and fall back to the shared one before doing lots of allocations. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 53a020c661741f3b87ad3ac6fa545088aaebac9b Author: Christoph Hellwig Date: Sun Feb 5 18:15:20 2017 +0100 virtio_pci: don't duplicate the msix_enable flag in struct pci_dev Signed-off-by: Christoph Hellwig Reviewed-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 5 ++--- drivers/virtio/virtio_pci_common.h | 2 -- drivers/virtio/virtio_pci_legacy.c | 2 +- drivers/virtio/virtio_pci_modern.c | 2 +- include/uapi/linux/virtio_pci.h | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) commit 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507 Author: Christoph Hellwig Date: Sun Feb 5 18:15:19 2017 +0100 virtio_pci: use shared interrupts for virtqueues This lets IRQ layer handle dispatching IRQs to separate handlers for the case where we don't have per-VQ MSI-X vectors, and allows us to greatly simplify the code based on the assumption that we always have interrupt vector 0 (legacy INTx or config interrupt for MSI-X) available, and any other interrupt is request/freed throught the VQ, even if the actual interrupt line might be shared in some cases. This allows removing a great deal of variables keeping track of the interrupt state in struct virtio_pci_device, as we can now simply walk the list of VQs and deal with per-VQ interrupt handlers there, and only treat vector 0 special. Additionally clean up the VQ allocation code to properly unwind on error instead of having a single global cleanup label, which is error prone, and in this case also leads to more code. Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 235 ++++++++++++++++--------------------- drivers/virtio/virtio_pci_common.h | 16 +-- 2 files changed, 106 insertions(+), 145 deletions(-) commit 5c34d002dcc7a6dd665a19d098b4f4cd5501ba1a Author: Christoph Hellwig Date: Sun Feb 5 18:15:18 2017 +0100 virtio_pci: remove struct virtio_pci_vq_info We don't really need struct virtio_pci_vq_info, as most field in there are redundant: - the vq backpointer is not strictly neede to start with - the entry in the vqs list is not needed - the generic virtqueue already has list, we only need to check if it has a callback to get the same semantics - we can use a simple array to look up the MSI-X vec if needed. - That simple array now also duoble serves to replace the per_vq_vectors flag Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 117 +++++++++++-------------------------- drivers/virtio/virtio_pci_common.h | 25 +------- drivers/virtio/virtio_pci_legacy.c | 6 +- drivers/virtio/virtio_pci_modern.c | 6 +- 4 files changed, 39 insertions(+), 115 deletions(-) commit 37e79cd31c2c4dcd7e149958ca3cae9d180c63c7 Author: Hou Pengyang Date: Mon Feb 27 13:02:59 2017 +0000 f2fs: fix a plint compile warning fix such pclint warning: ... Loss of precision (arg. no. 2) (unsigned long long to unsigned int)) Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8d96a30b6f1c29e1ab716b3727a63fe7268f661 Author: Hou Pengyang Date: Mon Feb 27 13:02:58 2017 +0000 f2fs: add f2fs_drop_inode tracepoint Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 7 +++++-- include/trace/events/f2fs.h | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 7bb3a371d199156cb6a863feab377146b80942c5 Author: Masato Suzuki Date: Mon Feb 27 20:52:49 2017 +0900 f2fs: Fix zoned block device support The introduction of the multi-device feature partially broke the support for zoned block devices. In the function f2fs_scan_devices, sbi->devs allocation and initialization is skipped in the case of a single device mount. This result in no device information structure being allocated for the device. This is fine if the device is a regular device, but in the case of a zoned block device, the device zone type array is not initialized, which causes the function __f2fs_issue_discard_zone to fail as get_blkz_type is unable to determine the zone type of a section. Fix this by always allocating and initializing the sbi->devs device information array even in the case of a single device if that device is zoned. For this particular case, make sure to obtain a reference on the single device so that the call to blkdev_put() in destroy_device_list operates as expected. Fixes: 3c62be17d4f562f4 ("f2fs: support multiple devices") Cc: # v4.10 Signed-off-by: Masato Suzuki Acked-by: Damien Le Moal Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 67 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 23 deletions(-) commit 4fcf589ad44e50cbe60dea19320d9e71d1a10f22 Author: Yunlei He Date: Mon Feb 27 18:59:53 2017 +0800 f2fs: remove redundant set_page_dirty() This patch remove redundant set_page_dirty in truncate_blocks Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a3ebfe4fd89794df8b2f357ac5f665052e74b4f9 Author: Chao Yu Date: Mon Feb 27 18:43:13 2017 +0800 f2fs: fix to enlarge size of write_io_dummy mempool It needs to double cache size of write_io_dummy mempool, otherwise we may run out of cache in scenraio of Data/Node IOs were issued concurrently. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6895e8f99cd8e98056346c42732236b958aab83 Author: Chao Yu Date: Mon Feb 27 18:43:12 2017 +0800 f2fs: fix memory leak of write_io_dummy mempool during umount Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 540faedb0036aca14ff90a7f679b008442bc9dd7 Author: Chao Yu Date: Mon Feb 27 17:10:45 2017 +0800 f2fs: fix to update F2FS_{CP_}WB_DATA count correctly We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3b56cdd4351f0e227d4d847eeadff4c82aef1b9 Author: Jason Wang Date: Tue Feb 7 15:49:50 2017 +0800 vhost: try avoiding avail index access when getting descriptor If last avail idx is not equal to cached avail idx, we're sure there's still available buffers in the virtqueue so there's no need to re-read avail idx. So let's skip this to avoid unnecessary userspace memory access and memory barrier. Pktgen test show about 3% improvement on rx pps. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit f0cdbfe6ef0b2f3d42e1cf87bf962e730c2420cb Author: Kinglong Mee Date: Sun Feb 26 20:47:16 2017 +0800 f2fs: use MAX_FREE_NIDS for the free nids target F2FS has define MAX_FREE_NIDS for maximum of cached free nids target. Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 4ac912427c4214d8031d9ad6fbc3bc75e71512df Author: Chao Yu Date: Thu Feb 23 10:53:49 2017 +0800 f2fs: introduce free nid bitmap In scenario of intensively node allocation, free nids will be ran out soon, then it needs to stop to load free nids by traversing NAT blocks, in worse case, if NAT blocks does not be cached in memory, it generates IOs which slows down our foreground operations. In order to speed up node allocation, in this patch we introduce a new free_nid_bitmap array, so there is an bitmap table for each NAT block, Once the NAT block is loaded, related bitmap cache will be switched on, and bitmap will be set during traversing nat entries in NAT block, later we can query and update nid usage status in memory completely. With such implementation, I expect performance of node allocation can be improved in the long-term after filesystem image is mounted. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 + fs/f2fs/f2fs.h | 2 + fs/f2fs/node.c | 125 ++++++++++++++++++++++++++++++++++++++++++++---- include/linux/f2fs_fs.h | 1 + 4 files changed, 120 insertions(+), 10 deletions(-) commit ced2c7ea8e99b46755a270872cd5ba61c27cffad Author: Kinglong Mee Date: Sat Feb 25 19:53:39 2017 +0800 f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpoint There are four places that getting the crc value in f2fs_checkpoint, just add a new helper cur_cp_crc for them. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +-- fs/f2fs/f2fs.h | 6 ++++++ fs/f2fs/node.c | 5 +---- fs/f2fs/node.h | 20 +++++++------------- 4 files changed, 15 insertions(+), 19 deletions(-) commit 727ebb091e1778cc3a4842ae04f8f54da111eee0 Author: Kinglong Mee Date: Sat Feb 25 19:32:21 2017 +0800 f2fs: update the comment of default nr_pages to skipping Fixes: 2c237ebaa4 ("f2fs: avoid writing node/metapages during writes") Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ec4a5b647fca5a5649573c23d31230b25fdc827 Author: Kinglong Mee Date: Sat Feb 25 19:23:40 2017 +0800 f2fs: drop the duplicate pval in f2fs_getxattr Fixes: ba38c27eb9 ("f2fs: enhance lookup xattr") Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 3 --- 1 file changed, 3 deletions(-) commit 5f35a2cd5b503e59ac949283a423f868e94fb36b Author: Kinglong Mee Date: Sat Feb 25 19:23:27 2017 +0800 f2fs: Don't update the xattr data that same as the exist f2fs removes the old xattr data and appends the new data although the new data is same as the exist. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 317e13009682d4614ec9ac7c2762eaee26f93ed3 Author: Chao Yu Date: Sat Feb 25 17:29:54 2017 +0800 f2fs: kill __is_extent_same Since commit ee6d182f2a19 ("f2fs: remove syncing inode page in all the cases") delayed inode element updating from inode cache to node page cache, so once largest cached extent is updated, we can make inode dirty immediately instead of checking and updating it in the end of extent cache update. The above commit didn't clean up unneeded codes in extent_cache.c, let's finish the job in this patch. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 8 +++----- fs/f2fs/f2fs.h | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 19f4e688f89a9ce07b86d06d3df23c1cd877ab4e Author: Hou Pengyang Date: Sat Feb 25 03:57:38 2017 +0000 f2fs: avoid bggc->fggc when enough free segments are avaliable after cp We use has_not_enough_free_secs to check if there are enough free segments, (free_sections(sbi) + freed) <= (node_secs + 2 * dent_secs + imeta_secs + reserved_sections(sbi) + needed); Under scenario with large number of dirty nodes, these nodes would be flushed during cp, as a result, right side of the inequality would be decreased, while left side stays unchanged if these nodes are flushed in SSR way, which means there are enough free segments after this cp. For this case, we just do a bggc instead of fggc. Signed-off-by: Hou Pengyang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit d27c3d89db9986b6f48576169031247e4c893729 Author: Chao Yu Date: Fri Feb 24 18:46:00 2017 +0800 f2fs: select target segment with closer temperature in SSR mode In SSR mode, we can allocate target segment which has different temperature type from the type of current block, in order to avoid mixing coldest and hottest data/node as much as possible, change SSR allocation policy to select closer temperature for current block prior. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 55523519bc7227e651fd4febeb3aafdd22b8af1c Author: Chao Yu Date: Sat Feb 25 11:08:28 2017 +0800 f2fs: show simple call stack in fault injection message Previously kernel message can show that in which function we do the injection, but unfortunately, most of the caller are the same, for tracking more information of injection path, it needs to show upper caller's name. This patch supports that ability. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 1 + fs/f2fs/data.c | 4 +++- fs/f2fs/dir.c | 4 +++- fs/f2fs/f2fs.h | 20 +++++++++++++------- fs/f2fs/gc.c | 4 +++- fs/f2fs/inode.c | 4 +++- fs/f2fs/node.c | 4 +++- fs/f2fs/segment.c | 4 +++- 8 files changed, 32 insertions(+), 13 deletions(-) commit dd7b2333e6cd31584682382fcf0a1c1e5140b936 Author: Yunlei He Date: Thu Feb 23 20:31:20 2017 +0800 f2fs: no need lock_op in f2fs_write_inline_data Similar as f2fs_write_inode, f2fs_write_inline_data just mark inode page dirty, so it's no need to write inline data under read lock of cp_rwsem. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 22ad0b6ab46683975c6da032f1c2593066c7b3bd Author: Jaegeuk Kim Date: Thu Feb 9 10:38:09 2017 -0800 f2fs: add bitmaps for empty or full NAT blocks This patches adds bitmaps to represent empty or full NAT blocks containing free nid entries. If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll use these bitmaps when building free nids. In order to avoid checkpointing burden, up-to-date bitmaps will be flushed only during umount time. So, normally we can get this gain, but when power-cut happens, we rely on fsck.f2fs which recovers this bitmap again. After this patch, we build free nids from nid #0 at mount time to make more full NAT blocks, but in runtime, we check empty NAT blocks to load free nids without loading any NAT pages from disk. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 28 +++++++- fs/f2fs/debug.c | 1 + fs/f2fs/f2fs.h | 31 +++++++- fs/f2fs/node.c | 188 +++++++++++++++++++++++++++++++++++++++++++----- fs/f2fs/segment.c | 2 +- include/linux/f2fs_fs.h | 1 + 6 files changed, 231 insertions(+), 20 deletions(-) commit 5e8256ac2e378089a1bf3fae87370811b1d31625 Author: Yunlei He Date: Thu Feb 23 19:39:59 2017 +0800 f2fs: replace rw semaphore extent_tree_lock with mutex lock This patch replace rw semaphore extent_tree_lock with mutex lock for no read cases with this lock. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 22 +++++++++++----------- fs/f2fs/f2fs.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) commit 3f2be04304cf10f2ef074399f8dd565bd00ddcae Author: Kinglong Mee Date: Thu Feb 23 19:55:05 2017 +0800 f2fs: avoid m_flags overlay when allocating more data blocks When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED flags will be overlapped by F2FS_MAP_NEW at the later times. Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bfaf7b150f7dba04024b7b6420773c09606538c Author: Hou Pengyang Date: Thu Feb 23 09:18:06 2017 +0000 f2fs: remove unsafe bitmap checking proc A: proc B: - writeback_sb_inodes - __writeback_single_inode - do_writepages - f2fs_write_node_pages - f2fs_balance_fs_bg - write_checkpoint - build_free_nids - flush_nat_entries - __build_free_nids - __flush_nat_entry_set - ra_meta_pages - get_next_nat_page - current_nat_addr - set_to_next_nat [do nat_bitmap checking] - f2fs_change_bit For proc A, nat_bitmap and nat_bitmap_mir would be compared without lock_op and nm_i->nat_tree_lock, while proc B is changing nat_bitmap/nat_bitmap_ver in cp. So it is normal for nat_bitmap/nat_bitmap diffrence under such scenario. This patch fix this by removing the monitoring point. [Fix: 599a09b f2fs: check in-memory nat version bitmap] Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/node.h | 6 ------ 1 file changed, 6 deletions(-) commit e15882b6c6caff427fe387e878e2f23de58c053b Author: Hou Pengyang Date: Thu Feb 23 09:18:05 2017 +0000 f2fs: init local extent_info to avoid stale stack info in tp To avoid such stale(fops, blk, len) info in f2fs_lookup_extent_tree_end tp dio-23095 [005] ...1 17878.856859: f2fs_lookup_extent_tree_end: dev = (259,30), ino = 856, pgofs = 0, ext_info(fofs: 3441207040, blk: 4294967232, len: 3481143808) Signed-off-by: Hou Pengyang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 8 ++++---- fs/f2fs/file.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 77190e1f313f5ef18a3742aa4c5b790456a5825b Author: Yunlong Song Date: Tue Feb 21 20:43:48 2017 +0800 f2fs: remove unnecessary condition check for write_checkpoint in f2fs_gc Since has_not_enough_free_secs(sbi, 0, 0) must be true if has_not_enough_ free_secs(sbi, sec_freed, 0) is true, write_checkpoint is sure to execute in both conditions. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 92592285710aebe2de9afa38315b5c3914556905 Author: Jaegeuk Kim Date: Wed Feb 22 20:18:35 2017 -0800 f2fs: check discard alignment only for SEQWRITE zones For converntional zones, we don't need to align discard commands to exact zone size. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 40465257ac4159e9ebfba10ee502e795b917da76 Author: Jaegeuk Kim Date: Wed Feb 22 19:58:23 2017 -0800 f2fs: wait for discard completion after submission We don't need to wait for each discard commands when unmounting the image. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 47b898081605684aa1bacd1d14443a50c660c1fe Author: Jaegeuk Kim Date: Wed Feb 22 19:53:07 2017 -0800 f2fs: much larger batched trim_fs job We have a kernel thread to issue discard commands, so we can increase the number of batched discard sections. By default, now it becomes 4GB range. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad4d307fce0909a5f70635826f779321ab95b469 Author: Jaegeuk Kim Date: Wed Feb 22 19:10:35 2017 -0800 f2fs: avoid very large discard command This patch adds MAX_DISCARD_BLOCKS() to avoid issuing too much large single discard command. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 ++- fs/f2fs/segment.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ff4dd73dd2b4806419f8ff65cbce11d5019548d0 Author: Johannes Berg Date: Mon Feb 27 17:15:28 2017 +0100 mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length Unfortunately, the nla policy was defined to have HWSIM_ATTR_RADIO_NAME as an NLA_STRING, rather than NLA_NUL_STRING, so we can't use it as a NUL-terminated string in the kernel. Rather than break the API, kasprintf() the string to a new buffer to guarantee NUL termination. Reported-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 3a150df945b7408c27cad2c01a1638e8b14ac562 Author: Chunyu Hu Date: Wed Feb 22 08:29:26 2017 +0800 tracing: Fix code comment for ftrace_ops_get_func() There is no function 'ftrace_ops_recurs_func' existing in the current code, it was renamed to ftrace_ops_assist_func() in commit c68c0fa29341 ("ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too"). Update the comment to the correct function name. Link: http://lkml.kernel.org/r/1487723366-14463-1-git-send-email-chuhu@redhat.com Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 126cfa2f5e15ae2ca7f70be71b07e6cd8d2b44d1 Author: Vinod Koul Date: Mon Feb 27 21:19:44 2017 +0530 ALSA: hda: Add Geminilake HDMI codec ID Geminilake HDMI codec 0x280d is similar to previous platforms, so add it with similar ops as previous. Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 51be7a9a261ce18c520fb3928b168feb77522745 Author: Michael S. Tsirkin Date: Thu Jan 12 23:36:32 2017 +0200 virtio_mmio: expose header to userspace It's handy for userspace emulators like QEMU. Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mmio.c | 2 +- include/linux/virtio_mmio.h | 141 --------------------------------------- include/uapi/linux/Kbuild | 1 + include/uapi/linux/virtio_mmio.h | 141 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 142 deletions(-) commit 2f44f75257d57f0d5668dba3a6ada0f4872132c9 Merge: 4ca257e 6f437d4 Author: David S. Miller Date: Mon Feb 27 09:22:10 2017 -0500 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed: Bug fixes Patch #1 addresses a day-one race which is dependent on the number of Vfs [I.e., more child VFs from a single PF make it more probable]. Patch #2 corrects a race that got introduced in the last set of fixes for qed, one that would happen each time PF transitions to UP state. I've built & tested those against current net-next. Please consider applying the series there. ==================== Signed-off-by: David S. Miller commit 6f437d431930ff86e4a971d29321951faadb97c7 Author: Mintz, Yuval Date: Mon Feb 27 11:06:33 2017 +0200 qed: Don't use attention PTT for configuring BW Commit 653d2ffd6405 ("qed*: Fix link indication race") introduced another race - one of the inner functions called from the link-change flow is explicitly using the slowpath context dedicated PTT instead of gaining that PTT from the caller. Since this flow can now be called from a different context as well, we're in risk of the PTT breaking. Fixes: 653d2ffd6405 ("qed*: Fix link indication race") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 4 +++- drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 +++--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) commit fd3c615ae13a853ab26211e14f70b416cc8f8134 Author: Mintz, Yuval Date: Mon Feb 27 11:06:32 2017 +0200 qed: Fix race with multiple VFs A PF syncronizes all IOV activity relating to its VFs by using a single workqueue handling the work. The workqueue would reach a bitmask of pending VF events and act upon each in turn. Problem is that the indication of a VF message [which sets the 'vf event' bit for that VF] arrives and is set in the slowpath attention context, which isn't syncronized with the processing of the events. When multiple VFs are present, it's possible that PF would lose the indication of one of the VF's pending evens, leading that VF to later timeout. Instead of adding locks/barriers, simply move from a bitmask into a per-VF indication inside that VF entry in the PF database. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 39 +++++++++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 4 ++- 2 files changed, 26 insertions(+), 17 deletions(-) commit 4ca257eed6adf58d325c39c320a06dbcd34c43db Merge: 51fb60e 13aa5a8 Author: David S. Miller Date: Mon Feb 27 09:17:43 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains netfilter fixes for you net tree, they are: 1) Missing ct zone size in the nft_ct initialization path, patch from Florian Westphal. 2) Two patches for netfilter uapi headers, one to remove unnecessary sysctl.h inclusion and another to fix compilation of xt_hashlimit.h in userspace, from Dmitry V. Levin. 3) Patch to fix a sloppy change in nf_ct_expect that incorrectly simplified nf_ct_expect_related_report() in the previous nf-next batch. This also includes another patch for __nf_ct_expect_check() to report success by returning 0 to keep it consistent with other existing functions. From Jarno Rajahalme. 4) The ->walk() iterator of the new bitmap set type goes over the real bitmap size, this results in incorrect dumps when NFTA_SET_USERDATA is used. ==================== Signed-off-by: David S. Miller commit 2872de1382a7c888fa69532eda25aa7342dfe748 Author: Rafael J. Wysocki Date: Fri Feb 24 00:26:15 2017 +0100 PM / hibernate: Define pr_fmt() and use pr_*() instead of printk() Define a pr_fmt() for hibernate.c and convert all of the explicit printk() calls into corresponding pr_*() so that they use the pr_fmt() format. Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 60 +++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) commit 81d45bdf89135cd26dc7535c14a45db6cdd647fa Author: Rafael J. Wysocki Date: Fri Feb 24 00:25:28 2017 +0100 PM / hibernate: Untangle power_down() The power_down() routine in the core hibernation code is not exactly straightforward (to put it lightly), so clean it up to make it avoid invoking itself recursively, among other things. Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 6dbf5cea05a7098a69f294c96b6d76f08562cae5 Author: Rafael J. Wysocki Date: Fri Feb 24 13:25:14 2017 +0100 cpuidle: menu: Avoid taking spinlock for accessing QoS values After commit 9908859acaa9 (cpuidle/menu: add per CPU PM QoS resume latency consideration) the cpuidle menu governor calls dev_pm_qos_read_value() on CPU devices to read the current resume latency QoS constraint values for them. That function takes a spinlock to prevent the device's power.qos pointer from becoming NULL during the access which is a problem for the RT patchset where spinlocks are converted into mutexes and the idle loop stops working. However, it is not even necessary for the menu governor to take that spinlock, because the power.qos pointer accessed under it cannot be modified during the access anyway. For this reason, introduce a "raw" routine for accessing device QoS resume latency constraints without locking and use it in the menu governor. Fixes: 9908859acaa9 (cpuidle/menu: add per CPU PM QoS resume latency consideration) Acked-by: Alex Shi Signed-off-by: Rafael J. Wysocki drivers/base/power/qos.c | 3 +-- drivers/cpuidle/governors/menu.c | 2 +- include/linux/pm_qos.h | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit d825adb48cf9bf9e3f5cb1d927e2827f8c2abee4 Author: Masanari Iida Date: Sun Feb 26 16:15:21 2017 +0900 xenbus: Remove duplicate inclusion of linux/init.h This patch remove duplicate inclusion of linux/init.h in xenbus_dev_frontend.c. Confirm successfully compile after remove the line. Signed-off-by: Masanari Iida Reviewed-by: Juergen Gross drivers/xen/xenbus/xenbus_dev_frontend.c | 1 - 1 file changed, 1 deletion(-) commit 09e0a2fe102208cbaf39510b8b04dd524d7d2935 Author: Sara Sharon Date: Mon Feb 20 14:24:38 2017 +0100 mac80211: fix typo in debug print Signed-off-by: Sara Sharon Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2595d259b667114431501bae51b45d6656b987d1 Author: Sara Sharon Date: Mon Feb 20 14:24:39 2017 +0100 mac80211: shorten debug message Tracing is limited to 100 characters and this message passes the limit when there are a few buffered frames. Shorten it. Signed-off-by: Sara Sharon Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d98937f4ea713d21e0fcc345919f86c877dd8d6f Author: Emmanuel Grumbach Date: Mon Feb 20 14:24:36 2017 +0100 mac80211: fix power saving clients handling in iwlwifi iwlwifi now supports RSS and can't let mac80211 track the PS state based on the Rx frames since they can come out of order. iwlwifi is now advertising AP_LINK_PS, and uses explicit notifications to teach mac80211 about the PS state of the stations and the PS poll / uAPSD trigger frames coming our way from the peers. Because of that, the TIM stopped being maintained in mac80211. I tried to fix this in commit c68df2e7be0c ("mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE") but that was later reverted by Felix in commit 6c18a6b4e799 ("Revert "mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE") since it broke drivers that do not implement set_tim. Since none of the drivers that set AP_LINK_PS have the set_tim() handler set besides iwlwifi, I can bail out in __sta_info_recalc_tim if AP_LINK_PS AND .set_tim is not implemented. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 890030d3c425f49abaa4acf60e20f288b599f980 Author: Felix Fietkau Date: Wed Feb 22 16:16:07 2017 +0100 mac80211: don't handle filtered frames within a BA session When running a BA session, the driver (or the hardware) already takes care of retransmitting failed frames, since it has to keep the receiver reorder window in sync. Adding another layer of retransmit around that does not improve anything. In fact, it can only lead to some strong reordering with huge latency. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8fbcfeb8a9cc803464d6c166e7991913711c612c Author: Thomas Gleixner Date: Sat Feb 25 10:27:37 2017 +0000 mac80211_hwsim: Replace bogus hrtimer clockid mac80211_hwsim initializes a hrtimer with clockid CLOCK_MONOTONIC_RAW. That's not supported. Use CLOCK_MONOTONIC instead. Signed-off-by: Thomas Gleixner Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7540d8f25c8034de7e4163fc23ac457bf057731 Author: Sara Sharon Date: Mon Feb 6 15:28:42 2017 +0200 mac80211: don't reorder frames with SN smaller than SSN When RX aggregation starts, transmitter may continue send frames with SN smaller than SSN until the AddBA response is received. However, the reorder buffer is already initialized at this point, which will cause the drop of such frames as duplicates since the head SN of the reorder buffer is set to the SSN, which is bigger. Cc: stable@vger.kernel.org Signed-off-by: Sara Sharon Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 1 + net/mac80211/rx.c | 14 +++++++++++++- net/mac80211/sta_info.h | 6 ++++-- 3 files changed, 18 insertions(+), 3 deletions(-) commit a9e9200d8661c1a0be8c39f93deb383dc940de35 Author: Matt Chen Date: Sun Jan 22 02:16:58 2017 +0800 mac80211: flush delayed work when entering suspend The issue was found when entering suspend and resume. It triggers a warning in: mac80211/key.c: ieee80211_enable_keys() ... WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt || sdata->crypto_tx_tailroom_pending_dec); ... It points out sdata->crypto_tx_tailroom_pending_dec isn't cleaned up successfully in a delayed_work during suspend. Add a flush_delayed_work to fix it. Cc: stable@vger.kernel.org Signed-off-by: Matt Chen Signed-off-by: Johannes Berg net/mac80211/pm.c | 1 + 1 file changed, 1 insertion(+) commit 0328edc77d4f35014b35f32b46be0a7e16aae74f Author: Johannes Berg Date: Mon Feb 20 08:59:16 2017 +0100 mac80211: fix packet statistics for fast-RX When adding per-CPU statistics, which added statistics back to mac80211 for the fast-RX path, I evidently forgot to add the "stats->packets++" line. The reason for that is likely that I didn't see it since it's done in defragmentation for the regular RX path. Add the missing line to properly count received packets in the fast-RX case. Fixes: c9c5962b56c1 ("mac80211: enable collecting station statistics per-CPU") Reported-by: Oren Givon Signed-off-by: Johannes Berg net/mac80211/rx.c | 1 + 1 file changed, 1 insertion(+) commit 888022c0473d079bff9b47fb50434b1f20f8f37f Author: Marek Szyprowski Date: Tue Feb 21 14:21:01 2017 +0100 dma-buf: add support for compat ioctl Add compat ioctl support to dma-buf. This lets one to use DMA_BUF_IOCTL_SYNC ioctl from 32bit application on 64bit kernel. Data structures for both 32 and 64bit modes are same, so there is no need for additional translation layer. Signed-off-by: Marek Szyprowski Reviewed-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/1487683261-2655-1-git-send-email-m.szyprowski@samsung.com drivers/dma-buf/dma-buf.c | 3 +++ 1 file changed, 3 insertions(+) commit 29693efcea0f38cf40d0055d2401490a4f9bf8be Author: Hui Wang Date: Mon Feb 27 10:11:47 2017 +0800 ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine On this machine, the micmute button is connected to Line2 of the codec and the micmute led is connected to GPIO2 of the codec. After applying this quirk, both hotkey and led work well. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 89027579bc6c2febbcc9c2f9d5069adf71539e4b Author: Herbert Xu Date: Sun Feb 26 12:24:10 2017 +0800 crypto: xts - Propagate NEED_FALLBACK bit When we're used as a fallback algorithm, we should propagate the NEED_FALLBACK bit when searching for the underlying ECB mode. This just happens to fix a hang too because otherwise the search may end up loading the same module that triggered this XTS creation. Cc: stable@vger.kernel.org #4.10 Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Reported-by: Harald Freudenberger Signed-off-by: Herbert Xu crypto/xts.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 016df0abc56ec06d0c63c5318ef53e40738dea8b Author: Herbert Xu Date: Sun Feb 26 12:22:35 2017 +0800 crypto: api - Add crypto_requires_off helper This patch adds crypto_requires_off which is an extension of crypto_requires_sync for similar bits such as NEED_FALLBACK. Cc: stable@vger.kernel.org #4.10 Suggested-by: Marcelo Cerri Signed-off-by: Herbert Xu include/crypto/algapi.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c884b36816c131906038cdac4773f6c84a5bf3ee Author: Geert Uytterhoeven Date: Fri Feb 24 11:27:39 2017 +0100 crypto: atmel - CRYPTO_DEV_MEDIATEK should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/crypto/mediatek/mtk-crypto.ko] undefined! Add a dependency on HAS_DMA to fix this. Fixes: 7dee9f618790d0b7 ("crypto: mediatek - remove ARM dependencies") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f7f9482e370981ebeeeac30bbdb9960807e332ee Author: Geert Uytterhoeven Date: Fri Feb 24 11:27:38 2017 +0100 crypto: atmel - CRYPTO_DEV_ATMEL_TDES and CRYPTO_DEV_ATMEL_SHA should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/crypto/atmel-tdes.ko] undefined! ERROR: "bad_dma_ops" [drivers/crypto/atmel-sha.ko] undefined! Add dependencies on HAS_DMA to fix this. Fixes: ceb4afb3086ab08f ("crypto: atmel - refine Kconfig dependencies") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit d80388eca1b476125755a811676f76f138bbbe28 Author: Colin Ian King Date: Fri Feb 17 15:57:43 2017 +0000 crypto: cavium - fix leak on curr if curr->head fails to be allocated The exit path when curr->head cannot be allocated fails to kfree the earlier allocated curr. Fix this by kfree'ing it. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_main.c | 1 + 1 file changed, 1 insertion(+) commit 9bd829041b704e5e501ad5f5a9374a63426763fd Author: George Cherian Date: Wed Feb 15 12:42:19 2017 +0000 crypto: cavium - Fix couple of static checker errors Fix the following smatch errors cptvf_reqmanager.c:333 do_post_process() warn: variable dereferenced before check 'cptvf' cptvf_main.c:825 cptvf_remove() error: we previously assumed 'cptvf' could be null Reported-by: Dan Carpenter Signed-off-by: George Cherian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_main.c | 4 +++- drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 51fb60eb162ab84c5edf2ae9c63cf0b878e5547e Author: Paul Hüber Date: Sun Feb 26 17:58:19 2017 +0100 l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv l2tp_ip_backlog_recv may not return -1 if the packet gets dropped. The return value is passed up to ip_local_deliver_finish, which treats negative values as an IP protocol number for resubmission. Signed-off-by: Paul Hüber Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ecc9ad02c3d4cf44bc94bffcb3b12e7861b00a7 Author: Julian Anastasov Date: Sat Feb 25 17:57:43 2017 +0200 xfrm: provide correct dst in xfrm_neigh_lookup Fix xfrm_neigh_lookup to provide dst->path to the neigh_lookup dst_ops method. When skb is provided, the IP address in packet should already match the dst->path address family. But for the non-skb case, we should consider the last tunnel address as nexthop address. Fixes: f894cbf847c9 ("net: Add optional SKB arg to dst_ops->neigh_lookup().") Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller net/xfrm/xfrm_policy.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit c4d2603dac3a555e4bb324daf5cb5cdb5694eedd Author: Herbert Xu Date: Sat Feb 25 22:39:50 2017 +0800 rhashtable: Fix RCU dereference annotation in rht_bucket_nested The current annotation is wrong as it says that we're only called under spinlock. In fact it should be marked as under either spinlock or RCU read lock. Fixes: da20420f83ea ("rhashtable: Add nested tables") Reported-by: Fengguang Wu Signed-off-by: Herbert Xu Signed-off-by: David S. Miller lib/rhashtable.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ca435407ba6655a0d63230818ffe7006d967dfe5 Author: Herbert Xu Date: Sat Feb 25 22:38:11 2017 +0800 rhashtable: Fix use before NULL check in bucket_table_free Dan Carpenter reported a use before NULL check bug in the function bucket_table_free. In fact we don't need the NULL check at all as no caller can provide a NULL argument. So this patch fixes this by simply removing it. Reported-by: Dan Carpenter Signed-off-by: Herbert Xu Signed-off-by: David S. Miller lib/rhashtable.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 37f1c63e3e29181ad412485eec2200cffc1dc70f Author: Roman Mashak Date: Fri Feb 24 17:36:58 2017 -0500 net sched actions: do not overwrite status of action creation. nla_memdup_cookie was overwriting err value, declared at function scope and earlier initialized with result of ->init(). At success nla_memdup_cookie() returns 0, and thus module refcnt decremented, although the action was installed. $ sudo tc actions add action pass index 1 cookie 1234 $ sudo tc actions ls action gact action order 0: gact action pass random type none pass val 0 index 1 ref 1 bind 0 $ $ lsmod Module Size Used by act_gact 16384 0 ... $ $ sudo rmmod act_gact [ 52.310283] ------------[ cut here ]------------ [ 52.312551] WARNING: CPU: 1 PID: 455 at kernel/module.c:1113 module_put+0x99/0xa0 [ 52.316278] Modules linked in: act_gact(-) crct10dif_pclmul crc32_pclmul ghash_clmulni_intel psmouse pcbc evbug aesni_intel aes_x86_64 crypto_simd serio_raw glue_helper pcspkr cryptd [ 52.322285] CPU: 1 PID: 455 Comm: rmmod Not tainted 4.10.0+ #11 [ 52.324261] Call Trace: [ 52.325132] dump_stack+0x63/0x87 [ 52.326236] __warn+0xd1/0xf0 [ 52.326260] warn_slowpath_null+0x1d/0x20 [ 52.326260] module_put+0x99/0xa0 [ 52.326260] tcf_hashinfo_destroy+0x7f/0x90 [ 52.326260] gact_exit_net+0x27/0x40 [act_gact] [ 52.326260] ops_exit_list.isra.6+0x38/0x60 [ 52.326260] unregister_pernet_operations+0x90/0xe0 [ 52.326260] unregister_pernet_subsys+0x21/0x30 [ 52.326260] tcf_unregister_action+0x68/0xa0 [ 52.326260] gact_cleanup_module+0x17/0xa0f [act_gact] [ 52.326260] SyS_delete_module+0x1ba/0x220 [ 52.326260] entry_SYSCALL_64_fastpath+0x1e/0xad [ 52.326260] RIP: 0033:0x7f527ffae367 [ 52.326260] RSP: 002b:00007ffeb402a598 EFLAGS: 00000202 ORIG_RAX: 00000000000000b0 [ 52.326260] RAX: ffffffffffffffda RBX: 0000559b069912a0 RCX: 00007f527ffae367 [ 52.326260] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559b06991308 [ 52.326260] RBP: 0000000000000003 R08: 00007f5280264420 R09: 00007ffeb4029511 [ 52.326260] R10: 000000000000087b R11: 0000000000000202 R12: 00007ffeb4029580 [ 52.326260] R13: 0000000000000000 R14: 0000000000000000 R15: 0000559b069912a0 [ 52.354856] ---[ end trace 90d89401542b0db6 ]--- $ With the fix: $ sudo modprobe act_gact $ lsmod Module Size Used by act_gact 16384 0 ... $ sudo tc actions add action pass index 1 cookie 1234 $ sudo tc actions ls action gact action order 0: gact action pass random type none pass val 0 index 1 ref 1 bind 0 $ $ lsmod Module Size Used by act_gact 16384 1 ... $ sudo rmmod act_gact rmmod: ERROR: Module act_gact is in use $ $ sudo /home/mrv/bin/tc actions del action gact index 1 $ sudo rmmod act_gact $ lsmod Module Size Used by $ Fixes: 1045ba77a ("net sched actions: Add support for user cookies") Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7e15835ab278443da5c0cfe6573f8f793ed40a3 Author: David Howells Date: Fri Feb 24 21:57:13 2017 +0000 rxrpc: Kernel calls get stuck in recvmsg Calls made through the in-kernel interface can end up getting stuck because of a missed variable update in a loop in rxrpc_recvmsg_data(). The problem is like this: (1) A new packet comes in and doesn't cause a notification to be given to the client as there's still another packet in the ring - the assumption being that if the client will keep drawing off data until the ring is empty. (2) The client is in rxrpc_recvmsg_data(), inside the big while loop that iterates through the packets. This copies the window pointers into variables rather than using the information in the call struct because: (a) MSG_PEEK might be in effect; (b) we need a barrier after reading call->rx_top to pair with the barrier in the softirq routine that loads the buffer. (3) The reading of call->rx_top is done outside of the loop, and top is never updated whilst we're in the loop. This means that even through there's a new packet available, we don't see it and may return -EFAULT to the caller - who will happily return to the scheduler and await the next notification. (4) No further notifications are forthcoming until there's an abort as the ring isn't empty. The fix is to move the read of call->rx_top inside the loop - but it needs to be done before the condition is checked. Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne Signed-off-by: David S. Miller net/rxrpc/recvmsg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit edb9d1bff4bbe19b8ae0e71b1f38732591a9eeb2 Author: Roman Mashak Date: Fri Feb 24 11:00:32 2017 -0500 net sched actions: decrement module reference count after table flush. When tc actions are loaded as a module and no actions have been installed, flushing them would result in actions removed from the memory, but modules reference count not being decremented, so that the modules would not be unloaded. Following is example with GACT action: % sudo modprobe act_gact % lsmod Module Size Used by act_gact 16384 0 % % sudo tc actions ls action gact % % sudo tc actions flush action gact % lsmod Module Size Used by act_gact 16384 1 % sudo tc actions flush action gact % lsmod Module Size Used by act_gact 16384 2 % sudo rmmod act_gact rmmod: ERROR: Module act_gact is in use .... After the fix: % lsmod Module Size Used by act_gact 16384 0 % % sudo tc actions add action pass index 1 % sudo tc actions add action pass index 2 % sudo tc actions add action pass index 3 % lsmod Module Size Used by act_gact 16384 3 % % sudo tc actions flush action gact % lsmod Module Size Used by act_gact 16384 0 % % sudo tc actions flush action gact % lsmod Module Size Used by act_gact 16384 0 % sudo rmmod act_gact % lsmod Module Size Used by % Fixes: f97017cdefef ("net-sched: Fix actions flushing") Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_api.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9d25af69b3cfa2f88559efa0c1a4b4f18724694b Author: Geert Uytterhoeven Date: Fri Feb 24 11:25:55 2017 +0100 lib: Allow compile-testing of parman This allows to enable and run the accompanying test (test_parman) without dependencies on other users of parman. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller lib/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99253eb750fda6a644d5188fb26c43bad8d5a745 Author: Xin Long Date: Fri Feb 24 16:29:06 2017 +0800 ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and protocol is IGMP The same fix should be done for ipv6 ipmr as well. This patch can fix the panic caused by overwriting the same offset as ipmr_table as in raw_sk(sk) when accessing other type's socket by ip_mroute_setsockopt(). Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2e3ce5bc2aa938653c3866aa7f4901a1f199b1c8 Author: Xin Long Date: Fri Feb 24 15:18:46 2017 +0800 sctp: set sin_port for addr param when checking duplicate address Commit b8607805dd15 ("sctp: not copying duplicate addrs to the assoc's bind address list") tried to check for duplicate address before copying to asoc's bind_addr list from global addr list. But all the addrs' sin_ports in global addr list are 0 while the addrs' sin_ports are bp->port in asoc's bind_addr list. It means even if it's a duplicate address, af->cmp_addr will still return 0 as the their sin_ports are different. This patch is to fix it by setting the sin_port for addr param with bp->port before comparing the addrs. Fixes: b8607805dd15 ("sctp: not copying duplicate addrs to the assoc's bind address list") Reported-by: Wei Chen Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/protocol.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c87ba9c49c1fa86261448b09c5f1b2223bf7efd9 Author: Nicholas Bellinger Date: Thu Jan 19 15:45:57 2017 -0800 target: Add counters for ABORT_TASK success + failure This patch introduces two counters for ABORT_TASK success + failure under: /sys/kernel/config/target/core/$HBA/$DEV/statistics/scsi_tgt_dev/ that are useful for diagnosing various backend device latency and front fabric issues. Normally when folks see alot of aborts_complete happening, it means the backend device I/O completion latency is high, and not returning completions fast enough before host side timeouts trigger. And normally when folks see alot of aborts_no_task, it means completions are being posted by target-core into fabric driver code, but the responses aren't making it back to the host. Signed-off-by: Nicholas Bellinger drivers/target/target_core_stat.c | 18 ++++++++++++++++++ drivers/target/target_core_tmr.c | 2 ++ include/target/target_core_base.h | 2 ++ 3 files changed, 22 insertions(+) commit 17c61ad66f2e09a9014ab2d4e1f04c8294427db1 Author: Nicholas Bellinger Date: Thu Feb 23 21:26:31 2017 -0800 iscsi-target: Fix early login failure statistics misses Due to the long standing checks in iscsit_snmp_get_tiqn() that assume conn->sess->tpg dereference of tpg->tpg_tiqn for iscsit_collect_login_stats() usage, some of the early login failure cases like ISCSI_LOGIN_STATUS_TGT_FORBIDDEN where not getting incremented, due to sess->tpg assignment happening later in iscsi_login_zero_tsih_s2(). Instead, use the earlier conn->tpg assignment done by iscsi_target_locate_portal() -> iscsit_get_tpg_from_np() so the existing counters are incremented correctly for the various early login failure cases. Also, go ahead and drop the old rate limiting check in iscsit_collect_login_stats(), so we get the true number of failed login attempts in the existing statistics. Reported-by: Ryan Stiles Cc: Ryan Stiles Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_util.c | 38 ++------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) commit bd4e2d2907fa23a11d46217064ecf80470ddae10 Author: Nicholas Bellinger Date: Wed Feb 22 22:06:32 2017 -0800 target: Fix NULL dereference during LUN lookup + active I/O shutdown When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_REF_DEAD checking before incrementing lun->lun_ref.count after lun->lun_ref has switched to atomic_t mode. This results in a NULL pointer dereference as LUN shutdown code in core_tpg_remove_lun() continues running after the existing ->release() -> core_tpg_lun_ref_release() callback completes, and clears the RCU protected se_lun->lun_se_dev pointer. During the OOPs, the state of lun->lun_ref in the process which triggered the NULL pointer dereference looks like the following on v4.1.y stable code: struct se_lun { lun_link_magic = 4294932337, lun_status = TRANSPORT_LUN_STATUS_FREE, ..... lun_se_dev = 0x0, lun_sep = 0x0, ..... lun_ref = { count = { counter = 1 }, percpu_count_ptr = 3, release = 0xffffffffa02fa1e0 , confirm_switch = 0x0, force_atomic = false, rcu = { next = 0xffff88154fa1a5d0, func = 0xffffffff8137c4c0 } } } To address this bug, use percpu_ref_tryget_live() to ensure once __PERCPU_REF_DEAD is visable on all CPUs and ->lun_ref has switched to atomic_t, all new I/Os will fail to obtain a new lun->lun_ref reference. Also use an explicit percpu_ref_kill_and_confirm() callback to block on ->lun_ref_comp to allow the first stage and associated RCU grace period to complete, and then block on ->lun_ref_shutdown waiting for the final percpu_ref_put() to drop the last reference via transport_lun_remove_cmd() before continuing with core_tpg_remove_lun() shutdown. Reported-by: Rob Millner Tested-by: Rob Millner Cc: Rob Millner Tested-by: Vaibhav Tandon Cc: Vaibhav Tandon Tested-by: Bryant G. Ly Cc: # v3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 10 ++++++++-- drivers/target/target_core_tpg.c | 3 ++- drivers/target/target_core_transport.c | 31 ++++++++++++++++++++++++++++++- include/target/target_core_base.h | 1 + 4 files changed, 41 insertions(+), 4 deletions(-) commit 31788ca803a0c89078f9e604e64286fbd9077926 Author: Thomas Hellstrom Date: Tue Feb 21 17:42:27 2017 +0700 drm/vmwgfx: Work around drm removal of control nodes vmware tools has a daemon that gets layout information from the GUI and forwards it to DRM so that the modesetting code can set preferred connector locations and modes. This daemon was using control nodes but since control nodes were just removed, make it possible for the daemon to use render- or primary nodes instead. This is a bit ugly but will allow drm to proceed with removal of the mostly unused control-node code and allow vmware to proceed with fixing up automatic layout settings for gnome-shell/wayland. We bump minor to inform user-space about the api change. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170221104227.2854-1-thellstrom@vmware.com drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 11 ++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit e5d56efc97f8240d0b5d66c03949382b6d7e5570 Merge: c4f3f22 e3a60ea Author: Linus Torvalds Date: Sun Feb 26 13:19:17 2017 -0800 Merge tag 'watchdog-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull watchdog updates from Guenter Roeck: "Wim asked me to handle the watchdog pull request this time around. Key changes: - New drivers: Cortina Gemini, ZTE's zx2967 family, NIC7018 - Convert to use device managed functions: ebc-c384_wdt, tegra_wdt, da9063_wdt, da9062_wdt, da9055_wdt, da9052_wdt, bcm2835_wdt, mena21_wdt, wm831x_wdt, digicolor_wdt, intel-mid_wdt, meson_wdt, sunxi_wdt, aspeed_wdt, coh901327_wdt, iTCO_wdt - Use watchdog core to install restart handler: tangox, dw_wdt, bcm2835_wdt, asm9260_wdt, bcm47xx_wdt - Convert ts72xx_wdt driver to watchdog core - Let core handle heartbeat in ep93xx_wdt driver - Enable COMPILE_TEST where possible - Various other improvements" * tag 'watchdog-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (54 commits) watchdog: s3c2410: Add prefix to local function watchdog: s3c2410: Select MFD_SYSCON on all Exynos platforms watchdog: s3c2410: Use dev_dbg instead of pr_info watchdog: s3c2410: Fix infinite interrupt in soft mode watchdog: s3c2410: Remove confusing CONFIG prefix from local defines watchdog: softdog: make pretimeout support a compile option watchdog: zx2967: add watchdog controller driver for ZTE's zx2967 family dt: bindings: add documentation for zx2967 family watchdog controller watchdog: sama5d4: Implement resume hook watchdog: sama5d4: Cache MR instead of a partial config watchdog: ts72xx_wdt: convert driver to watchdog core watchdog: ep93xx_wdt: cleanup and let the core handle the heartbeat watchdog: RDC321X_WDT always depends on PCI watchdog: add driver for Cortina Gemini watchdog watchdog: add DT bindings for Cortina Gemini watchdog: constify watchdog_ops structures watchdog: Introduce watchdog_stop_on_unregister helper watchdog: ebc-c384_wdt: Utilize devm_ functions in driver probe callback watchdog: tegra_wdt: Convert to use device managed functions watchdog: da9063_wdt: Convert to use device managed functions ... commit 47d3a07528ecbbccf53bc4390d70b4e3d1c04fcf Author: Eric Dumazet Date: Thu Feb 23 15:22:43 2017 -0800 net/mlx4_en: fix overflow in mlx4_en_init_timestamp() The cited commit makes a great job of finding optimal shift/multiplier values assuming a 10 seconds wrap around, but forgot to change the overflow_period computation. It overflows in cyclecounter_cyc2ns(), and the final result is 804 ms, which is silly. Lets simply use 5 seconds, no need to recompute this, given how it is supposed to work. Later, we will use a timer instead of a work queue, since the new RX allocation schem will no longer need mlx4_en_recover_from_oom() and the service_task firing every 250 ms. Fixes: 31c128b66e5b ("net/mlx4_en: Choose time-stamping shift value according to HW frequency") Signed-off-by: Eric Dumazet Cc: Tariq Toukan Cc: Eugenia Emantayev Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_clock.c | 18 ++++++++---------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) commit 13aa5a8f498dacd5f1a8e35be72af47e630fb8c6 Author: Pablo Neira Ayuso Date: Sun Feb 26 17:12:11 2017 +0100 netfilter: nft_set_bitmap: incorrect bitmap size priv->bitmap_size stores the real bitmap size, instead of the full struct nft_bitmap object. Fixes: 665153ff5752 ("netfilter: nf_tables: add bitmap set type") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1bb92bb6f6f5b05379c39f0e3bbf4f359e9298 Author: LABBE Corentin Date: Sat Feb 25 21:12:41 2017 +0100 net: s2io: fix typo argumnet argument This commit fix the typo argumnet/argument Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a573ba43d1f1fd8db81b1d8ff45a6771123fa6c1 Author: LABBE Corentin Date: Sat Feb 25 21:08:57 2017 +0100 net: vxge: fix typo argumnet argument This commit fix the typo argumnet/argument Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b86c459c7bee3acaf92f0e2b4c6ac803eaa1a58 Author: Jarno Rajahalme Date: Thu Feb 23 17:08:54 2017 -0800 netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value. Commit 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") inadvertently changed the successful return value of nf_ct_expect_related_report() from 0 to 1 due to __nf_ct_expect_check() returning 1 on success. Prevent this regression in the future by changing the return value of __nf_ct_expect_check() to 0 on success. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6cf1bf636a067eb308cb3a8322b9d6b1844a075d Author: Michael Zoran Date: Sat Feb 18 03:22:01 2017 -0800 staging: vchiq_2835_arm: Make cache-line-size a required DT property The original github source allowed for the cache-line-size property to be missing. Since recent firmwares also require this property, it makes sense to always require it in the driver as well. If the cache-line-size property is missing, then the driver probe should fail as no dev since the kernel and dt may be out of sync. The fix is to add a check for the return value of of_property_read_u32. Changes V2: 1. Add error message if cache-line-size is missing. 2. Simple check for non-zero return value from of_property_read_u32. Signed-off-by: Michael Zoran Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f4082c6f28a8e77dcb694c6f23de9e533251051d Author: Dan Carpenter Date: Sat Feb 18 02:20:36 2017 +0300 staging: bcm2835/mmal-vchiq: unlock on error in buffer_from_host() We should unlock before returning on this error path. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/mmal-vchiq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dc7ffefdcc28a45214aa707fdc3df6a5e611ba09 Author: Oleg Drokin Date: Sun Feb 19 16:35:59 2017 -0500 staging/lustre/lnet: Fix allocation size for sv_cpt_data This is unbreaking another of those "stealth" janitor patches that got in and subtly broke some things. sv_cpt_data is a pointer to pointer, so need to dereference it twice to allocate the correct structure size. Fixes: 9899cb68c6c2 ("Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.") CC: Sandhya Bankar Cc: stable # 4.7+ Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e28099d38c0e50d62c1afc054e37e573adf3d21 Author: Julian Anastasov Date: Sun Feb 26 17:14:35 2017 +0200 ipv4: mask tos for input route Restore the lost masking of TOS in input route code to allow ip rules to match it properly. Problem [1] noticed by Shmulik Ladkani [1] http://marc.info/?t=137331755300040&r=1&w=2 Fixes: 89aef8921bfb ("ipv4: Delete routing cache.") Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller net/ipv4/route.c | 1 + 1 file changed, 1 insertion(+) commit 8bcfd0925ef15f072ba1e7bee2c25e9e1b5fd6ca Author: Julian Anastasov Date: Sun Feb 26 15:50:52 2017 +0200 ipv4: add missing initialization for flowi4_uid Avoid matching of random stack value for uid when rules are looked up on input route or when RP filter is used. Problem should affect only setups that use ip rules with uid range. Fixes: 622ec2c9d524 ("net: core: add UID to flows, rules, and routes") Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 6 +++--- net/ipv4/route.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 8118b7b76c8c087055054884a39db6a7d138e1c5 Author: Colin Ian King Date: Sun Feb 26 12:10:12 2017 +0000 lib: fix spelling mistake: "actualy" -> "actually" trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Acked-by: Jiri Pirko Signed-off-by: David S. Miller lib/test_parman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aa2a92c491ecdd98b60845548a7041b159b3de3 Merge: bc49a78 ca1c39e Author: Greg Kroah-Hartman Date: Sun Feb 26 16:59:15 2017 +0100 Merge tag 'iio-fixes-for-4.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for IIO in the 4.11 cycle. This series consists of fixes that either came in after the merge window had opened or are fixes for work that merged during the merge window so had to wait for that to hit mainline. * 104-quad-8 - Fix an off by one error in the register address for the flag register. * rcar-gyroadc - protect against possible issues in future by dealing with childmode not being in a valid state. This also deals with some build warnings. * xilinx - fix some error handling paths to ensure resources are released in reverse order of being acquired. commit 71050ae7bf83e4d71a859257d11adc5de517073e Author: João Paulo Rechi Vita Date: Mon Feb 20 14:50:22 2017 -0500 platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT Some Asus laptops that have an airplane-mode indicator LED, also have the WMI WLAN user bit set, and the following bits in their DSDT: Scope (_SB) { (...) Device (ATKD) { (...) Method (WMNB, 3, Serialized) { (...) If (LEqual (IIA0, 0x00010002)) { OWGD (IIA1) Return (One) } } } } So when asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, it drives the airplane-mode indicator LED (through the call to OWGD) in an inverted fashion: the LED is ON when airplane mode is OFF (since wlan is ON), and vice-versa. This commit skips registering RFKill switches at all for these laptops, to allow the asus-wireless driver to drive the airplane mode LED correctly through the ASHS ACPI device. Relying on the presence of ASHS and ASUS_WMI_DSTS_USER_BIT avoids adding DMI-based quirks for at least 21 different laptops. Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 5802d0bc3fe9f598f0ff3f5fd7fd8c5c935a1b5d Author: Alan Jenkins Date: Wed Feb 8 14:46:33 2017 +0100 platform/x86: fujitsu-laptop: remove redundant MODULE_ALIAS entries MODULE_DEVICE_TABLE is all that is needed for fujitsu-laptop to be properly autoloaded based on presence of its associated ACPI devices, so remove redundant MODULE_ALIAS entries. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 4 ---- 1 file changed, 4 deletions(-) commit 5296a73613814a15e54ebddc2843ec0f84951d60 Author: Alan Jenkins Date: Wed Feb 8 14:46:32 2017 +0100 platform/x86: fujitsu-laptop: autodetect LCD interface on all models Presence of ACPI method SBL2 should be checked on all models rather than just the ones with predefined hotkey keycode overrides. Move most of dmi_check_cb_common() to acpi_fujitsu_bl_add(). Adjust indentation to make checkpatch happy. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c1d1e8a051761fb808308dab32b9351e1d1fbb9b Author: Alan Jenkins Date: Wed Feb 8 14:46:30 2017 +0100 platform/x86: fujitsu-laptop: simplify acpi_bus_register_driver() error handling A separate variable is not needed to handle error codes returned by acpi_bus_register_driver(). If the latter fails, just use the value it returned as the value returned by fujitsu_init(). Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 8c590e339f37022dff209ef16cf699531df1a0ca Author: Alan Jenkins Date: Wed Feb 8 14:46:29 2017 +0100 platform/x86: fujitsu-laptop: remove redundant forward declarations Both acpi_fujitsu_bl_notify() and acpi_fujitsu_laptop_notify() are defined before they are first used, so remove their forward declarations as they are redundant. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 4 ---- 1 file changed, 4 deletions(-) commit d3dd4480f8a911198d85b3cdb97f22db6539d2d1 Author: Alan Jenkins Date: Wed Feb 8 14:46:28 2017 +0100 platform/x86: fujitsu-laptop: replace numeric values with constants Replace three repeating numeric values with constants to improve code clarity. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 8ef27bd3410c4e5856bac2315ef51224926020e0 Author: Alan Jenkins Date: Wed Feb 8 14:46:27 2017 +0100 platform/x86: fujitsu-laptop: rename FUNC_RFKILL to FUNC_FLAGS FUNC subfunction 0x1000 is currently referred to as FUNC_RFKILL, which is misleading, because it handles more than just radio devices (also lid, dock, LEDs). Rename the FUNC_RFKILL constant to FUNC_FLAGS. Replace "rfkill" with "flags" in the names of its associated fields inside struct fujitsu_laptop. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 1650602691f4e8ea8f6e306452a72ac9a611932a Author: Alan Jenkins Date: Wed Feb 8 14:46:26 2017 +0100 platform/x86: fujitsu-laptop: make platform-related variables match naming convention Replace "fujitsupf" with "fujitsu_pf" in all platform-related variable names to match the module-wide naming convention. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6942eabc140eac54d5c0db2695eed63768209c34 Author: Alan Jenkins Date: Wed Feb 8 14:46:25 2017 +0100 platform/x86: fujitsu-laptop: replace "hotkey" with "laptop" in symbol names Functions, structures, variables and constants whose names currently contain the "hotkey" keyword are not only responsible for handling hotkeys, but also other laptop-related features (rfkill, lid, dock, LEDs). Fix their naming by using a consistent "_laptop"/"_LAPTOP" suffix/infix. Update comments so that they reflect this change. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 158 +++++++++++++++++----------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit 9fc5cf6e14fc1db40ea8a1c10061bb9586e78585 Author: Alan Jenkins Date: Wed Feb 8 14:46:24 2017 +0100 platform/x86: fujitsu-laptop: clearly denote backlight-related symbols Unify naming for all backlight-related functions, structures, variables and constants by using a consistent "_bl"/"_BL" suffix/infix. Adjust indentation to make checkpatch happy. Signed-off-by: Alan Jenkins [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 214 +++++++++++++++++----------------- 1 file changed, 107 insertions(+), 107 deletions(-) commit c4f3f22eddc982d247ffe2a6690c3e4a5c46dd09 Merge: cb41955 68bd42d9 Author: Linus Torvalds Date: Sat Feb 25 15:32:53 2017 -0800 Merge tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest update from Shuah Khan: "This update consists of: - fixes to several existing tests from Stafford Horne - cpufreq tests from Viresh Kumar - Selftest build and install fixes from Bamvor Jian Zhang and Michael Ellerman - Fixes to protection-keys tests from Dave Hansen - Warning fixes from Shuah Khan" * tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits) selftests/powerpc: Fix remaining fallout from recent changes selftests/powerpc: Fix the clean rule since recent changes selftests: Fix the .S and .S -> .o rules selftests: Fix the .c linking rule selftests: Fix selftests build to just build, not run tests selftests, x86, protection_keys: fix wrong offset in siginfo selftests, x86, protection_keys: fix uninitialized variable warning selftest: cpufreq: Update MAINTAINERS file selftest: cpufreq: Add special tests selftest: cpufreq: Add support to test cpufreq modules selftest: cpufreq: Add suspend/resume/hibernate support selftest: cpufreq: Add support for cpufreq tests selftests: Add intel_pstate to TARGETS selftests/intel_pstate: Update makefile to match new style selftests/intel_pstate: Fix warning on loop index overflow cpupower: Restore format of frequency-info limit selftests/futex: Add headers to makefile dependencies selftests/futex: Add stdio used for logging selftests: x86 protection_keys remove dead code selftests: x86 protection_keys fix unused variable compile warnings ... commit cb4195535f22162295eeb4a7909056843e65d367 Merge: 9003ed1 e98bdb3 Author: Linus Torvalds Date: Sat Feb 25 15:02:10 2017 -0800 Merge tag 'for-linus-4.11-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Orangefs: cleanups, a protocol fix and an added configuration button. Cleanups: - silence harmless integer overflow warning (from dan.carpenter@oracle.com) - Dan Carpenter influenced debugfs cleanups. - remove orangefs_backing_dev_info (from jack@suse.cz) Protocol fix: - fix buffer size mis-match between kernel space and user space New configuration button: - support readahead_readcnt parameter" * tag 'for-linus-4.11-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: fix buffer size mis-match between kernel space and user space. orangefs: Dan Carpenter influenced cleanups... orangefs: Remove orangefs_backing_dev_info orangefs: Support readahead_readcnt parameter. orangefs: silence harmless integer overflow warning commit 9003ed1fed2a3fe2774a6b67dcbe1ab31d7f8ec3 Merge: 94eae80 6288d6e Author: Linus Torvalds Date: Sat Feb 25 14:53:58 2017 -0800 Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "This has a series of fixes and cleanups that Dave Sterba has been collecting. There is a pretty big variety here, cleaning up internal APIs and fixing corner cases" * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (124 commits) Btrfs: use the correct type when creating cow dio extent Btrfs: fix deadlock between dedup on same file and starting writeback btrfs: use btrfs_debug instead of pr_debug in transaction abort btrfs: btrfs_truncate_free_space_cache always allocates path btrfs: free-space-cache, clean up unnecessary root arguments btrfs: convert btrfs_inc_block_group_ro to accept fs_info btrfs: flush_space always takes fs_info->fs_root btrfs: pass fs_info to (more) routines that are only called with extent_root btrfs: qgroup: Move half of the qgroup accounting time out of commit trans btrfs: remove unused parameter from adjust_slots_upwards btrfs: remove unused parameters from __btrfs_write_out_cache btrfs: remove unused parameter from cleanup_write_cache_enospc btrfs: remove unused parameter from __add_inode_ref btrfs: remove unused parameter from clone_copy_inline_extent btrfs: remove unused parameters from btrfs_cmp_data btrfs: remove unused parameter from __add_inline_refs btrfs: remove unused parameters from scrub_setup_wr_ctx btrfs: remove unused parameter from create_snapshot btrfs: remove unused parameter from init_first_rw_device btrfs: remove unused parameter from __btrfs_alloc_chunk ... commit 94eae8034002401d71ae950106659e16add36e77 Merge: 5d8a00e af050ab Author: Linus Torvalds Date: Sat Feb 25 14:35:37 2017 -0800 Merge tag 'platform-drivers-x86-v4.11-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Big picture: - New intel_turbo_max_3 driver, providing max core frequency information to the scheduler. Intel PMC APL support, s0ix read API, and fixes. - New Silead touchscreen platform touchscreen descriptions. Additional hotkey support for the intel-hid driver. - New model support for dell-laptop and hp_accel. - Several cleanups, especially to the fujitsu-laptop and intel_mid_powerbtn drivers. Detail summary: platorm/x86: - silead depends on I2C being built-in - add support for devices with Silead touchscreens - Support Turbo Boost Max 3.0 for non HWP systems intel_turbo_max_3: - make it explicitly non-modular dell-laptop: - Add Latitude 7480 and others to the DMI whitelist intel-hid: - Support 5 button array thinkpad_acpi: - Call led_classdev_notify_brightness_hw_changed on kbd brightness change - Use brightness_set_blocking callback for LEDs - Stop setting led_classdev brightness directly acer-wmi: - add another KEY_WLAN keycode - Inform firmware that RF Button Driver is active - setup accelerometer when machine has appropriate notify event asus-wireless: - Fix indentation - Use per-HID HSWC parameters intel_pmc_ipc: - Add APL PMC PCI Id - read s0ix residency API - Remove unused iTCO_version variable alienware-wmi: - Remove header duplicate intel_pmc_core: - fix out-of-bounds accesses on stack intel_mid_powerbtn: - Use SCU IPC directly - Unify IRQ acknowledgment - Move comment to where it belongs - Unify PBSTATUS access - Remove snail address - Sort headers alphabetically - Join string literals - Enable driver for Merrifield - Acknowledge interrupts - Factor out mfld_ack() - Introduce driver data - Substitute mfld by mid - Convert to use devm_*() fujitsu-laptop: - make hotkey handling functions more similar - break up complex loop condition - move keycode processing to separate functions - decrease indentation in acpi_fujitsu_hotkey_notify() - simplify logolamp_get() - rework logolamp_set() to properly handle errors - set default trigger for radio LED to rfkill-any dell-smbios: - Auto-select as needed intel_mid_thermal: - Fix module autoload - Remove duplicated platform device ID mlx-platform: - mlxcpld-hotplug driver style fixes hp_accel: - Add support for HP ZBook 17" * tag 'platform-drivers-x86-v4.11-1' of git://git.infradead.org/linux-platform-drivers-x86: (45 commits) platform/x86: intel_turbo_max_3: make it explicitly non-modular platform/x86: dell-laptop: Add Latitude 7480 and others to the DMI whitelist platform/x86: intel-hid: Support 5 button array platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed on kbd brightness change platform/x86: thinkpad_acpi: Use brightness_set_blocking callback for LEDs platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directly leds: class: Add new optional brightness_hw_changed attribute platform/x86: acer-wmi: add another KEY_WLAN keycode platform/x86: acer-wmi: Inform firmware that RF Button Driver is active platform/x86: asus-wireless: Fix indentation platform/x86: asus-wireless: Use per-HID HSWC parameters platform/x86: intel_pmc_ipc: Add APL PMC PCI Id platform/x86: intel_pmc_ipc: read s0ix residency API platform/x86: alienware-wmi: Remove header duplicate platform/x86: intel_mid_powerbtn: Use SCU IPC directly platform/x86: intel_mid_powerbtn: Unify IRQ acknowledgment platform/x86: intel_mid_powerbtn: Move comment to where it belongs platform/x86: intel_mid_powerbtn: Unify PBSTATUS access platform/x86: intel_pmc_core: fix out-of-bounds accesses on stack platform/x86: silead depends on I2C being built-in ... commit 5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4 Merge: 7067739 f59de56 Author: Linus Torvalds Date: Sat Feb 25 14:28:06 2017 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The usual collection of new drivers, non-critical fixes, and updates to existing clk drivers. The bulk of the work is on Allwinner and Rockchip SoCs, but there's also an Intel Atom driver in here too. New Drivers: - Tegra BPMP firmware - Hisilicon hi3660 SoCs - Rockchip rk3328 SoCs - Intel Atom PMC - STM32F746 - IDT VersaClock 5P49V5923 and 5P49V5933 - Marvell mv98dx3236 SoCs - Allwinner V3s SoCs Removed Drivers: - Samsung Exynos4415 SoCs Updates: - Migrate ABx500 to OF - Qualcomm IPQ4019 CPU clks and general PLL support - Qualcomm MSM8974 RPM - Rockchip non-critical fixes and clk id additions - Samsung Exynos4412 CPUs - Socionext UniPhier NAND and eMMC support - ZTE zx296718 i2s and other audio clks - Renesas CAN and MSIOF clks for R-Car M3-W - Renesas resets for R-Car Gen2 and Gen3 and RZ/G1 - TI CDCE913, CDCE937, and CDCE949 clk generators - Marvell Armada ap806 CPU frequencies - STM32F4* I2S/SAI support - Broadcom BCM2835 DSI support - Allwinner sun5i and A80 conversion to new style clk bindings" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (130 commits) clk: renesas: mstp: ensure register writes complete clk: qcom: Do not drop device node twice clk: mvebu: adjust clock handling for the CP110 system controller clk: mvebu: Expand mv98dx3236-core-clock support clk: zte: add i2s clocks for zx296718 clk: sunxi-ng: sun9i-a80: Fix wrong pointer passed to PTR_ERR() clk: sunxi-ng: select SUNXI_CCU_MULT for sun5i clk: sunxi-ng: Check kzalloc() for errors and cleanup error path clk: tegra: Add BPMP clock driver clk: uniphier: add eMMC clock for LD11 and LD20 SoCs clk: uniphier: add NAND clock for all UniPhier SoCs ARM: dts: sun9i: Switch to new clock bindings clk: sunxi-ng: Add A80 Display Engine CCU clk: sunxi-ng: Add A80 USB CCU clk: sunxi-ng: Add A80 CCU clk: sunxi-ng: Support separately grouped PLL lock status register clk: sunxi-ng: mux: Get closest parent rate possible with CLK_SET_RATE_PARENT clk: sunxi-ng: mux: honor CLK_SET_RATE_NO_REPARENT flag clk: sunxi-ng: mux: Fix determine_rate for mux clocks with pre-dividers clk: qcom: SDHCI enablement on Nexus 5X / 6P ... commit 7067739df23ffd641ca99c967830e0ed2ba39eab Merge: ac1820f 4c21541 Author: Linus Torvalds Date: Sat Feb 25 14:21:18 2017 -0800 Merge branch 'i2c/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C has for you two new drivers (Tegra BPMP and STM32F4), interrupt support for pca954x muxes, and a bunch of driver bugfixes and improvements. Nothing really special this cycle. A few commits have been added to my tree just recently. Those are the Tegra BPMP driver and a few straightforward bugfixes or cleanups which I prefer to have upstream rather soonish. The rest had proper linux-next exposure" * 'i2c/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (25 commits) i2c: thunderx: Replace pci_enable_msix() i2c: exynos5: fix arbitration lost handling i2c: exynos5: disable fifo-almost-empty irq signal when necessary i2c: at91: ensure state is restored after suspending i2c: bcm2835: Avoid possible NULL ptr dereference i2c: Add Tegra BPMP I2C proxy driver dt-bindings: Add Tegra186 BPMP I2C binding misc: eeprom: at24: use device_property_*() functions instead of of_get_property() i2c: mux: pca954x: Add interrupt controller support dt: bindings: i2c-mux-pca954x: Add documentation for interrupt controller i2c: mux: pca954x: Add missing pca9542 definition to chip_desc i2c: riic: correctly finish transfers i2c: i801: Add support for Intel Gemini Lake i2c: mux: pca9541: Export OF device ID table as module aliases i2c: mux: pca954x: Export OF device ID table as module aliases i2c: mux: mlxcpld: remove unused including i2c: busses: constify i2c_algorithm structures i2c: i2c-mux-gpio: rename i2c-gpio-mux to i2c-mux-gpio i2c: sh_mobile: document support for r8a7796 (R-Car M3-W) i2c: i2c-cros-ec-tunnel: Reduce logging noise ... commit f2642888476d7faefa9695bbebb2abbaeb3685d8 Author: Len Brown Date: Sat Jan 7 23:13:15 2017 -0500 tools/power turbostat: update MSR_PKG_CST_CONFIG_CONTROL decoding AMT value 0 is unlimited, not PC0 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f6196c192f6393823e632bfb927ff1572369875 Author: Len Brown Date: Sat Jan 7 22:40:23 2017 -0500 tools/power turbostat: Baytrail: remove debug line in quiet mode Without --debug, a debug line was printed on Baytrail: SLM BCLK: 83.3 Mhz Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71616c8e936a6dd541f0627d7bf4ff09971d8ccb Author: Len Brown Date: Sat Jan 7 22:37:48 2017 -0500 tools/power turbostat: decode Baytrail CC6 and MC6 demotion configuration with --debug, see: cpu0: MSR_CC6_DEMOTION_POLICY_CONFIG: 0x00000000 (DISable-CC6-Demotion) cpu0: MSR_MC6_DEMOTION_POLICY_CONFIG: 0x00000000 (DISable-MC6-Demotion) Note that the hardware default is to enable demotion, and Linux started clearing these registers in 3.17. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit cf4cbe5314884c3123fe4ca137e9d750b6e2b8c9 Author: Len Brown Date: Sun Jan 1 13:08:33 2017 -0500 tools/power turbostat: BYT does not have MSR_MISC_PWR_MGMT and so --debug fails with: turbostat: msr 1 offset 0x1aa read failed: Input/output error It seems that baytrail, and airmont do not have this MSR. It is included in subsequent Goldmont Atom. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 812db3f77b9a3f6ed59baf7a0d5c3fd8ec8ef86a Author: Len Brown Date: Fri Feb 10 00:25:41 2017 -0500 tools/power turbostat: Add --show and --hide parameters Add the "--show" and "--hide" cmdline parameters. By default, turbostat shows all columns. turbostat --hide counter_list will continue showing all columns, except for those listed. turbostat --show counter_list will show _only_ the listed columns These features work for built-in counters, and have no effect on columns added with the --add parameter. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 4 + tools/power/x86/turbostat/turbostat.c | 463 +++++++++++++++++++++++++--------- 2 files changed, 347 insertions(+), 120 deletions(-) commit 678a3bd1b3de6d2ebf604e7d708bc8150bb667e9 Author: Len Brown Date: Thu Feb 9 22:22:13 2017 -0500 tools/power turbostat: fix bugs in --add option When --add was used more than once, overflowed buffers caused some counters to be stored on top of others, corrupting the results. Simplify the code by simply reserving space for up to 16 added counters per each cpu, core, package. Per-cpu added counters were being printed only per-core. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 88 +++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 36 deletions(-) commit ac1820fb286b552b6885d40ab34f1e59b815f1f1 Merge: edccb59 0bbb3b7 Author: Linus Torvalds Date: Sat Feb 25 13:45:43 2017 -0800 Merge tag 'for-next-dma_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma DMA mapping updates from Doug Ledford: "Drop IB DMA mapping code and use core DMA code instead. Bart Van Assche noted that the ib DMA mapping code was significantly similar enough to the core DMA mapping code that with a few changes it was possible to remove the IB DMA mapping code entirely and switch the RDMA stack to use the core DMA mapping code. This resulted in a nice set of cleanups, but touched the entire tree and has been kept separate for that reason." * tag 'for-next-dma_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (37 commits) IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it IB/core: Remove ib_device.dma_device nvme-rdma: Switch from dma_device to dev.parent RDS: net: Switch from dma_device to dev.parent IB/srpt: Modify a debug statement IB/srp: Switch from dma_device to dev.parent IB/iser: Switch from dma_device to dev.parent IB/IPoIB: Switch from dma_device to dev.parent IB/rxe: Switch from dma_device to dev.parent IB/vmw_pvrdma: Switch from dma_device to dev.parent IB/usnic: Switch from dma_device to dev.parent IB/qib: Switch from dma_device to dev.parent IB/qedr: Switch from dma_device to dev.parent IB/ocrdma: Switch from dma_device to dev.parent IB/nes: Remove a superfluous assignment statement IB/mthca: Switch from dma_device to dev.parent IB/mlx5: Switch from dma_device to dev.parent IB/mlx4: Switch from dma_device to dev.parent IB/i40iw: Remove a superfluous assignment statement IB/hns: Switch from dma_device to dev.parent ... commit ef470a60e10eb12635d7b84c9502cea3028d44e8 Author: John David Anglin Date: Mon Feb 20 14:02:46 2017 -0500 parisc: Remove flush_user_dcache_range and flush_user_icache_range The functions flush_user_dcache_range() and flush_user_icache_range() are only used by the parisc signal handling code. This code only needs to flush a couple of lines, so the threshold check is unnecessary overhead. Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/include/asm/cacheflush.h | 2 -- arch/parisc/kernel/cache.c | 18 ------------------ arch/parisc/kernel/signal.c | 13 +++++++------ 3 files changed, 7 insertions(+), 26 deletions(-) commit 8351badf349b22b47c9696f54656db65d7834e42 Author: Dan Carpenter Date: Wed Feb 8 10:20:35 2017 +0300 parisc: fix a printk We want to do a pr_cont() here and not a pr_warn(). Fixes: b391667eb45a ("parisc: Report trap type as human readable string") Signed-off-by: Dan Carpenter Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e28f701b21ee4b4eb716e4717fa2aa78c28a8523 Author: Arvind Yadav Date: Thu Feb 2 18:52:34 2017 +0530 parisc: ccio-dma: Handle return NULL error from ioremap_nocache Fix error paths and return -ENOMEM instead of '1'. Signed-off-by: Arvind Yadav Signed-off-by: Helge Deller drivers/parisc/ccio-dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 09b871ffd4d8ddc005a9480fb69ff1897caaeb1f Author: Helge Deller Date: Sun Jan 29 18:19:33 2017 +0100 parisc: Define access_ok() as macro Define access_ok() as macro instead of static function. This fixes build warnings in code where the second parameter is given as unsigned long. Signed-off-by: Helge Deller arch/parisc/include/asm/uaccess.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit af640d17ecee1f82a949b580cc4a3e8f29c377b9 Author: Arvind Yadav Date: Wed Jan 18 13:41:31 2017 +0530 parisc: eisa: Fix resource leaks in error paths Signed-off-by: Arvind Yadav Signed-off-by: Helge Deller drivers/parisc/eisa.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 99cde44edfa06b5f910c1704cb15d36310a56545 Author: Arvind Yadav Date: Tue Jan 17 13:35:03 2017 +0530 parisc: eisa: Remove coding style errors This patch removes coding style errors in the eisa driver. Signed-off-by: Arvind Yadav Signed-off-by: Helge Deller drivers/parisc/eisa.c | 104 +++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit edccb59429657b09806146339e2b27594c1d1da0 Merge: 6e5c838 42f8236 Author: Linus Torvalds Date: Sat Feb 25 13:20:22 2017 -0800 Merge tag 'fbdev-v4.11' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: - fix for font color when console is switched to another fb driver - deferred probing fixes for simplefb driver - preparations to add support of an optional GPIO to enable panel for ARM CLCD driver - some improvements for ssd1307fb driver - cleanups for OMAP fbdev LCD drivers - misc fixes/cleanups for various fb drivers * tag 'fbdev-v4.11' of git://github.com/bzolnier/linux: (30 commits) video: fbdev: fsl-diu-fb: fix spelling mistake "palette" fbdev: ssd1307fb: include linux/gpio/consumer.h video: fbdev: fsl-diu-fb: remove impossible condition video: fbdev: amifb: remove impossible condition fbdev/ssd1307fb: clear screen in probe fbdev/ssd1307fb: add support to enable VBAT fbdev: ssd1307fb: Make reset gpio devicetree property optional fbdev: ssd1307fb: Remove reset-active-low from the DT binding document fbdev: ssd1307fb: Start to use gpiod API for reset gpio video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe() video: fbdev: offb: switch to using for_each_node_by_type video/console: use setup_timer and mod_timer instead of init_timer fbdev: omap/lcd: Make callbacks optional fbdev: omap/lcd: Staticize non-exported lcd_panel structs fbdev: omap/lcd: Remove no-op driver callbacks video/mbx: use simple_open() video: fbdev: stifb: handle NULL return value from ioremap_nocache video: fbdev: pmagb-b-fb: Remove bad `__init' annotation video: fbdev: pmag-ba-fb: Remove bad `__init' annotation video: ARM CLCD: use panel device node for getting backlight and mode ... commit 6e5c8381d1db4c1cdd4b4e49d5f0d1255c2246fd Author: Joe Perches Date: Thu Feb 23 22:29:40 2017 -0800 treewide: Remove remaining executable attributes from source files These are the current source files that should not have executable attributes set. [ Normally this would be sent through Andrew Morton's tree but his quilt tools don't like permission only patches. ] Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/sound/rt5665.txt | 0 arch/nios2/boot/dts/10m50_devboard.dts | 0 arch/nios2/configs/10m50_defconfig | 0 arch/sh/boot/dts/j2_mimas_v2.dts | 0 drivers/crypto/chelsio/chcr_algo.c | 0 include/sound/rt5665.h | 0 6 files changed, 0 insertions(+), 0 deletions(-) commit 7b46588f364f4f40c25f43ceabb6f705d20793e2 Merge: 915f3e3 9533047 Author: Linus Torvalds Date: Sat Feb 25 10:29:09 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - almost all of the rest of MM - misc bits - KASAN updates - procfs - lib/ updates - checkpatch updates * emailed patches from Andrew Morton : (124 commits) checkpatch: remove false unbalanced braces warning checkpatch: notice unbalanced else braces in a patch checkpatch: add another old address for the FSF checkpatch: update $logFunctions checkpatch: warn on logging continuations checkpatch: warn on embedded function names lib/lz4: remove back-compat wrappers fs/pstore: fs/squashfs: change usage of LZ4 to work with new LZ4 version crypto: change LZ4 modules to work with new LZ4 module version lib/decompress_unlz4: change module to work with new LZ4 module version lib: update LZ4 compressor module lib/test_sort.c: make it explicitly non-modular lib: add CONFIG_TEST_SORT to enable self-test of sort() rbtree: use designated initializers linux/kernel.h: fix DIV_ROUND_CLOSEST to support negative divisors lib/find_bit.c: micro-optimise find_next_*_bit lib: add module support to atomic64 tests lib: add module support to glob tests lib: add module support to crc32 tests kernel/ksysfs.c: add __ro_after_init to bin_attribute structure ... commit 915f3e3f76c05b2da93c4cc278eebc2d9219d9f4 Author: Thomas Gleixner Date: Sat Feb 25 11:27:37 2017 +0100 mac80211_hwsim: Replace bogus hrtimer clockid mac80211_hwsim initializes a hrtimer with clockid CLOCK_MONOTONIC_RAW. That's not supported. Use CLOCK_MONOTNIC instead. Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca1c39ef76376b67303d01f94fe98bb68bb3861a Author: Christophe JAILLET Date: Tue Feb 21 07:34:00 2017 +0100 iio: adc: xilinx: Fix error handling Reorder error handling labels in order to match the way resources have been allocated. Signed-off-by: Christophe JAILLET Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/adc/xilinx-xadc-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e98bdb3059cbf2b1cd4261e126b08429f64466c3 Merge: eb68d03 c470abd Author: Mike Marshall Date: Sat Feb 25 11:12:48 2017 -0500 Merge tag 'v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into for-next Linux 4.10 commit c0464062bfea9cd2ef6643d93429eafe8f6c2a4a Author: Guenter Roeck Date: Sat Feb 25 02:08:12 2017 -0800 PCI: dwc: Fix crashes seen due to missing assignments Fix the following crash, seen in dwc/pci-imx6. Unable to handle kernel NULL pointer dereference at virtual address 00000070 pgd = c0004000 [00000070] *pgd=00000000 Internal error: Oops: 805 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-09686-g9e31489 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: cb850000 task.stack: cb84e000 PC is at imx6_pcie_probe+0x2f4/0x414 ... While at it, fix the same problem in various drivers instead of waiting for individual crash reports. The change in the imx6 driver was tested with qemu. The changes in other drivers are based on code inspection and have been compile tested only. Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures") Signed-off-by: Guenter Roeck Signed-off-by: Vivek Gautam # designware-plat Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-exynos.c | 1 + drivers/pci/dwc/pci-imx6.c | 1 + drivers/pci/dwc/pci-keystone.c | 2 ++ drivers/pci/dwc/pci-layerscape.c | 2 ++ drivers/pci/dwc/pcie-armada8k.c | 2 ++ drivers/pci/dwc/pcie-artpec6.c | 2 ++ drivers/pci/dwc/pcie-designware-plat.c | 2 ++ drivers/pci/dwc/pcie-hisi.c | 2 ++ drivers/pci/dwc/pcie-qcom.c | 2 ++ drivers/pci/dwc/pcie-spear13xx.c | 2 ++ 10 files changed, 18 insertions(+) commit 7fb668ac7b498f7e8ba2de373fe8a8648bd39a4c Author: Jarno Rajahalme Date: Thu Feb 23 17:08:53 2017 -0800 netfilter: nf_ct_expect: nf_ct_expect_related_report(): Return zero on success. Commit 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") inadvertently changed the successful return value of nf_ct_expect_related_report() from 0 to 1, which caused openvswitch conntrack integration fail in FTP test cases. Fix this by always returning zero on the success code path. Fixes: 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2168273427c9358a21d1c77c629353c00d46c34 Author: Dmitry V. Levin Date: Fri Feb 24 03:23:20 2017 +0300 uapi: fix linux/netfilter/xt_hashlimit.h userspace compilation error Include like some of uapi/linux/netfilter/xt_*.h headers do to fix the following linux/netfilter/xt_hashlimit.h userspace compilation error: /usr/include/linux/netfilter/xt_hashlimit.h:90:12: error: 'NAME_MAX' undeclared here (not in a function) char name[NAME_MAX]; Signed-off-by: Dmitry V. Levin Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_hashlimit.h | 1 + 1 file changed, 1 insertion(+) commit 3d1e236022cc1426b0834565995ddee2ca231cee Author: Josh Poimboeuf Date: Fri Feb 24 22:31:02 2017 -0600 objtool: Prevent GCC from merging annotate_unreachable() 0-day bot reported some new objtool warnings which were caused by the new annotate_unreachable() macro: fs/afs/flock.o: warning: objtool: afs_do_unlk()+0x0: duplicate frame pointer save fs/afs/flock.o: warning: objtool: afs_do_unlk()+0x0: frame pointer state mismatch fs/btrfs/delayed-inode.o: warning: objtool: btrfs_delete_delayed_dir_index()+0x0: duplicate frame pointer save fs/btrfs/delayed-inode.o: warning: objtool: btrfs_delete_delayed_dir_index()+0x0: frame pointer state mismatch fs/dlm/lock.o: warning: objtool: _grant_lock()+0x0: duplicate frame pointer save fs/dlm/lock.o: warning: objtool: _grant_lock()+0x0: frame pointer state mismatch fs/ocfs2/alloc.o: warning: objtool: ocfs2_mv_path()+0x0: duplicate frame pointer save fs/ocfs2/alloc.o: warning: objtool: ocfs2_mv_path()+0x0: frame pointer state mismatch It turns out that, for older versions of GCC, if a function has multiple BUG() incantations, GCC will sometimes merge the corresponding annotate_unreachable() inline asm statements into a single block. That has the undesirable effect of removing one of the entries in the __unreachable section, confusing objtool greatly. A workaround for this issue is to ensure that each instance of the inline asm statement uses a different label, so that GCC sees the statements are unique and leaves them alone. The inline asm ‘%=’ token could be used for that, but unfortunately older versions of GCC don't support it. So I implemented a poor man's version of it with the __LINE__ macro. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Link: http://lkml.kernel.org/r/0c14b00baf9f68d1b0221ddb6c88b925181c8be8.1487997036.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/compiler-gcc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit af050abb5c2e5e7d3e1368475d63cbac597dc34f Author: Paul Gortmaker Date: Mon Feb 13 19:37:00 2017 -0500 platform/x86: intel_turbo_max_3: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/platform/x86/Kconfig:config INTEL_TURBO_MAX_3 drivers/platform/x86/Kconfig: bool "Intel Turbo Boost Max Technology 3.0 enumeration driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. We do uncover some implicit includes during build coverage that were hidden behind the module.h which pulls in a lot of dependants. Cc: Andy Shevchenko Cc: Srinivas Pandruvada Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Darren Hart drivers/platform/x86/intel_turbo_max_3.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8d2c4538dbc7154c4aed1364db127a0e51dbd459 Author: Alex Hung Date: Thu Feb 16 20:58:03 2017 +0800 platform/x86: dell-laptop: Add Latitude 7480 and others to the DMI whitelist This is to support Latitude 7480 and many other newer Dell laptops. Signed-off-by: Alex Hung Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bd5762a0c1c9ae66bd0ece6959bbc5013ab95dcd Author: Alex Hung Date: Tue Feb 14 15:20:34 2017 +0800 platform/x86: intel-hid: Support 5 button array New firmwares include a feature called 5 button array that supports super key, volume up/down, rotation lock and power button. Support for this feature is required to fix power button on some recent systems. This patch was tested on a Dell Latitude 7480. Signed-off-by: Alex Hung Reviewed-by: Michał Kępień Signed-off-by: Darren Hart drivers/platform/x86/intel-hid.c | 96 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 91 insertions(+), 5 deletions(-) commit c685e20df5cfa11cee0954be70456872c4f670f0 Author: Hans de Goede Date: Thu Feb 9 16:44:13 2017 +0100 platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed on kbd brightness change Make thinkpad_acpi call led_classdev_notify_brightness_hw_changed on the kbd_led led_classdev registered by thinkpad_acpi when the kbd backlight brightness is changed through the hotkey. This will allow userspace to monitor (poll) for brightness changes on these LEDs caused by the hotkey. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko Acked-by: Pavel Machek drivers/platform/x86/thinkpad_acpi.c | 42 ++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit 86ec0c2c0b527dc1574e5e95436bec5499102a3d Author: Hans de Goede Date: Thu Feb 9 16:44:12 2017 +0100 platform/x86: thinkpad_acpi: Use brightness_set_blocking callback for LEDs Now a days the LED core can take care of executing brightness_set from a workqueue if it needs to sleep, make use of this and remove a bunch of DIY code for this. Since this commit removes the workqueue usage for LEDs, the led_sysfs_blink_set callback may now also sleep, this is fine. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko Acked-by: Pavel Machek drivers/platform/x86/thinkpad_acpi.c | 80 ++++++++---------------------------- 1 file changed, 16 insertions(+), 64 deletions(-) commit 06da5325d02ed3e9be9fbc7d0d621a04efc96961 Author: Hans de Goede Date: Thu Feb 9 16:44:11 2017 +0100 platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directly There is no need to set the led_classdev's brightness value from its set_brightness callback, this is taken care of by the led-core and thinkpad_acpi really should not be mucking with it. Note that kbdlight_set_level_and_update() is still used by the old thinpad_acpi specific sysfs interface for the led, so we cannot remove it. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko Acked-by: Pavel Machek drivers/platform/x86/thinkpad_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b8c5099b0027f013dad115b8d00f36f12cb13bb4 Author: Hans de Goede Date: Sun Jan 29 14:42:52 2017 +0100 leds: class: Add new optional brightness_hw_changed attribute Some LEDs may have their brightness level changed autonomously (outside of kernel control) by hardware / firmware. This commit adds support for an optional brightness_hw_changed attribute to signal such changes to userspace (if a driver can detect them): What: /sys/class/leds//brightness_hw_changed Date: January 2017 KernelVersion: 4.11 Description: Last hardware set brightness level for this LED. Some LEDs may be changed autonomously by hardware/firmware. Only LEDs where this happens and the driver can detect this, will have this file. This file supports poll() to detect when the hardware changes the brightness. Reading this file will return the last brightness level set by the hardware, this may be different from the current brightness. Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to their flags field and call led_classdev_notify_brightness_hw_changed() with the hardware set brightness when they detect a hardware / firmware triggered brightness change. Signed-off-by: Hans de Goede Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski Documentation/ABI/testing/sysfs-class-led | 17 +++++++ Documentation/leds/leds-class.txt | 15 ++++++ drivers/leds/Kconfig | 9 ++++ drivers/leds/led-class.c | 76 +++++++++++++++++++++++++++++++ include/linux/leds.h | 15 ++++++ 5 files changed, 132 insertions(+) commit 5ffa572a431ff3fd6175419656603519fa471c27 Author: Chris Chiu Date: Wed Feb 8 07:51:41 2017 -0600 platform/x86: acer-wmi: add another KEY_WLAN keycode Now that we have informed the firmware that the RF Button driver is active, laptops such as the Acer TravelMate P238-M will generate a WMI key event with code 0x86 when the Fn+F3 airplane mode key is pressed. Add this keycode to the table so that it is converted to an appropriate input event. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 1 + 1 file changed, 1 insertion(+) commit 280642c3c8dda79da39e056fd5480d1c3942524e Author: Chris Chiu Date: Wed Feb 8 07:51:40 2017 -0600 platform/x86: acer-wmi: Inform firmware that RF Button Driver is active The same method to activate LM(Launch Manager) can also be used to activate the RF Button driver with different bit toggled in the same lm_status. To express that many functions this byte field can achieve, rename the lm_status to app_status. And also the app_mask is the bit mask which specifically indicate which bits are going to be changed. This solves a problem where the AR9565 wifi included in the Acer Aspire ES1-421 is permanently hard blocked according to the rfkill GPIO read by ath9k. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Reviewed-by: Lee, Chun-Yi Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 74 ++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 16 deletions(-) commit 4ac20e62efc6b8a63a1a534ddf236af7fe8849b5 Author: João Paulo Rechi Vita Date: Mon Feb 6 10:20:21 2017 -0500 platform/x86: asus-wireless: Fix indentation Fix indentation problem introduced when this driver was first merged into the kernel. Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wireless.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4b7fb9fcf917f7eda8da8f2bf335539067772c4d Author: João Paulo Rechi Vita Date: Tue Feb 7 16:45:10 2017 -0500 platform/x86: asus-wireless: Use per-HID HSWC parameters Some Asus machines use 0x4/0x5 as their LED on/off values, while others use 0x0/0x1, as shown in the DSDT excerpts below. Luckily it seems this behavior is tied to different HIDs, after looking at 44 DSDTs from different Asus models. Another small difference is that a few of them call GWBL instead of OWGS, and SWBL instead of OWGD. That does not seem to make a difference for asus-wireless, and is additional reasoning to not try to call these methods directly. Device (ASHS) | Device (ASHS) { | { Name (_HID, "ATK4002") | Name (_HID, "ATK4001") Method (HSWC, 1, Serialized) | Method (HSWC, 1, Serialized) { | { If ((Arg0 < 0x02)) | If ((Arg0 < 0x02)) { | { OWGD (Arg0) | OWGD (Arg0) Return (One) | Return (One) } | } If ((Arg0 == 0x02)) | { | If ((Arg0 == 0x02)) Local0 = OWGS () | { If (Local0) | Return (OWGS ()) { | } Return (0x05) | } | If ((Arg0 == 0x03)) Else | { { | Return (0xFF) Return (0x04) | } } | } | If ((Arg0 == 0x80)) If ((Arg0 == 0x03)) | { { | Return (One) Return (0xFF) | } } | } If ((Arg0 == 0x04)) | Method (_STA, 0, NotSerialized) { | { OWGD (Zero) | If ((MSOS () >= OSW8)) Return (One) | { } | Return (0x0F) If ((Arg0 == 0x05)) | } { | Else OWGD (One) | { Return (One) | Return (Zero) } | } If ((Arg0 == 0x80)) | } { | } Return (One) | } | } | Method (_STA, 0, NotSerialized) | { | If ((MSOS () >= OSW8)) | { | Return (0x0F) | } | Else | { | Return (Zero) | } | } | } | Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wireless.c | 57 ++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 15 deletions(-) commit 23e775db8cb90a3bde18d7c5e3bcc90a59395978 Author: Rajneesh Bhardwaj Date: Mon Feb 13 16:11:47 2017 +0530 platform/x86: intel_pmc_ipc: Add APL PMC PCI Id This patch adds the PCI Device id for Power Management Controller on Intel Apollo Lake platforms. Intel PMC IPC Driver loads as a platform driver on Apollo Lake platforms since Intel BIOS hides the PCI Configuration space for 0:13:1 and re-enumerates it as ACPI device (INT34D2). The correct PCI Device ID should be added if some platform firmware choses to enumerate the device via PCI space. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 1 + 1 file changed, 1 insertion(+) commit 76062b4ae2ea54fcfb8fce6940921a90f33f38da Author: Shanth Murthy Date: Mon Feb 13 04:02:52 2017 -0800 platform/x86: intel_pmc_ipc: read s0ix residency API This patch adds a new API to indicate S0ix residency in usec. It utilizes the PMC Global Control Registers (GCR) to read deep and shallow S0ix residency. PMC MMIO resources: o Lower 4kB: IPC1 (PMC inter-processor communication) interface o Upper 4kB: GCR (Global Control Registers) This enables the power management framework to take corrective actions when the platform fails to enter S0ix after kernel freeze as part of the suspend to idle flow. (echo freeze > /sys/power/state). This is expected to be used with a S0ix failsafe framework such as: [rajneesh: folded in "fix division in 32-bit case" from Andy Shevchenko] Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Shanth Murthy [andy: fixed kbuild error, removed "total" from variables, fixed macro] Signed-off-by: Andy Shevchenko arch/x86/include/asm/intel_pmc_ipc.h | 6 ++++ drivers/platform/x86/intel_pmc_ipc.c | 64 ++++++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 6 deletions(-) commit 8e4b8c7d7df78a2c8fe4ba0daf12fc877f353f5c Author: Andy Shevchenko Date: Wed Feb 8 17:33:01 2017 +0200 platform/x86: alienware-wmi: Remove header duplicate No need to #include twice. Remove second occurrence. Signed-off-by: Andy Shevchenko drivers/platform/x86/alienware-wmi.c | 1 - 1 file changed, 1 deletion(-) commit 25b4a38fcf1be7f425b3a9eb94998c35f5b763ee Author: Andy Shevchenko Date: Wed Feb 8 19:03:19 2017 +0200 platform/x86: intel_mid_powerbtn: Use SCU IPC directly On older Intel MID platforms is using SCU IPC library beneath MSIC calls. To make access unified between old and new platforms use SCU IPC library directly. It's safe since serialization is done in the library. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca45ba06885f9f3fa9a7e70296f99d9a4899dbf4 Author: Andy Shevchenko Date: Thu Feb 2 19:54:28 2017 +0200 platform/x86: intel_mid_powerbtn: Unify IRQ acknowledgment The IRQ on Intel Merrifield can be acknowledged in the similar way it's done for previous MID platforms. Unify acknowledgment via SCU IPC. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 44b46d739d3546188eb59f11e6888d77ebfcc3c1 Author: Vinod Koul Date: Sat Feb 25 04:12:40 2017 +0530 ALSA: hda - Add Geminilake PCI ID Geminilake is another Intel part, so need to add PCI ID for it. Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 9e314890292c0dd357eadef6a043704fa0b4c157 Merge: f8e6859 a4d4426 Author: Linus Torvalds Date: Fri Feb 24 18:37:03 2017 -0800 Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "Highlights include: - optimized memset and memcpy routines, ~20% boot time saving - support for cpu idling - adding support for l.swa and l.lwa atomic operations (in spec from 2014) - use atomics to implement: bitops, cmpxchg, futex - the atomics are in preparation for SMP support" * tag 'openrisc-for-linus' of git://github.com/openrisc/linux: (25 commits) openrisc: head: Init r0 to 0 on start openrisc: Export ioremap symbols used by modules arch/openrisc/lib/memcpy.c: use correct OR1200 option openrisc: head: Remove unused strings openrisc: head: Move init strings to rodata section openrisc: entry: Fix delay slot detection openrisc: entry: Whitespace and comment cleanups scripts/checkstack.pl: Add openrisc support MAINTAINERS: Add the openrisc official repository openrisc: Add .gitignore openrisc: Add optimized memcpy routine openrisc: Add optimized memset openrisc: Initial support for the idle state openrisc: Fix the bitmask for the unit present register openrisc: remove unnecessary stddef.h include openrisc: add futex_atomic_* implementations openrisc: add optimized atomic operations openrisc: add cmpxchg and xchg implementations openrisc: add atomic bitops openrisc: add l.lwa/l.swa emulation ... commit 95330473636e5e4546f94874c957c3be66bb2140 Author: Sven Eckelmann Date: Fri Feb 24 15:01:43 2017 -0800 checkpatch: remove false unbalanced braces warning Lines containing "} else {" should not be detected as unbalanced braces. But the second check can be reduced to ".+else\s*{" and it therefore never checked if the beginning of a line contains any other character (like the relevant "}"). This check would also return true for "} else {" and create warnings like CHECK: Unbalanced braces around else statement #391: FILE: ./net/batman-adv/tvlv.c:391: + } else { The check can be changed to check the whole line for the missing "}" to avoid this false positive. Fixes: 0d1532456c26 ("checkpatch: notice unbalanced else braces in a patch") Link: http://lkml.kernel.org/r/20170220121644.12209-1-sven@narfation.org Signed-off-by: Sven Eckelmann Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4c5babd32f974cf3db4b5bdb02f23132cc81afb Author: Joe Perches Date: Fri Feb 24 15:01:41 2017 -0800 checkpatch: notice unbalanced else braces in a patch Patches that add or modify code like } else or else { where one branch appears to have a brace and the other branch does not have a brace should emit a --strict style message. Link: http://lkml.kernel.org/r/c6be32747fc725cbc235802991746700a0f54fdc.1486754390.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 1bde561e471c964b57512008351ed75ead754b4b Author: Matthew Wilcox Date: Fri Feb 24 15:01:38 2017 -0800 checkpatch: add another old address for the FSF We still have a lot of old addresses for the FSF in the kernel. willy@harry:~/kernel/idr$ git grep '675 Mass' |wc -l 1502 willy@harry:~/kernel/idr$ git grep '59 Temple' |wc -l 2825 willy@harry:~/kernel/idr$ git grep '51 Franklin' |wc -l 2020 Let's discourage adding the oldest one too. Link: http://lkml.kernel.org/r/20170128173052.GA23532@bombadil.infradead.org Signed-off-by: Matthew Wilcox Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit 758d7aada73e6d6b609a0e2ec9f627a64a968ef5 Author: Miles Chen Date: Fri Feb 24 15:01:34 2017 -0800 checkpatch: update $logFunctions Currently checkpatch.pl does not recognize printk_deferred* functions as log functions and complains about the line length of printk_deferred* functions. Add printk_deferred* to logFunctions to fix it. Link: http://lkml.kernel.org/r/1484537124-18083-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45c55e92fcee992c05737e65ce0b1d7a36edde69 Author: Joe Perches Date: Fri Feb 24 15:01:31 2017 -0800 checkpatch: warn on logging continuations pr_cont(...) and printk(KERN_CONT ...) uses should be discouraged as their output can be interleaved by multiple logging processes. Link: http://lkml.kernel.org/r/7100ba00098694ec81471a299583ed068975fd05.1483465888.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 77cb8546bcd733c95bafe6b47481e5788e0e44d0 Author: Joe Perches Date: Fri Feb 24 15:01:28 2017 -0800 checkpatch: warn on embedded function names Embedded function names are less appropriate to use when refactoring can cause function renaming. Prefer the use of "%s", __func__ to embedded function names. Link: http://lkml.kernel.org/r/ac9631fdbac5af3507c5bfe88ad9064f0ed764ec.1483510416.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 69c78423b8f439b077929410bdf8f88e7031b891 Author: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Date: Fri Feb 24 15:01:25 2017 -0800 lib/lz4: remove back-compat wrappers Remove the functions introduced as wrappers for providing backwards compatibility to the prior LZ4 version. They're not needed anymore since there's no callers left. Link: http://lkml.kernel.org/r/1486321748-19085-6-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Bongkyu Kim Cc: Rui Salvaterra Cc: Sergey Senozhatsky Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: David S. Miller Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/lz4.h | 69 ------------------------------------------------ lib/lz4/lz4_compress.c | 22 --------------- lib/lz4/lz4_decompress.c | 42 ----------------------------- lib/lz4/lz4hc_compress.c | 23 ---------------- 4 files changed, 156 deletions(-) commit d21b5ff12df45a65bb220c7e8103a5f0f5609377 Author: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Date: Fri Feb 24 15:01:22 2017 -0800 fs/pstore: fs/squashfs: change usage of LZ4 to work with new LZ4 version Update fs/pstore and fs/squashfs to use the updated functions from the new LZ4 module. Link: http://lkml.kernel.org/r/1486321748-19085-5-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Bongkyu Kim Cc: Rui Salvaterra Cc: Sergey Senozhatsky Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: David S. Miller Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pstore/platform.c | 22 +++++++++++++--------- fs/squashfs/lz4_wrapper.c | 12 ++++++------ 2 files changed, 19 insertions(+), 15 deletions(-) commit 73a15ac6d5413caaee95979e318df58d4ee6d9a3 Author: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Date: Fri Feb 24 15:01:19 2017 -0800 crypto: change LZ4 modules to work with new LZ4 module version Update the crypto modules using LZ4 compression as well as the test cases in testmgr.h to work with the new LZ4 module version. Link: http://lkml.kernel.org/r/1486321748-19085-4-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Bongkyu Kim Cc: Rui Salvaterra Cc: Sergey Senozhatsky Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: David S. Miller Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds crypto/lz4.c | 23 ++++----- crypto/lz4hc.c | 23 ++++----- crypto/testmgr.h | 142 +++++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 120 insertions(+), 68 deletions(-) commit e23d54e48346e775be53b3cc25a95d65da960393 Author: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Date: Fri Feb 24 15:01:16 2017 -0800 lib/decompress_unlz4: change module to work with new LZ4 module version Update the unlz4 wrapper to work with the updated LZ4 kernel module version. Link: http://lkml.kernel.org/r/1486321748-19085-3-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Bongkyu Kim Cc: Rui Salvaterra Cc: Sergey Senozhatsky Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: David S. Miller Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/decompress_unlz4.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 4e1a33b105ddf201f66dcc44490c6086a25eca0b Author: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Date: Fri Feb 24 15:01:12 2017 -0800 lib: update LZ4 compressor module Patch series "Update LZ4 compressor module", v7. This patchset updates the LZ4 compression module to a version based on LZ4 v1.7.3 allowing to use the fast compression algorithm aka LZ4 fast which provides an "acceleration" parameter as a tradeoff between high compression ratio and high compression speed. We want to use LZ4 fast in order to support compression in lustre and (mostly, based on that) investigate data reduction techniques in behalf of storage systems. Also, it will be useful for other users of LZ4 compression, as with LZ4 fast it is possible to enable applications to use fast and/or high compression depending on the usecase. For instance, ZRAM is offering a LZ4 backend and could benefit from an updated LZ4 in the kernel. LZ4 homepage: http://www.lz4.org/ LZ4 source repository: https://github.com/lz4/lz4 Source version: 1.7.3 Benchmark (taken from [1], Core i5-4300U @1.9GHz): ----------------|--------------|----------------|---------- Compressor | Compression | Decompression | Ratio ----------------|--------------|----------------|---------- memcpy | 4200 MB/s | 4200 MB/s | 1.000 LZ4 fast 50 | 1080 MB/s | 2650 MB/s | 1.375 LZ4 fast 17 | 680 MB/s | 2220 MB/s | 1.607 LZ4 fast 5 | 475 MB/s | 1920 MB/s | 1.886 LZ4 default | 385 MB/s | 1850 MB/s | 2.101 [1] http://fastcompression.blogspot.de/2015/04/sampling-or-faster-lz4.html [PATCH 1/5] lib: Update LZ4 compressor module [PATCH 2/5] lib/decompress_unlz4: Change module to work with new LZ4 module version [PATCH 3/5] crypto: Change LZ4 modules to work with new LZ4 module version [PATCH 4/5] fs/pstore: fs/squashfs: Change usage of LZ4 to work with new LZ4 version [PATCH 5/5] lib/lz4: Remove back-compat wrappers This patch (of 5): Update the LZ4 kernel module to LZ4 v1.7.3 by Yann Collet. The kernel module is inspired by the previous work by Chanho Min. The updated LZ4 module will not break existing code since the patchset contains appropriate changes. API changes: New method LZ4_compress_fast which differs from the variant available in kernel by the new acceleration parameter, allowing to trade compression ratio for more compression speed and vice versa. LZ4_decompress_fast is the respective decompression method, featuring a very fast decoder (multiple GB/s per core), able to reach RAM speed in multi-core systems. The decompressor allows to decompress data compressed with LZ4 fast as well as the LZ4 HC (high compression) algorithm. Also the useful functions LZ4_decompress_safe_partial and LZ4_compress_destsize were added. The latter reverses the logic by trying to compress as much data as possible from source to dest while the former aims to decompress partial blocks of data. A bunch of streaming functions were also added which allow compressig/decompressing data in multiple steps (so called "streaming mode"). The methods lz4_compress and lz4_decompress_unknownoutputsize are now known as LZ4_compress_default respectivley LZ4_decompress_safe. The old methods will be removed since there's no callers left in the code. [arnd@arndb.de: fix KERNEL_LZ4 support] Link: http://lkml.kernel.org/r/20170208211946.2839649-1-arnd@arndb.de [akpm@linux-foundation.org: simplify] [akpm@linux-foundation.org: fix the simplification] [4sschmid@informatik.uni-hamburg.de: fix performance regressions] Link: http://lkml.kernel.org/r/1486898178-17125-2-git-send-email-4sschmid@informatik.uni-hamburg.de [4sschmid@informatik.uni-hamburg.de: v8] Link: http://lkml.kernel.org/r/1487182598-15351-2-git-send-email-4sschmid@informatik.uni-hamburg.de Link: http://lkml.kernel.org/r/1486321748-19085-2-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Signed-off-by: Arnd Bergmann Cc: Bongkyu Kim Cc: Rui Salvaterra Cc: Sergey Senozhatsky Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: David S. Miller Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/lz4.h | 762 +++++++++++++++++++++++++++--- lib/lz4/Makefile | 2 + lib/lz4/lz4_compress.c | 1161 +++++++++++++++++++++++++++++++++------------- lib/lz4/lz4_decompress.c | 705 ++++++++++++++++++---------- lib/lz4/lz4defs.h | 338 ++++++++------ lib/lz4/lz4hc_compress.c | 867 ++++++++++++++++++++++------------ 6 files changed, 2758 insertions(+), 1077 deletions(-) commit 8893f519330bb073a49c5b4676fce4be6f1be15d Author: Paul Gortmaker Date: Fri Feb 24 15:01:09 2017 -0800 lib/test_sort.c: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: lib/Kconfig.debug:config TEST_SORT lib/Kconfig.debug: bool "Array-based sort test" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the code there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering becomes slightly earlier when we change it to use subsys_initcall as done here. However, since it is a self contained test, this shouldn't be an issue and subsys_initcall seems like a better fit for this particular case. We also delete the MODULE_LICENSE tag since that information is now contained at the top of the file in the comments. Link: http://lkml.kernel.org/r/20170124225608.7319-1-paul.gortmaker@windriver.com Signed-off-by: Paul Gortmaker Cc: Kostenzer Felix Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_sort.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c5adae9583ef6985875532904160c6bf9f07b453 Author: Kostenzer Felix Date: Fri Feb 24 15:01:07 2017 -0800 lib: add CONFIG_TEST_SORT to enable self-test of sort() Along with the addition made to Kconfig.debug, the prior existing but permanently disabled test function has been slightly refactored. Patch has been tested using QEMU 2.1.2 with a .config obtained through 'make defconfig' (x86_64) and manually enabling the option. [arnd@arndb.de: move sort self-test into a separate file] Link: http://lkml.kernel.org/r/20170112110657.3123790-1-arnd@arndb.de Link: http://lkml.kernel.org/r/HE1PR09MB0394B0418D504DCD27167D4FD49B0@HE1PR09MB0394.eurprd09.prod.outlook.com Signed-off-by: Kostenzer Felix Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 8 ++++++++ lib/Makefile | 1 + lib/sort.c | 41 ++--------------------------------------- lib/test_sort.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 39 deletions(-) commit f231aebfc4cae2f6ed27a46a31e2630909513d77 Author: Kees Cook Date: Fri Feb 24 15:01:04 2017 -0800 rbtree: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Link: http://lkml.kernel.org/r/20161217010253.GA140470@beast Signed-off-by: Kees Cook Acked-by: Peter Zijlstra (Intel) Cc: David Howells Cc: Jie Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rbtree_augmented.h | 4 +++- lib/rbtree.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4f5901f5a6724f4ed1641e4a94978c5039a1f8c4 Author: Niklas Söderlund Date: Fri Feb 24 15:01:01 2017 -0800 linux/kernel.h: fix DIV_ROUND_CLOSEST to support negative divisors While working on a thermal driver I encounter a scenario where the divisor could be negative, instead of adding local code to handle this I though I first try to add support for this in DIV_ROUND_CLOSEST. Add support to DIV_ROUND_CLOSEST for negative divisors if both dividend and divisor variable types are signed. This should not alter current behavior for users of the macro as previously negative divisors where not supported. Before: DIV_ROUND_CLOSEST( 59, 4) = 15 DIV_ROUND_CLOSEST( 59, -4) = -14 DIV_ROUND_CLOSEST( -59, 4) = -15 DIV_ROUND_CLOSEST( -59, -4) = 14 After: DIV_ROUND_CLOSEST( 59, 4) = 15 DIV_ROUND_CLOSEST( 59, -4) = -15 DIV_ROUND_CLOSEST( -59, 4) = -15 DIV_ROUND_CLOSEST( -59, -4) = 15 [akpm@linux-foundation.org: fix comment, per Guenter] Link: http://lkml.kernel.org/r/20161222102217.29011-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Niklas Söderlund Reviewed-by: Guenter Roeck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e4afd2e5567fc5d59988025f7528f9b4794d86a5 Author: Matthew Wilcox Date: Fri Feb 24 15:00:58 2017 -0800 lib/find_bit.c: micro-optimise find_next_*_bit This saves 32 bytes on my x86-64 build, mostly due to alignment considerations and sharing more code between find_next_bit and find_next_zero_bit, but it does save a couple of instructions. There's really two parts to this commit: - First, the first half of the test: (!nbits || start >= nbits) is trivially a subset of the second half, since nbits and start are both unsigned - Second, while looking at the disassembly, I noticed that GCC was predicting the branch taken. Since this is a failure case, it's clearly the less likely of the two branches, so add an unlikely() to override GCC's heuristics. [mawilcox@microsoft.com: v2] Link: http://lkml.kernel.org/r/1483709016-1834-1-git-send-email-mawilcox@linuxonhyperv.com Link: http://lkml.kernel.org/r/1483709016-1834-1-git-send-email-mawilcox@linuxonhyperv.com Signed-off-by: Matthew Wilcox Acked-by: Yury Norov Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/find_bit.c | 4 ++-- tools/lib/find_bit.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 55ded9551f9a64f2872df77a954d4c30f8958e82 Author: Geert Uytterhoeven Date: Fri Feb 24 15:00:55 2017 -0800 lib: add module support to atomic64 tests Allow to compile the atomic64 test code either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/1483470276-10517-3-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 5 +++-- lib/atomic64_test.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) commit ba95b045e94fe15cace3a7d3a20fbedb2c6a817e Author: Geert Uytterhoeven Date: Fri Feb 24 15:00:52 2017 -0800 lib: add module support to glob tests Extract the glob test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/1483470276-10517-2-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig | 3 +- lib/Makefile | 1 + lib/glob.c | 164 ------------------------------------------------------- lib/globtest.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 166 deletions(-) commit 5fb7f87408f1534f2c3fadb876dc429cca601104 Author: Geert Uytterhoeven Date: Fri Feb 24 15:00:49 2017 -0800 lib: add module support to crc32 tests Extract the crc32 test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/1483470276-10517-1-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig | 3 +- lib/Makefile | 1 + lib/crc32.c | 824 ----------------------------------------------------- lib/crc32test.c | 856 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 858 insertions(+), 826 deletions(-) commit 738bc38d49e017fe7acb3596712518e22c225816 Author: Bhumika Goyal Date: Fri Feb 24 15:00:46 2017 -0800 kernel/ksysfs.c: add __ro_after_init to bin_attribute structure The object notes_attr of type bin_attribute is not modified after getting initailized by ksysfs_init. Apart from initialization in ksysfs_init it is also passed as an argument to the function sysfs_create_bin_file but this argument is of type const. Therefore, add __ro_after_init to its declaration. Link: http://lkml.kernel.org/r/1486839969-16891-1-git-send-email-bhumirks@gmail.com Signed-off-by: Bhumika Goyal Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ksysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e6daded1f51b79ff851b6c1e4b192f47ea3d063 Author: Viresh Kumar Date: Fri Feb 24 15:00:44 2017 -0800 kernel/notifier.c: simplify expression NOTIFY_STOP_MASK (0x8000) has only one bit set and there is no need to compare output of "ret & NOTIFY_STOP_MASK" to NOTIFY_STOP_MASK. We just need to make sure the output is non-zero, that's it. Link: http://lkml.kernel.org/r/88ee58264a2bfab1c97ffc8ac753e25f55f57c10.1483593065.git.viresh.kumar@linaro.org Signed-off-by: Viresh Kumar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/notifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c57b5808c625f4fc93da330b932647eaff321f7 Author: Yisheng Xie Date: Fri Feb 24 15:00:40 2017 -0800 mm balloon: umount balloon_mnt when removing vb device With CONFIG_BALLOON_COMPACTION=y the kernel will mount balloon_mnt for balloon page migration when we probe a virtio_balloon device. However we do not unmount it when removing the device. Fix this. Fixes: b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature") Link: http://lkml.kernel.org/r/1486531318-35189-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Acked-by: Minchan Kim Cc: Rafael Aquini Cc: Konstantin Khlebnikov Cc: Gioh Kim Cc: Vlastimil Babka Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Hanjun Guo Cc: Xishi Qiu Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/virtio/virtio_balloon.c | 4 ++++ 1 file changed, 4 insertions(+) commit 85caa95b9f19bb3a26d7e025d1134760b69e0c40 Author: Kees Cook Date: Fri Feb 24 15:00:38 2017 -0800 bug: switch data corruption check to __must_check The CHECK_DATA_CORRUPTION() macro was designed to have callers do something meaningful/protective on failure. However, using "return false" in the macro too strictly limits the design patterns of callers. Instead, let callers handle the logic test directly, but make sure that the result IS checked by forcing __must_check (which appears to not be able to be used directly on macro expressions). Link: http://lkml.kernel.org/r/20170206204547.GA125312@beast Signed-off-by: Kees Cook Suggested-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 12 +++++++----- lib/list_debug.c | 45 ++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 26 deletions(-) commit 849de0cd2c873c878fc2605156f10a8ade9bde28 Author: Gideon Israel Dsouza Date: Fri Feb 24 15:00:35 2017 -0800 m68k: replace gcc specific macros with ones from compiler.h There is which provides macros for various gcc specific constructs. Eg: __weak for __attribute__((weak)). I've cleaned all instances of gcc specific attributes with the right macros for all files under /arch/m68k Link: http://lkml.kernel.org/r/1485540901-1988-3-git-send-email-gidisrael@gmail.com Signed-off-by: Gideon Israel Dsouza Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m68k/68000/bootlogo-vz.h | 4 +++- arch/m68k/68000/bootlogo.h | 4 +++- arch/m68k/include/asm/MC68328.h | 3 ++- arch/m68k/include/asm/MC68EZ328.h | 3 ++- arch/m68k/include/asm/MC68VZ328.h | 2 +- arch/m68k/include/asm/natfeat.h | 3 ++- arch/m68k/lib/ashldi3.c | 8 ++++---- arch/m68k/lib/ashrdi3.c | 8 ++++---- arch/m68k/lib/lshrdi3.c | 8 ++++---- arch/m68k/lib/muldi3.c | 8 ++++---- 10 files changed, 29 insertions(+), 22 deletions(-) commit a3f0825e7e37d99a02a8a1b1599687667ee50d04 Author: Gideon Israel Dsouza Date: Fri Feb 24 15:00:32 2017 -0800 compiler-gcc.h: add a new macro to wrap gcc attribute Add __mode(x) into compiler-gcc.h as part of a cleanup task I've taken up, to replace gcc specific attributes with macros. The next patch is a cleanup of the m68k subsystem and it requires a new macro to wrap __attribute__ ((mode (...))) Link: http://lkml.kernel.org/r/1485540901-1988-2-git-send-email-gidisrael@gmail.com Signed-off-by: Gideon Israel Dsouza Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-gcc.h | 1 + 1 file changed, 1 insertion(+) commit 16f4e3195156f2f06e90d00a36bc48d7a513f253 Author: Masahiro Yamada Date: Fri Feb 24 15:00:29 2017 -0800 include/linux/iopoll.h: include instead of The timer APIs this header needs are ktime_get(), ktime_add_us(), and ktime_compare(). So, including seems enough. This commit will cut unnecessary header file parsing. Link: http://lkml.kernel.org/r/1481679225-10885-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/iopoll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca5eebb894a3625b2a543c7b550aa4ae33ba3cc Author: Mike Frysinger Date: Fri Feb 24 15:00:26 2017 -0800 uapi: mqueue.h: add missing linux/types.h include Commit 63159f5dcccb ("uapi: Use __kernel_long_t in struct mq_attr") changed the types from long to __kernel_long_t, but didn't add a linux/types.h include. Code that tries to include this header directly breaks: /usr/include/linux/mqueue.h:26:2: error: unknown type name '__kernel_long_t' __kernel_long_t mq_flags; /* message queue flags */ This also upsets configure tests for this header: checking linux/mqueue.h usability... no checking linux/mqueue.h presence... yes configure: WARNING: linux/mqueue.h: present but cannot be compiled configure: WARNING: linux/mqueue.h: check for missing prerequisite headers? configure: WARNING: linux/mqueue.h: see the Autoconf documentation configure: WARNING: linux/mqueue.h: section "Present But Cannot Be Compiled" configure: WARNING: linux/mqueue.h: proceeding with the compiler's result checking for linux/mqueue.h... no Link: http://lkml.kernel.org/r/20170119194644.4403-1-vapier@gentoo.org Signed-off-by: Mike Frysinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/mqueue.h | 2 ++ 1 file changed, 2 insertions(+) commit 796f571b0c5cf3efd2f652779770fa7bbbc2bb03 Author: Lafcadio Wluiki Date: Fri Feb 24 15:00:23 2017 -0800 procfs: use an enum for possible hidepid values Previously, the hidepid parameter was checked by comparing literal integers 0, 1, 2. Let's add a proper enum for this, to make the checking more expressive: 0 → HIDEPID_OFF 1 → HIDEPID_NO_ACCESS 2 → HIDEPID_INVISIBLE This changes the internal labelling only, the userspace-facing interface remains unmodified, and still works with literal integers 0, 1, 2. No functional changes. Link: http://lkml.kernel.org/r/1484572984-13388-2-git-send-email-djalal@gmail.com Signed-off-by: Lafcadio Wluiki Signed-off-by: Djalal Harouni Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 8 ++++---- fs/proc/inode.c | 2 +- fs/proc/root.c | 3 ++- include/linux/pid_namespace.h | 6 ++++++ 4 files changed, 13 insertions(+), 6 deletions(-) commit a0a07b87f3942fdee7692914b36576e009e2d434 Author: Alexey Dobriyan Date: Fri Feb 24 15:00:20 2017 -0800 proc: less code duplication in /proc/*/cmdline After staring at this code for a while I've figured using small 2-entry array describing ARGV and ENVP is the way to address code duplication critique. Link: http://lkml.kernel.org/r/20170105185724.GA12027@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 144 ++++++++++++++++++++++----------------------------------- 1 file changed, 56 insertions(+), 88 deletions(-) commit 4e4a7fb7b4574b4074e4097561c2e34a7333306f Author: Geliang Tang Date: Fri Feb 24 15:00:17 2017 -0800 proc: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Link: http://lkml.kernel.org/r/4fd1f82818665705ce75c5156a060ae7caa8e0a9.1482160150.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Cc: Jan Kara Cc: Al Viro Cc: "David S. Miller" Cc: Juergen Gross Cc: Dmitry Torokhov Cc: Seth Forshee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 35ca6953cac4a6d92c2d54e946a4e153d944b027 Author: Davidlohr Bueso Date: Fri Feb 24 15:00:14 2017 -0800 alpha: use generic current.h Given that the arch does not add its own implementations, simply use the asm-generic/current.h (generic-y) header instead of duplicating code. Link: http://lkml.kernel.org/r/1485992878-4780-2-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/Kbuild | 1 + arch/alpha/include/asm/current.h | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) commit 9ef5ea20134e72689b9877e787fa84ab67d77cc5 Author: Sudip Mukherjee Date: Fri Feb 24 15:00:11 2017 -0800 arch/frv/mb93090-mb00/pci-frv.c: fix build warning The build of frv defconfig gives warning: arch/frv/mb93090-mb00/pci-frv.c:176:5: warning: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result Just print an error message to silence the warning. We can not do much here on error. Link: http://lkml.kernel.org/r/1484256471-5379-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/mb93090-mb00/pci-frv.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0386bf385d9dbb277ff565765ac9d13fe36232d6 Author: Greg Thelen Date: Fri Feb 24 15:00:08 2017 -0800 kasan: add memcg kmem_cache test Make a kasan test which uses a SLAB_ACCOUNT slab cache. If the test is run within a non default memcg, then it uncovers the bug fixed by "kasan: drain quarantine of memcg slab objects"[1]. If run without fix [1] it shows "Slab cache still has objects", and the kmem_cache structure is leaked. Here's an unpatched kernel test: $ dmesg -c > /dev/null $ mkdir /sys/fs/cgroup/memory/test $ echo $$ > /sys/fs/cgroup/memory/test/tasks $ modprobe test_kasan 2> /dev/null $ dmesg | grep -B1 still [ 123.456789] kasan test: memcg_accounted_kmem_cache allocate memcg accounted object [ 124.456789] kmem_cache_destroy test_cache: Slab cache still has objects Kernels with fix [1] don't have the "Slab cache still has objects" warning or the underlying leak. The new test runs and passes in the default (root) memcg, though in the root memcg it won't uncover the problem fixed by [1]. Link: http://lkml.kernel.org/r/1482257462-36948-2-git-send-email-gthelen@google.com Signed-off-by: Greg Thelen Reviewed-by: Vladimir Davydov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit f9fa1d919c696e90c887d8742198023e7639d139 Author: Greg Thelen Date: Fri Feb 24 15:00:05 2017 -0800 kasan: drain quarantine of memcg slab objects Per memcg slab accounting and kasan have a problem with kmem_cache destruction. - kmem_cache_create() allocates a kmem_cache, which is used for allocations from processes running in root (top) memcg. - Processes running in non root memcg and allocating with either __GFP_ACCOUNT or from a SLAB_ACCOUNT cache use a per memcg kmem_cache. - Kasan catches use-after-free by having kfree() and kmem_cache_free() defer freeing of objects. Objects are placed in a quarantine. - kmem_cache_destroy() destroys root and non root kmem_caches. It takes care to drain the quarantine of objects from the root memcg's kmem_cache, but ignores objects associated with non root memcg. This causes leaks because quarantined per memcg objects refer to per memcg kmem cache being destroyed. To see the problem: 1) create a slab cache with kmem_cache_create(,,,SLAB_ACCOUNT,) 2) from non root memcg, allocate and free a few objects from cache 3) dispose of the cache with kmem_cache_destroy() kmem_cache_destroy() will trigger a "Slab cache still has objects" warning indicating that the per memcg kmem_cache structure was leaked. Fix the leak by draining kasan quarantined objects allocated from non root memcg. Racing memcg deletion is tricky, but handled. kmem_cache_destroy() => shutdown_memcg_caches() => __shutdown_memcg_cache() => shutdown_cache() flushes per memcg quarantined objects, even if that memcg has been rmdir'd and gone through memcg_deactivate_kmem_caches(). This leak only affects destroyed SLAB_ACCOUNT kmem caches when kasan is enabled. So I don't think it's worth patching stable kernels. Link: http://lkml.kernel.org/r/1482257462-36948-1-git-send-email-gthelen@google.com Signed-off-by: Greg Thelen Reviewed-by: Vladimir Davydov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 4 ++-- mm/kasan/kasan.c | 2 +- mm/kasan/quarantine.c | 1 + mm/slab_common.c | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) commit dc18d706a4367454ad1fc51e06148d54e8ecfaa0 Author: Nathan Fontenot Date: Fri Feb 24 15:00:02 2017 -0800 memory-hotplug: use dev_online for memhp_auto_online Commit 31bc3858ea3e ("add automatic onlining policy for the newly added memory") provides the capability to have added memory automatically onlined during add, but this appears to be slightly broken. The current implementation uses walk_memory_range() to call online_memory_block, which uses memory_block_change_state() to online the memory. Instead, we should be calling device_online() for the memory block in online_memory_block(). This would online the memory (the memory bus online routine memory_subsys_online() called from device_online calls memory_block_change_state()) and properly update the device struct offline flag. As a result of the current implementation, attempting to remove a memory block after adding it using auto online fails. This is because doing a remove, for instance echo offline > /sys/devices/system/memory/memoryXXX/state uses device_offline() which checks the dev->offline flag. Link: http://lkml.kernel.org/r/20170222220744.8119.19687.stgit@ltcalpine2-lp14.aus.stglabs.ibm.com Signed-off-by: Nathan Fontenot Cc: Michael Ellerman Cc: Michael Roth Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 2 +- include/linux/memory.h | 3 --- mm/memory_hotplug.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) commit dd8416c47715cf324c9a16f13273f9fda87acfed Author: Minchan Kim Date: Fri Feb 24 14:59:59 2017 -0800 mm: do not access page->mapping directly on page_endio With rw_page, page_endio is used for completing IO on a page and it propagates write error to the address space if the IO fails. The problem is it accesses page->mapping directly which might be okay for file-backed pages but it shouldn't for anonymous page. Otherwise, it can corrupt one of field from anon_vma under us and system goes panic randomly. swap_writepage bdev_writepage ops->rw_page I encountered the BUG during developing new zram feature and it was really hard to figure it out because it made random crash, somtime mmap_sem lockdep, sometime other places where places never related to zram/zsmalloc, and not reproducible with some configuration. When I consider how that bug is subtle and people do fast-swap test with brd, it's worth to add stable mark, I think. Fixes: dd6bd0d9c7db ("swap: use bdev_read_page() / bdev_write_page()") Signed-off-by: Minchan Kim Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9a8b300f2f7812ebf4630b8b40499da38b38e882 Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:56 2017 -0800 mm/thp/autonuma: use TNF flag instead of vm fault We are using the wrong flag value in task_numa_falt function. This can result in us doing wrong numa fault statistics update, because we update num_pages_migrate and numa_fault_locality etc based on the flag argument passed. Fixes: bae473a423 ("mm: introduce fault_env") Link: http://lkml.kernel.org/r/1487498395-9544-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Hillf Danton Acked-by: Kirill A. Shutemov Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db08f2030a173fdb95b2e8e28d82c4e8c04df2ac Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:53 2017 -0800 mm/gup: check for protnone only if it is a PTE entry Do the prot_none/FOLL_NUMA check after we are sure this is a THP pte. Archs can implement prot_none such that it can return true for regular pmd entries. Link: http://lkml.kernel.org/r/1487498326-8734-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Rik van Riel Cc: Mel Gorman Cc: Hillf Danton Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 199eaa05adc53825503a5303db624dd57397b93a Author: Miles Chen Date: Fri Feb 24 14:59:51 2017 -0800 mm: cleanups for printing phys_addr_t and dma_addr_t cleanup rest of dma_addr_t and phys_addr_t type casting in mm use %pad for dma_addr_t use %pa for phys_addr_t Link: http://lkml.kernel.org/r/1486618489-13912-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/dmapool.c | 16 ++++++++-------- mm/vmalloc.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit b538e422e41fd5ec8c059bde03d5504bb62bf0d1 Author: Yisheng Xie Date: Fri Feb 24 14:59:48 2017 -0800 mm/zsmalloc: fix comment in zsmalloc The class index and fullness group are not encoded in (first)page->mapping any more, after commit 3783689a1aa8 ("zsmalloc: introduce zspage structure"). Instead, they are store in struct zspage. Just delete this unneeded comment. Link: http://lkml.kernel.org/r/1486620822-36826-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Suggested-by: Sergey Senozhatsky Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nitin Gupta Cc: Hanjun Guo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 4 ---- 1 file changed, 4 deletions(-) commit ad69444e75d77981291ccf807f48d81e8fca010f Author: Wei Yang Date: Fri Feb 24 14:59:45 2017 -0800 mm/page_alloc.c: remove redundant init code for ZONE_MOVABLE arch_zone_lowest/highest_possible_pfn[] is set to 0 and [ZONE_MOVABLE] is skipped in the loop. No need to reset them to 0 again. This patch just removes the redundant code. Link: http://lkml.kernel.org/r/20170209141731.60208-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Anshuman Khandual Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) commit 22c5cef16278bf83aa54ac96a7735ce82f93524e Author: Yisheng Xie Date: Fri Feb 24 14:59:42 2017 -0800 mm/zsmalloc: remove redundant SetPagePrivate2 in create_page_chain We had used page->lru to link the component pages (except the first page) of a zspage, and used INIT_LIST_HEAD(&page->lru) to init it. Therefore, to get the last page's next page, which is NULL, we had to use page flag PG_Private_2 to identify it. But now, we use page->freelist to link all of the pages in zspage and init the page->freelist as NULL for last page, so no need to use PG_Private_2 anymore. This remove redundant SetPagePrivate2 in create_page_chain and ClearPagePrivate2 in reset_page(). Save a few cycles for migration of zsmalloc page :) Link: http://lkml.kernel.org/r/1487076509-49270-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e1587a4945408faa58d0485002c110eb2454740c Author: Vinayak Menon Date: Fri Feb 24 14:59:39 2017 -0800 mm: vmpressure: fix sending wrong events on underflow At the end of a window period, if the reclaimed pages is greater than scanned, an unsigned underflow can result in a huge pressure value and thus a critical event. Reclaimed pages is found to go higher than scanned because of the addition of reclaimed slab pages to reclaimed in shrink_node without a corresponding increment to scanned pages. Minchan Kim mentioned that this can also happen in the case of a THP page where the scanned is 1 and reclaimed could be 512. Link: http://lkml.kernel.org/r/1486641577-11685-1-git-send-email-vinmenon@codeaurora.org Signed-off-by: Vinayak Menon Acked-by: Minchan Kim Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Cc: Vlastimil Babka Cc: Rik van Riel Cc: Vladimir Davydov Cc: Anton Vorontsov Cc: Shiraz Hashim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmpressure.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 3a4f8a0b3ffa733ffbb327685e83b63383127cf6 Author: Hugh Dickins Date: Fri Feb 24 14:59:36 2017 -0800 mm: remove shmem_mapping() shmem_zero_setup() duplicates Remove the prototypes for shmem_mapping() and shmem_zero_setup() from linux/mm.h, since they are already provided in linux/shmem_fs.h. But shmem_fs.h must then provide the inline stub for shmem_mapping() when CONFIG_SHMEM is not set, and a few more cfiles now need to #include it. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1702081658250.1549@eggly.anvils Signed-off-by: Hugh Dickins Cc: Johannes Weiner Cc: Michal Simek Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/microblaze/pci/pci-common.c | 1 + arch/powerpc/kernel/pci-common.c | 1 + include/linux/mm.h | 10 ---------- include/linux/shmem_fs.h | 7 +++++++ mm/madvise.c | 1 + mm/memcontrol.c | 1 + mm/mincore.c | 1 + mm/truncate.c | 1 + mm/workingset.c | 1 + 9 files changed, 14 insertions(+), 10 deletions(-) commit e02dc017c3032dcdce1b993af0db135462e1b4b7 Author: Gavin Shan Date: Fri Feb 24 14:59:33 2017 -0800 mm/page_alloc: fix nodes for reclaim in fast path When @node_reclaim_node isn't 0, the page allocator tries to reclaim pages if the amount of free memory in the zones are below the low watermark. On Power platform, none of NUMA nodes are scanned for page reclaim because no nodes match the condition in zone_allows_reclaim(). On Power platform, RECLAIM_DISTANCE is set to 10 which is the distance of Node-A to Node-A. So the preferred node even won't be scanned for page reclaim. __alloc_pages_nodemask() get_page_from_freelist() zone_allows_reclaim() Anton proposed the test code as below: # cat alloc.c : int main(int argc, char *argv[]) { void *p; unsigned long size; unsigned long start, end; start = time(NULL); size = strtoul(argv[1], NULL, 0); printf("To allocate %ldGB memory\n", size); size <<= 30; p = malloc(size); assert(p); memset(p, 0, size); end = time(NULL); printf("Used time: %ld seconds\n", end - start); sleep(3600); return 0; } The system I use for testing has two NUMA nodes. Both have 128GB memory. In below scnario, the page caches on node#0 should be reclaimed when it encounters pressure to accommodate request of allocation. # echo 2 > /proc/sys/vm/zone_reclaim_mode; \ sync; \ echo 3 > /proc/sys/vm/drop_caches; \ # taskset -c 0 cat file.32G > /dev/null; \ grep FilePages /sys/devices/system/node/node0/meminfo Node 0 FilePages: 33619712 kB # taskset -c 0 ./alloc 128 # grep FilePages /sys/devices/system/node/node0/meminfo Node 0 FilePages: 33619840 kB # grep MemFree /sys/devices/system/node/node0/meminfo Node 0 MemFree: 186816 kB With the patch applied, the pagecache on node-0 is reclaimed when its free memory is running out. It's the expected behaviour. # echo 2 > /proc/sys/vm/zone_reclaim_mode; \ sync; \ echo 3 > /proc/sys/vm/drop_caches # taskset -c 0 cat file.32G > /dev/null; \ grep FilePages /sys/devices/system/node/node0/meminfo Node 0 FilePages: 33605568 kB # taskset -c 0 ./alloc 128 # grep FilePages /sys/devices/system/node/node0/meminfo Node 0 FilePages: 1379520 kB # grep MemFree /sys/devices/system/node/node0/meminfo Node 0 MemFree: 317120 kB Fixes: 5f7a75acdb24 ("mm: page_alloc: do not cache reclaim distances") Link: http://lkml.kernel.org/r/1486532455-29613-1-git-send-email-gwshan@linux.vnet.ibm.com Signed-off-by: Gavin Shan Acked-by: Mel Gorman Acked-by: Michal Hocko Cc: Anton Blanchard Cc: Michael Ellerman Cc: [3.16+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6d8c8a48291b929b2e039f220f0b62958cccfea Author: zhong jiang Date: Fri Feb 24 14:59:30 2017 -0800 mm/memory_hotplug.c: fix overflow in test_pages_in_a_zone() When mainline introduced commit a96dfddbcc04 ("base/memory, hotplug: fix a kernel oops in show_valid_zones()"), it obtained the valid start and end pfn from the given pfn range. The valid start pfn can fix the actual issue, but it introduced another issue. The valid end pfn will may exceed the given end_pfn. Although the incorrect overflow will not result in actual problem at present, but I think it need to be fixed. [toshi.kani@hpe.com: remove assumption that end_pfn is aligned by MAX_ORDER_NR_PAGES] Fixes: a96dfddbcc04 ("base/memory, hotplug: fix a kernel oops in show_valid_zones()") Link: http://lkml.kernel.org/r/1486467299-22648-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Signed-off-by: Toshi Kani Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e19d540d107ee897eb9a874844060c94e2376c0 Author: zhouxianrong Date: Fri Feb 24 14:59:27 2017 -0800 zram: extend zero pages to same element pages The idea is that without doing more calculations we extend zero pages to same element pages for zram. zero page is special case of same element page with zero element. 1. the test is done under android 7.0 2. startup too many applications circularly 3. sample the zero pages, same pages (none-zero element) and total pages in function page_zero_filled the result is listed as below: ZERO SAME TOTAL 36214 17842 598196 ZERO/TOTAL SAME/TOTAL (ZERO+SAME)/TOTAL ZERO/SAME AVERAGE 0.060631909 0.024990816 0.085622726 2.663825038 STDEV 0.00674612 0.005887625 0.009707034 2.115881328 MAX 0.069698422 0.030046087 0.094975336 7.56043956 MIN 0.03959586 0.007332205 0.056055193 1.928985507 from the above data, the benefit is about 2.5% and up to 3% of total swapout pages. The defect of the patch is that when we recovery a page from non-zero element the operations are low efficient for partial read. This patch extends zero_page to same_page so if there is any user to have monitored zero_pages, he will be surprised if the number is increased but it's not harmful, I believe. [minchan@kernel.org: do not free same element pages in zram_meta_free] Link: http://lkml.kernel.org/r/20170207065741.GA2567@bbox Link: http://lkml.kernel.org/r/1483692145-75357-1-git-send-email-zhouxianrong@huawei.com Link: http://lkml.kernel.org/r/1486307804-27903-1-git-send-email-minchan@kernel.org Signed-off-by: zhouxianrong Signed-off-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/blockdev/zram.txt | 6 +-- drivers/block/zram/zram_drv.c | 87 ++++++++++++++++++++++++++++------------- drivers/block/zram/zram_drv.h | 9 +++-- 3 files changed, 69 insertions(+), 33 deletions(-) commit 517663edd6b5d2a822469885994f34e092e2cf9f Author: Steven Rostedt (VMware) Date: Fri Feb 24 14:59:24 2017 -0800 mm/page-writeback.c: place "not" inside of unlikely() statement in wb_domain_writeout_inc() The likely/unlikely profiler noticed that the unlikely statement in wb_domain_writeout_inc() is constantly wrong. This is due to the "not" (!) being outside the unlikely statement. It is likely that dom->period_time will be set, but unlikely that it wont be. Move the not into the unlikely statement. Link: http://lkml.kernel.org/r/20170206120035.3c2e2b91@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c137a2757b88658ce61c74b25ff650ecda7f09d8 Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:21 2017 -0800 powerpc/mm/autonuma: switch ppc64 to its own implementation of saved write With this our protnone becomes a present pte with READ/WRITE/EXEC bit cleared. By default we also set _PAGE_PRIVILEGED on such pte. This is now used to help us identify a protnone pte that as saved write bit. For such pte, we will clear the _PAGE_PRIVILEGED bit. The pte still remain non-accessible from both user and kernel. [aneesh.kumar@linux.vnet.ibm.com: v3] Link: http://lkml.kernel.org/r/1487498625-10891-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1487050314-3892-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Cc: Rik van Riel Cc: Mel Gorman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/pgtable.h | 52 ++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 7 deletions(-) commit 595cd8f256d24face93b2722927ec9c980419c26 Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:19 2017 -0800 mm/ksm: handle protnone saved writes when making page write protect Without this KSM will consider the page write protected, but a numa fault can later mark the page writable. This can result in memory corruption. Link: http://lkml.kernel.org/r/1487498625-10891-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/pgtable.h | 8 ++++++++ mm/ksm.c | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 288bc54949fc2625a4fd811a188fb200cc498946 Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:16 2017 -0800 mm/autonuma: let architecture override how the write bit should be stashed in a protnone pte. Patch series "Numabalancing preserve write fix", v2. This patch series address an issue w.r.t THP migration and autonuma preserve write feature. migrate_misplaced_transhuge_page() cannot deal with concurrent modification of the page. It does a page copy without following the migration pte sequence. IIUC, this was done to keep the migration simpler and at the time of implemenation we didn't had THP page cache which would have required a more elaborate migration scheme. That means thp autonuma migration expect the protnone with saved write to be done such that both kernel and user cannot update the page content. This patch series enables archs like ppc64 to do that. We are good with the hash translation mode with the current code, because we never create a hardware page table entry for a protnone pte. This patch (of 2): Autonuma preserves the write permission across numa fault to avoid taking a writefault after a numa fault (Commit: b191f9b106ea " mm: numa: preserve PTE write permissions across a NUMA hinting fault"). Architecture can implement protnone in different ways and some may choose to implement that by clearing Read/ Write/Exec bit of pte. Setting the write bit on such pte can result in wrong behaviour. Fix this up by allowing arch to override how to save the write bit on a protnone pte. [aneesh.kumar@linux.vnet.ibm.com: don't mark pte saved write in case of dirty_accountable] Link: http://lkml.kernel.org/r/1487942884-16517-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com [aneesh.kumar@linux.vnet.ibm.com: v3] Link: http://lkml.kernel.org/r/1487498625-10891-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1487050314-3892-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Cc: Rik van Riel Cc: Mel Gorman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/pgtable.h | 16 ++++++++++++++++ mm/huge_memory.c | 6 +++--- mm/memory.c | 2 +- mm/mprotect.c | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) commit cee216a696b2004017a5ecb583366093d90b1568 Author: Aneesh Kumar K.V Date: Fri Feb 24 14:59:13 2017 -0800 mm/autonuma: don't use set_pte_at when updating protnone ptes Architectures like ppc64, use privilege access bit to mark pte non accessible. This implies that kernel can do a copy_to_user to an address marked for numa fault. This also implies that there can be a parallel hardware update for the pte. set_pte_at cannot be used in such scenarios. Hence switch the pte update to use ptep_get_and_clear and set_pte_at combination. [akpm@linux-foundation.org: remove unwanted ppc change, per Aneesh] Link: http://lkml.kernel.org/r/1486400776-28114-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Rik van Riel Acked-by: Mel Gorman Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 3f472cc978ea019c7b09cc03f90b8ed6034efdf8 Author: Steven Rostedt (VMware) Date: Fri Feb 24 14:59:10 2017 -0800 mm/shmem.c: fix unlikely() test of info->seals to test only for WRITE and GROW Running my likely/unlikely profiler, I discovered that the test in shmem_write_begin() that tests for info->seals as unlikely, is always incorrect. This is because shmem_get_inode() sets info->seals to have F_SEAL_SEAL set by default, and it is unlikely to be cleared when shmem_write_begin() is called. Thus, the if statement is very likely. But as the if statement block only cares about F_SEAL_WRITE and F_SEAL_GROW, change the test to only test those two bits. Link: http://lkml.kernel.org/r/20170203105656.7aec6237@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Acked-by: Hugh Dickins Cc: David Herrmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2f83143f1c67d186520b72b6cefbf0aa07a34ee Author: Mel Gorman Date: Fri Feb 24 14:59:07 2017 -0800 mm, vmscan: clear PGDAT_WRITEBACK when zone is balanced Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan: make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer cleared. It was not noticed as triggering it requires pages under writeback to cycle twice through the LRU and before kswapd gets stalled. Historically, such issues tended to occur on small machines writing heavily to slow storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may be higher but due to the fact that memory pressure is required, it would not be very noticable. Michal Hocko suggested removing the flag entirely but the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour and clear the flag when a suitable zone is balanced. Fixes: 1d82de618ddd ("mm, vmscan: make kswapd reclaim in terms of nodes") Link: http://lkml.kernel.org/r/20170203203222.gq7hk66yc36lpgtb@suse.de Signed-off-by: Mel Gorman Acked-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Minchan Kim Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 1 + 1 file changed, 1 insertion(+) commit 8f526e12426e284b7d5d659b6b2e8920fa7c9ed9 Author: Ross Zwisler Date: Fri Feb 24 14:59:04 2017 -0800 drm: remove unnecessary fault wrappers The fault wrappers drm_vm_fault(), drm_vm_shm_fault(), drm_vm_dma_fault() and drm_vm_sg_fault() used to provide extra logic beyond what was in the "drm_do_*" versions of these functions, but as of commit ca0b07d9a969 ("drm: convert drm from nopage to fault") they are just unnecessary wrappers that do nothing. Remove them, and rename the the drm_do_* fault handlers to remove the "do_" since they no longer have corresponding wrappers. Link: http://lkml.kernel.org/r/1486155698-25717-1-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Sean Paul Acked-by: Daniel Vetter Cc: Dave Jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/drm_vm.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) commit 166f61b9435a1b64bd46a08ec6cf1d6fc579a772 Author: Tobin C Harding Date: Fri Feb 24 14:59:01 2017 -0800 mm: codgin-style fixes Fix whitespace issues, extraneous braces. Link: http://lkml.kernel.org/r/1485992240-10986-5-git-send-email-me@tobin.cc Signed-off-by: Tobin C Harding Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 60 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) commit 7f2b6ce8e31ef843f5ece7fd302119d659b015f7 Author: Tobin C Harding Date: Fri Feb 24 14:58:59 2017 -0800 mm/memory.c: use NULL instead of literal 0 Patch fixes sparse warning: Using plain integer as NULL pointer. Replaces assignment of 0 to pointer with NULL assignment. Link: http://lkml.kernel.org/r/1485992240-10986-2-git-send-email-me@tobin.cc Signed-off-by: Tobin C Harding Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2bf14d14dbc50dc56be3ebd18652ea2738ef6f8 Author: Masanari Iida Date: Fri Feb 24 14:58:56 2017 -0800 mm/page_alloc.c: remove duplicate inclusion of page_ext.h Link: http://lkml.kernel.org/r/20170202011942.1609-1-standby24x7@gmail.com Signed-off-by: Masanari Iida Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 1 - 1 file changed, 1 deletion(-) commit 5d17a73a2ebeb8d1c6924b91e53ab2650fe86ffb Author: Michal Hocko Date: Fri Feb 24 14:58:53 2017 -0800 vmalloc: back off when the current task is killed __vmalloc_area_node() allocates pages to cover the requested vmalloc size. This can be a lot of memory. If the current task is killed by the OOM killer, and thus has an unlimited access to memory reserves, it can consume all the memory theoretically. Fix this by checking for fatal_signal_pending and back off early. Link: http://lkml.kernel.org/r/20170201092706.9966-4-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Christoph Hellwig Cc: Tetsuo Handa Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 5 +++++ 1 file changed, 5 insertions(+) commit dbe43d4d2837da3d11fd7f4e2ed1a395012fe6f5 Author: Jaewon Kim Date: Fri Feb 24 14:58:50 2017 -0800 mm: cma: print allocation failure reason and bitmap status There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, EINTR. But we did not know error reason so far. This patch prints the error value. Additionally if CONFIG_CMA_DEBUG is enabled, this patch shows bitmap status to know available pages. Actually CMA internally tries on all available regions because some regions can be failed because of EBUSY. Bitmap status is useful to know in detail on both ENONEM and EBUSY; ENOMEM: not tried at all because of no available region it could be too small total region or could be fragmentation issue EBUSY: tried some region but all failed This is an ENOMEM example with this patch. [2: Binder:714_1: 744] cma: cma_alloc: alloc failed, req-size: 256 pages, ret: -12 If CONFIG_CMA_DEBUG is enabled, avabile pages also will be shown as concatenated size@position format. So 4@572 means that there are 4 available pages at 572 position starting from 0 position. [2: Binder:714_1: 744] cma: number of available pages: 4@572+7@585+7@601+8@632+38@730+166@1114+127@1921=> 357 free of 2048 total pages Link: http://lkml.kernel.org/r/1485909785-3952-1-git-send-email-jaewon31.kim@samsung.com Signed-off-by: Jaewon Kim Acked-by: Michal Nazarewicz Cc: Laura Abbott Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit def5efe0376501ef7bd6b53ed061512c142e59aa Author: David Rientjes Date: Fri Feb 24 14:58:47 2017 -0800 mm, madvise: fail with ENOMEM when splitting vma will hit max_map_count If madvise(2) advice will result in the underlying vma being split and the number of areas mapped by the process will exceed /proc/sys/vm/max_map_count as a result, return ENOMEM instead of EAGAIN. EAGAIN is returned by madvise(2) when a kernel resource, such as slab, is temporarily unavailable. It indicates that userspace should retry the advice in the near future. This is important for advice such as MADV_DONTNEED which is often used by malloc implementations to free memory back to the system: we really do want to free memory back when madvise(2) returns EAGAIN because slab allocations (for vmas, anon_vmas, or mempolicies) cannot be allocated. Encountering /proc/sys/vm/max_map_count is not a temporary failure, however, so return ENOMEM to indicate this is a more serious issue. A followup patch to the man page will specify this behavior. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701241431120.42507@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Jonathan Corbet Cc: Johannes Weiner Cc: Jerome Marchand Cc: "Kirill A. Shutemov" Cc: Michael Kerrisk Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 4 ++-- Documentation/vm/ksm.txt | 4 ++++ include/linux/mm.h | 6 ++++-- mm/madvise.c | 51 +++++++++++++++++++++++++++++++++++++-------- mm/mmap.c | 8 +++---- 5 files changed, 56 insertions(+), 17 deletions(-) commit 712c604dcdf8186295e2af694adf52c6842ad100 Author: Lucas Stach Date: Fri Feb 24 14:58:44 2017 -0800 mm: wire up GFP flag passing in dma_alloc_from_contiguous The callers of the DMA alloc functions already provide the proper context GFP flags. Make sure to pass them through to the CMA allocator, to make the CMA compaction context aware. Link: http://lkml.kernel.org/r/20170127172328.18574-3-l.stach@pengutronix.de Signed-off-by: Lucas Stach Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Radim Krcmar Cc: Catalin Marinas Cc: Will Deacon Cc: Chris Zankel Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Alexander Graf Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/dma-mapping.c | 16 +++++++++------- arch/arm64/mm/dma-mapping.c | 4 ++-- arch/mips/mm/dma-default.c | 4 ++-- arch/x86/kernel/pci-dma.c | 3 ++- arch/xtensa/kernel/pci-dma.c | 3 ++- drivers/base/dma-contiguous.c | 5 +++-- drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/intel-iommu.c | 2 +- include/linux/dma-contiguous.h | 4 ++-- 9 files changed, 24 insertions(+), 19 deletions(-) commit e2f466e32f56c8b3ee0d1a40cc39e1c779dfd598 Author: Lucas Stach Date: Fri Feb 24 14:58:41 2017 -0800 mm: cma_alloc: allow to specify GFP mask Most users of this interface just want to use it with the default GFP_KERNEL flags, but for cases where DMA memory is allocated it may be called from a different context. No functional change yet, just passing through the flag to the underlying alloc_contig_range function. Link: http://lkml.kernel.org/r/20170127172328.18574-2-l.stach@pengutronix.de Signed-off-by: Lucas Stach Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Radim Krcmar Cc: Catalin Marinas Cc: Will Deacon Cc: Chris Zankel Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Alexander Graf Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kvm/book3s_hv_builtin.c | 3 ++- drivers/base/dma-contiguous.c | 2 +- include/linux/cma.h | 3 ++- mm/cma.c | 5 +++-- mm/cma_debug.c | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) commit ca96b625341027f611c3e61351a70311077ebcf5 Author: Lucas Stach Date: Fri Feb 24 14:58:37 2017 -0800 mm: alloc_contig_range: allow to specify GFP mask Currently alloc_contig_range assumes that the compaction should be done with the default GFP_KERNEL flags. This is probably right for all current uses of this interface, but may change as CMA is used in more use-cases (including being the default DMA memory allocator on some platforms). Change the function prototype, to allow for passing through the GFP mask set by upper layers. Also respect global restrictions by applying memalloc_noio_flags to the passed in flags. Link: http://lkml.kernel.org/r/20170127172328.18574-1-l.stach@pengutronix.de Signed-off-by: Lucas Stach Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Radim Krcmar Cc: Catalin Marinas Cc: Will Deacon Cc: Chris Zankel Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Alexander Graf Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- mm/cma.c | 3 ++- mm/hugetlb.c | 3 ++- mm/page_alloc.c | 5 +++-- 4 files changed, 8 insertions(+), 5 deletions(-) commit 5a02026d390ea1bb0c16a0e214e45613a3e3d885 Author: Mike Rapoport Date: Fri Feb 24 14:58:34 2017 -0800 userfaultfd: documentation update Add documentation about new userfaultfd features and events Link: http://lkml.kernel.org/r/1487716431-5551-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/userfaultfd.txt | 89 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 96333187ab16215888f2bce01985ca5a823da8ba Author: Mike Rapoport Date: Fri Feb 24 14:58:31 2017 -0800 userfaultfd_copy: return -ENOSPC in case mm has gone In the non-cooperative userfaultfd case, the process exit may race with outstanding mcopy_atomic called by the uffd monitor. Returning -ENOSPC instead of -EINVAL when mm is already gone will allow uffd monitor to distinguish this case from other error conditions. Link: http://lkml.kernel.org/r/1485542673-24387-6-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 ++ 1 file changed, 2 insertions(+) commit 27d02568f529e908399514dfbee8ee43bdfd5299 Author: Mike Rapoport Date: Fri Feb 24 14:58:28 2017 -0800 userfaultfd: mcopy_atomic: return -ENOENT when no compatible VMA found The memory mapping of a process may change between #PF event and the call to mcopy_atomic that comes to resolve the page fault. In such case, there will be no VMA covering the range passed to mcopy_atomic or the VMA will not have userfaultfd context. To allow uffd monitor to distinguish those case from other errors, let's return -ENOENT instead of -EINVAL. Note, that despite availability of UFFD_EVENT_UNMAP there still might be race between the processing of UFFD_EVENT_UNMAP and outstanding mcopy_atomic in case of non-cooperative uffd usage. [rppt@linux.vnet.ibm.com: update cases returning -ENOENT] Link: http://lkml.kernel.org/r/20170207150249.GA6709@rapoport-lnx [aarcange@redhat.com: merge fix] [akpm@linux-foundation.org: fix the merge fix] Link: http://lkml.kernel.org/r/1485542673-24387-5-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 58 +++++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit ca49ca7114553587736fe78319e22f073b631380 Author: Mike Rapoport Date: Fri Feb 24 14:58:25 2017 -0800 userfaultfd: non-cooperative: add event for exit() notification Allow userfaultfd monitor track termination of the processes that have memory backed by the uffd. [rppt@linux.vnet.ibm.com: add comment] Link: http://lkml.kernel.org/r/20170202135448.GB19804@rapoport-lnxLink: http://lkml.kernel.org/r/1485542673-24387-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 28 ++++++++++++++++++++++++++++ include/linux/userfaultfd_k.h | 7 +++++++ include/uapi/linux/userfaultfd.h | 5 ++++- kernel/exit.c | 2 ++ 4 files changed, 41 insertions(+), 1 deletion(-) commit 897ab3e0c49e24b62e2d54d165c7afec6bbca65b Author: Mike Rapoport Date: Fri Feb 24 14:58:22 2017 -0800 userfaultfd: non-cooperative: add event for memory unmaps When a non-cooperative userfaultfd monitor copies pages in the background, it may encounter regions that were already unmapped. Addition of UFFD_EVENT_UNMAP allows the uffd monitor to track precisely changes in the virtual memory layout. Since there might be different uffd contexts for the affected VMAs, we first should create a temporary representation for the unmap event for each uffd context and then notify them one by one to the appropriate userfault file descriptors. The event notification occurs after the mmap_sem has been released. [arnd@arndb.de: fix nommu build] Link: http://lkml.kernel.org/r/20170203165141.3665284-1-arnd@arndb.de [mhocko@suse.com: fix nommu build] Link: http://lkml.kernel.org/r/20170202091503.GA22823@dhcp22.suse.cz Link: http://lkml.kernel.org/r/1485542673-24387-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Signed-off-by: Michal Hocko Signed-off-by: Arnd Bergmann Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/kernel/vdso.c | 2 +- arch/tile/mm/elf.c | 2 +- arch/x86/entry/vdso/vma.c | 2 +- arch/x86/mm/mpx.c | 4 +-- fs/aio.c | 2 +- fs/proc/vmcore.c | 4 +-- fs/userfaultfd.c | 65 ++++++++++++++++++++++++++++++++++++++++ include/linux/mm.h | 14 +++++---- include/linux/userfaultfd_k.h | 18 +++++++++++ include/uapi/linux/userfaultfd.h | 3 ++ ipc/shm.c | 8 ++--- mm/mmap.c | 46 ++++++++++++++++++---------- mm/mremap.c | 23 ++++++++------ mm/nommu.c | 7 +++-- mm/util.c | 5 +++- 15 files changed, 160 insertions(+), 45 deletions(-) commit 846b1a0f1db065a8479159dd8fecddb1ebf30547 Author: Mike Rapoport Date: Fri Feb 24 14:58:19 2017 -0800 mm: call vm_munmap in munmap syscall instead of using open coded version Patch series "userfaultfd: non-cooperative: better tracking for mapping changes", v2. These patches try to address issues I've encountered during integration of userfaultfd with CRIU. Previously added userfaultfd events for fork(), madvise() and mremap() unfortunately do not cover all possible changes to a process virtual memory layout required for uffd monitor. When one or more VMAs is removed from the process mm, the external uffd monitor has no way to detect those changes and will attempt to fill the removed regions with userfaultfd_copy. Another problematic event is the exit() of the process. Here again, the external uffd monitor will try to use userfaultfd_copy, although mm owning the memory has already gone. The first patch in the series is a minor cleanup and it's not strictly related to the rest of the series. The patches 2 and 3 below add UFFD_EVENT_UNMAP and UFFD_EVENT_EXIT to allow the uffd monitor track changes in the memory layout of a process. The patches 4 and 5 amend error codes returned by userfaultfd_copy to make the uffd monitor able to cope with races that might occur between delivery of unmap and exit events and outstanding userfaultfd_copy's. This patch (of 5): Commit dc0ef0df7b6a ("mm: make mmap_sem for write waits killable for mm syscalls") replaced call to vm_munmap in munmap syscall with open coded version to allow different waits on mmap_sem in munmap syscall and vm_munmap. Now both functions use down_write_killable, so we can restore the call to vm_munmap from the munmap system call. Link: http://lkml.kernel.org/r/1485542673-24387-2-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 3fe87967c536e828bf1ea14b3ec3827d1101152e Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:16 2017 -0800 mm: convert remove_migration_pte() to use page_vma_mapped_walk() remove_migration_pte() also can easily be converted to page_vma_mapped_walk(). [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170129173858.45174-13-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 102 ++++++++++++++++++++++++----------------------------------- 1 file changed, 41 insertions(+), 61 deletions(-) commit d53a8b49a626fdfce4390710da6d04b4314db25f Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:13 2017 -0800 mm: drop page_check_address{,_transhuge} All users are gone. Let's drop them. Link: http://lkml.kernel.org/r/20170129173858.45174-12-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 36 -------------- mm/rmap.c | 138 --------------------------------------------------- 2 files changed, 174 deletions(-) commit 6a328a626f98bb856551e506cabc7c8b969aafa3 Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:10 2017 -0800 mm: convert page_mapped_in_vma() to use page_vma_mapped_walk() For consistency, it worth converting all page_check_address() to page_vma_mapped_walk(), so we could drop the former. Link: http://lkml.kernel.org/r/20170129173858.45174-11-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_vma_mapped.c | 30 ++++++++++++++++++++++++++++++ mm/rmap.c | 26 -------------------------- 2 files changed, 30 insertions(+), 26 deletions(-) commit 14fa2daa15887f9246cfedc345e83e8d24cb9058 Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:07 2017 -0800 mm, uprobes: convert __replace_page() to use page_vma_mapped_walk() For consistency, it worth converting all page_check_address() to page_vma_mapped_walk(), so we could drop the former. Link: http://lkml.kernel.org/r/20170129173858.45174-10-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Srikar Dronamraju Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/events/uprobes.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 36eaff3364e8cd35552a77ee426a8170f4f5fde9 Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:04 2017 -0800 mm, ksm: convert write_protect_page() to use page_vma_mapped_walk() For consistency, it worth converting all page_check_address() to page_vma_mapped_walk(), so we could drop the former. Link: http://lkml.kernel.org/r/20170129173858.45174-9-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit c7ab0d2fdc840266b39db94538f74207ec2afbf6 Author: Kirill A. Shutemov Date: Fri Feb 24 14:58:01 2017 -0800 mm: convert try_to_unmap_one() to use page_vma_mapped_walk() For consistency, it worth converting all page_check_address() to page_vma_mapped_walk(), so we could drop the former. It also makes freeze_page() as we walk though rmap only once. Link: http://lkml.kernel.org/r/20170129173858.45174-8-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 16 +--- mm/rmap.c | 260 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 137 insertions(+), 139 deletions(-) commit f27176cfc363d395eea8dc5c4a26e5d6d7d65eaf Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:57 2017 -0800 mm: convert page_mkclean_one() to use page_vma_mapped_walk() For consistency, it worth converting all page_check_address() to page_vma_mapped_walk(), so we could drop the former. PMD handling here is future-proofing, we don't have users yet. ext4 with huge pages will be the first. Link: http://lkml.kernel.org/r/20170129173858.45174-7-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 68 ++++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 23 deletions(-) commit a8fa41ad2f6f7ca08edd1afcf8149ae5a4dcf654 Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:54 2017 -0800 mm, rmap: check all VMAs that PTE-mapped THP can be part of Current rmap code can miss a VMA that maps PTE-mapped THP if the first suppage of the THP was unmapped from the VMA. We need to walk rmap for the whole range of offsets that THP covers, not only the first one. vma_address() also need to be corrected to check the range instead of the first subpage. Link: http://lkml.kernel.org/r/20170129173858.45174-6-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Hillf Danton Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 9 ++++++--- mm/rmap.c | 16 ++++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) commit 699fa216808fff47efc9743f92f1b8a9f9bf5321 Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:51 2017 -0800 mm: fix handling PTE-mapped THPs in page_idle_clear_pte_refs() For PTE-mapped THP page_check_address_transhuge() is not adequate: it cannot find all relevant PTEs, only the first one.i Let's switch it to page_vma_mapped_walk(). I don't think it's subject for stable@: it's not fatal. Link: http://lkml.kernel.org/r/20170129173858.45174-5-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Vladimir Davydov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_idle.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 8eaedede825a02dbe2420b9c9be9b5b2d7515496 Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:48 2017 -0800 mm: fix handling PTE-mapped THPs in page_referenced() For PTE-mapped THP page_check_address_transhuge() is not adequate: it cannot find all relevant PTEs, only the first one. It means we can miss some references of the page and it can result in suboptimal decisions by vmscan. Let's switch it to page_vma_mapped_walk(). I don't think it's subject for stable@: it's not fatal. The only side effect is that THP can be swapped out when it shouldn't. Link: http://lkml.kernel.org/r/20170129173858.45174-4-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 66 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 32 deletions(-) commit ace71a19cec5eb430207c3269d8a2683f0574306 Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:45 2017 -0800 mm: introduce page_vma_mapped_walk() Introduce a new interface to check if a page is mapped into a vma. It aims to address shortcomings of page_check_address{,_transhuge}. Existing interface is not able to handle PTE-mapped THPs: it only finds the first PTE. The rest lefted unnoticed. page_vma_mapped_walk() iterates over all possible mapping of the page in the vma. Link: http://lkml.kernel.org/r/20170129173858.45174-3-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 26 +++++++ mm/Makefile | 6 +- mm/huge_memory.c | 9 ++- mm/page_vma_mapped.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+), 5 deletions(-) commit c8394812e56fbc334d815226268cea69b447d461 Author: Kirill A. Shutemov Date: Fri Feb 24 14:57:42 2017 -0800 uprobes: split THPs before trying to replace them Patch series "Fix few rmap-related THP bugs", v3. The patchset fixes handing PTE-mapped THPs in page_referenced() and page_idle_clear_pte_refs(). To achieve that I've intrdocued new helper -- page_vma_mapped_walk() -- which replaces all page_check_address{,_transhuge}() and covers all THP cases. Patchset overview: - First patch fixes one uprobe bug (unrelated to the rest of the patchset, just spotted it at the same time); - Patches 2-5 fix handling PTE-mapped THPs in page_referenced(), page_idle_clear_pte_refs() and rmap core; - Patches 6-12 convert all page_check_address{,_transhuge}() users (plus remove_migration_pte()) to page_vma_mapped_walk() and drop unused helpers. I think the fixes are not critical enough for stable@ as they don't lead to crashes or hangs, only suboptimal behaviour. This patch (of 12): For THPs page_check_address() always fails. It leads to endless loop in uprobe_write_opcode(). Testcase with huge-tmpfs (uprobes cannot probe anonymous memory). mount -t debugfs none /sys/kernel/debug mount -t tmpfs -o huge=always none /mnt gcc -Wall -O2 -o /mnt/test -x c - < /sys/kernel/debug/tracing/uprobe_events echo 1 > /sys/kernel/debug/tracing/events/uprobes/enable /mnt/test Let's split THPs before trying to replace. Link: http://lkml.kernel.org/r/20170129173858.45174-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Rik van Riel Acked-by: Johannes Weiner Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Hillf Danton Cc: Srikar Dronamraju Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0efadf48bca01f17cb64ebceaf528590b2bc7665 Author: Yisheng Xie Date: Fri Feb 24 14:57:39 2017 -0800 mm/hotplug: enable memory hotplug for non-lru movable pages We had considered all of the non-lru pages as unmovable before commit bda807d44454 ("mm: migrate: support non-lru movable page migration"). But now some of non-lru pages like zsmalloc, virtio-balloon pages also become movable. So we can offline such blocks by using non-lru page migration. This patch straightforwardly adds non-lru migration code, which means adding non-lru related code to the functions which scan over pfn and collect pages to be migrated and isolate them before migration. Signed-off-by: Yisheng Xie Cc: Michal Hocko Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Vlastimil Babka Cc: Andi Kleen Cc: Hanjun Guo Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Reza Arbab Cc: Taku Izumi Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yisheng Xie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 28 +++++++++++++++++----------- mm/page_alloc.c | 8 ++++++-- 2 files changed, 23 insertions(+), 13 deletions(-) commit 85fbe5d1b50cf6f83b4123ca28d6fab84275824c Author: Yisheng Xie Date: Fri Feb 24 14:57:35 2017 -0800 HWPOISON: soft offlining for non-lru movable page Extend soft offlining framework to support non-lru page, which already support migration after commit bda807d44454 ("mm: migrate: support non-lru movable page migration") When memory corrected errors occur on a non-lru movable page, we can choose to stop using it by migrating data onto another page and disable the original (maybe half-broken) one. Link: http://lkml.kernel.org/r/1485867981-16037-4-git-send-email-ysxie@foxmail.com Signed-off-by: Yisheng Xie Suggested-by: Michal Hocko Suggested-by: Minchan Kim Reviewed-by: Minchan Kim Acked-by: Naoya Horiguchi Cc: Vlastimil Babka Cc: Andi Kleen Cc: Hanjun Guo Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Reza Arbab Cc: Taku Izumi Cc: Vitaly Kuznetsov Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit cbae0170e5329c79c0a36a81fedd2800146aca12 Author: Yisheng Xie Date: Fri Feb 24 14:57:32 2017 -0800 mm/migration: make isolate_movable_page always defined Define isolate_movable_page as a static inline function when CONFIG_MIGRATION is not enable. It should return -EBUSY here which means failed to isolate movable pages. This patch do not have any functional change but prepare for later patch. Link: http://lkml.kernel.org/r/1485867981-16037-3-git-send-email-ysxie@foxmail.com Signed-off-by: Yisheng Xie Acked-by: Minchan Kim Suggested-by: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Cc: Andi Kleen Cc: Hanjun Guo Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Reza Arbab Cc: Taku Izumi Cc: Vitaly Kuznetsov Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 2 ++ 1 file changed, 2 insertions(+) commit 9e5bcd610ffcedf5e485e78a72762810b25c7f25 Author: Yisheng Xie Date: Fri Feb 24 14:57:29 2017 -0800 mm/migration: make isolate_movable_page() return int type Patch series "HWPOISON: soft offlining for non-lru movable page", v6. After Minchan's commit bda807d44454 ("mm: migrate: support non-lru movable page migration"), some type of non-lru page like zsmalloc and virtio-balloon page also support migration. Therefore, we can: 1) soft offlining no-lru movable pages, which means when memory corrected errors occur on a non-lru movable page, we can stop to use it by migrating data onto another page and disable the original (maybe half-broken) one. 2) enable memory hotplug for non-lru movable pages, i.e. we may offline blocks, which include such pages, by using non-lru page migration. This patchset is heavily dependent on non-lru movable page migration. This patch (of 4): Change the return type of isolate_movable_page() from bool to int. It will return 0 when isolate movable page successfully, and return -EBUSY when it isolates failed. There is no functional change within this patch but prepare for later patch. [xieyisheng1@huawei.com: v6] Link: http://lkml.kernel.org/r/1486108770-630-2-git-send-email-xieyisheng1@huawei.com Link: http://lkml.kernel.org/r/1485867981-16037-2-git-send-email-ysxie@foxmail.com Signed-off-by: Yisheng Xie Suggested-by: Michal Hocko Acked-by: Minchan Kim Cc: Andi Kleen Cc: Hanjun Guo Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Naoya Horiguchi Cc: Reza Arbab Cc: Taku Izumi Cc: Vitaly Kuznetsov Cc: Vlastimil Babka Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 2 +- mm/compaction.c | 2 +- mm/migrate.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 5a27aa8220290b64cd5da066a1e29375aa867e69 Author: Vitaly Wool Date: Fri Feb 24 14:57:26 2017 -0800 z3fold: add kref refcounting With both coming and already present locking optimizations, introducing kref to reference-count z3fold objects is the right thing to do. Moreover, it makes buddied list no longer necessary, and allows for a simpler handling of headless pages. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170131214650.8ea78033d91ded233f552bc0@gmail.com Signed-off-by: Vitaly Wool Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 155 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 69 insertions(+), 86 deletions(-) commit 2f1e5e4d8430f365f979a818f515123a71b640ec Author: Vitaly Wool Date: Fri Feb 24 14:57:23 2017 -0800 z3fold: use per-page spinlock Most of z3fold operations are in-page, such as modifying z3fold page header or moving z3fold objects within a page. Taking per-pool spinlock to protect per-page objects is therefore suboptimal, and the idea of having a per-page spinlock (or rwlock) has been around for some time. This patch implements spinlock-based per-page locking mechanism which is lightweight enough to normally fit ok into the z3fold header. Link: http://lkml.kernel.org/r/20170131214438.433e0a5fda908337b63206d3@gmail.com Signed-off-by: Vitaly Wool Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 148 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 42 deletions(-) commit 1b096e5ae9f7181c770d59c6895f23a76c63adee Author: Vitaly Wool Date: Fri Feb 24 14:57:20 2017 -0800 z3fold: extend compaction function z3fold_compact_page() currently only handles the situation when there's a single middle chunk within the z3fold page. However it may be worth it to move middle chunk closer to either first or last chunk, whichever is there, if the gap between them is big enough. This patch adds the relevant code, using BIG_CHUNK_GAP define as a threshold for middle chunk to be worth moving. Link: http://lkml.kernel.org/r/20170131214334.c4f3eac9a477af0fa9a22c46@gmail.com Signed-off-by: Vitaly Wool Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit ede93213aab623b3343f1d7dcb03aebac0489357 Author: Vitaly Wool Date: Fri Feb 24 14:57:17 2017 -0800 z3fold: fix header size related issues Currently the whole kernel build will be stopped if the size of struct z3fold_header is greater than the size of one chunk, which is 64 bytes by default. This patch instead defines the offset for z3fold objects as the size of the z3fold header in chunks. Fixed also are the calculation of num_free_chunks() and the address to move the middle chunk to in case of in-page compaction in z3fold_compact_page(). Link: http://lkml.kernel.org/r/20170131214057.d98677032bc7b1c6c59a80c9@gmail.com Signed-off-by: Vitaly Wool Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 114 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 50 deletions(-) commit 12d59ae678242b383671abb7ffa3c94bb2d6c4de Author: Vitaly Wool Date: Fri Feb 24 14:57:15 2017 -0800 z3fold: make pages_nr atomic Convert pages_nr per-pool counter to atomic64_t. Link: http://lkml.kernel.org/r/20170131213946.b828676ab17bbea42022c213@gmail.com Signed-off-by: Vitaly Wool Reviewed-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 220ced1676c490c3192dd9bc1a06be86dee88a56 Author: Dan Williams Date: Fri Feb 24 14:57:12 2017 -0800 mm: fix get_user_pages() vs device-dax pud mappings A new unit test for the device-dax 1GB enabling currently fails with this warning before hanging the test thread: WARNING: CPU: 0 PID: 21 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x1e3/0x1f0 percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0 (0) after switching to atomic [..] CPU: 0 PID: 21 Comm: rcuos/1 Tainted: G O 4.10.0-rc7-next-20170207+ #944 [..] Call Trace: dump_stack+0x86/0xc3 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 ? rcu_nocb_kthread+0x27a/0x510 ? dax_pmem_percpu_exit+0x50/0x50 [dax_pmem] percpu_ref_switch_to_atomic_rcu+0x1e3/0x1f0 ? percpu_ref_exit+0x60/0x60 rcu_nocb_kthread+0x339/0x510 ? rcu_nocb_kthread+0x27a/0x510 kthread+0x101/0x140 The get_user_pages() path needs to arrange for references to be taken against the dev_pagemap instance backing the pud mapping. Refactor the existing __gup_device_huge_pmd() to also account for the pud case. Link: http://lkml.kernel.org/r/148653181153.38226.9605457830505509385.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: Dave Jiang Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Nilesh Choudhury Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/gup.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit c791ace1e747371658237f0d30234fef56c39669 Author: Dave Jiang Date: Fri Feb 24 14:57:08 2017 -0800 mm: replace FAULT_FLAG_SIZE with parameter to huge_fault Since the introduction of FAULT_FLAG_SIZE to the vm_fault flag, it has been somewhat painful with getting the flags set and removed at the correct locations. More than one kernel oops was introduced due to difficulties of getting the placement correctly. Remove the flag values and introduce an input parameter to huge_fault that indicates the size of the page entry. This makes the code easier to trace and should avoid the issues we see with the fault flags where removal of the flag was necessary in the fallback paths. Link: http://lkml.kernel.org/r/148615748258.43180.1690152053774975329.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang Tested-by: Dan Williams Reviewed-by: Jan Kara Cc: Matthew Wilcox Cc: Dave Hansen Cc: Vlastimil Babka Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Nilesh Choudhury Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax.c | 18 ++++++++++++------ fs/dax.c | 9 +++++---- fs/ext2/file.c | 2 +- fs/ext4/file.c | 12 +++++++++--- fs/xfs/xfs_file.c | 9 +++++---- include/linux/dax.h | 3 ++- include/linux/mm.h | 14 ++++++++------ mm/memory.c | 17 ++++------------- 8 files changed, 46 insertions(+), 38 deletions(-) commit 9557feee39b75ceb502b4777e08706df1ddf10ed Author: Dave Jiang Date: Fri Feb 24 14:57:05 2017 -0800 dax: support for transparent PUD pages for device DAX Add transparent huge PUD pages support for device DAX by adding a pud_fault handler. Link: http://lkml.kernel.org/r/148545060002.17912.6765687780007547551.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang Cc: Matthew Wilcox Cc: Dave Hansen Cc: Vlastimil Babka Cc: Jan Kara Cc: Dan Williams Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Nilesh Choudhury Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit a00cc7d9dd93d66a3fb83fc52aa57a4bec51c517 Author: Matthew Wilcox Date: Fri Feb 24 14:57:02 2017 -0800 mm, x86: add support for PUD-sized transparent hugepages The current transparent hugepage code only supports PMDs. This patch adds support for transparent use of PUDs with DAX. It does not include support for anonymous pages. x86 support code also added. Most of this patch simply parallels the work that was done for huge PMDs. The only major difference is how the new ->pud_entry method in mm_walk works. The ->pmd_entry method replaces the ->pte_entry method, whereas the ->pud_entry method works along with either ->pmd_entry or ->pte_entry. The pagewalk code takes care of locking the PUD before calling ->pud_walk, so handlers do not need to worry whether the PUD is stable. [dave.jiang@intel.com: fix SMP x86 32bit build for native_pud_clear()] Link: http://lkml.kernel.org/r/148719066814.31111.3239231168815337012.stgit@djiang5-desk3.ch.intel.com [dave.jiang@intel.com: native_pud_clear missing on i386 build] Link: http://lkml.kernel.org/r/148640375195.69754.3315433724330910314.stgit@djiang5-desk3.ch.intel.com Link: http://lkml.kernel.org/r/148545059381.17912.8602162635537598445.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Matthew Wilcox Signed-off-by: Dave Jiang Tested-by: Alexander Kapshuk Cc: Dave Hansen Cc: Vlastimil Babka Cc: Jan Kara Cc: Dan Williams Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Nilesh Choudhury Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 3 + arch/x86/Kconfig | 1 + arch/x86/include/asm/paravirt.h | 11 ++ arch/x86/include/asm/paravirt_types.h | 2 + arch/x86/include/asm/pgtable-2level.h | 17 +++ arch/x86/include/asm/pgtable-3level.h | 30 ++++ arch/x86/include/asm/pgtable.h | 140 +++++++++++++++++++ arch/x86/include/asm/pgtable_64.h | 15 ++ arch/x86/kernel/paravirt.c | 1 + arch/x86/mm/pgtable.c | 31 +++++ include/asm-generic/pgtable.h | 80 ++++++++++- include/asm-generic/tlb.h | 14 ++ include/linux/huge_mm.h | 83 +++++++++++- include/linux/mm.h | 30 +++- include/linux/mmu_notifier.h | 14 ++ include/linux/pfn_t.h | 12 ++ mm/gup.c | 7 + mm/huge_memory.c | 249 ++++++++++++++++++++++++++++++++++ mm/memory.c | 88 +++++++++++- mm/pagewalk.c | 20 ++- mm/pgtable-generic.c | 14 ++ 21 files changed, 844 insertions(+), 18 deletions(-) commit a2d581675d485eb7188f521f36efc114639a3096 Author: Dave Jiang Date: Fri Feb 24 14:56:59 2017 -0800 mm,fs,dax: change ->pmd_fault to ->huge_fault Patch series "1G transparent hugepage support for device dax", v2. The following series implements support for 1G trasparent hugepage on x86 for device dax. The bulk of the code was written by Mathew Wilcox a while back supporting transparent 1G hugepage for fs DAX. I have forward ported the relevant bits to 4.10-rc. The current submission has only the necessary code to support device DAX. Comments from Dan Williams: So the motivation and intended user of this functionality mirrors the motivation and users of 1GB page support in hugetlbfs. Given expected capacities of persistent memory devices an in-memory database may want to reduce tlb pressure beyond what they can already achieve with 2MB mappings of a device-dax file. We have customer feedback to that effect as Willy mentioned in his previous version of these patches [1]. [1]: https://lkml.org/lkml/2016/1/31/52 Comments from Nilesh @ Oracle: There are applications which have a process model; and if you assume 10,000 processes attempting to mmap all the 6TB memory available on a server; we are looking at the following: processes : 10,000 memory : 6TB pte @ 4k page size: 8 bytes / 4K of memory * #processes = 6TB / 4k * 8 * 10000 = 1.5GB * 80000 = 120,000GB pmd @ 2M page size: 120,000 / 512 = ~240GB pud @ 1G page size: 240GB / 512 = ~480MB As you can see with 2M pages, this system will use up an exorbitant amount of DRAM to hold the page tables; but the 1G pages finally brings it down to a reasonable level. Memory sizes will keep increasing; so this number will keep increasing. An argument can be made to convert the applications from process model to thread model, but in the real world that may not be always practical. Hopefully this helps explain the use case where this is valuable. This patch (of 3): In preparation for adding the ability to handle PUD pages, convert vm_operations_struct.pmd_fault to vm_operations_struct.huge_fault. The vm_fault structure is extended to include a union of the different page table pointers that may be needed, and three flag bits are reserved to indicate which type of pointer is in the union. [ross.zwisler@linux.intel.com: remove unused function ext4_dax_huge_fault()] Link: http://lkml.kernel.org/r/1485813172-7284-1-git-send-email-ross.zwisler@linux.intel.com [dave.jiang@intel.com: clear PMD or PUD size flags when in fall through path] Link: http://lkml.kernel.org/r/148589842696.5820.16078080610311444794.stgit@djiang5-desk3.ch.intel.com Link: http://lkml.kernel.org/r/148545058784.17912.6353162518188733642.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Matthew Wilcox Signed-off-by: Dave Jiang Signed-off-by: Ross Zwisler Cc: Dave Hansen Cc: Vlastimil Babka Cc: Jan Kara Cc: Dan Williams Cc: Kirill A. Shutemov Cc: Nilesh Choudhury Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Dave Jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax.c | 34 +++++++++++++--------------------- fs/dax.c | 45 ++++++++++++++++++++++++++++++++------------- fs/ext2/file.c | 2 +- fs/ext4/file.c | 23 +---------------------- fs/xfs/xfs_file.c | 10 +++++----- fs/xfs/xfs_trace.h | 2 +- include/linux/dax.h | 6 ------ include/linux/mm.h | 10 +++++++++- mm/memory.c | 18 ++++++++++++------ 9 files changed, 74 insertions(+), 76 deletions(-) commit bd233f538d51c2cae6f0bfc2cf7f0960e1683b8a Author: Mel Gorman Date: Fri Feb 24 14:56:56 2017 -0800 mm, page_alloc: use static global work_struct for draining per-cpu pages As suggested by Vlastimil Babka and Tejun Heo, this patch uses a static work_struct to co-ordinate the draining of per-cpu pages on the workqueue. Only one task can drain at a time but this is better than the previous scheme that allowed multiple tasks to send IPIs at a time. One consideration is whether parallel requests should synchronise against each other. This patch does not synchronise for a global drain as the common case for such callers is expected to be multiple parallel direct reclaimers competing for pages when the watermark is close to min. Draining the per-cpu list is unlikely to make much progress and serialising the drain is of dubious merit. Drains are synchonrised for callers such as memory hotplug and CMA that care about the drain being complete when the function returns. Link: http://lkml.kernel.org/r/20170125083038.rzb5f43nptmk7aed@techsingularity.net Signed-off-by: Mel Gorman Suggested-by: Tejun Heo Suggested-by: Vlastimil Babka Acked-by: Vlastimil Babka Acked-by: Hillf Danton Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 5104782011a12b04fe9cfaa6f1085bdcdedd79c4 Author: Vlastimil Babka Date: Fri Feb 24 14:56:53 2017 -0800 mm, page_alloc: don't check cpuset allowed twice in fast-path Since commit 682a3385e773 ("mm, page_alloc: inline the fast path of the zonelist iterator") we replace a NULL nodemask with cpuset_current_mems_allowed in the fast path, so that get_page_from_freelist() filters nodes allowed by the cpuset via for_next_zone_zonelist_nodemask(). In that case it's pointless to additionaly check __cpuset_zone_allowed() in each iteration, which we can avoid by not adding ALLOC_CPUSET to alloc_flags in that scenario. This saves some cycles in the allocator fast path on systems with one or more non-root cpuset configured. In the slow path, ALLOC_CPUSET is reset according to __alloc_pages_slowpath(). Without configured cpusets, this code is disabled by a static key. Link: http://lkml.kernel.org/r/20170124150511.5710-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df76cee6bbeb2ed036f1622f63a99c28cecf6b30 Author: Vlastimil Babka Date: Fri Feb 24 14:56:50 2017 -0800 mm, page_alloc: remove redundant checks from alloc fastpath The allocation fast path contains two similar checks for zoneref->zone being NULL, where zoneref points either to the first zone in the zonelist, or to the preferred zone. These can be NULL either due to empty zonelist, or no zone being compatible with given nodemask or task's cpuset. These checks are unnecessary, because the zonelist walks in first_zones_zonelist() and get_page_from_freelist() handle a NULL starting zoneref->zone or preferred_zoneref->zone safely. It's safe to fallback to __alloc_pages_slowpath() where we also have the check early enough. Link: http://lkml.kernel.org/r/20170124150511.5710-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Michal Hocko Cc: Anshuman Khandual Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 18 ------------------ 1 file changed, 18 deletions(-) commit a09759acaacf6cf738e1bc6c66d41485c87fd371 Author: Minchan Kim Date: Fri Feb 24 14:56:47 2017 -0800 zram: remove waitqueue for IO done zram_reset_device() waits for ongoing writepage pages to be completed by zram->refcount logic. However, it's pointless because before the reset, we prevent further opening of zram by zram->claim and flush all of pending IO by fsync_bdev so there should be no pending IO at the zram_reset_device(). So let's remove that code which is even broken due to the lack of wake_up elsewhere. Link: http://lkml.kernel.org/r/1485145031-11661-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 40 +++------------------------------------- drivers/block/zram/zram_drv.h | 3 --- 2 files changed, 3 insertions(+), 40 deletions(-) commit 3edf41d84587701db4650276262d1b71fdf20d9f Author: seokhoon.yoon Date: Fri Feb 24 14:56:44 2017 -0800 mm: fix comments for mmap_init() mmap_init() is no longer associated with VMA slab. So fix it. Link: http://lkml.kernel.org/r/1485182601-9294-1-git-send-email-iamyooon@gmail.com Signed-off-by: seokhoon.yoon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- mm/nommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 11bac80004499ea59f361ef2a5516c84b6eab675 Author: Dave Jiang Date: Fri Feb 24 14:56:41 2017 -0800 mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf ->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. [arnd@arndb.de: fix ARM build] Link: http://lkml.kernel.org/r/20170125223558.1451224-1-arnd@arndb.de Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang Signed-off-by: Arnd Bergmann Reviewed-by: Ross Zwisler Cc: Theodore Ts'o Cc: Darrick J. Wong Cc: Matthew Wilcox Cc: Dave Hansen Cc: Christoph Hellwig Cc: Jan Kara Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kvm/book3s_64_vio.c | 4 +-- arch/powerpc/platforms/cell/spufs/file.c | 39 ++++++++++++------------ drivers/android/binder.c | 2 +- drivers/char/agp/alpha-agp.c | 5 ++- drivers/char/mspec.c | 6 ++-- drivers/dax/dax.c | 12 ++++---- drivers/gpu/drm/armada/armada_gem.c | 9 +++--- drivers/gpu/drm/drm_vm.c | 32 ++++++++++--------- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 3 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 +- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 3 +- drivers/gpu/drm/gma500/gem.c | 3 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 4 +-- drivers/gpu/drm/msm/msm_drv.h | 2 +- drivers/gpu/drm/msm/msm_gem.c | 3 +- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 +-- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 6 ++-- drivers/gpu/drm/tegra/gem.c | 3 +- drivers/gpu/drm/ttm/ttm_bo_vm.c | 10 +++--- drivers/gpu/drm/udl/udl_drv.h | 2 +- drivers/gpu/drm/udl/udl_gem.c | 3 +- drivers/gpu/drm/vgem/vgem_drv.c | 3 +- drivers/gpu/drm/virtio/virtgpu_ttm.c | 7 ++--- drivers/hsi/clients/cmt_speech.c | 4 +-- drivers/hwtracing/intel_th/msu.c | 6 ++-- drivers/infiniband/hw/hfi1/file_ops.c | 4 +-- drivers/infiniband/hw/qib/qib_file_ops.c | 2 +- drivers/media/v4l2-core/videobuf-dma-sg.c | 3 +- drivers/misc/cxl/context.c | 3 +- drivers/misc/sgi-gru/grumain.c | 3 +- drivers/misc/sgi-gru/grutables.h | 2 +- drivers/scsi/cxlflash/superpipe.c | 6 ++-- drivers/scsi/sg.c | 3 +- drivers/staging/android/ion/ion.c | 6 ++-- drivers/staging/lustre/lustre/llite/llite_mmap.c | 7 +++-- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/target/target_core_user.c | 6 ++-- drivers/uio/uio.c | 6 ++-- drivers/usb/mon/mon_bin.c | 4 +-- drivers/video/fbdev/core/fb_defio.c | 16 +++++----- drivers/xen/privcmd.c | 4 +-- fs/9p/vfs_file.c | 4 +-- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 6 ++-- fs/ceph/addr.c | 8 +++-- fs/cifs/file.c | 2 +- fs/dax.c | 15 ++++----- fs/ext2/file.c | 17 +++++------ fs/ext4/ext4.h | 4 +-- fs/ext4/file.c | 17 +++++------ fs/ext4/inode.c | 9 +++--- fs/f2fs/file.c | 7 ++--- fs/fuse/file.c | 6 ++-- fs/gfs2/file.c | 8 ++--- fs/iomap.c | 5 ++- fs/kernfs/file.c | 13 ++++---- fs/ncpfs/mmap.c | 7 ++--- fs/nfs/file.c | 4 +-- fs/nilfs2/file.c | 3 +- fs/ocfs2/mmap.c | 15 ++++----- fs/proc/vmcore.c | 4 +-- fs/ubifs/file.c | 5 ++- fs/xfs/xfs_file.c | 25 +++++++-------- include/linux/dax.h | 5 ++- include/linux/iomap.h | 3 +- include/linux/mm.h | 10 +++--- ipc/shm.c | 6 ++-- kernel/events/core.c | 6 ++-- kernel/relay.c | 4 +-- mm/filemap.c | 19 ++++++------ mm/hugetlb.c | 2 +- mm/memory.c | 6 ++-- mm/mmap.c | 9 +++--- mm/nommu.c | 2 +- mm/shmem.c | 3 +- security/selinux/selinuxfs.c | 5 ++- sound/core/pcm_native.c | 15 ++++----- sound/usb/usx2y/us122l.c | 5 ++- sound/usb/usx2y/usX2Yhwdep.c | 7 ++--- sound/usb/usx2y/usx2yhwdeppcm.c | 5 ++- virt/kvm/kvm_main.c | 4 +-- 87 files changed, 283 insertions(+), 290 deletions(-) commit 374ad05ab64d696303cec5cc8ec3a65d457b7b1c Author: Mel Gorman Date: Fri Feb 24 14:56:38 2017 -0800 mm, page_alloc: only use per-cpu allocator for irq-safe requests Many workloads that allocate pages are not handling an interrupt at a time. As allocation requests may be from IRQ context, it's necessary to disable/enable IRQs for every page allocation. This cost is the bulk of the free path but also a significant percentage of the allocation path. This patch alters the locking and checks such that only irq-safe allocation requests use the per-cpu allocator. All others acquire the irq-safe zone->lock and allocate from the buddy allocator. It relies on disabling preemption to safely access the per-cpu structures. It could be slightly modified to avoid soft IRQs using it but it's not clear it's worthwhile. This modification may slow allocations from IRQ context slightly but the main gain from the per-cpu allocator is that it scales better for allocations from multiple contexts. There is an implicit assumption that intensive allocations from IRQ contexts on multiple CPUs from a single NUMA node are rare and that the fast majority of scaling issues are encountered in !IRQ contexts such as page faulting. It's worth noting that this patch is not required for a bulk page allocator but it significantly reduces the overhead. The following is results from a page allocator micro-benchmark. Only order-0 is interesting as higher orders do not use the per-cpu allocator 4.10.0-rc2 4.10.0-rc2 vanilla irqsafe-v1r5 Amean alloc-odr0-1 287.15 ( 0.00%) 219.00 ( 23.73%) Amean alloc-odr0-2 221.23 ( 0.00%) 183.23 ( 17.18%) Amean alloc-odr0-4 187.00 ( 0.00%) 151.38 ( 19.05%) Amean alloc-odr0-8 167.54 ( 0.00%) 132.77 ( 20.75%) Amean alloc-odr0-16 156.00 ( 0.00%) 123.00 ( 21.15%) Amean alloc-odr0-32 149.00 ( 0.00%) 118.31 ( 20.60%) Amean alloc-odr0-64 138.77 ( 0.00%) 116.00 ( 16.41%) Amean alloc-odr0-128 145.00 ( 0.00%) 118.00 ( 18.62%) Amean alloc-odr0-256 136.15 ( 0.00%) 125.00 ( 8.19%) Amean alloc-odr0-512 147.92 ( 0.00%) 121.77 ( 17.68%) Amean alloc-odr0-1024 147.23 ( 0.00%) 126.15 ( 14.32%) Amean alloc-odr0-2048 155.15 ( 0.00%) 129.92 ( 16.26%) Amean alloc-odr0-4096 164.00 ( 0.00%) 136.77 ( 16.60%) Amean alloc-odr0-8192 166.92 ( 0.00%) 138.08 ( 17.28%) Amean alloc-odr0-16384 159.00 ( 0.00%) 138.00 ( 13.21%) Amean free-odr0-1 165.00 ( 0.00%) 89.00 ( 46.06%) Amean free-odr0-2 113.00 ( 0.00%) 63.00 ( 44.25%) Amean free-odr0-4 99.00 ( 0.00%) 54.00 ( 45.45%) Amean free-odr0-8 88.00 ( 0.00%) 47.38 ( 46.15%) Amean free-odr0-16 83.00 ( 0.00%) 46.00 ( 44.58%) Amean free-odr0-32 80.00 ( 0.00%) 44.38 ( 44.52%) Amean free-odr0-64 72.62 ( 0.00%) 43.00 ( 40.78%) Amean free-odr0-128 78.00 ( 0.00%) 42.00 ( 46.15%) Amean free-odr0-256 80.46 ( 0.00%) 57.00 ( 29.16%) Amean free-odr0-512 96.38 ( 0.00%) 64.69 ( 32.88%) Amean free-odr0-1024 107.31 ( 0.00%) 72.54 ( 32.40%) Amean free-odr0-2048 108.92 ( 0.00%) 78.08 ( 28.32%) Amean free-odr0-4096 113.38 ( 0.00%) 82.23 ( 27.48%) Amean free-odr0-8192 112.08 ( 0.00%) 82.85 ( 26.08%) Amean free-odr0-16384 110.38 ( 0.00%) 81.92 ( 25.78%) Amean total-odr0-1 452.15 ( 0.00%) 308.00 ( 31.88%) Amean total-odr0-2 334.23 ( 0.00%) 246.23 ( 26.33%) Amean total-odr0-4 286.00 ( 0.00%) 205.38 ( 28.19%) Amean total-odr0-8 255.54 ( 0.00%) 180.15 ( 29.50%) Amean total-odr0-16 239.00 ( 0.00%) 169.00 ( 29.29%) Amean total-odr0-32 229.00 ( 0.00%) 162.69 ( 28.96%) Amean total-odr0-64 211.38 ( 0.00%) 159.00 ( 24.78%) Amean total-odr0-128 223.00 ( 0.00%) 160.00 ( 28.25%) Amean total-odr0-256 216.62 ( 0.00%) 182.00 ( 15.98%) Amean total-odr0-512 244.31 ( 0.00%) 186.46 ( 23.68%) Amean total-odr0-1024 254.54 ( 0.00%) 198.69 ( 21.94%) Amean total-odr0-2048 264.08 ( 0.00%) 208.00 ( 21.24%) Amean total-odr0-4096 277.38 ( 0.00%) 219.00 ( 21.05%) Amean total-odr0-8192 279.00 ( 0.00%) 220.92 ( 20.82%) Amean total-odr0-16384 269.38 ( 0.00%) 219.92 ( 18.36%) This is the alloc, free and total overhead of allocating order-0 pages in batches of 1 page up to 16384 pages. Avoiding disabling/enabling overhead massively reduces overhead. Alloc overhead is roughly reduced by 14-20% in most cases. The free path is reduced by 26-46% and the total reduction is significant. Many users require zeroing of pages from the page allocator which is the vast cost of allocation. Hence, the impact on a basic page faulting benchmark is not that significant 4.10.0-rc2 4.10.0-rc2 vanilla irqsafe-v1r5 Hmean page_test 656632.98 ( 0.00%) 675536.13 ( 2.88%) Hmean brk_test 3845502.67 ( 0.00%) 3867186.94 ( 0.56%) Stddev page_test 10543.29 ( 0.00%) 4104.07 ( 61.07%) Stddev brk_test 33472.36 ( 0.00%) 15538.39 ( 53.58%) CoeffVar page_test 1.61 ( 0.00%) 0.61 ( 62.15%) CoeffVar brk_test 0.87 ( 0.00%) 0.40 ( 53.84%) Max page_test 666513.33 ( 0.00%) 678640.00 ( 1.82%) Max brk_test 3882800.00 ( 0.00%) 3887008.66 ( 0.11%) This is from aim9 and the most notable outcome is that fault variability is reduced by the patch. The headline improvement is small as the overall fault cost, zeroing, page table insertion etc dominate relative to disabling/enabling IRQs in the per-cpu allocator. Similarly, little benefit was seen on networking benchmarks both localhost and between physical server/clients where other costs dominate. It's possible that this will only be noticable on very high speed networks. Jesper Dangaard Brouer independently tested this with a separate microbenchmark from https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/bench Micro-benchmarked with [1] page_bench02: modprobe page_bench02 page_order=0 run_flags=$((2#010)) loops=$((10**8)); \ rmmod page_bench02 ; dmesg --notime | tail -n 4 Compared to baseline: 213 cycles(tsc) 53.417 ns - against this : 184 cycles(tsc) 46.056 ns - Saving : -29 cycles - Very close to expected 27 cycles saving [see below [2]] Micro benchmarking via time_bench_sample[3], we get the cost of these operations: time_bench: Type:for_loop Per elem: 0 cycles(tsc) 0.232 ns (step:0) time_bench: Type:spin_lock_unlock Per elem: 33 cycles(tsc) 8.334 ns (step:0) time_bench: Type:spin_lock_unlock_irqsave Per elem: 62 cycles(tsc) 15.607 ns (step:0) time_bench: Type:irqsave_before_lock Per elem: 57 cycles(tsc) 14.344 ns (step:0) time_bench: Type:spin_lock_unlock_irq Per elem: 34 cycles(tsc) 8.560 ns (step:0) time_bench: Type:simple_irq_disable_before_lock Per elem: 37 cycles(tsc) 9.289 ns (step:0) time_bench: Type:local_BH_disable_enable Per elem: 19 cycles(tsc) 4.920 ns (step:0) time_bench: Type:local_IRQ_disable_enable Per elem: 7 cycles(tsc) 1.864 ns (step:0) time_bench: Type:local_irq_save_restore Per elem: 38 cycles(tsc) 9.665 ns (step:0) [Mel's patch removes a ^^^^^^^^^^^^^^^^] ^^^^^^^^^ expected saving - preempt cost time_bench: Type:preempt_disable_enable Per elem: 11 cycles(tsc) 2.794 ns (step:0) [adds a preempt ^^^^^^^^^^^^^^^^^^^^^^] ^^^^^^^^^ adds this cost time_bench: Type:funcion_call_cost Per elem: 6 cycles(tsc) 1.689 ns (step:0) time_bench: Type:func_ptr_call_cost Per elem: 11 cycles(tsc) 2.767 ns (step:0) time_bench: Type:page_alloc_put Per elem: 211 cycles(tsc) 52.803 ns (step:0) Thus, expected improvement is: 38-11 = 27 cycles. [mgorman@techsingularity.net: s/preempt_enable_no_resched/preempt_enable/] Link: http://lkml.kernel.org/r/20170208143128.25ahymqlyspjcixu@techsingularity.net Link: http://lkml.kernel.org/r/20170123153906.3122-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Hillf Danton Acked-by: Jesper Dangaard Brouer Acked-by: Vlastimil Babka Cc: Hillf Danton Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit a459eeb7b852bcdac605123a500c61286c2a2c3d Author: Michal Hocko Date: Fri Feb 24 14:56:35 2017 -0800 mm, page_alloc: do not depend on cpu hotplug locks inside the allocator Dmitry has reported the following lockdep splat lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3753 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0x24e/0xff0 kernel/locking/mutex.c:621 pcpu_alloc+0xbda/0x1280 mm/percpu.c:896 __alloc_percpu+0x24/0x30 mm/percpu.c:1075 smpcfd_prepare_cpu+0x73/0xd0 kernel/smp.c:44 cpuhp_invoke_callback+0x254/0x1480 kernel/cpu.c:136 cpuhp_up_callbacks+0x81/0x2a0 kernel/cpu.c:493 _cpu_up+0x1e3/0x2a0 kernel/cpu.c:1057 do_cpu_up+0x73/0xa0 kernel/cpu.c:1087 cpu_up+0x18/0x20 kernel/cpu.c:1095 smp_init+0xe9/0xee kernel/smp.c:564 kernel_init_freeable+0x439/0x690 init/main.c:1010 kernel_init+0x13/0x180 init/main.c:941 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 cpu_hotplug_begin cpu_hotplug.lock pcpu_alloc pcpu_alloc_mutex get_online_cpus+0x62/0x90 kernel/cpu.c:248 drain_all_pages+0xf8/0x710 mm/page_alloc.c:2385 __alloc_pages_direct_reclaim mm/page_alloc.c:3440 [inline] __alloc_pages_slowpath+0x8fd/0x2370 mm/page_alloc.c:3778 __alloc_pages_nodemask+0x8f5/0xc60 mm/page_alloc.c:3980 __alloc_pages include/linux/gfp.h:426 [inline] __alloc_pages_node include/linux/gfp.h:439 [inline] alloc_pages_node include/linux/gfp.h:453 [inline] pcpu_alloc_pages mm/percpu-vm.c:93 [inline] pcpu_populate_chunk+0x1e1/0x900 mm/percpu-vm.c:282 pcpu_alloc+0xe01/0x1280 mm/percpu.c:998 __alloc_percpu_gfp+0x27/0x30 mm/percpu.c:1062 bpf_array_alloc_percpu kernel/bpf/arraymap.c:34 [inline] array_map_alloc+0x532/0x710 kernel/bpf/arraymap.c:99 find_and_alloc_map kernel/bpf/syscall.c:34 [inline] map_create kernel/bpf/syscall.c:188 [inline] SYSC_bpf kernel/bpf/syscall.c:870 [inline] SyS_bpf+0xd64/0x2500 kernel/bpf/syscall.c:827 entry_SYSCALL_64_fastpath+0x1f/0xc2 pcpu_alloc pcpu_alloc_mutex drain_all_pages get_online_cpus cpu_hotplug.lock cpu_hotplug_begin+0x206/0x2e0 kernel/cpu.c:304 _cpu_up+0xca/0x2a0 kernel/cpu.c:1011 do_cpu_up+0x73/0xa0 kernel/cpu.c:1087 cpu_up+0x18/0x20 kernel/cpu.c:1095 smp_init+0xe9/0xee kernel/smp.c:564 kernel_init_freeable+0x439/0x690 init/main.c:1010 kernel_init+0x13/0x180 init/main.c:941 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 cpu_hotplug_begin cpu_hotplug.lock Pulling cpu hotplug locks inside the page allocator is just too dangerous. Let's remove the dependency by dropping get_online_cpus() from drain_all_pages. This is not so simple though because now we do not have a protection against cpu hotplug which means 2 things: - the work item might be executed on a different cpu in worker from unbound pool so it doesn't run on pinned on the cpu - we have to make sure that we do not race with page_alloc_cpu_dead calling drain_pages_zone Disabling preemption in drain_local_pages_wq will solve the first problem drain_local_pages will determine its local CPU from the WQ context which will be stable after that point, page_alloc_cpu_dead is pinned to the CPU already. The later condition is achieved by disabling IRQs in drain_pages_zone. Fixes: mm, page_alloc: drain per-cpu pages from workqueue context Link: http://lkml.kernel.org/r/20170207201950.20482-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Dmitry Vyukov Acked-by: Tejun Heo Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0ccce3b924212e121503619df97cc0f17189b77b Author: Mel Gorman Date: Fri Feb 24 14:56:32 2017 -0800 mm, page_alloc: drain per-cpu pages from workqueue context The per-cpu page allocator can be drained immediately via drain_all_pages() which sends IPIs to every CPU. In the next patch, the per-cpu allocator will only be used for interrupt-safe allocations which prevents draining it from IPI context. This patch uses workqueues to drain the per-cpu lists instead. This is slower but no slowdown during intensive reclaim was measured and the paths that use drain_all_pages() are not that sensitive to performance. This is particularly true as the path would only be triggered when reclaim is failing. It also makes a some sense to avoid storming a machine with IPIs when it's under memory pressure. Arguably, it should be further adjusted so that only one caller at a time is draining pages but it's beyond the scope of the current patch. Link: http://lkml.kernel.org/r/20170123153906.3122-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Vlastimil Babka Cc: Hillf Danton Cc: Jesper Dangaard Brouer Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) commit 9cd7555875bb09dad875e89a76f41f576e11c638 Author: Mel Gorman Date: Fri Feb 24 14:56:29 2017 -0800 mm, page_alloc: split alloc_pages_nodemask() alloc_pages_nodemask does a number of preperation steps that determine what zones can be used for the allocation depending on a variety of factors. This is fine but a hypothetical caller that wanted multiple order-0 pages has to do the preparation steps multiple times. This patch structures __alloc_pages_nodemask such that it's relatively easy to build a bulk order-0 page allocator. There is no functional change. Link: http://lkml.kernel.org/r/20170123153906.3122-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Hillf Danton Acked-by: Vlastimil Babka Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 75 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 29 deletions(-) commit 066b23935578d3913c2df9bed7addbcdf4711f1a Author: Mel Gorman Date: Fri Feb 24 14:56:26 2017 -0800 mm, page_alloc: split buffered_rmqueue() Patch series "Use per-cpu allocator for !irq requests and prepare for a bulk allocator", v5. This series is motivated by a conversation led by Jesper Dangaard Brouer at the last LSF/MM proposing a generic page pool for DMA-coherent pages. Part of his motivation was due to the overhead of allocating multiple order-0 that led some drivers to use high-order allocations and splitting them. This is very slow in some cases. The first two patches in this series restructure the page allocator such that it is relatively easy to introduce an order-0 bulk page allocator. A patch exists to do that and has been handed over to Jesper until an in-kernel users is created. The third patch prevents the per-cpu allocator being drained from IPI context as that can potentially corrupt the list after patch four is merged. The final patch alters the per-cpu alloctor to make it exclusive to !irq requests. This cuts allocation/free overhead by roughly 30%. Performance tests from both Jesper and me are included in the patch. This patch (of 4): buffered_rmqueue removes a page from a given zone and uses the per-cpu list for order-0. This is fine but a hypothetical caller that wanted multiple order-0 pages has to disable/reenable interrupts multiple times. This patch structures buffere_rmqueue such that it's relatively easy to build a bulk order-0 page allocator. There is no functional change. [mgorman@techsingularity.net: failed per-cpu refill may blow up] Link: http://lkml.kernel.org/r/20170124112723.mshmgwq2ihxku2um@techsingularity.net Link: http://lkml.kernel.org/r/20170123153906.3122-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Hillf Danton Cc: Vlastimil Babka Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 128 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 49 deletions(-) commit c55e8d035b28b2867e68b0e2d0eee2c0f1016b43 Author: Johannes Weiner Date: Fri Feb 24 14:56:23 2017 -0800 mm: vmscan: move dirty pages out of the way until they're flushed We noticed a performance regression when moving hadoop workloads from 3.10 kernels to 4.0 and 4.6. This is accompanied by increased pageout activity initiated by kswapd as well as frequent bursts of allocation stalls and direct reclaim scans. Even lowering the dirty ratios to the equivalent of less than 1% of memory would not eliminate the issue, suggesting that dirty pages concentrate where the scanner is looking. This can be traced back to recent efforts of thrash avoidance. Where 3.10 would not detect refaulting pages and continuously supply clean cache to the inactive list, a thrashing workload on 4.0+ will detect and activate refaulting pages right away, distilling used-once pages on the inactive list much more effectively. This is by design, and it makes sense for clean cache. But for the most part our workload's cache faults are refaults and its use-once cache is from streaming writes. We end up with most of the inactive list dirty, and we don't go after the active cache as long as we have use-once pages around. But waiting for writes to avoid reclaiming clean cache that *might* refault is a bad trade-off. Even if the refaults happen, reads are faster than writes. Before getting bogged down on writeback, reclaim should first look at *all* cache in the system, even active cache. To accomplish this, activate pages that are dirty or under writeback when they reach the end of the inactive LRU. The pages are marked for immediate reclaim, meaning they'll get moved back to the inactive LRU tail as soon as they're written back and become reclaimable. But in the meantime, by reducing the inactive list to only immediately reclaimable pages, we allow the scanner to deactivate and refill the inactive list with clean cache from the active list tail to guarantee forward progress. [hannes@cmpxchg.org: update comment] Link: http://lkml.kernel.org/r/20170202191957.22872-8-hannes@cmpxchg.org Link: http://lkml.kernel.org/r/20170123181641.23938-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_inline.h | 7 +++++++ mm/swap.c | 9 +++++---- mm/vmscan.c | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 7 deletions(-) commit 4eda48235011d6965f5229f8955ddcd355311570 Author: Johannes Weiner Date: Fri Feb 24 14:56:20 2017 -0800 mm: vmscan: only write dirty pages that the scanner has seen twice Dirty pages can easily reach the end of the LRU while there are still clean pages to reclaim around. Don't let kswapd write them back just because there are a lot of them. It costs more CPU to find the clean pages, but that's almost certainly better than to disrupt writeback from the flushers with LRU-order single-page writes from reclaim. And the flushers have been woken up by that point, so we spend IO capacity on flushing and CPU capacity on finding the clean cache. Only start writing dirty pages if they have cycled around the LRU twice now and STILL haven't been queued on the IO device. It's possible that the dirty pages are so sparsely distributed across different bdis, inodes, memory cgroups, that the flushers take forever to get to the ones we want reclaimed. Once we see them twice on the LRU, we know that's the quicker way to find them, so do LRU writeback. Link: http://lkml.kernel.org/r/20170123181641.23938-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Hillf Danton Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bbef938429f5b201f9972f399a04f01af1934cc2 Author: Johannes Weiner Date: Fri Feb 24 14:56:17 2017 -0800 mm: vmscan: remove old flusher wakeup from direct reclaim path Direct reclaim has been replaced by kswapd reclaim in pretty much all common memory pressure situations, so this code most likely doesn't accomplish the described effect anymore. The previous patch wakes up flushers for all reclaimers when we encounter dirty pages at the tail end of the LRU. Remove the crufty old direct reclaim invocation. Link: http://lkml.kernel.org/r/20170123181641.23938-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 726d061fbd3658e4bfeffa1b8e82da97de2ca4dd Author: Johannes Weiner Date: Fri Feb 24 14:56:14 2017 -0800 mm: vmscan: kick flushers when we encounter dirty pages on the LRU Memory pressure can put dirty pages at the end of the LRU without anybody running into dirty limits. Don't start writing individual pages from kswapd while the flushers might be asleep. Unlike the old direct reclaim flusher wakeup (removed in the next patch) that flushes the number of pages just scanned, this patch wakes the flushers for all outstanding dirty pages. That seemed to perform better in a synthetic test that pushes dirty pages to the end of the LRU and into reclaim, because we know LRU aging outstrips writeback already, and this way we give younger dirty pages a headstart rather than wait until reclaim runs into them as well. It also means less plugging and risk of exhausting the struct request pool from reclaim. There is a concern that this will cause temporary files that used to get dirtied and truncated before writeback to now get written to disk under memory pressure. If this turns out to be a real problem, we'll have to revisit this and tame the reclaim flusher wakeups. [hannes@cmpxchg.org: mention dirty expiration as a condition] Link: http://lkml.kernel.org/r/20170126174739.GA30636@cmpxchg.org Link: http://lkml.kernel.org/r/20170123181641.23938-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Hillf Danton Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/writeback.h | 2 +- include/trace/events/writeback.h | 2 +- mm/vmscan.c | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) commit 1276ad68e2491d1ceeb65f55d790f9277593c459 Author: Johannes Weiner Date: Fri Feb 24 14:56:11 2017 -0800 mm: vmscan: scan dirty pages even in laptop mode Patch series "mm: vmscan: fix kswapd writeback regression". We noticed a regression on multiple hadoop workloads when moving from 3.10 to 4.0 and 4.6, which involves kswapd getting tangled up in page writeout, causing direct reclaim herds that also don't make progress. I tracked it down to the thrash avoidance efforts after 3.10 that make the kernel better at keeping use-once cache and use-many cache sorted on the inactive and active list, with more aggressive protection of the active list as long as there is inactive cache. Unfortunately, our workload's use-once cache is mostly from streaming writes. Waiting for writes to avoid potential reloads in the future is not a good tradeoff. These patches do the following: 1. Wake the flushers when kswapd sees a lump of dirty pages. It's possible to be below the dirty background limit and still have cache velocity push them through the LRU. So start a-flushin'. 2. Let kswapd only write pages that have been rotated twice. This makes sure we really tried to get all the clean pages on the inactive list before resorting to horrible LRU-order writeback. 3. Move rotating dirty pages off the inactive list. Instead of churning or waiting on page writeback, we'll go after clean active cache. This might lead to thrashing, but in this state memory demand outstrips IO speed anyway, and reads are faster than writes. Mel backported the series to 4.10-rc5 with one minor conflict and ran a couple of tests on it. Mix of read/write random workload didn't show anything interesting. Write-only database didn't show much difference in performance but there were slight reductions in IO -- probably in the noise. simoop did show big differences although not as big as Mel expected. This is Chris Mason's workload that similate the VM activity of hadoop. Mel won't go through the full details but over the samples measured during an hour it reported 4.10.0-rc5 4.10.0-rc5 vanilla johannes-v1r1 Amean p50-Read 21346531.56 ( 0.00%) 21697513.24 ( -1.64%) Amean p95-Read 24700518.40 ( 0.00%) 25743268.98 ( -4.22%) Amean p99-Read 27959842.13 ( 0.00%) 28963271.11 ( -3.59%) Amean p50-Write 1138.04 ( 0.00%) 989.82 ( 13.02%) Amean p95-Write 1106643.48 ( 0.00%) 12104.00 ( 98.91%) Amean p99-Write 1569213.22 ( 0.00%) 36343.38 ( 97.68%) Amean p50-Allocation 85159.82 ( 0.00%) 79120.70 ( 7.09%) Amean p95-Allocation 204222.58 ( 0.00%) 129018.43 ( 36.82%) Amean p99-Allocation 278070.04 ( 0.00%) 183354.43 ( 34.06%) Amean final-p50-Read 21266432.00 ( 0.00%) 21921792.00 ( -3.08%) Amean final-p95-Read 24870912.00 ( 0.00%) 26116096.00 ( -5.01%) Amean final-p99-Read 28147712.00 ( 0.00%) 29523968.00 ( -4.89%) Amean final-p50-Write 1130.00 ( 0.00%) 977.00 ( 13.54%) Amean final-p95-Write 1033216.00 ( 0.00%) 2980.00 ( 99.71%) Amean final-p99-Write 1517568.00 ( 0.00%) 32672.00 ( 97.85%) Amean final-p50-Allocation 86656.00 ( 0.00%) 78464.00 ( 9.45%) Amean final-p95-Allocation 211712.00 ( 0.00%) 116608.00 ( 44.92%) Amean final-p99-Allocation 287232.00 ( 0.00%) 168704.00 ( 41.27%) The latencies are actually completely horrific in comparison to 4.4 (and 4.10-rc5 is worse than 4.9 according to historical data for reasons Mel hasn't analysed yet). Still, 95% of write latency (p95-write) is halved by the series and allocation latency is way down. Direct reclaim activity is one fifth of what it was according to vmstats. Kswapd activity is higher but this is not necessarily surprising. Kswapd efficiency is unchanged at 99% (99% of pages scanned were reclaimed) but direct reclaim efficiency went from 77% to 99% In the vanilla kernel, 627MB of data was written back from reclaim context. With the series, no data was written back. With or without the patch, pages are being immediately reclaimed after writeback completes. However, with the patch, only 1/8th of the pages are reclaimed like this. This patch (of 5): We have an elaborate dirty/writeback throttling mechanism inside the reclaim scanner, but for that to work the pages have to go through shrink_page_list() and get counted for what they are. Otherwise, we mess up the LRU order and don't match reclaim speed to writeback. Especially during deactivation, there is never a reason to skip dirty pages; nothing is even trying to write them out from there. Don't mess up the LRU order for nothing, shuffle these pages along. Link: http://lkml.kernel.org/r/20170123181641.23938-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Hillf Danton Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 -- mm/vmscan.c | 14 ++------------ 2 files changed, 2 insertions(+), 14 deletions(-) commit 64527f5d540ad496718c7bca5e9387cf6cf94e8c Author: Mike Rapoport Date: Fri Feb 24 14:56:08 2017 -0800 userfaultfd: non-cooperative: selftest: enable REMOVE event test for shmem Now when madvise(MADV_REMOVE) notifies uffd reader, we should verify that appliciation actually sees zeros at the removed range. Link: http://lkml.kernel.org/r/1484814154-1557-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a6bf53eba98e0c36f51322cd6aa771c0ffa283f3 Author: Mike Rapoport Date: Fri Feb 24 14:56:05 2017 -0800 userfaultfd: non-cooperative: add madvise() event for MADV_REMOVE request When a page is removed from a shared mapping, the uffd reader should be notified, so that it won't attempt to handle #PF events for the removed pages. We can reuse the UFFD_EVENT_REMOVE because from the uffd monitor point of view, the semantices of madvise(MADV_DONTNEED) and madvise(MADV_REMOVE) is exactly the same. Link: http://lkml.kernel.org/r/1484814154-1557-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Acked-by: Hillf Danton Acked-by: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 1 + 1 file changed, 1 insertion(+) commit d811914d87576c562e849c00d9f9beff45038801 Author: Mike Rapoport Date: Fri Feb 24 14:56:02 2017 -0800 userfaultfd: non-cooperative: rename *EVENT_MADVDONTNEED to *EVENT_REMOVE Patch series "userfaultfd: non-cooperative: add madvise() event for MADV_REMOVE request". These patches add notification of madvise(MADV_REMOVE) event to non-cooperative userfaultfd monitor. The first pacth renames EVENT_MADVDONTNEED to EVENT_REMOVE along with relevant functions and structures. Using _REMOVE instead of _MADVDONTNEED describes the event semantics more clearly and I hope it's not too late for such change in the ABI. This patch (of 3): The UFFD_EVENT_MADVDONTNEED purpose is to notify uffd monitor about removal of certain range from address space tracked by userfaultfd. Hence, UFFD_EVENT_REMOVE seems to better reflect the operation semantics. Respectively, 'madv_dn' field of uffd_msg is renamed to 'remove' and the madvise_userfault_dontneed callback is renamed to userfaultfd_remove. Link: http://lkml.kernel.org/r/1484814154-1557-2-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Acked-by: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 14 +++++++------- include/linux/userfaultfd_k.h | 16 ++++++++-------- include/uapi/linux/userfaultfd.h | 8 ++++---- mm/madvise.c | 2 +- tools/testing/selftests/vm/userfaultfd.c | 16 ++++++++-------- 5 files changed, 28 insertions(+), 28 deletions(-) commit 0262d9c845ec349edf93f69688a5129c36cc2232 Author: Heiko Carstens Date: Fri Feb 24 14:55:59 2017 -0800 memblock: embed memblock type name within struct memblock_type Provide the name of each memblock type with struct memblock_type. This allows to get rid of the function memblock_type_name() and duplicating the type names in __memblock_dump_all(). The only memblock_type usage out of mm/memblock.c seems to be arch/s390/kernel/crash_dump.c. While at it, give it a name. Link: http://lkml.kernel.org/r/20170120123456.46508-4-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Cc: Philipp Hachtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/crash_dump.c | 1 + include/linux/memblock.h | 1 + mm/memblock.c | 35 +++++++++++------------------------ 3 files changed, 13 insertions(+), 24 deletions(-) commit 409efd4c9bae4bbf58cc8476077db58454b1ed7e Author: Heiko Carstens Date: Fri Feb 24 14:55:56 2017 -0800 memblock: also dump physmem list within __memblock_dump_all Since commit 70210ed950b5 ("mm/memblock: add physical memory list") the memblock structure knows about a physical memory list. The physical memory list should also be dumped if memblock_dump_all() is called in case memblock_debug is switched on. This makes debugging a bit easier. Link: http://lkml.kernel.org/r/20170120123456.46508-3-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Cc: Philipp Hachtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+) commit 7409c5f738c879f7595b46314635c02c4c162484 Author: Heiko Carstens Date: Fri Feb 24 14:55:54 2017 -0800 memblock: let memblock_type_name know about physmem type Since commit 70210ed950b5 ("mm/memblock: add physical memory list") the memblock structure knows about a physical memory list. memblock_type_name() should return "physmem" instead of "unknown" if the name of the physmem memblock_type is being asked for. Link: http://lkml.kernel.org/r/20170120123456.46508-2-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Cc: Philipp Hachtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 997126bbc58e432e5f26ecec4498229003df1c66 Author: Andrew Morton Date: Fri Feb 24 14:55:51 2017 -0800 mm/memory_hotplug.c: unexport __remove_pages() It has no modular callers. Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) commit 3fc21924100b13f73c734d0ce8dfcfe913fcf7a8 Author: Dan Williams Date: Fri Feb 24 14:55:48 2017 -0800 mm: validate device_hotplug is held for memory hotplug mem_hotplug_begin() assumes that it can set mem_hotplug.active_writer and run the hotplug process without racing another thread. Validate this assumption with a lockdep assertion. Link: http://lkml.kernel.org/r/148693886229.16345.1770484669403334689.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Ben Hutchings Cc: Michal Hocko Cc: Toshi Kani Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: Greg Kroah-Hartman Cc: Masayoshi Mizuma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/core.c | 5 +++++ include/linux/device.h | 1 + mm/memory_hotplug.c | 2 ++ 3 files changed, 8 insertions(+) commit b5d24fda9c3dce51fcb4eee459550a458eaaf1e2 Author: Dan Williams Date: Fri Feb 24 14:55:45 2017 -0800 mm, devm_memremap_pages: hold device_hotplug lock over mem_hotplug_{begin, done} The mem_hotplug_{begin,done} lock coordinates with {get,put}_online_mems() to hold off "readers" of the current state of memory from new hotplug actions. mem_hotplug_begin() expects exclusive access, via the device_hotplug lock, to set mem_hotplug.active_writer. Calling mem_hotplug_begin() without locking device_hotplug can lead to corrupting mem_hotplug.refcount and missed wakeups / soft lockups. [dan.j.williams@intel.com: v2] Link: http://lkml.kernel.org/r/148728203365.38457.17804568297887708345.stgit@dwillia2-desk3.amr.corp.intel.com Link: http://lkml.kernel.org/r/148693885680.16345.17802627926777862337.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: f931ab479dd2 ("mm: fix devm_memremap_pages crash, use mem_hotplug_{begin, done}") Signed-off-by: Dan Williams Reported-by: Ben Hutchings Cc: Michal Hocko Cc: Toshi Kani Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: Masayoshi Mizuma Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 299c517adb903ddd376dd103fcc9dcfff3d4728b Author: David Rientjes Date: Fri Feb 24 14:55:42 2017 -0800 mm, oom: header nodemask is NULL when cpusets are disabled Commit 82e7d3abec86 ("oom: print nodemask in the oom report") implicitly sets the allocation nodemask to cpuset_current_mems_allowed when there is no effective mempolicy. cpuset_current_mems_allowed is only effective when cpusets are enabled, which is also printed by dump_header(), so setting the nodemask to cpuset_current_mems_allowed is redundant and prevents debugging issues where ac->nodemask is not set properly in the page allocator. This provides better debugging output since cpuset_print_current_mems_allowed() is already provided. [rientjes@google.com: newline per Hillf] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701200158300.88321@chino.kir.corp.google.com Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701191454470.2381@chino.kir.corp.google.com Signed-off-by: David Rientjes Suggested-by: Vlastimil Babka Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit e86c59b1b12d0db1c97eb5bec7586a691685c6cc Author: Claudio Imbrenda Date: Fri Feb 24 14:55:39 2017 -0800 mm/ksm: improve deduplication of zero pages with colouring Some architectures have a set of zero pages (coloured zero pages) instead of only one zero page, in order to improve the cache performance. In those cases, the kernel samepage merger (KSM) would merge all the allocated pages that happen to be filled with zeroes to the same deduplicated page, thus losing all the advantages of coloured zero pages. This behaviour is noticeable when a process accesses large arrays of allocated pages containing zeroes. A test I conducted on s390 shows that there is a speed penalty when KSM merges such pages, compared to not merging them or using actual zero pages from the start without breaking the COW. This patch fixes this behaviour. When coloured zero pages are present, the checksum of a zero page is calculated during initialisation, and compared with the checksum of the current canditate during merging. In case of a match, the normal merging routine is used to merge the page with the correct coloured zero page, which ensures the candidate page is checked to be equal to the target zero page. A sysfs entry is also added to toggle this behaviour, since it can potentially introduce performance regressions, especially on architectures without coloured zero pages. The default value is disabled, for backwards compatibility. With this patch, the performance with KSM is the same as with non COW-broken actual zero pages, which is also the same as without KSM. [akpm@linux-foundation.org: make zero_checksum and ksm_use_zero_pages __read_mostly, per Andrea] [imbrenda@linux.vnet.ibm.com: documentation for coloured zero pages deduplication] Link: http://lkml.kernel.org/r/1484927522-1964-1-git-send-email-imbrenda@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1484850953-23941-1-git-send-email-imbrenda@linux.vnet.ibm.com Signed-off-by: Claudio Imbrenda Cc: Christian Borntraeger Cc: Hugh Dickins Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/ksm.txt | 14 ++++++++++ mm/ksm.c | 68 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 3 deletions(-) commit 8d4a0170026216e315b1a52ba15357b88487fbc8 Author: Davidlohr Bueso Date: Fri Feb 24 14:55:36 2017 -0800 cris: use generic current.h Given that the arch does not add its own implementations, simply use the asm-generic/current.h (generic-y) header instead of duplicating code. Link: http://lkml.kernel.org/r/1485992878-4780-3-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Mikael Starvik Cc: Jesper Nilsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/cris/include/asm/Kbuild | 1 + arch/cris/include/asm/current.h | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) commit f8e6859ea9d06ae1565b21278c4e10fbce5f1eab Merge: a682e00 ac65e28 Author: Linus Torvalds Date: Fri Feb 24 15:01:17 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: 1) Support multiple huge page sizes, from Nitin Gupta. 2) Improve boot time on large memory configurations, from Pavel Tatashin. 3) Make BRK handling more consistent and documented, from Vijay Kumar. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix build error in flush_tsb_user_page sparc64: memblock resizes are not handled properly sparc64: use latency groups to improve add_node_ranges speed sparc64: Add 64K page size support sparc64: Multi-page size support Documentation/sparc: Steps for sending break on sunhv console sparc64: Send break twice from console to return to boot prom sparc64: Migrate hvcons irq to panicked cpu sparc64: Set cpu state to offline when stopped sunvdc: Add support for setting physical sector size sparc64: fix for user probes in high memory sparc: topology_64.h: Fix condition for including cpudata.h sparc32: mm: srmmu: add __ro_after_init to sparc32_cachetlb_ops structures commit a682e0035494c449e53a57d039f86f75b9e2fe67 Merge: 1802979 1ec4922 Author: Linus Torvalds Date: Fri Feb 24 14:42:19 2017 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull md updates from Shaohua Li: "Mainly fixes bugs and improves performance: - Improve scalability for raid1 from Coly - Improve raid5-cache read performance, disk efficiency and IO pattern from Song and me - Fix a race condition of disk hotplug for linear from Coly - A few cleanup patches from Ming and Byungchul - Fix a memory leak from Neil - Fix WRITE SAME IO failure from me - Add doc for raid5-cache from me" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: (23 commits) md/raid1: fix write behind issues introduced by bio_clone_bioset_partial md/raid1: handle flush request correctly md/linear: shutup lockdep warnning md/raid1: fix a use-after-free bug RAID1: avoid unnecessary spin locks in I/O barrier code RAID1: a new I/O barrier implementation to remove resync window md/raid5: Don't reinvent the wheel but use existing llist API md: fast clone bio in bio_clone_mddev() md: remove unnecessary check on mddev md/raid1: use bio_clone_bioset_partial() in case of write behind md: fail if mddev->bio_set can't be created block: introduce bio_clone_bioset_partial() md: disable WRITE SAME if it fails in underlayer disks md/raid5-cache: exclude reclaiming stripes in reclaim check md/raid5-cache: stripe reclaim only counts valid stripes MD: add doc for raid5-cache Documentation: move MD related doc into a separate dir md: ensure md devices are freed before module is unloaded. md/r5cache: improve journal device efficiency md/r5cache: enable chunk_aligned_read with write back cache ... commit 1802979ab1ee8ec5a72987ad518f5a91bf41cd89 Merge: f1ef09f 61febef Author: Linus Torvalds Date: Fri Feb 24 14:13:34 2017 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block updates and fixes from Jens Axboe: - NVMe updates and fixes that missed the first pull request. This includes bug fixes, and support for autonomous power management. - Fix from Christoph for missing clear of the request payload, causing a problem with (at least) the storvsc driver. - Further fixes for the queue/bdi life time issues from Jan. - The Kconfig mq scheduler update from me. - Fixing a use-after-free in dm-rq, spotted by Bart, introduced in this merge window. - Three fixes for nbd from Josef. - Bug fix from Omar, fixing a bug in sas transport code that oopses when bsg ioctls were used. From Omar. - Improvements to the queue restart and tag wait from from Omar. - Set of fixes for the sed/opal code from Scott. - Three trivial patches to cciss from Tobin * 'for-linus' of git://git.kernel.dk/linux-block: (41 commits) dm-rq: don't dereference request payload after ending request blk-mq-sched: separate mark hctx and queue restart operations blk-mq: use sbq wait queues instead of restart for driver tags block/sed-opal: Propagate original error message to userland. nvme/pci: re-check security protocol support after reset block/sed-opal: Introduce free_opal_dev to free the structure and clean up state nvme: detect NVMe controller in recent MacBooks nvme-rdma: add support for host_traddr nvmet-rdma: Fix error handling nvmet-rdma: use nvme cm status helper nvme-rdma: move nvme cm status helper to .h file nvme-fc: don't bother to validate ioccsz and iorcsz nvme/pci: No special case for queue busy on IO nvme/core: Fix race kicking freed request_queue nvme/pci: Disable on removal when disconnected nvme: Enable autonomous power state transitions nvme: Add a quirk mechanism that uses identify_ctrl nvme: make nvmf_register_transport require a create_ctrl callback nvme: Use CNS as 8-bit field and avoid endianness conversion nvme: add semicolon in nvme_command setting ... commit 7259f1dfe718234fee3f87d98d082e7f98d1d712 Author: Jeff Layton Date: Fri Feb 24 13:25:25 2017 -0500 sunrpc: don't register UDP port with rpcbind when version needs congestion control Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/svc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5283b03ee5cd28d516646298bead09b238d92ddc Author: Jeff Layton Date: Fri Feb 24 13:25:24 2017 -0500 nfs/nfsd/sunrpc: enforce transport requirements for NFSv4 NFSv4 requires a transport "that is specified to avoid network congestion" (RFC 7530, section 3.1, paragraph 2). In practical terms, that means that you should not run NFSv4 over UDP. The server has never enforced that requirement, however. This patchset fixes this by adding a new flag to the svc_version that states that it has these transport requirements. With that, we can check that the transport has XPT_CONG_CTRL set before processing an RPC. If it doesn't we reject it with RPC_PROG_MISMATCH. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfs/callback_xdr.c | 2 ++ fs/nfsd/nfs4proc.c | 13 +++++++------ include/linux/sunrpc/svc.h | 3 +++ net/sunrpc/svc.c | 15 +++++++++++++++ 4 files changed, 27 insertions(+), 6 deletions(-) commit e3a60ead2c9b813db832a35e50ebbc6b552a35e3 Author: Krzysztof Kozlowski Date: Fri Feb 24 23:07:43 2017 +0200 watchdog: s3c2410: Add prefix to local function Functions marked static inline might not be inlined so a driver-specific prefix for function name helps when looking through call backtrace. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck drivers/watchdog/s3c2410_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 53eac48d5c97e8a926e26ae4205ac890721ef260 Author: Krzysztof Kozlowski Date: Fri Feb 24 23:07:41 2017 +0200 watchdog: s3c2410: Select MFD_SYSCON on all Exynos platforms Syscon is used not only on Exynos5 SoCs but also on Exynos3250, Exynos4412 and ARMv8 versions (Exynos5433, Exynos7). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 456f53d652411594249efc3fcea01842177c9a6f Author: Krzysztof Kozlowski Date: Fri Feb 24 23:07:40 2017 +0200 watchdog: s3c2410: Use dev_dbg instead of pr_info Replace the 'debug' module parameter and pr_info() with proper device dynamic debug calls because this is the preferred and flexible way of enabling debugging printks. Also remove some obvious debug printks. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck drivers/watchdog/s3c2410_wdt.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 0b445549ea6f91ffea78a976fe89b932db6e077a Author: Krzysztof Kozlowski Date: Fri Feb 24 17:11:16 2017 +0200 watchdog: s3c2410: Fix infinite interrupt in soft mode In soft (no-reboot) mode, the driver self-pings watchdog upon expiration of an interrupt. However the interrupt itself was not cleared thus on first hit, the system enters infinite interrupt handling loop. On Odroid U3 (Exynos4412), when booted with s3c2410_wdt.soft_noboot=1 argument the console is flooded: # killall -9 watchdog [ 60.523760] s3c2410-wdt 10060000.watchdog: watchdog timer expired (irq) [ 60.536744] s3c2410-wdt 10060000.watchdog: watchdog timer expired (irq) Fix this by writing something to the WTCLRINT register to clear the interrupt. The register WTCLRINT however appeared in S3C6410 so a new watchdog quirk and flavor are needed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck .../devicetree/bindings/watchdog/samsung-wdt.txt | 9 +++++---- drivers/watchdog/s3c2410_wdt.c | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) commit 4f21195d42ef930f20e1753532709bb294aa73ac Author: Krzysztof Kozlowski Date: Fri Feb 24 17:11:15 2017 +0200 watchdog: s3c2410: Remove confusing CONFIG prefix from local defines The CONFIG prefix from defines in the s3c2410_wdt.c might suggest that these constants come from Kconfig. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/watchdog/s3c2410_wdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4cbc69023a2129c271ed67da555d62eca42469d2 Author: Wolfram Sang Date: Tue Feb 7 15:03:29 2017 +0100 watchdog: softdog: make pretimeout support a compile option It occurred to me that the panic pretimeout governor will stall the softdog, because it is purely software which simply breaks when the kernel panics. Testing governors with the softdog on the other hand is really useful, so make this feature a compile time option which nees to be enabled explicitly. This also removes the overhead if pretimeout support is not used because it will now be compiled away (saving ~10% on ARM32). Signed-off-by: Wolfram Sang Reviewed-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 8 ++++++++ drivers/watchdog/softdog.c | 21 +++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) commit 8ce6796dabb9f1f55b07cd032449a24b625f761e Author: Baoyou Xie Date: Sat Feb 4 09:34:15 2017 +0800 watchdog: zx2967: add watchdog controller driver for ZTE's zx2967 family This patch adds watchdog controller driver for ZTE's zx2967 family. Signed-off-by: Baoyou Xie Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 10 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/zx2967_wdt.c | 291 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 302 insertions(+) commit df823c19e5245148b0557577000fb73274af3656 Author: Baoyou Xie Date: Sat Feb 4 09:34:13 2017 +0800 dt: bindings: add documentation for zx2967 family watchdog controller This patch adds dt-binding documentation for zx2967 family watchdog controller. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../bindings/watchdog/zte,zx2967-wdt.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit f201353273b6dec71940df01ea6eeb528d907941 Author: Alexandre Belloni Date: Mon Jan 30 18:18:48 2017 +0100 watchdog: sama5d4: Implement resume hook When resuming for the deepest state on sama5d2, it is necessary to restore MR as the registers are lost. Signed-off-by: Alexandre Belloni Signed-off-by: Guenter Roeck drivers/watchdog/sama5d4_wdt.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 722ce6356ddfdcb75ab9379f426a89691b0234de Author: Alexandre Belloni Date: Mon Jan 30 18:18:47 2017 +0100 watchdog: sama5d4: Cache MR instead of a partial config .config is used to cache a part of WDT_MR at probe time and is not used afterwards. Instead of doing that, actually cache MR and avoid reading it every time it is modified. Signed-off-by: Alexandre Belloni Signed-off-by: Guenter Roeck drivers/watchdog/sama5d4_wdt.c | 45 ++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 26 deletions(-) commit 8f8dc7bf3e0ab14d1ce1964dbe66ff8acf8779c6 Author: H Hartley Sweeten Date: Tue Jan 31 09:33:30 2017 -0700 watchdog: ts72xx_wdt: convert driver to watchdog core Cleanup this driver and convert it to use the watchdog framework API. Signed-off-by: H Hartley Sweeten Cc: Mika Westerberg [groeck: Dropped initialization of static variable] Signed-off-by: Guenter Roeck drivers/watchdog/ts72xx_wdt.c | 447 +++++++++--------------------------------- 1 file changed, 89 insertions(+), 358 deletions(-) commit 917003610d178b8bc3cbc63ee9fd203a7b01c444 Author: H Hartley Sweeten Date: Tue Jan 31 09:33:29 2017 -0700 watchdog: ep93xx_wdt: cleanup and let the core handle the heartbeat Cleanup this driver and remove the 200ms heartbeat timer. The core now has the ability to handle the heartbeat. Signed-off-by: H Hartley Sweeten [groeck: Dropped 0-initialization of static variable] Signed-off-by: Guenter Roeck drivers/watchdog/ep93xx_wdt.c | 114 ++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 70 deletions(-) commit 8751f90c819c156befc630d467adbc003bd59d87 Author: Guenter Roeck Date: Sun Jan 29 11:12:08 2017 -0800 watchdog: RDC321X_WDT always depends on PCI Without this dependency, platforms not supporting PCI (such as m68k) report the following build warning when building allmodconfig or allyesconfig. drivers/watchdog/rdc321x_wdt.c: In function 'rdc321x_wdt_ioctl': ./arch/m68k/include/asm/uaccess_mm.h:61:1: warning: 'value' may be used uninitialized in this function Fixes: f4c3de659054 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) commit eca10ae6000d45ee3fec65f0abf7e07abfc66abb Author: Linus Walleij Date: Sat Jan 28 23:59:37 2017 +0100 watchdog: add driver for Cortina Gemini watchdog This add support for the Cortina systems Gemini (SL3516) SoC watchdog. I have tried to use all the right new kernel interfaces and tested with busybox' "watchdog" command both to kick and get timeouts and reboots. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/gemini_wdt.c | 229 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) commit 428a66554a1d475896e47a23f1d2c99b58fa7105 Author: Linus Walleij Date: Sat Jan 28 23:59:05 2017 +0100 watchdog: add DT bindings for Cortina Gemini This adds DT bindings for the Cortina systems Gemini SoC watchdog timer. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck .../bindings/watchdog/cortina,gemin-watchdog.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b893e344bfbd01a3df5df32ecb9f7bf8f1271d46 Author: Bhumika Goyal Date: Sat Jan 28 13:11:17 2017 +0530 watchdog: constify watchdog_ops structures Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct watchdog_ops x@p={...}; @ok@ struct watchdog_device w; identifier r.x; position p; @@ w.ops=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct watchdog_ops x; File size details before and after patching. First line of every .o file shows the file size before patching and second line shows the size after patching. text data bss dec hex filename 1340 544 0 1884 75c drivers/watchdog/bcm_kona_wdt.o 1436 440 0 1876 754 drivers/watchdog/bcm_kona_wdt.o 1176 544 4 1724 6bc drivers/watchdog/digicolor_wdt.o 1272 440 4 1716 6b4 drivers/watchdog/digicolor_wdt.o 925 580 89 1594 63a drivers/watchdog/ep93xx_wdt.o 1021 476 89 1586 632 drivers/watchdog/ep93xx_wdt.o 4932 288 17 5237 1475 drivers/watchdog/s3c2410_wdt.o 5028 192 17 5237 1475 drivers/watchdog/s3c2410_wdt.o 1977 292 1 2270 8de drivers/watchdog/sama5d4_wdt.o 2073 196 1 2270 8de drivers/watchdog/sama5d4_wdt.o 1375 484 1 1860 744 drivers/watchdog/sirfsoc_wdt.o 1471 380 1 1852 73c drivers/watchdog/sirfsoc_wdt.o Size remains the same for the files drivers/watchdog/diag288_wdt.o drivers/watchdog/asm9260_wdt.o and drivers/watchdog/atlas7_wdt.o The following .o files did not compile: drivers/watchdog/sun4v_wdt.o, drivers/watchdog/sbsa_gwdt.o, drivers/watchdog/rt2880_wdt.o, drivers/watchdog/booke_wdt.o drivers/watchdog/mt7621_wdt.o Signed-off-by: Bhumika Goyal Signed-off-by: Guenter Roeck drivers/watchdog/asm9260_wdt.c | 2 +- drivers/watchdog/atlas7_wdt.c | 2 +- drivers/watchdog/bcm_kona_wdt.c | 2 +- drivers/watchdog/booke_wdt.c | 2 +- drivers/watchdog/diag288_wdt.c | 2 +- drivers/watchdog/digicolor_wdt.c | 2 +- drivers/watchdog/ep93xx_wdt.c | 2 +- drivers/watchdog/mt7621_wdt.c | 2 +- drivers/watchdog/rt2880_wdt.c | 2 +- drivers/watchdog/s3c2410_wdt.c | 2 +- drivers/watchdog/sama5d4_wdt.c | 2 +- drivers/watchdog/sbsa_gwdt.c | 2 +- drivers/watchdog/sirfsoc_wdt.c | 2 +- drivers/watchdog/sun4v_wdt.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit bb292ac1c6028344013309a309b44dc691581825 Author: Guenter Roeck Date: Wed Jan 25 14:21:10 2017 -0800 watchdog: Introduce watchdog_stop_on_unregister helper Many watchdog drivers explicitly stop the watchdog when unregistering it. While it is unclear if this is actually needed (the whatdog should not be running at that time if it can be stopped), introduce a helper to explicitly stop the watchdog in the watchdog core when unregistering it. This helps reducing driver code size while retaining functionality. Signed-off-by: Guenter Roeck Documentation/watchdog/watchdog-kernel-api.txt | 6 ++++++ drivers/watchdog/watchdog_dev.c | 5 +++++ include/linux/watchdog.h | 7 +++++++ 3 files changed, 18 insertions(+) commit 540aea3dbffc6a75d0b3b77db1cde36a065a6ab5 Author: William Breathitt Gray Date: Tue Jan 24 17:02:33 2017 -0500 watchdog: ebc-c384_wdt: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the watchdog_register_device call with the devm_watchdog_register_device call. In addition, the ebc_c384_wdt_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Guenter Roeck drivers/watchdog/ebc-c384_wdt.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 4b448c96a7f0fd092a4113cab9248ddb7bf21c17 Author: Guenter Roeck Date: Tue Jan 10 18:09:11 2017 -0800 watchdog: tegra_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Use devm_watchdog_register_driver() to register watchdog device Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Signed-off-by: Guenter Roeck Acked-by: Thierry Reding Signed-off-by: Guenter Roeck drivers/watchdog/tegra_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 64b849e28b8be15a5bb855890fd9ddb8be162db6 Author: Guenter Roeck Date: Tue Jan 10 15:21:47 2017 -0800 watchdog: da9063_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'val = e; return val;' with 'return e;' - Replace 'if (e) return e; return 0;' with 'return e;' - Drop assignments to otherwise unused variables - Drop unused variables - Drop remove function - Drop dev_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Adam Thomson Signed-off-by: Guenter Roeck drivers/watchdog/da9063_wdt.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 528eff34dda07e98c7aeb2266d2bdb9c54439333 Author: Guenter Roeck Date: Tue Jan 10 15:21:47 2017 -0800 watchdog: da9062_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop dev_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Adam Thomson Signed-off-by: Guenter Roeck drivers/watchdog/da9062_wdt.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 89f944c0f9abce176cf442894d29a7ab25f81c76 Author: Guenter Roeck Date: Tue Jan 10 15:21:47 2017 -0800 watchdog: da9055_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'goto l; ... l: return e;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Adam Thomson Signed-off-by: Guenter Roeck drivers/watchdog/da9055_wdt.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 189c049a01c2de60e5b88cf73326b9ba3811a16b Author: Guenter Roeck Date: Tue Jan 10 15:21:47 2017 -0800 watchdog: da9052_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Adam Thomson Signed-off-by: Guenter Roeck drivers/watchdog/da9052_wdt.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 5f5aa6f10a11450fb326430bbbb67abf160edb95 Author: Guenter Roeck Date: Tue Jan 10 15:21:45 2017 -0800 watchdog: bcm2835_wdt: Convert to use device managed functions and other improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Replace of_iomap() with platform_get_resource() followed by devm_ioremap_resource() - Replace &pdev->dev with dev if 'struct device *dev' is a declared variable - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Stephen Warren Cc: Lee Jones Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Acked-by: Eric Anholt Signed-off-by: Guenter Roeck drivers/watchdog/bcm2835_wdt.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit cb5c14ea573b625053487f9dfde395ac0e8bc11b Author: Guenter Roeck Date: Tue Jan 10 15:21:52 2017 -0800 watchdog: mena21_wdt: Convert to use device managed functions and other improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'goto l; ... l: return e;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop unnecessary mutex_destroy() on allocated data - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Johannes Thumshirn Signed-off-by: Guenter Roeck drivers/watchdog/mena21_wdt.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 30cba9a109feb0dbb262d575ae33be8c16d7d26f Author: Guenter Roeck Date: Tue Jan 10 15:22:01 2017 -0800 watchdog: wm831x_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Charles Keepax Signed-off-by: Guenter Roeck drivers/watchdog/wm831x_wdt.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit dd36f6ce680d55fcafa62b35e589549cd53199b1 Author: Guenter Roeck Date: Tue Jan 10 15:21:48 2017 -0800 watchdog: digicolor_wdt: Convert to use device managed functions and other improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Replace of_iomap() with platform_get_resource() followed by devm_ioremap_resource() - Drop platform_set_drvdata() - Replace &pdev->dev with dev if 'struct device *dev' is a declared variable - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Acked-by: Baruch Siach Tested-by: Baruch Siach Signed-off-by: Guenter Roeck drivers/watchdog/digicolor_wdt.c | 48 ++++++++++------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) commit d3d77b5abc175684a3c42a240ee49931ca51d10d Author: Guenter Roeck Date: Tue Jan 10 15:21:49 2017 -0800 watchdog: iTCO_wdt: Replace shutdown function with call to watchdog_stop_on_reboot The shutdown function calls the stop function. Call watchdog_stop_on_reboot() from probe instead. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace shutdown function with call to watchdog_stop_on_reboot() Reviewed-by: Andy Shevchenko Signed-off-by: Guenter Roeck drivers/watchdog/iTCO_wdt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 396164b7407b7419a459c1905e9c8a91cb3c307f Author: Guenter Roeck Date: Tue Jan 10 15:21:50 2017 -0800 watchdog: intel-mid_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Reviewed-by: Andy Shevchenko Signed-off-by: Guenter Roeck drivers/watchdog/intel-mid_wdt.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit c8841a606740867d7283b37dd948ece281add3d6 Author: Guenter Roeck Date: Tue Jan 10 15:21:53 2017 -0800 watchdog: meson_wdt: Convert to use device managed functions and other improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Carlo Caione Acked-by: Kevin Hilman Signed-off-by: Guenter Roeck drivers/watchdog/meson_wdt.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 42f82693776cb013baa94c818828f9859cc344a0 Author: Guenter Roeck Date: Tue Jan 10 15:21:59 2017 -0800 watchdog: sunxi_wdt: Convert to use device managed functions and other improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Guenter Roeck drivers/watchdog/sunxi_wdt.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 7db1634d62d4b521c97ca3439221ee870bcc38f2 Author: Guenter Roeck Date: Tue Jan 10 15:21:44 2017 -0800 watchdog: aspeed_wdt: Convert to use device managed functions Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: Joel Stanley Signed-off-by: Guenter Roeck drivers/watchdog/aspeed_wdt.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 9e14375880c4a64e190b296023f52e987cb9d33e Author: Guenter Roeck Date: Tue Jan 3 19:21:37 2017 -0800 watchdog: coh901327_wdt: Use dev variable instead of pdev->dev Use a local dev variable instead of dereferencing pdev->dev several times in the probe function to make the code easier to read. Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/watchdog/coh901327_wdt.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 30c65b22f04262206e1ea00a87469233930066c2 Author: Guenter Roeck Date: Tue Jan 3 03:10:30 2017 -0800 watchdog: coh901327_wdt: Use devm_ioremap_resource to map resources Map resources using devm_ioremap_resource() to simplify error handling. Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/watchdog/coh901327_wdt.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 14da8d427eb8ea10d8fb78a1264583bb9b279231 Author: Guenter Roeck Date: Tue Jan 3 03:03:27 2017 -0800 watchdog: coh901327_wdt: Keep clock enabled after loading driver Enabling the clock before accessing chip registers and disabling it afterwards does not really make sense and only adds complexity to the driver. In addition to that, a comment int the driver suggests that it does not serve a useful purpose either. "The watchdog block is of course always clocked, the clk_enable()/clk_disable() calls are mainly for performing reference counting higher up in the clock hierarchy." Just keep the clock enabled instead. Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/watchdog/coh901327_wdt.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 01372ae13ba6a4792de2f4bd474f1374b5404448 Author: Guenter Roeck Date: Tue Jan 3 03:22:09 2017 -0800 watchdog: coh901327_wdt: Simplify error handling in probe function Checking if there is no error followed by a goto if there is one is confusing. Reverse the logic. Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/watchdog/coh901327_wdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0397c5db1d3174a553da674bb779007cc62cc241 Author: Guenter Roeck Date: Wed Jan 4 12:28:01 2017 -0800 watchdog: tangox: Use watchdog core to install restart handler Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: Guenter Roeck drivers/watchdog/tangox_wdt.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit a70dcc016fedfc214fb0d4cb59cd01d0117c8345 Author: Guenter Roeck Date: Wed Jan 4 12:27:21 2017 -0800 watchdog: dw_wdt: Use watchdog core to install restart handler Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: Guenter Roeck drivers/watchdog/dw_wdt.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 71e9b2f0bf2abab805b23b126747979dda589a7c Author: Guenter Roeck Date: Wed Jan 4 12:26:45 2017 -0800 watchdog: bcm2835_wdt: Use watchdog core to install restart handler Use the infrastructure provided by the watchdog core to install the restart handler. Acked-by: Eric Anholt Signed-off-by: Guenter Roeck drivers/watchdog/bcm2835_wdt.c | 57 ++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 27 deletions(-) commit 55dbe8f325a2e935c7913d538f9b39acff0f3bfc Author: Guenter Roeck Date: Wed Jan 4 12:24:52 2017 -0800 watchdog: asm9260_wdt: Use watchdog core to install restart handler Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: Guenter Roeck drivers/watchdog/asm9260_wdt.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 3b72c41f13e64e4799cb0978d46eb06575456f26 Author: Guenter Roeck Date: Fri Jan 6 06:35:16 2017 -0800 watchdog: bcm47xx_wdt: Don't validate platform data on remove Platform data was already validated in the probe function. If it was NULL, the remove function will never be called. Remove the unnecessary check. Signed-off-by: Guenter Roeck drivers/watchdog/bcm47xx_wdt.c | 3 --- 1 file changed, 3 deletions(-) commit 9616bd2a66000a30ff912ac3b1e02391dc2d0c89 Author: Guenter Roeck Date: Tue Jan 3 02:43:32 2017 -0800 watchdog: iTCO_wdt: Simplify module init function The 'ret' variable in iTCO_wdt_init_module() does not add any value; drop it. Reviewed-by: Andy Shevchenko Mika Westerberg Signed-off-by: Guenter Roeck drivers/watchdog/iTCO_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 78e45696d55c0754384f81e628b57b4e865a2478 Author: Guenter Roeck Date: Mon Jan 2 09:27:36 2017 -0800 watchdog: iTCO_wdt: Use pdev for platform device and pci_dev for pci device Use pdev for struct platform_device, pci_dev for struct pci_dev, and dev for struct device variables to improve consistency. Remove 'struct platform_device *dev;' from struct iTCO_wdt_private since it was unused. Reviewed-by: Andy Shevchenko Mika Westerberg Signed-off-by: Guenter Roeck drivers/watchdog/iTCO_wdt.c | 53 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 27 deletions(-) commit c7bbcc87ac98c340cb6e68c70ea4b600734a04d2 Author: Guenter Roeck Date: Sun Jan 1 10:39:09 2017 -0800 watchdog: iTCO_wdt: Use device managed resources Using device managed resources simplifies error handling and cleanup, and to reduce the likelyhood of errors. Reviewed-by: Andy Shevchenko Mika Westerberg Signed-off-by: Guenter Roeck drivers/watchdog/iTCO_wdt.c | 80 ++++++++++----------------------------------- 1 file changed, 17 insertions(+), 63 deletions(-) commit ce1b95ca23c1265d63746e72f37ea8e546687361 Author: Guenter Roeck Date: Sun Jan 1 11:11:39 2017 -0800 watchdog: iTCO_wdt: Use allocated data structures Allocate private data and the watchdog device to avoid having to clear it on remove and to enable subsequent simplifications. Reviewed-by: Andy Shevchenko Mika Westerberg Signed-off-by: Guenter Roeck drivers/watchdog/iTCO_wdt.c | 402 ++++++++++++++++++++++---------------------- 1 file changed, 205 insertions(+), 197 deletions(-) commit 9bf2dfb0e4bce68d9c0b0109e150f6b099276957 Author: Colin Ian King Date: Thu Dec 29 21:49:18 2016 +0000 watchdog: orion: fix spelling mistake: "harcoded" -> "hardcoded" Trivial fix to spelling mistake in WARN message Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/watchdog/orion_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da2a68b3eb47b9fb071def3f374258b2ce454096 Author: Guenter Roeck Date: Thu Dec 29 07:20:23 2016 -0800 watchdog: Enable COMPILE_TEST where possible Building all watchdog drivers is all but impossible since many depend on platforms which are not enabled by test builds. Add dependency on COMPILE_TEST where possible to improve the situation. Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 118 +++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 59 deletions(-) commit e628a0c1fdcdcde69037822feb27d81d02e7658c Author: Guenter Roeck Date: Thu Dec 29 08:34:50 2016 -0800 watchdog: pnx833x_wdt: Mark as broken pnx833x_wdt does not compile if enabled. Bit operations expect an unsigned long as argument. If that is fixed, the build still fails because put_user, get_user, and copy_to_user are undefined. Mark it as broken. Signed-off-by: Guenter Roeck drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 98078ca34a0a71d012e88d6d0a7de18d11c44f96 Author: Hui Chun Ong Date: Wed Dec 28 15:51:40 2016 +0800 watchdog: nic7018_wdt: Add NIC7018 watchdog driver Add support for the watchdog timer on PXI Embedded Controller. Signed-off-by: Hui Chun Ong Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Documentation/watchdog/watchdog-parameters.txt | 5 + drivers/watchdog/Kconfig | 10 + drivers/watchdog/Makefile | 1 + drivers/watchdog/nic7018_wdt.c | 265 +++++++++++++++++++++++++ 4 files changed, 281 insertions(+) commit 6c368932f0d885e54b8af06d699b6d559e86f0cd Author: Bhumika Goyal Date: Mon Dec 26 22:35:11 2016 +0530 watchdog: constify watchdog_info structures Declare watchdog_info structures as const as they are only stored in the info field of watchdog_device structures. This field is of type const struct watchdog_info *, so watchdog_info structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_info i@p={...}; @ok@ identifier r1.i; position p; struct watchdog_device obj; @@ obj.info=&i@p; @bad@ position p!={r1.p,ok.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct watchdog_info i; Signed-off-by: Bhumika Goyal Acked-by: Florian Fainelli Acked-by: Baruch Siach Reviewed-by: Guenter Roeck Acked-by: Adam Thomson Signed-off-by: Guenter Roeck drivers/watchdog/bcm7038_wdt.c | 2 +- drivers/watchdog/bcm_kona_wdt.c | 2 +- drivers/watchdog/cadence_wdt.c | 2 +- drivers/watchdog/da9052_wdt.c | 2 +- drivers/watchdog/da9055_wdt.c | 2 +- drivers/watchdog/digicolor_wdt.c | 2 +- drivers/watchdog/imgpdc_wdt.c | 2 +- drivers/watchdog/kempld_wdt.c | 2 +- drivers/watchdog/lpc18xx_wdt.c | 2 +- drivers/watchdog/rn5t618_wdt.c | 2 +- drivers/watchdog/sbsa_gwdt.c | 2 +- drivers/watchdog/w83627hf_wdt.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) commit cb5f9d406d50fc01c6564956ed9317614e665208 Author: Bhumika Goyal Date: Sun Dec 25 13:30:24 2016 +0530 watchdog: pika_wdt: add __ro_after_init to ident The object ident of type watchdog_info structure is not modified after getting initialized by pikawdt_init. Apart from getting referenced in init it is also passed as an argument to the function copy_to_user but this argument is of type const void *. Therefore add __ro_after_init to its declaration. Signed-off-by: Bhumika Goyal Signed-off-by: Guenter Roeck drivers/watchdog/pika_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d97005e01445921b429e92d7c425a86f76050ab Author: Bhumika Goyal Date: Sat Dec 24 21:37:32 2016 +0530 watchdog: booke_wdt: add __ro_after_init to booke_wdt_info The object booke_wdt_info of watchdog_info structure is not modified after getting initialized by booke_wdt_init. Apart from getting referenced in init it is also stored in the info field of watchdog_device structure which is of type const struct watchdog_info *info. So, it becomes read only after init and therefore add __ro_after_init to it's declaration. Signed-off-by: Bhumika Goyal Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/watchdog/booke_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 027d89d96b6833f37091d858b9dcf92cd9b19aa7 Author: Vladimir Zapolskiy Date: Wed Dec 21 03:18:16 2016 +0200 watchdog: sa11x0/pxa: fix error path of driver initialization The change corrects release of captured resources on error path, namely the clock is disabled and put if misc device registration fails and not enabled clock is not disabled now. Fixes: 6924089c488e ("watchdog: sa11x0/pxa: get rid of get_clock_tick_rate") Signed-off-by: Vladimir Zapolskiy Acked-by: Robert Jarzmik Reviewed-by: Guenter Roeck Acked-by: Russell King Signed-off-by: Guenter Roeck drivers/watchdog/sa1100_wdt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f3519a662f5f8abf6411a238b1af08a0101878c7 Author: John Crispin Date: Tue Dec 20 19:56:59 2016 +0100 watchdog: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/watchdog/lantiq_wdt.c | 4 ++-- drivers/watchdog/mt7621_wdt.c | 4 ++-- drivers/watchdog/rt2880_wdt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 362142b25843fb059941aaa01b91501d5d8652cc Author: Jeff Layton Date: Fri Feb 24 13:25:23 2017 -0500 sunrpc: flag transports as having congestion control NFSv4 requires a transport protocol with congestion control in most cases. On an IP network, that means that NFSv4 over UDP should be forbidden. The situation with RDMA is a bit more nuanced, but most RDMA transports are suitable for this. For now, we assume that all RDMA transports are suitable, but we may need to revise that at some point. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_xprt.h | 1 + net/sunrpc/svcsock.c | 1 + net/sunrpc/xprtrdma/svc_rdma_transport.c | 8 ++++++++ 3 files changed, 10 insertions(+) commit 05a45a2db42543c5f1a32e08f545aebbd7cb4790 Author: Jeff Layton Date: Fri Feb 24 13:25:22 2017 -0500 sunrpc: turn bitfield flags in svc_version into bools It's just simpler to read this way, IMO. Also, no need to explicitly set vs_hidden to false in the nfsacl ones. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfs/callback_xdr.c | 4 ++-- fs/nfsd/nfs2acl.c | 1 - fs/nfsd/nfs3acl.c | 1 - fs/nfsd/nfs4proc.c | 2 +- include/linux/sunrpc/svc.h | 9 +++++---- net/sunrpc/svc.c | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) commit 4ab495bfe58dfe6b346ae3949a406163152919c8 Author: Rasmus Villemoes Date: Fri Feb 24 01:15:55 2017 +0100 nfsd: remove superfluous KERN_INFO dprintk already provides a KERN_* prefix; this KERN_INFO just shows up as some odd characters in the output. Simplify the message a bit while we're there. Signed-off-by: Rasmus Villemoes Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61febef40bfe8ab68259d8545257686e8a0d91d1 Author: Jens Axboe Date: Fri Feb 24 13:19:32 2017 -0700 dm-rq: don't dereference request payload after ending request Bart reported a case where dm would crash with use-after-free poison. This is due to dm_softirq_done() accessing memory associated with a request after calling end_request on it. This is most visible on !blk-mq, since we free the memory immediately for that case. Reported-by: Bart Van Assche Suggested-by: Linus Torvalds Fixes: eb8db831be80 ("dm: always defer request allocation to the owner of the request_queue") Signed-off-by: Jens Axboe drivers/md/dm-rq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a4d4426635804379d618dd28e29f574a2bc11184 Author: Stafford Horne Date: Sun Feb 5 18:55:40 2017 +0900 openrisc: head: Init r0 to 0 on start Originally openrisc spec 0 specified that r0 would be wired to ground. This is no longer the case. r0 is not guaranteed to be 0 at init, so we need to initialize it to 0 before using it. Also, if we are clearing r0 we cant use r0 to clear itself. Change the the CLEAR_GPR macro to use movhi for clearing. Reported-by: Jakob Viketoft Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a0eba4f7ebcdf81da0a4480d8fc514af4f76579e Author: Stafford Horne Date: Sun Feb 5 15:32:26 2017 +0900 openrisc: Export ioremap symbols used by modules Noticed this when building with allyesconfig. Got build failures due to iounmap and __ioremap symbols missing. This patch exports them so modules can use them. This is inline with other architectures. Signed-off-by: Stafford Horne arch/openrisc/mm/ioremap.c | 2 ++ 1 file changed, 2 insertions(+) commit e34f671d1cf8a032a8cd248a12eef217f1789c4c Author: Valentin Rothberg Date: Tue Jan 17 09:12:48 2017 +0100 arch/openrisc/lib/memcpy.c: use correct OR1200 option The Kconfig option for OR12000 is OR1K_1200. Signed-off-by: Valentin Rothberg Signed-off-by: Stafford Horne arch/openrisc/lib/memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ccffdf5e114176c14cb4aea584f77794a734865 Author: Stafford Horne Date: Sat Feb 25 05:06:22 2017 +0900 openrisc: head: Remove unused strings These string definitions are no longer used removed them. Noticed this while working on a CONFIG_DEBUG_INFO build issue. Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 11 ----------- 1 file changed, 11 deletions(-) commit da99f00ece82cb51ca5ead97008658e1dc49782b Author: Stafford Horne Date: Fri Jan 13 19:22:04 2017 +0900 openrisc: head: Move init strings to rodata section The strings used during the head/init phase of openrisc bootup were stored in the executable section of the binary. This causes compilation to fail when using CONFIG_DEBUG_INFO with error: Error: unaligned opcodes detected in executable segment Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 1 + 1 file changed, 1 insertion(+) commit e6d20c55a4d94eca419f80f996133f523ecedfe0 Author: Stafford Horne Date: Tue Jan 10 23:30:23 2017 +0900 openrisc: entry: Fix delay slot detection Use execption SR stored in pt_regs for detection, the current SR is not correct as the handler is running after return from exception. Also, The code that checks for a delay slot uses a flag bitmask and then wants to check if the result is not zero. The test it implemented was wrong. Correct it by changing the test to check result against non zero. Signed-off-by: Stafford Horne arch/openrisc/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ead7aba44e973b313fde0e39371363459cc1128 Author: Stafford Horne Date: Tue Jan 10 23:13:45 2017 +0900 openrisc: entry: Whitespace and comment cleanups Cleanups to whitespace and add some comments. Reading through the delay slot logic I noticed some things: - Delay slot instructions were not indented - Some comments are not lined up - Use tabs and spaces consistent with other code No functional change Signed-off-by: Stafford Horne arch/openrisc/kernel/entry.S | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit f72deab378db8eadb6d6eb06b6e2b90c9b681c81 Author: Stafford Horne Date: Tue Jan 3 16:15:03 2017 +0900 scripts/checkstack.pl: Add openrisc support Openrisc stack pointer is managed by decrementing r1. Add regexes to recognize this. Signed-off-by: Stafford Horne scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) commit 1b8c1012142d83229b7d1c960d131e6a30f777a6 Author: Geert Uytterhoeven Date: Fri Feb 24 11:30:03 2017 +0100 drivers: net: xgene: Simplify xgene_enet_setup_mss() to kill warning With gcc-4.1.2 and -Os: drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_start_xmit’: drivers/net/ethernet/apm/xgene/xgene_enet_main.c:297: warning: ‘mss_index’ may be used uninitialized in this function Using a separate variable to track success may confuse the compiler. Preinitialize mss_index with -EBUSY and check for negative error values instead to kill the warning. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9dfc96d72b879ebda9a0ed830af6aeee0141943d Author: Stafford Horne Date: Sat Dec 31 20:33:20 2016 +0900 MAINTAINERS: Add the openrisc official repository The openrisc official repository and patch work happens currently on github. Add the repo for reference. Signed-off-by: Stafford Horne MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f52092831b0713e1e2b934fe08460f1348f31888 Author: Stafford Horne Date: Sun Dec 18 01:13:34 2016 +0900 openrisc: Add .gitignore This helps to suppress the vmlinux.lds file. Signed-off-by: Stafford Horne arch/openrisc/kernel/.gitignore | 1 + 1 file changed, 1 insertion(+) commit f5d45dc9116b17ee830d3425ece1e9485c9bab88 Author: Stafford Horne Date: Mon Mar 21 16:16:46 2016 +0900 openrisc: Add optimized memcpy routine The generic memcpy routine provided in kernel does only byte copies. Using word copies we can lower boot time and cycles spend in memcpy quite significantly. Booting on my de0 nano I see boot times go from 7.2 to 5.6 seconds. The avg cycles in memcpy during boot go from 6467 to 1887. I tested several algorithms (see code in previous patch mails) The implementations I tested and avg cycles: - Word Copies + Loop Unrolls + Non Aligned 1882 - Word Copies + Loop Unrolls 1887 - Word Copies 2441 - Byte Copies + Loop Unrolls 6467 - Byte Copies 7600 In the end I ended up going with Word Copies + Loop Unrolls as it provides best tradeoff between simplicity and boot speedups. Signed-off-by: Stafford Horne arch/openrisc/TODO.openrisc | 1 - arch/openrisc/include/asm/string.h | 3 + arch/openrisc/lib/Makefile | 2 +- arch/openrisc/lib/memcpy.c | 124 +++++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 2 deletions(-) commit d857a1e253498feb231173218df26f5562c70f09 Author: Olof Kindgren Date: Fri Feb 6 13:41:51 2015 +0100 openrisc: Add optimized memset This adds a hand-optimized assembler version of memset and sets __HAVE_ARCH_MEMSET to use this version instead of the generic C routine Signed-off-by: Olof Kindgren Signed-off-by: Stafford Horne arch/openrisc/include/asm/string.h | 7 +++ arch/openrisc/kernel/or32_ksyms.c | 1 + arch/openrisc/lib/Makefile | 2 +- arch/openrisc/lib/memset.S | 98 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 1 deletion(-) commit e29d11c6991d078bf2011f25dc8c19a2f38c4c8e Author: Sebastian Macke Date: Sun Jul 20 15:13:31 2014 +0000 openrisc: Initial support for the idle state This patch adds basic support for the idle state of the cpu. The patch overrides the regular idle function, enables the interupts, checks for the power management unit and enables the cpu doze mode if available. Signed-off-by: Sebastian Macke [shorne@gmail.com: Fixed checkpatch, blankline after declarations] Signed-off-by: Stafford Horne arch/openrisc/kernel/process.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 79f8a4d022f2d11d4fc90f785f575ac331e2ef71 Author: Sebastian Macke Date: Sun Jul 20 15:13:30 2014 +0000 openrisc: Fix the bitmask for the unit present register The bits were swapped, as per spec and processor implementation the power management present bit is 9 and PIC bit is 8. This patch brings the definitions into spec. Signed-off-by: Sebastian Macke [shorne@gmail.com: Added commit body] Signed-off-by: Stafford Horne arch/openrisc/include/asm/spr_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89c94fdb9718d8ff3243faf8133a2176fd91f207 Author: Stefan Kristiansson Date: Sun Jul 20 01:00:31 2014 +0300 openrisc: remove unnecessary stddef.h include This causes the build to fail when building with the or1k-musl-linux- toolchain and it is not needed. Signed-off-by: Stafford Horne arch/openrisc/kernel/ptrace.c | 1 - 1 file changed, 1 deletion(-) commit 4ac46db1aaf16a009a8318cdba3acf03de85bcea Author: Stefan Kristiansson Date: Tue Jul 15 18:00:05 2014 +0300 openrisc: add futex_atomic_* implementations Support for the futex_atomic_* operations by using the load-link/store-conditional l.lwa/l.swa instructions. Most openrisc cores provide these instructions now if not available, emulation is provided. Acked-by: Peter Zijlstra (Intel) Cc: Peter Zijlstra Signed-off-by: Stefan Kristiansson [shorne@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] Signed-off-by: Stafford Horne arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm/futex.h | 135 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 1 deletion(-) commit bc19598f1dde267e5214e386b97bb647973275db Author: Stefan Kristiansson Date: Tue May 13 22:30:56 2014 +0300 openrisc: add optimized atomic operations Using the l.lwa and l.swa atomic instruction pair. Most openrisc processor cores provide these instructions now. If the instructions are not available emulation is provided. Acked-by: Peter Zijlstra (Intel) Cc: Peter Zijlstra Signed-off-by: Stefan Kristiansson [shorne@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [shorne@gmail.com: expand to implement all ops suggested by Peter Zijlstra https://lkml.org/lkml/2017/2/20/317] Signed-off-by: Stafford Horne arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm/atomic.h | 126 +++++++++++++++++++++++++++++++++++++ include/asm-generic/atomic.h | 2 + 3 files changed, 128 insertions(+), 1 deletion(-) commit 11595172537788f0007bfc16590aab18f2b9c40f Author: Stefan Kristiansson Date: Tue May 13 18:01:21 2014 +0300 openrisc: add cmpxchg and xchg implementations Optimized version that make use of the l.lwa and l.swa atomic instruction pair. Most openrisc cores provide these instructions now, if not available emulation is provided. Acked-by: Peter Zijlstra (Intel) Cc: Peter Zijlstra Signed-off-by: Stefan Kristiansson [shorne@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [shorne@gmail.com: fixed unused calculated value compiler warning in define cmpxchg] Signed-off-by: Stafford Horne arch/openrisc/include/asm/Kbuild | 2 - arch/openrisc/include/asm/cmpxchg.h | 83 +++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 2 deletions(-) commit 3b5923f0796b13e731802d40faf62d2c59d98e48 Author: Zhu Yanjun Date: Fri Feb 24 04:28:01 2017 -0500 rds: fix memory leak error When the function register_netdevice_notifier fails, the memory allocated by kmem_cache_create should be freed by the function kmem_cache_destroy. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Santosh Shilimkar Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0e9f9fd20ce931cc2cf0519c56ae33fc74d656ad Author: Stefan Kristiansson Date: Mon May 12 14:08:26 2014 +0300 openrisc: add atomic bitops This utilize the load-link/store-conditional l.lwa and l.swa instructions to implement the atomic bitops. When those instructions are not available emulation is provided. Acked-by: Peter Zijlstra (Intel) Cc: Peter Zijlstra Signed-off-by: Stefan Kristiansson [shorne@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666, implement test_and_change_bit] Signed-off-by: Stafford Horne arch/openrisc/include/asm/bitops.h | 2 +- arch/openrisc/include/asm/bitops/atomic.h | 123 ++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) commit 1158632b5a2dcce0786c1b1b99654e81cc867981 Author: Brian Russell Date: Fri Feb 24 17:47:11 2017 +0000 vxlan: don't allow overwrite of config src addr When using IPv6 transport and a default dst, a pointer to the configured source address is passed into the route lookup. If no source address is configured, then the value is overwritten. IPv6 route lookup ignores egress ifindex match if the source address is set, so if egress ifindex match is desired, the source address must be passed as any. The overwrite breaks this for subsequent lookups. Avoid this by copying the configured address to an existing stack variable and pass a pointer to that instead. Fixes: 272d96a5ab10 ("net: vxlan: lwt: Use source ip address during route lookup.") Signed-off-by: Brian Russell Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 54ea0046b6fe36ec18e82d282a29a18da6cdea0f Author: Ilya Dryomov Date: Sat Feb 11 18:48:41 2017 +0100 libceph, rbd, ceph: WRITE | ONDISK -> WRITE CEPH_OSD_FLAG_ONDISK is set in account_request(). Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Reviewed-by: Sage Weil drivers/block/rbd.c | 6 ++---- fs/ceph/addr.c | 14 +++++--------- fs/ceph/file.c | 15 ++++----------- net/ceph/cls_lock_client.c | 12 ++++++------ net/ceph/osd_client.c | 9 ++++----- 5 files changed, 21 insertions(+), 35 deletions(-) commit b18b9550e4059ceea0393c518eb323b95243f92f Author: Ilya Dryomov Date: Sat Feb 11 18:46:08 2017 +0100 libceph: get rid of ack vs commit - CEPH_OSD_FLAG_ACK shouldn't be set anymore, so assert on it - remove support for handling ack replies (OSDs will send ack replies only if clients request them) - drop the "do lingering callbacks under osd->lock" logic from handle_reply() -- lreq->lock is sufficient in all three cases Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Reviewed-by: Sage Weil include/linux/ceph/osd_client.h | 6 +-- net/ceph/osd_client.c | 113 +++++++++------------------------------- 2 files changed, 27 insertions(+), 92 deletions(-) commit 55f2a04588c5881d90e22631b17a84cd25d17cc4 Author: Ilya Dryomov Date: Mon Feb 13 14:44:19 2017 +0100 ceph: remove special ack vs commit behavior - ask for a commit reply instead of an ack reply in __ceph_pool_perm_get() - don't ask for both ack and commit replies in ceph_sync_write() - since just only one reply is requested now, i_unsafe_writes list will always be empty -- kill ceph_sync_write_wait() and go back to a standard ->evict_inode() Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Reviewed-by: Sage Weil fs/ceph/addr.c | 2 +- fs/ceph/caps.c | 2 -- fs/ceph/file.c | 88 +-------------------------------------------------------- fs/ceph/inode.c | 9 ------ fs/ceph/super.c | 1 - fs/ceph/super.h | 4 +-- 6 files changed, 3 insertions(+), 103 deletions(-) commit 70d625cbdbbb99e38953b8b7ac792a6471e68efb Author: Jaegeuk Kim Date: Wed Feb 22 17:02:32 2017 -0800 f2fs: do SSR for node segments more aggresively This patch gives more SSR chances for node blocks. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c192f7a4779559dddeb8c03de2b6ef499115c938 Author: Jaegeuk Kim Date: Wed Feb 22 17:10:18 2017 -0800 f2fs: find data segments across all the types Previously, if type is CURSEG_HOT_DATA, we only check CURSEG_HOT_DATA only. This patch fixes to search all the different types for SSR. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit d0db7703ac186ff2fbed1e8b862bd43ec3fd2812 Author: Jaegeuk Kim Date: Wed Feb 22 16:39:11 2017 -0800 f2fs: do SSR in higher priority Let's check SSR in prior to LFS allocation. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 035e97adab26c1121cedaeb9bd04cf48a8e8cf51 Author: Yunlong Song Date: Wed Feb 22 20:50:49 2017 +0800 f2fs: do SSR for data when there is enough free space In allocate_segment_by_default(), need_SSR() already detected it's time to do SSR. So, let's try to find victims for data segments more aggressively in time. Signed-off-by: Yunlong Song Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9cd20619e359d199b755543474c3d853c8e3415 Author: Hou Pengyang Date: Wed Feb 22 10:28:59 2017 +0000 f2fs: node segment is prior to data segment selected victim As data segment gc may lead dnode dirty, so the greedy cost for data segment should be valid blocks * 2, that is data segment is prior to node segment. Signed-off-by: Hou Pengyang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 3436c4bdb30de421d46f58c9174669fbcfd40ce0 Author: Yunlong Song Date: Tue Feb 21 16:59:26 2017 +0800 f2fs: put allocate_segment after refresh_sit_entry SIT information should be updated before segment allocation, since SSR needs latest valid block information. Current code does not update the old_blkaddr info in sit_entry, so adjust the allocate_segment to its proper location. Commit 5e443818fa0b2a2845561ee25bec181424fb2889 ("f2fs: handle dirty segments inside refresh_sit_entry") puts it into wrong location. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7dcdf941cdc96692ab99fd790c8cc68945514851 Author: David Forster Date: Fri Feb 24 14:20:32 2017 +0000 vti6: return GRE_KEY for vti6 Align vti6 with vti by returning GRE_KEY flag. This enables iproute2 to display tunnel keys on "ip -6 tunnel show" Signed-off-by: David Forster Signed-off-by: David S. Miller net/ipv6/ip6_vti.c | 4 ++++ 1 file changed, 4 insertions(+) commit 774521f353e1df1eeb1751775a924e7807465abe Author: Marc Dionne Date: Fri Feb 24 12:33:09 2017 +0000 rxrpc: Fix an assertion in rxrpc_read() In the rxrpc_read() function, which allows a user to read the contents of a key, we miscalculate the expected length of an encoded rxkad token by not taking into account the key length. However, the data is stored later anyway with an ENCODE_DATA() call - and an assertion failure then ensues when the lengths are checked at the end. Fix this by including the key length in the token size estimation. The following assertion is produced: Assertion failed - 384(0x180) == 380(0x17c) is false ------------[ cut here ]------------ kernel BUG at ../net/rxrpc/key.c:1221! invalid opcode: 0000 [#1] SMP Modules linked in: CPU: 2 PID: 2957 Comm: keyctl Not tainted 4.10.0-fscache+ #483 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 task: ffff8804013a8500 task.stack: ffff8804013ac000 RIP: 0010:rxrpc_read+0x10de/0x11b6 RSP: 0018:ffff8804013afe48 EFLAGS: 00010296 RAX: 000000000000003b RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000040001 RSI: 00000000000000f6 RDI: 0000000000000300 RBP: ffff8804013afed8 R08: 0000000000000001 R09: 0000000000000001 R10: ffff8804013afd90 R11: 0000000000000002 R12: 00005575f7c911b4 R13: 00005575f7c911b3 R14: 0000000000000157 R15: ffff880408a5d640 FS: 00007f8dfbc73700(0000) GS:ffff88041fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005575f7c91008 CR3: 000000040120a000 CR4: 00000000001406e0 Call Trace: keyctl_read_key+0xb6/0xd7 SyS_keyctl+0x83/0xe7 do_syscall_64+0x80/0x191 entry_SYSCALL64_slow_path+0x25/0x25 Signed-off-by: Marc Dionne Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f2767a64ab33847d5f028661b82d8d3a4fda99 Author: Florian Fainelli Date: Thu Feb 23 14:22:19 2017 -0800 net: phy: Add missing driver check in phy_aneg_done() Dan's static checker caught a potential code path in phy_state_machine() where we were not checking phydev->drv which is in phy_aneg_done(). Reported-by: Dan Carpenter Fixes: 25149ef9d25c ("net: phy: Check phydev->drv") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e37d6911f36545b286d15073f6f2222f840e81c Author: Matthias Schiffer Date: Thu Feb 23 17:19:41 2017 +0100 vxlan: correctly validate VXLAN ID against VXLAN_N_VID The incorrect check caused an off-by-one error: the maximum VID 0xffffff was unusable. Fixes: d342894c5d2f ("vxlan: virtual extensible lan") Signed-off-by: Matthias Schiffer Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 681a55d71799b575f46fe94121728cf67460d1c3 Author: Jon Paul Maloy Date: Thu Feb 23 11:10:31 2017 -0500 tipc: move premature initilalization of stack variables In the function tipc_rcv() we initialize a couple of stack variables from the message header before that same header has been validated. In rare cases when the arriving header is non-linar, the validation function itself may linearize the buffer by calling skb_may_pull(), while the wrongly initialized stack fields are not updated accordingly. We fix this in this commit. Reported-by: Matthew Wong Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit fbf68229ffe7e12c78b55714de08c1c34a2e2047 Author: LABBE Corentin Date: Thu Feb 23 14:12:25 2017 +0100 net: stmmac: unify registers dumps methods The stmmac driver have two methods for registers dumps: via ethtool and at init (if NETIF_MSG_HW is enabled). It is better to keep only one method, ethtool, since the other was ugly. This patch convert all dump_regs() function from "printing regs" to "fill the reg_space used by ethtool". Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 4 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 10 +-- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 16 ++--- .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 30 +++------ drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 15 ++--- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 12 +--- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 78 +++++++++++----------- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 22 +----- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 -- 9 files changed, 71 insertions(+), 121 deletions(-) commit ac65e2828d03ddf84e9fe1fb6d110d8de933dc22 Author: Nitin Gupta Date: Fri Feb 24 03:03:16 2017 -0800 sparc64: Fix build error in flush_tsb_user_page Patch "sparc64: Add 64K page size support" unconditionally used __flush_huge_tsb_one_entry() which is available only when hugetlb support is enabled. Another issue was incorrect TSB flushing for 64K pages in flush_tsb_user(). Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/hugetlbpage.c | 5 +++-- arch/sparc/mm/tsb.c | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) commit 77cc7aee099e7a7843835995101379405564f775 Author: Wu Fengguang Date: Thu Feb 23 20:47:01 2017 +0800 RDS: IB: fix ifnullfree.cocci warnings net/rds/ib.c:115:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Fengguang Wu Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dfcb9f4f99f1e9a49e43398a7bfbf56927544af1 Author: Marcelo Ricardo Leitner Date: Thu Feb 23 09:31:18 2017 -0300 sctp: deny peeloff operation on asocs with threads sleeping on it commit 2dcab5984841 ("sctp: avoid BUG_ON on sctp_wait_for_sndbuf") attempted to avoid a BUG_ON call when the association being used for a sendmsg() is blocked waiting for more sndbuf and another thread did a peeloff operation on such asoc, moving it to another socket. As Ben Hutchings noticed, then in such case it would return without locking back the socket and would cause two unlocks in a row. Further analysis also revealed that it could allow a double free if the application managed to peeloff the asoc that is created during the sendmsg call, because then sctp_sendmsg() would try to free the asoc that was created only for that call. This patch takes another approach. It will deny the peeloff operation if there is a thread sleeping on the asoc, so this situation doesn't exist anymore. This avoids the issues described above and also honors the syscalls that are already being handled (it can be multiple sendmsg calls). Joint work with Xin Long. Fixes: 2dcab5984841 ("sctp: avoid BUG_ON on sctp_wait_for_sndbuf") Cc: Alexander Popov Cc: Ben Hutchings Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 638f863dbbc8da16834ee0acc6ac10754f79c486 Author: Mark Rutland Date: Thu Feb 23 16:03:17 2017 +0000 arm64/cpufeature: check correct field width when updating sys_val When we're updating a register's sys_val, we use arm64_ftr_value() to find the new field value. We use cpuid_feature_extract_field() to find the new value, but this implicitly assumes a 4-bit field, so we may extract more bits than we mean to for fields like CTR_EL0.L1ip. This affects update_cpu_ftr_reg(), where we may extract erroneous values for ftr_cur and ftr_new. Depending on the additional bits extracted in either case, we may erroneously detect that the value is mismatched, and we'll try to compute a new safe value. Dependent on these extra bits and feature type, arm64_ftr_safe_value() may pessimistically select the always-safe value, or may erroneously choose either the extracted cur or new value as the safe option. The extra bits will subsequently be masked out in arm64_ftr_set_value(), so we may choose a higher value, yet write back a lower one. Fix this by passing the width down explicitly in arm64_ftr_value(), so we always extract the correct amount. Signed-off-by: Mark Rutland Reviewed-by: Suzuki K Poulose Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d81bbe6d882461dec4b71dbe2aa85565fcca4187 Author: Mark Rutland Date: Thu Feb 23 16:22:55 2017 +0000 Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate" This reverts commit 0bfc445dec9dd8130d22c9f4476eed7598524129. When we change the permissions of regions mapped using contiguous entries, the architecture requires us to follow a Break-Before-Make strategy, breaking *all* associated entries before we can change any of the following properties from the entries: - presence of the contiguous bit - output address - attributes - permissiones Failure to do so can result in a number of problems (e.g. TLB conflict aborts and/or erroneous results from TLB lookups). See ARM DDI 0487A.k_iss10775, "Misprogramming of the Contiguous bit", page D4-1762. We do not take this into account when altering the permissions of kernel segments in mark_rodata_ro(), where we change the permissions of live contiguous entires one-by-one, leaving them transiently inconsistent. This has been observed to result in failures on some fast model configurations. Unfortunately, we cannot follow Break-Before-Make here as we'd have to unmap kernel text and data used to perform the sequence. For the timebeing, revert commit 0bfc445dec9dd813 so as to avoid issues resulting from this misuse of the contiguous bit. Signed-off-by: Mark Rutland Acked-by: Ard Biesheuvel Reported-by: Jean-Philippe Brucker Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Cc: stable@vger.kernel.org # v4.10 Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) commit ea6eac904f0a5a0c223bcfb133ec880ba9c70ae3 Author: Shanker Donthineni Date: Wed Feb 22 21:10:48 2017 -0600 arm64: Avoid clobbering mm in erratum workaround on QDF2400 Commit 38fd94b0275c ("arm64: Work around Falkor erratum 1003") tried to work around a hardware erratum, but actually caused a system crash of its own during switch_mm: cpu_do_switch_mm+0x20/0x40 efi_virtmap_load+0x34/0x40 virt_efi_get_next_variable+0x64/0xc8 efivar_init+0x8c/0x348 efisubsys_init+0xd4/0x270 do_one_initcall+0x80/0x110 kernel_init_freeable+0x19c/0x240 kernel_init+0x10/0x100 ret_from_fork+0x10/0x50 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b In cpu_do_switch_mm, x1 contains the mm_struct pointer, which needs to be preserved by the pre_ttbr0_update_workaround macro rather than passed as a temporary. This patch clobbers x2 and x3 instead, keeping the mm_struct intact after the workaround has run. Fixes: 38fd94b0275c ("arm64: Work around Falkor erratum 1003") Tested-by: Manoj Iyer Signed-off-by: Shanker Donthineni Signed-off-by: Will Deacon arch/arm64/mm/proc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4f6c6f15a1f57e10374cf1a457f4eab5933bd0c Author: Phil Reid Date: Fri Feb 24 11:12:51 2017 +0800 rtc: ds3232: Call device_init_wakeup before device_register The wakealarm attribute is currently not exposed in the sysfs interface as the device has not been set as doing wakealarm when device_register is called. Changing the order of the calls fixes that problem. Interrupts are cleared in check_rtc_status prior to requesting the interrupt. This is only set if an irq is defined. If irq registration fails then set wakeup_capable to false. With this change the sysfs wakealarm attribute will be left visible but it is non functional. rtcwake still returns that the device is not enabled for wakeup. Signed-off-by: Phil Reid Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 41bfab35b3d0e0a85ed0c12d7bafd7484e96ca78 Author: Pei Zhang Date: Fri Feb 24 16:03:28 2017 +0800 drm/i915/gvt: add some new MMIOs to cmd_access white list Guest is now acces some MMIOs (0x215c, RING_INSTPM) through command which is not originally in gvt's white list. This cause huge error log printed in gvt. This patch addes these MMIOs to the white list. V2. change the commit message content. V3. remove duplicate defination of 0x20c0. V4. refine code style. Signed-off-by: Pei Zhang Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8bcd7c188bc479bea866d286a7dc0af9734c3c64 Author: Weinan Li Date: Fri Feb 24 17:07:38 2017 +0800 drm/i915/gvt: fix pcode mailbox write emulation of BDW Add pcode mailbox write emulation in gvt for BDW, reuse emulation code of Skylake. V2: refine comments, remove duplication defination of 0x138124, add IS_SKYLAKE() check for Skylake only pcode commands. Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 96b777452d8881480fd5be50112f791c17db4b6b Author: Konstantin Khlebnikov Date: Wed Feb 8 14:27:27 2017 +0300 sched/cgroup: Move sched_online_group() back into css_online() to fix crash Commit: 2f5177f0fd7e ("sched/cgroup: Fix/cleanup cgroup teardown/init") .. moved sched_online_group() from css_online() to css_alloc(). It exposes half-baked task group into global lists before initializing generic cgroup stuff. LTP testcase (third in cgroup_regression_test) written for testing similar race in kernels 2.6.26-2.6.28 easily triggers this oops: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: kernfs_path_from_node_locked+0x260/0x320 CPU: 1 PID: 30346 Comm: cat Not tainted 4.10.0-rc5-test #4 Call Trace: ? kernfs_path_from_node+0x4f/0x60 kernfs_path_from_node+0x3e/0x60 print_rt_rq+0x44/0x2b0 print_rt_stats+0x7a/0xd0 print_cpu+0x2fc/0xe80 ? __might_sleep+0x4a/0x80 sched_debug_show+0x17/0x30 seq_read+0xf2/0x3b0 proc_reg_read+0x42/0x70 __vfs_read+0x28/0x130 ? security_file_permission+0x9b/0xc0 ? rw_verify_area+0x4e/0xb0 vfs_read+0xa5/0x170 SyS_read+0x46/0xa0 entry_SYSCALL_64_fastpath+0x1e/0xad Here the task group is already linked into the global RCU-protected 'task_groups' list, but the css->cgroup pointer is still NULL. This patch reverts this chunk and moves online back to css_online(). Signed-off-by: Konstantin Khlebnikov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tejun Heo Cc: Thomas Gleixner Fixes: 2f5177f0fd7e ("sched/cgroup: Fix/cleanup cgroup teardown/init") Link: http://lkml.kernel.org/r/148655324740.424917.5302984537258726349.stgit@buzz Signed-off-by: Ingo Molnar kernel/sched/core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d1091c7fa3d52ebce4dd3f15d04155b3469b2f90 Author: Josh Poimboeuf Date: Tue Feb 21 15:35:32 2017 -0600 objtool: Improve detection of BUG() and other dead ends The BUG() macro's use of __builtin_unreachable() via the unreachable() macro tells gcc that the instruction is a dead end, and that it's safe to assume the current code path will not execute past the previous instruction. On x86, the BUG() macro is implemented with the 'ud2' instruction. When objtool's branch analysis sees that instruction, it knows the current code path has come to a dead end. Peter Zijlstra has been working on a patch to change the WARN macros to use 'ud2'. That patch will break objtool's assumption that 'ud2' is always a dead end. Generally it's best for objtool to avoid making those kinds of assumptions anyway. The more ignorant it is of kernel code internals, the better. So create a more generic way for objtool to detect dead ends by adding an annotation to the unreachable() macro. The annotation stores a pointer to the end of the unreachable code path in an '__unreachable' section. Objtool can read that section to find the dead ends. Tested-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/41a6d33971462ebd944a1c60ad4bf5be86c17b77.1487712920.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/vmlinux.lds.S | 1 + include/linux/compiler-gcc.h | 13 ++++++++- tools/objtool/arch.h | 5 ++-- tools/objtool/arch/x86/decode.c | 3 --- tools/objtool/builtin-check.c | 60 ++++++++++++++++++++++++++++++++++++++--- 5 files changed, 71 insertions(+), 11 deletions(-) commit 318b1dedcd39012624f466d281627553e9fa2570 Author: Elena Reshetova Date: Thu Feb 23 15:09:34 2017 +0200 locking/refcounts: Add missing kernel.h header to have UINT_MAX defined Fix header dependency. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Elena Reshetova Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1487855374-21993-1-git-send-email-elena.reshetova@intel.com Signed-off-by: Ingo Molnar include/linux/refcount.h | 1 + 1 file changed, 1 insertion(+) commit 29dee3c03abce04cd527878ef5f9e5f91b7b83f4 Author: Peter Zijlstra Date: Fri Feb 10 16:27:52 2017 +0100 locking/refcounts: Out-of-line everything Linus asked to please make this real C code. And since size then isn't an issue what so ever anymore, remove the debug knob and make all WARN()s unconditional. Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dwindsor@gmail.com Cc: elena.reshetova@intel.com Cc: gregkh@linuxfoundation.org Cc: ishkamiel@gmail.com Cc: keescook@chromium.org Signed-off-by: Ingo Molnar include/linux/refcount.h | 277 ++--------------------------------------------- lib/Kconfig.debug | 13 --- lib/Makefile | 2 +- lib/refcount.c | 267 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 280 insertions(+), 279 deletions(-) commit a499c3ead88ccf147fc50689e85a530ad923ce36 Author: Wanpeng Li Date: Tue Feb 21 23:52:55 2017 -0800 sched/fair: Update rq clock before changing a task's CPU affinity This is triggered during boot when CONFIG_SCHED_DEBUG is enabled: ------------[ cut here ]------------ WARNING: CPU: 6 PID: 81 at kernel/sched/sched.h:812 set_next_entity+0x11d/0x380 rq->clock_update_flags < RQCF_ACT_SKIP CPU: 6 PID: 81 Comm: torture_shuffle Not tainted 4.10.0+ #1 Hardware name: LENOVO ThinkCentre M8500t-N000/SHARKBAY, BIOS FBKTC1AUS 02/16/2016 Call Trace: dump_stack+0x85/0xc2 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 set_next_entity+0x11d/0x380 set_curr_task_fair+0x2b/0x60 do_set_cpus_allowed+0x139/0x180 __set_cpus_allowed_ptr+0x113/0x260 set_cpus_allowed_ptr+0x10/0x20 torture_shuffle+0xfd/0x180 kthread+0x10f/0x150 ? torture_shutdown_init+0x60/0x60 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x31/0x40 ---[ end trace dd94d92344cea9c6 ]--- The task is running && !queued, so there is no rq clock update before calling set_curr_task(). This patch fixes it by updating rq clock after holding rq->lock/pi_lock just as what other dequeue + put_prev + enqueue + set_curr story does. Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1487749975-5994-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) commit 8cb68b343a66cf19834472012590490d34d31703 Author: Peter Zijlstra Date: Thu Feb 2 16:55:06 2017 +0100 sched/core: Fix update_rq_clock() splat on hotplug (and suspend/resume) The hotplug code still triggers the warning about using a stale rq->clock value. Fix things up to actually run update_rq_clock() in a place where we record the 'UPDATED' flag, and then modify the annotation to retain this flag over the rq->lock fiddling that happens as a result of actually migrating all the tasks elsewhere. Reported-by: Linus Torvalds Tested-by: Mike Galbraith Tested-by: Sachin Sant Tested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Matt Fleming Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Ross Zwisler Cc: Thomas Gleixner Fixes: 4d25b35ea372 ("sched/fair: Restore previous rq_flags when migrating tasks in hotplug") Link: http://lkml.kernel.org/r/20170202155506.GX6515@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 1572e45a924f254d9570093abde46430c3172e3d Author: Tan Xiaojun Date: Thu Feb 23 14:04:39 2017 +0800 perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: 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 Link: http://lkml.kernel.org/r/1487829879-56237-1-git-send-email-tanxiaojun@huawei.com Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bbba0eb1af34694868d028b80475981f90e6bee Author: Peter Zijlstra Date: Wed Feb 15 16:12:20 2017 +0100 perf/core: Fix perf_event_enable_on_exec() timekeeping (again) Where commit: 7fce250915ef ("perf: Fix scaling vs. perf_event_enable_on_exec()") disabled the ctx-time a-priory, such that all events get enabled and scheduled at the time point in time, there is one hole in that patch, when no events do get enabled nothing re-enables the ctx-time. Reported-by: Ravi Bangoria Reported-by: Anton Blanchard Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 7fce250915ef ("perf: Fix scaling vs. perf_event_enable_on_exec()") Signed-off-by: Ingo Molnar kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 279b5165ffadf57e2596e0ad438cb9b69b76f320 Author: Peter Zijlstra Date: Thu Feb 16 10:28:37 2017 +0100 perf/core: Remove confusing comment and move put_ctx() Since commit: 321027c1fe77 ("perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race") ... the code looks like (assuming move_group==1): gctx = __perf_event_ctx_lock_double(group_leader, ctx); perf_remove_from_context(group_leader, 0); list_for_each_entry(sibling, &group_leader->sibling_list, group_entry) { perf_remove_from_context(sibling, 0); put_ctx(gctx); } /* ... */ /* misleading comment about how this is the last reference */ put_ctx(gctx); perf_event_ctx_unlock(group_leader, gctx); What that 'last' put_ctx() does is drop @group_leader's reference on gctx after having dropped all its potential sibling references. But the thing is that __perf_event_ctx_lock_double() returns with a reference _and_ a held lock, and perf_event_ctx_unlock() unlocks that lock and drops that reference. Therefore that put_ctx() cannot be the 'last' of anything, nor is there an unbalance in puts. To reduce confusion, remove the comment and place the put_ctx() next to the remove_from_context() call. Reported-by: Ben Hutchings 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 Signed-off-by: Ingo Molnar kernel/events/core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit fb94a687d96c570d46332a4a890f1dcb7310e643 Author: Martin Schwidefsky Date: Fri Feb 24 07:43:51 2017 +0100 s390: TASK_SIZE for kernel threads Return a sensible value if TASK_SIZE if called from a kernel thread. This gets us around an issue with copy_mount_options that does a magic size calculation "TASK_SIZE - (unsigned long)data" while in a kernel thread and data pointing to kernel space. Cc: Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2793784307688a7a72bd322727a2cb11dede875f Author: Martin Schwidefsky Date: Fri Nov 4 11:57:15 2016 +0100 s390/crypt: Add protected key AES module This patch introduces a new in-kernel-crypto blockcipher called 'paes' which implements AES with protected keys. The paes blockcipher can be used similar to the aes blockcipher but uses secure key material to derive the working protected key and so offers an encryption implementation where never a clear key value is exposed in memory. The paes module is only available for the s390 platform providing a minimal hardware support of CPACF enabled with at least MSA level 3. Upon module initialization these requirements are checked. Includes additional contribution from Harald Freudenberger. Signed-off-by: Martin Schwidefsky arch/s390/crypto/Makefile | 2 +- arch/s390/crypto/paes_s390.c | 619 ++++++++++++++++++++++++++++++++++++++++++ arch/s390/include/asm/cpacf.h | 14 +- drivers/crypto/Kconfig | 1 + 4 files changed, 634 insertions(+), 2 deletions(-) commit d1a513be1f0a25f094e1577d059b9aebaa279bb2 Author: Zhenyu Wang Date: Fri Feb 24 10:58:21 2017 +0800 drm/i915/gvt: add resolution definition for vGPU type This assigns resolution definition for each vGPU type. For smaller resource type we should limit max resolution, so e.g limit to 1024x768 for 64M type, others are still default to 1920x1200. v2: Fix for actual 1920x1200 resolution Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 15 ++++++++++----- drivers/gpu/drm/i915/gvt/display.h | 14 +++++++++++++- drivers/gpu/drm/i915/gvt/gvt.h | 2 ++ drivers/gpu/drm/i915/gvt/kvmgt.c | 8 ++++---- drivers/gpu/drm/i915/gvt/vgpu.c | 18 +++++++++++------- 5 files changed, 40 insertions(+), 17 deletions(-) commit bca5609fcc401b0055a3c01ecc33c5f6fb67af7b Author: Zhenyu Wang Date: Fri Feb 24 10:58:20 2017 +0800 drm/i915/gvt: Add more edid definition support We'll need to apply different resolution for vgpu types, so this adds more EDID types definition. v2: fix typo for actual 1920x1200 resolution Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 112 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/gvt/display.h | 6 ++ 2 files changed, 80 insertions(+), 38 deletions(-) commit f1ef09fde17f9b77ca1435a5b53a28b203afb81c Merge: ef96152 ace0c79 Author: Linus Torvalds Date: Thu Feb 23 20:33:51 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace updates from Eric Biederman: "There is a lot here. A lot of these changes result in subtle user visible differences in kernel behavior. I don't expect anything will care but I will revert/fix things immediately if any regressions show up. From Seth Forshee there is a continuation of the work to make the vfs ready for unpriviled mounts. We had thought the previous changes prevented the creation of files outside of s_user_ns of a filesystem, but it turns we missed the O_CREAT path. Ooops. Pavel Tikhomirov and Oleg Nesterov worked together to fix a long standing bug in the implemenation of PR_SET_CHILD_SUBREAPER where only children that are forked after the prctl are considered and not children forked before the prctl. The only known user of this prctl systemd forks all children after the prctl. So no userspace regressions will occur. Holding earlier forked children to the same rules as later forked children creates a semantic that is sane enough to allow checkpoing of processes that use this feature. There is a long delayed change by Nikolay Borisov to limit inotify instances inside a user namespace. Michael Kerrisk extends the API for files used to maniuplate namespaces with two new trivial ioctls to allow discovery of the hierachy and properties of namespaces. Konstantin Khlebnikov with the help of Al Viro adds code that when a network namespace exits purges it's sysctl entries from the dcache. As in some circumstances this could use a lot of memory. Vivek Goyal fixed a bug with stacked filesystems where the permissions on the wrong inode were being checked. I continue previous work on ptracing across exec. Allowing a file to be setuid across exec while being ptraced if the tracer has enough credentials in the user namespace, and if the process has CAP_SETUID in it's own namespace. Proc files for setuid or otherwise undumpable executables are now owned by the root in the user namespace of their mm. Allowing debugging of setuid applications in containers to work better. A bug I introduced with permission checking and automount is now fixed. The big change is to mark the mounts that the kernel initiates as a result of an automount. This allows the permission checks in sget to be safely suppressed for this kind of mount. As the permission check happened when the original filesystem was mounted. Finally a special case in the mount namespace is removed preventing unbounded chains in the mount hash table, and making the semantics simpler which benefits CRIU. The vfs fix along with related work in ima and evm I believe makes us ready to finish developing and merge fully unprivileged mounts of the fuse filesystem. The cleanups of the mount namespace makes discussing how to fix the worst case complexity of umount. The stacked filesystem fixes pave the way for adding multiple mappings for the filesystem uids so that efficient and safer containers can be implemented" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: proc/sysctl: Don't grab i_lock under sysctl_lock. vfs: Use upper filesystem inode in bprm_fill_uid() proc/sysctl: prune stale dentries during unregistering mnt: Tuck mounts under others instead of creating shadow/side mounts. prctl: propagate has_child_subreaper flag to every descendant introduce the walk_process_tree() helper nsfs: Add an ioctl() to return owner UID of a userns fs: Better permission checking for submounts exit: fix the setns() && PR_SET_CHILD_SUBREAPER interaction vfs: open() with O_CREAT should not create inodes with unknown ids nsfs: Add an ioctl() to return the namespace type proc: Better ownership of files for non-dumpable tasks in user namespaces exec: Remove LSM_UNSAFE_PTRACE_CAP exec: Test the ptracer's saved cred to see if the tracee can gain caps exec: Don't reset euid and egid when the tracee has CAP_SETUID inotify: Convert to using per-namespace limits commit ef96152e6a36e0510387cb174178b7982c1ae879 Merge: d5500a0 64a5771 Author: Linus Torvalds Date: Thu Feb 23 18:58:18 2017 -0800 Merge tag 'drm-for-v4.11-less-shouty' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for v4.11. Nothing too major, the tinydrm and mmu-less support should make writing smaller drivers easier for some of the simpler platforms, and there are a bunch of documentation updates. Intel grew displayport MST audio support which is hopefully useful to people, and FBC is on by default for GEN9+ (so people know where to look for regressions). AMDGPU has a lot of fixes that would like new firmware files installed for some GPUs. Other than that it's pretty scattered all over. I may have a follow up pull request as I know BenH has a bunch of AST rework and fixes and I'd like to get those in once they've been tested by AST, and I've got at least one pull request I'm just trying to get the author to fix up. Core: - drm_mm reworked - Connector list locking and iterators - Documentation updates - Format handling rework - MMU-less support for fbdev helpers - drm_crtc_from_index helper - Core CRC API - Remove drm_framebuffer_unregister_private - Debugfs cleanup - EDID/Infoframe fixes - Release callback - Tinydrm support (smaller drivers for simple hw) panel: - Add support for some new simple panels i915: - FBC by default for gen9+ - Shared dpll cleanups and docs - GEN8 powerdomain cleanup - DMC support on GLK - DP MST audio support - HuC loading support - GVT init ordering fixes - GVT IOMMU workaround fix amdgpu/radeon: - Power/clockgating improvements - Preliminary SR-IOV support - TTM buffer priority and eviction fixes - SI DPM quirks removed due to firmware fixes - Powerplay improvements - VCE/UVD powergating fixes - Cleanup SI GFX code to match CI/VI - Support for > 2 displays on 3/5 crtc asics - SI headless fixes nouveau: - Rework securre boot code in prep for GP10x secure boot - Channel recovery improvements - Initial power budget code - MMU rework preperation vmwgfx: - Bunch of fixes and cleanups exynos: - Runtime PM support for MIC driver - Cleanups to use atomic helpers - UHD Support for TM2/TM2E boards - Trigger mode fix for Rinato board etnaviv: - Shader performance fix - Command stream validator fixes - Command buffer suballocator rockchip: - CDN DisplayPort support - IOMMU support for arm64 platform imx-drm: - Fix i.MX5 TV encoder probing - Remove lower fb size limits msm: - Support for HW cursor on MDP5 devices - DSI encoder cleanup - GPU DT bindings cleanup sti: - stih410 cleanups - Create fbdev at binding - HQVDP fixes - Remove stih416 chip functionality - DVI/HDMI mode selection fixes - FPS statistic reporting omapdrm: - IRQ code cleanup dwi-hdmi bridge: - Cleanups and fixes adv-bridge: - Updates for nexus sii8520 bridge: - Add interlace mode support - Rework HDMI and lots of fixes qxl: - probing/teardown cleanups ZTE drm: - HDMI audio via SPDIF interface - Video Layer overlay plane support - Add TV encoder output device atmel-hlcdc: - Rework fbdev creation logic tegra: - OF node fix fsl-dcu: - Minor fixes mali-dp: - Assorted fixes sunxi: - Minor fix" [ This was the "fixed" pull, that still had build warnings due to people not even having build tested the result. I'm not a happy camper I've fixed the things I noticed up in this merge. - Linus ] * tag 'drm-for-v4.11-less-shouty' of git://people.freedesktop.org/~airlied/linux: (1177 commits) lib/Kconfig: make PRIME_NUMBERS not user selectable drm/tinydrm: helpers: Properly fix backlight dependency drm/tinydrm: mipi-dbi: Fix field width specifier warning drm/tinydrm: mipi-dbi: Silence: ‘cmd’ may be used uninitialized drm/sti: fix build warnings in sti_drv.c and sti_vtg.c files drm/amd/powerplay: fix PSI feature on Polars12 drm/amdgpu: refuse to reserve io mem for split VRAM buffers drm/ttm: fix use-after-free races in vm fault handling drm/tinydrm: Add support for Multi-Inno MI0283QT display dt-bindings: Add Multi-Inno MI0283QT binding dt-bindings: display/panel: Add common rotation property of: Add vendor prefix for Multi-Inno drm/tinydrm: Add MIPI DBI support drm/tinydrm: Add helper functions drm: Add DRM support for tiny LCD displays drm/amd/amdgpu: post card if there is real hw resetting performed drm/nouveau/tmr: provide backtrace when a timeout is hit drm/nouveau/pci/g92: Fix rearm drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios drm/nouveau/hwmon: expose power_max and power_crit .. commit 64a577196d66b44e37384bc5c4d78c61f59d5b2a Author: Dave Airlie Date: Fri Feb 24 12:11:21 2017 +1000 lib/Kconfig: make PRIME_NUMBERS not user selectable. Linus doesn't like it user selectable, so kill it until someone needs it for something else. Signed-off-by: Dave Airlie lib/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fef80a4b9c8ed5a48d44ea4a74b68afe13d73ae Author: Noralf Trønnes Date: Thu Feb 23 14:29:57 2017 +0100 drm/tinydrm: helpers: Properly fix backlight dependency BACKLIGHT_CLASS_DEVICE was selected in the last version of the tinydrm patchset to fix the backlight dependency, but the ifdef CONFIG_BACKLIGHT_CLASS_DEVICE was forgotten. Fix that. Signed-off-by: Noralf Trønnes Signed-off-by: Dave Airlie include/drm/tinydrm/tinydrm-helpers.h | 19 ------------------- 1 file changed, 19 deletions(-) commit ce8c0137001e3ac237830a6059addaee3b5e0e26 Author: Noralf Trønnes Date: Thu Feb 23 14:29:56 2017 +0100 drm/tinydrm: mipi-dbi: Fix field width specifier warning This warning is seen on 64-bit builds in functions: 'mipi_dbi_typec1_command': 'mipi_dbi_typec3_command_read': 'mipi_dbi_typec3_command': >> drivers/gpu/drm/tinydrm/mipi-dbi.c:65:20: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=] DRM_DEBUG_DRIVER("cmd=%02x, par=%*ph\n", cmd, len, data); \ ^ include/drm/drmP.h:228:40: note: in definition of macro 'DRM_DEBUG_DRIVER' drm_printk(KERN_DEBUG, DRM_UT_DRIVER, fmt, ##__VA_ARGS__) ^~~ >> drivers/gpu/drm/tinydrm/mipi-dbi.c:671:2: note: in expansion of macro 'MIPI_DBI_DEBUG_COMMAND' MIPI_DBI_DEBUG_COMMAND(cmd, parameters, num); ^~~~~~~~~~~~~~~~~~~~~~ Fix by casting 'len' to int in the macro MIPI_DBI_DEBUG_COMMAND(). There is no chance of overflow. Signed-off-by: Noralf Trønnes Signed-off-by: Dave Airlie drivers/gpu/drm/tinydrm/mipi-dbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b401f34314db7c60e6d23ee7771cd090b4ef56c1 Author: Noralf Trønnes Date: Thu Feb 23 14:29:55 2017 +0100 drm/tinydrm: mipi-dbi: Silence: ‘cmd’ may be used uninitialized Fix this warning: drivers/gpu/drm/tinydrm/mipi-dbi.c: In function ‘mipi_dbi_debugfs_command_write’: drivers/gpu/drm/tinydrm/mipi-dbi.c:905:8: warning: ‘cmd’ may be used uninitialized in this function [-Wmaybe-uninitialized] ret = mipi_dbi_command_buf(mipi, cmd, parameters, i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cmd can't be used uninitialized, but to satisfy the compiler, initialize it to zero. Signed-off-by: Noralf Trønnes Signed-off-by: Dave Airlie drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5500a074741b78b7f778b4ab3415d5ecdcda0a7 Merge: b2e3c43 4deaa6f Author: Linus Torvalds Date: Thu Feb 23 16:55:48 2017 -0800 Merge tag 'usercopy-v4.11-rc1.fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull usercopy test fix from Kees Cook: "Fix for non-MMU ARM testing, from Arnd Bergmann" * tag 'usercopy-v4.11-rc1.fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: usercopy: ARM NOMMU has no 64-bit get_user commit 263d3995c93c6020576f6c93506412a0b9d1e932 Author: Filipe Manana Date: Fri Feb 17 18:43:57 2017 +0000 Btrfs: try harder to migrate items to left sibling before splitting a leaf Before attempting to split a leaf we try to migrate items from the leaf to its right and left siblings. We start by trying to move items into the rigth sibling and, if the new item is meant to be inserted at the end of our leaf, we try to free from our leaf an amount of bytes equal to the number of bytes used by the new item, by setting the variable space_needed to the byte size of that new item. However if we fail to move enough items to the right sibling due to lack of space in that sibling, we then try to move items into the left sibling, and in that case we try to free an amount equal to the size of the new item from our leaf, when we need only to free an amount corresponding to the size of the new item minus the current free space of our leaf. So make sure that before we try to move items to the left sibling we do set the variable space_needed with a value corresponding to the new item's size minus the leaf's current free space. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/ctree.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 76b42abbf7488121c4f9f1ea5941123306e25d99 Author: Filipe Manana Date: Tue Feb 14 16:56:01 2017 +0000 Btrfs: fix data loss after truncate when using the no-holes feature If we have a file with an implicit hole (NO_HOLES feature enabled) that has an extent following the hole, delayed writes against regions of the file behind the hole happened before but were not yet flushed and then we truncate the file to a smaller size that lies inside the hole, we end up persisting a wrong disk_i_size value for our inode that leads to data loss after umounting and mounting again the filesystem or after the inode is evicted and loaded again. This happens because at inode.c:btrfs_truncate_inode_items() we end up setting last_size to the offset of the extent that we deleted and that followed the hole. We then pass that value to btrfs_ordered_update_i_size() which updates the inode's disk_i_size to a value smaller then the offset of the buffered (delayed) writes. Example reproducer: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0x01 0K 32K" /mnt/foo $ xfs_io -d -c "pwrite -S 0x02 -b 32K 64K 32K" /mnt/foo $ xfs_io -c "truncate 60K" /mnt/foo --> inode's disk_i_size updated to 0 $ md5sum /mnt/foo 3c5ca3c3ab42f4b04d7e7eb0b0d4d806 /mnt/foo $ umount /dev/sdb $ mount /dev/sdb /mnt $ md5sum /mnt/foo d41d8cd98f00b204e9800998ecf8427e /mnt/foo --> Empty file, all data lost! Cc: # 3.14+ Fixes: 16e7549f045d ("Btrfs: incompatible format change to remove hole extents") Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/inode.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 82bfb2e7b645c8f228dc3b6d3b27b0b10125ca4f Author: Filipe Manana Date: Tue Feb 14 17:56:32 2017 +0000 Btrfs: incremental send, fix unnecessary hole writes for sparse files When using the NO_HOLES feature, during an incremental send we often issue write operations for holes when we should not, because that range is already a hole in the destination snapshot. While that does not change the contents of the file at the receiver, it avoids preservation of file holes, leading to wasted disk space and extra IO during send/receive. A couple examples where the holes are not preserved follows. $ mkfs.btrfs -O no-holes -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xaa 0 4K" /mnt/foo $ xfs_io -f -c "pwrite -S 0xaa 0 4K" -c "pwrite -S 0xbb 1028K 4K" /mnt/bar $ btrfs subvolume snapshot -r /mnt /mnt/snap1 # Now add one new extent to our first test file, increasing its size and # leaving a 1Mb hole between the first extent and this new extent. $ xfs_io -c "pwrite -S 0xbb 1028K 4K" /mnt/foo # Now overwrite the last extent of our second test file. $ xfs_io -c "pwrite -S 0xcc 1028K 4K" /mnt/bar $ btrfs subvolume snapshot -r /mnt /mnt/snap2 $ xfs_io -r -c "fiemap -v" /mnt/snap2/foo /mnt/snap2/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..7]: 25088..25095 8 0x2000 1: [8..2055]: hole 2048 2: [2056..2063]: 24576..24583 8 0x2001 $ xfs_io -r -c "fiemap -v" /mnt/snap2/bar /mnt/snap2/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..7]: 25096..25103 8 0x2000 1: [8..2055]: hole 2048 2: [2056..2063]: 24584..24591 8 0x2001 $ btrfs send /mnt/snap1 -f /tmp/1.snap $ btrfs send -p /mnt/snap1 /mnt/snap2 -f /tmp/2.snap $ umount /mnt # It's not relevant to enable no-holes in the new filesystem. $ mkfs.btrfs -O no-holes -f /dev/sdc $ mount /dev/sdc /mnt $ btrfs receive /mnt -f /tmp/1.snap $ btrfs receive /mnt -f /tmp/2.snap $ xfs_io -r -c "fiemap -v" /mnt/snap2/foo /mnt/snap2/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..7]: 24576..24583 8 0x2000 1: [8..2063]: 25624..27679 2056 0x1 $ xfs_io -r -c "fiemap -v" /mnt/snap2/bar /mnt/snap2/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..7]: 24584..24591 8 0x2000 1: [8..2063]: 27680..29735 2056 0x1 The holes do not exist in the second filesystem and they were replaced with extents filled with the byte 0x00, making each file take 1032Kb of space instead of 8Kb. So fix this by not issuing the write operations consisting of buffers filled with the byte 0x00 when the destination snapshot already has a hole for the respective range. A test case for fstests will follow soon. Signed-off-by: Filipe Manana fs/btrfs/send.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 2 deletions(-) commit a9b9477db2937934e469db800317ec3ef7e81b51 Author: Filipe Manana Date: Sat Feb 4 17:12:00 2017 +0000 Btrfs: fix use-after-free due to wrong order of destroying work queues Before we destroy all work queues (and wait for their tasks to complete) we were destroying the work queues used for metadata I/O operations, which can result in a use-after-free problem because most tasks from all work queues do metadata I/O operations. For example, the tasks from the caching workers work queue (fs_info->caching_workers), which is destroyed only after the work queue used for metadata reads (fs_info->endio_meta_workers) is destroyed, do metadata reads, which result in attempts to queue tasks into the later work queue, triggering a use-after-free with a trace like the following: [23114.613543] general protection fault: 0000 [#1] PREEMPT SMP [23114.614442] Modules linked in: dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c btrfs xor raid6_pq dm_flakey dm_mod crc32c_generic acpi_cpufreq tpm_tis tpm_tis_core tpm ppdev parport_pc parport i2c_piix4 processor sg evdev i2c_core psmouse pcspkr serio_raw button loop autofs4 ext4 crc16 jbd2 mbcache sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix virtio_pci libata virtio_ring virtio e1000 scsi_mod floppy [last unloaded: scsi_debug] [23114.616932] CPU: 9 PID: 4537 Comm: kworker/u32:8 Not tainted 4.9.0-rc7-btrfs-next-36+ #1 [23114.616932] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [23114.616932] Workqueue: btrfs-cache btrfs_cache_helper [btrfs] [23114.616932] task: ffff880221d45780 task.stack: ffffc9000bc50000 [23114.616932] RIP: 0010:[] [] btrfs_queue_work+0x2c/0x190 [btrfs] [23114.616932] RSP: 0018:ffff88023f443d60 EFLAGS: 00010246 [23114.616932] RAX: 0000000000000000 RBX: 6b6b6b6b6b6b6b6b RCX: 0000000000000102 [23114.616932] RDX: ffffffffa0419000 RSI: ffff88011df534f0 RDI: ffff880101f01c00 [23114.616932] RBP: ffff88023f443d80 R08: 00000000000f7000 R09: 000000000000ffff [23114.616932] R10: ffff88023f443d48 R11: 0000000000001000 R12: ffff88011df534f0 [23114.616932] R13: ffff880135963868 R14: 0000000000001000 R15: 0000000000001000 [23114.616932] FS: 0000000000000000(0000) GS:ffff88023f440000(0000) knlGS:0000000000000000 [23114.616932] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [23114.616932] CR2: 00007f0fb9f8e520 CR3: 0000000001a0b000 CR4: 00000000000006e0 [23114.616932] Stack: [23114.616932] ffff880101f01c00 ffff88011df534f0 ffff880135963868 0000000000001000 [23114.616932] ffff88023f443da0 ffffffffa03470af ffff880149b37200 ffff880135963868 [23114.616932] ffff88023f443db8 ffffffff8125293c ffff880149b37200 ffff88023f443de0 [23114.616932] Call Trace: [23114.616932] [23114.616932] [] end_workqueue_bio+0xd5/0xda [btrfs] [23114.616932] [] bio_endio+0x54/0x57 [23114.616932] [] btrfs_end_bio+0xf7/0x106 [btrfs] [23114.616932] [] bio_endio+0x54/0x57 [23114.616932] [] blk_update_request+0x21a/0x30f [23114.616932] [] scsi_end_request+0x31/0x182 [scsi_mod] [23114.616932] [] scsi_io_completion+0x1ce/0x4c8 [scsi_mod] [23114.616932] [] scsi_finish_command+0x104/0x10d [scsi_mod] [23114.616932] [] scsi_softirq_done+0x101/0x10a [scsi_mod] [23114.616932] [] blk_done_softirq+0x82/0x8d [23114.616932] [] __do_softirq+0x1ab/0x412 [23114.616932] [] irq_exit+0x49/0x99 [23114.616932] [] smp_call_function_single_interrupt+0x24/0x26 [23114.616932] [] call_function_single_interrupt+0x89/0x90 [23114.616932] [23114.616932] [] ? scsi_request_fn+0x13a/0x2a1 [scsi_mod] [23114.616932] [] ? _raw_spin_unlock_irq+0x2c/0x4a [23114.616932] [] ? _raw_spin_unlock_irq+0x32/0x4a [23114.616932] [] ? _raw_spin_unlock_irq+0x2c/0x4a [23114.616932] [] scsi_request_fn+0x13a/0x2a1 [scsi_mod] [23114.616932] [] __blk_run_queue_uncond+0x22/0x2b [23114.616932] [] __blk_run_queue+0x19/0x1b [23114.616932] [] blk_queue_bio+0x268/0x282 [23114.616932] [] generic_make_request+0xbd/0x160 [23114.616932] [] submit_bio+0x100/0x11d [23114.616932] [] ? __this_cpu_preempt_check+0x13/0x15 [23114.616932] [] ? __percpu_counter_add+0x8e/0xa7 [23114.616932] [] btrfsic_submit_bio+0x1a/0x1d [btrfs] [23114.616932] [] btrfs_map_bio+0x1f4/0x26d [btrfs] [23114.616932] [] btree_submit_bio_hook+0x74/0xbf [btrfs] [23114.616932] [] ? btrfs_wq_submit_bio+0x160/0x160 [btrfs] [23114.616932] [] submit_one_bio+0x6b/0x89 [btrfs] [23114.616932] [] read_extent_buffer_pages+0x170/0x1ec [btrfs] [23114.616932] [] ? free_root_pointers+0x64/0x64 [btrfs] [23114.616932] [] readahead_tree_block+0x3f/0x4c [btrfs] [23114.616932] [] read_block_for_search.isra.20+0x1ce/0x23d [btrfs] [23114.616932] [] btrfs_search_slot+0x65f/0x774 [btrfs] [23114.616932] [] ? free_extent_buffer+0x73/0x7e [btrfs] [23114.616932] [] btrfs_next_old_leaf+0xa1/0x33c [btrfs] [23114.616932] [] btrfs_next_leaf+0x10/0x12 [btrfs] [23114.616932] [] caching_thread+0x22d/0x416 [btrfs] [23114.616932] [] btrfs_scrubparity_helper+0x187/0x3b6 [btrfs] [23114.616932] [] btrfs_cache_helper+0xe/0x10 [btrfs] [23114.616932] [] process_one_work+0x273/0x4e4 [23114.616932] [] worker_thread+0x1eb/0x2ca [23114.616932] [] ? rescuer_thread+0x2b6/0x2b6 [23114.616932] [] kthread+0xd5/0xdd [23114.616932] [] ? __kthread_unpark+0x5a/0x5a [23114.616932] [] ret_from_fork+0x27/0x40 [23114.616932] Code: 1f 44 00 00 55 48 89 e5 41 56 41 55 41 54 53 49 89 f4 48 8b 46 70 a8 04 74 09 48 8b 5f 08 48 85 db 75 03 48 8b 1f 49 89 5c 24 68 <83> 7b 64 ff 74 04 f0 ff 43 58 49 83 7c 24 08 00 74 2c 4c 8d 6b [23114.616932] RIP [] btrfs_queue_work+0x2c/0x190 [btrfs] [23114.616932] RSP [23114.689493] ---[ end trace 6e48b6bc707ca34b ]--- [23114.690166] Kernel panic - not syncing: Fatal exception in interrupt [23114.691283] Kernel Offset: disabled [23114.691918] ---[ end Kernel panic - not syncing: Fatal exception in interrupt The following diagram shows the sequence of operations that lead to the use-after-free problem from the above trace: CPU 1 CPU 2 CPU 3 caching_thread() close_ctree() btrfs_stop_all_workers() btrfs_destroy_workqueue( fs_info->endio_meta_workers) btrfs_search_slot() read_block_for_search() readahead_tree_block() read_extent_buffer_pages() submit_one_bio() btree_submit_bio_hook() btrfs_bio_wq_end_io() --> sets the bio's bi_end_io callback to end_workqueue_bio() --> bio is submitted bio completes and its bi_end_io callback is invoked --> end_workqueue_bio() --> attempts to queue a task on fs_info->endio_meta_workers btrfs_destroy_workqueue( fs_info->caching_workers) So fix this by destroying the queues used for metadata I/O tasks only after destroying all the other queues. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/disk-io.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5cdd7db6c5c9d33dc66ecdd81aa8020276c7d140 Author: Filipe Manana Date: Wed Feb 1 22:39:50 2017 +0000 Btrfs: fix assertion failure when freeing block groups at close_ctree() At close_ctree() we free the block groups and then only after we wait for any running worker kthreads to finish and shutdown the workqueues. This behaviour is racy and it triggers an assertion failure when freeing block groups because while we are doing it we can have for example a block group caching kthread running, and in that case the block group's reference count can still be greater than 1 by the time we assert its reference count is 1, leading to an assertion failure: [19041.198004] assertion failed: atomic_read(&block_group->count) == 1, file: fs/btrfs/extent-tree.c, line: 9799 [19041.200584] ------------[ cut here ]------------ [19041.201692] kernel BUG at fs/btrfs/ctree.h:3418! [19041.202830] invalid opcode: 0000 [#1] PREEMPT SMP [19041.203929] Modules linked in: btrfs xor raid6_pq dm_flakey dm_mod crc32c_generic ppdev sg psmouse acpi_cpufreq pcspkr parport_pc evdev tpm_tis parport tpm_tis_core i2c_piix4 i2c_core tpm serio_raw processor button loop autofs4 ext4 crc16 jbd2 mbcache sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix virtio_pci libata virtio_ring virtio e1000 scsi_mod floppy [last unloaded: btrfs] [19041.208082] CPU: 6 PID: 29051 Comm: umount Not tainted 4.9.0-rc7-btrfs-next-36+ #1 [19041.208082] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [19041.208082] task: ffff88015f028980 task.stack: ffffc9000ad34000 [19041.208082] RIP: 0010:[] [] assfail.constprop.41+0x1c/0x1e [btrfs] [19041.208082] RSP: 0018:ffffc9000ad37d60 EFLAGS: 00010286 [19041.208082] RAX: 0000000000000061 RBX: ffff88015ecb4000 RCX: 0000000000000001 [19041.208082] RDX: ffff88023f392fb8 RSI: ffffffff817ef7ba RDI: 00000000ffffffff [19041.208082] RBP: ffffc9000ad37d60 R08: 0000000000000001 R09: 0000000000000000 [19041.208082] R10: ffffc9000ad37cb0 R11: ffffffff82f2b66d R12: ffff88023431d170 [19041.208082] R13: ffff88015ecb40c0 R14: ffff88023431d000 R15: ffff88015ecb4100 [19041.208082] FS: 00007f44f3d42840(0000) GS:ffff88023f380000(0000) knlGS:0000000000000000 [19041.208082] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [19041.208082] CR2: 00007f65d623b000 CR3: 00000002166f2000 CR4: 00000000000006e0 [19041.208082] Stack: [19041.208082] ffffc9000ad37d98 ffffffffa035989f ffff88015ecb4000 ffff88015ecb5630 [19041.208082] ffff88014f6be000 0000000000000000 00007ffcf0ba6a10 ffffc9000ad37df8 [19041.208082] ffffffffa0368cd4 ffff88014e9658e0 ffffc9000ad37e08 ffffffff811a634d [19041.208082] Call Trace: [19041.208082] [] btrfs_free_block_groups+0x17f/0x392 [btrfs] [19041.208082] [] close_ctree+0x1c5/0x2e1 [btrfs] [19041.208082] [] ? evict_inodes+0x132/0x141 [19041.208082] [] btrfs_put_super+0x15/0x17 [btrfs] [19041.208082] [] generic_shutdown_super+0x6a/0xeb [19041.208082] [] kill_anon_super+0x12/0x1c [19041.208082] [] btrfs_kill_super+0x16/0x21 [btrfs] [19041.208082] [] deactivate_locked_super+0x3b/0x68 [19041.208082] [] deactivate_super+0x36/0x39 [19041.208082] [] cleanup_mnt+0x58/0x76 [19041.208082] [] __cleanup_mnt+0x12/0x14 [19041.208082] [] task_work_run+0x6f/0x95 [19041.208082] [] prepare_exit_to_usermode+0xa3/0xc1 [19041.208082] [] syscall_return_slowpath+0x16e/0x1d2 [19041.208082] [] entry_SYSCALL_64_fastpath+0xab/0xad [19041.208082] Code: c7 ae a0 3e a0 48 89 e5 e8 4e 74 d4 e0 0f 0b 55 89 f1 48 c7 c2 0b a4 3e a0 48 89 fe 48 c7 c7 a4 a6 3e a0 48 89 e5 e8 30 74 d4 e0 <0f> 0b 55 31 d2 48 89 e5 e8 d5 b9 f7 ff 5d c3 48 63 f6 55 31 c9 [19041.208082] RIP [] assfail.constprop.41+0x1c/0x1e [btrfs] [19041.208082] RSP [19041.279264] ---[ end trace 23330586f16f064d ]--- This started happening as of kernel 4.8, since commit f3bca8028bd9 ("Btrfs: add ASSERT for block group's memory leak") introduced these assertions. So fix this by freeing the block groups only after waiting for all worker kthreads to complete and shutdown the workqueues. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/extent-tree.c | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 3168021cf9b4906f7bd9871770235f14c5a17715 Author: Filipe Manana Date: Wed Feb 1 14:58:02 2017 +0000 Btrfs: do not create explicit holes when replaying log tree if NO_HOLES enabled We log holes explicitly by using file extent items, however when replaying a log tree, if a logged file extent item corresponds to a hole and the NO_HOLES feature is enabled we do not need to copy the file extent item into the fs/subvolume tree, as the absence of such file extent items is the purpose of the NO_HOLES feature. So skip the copying of file extent items representing holes when the NO_HOLES feature is enabled. Signed-off-by: Filipe Manana fs/btrfs/tree-log.c | 5 +++++ 1 file changed, 5 insertions(+) commit 91e1f56a8b3c94cb5ac9ce12b806134dc33c1eeb Author: Robbie Ko Date: Fri Oct 7 10:01:29 2016 +0800 Btrfs: fix leak of subvolume writers counter When falling back from a nocow write to a regular cow write, we were leaking the subvolume writers counter in 2 situations, preventing snapshot creation from ever completing in the future, as it waits for that counter to go down to zero before the snapshot creation starts. Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana [Improved changelog and subject] Signed-off-by: Filipe Manana fs/btrfs/inode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6f546216e9f9e95d6783547ce6113eb13e2daa54 Author: Filipe Manana Date: Sat Jan 28 01:47:56 2017 +0000 Btrfs: bulk delete checksum items in the same leaf Very often we have the checksums for an extent spread in multiple items in the checksums tree, and currently the algorithm to delete them starts by looking for them one by one and then deleting them one by one, which is not optimal since each deletion involves shifting all the other items in the leaf and when the leaf reaches some low threshold, to move items off the leaf into its left and right neighbor leafs. Also, after each item deletion we release our search path and start a new search for other checksums items. So optimize this by deleting in bulk all the items in the same leaf that contain checksums for the extent being freed. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/file-item.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 0191410158840d6176de3267daa4604ad6a773fb Author: Robbie Ko Date: Thu Jan 5 16:24:58 2017 +0800 Btrfs: incremental send, do not issue invalid rmdir operations When both the parent and send snapshots have a directory inode with the same number but different generations (therefore they are different inodes) and both have an entry with the same name, an incremental send stream will contain an invalid rmdir operation that refers to the orphanized name of the inode from the parent snapshot. The following example scenario shows how this happens. Parent snapshot: . |---- d259_old/ (ino 259, gen 9) | |---- d1/ (ino 258, gen 9) | |---- f (ino 257, gen 9) Send snapshot: . |---- d258/ (ino 258, gen 7) |---- d259/ (ino 259, gen 7) |---- d1/ (ino 257, gen 7) When the kernel is processing inode 258 it notices that in both snapshots there is an inode numbered 259 that is a parent of an inode 258. However it ignores the fact that the inodes numbered 259 have different generations in both snapshots, which means they are effectively different inodes. Then it checks that both inodes 259 have a dentry named "d1" and because of that it issues a rmdir operation with orphanized name of the inode 258 from the parent snapshot. This happens at send.c:process_record_refs(), which calls send.c:did_overwrite_first_ref() that returns true and because of that later on at process_recorded_refs() such rmdir operation is issued because the inode being currently processed (258) is a directory and it was deleted in the send snapshot (and replaced with another inode that has the same number and is a directory too). Fix this issue by comparing the generations of parent directory inodes that have the same number and make send.c:did_overwrite_first_ref() when the generations are different. The following steps reproduce the problem. $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ touch /mnt/f $ mkdir /mnt/d1 $ mkdir /mnt/d259_old $ mv /mnt/d1 /mnt/d259_old/d1 $ btrfs subvolume snapshot -r /mnt /mnt/snap1 $ btrfs send /mnt/snap1 -f /tmp/1.snap $ umount /mnt $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ mkdir /mnt/d1 $ mkdir /mnt/dir258 $ mkdir /mnt/dir259 $ mv /mnt/d1 /mnt/dir259/d1 $ btrfs subvolume snapshot -r /mnt /mnt/snap2 $ btrfs receive /mnt/ -f /tmp/1.snap # Take note that once the filesystem is created, its current # generation has value 7 so the inodes from the second snapshot all have # a generation value of 7. And after receiving the first snapshot # the filesystem is at a generation value of 10, because the call to # create the second snapshot bumps the generation to 8 (the snapshot # creation ioctl does a transaction commit), the receive command calls # the snapshot creation ioctl to create the first snapshot, which bumps # the filesystem's generation to 9, and finally when the receive # operation finishes it calls an ioctl to transition the first snapshot # (snap1) from RW mode to RO mode, which does another transaction commit # and bumps the filesystem's generation to 10. This means all the inodes # in the first snapshot (snap1) have a generation value of 9. $ rm -f /tmp/1.snap $ btrfs send /mnt/snap1 -f /tmp/1.snap $ btrfs send -p /mnt/snap1 /mnt/snap2 -f /tmp/2.snap $ umount /mnt $ mkfs.btrfs -f /dev/sdd $ mount /dev/sdd /mnt $ btrfs receive /mnt -f /tmp/1.snap $ btrfs receive -vv /mnt -f /tmp/2.snap receiving snapshot mysnap2 uuid=9c03962f-f620-0047-9f98-32e5a87116d9, ctransid=7 parent_uuid=d17a6e3f-14e5-df4f-be39-a7951a5399aa, parent_ctransid=9 utimes unlink f mkdir o257-7-0 mkdir o259-7-0 rename o257-7-0 -> o259-7-0/d1 chown o259-7-0/d1 - uid=0, gid=0 chmod o259-7-0/d1 - mode=0755 utimes o259-7-0/d1 rmdir o258-9-0 ERROR: rmdir o258-9-0 failed: No such file or directory Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana [Rewrote changelog to be more precise and clear] Signed-off-by: Filipe Manana fs/btrfs/send.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fe9c798dbf4c78322549068255f611e4038a5b28 Author: Filipe Manana Date: Wed Jan 11 02:15:39 2017 +0000 Btrfs: incremental send, do not delay rename when parent inode is new When we are checking if we need to delay the rename operation for an inode we not checking if a parent inode that exists in the send and parent snapshots is really the same inode or not, that is, we are not comparing the generation number of the parent inode in the send and parent snapshots. Not only this results in unnecessarily delaying a rename operation but also can later on make us generate an incorrect name for a new inode in the send snapshot that has the same number as another inode in the parent snapshot but a different generation. Here follows an example where this happens. Parent snapshot: . (ino 256, gen 3) |--- dir258/ (ino 258, gen 7) | |--- dir257/ (ino 257, gen 7) | |--- dir259/ (ino 259, gen 7) Send snapshot: . (ino 256, gen 3) |--- file258 (ino 258, gen 10) | |--- new_dir259/ (ino 259, gen 10) |--- dir257/ (ino 257, gen 7) The following steps happen when computing the incremental send stream: 1) When processing inode 257, its new parent is created using its orphan name (o257-21-0), and the rename operation for inode 257 is delayed because its new parent (inode 259) was not yet processed - this decision to delay the rename operation does not make much sense because the inode 259 in the send snapshot is a new inode, it's not the same as inode 259 in the parent snapshot. 2) When processing inode 258 we end up delaying its rmdir operation, because inode 257 was not yet renamed (moved away from the directory inode 258 represents). We also create the new inode 258 using its orphan name "o258-10-0", then rename it to its final name of "file258" and then issue a truncate operation for it. However this truncate operation contains an incorrect name, which corresponds to the orphan name and not to the final name, which makes the receiver fail. This happens because when we attempt to compute the inode's current name we verify that there's another inode with the same number (258) that has its rmdir operation pending and because of that we generate an orphan name for the new inode 258 (we do this in the function get_cur_path()). Fix this by not delayed the rename operation of an inode if it has parents with the same number but different generations in both snapshots. The following steps reproduce this example scenario. $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/dir257 $ mkdir /mnt/dir258 $ mkdir /mnt/dir259 $ mv /mnt/dir257 /mnt/dir258/dir257 $ btrfs subvolume snapshot -r /mnt /mnt/snap1 $ mv /mnt/dir258/dir257 /mnt/dir257 $ rmdir /mnt/dir258 $ rmdir /mnt/dir259 # Remount the filesystem so that the next created inodes will have the # numbers 258 and 259. This is because when a filesystem is mounted, # btrfs sets the subvolume's inode counter to a value corresponding to # the highest inode number in the subvolume plus 1. This inode counter # is used to assign a unique number to each new inode and it's # incremented by 1 after very inode creation. # Note: we unmount and then mount instead of doing a mount with # "-o remount" because otherwise the inode counter remains at value 260. $ umount /mnt $ mount /dev/sdb /mnt $ touch /mnt/file258 $ mkdir /mnt/new_dir259 $ mv /mnt/dir257 /mnt/new_dir259/dir257 $ btrfs subvolume snapshot -r /mnt /mnt/snap2 $ btrfs send /mnt/snap1 -f /tmp/1.snap $ btrfs send -p /mnt/snap1 /mnt/snap2 -f /tmp/2.snap $ umount /mnt $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ btrfs receive /mnt -f /tmo/1.snap $ btrfs receive /mnt -f /tmo/2.snap -vv receiving snapshot mysnap2 uuid=e059b6d1-7f55-f140-8d7c-9a3039d23c97, ctransid=10 parent_uuid=77e98cb6-8762-814f-9e05-e8ba877fc0b0, parent_ctransid=7 utimes mkdir o259-10-0 rename dir258 -> o258-7-0 utimes mkfile o258-10-0 rename o258-10-0 -> file258 utimes truncate o258-10-0 size=0 ERROR: truncate o258-10-0 failed: No such file or directory Reported-by: Robbie Ko Signed-off-by: Filipe Manana fs/btrfs/send.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 4dd9920d991745c4a16f53a8f615f706fbe4b3f7 Author: Robbie Ko Date: Thu Jan 5 16:24:55 2017 +0800 Btrfs: send, fix failure to rename top level inode due to name collision Under certain situations, an incremental send operation can fail due to a premature attempt to create a new top level inode (a direct child of the subvolume/snapshot root) whose name collides with another inode that was removed from the send snapshot. Consider the following example scenario. Parent snapshot: . (ino 256, gen 8) |---- a1/ (ino 257, gen 9) |---- a2/ (ino 258, gen 9) Send snapshot: . (ino 256, gen 3) |---- a2/ (ino 257, gen 7) In this scenario, when receiving the incremental send stream, the btrfs receive command fails like this (ran in verbose mode, -vv argument): rmdir a1 mkfile o257-7-0 rename o257-7-0 -> a2 ERROR: rename o257-7-0 -> a2 failed: Is a directory What happens when computing the incremental send stream is: 1) An operation to remove the directory with inode number 257 and generation 9 is issued. 2) An operation to create the inode with number 257 and generation 7 is issued. This creates the inode with an orphanized name of "o257-7-0". 3) An operation rename the new inode 257 to its final name, "a2", is issued. This is incorrect because inode 258, which has the same name and it's a child of the same parent (root inode 256), was not yet processed and therefore no rmdir operation for it was yet issued. The rename operation is issued because we fail to detect that the name of the new inode 257 collides with inode 258, because their parent, a subvolume/snapshot root (inode 256) has a different generation in both snapshots. So fix this by ignoring the generation value of a parent directory that matches a root inode (number 256) when we are checking if the name of the inode currently being processed collides with the name of some other inode that was not yet processed. We can achieve this scenario of different inodes with the same number but different generation values either by mounting a filesystem with the inode cache option (-o inode_cache) or by creating and sending snapshots across different filesystems, like in the following example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/a1 $ mkdir /mnt/a2 $ btrfs subvolume snapshot -r /mnt /mnt/snap1 $ btrfs send /mnt/snap1 -f /tmp/1.snap $ umount /mnt $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ touch /mnt/a2 $ btrfs subvolume snapshot -r /mnt /mnt/snap2 $ btrfs receive /mnt -f /tmp/1.snap # Take note that once the filesystem is created, its current # generation has value 7 so the inode from the second snapshot has # a generation value of 7. And after receiving the first snapshot # the filesystem is at a generation value of 10, because the call to # create the second snapshot bumps the generation to 8 (the snapshot # creation ioctl does a transaction commit), the receive command calls # the snapshot creation ioctl to create the first snapshot, which bumps # the filesystem's generation to 9, and finally when the receive # operation finishes it calls an ioctl to transition the first snapshot # (snap1) from RW mode to RO mode, which does another transaction commit # and bumps the filesystem's generation to 10. $ rm -f /tmp/1.snap $ btrfs send /mnt/snap1 -f /tmp/1.snap $ btrfs send -p /mnt/snap1 /mnt/snap2 -f /tmp/2.snap $ umount /mnt $ mkfs.btrfs -f /dev/sdd $ mount /dev/sdd /mnt $ btrfs receive /mnt /tmp/1.snap # Receive of snapshot snap2 used to fail. $ btrfs receive /mnt /tmp/2.snap Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana [Rewrote changelog to be more precise and clear] Signed-off-by: Filipe Manana fs/btrfs/send.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b2e3c4319d40c9055c3c587cdb82ba69b50e919d Merge: c61c15e0 db27dd0 Author: Linus Torvalds Date: Thu Feb 23 15:57:04 2017 -0800 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs. A handful of driver changes this time around. The larger changes are: - Reset drivers for hi3660 and zx2967 - AHCI driver for Davinci, acked by Tejun and brought in here due to platform dependencies - Cleanups of atmel-ebi (External Bus Interface) - Tweaks for Rockchip GRF (General Register File) usage (kitchensink misc register range on the SoCs) - PM domains changes for support of two new ZTE SoCs (zx296718 and zx2967)" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits) soc: samsung: pmu: Add register defines for pad retention control reset: make zx2967 explicitly non-modular reset: core: fix reset_control_put soc: samsung: pm_domains: Read domain name from the new label property soc: samsung: pm_domains: Remove message about failed memory allocation soc: samsung: pm_domains: Remove unused name field soc: samsung: pm_domains: Use full names in subdomains registration log sata: ahci-da850: un-hardcode the MPY bits sata: ahci-da850: add a workaround for controller instability sata: ahci: export ahci_do_hardreset() locally sata: ahci-da850: implement a workaround for the softreset quirk sata: ahci-da850: add device tree match table sata: ahci-da850: get the sata clock using a connection id soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register memory: atmel-ebi: Enable the SMC clock if specified soc: samsung: pmu: Remove unused and duplicated defines memory: atmel-ebi: Properly handle multiple reference to the same CS memory: atmel-ebi: Fix the test to enable generic SMC logic soc: samsung: pm_domains: Add new Exynos5433 compatible soc: samsung: pmu: Add dummy support for Exynos5433 SoC ... commit c61c15e08abb4365f100e411604b57a03ee5ae90 Merge: 195849e cbab319 Author: Linus Torvalds Date: Thu Feb 23 15:52:14 2017 -0800 Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit DT updates from Arnd Bergmann: "ARM64 DT updates are fairly small this time, only two new SoCs and a handful of new machines get added, all of them similar to other hardware we already support. New SoC: - HiSilicon Kirin960/Hi3660 and HiKey960 development board - NXP LS1012a with three reference boards: http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/qoriq-layerscape-arm-processors/qoriq-layerscape-1012a-low-power-communication-processor:LS1012A New development board: - Banana Pi M64, based on Allwinner A64: http://www.banana-pi.org/m64.html - SolidRun MACCHIATOBin based on Marvell Armada 8K: https://www.solid-run.com/marvell-armada-family/armada-8040-community-board/ - Broadcom BCM958712DxXMC NorthStar2 reference board (another one) A lot of platforms improve support for existing machines by adding extra devices for which a binding and driver is availabe: Allwinner: - MMC, USB ARM Juno: - Coresight, STM Broadcom: - NS2 GICv2m irqchip and PCIe Marvell: - Armada 3700 SPI, I2C, ethernet switch Mediatek: - MT8173 thermal NXP i.MX: - LS1046A thermal Qualcomm: - coresight on MSM8916, HDMI, WCNSS, SCM Renesas: - r8a779[56] thermal, powerdomain, ethernet, sound, pwm, can, can fd Rockchip: - thermal, eDP, pinctrl enhancements Samsung: - TM2 touchkey, Exynos5433 HDMI and power management improvements UniPhier: - SD reset, eMMC controller ZTE: - oppv2 cpufreq" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (110 commits) arm64: dts: qcom: Add msm8916 CoreSight components arm64: dts: marvell: adjust name of sd-mmc-gop clock in syscon arm64: allwinner: add BananaPi-M64 support arm64: allwinner: a64: add UART1 pin nodes arm64: allwinner: pine64: add MMC support arm64: allwinner: a64: Increase the MMC max frequency arm64: allwinner: a64: Add MMC pinctrl nodes arm64: allwinner: a64: Add MMC nodes dt-bindings: clockgen: Add compatible string for LS1012A Documentation: DT: add LS1012A compatible for SCFG and DCFG Documentation: DT: Add entry for FSL LS1012A RDB, FRDM, QDS boards arm64: dts: marvell: add generic-ahci compatibles for CP110 ahci arm64: tegra: Use symbolic reset identifiers arm64: dts: r8a7796: Mark EthernetAVB device node disabled arm64: dts: r8a7795: Mark EthernetAVB device node disabled arm64: dts: r8a7795: tidyup audma definition order arm64: dts: r8a7796: Link ARM GIC to clock and clock domain arm64: dts: r8a7795: Link ARM GIC to clock and clock domain arm64: dts: r8a7796: Add R-Car Gen3 thermal support arm64: dts: r8a7795: Add R-Car Gen3 thermal support ... commit 195849ea13549dc2390b7db7d80a22d76f73dfae Merge: 54fff78 a25996e Author: Linus Torvalds Date: Thu Feb 23 15:46:25 2017 -0800 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM DT updates from Arnd Bergmann: "A total of 380 patches this time, mostly adding support for more hardware in the device tree descriptions. There is not much exciting here for 4.11, but I've tried my best to condense the information from the pull requests I got into a readable summary. Noteworthy changes to existing platforms include: - The GIC memory map was a bit wrong almost everywhere and now gets fixed up - The Allwinner platforms convert to the generic pinmux properties - The Marvell EBU platforms now use the new DSA binding - Samsung Exynos4212 was unused and gets removed - The Renesas power management got improved New production machines: - Lego Mindstorms EV3: https://www.lego.com/en-us/mindstorms/about-ev3 - Beelink X2 Android media box: http://linux-sunxi.org/Beelink_X2 - "Romulus" baseboard management controller for OpenPower - Axentia TSE-850 Data Radio Channel (DARC) encoder: http://www.axentia.se/db/equipment.html - Luxul XAP-1410 and XWR-1200 wireless access points: https://luxul.com/xap-1410 New SoCs: - Allwinner H2+ and V3s, both minor variations of already supported chips: http://www.allwinnertech.com/index.php?c=product&a=index&id=38 - Marvell Prestera DX packet processors based on Armada XP architecture: http://www.marvell.com/switching/prestera-dx/ - Samsung Exynos4412 Prime gets added, a minor variation of Exynos4412 New developer and reference boards: - Lichee Pi One, Lichee Pi Zero and Orange Pi Zero, all based on Allwinner SoCs: http://linux-sunxi.org/LicheePi_One http://www.orangepi.org/orangepizero/ - SAMA5d36ek Reference platform: http://www.atmel.com/tools/sama5d36-ek.aspx - Beaglebone Green Wireless and Black Wireless: https://beagleboard.org/black-wireless https://beagleboard.org/green-wireless - phyCORE-AM335x System on Module: http://phytec.com/products/system-on-modules/phycore/am335x/ - New revision of "vf610-zii" Zodiac Inflight Innovations board - Various i.MX System-on-Module: Is.IoT MX6UL, SavageBoard, Engicam i.Core: http://www.opossom.com/english/index.html http://www.savageboard.org/ http://www.engicam.com/en/products/embedded/som/sodimm/is-iot-mx6ul http://www.engicam.com/en/products/embedded/som/sodimm/i-core-m6s-dl-d-q - Liebherr (LWN) monitor 6 based on i.MX6 Quad, no idea what this is - Cleanups and bugfixes on at91, bcm53xx, i.MX, mvebu, omap, oxnas, qcom, rockchip, sti, stm32 and tegra New device supports added to some boards and SoCs, briefly by platform: - Allwinner: SPDIF, A33 cpufreq, A33 Mali GPU - Aspeed: network, ipmi bt, gpio, pinmux - Broadcom: video encoder for raspberry pi, qspi, ethernet, sd/mmc - TI DaVinci: gpio, lcdc, usb, video-in, uart - TI Keystone 2: MSM RAM, power/reset, uart - Mediatek MT2701: clocks, iommu, spi, nand, adc, thermal - Marvell EBU: ethernet switch on Turris Omnia - NXP i.MX: otp ram, USB, wifi, bluetooth, spdif, spi, pmic, eeprom, mmc, nand - TI OMAP: - Qualcomm: coresight, gyro/accelerometer, hdmi - Renesas: pmic, soc-id - Rockchip: qos - Samsung: audio on Odroid-X - Socfpga: FPGA manager, i2c, led, can, watchdog, nand, power monitor - STi: video in/out - STM32: timer, pwm, i2c, rtc, add, i2s - NVIDIA Tegra: tpm - Uniphier: mmc/sd pinmux" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (380 commits) ARM: dts: armada-385-linksys: fix DSA compatible property ARM: dts: Fix typo in armada-xp-98dx4251 ARM: DTS: Fix register map for virt-capable GIC dt-bindings: arm,gic: Fix binding example for a virt-capable GIC ARM: dts: sun8i: sinlinx: Enable audio nodes ARM: dts: sun8i: parrot: Enable audio nodes ARM: dts: sun8i: Add audio codec, dai and card for A33 ARM: dts: Add EMAC AXI settings for Arria10 ARM: dts: am335x-chiliboard: Support charger ARM: dts: am335x-chiliboard: Support power button ARM: sun8i: dt: Add mali node dt-bindings: gpu: Add Mali Utgard bindings ARM: dts: stm32: Add I2C1 support for STM32429 eval board ARM: dts: stm32: Add I2C1 support for STM32F429 SoC ARM: dts: stm32: Use clock DT binding definition on stm32f429 family dt-bindings: mfd: stm32f4: Add missing binding definition dt-bindings: mfd: stm32f4: Fix STM32F4_X_CLOCK() macro ARM: dts: stm32: Enable pwm1 and pwm3 for stm32f469-disco ARM: dts: stm32: add Timers driver for stm32f429 MCU ARM: dts: add the AB8500 sysclk to the device trees ... commit 54fff785db6e44208478ae3b0e5c56b853b3e10d Merge: c35675f ddf5cf0 Author: Linus Torvalds Date: Thu Feb 23 15:39:32 2017 -0800 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Arnd Bergmann: "Defconfig additions, removals, etc. Almost all of them just turn on drivers that we want on some platform, usually after the driver has been merged into mainline. There is now a new defconfig file for tango4" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits) ARM: multi_v7_defconfig: enable pstore configs ARM: multi_v7_defconfig: enable some newly added crypto modules ARM: davinci_all_defconfig: enable SATA modules arm64: defconfig: enable CONFIG_MTD_NAND and CONFIG_MTD_NAND_DENALI_DT arm64: defconfig: enable CONFIG_MTD_BLOCK ARM: Import tango4_defconfig ARM: omap2plus_defconfig: Enable support for RTC M41T80 ARM: omap2plus_defconfig: Enable support for micrell phys ARM: vf610m4: defconfig: enable EXT4 filesystem ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 arm64: defconfig: Enable NUMA and NUMA_BALANCING arm64: defconfig: enable SMMUv3 config ARM: davinci_all_defconfig: enable iio ARM: Keystone: Enable ARCH_HAS_RESET_CONTROLLER ARM: configs: stm32: Add RTC support in STM32 defconfig ARM: defconfig: qcom: add APQ8060 DragonBoard devices ARM: qcom_defconfig: enable thermal sensors ARM: qcom_defconfig: add ahci configs ARM: qcom_defconfig: add pcie and atl1c ethernet configs ARM: qcom_defconfig: add usb related configs ... commit c35675f351b9f13062cfd0fac762615e703af2af Merge: 6ae52c6 971d33c Author: Linus Torvalds Date: Thu Feb 23 15:35:57 2017 -0800 Merge tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC 64-bit updates from Arnd Bergmann: "Changes to platform code for 64-bit ARM platforms, only trivial stuff this time, a few defconfig changes to enable drivers, and a new entry for the Cavium ThunderX2 platform" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: MAINTAINERS: Add Cavium ThunderX2 entry arm64: add ARCH_THUNDER2 to defconfig arm64: add THUNDER2 processor family MAINTAINERS: Extend ARM/Mediatek SoC support section arm64: defconfig: enable CONFIG_MMC_SDHCI_CADENCE arm64: defconfig: enable XORv2 for Marvell Armada 7K/8K commit 6ae52c65e01991426e87bb0fb8a2ac9e032db7b1 Merge: af8999f af1d09e Author: Linus Torvalds Date: Thu Feb 23 15:33:54 2017 -0800 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "In the SoC branch we normally collect classic arch/arm/mach-* contents, i.e. C code changes for SoC platforms. This release cycle the diffstat is quite nice, in that we're removing 3x the amount of code that's being added. The main reason for this is that there's a removal of camera drivers for Freescale i.MX chips (driver was removed so the device registration isn't needed any more). There's also removal of display initialization code for OMAP that is no longer needed. The rest are mostly minor tweaks and cleanups; constification on Samsung platforms, cleanup of ux500 platform data, purge of other unused platform data/device seutp on i.MX and other good stuff. New SoC support this cycle is for two Allwinner platforms, H2+ and V3s" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits) ARM: ux500: remove deleted file from Makefile ARM: ep93xx: Disable TS-72xx watchdog before uncompressing ARM: ux500: cut some platform data MAINTAINERS: Update for the current location of the bcm2835 tree. ARM: davinci: remove BUG_ON() from da850_register_sata() ARM: davinci: da850: model the SATA refclk ARM: davinci: da850: add con_id for the SATA clock ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA arm: mvebu: support for SMP on 98DX3336 SoC dt-bindings: video: exynos7-decon: Remove obsolete samsung,power-domain property soc: dove: constify reset_control_ops structures ARM: mv78xx0: fix possible PCI buffer overflow MAINTAINERS: transfer maintainership for the EZX platform ARM: shmobile: rcar-gen2: Add more register documentation ARM: tegra: paz00: Fix __initdata placement ARM: OMAP: clock: Remove unused mpurate cmdline option ARM: davinci: add skeleton for pdata-quirks arm: sunxi: add support for V3s SoC ARM: OMAP2+: omap_hwmod: Add support for earlycon arm: hisi: drop extern hip01_cpu_die ... commit af8999f672421776417977101c3e1f334414c065 Merge: 60e8d3e 92f3e6e Author: Linus Torvalds Date: Thu Feb 23 15:28:04 2017 -0800 Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC non-urgent fixes from Arnd Bergmann: "We sometimes collect non-critical fixes that come in during the later part of the merge window in a branch for the next release instead, and this is that contents for v4.11. Most of these are OMAP fixes, dealing with OMAP36/37 detection, quirks and setup. There's also some fixes for Davinci and a Kconfig fix for SCPI to only enable on ARM{,64}" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: firmware: arm_scpi: Add hardware dependencies ARM: OMAP3: Fix SoC detection of OMAP36/37 Family ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART ARM: dts: Fix compatible for ti81xx uarts for 8250 ARM: dts: Fix am335x and dm814x scm syscon to probe children ARM: OMAP2+: Fix init for multiple quirks for the same SoC ARM: dts: Fix omap3 off mode pull defines bus: da850-mstpri: fix my e-mail address ARM: davinci: da850: fix da850_set_pll0rate() ARM: davinci: da850: coding style fix commit 1e8ad3d8da4763b238d09244d4d1177aa640c0d3 Merge: 894ebc4 187368a Author: Dave Airlie Date: Fri Feb 24 08:35:23 2017 +1000 Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next Some ttm/amd fixes. * 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: fix PSI feature on Polars12. drm/amdgpu: refuse to reserve io mem for split VRAM buffers drm/ttm: fix use-after-free races in vm fault handling drm/amd/amdgpu: post card if there is real hw resetting performed commit 894ebc414d4688da732a185954ca23c5d11900d0 Merge: 84f7174 eaeebff Author: Dave Airlie Date: Fri Feb 24 08:29:03 2017 +1000 Merge tag 'drm/panel/for-4.11-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v4.11-rc1 This set contains a couple of cleanups as well as support for a few more simple panels. * tag 'drm/panel/for-4.11-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple: Specify bus width and flags for EDT displays drm/panel: simple: Add Netron DY E231732 of: Add vendor prefix for Netron DY drm/panel: simple: Add support for Tianma TM070JDHG30 of: Add vendor prefix for Tianma Micro-electronics drm/panel: simple: Add support BOE NV101WXMN51 dt-bindings: display: Add BOE NV101WXMN51 panel binding drm/panel: Constify device node argument to of_drm_find_panel() commit 84f7174b4f793898aaeec0213c6c69ad300f4bc4 Merge: f81fa76 7b1d418 Author: Dave Airlie Date: Fri Feb 24 08:26:48 2017 +1000 Merge tag 'drm/tegra/for-4.11-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.11-rc1 Just a single change that hooks up the Tegra DRM parent device to the correct device tree node. * tag 'drm/tegra/for-4.11-rc1' of git://anongit.freedesktop.org/tegra/linux: gpu: host1x: Set OF node for new host1x devices commit 2559a1ef688f933835912c731bed2254146a9b04 Author: Finn Thain Date: Thu Feb 23 09:08:02 2017 +1100 scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m The mac_scsi driver still gets disabled when SCSI=m. This should have been fixed back when I enabled the tristate but I didn't see the bug. Fixes: 6e9ae6d560e1 ("[PATCH] mac_scsi: Add module option to Kconfig") Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed92d8c137b7794c2c2aa14479298b9885967607 Author: Weston Andros Adamson Date: Thu Feb 23 14:54:21 2017 -0500 NFSv4: fix getacl ERANGE for some ACL buffer sizes We're not taking into account that the space needed for the (variable length) attr bitmap, with the result that we'd sometimes get a spurious ERANGE when the ACL data got close to the end of a page. Just add in an extra page to make sure. Signed-off-by: Weston Andros Adamson Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6682c14bbe505a8b912c57faf544f866777ee48d Author: J. Bruce Fields Date: Thu Feb 23 14:53:39 2017 -0500 NFSv4: fix getacl head length estimation Bitmap and attrlen follow immediately after the op reply header. This was an oversight from commit bf118a342f. Consequences of this are just minor efficiency (extra calls to xdr_shrink_bufhead). Fixes: bf118a342f10 "NFSv4: include bitmap in nfsv4 get acl data" Reviewed-by: Kinglong Mee Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebe73647fb3895b75544cecdb6766a517fbf03d6 Author: Don Brace Date: Thu Feb 23 08:57:20 2017 -0600 scsi: cciss: correct check map error. Remove device driver failed to check map error messages Reported-by: Johnny Bieren Tested-by: Johnny Bieren Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/block/cciss.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 669a311b6ecc4eeb367a269bdd5f4e143caddb9c Author: Colin Ian King Date: Thu Feb 23 10:57:23 2017 +0000 scsi: qla2xxx: fix spelling mistake: "seperator" -> "separator" Trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d08d1b27fe2a7f6923952613f5fab56ae47a6f5b Author: Viresh Kumar Date: Wed Feb 22 13:58:52 2017 +0530 PM / QoS: Remove global notifiers They were never used in the kernel, so get rid of them. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/power/pm_qos_interface.txt | 13 +-------- drivers/base/power/qos.c | 50 +++----------------------------- include/linux/pm_qos.h | 8 ----- 3 files changed, 5 insertions(+), 66 deletions(-) commit 35bfa99e81f45079728f6b2ac553dabb0bc62c7d Author: Christophe Jaillet Date: Tue Feb 21 21:41:53 2017 +0100 PM / runtime: Fix some typos Signed-off-by: Christophe Jaillet Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki Documentation/power/runtime_pm.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a56e574067c20d01d8fc74863fa187dd66da7b94 Author: Raghava Aditya Renukunta Date: Wed Feb 22 07:23:13 2017 -0800 scsi: aacraid: Fixed expander hotplug for SMART family Current driver Hotplug processing code skips over Enclosure channel, therefore any addition/removal of expander enclosure is not processed. Additionally device addition code relies on older device type, which prevents the hotplug of adapter expanders. Fixed by removing code that skips over Enclosure channels and using the latest device type for addition or removal or enclosure expanders. Fixes: 6223a39fe6fbbeef (scsi: aacraid: Added support for hotplug) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 17b4eaf475684bd12aeecf358a7ea6e3bec871a5 Author: Tang Yuantian Date: Tue Feb 21 14:51:24 2017 +0800 cpufreq: qoriq: clean up unused code This snip code is not needed anymore since its user get_hard_smp_processor_id() has been removed. Signed-off-by: Tang Yuantian Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/qoriq-cpufreq.c | 4 ---- 1 file changed, 4 deletions(-) commit 1d55abc0e98a0bf35f3af80665aac564e3b30572 Author: Hannes Reinecke Date: Wed Feb 22 11:31:41 2017 +0100 scsi: mpt3sas: switch to pci_alloc_irq_vectors Cleanup the MSI-X handling allowing us to use the PCI-layer provided vector allocation. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 105 +++++++++++++++++------------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 - 2 files changed, 48 insertions(+), 59 deletions(-) commit 8cc311167c22f9365304b2b20225df2d881c8843 Author: Andrzej Hajda Date: Mon Feb 20 19:57:57 2017 +0100 PM / OPP: fix off-by-one bug in dev_pm_opp_get_max_volt_latency loop Reading array at given index before checking if index is valid results in illegal memory access. The bug was detected using KASAN framework. Signed-off-by: Andrzej Hajda Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1afca6b5f31616d330fb64a0c87060640a75ff6a Author: Dupuis, Chad Date: Thu Feb 23 07:01:03 2017 -0800 scsi: qedf: fixup compilation warning about atomic_t usage Based on an original patch by Hannes Reinecke. The driver didn't follow the atomic_t vs refcount_t change, and anyway one should be using kref_read() instead of accessing the counter inside an kref. Fixes: 61d8658b4a435e ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.) Cc: Hannes Reinecke Cc: Nilesh Javali Signed-off-by: Dupuis, Chad Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_els.c | 6 +++--- drivers/scsi/qedf/qedf_io.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit fcbfffe2c5cbec0c1721b2261c316b961ad50208 Author: Christoph Hellwig Date: Thu Feb 23 16:02:37 2017 +0100 scsi: remove scsi_execute_req_flags And switch all callers to use scsi_execute instead. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 16 ++++++---------- drivers/scsi/device_handler/scsi_dh_emc.c | 7 +++---- drivers/scsi/device_handler/scsi_dh_hp_sw.c | 10 ++++------ drivers/scsi/device_handler/scsi_dh_rdac.c | 7 +++---- drivers/scsi/scsi_lib.c | 11 ----------- drivers/scsi/sd.c | 9 ++++----- drivers/scsi/ufs/ufshcd.c | 10 +++++----- include/scsi/scsi_device.h | 8 ++------ 8 files changed, 27 insertions(+), 51 deletions(-) commit 76aaf87b4cdc7f7115a32e4fda88310d42ce7fde Author: Christoph Hellwig Date: Thu Feb 23 16:02:36 2017 +0100 scsi: merge __scsi_execute into scsi_execute All but one caller want the decoded sense header, so offer the existing __scsi_execute helper as the public scsi_execute API to simply the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/ata/libata-scsi.c | 12 ++++------ drivers/scsi/cxlflash/superpipe.c | 8 +++---- drivers/scsi/cxlflash/vlun.c | 4 ++-- drivers/scsi/scsi_lib.c | 48 +++++++++++++++++---------------------- drivers/scsi/scsi_transport_spi.c | 24 ++++++++------------ drivers/scsi/sr_ioctl.c | 19 +++------------- include/scsi/scsi_device.h | 5 ++-- 7 files changed, 46 insertions(+), 74 deletions(-) commit 2da835452a0875866ca55d23126c77b9372f0015 Author: Ulf Hansson Date: Fri Feb 17 10:55:25 2017 +0100 PM / Domains: Power off masters immediately in the power off sequence Once a subdomain is powered off, genpd queues a power off work for each of the subdomain's corresponding masters, thus postponing the masters to be powered off to a later point. When genpd used intermediate power off states, which was removed in commit ba2bbfbf6307 ("PM / Domains: Remove intermediate states from the power off sequence"), this behaviour made sense, but now it simply doesn't. Genpd can easily try to power off the masters in the same context as the subdomain, of course by acquiring/releasing the lock. Then, let's convert to this behaviour, as it avoids unnecessary works from being queued. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3c64649d1cf9f32fd16491e69ccc16385e0ef421 Author: Ulf Hansson Date: Fri Feb 17 10:55:24 2017 +0100 PM / Domains: Rename is_async to one_dev_on for genpd_power_off() The parameter name is_async, for genpd_power_off() gives a poor description of its purpose. To clarify, let's rename it to one_dev_on and update the documentation of it in the function header. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1f8728b7adc4c2b351cda886a6916087595c9125 Author: Ulf Hansson Date: Fri Feb 17 10:55:23 2017 +0100 PM / Domains: Move genpd_power_off() above genpd_power_on() Following changes in genpd_power_on() makes it invoke genpd_power_off(). To enable these changes and avoiding to declare genpd_power_off(), let's move its implementation above genpd_power_on(). In this way, following changes should become easier to review. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 162 ++++++++++++++++++++++---------------------- 1 file changed, 81 insertions(+), 81 deletions(-) commit f107548039807eb890e65ce5cd29d6ac52562f09 Author: Dan Carpenter Date: Thu Feb 23 13:39:59 2017 +0300 ceph: tidy some white space in get_nonsnap_parent() The white space here seems slightly messed up. Signed-off-by: Dan Carpenter Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7ba0487cca6199cc19bffd34c00df4ea70ac032a Author: Ilya Dryomov Date: Thu Feb 16 15:38:05 2017 +0100 crush: fix dprintk compilation The syntax error was not noticed because dprintk is a macro and the code is discarded by default. Reflects ceph.git commit f29b840c64a933b2cb13e3da6f3d785effd73a57. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98ba6af728de99953e25e550dbeca588c258ef03 Author: Ilya Dryomov Date: Thu Feb 16 15:21:15 2017 +0100 crush: do is_out test only if we do not collide The is_out() test may require an additional hashing operation, so we should skip it whenever possible. Reflects ceph.git commit db107cc7f15cf2481894add325dc93e33479f529. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 47b1f6fd6ebc8b6b72a5aee39cb0513a38e9c099 Author: Dmitry V. Levin Date: Thu Feb 23 05:49:28 2017 +0300 uapi: stop including linux/sysctl.h in uapi/linux/netfilter.h linux/netfilter.h is the last uapi header file that includes linux/sysctl.h but it does not depend on definitions provided by this essentially dead header file. Suggested-by: Eric W. Biederman Signed-off-by: Dmitry V. Levin Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter.h | 1 - 1 file changed, 1 deletion(-) commit 427345d61297f5a501114b2c02e6af06a9768788 Author: Florian Westphal Date: Mon Feb 13 22:26:49 2017 +0100 netfilter: nft_ct: fix random validation errors for zone set support Dan reports: net/netfilter/nft_ct.c:549 nft_ct_set_init() error: uninitialized symbol 'len'. Reported-by: Dan Carpenter Fixes: edee4f1e924582 ("netfilter: nft_ct: add zone id set support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 1 + 1 file changed, 1 insertion(+) commit 1ec492232ed659acde8cc00b9ecc7529778e03e1 Author: Shaohua Li Date: Tue Feb 21 14:27:57 2017 -0800 md/raid1: fix write behind issues introduced by bio_clone_bioset_partial There are two issues, introduced by commit 8e58e32(md/raid1: use bio_clone_bioset_partial() in case of write behind): - bio_clone_bioset_partial() uses bytes instead of sectors as parameters - in writebehind mode, we return bio if all !writemostly disk bios finish, which could happen before writemostly disk bios run. So all writemostly disk bios should have their bvec. Here we just make sure all bios are cloned instead of fast cloned. Reviewed-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit aff8da09f2381f0869faaf6637b0d892a3ee99ed Author: Shaohua Li Date: Tue Feb 21 10:56:19 2017 -0800 md/raid1: handle flush request correctly I got a warning triggered in align_to_barrier_unit_end. It's a flush request so sectors == 0. The flush request happens to work well without the new barrier patch, but we'd better handle it explictly. Cc: NeilBrown Acked-by: Coly Li Signed-off-by: Shaohua Li drivers/md/raid1.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d939cdfde34f50b95254b375f498447c82190b3e Author: Shaohua Li Date: Tue Feb 21 11:57:01 2017 -0800 md/linear: shutup lockdep warnning Commit 03a9e24(md linear: fix a race between linear_add() and linear_congested()) introduces the warnning. Acked-by: Coly Li Signed-off-by: Shaohua Li drivers/md/linear.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 60e8d3e11645a1b9c4197d9786df3894332c1685 Merge: 190c3ee c4d052c Author: Linus Torvalds Date: Thu Feb 23 11:53:22 2017 -0800 Merge tag 'pci-v4.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - add ASPM L1 substate support - enable PCIe Extended Tags when supported - configure PCIe MPS settings on iProc, Versatile, X-Gene, and Xilinx - increase VPD access timeout - add ACS quirks for Intel Union Point, Qualcomm QDF2400 and QDF2432 - use new pci_irq_alloc_vectors() in more drivers - fix MSI affinity memory leak - remove unused MSI interfaces and update documentation - remove unused AER .link_reset() callback - avoid pci_lock / p->pi_lock deadlock seen with perf - serialize sysfs enable/disable num_vfs operations - move DesignWare IP from drivers/pci/host/ to drivers/pci/dwc/ and refactor so we can support both hosts and endpoints - add DT ECAM-like support for HiSilicon Hip06/Hip07 controllers - add Rockchip system power management support - add Thunder-X cn81xx and cn83xx support - add Exynos 5440 PCIe PHY support * tag 'pci-v4.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (93 commits) PCI: dwc: Remove dependency of designware on CONFIG_PCI PCI: dwc: Add CONFIG_PCIE_DW_HOST to enable PCI dwc host PCI: dwc: Split pcie-designware.c into host and core files PCI: dwc: designware: Fix style errors in pcie-designware.c PCI: dwc: designware: Parse "num-lanes" property in dw_pcie_setup_rc() PCI: dwc: all: Split struct pcie_port into host-only and core structures PCI: dwc: designware: Get device pointer at the start of dw_pcie_host_init() PCI: dwc: all: Rename cfg_read/cfg_write to read/write PCI: dwc: all: Use platform_set_drvdata() to save private data PCI: dwc: designware: Move register defines to designware header file PCI: dwc: Use PTR_ERR_OR_ZERO to simplify code PCI: dra7xx: Group PHY API invocations PCI: dra7xx: Enable MSI and legacy interrupts simultaneously PCI: dra7xx: Add support to force RC to work in GEN1 mode PCI: dra7xx: Simplify probe code with devm_gpiod_get_optional() PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory PCI: exynos: Support the PHY generic framework Documentation: binding: Modify the exynos5440 PCIe binding phy: phy-exynos-pcie: Add support for Exynos PCIe PHY Documentation: samsung-phy: Add exynos-pcie-phy binding ... commit 190c3ee06a0f0660839785b7ad8a830e832d9481 Merge: af17fe7 9c47137 Author: Linus Torvalds Date: Thu Feb 23 11:36:06 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Some 'const'ing in qlogic networking drivers, from Bhumika Goyal. 2) Fix scheduling while atomic in l2tp network namespace exit by deferring the work to the workqueue. From Ridge Kennedy. 3) Fix use after free in dccp timewait handling, from Andrey Ryabinin. 4) mlx5e CQE compression engine not initialized properly, from Tariq Toukan. 5) Some UAPI header fixes from Dmitry V. Levin. 6) Don't overwrite module parameter value in mlx4 driver, from Majd Dibbiny. 7) Fix divide by zero in xt_hashlimit netfilter module, from Alban Browaeys. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits) bpf: Fix bpf_xdp_event_output net/mlx4_en: Use __skb_fill_page_desc() net/mlx4_core: Use cq quota in SRIOV when creating completion EQs net/mlx4_core: Fix VF overwrite of module param which disables DMFS on new probed PFs net/mlx4: Spoofcheck and zero MAC can't coexist net/mlx4: Change ENOTSUPP to EOPNOTSUPP uapi: fix linux/rds.h userspace compilation errors uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors lib: Remove string from parman config selection forcedeth: Remove return from a void function bpf: fix spelling mistake: "proccessed" -> "processed" uapi: fix linux/llc.h userspace compilation error uapi: fix linux/ip6_tunnel.h userspace compilation errors net/mlx5e: Fix wrong CQE decompression net/mlx5e: Update MPWQE stride size when modifying CQE compress state net/mlx5e: Fix broken CQE compression initialization net/mlx5e: Do not reduce LRO WQE size when not using build_skb net/mlx5e: Register/unregister vport representors on interface attach/detach net/mlx5e: s390 system compilation fix tcp: account for ts offset only if tsecr not zero ... commit e93b9865251a0503d83fd570e7d5a7c8bc351715 Author: Hou Pengyang Date: Thu Feb 16 12:34:31 2017 +0000 f2fs: add ovp valid_blocks check for bg gc victim to fg_gc For foreground gc, greedy algorithm should be adapted, which makes this formula work well: (2 * (100 / config.overprovision + 1) + 6) But currently, we fg_gc have a prior to select bg_gc victim segments to gc first, these victims are selected by cost-benefit algorithm, we can't guarantee such segments have the small valid blocks, which may destroy the f2fs rule, on the worstest case, would consume all the free segments. This patch fix this by add a filter in check_bg_victims, if segment's has # of valid blocks over overprovision ratio, skip such segments. Cc: Signed-off-by: Hou Pengyang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +++ fs/f2fs/gc.c | 22 ++++++++++++++++++++-- fs/f2fs/segment.h | 9 +++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) commit af17fe7a63db7e11d65f1296f0cbf156a89a2735 Merge: f14cc3b cdbe33d Author: Linus Torvalds Date: Thu Feb 23 11:27:49 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull Mellanox rdma updates from Doug Ledford: "Mellanox specific updates for 4.11 merge window Because the Mellanox code required being based on a net-next tree, I keept it separate from the remainder of the RDMA stack submission that is based on 4.10-rc3. This branch contains: - Various mlx4 and mlx5 fixes and minor changes - Support for adding a tag match rule to flow specs - Support for cvlan offload operation for raw ethernet QPs - A change to the core IB code to recognize raw eth capabilities and enumerate them (touches non-Mellanox code) - Implicit On-Demand Paging memory registration support" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (40 commits) IB/mlx5: Fix configuration of port capabilities IB/mlx4: Take source GID by index from HW GID table IB/mlx5: Fix blue flame buffer size calculation IB/mlx4: Remove unused variable from function declaration IB: Query ports via the core instead of direct into the driver IB: Add protocol for USNIC IB/mlx4: Support raw packet protocol IB/mlx5: Support raw packet protocol IB/core: Add raw packet protocol IB/mlx5: Add implicit MR support IB/mlx5: Expose MR cache for mlx5_ib IB/mlx5: Add null_mkey access IB/umem: Indicate that process is being terminated IB/umem: Update on demand page (ODP) support IB/core: Add implicit MR flag IB/mlx5: Support creation of a WQ with scatter FCS offload IB/mlx5: Enable QP creation with cvlan offload IB/mlx5: Enable WQ creation and modification with cvlan offload IB/mlx5: Expose vlan offloads capabilities IB/uverbs: Enable QP creation with cvlan offload ... commit f14cc3b13d8f3ceee862f8365d37ba214630126a Merge: 5bcbe22 d9d8478 Author: Linus Torvalds Date: Thu Feb 23 11:26:09 2017 -0800 Merge tag 'vfio-v4.11-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Kconfig fixes for SPAPR_TCE_IOMMU=n (Michael Ellerman) - Module softdep rather than request_module to simplify usage from initrd (Alex Williamson) - Comment typo fix (Changbin Du) * tag 'vfio-v4.11-rc1' of git://github.com/awilliam/linux-vfio: vfio: fix a typo in comment of function vfio_pin_pages vfio: Replace module request with softdep vfio/mdev: Use a module softdep for vfio_mdev vfio: Fix build break when SPAPR_TCE_IOMMU=n commit 86d54795c94532075d862aa0a79f0c981dab4bdd Author: Jaegeuk Kim Date: Fri Feb 17 09:55:55 2017 -0800 f2fs: do not wait for writeback in write_begin Otherwise we can get livelock like below. [79880.428136] dbench D 0 18405 18404 0x00000000 [79880.428139] Call Trace: [79880.428142] __schedule+0x219/0x6b0 [79880.428144] schedule+0x36/0x80 [79880.428147] schedule_timeout+0x243/0x2e0 [79880.428152] ? update_sd_lb_stats+0x16b/0x5f0 [79880.428155] ? ktime_get+0x3c/0xb0 [79880.428157] io_schedule_timeout+0xa6/0x110 [79880.428161] __lock_page+0xf7/0x130 [79880.428164] ? unlock_page+0x30/0x30 [79880.428167] pagecache_get_page+0x16b/0x250 [79880.428171] grab_cache_page_write_begin+0x20/0x40 [79880.428182] f2fs_write_begin+0xa2/0xdb0 [f2fs] [79880.428192] ? f2fs_mark_inode_dirty_sync+0x16/0x30 [f2fs] [79880.428197] ? kmem_cache_free+0x79/0x200 [79880.428203] ? __mark_inode_dirty+0x17f/0x360 [79880.428206] generic_perform_write+0xbb/0x190 [79880.428213] ? file_update_time+0xa4/0xf0 [79880.428217] __generic_file_write_iter+0x19b/0x1e0 [79880.428226] f2fs_file_write_iter+0x9c/0x180 [f2fs] [79880.428231] __vfs_write+0xc5/0x140 [79880.428235] vfs_write+0xb2/0x1b0 [79880.428238] SyS_write+0x46/0xa0 [79880.428242] entry_SYSCALL_64_fastpath+0x1e/0xad Fixes: cae96a5c8ab6 ("f2fs: check io submission more precisely") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 05eeb118a0e9fdc675a1f9db05039693da3ea25e Author: Yunlei He Date: Fri Feb 17 17:16:38 2017 +0800 f2fs: replace __get_victim by dirty_segments in FG_GC In FG_GC process, it will search victim section twice. This will cause some dirty section with less valid blocks skip garbage collection. section # 26425 : valid blocks # 3 142.037567: get_victim_by_default: victim 26425 : valid blocks # 3 142.037585: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244 142.039494: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19022 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24 142.070247: new_curseg: Debug: alloc new segment 26746 142.244341: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26054 ofs_unit = 1, pre_victim_secno = 26054, prefree = 0, free = 243 142.254475: do_garbage_collect: Debug: FG_GC, seg_freed = 1 142.293131: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23466 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244 142.319001: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23467 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244 142.368879: get_victim_by_default: victim 26425 : valid blocks # 3 142.368894: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244 142.378127: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19612 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24 142.416917: new_curseg: Debug: alloc new segment 26054 142.656794: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 25404 ofs_unit = 1, pre_victim_secno = 25404, prefree = 0, free = 243 142.662139: do_garbage_collect: Debug: FG_GC, seg_freed = 1 142.684159: new_curseg: Debug: alloc new segment 25197 142.685059: get_victim_by_default: victim 26425 : valid blocks # 3 142.685079: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 243 142.701427: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26238 ofs_unit = 1, pre_victim_secno = 26238, prefree = 0, free = 243 142.707105: do_garbage_collect: Debug: FG_GC, seg_freed = 1 142.802444: f2fs_get_victim: dev = (259,30), type = Warm DATA, policy = (Background GC, SSR-mode, Greedy), victim = 23473 ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 244 142.804422: get_victim_by_default: victim 26425 : valid blocks # 3 142.804443: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244 142.851567: f2fs_get_victim: dev = (259,30), type = Hot DATA, policy = (Background GC, SSR-mode, Greedy), victim = 19092 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 24 142.865014: new_curseg: Debug: alloc new segment 26238 143.082245: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26307 ofs_unit = 1, pre_victim_secno = 26307, prefree = 0, free = 244 143.088252: do_garbage_collect: Debug: FG_GC, seg_freed = 1 143.128307: new_curseg: Debug: alloc new segment 25404 143.181846: get_victim_by_default: victim 26425 : valid blocks # 3 143.181872: f2fs_get_victim: dev = (259,30), type = No TYPE, policy = (Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1, pre_victim_secno = 26425, prefree = 0, free = 244 Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 5012de209b704ab460ddc5787a5f010cbd4af954 Author: Jaegeuk Kim Date: Thu Feb 16 10:35:41 2017 -0800 f2fs: trace victim's cost selectecd by f2fs_gc This patch adds min_cost of each victims. Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 88c5c13a5027b36d914536fdba23f069d7067204 Author: Jaegeuk Kim Date: Tue Feb 14 09:54:37 2017 -0800 f2fs: fix multiple f2fs_add_link() calls having same name It turns out a stakable filesystem like sdcardfs in AOSP can trigger multiple vfs_create() to lower filesystem. In that case, f2fs will add multiple dentries having same name which breaks filesystem consistency. Until upper layer fixes, let's work around by f2fs, which shows actually not much performance regression. Cc: Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 34 +++++++++++++++++++++++++++++----- fs/f2fs/f2fs.h | 1 + 2 files changed, 30 insertions(+), 5 deletions(-) commit d50aaeec905baebcef0c401768b987ed18458015 Author: Jaegeuk Kim Date: Wed Feb 15 11:14:06 2017 -0800 f2fs: show actual device info in tracepoints This patch shows actual device information in the tracepoints. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 10 ++++----- include/trace/events/f2fs.h | 49 ++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 28 deletions(-) commit 5b6c6be2d878bd7ec4dc2cb4e2a2da2779fe52ab Author: Jaegeuk Kim Date: Tue Feb 14 19:32:51 2017 -0800 f2fs: use SSR for warm node as well We have had node chains, but haven't used it so far due to stale node blocks. Now, we have crc|cp_ver in node footer and give random cp_ver at format time, we can start to use it again. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d38d35155514ceef5efb79f6d5b4f0f1638da5b4 Author: Omar Sandoval Date: Wed Feb 22 10:58:30 2017 -0800 blk-mq-sched: separate mark hctx and queue restart operations In blk_mq_sched_dispatch_requests(), we call blk_mq_sched_mark_restart() after we dispatch requests left over on our hardware queue dispatch list. This is so we'll go back and dispatch requests from the scheduler. In this case, it's only necessary to restart the hardware queue that we are running; there's no reason to run other hardware queues just because we are using shared tags. So, split out blk_mq_sched_mark_restart() into two operations, one for just the hardware queue and one for the whole request queue. The core code only needs the hctx variant, but I/O schedulers will want to use both. This also requires adjusting blk_mq_sched_restart_queues() to always check the queue restart flag, not just when using shared tags. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 20 ++++++++------------ block/blk-mq-sched.h | 26 ++++++++++++++++++-------- 2 files changed, 26 insertions(+), 20 deletions(-) commit da55f2cc78418dee88400aafbbaed19d7ac8188e Author: Omar Sandoval Date: Wed Feb 22 10:58:29 2017 -0800 blk-mq: use sbq wait queues instead of restart for driver tags Commit 50e1dab86aa2 ("blk-mq-sched: fix starvation for multiple hardware queues and shared tags") fixed one starvation issue for shared tags. However, we can still get into a situation where we fail to allocate a tag because all tags are allocated but we don't have any pending requests on any hardware queue. One solution for this would be to restart all queues that share a tag map, but that really sucks. Ideally, we could just block and wait for a tag, but that isn't always possible from blk_mq_dispatch_rq_list(). However, we can still use the struct sbitmap_queue wait queues with a custom callback instead of blocking. This has a few benefits: 1. It avoids iterating over all hardware queues when completing an I/O, which the current restart code has to do. 2. It benefits from the existing rolling wakeup code. 3. It avoids punting to another thread just to have it block. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 64 +++++++++++++++++++++++++++++++++++++++++++------- include/linux/blk-mq.h | 2 ++ 2 files changed, 57 insertions(+), 9 deletions(-) commit 2d19020b085eaf61d24377db27e8630cd9cff7ce Author: Scott Bauer Date: Wed Feb 22 10:15:08 2017 -0700 block/sed-opal: Propagate original error message to userland. During an error on a comannd, ex: user provides wrong pw to unlock range, we will gracefully terminate the opal session. We want to propagate the original error to userland instead of the result of the session termination, which is almost always a success. Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e286bcfc59e01c2c57f2d79a46063c0bddb7a0d1 Author: Scott Bauer Date: Wed Feb 22 10:15:07 2017 -0700 nvme/pci: re-check security protocol support after reset A device may change capabilities after each reset, e.g. due to a firmware upgrade. We should thus check for Security Send/Receive and OPAL support after each reset. Based on patches from Christoph and Keith. Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 7d6d15789d69856f1c5405e106a773c87277eb8c Author: Scott Bauer Date: Wed Feb 22 10:15:06 2017 -0700 block/sed-opal: Introduce free_opal_dev to free the structure and clean up state Before we free the opal structure we need to clean up any saved locking ranges that the user had told us to unlock from a suspend. Signed-off-by: Scott Bauer Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/sed-opal.c | 30 ++++++++++++++++++++++++++++++ include/linux/sed-opal.h | 5 +++++ 2 files changed, 35 insertions(+) commit 9c4713701c01e4cef6e2315c2818abc919ffb0de Author: Martin KaFai Lau Date: Thu Feb 23 10:40:34 2017 -0800 bpf: Fix bpf_xdp_event_output Fix a typo. xdp->data instead of xdp should be copied to the perf-event's dst_buff. Fixes: 4de16969523c ("bpf: enable event output helper also for xdp types") Reported-by: Huapeng Zhou Tested-by: Feixiong Zhang Acked-by: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39133a5015e2fa405a0387053d65580988a6a1bc Author: Chao Yu Date: Wed Feb 8 17:39:44 2017 +0800 f2fs: enable inline_xattr by default In android, since SElinux is enable, security policy will be appliedd for each file, it stores in inode as an xattr entry, so it will take one 4k size node block additionally for each file. Let's enable inline_xattr by default in order to save storage space. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) commit 23cf7212a1cae2158dcf5f41d9733d59e320f8f6 Author: Chao Yu Date: Wed Feb 15 10:34:45 2017 +0800 f2fs: introduce noinline_xattr mount option This patch introduces new mount option 'noinline_xattr', so we can disable inline xattr functionality which is already set as a default mount option. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 1 + fs/f2fs/super.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 25cc5d3b9dde074bfa06024fd6486020963807da Author: Jaegeuk Kim Date: Mon Feb 13 17:02:44 2017 -0800 f2fs: avoid reading NAT page by get_node_info We've not seen this buggy case for a long time, so it's time to avoid this unnecessary get_node_info() call which reading NAT page to cache nat entry. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9b064f7d0c9ab179b9cb18e144ab65d7ea953443 Author: Jaegeuk Kim Date: Sat Feb 11 10:46:44 2017 -0800 f2fs: remove build_free_nids() during checkpoint Let's avoid build_free_nids() in checkpoint path. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 -- 1 file changed, 2 deletions(-) commit d260081ccf37f57b74396ec48f415f27d1b01b13 Author: Chao Yu Date: Wed Feb 8 17:39:45 2017 +0800 f2fs: change recovery policy of xattr node block Currently, if we call fsync after updating the xattr date belongs to the file, f2fs needs to trigger checkpoint to keep xattr data consistent. But, this policy cause low performance as checkpoint will block most foreground operations and cause unneeded and unrelated IOs around checkpoint. This patch will reuse regular file recovery policy for xattr node block, so, we change to write xattr node block tagged with fsync flag to warm area instead of cold area, and during recovery, we search warm node chain for fsynced xattr block, and do the recovery. So, for below application IO pattern, performance can be improved obviously: - touch file - create/update/delete xattr entry in file - fsync file Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +-- fs/f2fs/file.c | 3 --- fs/f2fs/node.c | 29 +++++++++++++++++------------ fs/f2fs/node.h | 2 +- fs/f2fs/recovery.c | 8 +++----- fs/f2fs/xattr.c | 2 -- 6 files changed, 22 insertions(+), 25 deletions(-) commit 2ad0ef846b38288103d8373d1196c465df2c4d7d Author: Bhumika Goyal Date: Sat Feb 11 15:50:46 2017 +0530 f2fs: super: constify fscrypt_operations structure Declare fscrypt_operations structure as const as it is only stored in the s_cop field of a super_block structure. This field is of type const, so fscrypt_operations structure having this property can be made const too. File size before: fs/f2fs/super.o text data bss dec hex filename 54131 31355 184 85670 14ea6 fs/f2fs/super.o File size after: fs/f2fs/super.o text data bss dec hex filename 54227 31259 184 85670 14ea6 fs/f2fs/super.o Signed-off-by: Bhumika Goyal Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1200abb26f8287e723e79e134b66d0041c095b73 Author: Jaegeuk Kim Date: Thu Feb 9 13:25:35 2017 -0800 f2fs: show checkpoint version at mount time If we mounted f2fs successfully, let's show current checkpoint version. Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 ++ 1 file changed, 2 insertions(+) commit 6de3f12eb737dae30628296d75c67664e8b1506e Author: Tiezhu Yang Date: Wed Feb 8 05:08:01 2017 +0800 f2fs: fix a typo in f2fs.txt There is a typo "f2f2" in f2fs.txt, this patch fixes it. Signed-off-by: Tiezhu Yang Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f54f51f46f69f3ccde2b65e682a51b0aa6199c3 Author: Jaegeuk Kim Date: Mon Feb 6 13:57:58 2017 -0800 f2fs: remove preflush for nobarrier case This patch removes REQ_PREFLUSH in the nobarrier case. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 942fd3192f83cef54bc0d485937fd5382ac5acd0 Author: Jaegeuk Kim Date: Wed Feb 1 16:51:22 2017 -0800 f2fs: check last page index in cached bio to decide submission If the cached bio has the last page's index, then we need to submit it. Otherwise, we don't need to submit it and can wait for further IO merges. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 ++- fs/f2fs/data.c | 43 ++++++++++++++++++++++--------------------- fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/node.c | 12 +++++++----- fs/f2fs/segment.c | 13 +++++++------ 5 files changed, 40 insertions(+), 35 deletions(-) commit d68f735b3bc934a7523a047aa952a577cf6ca171 Author: Jaegeuk Kim Date: Fri Feb 3 17:44:04 2017 -0800 f2fs: check io submission more precisely This patch check IO submission more precisely than previous rough check. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 23 +++++++++++++++++------ fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 27 +++++++++++++++++++-------- 3 files changed, 37 insertions(+), 14 deletions(-) commit f566bae8462c4a48b55bbf4e58d5b1e0a8563819 Author: Jaegeuk Kim Date: Fri Feb 3 17:18:00 2017 -0800 f2fs: call internal __write_data_page directly This patch introduces __write_data_page to call it by f2fs_write_cache_pages directly.. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e7c75ab099c8c8d4616c2ac10517e86a88b368d1 Author: Jaegeuk Kim Date: Thu Feb 2 18:18:06 2017 -0800 f2fs: avoid out-of-order execution of atomic writes We need to flush data writes before flushing last node block writes by using FUA with PREFLUSH. We don't need to guarantee precedent node writes since if those are not written, we can't reach to the last node block when scanning node block chain during roll-forward recovery. Afterwards f2fs_wait_on_page_writeback guarantees all the IO submission to disk, which builds a valid node block chain. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 ++- fs/f2fs/node.c | 10 +++++++--- include/trace/events/f2fs.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) commit faa24895acfd49cb61055b762e39ee6a5452a389 Author: Jaegeuk Kim Date: Thu Feb 2 18:27:17 2017 -0800 f2fs: move write_node_page above fsync_node_pages This patch just moves write_node_page and introduces an inner function. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 140 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 73 insertions(+), 67 deletions(-) commit c1b221078baf3d3275dc4309a716f6115696e2eb Author: Jaegeuk Kim Date: Thu Feb 2 16:40:55 2017 -0800 f2fs: move flush tracepoint This patch moves the tracepoint location for flush command. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5bcbe22ca47da04cda3a858cef67f55b550c1d13 Merge: 1db934a 12cb3a1 Author: Linus Torvalds Date: Thu Feb 23 09:54:19 2017 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "API: - Try to catch hash output overrun in testmgr - Introduce walksize attribute for batched walking - Make crypto_xor() and crypto_inc() alignment agnostic Algorithms: - Add time-invariant AES algorithm - Add standalone CBCMAC algorithm Drivers: - Add NEON acclerated chacha20 on ARM/ARM64 - Expose AES-CTR as synchronous skcipher on ARM64 - Add scalar AES implementation on ARM64 - Improve scalar AES implementation on ARM - Improve NEON AES implementation on ARM/ARM64 - Merge CRC32 and PMULL instruction based drivers on ARM64 - Add NEON acclerated CBCMAC/CMAC/XCBC AES on ARM64 - Add IPsec AUTHENC implementation in atmel - Add Support for Octeon-tx CPT Engine - Add Broadcom SPU driver - Add MediaTek driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (142 commits) crypto: xts - Add ECB dependency crypto: cavium - switch to pci_alloc_irq_vectors crypto: cavium - switch to pci_alloc_irq_vectors crypto: cavium - remove dead MSI-X related define crypto: brcm - Avoid double free in ahash_finup() crypto: cavium - fix Kconfig dependencies crypto: cavium - cpt_bind_vq_to_grp could return an error code crypto: doc - fix typo hwrng: omap - update Kconfig help description crypto: ccm - drop unnecessary minimum 32-bit alignment crypto: ccm - honour alignmask of subordinate MAC cipher crypto: caam - fix state buffer DMA (un)mapping crypto: caam - abstract ahash request double buffering crypto: caam - fix error path for ctx_dma mapping failure crypto: caam - fix DMA API leaks for multiple setkey() calls crypto: caam - don't dma_map key for hash algorithms crypto: caam - use dma_map_sg() return code crypto: caam - replace sg_count() with sg_nents_for_len() crypto: caam - check sg_count() return value crypto: caam - fix HW S/G in ablkcipher_giv_edesc_alloc() .. commit 1db934a5b77a9e37c4742c704fde6af233187a98 Merge: a3919ca fa04b76 Author: Linus Torvalds Date: Thu Feb 23 09:41:03 2017 -0800 Merge tag 'rpmsg-v4.11' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This introduces an interface for user space to directly communicate on rpmsg endpoints without the implementation of specific kernel drivers, which is useful for e.g. debug channels: * tag 'rpmsg-v4.11' of git://github.com/andersson/remoteproc: rpmsg: rpmsg_create_ept() returns NULL on error rpmsg: qcom: smd: Return positively when not enabled rpmsg: unlock on error in rpmsg_eptdev_read() rpmsg: char: add CONFIG_NET dependency rpmsg: smd: Register rpmsg user space interface for edges rpmsg: Driver for user space endpoint interface rpmsg: qcom_smd: Implement endpoint "poll" rpmsg: Introduce "poll" to endpoint ops rpmsg: qcom_smd: Add support for "label" property commit 3769a375ab8380ebecc78d0a3fe6e9079f9d6988 Author: Sean Nyekjaer Date: Thu Feb 23 15:01:24 2017 +0100 rtc: pcf2127: bulk read only date and time registers. Read control registers one by one and bulk read time registers. This fixes when the clock is read, the watchdog counter register is zeroed. Signed-off-by: Sean Nyekjaer Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2127.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit a3919caaa27a5fde1cbda46e394bb17953e104a1 Merge: 15192b0 01625cc5 Author: Linus Torvalds Date: Thu Feb 23 09:38:10 2017 -0800 Merge tag 'rproc-v4.11' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This introduces support for booting the dedicated sensor core in the Qualcomm MSM8996, updates the Qualcomm ADSP and Hexagon drivers to utilize SMD subdevice helpers for properly handle shutdowns and restarts of the remoteproc, add virtio support to the ST remoteproc and refactor the Qualcomm Hexagon driver to handle variations between platforms. The support code for parsing, loading and authenticating Qualcomm firmware files (MDT) is refactored and move to drivers/soc/qcom, to allow for non-remoteproc drivers to utilize this. Finally it brings some cleanups to the remoteproc core" * tag 'rproc-v4.11' of git://github.com/andersson/remoteproc: (27 commits) remoteproc: qcom: mdt_loader: Use signed type for offset remoteproc: st: add virtio communication support remoteproc: st: correct probe error management remoteproc: Modify the function names remoteproc: Reduce asynchronous request_firmware to auto-boot only remoteproc: Drop qcom_scm_pas_supported() from adsp_probe() MAINTAINERS: Add missing rpmsg include path remoteproc: qcom: Use common SMD edge handler remoteproc: qcom: wcnss: Make SMD handling common remoteproc: Move qcom_mdt_loader into drivers/soc/qcom remoteproc: qcom: mdt_loader: Refactor MDT loader remoteproc: qcom: mdt_loader: Don't overwrite firmware object remoteproc: qcom: Extract non-mdt related helper remoteproc: qcom: q6v5: Decouple driver from MDT loader remoteproc: qcom: q6v5: Remove mss supply from 8916 remoteproc: qcom: fix initializers for qcom_mss_reg_res array remoteproc: Drop firmware_loading_complete remoteproc: Add RPROC_DELETED state remoteproc: Move rproc_delete_debug_dir() to rproc_del() remoteproc: qcom: Add SLPI rproc support to load and boot slpi proc. ... commit 15192b029509316af4977d2cd389c1eb11183d13 Merge: 28cbc33 f38e5fb Author: Linus Torvalds Date: Thu Feb 23 09:36:04 2017 -0800 Merge tag 'gfs2-4.11.addendum' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 fix from Bob Peterson: "This is an addendum for the 4.11 merge window. Andy Price wrote this patch to close a nasty race condition that allows access to glocks that are being destroyed. Without this patch, GFS2 is vulnerable to random corruption and kernel panic" * tag 'gfs2-4.11.addendum' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Add missing rcu locking for glock lookup commit 28cbc335d272f293c4368abd4ac2e17e36805b79 Merge: 1ec5c18 7086b7b Author: Linus Torvalds Date: Thu Feb 23 08:50:22 2017 -0800 Merge tag 'sound-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Here is the update of sound bits for 4.11: again at this time, no big changes in ALSA and ASoC core but only cosmetic changes like consitifaction. Meanwhile, quite a lot of developments are seen in a few driver side. ALSA Core: - Clean up, consitification of some ops HD-audio: - A slight behavior change of single_cmd option - Quirks for AmigaOne X1000, Samsung Ativ Book 8, Dell AiO, ALC221 HP, and fixes for Lewisburg controller - Realtek ALC299, ALC1220 codecs Others: - USB-audio: Tascam US-16x08 DSP mixer quirk - Intel HDMI LPE audio support for Baytrail / Cherrytrail; this contains some updates in drm/i915 for the new platform binding ASoC: - Lots of updates in Intel drivers, mostly for DisplayPort and HDMI on Skylake and onwards, as well as more Baytrail / Cherrytrail boards support - Channel mapping support for HDMI - Support for AllWinner A31 and A33, Everest Semiconductor ES8328, Nuvoton NAU8540. * tag 'sound-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (323 commits) ALSA: usb-audio: Tidy up mixer_us16x08.c ALSA: usb-audio: Fix memory leak and corruption in mixer_us16x08.c ALSA: usb-audio: purge needless variable length array ALSA: x86: hdmi: select CONFIG_SND_PCM ALSA: x86: Don't enable runtime PM as default ALSA: x86: Use runtime PM autosuspend ALSA: usb-audio: localize function without external linkage ALSA: usb-audio: localize one-referrer variable ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk ALSA: emu10k1: constify snd_emux_operators structure ASoC: sun4i-spdif: drop unnessary snd_soc_unregister_component() ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine ASoC: nau8825: automatic BCLK and LRC divde in master mode ASoC: hdac_hdmi: Add device id for Geminilake ASoC: Intel: Skylake: Add Geminlake IDs ASoC: rt298: Add DMI match for Geminilake reference platform ASoC: Intel: Skylake: Check device type to get endpoint configuration ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine ... commit 1ec5c1867af085897bb9e0f67bef3713334dbe7f Merge: d5dee39 3498d86 Author: Linus Torvalds Date: Thu Feb 23 08:46:04 2017 -0800 Merge tag 'gpio-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.11 cycle Core changes: - Augment fwnode_get_named_gpiod() to configure the GPIO pin immediately after requesting it like all other APIs do. This is a treewide change also updating all users. - Pass a GPIO label down to gpiod_request() from fwnode_get_named_gpiod(). This makes debugfs and the userspace ABI correctly reflect the current in-kernel consumer of a pin taken using this abstraction. This is a treewide change also updating all users. - Rename devm_get_gpiod_from_child() to devm_fwnode_get_gpiod_from_child() to reflect the fact that this function is operating on a fwnode object. This is a treewide change also updating all users. - Make it possible to take multiple GPIOs in a single hog of device tree hogs. - The refactorings switching GPIO chips to use the .set_config() callback using standard pin control properties and providing a backend into the pin control subsystem that were also merged into the pin control tree naturally appear here too. Testing instrumentation: - A whole slew of cleanups and improvements to the mockup GPIO driver. We now have an extended userspace test exercising the subsystem, and we can inject interrupts etc from userspace to fully test the core GPIO functionality. New drivers: - New driver for the Cortina Systems Gemini GPIO controller. - New driver for the Exar XR17V352/354/358 chips. - New driver for the ACCES PCI-IDIO-16 PCI GPIO card. Driver changes: - RCAR: set the irqchip parent device, add fine-grained runtime PM support. - pca953x: support optional RESET control line on the chip. - DaVinci: cleanups and simplifications. Add support for multiple instances. - .set_multiple() and naming of lines on more or less all of the ISA/PCI GPIO controllers. - mcp23s08: refactored to use regmap as a first step to further rewrites and modernizations" * tag 'gpio-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (61 commits) gpio: reintroduce devm_get_gpiod_from_child() gpio: pci-idio-16: Fix PCI BAR index gpio: pci-idio-16: Fix PCI device ID code gpio: mockup: implement event injecting over debugfs gpio: mockup: add a dummy irqchip gpio: mockup: implement naming the lines gpio: mockup: code shrink gpio: mockup: readability tweaks gpio: Add GPIO support for the ACCES PCI-IDIO-16 gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper gpio: Rename devm_get_gpiod_from_child() gpio: mcp23s08: Select REGMAP/REGMAP_I2C to fix build error gpio: ws16c48: Add support for GPIO names gpio: gpio-mm: Add support for GPIO names gpio: 104-idio-16: Add support for GPIO names gpio: 104-idi-48: Add support for GPIO names gpio: 104-dio-48e: Add support for GPIO names gpio: ws16c48: Remove unnecessary driver_data set gpio: gpio-mm: Remove unnecessary driver_data set gpio: 104-idio-16: Remove unnecessary driver_data set ... commit d5dee39b27201f9f5460eca55efcc91a663b738c Merge: 4cc4b93 6e11617 Author: Linus Torvalds Date: Thu Feb 23 08:39:40 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry: - a new driver for Zeitech touchscreen controller - a new driver for Samsung "touchkeys" - touchscreen driver for Moorestown platform has been removed because platform support is gone - MPU3050 accelerometer driver was removed in favor of IIO driver - miscellaneous driver cleanup and fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (88 commits) Input: zet6223 - export OF device ID as module aliases Input: tsc2004/5 - switch to using generic device properties Input: tsc2004/5 - fix regulator handling Input: tsc2005 - add OF device table Input: add driver for Zeitec ZET6223 Input: joydev - do not report stale values on first open Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guest Input: synaptics-rmi4 - clean up F30 implementation Input: synaptics - use SERIO_OOB_DATA to handle trackstick buttons Input: psmouse - add a custom serio protocol to send extra information Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Input: xpad - restore LED state after device resume Input: synaptics-rmi4 - add rmi_find_function() Input: xpad - fix stuck mode button on Xbox One S pad Input: joydev - use clamp() macro Input: refuse to register absolute devices without absinfo Input: synaptics-rmi4 - add sysfs interfaces for hardware IDs Input: synaptics-rmi4 - add sysfs attribute update_fw_status Input: mousedev - stop offering PS/2 to userspace by default Input: tca8418 - switch to using generic device properties ... commit cd429ce2d095041d249ec85feaed608bbf72154f Author: Pavel Tatashin Date: Thu Feb 16 15:13:54 2017 -0500 sparc64: memblock resizes are not handled properly In add_node_ranges() when memblock resize happens, the iterator keeps using the previous freed array. This bug cause hangs on machine where there are over 128 memory blocks during boot. For example, on machines where memory interleaving is small. The problem is seen on T4-4 because it cant have 2T of memory, and memory is interleaved at 8G. So we have 2T/8G = 256 regions to set node IDs. The starting size of regions array is 128. Thus, we have to double at least one time (actually we have to double twice because some memory is already reserved and thus we need more than 256 regions). We start using an incorrect pointer to the array after the first doubling. Signed-off-by: Pavel Tatashin Signed-off-by: Babu Moger Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1537b26dab1c1dfd92a116a933143f52b1112a22 Author: Pavel Tatashin Date: Thu Feb 16 15:05:58 2017 -0500 sparc64: use latency groups to improve add_node_ranges speed add_node_ranges() takes 2.6s - 3.6s per 1T of boot time. On machine with 6T memory it takes 15.4s, on 32T it would take 82s-115s of boot time. This function sets NUMA ids for memory blocks, and scans the whole memory a page at a time to do so. But, we could use values in latency groups mask and match to determine the boundaries without checking every single page. With the fix the add_node_ranges() time is reduced from 15.4s down to 0.2s on machine with 6T memory. Signed-off-by: Pavel Tatashin Reviewed-by: Babu Moger Reviewed-by: Bob Picco Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 208 ++++++++++++++++++++++++++---------------------- 1 file changed, 113 insertions(+), 95 deletions(-) commit dcd1912d21a02534d1f0a9005d5ba3283f164780 Author: Nitin Gupta Date: Mon Feb 6 12:33:26 2017 -0800 sparc64: Add 64K page size support This patch depends on: [v6] sparc64: Multi-page size support - Testing Tested on Sonoma by running stream benchmark instance which allocated 48G worth of 64K pages. boot params: default_hugepagesz=64K hugepagesz=64K hugepages=1310720 Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/include/asm/page_64.h | 3 ++- arch/sparc/mm/hugetlbpage.c | 54 ++++++++++++++++++++++++++++++++-------- arch/sparc/mm/init_64.c | 4 +++ arch/sparc/mm/tsb.c | 5 ++-- 4 files changed, 52 insertions(+), 14 deletions(-) commit c7d9f77d33a779ad582d8b2284ba007931ebd894 Author: Nitin Gupta Date: Wed Feb 1 16:16:36 2017 -0800 sparc64: Multi-page size support Add support for using multiple hugepage sizes simultaneously on mainline. Currently, support for 256M has been added which can be used along with 8M pages. Page tables are set like this (e.g. for 256M page): VA + (8M * x) -> PA + (8M * x) (sz bit = 256M) where x in [0, 31] and TSB is set similarly: VA + (4M * x) -> PA + (4M * x) (sz bit = 256M) where x in [0, 63] - Testing Tested on Sonoma (which supports 256M pages) by running stream benchmark instances in parallel: one instance uses 8M pages and another uses 256M pages, consuming 48G each. Boot params used: default_hugepagesz=256M hugepagesz=256M hugepages=300 hugepagesz=8M hugepages=10000 Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/include/asm/page_64.h | 3 +- arch/sparc/include/asm/pgtable_64.h | 23 +++-- arch/sparc/include/asm/tlbflush_64.h | 5 +- arch/sparc/kernel/tsb.S | 21 +---- arch/sparc/mm/hugetlbpage.c | 160 +++++++++++++++++++++++++++++++---- arch/sparc/mm/init_64.c | 42 ++++++++- arch/sparc/mm/tlb.c | 17 ++-- arch/sparc/mm/tsb.c | 44 ++++++++-- 8 files changed, 253 insertions(+), 62 deletions(-) commit 4cc4b9323f43458c9277e082f90316570431881e Merge: a57eaa1 db69032 Author: Linus Torvalds Date: Thu Feb 23 08:27:57 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "First set of updates for 4.11 kernel merge window - Add new Broadcom bnxt_re RoCE driver - rxe driver updates - ioctl cleanups - ETH_P_IBOE declaration cleanup - IPoIB changes - Add port state cache - Allow srpt driver to accept guids as port names in config - Update to hfi1 driver - Update to srp driver - Lots of misc minor changes all over" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (114 commits) RDMA/bnxt_re: fix for "bnxt_en: Update to firmware interface spec 1.7.0." rdma_cm: fail iwarp accepts w/o connection params IB/srp: Drain the send queue before destroying a QP IB/core: Add support for draining IB_POLL_DIRECT completion queues IB/srp: Improve an error path IB/srp: Make a diagnostic message more informative IB/srp: Document locking conventions IB/srp: Fix race conditions related to task management IB/srp: Avoid that duplicate responses trigger a kernel bug IB/SRP: Avoid using IB_MR_TYPE_SG_GAPS RDMA/qedr: Fix some error handling RDMA/bnxt_re: add DCB dependency IB/hns: include linux/module.h IB/vmw_pvrdma: Expose vendor error to ULPs vmw_pvrdma: switch to pci_alloc_irq_vectors IB/hfi1: use size_t for passing array length IB/ipoib: Remove redudant label IB/ipoib: remove the unnecessary memory free IB/mthca: switch to pci_alloc_irq_vectors IB/hfi1: Code reuse with memdup_copy ... commit 0d88b86694e0b176c1b9ca10cee95863065e2471 Merge: f41e546 4cfe140 Author: David S. Miller Date: Thu Feb 23 08:27:30 2017 -0800 Merge branch 'sparc64-jump-to-boot-prom' Vijay Kumar says: ==================== sparc64: Jump to boot prom from console on panic V3 changes: - patch 02/04: Added SERIAL_SUNHV conditional group for sunhv_migrate_hvcons_irq in smp_send_stop(). V2 changes: - Added cover letter patch Currently Stop-A (L1A) does not make the kernel switch to OBP on panic. This patchset addresses this issue. Also, now we can cause a jump to OBP by sending 'break' twice from sunhv console. On bare metal, one can send a break by typing Esc + 'B' + Sysrq (or whatever). On LDOM, press Ctrl + ] in telnet, and then "send break" at the telnet prompt. ==================== Signed-off-by: David S. Miller commit 4cfe140618b99e653134598de9f18b48743549ec Author: Vijay Kumar Date: Wed Feb 1 11:34:40 2017 -0800 Documentation/sparc: Steps for sending break on sunhv console Documented the steps for sending break on sunhv console. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller Documentation/sparc/console.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7db60d05e5ccc0a473fa2275f90f2fca0002ab21 Author: Vijay Kumar Date: Wed Feb 1 11:34:39 2017 -0800 sparc64: Send break twice from console to return to boot prom Now we can also jump to boot prom from sunhv console by sending break twice on console for both running and panicked kernel cases. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller drivers/tty/serial/sunhv.c | 6 +++++- kernel/panic.c | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 7dd4fcf5b70694dc961eb6b954673e4fc9730dbd Author: Vijay Kumar Date: Wed Feb 1 11:34:38 2017 -0800 sparc64: Migrate hvcons irq to panicked cpu On panic, all other CPUs are stopped except the one which had hit panic. To keep console alive, we need to migrate hvcons irq to panicked CPU. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/include/asm/setup.h | 5 ++++- arch/sparc/kernel/smp_64.c | 6 +++++- drivers/tty/serial/sunhv.c | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) commit cffb3e76818fee4763a2ce5f2b1eca2d7885e2cf Author: Vijay Kumar Date: Wed Feb 1 11:34:37 2017 -0800 sparc64: Set cpu state to offline when stopped CPU needs to be marked offline before stopping it. When not marked offline, the xcall receives HV_EWOULDBLOCK and so assumes that not all CPUs received the message, and retries. After 10000 retries, it finally fails with fatal mondo timeout. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/kernel/smp_64.c | 3 +++ 1 file changed, 3 insertions(+) commit f41e54616ca1a199f6c17228f26082ccdaaab3de Author: Liam R. Howlett Date: Wed Feb 1 14:09:26 2017 -0500 sunvdc: Add support for setting physical sector size Physical sector size is supported in v1.2 of the vDisk protocol and should be set if available. If protocol version 1.2 is used and the physical disk size is unavailable, then the disk is considered busy. Signed-off-by: Liam R. Howlett Signed-off-by: David S. Miller drivers/block/sunvdc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 269d8523585c1b82b53aff3cf00d88ccbaf58c35 Author: Eric Saint Etienne Date: Mon Feb 6 14:32:41 2017 +0000 sparc64: fix for user probes in high memory When returning from the user probe code into userspace process, PC & NPC are truncated to 32 bits. Due to shared libraries getting loaded very high in the virtual address space of the process, placing a user probe inside a shared library makes the kernel return into the process at the wrong address, causing it to seg'fault most of the time. This patch prevents truncating PC and NPC. Signed-off-by: Eric Saint Etienne Reviewed-by: David Aldridge Signed-off-by: David S. Miller arch/sparc/include/asm/uprobes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc5e8c283999168942baa5ef7f3805444f80be2b Author: Ben Hutchings Date: Sat Feb 4 16:32:22 2017 +0000 sparc: topology_64.h: Fix condition for including cpudata.h We currently define macros referring to cpu_data if CONFIG_SMP is defined, but only include the declaration if CONFIG_NUMA is defined. Fixes: 541cc39433a8 ("sparc: fix a building error reported by kbuild") Signed-off-by: Ben Hutchings Acked-by: Gonglei Signed-off-by: David S. Miller arch/sparc/include/asm/topology_64.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cbc41b43e7c2ba6503b6b96dfe38e6b1316f46cf Author: Bhumika Goyal Date: Sat Jan 14 18:01:54 2017 +0530 sparc32: mm: srmmu: add __ro_after_init to sparc32_cachetlb_ops structures The objects viking_ops, viking_sun4d_smp_ops and smp_cachetlb_ops of type sparc32_cachetlb_ops are not modified anywhere after getting modified in the init functions. Inside init their reference is also stored in a pointer of type const struct sparc32_cachetlb_ops *. So these structures are never modified after init, therefore add __ro_after to the declaration of these structures. Signed-off-by: Bhumika Goyal Reviewed-by: Kees Cook Signed-off-by: David S. Miller arch/sparc/mm/srmmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a57eaa1f25bb3e1d0aaf8906460053b9509c74a8 Merge: df9cdc1 80e5d45 Author: Linus Torvalds Date: Thu Feb 23 08:21:32 2017 -0800 Merge tag 'backlight-for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Frameworks: - Add Daniel Thompson as co-maintainer Fix-ups: - Improve error handling; adp5520_bl - Split initial power checks into dedicated function; pwm_bl - Check current PWM status; pwm_bl Bug Fixes: - Fix potential race; lcd - Fix module auto-loading; da9052" * tag 'backlight-for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: MAINTAINERS: Rework entry for Backlight backlight: da9052: Fix module autoload backlight: pwm_bl: Check the PWM state for initial backlight power state backlight: pwm_bl: Move the checks for initial power state to a separate function backlight: adp5520: Fix error handling in adp5520_bl_probe() backlight: lcd: Fix race condition during register commit df9cdc1727ed9debfce59c5f600d794a63fcbfeb Merge: bc49a78 e93c102 Author: Linus Torvalds Date: Thu Feb 23 08:18:01 2017 -0800 Merge tag 'mfd-for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Add new !TOUCHSCREEN_SUN4I dependency for SUN4I_GPADC - List include/dt-bindings/mfd/* to files supported in MAINTAINERS New Drivers: - Intel Apollo Lake SPI NOR - ST STM32 Timers (Advanced, Basic and PWM) - Motorola 6556002 CPCAP (PMIC) New Device Support: - Add support for AXP221 to axp20x - Add support for Intel Gemini Lake to intel-lpss-pci - Add support for MT6323 LED to mt6397-core - Add support for COMe-bBD#, COMe-bSL6, COMe-bKL6, COMe-cAL6 and COMe-cKL6 to kempld-core New Functionality: - Add support for Analog CODAC to sun6i-prcm - Add support for Watchdog to lpc_ich Fix-ups: - Error handling improvements; axp288_charger, axp20x, ab8500-sysctrl - Adapt platform data handling; axp20x - IRQ handling improvements; arizona, axp20x - Remove superfluous code; arizona, axp20x, lpc_ich - Trivial coding style/spelling fixes; axp20x, abx500, mfd.txt - Regmap fix-ups; axp20x - DT changes; mfd.txt, aspeed-lpc, aspeed-gfx, ab8500-core, tps65912, mt6397 - Use new I2C probing mechanism; max77686 - Constification; rk808 Bug Fixes: - Stop data transfer whilst suspended; cros_ec" * tag 'mfd-for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (43 commits) mfd: lpc_ich: Enable watchdog on Intel Apollo Lake PCH mfd: lpc_ich: Remove useless comments in core part mfd: Add support for several boards to Kontron PLD driver mfd: constify regmap_irq_chip structures MAINTAINERS: Add include/dt-bindings/mfd to MFD entry mfd: cpcap: Add minimal support mfd: mt6397: Add MT6323 LED support into MT6397 driver Documentation: devicetree: Add LED subnode binding for MT6323 PMIC mfd: tps65912: Export OF device ID table as module aliases mfd: ab8500-core: Rename clock device and compatible mfd: cros_ec: Send correct suspend/resume event to EC mfd: max77686: Remove I2C device ID table mfd: max77686: Use the struct i2c_driver .probe_new instead of .probe mfd: max77686: Use of_device_get_match_data() helper mfd: max77686: Don't attempt to get i2c_device_id .data mfd: ab8500-sysctrl: Handle probe deferral mfd: intel-lpss: Add Intel Gemini Lake PCI IDs mfd: axp20x: Fix AXP806 access errors on cold boot mfd: cros_ec: Send suspend state notification to EC mfd: cros_ec: Prevent data transfer while device is suspended ... commit efe0220fc2d2cc1cbd6c663dd3d652ac2b9afd1a Author: Christophe JAILLET Date: Mon Feb 20 08:08:15 2017 +0100 drm/rockchip: cdn-dp: Fix error handling It is likely that both 'clk_disable_unprepare()' should be called if 'pm_runtime_get_sync()' fails. Add a new label for that, because 'err_set_rate' is not meaningful in this case. Add a missing call to 'pm_runtime_put()'. Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Signed-off-by: Christophe JAILLET Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170220070815.23096-1-christophe.jaillet@wanadoo.fr drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b6705157b2db521ec7ff3b3ac205230f231798a6 Author: Arnd Bergmann Date: Tue Feb 14 22:31:51 2017 +0100 drm/rockchip: add extcon dependency for DP The newly added DP driver links against the extcon core, which fails when extcon is a module and this driver is not: drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_get_port_lanes': cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x24): undefined reference to `extcon_get_state' cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x44): undefined reference to `extcon_get_property' Let's make Kconfig enforce correct behavior with a dependency. Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170214213215.2888509-1-arnd@arndb.de drivers/gpu/drm/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ccaba0621a8577ce6b84cf625f2b9a4c6466d999 Merge: e65ade7 3ef767e Author: David S. Miller Date: Thu Feb 23 10:59:15 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Revisit warning logic when not applying default helper assignment. Jiri Kosina considers we are breaking existing setups and not warning our users accordinly now that automatic helper assignment has been turned off by default. So let's make him happy by spotting the warning by when we find a helper but we cannot attach, instead of warning on the former deprecated behaviour. Patch from Jiri Kosina. 2) Two patches to fix regression in ctnetlink interfaces with nfnetlink_queue. Specifically, perform more relaxed in CTA_STATUS and do not bail out if CTA_HELP indicates the same helper that we already have. Patches from Kevin Cernekee. 3) A couple of bugfixes for ipset via Jozsef Kadlecsik. Due to wrong index logic in hash set types and null pointer exception in the list:set type. 4) hashlimit bails out with correct userspace parameters due to wrong arithmetics in the code that avoids "divide by zero" when transforming the userspace timing in milliseconds to token credits. Patch from Alban Browaeys. 5) Fix incorrect NFQA_VLAN_MAX definition, patch from Ken-ichirou MATSUZAWA. 6) Don't not declare nfnetlink batch error list as static, since this may be used by several subsystems at the same time. Patch from Liping Zhang. ==================== Signed-off-by: David S. Miller commit e65ade77e87fd206bb78fae32ab7b604b01fade0 Merge: c12f4d7 7f0137e Author: David S. Miller Date: Thu Feb 23 10:57:58 2017 -0500 Merge branch 'mlx4-misc-fixes' Tariq Toukan says: ==================== mlx4 misc fixes This patchset contains misc bug fixes from Eric Dumazet and our team to the mlx4 Core and Eth drivers. Series generated against net commit: eee2faabc63d tcp: account for ts offset only if tsecr not zero v3: * Rebased, conflict solved. v2: * Added Eric's fix (patch 5/5). ==================== Signed-off-by: David S. Miller commit 7f0137e2ef9f32143df623001a96f7aab61a9595 Author: Eric Dumazet Date: Thu Feb 23 12:02:45 2017 +0200 net/mlx4_en: Use __skb_fill_page_desc() Or we might miss the fact that a page was allocated from memory reserves. Fixes: dceeab0e5258 ("mlx4: support __GFP_MEMALLOC for rx") Signed-off-by: Eric Dumazet Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6ed63d845e7866ff1a0eac9f0fa554fdf2c64e1d Author: Jack Morgenstein Date: Thu Feb 23 12:02:44 2017 +0200 net/mlx4_core: Use cq quota in SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the FW). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the FW total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Fixes: 5a0d0a6161ae ("mlx4: Structures and init/teardown for VF resource quotas") Signed-off-by: Jack Morgenstein Reported-by: Dexuan Cui Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/eq.c | 5 ++--- drivers/net/ethernet/mellanox/mlx4/main.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) commit 95f1ba9a24af9769f6e20dfe9a77c863f253f311 Author: Majd Dibbiny Date: Thu Feb 23 12:02:43 2017 +0200 net/mlx4_core: Fix VF overwrite of module param which disables DMFS on new probed PFs In the VF driver, module parameter mlx4_log_num_mgm_entry_size was mistakenly overwritten -- and in a manner which overrode the device-managed flow steering option encoded in the parameter. log_num_mgm_entry_size is a global module parameter which affects all ConnectX-3 PFs installed on that host. If a VF changes log_num_mgm_entry_size, this will affect all PFs which are probed subsequent to the change (by disabling DMFS for those PFs). Fixes: 3c439b5586e9 ("mlx4_core: Allow choosing flow steering mode") Signed-off-by: Majd Dibbiny Reviewed-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 2 -- 1 file changed, 2 deletions(-) commit 745d8ae4622c6808b22e33a944c7decb30074be4 Author: Eugenia Emantayev Date: Thu Feb 23 12:02:42 2017 +0200 net/mlx4: Spoofcheck and zero MAC can't coexist Spoofcheck can't be enabled if VF MAC is zero. Vice versa, can't zero MAC if spoofcheck is on. Fixes: 8f7ba3ca12f6 ('net/mlx4: Add set VF mac address support') Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 22 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +----- include/linux/mlx4/cmd.h | 2 +- include/linux/mlx4/driver.h | 10 ++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) commit 423b3aecf29085a52530d4f9167c56a84b081042 Author: Or Gerlitz Date: Thu Feb 23 12:02:41 2017 +0200 net/mlx4: Change ENOTSUPP to EOPNOTSUPP As ENOTSUPP is specific to NFS, change the return error value to EOPNOTSUPP in various places in the mlx4 driver. Signed-off-by: Or Gerlitz Suggested-by: Yotam Gigi Reviewed-by: Matan Barak Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 2 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/ethernet/mellanox/mlx4/intf.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mr.c | 2 +- drivers/net/ethernet/mellanox/mlx4/qp.c | 2 +- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit c12f4d761dd2313ae4f457041df3ec0c603aa76a Author: Dmitry V. Levin Date: Thu Feb 23 14:35:23 2017 +0300 uapi: fix linux/rds.h userspace compilation errors Consistently use types from linux/types.h to fix the following linux/rds.h userspace compilation errors: /usr/include/linux/rds.h:198:2: error: unknown type name 'u8' u8 rx_traces; /usr/include/linux/rds.h:199:2: error: unknown type name 'u8' u8 rx_trace_pos[RDS_MSG_RX_DGRAM_TRACE_MAX]; /usr/include/linux/rds.h:203:2: error: unknown type name 'u8' u8 rx_traces; /usr/include/linux/rds.h:204:2: error: unknown type name 'u8' u8 rx_trace_pos[RDS_MSG_RX_DGRAM_TRACE_MAX]; /usr/include/linux/rds.h:205:2: error: unknown type name 'u64' u64 rx_trace[RDS_MSG_RX_DGRAM_TRACE_MAX]; Fixes: 3289025aedc0 ("RDS: add receive message trace used by application") Signed-off-by: Dmitry V. Levin Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller include/uapi/linux/rds.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ea3ebc73b46fbdb049dafd47543bb22efaa09c8e Author: Dmitry V. Levin Date: Thu Feb 23 14:30:34 2017 +0300 uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors Include in uapi/linux/seg6.h to fix the following linux/seg6.h userspace compilation error: /usr/include/linux/seg6.h:31:18: error: array type has incomplete element type 'struct in6_addr' struct in6_addr segments[0]; Include in uapi/linux/seg6_iptunnel.h to fix the following linux/seg6_iptunnel.h userspace compilation error: /usr/include/linux/seg6_iptunnel.h:26:21: error: array type has incomplete element type 'struct ipv6_sr_hdr' struct ipv6_sr_hdr srh[0]; Fixes: a50a05f497a2 ("ipv6: sr: add missing Kbuild export for header files") Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/seg6.h | 1 + include/uapi/linux/seg6_iptunnel.h | 2 ++ 2 files changed, 3 insertions(+) commit 50ab3af16c48bc14a6787ab2f506c403d9d1bfad Author: Jiri Pirko Date: Thu Feb 23 10:57:45 2017 +0100 lib: Remove string from parman config selection As reported by Geert, remove the string so the user does not see this config option. The option is explicitly selected only as a dependency of in-kernel users. Reported-by: Geert Uytterhoeven Fixes: 44091d29f207 ("lib: Introduce priority array area manager") Signed-off-by: Jiri Pirko Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller lib/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca92aea9781691bae3bafde95048cc3840a70ad8 Author: Zhu Yanjun Date: Thu Feb 23 03:22:49 2017 -0500 forcedeth: Remove return from a void function In a void function, it is not necessary to append a return statement in it. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 2 -- 1 file changed, 2 deletions(-) commit bc1750f366902449f36f15f4a692a495fe6bcdfe Author: Colin Ian King Date: Thu Feb 23 00:20:53 2017 +0000 bpf: fix spelling mistake: "proccessed" -> "processed" trivial fix to spelling mistake in verbose log message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40df93be6a7084e09688e1ddc45615d13df133fc Author: Dmitry V. Levin Date: Thu Feb 23 01:38:26 2017 +0300 uapi: fix linux/llc.h userspace compilation error Include to fix the following linux/llc.h userspace compilation error: /usr/include/linux/llc.h:26:27: error: 'IFHWADDRLEN' undeclared here (not in a function) unsigned char sllc_mac[IFHWADDRLEN]; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/llc.h | 1 + 1 file changed, 1 insertion(+) commit 557d7acd754543ca6f7166b9abde0a1af01ed848 Author: Dmitry V. Levin Date: Thu Feb 23 01:38:03 2017 +0300 uapi: fix linux/ip6_tunnel.h userspace compilation errors Include and to fix the following linux/ip6_tunnel.h userspace compilation errors: /usr/include/linux/ip6_tunnel.h:23:12: error: 'IFNAMSIZ' undeclared here (not in a function) char name[IFNAMSIZ]; /* name of tunnel device */ /usr/include/linux/ip6_tunnel.h:30:18: error: field 'laddr' has incomplete type struct in6_addr laddr; /* local tunnel end-point address */ Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/ip6_tunnel.h | 2 ++ 1 file changed, 2 insertions(+) commit 79873fb6348a35634b3edb60e21798ae716da824 Merge: eee2faa 36154be Author: David S. Miller Date: Thu Feb 23 10:43:11 2017 -0500 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox mlx5e fixes for 4.11-rc1 This series includes some important bug fixes for mlx5e driver. Three misc fixes: From Mohamad, compilation fix on s390 system From Me, A fix for driver unload when switchdev mode is on. From Tariq, HW LRO frag size optimization for when build_skb is not used (striding RQ mode). Three CQE compression related fixes: Two fixes from Tariq and I, to correctly setup CQE compression parameters on driver load and on arbitrary user modifications. Last patch, fixes a very critical issue that was originally reported by Tom, where the driver reported csum errors or even page ref issues for when cqe compression is enabled and rapidly active. For your convenience this series was generated on top of net-next branch: 005c3490e9db ('Revert "ath10k: Search SMBIOS for OEM board file extension"') for -stable: net/mlx5e: Register/unregister vport representors on interface (for kernel >= 4.9) net/mlx5e: Do not reduce LRO WQE size when not using build_skb (for kernel >= 4.9) net/mlx5e: Fix broken CQE compression initialization (for kernel >= 4.9) net/mlx5e: Update MPWQE stride size when modifying CQE compress state (for kernel >= 4.7) net/mlx5e: Fix wrong CQE decompression (for kernel >= 4.7) ==================== Signed-off-by: David S. Miller commit 36154be40a28e4afaa0416da2681d80b7e2ca319 Author: Tariq Toukan Date: Wed Feb 22 17:20:16 2017 +0200 net/mlx5e: Fix wrong CQE decompression In cqe compression with striding RQ, the decompression of the CQE field wqe_counter was done with a wrong wraparound value. This caused handling cqes with a wrong pointer to wqe (rx descriptor) and creating SKBs with wrong data, pointing to wrong (and already consumed) strides/pages. The meaning of the CQE field wqe_counter in striding RQ holds the stride index instead of the WQE index. Hence, when decompressing a CQE, wqe_counter should have wrapped-around the number of strides in a single multi-packet WQE. We dropped this wrap-around mask at all in CQE decompression of striding RQ. It is not needed as in such cases the CQE compression session would break because of different value of wqe_id field, starting a new compression session. Tested: ethtool -K ethxx lro off/on ethtool --set-priv-flags ethxx rx_cqe_compress on super_netperf 16 {ipv4,ipv6} -t TCP_STREAM -m 50 -D verified no csum errors and no page refcount issues. Fixes: 7219ab34f184 ("net/mlx5e: CQE compression") Signed-off-by: Tariq Toukan Reported-by: Tom Herbert Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 6dc4b54e77282caf17f0ff72aa32dd296037fbc0 Author: Saeed Mahameed Date: Wed Feb 22 17:20:15 2017 +0200 net/mlx5e: Update MPWQE stride size when modifying CQE compress state When the admin enables/disables cqe compression, updating mpwqe stride size is required: CQE compress ON ==> stride size = 256B CQE compress OFF ==> stride size = 64B This is already done on driver load via mlx5e_set_rq_type_params, all we need is just to call it on arbitrary admin changes of cqe compression state via priv flags or when changing timestamping state (as it is mutually exclusive with cqe compression). This bug introduces no functional damage, it only makes cqe compression occur less often, since in ConnectX4-LX CQE compression is performed only on packets smaller than stride size. Tested: ethtool --set-priv-flags ethxx rx_cqe_compress on pktgen with 64 < pkt size < 256 and netperf TCP_STREAM (IPv4/IPv6) verify `ethtool -S ethxx | grep compress` are advancing more often (rapidly) Fixes: 7219ab34f184 ("net/mlx5e: CQE compression") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) commit b0d4660b4cc52e6477ca3a43435351d565dfcedc Author: Tariq Toukan Date: Wed Feb 22 17:20:14 2017 +0200 net/mlx5e: Fix broken CQE compression initialization Some of RQ type parameters are derived from CQE compression state flag, CQE compression flag was initialized only after RQ type parameters setup. This leads to load RQ with stride size smaller than what we want for when CQE compression is on. This bug introduces no functional damage, it only makes CQE compression occur less often, since in ConnectX4-LX CQE compression is performed only on packets smaller than stride size. Fix this by marking default status of CQE compression in PFLAG prior to calling mlx5e_set_rq_priv_params(), as it inits some fields based on it. Tested: load driver on systems where rx CQE compress will be on (MH) pktgen with 64 < pkt size < 256 and netperf TCP_STREAM (IPv4/IPv6) verify `ethtool -S ethxx | grep compress` are advancing more often (rapidly) Fixes: 2fc4bfb7250d ("net/mlx5e: Dynamic RQ type infrastructure") Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4078e637c12f1e0a74293f1ec9563f42bff14a03 Author: Tariq Toukan Date: Wed Feb 22 17:20:13 2017 +0200 net/mlx5e: Do not reduce LRO WQE size when not using build_skb When rq_type is Striding RQ, no room of SKB_RESERVE is needed as SKB allocation is not done via build_skb. Fixes: e4b85508072b ("net/mlx5e: Slightly reduce hardware LRO size") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6f08a22c5fb2b9aefb8ecd8496758e7a677c1fde Author: Saeed Mahameed Date: Wed Feb 22 17:20:12 2017 +0200 net/mlx5e: Register/unregister vport representors on interface attach/detach Currently vport representors are added only on driver load and removed on driver unload. Apparently we forgot to handle them when we added the seamless reset flow feature. This caused to leave the representors netdevs alive and active with open HW resources on pci shutdown and on error reset flows. To overcome this we move their handling to interface attach/detach, so they would be cleaned up on shutdown and recreated on reset flows. Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks") Signed-off-by: Saeed Mahameed Reviewed-by: Hadar Hen Zion Reviewed-by: Roi Dayan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 18bcf742fbb0ddaf68d58ebf50b248748c983cea Author: Mohamad Haj Yahia Date: Wed Feb 22 17:20:11 2017 +0200 net/mlx5e: s390 system compilation fix Add necessary headers include for s390 arch compilation. Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Fixes: d605d6686dc7 ("net/mlx5e: Add support for ethtool self..") Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 1 + 2 files changed, 2 insertions(+) commit f38e5fb95a1f8feda88531eedc98f69b24748712 Author: Andrew Price Date: Wed Feb 22 12:05:03 2017 -0500 gfs2: Add missing rcu locking for glock lookup We must hold the rcu read lock across looking up glocks and trying to bump their refcount to prevent the glocks from being freed in between. Cc: # 4.3+ Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 5 +++++ 1 file changed, 5 insertions(+) commit 12cb3a1c4184f891d965d1f39f8cfcc9ef617647 Author: Milan Broz Date: Thu Feb 23 08:38:26 2017 +0100 crypto: xts - Add ECB dependency Since the commit f1c131b45410a202eb45cc55980a7a9e4e4b4f40 crypto: xts - Convert to skcipher the XTS mode is based on ECB, so the mode must select ECB otherwise it can fail to initialize. Signed-off-by: Milan Broz Signed-off-by: Herbert Xu crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 15c0b9edcc41fe8fddcd07d6b58ee15e6554d17e Author: Christoph Hellwig Date: Wed Feb 15 08:18:43 2017 +0100 crypto: cavium - switch to pci_alloc_irq_vectors pci_enable_msix has been long deprecated, but this driver adds a new instance. Convert it to pci_alloc_irq_vectors and greatly simplify the code, and make sure the prope code properly unwinds. Signed-off-by: Christoph Hellwig Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf.h | 3 - drivers/crypto/cavium/cpt/cptvf_main.c | 203 +++++++++++---------------------- 2 files changed, 65 insertions(+), 141 deletions(-) commit 613844e811a87ddbc646bd30e724c34472540296 Author: Christoph Hellwig Date: Wed Feb 15 08:18:42 2017 +0100 crypto: cavium - switch to pci_alloc_irq_vectors pci_enable_msix has been long deprecated, but this driver adds a new instance. Convert it to pci_alloc_irq_vectors and greatly simplify the code. Signed-off-by: Christoph Hellwig Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptpf.h | 5 --- drivers/crypto/cavium/cpt/cptpf_main.c | 58 ++++++---------------------------- 2 files changed, 10 insertions(+), 53 deletions(-) commit f4f228bff3c98990537ebd4bcab6730ae02d6e48 Author: Christoph Hellwig Date: Wed Feb 15 08:18:41 2017 +0100 crypto: cavium - remove dead MSI-X related define Signed-off-by: Christoph Hellwig Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cpt_common.h | 2 -- 1 file changed, 2 deletions(-) commit 4c21541d8da17fbe94ecadbfc913d6dff3be7ca2 Author: Jan Glauber Date: Tue Feb 21 14:07:50 2017 +0100 i2c: thunderx: Replace pci_enable_msix() Using pci_alloc_irq_vectors() instead of the deprecated pci_enable_msix() allows to remove the msix_entry from struct octeon_i2c and thus to get rid of the config symbol check. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.h | 4 ---- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 7999eecb7e5675c3c7c2981a3ba9be6fc8e2ee27 Author: Andrzej Hajda Date: Wed Feb 22 12:04:34 2017 +0100 i2c: exynos5: fix arbitration lost handling In case of arbitration lost adequate interrupt sometimes is not signaled. As a result transfer timeouts and is not retried, as it should. To avoid such cases code is added to check transaction status in case of every interrupt. Signed-off-by: Andrzej Hajda Tested-by: Andi Shyti Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 8693b9145b13dc44664602cd4cbe71862c26d0b5 Author: Colin Ian King Date: Thu Feb 23 11:06:09 2017 +0000 s390/dasd: fix spelling mistake: "supportet" -> "supported" trivial fix to spelling mistake in literal string Signed-off-by: Colin Ian King Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd1c9c8568439198a66f42108a9b01854e25346e Author: Andrzej Hajda Date: Wed Feb 22 11:11:20 2017 +0100 i2c: exynos5: disable fifo-almost-empty irq signal when necessary Fifo-almost-empty irq signal should be disabled as soon as possible, to avoid unnecessary interrupt storm. The best moment is when there is no more data to feed fifo. This patch fixes system stalls caused by IRQ storm. Signed-off-by: Andrzej Hajda Tested-by: Marek Szyprowski Tested-by: Andi Shyti Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 191020b670f84f5e2edfaa906c3801df20485610 Author: Zhenyu Wang Date: Thu Feb 23 14:46:23 2017 +0800 drm/i915/gvt: adjust to fixed vGPU types Previous vGPU type create tried to determine vGPU type name e.g _1, _2 based on the number of mdev devices can be created, but different type might have very different resource size depending on physical device. We need to split type name vs. actual mdev resource and create fixed vGPU type with determined size for consistence. With this we'd like to fix vGPU types for _1, _2, _4 and _8 now, each type has fixed defined resource size. Available mdev instances that could be created is determined by physical resource, and user should query for that before creating. Cc: Kevin Tian Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 - drivers/gpu/drm/i915/gvt/vgpu.c | 58 ++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 25 deletions(-) commit 7c28135c77414327523b89bfc3f13096e095f5ac Author: Zhao, Xinda Date: Tue Feb 21 15:54:56 2017 +0800 drm/i915/gvt: remove unnecessary error msg from gtt write The guest VM may initialize the whole GTT table during boot up, so the warning msg in emulate_gtt_mmio_write is not necessary, it is the expected behavior and it may confuse the user if error msg is printed out, so remove the msg from emulate_gtt_mmio_write(), Signed-off-by: Zhao, Xinda Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d8a355be0b2b5613f7b34aee1394369d45d50586 Author: Weinan Li Date: Wed Feb 22 11:03:24 2017 +0800 drm/i915/gvt: refine pcode write emulation In GVT-g we always emulate as pcode read/write success and ready for access anytime, since we don't touch real physical registers here. Add 'SKL_PCODE_CDCLK_CONTROL' write emulation, without it will cause skl_set_cdclk fail in guest. Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit da9cc8de22aa6bd6ed51c406432d599ab520a6e3 Author: Ping Gao Date: Tue Feb 21 15:52:56 2017 +0800 drm/i915/gvt: clear the vGPU reset logic Releasing shadow PPGTT pages is not enough when vGPU reset, the guest page table tracking data should has same life-cycle with all the shadow PPGTT pages; Otherwise there is no chance to re-shadow the PPGTT pages without free the guest page table tracking data. This patch clear the PPGTT reset logic and make the vGPU reset in working order. v2: refactor some logic to avoid code duplicated. v3: remove useless macro and add comments from Christophe. v4: keep reset logic in reset function. Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit bab059304314e127cf4a5330c6bd5a71fd27c022 Author: Zhao, Xinda Date: Tue Feb 21 15:07:31 2017 +0800 drm/i915/gvt: decrease priority of output msg for untracked mmio When untracked mmio is visited, too many log info will be printed out, it may confuse the user, but most of the time, it is not the urgent case, so use gvt_dbg_mmio() instead. Signed-off-by: Zhao, Xinda Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec162aa84c9057e196f3a844c0a8d569f5095e6c Author: Zhao Yan Date: Tue Feb 21 14:00:37 2017 +0800 drm/i915/gvt: set default value to 0 for unhandled mmio regs for a handled mmio reg, its default value is read from hardware, while for an unhandled mmio regs, its default value would be random if not explicitly set to 0 Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 187447a106fc9caca45f10413845678d3666556c Author: Pei Zhang Date: Tue Feb 21 21:58:14 2017 +0800 drm/i915/gvt: add cmd_access to GEN7_HALF_SLICE_CHICKEN1 Linux guest is using this MMIO in lri command. Add cmd_access flag for this mmio in gvt to avoid error log. v2: change the mmio address to its macro name Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6cedfea6b8dcb205f75ea632570f52d2ffd1251 Author: Zhao Yan Date: Tue Feb 21 10:38:53 2017 +0800 drm/i915/gvt: force-nopriv register handling add a whitelist to check the content of force-nonpriv registers v3: per He Min's comment, modify in_whitelist()'s return type to bool, and use negative value as the return value for failure for force_nonpriv_write(). v2: 1. split a big patch into two smaller ones per zhenyu's comment. this patch is the mmio handling part for force-nopriv registers 2. per zhenyu's comment, combine all non-priv registers into a single MMIO_DFH entry Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 74 +++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) commit 4c4b22abb3d405c5c194b02255eecc1a9eff42cf Author: Zhao Yan Date: Tue Feb 21 09:39:00 2017 +0800 drm/i915/gvt: add more registers to context save/restore list the value of those registers should be applied to hardware on context restoring Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d8e9b2b9097c117880dc22933239d05199c60b96 Author: Takashi Iwai Date: Mon Feb 20 14:58:25 2017 +0100 drm/i915/gvt: Fix superfluous newline in GVT_DISPLAY_READY env var send_display_send_uevent() sends two environment variable, and the first one GVT_DISPLAY_READY is set including a new line at the end of the string; that is obviously superfluous and wrong -- at least, it *looks* so when you only read the code. However, it doesn't appear in the actual output by a (supposedly unexpected) trick. The code uses snprintf() and truncates the string in size 20 bytes. This makes the string as GVT_DISPLAY_READY=0 or ...=1 including the trailing NUL-letter. That is, the '\n' found in the format string is always cut off as a result. Although the code gives the correct result, it is confusing. This patch addresses it, just removing the superfluous '\n' from the format string for avoiding further confusion. If the argument "ready" were not a bool, the size 20 should be corrected as well. But it's a bool, so we can leave the magic number 20 as is for now. FWIW, the bug was spotted by a new GCC7 warning: drivers/gpu/drm/i915/gvt/handlers.c: In function 'pvinfo_mmio_write': drivers/gpu/drm/i915/gvt/handlers.c:1042:34: error: 'snprintf' output truncated before the last format character [-Werror=format-truncation=] snprintf(display_ready_str, 20, "GVT_DISPLAY_READY=%d\n", ready); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gvt/handlers.c:1042:2: note: 'snprintf' output 21 bytes into a destination of size 20 snprintf(display_ready_str, 20, "GVT_DISPLAY_READY=%d\n", ready); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 04d348ae3f0a ("drm/i915/gvt: vGPU display virtualization") Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1025903 Reported-by: Richard Biener Cc: Signed-off-by: Takashi Iwai Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 593e59b4b941910e4f7ba87d3c02d63e38e960d0 Author: Zhao Yan Date: Mon Feb 20 15:51:13 2017 +0800 drm/i915/gvt: fix unhandled mmio warnings some registers were missing or treated as BDW only. This patch is to fix it avoid unhandled mmio wanrings v2: update commit message according to zhenyu's comment Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 9272f73f79bd780502134f227fa52fd280ecda17 Author: Chuanxiao Dong Date: Fri Feb 17 19:29:52 2017 +0800 drm/i915/gvt: add a NULL pointer check to avoid kernel panic Due to the request replay, context switch interrupt may come after gvt free the workload thus can cause a kernel NULL pointer kernel panic. This patch will add a simple check to avoid this for a short term. From long term, gvt workload lifecycle doesn't match with i915 request and need to find a proper way to manage this. v4: simplify the NULL pointer check. v5: add unlikely to optimize. Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 3 +++ 1 file changed, 3 insertions(+) commit a33fc7a0482a40068c022aefcefd50f9f0f44f87 Author: Min He Date: Fri Feb 17 16:42:38 2017 +0800 drm/i915/gvt: enter failsafe mode when guest requires more resources Windows guest will notitfy GVT-g to request more resources through g2v interface, when its resources are not enough. This patch is to handle this case and let vgpu enter failsafe mode to avoid too many error messages. Signed-off-by: Min He Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 5 +++++ 2 files changed, 6 insertions(+) commit e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 Author: Harald Freudenberger Date: Wed Nov 2 14:37:20 2016 +0100 s390/pkey: Introduce pkey kernel module This patch introcudes a new kernel module pkey which is providing protected key handling and management functions. The pkey API is available within the kernel for other s390 specific code to create and manage protected keys. Additionally the functions are exported to user space via IOCTL calls. The implementation makes extensive use of functions provided by the zcrypt device driver. For generating protected keys from secure keys there is also a CEX coprocessor card needed. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 1 + arch/s390/configs/performance_defconfig | 1 + arch/s390/defconfig | 1 + arch/s390/include/asm/pkey.h | 90 +++ arch/s390/include/uapi/asm/Kbuild | 1 + arch/s390/include/uapi/asm/pkey.h | 112 +++ drivers/crypto/Kconfig | 16 + drivers/s390/crypto/Makefile | 4 + drivers/s390/crypto/pkey_api.c | 1148 +++++++++++++++++++++++++++++++ 9 files changed, 1374 insertions(+) commit a1d001e26d5386c934345dc91f16b530e352f8d7 Author: Harald Freudenberger Date: Wed Nov 2 14:32:32 2016 +0100 s390/zcrypt: export additional symbols Export the two zcrypt device driver functions zcrypt_send_cprb and zcrypt_device_status_mask to be useable for other kernel code. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 5 +++-- drivers/s390/crypto/zcrypt_api.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) commit a3358e3de3930e076c0f13f0a3507f3c5dc7c66b Author: Harald Freudenberger Date: Mon Feb 20 16:09:51 2017 +0100 s390/zcrypt: Rework CONFIG_ZCRYPT Kconfig text. The CONFIG_ZCRYPT Kconfig entry in drivers/crypto showed outdated hardware whereas the latest cards where missing. Reworked the text to reflect the current abilities of the zcrypt device driver. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/crypto/Kconfig | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit f546d6a941912e0ff1d2d7f37f302884f3accd12 Author: Harald Freudenberger Date: Mon Feb 20 15:32:36 2017 +0100 s390/zcrypt: Cleanup leftover module code. The AP bus code is not buildable as kernel module any more. Commit 5fe38260d083 ("s390/zcrypt: make ap_bus explicitly non-modular") leaves one now unused function which gets removed with this patch. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 10 ---------- 1 file changed, 10 deletions(-) commit 5791d90d0046c6d74f19ab58fa774f50e463b0d9 Author: Heiko Carstens Date: Tue Feb 21 11:07:39 2017 +0100 s390/nmi: purge tlbs after control register validation Play safe and purge all tlbs after the control registers that contain the primary, secondary and home space asces have been validated. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/nmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70e28aa0bbb68ed458be0b922d8b58a2b4ae191d Author: Heiko Carstens Date: Tue Feb 21 10:51:55 2017 +0100 s390/nmi: fix order of register validation When validating register contents first validate control registers since these control the availability of features later being validated. For example the control register 0 should be validated first, before the additional floating point (AFP) registers are validated, since control register 0 contains the AFP-register control bit. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/nmi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 776067080ca070ef38d33a16faedc28a2f413ee7 Author: Harald Freudenberger Date: Wed Nov 2 14:19:48 2016 +0100 s390/crypto: Add PCKMO inline function Adding the PCKMO inline function and the function code definitions for using the pckmo function to the cpacf header file. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpacf.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit d0360d7b523f150c2ff0ab3c9361dfc3b4185cbf Author: Harald Freudenberger Date: Tue Nov 15 09:05:00 2016 +0100 s390/zcrypt: Enable request count reset for cards and queues. This patch introduces the possibility to reset the request_count attribute for cards and queues to zero. This can be used to set a clear state on the counters before running an application and try out if and which hardware is actually used. If the request_count counter of a card is reset, for all associated queues the request_count is also zeroed. If just a queue request_count is reset the card counter is not updated however. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_card.c | 24 ++++++++++++++++++++---- drivers/s390/crypto/ap_queue.c | 21 +++++++++++++++++---- 2 files changed, 37 insertions(+), 8 deletions(-) commit 54397bb0bbedbb9f7d77a62f6ddc6869354e3d9f Author: Dominik Dingel Date: Wed Apr 27 11:43:07 2016 +0200 s390/mm: use _SEGMENT_ENTRY_EMPTY in the code _SEGMENT_ENTRY_INVALID denotes the invalid bit in a segment table entry whereas _SEGMENT_ENTRY_EMPTY means that the value of the whole entry is only the invalid bit, as the entry is completely empty. Therefore we use _SEGMENT_ENTRY_INVALID only to check and set the invalid bit with bitwise operations. _SEGMENT_ENTRY_EMPTY is only used to check for (un)equality. Signed-off-by: Dominik Dingel Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 14 +++++++------- arch/s390/mm/gmap.c | 6 +++--- arch/s390/mm/hugetlbpage.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit 77759137248f34864a8f7a58bbcebfcf1047504a Author: Peter Oberparleiter Date: Mon Feb 20 14:52:58 2017 +0100 s390/chsc: Add exception handler for CHSC instruction Prevent kernel crashes due to unhandled exceptions raised by the CHSC instruction which may for example be triggered by invalid ioctl data. Fixes: 64150adf89df ("s390/cio: Introduce generic synchronous CHSC IOCTL") Cc: # v3.11+ Signed-off-by: Peter Oberparleiter Reviewed-by: Sebastian Ott Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/ioasm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f50c0e6371c960ad3481daa4504b33a9de4e9d01 Author: Heiko Carstens Date: Mon Feb 20 09:38:42 2017 +0100 s390: opt into HAVE_COPY_THREAD_TLS This the s390 version of commit c1bd55f922a2d ("x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit"). Simply use the tls system call argument instead of extracting the tls argument by magic from the pt_regs structure. See commit 3033f14ab78c3 ("clone: support passing tls argument via C rather than pt_regs magic") for more background. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + arch/s390/kernel/process.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit b5a882fcf146c87cb6b67c6df353e1c042b8773d Author: Heiko Carstens Date: Fri Feb 17 08:13:28 2017 +0100 s390: restore address space when returning to user space Unbalanced set_fs usages (e.g. early exit from a function and a forgotten set_fs(USER_DS) call) may lead to a situation where the secondary asce is the kernel space asce when returning to user space. This would allow user space to modify kernel space at will. This would only be possible with the above mentioned kernel bug, however we can detect this and fix the secondary asce before returning to user space. Therefore a new TIF_ASCE_SECONDARY which is used within set_fs. When returning to user space check if TIF_ASCE_SECONDARY is set, which would indicate a bug. If it is set print a message to the console, fixup the secondary asce, and then return to user space. This is similar to what is being discussed for x86 and arm: "[RFC] syscalls: Restore address limit after a syscall". Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 12 ++++++++---- arch/s390/include/asm/uaccess.h | 23 +++++++++++++---------- arch/s390/kernel/entry.S | 29 ++++++++++++++++++----------- arch/s390/kernel/entry.h | 1 + arch/s390/kernel/process.c | 13 +++++++++++++ 5 files changed, 53 insertions(+), 25 deletions(-) commit 606aa4aa0b2c6d7c4f5d2e459922675ea1d7e459 Author: Heiko Carstens Date: Fri Feb 17 08:12:30 2017 +0100 s390: rename CIF_ASCE to CIF_ASCE_PRIMARY This is just a preparation patch in order to keep the "restore address space after syscall" patch small. Rename CIF_ASCE to CIF_ASCE_PRIMARY to be unique and specific when introducing a second CIF_ASCE_SECONDARY CIF flag. Suggested-by: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 4 ++-- arch/s390/include/asm/processor.h | 4 ++-- arch/s390/kernel/entry.S | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) commit a00861dbca9135b7ed56175646161f1d708b9efa Author: Jaegeuk Kim Date: Wed Feb 1 15:40:11 2017 -0800 f2fs: show # of APPEND and UPDATE inodes This patch shows cached # of APPEND and UPDATE inode entries. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 6 ++++-- fs/f2fs/f2fs.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit cac5a3d8f517cfc7a882ffd4a0eba220f02deee8 Author: DongOh Shin Date: Mon Jan 30 10:55:18 2017 -0800 f2fs: fix 446 coding style warnings in f2fs.h 1) Nine coding style warnings below have been resolved: "Missing a blank line after declarations" 2) 435 coding style warnings below have been resolved: "function definition argument 'x' should also have an identifier name" 3) Two coding style warnings below have been resolved: "macros should not use a trailing semicolon" Signed-off-by: DongOh Shin Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 498 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 270 insertions(+), 228 deletions(-) commit c64ab12e365adb505c1be0f4ddea430d4a774514 Author: DongOh Shin Date: Mon Jan 30 10:55:17 2017 -0800 f2fs: fix 3 coding style errors in f2fs.h Two coding style errors below have been resolved: "Macros with complex values should be enclosed in parentheses" And a coding style error below has been resolved: "space prohibited before that ',' (ctx:WxW)" Signed-off-by: DongOh Shin Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ed5974552086363aec2ac96fe01e3f2970baeab Author: Jaegeuk Kim Date: Sun Jan 29 14:27:02 2017 +0900 f2fs: declare missing static function We missed two functions declared as static functions. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cc0dec2b6f9bf0e69afbddc1c11e220a1cdf328 Author: Kaixu Xia Date: Fri Jan 27 09:35:37 2017 +0800 f2fs: show the fault injection mount option This patch shows the fault injection mount option in f2fs_show_options(). Signed-off-by: Kaixu Xia Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 5 +++++ 1 file changed, 5 insertions(+) commit 73545817c90edcb367a65720f669cddce633bc46 Author: Chao Yu Date: Wed Jan 25 10:52:40 2017 +0800 f2fs: fix null pointer dereference when issuing flush in ->fsync We only allocate flush merge control structure sbi::sm_info::fcc_info when flush_merge option is on, but in f2fs_issue_flush we still try to access member of the control structure without that option, it incurs panic as show below, fix it. Call Trace: __remove_ino_entry+0xa9/0xc0 [f2fs] f2fs_do_sync_file.isra.27+0x214/0x6d0 [f2fs] f2fs_sync_file+0x18/0x20 [f2fs] vfs_fsync_range+0x3d/0xb0 __do_page_fault+0x261/0x4d0 do_fsync+0x3d/0x70 SyS_fsync+0x10/0x20 do_syscall_64+0x6e/0x180 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f18ce260de0 RSP: 002b:00007ffdd4589258 EFLAGS: 00000246 ORIG_RAX: 000000000000004a RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f18ce260de0 RDX: 0000000000000006 RSI: 00000000016c0360 RDI: 0000000000000003 RBP: 00000000016c0360 R08: 000000000000ffff R09: 000000000000001f R10: 00007ffdd4589020 R11: 0000000000000246 R12: 00000000016c0100 R13: 0000000000000000 R14: 00000000016c1f00 R15: 00000000016c0100 Code: fb 81 e3 00 08 00 00 48 89 45 a0 0f 1f 44 00 00 31 c0 85 db 75 27 41 81 e7 00 04 00 00 74 0c 41 8b 45 20 85 c0 0f 85 81 00 00 00 41 ff 45 20 4c 89 e7 e8 f8 e9 ff ff f0 41 ff 4d 20 48 83 c4 RIP: f2fs_issue_flush+0x5b/0x170 [f2fs] RSP: ffffc90003b5fd78 CR2: 0000000000000020 ---[ end trace a09314c24f037648 ]--- Reported-by: Shuoran Liu Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dba79f38bc60d98b605bdbbf5613aa3fb8f8ff7c Author: Chao Yu Date: Wed Jan 25 10:52:39 2017 +0800 f2fs: fix to avoid overflow when left shifting page offset We use following method to calculate size with current page index: size = index << PAGE_SHIFT If type of index has only 32-bits size, left shifting will incur overflow, which makes result incorrect. So let's cast index with 64-bits type to avoid such issue. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba38c27eb93e2d36bf940ca65c145f6e2aaa6d5c Author: Chao Yu Date: Tue Jan 24 20:39:51 2017 +0800 f2fs: enhance lookup xattr Previously, in getxattr we will load all entries both in inline xattr and xattr node block, and then do the lookup in all entries, but our lookup flow shows low efficiency, since if we can lookup and hit in inline xattr of inode page cache first, we don't need to load and lookup xattr node block, which can obviously save cpu time and IO latency. Signed-off-by: Chao Yu [Jaegeuk Kim: initialize NULL to avoid warning] Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++------- fs/f2fs/xattr.h | 7 +-- 2 files changed, 121 insertions(+), 18 deletions(-) commit 04b9a5f0f51942f9fd20e97df4ce1508f6335c59 Author: Masanari Iida Date: Tue Jan 24 12:47:55 2017 +0900 Doc: f2fs: Fix typo in Documentation/filesystems/f2fs.txt This patch fix a typo in f2fs.txt Signed-off-by: Masanari Iida Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86e33075ed1909d8002745b56ecf73b833db143 Author: Wei Fang Date: Sun Jan 22 12:21:02 2017 +0800 f2fs: fix a dead loop in f2fs_fiemap() A dead loop can be triggered in f2fs_fiemap() using the test case as below: ... fd = open(); fallocate(fd, 0, 0, 4294967296); ioctl(fd, FS_IOC_FIEMAP, fiemap_buf); ... It's caused by an overflow in __get_data_block(): ... bh->b_size = map.m_len << inode->i_blkbits; ... map.m_len is an unsigned int, and bh->b_size is a size_t which is 64 bits on 64 bits archtecture, type conversion from an unsigned int to a size_t will result in an overflow. In the above-mentioned case, bh->b_size will be zero, and f2fs_fiemap() will call get_data_block() at block 0 again an again. Fix this by adding a force conversion before left shift. Signed-off-by: Wei Fang Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc91de78e5e1d44238b5dd2b57d2e8e67cbc00a1 Author: Jaegeuk Kim Date: Fri Jan 13 13:12:29 2017 -0800 f2fs: do not preallocate blocks which has wrong buffer Sheng Yong reports needless preallocation if write(small_buffer, large_size) is called. In that case, f2fs preallocates large_size, but vfs returns early due to small_buffer size. Let's detect it before preallocation phase in f2fs. Reported-by: Sheng Yong Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 6 +++++- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) commit dcc9165dbf9961cf2848af728f8be31f28a3c790 Author: Jaegeuk Kim Date: Wed Jan 11 10:20:04 2017 -0800 f2fs: show # of on-going flush and discard bios This patch adds stat information for flush and discard commands. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 11 +++++++++-- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/segment.c | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) commit 1546996348b33dc44dff829bc86fea8a8536164d Author: Jaegeuk Kim Date: Mon Jan 9 20:32:07 2017 -0800 f2fs: add a kernel thread to issue discard commands asynchronously This patch adds a kernel thread to issue discard commands. It proposes three states, D_PREP, D_SUBMIT, and D_DONE to identify current bio status. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 12 +++++ fs/f2fs/segment.c | 128 +++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 109 insertions(+), 31 deletions(-) commit bc49a7831b1137ce1c2dda1c57e3631655f5d2ae Merge: be5165a f201ebd Author: Linus Torvalds Date: Wed Feb 22 19:29:24 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: "142 patches: - DAX updates - various misc bits - OCFS2 updates - most of MM" * emailed patches from Andrew Morton : (142 commits) mm/z3fold.c: limit first_num to the actual range of possible buddy indexes mm: fix stray kernel-doc notation zram: remove obsolete sysfs attrs mm/memblock.c: remove unnecessary log and clean up oom-reaper: use madvise_dontneed() logic to decide if unmap the VMA mm: drop unused argument of zap_page_range() mm: drop zap_details::check_swap_entries mm: drop zap_details::ignore_dirty mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled mm: help __GFP_NOFAIL allocations which do not trigger OOM killer mm, oom: do not enforce OOM killer for __GFP_NOFAIL automatically mm: consolidate GFP_NOFAIL checks in the allocator slowpath lib/show_mem.c: teach show_mem to work with the given nodemask arch, mm: remove arch specific show_mem mm, page_alloc: warn_alloc print nodemask mm, page_alloc: do not report all nodes in show_mem Revert "mm: bail out in shrink_inactive_list()" mm, vmscan: consider eligible zones in get_scan_count mm, vmscan: cleanup lru size claculations mm, vmscan: do not count freed pages as PGDEACTIVATE ... commit be5165a51d2500ae1afa1236a8b09858831fdf7e Merge: c1aac62 4e29ccd Author: Linus Torvalds Date: Wed Feb 22 19:23:14 2017 -0800 Merge tag 'devicetree-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: "Pretty standard stuff with dtc upstream sync being the biggest piece. - Sync dtc to upstream commit 0931cea3ba20. This picks up overlay support in dtc. - Set dma_ops for reserved memory users. - Make references to IOMMU consistent in DT bindings. - Cleanup references to pm_power_off in bindings. - Move some display bindings that snuck into the old bindings/video/ path. - Fix some wrong documentation paths caused from binding restructuring. - Vendor prefixes for Faraday and Fujitsu. - Fix an of_node ref counting leak in of_find_node_opts_by_path - Introduce new graph helper of_graph_get_remote_node() which will be used by DRM drivers in 4.12" * tag 'devicetree-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (27 commits) DT: add Faraday Tec. as vendor of: introduce of_graph_get_remote_node of: Add missing space at end of pr_fmt(). of: make of_device_make_bus_id() static of: fix of_node leak caused in of_find_node_opts_by_path dt-bindings: net: remove reference to fixed link support dt-bindings: power: reset: qnap-poweroff: Drop reference to pm_power_off dt-bindings: power: reset: gpio-poweroff: Drop reference to pm_power_off dt-bindings: mfd: as3722: Drop reference to pm_power_off dt-bindings: display: move ANX7814 and SiI8620 bridge bindings of/unittest: Swap arguments of of_unittest_apply_overlay() Documentation: usb: fix wrong documentation paths serial: fsl-imx-uart.txt: Remove generic property devicetree: Add Fujitsu Ltd. vendor prefix Documentation: display: fix wrong documentation paths of: remove redundant memset in overlay bus:qcom : Fix typo in qcom,ebi2.txt dt-bindings: qman: Remove pool channel node Documentation: panel-dpi: fix path to display-timing.txt devicetree: bindings: clk: mvebu: fix description for sata1 on Armada XP ... commit f81fa767077bbc9ac49c61ed97d28de09f3d069d Author: Vincent Abriou Date: Mon Feb 20 12:55:10 2017 +0100 drm/sti: fix build warnings in sti_drv.c and sti_vtg.c files Fix compilation warning introduced by: commit 0c7ff84f7f9d ("drm/sti: remove deprecated legacy vtg slave") commit 5e60f595d6ca ("drm/sti: use atomic_helper for commit") Signed-off-by: Vincent Abriou Signed-off-by: Dave Airlie drivers/gpu/drm/sti/sti_drv.c | 9 --------- drivers/gpu/drm/sti/sti_vtg.c | 1 - 2 files changed, 10 deletions(-) commit c1aac62f36c1e37ee81c9e09ee9ee733eef05dcb Merge: fd7e9a8 bd85626 Author: Linus Torvalds Date: Wed Feb 22 18:51:29 2017 -0800 Merge tag 'docs-4.11' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "A slightly quieter cycle for documentation this time around. Three more DocBook template files have been converted to RST; only 21 to go. There are various build improvements and the usual array of documentation improvements and fixes" * tag 'docs-4.11' of git://git.lwn.net/linux: (44 commits) docs / driver-api: Fix structure references in device_link.rst PM / docs: Fix structure references in device.rst Add a target to check broken external links in the Documentation Documentation: Fix linux-api list typo Documentation: DocBook/Makefile comment typo Improve sparse documentation Documentation: make Makefile.sphinx no-ops quieter Documentation: DMA-ISA-LPC.txt Documentation: input: fix path to input code definitions docs: Remove the copyright year from conf.py docs: Fix a warning in the Korean HOWTO.rst translation PM / sleep / docs: Convert PM notifiers document to reST PM / core / docs: Convert sleep states API document to reST PM / core: Update kerneldoc comments in pm.h doc-rst: Fix recursive make invocation from macros doc-rst: Delete output of failed dot-SVG conversion doc-rst: Break shell command sequences on failure Documentation/sphinx: make targets independent of Sphinx work for HAVE_SPHINX=0 doc-rst: fixed cleandoc target when used with O=dir Documentation/sphinx: prevent generation of .pyc files in the source tree ... commit 0b54fb8458199dbed409abb06933c27439ea0911 Author: Jaegeuk Kim Date: Wed Jan 11 14:40:24 2017 -0800 f2fs: factor out discard command info into discard_cmd_control This patch adds discard_cmd_control with the existing discarding controls. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 ++ fs/f2fs/f2fs.h | 16 ++++++++----- fs/f2fs/segment.c | 68 +++++++++++++++++++++++++++++++++++++++++++------------ fs/f2fs/super.c | 5 +++- 4 files changed, 69 insertions(+), 22 deletions(-) commit d4adb30f25f5f2aa9b205891e395251d2a9098be Author: Jaegeuk Kim Date: Wed Jan 11 10:21:15 2017 -0800 f2fs: reorganize stat information This patch modifies stat information more clearly. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b01a92019cac30398ef75b560d2668b399f4e393 Author: Jaegeuk Kim Date: Mon Jan 9 14:13:03 2017 -0800 f2fs: clean up flush/discard command namings This patch simply cleans up the names for flush/discard commands. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 +- fs/f2fs/f2fs.h | 20 +++++------- fs/f2fs/segment.c | 98 +++++++++++++++++++++++++++---------------------------- 3 files changed, 59 insertions(+), 61 deletions(-) commit ae27d62e6befd3cac4ffa702e644cc52019642e8 Author: Chao Yu Date: Sat Jan 7 18:52:34 2017 +0800 f2fs: check in-memory sit version bitmap This patch adds a mirror for sit version bitmap, and use it to detect in-memory bitmap corruption which may be caused by bit-transition of cache or memory overflow. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 16 ++++++++++++---- fs/f2fs/segment.h | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) commit 599a09b2c1ac222e6aad0c22515d1ccde7c3b702 Author: Chao Yu Date: Sat Jan 7 18:52:01 2017 +0800 f2fs: check in-memory nat version bitmap This patch adds a mirror for nat version bitmap, and use it to detect in-memory bitmap corruption which may be caused by bit-transition of cache or memory overflow. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +++ fs/f2fs/node.c | 11 +++++++++++ fs/f2fs/node.h | 15 +++++++++++++++ 3 files changed, 29 insertions(+) commit 355e78913c0d57492076d545b6f44b94fec2bf6b Author: Chao Yu Date: Sat Jan 7 18:51:01 2017 +0800 f2fs: check in-memory block bitmap This patch adds a mirror for valid block bitmap, and use it to detect in-memory bitmap corruption which may be caused by bit-transition of cache or memory overflow. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 32 ++++++++++++++++++++++++++++++-- fs/f2fs/segment.h | 6 ++++++ 2 files changed, 36 insertions(+), 2 deletions(-) commit 5fe457430e554a2f5188f13c1a2e36ad845640c5 Author: Chao Yu Date: Sat Jan 7 18:50:26 2017 +0800 f2fs: introduce FI_ATOMIC_COMMIT This patch introduces a new flag to indicate inode status of doing atomic write committing, so that, we can keep atomic write status for inode during atomic committing, then we can skip GCing pages of atomic write inode, that avoids random GCed datas being mixed with current transaction, so isolation of transaction can be kept. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 6 ++++++ fs/f2fs/file.c | 11 ++++++----- fs/f2fs/gc.c | 6 ++++++ fs/f2fs/segment.c | 10 +++++++--- 5 files changed, 26 insertions(+), 9 deletions(-) commit 939afa943c5290a3b92f01612a792af17bc98115 Author: Chao Yu Date: Sat Jan 7 18:49:42 2017 +0800 f2fs: clean up with list_{first, last}_entry Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 4 ++-- fs/f2fs/data.c | 4 ++-- fs/f2fs/node.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 25290fa5591d81767713db304e0d567bf991786f Author: Jaegeuk Kim Date: Thu Dec 29 22:06:15 2016 -0800 f2fs: return fs_trim if there is no candidate If there is no candidate to submit discard command during f2fs_trim_fs, let's return without checkpoint. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 5 +++++ fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 34 insertions(+), 5 deletions(-) commit fd7e9a88348472521d999434ee02f25735c7dadf Merge: 5066e4a dd0fd8b Author: Linus Torvalds Date: Wed Feb 22 18:22:53 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "4.11 is going to be a relatively large release for KVM, with a little over 200 commits and noteworthy changes for most architectures. ARM: - GICv3 save/restore - cache flushing fixes - working MSI injection for GICv3 ITS - physical timer emulation MIPS: - various improvements under the hood - support for SMP guests - a large rewrite of MMU emulation. KVM MIPS can now use MMU notifiers to support copy-on-write, KSM, idle page tracking, swapping, ballooning and everything else. KVM_CAP_READONLY_MEM is also supported, so that writes to some memory regions can be treated as MMIO. The new MMU also paves the way for hardware virtualization support. PPC: - support for POWER9 using the radix-tree MMU for host and guest - resizable hashed page table - bugfixes. s390: - expose more features to the guest - more SIMD extensions - instruction execution protection - ESOP2 x86: - improved hashing in the MMU - faster PageLRU tracking for Intel CPUs without EPT A/D bits - some refactoring of nested VMX entry/exit code, preparing for live migration support of nested hypervisors - expose yet another AVX512 CPUID bit - host-to-guest PTP support - refactoring of interrupt injection, with some optimizations thrown in and some duct tape removed. - remove lazy FPU handling - optimizations of user-mode exits - optimizations of vcpu_is_preempted() for KVM guests generic: - alternative signaling mechanism that doesn't pound on tsk->sighand->siglock" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (195 commits) x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 x86/paravirt: Change vcp_is_preempted() arg type to long KVM: VMX: use correct vmcs_read/write for guest segment selector/base x86/kvm/vmx: Defer TR reload after VM exit x86/asm/64: Drop __cacheline_aligned from struct x86_hw_tss x86/kvm/vmx: Simplify segment_base() x86/kvm/vmx: Get rid of segment_base() on 64-bit kernels x86/kvm/vmx: Don't fetch the TSS base from the GDT x86/asm: Define the kernel TSS limit in a macro kvm: fix page struct leak in handle_vmon KVM: PPC: Book3S HV: Disable HPT resizing on POWER9 for now KVM: Return an error code only as a constant in kvm_get_dirty_log() KVM: Return an error code only as a constant in kvm_get_dirty_log_protect() KVM: Return directly after a failed copy_from_user() in kvm_vm_compat_ioctl() KVM: x86: remove code for lazy FPU handling KVM: race-free exit from KVM_RUN without POSIX signals KVM: PPC: Book3S HV: Turn "KVM guest htab" message into a debug message KVM: PPC: Book3S PR: Ratelimit copy data failure error messages KVM: Support vCPU-based gfn->hva cache KVM: use separate generations for each address space ... commit 5066e4a34081dd82fb625f2f382bfa29ca421a3f Merge: b4642c1 c37a017 Author: Linus Torvalds Date: Wed Feb 22 18:11:18 2017 -0800 Merge tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fix from Joerg Roedel: "Fix a boot crash caused by the VT-d driver when booted with IOMMU disabled. This was introduced with the recent IOMMU changes" * tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix crash on boot when DMAR is disabled commit 43f86c9470b8a4c2c26ae678843465aac3831145 Merge: 94000cc 0e47b02 Author: Dave Airlie Date: Thu Feb 23 12:10:42 2017 +1000 Merge tag 'imx-drm-fixes-2017-02-17' of https://git.pengutronix.de/git/pza/linux into drm-next imx-drm: TVE regulator, fb size limit, and ipu-v3 module fixes - Fix i.MX5 TV encoder probing in case no dac-supply regulator is set in the device tree. - Remove 64 pixel min_width/height limit, which unnecessarily prohibits creation of small frame buffers. - Add missing ipu_csi_set_downsize export, for media drivers built as modules. - Stop modifying pdev->dev.of_node for IPU client devices that do not have an OF modalias to fix module autoloading. * tag 'imx-drm-fixes-2017-02-17' of https://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: Stop overwriting pdev->dev.of_node of child devices gpu: ipu-v3: export ipu_csi_set_downsize drm/imx: lift 64x64 pixel minimum framebuffer size requirement drm/imx: imx-tve: Do not set the regulator voltage commit 94000cc32988a0674923309d35ab9c2405c4b39b Merge: a5eb76d 7089db8 Author: Dave Airlie Date: Thu Feb 23 12:10:12 2017 +1000 Merge tag 'v4.10-rc8' into drm-next Linux 4.10-rc8 Backmerge Linus rc8 to fix some conflicts, but also to avoid pulling it in via a fixes pull from someone. commit b4642c109f9bbf62b2ee10babf5c4221c48480aa Merge: a27fcb0 d7276e3 Author: Linus Torvalds Date: Wed Feb 22 18:08:50 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull seccomp fix from James Morris: "A fix for a regression in the seccomp code (it was supposed to be in the first pull req but I had it queued in the wrong branch)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: seccomp: Only dump core when single-threaded commit a27fcb0cd1bcc812017192bdde41cc456dcd6afe Merge: 7d91de7 8d242e9 Author: Linus Torvalds Date: Wed Feb 22 18:05:23 2017 -0800 Merge tag 'xfs-4.11-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "Here are the XFS changes for 4.11. We aren't introducing any major features in this release cycle except for this being the first merge window I've managed on my own. :) Changes since last update: - Various cleanups - Livelock fixes for eofblocks scanning - Improved input verification for on-disk metadata - Fix races in the copy on write remap mechanism - Fix buffer io error timeout controls - Streamlining of directio copy on write - Asynchronous discard support - Fix asserts when splitting delalloc reservations - Don't bloat bmbt when right shifting extents - Inode alignment fixes for 32k block sizes" * tag 'xfs-4.11-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (39 commits) xfs: remove XFS_ALLOCTYPE_ANY_AG and XFS_ALLOCTYPE_START_AG xfs: simplify xfs_rtallocate_extent xfs: tune down agno asserts in the bmap code xfs: Use xfs_icluster_size_fsb() to calculate inode chunk alignment xfs: don't reserve blocks for right shift transactions xfs: fix len comparison in xfs_extent_busy_trim xfs: fix uninitialized variable in _reflink_convert_cow xfs: split indlen reservations fairly when under reserved xfs: handle indlen shortage on delalloc extent merge xfs: resurrect debug mode drop buffered writes mechanism xfs: clear delalloc and cache on buffered write failure xfs: don't block the log commit handler for discards xfs: improve busy extent sorting xfs: improve handling of busy extents in the low-level allocator xfs: don't fail xfs_extent_busy allocation xfs: correct null checks and error processing in xfs_initialize_perag xfs: update ctime and mtime on clone destinatation inodes xfs: allocate direct I/O COW blocks in iomap_begin xfs: go straight to real allocations for direct I/O COW writes xfs: return the converted extent in __xfs_reflink_convert_cow ... commit 7d91de74436a69c2b78a7a72f1e7f97f8b4396fa Merge: 6ef192f d9c2352 Author: Linus Torvalds Date: Wed Feb 22 17:33:34 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Add Petr Mladek, Sergey Senozhatsky as printk maintainers, and Steven Rostedt as the printk reviewer. This idea came up after the discussion about printk issues at Kernel Summit. It was formulated and discussed at lkml[1]. - Extend a lock-less NMI per-cpu buffers idea to handle recursive printk() calls by Sergey Senozhatsky[2]. It is the first step in sanitizing printk as discussed at Kernel Summit. The change allows to see messages that would normally get ignored or would cause a deadlock. Also it allows to enable lockdep in printk(). This already paid off. The testing in linux-next helped to discover two old problems that were hidden before[3][4]. - Remove unused parameter by Sergey Senozhatsky. Clean up after a past change. [1] http://lkml.kernel.org/r/1481798878-31898-1-git-send-email-pmladek@suse.com [2] http://lkml.kernel.org/r/20161227141611.940-1-sergey.senozhatsky@gmail.com [3] http://lkml.kernel.org/r/20170215044332.30449-1-sergey.senozhatsky@gmail.com [4] http://lkml.kernel.org/r/20170217015932.11898-1-sergey.senozhatsky@gmail.com * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: drop call_console_drivers() unused param printk: convert the rest to printk-safe printk: remove zap_locks() function printk: use printk_safe buffers in printk printk: report lost messages in printk safe/nmi contexts printk: always use deferred printk when flush printk_safe lines printk: introduce per-cpu safe_print seq buffer printk: rename nmi.c and exported api printk: use vprintk_func in vprintk() MAINTAINERS: Add printk maintainers commit 6ef192f2259e78e1870c509fbd3040e6752b3b9c Merge: 37c8596 0d4ec78 Author: Linus Torvalds Date: Wed Feb 22 17:08:33 2017 -0800 Merge tag 'modules-for-v4.11' 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.11 merge window: - A few small code cleanups - Add modules git tree url to MAINTAINERS" * tag 'modules-for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: MAINTAINERS: add tree for modules module: fix memory leak on early load_module() failures module: Optimize search_module_extables() modules: mark __inittest/__exittest as __maybe_unused livepatch/module: print notice of TAINT_LIVEPATCH module: Drop redundant declaration of struct module commit a5eb76d9c892b8bd7d3505f8897cf126a54860bd Merge: 601109c 1f47e6c Author: Dave Airlie Date: Thu Feb 23 11:05:54 2017 +1000 Merge tag 'drm-tinydrm-2017-02-18' of https://github.com/notro/linux into drm-next Add tinydrm * tag 'drm-tinydrm-2017-02-18' of https://github.com/notro/linux: drm/tinydrm: Add support for Multi-Inno MI0283QT display dt-bindings: Add Multi-Inno MI0283QT binding dt-bindings: display/panel: Add common rotation property of: Add vendor prefix for Multi-Inno drm/tinydrm: Add MIPI DBI support drm/tinydrm: Add helper functions drm: Add DRM support for tiny LCD displays commit dc5e1d628a7bb631450ea661553a8bb496891f47 Author: Shawn Guo Date: Mon Feb 20 21:49:11 2017 +0800 drm: zte: fix static checker warning on variable 'fmt' Commit 4e986d3705df ("drm: zte: add overlay plane support") introduces the following static checker warning: drivers/gpu/drm/zte/zx_plane.c:170 zx_vl_rsz_setup() warn: always true condition '(fmt >= 0) => (0-u32max >= 0)' Fix it by change 'fmt' type to integer. Reported-by: Dan Carpenter Fixes: 4e986d3705df ("drm: zte: add overlay plane support") Signed-off-by: Shawn Guo Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487598551-28310-1-git-send-email-shawnguo@kernel.org drivers/gpu/drm/zte/zx_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f201ebd87652cf1519792f8662bb3f862c76aa33 Author: zhong jiang Date: Wed Feb 22 15:46:51 2017 -0800 mm/z3fold.c: limit first_num to the actual range of possible buddy indexes At present, Tying the first_num size to NCHUNKS_ORDER is confusing. the number of chunks is completely unrelated to the number of buddies. The patch limits the first_num to actual range of possible buddy indexes. and that is more reasonable and obvious without functional change. Link: http://lkml.kernel.org/r/1476776569-29504-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Suggested-by: Dan Streetman Acked-by: Dan Streetman Acked-by: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 083fb8edda0487d192e8c117f625563b920cf7a4 Author: Randy Dunlap Date: Wed Feb 22 15:46:48 2017 -0800 mm: fix stray kernel-doc notation Delete stray (second) function description in find_lock_page() kernel-doc notation. Note: scripts/kernel-doc just ignores the second function description. Fixes: 2457aec63745e ("mm: non-atomically mark page accessed during page cache allocation where possible") Link: http://lkml.kernel.org/r/b037e9a3-516c-ec02-6c8e-fa5479747ba6@infradead.org Signed-off-by: Randy Dunlap Reported-by: Matthew Wilcox Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 1 - 1 file changed, 1 deletion(-) commit c87d1655c29500b459fb135258a93f8309ada9c7 Author: Sergey Senozhatsky Date: Wed Feb 22 15:46:45 2017 -0800 zram: remove obsolete sysfs attrs We had a deprecated_attr_warn() warning for 2 years and now the time has come and we finally can do the cleanup. The plan was as follows: : per-stat sysfs attributes are considered to be deprecated. : The basic strategy is: : -- the existing RW nodes will be downgraded to WO nodes (in linux 4.11) : -- deprecated RO sysfs nodes will eventually be removed (in linux 4.11) : : The list of deprecated attributes can be found here: : Documentation/ABI/obsolete/sysfs-block-zram : : Basically, every attribute that has its own read accessible sysfs : node (e.g. num_reads) *AND* is accessible via one of the stat files : (zram/stat or zram/io_stat or zram/mm_stat) is considered : to be deprecated. The patch also removes `obsolete/sysfs-block-zram', clean ups `testing/sysfs-block-zram' and tweaks zram.txt files. Link: http://lkml.kernel.org/r/20170118035838.11090-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/obsolete/sysfs-block-zram | 119 ---------------------------- Documentation/ABI/testing/sysfs-block-zram | 101 ++--------------------- Documentation/blockdev/zram.txt | 74 ++++++++--------- drivers/block/zram/zram_drv.c | 101 +---------------------- 4 files changed, 42 insertions(+), 353 deletions(-) commit 5d63f81c9e495e1f38fa36208bdcbbe2d2e72960 Author: Miles Chen Date: Wed Feb 22 15:46:42 2017 -0800 mm/memblock.c: remove unnecessary log and clean up There is no variable named flags in memblock_add() and memblock_reserve() so remove it from the log messages. This patch also cleans up the type casting for phys_addr_t by using %pa to print them. Link: http://lkml.kernel.org/r/1484720165-25403-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 54 +++++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 235190738aba7c5c94300c8d882842a535280e5a Author: Kirill A. Shutemov Date: Wed Feb 22 15:46:39 2017 -0800 oom-reaper: use madvise_dontneed() logic to decide if unmap the VMA Logic on whether we can reap pages from the VMA should match what we have in madvise_dontneed(). In particular, we should skip, VM_PFNMAP VMAs, but we don't now. Let's just extract condition on which we can shoot down pagesi from a VMA with MADV_DONTNEED into separate function and use it in both places. Link: http://lkml.kernel.org/r/20170118122429.43661-4-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Peter Zijlstra Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 5 +++++ mm/madvise.c | 4 +++- mm/oom_kill.c | 9 +-------- 3 files changed, 9 insertions(+), 9 deletions(-) commit ecf1385d72f0491400a8ceca7001196ca369aa8c Author: Kirill A. Shutemov Date: Wed Feb 22 15:46:37 2017 -0800 mm: drop unused argument of zap_page_range() There's no users of zap_page_range() who wants non-NULL 'details'. Let's drop it. Link: http://lkml.kernel.org/r/20170118122429.43661-3-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Peter Zijlstra Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/gmap.c | 2 +- arch/x86/mm/mpx.c | 2 +- drivers/android/binder.c | 2 +- drivers/staging/android/ion/ion.c | 3 +-- include/linux/mm.h | 2 +- mm/madvise.c | 2 +- mm/memory.c | 5 ++--- 7 files changed, 8 insertions(+), 10 deletions(-) commit 3e8715fdc03e8df4d26d8e436166e44e3e416d3b Author: Kirill A. Shutemov Date: Wed Feb 22 15:46:34 2017 -0800 mm: drop zap_details::check_swap_entries detail == NULL would give the same functionality as .check_swap_entries==true. Link: http://lkml.kernel.org/r/20170118122429.43661-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Peter Zijlstra Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 - mm/memory.c | 4 ++-- mm/oom_kill.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) commit da162e9368990ed747075e2ab427da0759fc4a59 Author: Kirill A. Shutemov Date: Wed Feb 22 15:46:31 2017 -0800 mm: drop zap_details::ignore_dirty The only user of ignore_dirty is oom-reaper. But it doesn't really use it. ignore_dirty only has effect on file pages mapped with dirty pte. But oom-repear skips shared VMAs, so there's no way we can dirty file pte in them. Link: http://lkml.kernel.org/r/20170118122429.43661-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Peter Zijlstra Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 - mm/memory.c | 6 ------ mm/oom_kill.c | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) commit 685dbf6f5a643c4bdb9323ee3544ec652505d2ea Author: David Rientjes Date: Wed Feb 22 15:46:28 2017 -0800 mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled The patch "mm, page_alloc: warn_alloc print nodemask" implicitly sets the allocation nodemask to cpuset_current_mems_allowed when there is no effective mempolicy. cpuset_current_mems_allowed is only effective when cpusets are enabled, which is also printed by warn_alloc(), so setting the nodemask to cpuset_current_mems_allowed is redundant and prevents debugging issues where ac->nodemask is not set properly in the page allocator. This provides better debugging output since cpuset_print_current_mems_allowed() is already provided. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701181347320.142399@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6c18ba7a18997dadbf7ee912e15677ad2c9993e5 Author: Michal Hocko Date: Wed Feb 22 15:46:25 2017 -0800 mm: help __GFP_NOFAIL allocations which do not trigger OOM killer Now that __GFP_NOFAIL doesn't override decisions to skip the oom killer we are left with requests which require to loop inside the allocator without invoking the oom killer (e.g. GFP_NOFS|__GFP_NOFAIL used by fs code) and so they might, in very unlikely situations, loop for ever - e.g. other parallel request could starve them. This patch tries to limit the likelihood of such a lockup by giving these __GFP_NOFAIL requests a chance to move on by consuming a small part of memory reserves. We are using ALLOC_HARDER which should be enough to prevent from the starvation by regular allocation requests, yet it shouldn't consume enough from the reserves to disrupt high priority requests (ALLOC_HIGH). While we are at it, let's introduce a helper __alloc_pages_cpuset_fallback which enforces the cpusets but allows to fallback to ignore them if the first attempt fails. __GFP_NOFAIL requests can be considered important enough to allow cpuset runaway in order for the system to move on. It is highly unlikely that any of these will be GFP_USER anyway. Link: http://lkml.kernel.org/r/20161220134904.21023-4-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Vlastimil Babka Cc: Johannes Weiner Cc: Hillf Danton Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) commit 06ad276ac18742c6b281698d41b27a290cd42407 Author: Michal Hocko Date: Wed Feb 22 15:46:22 2017 -0800 mm, oom: do not enforce OOM killer for __GFP_NOFAIL automatically __alloc_pages_may_oom makes sure to skip the OOM killer depending on the allocation request. This includes lowmem requests, costly high order requests and others. For a long time __GFP_NOFAIL acted as an override for all those rules. This is not documented and it can be quite surprising as well. E.g. GFP_NOFS requests are not invoking the OOM killer but GFP_NOFS|__GFP_NOFAIL does so if we try to convert some of the existing open coded loops around allocator to nofail request (and we have done that in the past) then such a change would have a non trivial side effect which is far from obvious. Note that the primary motivation for skipping the OOM killer is to prevent from pre-mature invocation. The exception has been added by commit 82553a937f12 ("oom: invoke oom killer for __GFP_NOFAIL"). The changelog points out that the oom killer has to be invoked otherwise the request would be looping for ever. But this argument is rather weak because the OOM killer doesn't really guarantee a forward progress for those exceptional cases: - it will hardly help to form costly order which in turn can result in the system panic because of no oom killable task in the end - I believe we certainly do not want to put the system down just because there is a nasty driver asking for order-9 page with GFP_NOFAIL not realizing all the consequences. It is much better this request would loop for ever than the massive system disruption - lowmem is also highly unlikely to be freed during OOM killer - GFP_NOFS request could trigger while there is still a lot of memory pinned by filesystems. This patch simply removes the __GFP_NOFAIL special case in order to have a more clear semantic without surprising side effects. Signed-off-by: Michal Hocko Reported-by: Nils Holland Acked-by: Johannes Weiner Cc: Vlastimil Babka Cc: Hillf Danton Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 2 +- mm/page_alloc.c | 49 ++++++++++++++++++++++++------------------------- 2 files changed, 25 insertions(+), 26 deletions(-) commit 9a67f6488eca926f8356b2737fc9f8f6c0cbed85 Author: Michal Hocko Date: Wed Feb 22 15:46:19 2017 -0800 mm: consolidate GFP_NOFAIL checks in the allocator slowpath Tetsuo Handa has pointed out that commit 0a0337e0d1d1 ("mm, oom: rework oom detection") has subtly changed semantic for costly high order requests with __GFP_NOFAIL and withtout __GFP_REPEAT and those can fail right now. My code inspection didn't reveal any such users in the tree but it is true that this might lead to unexpected allocation failures and subsequent OOPs. __alloc_pages_slowpath wrt. GFP_NOFAIL is hard to follow currently. There are few special cases but we are lacking a catch all place to be sure we will not miss any case where the non failing allocation might fail. This patch reorganizes the code a bit and puts all those special cases under nopage label which is the generic go-to-fail path. Non failing allocations are retried or those that cannot retry like non-sleeping allocation go to the failure point directly. This should make the code flow much easier to follow and make it less error prone for future changes. While we are there we have to move the stall check up to catch potentially looping non-failing allocations. [akpm@linux-foundation.org: fix alloc_flags may-be-used-uninitalized] Link: http://lkml.kernel.org/r/20161220134904.21023-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Acked-by: Johannes Weiner Acked-by: Hillf Danton Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 91 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 39 deletions(-) commit 9af744d743170b5f5ef70031dea8d772d166ab28 Author: Michal Hocko Date: Wed Feb 22 15:46:16 2017 -0800 lib/show_mem.c: teach show_mem to work with the given nodemask show_mem() allows to filter out node specific data which is irrelevant to the allocation request via SHOW_MEM_FILTER_NODES. The filtering is done in skip_free_areas_node which skips all nodes which are not in the mems_allowed of the current process. This works most of the time as expected because the nodemask shouldn't be outside of the allocating task but there are some exceptions. E.g. memory hotplug might want to request allocations from outside of the allowed nodes (see new_node_page). Get rid of this hardcoded behavior and push the allocation mask down the show_mem path and use it instead of cpuset_current_mems_allowed. NULL nodemask is interpreted as cpuset_current_mems_allowed. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170117091543.25850-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Cc: Hillf Danton Cc: Johannes Weiner Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/xmon/xmon.c | 2 +- arch/sparc/kernel/setup_32.c | 2 +- drivers/net/ethernet/sgi/ioc3-eth.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- include/linux/mm.h | 5 ++--- lib/show_mem.c | 4 ++-- mm/nommu.c | 6 +++--- mm/oom_kill.c | 2 +- mm/page_alloc.c | 38 ++++++++++++++++++------------------- 10 files changed, 32 insertions(+), 33 deletions(-) commit 6d23f8a5d432337aa2590ea8fd5eee8b0bc28eee Author: Michal Hocko Date: Wed Feb 22 15:46:13 2017 -0800 arch, mm: remove arch specific show_mem We have a generic implementation for quite some time already. If there is any arch specific information to be printed then we should add a callback called from the generic code rather than duplicate the whole show_mem. The current code has resulted in the code duplication and the output divergence which is both confusing and adds maintainance costs. Let's just get rid of this mess. Link: http://lkml.kernel.org/r/20170117091543.25850-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Guan Xuetao [UniCore32] Acked-by: Helge Deller [for parisc] Acked-by: Chris Metcalf [for tile] Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Tony Luck Cc: Fenghua Yu Cc: "James E.J. Bottomley" Cc: "David S. Miller" Cc: Hillf Danton Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/mm/init.c | 48 ----------------------------------------------- arch/parisc/mm/init.c | 49 ------------------------------------------------ arch/sparc/mm/init_32.c | 11 ----------- arch/tile/mm/pgtable.c | 45 -------------------------------------------- arch/unicore32/mm/init.c | 44 ------------------------------------------- 5 files changed, 197 deletions(-) commit a8e99259e7e32b67af2b447f0a570813c0c283ec Author: Michal Hocko Date: Wed Feb 22 15:46:10 2017 -0800 mm, page_alloc: warn_alloc print nodemask warn_alloc is currently used for to report an allocation failure or an allocation stall. We print some details of the allocation request like the gfp mask and the request order. We do not print the allocation nodemask which is important when debugging the reason for the allocation failure as well. We alreaddy print the nodemask in the OOM report. Add nodemask to warn_alloc and print it in warn_alloc as well. Link: http://lkml.kernel.org/r/20170117091543.25850-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Hillf Danton Cc: Johannes Weiner Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 4 ++-- mm/page_alloc.c | 10 ++++++---- mm/vmalloc.c | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) commit c02e50bb8a55a7adeeca5e411479ed70c6a2dfa1 Author: Michal Hocko Date: Wed Feb 22 15:46:07 2017 -0800 mm, page_alloc: do not report all nodes in show_mem Patch series "show_mem updates", v2. This is a mixture of one bug fix (patch 1), an enhancement (patch 2) and cleanups (the rest of the series). First two patches should be really straightforward. Patch 3 removes some arch specific show_mem implementations because I think they are quite outdated and do not really serve any useful purpose anymore. I think we should really strive to have a consistent show_mem output regardless of the architecture. If some architecture is really special and wants to dump something additional we should do that via an arch specific hook. The last patch adds nodemask parameter so that we do not rely on the hardcoded mems_allowed of the current task when doing the node filtering. I consider this more a cleanup than a fix because basically all users use a nodemask which is a subset of mems_allowed. There is only one call path in the memory hotplug which doesn't comply with this but that is hardly something to worry about. This patch (of 4): Commit 599d0c954f91 ("mm, vmscan: move LRU lists to node") has added per numa node statistics to show_mem but it forgot to add skip_free_areas_node to filter out nodes which are outside of the allocating task numa policy. Add this check to not pollute the output with the pointless information. Link: http://lkml.kernel.org/r/20170117091543.25850-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: David Rientjes Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) commit abd6e8a7ac49807102652861f69583944752e297 Author: Michal Hocko Date: Wed Feb 22 15:46:04 2017 -0800 Revert "mm: bail out in shrink_inactive_list()" This reverts commit 91dcade47a3d0e7. inactive_reclaimable_pages shouldn't be needed anymore since that get_scan_count is aware of the eligble zones ("mm, vmscan: consider eligible zones in get_scan_count"). Link: http://lkml.kernel.org/r/20170117103702.28542-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Minchan Kim Acked-by: Mel Gorman Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 71ab6cfe88dcf9f6e6a65eb85cf2bda20a257682 Author: Michal Hocko Date: Wed Feb 22 15:46:01 2017 -0800 mm, vmscan: consider eligible zones in get_scan_count get_scan_count() considers the whole node LRU size when - doing SCAN_FILE due to many page cache inactive pages - calculating the number of pages to scan In both cases this might lead to unexpected behavior especially on 32b systems where we can expect lowmem memory pressure very often. A large highmem zone can easily distort SCAN_FILE heuristic because there might be only few file pages from the eligible zones on the node lru and we would still enforce file lru scanning which can lead to trashing while we could still scan anonymous pages. The later use of lruvec_lru_size can be problematic as well. Especially when there are not many pages from the eligible zones. We would have to skip over many pages to find anything to reclaim but shrink_node_memcg would only reduce the remaining number to scan by SWAP_CLUSTER_MAX at maximum. Therefore we can end up going over a large LRU many times without actually having chance to reclaim much if anything at all. The closer we are out of memory on lowmem zone the worse the problem will be. Fix this by filtering out all the ineligible zones when calculating the lru size for both paths and consider only sc->reclaim_idx zones. The patch would need to be tweaked a bit to apply to 4.10 and older but I will do that as soon as it hits the Linus tree in the next merge window. Link: http://lkml.kernel.org/r/20170117103702.28542-3-mhocko@kernel.org Fixes: b2e18757f2c9 ("mm, vmscan: begin reclaiming pages on a per-node basis") Signed-off-by: Michal Hocko Tested-by: Trevor Cordes Acked-by: Minchan Kim Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd538803731e50367b7c59ce4ad3454426a3d671 Author: Michal Hocko Date: Wed Feb 22 15:45:58 2017 -0800 mm, vmscan: cleanup lru size claculations lruvec_lru_size returns the full size of the LRU list while we sometimes need a value reduced only to eligible zones (e.g. for lowmem requests). inactive_list_is_low is one such user. Later patches will add more of them. Add a new parameter to lruvec_lru_size and allow it filter out zones which are not eligible for the given context. Link: http://lkml.kernel.org/r/20170117103702.28542-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Minchan Kim Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 +- mm/vmscan.c | 89 +++++++++++++++++++++++++------------------------- mm/workingset.c | 2 +- 3 files changed, 46 insertions(+), 47 deletions(-) commit f0958906cd2bf3730cd7938b8af80a1c23e8ac06 Author: Michal Hocko Date: Wed Feb 22 15:45:55 2017 -0800 mm, vmscan: do not count freed pages as PGDEACTIVATE PGDEACTIVATE represents the number of pages moved from the active list to the inactive list. At least this sounds like the original motivation of the counter. move_active_pages_to_lru, however, counts pages which got freed in the mean time as deactivated as well. This is a very rare event and counting them as deactivation in itself is not harmful but it makes the code more convoluted than necessary - we have to count both all pages and those which are freed which is a bit confusing. After this patch the PGDEACTIVATE should have a slightly more clear semantic and only count those pages which are moved from the active to the inactive list which is a plus. Link: http://lkml.kernel.org/r/20170112211221.17636-1-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Vlastimil Babka Acked-by: Vlastimil Babka Acked-by: Johannes Weiner Cc: Hugh Dickins Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bc71226b0690c21bdf50c9c9d08c5dc9ef98764e Author: Geliang Tang Date: Wed Feb 22 15:45:52 2017 -0800 mm/backing-dev.c: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Link: http://lkml.kernel.org/r/671275de093d93ddc7c6f77ddc0d357149691a39.1484306840.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Cc: Jens Axboe Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/backing-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21440d7eb9044001b7fdb71d0163689f60a0f2a1 Author: David Rientjes Date: Wed Feb 22 15:45:49 2017 -0800 mm, thp: add new defer+madvise defrag option There is no thp defrag option that currently allows MADV_HUGEPAGE regions to do direct compaction and reclaim while all other thp allocations simply trigger kswapd and kcompactd in the background and fail immediately. The "defer" setting simply triggers background reclaim and compaction for all regions, regardless of MADV_HUGEPAGE, which makes it unusable for our userspace where MADV_HUGEPAGE is being used to indicate the application is willing to wait for work for thp memory to be available. The "madvise" setting will do direct compaction and reclaim for these MADV_HUGEPAGE regions, but does not trigger kswapd and kcompactd in the background for anybody else. For reasonable usage, there needs to be a mesh between the two options. This patch introduces a fifth mode, "defer+madvise", that will do direct reclaim and compaction for MADV_HUGEPAGE regions and trigger background reclaim and compaction for everybody else so that hugepages may be available in the near future. A proposal to allow direct reclaim and compaction for MADV_HUGEPAGE regions as part of the "defer" mode, making it a very powerful setting and avoids breaking userspace, was offered: http://marc.info/?t=148236612700003 This additional mode is a compromise. A second proposal to allow both "defer" and "madvise" to be selected at the same time was also offered: http://marc.info/?t=148357345300001. This is possible, but there was a concern that it might break existing userspaces the parse the output of the defrag mode, so the fifth option was introduced instead. This patch also cleans up the helper function for storing to "enabled" and "defrag" since the former supports three modes while the latter supports five and triple_flag_store() was getting unnecessarily messy. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701101614330.41805@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/transhuge.txt | 8 ++- include/linux/huge_mm.h | 1 + mm/huge_memory.c | 146 +++++++++++++++++++++-------------------- 3 files changed, 82 insertions(+), 73 deletions(-) commit ba81f83842549871cbd7226fc11530dc464500bb Author: Huang Ying Date: Wed Feb 22 15:45:46 2017 -0800 mm/swap: skip readahead only when swap slot cache is enabled Because during swap off, a swap entry may have swap_map[] == SWAP_HAS_CACHE (for example, just allocated). If we return NULL in __read_swap_cache_async(), the swap off will abort. So when swap slot cache is disabled, (for swap off), we will wait for page to be put into swap cache in such race condition. This should not be a problem for swap slot cache, because swap slot cache should be drained after clearing swap_slot_cache_enabled. [ying.huang@intel.com: fix memory leak in __read_swap_cache_async()] Link: http://lkml.kernel.org/r/874lzt6znd.fsf@yhuang-dev.intel.com Link: http://lkml.kernel.org/r/5e2c5f6abe8e6eb0797408897b1bba80938e9b9d.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: "Huang, Ying" Signed-off-by: Tim Chen Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap_slots.h | 2 ++ mm/swap_slots.c | 2 +- mm/swap_state.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) commit 039939a65059852242c823ece685579370bc574f Author: Tim Chen Date: Wed Feb 22 15:45:43 2017 -0800 mm/swap: enable swap slots cache usage Initialize swap slots cache and enable it on swap on. Drain all swap slots on swap off. Link: http://lkml.kernel.org/r/07cbc94882fa95d4ac3cfc50b8dce0b1ec231b93.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Cc: "Huang, Ying" Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 67afa38e012e9581b9b42f2a41dfc56b1280794d Author: Tim Chen Date: Wed Feb 22 15:45:39 2017 -0800 mm/swap: add cache for swap slots allocation We add per cpu caches for swap slots that can be allocated and freed quickly without the need to touch the swap info lock. Two separate caches are maintained for swap slots allocated and swap slots returned. This is to allow the swap slots to be returned to the global pool in a batch so they will have a chance to be coaelesced with other slots in a cluster. We do not reuse the slots that are returned right away, as it may increase fragmentation of the slots. The swap allocation cache is protected by a mutex as we may sleep when searching for empty slots in cache. The swap free cache is protected by a spin lock as we cannot sleep in the free path. We refill the swap slots cache when we run out of slots, and we disable the swap slots cache and drain the slots if the global number of slots fall below a low watermark threshold. We re-enable the cache agian when the slots available are above a high watermark. [ying.huang@intel.com: use raw_cpu_ptr over this_cpu_ptr for swap slots access] [tim.c.chen@linux.intel.com: add comments on locks in swap_slots.h] Link: http://lkml.kernel.org/r/20170118180327.GA24225@linux.intel.com Link: http://lkml.kernel.org/r/35de301a4eaa8daa2977de6e987f2c154385eb66.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Signed-off-by: "Huang, Ying" Reviewed-by: Michal Hocko Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 + include/linux/swap_slots.h | 28 ++++ mm/Makefile | 2 +- mm/swap_slots.c | 342 +++++++++++++++++++++++++++++++++++++++++++++ mm/swap_state.c | 1 + mm/swapfile.c | 26 ++-- 6 files changed, 391 insertions(+), 12 deletions(-) commit 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e Author: Tim Chen Date: Wed Feb 22 15:45:36 2017 -0800 mm/swap: free swap slots in batch Add new functions that free unused swap slots in batches without the need to reacquire swap info lock. This improves scalability and reduce lock contention. Link: http://lkml.kernel.org/r/c25e0fcdfd237ec4ca7db91631d3b9f6ed23824e.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Signed-off-by: "Huang, Ying" Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 1 + mm/swapfile.c | 155 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 95 insertions(+), 61 deletions(-) commit 36005bae205da3eef0016a5c96a34f10a68afa1e Author: Tim Chen Date: Wed Feb 22 15:45:33 2017 -0800 mm/swap: allocate swap slots in batches Currently, the swap slots are allocated one page at a time, causing contention to the swap_info lock protecting the swap partition on every page being swapped. This patch adds new functions get_swap_pages and scan_swap_map_slots to request multiple swap slots at once. This will reduces the lock contention on the swap_info lock. Also scan_swap_map_slots can operate more efficiently as swap slots often occurs in clusters close to each other on a swap device and it is quicker to allocate them together. Link: http://lkml.kernel.org/r/9fec2845544371f62c3763d43510045e33d286a6.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Signed-off-by: "Huang, Ying" Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 2 + mm/swapfile.c | 136 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 113 insertions(+), 25 deletions(-) commit e8c26ab60598558ec3a626e7925b06e7417d7710 Author: Tim Chen Date: Wed Feb 22 15:45:29 2017 -0800 mm/swap: skip readahead for unreferenced swap slots We can avoid needlessly allocating page for swap slots that are not used by anyone. No pages have to be read in for these slots. Link: http://lkml.kernel.org/r/0784b3f20b9bd3aa5552219624cb78dc4ae710c9.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Signed-off-by: "Huang, Ying" Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 6 ++++++ mm/swap_state.c | 4 ++++ mm/swapfile.c | 47 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 51 insertions(+), 6 deletions(-) commit 4b3ef9daa4fc0bba742a79faecb17fdaaead083b Author: Huang, Ying Date: Wed Feb 22 15:45:26 2017 -0800 mm/swap: split swap cache into 64MB trunks The patch is to improve the scalability of the swap out/in via using fine grained locks for the swap cache. In current kernel, one address space will be used for each swap device. And in the common configuration, the number of the swap device is very small (one is typical). This causes the heavy lock contention on the radix tree of the address space if multiple tasks swap out/in concurrently. But in fact, there is no dependency between pages in the swap cache. So that, we can split the one shared address space for each swap device into several address spaces to reduce the lock contention. In the patch, the shared address space is split into 64MB trunks. 64MB is chosen to balance the memory space usage and effect of lock contention reduction. The size of struct address_space on x86_64 architecture is 408B, so with the patch, 6528B more memory will be used for every 1GB swap space on x86_64 architecture. One address space is still shared for the swap entries in the same 64M trunks. To avoid lock contention for the first round of swap space allocation, the order of the swap clusters in the initial free clusters list is changed. The swap space distance between the consecutive swap clusters in the free cluster list is at least 64M. After the first round of allocation, the swap clusters are expected to be freed randomly, so the lock contention should be reduced effectively. Link: http://lkml.kernel.org/r/735bab895e64c930581ffb0a05b661e01da82bc5.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: "Huang, Ying" Signed-off-by: Tim Chen Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 11 +++++++-- mm/swap.c | 6 ----- mm/swap_state.c | 68 ++++++++++++++++++++++++++++++++++++++++++---------- mm/swapfile.c | 16 +++++++++++-- 4 files changed, 79 insertions(+), 22 deletions(-) commit 235b62176712b970c815923e36b9a9cc05d4d901 Author: Huang, Ying Date: Wed Feb 22 15:45:22 2017 -0800 mm/swap: add cluster lock This patch is to reduce the lock contention of swap_info_struct->lock via using a more fine grained lock in swap_cluster_info for some swap operations. swap_info_struct->lock is heavily contended if multiple processes reclaim pages simultaneously. Because there is only one lock for each swap device. While in common configuration, there is only one or several swap devices in the system. The lock protects almost all swap related operations. In fact, many swap operations only access one element of swap_info_struct->swap_map array. And there is no dependency between different elements of swap_info_struct->swap_map. So a fine grained lock can be used to allow parallel access to the different elements of swap_info_struct->swap_map. In this patch, a spinlock is added to swap_cluster_info to protect the elements of swap_info_struct->swap_map in the swap cluster and the fields of swap_cluster_info. This reduced locking contention for swap_info_struct->swap_map access greatly. Because of the added spinlock, the size of swap_cluster_info increases from 4 bytes to 8 bytes on the 64 bit and 32 bit system. This will use additional 4k RAM for every 1G swap space. Because the size of swap_cluster_info is much smaller than the size of the cache line (8 vs 64 on x86_64 architecture), there may be false cache line sharing between spinlocks in swap_cluster_info. To avoid the false sharing in the first round of the swap cluster allocation, the order of the swap clusters in the free clusters list is changed. So that, the swap_cluster_info sharing the same cache line will be placed as far as possible. After the first round of allocation, the order of the clusters in free clusters list is expected to be random. So the false sharing should be not serious. Compared with a previous implementation using bit_spin_lock, the sequential swap out throughput improved about 3.2%. Test was 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 created 32 processes, which sequentially allocate and write to the anonymous pages until the RAM and part of the swap device is used. [ying.huang@intel.com: v5] Link: http://lkml.kernel.org/r/878tqeuuic.fsf_-_@yhuang-dev.intel.com [minchan@kernel.org: initialize spinlock for swap_cluster_info] Link: http://lkml.kernel.org/r/1486434945-29753-1-git-send-email-minchan@kernel.org [hughd@google.com: annotate nested locking for cluster lock] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1702161050540.21773@eggly.anvils Link: http://lkml.kernel.org/r/dbb860bbd825b1aaba18988015e8963f263c3f0d.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: "Huang, Ying" Signed-off-by: Tim Chen Signed-off-by: Minchan Kim Signed-off-by: Hugh Dickins Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 6 ++ mm/swapfile.c | 215 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 179 insertions(+), 42 deletions(-) commit 6a991fc72d1243b8da0c644d3147d3ec41a0b281 Author: Huang, Ying Date: Wed Feb 22 15:45:19 2017 -0800 mm/swap: fix kernel message in swap_info_get() Patch series "mm/swap: Regular page swap optimizations", v5. Times have changed. Coming generation of Solid state Block device latencies are getting down to sub 100 usec, which is within an order of magnitude of DRAM, and their performance is orders of magnitude higher than the single- spindle rotational media we've swapped to historically. This could benefit many usage scenearios. For example cloud providers who overcommit their memory (as VM don't use all the memory provisioned). Having a fast swap will allow them to be more aggressive in memory overcommit and fit more VMs to a platform. In our testing [see footnote], the median latency that the kernel adds to a page fault is 15 usec, which comes quite close to the amount that will be contributed by the underlying I/O devices. The software latency comes mostly from contentions on the locks protecting the radix tree of the swap cache and also the locks protecting the individual swap devices. The lock contentions already consumed 35% of cpu cycles in our test. In the very near future, software latency will become the bottleneck to swap performnace as block device I/O latency gets within the shouting distance of DRAM speed. This patch set, reduced the median page fault latency from 15 usec to 4 usec (375% reduction) for DRAM based pmem block device. This patch (of 9): swap_info_get() is used not only in swap free code path but also in page_swapcount(), etc. So the original kernel message in swap_info_get() is not correct now. Fix it via replacing "swap_free" to "swap_info_get" in the message. Link: http://lkml.kernel.org/r/9b5f8bd6266f9da978c373f2384c8044df5e262c.1484082593.git.tim.c.chen@linux.intel.com Signed-off-by: "Huang, Ying" Signed-off-by: Tim Chen Reviewed-by: Rik van Riel Cc: Aaron Lu Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Christian Borntraeger Cc: Dave Hansen Cc: Hillf Danton Cc: Huang Ying Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet escreveu: Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Shaohua Li Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 16e72e9b30986ee15f17fbb68189ca842c32af58 Author: Denys Vlasenko Date: Wed Feb 22 15:45:16 2017 -0800 powerpc: do not make the entire heap executable On 32-bit powerpc the ELF PLT sections of binaries (built with --bss-plt, or with a toolchain which defaults to it) look like this: [17] .sbss NOBITS 0002aff8 01aff8 000014 00 WA 0 0 4 [18] .plt NOBITS 0002b00c 01aff8 000084 00 WAX 0 0 4 [19] .bss NOBITS 0002b090 01aff8 0000a4 00 WA 0 0 4 Which results in an ELF load header: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x019c70 0x00029c70 0x00029c70 0x01388 0x014c4 RWE 0x10000 This is all correct, the load region containing the PLT is marked as executable. Note that the PLT starts at 0002b00c but the file mapping ends at 0002aff8, so the PLT falls in the 0 fill section described by the load header, and after a page boundary. Unfortunately the generic ELF loader ignores the X bit in the load headers when it creates the 0 filled non-file backed mappings. It assumes all of these mappings are RW BSS sections, which is not the case for PPC. gcc/ld has an option (--secure-plt) to not do this, this is said to incur a small performance penalty. Currently, to support 32-bit binaries with PLT in BSS kernel maps *entire brk area* with executable rights for all binaries, even --secure-plt ones. Stop doing that. Teach the ELF loader to check the X bit in the relevant load header and create 0 filled anonymous mappings that are executable if the load header requests that. Test program showing the difference in /proc/$PID/maps: int main() { char buf[16*1024]; char *p = malloc(123); /* make "[heap]" mapping appear */ int fd = open("/proc/self/maps", O_RDONLY); int len = read(fd, buf, sizeof(buf)); write(1, buf, len); printf("%p\n", p); return 0; } Compiled using: gcc -mbss-plt -m32 -Os test.c -otest Unpatched ppc64 kernel: 00100000-00120000 r-xp 00000000 00:00 0 [vdso] 0fe10000-0ffd0000 r-xp 00000000 fd:00 67898094 /usr/lib/libc-2.17.so 0ffd0000-0ffe0000 r--p 001b0000 fd:00 67898094 /usr/lib/libc-2.17.so 0ffe0000-0fff0000 rw-p 001c0000 fd:00 67898094 /usr/lib/libc-2.17.so 10000000-10010000 r-xp 00000000 fd:00 100674505 /home/user/test 10010000-10020000 r--p 00000000 fd:00 100674505 /home/user/test 10020000-10030000 rw-p 00010000 fd:00 100674505 /home/user/test 10690000-106c0000 rwxp 00000000 00:00 0 [heap] f7f70000-f7fa0000 r-xp 00000000 fd:00 67898089 /usr/lib/ld-2.17.so f7fa0000-f7fb0000 r--p 00020000 fd:00 67898089 /usr/lib/ld-2.17.so f7fb0000-f7fc0000 rw-p 00030000 fd:00 67898089 /usr/lib/ld-2.17.so ffa90000-ffac0000 rw-p 00000000 00:00 0 [stack] 0x10690008 Patched ppc64 kernel: 00100000-00120000 r-xp 00000000 00:00 0 [vdso] 0fe10000-0ffd0000 r-xp 00000000 fd:00 67898094 /usr/lib/libc-2.17.so 0ffd0000-0ffe0000 r--p 001b0000 fd:00 67898094 /usr/lib/libc-2.17.so 0ffe0000-0fff0000 rw-p 001c0000 fd:00 67898094 /usr/lib/libc-2.17.so 10000000-10010000 r-xp 00000000 fd:00 100674505 /home/user/test 10010000-10020000 r--p 00000000 fd:00 100674505 /home/user/test 10020000-10030000 rw-p 00010000 fd:00 100674505 /home/user/test 10180000-101b0000 rw-p 00000000 00:00 0 [heap] ^^^^ this has changed f7c60000-f7c90000 r-xp 00000000 fd:00 67898089 /usr/lib/ld-2.17.so f7c90000-f7ca0000 r--p 00020000 fd:00 67898089 /usr/lib/ld-2.17.so f7ca0000-f7cb0000 rw-p 00030000 fd:00 67898089 /usr/lib/ld-2.17.so ff860000-ff890000 rw-p 00000000 00:00 0 [stack] 0x10180008 The patch was originally posted in 2012 by Jason Gunthorpe and apparently ignored: https://lkml.org/lkml/2012/9/30/138 Lightly run-tested. Link: http://lkml.kernel.org/r/20161215131950.23054-1-dvlasenk@redhat.com Signed-off-by: Jason Gunthorpe Signed-off-by: Denys Vlasenko Acked-by: Kees Cook Acked-by: Michael Ellerman Tested-by: Jason Gunthorpe Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Aneesh Kumar K.V" Cc: Oleg Nesterov Cc: Florian Weimer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/page.h | 4 +++- fs/binfmt_elf.c | 30 ++++++++++++++++++++++-------- include/linux/mm.h | 1 + mm/mmap.c | 24 +++++++++++++++++++----- 4 files changed, 45 insertions(+), 14 deletions(-) commit ddffe98d166f4a93d996d5aa628fd745311fc1e7 Author: Yasuaki Ishimatsu Date: Wed Feb 22 15:45:13 2017 -0800 mm/memory_hotplug: set magic number to page->freelist instead of page->lru.next To identify that pages of page table are allocated from bootmem allocator, magic number sets to page->lru.next. But page->lru list is initialized in reserve_bootmem_region(). So when calling free_pagetable(), the function cannot find the magic number of pages. And free_pagetable() frees the pages by free_reserved_page() not put_page_bootmem(). But if the pages are allocated from bootmem allocator and used as page table, the pages have private flag. So before freeing the pages, we should clear the private flag by put_page_bootmem(). Before applying the commit 7bfec6f47bb0 ("mm, page_alloc: check multiple page fields with a single branch"), we could find the following visible issue: BUG: Bad page state in process kworker/u1024:1 page:ffffea103cfd8040 count:0 mapcount:0 mappi flags: 0x6fffff80000800(private) page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set bad because of flags: 0x800(private) Call Trace: [...] dump_stack+0x63/0x87 [...] bad_page+0x114/0x130 [...] free_pages_prepare+0x299/0x2d0 [...] free_hot_cold_page+0x31/0x150 [...] __free_pages+0x25/0x30 [...] free_pagetable+0x6f/0xb4 [...] remove_pagetable+0x379/0x7ff [...] vmemmap_free+0x10/0x20 [...] sparse_remove_one_section+0x149/0x180 [...] __remove_pages+0x2e9/0x4f0 [...] arch_remove_memory+0x63/0xc0 [...] remove_memory+0x8c/0xc0 [...] acpi_memory_device_remove+0x79/0xa5 [...] acpi_bus_trim+0x5a/0x8d [...] acpi_bus_trim+0x38/0x8d [...] acpi_device_hotplug+0x1b7/0x418 [...] acpi_hotplug_work_fn+0x1e/0x29 [...] process_one_work+0x152/0x400 [...] worker_thread+0x125/0x4b0 [...] kthread+0xd8/0xf0 [...] ret_from_fork+0x22/0x40 And the issue still silently occurs. Until freeing the pages of page table allocated from bootmem allocator, the page->freelist is never used. So the patch sets magic number to page->freelist instead of page->lru.next. [isimatu.yasuaki@jp.fujitsu.com: fix merge issue] Link: http://lkml.kernel.org/r/722b1cc4-93ac-dd8b-2be2-7a7e313b3b0b@gmail.com Link: http://lkml.kernel.org/r/2c29bd9f-5b67-02d0-18a3-8828e78bbb6f@gmail.com Signed-off-by: Yasuaki Ishimatsu Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Dave Hansen Cc: Vlastimil Babka Cc: Mel Gorman Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 2 +- mm/memory_hotplug.c | 5 +++-- mm/sparse.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 857e522a007bfda34606ae252e2f61a6eff151ff Author: Yasuaki Ishimatsu Date: Wed Feb 22 15:45:10 2017 -0800 mm/sparse: use page_private() to get page->private value free_map_bootmem() uses page->private directly to set removing_section_nr argument. But to get page->private value, page_private() has been prepared. So free_map_bootmem() should use page_private() instead of page->private. Link: http://lkml.kernel.org/r/1d34eaa5-a506-8b7a-6471-490c345deef8@gmail.com Signed-off-by: Yasuaki Ishimatsu Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Dave Hansen Cc: Vlastimil Babka Cc: Mel Gorman Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d41c03e2dc6a650f69655a42c0ddb72a7c121bf Author: Wei Yang Date: Wed Feb 22 15:45:07 2017 -0800 mm/memblock.c: check return value of memblock_reserve() in memblock_virt_alloc_internal() memblock_reserve() would add a new range to memblock.reserved in case the new range is not totally covered by any of the current memblock.reserved range. If the memblock.reserved is full and can't resize, memblock_reserve() would fail. This doesn't happen in real world now, I observed this during code review. While theoretically, it has the chance to happen. And if it happens, others would think this range of memory is still available and may corrupt the memory. This patch checks the return value and goto "done" after it succeeds. Link: http://lkml.kernel.org/r/1482363033-24754-3-git-send-email-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ef415ef41153b747031e8ad965cb3df4f22ff72e Author: Wei Yang Date: Wed Feb 22 15:45:04 2017 -0800 mm/memblock.c: trivial code refine in memblock_is_region_memory() memblock_is_region_memory() invoke memblock_search() to see whether the base address is in the memory region. If it fails, idx would be -1. Then, it returns 0. If the memblock_search() returns a valid index, it means the base address is guaranteed to be in the range memblock.memory.regions[idx]. Because of this, it is not necessary to check the base again. This patch removes the check on "base". Link: http://lkml.kernel.org/r/1482363033-24754-2-git-send-email-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 399d8eebe768fe3ae648700547d04f2a8796a4da Author: Xishi Qiu Date: Wed Feb 22 15:45:01 2017 -0800 mm: fix some typos in mm/zsmalloc.c Delete extra semicolon, and fix some typos. Link: http://lkml.kernel.org/r/586F1823.4050107@huawei.com Signed-off-by: Xishi Qiu Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d3a9d7a3784e3a54c08dcd9eafaef7ccb383a894 Author: Adygzhy Ondar Date: Wed Feb 22 15:44:58 2017 -0800 mm/bootmem.c: cosmetic improvement of code readability The obvious number of bits in a byte is replaced by BITS_PER_BYTE macro in bootmap_bytes() Link: http://lkml.kernel.org/r/1483781600-5136-1-git-send-email-ondar07@gmail.com Signed-off-by: Adygzhy Ondar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/bootmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46acef048a6568ba490f636db8682a1461ed223c Author: Davidlohr Bueso Date: Wed Feb 22 15:44:55 2017 -0800 mm,compaction: serialize waitqueue_active() checks Without a memory barrier, the following race can occur with a high-order allocation: wakeup_kcompactd(order == 1) kcompactd() [L] waitqueue_active(kcompactd_wait) [S] prepare_to_wait_event(kcompactd_wait) [L] (kcompactd_max_order == 0) [S] kcompactd_max_order = order; schedule() Where the waitqueue_active() check is speculatively re-ordered to before setting the actual condition (max_order), not seeing the threads that's going to block; making us miss a wakeup. There are a couple of options to fix this, including calling wq_has_sleepers() which adds a full barrier, or unconditionally doing the wake_up_interruptible() and serialize on the q->lock. However, to make use of the control dependency, we just need to add L->L guarantees. While this bug is theoretical, there have been other offenders of the lockless waitqueue_active() in the past -- this is also documented in the call itself. Link: http://lkml.kernel.org/r/1483975528-24342-1-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b92df1de5d289c0b5d653e72414bf0850b8511e0 Author: Paul Burton Date: Wed Feb 22 15:44:53 2017 -0800 mm: page_alloc: skip over regions of invalid pfns where possible When using a sparse memory model memmap_init_zone() when invoked with the MEMMAP_EARLY context will skip over pages which aren't valid - ie. which aren't in a populated region of the sparse memory map. However if the memory map is extremely sparse then it can spend a long time linearly checking each PFN in a large non-populated region of the memory map & skipping it in turn. When CONFIG_HAVE_MEMBLOCK_NODE_MAP is enabled, we have sufficient information to quickly discover the next valid PFN given an invalid one by searching through the list of memory regions & skipping forwards to the first PFN covered by the memory region to the right of the non-populated region. Implement this in order to speed up memmap_init_zone() for systems with extremely sparse memory maps. James said "I have tested this patch on a virtual model of a Samurai CPU with a sparse memory map. The kernel boot time drops from 109 to 62 seconds. " Link: http://lkml.kernel.org/r/20161125185518.29885-1-paul.burton@imgtec.com Signed-off-by: Paul Burton Tested-by: James Hartley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 1 + mm/memblock.c | 25 +++++++++++++++++++++++++ mm/page_alloc.c | 11 ++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) commit 7f354a548d1cb6bb01b6ee74aee9264aa152f1ec Author: David Rientjes Date: Wed Feb 22 15:44:50 2017 -0800 mm, compaction: add vmstats for kcompactd work A "compact_daemon_wake" vmstat exists that represents the number of times kcompactd has woken up. This doesn't represent how much work it actually did, though. It's useful to understand how much compaction work is being done by kcompactd versus other methods such as direct compaction and explicitly triggered per-node (or system) compaction. This adds two new vmstats: "compact_daemon_migrate_scanned" and "compact_daemon_free_scanned" to represent the number of pages kcompactd has scanned as part of its migration scanner and freeing scanner, respectively. These values are still accounted for in the general "compact_migrate_scanned" and "compact_free_scanned" for compatibility. It could be argued that explicitly triggered compaction could also be tracked separately, and that could be added if others find it useful. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1612071749390.69852@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vm_event_item.h | 1 + mm/compaction.c | 22 +++++++++++++++++++--- mm/internal.h | 2 ++ mm/vmstat.c | 2 ++ 4 files changed, 24 insertions(+), 3 deletions(-) commit e57b9d8c5ad08ed8cbca7e51fe252719a2845394 Author: Steven Rostedt Date: Wed Feb 22 15:44:47 2017 -0800 mm/mmzone.c: swap likely to unlikely as code logic is different for next_zones_zonelist() Commit 682a3385e773 ("mm, page_alloc: inline the fast path of the zonelist iterator") changed how next_zones_zonelist() is called, by adding a static inline function to do the fast path. This function adds: if (likely(!nodes && zonelist_zone_idx(z) <= highest_zoneidx)) return z; return __next_zones_zonelist(z, highest_zoneidx, nodes); Where __next_zones_zonelist() is only called when nodes is not NULL or zonelist_zone_idx(z) is less than highest_zoneidx. The original next_zone_zonelist() was converted to __next_zones_zonelist() but it still maintained: if (likely(nodes == NULL)) Which is now actually a very unlikely, as it is only called with nodes equal to NULL when zonelist_zone_idx(z) is greater than highest_zoneidx. Before this commit, this if had this statistic: correct incorrect % Function File Line ------- --------- - -------- ---- ---- 837895 446078 34 next_zones_zonelist mmzone.c 63 After this commit, it has: correct incorrect % Function File Line ------- --------- - -------- ---- ---- 10 173840 99 __next_zones_zonelist mmzone.c 63 Thus, the if statement is now much more unlikely than it ever was as a likely. Link: http://lkml.kernel.org/r/20170105200102.77989567@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmzone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 870667553af5e18b2f3402c03f8c4f82381f0ec7 Author: Randy Dunlap Date: Wed Feb 22 15:44:44 2017 -0800 mm: fix filemap.c kernel-doc warnings Fix kernel-doc warnings in mm/filemap.c: mm/filemap.c:993: warning: No description found for parameter '__page' mm/filemap.c:993: warning: Excess function parameter 'page' description in '__lock_page' Link: http://lkml.kernel.org/r/a66fe492-518c-ad6c-5f03-5e8b721fb451@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74d81bfae8e3f52e956367f6ed764db269b87091 Author: Nicholas Piggin Date: Wed Feb 22 15:44:41 2017 -0800 mm: un-export wake_up_page functions These are no longer used outside mm/filemap.c, so un-export them and make them static where possible. These were exported specifically for NFS use in commit a4796e37c12e ("MM: export page_wakeup functions"). Link: http://lkml.kernel.org/r/20170103182234.30141-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin Cc: Trond Myklebust Cc: Anna Schumaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 12 ++---------- mm/filemap.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 12 deletions(-) commit d94e0c05eba9ed627ce467a7c3e92b365269f905 Author: Nicholas Piggin Date: Wed Feb 22 15:44:39 2017 -0800 nfs: no PG_private waiters remain, remove waker Since commit 4f52b6bb8c57 ("NFS: Don't call COMMIT in ->releasepage()"), no tasks wait on PagePrivate. Thus the wake introduced in commit 9590544694be ("NFS: avoid deadlocks with loop-back mounted NFS filesystems.") can be removed. Link: http://lkml.kernel.org/r/20170103182234.30141-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Cc: Trond Myklebust Cc: Anna Schumaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nfs/write.c | 2 -- 1 file changed, 2 deletions(-) commit 93607e5a554a6408a1b56cdd146edc91e5da9983 Author: Michal Hocko Date: Wed Feb 22 15:44:36 2017 -0800 trace-vmscan-postprocess: sync with tracepoints updates Both mm_vmscan_lru_shrink_active and mm_vmscan_lru_isolate have changed so the script needs to be update to reflect those changes Link: http://lkml.kernel.org/r/20170105151737.GU21618@dhcp22.suse.cz Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .../trace/postprocess/trace-vmscan-postprocess.pl | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) commit dcec0b60a8213aeb876823a15d834009fce3b36e Author: Michal Hocko Date: Wed Feb 22 15:44:33 2017 -0800 mm, vmscan: add mm_vmscan_inactive_list_is_low tracepoint Currently we have tracepoints for both active and inactive LRU lists reclaim but we do not have any which would tell us why we we decided to age the active list. Without that it is quite hard to diagnose active/inactive lists balancing. Add mm_vmscan_inactive_list_is_low tracepoint to tell us this information. Link: http://lkml.kernel.org/r/20170104101942.4860-8-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 40 ++++++++++++++++++++++++++++++++++++++++ mm/vmscan.c | 23 ++++++++++++++--------- 2 files changed, 54 insertions(+), 9 deletions(-) commit 5bccd16657e893e52e96547e7c2b5729d78d4e45 Author: Michal Hocko Date: Wed Feb 22 15:44:30 2017 -0800 mm, vmscan: enhance mm_vmscan_lru_shrink_inactive tracepoint mm_vmscan_lru_shrink_inactive will currently report the number of scanned and reclaimed pages. This doesn't give us an idea how the reclaim went except for the overall effectiveness though. Export and show other counters which will tell us why we couldn't reclaim some pages. - nr_dirty, nr_writeback, nr_congested and nr_immediate tells us how many pages are blocked due to IO - nr_activate tells us how many pages were moved to the active list - nr_ref_keep reports how many pages are kept on the LRU due to references (mostly for the file pages which are about to go for another round through the inactive list) - nr_unmap_fail - how many pages failed to unmap All these are rather low level so they might change in future but the tracepoint is already implementation specific so no tools should be depending on its stability. Link: http://lkml.kernel.org/r/20170104101942.4860-7-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 29 ++++++++++++++++++++++++++--- mm/vmscan.c | 14 ++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) commit 3c710c1ad11b4a856a396b181911568f3851a5d8 Author: Michal Hocko Date: Wed Feb 22 15:44:27 2017 -0800 mm, vmscan: extract shrink_page_list reclaim counters into a struct shrink_page_list returns quite some counters back to its caller. Extract the existing 5 into struct reclaim_stat because this makes the code easier to follow and also allows further counters to be returned. While we are at it, make all of them unsigned rather than unsigned long as we do not really need full 64b for them (we never scan more than SWAP_CLUSTER_MAX pages at once). This should reduce some stack space. This patch shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170104101942.4860-6-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 61 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 32b3f2974adca13f8a4a610c396e88c6f81eb10e Author: Michal Hocko Date: Wed Feb 22 15:44:24 2017 -0800 mm, vmscan: show LRU name in mm_vmscan_lru_isolate tracepoint mm_vmscan_lru_isolate currently prints only whether the LRU we isolate from is file or anonymous but we do not know which LRU this is. It is useful to know whether the list is active or inactive, since we are using the same function to isolate pages from both of them and it's hard to distinguish otherwise. Link: http://lkml.kernel.org/r/20170104101942.4860-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Minchan Kim Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/mmflags.h | 8 ++++++++ include/trace/events/vmscan.h | 12 ++++++------ mm/vmscan.c | 3 +-- 3 files changed, 15 insertions(+), 8 deletions(-) commit 1265e3a69f1ea97357536773d48c92a409e01eaf Author: Michal Hocko Date: Wed Feb 22 15:44:21 2017 -0800 mm, vmscan: show the number of skipped pages in mm_vmscan_lru_isolate mm_vmscan_lru_isolate shows the number of requested, scanned and taken pages. This is mostly OK but on 32b systems the number of scanned pages is quite misleading because it includes both the scanned and skipped pages. Moreover the skipped part is scaled based on the number of taken pages. Let's report the exact numbers without any additional logic and add the number of skipped pages. This should make the reported data much more easier to interpret. Link: http://lkml.kernel.org/r/20170104101942.4860-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Minchan Kim Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 8 ++++++-- mm/vmscan.c | 13 +++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) commit 9d998b4f1e39abd69441d29a1ef3250514479267 Author: Michal Hocko Date: Wed Feb 22 15:44:18 2017 -0800 mm, vmscan: add active list aging tracepoint Our reclaim process has several tracepoints to tell us more about how things are progressing. We are, however, missing a tracepoint to track active list aging. Introduce mm_vmscan_lru_shrink_active which reports the number of - nr_taken is number of isolated pages from the active list - nr_referenced pages which tells us that we are hitting referenced pages which are deactivated. If this is a large part of the reported nr_deactivated pages then we might be hitting into the active list too early because they might be still part of the working set. This might help to debug performance issues. - nr_active pages which tells us how many pages are kept on the active list - mostly exec file backed pages. A high number can indicate that we might be trashing on executables. [mhocko@suse.com: update] Link: http://lkml.kernel.org/r/20170104135244.GJ25453@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20170104101942.4860-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Minchan Kim Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 36 ++++++++++++++++++++++++++++++++++++ mm/vmscan.c | 18 ++++++++++++++---- 2 files changed, 50 insertions(+), 4 deletions(-) commit 30b9aed8cd576964bff71a6c5f022ca30ac4c3b7 Author: Michal Hocko Date: Wed Feb 22 15:44:15 2017 -0800 mm, vmscan: remove unused mm_vmscan_memcg_isolate Patch series "vm, vmscan: enahance vmscan tracepoints", v2. While debugging [2] I've realized that there is some room for improvements in the tracepoints set we offer currently. I had hard times to make any conclusion from the existing ones. The resulting problem turned out to be active list aging [3] and we are missing at least two tracepoints to debug such a problem. Some existing tracepoints could export more information to see _why_ the reclaim progress cannot be made not only _how much_ we could reclaim. The later could be seen quite reasonably from the vmstat counters already. It can be argued that we are showing too many implementation details in those tracepoints but I consider them way too lowlevel already to be usable by any kernel independent userspace. I would be _really_ surprised if anything but debugging tools have used them. Any feedback is highly appreciated. [1] http://lkml.kernel.org/r/20161228153032.10821-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/20161215225702.GA27944@boerne.fritz.box [3] http://lkml.kernel.org/r/20161223105157.GB23109@dhcp22.suse.cz This patch (of 8): The trace point is not used since 925b7673cce3 ("mm: make per-memcg LRU lists exclusive") so it can be removed. Link: http://lkml.kernel.org/r/20170104101942.4860-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit 175ad4f1e7a29c8f914254e2e6316c50671e027a Author: Andrea Arcangeli Date: Wed Feb 22 15:44:12 2017 -0800 mm: mprotect: use pmd_trans_unstable instead of taking the pmd_lock pmd_trans_unstable does an atomic read on the pmd so it doesn't require the pmd_lock for the same check. This also removes the special assumption that the mmap_sem is hold for writing if prot_numa is not set. userfaultfd will hold the mmap_sem only for reading in change_pte_range like prot_numa, but it will not set prot_numa. This is always a valid micro-optimization regardless of userfaultfd. [kirill@shutemov.name: drop unneeded pmd_trans_unstable(pmd) check after __split_huge_pmd()] Link: http://lkml.kernel.org/r/20170208120421.GE5578@node.shutemov.name Link: http://lkml.kernel.org/r/20161216144821.5183-43-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mprotect.c | 46 +++++++++++++++------------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) commit 7a0c4cf85b856430af62a907dd65dfc51438d24f Author: Andrea Arcangeli Date: Wed Feb 22 15:44:10 2017 -0800 userfaultfd: selftest: test UFFDIO_ZEROPAGE on all memory types This will verify -EINVAL is returned with hugetlbfs/shmem and it'll do a functional test of UFFDIO_ZEROPAGE on anonymous memory. Link: http://lkml.kernel.org/r/20161216144821.5183-42-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 82 +++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit da5502c0a39b7ba28f403a4b87d1dd690e7829bf Author: Mike Rapoport Date: Wed Feb 22 15:44:06 2017 -0800 userfaultfd: non-cooperative: selftest: add test for FORK, MADVDONTNEED and REMAP events Add test for userfaultfd events used in non-cooperative scenario when the process that monitors the userfaultfd and handles user faults is not the same process that causes the page faults. Link: http://lkml.kernel.org/r/20161216144821.5183-41-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 175 ++++++++++++++++++++++++++++--- 1 file changed, 163 insertions(+), 12 deletions(-) commit aa0d27217477acbc1cfcc4fdaa4de4f3ce545b4e Author: Mike Rapoport Date: Wed Feb 22 15:44:04 2017 -0800 userfaultfd: non-cooperative: selftest: add ufd parameter to copy_page With future addition of event tests, copy_page will be called with different userfault file descriptors Link: http://lkml.kernel.org/r/20161216144821.5183-40-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6228b8f2d15bc9a9b76d6b209a8b760a642fa996 Author: Mike Rapoport Date: Wed Feb 22 15:44:01 2017 -0800 userfaultfd: non-cooperative: selftest: introduce userfaultfd_open userfaultfd_open will be needed by the non cooperative selftest. Link: http://lkml.kernel.org/r/20161216144821.5183-39-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 41 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 47dd924508f5fb10480afc69de04539fa3d14034 Author: Andrea Arcangeli Date: Wed Feb 22 15:43:58 2017 -0800 userfaultfd: hugetlbfs: UFFD_FEATURE_MISSING_SHMEM Userland developers asked to be notified immediately by the UFFDIO_API ioctl if shmem missing mode is supported by userfaultfd in the running kernel. This avoids the need to run UFFDIO_REGISTER on a shmem virtual memory range to find out. Link: http://lkml.kernel.org/r/20161216144821.5183-38-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/userfaultfd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit cb658a453b9327ce96ce5222c24d162b5b65b564 Author: Andrea Arcangeli Date: Wed Feb 22 15:43:55 2017 -0800 userfaultfd: shmem: avoid leaking blocks and used blocks in UFFDIO_COPY If the atomic copy_user fails because of a real dangling userland pointer, we won't go back into the shmem method, so when the method returns it must not leave anything charged up, except the page itself. Link: http://lkml.kernel.org/r/20161216144821.5183-37-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit a425d3584e7e69587aa441e91c7ffce7f47004d7 Author: Andrea Arcangeli Date: Wed Feb 22 15:43:52 2017 -0800 userfaultfd: shmem: avoid a lockup resulting from corrupted page->flags Use the non atomic version of __SetPageUptodate while the page is still private and not visible to lookup operations. Using the non atomic version after the page is already visible to lookups is unsafe as there would be concurrent lock_page operation modifying the page->flags while it runs. This solves a lockup in find_lock_entry with the userfaultfd_shmem selftest. userfaultfd_shm D14296 691 1 0x00000004 Call Trace: schedule+0x3d/0x90 schedule_timeout+0x228/0x420 io_schedule_timeout+0xa4/0x110 __lock_page+0x12d/0x170 find_lock_entry+0xa4/0x190 shmem_getpage_gfp+0xb9/0xc30 shmem_fault+0x70/0x1c0 __do_fault+0x21/0x150 handle_mm_fault+0xec9/0x1490 __do_page_fault+0x20d/0x520 trace_do_page_fault+0x61/0x270 do_async_page_fault+0x19/0x80 async_page_fault+0x25/0x30 Link: http://lkml.kernel.org/r/20170116180408.12184-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Mike Rapoport Acked-by: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9cc90c664a65f9b6b9f3ce1c719f1308539427bd Author: Andrea Arcangeli Date: Wed Feb 22 15:43:49 2017 -0800 userfaultfd: shmem: lock the page before adding it to pagecache A VM_BUG_ON triggered on the shmem selftest. Link: http://lkml.kernel.org/r/20161216144821.5183-36-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 5 +++++ 1 file changed, 5 insertions(+) commit 419624daf0e827452837177c4b983dc0f1b6429f Author: Mike Rapoport Date: Wed Feb 22 15:43:46 2017 -0800 userfaultfd: shmem: add userfaultfd_shmem test The test verifies that anonymous shared mapping can be used with userfault using the existing testing method. The shared memory area is allocated using mmap(..., MAP_SHARED | MAP_ANONYMOUS, ...) and released using madvise(MADV_REMOVE) Link: http://lkml.kernel.org/r/20161216144821.5183-35-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 4 ++++ tools/testing/selftests/vm/run_vmtests | 11 ++++++++++ tools/testing/selftests/vm/userfaultfd.c | 37 ++++++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 2 deletions(-) commit 1c9e8def43a3452e7af658b340f5f4f4ecde5c38 Author: Mike Kravetz Date: Wed Feb 22 15:43:43 2017 -0800 userfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings When userfaultfd hugetlbfs support was originally added, it followed the pattern of anon mappings and did not support any vmas marked VM_SHARED. As such, support was only added for private mappings. Remove this limitation and support shared mappings. The primary functional change required is adding pages to the page cache. More subtle changes are required for huge page reservation handling in error paths. A lengthy comment in the code describes the reservation handling. [mike.kravetz@oracle.com: update] Link: http://lkml.kernel.org/r/c9c8cafe-baa7-05b4-34ea-1dfa5523a85f@oracle.com Link: http://lkml.kernel.org/r/1487195210-12839-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reviewed-by: Andrea Arcangeli Cc: Andrew Morton Cc: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 26 ++++++++++++++++++-- mm/userfaultfd.c | 74 ++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 82 insertions(+), 18 deletions(-) commit cac673292b9b39493bb0ff526b96c83ace6fdcd0 Author: Mike Rapoport Date: Wed Feb 22 15:43:40 2017 -0800 userfaultfd: shmem: allow registration of shared memory ranges Expand the userfaultfd_register/unregister routines to allow shared memory VMAs. Currently, there is no UFFDIO_ZEROPAGE and write-protection support for shared memory VMAs, which is reflected in ioctl methods supported by uffdio_register. Link: http://lkml.kernel.org/r/20161216144821.5183-34-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 21 +++++++-------------- include/uapi/linux/userfaultfd.h | 2 +- tools/testing/selftests/vm/userfaultfd.c | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) commit cfda05267f7bd02b5ae5ac6a37fbbdf3b9c41b57 Author: Mike Rapoport Date: Wed Feb 22 15:43:37 2017 -0800 userfaultfd: shmem: add userfaultfd hook for shared memory faults When processing a page fault in shared memory area for not present page, check the VMA determine if faults are to be handled by userfaultfd. If so, delegate the page fault to handle_userfault. Link: http://lkml.kernel.org/r/20161216144821.5183-33-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 26071cedc519b822f69cc42dba9be969d2cdeb19 Author: Mike Rapoport Date: Wed Feb 22 15:43:34 2017 -0800 userfaultfd: shmem: use shmem_mcopy_atomic_pte for shared memory The shmem_mcopy_atomic_pte implements low lever part of UFFDIO_COPY operation for shared memory VMAs. It's based on mcopy_atomic_pte with adjustments necessary for shared memory pages. Link: http://lkml.kernel.org/r/20161216144821.5183-32-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 95cc09d66f523895635eca8aa1f9bc7419e60e32 Author: Andrea Arcangeli Date: Wed Feb 22 15:43:31 2017 -0800 userfaultfd: shmem: add tlbflush.h header for microblaze It resolves this build error: All errors (new ones prefixed by >>): mm/shmem.c: In function 'shmem_mcopy_atomic_pte': >> mm/shmem.c:2228:2: error: implicit declaration of function 'update_mmu_cache' [-Werror=implicit-function-declaration] update_mmu_cache(dst_vma, dst_addr, dst_pte); microblaze may have to be also updated to define it in asm/pgtable.h like the other archs, then this header inclusion can be removed. Link: http://lkml.kernel.org/r/20161216144821.5183-31-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 ++ 1 file changed, 2 insertions(+) commit b0506e488da5cf2f07f3a4f6d7acaa8f459ad714 Author: Mike Rapoport Date: Wed Feb 22 15:43:28 2017 -0800 userfaultfd: shmem: introduce vma_is_shmem Currently userfault relies on vma_is_anonymous and vma_is_hugetlb to ensure compatibility of a VMA with userfault. Introduction of vma_is_shmem allows detection if tmpfs backed VMAs, so that they may be used with userfaultfd. Current implementation presumes usage of vma_is_shmem only by slow path routines in userfaultfd, therefore the vma_is_shmem is not made inline to leave the few remaining free bits in vm_flags. Link: http://lkml.kernel.org/r/20161216144821.5183-30-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 10 ++++++++++ mm/shmem.c | 5 +++++ 2 files changed, 15 insertions(+) commit 4c27fe4c4c84f3afd504ecff2420cc1ad420d38e Author: Mike Rapoport Date: Wed Feb 22 15:43:25 2017 -0800 userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support shmem_mcopy_atomic_pte is the low level routine that implements the userfaultfd UFFDIO_COPY command. It is based on the existing mcopy_atomic_pte routine with modifications for shared memory pages. Link: http://lkml.kernel.org/r/20161216144821.5183-29-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/shmem_fs.h | 11 +++++ mm/shmem.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) commit ba6907db6de17cf90c4fc67f3eb1d1d37dd0b7ac Author: Mike Rapoport Date: Wed Feb 22 15:43:22 2017 -0800 userfaultfd: introduce vma_can_userfault Check whether a VMA can be used with userfault in more compact way Link: http://lkml.kernel.org/r/20161216144821.5183-28-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Acked-by: Hillf Danton Cc: "Dr. David Alan Gilbert" Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 163e11bc4f6ebbfcfdf751c108bd212a26e492ee Author: Andrea Arcangeli Date: Wed Feb 22 15:43:19 2017 -0800 userfaultfd: hugetlbfs: UFFD_FEATURE_MISSING_HUGETLBFS Userland developers asked to be notified immediately by the UFFDIO_API ioctl if hugetlbfs missing mode is supported by userfaultfd in the running kernel. This avoids the need to run UFFDIO_REGISTER on a hugetlbfs virtual memory range to find out. Link: http://lkml.kernel.org/r/20161216144821.5183-27-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/userfaultfd.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 21205bf8f77b23484966cb057ceaec860cc400b3 Author: Mike Kravetz Date: Wed Feb 22 15:43:16 2017 -0800 userfaultfd: hugetlbfs: reserve count on error in __mcopy_atomic_hugetlb If __mcopy_atomic_hugetlb exits with an error, put_page will be called if a huge page was allocated and needs to be freed. If a reservation was associated with the huge page, the PagePrivate flag will be set. Clear PagePrivate before calling put_page/free_huge_page so that the global reservation count is not incremented. Link: http://lkml.kernel.org/r/20161216144821.5183-26-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 87ffc118b54dcd4cc642723603d944673248152f Author: Andrea Arcangeli Date: Wed Feb 22 15:43:13 2017 -0800 userfaultfd: hugetlbfs: gup: support VM_FAULT_RETRY Add support for VM_FAULT_RETRY to follow_hugetlb_page() so that get_user_pages_unlocked/locked and "nonblocking/FOLL_NOWAIT" features will work on hugetlbfs. This is required for fully functional userfaultfd non-present support on hugetlbfs. Link: http://lkml.kernel.org/r/20161216144821.5183-25-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reviewed-by: Mike Kravetz Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 5 +++-- mm/gup.c | 2 +- mm/hugetlb.c | 48 ++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 44 insertions(+), 11 deletions(-) commit 369cd2121be440543280b91056de187f625d0dbb Author: Mike Kravetz Date: Wed Feb 22 15:43:10 2017 -0800 userfaultfd: hugetlbfs: userfaultfd_huge_must_wait for hugepmd ranges Add routine userfaultfd_huge_must_wait which has the same functionality as the existing userfaultfd_must_wait routine. Only difference is that new routine must handle page table structure for hugepmd vmas. Link: http://lkml.kernel.org/r/20161216144821.5183-24-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) commit 9903bd7b73ef0dec429e951009b36643eb0fe239 Author: Mike Kravetz Date: Wed Feb 22 15:43:07 2017 -0800 userfaultfd: hugetlbfs: add userfaultfd_hugetlb test Test userfaultfd hugetlb functionality by using the existing testing method (in userfaultfd.c). Instead of an anonymous memeory, a hugetlbfs file is mmap'ed private. In this way fallocate hole punch can be used to release pages. This is because madvise(MADV_DONTNEED) is not supported for huge pages. Use the same file, but create wrappers for allocating ranges and releasing pages. Compile userfaultfd.c with HUGETLB_TEST defined to produce an executable to test userfaultfd hugetlb functionality. Link: http://lkml.kernel.org/r/20161216144821.5183-23-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 4 + tools/testing/selftests/vm/run_vmtests | 13 +++ tools/testing/selftests/vm/userfaultfd.c | 161 +++++++++++++++++++++++++++---- 3 files changed, 161 insertions(+), 17 deletions(-) commit cab350afcbc9c8a744e0d164d1c26560568f770b Author: Mike Kravetz Date: Wed Feb 22 15:43:04 2017 -0800 userfaultfd: hugetlbfs: allow registration of ranges containing huge pages Expand the userfaultfd_register/unregister routines to allow VM_HUGETLB vmas. huge page alignment checking is performed after a VM_HUGETLB vma is encountered. Also, since there is no UFFDIO_ZEROPAGE support for huge pages do not return that as a valid ioctl method for huge page ranges. Link: http://lkml.kernel.org/r/20161216144821.5183-22-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 55 ++++++++++++++++++++++++++++++++++++---- include/uapi/linux/userfaultfd.h | 3 +++ 2 files changed, 53 insertions(+), 5 deletions(-) commit 1a1aad8a9b7bd34f60cdf98cd7915f00ae892c45 Author: Mike Kravetz Date: Wed Feb 22 15:43:01 2017 -0800 userfaultfd: hugetlbfs: add userfaultfd hugetlb hook When processing a hugetlb fault for no page present, check the vma to determine if faults are to be handled via userfaultfd. If so, drop the hugetlb_fault_mutex and call handle_userfault(). Link: http://lkml.kernel.org/r/20161216144821.5183-21-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Acked-by: Hillf Danton Cc: "Dr. David Alan Gilbert" Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 810a56b943e265bbabfcd5a8e54cb8d3b16cd6e4 Author: Mike Kravetz Date: Wed Feb 22 15:42:58 2017 -0800 userfaultfd: hugetlbfs: fix __mcopy_atomic_hugetlb retry/error processing The new routine copy_huge_page_from_user() uses kmap_atomic() to map PAGE_SIZE pages. However, this prevents page faults in the subsequent call to copy_from_user(). This is OK in the case where the routine is copied with mmap_sema held. However, in another case we want to allow page faults. So, add a new argument allow_pagefault to indicate if the routine should allow page faults. [dan.carpenter@oracle.com: unmap the correct pointer] Link: http://lkml.kernel.org/r/20170113082608.GA3548@mwanda [akpm@linux-foundation.org: kunmap() takes a page*, per Hugh] Link: http://lkml.kernel.org/r/20161216144821.5183-20-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Signed-off-by: Dan Carpenter Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Cc: Hugh Dickins Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 3 ++- mm/hugetlb.c | 2 +- mm/memory.c | 13 ++++++++++--- mm/userfaultfd.c | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) commit 60d4d2d2b40e44cd36bfb6049e8d9e2055a24f8a Author: Mike Kravetz Date: Wed Feb 22 15:42:55 2017 -0800 userfaultfd: hugetlbfs: add __mcopy_atomic_hugetlb for huge page UFFDIO_COPY __mcopy_atomic_hugetlb performs the UFFDIO_COPY operation for huge pages. It is based on the existing __mcopy_atomic routine for normal pages. Unlike normal pages, there is no huge page support for the UFFDIO_ZEROPAGE operation. Link: http://lkml.kernel.org/r/20161216144821.5183-19-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) commit 8fb5debc5fcd450470cdd789c2d80ef95ebb8cf4 Author: Mike Kravetz Date: Wed Feb 22 15:42:52 2017 -0800 userfaultfd: hugetlbfs: add hugetlb_mcopy_atomic_pte for userfaultfd support hugetlb_mcopy_atomic_pte is the low level routine that implements the userfaultfd UFFDIO_COPY command. It is based on the existing mcopy_atomic_pte routine with modifications for huge pages. Link: http://lkml.kernel.org/r/20161216144821.5183-18-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 7 +++++ mm/hugetlb.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit fa4d75c1de13299c61b5e18a1ae46bc00888b599 Author: Mike Kravetz Date: Wed Feb 22 15:42:49 2017 -0800 userfaultfd: hugetlbfs: add copy_huge_page_from_user for hugetlb userfaultfd support userfaultfd UFFDIO_COPY allows user level code to copy data to a page at fault time. The data is copied from user space to a newly allocated huge page. The new routine copy_huge_page_from_user performs this copy. Link: http://lkml.kernel.org/r/20161216144821.5183-17-aarcange@redhat.com Signed-off-by: Mike Kravetz Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 3 +++ mm/memory.c | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 09fa5296a40d01e014b4851def20b975feb98fd5 Author: Andrea Arcangeli Date: Wed Feb 22 15:42:46 2017 -0800 userfaultfd: non-cooperative: wake userfaults after UFFDIO_UNREGISTER Userfaults may still happen after the userfaultfd monitor thread received a UFFD_EVENT_MADVDONTNEED until UFFDIO_UNREGISTER is run. Wake any pending userfault within UFFDIO_UNREGISTER protected by the mmap_sem for writing, so they will not be reported to userland leading to UFFDIO_COPY returning -EINVAL (as the range was already unregistered) and they will not hang permanently either. Link: http://lkml.kernel.org/r/20161216144821.5183-16-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0594f58dbd954f7747553c041d7cbbf9b6ef1947 Author: Andrea Arcangeli Date: Wed Feb 22 15:42:43 2017 -0800 userfaultfd: non-cooperative: avoid MADV_DONTNEED race condition MADV_DONTNEED must be notified to userland before the pages are zapped. This allows userland to immediately stop adding pages to the userfaultfd ranges before the pages are actually zapped or there could be non-zeropage leftovers as result of concurrent UFFDIO_COPY run in between zap_page_range and madvise_userfault_dontneed (both MADV_DONTNEED and UFFDIO_COPY runs under the mmap_sem for reading, so they can run concurrently). Link: http://lkml.kernel.org/r/20161216144821.5183-15-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05ce77249d5068b057082d24ec22d3824f4816ac Author: Pavel Emelyanov Date: Wed Feb 22 15:42:40 2017 -0800 userfaultfd: non-cooperative: add madvise() event for MADV_DONTNEED request If the page is punched out of the address space the uffd reader should know this and zeromap the respective area in case of the #PF event. Link: http://lkml.kernel.org/r/20161216144821.5183-14-aarcange@redhat.com Signed-off-by: Pavel Emelyanov Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 28 ++++++++++++++++++++++++++++ include/linux/userfaultfd_k.h | 12 ++++++++++++ include/uapi/linux/userfaultfd.h | 10 +++++++++- mm/madvise.c | 2 ++ 4 files changed, 51 insertions(+), 1 deletion(-) commit 90794bf19dc19691a16b71bcd75c04094d9e392d Author: Andrea Arcangeli Date: Wed Feb 22 15:42:37 2017 -0800 userfaultfd: non-cooperative: optimize mremap_userfaultfd_complete() Optimize the mremap_userfaultfd_complete() interface to pass only the vm_userfaultfd_ctx pointer through the stack as a microoptimization. Link: http://lkml.kernel.org/r/20161216144821.5183-13-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Hillf Danton Acked-by: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 4 ++-- include/linux/userfaultfd_k.h | 4 ++-- mm/mremap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 72f87654c69690ff4721bd9b4a39983f971de9a5 Author: Pavel Emelyanov Date: Wed Feb 22 15:42:34 2017 -0800 userfaultfd: non-cooperative: add mremap() event The event denotes that an area [start:end] moves to different location. Length change isn't reported as "new" addresses, if they appear on the uffd reader side they will not contain any data and the latter can just zeromap them. Waiting for the event ACK is also done outside of mmap sem, as for fork event. Link: http://lkml.kernel.org/r/20161216144821.5183-12-aarcange@redhat.com Signed-off-by: Pavel Emelyanov Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/userfaultfd_k.h | 17 +++++++++++++++++ include/uapi/linux/userfaultfd.h | 11 ++++++++++- mm/mremap.c | 17 ++++++++++++----- 4 files changed, 76 insertions(+), 6 deletions(-) commit d3aadc8ed4cb447981ecf34f9af71cddc6cf907d Author: Mike Rapoport Date: Wed Feb 22 15:42:30 2017 -0800 userfaultfd: non-cooperative: dup_userfaultfd: use mm_count instead of mm_users Since commit d2005e3f41d4 ("userfaultfd: don't pin the user memory in userfaultfd_file_create()") userfaultfd uses mm_count rather than mm_users to pin mm_struct. Make dup_userfaultfd consistent with this behaviour Link: http://lkml.kernel.org/r/20161216144821.5183-11-aarcange@redhat.com Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 893e26e61d04eac974ded0c11e1647b335c8cb7b Author: Pavel Emelyanov Date: Wed Feb 22 15:42:27 2017 -0800 userfaultfd: non-cooperative: Add fork() event When the mm with uffd-ed vmas fork()-s the respective vmas notify their uffds with the event which contains a descriptor with new uffd. This new descriptor can then be used to get events from the child and populate its mm with data. Note, that there can be different uffd-s controlling different vmas within one mm, so first we should collect all those uffds (and ctx-s) in a list and then notify them all one by one but only once per fork(). The context is created at fork() time but the descriptor, file struct and anon inode object is created at event read time. So some trickery is added to the userfaultfd_ctx_read() to handle the ctx queues' locking vs file creation. Another thing worth noticing is that the task that fork()-s waits for the uffd event to get processed WITHOUT the mmap sem. [aarcange@redhat.com: build warning fix] Link: http://lkml.kernel.org/r/20161216144821.5183-10-aarcange@redhat.com Link: http://lkml.kernel.org/r/20161216144821.5183-9-aarcange@redhat.com Signed-off-by: Pavel Emelyanov Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 148 ++++++++++++++++++++++++++++++++++++++- include/linux/userfaultfd_k.h | 13 ++++ include/uapi/linux/userfaultfd.h | 15 ++-- kernel/fork.c | 10 ++- 4 files changed, 170 insertions(+), 16 deletions(-) commit 656031445d5a855e1c13b291dedae32579d0f3f2 Author: Andrea Arcangeli Date: Wed Feb 22 15:42:24 2017 -0800 userfaultfd: non-cooperative: report all available features to userland This will allow userland to probe all features available in the kernel. It will however only enable the requested features in the open userfaultfd context. Link: http://lkml.kernel.org/r/20161216144821.5183-8-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9cd75c3cd4c3d06aa0c4ed8ef5327d811a8b6cff Author: Pavel Emelyanov Date: Wed Feb 22 15:42:21 2017 -0800 userfaultfd: non-cooperative: add ability to report non-PF events from uffd descriptor The custom events are queued in ctx->event_wqh not to disturb the fast-path-ed PF queue-wait-wakeup functions. The events to be generated (other than PF-s) are requested in UFFD_API ioctl with the uffd_api.features bits. Those, known by the kernel, are then turned on and reported back to the user-space. Link: http://lkml.kernel.org/r/20161216144821.5183-7-aarcange@redhat.com Signed-off-by: Pavel Emelyanov Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 2 deletions(-) commit 6dcc27fd39437f77057322cf314cc545bf0e4863 Author: Pavel Emelyanov Date: Wed Feb 22 15:42:18 2017 -0800 userfaultfd: non-cooperative: Split the find_userfault() routine I will need one to lookup for userfaultfd_wait_queue-s in different wait queue Link: http://lkml.kernel.org/r/20161216144821.5183-6-aarcange@redhat.com Signed-off-by: Pavel Emelyanov Signed-off-by: Mike Rapoport Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit a94720bf821dd63e72176da5f423ba7935dde67d Author: Andrea Arcangeli Date: Wed Feb 22 15:42:15 2017 -0800 userfaultfd: use vma_is_anonymous Cleanup the vma->vm_ops usage. Side note: it would be more robust if vma_is_anonymous() would also check that vm_flags hasn't VM_PFNMAP set. Link: http://lkml.kernel.org/r/20161216144821.5183-5-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 8 ++++---- mm/userfaultfd.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 8474901a33d8a27958bfa99e78736863abd67874 Author: Andrea Arcangeli Date: Wed Feb 22 15:42:12 2017 -0800 userfaultfd: convert BUG() to WARN_ON_ONCE() Avoid BUG_ON()s and only WARN instead. This is just a cleanup, it can't make any runtime difference. This BUG_ON has never triggered and cannot trigger. Link: http://lkml.kernel.org/r/20161216144821.5183-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4605a61d642fe9b9de050d356432ecac82cc701 Author: Andrea Arcangeli Date: Wed Feb 22 15:42:09 2017 -0800 userfaultfd: correct comment about UFFD_FEATURE_PAGEFAULT_FLAG_WP Minor comment correction. Link: http://lkml.kernel.org/r/20161216144821.5183-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e067eba5871c6922539dc1728699c14e6b22590f Author: Andrea Arcangeli Date: Wed Feb 22 15:42:06 2017 -0800 userfaultfd: document _IOR/_IOW Patch series "userfaultfd tmpfs/hugetlbfs/non-cooperative", v2 These userfaultfd features are finished and are ready for larger exposure in -mm and upstream merging. 1) tmpfs non present userfault 2) hugetlbfs non present userfault 3) non cooperative userfault for fork/madvise/mremap qemu development code is already exercising 2) and container postcopy live migration needs 3). 1) is not currently used but there's a self test and we know some qemu user for various reasons uses tmpfs as backing for KVM so it'll need it too to use postcopy live migration with tmpfs memory. All review feedback from the previous submit has been handled and the fixes are included. There's no outstanding issue AFIK. Upstream code just did a s/fe/vmf/ conversion in the page faults and this has been converted as well incrementally. In addition to the previous submits, this also wakes up stuck userfaults during UFFDIO_UNREGISTER. The non cooperative testcase actually reproduced this problem by getting stuck instead of quitting clean in some rare case as it could call UFFDIO_UNREGISTER while some userfault could be still in flight. The other option would have been to keep leaving it up to userland to serialize itself and to patch the testcase instead but the wakeup during unregister I think is preferable. David also asked the UFFD_FEATURE_MISSING_HUGETLBFS and UFFD_FEATURE_MISSING_SHMEM feature flags to be added so QEMU can avoid to probe if the hugetlbfs/shmem missing support is available by calling UFFDIO_REGISTER. QEMU already checks HUGETLBFS_MAGIC with fstatfs so if UFFD_FEATURE_MISSING_HUGETLBFS is also set, it knows UFFDIO_REGISTER will succeed (or if it fails, it's for some other more concerning reason). There's no reason to worry about adding too many feature flags. There are 64 available and worst case we've to bump the API if someday we're really going to run out of them. The round-trip network latency of hugetlbfs userfaults during postcopy live migration is still of the order of dozen milliseconds on 10GBit if at 2MB hugepage granularity so it's working perfectly and it should provide for higher bandwidth or lower CPU usage (which makes it interesting to add an option in the future to support THP granularity too for anonymous memory, UFFDIO_COPY would then have to create THP if alignment/len allows for it). 1GB hugetlbfs granularity will require big changes in hugetlbfs to work so it's deferred for later. This patch (of 42): This adds proper documentation (inline) to avoid the risk of further misunderstandings about the semantics of _IOW/_IOR and it also reminds whoever will bump the UFFDIO_API in the future, to change the two ioctl to _IOW. This was found while implementing strace support for those ioctl, otherwise we could have never found it by just reviewing kernel code and testing it. _IOC_READ or _IOC_WRITE alters nothing but the ioctl number itself, so it's only worth fixing if the UFFDIO_API is bumped someday. Link: http://lkml.kernel.org/r/20161216144821.5183-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: "Dmitry V. Levin" Cc: Michael Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Pavel Emelyanov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/asm-generic/ioctl.h | 10 +++++++++- include/uapi/linux/userfaultfd.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 65190cff3cc108b72e42cce67ed8b73dbad6b731 Author: Michal Hocko Date: Wed Feb 22 15:42:03 2017 -0800 oom, trace: add compaction retry tracepoint Higher order requests oom debugging is currently quite hard. We do have some compaction points which can tell us how the compaction is operating but there is no trace point to tell us about compaction retry logic. This patch adds a one which will have the following format bash-3126 [001] .... 1498.220001: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=withdrawn retries=0 max_retries=16 should_retry=0 we can see that the order 9 request is not retried even though we are in the highest compaction priority mode becase the last compaction attempt was withdrawn. This means that compaction_zonelist_suitable must have returned false and there is no suitable zone to compact for this request and so no need to retry further. another example would be <...>-3137 [001] .... 81.501689: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=failed retries=0 max_retries=16 should_retry=0 in this case the order-9 compaction failed to find any suitable block. We do not retry anymore because this is a costly request and those do not go below COMPACT_PRIO_SYNC_LIGHT priority. Link: http://lkml.kernel.org/r/20161220130135.15719-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/mmflags.h | 26 ++++++++++++++++++++++++++ include/trace/events/oom.h | 39 +++++++++++++++++++++++++++++++++++++++ mm/page_alloc.c | 22 ++++++++++++++++------ 3 files changed, 81 insertions(+), 6 deletions(-) commit d379f01de09570e06d84b4b09e5f4951821a1dc8 Author: Michal Hocko Date: Wed Feb 22 15:42:00 2017 -0800 oom, trace: add oom detection tracepoints should_reclaim_retry is the central decision point for declaring the OOM. It might be really useful to expose data used for this decision making when debugging an unexpected oom situations. Say we have an OOM report: [ 52.264001] mem_eater invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=0, order=0, oom_score_adj=0 [ 52.267549] CPU: 3 PID: 3148 Comm: mem_eater Tainted: G W 4.8.0-oomtrace3-00006-gb21338b386d2 #1024 Now we can check the tracepoint data to see how we have ended up in this situation: mem_eater-3148 [003] .... 52.432801: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11134 min_wmark=11084 no_progress_loops=1 wmark_check=1 mem_eater-3148 [003] .... 52.433269: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11103 min_wmark=11084 no_progress_loops=1 wmark_check=1 mem_eater-3148 [003] .... 52.433712: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11100 min_wmark=11084 no_progress_loops=2 wmark_check=1 mem_eater-3148 [003] .... 52.434067: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11097 min_wmark=11084 no_progress_loops=3 wmark_check=1 mem_eater-3148 [003] .... 52.434414: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11094 min_wmark=11084 no_progress_loops=4 wmark_check=1 mem_eater-3148 [003] .... 52.434761: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11091 min_wmark=11084 no_progress_loops=5 wmark_check=1 mem_eater-3148 [003] .... 52.435108: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11087 min_wmark=11084 no_progress_loops=6 wmark_check=1 mem_eater-3148 [003] .... 52.435478: reclaim_retry_zone: node=0 zone=DMA32 order=0 reclaimable=51 available=11084 min_wmark=11084 no_progress_loops=7 wmark_check=0 mem_eater-3148 [003] .... 52.435478: reclaim_retry_zone: node=0 zone=DMA order=0 reclaimable=0 available=1126 min_wmark=179 no_progress_loops=7 wmark_check=0 The above shows that we can quickly deduce that the reclaim stopped making any progress (see no_progress_loops increased in each round) and while there were still some 51 reclaimable pages they couldn't be dropped for some reason (vmscan trace points would tell us more about that part). available will represent reclaimable + free_pages scaled down per no_progress_loops factor. This is essentially an optimistic estimate of how much memory we would have when reclaiming everything. This can be compared to min_wmark to get a rought idea but the wmark_check tells the result of the watermark check which is more precise (includes lowmem reserves, considers the order etc.). As we can see no zone is eligible in the end and that is why we have triggered the oom in this situation. Please note that higher order requests might fail on the wmark_check even when there is much more memory available than min_wmark - e.g. when the memory is fragmented. A follow up tracepoint will help to debug those situations. Link: http://lkml.kernel.org/r/20161220130135.15719-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/oom.h | 42 ++++++++++++++++++++++++++++++++++++++++++ mm/page_alloc.c | 10 ++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) commit aff28015fe5396b7f2bf7f55863949d391eb75fb Author: Michal Hocko Date: Wed Feb 22 15:41:57 2017 -0800 mm, trace: extract COMPACTION_STATUS and ZONE_TYPE to a common header COMPACTION_STATUS resp. ZONE_TYPE are currently used to translate enum compact_result resp. struct zone index into their symbolic names for an easier post processing. The follow up patch would like to reuse this as well. The code involves some preprocessor black magic which is better not duplicated elsewhere so move it to a common mm tracing relate header. Link: http://lkml.kernel.org/r/20161220130135.15719-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/compaction.h | 60 ++---------------------------------- include/trace/events/mmflags.h | 64 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 57 deletions(-) commit 4583e77310a2edf39ee91099fba3cd153a22a77b Author: Geliang Tang Date: Wed Feb 22 15:41:54 2017 -0800 mm/vmalloc.c: use rb_entry_safe Use rb_entry_safe() instead of open-coding it. Link: http://lkml.kernel.org/r/81bb9820e5b9e4a1c596b3e76f88abf8c4a76cb0.1482221947.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13ad59df67f19788f6c22985b1a33e466eceb643 Author: Vlastimil Babka Date: Wed Feb 22 15:41:51 2017 -0800 mm, page_alloc: avoid page_to_pfn() when merging buddies On architectures that allow memory holes, page_is_buddy() has to perform page_to_pfn() to check for the memory hole. After the previous patch, we have the pfn already available in __free_one_page(), which is the only caller of page_is_buddy(), so move the check there and avoid page_to_pfn(). Link: http://lkml.kernel.org/r/20161216120009.20064-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Joonsoo Kim Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 +++++----- mm/page_isolation.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 76741e776a37973a3e398d504069b3e55c5cc866 Author: Vlastimil Babka Date: Wed Feb 22 15:41:48 2017 -0800 mm, page_alloc: don't convert pfn to idx when merging In __free_one_page() we do the buddy merging arithmetics on "page/buddy index", which is just the lower MAX_ORDER bits of pfn. The operations we do that affect the higher bits are bitwise AND and subtraction (in that order), where the final result will be the same with the higher bits left unmasked, as long as these bits are equal for both buddies - which must be true by the definition of a buddy. We can therefore use pfn's directly instead of "index" and skip the zeroing of >MAX_ORDER bits. This can help a bit by itself, although compiler might be smart enough already. It also helps the next patch to avoid page_to_pfn() for memory hole checks. Link: http://lkml.kernel.org/r/20161216120009.20064-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Joonsoo Kim Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 4 ++-- mm/page_alloc.c | 31 ++++++++++++++----------------- mm/page_isolation.c | 8 ++++---- 3 files changed, 20 insertions(+), 23 deletions(-) commit aa187507ef8bb3178a3312d851e8485bd81913c9 Author: Michal Hocko Date: Wed Feb 22 15:41:45 2017 -0800 mm: throttle show_mem() from warn_alloc() Tetsuo has been stressing OOM killer path with many parallel allocation requests when he has noticed that it is not all that hard to swamp kernel logs with warn_alloc messages caused by allocation stalls. Even though the allocation stall message is triggered only once in 10s there might be many different tasks hitting it roughly around the same time. A big part of the output is show_mem() which can generate a lot of output even on a small machines. There is no reason to show the state of memory counter for each allocation stall, especially when multiple of them are reported in a short time period. Chances are that not much has changed since the last report. This patch simply rate limits show_mem called from warn_alloc to only dump something once per second. This should be enough to give us a clue why an allocation might be stalling while burst of warnings will not swamp log with too much data. While we are at it, extract all the show_mem related handling (filters) into a separate function warn_alloc_show_mem. This will make the code cleaner and as a bonus point we can distinguish which part of warn_alloc got throttled due to rate limiting as ___ratelimit dumps the caller. [akpm@linux-foundation.org: reduce scope of the ratelimit_states] Link: http://lkml.kernel.org/r/20161215101510.9030-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit f8005451d75f4879a93b12c14b162dd60f81ec56 Author: Hugh Dickins Date: Wed Feb 22 15:41:42 2017 -0800 tmpfs: change shmem_mapping() to test shmem_aops Callers of shmem_mapping() are interested in whether the mapping is swap backed - except for uprobes, which is interested in whether it should use shmem_read_mapping_page(). All these callers are better served by a shmem_mapping() which checks for shmem_aops, than the current version which goes through several indirections to find where the inode lives - and has the surprising effect that a private mmap of /dev/zero satisfies both vma_is_anonymous() and shmem_mapping(), when that device node is on devtmpfs. I don't think anything in the tree suffers from that surprise, but it caught me out, and is better fixed. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1612052148530.13021@eggly.anvils Signed-off-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Oleg Nesterov Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1663f26df3df7df3720306ca67f5ea8296d68fa1 Author: Tejun Heo Date: Wed Feb 22 15:41:39 2017 -0800 slub: make sysfs directories for memcg sub-caches optional SLUB creates a per-cache directory under /sys/kernel/slab which hosts a bunch of debug files. Usually, there aren't that many caches on a system and this doesn't really matter; however, if memcg is in use, each cache can have per-cgroup sub-caches. SLUB creates the same directories for these sub-caches under /sys/kernel/slab/$CACHE/cgroup. Unfortunately, because there can be a lot of cgroups, active or draining, the product of the numbers of caches, cgroups and files in each directory can reach a very high number - hundreds of thousands is commonplace. Millions and beyond aren't difficult to reach either. What's under /sys/kernel/slab is primarily for debugging and the information and control on the a root cache already cover its sub-caches. While having a separate directory for each sub-cache can be helpful for development, it doesn't make much sense to pay this amount of overhead by default. This patch introduces a boot parameter slub_memcg_sysfs which determines whether to create sysfs directories for per-memcg sub-caches. It also adds CONFIG_SLUB_MEMCG_SYSFS_ON which determines the boot parameter's default value and defaults to 0. [akpm@linux-foundation.org: kset_unregister(NULL) is legal] Link: http://lkml.kernel.org/r/20170204145203.GB26958@mtj.duckdns.org Signed-off-by: Tejun Heo Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ init/Kconfig | 14 +++++++++++++ mm/slub.c | 26 +++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) commit 17cc4dfeda97636d67e83de8cd41940b65a93bc7 Author: Tejun Heo Date: Wed Feb 22 15:41:36 2017 -0800 slab: use memcg_kmem_cache_wq for slab destruction operations If there's contention on slab_mutex, queueing the per-cache destruction work item on the system_wq can unnecessarily create and tie up a lot of kworkers. Rename memcg_kmem_cache_create_wq to memcg_kmem_cache_wq and make it global and use that workqueue for the destruction work items too. While at it, convert the workqueue from an unbound workqueue to a per-cpu one with concurrency limited to 1. It's generally preferable to use per-cpu workqueues and concurrency limit of 1 is safe enough. This is suggested by Joonsoo Kim. Link: http://lkml.kernel.org/r/20170117235411.9408-11-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 1 + mm/memcontrol.c | 16 ++++++++-------- mm/slab_common.c | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) commit 50862ce711b3e9cf8511df7a356892e128b037d3 Author: Tejun Heo Date: Wed Feb 22 15:41:33 2017 -0800 slab: remove slub sysfs interface files early for empty memcg caches With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. Each cache has a number of sysfs interface files under /sys/kernel/slab. On a system with a lot of memory and transient memcgs, the number of interface files which have to be removed once memory reclaim kicks in can reach millions. Link: http://lkml.kernel.org/r/20170117235411.9408-10-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 01fb58bcba63f8fba37581c24c99e9a515dd0335 Author: Tejun Heo Date: Wed Feb 22 15:41:30 2017 -0800 slab: remove synchronous synchronize_sched() from memcg cache deactivation path With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. slub uses synchronize_sched() to deactivate a memcg cache. synchronize_sched() is an expensive and slow operation and doesn't scale when a huge number of caches are destroyed back-to-back. While there used to be a simple batching mechanism, the batching was too restricted to be helpful. This patch implements slab_deactivate_memcg_cache_rcu_sched() which slub can use to schedule sched RCU callback instead of performing synchronize_sched() synchronously while holding cgroup_mutex. While this adds online cpus, mems and slab_mutex operations, operating on these locks back-to-back from the same kworker, which is what's gonna happen when there are many to deactivate, isn't expensive at all and this gets rid of the scalability problem completely. Link: http://lkml.kernel.org/r/20170117235411.9408-9-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 6 ++++++ mm/slab.h | 2 ++ mm/slab_common.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/slub.c | 12 +++++++---- 4 files changed, 76 insertions(+), 4 deletions(-) commit c9fc586403e7c85eee06b2d5dea14ce71c00fcd8 Author: Tejun Heo Date: Wed Feb 22 15:41:27 2017 -0800 slab: introduce __kmemcg_cache_deactivate() __kmem_cache_shrink() is called with %true @deactivate only for memcg caches. Remove @deactivate from __kmem_cache_shrink() and introduce __kmemcg_cache_deactivate() instead. Each memcg-supporting allocator should implement it and it should deactivate and drain the cache. This is to allow memcg cache deactivation behavior to further deviate from simple shrinking without messing up __kmem_cache_shrink(). This is pure reorganization and doesn't introduce any observable behavior changes. v2: Dropped unnecessary ifdef in mm/slab.h as suggested by Vladimir. Link: http://lkml.kernel.org/r/20170117235411.9408-8-tj@kernel.org Signed-off-by: Tejun Heo Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 11 +++++++++-- mm/slab.h | 3 ++- mm/slab_common.c | 4 ++-- mm/slob.c | 2 +- mm/slub.c | 39 ++++++++++++++++++++++----------------- 5 files changed, 36 insertions(+), 23 deletions(-) commit 510ded33e075c2bd662b1efab0110f4240325fc9 Author: Tejun Heo Date: Wed Feb 22 15:41:24 2017 -0800 slab: implement slab_root_caches list With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. slab_caches currently lists all caches including root and memcg ones. This is the only data structure which lists the root caches and iterating root caches can only be done by walking the list while skipping over memcg caches. As there can be a huge number of memcg caches, this can become very expensive. This also can make /proc/slabinfo behave very badly. seq_file processes reads in 4k chunks and seeks to the previous Nth position on slab_caches list to resume after each chunk. With a lot of memcg cache churns on the list, reading /proc/slabinfo can become very slow and its content often ends up with duplicate and/or missing entries. This patch adds a new list slab_root_caches which lists only the root caches. When memcg is not enabled, it becomes just an alias of slab_caches. memcg specific list operations are collected into memcg_[un]link_cache(). Link: http://lkml.kernel.org/r/20170117235411.9408-7-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 3 +++ mm/slab.h | 15 +++++++++++++ mm/slab_common.c | 59 ++++++++++++++++++++++++++++++---------------------- mm/slub.c | 1 + 4 files changed, 53 insertions(+), 25 deletions(-) commit bc2791f857e1984b7548d2a2de2ffb1a913dee62 Author: Tejun Heo Date: Wed Feb 22 15:41:21 2017 -0800 slab: link memcg kmem_caches on their associated memory cgroup With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. While a memcg kmem_cache is listed on its root cache's ->children list, there is no direct way to iterate all kmem_caches which are assocaited with a memory cgroup. The only way to iterate them is walking all caches while filtering out caches which don't match, which would be most of them. This makes memcg destruction operations O(N^2) where N is the total number of slab caches which can be huge. This combined with the synchronous RCU operations can tie up a CPU and affect the whole machine for many hours when memory reclaim triggers offlining and destruction of the stale memcgs. This patch adds mem_cgroup->kmem_caches list which goes through memcg_cache_params->kmem_caches_node of all kmem_caches which are associated with the memcg. All memcg specific iterations, including stat file access, are updated to use the new list instead. Link: http://lkml.kernel.org/r/20170117235411.9408-6-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 1 + include/linux/slab.h | 3 +++ mm/memcontrol.c | 7 ++++--- mm/slab.h | 3 +++ mm/slab_common.c | 36 +++++++++++++++++++++++++++++------- 5 files changed, 40 insertions(+), 10 deletions(-) commit 9eeadc8b6e0e31f9aea1f8886ef472f62c2b7f55 Author: Tejun Heo Date: Wed Feb 22 15:41:17 2017 -0800 slab: reorganize memcg_cache_params We're going to change how memcg caches are iterated. In preparation, clean up and reorganize memcg_cache_params. * The shared ->list is replaced by ->children in root and ->children_node in children. * ->is_root_cache is removed. Instead ->root_cache is moved out of the child union and now used by both root and children. NULL indicates root cache. Non-NULL a memcg one. This patch doesn't cause any observable behavior changes. Link: http://lkml.kernel.org/r/20170117235411.9408-5-tj@kernel.org Signed-off-by: Tejun Heo Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 33 ++++++++++++++++++++++++--------- mm/slab.h | 6 +++--- mm/slab_common.c | 25 +++++++++++++------------ 3 files changed, 40 insertions(+), 24 deletions(-) commit 657dc2f9722092e951de95a8109428994541440b Author: Tejun Heo Date: Wed Feb 22 15:41:14 2017 -0800 slab: remove synchronous rcu_barrier() call in memcg cache release path With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. SLAB_DESTORY_BY_RCU caches need to flush all RCU operations before destruction because slab pages are freed through RCU and they need to be able to dereference the associated kmem_cache. Currently, it's done synchronously with rcu_barrier(). As rcu_barrier() is expensive time-wise, slab implements a batching mechanism so that rcu_barrier() can be done for multiple caches at the same time. Unfortunately, the rcu_barrier() is in synchronous path which is called while holding cgroup_mutex and the batching is too limited to be actually helpful. This patch updates the cache release path so that the batching is asynchronous and global. All SLAB_DESTORY_BY_RCU caches are queued globally and a work item consumes the list. The work item calls rcu_barrier() only once for all caches that are currently queued. * release_caches() is removed and shutdown_cache() now either directly release the cache or schedules a RCU callback to do that. This makes the cache inaccessible once shutdown_cache() is called and makes it impossible for shutdown_memcg_caches() to do memcg-specific cleanups afterwards. Move memcg-specific part into a helper, unlink_memcg_cache(), and make shutdown_cache() call it directly. Link: http://lkml.kernel.org/r/20170117235411.9408-4-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 102 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 42 deletions(-) commit bf5eb3de3847ebcfd1fea7bc14072ef9f21d4e8d Author: Tejun Heo Date: Wed Feb 22 15:41:11 2017 -0800 slub: separate out sysfs_slab_release() from sysfs_slab_remove() Separate out slub sysfs removal and release, and call the former earlier from __kmem_cache_shutdown(). There's no reason to defer sysfs removal through RCU and this will later allow us to remove sysfs files way earlier during memory cgroup offline instead of release. Link: http://lkml.kernel.org/r/20170117235411.9408-3-tj@kernel.org Signed-off-by: Tejun Heo Acked-by: Vladimir Davydov 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 ++-- mm/slab_common.c | 2 +- mm/slub.c | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) commit 290b6a58b78be709e734d7fbeb1aa0416d9d41bc Author: Tejun Heo Date: Wed Feb 22 15:41:08 2017 -0800 Revert "slub: move synchronize_sched out of slab_mutex on shrink" Patch series "slab: make memcg slab destruction scalable", v3. With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. I've seen machines which end up with hundred thousands of caches and many millions of kernfs_nodes. The current code is O(N^2) on the total number of caches and has synchronous rcu_barrier() and synchronize_sched() in cgroup offline / release path which is executed while holding cgroup_mutex. Combined, this leads to very expensive and slow cache destruction operations which can easily keep running for half a day. This also messes up /proc/slabinfo along with other cache iterating operations. seq_file operates on 4k chunks and on each 4k boundary tries to seek to the last position in the list. With a huge number of caches on the list, this becomes very slow and very prone to the list content changing underneath it leading to a lot of missing and/or duplicate entries. This patchset addresses the scalability problem. * Add root and per-memcg lists. Update each user to use the appropriate list. * Make rcu_barrier() for SLAB_DESTROY_BY_RCU caches globally batched and asynchronous. * For dying empty slub caches, remove the sysfs files after deactivation so that we don't end up with millions of sysfs files without any useful information on them. This patchset contains the following nine patches. 0001-Revert-slub-move-synchronize_sched-out-of-slab_mutex.patch 0002-slub-separate-out-sysfs_slab_release-from-sysfs_slab.patch 0003-slab-remove-synchronous-rcu_barrier-call-in-memcg-ca.patch 0004-slab-reorganize-memcg_cache_params.patch 0005-slab-link-memcg-kmem_caches-on-their-associated-memo.patch 0006-slab-implement-slab_root_caches-list.patch 0007-slab-introduce-__kmemcg_cache_deactivate.patch 0008-slab-remove-synchronous-synchronize_sched-from-memcg.patch 0009-slab-remove-slub-sysfs-interface-files-early-for-emp.patch 0010-slab-use-memcg_kmem_cache_wq-for-slab-destruction-op.patch 0001 reverts an existing optimization to prepare for the following changes. 0002 is a prep patch. 0003 makes rcu_barrier() in release path batched and asynchronous. 0004-0006 separate out the lists. 0007-0008 replace synchronize_sched() in slub destruction path with call_rcu_sched(). 0009 removes sysfs files early for empty dying caches. 0010 makes destruction work items use a workqueue with limited concurrency. This patch (of 10): Revert 89e364db71fb5e ("slub: move synchronize_sched out of slab_mutex on shrink"). With kmem cgroup support enabled, kmem_caches can be created and destroyed frequently and a great number of near empty kmem_caches can accumulate if there are a lot of transient cgroups and the system is not under memory pressure. When memory reclaim starts under such conditions, it can lead to consecutive deactivation and destruction of many kmem_caches, easily hundreds of thousands on moderately large systems, exposing scalability issues in the current slab management code. This is one of the patches to address the issue. Moving synchronize_sched() out of slab_mutex isn't enough as it's still inside cgroup_mutex. The whole deactivation / release path will be updated to avoid all synchronous RCU operations. Revert this insufficient optimization in preparation to ease future changes. Link: http://lkml.kernel.org/r/20170117235411.9408-2-tj@kernel.org Signed-off-by: Tejun Heo Reported-by: Jay Vana Cc: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 4 ++-- mm/slab.h | 2 +- mm/slab_common.c | 27 ++------------------------- mm/slob.c | 2 +- mm/slub.c | 19 +++++++++++++++++-- 5 files changed, 23 insertions(+), 31 deletions(-) commit af3b5f8764a270165195d8b9520d913a268c0062 Author: Vlastimil Babka Date: Wed Feb 22 15:41:05 2017 -0800 mm, slab: rename kmalloc-node cache to kmalloc- SLAB as part of its bootstrap pre-creates one kmalloc cache that can fit the kmem_cache_node management structure, and puts it into the generic kmalloc cache array (e.g. for 128b objects). The name of this cache is "kmalloc-node", which is confusing for readers of /proc/slabinfo as the cache is used for generic allocations (and not just the kmem_cache_node struct) and it appears as the kmalloc-128 cache is missing. An easy solution is to use the kmalloc- name when pre-creating the cache, which we can get from the kmalloc_info array. Example /proc/slabinfo before the patch: ... kmalloc-256 1647 1984 256 16 1 : tunables 120 60 8 : slabdata 124 124 828 kmalloc-192 1974 1974 192 21 1 : tunables 120 60 8 : slabdata 94 94 133 kmalloc-96 1332 1344 128 32 1 : tunables 120 60 8 : slabdata 42 42 219 kmalloc-64 2505 5952 64 64 1 : tunables 120 60 8 : slabdata 93 93 715 kmalloc-32 4278 4464 32 124 1 : tunables 120 60 8 : slabdata 36 36 346 kmalloc-node 1352 1376 128 32 1 : tunables 120 60 8 : slabdata 43 43 53 kmem_cache 132 147 192 21 1 : tunables 120 60 8 : slabdata 7 7 0 After the patch: ... kmalloc-256 1672 2160 256 16 1 : tunables 120 60 8 : slabdata 135 135 807 kmalloc-192 1992 2016 192 21 1 : tunables 120 60 8 : slabdata 96 96 203 kmalloc-96 1159 1184 128 32 1 : tunables 120 60 8 : slabdata 37 37 116 kmalloc-64 2561 4864 64 64 1 : tunables 120 60 8 : slabdata 76 76 785 kmalloc-32 4253 4340 32 124 1 : tunables 120 60 8 : slabdata 35 35 270 kmalloc-128 1256 1280 128 32 1 : tunables 120 60 8 : slabdata 40 40 39 kmem_cache 125 147 192 21 1 : tunables 120 60 8 : slabdata 7 7 0 [vbabka@suse.cz: export the whole kmalloc_info structure instead of just a name accessor, per Christoph Lameter] Link: http://lkml.kernel.org/r/54e80303-b814-4232-66d4-95b34d3eb9d0@suse.cz Link: http://lkml.kernel.org/r/20170203181008.24898-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Matthew Wilcox Cc: Joonsoo Kim Cc: David Rientjes Cc: Pekka Enberg Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 3 ++- mm/slab.h | 6 ++++++ mm/slab_common.c | 5 +---- 3 files changed, 9 insertions(+), 5 deletions(-) commit 65b9de75253e909e35d8f5c42357e632fdca5d7f Author: Borislav Petkov Date: Wed Feb 22 15:41:02 2017 -0800 mm/slub: add a dump_stack() to the unexpected GFP check We wish to know who is doing such a thing. slab.c does this. Link: http://lkml.kernel.org/r/20170116091643.15260-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 1 + 1 file changed, 1 insertion(+) commit c6e28895a4372992961888ffaadc9efc643b5bfe Author: Grygorii Maistrenko Date: Wed Feb 22 15:40:59 2017 -0800 slub: do not merge cache if slub_debug contains a never-merge flag In case CONFIG_SLUB_DEBUG_ON=n, find_mergeable() gets debug features from commandline but never checks if there are features from the SLAB_NEVER_MERGE set. As a result selected by slub_debug caches are always mergeable if they have been created without a custom constructor set or without one of the SLAB_* debug features on. This moves the SLAB_NEVER_MERGE check below the flags update from commandline to make sure it won't merge the slab cache if one of the debug features is on. Link: http://lkml.kernel.org/r/20170101124451.GA4740@lp-laptop-d Signed-off-by: Grygorii Maistrenko Reviewed-by: Pekka Enberg Acked-by: David Rientjes Acked-by: Christoph Lameter Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8dcde9def5a15df54fa4ca41f7750d80fa741d61 Author: Prarit Bhargava Date: Wed Feb 22 15:40:56 2017 -0800 kernel/watchdog.c: do not hardcode CPU 0 as the initial thread When CONFIG_BOOTPARAM_HOTPLUG_CPU0 is enabled, the socket containing the boot cpu can be replaced. During the hot add event, the message NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. is output implying that the NMI watchdog was disabled at some point. This is not the case and the message has caused confusion for users of systems that support the removal of the boot cpu socket. The watchdog code is coded to assume that cpu 0 is always the first cpu to initialize the watchdog, and the last to stop its watchdog thread. That is not the case for initializing if cpu 0 has been removed and added. The removal case has never been correct because the smpboot code will remove the watchdog threads starting with the lowest cpu number. This patch adds watchdog_cpus to track the number of cpus with active NMI watchdog threads so that the first and last thread can be used to set and clear the value of firstcpu_err. firstcpu_err is set when the first watchdog thread is enabled, and cleared when the last watchdog thread is disabled. Link: http://lkml.kernel.org/r/1480425321-32296-1-git-send-email-prarit@redhat.com Signed-off-by: Prarit Bhargava Acked-by: Don Zickus Cc: Borislav Petkov Cc: Tejun Heo Cc: Hidehiro Kawai Cc: Thomas Gleixner Cc: Andi Kleen Cc: Joshua Hunt Cc: Ingo Molnar Cc: Babu Moger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/watchdog_hld.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit b5c66bab72a6a65edb15beb60b90d3cb84c5763b Author: Cong Wang Date: Wed Feb 22 15:40:53 2017 -0800 9p: fix a potential acl leak posix_acl_update_mode() could possibly clear 'acl', if so we leak the memory pointed by 'acl'. Save this pointer before calling posix_acl_update_mode() and release the memory if 'acl' really gets cleared. Link: http://lkml.kernel.org/r/1486678332-2430-1-git-send-email-xiyou.wangcong@gmail.com Signed-off-by: Cong Wang Reported-by: Mark Salyzyn Reviewed-by: Jan Kara Reviewed-by: Greg Kurz Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/9p/acl.c | 2 ++ 1 file changed, 2 insertions(+) commit 612dafabb6a0fa62e9b86f11da5d37ee11dea28f Author: Tetsuo Handa Date: Wed Feb 22 15:40:50 2017 -0800 block: use for_each_thread() in sys_ioprio_set()/sys_ioprio_get() IOPRIO_WHO_USER case in sys_ioprio_set()/sys_ioprio_get() are using while_each_thread(), which is unsafe under RCU lock according to commit 0c740d0afc3bff0a ("introduce for_each_thread() to replace the buggy while_each_thread()"). Use for_each_thread() (via for_each_process_thread()) which is safe under RCU lock. Link: http://lkml.kernel.org/r/201702011947.DBD56740.OMVHOLOtSJFFFQ@I-love.SAKURA.ne.jp Link: http://lkml.kernel.org/r/1486041779-4401-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Cc: Oleg Nesterov Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/ioprio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6302666d2ef135be46ca34226791afea275f62d1 Author: Davidlohr Bueso Date: Wed Feb 22 15:40:47 2017 -0800 parisc: use generic current.h Given that the arch does not add its own implementations, simply use the asm-generic/current.h (generic-y) header instead of duplicating code. Link: http://lkml.kernel.org/r/1485992878-4780-4-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: "James E.J. Bottomley" Cc: Helge Deller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/include/asm/Kbuild | 1 + arch/parisc/include/asm/current.h | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) commit b891fa5024a95c77e0d6fd6655cb74af6fb77f46 Author: Eric Ren Date: Wed Feb 22 15:40:44 2017 -0800 ocfs2: fix deadlock issue when taking inode lock at vfs entry points Commit 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()") results in a deadlock, as the author "Tariq Saeed" realized shortly after the patch was merged. The discussion happened here https://oss.oracle.com/pipermail/ocfs2-devel/2015-September/011085.html The reason why taking cluster inode lock at vfs entry points opens up a self deadlock window, is explained in the previous patch of this series. So far, we have seen two different code paths that have this issue. 1. do_sys_open may_open inode_permission ocfs2_permission ocfs2_inode_lock() <=== take PR generic_permission get_acl ocfs2_iop_get_acl ocfs2_inode_lock() <=== take PR 2. fchmod|fchmodat chmod_common notify_change ocfs2_setattr <=== take EX posix_acl_chmod get_acl ocfs2_iop_get_acl <=== take PR ocfs2_iop_set_acl <=== take EX Fixes them by adding the tracking logic (in the previous patch) for these funcs above, ocfs2_permission(), ocfs2_iop_[set|get]_acl(), ocfs2_setattr(). Link: http://lkml.kernel.org/r/20170117100948.11657-3-zren@suse.com Signed-off-by: Eric Ren Reviewed-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/acl.c | 29 +++++++++++++---------------- fs/ocfs2/file.c | 58 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 29 deletions(-) commit 439a36b8ef38657f765b80b775e2885338d72451 Author: Eric Ren Date: Wed Feb 22 15:40:41 2017 -0800 ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock We are in the situation that we have to avoid recursive cluster locking, but there is no way to check if a cluster lock has been taken by a precess already. Mostly, we can avoid recursive locking by writing code carefully. However, we found that it's very hard to handle the routines that are invoked directly by vfs code. For instance: const struct inode_operations ocfs2_file_iops = { .permission = ocfs2_permission, .get_acl = ocfs2_iop_get_acl, .set_acl = ocfs2_iop_set_acl, }; Both ocfs2_permission() and ocfs2_iop_get_acl() call ocfs2_inode_lock(PR): do_sys_open may_open inode_permission ocfs2_permission ocfs2_inode_lock() <=== first time generic_permission get_acl ocfs2_iop_get_acl ocfs2_inode_lock() <=== recursive one A deadlock will occur if a remote EX request comes in between two of ocfs2_inode_lock(). Briefly describe how the deadlock is formed: On one hand, OCFS2_LOCK_BLOCKED flag of this lockres is set in BAST(ocfs2_generic_handle_bast) when downconvert is started on behalf of the remote EX lock request. Another hand, the recursive cluster lock (the second one) will be blocked in in __ocfs2_cluster_lock() because of OCFS2_LOCK_BLOCKED. But, the downconvert never complete, why? because there is no chance for the first cluster lock on this node to be unlocked - we block ourselves in the code path. The idea to fix this issue is mostly taken from gfs2 code. 1. introduce a new field: struct ocfs2_lock_res.l_holders, to keep track of the processes' pid who has taken the cluster lock of this lock resource; 2. introduce a new flag for ocfs2_inode_lock_full: OCFS2_META_LOCK_GETBH; it means just getting back disk inode bh for us if we've got cluster lock. 3. export a helper: ocfs2_is_locked_by_me() is used to check if we have got the cluster lock in the upper code path. The tracking logic should be used by some of the ocfs2 vfs's callbacks, to solve the recursive locking issue cuased by the fact that vfs routines can call into each other. The performance penalty of processing the holder list should only be seen at a few cases where the tracking logic is used, such as get/set acl. You may ask what if the first time we got a PR lock, and the second time we want a EX lock? fortunately, this case never happens in the real world, as far as I can see, including permission check, (get|set)_(acl|attr), and the gfs2 code also do so. [sfr@canb.auug.org.au remove some inlines] Link: http://lkml.kernel.org/r/20170117100948.11657-2-zren@suse.com Signed-off-by: Eric Ren Reviewed-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Stephen Rothwell Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++-- fs/ocfs2/dlmglue.h | 18 +++++++++ fs/ocfs2/ocfs2.h | 1 + 3 files changed, 121 insertions(+), 3 deletions(-) commit ca376b37867875b6f661bb24a3238636b74f766e Author: Davidlohr Bueso Date: Wed Feb 22 15:40:38 2017 -0800 score: remove asm/current.h ... it's already using the generic version anyways, so just drop the file as do the other archs that do not implement their own version of the current macro. Link: http://lkml.kernel.org/r/1485992878-4780-5-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Chen Liqin Cc: Lennox Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/score/include/asm/Kbuild | 2 +- arch/score/include/asm/current.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) commit af0de7815e2cdb7b3cf1d5faef0ca45c1dfb3ba2 Author: Sudip Mukherjee Date: Wed Feb 22 15:40:35 2017 -0800 m32r: fix build warning Some m32r builds were having a warning: arch/m32r/include/asm/cmpxchg.h:191:3: warning: value computed is not used arch/m32r/include/asm/cmpxchg.h:68:3: warning: value computed is not used Taking the idea from commit e001bbae7147 ("ARM: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations") the m32r implementation is changed to use a similar construct with a compound expression instead of a typecast, which causes the compiler to not complain about an unused result. Link: http://lkml.kernel.org/r/1484432664-7015-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/include/asm/cmpxchg.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 6408b6fb99a066f92a4aa6215169d2264c05af48 Author: Davidlohr Bueso Date: Wed Feb 22 15:40:32 2017 -0800 m32r: use generic current.h Given that the arch does not add its own implementations, simply use the asm-generic/current.h (generic-y) header instead of duplicating code. Link: http://lkml.kernel.org/r/1482896994-25863-1-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/include/asm/Kbuild | 1 + arch/m32r/include/asm/current.h | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) commit 7659c655bededecd88f6f25102ba3ab926af92cc Author: Hou Tao Date: Wed Feb 22 15:40:29 2017 -0800 scripts/tags.sh: include arch/Kconfig* for tags generation Kconfig files under arch/ directory are ignored by all_kconfigs(), so include them for tags generation. Link: http://lkml.kernel.org/r/1486206053-38223-1-git-send-email-houtao1@huawei.com Signed-off-by: Hou Tao Cc: Michal Marek Cc: Joe Perches Cc: Mathieu Maret Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/tags.sh | 2 ++ 1 file changed, 2 insertions(+) commit 8087a5609dbf73553a226f1ce0b3a14954adab34 Author: Cheah Kok Cheong Date: Wed Feb 22 15:40:26 2017 -0800 scripts/checkincludes.pl: add exit message for no duplicates found If no duplicates found, inform user. Link: http://lkml.kernel.org/r/1486391275-2843-1-git-send-email-thrust73@gmail.com Signed-off-by: Cheah Kok Cheong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkincludes.pl | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0e5a47a8d346c798bbb1801c7c5852b652155b72 Author: Tobias Klauser Date: Wed Feb 22 15:40:23 2017 -0800 scripts/checkstack.pl: add support for nios2 Adjust checkstack.pl for the nios2 architecture. Link: http://lkml.kernel.org/r/20170116113052.15034-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Cc: Ley Foon Tan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) commit 78c5250296c94c0d6bd9e92814e6601ff6c0b18b Author: Jean Delvare Date: Wed Feb 22 15:40:20 2017 -0800 scripts/Lindent: clean up and optimize * Add a few blank lines to improve readability. * Don't call cut 3 times when once is enough. * Drop a useless semicolon. Link: http://lkml.kernel.org/r/20170104140356.162abab2@endymion Signed-off-by: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/Lindent | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 10f24f75b304f6874eacf765d09827a28caea28d Author: Ross Zwisler Date: Wed Feb 22 15:40:17 2017 -0800 scripts/spelling.txt: fix incorrect typo-words Fix up some incorrect typo-words. [akpm@linux-foundation.org: "licencing" is valid British spelling and should be kept, per Joe] Link: http://lkml.kernel.org/r/1486409689-23335-1-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c3200265787f787e4133579cc5e5c28d805f76e Author: Colin Ian King Date: Wed Feb 22 15:40:15 2017 -0800 scripts/spelling.txt: add several more common spelling mistakes Lately I've been cleaning up spelling mistakes in kernel error messages and here are some of the more common spelling mistakes that I've found which probably should be added to this list so we don't keep on seeing them appearing again. Link: http://lkml.kernel.org/r/20161209173326.17662-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Kees Cook Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 0937577d5f5720046252196f811def2eae470593 Author: Daniel Thompson Date: Wed Feb 22 15:40:12 2017 -0800 tools/vm: add missing Makefile rules Currently the tools/vm Makefile has a rather arbitrary implicit build rule; page-types is the first value in TARGETS so lets just build that one! Additionally there is no install rule and this is needed for make -C tools vm_install to work properly. Provide a more sensible implicit build rule and a new install rule. Note that the variables names used by the install rule (DESTDIR and sbindir) are copied from prior-art in tools/power/cpupower. Link: http://lkml.kernel.org/r/20170113165630.27541-1-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) commit a5759b2bffa807a727cbf6790ecdc4df2ae8e4d4 Author: Miles Chen Date: Wed Feb 22 15:40:09 2017 -0800 dma-debug: add comment for failed to check map error Add comment for failure to check a map error to help driver developers. Link: http://lkml.kernel.org/r/1484622289-22085-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dma-debug.c | 5 +++++ 1 file changed, 5 insertions(+) commit f42003917b4569a2f4f0c79c35e1e3df2859f81a Author: Dave Jiang Date: Wed Feb 22 15:40:06 2017 -0800 mm, dax: change pmd_fault() to take only vmf parameter pmd_fault() and related functions really only need the vmf parameter since the additional parameters are all included in the vmf struct. Remove the additional parameter and simplify pmd_fault() and friends. Link: http://lkml.kernel.org/r/1484085142-2297-8-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Dave Jiang Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Dave Chinner Cc: Dave Jiang Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax.c | 18 +++++++-------- fs/dax.c | 54 ++++++++++++++++++++----------------------- fs/ext4/file.c | 8 +++---- fs/xfs/xfs_file.c | 7 +++--- include/linux/dax.h | 7 +++--- include/linux/mm.h | 2 +- include/trace/events/fs_dax.h | 54 ++++++++++++++++++++----------------------- mm/memory.c | 9 ++++---- 8 files changed, 74 insertions(+), 85 deletions(-) commit d8a849e1bc123790bbbf1facba94452a3aef5736 Author: Dave Jiang Date: Wed Feb 22 15:40:03 2017 -0800 mm, dax: make pmd_fault() and friends be the same as fault() Instead of passing in multiple parameters in the pmd_fault() handler, a vmf can be passed in just like a fault() handler. This will simplify code and remove the need for the actual pmd fault handlers to allocate a vmf. Related functions are also modified to do the same. [dave.jiang@intel.com: fix issue with xfs_tests stall when DAX option is off] Link: http://lkml.kernel.org/r/148469861071.195597.3619476895250028518.stgit@djiang5-desk3.ch.intel.com Link: http://lkml.kernel.org/r/1484085142-2297-7-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Dave Jiang Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Dave Chinner Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax.c | 16 +++++++--------- fs/dax.c | 28 +++++++++++----------------- fs/ext4/file.c | 9 ++++----- fs/xfs/xfs_file.c | 10 ++++------ include/linux/dax.h | 7 +++---- include/linux/mm.h | 3 +-- include/trace/events/fs_dax.h | 15 +++++++-------- mm/memory.c | 6 ++---- 8 files changed, 39 insertions(+), 55 deletions(-) commit 27a7ffaccd915675c88045ba83493804a0267ab7 Author: Ross Zwisler Date: Wed Feb 22 15:40:00 2017 -0800 dax: add tracepoints to dax_pmd_insert_mapping() Add tracepoints to dax_pmd_insert_mapping(), following the same logging conventions as the tracepoints in dax_iomap_pmd_fault(). Here is an example PMD fault showing the new tracepoints: big-1504 [001] .... 326.960743: xfs_filemap_pmd_fault: dev 259:0 ino 0x1003 big-1504 [001] .... 326.960753: dax_pmd_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000 vm_end 0x10700000 pgoff 0x200 max_pgoff 0x1400 big-1504 [001] .... 326.960981: dax_pmd_insert_mapping: dev 259:0 ino 0x1003 shared write address 0x10505000 length 0x200000 pfn 0x100600 DEV|MAP radix_entry 0xc000e big-1504 [001] .... 326.960986: dax_pmd_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000 vm_end 0x10700000 pgoff 0x200 max_pgoff 0x1400 NOPAGE Link: http://lkml.kernel.org/r/1484085142-2297-6-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Acked-by: Steven Rostedt Cc: Dave Chinner Cc: Dave Jiang Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 12 +++++++--- include/linux/pfn_t.h | 6 +++++ include/trace/events/fs_dax.h | 51 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) commit 653b2ea3396fda0b5e23a37b3356dd2ca82fe5c1 Author: Ross Zwisler Date: Wed Feb 22 15:39:57 2017 -0800 dax: add tracepoints to dax_pmd_load_hole() Add tracepoints to dax_pmd_load_hole(), following the same logging conventions as the tracepoints in dax_iomap_pmd_fault(). Here is an example PMD fault showing the new tracepoints: read_big-1478 [004] .... 238.242188: xfs_filemap_pmd_fault: dev 259:0 ino 0x1003 read_big-1478 [004] .... 238.242191: dax_pmd_fault: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10400000 vm_start 0x10200000 vm_end 0x10600000 pgoff 0x200 max_pgoff 0x1400 read_big-1478 [004] .... 238.242390: dax_pmd_load_hole: dev 259:0 ino 0x1003 shared address 0x10400000 zero_page ffffea0002c20000 radix_entry 0x1e read_big-1478 [004] .... 238.242392: dax_pmd_fault_done: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10400000 vm_start 0x10200000 vm_end 0x10600000 pgoff 0x200 max_pgoff 0x1400 NOPAGE Link: http://lkml.kernel.org/r/1484085142-2297-5-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Acked-by: Steven Rostedt Cc: Dave Chinner Cc: Dave Jiang Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 14 ++++++++++---- include/trace/events/fs_dax.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) commit e057541acc173f44f191c8df68c75edc658f4688 Author: Ross Zwisler Date: Wed Feb 22 15:39:54 2017 -0800 dax: update MAINTAINERS entries for FS DAX Add the new include/trace/events/fs_dax.h tracepoint header, the existing include/linux/dax.h header, update Matthew's email address and add myself as a maintainer for filesystem DAX. Link: http://lkml.kernel.org/r/1484085142-2297-4-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Suggested-by: Matthew Wilcox Cc: Dave Chinner Cc: Dave Jiang Cc: Jan Kara Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 282a8e0391c377b64c7d065b18fc2f6267a24dad Author: Ross Zwisler Date: Wed Feb 22 15:39:50 2017 -0800 dax: add tracepoint infrastructure, PMD tracing Tracepoints are the standard way to capture debugging and tracing information in many parts of the kernel, including the XFS and ext4 filesystems. Create a tracepoint header for FS DAX and add the first DAX tracepoints to the PMD fault handler. This allows the tracing for DAX to be done in the same way as the filesystem tracing so that developers can look at them together and get a coherent idea of what the system is doing. I added both an entry and exit tracepoint because future patches will add tracepoints to child functions of dax_iomap_pmd_fault() like dax_pmd_load_hole() and dax_pmd_insert_mapping(). We want those messages to be wrapped by the parent function tracepoints so the code flow is more easily understood. Having entry and exit tracepoints for faults also allows us to easily see what filesystems functions were called during the fault. These filesystem functions get executed via iomap_begin() and iomap_end() calls, for example, and will have their own tracepoints. For PMD faults we primarily want to understand the type of mapping, the fault flags, the faulting address and whether it fell back to 4k faults. If it fell back to 4k faults the tracepoints should let us understand why. I named the new tracepoint header file "fs_dax.h" to allow for device DAX to have its own separate tracing header in the same directory at some point. Here is an example output for these events from a successful PMD fault: big-1441 [005] .... 32.582758: xfs_filemap_pmd_fault: dev 259:0 ino 0x1003 big-1441 [005] .... 32.582776: dax_pmd_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000 vm_end 0x10700000 pgoff 0x200 max_pgoff 0x1400 big-1441 [005] .... 32.583292: dax_pmd_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000 vm_end 0x10700000 pgoff 0x200 max_pgoff 0x1400 NOPAGE Link: http://lkml.kernel.org/r/1484085142-2297-3-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Suggested-by: Dave Chinner Reviewed-by: Jan Kara Acked-by: Steven Rostedt Cc: Dave Jiang Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 30 ++++++++++++------- include/linux/mm.h | 25 ++++++++++++++++ include/trace/events/fs_dax.h | 68 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 10 deletions(-) commit d3213e8fd4b0f18dfd438268ff480406ba743abb Author: Ross Zwisler Date: Wed Feb 22 15:39:47 2017 -0800 tracing: add __print_flags_u64() Patch series "DAX tracepoints, mm argument simplification", v4. This contains both my DAX tracepoint code and Dave Jiang's MM argument simplifications. Dave's code was written with my tracepoint code as a baseline, so it seemed simplest to keep them together in a single series. This patch (of 7): Add __print_flags_u64() and the helper trace_print_flags_seq_u64() in the same spirit as __print_symbolic_u64() and trace_print_symbols_seq_u64(). These functions allow us to print symbols associated with flags that are 64 bits wide even on 32 bit machines. These will be used by the DAX code so that we can print the flags set in a pfn_t such as PFN_SG_CHAIN, PFN_SG_LAST, PFN_DEV and PFN_MAP. Without this new function I was getting errors like the following when compiling for i386: include/linux/pfn_t.h:13:22: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1)) ^ Link: http://lkml.kernel.org/r/1484085142-2297-2-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Steven Rostedt Cc: Dave Chinner Cc: Dave Jiang Cc: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/trace_events.h | 4 ++++ include/trace/trace_events.h | 11 +++++++++++ kernel/trace/trace_output.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) commit 3949e2f04262495f6c8795b148aa26dffccba646 Author: Christoph Hellwig Date: Tue Feb 14 20:15:58 2017 +0100 scsi: simplify scsi_execute_req_flags Add a sshdr argument to __scsi_execute so that we can decode the sense data directly into the sense header instead of needing a copy of it. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 74a78ebda4fa5c5ae87fc501152863ee31c17da4 Author: Christoph Hellwig Date: Tue Feb 14 20:15:57 2017 +0100 scsi: make the sense header argument to scsi_test_unit_ready mandatory It's a tiny structure that can be allocated on the stack, don't complicate the code by making it optional. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/osd/osd_uld.c | 3 ++- drivers/scsi/scsi_ioctl.c | 3 ++- drivers/scsi/scsi_lib.c | 14 ++------------ 3 files changed, 6 insertions(+), 14 deletions(-) commit 6fa2b8f9e3ae8dd770d8fa264825f86b146381c8 Author: Christoph Hellwig Date: Tue Feb 14 20:15:56 2017 +0100 scsi: sd: improve TUR handling in sd_check_events Remove bogus evaluations of retval and sshdr when the device is offline, and fix a possible NULL pointer dereference by allocating the 8 byte sized sense header on stack. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 148cff67b401e2229c076c0ea418712654be77e4 Author: Christoph Hellwig Date: Tue Feb 14 20:15:55 2017 +0100 scsi: always zero sshdr in scsi_normalize_sense This gives us a clear state even if a command didn't return sense data. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d7d39a18b8b81511f0b893b7d2203790bf8a58b Author: Dan Carpenter Date: Tue Feb 21 21:46:37 2017 +0300 scsi: scsi_dh_emc: return success in clariion_std_inquiry() We accidentally return an uninitialized variable on success. Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler") Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f170396c14243d307e2f479af142fd7356b3bd2a Author: Colin Ian King Date: Fri Feb 3 19:38:54 2017 +0000 scsi: fix memory leak of sdpk on when gd fails to allocate On an allocation failure of gd, the current exit path is via out_free_devt which leaves sdpk still allocated and hence it gets leaked. Fix this by correcting the order of resource free'ing with a change in the error exit path labels. Detected by CoverityScan, CID#1399519 ("Resource Leak") Fixes: 0dba1314d4f81115dc ("scsi, block: fix duplicate bdi name registration crashes") Signed-off-by: Colin Ian King Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bfcd1bf867d5fae67ecc553b44d7a29ab66013c Author: Wei Yongjun Date: Wed Feb 8 16:24:24 2017 +0000 scsi: sd: make sd_devt_release() static Fixes the following sparse warning: drivers/scsi/sd.c:3087:6: warning: symbol 'sd_devt_release' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61d8658b4a435eac729966cc94cdda077a8df5cd Author: Dupuis, Chad Date: Wed Feb 15 06:28:23 2017 -0800 scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework. The QLogic FastLinQ Driver for FCoE (qedf) is the FCoE specific module for 41000 Series Converged Network Adapters by QLogic. This patch consists of following changes: - MAINTAINERS Makefile and Kconfig changes for qedf - PCI driver registration - libfc/fcoe host level initialization - SCSI host template initialization and callbacks - Debugfs and log level infrastructure - Link handling - Firmware interface structures - QED core module initialization - Light L2 interface callbacks - I/O request initialization - Firmware I/O completion handling - Firmware ELS request/response handling - FIP request/response handled by the driver itself Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Saurav Kashyap Signed-off-by: Arun Easi Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen MAINTAINERS | 6 + drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/qedf/Kconfig | 11 + drivers/scsi/qedf/Makefile | 5 + drivers/scsi/qedf/qedf.h | 545 +++++++ drivers/scsi/qedf/qedf_attr.c | 165 ++ drivers/scsi/qedf/qedf_dbg.c | 195 +++ drivers/scsi/qedf/qedf_dbg.h | 154 ++ drivers/scsi/qedf/qedf_debugfs.c | 460 ++++++ drivers/scsi/qedf/qedf_els.c | 949 +++++++++++ drivers/scsi/qedf/qedf_fip.c | 269 +++ drivers/scsi/qedf/qedf_hsi.h | 422 +++++ drivers/scsi/qedf/qedf_io.c | 2282 ++++++++++++++++++++++++++ drivers/scsi/qedf/qedf_main.c | 3336 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qedf/qedf_version.h | 15 + 16 files changed, 8816 insertions(+) commit 67f2db8792f96d8f7521461635d25f9c80245d80 Author: Michael Hernandez Date: Wed Feb 15 15:37:21 2017 -0800 scsi: qla2xxx: Fix Regression introduced by pci_alloc_irq_vectors_affinity call. For target mode, we need to increase minimum vectors value by one to account for ATIO queue. Following stack trace will be seen Call Trace: qla24xx_config_rings+0x15a/0x230 [qla2xxx] qla2x00_init_rings+0x1a1/0x3a0 [qla2xxx] qla2x00_restart_isp+0x5c/0x120 [qla2xxx] qla2x00_abort_isp+0x138/0x430 [qla2xxx] ? __schedule+0x260/0x580 qla2x00_do_dpc+0x3bc/0x920 [qla2xxx] ? qla2x00_relogin+0x290/0x290 [qla2xxx] ? schedule+0x3a/0xa0 ? qla2x00_relogin+0x290/0x290 [qla2xxx] kthread+0x103/0x140 ? __kthread_init_worker+0x40/0x40 ret_from_fork+0x29/0x40 RIP: qlt_24xx_config_rings+0x6c/0x90 [mkp: fixed Fixes: hash] Cc: Fixes: 17e5fc58588b ("scsi: qla2xxx: fix MSI-X vector affinity") Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d0d2c68b759bbf678e078fd0c71b5fde65a9392c Author: Michael Hernandez Date: Wed Feb 15 15:37:20 2017 -0800 scsi: qla2xxx: Fix response queue count for Target mode. Target mode initialization was not calculating response queue values correctly resulting into one less MSI-X vector. [mkp: fixed Fixes: hash] Cc: Fixes: 093df73771ba ("scsi: qla2xxx: Fix Target mode handling with Multiqueue changes.") Signed-off-by: Michael Hernandez 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 f54f2cb540b53d55a81d620e816810d59be5cb1b Author: Michael Hernandez Date: Wed Feb 15 15:37:19 2017 -0800 scsi: qla2xxx: Cleaned up queue configuration code. This patch cleaned up queue configuration code, such that once initialized, we should not touch msix_count value. This will prevent incorrect numbers of MSI-X vectors requested while performing target mode configuration. [mkp: fixed Fixes: hash] Cc: Fixes: d74595278f4a ("scsi: qla2xxx: Add multiple queue pair functionality.") Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 6288d6eabc7505f42dda34a2c2962f91914be3a4 Author: Liu Bo Date: Tue Feb 21 12:12:58 2017 -0800 Btrfs: use the correct type when creating cow dio extent 'BTRFS_ORDERED_REGULAR' was introduced for the cow case in patch 'Btrfs: specify a new ordered extent type for create_io_em', but it missed the directIO cow case. Signed-off-by: Liu Bo Signed-off-by: Chris Mason fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1517622f2524f531113b12c27b9a0ea69c38983 Author: Filipe Manana Date: Tue Feb 21 17:14:52 2017 +0000 Btrfs: fix deadlock between dedup on same file and starting writeback If we are deduping two ranges of the same file we need to make sure that we lock all pages in ascending order, that is, lock first the pages from the range with lower offset and then the pages from the other range, as otherwise we can deadlock with a concurrent task that is starting delalloc (writeback). Example trace: [74073.052218] INFO: task kworker/u32:10:17997 blocked for more than 120 seconds. [74073.053889] Tainted: G W 4.9.0-rc7-btrfs-next-36+ #1 [74073.055071] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [74073.056696] kworker/u32:10 D 0 17997 2 0x00000000 [74073.058606] Workqueue: writeback wb_workfn (flush-btrfs-53176) [74073.061370] ffff880031e79858 ffff8802159d2580 ffff880237004580 ffff880031e79240 [74073.064784] ffff88023f4978c0 ffffc9000817b638 ffffffff814c15e1 0000000000000000 [74073.068386] ffff88023f4978d8 ffff88023f4978c0 000000000017b620 ffff880031e79240 [74073.071712] Call Trace: [74073.072884] [] ? __schedule+0x48f/0x6f4 [74073.075395] [] ? bit_wait+0x2f/0x2f [74073.077511] [] schedule+0x8c/0xa0 [74073.079440] [] schedule_timeout+0x43/0xff [74073.081637] [] ? time_hardirqs_on+0x9/0x14 [74073.083809] [] ? trace_hardirqs_on_caller+0x16/0x197 [74073.086314] [] ? timekeeping_get_ns+0x1e/0x32 [74073.100654] [] ? ktime_get+0x41/0x52 [74073.102619] [] io_schedule_timeout+0xa0/0x102 [74073.104771] [] ? io_schedule_timeout+0xa0/0x102 [74073.106969] [] bit_wait_io+0x1b/0x39 [74073.108954] [] __wait_on_bit_lock+0x4f/0x99 [74073.110981] [] __lock_page+0x6b/0x6d [74073.112833] [] ? autoremove_wake_function+0x3a/0x3a [74073.115010] [] lock_page+0x2f/0x32 [btrfs] [74073.116999] [] lock_delalloc_pages+0xc7/0x1a0 [btrfs] [74073.119243] [] find_lock_delalloc_range+0xc3/0x1a4 [btrfs] [74073.121636] [] writepage_delalloc.isra.31+0x8b/0x134 [btrfs] [74073.124229] [] __extent_writepage+0x1c1/0x2bf [btrfs] [74073.126372] [] extent_write_cache_pages.isra.30.constprop.49+0x28b/0x36c [btrfs] [74073.129371] [] extent_writepages+0x4b/0x5c [btrfs] [74073.131440] [] ? insert_reserved_file_extent.constprop.42+0x261/0x261 [btrfs] [74073.134303] [] ? writeback_sb_inodes+0xe0/0x4a1 [74073.136298] [] btrfs_writepages+0x28/0x2a [btrfs] [74073.138248] [] do_writepages+0x23/0x2c [74073.139910] [] __writeback_single_inode+0x105/0x6d2 [74073.142003] [] writeback_sb_inodes+0x292/0x4a1 [74073.136298] [] btrfs_writepages+0x28/0x2a [btrfs] [74073.138248] [] do_writepages+0x23/0x2c [74073.139910] [] __writeback_single_inode+0x105/0x6d2 [74073.142003] [] writeback_sb_inodes+0x292/0x4a1 [74073.143911] [] __writeback_inodes_wb+0x76/0xae [74073.145787] [] wb_writeback+0x1cc/0x4d7 [74073.147452] [] wb_workfn+0x194/0x37d [74073.149084] [] ? wb_workfn+0x194/0x37d [74073.150726] [] ? process_one_work+0x154/0x4e4 [74073.152694] [] process_one_work+0x273/0x4e4 [74073.154452] [] worker_thread+0x1eb/0x2ca [74073.156138] [] ? rescuer_thread+0x2b6/0x2b6 [74073.157837] [] kthread+0xd5/0xdd [74073.159339] [] ? __kthread_unpark+0x5a/0x5a [74073.161088] [] ret_from_fork+0x27/0x40 [74073.162680] INFO: lockdep is turned off. [74073.163855] INFO: task do-dedup:30264 blocked for more than 120 seconds. [74073.181180] Tainted: G W 4.9.0-rc7-btrfs-next-36+ #1 [74073.181180] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [74073.185296] fdm-stress D 0 30264 29974 0x00000000 [74073.186810] ffff880089595118 ffff880211b8eac0 ffff880237030380 ffff880089594b00 [74073.188998] ffff88023f2978c0 ffffc900063abb68 ffffffff814c15e1 0000000000000000 [74073.191070] ffff88023f2978d8 ffff88023f2978c0 00000000003abb50 ffff880089594b00 [74073.193286] Call Trace: [74073.193990] [] ? __schedule+0x48f/0x6f4 [74073.195418] [] ? bit_wait+0x2f/0x2f [74073.196796] [] schedule+0x8c/0xa0 [74073.198163] [] schedule_timeout+0x43/0xff [74073.199621] [] ? trace_hardirqs_on+0xd/0xf [74073.201100] [] ? timekeeping_get_ns+0x1e/0x32 [74073.202686] [] ? ktime_get+0x41/0x52 [74073.204051] [] io_schedule_timeout+0xa0/0x102 [74073.205585] [] ? io_schedule_timeout+0xa0/0x102 [74073.207123] [] bit_wait_io+0x1b/0x39 [74073.208238] [] __wait_on_bit_lock+0x4f/0x99 [74073.208871] [] __lock_page+0x6b/0x6d [74073.209430] [] ? autoremove_wake_function+0x3a/0x3a [74073.210101] [] lock_page+0x2f/0x32 [74073.210636] [] pagecache_get_page+0x5e/0x153 [74073.211270] [] gather_extent_pages+0x4e/0x109 [btrfs] [74073.212166] [] btrfs_dedupe_file_range+0x1e1/0x4dd [btrfs] [74073.213257] [] vfs_dedupe_file_range+0x1c1/0x221 [74073.214086] [] do_vfs_ioctl+0x442/0x600 [74073.214767] [] ? rcu_read_unlock+0x5b/0x5d [74073.215619] [] ? __fget+0x6b/0x77 [74073.216338] [] SyS_ioctl+0x57/0x79 [74073.217149] [] entry_SYSCALL_64_fastpath+0x18/0xad [74073.218102] [] ? time_hardirqs_off+0x9/0x14 [74073.218968] [] ? trace_hardirqs_off_caller+0x1f/0xaa [74073.219938] INFO: lockdep is turned off. What happened was the following: CPU 1 CPU 2 btrfs_dedupe_file_range() --> using same inode as source and target --> src range is [768K, 1Mb[ --> dst range is [0, 256K[ btrfs_cmp_data_prepare() --> calls gather_extent_pages() for range [768K, 1Mb[ and locks all pages in that range do_writepages() btrfs_writepages() extent_writepages() extent_write_cache_pages() __extent_writepage() writepage_delalloc() find_lock_delalloc_range() --> finds range [0, 1Mb[ lock_delalloc_pages() --> locks all pages in the range [0, 768K[ --> tries to lock page at offset 768K --> deadlock --> calls gather_extent_pages() to lock pages in the range [0, 256K[ --> deadlock, task at CPU 1 already locked that range and it's trying to lock the range we locked previously So fix this by making sure that during a dedup we always lock first the pages from the range with lower offset. Signed-off-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/ioctl.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 75d943f3e4222fdd4f907b71bd9d1730412e7ce9 Author: James Smart Date: Wed Feb 22 08:20:47 2017 -0800 scsi: lpfc: add missing Kconfig NVME dependencies Add missing Kconfig NVME dependencies. Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 693dcc316525d15fcf5a0a8a8e1663985ebdb02c Author: James Smart Date: Sun Feb 12 13:52:40 2017 -0800 scsi: lpfc: Update lpfc version to 11.2.0.7 Update lpfc version to 11.2.0.7 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d080abe0a8693c58a4b35b74bab3526d8b554ca3 Author: James Smart Date: Sun Feb 12 13:52:39 2017 -0800 scsi: lpfc: Update copyrights Update copyrights to 2017 for all files touched in this patch set Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/Makefile | 4 +++- drivers/scsi/lpfc/lpfc.h | 4 +++- drivers/scsi/lpfc/lpfc_attr.c | 4 +++- drivers/scsi/lpfc/lpfc_attr.h | 4 +++- drivers/scsi/lpfc/lpfc_bsg.c | 4 +++- drivers/scsi/lpfc/lpfc_bsg.h | 6 ++++-- drivers/scsi/lpfc/lpfc_compat.h | 4 +++- drivers/scsi/lpfc/lpfc_crtn.h | 4 +++- drivers/scsi/lpfc/lpfc_ct.c | 4 +++- drivers/scsi/lpfc/lpfc_debugfs.c | 4 +++- drivers/scsi/lpfc/lpfc_debugfs.h | 4 +++- drivers/scsi/lpfc/lpfc_disc.h | 4 +++- drivers/scsi/lpfc/lpfc_els.c | 4 +++- drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++- drivers/scsi/lpfc/lpfc_hw.h | 4 +++- drivers/scsi/lpfc/lpfc_hw4.h | 6 ++++-- drivers/scsi/lpfc/lpfc_ids.h | 4 +++- drivers/scsi/lpfc/lpfc_init.c | 6 ++++-- drivers/scsi/lpfc/lpfc_logmsg.h | 4 +++- drivers/scsi/lpfc/lpfc_mbox.c | 4 +++- drivers/scsi/lpfc/lpfc_mem.c | 4 +++- drivers/scsi/lpfc/lpfc_nl.h | 4 +++- drivers/scsi/lpfc/lpfc_nportdisc.c | 4 +++- drivers/scsi/lpfc/lpfc_nvme.c | 4 +++- drivers/scsi/lpfc/lpfc_nvme.h | 4 +++- drivers/scsi/lpfc/lpfc_nvmet.c | 6 ++++-- drivers/scsi/lpfc/lpfc_nvmet.h | 4 +++- drivers/scsi/lpfc/lpfc_scsi.c | 4 +++- drivers/scsi/lpfc/lpfc_scsi.h | 4 +++- drivers/scsi/lpfc/lpfc_sli.c | 4 +++- drivers/scsi/lpfc/lpfc_sli.h | 4 +++- drivers/scsi/lpfc/lpfc_sli4.h | 4 +++- drivers/scsi/lpfc/lpfc_version.h | 8 ++++++-- drivers/scsi/lpfc/lpfc_vport.c | 4 +++- drivers/scsi/lpfc/lpfc_vport.h | 4 +++- 35 files changed, 112 insertions(+), 40 deletions(-) commit 2b65e18202fd0f109b739dd6717286edca7a2b0d Author: James Smart Date: Sun Feb 12 13:52:38 2017 -0800 scsi: lpfc: NVME Target: Add debugfs support NVME Target: Add debugfs support Adds debugfs snippets to cover the new NVME target functionality Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 303 ++++++++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_nvmet.c | 317 ++++++++++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_nvmet.h | 13 ++ 3 files changed, 628 insertions(+), 5 deletions(-) commit d613b6a7aa922690e341c9ff0faba66ae299b5ad Author: James Smart Date: Sun Feb 12 13:52:37 2017 -0800 scsi: lpfc: NVME Target: bind to nvmet_fc api NVME Target: Tie in to NVME Fabrics nvmet_fc LLDD target api Adds the routines to: - register and deregister the FC port as a nvmet-fc targetport - binding of nvme queues to adapter WQs - receipt and passing of NVME LS's to transport, sending transport response - receipt of NVME FCP CMD IUs, processing FCP target io data transmission commands; transmission of FCP io response - Abort operations for tgt io exchanges [mkp: fixed space at end of file warning] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/Makefile | 2 +- drivers/scsi/lpfc/lpfc_crtn.h | 10 + drivers/scsi/lpfc/lpfc_ct.c | 2 +- drivers/scsi/lpfc/lpfc_els.c | 5 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 10 +- drivers/scsi/lpfc/lpfc_init.c | 14 +- drivers/scsi/lpfc/lpfc_mem.c | 45 + drivers/scsi/lpfc/lpfc_nvmet.c | 1671 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_sli.c | 8 +- 9 files changed, 1752 insertions(+), 15 deletions(-) commit 8c258641e01cfcc5620c4fb191300bea224bcc99 Author: James Smart Date: Sun Feb 12 13:52:36 2017 -0800 scsi: lpfc: NVME Target: Merge into FC discovery NVME Target: Merge into FC discovery Adds NVME PRLI handling and Nameserver registrations for NVME Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 8 +++- drivers/scsi/lpfc/lpfc_els.c | 61 ++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_hbadisc.c | 27 ++++++++++++-- drivers/scsi/lpfc/lpfc_hw.h | 10 ++++- drivers/scsi/lpfc/lpfc_nportdisc.c | 75 ++++++++++++++++++++++++++++++++++++-- 5 files changed, 167 insertions(+), 14 deletions(-) commit 2d7dbc4c2775eb30df97be00090adbfcc7fc5086 Author: James Smart Date: Sun Feb 12 13:52:35 2017 -0800 scsi: lpfc: NVME Target: Receive buffer updates NVME Target: Receive buffer updates Allocates buffer pools and configures adapter interfaces to handle receive buffer (asynchronous FCP CMD ius, first burst data) from the adapter. Splits by protocol, etc. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 3 + drivers/scsi/lpfc/lpfc_attr.c | 81 +++++- drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_debugfs.c | 25 +- drivers/scsi/lpfc/lpfc_hw4.h | 347 +++++++++++++++++++++- drivers/scsi/lpfc/lpfc_init.c | 233 ++++++++++++++- drivers/scsi/lpfc/lpfc_mbox.c | 87 ++++++ drivers/scsi/lpfc/lpfc_sli.c | 608 ++++++++++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_sli4.h | 11 + 9 files changed, 1374 insertions(+), 22 deletions(-) commit f358dd0ca26c152a5e0922e269996268dcb98a9d Author: James Smart Date: Sun Feb 12 13:52:34 2017 -0800 scsi: lpfc: NVME Target: Base modifications NVME Target: Base modifications This set of patches adds the base modifications for NVME target support The base modifications consist of: - Additional module parameters or configuration tuning - Enablement of configuration mode for NVME target. Ties into the queueing model put into place by the initiator basemods patches. - Target-specific buffer pools, dma pools, sgl pools [mkp: fixed space at end of file] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 6 + drivers/scsi/lpfc/lpfc_attr.c | 131 +++++++++++++++++++-- drivers/scsi/lpfc/lpfc_crtn.h | 10 ++ drivers/scsi/lpfc/lpfc_debugfs.c | 7 +- drivers/scsi/lpfc/lpfc_disc.h | 1 + drivers/scsi/lpfc/lpfc_hw4.h | 45 ++++++++ drivers/scsi/lpfc/lpfc_init.c | 244 +++++++++++++++++++++++++++++++++++++-- drivers/scsi/lpfc/lpfc_mem.c | 167 +++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvmet.h | 101 ++++++++++++++++ drivers/scsi/lpfc/lpfc_sli.c | 107 ++++++++++++++++- drivers/scsi/lpfc/lpfc_sli.h | 2 + drivers/scsi/lpfc/lpfc_sli4.h | 6 + 12 files changed, 807 insertions(+), 20 deletions(-) commit bd2cdd5e400f5914bc30d5cfb0a0185cf51e4424 Author: James Smart Date: Sun Feb 12 13:52:33 2017 -0800 scsi: lpfc: NVME Initiator: Add debugfs support NVME Initiator: Add debugfs support Adds debugfs snippets to cover the new NVME initiator functionality Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 55 ++ drivers/scsi/lpfc/lpfc_crtn.h | 6 +- drivers/scsi/lpfc/lpfc_ct.c | 27 +- drivers/scsi/lpfc/lpfc_debugfs.c | 1160 ++++++++++++++++++++++++++++++++++---- drivers/scsi/lpfc/lpfc_debugfs.h | 21 + drivers/scsi/lpfc/lpfc_nvme.c | 143 +++++ drivers/scsi/lpfc/lpfc_nvme.h | 7 + drivers/scsi/lpfc/lpfc_sli.c | 5 + 8 files changed, 1300 insertions(+), 124 deletions(-) commit 01649561a8b4b77247bd234f240d737367bb8a52 Author: James Smart Date: Sun Feb 12 13:52:32 2017 -0800 scsi: lpfc: NVME Initiator: bind to nvme_fc api NVME Initiator: Tie in to NVME Fabrics nvme_fc LLDD initiator api Adds the routines to: - register and deregister the FC port as a nvme-fc initiator localport - register and deregister remote FC ports as a nvme-fc remoteport - binding of nvme queues to adapter WQs - send/perform NVME LS's - send/perform NVME FCP initiator io operations Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/Makefile | 7 +- drivers/scsi/lpfc/lpfc.h | 5 + drivers/scsi/lpfc/lpfc_crtn.h | 10 + drivers/scsi/lpfc/lpfc_ct.c | 2 +- drivers/scsi/lpfc/lpfc_els.c | 4 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 15 +- drivers/scsi/lpfc/lpfc_init.c | 39 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 4 +- drivers/scsi/lpfc/lpfc_nvme.c | 2319 ++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvme.h | 6 + drivers/scsi/lpfc/lpfc_sli.c | 21 +- drivers/scsi/lpfc/lpfc_sli4.h | 1 + drivers/scsi/lpfc/lpfc_vport.c | 16 +- 13 files changed, 2411 insertions(+), 38 deletions(-) commit a0f2d3ef374fd8d2f51b8cc1ea723014b1aa2c9b Author: James Smart Date: Sun Feb 12 13:52:31 2017 -0800 scsi: lpfc: NVME Initiator: Merge into FC discovery NVME Initiator: Merge into FC discovery Adds NVME PRLI support and Nameserver registrations and Queries for NVME Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 6 +- drivers/scsi/lpfc/lpfc_ct.c | 357 ++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_disc.h | 19 +- drivers/scsi/lpfc/lpfc_els.c | 280 +++++++++++++++++++++-------- drivers/scsi/lpfc/lpfc_hbadisc.c | 169 ++++++++++++++---- drivers/scsi/lpfc/lpfc_hw.h | 69 ++++--- drivers/scsi/lpfc/lpfc_hw4.h | 43 +++++ drivers/scsi/lpfc/lpfc_init.c | 7 + drivers/scsi/lpfc/lpfc_nportdisc.c | 177 ++++++++++++++++-- drivers/scsi/lpfc/lpfc_scsi.c | 3 +- 10 files changed, 851 insertions(+), 279 deletions(-) commit 895427bd012ce5814fc9888c7c0ee9de44761833 Author: James Smart Date: Sun Feb 12 13:52:30 2017 -0800 scsi: lpfc: NVME Initiator: Base modifications NVME Initiator: Base modifications This patch adds base modifications for NVME initiator support. The base modifications consist of: - Formal split of SLI3 rings from SLI-4 WQs (sometimes referred to as rings as well) as implementation now widely varies between the two. - Addition of configuration modes: SCSI initiator only; NVME initiator only; NVME target only; and SCSI and NVME initiator. The configuration mode drives overall adapter configuration, offloads enabled, and resource splits. NVME support is only available on SLI-4 devices and newer fw. - Implements the following based on configuration mode: - Exchange resources are split by protocol; Obviously, if only 1 mode, then no split occurs. Default is 50/50. module attribute allows tuning. - Pools and config parameters are separated per-protocol - Each protocol has it's own set of queues, but share interrupt vectors. SCSI: SLI3 devices have few queues and the original style of queue allocation remains. SLI4 devices piggy back on an "io-channel" concept that eventually needs to merge with scsi-mq/blk-mq support (it is underway). For now, the paradigm continues as it existed prior. io channel allocates N msix and N WQs (N=4 default) and either round robins or uses cpu # modulo N for scheduling. A bunch of module parameters allow the configuration to be tuned. NVME (initiator): Allocates an msix per cpu (or whatever pci_alloc_irq_vectors gets) Allocates a WQ per cpu, and maps the WQs to msix on a WQ # modulo msix vector count basis. Module parameters exist to cap/control the config if desired. - Each protocol has its own buffer and dma pools. I apologize for the size of the patch. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---- Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 80 +- drivers/scsi/lpfc/lpfc_attr.c | 374 ++++++- drivers/scsi/lpfc/lpfc_bsg.c | 27 +- drivers/scsi/lpfc/lpfc_crtn.h | 27 +- drivers/scsi/lpfc/lpfc_debugfs.c | 178 ++- drivers/scsi/lpfc/lpfc_debugfs.h | 72 +- drivers/scsi/lpfc/lpfc_els.c | 38 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 157 ++- drivers/scsi/lpfc/lpfc_hw.h | 3 +- drivers/scsi/lpfc/lpfc_hw4.h | 63 +- drivers/scsi/lpfc/lpfc_init.c | 2141 ++++++++++++++++++++---------------- drivers/scsi/lpfc/lpfc_logmsg.h | 4 + drivers/scsi/lpfc/lpfc_mbox.c | 23 +- drivers/scsi/lpfc/lpfc_mem.c | 62 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 7 +- drivers/scsi/lpfc/lpfc_nvme.h | 88 ++ drivers/scsi/lpfc/lpfc_scsi.c | 101 +- drivers/scsi/lpfc/lpfc_scsi.h | 6 + drivers/scsi/lpfc/lpfc_sli.c | 1429 +++++++++++++++++------- drivers/scsi/lpfc/lpfc_sli.h | 30 +- drivers/scsi/lpfc/lpfc_sli4.h | 75 +- drivers/scsi/lpfc/lpfc_vport.c | 2 + 22 files changed, 3353 insertions(+), 1634 deletions(-) commit 1d9d5a9879ad493ee7cf75987df1f365c61fefe5 Author: James Smart Date: Sun Feb 12 13:52:29 2017 -0800 scsi: lpfc: refactor debugfs queue dump routines Create common wq, cq, eq, rq dump functions Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 22 ++-- drivers/scsi/lpfc/lpfc_debugfs.h | 214 ++++++++++++++++----------------------- 2 files changed, 101 insertions(+), 135 deletions(-) commit 07bcd98efba2edd2bd2230e24f6a46a09991e2a4 Author: James Smart Date: Sun Feb 12 13:52:28 2017 -0800 scsi: lpfc: refactor debugfs queue prints Create common wq, cq, eq, rq print functions Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_debugfs.c | 564 ++++++++++++++++----------------------- 2 files changed, 228 insertions(+), 337 deletions(-) commit 2ea259eead133026ac6a3fbfa040cc58a96cae44 Author: James Smart Date: Sun Feb 12 13:52:27 2017 -0800 scsi: lpfc: minor code cleanups This contains code cleanups that were in the prior patch set. This allows better review of real changes later. minor code cleanups: fix indentation, punctuation, line length addition/reduction of whitespace remove unneeded parens, braces lpfc_debugfs_nodelist_data: print as u64 rather than byte by byte covert printk(KERN_ERR to pr_err small print string deltas use num_present_cpus() rather than count them comment updates rctl/type names moved to module variable, not on stack Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 8 ++-- drivers/scsi/lpfc/lpfc_bsg.c | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 81 +++++++++++++++++++--------------------- drivers/scsi/lpfc/lpfc_hbadisc.c | 7 ++-- drivers/scsi/lpfc/lpfc_init.c | 19 ++++++---- drivers/scsi/lpfc/lpfc_scsi.c | 3 +- drivers/scsi/lpfc/lpfc_scsi.h | 12 +++--- drivers/scsi/lpfc/lpfc_sli.c | 48 +++++++++++++----------- drivers/scsi/lpfc/lpfc_sli.h | 6 +-- drivers/scsi/lpfc/lpfc_vport.c | 1 + 10 files changed, 98 insertions(+), 89 deletions(-) commit 45ffac1976c580ac20d926257b2f6320ce1b210f Author: Christoph Hellwig Date: Sun Feb 12 13:52:26 2017 -0800 scsi: lpfc: use pci_irq_alloc_vectors and pci_irq_free_vectors This avoids having to store the msix_entries array and simpliefies the shutdown and cleanup path a lot. Signed-off-by: Christoph Hellwig Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 2 - drivers/scsi/lpfc/lpfc_init.c | 240 ++++++++++-------------------------------- drivers/scsi/lpfc/lpfc_sli4.h | 1 - 3 files changed, 54 insertions(+), 189 deletions(-) commit 8ea73db486cda442f0671f4bc9c03a76be398a28 Author: James Smart Date: Sun Feb 12 13:52:25 2017 -0800 scsi: lpfc: Correct WQ creation for pagesize Correct WQ creation for pagesize The driver was calculating the adapter command pagesize indicator from the system pagesize. However, the buffers the driver allocates are only one size (SLI4_PAGE_SIZE), so no calculation was necessary. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 2 ++ drivers/scsi/lpfc/lpfc_sli.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit 943445200b049d5179b95297e5372d399c8ab0e2 Author: Matthew R. Ochs Date: Thu Feb 16 21:39:32 2017 -0600 scsi: cxlflash: Enable PCI device ID for future IBM CXL Flash AFU Add support for a future IBM Coherent Accelerator (CXL) flash AFU with an ID of 0x0624. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 4 ++++ drivers/scsi/cxlflash/main.h | 1 + 2 files changed, 5 insertions(+) commit 857de6e00778738dc3d61f75acbac35bdc48e533 Author: Hannes Reinecke Date: Fri Feb 17 09:02:45 2017 +0100 scsi: use 'scsi_device_from_queue()' for scsi_dh The device handler needs to check if a given queue belongs to a scsi device; only then does it make sense to attach a device handler. [mkp: dropped flags] Cc: Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_dh.c | 22 ++++------------------ drivers/scsi/scsi_lib.c | 23 +++++++++++++++++++++++ include/scsi/scsi_device.h | 1 + 3 files changed, 28 insertions(+), 18 deletions(-) commit f22aaec97d889f3fbf89b185309bdc98b8202eda Author: Subhash Jadavani Date: Fri Feb 17 13:53:41 2017 -0800 scsi: ufs-qcom: remove redundant condition check Dan Carpenter reported this: The patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus registers" from Feb 3, 2017, leads to the following static checker warning: drivers/scsi/ufs/ufs-qcom.c:1531 ufs_qcom_testbus_cfg_is_ok() warn: impossible condition '(host->testbus.select_minor > 255) => (0-255 > 255)' drivers/scsi/ufs/ufs-qcom.c 1517 static bool ufs_qcom_testbus_cfg_is_ok(struct ufs_qcom_host *host) 1518 { 1519 if (host->testbus.select_major >= TSTBUS_MAX) { 1520 dev_err(host->hba->dev, 1521 "%s: UFS_CFG1[TEST_BUS_SEL} may not equal 0x%05X\n", 1522 __func__, host->testbus.select_major); 1523 return false; 1524 } 1525 1526 /* 1527 * Not performing check for each individual select_major 1528 * mappings of select_minor, since there is no harm in 1529 * configuring a non-existent select_minor 1530 */ 1531 if (host->testbus.select_minor > 0xFF) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It might make sense to keep this check. I don't know. But it's confusing that 0xFF is a magic number. Better to make it a define. 1532 dev_err(host->hba->dev, 1533 "%s: 0x%05X is not a legal testbus option\n", 1534 __func__, host->testbus.select_minor); 1535 return false; 1536 } 1537 1538 return true; 1539 } --- As data type of "select_minor" is u8, above check is redundant. This change removes it. Reported-by: Dan Carpenter Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 12 ------------ 1 file changed, 12 deletions(-) commit ed10858eadd4988260c6bc7d75fc25176342b5a7 Author: Arnd Bergmann Date: Fri Feb 17 16:03:52 2017 +0100 scsi: smartpqi: fix time handling When we have turned off RTC support, the smartpqi driver fails to build: ERROR: "rtc_time64_to_tm" [drivers/scsi/smartpqi/smartpqi.ko] undefined! This is easily avoided by using the generic 'struct tm' based helper rather than the RTC specific one. While fixing this, I noticed that even though the driver uses time64_t for storing seconds, it gets them from the old 32-bit struct timeval. To address this, we can simplify the code by calling ktime_get_real_seconds() directly. Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver") Signed-off-by: Arnd Bergmann Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0662cc968aceaca34848e63f431e585f4f71f746 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:24 2017 -0800 scsi: aacraid: Update driver version Updated driver version to 50792 Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d844752e1801099f92c178845f56412861a2b4af Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:23 2017 -0800 scsi: aacraid: Fix a potential spinlock double unlock bug The driver does not unlock the reply queue spin lock after handling SMART adapter events. Instead it might attempt to unlock an already unlocked spin lock. Fixed by making sure the driver locks the spin lock before freeing it. Thank you dan for finding this issue out. Fixes: 6223a39fe6fbbeef (scsi: aacraid: Added support for hotplug) Reported-by: Dan Carpenter Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09624645e1e85df8d68b04de6e0607d696268333 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:22 2017 -0800 scsi: aacraid: Save adapter fib log before an IOP reset Currently the adapter firmware does not save outstanding I/O's log information when an IOP reset is triggered. This is problematic when trying to root cause and debug issues. Fixed by adding sync command to trigger I/O log file save in the adapter firmware before issuing an IOP reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 4 ++++ drivers/scsi/aacraid/aacraid.h | 6 ++++++ drivers/scsi/aacraid/src.c | 17 +++++++++++++++++ 3 files changed, 27 insertions(+) commit c421530bf848604e97d0785a03b3fe2c62775083 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:21 2017 -0800 scsi: aacraid: Reorder Adapter status check The driver currently checks the SELF_TEST_FAILED first and then KERNEL_PANIC next. Under error conditions(boot code failure) both SELF_TEST_FAILED and KERNEL_PANIC can be set at the same time. The driver has the capability to reset the controller on an KERNEL_PANIC, but not on SELF_TEST_FAILED. Fixed by first checking KERNEL_PANIC and then the others. Cc: stable@vger.kernel.org Fixes: e8b12f0fb835223752 ([SCSI] aacraid: Add new code for PMC-Sierra's SRC base controller family) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 146aa1786d4978795cab5347d810e00236dea1c3 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:20 2017 -0800 scsi: aacraid: Skip IOP reset on controller panic(SMART Family) When the SMART family of controller panic (KERNEL_PANIC) , they do not honor IOP resets. So better to skip it and directly perform a IWBR reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 11da1b7c4856de05e00f50f54efe2f5349214d5b Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:19 2017 -0800 scsi: aacraid: Decrease adapter health check interval Currently driver checks the health status of the adapter once every 24 hours. When that happens the driver becomes dependent on the kernel to figure out if the adapter is misbehaving. This might take some time (when the adapter is idle). The driver currently has support to restart/recover the controller when it fails, and decreasing the time interval will help. Fixed by decreasing check interval from 24 hours to 1 minute Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2d0321dd532901ea64118ed5a752fa6e447d1da Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:18 2017 -0800 scsi: aacraid: Reload offlined drives after controller reset During the IOP reset stress testing, it was found that the drives can be marked offline when the adapter controller crashes and IO's are running in parallel. When the controller does come back from the reset, the drive that is marked offline is not exposed. Fixed by removing and adding drives that are marked offline. In addition invoke a scsi host bus rescan to capture any additional configuration changes. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 849ac6a591bf7b5777fdb6ce65030f32a7c73e1a Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:17 2017 -0800 scsi: aacraid: Skip wellness sync on controller failure aac_command_thread checks on the health of controller periodically, using aac_check_health. If the status is an error state KERNEL_PANIC or anything else. The driver will attempt to restart the adapter, but the response is not checked in aac_command_thread. This allows the periodic sync to go thru and lead the driver to a hung state. Fixed by terminating the periodic loop(intended per original design), if the controller is not restored to a healthy state. Cc: stable@vger.kernel.org Fixes: 3d77d8404478353358 (scsi: aacraid: Added support for periodic wellness sync) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7e2c642844cfefd570cb54a8d9fe7b85605311b Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:16 2017 -0800 scsi: aacraid: Fix sync fibs time out on controller reset After controller shutdown, all sync fibs time out due to not knowing about the switch to INT-x mode Fixed by replacing aac_src_access_devreg() to aac_set_intx_mode() call. Cc: stable@vger.kernel.org Fixes: 495c021767bd78c998 (aacraid: MSI-x support) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/comminit.c | 2 +- drivers/scsi/aacraid/src.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 30202e067a81754cb78cb823b7ce7e7cddd040e2 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:15 2017 -0800 scsi: aacraid: Added sysfs for driver version Added support to retrieve driver version from a new sysfs variable called driver_version. It makes it easier for the user to figure out the driver version that is currently running. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1bff5abca65d4b9761fcc992ab6288243220003d Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:14 2017 -0800 scsi: aacraid: Fix memory leak in fib init path aac_fib_map_free frees misaligned fib dma memory, additionally it does not free up the whole memory. Fixed by changing the code to free up the correct and full memory allocation. Cc: stable@vger.kernel.org Fixes: e8b12f0fb835223 ([SCSI] aacraid: Add new code for PMC-Sierra's SRC based controller family) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit a0c6143e95c5b9e1f2d83e005e4e86ed3dc6096f Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:13 2017 -0800 scsi: aacraid: Prevent E3 lockup when deleting units Arrconf management utility at times sends fibs with AdapterProcessed set in its fibs. This causes the controller to panic and lockup. Fixed by failing the commands that have AdapterProcessed set in its flag. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 16ae9dd35d374182ce955063100fce66a9974e74 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:12 2017 -0800 scsi: aacraid: Fix for excessive prints on EEH This issue showed up on a kdump debug(single CPU on powerkvm), when EEH errors rendered the adapter unusable. The driver correctly detected the issue and attempted to restart the controller, in doing so the driver attempted to read the status registers of the controller. This triggered additional eeh errors which continued for a good 6 minutes. Fixed by returning without waiting when EEH error is reported. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit f3ef4a74dc3712ef0ce60d652aa87b1ba70cb2a4 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:11 2017 -0800 scsi: aacraid: Use correct channel number for raw srb The channel being used for raw srb commands is retrieved from the utility sent fibs and is converted into physical channel id. The driver does not need to to do this since the management utility sends the correct channel id in the first place and in addition the driver sets inaccurate information in the cmd sent to the firmware and gets an invalid response. Fixed by using channel id from srb command. Cc: stable@vger.kernel.org Fixes: 423400e64d377c0 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c68856e6ea8abd714415e52ef88943c022e24f0 Author: Raghava Aditya Renukunta Date: Thu Feb 16 12:51:10 2017 -0800 scsi: aacraid: Fix camel case Replaced camel case with snake case for init supported options. Suggested-by: Johannes Thumshirn Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 53 ++++++++++++----------- drivers/scsi/aacraid/aacraid.h | 98 +++++++++++++++++++++--------------------- drivers/scsi/aacraid/commsup.c | 6 +-- drivers/scsi/aacraid/linit.c | 32 +++++++------- drivers/scsi/aacraid/rx.c | 2 +- drivers/scsi/aacraid/src.c | 2 +- 6 files changed, 100 insertions(+), 93 deletions(-) commit 187368a5c7ad6c41159b85025a87d6d136eb8d4b Author: Rex Zhu Date: Wed Feb 15 15:48:40 2017 +0800 drm/amd/powerplay: fix PSI feature on Polars12. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 3 +++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 9 +++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 2 +- 5 files changed, 36 insertions(+), 2 deletions(-) commit d7276e321ff8a53106a59c85ca46d03e34288893 Author: Kees Cook Date: Tue Feb 7 15:18:51 2017 -0800 seccomp: Only dump core when single-threaded The SECCOMP_RET_KILL filter return code has always killed the current thread, not the entire process. Changing this as a side-effect of dumping core isn't a safe thing to do (a few test suites have already flagged this behavioral change). Instead, restore the RET_KILL semantics, but still dump core when a RET_KILL delivers SIGSYS to a single-threaded process. Fixes: b25e67161c29 ("seccomp: dump core when using SECCOMP_RET_KILL") Signed-off-by: Kees Cook Acked-by: Andrei Vagin Signed-off-by: James Morris kernel/seccomp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 124298bd03acebd9c9da29a794718aca31bec1f7 Author: Daniel Roschka Date: Wed Feb 22 15:17:29 2017 -0700 nvme: detect NVMe controller in recent MacBooks Adds support for detection of the NVMe controller found in the following recent MacBooks: - Retina MacBook 2016 (MacBook9,1) - 13" MacBook Pro 2016 without Touch Bar (MacBook13,1) - 13" MacBook Pro 2016 with Touch Bar (MacBook13,2) Signed-off-by: Daniel Roschka Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit eee2faabc63d863a129000b698a2bca54dff643d Author: Alexey Kodanev Date: Wed Feb 22 13:23:56 2017 +0300 tcp: account for ts offset only if tsecr not zero We can get SYN with zero tsecr, don't apply offset in this case. Fixes: ee684b6f2830 ("tcp: send packets with a socket timestamp") Signed-off-by: Alexey Kodanev Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_minisocks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 00355fa5bb89840c48eb11eb6d84c6c3b128a839 Author: Alexey Kodanev Date: Wed Feb 22 13:23:55 2017 +0300 tcp: setup timestamp offset when write_seq already set Found that when randomized tcp offsets are enabled (by default) TCP client can still start new connections without them. Later, if server does active close and re-uses sockets in TIME-WAIT state, new SYN from client can be rejected on PAWS check inside tcp_timewait_state_process(), because either tw_ts_recent or rcv_tsval doesn't really have an offset set. Here is how to reproduce it with LTP netstress tool: netstress -R 1 & netstress -H 127.0.0.1 -lr 1000000 -a1 [...] < S seq 1956977072 win 43690 TS val 295618 ecr 459956970 > . ack 1956911535 win 342 TS val 459967184 ecr 1547117608 < R seq 1956911535 win 0 length 0 +1. < S seq 1956977072 win 43690 TS val 296640 ecr 459956970 > S. seq 657450664 ack 1956977073 win 43690 TS val 459968205 ecr 296640 Fixes: 95a22caee396 ("tcp: randomize tcp timestamp offsets for each connection") Signed-off-by: Alexey Kodanev Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 16 ++++++++++------ net/ipv6/tcp_ipv6.c | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) commit 9f3768e02335ddd6ebe1d85d5cb3a68ee6264004 Author: Frédéric Weisbecker Date: Tue Feb 21 16:18:41 2017 +0100 powerpc: Remove leftover cputime_to_nsecs call causing build error This type conversion is a leftover that got ignored during the kcpustat conversion to nanosecs, resulting in build breakage with config having CONFIG_NO_HZ_FULL=y. arch/powerpc/kernel/time.c: In function 'running_clock': arch/powerpc/kernel/time.c:712:2: error: implicit declaration of function 'cputime_to_nsecs' [-Werror=implicit-function-declaration] return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]); All we need is to remove it. Fixes: e7f340ca9c07 ("powerpc, sched/cputime: Remove unused cputime definitions") Reported-by: Abdul Haleem Signed-off-by: Frederic Weisbecker Signed-off-by: Michael Ellerman arch/powerpc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fda2d27db6eae5c2468f9e4657539b72bbc238bb Author: Aneesh Kumar K.V Date: Wed Feb 22 10:42:02 2017 +0530 powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU We will set LPCR with correct value for radix during int. This make sure we start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR value based on the previous translation mode we were running. Fixes: fe036a0605d60 ("powerpc/64/kexec: Fix MMU cleanup on radix") Cc: stable@vger.kernel.org # v4.9+ Acked-by: Michael Neuling Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 4 ++++ 1 file changed, 4 insertions(+) commit f558b37bf4c35a54e1949f6533f39c64091bf60d Author: Naveen N. Rao Date: Tue Feb 21 20:30:47 2017 +0530 powerpc/optprobes: Fix TOC handling in optprobes trampoline Optprobes on powerpc are limited to kernel text area. We decided to also optimize kretprobe_trampoline since that is also in kernel text area. However,we failed to take into consideration the fact that the same trampoline is also used to catch function returns from kernel modules. As an example: $ sudo modprobe kobject-example $ sudo bash -c "echo 'r foo_show+8' > /sys/kernel/debug/tracing/kprobe_events" $ sudo bash -c "echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable" $ sudo cat /sys/kernel/debug/kprobes/list c000000000041350 k kretprobe_trampoline+0x0 [OPTIMIZED] d000000000e00200 r foo_show+0x8 kobject_example $ cat /sys/kernel/kobject_example/foo Segmentation fault With the below (trimmed) splat in dmesg: Unable to handle kernel paging request for data at address 0xfec40000 Faulting instruction address: 0xc000000000041540 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP [c000000000041540] optimized_callback+0x70/0xe0 LR [c000000000041e60] optinsn_slot+0xf8/0x10000 Call Trace: [c0000000c7327850] [c000000000289af4] alloc_set_pte+0x1c4/0x860 (unreliable) [c0000000c7327890] [c000000000041e60] optinsn_slot+0xf8/0x10000 --- interrupt: 700 at 0xc0000000c7327a80 LR = kretprobe_trampoline+0x0/0x10 [c0000000c7327ba0] [c0000000003a30d4] sysfs_kf_seq_show+0x104/0x1d0 [c0000000c7327bf0] [c0000000003a0bb4] kernfs_seq_show+0x44/0x60 [c0000000c7327c10] [c000000000330578] seq_read+0xf8/0x560 [c0000000c7327cb0] [c0000000003a1e64] kernfs_fop_read+0x194/0x260 [c0000000c7327d00] [c0000000002f9954] __vfs_read+0x44/0x1a0 [c0000000c7327d90] [c0000000002fb4cc] vfs_read+0xbc/0x1b0 [c0000000c7327de0] [c0000000002fd138] SyS_read+0x68/0x110 [c0000000c7327e30] [c00000000000b8e0] system_call+0x38/0xfc Fix this by loading up the kernel TOC before calling into the kernel. The original TOC gets restored as part of the usual pt_regs restore. Fixes: 762df10bad69 ("powerpc/kprobes: Optimize kprobe in kretprobe_trampoline()") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/optprobes_head.S | 7 +++++++ 1 file changed, 7 insertions(+) commit 0333ad4e4f49e14217256e1db1134a70cf60b2de Author: Jaegeuk Kim Date: Thu Dec 29 16:58:54 2016 -0800 f2fs: avoid needless checkpoint in f2fs_trim_fs The f2fs_trim_fs() doesn't need to do checkpoint if there are newly allocated data blocks only which didn't change the critical checkpoint data such as nat and sit entries. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ec7cb62d18d854ea09df8b7194e7e710985f8b9a Author: Andrey Ryabinin Date: Wed Feb 22 12:35:27 2017 +0300 net/dccp: fix use after free in tw_timer_handler() DCCP doesn't purge timewait sockets on network namespace shutdown. So, after net namespace destroyed we could still have an active timer which will trigger use after free in tw_timer_handler(): BUG: KASAN: use-after-free in tw_timer_handler+0x4a/0xa0 at addr ffff88010e0d1e10 Read of size 8 by task swapper/1/0 Call Trace: __asan_load8+0x54/0x90 tw_timer_handler+0x4a/0xa0 call_timer_fn+0x127/0x480 expire_timers+0x1db/0x2e0 run_timer_softirq+0x12f/0x2a0 __do_softirq+0x105/0x5b4 irq_exit+0xdd/0xf0 smp_apic_timer_interrupt+0x57/0x70 apic_timer_interrupt+0x90/0xa0 Object at ffff88010e0d1bc0, in cache net_namespace size: 6848 Allocated: save_stack_trace+0x1b/0x20 kasan_kmalloc+0xee/0x180 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0x134/0x310 copy_net_ns+0x8d/0x280 create_new_namespaces+0x23f/0x340 unshare_nsproxy_namespaces+0x75/0xf0 SyS_unshare+0x299/0x4f0 entry_SYSCALL_64_fastpath+0x18/0xad Freed: save_stack_trace+0x1b/0x20 kasan_slab_free+0xae/0x180 kmem_cache_free+0xb4/0x350 net_drop_ns+0x3f/0x50 cleanup_net+0x3df/0x450 process_one_work+0x419/0xbb0 worker_thread+0x92/0x850 kthread+0x192/0x1e0 ret_from_fork+0x2e/0x40 Add .exit_batch hook to dccp_v4_ops()/dccp_v6_ops() which will purge timewait sockets on net namespace destruction and prevent above issue. Fixes: f2bf415cfed7 ("mib: add net to NET_ADD_STATS_BH") Reported-by: Dmitry Vyukov Signed-off-by: Andrey Ryabinin Acked-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller net/dccp/ipv4.c | 6 ++++++ net/dccp/ipv6.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 2618be7dccf8739b89e1906b64bd8d551af351e6 Author: Dmitry V. Levin Date: Mon Feb 20 14:58:41 2017 +0300 uapi: fix linux/if.h userspace compilation errors Include (guarded by ifndef __KERNEL__) to fix the following linux/if.h userspace compilation errors: /usr/include/linux/if.h:234:19: error: field 'ifru_addr' has incomplete type struct sockaddr ifru_addr; /usr/include/linux/if.h:235:19: error: field 'ifru_dstaddr' has incomplete type struct sockaddr ifru_dstaddr; /usr/include/linux/if.h:236:19: error: field 'ifru_broadaddr' has incomplete type struct sockaddr ifru_broadaddr; /usr/include/linux/if.h:237:19: error: field 'ifru_netmask' has incomplete type struct sockaddr ifru_netmask; /usr/include/linux/if.h:238:20: error: field 'ifru_hwaddr' has incomplete type struct sockaddr ifru_hwaddr; This also fixes userspace compilation of the following uapi headers: linux/atmbr2684.h linux/gsmmux.h linux/if_arp.h linux/if_bonding.h linux/if_frad.h linux/if_pppox.h linux/if_tunnel.h linux/netdevice.h linux/route.h linux/wireless.h As no uapi header provides a definition of struct sockaddr, inclusion of seems to be the most conservative and the only safe fix available. All current users of are very likely to be including already because the latter is the sole provider of struct sockaddr definition in libc, so adding a uapi header with a definition of struct sockaddr would create a potential conflict with . Replacing struct sockaddr in the definition of struct ifreq with a different type would create a potential incompatibility with current users of struct ifreq who might rely on ifru_addr et al members being of type struct sockaddr. Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/if.h | 4 ++++ 1 file changed, 4 insertions(+) commit 12d656af4e3d2781b9b9f52538593e1717e7c979 Author: Ridge Kennedy Date: Wed Feb 22 14:59:49 2017 +1300 l2tp: Avoid schedule while atomic in exit_net While destroying a network namespace that contains a L2TP tunnel a "BUG: scheduling while atomic" can be observed. Enabling lockdep shows that this is happening because l2tp_exit_net() is calling l2tp_tunnel_closeall() (via l2tp_tunnel_delete()) from within an RCU critical section. l2tp_exit_net() takes rcu_read_lock_bh() << list_for_each_entry_rcu() >> l2tp_tunnel_delete() l2tp_tunnel_closeall() __l2tp_session_unhash() synchronize_rcu() << Illegal inside RCU critical section >> BUG: sleeping function called from invalid context in_atomic(): 1, irqs_disabled(): 0, pid: 86, name: kworker/u16:2 INFO: lockdep is turned off. CPU: 2 PID: 86 Comm: kworker/u16:2 Tainted: G W O 4.4.6-at1 #2 Hardware name: Xen HVM domU, BIOS 4.6.1-xs125300 05/09/2016 Workqueue: netns cleanup_net 0000000000000000 ffff880202417b90 ffffffff812b0013 ffff880202410ac0 ffffffff81870de8 ffff880202417bb8 ffffffff8107aee8 ffffffff81870de8 0000000000000c51 0000000000000000 ffff880202417be0 ffffffff8107b024 Call Trace: [] dump_stack+0x85/0xc2 [] ___might_sleep+0x148/0x240 [] __might_sleep+0x44/0x80 [] synchronize_sched+0x2d/0xe0 [] ? trace_hardirqs_on+0xd/0x10 [] ? __local_bh_enable_ip+0x6b/0xc0 [] ? _raw_spin_unlock_bh+0x30/0x40 [] __l2tp_session_unhash+0x172/0x220 [] ? __l2tp_session_unhash+0x87/0x220 [] l2tp_tunnel_closeall+0x9b/0x140 [] l2tp_tunnel_delete+0x14/0x60 [] l2tp_exit_net+0x110/0x270 [] ? l2tp_exit_net+0x9c/0x270 [] ops_exit_list.isra.6+0x33/0x60 [] cleanup_net+0x1b6/0x280 ... This bug can easily be reproduced with a few steps: $ sudo unshare -n bash # Create a shell in a new namespace # ip link set lo up # ip addr add 127.0.0.1 dev lo # ip l2tp add tunnel remote 127.0.0.1 local 127.0.0.1 tunnel_id 1 \ peer_tunnel_id 1 udp_sport 50000 udp_dport 50000 # ip l2tp add session name foo tunnel_id 1 session_id 1 \ peer_session_id 1 # ip link set foo up # exit # Exit the shell, in turn exiting the namespace $ dmesg ... [942121.089216] BUG: scheduling while atomic: kworker/u16:3/13872/0x00000200 ... To fix this, move the call to l2tp_tunnel_closeall() out of the RCU critical section, and instead call it from l2tp_tunnel_del_work(), which is running from the l2tp_wq workqueue. Fixes: 2b551c6e7d5b ("l2tp: close sessions before initiating tunnel delete") Signed-off-by: Ridge Kennedy Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit db690328a7df0b507f7d59de0c7e1bbe8f4b9e6a Author: Stephen Rothwell Date: Wed Feb 15 11:30:03 2017 +1100 RDMA/bnxt_re: fix for "bnxt_en: Update to firmware interface spec 1.7.0." When the firmware interface spec was updated, a constant element was renamed. The rename missed the instances in the bnxt_re driver because it wasn't upstream yet. This updates the bnxt_re driver with the rename. Signed-off-by: Stephen Rothwell Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff2924583b7211b062ee5433924256f99011b0d9 Author: Bhumika Goyal Date: Wed Feb 22 00:17:48 2017 +0530 qlogic: netxen: constify bin_attribute structures Declare bin_attribute structures as const as they are only passed as an arguments to the functions device_remove_bin_file and device_create_bin_file. These function arguments are of type const, so bin_attribute structures having this property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct bin_attribute i@p = {...}; @ok1@ identifier r1.i; position p,p1; @@ ( device_remove_bin_file(...,&i@p) | device_create_bin_file(..., &i@p1) ) @bad@ position p!={r1.p,ok1.p,ok1.p1}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct bin_attribute i; Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0ccea2210c7ed486c688cd05fd1b674d95ef9894 Author: Bhumika Goyal Date: Wed Feb 22 00:11:17 2017 +0530 qlogic: qlcnic_sysfs: constify bin_attribute structures Declare bin_attribute structures as const as they are only passed as an arguments to the functions device_remove_bin_file and device_create_bin_file. These function arguments are of type const, so bin_attribute structures having this property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct bin_attribute i@p = {...}; @ok1@ identifier r1.i; position p,p1; @@ ( device_remove_bin_file(...,&i@p) | device_create_bin_file(..., &i@p1) ) @bad@ position p!={r1.p,ok1.p,ok1.p1}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct bin_attribute i; Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a577ca6badb5261d3fa1bcbb3332ae7874f1a3a2 Author: Christian Lamparter Date: Mon Feb 20 20:10:58 2017 +0100 net: emac: add support for device-tree based PHY discovery and setup This patch adds glue-code that allows the EMAC driver to interface with the existing dt-supported PHYs in drivers/net/phy. Because currently, the emac driver maintains a small library of supported phys for in a private phy.c file located in the drivers directory. The support is limited to mostly single ethernet transceiver like the: CIS8201, BCM5248, ET1011C, Marvell 88E1111 and 88E1112, AR8035. However, routers like the Netgear WNDR4700 and Cisco Meraki MX60(W) have a 5-port switch (AR8327N) attached to the EMAC. The switch chip is supported by the qca8k mdio driver, which uses the generic phy library. Another reason is that PHYLIB also supports the BCM54610, which was used for the Western Digital My Book Live. This will now also make EMAC select PHYLIB. Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/Kconfig | 1 + drivers/net/ethernet/ibm/emac/core.c | 254 +++++++++++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 4 + 3 files changed, 252 insertions(+), 7 deletions(-) commit f2625f7db4dd0bbd16a9c7d2950e7621f9aa57ad Author: Steve Wise Date: Tue Feb 21 11:21:57 2017 -0800 rdma_cm: fail iwarp accepts w/o connection params cma_accept_iw() needs to return an error if conn_params is NULL. Since this is coming from user space, we can crash. Reported-by: Shaobo He Acked-by: Sean Hefty Signed-off-by: Steve Wise Cc: stable@vger.kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 3 +++ 1 file changed, 3 insertions(+) commit 8f4e8dace3d182132c8ffbcf243dda85def6c209 Author: Max Gurtovoy Date: Sun Feb 19 20:08:03 2017 +0200 nvme-rdma: add support for host_traddr This will enable the user to control the specific interface for connection establishment in case the host has more than 1 interface under the same subnet. E.g: Host interfaces configured as: - ib0 1.1.1.1/16 - ib1 1.1.1.2/16 Target interfaces configured as: - ib0 1.1.1.3/16 (listener interface) - ib1 1.1.1.4/16 the following connect command will go through host iface ib0 (default): nvme connect -t rdma -n testsubsystem -a 1.1.1.3 -s 1023 but the following command will go through host iface ib1: nvme connect -t rdma -n testsubsystem -a 1.1.1.3 -s 1023 -w 1.1.1.2 Signed-off-by: Max Gurtovoy Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 6ccaeb56004a14329b033968a687324c96d295bf Author: Christophe JAILLET Date: Sun Feb 19 20:04:38 2017 +0100 nvmet-rdma: Fix error handling According to the preceeding goto, it is likely that 'out_destroy_sq' was expected here. Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a01a6ea2c636769f9d029b026549bebc406094a Author: Max Gurtovoy Date: Mon Feb 20 13:44:29 2017 +0200 nvmet-rdma: use nvme cm status helper Also remove redundant debug prints. Signed-off-by: Max Gurtovoy Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3ee80c3d15b61e61611903033df414a0590cfde9 Author: Max Gurtovoy Date: Mon Feb 20 13:44:28 2017 +0200 nvme-rdma: move nvme cm status helper to .h file This will enable the usage for nvme rdma target. Also move from a lookup array to a switch statement. Signed-off-by: Max Gurtovoy Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 22 ---------------------- include/linux/nvme-rdma.h | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 22 deletions(-) commit faef3af69dd7976315d37316698a436b81d05363 Author: James Smart Date: Fri Feb 17 07:57:28 2017 -0800 nvme-fc: don't bother to validate ioccsz and iorcsz Discovery controllers don't set the values. They are in reserved areas of the Identify Controller data structure. Given the cmd completed, the minimal capsule sizes are supported, so no need to check nqn to detect discovery controllers and special case validations. Signed-off-by: James Smart Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 12 ------------ 1 file changed, 12 deletions(-) commit 9ef3932e250f8e2e11ffbc0c1f28b3ba5dc40cd6 Author: Keith Busch Date: Fri Feb 10 18:15:52 2017 -0500 nvme/pci: No special case for queue busy on IO This driver previously required we have a special check for IO submitted to nvme IO queues that are temporarily suspended. That is no longer necessary since blk-mq provides a quiesce, so any IO that actually gets submitted to such a queue must be ended since the queue isn't going to start back up. This is fixing a condition where we have fewer IO queues after a controller reset. This may happen if the number of CPU's has changed, or controller firmware update changed the queue count, for example. While it may be possible to complete the IO on a different queue, the block layer does not provide a way to resubmit a request on a different hardware context once the request has entered the queue. We don't want these requests to be stuck indefinitely either, so ending them in error is our only option at the moment. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f33447b90e96076483525b21cc4e0a8977cdd07c Author: Keith Busch Date: Fri Feb 10 18:15:51 2017 -0500 nvme/core: Fix race kicking freed request_queue If a namespace has already been marked dead, we don't want to kick the request_queue again since we may have just freed it from another thread. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6db28eda266052f86a6b402422de61eeb7d2e351 Author: Keith Busch Date: Fri Feb 10 18:15:49 2017 -0500 nvme/pci: Disable on removal when disconnected If the device is not present, the driver should disable the queues immediately. Prior to this, the driver was relying on the watchdog timer to kill the queues if requests were outstanding to the device, and that just delays removal up to one second. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c5552fde102fcc3f2cf9e502b8ac90e3500d8fdf Author: Andy Lutomirski Date: Tue Feb 7 10:08:45 2017 -0800 nvme: Enable autonomous power state transitions NVMe devices can advertise multiple power states. These states can be either "operational" (the device is fully functional but possibly slow) or "non-operational" (the device is asleep until woken up). Some devices can automatically enter a non-operational state when idle for a specified amount of time and then automatically wake back up when needed. The hardware configuration is a table. For each state, an entry in the table indicates the next deeper non-operational state, if any, to autonomously transition to and the idle time required before transitioning. This patch teaches the driver to program APST so that each successive non-operational state will be entered after an idle time equal to 100% of the total latency (entry plus exit) associated with that state. The maximum acceptable latency is controlled using dev_pm_qos (e.g. power/pm_qos_latency_tolerance_us in sysfs); non-operational states with total latency greater than this value will not be used. As a special case, setting the latency tolerance to 0 will disable APST entirely. On hardware without APST support, the sysfs file will not be exposed. The latency tolerance for newly-probed devices is set by the module parameter nvme_core.default_ps_max_latency_us. In theory, the device can expose "default" APST table, but this doesn't seem to function correctly on my device (Samsung 950), nor does it seem particularly useful. There is also an optional mechanism by which a configuration can be "saved" so it will be automatically loaded on reset. This can be configured from userspace, but it doesn't seem useful to support in the driver. On my laptop, enabling APST seems to save nearly 1W. The hardware tables can be decoded in userspace with nvme-cli. 'nvme id-ctrl /dev/nvmeN' will show the power state table and 'nvme get-feature -f 0x0c -H /dev/nvme0' will show the current APST configuration. This feature is quirked off on a known-buggy Samsung device. Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 11 ++++ include/linux/nvme.h | 6 ++ 3 files changed, 171 insertions(+) commit bd4da3abaabffdd2472fb7085fcadd5d1d8c2153 Author: Andy Lutomirski Date: Wed Feb 22 13:32:36 2017 -0700 nvme: Add a quirk mechanism that uses identify_ctrl Currently, all NVMe quirks are based on PCI IDs. Add a mechanism to define quirks based on identify_ctrl's vendor id, model number, and/or firmware revision. Reviewed-by: Christoph Hellwig Signed-off-by: Andy Lutomirski Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + 2 files changed, 65 insertions(+) commit e5a39dd8238e5d42c830bbd8d31211adf6fea6ca Author: Johannes Thumshirn Date: Fri Jan 27 09:03:45 2017 +0100 nvme: make nvmf_register_transport require a create_ctrl callback nvmf_create_ctrl() relys on the presence of a create_crtl callback in the registered nvmf_transport_ops, so make nvmf_register_transport require one. Update the available call-sites as well to reflect these changes. Signed-off-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 7 ++++++- drivers/nvme/host/fabrics.h | 2 +- drivers/nvme/host/fc.c | 3 +-- drivers/nvme/host/rdma.c | 3 +-- drivers/nvme/target/loop.c | 3 +-- 5 files changed, 10 insertions(+), 8 deletions(-) commit 986994a27587efd8ce4c595cab89b570f7475359 Author: Parav Pandit Date: Thu Jan 26 17:17:28 2017 +0200 nvme: Use CNS as 8-bit field and avoid endianness conversion This patch defines CNS field as 8-bit field and avoids cpu_to/from_le conversions. Also initialize nvme_command cns value explicitly to NVME_ID_CNS_NS for readability (don't rely on the fact that NVME_ID_CNS_NS = 0). Reviewed-by: Max Gurtovoy Signed-off-by: Parav Pandit Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 +++-- drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/discovery.c | 4 ++-- include/linux/nvme.h | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) commit 778f067c185ce56d06aedb5fba5a0e98bb464f7b Author: Max Gurtovoy Date: Thu Jan 26 17:17:27 2017 +0200 nvme: add semicolon in nvme_command setting Reviewed-by: Parav Pandit Signed-off-by: Max Gurtovoy Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2dbf5816bb52ee3198882c1d198440e4bac62253 Author: Max Gurtovoy Date: Mon Jan 23 11:01:12 2017 +0200 nvmet: avoid dereferencing nvmet_req No need to dereference req twice to get the cmd when we already have it stored in a local variable. Signed-off-by: Max Gurtovoy Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/fabrics-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8432bdb2905713cb3ef5cbe4a72630fa575565ad Author: Sagi Grimberg Date: Mon Nov 28 01:47:40 2016 +0200 nvme: Make controller state visible via sysfs Easier for debugging and testing state machine transitions. Signed-off-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 15fbad96fc5fb1c5a0502e6a10dea671f510de3d Author: Sagi Grimberg Date: Mon Nov 14 14:24:21 2016 +0200 nvmet: Make cntlid globally unique We usually log the cntlid which is confusing in case we have multiple subsystems each with it's own cntlid ida. Instead make cntlid ida globally unique and log the initial association. Signed-off-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 10 ++++------ drivers/nvme/target/fabrics-cmd.c | 4 ++-- drivers/nvme/target/nvmet.h | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) commit f64935abbfcedf47a23ad0345f625b1903d965d2 Author: James Smart Date: Sat Dec 24 09:46:44 2016 -0800 nvmet_fc: cleanup of abort flag processing in fcp_op_done Cleanup of abort flag processing in fcp_op_done. References were unnecessary Signed-off-by: James Smart Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b38b9054989f33d2e06f1979f90973030ddc17db Author: Colin Ian King Date: Tue Dec 27 16:04:09 2016 +0000 nvme: admin-cmd: fix spelling mistake: "Counld" -> "Could" trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86dd815ff74ab9eda474d1c28428ac0db2c3032 Author: Jens Axboe Date: Wed Feb 22 13:19:45 2017 -0700 block: get rid of blk-mq default scheduler choice Kconfig entries The wording in the entries were poor and not understandable by even deities. Kill the selection for default block scheduler, and impose a policy with sane defaults. Architected-by: Linus Torvalds Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/Kconfig.iosched | 44 -------------------------------------------- block/blk-mq-sched.c | 9 --------- block/elevator.c | 19 +++++++++++++------ 3 files changed, 13 insertions(+), 59 deletions(-) commit 37c85961c3f87f2141c84e53df31e59db072fd2e Merge: caa5942 d8a4995 Author: Linus Torvalds Date: Wed Feb 22 12:17:25 2017 -0800 Merge tag 'tty-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver updates from Greg KH: "Here is the big tty/serial driver patchset for 4.11-rc1. Not much here, but a lot of little fixes and individual serial driver updates all over the subsystem. Majority are for the sh-sci driver and platform (the arch-specific changes have acks from the maintainer). The start of the "serial bus" code is here as well, but nothing is converted to use it yet. That work is still ongoing, hopefully will start to show up across different subsystems for 4.12 (bluetooth is one major place that will be used.) All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (109 commits) tty: pl011: Work around QDF2400 E44 stuck BUSY bit atmel_serial: Use the fractional divider when possible tty: Remove extra include in HVC console tty framework serial: exar: Enable MSI support serial: exar: Move register defines from uapi header to consumer site serial: pci: Remove unused pci_boards entries serial: exar: Move Commtech adapters to 8250_exar as well serial: exar: Fix feature control register constants serial: exar: Fix initialization of EXAR registers for ports > 0 serial: exar: Fix mapping of port I/O resources serial: sh-sci: fix hardware RX trigger level setting tty/serial: atmel: ensure state is restored after suspending serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt serdev: ttyport: check whether tty_init_dev() fails serial: 8250_pci: make pciserial_detach_ports() static ARM: dts: STiH410-b2260: Enable HW flow-control ARM: dts: STiH407-family: Use new Pinctrl groups ARM: dts: STiH407-pinctrl: Add Pinctrl group for HW flow-control ARM: dts: STiH410-b2260: Identify the UART RTS line dt-bindings: serial: Update 'uart-has-rtscts' description ... commit a5e14c9376871ee74fe93fdcb380c5d54eaa2d43 Author: Trond Myklebust Date: Fri Feb 17 19:50:18 2017 -0500 Revert "NFSv4.1: Handle NFS4ERR_BADSESSION/NFS4ERR_DEADSESSION replies to OP_SEQUENCE" This reverts commit 2cf10cdd486c362f983abdce00dc1127e8ab8c59. The patch has been seen to cause excessive looping. Reported-by: Olga Kornievskaia Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # 4.10+ Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 4 ---- 1 file changed, 4 deletions(-) commit caa59428971d5ad81d19512365c9ba580d83268c Merge: b206461 0a44127 Author: Linus Torvalds Date: Wed Feb 22 12:14:01 2017 -0800 Merge tag 'staging-4.11-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 patchsets for 4.11-rc1. We almost broke even this time around, with only a few thousand lines added overall, as we removed the old and obsolete i4l code, but added some new drivers for the RPi platform, as well as adding some new IIO drivers. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits) Staging: vc04_services: Fix the "space prohibited" code style errors Staging: vc04_services: Fix the "wrong indent" code style errors staging: octeon: Use net_device_stats from struct net_device Staging: rtl8192u: ieee80211: ieee80211.h - style fix Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Staging: rtl8192u: r8192U.h - style fix Staging: rtl8192u: r8192U_core.c - style fix Staging: rtl8192u: r819xU_cmdpkt.c - style fix staging: rtl8192u: blank lines aren't necessary before a close brace '}' staging: rtl8192u: Adding space after enum and struct definition staging: rtl8192u: Adding space after struct definition Staging: ks7010: Add required and preferred spaces around operators Staging: ks7010: ks*: Remove redundant blank lines Staging: ks7010: ks*: Add missing blank lines after declarations staging: visorbus, replace init_timer with setup_timer staging: vt6656: rxtx.c Removed multiple dereferencing staging: vt6656: Alignment match open parenthesis ... commit b2064617c74f301dab1448f1f9c8dbb3c8021058 Merge: e30aee9 1762715 Author: Linus Torvalds Date: Wed Feb 22 11:44:32 2017 -0800 Merge tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "small" driver core patches for 4.11-rc1. Not much here, some firmware documentation and self-test updates, a debugfs code formatting issue, and a new feature for call_usermodehelper to make it more robust on systems that want to lock it down in a more secure way. All of these have been linux-next for a while now with no reported issues" * tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kernfs: handle null pointers while printing node name and path Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Make static usermode helper binaries constant kmod: make usermodehelper path a const string firmware: revamp firmware documentation selftests: firmware: send expected errors to /dev/null selftests: firmware: only modprobe if driver is missing platform: Print the resource range if device failed to claim kref: prefer atomic_inc_not_zero to atomic_add_unless debugfs: improve formatting of debugfs_real_fops() commit e30aee9e10bb5168579e047f05c3d13d09e23356 Merge: 8ff546b 6cf18e6 Author: Linus Torvalds Date: Wed Feb 22 11:38:22 2017 -0800 Merge tag 'char-misc-4.11-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 patchset for 4.11-rc1. Lots of different driver subsystems updated here: rework for the hyperv subsystem to handle new platforms better, mei and w1 and extcon driver updates, as well as a number of other "minor" driver updates. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (169 commits) goldfish: Sanitize the broken interrupt handler x86/platform/goldfish: Prevent unconditional loading vmbus: replace modulus operation with subtraction vmbus: constify parameters where possible vmbus: expose hv_begin/end_read vmbus: remove conditional locking of vmbus_write vmbus: add direct isr callback mode vmbus: change to per channel tasklet vmbus: put related per-cpu variable together vmbus: callback is in softirq not workqueue binder: Add support for file-descriptor arrays binder: Add support for scatter-gather binder: Add extra size to allocator binder: Refactor binder_transact() binder: Support multiple /dev instances binder: Deal with contexts in debugfs binder: Support multiple context managers binder: Split flat_binder_object auxdisplay: ht16k33: remove private workqueue auxdisplay: ht16k33: rework input device initialization ... commit 4deaa6fd00be2bf408dd06cdf0c40a1b59237879 Author: Arnd Bergmann Date: Wed Feb 22 11:21:22 2017 -0800 usercopy: ARM NOMMU has no 64-bit get_user On a NOMMU ARM kernel, we get this link error: ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined! The problem is that the extended get_user/put_user definitions were only added for the normal (MMU based) case. We could add it for NOMMU as well, but it seems easier to just not call it, since no other code needs it. Fixes: 4c5d7bc63775 ("usercopy: Add tests for all get_user() sizes") Signed-off-by: Arnd Bergmann Signed-off-by: Kees Cook lib/test_user_copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ff546b801e5cca0337c0f0a7234795d0a6309a1 Merge: ca78d31 0df8a3d Author: Linus Torvalds Date: Wed Feb 22 11:15:59 2017 -0800 Merge tag 'usb-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big USB and PHY driver updates for 4.11-rc1. Nothing major, just the normal amount of churn in the usb gadget and dwc and xhci controllers, new device ids, new phy drivers, a new usb-serial driver, and a few other minor changes in different USB drivers. All have been in linux-next for a long time with no reported issues" * tag 'usb-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (265 commits) usb: cdc-wdm: remove logically dead code USB: serial: keyspan: drop header file USB: serial: io_edgeport: drop io-tables header file usb: musb: add code comment for clarification usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver usb: misc: usbtest: remove redundant check on retval < 0 USB: serial: upd78f0730: sort device ids USB: serial: upd78f0730: add ID for EVAL-ADXL362Z ohci-hub: fix typo in dbg_port macro usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS usb: musb: tusb6010: Clean up tusb_omap_dma structure usb: musb: cppi_dma: Clean up cppi41_dma_controller structure usb: musb: cppi_dma: Clean up cppi structure usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback() usb: musb: dma: Add a DMA completion platform callback drivers: usb: usbip: Add missing break statement to switch usb: mtu3: remove redundant dev_err call in get_ssusb_rscs() USB: serial: mos7840: fix another NULL-deref at open USB: serial: console: clean up sanity checks USB: serial: console: fix uninitialised spinlock ... commit 9a87ad3da905239413477ac0698734afc5cc30bd Author: Miklos Szeredi Date: Wed Feb 22 20:08:25 2017 +0100 fuse: release: private_data cannot be NULL Signed-off-by: Miklos Szeredi fs/fuse/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 267d84449f52349ee252db684ed95ede18e51744 Author: Miklos Szeredi Date: Wed Feb 22 20:08:25 2017 +0100 fuse: cleanup fuse_file refcounting struct fuse_file is stored in file->private_data. Make this always be a counting reference for consistency. This also allows fuse_sync_release() to call fuse_file_put() instead of partially duplicating its functionality. Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 2 +- fs/fuse/file.c | 18 +++++++++--------- fs/fuse/fuse_i.h | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) commit 2e38bea99a80eab408adee27f873a188d57b76cb Author: Miklos Szeredi Date: Wed Feb 22 20:08:25 2017 +0100 fuse: add missing FR_FORCE fuse_file_put() was missing the "force" flag for the RELEASE request when sending synchronously (fuseblk). If this flag is not set, then a sync request may be interrupted before it is dequeued by the userspace filesystem. In this case the OPEN won't be balanced with a RELEASE. Signed-off-by: Miklos Szeredi Fixes: 5a18ec176c93 ("fuse: fix hang of single threaded fuseblk filesystem") Cc: # v2.6.38+ fs/fuse/file.c | 1 + 1 file changed, 1 insertion(+) commit eed64951f15d63beac75e0f848ac03c14f8a4a6c Author: Jon Derrick Date: Wed Feb 22 07:55:13 2017 -0700 block/sed: Embed function data into the function sequence By embedding the function data with the function sequence, we can eliminate the external function data and state variable code. It also made obvious some other small cleanups. Signed-off-by: Jon Derrick Reviewed-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 418 ++++++++++++++++++++++--------------------------------- 1 file changed, 163 insertions(+), 255 deletions(-) commit 48efbfbf6353af15d97ef37216146e550403c773 Author: Tobin C. Harding Date: Wed Feb 22 17:12:38 2017 +1100 cciss: Remove kmalloc cast Coccinelle emits a warning about casting the return value of kmalloc(). Coccinelle suggests removing the cast as do kerneljanitors. Remove cast from kmalloc() call. Signed-off-by: Tobin C. Harding Acked-by: Don Brace Signed-off-by: Jens Axboe drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 19a5e10c3b53772cfe47a23963ebcb941d81e695 Author: Tobin C. Harding Date: Wed Feb 22 17:12:37 2017 +1100 cciss: Fix checkpatch OPEN_BRACE Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding Acked-by: Don Brace Signed-off-by: Jens Axboe drivers/block/cciss_scsi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit f0889638456b2da341f35f3c841adfe4bdb88e5c Author: Tobin C. Harding Date: Wed Feb 22 17:12:36 2017 +1100 cciss: Fix checkpatch TRAILING_WHITESPACE Checkpatch emits 85 trailing whitespace warnings. Remove trailing whitespace. Signed-off-by: Tobin C. Harding Acked-by: Don Brace Signed-off-by: Jens Axboe drivers/block/cciss_scsi.c | 170 ++++++++++++++++++++++----------------------- 1 file changed, 85 insertions(+), 85 deletions(-) commit 77039b96316d119cea23f48b617103d50e78b840 Author: Jon Derrick Date: Tue Feb 21 11:59:15 2017 -0700 block/sed: Check received header lengths Add a buffer size check against discovery and response header lengths before we loop over their buffers. Signed-off-by: Jon Derrick Reviewed-by: Scott Bauer Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/sed-opal.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit cccb92417d447172c4653876f6cd4b04c29d7905 Author: Jon Derrick Date: Tue Feb 21 11:59:14 2017 -0700 block/sed: Add helper to qualify response tokens Add helper which verifies the response token is valid and matches the expected value. Merges token_type and response_get_token. Signed-off-by: Jon Derrick Reviewed-by: Scott Bauer Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/sed-opal.c | 61 +++++++++++++++++++++++--------------------------------- 1 file changed, 25 insertions(+), 36 deletions(-) commit aedb6e2411baf242fd0faf95bd3ff0dc62ee1fa5 Author: Jon Derrick Date: Tue Feb 21 11:59:13 2017 -0700 block/sed: Use ssize_t on atom parsers to return errors The short atom parser can return an errno from decoding but does not currently return the error as a signed value. Convert all of the parsers to ssize_t. Signed-off-by: Jon Derrick Reviewed-by: Scott Bauer Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/sed-opal.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 9d8cacbf5636657d2cd0dda17438a56d806d3224 Author: Trond Myklebust Date: Fri Feb 17 18:42:32 2017 -0500 NFSv4: Fix reboot recovery in copy offload Copy offload code needs to be hooked into the code for handling NFS4ERR_BAD_STATEID by ensuring that we set the "stateid" field in struct nfs4_exception. Reported-by: Olga Kornievskaia Fixes: 2e72448b07dc3 ("NFS: Add COPY nfs operation") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 63 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit ca78d3173cff3503bcd15723b049757f75762d15 Merge: a4ee7ba ffe7afd Author: Linus Torvalds Date: Wed Feb 22 10:46:44 2017 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: - Errata workarounds for Qualcomm's Falkor CPU - Qualcomm L2 Cache PMU driver - Qualcomm SMCCC firmware quirk - Support for DEBUG_VIRTUAL - CPU feature detection for userspace via MRS emulation - Preliminary work for the Statistical Profiling Extension - Misc cleanups and non-critical fixes * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (74 commits) arm64/kprobes: consistently handle MRS/MSR with XZR arm64: cpufeature: correctly handle MRS to XZR arm64: traps: correctly handle MRS/MSR with XZR arm64: ptrace: add XZR-safe regs accessors arm64: include asm/assembler.h in entry-ftrace.S arm64: fix warning about swapper_pg_dir overflow arm64: Work around Falkor erratum 1003 arm64: head.S: Enable EL1 (host) access to SPE when entered at EL2 arm64: arch_timer: document Hisilicon erratum 161010101 arm64: use is_vmalloc_addr arm64: use linux/sizes.h for constants arm64: uaccess: consistently check object sizes perf: add qcom l2 cache perf events driver arm64: remove wrong CONFIG_PROC_SYSCTL ifdef ARM: smccc: Update HVC comment to describe new quirk parameter arm64: do not trace atomic operations ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device() ACPI/IORT: Fix iort_node_get_id() mapping entries indexing arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA perf: xgene: Include module.h ... commit d9d84780f17cd9e25ddde10eb40357b96b7d6874 Author: Changbin Du Date: Mon Feb 6 15:03:37 2017 +0800 vfio: fix a typo in comment of function vfio_pin_pages Correct the description that 'unpinned' -> 'pinned'. Signed-off-by: Changbin Du Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4ee7bacd6c08479d56738456c07e4f32fc8e523 Merge: 38705613 8ba605b Author: Linus Torvalds Date: Wed Feb 22 10:33:53 2017 -0800 Merge tag 'arc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - Intc imporvements [Yuriy] - VDK platform updates [Alexey] * tag 'arc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-*] ARC_HAS_COH_CACHES no longer relevant ARCv2: intc: Delete useless comments in Device Trees ARCv2: IDU-intc: Delete deprecated parameters in Device Trees ARCv2: IDU-intc: mask all common interrupts by default ARCv2: IDU-intc: Use build registers for getting numbers of interrupts ARCv2: intc: Set default priority for all core interrupts ARCv2: intc: Use runtime value of irq count for setting up intc ARCv2: intc: Rework the build time irq count information ARC: [intc-*]: confine NR_CPU_IRQS to intc code ARCv2: intc: Use ARC_REG_STATUS32 for addressing STATUS32 reg arc: vdk: Add support of UIO arc: vdk: Add support of MMC controller arc: vdk: Disable halt on reset commit 38705613b74ab090eee55c327cd0cb77fb10eb26 Merge: ff47d8c 438e69b Author: Linus Torvalds Date: Wed Feb 22 10:30:38 2017 -0800 Merge tag 'powerpc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights include: - Support for direct mapped LPC on POWER9, giving Linux direct access to devices that may be on there such as a UART. - Memory hotplug support for the Power9 Radix MMU. - Add new AUX vectors describing the processor's cache geometry, to be used by glibc. - The ability for a guest to ask the hypervisor to resize the guest's hash table, and in addition support for doing so automatically when memory is hotplugged into/out-of the guest. This allows the hash table to be sized based on the current memory usage of the guest, rather than the maximum possible memory usage. - Implementation of optprobes (kprobe optimisation) for powerpc. In addition there's the topic branch shared with the KVM tree, which includes support for guests to use the Radix MMU on Power9. Thanks to: Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju T, Anton Blanchard, Benjamin Herrenschmidt, Chris Packham, Daniel Axtens, Daniel Borkmann, David Gibson, Finn Thain, Gautham R. Shenoy, Gavin Shan, Greg Kurz, Joel Stanley, John Allen, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring, Michael Neuling, Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Paul Mackerras, Ravi Bangoria, Reza Arbab, Shailendra Singh, Vaibhav Jain, Wei Yongjun" * tag 'powerpc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (129 commits) powerpc/mm/radix: Skip ptesync in pte update helpers powerpc/mm/radix: Use ptep_get_and_clear_full when clearing pte for full mm powerpc/mm/radix: Update pte update sequence for pte clear case powerpc/mm: Update PROTFAULT handling in the page fault path powerpc/xmon: Fix data-breakpoint powerpc/mm: Fix build break with BOOK3S_64=n and MEMORY_HOTPLUG=y powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n powerpc/pseries: Fix typo in parameter description powerpc/kprobes: Remove kprobe_exceptions_notify() kprobes: Introduce weak variant of kprobe_exceptions_notify() powerpc/ftrace: Fix confusing help text for DISABLE_MPROFILE_KERNEL powerpc/powernv: Fix opal_exit tracepoint opcode powerpc: Add a prototype for mcount() so it can be versioned powerpc: Drop GPL from of_node_to_nid() export to match other arches powerpc/kprobes: Optimize kprobe in kretprobe_trampoline() powerpc/kprobes: Implement Optprobes powerpc/kprobes: Fixes for kprobe_lookup_name() on BE powerpc: Add helper to check if offset is within relative branch range powerpc/bpf: Introduce __PPC_SH64() ... commit ff47d8c05019d6e7753cef270d6399cb5a33be57 Merge: 3051bf3 d24b98e Author: Linus Torvalds Date: Wed Feb 22 10:20:04 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - New entropy generation for the pseudo random number generator. - Early boot printk output via sclp to help debug crashes on boot. This needs to be enabled with a kernel parameter. - Add proper no-execute support with a bit in the page table entry. - Bug fixes and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (65 commits) s390/syscall: fix single stepped system calls s390/zcrypt: make ap_bus explicitly non-modular s390/zcrypt: Removed unneeded debug feature directory creation. s390: add missing "do {} while (0)" loop constructs to multiline macros s390/mm: add cond_resched call to kernel page table dumper s390: get rid of MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE s390/mm: make memory_block_size_bytes available for !MEMORY_HOTPLUG s390: replace ACCESS_ONCE with READ_ONCE s390: Audit and remove any remaining unnecessary uses of module.h s390: mm: Audit and remove any unnecessary uses of module.h s390: kernel: Audit and remove any unnecessary uses of module.h s390/kdump: Use "LINUX" ELF note name instead of "CORE" s390: add no-execute support s390: report new vector facilities s390: use correct input data address for setup_randomness s390/sclp: get rid of common response code handling s390/sclp: don't add new lines to each printed string s390/sclp: make early sclp code readable s390/sclp: disable early sclp code as soon as the base sclp driver is active s390/sclp: move early printk code to drivers ... commit 3051bf36c25d5153051704291782f8d44e744d36 Merge: 1e74a2e 005c349 Author: Linus Torvalds Date: Wed Feb 22 10:15:09 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Highlights: 1) Support TX_RING in AF_PACKET TPACKET_V3 mode, from Sowmini Varadhan. 2) Simplify classifier state on sk_buff in order to shrink it a bit. From Willem de Bruijn. 3) Introduce SIPHASH and it's usage for secure sequence numbers and syncookies. From Jason A. Donenfeld. 4) Reduce CPU usage for ICMP replies we are going to limit or suppress, from Jesper Dangaard Brouer. 5) Introduce Shared Memory Communications socket layer, from Ursula Braun. 6) Add RACK loss detection and allow it to actually trigger fast recovery instead of just assisting after other algorithms have triggered it. From Yuchung Cheng. 7) Add xmit_more and BQL support to mvneta driver, from Simon Guinot. 8) skb_cow_data avoidance in esp4 and esp6, from Steffen Klassert. 9) Export MPLS packet stats via netlink, from Robert Shearman. 10) Significantly improve inet port bind conflict handling, especially when an application is restarted and changes it's setting of reuseport. From Josef Bacik. 11) Implement TX batching in vhost_net, from Jason Wang. 12) Extend the dummy device so that VF (virtual function) features, such as configuration, can be more easily tested. From Phil Sutter. 13) Avoid two atomic ops per page on x86 in bnx2x driver, from Eric Dumazet. 14) Add new bpf MAP, implementing a longest prefix match trie. From Daniel Mack. 15) Packet sample offloading support in mlxsw driver, from Yotam Gigi. 16) Add new aquantia driver, from David VomLehn. 17) Add bpf tracepoints, from Daniel Borkmann. 18) Add support for port mirroring to b53 and bcm_sf2 drivers, from Florian Fainelli. 19) Remove custom busy polling in many drivers, it is done in the core networking since 4.5 times. From Eric Dumazet. 20) Support XDP adjust_head in virtio_net, from John Fastabend. 21) Fix several major holes in neighbour entry confirmation, from Julian Anastasov. 22) Add XDP support to bnxt_en driver, from Michael Chan. 23) VXLAN offloads for enic driver, from Govindarajulu Varadarajan. 24) Add IPVTAP driver (IP-VLAN based tap driver) from Sainath Grandhi. 25) Support GRO in IPSEC protocols, from Steffen Klassert" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1764 commits) Revert "ath10k: Search SMBIOS for OEM board file extension" net: socket: fix recvmmsg not returning error from sock_error bnxt_en: use eth_hw_addr_random() bpf: fix unlocking of jited image when module ronx not set arch: add ARCH_HAS_SET_MEMORY config net: napi_watchdog() can use napi_schedule_irqoff() tcp: Revert "tcp: tcp_probe: use spin_lock_bh()" net/hsr: use eth_hw_addr_random() net: mvpp2: enable building on 64-bit platforms net: mvpp2: switch to build_skb() in the RX path net: mvpp2: simplify MVPP2_PRS_RI_* definitions net: mvpp2: fix indentation of MVPP2_EXT_GLOBAL_CTRL_DEFAULT net: mvpp2: remove unused register definitions net: mvpp2: simplify mvpp2_bm_bufs_add() net: mvpp2: drop useless fields in mvpp2_bm_pool and related code net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue' net: mvpp2: release reference to txq_cpu[] entry after unmapping net: mvpp2: handle too large value in mvpp2_rx_time_coal_set() net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set() net: mvpp2: remove useless arguments in mvpp2_rx_{pkts, time}_coal_set ... commit 1e74a2eb1f5cc7f2f2b5aa9c9eeecbcf352220a3 Merge: 7bb0338 c054ee3 Author: Linus Torvalds Date: Wed Feb 22 09:05:47 2017 -0800 Merge tag 'gcc-plugins-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins updates from Kees Cook: "This includes infrastructure updates and the structleak plugin, which performs forced initialization of certain structures to avoid possible information exposures to userspace. Summary: - infrastructure updates (gcc-common.h) - introduce structleak plugin for forced initialization of some structures" * tag 'gcc-plugins-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: Add structleak for more stack initialization gcc-plugins: consolidate on PASS_INFO macro gcc-plugins: add PASS_INFO and build_const_char_string() commit df3ab232e462bce20710596d697ade6b72497694 Author: Trond Myklebust Date: Fri Feb 17 19:49:09 2017 -0500 pNFS/flexfiles: If the layout is invalid, it must be updated before retrying If we see that our pNFS READ/WRITE/COMMIT operation failed, but we also see that our layout segment is no longer valid, then we need to get a new layout segment before retrying. Fixes: 90816d1ddacf ("NFSv4.1/flexfiles: Don't mark the entire deviceid...") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit c74fd80f2f41d05f350bb478151021f88551afe8 Author: Dan Streetman Date: Fri Jan 13 15:07:51 2017 -0500 xen: do not re-use pirq number cached in pci device msi msg data Revert the main part of commit: af42b8d12f8a ("xen: fix MSI setup and teardown for PV on HVM guests") That commit introduced reading the pci device's msi message data to see if a pirq was previously configured for the device's msi/msix, and re-use that pirq. At the time, that was the correct behavior. However, a later change to Qemu caused it to call into the Xen hypervisor to unmap all pirqs for a pci device, when the pci device disables its MSI/MSIX vectors; specifically the Qemu commit: c976437c7dba9c7444fb41df45468968aaa326ad ("qemu-xen: free all the pirqs for msi/msix when driver unload") Once Qemu added this pirq unmapping, it was no longer correct for the kernel to re-use the pirq number cached in the pci device msi message data. All Qemu releases since 2.1.0 contain the patch that unmaps the pirqs when the pci device disables its MSI/MSIX vectors. This bug is causing failures to initialize multiple NVMe controllers under Xen, because the NVMe driver sets up a single MSIX vector for each controller (concurrently), and then after using that to talk to the controller for some configuration data, it disables the single MSIX vector and re-configures all the MSIX vectors it needs. So the MSIX setup code tries to re-use the cached pirq from the first vector for each controller, but the hypervisor has already given away that pirq to another controller, and its initialization fails. This is discussed in more detail at: https://lists.xen.org/archives/html/xen-devel/2017-01/msg00447.html Fixes: af42b8d12f8a ("xen: fix MSI setup and teardown for PV on HVM guests") Signed-off-by: Dan Streetman Reviewed-by: Stefano Stabellini Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Boris Ostrovsky arch/x86/pci/xen.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 7086b7b3d101e0e6fca2bf7ca2f14483fc881837 Author: Takashi Iwai Date: Wed Feb 22 08:37:41 2017 +0100 ALSA: usb-audio: Tidy up mixer_us16x08.c A few more cleanups and improvements that have been overlooked: - Use ARRAY_SIZE() macro appropriately - Code shuffling for minor optimization - Omit superfluous variable initializations - Get rid of superfluous NULL checks - Add const to snd_us16x08_control_params definitions No functional changes. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 132 ++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 82 deletions(-) commit e2810d76c5f3b0152fa0f7c40170e123b33e058c Author: Takashi Iwai Date: Wed Feb 22 08:00:25 2017 +0100 ALSA: usb-audio: Fix memory leak and corruption in mixer_us16x08.c There are a few places leaking memory and doing double-free in mixer_us16x08.c. The driver allocates a usb_mixer_elem_info object at each add_new_ctl() call. This has to be freed via kctl->private_free, but currently this is done properly only for some controls. Also, the driver allocates three external objects (comp_store, eq_store, meter_store), and these are referred in elem->private_data (it's not kctl->private_data). And these have to be released, but there are none doing it. Moreover, these extra objects have to be released only once. Thus the release should be done only by the first kctl element that refers to it. For fixing these, we call either snd_usb_mixer_elem_free() (only for kctl->private_data) or elem_private_free() (for both kctl->private_data and elem->private_data) via kctl->private_free appropriately. Last but not least, snd_us16x08_controls_create() may return in the middle without releasing the allocated *_store objects due to an error. For fixing this, we shuffle the allocation code so that it's called just before its reference. Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Reported-by: Takashi Sakamoto Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 92 ++++++++++++++++++++--------------------------- sound/usb/mixer_us16x08.h | 1 - 2 files changed, 39 insertions(+), 54 deletions(-) commit c37a01779b3954d9c8f9ac4f663a03c11f69fded Author: Andy Shevchenko Date: Wed Feb 15 16:42:21 2017 +0200 iommu/vt-d: Fix crash on boot when DMAR is disabled By default CONFIG_INTEL_IOMMU_DEFAULT_ON is not set and thus dmar_disabled variable is set. Intel IOMMU driver based on above doesn't set intel_iommu_enabled variable. The commit b0119e870837 ("iommu: Introduce new 'struct iommu_device'") mistakenly assumes it never happens and tries to unregister not ever registered resources, which crashes the kernel at boot time: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: iommu_device_unregister+0x31/0x60 Make unregister procedure conditional in free_iommu(). Fixes: b0119e870837 ("iommu: Introduce new 'struct iommu_device'") Cc: Joerg Roedel Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 01625cc5e65f420dbea57f7de6b9552a0f807a84 Author: Bjorn Andersson Date: Wed Feb 15 14:00:41 2017 -0800 remoteproc: qcom: mdt_loader: Use signed type for offset In the transition from using rproc_da_to_va(), the type of the load offset became unsigned. This causes the subsequent check to let negative values less than p_memsz + mem_size through and we write outside of the buffer. Change the type back to a signed value to catch this. Fixes: 7f0dd07a9b29 ("remoteproc: qcom: mdt_loader: Refactor MDT loader") Fixes: e7fd25226295 ("remoteproc: qcom: q6v5: Decouple driver from MDT loader") Reported-by: Dan Carpenter Reported-by: Stanimir Varbanov Acked-by: Andy Gross Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 2 +- drivers/soc/qcom/mdt_loader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6fefe19f583625ca4ea3ecc9128baa51c31c60a4 Merge: d9cc34a ee73bcd da8c1c4 2f96c03 Author: Zhang Rui Date: Wed Feb 22 15:35:06 2017 +0800 Merge branches 'thermal-core', 'thermal-soc', 'thermal-intel' and 'ida-conversion' into next commit ee73bcdb0b1aab35654912d10f07da0176848a87 Author: Hongtao Jia Date: Wed Jan 4 16:57:51 2017 +0800 powerpc/mpc85xx: Update TMU device tree node for T1023/T1024 Update #thermal-sensor-cells from 0 to 1 according to the new binding. The sensor specifier added is the monitoring site ID, and represents the "n" in TRITSRn and TRATSRn. Signed-off-by: Jia Hongtao Acked-by: Scott Wood Signed-off-by: Zhang Rui arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 734211cb621fb2861d7adcd7d2c06be8c6ef8993 Author: Hongtao Jia Date: Wed Jan 4 16:57:50 2017 +0800 powerpc/mpc85xx: Update TMU device tree node for T1040/T1042 Update #thermal-sensor-cells from 0 to 1 according to the new binding. The sensor specifier added is the monitoring site ID, and represents the "n" in TRITSRn and TRATSRn. Signed-off-by: Jia Hongtao Acked-by: Scott Wood Signed-off-by: Zhang Rui arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d4b7bf1202466aa51c6199a38b4fda06efa51c8 Author: Jia Hongtao Date: Wed Jan 4 16:57:49 2017 +0800 dt-bindings: Update QorIQ TMU thermal bindings For different types of SoC the sensor id and endianness may vary. "#thermal-sensor-cells" is used to provide sensor id information. "little-endian" property is to tell the endianness of TMU. Signed-off-by: Jia Hongtao Acked-by: Rob Herring Acked-by: Scott Wood Signed-off-by: Zhang Rui Documentation/devicetree/bindings/thermal/qoriq-thermal.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 89b593c30e83ee19b7e7c6c7d6092669bebf343e Author: Takashi Sakamoto Date: Wed Feb 22 07:54:47 2017 +0900 ALSA: usb-audio: purge needless variable length array Variable length array is used in 'snd_us16x08_meter_get()', while there is no need. It's better to purge it because variable length array has overhead for stack handling. This commit replaces the array with static length. Sparse generated below warning. sound/usb/mixer_us16x08.c:714:18: warning: Variable length array is used. Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c054ee3bbf69ebcabb1f3218b7faf4b1b37a8eb6 Merge: e7e04c0 c61f13e Author: Kees Cook Date: Tue Feb 21 21:12:57 2017 -0800 Merge branch 'for-next/gcc-plugin/structleak' into for-linus/gcc-plugins commit e7e04c0c8c7ea931d966e5bd349a0b1c836b1ebf Merge: a121103 5a45a4c Author: Kees Cook Date: Tue Feb 21 21:12:38 2017 -0800 Merge branch 'for-next/gcc-plugin-infrastructure' into for-linus/gcc-plugins commit 7bb033829ef3ecfc491c0ed0197966e8f197fbdc Merge: 4a0853b 0f5bf6d Author: Linus Torvalds Date: Tue Feb 21 17:56:45 2017 -0800 Merge tag 'rodata-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull rodata updates from Kees Cook: "This renames the (now inaccurate) DEBUG_RODATA and related SET_MODULE_RONX configs to the more sensible STRICT_KERNEL_RWX and STRICT_MODULE_RWX" * tag 'rodata-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX arch: Move CONFIG_DEBUG_RODATA and CONFIG_SET_MODULE_RONX to be common commit 4a0853bf88c8f56e1c01eda02e6625aed09d55d9 Merge: 6d1dd93 4c5d7bc Author: Linus Torvalds Date: Tue Feb 21 17:53:23 2017 -0800 Merge tag 'usercopy-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull usercopy test updates from Kees Cook: "This improves the usercopy tests: - check zeroing on failed copy_from_user()/get_user() (caught bug on ARM) - adjust tests for SMAP/PAN (can't zero userspace memory on failure)" * tag 'usercopy-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: usercopy: Add tests for all get_user() sizes usercopy: Adjust tests to deal with SMAP/PAN usercopy: add testcases to check zeroing on failure commit 6d1dd93ea0d0f0fb61b5450a2668896028ce3f75 Merge: 81bbef2 fc1b326 Author: Linus Torvalds Date: Tue Feb 21 17:51:37 2017 -0800 Merge tag 'pstore-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "Minor changes to pstore tree: - update MAINTAINERS with current git repo, add more files. - move prz allocation checks into the walker - initialize flags correctly (by accident spinlock was technically ok)" * tag 'pstore-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: MAINTAINERS: Adjust pstore git repo URI, add files pstore: Check for prz allocation in walker pstore: Correctly initialize spinlock and flags commit 81bbef23db51c0b450d90607fbbc2ad80ee0d43f Merge: 79f4d1d 2fa299a Author: Linus Torvalds Date: Tue Feb 21 17:28:25 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: "Regression fix for HID_RMI-driven synaptics touchpads in !CONFIG_HID_RMI cases" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: rmi: fallback to generic/multitouch if hid-rmi is not built commit 79f4d1d5c0d7d115b5a693a5bb369e69efb7e7a5 Merge: 97a229f 73b2951 Author: Linus Torvalds Date: Tue Feb 21 17:21:32 2017 -0800 Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - Bartlomiej added pata_falcon - Christoph is trying to remove use of static 4k buf. It's still WIP - config cleanup around HAS_DMA - other fixes and driver-specific changes * 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (29 commits) ata: pata_of_platform: using of_property_read_u32() helper pata_atiixp: Don't use unconnected secondary port on SB600/SB700 libata-sff: Don't scan disabled ports when checking for legacy mode. pata_octeon_cf: remove unused local variables from octeon_cf_set_piomode() ahci: qoriq: added ls2088a platforms support ahci: qoriq: report error when ecc register address is missing in dts ahci: qoriq: added a condition to enable dma coherence Revert "libata: switch to dynamic allocation instead of ata_scsi_rbuf" ahci: imx: fix building without hwmon or thermal ata: add Atari Falcon PATA controller driver ata: pass queued command to ->sff_data_xfer method ata: allow subsystem to be used on m68k arch libata: switch to dynamic allocation instead of ata_scsi_rbuf libata: don't call ata_scsi_rbuf_fill for command without a response buffer libata: call ->scsi_done from ata_scsi_simulate libata: remove the done callback from ata_scsi_args libata: move struct ata_scsi_args to libata-scsi.c libata: avoid global response buffer in atapi_qc_complete libata-eh: Use switch() instead of sparse array for protocol strings ata: sata_mv: Convert to devm_ioremap_resource() ... commit 97a229f90731894f46b85c20bcc1842f4a63cb78 Merge: ff58d00 1ad6511 Author: Linus Torvalds Date: Tue Feb 21 17:06:22 2017 -0800 Merge tag 'dmaengine-4.11-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This time we fairly boring and bit small update. - Support for Intel iDMA 32-bit hardware - deprecate broken support for channel switching in async_tx - bunch of updates on stm32-dma - Cyclic support for zx dma and making in generic zx dma driver - Small updates to bunch of other drivers" * tag 'dmaengine-4.11-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits) async_tx: deprecate broken support for channel switching dmaengine: rcar-dmac: Widen DMA mask to 40 bits dmaengine: sun6i: allow build on ARM64 platforms (sun50i) dmaengine: Provide a wrapper for memcpy operations dmaengine: zx: fix build warning dmaengine: dw: we do support Merrifield SoC in PCI mode dmaengine: dw: add support of iDMA 32-bit hardware dmaengine: dw: introduce register mappings for iDMA 32-bit dmaengine: dw: introduce block2bytes() and bytes2block() dmaengine: dw: extract dwc_chan_pause() for future use dmaengine: dw: replace convert_burst() with one liner dmaengine: dw: register IRQ and DMA pool with instance ID dmaengine: dw: Fix data corruption in large device to memory transfers dmaengine: ste_dma40: indicate granularity on channels dmaengine: ste_dma40: indicate directions on channels dmaengine: stm32-dma: Add error messages if xlate fails dmaengine: dw: pci: remove LPE Audio DMA ID dmaengine: stm32-dma: Add max_burst support dmaengine: stm32-dma: Add synchronization support dmaengine: stm32-dma: Fix residue computation issue in cyclic mode ... commit ff58d005cd10fcd372787cceac547e11cf706ff6 Merge: 5ab3566 9eeb0ed Author: Linus Torvalds Date: Tue Feb 21 16:58:32 2017 -0800 Merge tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new drivers: - i.MX6 Video Data Order Adapter's (VDOA) - Toshiba et8ek8 5MP sensor - STM DELTA multi-format video decoder V4L2 driver - SPI connected IR LED - Mediatek IR remote receiver - ZyDAS ZD1301 DVB USB interface driver - new RC keymaps - some very old LIRC drivers got removed from staging - RC core gained support encoding IR scan codes - DVB si2168 gained support for DVBv5 statistics - lirc_sir driver ported to rc-core and promoted from staging - other bug fixes, board additions and driver improvements * tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (230 commits) [media] mtk-vcodec: fix build warnings without DEBUG [media] zd1301: fix building interface driver without demodulator [media] usbtv: add sharpness control [media] cxusb: Use a dma capable buffer also for reading [media] ttpci: address stringop overflow warning [media] dvb-usb-v2: avoid use-after-free [media] add Hama Hybrid DVB-T Stick support [media] et8ek8: Fix compiler / Coccinelle warnings [media] media: fix semicolon.cocci warnings [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter [media] v4l: of: check for unique lanes in data-lanes and clock-lanes [media] coda/imx-vdoa: constify structs [media] st-delta: debug: trace stream/frame information & summary [media] st-delta: add mjpeg support [media] st-delta: EOS (End Of Stream) support [media] st-delta: rpmsg ipc support [media] st-delta: add memory allocator helper functions [media] st-delta: STiH4xx multi-format video decoder v4l2 driver [media] MAINTAINERS: add st-delta driver [media] ARM: multi_v7_defconfig: enable STMicroelectronics DELTA Support ... commit 5ab356626f3cf97f00280f17a52e4b5b4a13e038 Merge: 6d1c42d baafaca Author: Linus Torvalds Date: Tue Feb 21 16:34:22 2017 -0800 Merge tag 'pinctrl-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Pin control bulk changes for the v4.11 kernel cycle. Core changes: - Switch the generic pin config argument from 16 to 24 bits, only use 8 bits for the configuration type. We might need to encode more information about a certain setting than we need to encode different generic settings. - Add a cross-talk API to the pin control GPIO back-end, utilizing pinctrl_gpio_set_config() from GPIO drivers that want to set up a certain pin configuration in the back-end. This also includes the .set_config() refactoring of the GPIO chips, so that they pass a generic configuration for things like debouncing and single ended (typically open drain). This change has also been merged in an immutable branch to the GPIO tree. - Take hogs with a delayed work, so that we finalize probing a pin controller before trying to get any hogs. - For pin controllers putting all group and function definitions into the device tree, we now have generic code to deal with this and it is used in two drivers so far. - Simplifications of the pin request conflict check. - Make dt_free_map() optional. Updates to drivers: - pinctrl-single now use the generic helpers to generate dynamic group and function tables from the device tree. - Texas Instruments IOdelay configuration driver add-on to pinctrl-single. - i.MX: use radix trees to store groups and functions, use the new generic group and function helpers to manage them. - Intel: add support for hardware debouncing and 1K pull-down. New subdriver for the Gemini Lake SoC. - Renesas SH-PFC: drive strength and bias support, CAN bus muxing, MSIOF, SDHI, HSCIF for r8a7796. Gyro-ADC supporton r8a7791. - Aspeed: use syscon cross-dependencies to set up related bits in the LPC host controller and display controller. - Aspeed: finalize G4 and G5 support. Fix mux configuration on GPIOs. Add banks Y, Z, AA, AB and AC. - AMD: support additional GPIO. - STM32: set this controller to strict muxing mode. STM32H743 MCU support. - Allwinner sunxi: deep simplifications on how to support subvariants of SoCs without adding to much SoC-specific data for each subvariant, especially for sun5i variants. New driver for V3s SoCs. New driver for the H5 SoC. Support A31/A31s variants with the new variant framework. - Mvebu: simplifications to use a MMIO and regmap abstraction. New subdrivers for the 98DX3236, 98DX5241 SoCs. - Samsung Exynos: delete Exynos4415 support. Add crosstalk to the SoC driver to access regmaps. Add infrastructure for pin-bank retention control. Clean out the pin retention control from arch/arm/mach-exynos and arch/arm/mach-s5p and put it properly in the Samsung pin control driver(s). - Meson: add HDMI HPD/DDC pins. Add pwm_ao_b pin. - Qualcomm: use raw spinlock variants: this makes the qualcomm driver realtime-safe" * tag 'pinctrl-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (111 commits) pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data() pinctrl: intel: unlock on error in intel_config_set_pull() pinctrl: berlin: make bool drivers explicitly non-modular pinctrl: spear: make bool drivers explicitly non-modular pinctrl: mvebu: make bool drivers explicitly non-modular pinctrl: sunxi: make sun5i explicitly non-modular pinctrl: sunxi: Remove stray printk call in sun5i driver's probe function pinctrl: samsung: mark PM functions as __maybe_unused pinctrl: sunxi: Remove redundant A31s pinctrl driver pinctrl: sunxi: Support A31/A31s with pinctrl variants pinctrl: Amend bindings for STM32 pinctrl pinctrl: Add STM32 pinctrl driver DT bindings pinctrl: stm32: Add STM32H743 MCU support include: dt-bindings: Add STM32H7 pinctrl DT defines gpio: aspeed: Remove dependence on GPIOF_* macros pinctrl: stm32: fix bad location of gpiochip_lock_as_irq drivers: pinctrl: add driver for Allwinner H5 SoC pinctrl: intel: Add Intel Gemini Lake pin controller support pinctrl: intel: Add support for 1k additional pull-down pinctrl: intel: Add support for hardware debouncer ... commit 2fa299a917adb2db2d486b9e4a3072865ce70a03 Author: Jiri Kosina Date: Wed Feb 22 01:13:52 2017 +0100 HID: rmi: fallback to generic/multitouch if hid-rmi is not built Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") unconditionally switches over handling of all Synaptics touchpads to hid-rmi (to make use of extended features of the HW); in case CONFIG_HID_RMI is disabled though this renders the touchpad unusable, as the HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) match doesn't exist and generic/multitouch doesn't bind to it either (due to hid group mismatch). Fix this by switching over to hid-rmi only if it has been actually built. Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") Reported-by: Linus Torvalds Acked-by: Benjamin Tissoires Tested-by: Andrew Duggan Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 72cedf599fcebfd6cd2550274d7855838068d28c Author: Arnd Bergmann Date: Tue Feb 21 23:00:46 2017 +0100 ASoC: mediatek: add I2C dependency for CS42XX8 We should not select drivers that depend on I2C when that is disabled, as it results in a build error: warning: (SND_SOC_MT2701_CS42448) selects SND_SOC_CS42XX8_I2C which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && I2C) sound/soc/codecs/cs42xx8-i2c.c:60:1: warning: data definition has no type or storage class module_i2c_driver(cs42xx8_i2c_driver); sound/soc/codecs/cs42xx8-i2c.c:60:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] Fixes: 1f458d53f76c ("ASoC: mediatek: Add mt2701-cs42448 driver and config option.") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b49f0f7ee1f5de8ea6d1210dfebf2c86f72507f Author: Arnd Bergmann Date: Tue Feb 21 23:02:37 2017 +0100 ALSA: x86: hdmi: select CONFIG_SND_PCM The newly added driver uses the PCM helpers and fails to link if they are disabled: sound/built-in.o: In function `hdmi_lpe_audio_runtime_suspend': intel_hdmi_audio.c:(.text+0x15906): undefined reference to `snd_pcm_suspend' sound/built-in.o: In function `had_pcm_hw_params': intel_hdmi_audio.c:(.text+0x15ac7): undefined reference to `snd_pcm_lib_malloc_pages' sound/built-in.o: In function `had_pcm_open': intel_hdmi_audio.c:(.text+0x15d49): undefined reference to `snd_pcm_hw_constraint_integer' This uses a Kconfig 'select' statement to make sure they are enabled. Fixes: 5dab11d89777 ("ALSA: x86: hdmi: Add audio support for BYT and CHT") Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6d1c42d9b93e38595ad46eeb4634853ca2755c92 Merge: 0f002fd 9085879 Author: Linus Torvalds Date: Tue Feb 21 14:28:55 2017 -0800 Merge tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull exception table module split from Paul Gortmaker: "Final extable.h related changes. This completes the separation of exception table content from the module.h header file. This is achieved with the final commit that removes the one line back compatible change that sourced extable.h into the module.h file. The commits are unchanged since January, with the exception of a couple Acks that came in for the last two commits a bit later. The changes have been in linux-next for quite some time[1] and have got widespread arch coverage via toolchains I have and also from additional ones the kbuild bot has. Maintaners of the various arch were Cc'd during the postings to lkml[2] and informed that the intention was to take the remaining arch specific changes and lump them together with the final two non-arch specific changes and submit for this merge window. The ia64 diffstat stands out and probably warrants a mention. In an earlier review, Al Viro made a valid comment that the original header separation of content left something to be desired, and that it get fixed as a part of this change, hence the larger diffstat" * tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (21 commits) module.h: remove extable.h include now users have migrated core: migrate exception table users off module.h and onto extable.h cris: migrate exception table users off module.h and onto extable.h hexagon: migrate exception table users off module.h and onto extable.h microblaze: migrate exception table users off module.h and onto extable.h unicore32: migrate exception table users off module.h and onto extable.h score: migrate exception table users off module.h and onto extable.h metag: migrate exception table users off module.h and onto extable.h arc: migrate exception table users off module.h and onto extable.h nios2: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users onto extable.h openrisc: migrate exception table users off module.h and onto extable.h frv: migrate exception table users off module.h and onto extable.h sh: migrate exception table users off module.h and onto extable.h xtensa: migrate exception table users off module.h and onto extable.h mn10300: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h m32r: migrate exception table users off module.h and onto extable.h ia64: ensure exception table search users include extable.h ... commit 34f54f579a9988e96e85e22fc151c15955ae40f0 Author: Gregory CLEMENT Date: Mon Feb 20 18:38:49 2017 +0100 rtc: armada38x: Add support for Armada 7K/8K The Armada 7K/8K use the same RTC IP than the Armada 38x. However the SOC integration differs in 2 points: - MBUS bridge timing initialization - IRQ configuration at SoC level Moreover the Armada 7K/8K have an issue preventing to get the interrupt from alarm 1. This commit allows to use alarm 2 for these A7K/8K but to still use alarm 1 for the Armada 38x. Signed-off-by: Gregory CLEMENT Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/armada-380-rtc.txt | 8 ++- drivers/rtc/rtc-armada38x.c | 65 ++++++++++++++++++++++ 2 files changed, 70 insertions(+), 3 deletions(-) commit 75faea9179a775fbc3380e918ac90dc9991dc450 Author: Gregory CLEMENT Date: Mon Feb 20 18:38:48 2017 +0100 rtc: armada38x: Prepare driver to manage different versions In order to prepare the introduction of the A7K/A8K version of the RTC, this commit introduces a new data structure. This structure allows to handle the differences between the integration of the RTC IP in the SoCs. It will be: - MBUS bridge timing initialization - IRQ configuration at SoC level Signed-off-by: Gregory CLEMENT Signed-off-by: Alexandre Belloni drivers/rtc/rtc-armada38x.c | 152 +++++++++++++++++++++++++++++--------------- 1 file changed, 99 insertions(+), 53 deletions(-) commit 0f002fddbe150ec3f2afce3fc09de5bda3096c72 Merge: 252b95c cfd75c2 Author: Linus Torvalds Date: Tue Feb 21 14:21:11 2017 -0800 Merge tag 'mips_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS updates from James Hogan: "Here's the main MIPS pull request for 4.11. It contains a few new features such as IRQ stacks, cacheinfo support, and KASLR for Octeon CPUs, and a variety of smaller improvements and fixes including devicetree additions, kexec cleanups, microMIPS stack unwinding fixes, and a bunch of build fixes to clean up continuous integration builds. Its all been in linux-next for at least a couple of days, most of it far longer. Miscellaneous: - Add IRQ stacks - Add cacheinfo support - Add "uzImage.bin" zboot target - Unify performance counter definitions - Export various (mainly assembly) symbols alongside their definitions - Audit and remove unnecessary uses of module.h kexec & kdump: - Lots of improvements and fixes - Add correct copy_regs implementations - Add debug logging of new kernel information Security: - Use Makefile.postlink to insert relocations into vmlinux - Provide plat_post_relocation hook (used for Octeon KASLR) - Add support for tuning mmap randomisation - Relocate DTB microMIPS: - A load of unwind fixes - Add some missing .insn to fix link errors MIPSr6: - Fix MULTU/MADDU/MSUBU sign extension in r2 emulation - Remove r2_emul_return and use ERETNC unconditionally on MIPSr6 - Allow pre-r6 emulation on SMP MIPSr6 kernels Cache management: - Treat physically indexed dcache as non-aliasing - Add return errors to protected cache ops for KVM - CM3: Ensure L1 & L2 cache ECC checking matches - CM3: Indicate inclusive caches - I6400: Treat dcache as physically indexed Memory management: - Ensure bootmem doesn't corrupt reserved memory - Export some TLB exception generation functions for KVM OF: - NULL check initial_boot_params before use in of_scan_flat_dt() - Fix unaligned access in of_alias_scan() SMP: - CPS: Don't BUG if a CPU fails to start Other fixes: - Fix longstanding 64-bit IP checksum carry bug - Fix KERN_CONT fallout in cpu-bugs64.c and sync-r4k.c - Update defconfigs for NF_CT_PROTO_DCCP, DPLITE, CPU_FREQ_STAT,SCSI_DH changes - Disable certain builtin compiler options, stack-check (whole kernel), asynchronous-unwind-tables (VDSO). - A bunch of build fixes from kernelci.org testing - Various other minor cleanups & corrections BMIPS: - Migrate interrupts during bmips_cpu_disable - BCM47xx: Add Luxul devices - BCM47xx: Fix Asus WL-500W button inversion - BCM7xxx: Add SPI device nodes Generic (multiplatform): - Add kexec DTB passing - Fix big endian - Add cpp_its_S in ksym_dep_filter to silence build warning IP22: - Reformat inline assembler code to modern standards - Fix binutils 2.25 build error IP27: - Fix duplicate CAC_BASE definition build error - Disable qlge driver to workaround broken compiler Lantiq: - Refresh defconfig and activate more drivers - Lock DMA register access - Fix cascading IRQ setup - Fix build of VPE loader - xway: Fix ethernet packet header corruption over reboot Loongson1 - Add watchdog support - 1B: Reduce DEFAULT_MEMSIZE to 64MB - 1B: Change OSC clock name to match rest of kernel - 1C: Remove ARCH_WANT_OPTIONAL_GPIOLIB Octeon: - Add KASLR support - Support Octeon III USB controller - Fix large copy_from_user corner case - Enable devtmpfs in defconfig Netlogic: - Fix non-default XLR build error due to netlogic,xlp-pic code - Fix assembler warning from smpboot.S pic32mzda: - Fix linker error when early printk is disabled Pistachio: - Add base device tree - Add Ci40 "Marduk" device tree Ralink: - Support raw appended DTB - Add missing I2C & I2S clocks - Add missing pinmux and fix pinmux function name typo - Add missing clk_round_rate() - Clean up prom_init() - MT7621: Set SoC type - MT7621: Support highmem TXx9: - Modernize printing of kernel messages and resolve KERN_CONT fallout - 7segled: use permission-specific DEVICE_ATTR variants XilFPGA: - Add IRQ controller and UART IRQ - Add AXI I2C and emaclite to DT & defconfig" * tag 'mips_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (148 commits) MIPS: VDSO: Explicitly use -fno-asynchronous-unwind-tables MIPS: BCM47XX: Fix button inversion for Asus WL-500W MIPS: DTS: Add img directory to Makefile MIPS: ip27: Disable qlge driver in defconfig MIPS: pic32mzda: Fix linker error for pic32_get_pbclk() MIPS: Lantiq: Keep ethernet enabled during boot MIPS: OCTEON: Fix copy_from_user fault handling for large buffers MIPS: Fix special case in 64 bit IP checksumming. MIPS: OCTEON: Enable DEVTMPFS MIPS: lantiq: Set physical_memsize MIPS: sysmips: Remove duplicated include from syscall.c Kbuild: Add cpp_its_S in ksym_dep_filter MIPS: Audit and remove any unnecessary uses of module.h MIPS: Unify perf counter register definitions MIPS: Disable stack checks on MIPS kernels MIPS: OCTEON: Platform support for OCTEON III USB controller MIPS: Lantiq: Fix cascaded IRQ setup MIPS: sync-r4k: Fix KERN_CONT fallout MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch MIPS: Fix distclean with Makefile.postlink ... commit 4694335dad7357e9b3d7822ab13049014d74d8b0 Author: Nicolai Hähnle Date: Thu Feb 16 23:49:12 2017 +0100 drm/amdgpu: refuse to reserve io mem for split VRAM buffers When the fast blit path fails while attempting to move a buffer from RAM to VRAM, we fall back to a CPU-based memcpy that cannot handle split VRAM buffers. Instead of crashing, simply fail the buffer move. Ideally, we would teach TTM about split buffers so that the fallback still works in this case, but that is quite involved. So for now, apply the simplest possible fix. Fixes: 40361bb1704b ("drm/amdgpu: add VRAM manager v2") Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+) commit 686a816ab6bedb99a892f3171f6c9ccecabff180 Author: Trond Myklebust Date: Sun Feb 19 16:08:32 2017 -0500 NFSv4: Clean up owner/group attribute decode Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 117 +++++++++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 60 deletions(-) commit 5c741d4f2215371ae17e3dbdf3d46da850662e13 Author: Trond Myklebust Date: Sun Feb 19 16:08:31 2017 -0500 SUNRPC: Add a helper function xdr_stream_decode_string_dup() Create a helper function that decodes a xdr string object, allocates a memory buffer and then store it as a NUL terminated string. Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xdr.h | 2 ++ net/sunrpc/xdr.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 1bbe60ff49becd7554e9b32b5e8e6fcee4b33db2 Author: Trond Myklebust Date: Sun Feb 19 16:08:30 2017 -0500 NFSv4: Remove bogus "struct nfs_client" argument from decode_ace() We shouldn't need to force callers to carry an unused argument. Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a1f6d9e9b803003271b40b67786ff46fa4eda01 Author: Trond Myklebust Date: Sun Feb 19 16:08:29 2017 -0500 NFSv4: Fix the underestimation of delegation XDR space reservation Account for the "space_limit" field in struct open_write_delegation4. Fixes: 2cebf82883f4 ("NFSv4: Fix the underestimate of NFSv4 open request size") Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 2 ++ 1 file changed, 2 insertions(+) commit c065eeea3ba03232cb8aaf9d3dc7ad0a9fcb267b Author: Trond Myklebust Date: Sun Feb 19 16:08:28 2017 -0500 NFSv4: Replace callback string decode function with a generic Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/callback_xdr.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 6da59ce2fd2047fd9cb141479f20d5f84614e84f Author: Trond Myklebust Date: Sun Feb 19 16:08:27 2017 -0500 NFSv4: Replace the open coded decode_opaque_inline() with the new generic Also ensure that we always check that the size of the decoded object matches the expectation that it must be smaller than NFS4_OPAQUE_LIMIT. This should be true for all the current users of decode_opaque_inline(), including decode_ace(), decode_pathname(), decode_attr_fs_locations() and decode_exchange_id(). Note that this allows us to get rid of a number of existing checks in decode_exchange_id(), Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit ab6e9aaf16cfdfca630f9745fd6d453818df7f64 Author: Trond Myklebust Date: Sun Feb 19 16:08:26 2017 -0500 NFSv4: Replace ad-hoc xdr encode/decode helpers with xdr_stream_* generics Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/callback_xdr.c | 8 ++------ fs/nfs/flexfilelayout/flexfilelayout.c | 5 +---- fs/nfs/nfs4xdr.c | 33 +++++++++------------------------ 3 files changed, 12 insertions(+), 34 deletions(-) commit 0ae060ca2bdfe11181094699b0f76437ec210b17 Author: Trond Myklebust Date: Sun Feb 19 16:08:25 2017 -0500 SUNRPC: Add generic helpers for xdr_stream encode/decode Add some generic helpers for encoding/decoding opaque structures and basic u32/u64. Signed-off-by: Trond Myklebust Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xdr.h | 177 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) commit 252b95c0edead46fb188042584d3dcd6d6ede062 Merge: b8989bc 4610d24 Author: Linus Torvalds Date: Tue Feb 21 13:53:41 2017 -0800 Merge tag 'for-linus-4.11-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Xen features and fixes: - a series from Boris Ostrovsky adding support for booting Linux as Xen PVH guest - a series from Juergen Gross streamlining the xenbus driver - a series from Paul Durrant adding support for the new device model hypercall - several small corrections" * tag 'for-linus-4.11-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/privcmd: add IOCTL_PRIVCMD_RESTRICT xen/privcmd: Add IOCTL_PRIVCMD_DM_OP xen/privcmd: return -ENOTTY for unimplemented IOCTLs xen: optimize xenbus driver for multiple concurrent xenstore accesses xen: modify xenstore watch event interface xen: clean up xenbus internal headers xenbus: Neaten xenbus_va_dev_error xen/pvh: Use Xen's emergency_restart op for PVH guests xen/pvh: Enable CPU hotplug xen/pvh: PVH guests always have PV devices xen/pvh: Initialize grant table for PVH guests xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI xen/pvh: Bootstrap PVH guest xen/pvh: Import PVH-related Xen public interfaces xen/x86: Remove PVH support x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C xen/manage: correct return value check on xenbus_scanf() x86/xen: Fix APIC id mismatch warning on Intel xen/netback: set default upper limit of tx/rx queues to 8 xen/netfront: set default upper limit of tx/rx queues to 8 commit 3089c1df10e2931b1d72d2ffa7d86431084c86b3 Author: Nicolai Hähnle Date: Sat Feb 18 22:59:56 2017 +0100 drm/ttm: fix use-after-free races in vm fault handling The vm fault handler relies on the fact that the VMA owns a reference to the BO. However, once mmap_sem is released, other tasks are free to destroy the VMA, which can lead to the BO being freed. Fix two code paths where that can happen, both related to vm fault retries. Found via a lock debugging warning which flagged &bo->wu_mutex as locked while being destroyed. Fixes: cbe12e74ee4e ("drm/ttm: Allow vm fault retries") Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_vm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b8989bccd6a0ad49db4795afca56a733e1c19099 Merge: c9341ee fe8e52b Author: Linus Torvalds Date: Tue Feb 21 13:25:50 2017 -0800 Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "The audit changes for v4.11 are relatively small compared to what we did for v4.10, both in terms of size and impact. - two patches from Steve tweak the formatting for some of the audit records to make them more consistent with other audit records. - three patches from Richard record the name of a module on module load, fix the logging of sockaddr information when using socketcall() on 32-bit systems, and add the ability to reset audit's lost record counter. - my lone patch just fixes an annoying style nit that I was reminded about by one of Richard's patches. All these patches pass our test suite" * 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit: audit: remove unnecessary curly braces from switch/case statements audit: log module name on init_module audit: log 32-bit socketcalls audit: add feature audit_lost reset audit: Make AUDIT_ANOM_ABEND event normalized audit: Make AUDIT_KERNEL event conform to the specification commit 0b6b524f3915f88eb4562e8d927528224a8eab41 Author: Takashi Iwai Date: Tue Feb 21 22:18:57 2017 +0100 ALSA: x86: Don't enable runtime PM as default Unlike HSW and newer, BYT/CHT devices have no fine control of audio power domain in i915 side. Since there is little gain by runtime PM on BYT/CHT, so far, this commit removes the pm_runtime_enable() call as default. User who still wants the runtime PM may adjust the corresponding sysfs files (power/control and power/autosuspend_delay_ms) appropriately, of course. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bd1599d931ca735c1081f11aa4d49006350709f1 Author: Omar Sandoval Date: Tue Feb 21 10:03:50 2017 -0800 scsi_transport_sas: fix BSG ioctl memory corruption The end_device and sas_host devices support BSG ioctls, but the request_queue allocated for them isn't set up to allocate the struct scsi_request payload. This leads to memory corruption in the call to scsi_req_init() in bsg_map_hdr(), since it will memset past the end of the allocated request. Fix it by setting ->cmd_size on the allocated request_queue. Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Omar Sandoval Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/scsi_transport_sas.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 3002b9fb7cbc26e8d29927c9e20e235f38319b24 Author: Takashi Iwai Date: Mon Feb 13 09:52:44 2017 +0100 ALSA: x86: Use runtime PM autosuspend This patch adds a few lines to the driver to use autosuspend for the runtime PM. It'll become useful with the combination of the keep-link feature. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit c4d052ce970ea98e9e1cc72461ba3b7a25397657 Merge: 42d87e3 33be632 Author: Bjorn Helgaas Date: Tue Feb 21 15:16:28 2017 -0600 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432 commit 42d87e3ffbd53c4514bccc0f24e40d6231a567f5 Merge: 2bdd584 81efbad Author: Bjorn Helgaas Date: Tue Feb 21 15:16:22 2017 -0600 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Fix msi_desc->affinity memory leak when freeing MSI IRQs commit 2bdd584a7555d5ac3341b61e751a6ac807a9814a Merge: 9e38637 cd3e2eb Author: Bjorn Helgaas Date: Tue Feb 21 15:16:17 2017 -0600 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: Sort the list of devices with D3 delay quirk by ID commit 9e38637a0832f15552ae130622808831f515107c Merge: 9d53426 26b54be Author: Bjorn Helgaas Date: Tue Feb 21 15:16:12 2017 -0600 Merge branch 'pci/host-xilinx' into next * pci/host-xilinx: PCI: xilinx-nwl: Remove mask for messages not supported by AXI PCI: xilinx: Configure PCIe MPS settings commit 9d534265bdcd47659c9fd080fff4c005512c4770 Merge: f08bf55 7da7a1a Author: Bjorn Helgaas Date: Tue Feb 21 15:16:08 2017 -0600 Merge branch 'pci/host-xgene' into next * pci/host-xgene: PCI: xgene: Configure PCIe MPS settings PCI: xgene: Fix double free on init error commit f08bf55e690ebdac28402955ef953e11ff478668 Merge: b98a7f7 70bc1b6 Author: Bjorn Helgaas Date: Tue Feb 21 15:15:54 2017 -0600 Merge branch 'pci/host-versatile' into next * pci/host-versatile: PCI: versatile: Configure PCIe MPS settings commit b98a7f7509ed7a031ed750be11b72b7ca1c95513 Merge: bcea623 c5c4d3a Author: Bjorn Helgaas Date: Tue Feb 21 15:15:49 2017 -0600 Merge branch 'pci/host-thunder' into next * pci/host-thunder: PCI: thunder-pem: Add support for cn81xx and cn83xx SoCs commit bcea623c65d5ad3b2f4e51908cffc9423175a10b Merge: 56195e9 5800790 Author: Bjorn Helgaas Date: Tue Feb 21 15:15:44 2017 -0600 Merge branch 'pci/host-rockchip' into next * pci/host-rockchip: PCI: rockchip: Set vendor ID from local core config space PCI: rockchip: Fix rockchip_pcie_probe() error path to free resource list PCI: rockchip: Mark PM functions as __maybe_unused PCI: rockchip: Use readl_poll_timeout() instead of open-coding it PCI: rockchip: Disable RC's ASPM L0s based on DT "aspm-no-l0s" PCI: rockchip: Add system PM support commit 56195e9d1d68a9c201587cb55b7fdf6d43fb31b6 Merge: dda7189 ff1677e Author: Bjorn Helgaas Date: Tue Feb 21 15:15:39 2017 -0600 Merge branch 'pci/host-rcar' into next * pci/host-rcar: PCI: rcar: Use of_device_get_match_data() to simplify probe PCI: rcar: Add compatible string for r8a7796 PCI: rcar: Return -ENODEV from host bridge probe when no card present commit dda718926c0fe091fd5c7ed3f88c9542d8bf67cf Merge: e2dc4f2 8ed81ec Author: Bjorn Helgaas Date: Tue Feb 21 15:15:34 2017 -0600 Merge branch 'pci/host-mvebu' into next * pci/host-mvebu: PCI: mvebu: Change delay after reset to the PCIe spec mandated 100ms PCI: mvebu: Handle changes to the bridge windows while enabled commit e2dc4f225b765c2a12e5eaa7bc09994e67d13741 Merge: 68094b4 6dc2c04 Author: Bjorn Helgaas Date: Tue Feb 21 15:15:21 2017 -0600 Merge branch 'pci/host-layerscape' into next * pci/host-layerscape: PCI: layerscape: Use of_device_get_match_data() to simplify probe Conflicts: drivers/pci/dwc/pci-layerscape.c commit 68094b4b8d72360f9a90804c203e4292c6662fdd Merge: e34e38b ce709f8 Author: Bjorn Helgaas Date: Tue Feb 21 15:15:05 2017 -0600 Merge branch 'pci/host-iproc' into next * pci/host-iproc: PCI: Add Broadcom Northstar2 PAXC quirk for device class and MPSS PCI: iproc: Configure PCIe MPS settings PCI: iproc: Use of_device_get_match_data() to simplify probe commit e34e38bf891bd7bf7c9305ff1d2e1b29a77dd159 Merge: 5dcda98 21b7245 Author: Bjorn Helgaas Date: Tue Feb 21 15:14:53 2017 -0600 Merge branch 'pci/host-imx6' into next * pci/host-imx6: PCI: imx6: Fix a typo in error message PCI: imx6: Remove LTSSM disable workaround PCI: imx6: Remove redundant "Link never came up" message Conflicts: drivers/pci/dwc/pci-imx6.c commit 5dcda98a3b7cfc0025ca49a700765ac9ba78a6a7 Merge: d952097 4a9b093 Author: Bjorn Helgaas Date: Tue Feb 21 15:14:31 2017 -0600 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Use device serial number as PCI domain PCI: hv: Fix wslot_to_devfn() to fix warnings on device removal commit d9520971589b008faa8df31aa2bb3d1e4f1c4534 Merge: b2e6d30 3fb5561 Author: Bjorn Helgaas Date: Tue Feb 21 15:14:18 2017 -0600 Merge branch 'pci/host-hisi' into next * pci/host-hisi: PCI: generic: Call pci_fixup_irqs() only on ARM PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports PCI: hisi: Rename config space accessors to remove "acpi" PCI: hisi: Add DT almost-ECAM support for Hip06/Hip07 host controllers PCI: hisi: Use of_device_get_match_data() to simplify probe Conflicts: drivers/pci/dwc/pcie-hisi.c commit b2e6d3055d5545b97533d4e8376fa848639d9951 Merge: 1a55761 e7cd7ef Author: Bjorn Helgaas Date: Tue Feb 21 15:13:30 2017 -0600 Merge branch 'pci/host-exynos' into next * pci/host-exynos: PCI: exynos: Support the PHY generic framework Documentation: binding: Modify the exynos5440 PCIe binding phy: phy-exynos-pcie: Add support for Exynos PCIe PHY Documentation: samsung-phy: Add exynos-pcie-phy binding PCI: exynos: Refactor to make it easier to support other SoCs PCI: exynos: Remove duplicated code PCI: exynos: Use the bitops BIT() macro to build bitmasks PCI: exynos: Remove unnecessary local variables PCI: exynos: Replace the *_blk/*_phy/*_elb accessors PCI: exynos: Rename all pointer names from "exynos_pcie" to "ep" Conflicts: drivers/pci/dwc/pci-exynos.c commit 1a55761392b8a4703039614f3ef6275f88dad4c3 Merge: 3bb0356 8ca6e0a Author: Bjorn Helgaas Date: Tue Feb 21 15:12:18 2017 -0600 Merge branch 'pci/host-altera' into next * pci/host-altera: PCI: altera: Extract TLP completion status correctly commit 3bb0356bb1b5a2c4434b4a3267df6dd9927ca5bf Merge: 4c2ae32 7a2b3f0 Author: Bjorn Helgaas Date: Tue Feb 21 15:12:18 2017 -0600 Merge branch 'pci/host-designware' into next * pci/host-designware: PCI: dwc: Remove dependency of designware on CONFIG_PCI PCI: dwc: Add CONFIG_PCIE_DW_HOST to enable PCI dwc host PCI: dwc: Split pcie-designware.c into host and core files PCI: dwc: designware: Fix style errors in pcie-designware.c PCI: dwc: designware: Parse "num-lanes" property in dw_pcie_setup_rc() PCI: dwc: all: Split struct pcie_port into host-only and core structures PCI: dwc: designware: Get device pointer at the start of dw_pcie_host_init() PCI: dwc: all: Rename cfg_read/cfg_write to read/write PCI: dwc: all: Use platform_set_drvdata() to save private data PCI: dwc: designware: Move register defines to designware header file PCI: dwc: Use PTR_ERR_OR_ZERO to simplify code PCI: dra7xx: Group PHY API invocations PCI: dra7xx: Enable MSI and legacy interrupts simultaneously PCI: dra7xx: Add support to force RC to work in GEN1 mode PCI: dra7xx: Simplify probe code with devm_gpiod_get_optional() PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory PCI: designware: Check for iATU unroll only on platforms that use ATU commit 7a2b3f024b8b724257d82f76690e68c69d797efd Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:19 2017 +0530 PCI: dwc: Remove dependency of designware on CONFIG_PCI CONFIG_PCI is used to enable host mode PCI. In preparation for adding endpoint mode support to designware driver, remove the dependency of designware on CONFIG_PCI and make only the host-specific part depend on CONFIG_PCI. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/Makefile | 3 +++ drivers/pci/Makefile | 3 --- drivers/pci/dwc/Kconfig | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) commit a0560209f10cb55fbfcdd11ef85cfb444f8bea89 Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:18 2017 +0530 PCI: dwc: Add CONFIG_PCIE_DW_HOST to enable PCI dwc host Now that PCI designware host has a separate file, add a new PCIE_DW_HOST config symbol to select the host-only driver. This will enable to independently select host support and endpoint support (when it's added). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/Kconfig | 26 +++++++++++++++----------- drivers/pci/dwc/Makefile | 3 ++- drivers/pci/dwc/pcie-designware.h | 29 +++++++++++++++++++++++++---- 3 files changed, 42 insertions(+), 16 deletions(-) commit feb85d9b1c47ea8dbcae559ff127b433fdb245b7 Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:17 2017 +0530 PCI: dwc: Split pcie-designware.c into host and core files Split pcie-designware.c into pcie-designware-host.c that contains the host specific parts of the driver and pcie-designware.c that contains the parts used by both host driver and endpoint driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/Makefile | 2 +- drivers/pci/dwc/pcie-designware-host.c | 635 +++++++++++++++++++++++++++++++++ drivers/pci/dwc/pcie-designware.c | 629 +------------------------------- drivers/pci/dwc/pcie-designware.h | 8 + 4 files changed, 650 insertions(+), 624 deletions(-) commit 314fc854f50317931fb4dfaab431695ab886e8de Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:16 2017 +0530 PCI: dwc: designware: Fix style errors in pcie-designware.c No functional change. Fix all checkpatch warnings and check errors in pcie-designware.c Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-By: Joao Pinto drivers/pci/dwc/pcie-designware.c | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 5f334db665173facf2213854408bb5fa2445d0b3 Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:15 2017 +0530 PCI: dwc: designware: Parse "num-lanes" property in dw_pcie_setup_rc() The "num-lanes" DT property is parsed in dw_pcie_host_init(). However num-lanes is applicable to both root complex mode and endpoint mode. As a first step, move the parsing of this property outside dw_pcie_host_init(). This is in preparation for splitting pcie-designware.c to pcie-designware.c and pcie-designware-host.c Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware.c | 18 +++++++++++------- drivers/pci/dwc/pcie-designware.h | 1 - 2 files changed, 11 insertions(+), 8 deletions(-) commit 442ec4c04d1235f8c664a74004dae54a7a574d18 Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:14 2017 +0530 PCI: dwc: all: Split struct pcie_port into host-only and core structures Keep only the host-specific members in struct pcie_port and move the common members (i.e common to both host and endpoint) to struct dw_pcie. This is in preparation for adding endpoint mode support to designware driver. While at that also fix checkpatch warnings. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas CC: Jingoo Han CC: Richard Zhu CC: Lucas Stach CC: Murali Karicheri CC: Minghuan Lian CC: Mingkai Hu CC: Roy Zang CC: Thomas Petazzoni CC: Niklas Cassel CC: Jesper Nilsson CC: Joao Pinto CC: Zhou Wang CC: Gabriele Paoloni CC: Stanimir Varbanov CC: Pratyush Anand drivers/pci/dwc/pci-dra7xx.c | 80 +++++++------ drivers/pci/dwc/pci-exynos.c | 78 +++++++------ drivers/pci/dwc/pci-imx6.c | 128 +++++++++++---------- drivers/pci/dwc/pci-keystone-dw.c | 83 ++++++++------ drivers/pci/dwc/pci-keystone.c | 54 +++++---- drivers/pci/dwc/pci-keystone.h | 4 +- drivers/pci/dwc/pci-layerscape.c | 91 +++++++++------ drivers/pci/dwc/pcie-armada8k.c | 85 ++++++++------ drivers/pci/dwc/pcie-artpec6.c | 48 ++++---- drivers/pci/dwc/pcie-designware-plat.c | 27 +++-- drivers/pci/dwc/pcie-designware.c | 203 ++++++++++++++++++--------------- drivers/pci/dwc/pcie-designware.h | 67 ++++++----- drivers/pci/dwc/pcie-hisi.c | 55 +++++---- drivers/pci/dwc/pcie-qcom.c | 70 ++++++++---- drivers/pci/dwc/pcie-spear13xx.c | 74 +++++++----- 15 files changed, 666 insertions(+), 481 deletions(-) commit 40f67fb2c384fe12741aa35010d62bfe8c98286c Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:13 2017 +0530 PCI: dwc: designware: Get device pointer at the start of dw_pcie_host_init() No functional change. Get device pointer at the beginning of dw_pcie_host_init() instead of getting it all over dw_pcie_host_init(). This is in preparation for splitting struct pcie_port into host and core structures (once split pcie_port will not have device pointer). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 19ce01cc8cbc314d73db9755715a8f6e8ad59a7f Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:12 2017 +0530 PCI: dwc: all: Rename cfg_read/cfg_write to read/write No functional change. dw_pcie_cfg_read()/dw_pcie_cfg_write() doesn't do anything specific to access configuration space. It can be just renamed to dw_pcie_read()/dw_pcie_write() and used to read/write data to dbi space. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Reviewed-By: Joao Pinto CC: Jingoo Han CC: Murali Karicheri CC: Stanimir Varbanov CC: Pratyush Anand drivers/pci/dwc/pci-dra7xx.c | 16 ++++++++-------- drivers/pci/dwc/pci-exynos.c | 4 ++-- drivers/pci/dwc/pci-keystone-dw.c | 4 ++-- drivers/pci/dwc/pcie-designware.c | 12 ++++++------ drivers/pci/dwc/pcie-designware.h | 4 ++-- drivers/pci/dwc/pcie-qcom.c | 2 +- drivers/pci/dwc/pcie-spear13xx.c | 24 ++++++++++++------------ 7 files changed, 33 insertions(+), 33 deletions(-) commit 9bcf0a6fdc5062e451cd6f1ab39045e142a5938f Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:11 2017 +0530 PCI: dwc: all: Use platform_set_drvdata() to save private data Add platform_set_drvdata() in all designware-based drivers to store the private data structure of the driver so that dev_set_drvdata() can be used to get back private data structure in add_pcie_port/host_init. This is in preparation for splitting struct pcie_port into core and host only structures. After the split pcie_port will not be part of the driver's private data structure and *container_of* used now to get the private data pointer cannot be used. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas CC: Jingoo Han CC: Richard Zhu CC: Lucas Stach CC: Murali Karicheri CC: Minghuan Lian CC: Mingkai Hu CC: Roy Zang CC: Thomas Petazzoni CC: Niklas Cassel CC: Jesper Nilsson CC: Joao Pinto CC: Zhou Wang CC: Gabriele Paoloni CC: Stanimir Varbanov CC: Pratyush Anand drivers/pci/dwc/pci-dra7xx.c | 3 ++- drivers/pci/dwc/pci-exynos.c | 3 ++- drivers/pci/dwc/pci-imx6.c | 3 ++- drivers/pci/dwc/pci-keystone.c | 2 ++ drivers/pci/dwc/pci-layerscape.c | 2 ++ drivers/pci/dwc/pcie-armada8k.c | 2 ++ drivers/pci/dwc/pcie-artpec6.c | 2 ++ drivers/pci/dwc/pcie-designware-plat.c | 2 ++ drivers/pci/dwc/pcie-hisi.c | 2 ++ drivers/pci/dwc/pcie-qcom.c | 2 ++ drivers/pci/dwc/pcie-spear13xx.c | 3 ++- 11 files changed, 22 insertions(+), 4 deletions(-) commit b90dc392212d1153a12eea15cbc6eae352a3c989 Author: Kishon Vijay Abraham I Date: Wed Feb 15 18:48:10 2017 +0530 PCI: dwc: designware: Move register defines to designware header file No functional change. Move the register defines and other macros from pcie-designware.c to pcie-designware.h. This is in preparation to split the pcie-designware.c file into designware core file and host-specific file. While at that also fix a checkpatch warning. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Reviewed-By: Joao Pinto drivers/pci/dwc/pcie-designware.c | 70 -------------------------------------- drivers/pci/dwc/pcie-designware.h | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 70 deletions(-) commit 11a61a8602812c024d8c404193ce1654ee3b8f08 Author: Fengguang Wu Date: Sat Feb 4 09:35:32 2017 +0800 PCI: dwc: Use PTR_ERR_OR_ZERO to simplify code Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR to avoid the following warnings found by scripts/coccinelle/api/ptr_ret.cocci: drivers/pci/dwc/pcie-qcom.c:215:1-3: WARNING: PTR_ERR_OR_ZERO can be used drivers/pci/dwc/pcie-qcom.c:247:1-3: WARNING: PTR_ERR_OR_ZERO can be used drivers/pci/dwc/pcie-qcom.c:481:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Fengguang Wu Signed-off-by: Bjorn Helgaas CC: Kishon Vijay Abraham I drivers/pci/dwc/pcie-qcom.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 1f6c4501c667a6bf25996f04c9cae49a88d90d01 Author: Kishon Vijay Abraham I Date: Wed Jan 11 17:36:55 2017 +0530 PCI: dra7xx: Group PHY API invocations No functional change. PHY APIs like phy_init()/phy_power_on() are invoked from multiple places. Group all the PHY APIs in dra7xx_pcie_enable_phy() and dra7xx_pcie_disable_phy() and use these functions for enabling or disabling the PHY. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 92 ++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 41 deletions(-) commit ebe85a44aad47bb5f08c5cbd939eb5e40956c73b Author: Kishon Vijay Abraham I Date: Wed Jan 11 17:36:54 2017 +0530 PCI: dra7xx: Enable MSI and legacy interrupts simultaneously pci-dra7xx driver had a bug in that if CONFIG_PCI_MSI config is enabled, it doesn't support legacy interrupt. Fix it here so that both MSI and legacy interrupts can be enabled simultaneously and the interrupt mechanism supported by the endpoint device will be used. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit ab5fe4f4d31ee27df9b8d7720da710d955d55737 Author: Kishon Vijay Abraham I Date: Wed Jan 11 17:36:53 2017 +0530 PCI: dra7xx: Add support to force RC to work in GEN1 mode PCIe in AM57x/DRA7x devices is by default configured to work in GEN2 mode. However there may be situations when working in GEN1 mode is desired. One example is limitation i925 (PCIe GEN2 mode not supported at junction temperatures < 0C). Add support to force Root Complex to work in GEN1 mode if so desired, but don't force GEN1 mode on any board just yet. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 602d38bc65aa2926d1ecd290a348e87aa8c21290 Author: Kishon Vijay Abraham I Date: Wed Jan 11 17:36:52 2017 +0530 PCI: dra7xx: Simplify probe code with devm_gpiod_get_optional() No functional change. Use the new devm_gpiod_get_optional() to simplify the probe code. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 950bf6388bc22c2749b8b66c501df1462639d6bd Author: Kishon Vijay Abraham I Date: Fri Jan 6 18:22:48 2017 +0530 PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory Group all the PCI drivers that use DesignWare core in dwc directory. dwc IP is capable of operating in both host mode and device mode and keeping it inside the *host* directory is misleading. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han Acked-By: Joao Pinto Cc: Thomas Petazzoni Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Richard Zhu Cc: Lucas Stach Cc: Murali Karicheri Cc: Pratyush Anand Cc: Niklas Cassel Cc: Jesper Nilsson Cc: Zhou Wang Cc: Gabriele Paoloni Cc: Stanimir Varbanov MAINTAINERS | 22 +- drivers/pci/Kconfig | 1 + drivers/pci/Makefile | 3 + drivers/pci/dwc/Kconfig | 117 +++++ drivers/pci/dwc/Makefile | 23 + drivers/pci/dwc/pci-dra7xx.c | 525 +++++++++++++++++++ drivers/pci/dwc/pci-exynos.c | 629 ++++++++++++++++++++++ drivers/pci/dwc/pci-imx6.c | 757 +++++++++++++++++++++++++++ drivers/pci/dwc/pci-keystone-dw.c | 560 ++++++++++++++++++++ drivers/pci/dwc/pci-keystone.c | 444 ++++++++++++++++ drivers/pci/dwc/pci-keystone.h | 63 +++ drivers/pci/dwc/pci-layerscape.c | 284 ++++++++++ drivers/pci/dwc/pcie-armada8k.c | 254 +++++++++ drivers/pci/dwc/pcie-artpec6.c | 283 ++++++++++ drivers/pci/dwc/pcie-designware-plat.c | 126 +++++ drivers/pci/dwc/pcie-designware.c | 902 ++++++++++++++++++++++++++++++++ drivers/pci/dwc/pcie-designware.h | 86 +++ drivers/pci/dwc/pcie-hisi.c | 326 ++++++++++++ drivers/pci/dwc/pcie-qcom.c | 753 ++++++++++++++++++++++++++ drivers/pci/dwc/pcie-spear13xx.c | 299 +++++++++++ drivers/pci/host/Kconfig | 113 ---- drivers/pci/host/Makefile | 12 - drivers/pci/host/pci-dra7xx.c | 525 ------------------- drivers/pci/host/pci-exynos.c | 629 ---------------------- drivers/pci/host/pci-imx6.c | 757 --------------------------- drivers/pci/host/pci-keystone-dw.c | 560 -------------------- drivers/pci/host/pci-keystone.c | 444 ---------------- drivers/pci/host/pci-keystone.h | 63 --- drivers/pci/host/pci-layerscape.c | 284 ---------- drivers/pci/host/pcie-armada8k.c | 254 --------- drivers/pci/host/pcie-artpec6.c | 283 ---------- drivers/pci/host/pcie-designware-plat.c | 126 ----- drivers/pci/host/pcie-designware.c | 902 -------------------------------- drivers/pci/host/pcie-designware.h | 86 --- drivers/pci/host/pcie-hisi.c | 326 ------------ drivers/pci/host/pcie-qcom.c | 753 -------------------------- drivers/pci/host/pcie-spear13xx.c | 299 ----------- 37 files changed, 6446 insertions(+), 6427 deletions(-) commit 005c3490e9db23738d91e02788606c0fe4734723 Author: Kalle Valo Date: Tue Feb 21 21:47:06 2017 +0200 Revert "ath10k: Search SMBIOS for OEM board file extension" This reverts commit f2593cb1b29185d38db706cbcbe22ed538720ae1. Paul reported that this patch with older board-2.bin ath10k initialisation fails on Dell XPS 13: ath10k_pci 0000:3a:00.0: failed to fetch board data for bus=pci,vendor=168c, device=003e,subsystem-vendor=1a56,subsystem-device=1535,variant=RV_0520 from ath10k/QCA6174/hw3.0/board-2.bin The reason is that the older board-2.bin does not have the variant version of the image name and ath10k does not fallback to the older naming scheme. Reported-by: Paul Menzel Link: https://bugzilla.kernel.org/show_bug.cgi?id=185621#c9 Fixes: f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file extension") Signed-off-by: Kalle Valo Signed-off-by: David S. Miller drivers/net/wireless/ath/ath10k/core.c | 84 ++-------------------------------- drivers/net/wireless/ath/ath10k/core.h | 19 -------- 2 files changed, 3 insertions(+), 100 deletions(-) commit 656795c8873f93956a031d5db6fb08cf6168ebb0 Merge: 7ce7d89 a782b5f Author: Bjorn Helgaas Date: Tue Feb 21 14:59:14 2017 -0600 Merge branch 'for-linus' into pci/host-designware * for-linus: PCI: designware: Check for iATU unroll only on platforms that use ATU commit c9341ee0af4df0af8b727873ef851227345defed Merge: 7a771ce 61841be Author: Linus Torvalds Date: Tue Feb 21 12:49:56 2017 -0800 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer updates from James Morris: "Highlights: - major AppArmor update: policy namespaces & lots of fixes - add /sys/kernel/security/lsm node for easy detection of loaded LSMs - SELinux cgroupfs labeling support - SELinux context mounts on tmpfs, ramfs, devpts within user namespaces - improved TPM 2.0 support" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (117 commits) tpm: declare tpm2_get_pcr_allocation() as static tpm: Fix expected number of response bytes of TPM1.2 PCR Extend tpm xen: drop unneeded chip variable tpm: fix misspelled "facilitate" in module parameter description tpm_tis: fix the error handling of init_tis() KEYS: Use memzero_explicit() for secret data KEYS: Fix an error code in request_master_key() sign-file: fix build error in sign-file.c with libressl selinux: allow changing labels for cgroupfs selinux: fix off-by-one in setprocattr tpm: silence an array overflow warning tpm: fix the type of owned field in cap_t tpm: add securityfs support for TPM 2.0 firmware event log tpm: enhance read_log_of() to support Physical TPM event log tpm: enhance TPM 2.0 PCR extend to support multiple banks tpm: implement TPM 2.0 capability to get active PCR banks tpm: fix RC value check in tpm2_seal_trusted tpm_tis: fix iTPM probe via probe_itpm() function tpm: Begin the process to deprecate user_read_timer tpm: remove tpm_read_index and tpm_write_index from tpm.h ... commit f83f3c515654474e19c7fc86e3b06564bb5cb4d4 Author: Tejun Heo Date: Sun Feb 12 05:33:02 2017 +0900 kernfs: fix locking around kernfs_ops->release() callback The release callback may be called from two places - file release operation and kernfs open file draining. kernfs_open_file->mutex is used to synchronize the two callsites. This unfortunately leads to possible circular locking because of->mutex is used to protect the usual kernfs operations which may use locking constructs which are held while removing and thus draining kernfs files. @of->mutex is for synchronizing concurrent kernfs access operations and all we need here is synchronization between the releaes and drain paths. As the drain path has to grab kernfs_open_file_mutex anyway, let's use the mutex to synchronize the release operation instead. Signed-off-by: Tejun Heo Reported-and-tested-by: Tony Lindgren Fixes: 0e67db2f9fe9 ("kernfs: add kernfs_ops->open/release() callbacks") Acked-by: Greg Kroah-Hartman fs/kernfs/file.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 0d4ec7849f5a197d46c062a49f47ed326dd0388c Author: Jessica Yu Date: Mon Feb 13 11:43:15 2017 -0800 MAINTAINERS: add tree for modules Add git tree url for modules. Signed-off-by: Jessica Yu MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a5544880aff90baf1bd4443ac7ff65182213ffcd Author: Luis R. Rodriguez Date: Fri Feb 10 14:06:22 2017 -0800 module: fix memory leak on early load_module() failures While looking for early possible module loading failures I was able to reproduce a memory leak possible with kmemleak. There are a few rare ways to trigger a failure: o we've run into a failure while processing kernel parameters (parse_args() returns an error) o mod_sysfs_setup() fails o we're a live patch module and copy_module_elf() fails Chances of running into this issue is really low. kmemleak splat: unreferenced object 0xffff9f2c4ada1b00 (size 32): comm "kworker/u16:4", pid 82, jiffies 4294897636 (age 681.816s) hex dump (first 32 bytes): 6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0....... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_track_caller+0x126/0x230 [] kstrdup+0x31/0x60 [] kstrdup_const+0x24/0x30 [] kvasprintf_const+0x7a/0x90 [] kobject_set_name_vargs+0x21/0x90 [] dev_set_name+0x47/0x50 [] memstick_check+0x95/0x33c [memstick] [] process_one_work+0x1f3/0x4b0 [] worker_thread+0x48/0x4e0 [] kthread+0xc9/0xe0 [] ret_from_fork+0x1f/0x40 [] 0xffffffffffffffff Cc: stable # v2.6.30 Fixes: e180a6b7759a ("param: fix charp parameters set via sysfs") Reviewed-by: Miroslav Benes Reviewed-by: Aaron Tomlin Reviewed-by: Rusty Russell Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Jessica Yu kernel/module.c | 1 + 1 file changed, 1 insertion(+) commit 082edf0ab1e83fe42d98ea7b6c1a64a896efce70 Author: Phil Reid Date: Fri Feb 17 09:44:57 2017 +0800 rtc: ds3232: Add regmap max_register definition. Add the max_register to the regmap_config definition. This allows dumping of the device's registers via the regmap debugfs interface. Signed-off-by: Phil Reid Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 2 ++ 1 file changed, 2 insertions(+) commit ca4b0a6de8a8ed9834942a5ba0c6a7cd80877320 Author: Phil Reid Date: Fri Feb 17 09:44:56 2017 +0800 rtc: ds3232: Cleanup whitespace around register and bit definitions. Whitespace was a combination of spaces and tabs. Use spaces and align register / bit definitions. Signed-off-by: Phil Reid Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 0500ce589aa7b5325af161d3c992ffb6be138ff9 Author: H Hartley Sweeten Date: Wed Feb 15 09:35:27 2017 -0700 rtc: m48t86: remove unused platform_data All users of this driver have been updated to allow the driver to manage it's own resources and do the read/write operations internally. The m48t86_ops are no longer used. Remove the platform_data header and the support code in the driver. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 51 ++++++++++++-------------------- include/linux/platform_data/rtc-m48t86.h | 16 ---------- 2 files changed, 19 insertions(+), 48 deletions(-) commit 8ccbd360068af1993a9359f1d31db70cf5eb8825 Author: H Hartley Sweeten Date: Wed Feb 15 09:35:25 2017 -0700 ARM: Orion5x: ts78xx: allow rtc-m48t86 to manage it's own resources The rtc-m48t86 driver can now handle it's own resources and do the read/write operations internally. Pass the necessary resources to the driver and remove the m48t86_ops platform data. Signed-off-by: H Hartley Sweeten Acked-By: Alexander Clouter Signed-off-by: Alexandre Belloni arch/arm/mach-orion5x/ts78xx-setup.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) commit 5e8bb41c514506358241c5eef09900b126190f54 Author: H Hartley Sweeten Date: Wed Feb 15 09:35:24 2017 -0700 ARM: Orion5x: ts78xx: remove RTC detection The rtc-m48t86 driver now handles the RTC detection. Remove the redundant code from the platform. Signed-off-by: H Hartley Sweeten Acked-By: Alexander Clouter Signed-off-by: Alexandre Belloni arch/arm/mach-orion5x/ts78xx-setup.c | 51 +++++++++--------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) commit 7a771ceac771d009f7203c40b256b0608d7ea2f8 Merge: e67bd12 d67a5f4 Author: Linus Torvalds Date: Tue Feb 21 12:11:41 2017 -0800 Merge tag 'dm-4.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Fix dm-raid transient device failure processing and other smaller tweaks. - Add journal support to the DM raid target to close the 'write hole' on raid 4/5/6. - Fix dm-cache corruption, due to rounding bug, when cache exceeds 2TB. - Add 'metadata2' feature to dm-cache to separate the dirty bitset out from other cache metadata. This improves speed of shutting down a large cache device (which implies writing out dirty bits). - Fix a memory leak during dm-stats data structure destruction. - Fix a DM multipath round-robin path selector performance regression that was caused by less precise balancing across all paths. - Lastly, introduce a DM core fix for a long-standing DM snapshot deadlock that is rooted in the complexity of the device stack used in conjunction with block core maintaining bios on current->bio_list to manage recursion in generic_make_request(). A more comprehensive fix to block core (and its hook in the cpu scheduler) would be wonderful but this DM-specific fix is pragmatic considering how difficult it has been to make progress on a generic fix. * tag 'dm-4.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (22 commits) dm: flush queued bios when process blocks to avoid deadlock dm round robin: revert "use percpu 'repeat_count' and 'current_path'" dm stats: fix a leaked s->histogram_boundaries array dm space map metadata: constify dm_space_map structures dm cache metadata: use cursor api in blocks_are_clean_separate_dirty() dm persistent data: add cursor skip functions to the cursor APIs dm cache metadata: use dm_bitset_new() to create the dirty bitset in format 2 dm bitset: add dm_bitset_new() dm cache metadata: name the cache block that couldn't be loaded dm cache metadata: add "metadata2" feature dm cache metadata: use bitset cursor api to load discard bitset dm bitset: introduce cursor api dm btree: use GFP_NOFS in dm_btree_del() dm space map common: memcpy the disk root to ensure it's arch aligned dm block manager: add unlikely() annotations on dm_bufio error paths dm cache: fix corruption seen when using cache > 2TB dm raid: cleanup awkward branching in raid_message() option processing dm raid: use mddev rather than rdev->mddev dm raid: use read_disk_sb() throughout dm raid: add raid4/5/6 journaling support ... commit e67bd12d6036ae3de9eeb0ba52e43691264ec850 Merge: cdc1947 8c7cdbf Author: Linus Torvalds Date: Tue Feb 21 12:04:54 2017 -0800 Merge tag 'mmc-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Add support for Marvell SD8787 Wifi/BT chip - Improve UHS support for SDIO - Invent MMC_CAP_3_3V_DDR and a DT binding for eMMC DDR 3.3V mode - Detect Auto BKOPS enable bit - Export eMMC device lifetime information through sysfs - First take to slim down the public mmc headers to avoid abuse - Re-factoring of the mmc block device driver to prepare for blkmq - Cleanup code for the mmc block device driver - Clarify and cleanup code dealing with data requests - Cleanup some code by converting to ida_simple_ functions - Cleanup code dealing with card quirks - Cleanup private and public mmc header files MMC host: - Don't rely on public mmc headers to include non-mmc related headers - meson: Add support for eMMC HS400 mode - meson: Various cleanups and improvements - omap_hsmmc: Use the proper provided busy timeout from the core - sunxi: Enable new timings for the A64 MMC controllers - sunxi: Improvements for clock management - tmio: Improvements for SDIO interrupts - mxs-mmc: Add CMD23 support - sdhci-msm: Enable HS400 enhanced strobe mode support - sdhci-msm: Correct HS400 tuning sequence - sdhci-acpi: Support deferred probe - sdhci-pci: Add support for eMMC HS200 tuning mode on AMD - mediatek: Correct the implementation of card busy detection - dw_mmc: Initial support for ZX mmc controller - sh_mobile_sdhi: Enable support for eMMC HS200 mode - sh_mmcif: Various cleanups and improvements" * tag 'mmc-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (145 commits) mmc: core: add mmc prefix for blk_fixups mmc: core: move all quirks together into quirks.h mmc: core: improve the quirks for sdio devices mmc: core: move some sdio IDs out of quirks file mmc: core: change quirks.c to be a header file mmc: sdhci-cadence: fix bit shift of read data from PHY port mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support mmc: MAN_BKOPS_EN inverse debug message logic mmc: meson-gx: add support for HS400 mode mmc: meson-gx: remove unneeded checks in remove mmc: meson-gx: reduce bounce buffer size mmc: meson-gx: set max block count and request size mmc: meson-gx: improve interrupt handling mmc: meson-gx: improve meson_mmc_irq_thread mmc: meson-gx: improve meson_mmc_clk_set mmc: meson-gx: minor improvements in meson_mmc_set_ios mmc: meson: Assign the minimum clk rate as close to 400KHz as possible mmc: core: start to break apart mmc_start_areq() mmc: block: respect bool returned from blk_end_request() mmc: block: return errorcode from mmc_sd_num_wr_blocks() ... commit 4c5d7bc63775b40631b75f6c59a3a3005455262d Author: Kees Cook Date: Tue Feb 14 12:38:07 2017 -0800 usercopy: Add tests for all get_user() sizes The existing test was only exercising native unsigned long size get_user(). For completeness, we should check all sizes. But we must skip some 32-bit architectures that don't implement a 64-bit get_user(). These new tests actually uncovered a bug in ARM's 64-bit get_user() zeroing. Signed-off-by: Kees Cook lib/test_user_copy.c | 89 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 13 deletions(-) commit cccd9fb9ec960e343b2f354c4613e49f5a1d8371 Author: Jan Kara Date: Tue Feb 21 18:09:48 2017 +0100 block: Revalidate i_bdev reference in bd_aquire() When a device gets removed, block device inode unhashed so that it is not used anymore (bdget() will not find it anymore). Later when a new device gets created with the same device number, we create new block device inode. However there may be file system device inodes whose i_bdev still points to the original block device inode and thus we get two active block device inodes for the same device. They will share the same gendisk so the only visible differences will be that page caches will not be coherent and BDIs will be different (the old block device inode still points to unregistered BDI). Fix the problem by checking in bd_acquire() whether i_bdev still points to active block device inode and re-lookup the block device if not. That way any open of a block device happening after the old device has been removed will get correct block device inode. Tested-by: Lekshmi Pillai Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d06e05c026ab58121dc6ab37c11f855ff642531e Author: Jan Kara Date: Tue Feb 21 18:09:47 2017 +0100 block: Unhash also block device inode for the whole device Iteration over partitions in del_gendisk() omits part0. Add bdev_unhash_inode() call for the whole device. Otherwise if the device number gets reused, bdev inode will be still associated with the old (stale) bdi. Tested-by: Lekshmi Pillai Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/genhd.c | 1 + 1 file changed, 1 insertion(+) commit 4b8c861a7c79806fb9ee564c87f517dc26fc2d1e Author: Jan Kara Date: Tue Feb 21 18:09:46 2017 +0100 block: Move bdev_unhash_inode() after invalidate_partition() Move bdev_unhash_inode() after invalidate_partition() as invalidate_partition() looks up bdev and it cannot find the right bdev inode after bdev_unhash_inode() is called. Thus invalidate_partition() would not invalidate page cache of the previously used bdev. Also use part_devt() when calling bdev_unhash_inode() instead of manually creating the device number. Tested-by: Lekshmi Pillai Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/genhd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6330a2d0b465527d621a9d95cad6b2fc0a959f13 Author: Josef Bacik Date: Wed Feb 15 16:49:48 2017 -0500 nbd: cleanup workqueue on error properly If we fail to register the blockdev we need to make sure to destroy the recv workqueue. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e544541b0765c341174613b416d4b074fa7571c2 Author: Josef Bacik Date: Mon Feb 13 10:39:47 2017 -0500 nbd: set the logical and physical blocksize properly We noticed when trying to do O_DIRECT to an export on the server side that we were getting requests smaller than the 4k sectorsize of the device. This is because the client isn't setting the logical and physical blocksizes properly for the underlying device. Fix this up by setting the queue blocksizes and then calling bd_set_size. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) commit 9442b739207aab6b1053abf858a238e7642fbcd1 Author: Josef Bacik Date: Tue Feb 7 17:10:22 2017 -0500 nbd: cleanup ioctl handling Break the ioctl handling out into helper functions, some of these things are getting pretty big and unwieldy. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 269 ++++++++++++++++++++++++++-------------------------- 1 file changed, 132 insertions(+), 137 deletions(-) commit ee5242360424b9b967454e9183767323d10cf985 Author: Christoph Hellwig Date: Tue Feb 21 10:04:55 2017 +0100 scsi: zero per-cmd driver data before each I/O Without this drivers that don't clear the state themselves can see off effects. For example Hyper-V VMs using the storvsc driver will often hang during boot due to uncleared Test Unit Ready failures. Fixes: e9c787e6 ("scsi: allocate scsi_cmnd structures as part of struct request") Signed-off-by: Christoph Hellwig Reported-by: Dexuan Cui Tested-by: Dexuan Cui Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc194705d26fdd7fc5446b5d830f2bbe2b22c30 Merge: 772c8f6 d1da522 Author: Linus Torvalds Date: Tue Feb 21 11:51:42 2017 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (ncr5380, ufs, lpfc, be2iscsi, hisi_sas, storvsc, cxlflash, aacraid, megaraid_sas, ...). There's also an assortment of minor fixes and the major update of switching a bunch of drivers to pci_alloc_irq_vectors from Christoph" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (188 commits) scsi: megaraid_sas: handle dma_addr_t right on 32-bit scsi: megaraid_sas: array overflow in megasas_dump_frame() scsi: snic: switch to pci_irq_alloc_vectors scsi: megaraid_sas: driver version upgrade scsi: megaraid_sas: Change RAID_1_10_RMW_CMDS to RAID_1_PEER_CMDS and set value to 2 scsi: megaraid_sas: Indentation and smatch warning fixes scsi: megaraid_sas: Cleanup VD_EXT_DEBUG and SPAN_DEBUG related debug prints scsi: megaraid_sas: Increase internal command pool scsi: megaraid_sas: Use synchronize_irq to wait for IRQs to complete scsi: megaraid_sas: Bail out the driver load if ld_list_query fails scsi: megaraid_sas: Change build_mpt_mfi_pass_thru to return void scsi: megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR scsi: megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool scsi: megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion scsi: megaraid_sas: megasas_return_cmd does not memset IO frame to zero scsi: megaraid_sas: max_fw_cmds are decremented twice, remove duplicate scsi: megaraid_sas: update can_queue only if the new value is less scsi: megaraid_sas: Change max_cmd from u32 to u16 in all functions scsi: megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandle to MR_DEVHANDLE_INVALID scsi: megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD ... commit ace0c791e6c3cf5ef37cad2df69f0d90ccc40ffb Author: Eric W. Biederman Date: Mon Feb 20 18:17:03 2017 +1300 proc/sysctl: Don't grab i_lock under sysctl_lock. Konstantin Khlebnikov writes: > This patch has locking problem. I've got lockdep splat under LTP. > > [ 6633.115456] ====================================================== > [ 6633.115502] [ INFO: possible circular locking dependency detected ] > [ 6633.115553] 4.9.10-debug+ #9 Tainted: G L > [ 6633.115584] ------------------------------------------------------- > [ 6633.115627] ksm02/284980 is trying to acquire lock: > [ 6633.115659] (&sb->s_type->i_lock_key#4){+.+...}, at: [] igrab+0x1e/0x80 > [ 6633.115834] but task is already holding lock: > [ 6633.115882] (sysctl_lock){+.+...}, at: [] unregister_sysctl_table+0x6b/0x110 > [ 6633.116026] which lock already depends on the new lock. > [ 6633.116026] > [ 6633.116080] > [ 6633.116080] the existing dependency chain (in reverse order) is: > [ 6633.116117] > -> #2 (sysctl_lock){+.+...}: > -> #1 (&(&dentry->d_lockref.lock)->rlock){+.+...}: > -> #0 (&sb->s_type->i_lock_key#4){+.+...}: > > d_lock nests inside i_lock > sysctl_lock nests inside d_lock in d_compare > > This patch adds i_lock nesting inside sysctl_lock. Al Viro replied: > Once ->unregistering is set, you can drop sysctl_lock just fine. So I'd > try something like this - use rcu_read_lock() in proc_sys_prune_dcache(), > drop sysctl_lock() before it and regain after. Make sure that no inodes > are added to the list ones ->unregistering has been set and use RCU list > primitives for modifying the inode list, with sysctl_lock still used to > serialize its modifications. > > Freeing struct inode is RCU-delayed (see proc_destroy_inode()), so doing > igrab() is safe there. Since we don't drop inode reference until after we'd > passed beyond it in the list, list_for_each_entry_rcu() should be fine. I agree with Al Viro's analsysis of the situtation. Fixes: d6cffbbe9a7e ("proc/sysctl: prune stale dentries during unregistering") Reported-by: Konstantin Khlebnikov Tested-by: Konstantin Khlebnikov Suggested-by: Al Viro Signed-off-by: "Eric W. Biederman" fs/proc/proc_sysctl.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 772c8f6f3bbd3ceb94a89373473083e3e1113554 Merge: fd4a61e 818551e Author: Linus Torvalds Date: Tue Feb 21 10:57:33 2017 -0800 Merge tag 'for-4.11/linus-merge-signed' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: - blk-mq scheduling framework from me and Omar, with a port of the deadline scheduler for this framework. A port of BFQ from Paolo is in the works, and should be ready for 4.12. - Various fixups and improvements to the above scheduling framework from Omar, Paolo, Bart, me, others. - Cleanup of the exported sysfs blk-mq data into debugfs, from Omar. This allows us to export more information that helps debug hangs or performance issues, without cluttering or abusing the sysfs API. - Fixes for the sbitmap code, the scalable bitmap code that was migrated from blk-mq, from Omar. - Removal of the BLOCK_PC support in struct request, and refactoring of carrying SCSI payloads in the block layer. This cleans up the code nicely, and enables us to kill the SCSI specific parts of struct request, shrinking it down nicely. From Christoph mainly, with help from Hannes. - Support for ranged discard requests and discard merging, also from Christoph. - Support for OPAL in the block layer, and for NVMe as well. Mainly from Scott Bauer, with fixes/updates from various others folks. - Error code fixup for gdrom from Christophe. - cciss pci irq allocation cleanup from Christoph. - Making the cdrom device operations read only, from Kees Cook. - Fixes for duplicate bdi registrations and bdi/queue life time problems from Jan and Dan. - Set of fixes and updates for lightnvm, from Matias and Javier. - A few fixes for nbd from Josef, using idr to name devices and a workqueue deadlock fix on receive. Also marks Josef as the current maintainer of nbd. - Fix from Josef, overwriting queue settings when the number of hardware queues is updated for a blk-mq device. - NVMe fix from Keith, ensuring that we don't repeatedly mark and IO aborted, if we didn't end up aborting it. - SG gap merging fix from Ming Lei for block. - Loop fix also from Ming, fixing a race and crash between setting loop status and IO. - Two block race fixes from Tahsin, fixing request list iteration and fixing a race between device registration and udev device add notifiations. - Double free fix from cgroup writeback, from Tejun. - Another double free fix in blkcg, from Hou Tao. - Partition overflow fix for EFI from Alden Tondettar. * tag 'for-4.11/linus-merge-signed' of git://git.kernel.dk/linux-block: (156 commits) nvme: Check for Security send/recv support before issuing commands. block/sed-opal: allocate struct opal_dev dynamically block/sed-opal: tone down not supported warnings block: don't defer flushes on blk-mq + scheduling blk-mq-sched: ask scheduler for work, if we failed dispatching leftovers blk-mq: don't special case flush inserts for blk-mq-sched blk-mq-sched: don't add flushes to the head of requeue queue blk-mq: have blk_mq_dispatch_rq_list() return if we queued IO or not block: do not allow updates through sysfs until registration completes lightnvm: set default lun range when no luns are specified lightnvm: fix off-by-one error on target initialization Maintainers: Modify SED list from nvme to block Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN uapi: sed-opal fix IOW for activate lsp to use correct struct cdrom: Make device operations read-only elevator: fix loading wrong elevator type for blk-mq devices cciss: switch to pci_irq_alloc_vectors block/loop: fix race between I/O and set_status blk-mq-sched: don't hold queue_lock when calling exit_icq block: set make_request_fn manually in blk_mq_update_nr_hw_queues ... commit fd4a61e08aa79f2b7835b25c6f94f27bd2d65990 Author: Mark Brown Date: Tue Feb 21 09:29:01 2017 -0800 sched/core: Fix build paravirt build on arm and arm64 Commit 004172bdad64 ("sched/core: Remove unnecessary #include headers") removed the inclusion of asm/paravirt.h which is used to get declarations of paravirt_steal_rq_enabled and paravirt_steal_clock. It is implicitly included on x86 but not on arm and arm64 breaking the build if paravirtualization is used. Since things from that header are used directly fix the build by putting the direct inclusion back. Signed-off-by: Mark Brown Signed-off-by: Linus Torvalds kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) commit e623a9e9dec29ae811d11f83d0074ba254aba374 Author: Maxime Jayat Date: Tue Feb 21 18:35:51 2017 +0100 net: socket: fix recvmmsg not returning error from sock_error Commit 34b88a68f26a ("net: Fix use after free in the recvmmsg exit path"), changed the exit path of recvmmsg to always return the datagrams variable and modified the error paths to set the variable to the error code returned by recvmsg if necessary. However in the case sock_error returned an error, the error code was then ignored, and recvmmsg returned 0. Change the error path of recvmmsg to correctly return the error code of sock_error. The bug was triggered by using recvmmsg on a CAN interface which was not up. Linux 4.6 and later return 0 in this case while earlier releases returned -ENETDOWN. Fixes: 34b88a68f26a ("net: Fix use after free in the recvmmsg exit path") Signed-off-by: Maxime Jayat Signed-off-by: David S. Miller net/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1faaa78f36cb2915ae89138ba5846f87ade85dcb Author: Tobias Klauser Date: Tue Feb 21 15:27:28 2017 +0100 bnxt_en: use eth_hw_addr_random() Use eth_hw_addr_random() to set a random MAC address in order to make sure bp->dev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d54fef315399e0b16f8ae2b41167f34f8df12e88 Merge: 559c59b 9d876e7 Author: David S. Miller Date: Tue Feb 21 13:30:15 2017 -0500 Merge branch 'bpf-unlocking-fix' Daniel Borkmann says: ==================== BPF fix with regards to unlocking This set fixes the issue Eric was reporting recently [1]. First patch is a prerequisite discussed with Laura that is needed for the later fix in the second one. I've tested this extensively and it does not reproduce anymore on my side after the fix. Thanks & sorry about that! [1] https://www.spinics.net/lists/netdev/msg421877.html ==================== Signed-off-by: David S. Miller commit 9d876e79df6a2f364b9f2737eacd72ceb27da53a Author: Daniel Borkmann Date: Tue Feb 21 16:09:34 2017 +0100 bpf: fix unlocking of jited image when module ronx not set Eric and Willem reported that they recently saw random crashes when JIT was in use and bisected this to 74451e66d516 ("bpf: make jited programs visible in traces"). Issue was that the consolidation part added bpf_jit_binary_unlock_ro() that would unlock previously made read-only memory back to read-write. However, DEBUG_SET_MODULE_RONX cannot be used for this to test for presence of set_memory_*() functions. We need to use ARCH_HAS_SET_MEMORY instead to fix this; also add the corresponding bpf_jit_binary_lock_ro() to filter.h. Fixes: 74451e66d516 ("bpf: make jited programs visible in traces") Reported-by: Eric Dumazet Reported-by: Willem de Bruijn Bisected-by: Eric Dumazet Signed-off-by: Daniel Borkmann Tested-by: Willem de Bruijn Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 2 +- arch/s390/net/bpf_jit_comp.c | 2 +- arch/x86/net/bpf_jit_comp.c | 2 +- include/linux/filter.h | 13 +++++++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) commit d2852a2240509e512712e25de2d0796cda435ecb Author: Daniel Borkmann Date: Tue Feb 21 16:09:33 2017 +0100 arch: add ARCH_HAS_SET_MEMORY config Currently, there's no good way to test for the presence of set_memory_ro/rw/x/nx() helpers implemented by archs such as x86, arm, arm64 and s390. There's DEBUG_SET_MODULE_RONX and DEBUG_RODATA, however both don't really reflect that: set_memory_*() are also available even when DEBUG_SET_MODULE_RONX is turned off, and DEBUG_RODATA is set by parisc, but doesn't implement above functions. Thus, add ARCH_HAS_SET_MEMORY that is selected by mentioned archs, where generic code can test against this. This also allows later on to move DEBUG_SET_MODULE_RONX out of the arch specific Kconfig to define it only once depending on ARCH_HAS_SET_MEMORY. Suggested-by: Laura Abbott Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller arch/Kconfig | 4 ++++ arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/x86/Kconfig | 1 + 5 files changed, 8 insertions(+) commit 559c59b238ebb7d39b732b6b08a59693b972e75c Author: Eric Dumazet Date: Tue Feb 21 08:20:56 2017 -0800 net: napi_watchdog() can use napi_schedule_irqoff() hrtimer handlers run with masked hard IRQ, we can therefore use napi_schedule_irqoff() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29869d66870a715177bfb505f66a7e0e8bcc89c3 Author: Eric Dumazet Date: Tue Feb 21 06:21:47 2017 -0800 tcp: Revert "tcp: tcp_probe: use spin_lock_bh()" This reverts commit e70ac171658679ecf6bea4bbd9e9325cd6079d2b. jtcp_rcv_established() is in fact called with hard irq being disabled. Initial bug report from Ricardo Nabinger Sanchez [1] still needs to be investigated, but does not look like a TCP bug. [1] https://www.spinics.net/lists/netdev/msg420960.html Signed-off-by: Eric Dumazet Reported-by: kernel test robot Cc: Ricardo Nabinger Sanchez Signed-off-by: David S. Miller net/ipv4/tcp_probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4af4c0ad0a4d070ef756010a2a10d96ff53d73d Author: Tobias Klauser Date: Tue Feb 21 14:04:59 2017 +0100 net/hsr: use eth_hw_addr_random() Use eth_hw_addr_random() to set a random MAC address in order to make sure dev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32cc1bb3cdac937d8199013512c79ead259e4b63 Merge: b3bdc3a d315880 Author: David S. Miller Date: Tue Feb 21 13:16:17 2017 -0500 Merge branch 'mvpp2-next' Thomas Petazzoni says: ==================== net: mvpp2: misc improvements and preparation patches This series contains a number of fixes, misc improvements and preparation patches for an upcoming series that adds support for the new PPv2.2 network controller to the mvpp2 driver. The most significant improvements are: - Switching to using build_skb(), which is necessary for the upcoming PPv2.2 support, but anyway a good improvement to the current mvpp2 driver (supporting PPv2.1). - Making the driver build on 64-bit platforms. Changes since v3: - Addition of a patch "net: mvpp2: fix DMA address calculation in mvpp2_txq_inc_put()", which fixes a bug in the driver in the calculation of DMA addresses. This bug was found using DMA_API_DEBUG. - Modify the "net: mvpp2: switch to build_skb() in the RX path" patch to recalculate the fragment size when the MTU is changed in mvpp2_bm_update_mtu(). - Added Acked-by from Russell King on all patches, except: * "net: mvpp2: fix DMA address calculation in mvpp2_txq_inc_put()", because it's a new patch * "net: mvpp2: switch to build_skb() in the RX path" because I modified it since the v3. - Rebased on top of 4.10. Changes since v2: - Fix remaining 64-bit build warning, reported by David Miller. - Adjust how bit mask related definitions are done in "net: mvpp2: simplify MVPP2_PRS_RI_* definitions" according to Russell King suggestions. - Add a patch "net: mvpp2: remove useless arguments in mvpp2_rx_{pkts,time}_coal_set", suggested by Russell King. - Rework mvpp2_rx_time_coal_set() implementation to avoid overflows and rounding errors. I've used the implementation suggested by Russell King. Changes since v1: - This series is split as a separate series from the larger patch set adding support for PPv2.2 in the mvpp2 driver, as requested by David Miller. - Rebased on top of v4.10-rc1. ==================== Signed-off-by: David S. Miller commit d3158807e8d6d4877c36dba3d3c64d9c6671c1bc Author: Thomas Petazzoni Date: Tue Feb 21 11:28:13 2017 +0100 net: mvpp2: enable building on 64-bit platforms The mvpp2 is going to be extended to support the Marvell Armada 7K/8K platform, which is ARM64. As a preparation to this work, this commit enables building the mvpp2 driver on ARM64, by: - Adjusting the Kconfig dependency - Fixing the types used in the driver so that they are 32/64-bits compliant. We use dma_addr_t for DMA addresses, and unsigned long for virtual addresses. It is worth mentioning that after this commit, the driver is for now still only used on 32-bits platforms, and will only work on 32-bits platforms. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/Kconfig | 3 +-- drivers/net/ethernet/marvell/mvpp2.c | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) commit 0e0372816b9cbd22c82e3e7cd36e8e74c58ba641 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:12 2017 +0100 net: mvpp2: switch to build_skb() in the RX path This commit adapts the mvpp2 RX path to use the build_skb() method. Not only build_skb() is now the recommended mechanism, but it also simplifies the addition of support for the PPv2.2 variant. Indeed, without build_skb(), we have to keep track for each RX descriptor of the physical address of the packet buffer, and the virtual address of the SKB. However, in PPv2.2 running on 64 bits platform, there is not enough space in the descriptor to store the virtual address of the SKB. So having to take care only of the address of the packet buffer, and building the SKB upon reception helps in supporting PPv2.2. The implementation is fairly straightforward: - mvpp2_skb_alloc() is renamed to mvpp2_buf_alloc() and no longer allocates a SKB. Instead, it allocates a buffer using the new mvpp2_frag_alloc() function, with enough space for the data and SKB. - The initialization of the RX buffers in mvpp2_bm_bufs_add() as well as the refill of the RX buffers in mvpp2_rx_refill() is adjusted accordingly. - Finally, the mvpp2_rx() is modified to use build_skb(). Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 79 ++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 22 deletions(-) commit 8138affc4999bbe4ca5ed805b36f80b56354339e Author: Thomas Petazzoni Date: Tue Feb 21 11:28:11 2017 +0100 net: mvpp2: simplify MVPP2_PRS_RI_* definitions Some of the MVPP2_PRS_RI_* definitions use the ~(value) syntax, which doesn't compile nicely on 64-bit. Moreover, those definitions are in fact unneeded, since they are always used in combination with a bit mask that ensures only the appropriate bits are modified. Therefore, such definitions should just be set to 0x0. In addition, as suggested by Russell King, we change the _MASK definitions to also use the BIT() macro so that it is clear they are related to the values defined afterwards. For example: #define MVPP2_PRS_RI_L2_CAST_MASK 0x600 #define MVPP2_PRS_RI_L2_UCAST ~(BIT(9) | BIT(10)) #define MVPP2_PRS_RI_L2_MCAST BIT(9) #define MVPP2_PRS_RI_L2_BCAST BIT(10) becomes #define MVPP2_PRS_RI_L2_CAST_MASK (BIT(9) | BIT(10)) #define MVPP2_PRS_RI_L2_UCAST 0x0 #define MVPP2_PRS_RI_L2_MCAST BIT(9) #define MVPP2_PRS_RI_L2_BCAST BIT(10) Because the values (MVPP2_PRS_RI_L2_UCAST, MVPP2_PRS_RI_L2_MCAST and MVPP2_PRS_RI_L2_BCAST) are always applied with MVPP2_PRS_RI_L2_CAST_MASK, and therefore there is no need for MVPP2_PRS_RI_L2_UCAST to be defined as ~(BIT(9) | BIT(10)). It fixes the following warnings when building the driver on a 64-bit platform (which is not possible as of this commit, but will be enabled in a follow-up commit): drivers/net/ethernet/marvell/mvpp2.c: In function ‘mvpp2_prs_mac_promisc_set’: drivers/net/ethernet/marvell/mvpp2.c:524:33: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define MVPP2_PRS_RI_L2_UCAST ~(BIT(9) | BIT(10)) ^ drivers/net/ethernet/marvell/mvpp2.c:1459:33: note: in expansion of macro ‘MVPP2_PRS_RI_L2_UCAST’ mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L2_UCAST, Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 31d7677b91307e2771b6922fd9920542a92d376d Author: Thomas Petazzoni Date: Tue Feb 21 11:28:10 2017 +0100 net: mvpp2: fix indentation of MVPP2_EXT_GLOBAL_CTRL_DEFAULT Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8c249a71dca2992001ad582797c03fca0488d00 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:09 2017 +0100 net: mvpp2: remove unused register definitions Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ---- 1 file changed, 4 deletions(-) commit 3eb2d9982288fbbbdc671af0fee4b9eb71d11b75 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:08 2017 +0100 net: mvpp2: simplify mvpp2_bm_bufs_add() The mvpp2_bm_bufs_add() currently creates a fake cookie by calling mvpp2_bm_cookie_pool_set(), just to be able to call mvpp2_pool_refill(). But all what mvpp2_pool_refill() does is extract the pool ID from the cookie, and call mvpp2_bm_pool_put() with this ID. Instead of doing this convoluted thing, just call mvpp2_bm_pool_put() directly, since we have the BM pool ID. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7ef7e1d949cd517d30a3cc6c7f48bd017d81af6b Author: Thomas Petazzoni Date: Tue Feb 21 11:28:07 2017 +0100 net: mvpp2: drop useless fields in mvpp2_bm_pool and related code This commit drops dead code from the mvpp2 driver. The 'in_use' and 'in_use_thresh' fields of 'struct mvpp2_bm_pool' are incremented/decremented/initialized in various places. But they are only used in one place: if (is_recycle && (atomic_read(&bm_pool->in_use) < bm_pool->in_use_thresh)) return 0; However 'is_recycle', passed as argument to mvpp2_rx_refill() is always false. So in fact, this code is never reached, and the 'is_recycle' argument is useless. So let's drop this code. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 5dfa9e8337b1c8a7e291929e676c167b6ea953e6 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:06 2017 +0100 net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue' This commit remove a field of 'struct mvpp2_tx_queue' that is not used anywhere. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 3 --- 1 file changed, 3 deletions(-) commit 36fb7435b6ac4d288a2d4deea8934f9456ab46b6 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:05 2017 +0100 net: mvpp2: release reference to txq_cpu[] entry after unmapping The mvpp2_txq_bufs_free() function is called upon TX completion to DMA unmap TX buffers, and free the corresponding SKBs. It gets the references to the SKB to free and the DMA buffer to unmap from a per-CPU txq_pcpu data structure. However, the code currently increments the pointer to the next entry before doing the DMA unmap and freeing the SKB. It does not cause any visible problem because for a given SKB the TX completion is guaranteed to take place on the CPU where the TX was started. However, it is much more logical to increment the pointer to the next entry once the current entry has been completely unmapped/released. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ab42676af052e6d3502b31c2dc6b07af08ff126f Author: Thomas Petazzoni Date: Tue Feb 21 11:28:04 2017 +0100 net: mvpp2: handle too large value in mvpp2_rx_time_coal_set() When configuring the MVPP2_ISR_RX_THRESHOLD_REG with the RX coalescing time threshold, we do not check for the maximum allowed value supported by the driver, which means we might overflow and use a bogus value. This commit adds a check for this situation, and if a value higher than what is supported by the hardware is provided, then we use the maximum value supported by the hardware. In order to achieve this in a way that avoids overflow and rounding errors, we introduce two utility functions mvpp2_usec_to_cycles() and cycles_to_usec(). Many thanks to Russell King for suggesting this implementation. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit f8b0d5f8cc10f43642f97db6b37d60d765cff34a Author: Thomas Petazzoni Date: Tue Feb 21 11:28:03 2017 +0100 net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set() Currently, mvpp2_rx_pkts_coal_set() does the following to avoid setting a too large value for the RX coalescing by packet number: val = (pkts & MVPP2_OCCUPIED_THRESH_MASK); This means that if you set a value that is slightly higher the the maximum number of packets, you in fact get a very low value. It makes a lot more sense to simply check if the value is too high, and if it's too high, limit it to the maximum possible value. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d63f9e41f981722b11f42ea2b19798c00fcae0f9 Author: Thomas Petazzoni Date: Tue Feb 21 11:28:02 2017 +0100 net: mvpp2: remove useless arguments in mvpp2_rx_{pkts, time}_coal_set As noticed by Russell King, the last argument of mvpp2_rx_{pkts,time}_coal_set() is useless, since the packet/time coalescing value is already stored in the 'struct mvpp2_rx_queue *' passed as argument to these functions. So passing the packet/time value as an additional argument, and setting them again in the mvpp2_rx_queue structure is useles. This commit therefore gets rid of this additional argument, assuming the caller has assigned the appropriate value to rxq->pkts_coal or rxq->time_coal before calling the respective functions. Signed-off-by: Thomas Petazzoni Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 239a3b663647869330955ec59caac0100ef9b60a Author: Thomas Petazzoni Date: Tue Feb 21 11:28:01 2017 +0100 net: mvpp2: fix DMA address calculation in mvpp2_txq_inc_put() When TX descriptors are filled in, the buffer DMA address is split between the tx_desc->buf_phys_addr field (high-order bits) and tx_desc->packet_offset field (5 low-order bits). However, when we re-calculate the DMA address from the TX descriptor in mvpp2_txq_inc_put(), we do not take tx_desc->packet_offset into account. This means that when the DMA address is not aligned on a 32 bytes boundary, we end up calling dma_unmap_single() with a DMA address that was not the one returned by dma_map_single(). This inconsistency is detected by the kernel when DMA_API_DEBUG is enabled. We fix this problem by properly calculating the DMA address in mvpp2_txq_inc_put(). Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3bdc3acbb44d74d0b7ba4d97169577a2b46dc88 Author: Lee Ryder Date: Tue Feb 21 17:40:45 2017 +0800 macsec: fix validation failed in asynchronous operation. MACSec test failed when asynchronous crypto operations is used. It encounters packet validation failed since macsec_skb_cb(skb)->valid is always 'false'. This patch adds missing "macsec_skb_cb(skb)->valid = true" in macsec_decrypt_done() when "err == 0". Signed-off-by: Ryder Lee Signed-off-by: David S. Miller drivers/net/macsec.c | 3 +++ 1 file changed, 3 insertions(+) commit 51c6b429c0c95e67edd1cb0b548c5cf6a6604763 Author: Linus Lüssing Date: Mon Feb 13 20:44:31 2017 +0100 batman-adv: Fix transmission of final, 16th fragment Trying to split and transmit a unicast packet in 16 parts will fail for the final fragment: After having sent the 15th one with a frag_packet.no index of 14, we will increase the the index to 15 - and return with an error code immediately, even though one more fragment is due for transmission and allowed. Fixing this issue by moving the check before incrementing the index. While at it, adding an unlikely(), because the check is actually more of an assertion. Fixes: ee75ed88879a ("batman-adv: Fragment and send skbs larger than mtu") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/fragmentation.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 248e23b50e2da0753f3b5faa068939cbe9f8a75a Author: Sven Eckelmann Date: Sun Feb 12 11:26:33 2017 +0100 batman-adv: Fix double free during fragment merge error The function batadv_frag_skb_buffer was supposed not to consume the skbuff on errors. This was followed in the helper function batadv_frag_insert_packet when the skb would potentially be inserted in the fragment queue. But it could happen that the next helper function batadv_frag_merge_packets would try to merge the fragments and fail. This results in a kfree_skb of all the enqueued fragments (including the just inserted one). batadv_recv_frag_packet would detect the error in batadv_frag_skb_buffer and try to free the skb again. The behavior of batadv_frag_skb_buffer (and its helper batadv_frag_insert_packet) must therefore be changed to always consume the skbuff to have a common behavior and avoid the double kfree_skb. Fixes: 610bfc6bc99b ("batman-adv: Receive fragmented packets and merge") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/fragmentation.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8ccde4c562076f280c0321c549d822448b64e565 Author: Gao Feng Date: Tue Feb 21 17:09:19 2017 +0800 net: sock: Use USEC_PER_SEC macro instead of literal 1000000 The USEC_PER_SEC is used once in sock_set_timeout as the max value of tv_usec. But there are other similar codes which use the literal 1000000 in this file. It is minor cleanup to keep consitent. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/core/sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f6b10209b90d48a84f886ab2b317b5d2cbfe3143 Author: Jason Wang Date: Tue Feb 21 16:46:28 2017 +0800 virtio-net: switch to use build_skb() for small buffer This patch switch to use build_skb() for small buffer which can have better performance for both TCP and XDP (since we can work at page before skb creation). It also remove lots of XDP codes since both mergeable and small buffer use page frag during refill now. Before | After XDP_DROP(xdp1) 64B : 11.1Mpps | 14.4Mpps Tested with xdp1/xdp2/xdp_ip_tx_tunnel and netperf. Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 138 ++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 75 deletions(-) commit ca4ef4574f1ee5252e2cd365f8f5d5bafd048f32 Author: Paolo Abeni Date: Tue Feb 21 09:33:18 2017 +0100 ip: fix IP_CHECKSUM handling The skbs processed by ip_cmsg_recv() are not guaranteed to be linear e.g. when sending UDP packets over loopback with MSGMORE. Using csum_partial() on [potentially] the whole skb len is dangerous; instead be on the safe side and use skb_checksum(). Thanks to syzkaller team to detect the issue and provide the reproducer. v1 -> v2: - move the variable declaration in a tighter scope Fixes: ad6f939ab193 ("ip: Add offset parameter to ip_cmsg_recv") Reported-by: Andrey Konovalov Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8dcd81a993f4f65d22dfecb4360204b428c36cff Author: Roopa Prabhu Date: Mon Feb 20 08:41:16 2017 -0800 vxlan: remove unused variable saddr in neigh_reduce silences the below warning: drivers/net/vxlan.c: In function ‘neigh_reduce’: drivers/net/vxlan.c:1599:25: warning: variable ‘saddr’ set but not used [-Wunused-but-set-variable] Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8bcdc4f3a20be949df54b67e5ae2734daabb5792 Author: Roopa Prabhu Date: Mon Feb 20 08:29:19 2017 -0800 vxlan: add changelink support This patch adds changelink rtnl op support for vxlan netdevs. code changes involve: - refactor vxlan_newlink into vxlan_nl2conf to be used by vxlan_newlink and vxlan_changelink - vxlan_nl2conf and vxlan_dev_configure take a changelink argument to isolate changelink checks and updates. - Allow changing only a few attributes: - return -EOPNOTSUPP for attributes that cannot be changed for now. Incremental patches can make the non-supported one available in the future if needed. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 383 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 270 insertions(+), 113 deletions(-) commit 5594e88a440bb75ce6e7fe045b254503420df6d8 Author: H Hartley Sweeten Date: Wed Feb 15 09:35:26 2017 -0700 ARM: ep93xx: ts72xx: allow rtc-m48t86 to manage its own resources The rtc-m48t86 driver can now handle its own resources and do the read/write operations internally. Pass the necessary resources to the driver and remove the m48t86_ops platform data. Remove the, then unnecessary, static remapping for the registers. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni arch/arm/mach-ep93xx/ts72xx.c | 40 ++++++++++------------------------------ arch/arm/mach-ep93xx/ts72xx.h | 11 ----------- 2 files changed, 10 insertions(+), 41 deletions(-) commit d1892e4ec96aad4b733dfab3ed989718f04f03e9 Author: Tobias Klauser Date: Mon Feb 20 16:32:06 2017 +0100 rtnl: simplify error return path in rtnl_create_link() There is only one possible error path which reaches the err label, so return ERR_PTR(-ENOMEM) directly if alloc_netdev_mqs() fails. This also allows to omit the err variable. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/core/rtnetlink.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3ea07127d9367250321df33bf9fee2ada362400c Author: H Hartley Sweeten Date: Wed Feb 15 09:35:23 2017 -0700 rtc: m48t86: verify that the RTC is actually present The RTC is an optional feature at purchase time on some Technologic Systems boards. Verify that it actually exists by checking if the last two bytes of the NVRAM can be changed. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 7e6a69ee954caf8dd8c98f70c8ee894c8ebfdcf0 Author: Mike Leach Date: Fri Feb 17 19:13:10 2017 +0000 arm64: dts: juno: update definition for programmable replicator Juno platforms have a programmable replicator splitting the trace output to TPIU and ETR. Currently this is not being programmed as it is being treated as a none-programmable replicator - which is the default operational mode for these devices. The TPIU in the system is enabled by default, and this combination is causing back-pressure in the trace system resulting in overflows at the source. Replaces the existing definition with one that defines the programmable replicator, using the "qcom,coresight-replicator1x" driver that provides the correct functionality for CoreSight programmable replicators. Reviewed-and-Tested-by: Mathieu Poirier Signed-off-by: Mike Leach Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9761a2469dc287c6d75ca148f4fc483becbcad88 Author: Dan Carpenter Date: Sun Feb 19 00:34:59 2017 +0300 sunrpc: silence uninitialized variable warning kstrtouint() can return a couple different error codes so the check for "ret == -EINVAL" is wrong and static analysis tools correctly complain that we can use "num" without initializing it. It's not super harmful because we check the bounds. But it's also easy enough to fix. Signed-off-by: Dan Carpenter Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9763dd6f8160dc9cc239fc2427c8173073204457 Merge: 70fcf5c c548a1c Author: Linus Torvalds Date: Tue Feb 21 07:46:34 2017 -0800 Merge tag 'gfs2-4.11.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Robert Peterson: "We've got eight GFS2 patches for this merge window: - Andy Price submitted a patch to make gfs2_write_full_page a static function. - Dan Carpenter submitted a patch to fix a ERR_PTR thinko. Three patches fix bugs related to deleting very large files, which cause GFS2 to run out of journal space: - The first one prevents GFS2 delete operation from requesting too much journal space. - The second one fixes a problem whereby GFS2 can hang because it wasn't taking journal space demand into its calculations. - The third one wakes up IO waiters when a flush is done to restart processes stuck waiting for journal space to become available. The final three patches are a performance improvement related to spin_lock contention between multiple writers: - The "tr_touched" variable was switched to a flag to be more atomic and eliminate the possibility of some races. - Function meta_lo_add was moved inline with its only caller to make the code more readable and efficient. - Contention on the gfs2_log_lock spinlock was greatly reduced by avoiding the lock altogether in cases where we don't really need it: buffers that already appear in the appropriate metadata list for the journal. Many thanks to Steve Whitehouse for the ideas and principles behind these patches" * tag 'gfs2-4.11.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Make gfs2_write_full_page static GFS2: Reduce contention on gfs2_log_lock GFS2: Inline function meta_lo_add GFS2: Switch tr_touched to flag in transaction GFS2: Wake up io waiters whenever a flush is done GFS2: Made logd daemon take into account log demand GFS2: Limit number of transaction blocks requested for truncates GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next commit 1ad651154b0dfccde5a83fafbe81cff19791f359 Merge: 8a3ec58 067fdeb Author: Vinod Koul Date: Tue Feb 21 21:14:35 2017 +0530 Merge branch 'topic/zx' into for-linus commit 8a3ec58382bfb5e9c6b63f47e1bd6335aafc980e Merge: 25036f2 5df4eb4 Author: Vinod Koul Date: Tue Feb 21 21:14:27 2017 +0530 Merge branch 'topic/stm32-dma' into for-linus commit 25036f2a7377d7135ce9848d58d14b5bc061541d Merge: e4e48c4 15c6066 Author: Vinod Koul Date: Tue Feb 21 21:14:07 2017 +0530 Merge branch 'topic/ste' into for-linus commit 70fcf5c339b12743133050842252e20cfd6d42b5 Merge: 2bfe01e 6c71100 Author: Linus Torvalds Date: Tue Feb 21 07:44:03 2017 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fixes and cleanups from Jan Kara: "Several small UDF fixes and cleanups and a small cleanup of fanotify code" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: simplify the code of fanotify_merge udf: simplify udf_ioctl() udf: fix ioctl errors udf: allow implicit blocksize specification during mount udf: check partition reference in udf_read_inode() udf: atomically read inode size udf: merge module informations in super.c udf: remove next_epos from udf_update_extent_cache() udf: Factor out trimming of crtime udf: remove empty condition udf: remove unneeded line break udf: merge bh free udf: use pointer for kernel_long_ad argument udf: use __packed instead of __attribute__ ((packed)) udf: Make stat on symlink report symlink length as st_size fs/udf: make #ifdef UDF_PREALLOCATE unconditional fs: udf: Replace CURRENT_TIME with current_time() commit e4e48c47d15df1dd5f74d3b5e8fc4c7817f45133 Merge: b802c84 f7c799e Author: Vinod Koul Date: Tue Feb 21 21:13:57 2017 +0530 Merge branch 'topic/intel' into for-linus commit 783112f7401ff449d979530209b3f6c2594fdb4e Author: Christoph Hellwig Date: Mon Feb 20 07:21:33 2017 +0100 nfsd: special case truncates some more Both the NFS protocols and the Linux VFS use a setattr operation with a bitmap of attributes to set to set various file attributes including the file size and the uid/gid. The Linux syscalls never mix size updates with unrelated updates like the uid/gid, and some file systems like XFS and GFS2 rely on the fact that truncates don't update random other attributes, and many other file systems handle the case but do not update the other attributes in the same transaction. NFSD on the other hand passes the attributes it gets on the wire more or less directly through to the VFS, leading to updates the file systems don't expect. XFS at least has an assert on the allowed attributes, which caught an unusual NFS client setting the size and group at the same time. To handle this issue properly this splits the notify_change call in nfsd_setattr into two separate ones. Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Tested-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/vfs.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit e7cd7ef58e1fedb09b16720919869a81d7a2b867 Author: Jaehoon Chung Date: Mon Feb 13 17:26:13 2017 +0900 PCI: exynos: Support the PHY generic framework Switch the pci-exynos driver to generic PHY framework. At the same time backward compatibility is preserved: Warning will be printed for old DTB. Refer to the binding file: - Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Reviewed-by: Alim Akhtar Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 54 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) commit 34f80c7ddfffe262bf04fb03e198e64de4cec7fc Author: Jaehoon Chung Date: Mon Feb 13 17:26:12 2017 +0900 Documentation: binding: Modify the exynos5440 PCIe binding According to using PHY framework, updates the exynos5440-pcie binding. For maintaining backward compatibility, leaves the current dt-binding. (It should be deprecated.) Recommends to use the PHY Framework and "config" property to follow the designware-pcie binding. If you use the old way, can see "missing *config* reg space" message. Because the getting configuration space address from range is old way. NOTE: When use the "config" property, first name of 'reg-names' must be set to "elbi". Otherwise driver can't maintain the backward capability. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Reviewed-by: Alim Akhtar Acked-by: Rob Herring .../bindings/pci/samsung,exynos5440-pcie.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit cf0adb8e281b69801fb8faef18c14443d9d41d3c Author: Jaehoon Chung Date: Mon Feb 13 17:26:11 2017 +0900 phy: phy-exynos-pcie: Add support for Exynos PCIe PHY Add support for Generic PHY framework about Exynos SoCs. Current Exynos PCIe driver doesn't use the PHY framework, which makes it difficult to upstream the other Exynos variants because of different PHY registers. Move the codes relevant to PHY from Exnyos PCIe driver to PHY Exynos PCIe driver. [bhelgaas: depend on "OF && (ARCH_EXYNOS || COMPILE_TEST)", update copyright year, both per Vivek] Signed-off-by: Jaehoon Chung Acked-by: Krzysztof Kozlowski Reviewed-by: Jingoo Han Reviewed-by: Pankaj Dubey Reviewed-by: Vivek Gautam Signed-off-by: Bjorn Helgaas drivers/phy/Kconfig | 8 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-exynos-pcie.c | 285 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) commit ad8ec41afa98615a4154eee0121bcf8276695327 Author: Jaehoon Chung Date: Mon Feb 13 17:26:10 2017 +0900 Documentation: samsung-phy: Add exynos-pcie-phy binding Add the exynos-pcie-phy binding for Exynos PCIe PHY. This is for using generic PHY framework. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/phy/samsung-phy.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3498d8694d41af701c51289e7caf3ffefc7bfb6b Author: Linus Walleij Date: Tue Feb 21 14:19:45 2017 +0100 gpio: reintroduce devm_get_gpiod_from_child() We need to keep this API around for the merge window to avoid nasty build problems in the merges. Cc: Lee Jones Suggested-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij include/linux/gpio/consumer.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3ef767e5cbd405abfd01339c7e5daaf98e037be2 Merge: 4eba8b7 40b446a Author: Pablo Neira Ayuso Date: Tue Feb 21 14:01:05 2017 +0100 Merge branch 'master' of git://blackhole.kfki.hu/nf Jozsef Kadlecsik says: ==================== ipset patches for nf Please apply the next patches for ipset in your nf branch. Both patches should go into the stable kernel branches as well, because these are important bugfixes: * Sometimes valid entries in hash:* types of sets were evicted due to a typo in an index. The wrong evictions happen when entries are deleted from the set and the bucket is shrinked. Bug was reported by Eric Ewanco and the patch fixes netfilter bugzilla id #1119. * Fixing of a null pointer exception when someone wants to add an entry to an empty list type of set and specifies an add before/after option. The fix is from Vishwanath Pai. ==================== Signed-off-by: Pablo Neira Ayuso commit 4eba8b78e1390f46828e00d6fa4d651c3d219894 Author: Liping Zhang Date: Sat Feb 18 10:35:47 2017 +0800 netfilter: nfnetlink: remove static declaration from err_list Otherwise, different subsys will race to access the err_list, with holding the different nfnl_lock(subsys_id). But this will not happen now, since ->call_batch is only implemented by nftables, so the err_list is protected by nfnl_lock(NFNL_SUBSYS_NFTABLES). Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba896a05ad9375912ccebdac9623aab97845600f Author: Ken-ichirou MATSUZAWA Date: Thu Feb 16 18:20:33 2017 +0900 netfilter: nfnetlink_queue: fix NFQA_VLAN_MAX definition Should be - 1 as in other _MAX definitions. Signed-off-by: Ken-ichirou MATSUZAWA Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nfnetlink_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd0fd8bca1850ddadf5d33a9ed28f3707cd98ac7 Author: Waiman Long Date: Mon Feb 20 13:36:04 2017 -0500 x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 It was found when running fio sequential write test with a XFS ramdisk on a KVM guest running on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 69.75% 0.59% fio [k] down_write 69.15% 0.01% fio [k] call_rwsem_down_write_failed 67.12% 1.12% fio [k] rwsem_down_write_failed 63.48% 52.77% fio [k] osq_lock 9.46% 7.88% fio [k] __raw_callee_save___kvm_vcpu_is_preempt 3.93% 3.93% fio [k] __kvm_vcpu_is_preempted Making vcpu_is_preempted() a callee-save function has a relatively high cost on x86-64 primarily due to at least one more cacheline of data access from the saving and restoring of registers (8 of them) to and from stack as well as one more level of function call. To reduce this performance overhead, an optimized assembly version of the the __raw_callee_save___kvm_vcpu_is_preempt() function is provided for x86-64. With this patch applied on a KVM guest on a 2-socket 16-core 32-thread system with 16 parallel jobs (8 on each socket), the aggregrate bandwidth of the fio test on an XFS ramdisk were as follows: I/O Type w/o patch with patch -------- --------- ---------- random read 8141.2 MB/s 8497.1 MB/s seq read 8229.4 MB/s 8304.2 MB/s random write 1675.5 MB/s 1701.5 MB/s seq write 1681.3 MB/s 1699.9 MB/s There are some increases in the aggregated bandwidth because of the patch. The perf data now became: 70.78% 0.58% fio [k] down_write 70.20% 0.01% fio [k] call_rwsem_down_write_failed 69.70% 1.17% fio [k] rwsem_down_write_failed 59.91% 55.42% fio [k] osq_lock 10.14% 10.14% fio [k] __kvm_vcpu_is_preempted The assembly code was verified by using a test kernel module to compare the output of C __kvm_vcpu_is_preempted() and that of assembly __raw_callee_save___kvm_vcpu_is_preempt() to verify that they matched. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Paolo Bonzini arch/x86/kernel/asm-offsets_64.c | 9 +++++++++ arch/x86/kernel/kvm.c | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 6c62985d576c8a816f528c39204207b9f449d923 Author: Waiman Long Date: Mon Feb 20 13:36:03 2017 -0500 x86/paravirt: Change vcp_is_preempted() arg type to long The cpu argument in the function prototype of vcpu_is_preempted() is changed from int to long. That makes it easier to provide a better optimized assembly version of that function. For Xen, vcpu_is_preempted(long) calls xen_vcpu_stolen(int), the downcast from long to int is not a problem as vCPU number won't exceed 32 bits. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Paolo Bonzini arch/x86/include/asm/paravirt.h | 2 +- arch/x86/include/asm/qspinlock.h | 2 +- arch/x86/kernel/kvm.c | 2 +- arch/x86/kernel/paravirt-spinlocks.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 96794e4ed4d758272c486e1529e431efb7045265 Author: Chao Peng Date: Tue Feb 21 03:50:01 2017 -0500 KVM: VMX: use correct vmcs_read/write for guest segment selector/base Guest segment selector is 16 bit field and guest segment base is natural width field. Fix two incorrect invocations accordingly. Without this patch, build fails when aggressive inlining is used with ICC. Cc: stable@vger.kernel.org Signed-off-by: Chao Peng Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7ffc44d5b2ea163899d09289ca7743d5c32e926 Author: Andy Lutomirski Date: Mon Feb 20 08:56:14 2017 -0800 x86/kvm/vmx: Defer TR reload after VM exit Intel's VMX is daft and resets the hidden TSS limit register to 0x67 on VMX reload, and the 0x67 is not configurable. KVM currently reloads TR using the LTR instruction on every exit, but this is quite slow because LTR is serializing. The 0x67 limit is entirely harmless unless ioperm() is in use, so defer the reload until a task using ioperm() is actually running. Here's some poorly done benchmarking using kvm-unit-tests: Before: cpuid 1313 vmcall 1195 mov_from_cr8 11 mov_to_cr8 17 inl_from_pmtimer 6770 inl_from_qemu 6856 inl_from_kernel 2435 outl_to_kernel 1402 After: cpuid 1291 vmcall 1181 mov_from_cr8 11 mov_to_cr8 16 inl_from_pmtimer 6457 inl_from_qemu 6209 inl_from_kernel 2339 outl_to_kernel 1391 Signed-off-by: Andy Lutomirski [Force-reload TR in invalidate_tss_limit. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/desc.h | 48 +++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/ioport.c | 5 +++++ arch/x86/kernel/process.c | 10 ++++++++++ arch/x86/kvm/vmx.c | 23 +++++++++------------- 4 files changed, 72 insertions(+), 14 deletions(-) commit d3273deac9c0cdae32eb46f928487433eaa37f87 Author: Andy Lutomirski Date: Mon Feb 20 08:56:13 2017 -0800 x86/asm/64: Drop __cacheline_aligned from struct x86_hw_tss Historically, the entire TSS + io bitmap structure was cacheline aligned, but commit ca241c75037b ("x86: unify tss_struct") changed it (presumably inadvertently) so that the fixed-layout hardware part is cacheline-aligned and the io bitmap is after the padding. This wastes 24 bytes (the hardware part should be 104 bytes, but this pads it to 128 bytes) and, serves no purpose, and causes sizeof(struct x86_hw_tss) to have a confusing value. Drop the pointless alignment. Signed-off-by: Andy Lutomirski Signed-off-by: Paolo Bonzini arch/x86/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c2e41f7ae1234c192ef497472ad306227c77c03 Author: Andy Lutomirski Date: Mon Feb 20 08:56:12 2017 -0800 x86/kvm/vmx: Simplify segment_base() Use actual pointer types for pointers (instead of unsigned long) and replace hardcoded constants with the appropriate self-documenting macros. The function is still a bit messy, but this seems a lot better than before to me. This is mostly borrowed from a patch by Thomas Garnier. Cc: Thomas Garnier Cc: Jim Mattson Cc: Radim Krčmář Cc: Paolo Bonzini Signed-off-by: Andy Lutomirski Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e28baeadcf0d657c6b6e849ae1b4faccb4faf326 Author: Andy Lutomirski Date: Mon Feb 20 08:56:11 2017 -0800 x86/kvm/vmx: Get rid of segment_base() on 64-bit kernels It was a bit buggy (it didn't list all segment types that needed 64-bit fixups), but the bug was irrelevant because it wasn't called in any interesting context on 64-bit kernels and was only used for data segents on 32-bit kernels. To avoid confusion, make it explicitly 32-bit only. Cc: Thomas Garnier Cc: Jim Mattson Cc: Radim Krčmář Cc: Paolo Bonzini Signed-off-by: Andy Lutomirski Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e0c230634af99967da79a6ed1faecc720fb623ca Author: Andy Lutomirski Date: Mon Feb 20 08:56:10 2017 -0800 x86/kvm/vmx: Don't fetch the TSS base from the GDT The current CPU's TSS base is a foregone conclusion, so there's no need to parse it out of the segment tables. This should save a couple cycles (as STR is surely microcoded and poorly optimized) but, more importantly, it's a cleanup and it means that segment_base() will never be called on 64-bit kernels. Cc: Thomas Garnier Cc: Jim Mattson Cc: Radim Krčmář Cc: Paolo Bonzini Signed-off-by: Andy Lutomirski Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4f53ab14285802b298261f8b52af322039d1dfd0 Author: Andy Lutomirski Date: Mon Feb 20 08:56:09 2017 -0800 x86/asm: Define the kernel TSS limit in a macro Rather than open-coding the kernel TSS limit in set_tss_desc(), make it a real macro near the TSS layout definition. This is purely a cleanup. Cc: Thomas Garnier Cc: Jim Mattson Signed-off-by: Andy Lutomirski Signed-off-by: Paolo Bonzini arch/x86/include/asm/desc.h | 10 +--------- arch/x86/include/asm/processor.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) commit 3dbbaf200f532e01e56168b8339f2981f2cb1d67 Author: Michael Roth Date: Mon Feb 20 19:12:18 2017 -0600 powerpc/pseries: Advertise Hot Plug Event support to firmware With the inclusion of commit 333f7b76865b ("powerpc/pseries: Implement indexed-count hotplug memory add") and commit 753843471cbb ("powerpc/pseries: Implement indexed-count hotplug memory remove"), we now have complete handling of the RTAS hotplug event format as described by PAPR via ACR "PAPR Changes for Hotplug RTAS Events". This capability is indicated by byte 6, bit 2 (5 in IBM numbering) of architecture option vector 5, and allows for greater control over cpu/memory/pci hot plug/unplug operations. Existing pseries kernels will utilize this capability based on the existence of the /event-sources/hot-plug-events DT property, so we only need to advertise it via CAS and do not need a corresponding FW_FEATURE_* value to test for. Signed-off-by: Michael Roth Signed-off-by: Michael Ellerman arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 171ed0fcd8966d82c45376f1434678e7b9d4d9b1 Author: Andrew Donnellan Date: Mon Feb 6 12:07:17 2017 +1100 cxl: fix nested locking hang during EEH hotplug Commit 14a3ae34bfd0 ("cxl: Prevent read/write to AFU config space while AFU not configured") introduced a rwsem to fix an invalid memory access that occurred when someone attempts to access the config space of an AFU on a vPHB whilst the AFU is deconfigured, such as during EEH recovery. It turns out that it's possible to run into a nested locking issue when EEH recovery fails and a full device hotplug is required. cxl_pci_error_detected() deconfigures the AFU, taking a writer lock on configured_rwsem. When EEH recovery fails, the EEH code calls pci_hp_remove_devices() to remove the device, which in turn calls cxl_remove() -> cxl_pci_remove_afu() -> pci_deconfigure_afu(), which tries to grab the writer lock that's already held. Standard rwsem semantics don't express what we really want to do here and don't allow for nested locking. Fix this by replacing the rwsem with an atomic_t which we can control more finely. Allow the AFU to be locked multiple times so long as there are no readers. Fixes: 14a3ae34bfd0 ("cxl: Prevent read/write to AFU config space while AFU not configured") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 5 +++-- drivers/misc/cxl/main.c | 3 +-- drivers/misc/cxl/pci.c | 11 +++++++++-- drivers/misc/cxl/vphb.c | 18 ++++++++++++++---- 4 files changed, 27 insertions(+), 10 deletions(-) commit 8a5897fec98e1f1fa045ccad87817eeb24579953 Merge: 2bfe01e 68ba323 Author: Ingo Molnar Date: Tue Feb 21 09:05:29 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170220' 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: New features: - Make -a/--all-cpus be the default target in 'perf record' and 'perf stat', just like it is with 'perf trace' (Jiri Olsa) - Introduce -q/--quiet to the 'annotate', 'diff' and 'report', fix up its behaviour in 'record'. This makes the output more compact by elliminating headers, leaving just the histogram lines (Namhyung Kim) Fixes: - Handle offline/absent CPUs (Jan Stancek) Infrastructure changes: - Filter out -specs=/a/b/c from CC options when building the python support, allowing that feature to be built with clang (Arnaldo Carvalho de Melo) - Fix DEBUG=1 build with clang (Arnaldo Carvalho de Melo) Trivial changes: - Fix spelling of 'preempt' in a libtraceevent function name (Steven Rostedt) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit ef1d75263fdafc3ff4018512fce8607ae61d7985 Merge: d5adbfc 992edf3 Author: Zhang Rui Date: Tue Feb 21 15:50:23 2017 +0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc commit 5e48dc0aa4d9daf93e9bff2a274473623a134ec8 Author: Douglas Miller Date: Tue Feb 7 07:40:44 2017 -0600 powerpc/xmon: Dump memory in CPU endian format Extend the dump command to allow display of 2, 4, and 8 byte words in CPU endian format. Also adds dump command for "1 byte values" for the sake of symmetry. New commands are: d1 dump 1 byte values d2 dump 2 byte values d4 dump 4 byte values d8 dump 8 byte values Signed-off-by: Michael Ellerman Signed-off-by: Douglas Miller Acked-by: Balbir Singh arch/powerpc/xmon/xmon.c | 58 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) commit 017b29c38c0dc8aece778b44fad32adf8862c188 Author: Jason Wang Date: Mon Feb 20 11:50:20 2017 +0800 virito-net: set queues after reset during xdp_set We set queues before reset which will cause a crash[1]. This is because is_xdp_raw_buffer_queue() depends on the old xdp queue pairs number to do the correct detection. So fix this by - passing xdp queue pairs and current queue pairs to virtnet_reset() - change vi->xdp_qp after reset but before refill, to make sure both free_unused_bufs() and refill can make correct detection of XDP. - remove the duplicated queue pairs setting before virtnet_reset() since we will do it inside virtnet_reset() [1] [ 74.328168] general protection fault: 0000 [#1] SMP [ 74.328625] Modules linked in: nfsd xfs libcrc32c virtio_net virtio_pci [ 74.329117] CPU: 0 PID: 2849 Comm: xdp2 Not tainted 4.10.0-rc7+ #499 [ 74.329577] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014 [ 74.330424] task: ffff88007a894000 task.stack: ffffc90004388000 [ 74.330844] RIP: 0010:skb_release_head_state+0x28/0x80 [ 74.331298] RSP: 0018:ffffc9000438b8d0 EFLAGS: 00010206 [ 74.331676] RAX: 0000000000000000 RBX: ffff88007ad96300 RCX: 0000000000000000 [ 74.332217] RDX: ffff88007fc137a8 RSI: ffff88007fc0db28 RDI: 0001bf00000001be [ 74.332758] RBP: ffffc9000438b8d8 R08: 000000000005008f R09: 00000000000005f9 [ 74.333274] R10: ffff88007d001700 R11: ffffffff820a8a4d R12: ffff88007ad96300 [ 74.333787] R13: 0000000000000002 R14: ffff880036604000 R15: 000077ff80000000 [ 74.334308] FS: 00007fc70d8a7b40(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 [ 74.334891] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 74.335314] CR2: 00007fff4144a710 CR3: 000000007ab56000 CR4: 00000000003406f0 [ 74.335830] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 74.336373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 74.336895] Call Trace: [ 74.337086] skb_release_all+0xd/0x30 [ 74.337356] consume_skb+0x2c/0x90 [ 74.337607] free_unused_bufs+0x1ff/0x270 [virtio_net] [ 74.337988] ? vp_synchronize_vectors+0x3b/0x60 [virtio_pci] [ 74.338398] virtnet_xdp+0x21e/0x440 [virtio_net] [ 74.338741] dev_change_xdp_fd+0x101/0x140 [ 74.339048] do_setlink+0xcf4/0xd20 [ 74.339304] ? symcmp+0xf/0x20 [ 74.339529] ? mls_level_isvalid+0x52/0x60 [ 74.339828] ? mls_range_isvalid+0x43/0x50 [ 74.340135] ? nla_parse+0xa0/0x100 [ 74.340400] rtnl_setlink+0xd4/0x120 [ 74.340664] ? cpumask_next_and+0x30/0x50 [ 74.340966] rtnetlink_rcv_msg+0x7f/0x1f0 [ 74.341259] ? sock_has_perm+0x59/0x60 [ 74.341586] ? napi_consume_skb+0xe2/0x100 [ 74.342010] ? rtnl_newlink+0x890/0x890 [ 74.342435] netlink_rcv_skb+0x92/0xb0 [ 74.342846] rtnetlink_rcv+0x23/0x30 [ 74.343277] netlink_unicast+0x162/0x210 [ 74.343677] netlink_sendmsg+0x2db/0x390 [ 74.343968] sock_sendmsg+0x33/0x40 [ 74.344233] SYSC_sendto+0xee/0x160 [ 74.344482] ? SYSC_bind+0xb0/0xe0 [ 74.344806] ? sock_alloc_file+0x92/0x110 [ 74.345106] ? fd_install+0x20/0x30 [ 74.345360] ? sock_map_fd+0x3f/0x60 [ 74.345586] SyS_sendto+0x9/0x10 [ 74.345790] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 74.346086] RIP: 0033:0x7fc70d1b8f6d [ 74.346312] RSP: 002b:00007fff4144a708 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 74.346785] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fc70d1b8f6d [ 74.347244] RDX: 000000000000002c RSI: 00007fff4144a720 RDI: 0000000000000003 [ 74.347683] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 [ 74.348544] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff4144bd90 [ 74.349082] R13: 0000000000000002 R14: 0000000000000002 R15: 00007fff4144cda0 [ 74.349607] Code: 00 00 00 55 48 89 e5 53 48 89 fb 48 8b 7f 58 48 85 ff 74 0e 40 f6 c7 01 74 3d 48 c7 43 58 00 00 00 00 48 8b 7b 68 48 85 ff 74 05 ff 0f 74 20 48 8b 43 60 48 85 c0 74 14 65 8b 15 f3 ab 8d 7e [ 74.351008] RIP: skb_release_head_state+0x28/0x80 RSP: ffffc9000438b8d0 [ 74.351625] ---[ end trace fe6e19fd11cfc80b ]--- Fixes: 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head") Cc: John Fastabend Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 1763413ac2c15f80fa2c2e308ecbf1a1b550a4c3 Author: Michael Walle Date: Mon Feb 20 16:54:18 2017 +0100 dpaa_eth: implement ioctl() for PHY-related ops This commit adds the ndo_do_ioctl() callback which allows the userspace to access PHY registers, for example. This will make mii-diag and similar tools work. Signed-off-by: Michael Walle Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2cf8a897116a4433ca579aff8b0813d8fb2c4473 Author: Philippe Reynes Date: Mon Feb 20 22:59:13 2017 +0100 net: qualcomm: qca: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_debug.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 836dacdd5b932f8ed8ca9f90e7b7e6751f478627 Merge: 5a4dcdc 1708639 Author: David S. Miller Date: Mon Feb 20 21:59:16 2017 -0500 Merge branch 'bnxt_en-probe-and-open-bugs' Michael Chan says: ==================== bnxt_en: Fix probe and open bugs. Fix 3 issues related to bnxt_init_one() and bnxt_open(). Don't probe bridge devices and fixup some error code paths. ==================== Signed-off-by: David S. Miller commit 17086399c113d933e1202697f85b8f0f82fcb8ce Author: Sathya Perla Date: Mon Feb 20 19:25:18 2017 -0500 bnxt_en: fix pci cleanup in bnxt_init_one() failure path In the bnxt_init_one() failure path, bar1 and bar2 are not being unmapped. This commit fixes this issue. Reorganize the code so that bnxt_init_one()'s failure path and bnxt_remove_one() can call the same function to do the PCI cleanup. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 76 ++++++++++++++++--------------- 1 file changed, 39 insertions(+), 37 deletions(-) commit daf1f1e7841138cb0e48d52c8573a5f064d8f495 Author: Michael Chan Date: Mon Feb 20 19:25:17 2017 -0500 bnxt_en: Fix NULL pointer dereference in a failure path during open. If bnxt_hwrm_ring_free() is called during a failure path in bnxt_open(), it is possible that the completion rings have not been allocated yet. In that case, the completion doorbell has not been initialized, and calling bnxt_disable_int() will crash. Fix it by checking that the completion ring has been initialized before writing to the completion ring doorbell. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4e00338a61998de3502d0428c4f71ffc69772316 Author: Ray Jui Date: Mon Feb 20 19:25:16 2017 -0500 bnxt_en: Reject driver probe against all bridge devices There are additional SoC devices that use the same device ID for bridge and NIC devices. The bnxt driver should reject probe against all bridge devices since it's meant to be used with only endpoint devices. Signed-off-by: Ray Jui 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 2bfe01eff4307409b95859e860261d0907149b61 Merge: cab7076 ae6f8dd Author: Linus Torvalds Date: Mon Feb 20 18:38:47 2017 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull CIFS/SMB3 updates from Steve French: "Includes support for a critical SMB3 security feature: per-share encryption from Pavel, and a cleanup from Jean Delvare. Will have another cifs/smb3 merge next week" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Allow to switch on encryption with seal mount option CIFS: Add capability to decrypt big read responses CIFS: Decrypt and process small encrypted packets CIFS: Add copy into pages callback for a read operation CIFS: Add mid handle callback CIFS: Add transform header handling callbacks CIFS: Encrypt SMB3 requests before sending CIFS: Enable encryption during session setup phase CIFS: Add capability to transform requests before sending CIFS: Separate RFC1001 length processing for SMB2 read CIFS: Separate SMB2 sync header processing CIFS: Send RFC1001 length in a separate iov CIFS: Make send_cancel take rqst as argument CIFS: Make SendReceive2() takes resp iov CIFS: Separate SMB2 header structure CIFS: Fix splice read for non-cached files cifs: Add soft dependencies cifs: Only select the required crypto modules cifs: Simplify SMB2 and SMB311 dependencies commit cab7076a185e1e27f6879325e4da762424c3f1c9 Merge: 6c24337 e9be2ac Author: Linus Torvalds Date: Mon Feb 20 18:24:39 2017 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "For this cycle we add support for the shutdown ioctl, which is primarily used for testing, but which can be useful on production systems when a scratch volume is being destroyed and the data on it doesn't need to be saved. This found (and we fixed) a number of bugs with ext4's recovery to corrupted file system --- the bugs increased the amount of data that could be potentially lost, and in the case of the inline data feature, could cause the kernel to BUG. Also included are a number of other bug fixes, including in ext4's fscrypt, DAX, inline data support" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (26 commits) ext4: rename EXT4_IOC_GOINGDOWN to EXT4_IOC_SHUTDOWN ext4: fix fencepost in s_first_meta_bg validation ext4: don't BUG when truncating encrypted inodes on the orphan list ext4: do not use stripe_width if it is not set ext4: fix stripe-unaligned allocations dax: assert that i_rwsem is held exclusive for writes ext4: fix DAX write locking ext4: add EXT4_IOC_GOINGDOWN ioctl ext4: add shutdown bit and check for it ext4: rename s_resize_flags to s_ext4_flags ext4: return EROFS if device is r/o and journal replay is needed ext4: preserve the needs_recovery flag when the journal is aborted jbd2: don't leak modified metadata buffers on an aborted journal ext4: fix inline data error paths ext4: move halfmd4 into hash.c directly ext4: fix use-after-iput when fscrypt contexts are inconsistent jbd2: fix use after free in kjournald2() ext4: fix data corruption in data=journal mode ext4: trim allocation requests to group size ext4: replace BUG_ON with WARN_ON in mb_find_extent() ... commit 6c24337f22115d669e24ce990842dab667371b4d Merge: 786856b 6f69f0e Author: Linus Torvalds Date: Mon Feb 20 18:22:31 2017 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypt updates from Ted Ts'o: "Various cleanups for the file system encryption feature" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: constify struct fscrypt_operations fscrypt: properly declare on-stack completion fscrypt: split supp and notsupp declarations into their own headers fscrypt: remove redundant assignment of res fscrypt: make fscrypt_operations.key_prefix a string fscrypt: remove unused 'mode' member of fscrypt_ctx ext4: don't allow encrypted operations without keys fscrypt: make test_dummy_encryption require a keyring key fscrypt: factor out bio specific functions fscrypt: pass up error codes from ->get_context() fscrypt: remove user-triggerable warning messages fscrypt: use EEXIST when file already uses different policy fscrypt: use ENOTDIR when setting encryption policy on nondirectory fscrypt: use ENOKEY when file cannot be created w/o key commit 786856b6d111a30d51c98526cc7a283ecc73f00f Merge: 43e31e4 d3e1b61 Author: Linus Torvalds Date: Mon Feb 20 18:06:09 2017 -0800 Merge tag 'device-properties-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device property updates from Rafael J. Wysocki: "Generic device properties framework updates for v4.11-rc1 Allow built-in (static) device properties to be declared as constant, make it possible to save memory by discarding alternative (but unused) built-in (static) property sets and add support for automatic handling of built-in properties to the I2C code" * tag 'device-properties-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: i2c: allow specify device properties in i2c_board_info device property: export code duplicating array of property entries device property: constify property arrays values device property: allow to constify properties commit 943db62c316c578f8e2cc6fb81a5f641096b29bf Author: Nathan Fontenot Date: Wed Feb 15 13:45:30 2017 -0500 powerpc/pseries: Revert 'Auto-online hotplugged memory' This reverts commit ec999072442a ("powerpc/pseries: Auto-online hotplugged memory"), and 9dc512819e4b ("powerpc: Fix unused function warning 'lmb_to_memblock'"). Using the auto-online acpability does online added memory but does not update the associated device struct to indicate that the memory is online. This causes the pseries memory DLPAR code to fail when trying to remove a LMB that was previously removed and added back. This happens when validating that the LMB is removable. This patch reverts to the previous behavior of calling device_online() to online the LMB when it is DLPAR added and moves the lmb_to_memblock() routine out of CONFIG_MEMORY_HOTREMOVE now that we call it for add. Fixes: ec999072442a ("powerpc/pseries: Auto-online hotplugged memory") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/platforms/pseries/hotplug-memory.c | 52 ++++++++++++++++++------- 2 files changed, 37 insertions(+), 16 deletions(-) commit 43e31e40473a00c936ffb9c2eebedc0566c92e89 Merge: 02c3de1 ac18c0c Author: Linus Torvalds Date: Mon Feb 20 17:55:15 2017 -0800 Merge tag 'acpi-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20170119, which among other things updates copyright notices in all of the ACPICA files, fix a couple of issues in the ACPI EC and button drivers, fix modalias handling for non-discoverable devices with DT-compatible identification strings, add a suspend quirk for one platform and fix a message in the APEI code. Specifics: - Update of the ACPICA code in the kernel to upstream revision 20170119 including: + Fixes related to the handling of the bit width and bit offset fields in Generic Address Structure (Lv Zheng) + ACPI resources handling fix related to invalid resource descriptors (Bob Moore) + Fix to enable implicit result conversion for several ASL library functions (Bob Moore) + Support for method invocations as target operands in AML (Bob Moore) + Fix to use a correct operand type for DeRefOf() in some situations (Bob Moore) + Utilities updates (Bob Moore, Lv Zheng) + Disassembler/debugger updates (David Box, Lv Zheng) + Build fixes (Colin Ian King, Lv Zheng) + Update of copyright notices in all files (Bob Moore) - Fix for modalias handling for SPI and I2C devices with DT-compatible identification strings (Dan O'Donovan) - Fixes for the ACPI EC and button drivers (Lv Zheng) - ACPI processor handling fix related to CPU hotplug (online/offline) on x86 (Vitaly Kuznetsov) - Suspend quirk to save/restore NVS memory over S3 transitions for Lenovo G50-45 (Zhang Rui) - Message formatting fix for the ACPI APEI code (Colin Ian King)" * tag 'acpi-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) ACPICA: Update version to 20170119 ACPICA: Tools: Update common signon, remove compilation bit width ACPICA: Source tree: Update copyright notices to 2017 ACPICA: Linuxize: Restore and fix Intel compiler build x86/ACPI: keep x86_cpu_to_acpiid mapping valid on CPU hotplug spi: acpi: Initialize modalias from of_compatible i2c: acpi: Initialize info.type from of_compatible ACPI / bus: Introduce acpi_of_modalias() equiv of of_modalias_node() ACPI: save NVS memory for Lenovo G50-45 ACPI, APEI, EINJ: fix malformed newline escape ACPI / button: Remove lid_init_state=method mode ACPI / button: Change default behavior to lid_init_state=open ACPI / EC: Use busy polling mode when GPE is not enabled ACPI / EC: Remove old CLEAR_ON_RESUME quirk ACPICA: Update version to 20161222 ACPICA: Parser: Update parse info table for some operators ACPICA: Fix a problem with recent extra support for control method invocations ACPICA: Parser: Allow method invocations as target operands ACPICA: Fix for implicit result conversion for the ToXXX functions ACPICA: Resources: Not a valid resource if buffer length too long .. commit 02c3de1105228e367320e7fdeffbf511904f398c Merge: 7aa7d60 eee77a8 Author: Linus Torvalds Date: Mon Feb 20 17:41:31 2017 -0800 Merge tag 'pm-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "The majority of changes go into the Operating Performance Points (OPP) framework and cpufreq this time, followed by devfreq and some scattered updates all over. The OPP changes are mostly related to switching over from RCU-based synchronization, that turned out to be overly complicated and problematic, to reference counting using krefs. In the cpufreq land there are core cleanups, documentation updates, a new driver for Broadcom BMIPS SoCs, a new cpufreq-dt sub-driver for TI SoCs that require special handling, ARM64 SoCs support for the qoriq driver, intel_pstate updates, powernv driver update and assorted fixes. The devfreq changes are mostly fixes related to the sysfs interface and some Exynos drivers updates. Apart from that, the cpuidle menu governor will support per-CPU PM QoS constraints for the wakeup latency now, some bugs in the wakeup IRQs framework are fixed, the generic power domains framework should handle asynchronous invocations of *noirq suspend/resume callbacks from now on, the analyze_suspend.py script is updated and there is a new tool for intel_pstate diagnostics. Specifics: - Operating Performance Points (OPP) framework fixes, cleanups and switch over from RCU-based synchronization to reference counting using krefs (Viresh Kumar, Wei Yongjun, Dave Gerlach) - cpufreq core cleanups and documentation updates (Viresh Kumar, Rafael Wysocki) - New cpufreq driver for Broadcom BMIPS SoCs (Markus Mayer) - New cpufreq-dt sub-driver for TI SoCs requiring special handling, like in the AM335x, AM437x, DRA7x, and AM57x families, along with new DT bindings for it (Dave Gerlach, Paul Gortmaker) - ARM64 SoCs support for the qoriq cpufreq driver (Tang Yuantian) - intel_pstate driver updates including a new sysfs knob to control the driver's operation mode and fixes related to the no_turbo sysfs knob and the hardware-managed P-states feature support (Rafael Wysocki, Srinivas Pandruvada) - New interface to export ultra-turbo frequencies for the powernv cpufreq driver (Shilpasri Bhat) - Assorted fixes for cpufreq drivers (Arnd Bergmann, Dan Carpenter, Wei Yongjun) - devfreq core fixes, mostly related to the sysfs interface exported by it (Chanwoo Choi, Chris Diamand) - Updates of the exynos-bus and exynos-ppmu devfreq drivers (Chanwoo Choi) - Device PM QoS extension to support CPUs and support for per-CPU wakeup (device resume) latency constraints in the cpuidle menu governor (Alex Shi) - Wakeup IRQs framework fixes (Grygorii Strashko) - Generic power domains framework update including a fix to make it handle asynchronous invocations of *noirq suspend/resume callbacks correctly (Ulf Hansson, Geert Uytterhoeven) - Assorted fixes and cleanups in the core suspend/hibernate code, PM QoS framework and x86 ACPI idle support code (Corentin Labbe, Geert Uytterhoeven, Geliang Tang, John Keeping, Nick Desaulniers) - Update of the analyze_suspend.py script is updated to version 4.5 offering multiple improvements (Todd Brandt) - New tool for intel_pstate diagnostics using the pstate_sample tracepoint (Doug Smythies)" * tag 'pm-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (85 commits) MAINTAINERS: cpufreq: add bmips-cpufreq.c PM / QoS: Fix memory leak on resume_latency.notifiers PM / Documentation: Spelling s/wrtie/write/ PM / sleep: Fix test_suspend after sleep state rework cpufreq: CPPC: add ACPI_PROCESSOR dependency cpufreq: make ti-cpufreq explicitly non-modular cpufreq: Do not clear real_cpus mask on policy init tools/power/x86: Debug utility for intel_pstate driver AnalyzeSuspend: fix drag and zoom bug in javascript PM / wakeirq: report a wakeup_event on dedicated wekup irq PM / wakeirq: Fix spurious wake-up events for dedicated wakeirqs PM / wakeirq: Enable dedicated wakeirq for suspend cpufreq: dt: Don't use generic platdev driver for ti-cpufreq platforms cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime Documentation: dt: add bindings for ti-cpufreq PM / OPP: Expose _of_get_opp_desc_node as dev_pm_opp API cpufreq: qoriq: Don't look at clock implementation details cpufreq: qoriq: add ARM64 SoCs support PM / Domains: Provide dummy governors if CONFIG_PM_GENERIC_DOMAINS=n cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() ... commit 7aa7d608112baf63a0b1278955f9619427373807 Merge: 85adbcd fb3d769 Author: Linus Torvalds Date: Mon Feb 20 17:31:23 2017 -0800 Merge tag 'leds_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "New features and improvements: - add new optional brightness_hw_changed attribute for the LEDs that may have their brightness level changed autonomously (outside of kernel control) by hardware / firmware. The attribute supports userspace notifications through POLLPRI events - add led_brightness_hw_mon tool that demonstrates how to use the aforementioned feature - add LED_ON enum for LEDs that can be only turned on/off, and don't allow setting other brightness levels - allow for adjusting heartbeat trigger blink brightness level Fixes and cleanups: - avoid harmless maybe-uninitialized warning in leds-ktd2692.c - add context to the existing example entries in common LED bindings to make the documentation more clear" * tag 'leds_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: ledtrig-heartbeat: Make top brightness adjustable tools/leds: Add led_hw_brightness_mon program leds: class: Add new optional brightness_hw_changed attribute leds: ktd2692: avoid harmless maybe-uninitialized warning leds: add LED_ON brightness as boolean value DT: leds: Improve examples by adding some context commit 85adbcd54f0982040c8cc7a086f01554b8f64427 Merge: f790bd9 57f22cd Author: Linus Torvalds Date: Mon Feb 20 17:26:11 2017 -0800 Merge tag 'spi-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "This release is mainly a collection of driver specific updates, including a few nice cleanups to make drivers use more core features. - automatically use the parent device to allocate DMA buffers if there wasn't an explicitly configured device. - fixes for leaks on allocation. - a small piece of the start of SPI slave support, a feature that's been on the cards for over a decade!" * tag 'spi-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (55 commits) spi: spi-ti-qspi: Fix error handling spi: spi-ti-qspi: Fix error handling spi: lantiq-ssc: activate under COMPILE_TEST spi: armada-3700: Remove spi_master_put in a3700_spi_remove() spi: ti-qspi: revise ti_qspi_probe() failure flow spi: spi-ep93xx: simplify GPIO chip selects spi: rspi: Replaces "n" by "len" in qspi_transfer_*() spi: rspi: Fixes bogus received byte in qspi_transfer_in() spi: bcm-qspi: Remove unnecessary platform_set_drvdata() spi: bcm-qspi: Fix bcm_qspi_bspi_read() performance spi: lantiq-ssc: add support for Lantiq SSC SPI controller spi: s3c64xx: fix inconsistency between binding and driver spi: armada-3700: Remove .owner field for driver spi: bcm-qspi: Added mspi read fallback in bcm_qspi_flash_read() spi: fix device-node leaks spi: mediatek: Only do dma for 4-byte aligned buffers spi: When no dma_chan map buffers with spi_master's parent spi: pca2xx-pci: Allow MSI spi: pxa2xx: Prepare for edge-triggered interrupts spi: pxa2xx: Add support for Intel Gemini Lake ... commit f790bd9c8e826434ab6c326b225276ed0f73affe Merge: b3de5ad fad9cd4 Author: Linus Torvalds Date: Mon Feb 20 17:23:57 2017 -0800 Merge tag 'regulator-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Quite a lot of work going on the core this release, mainly around system initialization, but a quiet release for drivers: - fixes for registration of multiple regulators on a PMIC from Javier Martinez Canillas and Jon Hunter. - cleanups to the regulator_get() code from Dmitry Torokhov - lots of constifcation of structs from Bhumika Goyal - support for Motorola CPCAP regulators from Tony Lindgren" * tag 'regulator-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (52 commits) regulator: core: Resolve supplies before disabling unused regulators regulator: Fix regulator_summary for deviceless consumers regulator: tps65086: Fix DT node referencing in of_parse_cb regulator: tps65086: Fix expected switch DT node names regulator: core: simplify _regulator_get() regulator: core: have regulator_dev_lookup() return ERR_PTR-encoded errors regulator: gpio: correct default type regulator: cpcap: Add basic regulator support regulator: core: fix typo in regulator_bulk_disable() regulator: core: optimize devm_regulator_bulk_get() regulator: core: simplify regulator_bulk_force_disable() regulator: core: have _regulator_get() accept get_type argument regulator: core: remove dead code in _regulator_get() regulator: rn5t618: constify regulator_ops structure regulator: rc5t583-regulator: constify regulator_ops structure regulator: pv88090-regulator: constify regulator_ops structure regulator: pv88080-regulator: constify regulator_ops structure regulator: pv88060-regulator: constify regulator_ops structure regulator: pfuze100-regulator: constify regulator_ops structure regulator: pcf50633-regulator: constify regulator_ops structure ... commit b3de5ad688f0f52457e73767f95a640ab4158d0d Merge: 27a67e0 90e51e6 Author: Linus Torvalds Date: Mon Feb 20 17:20:34 2017 -0800 Merge tag 'regmap-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "For v4.11 activity on the regmap API has literally doubled, there are two patches this release: - fixes from Charles Keepax to make the kerneldoc generate correctly - a cleanup from Geliang Tang using rb_entry() rather than open coding it with container_of()" * tag 'regmap-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Fixup the kernel-doc comments on functions/structures regmap: use rb_entry() commit 27a67e0f983567574ef659520d930f82cf65125a Merge: 59da2a0 53f724b Author: Linus Torvalds Date: Mon Feb 20 17:16:43 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - a lot of Wacom driver updates; most notably second generation Intuos Pro is now supported, code from Aaron Armstrong Skomra and Jason Gerecke - Surface 3 and 4 Type Cover Pro support from Daniel Keller, Dennis Chen and Yuta Kobayashi - hid-rmi is now generic transport driver, used by synaptics-rmi4; Support the Lenovo Thinkpad X1 Tablet dock follows on top, from Andrew Duggan - a few misc bugfixes and improvements here and there * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (29 commits) HID: intel-ish-hid: constify device_type structure HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range HID: intel-ish-hid: ipc: check FW status to distinguish ISH resume paths HID: multitouch: fix LG Melfas touchscreen HID: wacom: don't apply generic settings to old devices HID: wacom: generic: support LEDs HID: wacom: generic: support generic touch switch HID: wacom: generic: add vendor defined touch HID: wacom: generic: add support for touchring HID: wacom: generic: remove input_event_flag HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface HID: wacom: Move WAC_CMD_* into wacom_wac.h HID: wacom: Enable HID_GENERIC codepath for Bluetooth devices HID: wacom: do not attempt to switch mode while in probe HID: wacom: remove warning while disconnecting devices HID: wacom: release the resources before leaving despite devm HID: whitespace cleanup HID: multitouch: enable Surface 3 Type Cover Pro to report multitouch data HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmi HID: rmi: Handle all Synaptics touchpads using hid-rmi ... commit 59da2a0630b8db5fa71fa5ca0052fd3fe3766d94 Merge: ebb4949 372e2db Author: Linus Torvalds Date: Mon Feb 20 17:13:23 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching updates from Jiri Kosina: - removal of dead code (Kamalesh Babulal) - documentation update (Miroslav Benes) * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: doc: remove the limitation for schedule() patching powerpc/livepatch: Remove klp_write_module_reloc() stub commit ebb4949eb32ff500602f960525592fc4e614c5a7 Merge: 937b5b5 8d2932d Author: Linus Torvalds Date: Mon Feb 20 16:42:43 2017 -0800 Merge tag 'iommu-updates-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU UPDATES from Joerg Roedel: - KVM PCIe/MSI passthrough support on ARM/ARM64 - introduction of a core representation for individual hardware iommus - support for IOMMU privileged mappings as supported by some ARM IOMMUS - 16-bit SID support for ARM-SMMUv2 - stream table optimization for ARM-SMMUv3 - various fixes and other small improvements * tag 'iommu-updates-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (61 commits) vfio/type1: Fix error return code in vfio_iommu_type1_attach_group() iommu: Remove iommu_register_instance interface iommu/exynos: Make use of iommu_device_register interface iommu/mediatek: Make use of iommu_device_register interface iommu/msm: Make use of iommu_device_register interface iommu/arm-smmu: Make use of the iommu_register interface iommu: Add iommu_device_set_fwnode() interface iommu: Make iommu_device_link/unlink take a struct iommu_device iommu: Add sysfs bindings for struct iommu_device iommu: Introduce new 'struct iommu_device' iommu: Rename struct iommu_device iommu: Rename iommu_get_instance() iommu: Fix static checker warning in iommu_insert_device_resv_regions iommu: Avoid unnecessary assignment of dev->iommu_fwspec iommu/mediatek: Remove bogus 'select' statements iommu/dma: Remove bogus dma_supported() implementation iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space iommu/vt-d: Don't over-free page table directories iommu/vt-d: Tylersburg isoch identity map check is done too late. iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu ... commit 937b5b5ddd2f685b4962ec19502e641bb5741c12 Merge: c945d02 3dfe330 Author: Linus Torvalds Date: Mon Feb 20 16:39:47 2017 -0800 Merge tag 'm68k-for-v4.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - kernel message modernizations and cleanups - defconfig updates - cleanups * tag 'm68k-for-v4.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/sun3: Remove dead code in paging_init() m68k/include: Modernize printing of kernel messages m68k/mm: Modernize printing of kernel messages m68k/mm: sun3 - Modernize printing of kernel messages m68k/kernel: Modernize printing of kernel messages m68k/sun3x: Modernize printing of kernel messages m68k/sun3: Modernize printing of kernel messages m68k/q40: Modernize printing of kernel messages m68k/mvme16x: Modernize printing of kernel messages m68k/mvme147: Modernize printing of kernel messages m68k/bvme6000: Modernize printing of kernel messages m68k/68000: Modernize printing of kernel messages m68k/atari: Modernize printing of kernel messages m68k: Delete an unnecessary variable assignment in sys_cacheflush() m68k/mac: Clean up interrupt debug macros and printk statements m68k/mac: Remove SHUTUP_SONIC interrupt hack m68k/mac: Improve NMI handler m68k/defconfig: Update defconfigs for v4.10-rc1 m68k/mac: Remove unneeded linux/miscdevice.h include commit c945d0227d86ddc3485290fa5da1a7d2c9b759de Merge: 8b5abde d48085f Author: Linus Torvalds Date: Mon Feb 20 16:26:57 2017 -0800 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "Misc platform updates: SGI UV4 support additions, intel-mid Merrifield enhancements and purge of old code" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/platform/UV/NMI: Fix uneccessary kABI breakage x86/platform/UV: Clean up the NMI code to match current coding style x86/platform/UV: Ensure uv_system_init is called when necessary x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source x86/platform/UV: Verify NMI action is valid, default is standard x86/platform/UV: Add basic CPU NMI health check x86/platform/UV: Add Support for UV4 Hubless NMIs x86/platform/UV: Add Support for UV4 Hubless systems x86/platform/UV: Clean up the UV APIC code x86/platform/intel-mid: Move watchdog registration to arch_initcall() x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() x86/platform/intel-mid: Allocate RTC interrupt for Merrifield x86/ioapic: Return suitable error code in mp_map_gsi_to_irq() x86/platform/UV: Fix 2 socket config problem x86/platform/UV: Fix panic with missing UVsystab support x86/platform/intel-mid: Enable RTC on Intel Merrifield x86/platform/intel: Remove PMIC GPIO block support x86/platform/intel-mid: Make intel_scu_device_register() static x86/platform/intel-mid: Enable GPIO keys on Merrifield x86/platform/intel-mid: Get rid of duplication of IPC handler ... commit 8b5abde16bdc939d0602ea37bef0184a396ca9ea Merge: a25a1d6 025205f Author: Linus Torvalds Date: Mon Feb 20 15:57:19 2017 -0800 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "A laundry list of changes: KASAN improvements/fixes for ptdump, a self-test fix, PAT cleanup and wbinvd() avoidance, removal of stale code and documentation updates" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/ptdump: Add address marker for KASAN shadow region x86/mm/ptdump: Optimize check for W+X mappings for CONFIG_KASAN=y x86/mm/pat: Use rb_entry() x86/mpx: Re-add MPX to selftests Makefile x86/mm: Remove CONFIG_DEBUG_NX_TEST x86/mm/cpa: Avoid wbinvd() for PREEMPT x86/mm: Improve documentation for low-level device I/O functions commit bd8562626c8e170691d6457fe4e8dfb45607a48d Author: Rafael J. Wysocki Date: Mon Feb 20 15:28:13 2017 +0100 docs / driver-api: Fix structure references in device_link.rst The format of the structure references in device_link.rst is incorrect, because it doesn't cause proper references to the struct data types to be generated (for struct dev_pm_domain in particular). Fix that by using the :c:type:`struct name ` convention for encoding references to struct data types. Fixes: aad800403a87 (Documentation/core-api/device_link: Add initial documentation) Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/driver-api/device_link.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e3941cd9f59d1d5508c29eb1712a732722885ee7 Author: Rafael J. Wysocki Date: Mon Feb 20 15:26:21 2017 +0100 PM / docs: Fix structure references in device.rst There is a better way to represent structure references than it was done in device.rst by commit 730c4c053012 (PM / sleep / docs: Convert PM notifiers document to reST), which is to use "struct name" as a link caption (e.g. :c:type:`struct device `). That will cause sphinx to generate a proper reference to the data type in question (struct device in the example above) and "struct name" will work as the link in the HTML output. Fix device.rst by using that convention where applicable. Fixes: 730c4c053012 (PM / sleep / docs: Convert PM notifiers document to reST) Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/driver-api/pm/devices.rst | 72 +++++++++++++++++---------------- 1 file changed, 38 insertions(+), 34 deletions(-) commit a25a1d6c24ab50ee9dd26869912df5724d7ef48e Merge: 280d7a1 f26483e Author: Linus Torvalds Date: Mon Feb 20 15:30:51 2017 -0800 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode updates from Ingo Molnar: "The main changes are further simplification and unification of the code between the AMD and Intel microcode loaders, plus other simplifications - by Borislav Petkov" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Remove struct cont_desc.eq_id x86/microcode/AMD: Remove AP scanning optimization x86/microcode/AMD: Simplify saving from initrd x86/microcode/AMD: Unify load_ucode_amd_ap() x86/microcode/AMD: Check patch level only on the BSP x86/microcode: Remove local vendor variable x86/microcode/AMD: Use find_microcode_in_initrd() x86/microcode/AMD: Get rid of global this_equiv_id x86/microcode: Decrease CPUID use x86/microcode/AMD: Rework container parsing x86/microcode/AMD: Extend the container struct x86/microcode/AMD: Shorten function parameter's name x86/microcode/AMD: Clean up find_equiv_id() x86/microcode: Convert to bare minimum MSR accessors x86/MSR: Carve out bare minimum accessors commit 6e11617fcff3688f70650a3e40addb0043dda137 Merge: 722c5ac a1b5359 Author: Dmitry Torokhov Date: Mon Feb 20 15:16:02 2017 -0800 Merge branch 'next' into for-linus Prepare input updates for 4.11 merge window. commit a1b5359271e5c77d5ec8a575b379a6ba3e867097 Author: Javier Martinez Canillas Date: Mon Feb 20 15:06:39 2017 -0800 Input: zet6223 - export OF device ID as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: i2c:zet6223 After this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: of:N*T*Czeitec,zet6223C* alias: of:N*T*Czeitec,zet6223 alias: i2c:zet6223 Signed-off-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/zet6223.c | 1 + 1 file changed, 1 insertion(+) commit 280d7a1edef214eefb1cb34915c73767355dd1b3 Merge: 8a9365a 9729017 Author: Linus Torvalds Date: Mon Feb 20 15:03:51 2017 -0800 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: "The main changes relate to fixes between (lack of) CPUID and FPU detection that should only affect old or weird CPUs, by Andy Lutomirski" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Fix the "Giving up, no FPU found" test x86/fpu: Fix CPUID-less FPU detection x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message x86/cpu: Re-apply forced caps every time CPU caps are re-read x86/cpu: Factor out application of forced CPU caps x86/cpu: Add X86_FEATURE_CPUID x86/fpu/xstate: Move XSAVES state init to a function commit 51ec502a32665fed66c7f03799ede4023b212536 Author: Bart Van Assche Date: Tue Feb 14 16:25:54 2017 -0800 target: Delete tmr from list before processing This patch does an explicit list_del_init(tmr->tmr_list) in core_tmr_drain_tmr_list() before starting processing of outstanding TMRs to abort, instead of explicitly checking which TMR descriptor matches the caller. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8a9365a4725a4d6265a416dd63bff937e300308e Merge: 2891e8e 3bba73b Author: Linus Torvalds Date: Mon Feb 20 14:37:08 2017 -0800 Merge branch 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpufeature updates from Ingo Molnar: "The main changes in this cycle were related to enable ring-3 MONITOR/MWAIT instructions support on supported CPUs, by Grzegorz Andrejczuk and Piotr Luc" * 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpufeature: Move RING3MWAIT feature to avoid conflicts x86/cpufeature: Enable RING3MWAIT for Knights Mill x86/cpufeature: Enable RING3MWAIT for Knights Landing x86/cpufeature: Add RING3MWAIT to CPU features x86/elf: Add HWCAP2 to expose ring 3 MONITOR/MWAIT x86/msr: Add MSR_MISC_FEATURE_ENABLES and RING3MWAIT bit x86/cpufeature: Add AVX512_VPOPCNTDQ feature commit 2891e8e66787a6a5dadad017d1c8a8f23d8658af Merge: 292d386 07d495d Author: Linus Torvalds Date: Mon Feb 20 14:34:23 2017 -0800 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Two small cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/traps: Get rid of unnecessary preempt_disable/preempt_enable_no_resched x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0 commit 758e99fefe1d9230111296956335cd35995c0eaf Author: Christoph Hellwig Date: Mon Feb 20 17:04:42 2017 -0500 nfsd: minor nfsd_setattr cleanup Simplify exit paths, size_change use. Signed-off-by: Christoph Hellwig Cc: stable@kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/vfs.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 60709c093ed39aadb0f09972ebbc96dc34eb372e Merge: 7323f0d 0839ffb Author: J. Bruce Fields Date: Mon Feb 20 12:24:00 2017 -0500 nfsd: merge stable fix into main nfsd branch commit 5a4dcdcac8e591e235943998caffdf6ac421a422 Merge: 8676ea8 65ed2ff Author: David S. Miller Date: Mon Feb 20 17:11:56 2017 -0500 Merge branch 'qed-bug-fixes' Yuval Mintz says: ==================== qed*: Bug fixes This is a respin of the series with same name for net-next instead of net [only patch #10 is changed]. The 3 first patches here are a repost of ("qed: RoCE infrastructure fixes"). The fourth is an additional RoCE-related infrastructure fix, and the latter contain various fixes to qed/qede. Please consider applying these to `net-next'. ==================== Signed-off-by: David S. Miller commit 65ed2ffd640578166e4ec149573bcf1d10f81b81 Author: Mintz, Yuval Date: Mon Feb 20 22:43:39 2017 +0200 qed*: Fix link indication race Driver changes the link properties via communication with the management firmware, and re-reads the resulting link status when it receives an indication that the link has changed. However, there are certain scenarios where such indications might be missing, and so driver also re-reads the current link results without attention in several places. Specifically, it does so during load and when resetting the link. This creates a race where driver might reflect incorrect link status - e.g., when explicit reading of the link status is switched by attention with the changed configuration. Correct this flow by a lock syncronizing the handling of the link indications [both explicit requests and attention]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 12 +++++++++--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 18 ++++++++++++++---- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 6 ++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 1 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 3 +++ drivers/net/ethernet/qlogic/qede/qede_main.c | 5 ----- 6 files changed, 33 insertions(+), 12 deletions(-) commit 85750d74fba5a7c31309c038c5f9f019edc6ea31 Author: Mintz, Yuval Date: Mon Feb 20 22:43:38 2017 +0200 qed: Don't allocate SBs using main PTT Flows accessing registers require the flow to hold a PTT entry. To protect 'major' load/unload flows a main_ptt is pre-allocated to guarantee such flows wouldn't be blocked by PTT being unavailable. Status block initialization currently uses the main_ptt which is incorrect, as this flow might run concurrently to others [E.g., loading qedr while toggling qede]. That would have dire effects as it means registers' access to device breaks and further read/writes might access incorrect addresses. Instead, when initializing status blocks acquire/release a PTT as part of the flow. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit afe981d664aeeebc8d1bcbd7d2070b5432edaecb Author: Sudarsana Reddy Kalluru Date: Mon Feb 20 22:43:37 2017 +0200 qede: Prevent index problems in loopback test Driver currently utilizes the same loop variable in two nested loops. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 33b2fbd0a8d3c556b802d8753ac5bb3e8f90e988 Author: Mintz, Yuval Date: Mon Feb 20 22:43:36 2017 +0200 qed: Reflect PF link when initializing VF VF learns of the current link state via its bulletin board, which might reflect either the physical link state or some user-configured logical state. Whenever the physical link changes or whnever such a configuration is explicitly made by user the PF driver would update the bulletin that the VF reads. But if neither has happened - i.e., PF still hasn't got a physical link up and no additional configuration was done the VF wouldn't have a valid link information available. Simply reflect the physical link state whenever the VF is initialized. The user could then affect it however he wants. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 90 ++++++++++++++++------------- 1 file changed, 51 insertions(+), 39 deletions(-) commit 885185dfc49bde35b45046bb6b7384eca68e404f Author: Mintz, Yuval Date: Mon Feb 20 22:43:35 2017 +0200 qede: Free netdevice only after stoping slowpath qed needs to be informed of the removal of the qede interface prior to its actual removal, as qede has some registered callbacks that might get called async to the removal flow. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0e0b80a9a7181cbdbb965a6b4750574932106e31 Author: Mintz, Yuval Date: Mon Feb 20 22:43:34 2017 +0200 qede: Initialize lock and slowpath workqueue early Need to make sure the slowpath workqueue and the qede lock are ready for the registration of the netdevice, as once registered there's no guarantee those wouldn't be used. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c2dedf8773e873474535bd4a158609b9eda5403d Author: Ram Amrani Date: Mon Feb 20 22:43:33 2017 +0200 qed: Reserve doorbell BAR space for present CPUs Reserving doorbell BAR space according to the currently active CPUs may result in a bug if disabled CPUs are later enabled but no doorbell space was reserved for them. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 300c0d7c232da572cb640f3bc803554f74e08f69 Author: Ram Amrani Date: Mon Feb 20 22:43:32 2017 +0200 qed: Don't free a QP more than once If QP is in reset state then there are no resources to free so avoid freeing any. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 49 ++++++++++++++++-------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit c5212b943d4b52a7d9e0d9f747e7ad59c50d31f1 Author: Ram Amrani Date: Mon Feb 20 22:43:31 2017 +0200 qed: Read queue state before releasing buffer Currently the state is read only after the buffers are relesed. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 670dde55c6f182b8a159f0484be92b89d82107e1 Author: Ram Amrani Date: Mon Feb 20 22:43:30 2017 +0200 qed: Release CQ resource under lock on failure The CQ resource pool is protected by a spin lock. When a CQ creation fails it now deallocates under that lock as well. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 ++ 1 file changed, 2 insertions(+) commit 8676ea8f3f9b7dc93544477821f107004c0366cf Merge: 45ee244 e399553 Author: David S. Miller Date: Mon Feb 20 17:11:11 2017 -0500 Merge branch 'aquantia-next' Pavel Belous says: ==================== net: ethernet: aquantia: improvements and fixes The following patchset contains improvements and fixes for aQuantia AQtion ethernet driver from net-next tree. Most fixes are based on the comments from Lino Sanfilippo. Sanity testing was performed on real HW. No regression found. v1->v2: 1)Removed buffers copying. 2)Fixed dma error handling. v2->v3: 1)Fixes for aq_ndev_change_mtu: -Use core MTU checking for min_mtu. -Removed extra new_mtu assigment. 2)Reverse XMAS tree in aq_ring_rx_fill. v3->v4: 1)Use ndev->reg_state instead "is_ndev_registered" flag. ==================== Signed-off-by: David S. Miller commit e399553d233678687ce4b149c822194d17e07675 Author: Pavel Belous Date: Mon Feb 20 22:36:50 2017 +0300 net: ethernet: aquantia: Copying tx buffers is not needed. This fix removes copying of tx biffers. Now we use ring->buff_fing directly. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 170 +++++++++++++---------- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 19 --- drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 3 - 3 files changed, 97 insertions(+), 95 deletions(-) commit 89b643889b1f56d8b53728f6153a4237c849784b Author: Pavel Belous Date: Mon Feb 20 22:36:49 2017 +0300 net: ethernet: aquantia: Fixed memory allocation if AQ_CFG_RX_FRAME_MAX > 1 page. We should allocate the number of pages based on the config parameter AQ_CFG_RX_FRAME_MAX. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c0788f7463f138bb1d30552b3edac442781b4e11 Author: Pavel Belous Date: Mon Feb 20 22:36:48 2017 +0300 net: ethernet: aquantia: Fixed incorrect buff->len calculation. rxd_wb->pkt_len is the total length of the packet. If we received a large packet (with length > AQ_CFG_RX_FRAME_MAX) then we will get multiple buffers. We need to fix the length of the last buffer. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 4 ++-- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 55629109d934b2c1b25457424fa72eb94e8c2a26 Author: Pavel Belous Date: Mon Feb 20 22:36:47 2017 +0300 net: ethernet: aquantia: Call netdev_register after all initialized. netdev_register should be called when everything is initialized. Also we should use net_device->reg_state field instead own "is_ndev_registered" flag to avoid any race. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 10 +++++----- drivers/net/ethernet/aquantia/atlantic/aq_nic_internal.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) commit df9000ef9609c8a5e57783d0667ba7f39f52ed1e Author: Pavel Belous Date: Mon Feb 20 22:36:46 2017 +0300 net: ethernet: aquantia: Null pointer check for aq_nic_ndev_alloc. We should check for a null pointer for aq_nic_ndev_alloc instead netdev_priv. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b350d7b8b8c99d67dc9a21eeeb1f3564c5213cbd Author: Pavel Belous Date: Mon Feb 20 22:36:45 2017 +0300 net: ethernet: aquantia: Using NETDEV_TX_OK instead 0. Use NETDEV_TX_OK as the return value for successful transmission. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5919aeba1cc7a2b90210256d617625fceaf4e06 Author: Pavel Belous Date: Mon Feb 20 22:36:44 2017 +0300 net: ethernet: aquantia: Fixed missing rtnl_unlock. rtnl_unlock should be called if error occurred. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 362f37b28ba52115be9b30134375b199ac612df4 Author: Pavel Belous Date: Mon Feb 20 22:36:43 2017 +0300 net: ethernet: aquantia: Superfluous initialization of "err". Fixed superfluous initialization of err. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 14861e9de2c2ffe404fb41cc34150f09a39acb44 Author: Pavel Belous Date: Mon Feb 20 22:36:42 2017 +0300 net: ethernet: aquantia: Using module_pci_driver. Remove boilerplate code by using macro module_pci_driver. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 5513e16421cb9538f4e394734e4b96ea0d857b23 Author: Pavel Belous Date: Mon Feb 20 22:36:41 2017 +0300 net: ethernet: aquantia: Fixes for aq_ndev_change_mtu 1)Removed unnecessary comparsion "old_mtu == new_mtu". This check is not needed. Function aq_ndev_change_mtu wont be called if mtu has not changed. 2)Removed extra assignment ndev->mtu = new_mtu; This assignment already done inside __dev_set_mtu(). 3)Use core MTU checking for min_mtu. Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 12 +----------- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) commit 15e32a5e1e016f40712c3c843c84078385c49db2 Author: Pavel Belous Date: Mon Feb 20 22:36:40 2017 +0300 net: ethernet: aquantia: Removed busy_count field. busy_count field and is_busy flag is not needed at all. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 11 ----------- drivers/net/ethernet/aquantia/atlantic/aq_utils.h | 1 - 2 files changed, 12 deletions(-) commit 99e5582730eb18c5ab4402ba1edc73ec3fd5ba2b Author: Pavel Belous Date: Mon Feb 20 22:36:39 2017 +0300 net: ethernet: aquantia: Removed extra assignment for skb->dev. This assignment is not needed. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 1 - 1 file changed, 1 deletion(-) commit 292d38674301c6fbee3965e446bd1c8a6672a400 Merge: 4abaa80 5773ebf Author: Linus Torvalds Date: Mon Feb 20 14:04:37 2017 -0800 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "Misc updates: - fix e820 error handling - convert page table setup code from assembly to C - fix kexec environment bug - ... plus small cleanups" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kconfig: Remove misleading note regarding hibernation and KASLR x86/boot: Fix KASLR and memmap= collision x86/e820/32: Fix e820_search_gap() error handling on x86-32 x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C x86/e820: Make e820_search_gap() static and remove unused variables commit 4abaa800fdc6303dc63d3f11080a31a6cf42f34d Merge: 4cee9fe 6606021 Author: Linus Torvalds Date: Mon Feb 20 14:03:03 2017 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm update from Ingo Molnar: "This adds a new SYSRET testcase" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/x86: Add a selftest for SYSRET to noncanonical addresses commit 4cee9fe53e4d181b608c7758090ed492b45d6801 Merge: 42e1b14 543113d Author: Linus Torvalds Date: Mon Feb 20 14:01:21 2017 -0800 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic changes from Ingo Molnar: "The main changes in this cycle were: - Re-activate the hw IRQ resend mechanism that was downgraded to a sw-resend unintentionally. (Ruslan Ruslichenko) - Avoid sporadic spurious hrtimer interrupts (Frederic Weisbecker)" [ Let's see if the io_apic retrigger ends up surviving this release, it got reverted last time because it found problems elsewhere - Linus ] * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Fix a typo in a comment line x86/ioapic: Restore IO-APIC irq_chip retrigger callback x86/apic: Implement set_state_oneshot_stopped() callback x86/apic: Fix typos in comments commit e3b88ee95b4e4bf3e9729a4695d695b9c7c296c8 Author: Bart Van Assche Date: Tue Feb 14 16:25:45 2017 -0800 target: Fix handling of aborted failed commands If a target driver (e.g. tcm_qla2xxx) calls transport_generic_request_failure() to report that receiving data has failed and that SCSI command has already been aborted by the initiator, ensure that the SCSI status ABORTED is sent back to the initiator instead of the sense code provided by the target driver. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 3 +++ 1 file changed, 3 insertions(+) commit 42e1b14b6e1455ece2ccbe474c25388d0230a590 Merge: 828cad8 95cb64c Author: Linus Torvalds Date: Mon Feb 20 13:23:30 2017 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - Implement wraparound-safe refcount_t and kref_t types based on generic atomic primitives (Peter Zijlstra) - Improve and fix the ww_mutex code (Nicolai Hähnle) - Add self-tests to the ww_mutex code (Chris Wilson) - Optimize percpu-rwsems with the 'rcuwait' mechanism (Davidlohr Bueso) - Micro-optimize the current-task logic all around the core kernel (Davidlohr Bueso) - Tidy up after recent optimizations: remove stale code and APIs, clean up the code (Waiman Long) - ... plus misc fixes, updates and cleanups" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits) fork: Fix task_struct alignment locking/spinlock/debug: Remove spinlock lockup detection code lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS lkdtm: Convert to refcount_t testing kref: Implement 'struct kref' using refcount_t refcount_t: Introduce a special purpose refcount type sched/wake_q: Clarify queue reinit comment sched/wait, rcuwait: Fix typo in comment locking/mutex: Fix lockdep_assert_held() fail locking/rtmutex: Flip unlikely() branch to likely() in __rt_mutex_slowlock() locking/rwsem: Reinit wake_q after use locking/rwsem: Remove unnecessary atomic_long_t casts jump_labels: Move header guard #endif down where it belongs locking/atomic, kref: Implement kref_put_lock() locking/ww_mutex: Turn off __must_check for now locking/atomic, kref: Avoid more abuse locking/atomic, kref: Use kref_get_unless_zero() more locking/atomic, kref: Kill kref_sub() locking/atomic, kref: Add kref_read() locking/atomic, kref: Add KREF_INIT() ... commit 34371d236eab28933eefc0d77bd1e3df62fc585b Author: Takashi Sakamoto Date: Tue Feb 21 05:09:19 2017 +0900 ALSA: usb-audio: localize function without external linkage When accessed inner a file, functions should have static qualifier for local-linkage. This commit fixes the bug. Sparse generated below warning. sound/usb/mixer_us16x08.c:1043:32: warning: symbol 'snd_us16x08_create_meter_store' was not declared. Should it be static? Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 828cad8ea05d194d8a9452e0793261c2024c23a2 Merge: 60c906b bb3bac2 Author: Linus Torvalds Date: Mon Feb 20 12:52:55 2017 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this (fairly busy) cycle were: - There was a class of scheduler bugs related to forgetting to update the rq-clock timestamp which can cause weird and hard to debug problems, so there's a new debug facility for this: which uncovered a whole lot of bugs which convinced us that we want to keep the debug facility. (Peter Zijlstra, Matt Fleming) - Various cputime related updates: eliminate cputime and use u64 nanoseconds directly, simplify and improve the arch interfaces, implement delayed accounting more widely, etc. - (Frederic Weisbecker) - Move code around for better structure plus cleanups (Ingo Molnar) - Move IO schedule accounting deeper into the scheduler plus related changes to improve the situation (Tejun Heo) - ... plus a round of sched/rt and sched/deadline fixes, plus other fixes, updats and cleanups" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (85 commits) sched/core: Remove unlikely() annotation from sched_move_task() sched/autogroup: Rename auto_group.[ch] to autogroup.[ch] sched/topology: Split out scheduler topology code from core.c into topology.c sched/core: Remove unnecessary #include headers sched/rq_clock: Consolidate the ordering of the rq_clock methods delayacct: Include sched/core: Clean up comments sched/rt: Show the 'sched_rr_timeslice' SCHED_RR timeslice tuning knob in milliseconds sched/clock: Add dummy clear_sched_clock_stable() stub function sched/cputime: Remove generic asm headers sched/cputime: Remove unused nsec_to_cputime() s390, sched/cputime: Remove unused cputime definitions powerpc, sched/cputime: Remove unused cputime definitions s390, sched/cputime: Make arch_cpu_idle_time() to return nsecs ia64, sched/cputime: Remove unused cputime definitions ia64: Convert vtime to use nsec units directly ia64, sched/cputime: Move the nsecs based cputime headers to the last arch using it sched/cputime: Remove jiffies based cputime sched/cputime, vtime: Return nsecs instead of cputime_t to account sched/cputime: Complete nsec conversion of tick based accounting ... commit 60c906bab124a0627fba04c9ca5e61bba4747c0c Merge: 7f4eb0a 9026cc8 Author: Linus Torvalds Date: Mon Feb 20 12:47:44 2017 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "The main changes in this cycle were: - Assign notifier chain priorities for all RAS related handlers to make the ordering explicit (Borislav Petkov) - Improve the AMD MCA banks sysfs output (Yazen Ghannam) - Various cleanups and restructuring of the x86 RAS code (Borislav Petkov)" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ras, EDAC, acpi: Assign MCE notifier handlers a priority x86/ras: Get rid of mce_process_work() EDAC/mce/amd: Dump TSC value EDAC/mce/amd: Unexport amd_decode_mce() x86/ras/amd/inj: Change dependency x86/ras: Flip the TSC-adding logic x86/ras/amd: Make sysfs names of banks more user-friendly x86/ras/therm_throt: Do not log a fake MCE for thermal events x86/ras/inject: Make it depend on X86_LOCAL_APIC=y commit 02ed051fe1fd2fc8dbafec23ddd4814936121650 Author: Takashi Sakamoto Date: Tue Feb 21 05:09:17 2017 +0900 ALSA: usb-audio: localize one-referrer variable When accessed by one referrer inner a file, variables should have static qualifier to declare local-linkage. This commit fixes the bug. Sparse generated below warnings. sound/usb/mixer_us16x08.c:156:13: warning: duplicate const sound/usb/mixer_us16x08.c:156:18: warning: symbol 'route_names' was not declared. Should it be static? Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e25d30c8ddeae6ad0b68440aacadaacb14f8538 Merge: d2bb390a 141dee7 Author: Takashi Iwai Date: Mon Feb 20 21:43:40 2017 +0100 Merge tag 'asoc-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.11 Another release that's mainly focused on drivers rather than core changes, highlights include: - A huge batch of updates to the Intel drivers, mainly around DisplayPort and HDMI with some additional board support too. - Channel mapping support for HDMI. - Support for AllWinner A31 and A33, Everest Semiconductor ES8328, Nuvoton NAU8540. commit e9be2ac7c09cabcbbbb12b0869e49b7a715d6fb5 Author: Theodore Ts'o Date: Mon Feb 20 15:34:59 2017 -0500 ext4: rename EXT4_IOC_GOINGDOWN to EXT4_IOC_SHUTDOWN It's very likely the file system independent ioctl name will be FS_IOC_SHUTDOWN, so let's use the same name for the ext4 ioctl name. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 +- fs/ext4/ioctl.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7f4eb0a6d5a76ee054acd7255c05b8d5ca31c5d9 Merge: 32e2d7c 0c8967c Author: Linus Torvalds Date: Mon Feb 20 12:21:13 2017 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "On the kernel side the main changes in this cycle were: - Add Intel Kaby Lake CPU support (Srinivas Pandruvada) - AMD uncore driver updates for fam17 (Janakarajan Natarajan) - Intel/PT updates and core events optimizations and cleanups (Alexander Shishkin) - cgroups events fixes (David Carrillo-Cisneros) - kprobes improvements (Masami Hiramatsu) - ... plus misc fixes and updates. On the tooling side the main changes were: - Support clang build in tools/{perf,lib/{bpf,traceevent,api}} with CC=clang, to, for instance, take advantage of better warnings (Arnaldo Carvalho de Melo): - Introduce the 'delta-abs' 'perf diff' compute method, that orders the histogram entries by the absolute value of the percentage delta for a function in two perf.data files, i.e. the functions that changed the most (increase or decrease in samples) comes first (Namhyung Kim) - Add support for parsing Intel uncore vendor event files and add uncore vendor events for the Intel server processors (Haswell, Broadwell, IvyBridge), Xeon Phi (Knights Landing) and Broadwell DE (Andi Kleen) - Introduce 'perf ftrace' a perf front end to the kernel's ftrace function and function_graph tracer, defaulting to the "function_graph" tracer, more work will be done in reviving this effort, forward porting it from its initial patch submission (Namhyung Kim) - Add 'e' and 'c' hotkeys to expand/collapse call chains for a single hist entry in the 'perf report' and 'perf top' TUI (Jiri Olsa) - Account thread wait time (off CPU time) separately: sleep, iowait and preempt, based on the prev_state of the last event, show the breakdown when using "perf sched timehist --state" (Namhyumg Kim) - Add more triggers to switch the output file (perf.data.TIMESTAMP). Now, in addition to switching to a different output file when receiving a SIGUSR2, one can also specify file size and time based triggers: perf record -a --switch-output=signal is equivalent to what we had before: perf record -a --switch-output While we can also ask for the file to be "sliced" by size, taking into account that that will happen only when we get woken up by the kernel, i.e. one has to take into account the --mmap-pages (the size of the perf mmap ring buffer): perf record -a --switch-output=2G will break the perf.data output into multiple files limited to 2GB of samples, right when generating the output. For time based samples, alert() will be used, so to have 1 minute limited perf.data output files: perf record -a --switch-output=1m (Jiri Olsa) - Improve 'perf trace' (Arnaldo Carvalho de Melo) - 'perf kallsyms' toy tool to look for extended symbol information on the running kernel and demonstrate the machine/thread/symbol APIs for use in other tools, such as 'perf probe' (Arnaldo Carvalho de Melo) - ... plus tons of other changes, see the shortlog and Git log for details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (131 commits) perf tools: Add missing parse_events_error() prototype perf pmu: Fix check for unset alias->unit array perf tools: Be consistent on the type of map->symbols[] interator perf intel pt decoder: clang has no -Wno-override-init perf evsel: Do not put a variable sized type not at the end of a struct perf probe: Avoid accessing uninitialized 'map' variable perf tools: Do not put a variable sized type not at the end of a struct perf record: Do not put a variable sized type not at the end of a struct perf tests: Synthesize struct instead of using field after variable sized type perf bench numa: Make sure dprintf() is not defined Revert "perf bench futex: Sanitize numeric parameters" tools lib subcmd: Make it an error to pass a signed value to OPTION_UINTEGER tools: Set the maximum optimization level according to the compiler being used tools: Suppress request for warning options not existent in clang samples/bpf: Reset global variables samples/bpf: Ignore already processed ELF sections samples/bpf: Add missing header perf symbols: dso->name is an array, no need to check it against NULL perf tests record: No need to test an array against NULL perf symbols: No need to check if sym->name is NULL ... commit 32e2d7c8afb35d59fbf7d96619538427568ecb68 Merge: f7458a5 b3879a4 Author: Linus Torvalds Date: Mon Feb 20 11:47:11 2017 -0800 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Changes to the EFI init code to establish whether secure boot authentication was performed at boot time. (Josh Boyer, David Howells) - Wire up the UEFI memory attributes table for x86. This eliminates any runtime memory regions that are both writable and executable, on recent firmware versions. (Sai Praneeth) - Move the BGRT init code to an earlier stage so that we can still use efi_mem_reserve(). (Dave Young) - Preserve debug symbols in the ARM/arm64 UEFI stub (Ard Biesheuvel) - Code deduplication work and various other cleanups (Lukas Wunner) - ... plus various other fixes and cleanups" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/libstub: Make file I/O chunking x86-specific efi: Print the secure boot status in x86 setup_arch() efi: Disable secure boot if shim is in insecure mode efi: Get and store the secure boot status efi: Add SHIM and image security database GUID definitions arm/efi: Allow invocation of arbitrary runtime services x86/efi: Allow invocation of arbitrary runtime services efi/libstub: Preserve .debug sections after absolute relocation check efi/x86: Add debug code to print cooked memmap efi/x86: Move the EFI BGRT init code to early init code efi: Use typed function pointers for the runtime services table efi/esrt: Fix typo in pr_err() message x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE efi: Introduce the EFI_MEM_ATTR bit and set it from the memory attributes table efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures x86/efi: Deduplicate efi_char16_printk() efi: Deduplicate efi_file_size() / _read() / _close() commit f7458a5d631df2ecdbfe4a606053aba19913cc41 Merge: 575260e a8709fa Author: Linus Torvalds Date: Mon Feb 20 11:21:17 2017 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The RCU changes in this cycle are: - Dynticks updates, consolidating open-coded counter accesses into a well-defined API - SRCU updates: Simplify algorithm, add formal verification - Documentation updates - Miscellaneous fixes - Torture-test updates Most of the diffstat comes from the relatively large documentation update" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) srcu: Reduce probability of SRCU ->unlock_count[] counter overflow rcutorture: Add CBMC-based formal verification for SRCU srcu: Force full grace-period ordering srcu: Implement more-efficient reader counts rcu: Adjust FQS offline checks for exact online-CPU detection rcu: Check cond_resched_rcu_qs() state less often to reduce GP overhead rcu: Abstract extended quiescent state determination rcu: Abstract dynticks extended quiescent state enter/exit operations rcu: Add lockdep checks to synchronous expedited primitives rcu: Eliminate unused expedited_normal counter llist: Clarify comments about when locking is needed rcu: Fix comment in rcu_organize_nocb_kthreads() rcu: Enable RCU tracepoints by default to aid in debugging rcu: Make rcu_cpu_starting() use its "cpu" argument rcu: Add comment headers to expedited-grace-period counter functions rcu: Don't wake rcuc/X kthreads on NOCB CPUs rcu: Re-enable TASKS_RCU for User Mode Linux rcu: Once again use NMI-based stack traces in stall warnings rcu: Remove short-term CPU kicking rcu: Add long-term CPU kicking ... commit 575260e3f8f8ac72dc0c41a4a20190d1a5f2b887 Merge: 1cd4027 0cad93c Author: Linus Torvalds Date: Mon Feb 20 11:19:09 2017 -0800 Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects updates from Ingo Molnar: "A number of scalability improvements by Waimang Long" * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Improve variable naming debugobjects: Reduce contention on the global pool_lock debugobjects: Scale thresholds with # of CPUs debugobjects: Track number of kmem_cache_alloc/kmem_cache_free done commit 1cd4027cfe33390dc3f442aea8e7caeeeaa861a1 Merge: 20dcfe1 3900dea Author: Linus Torvalds Date: Mon Feb 20 10:52:23 2017 -0800 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "This update provides: - Yet another two irq controller chip drivers - A few updates and fixes for GICV3 - A resource managed function for interrupt allocation - Fixes, updates and enhancements all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/qcom: Fix error handling genirq: Clarify logic calculating bogus irqreturn_t values genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg genirq/devres: Use dev_name(dev) as default for devname genirq: Fix /proc/interrupts output alignment irqdesc: Add a resource managed version of irq_alloc_descs() irqchip/gic-v3-its: Zero command on allocation irqchip/gic-v3-its: Fix command buffer allocation irqchip/mips-gic: Fix local interrupts irqchip: Add a driver for Cortina Gemini irqchip: DT bindings for Cortina Gemini irqchip irqchip/gic-v3: Remove duplicate definition of GICD_TYPER_LPIS irqchip/gic-v3-its: Rename MAPVI to MAPTI irqchip/gic-v3-its: Drop deprecated GITS_BASER_TYPE_CPU irqchip/gic-v3-its: Refactor command encoding irqchip/gic-v3-its: Enable cacheable attribute Read-allocate hints irqchip/qcom: Add IRQ combiner driver ACPI: Add support for ResourceSource/IRQ domain mapping ACPI: Generic GSI: Do not attempt to map non-GSI IRQs during bus scan irq/platform-msi: Fix comment about maximal MSIs commit e3ccc921b7d8fd1fcd10a00720e09823d8078666 Author: Alexandre Belloni Date: Thu Feb 16 18:27:59 2017 +0100 i2c: at91: ensure state is restored after suspending When going to suspend, the I2C registers may be lost because the power to VDDcore is cut. Restore them when resuming. Signed-off-by: Alexandre Belloni Acked-by: Ludovic Desroches Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91.c | 3 +++ 1 file changed, 3 insertions(+) commit ababb08938df7ac245d30a58b95b94ecf8dc04fc Author: Stefan Wahren Date: Thu Feb 16 21:20:45 2017 +0000 i2c: bcm2835: Avoid possible NULL ptr dereference Since commit e2474541032d ("bcm2835: Fix hang for writing messages larger than 16 bytes") the interrupt handler is prone to a possible NULL pointer dereference. This could happen if an interrupt fires before curr_msg is set by bcm2835_i2c_xfer_msg() and randomly occurs on the RPi 3. Even this is an unexpected behavior the driver must handle that with an error instead of a crash. Reported-by: Peter Robinson Fixes: e2474541032d ("bcm2835: Fix hang for writing messages larger than 16 bytes") Signed-off-by: Stefan Wahren Acked-by: Noralf Trønnes Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm2835.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0297ffa69cab614f508ef5d9abdb4c0ffd709795 Author: Shardar Shariff Md Date: Mon Feb 20 17:52:34 2017 +0100 i2c: Add Tegra BPMP I2C proxy driver Add Tegra BPMP I2C driver. The BPMP is the boot and power management processor embedded in Tegra SoCs. In newer SoC versions, access to one of the I2C busses goes via the BPMP, requiring a different "proxy" I2C driver that accesses the bus via the real I2C driver embedded in the BPMP firmware. Signed-off-by: Shardar Shariff Md Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-tegra-bpmp.c | 346 ++++++++++++++++++++++++++++++++++++ 3 files changed, 358 insertions(+) commit 6a405f7c5d0e9d67163f25fad7fde9e70a9837bb Author: Stephen Warren Date: Mon Feb 20 17:52:33 2017 +0100 dt-bindings: Add Tegra186 BPMP I2C binding In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion. Signed-off-by: Stephen Warren Reviewed-by: Simon Glass Signed-off-by: Tom Warren Acked-by: Rob Herring Acked-by: Jon Hunter Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 20dcfe1b7df4072a3c13bdb7506f7138125d0099 Merge: c9b9f20 336a9cd Author: Linus Torvalds Date: Mon Feb 20 10:06:32 2017 -0800 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Nothing exciting, just the usual pile of fixes, updates and cleanups: - A bunch of clocksource driver updates - Removal of CONFIG_TIMER_STATS and the related /proc file - More posix timer slim down work - A scalability enhancement in the tick broadcast code - Math cleanups" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) hrtimer: Catch invalid clockids again math64, tile: Fix build failure clocksource/drivers/arm_arch_timer:: Mark cyclecounter __ro_after_init timerfd: Protect the might cancel mechanism proper timer_list: Remove useless cast when printing time: Remove CONFIG_TIMER_STATS clocksource/drivers/arm_arch_timer: Work around Hisilicon erratum 161010101 clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure clocksource/drivers/arm_arch_timer: Remove fsl-a008585 parameter clocksource/drivers/arm_arch_timer: Add dt binding for hisilicon-161010101 erratum clocksource/drivers/ostm: Add renesas-ostm timer driver clocksource/drivers/ostm: Document renesas-ostm timer DT bindings clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock clocksource/drivers/gemini: Add driver for the Cortina Gemini clocksource: add DT bindings for Cortina Gemini clockevents: Add a clkevt-of mechanism like clksrc-of tick/broadcast: Reduce lock cacheline contention timers: Omit POSIX timer stuff from task_struct when disabled x86/timer: Make delay() work during early bootup delay: Add explanation of udelay() inaccuracy ... commit c9b9f207b90468bf9583f7ed71c15d0142bbf9b1 Merge: 345fb0a 744cc30 Author: Linus Torvalds Date: Mon Feb 20 10:00:10 2017 -0800 Merge tag 'for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "New drivers: - sbs-charger driver - max14656_charger_detector - axp20x_ac_power New chip/feature support" - axp20x_usb_power: add AXP223 support - tps65217: add usb charger support - qcom_smbb: support otg regulator - at91-reset: add samx7 support Dropped drivers: - intel_mid_battery (platform was dropped) Fixes: - at91-poweroff: avoid wearing off LPDDR memory - replace deprecated extcon API - lots of cleanup and style fixes - misc minor functionality fixes" * tag 'for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (84 commits) power: supply: add AC power supply driver for AXP20X and AXP22X PMICs dt-bindings: power: supply: add AXP20X/AXP22X AC power supply power: supply: axp20x_usb_power: use IIO channels when available power: supply: max14656: Export I2C and OF device ID as module aliases power: supply: bq2415x: check for NULL acpi_id to avoid null pointer dereference power: supply: bq24190_charger: Adjust formatting power: supply: bq24190_charger: Handle fault before status on interrupt power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread() power: supply: bq24190_charger: Call power_supply_changed() for relevant component power: supply: bq24190_charger: Install irq_handler_thread() at end of probe() power: supply: bq24190_charger: Call set_mode_host() on pm_resume() power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING power: supply: qcom_smbb: add regulator dependency power: reset: at91-reset: remove leftover platform_device_id power: reset: at91-reset: add samx7 support power: supply: max14656: fix platform_no_drv_owner.cocci warnings power: supply: pcf50633-charger: Compress return logic into one line. power: supply: ab8500_btemp: Compress return logic into one line. power: reset: at91-poweroff: timely shutdown LPDDR memories ARM: at91: define LPDDR types ... commit 345fb0a9a6340ba0b3b714d62f877fde88c8a755 Merge: 507b500 75bf2f6 Author: Linus Torvalds Date: Mon Feb 20 09:54:46 2017 -0800 Merge tag 'edac_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - Make amd64_edac still load on a machine with unpopulated nodes + cleanups (Yazen Ghannam) - Expose per-DIMM error counts in sysfs (Aaron Miller) - Add T2080 l2-cache support to mpc85xx (Chris Packham) - Random other small improvements/cleanups/fixlets * tag 'edac_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, mce_amd: Print IPID and Syndrome on a separate line EDAC, amd64: Bump driver version MAINTAINERS, EDAC: Update email for Thor Thayer EDAC, fsl_ddr: Make locally used symbols static EDAC, mpc85xx: Add T2080 l2-cache support EDAC, amd64: Add x86cpuid sanity check during init EDAC, amd64: Don't treat ECC disabled as failure EDAC: Add routine to check if MC devices list is empty EDAC, amd64: Remove unused printing macros EDAC, amd64: Rework messages in ecc_enabled() EDAC, amd64: Move global code out of instance functions EDAC, amd64: Free unused memory when init_one_instance() fails EDAC, mce_amd: Give more context to deferred error message EDAC, i7300: Test for the second channel properly EDAC, sb_edac: Get rid of ->show_interleave_mode() EDAC: Expose per-DIMM error counts in sysfs EDAC, amd64: Save and return err code from probe_one_instance() EDAC, i82975x: Add ioremap_nocache() error handling EDAC: Fix typos in enum mem_type comments EDAC: Make dev_attr_sdram_scrub_rate static commit 507b500726fa501b9411493d969a99236f2b10e1 Merge: ce1bf97 2f1736f Author: Linus Torvalds Date: Mon Feb 20 09:52:08 2017 -0800 Merge tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - new driver for stts751 - it87: Added support for IT8622E and IT8792E; improved support for other chips - lm70: Added support for TMP122/124 - use permission-specific DEVICE_ATTR variants where possible - fixed overflows in various drivers - minor improvements in various drivers * tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (95 commits) hwmon: (sht15) Add device tree support devicetree: add lm90 thermal_zone sensor support hwmon: (it87) Add support for IT8792E hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628 hwmon: (it87) Ensure that pwm control cache is current before updating values hwmon: (it87) Improve IT8622 support hwmon: (it87) Add support for IT8622E hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5V DT: add binding documentation for STTS751 hwmon: new driver for ST stts751 thermal sensor hwmon: Register thermal zone only if 'dev' parameter was provided hwmon: Relax name attribute validation for new APIs hwmon: Update documentation to clarify rules for the 'name' attribute hwmon: Make name attribute mandatory for new APIs hwmon: (lm70) Add support for TI TMP122/124 hwmon: (lm70) Utilize dev_warn instead of pr_warn hwmon: (ltc4151) Export OF device ID table as module aliases hwmon: (adc128d818) Preserve operation mode hwmon: (adc128d818) Support operation modes 1-3 ... commit ce1bf97965abb7faaa98b6bd89201855159471c8 Merge: c470abd d91f6ce Author: Linus Torvalds Date: Mon Feb 20 09:23:03 2017 -0800 Merge tag 'for-linus-20170212' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "MTD updates for 4.11: General: - new kernel API for retrieving max bad blocks per die (not used yet) - track (and expose via sysfs) a partition's device tree node - support a "label" device tree property for naming an MTD NAND: - sunxi: avoid busy-waiting for NAND events - ifc: fix ECC handling on IFC v1.0 - OX820: add explicit dependency on ARCH_OXNAS in Kconfig - core: add a new manufacture ID and fix a kernel-doc warning - fsmc: kill pdata support - lpc32xx_slc: remove unneeded NULL check - support dynamic "max bad blocks" detection via ONFI SPI NOR: - add support for the 4-byte address instruction set - add support for new memory parts - add support to S3AN memories - add support to the Intel SPI controller - add support to the Aspeed AST2400 and AST2550 controllers - support max SPI message sizes in m25p80_read() - fixes for the Candence and Freescale QSPI drivers Other: - add support for Gemini flash probing - bcm47xxsflash: add support for reading outside memory-mapped window - bcm47xxparts: extend to support multiple TRX partitions - misc fixes and typos Extra note: we've pulled in an MFD subtree from Lee Jones as a dependency for a new Intel SPI NOR driver" [ Kudos to Brian for sending pull request a week early: "I refuse to acknowledge the existence of 4.10-rc8 and am therefore sending our MTD changes for 4.11 now" which is all good ] * tag 'for-linus-20170212' of git://git.infradead.org/linux-mtd: (52 commits) mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe() dt-bindings: mtd: add a common label property to all mtd devices mtd: name the mtd device with an optional label property mtd: physmap_of: fixup gemini/versatile dependencies mtd: spi-nor: cqspi: remove redundant dead code on error return check Documentation: mtk-quadspi: update DT bindings mtd: fsl-quadspi: Rename SEQID_QUAD_READ to SEQID_READ mtd:fsl-quadspi:use the property fields of SPI-NOR mtd: spi-nor: Add support for gd25q16 mtd: spi-nor: Fix S3AN addressing calculation mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb() mtd: spi-nor: add dt support for Everspin MRAMs mtd: spi-nor: Add lock/unlock support for f25l32pa mtd: spi-nor: add a stateless method to support memory size above 128Mib mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes mtd: m25p80: consider max message size in m25p80_read mtd: spi-nor: bindings for the Aspeed memory controllers mtd: aspeed: add memory controllers for the Aspeed AST2400 SoC mtd: spi-nor: add memory controllers for the Aspeed AST2500 SoC mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write() ... commit eb994594bc22220976f367c03ffa141580aa45e4 Author: Andrew Jeffery Date: Tue Feb 21 01:53:00 2017 +1030 ipmi: bt-bmc: Use a regmap for register access The registers for the bt-bmc device live under the Aspeed LPC controller. Devicetree bindings have recently been introduced for the LPC controller where the "host" portion of the LPC register space is described as a syscon device. Future devicetrees describing the bt-bmc device should nest its node under the appropriate "simple-mfd", "syscon" compatible node. This change allows the bt-bmc driver to function with both syscon and non-syscon- based devicetree descriptions by always using a regmap for register access, either retrieved from the parent syscon device or instantiated if none exists. Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 3 +- drivers/char/ipmi/bt-bmc.c | 80 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 61 insertions(+), 22 deletions(-) commit 06ce521af9558814b8606c0476c54497cf83a653 Author: Paolo Bonzini Date: Tue Jan 24 11:56:21 2017 +0100 kvm: fix page struct leak in handle_vmon handle_vmon gets a reference on VMXON region page, but does not release it. Release the reference. Found by syzkaller; based on a patch by Dmitry. Reported-by: Dmitry Vyukov Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 45ee2440a33f1c8768cd37a365154343eb5589e3 Author: Philippe Reynes Date: Sun Feb 19 23:21:41 2017 +0100 net: qlogic: qlge: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c | 36 ++++++++++++++----------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 49cef10ffaeadc9cbb056e9219b3cbaa33ecafca Author: Philippe Reynes Date: Sun Feb 19 23:06:01 2017 +0100 net: qlogic: qlcnic: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 94 ++++++++------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 6 +- .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 132 +++++++++++---------- 3 files changed, 123 insertions(+), 109 deletions(-) commit e8846a56083aa05f4155c627531ecdcc299cc411 Merge: c1ceee5 0bc3827 Author: David S. Miller Date: Mon Feb 20 11:18:50 2017 -0500 Merge branch 'nfp-next' Jakub Kicinski says: ==================== nfp: expose more firmware and hw debug info This series is mostly a result of flash firmware team requesting access to some of the information and data necessary for debugging firmware problems. Patch 1 adds a missing error message. Patch 2 prints manufacturing info to logs in case PCI VPD capability is not programmed correctly. Patches 3 and 4 allow reporting NSP ABI version in ethtool -i. Patch 5 allows dumping flash application logs. Patches 6 and 7 provides a way of application firmwares to declare limited SR-IOV support. v2: put some of the code in patch 7 in #ifdef CONFIG_PCI_SRIOV (Yuval). ==================== Signed-off-by: David S. Miller commit 0bc3827f8c9f74b5335667d70309cefa12ec14ae Author: Jakub Kicinski Date: Sun Feb 19 11:58:14 2017 -0800 nfp: allow application firmware to limit number of SR-IOV VFs Some application firmware projects may choose to limit the number of VFs available below what is specified in PCI capability to be able to reuse the PCIe interface resources. There may also be projects which use cases don't require SR-IOV support at all and therefore don't want to spend time implementing/testing it. Check nfd_vf_cfg_max_vfs firmware symbol to see if application firmware is reporting how many VFs it supports. This mechanism is an opt-in, if symbol is not present we will only look at the PCI capability values. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 25 +++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 2 ++ 2 files changed, 27 insertions(+) commit 372d504575cbefb34be6a934cc3d3ceb62e0892c Author: Jakub Kicinski Date: Sun Feb 19 11:58:13 2017 -0800 nfp: return nfp_rtsym_read_le() errors correctly nfp_rtsym_read_le() has an out parameter for error codes. We have to use that instead of returning errors directly. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit af623682ac2eba96769f9ba2270438c1f9438d7c Author: Jakub Kicinski Date: Sun Feb 19 11:58:12 2017 -0800 nfp: add very basic access to NSP logs Allow dumping "arm.diag" resource with ethtool -w. This resource should contain a text log of the NSP (control processor) application. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 + .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 76 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 1 + 3 files changed, 79 insertions(+) commit bd5ca062ba7d24bcc28f637aa90056f642a35dfa Author: Jakub Kicinski Date: Sun Feb 19 11:58:11 2017 -0800 nfp: report NSP ABI version in ethtool FW version ethtool_drvinfo->fw_version can cantain multiple FW strings. We already report NFD ABI version there, add NSP ABI version if available (i.e. on PF) with 'sp:' prefix. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 ++++ .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 25 ++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 + drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 3 +++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 10 +++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) commit 368b1d1c49f651ba513090623f2891a695fe9fbb Author: Jakub Kicinski Date: Sun Feb 19 11:58:10 2017 -0800 nfp: store NSP ABI version in state structure We read the status register on each NSP open, we can store the NSP ABI version in the state structure so that we don't have to read it again. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 64db09ed1fc2c4491cca4219850fab4d0460c952 Author: Jakub Kicinski Date: Sun Feb 19 11:58:09 2017 -0800 nfp: report manufacturing info on load Report card manufacturing information when driver loads. These identify the version of the board and its subcomponents. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a9c83f7bc7c121c99457553f8d1c3e231a9ba6df Author: Jakub Kicinski Date: Sun Feb 19 11:58:08 2017 -0800 nfp: refactor NSP initialization and add error message When acquiring NSP communication resource fails user is left with "probe failed with error -2" PCI code message but no info on what caused the problem. Some development boards may not have NSP FW in the flash image. Help users with a more verbouse message. While at it move the whole NSP init to a separate function to keep .probe() callback nice and simple. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 59 ++++++++++++++++----------- 1 file changed, 36 insertions(+), 23 deletions(-) commit c1ceee5efe80a2f03071a39a7df19b69dee21eae Merge: 24045a0 8f91566 Author: David S. Miller Date: Mon Feb 20 11:15:11 2017 -0500 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-02-19 Here's a set of Bluetooth patches for the 4.11 kernel: - New USB IDs to the btusb driver - Race fix in btmrvl driver - Added out-of-band wakeup support to the btusb driver - NULL dereference fix to bt_sock_recvmsg Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 24045a03b8796e3e1ddb370dfe4bc592a9f5f301 Author: David Ahern Date: Mon Feb 20 08:03:30 2017 -0800 net: mpls: Add support for netconf Add netconf support to MPLS. Allows userpsace to learn and be notified of changes to 'input' enable setting per interface. Acked-by: Nicolas Dichtel Signed-off-by: David Ahern Acked-by: Robert Shearman Signed-off-by: David S. Miller include/uapi/linux/netconf.h | 1 + include/uapi/linux/rtnetlink.h | 2 + net/mpls/af_mpls.c | 212 ++++++++++++++++++++++++++++++++++++++++- net/mpls/internal.h | 2 +- 4 files changed, 214 insertions(+), 3 deletions(-) commit 0eb8af4916a540c362a2950e5ab54eca32eb7d58 Author: Miklos Szeredi Date: Mon Feb 20 16:51:23 2017 +0100 vfs: use helper for calling f_op->fsync() Signed-off-by: Miklos Szeredi fs/sync.c | 2 +- include/linux/fs.h | 6 ++++++ ipc/shm.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit f74ac01520c9f6d89bbc3c6931a72f757b742f86 Author: Miklos Szeredi Date: Mon Feb 20 16:51:23 2017 +0100 mm: use helper for calling f_op->mmap() Signed-off-by: Miklos Szeredi drivers/gpu/drm/i915/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- fs/coda/file.c | 2 +- include/linux/fs.h | 5 +++++ ipc/shm.c | 2 +- mm/mmap.c | 2 +- mm/nommu.c | 4 ++-- 7 files changed, 12 insertions(+), 7 deletions(-) commit bb7462b6fd64e40809a857223bf7f0e628969f87 Author: Miklos Szeredi Date: Mon Feb 20 16:51:23 2017 +0100 vfs: use helpers for calling f_op->{read,write}_iter() Signed-off-by: Miklos Szeredi drivers/block/loop.c | 4 ++-- fs/aio.c | 4 ++-- fs/read_write.c | 12 ++++++------ fs/splice.c | 2 +- include/linux/fs.h | 12 ++++++++++++ 5 files changed, 23 insertions(+), 11 deletions(-) commit 0f78d06ac1e9b470cbd8f913ee1688c8b2c8feb3 Author: Miklos Szeredi Date: Mon Feb 20 16:51:23 2017 +0100 vfs: pass type instead of fn to do_{loop,iter}_readv_writev() Signed-off-by: Miklos Szeredi fs/read_write.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 7687a7a4435f4b32d8e775a7b6b25aea3a25d25a Author: Miklos Szeredi Date: Mon Feb 20 16:51:23 2017 +0100 vfs: extract common parts of {compat_,}do_readv_writev() Signed-off-by: Miklos Szeredi fs/read_write.c | 80 +++++++++++++++++++++------------------------------------ 1 file changed, 29 insertions(+), 51 deletions(-) commit 766a957df9f51479cb5c7212d19b282da5ca6f07 Author: Christophe Jaillet Date: Sun Feb 19 10:35:05 2017 +0100 qlcnic: Fix a memory leak in error handling path If 'dma_alloc_coherent()' fails, we should release resources allocated so far, just as done in all other cases in this function. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 177c8d1c96eb9851210313922a12ae8b0b63d8c0 Author: Christophe Jaillet Date: Sun Feb 19 10:19:57 2017 +0100 net: mvpp2: Fix a memory leak in error handling path if 'devm_kzalloc()' fails, we should release resources allocated so far, just as done a few lines below. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3608b13ccc51d06e499dfe12b27f134de1286e28 Author: Eric Dumazet Date: Sat Feb 18 10:34:18 2017 -0800 mlx4: reduce OOM risk on arches with large pages Since mlx4 NIC are used on PowerPC with 64K pages, we need to adapt MLX4_EN_ALLOC_PREFER_ORDER definition. Otherwise, a fragment sitting in an out of order TCP queue can hold 0.5 Mbytes and it is a serious OOM risk. Fixes: 51151a16a60f ("mlx4: allow order-0 memory allocations in RX path") Signed-off-by: Eric Dumazet Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9ef4ab36d23f7332ccd7ba9debc6749cb436288 Merge: e716953 83a0c6e Author: David S. Miller Date: Mon Feb 20 10:29:29 2017 -0500 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-02-18 This series contains updates to i40e and i40evf only. Alan fixes a bug in which the driver is unable to exit overflow promiscuous mode after having added "too many" mac filters. Ractored the '%*ph' printk format specifier to instead use the print_hex_dump(). Josh adds enabling multicast magic packet wakeup by adding calls to the mac_address_write admin q function during power down to update the PRTPM_SAH/SAL registers with the MC_MAG_EN bit. Jake remove a duplicate call i40e_update_link_info(), since it does not need to call it twice. Fixes and issue where we calculating the wrong switch id on big endian platforms. Avoided sparse warning, by doing a typecast to ensure the value is of the type expected by csum_replace_by_diff(). Mitch fixes a memory leak by freeing resources during i40e_remove(). Cleans up some code confusion by adding a proper code comment. Carolyn fixes a bug introduced with the addition of the per queue ITR feature support in ethtool. Cleans up a duplicate device id from the PCI table. Harshitha fixes a bug which causes the 'Link Detected' field in ethtool to report the correct link status. Benjamin Poirier from SuSE applies a fix ec13ee80145c ("virtio_net: invoke softirqs after __napi_schedule") to i40e driver as well. ==================== Signed-off-by: David S. Miller commit e71695307114335be1ed912f4a347396c2ed0e69 Author: Michael S. Tsirkin Date: Sun Feb 19 07:17:17 2017 +0200 ptr_ring: fix race conditions when resizing Resizing currently drops consumer lock. This can cause entries to be reordered, which isn't good in itself. More importantly, consumer can detect a false ring empty condition and block forever. Further, nesting of consumer within producer lock is problematic for tun, since it produces entries in a BH, which causes a lock order reversal: CPU0 CPU1 ---- ---- consume: lock(&(&r->consumer_lock)->rlock); resize: local_irq_disable(); lock(&(&r->producer_lock)->rlock); lock(&(&r->consumer_lock)->rlock); produce: lock(&(&r->producer_lock)->rlock); To fix, nest producer lock within consumer lock during resize, and keep consumer lock during the whole swap operation. Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Cc: "David S. Miller" Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller include/linux/ptr_ring.h | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit d4e854ccd6410687bf82af3fe49d2df9793d80b4 Author: Philippe Reynes Date: Sun Feb 19 00:19:04 2017 +0100 net: qlogic: qla3xxx: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qla3xxx.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit f74f92bed642033307cda00a0549a02fb6710a04 Author: Colin Ian King Date: Sat Feb 18 23:41:46 2017 +0000 fsl/fman: fix spelling mistake in variable name en_tsu_err_exeption trivial fix to spelling mistake, en_tsu_err_exeption should be en_tsu_err_exception Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d4105267a1409b739907c09b895ac0e39980b367 Merge: 93a66e9 4ea0c32 Author: David S. Miller Date: Mon Feb 20 10:26:10 2017 -0500 Merge branch 'sctp-MSG_MORE' Xin Long says: ==================== sctp: support MSG_MORE flag when sending msg This patch is to add support for MSG_MORE on sctp. Patch 1/2 is an improvement ahead of patch 2/2 to solve the close block problem mentioned in https://patchwork.ozlabs.org/patch/372404/. ==================== Signed-off-by: David S. Miller commit 4ea0c32f5f42f7ef33a7ecfb9b61ff0cad9b3c08 Author: Xin Long Date: Sun Feb 19 01:52:46 2017 +0800 sctp: add support for MSG_MORE This patch is to add support for MSG_MORE on sctp. It adds force_delay in sctp_datamsg to save MSG_MORE, and sets it after creating datamsg according to the send flag. sctp_packet_can_append_data then uses it to decide if the chunks of this msg will be sent at once or delay it. Note that unlike [1], this patch saves MSG_MORE in datamsg, instead of in assoc. As sctp enqueues the chunks first, then dequeue them one by one. If it's saved in assoc,the current msg's send flag (MSG_MORE) may affect other chunks' bundling. Since last patch, sctp flush out queue once assoc state falls into SHUTDOWN_PENDING, the close block problem mentioned in [1] has been solved as well. [1] https://patchwork.ozlabs.org/patch/372404/ Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + net/sctp/output.c | 9 +++------ net/sctp/socket.c | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) commit b7018d0b63003c0474451991797113605f26ee81 Author: Xin Long Date: Sun Feb 19 01:52:45 2017 +0800 sctp: flush out queue once assoc state falls into SHUTDOWN_PENDING This patch is to flush out queue when assoc state falls into SHUTDOWN_PENDING if there are still chunks in it, so that the data can be sent out as soon as possible before sending SHUTDOWN chunk. When sctp supports MSG_MORE flag in next patch, this improvement can also solve the problem that the chunks with MSG_MORE flag may be stuck in queue when closing an assoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 4 ++++ 1 file changed, 4 insertions(+) commit 93a66e93c7d8775f33c0d65e3fdeb209c1d4a8c9 Author: Harald Welte Date: Sat Feb 18 13:58:00 2017 +0100 GTP: Add some basic documentation about drivers/net/gtp.c In order to clarify what the module actually does, and how to use it, let's add some basic documentation to the kernel tree, together with pointers to related specs and projects. Signed-off-by: Harald Welte Acked-by: Andreas Schultz Signed-off-by: David S. Miller Documentation/networking/gtp.txt | 135 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) commit eb36bedf28be6d986bdbcfa375bab08ffa45efd8 Author: Lino Sanfilippo Date: Sat Feb 18 12:27:12 2017 +0100 net: aquantia: remove function aq_ring_tx_deinit Both functions aq_ring_rx_deinit() and aq_ring_tx_clean() are almost identical aside from an additional check in the latter. Move that check from the function into its caller and replace aq_ring_rx_deinit() with aq_ring_rx_deinit(). By doing this also adjust the functions return value from int to void since it can never fail. Signed-off-by: Lino Sanfilippo Tested-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 33 +----------------------- drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 3 +-- drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 14 ++++++---- 3 files changed, 11 insertions(+), 39 deletions(-) commit 90a6c997bd8bb836809eda5efb6406d8c58c0924 Author: Lino Sanfilippo Date: Sat Feb 18 12:19:41 2017 +0100 net: ena: remove superfluous check in ena_remove() The check in ena_remove() for the pci driver data not being NULL is not needed, since it is always set in the probe() function. Remove the superfluous check. Signed-off-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 ------ 1 file changed, 6 deletions(-) commit 2317c6b51e4249dbfa093e1b88cab0a9f0564b7f Author: Jarno Rajahalme Date: Fri Feb 17 18:11:58 2017 -0800 openvswitch: Set event bit after initializing labels. Connlabels are included in conntrack netlink event messages only if the IPCT_LABEL bit is set in the event cache (see ctnetlink_conntrack_event()). Set it after initializing labels for a new connection. Found upon further system testing, where it was noticed that labels were missing from the conntrack events. Fixes: 193e30967897 ("openvswitch: Do not trigger events for unconfirmed connections.") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5ed3fea0d6ffcef494b111ade0910a4ff149c331 Merge: cd2b708 25149ef Author: David S. Miller Date: Mon Feb 20 10:15:12 2017 -0500 Merge branch 'phy-unbind-crash' Florian Fainelli says: ==================== net: phy: Fix PHY unbind crash This fixes crashes when the PHY driver is no longer bound to the device. There is still a fair amount of work to be done to get the unbind -> bind sequent to result in a functional state, but that will be net-next material. These two problems existed for as long as PHYLIB as been around. ==================== Signed-off-by: David S. Miller commit 25149ef9d25cafc4f4fe9f4461f18f876f397417 Author: Florian Fainelli Date: Fri Feb 17 16:07:34 2017 -0800 net: phy: Check phydev->drv There are number of function calls, originating from user-space, typically through the Ethernet driver that can make us crash by dereferencing phydev->drv which will be NULL once we unbind the driver from the PHY. There are still functional issues that prevent an unbind then rebind to work, but these will be addressed separately. Suggested-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 26 ++++++++++++++++++++++---- drivers/net/phy/phy_device.c | 6 +++--- include/linux/phy.h | 3 +++ 3 files changed, 28 insertions(+), 7 deletions(-) commit 7b9a88a390dacb37b051a7b09b9a08f546edf5eb Author: Florian Fainelli Date: Fri Feb 17 16:07:33 2017 -0800 net: phy: Fix PHY unbind crash The PHY library does not deal very well with bind and unbind events. The first thing we would see is that we were not properly canceling the PHY state machine workqueue, so we would be crashing while dereferencing phydev->drv since there is no driver attached anymore. Suggested-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 68ba32352d51474d163d58e084b62a12bb610b21 Author: Namhyung Kim Date: Fri Feb 17 17:17:42 2017 +0900 perf record: Honor --quiet option properly It should call perf_quiet_option() to suppress messages. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-7-namhyung@kernel.org [ Fix merge clash with 483635a9d080 ("perf record: Add -a as default target") ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 2 ++ 1 file changed, 2 insertions(+) commit eddaef88961bbf2c0301f3216689d51fa7d0d472 Author: Namhyung Kim Date: Fri Feb 17 17:17:41 2017 +0900 perf annotate: Add -q/--quiet option The -q/--quiet option is to suppress any message. Sometimes users just want to see the numbers and it can be used for that case. Signed-off-by: Namhyung Kim Suggested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-annotate.txt | 4 ++++ tools/perf/builtin-annotate.c | 4 ++++ 2 files changed, 8 insertions(+) commit 63b42fce864a468ee02e6647474c4df9bfdc6166 Author: Namhyung Kim Date: Fri Feb 17 17:17:40 2017 +0900 perf diff: Add -q/--quiet option The -q/--quiet option is to suppress any message. Sometimes users just want to see the numbers and it can be used for that case. Committer notes: Before: # perf diff | head -10 Failed to open /tmp/perf-6678.map, continuing without symbols Failed to open /tmp/perf-6678.map, continuing without symbols Failed to open /tmp/perf-2646.map, continuing without symbols # Event 'cycles' # # Baseline Delta Abs Shared Object Symbol # ........ ......... .......................... ............................................ # 5.36% -1.76% [kernel.vmlinux] [k] intel_idle 2.80% +1.48% firefox [.] 0x00000000000101fe 57.12% -1.25% libxul.so [.] 0x00000000009bea92 1.36% -1.11% [kernel.vmlinux] [k] __schedule 4.26% -1.00% perf-6678.map [.] 0x00007fac4b0e9320 After: # perf diff -q | head -10 5.36% -1.76% [kernel.vmlinux] [k] intel_idle 2.80% +1.48% firefox [.] 0x00000000000101fe 57.12% -1.25% libxul.so [.] 0x00000000009bea92 1.36% -1.11% [kernel.vmlinux] [k] __schedule 4.26% -1.00% perf-6678.map [.] 0x00007fac4b0e9320 1.86% +0.95% [kernel.vmlinux] [k] update_blocked_averages 0.80% -0.70% [kernel.vmlinux] [k] native_sched_clock 0.74% -0.58% [kernel.vmlinux] [k] native_write_msr 0.76% -0.56% qemu-system-x86_64 [.] 0x00000000002395c0 +0.54% libpulsecommon-10.0.so [.] 0x000000000002d91b # Signed-off-by: Namhyung Kim Suggested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 4 ++++ tools/perf/builtin-diff.c | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) commit 27fafab59a60b6f02491f2ff44cafd4f2335e487 Author: Namhyung Kim Date: Fri Feb 17 17:17:39 2017 +0900 perf report: Add -q/--quiet option The -q/--quiet option is to suppress any message. Sometimes users just want to see the numbers and it can be used for that case. Before: $ perf report | head -15 Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/ext4/ext4.ko.gz, continuing without symbols Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/jbd2/jbd2.ko.gz, continuing without symbols Failed to open /tmp/perf-14507.map, continuing without symbols ... # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 39K of event 'cycles' # Event count (approx.): 30444796573 # # Overhead Command Shared Object Symbol # ........ ........... ................... ......................... # 9.28% swapper [kernel.vmlinux] [k] intel_idle 5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe 1.93% swapper [kernel.vmlinux] [k] __switch_to 1.89% swapper [kernel.vmlinux] [k] menu_select 1.75% sched-pipe [kernel.vmlinux] [k] __switch_to After: $ perf report -q | head 9.28% swapper [kernel.vmlinux] [k] intel_idle 5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe 1.93% swapper [kernel.vmlinux] [k] __switch_to 1.89% swapper [kernel.vmlinux] [k] menu_select 1.75% sched-pipe [kernel.vmlinux] [k] __switch_to 1.67% swapper [kernel.vmlinux] [k] cpu_startup_entry 1.48% sched-pipe [kernel.vmlinux] [k] enqueue_entity 1.46% swapper [kernel.vmlinux] [k] __schedule 1.36% swapper [kernel.vmlinux] [k] native_read_tsc 1.34% sched-pipe [kernel.vmlinux] [k] __schedule Signed-off-by: Namhyung Kim Suggested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-4-namhyung@kernel.org [ Removed builtin-report.c verbose > 0 hunk added to the previous patch ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 4 ++++ tools/perf/builtin-report.c | 19 +++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) commit bb963e16507ca7670f0bb47ccaada8874b2ba6a1 Author: Namhyung Kim Date: Fri Feb 17 17:17:38 2017 +0900 perf utils: Check verbose flag properly It now can have negative value to suppress the message entirely. So it needs to check it being positive. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-3-namhyung@kernel.org [ Adjust fuzz on tools/perf/util/pmu.c, add > 0 checks in many other places ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-mem.c | 4 ++-- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-sched.c | 12 ++++++------ tools/perf/builtin-stat.c | 6 +++--- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 6 +++--- tools/perf/pmu-events/json.c | 2 +- tools/perf/tests/attr.c | 2 +- tools/perf/tests/builtin-test.c | 2 +- tools/perf/tests/code-reading.c | 2 +- tools/perf/tests/fdarray.c | 2 +- tools/perf/tests/llvm.c | 2 +- tools/perf/tests/parse-events.c | 2 +- tools/perf/tests/perf-record.c | 4 ++-- tools/perf/tests/python-use.c | 2 +- tools/perf/tests/thread-map.c | 6 +++--- tools/perf/tests/vmlinux-kallsyms.c | 2 +- tools/perf/ui/browsers/map.c | 6 +++--- tools/perf/ui/hist.c | 2 +- tools/perf/util/annotate.c | 2 +- tools/perf/util/dso.c | 2 +- tools/perf/util/hist.c | 6 +++--- tools/perf/util/pmu.c | 8 ++++---- tools/perf/util/probe-event.c | 2 +- tools/perf/util/sort.c | 8 ++++---- tools/perf/util/stat.c | 2 +- tools/perf/util/symbol-elf.c | 2 +- 29 files changed, 52 insertions(+), 52 deletions(-) commit 80df1988201ac6648609eba13d48aef9f7974c10 Author: Namhyung Kim Date: Fri Feb 17 17:17:37 2017 +0900 perf utils: Add perf_quiet_option() The perf_quiet_option() is to suppress all messages. It's intended to be called just after parsing options. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/debug.c | 17 +++++++++++++++++ tools/perf/util/debug.h | 1 + 2 files changed, 18 insertions(+) commit 53f724b2432a9f97a941251772f2b0d195e2d282 Merge: f3287a9 12be9f7 fe6cc17 d193c16 c7821d0 7021b60 a48324d Author: Jiri Kosina Date: Mon Feb 20 15:01:57 2017 +0100 Merge branches 'for-4.10/upstream-fixes', 'for-4.11/intel-ish', 'for-4.11/mayflash', 'for-4.11/microsoft', 'for-4.11/rmi', 'for-4.11/upstream' and 'for-4.11/wacom' into for-linus commit ac18c0c4e2b1f84fc11d013cd7363377ae4cde43 Merge: a74d1ca c3a696b ecb10b6 d222678 Author: Rafael J. Wysocki Date: Mon Feb 20 14:28:51 2017 +0100 Merge branches 'acpi-ec', 'acpi-button' and 'acpi-apei' * acpi-ec: ACPI / EC: Use busy polling mode when GPE is not enabled ACPI / EC: Remove old CLEAR_ON_RESUME quirk * acpi-button: ACPI / button: Remove lid_init_state=method mode ACPI / button: Change default behavior to lid_init_state=open * acpi-apei: ACPI, APEI, EINJ: fix malformed newline escape commit a74d1cafc22e100a9b59c50943ca09c37e03dce8 Merge: 014f403 0c6543f cbc00c1 febf240 Author: Rafael J. Wysocki Date: Mon Feb 20 14:28:03 2017 +0100 Merge branches 'acpi-bus', 'acpi-sleep' and 'acpi-processor' * acpi-bus: spi: acpi: Initialize modalias from of_compatible i2c: acpi: Initialize info.type from of_compatible ACPI / bus: Introduce acpi_of_modalias() equiv of of_modalias_node() * acpi-sleep: ACPI: save NVS memory for Lenovo G50-45 * acpi-processor: x86/ACPI: keep x86_cpu_to_acpiid mapping valid on CPU hotplug commit 014f40393ebc4ad4167d415597bad0636e5e21f9 Merge: 7089db8 0974721 Author: Rafael J. Wysocki Date: Mon Feb 20 14:27:08 2017 +0100 Merge branch 'acpica' * acpica: (22 commits) ACPICA: Update version to 20170119 ACPICA: Tools: Update common signon, remove compilation bit width ACPICA: Source tree: Update copyright notices to 2017 ACPICA: Linuxize: Restore and fix Intel compiler build ACPICA: Update version to 20161222 ACPICA: Parser: Update parse info table for some operators ACPICA: Fix a problem with recent extra support for control method invocations ACPICA: Parser: Allow method invocations as target operands ACPICA: Fix for implicit result conversion for the ToXXX functions ACPICA: Resources: Not a valid resource if buffer length too long ACPICA: Utilities: Update debug output ACPICA: Disassembler: Add Switch/Case disassembly support ACPICA: EFI: Add efihello demo application ACPICA: MSVC: Fix MSVC6 build issues ACPICA: Linux-specific header: Add support for s390x compilation ACPICA: Hardware: Add sleep register hooks ACPICA: Macro header: Fix some typos in comments ACPICA: Hardware: Sort access bit width algorithm ACPICA: Utilities: Add power of two rounding support ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write() ... commit eee77a8a0d268b936b1641fd7d55efaa17c351d6 Merge: fccddb2 48385dd Author: Rafael J. Wysocki Date: Mon Feb 20 14:26:34 2017 +0100 Merge branch 'pm-tools' * pm-tools: tools/power/x86: Debug utility for intel_pstate driver AnalyzeSuspend: fix drag and zoom bug in javascript scripts: analyze_suspend.py: Update to upstream v4.5 scripts: analyze_suspend.py: Update to upstream v4.4 scripts: analyze_suspend.py: Update to upstream v4.3 commit fccddb25e1ec96bd11cd0fc6aa097899a9a8b44b Merge: 58339fe 00bb399 Author: Rafael J. Wysocki Date: Mon Feb 20 14:26:13 2017 +0100 Merge branch 'pm-sleep' * pm-sleep: PM / Documentation: Spelling s/wrtie/write/ PM / sleep: Fix test_suspend after sleep state rework PM / Hibernate: Use rb_entry() instead of container_of() commit 58339feae7133f1be6228b7ab56a147712aa0a92 Merge: 41ef3d1 09bb6e9 e84b4a8 16d0bf1 Author: Rafael J. Wysocki Date: Mon Feb 20 14:26:02 2017 +0100 Merge branches 'pm-core', 'pm-qos' and 'pm-domains' * pm-core: PM / wakeirq: report a wakeup_event on dedicated wekup irq PM / wakeirq: Fix spurious wake-up events for dedicated wakeirqs PM / wakeirq: Enable dedicated wakeirq for suspend * pm-qos: PM / QoS: Fix memory leak on resume_latency.notifiers PM / QoS: Remove unneeded linux/miscdevice.h include * pm-domains: PM / Domains: Provide dummy governors if CONFIG_PM_GENERIC_DOMAINS=n PM / Domains: Fix asynchronous execution of *noirq() callbacks PM / Domains: Correct comment in irq_safe_dev_in_no_sleep_domain() PM / Domains: Rename functions in genpd for power on/off commit 41ef3d1df037a429703db503e98fa948ee34b895 Merge: ad7eec4 23b017a Author: Rafael J. Wysocki Date: Mon Feb 20 14:23:40 2017 +0100 Merge branch 'pm-devfreq' * pm-devfreq: PM / devfreq: Modify the device name as devfreq(X) for sysfs PM / devfreq: Simplify the sysfs name of devfreq-event device PM / devfreq: Remove unnecessary separate _remove_devfreq() PM / devfreq: Fix wrong trans_stat of passive devfreq device PM / devfreq: Fix available_governor sysfs PM / devfreq: exynos-ppmu: Show the registred device for ppmu device PM / devfreq: Fix the wrong description for userspace governor PM / devfreq: Fix the checkpatch warnings PM / devfreq: exynos-bus: Print the real clock rate of bus PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registers PM / devfreq: exynos-bus: Add the detailed correlation for Exynos5433 PM / devfreq: Don't delete sysfs group twice commit ad7eec4244a8c6b53a0d38d6fd674e9d2c92897f Merge: f6cbe34 37efa4b Author: Rafael J. Wysocki Date: Mon Feb 20 14:23:21 2017 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: CPU / PM: expose pm_qos_resume_latency for CPUs cpuidle/menu: add per CPU PM QoS resume latency consideration cpuidle/menu: stop seeking deeper idle if current state is deep enough ACPI / idle: small formatting fixes commit f6cbe34f52dedd67d156b3d5dd76eb43791ea34a Merge: 64f758a 20bb550 Author: Rafael J. Wysocki Date: Mon Feb 20 14:23:00 2017 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (28 commits) MAINTAINERS: cpufreq: add bmips-cpufreq.c cpufreq: CPPC: add ACPI_PROCESSOR dependency cpufreq: make ti-cpufreq explicitly non-modular cpufreq: Do not clear real_cpus mask on policy init cpufreq: dt: Don't use generic platdev driver for ti-cpufreq platforms cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime Documentation: dt: add bindings for ti-cpufreq cpufreq: qoriq: Don't look at clock implementation details cpufreq: qoriq: add ARM64 SoCs support cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() cpufreq: s3c2416: double free on driver init error path MIPS: BMIPS: enable CPUfreq cpufreq: bmips-cpufreq: CPUfreq driver for Broadcom's BMIPS SoCs BMIPS: Enable prerequisites for CPUfreq in MIPS Kconfig. MIPS: BMIPS: Update defconfig cpufreq: Fix typos in comments cpufreq: intel_pstate: Calculate guaranteed performance for HWP cpufreq: intel_pstate: Make HWP limits compatible with legacy cpufreq: intel_pstate: Lower frequency than expected under no_turbo cpufreq: intel_pstate: Operation mode control from sysfs ... commit 64f758a07a8cdb5c2a08e0d3dfec323af1d2bac3 Merge: 7089db8 0764c60 Author: Rafael J. Wysocki Date: Mon Feb 20 14:22:50 2017 +0100 Merge branch 'pm-opp' * pm-opp: (24 commits) PM / OPP: Expose _of_get_opp_desc_node as dev_pm_opp API PM / OPP: Make _find_opp_table_unlocked() static PM / OPP: Update Documentation to remove RCU specific bits PM / OPP: Simplify dev_pm_opp_get_max_volt_latency() PM / OPP: Simplify _opp_set_availability() PM / OPP: Move away from RCU locking PM / OPP: Take kref from _find_opp_table() PM / OPP: Update OPP users to put reference PM / OPP: Add 'struct kref' to struct dev_pm_opp PM / OPP: Use dev_pm_opp_get_opp_table() instead of _add_opp_table() PM / OPP: Take reference of the OPP table while adding/removing OPPs PM / OPP: Return opp_table from dev_pm_opp_set_*() routines PM / OPP: Add 'struct kref' to OPP table PM / OPP: Add per OPP table mutex PM / OPP: Split out part of _add_opp_table() and _remove_opp_table() PM / OPP: Don't expose srcu_head to register notifiers PM / OPP: Rename dev_pm_opp_get_suspend_opp() and return OPP rate PM / OPP: Don't allocate OPP table from _opp_allocate() PM / OPP: Rename and split _dev_pm_opp_remove_table() PM / OPP: Add light weight _opp_free() routine ... commit 8312593a55941a0fae2b09731a4f91d87bd796db Merge: c470abd 3c2a769 a8d4c82 c4158ff Author: Ingo Molnar Date: Mon Feb 20 14:16:58 2017 +0100 Merge branches 'x86/cache', 'x86/debug' and 'x86/irq' into x86/urgent Pick up simple singular commits from their topic branches. Signed-off-by: Ingo Molnar commit 42f82367df2cb2b71ceead6164e4415851c51fa4 Author: Colin Ian King Date: Mon Feb 20 13:51:07 2017 +0100 video: fbdev: fsl-diu-fb: fix spelling mistake "palette" trivial fix to spelling mistakes of "palette" Signed-off-by: Colin Ian King Acked-by: Timur Tabi Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fsl-diu-fb.c | 4 ++-- include/linux/fsl-diu-fb.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 580203f10e0e060c35a526c3c67d6c1a44109664 Author: Arnd Bergmann Date: Mon Feb 20 13:51:07 2017 +0100 fbdev: ssd1307fb: include linux/gpio/consumer.h Changing this driver to the gpiod API requires the use of the new-style header, depending on the configuration: drivers/video/fbdev/ssd1307fb.c: In function 'ssd1307fb_probe': drivers/video/fbdev/ssd1307fb.c:569:15: error: implicit declaration of function 'devm_gpiod_get_optional';did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration] drivers/video/fbdev/ssd1307fb.c:570:11: error: 'GPIOD_OUT_LOW' undeclared (first use in this function) Fixes: 72db33355c14 ("fbdev: ssd1307fb: Start to use gpiod API for reset gpio") Cc: Tomi Valkeinen Cc: Jyri Sarha Cc: LABBE Corentin Signed-off-by: Arnd Bergmann Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/ssd1307fb.c | 1 + 1 file changed, 1 insertion(+) commit df963ea8a082d31521a120e8e31a29ad8a1dc215 Author: Jeff Layton Date: Tue Feb 14 10:09:40 2017 -0500 ceph: remove req from unsafe list when unregistering it There's no reason a request should ever be on a s_unsafe list but not in the request tree. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/18474 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b9942bc9d3c70d359496a1a0afc528d4ab89be46 Author: Bhumika Goyal Date: Sat Feb 11 12:14:38 2017 +0530 rbd: constify device_type structure Declare device_type structure as const as it is only stored in the type field of a device structure. This field is of type const, so add const to the declaration of device_type structure. File size before: text data bss dec hex filename 61546 11610 208 73364 11e94 drivers/block/rbd.o File size after: text data bss dec hex filename 61610 11578 208 73396 11eb4 drivers/block/rbd.o Signed-off-by: Bhumika Goyal Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d24b98e3a9c66b16ed029e1b2bcdf3c90e9d82d9 Author: Martin Schwidefsky Date: Mon Feb 20 09:51:36 2017 +0100 s390/syscall: fix single stepped system calls Fix PER tracing of system calls after git commit 34525e1f7e8dc478 "s390: store breaking event address only for program checks" broke it. Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 1 + 1 file changed, 1 insertion(+) commit 50a0d46c98b72cde3c6945f066c0adf31e4e8590 Author: Paul Gortmaker Date: Thu Feb 9 09:48:10 2017 -0500 s390/zcrypt: make ap_bus explicitly non-modular The Makefile in drivers/s390 has: obj-y += cio/ block/ char/ crypto/ net/ scsi/ virtio/ and the Makefile in crypto/ has: ap-objs := ap_bus.o ap_card.o ap_queue.o meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Also note that MODULE_ALIAS is a no-op for non-module builds. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We replace module.h with moduleparam.h since the file does declare some module parameters even though it is not modular itself. Signed-off-by: Paul Gortmaker Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 54 +++----------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) commit 260021e21b8fcc375984ac7733f93509bf9ad100 Author: Harald Freudenberger Date: Fri Feb 17 08:12:10 2017 +0100 s390/zcrypt: Removed unneeded debug feature directory creation. The ap bus code and the zcrypt api had invocations to the debug feature debugfs_create_dir() call but never populated these directories in any way. Removed this unneeded code. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 3 --- drivers/s390/crypto/zcrypt_api.c | 3 --- 2 files changed, 6 deletions(-) commit 61841be6358c03e864ad4c386c9a102edbba9cb8 Author: Jarkko Sakkinen Date: Wed Feb 15 20:02:28 2017 +0200 tpm: declare tpm2_get_pcr_allocation() as static There's no need to export tpm2_get_pcr_alloation() because it is only a helper function for tpm2_auto_startup(). For the same reason it does not make much sense to maintain documentation for it. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm.h | 1 - drivers/char/tpm/tpm2-cmd.c | 94 ++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 50 deletions(-) commit 6c696d8560e74cd42458931375875d62ae88c6ae Author: Ilya Dryomov Date: Wed Jan 25 18:16:23 2017 +0100 rbd: kill obj_request->object_name and rbd_segment_name_cache Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 79 ++++----------------------------------------- include/linux/ceph/osdmap.h | 7 ---- 2 files changed, 7 insertions(+), 79 deletions(-) commit a90bb0c1d47dc1195bc6ac753b34a52535089f80 Author: Ilya Dryomov Date: Wed Jan 25 18:16:23 2017 +0100 rbd: store and use obj_request->object_no object_no can be trivially formatted into an object name. We already store object names in OSD requests with special care to avoid dynamic allocations for short names. Storing a name in obj_request, obtained as below (!), is a waste and will be removed in the next commit. name = kmem_cache_alloc(rbd_segment_name_cache, ...); snprintf(name, ...); obj_request->object_name = kstrdup(name); kmem_cache_free(rbd_segment_name_cache, name); ... ceph_oid_aprintf(..., "%s", obj_request->object_name); Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 223768d02e2ca5c1747099e03cf949c17aebffd2 Author: Ilya Dryomov Date: Wed Jan 25 18:16:23 2017 +0100 rbd: RBD_V{1,2}_DATA_FORMAT macros ... and also fix up the comment -- format 1 data objects have always been 12 hex digits long. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 6 ++---- drivers/block/rbd_types.h | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) commit bc81207ea9fc01896cbc102f025f1ebb2c4bae1d Author: Ilya Dryomov Date: Wed Jan 25 18:16:23 2017 +0100 rbd: factor out __rbd_osd_req_create() Factor OSD request allocation and initialization code out into __rbd_osd_req_create(). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 103 ++++++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 63 deletions(-) commit 67e2b65274e3c5fc9100544c1f90adcc85dbe597 Author: Ilya Dryomov Date: Wed Jan 25 18:16:22 2017 +0100 rbd: set offset and length outside of rbd_obj_request_create() The allocation doesn't depend on offset and length. Both offset and length can be changed after obj_request is allocated, too. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 7e97332ea9caad3b7c6d86bc3b982e17eda2f736 Author: Ilya Dryomov Date: Wed Jan 25 18:16:22 2017 +0100 rbd: support for data-pool feature Add support for RBD_FEATURE_DATA_POOL feature. rbd_dev->layout.pool_id now stores the data pool id. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 263423f8adf4acbdc4fd26ed5b35f4a6408bc0ab Author: Ilya Dryomov Date: Wed Jan 25 18:16:22 2017 +0100 rbd: introduce rbd_init_layout() Rather than initializing layout fields with some made up values in __rbd_dev_create(), move the initialization into rbd_init_layout() and call it after the header is actually populated. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 5bc3fb177548503735bcc35fe98475d883740ecb Author: Ilya Dryomov Date: Wed Jan 25 18:16:22 2017 +0100 rbd: use rbd_obj_bytes() more Returning u64 doesn't make sense: max header->obj_order is 25 and ceph_file_layout::object_size is u32. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 03acf083355ffeb89b9269d205004d6d888fff99 Author: Ilya Dryomov Date: Wed Jan 25 18:16:22 2017 +0100 rbd: remove now unused rbd_obj_request_wait() and helpers Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) commit ecd4a68a26a2159b9f7233c6e892c94c90074cb0 Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 rbd: switch rbd_obj_method_sync() to ceph_osdc_call() As explained in the previous commit, rbd_obj_request machinery (and rbd_osd_req_create() in particular) shouldn't be used for working with metadata objects. Switch to the recently added ceph_osdc_call(). It assumes single pages for outbound and inbound buffers, but that's OK - none of the callers need more than that. These pages need to be allocated (messenger is in dire need of proper iterator interface!), but we are swapping for pages[] and pagelist allocations in the existing code. Kill class_name argument - all rbd methods are under "rbd". Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 162 ++++++++++++++++++++++------------------------------ 1 file changed, 67 insertions(+), 95 deletions(-) commit 2544a02090aa76ffb8069e6bf23d886e34d9c8da Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 libceph: pass reply buffer length through ceph_osdc_call() To spare checking for "this reply fits into a page, but does it fit into my buffer?" in some callers, osd_req_op_cls_response_data_pages() needs to know how big it is. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman net/ceph/cls_lock_client.c | 2 +- net/ceph/osd_client.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit fe5478e0f6694312ad17dea7083296c1aea0a049 Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 rbd: do away with obj_request in rbd_obj_read_sync() rbd_obj_request machinery is completely unnecessary here; all that's being done is fetching a metadata object - no striping, cloning, etc. More importantly, rbd_osd_req_create() grabs pool id from layout and that is becoming a data pool id. Kill offset argument - all metadata objects are small and read in full. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 81 +++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 49 deletions(-) commit 431a02cd82dd028f650d588f7cedc78643c5c86a Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 rbd: initialize rbd_dev->header_oloc early No reason to delay it until image_id is known. This will be required by some rbd_obj_method_sync() callers, after rbd_obj_method_sync() is changed to take oloc. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 24dca799fdbeeb0c955ef2f56a37461e6566aa07 Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 rbd: kill rbd_image_header::{crypt_type,comp_type} Image format 1 is deprecated and format 2 doesn't have these. Also, __rbd_dev_create() takes care of zeroing (or otherwise initializing) format 2 specific fields. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 9 --------- drivers/block/rbd_types.h | 3 --- 2 files changed, 12 deletions(-) commit 848d796c8c918e2d60060992786f82754f539cd4 Author: Ilya Dryomov Date: Wed Jan 25 18:16:21 2017 +0100 rbd: use kstrndup() in rbd_header_from_disk() Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 083a51fbc57ca848ab087692f3cc97898fd88b54 Author: Ilya Dryomov Date: Thu Feb 9 16:14:52 2017 +0100 libceph: bump CEPH_PG_MAX_SIZE to 32 ... to accommodate potentially very wide EC pools. This increases the size of a typical rbd ceph_osd_request by ~12% (from 1040 to 1168 bytes), but I'd rather go future proof here. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/ceph/rados.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef9324bb11357c02a4f0529b806341e5b768d872 Author: Ilya Dryomov Date: Wed Feb 8 18:57:48 2017 +0100 libceph: don't go through with the mapping if the PG is too wide With EC overwrites maturing, the kernel client will be getting exposed to potentially very wide EC pools. While "min(pi->size, X)" works fine when the cluster is stable and happy, truncating OSD sets interferes with resend logic (ceph_is_new_interval(), etc). Abort the mapping if the pool is too wide, assigning the request to the homeless session. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/osdmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 743efcffffc6620ab44ea9ec67c7e4e28dfa7742 Author: Ilya Dryomov Date: Tue Jan 31 15:55:06 2017 +0100 crush: merge working data and scratch Much like Arlo Guthrie, I decided that one big pile is better than two little piles. Reflects ceph.git commit 95c2df6c7e0b22d2ea9d91db500cf8b9441c73ba. Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 3 +-- include/linux/crush/mapper.h | 14 +++++++++++++- net/ceph/crush/mapper.c | 17 +++++++---------- net/ceph/osdmap.c | 14 ++++++++------ 4 files changed, 29 insertions(+), 19 deletions(-) commit 66a0e2d579dbec5c676cfe446234ffebb267c564 Author: Ilya Dryomov Date: Tue Jan 31 15:55:06 2017 +0100 crush: remove mutable part of CRUSH map Then add it to the working state. It would be very nice if we didn't have to take a lock to calculate a crush placement. By moving the permutation array into the working data, we can treat the CRUSH map as immutable. Reflects ceph.git commit cbcd039651c0569551cb90d26ce27e1432671f2a. Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 1 + include/linux/crush/crush.h | 41 +++++++-- include/linux/crush/mapper.h | 4 +- net/ceph/crush/crush.c | 5 -- net/ceph/crush/mapper.c | 206 +++++++++++++++++++++++++++++-------------- net/ceph/osdmap.c | 47 ++++++++-- 6 files changed, 218 insertions(+), 86 deletions(-) commit 1b6a78b5b91cdc07cc0b940b458e90c86835cf73 Author: Ilya Dryomov Date: Tue Jan 31 15:55:06 2017 +0100 libceph: add osdmap_set_crush() helper Simplify osdmap_decode() and osdmap_apply_incremental() a bit. Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 19def166f3781edb4c68c3c68fcb8199eed2d605 Author: Stafford Horne Date: Sun Feb 5 16:07:32 2017 +0900 libceph: remove unneeded stddef.h include This was causing a build failure for openrisc when using musl and gcc 5.4.0 since the file is not available in the toolchain. It doesnt seem this is needed and removing it does not cause any build warnings for me. Signed-off-by: Stafford Horne Signed-off-by: Ilya Dryomov net/ceph/snapshot.c | 2 -- 1 file changed, 2 deletions(-) commit 5eb9f6040f3854c5b92c60fd211dc0235ef25ca8 Author: Jeff Layton Date: Mon Jan 30 09:47:25 2017 -0500 ceph: do a LOOKUP in d_revalidate instead of GETATTR In commit c3f4688a08f (ceph: don't set req->r_locked_dir in ceph_d_revalidate), we changed the code to do a GETATTR instead of a LOOKUP as the parent info isn't strictly necessary to revalidate the dentry. What we missed there though is that in order to update the lease on the dentry after revalidating it, we _do_ need parent info. Change ceph_d_revalidate back to doing a LOOKUP instead of a GETATTR so that we can get the parent info in order to update the lease from ceph_fill_trace. Note that we set req->r_parent here, but we cannot set the CEPH_MDS_R_PARENT_LOCKED flag as we can't guarantee that it is. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cdde7c43513de7d8baec3ad7f6a01a177e00e968 Author: Jeff Layton Date: Fri Jan 27 13:07:10 2017 -0500 ceph: call update_dentry_lease even when r_locked dir is not set We don't really require that the parent be locked in order to update the lease on a dentry. Lease info is protected by the d_lock. In the event that the parent is not locked in ceph_fill_trace, and we have both parent and target info, go ahead and update the dentry lease. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f5d55f03973f79a008bf8635452849f8ef589c23 Author: Jeff Layton Date: Fri Jan 27 09:13:57 2017 -0500 ceph: vet the target and parent inodes before updating dentry lease In a later patch, we're going to need to allow ceph_fill_trace to update the dentry's lease when the parent is not locked. This is potentially racy though -- by the time we get around to processing the trace, the parent may have already changed. Change update_dentry_lease to take a ceph_vino pointer and use that to ensure that the dentry's parent still matches it before updating the lease. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 72 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 24 deletions(-) commit 80d025ffede88969f6adf7266fbdedfd5641148a Author: Jeff Layton Date: Thu Jan 26 16:14:18 2017 -0500 ceph: don't update_dentry_lease unless we actually got one This if block updates the dentry lease even in the case where the MDS didn't grant one. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3dd69aabcef3d835446a9a1e11d2eab0e6e35e95 Author: Jeff Layton Date: Tue Jan 31 10:28:26 2017 -0500 ceph: add a new flag to indicate whether parent is locked struct ceph_mds_request has an r_locked_dir pointer, which is set to indicate the parent inode and that its i_rwsem is locked. In some critical places, we need to be able to indicate the parent inode to the request handling code, even when its i_rwsem may not be locked. Most of the code that operates on r_locked_dir doesn't require that the i_rwsem be locked. We only really need it to handle manipulation of the dcache. The rest (filling of the inode, updating dentry leases, etc.) already has its own locking. Add a new r_req_flags bit that indicates whether the parent is locked when doing the request, and rename the pointer to "r_parent". For now, all the places that set r_parent also set this flag, but that will change in a later patch. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 21 ++++++++++++++------- fs/ceph/export.c | 3 ++- fs/ceph/file.c | 3 ++- fs/ceph/inode.c | 13 +++++++------ fs/ceph/mds_client.c | 24 ++++++++++++------------ fs/ceph/mds_client.h | 3 ++- 6 files changed, 39 insertions(+), 28 deletions(-) commit bc2de10dc4da5036ada3381775bd966f0c21c603 Author: Jeff Layton Date: Wed Feb 1 13:49:09 2017 -0500 ceph: convert bools in ceph_mds_request to a new r_req_flags field Currently, we have a bunch of bool flags in struct ceph_mds_request. We need more flags though, but each bool takes (at least) a byte. Those add up over time. Merge all of the existing bools in this struct into a single unsigned long, and use the set/test/clear_bit macros to manipulate them. These are atomic operations, but that is required here to prevent load/modify/store races. The existing flags are protected by different locks, so we can't rely on them for that purpose. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/debugfs.c | 2 +- fs/ceph/dir.c | 4 ++-- fs/ceph/inode.c | 18 +++++++++--------- fs/ceph/mds_client.c | 47 +++++++++++++++++++++++++---------------------- fs/ceph/mds_client.h | 12 ++++++++---- 5 files changed, 45 insertions(+), 38 deletions(-) commit f5a03b080450784e671998921feb62fd3846c953 Author: Jeff Layton Date: Tue Jan 31 11:06:13 2017 -0500 ceph: drop session argument to ceph_fill_trace Just get it from r_session since that's what's always passed in. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 4 ++-- fs/ceph/mds_client.c | 2 +- fs/ceph/super.h | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) commit 6fffaef954c432f6ddb42ec1064087e8ed704ca8 Author: Jeff Layton Date: Tue Jan 31 10:55:38 2017 -0500 ceph: remove "Debugging hook" from ceph_fill_trace Keeping around commented out code is just asking for it to bitrot and makes viewing the code under cscope more confusing. If we really need this, then we can revert this patch and put it under a Kconfig option. Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) commit c1944fedd8c492ce1c1a99ca9064dcc7bafa80e9 Author: Yan, Zheng Date: Sun Jan 29 22:15:47 2017 +0800 ceph: avoid calling ceph_renew_caps() infinitely __ceph_caps_mds_wanted() ignores caps from stale session. So the return value of __ceph_caps_mds_wanted() can keep the same across ceph_renew_caps(). This causes try_get_cap_refs() to keep calling ceph_renew_caps(). The fix is ignore the session valid check for the try_get_cap_refs() case. If session is stale, just let the caps requester sleep. Signed-off-by: Yan, Zheng fs/ceph/caps.c | 6 +++--- fs/ceph/file.c | 2 +- fs/ceph/super.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 00f06cba53f53f3f7be8ac4f9ba2c2f6a94bca6f Author: Yan, Zheng Date: Tue Jan 24 10:02:32 2017 +0800 ceph: make sure flushing inode in proper session's cap_flushing list when flushing inode's auth cap changes, we need to move it into the new auth cap session's cap_flushing list Signed-off-by: Yan, Zheng fs/ceph/caps.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d641df819db8b80198fd85d9de91137e8a823b07 Author: Yan, Zheng Date: Thu Jan 19 11:21:29 2017 +0800 ceph: update readpages osd request according to size of pages add_to_page_cache_lru() can fails, so the actual pages to read can be smaller than the initial size of osd request. We need to update osd request size in that case. Signed-off-by: Yan, Zheng Reviewed-by: Jeff Layton fs/ceph/addr.c | 1 + net/ceph/osd_client.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 24c149ad6914d349d8b64749f20f3f8ea5031fe0 Author: Jeff Layton Date: Thu Jan 12 14:42:40 2017 -0500 ceph: fix bogus endianness change in ceph_ioctl_set_layout sparse says: fs/ceph/ioctl.c:100:28: warning: cast to restricted __le64 preferred_osd is a __s64 so we don't need to do any conversion. Also, just remove the cast in ceph_ioctl_get_layout as it's not needed. Signed-off-by: Jeff Layton Reviewed-by: Sage Weil Signed-off-by: Ilya Dryomov fs/ceph/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fea24c6d4a553c59937ae4fef95c730a88125cb Author: Ilya Dryomov Date: Mon Jan 16 14:35:17 2017 +0100 libceph: include linux/sched.h into crypto.c directly Currently crypto.c gets linux/sched.h indirectly through linux/slab.h from linux/kasan.h. Include it directly for memalloc_noio_*() inlines. Signed-off-by: Ilya Dryomov net/ceph/crypto.c | 1 + 1 file changed, 1 insertion(+) commit d24cdcd3e40a6825135498e11c20c7976b9bf545 Author: Arnd Bergmann Date: Mon Jan 16 12:06:09 2017 +0100 libceph: use BUG() instead of BUG_ON(1) I ran into this compile warning, which is the result of BUG_ON(1) not always leading to the compiler treating the code path as unreachable: include/linux/ceph/osdmap.h: In function 'ceph_can_shift_osds': include/linux/ceph/osdmap.h:62:1: error: control reaches end of non-void function [-Werror=return-type] Using BUG() here avoids the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb65b919b914e65485fd8134912066f4fafc4f1e Author: Yan, Zheng Date: Thu Jan 12 17:18:00 2017 +0800 ceph: avoid updating mds_wanted too frequently user space may open/close single file frequently. It's not good to send a clientcaps message to mds for each open/close syscall. Signed-off-by: Yan, Zheng fs/ceph/caps.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 7c94ba27903c3c46c5829e96efb7c2a8ab7510e9 Author: Andreas Gerstmayr Date: Tue Jan 10 14:17:56 2017 +0100 ceph: set io_pages bdi hint This patch sets the io_pages bdi hint based on the rsize mount option. Without this patch large buffered reads (request size > max readahead) are processed sequentially in chunks of the readahead size (i.e. read requests are sent out up to the readahead size, then the do_generic_file_read() function waits until the first page is received). With this patch read requests are sent out at once up to the size specified in the rsize mount option (default: 64 MB). Signed-off-by: Andreas Gerstmayr Acked-by: Jeff Layton Signed-off-by: Yan, Zheng Documentation/filesystems/ceph.txt | 5 ++--- fs/ceph/super.c | 8 ++++++++ fs/ceph/super.h | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) commit 0fbc5360bf433ffeccbb94ef806d637049899741 Author: Colin Ian King Date: Thu Dec 29 20:19:32 2016 +0000 ceph: fix spelling mistake: "enabing" -> "enabling" trivial fix to spelling mistake in debug message Signed-off-by: Colin Ian King Signed-off-by: Yan, Zheng fs/ceph/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52953d55917e45fdf62d5e6cb37c61c32dc8d373 Author: Seraphime Kirkovski Date: Mon Dec 26 10:26:34 2016 +0100 ceph: cleanup ACCESS_ONCE -> READ_ONCE This removes the uses of ACCESS_ONCE in favor of READ_ONCE Signed-off-by: Seraphime Kirkovski Signed-off-by: Yan, Zheng fs/ceph/addr.c | 4 ++-- fs/ceph/caps.c | 2 +- fs/ceph/dir.c | 2 +- fs/ceph/inode.c | 2 +- fs/ceph/mds_client.c | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) commit ca6c8ae0f7930dad7e10664e3b5bc657dd75be60 Author: Jeff Layton Date: Thu Dec 15 08:37:59 2016 -0500 ceph: pass parent inode info to ceph_encode_dentry_release if we have it If we have a parent inode reference already, then we don't need to go back up the directory tree to find one. Link: http://tracker.ceph.com/issues/18148 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 11 +++++++---- fs/ceph/mds_client.c | 7 +++++-- fs/ceph/super.h | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) commit adf0d68701c7f3e50f21308c76f41e60956a6832 Author: Jeff Layton Date: Thu Dec 15 08:37:58 2016 -0500 ceph: fix unsafe dcache access in ceph_encode_dentry_release Accessing d_parent requires some sort of locking or it could vanish out from under us. Since we take the d_lock anyway, use that to fetch d_parent and take a reference to it, and then use that reference to call ceph_encode_inode_release. Link: http://tracker.ceph.com/issues/18148 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fd36a71762f3b0fcb9741ed24021afabec7e0c45 Author: Jeff Layton Date: Thu Dec 15 08:37:58 2016 -0500 ceph: pass parent dir ino info to build_dentry_path In the event that we have a parent inode reference in the request, we can use that instead of mucking about in the dcache. Pass any parent inode info we have down to build_dentry_path so it can make use of it. Link: http://tracker.ceph.com/issues/18148 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit c6b0b656ca24ede6657abb4a2cd910fa9c1879ba Author: Jeff Layton Date: Thu Dec 15 08:37:57 2016 -0500 ceph: clean up unsafe d_parent accesses in build_dentry_path While we hold a reference to the dentry when build_dentry_path is called, we could end up racing with a rename that changes d_parent. Handle that situation correctly, by using the rcu_read_lock to ensure that the parent dentry and inode stick around long enough to safely check ceph_snap and ceph_ino. Link: http://tracker.ceph.com/issues/18148 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 30c71233a1d4b5c23ad6652847285bf6b57086e2 Author: Jeff Layton Date: Thu Dec 15 08:37:56 2016 -0500 ceph: clean up unsafe d_parent access in __choose_mds __choose_mds exists to pick an MDS to use when issuing a call. Doing that typically involves picking an inode and using the authoritative MDS for it. In most cases, that's pretty straightforward, as we are using an inode to which we hold a reference (usually represented by r_dentry or r_inode in the request). In the case of a snapshotted directory however, we need to fetch the non-snapped parent, which involves walking back up the parents in the tree. The dentries in the snapshot dir are effectively frozen but the overall parent is _not_, and could vanish if a concurrent rename were to occur. Clean this code up and take special care to ensure the validity of the entries we're working with. First, try to use the inode in r_locked_dir if one exists. If not and all we have is r_dentry, then we have to walk back up the tree. Use the rcu_read_lock for this so we can ensure that any d_parent we find won't go away, and take extra care to deal with the possibility that the dentries could go negative. Change get_nonsnap_parent to return an inode, and take a reference to that inode before returning (if any). Change all of the other places where we set "inode" in __choose_mds to also take a reference, and then call iput on that inode before exiting the function. Link: http://tracker.ceph.com/issues/18148 Signed-off-by: Jeff Layton Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 64 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 22 deletions(-) commit a26d553400b30b6e0389f5c723c0fc6f7ea473da Merge: 843574a bcd3bb6 Author: Paolo Bonzini Date: Mon Feb 20 11:54:22 2017 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Paul Mackerras writes: "Please do a pull from my kvm-ppc-next branch to get some fixes which I would like to have in 4.11. There are four small commits there; two are fixes for potential host crashes in the new HPT resizing code, and the other two are changes to printks to make KVM on PPC a little less noisy." commit 95cb64c1fe61e70685a95f6260c8e9cd219fe08c Author: Peter Zijlstra Date: Sat Feb 18 15:26:45 2017 +0100 fork: Fix task_struct alignment Stupid bug that wrecked the alignment of task_struct and causes WARN()s in the x86 FPU code on some platforms. Reported-by: Fengguang Wu Tested-by: Fengguang Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: e274795ea7b7 ("locking/mutex: Fix mutex handoff") Link: http://lkml.kernel.org/r/20170218142645.GH6500@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2bb390a2081a36ffe906724d2848d846f2aeb29 Author: Detlef Urban Date: Mon Feb 20 09:47:59 2017 +0100 ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk Add mixer quirk for Tascam US-16x08 usb interface. Even that this is an usb compliant device, the input channels and DSP functions (EQ/Compressor) aren't accessible by default. Signed-off-by: Detlef Urban Signed-off-by: Takashi Iwai sound/usb/Makefile | 1 + sound/usb/mixer_quirks.c | 5 + sound/usb/mixer_us16x08.c | 1465 +++++++++++++++++++++++++++++++++++++++++++++ sound/usb/mixer_us16x08.h | 122 ++++ 4 files changed, 1593 insertions(+) commit 9f0c18aec620bc9d82268b3cb937568dd07b43ff Author: Josh Poimboeuf Date: Wed Feb 15 12:21:17 2017 -0600 objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules When building a CONFIG_STACK_VALIDATION enabled kernel without the libelf devel package installed, the Makefile prints a warning: "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel" But when building an out-of-tree module, the warning doesn't show. Instead it tries to use objtool, and the build fails with: /bin/sh: ./tools/objtool/objtool: No such file or directory Make sure the warning and the disabling of objtool occur in all cases, by moving the CONFIG_STACK_VALIDATION checks outside the 'ifeq ($(KBUILD_EXTMOD),)' block in the Makefile. Tested-By: Marc MERLIN Suggested-by: Jessica Yu Reported-by: Marc MERLIN Signed-off-by: Josh Poimboeuf Reviewed-by: Jessica Yu Cc: Linus Torvalds Cc: Michal Marek Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Link: http://lkml.kernel.org/r/b3088ae4a8698143d4851965793c61fec2135b1f.1487182864.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit fc0e23fad33198fc7d74227dba7bbc3a5d7755aa Merge: af67716 3bb9eca Author: Takashi Iwai Date: Mon Feb 20 08:52:50 2017 +0100 Merge branch 'for-next' into for-linus commit af5f42a7e426a87bfa69adc9b9d8930385a1ddf6 Author: Shaohua Li Date: Sun Feb 19 22:41:27 2017 -0800 md/raid1: fix a use-after-free bug Commit fd76863 (RAID1: a new I/O barrier implementation to remove resync window) introduces a user-after-free bug. Signed-off-by: Shaohua Li drivers/md/raid1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 824e47daddbfc6ebe1006b8659f080620472a136 Author: colyli@suse.de Date: Sat Feb 18 03:05:57 2017 +0800 RAID1: avoid unnecessary spin locks in I/O barrier code When I run a parallel reading performan testing on a md raid1 device with two NVMe SSDs, I observe very bad throughput in supprise: by fio with 64KB block size, 40 seq read I/O jobs, 128 iodepth, overall throughput is only 2.7GB/s, this is around 50% of the idea performance number. The perf reports locking contention happens at allow_barrier() and wait_barrier() code, - 41.41% fio [kernel.kallsyms] [k] _raw_spin_lock_irqsave - _raw_spin_lock_irqsave + 89.92% allow_barrier + 9.34% __wake_up - 37.30% fio [kernel.kallsyms] [k] _raw_spin_lock_irq - _raw_spin_lock_irq - 100.00% wait_barrier The reason is, in these I/O barrier related functions, - raise_barrier() - lower_barrier() - wait_barrier() - allow_barrier() They always hold conf->resync_lock firstly, even there are only regular reading I/Os and no resync I/O at all. This is a huge performance penalty. The solution is a lockless-like algorithm in I/O barrier code, and only holding conf->resync_lock when it has to. The original idea is from Hannes Reinecke, and Neil Brown provides comments to improve it. I continue to work on it, and make the patch into current form. In the new simpler raid1 I/O barrier implementation, there are two wait barrier functions, - wait_barrier() Which calls _wait_barrier(), is used for regular write I/O. If there is resync I/O happening on the same I/O barrier bucket, or the whole array is frozen, task will wait until no barrier on same barrier bucket, or the whold array is unfreezed. - wait_read_barrier() Since regular read I/O won't interfere with resync I/O (read_balance() will make sure only uptodate data will be read out), it is unnecessary to wait for barrier in regular read I/Os, waiting in only necessary when the whole array is frozen. The operations on conf->nr_pending[idx], conf->nr_waiting[idx], conf-> barrier[idx] are very carefully designed in raise_barrier(), lower_barrier(), _wait_barrier() and wait_read_barrier(), in order to avoid unnecessary spin locks in these functions. Once conf-> nr_pengding[idx] is increased, a resync I/O with same barrier bucket index has to wait in raise_barrier(). Then in _wait_barrier() if no barrier raised in same barrier bucket index and array is not frozen, the regular I/O doesn't need to hold conf->resync_lock, it can just increase conf->nr_pending[idx], and return to its caller. wait_read_barrier() is very similar to _wait_barrier(), the only difference is it only waits when array is frozen. For heavy parallel reading I/Os, the lockless I/O barrier code almostly gets rid of all spin lock cost. This patch significantly improves raid1 reading peroformance. From my testing, a raid1 device built by two NVMe SSD, runs fio with 64KB blocksize, 40 seq read I/O jobs, 128 iodepth, overall throughput increases from 2.7GB/s to 4.6GB/s (+70%). Changelog V4: - Change conf->nr_queued[] to atomic_t. - Define BARRIER_BUCKETS_NR_BITS by (PAGE_SHIFT - ilog2(sizeof(atomic_t))) V3: - Add smp_mb__after_atomic() as Shaohua and Neil suggested. - Change conf->nr_queued[] from atomic_t to int. - Change conf->array_frozen from atomic_t back to int, and use READ_ONCE(conf->array_frozen) to check value of conf->array_frozen in _wait_barrier() and wait_read_barrier(). - In _wait_barrier() and wait_read_barrier(), add a call to wake_up(&conf->wait_barrier) after atomic_dec(&conf->nr_pending[idx]), to fix a deadlock between _wait_barrier()/wait_read_barrier and freeze_array(). V2: - Remove a spin_lock/unlock pair in raid1d(). - Add more code comments to explain why there is no racy when checking two atomic_t variables at same time. V1: - Original RFC patch for comments. Signed-off-by: Coly Li Cc: Shaohua Li Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Guoqing Jiang Reviewed-by: Neil Brown Signed-off-by: Shaohua Li drivers/md/raid1.c | 165 ++++++++++++++++++++++++++++++++++++----------------- drivers/md/raid1.h | 31 +++++----- 2 files changed, 130 insertions(+), 66 deletions(-) commit fd76863e37fef26fe05547fddfa6e3d05e1682e6 Author: colyli@suse.de Date: Sat Feb 18 03:05:56 2017 +0800 RAID1: a new I/O barrier implementation to remove resync window 'Commit 79ef3a8aa1cb ("raid1: Rewrite the implementation of iobarrier.")' introduces a sliding resync window for raid1 I/O barrier, this idea limits I/O barriers to happen only inside a slidingresync window, for regular I/Os out of this resync window they don't need to wait for barrier any more. On large raid1 device, it helps a lot to improve parallel writing I/O throughput when there are background resync I/Os performing at same time. The idea of sliding resync widow is awesome, but code complexity is a challenge. Sliding resync window requires several variables to work collectively, this is complexed and very hard to make it work correctly. Just grep "Fixes: 79ef3a8aa1" in kernel git log, there are 8 more patches to fix the original resync window patch. This is not the end, any further related modification may easily introduce more regreassion. Therefore I decide to implement a much simpler raid1 I/O barrier, by removing resync window code, I believe life will be much easier. The brief idea of the simpler barrier is, - Do not maintain a global unique resync window - Use multiple hash buckets to reduce I/O barrier conflicts, regular I/O only has to wait for a resync I/O when both them have same barrier bucket index, vice versa. - I/O barrier can be reduced to an acceptable number if there are enough barrier buckets Here I explain how the barrier buckets are designed, - BARRIER_UNIT_SECTOR_SIZE The whole LBA address space of a raid1 device is divided into multiple barrier units, by the size of BARRIER_UNIT_SECTOR_SIZE. Bio requests won't go across border of barrier unit size, that means maximum bio size is BARRIER_UNIT_SECTOR_SIZE<<9 (64MB) in bytes. For random I/O 64MB is large enough for both read and write requests, for sequential I/O considering underlying block layer may merge them into larger requests, 64MB is still good enough. Neil also points out that for resync operation, "we want the resync to move from region to region fairly quickly so that the slowness caused by having to synchronize with the resync is averaged out over a fairly small time frame". For full speed resync, 64MB should take less then 1 second. When resync is competing with other I/O, it could take up a few minutes. Therefore 64MB size is fairly good range for resync. - BARRIER_BUCKETS_NR There are BARRIER_BUCKETS_NR buckets in total, which is defined by, #define BARRIER_BUCKETS_NR_BITS (PAGE_SHIFT - 2) #define BARRIER_BUCKETS_NR (1<> BARRIER_UNIT_SECTOR_BITS, BARRIER_BUCKETS_NR_BITS); } Here sector_nr is the start sector number of a bio. - Single bio won't go across boundary of a I/O barrier unit If a request goes across boundary of barrier unit, it will be split. A bio may be split in raid1_make_request() or raid1_sync_request(), if sectors returned by align_to_barrier_unit_end() is smaller than original bio size. Comparing to single sliding resync window, - Currently resync I/O grows linearly, therefore regular and resync I/O will conflict within a single barrier units. So the I/O behavior is similar to single sliding resync window. - But a barrier unit bucket is shared by all barrier units with identical barrier uinit index, the probability of conflict might be higher than single sliding resync window, in condition that writing I/Os always hit barrier units which have identical barrier bucket indexs with the resync I/Os. This is a very rare condition in real I/O work loads, I cannot imagine how it could happen in practice. - Therefore we can achieve a good enough low conflict rate with much simpler barrier algorithm and implementation. There are two changes should be noticed, - In raid1d(), I change the code to decrease conf->nr_pending[idx] into single loop, it looks like this, spin_lock_irqsave(&conf->device_lock, flags); conf->nr_queued[idx]--; spin_unlock_irqrestore(&conf->device_lock, flags); This change generates more spin lock operations, but in next patch of this patch set, it will be replaced by a single line code, atomic_dec(&conf->nr_queueud[idx]); So we don't need to worry about spin lock cost here. - Mainline raid1 code split original raid1_make_request() into raid1_read_request() and raid1_write_request(). If the original bio goes across an I/O barrier unit size, this bio will be split before calling raid1_read_request() or raid1_write_request(), this change the code logic more simple and clear. - In this patch wait_barrier() is moved from raid1_make_request() to raid1_write_request(). In raid_read_request(), original wait_barrier() is replaced by raid1_read_request(). The differnece is wait_read_barrier() only waits if array is frozen, using different barrier function in different code path makes the code more clean and easy to read. Changelog V4: - Add alloc_r1bio() to remove redundant r1bio memory allocation code. - Fix many typos in patch comments. - Use (PAGE_SHIFT - ilog2(sizeof(int))) to define BARRIER_BUCKETS_NR_BITS. V3: - Rebase the patch against latest upstream kernel code. - Many fixes by review comments from Neil, - Back to use pointers to replace arraries in struct r1conf - Remove total_barriers from struct r1conf - Add more patch comments to explain how/why the values of BARRIER_UNIT_SECTOR_SIZE and BARRIER_BUCKETS_NR are decided. - Use get_unqueued_pending() to replace get_all_pendings() and get_all_queued() - Increase bucket number from 512 to 1024 - Change code comments format by review from Shaohua. V2: - Use bio_split() to split the orignal bio if it goes across barrier unit bounday, to make the code more simple, by suggestion from Shaohua and Neil. - Use hash_long() to replace original linear hash, to avoid a possible confilict between resync I/O and sequential write I/O, by suggestion from Shaohua. - Add conf->total_barriers to record barrier depth, which is used to control number of parallel sync I/O barriers, by suggestion from Shaohua. - In V1 patch the bellowed barrier buckets related members in r1conf are allocated in memory page. To make the code more simple, V2 patch moves the memory space into struct r1conf, like this, - int nr_pending; - int nr_waiting; - int nr_queued; - int barrier; + int nr_pending[BARRIER_BUCKETS_NR]; + int nr_waiting[BARRIER_BUCKETS_NR]; + int nr_queued[BARRIER_BUCKETS_NR]; + int barrier[BARRIER_BUCKETS_NR]; This change is by the suggestion from Shaohua. - Remove some inrelavent code comments, by suggestion from Guoqing. - Add a missing wait_barrier() before jumping to retry_write, in raid1_make_write_request(). V1: - Original RFC patch for comments Signed-off-by: Coly Li Cc: Johannes Thumshirn Cc: Guoqing Jiang Reviewed-by: Neil Brown Signed-off-by: Shaohua Li drivers/md/raid1.c | 473 +++++++++++++++++++++++++++++------------------------ drivers/md/raid1.h | 57 ++++--- 2 files changed, 294 insertions(+), 236 deletions(-) commit a311e738b6d81febae21f0447c5b31752f0d1634 Author: Michael Ellerman Date: Fri Feb 17 17:34:13 2017 +1100 powerpc/powernv: Make PCI non-optional Bare metal systems without PCI don't exist, so there's no real point in making PCI optional, it just breaks the build from time to time. In fact the build is broken now if you turn off PCI_MSI but enable KVM. Using select for PCI is OK because we (powerpc) define config PCI, and it has no dependencies. Selecting PCI_MSI is slightly fishy, because it's in drivers/pci and it is user-visible, but its only dependency is PCI, so selecting it can't actually lead to breakage. Signed-off-by: Michael Ellerman Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd2b708750582e327789d8fb07c6eb5f79f7759f Author: Xin Long Date: Fri Feb 17 16:35:24 2017 +0800 sctp: check duplicate node before inserting a new transport sctp has changed to use rhlist for transport rhashtable since commit 7fda702f9315 ("sctp: use new rhlist interface on sctp transport rhashtable"). But rhltable_insert_key doesn't check the duplicate node when inserting a node, unlike rhashtable_lookup_insert_key. It may cause duplicate assoc/transport in rhashtable. like: client (addr A, B) server (addr X, Y) connect to X INIT (1) ------------> connect to Y INIT (2) ------------> INIT_ACK (1) <------------ INIT_ACK (2) <------------ After sending INIT (2), one transport will be created and hashed into rhashtable. But when receiving INIT_ACK (1) and processing the address params, another transport will be created and hashed into rhashtable with the same addr Y and EP as the last transport. This will confuse the assoc/transport's lookup. This patch is to fix it by returning err if any duplicate node exists before inserting it. Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport rhashtable") Reported-by: Fabio M. Di Nitto Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/input.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7e1392fb94a7f35421eca52bedead284429f4fed Author: David Daney Date: Fri Feb 17 12:04:12 2017 -0800 of_mdio: Add "broadcom,bcm5241" to the whitelist. Some Cavium dev boards have firmware which doesn't supply a proper ethernet-phy-ieee802.3-c22" compatible property. Restore these boards to working order by whitelisting this compatible value. Signed-off-by: David Daney Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) commit d4ff816e9707572c1c83def42f32105ddcabe1c0 Author: david.wu Date: Fri Feb 17 20:55:11 2017 +0800 net: ethernet: stmmac: dwmac-rk: Add RK3328 gmac support Add constants and callback functions for the dwmac on rk3328 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 | 117 +++++++++++++++++++++ 2 files changed, 118 insertions(+) commit a4d69a4c3ca6be699ed8cdc4683381ce44b85c90 Author: Xin Long Date: Fri Feb 17 16:41:45 2017 +0800 sctp: sctp_transport_dst_check should check if transport pmtu is dst mtu Now when sending a packet, sctp_transport_dst_check will check if dst is obsolete by calling ipv4/ip6_dst_check. But they return obsolete only when adding a new cache, after that when the cache's pmtu is updated again, it will not trigger transport->dst/pmtu's update. It can be reproduced by reducing route's pmtu twice. At the 1st time client will add a new cache, and transport->pathmtu gets updated as sctp_transport_dst_check finds it's obsolete. But at the 2nd time, cache's mtu is updated, sctp client will never send out any packet, because transport->pmtu has no chance to update. This patch is to fix this by also checking if transport pmtu is dst mtu in sctp_transport_dst_check, so that transport->pmtu can be updated on time. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sctp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 585396bc804d4e59d9591054ec12637d1698284c Merge: 61845d2 d884aa6 Author: David S. Miller Date: Sun Feb 19 18:18:01 2017 -0500 Merge branch 'sctp-rcv-side-stream-reconf-ssn-reset-req-chunk' Xin Long says: ==================== sctp: add receiver-side procedures for stream reconf ssn reset request chunk Patch 3/7 and 4/7 are to implement receiver-side procedures for the Outgoing and Incoming SSN Reset Request Parameter described in rfc6525 section 5.2.2 and 5.2.3 Patch 1/7 and 2/7 are ahead of them to define some apis. Patch 5/7-7/7 are to add the process of reconf chunk event in rx path. Note that with this patchset, asoc->reconf_enable has no chance yet to be set, until the patch "sctp: add get and set sockopt for reconf_enable" is applied in the future. As we can not just enable it when sctp is not capable of processing reconf chunk yet. v1->v2: - re-split the patchset and make sure it has no dead codes for review. - rename the titles of the commits and improve some changelogs. - drop __packed from some structures in patch 1/7. - fix some kbuild warnings in patch 3/7 by initializing str_p = NULL. - sctp_chunk_lookup_strreset_param changes to return sctp_paramhdr_t * and uses sctp_strreset_tsnreq to access request_seq in patch 3/7. - use __u in uapi sctp.h in patch 1/7. - do str_list endian conversion when generating stream_reset_event in patch 2/7. - remove str_list endian conversion, pass resp_seq param with network endian to lookup_strreset_param in 3/7. - move str_list endian conversion out of sctp_make_strreset_req, so that sctp_make_strreset_req can be used more conveniently to process inreq in patch 4/7. - remove sctp_merge_reconf_chunk and not support response with multiparam in patch 6/7. ==================== Signed-off-by: David S. Miller commit d884aa635be6247a1bc5b0fa60d8a16b5f48e279 Author: Xin Long Date: Fri Feb 17 12:45:43 2017 +0800 sctp: add reconf chunk event This patch is to add reconf chunk event based on the sctp event frame in rx path, it will call sctp_sf_do_reconf to process the reconf chunk. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/constants.h | 3 +++ net/sctp/sm_statetable.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 2040d3d7a36265d4a26af4e19a6a8a6154ab4bcc Author: Xin Long Date: Fri Feb 17 12:45:42 2017 +0800 sctp: add reconf chunk process This patch is to add a function to process the incoming reconf chunk, in which it verifies the chunk, and traverses the param and process it with the right function one by one. sctp_sf_do_reconf would be the process function of reconf chunk event. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 1 + net/sctp/sm_statefuns.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit ea62504373fa9ff3ced27e07e1eac041888ecc46 Author: Xin Long Date: Fri Feb 17 12:45:41 2017 +0800 sctp: add a function to verify the sctp reconf chunk This patch is to add a function sctp_verify_reconf to do some length check and multi-params check for sctp stream reconf according to rfc6525 section 3.1. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 3 +++ net/sctp/sm_make_chunk.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 16e1a91965b02fe24d24e8b8d7b2245d29ed6a70 Author: Xin Long Date: Fri Feb 17 12:45:40 2017 +0800 sctp: implement receiver-side procedures for the Incoming SSN Reset Request Parameter This patch is to implement Receiver-Side Procedures for the Incoming SSN Reset Request Parameter described in rfc6525 section 5.2.3. It's also to move str_list endian conversion out of sctp_make_strreset_req, so that sctp_make_strreset_req can be used more conveniently to process inreq. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 4 +++ net/sctp/sm_make_chunk.c | 8 +----- net/sctp/stream.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 7 deletions(-) commit 81054476453640159149cb6704e834893e16736b Author: Xin Long Date: Fri Feb 17 12:45:39 2017 +0800 sctp: implement receiver-side procedures for the Outgoing SSN Reset Request Parameter This patch is to implement Receiver-Side Procedures for the Outgoing SSN Reset Request Parameter described in rfc6525 section 5.2.2. Note that some checks must be after request_seq check, as even those checks fail, strreset_inseq still has to be increase by 1. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 6 +++ net/sctp/stream.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) commit 35ea82d611da59f8bea44a37996b3b11bb1d3fd7 Author: Xin Long Date: Fri Feb 17 12:45:38 2017 +0800 sctp: add support for generating stream ssn reset event notification This patch is to add Stream Reset Event described in rfc6525 section 6.1.1. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/ulpevent.h | 4 ++++ include/uapi/linux/sctp.h | 16 ++++++++++++++++ net/sctp/ulpevent.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) commit bd4b9f8b4af7be15fd162276ec9a2a1d49f10270 Author: Xin Long Date: Fri Feb 17 12:45:37 2017 +0800 sctp: add support for generating stream reconf resp chunk This patch is to define Re-configuration Response Parameter described in rfc6525 section 4.4. As optional fields are only for SSN/TSN Reset Request Parameter, it uses another function to make that. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 24 ++++++++++++++++ include/net/sctp/sm.h | 7 +++++ net/sctp/sm_make_chunk.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) commit 61845d2072150e896f2f18f1d879956e453ee8fd Author: Jason Wang Date: Fri Feb 17 11:33:09 2017 +0800 virtio-net: batch stats updating We already have counters for sent/recv packets and sent/recv bytes. Doing a batched update to reduce the number of u64_stats_update_begin/end(). Take care not to bother with stats update when called speculatively. Cc: Willem de Bruijn Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit f5a57723371f11ff953c4ba71184dc00e65469fc Author: Eric Dumazet Date: Thu Feb 16 15:23:27 2017 -0800 mlx4: fix potential divide by 0 in mlx4_en_auto_moderation() 1) In the case where rate == priv->pkt_rate_low == priv->pkt_rate_high, mlx4_en_auto_moderation() does a divide by zero. 2) We want to properly change the moderation parameters if rx_frames was changed (like in ethtool -C eth0 rx-frames 16) Signed-off-by: Eric Dumazet Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 1786dbf3702e33ce3afd2d3dbe630bd04b1d2e58 Author: Dmitry V. Levin Date: Thu Feb 16 18:05:45 2017 +0300 uapi: fix linux/rds.h userspace compilation error On the kernel side, sockaddr_storage is #define'd to __kernel_sockaddr_storage. Replacing struct sockaddr_storage with struct __kernel_sockaddr_storage defined by fixes the following linux/rds.h userspace compilation error: /usr/include/linux/rds.h:226:26: error: field 'dest_addr' has incomplete type struct sockaddr_storage dest_addr; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/rds.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit feb0869d90e51ce8b6fd8a46588465b1b5a26d09 Author: Dmitry V. Levin Date: Thu Feb 16 18:05:13 2017 +0300 uapi: fix linux/rds.h userspace compilation errors Consistently use types from linux/types.h to fix the following linux/rds.h userspace compilation errors: /usr/include/linux/rds.h:106:2: error: unknown type name 'uint8_t' uint8_t name[32]; /usr/include/linux/rds.h:107:2: error: unknown type name 'uint64_t' uint64_t value; /usr/include/linux/rds.h:117:2: error: unknown type name 'uint64_t' uint64_t next_tx_seq; /usr/include/linux/rds.h:118:2: error: unknown type name 'uint64_t' uint64_t next_rx_seq; /usr/include/linux/rds.h:121:2: error: unknown type name 'uint8_t' uint8_t transport[TRANSNAMSIZ]; /* null term ascii */ /usr/include/linux/rds.h:122:2: error: unknown type name 'uint8_t' uint8_t flags; /usr/include/linux/rds.h:129:2: error: unknown type name 'uint64_t' uint64_t seq; /usr/include/linux/rds.h:130:2: error: unknown type name 'uint32_t' uint32_t len; /usr/include/linux/rds.h:135:2: error: unknown type name 'uint8_t' uint8_t flags; /usr/include/linux/rds.h:139:2: error: unknown type name 'uint32_t' uint32_t sndbuf; /usr/include/linux/rds.h:144:2: error: unknown type name 'uint32_t' uint32_t rcvbuf; /usr/include/linux/rds.h:145:2: error: unknown type name 'uint64_t' uint64_t inum; /usr/include/linux/rds.h:153:2: error: unknown type name 'uint64_t' uint64_t hdr_rem; /usr/include/linux/rds.h:154:2: error: unknown type name 'uint64_t' uint64_t data_rem; /usr/include/linux/rds.h:155:2: error: unknown type name 'uint32_t' uint32_t last_sent_nxt; /usr/include/linux/rds.h:156:2: error: unknown type name 'uint32_t' uint32_t last_expected_una; /usr/include/linux/rds.h:157:2: error: unknown type name 'uint32_t' uint32_t last_seen_una; /usr/include/linux/rds.h:164:2: error: unknown type name 'uint8_t' uint8_t src_gid[RDS_IB_GID_LEN]; /usr/include/linux/rds.h:165:2: error: unknown type name 'uint8_t' uint8_t dst_gid[RDS_IB_GID_LEN]; /usr/include/linux/rds.h:167:2: error: unknown type name 'uint32_t' uint32_t max_send_wr; /usr/include/linux/rds.h:168:2: error: unknown type name 'uint32_t' uint32_t max_recv_wr; /usr/include/linux/rds.h:169:2: error: unknown type name 'uint32_t' uint32_t max_send_sge; /usr/include/linux/rds.h:170:2: error: unknown type name 'uint32_t' uint32_t rdma_mr_max; /usr/include/linux/rds.h:171:2: error: unknown type name 'uint32_t' uint32_t rdma_mr_size; /usr/include/linux/rds.h:212:9: error: unknown type name 'uint64_t' typedef uint64_t rds_rdma_cookie_t; /usr/include/linux/rds.h:215:2: error: unknown type name 'uint64_t' uint64_t addr; /usr/include/linux/rds.h:216:2: error: unknown type name 'uint64_t' uint64_t bytes; /usr/include/linux/rds.h:221:2: error: unknown type name 'uint64_t' uint64_t cookie_addr; /usr/include/linux/rds.h:222:2: error: unknown type name 'uint64_t' uint64_t flags; /usr/include/linux/rds.h:228:2: error: unknown type name 'uint64_t' uint64_t cookie_addr; /usr/include/linux/rds.h:229:2: error: unknown type name 'uint64_t' uint64_t flags; /usr/include/linux/rds.h:234:2: error: unknown type name 'uint64_t' uint64_t flags; /usr/include/linux/rds.h:240:2: error: unknown type name 'uint64_t' uint64_t local_vec_addr; /usr/include/linux/rds.h:241:2: error: unknown type name 'uint64_t' uint64_t nr_local; /usr/include/linux/rds.h:242:2: error: unknown type name 'uint64_t' uint64_t flags; /usr/include/linux/rds.h:243:2: error: unknown type name 'uint64_t' uint64_t user_token; /usr/include/linux/rds.h:248:2: error: unknown type name 'uint64_t' uint64_t local_addr; /usr/include/linux/rds.h:249:2: error: unknown type name 'uint64_t' uint64_t remote_addr; /usr/include/linux/rds.h:252:4: error: unknown type name 'uint64_t' uint64_t compare; /usr/include/linux/rds.h:253:4: error: unknown type name 'uint64_t' uint64_t swap; /usr/include/linux/rds.h:256:4: error: unknown type name 'uint64_t' uint64_t add; /usr/include/linux/rds.h:259:4: error: unknown type name 'uint64_t' uint64_t compare; /usr/include/linux/rds.h:260:4: error: unknown type name 'uint64_t' uint64_t swap; /usr/include/linux/rds.h:261:4: error: unknown type name 'uint64_t' uint64_t compare_mask; /usr/include/linux/rds.h:262:4: error: unknown type name 'uint64_t' uint64_t swap_mask; /usr/include/linux/rds.h:265:4: error: unknown type name 'uint64_t' uint64_t add; /usr/include/linux/rds.h:266:4: error: unknown type name 'uint64_t' uint64_t nocarry_mask; /usr/include/linux/rds.h:269:2: error: unknown type name 'uint64_t' uint64_t flags; /usr/include/linux/rds.h:270:2: error: unknown type name 'uint64_t' uint64_t user_token; /usr/include/linux/rds.h:274:2: error: unknown type name 'uint64_t' uint64_t user_token; /usr/include/linux/rds.h:275:2: error: unknown type name 'int32_t' int32_t status; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/rds.h | 104 +++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) commit bcb41c6bced1ee778d23c53a6b4807fb08cf5540 Author: Dmitry V. Levin Date: Thu Feb 16 18:04:46 2017 +0300 uapi: fix linux/mroute.h userspace compilation errors Include to fix the following linux/mroute.h userspace compilation errors: /usr/include/linux/mroute.h:58:18: error: field 'vifc_lcl_addr' has incomplete type struct in_addr vifc_lcl_addr; /* Local interface address */ /usr/include/linux/mroute.h:61:17: error: field 'vifc_rmt_addr' has incomplete type struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */ /usr/include/linux/mroute.h:72:17: error: field 'mfcc_origin' has incomplete type struct in_addr mfcc_origin; /* Origin of mcast */ /usr/include/linux/mroute.h:73:17: error: field 'mfcc_mcastgrp' has incomplete type struct in_addr mfcc_mcastgrp; /* Group in question */ /usr/include/linux/mroute.h:84:17: error: field 'src' has incomplete type struct in_addr src; /usr/include/linux/mroute.h:85:17: error: field 'grp' has incomplete type struct in_addr grp; /usr/include/linux/mroute.h:109:17: error: field 'im_src' has incomplete type struct in_addr im_src,im_dst; /usr/include/linux/mroute.h:109:24: error: field 'im_dst' has incomplete type struct in_addr im_src,im_dst; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/mroute.h | 1 + 1 file changed, 1 insertion(+) commit 72aa107df6a275cf03359934ca5799a2be7a1bf7 Author: Dmitry V. Levin Date: Thu Feb 16 18:04:29 2017 +0300 uapi: fix linux/mroute6.h userspace compilation errors Include to fix the following linux/mroute6.h userspace compilation errors: /usr/include/linux/mroute6.h:80:22: error: field 'mf6cc_origin' has incomplete type struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */ /usr/include/linux/mroute6.h:81:22: error: field 'mf6cc_mcastgrp' has incomplete type struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */ /usr/include/linux/mroute6.h:91:22: error: field 'src' has incomplete type struct sockaddr_in6 src; /usr/include/linux/mroute6.h:92:22: error: field 'grp' has incomplete type struct sockaddr_in6 grp; /usr/include/linux/mroute6.h:132:18: error: field 'im6_src' has incomplete type struct in6_addr im6_src, im6_dst; /usr/include/linux/mroute6.h:132:27: error: field 'im6_dst' has incomplete type struct in6_addr im6_src, im6_dst; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/mroute6.h | 1 + 1 file changed, 1 insertion(+) commit 6c07ec0fa5712b01d0967cf74129fa9b4d234af8 Author: Dmitry V. Levin Date: Thu Feb 16 18:04:14 2017 +0300 uapi: fix linux/ipv6_route.h userspace compilation errors Include to fix the following linux/ipv6_route.h userspace compilation errors: /usr/include/linux/ipv6_route.h:42:19: error: field 'rtmsg_dst' has incomplete type struct in6_addr rtmsg_dst; /usr/include/linux/ipv6_route.h:43:19: error: field 'rtmsg_src' has incomplete type struct in6_addr rtmsg_src; /ust/include/linux/ipv6_route.h:44:19: error: field 'rtmsg_gateway' has incomplete type struct in6_addr rtmsg_gateway; Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/ipv6_route.h | 1 + 1 file changed, 1 insertion(+) commit 249168ad07cd23b5201dd2f09fd450ae4176f96c Author: Thomas Falcon Date: Wed Feb 15 12:18:00 2017 -0600 ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs After sending device capability queries and requests to the vNIC Server, an interrupt is triggered and the responses are written to the driver's CRQ response buffer. Since the interrupt can be triggered before all responses are written and visible to the partition, there is a danger that the interrupt handler or tasklet can terminate before all responses are read, resulting in a failure to initialize the device. To avoid this scenario, when capability commands are sent, we set a flag that will be checked in the following interrupt tasklet that will handle the capability responses from the server. Once all responses have been handled, the flag is disabled; and the tasklet is allowed to terminate. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++++++++-- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) commit 901e040aa341d5b2c38fd65a473e953f7ca0bc0b Author: Thomas Falcon Date: Wed Feb 15 12:17:59 2017 -0600 ibmvnic: Use common counter for capabilities checks Two different counters were being used for capabilities requests and queries. These commands are not called at the same time so there is no reason a single counter cannot be used. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 71 ++++++++++++++++++++------------------ drivers/net/ethernet/ibm/ibmvnic.h | 3 +- 2 files changed, 39 insertions(+), 35 deletions(-) commit 6c267b3dea09aebe84752cfedcab140c908830bb Author: Thomas Falcon Date: Wed Feb 15 12:17:58 2017 -0600 ibmvnic: Handle processing of CRQ messages in a tasklet Create a tasklet to process queued commands or messages received from firmware instead of processing them in the interrupt handler. Note that this handler does not process network traffic, but communications related to resource allocation and device settings. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 18 +++++++++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) commit 1e128c81290a419ab9ec8b09fe989f1c6c15a0f4 Author: Arun Easi Date: Wed Feb 15 06:28:22 2017 -0800 qed: Add support for hardware offloaded FCoE. This adds the backbone required for the various HW initalizations which are necessary for the FCoE driver (qedf) for QLogic FastLinQ 4xxxx line of adapters - FW notification, resource initializations, etc. Signed-off-by: Arun Easi Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 3 + drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed.h | 11 + drivers/net/ethernet/qlogic/qed/qed_cxt.c | 98 +- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 3 + drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 13 +- drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 5 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 205 ++++- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 42 + drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 1014 +++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_fcoe.h | 87 ++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 781 +++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_hw.c | 3 + drivers/net/ethernet/qlogic/qed/qed_ll2.c | 25 + drivers/net/ethernet/qlogic/qed/qed_ll2.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 7 + drivers/net/ethernet/qlogic/qed/qed_mcp.c | 3 + drivers/net/ethernet/qlogic/qed/qed_mcp.h | 1 + drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 8 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 4 + drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 3 + include/linux/qed/common_hsi.h | 10 +- include/linux/qed/fcoe_common.h | 715 +++++++++++++++ include/linux/qed/qed_fcoe_if.h | 145 +++ include/linux/qed/qed_if.h | 41 +- 25 files changed, 3211 insertions(+), 19 deletions(-) commit 3bb9eca913025ed05c0510de831c67b7bef652c5 Author: Bhumika Goyal Date: Sun Feb 19 15:51:30 2017 +0530 ALSA: emu10k1: constify snd_emux_operators structure Declare snd_emux_operators structure as const as it is only copied into another structure. So, snd_emux_operators structures having this property can be made const. Signed-off-by: Bhumika Goyal Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/emu10k1/emu10k1_callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad5b55761956427f61ed9c96961bf9c5cd4f92dc Author: Alban Browaeys Date: Mon Feb 6 23:50:33 2017 +0100 netfilter: xt_hashlimit: Fix integer divide round to zero. Diving the divider by the multiplier before applying to the input. When this would "divide by zero", divide the multiplier by the divider first then multiply the input by this value. Currently user2creds outputs zero when input value is bigger than the number of slices and lower than scale. This as then user input is applied an integer divide operation to a number greater than itself (scale). That rounds up to zero, then we multiply zero by the credits slice size. iptables -t filter -I INPUT --protocol tcp --match hashlimit --hashlimit 40/second --hashlimit-burst 20 --hashlimit-mode srcip --hashlimit-name syn-flood --jump RETURN thus trigger the overflow detection code: xt_hashlimit: overflow, try lower: 25000/20 (25000 as hashlimit avg and 20 the burst) Here: 134217 slices of (HZ * CREDITS_PER_JIFFY) size. 500000 is user input value 1000000 is XT_HASHLIMIT_SCALE_v2 gives: 0 as user2creds output Setting burst to "1" typically solve the issue ... but setting it to "40" does too ! This is on 32bit arch calling into revision 2 of hashlimit. Signed-off-by: Alban Browaeys Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 40b446a1d8af17274746ff7079aa0a618dffbac3 Author: Vishwanath Pai Date: Thu Feb 16 20:55:45 2017 +0100 netfilter: ipset: Null pointer exception in ipset list:set If we use before/after to add an element to an empty list it will cause a kernel panic. $> cat crash.restore create a hash:ip create b hash:ip create test list:set timeout 5 size 4 add test b before a $> ipset -R < crash.restore Executing the above will crash the kernel. Signed-off-by: Vishwanath Pai Reviewed-by: Josh Hunt Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_list_set.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 50054a9223aaf79985c55ef7dd090ced15581567 Author: Jozsef Kadlecsik Date: Thu Feb 16 20:47:30 2017 +0100 Fix bug: sometimes valid entries in hash:* types of sets were evicted Wrong index was used and therefore when shrinking a hash bucket at deleting an entry, valid entries could be evicted as well. Thanks to Eric Ewanco for the thorough bugreport. Fixes netfilter bugzilla #1119 Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_hash_gen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57f22cd29cf1b4ff2aea8505eae2d3ed71ca5de4 Merge: e2a3b0d 7abfe04 45e861a Author: Mark Brown Date: Sun Feb 19 16:41:17 2017 +0000 Merge remote-tracking branches 'spi/topic/ti-qspi' and 'spi/topic/topcliff-pch' into spi-next commit e2a3b0df8dea7585a2e64861f3ab7bcbc2a04386 Merge: 2016d52 23e291c ffcfae3 72bc7ae e7ad4a7 c2e51ac Author: Mark Brown Date: Sun Feb 19 16:41:05 2017 +0000 Merge remote-tracking branches 'spi/topic/rockchip', 'spi/topic/rspi', 'spi/topic/s3c64xx', 'spi/topic/sh-msiof' and 'spi/topic/slave' into spi-next commit 2016d52a381c8cfc4e126d96817eb49a30abae37 Merge: 3470650 66459c5 30fb272 9c4f044 797236f 64e02cb Author: Mark Brown Date: Sun Feb 19 16:41:01 2017 +0000 Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/lantiq-ssc', 'spi/topic/mpc52xx', 'spi/topic/ppc4xx' and 'spi/topic/pxa2xx' into spi-next commit 34706500579b958d8e0560952aa52740e56878de Merge: 244a60c e70002c 55f0cd3 9c6a3af 102ecc47 Author: Mark Brown Date: Sun Feb 19 16:40:59 2017 +0000 Merge remote-tracking branches 'spi/topic/dw', 'spi/topic/ep93xx', 'spi/topic/falcon' and 'spi/topic/fsl-lpspi' into spi-next commit 244a60c28d62282808aaf5be1b6be965a16848cd Merge: 3490462 e92f005 91829a9 973f7dd e360e72 Author: Mark Brown Date: Sun Feb 19 16:40:55 2017 +0000 Merge remote-tracking branches 'spi/topic/armada', 'spi/topic/ath79', 'spi/topic/bcm-qspi' and 'spi/topic/bcm53xx' into spi-next commit 3490462378944c7e137657d0d66bb707303cfc96 Merge: 42af2f5 1ce2486 Author: Mark Brown Date: Sun Feb 19 16:40:55 2017 +0000 Merge remote-tracking branch 'spi/topic/dma' into spi-next commit 42af2f5c52daec0c182af66984927ef64885bbcc Merge: e0afd0f 8324147 Author: Mark Brown Date: Sun Feb 19 16:40:55 2017 +0000 Merge remote-tracking branch 'spi/topic/core' into spi-next commit e0afd0facfa921db8d5757709600a136d9cbba6c Merge: d2f68a0 e18a80a ad16d4a 379f831 Author: Mark Brown Date: Sun Feb 19 16:40:53 2017 +0000 Merge remote-tracking branches 'spi/fix/pxa2xx', 'spi/fix/rspi' and 'spi/fix/s3c64xx' into spi-linus commit d2f68a055ca34fb05a89687dadf32b8f14801618 Merge: 69973b8 52cc720 Author: Mark Brown Date: Sun Feb 19 16:40:52 2017 +0000 Merge tag 'spi-fix-v4.10-rc4' into spi-linus spi: Fixes for v4.10 The usual small smattering of driver specific fixes. A few bits that stand out here: - The R-Car patches adding fallbacks are just adding new compatible strings to the driver so that device trees are written in a more robustly future proof fashion, this isn't strictly a fix but it's just new IDs and it's better to get it into mainline sooner to improve the ABI. - The DesignWare "switch to new API part 2" patch is actually a misleadingly titled fix for a bit that got missed in the original conversion. # gpg: Signature made Thu 19 Jan 2017 14:54:15 GMT # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit fad9cd45edf558b5886219d58986a88a83926bbf Merge: 0755fad 33f0698 66d228a b4c2e15 Author: Mark Brown Date: Sun Feb 19 16:40:41 2017 +0000 Merge remote-tracking branches 'regulator/topic/s2mpa01', 'regulator/topic/supplies' and 'regulator/topic/tps65217' into regulator-next commit 0755fad8a6af3fe5f218f55c6d0aa45ee684d2df Merge: 56590d7 d4fdf5e 36fe20c 14a1699 fb74036 243842b Author: Mark Brown Date: Sun Feb 19 16:40:37 2017 +0000 Merge remote-tracking branches 'regulator/topic/pv88080', 'regulator/topic/pv88090', 'regulator/topic/qcom-smd', 'regulator/topic/rc5t583' and 'regulator/topic/rn5t618' into regulator-next commit 56590d75c35f8431b3438e869026fb19665ab410 Merge: cecc279 a180df7 00804e6 0be7943 e505385 ea51874 Author: Mark Brown Date: Sun Feb 19 16:40:35 2017 +0000 Merge remote-tracking branches 'regulator/topic/pbias', 'regulator/topic/pcap', 'regulator/topic/pcf50633', 'regulator/topic/pfuze100' and 'regulator/topic/pv88060' into regulator-next commit cecc2795a7a440dc264916a0f8000a320fa9fcc0 Merge: 84e58d1 0301987 88c9d47 85214c9 6e09f4a 0e5a768 Author: Mark Brown Date: Sun Feb 19 16:40:32 2017 +0000 Merge remote-tracking branches 'regulator/topic/max77802', 'regulator/topic/max8907', 'regulator/topic/max8925', 'regulator/topic/max8952' and 'regulator/topic/palmas' into regulator-next commit 84e58d19ec8ca1256cc082c3cd009ef997a7afe8 Merge: 250320b f9e93ac 18c6c42 634dc7a 404826c b68f907 Author: Mark Brown Date: Sun Feb 19 16:40:30 2017 +0000 Merge remote-tracking branches 'regulator/topic/ltc3676', 'regulator/topic/max14577', 'regulator/topic/max77620', 'regulator/topic/max77686' and 'regulator/topic/max77693' into regulator-next commit 250320b070364e26847207fcf15db2da86a2c985 Merge: 56eff61 0ad4c07 71880ab 17db9f3 dc83c94 c093c3a Author: Mark Brown Date: Sun Feb 19 16:40:28 2017 +0000 Merge remote-tracking branches 'regulator/topic/cpcap', 'regulator/topic/fan53555', 'regulator/topic/gpio', 'regulator/topic/hi655x' and 'regulator/topic/lp8755' into regulator-next commit 56eff61990a959441b2cd1a44c4f5163edb21c43 Merge: f88140a ca7734a 2773ead ef306e4 20f860c Author: Mark Brown Date: Sun Feb 19 16:40:26 2017 +0000 Merge remote-tracking branches 'regulator/topic/anatop', 'regulator/topic/arizona', 'regulator/topic/as3711' and 'regulator/topic/bcm590xx' into regulator-next commit f88140af481e9b5af33cb3b0c5450cddab42d22d Merge: 401c424 b9f1932 32cb5d3 2abf29a 1ed1da3 bb24b9d Author: Mark Brown Date: Sun Feb 19 16:40:24 2017 +0000 Merge remote-tracking branches 'regulator/topic/88pm800', 'regulator/topic/88pm8607', 'regulator/topic/aat2870', 'regulator/topic/act8945a' and 'regulator/topic/ad5938' into regulator-next commit 401c42429caa8e374d17abcbc92505dd6b2e2a18 Merge: 0fe3f97 a4d7641 Author: Mark Brown Date: Sun Feb 19 16:40:23 2017 +0000 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 0fe3f971fc83bfd709b70f8ac822ad6db4a05c9e Merge: 1c35539 e42a46b 6308f17 Author: Mark Brown Date: Sun Feb 19 16:40:22 2017 +0000 Merge remote-tracking branches 'regulator/fix/debugfs' and 'regulator/fix/tps65086' into regulator-linus commit 1c35539cd76848bc65d791c6741e3f0195901f5f Merge: 6b80562 3827b64 Author: Mark Brown Date: Sun Feb 19 16:40:21 2017 +0000 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit 6b80562d514032502a43b72346153a03fe01c3f6 Merge: 69973b8 206c472 Author: Mark Brown Date: Sun Feb 19 16:40:20 2017 +0000 Merge tag 'regulator-fix-v4.10-rc6' into regulator-linus regulator: Fixes for v4.10 Three changes here, two run of the mill driver specific fixes and a change from Mark Rutland which reverts some new device specific ACPI binding code which was added during the merge window as there are concerns about this sending the wrong signal about usage of regulators in ACPI systems. # gpg: Signature made Fri 03 Feb 2017 11:48:10 GMT # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit 141dee78c40ac2c43aa4ff306688d625e1c731de Merge: ebfa3dc af4b654 66ead50 Author: Mark Brown Date: Sun Feb 19 16:37:07 2017 +0000 Merge remote-tracking branches 'asoc/topic/wm8753' and 'asoc/topic/zte' into asoc-next commit ebfa3dccd2ee17383e68b9c516c47068457a4de7 Merge: 166729f 03303da fd34045 98856d5 dfa5def c9b0bdc Author: Mark Brown Date: Sun Feb 19 16:37:01 2017 +0000 Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/topology', 'asoc/topic/wm0010', 'asoc/topic/wm8731' and 'asoc/topic/wm8741' into asoc-next commit 166729f37da174f4ad967ebfc3e6f1517d247e61 Merge: a564394 c7f87f9 df3b573 9c1852b e984fd6 c97c460 Author: Mark Brown Date: Sun Feb 19 16:36:54 2017 +0000 Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/simple' and 'asoc/topic/sunxi' into asoc-next commit a564394660a0d7c6b5423b5d41ae6d0a2fd21191 Merge: 8237d99 e98aa52 4a312c9 cec5582 13861a4 969f751 Author: Mark Brown Date: Sun Feb 19 16:36:48 2017 +0000 Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5640', 'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5660' into asoc-next commit 8237d99c3b1b8112d1eb7a7f763b5a9afde847ae Merge: a701802 80691c8 b6e643a eaae2ea Author: Mark Brown Date: Sun Feb 19 16:36:44 2017 +0000 Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rockchip' into asoc-next commit a701802c4e724a9592c3da9893449fbc82b0cfc6 Merge: 64c37d5 9fe78b2 ee9dc31 c1644e3 1e561f6 9834ffd Author: Mark Brown Date: Sun Feb 19 16:36:35 2017 +0000 Merge remote-tracking branches 'asoc/topic/max9867', 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next commit 64c37d50ad68442b0fcaec0afe7431a39391d1cb Merge: 96f0e8a bfe48df 1c445a4 Author: Mark Brown Date: Sun Feb 19 16:36:32 2017 +0000 Merge remote-tracking branches 'asoc/topic/img' and 'asoc/topic/max98090' into asoc-next commit 96f0e8a5b0979255e64ee8431f8287a41dc79140 Merge: 59acd5d e21ab17 245c5c7b d61b23d 4957b55 b07609ce Author: Mark Brown Date: Sun Feb 19 16:36:23 2017 +0000 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', 'asoc/topic/fsl', 'asoc/topic/fsl-sai' and 'asoc/topic/graph' into asoc-next commit 59acd5dfcc1e786273beba2edb8645eb3ef01285 Merge: b7707a8 3f81d9a d6075c2 8abab35 Author: Mark Brown Date: Sun Feb 19 16:36:18 2017 +0000 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/debugfs' and 'asoc/topic/doc' into asoc-next commit b7707a8be6a79b7ea2103c92da5ed5a56e9ba26d Merge: a2d6428 ca8c7f2 8480ac5 31489c0 ac29a8f Author: Mark Brown Date: Sun Feb 19 16:36:13 2017 +0000 Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/chmap', 'asoc/topic/cq93vc' and 'asoc/topic/da7218' into asoc-next commit a2d64282dd11520d2e967b871e35b798ece05298 Merge: 99d3509 1d00734 d589d8b fc1e65c 30cd849 acff07d Author: Mark Brown Date: Sun Feb 19 16:35:51 2017 +0000 Merge remote-tracking branches 'asoc/topic/adau17x1', 'asoc/topic/adsp', 'asoc/topic/ak4642', 'asoc/topic/amd' and 'asoc/topic/arizona' into asoc-next commit 99d35094559ab5b09266d4e993899efa7bff0b2b Merge: 715d525 826e83d Author: Mark Brown Date: Sun Feb 19 16:35:48 2017 +0000 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 715d525b413cde6e86caf0a744287d7b71395d1e Merge: 16b5711 fc25914 Author: Mark Brown Date: Sun Feb 19 16:35:47 2017 +0000 Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next commit 16b5711485b0eba250451b3a85ab869939f20c7d Merge: c7bb6d8 7ba8ba3 Author: Mark Brown Date: Sun Feb 19 16:35:45 2017 +0000 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit c7bb6d8060eec4f3806b88796fbf46db1e73d900 Merge: 4ae8be8 9bfa24e Author: Mark Brown Date: Sun Feb 19 16:35:44 2017 +0000 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next commit 4ae8be8ea9f7b46f339b8481c265256ffd412567 Merge: 39bc30f 96241ba Author: Mark Brown Date: Sun Feb 19 16:35:41 2017 +0000 Merge remote-tracking branch 'asoc/topic/component' into asoc-next commit 39bc30f25329ad16d67760581183ab7828f495cc Merge: bd85d18 bcb8c27 ebad64d Author: Mark Brown Date: Sun Feb 19 16:35:37 2017 +0000 Merge remote-tracking branches 'asoc/fix/fsl-mxs-saif' and 'asoc/fix/sunxi' into asoc-linus commit bd85d189b33bda263bc59602de86391f476a3093 Merge: 5bf3db1 ef30da1c5 Author: Mark Brown Date: Sun Feb 19 16:35:36 2017 +0000 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit 5bf3db18db32d57c269c21e73df6a3621a30f6fc Merge: 19532a2 f12f5c8 Author: Mark Brown Date: Sun Feb 19 16:35:34 2017 +0000 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 19532a24773a7a7a988ffbab805b05ad7e564115 Merge: 389dcb9 639467c Author: Mark Brown Date: Sun Feb 19 16:35:33 2017 +0000 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus commit 389dcb9df652856294774f0ddc66a3c5bb5f1794 Merge: 69973b8 42e0ebd Author: Mark Brown Date: Sun Feb 19 16:35:15 2017 +0000 Merge tag 'asoc-fix-v4.10-rc3' into asoc-linus ASoC: Fixes for v4.10 As well as the usual smattering of driver specific fixes collected since the merge window this has one particularly important fix to the core for handling of aux_devs which was broken during the merge window by some of the componentization refactoring. # gpg: Signature made Wed 11 Jan 2017 17:26:37 GMT # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit 7abfe04c47d97243a7aeeb8fe211a15687bff67f Author: Christophe JAILLET Date: Sat Feb 18 10:42:02 2017 +0100 spi: spi-ti-qspi: Fix error handling 'dma_request_chan_by_mask()' can not return NULL. Try to keep the logic in 'no_dma:' by resetting 'qspi->rx_chan' in case of error. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f787d1debf63f78a15b2d1c79e7f1788c4fadfa0 Merge: 4e33e34 00ea1ce Author: David S. Miller Date: Sun Feb 19 11:18:46 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 30fb27239f987c53429f24297f5d46e28d0e16ed Author: Christophe JAILLET Date: Sat Feb 18 10:42:02 2017 +0100 spi: spi-ti-qspi: Fix error handling 'dma_request_chan_by_mask()' can not return NULL. Try to keep the logic in 'no_dma:' by resetting 'qspi->rx_chan' in case of error. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 582c97f6868cf70720a17d2421d317333f3ad597 Author: Hauke Mehrtens Date: Sat Feb 18 17:06:48 2017 +0100 spi: lantiq-ssc: activate under COMPILE_TEST This driver should compile on all platforms, activate it under compile test. The Lantiq specific parts are under ifdef and should be removed when Lantiq platform supports common clock framework. Signed-off-by: Hauke Mehrtens Signed-off-by: Mark Brown drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e92f0051c0c65d7bee989884a233cfcd80303bdf Author: Wei Yongjun Date: Sun Feb 5 15:49:40 2017 +0000 spi: armada-3700: Remove spi_master_put in a3700_spi_remove() The call to spi_master_put() in a3700_spi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in a3700_spi_remove(). This is detected by Coccinelle semantic patch. Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 1 - 1 file changed, 1 deletion(-) commit c97c4604c008f3d489cc3201de80e313aeb501d6 Author: Wei Yongjun Date: Mon Feb 6 15:22:24 2017 +0000 ASoC: sun4i-spdif: drop unnessary snd_soc_unregister_component() It's not necessary to unregister a component registered with devm_snd_soc_register_component(). Also removed pointness clk_disable_unprepare() from error path and snd_soc_unregister_platform() from the remove. Fixes: f8260afa444b ("ASoC: sunxi: Add support for the SPDIF block") Signed-off-by: Wei Yongjun Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9294000d6d895ad609f3cc4aff98c9c6175b466f Author: Bart Van Assche Date: Tue Feb 14 10:56:36 2017 -0800 IB/srp: Drain the send queue before destroying a QP A quote from the IB spec: However, if the Consumer does not wait for the Affiliated Asynchronous Last WQE Reached Event, then WQE and Data Segment leakage may occur. Therefore, it is good programming practice to tear down a QP that is associated with an SRQ by using the following process: * Put the QP in the Error State; * wait for the Affiliated Asynchronous Last WQE Reached Event; * either: * drain the CQ by invoking the Poll CQ verb and either wait for CQ to be empty or the number of Poll CQ operations has exceeded CQ capacity size; or * post another WR that completes on the same CQ and wait for this WR to return as a WC; * and then invoke a Destroy QP or Reset QP. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit f039f44fc331a7c6f828dfed97d5df0588602fd8 Author: Bart Van Assche Date: Tue Feb 14 10:56:35 2017 -0800 IB/core: Add support for draining IB_POLL_DIRECT completion queues Signed-off-by: Bart Van Assche Cc: Steve Wise Cc: Chuck Lever Cc: Christoph Hellwig Cc: Max Gurtovoy Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 4 ++-- drivers/infiniband/core/verbs.c | 35 +++++++++++++++-------------------- 2 files changed, 17 insertions(+), 22 deletions(-) commit b02c15360b17dde352fbf4003e20dabcd3ae9157 Author: Bart Van Assche Date: Tue Feb 14 10:56:34 2017 -0800 IB/srp: Improve an error path Avoid that the following message is printed if login fails: scsi host0: ib_srp: Sending CM DREQ failed Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7139ca80f7cd79e034a5c5f9c242bfb0471545c Author: Bart Van Assche Date: Tue Feb 14 10:56:33 2017 -0800 IB/srp: Make a diagnostic message more informative Report the destination port GID if connecting fails. Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 93c76dbb749eb0c791c2680f8fdaeae51240fdf5 Author: Bart Van Assche Date: Tue Feb 14 10:56:32 2017 -0800 IB/srp: Document locking conventions Use lockdep_assert_held() statements to verify at run-time whether the proper locks are held. Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0a6fdbdeb1c25e31763c1fb333fa2723a7d2aba6 Author: Bart Van Assche Date: Tue Feb 14 10:56:31 2017 -0800 IB/srp: Fix race conditions related to task management Avoid that srp_process_rsp() overwrites the status information in ch if the SRP target response timed out and processing of another task management function has already started. Avoid that issuing multiple task management functions concurrently triggers list corruption. This patch prevents that the following stack trace appears in the system log: WARNING: CPU: 8 PID: 9269 at lib/list_debug.c:52 __list_del_entry_valid+0xbc/0xc0 list_del corruption. prev->next should be ffffc90004bb7b00, but was ffff8804052ecc68 CPU: 8 PID: 9269 Comm: sg_reset Tainted: G W 4.10.0-rc7-dbg+ #3 Call Trace: dump_stack+0x68/0x93 __warn+0xc6/0xe0 warn_slowpath_fmt+0x4a/0x50 __list_del_entry_valid+0xbc/0xc0 wait_for_completion_timeout+0x12e/0x170 srp_send_tsk_mgmt+0x1ef/0x2d0 [ib_srp] srp_reset_device+0x5b/0x110 [ib_srp] scsi_ioctl_reset+0x1c7/0x290 scsi_ioctl+0x12a/0x420 sd_ioctl+0x9d/0x100 blkdev_ioctl+0x51e/0x9f0 block_ioctl+0x38/0x40 do_vfs_ioctl+0x8f/0x700 SyS_ioctl+0x3c/0x70 entry_SYSCALL_64_fastpath+0x18/0xad Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Cc: Steve Feeley Cc: Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 45 ++++++++++++++++++++++++------------- drivers/infiniband/ulp/srp/ib_srp.h | 1 + 2 files changed, 30 insertions(+), 16 deletions(-) commit 6cb72bc1b40bb2c1750ee7a5ebade93bed49a5fb Author: Bart Van Assche Date: Tue Feb 14 10:56:30 2017 -0800 IB/srp: Avoid that duplicate responses trigger a kernel bug After srp_process_rsp() returns there is a short time during which the scsi_host_find_tag() call will return a pointer to the SCSI command that is being completed. If during that time a duplicate response is received, avoid that the following call stack appears: BUG: unable to handle kernel NULL pointer dereference at (null) IP: srp_recv_done+0x450/0x6b0 [ib_srp] Oops: 0000 [#1] SMP CPU: 10 PID: 0 Comm: swapper/10 Not tainted 4.10.0-rc7-dbg+ #1 Call Trace: __ib_process_cq+0x4b/0xd0 [ib_core] ib_poll_handler+0x1d/0x70 [ib_core] irq_poll_softirq+0xba/0x120 __do_softirq+0xba/0x4c0 irq_exit+0xbe/0xd0 smp_apic_timer_interrupt+0x38/0x50 apic_timer_interrupt+0x90/0xa0 RIP: srp_recv_done+0x450/0x6b0 [ib_srp] RSP: ffff88046f483e20 Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman Cc: Steve Feeley Cc: Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d6c58dc40fec35ff6cdb350b53bce0fcf9143709 Author: Bart Van Assche Date: Tue Feb 14 10:56:29 2017 -0800 IB/SRP: Avoid using IB_MR_TYPE_SG_GAPS Tests have shown that the following error message is reported when using SG-GAPS registration with an mlx5 adapter: scsi host1: ib_srp: failed RECV status WR flushed (5) for CQE ffff880bd4270eb0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0f007806 2500002a ad9fafd1 scsi host1: ib_srp: reconnect succeeded mlx5_0:dump_cqe:262:(pid 7369): dump error cqe 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0f007806 25000032 00105dd0 scsi host1: ib_srp: failed FAST REG status memory management operation error (6) for CQE ffff880b92860138 Hence avoid using SG-GAPS memory registrations. Additionally, always configure the blk_queue_virt_boundary() to avoid to trigger a mapping failure when using adapters that support SG-GAPS (e.g. mlx5). Fixes: commit ad8e66b4a801 ("IB/srp: fix mr allocation when the device supports sg gaps") Fixes: commit 509c5f33f4f6 ("IB/srp: Prevent mapping failures") Reported-by: Laurence Oberman Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Leon Romanovsky Cc: Mark Bloch Cc: Yuval Shaia Cc: # 4.7+ Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 4cd33aafe45866860b7c72401297d1efcd7bd8aa Author: Christophe Jaillet Date: Sat Feb 18 12:28:15 2017 +0100 RDMA/qedr: Fix some error handling 'qedr_alloc_pbl_tbl()' can not return NULL. In qedr_init_user_queue(): - simplify the test for the return value, no need to test for NULL - propagate the error pointer if needed, otherwise 0 (success) is returned. This is spurious. In init_mr_info(): - test the return value with IS_ERR - propagate the error pointer if needed instead of an exlictit -ENOMEM. This is a no-op as the only error pointer that we can have here is already -ENOMEM Signed-off-by: Christophe JAILLET Acked-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e57f774db1fef3d983fd77db0f48f3f39875c65f Author: Arnd Bergmann Date: Fri Feb 17 15:40:21 2017 +0100 RDMA/bnxt_re: add DCB dependency When CONFIG_DCB is disabled, we get a link error: drivers/infiniband/built-in.o: In function `bnxt_re_setup_qos': trace.c:(.text+0x155774): undefined reference to `dcb_ieee_getapp_mask' trace.c:(.text+0x155774): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dcb_ieee_getapp_mask' trace.c:(.text+0x155794): undefined reference to `dcb_ieee_getapp_mask' trace.c:(.text+0x155794): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dcb_ieee_getapp_mask' Like the other drivers that use this function, a Kconfig dependency is the correct fix. Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ecc16c82c068885cef5697d2f056a8fc317cf45 Author: Arnd Bergmann Date: Fri Feb 17 15:38:26 2017 +0100 IB/hns: include linux/module.h I ran into a build error on arm64 randconfig testing: infiniband/hw/hns/hns_roce_main.c:539:1: error: data definition has no type or storage class [-Werror] infiniband/hw/hns/hns_roce_main.c:539:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int] infiniband/hw/hns/hns_roce_main.c:539:1: error: parameter names (without types) in function declaration [-Werror] infiniband/hw/hns/hns_roce_main.c:979:226: error: data definition has no type or storage class [-Werror] infiniband/hw/hns/hns_roce_main.c:979:226: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] infiniband/hw/hns/hns_roce_main.c:979:1: error: parameter names (without types) in function declaration [-Werror] Including the module.h makes it build again. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 1 + 1 file changed, 1 insertion(+) commit c67294b70b5aafa2769e8c677a044243ce974c3a Author: Yuval Shaia Date: Thu Feb 16 14:05:05 2017 +0200 IB/vmw_pvrdma: Expose vendor error to ULPs Signed-off-by: Yuval Shaia Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bf3976d6cfd77c956484186e8bed8f4aab677ce Author: Christoph Hellwig Date: Wed Feb 15 08:47:04 2017 +0100 vmw_pvrdma: switch to pci_alloc_irq_vectors .. and greatly clean up the irq handling boilerplate code. Signed-off-by: Christoph Hellwig Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 8 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 6 - drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 162 +++++----------------- 3 files changed, 34 insertions(+), 142 deletions(-) commit 64b2ae74e83c0294f66ab8db9c99c274fa1a5f1a Author: Arnd Bergmann Date: Tue Feb 14 22:23:07 2017 +0100 IB/hfi1: use size_t for passing array length gcc-7 produces a mysterious warning about the size argument being potentially out of range: drivers/infiniband/hw/hfi1/verbs.c: In function 'init_cntr_names': drivers/infiniband/hw/hfi1/verbs.c:1644:2: error: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] This seems to refer to a the case where an 64-bit size_t gets truncated into a negative 'int' and subsequently turned into a high 64-bit number again. The fix is clearly to use size_t here, which matches the type that gets used for this value elsewhere. Fixes: b7481944b06e ("IB/hfi1: Show statistics counters under IB stats interface") Signed-off-by: Arnd Bergmann Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23536dfaa3ef5b4e61272ea65ed6c1b15db022ec Author: Zhu Yanjun Date: Tue Feb 14 03:43:12 2017 -0500 IB/ipoib: Remove redudant label There are 2 labels to mark the same statements. Replace the 2 labels with one versatile labe. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c5e8f57b0b560b9cc9ea9166975858d023f81030 Author: Zhu Yanjun Date: Fri Feb 10 01:48:42 2017 -0500 IB/ipoib: remove the unnecessary memory free In the function ipoib_cm_nonsrq_init_rx, the memory is not allocated successfully. It is not necessary to free it. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f50cccdd03ed4b22960308a5d2499519df13ee9b Author: Christoph Hellwig Date: Thu Feb 9 16:10:58 2017 +0100 IB/mthca: switch to pci_alloc_irq_vectors Trivial switch to the new API for this driver. Signed-off-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_main.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 1bb0d7b781b1ca647f1ae69665c0ad1de09a1174 Author: Michael J. Ruhl Date: Wed Feb 8 05:28:31 2017 -0800 IB/hfi1: Code reuse with memdup_copy Update several usages of kmalloc/user_copy to memdup_copy and memdup_copy_nul. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 39 +++++++++---------------------- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 17 +++++--------- drivers/infiniband/hw/hfi1/user_sdma.c | 17 +++++++------- 3 files changed, 25 insertions(+), 48 deletions(-) commit 832666c163f04306fa6823b8974bccf7bb5e5ad3 Author: Don Hiatt Date: Wed Feb 8 05:28:25 2017 -0800 IB/hfi1, qib, rdmavt: Move AETH defines to rdma/ib_hdrs.h Rename RVT AETH defines and export in rdma/ib_hdrs.h Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 18 +++++++++--------- drivers/infiniband/hw/hfi1/ruc.c | 2 +- drivers/infiniband/hw/hfi1/trace.c | 4 ++-- drivers/infiniband/hw/qib/qib_rc.c | 18 +++++++++--------- drivers/infiniband/hw/qib/qib_ruc.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 7 ++++--- drivers/infiniband/sw/rdmavt/rc.c | 15 +++++++-------- include/rdma/ib_hdrs.h | 6 ++++++ include/rdma/rdmavt_qp.h | 5 ----- 9 files changed, 39 insertions(+), 38 deletions(-) commit 881fccb8640bdd3533f5a98a99991aae23a5106b Author: Don Hiatt Date: Wed Feb 8 05:28:19 2017 -0800 IB/hfi1: Add rvt_rnr_tbl_to_usec function Return usec from an index into ib_rvt_rnr_table. Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 11 +++++++++++ include/rdma/rdmavt_qp.h | 1 + 2 files changed, 12 insertions(+) commit db069ecb5d4dcd297628d5ebc56dd22bdbab9729 Author: Michael J. Ruhl Date: Wed Feb 8 05:28:13 2017 -0800 IB/hfi1: Do not set physical link state if DC is in the shutdown state If the DC is in shutdown state, the set link state function will return an error. Since this is not a failure in this state, make sure to only call set link state if the DC is on. Reviewed-by: Easwar Hariharan Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit c27aad00d191e8ba88fe755db53b9f2b8cefc0e9 Author: Jakub Byczkowski Date: Wed Feb 8 05:27:55 2017 -0800 IB/hfi1: Modify logging frequency of DCC errors Use rate-limit state to limit number of messages logged to kernel message buffer for DCC errors. Add new macro dd_dev_info_ratelimited for that propose. Replace all dd_dev_info calls in handle_dcc_err function with rate-limited version. Reviewed-by: Dennis Dalessandro Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 20 +++++++++++--------- drivers/infiniband/hw/hfi1/hfi.h | 4 ++++ 2 files changed, 15 insertions(+), 9 deletions(-) commit f9215b5e536b0c598dff4041fc7d6136cd599981 Author: Mike Marciniszyn Date: Wed Feb 8 05:27:49 2017 -0800 IB/rdmavt, IB/hfi1, IB/qib: Correct ack count for passive (RTR) QPs The send complete for RC QPs mismanages the ack count when the responder side is only in RTR. A QP in that state cannot send requests, but it can be the target for operations that elicit responses. Adjust the RC completion logic to correct the count maintenance by reflecting RECV_OK in a new state test. 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 | 2 +- drivers/infiniband/hw/qib/qib_rc.c | 2 +- include/rdma/rdmavt_qp.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit 3fc4a0906f9c49839f03de4b6500d82fa5b3254f Author: Brian Welty Date: Wed Feb 8 05:27:43 2017 -0800 IB/qib: Updates to use rdmavt's SGE helper routines Reviewed-by: Mike Marciniszyn Signed-off-by: Brian Welty Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_rc.c | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 4 +- drivers/infiniband/hw/qib/qib_verbs.c | 95 +++-------------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 2 - 4 files changed, 9 insertions(+), 94 deletions(-) commit 1198fcea8a7810d06069a85256d1ef9ec97d434b Author: Brian Welty Date: Wed Feb 8 05:27:37 2017 -0800 IB/hfi1, rdmavt: Move SGE state helper routines into rdmavt To improve code reuse, add small SGE state helper routines to rdmavt_mr.h. Leverage these in hfi1, including refactoring of hfi1_copy_sge. Reviewed-by: Mike Marciniszyn Signed-off-by: Brian Welty Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 - drivers/infiniband/hw/hfi1/rc.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 4 +- drivers/infiniband/hw/hfi1/verbs.c | 91 ++------------------------------------ drivers/infiniband/hw/hfi1/verbs.h | 2 - include/rdma/rdmavt_mr.h | 50 +++++++++++++++++++++ 6 files changed, 57 insertions(+), 94 deletions(-) commit 0128fceaf934dbfca4537d4eb8c3a5f7e84562c8 Author: Brian Welty Date: Wed Feb 8 05:27:31 2017 -0800 IB/hfi1, rdmavt: Update copy_sge to use boolean arguments Convert copy_sge and related SGE state functions to use boolean. For determining if QP is in user mode, add helper function in rdmavt_qp.h. This is used to determine if QP needs the last byte ordering. While here, change rvt_pd.user to a boolean. Reviewed-by: Mike Marciniszyn Reviewed-by: Dean Luick Signed-off-by: Brian Welty Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 16 ++++++++-------- drivers/infiniband/hw/hfi1/ruc.c | 10 +++++----- drivers/infiniband/hw/hfi1/uc.c | 10 +++++----- drivers/infiniband/hw/hfi1/ud.c | 12 ++++++------ drivers/infiniband/hw/hfi1/verbs.c | 21 +++++++++++---------- drivers/infiniband/hw/hfi1/verbs.h | 4 ++-- drivers/infiniband/sw/rdmavt/pd.c | 2 +- include/rdma/rdma_vt.h | 2 +- include/rdma/rdmavt_qp.h | 9 +++++++++ 9 files changed, 48 insertions(+), 38 deletions(-) commit b4238e70579cb1edf32c56ee512f84cbad01ac27 Author: Venkata Sandeep Dhanalakota Date: Wed Feb 8 05:27:25 2017 -0800 IB/qib: Use new rdmavt timers Reduce qib code footprint by using the rdmavt timers. Reviewed-by: Mike Marciniszyn Reviewed-by: Brian Welty Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 1 - drivers/infiniband/hw/qib/qib_rc.c | 94 +++++++---------------------------- drivers/infiniband/hw/qib/qib_ruc.c | 45 +---------------- drivers/infiniband/hw/qib/qib_verbs.c | 1 + drivers/infiniband/hw/qib/qib_verbs.h | 2 +- 5 files changed, 21 insertions(+), 122 deletions(-) commit 56acbbfb46d9d613858de2bffcc7dee4205682b7 Author: Venkata Sandeep Dhanalakota Date: Wed Feb 8 05:27:19 2017 -0800 IB/hfi1: Use new rdmavt timers Reduce hfi1 code footprint by using the rdmavt timers. Reviewed-by: Mike Marciniszyn Reviewed-by: Brian Welty Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 4 - drivers/infiniband/hw/hfi1/rc.c | 194 +++---------------------------------- drivers/infiniband/hw/hfi1/ruc.c | 43 +------- drivers/infiniband/hw/hfi1/verbs.c | 1 + drivers/infiniband/hw/hfi1/verbs.h | 9 +- 5 files changed, 16 insertions(+), 235 deletions(-) commit 11a10d4bc7b2640da1fce27586a617411b70f5c5 Author: Venkata Sandeep Dhanalakota Date: Wed Feb 8 05:27:13 2017 -0800 IB/rdmavt: Adding timer logic to rdmavt To move common code across target to rdmavt for code reuse. Reviewed-by: Mike Marciniszyn Reviewed-by: Brian Welty Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 183 +++++++++++++++++++++++++++++++++++++- include/rdma/rdma_vt.h | 19 ++++ include/rdma/rdmavt_qp.h | 6 ++ 3 files changed, 206 insertions(+), 2 deletions(-) commit 696513e8cf39ccb8ee8010fd2157f095b3af6a91 Author: Brian Welty Date: Wed Feb 8 05:27:07 2017 -0800 IB/hfi1, qib, rdmavt: Move AETH credit functions into rdmavt Add rvt_compute_aeth() and rvt_get_credit() as shared functions in rdmavt, moved from hfi1/qib logic. Reviewed-by: Dennis Dalessandro Signed-off-by: Brian Welty Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/common.h | 4 - drivers/infiniband/hw/hfi1/qp.c | 137 ------------------------ drivers/infiniband/hw/hfi1/qp.h | 16 --- drivers/infiniband/hw/hfi1/rc.c | 40 +++---- drivers/infiniband/hw/hfi1/trace.c | 4 +- drivers/infiniband/hw/hfi1/verbs.h | 9 -- drivers/infiniband/hw/qib/qib_common.h | 4 - drivers/infiniband/hw/qib/qib_qp.c | 134 ----------------------- drivers/infiniband/hw/qib/qib_rc.c | 40 +++---- drivers/infiniband/hw/qib/qib_verbs.h | 4 - drivers/infiniband/sw/rdmavt/Makefile | 4 +- drivers/infiniband/sw/rdmavt/rc.c | 190 +++++++++++++++++++++++++++++++++ include/rdma/rdmavt_qp.h | 31 ++++++ 13 files changed, 265 insertions(+), 352 deletions(-) commit beb5a0426794c9698c4e0349c626d819b5f3b2c7 Author: Brian Welty Date: Wed Feb 8 05:27:01 2017 -0800 IB/hfi1, qib, rdmavt: Move two IB event functions into rdmavt Add rvt_rc_error() and rvt_comm_est() as shared functions in rdmavt, moved from hfi1/qib logic. Reviewed-by: Dennis Dalessandro Signed-off-by: Brian Welty Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 13 ------------ drivers/infiniband/hw/hfi1/qp.h | 6 ------ drivers/infiniband/hw/hfi1/rc.c | 27 ++++--------------------- drivers/infiniband/hw/hfi1/ruc.c | 2 +- drivers/infiniband/hw/hfi1/uc.c | 4 ++-- drivers/infiniband/hw/hfi1/ud.c | 4 ++-- drivers/infiniband/hw/hfi1/verbs.h | 2 -- drivers/infiniband/hw/qib/qib_rc.c | 38 +++++------------------------------ drivers/infiniband/hw/qib/qib_ruc.c | 2 +- drivers/infiniband/hw/qib/qib_uc.c | 15 +++----------- drivers/infiniband/hw/qib/qib_ud.c | 4 ++-- drivers/infiniband/hw/qib/qib_verbs.h | 2 -- drivers/infiniband/sw/rdmavt/qp.c | 38 +++++++++++++++++++++++++++++++++++ include/rdma/rdmavt_qp.h | 2 ++ 14 files changed, 60 insertions(+), 99 deletions(-) commit c03c08d50b3d44cd331319b4b2882315413ee281 Author: Sebastian Sanchez Date: Wed Feb 8 05:26:55 2017 -0800 IB/hfi1: Check upper-case EFI variables The EFI variable that provides board ID is named by the PCI address of the device, which is published in upper-case, while the HFI1 driver reads the EFI variable in lower-case. This prevents returning the correct board id when queried through sysfs. Read EFI variables in upper-case if the lower-case read fails. Reviewed-by: Easwar Hariharan Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/efivar.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 76327627be1d9bd6a360b645ac7675c02a39096f Author: Sebastian Sanchez Date: Wed Feb 8 05:26:49 2017 -0800 IB/hfi1: Reduce oversized fields in struct hfi1_packet Some fields in struct hfi1_packet are oversized. Reduce them. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d7c76e91aa6c10775ea172263828c3119e4335a0 Author: Mike Marciniszyn Date: Wed Feb 8 05:26:43 2017 -0800 IB/hfi1: Add additional fields to qp_stats The r_psn and s_rnr_retry are missing. Add with this patch. 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 b448bf9a0df6093dbadac36979a55ce4e012a677 Author: Sebastian Sanchez Date: Wed Feb 8 05:26:37 2017 -0800 IB/hfi1: Allocate context data on memory node There are some memory allocation calls in hfi1_create_ctxtdata() that do not use the numa function parameter. This can cause cache lines to be filled over QPI. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 338adfdddf6abe89726e1146ad3102ce9663a634 Author: Sebastian Sanchez Date: Wed Feb 8 05:26:31 2017 -0800 IB/rdmavt: Use per-CPU reference count for MRs Having per-CPU reference count for each MR prevents cache-line bouncing across the system. Thus, it prevents bottlenecks. Use per-CPU reference counts per MR. The per-CPU reference count for FMRs is used in atomic mode to allow accurate testing of the busy state. Other MR types run in per-CPU mode MR until they're freed. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mr.c | 59 +++++++++++++++++++++++++-------------- include/rdma/rdmavt_mr.h | 10 +++---- 2 files changed, 43 insertions(+), 26 deletions(-) commit f3e862cb6894389a35d0beb10f73d62eb3317beb Author: Sebastian Sanchez Date: Wed Feb 8 05:26:25 2017 -0800 IB/hfi1: Access hfi1_ibport through rcd pointer Receive code paths use the QP's device and port number to access the struct hfi1_ibport. When an instance of struct hfi1_ctxtdata is present, it can be used to access struct hfi1_ibport through a pointer. This makes struct hfi1_ibport lookup time faster as an array doesn't have to be indexed and access fields in other cache-lines. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 4 ++-- drivers/infiniband/hw/hfi1/hfi.h | 5 +++++ drivers/infiniband/hw/hfi1/rc.c | 10 +++++----- drivers/infiniband/hw/hfi1/uc.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 4 ++-- 6 files changed, 16 insertions(+), 11 deletions(-) commit a8715b97d63718fc5c4daebc465407c259aea265 Author: Mike Marciniszyn Date: Wed Feb 8 05:26:20 2017 -0800 IB/hfi1: Correct error calldown locking The resource specific wait locking missed correcting the lock for the notify_error_qp() calldown. The code is fixed to correctly use the iowait lock field to protect the head that is protected by that lock. Fixes: Commit 4e045572e2c2 ("IB/hfi1: Add unique txwait_lock for txreq events") Reviewed-by: Sebastian Sanchez Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 39e2afa8d042a53d855137d4c5a689a6f5492b39 Author: Easwar Hariharan Date: Wed Feb 8 05:26:14 2017 -0800 IB/hfi1: Use static CTLE with Preset 6 for integrated HFIs After extended testing, it was found that the previous PCIe Gen 3 recipe, which used adaptive CTLE with Preset 4, could cause an NMI/Surprise Link Down in about 1 in 100 to 1 in 1000 power cycles on some platforms. New EV data combined with extensive empirical data indicates that the new recipe should use static CTLE with Preset 6 for all integrated silicon SKUs. Fixes: c3f8de0b334c ("IB/hfi1: Add static PCIe Gen3 CTLE tuning") Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb04ff09d834c1a531d02ee0b3e4b503253df609 Author: Mike Marciniszyn Date: Wed Feb 8 05:26:08 2017 -0800 IB/hfi1: Ensure read of producer s_head is correct The read of s_head in the hfi1_make_rc_req() and qib_make_rc_req() lack the necesary barrier instuctions. Correct other ACCESS_ONCE() warnings in the same file. Reviewed-by: Ashutosh Dixit Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 7 ++++--- drivers/infiniband/hw/qib/qib_rc.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit a82a7fcd1f23497a97df237829622dfdfacf24fe Author: Mike Marciniszyn Date: Wed Feb 8 05:26:02 2017 -0800 IB/hfi1: Process qp wait list in IRQ thread periodically In the event that the IRQ thread is extremely busy, the processing of an rcd wait list can be delayed by quite a bit until the IRQ thread completes its work. The QP reset reference count wait can then appear to be stuck, thus causing up a QP destroy to emit the hung task diagnostic. Fix by processing the qp wait list periodically from the thread. The interval is a multiple (currently 4) of the MAX_PKT_RECV. Also, reduce some of the excessive inlining. The guidelines are per packet is ok inline, otherwise the choice is based on likelyhood of execution. Reviewed-by: Sebastian Sanchez Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 121 ++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 54 deletions(-) commit 4fcf1de5a79bfe8ee4c638bd3902d20cd59376de Author: Mike Marciniszyn Date: Wed Feb 8 05:25:56 2017 -0800 IB/hfi1: Correct defered count after processing qp_wait_list The qp_wait_list processing leaves the defered ack count at its prior value. This can result in a premature send of an ack. Fixed by unconditionally reseting the defered ack count in hfi1_send_rc_ack(). Fixes: Commit 7c091e5c0685 ("staging/rdma/hfi1: add ACK coalescing logic") Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8d8a47338089d96093fa5fb8a686d9faefce04a1 Author: Wei Yongjun Date: Tue Feb 7 15:15:10 2017 +0000 IB/rxe: use setup_timer to simplify the code Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Wei Yongjun Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_qp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 32f8e839edebe3310dd077439ce0e9a96e0c2352 Author: Max Gurtovoy Date: Thu Feb 2 01:55:18 2017 +0200 IB/iser: Protect completion context active_qps update As iser connections can share completion contexts, we need to protect the active_qps update each time we set it. Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iser_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 192539f4ce36e5b80b9eb1f4ccd759a92eed2ff9 Author: Ganesh Goudar Date: Tue Jan 31 12:00:09 2017 +0530 iw_cxgb4: clean up send_connect() Clean up send_connect() and make use of t6 specific active open request struct. Acked-by: Steve Wise Signed-off-by: Bharat Teja Signed-off-by: Ganesh Goudar Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 56 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 20 deletions(-) commit 6dd7abae7110da6fa01f048baf5b679b5a4a56dd Merge: 6df6b4a 646ebd4 Author: Doug Ledford Date: Sun Feb 19 09:18:21 2017 -0500 Merge branch 'k.o/for-4.10-rc' into HEAD commit 3900dea4cda7c28d7921370bc4d22b08463ed94c Author: Christophe JAILLET Date: Sat Feb 18 09:34:34 2017 +0100 irqchip/qcom: Fix error handling 'devm_ioremap()' returns NULL on error, not an error pointer. Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Christophe JAILLET Cc: marc.zyngier@arm.com Cc: kernel-janitors@vger.kernel.org Cc: jason@lakedaemon.net Link: http://lkml.kernel.org/r/20170218083434.2289-1-christophe.jaillet@wanadoo.fr Signed-off-by: Thomas Gleixner drivers/irqchip/qcom-irq-combiner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 762b6f00a995863afa274d6b5ffa3880dac1714b Author: Dmitry V. Levin Date: Wed Feb 15 23:04:54 2017 +0300 uapi: fix linux/target_core_user.h userspace compilation errors Consistently use types from linux/types.h to fix the following linux/target_core_user.h userspace compilation errors: /usr/include/linux/target_core_user.h:108:4: error: unknown type name 'uint32_t' uint32_t iov_cnt; /usr/include/linux/target_core_user.h:109:4: error: unknown type name 'uint32_t' uint32_t iov_bidi_cnt; /usr/include/linux/target_core_user.h:110:4: error: unknown type name 'uint32_t' uint32_t iov_dif_cnt; /usr/include/linux/target_core_user.h:111:4: error: unknown type name 'uint64_t' uint64_t cdb_off; /usr/include/linux/target_core_user.h:112:4: error: unknown type name 'uint64_t' uint64_t __pad1; /usr/include/linux/target_core_user.h:113:4: error: unknown type name 'uint64_t' uint64_t __pad2; /usr/include/linux/target_core_user.h:117:4: error: unknown type name 'uint8_t' uint8_t scsi_status; /usr/include/linux/target_core_user.h:118:4: error: unknown type name 'uint8_t' uint8_t __pad1; /usr/include/linux/target_core_user.h:119:4: error: unknown type name 'uint16_t' uint16_t __pad2; /usr/include/linux/target_core_user.h:120:4: error: unknown type name 'uint32_t' uint32_t __pad3; Signed-off-by: Dmitry V. Levin Signed-off-by: Nicholas Bellinger include/uapi/linux/target_core_user.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0ab8ac6f504d61b59856bd34e62bbfd60edd2bb0 Author: Mike Christie Date: Fri Jan 13 04:47:48 2017 -0600 target: export protocol identifier I think the transport statistics device file was supposed to show scsiTransportProtocolType. It instead shows the fabric name which is normally closer to the driver name. I was thinking I cannot change from fabric name to protocol type name incase people are expecting the driver name, so this patch adds another file proto_id that exports the SCSI protocol identifier ID. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_stat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6cb3216a7863fd13fb125f0867fce55c2bbd8c8e Author: Quinn Tran Date: Mon Feb 13 12:18:29 2017 -0800 qla2xxx: Fix a warning reported by the "smatch" static checker Fix the following warning reported by the "smatch" static checker: drivers/scsi/qla2xxx/qla_init.c:3910 qla2x00_alloc_fcport() warn: use 'flags' here instead of GFP_XXX? Reported-by: Dan Carpenter Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Cc: Dan Carpenter Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d65491c269729a1e3b375c45e73213f49103d33 Author: Varun Prakash Date: Fri Jan 20 16:44:33 2017 +0530 target/iscsi: Fix unsolicited data seq_end_offset calculation In case of unsolicited data for the first sequence seq_end_offset must be set to minimum of total data length and FirstBurstLength, so do not add cmd->write_data_done to the min of total data length and FirstBurstLength. This patch avoids that with ImmediateData=Yes, InitialR2T=No, MaxXmitDataSegmentLength < FirstBurstLength that a WRITE command with IO size above FirstBurstLength triggers sequence error messages, for example Set following parameters on target (linux-4.8.12) ImmediateData = Yes InitialR2T = No MaxXmitDataSegmentLength = 8k FirstBurstLength = 64k Log in from Open iSCSI initiator and execute dd if=/dev/zero of=/dev/sdb bs=128k count=1 oflag=direct Error messages on target Command ITT: 0x00000035 with Offset: 65536, Length: 8192 outside of Sequence 73728:131072 while DataSequenceInOrder=Yes. Command ITT: 0x00000035, received DataSN: 0x00000001 higher than expected 0x00000000. Unable to perform within-command recovery while ERL=0. Signed-off-by: Varun Prakash [ bvanassche: Use min() instead of open-coding it / edited patch description ] Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_erl0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 79e57cfe00f40d509e2d007a5662db26cdbc74db Author: Varun Prakash Date: Fri Jan 13 20:53:25 2017 +0530 target/cxgbit: add T6 iSCSI DDP completion feature Chelsio T6 adapters reduce number of completion to host by generating single completion for all directly placed(DDP) iSCSI pdus in a sequence, completion contains iSCSI hdr of the last pdu in a sequence. On receiving DDP completion cxgbit driver finds iSCSI cmd using iscsit_find_cmd_from_itt_or_dump(), then updates cmd->write_data_done, cmd->next_burst_len, cmd->data_sn and calls __iscsit_check_dataout_hdr() to validate iSCSI hdr. (Update __iscsit_check_dataout_hdr parameter usage - nab) Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_cm.c | 3 ++ drivers/target/iscsi/cxgbit/cxgbit_lro.h | 5 +- drivers/target/iscsi/cxgbit/cxgbit_main.c | 67 +++++++++++++++++------- drivers/target/iscsi/cxgbit/cxgbit_target.c | 81 +++++++++++++++++++++-------- 4 files changed, 113 insertions(+), 43 deletions(-) commit 5248788ec300f7ee738502bfc466dbb9b625247e Author: Varun Prakash Date: Fri Jan 13 20:53:24 2017 +0530 target/cxgbit: Enable DDP for T6 only if data sequence and pdu are in order Enable DDP for T6 only if DataSequenceInOrder=YES and DataPDUInOrder=YES to ensure inorder delivery of iSCSI pdus. Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_target.c | 86 ++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 25 deletions(-) commit d88b504e413e7d1471562ff9c3311dbf983e0291 Author: Varun Prakash Date: Fri Jan 13 20:53:23 2017 +0530 target/cxgbit: Use T6 specific macros to get ETH/IP hdr len Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_cm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3da1110fd1ac3e11208f12c966c6de7a2c306b9d Author: Varun Prakash Date: Fri Jan 13 20:53:22 2017 +0530 target/cxgbit: use cxgb4_tp_smt_idx() to get smt idx cxgb4_tp_smt_idx() returns smt idx for T4,T5,T6 adapters. Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_cm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9a584bf9bf0a1c608f5ed5f5e63b074bbc81a322 Author: Varun Prakash Date: Fri Jan 13 20:53:21 2017 +0530 target/iscsi: split iscsit_check_dataout_hdr() Split iscsit_check_dataout_hdr() into two functions 1. __iscsit_check_dataout_hdr() - This function validates data out hdr. 2. iscsit_check_dataout_hdr() - This function finds iSCSI cmd using iscsit_find_cmd_from_itt_or_dump(), then it calls __iscsit_check_dataout_hdr() to validate iSCSI hdr. This split is required to support Chelsio T6 iSCSI DDP completion feature. T6 adapters reduce number of completions to host by generating single completion for all directly placed(DDP) iSCSI pdus in a sequence, DDP completion contains iSCSI hdr of the last pdu in a sequence. On receiving DDP completion cxgbit driver will first find iSCSI cmd using iscsit_find_cmd_from_itt_or_dump() then updates cmd->write_data_done, cmd->next_burst_len, cmd->data_sn and calls __iscsit_check_dataout_hdr() to validate iSCSI hdr. (Move XRDSL check ahead of itt lookup / dump - nab) Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 65 ++++++++++++++++++++------------ drivers/target/iscsi/iscsi_target_util.c | 1 + include/target/iscsi/iscsi_transport.h | 11 +++++- 3 files changed, 50 insertions(+), 27 deletions(-) commit 83a0c6e589017ce737720b9e05e2fa3fe4f7b860 Author: Benjamin Poirier Date: Thu Jan 12 17:04:14 2017 -0800 i40e: Invoke softirqs after napi_reschedule The following message is logged from time to time when using i40e: NOHZ: local_softirq_pending 08 i40e may schedule napi from a workqueue. Afterwards, softirqs are not run in a deterministic time frame. The problem is the same as what was described in commit ec13ee80145c ("virtio_net: invoke softirqs after __napi_schedule") and this patch applies the same fix to i40e. Signed-off-by: Benjamin Poirier Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 1 file changed, 2 insertions(+) commit ee847d935156b041679ad82c269796dae1afaa6b Author: Carolyn Wyborny Date: Wed Dec 21 18:04:47 2016 -0500 i40e: remove duplicate device id from PCI table Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - 1 file changed, 1 deletion(-) commit b9c015d421946fe3675fcb9cbacd0a37f1d3263c Author: Jacob Keller Date: Mon Dec 12 15:44:17 2016 -0800 i40e: mark the value passed to csum_replace_by_diff as __wsum Fix, or rather, avoid a sparse warning caused by the fact that csum_replace_by_diff expects to receive a __wsum value. Since the calculation appears to work, simply typecast the passed paylen value to __wsum to avoid the warning. This seems pretty fishy since __wsum was obviously annotated as a separate type on purpose, so this throws the entire calculation into question. Since it currently appears to behave as expected, the typecast is probably safe. Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 5 +++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit ae13670824d5adadc95a881ebfaa6fa8735218f0 Author: Harshitha Ramamurthy Date: Mon Dec 12 15:44:16 2016 -0800 i40e: Error handling for link event There exists an intermittent bug which causes the 'Link Detected' field reported by the 'ethtool ' command to be 'Yes' when in fact, there is no link. This patch fixes the problem by enabling temporary link polling when i40e_get_link_status returns an error. This causes the driver to remember that an admin queue command failed and polls, until the function returns with a success. Change-Id: I64c69b008db4017b8729f3fc27b8f65c8fe2eaa0 Signed-off-by: Harshitha Ramamurthy 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 | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 5cb259016b4258d7ac53588a01d17da1ceda84b7 Author: Jacob Keller Date: Mon Dec 12 15:44:15 2016 -0800 i40e: properly convert le16 value to CPU format This ensures that the pvid which is stored in __le16 format is converted to the CPU format. This will fix comparison issues on Big Endian platforms. Change-ID: I92c80d1315dc2a0f9f095d5a0c48d461beb052ed Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2ae0bf501425cbddc8b992a2b65fc04d911cae8c Author: Jacob Keller Date: Mon Dec 12 15:44:14 2016 -0800 i40e: convert to cpu from le16 to generate switch_id correctly On Big Endian platforms we would incorrectly calculate the wrong switch id since we did not properly convert the le16 value into CPU format. Caught by sparse. Change-ID: I69a2f9fa064a0a91691f7d0e6fcc206adceb8e36 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 773d4023badee2e196f4125a94fe9d5a739720a0 Author: Alan Brady Date: Mon Dec 12 15:44:13 2016 -0800 i40e: refactor AQ CMD buffer debug printing This patch refactors the '%*ph' printk format specifier to instead use the print_hex_dump function, as recommended by the '%*ph' documentation. This produces better/more standardized output. Change-ID: Id56700b4e8abc40ff8c04bc8379e7df04cb4d6fd Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 19 ++++++++++++------- drivers/net/ethernet/intel/i40evf/i40e_common.c | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) commit 3c234c4709529298498b597bcff35f56ac866a99 Author: Carolyn Wyborny Date: Mon Dec 12 15:44:12 2016 -0800 i40e: Fix Adaptive ITR enabling This patch fixes a bug introduced with the addition of the per queue ITR feature support in ethtool. With that addition, there were functions added which converted the ITR settings to binary values. The IS_ENABLED macros that run on those values check whether a bit is set or not and with the value being binary, the bit check always returned ITR disabled which prevents any updating of the ITR rate. This patch fixes the problem by changing the functions to return the current ITR value instead and renaming it to better reflect its function. These functions now provide a value which will be accurately asessed and update the ITR as intended. Change-ID: I14f1d088d052e27f652aaa3113e186415ddea1fc Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 ++++++------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 51f38262669b88b6f5ec52cb93dc72c58d85dc1f Author: Mitch Williams Date: Mon Dec 12 15:44:11 2016 -0800 i40evf: add comment Add a comment to reduce confusion. Change-ID: I3d5819c0f3f5174680442ae54398a073d4a61f4f Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8a68badd12a8b708a02d54cd5aac4d07851a6d5a Author: Mitch Williams Date: Mon Dec 12 15:44:10 2016 -0800 i40evf: free rings in remove function When the i40evf_remove() calls netdev close, the device doesn't actually close - it schedules the work for the watchdog to perform. Since we're stopping the watchdog, this work doesn't get done. However, we're resetting the part, so we can free resources after the reset request has gone through. This plugs a memory leak. Change-ID: Id5335dcaf76ce00d2a4c3d26e9faf711d7f051cf Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03aa268b146127361c206fe3942add2adf6ce1d7 Author: Jacob Keller Date: Mon Dec 12 15:44:09 2016 -0800 i40e: remove unnecessary call to i40e_update_link_info This call is made just prior to running i40e_link_event. In i40e_link_event, we set hw->phy.get_link_info to true just prior to calling i40e_get_link_status, which conveniently runs i40e_update_link_info for us. Thus, we are running i40e_update_link_info twice, which seems like something we don't need to do... Change-ID: I36467a570f44b7546d218c99e134ff97c2709315 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - 1 file changed, 1 deletion(-) commit 1d68005db4e72082f3e537d6c0cf831a71a7e2ee Author: Joshua Hay Date: Mon Dec 12 15:44:08 2016 -0800 i40e: enable mc magic pkt wakeup during power down This patch adds a call to the mac_address_write admin q function during power down to update the PRTPM_SAH/SAL registers with the MC_MAG_EN bit thus enabling multicast magic packet wakeup. A FW workaround is needed to write the multicast magic wake up enable bit in the PRTPM_SAH register. The FW expects the mac address write admin q cmd to be called first with one of the WRITE_TYPE_LAA flags and then with the multicast relevant flags. *Note: This solution only works for X722 devices currently. A PFR will clear the previously mentioned bit by default, but X722 has support for a WOL_PRESERVE_ON_PFR flag which prevents the bit from being cleared. Once other devices support this flag, this solution should work as well. Change-ID: I51bd5b8535bd9051c2676e27c999c1657f786827 Signed-off-by: Joshua Hay Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 74 ++++++++++++++++++++--- 3 files changed, 67 insertions(+), 10 deletions(-) commit a410c821c0cf50bc0b73a91435852cd04b2c7acd Author: Alan Brady Date: Mon Dec 12 15:44:07 2016 -0800 i40e: fix disable overflow promiscuous mode There exists a bug in which the driver is unable to exit overflow promiscuous mode after having added "too many" mac filters. It is expected that after triggering overflow promiscuous, removing the failed/extra filters should then disable overflow promiscuous mode. The bug exists because we were intentionally skipping the sync_vsi_filter path in cases where we were removing failed filters since they shouldn't have been added to the firmware in the first place, however we still need to go through the sync_vsi_filter code path to determine whether or not it is ok to exit overflow promiscuous mode. This patch fixes the bug by making sure we go through the sync_vsi_filter path in cases of failed filters. Change-ID: I634d249ca3e5fa50729553137c295e73e7722143 Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit eec11535ca3d3e2daa2c8f59fa8ce1963db98abd Author: Dan Carpenter Date: Wed Jan 18 14:13:20 2017 +0300 hfs: fix hfs_readdir() I was looking through static analysis warnings and there is a bug here that goes all the way back to the start of git. Basically we're copying the pointer and nearby garbage instead of the data the fd.key pointer is pointing to. Signed-off-by: Dan Carpenter Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Al Viro fs/hfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8826e506ee58873725ec3a25a2a27fefd762574 Author: Al Viro Date: Sat Feb 18 22:07:24 2017 -0500 selftest for default_file_splice_read() infoleak bug fixed in commit b9dc6f65bc5e ("fix a fencepost error in pipe_advance()") Signed-off-by: Al Viro tools/testing/selftests/Makefile | 1 + tools/testing/selftests/splice/Makefile | 8 ++++++++ tools/testing/selftests/splice/default_file_splice_read.c | 8 ++++++++ tools/testing/selftests/splice/default_file_splice_read.sh | 7 +++++++ 4 files changed, 24 insertions(+) commit 992edf395b8a8411c506f4345bc04451eba95976 Author: Vivek Gautam Date: Wed Dec 28 14:16:45 2016 +0530 thermal: mtk_thermal: Staticise a number of data variables Sparse throws following warnings: drivers/thermal/mtk_thermal.c:186:11: warning: symbol 'mt8173_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:193:11: warning: symbol 'mt8173_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:197:11: warning: symbol 'mt8173_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:201:11: warning: symbol 'mt8173_mux_values' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:204:11: warning: symbol 'mt2701_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:208:11: warning: symbol 'mt2701_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:212:11: warning: symbol 'mt2701_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:216:11: warning: symbol 'mt2701_mux_values' was not declared. Should it be static? Make these variables as static to fix these warnings. Signed-off-by: Vivek Gautam Signed-off-by: Eduardo Valentin drivers/thermal/mtk_thermal.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 13d00b6439f1cf570ef962cf141bb3e329997265 Author: Keerthy Date: Fri Jan 6 11:31:43 2017 +0530 thermal: arm: dra752: Remove all TSHUT related definitions No configuration needs to be done for TSHUT from software. Hence remove all the unnecessary definitions. Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/dra752-bandgap.h | 19 ---------------- .../thermal/ti-soc-thermal/dra752-thermal-data.c | 25 ---------------------- 2 files changed, 44 deletions(-) commit 96234d44ce3dc598de06b9d7431db9d186dd0d11 Author: Keerthy Date: Fri Jan 6 11:31:42 2017 +0530 thermal: arm: dra752: Remove TSHUT configuration Technical Reference Manual [1] mandates that software should not be configuring the thermal shutdown thresholds. Hence removing TSHUT_CONFIG. [1] http://www.ti.com/lit/ug/sprui30b/sprui30b.pdf Signed-off-by: Keerthy Reported-by: Ravikumar Kattekola Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/dra752-thermal-data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 173a31271253d6ecb5358b72fa26a47e78db3e14 Author: Keerthy Date: Mon Jan 16 15:43:02 2017 +0530 thermal: ti-soc-thermal: Remove CPU_THERMAL Dependency from TI_THERMAL Currently when CPU_THERMAL is not defined the thermal sensors are not even exposed consequently no cooling is possible. CPU_THERMAL eventually depends on CPUFREQ. CPPUFREQ is not the only cooling for CPU. The thermal shutdown for critical temperatures is another cooling solution which will currently not get enabled if CPU_THERMAL is not defined. Remove this dependency so as to have the last level of thermal protection working even without CPUFREQ defined. Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 8b051ec37c93b28e1f1cac4c9677ff88e56930ff Author: Shailendra Verma Date: Mon Jan 30 10:34:58 2017 +0530 thermal: imx: Fix possible NULL dereference. of_device_get_match_data could return NULL, and so can cause a NULL pointer dereference later. Signed-off-by: Shailendra Verma Signed-off-by: Eduardo Valentin drivers/thermal/imx_thermal.c | 4 ++++ 1 file changed, 4 insertions(+) commit ef9b36d9101eb2d5827699a4e969c719fb8812c0 Author: Krzysztof Kozlowski Date: Sat Feb 11 22:12:00 2017 +0200 thermal: exynos: Remove parsing unused samsung,tmu_cal_mode property The property samsung,tmu_cal_mode is not used and not used. We can safely remove it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 1 - drivers/thermal/samsung/exynos_tmu.h | 1 - 2 files changed, 2 deletions(-) commit 50fdd36f336a03b9486f1cd4b0d85fcb361baf60 Author: Baoyou Xie Date: Tue Feb 7 08:56:41 2017 +0800 thermal: zx2967: add thermal driver for ZTE's zx2967 family This patch adds thermal driver for ZTE's zx2967 family. Signed-off-by: Baoyou Xie Reviewed-by: Mathieu Poirier Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 8 ++ drivers/thermal/Makefile | 1 + drivers/thermal/zx2967_thermal.c | 258 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 267 insertions(+) commit 8f91566f99fab8f7a0d2728a1e3defb13675837a Author: Colin Ian King Date: Sat Feb 18 22:52:55 2017 +0000 btmrvl: fix spelling mistake: "actived" -> "activated" trivial fix to spelling mistake in error message Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e059a465cc79c510003a23b72e39d4a85bdfa00f Author: Colin Ian King Date: Fri Feb 17 19:58:10 2017 +0000 Bluetooth: hci_qca: fix spelling mistake: "Spurrious" -> "Spurious" trivial fix to spelling mistake in error message Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f47e6cbf58d10392a2158b0e33ef72ad681e40f Author: Noralf Trønnes Date: Sun Jan 22 15:23:48 2017 +0100 drm/tinydrm: Add support for Multi-Inno MI0283QT display Add driver to support the Multi-Inno MI0283QT display panel. It has an ILI9341 MIPI DBI compatible display controller. Signed-off-by: Noralf Trønnes Acked-by: Thierry Reding MAINTAINERS | 6 + drivers/gpu/drm/tinydrm/Kconfig | 8 ++ drivers/gpu/drm/tinydrm/Makefile | 3 + drivers/gpu/drm/tinydrm/mi0283qt.c | 279 +++++++++++++++++++++++++++++++++++++ include/drm/tinydrm/ili9341.h | 54 +++++++ 5 files changed, 350 insertions(+) commit 6b4e48b5a99c7fdc6886c4296798922f2545b7cb Author: Noralf Trønnes Date: Sun Jan 22 15:02:26 2017 +0100 dt-bindings: Add Multi-Inno MI0283QT binding Add device-tree binding documentation for the MI0283QT display panel. Signed-off-by: Noralf Trønnes Acked-by: Rob Herring .../bindings/display/multi-inno,mi0283qt.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b60c1be747418a07fbe04f8533394a64b27b6181 Author: Noralf Trønnes Date: Tue Jan 31 16:05:57 2017 +0100 dt-bindings: display/panel: Add common rotation property Display panels can be oriented many ways, especially in the embedded world. The rotation property is a way to describe this orientation. The counter clockwise direction is chosen because that's what fbdev and drm use. Signed-off-by: Noralf Trønnes Acked-by: Thierry Reding Acked-by: Rob Herring Documentation/devicetree/bindings/display/panel/panel.txt | 4 ++++ 1 file changed, 4 insertions(+) commit fbaa326df32c68dc46fb91d909ff736364910484 Author: Noralf Trønnes Date: Sun Jan 22 14:58:49 2017 +0100 of: Add vendor prefix for Multi-Inno Multi-Inno Technology Co.,Ltd is a Hong Kong based company offering LCD, LCD module products and complete panel solutions. Signed-off-by: Noralf Trønnes Acked-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 02dd95fe316936269a52d6ccb971bb956412b40a Author: Noralf Trønnes Date: Sun Jan 22 00:30:47 2017 +0100 drm/tinydrm: Add MIPI DBI support Add support for MIPI DBI compatible controllers. Interface type C option 1 and 3 are supported (SPI). Signed-off-by: Noralf Trønnes Acked-by: Thierry Reding Documentation/gpu/tinydrm.rst | 12 + drivers/gpu/drm/tinydrm/Kconfig | 3 + drivers/gpu/drm/tinydrm/Makefile | 3 + drivers/gpu/drm/tinydrm/mipi-dbi.c | 1005 ++++++++++++++++++++++++++++++++++++ include/drm/tinydrm/mipi-dbi.h | 107 ++++ 5 files changed, 1130 insertions(+) commit 9f69eb5c36a644571cca6b2f8dc5f6a7cba04a8b Author: Noralf Trønnes Date: Sun Jan 22 00:19:51 2017 +0100 drm/tinydrm: Add helper functions Add common functionality needed by many tinydrm drivers. Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Acked-by: Thierry Reding Documentation/gpu/tinydrm.rst | 9 + drivers/gpu/drm/tinydrm/Kconfig | 2 + drivers/gpu/drm/tinydrm/core/Makefile | 2 +- drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 460 +++++++++++++++++++++++++ include/drm/tinydrm/tinydrm-helpers.h | 100 ++++++ 5 files changed, 572 insertions(+), 1 deletion(-) commit fa201ac2c61f51d9abdaffdf994d5780dcb51703 Author: Noralf Trønnes Date: Sun Jan 22 00:15:00 2017 +0100 drm: Add DRM support for tiny LCD displays tinydrm provides helpers for very simple displays that can use CMA backed framebuffers and need flushing on changes. Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Acked-by: Thierry Reding Documentation/gpu/index.rst | 1 + Documentation/gpu/tinydrm.rst | 21 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/tinydrm/Kconfig | 8 + drivers/gpu/drm/tinydrm/Makefile | 1 + drivers/gpu/drm/tinydrm/core/Makefile | 3 + drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 376 ++++++++++++++++++++++++++++ drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 234 +++++++++++++++++ include/drm/tinydrm/tinydrm.h | 115 +++++++++ 10 files changed, 762 insertions(+) commit 6c8f9ad566ddc63da5da84c3c9e6c1bb0434c64f Merge: d11914b 75b8247 Author: Michael Ellerman Date: Sat Feb 18 21:37:14 2017 +1100 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Highlights include 8xx breakpoints and perf, t1042rdb display support, and board updates." commit 336a9cde10d641e70bac67d90ae91b3190c3edca Author: Marc Zyngier Date: Fri Jan 15 17:41:09 2016 +0000 hrtimer: Catch invalid clockids again commit 82e88ff1ea94 ("hrtimer: Revert CLOCK_MONOTONIC_RAW support") removed unfortunately a sanity check in the hrtimer code which was part of that MONOTONIC_RAW patch series. It would have caught the bogus usage of CLOCK_MONOTONIC_RAW in the wireless code. So bring it back. It is way too easy to take any random clockid and feed it to the hrtimer subsystem. At best, it gets mapped to a monotonic base, but it would be better to just catch illegal values as early as possible. Detect invalid clockids, map them to CLOCK_MONOTONIC and emit a warning. [ tglx: Replaced the BUG by a WARN and gracefully map to CLOCK_MONOTONIC ] Signed-off-by: Marc Zyngier Cc: Tomasz Nowicki Cc: Christoffer Dall Link: http://lkml.kernel.org/r/1452879670-16133-3-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner kernel/time/hrtimer.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 8d242e932fb7660c24b3a534197e69c241067e0d Author: Christoph Hellwig Date: Fri Feb 17 08:21:15 2017 -0800 xfs: remove XFS_ALLOCTYPE_ANY_AG and XFS_ALLOCTYPE_START_AG XFS_ALLOCTYPE_ANY_AG was only used for the RT allocator and is unused now, and XFS_ALLOCTYPE_START_AG has been unused for a while. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 16 ++-------------- fs/xfs/libxfs/xfs_alloc.h | 4 ---- 2 files changed, 2 insertions(+), 18 deletions(-) commit d11914b21c4c21a294fe8937d66c1a192caa3cad Author: Nicholas Piggin Date: Wed Jan 4 04:58:28 2017 +1000 powerpc/64: Implement clear_bit_unlock_is_negative_byte() Commit b91e1302ad9b8 ("mm: optimize PageWaiters bit use for unlock_page()") added a special bitop function to speed up unlock_page(). Implement this for 64-bit powerpc. This improves the unlock_page() core code from this: li 9,1 lwsync 1: ldarx 10,0,3,0 andc 10,10,9 stdcx. 10,0,3 bne- 1b ori 2,2,0 ld 9,0(3) andi. 10,9,0x80 beqlr li 4,0 b wake_up_page_bit To this: li 10,1 lwsync 1: ldarx 9,0,3,0 andc 9,9,10 stdcx. 9,0,3 bne- 1b andi. 10,9,0x80 beqlr li 4,0 b wake_up_page_bit In a test of elapsed time for dd writing into 16GB of already-dirty pagecache on a POWER8 with 4K pages, which has one unlock_page per 4kB this patch reduced overhead by 1.1%: N Min Max Median Avg Stddev x 19 2.578 2.619 2.594 2.595 0.011 + 19 2.552 2.592 2.564 2.565 0.008 Difference at 95.0% confidence -0.030 +/- 0.006 -1.142% +/- 0.243% Signed-off-by: Nicholas Piggin [mpe: Made 64-bit only until I can test it properly on 32-bit] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit bcd3bb63dbc87a3bbb21e95a09cd26bb6479c332 Author: Paul Mackerras Date: Sat Feb 18 08:30:44 2017 +1100 KVM: PPC: Book3S HV: Disable HPT resizing on POWER9 for now The new HPT resizing code added in commit b5baa6877315 ("KVM: PPC: Book3S HV: KVM-HV HPT resizing implementation", 2016-12-20) doesn't have code to handle the new HPTE format which POWER9 uses. Thus it would be best not to advertise it to userspace on POWER9 systems until it works properly. Also, since resize_hpt_rehash_hpte() contains BUG_ON() calls that could be hit on POWER9, let's prevent it from being called on POWER9 for now. Acked-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 ++++++ arch/powerpc/kvm/powerpc.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 20bb5505e96f00a997fa78cf60d6d9156b19d435 Author: Markus Mayer Date: Fri Feb 17 12:27:03 2017 -0800 MAINTAINERS: cpufreq: add bmips-cpufreq.c Add maintainer information for bmips-cpufreq.c. Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Signed-off-by: Rafael J. Wysocki MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit e84b4a84e52d4cd8770b4242cd09df0133333f63 Author: John Keeping Date: Thu Feb 16 17:21:50 2017 +0000 PM / QoS: Fix memory leak on resume_latency.notifiers Since commit 2d984ad132a8 (PM / QoS: Introcuce latency tolerance device PM QoS type) we reassign "c" to point at qos->latency_tolerance before freeing c->notifiers, but the notifiers field of latency_tolerance is never used. Restore the original behaviour of freeing the notifiers pointer on qos->resume_latency, which is used, and fix the following kmemleak warning. unreferenced object 0xed9dba00 (size 64): comm "kworker/0:1", pid 36, jiffies 4294670128 (age 15202.983s) hex dump (first 32 bytes): 00 00 00 00 04 ba 9d ed 04 ba 9d ed 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x74/0xb8 [] kmem_cache_alloc_trace+0x170/0x25c [] dev_pm_qos_constraints_allocate+0x3c/0xe4 [] __dev_pm_qos_add_request+0x84/0x1a0 [] dev_pm_qos_add_request+0x3c/0x54 [] usb_hub_create_port_device+0x110/0x2b8 [] hub_probe+0xadc/0xc80 [] usb_probe_interface+0x1b4/0x260 [] driver_probe_device+0x198/0x40c [] __device_attach_driver+0x8c/0x98 [] bus_for_each_drv+0x8c/0x9c [] __device_attach+0x98/0x138 [] device_initial_probe+0x14/0x18 [] bus_probe_device+0x30/0x88 [] device_add+0x430/0x554 [] usb_set_configuration+0x660/0x6fc Fixes: 2d984ad132a8 (PM / QoS: Introcuce latency tolerance device PM QoS type) Signed-off-by: John Keeping Signed-off-by: Rafael J. Wysocki drivers/base/power/qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00bb3998829783157ccf1343abcccd38a604bc64 Author: Geert Uytterhoeven Date: Fri Feb 17 16:36:39 2017 +0100 PM / Documentation: Spelling s/wrtie/write/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki Documentation/power/states.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cff66791a6bfc8fb98f93e4e7c13fd06afecf7a Author: Geert Uytterhoeven Date: Fri Feb 17 14:18:44 2017 +0100 PM / sleep: Fix test_suspend after sleep state rework When passing "test_suspend=mem" to the kernel: PM: can't test 'mem' suspend state and the suspend test is not run. Commit 406e79385f3223d8 ("PM / sleep: System sleep state selection interface rework") changed pm_labels[] from a contiguous NULL-terminated array to a sparse array (with the first element unpopulated), breaking the assumptions of the iterator in setup_test_suspend(). Iterate from PM_SUSPEND_MIN to PM_SUSPEND_MAX - 1 to fix this. Fixes: 406e79385f3223d8 (PM / sleep: System sleep state selection interface rework) Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki kernel/power/suspend_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 089ec2f87578b9740f0c27bcea9cc6be59c1ddb0 Author: Christoph Hellwig Date: Fri Feb 17 08:21:06 2017 -0800 xfs: simplify xfs_rtallocate_extent We can deduce the allocation type from the bno argument, and do the return without prod much simpler internally. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: fix the macro for the non-rt build] Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 13 ++++--------- fs/xfs/xfs_rtalloc.c | 24 ++++++++---------------- fs/xfs/xfs_rtalloc.h | 3 +-- 3 files changed, 13 insertions(+), 27 deletions(-) commit 7323f0d2881bbd426ce6bc0a956ef9e739ffe767 Author: Kinglong Mee Date: Fri Feb 3 22:51:46 2017 +0800 NFSD: Reserve adequate space for LOCKT operation After tightening the OP_LOCKT reply size estimate, we can get warnings like: [11512.783519] RPC request reserved 124 but used 152 [11512.813624] RPC request reserved 108 but used 136 Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2282cd2c05e281120dedc665a8a6a24053c44662 Author: Kinglong Mee Date: Fri Feb 3 22:36:00 2017 +0800 NFSD: Get response size before operation for all RPCs NFSD usess PAGE_SIZE as the reply size estimate for RPCs which don't support op_rsize_bop(), A PAGE_SIZE (4096) is larger than many real response sizes, eg, access (op_encode_hdr_size + 2), seek (op_encode_hdr_size + 3). This patch just adds op_rsize_bop() for all RPCs getting response size. An overestimate is generally safe but the tighter estimates are probably better. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) commit 827433801c3bcf21296915c42c1314fbb944b197 Author: Kinglong Mee Date: Sun Feb 5 09:57:48 2017 +0800 nfsd/callback: Drop a useless data copy when comparing sessionid Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e86a40bc7331b7b93a88edd74e6b2f738107a6f9 Author: Kinglong Mee Date: Sun Feb 5 09:57:37 2017 +0800 nfsd/callback: skip the callback tag The callback tag is NULL, and hdr->nops is unused too right now, but. But if we were to ever test with a nonzero callback tag, nops will get a bad value. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 1 + 1 file changed, 1 insertion(+) commit f7d1ddbe7648af7460d23688c8c131342eb43b3a Author: Kinglong Mee Date: Sun Feb 5 09:57:07 2017 +0800 nfsd/callback: Cleanup callback cred on shutdown The rpccred gotten from rpc_lookup_machine_cred() should be put when state is shutdown. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 8 ++++++++ fs/nfsd/nfs4state.c | 10 ++++++---- fs/nfsd/state.h | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) commit c3821b3497aae1752cb2be72c32f650ef24c8820 Author: Kinglong Mee Date: Sun Feb 5 22:02:01 2017 +0800 nfsd/idmap: return nfserr_inval for 0-length names Tigran Mkrtchyan's new pynfs testcases for zero length principals fail: SATT16 st_setattr.testEmptyPrincipal : FAILURE Setting empty owner should return NFS4ERR_INVAL, instead got NFS4ERR_BADOWNER SATT17 st_setattr.testEmptyGroupPrincipal : FAILURE Setting empty owner_group should return NFS4ERR_INVAL, instead got NFS4ERR_BADOWNER This patch checks the principal and returns nfserr_inval directly. It could check after decoding in nfs4xdr.c, but it's simpler to do it in nfsd_map_xxxx. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4idmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c836fec5ce8eb0d0c08fa0ea5fb71df3290d1601 Author: Jim Qu Date: Fri Feb 10 15:59:59 2017 +0800 drm/amd/amdgpu: post card if there is real hw resetting performed Check whether we need to post rather than whether the asic is posted. There are some cases (e.g., GPU reset or resume from hibernate) where we need to force post even if the asic has been posted. Signed-off-by: Jim Qu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +++++++++++++--------- drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 + 5 files changed, 20 insertions(+), 11 deletions(-) commit 818551e2b2c662a1b26de6b4f7d6b8411a838d18 Merge: 6010720 7520872c Author: Jens Axboe Date: Fri Feb 17 14:08:19 2017 -0700 Merge branch 'for-4.11/next' into for-4.11/linus-merge Signed-off-by: Jens Axboe commit 6010720da8aab51f33beee63b73cf88016e9b250 Merge: 2fe1e8a 8a9ae52 Author: Jens Axboe Date: Fri Feb 17 14:06:45 2017 -0700 Merge branch 'for-4.11/block' into for-4.11/linus-merge Signed-off-by: Jens Axboe commit 601109c5c74a10e6b89465cb6aa31a40d1efc8e3 Merge: 8fd4a62 998d757 Author: Dave Airlie Date: Sat Feb 18 06:35:25 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-02-17' of git://anongit.freedesktop.org/git/drm-intel into drm-next i915 and GVT fixes for v4.11 merge window * tag 'drm-intel-next-fixes-2017-02-17' of git://anongit.freedesktop.org/git/drm-intel: (32 commits) drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT drm/i915: Pass timeout==0 on to i915_gem_object_wait_fence() drm/i915/gvt: Disable access to stolen memory as a guest drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code drm/i915: Check for timeout completion when waiting for the rq to submitted drm/i915: A hotfix for making aliasing PPGTT work for GVT-g drm/i915: Restore context and pd for ringbuffer submission after reset drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode. drm/i915/lspcon: Fix resume time initialization due to unasserted HPD drm/i915/gen9+: Enable hotplug detection early drm/i915: Reject set-tiling-ioctl with stride==0 and a tiling mode drm/i915: Recreate internal objects with single page segments if dmar fails drm/i915/gvt: return error code if dma map iova failed drm/i915/gvt: optimize the inhibit context mmio load drm/i915/gvt: add sprite plane flip done support. drm/i915/gvt: add missing display part reset for vGPU reset drm/i915/gvt: Fix shadow context descriptor drm/i915/gvt: Fix alignment for GTT allocation drm/i915/gvt: fix crash at function release_shadow_wa_ctx drm/i915/gvt: enable IOMMU for gvt ... commit 483635a9d0802d5ffbe402ceac5b93ddb2acb138 Author: Jiri Olsa Date: Fri Feb 17 18:00:18 2017 +0100 perf record: Add -a as default target Running 'perf record' with no target (-a, -p, -t, etc) will now collect system wide data. Commiter notes: Testing it: [root@jouet ~]# perf record ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.351 MB perf.data (366 samples) ] # is equivalent to: # perf record -a ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.411 MB perf.data (978 samples) ] # Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170217170018.GA15389@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 2 +- tools/perf/builtin-record.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 81efbaddd687f1b478c15665716fd545e2e4401e Author: Prarit Bhargava Date: Wed Feb 15 11:53:08 2017 -0500 PCI/MSI: Fix msi_desc->affinity memory leak when freeing MSI IRQs During device setup, msix_setup_entries() and msi_setup_entry() allocate msi_desc by calling alloc_msi_entry(). alloc_msi_entry() can also allocate a affinity cpumask. During device teardown free_msi_irqs() is called and the msi_desc is freed, but the affinity cpumask is leaked. Fix it by calling free_msi_entry() which frees both the msi_desc and the affinity cpumask. [bhelgaas: aa48b6f70886 ("genirq/MSI: Move alloc_msi_entry() from PCI into generic MSI code") moved alloc_msi_entry() from drivers/pci/msi.c to kernel/irq/msi.c and added a new corresponding free_msi_entry() interface. After aa48b6f70886, pci/msi.c used alloc_msi_entry(), but did its own kfree() instead of using free_msi_entry(). 28f4b04143c5 ("genirq/msi: Add cpumask allocation to alloc_msi_entry") added affinity to both alloc_msi_entry() and free_msi_entry(), but pci/msi.c didn't use free_msi_entry(), resulting in this leak.] Fixes: aa48b6f70886 ("genirq/MSI: Move alloc_msi_entry() from PCI into generic MSI code") Signed-off-by: Prarit Bhargava Signed-off-by: Bjorn Helgaas CC: Myron Stowe drivers/pci/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d79f8b93187c771b6971acfaba67f4e2f1e0710 Author: Jiri Olsa Date: Fri Feb 17 18:00:34 2017 +0100 perf stat: Add -a as default target Boris asked for default -a option in case we monitor only uncore events. While implementing that I thought it might be actually useful to make it overall default. Running 'perf stat' will now collect system wide data. Committer note: Testing it: # perf stat ^C Performance counter stats for 'system wide': 3571.559178 cpu-clock (msec) # 4.000 CPUs utilized 3,346 context-switches # 0.937 K/sec 277 cpu-migrations # 0.078 K/sec 57,271 page-faults # 0.016 M/sec 4,535,633,835 cycles # 1.270 GHz 6,389,736,516 instructions # 1.41 insn per cycle 1,541,293,875 branches # 431.547 M/sec 14,526,396 branch-misses # 0.94% of all branches 0.892950118 seconds time elapsed # Requested-and-Acked-by: Borislav Petkov Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170217170034.GB15389@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 2 +- tools/perf/builtin-stat.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 4e33e34625103593a71d2bae471ce49cef62ef06 Author: Eric Dumazet Date: Fri Feb 17 09:11:42 2017 -0800 tcp: use page_ref_inc() in tcp_sendmsg() sk_page_frag_refill() allocates either a compound page or an order-0 page. We can use page_ref_inc() which is slightly faster than get_page() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4ecb15a2432880353d0de4a35204ab8b65b8751 Author: Cui, Cheng Date: Fri Feb 17 17:04:55 2017 +0000 tcp: accommodate sequence number to a peer's shrunk receive window caused by precision loss in window scaling Prevent sending out a left-shifted sequence number from a Linux sender in response to a peer's shrunk receive-window caused by losing least significant bits in window-scaling. Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Signed-off-by: Cheng Cui Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e606519ec3e7ec294b9c15c6248f9ea51e9eb2cb Merge: fbdf0e2 9c568fd Author: David S. Miller Date: Fri Feb 17 15:29:40 2017 -0500 Merge branch 'sfc-misc-fixes' Edward Cree says: ==================== sfc: misc. fixes Three largely unrelated fixes to increase robustness in rare edge cases. ==================== Signed-off-by: David S. Miller commit 9c568fd8844ec3986eb19b0b5d97536243d10d46 Author: Peter Dunning Date: Fri Feb 17 15:50:43 2017 +0000 sfc: do not device_attach if a reset is pending efx_start_all can return without initialising queues as a reset is pending. This means that when netif_device_attach is called, the kernel can start sending traffic without having an initialised TX queue to send to. This patch avoids this by not calling netif_device_attach if there is a pending reset. Fixes: e283546c0465 ("sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 8 ++++---- drivers/net/ethernet/sfc/ef10_sriov.c | 4 ++-- drivers/net/ethernet/sfc/efx.c | 10 ++++++---- drivers/net/ethernet/sfc/efx.h | 6 ++++++ drivers/net/ethernet/sfc/selftest.c | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) commit 105eac6c35a168b8b6d8e594830a1da5585b260d Author: Bert Kenward Date: Fri Feb 17 15:50:12 2017 +0000 sfc: forget filters from sw table if hw replies ENOENT on removing them If the hw doesn't think they exist, we should defer to its authority. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0ccb998bf46d8dc9799b60ea0090fb08c37e96ad Author: Jon Cooper Date: Fri Feb 17 15:49:13 2017 +0000 sfc: fix filter_id misinterpretation in edge case On EF10, hardware filter IDs are 13 bits, but in some places we store 32-bit "full filter IDs" in which higher order bits encode the filter match-priority. This could cause a filter to have a full filter ID of 0xffff, which is also the value EFX_EF10_FILTER_ID_INVALID which we use in 16-bit "short" filter IDs (without match-priority bits). This would occur if the hardware filter ID was 0x1fff and the match-priority was 7. Unfortunately, some code that checks for EFX_EF10_FILTER_ID_INVALID can be called on full filter IDs, and will WARN_ON if this ever happens. So, since we have plenty of spare bits in the full filter ID, this patch shifts the priority bits left one bit when constructing the full filter IDs, ensuring that the 0x2000 bit of a full filter ID will always be 0 and thus no full filter ID can ever equal EFX_EF10_FILTER_ID_INVALID. This patch also replaces open-coded full<->short filter ID conversions with calls to functions, thus keeping the definition of the full filter ID format in one place. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 48 +++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit 99e7138eb7897aa0ccc6661173ae2d7e79721e05 Author: Jiri Olsa Date: Fri Feb 17 15:00:56 2017 +0100 perf tools: Fail on using multiple bits long terms without value Currently we allow not to specify value for numeric terms and we set them to value 1. This was originaly meant just for single bit terms to allow user to type: $ perf record -e 'cpu/cpu-cycles,any' instead of: $ perf record -e 'cpu/cpu-cycles,any=1' However it works also for multi bits terms like: $ perf record -e 'cpu/event/' ls ... $ perf evlist -v ..., config: 0x1, ... After discussion with Peter we decided making such term usage to fail, like: $ perf record -e 'cpu/event/' ls event syntax error: 'cpu/event/' \___ no value assigned for term ... Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487340058-10496-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 2 ++ tools/perf/util/parse-events.h | 2 ++ tools/perf/util/parse-events.y | 14 +++++++------- tools/perf/util/pmu.c | 13 +++++++++++-- 4 files changed, 22 insertions(+), 9 deletions(-) commit 67b49b38f7bd6f34319b540ce824d5697241b3a8 Author: Jiri Olsa Date: Fri Feb 17 15:00:55 2017 +0100 perf tools: Move new_term arguments into struct parse_events_term template We need to add yet another parameter to new_term function in following patch, so it's better to move first all the current params into template struct parse_events_term and use it as a single argument. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487340058-10496-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 69 ++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 30 deletions(-) commit fbdf0e28d061708cf18ba0f8e0db5360dc9a15b9 Author: Arnd Bergmann Date: Fri Feb 17 16:08:30 2017 +0100 vmxnet3: prevent building with 64K pages I got a warning about broken code on ARM64 with 64K pages: drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_init': drivers/net/vmxnet3/vmxnet3_drv.c:1679:29: error: large integer implicitly truncated to unsigned type [-Werror=overflow] rq->buf_info[0][i].len = PAGE_SIZE; 'len' here is a 16-bit integer, so this clearly won't work. I don't think this driver is used much on anything other than x86, so there is no need to fix this properly and we can work around it with a Kconfig dependency to forbid known-broken configurations. qemu in theory supports it on other architectures too, but presumably only for compatibility with x86 guests that also run on vmware. CONFIG_PAGE_SIZE_64KB is used on hexagon, mips, sh and tile, the other symbols are architecture-specific names for the same thing. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 74179d44b6e199adaec8c7d842dc61ebefa314c5 Author: Valentin Longchamp Date: Fri Feb 17 11:31:22 2017 +0100 net/wan: add MODULE_LICENSE for fsl_ucc_hdlc It is required to build it as a module. Signed-off-by: Valentin Longchamp Signed-off-by: David S. Miller drivers/net/wan/fsl_ucc_hdlc.c | 1 + 1 file changed, 1 insertion(+) commit 8ca6e0a75a5145458e8a680edf2394375f2129da Author: Yadi Hu Date: Fri Feb 17 14:20:26 2017 -0600 PCI: altera: Extract TLP completion status correctly Previously we extracted 'Completion Status' from b14:12, but it is actually b15:13. Extract it from the correct bits. Signed-off-by: Hu Yadi Signed-off-by: Bjorn Helgaas Acked-by: Ley Foon Tan drivers/pci/host/pcie-altera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2c58294f5416467ae0c5d00675bce3cd19595dd Author: Zhu Yanjun Date: Fri Feb 17 04:16:22 2017 -0500 rds:Remove unnecessary ib_ring unalloc In the function rds_ib_xmit_atomic, ib_ring is not allocated successfully. As such, it is not necessary to unalloc it. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_send.c | 1 - 1 file changed, 1 deletion(-) commit 5800790a925b0aefb621ae3da86668c3a2867750 Author: Shawn Lin Date: Thu Feb 16 15:29:35 2017 +0800 PCI: rockchip: Set vendor ID from local core config space The TRM says the vendor ID in the RC's configure space can be rewritten and the value must be the same as the value read from the local core configure space. But we misread that and didn't notice it before. Actually we should only able to rewrite it from the local core configure space. Fix that issue to make lspci show the correct IP vendor infomation. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b4735281f67b0aa62bf74c8a1a7758c17f7158d Author: Simon Horman Date: Fri Feb 17 08:57:54 2017 +0100 nfp: Use PCI_DEVICE_ID_NETRONOME_NFP* defines Use PCI_DEVICE_ID_NETRONOME_NFP*, defined in linux/pci_ids.h, rather than replicating the same values in the NFP driver. Signed-off-by: Simon Horman Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 ++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 4 ++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) commit 806a837650501f5eee359a197824db8752fa6e6c Author: Gao Feng Date: Fri Feb 17 14:34:19 2017 +0800 pkt_sched: Remove useless qdisc_stab_lock The qdisc_stab_lock is used in qdisc_get_stab and qdisc_put_stab. These two functions are invoked in qdisc_create, qdisc_change, and qdisc_destroy which run fully under RTNL. So it already makes sure only one could access the qdisc_stab_list at the same time. Then it is unnecessary to use qdisc_stab_lock now. Signed-off-by: Gao Feng Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_api.c | 12 ------------ 1 file changed, 12 deletions(-) commit 88c4845d7dec835ba7ad1379e30a09658b05495d Author: David Howells Date: Fri Feb 17 18:16:21 2017 +0000 rxrpc: Change module filename to rxrpc.ko Change module filename from af-rxrpc.ko to rxrpc.ko so as to be consistent with the other protocol drivers. Also adjust the documentation to reflect this. Further, there is no longer a standalone rxkad module, as it has been merged into the rxrpc core, so get rid of references to that. Reported-by: Marc Dionne Signed-off-by: David Howells Signed-off-by: David S. Miller Documentation/filesystems/afs.txt | 34 +--------------------------------- net/rxrpc/Makefile | 12 ++++++------ 2 files changed, 7 insertions(+), 39 deletions(-) commit b5124720ed2e5b43c851a32e9acc8d29e3e780ae Author: Simon Xiao Date: Fri Feb 17 11:36:20 2017 -0800 netvsc: fix typo on statistics Return the correct tx_errors stats in netvsc. Reviewed-by: Haiyang Zhang Signed-off-by: Simon Xiao 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 33be632b8443b6ac74aa293504f430604fb9abeb Author: Sinan Kaya Date: Thu Feb 16 17:01:45 2017 -0500 PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432 The Qualcomm QDF2xxx root ports don't advertise an ACS capability, but they do provide ACS-like features to disable peer transactions and validate bus numbers in requests. To be specific: * Hardware supports source validation but it will report the issue as Completer Abort instead of ACS Violation. * Hardware doesn't support peer-to-peer and each root port is a root complex with unique segment numbers. * It is not possible for one root port to pass traffic to the other root port. All PCIe transactions are terminated inside the root port. Add an ACS quirk for the QDF2400 and QDF2432 products. [bhelgaas: changelog] Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson drivers/pci/quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 025331df34f6722f86b467cb13a69326444ab1bc Author: Daniel Borkmann Date: Fri Feb 17 01:56:11 2017 +0100 rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size When allocating rtnl dump messages, struct ifla_port_vsi is never dumped, so we can save header plus payload in rtnl_port_size(). Infact, attribute IFLA_PORT_VSI_TYPE and struct ifla_port_vsi are not used anywhere in the kernel. We only need to keep the nla policy should applications in user space be filling this out. Same NLA_BINARY issue exists as was fixed in 364d5716a7ad ("rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY") and others, but then again IFLA_PORT_VSI_TYPE is not used anywhere, so just add a comment that it's unused. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/rtnetlink.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4a9b0933bdfcd85da840284bf5a0eb17b654b9c2 Author: Haiyang Zhang Date: Mon Feb 13 18:10:11 2017 +0000 PCI: hv: Use device serial number as PCI domain Use the device serial number as the PCI domain. The serial numbers start with 1 and are unique within a VM. So names, such as VF NIC names, that include domain number as part of the name, can be shorter than that based on part of bus UUID previously. The new names will also stay same for VMs created with copied VHD and same number of devices. Signed-off-by: Haiyang Zhang Signed-off-by: Stephen Hemminger Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8a9ae523282f324989850fcf41312b42a2fb9296 Author: Scott Bauer Date: Fri Feb 17 13:59:40 2017 +0100 nvme: Check for Security send/recv support before issuing commands. We need to verify that the controller supports the security commands before actually trying to issue them. Signed-off-by: Scott Bauer [hch: moved the check so that we don't call into the OPAL code if not supported] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 + drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 2 +- include/linux/nvme.h | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) commit 4f1244c8298606b8fae64b4d78b820ae6b896e3c Author: Christoph Hellwig Date: Fri Feb 17 13:59:39 2017 +0100 block/sed-opal: allocate struct opal_dev dynamically Insted of bloating the containing structure with it all the time this allocates struct opal_dev dynamically. Additionally this allows moving the definition of struct opal_dev into sed-opal.c. For this a new private data field is added to it that is passed to the send/receive callback. After that a lot of internals can be made private as well. Signed-off-by: Christoph Hellwig Tested-by: Scott Bauer Reviewed-by: Scott Bauer Signed-off-by: Jens Axboe block/opal_proto.h | 23 ++++++++++ block/sed-opal.c | 101 +++++++++++++++++++++++++++++++++++++---- drivers/nvme/host/core.c | 9 ++-- drivers/nvme/host/nvme.h | 14 ++---- drivers/nvme/host/pci.c | 8 +++- include/linux/sed-opal.h | 116 ++--------------------------------------------- 6 files changed, 131 insertions(+), 140 deletions(-) commit f5b37b7c23915af93081a8711e0a0f0219063756 Author: Christoph Hellwig Date: Fri Feb 17 13:59:38 2017 +0100 block/sed-opal: tone down not supported warnings Not having OPAL or a sub-feature supported is an entirely normal condition for many drives, so don't warn about it. Keep the messages, but tone them down to debug only. Signed-off-by: Christoph Hellwig Reviewed-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7520872c0cf4d3df6d74242c6edfb9e70a47df4d Author: Jens Axboe Date: Fri Feb 17 11:40:44 2017 -0700 block: don't defer flushes on blk-mq + scheduling For blk-mq with scheduling, we can potentially end up with ALL driver tags assigned and sitting on the flush queues. If we defer because of an inlfight data request, then we can deadlock if that data request doesn't already have a tag assigned. This fixes a deadlock with running the xfs/297 xfstest, where thousands of syncs can cause the drive queue to stall. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-flush.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 64765a75ef258c802f795558d00a5a1864c531fc Author: Jens Axboe Date: Fri Feb 17 11:39:26 2017 -0700 blk-mq-sched: ask scheduler for work, if we failed dispatching leftovers Usually we don't ask the scheduler for work, if we already have leftovers on the dispatch list. This is done to leave work on the scheduler side for as long as possible, for proper merging. But if we do have work leftover but didn't dispatch anything, then we should ask the scheduler since we could potentially issue requests from that. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq-sched.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 0c2a6fe4dc3e8c24bc67cd5d0a36092834027cf0 Author: Jens Axboe Date: Fri Feb 17 11:38:36 2017 -0700 blk-mq: don't special case flush inserts for blk-mq-sched The current request insertion machinery works just fine for directly inserting flushes, so no need to special case this anymore. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit c7a571b45055dba740156013fef4a7fdbe3262d9 Author: Jens Axboe Date: Fri Feb 17 11:37:14 2017 -0700 blk-mq-sched: don't add flushes to the head of requeue queue If we are currently out of driver tags, we don't want to add a new flush (without a tag) to the head of the requeue list. We want to add it to the back, behind the others that are potentially also waiting for a tag. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2aa0f21d5491976729087104553b7bdaef047b9d Author: Jens Axboe Date: Fri Feb 17 11:35:35 2017 -0700 blk-mq: have blk_mq_dispatch_rq_list() return if we queued IO or not Currently we're almost there, but if we dispatch nothing, then we still return success. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99f18f1d2f447afe575c1ad2641050c77d244760 Author: Philippe Reynes Date: Thu Feb 16 23:28:01 2017 +0100 net: qlogic: netxen: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller .../ethernet/qlogic/netxen/netxen_nic_ethtool.c | 123 +++++++++++---------- 1 file changed, 65 insertions(+), 58 deletions(-) commit 336f8a71aa178a35b4c33130bb98331b7930337a Author: Philippe Reynes Date: Thu Feb 16 22:46:14 2017 +0100 net: hamachi: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/packetengines/hamachi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 85e0d509654c2e2e58b29e50a883acd4c4e8807d Author: Jiri Olsa Date: Fri Feb 17 15:00:54 2017 +0100 perf build: Add special fixdep cleaning rule Ingo reported following build failure: On Sat, Feb 11, 2017 at 12:12:34PM +0100, Ingo Molnar wrote: > > So I had this oldish 32-bit 15.10 Ubuntu installation around (fully updated), and > trying to build perf gave me: > > deimos:~/tip/tools/perf> make > BUILD: Doing 'make -j4' parallel build > make[3]: *** No rule to make target '/usr/include/x86_64-linux-gnu/sys/types.h', needed by 'fixdep.o'. Stop. > Makefile:42: recipe for target 'fixdep-in.o' failed > make[2]: *** [fixdep-in.o] Error 2 > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed > make[1]: *** [fixdep] Error 2 > Makefile:68: recipe for target 'all' failed > make: *** [all] Error 2 > > Now this got a bit better after I did a 'make mrproper' in the kernel tree: > > deimos:~/tip/tools/perf> make > BUILD: Doing 'make -j4' parallel build > HOSTCC fixdep.o > /home/mingo/tip/tools/build/fixdep: 1: /home/mingo/tip/tools/build/fixdep: Syntax error: "(" unexpected > /home/mingo/tip/tools/build/Makefile.build:101: recipe for target 'fixdep.o' failed > make[3]: *** [fixdep.o] Error 2 > Makefile:42: recipe for target 'fixdep-in.o' failed > make[2]: *** [fixdep-in.o] Error 2 > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed > make[1]: *** [fixdep] Error 2 > Makefile:68: recipe for target 'all' failed > make: *** [all] Error 2 > > After some digging it turns out that my 'fixdep' binary was 64-bit: > > deimos:~/tip/tools/perf> file /home/mingo/tip/tools/build/fixdep > /home/mingo/tip/tools/build/fixdep: ELF 64-bit LSB executable, x86-64, version 1 > (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux > 2.6.32, BuildID[sha1]=d527f736b57b5ba47210fbcb562a3b52867d21c1, not stripped > > But it did not get cleaned out by 'make clean'. > > Only after I did a 'make clean' in tools/ itself, did it get built properly. It shows we don't clean up properly the fixdep objects, so adding special rule for that. Signed-off-by: Jiri Olsa Reported-by: Ingo Molnar Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487340058-10496-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile | 4 ++-- tools/build/Makefile.include | 3 +++ tools/perf/Makefile.perf | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) commit eda7a5e88d95d8cc4315451dcfb74064773cbc02 Author: Roopa Prabhu Date: Thu Feb 16 13:38:04 2017 -0800 bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries added_by_external_learn fdb entries are added and expired by external entities like switchdev driver or external controllers. ageing is already disabled for such entries. Hence, don't indicate expiry for such fdb entries. CC: Nikolay Aleksandrov CC: Jiri Pirko CC: Ido Schimmel Signed-off-by: Roopa Prabhu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2b4eb55ca81cd1968a942a593debddb3255d68a Merge: afcb50b 74451e66 Author: David S. Miller Date: Fri Feb 17 13:40:06 2017 -0500 Merge branch 'bpf-misc' Daniel Borkmann says: ==================== Misc BPF improvements This last series for this window adds various misc improvements to BPF, one is to mark registered map and prog types as __ro_after_init, another one for removing cBPF stubs in eBPF JITs and moving the stub to the core and last also improving JITs is to make generated images visible to the kernel and kallsyms, so they can be seen in traces. For details, please have a look at the individual patches. Thanks a lot! ==================== Signed-off-by: David S. Miller commit 74451e66d516c55e309e8d89a4a1e7596e46aacd Author: Daniel Borkmann Date: Thu Feb 16 22:24:50 2017 +0100 bpf: make jited programs visible in traces Long standing issue with JITed programs is that stack traces from function tracing check whether a given address is kernel code through {__,}kernel_text_address(), which checks for code in core kernel, modules and dynamically allocated ftrace trampolines. But what is still missing is BPF JITed programs (interpreted programs are not an issue as __bpf_prog_run() will be attributed to them), thus when a stack trace is triggered, the code walking the stack won't see any of the JITed ones. The same for address correlation done from user space via reading /proc/kallsyms. This is read by tools like perf, but the latter is also useful for permanent live tracing with eBPF itself in combination with stack maps when other eBPF types are part of the callchain. See offwaketime example on dumping stack from a map. This work tries to tackle that issue by making the addresses and symbols known to the kernel. The lookup from *kernel_text_address() is implemented through a latched RB tree that can be read under RCU in fast-path that is also shared for symbol/size/offset lookup for a specific given address in kallsyms. The slow-path iteration through all symbols in the seq file done via RCU list, which holds a tiny fraction of all exported ksyms, usually below 0.1 percent. Function symbols are exported as bpf_prog_, in order to aide debugging and attribution. This facility is currently enabled for root-only when bpf_jit_kallsyms is set to 1, and disabled if hardening is active in any mode. The rationale behind this is that still a lot of systems ship with world read permissions on kallsyms thus addresses should not get suddenly exposed for them. If that situation gets much better in future, we always have the option to change the default on this. Likewise, unprivileged programs are not allowed to add entries there either, but that is less of a concern as most such programs types relevant in this context are for root-only anyway. If enabled, call graphs and stack traces will then show a correct attribution; one example is illustrated below, where the trace is now visible in tooling such as perf script --kallsyms=/proc/kallsyms and friends. Before: 7fff8166889d bpf_clone_redirect+0x80007f0020ed (/lib/modules/4.9.0-rc8+/build/vmlinux) f5d80 __sendmsg_nocancel+0xffff006451f1a007 (/usr/lib64/libc-2.18.so) After: 7fff816688b7 bpf_clone_redirect+0x80007f002107 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fffa0575728 bpf_prog_33c45a467c9e061a+0x8000600020fb (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fffa07ef1fc cls_bpf_classify+0x8000600020dc (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff81678b68 tc_classify+0x80007f002078 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8164d40b __netif_receive_skb_core+0x80007f0025fb (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8164d718 __netif_receive_skb+0x80007f002018 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8164e565 process_backlog+0x80007f002095 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8164dc71 net_rx_action+0x80007f002231 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff81767461 __softirqentry_text_start+0x80007f0020d1 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff817658ac do_softirq_own_stack+0x80007f00201c (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff810a2c20 do_softirq+0x80007f002050 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff810a2cb5 __local_bh_enable_ip+0x80007f002085 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8168d452 ip_finish_output2+0x80007f002152 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8168ea3d ip_finish_output+0x80007f00217d (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff8168f2af ip_output+0x80007f00203f (/lib/modules/4.9.0-rc8+/build/vmlinux) [...] 7fff81005854 do_syscall_64+0x80007f002054 (/lib/modules/4.9.0-rc8+/build/vmlinux) 7fff817649eb return_from_SYSCALL_64+0x80007f002000 (/lib/modules/4.9.0-rc8+/build/vmlinux) f5d80 __sendmsg_nocancel+0xffff01c484812007 (/usr/lib64/libc-2.18.so) Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 12 ++ arch/arm64/net/bpf_jit_comp.c | 15 --- arch/powerpc/net/bpf_jit_comp64.c | 1 + arch/s390/net/bpf_jit_comp.c | 18 --- arch/x86/net/bpf_jit_comp.c | 15 --- include/linux/bpf.h | 4 + include/linux/filter.h | 112 ++++++++++++++++++- kernel/bpf/core.c | 223 ++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 2 + kernel/extable.c | 9 +- kernel/kallsyms.c | 61 +++++++++-- net/Kconfig | 3 +- net/core/sysctl_net_core.c | 7 ++ 13 files changed, 419 insertions(+), 63 deletions(-) commit 9383191da4e40360a5d880fbe6bb03911c61621b Author: Daniel Borkmann Date: Thu Feb 16 22:24:49 2017 +0100 bpf: remove stubs for cBPF from arch code Remove the dummy bpf_jit_compile() stubs for eBPF JITs and make that a single __weak function in the core that can be overridden similarly to the eBPF one. Also remove stale pr_err() mentions of bpf_jit_compile. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 5 ----- arch/powerpc/net/bpf_jit_comp64.c | 2 -- arch/s390/net/bpf_jit_comp.c | 8 -------- arch/x86/net/bpf_jit_comp.c | 8 ++------ include/linux/filter.h | 6 +----- kernel/bpf/core.c | 12 +++++++++++- 6 files changed, 14 insertions(+), 27 deletions(-) commit c78f8bdfa11fcceb9723c61212e4bd8f76c87f9e Author: Daniel Borkmann Date: Thu Feb 16 22:24:48 2017 +0100 bpf: mark all registered map/prog types as __ro_after_init All map types and prog types are registered to the BPF core through bpf_register_map_type() and bpf_register_prog_type() during init and remain unchanged thereafter. As by design we don't (and never will) have any pluggable code that can register to that at any later point in time, lets mark all the existing bpf_{map,prog}_type_list objects in the tree as __ro_after_init, so they can be moved to read-only section from then onwards. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/arraymap.c | 10 +++++----- kernel/bpf/hashtab.c | 8 ++++---- kernel/bpf/lpm_trie.c | 2 +- kernel/bpf/stackmap.c | 2 +- kernel/trace/bpf_trace.c | 6 +++--- net/core/filter.c | 18 +++++++++--------- 6 files changed, 23 insertions(+), 23 deletions(-) commit afcb50ba7f745eea32f91d7f63d6aa88f929f9c4 Author: Roopa Prabhu Date: Thu Feb 16 11:29:21 2017 -0800 bridge: vlan_tunnel: explicitly reset metadata attrs to NULL on failure Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Signed-off-by: Roopa Prabhu Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_vlan_tunnel.c | 2 ++ 1 file changed, 2 insertions(+) commit 6850f8b50928463213532d7812b74161d31d3cbd Author: Tobias Klauser Date: Thu Feb 16 15:11:19 2017 +0100 net: bgmac: store MAC address directly in netdev->dev_addr After commit 34a5102c3235 ("net: bgmac: allocate struct bgmac just once & don't copy it") the mac_addr member of struct bgmac is no longer necessary to pass the MAC address to bgmac_enet_probe(). Instead it can directly be stored in netdev->dev_addr. Also use eth_hw_addr_random() instead of eth_random_addr() in case a random MAC is nedded. This will make sure netdev->addr_assign_type will be properly set. Signed-off-by: Tobias Klauser Acked-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 2 +- drivers/net/ethernet/broadcom/bgmac-platform.c | 2 +- drivers/net/ethernet/broadcom/bgmac.c | 9 ++++----- drivers/net/ethernet/broadcom/bgmac.h | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) commit 3105dfb2a99f52c67cd40ec092373081f022ec28 Merge: 6d6a505 b065d3f Author: David S. Miller Date: Fri Feb 17 13:00:45 2017 -0500 Merge tag 'wireless-drivers-next-for-davem-2017-02-16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 Mostly small fixes, not really any new features. Major changes: ath10k * when trying older firmware versions don't confuse user with error messages ath9k * fix crash in AP mode (regression) * fix relayfs crash (regression) * fix initialisation with AR9340 and AR9550 ==================== Signed-off-by: David S. Miller commit 6d6a505a1e4c40cc37f83076c8779881dd60e144 Author: Tobias Klauser Date: Thu Feb 16 13:54:32 2017 +0100 net: ethoc: Use eth_hw_addr_random() Use eth_hw_addr_random() to set a random dev_addr and update addr_assign_type instead of open-coding it. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit e1c151a47942da66cd208dea2330547b34684fae Merge: 4581be4 da20420 Author: David S. Miller Date: Fri Feb 17 12:28:44 2017 -0500 Merge branch 'rhashtable-allocation-failure-during-insertion' Herbert Xu says: ==================== rhashtable: Handle table allocation failure during insertion v2 - Added Ack to patch 2. Fixed RCU annotation in code path executed by rehasher by using rht_dereference_bucket. v1 - This series tackles the problem of table allocation failures during insertion. The issue is that we cannot vmalloc during insertion. This series deals with this by introducing nested tables. The first two patches removes manual hash table walks which cannot work on a nested table. The final patch introduces nested tables. I've tested this with test_rhashtable and it appears to work. ==================== Signed-off-by: David S. Miller commit da20420f83ea0fbcf3d03afda08d971ea1d8a356 Author: Herbert Xu Date: Sat Feb 11 19:26:47 2017 +0800 rhashtable: Add nested tables This patch adds code that handles GFP_ATOMIC kmalloc failure on insertion. As we cannot use vmalloc, we solve it by making our hash table nested. That is, we allocate single pages at each level and reach our desired table size by nesting them. When a nested table is created, only a single page is allocated at the top-level. Lower levels are allocated on demand during insertion. Therefore for each insertion to succeed, only two (non-consecutive) pages are needed. After a nested table is created, a rehash will be scheduled in order to switch to a vmalloced table as soon as possible. Also, the rehash code will never rehash into a nested table. If we detect a nested table during a rehash, the rehash will be aborted and a new rehash will be scheduled. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/linux/rhashtable.h | 78 +++++++++---- lib/rhashtable.c | 270 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 276 insertions(+), 72 deletions(-) commit 40f9f439706073b4b0a654b3b99e18296b7990b3 Author: Herbert Xu Date: Sat Feb 11 19:26:46 2017 +0800 tipc: Fix tipc_sk_reinit race conditions There are two problems with the function tipc_sk_reinit. Firstly it's doing a manual walk over an rhashtable. This is broken as an rhashtable can be resized and if you manually walk over it during a resize then you may miss entries. Secondly it's missing memory barriers as previously the code used spinlocks which provide the barriers implicitly. This patch fixes both problems. Fixes: 07f6c4bc048a ("tipc: convert tipc reference table to...") Signed-off-by: Herbert Xu Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/net.c | 4 ++++ net/tipc/socket.c | 30 +++++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) commit 98687f426bb3e93b9dbbfb614ba331192beae482 Author: Herbert Xu Date: Sat Feb 11 19:26:45 2017 +0800 gfs2: Use rhashtable walk interface in glock_hash_walk The function glock_hash_walk walks the rhashtable by hand. This is broken because if it catches the hash table in the middle of a rehash, then it will miss entries. This patch replaces the manual walk by using the rhashtable walk interface. Fixes: 88ffbf3e037e ("GFS2: Use resizable hash table for glocks") Signed-off-by: Herbert Xu Signed-off-by: David S. Miller fs/gfs2/glock.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 4581be42fce5e1d208cbeb8e78df3f1b4673eff7 Author: Jisheng Zhang Date: Thu Feb 16 17:07:39 2017 +0800 net: mvneta: make mvneta_eth_tool_ops static The mvneta_eth_tool_ops is only used internally in mvneta driver, so make it static. Signed-off-by: Jisheng Zhang Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b5026ade59e07c8913ba8c4d19db2438fdeed1a Merge: ad8e963 5cecb6c Author: David S. Miller Date: Fri Feb 17 12:08:07 2017 -0500 Merge branch 'net-sched-reflect-hw-offload-in-classifiers' Or Gerlitz says: ==================== net/sched: Reflect HW offload status in classifiers Currently there is no way of querying whether a filter is offloaded to HW or not when using "both" policy (where none of skip_sw or skip_hw flags are set by user-space). Added two new flags, "in hw" and "not in hw" such that user space can determine if a filter is actually offloaded to hw. The "in hw" UAPI semantics was chosen so it's similar to the "skip hw" flag logic. If none of these two flags are set, this signals running over older kernel. As an example, add one vlan push + fwd rule, one matchall rule and one u32 rule without any flags, and another vlan + fwd skip_sw rule, such that the different TC classifier attempt to offload all of them -- all over mlx5 SRIOV VF rep: flower skip_sw indev eth2_0 src_mac e4:11:22:33:44:50 dst_mac e4:1d:2d:a5:f3:9d action vlan push id 52 action mirred egress redirect dev eth2 flower indev eth2_0 src_mac e4:11:22:33:44:50 dst_mac e4:11:22:33:44:51 action vlan push id 53 action mirred egress redirect dev eth2 u32 ht 800: flowid 800:1 match ip src 192.168.1.0/24 action drop Since that VF rep doesn't offload matchall/u32 and can currently offload only one vlan push rule we expect three of the rules not to be offloaded: filter protocol ip pref 99 u32 filter protocol ip pref 99 u32 fh 800: ht divisor 1 filter protocol ip pref 99 u32 fh 800::1 order 1 key ht 800 bkt 0 flowid 800:1 not in_hw match c0a80100/ffffff00 at 12 action order 1: gact action drop random type none pass val 0 index 8 ref 1 bind 1 filter protocol all pref 49150 matchall filter protocol all pref 49150 matchall handle 0x1 not in_hw action order 1: mirred (Egress Mirror to device veth1) pipe index 27 ref 1 bind 1 filter protocol ip pref 49151 flower filter protocol ip pref 49151 flower handle 0x1 indev eth2_0 dst_mac e4:11:22:33:44:51 src_mac e4:11:22:33:44:50 eth_type ipv4 not in_hw action order 1: vlan push id 53 protocol 802.1Q priority 0 pipe index 20 ref 1 bind 1 action order 2: mirred (Egress Redirect to device eth2) stolen index 26 ref 1 bind 1 filter protocol ip pref 49152 flower filter protocol ip pref 49152 flower handle 0x1 indev eth2_0 dst_mac e4:1d:2d:a5:f3:9d src_mac e4:11:22:33:44:50 eth_type ipv4 skip_sw in_hw action order 1: vlan push id 52 protocol 802.1Q priority 0 pipe index 19 ref 1 bind 1 action order 2: mirred (Egress Redirect to device eth2) stolen index 25 ref 1 bind 1 v3 --> v4 changes: - removed extra parenthesis (Dave) v2 --> v3 changes: - fixed the matchall dump flags patch to do proper checks (Jakub) - added the same proper checks to flower where they were missing - that flower patch was added as #1 and hence all the other patches are offed-by-one v1 --> v2 changes: - applied feedback from Jakub and Dave -- where none of the skip flags were set, the suggested approach didn't allow user space to distringuish between old kernel to a case when offloading to HW worked fine. ==================== Signed-off-by: David S. Miller commit 5cecb6cc008148b4afc51f7bacfa753e1a957483 Author: Or Gerlitz Date: Thu Feb 16 10:31:16 2017 +0200 net/sched: cls_bpf: Reflect HW offload status BPF classifier support for the "in hw" offloading flags. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Acked-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/cls_bpf.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 24d3dc6d27eae19f422a5e216e25d3a16628d4ff Author: Or Gerlitz Date: Thu Feb 16 10:31:15 2017 +0200 net/sched: cls_u32: Reflect HW offload status U32 support for the "in hw" offloading flags. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Signed-off-by: David S. Miller net/sched/cls_u32.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c7d2b2f5eebe6e76efc11cfd7a600c0748234f3a Author: Or Gerlitz Date: Thu Feb 16 10:31:14 2017 +0200 net/sched: cls_matchall: Reflect HW offloading status Matchall support for the "in hw" offloading flags. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_matchall.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 55593960d0d88c6d80b7b3a615dbe09de85f2541 Author: Or Gerlitz Date: Thu Feb 16 10:31:13 2017 +0200 net/sched: cls_flower: Reflect HW offload status Flower support for the "in hw" offloading flags. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 5 +++++ 1 file changed, 5 insertions(+) commit e696028acc458aa3d43ad899371a963eb28336d8 Author: Or Gerlitz Date: Thu Feb 16 10:31:12 2017 +0200 net/sched: Reflect HW offload status Currently there is no way of querying whether a filter is offloaded to HW or not when using "both" policy (where none of skip_sw or skip_hw flags are set by user-space). Add two new flags, "in hw" and "not in hw" such that user space can determine if a filter is actually offloaded to hw or not. The "in hw" UAPI semantics was chosen so it's similar to the "skip hw" flag logic. If none of these two flags are set, this signals running over older kernel. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 5 +++++ include/uapi/linux/pkt_cls.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 7a335adad8b06778c0876aa5a5eb8954cd835bf5 Author: Or Gerlitz Date: Thu Feb 16 10:31:11 2017 +0200 net/sched: cls_matchall: Dump the classifier flags The classifier flags are not dumped to user-space, do that. Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Acked-by: Yotam Gigi Signed-off-by: David S. Miller net/sched/cls_matchall.c | 3 +++ 1 file changed, 3 insertions(+) commit 749e6720d2ee10d5221d5d7b8cee8ac5d1cd690e Author: Or Gerlitz Date: Thu Feb 16 10:31:10 2017 +0200 net/sched: cls_flower: Properly handle classifier flags dumping Dump the classifier flags only if non zero and make sure to check the return status of the handler that puts them into the netlink msg. Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller net/sched/cls_flower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ad8e963ca6838071dd2f3db2df66b247b99f4295 Author: Philippe Reynes Date: Thu Feb 16 09:10:49 2017 +0100 net: oki-semi: pch_gbe: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller .../ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 58 ++++++++++++++-------- 1 file changed, 38 insertions(+), 20 deletions(-) commit a25996e733db057a27a5f90c5636c3e1e01ad33e Merge: 5418820 04be87a Author: Arnd Bergmann Date: Fri Feb 17 17:28:29 2017 +0100 Merge tag 'mvebu-dt-4.11-4' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.11 (part 4)" from Gregory CLEMENT: Fix typos introduced during the preparation of the 4.11 merge window. * tag 'mvebu-dt-4.11-4' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-385-linksys: fix DSA compatible property ARM: dts: Fix typo in armada-xp-98dx4251 commit 9fe9aa0b7334f65755fa6e9b20cb633a09fe76f7 Author: Ivan Khoronzhuk Date: Wed Feb 15 19:45:02 2017 +0200 net: ethernet: ti: cpsw: correct ale dev to cpsw The ale is a property of cpsw, so change dev to cpsw->dev, aka pdev->dev, to be consistent. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fa9e2899c5d128723056d2ecc950bda7b51af20 Author: Philippe Reynes Date: Tue Feb 14 23:36:32 2017 +0100 net: nvidia: forcedeth: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 91 ++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 41 deletions(-) commit af6e2b5b8c109d1c27f82364e8b9b1e858051093 Merge: 01f0f42 85a66e5 Author: David S. Miller Date: Fri Feb 17 11:03:07 2017 -0500 Merge branch 'ptp-attribute-cleanup' Dmitry Torokhov says: ==================== PTP attribute handling cleanup PTP core was creating some attributes, such as "period" and "fifo", and the entire "pins" attribute group, after creating class deevice, which creates a race for userspace: uevent may arrive before all attributes are created. This series of patches switches PTP to use is_visible() to control visibility of attributes in a group, and device_create_with_groups() to ensure that attributes are created before we notify userspace of a new device. v2: - added Richard's acked-by to patch #1 - removed use of kmalloc_array in favor of kcalloc in patch #2 at Richard's request - added a cover letter v1: - initial patch set ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 85a66e55019583da1e0f18706b7a8281c9f6de5b Author: Dmitry Torokhov Date: Tue Feb 14 10:23:34 2017 -0800 ptp: create "pins" together with the rest of attributes Let's switch to using device_create_with_groups(), which will allow us to create "pins" attribute group together with the rest of ptp device attributes, and before userspace gets notified about ptp device creation. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 20 +++++++++++--------- drivers/ptp/ptp_private.h | 7 ++++--- drivers/ptp/ptp_sysfs.c | 39 +++++++++------------------------------ 3 files changed, 24 insertions(+), 42 deletions(-) commit af59e717d5ff9c8dbf9bcc581c0dfb3b2a9c9030 Author: Dmitry Torokhov Date: Tue Feb 14 10:23:33 2017 -0800 ptp: use is_visible method to hide unused attributes Instead of creating selected attributes after the device is created (and after userspace potentially seen uevent), lets use attribute group is_visible() method to control which attributes are shown. This will allow us to create all attributes (except "pins" group, which will be taken care of later) before userspace gets notified about new ptp class device. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller drivers/ptp/ptp_sysfs.c | 125 +++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 70 deletions(-) commit 6f7aa56bae6ff38727d5c8bf6ee7d4202b4e3865 Author: Dmitry Torokhov Date: Tue Feb 14 10:23:32 2017 -0800 ptp: use kcalloc when allocating arrays kcalloc is more semantically correct when allocating arrays of objects, and overflow-safe. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller drivers/ptp/ptp_sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 882f312dc0751c973db26478f07f082c584d16aa Author: Dmitry Torokhov Date: Tue Feb 14 10:23:31 2017 -0800 ptp: do not explicitly set drvdata in ptp_clock_register() We do not need explicitly call dev_set_drvdata(), as it is done for us by device_create(). Acked-by: Richard Cochran Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 2 -- 1 file changed, 2 deletions(-) commit da8a58b56c661681f9b2fd2fa59c6da3a5bac8d1 Author: Jan Stancek Date: Fri Feb 17 12:10:26 2017 +0100 perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map There are 2 problems wrt. cpu_topology_map on systems with sparse CPUs: 1. offline/absent CPUs will have their socket_id and core_id set to -1 which triggers: "socket_id number is too big.You may need to upgrade the perf tool." 2. size of cpu_topology_map (perf_env.cpu[]) is allocated based on _SC_NPROCESSORS_CONF, but can be indexed with CPU ids going above. Users of perf_env.cpu[] are using CPU id as index. This can lead to read beyond what was allocated: ==19991== Invalid read of size 4 ==19991== at 0x490CEB: check_cpu_topology (topology.c:69) ==19991== by 0x490CEB: test_session_topology (topology.c:106) ... For example: _SC_NPROCESSORS_CONF == 16 available: 2 nodes (0-1) node 0 cpus: 0 6 8 10 16 22 24 26 node 0 size: 12004 MB node 0 free: 9470 MB node 1 cpus: 1 7 9 11 23 25 27 node 1 size: 12093 MB node 1 free: 9406 MB node distances: node 0 1 0: 10 20 1: 20 10 This patch changes HEADER_NRCPUS.nr_cpus_available from _SC_NPROCESSORS_CONF to max_present_cpu and updates any user of cpu_topology_map to iterate with nr_cpus_avail. As a consequence HEADER_CPU_TOPOLOGY core_id and socket_id lists get longer, but maintain compatibility with pre-patch state - index to cpu_topology_map is CPU id. perf test 36 -v 36: Session topology : --- start --- test child forked, pid 22211 templ file: /tmp/perf-test-gmdX5i CPU 0, core 0, socket 0 CPU 1, core 0, socket 1 CPU 6, core 10, socket 0 CPU 7, core 10, socket 1 CPU 8, core 1, socket 0 CPU 9, core 1, socket 1 CPU 10, core 9, socket 0 CPU 11, core 9, socket 1 CPU 16, core 0, socket 0 CPU 22, core 10, socket 0 CPU 23, core 10, socket 1 CPU 24, core 1, socket 0 CPU 25, core 1, socket 1 CPU 26, core 9, socket 0 CPU 27, core 9, socket 1 test child finished with 0 ---- end ---- Session topology: Ok Signed-off-by: Jan Stancek Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/d7c05c6445fca74a8442c2c73cfffd349c52c44f.1487146877.git.jstancek@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 +- tools/perf/tests/topology.c | 4 +++- tools/perf/util/env.c | 2 +- tools/perf/util/header.c | 16 +++++----------- 4 files changed, 10 insertions(+), 14 deletions(-) commit 01f0f4253469e1b1e80bc84ae64728c294534836 Author: Eric Dumazet Date: Fri Feb 10 04:27:58 2017 -0800 mlx4: do not fire tasklet unless necessary All rx and rx netdev interrupts are handled by respectively by mlx4_en_rx_irq() and mlx4_en_tx_irq() which simply schedule a NAPI. But mlx4_eq_int() also fires a tasklet to service all items that were queued via mlx4_add_cq_to_tasklet(), but this handler was not called unless user cqe was handled. This is very confusing, as "mpstat -I SCPU ..." show huge number of tasklet invocations. This patch saves this overhead, by carefully firing the tasklet directly from mlx4_add_cq_to_tasklet(), removing four atomic operations per IRQ. Signed-off-by: Eric Dumazet Cc: Tariq Toukan Cc: Saeed Mahameed Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cq.c | 6 +++++- drivers/net/ethernet/mellanox/mlx4/eq.c | 9 +-------- 2 files changed, 6 insertions(+), 9 deletions(-) commit 43db2843a4a41cc8cdb6ab696639aeee1f4d5062 Author: Jan Stancek Date: Fri Feb 17 12:10:25 2017 +0100 perf header: Make build_cpu_topology skip offline/absent CPUs When build_cpu_topo() encounters offline/absent CPUs, it fails to find any sysfs entries and returns failure. This leads to build_cpu_topology() and write_cpu_topology() failing as well. Because HEADER_CPU_TOPOLOGY has not been written, read leaves cpu_topology_map NULL and we get NULL ptr deref at: ... cmd_test __cmd_test test_and_print run_test test_session_topology check_cpu_topology 36: Session topology : --- start --- test child forked, pid 14902 templ file: /tmp/perf-test-4CKocW failed to write feature HEADER_CPU_TOPOLOGY perf: Segmentation fault Obtained 9 stack frames. ./perf(sighandler_dump_stack+0x41) [0x5095f1] /lib64/libc.so.6(+0x35250) [0x7f4b7c3c9250] ./perf(test_session_topology+0x1db) [0x490ceb] ./perf() [0x475b68] ./perf(cmd_test+0x5b9) [0x4763c9] ./perf() [0x4945a3] ./perf(main+0x69f) [0x427e8f] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f4b7c3b5b35] ./perf() [0x427fb9] test child interrupted ---- end ---- Session topology: FAILED! This patch makes build_cpu_topology() skip offline/absent CPUs, by checking their presence against cpu_map built from online CPUs. Signed-off-by: Jan Stancek Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Masami Hiramatsu Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/a271b770175524f4961d4903af33798358a4a518.1487146877.git.jstancek@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 92a7e1278005b6bb3459affc50b2b6e2464e7e7c Author: Jan Stancek Date: Fri Feb 17 12:10:24 2017 +0100 perf cpumap: Add cpu__max_present_cpu() Similar to cpu__max_cpu() (which returns the max possible CPU), returns the max present CPU. Signed-off-by: Jan Stancek Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Masami Hiramatsu Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/8ea4601b5cacc49927235b4ebac424bd6eeccb06.1487146877.git.jstancek@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cpumap.c | 22 ++++++++++++++++++++++ tools/perf/util/cpumap.h | 1 + 2 files changed, 23 insertions(+) commit 8074bf51fe5af68dcbc12bd7fa72dc4be8f41dde Author: Arnaldo Carvalho de Melo Date: Fri Feb 17 12:27:26 2017 -0300 perf session: Fix DEBUG=1 build with clang The struct branch_stack->branch_stack.cycles field is a u64 :16 bitfield, and this somehow confuses clang 4.0 when checking the arguments of a printf format, so cast the :16 to unsigned short to help it. Silences this: util/session.c:935:4: error: format specifies type 'unsigned short' but the argument has type 'u64' (aka 'unsigned long') [-Werror,-Wformat] e->flags.cycles, ^~~~~~~~~~~~~~~ 1 error generated. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-eo2t4uhlbne105z72tvyzkp1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67d04bb2bcbd3e99f4c4daa58599c90a83ad314a Author: Joel Fernandes Date: Thu Feb 16 20:10:58 2017 -0800 tracing: Remove outdated ring buffer comment The comment about ring buffer's organization is outdated and the code sits elsewhere, remove the comment. Link: http://lkml.kernel.org/r/20170217041058.23904-1-joelaf@google.com Cc: Ingo Molnar Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 9c72fd0ff092526ea25c5a59d4a6ed94aeb4a66f Author: Steven Rostedt (VMware) Date: Thu Feb 16 20:13:52 2017 -0500 tools lib traceevent: It's preempt not prempt Fix the typo of the function name pevent_data_prempt_count() Signed-off-by: Steven Rostedt Fixes: c52d9e4e677b ("tools lib traceevent: Add retrieval of preempt count and latency flags") Link: http://lkml.kernel.org/r/20170216201352.469c99de@grimm.local.home Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 4 ++-- tools/lib/traceevent/event-parse.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4be92cf018c391c4ecc5fd091fae8c152de3692f Author: Arnaldo Carvalho de Melo Date: Wed Feb 15 21:36:48 2017 -0300 perf python: Filter out -specs=/a/b/c from the python binding cc options The -spec=/path/to/file can be used to change what gcc puts in the cc, ld, etc command lines, but this is not present in clang, filter it out at the setup.py file by changing python2's internal variable where it keeps its initial CFLAGS value. With this all of perf can be built in at least Fedora 25, fixing this problem: GEN /tmp/build/perf/python/perf.so CC /tmp/build/perf/builtin-buildid-list.o clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] error: command 'clang' failed with exit status 1 Now I need to change all the containers where I have clang to build perf with it, so that we can check that in other distros (opensuse, debian, ubuntu, etc) this also works. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-g9lhgr162ao8ao29vvf0hgm1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8bd8c6533369a013297e0eec7898b37290852a73 Author: Arnaldo Carvalho de Melo Date: Wed Feb 15 21:31:40 2017 -0300 tools perf scripting python: clang doesn't have -spec, remove it Gcc has a -spec option to override what options to pass to cc, etc, and in some distros this is used, like in fedora, where we end up getting this passed to gcc that makes clang, that doesn't have this option to stop the build: CC /tmp/build/perf/util/scripting-engines/trace-event-python.o clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] So filter this out when the compiler used is clang, this way we can build the python scripting support in tools/perf/. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2gosxoiouf24pnlknp7w7q4z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 7 +++++++ tools/perf/util/scripting-engines/trace-event-python.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit cfd75c2db17ef70590d7f04dfc254cf003b9cd77 Author: Robert Schiele Date: Thu Jan 26 16:00:05 2017 +0100 MIPS: VDSO: Explicitly use -fno-asynchronous-unwind-tables Not every toolchain has -fno-asynchronous-unwind-tables per default on MIPS. This patch specifies the necessary option explicitly for VDSO library build. This prevents the following build failure: GENVDSO arch/mips/vdso/vdso-image.c arch/mips/vdso/genvdso: 'arch/mips/vdso/vdso.so.dbg' contains relocation sections .../arch/mips/vdso/Makefile:84: recipe for target 'arch/mips/vdso/vdso-image.c' failed Signed-off-by: Robert Schiele Signed-off-by: Alexander Sverdlin Cc: Ralf Baechle Cc: "Maciej W. Rozycki" Cc: Alexander Sverdlin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15127/ Signed-off-by: James Hogan arch/mips/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) commit 843574a3ede1d4d3f3c88317a50d5c76d5a9515c Author: Markus Elfring Date: Sun Jan 22 17:41:07 2017 +0100 KVM: Return an error code only as a constant in kvm_get_dirty_log() * Return an error code without storing it in an intermediate variable. * Delete the local variable "r" and the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 58d6db34917278614cbb3a329b66498658560a46 Author: Markus Elfring Date: Sun Jan 22 17:30:16 2017 +0100 KVM: Return an error code only as a constant in kvm_get_dirty_log_protect() * Return an error code without storing it in an intermediate variable. * Delete the local variable "r" and the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit f6a3b168e56abe094b5c93dbafc2f0a0bf64e702 Author: Markus Elfring Date: Sun Jan 22 11:30:21 2017 +0100 KVM: Return directly after a failed copy_from_user() in kvm_vm_compat_ioctl() * Return directly after a call of the function "copy_from_user" failed in a case block. This issue was detected by using the Coccinelle software. * Delete the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bd7e5b0899a429445cc6e3037c13f8b5ae3be903 Author: Paolo Bonzini Date: Fri Feb 3 21:18:52 2017 -0800 KVM: x86: remove code for lazy FPU handling The FPU is always active now when running KVM. Reviewed-by: David Matlack Reviewed-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 -- arch/x86/kvm/cpuid.c | 2 - arch/x86/kvm/svm.c | 43 ++------------- arch/x86/kvm/vmx.c | 112 ++++++---------------------------------- arch/x86/kvm/x86.c | 7 +-- include/linux/kvm_host.h | 1 - 6 files changed, 19 insertions(+), 149 deletions(-) commit 460df4c1fc7c00829050c08d6368dc6e6beef307 Author: Paolo Bonzini Date: Wed Feb 8 11:50:15 2017 +0100 KVM: race-free exit from KVM_RUN without POSIX signals The purpose of the KVM_SET_SIGNAL_MASK API is to let userspace "kick" a VCPU out of KVM_RUN through a POSIX signal. A signal is attached to a dummy signal handler; by blocking the signal outside KVM_RUN and unblocking it inside, this possible race is closed: VCPU thread service thread -------------------------------------------------------------- check flag set flag raise signal (signal handler does nothing) KVM_RUN However, one issue with KVM_SET_SIGNAL_MASK is that it has to take tsk->sighand->siglock on every KVM_RUN. This lock is often on a remote NUMA node, because it is on the node of a thread's creator. Taking this lock can be very expensive if there are many userspace exits (as is the case for SMP Windows VMs without Hyper-V reference time counter). As an alternative, we can put the flag directly in kvm_run so that KVM can see it: VCPU thread service thread -------------------------------------------------------------- raise signal signal handler set run->immediate_exit KVM_RUN check run->immediate_exit Reviewed-by: Radim Krčmář Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 13 ++++++++++++- arch/arm/kvm/arm.c | 4 ++++ arch/mips/kvm/mips.c | 7 ++++++- arch/powerpc/kvm/powerpc.c | 6 +++++- arch/s390/kvm/kvm-s390.c | 4 ++++ arch/x86/kvm/x86.c | 6 +++++- include/uapi/linux/kvm.h | 4 +++- 7 files changed, 39 insertions(+), 5 deletions(-) commit cce59c225920309e03c2ea350ed6a0e233e33963 Author: Prahlad V Date: Fri Feb 17 02:03:35 2017 +0530 spi: ti-qspi: revise ti_qspi_probe() failure flow call spi_master_put() in case of failures after spi_alloc_master(). call pm_runtime_disable() in case of failures after pm_runtime_enable(). Signed-off-by: Prahlad V Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7ba8ba3f4f9604ce776475e3b501e41c762af797 Author: Jeeja KP Date: Fri Feb 17 15:04:46 2017 +0530 ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 02983449c87b1dfd9b75af4c8a2a8057f9664c08 Author: Gavin Shan Date: Wed Jan 11 12:09:05 2017 +1100 powerpc/powernv: Remove unused variable in pnv_pci_sriov_disable() The local variable @iov isn't used, to remove it. Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 2 -- 1 file changed, 2 deletions(-) commit 727597d12140b342a3deef10348b5edeb076275d Author: Gavin Shan Date: Wed Feb 8 14:11:03 2017 +1100 powerpc/kernel: Remove error message in pcibios_setup_phb_resources() The CAPI driver creates virtual PHB (vPHB) from the CAPI adapter. The vPHB's IO and memory windows aren't built from device-tree node as we do for normal PHBs. A error message is thrown in below path when trying to probe AFUs contained in the adapter. The error message is confusing and unnecessary. cxl_probe() pci_init_afu() cxl_pci_vphb_add() pcibios_scan_phb() pcibios_setup_phb_resources() This removes the error message. We might have the case where the first memory window on real PHB isn't populated properly because of error in "ranges" property in the device-tree node. We can check the device-tree instead for that. This also removes one unnecessary blank line in the function. Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/pci-common.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit bdfdaf1a016ef09cb941f2edad485a713510b8d5 Author: Mirko Parthey Date: Wed Feb 15 23:31:30 2017 +0100 MIPS: BCM47XX: Fix button inversion for Asus WL-500W The Asus WL-500W buttons are active high, but the software treats them as active low. Fix the inverted logic. Fixes: 3be972556fa1 ("MIPS: BCM47XX: Import buttons database from OpenWrt") Signed-off-by: Mirko Parthey Acked-by: Rafał Miłecki Cc: Hauke Mehrtens Cc: linux-mips@linux-mips.org Cc: # 3.14.x- Patchwork: https://patchwork.linux-mips.org/patch/15295/ Signed-off-by: James Hogan arch/mips/bcm47xx/buttons.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 650a2b29cd4aeff6e4d27d823c5f0dcea6566c8b Author: Ian Pozella Date: Thu Feb 16 12:33:30 2017 +0000 MIPS: DTS: Add img directory to Makefile An img directory exists for the Pistchio SoC device tree but the directory itself isn't in the dts Makefile meaning the dtbs never get built. Fixes: daa10170da27 ("MIPS: DTS: img: add device tree for Marduk board") Signed-off-by: Ian Pozella Reviewed-by: Rahul Bedarkar Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15309/ Signed-off-by: James Hogan arch/mips/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+) commit c618f6b188a9170f67e4abd478d250cc72aed1e1 Author: Gavin Shan Date: Wed Feb 8 14:16:50 2017 +1100 powerpc/mm: Fix typo in set_pte_at() This fixes the typo about the _PAGE_PTE in set_pte_at() by changing "tryint" to "trying to". Signed-off-by: Gavin Shan Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b617649468390713db1515ea79fc772d2eb897a8 Author: Arnd Bergmann Date: Fri Feb 3 17:43:50 2017 +0100 MIPS: ip27: Disable qlge driver in defconfig One of the last remaining failures in kernelci.org is for a gcc bug: drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: error: insn does not satisfy its constraints: drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: internal compiler error: in extract_constrain_insn, at recog.c:2190 This is apparently broken in gcc-6 but fixed in gcc-7, and I cannot reproduce the problem here. However, it is clear that ip27_defconfig does not actually need this driver as the platform has only PCI-X but not PCIe, and the qlge adapter in turn is PCIe-only. The driver was originally enabled in 2010 along with lots of other drivers. Fixes: 59d302b342e5 ("MIPS: IP27: Make defconfig useful again.") Signed-off-by: Arnd Bergmann Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15197/ Signed-off-by: James Hogan arch/mips/configs/ip27_defconfig | 1 - 1 file changed, 1 deletion(-) commit a726f1d2dd4fee179aa4513176d688ad309de6cc Author: Purna Chandra Mandal Date: Thu Jun 2 14:51:42 2016 +0530 MIPS: pic32mzda: Fix linker error for pic32_get_pbclk() Early clock API pic32_get_pbclk() is defined in early_clk.c and used by time.c and early_console.c. When CONFIG_EARLY_PRINTK isn't set, early_clk.c isn't compiled and time.c fails to link. Fix it by compiling early_clk.c always. Also sort files in alphabetical order. Fixes: 6e4ad1b41360 ("MIPS: pic32mzda: fix getting timer clock rate.") Reported-by: Harvey Hunt Signed-off-by: Purna Chandra Mandal Reviewed-by: Harvey Hunt Cc: Ralf Baechle Cc: Joshua Henderson Cc: linux-mips@linux-mips.org Cc: # 4.7.x- Patchwork: https://patchwork.linux-mips.org/patch/13383/ Signed-off-by: James Hogan arch/mips/pic32/pic32mzda/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 774f0c6419bb8f9d83901d33582c7fe3ba6a6cb3 Author: Felix Fietkau Date: Thu Jan 19 14:20:09 2017 +0100 MIPS: Lantiq: Keep ethernet enabled during boot Disabling ethernet during reboot (only to enable it again when the ethernet driver attaches) can put the chip into a faulty state where it corrupts the header of all incoming packets. This happens if packets arrive during the time window where the core is disabled, and it can be easily reproduced by rebooting while sending a flood ping to the broadcast address. Fixes: 95135bfa7ead ("MIPS: Lantiq: Deactivate most of the devices by default") Signed-off-by: Felix Fietkau Acked-by: John Crispin Cc: hauke.mehrtens@lantiq.com Cc: linux-mips@linux-mips.org Cc: # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/15078/ Signed-off-by: James Hogan arch/mips/lantiq/xway/sysctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 884b426917e4b3c85f33b382c792a94305dfdd62 Author: James Cowgill Date: Mon Jan 9 16:52:28 2017 +0000 MIPS: OCTEON: Fix copy_from_user fault handling for large buffers If copy_from_user is called with a large buffer (>= 128 bytes) and the userspace buffer refers partially to unreadable memory, then it is possible for Octeon's copy_from_user to report the wrong number of bytes have been copied. In the case where the buffer size is an exact multiple of 128 and the fault occurs in the last 64 bytes, copy_from_user will report that all the bytes were copied successfully but leave some garbage in the destination buffer. The bug is in the main __copy_user_common loop in octeon-memcpy.S where in the middle of the loop, src and dst are incremented by 128 bytes. The l_exc_copy fault handler is used after this but that assumes that "src < THREAD_BUADDR($28)". This is not the case if src has already been incremented. Fix by adding an extra fault handler which rewinds the src and dst pointers 128 bytes before falling though to l_exc_copy. Thanks to the pwritev test from the strace test suite for originally highlighting this bug! Fixes: 5b3b16880f40 ("MIPS: Add Cavium OCTEON processor support ...") Signed-off-by: James Cowgill Acked-by: David Daney Reviewed-by: James Hogan Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14978/ Signed-off-by: James Hogan arch/mips/cavium-octeon/octeon-memcpy.S | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 66fd848cadaa6be974a8c780fbeb328f0af4d3bd Author: Ralf Baechle Date: Thu Jan 26 02:16:47 2017 +0100 MIPS: Fix special case in 64 bit IP checksumming. For certain arguments such as saddr = 0xc0a8fd60, daddr = 0xc0a8fda1, len = 80, proto = 17, sum = 0x7eae049d there will be a carry when folding the intermediate 64 bit checksum to 32 bit but the code doesn't add the carry back to the one's complement sum, thus an incorrect result will be generated. Reported-by: Mark Zhang Signed-off-by: Ralf Baechle Reviewed-by: James Hogan Cc: stable@vger.kernel.org Signed-off-by: James Hogan arch/mips/include/asm/checksum.h | 2 ++ 1 file changed, 2 insertions(+) commit 49f4b08e61547a5ccd2db551d994c4503efe5666 Author: Gavin Shan Date: Thu Feb 16 10:22:34 2017 +1100 pci/hotplug/pnv-php: Disable MSI and PCI device properly pnv_php_disable_irq() can be called in two paths: Bailing path in pnv_php_enable_irq() or releasing slot. The MSI (or MSIx) interrupts is disabled unconditionally in pnv_php_disable_irq(). It's wrong because that might be enabled by drivers other than pnv-php. This disables MSI (or MSIx) interrupts and the PCI device only if it was enabled by pnv-php. In the error path of pnv_php_enable_irq(), we rely on the newly added parameter @disable_device. In the path of releasing slot, @pnv_php->irq is checked. Cc: # v4.9+ Fixes: 360aebd85a4c ("drivers/pci/hotplug: Support surprise hotplug in powernv driver") Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 303529d6ef1293513c2c73c9ab86489eebb37d08 Author: Gavin Shan Date: Thu Feb 16 10:22:33 2017 +1100 pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts The root port or PCIe switch downstream port might have been associated with driver other than pnv-php. The MSI or MSIx might also have been enabled by that driver (e.g. pcieport_drv). Attempt to enable MSI incurs below backtrace: PowerPC PowerNV PCI Hotplug Driver version: 0.1 ------------[ cut here ]------------ WARNING: CPU: 19 PID: 1004 at drivers/pci/msi.c:1071 \ __pci_enable_msi_range+0x84/0x4e0 NIP [c000000000665c34] __pci_enable_msi_range+0x84/0x4e0 LR [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0 Call Trace: [c000000384d67600] [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0 [c000000384d676e0] [d00000000aa31b04] pnv_php_register+0x564/0x5a0 [pnv_php] [c000000384d677c0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php] [c000000384d678a0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php] [c000000384d67980] [d00000000aa31dfc] pnv_php_init+0x60/0x98 [pnv_php] [c000000384d679f0] [c00000000000cfdc] do_one_initcall+0x6c/0x1d0 [c000000384d67ab0] [c000000000b92354] do_init_module+0x94/0x254 [c000000384d67b40] [c00000000019719c] load_module+0x258c/0x2c60 [c000000384d67d30] [c000000000197bb0] SyS_finit_module+0xf0/0x170 [c000000384d67e30] [c00000000000b184] system_call+0x38/0xe0 This fixes the issue by skipping enabling the surprise hotplug capability if the MSI or MSIx on the PCI slot's upstream port has been enabled by other driver. Cc: # v4.9+ Fixes: 360aebd85a4c ("drivers/pci/hotplug: Support surprise hotplug in powernv driver") Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Tested-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 36c7c9da40c408a71e5e6bfe12e57dcf549a296d Author: Gavin Shan Date: Thu Feb 16 10:22:32 2017 +1100 pci/hotplug/pnv-php: Remove WARN_ON() in pnv_php_put_slot() The WARN_ON() causes unnecessary backtrace when putting the parent slot, which is likely to be NULL. WARNING: CPU: 2 PID: 1071 at drivers/pci/hotplug/pnv_php.c:85 \ pnv_php_release+0xcc/0x150 [pnv_php] : Call Trace: [c0000003bc007c10] [d00000000ad613c4] pnv_php_release+0x144/0x150 [pnv_php] [c0000003bc007c40] [c0000000006641d8] pci_hp_deregister+0x238/0x330 [c0000003bc007cd0] [d00000000ad61440] pnv_php_unregister_one+0x70/0xa0 [pnv_php] [c0000003bc007d10] [d00000000ad614c0] pnv_php_unregister+0x50/0x80 [pnv_php] [c0000003bc007d40] [d00000000ad61e84] pnv_php_exit+0x50/0xcb4 [pnv_php] [c0000003bc007d70] [c00000000019499c] SyS_delete_module+0x1fc/0x2a0 [c0000003bc007e30] [c00000000000b184] system_call+0x38/0xe0 Cc: # v4.8+ Fixes: 66725152fb9f ("PCI/hotplug: PowerPC PowerNV PCI hotplug driver") Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Tested-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a4f17608162bbbdcdd9680789b1bc61017cefa3 Author: Thomas Huth Date: Thu Feb 16 22:07:12 2017 +0100 KVM: PPC: Book3S HV: Turn "KVM guest htab" message into a debug message The average user likely does not know what a "htab" or "LPID" is, and it's annoying that these messages are quickly filling the dmesg log when you're doing boot cycle tests, so let's turn it into a debug message instead. Signed-off-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71367b3fa7f56256029e7ed87862ef13386e1e7e Author: Jeff Mahoney Date: Wed Feb 15 16:28:34 2017 -0500 btrfs: use btrfs_debug instead of pr_debug in transaction abort Commit e5d6b12fe14 (Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors) added a pr_debug call to be printed when a transaction is aborted with -EIO instead of WARN. btrfs_debug prints which file system the message is associated with so let's use that instead. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21e75ffe3cd2c99ca4ea5ecb25dcbeb6a8024c30 Author: Jeff Mahoney Date: Wed Feb 15 16:28:32 2017 -0500 btrfs: btrfs_truncate_free_space_cache always allocates path btrfs_truncate_free_space_cache always allocates a btrfs_path structure but only uses it when the caller passes a block group. Let's move the allocation and free into the conditional. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 77ab86bf1c64ab282f2230521c7d4d7f69ea3a3f Author: Jeff Mahoney Date: Wed Feb 15 16:28:30 2017 -0500 btrfs: free-space-cache, clean up unnecessary root arguments The free space cache APIs accept a root but always use the tree root. Also, btrfs_truncate_free_space_cache accepts a root AND an inode but the inode always points to the root anyway, so let's just pass the inode. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 9 +++++---- fs/btrfs/free-space-cache.c | 25 +++++++++++-------------- fs/btrfs/free-space-cache.h | 7 +++---- fs/btrfs/inode-map.c | 2 +- fs/btrfs/relocation.c | 5 ++--- 5 files changed, 22 insertions(+), 26 deletions(-) commit 5e00f1939f6e994123589c6e3d307de02b43c914 Author: Jeff Mahoney Date: Wed Feb 15 16:28:29 2017 -0500 btrfs: convert btrfs_inc_block_group_ro to accept fs_info btrfs_inc_block_group_ro is either passed the extent root or the dev root, but it doesn't do anything with the dev tree. Let's convert to passing an fs_info and using the extent root. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 5 ++--- fs/btrfs/relocation.c | 2 +- fs/btrfs/scrub.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) commit 0c9ab349c2058736594ce82531673a1b4645420d Author: Jeff Mahoney Date: Wed Feb 15 16:28:28 2017 -0500 btrfs: flush_space always takes fs_info->fs_root We don't need to pass a root to flush_space since it always uses the fs_root. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 87bde3cdfc7848980fc89f1979d2b24879f478c9 Author: Jeff Mahoney Date: Wed Feb 15 16:28:27 2017 -0500 btrfs: pass fs_info to (more) routines that are only called with extent_root Outside of interactions with qgroups, the roots passed in extent-tree.c are usually passed to ensure that we don't do refcounts on log trees or to get the allocation profile for an allocation request. Otherwise, it operates on the extent root. This patch converts some more routines in extent-tree.c that are always called with the extent root to accept an fs_info instead. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 103 +++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 50 deletions(-) commit fb235dc06fac9eaa4408ade9c8b20d45d63c89b7 Author: Qu Wenruo Date: Wed Feb 15 10:43:03 2017 +0800 btrfs: qgroup: Move half of the qgroup accounting time out of commit trans Just as Filipe pointed out, the most time consuming parts of qgroup are btrfs_qgroup_account_extents() and btrfs_qgroup_prepare_account_extents(). Which both call btrfs_find_all_roots() to get old_roots and new_roots ulist. What makes things worse is, we're calling that expensive btrfs_find_all_roots() at transaction committing time with TRANS_STATE_COMMIT_DOING, which will blocks all incoming transaction. Such behavior is necessary for @new_roots search as current btrfs_find_all_roots() can't do it correctly so we do call it just before switch commit roots. However for @old_roots search, it's not necessary as such search is based on commit_root, so it will always be correct and we can move it out of transaction committing. This patch moves the @old_roots search part out of commit_transaction(), so in theory we can half the time qgroup time consumption at commit_transaction(). But please note that, this won't speedup qgroup overall, the total time consumption is still the same, just reduce the performance stall. Cc: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 20 ++++++++++++++++---- fs/btrfs/qgroup.c | 33 +++++++++++++++++++++++++++++---- fs/btrfs/qgroup.h | 33 ++++++++++++++++++++++++++++++--- 3 files changed, 75 insertions(+), 11 deletions(-) commit 15b34517a6368c607ae7fd51c24cdc69efcd47fc Author: David Sterba Date: Fri Feb 10 20:30:23 2017 +0100 btrfs: remove unused parameter from adjust_slots_upwards Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0e8d931a824aa1585e638d3c51cb172dfc982595 Author: David Sterba Date: Fri Feb 10 20:26:24 2017 +0100 btrfs: remove unused parameters from __btrfs_write_out_cache Both unused after the call to update_cache_item has been moved to __btrfs_wait_cache_io. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7bf1a159125f1d8d6833daca3818e0ad2af62459 Author: David Sterba Date: Fri Feb 10 20:23:00 2017 +0100 btrfs: remove unused parameter from cleanup_write_cache_enospc bitmap_list is unused since the io_ctl framework. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d75eefdf9671115ce810598e15f72d20e3de0906 Author: David Sterba Date: Fri Feb 10 20:20:19 2017 +0100 btrfs: remove unused parameter from __add_inode_ref Unused since the helper has been split, eb used in the caller. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/tree-log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4a0ab9d711e9c2817c46c3f88cd1c36c917a4823 Author: David Sterba Date: Fri Feb 10 20:18:49 2017 +0100 btrfs: remove unused parameter from clone_copy_inline_extent Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1a287cfea17c3c14c03151fa970baf86b9055c26 Author: David Sterba Date: Fri Feb 10 20:15:10 2017 +0100 btrfs: remove unused parameters from btrfs_cmp_data After the page locking has been reworked, we get all pages prepared via cmp_pages. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit eeac44cb498d6380d5ea947b324892afa5d89615 Author: David Sterba Date: Fri Feb 10 19:57:27 2017 +0100 btrfs: remove unused parameter from __add_inline_refs Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/backref.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e5987e1319e7b8155994407df9eb8f108871350b Author: David Sterba Date: Fri Feb 10 19:55:54 2017 +0100 btrfs: remove unused parameters from scrub_setup_wr_ctx Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 61d7e4cb1173234910ee97c22d1ecf5caee88bf0 Author: David Sterba Date: Fri Feb 10 19:54:06 2017 +0100 btrfs: remove unused parameter from create_snapshot The name parameters have never been used, as the name is passed via the dentry. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4a4dce72ebda97a930b1269add5575c7841befc Author: David Sterba Date: Fri Feb 10 19:49:01 2017 +0100 btrfs: remove unused parameter from init_first_rw_device The 'device' used to be added in that function, but now it's done by the caller. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 72b468c8daeba50ac85e9d7b92eda18a55c56d18 Author: David Sterba Date: Fri Feb 10 19:46:27 2017 +0100 btrfs: remove unused parameter from __btrfs_alloc_chunk We grab fs_info from other parameters. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 56e033a7874ae4bb5204a38fd5d5cf99c1311321 Author: David Sterba Date: Fri Feb 10 19:44:31 2017 +0100 btrfs: remove unused parameter from btrfs_fill_super Never used for anything meaningful since we have our own superblock filler. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/super.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4242b64a4c495dea7da4825b258dcf2659ab5f81 Author: David Sterba Date: Fri Feb 10 19:38:24 2017 +0100 btrfs: remove unused parameter from extent_write_cache_pages The 'tree' was used to call locking hook that does not exist anymore. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit df9f628e3d316e7a254aa8ac002199a33a02b167 Author: David Sterba Date: Fri Feb 10 19:35:37 2017 +0100 btrfs: remove unused parameter from add_pending_csums Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3d4b9496e87fb96d25f9c995a7b965c1535de6b9 Author: David Sterba Date: Fri Feb 10 19:33:41 2017 +0100 btrfs: remove unused parameter from update_nr_written The logic has been updated in "Btrfs: make mapping->writeback_index point to the last written page" (a91326679f2a0a4c2) and page is not needed anymore. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c2df8bb43f750b5522151fa41d28251d39322701 Author: David Sterba Date: Fri Feb 10 19:29:38 2017 +0100 btrfs: remove unused parameter from submit_extent_page This used to hold number of maximum pages to allocate, but this is now limited by BIO_MAX_PAGES. The local are now unused and removed as well. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit f1e30261925526990a880d1ef0e54c65a4607976 Author: David Sterba Date: Fri Feb 10 19:25:51 2017 +0100 btrfs: remove unused parameter from tree_move_next_or_upnext Not needed. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ab6a43e1221b55c1587a8e7a05deda61f4d25800 Author: David Sterba Date: Fri Feb 10 19:24:53 2017 +0100 btrfs: remove unused parameter from tree_move_down Never needed. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d3a126a81f152a5abfe19916a5099d2bbd38f9d Author: David Sterba Date: Fri Feb 10 19:23:20 2017 +0100 btrfs: remove unused parameter from btrfs_check_super_valid None of the checks need to know the ro/rw status as they're all not changing the superblock. Moreover, we can access the sb flags directly if we'd need to decide by the ro/rw status. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8b74c03e3c16c7a5a127a584bee687cd1578ceaa Author: David Sterba Date: Fri Feb 10 19:20:56 2017 +0100 btrfs: remove unused parameter from btrfs_prepare_extent_commit Added but never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 3 +-- fs/btrfs/transaction.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) commit 7775c8184ec018deae89ccbc3ed1e319c910ca59 Author: David Sterba Date: Fri Feb 10 19:18:18 2017 +0100 btrfs: remove unused parameter from btrfs_subvolume_release_metadata Unused since qgroup refactoring that split data and metadata accounting, the btrfs_qgroup_free helper. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 3 +-- fs/btrfs/ioctl.c | 11 ++++------- 3 files changed, 6 insertions(+), 11 deletions(-) commit 66cb7ddbf2a20517a6efb23960fadf698738e861 Author: David Sterba Date: Fri Feb 10 19:14:36 2017 +0100 btrfs: remove unused parameter from __push_leaf_left Unused since long ago. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1e47eef223bd53d54085832598afedf8bd6b5c77 Author: David Sterba Date: Fri Feb 10 19:13:06 2017 +0100 btrfs: remove unused parameter from __push_leaf_right Unused since long ago. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit eece6a9cf69140fe1886f14d9a96add4f9929d78 Author: David Sterba Date: Fri Feb 10 19:04:32 2017 +0100 btrfs: merge two superblock writing helpers write_all_supers and write_ctree_super are almost equal, the parameter 'trans' is unused so we can drop it and have just one helper. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 +------- fs/btrfs/disk-io.h | 3 +-- fs/btrfs/transaction.c | 2 +- fs/btrfs/tree-log.c | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) commit b75f50624394fff4f0e6521fda673317d5b79309 Author: David Sterba Date: Fri Feb 10 18:52:06 2017 +0100 btrfs: remove unused parameter from write_dev_supers The barriers are handled by the caller. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4961e2930f0324dedd47f09108cd4c81c0ee4010 Author: David Sterba Date: Fri Feb 10 18:49:53 2017 +0100 btrfs: remove unused parameter from split_item Never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7c302b49dd757b03d12bec772e1d1f462684c991 Author: David Sterba Date: Fri Feb 10 18:47:57 2017 +0100 btrfs: remove unused parameter from clean_tree_block Added but never needed. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 16 ++++++++-------- fs/btrfs/disk-io.c | 3 +-- fs/btrfs/disk-io.h | 3 +-- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/free-space-tree.c | 2 +- fs/btrfs/qgroup.c | 2 +- fs/btrfs/tree-log.c | 6 +++--- 7 files changed, 17 insertions(+), 19 deletions(-) commit e27f62652b89d0701d87112339f286ebf24ffc8c Author: David Sterba Date: Fri Feb 10 18:46:09 2017 +0100 btrfs: remove unused parameter from check_async_write Added but never used. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cda79c545ead7e00b1adaf82a13fcea892bf1f43 Author: David Sterba Date: Fri Feb 10 18:44:32 2017 +0100 btrfs: remove unused parameter from read_block_for_search Never used in that function. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6655bc3de1078f8343263b8d822d0aa2236d86b4 Author: David Sterba Date: Wed Feb 15 16:47:36 2017 +0100 btrfs: ulist: rename ulist_fini to ulist_release Change the name so it matches the naming we already use eg. for btrfs_path. Suggested-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 8 ++++---- fs/btrfs/ulist.c | 10 +++++----- fs/btrfs/ulist.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit 4ae8553c2d8811f41fe8d785646e90fd1580843f Author: David Sterba Date: Mon Feb 13 15:05:33 2017 +0100 btrfs: remove pointless rcu protection from btrfs_qgroup_inherit There was never need for RCU protection around reading nodesize or other fairly constant filesystem data. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 2 -- 1 file changed, 2 deletions(-) commit 0b08e1f4f7b7af719500f5f37a60c342ba812f69 Author: David Sterba Date: Mon Feb 13 14:24:35 2017 +0100 btrfs: qgroups: opencode qgroup_free helper The helper name is not too helpful and is just wrapping a simple call. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9ea6e2b54847a08da87c118e6a197f27eb9b0159 Author: David Sterba Date: Mon Feb 13 14:07:02 2017 +0100 btrfs: remove unnecessary mutex lock in qgroup_account_snapshot The quota status used to be tracked as a variable, so the mutex was needed (until "Btrfs: add a flags field to btrfs_fs_info" afcdd129e05a9). Since the status is a bit modified atomically and we don't hold the mutex beyond the check, we can drop it. Signed-off-by: David Sterba fs/btrfs/transaction.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 81353d50f5274e435105391b669e05aaf62c8609 Author: David Sterba Date: Mon Feb 13 14:05:24 2017 +0100 btrfs: check quota status earlier and don't do unnecessary frees Status of quotas should be the first check in btrfs_qgroup_account_extent and we can return immediatelly, no need to do no-op ulist frees. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 53d3235995b3f87754a42de24d707f158c1b3b40 Author: David Sterba Date: Mon Feb 13 13:42:29 2017 +0100 btrfs: embed extent_changeset::range_changed to the structure We can embed range_changed to the extent changeset to address following problems: - no need to allocate ulist dynamically, we also get rid of the GFP_NOFS for free - fix lack of allocation failure checking in btrfs_qgroup_reserve_data The stack consuption where extent_changeset is used slightly increases: before: 16 after: 16 - 8 (for pointer) + 32 (sizeof ulist) = 40 Which is bearable. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/qgroup.c | 24 +++++++++--------------- 3 files changed, 11 insertions(+), 17 deletions(-) commit 9d037933861805799db4edfd075412a39e2549f4 Author: David Sterba Date: Mon Feb 13 13:40:16 2017 +0100 btrfs: ulist: make the finalization function public Make ulist_fini externally visible so the ulist API is complete. Signed-off-by: David Sterba fs/btrfs/ulist.c | 2 +- fs/btrfs/ulist.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 025db916aa7f2cf31183080a82ef090d30cf270f Author: David Sterba Date: Mon Feb 13 13:00:51 2017 +0100 btrfs: qgroups: make __del_qgroup_relation static Internal helper. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d4805386ef17ebaf6ada087138d548c469369ad Author: David Sterba Date: Mon Jan 23 17:28:19 2017 +0100 btrfs: make space cache inode readahead failure nonfatal We do a readahead of the free space cache inode to speed things up but the failure is not fatal, like in other readahead cases. Proper reads would need to happen anyway and any errors would be caught there. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6602caf149cc7698fc94160803c598ae708d686c Author: David Sterba Date: Mon Feb 13 12:41:02 2017 +0100 btrfs: use GFP_KERNEL in btrfs_add/del_qgroup_relation Qgroup relations are added/deleted from ioctl, we hold the high level qgroup lock, no deadlocks or recursion from the allocation possible here. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52bf8e7aeabb3d16abe2c30df60a0919bfaaaef4 Author: David Sterba Date: Mon Feb 13 11:03:44 2017 +0100 btrfs: use GFP_KERNEL in btrfs_quota_enable We don't need to use GFP_NOFS here as this is called from ioctls an the only lock held is the subvol_sem, which is of a high level and protects creation/renames/deletion and is never held in the writeout paths. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 323b88f4ab668d957a75befcb1079ae9a6e9e4d1 Author: David Sterba Date: Mon Feb 13 12:10:20 2017 +0100 btrfs: use GFP_KERNEL in btrfs_read_qgroup_config The qgroup config is read during mount, we do not have to use NOFS. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23269bf5eafb3bd8036d9412a80cbfc25f98f1a3 Author: David Sterba Date: Mon Feb 13 11:03:44 2017 +0100 btrfs: use GFP_KERNEL in create_snapshot We don't need to use GFP_NOFS here as this is called from ioctls an the only lock held is the subvol_sem, which is of a high level and protects creation/renames/deletion and is never held in the writeout paths. Signed-off-by: David Sterba fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1af4a0aaa5d4bfcd17020f0620017a3057a9fb8d Author: Liu Bo Date: Mon Feb 13 15:35:09 2017 -0800 Btrfs: specify a new ordered extent type for create_io_em As 0 refers to an existing type BTRFS_ORDERED_IO_DONE, this specifies a new type 'REGULAR' for regular IO. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- fs/btrfs/ordered-data.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 6f9994dbabe5756df1922d84a568cbff74ae1323 Author: Liu Bo Date: Tue Jan 31 07:50:22 2017 -0800 Btrfs: create a helper to create em for IO We have similar codes to create and insert extent mapping around IO path, this merges them into a single helper. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 189 ++++++++++++++++++++++--------------------------------- 1 file changed, 74 insertions(+), 115 deletions(-) commit 4136135b080f5680fb31eda9348d1f636e4dbfb9 Author: Liu Bo Date: Mon Feb 13 15:42:21 2017 -0800 Btrfs: use helper to get used bytes of space_info This uses a helper instead of open code around used byte of space_info everywhere. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit 0c9b36e0d72c0648d5274adf9b7a2141e1085208 Author: Liu Bo Date: Mon Feb 13 15:42:30 2017 -0800 Btrfs: try to avoid acquiring free space ctl's lock We don't need to take the lock if the block group has not been cached. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 6f6b643e44ef79cbd85e69800a06326805829aa8 Author: Qu Wenruo Date: Thu Feb 9 10:45:06 2017 +0800 btrfs: Better csum error message for data csum mismatch The original csum error message only outputs inode number, offset, check sum and expected check sum. However no root objectid is outputted, which sometimes makes debugging quite painful under multi-subvolume case (including relocation). Also the checksum output is decimal, which seldom makes sense for users/developers and is hard to read in most time. This patch will add root objectid, which will be %lld for rootid larger than LAST_FREE_OBJECTID, and hex csum output for better readability. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 18 ++++++++++++++++++ fs/btrfs/compression.c | 6 ++---- fs/btrfs/inode.c | 5 ++--- 3 files changed, 22 insertions(+), 7 deletions(-) commit fe01aa65385c226d822013b90608b67c485f8dc6 Author: Takafumi Kubota Date: Thu Feb 9 17:24:33 2017 +0900 Btrfs: add another missing end_page_writeback on submit_extent_page failure If btrfs_bio_alloc fails in submit_extent_page, submit_extent_page returns without clearing the writeback bit of the failed page. __extent_writepage_io, that is a caller of submit_extent_page, does not clear the remaining writeback bit anywhere. As a result, this will cause the hang at filemap_fdatawait_range, because it waits the writeback bit to be cleared from the failed page. So, we have to call end_page_writeback to clear the writeback bit. For reproducing the hang, we inject a fault like if (should_failtest()) { // I define should_failtest() bio = NULL; } else { bio = btrfs_bio_alloc(...); } in submit_extent_page. We should also check whether page has the bit before end_page_writeback, to avoid the conflict against the other end_page_writeback in bio_endio. Thus, we add PageWriteback checks not only in __extent_writepage_io, but also in write_one_eb too, because it misses the check. Signed-off-by: Takafumi Kubota Reviewed-by: Liu Bo Cc: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 66bbc1c0c0b283600abd187bf8c8c25ab7549307 Author: David Sterba Date: Thu Feb 9 16:47:43 2017 +0100 btrfs: remove unused ulist members Commit "btrfs: ulist: Add ulist_del() function" (d4b804045924d7f8) removed some debugging code but left the structure defintions. Reviewed-by: Qu Wenruo Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ulist.h | 7 ------- 1 file changed, 7 deletions(-) commit 76c0021db8fdd9c68fbbace15067f3ab6d57d77a Author: Liu Bo Date: Fri Feb 10 16:42:14 2017 +0100 Btrfs: use helper to simplify lock/unlock pages Since we have a helper to set page bits, let lock_delalloc_pages and __unlock_for_delalloc use it. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 74 +++++++--------------------------------------------- 1 file changed, 10 insertions(+), 64 deletions(-) commit da2c7009f6cafe0a550cf57a1aa79e0f1b3093d6 Author: Liu Bo Date: Fri Feb 10 16:41:05 2017 +0100 btrfs: teach __process_pages_contig about PAGE_LOCK operation Signed-off-by: Liu Bo Reviewed-by: David Sterba [ changes to the helper separated from the following patch ] Signed-off-by: David Sterba fs/btrfs/extent_io.c | 48 ++++++++++++++++++++++++++++++++++++++++++------ fs/btrfs/extent_io.h | 3 ++- 2 files changed, 44 insertions(+), 7 deletions(-) commit 6ae3f8ad2017079292cb49c8959b527bcbcbefed Author: Russell Currey Date: Fri Feb 17 13:01:35 2017 +1100 powerpc: Add POWER9 architected mode to cputable PVR value of 0x0F000005 means we are arch v3.00 compliant (i.e. POWER9). Acked-by: Michael Neuling Signed-off-by: Russell Currey [mpe: Don't set num_pmcs, so we keep the PMU fields from the raw entry] Signed-off-by: Michael Ellerman arch/powerpc/kernel/cputable.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a2391b35f1d9d5b51d43a9150c7239253565d5a6 Author: Madhavan Srinivasan Date: Sat Dec 24 11:35:49 2016 +0530 powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags() Cleanup to use is_kernel_addr macro. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78a16d9fc1206e1a484b6ac96348756f3846bfea Author: Madhavan Srinivasan Date: Mon Feb 13 17:02:54 2017 +0530 powerpc/perf: Avoid FAB_*_MATCH checks for power9 Since power9 does not support FAB_*_MATCH bits in MMCR1, avoid these checks for power9. For this, patch factor out code in isa207_get_constraint() to retain these checks only for power8. Patch also updates the comment in power9-pmu raw event encode layout to remove FAB_*_MATCH. Finally for power9, patch adds additional check for threshold events when adding the thresh mask and value in isa207_get_constraint(). fixes: 7ffd948fae4c ('powerpc/perf: factor out power8 pmu functions') fixes: 18201b204286 ('powerpc/perf: power9 raw event format encoding') Signed-off-by: Ravi Bangoria Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/isa207-common.c | 58 ++++++++++++++++++++++++++------------- arch/powerpc/perf/power9-pmu.c | 8 ++---- 2 files changed, 42 insertions(+), 24 deletions(-) commit 8d911904f3ce412b20874a9c95f82009dcbb007c Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:15 2017 +0530 powerpc/perf: Add restrictions to PMC5 in power9 DD1 PMC5 on POWER9 DD1 may not provide right counts in all sampling scenarios, hence use PM_INST_DISP event instead in PMC2 or PMC3 in preference. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/isa207-common.h | 4 ++++ arch/powerpc/perf/power9-pmu.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 356d8ce3d0a4a1d7c8448c4d234121736ad3d471 Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:14 2017 +0530 powerpc/perf: Use Instruction Counter value Since PM_INST_DISP include speculative instruction, based on the workload the dispatch count could vary considerably. Hence as an alternative, for completed instruction counting, program the PM_INST_DISP event to the MMCR* but use Instruction Counter register value. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8a088542c8f8d0bb458e4db2c01a2534f1adaf47 Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:13 2017 +0530 powerpc/perf: Use PM_INST_DISP for generic instructions sample Since PM_INST_CMPL may not provide right counts in all sampling scenarios in power9 DD1, instead use PM_INST_DISP. Patch also update generic instruction sampling with the same. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-pmu.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit a114aca57a59cd92189bf3795ac082a5e8fac0f1 Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:12 2017 +0530 powerpc/perf: Add alternative event table and function for power9 Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-pmu.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ac19670eb1798749121647bd9f0b403f52e31e6b Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:11 2017 +0530 powerpc/perf: Add PM_INST_DISP event to Power9 event list Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-events-list.h | 3 +++ 1 file changed, 3 insertions(+) commit efe881afdd9996ccbcd2a09c93b724f4ffc25991 Author: Madhavan Srinivasan Date: Sun Feb 12 22:33:10 2017 +0530 powerpc/perf: Factor out event_alternative function Factor out the power8 event_alternative function to share the code with power9. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/isa207-common.c | 36 ++++++++++++++++++++++++++++++++++++ arch/powerpc/perf/isa207-common.h | 3 +++ arch/powerpc/perf/power8-pmu.c | 35 ++--------------------------------- 3 files changed, 41 insertions(+), 33 deletions(-) commit 1e561f6166bacb9c12d6fa1d23df07999674573e Author: John Hsu Date: Fri Feb 17 09:55:33 2017 +0800 ASoC: nau8825: automatic BCLK and LRC divde in master mode configurable LRC and BCLK divide. The driver will make configurations of LRC and BCLK automatically according to BCLK and FS information in master mode. Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit d1be371d4f4c12d11023c9fc795e5d460d960680 Author: Zhao, Xinda Date: Fri Feb 17 14:38:33 2017 +0800 drm/i915/gvt: handle fence reg access during GPU reset Lots of reduntant log info will be printed out during GPU reset, including accessing untracked mmio register and fence register, variable disable_warn_untrack is added previously to handle the situation, but the accessing of fence register is ignored in the previously patch, so add it back. Besides, set the variable disable_warn_untrack to the defalut value after GPU reset is finished. Signed-off-by: Zhao, Xinda Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 15 +++++++++------ drivers/gpu/drm/i915/gvt/mmio.c | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) commit fd64be636708d808852c4c8c1efce0a0a51c24c5 Author: Min He Date: Fri Feb 17 15:02:36 2017 +0800 drm/i915/gvt: introduced failsafe mode into vgpu New failsafe mode is introduced, when we detect guest not supporting GVT-g. In failsafe mode, we will ignore all the MMIO and cfg space read/write from guest. This patch can fix the issue that when guest kernel or graphics driver version is too low, there will be a lot of kernel traces in host. V5: rebased onto latest gvt-staging V4: changed coding style by Zhenyu and Ping's advice V3: modified coding style and error messages according to Zhenyu's comment V2: 1) implemented MMIO/GTT/WP pages read/write logic; 2) used a unified function to enter failsafe mode Signed-off-by: Min He Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 3 ++ drivers/gpu/drm/i915/gvt/gvt.h | 6 ++++ drivers/gpu/drm/i915/gvt/handlers.c | 36 +++++++++++++++++++++ drivers/gpu/drm/i915/gvt/mmio.c | 62 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/vgpu.c | 6 +++- 5 files changed, 112 insertions(+), 1 deletion(-) commit 8fd4a62d875945fc8aacdb92fdc90161ec1d9bae Merge: 9ca7035 eb875d8 Author: Dave Airlie Date: Fri Feb 17 17:43:07 2017 +1000 Merge branch 'linux-4.11' of git://github.com/skeggsb/linux into drm-next - Rework of the secure boot code, in preparation for GP10x secure boot. - Improvements to channel recovery - Initial power budget code - Some preparation for an upcoming MMU rework (probably 4.12) - Misc other fixes. * 'linux-4.11' of git://github.com/skeggsb/linux: (88 commits) drm/nouveau/tmr: provide backtrace when a timeout is hit drm/nouveau/pci/g92: Fix rearm drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios drm/nouveau/hwmon: expose power_max and power_crit drm/nouveau/iccsense: Parse max and crit power level drm/nouveau/bios/power_budget: Add basic power budget parsing drm/nouveau/fifo/gk104-: preempt recovery drm/nouveau/fifo/gk104-: trigger mmu fault before attempting engine recovery drm/nouveau/fifo/gk104-: ACK SCHED_ERROR before attempting CTXSW_TIMEOUT recovery drm/nouveau/fifo/gk104-: directly use new recovery code for ctxsw timeout drm/nouveau/fifo/gk104-: directly use new recovery code for mmu faults drm/nouveau/fifo/gk104-: reset all engines a killed channel is still active on drm/nouveau/fifo/gk104-: refactor recovery code drm/nouveau/fifo/gk104-: better detection of chid when parsing engine status drm/nouveau/fifo/gk104-: separate out engine status parsing drm/nouveau/fifo: add an api for initiating channel recovery drm/nouveau/top: add function to translate subdev index to mmu fault id drm/nouveau/gr/gf100-: implement chsw_load() method drm/nouveau/gr: implement chsw_load() method drm/nouveau/core: add engine method to assist in determining chsw direction ... commit eb875d87d9ef87cb5565e2e1c4c720e9d4ee591c Author: Ben Skeggs Date: Fri Feb 17 15:08:10 2017 +1000 drm/nouveau/tmr: provide backtrace when a timeout is hit Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5112abc6a43372b2c1934717ed9bf132a427c46c Author: Karol Herbst Date: Sat Feb 11 12:58:17 2017 +0100 drm/nouveau/pci/g92: Fix rearm 704a6c008b7942bb7f30bb43d2a6bcad7f543662 broke pci msi rearm for g92 GPUs. g92 needs the nv46_pci_msi_rearm, where g94+ gpus used nv40_pci_msi_rearm. Reported-by: Andrew Randrianasulu Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 20 ++++----- drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/g92.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/g94.c | 49 +++++++++++++++++++++++ 5 files changed, 62 insertions(+), 11 deletions(-) commit 800efb4c2857ec543fdc33585bbcb1fd5ef28337 Author: Martin Peres Date: Thu Sep 29 03:41:35 2016 +0300 drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios This seems to be absolutely necessary for a lot of NV40. Reported-by: gsgf on IRC/freenode Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 7722e1b0b6accab2ca11da0e9c708459fff65fb4 Author: Karol Herbst Date: Mon Jan 23 23:10:13 2017 +0100 drm/nouveau/hwmon: expose power_max and power_crit Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 1efc3c4b9f5410aa8bae10bd4dc28573a0d31ab3 Author: Karol Herbst Date: Mon Jan 23 23:10:12 2017 +0100 drm/nouveau/iccsense: Parse max and crit power level Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit e5f8eabc0077ea3f77b3362e28d3969ae62e70f0 Author: Karol Herbst Date: Mon Jan 23 23:10:11 2017 +0100 drm/nouveau/bios/power_budget: Add basic power budget parsing v2: Set entry to 0xff if not found Add cap entry for ver 0x30 tables Rework to fix memory leak v3: More error checks Simplify check for invalid entries v4: disable for ver 0x10 for now move assignments after the second last return Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs .../include/nvkm/subdev/bios/power_budget.h | 26 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/bios/Kbuild | 1 + .../drm/nouveau/nvkm/subdev/bios/power_budget.c | 126 +++++++++++++++++++++ 3 files changed, 153 insertions(+) commit 75d115f2aae145fd7dfed29703ce063e3e7bb716 Author: Ben Skeggs Date: Wed Jan 18 18:40:48 2017 +1000 drm/nouveau/fifo/gk104-: preempt recovery Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 + 1 file changed, 1 insertion(+) commit 3ebef76a1d46cd7e45aee6ad3efff9683b3a0f07 Author: Ben Skeggs Date: Wed Jan 18 15:37:24 2017 +1000 drm/nouveau/fifo/gk104-: trigger mmu fault before attempting engine recovery Greatly improves the chances of recovering the GPU from a CTXSW_TIMEOUT. Tested with piglit's arb_shader_image_load_store-atomicity, which causes GR to hang in such a way that recovery failed (CTXSW_TIMEOUT continually re-triggers). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 03f16f5f278af9ef477aa847fda4b09ed87dc382 Author: Ben Skeggs Date: Wed Jan 18 16:05:15 2017 +1000 drm/nouveau/fifo/gk104-: ACK SCHED_ERROR before attempting CTXSW_TIMEOUT recovery Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 91b9d659abfd557f79a02c0bc1f92393fdba1e22 Author: Ben Skeggs Date: Wed Jan 18 16:03:44 2017 +1000 drm/nouveau/fifo/gk104-: directly use new recovery code for ctxsw timeout Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 30 +++++------------------- 1 file changed, 6 insertions(+), 24 deletions(-) commit 3534821df5e3635e3e7914a4802a74497815817e Author: Ben Skeggs Date: Wed Jan 18 16:01:11 2017 +1000 drm/nouveau/fifo/gk104-: directly use new recovery code for mmu faults Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 18 ++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 24 ++++++++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 +++ 3 files changed, 37 insertions(+), 8 deletions(-) commit eaa5ed65eebb3ee9679a5f7b597c34a6207843c2 Author: Ben Skeggs Date: Wed Jan 18 15:35:16 2017 +1000 drm/nouveau/fifo/gk104-: reset all engines a killed channel is still active on Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0faaa47d440df5302132c47f8f84b3f61d9fc424 Author: Ben Skeggs Date: Wed Jan 18 15:22:43 2017 +1000 drm/nouveau/fifo/gk104-: refactor recovery code This will serve as a basis for implementing some improvements to how we recover the GPU from channel errors. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 95 ++++++++++++++++++++---- 1 file changed, 81 insertions(+), 14 deletions(-) commit ec5c6bda19408b78f8bc0e0592c7805e8550470f Author: Ben Skeggs Date: Mon Jan 16 10:36:00 2017 +1000 drm/nouveau/fifo/gk104-: better detection of chid when parsing engine status The previous commit simply changes the interface, but should result in the same behaviour as previously. This commit has been split out from it as it can result in a different channel being selected. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit b88917fe0fbb1a8479545ba62496ff71d63b397b Author: Ben Skeggs Date: Mon Jan 16 10:14:36 2017 +1000 drm/nouveau/fifo/gk104-: separate out engine status parsing We'll be wanting to reuse this logic in more places. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 59 ++++++++++++++++++------ 1 file changed, 46 insertions(+), 13 deletions(-) commit 21e6de29bb12f82161c2822ebb85dbf9103de4c1 Author: Ben Skeggs Date: Thu Jan 26 12:10:24 2017 +1000 drm/nouveau/fifo: add an api for initiating channel recovery This will be used by callers outside of fifo interrupt handlers. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 11 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 2 ++ 2 files changed, 13 insertions(+) commit 13416077e54354df19d3a4f98e574cce451cec2d Author: Ben Skeggs Date: Wed Jan 18 14:57:01 2017 +1000 drm/nouveau/top: add function to translate subdev index to mmu fault id Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit 6845c313f79fd44c64834b98d4341187e77b2377 Author: Ben Skeggs Date: Mon Jan 16 10:28:54 2017 +1000 drm/nouveau/gr/gf100-: implement chsw_load() method Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 71ce33a28a06fed624b796189c14d960684cf830 Author: Ben Skeggs Date: Mon Jan 16 10:25:10 2017 +1000 drm/nouveau/gr: implement chsw_load() method Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 10 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h | 1 + 2 files changed, 11 insertions(+) commit 17041c7eef2efb998b28f770442156401701cd3c Author: Ben Skeggs Date: Mon Jan 16 10:22:59 2017 +1000 drm/nouveau/core: add engine method to assist in determining chsw direction FIFO gives us load/save/switch status, and we need to be able to determine which direction a "switch" is failing during channel recovery. In order to do this, we apparently need to query the engine itself. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/core/engine.c | 8 ++++++++ 2 files changed, 10 insertions(+) commit 84cd0a55659ad7ab5792d5319b315e1e5bba312a Author: Ben Skeggs Date: Tue Jan 24 16:56:52 2017 +1000 drm/nouveau: check for dead channel before trying to idle This prevents *very* long waits while attempting to destroy channels after a fault has occurred. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8cc37d878d695fc2a88b4777cdfea8bca9fdcb5 Author: Ben Skeggs Date: Sat Nov 5 13:31:25 2016 +1000 drm/nouveau: request notifications for channels that have been killed These will be used to improve error recovery behaviour. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_chan.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_chan.h | 5 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) commit ff9f29abf0ef4c43e696bef7621884518e6bdbda Author: Ben Skeggs Date: Sat Nov 5 13:05:14 2016 +1000 drm/nouveau/fifo/gf100-: provide notification to user if channel is killed There are instances (such as non-recoverable GPU page faults) where NVKM decides that a channel's context is no longer viable, and will be removed from the runlist. This commit notifies the owner of the channel when this happens, so it has the opportunity to take some kind of recovery action instead of hanging. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 32 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 19 ++++++++++++- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 + 11 files changed, 58 insertions(+), 5 deletions(-) commit 40cea73984a77acb714e1d4a60a47fdfb07b656f Author: Ben Skeggs Date: Tue Jan 24 16:08:14 2017 +1000 drm/nouveau/fifo/g84-: rename non-stall interrupt event Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit e774055a074b6715193c2984024eecf8fdf8dbd1 Author: Ben Skeggs Date: Sat Nov 5 13:12:57 2016 +1000 drm/nouveau/fifo: tidy up channel creation event code Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 16 +++++++++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) commit 86d7442baa6ec9f563343fd8515531201312de44 Author: Ben Skeggs Date: Sat Nov 5 14:14:20 2016 +1000 drm/nouveau/core: increase maximum number of notifies that a client can request Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca33fafdc9020720a9773fd416c94fe68aef7220 Author: Martin Peres Date: Wed Jan 18 23:49:21 2017 +0200 drm/nouveau/drm/nouveau/led: prevent a possible use-after-free If the led class registration fails, we free drm->led but do not reset it to NULL, which means that the suspend/resume/fini function will act as if everything went well in init() and will likely crash the kernel. This patch adds the missing drm->led = NULL. Reported-by: Emmanuel Pescosta Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_led.c | 1 + 1 file changed, 1 insertion(+) commit 443828fd9e6097464aa3fd32199bbba3a3bf7e88 Author: Karol Herbst Date: Sun Nov 20 00:43:15 2016 +0100 drm/nouveau/pci/g92: Enable changing pcie link speeds Tested on a G92, seems to work. Confirmed by 8 mmiotraces. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 725af748266727c4aebdfa7e02c2e289435a4d3b Author: Karol Herbst Date: Sun Nov 20 00:43:14 2016 +0100 drm/nouveau/pci: Rename g94 to g92 Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 20 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/g92.c | 57 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/g94.c | 57 ----------------------- drivers/gpu/drm/nouveau/nvkm/subdev/pci/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/gf106.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 2 +- 8 files changed, 72 insertions(+), 72 deletions(-) commit 9f1c4dbd3def9bc43601b89c94666e660f2f2646 Author: Ben Skeggs Date: Mon Jan 16 13:44:11 2017 +1000 drm/nouveau/devinit/nv50: return error code if pll calculation fails Reported-by: Dan Carpenter Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0879683280508ea3d474dcaf91b4658985824513 Author: Ilia Mirkin Date: Thu Jan 5 01:13:15 2017 -0500 drm/nouveau: fix bug id typo in comment The issue was recorded in fd.o bug 27501, not 25701. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d8b3d34c323e4692a69c7ab063c157773c34f0f Author: Ben Skeggs Date: Mon May 23 12:34:49 2016 +1000 drm/nouveau: size is u64 everywhere Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 34 ++++++++++++++++++---------------- drivers/gpu/drm/nouveau/nouveau_bo.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) commit 0e47b0275bdb40a9dab7a86535b1fcd85d874007 Author: Philipp Zabel Date: Thu Feb 16 14:46:31 2017 +0100 gpu: ipu-v3: Stop overwriting pdev->dev.of_node of child devices Setting dev->of_node changes the modalias and breaks module autoloading. Since there is an of_node field in the platform data passed to child devices, we don't even need this anymore. Suggested-by: Russell King Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 6 ------ 1 file changed, 6 deletions(-) commit 5f1eb69446f4ec2401560d252c9a95991e80797d Author: Philipp Zabel Date: Thu Feb 16 12:36:21 2017 +0100 gpu: ipu-v3: export ipu_csi_set_downsize This function will be used by the media drivers and needs to be exported to allow them to be built as modules. Reported-by: Russell King Fixes: 867341b95891 ("gpu: ipu-v3: add ipu_csi_set_downsize") Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-csi.c | 1 + 1 file changed, 1 insertion(+) commit f57c511a9d1e8625879abd032e3cbf4bd25bbafa Author: Philipp Zabel Date: Fri Jan 27 11:57:19 2017 +0100 drm/imx: lift 64x64 pixel minimum framebuffer size requirement There is no reason to limit framebuffer size to 64x64 pixels at a minimum on creation. The actual scanout limitations (width >= 13 for the base plane and height >= 2) are checked in atomic_check. Signed-off-by: Philipp Zabel Reviewed-by: Lucas Stach drivers/gpu/drm/imx/imx-drm-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc12bccda8b6f5c38139eceec9e369ed78091b2b Author: Fabio Estevam Date: Wed Feb 8 10:47:49 2017 -0200 drm/imx: imx-tve: Do not set the regulator voltage Commit deb65870b5d9d ("drm/imx: imx-tve: check the value returned by regulator_set_voltage()") exposes the following probe issue: 63ff0000.tve supply dac not found, using dummy regulator imx-drm display-subsystem: failed to bind 63ff0000.tve (ops imx_tve_ops): -22 When the 'dac-supply' is not passed in the device tree a dummy regulator is used and setting its voltage is not allowed. To fix this issue, do not set the dac-supply voltage inside the driver and let its voltage be specified in the device tree. Print a warning if the the 'dac-supply' voltage has a value different from 2.75V. Fixes: deb65870b5d9d ("drm/imx: imx-tve: check the value returned by regulator_set_voltage()") Cc: # 4.8+ Suggested-by: Lucas Stach Signed-off-by: Fabio Estevam Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-tve.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 753843471cbbaeca25a5cab51981ee721ad272f7 Author: Sahil Mehta Date: Wed Feb 15 13:46:18 2017 -0500 powerpc/pseries: Implement indexed-count hotplug memory remove Indexed-count remove for memory hotplug guarantees that a contiguous block of lmbs beginning at a specified will be unassigned (NOT that lmbs will be removed). Because of Qemu's per-DIMM memory management, the removal of a contiguous block of memory currently requires a series of individual calls. Indexed-count remove reduces this series into a single call. Signed-off-by: Sahil Mehta Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 98 +++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 333f7b76865bec24c66710cf352f892d69e3ba0a Author: Sahil Mehta Date: Wed Feb 15 13:45:56 2017 -0500 powerpc/pseries: Implement indexed-count hotplug memory add Indexed-count add for memory hotplug guarantees that a contiguous block of lmbs beginning at a specified will be assigned, any LMBs in this range that are not already assigned will be DLPAR added. Because of Qemu's per-DIMM memory management, the addition of a contiguous block of memory currently requires a series of individual calls to add each LMB in the block. Indexed-count add reduces this series of calls to a single call for the entire block. Signed-off-by: Sahil Mehta Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/include/asm/rtas.h | 2 + arch/powerpc/platforms/pseries/dlpar.c | 38 +++++++- arch/powerpc/platforms/pseries/hotplug-memory.c | 119 ++++++++++++++++++++++-- 3 files changed, 147 insertions(+), 12 deletions(-) commit f655e67ac8d797425abb0404d0878758f3f71c1a Author: Zhenyu Wang Date: Thu Feb 16 14:10:01 2017 +0800 drm/i915/gvt: Fix check error on opregion.c As we switched to memremap for opregion, shouldn't use any __iomem for that, and move to use memcpy instead. This fixed static check errors for: CHECK drivers/gpu/drm/i915//gvt/opregion.c drivers/gpu/drm/i915//gvt/opregion.c:142:31: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915//gvt/opregion.c:142:31: expected void *addr drivers/gpu/drm/i915//gvt/opregion.c:142:31: got void [noderef] *opregion_va drivers/gpu/drm/i915//gvt/opregion.c:160:35: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915//gvt/opregion.c:160:35: expected void [noderef] *opregion_va drivers/gpu/drm/i915//gvt/opregion.c:160:35: got void * Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/opregion.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 1228f7befbf3280906e75f532a1700c7d3138117 Author: Heiko Carstens Date: Thu Feb 16 10:41:52 2017 +0100 s390: add missing "do {} while (0)" loop constructs to multiline macros Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ctl_reg.h | 8 ++++---- arch/s390/include/asm/processor.h | 4 ++-- arch/s390/include/asm/uaccess.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 549f2bf594782faa440055255831c9a51940a651 Author: Heiko Carstens Date: Mon Feb 13 15:20:18 2017 +0100 s390/mm: add cond_resched call to kernel page table dumper Walking kernel page tables within the kernel page table dumper may potentially take a lot of time. This may lead to soft lockup warning messages. To avoid this add a cond_resched call for each pgd_level iteration. This is the same as "x86/mm/ptdump: Fix soft lockup in page table walker" for x86. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/dump_pagetables.c | 2 ++ 1 file changed, 2 insertions(+) commit 466178fc4e2937685edb7be005da4eb28bb81d72 Author: Heiko Carstens Date: Mon Feb 13 15:11:15 2017 +0100 s390: get rid of MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE Both MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE are just an alias for MACHINE_HAS_EDAT1. So simply use MACHINE_HAS_EDAT1 instead. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/hugetlb.h | 2 +- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/include/asm/setup.h | 3 --- arch/s390/kernel/setup.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) commit 604ddad038bfa0ae6f447c2ff29fcd430cec8181 Author: Heiko Carstens Date: Mon Feb 13 14:58:36 2017 +0100 s390/mm: make memory_block_size_bytes available for !MEMORY_HOTPLUG Fix this compile error for !MEMORY_HOTPLUG && NUMA: arch/s390/built-in.o: In function `emu_setup_size_adjust': arch/s390/numa/mode_emu.c:477: undefined reference to `memory_block_size_bytes' Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/init.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 187b5f41b4f15feae8b59e3a9ccaa7df85518bbb Author: Christian Borntraeger Date: Fri Feb 10 12:34:49 2017 +0100 s390: replace ACCESS_ONCE with READ_ONCE Remove the last places of ACCESS_ONCE in s390 code. Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/spinlock.h | 2 +- arch/s390/kernel/idle.c | 14 +++++++------- arch/s390/lib/spinlock.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit d321796753f5305a00a5f4996dbbb996994df45c Author: Paul Gortmaker Date: Thu Feb 9 15:20:25 2017 -0500 s390: Audit and remove any remaining unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each change instance for the presence of either and replace as needed. An instance where module_param was used without moduleparam.h was also fixed, as well as implicit use of ptrace.h and string.h headers. Signed-off-by: Paul Gortmaker Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/livepatch.h | 2 +- arch/s390/kvm/kvm-s390.c | 1 + arch/s390/lib/delay.c | 2 +- arch/s390/lib/spinlock.c | 2 +- arch/s390/lib/string.c | 3 ++- arch/s390/lib/xor.c | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) commit ff24b07abbe0a513ba4b5083c8aeaca6d548e364 Author: Paul Gortmaker Date: Thu Feb 9 15:20:24 2017 -0500 s390: mm: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each change instance for the presence of either and replace as needed. An instance where module_param was used without moduleparam.h was also fixed, as well as an implict use of asm/elf.h header. Signed-off-by: Paul Gortmaker Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/cmm.c | 1 + arch/s390/mm/dump_pagetables.c | 1 - arch/s390/mm/extmem.c | 2 +- arch/s390/mm/mem_detect.c | 1 - arch/s390/mm/mmap.c | 2 +- arch/s390/mm/pageattr.c | 1 - arch/s390/mm/vmem.c | 2 +- 7 files changed, 4 insertions(+), 6 deletions(-) commit 3994a52b54569c4d71d43e3e00464eb9127f86a5 Author: Paul Gortmaker Date: Thu Feb 9 15:20:23 2017 -0500 s390: kernel: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each change instance for the presence of either and replace as needed. Build testing revealed some implicit header usage that was fixed up accordingly. Signed-off-by: Paul Gortmaker Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/compat_linux.c | 1 - arch/s390/kernel/cpcmd.c | 2 +- arch/s390/kernel/crash_dump.c | 3 ++- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/diag.c | 3 ++- arch/s390/kernel/dis.c | 2 +- arch/s390/kernel/ebcdic.c | 4 ++-- arch/s390/kernel/ipl.c | 3 ++- arch/s390/kernel/irq.c | 3 ++- arch/s390/kernel/jump_label.c | 1 - arch/s390/kernel/nmi.c | 2 +- arch/s390/kernel/process.c | 2 +- arch/s390/kernel/smp.c | 2 +- arch/s390/kernel/stacktrace.c | 2 +- arch/s390/kernel/sysinfo.c | 2 +- arch/s390/kernel/time.c | 2 +- arch/s390/kernel/vdso.c | 2 +- 17 files changed, 20 insertions(+), 18 deletions(-) commit a4a81d8eebdc1d209d034f62a082a5131e4242b5 Author: Michael Holzheu Date: Tue Feb 7 18:09:14 2017 +0100 s390/kdump: Use "LINUX" ELF note name instead of "CORE" In binutils/libbfd (bfd/elf.c) it is enforced that all s390 specific ELF notes like e.g. NT_S390_PREFIX or NT_S390_CTRS have "LINUX" specified as note name. Otherwise the notes are ignored. For /proc/vmcore we currently use "CORE" for these notes. Up to now this has not been a real problem because the dump analysis tool "crash" does not check the note name. But it will break all programs that use libbfd for processing ELF notes. So fix this and use "LINUX" for all s390 specific notes to comply with libbfd. Cc: stable@vger.kernel.org # v4.4+ Reported-by: Philipp Rudo Reviewed-by: Philipp Rudo Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/crash_dump.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d67a5f4b5947aba4bfe9a80a2b86079c215ca755 Author: Mikulas Patocka Date: Wed Feb 15 11:26:10 2017 -0500 dm: flush queued bios when process blocks to avoid deadlock Commit df2cb6daa4 ("block: Avoid deadlocks with bio allocation by stacking drivers") created a workqueue for every bio set and code in bio_alloc_bioset() that tries to resolve some low-memory deadlocks by redirecting bios queued on current->bio_list to the workqueue if the system is low on memory. However other deadlocks (see below **) may happen, without any low memory condition, because generic_make_request is queuing bios to current->bio_list (rather than submitting them). ** the related dm-snapshot deadlock is detailed here: https://www.redhat.com/archives/dm-devel/2016-July/msg00065.html Fix this deadlock by redirecting any bios on current->bio_list to the bio_set's rescue workqueue on every schedule() call. Consequently, when the process blocks on a mutex, the bios queued on current->bio_list are dispatched to independent workqueus and they can complete without waiting for the mutex to be available. The structure blk_plug contains an entry cb_list and this list can contain arbitrary callback functions that are called when the process blocks. To implement this fix DM (ab)uses the onstack plug's cb_list interface to get its flush_current_bio_list() called at schedule() time. This fixes the snapshot deadlock - if the map method blocks, flush_current_bio_list() will be called and it redirects bios waiting on current->bio_list to appropriate workqueues. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1267650 Depends-on: df2cb6daa4 ("block: Avoid deadlocks with bio allocation by stacking drivers") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 37a098e9d10db6e2efc05fe61e3a6ff2e9802c53 Author: Mike Snitzer Date: Thu Feb 16 23:57:17 2017 -0500 dm round robin: revert "use percpu 'repeat_count' and 'current_path'" The sloppy nature of lockless access to percpu pointers (s->current_path) in rr_select_path(), from multiple threads, is causing some paths to used more than others -- which results in less IO performance being observed. Revert these upstream commits to restore truly symmetric round-robin IO submission in DM multipath: b0b477c dm round robin: use percpu 'repeat_count' and 'current_path' 802934b dm round robin: do not use this_cpu_ptr() without having preemption disabled There is no benefit to all this complexity if repeat_count = 1 (which is the recommended default). Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Mike Snitzer drivers/md/dm-round-robin.c | 67 ++++++++++----------------------------------- 1 file changed, 14 insertions(+), 53 deletions(-) commit 605f9ccd7d0ad603d8df9301f3f400be5d8081d9 Author: Ben Skeggs Date: Tue May 17 11:13:37 2016 +1000 drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variables Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 266 ++++++++++++++++---------------- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 12 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 48 +++--- drivers/gpu/drm/nouveau/nv17_fence.c | 6 +- drivers/gpu/drm/nouveau/nv50_fence.c | 6 +- 5 files changed, 169 insertions(+), 169 deletions(-) commit 1167c6bc51880cb74a3b1a02286fc25392684281 Author: Ben Skeggs Date: Wed May 18 13:57:42 2016 +1000 drm/nouveau: allocate device object for every client Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/arb.c | 6 +-- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 38 +++++++------- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/dac.c | 18 +++---- drivers/gpu/drm/nouveau/dispnv04/dfp.c | 12 ++--- drivers/gpu/drm/nouveau/dispnv04/disp.c | 6 +-- drivers/gpu/drm/nouveau/dispnv04/disp.h | 6 +-- drivers/gpu/drm/nouveau/dispnv04/hw.c | 80 ++++++++++++++--------------- drivers/gpu/drm/nouveau/dispnv04/hw.h | 42 +++++++-------- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 16 +++--- drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 4 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 16 +++--- drivers/gpu/drm/nouveau/dispnv04/tvnv17.h | 4 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 +- drivers/gpu/drm/nouveau/nouveau_backlight.c | 24 ++++----- drivers/gpu/drm/nouveau/nouveau_bios.c | 18 +++---- drivers/gpu/drm/nouveau/nouveau_bo.c | 52 +++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 18 +++---- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 5 +- drivers/gpu/drm/nouveau/nouveau_display.c | 14 ++--- drivers/gpu/drm/nouveau/nouveau_drm.c | 59 +++++++++++---------- drivers/gpu/drm/nouveau/nouveau_drv.h | 3 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 16 +++--- drivers/gpu/drm/nouveau/nouveau_gem.c | 10 ++-- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 66 ++++++++++++------------ drivers/gpu/drm/nouveau/nouveau_led.c | 6 +-- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 28 +++++----- drivers/gpu/drm/nouveau/nouveau_vga.c | 8 +-- drivers/gpu/drm/nouveau/nv04_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 26 +++++----- drivers/gpu/drm/nouveau/nv84_fence.c | 4 +- 32 files changed, 310 insertions(+), 305 deletions(-) commit 80e60973b2494a0c51b2c84847f3faeffed595f0 Author: Ben Skeggs Date: Mon May 23 11:25:17 2016 +1000 drm/nouveau: create userspace clients as subclients This will allow the DRM to share memory objects between clients later down the track. For the moment, the only immediate benefit is less logic required to handle suspend/resume. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit 20d8a88e557aae5264e793f4626c45cd644c7144 Author: Ben Skeggs Date: Wed May 18 13:36:34 2016 +1000 drm/nouveau: tidy up the client init/fini interfaces These were a little insane. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 86 ++++++++++++++++++++--------------- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 +- 2 files changed, 52 insertions(+), 39 deletions(-) commit fc1b0a02ad4f463e10574afcec797ff620f6813d Author: Ben Skeggs Date: Tue May 24 17:29:55 2016 +1000 drm/nouveau: pass nvif_client to nouveau_gem_new() instead of drm_device Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_gem.c | 10 +++++----- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) commit bab7cc18d3ba56c9160f4708dbf353eaa3ce1ec5 Author: Ben Skeggs Date: Tue May 24 17:26:48 2016 +1000 drm/nouveau: pass nvif_client to nouveau_bo_new() instead of drm_device Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/crtc.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_bo.h | 4 +++- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_prime.c | 3 ++- drivers/gpu/drm/nouveau/nv17_fence.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 4 ++-- drivers/gpu/drm/nouveau/nv50_fence.c | 2 +- drivers/gpu/drm/nouveau/nv84_fence.c | 6 +++--- 10 files changed, 20 insertions(+), 15 deletions(-) commit d2ee360564dca43cbfb2bd8ceead7671c87962d2 Author: Ben Skeggs Date: Tue May 10 12:42:26 2016 +1000 drm/nouveau/core/memory: distinguish between coherent/non-coherent targets Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 9 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 11 +++++++---- drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 11 +++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 2 +- 5 files changed, 27 insertions(+), 13 deletions(-) commit 134fdc1a704f0042465ea993c33540aaec7e1d2e Author: Ben Skeggs Date: Sat Oct 3 17:34:25 2015 +1000 drm/nouveau/core/mm: replace region list with next pointer We never have any need for a double-linked list here, and as there's generally a large number of these objects, replace it with a single- linked list in order to save some memory. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/mm.h | 8 +++++++- drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/mm.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 10 +++++----- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 23 ++++++++++------------ .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 17 ++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 7 ++++--- 8 files changed, 34 insertions(+), 37 deletions(-) commit 04b8867758a4e1fca9d349f4a279fff8855db58c Author: Ben Skeggs Date: Sun May 22 20:35:16 2016 +1000 drm/nouveau/core/client: allow creation of subclients We want a supervisor client of NVKM (such as the DRM) to be able to allow sharing of resources (such as memory objects) between clients. To allow this, the supervisor creates all its clients as children of itself, and will use an upcoming ioctl to permit sharing. Currently it's not possible for indirect clients to use subclients. Supporting this will require an additional field in the main ioctl. This isn't important currently, but will need to be fixed for virt. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/client.h | 3 +- drivers/gpu/drm/nouveau/include/nvif/driver.h | 6 ++- drivers/gpu/drm/nouveau/include/nvif/if0000.h | 7 +++ drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 1 + drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++- drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/client.c | 43 ++++++---------- drivers/gpu/drm/nouveau/nvif/driver.c | 58 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/core/client.c | 50 ++++++++++++++++++- 9 files changed, 140 insertions(+), 35 deletions(-) commit 7c413feb7f9907c72aad7ea8f43af8ca8893c2bc Author: Ben Skeggs Date: Wed May 25 17:08:21 2016 +1000 drm/nouveau/core/client: pass notification callback to nvkm_client_new Preparation for supporting subclients. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 4 +++- drivers/gpu/drm/nouveau/nouveau_nvif.c | 12 ++---------- drivers/gpu/drm/nouveau/nvkm/core/client.c | 5 ++++- 3 files changed, 9 insertions(+), 12 deletions(-) commit 05da248bbe91fecb29e1f2fb9b978c4d2ee6da8e Author: Ben Skeggs Date: Wed May 25 17:02:11 2016 +1000 drm/nouveau/core/client: destroy client objects over nvif Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_nvif.c | 10 ---------- drivers/gpu/drm/nouveau/nvif/client.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 13 +++++++------ 3 files changed, 10 insertions(+), 19 deletions(-) commit 2c3af924fbee23544a6adc81a2bbe398132b472f Author: Ben Skeggs Date: Mon May 23 08:42:54 2016 +1000 drm/nouveau/core/client: use standard object dtor/init/fini paths Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 3 -- drivers/gpu/drm/nouveau/nouveau_nvif.c | 10 +++-- drivers/gpu/drm/nouveau/nvkm/core/client.c | 47 +++++++++------------- 3 files changed, 26 insertions(+), 34 deletions(-) commit 03295eabdb95153be4777ff04cc4f1dec0d62bc4 Author: Ben Skeggs Date: Thu May 26 08:43:00 2016 +1000 drm/nouveau/core/client: modify prefix on nvif structures, for consistency Preparation for supporting subclients. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 18 +++++++++++------- drivers/gpu/drm/nouveau/include/nvif/if0000.h | 4 ++-- drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 1 + drivers/gpu/drm/nouveau/nvkm/core/client.c | 20 +++++++++++++------- 4 files changed, 27 insertions(+), 16 deletions(-) commit 843faa030c3677080e4a108889dccb21798b2a32 Author: Ben Skeggs Date: Wed May 25 17:47:18 2016 +1000 drm/nouveau/core/object: pass more args in oclass The fields were already in struct nvkm_oclass for some reason (probably as an accidental left-over). Preparation for supporting subclients. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 7 +++---- drivers/gpu/drm/nouveau/nvkm/core/object.c | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) commit a664869ac4c77875ca84a38f614bc1c7b3c79812 Author: Ben Skeggs Date: Wed May 25 17:33:36 2016 +1000 drm/nouveau/core/object: pass client directly to ioctl handlers nvkm_object::client refers to the client that created the object, which, is currently always the same as the ioctl caller. Upcoming patches introduce the concept of subclients, where a parent is able to access the object trees of its children, making the above no longer true. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 47 ++++++++++++++++++------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 83e85d91b2bc38d4067baf05a7fe9e47436e1d8c Author: Ben Skeggs Date: Tue May 17 19:40:29 2016 +1000 drm/nouveau/dma: lookup objects with nvkm_object_search() Custom code is no longer needed here. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h | 6 +--- drivers/gpu/drm/nouveau/nvkm/core/client.c | 1 - .../gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c | 7 ++-- drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c | 42 +--------------------- drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c | 19 +++++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 6 ++-- 7 files changed, 22 insertions(+), 60 deletions(-) commit daad3dfb05be8b0682c1bb0db6b59e50a4bb95f6 Author: Ben Skeggs Date: Thu Dec 22 15:23:04 2016 +1000 drm/nouveau/core/client: lookup client objects with nvkm_object_search() Custom code is no longer needed here. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 4 -- drivers/gpu/drm/nouveau/nvkm/core/client.c | 49 ---------------------- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 11 ++--- 3 files changed, 4 insertions(+), 60 deletions(-) commit 110cccff955313c66dccd2817f62368f106d9bf2 Author: Ben Skeggs Date: Thu Dec 22 15:22:25 2016 +1000 drm/nouveau/core/object: support lookup of specific object types It turns out we have a nice and convenient way of looking up a specific object type already, by using the func pointer as a key. This will be used to remove the separate object trees for each type we need to be able to search for. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/core/object.c | 61 +++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) commit 05073caeedd1ea6bfc5b1ebd051f2a6694e4b26b Author: Geliang Tang Date: Tue Dec 20 22:02:11 2016 +0800 drm/nouveau/dma: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af7db03e1bd562105dc6460674a05f5463e333e0 Author: Ben Skeggs Date: Thu Mar 3 12:56:33 2016 +1000 replace BUG_ON(1) with BUG() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 0233a9f403973c107a2937ed42f3d588e5f1811b Author: Ben Skeggs Date: Wed Dec 21 12:46:50 2016 +1000 drm/nouveau/gr/nv50-mcp89: add defines for gr classes Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 12 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/g84.c | 12 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/gt200.c | 12 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/gt215.c | 14 ++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/mcp79.c | 12 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/mcp89.c | 14 ++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c | 12 +++++++----- 7 files changed, 56 insertions(+), 32 deletions(-) commit 1894054dc1b6e4395048b2c0f28832a3f4320fd3 Author: Ben Skeggs Date: Thu Dec 22 10:07:49 2016 +1000 drm/nouveau/gr/gf100-: fix ccache error logging Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc134253651e906f55fd5ddf29c1699099473c76 Author: Ben Skeggs Date: Thu Dec 22 10:07:27 2016 +1000 drm/nouveau/disp/g94: remove unused sor implementation Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 7 ------- 1 file changed, 7 deletions(-) commit 7eb7497e555e84d1cedb847416acbc337c874d15 Author: Ben Skeggs Date: Thu Dec 22 10:06:54 2016 +1000 drm/nouveau/fb/ram/gk104: remove unused best_clk variable Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 63f542e4733a3609488c31961036995aa55d2450 Author: Alexandre Courbot Date: Wed Dec 14 17:02:52 2016 +0900 drm/nouveau/secboot: clear halt interrupt after ACR is run The halt interrupt must be cleared after ACR is run, otherwise the LS PMU firmware will not be able to run. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 2 ++ 1 file changed, 2 insertions(+) commit 425c816a806230bcaf17ceb41faeb477f285f781 Author: Alexandre Courbot Date: Wed Dec 14 17:02:50 2016 +0900 drm/nouveau/secboot: add lazy-bootstrap flag When the PMU firmware is present, the falcons it manages need to have the lazy-bootstrap flag of their WPR header set so the ACR does not boot them. Add support for this. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 3 +++ 2 files changed, 7 insertions(+) commit 64a94ded890a2e4e5701ac34868180c2d895874a Author: Alexandre Courbot Date: Wed Dec 14 17:02:49 2016 +0900 drm/nouveau/secboot: fix WPR descriptor generation Generate the WPR descriptor closer to what RM does. In particular, set the expected masks, and only set the ucode members on Tegra. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 45ef8450098fbb243ad65f590b965db1247d2d7e Author: Alexandre Courbot Date: Wed Dec 14 17:02:48 2016 +0900 drm/nouveau/secboot: set default error value in error register Set a default error value in the mailbox 0 register so we can catch cases where the secure boot binary fails early without being able to report anything. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 3 +++ 1 file changed, 3 insertions(+) commit b606234e2ffe0059055fcf38c087d5f71ca3b4b7 Author: Alexandre Courbot Date: Wed Dec 14 17:02:47 2016 +0900 drm/nouveau/secboot: add missing fields to BL structure Since DMEM was initialized to zero, these fields went unnoticed. Add them for safety. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++++ 1 file changed, 4 insertions(+) commit b2888c650e61d03bbfc8325662cff660b40b39ba Author: Alexandre Courbot Date: Wed Dec 14 17:02:46 2016 +0900 drm/nouveau/secboot: safer zeroing of BL descriptors Perform the zeroing of BL descriptors in the caller function instead of trusting each generator will do it. This could avoid a few pulled hairs. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 9d896f3e41a6093a843ce668c97159367c1e4573 Author: Alexandre Courbot Date: Wed Dec 14 17:02:45 2016 +0900 drm/nouveau/secboot: abstract LS firmware loading functions The WPR and LSB headers, used to generate the LS blob, may have a different layout and sizes depending on the driver version they come from. Abstract them and confine their use to driver-specific code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 102 +++++++++++------- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 119 +++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 9 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 9 +- .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 100 +---------------- .../drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 41 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 2 + 7 files changed, 215 insertions(+), 167 deletions(-) commit 9839307cfeedca72d4f2c27d60ada4a1ec5c9489 Author: Alexandre Courbot Date: Wed Dec 14 17:02:44 2016 +0900 drm/nouveau/secboot: remove ls_ucode_mgr This was used only locally to one function and can be replaced by ad-hoc variables. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 90 ++++++++-------------- 1 file changed, 33 insertions(+), 57 deletions(-) commit 88490323e46603bc99995a578b399cfc9a5d2ef1 Author: Alexandre Courbot Date: Wed Dec 14 17:02:43 2016 +0900 drm/nouveau/secboot: remove unneeded ls_ucode_img member ucode_header is not used anywhere, so just get rid of it. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 25 ++++++---------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 2 -- .../drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 2 -- 3 files changed, 7 insertions(+), 22 deletions(-) commit 3454a034b715a3b89f8efb92508ccc9fbee17e6f Author: Alexandre Courbot Date: Wed Dec 14 17:02:42 2016 +0900 drm/nouveau/secboot: disable falcon interrupts when running blob Make sure we are not disturbed by spurious interrupts, as we poll the halt bit anyway. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 555cafb40445861c121422b157c74fe2de793e68 Author: Alexandre Courbot Date: Wed Dec 14 17:02:41 2016 +0900 drm/nouveau/secboot: split reset function Split the reset function into more meaningful and reusable ones. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 5 ++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 78 +++++++++++++++------- 2 files changed, 58 insertions(+), 25 deletions(-) commit 8a50452c89037ccdb844011d1d71146418765fe4 Author: Alexandre Courbot Date: Wed Dec 14 17:02:40 2016 +0900 drm/nouveau/secboot: add LS flags to LS func structure Add a flag that can be set when declaring how a LS firmware should be loaded. This allows us to remove falcon-specific code in the loader. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 10 ++++------ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) commit 72e0642fb4c21632a410c1ff971a63886402b9c9 Author: Alexandre Courbot Date: Wed Dec 14 17:02:39 2016 +0900 drm/nouveau/secboot: reorganize into more files Split the act of building the ACR blob from firmware files from the rest of the (chip-dependent) secure boot logic. ACR logic is moved into acr_rxxx.c files, where rxxx corresponds to the compatible release of the NVIDIA driver. At the moment r352 and r361 are supported since firmwares have been released for these versions. Some abstractions are added on top of r352 so r361 can easily be implemented on top of it by just overriding a few hooks. This split makes it possible and easy to reuse the same ACR version on different chips. It also hopefully makes the code much more readable as the different secure boot logics are separated. As more chips and firmware versions will be supported, this is a necessity to not get lost in code that is already quite complex. This is a big commit, but it essentially moves things around (and split the nvkm_secboot structure into two, nvkm_secboot and nvkm_acr). Code semantics should not be affected. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 9 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 4 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.c | 54 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 69 ++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 910 ++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 126 +++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 135 +++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 84 +- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 1152 +------------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h | 43 + .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 125 +-- .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 245 +++++ .../drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 167 +++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 328 +----- 14 files changed, 1877 insertions(+), 1574 deletions(-) commit 8f491c892eb4acbde080753a51f4d5cb5997168d Author: Alexandre Courbot Date: Wed Dec 14 17:02:38 2016 +0900 drm/nouveau/secboot: generate HS BL descriptor in hook Use the HS hook to completely generate the HS BL descriptor, similarly to what is done in the LS hook, instead of (arbitrarily) using the acr_v1 format as an intermediate. This allows us to make the bootloader descriptor structures private to each implementation, resulting in a cleaner an more consistent design. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 179 ++++++++++----------- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 43 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 71 ++++---- 3 files changed, 138 insertions(+), 155 deletions(-) commit e781ff9118fbbb7f91f55e3076bd0885d7609b59 Author: Alexandre Courbot Date: Wed Dec 14 17:02:37 2016 +0900 drm/nouveau/secboot: add low-secure firmware hooks Secure firmwares provided by NVIDIA will follow the same overall principle, but may slightly differ in format, or not use the same bootloader descriptor even on the same chip. In order to handle this as gracefully as possible, turn the LS firmware functions into hooks that can be overloaded as needed. The current hooks cover the external firmware loading as well as the bootloader descriptor generation. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 239 ++++----------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 30 +++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 193 +++++++++++++++++ 3 files changed, 265 insertions(+), 197 deletions(-) commit a9b333a50eee410ed302d25b00a7497e5c76894e Author: Alexandre Courbot Date: Wed Dec 14 17:02:36 2016 +0900 drm/nouveau/secboot: remove fixup_hs_desc hook This hook can be removed if the function writing the HS descriptor is aware of WPR settings. Let's do that as it allows us to make the ACR descriptor structure private and save some code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 95 ++++++++++++++++------ .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 11 --- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 60 ++------------ 3 files changed, 79 insertions(+), 87 deletions(-) commit 808d6efdeb361bd51c1afa2115db0e5f4fe6609d Author: Alexandre Courbot Date: Wed Dec 14 17:02:35 2016 +0900 drm/nouveau/secboot: rename init() hook to oneinit() The init() hook is called by the subdev's oneinit(). Rename it accordingly to avoid confusion about the lifetime of objects allocated in it. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) commit c8225b54fe1b0d64b7da2c0d1d5b64d316b248f5 Author: Alexandre Courbot Date: Tue Dec 13 17:11:31 2016 +0900 drm/nouveau/secboot: remove nvkm_secboot_start() Since GR has moved to using the falcon library to start the falcons, this function is not needed anymore. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 15 ------------ .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 27 ---------------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 1 - 5 files changed, 45 deletions(-) commit 89cd6e2071b3d3bc4635fe41461e2bb75b5f2d2d Author: Alexandre Courbot Date: Tue Dec 13 17:11:30 2016 +0900 drm/nouveau/gr/gf100: instantiate and reserve GR falcons Create instances for the FECS and GPCCS falcons and use the init() and fini() hooks to reserve them for as long as GR controls them. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 98 +++++++++++++------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 + 2 files changed, 51 insertions(+), 50 deletions(-) commit 0296b5d985a030a99dcf2057b5eac1461637c7ee Author: Alexandre Courbot Date: Tue Dec 13 17:11:29 2016 +0900 drm/nouveau/gr/gf100: split gf100_gr_init_ctxctl() gf100_gr_init_ctxctl() is basically two different functions (one for use of internal firmware, the other for use of external firmware), but its current layout makes it look more complex than it is. Split it to better reflect that fact. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 212 ++++++++++++++----------- 1 file changed, 115 insertions(+), 97 deletions(-) commit d2753f40a947229cf2c8075ed93479159c1af1c1 Author: Alexandre Courbot Date: Tue Dec 13 17:11:28 2016 +0900 drm/nouveau/gr: add fini() hook Add a fini() hook to the GR engine. This will be used by gf100+ to properly release the FECS and GPCCS falcons. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 10 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h | 1 + 2 files changed, 11 insertions(+) commit d72fb36c45698b9f49a1159eb1a3eb46235d3586 Author: Alexandre Courbot Date: Tue Dec 13 17:11:27 2016 +0900 drm/nouveau/secboot: use falcon library Use the falcon library functions in secure boot. This removes a lot of code and makes the secure boot flow easier to understand as no register is directly accessed. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 146 ++------------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 125 ++++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 2 - 4 files changed, 51 insertions(+), 226 deletions(-) commit 236f4747915bbad4cd276654659870b081e882be Author: Alexandre Courbot Date: Tue Dec 13 17:11:26 2016 +0900 drm/nouveau/secboot: fix functions definitions These functions should use the nvkm_secboot_falcon enum. Fix this. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit b1c39d801ad0f87bb4429f92392bea18c62a23cf Author: Alexandre Courbot Date: Tue Dec 13 17:11:25 2016 +0900 drm/nouveau/gm20b: add dummy PMU device Add a dummy PMU device so the PMU falcon is instanciated and can be used by secure boot. We could reuse gk20a's implementation here, but it would fight with secboot over PMU falcon's ownership and secboot will reset the PMU, preventing it from operating afterwards. Proper handout between secboot and pmu is coming along with the actual gm20b PMU implementation, so use this as a temporary solution. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 34 +++++++++++++++++++++++ 4 files changed, 37 insertions(+) commit 9b071c7935f053bf05ab4d0b2f4a8ae4069b4b89 Author: Alexandre Courbot Date: Tue Dec 13 17:11:24 2016 +0900 drm/nouveau/pmu/gk20a: use falcon library functions Use the falcon library functions where relevant. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 31 ++++++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 68d82161fdab51f44767bcde801fd6a58bef9548 Author: Alexandre Courbot Date: Tue Dec 13 17:11:23 2016 +0900 drm/nouveau/pmu/gk20a: simplify code a bit Some functions always succeed - change their return type to void and remove the error-handling code in their caller. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 30 +++++++------------------ 1 file changed, 8 insertions(+), 22 deletions(-) commit d8711c5a9cfd6b06d611a64a30ae3e98ef4e6962 Author: Alexandre Courbot Date: Tue Dec 13 17:11:22 2016 +0900 drm/nouveau/pmu/gk20a: use nvkm_pmu_ctor() Use the PMU constructor so that all base members (in particular the falcon instance) are initialized properly. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 35 ++++++++++--------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit 1e2115d8c0c0da62405400316f5499d909e479bc Author: Alexandre Courbot Date: Tue Dec 13 17:11:20 2016 +0900 drm/nouveau/pmu: instanciate the falcon in PMU device Have an instance of nvkm_falcon in the PMU structure, ready to be used by other subdevs (i.e. secboot). Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit e72da6e04f739253b175cd87aab47337c4646a66 Author: Alexandre Courbot Date: Tue Dec 13 17:11:21 2016 +0900 drm/nouveau/pmu: add nvkm_pmu_ctor() function Add a PMU constructor so implementations that extend the nvkm_pmu structure can have all base members properly initialized. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 17 ++++++++++++----- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) commit 31214108ad08766075bf111df90c1f26520b0159 Author: Alexandre Courbot Date: Tue Dec 13 17:11:19 2016 +0900 drm/nouveau/core: add falcon library functions Falcon processors are used in various places of GPU chips. Although there exist different versions of the falcon, and some variants exist, the base set of actions performed on them is the same, which results in lots of duplicated code. This patch consolidates the current nvkm_falcon structure and extends it with the following features: * Ability for an engine to obtain and later release a given falcon, * Abstractions for basic operations (IMEM/DMEM access, start, etc) * Abstractions for secure operations if a falcon is secure Abstractions make it easy to e.g. start a falcon, without having to care about its details. For instance, falcons in secure mode need to be started by writing to a different register. Right now the abstractions variants only cover secure vs. non-secure falcon, but more will come as e.g. SEC2 support is added. This is still a WIP as other functions previously done by engine/falcon.c need to be reimplemented. However this first step allows to keep things simple and to discuss basic design. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 76 +++++- drivers/gpu/drm/nouveau/nvkm/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 191 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/priv.h | 8 + drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 263 +++++++++++++++++++++ 6 files changed, 537 insertions(+), 4 deletions(-) commit c599dd4b70d3d8a485be6b80d8b190beb3df874b Author: Alexandre Courbot Date: Tue Dec 13 17:11:18 2016 +0900 drm/nouveau/mc: add nvkm_mc_enabled() function Add a function that allows us to query whether a given subdev is currently enabled or not. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit c1fcb14879e87c837c360c2ec9f32d19f62faf89 Author: Alexandre Courbot Date: Tue Dec 13 17:11:17 2016 +0900 drm/nouveau/core: constify nv*_printk macros Constify the local variables declared in these macros so we can pass const pointers to them. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 4 ++-- drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4da934dc6515afaa1db4e02548803de0cd279734 Author: Vipin K Parashar Date: Thu Feb 16 22:40:26 2017 +0530 KVM: PPC: Book3S PR: Ratelimit copy data failure error messages kvm_ppc_mmu_book3s_32/64 xlat() logs "KVM can't copy data" error upon failing to copy user data to kernel space. This floods kernel log once such fails occur in short time period. Ratelimit this error to avoid flooding kernel logs upon copy data failures. Signed-off-by: Vipin K Parashar Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_32_mmu.c | 3 ++- arch/powerpc/kvm/book3s_64_mmu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9ca70356a9260403c1bda40d942935e55d00c11c Author: Dave Airlie Date: Fri Feb 17 12:38:46 2017 +1000 Revert "drm: Resurrect atomic rmfb code, v3" This reverts commit 1592364de3912dad264262f4bcc61552984c9523. This apparantly causes some regressions so pull it out for now. Signed-off-by: Dave Airlie drivers/gpu/drm/drm_atomic.c | 106 ------------------------------------ drivers/gpu/drm/drm_crtc_internal.h | 1 - drivers/gpu/drm/drm_framebuffer.c | 7 --- 3 files changed, 114 deletions(-) commit 99d5ceeea5120dd3ac2f879f4083697b70a1c89f Merge: 5237b9d 7785bba Author: David S. Miller Date: Thu Feb 16 21:25:49 2017 -0500 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-02-16 1) Make struct xfrm_input_afinfo const, nothing writes to it. From Florian Westphal. 2) Remove all places that write to the afinfo policy backend and make the struct const then. From Florian Westphal. 3) Prepare for packet consuming gro callbacks and add ESP GRO handlers. ESP packets can be decapsulated at the GRO layer then. It saves a round through the stack for each ESP packet. Please note that this has a merge coflict between commit 63fca65d0863 ("net: add confirm_neigh method to dst_ops") from net-next and 3d7d25a68ea5 ("xfrm: policy: remove garbage_collect callback") a2817d8b279b ("xfrm: policy: remove family field") from ipsec-next. The conflict can be solved as it is done in linux-next. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 5237b9dde379f9eadd60a9b6310567ce5d307fe8 Merge: 3f64116 ffed21b Author: David S. Miller Date: Thu Feb 16 21:19:44 2017 -0500 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2017-02-16 This series contains updates to ixgbe only. Tony updates the driver to advertise 2.5Gb and 5.0Gb if the adapter supports it. Stephen Hemminger renames our dcbnl_ops since it is global to ixgbe_dcbnl_ops to avoid namespace issues. Mark updates the driver version based on the recent changes. Alex has the remainder of the changes, starting with consolidating functions that represent logical steps in the receive process so we can later update them more easily (and align with igb). Modify the receive path to only synchronize the length of the frame versus the entire buffer. Provided performance improvements by adding support for DMA_ATTR_SKIP_CPU_SYNC and DMA_ATTR_WEAK_ORDERING. Also made additional performance gains by batching the page count updates instead of doing them one at a time. Adjusted the receive path to use 3k buffers with 8k backing them in order to support build_skb with jumbo frames. Made additional driver improvements by using the length of the packet instead of the DD status to determine if a new descriptor is ready to be processed, which cuts down on reads. To reduce code duplication, pulled apart the receive path into separate functions. Added support for providing a buffer with headroom and tailroom to allow for shared info for NET_SKB_PAD and NET_IP_ALIGN. ==================== Signed-off-by: David S. Miller commit 08293fe8d3f297a0b092855d2e94b18f1c1300d5 Merge: dec13c8 1b30ab0 Author: Dave Airlie Date: Fri Feb 17 12:04:09 2017 +1000 Merge tag 'omapdrm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm fixes for v4.11 Fix regressions: - Planes might have been left enabled - Scaling checks did not use the new config Also limit downscaling decimation to prevent HW underflows. * tag 'omapdrm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats drm/omapdrm: Move commit_modeset_enables() before commit_planes() Revert "drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs" commit dec13c8ba2f5be8839ba5505b57b22ab0d2a287e Merge: be3c9f5 e841130 Author: Dave Airlie Date: Fri Feb 17 11:55:12 2017 +1000 Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for 4.11. Highlights: - fix >2 displays on asics with 3 or 5 crtcs - fix SI headless asics - powerplay fixes for new polaris variants - misc fixes * 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix warning on older gcc releases drm/ttm: make TTM_MAX_BO_PRIORITY unsigned drm/amd/amdgpu: Fix flow control in uvd_v4_2_stop() drm/amd/powerplay: add didt config table for polaris kicker drm/amd/powerplay: modify VddcPhase value for polaris kicker drm/amd/powerplay: add kicker flag into smumgr drm/amdgpu: Initialize pipe priority order on graphic initialization drm/amdgpu: read hw register to check pg status. drm/amdgpu: Add to initialization of mmVCE_VCPU_CNTL register drm/amdgpu/pm: check for headless before calling compute_clocks drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm() drm/amdgpu: add more cases to DCE11 possible crtc mask setup commit 410d17f67e583559be3a922f8b6cc336331893f3 Author: Christoph Hellwig Date: Thu Feb 16 17:12:51 2017 -0800 xfs: tune down agno asserts in the bmap code In various places we currently assert that xfs_bmap_btalloc allocates from the same as the firstblock value passed in, unless it's either NULLAGNO or the dop_low flag is set. But the reflink code does not fully follow this convention as it passes in firstblock purely as a hint for the allocator without actually having previous allocations in the transaction, and without having a minleft check on the current AG, leading to the assert firing on a very full and heavily used file system. As even the reflink code only allocates from equal or higher AGs for now we can simply the check to always allow for equal or higher AGs. Note that we need to eventually split the two meanings of the firstblock value. At that point we can also allow the reflink code to allocate from any AG instead of limiting it in any way. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 8ee9fdbebc84b39f1d1c201c5e32277c61d034aa Author: Chandan Rajendra Date: Thu Feb 16 17:12:16 2017 -0800 xfs: Use xfs_icluster_size_fsb() to calculate inode chunk alignment On a ppc64 system, executing generic/256 test with 32k block size gives the following call trace, XFS: Assertion failed: args->maxlen > 0, file: /root/repos/linux/fs/xfs/libxfs/xfs_alloc.c, line: 2026 kernel BUG at /root/repos/linux/fs/xfs/xfs_message.c:113! Oops: Exception in kernel mode, sig: 5 [#1] SMP NR_CPUS=2048 DEBUG_PAGEALLOC NUMA pSeries Modules linked in: CPU: 2 PID: 19361 Comm: mkdir Not tainted 4.10.0-rc5 #58 task: c000000102606d80 task.stack: c0000001026b8000 NIP: c0000000004ef798 LR: c0000000004ef798 CTR: c00000000082b290 REGS: c0000001026bb090 TRAP: 0700 Not tainted (4.10.0-rc5) MSR: 8000000000029032 CR: 28004428 XER: 00000000 CFAR: c0000000004ef180 SOFTE: 1 GPR00: c0000000004ef798 c0000001026bb310 c000000001157300 ffffffffffffffea GPR04: 000000000000000a c0000001026bb130 0000000000000000 ffffffffffffffc0 GPR08: 00000000000000d1 0000000000000021 00000000ffffffd1 c000000000dd4990 GPR12: 0000000022004444 c00000000fe00800 0000000020000000 0000000000000000 GPR16: 0000000000000000 0000000043a606fc 0000000043a76c08 0000000043a1b3d0 GPR20: 000001002a35cd60 c0000001026bbb80 0000000000000000 0000000000000001 GPR24: 0000000000000240 0000000000000004 c00000062dc55000 0000000000000000 GPR28: 0000000000000004 c00000062ecd9200 0000000000000000 c0000001026bb6c0 NIP [c0000000004ef798] .assfail+0x28/0x30 LR [c0000000004ef798] .assfail+0x28/0x30 Call Trace: [c0000001026bb310] [c0000000004ef798] .assfail+0x28/0x30 (unreliable) [c0000001026bb380] [c000000000455d74] .xfs_alloc_space_available+0x194/0x1b0 [c0000001026bb410] [c00000000045b914] .xfs_alloc_fix_freelist+0x144/0x480 [c0000001026bb580] [c00000000045c368] .xfs_alloc_vextent+0x698/0xa90 [c0000001026bb650] [c0000000004a6200] .xfs_ialloc_ag_alloc+0x170/0x820 [c0000001026bb7c0] [c0000000004a9098] .xfs_dialloc+0x158/0x320 [c0000001026bb8a0] [c0000000004e628c] .xfs_ialloc+0x7c/0x610 [c0000001026bb990] [c0000000004e8138] .xfs_dir_ialloc+0xa8/0x2f0 [c0000001026bbaa0] [c0000000004e8814] .xfs_create+0x494/0x790 [c0000001026bbbf0] [c0000000004e5ebc] .xfs_generic_create+0x2bc/0x410 [c0000001026bbce0] [c0000000002b4a34] .vfs_mkdir+0x154/0x230 [c0000001026bbd70] [c0000000002bc444] .SyS_mkdirat+0x94/0x120 [c0000001026bbe30] [c00000000000b760] system_call+0x38/0xfc Instruction dump: 4e800020 60000000 7c0802a6 7c862378 3c82ffca 7ca72b78 38841c18 7c651b78 38600000 f8010010 f821ff91 4bfff94d <0fe00000> 60000000 7c0802a6 7c892378 When block size is larger than inode cluster size, the call to XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size) returns 0. Also, mkfs.xfs would have set xfs_sb->sb_inoalignmt to 0. This causes xfs_ialloc_cluster_alignment() to return 0. Due to this args.minalignslop (in xfs_ialloc_ag_alloc()) gets the unsigned equivalent of -1 assigned to it. This later causes alloc_len in xfs_alloc_space_available() to have a value of 0. In such a scenario when args.total is also 0, the assert statement "ASSERT(args->maxlen > 0);" fails. This commit fixes the bug by replacing the call to XFS_B_TO_FSBT() in xfs_ialloc_cluster_alignment() with a call to xfs_icluster_size_fsb(). Suggested-by: Darrick J. Wong Signed-off-by: Chandan Rajendra Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 48af96ab92bc68fb645068b978ce36df2379e076 Author: Brian Foster Date: Wed Feb 15 10:18:10 2017 -0800 xfs: don't reserve blocks for right shift transactions The block reservation for the transaction allocated in xfs_shift_file_space() is an artifact of the original collapse range support. It exists to handle the case where a collapse range occurs, the initial extent is left shifted into a location that forms a contiguous boundary with the previous extent and thus the extents are merged. This code was subsequently refactored and reused for insert range (right shift) support. If an insert range occurs under low free space conditions, the extent at the starting offset is split before the first shift transaction is allocated. If the block reservation fails, this leaves separate, but contiguous extents around in the inode. While not a fatal problem, this is unexpected and will flag a warning on subsequent insert range operations on the inode. This problem has been reproduce intermittently by generic/270 running against a ramdisk device. Since right shift does not create new extent boundaries in the inode, a block reservation for extent merge is unnecessary. Update xfs_shift_file_space() to conditionally reserve fs blocks for left shift transactions only. This avoids the warning reproduced by generic/270. Reported-by: Ross Zwisler Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 353fe445f5efd58dfec6e06bf4747a9c28374adc Author: Arnd Bergmann Date: Tue Feb 14 18:16:50 2017 -0800 xfs: fix len comparison in xfs_extent_busy_trim The length is now passed by reference, so the assertion has to be updated to match the other changes, as pointed out by this W=1 warning: fs/xfs/xfs_extent_busy.c: In function 'xfs_extent_busy_trim': fs/xfs/xfs_extent_busy.c:356:13: error: ordered comparison of pointer with integer zero [-Werror=extra] Fixes: ebf55872616c ("xfs: improve handling of busy extents in the low-level allocator") Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extent_busy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93aaead52a9eebdc20dc8fa673c350e592a06949 Author: Darrick J. Wong Date: Mon Feb 13 22:52:27 2017 -0800 xfs: fix uninitialized variable in _reflink_convert_cow Fix an uninitialize variable. Reported-by: Dan Carpenter Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75d65361cf3c0dae2af970c305e19c727b28a510 Author: Brian Foster Date: Mon Feb 13 22:48:30 2017 -0800 xfs: split indlen reservations fairly when under reserved Certain workoads that punch holes into speculative preallocation can cause delalloc indirect reservation splits when the delalloc extent is split in two. If further splits occur, an already short-handed extent can be split into two in a manner that leaves zero indirect blocks for one of the two new extents. This occurs because the shortage is large enough that the xfs_bmap_split_indlen() algorithm completely drains the requested indlen of one of the extents before it honors the existing reservation. This ultimately results in a warning from xfs_bmap_del_extent(). This has been observed during file copies of large, sparse files using 'cp --sparse=always.' To avoid this problem, update xfs_bmap_split_indlen() to explicitly apply the reservation shortage fairly between both extents. This smooths out the overall indlen shortage and defers the situation where we end up with a delalloc extent with zero indlen reservation to extreme circumstances. Reported-by: Patrick Dung Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 61 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 18 deletions(-) commit 0e339ef8556d9e567aa7925f8892c263d79430d9 Author: Brian Foster Date: Mon Feb 13 22:48:18 2017 -0800 xfs: handle indlen shortage on delalloc extent merge When a delalloc extent is created, it can be merged with pre-existing, contiguous, delalloc extents. When this occurs, xfs_bmap_add_extent_hole_delay() merges the extents along with the associated indirect block reservations. The expectation here is that the combined worst case indlen reservation is always less than or equal to the indlen reservation for the individual extents. This is not always the case, however, as existing extents can less than the expected indlen reservation if the extent was previously split due to a hole punch. If a new extent merges with such an extent, the total indlen requirement may be larger than the sum of the indlen reservations held by both extents. xfs_bmap_add_extent_hole_delay() assumes that the worst case indlen reservation is always available and assigns it to the merged extent without consideration for the indlen held by the pre-existing extent. As a result, the subsequent xfs_mod_fdblocks() call can attempt an unintentional allocation rather than a free (indicated by an ASSERT() failure). Further, if the allocation happens to fail in this context, the failure goes unhandled and creates a filesystem wide block accounting inconsistency. Fix xfs_bmap_add_extent_hole_delay() to function as designed. Cap the indlen reservation assigned to the merged extent to the sum of the indlen reservations held by each of the individual extents. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9dbddd7b0c649bd6aa9442c717932325ec590303 Author: Brian Foster Date: Mon Feb 13 22:48:17 2017 -0800 xfs: resurrect debug mode drop buffered writes mechanism A debug mode write failure mechanism was introduced to XFS in commit 801cc4e17a ("xfs: debug mode forced buffered write failure") to facilitate targeted testing of delalloc indirect reservation management from userspace. This code was subsequently rendered ineffective by the move to iomap based buffered writes in commit 68a9f5e700 ("xfs: implement iomap based buffered write path"). This likely went unnoticed because the associated userspace code had not made it into xfstests. Resurrect this mechanism to facilitate effective indlen reservation testing from xfstests. The move to iomap based buffered writes relocated the hook this mechanism needs to return write failure from XFS to generic code. The failure trigger must remain in XFS. Given that limitation, convert this from a write failure mechanism to one that simply drops writes without returning failure to userspace. Rename all "fail_writes" references to "drop_writes" to illustrate the point. This is more hacky than preferred, but still triggers the XFS error handling behavior required to drive the indlen tests. This is only available in DEBUG mode and for testing purposes only. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 4 ++++ fs/xfs/xfs_mount.h | 15 ++++++++------- fs/xfs/xfs_sysfs.c | 14 +++++++------- 3 files changed, 19 insertions(+), 14 deletions(-) commit fa7f138ac4c70dc00519c124cf7cd4862a0a5b0e Author: Brian Foster Date: Thu Feb 16 17:19:12 2017 -0800 xfs: clear delalloc and cache on buffered write failure The buffered write failure handling code in xfs_file_iomap_end_delalloc() has a couple minor problems. First, if written == 0, start_fsb is not rounded down and it fails to kill off a delalloc block if the start offset is block unaligned. This results in a lingering delalloc block and broken delalloc block accounting detected at unmount time. Fix this by rounding down start_fsb in the unlikely event that written == 0. Second, it is possible for a failed overwrite of a delalloc extent to leave dirty pagecache around over a hole in the file. This is because is possible to hit ->iomap_end() on write failure before the iomap code has attempted to allocate pagecache, and thus has no need to clean it up. If the targeted delalloc extent was successfully written by a previous write, however, then it does still have dirty pages when ->iomap_end() punches out the underlying blocks. This ultimately results in writeback over a hole. To fix this problem, unconditionally punch out the pagecache from XFS before the associated delalloc range. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f5f893c57e37ca730808cb2eee3820abd05e7507 Author: Kees Cook Date: Mon Feb 13 11:25:26 2017 -0800 usercopy: Adjust tests to deal with SMAP/PAN Under SMAP/PAN/etc, we cannot write directly to userspace memory, so this rearranges the test bytes to get written through copy_to_user(). Additionally drops the bad copy_from_user() test that would trigger a memcpy() against userspace on failure. Signed-off-by: Kees Cook lib/test_user_copy.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 4fbfeb8bd684d564bddeff1e3723d3d9f99aa5de Author: Hoeun Ryu Date: Sun Feb 12 15:13:33 2017 +0900 usercopy: add testcases to check zeroing on failure During usercopy the destination buffer will be zeroed if copy_from_user() or get_user() fails. This patch adds testcases for it. The destination buffer is set with non-zero value before illegal copy_from_user() or get_user() is executed and the buffer is compared to zero after usercopy is done. Signed-off-by: Hoeun Ryu [kees: clarified commit log, dropped second kmalloc] Signed-off-by: Kees Cook lib/test_user_copy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3f64116a838e6c3468f9d5eed7f1f87cf3a2c3eb Merge: f3caf86 4695dae Author: David S. Miller Date: Thu Feb 16 19:34:01 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit a90e883d8b8fb07ddea4d9618ce58bf72bce7f00 Author: Michael Ellerman Date: Mon Feb 13 15:30:19 2017 +1100 powerpc/mm: Blacklist SLB symbols from kprobe We can't sensibly take a trap at this point. So, blacklist these symbols. Reported-by: Anton Blanchard Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/mm/slb_low.S | 8 ++++++++ 1 file changed, 8 insertions(+) commit e471c393dfafff54c65979cbda7d5a0eb38590f4 Author: Michael Ellerman Date: Mon Feb 13 15:26:40 2017 +1100 powerpc/mm: Convert slb_finish_load[_1T] to local symbols slb_finish_load and slb_finish_load_1T are both only used within slb_low.S, so make them local symbols. This makes the code a little clearer, as it's more obvious neither is intended to be an entry point from arbitrary other code, only the uses in this file. It also prevents them being used with kprobes and other tracing tools, which is good because we're not able to safely take traps at these locations, so making them local symbols avoids us needing to blacklist them. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/mm/slb_low.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a42715830d552d7c0e3be709383ece4832453275 Author: Stewart Smith Date: Thu Feb 16 11:37:15 2017 +1100 MAINTAINERS: Remove powerpc's "opal" pattern match The block guys have merged a new driver called "sed-opal", which is getting caught by our pattern match on "opal". So drop our "opal" pattern and replace it with matches against the specific paths for our drivers. We should try and remember to add new drivers as they're added in future. Suggested-by: Jon Derrick Signed-off-by: Stewart Smith Reviewed-by: Andrew Donnellan [mpe: Fix ic2/i2c typo, write change log] Signed-off-by: Michael Ellerman MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit eae8263fb1f4256460270dd8f42334604dcdfac6 Author: Byungchul Park Date: Tue Feb 14 16:26:24 2017 +0900 md/raid5: 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: Shaohua Li drivers/md/raid5.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 448c077eeb02240c430db2a2c3bf5285a4c65d66 Author: Matthijs van Duin Date: Thu Feb 16 01:05:04 2017 +0100 ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build 'adr' yields a data-pointer, not a function-pointer. Fixes: 999f934de195 ("ARM: omap5/dra7xx: Enable booting secondary CPU in HYP mode") Signed-off-by: Matthijs van Duin Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap-headsmp.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55f0cd3fb9c29c20fb94c47e28a9ec8cf704f8c2 Author: H Hartley Sweeten Date: Thu Feb 16 13:07:37 2017 -0700 spi: spi-ep93xx: simplify GPIO chip selects This driver requires a GPIO line to be used for the chip select of each SPI device. Remove the ep93xx_spi_chip_ops definition from the platform data and use the spi core GPIO handling for the chip selects. Fix all the ep93xx platforms that use this driver and remove the old Documentation. Signed-off-by: H Hartley Sweeten Signed-off-by: Mark Brown Documentation/spi/ep93xx_spi | 105 ----------------------- arch/arm/mach-ep93xx/edb93xx.c | 31 ++----- arch/arm/mach-ep93xx/simone.c | 63 +++----------- arch/arm/mach-ep93xx/vision_ep9307.c | 88 +++---------------- drivers/spi/spi-ep93xx.c | 139 ++++++++++--------------------- include/linux/platform_data/spi-ep93xx.h | 17 +--- 6 files changed, 74 insertions(+), 369 deletions(-) commit 0c8967c9df230d2c4dde6649f410b62e01806c22 Merge: 277d6f1 34a0548 Author: Ingo Molnar Date: Thu Feb 16 20:53:13 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core clang fixes from Arnaldo Carvalho de Melo: Changes to make tools/{perf,lib/{bpf,traceevent,api}} build with CC=clang, to, for instance, take advantage of warnings (Arnaldo Carvalho de Melo): - Conditionally request some warning options not available on clang - Set the maximum optimization level to -O3 when using CC=clang, leave the previous setting of -O6 otherwise. - Make it an error to pass a signed value to OPTION_UINTEGER, so that we can remove abs(unsigned int) calls in 'perf bench futex'. - Make sure dprintf() is not defined before using that name in 'perf bench numa' - Avoid using field after variable sized type, its a GNU extension, use equivalent code. - Fix some bugs where some variables could be used unitialized, something not caught by gcc. - Fix some spots where we were testing struct->array[] members against NULL, it will always evaluate to 'true'. - Add missing parse_events_error() prototype in the bison file. There are still one problem when trying to build the python support, but this are the 'size' outputs for 'make -C tools/perf NO_LIBPYTHON' for gcc and clang builds: DW_AT_producer: clang version 4.0.0 (http://llvm.org/git/clang.git f5be8ba13adc4ba1011a7ccd60c844bd60427c1c) (ht $ size ~/bin/perf text data bss dec hex filename 3447514 831320 23901696 28180530 1ae0032 /home/acme/bin/perf DW_AT_producer: GNU C99 6.3.1 20161221 (Red Hat 6.3.1-1) -mtune=generic -march=x86-64 -ggdb3 -O6 -std=gnu99 +-fno-omit-frame-pointer -funwind-tables -fstack-protector-all $ size ~/bin/perf text data bss dec hex filename 3671662 836480 23902752 28410894 1b1840e /home/acme/bin/perf Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f3caf8618bce7e86c6f4f86785dd004c71b63a2d Author: Ganesh Goudar Date: Thu Feb 16 12:27:15 2017 +0530 cxgb4: Remove redundant code in t4_uld_clean_up() Remove variable rxq_info and also remove redundant assignment to it. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 -- 1 file changed, 2 deletions(-) commit 5d071c24f0cb8ce9fb5642c2a65ab5ab7f5ad244 Author: Ganesh Goudar Date: Thu Feb 16 12:25:52 2017 +0530 cxgb4: Add new T5 and T6 pci device id's Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 5 +++++ 1 file changed, 5 insertions(+) commit 45da1ca2e20fb5b13c1abc8e65185dda08c88030 Author: Arjun V Date: Thu Feb 16 12:22:45 2017 +0530 cxgb4: Increase max number of tc u32 links Make max number of supported tc u32 links equal to max number of filters supported by hardware. Signed-off-by: Arjun V Signed-off-by: Rahul Lakkireddy Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c | 12 +++++------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h | 5 +---- 3 files changed, 7 insertions(+), 13 deletions(-) commit 6085831883c25860264721df15f05bbded45e2a2 Author: Mikulas Patocka Date: Wed Feb 15 12:06:19 2017 -0500 dm stats: fix a leaked s->histogram_boundaries array Fixes: dfcfac3e4cd9 ("dm stats: collect and report histogram of IO latencies") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-stats.c | 1 + 1 file changed, 1 insertion(+) commit b79af13efd98ca2908f2df1120e79a7ff70faa0d Author: Bhumika Goyal Date: Wed Feb 15 23:43:28 2017 +0530 dm space map metadata: constify dm_space_map structures Declare dm_space_map structures as const as they are only passed as an argument to the function memcpy. This argument is of type const void *, so dm_space_map structures having this property can be declared as const. File size before: text data bss dec hex filename 4889 240 0 5129 1409 dm-space-map-metadata.o File size after: text data bss dec hex filename 5139 0 0 5139 1413 dm-space-map-metadata.o Signed-off-by: Bhumika Goyal Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-space-map-metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3efb2ad834b50cb9c8625155e3e2674f5bc443b Author: Vinod Koul Date: Thu Feb 9 16:44:04 2017 +0530 ASoC: hdac_hdmi: Add device id for Geminilake Geminilake is new Intel SoC, so add codec entry for HDMI Signed-off-by: Vinod Koul Signed-off-by: Senthilnathan Veppur Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 255048634366c9aee87d7ab801fa530c34f10b9f Author: Vinod Koul Date: Thu Feb 9 16:44:03 2017 +0530 ASoC: Intel: Skylake: Add Geminlake IDs Geminilake is next gen SoC, so add the IDs for Geminilake. Signed-off-by: Vinod Koul Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 7 +++++++ sound/soc/intel/skylake/skl.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 06a99ddd2049e2697de32a9435c4d5c5b5c78360 Author: Vinod Koul Date: Thu Feb 9 16:44:02 2017 +0530 ASoC: rt298: Add DMI match for Geminilake reference platform Geminilake reference platform also uses combo jack for audio connector so we need to set codec pdata to use this based on DMI match for this board. Signed-off-by: Vinod Koul Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 7 +++++++ 1 file changed, 7 insertions(+) commit db2f586b803eb6a7974098dd8ce1201f048071d0 Author: Senthilnathan Veppur Date: Thu Feb 9 16:44:01 2017 +0530 ASoC: Intel: Skylake: Check device type to get endpoint configuration Geminilake has two different devices connected to the same SSP, so use device_type check to get correct device configuration. Signed-off-by: Senthilnathan Veppur Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-nhlt.c | 16 ++++++++++------ sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl.h | 3 ++- 3 files changed, 42 insertions(+), 9 deletions(-) commit c5cf9f37a0fb6e50d68f6dcf58b93b2c47c780a1 Author: Jeeja KP Date: Tue Feb 7 19:10:00 2017 +0530 ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 86b5703158ff39e5efe9480784a7cad1b4baef59 Author: Jeeja KP Date: Tue Feb 7 19:09:58 2017 +0530 ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 565f13a95ec3d541324e80657bd512a19df8e576 Author: Jeeja KP Date: Tue Feb 7 19:09:57 2017 +0530 ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 64f8620d482d38ed093eca78d8ca9b1bb64a6172 Author: Jeeja KP Date: Tue Feb 7 19:09:56 2017 +0530 ASoC: Intel: Skylake: Add jack port initialize in rt286 machine After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0324e51b5ba405cd2d66e9e95430f6b9562d0ac0 Author: Jeeja KP Date: Tue Feb 7 19:09:55 2017 +0530 ASoC: hdac_hdmi: Add machine pin widget for each port Represent each port as machine DAPM pin widget. This helps in enable/disable pin when monitor is connected/disconnected in case pcm is rendered to multiple ports. Create machine pin widgets and pin switch kcontrol for each port and report based on the pin status Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 130 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/hdac_hdmi.h | 2 + 2 files changed, 132 insertions(+) commit 625de2bf2ed1632cb74a4a38f8f09a2063fb74af Author: Jeeja KP Date: Tue Feb 7 19:09:54 2017 +0530 ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in bxt_da7219_max98357 machine Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 7932b8ace390c4474d1dc62d7843e843bc3ae9b5 Author: Jeeja KP Date: Tue Feb 7 19:09:53 2017 +0530 ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in bxt_rt298.c machine Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 9e4278cd9b8e6e6464a4eb5e65c2b232076aa6c6 Author: Jeeja KP Date: Tue Feb 7 19:09:52 2017 +0530 ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in skl_nau88l25_ssm4567 machine Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit c541b2dd45042c1e031778e0229d032dff90f045 Author: Jeeja KP Date: Tue Feb 7 19:09:51 2017 +0530 ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in skl_nau88l25_max98357a machine Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit f3af359242f58b9c5f6f78ff4d13e8f108514bc0 Author: Jeeja KP Date: Tue Feb 7 19:09:50 2017 +0530 ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine Creates ASoC jack for HDMI pcm and calls hdmi codec API to initialize jack in skl_rt268 machine Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 624900163d060f15d71ff383104a909737de770c Author: Jeeja KP Date: Tue Feb 7 19:09:49 2017 +0530 ASoC: hdac_hdmi: Use ASoC jack instead of snd_jack Use snd_soc_jack instead of snd_jack and create the jack in machine driver and pass the jack pointer to hdac_hdmi driver for jack reporting. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 19 ++++++++----------- sound/soc/codecs/hdac_hdmi.h | 3 ++- 2 files changed, 10 insertions(+), 12 deletions(-) commit e0e5d3e5a53b3bc354c18030b78b7ebcb33e004b Author: Jeeja KP Date: Tue Feb 7 19:09:48 2017 +0530 ASoC: hdac_hdmi: Add support for multiple ports to a PCM Since we have the MST feature enabled and Pin-Port mux for user to select the converter routing, multiple port mapping to same converter needs to be supported. To support multiple port mapped to same converter following changes are done for this:. o Add port list to pcm, so that multiple ports can be mapped to a PCM. o Jack reporting in case where multiple port are attached to same PCM. o Change hdac_hdmi_get_port_from_cvt(), channel_map, remove functions to parse through all ports mapped to same the PCM. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 168 +++++++++++++++++++++++++++++-------------- 1 file changed, 113 insertions(+), 55 deletions(-) commit 1b46ebd136b3ad334762d6e66b0b96b432680e50 Author: Jeeja KP Date: Tue Feb 7 19:09:47 2017 +0530 ASoc: hdac_hdmi: Configure pin verbs for MST To enable stream on a specific port of a MST capable pin, the port needs to be selected before we configure the pin widget verb. When port is selected, all the pin widget verb controlling the sink device operation will be directed to selected port. So add port selection before configuring the pin widget verb. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a9ce96bcd9c4d0c1ffd3d37c000bcee470b2535b Author: Jeeja KP Date: Tue Feb 7 19:09:46 2017 +0530 ASoC: hdac_hdmi: Handle MST pin jack detection at boot/resume The ELD notification can be received asynchronously from the graphics side and this may happen just at the moment the sound driver is initializing and notification will be missed. Similarly at system resume, the notification is ignored as the ELD and connection states are updated in anyway at the end of the resume. So check the jack status in boot/resume by querying the port presence based on pin caps and report the jack status. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit fc181b04f2d44805624d4bc5a0615bc084199a81 Author: Jeeja KP Date: Tue Feb 7 19:09:45 2017 +0530 ASoC: hdac_hdmi: Add MST verb support To support DP MST audio, new pin verbs/params are added. This patch adds helper functions to do following: o To set a specific port o To get the currently selected port o To get the length of port. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 025205f8f30c6ab52b69bf34fb359ac80360fefd Author: Andrey Ryabinin Date: Tue Feb 14 13:08:39 2017 +0300 x86/mm/ptdump: Add address marker for KASAN shadow region Annotate the KASAN shadow with address markers in page table dump output: $ cat /sys/kernel/debug/kernel_page_tables ... ---[ Vmemmap ]--- 0xffffea0000000000-0xffffea0003000000 48M RW PSE GLB NX pmd 0xffffea0003000000-0xffffea0004000000 16M pmd 0xffffea0004000000-0xffffea0005000000 16M RW PSE GLB NX pmd 0xffffea0005000000-0xffffea0040000000 944M pmd 0xffffea0040000000-0xffffea8000000000 511G pud 0xffffea8000000000-0xffffec0000000000 1536G pgd ---[ KASAN shadow ]--- 0xffffec0000000000-0xffffed0000000000 1T ro GLB NX pte 0xffffed0000000000-0xffffed0018000000 384M RW PSE GLB NX pmd 0xffffed0018000000-0xffffed0020000000 128M pmd 0xffffed0020000000-0xffffed0028200000 130M RW PSE GLB NX pmd 0xffffed0028200000-0xffffed0040000000 382M pmd 0xffffed0040000000-0xffffed8000000000 511G pud 0xffffed8000000000-0xfffff50000000000 7680G pgd 0xfffff50000000000-0xfffffbfff0000000 7339776M ro GLB NX pte 0xfffffbfff0000000-0xfffffbfff0200000 2M pmd 0xfffffbfff0200000-0xfffffbfff0a00000 8M RW PSE GLB NX pmd 0xfffffbfff0a00000-0xfffffbffffe00000 244M pmd 0xfffffbffffe00000-0xfffffc0000000000 2M ro GLB NX pte ---[ KASAN shadow end ]--- 0xfffffc0000000000-0xffffff0000000000 3T pgd ---[ ESPfix Area ]--- ... Signed-off-by: Andrey Ryabinin Reviewed-by: Alexander Potapenko Cc: Mark Rutland Cc: kasan-dev@googlegroups.com Cc: Tobias Regnery Cc: Andrey Ryabinin Cc: Dmitry Vyukov Link: http://lkml.kernel.org/r/20170214100839.17186-2-aryabinin@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/mm/dump_pagetables.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 243b72aae28ca1032284028323bb81c9235b15c9 Author: Andrey Ryabinin Date: Tue Feb 14 13:08:38 2017 +0300 x86/mm/ptdump: Optimize check for W+X mappings for CONFIG_KASAN=y Enabling both DEBUG_WX=y and KASAN=y options significantly increases boot time (dozens of seconds at least). KASAN fills kernel page tables with repeated values to map several TBs of the virtual memory to the single kasan_zero_page: kasan_zero_pud -> kasan_zero_pmd-> kasan_zero_pte-> kasan_zero_page So, the page table walker used to find W+X mapping check the same kasan_zero_p?d page table entries a lot more than once. With patch pud walker will skip the pud if it has the same value as the previous one . Skipping done iff we search for W+X mappings, so this optimization won't affect the page table dump via debugfs. This dropped time spend in W+X check from ~30 sec to reasonable 0.1 sec: Before: [ 4.579991] Freeing unused kernel memory: 1000K [ 35.257523] x86/mm: Checked W+X mappings: passed, no W+X pages found. After: [ 5.138756] Freeing unused kernel memory: 1000K [ 5.266496] x86/mm: Checked W+X mappings: passed, no W+X pages found. Signed-off-by: Andrey Ryabinin Reviewed-by: Alexander Potapenko Cc: Mark Rutland Cc: kasan-dev@googlegroups.com Cc: Tobias Regnery Cc: Dmitry Vyukov Link: http://lkml.kernel.org/r/20170214100839.17186-1-aryabinin@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/mm/dump_pagetables.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 5b1ad68f9b1951ef78312d2935906cc8a8bd2e12 Merge: 1013fe3 7089db8 Author: Thomas Gleixner Date: Thu Feb 16 19:51:27 2017 +0100 Merge branch 'linus' into x86/mm Make sure to get the latest fixes before applying the ptdump enhancements. commit 0a441275018b69deffd35bc22a84fd51c54d7d85 Author: Mandel Benjamin Date: Wed Feb 15 06:46:16 2017 +0900 Staging: vc04_services: Fix the "space prohibited" code style errors Fixes the following code style errors: ERROR: space prohibited after/before that open/closed parenthesis Signed-off-by: Mandel Benjamin Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/vchi_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b0d6284d9486102350a72418e38e5cfb0055477 Author: Mandel Benjamin Date: Wed Feb 15 06:39:52 2017 +0900 Staging: vc04_services: Fix the "wrong indent" code style errors Fixes the following code style errors: ERROR: code indent should use tabs where possible Signed-off-by: Mandel Benjamin Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/vchi_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66812da3a689e3fea8a2e3899dd8b5f53aab2261 Author: Tobias Klauser Date: Wed Feb 15 13:51:10 2017 +0100 staging: octeon: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct octeon_ethernet, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 6 +++--- drivers/staging/octeon/ethernet-tx.c | 10 +++++----- drivers/staging/octeon/ethernet.c | 18 +++++++++--------- drivers/staging/octeon/octeon-ethernet.h | 2 -- 4 files changed, 17 insertions(+), 19 deletions(-) commit 548d35062bc0550166cb7d6e55d969b83cd503f7 Author: Derek Robson Date: Thu Feb 16 18:34:18 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 61 +++++++++++++++----------- 1 file changed, 36 insertions(+), 25 deletions(-) commit b8edc16314d8f41b4d4c2d152e80295bb50262a5 Author: Derek Robson Date: Thu Feb 16 18:33:51 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 290 +++++++++++----------- 1 file changed, 150 insertions(+), 140 deletions(-) commit 87bf14fe117e68ba5a146934db7e07ec8402fbb1 Author: Derek Robson Date: Thu Feb 16 18:33:12 2017 +1300 Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 6dbe64b2feafe5e7547d87adafbe807f11b86ded Author: Derek Robson Date: Thu Feb 16 18:32:43 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/ieee80211_module.c | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 239378b46a4dd9be58a85c83d6762ce20172b9b0 Author: Derek Robson Date: Thu Feb 16 18:32:15 2017 +1300 Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e664c6feab6f898845fa5cb8cfe17da03d65d9d Author: Derek Robson Date: Thu Feb 16 18:32:01 2017 +1300 Staging: rtl8192u: r8192U.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U.h | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 8ec5252530bcb177219bbb4d63f31b9a18b3b3bc Author: Derek Robson Date: Thu Feb 16 18:31:37 2017 +1300 Staging: rtl8192u: r8192U_core.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 70 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 70cd55d6755ee8342899b9ea3ba7fe16987f09b7 Author: Derek Robson Date: Thu Feb 16 18:31:07 2017 +1300 Staging: rtl8192u: r819xU_cmdpkt.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_cmdpkt.c | 82 ++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 30 deletions(-) commit f59de563358eb9351b7f8f0ba2d3be2ebb70b93d Author: Chris Brandt Date: Tue Feb 14 11:08:05 2017 -0500 clk: renesas: mstp: ensure register writes complete When there is no status bit, it is possible for the clock enable/disable operation to have not completed by the time the driver code resumes execution. This is due to the fact that write operations are sometimes queued and delayed internally. Doing a read ensures the write operations has completed. Fixes: b6face404f38 ("ARM: shmobile: r7s72100: add essential clock nodes to dtsi") Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/renesas/clk-mstp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c95378123d466f4ecaf14cd3543a01f03bece36d Author: simran singhal Date: Wed Feb 15 01:41:06 2017 +0530 staging: rtl8192u: blank lines aren't necessary before a close brace '}' Fix checkpatch issues: "CHECK: Blank lines aren't necessary before a close brace '}'". Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 3 --- 1 file changed, 3 deletions(-) commit 758c3788a8e6cee1e9caad8954da00d298f64388 Author: simran singhal Date: Wed Feb 15 01:39:09 2017 +0530 staging: rtl8192u: Adding space after enum and struct definition Fixes checkpatch.pl warning: WARNING: missing space after struct definition WARNING: missing space after enum definition Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 6beed63bf3c9002933a0df2e6b0dc58634060d9b Author: simran singhal Date: Wed Feb 15 01:38:13 2017 +0530 staging: rtl8192u: Adding space after struct definition Fixes checkpatch.pl warning: WARNING: missing space after struct definition Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db224d31bbcd04fe1e85b40649e61ced97776720 Author: Shiva Kerdel Date: Thu Feb 16 17:13:25 2017 +0100 Staging: ks7010: Add required and preferred spaces around operators Spaces should be added around operators to improve readability and are required in some cases. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 64 +++++++++++++++++----------------- drivers/staging/ks7010/ks_wlan.h | 4 +-- drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +++++++++++++++++----------------- drivers/staging/ks7010/ks_wlan_net.c | 4 +-- drivers/staging/ks7010/michael_mic.c | 8 ++--- 6 files changed, 73 insertions(+), 73 deletions(-) commit d9eb486147270d15110dc3153203dfe65ccd15e6 Author: Shiva Kerdel Date: Thu Feb 16 16:31:02 2017 +0100 Staging: ks7010: ks*: Remove redundant blank lines Multiple blank lines shouldn't be used. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks_wlan_net.c | 2 -- 2 files changed, 3 deletions(-) commit 38fb746872a85f66e6858d5858077a2aa5cc9ce2 Author: Shiva Kerdel Date: Thu Feb 16 16:31:01 2017 +0100 Staging: ks7010: ks*: Add missing blank lines after declarations A blank line should be added after function/struct/union/enum declarations. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 1 + drivers/staging/ks7010/ks_wlan.h | 1 + 2 files changed, 2 insertions(+) commit ee9dc31962ac7141df6926b8696edf8831dde76c Author: Garlic Tseng Date: Thu Feb 16 13:27:16 2017 +0800 ASoC: mediatek: add power-domains for mt2701-afe-pcm.txt This add power-domains for mt2701-afe-pcm Signed-off-by: Garlic Tseng Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt | 2 ++ 1 file changed, 2 insertions(+) commit cc3e1ce2c73c0e44373eb364f94e4fefebf7719e Author: Garlic Tseng Date: Thu Feb 16 13:27:15 2017 +0800 ASoC: mediatek: add power-domain get/put ctrl for mt2701 add power-domain ctrl for audio driver Signed-off-by: Garlic Tseng Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit ad16d4a83ddc86151b4a6efe257ba74eb30f9f8e Author: DongCV Date: Wed Feb 15 19:50:52 2017 +0900 spi: rspi: Replaces "n" by "len" in qspi_transfer_*() This patch replaced "n" by "len" bytes of data in qspi_transfer_in() and qspi_transfer_out() function. This will make improving readability. Signed-off-by: DongCV Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7264abc7000d601726aefb05189ea524ee3995ba Author: DongCV Date: Wed Feb 15 19:50:51 2017 +0900 spi: rspi: Fixes bogus received byte in qspi_transfer_in() In qspi_transfer_in(), when receiving the last n (or len) bytes of data, one bogus byte was written in the receive buffer. This code leads to a buffer overflow. "jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03b40000: 0x1900 instead jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03b40004: 0x000c instead" The error message above happens when trying to mount, unmount, and remount a jffs2-formatted device. This patch removed the bogus write to fixes: 3be09bec42a800d4 "spi: rspi: supports 32bytes buffer for DUAL and QUAD" And here is Geert's comment: "spi: rspi: Fix bogus received byte in qspi_transfer_in() When there are less than QSPI_BUFFER_SIZE remaining bytes to be received, qspi_transfer_in() writes one bogus byte in the receive buffer, possibly leading to a buffer overflow. This can be reproduced by mounting, unmounting, and remounting a jffs2-formatted device, causing lots of warnings like: "jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03b40000: 0x1900 instead" Remove the bogus write to fix this. " Signed-off-by: DongCV Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 1 - 1 file changed, 1 deletion(-) commit 614dd644cbacb6a0ad0f1f746e75ec3887ed18bb Author: Stefan Svinciak Date: Wed Feb 15 17:04:26 2017 +0100 staging: visorbus, replace init_timer with setup_timer Newer version is more readable and needs less changes if/when timer_struct is to be changed. Signed-off-by: Stefan Svinciak Signed-off-by: Jiri Slaby Cc: David Kershner Cc: Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dfbfa05210f4734990fd82e832759dc6e6ab038a Author: Michael S. Hansen Date: Wed Feb 15 21:47:41 2017 -0500 staging: vt6656: rxtx.c Removed multiple dereferencing Fixes checkpatch warning: Avoid multiple line dereference Signed-off-by: Michael S. Hansen Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42aa03dc5ce7798707948bfdf9cd87a6a7627299 Author: Arushi Singhal Date: Wed Feb 15 00:53:47 2017 +0530 staging: vt6656: Alignment match open parenthesis Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rxtx.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 812930665872e668119412a4bdb0c08f8c373a1f Author: Arushi Singhal Date: Tue Feb 14 23:39:15 2017 +0530 staging: vt6656: Alignment should match open parenthesis Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/firmware.c | 34 +++++++++++++++++----------------- drivers/staging/vt6656/key.h | 2 +- drivers/staging/vt6656/rf.c | 12 ++++++------ drivers/staging/vt6656/usbpipe.c | 12 ++++++------ drivers/staging/vt6656/wcmd.c | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) commit cd3d9ecebf8b3918588b1d529ad0a70da4ac8263 Author: Bo YU Date: Thu Feb 16 09:59:07 2017 -0500 Staging: bcm2835-audio: fixed a code style issue: Missing a blank line after declarations Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-pcm.c | 1 + 1 file changed, 1 insertion(+) commit f5e2199ae574245b56b32e047c93625a28fe3b3a Author: Dan Carpenter Date: Wed Feb 15 02:15:44 2017 +0300 staging: bcm2835-audio: allocate enough data for work queues We accidentally allocate sizeof(void *) bytes instead of 112 bytes. It results in memory corruption. Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 021fbaa5fb5b2f0c2d9938ee16c79358ba9bf06b Author: Dan Carpenter Date: Wed Feb 15 02:10:44 2017 +0300 Staging: bcm2835-audio: && vs & typo We intended to mask away the upper bits but there is a "&&" vs "&" typo so it's broken. Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3fe2a8e60d27ea0c2410ff299efb58fc2032b93 Author: Gargi Sharma Date: Thu Feb 16 22:58:35 2017 +0530 staging: wlan-ng: remove space before tab remove the space before the tab to fix the the checkpatch issue, no spaces before tabs. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66dc935358f43737fc1e745c21be7930e47b8875 Author: Maxime Rossi Bellom Date: Thu Feb 16 11:50:26 2017 +0100 staging: lustre: Fix incompatible argument in osc_match_base sparse warn about _u32 used for two arguments in function osc_match_base instead of enum ldlm_type and enum ldlm_mode as used in the prototype. Signed-off-by: Maxime Rossi Bellom Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3827b64dba27ebadb4faf51f2c91143e01ba1f6d Author: Javier Martinez Canillas Date: Thu Feb 16 14:30:02 2017 -0300 regulator: core: Resolve supplies before disabling unused regulators After commit 66d228a2bf03 ("regulator: core: Don't use regulators as supplies until the parent is bound"), input supplies aren't resolved if the input supplies parent device has not been bound. This prevent regulators to hold an invalid reference if its supply parent device driver probe is deferred. But this causes issues on some boards where a PMIC's regulator use as input supply a regulator from another PMIC whose driver is registered after the driver for the former. In this case the regulators for the first PMIC will fail to resolve input supplies on regulators registration (since the other PMIC wasn't probed yet). And when the core attempts to resolve again latter when the other PMIC registers its own regulators, it will fail again since the parent device isn't bound yet. This will cause some parent supplies to never be resolved and wrongly be disabled on boot due taking them as unused. To solve this problem, also attempt to resolve the pending regulators input supplies before disabling the unused regulators. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/regulator/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9ff7400bd38c0d0bbcd02ed79cca2e51e10f0958 Author: Cheah Kok Cheong Date: Thu Feb 16 22:05:47 2017 +0800 Staging: comedi: drivers: comedi_test: Add auto-configuration capability Currently this module needs to be manually configured by COMEDI userspace tool before the test waveform can be read by a COMEDI compatible application. This patch adds auto-configuration capability and makes it the default loading option. This is achieved by creating a device during init to stand in for a real hardware device. This allows comedi_auto_config() to perform auto-configuration. With this patch, the test waveform can be read by a COMEDI compatible application without needing manual configuration. Previous behaviour is still selectable via module loading parameter. Module loading without passing any parameter will default to auto-configuration with the same default waveform amplitude and period values. For auto-configuration, different amplitude and period values can be set via module loading parameters. Tested on Xubuntu 16.04 using Xoscope ver: 2.0 which is available in the Ubuntu repository. Xoscope is a COMEDI compatible digital oscilloscope application. For manual configuration, only module loading/unloading is tested. Here are the truncated dmesg output. [sudo modprobe comedi_test] comedi_test: 1000000 microvolt, 100000 microsecond waveform attached driver 'comedi_test' has successfully auto-configured 'comedi_test'. [sudo modprobe comedi_test amplitude=2500000 period=150000] comedi_test: 2500000 microvolt, 150000 microsecond waveform attached driver 'comedi_test' has successfully auto-configured 'comedi_test'. [sudo modprobe comedi_test noauto=1] comedi_test: module is from the staging directory, the quality is unknown, you have been warned. For those without an actual hardware, the comedi_test module is as close as one can get to test the COMEDI system. Having both auto and manual configuration capability will broaden the test function of this module. Hopefully this will make it easier for people to check out the COMEDI system and contribute to its development. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/comedi_test.c | 135 ++++++++++++++++++++++++--- 1 file changed, 123 insertions(+), 12 deletions(-) commit 7f1b21591a632c6caefd9aa53b630808f4f477e1 Author: Mike Snitzer Date: Tue Oct 4 15:00:47 2016 -0400 dm cache metadata: use cursor api in blocks_are_clean_separate_dirty() Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 9b696229aa7de356675a938c6c8a70b46085ed66 Author: Joe Thornber Date: Wed Oct 5 10:40:39 2016 -0400 dm persistent data: add cursor skip functions to the cursor APIs Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-array.c | 21 ++++++++++++++++++++ drivers/md/persistent-data/dm-array.h | 1 + drivers/md/persistent-data/dm-bitset.c | 35 ++++++++++++++++++++++++++++++++++ drivers/md/persistent-data/dm-bitset.h | 1 + drivers/md/persistent-data/dm-btree.c | 11 +++++++++++ drivers/md/persistent-data/dm-btree.h | 1 + 6 files changed, 70 insertions(+) commit 683bb1a3742bb0c8768711aa5ff1034d92e447f2 Author: Joe Thornber Date: Thu Sep 22 10:45:21 2016 -0400 dm cache metadata: use dm_bitset_new() to create the dirty bitset in format 2 Big speed up with large configs. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2151249eaabb48151cff6364adb4054b3497d62d Author: Joe Thornber Date: Thu Sep 22 10:44:41 2016 -0400 dm bitset: add dm_bitset_new() A more efficient way of creating a populated bitset. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-bitset.c | 42 ++++++++++++++++++++++++++++++++++ drivers/md/persistent-data/dm-bitset.h | 16 +++++++++++++ 2 files changed, 58 insertions(+) commit 48551054fc256285289f6d03abd50cb74fb71819 Author: Mike Snitzer Date: Tue Oct 4 15:22:17 2016 -0400 dm cache metadata: name the cache block that couldn't be loaded Improves __load_mapping_v1() and __load_mapping_v2() DMERR messages to explicitly name the cache block number whose mapping couldn't be loaded. Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 629d0a8a1a104187db8fbf966e4cc5cfb6aa9a3c Author: Joe Thornber Date: Thu Sep 22 06:15:21 2016 -0400 dm cache metadata: add "metadata2" feature If "metadata2" is provided as a table argument when creating/loading a cache target a more compact metadata format, with separate dirty bits, is used. "metadata2" improves speed of shutting down a cache target. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer Documentation/device-mapper/cache.txt | 4 + drivers/md/dm-cache-metadata.c | 278 ++++++++++++++++++++++++++++++---- drivers/md/dm-cache-metadata.h | 11 +- drivers/md/dm-cache-target.c | 38 +++-- 4 files changed, 278 insertions(+), 53 deletions(-) commit ae4a46a1f60942263d6fd119fe1da49bb16d2bd5 Author: Joe Thornber Date: Mon Oct 3 14:16:20 2016 -0400 dm cache metadata: use bitset cursor api to load discard bitset Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 48 ++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 20 deletions(-) commit 6fe28dbf05e329ce136f38219d95a1826ceafebd Author: Joe Thornber Date: Mon Oct 3 14:15:02 2016 -0400 dm bitset: introduce cursor api Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-bitset.c | 69 ++++++++++++++++++++++++++++++++++ drivers/md/persistent-data/dm-bitset.h | 22 +++++++++++ 2 files changed, 91 insertions(+) commit 9f9ef0657d53d988dc07b096052b3dd07d6e3c46 Author: Joe Thornber Date: Thu Nov 19 13:36:45 2015 +0000 dm btree: use GFP_NOFS in dm_btree_del() dm_btree_del() is called from an ioctl so don't recurse into FS. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-btree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3ba3ba1e8411532dc4a05b4e8932c9e358d70a44 Author: Joe Thornber Date: Thu Nov 19 13:03:36 2015 +0000 dm space map common: memcpy the disk root to ensure it's arch aligned The metadata_space_map_root passed to sm_ll_open_metadata() may or may not be arch aligned, use memcpy to ensure it is. This is not a fast path so the extra memcpy doesn't hurt us. Long-term it'd be better to use the kernel's alignment infrastructure to remove the memcpy()s that are littered across persistent-data (btree, array, space-maps, etc). Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-space-map-common.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 602548bdd5ac4ed7025d992e3ad61a628af4c500 Author: Joe Thornber Date: Thu Nov 19 12:55:58 2015 +0000 dm block manager: add unlikely() annotations on dm_bufio error paths Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-block-manager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ca763d0a53b264a650342cee206512bc92ac7050 Author: Joe Thornber Date: Thu Feb 9 11:46:18 2017 -0500 dm cache: fix corruption seen when using cache > 2TB A rounding bug due to compiler generated temporary being 32bit was found in remap_to_cache(). A localized cast in remap_to_cache() fixes the corruption but this preferred fix (changing from uint32_t to sector_t) eliminates potential for future rounding errors elsewhere. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bbd6411513aa8ef3ea02abab61318daf87c1af1e Author: Cao, Lei Date: Fri Feb 3 20:04:35 2017 +0000 KVM: Support vCPU-based gfn->hva cache Provide versions of struct gfn_to_hva_cache functions that take vcpu as a parameter instead of struct kvm. The existing functions are not needed anymore, so delete them. This allows dirty pages to be logged in the vcpu dirty ring, instead of the global dirty ring, for ring-based dirty memory tracking. Signed-off-by: Lei Cao Message-Id: Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 22 ++++++++++------------ arch/x86/kvm/x86.c | 41 ++++++++++++++++++++--------------------- include/linux/kvm_host.h | 16 ++++++++-------- virt/kvm/kvm_main.c | 34 +++++++++++++++++----------------- 4 files changed, 55 insertions(+), 58 deletions(-) commit 4bd518f1598d41985eb933aa73bac2605b70984c Author: Paolo Bonzini Date: Fri Feb 3 20:44:51 2017 -0800 KVM: use separate generations for each address space This will make it easier to support multiple address spaces in kvm_gfn_to_hva_cache_init. Instead of having to check the address space id, we can keep on checking just the generation number. Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 5a2d4365d2c39e8a3ff3cbee3af123a23aebdb9c Author: Paolo Bonzini Date: Fri Feb 3 20:32:28 2017 -0800 KVM: only retrieve memslots once when initializing cache This will make it a bit simpler to handle multiple address spaces in gfn_to_hva_cache. Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 47c0152e0f8bd325869417e0aaff032e62bcf6f2 Author: Paolo Bonzini Date: Mon Dec 19 11:44:07 2016 +0100 KVM: VMX: use vmcs_set/clear_bits for CPU-based execution controls Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 4306f200c71b959c44c32c8a0048fd5857a357c5 Author: Radim Krčmář Date: Wed Feb 15 20:27:20 2017 +0100 ptp_kvm: try to detect hypercall availability No point in registering the device if it cannot work. The hypercall does not advertise itself, so we have to call it. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini drivers/ptp/ptp_kvm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e8411302b44b844b4f619e8064735c70b7490ee8 Author: Arnd Bergmann Date: Fri Feb 3 17:47:26 2017 +0100 drm/amdgpu: fix warning on older gcc releases gcc-4.8 warns about '{0}' being used an an initializer for nested structures: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_ring_emit_ce_meta_init’: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:7263:2: warning: missing braces around initializer [-Wmissing-braces] } ce_payload = {0}; drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_ring_emit_de_meta_init’: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:7290:2: warning: missing braces around initializer [-Wmissing-braces] } de_payload = {0}; Using an empty {} initializer however has the same effect and works on all versions. Fixes: acad2b2a7b70 ("drm/amdgpu:implement CE/DE meta-init routines") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e011039a3f376f246e662b0e3ffb08018e3416e Merge: d0f7de9 6b6a186 Author: Arnd Bergmann Date: Thu Feb 16 17:50:04 2017 +0100 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/late Pull "Amlogic DT updates for v4.11, round 2" from Kevin Hilman: - add SAR ADC driver - add ADC laddered keys to meson-gxbb-p200 board * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxbb-p200: add ADC laddered keys ARM64: dts: meson: meson-gx: add the SAR ADC ARM64: dts: meson-gxl: add the pwm_ao_b pin ARM64: dts: meson-gx: add the missing pwm_AO_ab node clk: gxbb: fix CLKID_ETH defined twice ARM64: dts: meson-gxl: rename Nexbox A95x for consistency clk: gxbb: add the SAR ADC clocks and expose them dt-bindings: amlogic: Add WeTek boards ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play dt-bindings: vendor-prefix: Add wetek vendor prefix ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes ARM64: dts: meson-gxbb-vega-s95: Add LED ARM64: dts: meson-gx: add the serial CTS and RTS pin groups ARM64: dts: meson-gx: add the missing uart_AO_B clk: meson-gxbb: Export HDMI clocks ARM64: dts: meson-gxm: add SCPI configuration for GXM ARM64: dts: meson-gx: move the SCPI and SRAM nodes to meson-gx commit d0f7de9258e1fa7b531f10a6bdb971a2417dfd8a Merge: a121103 6629490 Author: Arnd Bergmann Date: Thu Feb 16 17:46:52 2017 +0100 Merge tag 'samsung-dt64-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/late Pull "Samsung DeviceTree ARM64 update for v4.11, third round" from Krzysztof Kozłowski: 1. Add necessary initial configuration for clocks of display subsystem. Till now it worked mostly thanks to bootloader. 2. Use macro definitions instead of hard-coded values for pinctrl on Exynos7. 3. Enable USB 3.0 (DWC3) on Exynos7. * tag 'samsung-dt64-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (27 commits) arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost arm64: dts: exynos: Add USB 3.0 controller node for Exynos7 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7 pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e clk: samsung: exynos5433: Add data for 250MHz and 278MHz PLL rates clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks arm64: dts: exynos: Add clocks to Exynos5433 LPASS module arm64: dts: exynos: set LDO7 regulator as always on arm64: dts: exynos: configure TV path clocks for Ultra HD modes arm64: dts: exynos: Fix drive strength of sd0_xxx pin definitions arm64: dts: exynos: Disable pull down for audio pins in Exynos5433 SoCs arm64: dts: exynos: Add TM2 touchkey node arm64: dts: exynos: Remove unneeded unit names in Exynos5433 nodes arm64: dts: exynos: Enable HDMI/TV path on Exynos5433-TM2 arm64: dts: exynos: Add HDMI node to Exynos5433 arm64: dts: exynos: Add DECON_TV node to Exynos5433 arm64: dts: exynos: Fix addresses in node names on Exynos5433 arm64: dts: exynos: Make TM2 and TM2E independent from each other arm64: dts: exynos: Fix wrong values for ldo23 and ldo25 on TM2/TM2E ... commit 5187b6cd1d22a010e7701e3ed74bdf0ad175904a Author: Nicolai Hähnle Date: Tue Feb 14 11:06:52 2017 +0100 drm/ttm: make TTM_MAX_BO_PRIORITY unsigned Fix a warning about different types in min() macro in amdgpu: In file included from ./include/linux/list.h:8:0, from drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:32: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function ‘amdgpu_bo_create_restricted’: ./include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast (void) (&min1 == &min2); \ ^ ./include/linux/kernel.h:742:2: note: in expansion of macro ‘__min’ __min(typeof(x), typeof(y), \ ^~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:434:21: note: in expansion of macro ‘min’ bo->tbo.priority = min(bo->tbo.priority, TTM_MAX_BO_PRIORITY - 1); ^~~ Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e89d5b5c202831648b853be20a5b9f8170d642d5 Author: Tom St Denis Date: Mon Feb 13 14:11:40 2017 -0500 drm/amd/amdgpu: Fix flow control in uvd_v4_2_stop() Break out of outer loop properly. Signed-off-by: Tom St Denis Reported-by: Dan Carpenter Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fce293ca3d088b9a398c4fa3f7e9489283a70cf5 Author: Huang Rui Date: Mon Feb 13 10:38:08 2017 +0800 drm/amd/powerplay: add didt config table for polaris kicker Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 150 ++++++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) commit 28a488848f9e14898c55e0bb2c2774288a424d67 Author: Huang Rui Date: Fri Feb 10 16:55:18 2017 +0800 drm/amd/powerplay: modify VddcPhase value for polaris kicker Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5d7213b0be71b3cb780b2f2094879480e46ad00e Author: Huang Rui Date: Fri Feb 10 16:42:19 2017 +0800 drm/amd/powerplay: add kicker flag into smumgr Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 20 ++++++++++++-------- drivers/gpu/drm/amd/include/cgs_common.h | 1 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 ++ 4 files changed, 16 insertions(+), 8 deletions(-) commit 27d1c469a5d3a104fc5a9313dac84e726f8f3de9 Author: Colin Ian King Date: Wed Dec 28 21:17:54 2016 +0000 Bluetooth: fix spelling mistake: "advetising" -> "advertising" trivial fix to spelling mistake in BT_ERR_RATELIMITED error message Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9a4840dc43c978b2978b37ed1737c385a33b410 Author: Colin Ian King Date: Wed Dec 28 21:30:30 2016 +0000 Bluetooth: btmrvl: fix spelling mistake: "caibration" -> "calibration" trivial fix to spelling mistake in BT_ERR error message Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0df8a3dbacb585bb9c8b2e55de43c6aac9d86488 Merge: 53b7f7b beabdc3 Author: Greg Kroah-Hartman Date: Thu Feb 16 08:38:01 2017 -0800 Merge tag 'usb-serial-4.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.11-rc1 part 2 Here's one more device id for the new upd78f0730 driver and three clean-up patches that are mostly moving some code around. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit e27ee2b16bad0c2ae648f5ee67d0555e0cd799d6 Author: Javier Martinez Canillas Date: Mon Jan 2 10:23:23 2017 -0300 Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled The driver only has runtime but no build time dependency with QCOM_SMD && QCOM_WCNSS_CTRL. So it can be built for testing purposes if COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Signed-off-by: Javier Martinez Canillas Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 441ad62d6c3f131f1dbd7dcdd9cbe3f74dbd8501 Author: Dmitry Tunin Date: Thu Jan 5 13:19:53 2017 +0300 Bluetooth: Add another AR3012 04ca:3018 device T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3018 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: Dmitry Tunin Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org drivers/bluetooth/ath3k.c | 2 ++ drivers/bluetooth/btusb.c | 1 + 2 files changed, 3 insertions(+) commit 89ab37b489d11e2ec3a70635139dcda076c16354 Author: Daniel Drake Date: Thu Jan 5 11:10:54 2017 -0600 Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96 The BCM2E96 ID is used by the ECS EF20 laptop, and BCM2E95 is present in the Weibu F3C. Both are now logged as: hci0: BCM: chip id 82 hci0: BCM43341B0 (002.001.014) build 0000 hci0: BCM (002.001.014) build 0158 The ECS vendor kernel predates the host-wakeup support in hci_bcm but it explicitly has a comment saying that the GPIO assignment needs to be reordered for BCM2E96: 1. (not used in vendor driver) 2. Device wakeup 3. Shutdown For both devices in question, the DSDT has these GPIOs listed in order of GpioInt, GpioIo, GpioIo. And if we use the first one listed (GpioInt) as the host wakeup, that interrupt handler fires while doing bluetooth I/O. I am assuming the convention of GPIO ordering has been changed for these new device IDs, so lets use the new ordering on such devices. Signed-off-by: Daniel Drake Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 68 +++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 24 deletions(-) commit 3af3a594e111474fab03d872f41760e10d4c17c4 Author: Wen-chien Jesse Sung Date: Tue Jan 10 11:46:28 2017 +0800 Bluetooth: btbcm: Add a delay for module reset Some btbcm devices require more time to complete its reset process. They won't reply any hci command until reset is done. [ 17.218554] Bluetooth: hci0 command 0x1001 tx timeout [ 25.214999] Bluetooth: hci0: BCM: Reading local version info failed (-110) Signed-off-by: Wen-chien Jesse Sung Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 3 +++ 1 file changed, 3 insertions(+) commit fdfddc601713d4ed564b0bd25b29415bd622020a Author: Wen-chien Jesse Sung Date: Tue Jan 10 15:41:13 2017 +0800 Bluetooth: btusb: Add support for 413c:8143 This is a Boardcom module and requires patchram to work. T: Bus=01 Lev=03 Prnt=03 Port=01 Cnt=02 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=413c ProdID=8143 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM20702A0 S: SerialNumber=20689D1FAF94 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) Signed-off-by: Wen-chien Jesse Sung Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5418820574d2b4d1da092a2f2d770e63d7ac520b Merge: 2b4c76b 53225f6 Author: Arnd Bergmann Date: Thu Feb 16 17:30:42 2017 +0100 Merge tag 'omap-for-v4.11/dt-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "Few more late dts changes for omaps for v4.11 merge window" from Tony Lindgren: - Add support for phyCORE-AM335x PCM-953 carrier board - Add power button and charger support for am335x-chiliboard * tag 'omap-for-v4.11/dt-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-chiliboard: Support charger ARM: dts: am335x-chiliboard: Support power button ARM: dts: Add support for phyCORE-AM335x PCM-953 carrier board commit ffb955dba61dd823c3d52a083b6c8d0dcfda0efe Author: Jeffy Chen Date: Mon Jan 23 12:18:53 2017 +0800 btmrvl: use dt's irqflags for wakeup pin Use irqflags parsed from dt. Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fd1a88da81d60a27960174bd9cda312c712961d1 Author: Jeffy Chen Date: Mon Jan 23 12:18:52 2017 +0800 btmrvl: set irq_bt to -1 when failed to parse it The irq_of_parse_and_map will return 0 as a invalid irq. Set irq_bt to -1 in this case, so that the btmrvl resume/suspend code would not try to enable/disable it. Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 1 + 1 file changed, 1 insertion(+) commit 9af02d86e11dc409e5c3de46e81c0a492ba58905 Author: Jeffy Chen Date: Mon Jan 23 12:18:51 2017 +0800 btmrvl: avoid double-disable_irq() race It's much the same as what we did for mwifiex in: b9da4d2 mwifiex: avoid double-disable_irq() race "We have a race where the wakeup IRQ might be in flight while we're calling mwifiex_disable_wake() from resume(). This can leave us disabling the IRQ twice. Let's disable the IRQ and enable it in case if we have double-disabled it." Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9dcbc313cd4ada386487b3055d9b6ec169d51765 Author: Ezequiel Garcia Date: Thu Dec 29 09:51:19 2016 -0300 Bluetooth: Fix NULL pointer dereference in bt_sock_recvmsg As per the comment in include/linux/net.h, the recvfrom handlers should expect msg_name to be NULL. However, bt_sock_recvmsg() is currently not checking it, which could lead to a NULL pointer dereference. The following NULL pointer dereference was produced while testing L2CAP datagram reception. Note that the kernel is tainted due to the r8723bs module being inserted. However, it seems the fix still applies. $ l2test -r -G l2test[326]: Receiving ... Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ee008000 [00000000] *pgd=7f896835 Internal error: Oops: 817 [#1] PREEMPT SMP ARM Modules linked in: r8723bs(O) CPU: 0 PID: 326 Comm: l2test Tainted: G O 4.8.0 #1 Hardware name: Allwinner sun7i (A20) Family task: ef1c6880 task.stack: eea70000 PC is at __memzero+0x58/0x80 LR is at l2cap_skb_msg_name+0x1c/0x4c pc : [] lr : [] psr: 00070013 sp : eea71e60 ip : 00000000 fp : 00034e1c r10: 00000000 r9 : 00000000 r8 : eea71ed4 r7 : 000002a0 r6 : eea71ed8 r5 : 00000000 r4 : ee4a5d80 r3 : 00000000 r2 : 00000000 r1 : 0000000e r0 : 00000000 Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 7600806a DAC: 00000051 Process l2test (pid: 326, stack limit = 0xeea70210) Stack: (0xeea71e60 to 0xeea72000) 1e60: ee4a5d80 eeac2800 000002a0 c04d7114 173eefa0 00000000 c06ca68e 00000000 1e80: 00000001 eeac2800 eef23500 00000000 000002a0 eea71ed4 eea70000 c0504d50 1ea0: 00000000 00000000 eef23500 00000000 00000000 c044e8a0 eea71edc eea9f904 1ec0: bef89aa0 fffffff7 00000000 00035008 000002a0 00000000 00000000 00000000 1ee0: 00000000 00000000 eea71ed4 00000000 00000000 00000000 00004000 00000000 1f00: 0000011b c01078c4 eea70000 c044e5e4 00000000 00000000 642f0001 6c2f7665 1f20: 0000676f 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f40: 00000000 00000000 00000000 00000000 00000000 ffffffff 00000001 bef89ad8 1f60: 000000a8 c01078c4 eea70000 00000000 00034e1c c01e6c74 00000000 00000000 1f80: 00034e1c 000341f8 00000000 00000123 c01078c4 c044e90c 00000000 00000000 1fa0: 000002a0 c0107700 00034e1c 000341f8 00000003 00035008 000002a0 00000000 1fc0: 00034e1c 000341f8 00000000 00000123 00000000 00000000 00011ffc 00034e1c 1fe0: 00000000 bef89aa4 0001211c b6eebb60 60070010 00000003 00000000 00000000 [] (__memzero) from [] (l2cap_skb_msg_name+0x1c/0x4c) [] (l2cap_skb_msg_name) from [] (bt_sock_recvmsg+0x128/0x160) [] (bt_sock_recvmsg) from [] (l2cap_sock_recvmsg+0x98/0x134) [] (l2cap_sock_recvmsg) from [] (SyS_recvfrom+0x94/0xec) [] (SyS_recvfrom) from [] (SyS_recv+0x14/0x1c) [] (SyS_recv) from [] (ret_fast_syscall+0x0/0x3c) Code: e3110010 18a0500c e49de004 e3110008 (18a0000c) ---[ end trace 224e35e79fe06b42 ]--- Signed-off-by: Ezequiel Garcia Signed-off-by: Marcel Holtmann net/bluetooth/af_bluetooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddf5cf02b981e32aa5896cfd66fc191b9a58ed2e Author: Brian Norris Date: Thu Feb 9 12:52:50 2017 -0800 ARM: multi_v7_defconfig: enable pstore configs It's useful to get testing on these features on various boards (e.g., on KernelCI), and (when they're working) the ramoops feature is extremely helpful for debugging live systems. Signed-off-by: Brian Norris Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit a4ccc9e33d2f01532bcceb621ea06bbf4db6efac Author: Rajat Jain Date: Wed Feb 1 14:24:10 2017 -0800 Bluetooth: btusb: Configure Marvell to use one of the pins for oob wakeup The Marvell devices may have many gpio pins, and hence for wakeup on these out-of-band pins, the chip needs to be told which pin is to be used for wakeup, using an hci command. Thus, we read the pin number etc from the device tree node and send a command to the chip. Signed-off-by: Rajat Jain Reviewed-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/btusb.txt | 3 + .../devicetree/bindings/net/marvell-bt-8xxx.txt | 86 ++++++++++++++++++++++ .../devicetree/bindings/net/marvell-bt-sd8xxx.txt | 56 -------------- drivers/bluetooth/btusb.c | 51 +++++++++++++ 4 files changed, 140 insertions(+), 56 deletions(-) commit fd913ef7ce619467c6b0644af48ba1fec499c623 Author: Rajat Jain Date: Wed Feb 1 14:24:09 2017 -0800 Bluetooth: btusb: Add out-of-band wakeup support Some onboard BT chips (e.g. Marvell 8997) contain a wakeup pin that can be connected to a gpio on the CPU side, and can be used to wakeup the host out-of-band. This can be useful in situations where the in-band wakeup is not possible or not preferable (e.g. the in-band wakeup may require the USB host controller to remain active, and hence consuming more system power during system sleep). The oob gpio interrupt to be used for wakeup on the CPU side, is read from the device tree node, (using standard interrupt descriptors). A devcie tree binding document is also added for the driver. The compatible string is in compliance with Documentation/devicetree/bindings/usb/usb-device.txt Signed-off-by: Rajat Jain Reviewed-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/btusb.txt | 40 ++++++++++++ drivers/bluetooth/btusb.c | 85 +++++++++++++++++++++++++ 2 files changed, 125 insertions(+) commit 10ab133b7a1a7265600d580d9e056d86aea70b53 Author: Rajat Jain Date: Wed Feb 1 14:24:08 2017 -0800 Bluetooth: btusb: Use an error label for error paths Use a label to remove the repetetive cleanup, for error cases. Signed-off-by: Rajat Jain Reviewed-by: Brian Norris Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 132509843461fa06d9b7b8ba17a1309736ceefac Author: Ard Biesheuvel Date: Wed Feb 15 18:30:12 2017 +0000 ARM: multi_v7_defconfig: enable some newly added crypto modules Enable the new accelerated CRC32(C), CRC-T10DIF and ChaCha20 drivers as modules for multi_v7_defconfig builds. Signed-off-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 8b71d5ed2fab3030d46bffdcebe4395215c86821 Merge: 4f3a468 4842903 Author: Arnd Bergmann Date: Thu Feb 16 17:19:26 2017 +0100 Merge tag 'davinci-for-v4.11/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Pull "Enable SATA support found on DA850 SoC" from Sekhar Nori: * tag 'davinci-for-v4.11/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable SATA modules commit 747d3f1a8a2fc4d8447c63205421a6a67f22799b Author: Javier Martinez Canillas Date: Mon Jan 2 10:09:56 2017 -0300 Bluetooth: btqcomsmd: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias $ After this patch: $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias alias: of:N*T*Cqcom,wcnss-btC* alias: of:N*T*Cqcom,wcnss-bt Signed-off-by: Javier Martinez Canillas Signed-off-by: Marcel Holtmann drivers/bluetooth/btqcomsmd.c | 1 + 1 file changed, 1 insertion(+) commit 2b4c76ba8427f6f444a1326afe56f38895e0b390 Merge: 3c38e32 91aba93 Author: Arnd Bergmann Date: Thu Feb 16 17:18:18 2017 +0100 Merge tag 'davinci-for-v4.11/dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "Enable SATA support on DA850 LCDK" from Sekhar Nori: * tag 'davinci-for-v4.11/dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: enable the SATA node ARM: dts: da850: add the SATA node devicetree: bindings: add bindings for ahci-da850 commit a57bac43468e005064d6560183b313b269403f0a Author: Christoph Haag Date: Fri Feb 10 14:02:45 2017 +0100 Bluetooth: btusb: add support for 0bb4:0306 It's a custom USB ID for the broadcom bt adapter in the HTC Vive. T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bb4 ProdID=0306 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM2045A0 S: SerialNumber=AC3743E110CE C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) dmesg: Bluetooth: hci0: BCM: chip id 102 Bluetooth: hci0: c-l Bluetooth: hci0: BCM (001.001.005) build 0000 Bluetooth: hci0: BCM (001.001.005) build 0481 Bluetooth: hci0: BCM20703A1 Generic USB 20Mhz fcbga_BU Signed-off-by: Christoph Haag Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit af1d09eefa72089300ddde13bbaf9af1a82c6be1 Merge: c6057e1 a303588 Author: Arnd Bergmann Date: Thu Feb 16 17:15:39 2017 +0100 Merge tag 'davinci-for-v4.11/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "SoC updates needed for SATA support on DA850" from Sekhar Nori: This includes a merge of non-critical-fixes branch already queued for v4.11 because SATA clock addition conflicts with the fix-up done earlier. * tag 'davinci-for-v4.11/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: remove BUG_ON() from da850_register_sata() ARM: davinci: da850: model the SATA refclk ARM: davinci: da850: add con_id for the SATA clock ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA ARM: davinci: add skeleton for pdata-quirks bus: da850-mstpri: fix my e-mail address ARM: davinci: da850: fix da850_set_pll0rate() ARM: davinci: da850: coding style fix commit db27dd05b1da6e658494a2570680f8d0ddbc578c Merge: d2aff02 cdf0ead Author: Arnd Bergmann Date: Thu Feb 16 17:14:07 2017 +0100 Merge tag 'davinci-for-v4.11/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers Merge "Driver updates for SATA support on DA850." from Sekhar Nori: These have been acked by SATA maintainer Tejun Heo. Tejun preferred these be queued through ARM-SoC because of the dependencies with platform code. * tag 'davinci-for-v4.11/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: sata: ahci-da850: un-hardcode the MPY bits sata: ahci-da850: add a workaround for controller instability sata: ahci: export ahci_do_hardreset() locally sata: ahci-da850: implement a workaround for the softreset quirk sata: ahci-da850: add device tree match table sata: ahci-da850: get the sata clock using a connection id commit 2f1736ff0664937636f8c0a4994c4a5a23da2090 Author: Marco Franchi Date: Thu Feb 16 10:23:43 2017 -0200 hwmon: (sht15) Add device tree support Allow the driver to work with device tree support. Based on initial patch submission from Peter Fox. Tested on a imx7d-sdb board connected to a SHT15 board via Mikro Bus. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/sht15.txt | 19 +++++++ drivers/hwmon/sht15.c | 64 +++++++++++++++++++++-- 2 files changed, 79 insertions(+), 4 deletions(-) commit 75bf2f6478cab9b0c1d7f5f674a765d1e2ad530e Author: Yazen Ghannam Date: Wed Feb 15 14:56:22 2017 -0600 EDAC, mce_amd: Print IPID and Syndrome on a separate line Currently, the IPID and Syndrome are printed on the same line as the Address. There are cases when we can have a valid Syndrome but not a valid Address. For example, the MCA_SYND register can be used to hold more detailed error info that the hardware folks can use. It's not just DRAM ECC syndromes. There are some error types that aren't related to memory that may have valid syndromes, like some errors related to links in the Data Fabric, etc. In these cases, the IPID and Syndrome are not printed at the same log level as the rest of the stanza, so users won't see them on the console. Console: [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2 Dmesg: [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b , Syndrome: 0x000000010b404000, IPID: 0x0001002e00000002 [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2 Print the IPID first and on a new line. The IPID should always be printed on SMCA systems. The Syndrome will then be printed with the IPID and at the same log level when valid: [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b [Hardware Error]: IPID: 0x0001002e00000002, Syndrome: 0x000000010b404000 [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2 Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1487192182-2474-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5d4bac9a5f4ef24b2482529bda6661a58e5b5b65 Author: Jeremy Kerr Date: Thu Feb 16 12:24:09 2017 +0800 genirq: Clarify logic calculating bogus irqreturn_t values Although irqreturn_t is an enum, we treat it (and its enumeration constants) as a bitmask. However, bad_action_ret() uses a less-than operator to determine whether an irqreturn_t falls within allowable bit values, which means we need to know the signededness of an enum type to read the logic, which is implementation-dependent. This change explicitly uses an unsigned type for the comparison. We do this instead of changing to a bitwise test, as the latter compiles to increased instructions in this hot path. It looks like we get the correct behaviour currently (bad_action_ret(-1) returns 1), so this is purely a readability fix. Signed-off-by: Jeremy Kerr Link: http://lkml.kernel.org/r/1487219049-4061-1-git-send-email-jk@ozlabs.org Signed-off-by: Thomas Gleixner kernel/irq/spurious.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2f44e29cef006a4b0a4ecf7d4c5aac7d0fbb505c Author: Arnd Bergmann Date: Tue Feb 14 22:53:12 2017 +0100 genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg A bug fix to the MSIx handling in vfio added references to functions that may not be defined if MSI is disabled in the kernel, resulting in this link error: drivers/built-in.o: In function `vfio_msi_set_vector_signal': :(.text+0x450808): undefined reference to `get_cached_msi_msg' :(.text+0x45080c): undefined reference to `write_msi_msg' As suggested by Alex Williamson, add stub implementations for get_cached_msi_msg() and pci_write_msi_msg(). In case this bugfix gets backported, please note that the #ifdef has changed over time, originally both functions were implemented in drivers/pci/msi.c and controlled by CONFIG_PCI_MSI, while nowadays get_cached_msi_msg() is part of the generic MSI support and can be used without PCI. Fixes: b8f02af096b1 ("vfio/pci: Restore MSIx message prior to enabling") Signed-off-by: Arnd Bergmann Cc: Marc Zyngier Cc: Alex Williamson Cc: Bjorn Helgaas Cc: Bart Van Assche Link: http://lkml.kernel.org/r/1413190208.4202.34.camel@ul30vt.home Link: http://lkml.kernel.org/r/20170214215343.3307861-1-arnd@arndb.de Signed-off-by: Thomas Gleixner include/linux/msi.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3bba73b1b7a88d88c3ea16b7914c13d475e4a87b Author: Thomas Gleixner Date: Thu Feb 16 15:12:04 2017 +0100 x86/cpufeature: Move RING3MWAIT feature to avoid conflicts The original feature bit is used in a different branch already. Move it to scattered bits. Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e42a46b6f52473661ad192f76a128a68fe301df4 Author: Leonard Crestez Date: Tue Feb 14 17:31:03 2017 +0200 regulator: Fix regulator_summary for deviceless consumers It is allowed to call regulator_get with a NULL dev argument (_regulator_get explicitly checks for it) but this causes an error later when printing /sys/kernel/debug/regulator_summary. Fix this by explicitly handling "deviceless" consumers in the debugfs code. Signed-off-by: Leonard Crestez Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/regulator/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1b30ab0c40a99da347c1ab83c30b485e03fe9f64 Author: Jyri Sarha Date: Wed Feb 8 16:08:06 2017 +0200 drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats Let's disable all scaling that requires horizontal decimation with higher factor than 4, until we have better estimates of what we can and can not do. However, NV12 color format appears to work Ok with all decimation factors. When decimating horizontally by more that 4 the dss is not able to fetch the data in burst mode. When this happens it is hard to tell if there enough bandwidth. Despite what theory says this appears to be true also for 16-bit color formats. Signed-off-by: Jyri Sarha Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9 Author: Jyri Sarha Date: Fri Jan 27 12:04:55 2017 +0200 drm/omapdrm: Move commit_modeset_enables() before commit_planes() Move drm_atomic_helper_commit_modeset_enables() call to before drm_atomic_helper_commit_planes() call and have a omap_atomic_wait_for_completion() call after both. With the current dss dispc implementation we have to enable the new modeset before we can commit planes. The dispc ovl configuration relies on the video mode configuration been written into the HW when the ovl configuration is calculated. This approach is not ideal because after a mode change the plane update is executed only after the first vblank interrupt. The dispc implementation should be fixed so that it is able use uncommitted drm state information. information. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit e025d3860bd9f718d4d8ce251e6a823dd8293b51 Author: Jyri Sarha Date: Fri Jan 27 12:04:54 2017 +0200 Revert "drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs" This reverts commit dadf4659d0608e034b6633f30300c2eff2dafb4c. If planes are not disabled when the they are not on any crtc anymore they will remain active and may show as "ghosts" when the crtc they were last on is active again. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 8 +------- drivers/gpu/drm/omapdrm/omap_drv.c | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) commit ffed21bcee7a544f99a9c9b18c23b361a0b1e476 Author: Alexander Duyck Date: Tue Jan 17 08:37:29 2017 -0800 ixgbe: Don't bother clearing buffer memory for descriptor rings This patch makes it so that we don't need to bother with clearing the memory out for the descriptor rings. The general idea is to only free buffers associated with buffers in use which are located between the next_to_clean and next_to_use or next_to_alloc values. Everything outside of those regions can be safely ignored since they should have no buffers associated with them. The advantage to doing things this way is that is should speed up bring-up and tear-down of the rings. Specifically we can avoid the 512 or more cycles required to memset the rings in tear-down. In the bring-up phase we then clear the memory as a part of initialization. The general idea is that the clearing in initialization can act as a prefetch of sorts for the buffer info structures so they are in the local CPU when we go to populate them. This should help to improve overall time needed to perform a suspend/resume. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 11 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 159 +++++++++++++---------- 2 files changed, 99 insertions(+), 71 deletions(-) commit 6f429223b31c550b835b4f066ac034d0cf0cc71e Author: Alexander Duyck Date: Tue Jan 17 08:37:13 2017 -0800 ixgbe: Add support for build_skb This patch adds build_skb support to the Rx path. There are several advantages to this change. 1. It avoids the memcpy and skb->head allocation for small packets which improves performance by about 5% in my tests. 2. It avoids the memcpy, skb->head allocation, and eth_get_headlen for larger packets improving performance by about 10% in my tests. 3. For VXLAN packets it allows the full header to be in skb->data which improves the performance by as much as 30% in some of my tests. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 49 ++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit 2ccdf26ff614dd49b14e76c0c076f5f4e9562e79 Author: Alexander Duyck Date: Tue Jan 17 08:37:03 2017 -0800 ixgbe: Add private flag to control buffer mode Since there are potential drawbacks to the new Rx allocation approach I thought it best to add a "chicken bit" so that we can turn the feature off if in the event that a problem is found. It also provides a means of validating the legacy Rx path in the event that we are forced to fall back. At some point in the future when we are convinced we don't need it anymore we might be able to drop the legacy-rx flag. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 2de6aa3a666e63699978f81d0d5523e7e0778f7b Author: Alexander Duyck Date: Tue Jan 17 08:36:54 2017 -0800 ixgbe: Add support for padding packet This patch adds support for providing a buffer with headroom and tailroom to allow for shared info, NET_SKB_PAD, and NET_IP_ALIGN. With this combined with the DMA changes we can start using build_skb to build frames around an incoming Rx buffer instead of having to memcpy the headers. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 17 +++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 43 ++++++++++++++++++++++++--- 2 files changed, 56 insertions(+), 4 deletions(-) commit 3fd218767fa49857e812e53a27fcbf5d24d040d6 Author: Alexander Duyck Date: Tue Jan 17 08:36:45 2017 -0800 ixgbe: Break out Rx buffer page management We are going to be expanding the number of Rx paths in the driver. Instead of duplicating all that code I am pulling it apart into separate functions so that we don't have so much code duplication. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 231 ++++++++++++++------------ 1 file changed, 122 insertions(+), 109 deletions(-) commit c3630cc40b4f0fe004e21f19bfb5cd2231c105f8 Author: Alexander Duyck Date: Tue Jan 17 08:36:28 2017 -0800 ixgbe: Use length to determine if descriptor is done This change makes it so that we use the length of the packet instead of the DD status bit to determine if a new descriptor is ready to be processed. The obvious advantage is that it cuts down on reads as we don't really even need the DD bit if going from a 0 to a non-zero value on size is enough to inform us that the packet has been completed. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) commit 4f4542bfb3b539bef118578ffafcc98e4ce91979 Author: Alexander Duyck Date: Tue Jan 17 08:36:14 2017 -0800 ixgbe: Make use of order 1 pages and 3K buffers independent of FCoE In order to support build_skb with jumbo frames it will be necessary to use 3K buffers for the Rx path with 8K pages backing them. This is needed on architectures that implement 4K pages because we can't support 2K buffers plus padding in a 4K page. In the case of systems that support page sizes larger than 4K the 3K attribute will only be applied to FCoE as we can fall back to using just 2K buffers and adding the padding. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 20 +++++++++----------- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 19 +++++++++++++------ 2 files changed, 22 insertions(+), 17 deletions(-) commit 1b56cf49f5b0bab9ad4eab18f9b0aee1929afd89 Author: Alexander Duyck Date: Tue Jan 17 08:36:03 2017 -0800 ixgbe: Update code to better handle incrementing page count Batch the page count updates instead of doing them one at a time. By doing this we can improve the overall performance as the atomic increment operations can be expensive due to the fact that on x86 they are locked operations which can cause stalls. By doing bulk updates we can consolidate the stall which should help to improve the overall receive performance. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Acked-by: John Fastabend Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 7 ++++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 39 +++++++++++++++++---------- 2 files changed, 31 insertions(+), 15 deletions(-) commit f3213d9321735aa8e252d87796d5db43d4b830ec Author: Alexander Duyck Date: Tue Jan 17 08:35:54 2017 -0800 ixgbe: Update driver to make use of DMA attributes in Rx path This patch adds support for DMA_ATTR_SKIP_CPU_SYNC and DMA_ATTR_WEAK_ORDERING. By enabling both of these for the Rx path we are able to see performance improvements on architectures that implement either one due to the fact that page mapping and unmapping only has to sync what is actually being used instead of the entire buffer. In addition by enabling the weak ordering attribute enables a performance improvement for architectures that can associate a memory ordering with a DMA buffer such as Sparc. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 3 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 56 ++++++++++++++++++--------- 2 files changed, 40 insertions(+), 19 deletions(-) commit f215af8cae4c283d8a522ea166d94f763dc4aebf Author: Alexander Duyck Date: Tue Jan 17 08:35:44 2017 -0800 ixgbe: Only DMA sync frame length On some platforms, syncing a buffer for DMA is expensive. Rather than sync the whole 2K receive buffer, only synchronise the length of the frame, which will typically be the MTU, or a much smaller TCP ACK. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit af43da0dba0b1bc7af259cd7d6d76054f3acfab0 Author: Alexander Duyck Date: Tue Jan 17 08:35:34 2017 -0800 ixgbe: Add function for checking to see if we can reuse page This patch consolidates the code for the ixgbe driver so that it is more inline with what is already in igb. The general idea is to just consolidate functions that represent logical steps in the Rx process so we can later update them more easily. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 71 ++++++++++++++++----------- 1 file changed, 42 insertions(+), 29 deletions(-) commit 1733284d02e21ec256f10794109d8c39c3c1b0f8 Author: Mark Rustad Date: Mon Dec 12 15:08:13 2016 -0800 ixgbe: Update version to reflect added functionality Update the driver version to reflect the new devices that it supports. Signed-off-by: Mark Rustad 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 3f40c74ccef0a0bc8cdc52105e1ac712e8e32868 Author: Stephen Hemminger Date: Mon Nov 21 09:52:40 2016 -0800 ixgbe: prefix Data Center Bridge ops struct Since dcbnl_ops is global, it should be prefixed by ixgbe_ Signed-off-by: Stephen Hemminger Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1dc0eb75a8f88e37c2aee75fca0313cd6e30a1e1 Author: Tony Nguyen Date: Thu Nov 10 16:01:33 2016 -0800 ixgbe: Support 2.5Gb and 5Gb speed Though not advertised through ethtool, if the link partner advertises a 2.5Gb or 5Gb connection, and the adapter supports it, allow the speed to be used. Signed-off-by: Tony Nguyen Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit d48085f0716f195ee7432de2dd110e2093c40fd5 Author: travis@sgi.com Date: Tue Feb 14 18:11:29 2017 -0600 x86/platform/UV/NMI: Fix uneccessary kABI breakage The addition of support for UV Hubless systems unneccessarily broke the kABI for a symbol that is not used by external kernel modules. Remove the symbol from the EXPORT list. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Link: http://lkml.kernel.org/r/20170215001129.068078379@asylum.americas.sgi.com Signed-off-by: Thomas Gleixner arch/x86/platform/uv/uv_nmi.c | 1 - 1 file changed, 1 deletion(-) commit 998d75730b40afc218c059d811869abe9676b305 Author: Hans de Goede Date: Tue Feb 14 18:12:38 2017 +0200 drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT If there is no OPREGION_ASLE_EXT then a VBT stored in mailbox #4 may use the ASLE_EXT parts of the opregion. Adjust the vbt_size calculation for a vbt in mailbox #4 for this. This fixes the driver not finding the VBT on a jumper ezpad mini3 cherrytrail tablet and on a ACER SW5_017 machine. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487088758-30050-1-git-send-email-jani.nikula@intel.com (cherry picked from commit dfb65e71ea2c1d97ac373cc0587dc60b3307581a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_opregion.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 636deb5b2277cf57bb0f5e00fc9687de9a96061e Author: Chris Wilson Date: Sun Feb 12 21:53:43 2017 +0000 drm/i915: Pass timeout==0 on to i915_gem_object_wait_fence() The i915_gem_object_wait_fence() uses an incoming timeout=0 to query whether the current fence is busy or idle, without waiting. This can be used by the wait-ioctl to implement a busy query. Fixes: e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers") Testcase: igt/gem_wait/basic-busy-write-all Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170212215344.16600-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit d892e9398ecf6defc7972a62227b77dad6be20bd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddd09373628adcbdc3f7b9098d22328834f8d772 Author: Chris Wilson Date: Wed Nov 9 10:39:05 2016 +0000 drm/i915/gvt: Disable access to stolen memory as a guest Explicitly disable stolen memory when running as a guest in a virtual machine, since the memory is not mediated between clients and reserved entirely for the host. The actual size should be reported as zero, but like every other quirk we want to tell the user what is happening. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99028 Signed-off-by: Chris Wilson Cc: Zhenyu Wang Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161109103905.17860-1-chris@chris-wilson.co.uk Reviewed-by: Zhenyu Wang Cc: stable@vger.kernel.org (cherry picked from commit 04a68a35ce6d7b54749989f943993020f48fed62) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_stolen.c | 5 +++++ 1 file changed, 5 insertions(+) commit aa9323dd49b23932a09023012f050556de64f118 Author: Ville Syrjälä Date: Wed Feb 8 19:52:54 2017 +0200 drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code Until recently vlv_steal_power_sequencer() wasn't being called for normal DP ports, and hence it could assert that it should only be called for pipe A and B (since pipe C doesn't support eDP). However that changed when we started to consider normal DP ports as well when choosing a PPS. So we will now get spurious warnings when vlv_steal_power_sequencer() does get called for pipe C. Avoid this by moving the WARN down into vlv_detach_power_sequencer() where this assertion should still hold. Cc: Imre Deak Cc: stable@vger.kernel.org Fixes: 9f2bdb006a7e ("drm/i915: Prevent PPS stealing from a normal DP port on VLV/CHV") References: https://bugs.freedesktop.org/show_bug.cgi?id=95287 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170208175254.10958-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit d158694f452252d0fef335a775aeb3eb74fe7af0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 44a027058b24541cc7ec499e6fb91db4b130648a Author: Chris Wilson Date: Wed Feb 8 18:12:38 2017 +0000 drm/i915: Check for timeout completion when waiting for the rq to submitted We first wait for a request to be submitted to hw and assigned a seqno, before we can wait for the hw to signal completion (otherwise we don't know the hw id we need to wait upon). Whilst waiting for the request to be submitted, we may exceed the user's timeout and need to propagate the error back. v2: Make ETIME into an error from wait_for_execute for consistent exit handling. Reported-by: Tvrtko Ursulin Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion") Testcase: igt/gem_wait/basic-await Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170208181238.7232-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 969bb72cbfd906d347cf76dc9b8c8dbaf83ba27a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3e52d71ede206df75b56208e7c7a277ef157bb71 Author: Zhi Wang Date: Wed Feb 8 21:03:33 2017 +0800 drm/i915: A hotfix for making aliasing PPGTT work for GVT-g This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT mode. It's just a temporary solution for making GVT-g work. Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables") Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michel Thierry Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniel Vetter Cc: Zhenyu Wang Cc: Zhiyuan Lv Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-send-email-zhi.a.wang@intel.com Reviewed-by: Chris Wilson Cc: # v4.10 Signed-off-by: Chris Wilson (cherry picked from commit e81ecb5e31db6c2a259d694738cf620d9fa70861) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ec62ed3e1d93843b382c222bc0d81546f12c97b8 Author: Chris Wilson Date: Tue Feb 7 15:24:37 2017 +0000 drm/i915: Restore context and pd for ringbuffer submission after reset Following a reset, the context and page directory registers are lost. However, the queue of requests that we resubmit after the reset may depend upon them - the registers are restored from a context image, but that restore may be inhibited and may simply be absent from the request if it was in the middle of a sequence using the same context. If we prime the CCID/PD registers with the first request in the queue (even for the hung request), we prevent invalid memory access for the following requests (and continually hung engines). v2: Magic BIT(8), reserved for future use but still appears unused. v3: Some commentary on handling innocent vs guilty requests v4: Add a wait for PD_BASE fetch. The reload appears to be instant on my Ivybridge, but this bit probably exists for a reason. Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170207152437.4252-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit c0dcb203fb009678e5be9e7782329dcfbbf16439) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 18 ++++------ drivers/gpu/drm/i915/i915_reg.h | 6 ++-- drivers/gpu/drm/i915/intel_lrc.c | 16 ++++++++- drivers/gpu/drm/i915/intel_ringbuffer.c | 58 +++++++++++++++++++++++++++++++-- 4 files changed, 81 insertions(+), 17 deletions(-) commit 26d12c619476ccbc6725aa4a17dcb1d41d5774e7 Author: Zhi Wang Date: Mon Feb 6 18:37:16 2017 +0800 drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode. execlist_update_context() will try to update PDPs in a context before a ELSP submission only for full PPGTT mode, while PDPs was populated during context initialization. Now the latter code path is removed. Let execlist_update_context() also cover !FULL_PPGTT mode. Fixes: 34869776c76b ("drm/i915: check ppgtt validity when init reg state") Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michel Thierry Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhenyu Wang Cc: Zhiyuan Lv Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/1486377436-15380-1-git-send-email-zhi.a.wang@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 04da811b3d821567e7a9a8a0baf48a6c1718b582) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4b84b4a5507913ee0da27b1f1b27671937839de6 Author: Imre Deak Date: Fri Jan 27 11:39:19 2017 +0200 drm/i915/lspcon: Fix resume time initialization due to unasserted HPD During system resume time initialization the HPD level on LSPCON ports can stay low for an extended amount of time, leading to failed AUX transfers and LSPCON initialization. Fix this by waiting for HPD to get asserted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99178 Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Cc: # v4.9+ Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-3-git-send-email-imre.deak@intel.com (cherry picked from commit 390b4e00241ce14ca3967c4698c8f6a158c5a674) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_lspcon.c | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 2a57d9cce1c08578097d965468e37f06d71fa495 Author: Imre Deak Date: Fri Jan 27 11:39:18 2017 +0200 drm/i915/gen9+: Enable hotplug detection early For LSPCON resume time initialization we need to sample the corresponding pin's HPD level, but this is only available when HPD detection is enabled. Currently we enable detection only when enabling HPD interrupts which is too late, so bring the enabling of detection earlier. This is needed by the next patch. Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Cc: # v4.9+ Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-2-git-send-email-imre.deak@intel.com (cherry picked from commit 7fff8126d9cc902b2636d05d5d34894a75174993) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 69 +++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 19 deletions(-) commit 1769ae83c8cb32166d1e208f7cefbf334085bd58 Author: Chris Wilson Date: Fri Feb 3 10:56:52 2017 +0000 drm/i915: Reject set-tiling-ioctl with stride==0 and a tiling mode In commit 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()"), I swapped an alignment check for IS_ALIGNED and in the process removed the less-than check. That check turns out to be important as it was the only rejection for stride == 0. Tvrtko did spot it, but I was overconfident in the IS_ALIGNED() conversion. Fixes: 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()") Testcase: igt/gem_tiling_max_stride Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170203105652.27819-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 52da22e7aba155be238faff4f6e97b2eb9de64f3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d2cfc12b1270c8451edc7d2dd5f79097b3a17d8 Author: Chris Wilson Date: Thu Feb 2 13:27:21 2017 +0000 drm/i915: Recreate internal objects with single page segments if dmar fails If we fail to dma-map the object, the most common cause is lack of space inside the SW-IOTLB due to fragmentation. If we recreate the_sg_table using segments of PAGE_SIZE (and single page allocations), we may succeed in remapping the scatterlist. First became a significant problem for the mock selftests after commit 5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen") increased the max_order. Fixes: 920cf4194954 ("drm/i915: Introduce an internal allocator for disposable private objects") Fixes: 5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170202132721.12711-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin Cc: # v4.10 (cherry picked from commit bb96dcf5830e5d81a1da2e2a14e6c0f7dfc64348) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_internal.c | 37 ++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) commit 33b7bfdf918af4dc6585afe6d21f5e6b7613de1b Merge: 39a75ac 4a0b344 Author: Jani Nikula Date: Thu Feb 16 11:58:16 2017 +0200 Merge tag 'gvt-next-2017-02-15' of https://github.com/01org/gvt-linux into drm-intel-next-fixes gvt-next-2017-02-15 - Chuanxiao's IOMMU workaround fix - debug message cleanup from Changbin - oops fix in fail path of workload submission when GPU reset from Changbin - other misc fixes Signed-off-by: Jani Nikula commit 39a75ac4a55df8ee0a2f6059400c7153c8fd7d95 Merge: 13f62f5 2d6ceb8 Author: Jani Nikula Date: Thu Feb 16 11:56:51 2017 +0200 Merge tag 'gvt-next-2017-02-07' of https://github.com/01org/gvt-linux into drm-intel-next-fixes From Zhenyu, "These are GVT-g changes for 4.11 merge window, mostly for gvt init order fix that impacted resource handling for device model, the one i915 change has been reviewed and acked." Signed-off-by: Jani Nikula commit b1ef30e5ed17a417fc78eaff12da28f9a1c2efcc Author: Takashi Iwai Date: Wed Feb 15 22:11:13 2017 +0100 ALSA: x86: Don't bail out from PCM ops when disconnected Currently the driver returns -ENODEV when the monitor is disconnected. But PA alsa module doesn't like this and it starts playing Juliet, kills itself as if it were a fatal tragedy. Since we protect the whole read/write at disconnection, just allow the PCM accesses even during disconnection. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 2d42c033aec9f8e7e175c551ae62ea3f4dc200b9 Author: Takashi Iwai Date: Wed Feb 15 22:08:21 2017 +0100 ALSA: x86: Minor code rearrangement Put the stuff in the right order; notification should be at the end of the action. Also dropped a superfluous debug print and incorrect comments. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit be9a2e933e301bec856d526516801e14247519c5 Author: Takashi Iwai Date: Wed Feb 15 22:05:34 2017 +0100 ALSA: x86: Stop the stream when buffer is processed after disconnection This shouldn't happen, but just to be sure... Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 28ed125b9a07b9ad09ea680628a920427d079af6 Author: Takashi Iwai Date: Wed Feb 15 22:02:10 2017 +0100 ALSA: x86: Avoid register accesses during disconnection It seems that accessing registers during disconnection often leads to the GPU pipe error. The original driver had a similar check in the past, but it was lost through refactoring. Now put a connection check in the register access functions. One exception is the irq handler: it still needs to access the raw register even while disconnected, because it has to read and write to ACK the irq mask. Although the irq shouldn't be raised while disconnected (the stream should have been disabled), let's make it safer for now. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit a72ccfbad7fd6f604d8edd068119edb57e7984e1 Author: Takashi Iwai Date: Wed Feb 15 21:45:06 2017 +0100 ALSA: x86: Don't return an error from chmap ctl at disconnected It's not wise to return an error at info/get callback when disconnected, which happens at any time. The chmap ctl is supposed to fill zero for such a case, instead. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 18353192b8f696a27420e2e8f39804c2075f26fb Author: Takashi Iwai Date: Wed Feb 15 21:42:20 2017 +0100 ALSA: x86: Fix memory leak in had_build_channel_allocation_map() The previously allocated chmap has to be released before setting the new one. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5def90196b52d0bbec4f662448e25f2a4c06ddbc Author: Takashi Iwai Date: Wed Feb 15 21:36:38 2017 +0100 ALSA: x86: Use snd_pcm_stop_xrun() for connection / disconnection paths This seems more friendly to user-space, as it's notified at least as an error, instead of forcibly moving the PCM state to SETUP out of sudden. Moreover, snd_pcm_stop() needs an extra PCM spinlock I forgot, while snd_pcm_stop_xrun() takes the spinlock by itself. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9bacf275ca2eeb8e8fa85c1705d07e2475f1aaa Author: Takashi Iwai Date: Tue Feb 14 12:29:38 2017 +0100 ALSA: x86: Implement jack control This patch implements a jack interface for notifying HDMI/DP connection. PA listens to this, so it can handle the monitor connection more gracefully. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 23 +++++++++++++++++++++++ sound/x86/intel_hdmi_audio.h | 1 + 2 files changed, 24 insertions(+) commit 9f1bc2c4c58fcb2d86e0e26437dc8f3a18ac3276 Author: Kai-Heng Feng Date: Thu Feb 16 15:26:54 2017 +0800 ALSA: hda/realtek - Cannot adjust speaker's volume on a Dell AIO The issue is the same as "dd9aa335c880 ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO", the output requires to connect to a node with Amp-out capability. Applying the same fixup "ALC298_FIXUP_SPK_VOLUME" can fix the issue. Signed-off-by: Kai-Heng Feng Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e3dc847a5f85b43ee2bfc8eae407a7e383483228 Author: Steffen Klassert Date: Wed Feb 15 11:38:58 2017 +0100 vti6: Don't report path MTU below IPV6_MIN_MTU. In vti6_xmit(), the check for IPV6_MIN_MTU before we send a ICMPV6_PKT_TOOBIG message is missing. So we might report a PMTU below 1280. Fix this by adding the required check. Fixes: ccd740cbc6e ("vti6: Add pmtu handling to vti6_xmit.") Signed-off-by: Steffen Klassert net/ipv6/ip6_vti.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5b73d6347eb82cd2a26698fc339607e25e0ad917 Author: David Gibson Date: Wed Feb 15 14:40:04 2017 +1100 KVM: PPC: Book3S HV: Prevent double-free on HPT resize commit path resize_hpt_release(), called once the HPT resize of a KVM guest is completed (successfully or unsuccessfully) frees the state structure for the resize. It is currently not safe to call with a NULL pointer. However, one of the error paths in kvm_vm_ioctl_resize_hpt_commit() can invoke it with a NULL pointer. This will occur if userspace improperly invokes KVM_PPC_RESIZE_HPT_COMMIT without previously calling KVM_PPC_RESIZE_HPT_PREPARE, or if it calls COMMIT twice without an intervening PREPARE. To fix this potential crash bug - and maybe others like it, make it safe (and a no-op) to call resize_hpt_release() with a NULL resize pointer. Found by Dan Carpenter with a static checker. Reported-by: Dan Carpenter Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 3 +++ 1 file changed, 3 insertions(+) commit b802c8410ca915e7772e738e68420115f1a3c811 Author: Dan Williams Date: Wed Feb 15 18:42:09 2017 -0800 async_tx: deprecate broken support for channel switching Back in 2011, Russell pointed out that the "async_tx channel switch" capability was violating expectations of the dma mapping api [1]. At the time the existing uses were reviewed as still usable, but that longer term we needed a rework of the raid offload implementation. While some of the framework for a fixed implementation was introduced in 2012 [2], the wider rewrite never materialized. There continues to be interest in raid offload with new dma/raid engine drivers being submitted. Those drivers must not build on top of the broken channel switching capability. Prevent async_tx from using an offload engine if the channel switching capability is enabled. This still allows the engine to be used for other purposes, but the broken way async_tx uses these engines for raid will be disabled. For configurations where this causes a performance regression the only solution is to start the work of eliminating the async_tx api and moving channel management into the raid code directly where it can manage marshalling an operation stream between multiple dma channels. [1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-January/036753.html [2]: https://lkml.org/lkml/2012/12/6/71 Cc: Anatolij Gustschin Cc: Anup Patel Cc: Rameshwar Prasad Sahu Cc: Saeed Bishara Cc: Thomas Petazzoni Reported-by: Russell King Signed-off-by: Dan Williams Signed-off-by: Vinod Koul include/linux/async_tx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be3c9f5eed3be89d17b5dcffc38412932214fbae Merge: b7bc0da 1aa5ca6 Author: Dave Airlie Date: Thu Feb 16 13:57:37 2017 +1000 Merge branch 'drm-rockchip-next-2017-02-16' of https://github.com/markyzq/kernel-drm-rockchip into drm-next Use iommu for rockchip arm64 platform. * 'drm-rockchip-next-2017-02-16' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: Use common IOMMU API to attach devices drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain commit b7bc0daa889e65db202f3222f5b69b5c80d4070f Merge: 1e9d996 1592364 Author: Dave Airlie Date: Thu Feb 16 13:27:55 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-02-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next Fixes for the v4.11 merge window. * tag 'drm-misc-next-fixes-2017-02-15' of git://anongit.freedesktop.org/git/drm-misc: drm: Resurrect atomic rmfb code, v3 uapi: add missing install of dma-buf.h commit 1e9d996645401f1a5bd6473e229a4d41575fc478 Merge: 13f62f5 c462c2f Author: Dave Airlie Date: Thu Feb 16 13:27:24 2017 +1000 Merge tag 'sti-drm-next-2017-02-10' of https://github.com/vinceab/linux into drm-next - remove deprecated stih416 chip functionnalities - fix issues met around gdp panes - fix STI driver unbind procedure - DVI/HDMI mode is automatically detected - allow fps statisitics resetting * tag 'sti-drm-next-2017-02-10' of https://github.com/vinceab/linux: drm/sti: debug fps reset drm/sti: hdmi: automatically check DVI/HDMI mode drm/sti: unbind all components while driver cleanup drm/sti: do not post GDP command if no update drm/sti: do not set gdp pixel clock rate if mode is not set drm/sti: enable gdp pixel clock in atomic_update drm/sti: remove deprecated legacy vtg slave drm/sti: remove deprecated sink_term config drm/sti: do not check hw scaling if mode is not set drm/sti: Fix up crtc_state->event handling drm/sti: use atomic_helper for commit commit d1da522fb8a70b8c527d4ad15f9e62218cc00f2c Author: Arnd Bergmann Date: Tue Feb 14 22:21:51 2017 +0100 scsi: megaraid_sas: handle dma_addr_t right on 32-bit When building with a dma_addr_t that is different from pointer size, we get this warning: drivers/scsi/megaraid/megaraid_sas_fusion.c: In function 'megasas_make_prp_nvme': drivers/scsi/megaraid/megaraid_sas_fusion.c:1654:17: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] It's better to not pretend that the dma address is a pointer and instead use a dma_addr_t consistently. Fixes: 33203bc4d61b ("scsi: megaraid_sas: NVME fast path io support") Signed-off-by: Arnd Bergmann Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 40a4c2c392593b57a2e6f6438794492596279838 Author: Dan Carpenter Date: Tue Feb 14 19:38:55 2017 +0300 scsi: megaraid_sas: array overflow in megasas_dump_frame() The "sz" variable is in terms of bytes, but we're treating the buffer as an array of __le32 so we have to divide by 4. Fixes: def0eab3af86 ("scsi: megaraid_sas: enhance debug logs in OCR context") Signed-off-by: Dan Carpenter Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e305cb2bd8b6300ea29420f2458a2f245bdacbd Author: Christoph Hellwig Date: Wed Feb 1 15:21:21 2017 +0100 scsi: snic: switch to pci_irq_alloc_vectors Signed-off-by: Christoph Hellwig Acked-by: Narsimhulu Musini Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic.h | 1 - drivers/scsi/snic/snic_isr.c | 48 ++++++++++++++++++-------------------------- 2 files changed, 19 insertions(+), 30 deletions(-) commit 6ff8ec98e12f984b9d62e43f83b0a3c44e2bdc12 Author: Guenter Roeck Date: Sat Feb 11 15:04:56 2017 -0800 clk: qcom: Do not drop device node twice of_find_node_by_name() drops the reference to a passed device node. It is not necessary to drop it again, and doing so may result in the device node being released prematurely. Cc: Rob Herring Signed-off-by: Guenter Roeck Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly") Signed-off-by: Stephen Boyd drivers/clk/qcom/common.c | 1 - 1 file changed, 1 deletion(-) commit f84775c2d5d92581f2df60d53b574b0405c85be3 Author: Michael Ellerman Date: Thu Feb 16 11:27:00 2017 +1100 powerpc/pseries: Fix build break when MEMORY_HOTREMOVE=n We broke the build when CONFIG_MEMORY_HOTREMOVE=n: arch/powerpc/platforms/pseries/hotplug-memory.c:821:8: error: implicit declaration of function 'dlpar_memory_readd_by_index' Add a dummy to fix it. Fixes: e70d59700fc3 ("powerpc/pseries: Introduce memory hotplug READD operation") Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a578884fa0d2768f13d37c6591a9e1ed600482d3 Author: Arnd Bergmann Date: Tue Feb 14 22:19:18 2017 +0100 cpufreq: CPPC: add ACPI_PROCESSOR dependency Without the Kconfig dependency, we can get this warning: warning: ACPI_CPPC_CPUFREQ selects ACPI_CPPC_LIB which has unmet direct dependencies (ACPI && ACPI_PROCESSOR) Fixes: 5477fb3bd1e8 (ACPI / CPPC: Add a CPUFreq driver for use with CPPC) Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 149ab8649667eb50863495d841a7ba1110fc17d3 Author: Paul Gortmaker Date: Mon Feb 13 19:45:02 2017 -0500 cpufreq: make ti-cpufreq explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/cpufreq/Kconfig.arm:config ARM_TI_CPUFREQ drivers/cpufreq/Kconfig.arm: bool "Texas Instruments CPUFreq support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f451014692ae34e587b00de6745e16661cf734d8 Author: Rafael J. Wysocki Date: Mon Feb 13 13:44:57 2017 +0100 cpufreq: Do not clear real_cpus mask on policy init If new_policy is set in cpufreq_online(), the policy object has just been created and its real_cpus mask has been zeroed on allocation, and the driver's ->init() callback should not touch it. It doesn't need to be cleared again, so don't do that. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 2 -- 1 file changed, 2 deletions(-) commit 48385dd7400ee68fdc8af92a730c0d037df5a29e Author: Doug Smythies Date: Mon Feb 13 15:19:07 2017 -0800 tools/power/x86: Debug utility for intel_pstate driver This utility can be used to debug and tune the performance of the intel_pstate driver. This utility can be used in two ways: - If there is Linux trace file with pstate_sample events enabled, then this utility can parse the trace file and generate performance plots. - If user has not specified a trace file as input via command line parameters, then this utility enables and collects trace data for a user-specified interval and generates performance plots. Signed-off-by: Doug Smythies Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki .../x86/intel_pstate_tracer/intel_pstate_tracer.py | 569 +++++++++++++++++++++ 1 file changed, 569 insertions(+) commit b3fc275d548dd831ce0e7e9bd74be03092fcdf03 Author: Todd E Brandt Date: Thu Feb 9 13:27:43 2017 -0800 AnalyzeSuspend: fix drag and zoom bug in javascript Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki scripts/analyze_suspend.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cd3e2eb8905d14fe28a2fc75362b8ecec16f0fb6 Author: Andy Shevchenko Date: Tue Feb 14 12:59:37 2017 +0200 PCI: Sort the list of devices with D3 delay quirk by ID Sort the list of Intel devices that have no PCI D3 delay by ID. Add a comment for group of devices that had not been marked yet. There is no functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 4e29ccdb240ec833f172a34fcf405e077b51066b Author: Hans Ulli Kroll Date: Wed Feb 8 21:00:10 2017 +0100 DT: add Faraday Tec. as vendor add Faraday Technology Corporation as vendor faraday for DT Signed-off-by: Hans Ulli Kroll Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit d8a4995bcea168dfac8ee41c28c79109907e4fba Author: Christopher Covington Date: Wed Feb 15 16:39:43 2017 -0500 tty: pl011: Work around QDF2400 E44 stuck BUSY bit The Qualcomm Datacenter Technologies QDF2400 family of SoCs contains a custom (non-PrimeCell) implementation of the SBSA UART. Occasionally the BUSY bit in the Flag Register gets stuck as 1, erratum 44 for both 2432v1 and 2400v1 SoCs.Checking that the Transmit FIFO Empty (TXFE) bit is 0, instead of checking that the BUSY bit is 1, works around the issue. To facilitate this substitution of flags and values, introduce vendor-specific inversion of Feature Register bits when UART AMBA Port (UAP) data is available. For the earlycon case, prior to UAP availability, implement alternative putc and early_write functions. Similar to what how ARMv8 ACPI PCI quirks are detected during MCFG parsing, check the OEM fields of the Serial Port Console Redirection (SPCR) ACPI table to determine if the current platform is known to be affected by the erratum. Signed-off-by: Christopher Covington Acked-by: Russell King Acked-by: Timur Tabi Acked-by: Mark Rutland Signed-off-by: Greg Kroah-Hartman drivers/acpi/spcr.c | 23 ++++++++++++++ drivers/tty/serial/amba-pl011.c | 66 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 82 insertions(+), 7 deletions(-) commit 62924fd789c6a381b772141f78a82361f46ae397 Author: Rémy Léone Date: Wed Feb 15 13:16:35 2017 +0100 Add a target to check broken external links in the Documentation Documentation shouldn't have broken links. sphinx linkcheck builder scans all documents for external links, tries to open them with urllib2, and writes an overview which ones are broken and redirected to standard output and to output.txt in the output directory. Reviewed-by: Jani Nikula Tested-by: Jani Nikula Signed-off-by: Rémy Léone Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 1 + Documentation/Makefile.sphinx | 4 ++++ Documentation/media/Makefile | 1 + Makefile | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) commit 72f8f677e3ec685865392846c356e08771d49f13 Author: Tyler Hicks Date: Tue Feb 14 04:04:17 2017 +0000 Documentation: Fix linux-api list typo A Japanese translation file contained the incorrect email address for the linux-api list. Signed-off-by: Tyler Hicks Signed-off-by: Jonathan Corbet Documentation/translations/ja_JP/HOWTO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f3a249110bea205b025a108f4b360c1d2ff8880 Author: Jim Davis Date: Mon Feb 13 17:02:57 2017 -0700 Documentation: DocBook/Makefile comment typo Fix a se for so typo. Signed-off-by: Jim Davis Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 291b9d73681f3e0123b8954eb20be22342987afc Author: Matthew Wilcox Date: Mon Feb 13 11:16:02 2017 -0800 Improve sparse documentation Add documentation of -DCONFIG_SPARSE_RCU_POINTER. I started to add documentation of -D__CHECK_ENDIAN__ as well, but discovered I'm too late; that's now enabled by default. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/dev-tools/sparse.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit df56c3dbae0e6df0edcca2e778810a3d8c994f4e Author: Jaroslav Kysela Date: Wed Feb 15 17:09:43 2017 +0100 ALSA: hda - add sanity check to force the separate stream tags It seems that newer Intel chipsets have more than 15 I/O streams (total). This patch forces the separate stream tags, when this hardware is detected to avoid SDxCTL.STRM field overflow and an unexpected behaviour. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e7480b34ad1ab84a63540b2c884cb92c0764ab74 Author: Jaroslav Kysela Date: Wed Feb 15 17:09:42 2017 +0100 ALSA: hda - fix Lewisburg audio issue Like for Sunrise Point, the total stream number of Lewisburg's input and output stream exceeds 15 (GCAP is 0x9701), which will cause some streams do not work because of the overflow on SDxCTL.STRM field if using the legacy stream tag allocation method. Fixes: 5cf92c8b3dc5 ("ALSA: hda - Add Intel Lewisburg device IDs Audio") Signed-off-by: Jaroslav Kysela Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7a1030839d35c04a620e841f406b9b2a8600041 Author: Ming Lei Date: Tue Feb 14 23:29:03 2017 +0800 md: fast clone bio in bio_clone_mddev() Firstly bio_clone_mddev() is used in raid normal I/O and isn't in resync I/O path. Secondly all the direct access to bvec table in raid happens on resync I/O except for write behind of raid1, in which we still use bio_clone() for allocating new bvec table. So this patch replaces bio_clone() with bio_clone_fast() in bio_clone_mddev(). Also kill bio_clone_mddev() and call bio_clone_fast() directly, as suggested by Christoph Hellwig. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/faulty.c | 2 +- drivers/md/md.c | 7 ------- drivers/md/md.h | 2 -- drivers/md/raid1.c | 10 ++++++---- drivers/md/raid10.c | 11 +++++------ drivers/md/raid5.c | 4 ++-- 6 files changed, 14 insertions(+), 22 deletions(-) commit ed7ef732ca9f7d6f42be8df6cc7bf4ace3534af3 Author: Ming Lei Date: Tue Feb 14 23:29:02 2017 +0800 md: remove unnecessary check on mddev mddev is never NULL and neither is ->bio_set, so remove the check. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.c | 3 --- 1 file changed, 3 deletions(-) commit 8e58e327e25c7fffc3fb79a24c76637bdda37716 Author: Ming Lei Date: Tue Feb 14 23:29:01 2017 +0800 md/raid1: use bio_clone_bioset_partial() in case of write behind Write behind need to replace pages in bio's bvecs, and we have to clone a fresh bio with new bvec table, so use the introduced bio_clone_bioset_partial() for it. For other bio_clone_mddev() cases, we will use fast clone since they don't need to touch bvec table. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 10273170fd5602d8090b1312e66ad4746ab02c94 Author: Ming Lei Date: Tue Feb 14 23:29:00 2017 +0800 md: fail if mddev->bio_set can't be created The current behaviour is to fall back to allocate bio from 'fs_bio_set', that isn't a correct way because it might cause deadlock. So this patch simply return failure if mddev->bio_set can't be created. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c18a1e09008de7d8bd82b046d38a88f4285d53f9 Author: Ming Lei Date: Tue Feb 14 23:28:59 2017 +0800 block: introduce bio_clone_bioset_partial() md still need bio clone(not the fast version) for behind write, and it is more efficient to use bio_clone_bioset_partial(). The idea is simple and just copy the bvecs range specified from parameters. Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Ming Lei Signed-off-by: Shaohua Li block/bio.c | 61 +++++++++++++++++++++++++++++++++++++++++------------ include/linux/bio.h | 11 ++++++++-- 2 files changed, 57 insertions(+), 15 deletions(-) commit 4da3273b93bd3715b05cc007ca07e5c12fa1e883 Author: James Hogan Date: Wed Feb 15 17:17:14 2017 +0000 MIPS: OCTEON: Enable DEVTMPFS Recent versions of udev and systemd require the kernel to be compiled with CONFIG_DEVTMPFS in order to populate the /dev directory. Most MIPS platforms have it enabled by default, so enable it for the Cavium Octeon defconfig as well. This will assist with automated kernel boot testing. Signed-off-by: James Hogan Acked-by: David Daney Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15294/ Signed-off-by: James Hogan arch/mips/configs/cavium_octeon_defconfig | 1 + 1 file changed, 1 insertion(+) commit 53b7f7b53d83727075c01f57f813fc141d53c3d5 Author: Gustavo A. R. Silva Date: Tue Feb 14 21:10:52 2017 -0600 usb: cdc-wdm: remove logically dead code Remove logically dead code. 'cntr' is always equal to zero when the following line of code is executed: rv = cntr ? cntr : -EAGAIN; Addresses-Coverity-ID: 113227 Signed-off-by: Gustavo A. R. Silva Acked-by: Oliver Neukum Reviewed-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b973154a2278c6af0b0efefafb222e0189959659 Author: Jan Koniarik Date: Wed Feb 15 16:59:35 2017 +0100 atm: idt77252, use setup_timer and mod_timer Stop accessing timer struct members directly and use setup_timer and mod_timer helpers intended for that use. It makes the code cleaner and will allow for easier change of the timer struct internals. Signed-off-by: Jan Koniarik Signed-off-by: Jiri Slaby Cc: Chas Williams <3chas3@gmail.com> Cc: Cc: Signed-off-by: David S. Miller drivers/atm/idt77252.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 0c921a894c2f01850f39ad6ecb31dd92a9cc9839 Author: Jiri Pirko Date: Wed Feb 15 12:09:51 2017 +0100 mlxsw: acl: Use PBS type for forward action Current behaviour of "mirred redirect" action (forward) offload is a bit odd. For matched packets the action forwards them to the desired destination, but it also lets the packet duplicates to go the original way down (bridge, router, etc). That is more like "mirred mirror". Fix this by using PBS type which behaves exactly like "mirred redirect". Note that PBS does not support loopback mode. Fixes: 4cda7d8d7098 ("mlxsw: core: Introduce flexible actions support") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 6a553b4894264eb880fe07c2ac6be54eea1d7abb Merge: 36a4a50 c80151e Author: David S. Miller Date: Wed Feb 15 13:20:57 2017 -0500 Merge branch 'stmmac-misc' Corentin Labbe says: ==================== stmmac: misc patchs This is a follow up of my previous stmmac serie which address some comment done in v2. ==================== Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller commit c80151ec4b65c08dac6a653a849ec5e50d94708f Author: LABBE Corentin Date: Wed Feb 15 10:46:45 2017 +0100 net: stmmac: invert the logic for dumping regs It is easier to follow the logic by removing the not operator Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit cc26dc67b69a736b17c69fa3f2251c8fefa99b75 Author: LABBE Corentin Date: Wed Feb 15 10:46:44 2017 +0100 net: stmmac: reduce indentation by adding a continue As suggested by Joe Perches, replacing the "if phydev" logic permit to reduce indentation in the for loop. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 82 +++++++++++------------ 1 file changed, 40 insertions(+), 42 deletions(-) commit 9beae261baab3f5a3001933cbc4d321538bef344 Author: LABBE Corentin Date: Wed Feb 15 10:46:43 2017 +0100 net: stmmac: split the stmmac_adjust_link 10/100 case The 10/100 case have too many ifcase. This patch split it for removing an if. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5db1355673205dccaf754dc3cb2f6b5abc2ff67e Author: LABBE Corentin Date: Wed Feb 15 10:46:42 2017 +0100 net: stmmac: run stmmac_hw_fix_mac_speed when speed is valid This patch mutualise a bit by running stmmac_hw_fix_mac_speed() after the switch in case of valid speed. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 688495b10ba703c1c13b3d05fcaecff55a320578 Author: LABBE Corentin Date: Wed Feb 15 10:46:41 2017 +0100 net: stmmac: set speed at SPEED_UNKNOWN in case of broken speed In case of invalid speed given, stmmac_adjust_link() still record it as current speed. This patch modify the default case to set speed as SPEED_UNKNOWN if not 10/100/1000. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) commit bd00632c5294bff0ed5826677cd2f1b2e303a6f6 Author: LABBE Corentin Date: Wed Feb 15 10:46:40 2017 +0100 net: stmmac: use SPEED_UNKNOWN/DUPLEX_UNKNOWN It is better to use DUPLEX_UNKNOWN instead of just "-1". Using 0 for an invalid speed is bad since 0 is a valid value for speed. So this patch replace 0 by SPEED_UNKNOWN. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3e12790eed9da7ac0e20b94690ce5de209540168 Author: LABBE Corentin Date: Wed Feb 15 10:46:39 2017 +0100 net: stmmac: likely is useless in occasional function The stmmac_adjust_link() function is called too rarely for having likely() macros being useful. Just remove likely annotation in it. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cb2c0acea271d96ca3242fb2ff0ce5e24958d015 Author: LABBE Corentin Date: Wed Feb 15 10:46:38 2017 +0100 net: stmmac: remove useless parenthesis This patch remove some useless parenthesis. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 51b0be640cf6e2cb63a7cf4d9c7c4acd3ad5afd0 Author: Stefan Berger Date: Wed Feb 15 11:56:23 2017 -0500 tpm: Fix expected number of response bytes of TPM1.2 PCR Extend The TPM1.2 PCR Extend operation only returns 20 bytes in the body, which is the size of the PCR state. This fixes a problem where IMA gets errors with every PCR Extend. Fixes: c659af78eb7b ("tpm: Check size of response before accessing data") Signed-off-by: Stefan Berger Acked-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36a4a50f4048f21b7c2694b37804dfc1d9890ab4 Author: Christoph Hellwig Date: Wed Feb 15 08:38:47 2017 +0100 net: ethernet: aquantia: switch to pci_alloc_irq_vectors pci_enable_msix has been long deprecated, but this driver adds a new instance. Convert it to pci_alloc_irq_vectors so that no new instance of the deprecated function reaches mainline. Signed-off-by: Christoph Hellwig Tested-by: Pavel Belous Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/aq_pci_func.c | 101 +++++---------------- 1 file changed, 25 insertions(+), 76 deletions(-) commit 4c2ae32d4c6ccd63819f36702f8455a5b08eaca8 Merge: 8b9c156 4f69bd1 Author: Bjorn Helgaas Date: Wed Feb 15 11:56:12 2017 -0600 Merge branch 'pci/vpd' into next * pci/vpd: PCI: Increase VPD access timeout to 125ms commit 8b9c156262f9ebaa88736b93263c1af5ae5fa43e Merge: 0dc49eb 5b0948d Author: Bjorn Helgaas Date: Wed Feb 15 11:56:11 2017 -0600 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: Lock each enable/disable num_vfs operation in sysfs PCI: Add ACS quirk for Intel Union Point commit 0dc49eb2a25a6b48e235803eeb2b52677f577ca5 Merge: 3ec2574 25e7738 Author: Bjorn Helgaas Date: Wed Feb 15 11:56:10 2017 -0600 Merge branch 'pci/resource' into next * pci/resource: PCI: Remove res_to_dev_res() debug message commit 3ec2574e31b5aebeeed52ea784bb6d7960788202 Merge: 906c142 e4e7d597 Author: Bjorn Helgaas Date: Wed Feb 15 11:56:10 2017 -0600 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Update MSI/MSI-X bits in PCIEBUS-HOWTO PCI/MSI: Document pci_alloc_irq_vectors(), deprecate pci_enable_msi() PCI/MSI: Return -ENOSPC if pci_enable_msi_range() can't get enough vectors PCI/portdrv: Use pci_irq_alloc_vectors() PCI/MSI: Check that we have a legacy interrupt line before using it PCI/MSI: Remove pci_msi_domain_{alloc,free}_irqs() PCI/MSI: Remove unused pci_msi_create_default_irq_domain() PCI/MSI: Return failure when msix_setup_entries() fails PCI/MSI: Remove pci_enable_msi_{exact,range}() amd-xgbe: Update PCI support to use new IRQ functions [media] cobalt: use pci_irq_allocate_vectors() PCI/MSI: Fix msi_capability_init() kernel-doc warnings commit 906c142634def5dd3dda533d5d20bd3c1c19d1fb Merge: 63ab93f 1acf8bc Author: Bjorn Helgaas Date: Wed Feb 15 11:56:09 2017 -0600 Merge branch 'pci/hotplug' into next * pci/hotplug: PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init PCI: rpadlpar: Remove unnecessary return statement commit 63ab93f021ecd815d848c3e9d3e326fa9628e5a9 Merge: af3a2ab fed6781 Author: Bjorn Helgaas Date: Wed Feb 15 11:56:08 2017 -0600 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: Remove duplicate check for positive return value from probe() functions PCI: Enable PCIe Extended Tags if supported PCI: Avoid possible deadlock on pci_lock and p->pi_lock PCI/ACPI: Fix bus range comparison in pci_mcfg_lookup() PCI: Apply _HPX settings only to relevant devices commit af3a2ab5daa0b8bf188a039c122a670cdc8b9544 Merge: 8f417ca abdbf4d Author: Bjorn Helgaas Date: Wed Feb 15 11:56:07 2017 -0600 Merge branch 'pci/dpc' into next * pci/dpc: PCI/DPC: Wait for Root Port busy to clear PCI/DPC: Decode extended reasons commit 8f417ca9ebfa8701a41db64f5ed9cbb01b8e4219 Merge: ca0ef7f a142f4d Author: Bjorn Helgaas Date: Wed Feb 15 11:56:07 2017 -0600 Merge branch 'pci/aspm' into next * pci/aspm: PCI/ASPM: Add comment about L1 substate latency PCI/ASPM: Configure L1 substate settings PCI/ASPM: Calculate and save the L1.2 timing parameters PCI/ASPM: Read and set up L1 substate capabilities PCI/ASPM: Add support for L1 substates PCI/ASPM: Add L1 substate capability structure register definitions commit ca0ef7fecc881a7e8d11db2d8852ab580cd29e03 Merge: 7ce7d89 2fd260f Author: Bjorn Helgaas Date: Wed Feb 15 11:56:06 2017 -0600 Merge branch 'pci/aer' into next * pci/aer: PCI/AER: Remove unused .link_reset() callback commit e4e7d59704d485f272061cea9057798dda3cfd99 Author: Christoph Hellwig Date: Wed Feb 15 08:58:23 2017 +0100 PCI/MSI: Update MSI/MSI-X bits in PCIEBUS-HOWTO Update the MSI/MSI-X bits in PCIEBUS-HOWTO. Stop talking about low-level details that mention deprecated APIs and concentrate on what service drivers should do and why. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Documentation/PCI/PCIEBUS-HOWTO.txt | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit dfb011d241e26ebe8ac05aaa2597f00ac2918122 Merge: b93f79b 4c55215 Author: David S. Miller Date: Wed Feb 15 12:42:54 2017 -0500 Merge branch 'qed-ptp' Yuval Mintz says: ==================== qed*: Add support for PTP This patch series adds required changes for qed/qede drivers for supporting the IEEE Precision Time Protocol (PTP). Changes from previous versions: v7: Fixed Kbuild robot warnings. v6: Corrected broken loop iteration in previous version. Reduced approximation error of adjfreq. v5: Removed two divisions from the adjust-frequency loop. Resulting logic would use 8 divisions [instead of 24]. v4: Remove the loop iteration for value '0' in the qed_ptp_hw_adjfreq() implementation. v3: Use div_s64 for 64-bit divisions as do_div gives error for signed types. Incorporated review comments from Richard Cochran. - Clear timestamp resgisters as soon as timestamp is read. - Use shift operation in the place of 'divide by 16'. v2: Use do_div for 64-bit divisions. ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 4c55215c05d252e975930fe08ff418d02e002ceb Author: Sudarsana Reddy Kalluru Date: Wed Feb 15 10:24:11 2017 +0200 qede: Add driver support for PTP This patch adds the driver support for, - Registering the ptp clock functionality with the OS. - Timestamping the Rx/Tx PTP packets. - Ethtool callbacks related to PTP. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 1 + drivers/net/ethernet/qlogic/qede/Makefile | 2 +- drivers/net/ethernet/qlogic/qede/qede.h | 4 + drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 5 + drivers/net/ethernet/qlogic/qede/qede_main.c | 39 ++ drivers/net/ethernet/qlogic/qede/qede_ptp.c | 536 ++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_ptp.h | 65 +++ 8 files changed, 661 insertions(+), 1 deletion(-) commit c78c70fa30e23dc6cdb394f6c13880919499fba5 Author: Sudarsana Reddy Kalluru Date: Wed Feb 15 10:24:10 2017 +0200 qed: Add infrastructure for PTP support The patch adds the required qed interfaces for configuring/reading the PTP clock on the adapter. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net/ethernet/qlogic/qed/qed_l2.c | 5 + drivers/net/ethernet/qlogic/qed/qed_l2.h | 1 + drivers/net/ethernet/qlogic/qed/qed_main.c | 15 ++ drivers/net/ethernet/qlogic/qed/qed_ptp.c | 323 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_ptp.h | 47 ++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 31 +++ include/linux/qed/qed_eth_if.h | 22 ++ 9 files changed, 447 insertions(+), 1 deletion(-) commit b93f79bea9c1fcb1dd4619eaa528b6a5688c3ece Author: Ganesh Goudar Date: Wed Feb 15 11:45:25 2017 +0530 cxgb4: Update proper netdev stats for rx drops Count buffer group drops or truncates as rx drops rather than rx errors in netdev stats. Signed-off-by: Ganesh Goudar Signed-off-by: Arjun V Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 425df17ce3a26d98f76e2b6b0af2acf4aeb0b026 Author: Jarno Rajahalme Date: Tue Feb 14 21:16:28 2017 -0800 openvswitch: Set internal device max mtu to ETH_MAX_MTU. Commit 91572088e3fd ("net: use core MTU range checking in core net infra") changed the openvswitch internal device to use the core net infra for controlling the MTU range, but failed to actually set the max_mtu as described in the commit message, which now defaults to ETH_DATA_LEN. This patch fixes this by setting max_mtu to ETH_MAX_MTU after ether_setup() call. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") Signed-off-by: Jarno Rajahalme Signed-off-by: David S. Miller net/openvswitch/vport-internal_dev.c | 2 ++ 1 file changed, 2 insertions(+) commit b0c9d043d4ae95d898aa79b2d89226262de471fd Merge: d0d8949 6ccc3a3 Author: Dmitry Torokhov Date: Wed Feb 15 09:24:23 2017 -0800 Merge tag 'ib-mfd-input-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Merge in cros-ec changes applied through MFD branch to resolve conflicts. commit 8ae70032552a8082734d0b8550848cf6bf92e1d5 Author: Jiri Pirko Date: Wed Feb 15 11:57:50 2017 +0100 sched: have stub for tcf_destroy_chain in case NET_CLS is not configured This fixes broken build for !NET_CLS: net/built-in.o: In function `fq_codel_destroy': /home/sab/linux/net-next/net/sched/sch_fq_codel.c:468: undefined reference to `tcf_destroy_chain' Fixes: cf1facda2f61 ("sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api") Reported-by: Sabrina Dubroca Signed-off-by: Jiri Pirko Tested-by: Sabrina Dubroca Signed-off-by: David S. Miller include/net/pkt_cls.h | 6 ++++++ 1 file changed, 6 insertions(+) commit d498f8719a098a5df7c6dba4ea302df7afb51efd Author: Mickaël Salaün Date: Sat Feb 11 23:20:23 2017 +0100 bpf: Rebuild bpf.o for any dependency update This is needed to force a rebuild of bpf.o when one of its dependencies (e.g. uapi/linux/bpf.h) is updated. Add a phony target. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Wang Nan Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit cdc6a4ba88fbc26de1ffe8cbcaf0e41d316046fd Author: Mickaël Salaün Date: Sat Feb 11 20:37:08 2017 +0100 bpf: Remove redundant ifdef Remove a useless ifdef __NR_bpf as requested by Wang Nan. Inline one-line static functions as it was in the bpf_sys.h file. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Wang Nan Link: https://lkml.kernel.org/r/828ab1ff-4dcf-53ff-c97b-074adb895006@huawei.com Acked-by: Wang Nan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 99f5711e7c15e997c4eb34b378502ef6f3982233 Author: Eric Dumazet Date: Thu Feb 9 09:10:04 2017 -0800 mlx4: do not use rwlock in fast path Using a reader-writer lock in fast path is silly, when we can instead use RCU or a seqlock. For mlx4 hwstamp clock, a seqlock is the way to go, removing two atomic operations and false sharing. Signed-off-by: Eric Dumazet Cc: Tariq Toukan Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_clock.c | 35 ++++++++++++++------------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) commit 6cf18e6927c0b224f972e3042fb85770d63cb9f8 Author: Thomas Gleixner Date: Wed Feb 15 11:11:51 2017 +0100 goldfish: Sanitize the broken interrupt handler This interrupt handler is broken in several ways: - It loops forever when the op code is not decodeable - It never returns IRQ_HANDLED because the only way to exit the loop returns IRQ_NONE unconditionally. The whole concept of this is broken. Creating devices in an interrupt handler is beyond any point of sanity. Make it at least behave halfways sane so accidental users do not have to deal with a hard to debug lockup. Fixes: e809c22b8fb028 ("goldfish: add the goldfish virtual bus") Reported-by: Gabriel C Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/pdev_bus.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 47512cfd0d7a8bd6ab71d01cd89fca19eb2093eb Author: Thomas Gleixner Date: Wed Feb 15 11:11:50 2017 +0100 x86/platform/goldfish: Prevent unconditional loading The goldfish platform code registers the platform device unconditionally which causes havoc in several ways if the goldfish_pdev_bus driver is enabled: - Access to the hardcoded physical memory region, which is either not available or contains stuff which is completely unrelated. - Prevents that the interrupt of the serial port can be requested - In case of a spurious interrupt it goes into a infinite loop in the interrupt handler of the pdev_bus driver (which needs to be fixed seperately). Add a 'goldfish' command line option to make the registration opt-in when the platform is compiled in. I'm seriously grumpy about this engineering trainwreck, which has seven SOBs from Intel developers for 50 lines of code. And none of them figured out that this is broken. Impressive fail! Fixes: ddd70cf93d78 ("goldfish: platform device for x86") Reported-by: Gabriel C Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 4 ++++ arch/x86/platform/goldfish/goldfish.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit beabdc3cd3e3ef9a56b62ee0e0b0663edacd5264 Author: Johan Hovold Date: Wed Feb 15 11:09:51 2017 +0100 USB: serial: keyspan: drop header file Move all declarations and definitions in keyspan.h to keyspan.c, which is the only place were they are used. This specifically moves the driver device-id tables and usb-serial driver definitions to the source file where they are expected to be found. While at it, fix up some multi-line comments and minor white-space issues (spaces instead of tabs and superfluous white space). Note that the information in the comment header of the removed header file is also present in the source file. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/keyspan.c | 592 +++++++++++++++++++++++++++++++++++++++- drivers/usb/serial/keyspan.h | 629 ------------------------------------------- 2 files changed, 589 insertions(+), 632 deletions(-) commit 35d479762bef1a38b20decbb6f1060043d833fdd Author: Johan Hovold Date: Wed Feb 15 11:09:50 2017 +0100 USB: serial: io_edgeport: drop io-tables header file Move the driver device-id tables and usb-serial driver definitions to the source file where they are expected to be found. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 217 +++++++++++++++++++++++++++++++++++- drivers/usb/serial/io_tables.h | 232 --------------------------------------- 2 files changed, 215 insertions(+), 234 deletions(-) commit c3cf2c61ddc1410424da0ea87717edf16fc296c5 Author: Christoph Hellwig Date: Wed Feb 15 08:58:22 2017 +0100 PCI/MSI: Document pci_alloc_irq_vectors(), deprecate pci_enable_msi() Document pci_alloc_irq_vectors() instead of the deprecated pci_enable_msi() and pci_enable_msix() APIs. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Documentation/PCI/pci.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b410aff2bd9f101bc096069612391aecce204cd1 Author: Tahsin Erdogan Date: Tue Feb 14 19:27:38 2017 -0800 block: do not allow updates through sysfs until registration completes When a new disk shows up, sysfs queue directory is created before elevator is registered. This allows a user to attempt a scheduler switch even though the initial registration hasn't completed yet. In one scenario, blk_register_queue() calls elv_register_queue() and right before cfq_registered_queue() is called, another process executes elevator_switch() and replaces q->elevator with deadline scheduler. When cfq_registered_queue() executes it interprets e->elevator_data as struct cfq_data even though it is actually struct deadline_data. Grab q->sysfs_lock in blk_register_queue() to synchronize with sysfs callers. Signed-off-by: Tahsin Erdogan Signed-off-by: Jens Axboe block/blk-sysfs.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit bef5da60595f5706232e2502876f8545743b9b41 Author: Masami Hiramatsu Date: Fri Feb 10 22:21:55 2017 +0900 tracing/probes: Fix a warning message to show correct maximum length Since tracing/*probe_events will accept a probe definition up to 4096 - 2 ('\n' and '\0') bytes, it must show 4094 instead of 4096 in warning message. Note that there is one possible case of exceed 4094. If user prepare 4096 bytes null-terminated string and syscall write it with the count == 4095, then it can be accepted. However, if user puts a '\n' after that, it must rejected. So IMHO, the warning message should indicate shorter one, since it is safer. Link: http://lkml.kernel.org/r/148673290462.2579.7966778294009665632.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6732c7401035c8464fd4ab5ff2e1bf86e5fcd74c Author: Matias Bjørling Date: Wed Feb 15 16:25:33 2017 +0100 lightnvm: set default lun range when no luns are specified The create target ioctl takes a lun begin and lun end parameter, which defines the range of luns to initialize a target with. If the user does not set the parameters, it default to only using lun 0. Instead, defaults to use all luns in the OCSSD, as it is the usual behaviour users want. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0e5ffd1cb5f7ce19f23cc829d5dc3ebb1491570f Author: Matias Bjørling Date: Wed Feb 15 16:25:32 2017 +0100 lightnvm: fix off-by-one error on target initialization If one specifies the end lun id to be the absolute number of luns, without taking zero indexing into account, the lightnvm core will pass the off-by-one end lun id to target creation, which then panics during nvm_ioctl_dev_create. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04be87a83db6cbb7586db95b591467c58ae09aee Author: Ralph Sennhauser Date: Thu Feb 9 16:27:02 2017 +0100 ARM: dts: armada-385-linksys: fix DSA compatible property The switch to the new DSA binding used "marvell,mv88e6095" for the compatible property which doesn't exist, use "marvell,mv88e6085" instead. Fixes: 455b82f03f52 ("ARM: dts: armada-385-linksys: Utilize new DSA binding") Signed-off-by: Ralph Sennhauser Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b85ad494098bf881c3713218fbd74193e5d5c488 Author: Rob Herring Date: Fri Feb 3 12:39:03 2017 -0600 of: introduce of_graph_get_remote_node The OF graph API leaves too much of the graph walking to clients when in many cases the driver doesn't care about accessing the port or endpoint nodes. The drivers typically just want the device connected via a particular graph connection. of_graph_get_remote_node provides this functionality. Signed-off-by: Rob Herring Acked-by: Philipp Zabel drivers/of/base.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/of_graph.h | 8 ++++++++ 2 files changed, 45 insertions(+) commit 6df6b4a9ce43deb57d3e23b0e79a529464b5cf37 Author: Moni Shoua Date: Tue Feb 14 07:24:08 2017 +0200 IB/cma: Destination and source addr families must match The destination address in a listening rdma_id does not have an address family. Since address family in both sides of a connection must be the same in rdma_bind_addr() we set the address family of the destination to the address family of the source. This patch serves the logic in cma_port_is_unique() which requires to know if destination address that is associated with a rdma_id is any address (cma_zero_addr() and cma_loopback_addr()). This can happen when port reuse is checked for a port number that is being listened to. Fixes: 19b752a19dce ("IB/cma: Allow port reuse for rdma_id") Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 4 ++++ 1 file changed, 4 insertions(+) commit 89052d784bc977c2a0b92393f6bd57140952c206 Author: Majd Dibbiny Date: Tue Feb 14 07:21:52 2017 +0200 IB/cma: Add default RoCE TOS to CMA configfs Add new entry to the RDMA-CM configfs that allows users to select default TOS for RDMA-CM QPs. This is useful for users that want to control the TOS for legacy applications without changing their code. Application that sets the TOS explicitly using the rdma_set_option API will continue to work as expected, meaning overriding the configfs value. CC: Dan Carpenter Signed-off-by: Majd Dibbiny Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford Documentation/ABI/testing/configfs-rdma_cm | 8 +++++ drivers/infiniband/core/cma.c | 54 +++++++++++++++++++++++++++--- drivers/infiniband/core/cma_configfs.c | 42 +++++++++++++++++++++++ drivers/infiniband/core/core_priv.h | 3 ++ 4 files changed, 102 insertions(+), 5 deletions(-) commit 590396084039b6504097b371cda6474dfcb83648 Author: Parav Pandit Date: Thu Feb 2 07:14:08 2017 +0200 IB/core: Remove pointer casting from void to net_device This patch avoids unnecessary type casting from void to net_device. CC: Yuval Shaia Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/roce_gid_mgmt.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 2b0841766a898aba84630fb723989a77a9d3b4e6 Author: Erez Shitrit Date: Wed Feb 1 19:10:05 2017 +0200 IB/IPoIB: Add destination address when re-queue packet When sending packet to destination that was not resolved yet via path query, the driver keeps the skb and tries to re-send it again when the path is resolved. But when re-sending via dev_queue_xmit the kernel doesn't call to dev_hard_header, so IPoIB needs to keep 20 bytes in the skb and to put the destination address inside them. In that way the dev_start_xmit will have the correct destination, and the driver won't take the destination from the skb->data, while nothing exists there, which causes to packet be be dropped. The test flow is: 1. Run the SM on remote node, 2. Restart the driver. 4. Ping some destination, 3. Observe that first ICMP request will be dropped. Fixes: fc791b633515 ("IB/ipoib: move back IB LL address into the hard header") Cc: # v4.8+ Signed-off-by: Erez Shitrit Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Tested-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit e7d08bcfe9b0badeda28ed5281766f1317660673 Author: Chris Packham Date: Wed Feb 8 09:28:10 2017 +1300 ARM: dts: Fix typo in armada-xp-98dx4251 The compatible should be 98dx4251 not 98dx4521. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx4251.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdbe33d0f82d68ff74f05502a4c26e65ec7e90bb Author: Eli Cohen Date: Tue Feb 14 07:25:38 2017 +0200 IB/mlx5: Fix configuration of port capabilities When the "ib_virt" cap is set, configuration of port capabilities need to be done through mlx5_core_modify_hca_vport_context. Since modify_hca_vport_context accepts mask and value, there is no need to read the port capabilities and calculate the new cap values so we avoid the mutex when ib_virt is set. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 681bcea802f2bf0a28cdf0fd0f813de7bb5cd3c7 Author: David Hildenbrand Date: Tue Jan 24 22:21:16 2017 +0100 KVM: svm: inititalize hash table structures directly The hashtable and guarding spinlock are global data structures, we can inititalize them statically. Signed-off-by: David Hildenbrand Message-Id: <20170124212116.4568-1-david@redhat.com> Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 34a0548f01626b01c9e98d9627812c3c9f6b6f7d Author: Arnaldo Carvalho de Melo Date: Wed Feb 15 10:09:11 2017 -0300 perf tools: Add missing parse_events_error() prototype As pointed out by clang, we were not providing a prototype for a function before using it: util/parse-events.y:699:6: error: conflicting types for 'parse_events_error' void parse_events_error(YYLTYPE *loc, void *data, ^ /tmp/build/perf/util/parse-events-bison.c:2224:7: note: previous implicit declaration is here yyerror (&yylloc, _data, scanner, YY_("syntax error")); ^ /tmp/build/perf/util/parse-events-bison.c:65:25: note: expanded from macro 'yyerror' #define yyerror parse_events_error 1 error generated. One line fix it. Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20170215130605.GC4020@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 2 ++ 1 file changed, 2 insertions(+) commit 8f0994bb8cbde5452e58ce0cacdbf6cb58079d01 Author: Wei Yongjun Date: Thu Jan 12 13:55:02 2017 +0000 tracing: Fix return value check in trace_benchmark_reg() In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Link: http://lkml.kernel.org/r/20170112135502.28556-1-weiyj.lk@gmail.com Cc: stable@vger.kernel.org Fixes: 81dc9f0e ("tracing: Add tracepoint benchmark tracepoint") Signed-off-by: Wei Yongjun Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb583cd484f9a76c3716c0539bd06340943eeff9 Author: Arnd Bergmann Date: Mon Jan 23 13:24:45 2017 +0100 tracing: Use modern function declaration We get a lot of harmless warnings about this header file at W=1 level because of an unusual function declaration: kernel/trace/trace.h:766:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] This moves the inline statement where it normally belongs, avoiding the warning. Link: http://lkml.kernel.org/r/20170123122521.3389010-1-arnd@arndb.de Fixes: 4046bf023b06 ("ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3821fd35b58dba449bd894014fbf4e1c43c9e951 Author: Jason Baron Date: Fri Feb 3 15:42:24 2017 -0500 jump_label: Reduce the size of struct static_key The static_key->next field goes mostly unused. The field is used for associating module uses with a static key. Most uses of struct static_key define a static key in the core kernel and make use of it entirely within the core kernel, or define the static key in a module and make use of it only from within that module. In fact, of the ~3,000 static keys defined, I found only about 5 or so that did not fit this pattern. Thus, we can remove the static_key->next field entirely and overload the static_key->entries field. That is, when all the static_key uses are contained within the same module, static_key->entries continues to point to those uses. However, if the static_key uses are not contained within the module where the static_key is defined, then we allocate a struct static_key_mod, store a pointer to the uses within that struct static_key_mod, and have the static key point at the static_key_mod. This does incur some extra memory usage when a static_key is used in a module that does not define it, but since there are only a handful of such cases there is a net savings. In order to identify if the static_key->entries pointer contains a struct static_key_mod or a struct jump_entry pointer, bit 1 of static_key->entries is set to 1 if it points to a struct static_key_mod and is 0 if it points to a struct jump_entry. We were already using bit 0 in a similar way to store the initial value of the static_key. This does mean that allocations of struct static_key_mod and that the struct jump_entry tables need to be at least 4-byte aligned in memory. As far as I can tell all arches meet this criteria. For my .config, the patch increased the text by 778 bytes, but reduced the data + bss size by 14912, for a net savings of 14,134 bytes. text data bss dec hex filename 8092427 5016512 790528 13899467 d416cb vmlinux.pre 8093205 5001600 790528 13885333 d3df95 vmlinux.post Link: http://lkml.kernel.org/r/1486154544-4321-1-git-send-email-jbaron@akamai.com Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Joe Perches Signed-off-by: Jason Baron Signed-off-by: Steven Rostedt (VMware) Documentation/static-keys.txt | 4 +- include/linux/jump_label.h | 23 ++++--- kernel/jump_label.c | 153 +++++++++++++++++++++++++++++++++++------- 3 files changed, 145 insertions(+), 35 deletions(-) commit 7257634135c247de235f3cdfdaa22f9eb5f054e4 Author: Masami Hiramatsu Date: Tue Feb 7 20:21:28 2017 +0900 tracing/probe: Show subsystem name in messages Show "trace_probe:", "trace_kprobe:" and "trace_uprobe:" headers for each warning/error/info message. This will help people to notice that kprobe/uprobe events caused those messages. Link: http://lkml.kernel.org/r/148646647813.24658.16705315294927615333.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 1 + kernel/trace/trace_probe.c | 1 + kernel/trace/trace_uprobe.c | 1 + 3 files changed, 3 insertions(+) commit 8e0f11429aec1119b17cbfcfa2d3194c8e864a26 Author: Luiz Capitulino Date: Mon Feb 13 12:25:17 2017 -0500 tracing/hwlat: Update old comment about migration The ftrace hwlat does support a cpumask. Link: http://lkml.kernel.org/r/20170213122517.6e211955@redhat.com Signed-off-by: Luiz Capitulino Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_hwlat.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8a58a34ba479d42b3ef28f8ffd9e245a81a7786f Author: Thomas Gleixner Date: Fri Feb 10 16:41:15 2017 +0100 timers: Make flags output in the timer_start tracepoint useful The timer flags in the timer_start trace event contain lots of useful information, but the meaning is not clear in the trace output. Making tools rely on the bit positions is bad as they might change over time. Decode the flags in the print out. Tools can retrieve the bits and their meaning from the trace format file. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1702101639290.4036@nanos Requested-by: Arjan van de Ven Signed-off-by: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) include/linux/timer.h | 2 ++ include/trace/events/timer.h | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit b065d3f59ff1905922194bd17c79543289317fc7 Merge: 7272416 c9f1e326 Author: Kalle Valo Date: Wed Feb 15 16:01:04 2017 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.11. Major changes: ath10k * when trying older firmware versions don't confuse user with error messages ath9k * fix crash in AP mode (regression) * fix relayfs crash (regression) * fix initialisation with AR9340 and AR9550 commit 1f9b3546cf4c273b6d809003244d05cf0460a5e9 Author: Steven Rostedt (VMware) Date: Thu Feb 9 17:53:50 2017 -0500 tracing: Have traceprobe_probes_write() not access userspace unnecessarily The code in traceprobe_probes_write() reads up to 4096 bytes from userpace for each line. If userspace passes in several lines to execute, the code will do a large read for each line, even though, it is highly likely that the first read from userspace received all of the lines at once. I changed the logic to do a single read from userspace, and to only read from userspace again if not all of the read from userspace made it in. I tested this by adding printk()s and writing files that would test -1, ==, and +1 the buffer size, to make sure that there's no overflows and that if a single line is written with +1 the buffer size, that it fails properly. Link: http://lkml.kernel.org/r/20170209180458.5c829ab2@gandalf.local.home Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_probe.c | 48 ++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 19 deletions(-) commit 858e25c06fb0bc4b39b2f01c14c990348e3a9b67 Author: Jim Mattson Date: Wed Nov 30 12:03:47 2016 -0800 kvm: nVMX: Refactor nested_vmx_run() Nested_vmx_run is split into two parts: the part that handles the VMLAUNCH/VMRESUME instruction, and the part that modifies the vcpu state to transition from VMX root mode to VMX non-root mode. The latter will be used when restoring the checkpointed state of a vCPU that was in VMX operation when a snapshot was taken. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 111 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 49 deletions(-) commit ca0bde28f2ed66c2229ecfb7f4bfa0defa3da4b5 Author: Jim Mattson Date: Wed Nov 30 12:03:46 2016 -0800 kvm: nVMX: Split VMCS checks from nested_vmx_run() The checks performed on the contents of the vmcs12 are extracted from nested_vmx_run so that they can be used to validate a vmcs12 that has been restored from a checkpoint. Signed-off-by: Jim Mattson [Change prepare_vmcs02 and nested_vmx_load_cr3's last argument to u32, to match check_vmentry_postreqs. Update comments for singlestep handling. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 194 ++++++++++++++++++++++++++++------------------------- 1 file changed, 103 insertions(+), 91 deletions(-) commit 6beb7bd52e482c213dfa6c1c88e27a579df5bf4d Author: Jim Mattson Date: Wed Nov 30 12:03:45 2016 -0800 kvm: nVMX: Refactor nested_get_vmcs12_pages() Perform the checks on vmcs12 state early, but defer the gpa->hpa lookups until after prepare_vmcs02. Later, when we restore the checkpointed state of a vCPU in guest mode, we will not be able to do the gpa->hpa lookups when the restore is done. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 138 ++++++++++++++++++++++++++--------------------------- 1 file changed, 69 insertions(+), 69 deletions(-) commit a8bc284eb70f58a4fd0f4a70d816cca28ca01973 Author: Jim Mattson Date: Wed Nov 30 12:03:44 2016 -0800 kvm: nVMX: Refactor handle_vmptrld() Handle_vmptrld is split into two parts: the part that handles the VMPTRLD instruction, and the part that establishes the current VMCS pointer. The latter will be used when restoring the checkpointed state of a vCPU that had a valid VMCS pointer when a snapshot was taken. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit e29acc55bfc3afcfdf9ea3468f1217d08f0b2d2b Author: Jim Mattson Date: Wed Nov 30 12:03:43 2016 -0800 kvm: nVMX: Refactor handle_vmon() Handle_vmon is split into two parts: the part that handles the VMXON instruction, and the part that modifies the vcpu state to transition from legacy mode to VMX operation. The latter will be used when restoring the checkpointed state of a vCPU that was in VMX operation when a snapshot was taken. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 93 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 41 deletions(-) commit cf8b84f48a5936f558a7a415f1d2f42161bf73eb Author: Jim Mattson Date: Wed Nov 30 12:03:42 2016 -0800 kvm: nVMX: Prepare for checkpointing L2 state Split prepare_vmcs12 into two parts: the part that stores the current L2 guest state and the part that sets up the exit information fields. The former will be used when checkpointing the vCPU's VMX state. Modify prepare_vmcs02 so that it can construct a vmcs02 midway through L2 execution, using the checkpointed L2 guest state saved into the cached vmcs12 above. Signed-off-by: Jim Mattson [Rebasing: add from_vmentry argument to prepare_vmcs02 instead of using vmx->nested.nested_run_pending, because it is no longer 1 at the point prepare_vmcs02 is called. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 77 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 29 deletions(-) commit b95234c840045b7c72380fd14c59416af28fcb02 Author: Paolo Bonzini Date: Mon Dec 19 13:57:33 2016 +0100 kvm: x86: do not use KVM_REQ_EVENT for APICv interrupt injection Since bf9f6ac8d749 ("KVM: Update Posted-Interrupts Descriptor when vCPU is blocked", 2015-09-18) the posted interrupt descriptor is checked unconditionally for PIR.ON. Therefore we don't need KVM_REQ_EVENT to trigger the scan and, if NMIs or SMIs are not involved, we can avoid the complicated event injection path. Calling kvm_vcpu_kick if PIR.ON=1 is also useless, though it has been there since APICv was introduced. However, without the KVM_REQ_EVENT safety net KVM needs to be much more careful about races between vmx_deliver_posted_interrupt and vcpu_enter_guest. First, the IPI for posted interrupts may be issued between setting vcpu->mode = IN_GUEST_MODE and disabling interrupts. If that happens, kvm_trigger_posted_interrupt returns true, but smp_kvm_posted_intr_ipi doesn't do anything about it. The guest is entered with PIR.ON, but the posted interrupt IPI has not been sent and the interrupt is only delivered to the guest on the next vmentry (if any). To fix this, disable interrupts before setting vcpu->mode. This ensures that the IPI is delayed until the guest enters non-root mode; it is then trapped by the processor causing the interrupt to be injected. Second, the IPI may be issued between kvm_x86_ops->sync_pir_to_irr(vcpu) and vcpu->mode = IN_GUEST_MODE. In this case, kvm_vcpu_kick is called but it (correctly) doesn't do anything because it sees vcpu->mode == OUTSIDE_GUEST_MODE. Again, the guest is entered with PIR.ON but no posted interrupt IPI is pending; this time, the fix for this is to move the RVI update after IN_GUEST_MODE. Both issues were mostly masked by the liberal usage of KVM_REQ_EVENT, though the second could actually happen with VT-d posted interrupts. In both race scenarios KVM_REQ_EVENT would cancel guest entry, resulting in another vmentry which would inject the interrupt. This saves about 300 cycles on the self_ipi_* tests of vmexit.flat. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 11 ++++------- arch/x86/kvm/vmx.c | 8 +++++--- arch/x86/kvm/x86.c | 44 +++++++++++++++++++++++++------------------- 3 files changed, 34 insertions(+), 29 deletions(-) commit 76dfafd536730ef9b9d99b1cf596916d52be76d1 Author: Paolo Bonzini Date: Mon Dec 19 17:17:11 2016 +0100 KVM: x86: do not scan IRR twice on APICv vmentry Calls to apic_find_highest_irr are scanning IRR twice, once in vmx_sync_pir_from_irr and once in apic_search_irr. Change sync_pir_from_irr to get the new maximum IRR from kvm_apic_update_irr; now that it does the computation, it can also do the RVI write. In order to avoid complications in svm.c, make the callback optional. Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/lapic.c | 8 +++++--- arch/x86/kvm/svm.c | 6 ------ arch/x86/kvm/vmx.c | 31 +++++++++++++++++++------------ arch/x86/kvm/x86.c | 9 +++------ 5 files changed, 28 insertions(+), 28 deletions(-) commit 3d92789f69162ee5689f3766e5f50bb46b7e1d97 Author: Paolo Bonzini Date: Mon Dec 19 13:29:03 2016 +0100 KVM: vmx: move sync_pir_to_irr from apic_find_highest_irr to callers Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 7 ++++--- arch/x86/kvm/x86.c | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) commit 810e6defcca4d05275aa15c2872c0a4949178fcb Author: Paolo Bonzini Date: Mon Dec 19 13:05:46 2016 +0100 KVM: x86: preparatory changes for APICv cleanups Add return value to __kvm_apic_update_irr/kvm_apic_update_irr. Move vmx_sync_pir_to_irr around. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 25 +++++++++++++++++-------- arch/x86/kvm/lapic.h | 4 ++-- arch/x86/kvm/vmx.c | 32 ++++++++++++++++---------------- 3 files changed, 35 insertions(+), 26 deletions(-) commit 0ad3bed6c5ec6dbb093a26802c85088a85fb9757 Author: Paolo Bonzini Date: Mon Dec 19 15:23:54 2016 +0100 kvm: nVMX: move nested events check to kvm_vcpu_running vcpu_run calls kvm_vcpu_running, not kvm_arch_vcpu_runnable, and the former does not call check_nested_events. Once KVM_REQ_EVENT is removed from the APICv interrupt injection path, however, this would leave no place to trigger a vmexit from L2 to L1, causing a missed interrupt delivery while in guest mode. This is caught by the "ack interrupt on exit" test in vmx.flat. [This does not change the calls to check_nested_events in inject_pending_event. That is material for a separate cleanup.] Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 967235d320329e4a7a2bd1a36b04293063e985ae Author: Paolo Bonzini Date: Mon Dec 19 14:03:45 2016 +0100 KVM: vmx: clear pending interrupts on KVM_SET_LAPIC Pending interrupts might be in the PI descriptor when the LAPIC is restored from an external state; we do not want them to be injected. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 +-- arch/x86/kvm/vmx.c | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit db1c056cee59f4a7670c3bd9ee1657468cf0b4c4 Author: Paolo Bonzini Date: Thu Dec 8 15:31:41 2016 +0100 kvm: vmx: Use the hardware provided GPA instead of page walk As in the SVM patch, the guest physical address is passed by VMX to x86_emulate_instruction already, so mark the GPA as available in vcpu->arch. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 +++ 1 file changed, 3 insertions(+) commit 1592364de3912dad264262f4bcc61552984c9523 Author: Maarten Lankhorst Date: Wed Jan 25 12:30:47 2017 +0100 drm: Resurrect atomic rmfb code, v3 This was somehow lost between v3 and the merged version in Maarten's patch merged as: commit f2d580b9a8149735cbc4b59c4a8df60173658140 Author: Maarten Lankhorst Date: Wed May 4 14:38:26 2016 +0200 drm/core: Do not preserve framebuffer on rmfb, v4. This introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, we try to preserve it. Apart from old versions of the vmwgfx xorg driver, there is nothing depending on rmfb disabling a crtc. Since vmwgfx is a legacy driver we can safely only disable the plane with atomic. If this commit is rejected by the driver then we will still fall back to the old behavior and turn off the crtc. v2: - Remove plane->fb assignment, done by drm_atomic_clean_old_fb. - Add WARN_ON when atomic_remove_fb fails. - Always call drm_atomic_state_put. v3: - Use drm_drv_uses_atomic_modeset - Handle the case where the first plane-disable-only commit fails with -EINVAL. Some drivers do not support this, fall back to disabling all crtc's in this case. Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/66fc3da5-697b-1613-0a67-a5293209f0dc@linux.intel.com drivers/gpu/drm/drm_atomic.c | 106 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_framebuffer.c | 7 +++ 3 files changed, 114 insertions(+) commit b30a7d1fc96d60fe2c02e375a56a046385701d17 Author: Arnaldo Carvalho de Melo Date: Wed Feb 15 10:06:20 2017 -0300 perf pmu: Fix check for unset alias->unit array The alias->unit field is an array, so to check that it is not set we should see if it is an empty string, i.e. alias->unit[0], instead of checking alias->unit != NULL, as this will _always_ evaluate to 'true'. Pointed out by clang. Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20170214182435.GD4458@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffe7afd1713558d73483834c2e2d03a1e39a4062 Author: Mark Rutland Date: Thu Feb 9 15:19:21 2017 +0000 arm64/kprobes: consistently handle MRS/MSR with XZR Now that we have XZR-safe helpers for fiddling with registers, use these in the arm64 kprobes code rather than open-coding the logic. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/probes/simulate-insn.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 521c646108ed199d19c5c73978aaca3e18ca8f81 Author: Mark Rutland Date: Thu Feb 9 15:19:20 2017 +0000 arm64: cpufeature: correctly handle MRS to XZR In emulate_mrs() we may erroneously write back to the user SP rather than XZR if we trap an MRS instruction where Xt == 31. Use the new pt_regs_write_reg() helper to handle this correctly. Signed-off-by: Mark Rutland Fixes: 77c97b4ee21290f5 ("arm64: cpufeature: Expose CPUID registers by emulation") Cc: Andre Przywara Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b6e70fccff27121430114b4507f0adfb790752f Author: Mark Rutland Date: Thu Feb 9 15:19:19 2017 +0000 arm64: traps: correctly handle MRS/MSR with XZR Currently we hand-roll XZR-safe register handling in user_cache_maint_handler(), though we forget to do the same in ctr_read_handler(), and may erroneously write back to the user SP rather than XZR. Use the new helpers to handle these cases correctly and consistently. Signed-off-by: Mark Rutland Fixes: 116c81f427ff6c53 ("arm64: Work around systems with mismatched cache line sizes") Cc: Andre Przywara Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c23e2ff7013be2c4bbcb7b9b3cc27c763348223 Author: Mark Rutland Date: Thu Feb 9 15:19:18 2017 +0000 arm64: ptrace: add XZR-safe regs accessors In A64, XZR and the SP share the same encoding (31), and whether an instruction accesses XZR or SP for a particular register parameter depends on the definition of the instruction. We store the SP in pt_regs::regs[31], and thus when emulating instructions, we must be careful to not erroneously read from or write back to the saved SP. Unfortunately, we often fail to be this careful. In all cases, instructions using a transfer register parameter Xt use this to refer to XZR rather than SP. This patch adds helpers so that we can more easily and consistently handle these cases. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/ptrace.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f705d954634d161db5923fc86cacf0f9e301f73a Author: Arnd Bergmann Date: Tue Feb 14 22:32:58 2017 +0100 arm64: include asm/assembler.h in entry-ftrace.S In a randconfig build I ran into this build error: arch/arm64/kernel/entry-ftrace.S: Assembler messages: arch/arm64/kernel/entry-ftrace.S:101: Error: unknown mnemonic `ldr_l' -- `ldr_l x2,ftrace_trace_function' The macro is defined in asm/assembler.h, so we should include that file. Fixes: 829d2bd13392 ("arm64: entry-ftrace.S: avoid open-coded {adr,ldr}_l") Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon arch/arm64/kernel/entry-ftrace.S | 1 + 1 file changed, 1 insertion(+) commit 12f043ff2b28fa64c9123b454cbe30a8a9e1967e Author: Arnd Bergmann Date: Tue Feb 14 22:27:01 2017 +0100 arm64: fix warning about swapper_pg_dir overflow With 4 levels of 16KB pages, we get this warning about the fact that we are copying a whole page into an array that is declared as having only two pointers for the top level of the page table: arch/arm64/mm/mmu.c: In function 'paging_init': arch/arm64/mm/mmu.c:528:2: error: 'memcpy' writing 16384 bytes into a region of size 16 overflows the destination [-Werror=stringop-overflow=] This is harmless since we actually reserve a whole page in the definition of the array that comes from, and just the extern declaration is short. The pgdir is initialized to zero either way, so copying the actual entries here seems like the best solution. Acked-by: Ard Biesheuvel Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee10689117c0186fd4fe7feca8d48c7316f65d70 Merge: 8ef81a9 5982f08 Author: Paolo Bonzini Date: Wed Feb 15 12:30:20 2017 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD This brings in two fixes for potential host crashes, from Ben Herrenschmidt and Nick Piggin. commit 10d4cf188ab26a4ebeee4c914e82acd5edd9f0ff Author: Rashmica Gupta Date: Thu Jun 2 14:29:47 2016 +1000 powerpc/asm: Define STACK_PT_REGS_OFFSET macro in asm-offsets.c There are quite a few entries in asm-offests.c which look like: DEFINE(REG, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, reg)); So define a macro to do it once. Signed-off-by: Rashmica Gupta [mpe: Rename to STACK_PT_REGS_OFFSET for excruciating explicitness] Signed-off-by: Michael Ellerman arch/powerpc/kernel/asm-offsets.c | 61 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit 454656155110603e88b83eec847d5293a30bb96e Author: Rashmica Gupta Date: Wed Feb 15 21:41:20 2017 +1100 powerpc/asm: Use OFFSET macro in asm-offsets.c A lot of entries in asm-offests.c look like this: DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); But there is a common macro, OFFSET, which makes this cleaner: OFFSET(TI_flags, thread_info, flags) So use it. Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman arch/powerpc/kernel/asm-offsets.c | 711 ++++++++++++++++++-------------------- 1 file changed, 340 insertions(+), 371 deletions(-) commit 8c7cdbf9272c300dc093da3c62fa3b4bc6dc960e Author: Shawn Lin Date: Wed Feb 15 16:36:47 2017 +0800 mmc: core: add mmc prefix for blk_fixups That makes all the quirks table look more consistent. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- drivers/mmc/core/quirks.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0e9cfcf44e4aced8d45f409dcb48a0994fa77979 Author: Shawn Lin Date: Wed Feb 15 16:35:31 2017 +0800 mmc: core: move all quirks together into quirks.h It's not appreciated to place quirks everywhere, let's put them together just like what we do for USB, PCI etc. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 80 ----------------------------------------- drivers/mmc/core/mmc.c | 11 ------ drivers/mmc/core/quirks.h | 91 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 91 deletions(-) commit 1144c1e4ddab9339e262e2702744e8f5c6220824 Author: Shawn Lin Date: Wed Feb 15 16:35:30 2017 +0800 mmc: core: improve the quirks for sdio devices Rename mmc_fixup_methods to sdio_fixup_methods to better reflect that it's for sdio devices. So we could also pass on it from sdio card's probe sequence just like what we do for eMMC and block there. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/quirks.h | 6 +----- drivers/mmc/core/sdio.c | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) commit 884f38607897cb4a963ea8a65296f0973a2828d0 Author: Shawn Lin Date: Wed Feb 15 16:35:29 2017 +0800 mmc: core: move some sdio IDs out of quirks file Consolidate all the sdio devices' IDs into sdio_ids. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/quirks.h | 20 -------------------- include/linux/mmc/sdio_ids.h | 7 +++++++ 2 files changed, 7 insertions(+), 20 deletions(-) commit 28fc64af63488d701184977481b263f31d856984 Author: Shawn Lin Date: Wed Feb 15 16:35:28 2017 +0800 mmc: core: change quirks.c to be a header file Rename quirks.c to quirks.h, and include it for individual C files which need it. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/Makefile | 2 +- drivers/mmc/core/block.c | 1 + drivers/mmc/core/card.h | 2 -- drivers/mmc/core/mmc.c | 1 + drivers/mmc/core/quirks.c | 85 ----------------------------------------------- drivers/mmc/core/quirks.h | 81 ++++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/sdio.c | 1 + 7 files changed, 85 insertions(+), 88 deletions(-) commit 4e03f628b464e0580abadf5161eaa38c61d20943 Author: Masahiro Yamada Date: Tue Feb 14 20:05:40 2017 +0900 mmc: sdhci-cadence: fix bit shift of read data from PHY port This macro is currently unused, but it may be useful for debug use. Fix it just in case. Fixes: ff6af28faff5 ("mmc: sdhci-cadence: add Cadence SD4HC support") Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9050d50e2244331f3095e86eca899ac624fdb38f Author: Hauke Mehrtens Date: Tue Dec 27 16:31:43 2016 +0100 MIPS: lantiq: Set physical_memsize physical_memsize is needed by the vpe loader code and the platform specific code has to define it. This value will be given to the firmware loaded with the VPE loader. I am not aware of any standard interface or better value to provide here. Reported-by: kbuild test robot Fixes: d9ae4f18c0d2 ("MIPS: Lantiq: Activate more drivers in default configuration") Signed-off-by: Hauke Mehrtens Cc: Ralf Baechle Cc: John Crispin Cc: Paul Gortmaker Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14908/ Signed-off-by: James Hogan arch/mips/lantiq/prom.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7785bba299a8dc8fe8390a0183dad3cafb3f1d80 Author: Steffen Klassert Date: Wed Feb 15 09:40:00 2017 +0100 esp: Add a software GRO codepath This patch adds GRO ifrastructure and callbacks for ESP on ipv4 and ipv6. In case the GRO layer detects an ESP packet, the esp{4,6}_gro_receive() function does a xfrm state lookup and calls the xfrm input layer if it finds a matching state. The packet will be decapsulated and reinjected it into layer 2. Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/ipv4/Kconfig | 13 +++++ net/ipv4/Makefile | 1 + net/ipv4/esp4_offload.c | 106 +++++++++++++++++++++++++++++++++++++++ net/ipv4/xfrm4_input.c | 6 +++ net/ipv4/xfrm4_mode_transport.c | 4 +- net/ipv6/Kconfig | 13 +++++ net/ipv6/Makefile | 1 + net/ipv6/esp6_offload.c | 108 ++++++++++++++++++++++++++++++++++++++++ net/ipv6/xfrm6_input.c | 7 +++ net/ipv6/xfrm6_mode_transport.c | 4 +- net/xfrm/xfrm_input.c | 31 ++++++++++-- 12 files changed, 288 insertions(+), 7 deletions(-) commit 54ef207ac8f7a17d677082157a29f4df8499dc81 Author: Steffen Klassert Date: Wed Feb 15 09:39:54 2017 +0100 xfrm: Extend the sec_path for IPsec offloading We need to keep per packet offloading informations across the layers. So we extend the sec_path to carry these for the input and output offload codepath. Signed-off-by: Steffen Klassert include/net/xfrm.h | 41 +++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_input.c | 2 ++ 2 files changed, 43 insertions(+) commit 7d7be3aa08fa338e84eb235805ee18f2fab85a46 Author: Al Viro Date: Fri Dec 4 17:30:31 2015 +0000 powerpc/spufs: Get rid of broken fasync stuff In all the years it's been in the tree it had never been used by anything - it would instantly trigger BUG_ON() in fs/fcntl.c due to bogus band argument (ie. POLLIN not POLL_IN) passed to kill_fasync(). Since nobody had ever used it in ten years, let's just rip it out and be done with that. Signed-off-by: Al Viro Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/spufs/file.c | 65 +++---------------------------- arch/powerpc/platforms/cell/spufs/spufs.h | 3 -- 2 files changed, 6 insertions(+), 62 deletions(-) commit 0d2b5cdc76ff7eef9d727c2e802213ec15d5e94f Author: Michael Ellerman Date: Wed Feb 15 20:24:25 2017 +1100 powerpc/64e: Fix bogus usage of WARN_ONCE() WARN_ONCE() takes a condition and a format string. We were passing a constant string as the condition, and the function name as the format string. It would work, but the message would be just the function name. Fix it by just using WARN_ONCE() directly instead of if (x) WARN_ONCE(). Noticed-by: Geliang Tang Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit c9f1e32600816d695f817477d56490bfc2ba43c6 Author: Christian Lamparter Date: Tue Feb 14 20:10:30 2017 +0100 ath9k: use correct OTP register offsets for the AR9340 and AR9550 This patch fixes the OTP register definitions for the AR934x and AR9550 WMAC SoC. Previously, the ath9k driver was unable to initialize the integrated WMAC on an Aerohive AP121: | ath: phy0: timeout (1000 us) on reg 0x30018: 0xbadc0ffe & 0x00000007 != 0x00000004 | ath: phy0: timeout (1000 us) on reg 0x30018: 0xbadc0ffe & 0x00000007 != 0x00000004 | ath: phy0: Unable to initialize hardware; initialization status: -5 | ath9k ar934x_wmac: failed to initialize device | ath9k: probe of ar934x_wmac failed with error -5 It turns out that the AR9300_OTP_STATUS and AR9300_OTP_DATA definitions contain a typo. Cc: Gabor Juhos Cc: stable@vger.kernel.org Fixes: add295a4afbdf5852d0 "ath9k: use correct OTP register offsets for AR9550" Signed-off-by: Christian Lamparter Signed-off-by: Chris Blake Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7272416609126e8910b7f0d0e3dba008aa87830c Author: Arnd Bergmann Date: Tue Feb 14 22:28:33 2017 +0100 rt2500usb: don't mark register accesses as inline When CONFIG_KASAN is set, we get a rather large stack here: drivers/net/wireless/ralink/rt2x00/rt2500usb.c: In function 'rt2500usb_set_device_state': drivers/net/wireless/ralink/rt2x00/rt2500usb.c:1074:1: error: the frame size of 3032 bytes is larger than 100 bytes [-Werror=frame-larger-than=] If we don't force those functions to be inline, the compiler can figure this out better itself and not inline the functions when doing so would be harmful, reducing the stack size to a merge 256 bytes. Note that there is another problem that manifests in this driver, as a result of the typecheck() macro causing even larger stack frames. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 91b632803ee4e47c5a5c4dc3d8bf5abf9c16107a Author: Tobias Klauser Date: Mon Feb 13 11:14:09 2017 +0100 brcmfmac: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct brcm_if, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 26 +++++++--------------- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 -- 2 files changed, 8 insertions(+), 20 deletions(-) commit b686784d03e66f8515198de4850d1e372b729880 Author: Larry Finger Date: Sat Feb 11 18:46:05 2017 -0600 rtlwifi: btcoexist: Fix if == else warnings in halbtc8723b1ant.c The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1875:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:2253:3-5: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger Cc: Julia Lawall Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) commit 42e74946f016520a700085bc89e6250c71bb61b6 Author: Larry Finger Date: Sat Feb 11 18:46:04 2017 -0600 rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a1ant.c The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1771:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:2126:3-5: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger Cc: Julia Lawall Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit ac0ca72c6f53ccbbe50b0af9e1de0577da1cb667 Author: Larry Finger Date: Sat Feb 11 18:46:03 2017 -0600 rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a2ant.c The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3023:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3035:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3037:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3047:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3075:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3085:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3129:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3141:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3143:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3153:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3179:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3181:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3192:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2677:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2833:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2847:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2857:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2885:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2895:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2940:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2788:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2391:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2417:2-4: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger Cc: Julia Lawall Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 185 +++------------------ 1 file changed, 24 insertions(+), 161 deletions(-) commit 2447e2cad75239ae407c0f98acf12511354208c5 Author: Brian Norris Date: Fri Feb 10 13:55:25 2017 -0800 mwifiex: don't enable/disable IRQ 0 during suspend/resume If we don't have an out-of-band wakeup IRQ configured through DT (as most platforms don't), then we fall out of this function with 'irq_wakeup == 0'. Other code (e.g., mwifiex_disable_wake() and mwifiex_enable_wake()) treats 'irq_wakeup >= 0' as a valid IRQ, and so we end up calling {enable,disable}_irq() on IRQ 0. That seems bad, so let's not do that. Same problem as fixed in this patch: https://patchwork.kernel.org/patch/9531693/ [PATCH v2 2/3] btmrvl: set irq_bt to -1 when failed to parse it with the difference that: (a) this one is actually a regression and (b) this affects both device tree and non-device-tree systems While fixing the regression, also drop the verbosity on the parse failure, so we don't see this when a DT node is present but doesn't have an interrupt property (this is perfectly legal): [ 21.999000] mwifiex_pcie 0000:01:00.0: fail to parse irq_wakeup from device tree Fixes: 853402a00823 ("mwifiex: Enable WoWLAN for both sdio and pcie") Signed-off-by: Brian Norris Acked-by: Rajat Jain Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a6282045b228f6de6abced74b793c71178fb948 Author: Tobias Klauser Date: Fri Feb 10 14:03:13 2017 +0100 orinoco: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct orinoco_private, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/main.c | 27 ++++++---------------- drivers/net/wireless/intersil/orinoco/orinoco.h | 2 -- .../net/wireless/intersil/orinoco/orinoco_usb.c | 6 ++--- 3 files changed, 9 insertions(+), 26 deletions(-) commit 7546bba385b4eb746fcb2ea972abe96efb44edb8 Author: Julia Lawall Date: Thu Feb 9 21:12:51 2017 +0100 rtlwifi: btcoexist: fix semicolon.cocci warnings Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Larry Finger Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f8665320fa1a232fda22bcc7f88daeb83628385 Author: Iain Hunter Date: Thu Feb 9 14:37:28 2017 +0000 wlcore: disable multicast filter in AP mode Enable AP support for allmulticast for MDNS. It can be enabled by bringing up the interface with ip command with argument allmulticast on Signed-off-by: Iain Hunter Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 454593e54cac126a0f49d4b65f90a5e518c51404 Author: Gavin Shan Date: Wed Jan 11 11:50:08 2017 +1100 drivers/pci/hotplug: Mask PDC interrupt if required We're supporting surprise hotplug on PCI slots behind root port or PCIe switch downstream ports, which don't claim the capability in hardware register (offset: PCIe cap + PCI_EXP_SLTCAP). PEX8718 is one of the examples. For those PCI slots, the PDC (Presence Detection Change) event isn't reliable and the underly (skiboot) firmware has best judgement. This masks the PDC event when skiboot requests by "ibm,slot-broken-pdc" property in PCI slot's device-tree node. Reported-by: Hank Chang Signed-off-by: Gavin Shan Tested-by: Willie Liauw Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pnv-pci.h | 2 ++ drivers/pci/hotplug/pnv_php.c | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) commit d0c424971f70501ec0a0364117b9934db039c9cc Author: Gavin Shan Date: Wed Jan 11 11:50:07 2017 +1100 drivers/pci/hotplug: Fix initial state for empty slot In PowerNV PCI hotplug driver, the initial PCI slot's state is set to PNV_PHP_STATE_POPULATED if no PCI devices are connected to the slot. The PCI devices that are hot added to the slot won't be probed and populated because of the check in pnv_php_enable(): /* Check if the slot has been configured */ if (php_slot->state != PNV_PHP_STATE_REGISTERED) return 0; This fixes the issue by leaving the slot in PNV_PHP_STATE_REGISTERED state initially if nothing is connected to the slot. Fixes: 360aebd85a4 ("drivers/pci/hotplug: Support surprise hotplug in powernv driver") Cc: stable@vger.kernel.org #v4.9+ Reported-by: Hank Chang Signed-off-by: Gavin Shan Tested-by: Willie Liauw Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit d7d55536c6cd1f80295b6d7483ad0587b148bde4 Author: Gavin Shan Date: Wed Jan 11 11:50:06 2017 +1100 drivers/pci/hotplug: Handle presence detection change properly The surprise hotplug is driven by interrupt in PowerNV PCI hotplug driver. In the interrupt handler, pnv_php_interrupt(), we bail when pnv_pci_get_presence_state() returns zero wrongly. It causes the presence change event is always ignored incorrectly. This fixes the issue by bailing on error (non-zero value) returned from pnv_pci_get_presence_state(). Fixes: 360aebd85a4 ("drivers/pci/hotplug: Support surprise hotplug in powernv driver") Cc: stable@vger.kernel.org #v4.9+ Reported-by: Hank Chang Signed-off-by: Gavin Shan Tested-by: Willie Liauw Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5b102782c7f460d88b42d504c78755eeb030894a Author: Balbir Singh Date: Thu Feb 2 10:33:44 2017 +0530 powerpc/xmon: Enable disassembly files (compilation changes) After updating ppc-dis.c, ppc-opc.c and ppc.h the following changes were made to enable compilation and working of xmon: 1. Remove all disassembler_info 2. Use xmon's printf/print_address to output data and addresses respectively. 3. All bfd_* types and casts have been removed. 4. Optimizations related to opcd_indices have been removed. 5. The dialect is set based on cpu features. 6. PPC_OPCODE_CLASSIC is no longer supported in the new disassembler. 7. VLE opcode parsing and printing has been stripped. 8. Coding style conventions used for those routines has been retained and it does not match our CodingStyle. 9. The highest supported dialect is POWER9. 10. Defined ATTRIBUTE_UNUSED in ppc-dis.c. 11. Defined _(x) in ppc-dis.c. Finally, we remove the dependency on BROKEN so that XMON_DISASSEMBLY can be enabled again. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/Kconfig.debug | 1 - arch/powerpc/xmon/ppc-dis.c | 592 ++++---------------------------------------- arch/powerpc/xmon/ppc-opc.c | 12 +- arch/powerpc/xmon/ppc.h | 2 - 4 files changed, 60 insertions(+), 547 deletions(-) commit 08d96e0b127e07c3b90e10f1939caf70b456793e Author: Balbir Singh Date: Thu Feb 2 10:33:43 2017 +0530 powerpc/xmon: Apply binutils changes to upgrade disassembly The following commit-ids from the binutils project were applied on the xmon branch and relicensed with the permission of the authors under GPLv2 for the following files: ppc-opc.c ppc-dis.c ppc.h Working off of binutils commit 65b650b4c746 we have now moved up to binutils commit a5721ba270dd. Some commit logs have been taken verbatim, some are summarized for ease of understanding. Here is a summary of the commits: 33e8d5ac613d PPC7450 New. (powerpc_opcodes): Use it in dcba. c3d65c1ced61 New opcodes and mask 8dbcd839b1bb Instruction Sorting 91eb7075e370 (powerpc_opcodes): Fix the first two operands of dquaiq. 548b1dcfcbab ppc-opc.c (powerpc_opcodes): Remove the dcffix and dcffix. 930bb4cfae30 Support optional L form mtmsr. de866fccd87d (powerpc_opcodes): Order and format. 19a6653ce8c6 ppc e500mc support fa452fa6833c (ppc_cpu_t): New typedef. c8187e1509b2 (parse_cpu): Handle -m464. 081ba1b3c08b Define. (PPC_OPERAND_FSL, PPC_OPERAND_FCR, PPC_OPERAND_UDI) 9b4e57660d38 Rename altivec_or_spe to retain_flags. Handle -mvsx and -mpower7. 899d85beadd0 (powerpc_opcodes): Enable rfci, mfpmr, mtpmr for e300. e1c93c699b7d (extract_sprg): Correct operand range check. 2f3bb96af796 (powerpc_init_dialect): Do not set PPC_OPCODE_BOOKE 1cb0a7674666 (ppc_setup_opcodes): Remove PPC_OPCODE_NOPOWER4 test 21169fcfadfa (print_insn_powerpc): Skip insn if it is deprecated 80890a619b85 ("dcbt", "dcbtst") 0e55be1624c2 ("lfdepx", "stfdepx") 066be9f7bd8e (parse_cpu): Extend -mpower7 to accept power7 and isel instructions. c72ab5f2c55d (powerpc_opcodes): Reorder the opcode table so that instructions 69fe9ce501f5 (ppc_parse_cpu): New function. (powerpc_init_dialect) e401b04ca7cd (powerpc_opcodes) <"dcbzl">: Merge the POWER4 and E500MC entries. 70dc4e324b9a (powerpc_init_dialect): Do not choose a default dialect due to -many/-Many. 858d7a6db20b (powerpc_opcodes) <"tlbilxlpid", "tlbilxpid", "tlbilxva", "tlbilx" bdc7fcfe59f1 (powerpc_macros ): Allow n+b of 64 e0d602ecffb0 (md_show_usage): Document -mpcca2 b961e85b6ebe (ppc_cpu_t): Typedef to uint64_t 8765b5569284 (powerpc_opcodes): Remove support for the the "lxsdux", "lxvd2ux" 634b50f2a623 Rename "ppca2" to "a2" 9fe54b1ca1c0 (md_show_usage): Document -m476 0dc9305793c8 Add bfd_mach_ppc_e500mc64 ce3d2015b21b Define. bfd/ * archures.c (bfd_mach_ppc_titan) cdc51b0748c4 Add -mpwr4, -mpwr5, -mpwr5x, -mpwr6 and -mpwr7 63d0fa4e9e57 Add PPC_OPCODE_E500MC for "e500mc64" cee62821d472 New Define. ("dccci"): Enable for PPCA2 85d4ac0b3c0b Correct wclr encoding. 51b5d4a8c5e5 (powerpc_opcodes): Enable divdeu, devweu, divde, divwe, divdeuo e01d869a3be2 (md_assemble): Emit APUinfo section for PPC_OPCODE_E500 09a8ad8d8f56 (powerpc_opcodes): Revert deprecation of mfocrf, mtcrf and mtocrf on EFS. f2bae120dcef (PPC_OPCODE_COMMON): Expand comment. 81a0b7e2ae09 (PPCPWR2): Add PPC_OPCODE_COMMON. (powerpc_opcodes): Add "subc" bdc70b4a03fd (PPC_OPCODE_32, PPC_OPCODE_BOOKE64, PPC_OPCODE_CLASSIC) 7102e95e4943 (ppc_set_cpu): Cast PPC_OPCODE_xxx to ppc_cpu_t before inverting f383de6633cb (powerpc_opcodes) [lswx,lswi,stswx,stswi]: Deprecate on E500 and E500MC 6b069ee70de3 Remove PPC_OPCODE_PPCPS 2f7f77101279 (powerpc_opcodes): Enable icswx for POWER7 989993d80a97 (insert_nbi, insert_rbx, FRAp, FRBp, FRSp, FRTp, NBI, RAX, RBX) a08fc94222d1 : New extended mnemonics 588925d06545 : Use PPC_OPERAND_GPR 8baf7b78b5d9 <"lswx">: Use RAX for the second and RBX for the third operand e67ed0e885d6 Changed opcode for vabsdub, vabsduh, vabsduw, mviwsplt fb048c26f19f (UIMM4, UIMM3, UIMM2, VXVA_MASK, VXVB_MASK, VXVAVB_MASK, VXVDVA_MASK 382c72e90441 (VXASHB_MASK): New define c7a5aa9c64fc (ppc_opts) : Use PPC_OPCODE_ALTIVEC2 ab4437c3224f : Fix opcode spelling 62082a42b9cd "lfdp" and "stfdp" use DS offset. 776fc41826bb (ppc_parse_cpu): Update prototype 943d398f4c52 (insert_sci8, extract_sci8): Rewrite. 5817ffd1f81c New define (PPC_OPCODE_HTM/POWER8) 9f0682fe89d9 (extract_vlesi): Properly sign extend c0637f3af686 (powerpc_init_dialect): Set default dialect to power8. 58ae08f29af8 (powerpc_opcodes): Add tdui, twui, tdu, twu, tui, tu 4f6ffcd38d90 (powerpc_init_dialect): Use ppc_parse_cpu() to set dialect 4b95cf5c0c75 Update copyright years a47622ac1bad Allow both signed and unsigned fields in PowerPC cmpli insn 12e87fac5c76 ppc: enable msgclr and msgsnd on Power8 8514e4db84cc Don't deprecate powerpc mftb insn db76a70026ab Power4 should treat mftb as extended mfspr mnemonic b90efa5b79ac ChangeLog rotatation and copyright year update c4e676f19656 powerpc: Add slbfee. instruction 27c49e9a8fc0 powerpc: Only initialise opcode indices once 4fff86c517ab DCBT_EO): New define 4bc0608a8b69 Fix some PPC assembler errors dc302c00611b Add hwsync extended mnemonic 99a2c5612124 Remove unused MTMSRD_L macro and re-add accidentally deleted comment 11a0cf2ec0ed Allow for optional operands with non-zero default values 7b9341139a69 PPC sync instruction accepts invalid and incompatible operands ef5a96d564a2 Remove ppc860, ppc750cl, ppc7450 insns from common ppc 43e65147c07b Remove trailing spaces in opcodes 6dca4fd141fd Add dscr and ctrl SPR mnemonics b6518b387185 Fix compile time warnings generated when compiling with clang 36f7a9411dcd Patches for illegal ppc 500 instructions a680de9a980e Add assembler, disassembler and linker support for power9 dd2887fc3de4 Reorder some power9 insns b817670b52b7 Enable 2 operand form of powerpc mfcr with -many 6f2750feaf28 Copyright update for binutils afa8d4054b8e Delete opcodes that have been removed from ISA 3.0 1178da445ad5 Accept valid one byte signed and unsigned values for the IMM8 operand e43de63c8fd1 Fix powerpc subis range 514e58b72633 Correct "Fix powerpc subis range" 19dfcc89e8d9 Add support for new POWER ISA 3.0 instructions 1fe0971e41a4 add more extern C 026122a67044 Re-add support for lbarx, lharx, stbcx. and sthcx. insns back to the E6500 cpu 14b57c7c6a53 PowerPC VLE 6fd3a02da554 Add support for yet some more new ISA 3.0 instructions dfdaec14b0db Fix some PowerPC VLE BFD issues and add some PowerPC VLE instructions fd486b633e87 Modify POWER9 support to match final ISA 3.0 documentation a5721ba270dd Disallow 3-operand cmp[l][i] for ppc64 This updates the disassembly capabilities to add support for newer processors. Signed-off-by: Balbir Singh [mpe: Reformat commit list for brevity] Signed-off-by: Michael Ellerman arch/powerpc/xmon/ppc-dis.c | 710 +++- arch/powerpc/xmon/ppc-opc.c | 8591 ++++++++++++++++++++++++++++--------------- arch/powerpc/xmon/ppc.h | 222 +- 3 files changed, 6310 insertions(+), 3213 deletions(-) commit 438e69b52be776c035aa2a851ccc1709033d729b Author: Aneesh Kumar K.V Date: Thu Feb 9 08:28:21 2017 +0530 powerpc/mm/radix: Skip ptesync in pte update helpers We do them at the start of tlb flush, and we are sure a pte update will be followed by a tlbflush. Hence we can skip the ptesync in pte update helpers. Signed-off-by: Aneesh Kumar K.V Tested-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 3 --- 1 file changed, 3 deletions(-) commit cc7639ce18b950086c7b06e00350652db3732183 Author: Balbir Singh Date: Thu Feb 2 10:33:42 2017 +0530 powerpc/xmon: Update ppc-dis/opc.c and ppc.h Upgrade ppc-opc.c, ppc-dis.c and ppc.h to the versions belonging to the following binutils commit: 65b650b4c7463f4508bed523c24ab0031a5ae5cd * ppc-dis.c (print_insn_powerpc): Don't skip all operands after setting skip_optional. That is the last version of those files that were licensed under GPLv2. This leaves the code in a state that does not compile, because the binutils code needs to be tweaked to work in the kernel. We don't fix that in this commit, because we want to import more binutils changes in subsequent commits. So for now we mark XMON_DISASSEMBLY as BROKEN, so it can't be built. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/Kconfig.debug | 1 + arch/powerpc/xmon/ppc-dis.c | 272 ++++++++++++++--- arch/powerpc/xmon/ppc-opc.c | 728 ++++++++++++++------------------------------ arch/powerpc/xmon/ppc.h | 62 ++-- 4 files changed, 493 insertions(+), 570 deletions(-) commit f4894b80b1ddfef00d4d2e5c58613ccef358a1b2 Author: Aneesh Kumar K.V Date: Thu Feb 9 08:28:20 2017 +0530 powerpc/mm/radix: Use ptep_get_and_clear_full when clearing pte for full mm This helps us to do some optimization for application exit case, where we can skip the DD1 style pte update sequence. Signed-off-by: Aneesh Kumar K.V Tested-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 17 +++++++++++++++++ arch/powerpc/include/asm/book3s/64/radix.h | 23 ++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit ca94573b9c69d224e50e1084a2776772f4ea030d Author: Aneesh Kumar K.V Date: Thu Feb 9 08:28:19 2017 +0530 powerpc/mm/radix: Update pte update sequence for pte clear case In the kernel we do follow the below sequence in different code paths. pte = ptep_get_clear(ptep) .... set_pte_at(ptep, pte) We do that for mremap, autonuma protection update and softdirty clearing. This implies our optimization to skip a tlb flush when clearing a pte update is not valid, because for DD1 system that followup set_pte_at will be done witout doing the required tlbflush. Fix that by always doing the dd1 style pte update irrespective of new_pte value. In a later patch we will optimize the application exit case. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Tested-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 18061c17c8ecdbdbf1e7d1695ec44e7388b4f601 Author: Aneesh Kumar K.V Date: Mon Jan 30 21:42:59 2017 +0530 powerpc/mm: Update PROTFAULT handling in the page fault path With radix, we can get page fault with DSISR_PROTFAULT value set in case of PROT_NONE or autonuma mapping. The PROT_NONE case in handled by the vma check where we consider the access bad. For autonuma we should fall through and fixup the access mask correctly. Without this patch we trigger the WARN_ON() on radix. This code moves that WARN_ON() within a radix_enabled() check. I also moved the WARN_ON() outside the if condition making it apply for all type of faults (exec/write/read). It is also conditionalized for book3s, because BOOK3E can also get a PROTFAULT to handle the D/I cache sync. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/copro_fault.c | 10 ++++++---- arch/powerpc/mm/fault.c | 43 +++++++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 14 deletions(-) commit c21a493a2b44650707d06741601894329486f2ad Author: Ravi Bangoria Date: Tue Nov 22 14:55:59 2016 +0530 powerpc/xmon: Fix data-breakpoint Currently xmon data-breakpoint feature is broken. Whenever there is a watchpoint match occurs, hw_breakpoint_handler will be called by do_break via notifier chains mechanism. If watchpoint is registered by xmon, hw_breakpoint_handler won't find any associated perf_event and returns immediately with NOTIFY_STOP. Similarly, do_break also returns without notifying to xmon. Solve this by returning NOTIFY_DONE when hw_breakpoint_handler does not find any perf_event associated with matched watchpoint, rather than NOTIFY_STOP, which tells the core code to continue calling the other breakpoint handlers including the xmon one. Cc: stable@vger.kernel.org Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman arch/powerpc/kernel/hw_breakpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 36b390fd624a7f3a64bda5de54fa58ebcf956ffc Author: Michael Ellerman Date: Wed Feb 15 19:54:55 2017 +1100 powerpc/mm: Fix build break with BOOK3S_64=n and MEMORY_HOTPLUG=y The recently merged HPT (Hash Page Table) resize support broke the build when BOOK3S_64=n (ie. 32-bit or 64-bit Book3E) and MEMORY_HOTPLUG=y: arch/powerpc/mm/mem.o: In function `.arch_add_memory': (.text+0x4e4): undefined reference to `.resize_hpt_for_hotplug' Fix it by adding a dummy version. Fixes: 438cc81a41e8 ("powerpc/pseries: Automatically resize HPT for memory hot add/remove") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sparsemem.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1e29537034e388c7e72eac43cfcda1d23131623b Author: Steffen Klassert Date: Wed Feb 15 09:39:49 2017 +0100 xfrm: Export xfrm_parse_spi. We need it in the ESP offload handlers, so export it. Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/xfrm/xfrm_input.c | 1 + 2 files changed, 2 insertions(+) commit 25393d3fc055b76587fcc91627aee8c345400c3a Author: Steffen Klassert Date: Wed Feb 15 09:39:44 2017 +0100 net: Prepare gro for packet consuming gro callbacks The upcomming IPsec ESP gro callbacks will consume the skb, so prepare for that. Signed-off-by: Steffen Klassert include/linux/netdevice.h | 9 +++++++++ net/core/dev.c | 7 +++++++ net/xfrm/Kconfig | 4 ++++ 3 files changed, 20 insertions(+) commit 5f114163f2f5eb2edbb49c4d3e0b405c7a8a7e2a Author: Steffen Klassert Date: Wed Feb 15 09:39:39 2017 +0100 net: Add a skb_gro_flush_final helper. Add a skb_gro_flush_final helper to prepare for consuming skbs in call_gro_receive. We will extend this helper to not touch the skb if the skb is consumed by a gro callback with a followup patch. We need this to handle the upcomming IPsec ESP callbacks as they reinject the skb to the napi_gro_receive asynchronous. The handler is used in all gro_receive functions that can call the ESP gro handlers. Signed-off-by: Steffen Klassert include/linux/netdevice.h | 5 +++++ net/ethernet/eth.c | 2 +- net/ipv4/af_inet.c | 2 +- net/ipv6/ip6_offload.c | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) commit b0fcee825c0ad05057a97d1f4685e1b9e9d00c53 Author: Steffen Klassert Date: Wed Feb 15 09:39:24 2017 +0100 xfrm: Add a secpath_set helper. Add a new helper to set the secpath to the skb. This avoids code duplication, as this is used in multiple places. Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/ipv6/xfrm6_input.c | 15 +++------------ net/xfrm/xfrm_input.c | 34 ++++++++++++++++++++++------------ 3 files changed, 26 insertions(+), 24 deletions(-) commit 2ba3e6e8afc9b6188b471f27cf2b5e3cf34e7af2 Author: Theodore Ts'o Date: Wed Feb 15 01:26:39 2017 -0500 ext4: fix fencepost in s_first_meta_bg validation It is OK for s_first_meta_bg to be equal to the number of block group descriptor blocks. (It rarely happens, but it shouldn't cause any problems.) https://bugzilla.kernel.org/show_bug.cgi?id=194567 Fixes: 3a4b77cd47bb837b8557595ec7425f281f2ca1fe Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcd36c436c9c1c5052be6bc2a9200e4e6dfbd267 Author: Rob Rice Date: Tue Feb 14 12:45:52 2017 -0500 crypto: brcm - Avoid double free in ahash_finup() In Broadcom SPU driver, in case where incremental hash is done in software in ahash_finup(), tmpbuf was freed twice. Reported-by: Dan Carpenter Signed-off-by: Rob Rice Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 1 - 1 file changed, 1 deletion(-) commit eafa26696a648f974942e12f42460abff80a646d Author: Arnd Bergmann Date: Tue Feb 14 18:07:31 2017 +0100 crypto: cavium - fix Kconfig dependencies The driver fails to build if MSI support is disabled: In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0: drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry' struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS]; ^~~~~~~~~~~~ drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix': drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration] On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER, so let's allow compile-testing to catch this kind of problem more easily. The 64-bit dependency is needed for the use of readq/writeq. Signed-off-by: Arnd Bergmann Acked-by: David Daney Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ecb7d62bf8ef34325fa55e8cf167610ed7abe83 Author: George Cherian Date: Tue Feb 14 09:23:17 2017 +0000 crypto: cavium - cpt_bind_vq_to_grp could return an error code cpt_bind_vq_to_grp() could return an error code. However, it currently returns a u8. This produce the static checker warning. drivers/crypto/cavium/cpt/cptpf_mbox.c:70 cpt_bind_vq_to_grp() warn: signedness bug returning '(-22)' Reported-by: Dan Carpenter Signed-off-by: George Cherian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptpf_mbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36b05efc1b5b62054232d5b8453782ee7ca4efaa Author: Gilad Ben-Yossef Date: Tue Feb 14 08:21:45 2017 +0200 crypto: doc - fix typo Fix a single letter typo in api-skcipher.rst. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu Documentation/crypto/api-skcipher.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9f5a62a112b6cedcb0d13925a3b6e728caac002 Author: Russell King Date: Mon Feb 13 12:04:08 2017 +0000 hwrng: omap - update Kconfig help description omap-rng also supports Marvell Armada 7k/8k SoCs, but no mention of this is made in the help text, despite the dependency being added. Explicitly mention these SoCs in the help description so people know that it covers more than just TI SoCs. Fixes: 383212425c92 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ba8e2a05ed6695f38f3961ca8cb5cfc1063a842 Author: Ard Biesheuvel Date: Sat Feb 11 19:25:22 2017 +0000 crypto: ccm - drop unnecessary minimum 32-bit alignment The CCM driver forces 32-bit alignment even if the underlying ciphers don't care about alignment. This is because crypto_xor() used to require this, but since this is no longer the case, drop the hardcoded minimum of 32 bits. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/ccm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5338ad7065c0a4cb55e949638b1fdba6b09dc5a2 Author: Ard Biesheuvel Date: Sat Feb 11 19:25:21 2017 +0000 crypto: ccm - honour alignmask of subordinate MAC cipher The CCM driver was recently updated to defer the MAC part of the algorithm to a dedicated crypto transform, and a template for instantiating such transforms was added at the same time. However, this new cbcmac template fails to take the alignmask of the encapsulated cipher into account, which may result in buffer addresses being passed down that are not sufficiently aligned. So update the code to ensure that the digest buffer in the desc ctx appears at a sufficiently aligned offset, and tweak the code so that all calls to crypto_cipher_encrypt_one() operate on this buffer exclusively. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/ccm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 944c3d4dca34403e802287a1e7e9d02c06dce0d5 Author: Horia Geantă Date: Fri Feb 10 14:07:25 2017 +0200 crypto: caam - fix state buffer DMA (un)mapping If we register the DMA API debug notification chain to receive platform bus events: dma_debug_add_bus(&platform_bus_type); we start receiving warnings after a simple test like "modprobe caam_jr && modprobe caamhash && modprobe -r caamhash && modprobe -r caam_jr": platform ffe301000.jr: DMA-API: device driver has pending DMA allocations while released from device [count=1938] One of leaked entries details: [device address=0x0000000173fda090] [size=63 bytes] [mapped with DMA_TO_DEVICE] [mapped as single] It turns out there are several issues with handling buf_dma (mapping of buffer holding the previous chunk smaller than hash block size): -detection of buf_dma mapping failure occurs too late, after a job descriptor using that value has been submitted for execution -dma mapping leak - unmapping is not performed in all places: for e.g. in ahash_export or in most ahash_fin* callbacks (due to current back-to-back implementation of buf_dma unmapping/mapping) Fix these by: -calling dma_mapping_error() on buf_dma right after the mapping and providing an error code if needed -unmapping buf_dma during the "job done" (ahash_done_*) callbacks Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 107 ++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 55 deletions(-) commit 0355d23d4034f42b28db19520bc8865e26053404 Author: Horia Geantă Date: Fri Feb 10 14:07:24 2017 +0200 crypto: caam - abstract ahash request double buffering caamhash uses double buffering for holding previous/current and next chunks (data smaller than block size) to be hashed. Add (inline) functions to abstract this mechanism. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 77 ++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 29 deletions(-) commit 87ec02e7409d787348c244039aa3536a812dfa8b Author: Horia Geantă Date: Fri Feb 10 14:07:23 2017 +0200 crypto: caam - fix error path for ctx_dma mapping failure In case ctx_dma dma mapping fails, ahash_unmap_ctx() tries to dma unmap an invalid address: map_seq_out_ptr_ctx() / ctx_map_to_sec4_sg() -> goto unmap_ctx -> -> ahash_unmap_ctx() -> dma unmap ctx_dma There is also possible to reach ahash_unmap_ctx() with ctx_dma uninitialzed or to try to unmap the same address twice. Fix these by setting ctx_dma = 0 where needed: -initialize ctx_dma in ahash_init() -clear ctx_dma in case of mapping error (instead of holding the error code returned by the dma map function) -clear ctx_dma after each unmapping Fixes: 32686d34f8fb6 ("crypto: caam - ensure that we clean up after an error") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bbf2234494afd14a720d61a233c21b95e4261326 Author: Horia Geantă Date: Fri Feb 10 14:07:22 2017 +0200 crypto: caam - fix DMA API leaks for multiple setkey() calls setkey() callback may be invoked multiple times for the same tfm. In this case, DMA API leaks are caused by shared descriptors (and key for caamalg) being mapped several times and unmapped only once. Fix this by performing mapping / unmapping only in crypto algorithm's cra_init() / cra_exit() callbacks and sync_for_device in the setkey() tfm callback. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 275 +++++++++++------------------------------ drivers/crypto/caam/caamhash.c | 79 +++++------- 2 files changed, 102 insertions(+), 252 deletions(-) commit cfb725f6d3d31355fa4510da7d7bdce807045b42 Author: Horia Geantă Date: Fri Feb 10 14:07:21 2017 +0200 crypto: caam - don't dma_map key for hash algorithms Shared descriptors for hash algorithms are small enough for (split) keys to be inlined in all cases. Since driver already does this, all what's left is to remove unused ctx->key_dma. Fixes: 045e36780f115 ("crypto: caam - ahash hmac support") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 838e0a89e33a6e15492b8e4d700fc64c21ca3587 Author: Horia Geantă Date: Fri Feb 10 14:07:20 2017 +0200 crypto: caam - use dma_map_sg() return code dma_map_sg() might coalesce S/G entries, so use the number of S/G entries returned by it instead of what sg_nents_for_len() initially returns. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 133 ++++++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 62 deletions(-) commit fa0c92db1eb818a36c1b837b5f6da7e95b181247 Author: Horia Geantă Date: Fri Feb 10 14:07:19 2017 +0200 crypto: caam - replace sg_count() with sg_nents_for_len() Replace internal sg_count() function and the convoluted logic around it with the standard sg_nents_for_len() function. src_nents, dst_nents now hold the number of SW S/G entries, instead of the HW S/G table entries. With this change, null (zero length) input data for AEAD case needs to be handled in a visible way. req->src is no longer (un)mapped, pointer address is set to 0 in SEQ IN PTR command. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 189 ++++++++++++++++++--------------------- drivers/crypto/caam/sg_sw_sec4.h | 11 --- 2 files changed, 88 insertions(+), 112 deletions(-) commit fd144d83cc42cfe6c82cba76bc0113dacd53a4d4 Author: Horia Geantă Date: Fri Feb 10 14:07:18 2017 +0200 crypto: caam - check sg_count() return value sg_count() internally calls sg_nents_for_len(), which could fail in case the required number of bytes is larger than the total bytes in the S/G. Thus, add checks to validate the input. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 44 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) commit fd88aac93e4dc7810940e854be1c3dc5adb20120 Author: Horia Geantă Date: Fri Feb 10 14:07:17 2017 +0200 crypto: caam - fix HW S/G in ablkcipher_giv_edesc_alloc() HW S/G generation does not work properly when the following conditions are met: -src == dst -src/dst is S/G -IV is right before (contiguous with) the first src/dst S/G entry since "iv_contig" is set to true (iv_contig is a misnomer here and it actually refers to the whole output being contiguous) Fix this by setting dst S/G nents equal to src S/G nents, instead of leaving it set to init value (0). Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d8348d8e3bfc3e37f3cbaaff3966a1fca8909ed Author: Tudor Ambarus Date: Fri Feb 10 14:07:16 2017 +0200 crypto: caam - fix JR IO mapping if one fails If one of the JRs failed at init, the next JR used the failed JR's IO space. The patch fixes this bug. Signed-off-by: Tudor Ambarus Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit b3b5fce7364b674b66c58adea1dd2a2f85b61dd7 Author: Horia Geantă Date: Fri Feb 10 14:07:15 2017 +0200 crypto: caam - check return code of dma_set_mask_and_coherent() Setting the dma mask could fail, thus make sure it succeeds before going further. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 15 ++++++++++----- drivers/crypto/caam/jr.c | 19 ++++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) commit 78fd0fff7fbb55b352bd7058bf51caa46dd3a0f1 Author: Horia Geantă Date: Fri Feb 10 14:07:14 2017 +0200 crypto: caam - don't include unneeded headers intern.h, jr.h are not needed in error.c error.h is not needed in ctrl.c Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 1 - drivers/crypto/caam/error.c | 2 -- 2 files changed, 3 deletions(-) commit 83d650ab78c7185da815e16d03fb579d3fde0140 Author: Gary R Hook Date: Thu Feb 9 15:50:08 2017 -0600 crypto: ccp - Simplify some buffer management routines The reverse-get/set functions can be simplified by eliminating unused code. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 142 +++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 86 deletions(-) commit 4cdf101ef444e47bc8869ef3e90396e828fd9b61 Author: Gary R Hook Date: Thu Feb 9 15:49:57 2017 -0600 crypto: ccp - Update the command queue on errors Move the command queue tail pointer when an error is detected. Always return the error. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a60496a0ca0d34a3ae92e426138eab35f0f45612 Author: Gary R Hook Date: Thu Feb 9 15:49:48 2017 -0600 crypto: ccp - Change mode for detailed CCP init messages The CCP initialization messages only need to be sent to syslog in debug mode. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 19998acb0ff67cb8843668f3b94bdbe6018fa7d8 Author: Cyrille Pitchen Date: Thu Feb 9 17:51:21 2017 +0100 crypto: atmel-sha - fix error management in atmel_sha_start() This patch clarifies and fixes how errors should be handled by atmel_sha_start(). For update operations, the previous code wrongly assumed that (err != -EINPROGRESS) implies (err == 0). It's wrong because that doesn't take the error cases (err < 0) into account. This patch also adds many comments to detail all the possible returned values and what should be done in each case. Especially, when an error occurs, since atmel_sha_complete() has already been called, hence releasing the hardware, atmel_sha_start() must not call atmel_sha_finish_req() later otherwise atmel_sha_complete() would be called a second time. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit dd3f9f40b58168f91f27ab686c7bae1f35edd3d4 Author: Cyrille Pitchen Date: Thu Feb 9 17:51:20 2017 +0100 crypto: atmel-sha - fix missing "return" instructions This patch fixes a previous patch: "crypto: atmel-sha - update request queue management to make it more generic". Indeed the patch above should have replaced the "return -EINVAL;" lines by "return atmel_sha_complete(dd, -EINVAL);" but instead replaced them by a simple call of "atmel_sha_complete(dd, -EINVAL);". Hence all "return" instructions were missing. Reported-by: Dan Carpenter Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f7cc02b3c3a33a10dd5bb9e5dfd22e47e09503a2 Author: Gary R Hook Date: Wed Feb 8 13:07:06 2017 -0600 crypto: ccp - Set the AES size field for all modes Ensure that the size field is correctly populated for all AES modes. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 3 +-- drivers/crypto/ccp/ccp-dev.h | 1 + drivers/crypto/ccp/ccp-ops.c | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) commit d5bc1613d02f1c3f1226e2f7d555f0384d973482 Author: Ivan Khoronzhuk Date: Tue Feb 14 16:02:36 2017 +0200 net: ethernet: ti: cpsw: use var instead of func for usage count The usage count function is based on ndev_running flag that is updated before calling ndo_open/close, but if ndo is called in another place, as with suspend/resume, the counter is not changed, that breaks sus/resume. For common resource no difference which device is using it, does matter only device count. So, replace usage count function on var and inc and dec it in ndo_open/close. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-) commit 0222967ba05a0a0f845f7dd54fb3da82afae024d Author: Scott Bauer Date: Tue Feb 14 17:29:37 2017 -0700 Maintainers: Modify SED list from nvme to block Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e225c20eb0fd0b6657e640408f11ee392dc82b5b Author: Scott Bauer Date: Tue Feb 14 17:29:36 2017 -0700 Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN When CONFIG_KASAN is enabled, compilation fails: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Moved all the ioctl structures off the stack and dynamically allocate using _IOC_SIZE() Fixes: 455a7b238cd6 ("block: Add Sed-opal library") Reported-by: Arnd Bergmann Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 133 ++++++++++++++++------------------------------- drivers/nvme/host/core.c | 3 +- include/linux/sed-opal.h | 4 +- 3 files changed, 50 insertions(+), 90 deletions(-) commit 24bff4d78a572d25fe2a0818f55bebda8a2d4709 Author: Scott Bauer Date: Tue Feb 14 17:29:35 2017 -0700 uapi: sed-opal fix IOW for activate lsp to use correct struct The IOC_OPAL_ACTIVATE_LSP took the wrong strcure which would give us the wrong size when using _IOC_SIZE, switch it to the right structure. Fixes: 058f8a2 ("Include: Uapi: Add user ABI for Sed/Opal") Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe include/uapi/linux/sed-opal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aa5ca6e3ec63aa5815d78646748e88a7ceb1c8e Author: Shunqian Zheng Date: Fri Jun 24 10:13:32 2016 +0800 drm/rockchip: Use common IOMMU API to attach devices Rockchip DRM used the arm special API, arm_iommu_*(), to attach iommu for ARM32 SoCs. This patch convert to common iommu API so it would support ARM64 like RK3399. Since previous patch added support for direct IOMMU address space management, there is no need to use DMA API anymore and this patch wires things to use the new method. Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 101 +++++++++++++++------------- 1 file changed, 54 insertions(+), 47 deletions(-) commit 38f993b7c59e261b8ff7deb66c96c7dff4017f7b Author: Tomasz Figa Date: Fri Jun 24 10:13:31 2016 +0800 drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain The API is not suitable for subsystems consisting of multiple devices and requires severe hacks to use it. To mitigate this, this patch implements allocation and address space management locally by using helpers provided by DRM framework, like other DRM drivers do, e.g. Tegra. This patch should not introduce any functional changes until the driver is made to attach subdevices into an IOMMU domain with the generic IOMMU API, which will happen in following patch. Based heavily on GEM implementation of Tegra DRM driver. Signed-off-by: Tomasz Figa Signed-off-by: Shunqian Zheng Signed-off-by: Mark Yao Signed-off-by: rjan Eide drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 6 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 244 ++++++++++++++++++++++++++-- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 8 + 3 files changed, 244 insertions(+), 14 deletions(-) commit a142f4d3e5c54db5e942fa6ee5f3dc0e8c83207b Author: Rajat Jain Date: Mon Jan 2 22:34:15 2017 -0800 PCI/ASPM: Add comment about L1 substate latency Since the exit latencies for L1 substates are not advertised by a device, it is not clear in spec how to do a L1 substate exit latency check. We assume that the L1 exit latencies advertised by a device include L1 substate latencies (and hence do not do any check). If that is not true, we should do some sort of check here. (I'm not clear about what that check should like currently. I'd be glad to take up any suggestions). Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit aeda9adebab8b5bdd90576e3065a1f3f948279ad Author: Rajat Jain Date: Mon Jan 2 22:34:14 2017 -0800 PCI/ASPM: Configure L1 substate settings Configure the L1 substate settings on the upstream and downstream devices, while taking care of the rules dictated by the PCIe spec. [bhelgaas: drop "inline"] Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) commit f1f0366dd6be9624f7d355b72cc909ab821eb4c0 Author: Rajat Jain Date: Mon Jan 2 22:34:13 2017 -0800 PCI/ASPM: Calculate and save the L1.2 timing parameters Calculate and save the timing parameters that need to be programmed if we need to enable L1.2 substates later. We use the same logic (and a constant value for 1 of the parameters) as used by Intel's coreboot: https://www.coreboot.org/pipermail/coreboot-gerrit/2015-March/021134.html https://review.coreboot.org/#/c/8832/ Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit b5a0a9b59c8185aebcd9a717e2e6258b58c72c06 Author: Rajat Jain Date: Mon Jan 2 22:34:12 2017 -0800 PCI/ASPM: Read and set up L1 substate capabilities The PCIe spec (r3.1, sec 7.33) says the L1 PM Substates Capability may be implemented only in function 0. Read the L1 substate capability structures of upstream and downstream components of the link and set it up in the device structure. [bhelgaas: add specific spec reference] Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit b2103ccbb67e3ef0f7a75d21c989f9614ddbcaca Author: Rajat Jain Date: Mon Jan 2 22:34:11 2017 -0800 PCI/ASPM: Add support for L1 substates Add support for ASPM L1 substates. For details about L1 substates, see the PCIe r3.1 spec, which includes the ECN below in secs 5.5 and 7.33. Add macros for the 4 new L1 substates, and add a new ASPM "POWER_SUPERSAVE" policy that can be used to enable L1 substates on a system if desired. The new policy is in a sense, a superset of the existing POWERSAVE policy. The 4 policies are now: DEFAULT: Reads and uses whatever ASPM states BIOS enabled PERFORMANCE: Everything except L0 disabled. POWERSAVE: L0s and L1 enabled (but not L1 substates) POWER_SUPERSAVE: L0s + L1 + L1 substates also enabled [bhelgaas: add PCIe r3.1 spec reference] Link: https://pcisig.com/sites/default/files/specification_documents/ECN_L1_PM_Substates_with_CLKREQ_31_May_2013_Rev10a.pdf Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas drivers/pci/pcie/Kconfig | 8 ++++++++ drivers/pci/pcie/aspm.c | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 10 deletions(-) commit 2220fc1ab363e6fab1f321430d69be17a8b92bd7 Author: Denys Dmytriyenko Date: Tue Feb 14 15:00:47 2017 -0500 uapi: add missing install of dma-buf.h As part of c11e391da2a8fe973c3c2398452000bed505851e "dma-buf: Add ioctls to allow userspace to flush" a new uapi header file dma-buf.h was added, but an entry was not added on Kbuild to install it. This patch resolves this omission so that "make headers_install" installs this header. Signed-off-by: Denys Dmytriyenko Reviewed-by: Tomi Valkeinen Cc: Ville Syrjälä Cc: David Herrmann Cc: Sumit Semwal Cc: Daniel Vetter Cc: Tiago Vignatti Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1487102447-59265-1-git-send-email-denis@denix.org include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit fb3d769173d26268d7bf068094a599bb28b2ac63 Author: Jacek Anaszewski Date: Wed Nov 9 11:43:46 2016 +0100 leds: ledtrig-heartbeat: Make top brightness adjustable LED class heartbeat trigger allowed only for blinking with max_brightness value. This patch adds more flexibility by exploiting part of LED core software blink infrastructure. Signed-off-by: Jacek Anaszewski Acked-by: Pavel Machek Reviewed-by: Hans de Goede drivers/leds/trigger/ledtrig-heartbeat.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit ae3473231e77a3f1909d48cd144cebe5e1d049b3 Author: Jacek Anaszewski Date: Sun Jan 29 12:52:31 2017 +0100 tools/leds: Add led_hw_brightness_mon program LED subsystem supports POLLPRI on "brightness_hw_changed" sysfs file of LED class devices. This tool demonstrates how to use the feature. Signed-off-by: Jacek Anaszewski Acked-by: Hans de Goede Acked-by: Pavel Machek tools/leds/Makefile | 4 +- tools/leds/led_hw_brightness_mon.c | 84 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 2 deletions(-) commit 4610d240d691768203fdd210a5da0a2e02eddb76 Author: Paul Durrant Date: Mon Feb 13 17:03:24 2017 +0000 xen/privcmd: add IOCTL_PRIVCMD_RESTRICT The purpose if this ioctl is to allow a user of privcmd to restrict its operation such that it will no longer service arbitrary hypercalls via IOCTL_PRIVCMD_HYPERCALL, and will check for a matching domid when servicing IOCTL_PRIVCMD_DM_OP or IOCTL_PRIVCMD_MMAP*. The aim of this is to limit the attack surface for a compromised device model. Signed-off-by: Paul Durrant Signed-off-by: Boris Ostrovsky drivers/xen/privcmd.c | 88 +++++++++++++++++++++++++++++++++++++++++----- include/uapi/xen/privcmd.h | 2 ++ 2 files changed, 81 insertions(+), 9 deletions(-) commit ab520be8cd5d56867fc95cfbc34b90880faf1f9d Author: Paul Durrant Date: Mon Feb 13 17:03:23 2017 +0000 xen/privcmd: Add IOCTL_PRIVCMD_DM_OP Recently a new dm_op[1] hypercall was added to Xen to provide a mechanism for restricting device emulators (such as QEMU) to a limited set of hypervisor operations, and being able to audit those operations in the kernel of the domain in which they run. This patch adds IOCTL_PRIVCMD_DM_OP as gateway for __HYPERVISOR_dm_op. NOTE: There is no requirement for user-space code to bounce data through locked memory buffers (as with IOCTL_PRIVCMD_HYPERCALL) since privcmd has enough information to lock the original buffers directly. [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=524a98c2 Signed-off-by: Paul Durrant Acked-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky arch/arm/xen/enlighten.c | 1 + arch/arm/xen/hypercall.S | 1 + arch/arm64/xen/hypercall.S | 1 + arch/x86/include/asm/xen/hypercall.h | 7 ++ drivers/xen/privcmd.c | 139 +++++++++++++++++++++++++++++++++++ include/uapi/xen/privcmd.h | 13 ++++ include/xen/arm/hypercall.h | 1 + include/xen/interface/hvm/dm_op.h | 32 ++++++++ include/xen/interface/xen.h | 1 + 9 files changed, 196 insertions(+) commit 675d4d5c03d752edff3e1ef93c032a4eeb660552 Author: Tobias Klauser Date: Tue Feb 14 17:47:12 2017 +0100 pch_gbe: Omit private ndo_get_stats function pch_gbe_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 12 ------------ 1 file changed, 12 deletions(-) commit a06d4d672f76ef01d1fac38e2cefc22b7aaa7476 Author: Tobias Klauser Date: Tue Feb 14 15:10:06 2017 +0100 net: hip04: Omit private ndo_get_stats function hip04_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 6 ------ 1 file changed, 6 deletions(-) commit 6f2e3f7d9785dacb358b48b44950182b5c13e4bc Author: Wei Yongjun Date: Tue Feb 14 14:19:32 2017 +0000 net_sched: nla_memdup_cookie() can be static Fixes the following sparse warning: net/sched/act_api.c:532:5: warning: symbol 'nla_memdup_cookie' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/sched/act_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 044950cc48ced25ccb2f4ea7c31228399e19d5d6 Author: Manuel Lauss Date: Tue Feb 14 13:08:04 2017 +0100 net: irda: au1k_ir: drop useless include remove useless ioport.h include. Signed-off-by: Manuel Lauss Signed-off-by: David S. Miller drivers/net/irda/au1k_ir.c | 1 - 1 file changed, 1 deletion(-) commit 59bdb293fce30071bf62baed957a7b9d1f5fa3ea Author: Manuel Lauss Date: Tue Feb 14 13:08:03 2017 +0100 net: irda: au1k_ir: remove unused timer remove the unused timer. I suppose it was intended as a timeout detector, but never properly implemented. Signed-off-by: Manuel Lauss Signed-off-by: David S. Miller drivers/net/irda/au1k_ir.c | 7 ------- 1 file changed, 7 deletions(-) commit 7e57fbb2a341b5d44d30e71a6d782c5e6dbc429c Author: Alexander Alemayhu Date: Tue Feb 14 00:02:35 2017 +0100 bpf: reduce compiler warnings by adding fallthrough comments Fixes the following warnings: kernel/bpf/verifier.c: In function ‘may_access_direct_pkt_data’: kernel/bpf/verifier.c:702:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (t == BPF_WRITE) ^ kernel/bpf/verifier.c:704:2: note: here case BPF_PROG_TYPE_SCHED_CLS: ^~~~ kernel/bpf/verifier.c: In function ‘reg_set_min_max_inv’: kernel/bpf/verifier.c:2057:23: warning: this statement may fall through [-Wimplicit-fallthrough=] true_reg->min_value = 0; ~~~~~~~~~~~~~~~~~~~~^~~ kernel/bpf/verifier.c:2058:2: note: here case BPF_JSGT: ^~~~ kernel/bpf/verifier.c:2068:23: warning: this statement may fall through [-Wimplicit-fallthrough=] true_reg->min_value = 0; ~~~~~~~~~~~~~~~~~~~~^~~ kernel/bpf/verifier.c:2069:2: note: here case BPF_JSGE: ^~~~ kernel/bpf/verifier.c: In function ‘reg_set_min_max’: kernel/bpf/verifier.c:2009:24: warning: this statement may fall through [-Wimplicit-fallthrough=] false_reg->min_value = 0; ~~~~~~~~~~~~~~~~~~~~~^~~ kernel/bpf/verifier.c:2010:2: note: here case BPF_JSGT: ^~~~ kernel/bpf/verifier.c:2019:24: warning: this statement may fall through [-Wimplicit-fallthrough=] false_reg->min_value = 0; ~~~~~~~~~~~~~~~~~~~~~^~~ kernel/bpf/verifier.c:2020:2: note: here case BPF_JSGE: ^~~~ Reported-by: David Binderman Signed-off-by: Alexander Alemayhu Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2be4cb973f0cfaf051224fa5bc969c71c9fc3d5b Author: Ondrej Zary Date: Mon Feb 13 23:45:47 2017 +0100 pcnet32: fix BNC/AUI port on AM79C970A Even though the port autoselection is enabled by default on AM79C970A, BNC/AUI port does not work because the link is always reported to be down. The link state reported by the chip belongs only to the TP port but the driver uses it regardless of the port used. The chip can't detect BNC/AUI link state. Disable port autoselection and use TP port by default to keep current behavior (link detection works on TP port, BNC/AUI port does not work). Implement ethtool autoneg, port and duplex configuration to allow using the BNC/AUI port. Report the TP link state only if the TP port is selected. When the port autoselection is enabled or AUI port is selected, report the link as always up. Move pcnet32_suspend() and pcnet32_clr_suspend() functions to avoid forward declarations. Signed-off-by: Ondrej Zary Signed-off-by: David S. Miller drivers/net/ethernet/amd/pcnet32.c | 177 ++++++++++++++++++++++++++----------- 1 file changed, 125 insertions(+), 52 deletions(-) commit cce5fbadb65568015706d3ae169b419cc1c7a25f Author: Ondrej Zary Date: Mon Feb 13 23:45:46 2017 +0100 pcnet32: factor out pcnet32_clr_suspend() Move the code to clear SUSPEND flag to a separate function to simplify code. Signed-off-by: Ondrej Zary Signed-off-by: David S. Miller drivers/net/ethernet/amd/pcnet32.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit a0b2f5af4c99d3da7ce9bc2b3b4641c8ffd22615 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 16:19:56 2017 -0300 perf tools: Be consistent on the type of map->symbols[] interator In a few cases we were using 'enum map_type' and that triggered this warning when using clang: util/session.c:1923:16: error: comparison of constant 2 with expression of type 'enum map_type' is always true [-Werror,-Wtautological-constant-out-of-range-compare] for (i = 0; i < MAP__NR_TYPES; ++i) { Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-i6uyo6bsopa2dghnx8qo7rri@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 4 ++-- tools/perf/util/session.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 35670dd0c9b421f1bb6ca69f389aa6b657b57d49 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 16:18:02 2017 -0300 perf intel pt decoder: clang has no -Wno-override-init So set it only for other compilers, allowing us to overcome yet another build failure due to an inexistent clang -W option: error: unknown warning option '-Wno-override-init'; did you mean '-Wno-override-module'? [-Werror,-Wunknown-warning-option] Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-oaa1ici3j8nygp4pzl2oobh3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/Build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1006ccccd03c0e420bf0398a5ab944759268f387 Author: Thomas Petazzoni Date: Wed Dec 21 11:26:56 2016 +0100 clk: mvebu: adjust clock handling for the CP110 system controller This commit: - makes the GOP_DP (bit 9) gatable clock a child clock of the SD_MMC_GOP (bit 18) clock, as it should have been. The clock for bit 18 was just named SD_MMC, but since it also covers the GOP block, it is renamed SD_MMC_GOP. - makes the MG (bit 5) gatable clock a child clock of the MG_CORE clock (bit 6) Signed-off-by: Thomas Petazzoni Signed-off-by: Stephen Boyd drivers/clk/mvebu/cp110-system-controller.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit c24ae6d96112b10ef703a58d7d74583716d2ce69 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 10:59:04 2017 -0300 perf evsel: Do not put a variable sized type not at the end of a struct As this is a GNU extension and while harmless in this case, we can do the same thing in a more clearer way by using a existing thread_map and cpu_map constructors: With this we avoid this while compiling with clang: util/evsel.c:1659:17: error: field 'map' with variable sized type 'struct cpu_map' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct cpu_map map; ^ util/evsel.c:1667:20: error: field 'map' with variable sized type 'struct thread_map' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct thread_map map; ^ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-207juvrqjiar7uvas2s83v5i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 62 ++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit fe8e52b9b9100c486051aaf5208dbf4072bb87b1 Author: Paul Moore Date: Mon Feb 13 16:21:25 2017 -0500 audit: remove unnecessary curly braces from switch/case statements Signed-off-by: Paul Moore kernel/auditsc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 8a2efd6dd586ef0ff532180e6335ec21310c2cd5 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 15:28:41 2017 -0300 perf probe: Avoid accessing uninitialized 'map' variable Genuine problem detected with clang, the warnings are spot on: util/probe-event.c:2079:7: error: variable 'map' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (addr) { ^~~~ util/probe-event.c:2094:6: note: uninitialized use occurs here if (map && !is_kprobe) { ^~~ util/probe-event.c:2079:3: note: remove the 'if' if its condition is always true if (addr) { ^~~~~~~~~~ util/probe-event.c:2075:8: error: variable 'map' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (kernel_get_symbol_address_by_name(tp->symbol, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/probe-event.c:2094:6: note: uninitialized use occurs here if (map && !is_kprobe) { ^~~ util/probe-event.c:2075:4: note: remove the 'if' if its condition is always false if (kernel_get_symbol_address_by_name(tp->symbol, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/probe-event.c:2064:17: note: initialize the variable 'map' to silence this warning struct map *map; ^ = NULL Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-m3501el55i10hctfbmi2qxzr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 179125085bd4ca70e8e028913193a93653bd12f7 Author: Tony Lindgren Date: Tue Feb 14 10:26:03 2017 -0800 ARM: OMAP3: Fix smartreflex platform data regression Commit d9d9cec02835 ("ARM: OMAP2+: Remove legacy data from hwmod for omap3") dropped platform data that should no longer be used as we're booting with device tree. It turns out that smartreflex is still using platform data and produces the following errors during probe: smartreflex smartreflex.0: invalid resource smartreflex smartreflex.0: omap_sr_probe: ioremap fail smartreflex: probe of smartreflex.0 failed with error -22 smartreflex smartreflex.1: invalid resource smartreflex smartreflex.1: omap_sr_probe: ioremap fail smartreflex: probe of smartreflex.1 failed with error -22 Let's fix the regression by adding back the smartreflex hwmod data. The long term is to update the smartreflex driver to use device tree based probing. Fixes: d9d9cec02835 ("ARM: OMAP2+: Remove legacy data from hwmod for omap3") Reported-by: Adam Ford Tested-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit eff0b85efb2bbdf15aee13f2922722a5e61c3a0d Author: Gustavo A. R. Silva Date: Tue Feb 14 12:20:39 2017 -0600 usb: musb: add code comment for clarification Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 1 + 1 file changed, 1 insertion(+) commit 8d12f88257cd9039d9556585475deb46db055050 Author: Stephen Hemminger Date: Sat Feb 11 23:02:25 2017 -0700 vmbus: replace modulus operation with subtraction Takes less clock cycles to check for ring wrap and subtract than to do a modulus instruction. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e4165a0fad0963bf8b4a59f54d3360ccb6a6d1ea Author: Stephen Hemminger Date: Sat Feb 11 23:02:24 2017 -0700 vmbus: constify parameters where possible Functions that just query state of ring buffer can have parameters marked const. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hyperv_vmbus.h | 6 +++--- drivers/hv/ring_buffer.c | 22 ++++++++++------------ include/linux/hyperv.h | 12 ++++++------ 3 files changed, 19 insertions(+), 21 deletions(-) commit 6e47dd3e2938f41d75045bbcb64aa9df3a463b2a Author: Stephen Hemminger Date: Sat Feb 11 23:02:23 2017 -0700 vmbus: expose hv_begin/end_read In order to implement NAPI in netvsc, the driver needs access to control host interrupt mask. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hyperv_vmbus.h | 4 ---- drivers/hv/ring_buffer.c | 20 -------------------- include/linux/hyperv.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 24 deletions(-) commit 5529eaf6e79a61e0ca7ade257f31d2ababc7f6c9 Author: Stephen Hemminger Date: Sat Feb 11 23:02:22 2017 -0700 vmbus: remove conditional locking of vmbus_write All current usage of vmbus write uses the acquire_lock flag, therefore having it be optional is unnecessary. This also fixes a sparse warning since sparse doesn't like when a function has conditional locking. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 13 ++++--------- drivers/hv/channel_mgmt.c | 1 - drivers/hv/hyperv_vmbus.h | 3 +-- drivers/hv/ring_buffer.c | 11 ++++------- include/linux/hyperv.h | 15 --------------- 5 files changed, 9 insertions(+), 34 deletions(-) commit b71e328297a3a578c482fb4814e737a0ec185839 Author: Stephen Hemminger Date: Sat Feb 11 23:02:21 2017 -0700 vmbus: add direct isr callback mode Change the simple boolean batched_reading into a tri-value. For future NAPI support in netvsc driver, the callback needs to occur directly in interrupt handler. Batched mode is also changed to disable host interrupts immediately in interrupt routine (to avoid unnecessary host signals), and the tasklet is rescheduled if more data is detected. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 7 ------- drivers/hv/connection.c | 27 ++++++++++++--------------- drivers/hv/hv_util.c | 3 +-- drivers/hv/vmbus_drv.c | 26 ++++++++++++++++++++++++-- drivers/uio/uio_hv_generic.c | 2 +- include/linux/hyperv.h | 31 +++++++++++++++++-------------- 6 files changed, 55 insertions(+), 41 deletions(-) commit 631e63a9f346cb657761ae22138f294718696501 Author: Stephen Hemminger Date: Sat Feb 11 23:02:20 2017 -0700 vmbus: change to per channel tasklet Make the event handling tasklet per channel rather than per-cpu. This allows for better fairness when getting lots of data on the same cpu. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 +- drivers/hv/channel_mgmt.c | 16 +++++----- drivers/hv/connection.c | 78 ++--------------------------------------------- drivers/hv/hv.c | 2 -- drivers/hv/hyperv_vmbus.h | 1 - drivers/hv/vmbus_drv.c | 58 ++++++++++++++++++++++++++++++----- include/linux/hyperv.h | 3 +- 7 files changed, 64 insertions(+), 96 deletions(-) commit 37cdd991fac810a727cd285629d1640fcf53cd19 Author: Stephen Hemminger Date: Sat Feb 11 23:02:19 2017 -0700 vmbus: put related per-cpu variable together The hv_context structure had several arrays which were per-cpu and was allocating small structures (tasklet_struct). Instead use a single per-cpu array. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 35 ++++++++----- drivers/hv/connection.c | 20 ++++--- drivers/hv/hv.c | 130 ++++++++++++++++++++-------------------------- drivers/hv/hyperv_vmbus.h | 53 +++++++++++-------- drivers/hv/vmbus_drv.c | 39 ++++++++------ 5 files changed, 143 insertions(+), 134 deletions(-) commit 51c6ce2ae35980c755af33461c3138570ded615e Author: Stephen Hemminger Date: Sat Feb 11 23:02:18 2017 -0700 vmbus: callback is in softirq not workqueue The callback is done via tasklet not workqueue. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman include/linux/hyperv.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 89896051f8dae5a04ada1f5fbeeaedc23f484f68 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 10:59:04 2017 -0300 perf tools: Do not put a variable sized type not at the end of a struct As this is a GNU extension and while harmless in this case, we can do the same thing in a more clearer way by using an existing thread_map constructor. With this we avoid this while compiling with clang: util/parse-events.c:2024:21: error: field 'map' with variable sized type 'struct thread_map' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct thread_map map; ^ 1 error generated. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-tqocbplnyyhpst6drgm2u4m3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 9d6aae725454beada044179f1005c8f8c206dd6a Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 10:59:04 2017 -0300 perf record: Do not put a variable sized type not at the end of a struct As this is a GNU extension and while harmless in this case, we can do the same thing in a more clearer way by using an existing thread_map constructor. With this we avoid this while compiling with clang: builtin-record.c:659:21: error: field 'map' with variable sized type 'struct thread_map' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct thread_map map; ^ 1 error generated. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-c9drclo52ezxmwa7qxklin2y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 423d856a4d6ab26a50309fd051f2bdf0e5d00fd6 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 15:04:48 2017 -0300 perf tests: Synthesize struct instead of using field after variable sized type End result is the same, its an ABI, so the struct won't change, avoid using a GNU extension, so that we can catch other cases that may be bugs. Caught when building with clang: tests/parse-no-sample-id-all.c:53:20: error: field 'attr' with variable sized type 'struct attr_event' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct attr_event attr; ^ 1 error generated. Testing it: # perf test sample_id 24: Parse with no sample_id_all bit set : Ok # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-e2vs1x771fc208uvxnwcf08b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/parse-no-sample-id-all.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 6aa4d8264003eb4f91fb09831ad25f059113f7b2 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 14:19:34 2017 -0300 perf bench numa: Make sure dprintf() is not defined When building with clang we get this error: bench/numa.c:46:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined] #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0) ^ /usr/include/bits/stdio2.h:145:12: note: previous definition is here # define dprintf(fd, ...) \ ^ CC /tmp/build/perf/tests/parse-no-sample-id-all.o 1 error generated. So, make sure it is undefined before using that name. Cc: Adrian Hunter Cc: David Ahern Cc: Davidlohr Bueso Cc: Hitoshi Mitake Cc: Jakub Jelen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-f654o2svtrutamvxt7igwz74@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 1 + 1 file changed, 1 insertion(+) commit 16cab3226fc91fd8060a3d15d1f27051a7b189fb Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 14:12:43 2017 -0300 Revert "perf bench futex: Sanitize numeric parameters" This reverts commit 60758d6668b3e2fa8e5fd143d24d0425203d007e. Now that libsubcmd makes sure that OPT_UINTEGER options will not return negative values, we can revert this patch while addressing the problem it solved: # perf bench futex hash -t -4 # Running 'futex/hash' benchmark: Error: switch `t' expects an unsigned numerical value Usage: perf bench futex hash -t, --threads Specify amount of threads # perf bench futex hash -t-4 # Running 'futex/hash' benchmark: Error: switch `t' expects an unsigned numerical value Usage: perf bench futex hash -t, --threads Specify amount of threads # IMO it is more reasonable to flat out refuse to process a negative number than to silently turn it into an absolute value. This also helps in silencing clang's complaint about asking for an absolute value of an unsigned integer: bench/futex-hash.c:133:10: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] nsecs = futexbench_sanitize_numeric(nsecs); ^ bench/futex.h:104:42: note: expanded from macro 'futexbench_sanitize_numeric' #define futexbench_sanitize_numeric(__n) abs((__n)) ^ bench/futex-hash.c:133:10: note: remove the call to 'abs' since unsigned values cannot be negative Cc: Adrian Hunter Cc: David Ahern Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2kl68v22or31vw643m2exz8x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/futex-hash.c | 4 ---- tools/perf/bench/futex-lock-pi.c | 3 --- tools/perf/bench/futex-requeue.c | 2 -- tools/perf/bench/futex-wake-parallel.c | 4 ---- tools/perf/bench/futex-wake.c | 3 --- tools/perf/bench/futex.h | 4 ---- 6 files changed, 20 deletions(-) commit b98897166280c4cfb9bc5a6c1b5682528eb4abff Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 13:55:40 2017 -0300 tools lib subcmd: Make it an error to pass a signed value to OPTION_UINTEGER Options marked OPTION_UINTEGER or OPTION_U64 clearly indicates that an unsigned value is expected, so just error out when a negative value is passed, instead of returning something undesired to the tool. E.g.: # perf bench futex hash -t -4 # Running 'futex/hash' benchmark: Error: switch `t' expects an unsigned numerical value Usage: perf bench futex hash -t, --threads Specify amount of threads # Cc: Adrian Hunter Cc: David Ahern Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2mdn8s2raatyhz7tamrsz22r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/parse-options.c | 4 ++++ 1 file changed, 4 insertions(+) commit e3f75db14d4bcef77908084afe1190b557d1b40f Author: Artur Lorincz Date: Sat Feb 11 22:08:31 2017 +0100 staging: comedi: fixed multiple line dereference Fixed multiple line dereference for &cmd->scan_begin_arg. Signed-off-by: Artur Lorincz Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/adl_pci9118.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fa4508ddc3698566bf7b0b518d667aa75f355dfb Author: Artur Lorincz Date: Sat Feb 11 21:26:51 2017 +0100 staging: comedi: made comedi_lrange struct constant Added the const type qualifier to the comedi_lrange structure. Signed-off-by: Artur Lorincz Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/addi_apci_3501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca6270b8d932475636364b989c6d2c2318fbabe Author: Nogah Frankel Date: Mon Feb 13 21:03:02 2017 +0100 mlxsw: spectrum: Change ipv6 unregistered mc table Point back the unregister IPv6 mc table to the bc table. It is done since IPv6 mcast snooping is not supported for Spectrum yet. Reported-by: Jiri Pirko Fixes: 71c365bdc439 ("mlxsw: spectrum: Separate bc and mc floods") Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Tested-by: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 - 1 file changed, 1 deletion(-) commit 2867af2dcf4093d5617172c030ff449e5d5c5935 Author: Romain Izard Date: Fri Feb 10 16:24:46 2017 +0100 atmel_serial: Use the fractional divider when possible The fractional baud rate generator is available when using the asynchronous mode of Atmel USART controllers. It makes it possible to use higher baudrates, in exchange for a less precise clock with a variable duty cycle. The existing code restricts its use to the normal mode of the USART controller, following the recommendation from the datasheet for the first chip embedding this type of controller. This recommendation has been removed from the documentation for the newer chips. After verification, all revisions of this controller should be able to use the fractional baud rate generator with the different asynchronous modes. Removing the condition on ATMEL_US_USMODE makes it possible to get correct baudrates at high speed in more cases. This was tested with a board using an Atmel SAMA5D2 chip and a TI WL1831 WiFi/Bluetooth combo chip at 3 Mbauds, with hardware flow control enabled. Signed-off-by: Romain Izard Acked-by: Ludovic Desroches Signed-off-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit afe3939eb9c8d95debb3c14d5576802b3837c179 Merge: bd08b53 bc221a3 Author: David S. Miller Date: Tue Feb 14 13:04:11 2017 -0500 Merge branch 'sunvnet-driver-updates' Shannon Nelson says: ==================== sunvnet driver updates The sunvnet ldom virtual network driver was due for some updates and a bugfix or two. These patches address a few items left over from last year's make-over. v2: - changed memory barrier fix to use smp_wmb - put NETIF_F_SG back into the advertised ldmvsw hw_features v3: - the sunvnet_common module doesn't need module_init or _exit v4: - dropped the statistics patch - fixed up "default" tag for SUNVNET_COMMON ==================== Signed-off-by: David S. Miller commit bc221a34ac473b444a7cfdd0c152b4c71f79326b Author: Shannon Nelson Date: Mon Feb 13 10:57:04 2017 -0800 ldmvsw: disable tso and gso for bridge operations The ldmvsw driver is specifically for supporting the ldom virtual networking by running in the primary ldom and using the LDC to connect the remaining ldoms to the outside world via a bridge. With TSO and GSO supported while connected the bridge, things tend to misbehave as seen in our case by delayed packets, enough to begin triggering retransmits and affecting overall throughput. By turning off advertised support for TSO and GSO we restore stable traffic flow through the bridge. Orabug: 23293104 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 5 ++--- drivers/net/ethernet/sun/sunvnet_common.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7602011f59cc32ebc3a5f9058d6ba11b096c8c50 Author: Shannon Nelson Date: Mon Feb 13 10:57:03 2017 -0800 ldmvsw: update and simplify version string New version and simplify the print code. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit daa86e50f649fccadafc53994ddc4254d75a008b Author: Shannon Nelson Date: Mon Feb 13 10:57:02 2017 -0800 sunvnet: remove extra rcu_read_unlocks The RCU read lock is grabbed first thing in sunvnet_start_xmit_common() so it always needs to be released. This removes the conditional release in the dropped packet error path and removes a couple of superfluous calls in the middle of the code. Reported-by: Bijan Mottahedeh Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bf091f3f362b3c562a18bbf7a2d3e2f3a36eba1d Author: Shannon Nelson Date: Mon Feb 13 10:57:01 2017 -0800 sunvnet: straighten up message event handling logic The use of gotos for handling the incoming events made this code harder to read and support than it should be. This patch straightens out and clears up the logic. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 94 +++++++++++++++---------------- 1 file changed, 45 insertions(+), 49 deletions(-) commit fd263fb6e718c5bdf35cbc1de4f781c71794d2a4 Author: Shannon Nelson Date: Mon Feb 13 10:57:00 2017 -0800 sunvnet: add memory barrier before check for tx enable In order to allow the underlying LDC and outstanding memory operations to potentially catch up with the driver's Tx requests, add a memory barrier before checking again for available tx descriptors. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 1 + 1 file changed, 1 insertion(+) commit f2f3e210bffe5c8f8b30d0b0c7b0f733ff5db334 Author: Shannon Nelson Date: Mon Feb 13 10:56:59 2017 -0800 sunvnet: update version and version printing There have been several changes since the first version of this code, so we bump the version number. While we're at it, we can simplify the version printing a bit and drop a couple lines of code. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit d4aa89cc2bbe021722c946eb11b21ebb0f13c825 Author: Sowmini Varadhan Date: Mon Feb 13 10:56:58 2017 -0800 sunvnet: remove unused variable in maybe_tx_wakeup The vio_dring_state *dr variable is unused in maybe_tx_wakeup(). As the comments indicate, we call maybe_tx_wakeup() whenever we get a STOPPED LDC message on the port. If the queue is stopped, we want to wake it up so that we will send another START message at the next TX and trigger the consumer to drain the dring. Signed-off-by: Sowmini Varadhan Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2493b842f258e14938f278e44ecc26970dfabbf0 Author: Shannon Nelson Date: Mon Feb 13 10:56:57 2017 -0800 sunvnet: make sunvnet common code dynamically loadable When the sunvnet_common code was split out for use by both sunvnet and the newer ldmvsw, it was made into a static kernel library, which limits the usefulness of sunvnet and ldmvsw as loadables, since most of the real work is being done in the shared code. Also, this is simply dead code in kernels that aren't running the LDoms. This patch makes the sunvnet_common into a dynamically loadable module and makes sunvnet and ldmvsw dependent on sunvnet_common. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/Kconfig | 8 ++++++-- drivers/net/ethernet/sun/sunvnet_common.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 973f7dd575891d0e67469861b47f43175553f30a Author: Wei Yongjun Date: Thu Feb 9 15:32:21 2017 +0000 spi: bcm-qspi: Remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 1 - 1 file changed, 1 deletion(-) commit 345309fa7c0c9206a5344d379b174499952d79d9 Author: Kamal Dasu Date: Wed Feb 8 15:15:04 2017 -0500 spi: bcm-qspi: Fix bcm_qspi_bspi_read() performance Let bcm_qspi_bspi_flash_read() return all the requested bytes by breaking up the reads for BSPI block into optimal chunks size that a BSPI block can handle. Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 83 +++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 37 deletions(-) commit 07460b92db7c2d0808cfaae02b325a52c2f7c7a8 Author: Sven Eckelmann Date: Mon Feb 13 16:56:48 2017 +0100 ath9k: Access rchan::buf only with per_cpu helper The relayfs was changed to use per CPU constructs to handle the rchan buffers. But the users of the rchan buffers in other parts of the kernel were not modified. This caused crashes like BUG: unable to handle kernel paging request at 00003a5198a0b910 IP: [] ath_cmn_process_fft+0xea/0x610 PGD 0 [ 179.522449] Oops: 0000 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.0-rc5 #1 [...] Call Trace: [ 179.656426] [] ? ath_rx_tasklet+0x2f3/0xd10 [] ? ath9k_tasklet+0x1b6/0x230 [] ? tasklet_action+0xf1/0x100 [] ? __do_softirq+0xef/0x284 [] ? irq_exit+0xae/0xb0 [] ? do_IRQ+0x4f/0xd0 [] ? common_interrupt+0x82/0x82 [ 179.703152] [] ? poll_idle+0x2d/0x57 [] ? sched_clock+0x5/0x10 [] ? cpuidle_enter_state+0xf6/0x2d0 [] ? cpu_startup_entry+0x14e/0x230 [] ? start_kernel+0x461/0x481 [] ? early_idt_handler_array+0x120/0x120 [] ? x86_64_start_kernel+0x14c/0x170 Code: 31 db 41 be ff ff ff ff 4c 8b 26 48 8b 6e 08 49 8b 84 24 60 05 00 00 48 8b 00 0f b7 40 04 66 89 44 24 48 eb 11 48 8b 55 40 48 98 <48> 8b 3c c2 e8 ad a0 a4 ff 01 c3 41 8d 56 01 be 00 02 00 00 48 RIP [] ath_cmn_process_fft+0xea/0x610 RSP CR2: 00003a5198a0b910 Fixes: 017c59c042d0 ("relay: Use per CPU constructs for the relay channel buffer pointers") Cc: Akash Goel Cc: Nick Kossifidis Reported-by: Mathias Kretschmer Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6e56d749f1b4c89f24d8cb008385d648fa52582 Author: Felix Fietkau Date: Sun Feb 12 14:29:31 2017 +0100 ath9k: clean up and fix ath_tx_count_airtime ath_tx_count_airtime is doing a lot of unnecessary work: - Redundant station lookup - Redundant rcu_read_lock/unlock - Useless memcpy of bf->rates - Useless NULL check of bf->bf_mpdu - Redundant lookup of the skb tid Additionally, it tries to look up the mac80211 queue index from the txq, which fails if the frame was delivered via the power save queue. This patch fixes all of these issues by passing down the right set of pointers instead of doing extra work Cc: stable@vger.kernel.org Fixes: 63fefa050477 ("ath9k: Introduce airtime fairness scheduling between stations") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 52 +++++++++++------------------------ 1 file changed, 16 insertions(+), 36 deletions(-) commit 1235a3b66cbfe4262b52137115056829c1760120 Author: Tobias Klauser Date: Thu Feb 9 12:21:17 2017 +0100 ath6kl: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct ath6kl_vif, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/core.h | 1 - drivers/net/wireless/ath/ath6kl/main.c | 8 -------- drivers/net/wireless/ath/ath6kl/txrx.c | 22 +++++++++++----------- 3 files changed, 11 insertions(+), 20 deletions(-) commit a532293fcba4b6b041c1a91674bc284d51280eb7 Author: Ryan Hsu Date: Fri Feb 10 12:27:09 2017 -0800 ath10k: fix the garage chars in board file name creation The variant[] string will be valid only if the bdf_ext is set. The string memory needs to be null-terminated to avoid the undefined garbage appended by the subsequent board file name creation. ath10k_pci 0000:04:00.0: failed to fetch board data for "bus=pci,vendor=168c,device=003e,subsystem-vendor=168c,subsystem-device=3363��P�����" from ath10k/QCA6174/hw3.0/board-2.bin Fixes: f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file extension") Reported-by: Kalle Valo Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7be52c03bbf7c8f53211ed13810d64dcb2bc7168 Author: Kalle Valo Date: Mon Feb 13 12:38:43 2017 +0200 ath10k: convert warning about non-existent OTP board id to debug message Currently ath10k unncessarily warns about board id not available from OTP: ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0 ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000 ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1 ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.9-2 api 5 features no-p2p,raw-mode crc32 b8d50af5 ath10k_pci 0000:02:00.0: board id is not exist in otp, ignore it ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08 ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 But not all boards have the board id in OTP so this is not a problem and no need to confuse the user with that info. So this can be safely changed to a debug message. Also fix grammar in the debug message. Fixes: d2e202c06ca4 ("ath10k: ignore configuring the incorrect board_id") Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9f5bcfe93315d75da4cc46bd30b536966559359a Author: Michal Kazior Date: Mon Feb 13 12:38:42 2017 +0200 ath10k: silence firmware file probing warnings Firmware files are versioned to prevent older driver instances to load unsupported firmware blobs. This is reflected with a fallback logic which attempts to load several firmware files. This however produced a lot of unnecessary warnings sometimes confusing users and leading them to rename firmware files making things even more confusing. Hence use request_firmware_direct() which does not produce extra warnings. This shouldn't really break anything because most modern systems don't rely on udev/hotplug helpers to load firmware files anymore. For example it was confirmed that LEDE does not user helper. This also fixes a 60 second delay per _each_ unexistent firmware/calibration file with distros which have CONFIG_FW_LOADER_USER_HELPER_FALLBACK enabled, RHEL being a notable example. Using ath10k with firmware-2.bin this might end up into a five minute delay in boot. Signed-off-by: Michal Kazior [kvalo@qca.qualcomm.com: add more info to the commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 11 +++++------ drivers/net/wireless/ath/ath10k/testmode.c | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) commit 310c01afae0109c37c871887a7c64bc3e4a9e636 Author: Kalle Valo Date: Mon Feb 13 12:38:41 2017 +0200 ath10k: add directory to board data error message This way user has a better idea what file exactly is missing. This is needed when we switch to using request_firmware_direct() which doesn't print any errors anymore. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c61bedc0a725f0b019a70bba07cb2cf05c4ae2a Author: Erik Stromdahl Date: Mon Feb 13 12:38:40 2017 +0200 ath10k: fetch firmware images in a loop To make it easier to handle minimum and maximum firmware API numbers convert the firmware fetch functionality to a loop. If no firmware image is found print an error with minimum and maximum API numbers and the name of firmware directory. This is needed when we switch to using request_firmware_direct() which doesn't print any errors anymore. Also add a new function for creating the fw file name dynamically which makes it easier to add new bus support, for example SDIO and USB, later. Signed-off-by: Erik Stromdahl [kvalo@qca.qualcomm.com: remove sdio/usb part, new error message, clarify commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 51 +++++++++++++++------------------- drivers/net/wireless/ath/ath10k/hw.h | 4 +++ 2 files changed, 27 insertions(+), 28 deletions(-) commit bd08b532f49b640c8d2ba1a7a7344ab206e051cb Merge: 9b8e1056 62980cb Author: David S. Miller Date: Tue Feb 14 12:43:19 2017 -0500 Merge branch 'sfc-bogus-interrupt-mode-fallbacks' Edward Cree says: ==================== sfc: prevent bogus interrupt-mode fallbacks EF10 VFs only support MSI-X interrupts, not MSI or legacy. This series stops the probe logic from trying to fallback to those if MSI-X interrupt probe fails. It also prevents selecting them with the interrupt_mode module parameter. This avoids producing messages like "failed to hook legacy IRQ 0" and "IRQ handler type mismatch for IRQ 0", and ensures that the relevant error (from the attempt to enable MSI-X) is reported to the caller. ==================== Signed-off-by: David S. Miller commit 62980cb6dd2fd2dca34060c4fd77ebafa878272a Author: Andrew Rybchenko Date: Mon Feb 13 14:59:04 2017 +0000 sfc: only fall back to a lower interrupt mode if it is supported If we fail to probe interrupts with our minimum mode, return that error. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6f9f6ec2e0acea398caf83bf750439c69068de43 Author: Andrew Rybchenko Date: Mon Feb 13 14:57:39 2017 +0000 sfc: MSI-X is the only interrupt mode for EF10 VFs Add min_interrupt_mode specification per NIC type. It is a bit confusing because of "highest interrupt mode is less capable". Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 ++ drivers/net/ethernet/sfc/efx.c | 11 +++++++++-- drivers/net/ethernet/sfc/net_driver.h | 5 ++++- drivers/net/ethernet/sfc/siena.c | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) commit 9b8e1056dbad7ea3f1bcd3db0ea7cf6682d077b1 Merge: 91eaa47 5019ab5 Author: David S. Miller Date: Tue Feb 14 12:41:04 2017 -0500 Merge branch 'bridge-fdb-minor-cleanup' Nikolay Aleksandrov says: ==================== bridge: minor fdb cleanup These patches aim to simplify the bridge fdb API a little by removing some redundant functions and converting them into wrappers of a single function. Also add proper lock checking to avoid future mistakes for the search functions. ==================== Signed-off-by: David S. Miller commit 5019ab50f26c247abb510a80635b25b64b6c1f4b Author: Nikolay Aleksandrov Date: Mon Feb 13 14:59:11 2017 +0100 bridge: fdb: converge fdb_delete_by functions into one We can simplify the logic of entries pointing to the bridge by converging the fdb_delete_by functions, this would allow us to use the same function for both cases since the fdb's dst is set to NULL if it is pointing to the bridge thus we can always check for a port match. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 62 +++++++++++++---------------------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) commit 410b3d48f5111a28bb8d4c3d3dc5984c1baf7fc9 Author: Nikolay Aleksandrov Date: Mon Feb 13 14:59:10 2017 +0100 bridge: fdb: add proper lock checks in searching functions In order to avoid new errors add checks to br_fdb_find and fdb_find_rcu functions. The first requires hash_lock, the second obviously RCU. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 4 ++++ net/bridge/br_private.h | 9 +++++++++ 2 files changed, 13 insertions(+) commit bfd0aeac52f74bfb44c0974131e44abb33a13e78 Author: Nikolay Aleksandrov Date: Mon Feb 13 14:59:09 2017 +0100 bridge: fdb: converge fdb searching functions into one Before this patch we had 3 different fdb searching functions which was confusing. This patch reduces all of them to one - fdb_find_rcu(), and two flavors: br_fdb_find() which requires hash_lock and br_fdb_find_rcu which requires RCU. This makes it clear what needs to be used, we also remove two abusers of __br_fdb_get which called it under hash_lock and replace them with br_fdb_find(). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 2 +- net/bridge/br_fdb.c | 113 ++++++++++++++++++++---------------------------- net/bridge/br_input.c | 4 +- net/bridge/br_private.h | 5 ++- 4 files changed, 54 insertions(+), 70 deletions(-) commit 1427228d5869f5804b03d47acfa4a88122572a78 Author: Kalle Valo Date: Mon Feb 13 12:38:39 2017 +0200 ath10k: fix napi crash during rmmod when probe firmware fails This fixes the below crash when ath10k probe firmware fails, NAPI polling tries to access a rx ring resource which was never allocated. An easy way to reproduce this is easy to remove all the firmware files, load ath10k modules and ath10k will crash when calling 'rmmod ath10k_pci'. The fix is to call napi_enable() from ath10k_pci_hif_start() so that it matches with napi_disable() being called from ath10k_pci_hif_stop(). Big thanks to Mohammed Shafi Shajakhan who debugged this and provided first version of the fix. In this patch I just fix the actual problem in pci.c instead of having a workaround in core.c. BUG: unable to handle kernel NULL pointer dereference at (null) IP: __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core] __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core] Call Trace: [] ath10k_htt_rx_msdu_buff_replenish+0x42/0x90 [ath10k_core] [] ath10k_htt_txrx_compl_task+0x433/0x17d0 [ath10k_core] [] ? __wake_up_common+0x4d/0x80 [] ? cpu_load_update+0xdc/0x150 [] ? ath10k_pci_read32+0xd/0x10 [ath10k_pci] [] ath10k_pci_napi_poll+0x47/0x110 [ath10k_pci] [] net_rx_action+0x20f/0x370 Reported-by: Ben Greear Fixes: 3c97f5de1f28 ("ath10k: implement NAPI support") Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6d21911356377d23b74b0336d228a83a2dfac5cd Author: Amadeusz Sławiński Date: Mon Feb 13 12:38:39 2017 +0200 ath10k: fix comment I wanted to take a look and it's apparently in other header Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 182f1e5a626e6deb1e09a3d96a65cc64b31437f7 Author: Amadeusz Sławiński Date: Mon Feb 13 12:38:38 2017 +0200 ath10k: use size_t for len variables cleanup to consolidate type used for len variables Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 49 +++++++++++++++--------------- drivers/net/wireless/ath/ath10k/spectral.c | 7 +++-- 3 files changed, 29 insertions(+), 29 deletions(-) commit 56ac13bfc703d5189e8b91c5c2f512830d1cb013 Author: Amadeusz Sławiński Date: Mon Feb 13 12:38:37 2017 +0200 ath10k: remove ath10k_vif_to_arvif() it adds unnecessary level of indirection, while we just access structure field Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 68 +++++++++++++++++------------------ drivers/net/wireless/ath/ath10k/mac.h | 7 +--- drivers/net/wireless/ath/ath10k/p2p.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 4 files changed, 37 insertions(+), 42 deletions(-) commit 3ec72a2a1e5d79f64bbe7b89e1064f851d2620e9 Author: Richard Leitner Date: Fri Feb 10 09:19:27 2017 +0100 usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver This patch adds a driver for configuration of the Microchip USB251xB/xBi USB 2.0 hub controller series with USB 2.0 upstream connectivity, SMBus configuration interface and two to four USB 2.0 downstream ports. Furthermore add myself as a maintainer for this driver. The datasheet can be found at the manufacturers website, see [1]. All device-tree exposed configuration features have been tested on a i.MX6 platform with a USB2512B hub. [1] http://ww1.microchip.com/downloads/en/DeviceDoc/00001692C.pdf Signed-off-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 83 +++ MAINTAINERS | 8 + drivers/usb/misc/Kconfig | 9 + drivers/usb/misc/Makefile | 1 + drivers/usb/misc/usb251xb.c | 605 +++++++++++++++++++++ 5 files changed, 706 insertions(+) commit ef5ec7f08d6750b4786efe8dc76184fd86f85d4c Author: Colin Ian King Date: Sun Feb 12 18:35:18 2017 +0000 usb: misc: usbtest: remove redundant check on retval < 0 The check for retval being less than zero is always true since retval equal to -EPIPE at that point. Replace the existing conditional with just return retval. Detected with CoverityScan, CID#114349 ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf13a747b169e355f55ac5d6504700936d5298e3 Author: Arushi Singhal Date: Tue Feb 14 22:31:20 2017 +0530 staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) as reported by checkpatch.pl. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cec5bacd37784a1596d2f8fea377212948a0bf4 Author: Julia Lawall Date: Sun Feb 5 22:39:37 2017 +0100 tpm xen: drop unneeded chip variable The call that used chip was dropped in 1f0f30e404b3. Drop the leftover declaration and initialization. Signed-off-by: Julia Lawall Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/xen-tpmfront.c | 2 -- 1 file changed, 2 deletions(-) commit 39f5712b8f0167b446dd8a0a3754d6cd50e27dd8 Author: Dmitry Torokhov Date: Sun Feb 5 20:47:18 2017 -0800 tpm: fix misspelled "facilitate" in module parameter description I typoed "facilitate" as "faciltate" a few years back... Signed-off-by: Dmitry Torokhov Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5939eaf4f9d432586dd2cdeea778506471e8088e Author: Wei Yongjun Date: Tue Feb 7 15:51:47 2017 +0000 tpm_tis: fix the error handling of init_tis() Add the missing platform_driver_unregister() and remove the duplicate platform_device_unregister(force_pdev) in the error handling case. Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter") Cc: stable@vger.kernel.org Signed-off-by: Wei Yongjun Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 842954a8e3ec2d3a5e117c95533eb02ad73b3a2f Author: Shishir Kulkarni Date: Tue Feb 14 00:09:00 2017 +0530 Staging: rtl8188eu: core/rtw_led.c: format line to reduce it below 80 characters Fixes checkpatch.pl warning: "WARNING: line over 80 characters" Signed-off-by: Shishir Kulkarni Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_led.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ebd622860988b7c1ffd8bb22d6c0dfdecbda0c75 Author: Hendrik v. Raven Date: Tue Feb 14 10:35:15 2017 +0100 staging: bcm2835-audio: remove unused macro The VC_AUDIO_MAX_MSG_LEN macro is not used by anything in the bcm2835-audio driver. Signed-off-by: Hendrik v. Raven Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/vc_vchi_audioserv_defs.h | 3 --- 1 file changed, 3 deletions(-) commit 65ab7c241038f0486600288adc1b449b52ae3e16 Author: Abhijit Naik Date: Tue Feb 14 00:42:17 2017 +0530 staging: bcm2835-audio: Fixed checkpatch warning due to line spacing bcm2835-vchiq.c: fixing ERROR: Checkpatch warnings due to extra blank lines or absence of blank lines where needed. Signed-off-by: Abhijit Naik Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 4cf64a5f512da749ef635431fdf5da56bf1652af Author: Franck Demathieu Date: Mon Feb 13 09:35:19 2017 +0100 staging: nvec: Fix incorrect type of i2c address The i2c address is unsigned according to the dt-bindings. Fix sparse issue (-Wtypesign): drivers/staging/nvec/nvec.c:781:35: warning: incorrect type in argument 3 (different signedness) drivers/staging/nvec/nvec.c:781:35: expected unsigned int [usertype] *out_value drivers/staging/nvec/nvec.c:781:35: got int * Signed-off-by: Franck Demathieu Acked-by: Marc Dietrich Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07e9ef146071adf316312b3dd4abfe41c9a45a7d Author: Bogdan Purcareata Date: Mon Feb 13 18:40:41 2017 +0200 staging: fsl-mc: Add missing header Compiling the fsl-mc bus driver will yield a couple of static analysis errors: warning: symbol 'fsl_mc_msi_domain_alloc_irqs' was not declared warning: symbol 'fsl_mc_msi_domain_free_irqs' was not declared. warning: symbol 'its_fsl_mc_msi_init' was not declared. warning: symbol 'its_fsl_mc_msi_cleanup' was not declared. Since these are properly declared, but the header is not included, add it in the source files. This way the symbol is properly exported. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 1 + 2 files changed, 2 insertions(+) commit 17f84b793c01452e8802ef80324863b8da7d900b Author: Hauke Mehrtens Date: Tue Feb 14 00:31:11 2017 +0100 spi: lantiq-ssc: add support for Lantiq SSC SPI controller This driver supports the Lantiq SSC SPI controller in master mode. This controller is found on Intel (former Lantiq) SoCs like the Danube, Falcon, xRX200, xRX300. The hardware uses two hardware FIFOs one for received and one for transferred bytes. When the driver writes data into the transmit FIFO the complete word is taken from the FIFO into a shift register. The data from this shift register is then written to the wire. This driver uses the interrupts signaling the status of the FIFOs and not the shift register. It is also possible to use the interrupts for the shift register, but they will send a signal after every word. When using the interrupts for the shift register we get a signal when the last word is written into the shift register and not when it is written to the wire. After all FIFOs are empty the driver busy waits till the hardware is not busy any more and returns the transfer status. Signed-off-by: Daniel Schwierzeck Signed-off-by: Hauke Mehrtens Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-lantiq-ssc.txt | 29 + drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-lantiq-ssc.c | 983 +++++++++++++++++++++ 4 files changed, 1021 insertions(+) commit 2c9c5f5a7310b62af66d7ecf6486371626b9ebf0 Author: Karthik Nayak Date: Thu Feb 9 17:36:50 2017 +0530 staging: comedi: ni_pcimio: remove unused variable 'serial_number' The struct 'ni_private' holds the variable 'serial_number' which post assignment is never used. Remove the variable and code pertaining to obtaining its value. As a side note, this also fixes the following sparse error: drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: expected restricted __be32 [usertype] serial_number drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: got unsigned int Signed-off-by: Karthik Nayak Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcimio.c | 9 --------- drivers/staging/comedi/drivers/ni_stc.h | 1 - 2 files changed, 10 deletions(-) commit e1ea433d6ea42f0809a3214ca04053ad776ffcb0 Author: Saber Rezvani Date: Fri Feb 10 21:41:11 2017 +0330 staging: comedi: dyna_pci10xx: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dyna_pci10xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit df6ff8a1ee3c6cfd7957cb26357ddcbbe9c25348 Author: Saber Rezvani Date: Fri Feb 10 21:44:49 2017 +0330 staging: comedi: s626: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 020883e5e5b9e4d724c997fef6e74c1d1b6256bf Author: Saber Rezvani Date: Fri Feb 10 22:30:41 2017 +0330 staging: comedi: ni_pcidio.c: Spaces preferred around operators Fix the checkpatch.pl issue: CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcidio.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 16cc73893f7796a72f3e8b9c9ec524bb131de855 Author: Saber Rezvani Date: Fri Feb 10 22:58:00 2017 +0330 staging: comedi: ni_pcidio: blank line issues Fix the checkpatch.pl issue: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcidio.c | 2 ++ 1 file changed, 2 insertions(+) commit 91eaa475e287e7cf87959d68fb273e4f092897f4 Author: Volodymyr Bendiuga Date: Tue Feb 14 11:29:30 2017 +0100 net:dsa:mv88e6xxx: use watchdog ops for 6097 chip mv88e6097 chip requires watchdog_ops to be set. Signed-off-by: Volodymyr Bendiuga Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) commit a748d60df32ec5da31626a140be1795eefa04282 Author: Talat Batheesh Date: Tue Feb 14 07:24:53 2017 +0200 IB/mlx4: Take source GID by index from HW GID table Previously, we used the HW GID index in order to search the source GID in the software GID cached table. In some cases, for example when the MAC Address of the network interface is changed, the GID cached table saves the old-IPv6-link-local GID at the end of the table. When returning the old MAC address, the software GID cached table tries to add the new IPv6-link-local GID, and when it identifies that the GID already exists, the software GID cached does not add it. Thus a mismatch occurs between the HW and the SW GID tables. It resulted with sending traffic with the wrong source GID. This commit fixes the issue by taking both from the HW table. The problem can be reproduced with the following scenario: Client: # ifconfig ens6 2.2.2.5 # ifconfig ens6 inet6 add 2001:0db8:0:f101::5/64 # ifconfig ens6 hw ether f4:52:14:61:a0:71 # ifconfig ens6 inet6 del 2001:0db8:0:f101::5/64 # ifconfig ens6 inet6 add 2001:0db8:0:f101::5/64 # ucmatose -f ipv6 -b 2001:0db8:0:f101::5 -s 2001:0db8:0:f101::6 -p 20156 Server: # ucmatose -f ipv6 -b 2001:0db8:0:f101::6 -p 20156 Fixes: 4c3eb3ca1396 ('IB/mlx4: Add VLAN support for IBoE') Signed-off-by: Talat Batheesh Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 56 +++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-) commit d8030b0de03ec6bdf3665e1d915fa0f02e5ec89d Author: Eli Cohen Date: Thu Feb 9 19:31:47 2017 +0200 IB/mlx5: Fix blue flame buffer size calculation A blue flame register is comprised of two buffers of equal size. Fixes: 5fe9dec0d0454 ("IB/mlx5: Use blue flame register allocator in mlx5_ib") Signed-off-by: Eli Cohen Reviewed-by: Noa Osherovich Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 850b74151433966cff84801867e2a210a1c830bf Author: Leon Romanovsky Date: Wed Jan 25 20:26:18 2017 +0200 IB/mlx4: Remove unused variable from function declaration Remove unused netw_view parameter from eth_link_query_port() function. Reported-by: Shiraz Saleem Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7cf52c249d7aa797ea27808e1526604309ec142 Author: Jiri Pirko Date: Tue Feb 14 16:27:13 2017 +0100 sched: Fix accidental removal of errout goto Bring back the goto that was removed by accident. Reported-by: Colin Ian King Fixes: 40c81b25b16c ("sched: check negative err value to safe one level of indent") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+) commit c4550c63b363914071d63a36e5bedcfe22057940 Author: Or Gerlitz Date: Tue Jan 24 13:02:39 2017 +0200 IB: Query ports via the core instead of direct into the driver Change the drivers to call ib_query_port in their get port immutable handler instead of their own query port handler. Doing this required to set the core cap flags of this device before the ib_query_port call is made, since the IB core might need these caps to serve the port query. Drivers are ensured by the IB core that the port attributes passed to the port query verb implementation are zero, and hence we removed the zeroing from the drivers. This patch doesn't add any new functionality. Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_provider.c | 7 ++++--- drivers/infiniband/hw/cxgb4/provider.c | 8 ++++---- drivers/infiniband/hw/hfi1/verbs.c | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 7 ++++--- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 8 ++++---- drivers/infiniband/hw/mlx4/alias_GUID.c | 1 + drivers/infiniband/hw/mlx4/main.c | 18 +++++++++--------- drivers/infiniband/hw/mlx4/sysfs.c | 1 + drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 11 +++++++---- drivers/infiniband/hw/mthca/mthca_provider.c | 9 +++++---- drivers/infiniband/hw/nes/nes_verbs.c | 5 +++-- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 9 +++++---- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 1 + drivers/infiniband/hw/qedr/verbs.c | 9 +++++---- drivers/infiniband/hw/qib/qib_verbs.c | 1 + drivers/infiniband/hw/usnic/usnic_ib_main.c | 5 +++-- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 5 +++-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 4 ++-- drivers/infiniband/sw/rdmavt/vt.c | 7 ++++--- drivers/infiniband/sw/rxe/rxe_verbs.c | 6 ++++-- 22 files changed, 73 insertions(+), 54 deletions(-) commit ce1e055fb9aba56c80d84f63edfa102691f63d41 Author: Or Gerlitz Date: Tue Jan 24 13:02:38 2017 +0200 IB: Add protocol for USNIC Add protocol definition for the proprietary the USNIC driver. Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Reviewed-by: Christian Benvenuti Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_main.c | 1 + include/rdma/ib_verbs.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit bc63f9d5580696a49d27056293e3ccd48b8b917e Author: Or Gerlitz Date: Tue Jan 24 13:02:37 2017 +0200 IB/mlx4: Support raw packet protocol Mark support for the new raw packet protocol on Eth ports. Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 72cd57178f3447b612f136c7a215418b5a20bf3d Author: Or Gerlitz Date: Tue Jan 24 13:02:36 2017 +0200 IB/mlx5: Support raw packet protocol Mark support for the new raw packet protocol on Eth ports. Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit aa773bd49541b62274c3624f9b28b2f813ba6c90 Author: Or Gerlitz Date: Tue Jan 24 13:02:35 2017 +0200 IB/core: Add raw packet protocol Define raw packet protocol which comes to denote this port supports working with raw ethernet frames, e.g as done with RAW_PACKET QPs. Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 81713d3788d2e6bc005f15ee1c59d0eb06050a6b Author: Artemy Kovalyov Date: Wed Jan 18 16:58:11 2017 +0200 IB/mlx5: Add implicit MR support Add implicit MR, covering entire user address space. The MR is implemented as an indirect KSM MR consisting of 1GB direct MRs. Pages and direct MRs are added/removed to MR by ODP. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 20 +- drivers/infiniband/hw/mlx5/mr.c | 33 ++- drivers/infiniband/hw/mlx5/odp.c | 505 ++++++++++++++++++++++++++++++++--- include/linux/mlx5/driver.h | 2 + 5 files changed, 513 insertions(+), 49 deletions(-) commit 49780d42dfc9ec0f4090c32ca59688449da1a1cd Author: Artemy Kovalyov Date: Wed Jan 18 16:58:10 2017 +0200 IB/mlx5: Expose MR cache for mlx5_ib Allow other parts of mlx5_ib to use MR cache mechanism. * Add new functions mlx5_mr_cache_alloc and mlx5_mr_cache_free * Traditional MTT MKey buckets are limited by MAX_UMR_CACHE_ENTRY Additinal buckets may be added above. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +++- drivers/infiniband/hw/mlx5/mr.c | 99 ++++++++++++++++++++++++++---------- include/linux/mlx5/driver.h | 3 +- 3 files changed, 82 insertions(+), 29 deletions(-) commit 94990b498969b420949a04294618f9509466b896 Author: Artemy Kovalyov Date: Wed Jan 18 16:58:09 2017 +0200 IB/mlx5: Add null_mkey access Add mlx5_cmd_null_mkey() function to access null_mkey information from firmware. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/Makefile | 2 +- drivers/infiniband/hw/mlx5/cmd.c | 48 +++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/cmd.h | 40 +++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) commit d9d0674c0f8a950634fd2166a291e93e606a576c Author: Artemy Kovalyov Date: Wed Jan 18 16:58:08 2017 +0200 IB/umem: Indicate that process is being terminated When process is killed while pagefault operation still in progress - function will fail. In this specific case we don't want any warnings in dmesg to avoid log analyzers false alerts. So we need distinct error code for this case. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem_odp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d07d1d70ce1ad1c525f51f459ce36ca49ec2bf48 Author: Artemy Kovalyov Date: Wed Jan 18 16:58:07 2017 +0200 IB/umem: Update on demand page (ODP) support Currently ODP MR may explicitly register virtual address space area of limited length. This change allows MR to cover entire process virtual address space dynamicaly adding/removing translation entries to device MTT. Add following changes to support implicit MR: * Allow umem to be zero size to back-up implicit MR. * Add new function ib_alloc_odp_umem() to add virtual memory regions to implicit MR dynamically on demand. * Add new function rbt_ib_umem_lookup() to find dynamically added virtual memory regions. * Expose function rbt_ib_umem_for_each_in_range() to other modules and make it safe Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 3 -- drivers/infiniband/core/umem_odp.c | 87 +++++++++++++++++++++++++++++++---- drivers/infiniband/core/umem_rbtree.c | 21 +++++++-- include/rdma/ib_umem_odp.h | 21 +++++++-- 4 files changed, 113 insertions(+), 19 deletions(-) commit 25bf14d6f5898a59325f3ecabda7695565776594 Author: Artemy Kovalyov Date: Wed Jan 18 16:58:06 2017 +0200 IB/core: Add implicit MR flag Add flag IB_ODP_SUPPORT_IMPLICIT indicating implicit MR supported. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4be6da1e5b8dde8b163c540fca5745644a6a9e00 Author: Noa Osherovich Date: Wed Jan 18 15:40:04 2017 +0200 IB/mlx5: Support creation of a WQ with scatter FCS offload Add support for creation of a WQ with scatter FCS capability, if this capability is supported by the hardware. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e4cc4fa7cca9ac7d7c3abea7d6c90db1c519d6c6 Author: Noa Osherovich Date: Wed Jan 18 15:40:03 2017 +0200 IB/mlx5: Enable QP creation with cvlan offload Enable creating a RAW Ethernet QP with cvlan stripping offload when it's supported by the hardware. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 ++++++ drivers/infiniband/hw/mlx5/qp.c | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit b1f74a8437a38d1c0139175f2ad469d2517a7882 Author: Noa Osherovich Date: Wed Jan 18 15:40:02 2017 +0200 IB/mlx5: Enable WQ creation and modification with cvlan offload Allow creating a WQ with cvlan stripping considering device's capabilities. The default value was fixed to disable vlan stripping till was asked explicitly. In addition, allow modification of a WQ to turn on/off this property. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit e8161334403ed34a9214bcce517d50bbe3e02b97 Author: Noa Osherovich Date: Wed Jan 18 15:40:01 2017 +0200 IB/mlx5: Expose vlan offloads capabilities Check device's capabilities and report which raw packet capabilities are supported. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 9e1b161f3b8f14f2459fa20c26e41e40e049d90e Author: Noa Osherovich Date: Wed Jan 18 15:40:00 2017 +0200 IB/uverbs: Enable QP creation with cvlan offload Enable user applications to create a QP with cvlan stripping offload. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af1cb95d2e34133e0cf7f48d6045da888414b867 Author: Noa Osherovich Date: Wed Jan 18 15:39:59 2017 +0200 IB/uverbs: Enable WQ creation and modification with cvlan offload Enable user space application via WQ creation and modification to turn on and off cvlan offload. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 9 ++++++++- include/uapi/rdma/ib_user_verbs.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 5f23d4265f8ee4d7b76356992931abec7888d372 Author: Noa Osherovich Date: Wed Jan 18 15:39:58 2017 +0200 IB/uverbs: Expose vlan offloads capabilities Expose raw packet capabilities to user space as part of query device. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 6 ++++++ include/uapi/rdma/ib_user_verbs.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 27b0df1175d543c46f63de6dccba98d0e5cf2276 Author: Noa Osherovich Date: Wed Jan 18 15:39:57 2017 +0200 IB/core: Add scatter FCS flag to use in WQ creation Add a new creation flag to set the scatter FCS capability of a WQ. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 9c2b270e69da3ea3ef76f1c14ba4ee7ca60863fd Author: Noa Osherovich Date: Wed Jan 18 15:39:56 2017 +0200 IB/core: Enable QP creation with cvlan offload Add a QP creation flag to support cvlan stripping, it's applicable for RAW Ethernet QP. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 10bac72be10542a29169582e6f74f88bcdfdf19f Author: Noa Osherovich Date: Wed Jan 18 15:39:55 2017 +0200 IB/core: Enable WQ creation and modification with cvlan offload Enable WQ creation and modification with cvlan stripping offload. This includes: - Adding WQ creation flags. - Extending modify WQ to get flags and flags mask to enable turning it on and off. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ebaaee253ad3a3c573ab7d3d77e849056bdfa9ea Author: Noa Osherovich Date: Wed Jan 18 15:39:54 2017 +0200 IB/core: Expose vlan offloads capabilities Expose raw packet capabilities in the core layer to enable a device to report it. Two existing capabilities, scatter FCS and IP CSUM were added to this field for a better user experience by exposing the raw packet caps from one location. This field will serve also for future capabilities for raw packet QP. A new capability was introduced - cvlan stripping, which is the device's ability to remove cvlan tag from an incoming packet and report it in the matching work completion. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 23a6964e3adb0796e1633562a574839b92360cb6 Author: Majd Dibbiny Date: Wed Jan 18 15:25:10 2017 +0200 IB/mlx5: Add port counter support for Receive WQs Counters weren't updated due to Receive WQs' traffic since the counter-id was not associated with the RQ. Added support for associating the q-counter-id with the Receive WQ. The attachment is done only when changing WQ's state from RESET to READY in modify-WQ command. FW support is required for the above, without this support Receive WQ counters will not count. Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 12 +++++++++++- include/linux/mlx5/mlx5_ifc.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) commit 7c16f47779498650e9f11a395f8d63accedf35a3 Author: Kamal Heib Date: Wed Jan 18 15:25:09 2017 +0200 IB/mlx5: Expose Q counters groups only if they are supported by FW This patch modify the Q counters implementation, so each one of the three Q counters groups will be exposed by the driver only if they are supported by the firmware. Signed-off-by: Kamal Heib Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 158 ++++++++++++++++++++++++++--------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +- drivers/infiniband/hw/mlx5/qp.c | 4 +- 3 files changed, 128 insertions(+), 43 deletions(-) commit 0d06863f903ac5f4f6efb0273079d27de3e53a28 Author: Theodore Ts'o Date: Tue Feb 14 11:31:15 2017 -0500 ext4: don't BUG when truncating encrypted inodes on the orphan list Fix a BUG when the kernel tries to mount a file system constructed as follows: echo foo > foo.txt mke2fs -Fq -t ext4 -O encrypt foo.img 100 debugfs -w foo.img << EOF write foo.txt a set_inode_field a i_flags 0x80800 set_super_value s_last_orphan 12 quit EOF root@kvm-xfstests:~# mount -o loop foo.img /mnt [ 160.238770] ------------[ cut here ]------------ [ 160.240106] kernel BUG at /usr/projects/linux/ext4/fs/ext4/inode.c:3874! [ 160.240106] invalid opcode: 0000 [#1] SMP [ 160.240106] Modules linked in: [ 160.240106] CPU: 0 PID: 2547 Comm: mount Tainted: G W 4.10.0-rc3-00034-gcdd33b941b67 #227 [ 160.240106] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1 04/01/2014 [ 160.240106] task: f4518000 task.stack: f47b6000 [ 160.240106] EIP: ext4_block_zero_page_range+0x1a7/0x2b4 [ 160.240106] EFLAGS: 00010246 CPU: 0 [ 160.240106] EAX: 00000001 EBX: f7be4b50 ECX: f47b7dc0 EDX: 00000007 [ 160.240106] ESI: f43b05a8 EDI: f43babec EBP: f47b7dd0 ESP: f47b7dac [ 160.240106] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 160.240106] CR0: 80050033 CR2: bfd85b08 CR3: 34a00680 CR4: 000006f0 [ 160.240106] Call Trace: [ 160.240106] ext4_truncate+0x1e9/0x3e5 [ 160.240106] ext4_fill_super+0x286f/0x2b1e [ 160.240106] ? set_blocksize+0x2e/0x7e [ 160.240106] mount_bdev+0x114/0x15f [ 160.240106] ext4_mount+0x15/0x17 [ 160.240106] ? ext4_calculate_overhead+0x39d/0x39d [ 160.240106] mount_fs+0x58/0x115 [ 160.240106] vfs_kern_mount+0x4b/0xae [ 160.240106] do_mount+0x671/0x8c3 [ 160.240106] ? _copy_from_user+0x70/0x83 [ 160.240106] ? strndup_user+0x31/0x46 [ 160.240106] SyS_mount+0x57/0x7b [ 160.240106] do_int80_syscall_32+0x4f/0x61 [ 160.240106] entry_INT80_32+0x2f/0x2f [ 160.240106] EIP: 0xb76b919e [ 160.240106] EFLAGS: 00000246 CPU: 0 [ 160.240106] EAX: ffffffda EBX: 08053838 ECX: 08052188 EDX: 080537e8 [ 160.240106] ESI: c0ed0000 EDI: 00000000 EBP: 080537e8 ESP: bfa13660 [ 160.240106] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b [ 160.240106] Code: 59 8b 00 a8 01 0f 84 09 01 00 00 8b 07 66 25 00 f0 66 3d 00 80 75 61 89 f8 e8 3e e2 ff ff 84 c0 74 56 83 bf 48 02 00 00 00 75 02 <0f> 0b 81 7d e8 00 10 00 00 74 02 0f 0b 8b 43 04 8b 53 08 31 c9 [ 160.240106] EIP: ext4_block_zero_page_range+0x1a7/0x2b4 SS:ESP: 0068:f47b7dac [ 160.317241] ---[ end trace d6a773a375c810a5 ]--- The problem is that when the kernel tries to truncate an inode in ext4_truncate(), it tries to clear any on-disk data beyond i_size. Without the encryption key, it can't do that, and so it triggers a BUG. E2fsck does *not* provide this service, and in practice most file systems have their orphan list processed by e2fsck, so to avoid crashing, this patch skips this step if we don't have access to the encryption key (which is the case when processing the orphan list; in all other cases, we will have the encryption key, or the kernel wouldn't have allowed the file to be opened). An open question is whether the fact that e2fsck isn't clearing the bytes beyond i_size causing problems --- and if we've lived with it not doing it for so long, can we drop this from the kernel replay of the orphan list in all cases (not just when we don't have the key for encrypted inodes). Addresses-Google-Bug: #35209576 Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit 853fe1bf7554155376bb3b231112cdff9ff79177 Author: Kees Cook Date: Mon Feb 13 16:25:26 2017 -0800 cdrom: Make device operations read-only Since function tables are a common target for attackers, it's best to keep them in read-only memory. As such, this makes the CDROM device ops tables const. This drops additionally n_minors, since it isn't used meaningfully, and sets the only user of cdrom_dummy_generic_packet explicitly so the variables can all be const. Inspired by similar changes in grsecurity/PaX. Signed-off-by: Kees Cook Acked-by: David S. Miller Signed-off-by: Jens Axboe Documentation/cdrom/cdrom-standard.tex | 9 +----- drivers/block/paride/pcd.c | 2 +- drivers/cdrom/cdrom.c | 58 ++++++++++++++++------------------ drivers/cdrom/gdrom.c | 4 +-- drivers/ide/ide-cd.c | 2 +- drivers/scsi/sr.c | 2 +- include/linux/cdrom.h | 5 +-- 7 files changed, 37 insertions(+), 45 deletions(-) commit 1ffd3a26f890222e49c4f4782763e2063026b611 Author: Leon Romanovsky Date: Wed Jan 18 14:59:51 2017 +0200 IB/mlx5: Replace ENOTSUPP usage with EOPNOTSUPP Flow steering is supposed to return EOPNOTSUPP error for unsupported fields and not ENOTSUPP error. Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2ac693f9953a2787f942abcbea5d1dc22a310932 Author: Moses Reuben Date: Wed Jan 18 14:59:50 2017 +0200 IB/mlx5: Add flow tag support Set flow tag in flow table entry, when IB_FLOW_SPEC_ACTION_TAG is part of the flow specifications. Flow tag doesn't support multicast flows, so it's passing to hardware only when used. Signed-off-by: Moses Reuben Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 94e03f11ad1f8c947b69fa187412ff04783b2a96 Author: Moses Reuben Date: Wed Jan 18 14:59:49 2017 +0200 IB/uverbs: Add support for flow tag The struct ib_uverbs_flow_spec_action_tag associates a tag_id with the flow defined by any number of other flow_spec entries which can reference L2, L3, and L4 packet contents. Use of ib_uverbs_flow_spec_action_tag allows the consumer to identify the set of rules which where matched by the packet by examining the tag_id in the CQE. Signed-off-by: Moses Reuben Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_cmd.c | 35 +++++++++++++++++++++++++++++++++-- include/uapi/rdma/ib_user_verbs.h | 13 +++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) commit 460d019860ccb8735cf577394108270a5bc178b8 Author: Moses Reuben Date: Wed Jan 18 14:59:48 2017 +0200 IB/core: Introduce flow tag specification This specification identifies flow with a specific tag-id. This tag-id will be reported in the CQE. Signed-off-by: Moses Reuben Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit e04a01837729663572baf7164100e28265de7ed8 Author: Maor Gottlieb Date: Wed Jan 18 14:59:47 2017 +0200 net/mlx5: Consolidate flow rules regardless their flow tag Flow rules with same match criteria and value should be mapped to the same flow table entry regardless the flow tag identifier. Flow tag is part of flow table entry context and not of the destination, therefore we should return error when we try to add destination to flow table entry with different flow tag. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d1a987f35ebf859a771ac530e95a89933b6fcce8 Author: Jens Axboe Date: Tue Feb 14 08:16:41 2017 -0700 elevator: fix loading wrong elevator type for blk-mq devices The old elevator= boot parameter blindly attempts to load the same scheduler for mq and !mq devices, leading to a crash if we specify the wrong one. Ensure that we only apply this boot parameter to old !mq devices. Signed-off-by: Jens Axboe block/elevator.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5abb0da9cd438483d80517b1d5f0a62a2f818426 Author: Leon Romanovsky Date: Wed Jan 18 14:10:36 2017 +0200 IB/mlx5: Remove deprecated module parameter Commit 9603b61de1ee ("mlx5: Move pci device handling from mlx5_ib to mlx5_core") moved prof_sel module parameter from mlx5_ib to mlx5_core and marked it as deprecated in 2014. Three years after deprecation, it is time to remove the deprecated module parameter. Signed-off-by: Leon Romanovsky Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 7 ------- 1 file changed, 7 deletions(-) commit ed88451e1f2d400fd6a743d0a481631cf9f97550 Author: Majd Dibbiny Date: Wed Jan 18 14:10:35 2017 +0200 IB/mlx5: Assign DSCP for R-RoCE QPs Address Path For Routable RoCE QPs, the DSCP should be set in the QP's address path. The DSCP's value is derived from the traffic class. Fixes: 2811ba51b049 ("IB/mlx5: Add RoCE fields to Address Vector") Cc: Achiad Shochat Signed-off-by: Majd Dibbiny Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 21 +++++++++++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 ++ drivers/infiniband/hw/mlx5/qp.c | 7 +++++++ 3 files changed, 30 insertions(+) commit 1e0e50b6177bbc83e8cf673a29b2842c769f90f4 Author: Maor Gottlieb Date: Wed Jan 18 14:10:34 2017 +0200 IB/mlx5: Avoid SMP MADs from VFs According to the device specification, we need to check that the has_smi bit is set in vport context before allowing send SMP MADs from VF. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Maor Gottlieb Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c43f1112c068f3b4b20a0a9d461c341d9caeb376 Author: Maor Gottlieb Date: Wed Jan 18 14:10:33 2017 +0200 IB/mlx5: Add additional checks before processing MADs Check the has_smi bit in vport context and class version of MADs before allowing MADs processing to take place. MAD_IFC SMI commands can be executed only if smi bit is set. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Maor Gottlieb Signed-off-by: Parvi Kaustubhi Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mad.c | 12 ++++++++++++ drivers/infiniband/hw/mlx5/main.c | 33 +++++++++++++++++++++++++++++++++ include/linux/mlx5/driver.h | 1 + 3 files changed, 46 insertions(+) commit 45bded2c216da6010184ac5ebe88c27f73439009 Author: Kamal Heib Date: Wed Jan 18 14:10:32 2017 +0200 IB/mlx5: Verify that Q counters are supported Make sure that the Q counters are supported by the FW before trying to allocate/deallocte them, this will avoid driver load failure when they aren't supported by the FW. Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters') Cc: # v4.7+ Signed-off-by: Kamal Heib Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 12bbf1ea7e3b35892dbb8636b978160bc9576b61 Author: Leon Romanovsky Date: Wed Jan 18 14:10:31 2017 +0200 IB/mlx5: Return error for unsupported signature type In case of unsupported singature, we returned positive value, while the better approach is to return -EINVAL. In addition, in this change, the error print is enriched to provide an actual supplied signature type. Fixes: e6631814fb3a ("IB/mlx5: Support IB_WR_REG_SIG_MR") Cc: Sagi Grimberg Reported-by: Dan Carpenter Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0fd27a88c2e4f548937fd7d93fc6e65c4ad7c278 Author: Leon Romanovsky Date: Wed Jan 18 14:10:30 2017 +0200 IB/mlx5: Fix out-of-bound access When we initialize buffer to create SRQ in kernel, the number of pages was less than actually used in following mlx5_fill_page_array(). Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Cc: # v3.10+ Signed-off-by: Leon Romanovsky Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/srq.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 68bd42d97c30d51217b8c3b2b22fede577d8371c Author: Michael Ellerman Date: Thu Feb 9 19:56:30 2017 +1100 selftests/powerpc: Fix remaining fallout from recent changes In benchmarks we need to use $(TEST_GEN_PROGS) after we include lib.mk, because lib.mk does the substitution to add $(OUTPUT). In math the vmx and fpu names were typoed so they no longer matched correctly, put back the 'v' and 'f'. In tm we need to substitute $(OUTPUT) into SIGNAL_CONTEXT_CHK_TESTS so that the rule matches. In pmu there is an extraneous ':' on the end of $$BUILD_TARGET for the clean and install rules, which breaks the logic in the child Makefiles. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan tools/testing/selftests/powerpc/benchmarks/Makefile | 4 ++-- tools/testing/selftests/powerpc/math/Makefile | 16 ++++++++-------- tools/testing/selftests/powerpc/pmu/Makefile | 4 ++-- tools/testing/selftests/powerpc/tm/Makefile | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) commit 2e8ec87dad68059876c6079e27912d819061bb4e Author: Michael Ellerman Date: Thu Feb 9 19:56:29 2017 +1100 selftests/powerpc: Fix the clean rule since recent changes The clean rule is broken for the powerpc tests: make[1]: Entering directory 'tools/testing/selftests/powerpc' Makefile:63: warning: overriding recipe for target 'clean' ../lib.mk:51: warning: ignoring old recipe for target 'clean' /bin/sh: 3: Syntax error: end of file unexpected (expecting "done") Makefile:63: recipe for target 'clean' failed Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan tools/testing/selftests/powerpc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 634ce97cdfa94a0c5444489b656a662fcc344536 Author: Michael Ellerman Date: Thu Feb 9 19:56:28 2017 +1100 selftests: Fix the .S and .S -> .o rules Both these rules incorrectly use $< (first prerequisite) rather than $^ (all prerequisites), meaning they don't work if we're using more than one .S file as input. Switch them to using $^. They also don't include $(CPPFLAGS) and other variables used in the default rules, which breaks targets that require those. Fix that by using the builtin $(COMPILE.S) and $(LINK.S) rules. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman Tested by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2047f1d8ba287d208272b6e26360d1a53f7ebf7d Author: Michael Ellerman Date: Thu Feb 9 19:56:27 2017 +1100 selftests: Fix the .c linking rule Currently we can't build some tests, for example: $ make -C tools/testing/selftests/ TARGETS=vm ... gcc -Wall -I ../../../../usr/include -lrt -lpthread ../../../../usr/include/linux/kernel.h userfaultfd.c -o tools/testing/selftests/vm/userfaultfd /tmp/ccmOkQSM.o: In function `stress': userfaultfd.c:(.text+0xc60): undefined reference to `pthread_create' userfaultfd.c:(.text+0xca5): undefined reference to `pthread_create' userfaultfd.c:(.text+0xcee): undefined reference to `pthread_create' userfaultfd.c:(.text+0xd30): undefined reference to `pthread_create' userfaultfd.c:(.text+0xd77): undefined reference to `pthread_join' userfaultfd.c:(.text+0xe7d): undefined reference to `pthread_join' userfaultfd.c:(.text+0xe9f): undefined reference to `pthread_cancel' userfaultfd.c:(.text+0xec6): undefined reference to `pthread_join' userfaultfd.c:(.text+0xf14): undefined reference to `pthread_join' /tmp/ccmOkQSM.o: In function `userfaultfd_stress': userfaultfd.c:(.text+0x13e2): undefined reference to `pthread_attr_setstacksize' collect2: error: ld returned 1 exit status This is because the rule for linking .c files to binaries is incorrect. The first bug is that it uses $< (first prerequisite) instead of $^ (all preqrequisites), fix it by using ^$. Secondly the ordering of the prerequisites vs $(LDLIBS) is wrong, meaning on toolchains that use --as-needed we fail to link (as above). Fix that by placing $(LDLIBS) *after* ^$. Finally switch to using the default rule $(LINK.c), so that we get $(CPPFLAGS) etc. included. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman Tested by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d83c3ba0b9263592d1314df924b6c568f7683d29 Author: Michael Ellerman Date: Thu Feb 9 19:56:26 2017 +1100 selftests: Fix selftests build to just build, not run tests In commit 88baa78d1f31 ("selftests: remove duplicated all and clean target"), the "all" target was removed from individual Makefiles and added to lib.mk. However the "all" target was added to lib.mk *after* the existing "runtests" target. This means "runtests" becomes the first (default) target for most of our Makefiles. This has the effect of causing a plain "make" to build *and run* the tests. Which is at best rude, but depending on which tests are run could oops someone's build machine. $ make -C tools/testing/selftests/ ... make[1]: Entering directory 'tools/testing/selftests/bpf' gcc -Wall -O2 -I../../../../usr/include test_verifier.c -o tools/testing/selftests/bpf/test_verifier gcc -Wall -O2 -I../../../../usr/include test_maps.c -o tools/testing/selftests/bpf/test_maps gcc -Wall -O2 -I../../../../usr/include test_lru_map.c -o tools/testing/selftests/bpf/test_lru_map #0 add+sub+mul FAIL Failed to load prog 'Function not implemented'! #1 unreachable FAIL Unexpected error message! #2 unreachable2 FAIL ... Fix it by moving the "all" target to the start of lib.mk, making it the default target. Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target") Signed-off-by: Michael Ellerman Tested by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 592e8b3226a2b6d116589908d96c45fa13302ad7 Author: Selvin Xavier Date: Fri Feb 10 03:19:53 2017 -0800 RDMA/bnxt_re: Add bnxt_re driver build support Makefile and Kconfig changes for enabling bnxt_re compilation Signed-off-by: Devesh Sharma Signed-off-by: Somnath Kotur Signed-off-by: Sriharsha Basavapatna Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford MAINTAINERS | 11 +++++++++++ drivers/infiniband/Kconfig | 2 ++ drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/bnxt_re/Kconfig | 9 +++++++++ drivers/infiniband/hw/bnxt_re/Makefile | 6 ++++++ 5 files changed, 29 insertions(+) commit 1ac5a404797523cedaf424a3aaa3cf8f9548dff8 Author: Selvin Xavier Date: Fri Feb 10 03:19:33 2017 -0800 RDMA/bnxt_re: Add bnxt_re RoCE driver This patch introduces the RoCE driver for the Broadcom NetXtreme-E 10/25/40/50G RoCE HCAs. The RoCE driver is a two part driver that relies on the parent bnxt_en NIC driver to operate. The changes needed in the bnxt_en driver have already been incorporated via Dave Miller's net tree into the mainline kernel. The vendor official git repository for this driver is available on github as: https://github.com/Broadcom/linux-rdma-nxt/ Signed-off-by: Eddie Wai Signed-off-by: Devesh Sharma Signed-off-by: Somnath Kotur Signed-off-by: Sriharsha Basavapatna Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 146 ++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 3202 ++++++++++++++++++++++++++++ drivers/infiniband/hw/bnxt_re/ib_verbs.h | 197 ++ drivers/infiniband/hw/bnxt_re/main.c | 1315 ++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2167 +++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 439 ++++ drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 694 ++++++ drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 231 ++ drivers/infiniband/hw/bnxt_re/qplib_res.c | 825 +++++++ drivers/infiniband/hw/bnxt_re/qplib_res.h | 223 ++ drivers/infiniband/hw/bnxt_re/qplib_sp.c | 838 ++++++++ drivers/infiniband/hw/bnxt_re/qplib_sp.h | 160 ++ drivers/infiniband/hw/bnxt_re/roce_hsi.h | 2821 ++++++++++++++++++++++++ include/uapi/rdma/bnxt_re-abi.h | 89 + 14 files changed, 13347 insertions(+) commit 873695b301df51dc9dac2573669ac8777d37bec3 Author: Liu Bo Date: Thu Feb 2 17:49:22 2017 -0800 Btrfs: create helper for processing bits on contiguous pages This introduces a new helper which can be used to process pages bits. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit e4c3b2dcd1449def1229efb138da7cb28c796c71 Author: Liu Bo Date: Mon Jan 30 12:25:28 2017 -0800 Btrfs: kill trans in run_delalloc_nocow and btrfs_cross_ref_exist run_delalloc_nocow has used trans in two places where they don't actually need @trans. For btrfs_lookup_file_extent, we search for file extents without COWing anything, and for btrfs_cross_ref_exist, the only place where we need @trans is deferencing it in order to get running_transaction which we could easily get from the global fs_info. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 22 ++++++++++++---------- fs/btrfs/inode.c | 38 +++----------------------------------- 3 files changed, 16 insertions(+), 47 deletions(-) commit f72ad18e996338a8033aeb981e645f8dbf4e22c1 Author: Liu Bo Date: Mon Jan 30 12:24:37 2017 -0800 Btrfs: pass delayed_refs directly to btrfs_find_delayed_ref_head All we need is @delayed_refs, all callers have get it ahead of calling btrfs_find_delayed_ref_head since lock needs to be acquired firstly, there is no reason to deference it again inside the function. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 2 +- fs/btrfs/delayed-ref.c | 5 +---- fs/btrfs/delayed-ref.h | 3 ++- fs/btrfs/extent-tree.c | 6 +++--- 4 files changed, 7 insertions(+), 9 deletions(-) commit d07b85284f83dee7955cb43dc66a37542a725c12 Author: Liu Bo Date: Mon Jan 30 12:23:42 2017 -0800 Btrfs: remove unused trans in read_block_for_search @trans is not used at all, this removes it. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit bcf934894f1f4505d0186ec7569949de6e8dd97c Author: Liu Bo Date: Wed Jan 25 17:15:54 2017 -0800 Btrfs: cleanup unused cached_state in __extent_writepage_io @cached_state is no more required in __extent_writepage_io, also remove the goto label. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 003d7c59e8afc9b2c6b0d163e8e115406c4faecc Author: Jeff Mahoney Date: Wed Jan 25 09:50:33 2017 -0500 btrfs: allow unlink to exceed subvolume quota Once a qgroup limit is exceeded, it's impossible to restore normal operation to the subvolume without modifying the limit or removing the subvolume. This is a surprising situation for many users used to the typical workflow with quotas on other file systems where it's possible to remove files until the used space is back under the limit. When we go to unlink a file and start the transaction, we'll hit the qgroup limit while trying to reserve space for the items we'll modify while removing the file. We discussed last month how best to handle this situation and agreed that there is no perfect solution. The best principle-of-least-surprise solution is to handle it similarly to how we already handle ENOSPC when unlinking, which is to allow the operation to succeed with the expectation that it will ultimately release space under most circumstances. This patch modifies the transaction start path to select whether to honor the qgroups limits. btrfs_start_transaction_fallback_global_rsv is the only caller that skips enforcement. The reservation and tracking still happens normally -- it just skips the enforcement step. Signed-off-by: Jeff Mahoney Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/qgroup.c | 33 +++++++++++++++++++-------------- fs/btrfs/qgroup.h | 3 ++- fs/btrfs/transaction.c | 34 ++++++++++++++++++++++------------ 4 files changed, 45 insertions(+), 29 deletions(-) commit 9a9239acb465df1f6aab379c77befd5cde98c9df Author: Liu Bo Date: Tue Jan 24 15:58:51 2017 -0800 Btrfs: fix wrong argument for btrfs_lookup_ordered_range Commit Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units" (d0b7da88) did this, but btrfs_lookup_ordered_range expects a 'length' rather than a 'page_end'. Signed-off-by: Liu Bo Reviewed-by: Chandan Rajendra Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7ceffbbbd0886f955f10a2ab1ad38ae42df359c Author: Qu Wenruo Date: Mon Jan 16 10:23:06 2017 +0800 btrfs: raid56: Remove unused variable in lock_stripe_add Variable 'walk' in lock_stripe_add() is not used. Remove it. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 2 -- 1 file changed, 2 deletions(-) commit fc4badd9fe6aab008b85024f0e6af9b58cca283c Author: Omar Sandoval Date: Tue Jan 17 23:37:38 2017 -0800 Btrfs: refactor btrfs_extent_same() slightly This was originally a prep patch for changing the behavior on len=0, but we went another direction with that. This still makes the function slightly easier to follow. Reviewed-by: Qu Wenruo Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 310712b2f73ac1da4c3a99fd9886e8b652727508 Author: Omar Sandoval Date: Tue Jan 17 23:24:37 2017 -0800 Btrfs: constify struct btrfs_{,disk_}key wherever possible In a lot of places, it's unclear when it's safe to reuse a struct btrfs_key after it has been passed to a helper function. Constify these arguments wherever possible to make it obvious. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 58 +++++++++++++++++++++++++----------------------- fs/btrfs/ctree.h | 60 ++++++++++++++++++++++++++------------------------ fs/btrfs/extent-tree.c | 9 ++++---- fs/btrfs/root-tree.c | 6 ++--- 4 files changed, 69 insertions(+), 64 deletions(-) commit 4aaedfb0b68ca83471c5f10f1da7f0f4714080a1 Author: Liu Bo Date: Wed Dec 14 22:36:05 2016 -0800 Btrfs: fix another race between truncate and lockless dio write Dio writes can update i_size in btrfs_get_blocks_direct when it writes to offset beyond EOF so that endio can update disk_i_size correctly (because we don't udpate disk_i_size beyond i_size). However, when truncating down a file, we firstly update i_size and then wait for in-flight lockless dio reads/writes, according to the above, i_size may have been changed in dio writes, and file extents don't get truncated. For lockless dio writes are always overwrites, i_size is not supposed to be changed, so this adds a check to filter out this case. The race could be reproduced by fstests/generic/299 with patch "Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly" applied. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 62c821a8e23ab7bdbc14841fafa3c90e3b057de7 Author: Liu Bo Date: Tue Dec 13 12:51:51 2016 -0800 Btrfs: clean up btrfs_ordered_update_i_size Since we have a good helper entry_end, use it for ordered extent. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ whitespace reformatting ] Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 5416034f7acf9ead993198dcfb1df7e0b0b8436a Author: Liu Bo Date: Tue Dec 13 12:15:19 2016 -0800 Btrfs: fix comment in btrfs_page_mkwrite The comment about "page_mkwrite gets called every time the page is dirtied" in btrfs_page_mkwrite is not correct, it only gets called the first time the page gets dirtied after the page faults in. However, we don't need to touch the code because it works well, although the proper logic is to check if delalloc bits has been set and if so, go free reserved space, if not, set the delalloc bits for dirty page range. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 19fd2df5b1167eeb6ae8912cdfe9532e3b2c8bbe Author: Liu Bo Date: Thu Dec 1 13:01:02 2016 -0800 Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly btrfs_ordered_update_i_size can be called by truncate and endio, but only endio takes ordered_extent which contains the completed IO. while truncating down a file, if there are some in-flight IOs, btrfs_ordered_update_i_size in endio will set disk_i_size to @orig_offset that is zero. If truncating-down fails somehow, we try to recover in memory isize with this zero'd disk_i_size. Fix it by only updating disk_i_size with @orig_offset when btrfs_ordered_update_i_size is not called from endio while truncating down and waiting for in-flight IOs completing their work before recover in-memory size. Besides fixing the above issue, add an assertion for last_size to double check we truncate down to the desired size. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++++++++++++++ fs/btrfs/ordered-data.c | 14 ++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit f85b7379cd76ad25590c4059299b018eac6fbc50 Author: David Sterba Date: Fri Jan 20 14:54:07 2017 +0100 btrfs: fix over-80 lines introduced by previous cleanups This goes as a separate patch because fixing that inside the patches caused too many many conflicts. Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 5 ++-- fs/btrfs/dir-item.c | 3 +-- fs/btrfs/extent-tree.c | 4 +-- fs/btrfs/extent_io.c | 10 +++---- fs/btrfs/file.c | 5 ++-- fs/btrfs/inode.c | 69 +++++++++++++++++++++++++++--------------------- fs/btrfs/relocation.c | 4 +-- fs/btrfs/tree-log.c | 25 ++++++++++-------- fs/btrfs/xattr.c | 12 ++++----- 9 files changed, 74 insertions(+), 63 deletions(-) commit f329e319714cd0d72479bae4e495ebedf765b2e4 Author: Nikolay Borisov Date: Wed Jan 18 00:31:50 2017 +0200 btrfs: Make count_inode_refs take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 36283658234201f92fde544328d345517a6ffe4e Author: Nikolay Borisov Date: Wed Jan 18 00:31:49 2017 +0200 btrfs: Make count_inode_extrefs take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a59108a73f347d03743941af04ed6dcaa2dd9e66 Author: Nikolay Borisov Date: Wed Jan 18 00:31:48 2017 +0200 btrfs: Make btrfs_log_inode take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 97 ++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 49 deletions(-) commit 6d889a3b9e66d776a6052cac5b6ff52014862936 Author: Nikolay Borisov Date: Wed Jan 18 00:31:47 2017 +0200 btrfs: Make log_inode_item take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 94c91a1f3982164017deee8601d34f8c1bac8309 Author: Nikolay Borisov Date: Wed Jan 18 00:31:46 2017 +0200 btrfs: Make __add_inode_ref take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 207e7d92aa231b37873adf7aca8a66576c48831f Author: Nikolay Borisov Date: Wed Jan 18 00:31:45 2017 +0200 btrfs: Make drop_one_dir_item take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4ec5934e43cabd16d3d61dd095e182c32e7433d5 Author: Nikolay Borisov Date: Wed Jan 18 00:31:44 2017 +0200 btrfs: Make btrfs_unlink_inode take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 71 ++++++++++++++++++++++++++++------------------------- fs/btrfs/tree-log.c | 21 ++++++++-------- 3 files changed, 50 insertions(+), 44 deletions(-) commit 51cc0d322746301bf29455c5ce0cd628cd083420 Author: Nikolay Borisov Date: Wed Jan 18 00:31:43 2017 +0200 btrfs: Make log_new_dir_dentries take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dbf39ea48b869f0f481aa6a7b79c5fb68ee4adbf Author: Nikolay Borisov Date: Wed Jan 18 00:31:42 2017 +0200 btrfs: Make log_directory_changes take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 684a5773f96e1885a044eb46d6361c4cd6912427 Author: Nikolay Borisov Date: Wed Jan 18 00:31:41 2017 +0200 btrfs: Make log_dir_items take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9d122629f1f65a2311e422417a6b81a85b70e0d3 Author: Nikolay Borisov Date: Wed Jan 18 00:31:40 2017 +0200 btrfs: Make btrfs_log_changed_extents take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 223466370cf6e05f863fbfeda54a3b6c282749c8 Author: Nikolay Borisov Date: Wed Jan 18 00:31:39 2017 +0200 btrfs: Make btrfs_get_logged_extents take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 4 ++-- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/tree-log.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit a0308dd7e01dad075fa8f2c96c905e5841d920fa Author: Nikolay Borisov Date: Wed Jan 18 00:31:38 2017 +0200 btrfs: Make btrfs_log_trailing_hole take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1a93c36acdef62ef1f5dccf058328d4d5d6c0e70 Author: Nikolay Borisov Date: Wed Jan 18 00:31:37 2017 +0200 btrfs: Make btrfs_log_all_xattrs take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 44d70e194fb2678e458964168c041d390b341fa5 Author: Nikolay Borisov Date: Wed Jan 18 00:31:36 2017 +0200 btrfs: Make copy_items take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 4791c8f19c45d1a4e7fb5e9a6da532f7cd1fca99 Author: Nikolay Borisov Date: Wed Jan 18 00:31:35 2017 +0200 btrfs: Make btrfs_check_ref_name_override take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 481b01c0d3cbbca7a97f140286738a3e02ac9d4c Author: Nikolay Borisov Date: Wed Jan 18 00:31:34 2017 +0200 btrfs: Make logged_inode_size take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a491abb2e730955df1620165a193678fd775c2d6 Author: Nikolay Borisov Date: Wed Jan 18 00:31:33 2017 +0200 btrfs: Make btrfs_del_inode_ref take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- fs/btrfs/tree-log.c | 10 +++++----- fs/btrfs/tree-log.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 49f34d1f968fb1e00dd782a2ea27e9910629a3f6 Author: Nikolay Borisov Date: Wed Jan 18 00:31:32 2017 +0200 btrfs: Make btrfs_del_dir_entries_in_log take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- fs/btrfs/tree-log.c | 10 +++++----- fs/btrfs/tree-log.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 9ca5fbfbb92e91933510f0903b2492e5e7b45464 Author: Nikolay Borisov Date: Wed Jan 18 00:31:31 2017 +0200 btrfs: Make btrfs_log_new_name take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- fs/btrfs/tree-log.c | 18 ++++++++---------- fs/btrfs/tree-log.h | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) commit 0f8939b8ac8623760c078d41282526de143ee623 Author: Nikolay Borisov Date: Wed Jan 18 00:31:30 2017 +0200 btrfs: Make btrfs_inode_in_log take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 16 +++++++--------- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 16 ++++++++-------- fs/btrfs/tree-log.c | 4 ++-- 4 files changed, 18 insertions(+), 20 deletions(-) commit 436635571bd0b4ba12ec81641667d85e7c29bad5 Author: Nikolay Borisov Date: Wed Jan 18 00:31:29 2017 +0200 btrfs: Make btrfs_record_snapshot_destroy take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- fs/btrfs/tree-log.c | 8 ++++---- fs/btrfs/tree-log.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 4176bdbf2d1a58ebfe1c74f3502e2150db8ea445 Author: Nikolay Borisov Date: Wed Jan 18 00:31:28 2017 +0200 btrfs: Make btrfs_record_unlink_dir take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- fs/btrfs/tree-log.c | 18 +++++++++--------- fs/btrfs/tree-log.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) commit ab1717b2abf7e4d95c58b3936d9a9f70ea0e8ae3 Author: Nikolay Borisov Date: Wed Jan 18 00:31:27 2017 +0200 btrfs: Make btrfs_must_commit_transaction take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f5cc7b80a61a0c9f713e2e9c8f8fbcc0f3cb0cc2 Author: Nikolay Borisov Date: Tue Jan 10 20:35:42 2017 +0200 btrfs: Make btrfs_inode_delayed_dir_index_count take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 5f4b32e94aabaff1b86ba4ed701f01689d59bc90 Author: Nikolay Borisov Date: Tue Jan 10 20:35:41 2017 +0200 btrfs: Make btrfs_commit_inode_delayed_items take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 4 ++-- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/tree-log.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit aa79021fde63450e982c2e2c08a8f2f31671d5d8 Author: Nikolay Borisov Date: Tue Jan 10 20:35:40 2017 +0200 btrfs: Make btrfs_commit_inode_delayed_inode take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/tree-log.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit f48d1cf59ca49d898d1c96fa480eeeeabeaa42be Author: Nikolay Borisov Date: Tue Jan 10 20:35:39 2017 +0200 btrfs: Make btrfs_remove_delayed_node take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 4ccb5c7231295a5666f4df1c08232bdf7975e0e8 Author: Nikolay Borisov Date: Tue Jan 10 20:35:38 2017 +0200 btrfs: Make btrfs_kill_delayed_inode_items take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 4 ++-- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit e07222c7d20633b86d3af9d55f97d687837b7c02 Author: Nikolay Borisov Date: Tue Jan 10 20:35:37 2017 +0200 btrfs: Make btrfs_delayed_delete_inode_ref take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit e67bbbb9d0292df834e9e5366aba605233a699c7 Author: Nikolay Borisov Date: Tue Jan 10 20:35:36 2017 +0200 btrfs: Make btrfs_delete_delayed_dir_index take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 6f45d18568c2020085fe3f2e87ea883ad00e3861 Author: Nikolay Borisov Date: Tue Jan 10 20:35:35 2017 +0200 btrfs: Make btrfs_insert_delayed_dir_index take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/dir-item.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit fcabdd1ca51f9fd6ced977b2279da19d123b7512 Author: Nikolay Borisov Date: Tue Jan 10 20:35:34 2017 +0200 btrfs: Make btrfs_delayed_inode_reserve_metadata take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e5517a7bffafdeb78ebbfb4cbee1878fb88427e5 Author: Nikolay Borisov Date: Tue Jan 10 20:35:33 2017 +0200 btrfs: Make btrfs_get_or_create_delayed_node take btrfs_inode Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 340c6ca9fd077030f869d90549c84f37332cfd0f Author: Nikolay Borisov Date: Tue Jan 10 20:35:32 2017 +0200 btrfs: Make btrfs_get_delayed_node take btrfs_inode This function is internal to btrfs and doesn't really deal with any VFS members, as such it needn't take a struct inode refrence but btrfs_inode. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8 Author: Nikolay Borisov Date: Tue Jan 10 20:35:31 2017 +0200 btrfs: Make btrfs_ino take a struct btrfs_inode Currently btrfs_ino takes a struct inode and this causes a lot of internal btrfs functions which consume this ino to take a VFS inode, rather than btrfs' own struct btrfs_inode. In order to fix this "leak" of VFS structs into the internals of btrfs first it's necessary to eliminate all uses of struct inode for the purpose of inode. This patch does that by using BTRFS_I to convert an inode to btrfs_inode. With this problem eliminated subsequent patches will start eliminating the passing of struct inode altogether, eventually resulting in a lot cleaner code. Signed-off-by: Nikolay Borisov [ fix btrfs_get_extent tracepoint prototype ] Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 10 ++-- fs/btrfs/compression.c | 2 +- fs/btrfs/delayed-inode.c | 14 ++--- fs/btrfs/dir-item.c | 2 +- fs/btrfs/export.c | 10 ++-- fs/btrfs/extent-tree.c | 10 ++-- fs/btrfs/extent_io.c | 10 ++-- fs/btrfs/file-item.c | 4 +- fs/btrfs/file.c | 12 ++--- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/inode.c | 122 +++++++++++++++++++++---------------------- fs/btrfs/ioctl.c | 26 ++++----- fs/btrfs/props.c | 4 +- fs/btrfs/relocation.c | 16 +++--- fs/btrfs/transaction.c | 4 +- fs/btrfs/tree-log.c | 42 +++++++-------- fs/btrfs/xattr.c | 10 ++-- include/trace/events/btrfs.h | 2 +- 18 files changed, 151 insertions(+), 151 deletions(-) commit 823bb20ab47071dc8a98acf272a470ccdcfcf6d1 Author: David Sterba Date: Wed Jan 4 11:09:51 2017 +0100 btrfs: add wrapper for counting BTRFS_MAX_EXTENT_SIZE The expression is open-coded in several places, this asks for a wrapper. As we know the MAX_EXTENT fits to u32, we can use the appropirate division helper. This cascades to the result type updates. Compiler is clever enough to use shift instead of integer division, so there's no change in the generated assembly. Signed-off-by: David Sterba fs/btrfs/ctree.h | 8 ++++++++ fs/btrfs/extent-tree.c | 12 ++++-------- fs/btrfs/inode.c | 34 +++++++++++----------------------- 3 files changed, 23 insertions(+), 31 deletions(-) commit 95995dbbe691c78cf78948e48b9778531bf1fb3c Author: David Sterba Date: Fri Jan 6 13:27:00 2017 +0100 btrfs: remove unused logic of limiting async delalloc pages A proposed patch in https://marc.info/?l=linux-btrfs&m=147859791003837 pointed out bad limit threshold in cow_file_range_async, but it turned out that the whole logic is not necessary and is done by writeback. We agreed to remove it. Signed-off-by: David Sterba fs/btrfs/inode.c | 7 ------- 1 file changed, 7 deletions(-) commit 26d30f85290723613a32e8f1d02504352502a224 Author: Anand Jain Date: Mon Dec 19 19:09:06 2016 +0800 btrfs: consolidate auto defrag kick off policies As of now writes smaller than 64k for non compressed extents and 16k for compressed extents inside eof are considered as candidate for auto defrag, put them together at a place. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 8c3e6b1f0cd1765d6aeeaa9cdb69b39cea0b6804 Author: Anand Jain Date: Wed Dec 21 15:42:08 2016 +0800 btrfs: btrfs_defrag_root() doesn't defrag extent root tree Since btrfs_defrag_leaves() does not support extent_root, remove its corresponding call. The user can use the file based defrag to defrag extents as of now. No change in behaviour as extent_root is explicitly skipped in btrfs_defrag_leaves and this has never worked as expected. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ ehnance changelong ] Signed-off-by: David Sterba fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) commit fef394f75bc17599c17287fbc437d4fb07a98583 Author: Jeff Mahoney Date: Tue Dec 13 14:39:34 2016 -0500 btrfs: drop unused extent_op arg from btrfs_add_delayed_data_ref btrfs_add_delayed_data_ref is always called with a NULL extent_op, so let's drop the argument. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 6 ++---- fs/btrfs/delayed-ref.h | 3 +-- fs/btrfs/extent-tree.c | 7 +++---- 3 files changed, 6 insertions(+), 10 deletions(-) commit 694a0dee9c2d36a552f31a1b104733ed3f90f46d Author: Colin Ian King Date: Tue Dec 20 16:18:37 2016 +0000 btrfs: remove redundant inode null check The check for a null inode is redundant since the function is a callback for exportfs, which will itself crash if dentry->d_inode or parent->d_inode is NULL. Removing the null check makes this consistent with other file systems. Also remove the redundant null dir check too. Found with static analysis by CoverityScan, CID 1389472 Kudos to Jeff Mahoney for reviewing and explaining the error in my original patch (most of this explanation went into the above commit message) and David Sterba for pointing out that the dir check is also redundant. Signed-off-by: Colin Ian King Signed-off-by: David Sterba fs/btrfs/export.c | 3 --- 1 file changed, 3 deletions(-) commit 20c7bcec6f8fcc305f1f2a2488657836ca8be69d Author: Seraphime Kirkovski Date: Thu Dec 15 14:38:16 2016 +0100 Btrfs: ACCESS_ONCE cleanup This replaces ACCESS_ONCE macro with the corresponding READ|WRITE macros Signed-off-by: Seraphime Kirkovski Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 4 ++-- fs/btrfs/super.c | 2 +- fs/btrfs/transaction.c | 10 +++++----- fs/btrfs/tree-log.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) commit 50d0446e68fa0b687bd06288cc6cc25c475ab3fb Author: Seraphime Kirkovski Date: Thu Dec 15 14:38:28 2016 +0100 Btrfs: code cleanup min/max -> min_t/max_t This cleans up the cases where the min/max macros were used with a cast rather than using directly min_t/max_t. Signed-off-by: Seraphime Kirkovski Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file-item.c | 4 ++-- fs/btrfs/ioctl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6b4df8b6c59fc865deb2650b60e38aca4c67a972 Author: Geliang Tang Date: Mon Dec 19 22:53:41 2016 +0800 btrfs: use rb_entry() instead of container_of To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f74670f7132b002b5ee41edbc8d323500bf490b2 Author: Anand Jain Date: Tue Dec 6 12:43:07 2016 +0800 btrfs: use BTRFS_COMPRESS_NONE to specify no compression Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1aceabf362dc8c54ec7790de7f95d75c1ecb9678 Author: Michal Hocko Date: Mon Jan 9 15:39:03 2017 +0100 btrfs: drop gfp mask tweaking in try_release_extent_state try_release_extent_state reduces the gfp mask to GFP_NOFS if it is compatible. This is true for GFP_KERNEL as well. There is no real reason to do that though. There is no new lock taken down the the only consumer of the gfp mask which is try_release_extent_state clear_extent_bit __clear_extent_bit alloc_extent_state So this seems just unnecessary and confusing. Signed-off-by: Michal Hocko Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 -- 1 file changed, 2 deletions(-) commit 3ba7ab220e8918176c6f38ee09df86150aca1611 Author: Michal Hocko Date: Mon Jan 9 15:39:02 2017 +0100 btrfs: fix up misleading GFP_NOFS usage in btrfs_releasepage b335b0034e25 ("Btrfs: Avoid using __GFP_HIGHMEM with slab allocator") has reduced the allocation mask in btrfs_releasepage to GFP_NOFS just to prevent from giving an unappropriate gfp mask to the slab allocator deeper down the callchain (in alloc_extent_state). This is wrong for two reasons a) GFP_NOFS might be just too restrictive for the calling context b) it is better to tweak the gfp mask down when it needs that. So just remove the mask tweaking from btrfs_releasepage and move it down to alloc_extent_state where it is needed. Signed-off-by: Michal Hocko Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 5 +++++ fs/btrfs/inode.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 18dc22c19bef520cca11ce4c0807ac9dec48d31f Author: Qu Wenruo Date: Thu Oct 20 10:28:41 2016 +0800 btrfs: Add WARN_ON for qgroup reserved underflow Goldwyn Rodrigues has exposed and fixed a bug which underflows btrfs qgroup reserved space, and leads to non-writable fs. This reminds us that we don't have enough underflow check for qgroup reserved space. For underflow case, we should not really underflow the numbers but warn and keeps qgroup still work. So add more check on qgroup reserved space and add WARN_ON() and btrfs_warn() for any underflow case. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Reviewed-by: Goldwyn Rodrigues Signed-off-by: David Sterba fs/btrfs/qgroup.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 12be9f7b5861f14f010ae1ce3b343ae903d7a74d Author: Bhumika Goyal Date: Sat Feb 11 12:40:37 2017 +0530 HID: intel-ish-hid: constify device_type structure Declare device_type structure as const as it is only stored in the type field of a device structure. This field is of type const, so add const to the declaration of device_type structure. File size before: drivers/hid/intel-ish-hid/ishtp/bus.o text data bss dec hex filename 4260 336 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o File size after: drivers/hid/intel-ish-hid/ishtp/bus.o text data bss dec hex filename 4324 272 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o Signed-off-by: Bhumika Goyal Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a48324de6d4d41dd3974e18ee8cedac4c0dd503a Author: Jason Gerecke Date: Fri Feb 10 16:14:07 2017 -0800 HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range The prox/range bits included in the Bluetooth reports from the Intuos Pro were being ignored, leading to two issues. Firstly, the pen would never announce a BTN_TOOL_PEN event with value 0, leaving userspace to believe the pen was always active. Secondly, the driver would continue to send events for data while the packet's "prox" bit was clear. This can lead to sudden incorrect pointer jumps if the pen is slowly moved away from the tablet surface. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 49b3cd306e60b9d889c775cb2ebb709f80dd8ae9 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 10:55:27 2017 -0300 tools: Set the maximum optimization level according to the compiler being used To avoid this when using clang: warning: optimization level '-O6' is not supported; using '-O3' instead Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-kaghp8ddvzdsg03putemcq96@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 8 +++++++- tools/lib/subcmd/Makefile | 8 +++++++- tools/perf/Makefile.config | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 093b75ef5995ea35d7f6bdb6c7b32a42a1999813 Author: Arnaldo Carvalho de Melo Date: Tue Feb 14 10:34:35 2017 -0300 tools: Suppress request for warning options not existent in clang To allow building with clang, avoiding: error: unknown warning option '-Wstrict-aliasing=3'; did you mean '-Wstring-plus-int'? [-Werror,-Wunknown-warning-option] Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xvthlvmhzfnt7jx73jgmaea1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/scripts/Makefile.include | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4c86d77743a54fb2d8a4d18a037a074c892bb3be Author: Steffen Klassert Date: Tue Feb 14 07:43:56 2017 +0100 xfrm: Don't use sk_family for socket policy lookups On IPv4-mapped IPv6 addresses sk_family is AF_INET6, but the flow informations are created based on AF_INET. So the routing set up 'struct flowi4' but we try to access 'struct flowi6' what leads to an out of bounds access. Fix this by using the family we get with the dst_entry, like we do it for the standard policy lookup. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e62d2ca9d05c9b558d11114c6494e820728f8e9a Author: Borislav Petkov Date: Tue Feb 14 11:58:05 2017 +0100 EDAC, amd64: Bump driver version Last time we did that was when we enabled Bulldozer. Now, we enabled Zen so it is only natural ... :-) Signed-off-by: Borislav Petkov Cc: Yazen Ghannam drivers/edac/amd64_edac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0b3444da3ce1090d0f894f4e343756a94ab8c3 Author: Chuanxiao Dong Date: Tue Feb 14 17:15:54 2017 +0800 drm/i915/gvt: return error code if dma map iova failed When doing dma map failed for a pfn, kvmgt should unpin the pfn and return error code to device module driver Signed-off-by: Chuanxiao Dong Cc: xinda.zhao@intel.com Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bc6a1c85795256cd7b44bc1dd264fe3144b8b6f8 Author: Chuanxiao Dong Date: Tue Feb 14 15:14:05 2017 +0800 drm/i915/gvt: optimize the inhibit context mmio load For the inhibit ctx, load all mmio in render mmio list into HW by MMIO write for ctx initialization. For the none-inhibit ctx, only load the render mmio which is not in_context into HW by MMIO write. Skip the MMIO write for in_context mmio as context image will load it. Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6e27d51457df3f9c7ac406a2a447e89c42e440dd Author: Xu Han Date: Tue Feb 14 14:50:47 2017 +0800 drm/i915/gvt: add sprite plane flip done support. * Add flip done event support for sprite plane on SKL platform. * Fix bug #1452, "Call Trace:handle_default_event_virt+0xef/0x100 [i915]" while booting up guest. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 20 +++++++++++++++++++- drivers/gpu/drm/i915/gvt/interrupt.c | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit 6294b61ba769ba2cc4a182c32410aa4a75808fea Author: Changbin Du Date: Tue Feb 14 14:50:18 2017 +0800 drm/i915/gvt: add missing display part reset for vGPU reset We also need reset vGPU virtual display emulation. Since all vreg has been cleared, we need reset display related vreg to reflect our display setting. Signed-off-by: Changbin Du Cc: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 12 ++++++++++++ drivers/gpu/drm/i915/gvt/display.h | 1 + drivers/gpu/drm/i915/gvt/vgpu.c | 1 + 3 files changed, 14 insertions(+) commit 03806edc3582392727a6dc617662ac57e6b24b01 Author: Zhenyu Wang Date: Mon Feb 13 17:07:19 2017 +0800 drm/i915/gvt: Fix shadow context descriptor We need to be careful to only update addr mode for gvt shadow context descriptor but keep other valid config. This fixes GPU hang caused by invalid descriptor submitted for gvt workload. Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b3cac191670c2ee2995cd740b80fbb638de3f3e Author: Zhenyu Wang Date: Mon Feb 13 14:31:13 2017 +0800 drm/i915/gvt: Fix alignment for GTT allocation We need to properly setup alignment for GTT start/end/size as required. Fixed warning from i915 gem. Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/aperture_gm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 9606de36b21fe1fafb7b68a8ed5cfaf128871e97 Author: Wei Yongjun Date: Mon Feb 6 16:26:50 2017 +0000 MIPS: sysmips: Remove duplicated include from syscall.c Remove duplicated include. Fixes: 7c0f6ba682b9 ("Replace with globally") Signed-off-by: Wei Yongjun Cc: Ralf Baechle Cc: Markus Elfring Cc: Wei Yongjun Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15213/ Signed-off-by: James Hogan arch/mips/kernel/syscall.c | 1 - 1 file changed, 1 deletion(-) commit 0d070d2b5c718180a2e296918618da2c18c298e5 Author: Marcin Nowakowski Date: Mon Feb 13 11:15:56 2017 +0100 Kbuild: Add cpp_its_S in ksym_dep_filter Add a new command cpp_its_S introduced in commit cf2a5e0bb4c6 ("MIPS: Support generating Flattened Image Trees (.itb)") to ksym_dep_filter handler - otherwise a warning is produced during the build of MIPS platforms (when vmlinux.*.itb target is chosen). Signed-off-by: Marcin Nowakowski Cc: Michal Marek Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15278/ Signed-off-by: James Hogan scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26dd3e4ff9ac1aa576c97d23d7425d2544dbc5bf Author: Paul Gortmaker Date: Sat Jan 28 21:05:57 2017 -0500 MIPS: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of some code where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h might have been the implicit source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace/add as needed. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Build coverage of all the mips defconfigs revealed the module.h header was masking a couple of implicit include instances, so we add the appropriate headers there. Signed-off-by: Paul Gortmaker Cc: David Daney Cc: John Crispin Cc: Ralf Baechle Cc: "Steven J. Hill" Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15131/ [james.hogan@imgtec.com: Preserve sort order where it already exists] Signed-off-by: James Hogan arch/mips/alchemy/common/dbdma.c | 2 +- arch/mips/alchemy/common/dma.c | 2 +- arch/mips/alchemy/common/gpiolib.c | 1 - arch/mips/alchemy/common/prom.c | 1 - arch/mips/alchemy/common/usb.c | 2 +- arch/mips/alchemy/common/vss.c | 2 +- arch/mips/alchemy/devboards/bcsr.c | 3 ++- arch/mips/ar7/clock.c | 2 +- arch/mips/ar7/gpio.c | 3 ++- arch/mips/ar7/memory.c | 1 - arch/mips/ar7/platform.c | 1 - arch/mips/ar7/prom.c | 2 +- arch/mips/ath79/clock.c | 1 - arch/mips/ath79/common.c | 2 +- arch/mips/bcm63xx/clk.c | 3 ++- arch/mips/bcm63xx/cpu.c | 2 +- arch/mips/bcm63xx/cs.c | 3 ++- arch/mips/bcm63xx/gpio.c | 2 +- arch/mips/bcm63xx/irq.c | 1 - arch/mips/bcm63xx/reset.c | 3 ++- arch/mips/bcm63xx/timer.c | 3 ++- arch/mips/cavium-octeon/crypto/octeon-crypto.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-helper-errata.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-sysinfo.c | 2 +- arch/mips/cavium-octeon/smp.c | 3 ++- arch/mips/dec/prom/identify.c | 2 +- arch/mips/dec/setup.c | 2 +- arch/mips/dec/wbflush.c | 4 +--- arch/mips/jazz/jazzdma.c | 2 +- arch/mips/jz4740/gpio.c | 2 +- arch/mips/jz4740/prom.c | 1 - arch/mips/jz4740/timer.c | 3 ++- arch/mips/lantiq/xway/dma.c | 3 +-- arch/mips/lantiq/xway/gptu.c | 3 +-- arch/mips/lasat/at93c.c | 1 - arch/mips/lasat/sysctl.c | 1 - arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c | 2 +- arch/mips/loongson64/common/env.c | 2 +- arch/mips/loongson64/common/setup.c | 3 ++- arch/mips/loongson64/common/uart_base.c | 2 +- arch/mips/loongson64/lemote-2f/ec_kb3310b.c | 3 ++- arch/mips/loongson64/lemote-2f/irq.c | 3 ++- arch/mips/loongson64/lemote-2f/pm.c | 2 +- arch/mips/loongson64/loongson-3/irq.c | 2 +- arch/mips/loongson64/loongson-3/numa.c | 2 +- arch/mips/mti-malta/malta-platform.c | 1 - arch/mips/pmcs-msp71xx/msp_prom.c | 2 +- arch/mips/pmcs-msp71xx/msp_time.c | 1 - arch/mips/ralink/clk.c | 3 ++- arch/mips/ralink/mt7620.c | 1 - arch/mips/ralink/mt7621.c | 1 - arch/mips/ralink/rt288x.c | 1 - arch/mips/ralink/rt305x.c | 3 ++- arch/mips/ralink/rt3883.c | 1 - arch/mips/rb532/irq.c | 1 - arch/mips/rb532/prom.c | 2 +- arch/mips/sgi-ip22/ip22-hpc.c | 2 +- arch/mips/sgi-ip22/ip22-mc.c | 3 ++- arch/mips/sgi-ip22/ip22-nvram.c | 2 +- arch/mips/sgi-ip22/ip22-reset.c | 1 - arch/mips/sgi-ip22/ip22-setup.c | 1 - arch/mips/sgi-ip27/ip27-berr.c | 2 -- arch/mips/sgi-ip27/ip27-init.c | 2 +- arch/mips/sgi-ip27/ip27-memory.c | 2 +- arch/mips/sgi-ip32/crime.c | 2 +- arch/mips/sibyte/bcm1480/setup.c | 2 +- arch/mips/sibyte/sb1250/setup.c | 2 +- arch/mips/txx9/generic/setup.c | 2 +- arch/mips/vr41xx/common/bcu.c | 3 ++- arch/mips/vr41xx/common/cmu.c | 2 +- arch/mips/vr41xx/common/icu.c | 2 +- arch/mips/vr41xx/common/irq.c | 2 +- 73 files changed, 69 insertions(+), 78 deletions(-) commit 2654294bac83a64101c360eac4d42d5ac1b1b911 Author: James Hogan Date: Mon Feb 6 12:37:45 2017 +0000 MIPS: Unify perf counter register definitions Unify definitions for MIPS performance counter register fields in mipsregs.h rather than duplicating them in perf_events and oprofile. This will allow future patches to use them to expose performance counters to KVM guests. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Robert Richter Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: oprofile-list@lists.sf.net Patchwork: https://patchwork.linux-mips.org/patch/15212/ Signed-off-by: James Hogan arch/mips/include/asm/mipsregs.h | 33 ++++++++++++++++++++++ arch/mips/kernel/perf_event_mipsxx.c | 55 +++++++++++++++--------------------- arch/mips/oprofile/op_model_mipsxx.c | 40 +++++++++----------------- 3 files changed, 69 insertions(+), 59 deletions(-) commit 573deec09436c9136fff6d78e0325e052a1ad6be Author: Joshua Kinard Date: Sat Jan 28 22:24:16 2017 -0500 MIPS: Disable stack checks on MIPS kernels Disable stack checking on MIPS kernels. Some distribution toolchains might pass the -fstack-check option to gcc. This results in a store-doubleword instruction being emitted at the top of all functions that checks the available stack space. E.g., a80000000001d740 : a80000000001d740: ffa0bfc0 sd zero,-16448(sp) a80000000001d744: 2405ffc9 li a1,-55 a80000000001d748: 67bdffc0 daddiu sp,sp,-64 Generally, this is undesirable, and especially on the SGI IP27 platform, it will trigger a NULL pointer dereference in '_raw_spin_lock_irq' during early init. Signed-off-by: Joshua Kinard Suggested-by: James Hogan Cc: Ralf Baechle Cc: "Maciej W. Rozycki" Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15132/ Signed-off-by: James Hogan arch/mips/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 93e502b3c2d44dcb964141cbf82930282de8e40b Author: Steven J. Hill Date: Wed Jan 25 01:02:28 2017 -0600 MIPS: OCTEON: Platform support for OCTEON III USB controller Add all the necessary platform code to initialize the dwc3 USB host controller. This code initializes the clocks and performs a reset on the USB core and PHYs. The driver code in 'drivers/usb/dwc3' is where the real driver lives. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15108/ Signed-off-by: James Hogan arch/mips/cavium-octeon/Makefile | 1 + arch/mips/cavium-octeon/octeon-platform.c | 1 + arch/mips/cavium-octeon/octeon-usb.c | 552 ++++++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-gpio-defs.h | 8 +- 4 files changed, 560 insertions(+), 2 deletions(-) commit dba9a0babdd938a51d11ae81f9c40d07ca613f43 Author: Sudip Mukherjee Date: Tue Jan 24 16:39:21 2017 +0000 math64, tile: Fix build failure The build of tilegx allmodconfig fails with: ../arch/tile/include/asm/div64.h:5:15: error: unknown type name 'u64' static inline u64 mul_u32_u32(u32 a, u32 b) ^~~ ../arch/tile/include/asm/div64.h:5:31: error: unknown type name 'u32' static inline u64 mul_u32_u32(u32 a, u32 b) ^~~ ../arch/tile/include/asm/div64.h:5:38: error: unknown type name 'u32' static inline u64 mul_u32_u32(u32 a, u32 b) ^~~ In file included from ../fs/ubifs/ubifs.h:26:0, from ../fs/ubifs/shrinker.c:42: ../include/linux/math64.h: In function 'mul_u64_u32_shr': ../arch/tile/include/asm/div64.h:9:21: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration] Include the linux/types.h in tiles div64.h to slve the problem. Fixes: 9e3d6223d209 ("math64, timers: Fix 32bit mul_u64_u32_shr() and friends") Signed-off-by: Sudip Mukherjee Acked-by: Chris Metcalf Cc: Peter Zijlstra Cc: Sudip Mukherjee Link: http://lkml.kernel.org/r/1485275961-20112-1-git-send-email-sudip.mukherjee@codethink.co.uk Signed-off-by: Thomas Gleixner arch/tile/include/asm/div64.h | 2 ++ 1 file changed, 2 insertions(+) commit 006cac8262987981fb10a0360726875b48123b73 Merge: efff8e7 3d4ef32 Author: Ulf Hansson Date: Tue Feb 14 09:17:37 2017 +0100 Merge branch 'fixes' into next commit efff8e7879b8b7f8a077f495262f0bb9cfaa0b06 Author: Uri Yanai Date: Tue Feb 7 18:00:01 2017 +0200 mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support Adding dedicated flag for AUTO_BKOPS in card->ext_csd structure. Read AUTO_BKOPS bit value from the device EXT_CSD and set to the card->ext_csd structure. In mmc_decode_ext_csd() add a print message in case the AUTO_BKOPS is enabled Signed-off-by: Uri Yanai Signed-off-by: Alex Lemberg Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 6 ++++++ include/linux/mmc/card.h | 1 + include/linux/mmc/mmc.h | 1 + 3 files changed, 8 insertions(+) commit 6962c2fb201878722ef78b513dae7c22dfa4919c Author: Uri Yanai Date: Tue Feb 7 18:00:00 2017 +0200 mmc: MAN_BKOPS_EN inverse debug message logic Inverse the logic for printing the debug message. In mmc_decode_ext_csd() print message when MAN_BKOPS_EN is set Signed-off-by: Uri Yanai Signed-off-by: Alex Lemberg Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e21e6fdd2935e147f845de7ddf39d6204a075a46 Author: Heiner Kallweit Date: Tue Feb 7 22:35:59 2017 +0100 mmc: meson-gx: add support for HS400 mode Add support for HS400 mode. The driver still misses support for tuning, therefore highspeed modes like HS400 might not work under all circumstances yet. Successfully tested on a Odroid C2 (S905 GXBB). Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 62d721a646a9d515bd7b13bede78a1c02890b956 Author: Heiner Kallweit Date: Tue Feb 7 22:35:40 2017 +0100 mmc: meson-gx: remove unneeded checks in remove The remove callback is called only if probe finished successfully. Therefore these checks are not needed. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4136fcb547d2baec31179aa0ce3466f4040b193c Author: Heiner Kallweit Date: Tue Feb 7 22:35:02 2017 +0100 mmc: meson-gx: reduce bounce buffer size A bounce buffer of 512K isn't needed as the max request size is 511 * 512 byte. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe0b669716314072f0467368c2be2f501f04afc Author: Heiner Kallweit Date: Tue Feb 7 22:34:58 2017 +0100 mmc: meson-gx: set max block count and request size So far max_blk_count isn't set what results in a default of value 8 to be used (PAGE_SIZE / block size). Block length field has 9 bits, so set max_blk_count to 2^9-1 = 511. In addition set max_req_size because max_blk_count is also limited by max_req_size / block_size. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 3 +++ 1 file changed, 3 insertions(+) commit 92763b997e468700b26a8fdddc5bee3e3c2a39fa Author: Heiner Kallweit Date: Tue Feb 7 22:34:51 2017 +0100 mmc: meson-gx: improve interrupt handling Disabling and immediately re-enabling interrupts in meson_mmc_request doesn't provide a benefit. Instead enable interrupts in probe already. And disable interrupts in remove, this was missing so far. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 690f90b628aaa5800244d0c6d06f2c0fa2d57e22 Author: Heiner Kallweit Date: Tue Feb 7 22:34:41 2017 +0100 mmc: meson-gx: improve meson_mmc_irq_thread Remove unneeded variable ret and simplify the if block. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 5da86887638d7a833c75880b7fd8ba738aa102a7 Author: Heiner Kallweit Date: Tue Feb 7 22:34:32 2017 +0100 mmc: meson-gx: improve meson_mmc_clk_set The following changes are quite small, therefore I combined them in one patch. - ret doesn't need to be initialized with 0 - use standard !clk_rate notation to check for a zero value - If clk_rate is zero we return here. Therefore all further checks in this function for clk_rate != 0 are not needed. - switch from dev_warn to dev_err if the clock can't be set - If due to clock source and available divider values the requested frequency isn't matched exactly (always the case if requested frequency is 52 MHz), then just print the differing values as debug message and not as warning. - Also remove ret from the message as it is always 0. - Set member current_clock to the current requested rate and mmc->actual_clock to the current actual rate Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 42 +++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 3d45c86f92be4cd22b4d2332a5cc280e20efedc6 Author: Heiner Kallweit Date: Tue Feb 7 22:34:06 2017 +0100 mmc: meson-gx: minor improvements in meson_mmc_set_ios val isn't used in the switch clause and afterwards there's an identical statement. So remove it. In case of an unexpected bus width the error message indicates the intention to set the bus width to 4 and to go on. So remove the return statement. This return statement also conflicts with "setting to 4" because nothing would be set actually before returning. 4bit bus width are chosen as default as the vendor driver does it too. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 -- 1 file changed, 2 deletions(-) commit a4c38c8dba98643602ae08c0867425b20a3c204b Author: Ulf Hansson Date: Wed Feb 8 12:36:20 2017 +0100 mmc: meson: Assign the minimum clk rate as close to 400KHz as possible The current code dealing with calculating mmc->f_min is a bit complicated. Additionally, the attempt to set an initial clock rate should explicitly use a rate between 100KHz to 400 KHz, according the (e)MMC/SD specs, which it doesn't. Fix the problem and clean up the code by using clk_round_rate() to pick the nearest minimum rate to 400KHz (rounded down from 400kHz). Signed-off-by: Ulf Hansson [Heiner: Changed from 100KHz to 400KHz to get a proper rounded rate] Signed-off-by: Heiner Kallweit drivers/mmc/host/meson-gx-mmc.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 37dac0681e2be4f3c32b090a8c0591d4ce57e6f0 Author: Linus Walleij Date: Wed Feb 1 13:48:00 2017 +0100 mmc: core: start to break apart mmc_start_areq() This function is doing to many clever things at the same time under too many various conditions. Start to make things clearer by refactoring: break out the finalization of the previous asynchronous request to its own function mmc_finalize_areq(). We can get rid of the default assignment of status and let the call deal with this. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 65 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 22 deletions(-) commit 0e65f10cf1774a27acf9e933e006f1e55a4ef642 Author: Linus Walleij Date: Wed Feb 1 13:47:58 2017 +0100 mmc: block: respect bool returned from blk_end_request() The return value from blk_end_request() is a bool but is treated like an int. This is generally safe, but the variable also has the opaque name "ret" and gets returned from the helper function mmc_blk_cmd_err(). - Switch the variable to a bool, applies everywhere. - Return a bool from mmc_blk_cmd_err() and rename the function mmc_blk_rw_cmd_err() to indicate through the namespace that this is a helper for mmc_blk_issue_rw_rq(). - Rename the variable from "ret" to "req_pending" inside the while() loop inside mmc_blk_issue_rq_rq(), which finally makes it very clear what this while loop is waiting for. - Augment the argument "ret" to mmc_blk_rq_cmd_err() to old_req_pending so it becomes evident that this is an older state, and it is returned only if we fail to get the number of written blocks from an SD card in the function mmc_sd_num_wr_blocks(). - Augment the while() loop in mmc_blk_rq_cmd_abort(): it is evident now that we know this is a bool variable, that the function is just spinning waiting for blk_end_request() to return false. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 49 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) commit 169f03a064c230de6d715bdd62112eb12256fce3 Author: Linus Walleij Date: Wed Feb 1 13:47:57 2017 +0100 mmc: block: return errorcode from mmc_sd_num_wr_blocks() mmc_sd_num_wr_blocks() has an interesting construction that saves one return argument by casting (u32)-1 as error code if something goes wrong. This is however a bit confusing when the normal kernel pattern is to return an int error code on success. So instead pass a variable "blocks" that the function can fill in with the number of successfully transferred blocks and return an integer as error code. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson [Ulf: Changed a return code to -EIO, reported by Dan Carpenter and fixed by Linus Walleij] drivers/mmc/core/block.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit dc312349e87526dfe6387c1a82fafded706f0572 Author: Geert Uytterhoeven Date: Mon Feb 13 12:00:26 2017 +0100 dmaengine: rcar-dmac: Widen DMA mask to 40 bits By default, the DMA mask covers only the low 32-bit address space, which causes SWIOTLB on arm64 to fall back to a bounce buffer for DMA transfers involving memory outside the 32-bit address space. The R-Car DMA controller hardware supports a 40-bit address space, hence widen the DMA mask to 40 bits to actually make use of this feature. Signed-off-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 1 + 1 file changed, 1 insertion(+) commit fea6d2a610c899bb7fd8e95fcbf46900b886e5a3 Author: Vivek Goyal Date: Mon Feb 13 15:45:26 2017 -0500 vfs: Use upper filesystem inode in bprm_fill_uid() Right now bprm_fill_uid() uses inode fetched from file_inode(bprm->file). This in turn returns inode of lower filesystem (in a stacked filesystem setup). I was playing with modified patches of shiftfs posted by james bottomley and realized that through shiftfs setuid bit does not take effect. And reason being that we fetch uid/gid from inode of lower fs (and not from shiftfs inode). And that results in following checks failing. /* We ignore suid/sgid if there are no mappings for them in the ns */ if (!kuid_has_mapping(bprm->cred->user_ns, uid) || !kgid_has_mapping(bprm->cred->user_ns, gid)) return; uid/gid fetched from lower fs inode might not be mapped inside the user namespace of container. So we need to look at uid/gid fetched from upper filesystem (shiftfs in this particular case) and these should be mapped and setuid bit can take affect. Signed-off-by: Vivek Goyal Signed-off-by: Eric W. Biederman fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 078502b5842a52f6faf7edf178fb2ad22fa16b96 Author: Darren Stevens Date: Mon Feb 13 21:11:03 2017 +0000 ALSA: hda/patch_sigmatel: Add AmigaOne X1000 pinconfigs The AmigaOne X1000 has a Sigmatel STAC92HD700 attached to the HD Audio on an ATI SB600. Add the required settings to enable sound. Signed-off-by: Darren Stevens Signed-off-by: Takashi Iwai sound/pci/hda/patch_sigmatel.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 277d6f1dcae09aed63cd4c7900a280b0e18cf2ca Merge: 210f400 a734fb5 Author: Ingo Molnar Date: Tue Feb 14 07:29:38 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170213' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Introduce the 'delta-abs' 'perf diff' compute method, that orders the histogram entries by the absolute value of the percentage delta for a function in two perf.data files, i.e. the functions that changed the most (increase or decrease in samples) comes first (Namhyung Kim) User visible changes: - Improve message about tweaking the kernel.perf_event_paranoid setting, telling how to make the change permanent by editing /etc/sysctl.conf (Arnaldo Carvalho de Melo) Infrastructure changes: - Introduce linux/compiler-gcc.h as a counterpart to the kernel's, initially containing the definition of __fallthrough, more to come (__maybe_unused, etc) (Arnaldo Carvalho de Melo) - Fixes for problems uncovered by building tools/perf with clang, such as always true tests of arrays against NULL and variables that sometimes were used without being initialized (Arnaldo Carvalho de Melo, Steven Rostedt) - Before loading a new ELF, clear global variables set by the samples/bpf loader (Mickaël Salaün) - Ignore already processed ELF sections in the samples/bpf loader (Mickaël Salaün) - Fix compile error in the scripting code with some perl5 versions (Wang YanQing) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 210f400d68a14bc89e2e61dc2e06cdd67cfeb5f6 Merge: f2029b1 7089db8 Author: Ingo Molnar Date: Tue Feb 14 07:29:14 2017 +0100 Merge tag 'v4.10-rc8' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit da0e7e6276968fcc61ac7484d0026cd5fdd94dc3 Merge: a05ef16 ab9bad0 Author: Michael Ellerman Date: Tue Feb 14 17:18:29 2017 +1100 Merge branch 'topic/ppc-kvm' into next Merge the topic branch we're sharing with the kvm-ppc tree. commit a05ef161cdd22faccffe06f21fc8f1e249565385 Author: Michael Ellerman Date: Tue Feb 14 13:44:05 2017 +1100 powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y Currently the build breaks if CMA=n and SPAPR_TCE_IOMMU=y: arch/powerpc/mm/mmu_context_iommu.c: In function ‘mm_iommu_get’: arch/powerpc/mm/mmu_context_iommu.c:193:42: error: ‘MIGRATE_CMA’ undeclared (first use in this function) if (get_pageblock_migratetype(page) == MIGRATE_CMA) { ^~~~~~~~~~~ Fix it by using the existing is_migrate_cma_page(), which evaulates to false when CMA=n. Fixes: 2e5bbb5461f1 ("KVM: PPC: Book3S HV: Migrate pinned pages out of CMA") Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aad71e3928bec48639a70facd21814ea28d27dcb Author: Michael Ellerman Date: Tue Feb 14 13:11:38 2017 +1100 powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n If we enable RADIX but disable HUGETLBFS, the build breaks with: arch/powerpc/mm/pgtable-radix.c:557:7: error: implicit declaration of function 'pmd_huge' arch/powerpc/mm/pgtable-radix.c:588:7: error: implicit declaration of function 'pud_huge' Fix it by stubbing those functions when HUGETLBFS=n. Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable-4k.h | 5 +++++ arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 3 +++ 2 files changed, 8 insertions(+) commit 2194bd1080210c6e85ea262cda9ad0135b3f3c87 Author: Dan Carpenter Date: Mon Feb 13 14:00:22 2017 +0300 net: qcom/emac: fix a sizeof() typo We had intended to say "sizeof(u32)" but the "u" is missing. Fortunately, sizeof(32) is also 4, so the original code still works. Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading hardware registers") Signed-off-by: Dan Carpenter Acked-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9ea828f62891ca91e3f80bf4a438f337d59977d Author: Christophe Jaillet Date: Fri Feb 10 21:17:19 2017 +0100 net: fs_enet: Simplify code There is no need to use an intermediate variable to handle an error code in this case. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6 Author: Christophe Jaillet Date: Fri Feb 10 21:17:06 2017 +0100 net: fs_enet: Fix an error handling path 'of_node_put(fpi->phy_node)' should also be called if we branch to 'out_deregister_fixed_link' error handling path. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26483819f89c5cf9d27620d70c95afeeeb9bece5 Author: Shaohua Li Date: Mon Feb 13 16:21:49 2017 -0800 md: disable WRITE SAME if it fails in underlayer disks This makes md do the same thing as dm for write same IO failure. Please see 7eee4ae(dm: disable WRITE SAME if it fails) for details why we need this. We did a little bit different than dm. Instead of disabling writesame in the first IO error, we disable it till next writesame IO coming after the first IO error. This way we don't need to clone a bio. Also reported here: https://bugzilla.kernel.org/show_bug.cgi?id=118581 Suggested-by: NeilBrown Acked-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/linear.c | 1 + drivers/md/md.h | 7 +++++++ drivers/md/multipath.c | 1 + drivers/md/raid0.c | 1 + 4 files changed, 10 insertions(+) commit c3d8103bc0069b926887e2270e9dd1e1e8441bb4 Merge: fb585b4 b4db2b3 Author: David S. Miller Date: Mon Feb 13 22:24:16 2017 -0500 Merge tag 'rxrpc-rewrite-20170210' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== afs: Use system UUID generation There is now a general function for generating a UUID and AFS should make use of it. It's also been recommended to me that I switch to using random rather than time plus MAC address-based UUIDs which this function does. ==================== Signed-off-by: David S. Miller commit fb585b44383c4cff85f92e67377ee1c5f07d6dc1 Author: Tobias Klauser Date: Fri Feb 10 16:43:50 2017 +0100 net: make net_device members garp_port and mrp_port conditional garp_port is only used in net/802/garp.c which is only compiled with CONFIG_GARP enabled. Same goes for mrp_port which is only used in net/802/mrp.c with CONFIG_MRP enabled. Only include the two members in struct net_device if their respective CONFIG_* is enabled. This saves a few bytes in struct net_device in case CONFIG_GARP or CONFIG_MRP are not enabled. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++++ 1 file changed, 4 insertions(+) commit 37fabbf4d489cc2e1cbf7cde816d9453a65ddfb7 Author: Eric Dumazet Date: Fri Feb 10 05:46:46 2017 -0800 net: busy-poll: remove LL_FLUSH_FAILED and LL_FLUSH_BUSY Commit 79e7fff47b7b ("net: remove support for per driver ndo_busy_poll()") made them obsolete. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/busy_poll.h | 4 ---- net/core/dev.c | 3 --- 2 files changed, 7 deletions(-) commit 417d18d38bc63201f6442810476048d2984054c0 Merge: 8f9000a b7eaf8f Author: David S. Miller Date: Mon Feb 13 22:23:23 2017 -0500 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-02-11 This series contains updates to i40e and i40evf only. Jake makes a minor change to prevent a minor bit of work, if it is not necessary. In the case where we do not have a client, there is no need to check the client params, so move the check till after we have ensured we have a client. Correct a code comment which incorrectly implied that raw_packet buffers were freed in i40e_clean_tx_ring(), so fixed the code comment to better explain where memory is freed. Reduce the severity and frequency of the message notifying we cleared the receive timestamp register, since the logic has a much better detection scheme that could detect a stalled receive timestamp register. The improved logic was actually causing the notification message to occur more frequently and was giving the user a false perception that a timestamp event was missed for a valid packet, so reduce the severity from dev_warn to dev_dbg and only fire off the message when 3 or 4 of the RXTIME registers are stalled and get cleared within the same watchdog event. Fixed a bug, where we were modifying the mac_filter outside a lock when handling the addition of broadcast filters. Fix this by updating i40e_update_filter_state logic so that it knows to avoid broadcast filters, which ensures that we do not have to remove the filter separately and can put it back using the normal flow. Refactored how we add new filters to firmware to avoid a race condition that can occur due to removing filters from the hash temporarily. Mitch adds a sleep (without timeout) so that we wait for a reply from the PF before we continue, since the iWarp client cannot continue until the operation is completed. Fixed up a function which could never return an error, to be void and cleaned up the checking of the now null and void return value. Scott limits the DMA sync to CPU to the actual length of the incoming packet, versus the syncing of the entire buffer. Also reduces the receive buffer struct (by a single pointer) and align the driver to be more consistent with other Intel drivers with respect to packets that span buffers. Sudheer adds a field to track the bus number info and modified log statements to print bus, device and function information. Henry adds the ability to store the FEC status bits from the link up event. Also adds the ethtool support for FEC capabilities and 25G link types. ==================== Signed-off-by: David S. Miller commit c6ce3e2fe3dacda5e8afb0036c814ae9c3fee9b9 Author: Rehas Sachdeva Date: Mon Feb 13 16:16:03 2017 -0500 radix tree test suite: Add config option for map shift Add config option "SHIFT=" to Makefile for building test suite with any value of RADIX_TREE_MAP_SHIFT between 3 and 7 inclusive. Signed-off-by: Rehas Sachdeva [mawilcox@microsoft.com: .gitignore, quieten grep, remove on clean] Signed-off-by: Matthew Wilcox tools/testing/radix-tree/.gitignore | 1 + tools/testing/radix-tree/Makefile | 18 +++++++++++++----- tools/testing/radix-tree/linux/kernel.h | 6 ------ tools/testing/radix-tree/linux/radix-tree.h | 2 ++ 4 files changed, 16 insertions(+), 11 deletions(-) commit 7e73eb0b2df5e8d7bd00a3c5980ab86619699963 Author: Matthew Wilcox Date: Mon Feb 13 16:03:55 2017 -0500 idr: Add missing __rcu annotations Where we use the radix tree iteration macros, we need to annotate 'slot' with __rcu. Make sure we don't forget any new places in the future with the same CFLAGS check used for radix-tree.c. Signed-off-by: Matthew Wilcox lib/Makefile | 1 + lib/idr.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) commit d7b627277b57370223d682cede979a279284b12a Author: Matthew Wilcox Date: Mon Feb 13 15:58:24 2017 -0500 radix-tree: Fix __rcu annotations Many places were missing __rcu annotations. A few places needed a few lines of explanation about why it was safe to not use RCU accessors. Add a custom CFLAGS setting to the Makefile to ensure that new patches don't miss RCU annotations. Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 110 ++++++++++++++++++++------------------- lib/Makefile | 2 + lib/radix-tree.c | 125 ++++++++++++++++++++++++--------------------- 3 files changed, 122 insertions(+), 115 deletions(-) commit 12320d0ff1c9d5582f5c35e4bb8b9c70c475fd71 Author: Matthew Wilcox Date: Mon Feb 13 15:22:48 2017 -0500 radix-tree: Add rcu_dereference and rcu_assign_pointer calls Some of these have been missing for many years. Others were recently introduced by me. Fortunately, we have tools that help us find such things. Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 2 +- lib/radix-tree.c | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) commit c0cdbf819cd76d977486b4634ea1b4ede2434413 Author: Matthew Wilcox Date: Sun Jan 29 02:27:24 2017 -0500 radix tree test suite: Run iteration tests for longer If the -l flag is set, run the tests for 100 seconds each instead of the normal 10 seconds. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b7869c31f9358a63e502c8c5c7664daf1c6d8b0 Author: Matthew Wilcox Date: Sun Jan 29 02:00:31 2017 -0500 radix tree test suite: Fix split/join memory leaks The last of the memory leaks in the test suite was a couple of places in the split/join testing where I forgot to free the element being removed from the tree. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/multiorder.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 6da0396cac7692b6667c09382a746593fff90e6d Author: Matthew Wilcox Date: Sun Jan 29 01:52:55 2017 -0500 radix tree test suite: Fix leaks in regression2.c None of the malloc'ed data structures were ever being freed. Found with -fsanitize=address. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/regression2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 18d0c57394e42ff536e5fdc776b6b217fdd9889c Author: Matthew Wilcox Date: Sun Jan 29 01:48:34 2017 -0500 radix tree test suite: Fix leaky tests If item_insert() or item_insert_order() failed to insert an item, they would leak the item they had just created. This was causing runaway memory consumption while running the iteration_check testcase, which proves that Ross has too much memory in his workstation ;-) Make sure to free the item on error. Found with -fsanitize=address. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/test.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 829f83d3653ef7105187b0110887dbfd46a30ce4 Author: Matthew Wilcox Date: Sat Jan 28 10:03:48 2017 -0500 radix tree test suite: Enable address sanitizer I was looking for a memory scribble and instead found a pile of memory leaks. Ensure no more occur in future. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7137f79c57f228321dde2ab4586015504feaaac Author: Matthew Wilcox Date: Mon Jan 30 16:22:30 2017 -0500 radix_tree_iter_resume: Fix out of bounds error The address sanitizer occasionally finds an out of bounds error while running the test-suite. It turned out to be a read of the pointer immediately next to the tree root, but this out of bounds error could have occurred elsewhere. This happens because radix_tree_iter_resume() dereferences 'slot' before checking whether we've come to the end of the chunk. We can just delete this line; the value was never used. Signed-off-by: Matthew Wilcox lib/radix-tree.c | 1 - 1 file changed, 1 deletion(-) commit d58275bc96ae933b1b3888af80920dd6b020c505 Author: Matthew Wilcox Date: Mon Jan 16 17:10:21 2017 -0500 radix-tree: Store a pointer to the root in each node Instead of having this mysterious private_data in each radix_tree_node, store a pointer to the root, which can be useful for debugging. This also relieves the mm code from the duty of updating it. Acked-by: Johannes Weiner Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 2 +- lib/radix-tree.c | 14 ++++++++------ mm/workingset.c | 6 ++---- 3 files changed, 11 insertions(+), 11 deletions(-) commit 1293d5c5f54d5118fbb34fc94e01ba02fcd25fc1 Author: Matthew Wilcox Date: Mon Jan 16 16:41:29 2017 -0500 radix-tree: Chain preallocated nodes through ->parent Chaining through the ->private_data member means we have to zero ->private_data after removing preallocated nodes from the list. We're about to initialise ->parent anyway, so we can avoid zeroing it. Signed-off-by: Matthew Wilcox lib/radix-tree.c | 9 ++++----- tools/testing/radix-tree/linux.c | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) commit 73bc029b76482260a144219786d19951f561716e Author: Rehas Sachdeva Date: Wed Jan 4 11:55:00 2017 -0500 radix tree test suite: Dial down verbosity with -v Make the output of radix tree test suite less verbose by default and add -v and -vv command line options for increasing level of verbosity. Signed-off-by: Rehas Sachdeva Signed-off-by: Matthew Wilcox tools/testing/radix-tree/benchmark.c | 6 ++-- tools/testing/radix-tree/iteration_check.c | 2 +- tools/testing/radix-tree/linux.c | 1 + tools/testing/radix-tree/linux/radix-tree.h | 6 ++++ tools/testing/radix-tree/main.c | 45 ++++++++++++++++++----------- tools/testing/radix-tree/multiorder.c | 17 ++++++----- tools/testing/radix-tree/regression1.c | 4 +-- tools/testing/radix-tree/regression2.c | 4 +-- tools/testing/radix-tree/regression3.c | 28 +++++++++--------- tools/testing/radix-tree/tag_check.c | 22 +++++++------- 10 files changed, 77 insertions(+), 58 deletions(-) commit 5eeb2d23df29212f901a36dabf16f93d8bd50814 Author: Matthew Wilcox Date: Sat Dec 24 07:49:18 2016 -0500 radix tree test suite: Introduce kmalloc_verbose To help track down where memory leaks may be, add the ability to turn on/off printing allocations, frees and delayed frees. Signed-off-by: Matthew Wilcox tools/testing/radix-tree/linux.c | 9 +++++++++ tools/testing/radix-tree/linux/radix-tree.h | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) commit d3e709e63e97e5f3f129b639991cfe266da60bae Author: Matthew Wilcox Date: Thu Dec 22 13:30:22 2016 -0500 idr: Return the deleted entry from idr_remove It is a relatively common idiom (8 instances) to first look up an IDR entry, and then remove it from the tree if it is found, possibly doing further operations upon the entry afterwards. If we change idr_remove() to return the removed object, all of these users can save themselves a walk of the IDR tree. Signed-off-by: Matthew Wilcox drivers/atm/nicstar.c | 5 ++--- drivers/block/drbd/drbd_main.c | 6 ++---- drivers/firewire/core-cdev.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 10 +++------- drivers/net/wireless/marvell/mwifiex/txrx.c | 4 +--- drivers/target/target_core_user.c | 4 +--- include/linux/idr.h | 4 ++-- net/mac80211/status.c | 4 +--- 9 files changed, 15 insertions(+), 29 deletions(-) commit 8ac04868315c6ffcb2c5a5ad9cd5cec61cad3576 Author: Matthew Wilcox Date: Sun Dec 18 22:56:05 2016 -0500 radix tree test suite: Build separate binaries for some tests To allow developers to run a subset of tests, build separate multiorder and idr-test binaries which will run just the tests in those files. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/.gitignore | 4 +++- tools/testing/radix-tree/Makefile | 18 ++++++++++++------ tools/testing/radix-tree/idr-test.c | 11 +++++++++++ tools/testing/radix-tree/multiorder.c | 7 +++++++ 4 files changed, 33 insertions(+), 7 deletions(-) commit d37cacc5adace7f3e0824e1f559192ad7299d029 Author: Matthew Wilcox Date: Sat Dec 17 08:18:17 2016 -0500 ida: Use exceptional entries for small IDAs We can use the root entry as a bitmap and save allocating a 128 byte bitmap for an IDA that contains only a few entries (30 on a 32-bit machine, 62 on a 64-bit machine). This costs about 300 bytes of kernel text on x86-64, so as long as 3 IDAs fall into this category, this is a net win for memory consumption. Thanks to Rasmus Villemoes for his work documenting the problem and collecting statistics on IDAs. Signed-off-by: Matthew Wilcox lib/idr.c | 87 +++++++++++++++++++++++++++++++--- lib/radix-tree.c | 8 ++++ tools/testing/radix-tree/idr-test.c | 93 ++++++++++++++++++++++++++++++++++++- 3 files changed, 181 insertions(+), 7 deletions(-) commit 7ad3d4d85c7af9632055a6ac0aa15b6b6a321c6b Author: Matthew Wilcox Date: Fri Dec 16 11:55:56 2016 -0500 ida: Move ida_bitmap to a percpu variable When we preload the IDA, we allocate an IDA bitmap. Instead of storing that preallocated bitmap in the IDA, we store it in a percpu variable. Generally there are more IDAs in the system than CPUs, so this cuts down on the number of preallocated bitmaps that are unused, and about half of the IDA users did not call ida_destroy() so they were leaking IDA bitmaps. Signed-off-by: Matthew Wilcox include/linux/idr.h | 5 ++-- lib/idr.c | 39 ++-------------------------- lib/radix-tree.c | 45 ++++++++++++++++++++++++++++++--- tools/testing/radix-tree/linux/kernel.h | 2 -- tools/testing/radix-tree/linux/percpu.h | 5 +++- 5 files changed, 51 insertions(+), 45 deletions(-) commit 0a835c4f090af2c76fc2932c539c3b32fd21fbbb Author: Matthew Wilcox Date: Tue Dec 20 10:27:56 2016 -0500 Reimplement IDR and IDA using the radix tree The IDR is very similar to the radix tree. It has some functionality that the radix tree did not have (alloc next free, cyclic allocation, a callback-based for_each, destroy tree), which is readily implementable on top of the radix tree. A few small changes were needed in order to use a tag to represent nodes with free space below them. More extensive changes were needed to support storing NULL as a valid entry in an IDR. Plain radix trees still interpret NULL as a not-present entry. The IDA is reimplemented as a client of the newly enhanced radix tree. As in the current implementation, it uses a bitmap at the last level of the tree. Signed-off-by: Matthew Wilcox Signed-off-by: Matthew Wilcox Tested-by: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Ross Zwisler Cc: Tejun Heo Signed-off-by: Andrew Morton include/linux/idr.h | 145 ++-- include/linux/radix-tree.h | 49 +- init/main.c | 3 +- lib/idr.c | 1178 ++++++------------------------- lib/radix-tree.c | 375 +++++++--- tools/testing/radix-tree/.gitignore | 1 + tools/testing/radix-tree/Makefile | 10 +- tools/testing/radix-tree/idr-test.c | 342 +++++++++ tools/testing/radix-tree/linux/gfp.h | 8 +- tools/testing/radix-tree/linux/idr.h | 1 + tools/testing/radix-tree/linux/kernel.h | 1 + tools/testing/radix-tree/main.c | 6 + tools/testing/radix-tree/test.h | 2 + 13 files changed, 995 insertions(+), 1126 deletions(-) commit c5c9b26ee5f1295c77d8f2ff5f804ed6c0b07cc4 Author: Christoph Hellwig Date: Wed Feb 8 00:13:20 2017 +0100 cciss: switch to pci_irq_alloc_vectors Simple cleanup to use the new APIs. Signed-off-by: Christoph Hellwig Acked-by: Don Brace Tested-by: Don Brace Signed-off-by: Jens Axboe drivers/block/cciss.c | 54 ++++++++++++++------------------------------------- drivers/block/cciss.h | 6 ++---- 2 files changed, 17 insertions(+), 43 deletions(-) commit 5cb44ee2f4dde68d83a3e17c3333bc4099003669 Author: Andy Shevchenko Date: Thu Feb 2 19:54:27 2017 +0200 platform/x86: intel_mid_powerbtn: Move comment to where it belongs The comments is about initial interrupt acknowledgment only. So, move it back to where it belongs. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b30f3f8e109698f79ab1cdd30d6386d92338eb15 Author: Andy Shevchenko Date: Thu Feb 2 19:54:26 2017 +0200 platform/x86: intel_mid_powerbtn: Unify PBSTATUS access The status register on Intel Merrifield can be read in the similar way it's done for previous MID platforms. Unify access to PBSTATUS register via SCU IPC. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 41 ++++++++++--------------------- 1 file changed, 13 insertions(+), 28 deletions(-) commit 4f24ecff0153047a4a8b53c31d8001ee79e1cab7 Author: Andrey Ryabinin Date: Thu Jan 26 17:27:23 2017 +0300 platform/x86: intel_pmc_core: fix out-of-bounds accesses on stack pmc_core_mtpmc_link_status() an pmc_core_check_read_lock_bit() use test_bit() on local 32-bit variable. This causes out-of-bounds access since test_bit() expects object at least of 'unsigned long' size: BUG: KASAN: stack-out-of-bounds in pmc_core_probe+0x3aa/0x3b0 Call Trace: __asan_report_load_n_noabort+0x5c/0x80 pmc_core_probe+0x3aa/0x3b0 local_pci_probe+0xf9/0x1e0 pci_device_probe+0x27b/0x350 driver_probe_device+0x419/0x830 __driver_attach+0x15f/0x1d0 bus_for_each_dev+0x129/0x1d0 driver_attach+0x42/0x70 bus_add_driver+0x385/0x690 driver_register+0x1a9/0x3d0 __pci_register_driver+0x1a2/0x290 intel_pmc_core_driver_init+0x19/0x1b do_one_initcall+0x12e/0x280 kernel_init_freeable+0x57c/0x623 kernel_init+0x13/0x140 ret_from_fork+0x2e/0x40 Fix this by open coding bit test. While at it, also refactor this code a little bit. Fixes: 173943b3dae5 ("platform/x86: intel_pmc_core: ModPhy core lanes pg status") Signed-off-by: Andrey Ryabinin [andy: reverted not related changes, used BIT() macro] Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit be2eba5810db19a3f752430cd1b03e9457c2959c Author: Arnd Bergmann Date: Thu Feb 2 15:25:57 2017 +0100 platform/x86: silead depends on I2C being built-in The new driver cannot be a loadable module, so if I2C is loadable, we get this link error: drivers/platform/built-in.o: In function `silead_ts_dmi_init': silead_dmi.c:(.init.text+0x2ef): undefined reference to `i2c_bus_type' This makes the Kconfig dependency stricter to require I2C=y. Fixes: 9eeda3897a85 ("platform/x86: add support for devices with Silead touchscreens") Signed-off-by: Arnd Bergmann Acked-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cef9dd85acd79449d1a5a65543d10f18cb68e56c Author: Hans de Goede Date: Mon Jan 23 18:35:30 2017 +0100 platform/x86: add support for devices with Silead touchscreens On ACPI based tablets, the ACPI touchscreen node only contains info on the gpio and the irq, and is missing any info on the axis. This info is expected to be built into the tablet model specific version of the driver shipped with the os-image for the device. Add support for getting the missing info from a table built into the driver, using dmi data to identify which entry of the table to use and add info for the CUBE iwork8 Air and Jumper EZpad mini3 tablets on which this code was tested / developed. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=187531 Signed-off-by: Hans de Goede [dmitry.torokhov@gmail.com: Move to platform/x86] Signed-off-by: Dmitry Torokhov Acked-by: Andy Shevchenko [andy: fixed merge conflict] Signed-off-by: Andy Shevchenko MAINTAINERS | 8 +++ drivers/platform/x86/Kconfig | 11 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/silead_dmi.c | 136 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) commit 251af29c320d86071664f02c76f0d063a19fefdf Author: Trond Myklebust Date: Sat Feb 11 10:37:38 2017 -0500 nlm: Ensure callback code also checks that the files match It is not sufficient to just check that the lock pids match when granting a callback, we also need to ensure that we're granting the callback on the right file. Reported-by: Pankaj Singh Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/lockd/lockd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09bb6e93956ae5175b96905b723ec879c3ca0765 Author: Grygorii Strashko Date: Mon Feb 13 12:43:22 2017 -0800 PM / wakeirq: report a wakeup_event on dedicated wekup irq There are two reasons for reporting wakeup event when dedicated wakeup IRQ is triggered: - wakeup events accounting, so proper statistical data will be displayed in sysfs and debugfs; - there are small window when System is entering suspend during which dedicated wakeup IRQ can be lost: dpm_suspend_noirq() |- device_wakeup_arm_wake_irqs() |- dev_pm_arm_wake_irq(X) |- IRQ is enabled and marked as wakeup source [1]... |- suspend_device_irqs() |- suspend_device_irq(X) |- irqd_set(X, IRQD_WAKEUP_ARMED); |- wakup IRQ armed The wakeup IRQ can be lost if it's triggered at point [1] and not armed yet. Hence, fix above cases by adding simple pm_wakeup_event() call in handle_threaded_wake_irq(). Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling) Signed-off-by: Grygorii Strashko Tested-by: Keerthy [ tony@atomide.com: added missing return to avoid warnings ] Tested-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeirq.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0bf0ee8ef9a6c120f7f320b9fb5fe1270965d828 Author: Grygorii Strashko Date: Fri Feb 10 14:25:01 2017 -0800 PM / wakeirq: Fix spurious wake-up events for dedicated wakeirqs Dedicated wakeirq is a one time event to wake-up the system from low-power state and then call pm_runtime_resume() on the device wired with the dedicated wakeirq. Sometimes dedicated wakeirqs can get deferred if they trigger after we call disable_irq_nosync() in dev_pm_disable_wake_irq(). This can happen if pm_runtime_get() is called around the same time a wakeirq fires. If an interrupt fires after disable_irq_nosync(), by default it will get tagged with IRQS_PENDING and will run later on when the interrupt is enabled again. Deferred wakeirqs usually just produce pointless wake-up events. But they can also cause suspend to fail if the deferred wakeirq fires during dpm_suspend_noirq() for example. So we really don't want to see the deferred wakeirqs triggering after the device has resumed. Let's fix the issue by setting IRQ_DISABLE_UNLAZY flag for the dedicated wakeirqs. The other option would be to implement irq_disable() in the dedicated wakeirq controller, but that's not a generic solution. For reference below is what happens with a IRQ_TYPE_EDGE_BOTH IRQ type wakeirq: - resume by dedicated IRQ (EDGE_FALLING) - suspend_enter() .... - arch_suspend_enable_irqs() |- dedicated IRQ armed and fired |- irq_pm_check_wakeup() |- disarm, disable IRQ and mark as IRQS_PENDING .... - dpm_resume_noirq() |- resume_device_irqs() |- __enable_irq() |- check_irq_resend() |- handle_threaded_wake_irq() |- dedicated IRQ processed |- device_wakeup_disarm_wake_irqs() |- disable_irq_wake() .... !-> dedicated IRQ (EDGE_RISING) -| handle_edge_irq() |- IRQ disabled: mask_ack_irq and mark as IRQS_PENDING .... - subsequent suspend .... |- dpm_suspend_noirq() |- device_wakeup_arm_wake_irqs() |- __enable_irq() |- check_irq_resend() (a) |- handle_threaded_wake_irq() |- pm_wakeup_event() --> abort suspend .... |- suspend_device_irqs() |- suspend_device_irq() |- dedicated IRQ armed .... (b) |- resend_irqs |- irq_pm_check_wakeup() |- IRQ armed -> abort suspend because of pending IRQ System suspend can be aborted at points (a)-not armed or (b)-armed. Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling) Signed-off-by: Grygorii Strashko [ tony@atomide.com: added a comment, updated the description ] Tested-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeirq.c | 3 +++ 1 file changed, 3 insertions(+) commit c84345597558349474f55be2b7d4093256e42884 Author: Grygorii Strashko Date: Fri Feb 10 14:25:00 2017 -0800 PM / wakeirq: Enable dedicated wakeirq for suspend We currently rely on runtime PM to enable dedicated wakeirq for suspend. This assumption fails in the following two cases: 1. If the consumer driver does not have runtime PM implemented, the dedicated wakeirq never gets enabled for suspend 2. If the consumer driver has runtime PM implemented, but does not idle in suspend Let's fix the issue by always enabling the dedicated wakeirq during suspend. Depends-on: bed570307ed7 (PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend) Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling) Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Grygorii Strashko [ tony@atomide.com: updated based on bed570307ed7, added description ] Tested-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeirq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ca86cad7380e373fa17bc0ee8aff121380323e69 Author: Richard Guy Briggs Date: Sat Feb 4 13:10:38 2017 -0500 audit: log module name on init_module This adds a new auxiliary record MODULE_INIT to the SYSCALL event. We get finit_module for free since it made most sense to hook this in to load_module(). https://github.com/linux-audit/audit-kernel/issues/7 https://github.com/linux-audit/audit-kernel/wiki/RFE-Module-Load-Record-Format Signed-off-by: Richard Guy Briggs Acked-by: Jessica Yu [PM: corrected links in the commit description] Signed-off-by: Paul Moore include/linux/audit.h | 12 ++++++++++++ include/uapi/linux/audit.h | 1 + kernel/audit.h | 3 +++ kernel/auditsc.c | 14 ++++++++++++++ kernel/module.c | 5 ++++- 5 files changed, 34 insertions(+), 1 deletion(-) commit 0ac398ef391b53122976325ab6953456ce8e8310 Author: Matthew Wilcox Date: Sat Jan 28 09:56:22 2017 -0500 radix-tree: Add radix_tree_iter_delete Factor the deletion code out into __radix_tree_delete() and provide a nice iterator-based wrapper around it. If we free the node, advance the iterator to avoid reading from freed memory. Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 2 + lib/radix-tree.c | 91 ++++++++++++++++++++++++++++++---------------- 2 files changed, 62 insertions(+), 31 deletions(-) commit 30b888ba950d9f77326b50a4aa2d7d99557d5718 Author: Matthew Wilcox Date: Sat Jan 28 09:55:20 2017 -0500 radix-tree: Add radix_tree_iter_tag_clear() The counterpart to radix_tree_iter_tag_set(), used by the IDR code Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva include/linux/radix-tree.h | 4 ++- lib/radix-tree.c | 68 +++++++++++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 29 deletions(-) commit bfa11193c46d5ea8ef4d9a4f1c10221cdd985ab1 Author: Matthew Wilcox Date: Thu Dec 29 14:49:48 2016 -0500 radix tree test suite: Remove obsolete CONFIG radix-tree.c doesn't use these CONFIG options any more. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/generated/autoconf.h | 2 -- 1 file changed, 2 deletions(-) commit 991af734c46d726f1c62cabd1681563beb533e14 Author: Matthew Wilcox Date: Wed Dec 28 22:53:46 2016 -0500 radix tree test suite: Use vpath to find lib files Instead of specifying how to build find_bit.o from lib/find_bit.o, use vpath to tell make where to find find_bit.c. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ab3a1ffd11d90583c71bd606bf0fd5bfef30bce9 Author: Matthew Wilcox Date: Fri Dec 16 15:11:05 2016 -0500 radix tree test suite: Reduce kernel.h Many of the definitions in the radix-tree kernel.h are redundant with others in tools/include, or are no longer used, such as panic(). Move the definition of __init to init.h and in_interrupt() to preempt.h Signed-off-by: Matthew Wilcox tools/testing/radix-tree/linux/init.h | 2 +- tools/testing/radix-tree/linux/kernel.h | 39 +------------------------------- tools/testing/radix-tree/linux/preempt.h | 10 ++++++++ 3 files changed, 12 insertions(+), 39 deletions(-) commit 7a4f11b88981f47d79eb64267e8a2989a18ce831 Author: Matthew Wilcox Date: Wed Dec 28 19:40:49 2016 -0500 radix tree test suite: Remove export.h The tools/include export.h contains everything we need. Signed-off-by: Matthew Wilcox tools/testing/radix-tree/linux/export.h | 2 -- 1 file changed, 2 deletions(-) commit 12ea65390bd5a46f8a70f068eb0d48922576a781 Author: Matthew Wilcox Date: Fri Dec 16 14:53:45 2016 -0500 radix tree test suite: Remove types.h Move the pieces we still need to tools/include and update a few implicit includes. Signed-off-by: Matthew Wilcox tools/include/linux/compiler.h | 4 ++++ tools/include/linux/spinlock.h | 5 +++++ tools/testing/radix-tree/linux.c | 1 + tools/testing/radix-tree/linux/gfp.h | 2 ++ tools/testing/radix-tree/linux/types.h | 23 ----------------------- 5 files changed, 12 insertions(+), 23 deletions(-) commit a3c7890790e742074bc9e5640b0fcf9c61a771a2 Author: Matthew Wilcox Date: Fri Dec 16 15:12:41 2016 -0500 radix tree test suite: Remove mempool The radix tree hasn't used a mempool since the beginning of git history. Remove the userspace mempool implementation. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/linux.c | 22 ---------------------- tools/testing/radix-tree/linux/mempool.h | 16 ---------------- 2 files changed, 38 deletions(-) commit 43a30c2a3171e0f92c28dfd31ca3eb7d9cc72b26 Author: Matthew Wilcox Date: Mon Dec 19 11:09:34 2016 -0500 radix tree test suite: Depend on tools/include/asm files Changing tools/include/asm/bug.h showed a missing dependency in the Makefile. Signed-off-by: Matthew Wilcox Reviewed-by: Rehas Sachdeva tools/testing/radix-tree/Makefile | 1 + 1 file changed, 1 insertion(+) commit a734fb5d60067a73dd7099a58756847c07f9cd68 Author: Mickaël Salaün Date: Wed Feb 8 21:27:43 2017 +0100 samples/bpf: Reset global variables Before loading a new ELF, clean previous kernel version, license and processed sections. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-3-mic@digikod.net Signed-off-by: Arnaldo Carvalho de Melo samples/bpf/bpf_load.c | 5 +++++ 1 file changed, 5 insertions(+) commit 16ad1329002f905c643a438ddcfb0a180787850a Author: Mickaël Salaün Date: Wed Feb 8 21:27:42 2017 +0100 samples/bpf: Ignore already processed ELF sections Add a missing check for the map fixup loop. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-2-mic@digikod.net Signed-off-by: Arnaldo Carvalho de Melo samples/bpf/bpf_load.c | 2 ++ 1 file changed, 2 insertions(+) commit af392a8f5399e831cb502ff210dacef8b38ca513 Author: Mickaël Salaün Date: Wed Feb 8 21:27:44 2017 +0100 samples/bpf: Add missing header Include unistd.h to define __NR_getuid and __NR_getsid. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-4-mic@digikod.net Signed-off-by: Arnaldo Carvalho de Melo samples/bpf/tracex5_kern.c | 1 + 1 file changed, 1 insertion(+) commit 5eae7d842510d33d4410c062280eda6c935403dd Author: Arnaldo Carvalho de Melo Date: Mon Feb 13 17:11:03 2017 -0300 perf symbols: dso->name is an array, no need to check it against NULL As it will always evaluate to 'true', as reported by clang: util/map.c:390:36: error: address of array 'map->dso->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (map && map->dso && (map->dso->name || map->dso->long_name)) { ~~~~~~~~~~^~~~ ~~ util/map.c:393:22: error: address of array 'map->dso->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] else if (map->dso->name) ~~ ~~~~~~~~~~^~~~ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-x8cu007cly40kfp8xnpi9kya@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/map.c | 4 ++-- tools/perf/util/scripting-engines/trace-event-perl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9ef6839bcce7ca944c1ace4a7247cf13ca92a28f Author: Arnaldo Carvalho de Melo Date: Mon Feb 13 17:04:05 2017 -0300 perf tests record: No need to test an array against NULL It will always evaluate to 'true', as clang warns: CC /tmp/build/perf/tests/perf-record.o CC /tmp/build/perf/tests/evsel-roundtrip-name.o tests/perf-record.c:69:24: error: comparison of array 'argv' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if (evlist == NULL || argv == NULL) { ^~~~ ~~~~ 1 error generated. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-o4977g6p9b3peak9ct6ef48q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7c3899c06865c75f8887f33d9043f6e8e780e71 Author: Arnaldo Carvalho de Melo Date: Mon Feb 13 16:52:15 2017 -0300 perf symbols: No need to check if sym->name is NULL As it is an array, so will always evaluate to 'true', as reported by clang: builtin-sched.c:2070:19: error: address of array 'sym->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (sym && sym->name) { ~~ ~~~~~^~~~ 1 warning generated. So just ditch all those useless checks. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ydpm927col06paixb775jjx5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kmem.c | 4 ++-- tools/perf/builtin-sched.c | 2 +- tools/perf/util/evsel_fprintf.c | 1 - tools/perf/util/machine.c | 2 +- tools/perf/util/symbol_fprintf.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) commit d6195a6a2c247515d5832debb51c03a74dc3f8f6 Author: Arnaldo Carvalho de Melo Date: Mon Feb 13 16:45:24 2017 -0300 perf evsel: Inform how to make a sysctl setting permanent When a tool can't open counters due to the kernel.perf_event_paranoit sysctl setting, we inform how to tweak it to allow the operation to succeed, in addition to that, suggest setting /etc/sysctl.conf to make the setting permanent. Suggested-by: Ingo Molnar Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-4gwe99k4a6p12d4u8bbyttj2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/util/evsel.c | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) commit e8c6f437fd12d39e462962eaed2315bac597d34c Author: Arnaldo Carvalho de Melo Date: Mon Feb 13 13:33:57 2017 -0300 tools lib traceevent plugin function: Initialize 'index' variable Detected with clang: CC /tmp/build/perf/plugin_function.o plugin_function.c:145:6: warning: variable 'index' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (parent && ftrace_indent->set) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ plugin_function.c:148:29: note: uninitialized use occurs here trace_seq_printf(s, "%*s", index*3, ""); ^~~~~ plugin_function.c:145:2: note: remove the 'if' if its condition is always true if (parent && ftrace_indent->set) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ plugin_function.c:145:6: warning: variable 'index' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] if (parent && ftrace_indent->set) ^~~~~~ plugin_function.c:148:29: note: uninitialized use occurs here trace_seq_printf(s, "%*s", index*3, ""); ^~~~~ plugin_function.c:145:6: note: remove the '&&' if its condition is always true if (parent && ftrace_indent->set) ^~~~~~~~~ plugin_function.c:133:11: note: initialize the variable 'index' to silence this warning int index; ^ = 0 2 warnings generated. Reviewed-by: Steven Rostedt (VMware) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b5wyjocel55gorl2jq2cbxrr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/plugin_function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14e4d7e0abfdefabea2b8796c5a8b2b9c77b5326 Author: Steven Rostedt (VMware) Date: Mon Feb 13 12:11:44 2017 -0500 tools lib traceevent: Initialize lenght on OLD_RING_BUFFER_TYPE_TIME_STAMP A undefined value was being used for the OLD_RING_BUFFER_TYPE_TIME_STAMP case entry, as the 'length' variable was not being initialized, fix it. Caught by the reporter when building tools/perf/ using clang, which emmitted this warning: kbuffer-parse.c:312:7: warning: variable 'length' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case OLD_RINGBUF_TYPE_TIME_EXTEND: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ kbuffer-parse.c:339:29: note: uninitialized use occurs here kbuf->next = kbuf->index + length; ^~~~~~ kbuffer-parse.c:297:21: note: initialize the variable 'length' to silence this warning unsigned int length; ^ = 0 Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Steven Rostedt Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20170213121418.47f279e8@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/kbuffer-parse.c | 1 + 1 file changed, 1 insertion(+) commit d7dd112ea5cacf91ae72c0714c3b911eb6016fea Author: Wang YanQing Date: Sun Feb 12 10:46:55 2017 +0800 perf scripting perl: Fix compile error with some perl5 versions Fix below compile error: CC util/scripting-engines/trace-event-perl.o In file included from /usr/lib/perl5/5.22.2/i686-linux/CORE/perl.h:5673:0, from util/scripting-engines/trace-event-perl.c:31: /usr/lib/perl5/5.22.2/i686-linux/CORE/inline.h: In function 'S__is_utf8_char_slow': /usr/lib/perl5/5.22.2/i686-linux/CORE/inline.h:270:5: error: nested extern declaration of 'Perl___notused' [-Werror=nested-externs] dTHX; /* The function called below requires thread context */ ^ cc1: all warnings being treated as errors After digging perl5 repository, I find out that we will meet this compile error with perl from v5.21.1 to v5.25.4 Signed-off-by: Wang YanQing Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170212024655.GA15997@udknight Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2383267557a6080fadcbe335422c0825325845d Author: ozeng Date: Fri Feb 10 17:55:36 2017 -0600 drm/amdgpu: Initialize pipe priority order on graphic initialization Initialized PIPE_ORDER_TS0/1/2/3 field of SPI_ARB_PRIORITY register to 2. This set the pipe priority order to: 02 - HP3D, CS_H, GFX, CS_M, CS_L Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 06c177cb12ef25e63da1698f294babf43fbc1451 Author: Thor Thayer Date: Mon Feb 13 13:30:41 2017 -0600 MAINTAINERS, EDAC: Update email for Thor Thayer My opensource.altera.com email will be going away soon. Switch to new email address (linux.intel.com). Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1487014241-3771-1-git-send-email-thor.thayer@linux.intel.com Signed-off-by: Borislav Petkov MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69369f52d28a34c84acb6f2a8a585e743441566a Author: Andrii Anisov Date: Tue Feb 7 19:58:03 2017 +0200 swiotlb-xen: implement xen_swiotlb_get_sgtable callback Signed-off-by: Andrii Anisov Signed-off-by: Stefano Stabellini Signed-off-by: Konrad Rzeszutek Wilk arch/arm/xen/mm.c | 1 + drivers/xen/swiotlb-xen.c | 28 ++++++++++++++++++++++++++++ include/xen/swiotlb-xen.h | 6 ++++++ 3 files changed, 35 insertions(+) commit 7e91c7df29b5e196de3dc6f086c8937973bd0b88 Author: Stefano Stabellini Date: Tue Feb 7 19:58:02 2017 +0200 swiotlb-xen: implement xen_swiotlb_dma_mmap callback This function creates userspace mapping for the DMA-coherent memory. Signed-off-by: Stefano Stabellini Signed-off-by: Oleksandr Dmytryshyn Signed-off-by: Andrii Anisov Signed-off-by: Konrad Rzeszutek Wilk arch/arm/xen/mm.c | 1 + drivers/xen/swiotlb-xen.c | 19 +++++++++++++++++++ include/xen/swiotlb-xen.h | 5 +++++ 3 files changed, 25 insertions(+) commit 6c356eda225e3ee134ed4176b9ae3a76f793f4dd Author: Felix Fietkau Date: Thu Jan 19 12:28:22 2017 +0100 MIPS: Lantiq: Fix cascaded IRQ setup With the IRQ stack changes integrated, the XRX200 devices started emitting a constant stream of kernel messages like this: [ 565.415310] Spurious IRQ: CAUSE=0x1100c300 This is caused by IP0 getting handled by plat_irq_dispatch() rather than its vectored interrupt handler, which is fixed by commit de856416e714 ("MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch"). Fix plat_irq_dispatch() to handle non-vectored IPI interrupts correctly by setting up IP2-6 as proper chained IRQ handlers and calling do_IRQ for all MIPS CPU interrupts. Signed-off-by: Felix Fietkau Acked-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15077/ [james.hogan@imgtec.com: tweaked commit message] Signed-off-by: James Hogan arch/mips/lantiq/irq.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) commit 4fb69afa767777360201a43725ddd7f7c64459bb Author: Matt Redfearn Date: Thu Feb 2 13:22:04 2017 +0000 MIPS: sync-r4k: Fix KERN_CONT fallout Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output of counter synchornisation has been split across lines: [ 0.665181] Synchronize counters for CPU 1: [ 0.678578] done. Fix this by using pr_cont, and replace printk with pr_info. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15195/ Signed-off-by: James Hogan arch/mips/kernel/sync-r4k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c25f8064c1d5731a2ce5664def890140dcdd3e5c Author: Matt Redfearn Date: Wed Jan 25 17:00:25 2017 +0000 MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch Commit dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts") changed both the normal and vectored interrupt handlers. Unfortunately the vectored version, "except_vec_vi_handler", was incorrectly modified to unconditionally jal to plat_irq_dispatch, rather than doing a jalr to the vectored handler that has been set up. This is ok for many platforms which set the vectored handler to plat_irq_dispatch anyway, but will cause problems with platforms that use other handlers. Fixes: dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts") Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15110/ Signed-off-by: James Hogan arch/mips/kernel/genex.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e5b95cdbd0e9a87bc4b6ca173ae7f4f6a0f3e37 Author: Matt Redfearn Date: Mon Jan 30 09:58:34 2017 +0000 MIPS: Fix distclean with Makefile.postlink The postlink Makefile must include include/config/auto.conf to get the kernel configuration variables. But in a clean kernel directory this file does not exist, causing make to bail with the error: arch/mips/Makefile.postlink:10: include/config/auto.conf: No such file or directory make[1]: *** No rule to make target 'include/config/auto.conf'. Stop. Makefile:1290: recipe for target 'vmlinuxclean' failed Fix this by using "-include" to not cause a Make error when the file does not exist. Fixes: 44079d3509ae ("MIPS: Use Makefile.postlink to insert relocations into vmlinux") Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15136/ Signed-off-by: James Hogan arch/mips/Makefile.postlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4828b5f56f9596f014567ceef0e5c200fb582e13 Author: James Hogan Date: Fri Feb 10 22:44:03 2017 +0000 MIPS: Fix cacheinfo overflow The recently added MIPS cacheinfo support used a macro populate_cache() to populate the cacheinfo structures depending on which caches are present. However the macro contains multiple statements without enclosing them in a do {} while (0) loop, so the L2 and L3 cache conditionals in populate_cache_leaves() only conditionalised the first statement in the macro. This overflows the buffer allocated by detect_cache_attributes(), resulting in boot failures under QEMU where neither the L2 or L2 caches are present. Enclose the macro statements in a do {} while (0) block to keep the whole macro inside the conditionals. Fixes: ef462f3b64e9 ("MIPS: Add cacheinfo support") Reported-by: Guenter Roeck Signed-off-by: James Hogan Tested-by: Guenter Roeck Cc: Ralf Baechle Cc: Justin Chen Cc: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/15276/ arch/mips/kernel/cacheinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f229454d34e000e714280e767811304e29d96bea Author: Paul Burton Date: Mon Feb 6 11:03:15 2017 -0800 MIPS: Fix protected_cache(e)_op() for microMIPS When building for microMIPS we need to ensure that the assembler always knows that there is code at the target of a branch or jump. Commit 7170bdc77755 ("MIPS: Add return errors to protected cache ops") introduced a fixup path to protected_cache(e)_op() which does not meet this requirement. The fixup path jumps to the "2" label but the .section pseudo-op immediately following it causes the label to be marked as data. Linking then fails with: mips-img-linux-gnu-ld: arch/mips/mm/c-r4k.o: .fixup+0x0: Unsupported jump between ISA modes; consider recompiling with interlinking enabled. Fix this by declaring that "2" labels code using the .insn directive. Fixes: 7170bdc77755 ("MIPS: Add return errors to protected cache ops") Signed-off-by: Paul Burton Signed-off-by: James Hogan Reviewed-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: Ralf Baechle Patchwork: https://patchwork.linux-mips.org/patch/15274/ Signed-off-by: James Hogan arch/mips/include/asm/r4kcache.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f700a420088624671ed955bf818c17012bb57bca Merge: 98e58b0 7170bdc Author: James Hogan Date: Thu Feb 9 15:20:06 2017 +0000 Merge tag 'mips_kvm_4.11_1' into mips-for-linux-next MIPS dependencies for KVM Miscellaneous MIPS architecture changes depended on by the MIPS KVM changes in the KVM tree. - Move pgd_alloc() out of header. - Exports so KVM can access page table management and TLBEX functions. - Add return errors to protected cache ops. commit dc9eab6fd94dd26340749321bba2c58634761516 Author: Paul Durrant Date: Mon Feb 13 17:03:22 2017 +0000 xen/privcmd: return -ENOTTY for unimplemented IOCTLs The code sets the default return code to -ENOSYS but then overrides this to -EINVAL in the switch() statement's default case, which is clearly silly. This patch removes the override and sets the default return code to -ENOTTY, which is the conventional return for an unimplemented ioctl. Signed-off-by: Paul Durrant Signed-off-by: Boris Ostrovsky drivers/xen/privcmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 379f831a927817c130a62e3ca0082ae685557324 Author: Andi Shyti Date: Fri Feb 10 11:20:19 2017 +0900 spi: s3c64xx: fix inconsistency between binding and driver Commit a92e7c3d82a1 ("spi: s3c64xx: consider the case when the CS line is not connected") introduced an inconsistency between the binding, where the disconnected CS line was marked as 'no-cs-readback', and the driver. The driver is erroneously checking for that attribute with property name of 'broken-cs'. Check for 'no-cs-readback' in the driver as well. Fixes: a92e7c3d82a1 ("spi: s3c64xx: consider the case when the CS line is not connected") Signed-off-by: Andi Shyti Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc1b326efd276e7d121f5c1ced2884ae52a85814 Author: Kees Cook Date: Fri Feb 10 10:19:07 2017 -0800 MAINTAINERS: Adjust pstore git repo URI, add files The tree used for staging pstore changes has moved to my repo. The -next tree already pulls from here, so update MAINTAINERS to reflect reality. While at it, add some more pstore-related files to track. Signed-off-by: Kees Cook MAINTAINERS | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 46418413ed200aa2c856a4426f93a157672b10c7 Author: Kees Cook Date: Fri Feb 10 10:15:34 2017 -0800 pstore: Check for prz allocation in walker Instead of needing additional checks in callers for unallocated przs, perform the check in the walker, which gives us a more universal way to handle the situation. Signed-off-by: Kees Cook fs/pstore/ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 76d5692a58031696e282384cbd893832bc92bd76 Author: Kees Cook Date: Thu Feb 9 15:43:44 2017 -0800 pstore: Correctly initialize spinlock and flags The ram backend wasn't always initializing its spinlock correctly. Since it was coming from kzalloc memory, though, it was harmless on architectures that initialize unlocked spinlocks to 0 (at least x86 and ARM). This also fixes a possibly ignored flag setting too. When running under CONFIG_DEBUG_SPINLOCK, the following Oops was visible: [ 0.760836] persistent_ram: found existing buffer, size 29988, start 29988 [ 0.765112] persistent_ram: found existing buffer, size 30105, start 30105 [ 0.769435] persistent_ram: found existing buffer, size 118542, start 118542 [ 0.785960] persistent_ram: found existing buffer, size 0, start 0 [ 0.786098] persistent_ram: found existing buffer, size 0, start 0 [ 0.786131] pstore: using zlib compression [ 0.790716] BUG: spinlock bad magic on CPU#0, swapper/0/1 [ 0.790729] lock: 0xffffffc0d1ca9bb0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [ 0.790742] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-rc2+ #913 [ 0.790747] Hardware name: Google Kevin (DT) [ 0.790750] Call trace: [ 0.790768] [] dump_backtrace+0x0/0x2bc [ 0.790780] [] show_stack+0x20/0x28 [ 0.790794] [] dump_stack+0xa4/0xcc [ 0.790809] [] spin_dump+0xe0/0xf0 [ 0.790821] [] spin_bug+0x30/0x3c [ 0.790834] [] do_raw_spin_lock+0x50/0x1b8 [ 0.790846] [] _raw_spin_lock_irqsave+0x54/0x6c [ 0.790862] [] buffer_size_add+0x48/0xcc [ 0.790875] [] persistent_ram_write+0x60/0x11c [ 0.790888] [] ramoops_pstore_write_buf+0xd4/0x2a4 [ 0.790900] [] pstore_console_write+0xf0/0x134 [ 0.790912] [] console_unlock+0x48c/0x5e8 [ 0.790923] [] register_console+0x3b0/0x4d4 [ 0.790935] [] pstore_register+0x1a8/0x234 [ 0.790947] [] ramoops_probe+0x6b8/0x7d4 [ 0.790961] [] platform_drv_probe+0x7c/0xd0 [ 0.790972] [] driver_probe_device+0x1b4/0x3bc [ 0.790982] [] __device_attach_driver+0xc8/0xf4 [ 0.790996] [] bus_for_each_drv+0xb4/0xe4 [ 0.791006] [] __device_attach+0xd0/0x158 [ 0.791016] [] device_initial_probe+0x24/0x30 [ 0.791026] [] bus_probe_device+0x50/0xe4 [ 0.791038] [] device_add+0x3a4/0x76c [ 0.791051] [] of_device_add+0x74/0x84 [ 0.791062] [] of_platform_device_create_pdata+0xc0/0x100 [ 0.791073] [] of_platform_device_create+0x34/0x40 [ 0.791086] [] of_platform_default_populate_init+0x58/0x78 [ 0.791097] [] do_one_initcall+0x88/0x160 [ 0.791109] [] kernel_init_freeable+0x264/0x31c [ 0.791123] [] kernel_init+0x18/0x11c [ 0.791133] [] ret_from_fork+0x10/0x50 [ 0.793717] console [pstore-1] enabled [ 0.797845] pstore: Registered ramoops as persistent store backend [ 0.804647] ramoops: attached 0x100000@0xf7edc000, ecc: 0/0 Fixes: 663deb47880f ("pstore: Allow prz to control need for locking") Fixes: 109704492ef6 ("pstore: Make spinlock per zone instead of global") Reported-by: Brian Norris Signed-off-by: Kees Cook fs/pstore/ram_core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f55d404f49194563974f5462f9f4bd7cbc48d9c6 Author: Mylène Josserand Date: Fri Feb 10 11:00:46 2017 +0100 ASoC: sun4i-i2s: Update binding documentation to include A31 Add a new compatible for sun4i-i2s driver to handle some SoCs that have a reset line that must be asserted/deasserted. This new compatible, "allwinner,sun6i-a31-i2s", requires the property "resets" which should be a phandle to the reset line. Except these differences, the compatible is identical to previous one which will not handle a reset line. Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sun4i-i2s.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 6308f1787fb85bc98b7241a08a9f7f33b47f8b61 Author: Andrew F. Davis Date: Fri Feb 10 11:55:47 2017 -0600 regulator: tps65086: Fix DT node referencing in of_parse_cb When we check for additional DT properties in the current node we use the device_node passed in with the configuration data, this will not point to the correct DT node, use the one passed in for this purpose. Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC") Reported-by: Steven Kipisz Signed-off-by: Andrew F. Davis Tested-by: Steven Kipisz Signed-off-by: Mark Brown drivers/regulator/tps65086-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c47f7c316de38c30b481e1886cc6352c9efdcc1 Author: Andrew F. Davis Date: Fri Feb 10 11:55:46 2017 -0600 regulator: tps65086: Fix expected switch DT node names The three load switches are called SWA1, SWB1, and SWB2. The node names describing properties for these are expected to be the same, but due to a typo they are not. Fix this here. Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC") Reported-by: Steven Kipisz Signed-off-by: Andrew F. Davis Tested-by: Steven Kipisz Signed-off-by: Mark Brown drivers/regulator/tps65086-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4957b556f5e7ef9855d698b7ae2f0d4245c7ff50 Author: Alexandre Belloni Date: Fri Feb 10 19:42:43 2017 +0100 ASoC: fsl_sai: support more than 2 channels The FSL SAI can support up to 32 channels using TDM. Report that value so they can actually be used. Tested using 8 channels. Signed-off-by: Alexandre Belloni Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 254cd2e08dd0c44f9de6424f10390343a34b4f5a Author: Rex Zhu Date: Wed Feb 8 17:17:55 2017 +0800 drm/amdgpu: read hw register to check pg status. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 5 ++--- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_0_1_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_1_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_1_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_d.h | 2 +- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_sh_mask.h | 3 +++ 12 files changed, 22 insertions(+), 14 deletions(-) commit d50e5c24480f8a6e2918ecd998e65f990f88b0ee Author: Alan Harrison Date: Thu Feb 9 16:01:57 2017 -0500 drm/amdgpu: Add to initialization of mmVCE_VCPU_CNTL register Add a bit needed during initialization into the driver, where it is supposed to be. Currently, this is happening in the VCE firmware, and although functional, this is the correct place to perform this initialization. Reviewed-by: Leo Liu Signed-off-by: Alan Harrison Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 ++ 1 file changed, 2 insertions(+) commit be57b3fd218ad4a19725ac4bd53e67b2ede42a9d Author: Namhyung Kim Date: Sat Feb 11 01:18:56 2017 +0900 perf diff: Change default setting to "delta-abs" The "delta-abs" compute method will show most changed entries on top. So users can easily see how much effect between the data. Note that it also changes the default of -o option to 1 in order to apply the compute method. To see original-style (sorted by baseline) use -o 0 option. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170210161856.18422-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 4 ++-- tools/perf/builtin-diff.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4b35994abe459f08f58b4b3855abf4ba80308680 Author: Namhyung Kim Date: Fri Feb 10 16:36:13 2017 +0900 perf diff: Add diff.compute config option The diff.compute config variable is to set the default compute method of perf diff command (-c option). Possible values 'delta' (default), 'delta-abs', 'ratio' and 'wdiff'. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20170210073614.24584-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 5 +++++ tools/perf/Documentation/perf-diff.txt | 5 +++-- tools/perf/builtin-diff.c | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) commit d49dd15d69731589de4436a6dcfca59567320fdf Author: Namhyung Kim Date: Fri Feb 10 16:36:12 2017 +0900 perf diff: Add diff.order config option In many cases, I need to look at differences between two data so I often used the -o option to sort the result base on the difference first. It'd be nice to have a config option to set it by default. The diff.order config option is to set the default value of -o/--order option. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20170210073614.24584-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 7 +++++++ tools/perf/Documentation/perf-diff.txt | 6 +++++- tools/perf/builtin-diff.c | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) commit a1668c25a8e1b53d00b2997ef5bc5e25c7a77235 Author: Namhyung Kim Date: Fri Feb 10 16:36:11 2017 +0900 perf diff: Add 'delta-abs' compute method The 'delta-abs' compute method is same as 'delta' but shows entries with bigger absolute delta first instead of sorting numerically. This is only useful together with -o option. Below is default output (-c delta): $ perf diff -o 1 -c delta | grep -v ^# | head 42.22% +4.97% [kernel.kallsyms] [k] cfb_imageblit 0.62% +1.23% [kernel.kallsyms] [k] mutex_lock +1.15% [kernel.kallsyms] [k] copy_user_generic_string 2.40% +0.95% [kernel.kallsyms] [k] bit_putcs 0.31% +0.79% [kernel.kallsyms] [k] link_path_walk +0.64% [kernel.kallsyms] [k] kmem_cache_alloc 0.00% +0.57% [kernel.kallsyms] [k] __rcu_read_unlock +0.45% [kernel.kallsyms] [k] alloc_set_pte 0.16% +0.45% [kernel.kallsyms] [k] menu_select +0.41% ld-2.24.so [.] do_lookup_x Now with 'delta-abs' it shows entries have bigger delta value either positive or negative. $ perf diff -o 1 -c delta-abs | grep -v ^# | head 42.22% +4.97% [kernel.kallsyms] [k] cfb_imageblit 12.72% -3.01% [kernel.kallsyms] [k] intel_idle 9.72% -1.31% [unknown] [.] 0x0000000000411343 0.62% +1.23% [kernel.kallsyms] [k] mutex_lock 2.40% +0.95% [kernel.kallsyms] [k] bit_putcs 0.31% +0.79% [kernel.kallsyms] [k] link_path_walk 1.35% -0.71% [kernel.kallsyms] [k] smp_call_function_single 0.00% +0.57% [kernel.kallsyms] [k] __rcu_read_unlock 0.16% +0.45% [kernel.kallsyms] [k] menu_select 0.72% -0.44% [kernel.kallsyms] [k] lookup_fast Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170210073614.24584-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 6 ++++- tools/perf/builtin-diff.c | 46 ++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) commit 192614010a5052fe92611c7076ef664fd9bb60e8 Author: Arnaldo Carvalho de Melo Date: Fri Feb 10 11:41:11 2017 -0300 tools include: Introduce linux/compiler-gcc.h To match the kernel headers structure, setting up things that are specific to gcc or to some specific version of gcc. It gets included by linux/compiler.h when gcc is the compiler being used. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Joe Perches Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-fabcqfq4asodq9t158hcs8t3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 14 ++++++++++++++ tools/include/linux/compiler.h | 10 +++++----- tools/perf/MANIFEST | 1 + 3 files changed, 20 insertions(+), 5 deletions(-) commit 8f9000a565d01cb1f1688dc5dc32ac8026a7e993 Author: Pavel Belous Date: Thu Feb 9 23:53:10 2017 +0300 net:ethernet:aquantia: Add 2500/5000 mbit link modes support. Using new link mode indices instead deprecated SUPPORTED_/ADVERTISED_ macro. Added indication for 2500 and 5000mbit link modes (AQtion adapter already supports these speeds). Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 96 +++++++++++++++---------- 1 file changed, 59 insertions(+), 37 deletions(-) commit e33fbb9cc73d6502e69eaf1c178e0c39059763ea Author: Shaohua Li Date: Fri Feb 10 16:18:09 2017 -0800 md/raid5-cache: exclude reclaiming stripes in reclaim check stripes which are being reclaimed are still accounted into cached stripes. The reclaim takes time. r5c_do_reclaim isn't aware of the stripes and does unnecessary stripe reclaim. In practice, I saw one stripe is reclaimed one time. This will cause bad IO pattern. Fixing this by excluding the reclaing stripes in the check. Cc: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 14 ++++++++++++-- drivers/md/raid5.c | 2 ++ drivers/md/raid5.h | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) commit e8fd52eec2cd25b917983b3f3aa738b722522376 Author: Shaohua Li Date: Fri Feb 10 16:18:08 2017 -0800 md/raid5-cache: stripe reclaim only counts valid stripes When log space is tight, we try to reclaim stripes from log head. There are stripes which can't be reclaimed right now if some conditions are met. We skip such stripes but accidentally count them, which might cause no stripes are claimed. Fixing this by only counting valid stripes. Cc: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a6265f9cd98b82d89778b806bc50b3d368c8273 Author: Shaohua Li Date: Mon Jan 30 15:47:49 2017 -0800 MD: add doc for raid5-cache I'm starting document of the raid5-cache feature. Please note this is a kernel doc instead of a mdadm manual, so I don't add the details about how to use the feature in mdadm side. Cc: NeilBrown Reviewed-by: Song Liu Signed-off-by: Shaohua Li Documentation/admin-guide/md.rst | 5 ++ Documentation/md/raid5-cache.txt | 109 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) commit 1601c5907c508637f7816a427ff23b14e54eb11d Author: Shaohua Li Date: Mon Jan 30 15:44:41 2017 -0800 Documentation: move MD related doc into a separate dir Signed-off-by: Shaohua Li Documentation/00-INDEX | 4 +- Documentation/md-cluster.txt | 324 ---------------------------------------- Documentation/md/md-cluster.txt | 324 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 326 insertions(+), 326 deletions(-) commit 9356863c9409efc79029c01a85d015efae977e69 Author: NeilBrown Date: Mon Feb 6 13:41:39 2017 +1100 md: ensure md devices are freed before module is unloaded. Commit: cbd199837750 ("md: Fix unfortunate interaction with evms") change mddev_put() so that it would not destroy an md device while ->ctime was non-zero. Unfortunately, we didn't make sure to clear ->ctime when unloading the module, so it is possible for an md device to remain after module unload. An attempt to open such a device will trigger an invalid memory reference in: get_gendisk -> kobj_lookup -> exact_lock -> get_disk when tring to access disk->fops, which was in the module that has been removed. So ensure we clear ->ctime in md_exit(), and explain how that is useful, as it isn't immediately obvious when looking at the code. Fixes: cbd199837750 ("md: Fix unfortunate interaction with evms") Tested-by: Guoqing Jiang Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 39b99586b321a9cbd4fe9abb5ea9346d2c4ca9c6 Author: Song Liu Date: Tue Jan 24 14:08:23 2017 -0800 md/r5cache: improve journal device efficiency It is important to be able to flush all stripes in raid5-cache. Therefore, we need reserve some space on the journal device for these flushes. If flush operation includes pending writes to the stripe, we need to reserve (conf->raid_disk + 1) pages per stripe for the flush out. This reduces the efficiency of journal space. If we exclude these pending writes from flush operation, we only need (conf->max_degraded + 1) pages per stripe. With this patch, when log space is critical (R5C_LOG_CRITICAL=1), pending writes will be excluded from stripe flush out. Therefore, we can reduce reserved space for flush out and thus improve journal device efficiency. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 36 +++++++++++++++++++++++++----------- drivers/md/raid5.c | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 58 insertions(+), 20 deletions(-) commit 03b047f45c29dff02f913a0234ca0cc1ca51966f Author: Song Liu Date: Wed Jan 11 13:39:14 2017 -0800 md/r5cache: enable chunk_aligned_read with write back cache Chunk aligned read significantly reduces CPU usage of raid456. However, it is not safe to fully bypass the write back cache. This patch enables chunk aligned read with write back cache. For chunk aligned read, we track stripes in write back cache at a bigger granularity, "big_stripe". Each chunk may contain more than one stripe (for example, a 256kB chunk contains 64 4kB-page, so this chunk contain 64 stripes). For chunk_aligned_read, these stripes are grouped into one big_stripe, so we only need one lookup for the whole chunk. For each big_stripe, struct big_stripe_info tracks how many stripes of this big_stripe are in the write back cache. We count how many stripes of this big_stripe are in the write back cache. These counters are tracked in a radix tree (big_stripe_tree). r5c_tree_index() is used to calculate keys for the radix tree. chunk_aligned_read() calls r5c_big_stripe_cached() to look up big_stripe of each chunk in the tree. If this big_stripe is in the tree, chunk_aligned_read() aborts. This look up is protected by rcu_read_lock(). It is necessary to remember whether a stripe is counted in big_stripe_tree. Instead of adding new flag, we reuses existing flags: STRIPE_R5C_PARTIAL_STRIPE and STRIPE_R5C_FULL_STRIPE. If either of these two flags are set, the stripe is counted in big_stripe_tree. This requires moving set_bit(STRIPE_R5C_PARTIAL_STRIPE) to r5c_try_caching_write(); and moving clear_bit of STRIPE_R5C_PARTIAL_STRIPE and STRIPE_R5C_FULL_STRIPE to r5c_finish_stripe_write_out(). Signed-off-by: Song Liu Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 171 ++++++++++++++++++++++++++++++++++++++++++----- drivers/md/raid5.c | 20 ++++-- drivers/md/raid5.h | 1 + 3 files changed, 168 insertions(+), 24 deletions(-) commit 10257d719686706aa669b348309cfd9fd9783ad9 Author: Song Liu Date: Wed Jan 11 10:00:51 2017 -0800 EXPORT_SYMBOL radix_tree_replace_slot It will be used in drivers/md/raid5-cache.c Signed-off-by: Song Liu Signed-off-by: Shaohua Li lib/radix-tree.c | 1 + 1 file changed, 1 insertion(+) commit 765d704db1f583630d52dc14c1ea573db6783459 Author: Shaohua Li Date: Wed Jan 4 09:33:23 2017 -0800 raid5: only dispatch IO from raid5d for harddisk raid We made raid5 stripe handling multi-thread before. It works well for SSD. But for harddisk, the multi-threading creates more disk seek, so not always improve performance. For several hard disks based raid5, multi-threading is required as raid5d becames a bottleneck especially for sequential write. To overcome the disk seek issue, we only dispatch IO from raid5d if the array is harddisk based. Other threads can still handle stripes, but can't dispatch IO. Idealy, we should control IO dispatching order according to IO position interrnally. Right now we still depend on block layer, which isn't very efficient sometimes though. My setup has 9 harddisks, each disk can do around 180M/s sequential write. So in theory, the raid5 can do 180 * 8 = 1440M/s sequential write. The test machine uses an ATOM CPU. I measure sequential write with large iodepth bandwidth to raid array: without patch: ~600M/s without patch and group_thread_cnt=4: 750M/s with patch and group_thread_cnt=4: 950M/s with patch, group_thread_cnt=4, skip_copy=1: 1150M/s We are pretty close to the maximum bandwidth in the large iodepth iodepth case. The performance gap of small iodepth sequential write between software raid and theory value is still very big though, because we don't have an efficient pipeline. Cc: NeilBrown Cc: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- drivers/md/raid5.h | 4 ++++ 2 files changed, 57 insertions(+), 2 deletions(-) commit 03a9e24ef2aaa5f1f9837356aed79c860521407a Author: colyli@suse.de Date: Sat Jan 28 21:11:49 2017 +0800 md linear: fix a race between linear_add() and linear_congested() Recently I receive a bug report that on Linux v3.0 based kerenl, hot add disk to a md linear device causes kernel crash at linear_congested(). From the crash image analysis, I find in linear_congested(), mddev->raid_disks contains value N, but conf->disks[] only has N-1 pointers available. Then a NULL pointer deference crashes the kernel. There is a race between linear_add() and linear_congested(), RCU stuffs used in these two functions cannot avoid the race. Since Linuv v4.0 RCU code is replaced by introducing mddev_suspend(). After checking the upstream code, it seems linear_congested() is not called in generic_make_request() code patch, so mddev_suspend() cannot provent it from being called. The possible race still exists. Here I explain how the race still exists in current code. For a machine has many CPUs, on one CPU, linear_add() is called to add a hard disk to a md linear device; at the same time on other CPU, linear_congested() is called to detect whether this md linear device is congested before issuing an I/O request onto it. Now I use a possible code execution time sequence to demo how the possible race happens, seq linear_add() linear_congested() 0 conf=mddev->private 1 oldconf=mddev->private 2 mddev->raid_disks++ 3 for (i=0; iraid_disks;i++) 4 bdev_get_queue(conf->disks[i].rdev->bdev) 5 mddev->private=newconf In linear_add() mddev->raid_disks is increased in time seq 2, and on another CPU in linear_congested() the for-loop iterates conf->disks[i] by the increased mddev->raid_disks in time seq 3,4. But conf with one more element (which is a pointer to struct dev_info type) to conf->disks[] is not updated yet, accessing its structure member in time seq 4 will cause a NULL pointer deference fault. To fix this race, there are 2 parts of modification in the patch, 1) Add 'int raid_disks' in struct linear_conf, as a copy of mddev->raid_disks. It is initialized in linear_conf(), always being consistent with pointers number of 'struct dev_info disks[]'. When iterating conf->disks[] in linear_congested(), use conf->raid_disks to replace mddev->raid_disks in the for-loop, then NULL pointer deference will not happen again. 2) RCU stuffs are back again, and use kfree_rcu() in linear_add() to free oldconf memory. Because oldconf may be referenced as mddev->private in linear_congested(), kfree_rcu() makes sure that its memory will not be released until no one uses it any more. Also some code comments are added in this patch, to make this modification to be easier understandable. This patch can be applied for kernels since v4.0 after commit: 3be260cc18f8 ("md/linear: remove rcu protections in favour of suspend/resume"). But this bug is reported on Linux v3.0 based kernel, for people who maintain kernels before Linux v4.0, they need to do some back back port to this patch. Changelog: - V3: add 'int raid_disks' in struct linear_conf, and use kfree_rcu() to replace rcu_call() in linear_add(). - v2: add RCU stuffs by suggestion from Shaohua and Neil. - v1: initial effort. Signed-off-by: Coly Li Cc: Shaohua Li Cc: Neil Brown Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li drivers/md/linear.c | 39 ++++++++++++++++++++++++++++++++++----- drivers/md/linear.h | 1 + 2 files changed, 35 insertions(+), 5 deletions(-) commit ecdd09597a57251323b0de50e3d45e69298c4a83 Author: Ming Lei Date: Sat Feb 11 11:40:45 2017 +0800 block/loop: fix race between I/O and set_status Inside set_status, transfer need to setup again, so we have to drain IO before the transition, otherwise oops may be triggered like the following: divide error: 0000 [#1] SMP KASAN CPU: 0 PID: 2935 Comm: loop7 Not tainted 4.10.0-rc7+ #213 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88006ba1e840 task.stack: ffff880067338000 RIP: 0010:transfer_xor+0x1d1/0x440 drivers/block/loop.c:110 RSP: 0018:ffff88006733f108 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8800688d7000 RCX: 0000000000000059 RDX: 0000000000000000 RSI: 1ffff1000d743f43 RDI: ffff880068891c08 RBP: ffff88006733f160 R08: ffff8800688d7001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800688d7000 R13: ffff880067b7d000 R14: dffffc0000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88006d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000006c17e0 CR3: 0000000066e3b000 CR4: 00000000001406f0 Call Trace: lo_do_transfer drivers/block/loop.c:251 [inline] lo_read_transfer drivers/block/loop.c:392 [inline] do_req_filebacked drivers/block/loop.c:541 [inline] loop_handle_cmd drivers/block/loop.c:1677 [inline] loop_queue_work+0xda0/0x49b0 drivers/block/loop.c:1689 kthread_worker_fn+0x4c3/0xa30 kernel/kthread.c:630 kthread+0x326/0x3f0 kernel/kthread.c:227 ret_from_fork+0x31/0x40 arch/x86/entry/entry_64.S:430 Code: 03 83 e2 07 41 29 df 42 0f b6 04 30 4d 8d 44 24 01 38 d0 7f 08 84 c0 0f 85 62 02 00 00 44 89 f8 41 0f b6 48 ff 25 ff 01 00 00 99 7d c8 48 63 d2 48 03 55 d0 48 89 d0 48 89 d7 48 c1 e8 03 83 RIP: transfer_xor+0x1d1/0x440 drivers/block/loop.c:110 RSP: ffff88006733f108 ---[ end trace 0166f7bd3b0c0933 ]--- Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Tested-by: Dmitry Vyukov Signed-off-by: Jens Axboe drivers/block/loop.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit deab2b0524aa1d7d081a1b17d283a76f11c45b1b Author: William Breathitt Gray Date: Wed Feb 8 08:32:46 2017 -0500 gpio: pci-idio-16: Fix PCI BAR index The PCI BAR0 and BAR1 for the PCI-IDIO-16 hold information for the PLX 9052 bridge chip on the device. The PCI BAR2 holds the necessary base address for I/O control of the PCI-IDIO-16. This patch corrects the PCI BAR index mismatch for the PCI-IDIO-16 GPIO driver. Fixes: 02e74fc0401a ("gpio: Add GPIO support for the ACCES PCI-IDIO-16") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pci-idio-16.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit baafacab092e282c69f57a90dc2c4ed25b083e22 Author: Wei Yongjun Date: Sun Feb 5 15:58:49 2017 +0000 pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). Fix by using devm_ioremap_resource instead of devm_ioremap. Fixes: 8b1bd11c1f8f ("pinctrl: samsung: Add the support the multiple IORESOURCE_MEM for one pin-bank") Signed-off-by: Wei Yongjun Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fd254a23cadaa4513f248a5f6b211ea63fdabe91 Author: William Breathitt Gray Date: Tue Feb 7 11:51:19 2017 -0500 gpio: pci-idio-16: Fix PCI device ID code The ACCES PCI-IDIO-16 has a PCI device ID code of 0x0DC8. It is incorrect to use the PCI device ID code of the ACCES PCI-IIRO-8 (0x0F00). This patch fixes the said PCI device ID code mismatch. Fixes: 02e74fc0401a ("gpio: Add GPIO support for the ACCES PCI-IDIO-16") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pci-idio-16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa1dd80f80ccf3a47227ab42625e7bbacd5ff272 Author: Dan Carpenter Date: Tue Feb 7 16:20:08 2017 +0300 pinctrl: intel: unlock on error in intel_config_set_pull() We need to unlock before returning -EINVAL on this error path. Fixes: 04cc058f0c52 ("pinctrl: intel: Add support for 1k additional pull-down") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit caa137eea6927e6412c9cfe5cb3e20abb5575101 Merge: 3b03cc0 6130373 Author: David S. Miller Date: Mon Feb 13 09:30:22 2017 -0500 Merge branch 'mv88e6xxx-Watchdog-support' Andrew Lunn says: ==================== mv88e6xxx Watchdog support The Marvell switches have an in built watchdog over some of the internal state machine. The watchdog can be configured to raise an interrupt on error. The problem the watchdog found is then logged to the kernel log. The older switches can automagically perform a software reset when the watchdog triggers. This just resets the internal state machine, but leaves the switch configuration unchanged. The 6390 family of switches cannot both raise an interrupt and automagically perform a software reset. So the interrupt handler has to perform the switch reset, and then re-enable the watchdog interrupts. This has been tested using hacked together debugfs code which allows the "force" bit to be set, so cause a watchdog interrupt. v2: Remove g2_prefix ==================== Signed-off-by: David S. Miller commit 61303736638aa923b40c9e107b64e6d2b7af499d Author: Andrew Lunn Date: Thu Feb 9 00:03:43 2017 +0100 net: dsa: mv88e6xxx: Add mv88e6390 watchdog interrupt support Implement the ops needed to support the watchdog for the MV88E6390 family. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 9 +++++++ drivers/net/dsa/mv88e6xxx/global2.c | 48 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.h | 2 ++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 12 +++++++++ 4 files changed, 71 insertions(+) commit fcd25166d950bc0fae4179b9d16995a1a2270810 Author: Andrew Lunn Date: Thu Feb 9 00:03:42 2017 +0100 net: dsa: mv88e6xxx: Add watchdog interrupt handler The switch contains a watchdog looking for issues with the internal gubbins of the switch. Hook the interrupt the watchdog triggers and log the value of the control register indicating why the watchdog fired. The watchdog can only be cleared with a switch reset, which will destroy the current configuration. Rather than doing this, just disable the interrupt. The mv88e6390 family has different watchdog registers. So use an ops structure, so support for the mv88e6390 family can be added later. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 14 ++++++ drivers/net/dsa/mv88e6xxx/global2.c | 89 ++++++++++++++++++++++++++++++++++- drivers/net/dsa/mv88e6xxx/global2.h | 4 ++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 21 +++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) commit df42cb499eb1869bfb535f6c6b5ea1406496baf4 Author: Takashi Iwai Date: Sun Feb 12 11:35:44 2017 +0100 ALSA: x86: Drop unused stream.running field The pcm_stream_info.running field is only set in the PCM trigger callback but never referred, thus it can be safely removed. Also, properly cover the spinlock in both the trigger START and STOP to protect had_enable_audio() calls. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 11 ++--------- sound/x86/intel_hdmi_audio.h | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) commit d0c54f2f5be8ce90540256260066ce0bf4579e17 Author: Johan Hovold Date: Mon Feb 13 14:49:39 2017 +0100 USB: serial: upd78f0730: sort device ids Sort the device ids by vendor id. Signed-off-by: Johan Hovold drivers/usb/serial/upd78f0730.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2acecf2c88370f9d7252e7a05cd7b6d43aed720 Author: Takashi Iwai Date: Sat Feb 11 08:21:56 2017 +0100 ALSA: x86: Handle reset at prepare callback Currently the driver handles some reset procedure at the trigger STOP and the underrun functions, where both are executed in the interrupt context. Especially the underrun function has a sync-loop to clear the UNDERRUN status bit, and this is supposed to be one of plausible causes of GPU hangup. Since the job to be done in the interrupt handler should be minimum, we move the reset function out of trigger and underrun, and push it into the prepare (and hw_free) callbacks instead. Here a new flag, need_reset, is introduced to indicate the requirement of the reset procedure. This is for avoiding the multiple resets when PCM prepare is called sequentially. Also in the UNDERRUN bit-clear sync loop, take a longer pause to be in the safer side. Taking a longer delay is no longer a problem now because we're running in the normal context. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 39 +++++++++++++++++++++++++-------------- sound/x86/intel_hdmi_audio.h | 1 + 2 files changed, 26 insertions(+), 14 deletions(-) commit 89fd8ee86c02735b67d9113d55375861cca2ef19 Author: Maksim Salau Date: Mon Feb 13 15:14:34 2017 +0300 USB: serial: upd78f0730: add ID for EVAL-ADXL362Z The adaptor on Analog Devices EVAL-ADXL362Z development board is used to flash and debug firmware of on-board Renesas RL78/G13 MCU. Also added support of the 153600 baud rate, since the stock firmware uses it. Signed-off-by: Maksim Salau Signed-off-by: Johan Hovold drivers/usb/serial/upd78f0730.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9ec1a286d0b3c13f50c96e00e5890bc17a82492f Author: Paul Gortmaker Date: Mon Feb 6 03:03:52 2017 -0500 pinctrl: berlin: make bool drivers explicitly non-modular None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: "Antoine Ténart" Cc: Sebastian Hesselbarth Cc: Hongzhou Yang Cc: Thomas Hebb Cc: Masahiro Yamada Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Jisheng Zhang Signed-off-by: Linus Walleij drivers/pinctrl/berlin/berlin-bg2.c | 9 ++------- drivers/pinctrl/berlin/berlin-bg2cd.c | 9 ++------- drivers/pinctrl/berlin/berlin-bg2q.c | 9 ++------- drivers/pinctrl/berlin/berlin-bg4ct.c | 9 ++------- 4 files changed, 8 insertions(+), 28 deletions(-) commit 8429cba14fbb70d74b6d54816ad94545be310265 Author: Paul Gortmaker Date: Mon Feb 6 03:03:51 2017 -0500 pinctrl: spear: make bool drivers explicitly non-modular None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get the exact same change, so they are handled in batch. Changes are (1) use init.h header in place of module.h header, (2) delete module_exit related code, (3) delete MODULE_DEVICE_TABLE, and (4) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags. None of these drivers were using module_init() so we don't have to worry about the init ordering getting changed with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE etc. tags since all that information is already contained at the top of each file in the comments. Cc: spear-devel@list.st.com Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Viresh Kumar Signed-off-by: Linus Walleij drivers/pinctrl/spear/pinctrl-plgpio.c | 7 +------ drivers/pinctrl/spear/pinctrl-spear1310.c | 12 ------------ drivers/pinctrl/spear/pinctrl-spear1340.c | 12 ------------ drivers/pinctrl/spear/pinctrl-spear300.c | 12 ------------ drivers/pinctrl/spear/pinctrl-spear310.c | 12 ------------ drivers/pinctrl/spear/pinctrl-spear320.c | 12 ------------ 6 files changed, 1 insertion(+), 66 deletions(-) commit fdbde81badf09175fc1d19ef00ae685f0246ce27 Author: Paul Gortmaker Date: Mon Feb 6 03:03:50 2017 -0500 pinctrl: mvebu: make bool drivers explicitly non-modular None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get the exact same change, so they are handled in batch. Changes are (1) use builtin_platform_driver, (2) dont use module.h (3) delete module_exit related code, (4) delete MODULE_DEVICE_TABLE, and (5) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags. For the dove driver we explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We deleted the MODULE_LICENSE etc. tags since all that information is already contained at the top of the file in the comments. Cc: Thomas Petazzoni Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-370.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-armada-375.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-dove.c | 17 ++--------------- drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 8 +------- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 1 - drivers/pinctrl/mvebu/pinctrl-orion.c | 8 +------- 9 files changed, 9 insertions(+), 65 deletions(-) commit 156f8759bb708d7fd43cce9e2dc640b1ba01ecef Author: Shivasharan S Date: Fri Feb 10 00:59:39 2017 -0800 scsi: megaraid_sas: driver version upgrade 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a73b0a4b5d17ee39b2cbac7638a97077189b80cc Author: Shivasharan S Date: Fri Feb 10 00:59:38 2017 -0800 scsi: megaraid_sas: Change RAID_1_10_RMW_CMDS to RAID_1_PEER_CMDS and set value to 2 For RAID1 FastPath writes, driver needs to allocate extra commands internally to accommodate for the extra peer command being sent. Currently driver is allocating 2 extra commands for each but only one extra command is necessary. Set RAID_1_10_RMW_CMDS to 2 and also change macro name to RAID_1_PEER_CMDS. 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 | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 41064f1bf8886bc43afbd9aa23a698f97bc65664 Author: Shivasharan S Date: Fri Feb 10 00:59:37 2017 -0800 scsi: megaraid_sas: Indentation and smatch warning fixes Fix indentation issues and smatch warning reported by Dan Carpenter for previous series as discussed below. http://www.spinics.net/lists/linux-scsi/msg103635.html http://www.spinics.net/lists/linux-scsi/msg103603.html Reported-by: Dan Carpenter Signed-off-by: Kashyap Desai Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 10 ++-- drivers/scsi/megaraid/megaraid_sas_fp.c | 57 +++++++++--------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 92 ++++++++++++++--------------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 5 files changed, 80 insertions(+), 83 deletions(-) commit e00731bc5abb8f00f64e74fc8deb3feca580f22d Author: Shivasharan S Date: Fri Feb 10 00:59:36 2017 -0800 scsi: megaraid_sas: Cleanup VD_EXT_DEBUG and SPAN_DEBUG related debug prints 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 | 2 - drivers/scsi/megaraid/megaraid_sas_base.c | 15 -- drivers/scsi/megaraid/megaraid_sas_fp.c | 266 +--------------------------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 - 4 files changed, 2 insertions(+), 286 deletions(-) commit ec77959515e584cd5cb2301531a3ed06c97eeacf Author: Shivasharan S Date: Fri Feb 10 00:59:35 2017 -0800 scsi: megaraid_sas: Increase internal command pool Fix - increase internal command pool to 8. 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 | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 29206da1490a7065e8a03ec43f6de60c5c978cae Author: Shivasharan S Date: Fri Feb 10 00:59:34 2017 -0800 scsi: megaraid_sas: Use synchronize_irq to wait for IRQs to complete FIX - Do not use random delay to synchronize with IRQ. Use kernel API. 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 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 72bff2d1d0c9cb8923a2ffdeaafa40deaed0f671 Author: Shivasharan S Date: Fri Feb 10 00:59:33 2017 -0800 scsi: megaraid_sas: Bail out the driver load if ld_list_query fails Error handling: Bail out the driver load if key FW cmds (LD_LIST) are not return successful. Clean up error handling in megasas_init_fw. 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7a7ae4f19280a4da2dfbdca3a414b0fd5fef2cb4 Author: Shivasharan S Date: Fri Feb 10 00:59:32 2017 -0800 scsi: megaraid_sas: Change build_mpt_mfi_pass_thru to return void Code refactoring to build_mpt_mfi_pass_thru to return void. 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 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a6821ca39e0cac24b4c366b28b07c1a37ce8915d Author: Shivasharan S Date: Fri Feb 10 00:59:31 2017 -0800 scsi: megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR Error handling: If controller reset is not able to recover, kill HBA and quit immediately. 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 | 1 + 1 file changed, 1 insertion(+) commit 1d6dbd1752fb4347a4a5db06c8f5cd35dd1919f4 Author: Shivasharan S Date: Fri Feb 10 00:59:30 2017 -0800 scsi: megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool FIX - firmware wants non-RW SYS PD IOs to avoid FastPath for better tracking and other functionalities if the device is task management capable. 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 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 25fb13dd2d6e9897c391315254d1b2f7c74e0482 Author: Shivasharan S Date: Fri Feb 10 00:59:29 2017 -0800 scsi: megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21c34006dce99949a83e9c46c543af28651db5db Author: Shivasharan S Date: Fri Feb 10 00:59:28 2017 -0800 scsi: megaraid_sas: megasas_return_cmd does not memset IO frame to zero Memset the IO frame to zero after release. 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 | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit cf4e55e7be0a4c009908803ff4c3140c9822c033 Author: Shivasharan S Date: Fri Feb 10 00:59:27 2017 -0800 scsi: megaraid_sas: max_fw_cmds are decremented twice, remove duplicate Fix to account for the reply_q_sz not exceeding the maximum commands that the firmware can support, instance->max_fw_cmds is already decremented in megasas_fusion_update_can_queue(). Remove the extra decrement logic in code. 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 | 7 ------- 1 file changed, 7 deletions(-) commit 013aec66afaa51581d4b41887fe418b94c54bc51 Author: Shivasharan S Date: Fri Feb 10 00:59:26 2017 -0800 scsi: megaraid_sas: update can_queue only if the new value is less Minor Optimization: No need to update HBA can_queue value if the current max FW commands is equal to earlier value. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50b7f5a2d0126b893a4591336b1cdb4028a726b0 Author: Shivasharan S Date: Fri Feb 10 00:59:25 2017 -0800 scsi: megaraid_sas: Change max_cmd from u32 to u16 in all functions Since maximum supported FW commands are all defined as u16, change all local variables referring to max_cmd from u32 to u16. 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 | 10 +++++----- drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit b41c0a4aa7c0fc1f98648c020358598498d48f06 Author: Shivasharan S Date: Fri Feb 10 00:59:24 2017 -0800 scsi: megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandle to MR_DEVHANDLE_INVALID Issue is limited for Syncro firmware where pd_after_lb is not set but is accidentally used. Not a functional issue, but results in low performance due to improper load balancing between two LUNs. 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95c060869e6872ea03a4a9d15236adcffb1d8b07 Author: Shivasharan S Date: Fri Feb 10 00:59:23 2017 -0800 scsi: megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD Fetch the latest controller OCR capability from FW before sending MR_DCMD_CTRL_SHUTDOWN When application sends a shutdown DCMD (MR_DCMD_CTRL_SHUTDOWN), driver will fetch latest controller information from firmware. This is to ensure that driver always has latest OCR capability of controller before sending the DCMD. 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 | 7 +++++++ 1 file changed, 7 insertions(+) commit 318aaef88353c09a73d26d3b87a74fab67ff9282 Author: Shivasharan S Date: Fri Feb 10 00:59:22 2017 -0800 scsi: megaraid_sas: avoid unaligned access in ioctl path Fix kernel warning for accessing unaligned memory access in driver. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a174118b7a97c52c3c3a4f1b8eee594502a55381 Author: Shivasharan S Date: Fri Feb 10 00:59:21 2017 -0800 scsi: megaraid_sas: big endian support changes Fix endiannes fixes for Ventura specific. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fp.c | 15 ++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 70 ++++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 115 +++++++++++++++++----------- 3 files changed, 122 insertions(+), 78 deletions(-) commit ff96f9251768f3fe1b4cd6f48f4021b3a1be269b Author: Shivasharan S Date: Fri Feb 10 00:59:20 2017 -0800 scsi: megaraid_sas: Big endian RDPQ mode fix Fix if RDPQ mode enabled MR FW is deployed on big endian host machine, driver does not setup reply address correctly. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai 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 d2d0358bcd09139a8e71afbca35bcd6b219dd1bf Author: Shivasharan S Date: Fri Feb 10 00:59:19 2017 -0800 scsi: megaraid_sas: MR_TargetIdToLdGet u8 to u16 and avoid invalid raid-map access Change MR_TargetIdToLdGet return type from u8 to u16. ld id range check is added at two places in this patch - @megasas_build_ldio_fusion and @megasas_build_ld_nonrw_fusion. Previous driver code used different data type for lds TargetId returned from MR_TargetIdToLdGet. Prior to this change, above two functions was safeguarded due to function always return u8 and maximum value of ld id returned was 255. In below check, fw_supported_vd_count as of today is 64 or 256 and valid range to support is either 0-63 or 0-255. Ideally want to filter accessing raid map for ld ids which are not valid. With the u16 change, invalid ld id value is 0xFFFF and we will see kernel panic due to random memory access in MR_LdRaidGet. The changes will ensure we do not call MR_LdRaidGet if ld id is beyond size of ldSpanMap array. if (ld < instance->fw_supported_vd_count) >From firmware perspective,ld id 0xFF is invalid and even though current driver code forward such command, firmware fails with target not available. ld target id issue occurs mainly whenever driver loops to populate raid map (ea. MR_ValidateMapInfo). These are the only two places where we may see out of range target ids and wants to protect raid map access based on range provided by Firmware API. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_fp.c | 5 +++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 25 ++++++++++++++----------- 3 files changed, 18 insertions(+), 14 deletions(-) commit a09454ce5dd11184c5040ed536d323e2a302a579 Author: Shivasharan S Date: Fri Feb 10 00:59:18 2017 -0800 scsi: megaraid_sas: In validate raid map, raid capability is not converted to cpu format for all lds On a host, if an ld is deleted there is a hole in the ld array returned by the FW. But in MR_ValidateMapInfo we are not accounting for holes in the ld array and traverse only upto index num_lds. This patch takes care of converting the capability field of all the valid lds in the ld raid map. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fp.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5fc499b612c5401a7ae0674086befcdf8b148516 Author: Shivasharan S Date: Fri Feb 10 00:59:17 2017 -0800 scsi: megaraid_sas: reduce size of fusion_context and use vmalloc if kmalloc fails Currently fusion context has fixed array load_balance_info. Use dynamic allocation. In few places, driver do not want physically contigious memory. Attempt to use vmalloc if physical contiguous memory is not available. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 + drivers/scsi/megaraid/megaraid_sas_base.c | 15 ++---- drivers/scsi/megaraid/megaraid_sas_fp.c | 3 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 71 +++++++++++++++++++++++++++-- drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 +- 5 files changed, 76 insertions(+), 18 deletions(-) commit b4a42213a7eb8ec8556f27e6750bbc5c9193e86e Author: Shivasharan S Date: Fri Feb 10 00:59:16 2017 -0800 scsi: megaraid_sas: add print in device removal path Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit def0eab3af8651e8951c5cf1b17ece0d26827636 Author: Shivasharan S Date: Fri Feb 10 00:59:15 2017 -0800 scsi: megaraid_sas: enhance debug logs in OCR context Add additional logging from driver in OCR context. Add debug logs for partial completion of IOs is iodone context. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 3 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 38 ++++++++++++++++++++++++++--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 35 +++++++++++++++++++++++++- 3 files changed, 72 insertions(+), 4 deletions(-) commit 31d9a57b419d8ef8fa391009819f940778ce6245 Author: Shivasharan S Date: Fri Feb 10 00:59:14 2017 -0800 scsi: megaraid_sas: set residual bytes count during IO completion Fixing issue of not setting residual bytes correctly. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a48ba0eca0456d45e920169930569caa3fc57124 Author: Shivasharan S Date: Fri Feb 10 00:59:13 2017 -0800 scsi: megaraid_sas: raid 1 write performance for large io Avoid Host side PCI bandwidth bottleneck and hint FW to do Write buffering using RaidFlag MR_RAID_FLAGS_IO_SUB_TYPE_LDIO_BW_LIMIT. Once IO is landed in FW with MR_RAID_FLAGS_IO_SUB_TYPE_LDIO_BW_LIMIT, it will do single DMA from host and buffer the Write operation. On back end, FW will DMA same buffer to the Mirror and Data Arm. This will improve large block IO performance which bottleneck due to Host side PCI bandwidth limitation. Consistent ~4000MB T.P for 256K Block size is expected performance numbers. IOPS for small Block size should be on par with Disk performance. (E.g 42 SAS Disk in JBOD mode gives 3700MB T.P. Same Drive used in R1 WT mode, should give ~1800MB T.P) Using this patch 24 R1 VDs (HDD) gives below performance for Sequential Write. Without this patch, we cannot reach above 3200MB (Throughput is in MB.) Block Size 50% 256K and 50% 4K 100% 256K 4K 3100 2030 8K 3140 2740 16K 3140 3140 32K 3400 3240 64K 3500 3700 128K 3870 3870 256K 3920 3920 Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 5 +++++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 32 +++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 33203bc4d61b33f1f7bb736eac0c6fdd20b92397 Author: Shivasharan S Date: Fri Feb 10 00:59:12 2017 -0800 scsi: megaraid_sas: NVME fast path io support This patch provide true fast path IO support. Driver creates PRP for NVME drives and send Fast Path for performance. Certain h/w requirement needs to be taken care in driver. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 10 +- drivers/scsi/megaraid/megaraid_sas_fp.c | 55 +++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 316 ++++++++++++++++++++++++++-- drivers/scsi/megaraid/megaraid_sas_fusion.h | 14 +- 4 files changed, 350 insertions(+), 45 deletions(-) commit 96188a89cc6d5ad3a0a5b7a6c4abc9f4a6de7678 Author: Shivasharan S Date: Fri Feb 10 00:59:11 2017 -0800 scsi: megaraid_sas: NVME interface target prop added This patch fetch true values of NVME property from FW using New DCMD interface MR_DCMD_DEV_GET_TARGET_PROP Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 14 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 144 +++++++++++++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 3 files changed, 155 insertions(+), 4 deletions(-) commit 15dd03811d99dcf828f4eeb2c2b6a02ddc1201c7 Author: Shivasharan S Date: Fri Feb 10 00:59:10 2017 -0800 scsi: megaraid_sas: NVME Interface detection and prop settings Adding detection logic for NVME device attached behind Ventura controller. Driver set HostPageSize in IOC_INIT frame to inform about page size for NVME devices. Firmware reports NVME page size to the driver. PD INFO DCMD provide new interface type NVME_PD. Driver set property of NVME device. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 23 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 170 ++++++++++++++++++++-------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 4 files changed, 142 insertions(+), 59 deletions(-) commit f4fc209326c79b03fecd38a6709cf08da47f15f7 Author: Shivasharan S Date: Fri Feb 10 00:59:09 2017 -0800 scsi: megaraid_sas: change issue_dcmd to return void from int With the changes to remove checks for a valid request descriptor, issue_dcmd will now always return DCMD_SUCCESS. This patch changes return type of issue_dcmd to void and change all callers appropriately. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 19 +++++++++++-------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 ++++---- 3 files changed, 16 insertions(+), 13 deletions(-) commit 52205ac8940b43cca1711abfb43a05e7df08c09e Author: Shivasharan S Date: Fri Feb 10 00:59:08 2017 -0800 scsi: megaraid_sas: megasas_get_request_descriptor always return valid desc No functional change. Code clean up. Removing error code which is not valid scenario. In megasas_get_request_descriptor we can remove the error handling which is not required. With fusion controllers, if there is a valid message frame available, we are guaranteed to get a corresponding request descriptor. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit f55cf47d925e48cddabafd3bc829f1ebc05c334d Author: Shivasharan S Date: Fri Feb 10 00:59:07 2017 -0800 scsi: megaraid_sas: Use DID_REQUEUE Moving to use DID_REQUEUE return type for reliable unconditional retries. Driver wants unconditional re-queue, so replace DID_RESET with DID_REQUEUE Discussed below - https://www.spinics.net/lists/linux-scsi/msg102848.html Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ed981b81fa6cb7ce191756822e3de24e51112cd3 Author: Shivasharan S Date: Fri Feb 10 00:59:06 2017 -0800 scsi: megaraid_sas: RAID map is accessed for SYS PDs when use_seqnum_jbod_fp is not set Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 3cabd16256584581af2cc3d2cedabcfcf15021ad Author: Shivasharan S Date: Fri Feb 10 00:59:05 2017 -0800 scsi: megaraid_sas: Refactor MEGASAS_IS_LOGICAL macro using sdev Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++++++++++---------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) commit 45b8a35eed7b1d7e51a4dc04b5b694301a383afa Author: Shivasharan S Date: Fri Feb 10 00:59:04 2017 -0800 scsi: megaraid_sas: 32 bit descriptor fire cmd optimization No functional change. Code refactor. megasas_fire_cmd_fusion can always use 32 bit descriptor write for ventura. No need to pass extra flag. Only IOC INIT required 64 bit Descriptor write. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 65 +++++++++++++++-------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit 8bf7c65d379a6d923dfebb50eb04c2407e4762ed Author: Shivasharan S Date: Fri Feb 10 00:59:03 2017 -0800 scsi: megaraid_sas: raid 1 fast path code optimize No functional change. Code refactor. Remove function megasas_fpio_to_ldio as we never require to convert fpio to ldio because of frame unavailability. Grab extra frame of raid 1 write fast path before it creates first frame as Fast Path. Removed is_raid_1_fp_write flag as raid 1 write fast path command is decided using r1_alt_dev_handle only. Move resetting megasas_cmd_fusion fields at common function megasas_return_cmd_fusion. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fp.c | 14 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 349 +++++++++------------------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 +- 3 files changed, 118 insertions(+), 248 deletions(-) commit f6c0d55c5b91c0d626d65aebee1a0d6b0a61851d Author: Shivasharan S Date: Fri Feb 10 00:59:02 2017 -0800 scsi: megaraid_sas: cpu select rework. No functional change. Code refactor. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 175 ++++++++++++++++------------ 1 file changed, 100 insertions(+), 75 deletions(-) commit 18bbcabdc6cc6be8c7f6d80c85d314535d76188d Author: Shivasharan S Date: Fri Feb 10 00:59:01 2017 -0800 Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth" This reverts commit "3e5eadb1a881" ("scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth") This patch was aimed to increase performance of R1 Write operation for large IO size. Since this method used timer approach, it turn on/off fast path did not work as expected. Patch 0013 describes new algorithm and performance number. Signed-off-by: Shivasharan S Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 8 ----- drivers/scsi/megaraid/megaraid_sas_base.c | 48 ----------------------------- drivers/scsi/megaraid/megaraid_sas_fp.c | 7 ----- drivers/scsi/megaraid/megaraid_sas_fusion.c | 16 ++++------ drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 5 files changed, 7 insertions(+), 74 deletions(-) commit 9491be5ff06ff08d61e6a8d767382ea0037a6f38 Author: Linus Walleij Date: Wed Feb 1 13:47:56 2017 +0100 mmc: queue: turn queue flags into bools Instead of masking and setting two bits in the "flags" field for the mmc_queue, just use two bools named "suspended" and "new_request". The masking and setting would likely have race conditions anyways, it is better to use a simple member like this. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 6 +++--- drivers/mmc/core/queue.c | 12 ++++++------ drivers/mmc/core/queue.h | 5 ++--- 3 files changed, 11 insertions(+), 12 deletions(-) commit 74f5ba357c7cd63c664e65fb7a116dbc0538a2ec Author: Linus Walleij Date: Wed Feb 1 13:47:55 2017 +0100 mmc: block: rename mmc_active to areq The mmc_active member of struct mmc_queue_req has a very confusing name: this is certainly not always "active", it is the asynchronous request associated by the mmc_queue_req but it is not guaranteed to be "active" in any sense, such as being running on the host. Simply rename this member to "areq". Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 14 +++++++------- drivers/mmc/core/queue.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit b2928e1049e1d96ac794293d18168c721dbfdb24 Author: Linus Walleij Date: Wed Feb 1 13:47:54 2017 +0100 mmc: block: refactor mmc_blk_rw_try_restart() The mmc_blk_rw_start_new() was named after the label inside mmc_blk_issue_rw_rq() but is really a confusing name for this function: what it does is to try to restart the latest issued command on the host and card of the current MMC queue. So rename it mmc_blk_rw_try_restart() that reflects what it is doing and at this point also refactore the function to treat the removed card as an exception and just exit if this happens and run on in the function if that is not happening. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit c3399ef55d8e8295293808eba32e3f7056526324 Author: Linus Walleij Date: Wed Feb 1 13:47:53 2017 +0100 mmc: core: rename mmc_start_req() to *areq() With the coexisting __mmc_start_request(), mmc_start_request() and __mmc_start_req() it is a bit confusing that mmc_start_req() actually does not start a normal request, but an asynchronous request. Rename it to mmc_start_areq() to make it explicit what the function is doing, also fix the kerneldoc for this function while we're at it. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 8 ++++---- drivers/mmc/core/core.c | 14 +++++++------- drivers/mmc/core/mmc_test.c | 8 ++++---- include/linux/mmc/core.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) commit acd8dbd64a2adcd950c31261247cda6f847f57eb Author: Linus Walleij Date: Wed Feb 1 13:47:52 2017 +0100 mmc: block: rename rqc and req In the function mmc_blk_issue_rw_rq() the new request coming in from the block layer is called "rqc" and the old request that was potentially just returned back from the asynchronous mechanism is called "req". This is really confusing when trying to analyze and understand the code, it becomes a perceptual nightmare to me. Maybe others have better parserheads but it is not working for me. Rename "rqc" to "new_req" and "req" to "old_req" to reflect what is semantically going on into the syntax. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) commit db435505b561c1ca7b72c646dbc060f0c674360c Author: Linus Walleij Date: Wed Feb 1 13:47:51 2017 +0100 mmc: block: inline the command abort and start new goto:s The goto statements sprinkled over the mmc_blk_issue_rw_rq() function has grown over the years and makes the code pretty hard to read. Inline the calls such that: goto cmd_abort; -> mmc_blk_rw_cmd_abort(card, req); mmc_blk_rw_start_new(mq, card, rqc); return; goto start_new_req; -> mmc_blk_rw_start_new(mq, card, rqc); return; After this it is more clear how we exit the do {} while loop in this function, and it gets possible to split the code apart. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit a04848c75bc02858ba98a7af63637728d033d3e8 Author: Heiner Kallweit Date: Wed Feb 1 19:44:22 2017 +0100 mmc: core: switch to ida_simple_ functions in block.c ida code in block.c can be significantly simplified by switching to the ida_simple_ functions. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit a53210f56d7f3f75d1edc1b3a069ddb87b72a919 Author: Ravikumar Kattekola Date: Mon Jan 30 15:41:58 2017 +0530 mmc: host: omap_hsmmc: avoid possible overflow of timeout value Fixes: a45c6cb81647 ("[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3") when using really large timeout (up to 4*60*1000 ms for bkops) there is a possibility of data overflow using unsigned int so use 64 bit unsigned long long. Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8cc9a3e73de1264cb61d8eca4e15310f3b2b9746 Author: Kishon Vijay Abraham I Date: Mon Jan 30 15:41:57 2017 +0530 mmc: host: omap_hsmmc: use generic_cmd6_time to program timeout value for CMD6 commit e2bf08d643a244ccb ("omap_hsmmc: set a large data timeout for commands with busy signal") sets an arbitrary timeout value (100ms) for commands like CMD6 (MMC SWITCH). However extended CSD register defined in the eMMC standard has a field for GENERIC_CMD6_TIME which indicates the default maximum timeout for a SWITCH command. Use busy_timeout of cmd structure (populated with GENERIC_CMD6_TIME in the case of SWITCH command) to program the data timeout value in omap_hsmmc driver. SWITCH command to turn the cache on took more than 100ms to complete with MICRON eMMC card present in AM572x IDK REV 1.3A resulting in timeout and failed enumeration. It is fixed here by programming the timeout with the value advertised in GENERIC_CMD6_TIME. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori Signed-off-by: Ravikumar Kattekola Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 24380dd4f8da47951ebaab26f9bfd398e83b186d Author: Ravikumar Kattekola Date: Mon Jan 30 15:41:56 2017 +0530 mmc: host: omap_hsmmc: reset cmd line on ceb error When CEB (command end bit error) occurs reset CMD line to avoid system ending up in erroneous state. While command line is reset for CTO and CCRC errors, it's not done for CEB error. Fix it here. Reviewed-by: Kishon Vijay Abraham I Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d33cb5ad582cef7d0c4f0397cf6a3307ce8802c Author: Maxime Ripard Date: Mon Jan 30 14:27:13 2017 +0100 dt-bindings: mmc: sunxi: Document A64 eMMC compatible We introduced recently a new compatible to deal with the A64 eMMC controller, let's document its binding. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 1 + 1 file changed, 1 insertion(+) commit ce69e2fea093b7fa3991c87849c4955cd47796c9 Author: Shawn Lin Date: Tue Jan 17 09:22:55 2017 +0800 mmc: dw_mmc: silent verbose log when calling from PM context When deploying runtime PM, it's quite verbose to print the log of ios setting. Also it's useless to print it from system PM as it should be the same with booting time. We also have sysfs to get all these information from ios attribute, so let's skip this print from PM context. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e13934bdf45935f51243515c275629922dc43839 Author: Linus Walleij Date: Fri Jan 27 15:04:54 2017 +0100 mmc: core/mmci: restore pre/post_req behaviour commit 64b12a68a9f74bb32d8efd7af1ad8a2ba02fc884 "mmc: core: fix prepared requests while doing bkops" is fixing a bug in the wrong way. A bug in the MMCI device driver is fixed by amending the MMC core. Thinking about it: what the pre- and post-callbacks are doing is to essentially map and unmap SG lists for DMA transfers. Why would we not be able to do that just because a BKOPS command is sent inbetween? Having to unprepare/prepare the next asynchronous request for DMA seems wrong. Looking the backtrace in that commit we can see what the real problem actually is: mmci_data_irq() is calling mmci_dma_unmap() twice which is goung to call arm_dma_unmap_sg() twice and v7_dma_inv_range() twice for the same sglist and that will crash. This happens because a request is prepared, then a BKOPS is sent. The IRQ completing the BKOPS command goes through mmci_data_irq() and thinks that a DMA operation has just been completed because dma_inprogress() reports true. It then proceeds to unmap the sglist. But that was wrong! dma_inprogress() should NOT be true because no DMA was actually in progress! We had just prepared the sglist, and the DMA channel dma_current has been configured, but NOT started! Because of this, the sglist is already unmapped when we get our actual data completion IRQ, and we are unmapping the sglist once more, and we get this crash. Therefore, we need to revert this solution pushing the problem to the core and causing problems, and instead augment the implementation such that dma_inprogress() only reports true if some DMA has actually been started. After this we can keep the request prepared during the BKOPS and we need not unprepare/reprepare it. Fixes: 64b12a68a9f7 ("mmc: core: fix prepared requests while doing bkops") Cc: Srinivas Kandagatla Signed-off-by: Linus Walleij Tested-by: Srinivas Kandagatla Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 9 --------- drivers/mmc/host/mmci.c | 7 ++++++- drivers/mmc/host/mmci.h | 3 ++- 3 files changed, 8 insertions(+), 11 deletions(-) commit 43c15e962c1240356a7e1aeca450d783dd903c55 Author: Maxime Ripard Date: Fri Jan 27 22:38:39 2017 +0100 mmc: sunxi: Add more debug informations Add a bit more debug messages that can be helpful when debugging the clock setup. Also fill the actual_clock field in struct mmc_host to report properly the current frequency in debugfs. Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 4fb3ce07eafa9d5945a1f36708557821a513b1b1 Author: Maxime Ripard Date: Fri Jan 27 22:38:38 2017 +0100 mmc: sunxi: Add EMMC (MMC2) controller compatible The MMC2 controller on the A64 is kind of a special beast. While the general controller design is the same than the other MMC controllers in the SoC, it also has a bunch of features and changes that prevent it to be driven in the same way. It has for example a different bus width limit, a different maximum frequency, and, for some reason, the maximum buffer size of a DMA descriptor. Add a new compatible specifically for this controller. Acked-by: Rob Herring Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 16e821e3ba47096eb23abedd5a5e377d77f5f0d5 Author: Maxime Ripard Date: Fri Jan 27 22:38:37 2017 +0100 mmc: sunxi: Mask DATA0 when updating the clock The A64 MMC controllers need DATA0 to be masked while updating the clock, otherwise any subsequent command will result in a timeout. It's not really clear at this point what DATA0 is exactly, but this behaviour is present in Allwinner's tree, and has been suggested by Allwinner engineers as fixes for the timeout. Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 9a37e53e451eff5790ae15341031e39777105127 Author: Maxime Ripard Date: Fri Jan 27 22:38:36 2017 +0100 mmc: sunxi: Enable the new timings for the A64 MMC controllers The A64 MMC controllers need to set a "new timings" bit when a new rate is set. The actual meaning of that bit is not clear yet, but not setting it leads to some corner-case issues, like the CMD53 failing, which is used to implement SDIO packet aggregation. Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 860fdf89b92e740b19d1160406df98e5302a9300 Author: Maxime Ripard Date: Fri Jan 27 22:38:35 2017 +0100 mmc: sunxi: Always set signal delay to 0 for A64 Experience have shown that the using the autocalibration could severely degrade the performances of the MMC bus. Allwinner is using in its BSP a delay set to 0 for all the modes but HS400. Remove the calibration code for now, and add comments to document our findings. Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 50 +++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) commit 9479074e93765a65ee352e74bb66ff3f5ec03413 Author: Maxime Ripard Date: Fri Jan 27 22:38:34 2017 +0100 mmc: sunxi: Gate the clock when rate is 0 The MMC core assumes that the code will gate the clock when the bus frequency is set to 0, which we've been ignoring so far. Handle that. Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 39cc281fb79e3d40e945577363a55f5c922353ad Author: Maxime Ripard Date: Fri Jan 27 22:38:33 2017 +0100 mmc: sunxi: Fix clock frequency change sequence The SD specification documents that the clock frequency should only be changed once gated (Section 3.2.3 - SD Clock Frequency Change Sequence). The current code first modifies the parent clock, gates it and then modifies the internal divider. This means that since the parent clock rate might be changed, the bus clock might be changed as well before it is gated, which breaks the specification. Move the gating before the parent rate modification. Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1ed2171944888cf6787990a0f6387b717ba72e24 Author: Heiner Kallweit Date: Sat Jan 28 09:32:50 2017 +0100 mmc: core: fix error path in mmc_host_alloc Properly reverse everything if mmc_gpio_alloc(host) fails. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 2 ++ 1 file changed, 2 insertions(+) commit 7413d1f509eb0ee605973c1a6da9911700c80012 Author: Heiner Kallweit Date: Sat Jan 28 09:32:35 2017 +0100 mmc: core: simplify ida handling ida handling can be simplified by switching to the ida_simple_ functions. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 543c576d1bf215c5d3c1b0615a85cec1b68a04cb Author: Ritesh Harjani Date: Tue Jan 24 14:20:27 2017 +0530 mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence This removes CDC init sequence comments which are not useful anyway. Signed-off-by: Ritesh Harjani Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 4436c5359962420e66e32d1340dffa3f1643e3f0 Author: Ritesh Harjani Date: Tue Jan 24 14:20:26 2017 +0530 mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops platform_execute_tuning should not really exist as it does not do anything useful. So remove this ops and directly plug sdhci_msm_execute_tuning with mmc_host_ops. Also in case of HS400 tuning clear SDHCI_HS400_TUNING flag once HS400 related mode selection is done. Signed-off-by: Ritesh Harjani Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fb00f196fcce8078e162d09a1d7725032c2dfdc8 Author: Ulf Hansson Date: Wed Jan 25 12:45:43 2017 +0100 mmc: core: Extend mmc_of_parse() to check for mmc-ddr-3_3v When mmc_of_parse() finds the binding, it sets the mmc cap, MMC_CAP_3_3V_DDR, which informs the core whether eMMC DDR at 3.3V I/O is supported by the mmc host. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren drivers/mmc/core/host.c | 2 ++ 1 file changed, 2 insertions(+) commit 41efc76e0c0414d1e38a9d974a544aa80a653956 Author: Ulf Hansson Date: Wed Jan 25 12:44:13 2017 +0100 mmc: dt: Document binding for eMMC DDR 3.3V I/O voltage support Cc: Cc: Rob Herring Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren Acked-by: Rob Herring Documentation/devicetree/bindings/mmc/mmc.txt | 1 + 1 file changed, 1 insertion(+) commit 20f921bb01140207983e9fc3af4bb60f1f9fc0d5 Author: Ulf Hansson Date: Wed Jan 25 12:04:17 2017 +0100 mmc: core: Invent MMC_CAP_3_3V_DDR According the JEDEC specification an eMMC card supporting 1.8V vccq in DDR mode should also be capable of 3.3V. However, it's been reported that some mmc hosts supports 3.3V, but not 1.8V. Currently the mmc core implements an error handling when the host fails to set 1.8V for vccq, by falling back to 3.3V. Unfortunate, this seems to be insufficient for some mmc hosts. To enable these to use eMMC DDR mode let's invent a new mmc cap, MMC_CAP_3_3V_DDR, which tells whether they support the eMMC 3.3V DDR mode. In case MMC_CAP_3_3V_DDR is set, but not MMC_CAP_1_8V_DDR, let's change to remain on the 3.3V, as it's the default voltage level for vccq, set by the earlier power up sequence. As this change introduces MMC_CAP_3_3V_DDR, let's take the opportunity to do some re-formatting of the related defines in the header file. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren drivers/mmc/core/mmc.c | 11 +++++++---- include/linux/mmc/host.h | 21 ++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) commit 4e74b6b3c6e9adfe6a8fdebfc56a6416a996d905 Author: Ulf Hansson Date: Wed Jan 25 11:12:34 2017 +0100 mmc: core: Rename __mmc_set_signal_voltage() to mmc_set_signal_voltage() Earlier the mmc_set_signal_voltage() existed, but since it has been renamed to mmc_set_uhs_voltage(), we can now use that name instead. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren drivers/mmc/core/core.c | 10 +++++----- drivers/mmc/core/core.h | 2 +- drivers/mmc/core/mmc.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) commit 2ed573b603f78289dd1435c94597aa25a97e2b76 Author: Ulf Hansson Date: Wed Jan 25 10:25:01 2017 +0100 mmc: core: Clarify usage of mmc_set_signal_voltage() The mmc_set_signal_voltage() function is used for SD/SDIO when switching to 1.8V for UHS mode. To clarify this let's do the following changes. - We are always providing MMC_SIGNAL_VOLTAGE_180 as the signal_voltage parameter to the function. Then, let's just remove the parameter as it serves no purpose. - Rename the function to mmc_set_uhs_voltage(). Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren drivers/mmc/core/core.c | 4 ++-- drivers/mmc/core/core.h | 2 +- drivers/mmc/core/sd.c | 3 +-- drivers/mmc/core/sdio.c | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) commit a44efa4796249c6d4341935e90e9105d6e1a5f15 Author: Ulf Hansson Date: Wed Jan 25 10:12:10 2017 +0100 mmc: core: Remove redundant code in mmc_set_signal_voltage() The mmc_set_signal_voltage() function is used for SD/SDIO when switching to 1.8V for UHS mode. Therefore let's remove the redundant code dealing with MMC_SIGNAL_VOLTAGE_330. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin Tested-by: Jan Glauber Tested-by: Stefan Wahren drivers/mmc/core/core.c | 7 ------- 1 file changed, 7 deletions(-) commit 62a4cdead56e5715c61aadd41ab66f49bd3170f1 Author: Chris Brandt Date: Wed Jan 25 15:28:09 2017 -0500 mmc: sh_mobile_sdhi: explain clock bindings In the case of a single clock source, you don't need names. However, if the controller has 2 clock sources, you need to name them correctly so the driver can find the 2nd one. The 2nd clock is for the internal card detect logic. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Reviewed-by: Wolfram Sang Acked-by: Rob Herring Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 34a1654706c6cc20e7a9077063b307afe28ec66c Author: Chris Brandt Date: Wed Jan 25 15:28:08 2017 -0500 mmc: sh_mobile_sdhi: add support for 2 clocks Some controllers have 2 clock sources instead of 1. The 2nd clock is for the internal card detect logic and must be enabled/disabled along with the main core clock for proper operation. Signed-off-by: Chris Brandt Signed-off-by: Ulf Hansson Reviewed-by: Wolfram Sang drivers/mmc/host/sh_mobile_sdhi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit dc012058d79aa781d74988c83e29a7398ad1e47b Author: Kevin Hilman Date: Wed Jan 25 16:01:39 2017 -0800 mmc: meson: cleanup stray debug messages Cleanup some debug prints that cause needless noise during normal usage. Signed-off-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit df0615889651321712b0b429780617d35c1ed963 Author: Linus Walleij Date: Tue Jan 24 11:17:57 2017 +0100 mmc: block: stop passing around pointless return values The mmc_blk_issue_rq() function is called in exactly one place in queue.c and there the return value is ignored. So the functions called from that function that also meticulously return 0/1 do so for no good reason. Error reporting on the asynchronous requests are done upward to the block layer when the requests are eventually completed or fail, which may happen during the flow of the mmc_blk_issue_* functions directly (for "special commands") or later, when an asynchronous read/write request is completed. The issuing functions do not give rise to errors on their own, and there is nothing to return back to the caller in queue.c. Drop all return values and make the function return void. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 38 ++++++++++++++------------------------ drivers/mmc/core/block.h | 2 +- 2 files changed, 15 insertions(+), 25 deletions(-) commit 7d552a48089b6a24b65abe9c49a184bae8364abe Author: Linus Walleij Date: Tue Jan 24 11:17:56 2017 +0100 mmc: block: introduce new_areq and old_areq Recycling the same variable in an x=x+1 fashion may seem clever here but it makes the code terse and hard to follow for humans. Introduce a new_areq and old_areq variable so we see what is going on. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit da0dbaffe354043bb0cd61c00c650c819d104b29 Author: Linus Walleij Date: Tue Jan 24 11:17:55 2017 +0100 mmc: block: inline command abortions Setting rqc to NULL followed by a goto to cmd_abort is just a way to do unconditional abort without starting any new command. Inline the calls to mmc_blk_rw_cmd_abort() and return immediately in those cases. Add some comments to the code flow so it is clear that this is where the asynchronous requests come back in and the result of them gets handled. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 6fb85d658308952142da6abb4e066dd22dd48c01 Author: Linus Walleij Date: Tue Jan 24 11:17:54 2017 +0100 mmc: block: do not assign mq_rq when aborting command The code in mmc_blk_issue_rq_rq() aborts a command if the request is not properly aligned on large sectors. As part of the path jumping out, it assigns the local variable mq_rq reflecting a MMC queue request to the current MMC queue request, which is confusing since the variable is not used after this jump. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 1 - 1 file changed, 1 deletion(-) commit efb5a05e70dfa79fe26133be9a239cbca8ea08c3 Author: Linus Walleij Date: Tue Jan 24 11:17:53 2017 +0100 mmc: block: break out mmc_blk_rw_start_new() As a step toward breaking apart the very complex function mmc_blk_issue_rw_rq() we break out the code to start a new request. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 4e1f780032c56894e8d7b6685b029b718588f483 Author: Linus Walleij Date: Tue Jan 24 11:17:52 2017 +0100 mmc: block: break out mmc_blk_rw_cmd_abort() As a first step toward breaking apart the very complex function mmc_blk_issue_rw_rq() we break out the command abort code. This code assumes "ret" is != 0 and then repeatedly hammers blk_end_request() until the request to the block layer to end the request succeeds. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e64aae82eac5397d9976142b9224d4a41424ee54 Author: Jaehoon Chung Date: Tue Jan 24 18:27:28 2017 +0900 mmc: sdhci-s3c: use the bitops API for bit operation Use the bitops API instead of shifting directly. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-s3c.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 57f8324501d9a810f15dde9f2d6873e788afc98d Author: Jaehoon Chung Date: Tue Jan 24 18:27:27 2017 +0900 mmc: sdhci-s3c: remove the sdhci-s3c-regs header file Remove the sdhci-s3c-regs.h file. Instead, it located those defined values into sdhci-s3c.c. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-s3c-regs.h | 87 --------------------------------------- drivers/mmc/host/sdhci-s3c.c | 70 ++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 88 deletions(-) commit ee28981535f4261ed5d127ddf4d1a3f8778f520d Author: Wolfram Sang Date: Thu Jan 19 21:07:18 2017 +0100 mmc: tmio: discard obsolete SDIO irqs before enabling irqs Before enabling SDIO irqs, clear the status bit, so we discard old and stale interrupts. Needed to get two wireless cards working. Use the newly introduced macro in all places. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 2 ++ drivers/mmc/host/tmio_mmc_pio.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 20dd03734cac41a0545dd24f5e81d8ff0c80874b Author: Wolfram Sang Date: Thu Jan 19 21:07:17 2017 +0100 mmc: host: tmio: SDIO_STATUS_QUIRK is rather SDIO_STATUS_SETBITS QUIRK sounds like there is something wrong, but actually there are just some bits which need to be 1. Rename it to be more clear. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 6 ++---- drivers/mmc/host/tmio_mmc_pio.c | 2 +- include/linux/mfd/tmio.h | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) commit e4f38eb18aedd098b3019e82df07f583a5cbcc58 Author: Wolfram Sang Date: Thu Jan 19 21:07:16 2017 +0100 mmc: host: tmio: refactor calls to sdio irq tmio_mmc_sdio_irq() is not used as a seperate irq handler anymore, so we can make it similar to the other irq helper functions, namely: * only give the host as argument function which is what it really needs * prefix function name with __ Signed-off-by: Wolfram Sang Acked-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit de19b4c928ce4f2ab88fc49888627313fd2c49e4 Author: Matt Ranostay Date: Mon Jan 23 19:08:30 2017 -0800 mmc: pwrseq: add support for Marvell SD8787 chip Allow power sequencing for the Marvell SD8787 Wifi/BT chip. This can be abstracted to other chipsets if needed in the future. Cc: Tony Lindgren Cc: Ulf Hansson Signed-off-by: Matt Ranostay Signed-off-by: Ulf Hansson drivers/mmc/core/Kconfig | 10 ++++ drivers/mmc/core/Makefile | 1 + drivers/mmc/core/pwrseq_sd8787.c | 117 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+) commit e3fffc1f0b4750a2d6efc9a674b62c58477b8d20 Author: Matt Ranostay Date: Mon Jan 23 19:08:29 2017 -0800 devicetree: document new marvell-8xxx and pwrseq-sd8787 options Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Ulf Hansson Acked-by: Rob Herring .../devicetree/bindings/mmc/mmc-pwrseq-sd8787.txt | 16 ++++++++++++++++ .../devicetree/bindings/net/wireless/marvell-8xxx.txt | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit dfcba5ffca989749d1fc49d5b82a2d007b1295b7 Author: Wolfram Sang Date: Tue Jan 17 21:26:01 2017 +0100 mmc: host: tmio: disable clocks when unbinding Create a helper function to disable clocks and use it in remove(), too. Now, clk_summary in debugfs reports the clocks as disabled and unprepared after unbinding. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 44bf23128f48eabddb7cd6a44b369f0b1e66de97 Author: Ritesh Harjani Date: Tue Jan 10 12:30:52 2017 +0530 mmc: sdhci-msm: Provide enhanced_strobe mode feature support This provides enhanced_strobe mode feature support in sdhci-msm driver. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit d7507aa1b988efd788846d62021e581bfca31ace Author: Ritesh Harjani Date: Tue Jan 10 12:30:51 2017 +0530 mmc: sdhci-msm: Make HS400 tuning follow as per recommeneded HW sequence During tuning execution for HS400 mode, HW sequence recommends to select MCLK_SEL/2(0x3) in VENDOR_SPEC & sdhc msm clock at GCC to be 400MHZ (nearest supported clk). Add this change in tuning sequence during HS400 tuning. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 8a8fa8797cea4e49119e437d254dd59b9ade16fd Author: Ritesh Harjani Date: Tue Jan 10 12:30:50 2017 +0530 mmc: sdhci: Clear SDHCI_HS400_TUNING flag after platform_execute_tuning Clear SDHCI_HS400_TUNING flag after platform_execute_tuning so that platform_execute_tuning may use it if needed. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 083c9aa0ad480af8a4b4b0f6be3bdca847cc211d Author: Subhash Jadavani Date: Tue Jan 10 12:30:49 2017 +0530 mmc: sdhci-msm: configure CORE_CSR_CDC_DELAY_CFG to recommended value Program CORE_CSR_CDC_DELAY_CFG for hardware recommended 1.25ns delay. We may see data CRC errors if it's programmed for any other delay value. Signed-off-by: Subhash Jadavani Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5574ddcc60aaf71372f4f546acfd988ea433f50d Author: Venkat Gopalakrishnan Date: Tue Jan 10 12:30:48 2017 +0530 mmc: sdhci-msm: Reset vendor specific func register on probe The vendor specific func register doesn't get reset when using the software reset register. The various bootloader's could leave this in an unknown state, hence reset this register to it's power on reset value during probe. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit db9bd1638115f76c09a9d5b58a01552d49ed1df5 Author: Ritesh Harjani Date: Tue Jan 10 12:30:47 2017 +0530 mmc: sdhci-msm: Factor out sdhci_msm_hs400 Factor out sdhci_msm_hs400 used for DLL calibration in HS400 modes. This function will be needed for enhanced_strobe as well. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 0fb8a3d46b0393a8580ed78a0bc9267869f76b3c Author: Ritesh Harjani Date: Tue Jan 10 12:30:46 2017 +0530 mmc: sdhci-msm: Factor out function to set/get msm clock rate Factor out msm_set/get_clock_rate_for_bus_mode for it's later use in changing the tuning sequence for selecting HS400 bus speed mode. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 64 +++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 24 deletions(-) commit b54aaa8a4fd829ecffa140b04b59d08ffe20a790 Author: Ritesh Harjani Date: Tue Jan 10 12:30:45 2017 +0530 mmc: sdhci-msm: Factor out sdhci_msm_hc_select_mode This factors out sdhci_msm_hc_select_mode to later use it during enhanced_strobe mode select. It also further breaks sdhci_msm_hc_select_mode into separate functions for configuring HS400 mode or other modes. Signed-off-by: Ritesh Harjani Tested-by: Jeremy McNicoll Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 201 ++++++++++++++++++++++++------------------- 1 file changed, 114 insertions(+), 87 deletions(-) commit 73a85069f91d35f6921fd9d9b2603f482b9c9bd1 Author: Stefan Wahren Date: Sat Jan 14 17:29:18 2017 +0000 mmc: mxs-mmc: Implement CMD23 support This patch implements support for multiblock transfers bounded by SET_BLOCK_COUNT (CMD23) on the MXS MMC host driver. Signed-off-by: Stefan Wahren Signed-off-by: Ulf Hansson drivers/mmc/host/mxs-mmc.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit e81c022a00cd91b0d555d9d9194d421e3b8d642c Author: Alexey Khoroshilov Date: Sat Jan 14 01:52:51 2017 +0300 mmc: wbsd: safer check if dma_addr is valid DMA address host->dma_addr can store a value that is not returned by the DMA API, so it is safer to check if is a valid DMA address indirectly. Signed-off-by: Alexey Khoroshilov Signed-off-by: Ulf Hansson drivers/mmc/host/wbsd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e28d6f048799acb0014491e6b74e580d84bd7916 Author: Zhang Rui Date: Wed Jan 18 17:46:18 2017 +0800 mmc: sdhci-acpi: support deferred probe With commit 67bf5156edc4 ("gpio / ACPI: fix returned error from acpi_dev_gpio_irq_get()"), mmc_gpiod_request_cd() returns -EPROBE_DEFER if GPIO is not ready when sdhci-acpi driver is probed, and sdhci-acpi driver should be probed again later in this case. This fixes an order issue when both GPIO and sdhci-acpi drivers are built as modules. CC: stable@vger.kernel.org # v4.9 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177101 Tested-by: Jonas Aaberg Signed-off-by: Zhang Rui Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 23888bfe9bd730d42e326cc5f6f1188beb948f97 Author: Ulf Hansson Date: Fri Jan 13 14:14:16 2017 +0100 mmc: core: Don't use extern declarations of public mmc functions Using extern when declaring functions in the public header, core.h, is redundant. Let's just remove the use of it. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin include/linux/mmc/core.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5857b29b96dcf208e4903ec6f20d132e6a77cac2 Author: Ulf Hansson Date: Fri Jan 13 14:14:15 2017 +0100 mmc: core: Move public functions from host.h to private headers A significant amount of functions are available through the public mmc host.h header file. Let's slim down this public mmc interface, as to prevent users from abusing it, by moving some of the functions to private mmc host.h header file. This change concentrates on moving the functions into private mmc headers, following changes may continue with additional clean-ups. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/block.c | 1 + drivers/mmc/core/bus.c | 1 + drivers/mmc/core/debugfs.c | 1 + drivers/mmc/core/host.h | 49 ++++++++++++++++++++++++++++++++++++++++++++- drivers/mmc/core/mmc_test.c | 1 + drivers/mmc/core/sd.c | 1 + drivers/mmc/core/sdio.c | 1 + include/linux/mmc/host.h | 48 ++------------------------------------------ 8 files changed, 56 insertions(+), 47 deletions(-) commit 4facdde11394d44b3869807841042d059f074a07 Author: Ulf Hansson Date: Fri Jan 13 14:14:14 2017 +0100 mmc: core: Move public functions from card.h to private headers A significant amount of functions and other definitions are available through the public mmc card.h header file. Let's slim down this public mmc interface, as to prevent users from abusing it, by moving some of the functions/definitions to private mmc header files. This change concentrates on moving the functions into private mmc headers, following changes may continue with additional clean-ups. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/block.c | 2 + drivers/mmc/core/bus.c | 1 + drivers/mmc/core/bus.h | 14 ++- drivers/mmc/core/card.h | 223 ++++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/core.c | 1 + drivers/mmc/core/debugfs.c | 1 + drivers/mmc/core/mmc.c | 13 +++ drivers/mmc/core/mmc_test.c | 2 + drivers/mmc/core/queue.c | 1 + drivers/mmc/core/quirks.c | 2 + drivers/mmc/core/sd.c | 1 + drivers/mmc/core/sdio.c | 1 + drivers/mmc/core/sdio_bus.c | 1 + drivers/mmc/core/sdio_io.c | 1 + drivers/mmc/core/sdio_irq.c | 1 + include/linux/mmc/card.h | 240 -------------------------------------------- 16 files changed, 263 insertions(+), 242 deletions(-) commit 2e4af7b6554a05406ac03f2792d0415c1ab9aeaa Author: Ulf Hansson Date: Fri Jan 13 14:14:13 2017 +0100 mmc: vub300: Don't use mmc_card_present() when validating for inserted card The mmc_card_present() function helps the mmc core to track an internal state of the card device. More importantly, it's not intended to be used by mmc host drivers to check for an inserted card. Therefore, let's stop using it and instead rely on checking for a valid pointer to a struct mmc_card, as it should be good enough. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/host/vub300.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 136b0a471cd41b906dd4e00789cc998632a8cdd7 Author: Ulf Hansson Date: Fri Jan 13 14:14:12 2017 +0100 mmc: omap: Don't use mmc_card_present() when validating for inserted card The mmc_card_present() function helps the mmc core to track an internal state of the card device. More importantly, it's not intended to be used by mmc host drivers to check for an inserted card. Therefore, let's stop using it and instead rely on checking for a valid pointer to a struct mmc_card, as it should be good enough. Cc: linux-omap@vger.kernel.org Cc: Tony Lindgren Cc: Jarkko Nikula Signed-off-by: Ulf Hansson Acked-by: Tony Lindgren Reviewed-by: Linus Walleij drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 009b0fcea5dfe77663f7ec3927c7c50a97a7675c Author: Ulf Hansson Date: Fri Jan 13 14:14:11 2017 +0100 mmc: core: Remove unused struct _mmc_csd from public mmc.h header The struct _mmc_csd isn't being used and has been lurking around for a while. Let's kill it. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin include/linux/mmc/mmc.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) commit c0a3e080f9294117a7d510a4f01a0b7c6dbcadae Author: Ulf Hansson Date: Fri Jan 13 14:14:10 2017 +0100 mmc: core: Move erase/trim/discard defines from public core.h to mmc.h As the public mmc.h header already contains similar defines for other mmc commands and arguments, let's move those for erase/trim/discard into here as well. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin include/linux/mmc/core.h | 10 ---------- include/linux/mmc/mmc.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 11 deletions(-) commit 9e1bbc72727506c173cc6ed1d704cb2d7911d9d5 Author: Ulf Hansson Date: Fri Jan 13 14:14:09 2017 +0100 mmc: core: Move some host specific public functions to host.h Ideally the public mmc header file, core.h, shouldn't contain interfaces particularly intended to be used by host drivers. Instead those should remain in the host.h header file. Therefore, let's move a couple functions from core.h to host.h. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin include/linux/mmc/core.h | 6 ------ include/linux/mmc/host.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 55244c5659b5e73a969b285a2e763223d8aab979 Author: Ulf Hansson Date: Fri Jan 13 14:14:08 2017 +0100 mmc: core: Move public functions from core.h to private headers A significant amount of functions are available through the public mmc core.h header file. Let's slim down this public mmc interface, as to prevent users from abusing it, by moving some of the functions to private mmc header files. This change concentrates on moving the functions into private mmc headers, following changes may continue with additional clean-ups, as an example some functions can be turned into static. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/block.c | 3 +++ drivers/mmc/core/core.h | 37 ++++++++++++++++++++++++++++++++- drivers/mmc/core/mmc_ops.h | 9 ++++++++ drivers/mmc/core/mmc_test.c | 2 ++ drivers/mmc/core/queue.c | 1 + drivers/mmc/core/sd_ops.h | 4 ++++ drivers/mmc/core/sdio_io.c | 1 + drivers/mmc/core/sdio_irq.c | 1 + drivers/mmc/core/sdio_ops.h | 1 + include/linux/mmc/core.h | 50 --------------------------------------------- 10 files changed, 58 insertions(+), 51 deletions(-) commit 066185d690631478b16045d152b163a51a5e4847 Author: Ulf Hansson Date: Fri Jan 13 14:14:07 2017 +0100 mmc: core: First step in cleaning up private mmc header files This is the first step in cleaning up the private mmc header files. In this change we makes sure each header file builds standalone, as that helps to resolve dependencies. While changing this, it also seems reasonable to stop including other headers from inside a header itself which it don't depend upon. Additionally, in some cases such dependencies are better resolved by forward declaring the needed struct. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin drivers/mmc/core/block.h | 8 ++++++++ drivers/mmc/core/bus.h | 4 ++++ drivers/mmc/core/core.h | 4 ++++ drivers/mmc/core/host.h | 3 ++- drivers/mmc/core/mmc_ops.h | 5 +++++ drivers/mmc/core/pwrseq.h | 6 +++++- drivers/mmc/core/queue.h | 6 +++++- drivers/mmc/core/sd.h | 5 ++++- drivers/mmc/core/sd_ops.h | 5 +++++ drivers/mmc/core/sdio_bus.h | 3 +++ drivers/mmc/core/sdio_cis.h | 3 +++ drivers/mmc/core/sdio_ops.h | 4 ++++ drivers/mmc/core/slot-gpio.h | 2 ++ 13 files changed, 54 insertions(+), 4 deletions(-) commit 8da007348bf52a91e5137d27d7dcd528edbb80ce Author: Ulf Hansson Date: Fri Jan 13 14:14:06 2017 +0100 mmc: core: First step in cleaning up public mmc header files This is the first step in cleaning up the public mmc header files. In this change we makes sure each header file builds standalone, as that helps to resolve dependencies. While changing this, it also seems reasonable to stop including other headers from inside a header itself which it don't depend upon. Additionally, in some cases such dependencies are better resolved by forward declaring the needed struct. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin include/linux/mmc/card.h | 2 -- include/linux/mmc/core.h | 3 +-- include/linux/mmc/host.h | 9 ++------- include/linux/mmc/mmc.h | 2 ++ include/linux/mmc/slot-gpio.h | 3 +++ 5 files changed, 8 insertions(+), 11 deletions(-) commit e1c6ec26b853e9062f0b3daaf695c546d0702953 Author: Arnd Bergmann Date: Fri Jan 20 21:08:12 2017 +0100 mmc: s3cmci: include linux/interrupt.h for tasklet_struct I got this new build error on today's linux-next drivers/mmc/host/s3cmci.h:69:24: error: field 'pio_tasklet' has incomplete type struct tasklet_struct pio_tasklet; drivers/mmc/host/s3cmci.c: In function 's3cmci_enable_irq': drivers/mmc/host/s3cmci.c:390:4: error: implicit declaration of function 'enable_irq';did you mean 'enable_imask'? [-Werror=implicit-function-declaration] While I haven't found out why this happened now and not earlier, the solution is obvious, we should include the header that defines the structure. Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/s3cmci.c | 1 + 1 file changed, 1 insertion(+) commit d815cf8f33ef87bb2696febeb7b1592a77cf1514 Author: Ulf Hansson Date: Fri Jan 13 14:14:05 2017 +0100 MIPS: Alchemy: Don't rely on public mmc header to include interrupt.h The MIPS Alchemy db1300 dev board depends on interrupt.h. Explicitly include it instead of relying on the public mmc header host.h. Cc: Ralf Baechle Cc: Signed-off-by: Ulf Hansson Acked-by: Ralf Baechle arch/mips/alchemy/devboards/db1300.c | 1 + 1 file changed, 1 insertion(+) commit 981f18e646d31f4eb171850489079b110f9cdd4b Author: Ulf Hansson Date: Fri Jan 13 14:14:04 2017 +0100 ARM: davinci: Don't rely on public mmc header to include interrupt.h The davinci board omapl138-hawk, depends on interrupt.h. Explicitly include it instead of relying on the public mmc header host.h. Cc: Sekhar Nori Cc: Kevin Hilman Cc: Signed-off-by: Ulf Hansson Acked-by: Sekhar Nori arch/arm/mach-davinci/board-omapl138-hawk.c | 1 + 1 file changed, 1 insertion(+) commit f46f335cb4253972cc45ce886bc57bfa8c3654a2 Author: Ulf Hansson Date: Fri Jan 13 14:14:03 2017 +0100 ARM: davinci: Don't rely on public mmc header to include leds.h Some of the davinci boards, da850-evm, dm644x-evm and neuros-osd2 depends on leds.h. Explicitly include it instead of relying on the public mmc header host.h. Cc: Sekhar Nori Cc: Kevin Hilman Cc: Signed-off-by: Ulf Hansson Acked-by: Sekhar Nori arch/arm/mach-davinci/board-da850-evm.c | 1 + arch/arm/mach-davinci/board-dm644x-evm.c | 1 + arch/arm/mach-davinci/board-neuros-osd2.c | 1 + 3 files changed, 3 insertions(+) commit 40d727a2defa176b78159d445bcf7afcc2ed9021 Author: Ulf Hansson Date: Fri Jan 13 14:14:02 2017 +0100 ARM: pxa: Don't rely on public mmc header to include leds.h Some of the pxa platforms, balloon3, colibri-pxa270-income, corgi, trizeps4, vpac270, zeus and zylonite depends on leds.h. Explicitly include it instead of relying on the public mmc header host.h. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Signed-off-by: Ulf Hansson Acked-by: Robert Jarzmik arch/arm/mach-pxa/balloon3.c | 1 + arch/arm/mach-pxa/colibri-pxa270-income.c | 1 + arch/arm/mach-pxa/corgi.c | 1 + arch/arm/mach-pxa/trizeps4.c | 1 + arch/arm/mach-pxa/vpac270.c | 1 + arch/arm/mach-pxa/zeus.c | 1 + arch/arm/mach-pxa/zylonite.c | 1 + 7 files changed, 7 insertions(+) commit bdf631082f7fd644bc9cf709692d285e1acf3c59 Author: Masanari Iida Date: Fri Jan 6 23:50:43 2017 +0900 mmc: dt-bindings: Fix typo in mmc This patch fix some spelling typo found in devicetree/bindings/mmc. Signed-off-by: Masanari Iida Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 2 +- Documentation/devicetree/bindings/mmc/sdhci-st.txt | 2 +- Documentation/devicetree/bindings/mmc/sdhci.txt | 2 +- Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit efd7be7bfc8eb8942ba3dc319f323cfd0eda99e2 Author: Ulf Hansson Date: Tue Jan 10 16:10:52 2017 +0100 mmc: tmio: Remove redundant check of mmc->slot.cd_irq To validate whether native hotplug needs to be used, the tmio driver checks whether the mmc->slot.cd_irq has been successfully assigned. This check is redundant at its current place in tmio_mmc_host_probe(), as the mmc core assigns mmc->slot.cd_irq a valid value first when mmc_gpiod_request_cd_irq() is called. Therefore, let's just remove the check for now, as that also removes a layering violation of the tmio driver accessing core specific data via ->slot.cd_irq. Signed-off-by: Ulf Hansson Reviewed-by: Wolfram Sang drivers/mmc/host/tmio_mmc_pio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e87d2db2a2b534dad7ac0000c597b561c160880d Author: yangbo lu Date: Mon Dec 26 17:46:30 2016 +0800 mmc: sdhci-of-esdhc: avoid clock glitch when frequency is changing The eSDHC_PRSSTAT[SDSTB] bit indicates whether the internal card clock is stable. This bit is for the host driver to poll clock status when changing the clock frequency. It is recommended to clear eSDHC_SYSCTL[SDCLKEN] to remove glitch on the card clock when the frequency is changing. This patch is to disable SDCLKEN bit before changing frequency and enable it after SDSTB bit is set. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 5 +++++ drivers/mmc/host/sdhci-of-esdhc.c | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) commit c31165d7400bb1ec12291170c9c4d072d5b0ba45 Author: Shyam Sundar S K Date: Thu Jan 12 18:09:00 2017 +0530 mmc: sdhci-pci: Add support for HS200 tuning mode on AMD, eMMC-4.5.1 This patch adds support for HS200 tuning mode on AMD eMMC-4.5.1 Reviewed-by: Sen, Pankaj Reviewed-by: Shah, Nehal-bakulchandra Reviewed-by: Agrawal, Nitesh-kumar Signed-off-by: S-k, Shyam-sundar Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 94 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 3 deletions(-) commit 8336bf68b57e1e736be8d4ef1f46a789fe7b9bde Author: Ulf Hansson Date: Wed Jan 11 12:28:15 2017 +0100 mmc: mxcmmc: Include interrupt.h in the platform data header The mxcmmc platform data header depends on interrupt.h. Don't rely on the public mmc header host.h to include it, bud instead make that dependency explicit. Signed-off-by: Ulf Hansson include/linux/platform_data/mmc-mxcmmc.h | 1 + 1 file changed, 1 insertion(+) commit dc0f585e839a857efd86968bfe65a905753182da Author: Shawn Lin Date: Wed Jan 11 12:14:49 2017 +0800 mmc: vub300: Remove bogus check of irqs_queued It's unnecessary to check the irqs_queued value as it always needs to queue one if irq isn't enabled. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 2 -- 1 file changed, 2 deletions(-) commit 5fc3d80ef496c3bc3e8c09f056e3586fb681de56 Author: Shawn Lin Date: Mon Jan 9 16:56:20 2017 +0800 mmc: sdio: don't use rocr to check if the card could support UHS mode Per SDIO Simplified Specification V3, section 3.1.2, A host that supports UHS-I sets S18R to 1 in the argument of CMD5 to request a change of the signal voltage to 1.8V. If the card supports UHS-I and the current signal voltage is 3.3V, S18A is set to 1 in the R4 response. If the signal voltage is already 1.8V, the card sets S18A to 0 so that host maintains the current signal voltage. UHS-I is supported in SD mode and S18A is always 0 in SPI mode. For the current code, if the signaling voltage is fixed 1.8v, so the card will set S18A to 0 for rocr and thus we would clear the R4_18V_PRESENT from ocr, which make core won't try to use uhs mode. To fix it, we expect sdio_read_cccr would fail if the uhs mode won't work at all. Note that it's interesting that some sdio cards still response S18A even the voltage is fixed to 1.8v and the CMD11 will also accepted and finish enabling UHS mode successfully. I guess this is why folks didn't notice this problem. Anyway, fix it. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 0eb51a58ad823b2081c69ec1cf165833dd11c450 Author: Shawn Lin Date: Mon Jan 9 16:56:19 2017 +0800 mmc: sdio: Factor out retry init card helper function Add new helper function, mmc_sdio_resend_if_cond, to be reused when trying to retry the init sequence. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 63928d4789ebb3f7d35d9261089b3bcc98ae0632 Author: Markus Elfring Date: Sun Jan 8 22:10:40 2017 +0100 mmc: core: Use kmalloc_array() in mmc_alloc_sg() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". 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 Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3972a20b51c8bb887d13f5656d6fa93bf3d4fc46 Author: Markus Elfring Date: Sun Jan 8 21:43:12 2017 +0100 mmc: mmc_test: Use kcalloc() in mmc_test_alloc_mem() * The script "checkpatch.pl" pointed information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 554d7c540ea0d30e03674a24d139dd8b5c1646c5 Author: Markus Elfring Date: Sun Jan 8 21:25:44 2017 +0100 mmc: mmc_test: Improve a size determination in five functions Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7200449dc6a1f4556ad5da20df031bfbaf42fff5 Author: Markus Elfring Date: Sun Jan 8 20:56:48 2017 +0100 mmc: mmc_test: Combine substrings for 5 messages The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix affected source code places. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit fda02ea814f92d11a2400ec583b4d83cbb633ad0 Author: Markus Elfring Date: Sun Jan 8 20:25:39 2017 +0100 mmc: mmc_test: Add some spaces for better code readability Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit dc3a5fe6ec115ee1d9d1c2ee8004c9a5193b2435 Author: Markus Elfring Date: Sun Jan 8 19:48:28 2017 +0100 mmc: mmc_test: Use seq_puts() in mtf_testlist_show() The script "checkpatch.pl" pointed information out like the following. WARNING: Prefer seq_puts to seq_printf Thus fix the affected source code place. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74536bc0834fbfd5ead74beef20f9ba387df6a5a Author: Markus Elfring Date: Sun Jan 8 19:05:37 2017 +0100 mmc: mmc_test: Fix a typo in a comment line Add a missing character in the function description. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 457e4f7f668d69bc105b3619c5ff2769506adb89 Author: Markus Elfring Date: Sun Jan 8 18:44:26 2017 +0100 mmc: mmc_test: Use kmalloc_array() in mmc_test_area_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". 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 Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Reviewed-by: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad7014b3949b6c2b6ce46a546d6d204b5643e621 Author: Wolfram Sang Date: Fri Jan 6 09:38:33 2017 +0100 mmc: host: tmio: drop superfluous exit path The probe exit path on error does nothing since commit 94b110aff8679b ("mmc: tmio: add tmio_mmc_host_alloc/free()"), so we can bail out immediately. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit c1ada71fb78ed885f2d403f8d18ae43656cf4e86 Author: Andy Shevchenko Date: Mon Jan 2 14:05:25 2017 +0200 mmc: slot-gpio: Don't override con_id when request descriptor The caller may supply connection ID, index, or both. All combinations are possible and mmc framework should not make any assumption on what exactly caller wants. Remove con_id override conditionals in mmc_gpiod_request_ro() and mmc_gpiod_request_cd(). Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/slot-gpio.c | 6 ------ 1 file changed, 6 deletions(-) commit 6ac9b83772a0893d5e858f0f5fa1ad36d930d7de Author: Andy Shevchenko Date: Mon Jan 2 14:05:24 2017 +0200 mmc: sdhci-pci: Remove unused member cd_con_id cd_con_id is not used and always NULL. Remove it to make code a bit more cleaner. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 3 +-- drivers/mmc/host/sdhci-pci.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 3bc702ed211f1a384aa1ca1ad852ef40c5757ded Author: yong mao Date: Tue Jan 3 16:49:57 2017 +0800 mmc: mediatek: correct the implementation of msdc_card_busy msdc_card_busy only need check if the data0 is low. In sdio data1 irq mode, data1 may be low because of interruption. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e9acc77dd046b22c7ebf70e35f68968978445f8b Author: yangbo lu Date: Mon Dec 26 17:40:44 2016 +0800 mmc: sdhci-of-esdhc: remove default broken-cd for ARM Initially all QorIQ platforms were PowerPC architecture and they didn't support card detection except several platforms. The driver added the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION as default and this made broken-cd property in dts node didn't work. Now QorIQ platform turns to ARM architecture and most of them could support card detection. However it's a large number of dts trees that need to be fixed with broken-cd if we remove the default SDHCI_QUIRK_BROKEN_CARD_DETECTION in driver. And the users don't want to see this. So this patch is to remove this default quirk just for ARM and keep it for PowerPC.(Note, QorIQ PowerPC platform only has big-endian eSDHC while QorIQ ARM platform has big-endian or little-endian eSDHC) This makes broken-cd property work again for ARM. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit a6b448884a5f8eed5fec888f918aef26be338912 Author: yangbo lu Date: Mon Dec 26 17:46:29 2016 +0800 mmc: sdhci-esdhc: clean up register definitions The eSDHC register definitions in header file were messy and confusing. This patch is to clean up these definitions. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit a8c643ad00f6374d7154a65d19b18934185dc40c Author: Jun Nie Date: Fri Jan 6 12:24:46 2017 +0800 mmc: dw_mmc: zx: Initial support for ZX mmc controller This platform driver adds initial support for the DW host controller found on ZTE SoCs. It has been tested on ZX296718 EVB board currently. More support on timing tuning will be added when hardware is available. Signed-off-by: Jun Nie Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 9 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/dw_mmc-zx.c | 241 +++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/dw_mmc-zx.h | 31 ++++++ 4 files changed, 282 insertions(+) commit 4c8a03c727d930b0633fa45fd8afcd1df88bb5b4 Author: Jun Nie Date: Fri Jan 6 12:24:45 2017 +0800 mmc: dt-bindings: add ZTE ZX296718 MMC bindings Document the device-tree binding of ZTE MMC host on ZX296718 SoC. Signed-off-by: Jun Nie Acked-by: Rob Herring Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/zx-dw-mshc.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit d6fced8337f8466ad6df5dbbeefe5ab38c06d3ec Author: Jun Nie Date: Wed Jan 11 15:37:26 2017 +0900 mmc: dw_mmc: Add fifo watermark alignment property Data done irq is expected if data length is less than watermark in PIO mode. But fifo watermark is requested to be aligned with data length in some SoC so that TX/RX irq can be generated with data done irq. Add the watermark alignment to mark this requirement and force fifo watermark setting accordingly. Signed-off-by: Jun Nie Reviewed-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 11 +++++++++-- drivers/mmc/host/dw_mmc.h | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) commit a0361c1a4d265ea36796149a29b48e41a5ba28d9 Author: Jun Nie Date: Wed Jan 11 15:35:35 2017 +0900 mmc: dw_mmc: Add fifo address property The FIFO address may break default address assumption of 0x100 (version < 0x240A) and 0x200(version >= 0x240A) in current driver. The new property is introduced to override fifo address via DT node information. Signed-off-by: Jun Nie Reviewed-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 6 +++++- drivers/mmc/host/dw_mmc.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 4a80f77618f72f40b970d96f4e8492ea2dd6f2d9 Author: Jun Nie Date: Fri Jan 6 12:24:42 2017 +0800 Documentation: synopsys-dw-mshc: add binding for fifo quirks Add fifo-addr property and fifo-watermark-quirk property to synopsys-dw-mshc bindings. It is intended to provide more dt interface to support SoCs specific configuration. Signed-off-by: Jun Nie Acked-by: Rob Herring Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b8789ec482bbbf52f62631e25b6c8648fa834efc Author: Ulf Hansson Date: Fri Dec 30 13:47:23 2016 +0100 mmc: host: Include interrupt.h in mmc host drivers that depends on it An mmc host driver shouldn't rely on interrupt.h being included by another public mmc header. Instead make that dependency explicit by including interrupt.h in those host drivers that depends on it. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/host/davinci_mmc.c | 1 + drivers/mmc/host/dw_mmc.h | 1 + drivers/mmc/host/meson-gx-mmc.c | 1 + drivers/mmc/host/mtk-sd.c | 1 + drivers/mmc/host/sdhci.h | 1 + drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/via-sdmmc.c | 1 + drivers/mmc/host/wmt-sdmmc.c | 1 + 8 files changed, 8 insertions(+) commit 210583f47293c3a4a96a7e0d3e10b3210d542656 Author: Ulf Hansson Date: Fri Dec 30 13:47:22 2016 +0100 mmc: sdhci: Include leds.h Don't rely on host.h to include the leds.h header, but instead include it explicitly because the driver depends on it. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Acked-by: Adrian Hunter drivers/mmc/host/sdhci.h | 1 + 1 file changed, 1 insertion(+) commit 963836ad8f8415823866c7658f04fd7fa9febdcb Author: Ulf Hansson Date: Fri Dec 30 13:47:21 2016 +0100 mmc: sdhci-cadence: Include mmc.h Don't rely on host.h to include the mmc.h header, but instead include it explicitly because the driver depends on it. Cc: Masahiro Yamada Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Acked-by: Adrian Hunter drivers/mmc/host/sdhci-cadence.c | 1 + 1 file changed, 1 insertion(+) commit 0f21c58c63add705065a75495e7a1860a62470ed Author: Ulf Hansson Date: Fri Dec 30 13:47:20 2016 +0100 mmc: dw_mmc: Remove the public dw_mmc header file There are currently no external users of the public dw_mmc header file, except the dw_mmc driver itself. Therefore let's move the definitions from the public dw_mmc header file into the existing private dw_mmc header file and then remove the public one. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij MAINTAINERS | 1 - drivers/mmc/host/dw_mmc-exynos.c | 1 - drivers/mmc/host/dw_mmc-k3.c | 1 - drivers/mmc/host/dw_mmc-pci.c | 1 - drivers/mmc/host/dw_mmc-pltfm.c | 1 - drivers/mmc/host/dw_mmc-rockchip.c | 1 - drivers/mmc/host/dw_mmc.c | 1 - drivers/mmc/host/dw_mmc.h | 257 ++++++++++++++++++++++++++++++++++ include/linux/mmc/dw_mmc.h | 274 ------------------------------------- 9 files changed, 257 insertions(+), 281 deletions(-) commit dba4bb484e9e495478f2bcf474393d33f7e0ec27 Author: Ulf Hansson Date: Fri Dec 30 13:47:19 2016 +0100 mmc: sh_mmcif: Remove unused clk_ctrl2_present from the platform data There are currently no users of the clk_ctrl2_present member from the platform data, so let's remove it. Note, as some of the sh_mmcif variants may support clk_ctrl2, let's keep the current code in the driver, which deals with this. For future support, we should invent a DT binding instead, but let's leave that until it's needed. Cc: Kuninori Morimoto Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/host/sh_mmcif.c | 2 +- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 8020f71117042ed82287e4f51c48b57ce4c783df Author: Ulf Hansson Date: Fri Dec 30 13:47:18 2016 +0100 mmc: sh_mmcif: Remove unused ccs_unsupported from the platform data There are currently no users of the ccs_unsupported member from the platform data, so let's remove it. Note, as some of the sh_mmcif variants may not support ccs, let's keep the current code in the driver, which deals with this. For future support, we should invent a DT binding instead, but let's leave that until it's needed. Cc: Kuninori Morimoto Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/host/sh_mmcif.c | 2 +- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 5957eeba530747e9d77daf2f300a186758be51d9 Author: Ulf Hansson Date: Fri Dec 30 13:47:17 2016 +0100 mmc: sh_mmcif: Remove unused ->get_cd() platform callback Removing the callback also enables us to remove the sh_mmcif_get_cd() altogether, as we convert to use mmc_gpio_get_cd() to the same kind of work. Cc: Kuninori Morimoto Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mmcif.c | 18 +----------------- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) commit 95cc4df716a210a19f0611215c49484d460250fd Author: Ulf Hansson Date: Fri Dec 30 13:47:16 2016 +0100 mmc: sh_mmcif: Remove unused use_cd_gpio/cd_gpio from platform data Cc: Kuninori Morimoto Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/host/sh_mmcif.c | 6 ------ include/linux/mmc/sh_mmcif.h | 2 -- 2 files changed, 8 deletions(-) commit 13f00f9f2460cfa106de6c30512b648d85831468 Author: Ulf Hansson Date: Fri Dec 30 13:47:15 2016 +0100 mmc: Removed the unused public mmc boot.h header Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij include/linux/mmc/boot.h | 7 ------- 1 file changed, 7 deletions(-) commit 608241f36ad6d11f18cff8f415048bb5dfe6403b Author: Ulf Hansson Date: Fri Dec 30 13:47:14 2016 +0100 sh: sh7724: Don't use a public mmc header for MMC_PROGRESS* The enum that specifies the MMC_PROGRESS* types, is a sh mmcif specific thing and has no relevance in a public mmc header. Currently it's used only by the sh romImage MMCIF boot, so let's instead define the enum in there and rename the types to MMCIF_* to show this. Cc: linux-sh@vger.kernel.org Cc: Simon Horman Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Ulf Hansson Reviewed-by: Simon Horman Reviewed-by: Linus Walleij arch/sh/boot/romimage/mmcif-sh7724.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 40165de23df9ed4a630dcd991d63b8cb453e4ba8 Author: Stefan Wahren Date: Fri Dec 30 15:24:33 2016 +0000 mmc: sdhci-iproc: Increase max_blk_size for bcm2835 According to the BCM2835 datasheet the maximum block size for the eMMC module is restricted to the internal data FIFO which is 1024 byte. But this is still an improvement to the default of 512 byte. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Scott Branden Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c82c27754349168ff52cbf2f878210f8ef384f8b Author: Stefan Wahren Date: Fri Dec 30 15:24:32 2016 +0000 mmc: sdhci-iproc: Apply caps from bcm2835-mmc driver Since the mmc module on bcm2835 neither provide a capabilities register nor free documentation we must rely on the downstream implementation [1]. So enable the following capabilities for bcm2835: MMC_CAP_MMC_HIGHSPEED MMC_CAP_SD_HIGHSPEED MMC_CAP_DRIVER_TYPE_A MMC_CAP_DRIVER_TYPE_C [1] - https://github.com/raspberrypi/linux/blob/rpi-4.4.y/drivers/mmc/host/bcm2835-mmc.c Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c7836d1593b87cb813c58cf64e08b052ebbe2a78 Author: Masahiro Yamada Date: Mon Dec 19 20:51:18 2016 +0900 mmc: use empty initializer list to zero-clear structures In the MMC subsystem, we see such initializers that only clears the first member explicitly. For example, struct mmc_request mrq = {NULL}; sets the first member (.sbc) to NULL explicitly. However, this is an unstable form because we may insert a non-pointer member at the top of the struct mmc_request in the future. (if we do so, the compiler will spit warnings.) So, using a designated initializer is preferred coding style. The expression above is equivalent to: struct mmc_request mrq = { .sbc = NULL }; Of course, this does not express our intention. We want to fill all struct members with zeros. Please note struct members are implicitly zero-cleared unless otherwise specified in the initializer. After all, the most reasonable (and stable) form is: struct mmc_request mrq = {}; Do likewise for mmc_command, mmc_data as well. Signed-off-by: Masahiro Yamada Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 16 +++++++------- drivers/mmc/core/core.c | 10 ++++----- drivers/mmc/core/mmc.c | 2 +- drivers/mmc/core/mmc_ops.c | 44 +++++++++++++++++++-------------------- drivers/mmc/core/mmc_test.c | 26 +++++++++++------------ drivers/mmc/core/sd_ops.c | 30 +++++++++++++------------- drivers/mmc/core/sdio_ops.c | 10 ++++----- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +- drivers/mmc/host/sdhci.c | 4 ++-- 10 files changed, 73 insertions(+), 73 deletions(-) commit 164b50b353908c79b551b3658e37f29182e2c0b3 Author: Geert Uytterhoeven Date: Mon Dec 19 15:03:45 2016 +0100 mmc: block: Replace "goto retry" by a proper do / while loop Signed-off-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 8cb6ed17eb30f190f215031844433981644b064d Author: Geert Uytterhoeven Date: Mon Dec 19 15:03:44 2016 +0100 mmc: block: Avoid uninitialized warning in mmc_blk_issue_discard_rq() With gcc-4.1.2: mmc/core/block.c: In function ‘mmc_blk_issue_discard_rq’: mmc/core/block.c:1150: warning: ‘arg’ may be used uninitialized in this function mmc/core/block.c:1150: warning: ‘nr’ may be used uninitialized in this function mmc/core/block.c:1150: warning: ‘from’ may be used uninitialized in this function While this is a false positive, it can be avoided easily by jumping over the checks for "err" that are always false. Signed-off-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46bc5c408e4e325efbfff26609c76099979180a7 Author: Jungseung Lee Date: Thu Dec 22 12:37:34 2016 +0900 mmc: core: Export device lifetime information through sysfs In the eMMC 5.0 version of the spec, several EXT_CSD fields about device lifetime are added. - Two types of estimated indications reflected by averaged wear out of memory - An indication reflected by average reserved blocks Export the information through sysfs. Signed-off-by: Jungseung Lee Reviewed-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 12 ++++++++++++ include/linux/mmc/card.h | 3 +++ include/linux/mmc/mmc.h | 3 +++ 3 files changed, 18 insertions(+) commit b1c95170f97ef19ff63a6da1eb2c70899186aecc Author: Wolfram Sang Date: Mon Dec 12 20:51:26 2016 +0100 mmc: sh_mobile_sdhi: enable HS200 Setup tuning when the board is HS200 enabled. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 03c5b0d90300fc725fc1fb644872b522483a2d7e Author: Wolfram Sang Date: Mon Dec 12 20:51:25 2016 +0100 mmc: sh_mobile_sdhi: remove superfluous check in SCC error check The function will only be available if SDR104 was detected in probe, so no need to check in the function itself again. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7f9096f1c89ea698c22fde91285de2ef3eabd614 Author: Wolfram Sang Date: Mon Dec 12 20:51:24 2016 +0100 mmc: sh_mobile_sdhi: remove superfluous check in init_tuning The function will only be available if SDR104 was detected in probe, so no need to check in the function itself again. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 3 --- 1 file changed, 3 deletions(-) commit 97c64b2cd57608f7064810780056d17944f49128 Author: Wolfram Sang Date: Mon Dec 12 20:51:23 2016 +0100 mmc: sh_mobile_sdhi: remove superfluous check in hw_reset The capability for HW_RESET is only activated if SDR104 is present, so no need to check for SDR104 in the function itself again. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 3 --- 1 file changed, 3 deletions(-) commit e831ead3b3ddc4227cef10dc63d919fd7242d7b8 Author: Wolfram Sang Date: Mon Dec 12 20:51:22 2016 +0100 mmc: sh_mobile_sdhi: improve prerequisites for tuning Prerequisites for tuning are the same as for hw_reset. We need an SCC and a supported mode. Populate the tuning related functions only when those conditions are met. This also removes a tiny race window. Previously, the functions were populated when the SCC offset was not initialized which could have led to an OOPS. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6ade9a2c2da855ff38e74c4298976400feca968e Author: Wolfram Sang Date: Mon Dec 12 20:51:21 2016 +0100 mmc: sh_mobile_sdhi: improve prerequisite for hw_reset We need a SCC unit for hw_reset. Those units can only be described in of_data. So, of_data and a valid SCC offset are prerequisites for enabling the hw_reset capability. Merge the two 'if' conditions into one and add a check for an scc offset. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit dc9f1a8d790ee766c47eca163261225680691e64 Author: Wolfram Sang Date: Mon Dec 12 20:51:20 2016 +0100 mmc: sh_mobile_sdhi: simplify accessing DT data By using the helper of_device_get_match_data(), we can skip some checking and make the code simpler. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c51ff6c6180e76a1ba96aef799a9c41aa80fcc95 Author: Wolfram Sang Date: Fri Dec 9 17:51:41 2016 +0100 mmc: tmio: use SDIO master interrupt bit only when allowed The master bit to enable SDIO interrupts can only be accessed if SCLKDIVEN bit allows that. However, the core uses the SDIO enable callback at times when SCLKDIVEN forbids the change. This leads to "timeout waiting for SD bus idle" messages. We now activate the master bit in probe once if SDIO is supported. IRQ en-/disabling will be done now by the individual IRQ enablement bits only. Signed-off-by: Wolfram Sang Reviewed-by: Yasushi SHOJI Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e93c10211d03c35271896b03a40d3eca4a674770 Author: Tan Jui Nee Date: Sat Jan 28 16:27:33 2017 +0200 mfd: lpc_ich: Enable watchdog on Intel Apollo Lake PCH Assign iTCO_version which effectively enables watchdog device on Intel Apollo Lake PCH. Signed-off-by: Tan Jui Nee Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 1 + 1 file changed, 1 insertion(+) commit 788fd8221d368b47dafd009bd4803bf69dca0307 Author: Andy Shevchenko Date: Sat Jan 28 16:27:34 2017 +0200 mfd: lpc_ich: Remove useless comments in core part First of all, remove stalled references to datasheets. If someone knows the document numbers, it would be added later. Second, remove FSF snail address since it's subject to change. Actual information can be found on FSF site on the internet. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 16 ---------------- 1 file changed, 16 deletions(-) commit e33ad65a58080072b0dfba50d34dfcce959dc944 Author: Michael Brunner Date: Thu Jan 26 17:45:46 2017 +0100 mfd: Add support for several boards to Kontron PLD driver This patch adds the DMI system ID of the Kontron COMe-bBD#, COMe-bKL6, COMe-cKL6, COMe-bSL6 and COMe-cAL6 boards to the Kontron PLD driver. The list of supported products in the module description is also updated. Signed-off-by: Michael Brunner Acked-by: Christian Rauch Reviewed-by: Guenter Roeck Signed-off-by: Lee Jones drivers/mfd/Kconfig | 5 +++++ drivers/mfd/kempld-core.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 24e34b9d75a902f1371f810c164b494336bafeae Author: Bhumika Goyal Date: Wed Jan 25 00:55:24 2017 +0530 mfd: constify regmap_irq_chip structures Declare regmap_irq_chip structures as const as they are only stored in the regmap_irq_chip field of a rk808 structure. This field is of type const, so regmap_irq_chip structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct regmap_irq_chip x@p={...}; @ok@ struct rk808 a; identifier r.x; position p; @@ a.regmap_irq_chip=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct regmap_irq_chip x; File size before: text data bss dec hex filename 5033 584 16 5633 1601 drivers/mfd/rk808.o File size after: text data bss dec hex filename 5225 392 16 5633 1601 drivers/mfd/rk808.o Signed-off-by: Bhumika Goyal Signed-off-by: Lee Jones drivers/mfd/rk808.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29a0729dd9f6c44c22c48accd55c94eaad7baf63 Author: Lee Jones Date: Wed Feb 1 12:56:12 2017 +0000 MAINTAINERS: Add include/dt-bindings/mfd to MFD entry Acked-by: Peter Griffin Signed-off-by: Lee Jones MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 56e1d40d3beab2f247d48574bf51fc5daeebc285 Author: Tony Lindgren Date: Thu Jan 5 16:44:39 2017 -0800 mfd: cpcap: Add minimal support Many Motorola phones like droid 4 are using a custom PMIC called CPCAP or 6556002. We can support it's core features quite easily with regmap_spi and regmap_irq. The children of cpcap, such as regulators, ADC and USB, can be just regular device drivers and defined in the dts file. They get probed as we call of_platform_populate() at the end of our probe, and then the children can just call dev_get_regmap(dev.parent, NULL) to get the regmap. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Mark Rutland Cc: Michael Scott Acked-by: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones .../devicetree/bindings/mfd/motorola-cpcap.txt | 31 +++ drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 1 + drivers/mfd/motorola-cpcap.c | 259 ++++++++++++++++++ include/linux/mfd/motorola-cpcap.h | 292 +++++++++++++++++++++ 5 files changed, 594 insertions(+) commit 1cb8af8d631f66dde37a918bdd08a924ba3c7c03 Author: Sean Wang Date: Mon Jan 23 11:54:45 2017 +0800 mfd: mt6397: Add MT6323 LED support into MT6397 driver Add compatible string as "mt6323-led" that will make the OF core spawn child devices for the LED subnode of that MT6323 MFD device. Signed-off-by: Sean Wang Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 05daab3d63700316a04c417996600f5596d2484c Author: Sean Wang Date: Mon Jan 23 11:54:43 2017 +0800 Documentation: devicetree: Add LED subnode binding for MT6323 PMIC This patch adds documentation for devicetree bindings for LED support as the subnode of MT6323 PMIC Signed-off-by: Sean Wang Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mt6397.txt | 4 ++++ 1 file changed, 4 insertions(+) commit f8b0380544ec8b4fa21743af9319258abce5e093 Author: Javier Martinez Canillas Date: Mon Jan 16 11:41:58 2017 -0300 mfd: tps65912: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/mfd/tps65912-i2c.ko | grep alias alias: i2c:tps65912 After this patch: $ modinfo drivers/mfd/tps65912-i2c.ko | grep alias alias: of:N*T*Cti,tps65912C* alias: of:N*T*Cti,tps65912 alias: i2c:tps65912 Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/tps65912-i2c.c | 1 + 1 file changed, 1 insertion(+) commit 91549e87239f745de68fcda1af978c1f0aa17fcb Author: Linus Walleij Date: Fri Jan 13 16:10:20 2017 +0100 mfd: ab8500-core: Rename clock device and compatible We didn't have proper device tree bindings for this clock, I standardized it to use the exact chipname so let's rename it "ab8500-clk" and rectify the device tree compatible string to "stericsson,ab8500-clk". Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c576bd35ef4086f25c04ec662019c33494ee2fb Author: Shawn Nematbakhsh Date: Fri Jan 13 16:04:32 2017 +0100 mfd: cros_ec: Send correct suspend/resume event to EC pm_suspend_via_firmware() will return false for platforms with ACPI disabled and ACPI is a prerequisite for S0ix support. With this patch, sleep state event sent to EC is forced to S3 if ACPI is disabled. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Thierry Escande Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 644b2ee06d9af0846caa70d13056d50917b98c67 Author: Javier Martinez Canillas Date: Fri Jan 13 10:34:08 2017 -0300 mfd: max77686: Remove I2C device ID table The driver is only used in DT platforms so there's no need to have an i2c_device_id table. Signed-off-by: Javier Martinez Canillas Acked-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/max77686.c | 8 -------- 1 file changed, 8 deletions(-) commit be1bb2355bf3a500d9eb4288f5a99225126b7453 Author: Javier Martinez Canillas Date: Fri Jan 13 10:34:07 2017 -0300 mfd: max77686: Use the struct i2c_driver .probe_new instead of .probe If a driver is only used in DT platforms, there's no need to get the i2c_device_id as an argument of the probe function. Since this data can be get from the matching of_device_id. There's a temporary .probe_new field in struct i2c_driver that can be used as probe callback for the case when i2c_device_id won't be used. Signed-off-by: Javier Martinez Canillas Acked-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Lee Jones drivers/mfd/max77686.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 68e61f75aba91077409a86740c0d5882145968e8 Author: Javier Martinez Canillas Date: Fri Jan 13 10:34:06 2017 -0300 mfd: max77686: Use of_device_get_match_data() helper Use the generic helper to get the matched of_device_id .data, instead of open coding it. The driver was checking if matching the OF node with the driver's OF table was failing, but this doesn't make too much sense since this can't happen in practice. The fact the probe function was called, means OF registered a device with a valid compatible string so a of_device_get_match_data() call will always succeed. So just remove this unneeded check. Signed-off-by: Javier Martinez Canillas Acked-by: Laxman Dewangan Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/max77686.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 17ee971f03ad2c0786842d3a6b551e842459e2ac Author: Javier Martinez Canillas Date: Fri Jan 13 10:34:05 2017 -0300 mfd: max77686: Don't attempt to get i2c_device_id .data The driver is only used in platforms that have DT support so always the I2C device .data will be get from the matched OF node and never will be from the I2C device ID table. Signed-off-by: Javier Martinez Canillas Acked-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Lee Jones drivers/mfd/max77686.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7e9c40c63933a643908d686bd89dfc2315e8c70a Author: Linus Walleij Date: Fri Jan 13 10:53:55 2017 +0100 mfd: ab8500-sysctrl: Handle probe deferral In the current boot, clients making use of the AB8500 sysctrl may be probed before the ab8500-sysctrl driver. This gives them -EINVAL, but should rather give -EPROBE_DEFER. Before this, the abx500 clock driver didn't probe properly, and as a result the codec driver in turn using the clocks did not probe properly. After this patch, everything probes properly. Also add OF compatible-string probing. This driver is all device tree, so let's just make a drive-by-fix of that as well. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-sysctrl.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f80e78aa11ad754de20104233af1ce4cea8f16a5 Author: Andy Shevchenko Date: Wed Jan 11 14:16:09 2017 +0200 mfd: intel-lpss: Add Intel Gemini Lake PCI IDs Intel Gemini Lake is essentially Broxton with different PCI IDs. Add these new PCI IDs to the list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 696f0b3f4ae904d45a24c7bbc728cbbddd631af0 Author: Chen-Yu Tsai Date: Thu Jan 5 12:01:03 2017 +0800 mfd: axp20x: Fix AXP806 access errors on cold boot The AXP806 supports either master/standalone or slave mode. Slave mode allows sharing the serial bus, even with multiple AXP806 which all have the same hardware address. This is done with extra "serial interface address extension", or AXP806_BUS_ADDR_EXT, and "register address extension", or AXP806_REG_ADDR_EXT, registers. The former is read-only, with 1 bit customizable at the factory, and 1 bit depending on the state of an external pin. The latter is writable. Only when the these device addressing bits (in the upper 4 bits of the registers) match, will the device respond to operations on its other registers. The AXP806_REG_ADDR_EXT was previously configured by Allwinner's bootloader. Work on U-boot SPL support now allows us to switch to mainline U-boot, which doesn't do this for us. There might be other bare minimum bootloaders out there which don't to this either. It's best to handle this in the kernel. This patch sets AXP806_REG_ADDR_EXT to 0x10, which is what we know to be the proper value for a standard AXP806 in slave mode. Afterwards it will reinitialize the regmap cache, to purge any invalid stale values. Signed-off-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit f00c06fd98576face871e62bb3aa045c5f647661 Author: Shawn Nematbakhsh Date: Fri Dec 16 18:57:37 2016 +0100 mfd: cros_ec: Send suspend state notification to EC Notify EC when going to or returning from suspend so that proper actions related to wake events can be taken. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Thierry Escande Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 49 ++++++++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec_commands.h | 14 +++++++++++ 2 files changed, 63 insertions(+) commit a9eb186e13144782232cc6fa731441be54baf505 Author: Joseph Lo Date: Fri Dec 16 18:57:36 2016 +0100 mfd: cros_ec: Prevent data transfer while device is suspended The cros_ec driver is still active while the device is suspended. Besides that, it also tries to transfer data even after the I2C host had been suspended. This patch uses a simple flag to prevent this. Signed-off-by: Joseph Lo Signed-off-by: Thierry Escande Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 2 ++ drivers/platform/chrome/cros_ec_proto.c | 5 +++++ include/linux/mfd/cros_ec.h | 2 ++ 3 files changed, 9 insertions(+) commit 0f1747692ccc06fff9a5eb975b2a5cf92cec4030 Author: Andrew Jeffery Date: Tue Dec 20 17:45:35 2016 +1030 mfd: dt: Add bindings for the Aspeed SoC Display Controller (GFX) The Aspeed SoC Display Controller is presented as a syscon device to arbitrate access by display and pinmux drivers. Video pinmux configuration on fifth generation SoCs depends on bits in both the System Control Unit and the Display Controller. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/aspeed-gfx.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 73bee1d330a80943f1d0e13d32a739b80e44a470 Author: Andrew Jeffery Date: Tue Dec 20 17:45:34 2016 +1030 mfd: dt: Add bindings for the Aspeed LPC Host Controller (LHC) The LPC bus pinmux configuration on fifth generation Aspeed SoCs depends on bits in both the System Control Unit and the LPC Host Controller. The Aspeed LPC Host Controller is described as a child node of the LPC host-range syscon device for arbitration of access by the host controller and pinmux drivers. Signed-off-by: Andrew Jeffery Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/aspeed-lpc.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 28fe081612307067f8183437c8b6ef722dcaa871 Author: Andrew Jeffery Date: Tue Dec 20 17:45:33 2016 +1030 mfd: dt: Add Aspeed Low Pin Count Controller bindings Signed-off-by: Andrew Jeffery Reviewed-by: Linus Walleij Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/aspeed-lpc.txt | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 0894e9875cff7bcd2a7cb732e84626f320caae96 Author: Andrew Jeffery Date: Tue Dec 20 17:45:32 2016 +1030 mfd: dt: Add ranges, #address-cells and #size-cells as optional properties Whilst describing a device and not a bus, simple-mfd is modelled on simple-bus where child nodes are iterated and registered as platform devices. Some complex devices, e.g. the Aspeed LPC controller, can benefit from address space mapping such that child nodes can use the regs property to describe their resource offsets within the multi-function device. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mfd.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bbc741c6f46799aa8979d0a4cba6a47b886b4def Author: Andrew Jeffery Date: Tue Dec 20 17:45:31 2016 +1030 mfd: dt: Fix "indicates" typo in mfd bindings document Signed-off-by: Andrew Jeffery Acked-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mfd.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 149da46a230947731d379c89eb9aef21d41f9115 Author: Quentin Schulz Date: Tue Dec 13 15:33:31 2016 +0100 mfd: Kconfig: MFD_SUN4I_GPADC depends on !TOUCHSCREN_SUN4I_GPADC MFD_SUN4I_GPADC and TOUCHSCREEN_SUN4I are incompatible (both are drivers for Allwinner SoCs' ADC). This makes sure TOUCHSCREEN_SUN4I isn't enabled while MFD_SUN4I_GPADC is enabled. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a042a7a4e1ce31380d1370a4d45a3f48d0972655 Author: Colin Ian King Date: Wed Dec 28 21:55:47 2016 +0000 mfd: abx500: Fix spelling mistake: "Celcius" -> "Celsius" Trivial fix to spelling mistake in MFD headers. Signed-off-by: Colin Ian King Signed-off-by: Lee Jones include/linux/mfd/abx500.h | 2 +- include/linux/mfd/abx500/ab8500-bm.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4c6505613385accf67413ded85e688c5d57037f5 Author: Quentin Schulz Date: Fri Dec 9 12:04:14 2016 +0100 mfd: axp20x: Add separate MFD cell for AXP223 The AXP223 shares most of its logic with the AXP221 but has some differences for the VBUS power supply driver. Thus, to probe the driver with the correct compatible, the AXP221 and the AXP223 now have separate MFD cells. AXP221 MFD cells are renamed from axp22x_cells to axp221_cells to avoid confusion. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit cd53216625a0fa1db130f8d564f47ba99c0947e3 Author: Hans de Goede Date: Fri Dec 16 21:09:06 2016 +0100 mfd: axp20x: Fix axp288 volatile ranges The axp288 pmic has a lot more volatile registers then we were listing in axp288_volatile_ranges, fix this. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 178e8351cef3607821ec9a4e2fe3f414145fdf34 Author: Hans de Goede Date: Fri Dec 16 21:09:05 2016 +0100 mfd: axp20x: Add a few missing defines for AXP288 specific registers Add defines for the AXP288_POWER_REASON and AXP288_RT_BATT_V_H and AXP288_RT_BATT_V_L and AXP288_BC_* registers. While at it also move the AXP288_TS_ADC_H-AXP288_GP_ADC_L defines, which for some reason where in a different place, together with the rest of the AXP288 specific defines. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones include/linux/mfd/axp20x.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 59f10f7e62a28b9b664a9b2efbc5bd10d8d751f0 Author: Hans de Goede Date: Wed Dec 14 14:52:08 2016 +0100 mfd: axp20x: Drop wrong AXP288_PMIC_ADC_EN define The adc-enable register for the axp288 is 0x82, not 0x84. 0x82 is already defined as AXP20X_ADC_EN1 and that is what the axp288_adc driver is actually using, so simply drop the wrong AXP288_PMIC_ADC_EN define. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones include/linux/mfd/axp20x.h | 1 - 1 file changed, 1 deletion(-) commit 1af468ebe45591651ec3bafc2e9ddc6fdef70ae0 Author: Hans de Goede Date: Wed Dec 14 14:52:07 2016 +0100 mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped The R in PEK_DBR stands for rising, so it should be mapped to AXP288_IRQ_POKP where the last P stands for positive edge. Likewise PEK_DBF should be mapped to the falling edge, aka the _N_egative edge, so it should be mapped to AXP288_IRQ_POKN. This fixes the inverted powerbutton status reporting by the axp20x-pek driver. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8b44e6782e426ccc8b025119171f7332fd119d5e Author: Hans de Goede Date: Wed Dec 14 14:52:06 2016 +0100 mfd: axp20x: Add missing axp288 irqs The axp288 has the following irqs 2 times: VBUS_FALL, VBUS_RISE, VBUS_OV. On boot / reset the enable flags for both the normal and alt version of these irqs is set. Since we were only listing the normal version in the axp288 regmap_irq struct, we were never disabling the alt versions of these irqs. Add the alt versions to the axp288 regmap_irq struct, so that these get properly disabled. Together with the other axp288 fixes in this series, this fixes the axp288 irq contineously triggering. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) commit 0a5454c901aea0fef99f5ef7910c69c501817ae1 Author: Hans de Goede Date: Wed Dec 14 14:52:05 2016 +0100 mfd: axp20x: Use IRQF_TRIGGER_LOW on the axp288 The interrupt line of the entire family of axp2xx pmics is active-low, for devicetree enumerated irqs, this is dealt with in the devicetree. ACPI irq resources have a flag field for this too, I tried using this on my CUBE iwork8 Air tablet, but it does not contain the right data. The dstd shows the irq listed as either ActiveLow or ActiveHigh, depending on the OSID variable, which seems to be set by the "OS IMAGE ID" in the BIOS/EFI setup screen. Since the acpi-resource info is no good, simply pass in IRQF_TRIGGER_LOW on the axp288. Together with the other axp288 fixes in this series, this fixes the axp288 irq contineously triggering. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 6 +++--- include/linux/mfd/axp20x.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 34a23327697d558a582e356573d7d36773996fbb Author: Corentin Labbe Date: Mon Dec 5 13:15:28 2016 +0100 mfd: axp20x: Correct a typo in axp20x_device_remove documentation The documentation of axp20x_device_remove() have a typo and use axp20x_device_probe() as name. This patch fix this typo. Signed-off-by: Corentin Labbe Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones include/linux/mfd/axp20x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3b66158513edc4b8613ad83600809847739a51b Author: Charles Keepax Date: Mon Nov 28 15:45:07 2016 +0000 mfd: arizona: Remove totally unused forward declaration This declaration has never been used and is likely some left over from early prototypes of the code, just remove it. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona.h | 2 -- 1 file changed, 2 deletions(-) commit ea1628e856b4c383609127b03767e8dfcbb5f94f Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:35 2016 +0800 mfd: sun6i-prcm: Add codec analog controls sub-device for Allwinner A23 The PRCM block on the A23 contains a message box like interface to the registers for the analog path controls of the internal codec. Add a sub-device for it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/sun6i-prcm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3dfaff274d558a4107393831afa0cf0989bc4ff1 Author: Charles Keepax Date: Tue Nov 22 16:10:28 2016 +0000 mfd: arizona: Correctly clean up after IRQs Currently we leak a lot of things when tearing down the IRQs this patch fixes this cleaning up both the IRQ mappings and the IRQ domain itself. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-irq.c | 59 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 18 deletions(-) commit 1a86dcb3f1405a0152b9df7cebb75b839386c997 Author: Charles Keepax Date: Tue Nov 22 16:10:27 2016 +0000 mfd: arizona: Add defines for IRQs on the main Arizona IRQ domain Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-irq.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 003db34ef33eb2d8848e0962bd72ee42d7344271 Author: Charles Keepax Date: Tue Nov 22 16:10:26 2016 +0000 mfd: arizona: Use arizona_map_irq instead of hard coding it We have arizona_map_irq we might as well use it rather than hard coding it in several places. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-irq.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 128818f126bc2b9aa5cbcc1ac0429a20876d911b Merge: 93fbe91 6ccc3a3 87eb832 888f974 Author: Lee Jones Date: Mon Feb 13 09:29:15 2017 +0000 Merge branches 'ib-mfd-arm-iio-pwm-4.11', 'ib-mfd-input-4.11-1', 'ib-mfd-mtd-4.11' and 'ib-mfd-power-supply-4.11' into ibs-for-mfd-merged commit 6ccc3a33810e8ec09936fa990c13370d9f61606f Author: Gwendal Grignou Date: Fri Jan 27 11:52:35 2017 +0100 input: cros_ec_keyb: Add Tablet Mode switch Add switch to report tablet mode. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo Serra Signed-off-by: Lee Jones drivers/input/keyboard/cros_ec_keyb.c | 5 +++++ include/linux/mfd/cros_ec_commands.h | 1 + 2 files changed, 6 insertions(+) commit 3dfe33020ca8a5e4f72993cc792a4838c464c8b3 Author: Mathias Krause Date: Sun Feb 12 22:12:12 2017 +0100 m68k/sun3: Remove dead code in paging_init() The macro TEST_VERIFY_AREA can never be defined as there's no wp_works_ok variable. So just remove the dead code. Signed-off-by: Mathias Krause Signed-off-by: Geert Uytterhoeven arch/m68k/mm/sun3mmu.c | 3 --- 1 file changed, 3 deletions(-) commit fa04b769f2832bf1aeb2e04b8865f6b688a752fd Author: Bjorn Andersson Date: Mon Feb 13 00:44:27 2017 -0800 rpmsg: rpmsg_create_ept() returns NULL on error The parameter validation incorrectly returned an ERR_PTR(), which is not handled by the callers to rpmsg_create_ept(), per the definition NULL should be returned. Fixes: 93e9324431c9 ("rpmsg: Handle invalid parameters in public API") Reported-by: Dan Carpenter Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9202ba2397d1ded79078606c6921787b27a85e1a Author: Bartosz Golaszewski Date: Mon Feb 6 15:11:08 2017 +0100 gpio: mockup: implement event injecting over debugfs Create a debugfs directory for every mockup chip and a single file for every line. Writing (0 or 1) to these files allows the user to inject line events (falling or rising edge respectively). Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 116 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) commit e2ff7408953f6fe8a341b31ed2d848f73606bbf4 Author: Bartosz Golaszewski Date: Mon Feb 6 15:11:07 2017 +0100 gpio: mockup: add a dummy irqchip Setup a dummy irqchip that will allow us to inject line events for testing purposes. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 ++ drivers/gpio/gpio-mockup.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) commit d6cffbbe9a7e51eb705182965a189457c17ba8a3 Author: Konstantin Khlebnikov Date: Fri Feb 10 10:35:02 2017 +0300 proc/sysctl: prune stale dentries during unregistering Currently unregistering sysctl table does not prune its dentries. Stale dentries could slowdown sysctl operations significantly. For example, command: # for i in {1..100000} ; do unshare -n -- sysctl -a &> /dev/null ; done creates a millions of stale denties around sysctls of loopback interface: # sysctl fs.dentry-state fs.dentry-state = 25812579 24724135 45 0 0 0 All of them have matching names thus lookup have to scan though whole hash chain and call d_compare (proc_sys_compare) which checks them under system-wide spinlock (sysctl_lock). # time sysctl -a > /dev/null real 1m12.806s user 0m0.016s sys 1m12.400s Currently only memory reclaimer could remove this garbage. But without significant memory pressure this never happens. This patch collects sysctl inodes into list on sysctl table header and prunes all their dentries once that table unregisters. Konstantin Khlebnikov writes: > On 10.02.2017 10:47, Al Viro wrote: >> how about >> the matching stats *after* that patch? > > dcache size doesn't grow endlessly, so stats are fine > > # sysctl fs.dentry-state > fs.dentry-state = 92712 58376 45 0 0 0 > > # time sysctl -a &>/dev/null > > real 0m0.013s > user 0m0.004s > sys 0m0.008s Signed-off-by: Konstantin Khlebnikov Suggested-by: Al Viro Signed-off-by: Eric W. Biederman fs/proc/inode.c | 3 ++- fs/proc/internal.h | 7 ++++-- fs/proc/proc_sysctl.c | 59 ++++++++++++++++++++++++++++++++++++-------------- include/linux/sysctl.h | 1 + 4 files changed, 51 insertions(+), 19 deletions(-) commit 3b03cc0783b03ddd668ff3f86419bc67d0664e89 Author: Philippe Reynes Date: Fri Feb 10 23:57:48 2017 +0100 net: natsemi: ns83820: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/ns83820.c | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 2efbe14303e51e89dbd5e411d3c0c3e1e8d4211e Author: Philippe Reynes Date: Sun Feb 12 21:38:29 2017 +0100 net: nuvoton: w90p910: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/nuvoton/w90p910_ether.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 08041ff24a5bda3c17aae8ca0370337aa3570fd5 Author: Philippe Reynes Date: Sun Feb 12 17:33:13 2017 +0100 net: neterion: vxge: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | 47 +++++++++++++---------- 1 file changed, 27 insertions(+), 20 deletions(-) commit 51f21442a210e35e4e726f7d49120b0ed971fe14 Author: Philippe Reynes Date: Sun Feb 12 11:44:36 2017 +0100 net: neterion: s2io: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 51 ++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) commit b6878eaf75176e9acb6463ea1e50edddd309931f Author: Philippe Reynes Date: Thu Feb 9 11:28:25 2017 +0100 net: micrel: ks8851_mll: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8851_mll.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 98f2b09226758bcd416b023c9216597cc9727e60 Author: Philippe Reynes Date: Thu Feb 9 09:57:47 2017 +0100 net: micrel: ks8851: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8851.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 28213375f95fac780f45845ec44f9dbece546bad Author: Philippe Reynes Date: Wed Feb 8 23:54:45 2017 +0100 net: micrel: ks8695net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8695net.c | 91 ++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 41 deletions(-) commit 586b6e274a41dc5756dd03f1f6a2a6199909d51a Author: Philippe Reynes Date: Thu Feb 9 23:58:25 2017 +0100 net: natsemi: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/natsemi.c | 119 +++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 52 deletions(-) commit cf901656e773d842b4e725652d9d95e3f674103e Author: Philippe Reynes Date: Thu Feb 9 23:17:23 2017 +0100 net: myricom: myri10ge: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Acked-by: Hyong-Youb Kim Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 60fdcfa5ca271a6ee20b7d49312a3408a4e05d0f Author: Philippe Reynes Date: Thu Feb 9 22:42:18 2017 +0100 net: microchip: encx24j600: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/microchip/encx24j600.c | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 8ff638e4bba71acf9e53f8508c21ea16b45b8871 Author: Philippe Reynes Date: Thu Feb 9 22:02:47 2017 +0100 net: microchip: enc28j60: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/microchip/enc28j60.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 2fb93a1a9f7e746a9977e04ec4dfae31624c767a Author: Philippe Reynes Date: Thu Feb 9 20:25:06 2017 +0100 net: micrel: ksz884x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ksz884x.c | 62 +++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 24 deletions(-) commit a209509311905819dc75a9dff72f27cff8e35673 Merge: 7c92d61 32b4079 Author: David S. Miller Date: Sun Feb 12 22:18:52 2017 -0500 Merge branch 'bnxt_en-misc-updates' Michael Chan says: ==================== bnxt_en: Misc updates. Miscellaneous updates include update of the firmware spec, ethtool flash enhancement, ethtool -l minor fix, NTUPLE support enhancements, FEC link settings message during link up, and new PCI IDs. Please review. Thanks. ==================== Signed-off-by: David S. Miller commit 32b40798c1b40343641f04cdfd09652af70ea0e9 Author: Deepak Khungar Date: Sun Feb 12 19:18:18 2017 -0500 bnxt_en: Added PCI IDs for BCM57452 and BCM57454 ASICs Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b451c8b69e70de299aa6061e1fa6afbb4d7c1f9e Author: Michael Chan Date: Sun Feb 12 19:18:17 2017 -0500 bnxt_en: Fix bnxt_setup_tc() error message. Add proper puctuation to make the message more clear. 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 e70c752f88ed23e6a0f081fa408282c2450c8ce9 Author: Michael Chan Date: Sun Feb 12 19:18:16 2017 -0500 bnxt_en: Print FEC settings as part of the linkup dmesg. Print FEC (Forward Error Correction) autoneg and encoding settings during link up. 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 | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 33dac24abbd5a77eefca18fb7ebbd01a3cf1b343 Author: Michael Chan Date: Sun Feb 12 19:18:15 2017 -0500 bnxt_en: Do not setup PHY unless driving a single PF. If it is a VF or an NPAR function, the firmware call to setup the PHY will fail. Adding this check will prevent unnecessary firmware calls to setup the PHY unless calling from the PF. This will also eliminate many unnecessary warning messages when the call from a VF or NPAR fails. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) commit 61aad724ec0a685bc83b02b059a3ca0ad3bde6b0 Author: Michael Chan Date: Sun Feb 12 19:18:14 2017 -0500 bnxt_en: Add hardware NTUPLE filter for encapsulated packets. If skb_flow_dissect_flow_keys() returns with the encapsulation flag set, pass the information to the firmware to setup the NTUPLE filter accordingly. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 964fd4801d40ead69a447482c0dd0cd4be495e47 Author: Michael Chan Date: Sun Feb 12 19:18:13 2017 -0500 bnxt_en: Allow NETIF_F_NTUPLE to be enabled on VFs. Commit ae10ae740ad2 ("bnxt_en: Add new hardware RFS mode.") has added code to allow NTUPLE to be enabled on VFs. So we now remove the BNXT_VF() check in rfs_capable() to allow NTUPLE on VFs. 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 a79a5276aa2f844bd368c1d3d5a625e1fbefd989 Author: Michael Chan Date: Sun Feb 12 19:18:12 2017 -0500 bnxt_en: Fix ethtool -l pre-set max combined channel. With commit d1e7925e6d80 ("bnxt_en: Centralize logic to reserve rings."), ring allocation for combined rings has become stricter. A combined ring must now have an rx-tx ring pair. The pre-set max. for combined rings should now be min(rx, tx). Fixes: d1e7925e6d80 ("bnxt_en: Centralize logic to reserve rings.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb4d1d6261453677feb54e7a09c23fc7648dd6bc Author: Kshitij Soni Date: Sun Feb 12 19:18:11 2017 -0500 bnxt_en: Retry failed NVM_INSTALL_UPDATE with defragmentation flag. If the HWRM_NVM_INSTALL_UPDATE command fails with the error code NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR, retry the command with a new flag to allow defragmentation. Since we are checking the response for error code, we also need to take the mutex until we finish reading the response. Signed-off-by: Kshitij Soni Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 32 ++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) commit bac9a7e0f5d6da82478d5e0a2a236158f42d5757 Author: Michael Chan Date: Sun Feb 12 19:18:10 2017 -0500 bnxt_en: Update to firmware interface spec 1.7.0. The new spec has NVRAM defragmentation support which will be used in the next patch to improve ethtool flash operation. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 437 +++++++++++++++++++++----- 3 files changed, 363 insertions(+), 88 deletions(-) commit 7c92d61eca453d5007669e4322dd8e469d443d04 Merge: 87b60cf 7286ff7 Author: David S. Miller Date: Sun Feb 12 22:11:43 2017 -0500 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, most relevantly they are: 1) Extend nft_exthdr to allow to match TCP options bitfields, from Manuel Messner. 2) Allow to check if IPv6 extension header is present in nf_tables, from Phil Sutter. 3) Allow to set and match conntrack zone in nf_tables, patches from Florian Westphal. 4) Several patches for the nf_tables set infrastructure, this includes cleanup and preparatory patches to add the new bitmap set type. 5) Add optional ruleset generation ID check to nf_tables and allow to delete rules that got no public handle yet via NFTA_RULE_ID. These patches add the missing kernel infrastructure to support rule deletion by description from userspace. 6) Missing NFT_SET_OBJECT flag to select the right backend when sets stores an object map. 7) A couple of cleanups for the expectation and SIP helper, from Gao feng. ==================== Signed-off-by: David S. Miller commit 73ec49463f8925363aa8482ed19030beeed75323 Author: Angelo Dureghello Date: Sat Jan 14 01:20:24 2017 +0100 m68k/defconfig: amcore board defconfig tuning Changes to amcore board default config, as: - diet to reduce kernel size - enable sysfs gpio - enable CONFIG_SYN_COOKIES protection Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/configs/amcore_defconfig | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d0d89493bff8b7c7bf580197a44a1d49c50395b3 Author: Dmitry Torokhov Date: Fri Feb 10 15:18:07 2017 -0800 Input: tsc2004/5 - switch to using generic device properties Instead of supporting legacy platform data (of which we have no mainline users) and OF-based properties, let's switch to generic device properties. This will still allow legacy boards to use the driver (by defining property sets and attaching them to the drivers) and will simplify probe and make driver usable on ACPI-based systems as well. Reviewed-By: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc200x-core.c | 93 +++++++++++--------------------- include/linux/spi/tsc2005.h | 34 ------------ 2 files changed, 30 insertions(+), 97 deletions(-) commit f7bf6f58675a76c08e6eee7fa5c264884eb5c599 Author: Dmitry Torokhov Date: Fri Feb 10 15:30:29 2017 -0800 Input: tsc2004/5 - fix regulator handling In case of an optional regulator missing, regulator core will return ERR_PTR(-ENOENT) and not NULL, so the check for missing regulator is incorrect. Also, the regulator is not optional, it may simply be missing from platform description, so let's use devm_regulator_get() and rely on regulator core to give us dummy supply when real one is not available. Fixes: d257f2980feb ("Input: tsc2005 - convert to gpiod") Acked-By: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc200x-core.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 449aa83e69ff10d77fe088eadacafe1e97937c14 Author: Dmitry Torokhov Date: Fri Feb 10 15:12:20 2017 -0800 Input: tsc2005 - add OF device table To be prepared for SPI module loading using full compatible strings from device tree, let's add OF module device table data. Reviewed-By: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2005.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c33dea1eda7159f6854dcb54e58906936c26e727 Author: Jim Davis Date: Fri Feb 10 17:06:50 2017 -0700 Documentation: make Makefile.sphinx no-ops quieter Silence the "make[1]: Nothing to be done for ..." messages for the no-op targets in Makefile.sphinx. Signed-off-by: Jim Davis Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 4 ++++ 1 file changed, 4 insertions(+) commit 9210501f475a2f33e59254bcae5fd1542b64f421 Author: Nathan Howard Date: Thu Feb 9 18:36:36 2017 -0500 Documentation: DMA-ISA-LPC.txt Fixed spelling issue. Signed-off-by: Nathan Howard Signed-off-by: Jonathan Corbet Documentation/DMA-ISA-LPC.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da23e4d16ded49ac648fa78c45aa327d4b8ed522 Author: Martin Kepplinger Date: Thu Feb 9 07:53:29 2017 +0100 Documentation: input: fix path to input code definitions The UAPI header split failed to update the documentation for the input event codes; fix things accordingly. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/input/input.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3176d60dfbc7fb6d83c77e5ed3a3695e7937a9f4 Author: Jacob Zachariah Date: Sun Feb 12 13:42:51 2017 -0800 staging:xgifb:vb_setmode.h: Add missing identifier names Fix multiple checkpatch.pl warnings WARNING: function definition argument '..' should also have an identifier name Signed-off-by: Jacob Zachariah Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit da52b8c3239a42e0aeeb752a44049f6acd2ea46f Author: Ran Algawi Date: Sun Feb 12 23:45:32 2017 +0200 Staging: media: bcm2048: Fixed coding style issue. Fixed a coding style issue, where an octal value was needed insted of decimal. Signed-off-by: Ran Algawi Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c466bda60510eaac797e49db5d34555876d983ae Author: Russell King Date: Thu Feb 9 12:00:16 2017 +0000 ARM: add CPU_THUMB_CAPABLE to indicate possible Thumb support Clean up arch/arm/mm/Kconfig a little to provide a symbol which indicates whether the CPU may support the Thumb instruction set. This gets rid of the growing dependencies on ARM_THUMB, and also gives us a useful Kconfig symbol for choosing the kuser code. Reviewed-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/mm/Kconfig | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 899b5fbf9d3fcb721690b4d58cf58cc018517003 Author: Heiner Kallweit Date: Sun Feb 12 16:31:44 2017 +0100 genirq/devres: Use dev_name(dev) as default for devname Allow the devname parameter to be NULL and use dev_name(dev) in this case. This should be an appropriate default for most use cases. Signed-off-by: Heiner Kallweit Link: http://lkml.kernel.org/r/05c63d67-30b4-7026-02d5-ce7fb7bc185f@gmail.com Signed-off-by: Thomas Gleixner kernel/irq/devres.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7286ff7fde9f963736c7e575572899d8e16b06b7 Author: Pablo Neira Ayuso Date: Fri Feb 10 19:59:36 2017 +0100 netfilter: nf_tables: honor NFT_SET_OBJECT in set backend selection Check for NFT_SET_OBJECT feature flag, otherwise we may end up selecting the wrong set backend. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 3 ++- net/netfilter/nft_set_hash.c | 2 +- net/netfilter/nft_set_rbtree.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit fc52497eb9dd031de9d17af54ac8f4078663a9f5 Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:29 2017 +0100 netfilter: update MAINTAINERS It's been a while since Patrick has been suspended as coreteam member [1]. Update this file to remove him. While at this, remove references to all foo-tables variants, given the project hosts more than just that, eg. ipset, conntrack, ... [1] https://marc.info/?l=netfilter-devel&m=146887464512702 Signed-off-by: Pablo Neira Ayuso MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a94e38d254b3622d5d53f74b3b716b0fcab0ba8 Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:23 2017 +0100 netfilter: nf_tables: add NFTA_RULE_ID attribute This new attribute allows us to uniquely identify a rule in transaction. Robots may trigger an insertion followed by deletion in a batch, in that scenario we still don't have a public rule handle that we can use to delete the rule. This is similar to the NFTA_SET_ID attribute that allows us to refer to an anonymous set from a batch. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 +++ include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) commit 74e8bcd21c40dbbb3d74fa904536f8a3bddafed3 Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:20 2017 +0100 netfilter: nf_tables: add check_genid to the nfnetlink subsystem This patch implements the check generation id as provided by nfnetlink. This allows us to reject ruleset updates against stale baseline, so userspace can retry update with a fresh ruleset cache. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8c4d4e8b5626fec965fd5034e5bd5e57790f243f Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:17 2017 +0100 netfilter: nfnetlink: allow to check for generation ID This patch allows userspace to specify the generation ID that has been used to build an incremental batch update. If userspace specifies the generation ID in the batch message as attribute, then nfnetlink compares it to the current generation ID so you make sure that you work against the right baseline. Otherwise, bail out with ERESTART so userspace knows that its changeset is stale and needs to respin. Userspace can do this transparently at the cost of taking slightly more time to refresh caches and rework the changeset. This check is optional, if there is no NFNL_BATCH_GENID attribute in the batch begin message, then no check is performed. Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nfnetlink.h | 1 + include/uapi/linux/netfilter/nfnetlink.h | 12 ++++++++++++ net/netfilter/nfnetlink.c | 31 +++++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) commit 48656835c0405aa2e6c0d6a4305c77b70758d168 Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:14 2017 +0100 netfilter: nfnetlink: add nfnetlink_rcv_skb_batch() Add new nfnetlink_rcv_skb_batch() to wrap initial nfnetlink batch handling. Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 51 ++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit b745d0358db44ebcef31478314436d6d4ff93bfa Author: Pablo Neira Ayuso Date: Fri Feb 10 12:08:08 2017 +0100 netfilter: nfnetlink: get rid of u_intX_t types Use uX types instead. Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4dee62b1b9b43c9bbf49c93cd114e1bf1334fb6a Author: Gao Feng Date: Thu Feb 9 21:40:38 2017 +0800 netfilter: nf_ct_expect: nf_ct_expect_insert() returns void Because nf_ct_expect_insert() always succeeds now, its return value can be just void instead of int. And remove code that checks for its return value. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a96e66e702bc615f5927b15c739c91d5098dac59 Author: Gao Feng Date: Thu Feb 9 16:46:45 2017 +0800 netfilter: nf_ct_sip: Use mod_timer_pending() timer_del() followed by timer_add() can be replaced by mod_timer_pending(). Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 20f896c4dbb48f7e9ee81d08d1bcafbacb2f4821 Author: simran singhal Date: Sun Feb 12 12:56:23 2017 +0530 staging: rtl8192u: Fixing no new typedef warning This patch fixes following checkpatch.pl warnings: WARNING:do not add new typedefs. All the related files have been modified. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- .../staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 4 ++-- .../staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 4 ++-- .../staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 ++-- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 ++-- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 18 +++++++++--------- drivers/staging/rtl8192u/r8192U_core.c | 14 +++++++------- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 4 ++-- drivers/staging/rtl8192u/r819xU_firmware.c | 4 ++-- 10 files changed, 33 insertions(+), 33 deletions(-) commit 4d0bdcb10c43056489b69186ee43669f2a73b8f9 Author: Arushi Singhal Date: Sun Feb 12 16:15:58 2017 +0530 staging: rtl8192e: Aligning the * on each line in block comments This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/fakekey.c | 10 +++++----- drivers/staging/speakup/i18n.c | 14 +++++++------- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +++++----- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) commit 272e9e0f870dec4a0c6e77f0707fb2678e555243 Author: simran singhal Date: Sun Feb 12 15:14:12 2017 +0530 staging: rtl8192u: Removing unnecessary parentheses Removing unnecessary parentheses from an expression of the form &(x). Issue found by checkpatch. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 917883b58e8646d446369db23048b7286f0d22de Author: simran singhal Date: Sun Feb 12 02:40:26 2017 +0530 staging: rtl8192u: Fix warnings relating to printk() This fixes the following checkpatch.pl warnings: WARNING: printk() should include KERN_ facility level Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f5aa17ea853fd024c02be2dd7423ad6ee2e9504 Author: simran singhal Date: Sun Feb 12 02:26:58 2017 +0530 staging: rtl8192u: Fix RETURN_VOID warnings Fix 'void function return statements are not generally useful' checkpatch.pl warnings. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 3 --- 1 file changed, 3 deletions(-) commit edcba2d94eff332cbc208cbd0670c974c9dec374 Author: simran singhal Date: Sun Feb 12 02:25:07 2017 +0530 staging: rtl8192u: Fix brace placement Fix brace placement errors caught by checkpatch.pl ERROR: that open brace { should be on the previous line Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 90 ++++++++-------------- 1 file changed, 30 insertions(+), 60 deletions(-) commit 0044defa922d6c3e56c2bf733e25b97cd5c57908 Author: simran singhal Date: Sun Feb 12 02:23:15 2017 +0530 staging: rtl8192u: Removing true and false comparison Remove comparison to true and false in if statement. Problem found usingcheckpatch.pl. CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b8c57cfd275ff0e2fdc3845cacc98da1ee79316 Author: simran singhal Date: Sun Feb 12 02:21:21 2017 +0530 staging: rtl8192u: Remove unnecessary space after a cast This patch fixes the checkpatch issue: CHECK: No space is necessary after a cast Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f8f65f2ba7cfa4da1335e4e25e1b714381930751 Author: simran singhal Date: Sun Feb 12 02:19:21 2017 +0530 staging: rtl8192u: Replace explicit NULL comparisons with ! This patch replace explicit NULL comparison with ! or unmark operator to simplify code. Reported by checkpatch.pl for comparison to NULL could be written "!XXX" or "XXX". Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit faa86645e97c1e6327803cb4ac989541292c6e4e Author: simran singhal Date: Sun Feb 12 02:16:51 2017 +0530 staging: rtl8192u: Remove useless function This patch remove useless function ieee80211_ccmp_null. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 1 - drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 6 ------ drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 1 - 3 files changed, 8 deletions(-) commit 64ae44af918c3107294040e17f8df82fadf6f675 Author: simran singhal Date: Sun Feb 12 02:13:40 2017 +0530 staging: rtl8192u: Fix braces {} style This fixes all checkpatch form of this from the Lustre tree: CHECK: braces {} should be used on all arms of this statement Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ce53f4fab7acc639962551b5727ac086aa0ec452 Author: simran singhal Date: Sun Feb 12 02:10:09 2017 +0530 staging: rtl8192u: Clean up comparison to NULL Checkpatch recommended changes. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a090189cd07a0526788d2af347522c8589e121c5 Author: simran singhal Date: Sun Feb 12 02:07:38 2017 +0530 staging: rtl8192u: Fixing multiple assignments This patch modifies the assignments into single assignments. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f7a9da0e2e27fab32e25e4988a5553c0dbc9660 Author: simran singhal Date: Sun Feb 12 02:02:21 2017 +0530 staging: rtl8192u: Removing unnecessary space after a cast This patch fixes the checkpatch warning by removing unnecessary space after a cast. CHECK: No space is necessary after a cast Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ba2e9d4105ee30ed1bbc82a2351ebf6103a40d26 Author: simran singhal Date: Sun Feb 12 01:56:09 2017 +0530 staging: rtl8192u: Removing multiple blank lines This patch fixes the checkpatch warning by removing multiple blank lines. CHECK: Please don't use multiple blank lines Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 12 ------------ 1 file changed, 12 deletions(-) commit 3838eedf136fa5fd80d4a92931a5a456878e8185 Author: Derek Robson Date: Sat Feb 11 22:59:01 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211_crypt.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c298c5cd0f863a3ccb376982fccb1a3011f7dae Author: Derek Robson Date: Sat Feb 11 22:58:46 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211_crypt.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5a41b48d9402f31db5991f1dcfef042aac3f7ebe Author: Derek Robson Date: Sat Feb 11 22:55:48 2017 +1300 Staging: rtl8192u: ieee80211: ieee80211_crypt_wep.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit caae115685765b7d84aa0611064239f2e38e2cb9 Author: Derek Robson Date: Sat Feb 11 22:55:31 2017 +1300 Staging: rtl8192u: r8180_93cx6.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8180_93cx6.c | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit e4cf922593cfcc916dc8ac865f0c90b55a86bb9b Author: Derek Robson Date: Sat Feb 11 22:55:16 2017 +1300 Staging: rtl8192u: r8190_rtl8256.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8190_rtl8256.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 56e745be0be9a070e60f2b95950cdb1cbc82cd8f Author: Derek Robson Date: Sat Feb 11 22:55:00 2017 +1300 Staging: rtl8192u: r8190_rtl8256.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8190_rtl8256.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d3566af62d99bca951ba8ece088b99d5da04af38 Author: Derek Robson Date: Sat Feb 11 22:53:51 2017 +1300 Staging: rtl8192u: r8192U_hw.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_hw.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 6a5e7311c97acaf494663e1dc5c7ecb3a2bb6523 Author: Derek Robson Date: Sat Feb 11 22:53:15 2017 +1300 Staging: rtl8192u: r819xU_cmdpkt.h - style fix Fixed style of block comments. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_cmdpkt.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 30d69ada0771ed25b63ec56887faea31d8f551bd Author: Derek Robson Date: Sat Feb 11 22:52:58 2017 +1300 Staging: rtl8192u: r819xU_firmware.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 991397d1c19d6bf7eb69e7442b97d8c49412117f Author: Derek Robson Date: Sat Feb 11 22:52:40 2017 +1300 Staging: rtl8192u: r819xU_phy.c - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_phy.c | 41 +++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 14 deletions(-) commit 415a8e0e77d391514e31cb038867a99fb4f455c8 Author: Larry Finger Date: Fri Feb 10 21:30:30 2017 -0600 staging: r8712u: Fix Sparse warnings in rtl871x_mlme.c Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_mlme.c drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: expected unsigned int [unsigned] [usertype] DSConfig drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: got restricted __le32 [usertype] drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: expected unsigned int [unsigned] [usertype] ATIMWindow drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: got restricted __le32 [usertype] drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: expected restricted __le16 [addressable] [usertype] cap_info drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: got int Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fc5c13ccd990fa2c8bb6351053c0cf37025fd37f Author: Larry Finger Date: Fri Feb 10 21:30:29 2017 -0600 staging: r8712u: Fix Sparse warnings in rtl871x_ioctl_linux.c Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_ioctl_linux.c drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1422:46: warning: restricted __le16 degrades to integer drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1424:46: warning: restricted __le16 degrades to integer Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43d60f9b7fdeb0bb8e102760a236b428d8e2e4f4 Author: Larry Finger Date: Fri Feb 10 21:30:28 2017 -0600 staging: r8712u: Fix Sparse endian warning in rtl871x_recv.c Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_recv.c drivers/staging/rtl8712/rtl871x_recv.c:657:21: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_recv.c:657:21: expected unsigned short [unsigned] [assigned] [usertype] len drivers/staging/rtl8712/rtl871x_recv.c:657:21: got restricted __be16 [usertype] Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_recv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 07222e535831b916221dd2a48a3047ec7e45dc72 Author: Larry Finger Date: Fri Feb 10 21:30:27 2017 -0600 staging: r8712u: Fix Sparse warning in rtl871x_xmit.c Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_xmit.c drivers/staging/rtl8712/rtl871x_xmit.c:350:44: warning: restricted __le32 degrades to integer drivers/staging/rtl8712/rtl871x_xmit.c:491:23: warning: incorrect type in initializer (different base types) drivers/staging/rtl8712/rtl871x_xmit.c:491:23: expected unsigned short [usertype] *fctrl drivers/staging/rtl8712/rtl871x_xmit.c:491:23: got restricted __le16 * drivers/staging/rtl8712/rtl871x_xmit.c:580:36: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_xmit.c:580:36: expected unsigned short [unsigned] [short] [usertype] drivers/staging/rtl8712/rtl871x_xmit.c:580:36: got restricted __be16 [usertype] Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_xmit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dc223652c6de409fe5e073b0f631f0413a90e69f Author: Larry Finger Date: Fri Feb 10 21:30:26 2017 -0600 staging: r8712u: Fix macros used to read/write the TX/RX descriptors Although the driver works on big-endian hardware, Sparse generates a lot of warnings. Many of these are the result of incorrect coding of these macros. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/wifi.h | 109 ++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 57 deletions(-) commit 221c46d28957bd6e2158abc2179ce4a8c9ce07d3 Author: Larry Finger Date: Fri Feb 10 21:30:25 2017 -0600 staging: rtl8712u: Fix endian settings for structs describing network packets The headers describing a number of network packets do not have the correct endian settings for several types of data. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.h | 84 ++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit e2288bce8ec828ce36f6443e298e04d41fddff7e Author: Larry Finger Date: Fri Feb 10 21:30:24 2017 -0600 staging: rtl8712: Fix some Sparse endian messages Sparse reports the following: CHECK drivers/staging/rtl8712/rtl8712_xmit.c drivers/staging/rtl8712/rtl8712_xmit.c:564:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:569:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:571:42: warning: cast from restricted __le32 Each of these cases is transferring a quantity that is little-endian. There is no need for conversion. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 76b94eb1eb882e3a8beb51b7d287a21a38a56938 Author: Jess Frazelle Date: Fri Feb 10 17:37:57 2017 -0800 staging: set msi_domain_ops as __ro_after_init Marked msi_domain_ops structs as __ro_after_init when called only during init. This protects the data structure from accidental corruption. Suggested-by: Kees Cook Signed-off-by: Jess Frazelle Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fac103e0ab8dfc8fecf1462f6f3777ea9744fc4d Author: Shiva Kerdel Date: Fri Feb 10 17:08:14 2017 +0100 Staging: ks7010: ks_*: Removed blank lines before and after braces. Removing unnecessary blank lines around braces to solve CHECKS. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 11 ----------- drivers/staging/ks7010/ks_wlan.h | 1 - drivers/staging/ks7010/ks_wlan_net.c | 5 ----- 3 files changed, 17 deletions(-) commit 8a0e4b9e469c7bbaa206d81e2e7515e1abb1aa00 Author: Youngdo, Lee Date: Sat Feb 11 00:29:15 2017 +0900 staging: android: ion: fix coding style issue Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl. Signed-off-by: Youngdo, Lee Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_cma_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 563a8412c563cd68b90bb55603deb0a4d397d2bb Author: Gioh Kim Date: Thu Feb 9 17:30:12 2017 +0100 staging: greybus: fix symbolic permission coding style issues Fix "Octal permissions are preffered than symbolic ones" issues. Signed-off-by: Gioh Kim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- drivers/staging/greybus/loopback.c | 2 +- drivers/staging/greybus/svc.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 461ab8077d573d4a35529572c774a71e5a898a84 Author: Gioh Kim Date: Thu Feb 9 17:30:11 2017 +0100 staging: greybus: fix "line over 80 characters" coding style issues This patch fixes only obvious lines. There are still more issues. Signed-off-by: Gioh Kim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 5 +++- drivers/staging/greybus/arche-platform.c | 43 +++++++++++++++++++++----------- drivers/staging/greybus/audio_codec.c | 5 +++- drivers/staging/greybus/bootrom.c | 13 ++++++---- drivers/staging/greybus/es2.c | 3 ++- drivers/staging/greybus/fw-download.c | 6 +++-- drivers/staging/greybus/gbphy.c | 3 ++- drivers/staging/greybus/gpio.c | 3 ++- drivers/staging/greybus/svc.c | 26 +++++++++++-------- drivers/staging/greybus/uart.c | 8 +++--- drivers/staging/greybus/vibrator.c | 4 ++- 11 files changed, 77 insertions(+), 42 deletions(-) commit 59d409014a91578817b913477592eee4eaf1f6ed Author: Nathan Howard Date: Fri Feb 10 23:16:37 2017 -0500 staging: greybus: arpc.h: remove duplicate line. Fix checkpatch.pl issue of the form: "CHECK: Please don't use multiple blank lines". Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 1 - 1 file changed, 1 deletion(-) commit b3fc909ad1a3cca90ef47bdb2a28c14d58515b1a Author: Nathan Howard Date: Sat Feb 11 00:06:44 2017 -0500 staging: dgnc: dgnc_tty.c: fix argument list alignment issue. Fix checkpatch.pl issue of the form: "CHECK: Alignment should match open parenthesis". Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e6b240bd3b0c99180b78e522c20747d3f8b6ce76 Author: Derek Robson Date: Sun Feb 12 20:13:42 2017 +1300 Staging: sm750fb: sm750.c - style fix Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 606ea2bd81d0290dbea2c84c976dee3dd39c3427 Author: Alexander Alemayhu Date: Sat Feb 11 11:13:47 2017 +0100 staging: wlan-ng: reduce type warnings Fixes the following sparse output: drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:154:38: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:154:38: expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:154:38: got restricted __be16 [usertype] drivers/staging/wlan-ng/p80211conv.c:390:42: warning: cast to restricted __le16 drivers/staging/wlan-ng/p80211conv.c:413:29: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:413:29: expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:413:29: got restricted __be16 [usertype] drivers/staging/wlan-ng/p80211conv.c:481:29: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:481:29: expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:481:29: got restricted __be16 [usertype] Signed-off-by: Alexander Alemayhu Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211conv.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit aefc958960e78acc39d5e52b8bc7abce6874ccd2 Author: Jacob Zachariah Date: Sat Feb 11 17:27:50 2017 -0800 staging:wilc1000: Fix line over 80 characters Fix a checkpatch.pl WARNING: line over 80 characters Signed-off-by: Jacob Zachariah Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bc9e43ad503e35016f5679884ec1e400e09d2c66 Author: Saber Rezvani Date: Thu Feb 9 16:29:56 2017 +0330 staging: comedi: dmm32at: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dmm32at.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f280a69e969a51d2c43a90a9711706f5a7ea29d Author: Saber Rezvani Date: Thu Feb 9 17:56:02 2017 +0330 staging: comedi: dt2801: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt2801.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9fbe9b06e75facc7d35a62dd29e498998037f301 Author: Saber Rezvani Date: Thu Feb 9 18:14:10 2017 +0330 staging: comedi: dt2814: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt2814.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b2d7f198140aae48dd93c41abde37283312a98c Author: Saber Rezvani Date: Thu Feb 9 18:34:26 2017 +0330 staging: comedi: dt2815: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt2815.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bd05c98b29fa6889004de13849676f3536f519b Author: Saber Rezvani Date: Fri Feb 10 01:03:27 2017 +0330 staging: comedi: ni_at_a2150: usleep_range is preferred over udelay Fix the checkpatch.pl issue: CHECK: usleep_range is preferred over udelay Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_at_a2150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d54b1bdaa331a367b6b6712328fe6268bec2b77d Author: AbdAllah-MEZITI Date: Fri Feb 10 19:52:51 2017 +0100 staging: bcm2835-audio: fix trailing statements Trailing statements should be on next line. Signed-off-by: AbdAllah-MEZITI Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cdefc236ef23193e7dcb8758685af9e60e8820bb Author: William Blough Date: Sun Feb 12 05:05:31 2017 -0500 staging: lustre: lnet: fix type warning in lib-socket.c The local socket address is defined as a __be32 value. However, if the local ip address is not given, then the constant INADDR_ANY is used. This patch converts INADDR_ANY to __be32 for type consistency. Fixes the following sparse warnings: drivers/staging/lustre/lnet/lnet/lib-socket.c:396:41: warning: incorrect type in assignment (different base types) drivers/staging/lustre/lnet/lnet/lib-socket.c:397:56: warning: restricted __be32 degrades to integer Signed-off-by: William Blough Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit de51919c9a0297345d520de0ec2baee4bf5ddc87 Author: Niu Yawei Date: Sat Feb 11 12:12:39 2017 -0500 staging: lustre: llite: check reply status in ll_migrate() ll_migrate() should check reply status before trying to read reply buffer, checking if request is NULL doesn't make sense. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8807 Reviewed-on: https://review.whamcloud.com/23666 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit aa2f4a3f20fca998a6e3d27ec3f09bea53ca799d Author: wang di Date: Sat Feb 11 12:12:38 2017 -0500 staging: lustre: llite: root inode checking for migration Do not migrate root inode. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7577 Reviewed-on: http://review.whamcloud.com/17669 Reviewed-by: Lai Siyao Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 7b0a17f5f68a22b960a335dbfe7c1fd93a57506f Author: wang di Date: Sat Feb 11 12:12:37 2017 -0500 staging: lustre: llite: check request != NULL in ll_migrate Check if the request is NULL, before retrieve reply body from the request. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7396 Reviewed-on: http://review.whamcloud.com/17079 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 41 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 18 deletions(-) commit f0b914aeea8ed2abe8e53779ec620eac2129d03f Author: Geert Uytterhoeven Date: Tue Dec 6 20:05:26 2016 +0100 m68k/include: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add dummies for validating format strings when debugging is disabled. Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/bug.h | 4 ++-- arch/m68k/include/asm/floppy.h | 6 +++--- arch/m68k/include/asm/math-emu.h | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) commit e6991137a3895b8ee2096fd2259b1f0be95843d0 Author: Geert Uytterhoeven Date: Tue Dec 6 19:47:39 2016 +0100 m68k/mm: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven arch/m68k/mm/init.c | 2 +- arch/m68k/mm/memory.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 05b70ff69cdaf0b84f231c2460bf08b27bad3e95 Author: Geert Uytterhoeven Date: Tue Dec 6 17:25:06 2016 +0100 m68k/mm: sun3 - Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing print to do_page_mapin(), as print_pte_vaddr() calls pr_cont(). Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/sun3_pgtable.h | 6 +++--- arch/m68k/mm/sun3kmap.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 7c79e1eef8c9a723e589364643c7e74b688e23bf Author: Geert Uytterhoeven Date: Tue Dec 6 19:57:37 2016 +0100 m68k/kernel: Modernize printing of kernel messages - Use pr_err_ratelimited() instead of deprecated printk_ratelimit(), - Add dummies for validating format strings when debugging is disabled, - Convert from printk() to pr_*(), - Correct printf()-style format specifiers. Signed-off-by: Geert Uytterhoeven arch/m68k/kernel/dma.c | 4 ++-- arch/m68k/kernel/module.c | 12 ++++++------ arch/m68k/kernel/process.c | 20 ++++++++++---------- arch/m68k/kernel/signal.c | 24 +++++++----------------- arch/m68k/kernel/uboot.c | 3 +-- 5 files changed, 26 insertions(+), 37 deletions(-) commit 4eee1e72ad06bdc942b8f8c221d49691ef232c56 Author: Geert Uytterhoeven Date: Tue Dec 6 17:14:40 2016 +0100 m68k/sun3x: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Remove #undef DEBUG, - Drop useless Warning prefix, - Use TABs for indentation while at it. Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/sun3xflop.h | 14 +++++++------- arch/m68k/sun3x/dvma.c | 35 +++++++++++++---------------------- arch/m68k/sun3x/prom.c | 4 ++-- 3 files changed, 22 insertions(+), 31 deletions(-) commit 56bbd86257f899ced7ef9c58210dda4edbd40871 Author: Geert Uytterhoeven Date: Wed Nov 9 15:40:58 2016 +0100 m68k/sun3: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuations, - Do not print nonexistent len variable, - Add missing sysname[] variable, - Correct printf()-style format specifiers. Signed-off-by: Geert Uytterhoeven arch/m68k/sun3/config.c | 2 +- arch/m68k/sun3/dvma.c | 3 +-- arch/m68k/sun3/idprom.c | 8 ++++--- arch/m68k/sun3/mmu_emu.c | 47 ++++++++++++++++++++-------------------- arch/m68k/sun3/prom/printf.c | 2 +- arch/m68k/sun3/sun3dvma.c | 51 +++++++++++++++++++------------------------- 6 files changed, 54 insertions(+), 59 deletions(-) commit 446926f9490342532ff44983cb187c01051174a9 Author: Geert Uytterhoeven Date: Tue Dec 6 17:11:01 2016 +0100 m68k/q40: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Use TABs for indentation while at it. Signed-off-by: Geert Uytterhoeven arch/m68k/q40/config.c | 14 +++++++------- arch/m68k/q40/q40ints.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) commit 3c8bc6b7d9444572cc48348543636eeeaa6efd2b Author: Geert Uytterhoeven Date: Tue Dec 6 17:10:23 2016 +0100 m68k/mvme16x: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven arch/m68k/mvme16x/config.c | 32 ++++++++++++++++---------------- arch/m68k/mvme16x/rtc.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) commit 0c29d757f3bd8c6339eb25aeeb71ddbd4cb78b72 Author: Geert Uytterhoeven Date: Tue Dec 6 17:09:58 2016 +0100 m68k/mvme147: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven arch/m68k/mvme147/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0269be792f3330efd5f987cf29be37bb91322e35 Author: Geert Uytterhoeven Date: Tue Dec 6 17:02:53 2016 +0100 m68k/bvme6000: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven arch/m68k/bvme6000/config.c | 8 ++++---- arch/m68k/bvme6000/rtc.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit ed1aded433ee70123c761fbeddc409e3ed2ffcbf Author: Geert Uytterhoeven Date: Tue Dec 6 17:00:33 2016 +0100 m68k/68000: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven Acked-by: Greg Ungerer arch/m68k/68000/m68328.c | 6 +++--- arch/m68k/68000/m68EZ328.c | 6 +++--- arch/m68k/68000/m68VZ328.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit 6d7919a7bacf549259d38d118b0207896dac68b5 Author: Geert Uytterhoeven Date: Wed Nov 9 14:16:31 2016 +0100 m68k/atari: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuations, to fix user-visible breakage, - Drop useless WARNING prefix, - Move trailing spaces to start of continuations. Note that the "Keyboard overrun" message will now only be generated when the kernel has been compiled for debugging. Fixes: 4bcc595ccd80decb ("printk: reinstate KERN_CONT for printing continuation lines") Signed-off-by: Geert Uytterhoeven arch/m68k/atari/atakeyb.c | 14 ++++++------ arch/m68k/atari/config.c | 56 +++++++++++++++++++++++------------------------ 2 files changed, 35 insertions(+), 35 deletions(-) commit b7eaf8f16e87c3896e9b8c0b2e54d71210d43b48 Author: Henry Tieman Date: Fri Dec 2 12:33:01 2016 -0800 i40e: Save more link abilities when using ethtool Ethtool support needs to save more PHY information. The added information includes FEC capabilities and 25G link types. Without this change it is possible to lose 25G or FEC settings by using ethtool. Change-ID: Ie42255b1e901ffbf9583b8c46466a54894114280 Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) commit 671889e6740ac7ab84d1420525b50d1d47001102 Author: Jacob Keller Date: Fri Dec 2 12:33:00 2016 -0800 i40e: avoid race condition when sending filters to firmware for addition Refactor how we add new filters to firmware to avoid a race condition that can occur due to removing filters from the hash temporarily. To understand the race condition, suppose that you have a number of MAC filters, but have not yet added any VLANs. Now, add two VLANs in rapid succession. A possible resulting flow would look something like the following: (1) lock hash for add VLAN (2) add the new MAC/VLAN combos for each current MAC filter (3) unlock hash (4) lock hash for filter sync (5) notice that we have a VLAN, so prepare to update all MAC filters with VLAN=-1 to be VLAN=0. (6) move NEW and REMOVE filters to temporary list (7) unlock hash (8) lock hash for add VLAN (9) add new MAC/VLAN combos. Notice that no MAC filters are currently in the hash list, so we don't add any VLANs <--- BUG! (10) unlock hash (11) sync the temporary lists to firmware (12) lock hash for post-sync (13) move the temporary elements back to the main list .... Because we take filters out of the main hash into temporary lists, we introduce a narrow window where it is possible that other callers to the list will not see some of the filters which were previously added but have not yet been finalized. This results in sometimes dropping VLAN additions, and could also result in failing to add a MAC address on the newly added VLAN. One obvious way to avoid this race condition would be to lock the entire firmware process. Unfortunately this does not work because adminq firmware commands take a mutex which results in a sleep while atomic BUG(). So, we can't use the simplest approach. An alternative approach is to simply not remove the filters from the hash list while adding. Instead, add an i40e_new_mac_filter structure which we will use to track added filters. This avoids the need to remove the filter from the hash list. We'll store a pointer to the original i40e_mac_filter, along with our own copy of the state. We won't update the state directly, so as to avoid race with other code that may modify the state while under the lock. We are safe to read f->macaddr and f->vlan since these only change in two locations. The first is on filter creation, which must have already occurred. The second is inside i40e_correct_vlan_filters which was previously run after creation of this object and can't be run again until after. Thus, we should be safe to read the MAC address and VLAN while outside the lock. We also aren't going to run into a use-after-free issue because the only place where we free filters is when they are marked FAILED or when we remove them inside the sync subtask. Since the subtask has its own critical flag to prevent duplicate runs, we know this won't happen. We also know that the only location to transition a filter from NEW to FAILED is inside the subtask also, so we aren't worried about that either. Use the wrapper i40e_new_mac_filter for additions, and once we've finalized the addition to firmware, we will update the filter state inside a lock, and then free the wrapper structure. In order to avoid a possible race condition with filter deletion, we won't update the original filter state unless it is still I40E_FILTER_NEW when we finish the firmware sync. This approach is more complex, but avoids race conditions related to filters being temporarily removed from the list. We do not need the same behavior for deletion because we always unconditionally removed the filters from the list regardless of the firmware status. Change-Id: I14b74bc2301f8e69433fbe77ebca532db20c5317 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 16 +++ drivers/net/ethernet/intel/i40e/i40e_main.c | 147 ++++++++++++++++++---------- 2 files changed, 112 insertions(+), 51 deletions(-) commit d88d40b01c5c0dad6a1dca3b18267849eef4a2a9 Author: Jacob Keller Date: Fri Dec 2 12:32:59 2016 -0800 i40e: allow i40e_update_filter_state to skip broadcast filters Fix a bug where we modified the mac_filter_hash while outside a lock, when handling addition of broadcast filters. Normally, we add filters to firmware by batching the additions into lists and issuing 1 update for every few filters. Broadcast filters are handled differently, by instead setting the broadcast promiscuous mode flags. In order to make sure the 1<->1 mapping of filters in our addition array lined up with filters in the hlist tmp_add_list, we had to remove the filter and move it back to the main hash. However, we didn't do this under lock, which could cause consistency problems for the list. Fix this by updating i40e_update_filter_state logic so that it knows to avoid broadcast filters. This ensures that we don't have to remove the filter separately, and can put it back using the normal flow. Change-ID: Id288fade80b3e3a9a54b68cc249188cb95147518 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 37 ++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) commit e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65 Author: Jacob Keller Date: Fri Dec 2 12:32:58 2016 -0800 i40e: don't warn every time we clear an Rx timestamp register The intent of this message was to indicate to a user that we might have missed a timestamp event for a valid packet. The original method of detecting the missed events relied on waiting until all 4 registers were filled. A recent commit d55458c0cd7a5 ("i40e: replace PTP Rx timestamp hang logic") replaced this logic with much better detection scheme that could detect a stalled Rx timestamp register even when other registers were still functional. The new logic means that a message will be displayed almost as soon as a timestamp for a dropped frame occurs. This new logic highlights that the hardware will attempt timestamp for frames which it later decides to drop. The most prominent example is when a multicast PTP frame is received on a multicast address that we are not subscribed to. Because the hardware initiates the Rx timestamp as soon as possible, it will latch an RXTIME register, but then drop the packet. This results in users being confused by the message as they are not expecting to see dropped timestamp messages unless their application also indicates that timestamps were missing. Resolve this by reducing the severity and frequency of the displayed message. We now only print the message if 3 or 4 of the RXTIME registers are stalled and get cleared within the same watchdog event. This ensures that the common case does not constantly display the message. Additionally, since the message is likely not as meaningful to most users, reduce the message to a dev_dbg instead of a dev_warn. Users can still get a count of the number of timestamps dropped by reading the ethtool statistics value, if necessary. Change-ID: I35494442226a444c418dfb4f91a3070d06c8435c Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ptp.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 3e03d7ccf4418c87a134bbfa79c05090296767f7 Author: Henry Tieman Date: Fri Dec 2 12:32:57 2016 -0800 i40e: Save link FEC info from link up event Store the FEC status bits from the link up event into the hw_link_info structure. Change-ID: I9a7b256f6dfb0dce89c2f503075d0d383526832e Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 2 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 21 +++++++++++++++++++-- drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) commit b3f028fc8abdf72c6ed1103e60e89dd60538f126 Author: Sudheer Mogilappagari Date: Thu Feb 9 23:58:22 2017 -0800 i40e: Add bus number info to i40e_bus_info struct Currently i40e_bus_info has PCI device and function info only and log messages print device number as bus number. Added field to provide bus number info and modified log statements to print bus, device and function information. Change-ID: I811617cee2714cc0d6bade8d369f57040990756f Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 16 +++++++++------- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_osdep.h | 12 ++++++------ drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 + 6 files changed, 19 insertions(+), 13 deletions(-) commit 3bb83baf9ac9c73f4da051cae17042f264832e61 Author: Mitch Williams Date: Thu Feb 9 23:46:50 2017 -0800 i40e: Clean up dead code The function i40e_client_prepare() can never return an error. So make it void and quit checking its return value. Change-ID: I9ff311e2324dde329eb68648efb2c94aaff856db Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit cfffef76e7fa5b9ac3ec8298336d0265bc86af3c Author: Bimmy Pujari Date: Mon Nov 28 16:06:11 2016 -0800 i40e/i40evf : Changed version from 1.6.25 to 1.6.27 Signed-off-by: Bimmy Pujari 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 a158aeaf5bb5b014240b360693751476aca7440b Author: Jacob Keller Date: Thu Feb 9 23:44:27 2017 -0800 i40e: update comment explaining where FDIR buffers are freed The original comment implies that the only location where the raw_packet buffer will be freed is in i40e_clean_tx_ring() which is incorrect. In fact this isn't even the normal case. Update the comment explaining where the memory is freed. Change-ID: Ie0defc35ed1c3af183f81fdc60b6d783707a5595 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9b37c937313bf6769d0b018ca35180b379d40862 Author: Scott Peterson Date: Thu Feb 9 23:43:30 2017 -0800 i40e/i40evf: eliminate i40e_pull_tail() Reorganize the i40e_pull_tail() logic, doing it in i40e_add_rx_frag() where it's cheaper. The igb driver does this the same way. Also renames i40e_page_is_reserved() to reflect what it actually tests. Change-ID: Icd9cc507aae1fcdc02308b3a09034111b4c24071 Signed-off-by: Scott Peterson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 169 ++++++++++++++------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 169 ++++++++++++++------------ 2 files changed, 186 insertions(+), 152 deletions(-) commit e72e56597ba15ce70f4fc1eb2ceeaa8da0d4ab5e Author: Scott Peterson Date: Thu Feb 9 23:40:25 2017 -0800 i40e/i40evf: Moves skb from i40e_rx_buffer to i40e_ring This patch reduces the size of struct i40e_rx_buffer by one pointer, and makes the i40e driver a little more consistent with the igb driver in terms of packets that span buffers. We do this by moving the skb field from struct i40e_rx_buffer to struct i40e_ring. We pass the skb we already have (or NULL if we don't) to i40e_fetch_rx_buffer(), which skips the skb allocation if we already have one for this packet. Change-ID: I4ad48a531844494ba0c5d8e1a62209a057f661b0 Signed-off-by: Scott Peterson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 31 +++++++++++++-------------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 9 +++++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 30 +++++++++++++------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 9 +++++++- 4 files changed, 46 insertions(+), 33 deletions(-) commit 7987dcd7b95111a5acbf5abdbf155eedacd3546b Author: Scott Peterson Date: Thu Feb 9 23:37:28 2017 -0800 i40e/i40evf: Limit DMA sync of RX buffers to actual packet size On packet RX, we perform a DMA sync for CPU before passing the packet up. Here we limit that sync to the actual length of the incoming packet, rather than always syncing the entire buffer. Change-ID: I626aaf6c37275a8ce9e81efcaa773f327b331487 Signed-off-by: Scott Peterson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 16 +++++++++------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) commit e5f77f4a2ff2d6ce2d973ebc62084d92f203c9f6 Author: Mitch Williams Date: Thu Feb 9 23:35:18 2017 -0800 i40evf: track outstanding client request The iWarp client cannot continue until this operation has been completed by the PF driver. Sleep (with timeout) until the reply from the PF driver has been received. Change-ID: I5dc41b857bba32d0218b7ce167b5da122dadf349 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 4 ++++ 3 files changed, 6 insertions(+) commit d7ce6422d6e64502d9f6acff9a4466e2ddb64721 Author: Jacob Keller Date: Thu Feb 9 23:29:13 2017 -0800 i40e: don't check params until after checking for client instance We can avoid the minor bit of work by calling check params after we check for the client instance, since we're about to return early in cases where we do not have a client. Change-ID: I56f8ea2ba48d4f571fa331c9ace50819a022fa1c Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87b60cfacf9f17cf71933c6e33b66e68160af71d Author: Eric Dumazet Date: Fri Feb 10 10:31:49 2017 -0800 net_sched: fix error recovery at qdisc creation Dmitry reported uses after free in qdisc code [1] The problem here is that ops->init() can return an error. qdisc_create_dflt() then call ops->destroy(), while qdisc_create() does _not_ call it. Four qdisc chose to call their own ops->destroy(), assuming their caller would not. This patch makes sure qdisc_create() calls ops->destroy() and fixes the four qdisc to avoid double free. [1] BUG: KASAN: use-after-free in mq_destroy+0x242/0x290 net/sched/sch_mq.c:33 at addr ffff8801d415d440 Read of size 8 by task syz-executor2/5030 CPU: 0 PID: 5030 Comm: syz-executor2 Not tainted 4.3.5-smp-DEV #119 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000046 ffff8801b435b870 ffffffff81bbbed4 ffff8801db000400 ffff8801d415d440 ffff8801d415dc40 ffff8801c4988510 ffff8801b435b898 ffffffff816682b1 ffff8801b435b928 ffff8801d415d440 ffff8801c49880c0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0x6c/0x98 lib/dump_stack.c:51 [] kasan_object_err+0x21/0x70 mm/kasan/report.c:158 [] print_address_description mm/kasan/report.c:196 [inline] [] kasan_report_error+0x1b4/0x4b0 mm/kasan/report.c:285 [] kasan_report mm/kasan/report.c:305 [inline] [] __asan_report_load8_noabort+0x43/0x50 mm/kasan/report.c:326 [] mq_destroy+0x242/0x290 net/sched/sch_mq.c:33 [] qdisc_destroy+0x12d/0x290 net/sched/sch_generic.c:953 [] qdisc_create_dflt+0xf0/0x120 net/sched/sch_generic.c:848 [] attach_default_qdiscs net/sched/sch_generic.c:1029 [inline] [] dev_activate+0x6ad/0x880 net/sched/sch_generic.c:1064 [] __dev_open+0x221/0x320 net/core/dev.c:1403 [] __dev_change_flags+0x15e/0x3e0 net/core/dev.c:6858 [] dev_change_flags+0x8e/0x140 net/core/dev.c:6926 [] dev_ifsioc+0x446/0x890 net/core/dev_ioctl.c:260 [] dev_ioctl+0x1ba/0xb80 net/core/dev_ioctl.c:546 [] sock_do_ioctl+0x99/0xb0 net/socket.c:879 [] sock_ioctl+0x2a0/0x390 net/socket.c:958 [] vfs_ioctl fs/ioctl.c:44 [inline] [] do_vfs_ioctl+0x8a8/0xe50 fs/ioctl.c:611 [] SYSC_ioctl fs/ioctl.c:626 [inline] [] SyS_ioctl+0x94/0xc0 fs/ioctl.c:617 [] entry_SYSCALL_64_fastpath+0x12/0x17 Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/sched/sch_api.c | 2 ++ net/sched/sch_hhf.c | 8 ++++++-- net/sched/sch_mq.c | 10 +++------- net/sched/sch_mqprio.c | 19 ++++++------------- net/sched/sch_sfq.c | 3 ++- 5 files changed, 19 insertions(+), 23 deletions(-) commit 1bf960502e4c94425c3a3a985200834fb59839c6 Author: Ivan Khoronzhuk Date: Sat Feb 11 03:49:57 2017 +0200 net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed If skb_padto failed the skb has been dropped already, so it was consumed, but it doesn't mean it was sent, thus no need to update queue tx time, etc. So, return NET_XMIT_DROP as more appropriate. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98eb253cbde7e860fad83fa759058269ca69916d Author: Roopa Prabhu Date: Fri Feb 10 21:38:36 2017 -0800 vxlan: remove vni zero check and drop for COLLECT_METADATA This patch drops the vni zero check for COLLECT_METADATA mode. It is not really needed, vni zero is a valid vni. Fixes: 3ad7a4b141eb ("vxlan: support fdb and learning in COLLECT_METADATA mode" Reported-by: Joe Stringer Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 3 --- 1 file changed, 3 deletions(-) commit c16ec18599c8c1722d476011786fd9e2529888f7 Author: Julian Anastasov Date: Sat Feb 11 13:49:20 2017 +0200 net: rename dst_neigh_output back to neigh_output After the dst->pending_confirm flag was removed, we do not need anymore to provide dst arg to dst_neigh_output. So, rename it to neigh_output as before commit 5110effee8fd ("net: Do delayed neigh confirmation."). Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller drivers/net/vrf.c | 4 ++-- include/net/dst.h | 12 ------------ include/net/neighbour.h | 10 ++++++++++ net/ipv4/ip_output.c | 2 +- net/ipv6/ip6_output.c | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) commit 90d2ea9f66d3f9f96bc0f41d94b4830c0b2d0a50 Author: Edward Cree Date: Fri Feb 10 17:34:59 2017 +0000 sfc: fix swapped arguments to efx_ef10_handle_rx_event_errors Fixes: a0ee35414837 ("sfc: process RX event inner checksum flags") Reported-by: Colin Ian King Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dfcb7a14866b8c34b2d3a74ae31631e1d4e7f591 Merge: 35eeacf 235a9d8 Author: David S. Miller Date: Sat Feb 11 20:59:43 2017 -0500 Merge branch 'ipvtap' Sainath Grandhi says: ==================== Refactor macvtap to re-use tap functionality by other virtual intefaces Tap character devices can be implemented on other virtual interfaces like ipvlan, similar to macvtap. Source code for tap functionality in macvtap can be re-used for this purpose. This patch series splits macvtap source into two modules, macvtap and tap. This patch series also includes a patch for implementing tap character device driver based on the IP-VLAN network interface, called ipvtap. These patches are tested on x86 platform. ==================== Signed-off-by: David S. Miller commit 235a9d89da976e2975b3de9afc0bed7b72557983 Author: Sainath Grandhi Date: Fri Feb 10 16:03:52 2017 -0800 ipvtap: IP-VLAN based tap driver This patch adds a tap character device driver that is based on the IP-VLAN network interface, called ipvtap. An ipvtap device can be created in the same way as an ipvlan device, using 'type ipvtap', and then accessed using the tap user space interface. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/Kconfig | 13 +++ drivers/net/Makefile | 1 + drivers/net/ipvlan/Makefile | 1 + drivers/net/ipvlan/ipvlan.h | 7 ++ drivers/net/ipvlan/ipvlan_core.c | 3 +- drivers/net/ipvlan/ipvlan_main.c | 27 +++-- drivers/net/ipvlan/ipvtap.c | 241 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 280 insertions(+), 13 deletions(-) commit 9a393b5d5988ea4eaa3e0da138321abe0dc03a68 Author: Sainath Grandhi Date: Fri Feb 10 16:03:51 2017 -0800 tap: tap as an independent module This patch makes tap a separate module for other types of virtual interfaces, for example, ipvlan to use. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/Kconfig | 7 ++ drivers/net/Makefile | 3 +- drivers/net/macvtap.c | 249 +++++++++++++++++++++++++++++++++++++++++++++ drivers/net/macvtap_main.c | 249 --------------------------------------------- drivers/net/tap.c | 11 ++ drivers/vhost/Kconfig | 2 +- include/linux/if_tap.h | 4 +- 7 files changed, 271 insertions(+), 254 deletions(-) commit d9f1f61c0801a73ff36d416a7ede54229b231e1d Author: Sainath Grandhi Date: Fri Feb 10 16:03:50 2017 -0800 tap: Extending tap device create/destroy APIs Extending tap APIs get/free_minor and create/destroy_cdev to handle more than one type of virtual interface. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/macvtap_main.c | 6 +-- drivers/net/tap.c | 118 +++++++++++++++++++++++++++++++++++++-------- include/linux/if_tap.h | 4 +- 3 files changed, 102 insertions(+), 26 deletions(-) commit 6fe3faf86757eb7f078ff06b23b206f17dc4fb36 Author: Sainath Grandhi Date: Fri Feb 10 16:03:49 2017 -0800 tap: Abstract type of virtual interface from tap implementation macvlan object is re-structured to hold tap related elements in a separate entity, tap_dev. Upon NETDEV_REGISTER device_event, tap_dev is registered with idr and fetched again on tap_open. Few of the tap functions are modified to accepted tap_dev as argument. tap_dev object includes callbacks to be used by underlying virtual interface to take care of tx and rx accounting. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/macvlan.c | 2 +- drivers/net/macvtap_main.c | 71 +++++++++--- drivers/net/tap.c | 264 ++++++++++++++++++++------------------------- include/linux/if_tap.h | 57 +++++++++- 4 files changed, 229 insertions(+), 165 deletions(-) commit ebc05ba7e8600b52a2a0c87a43105143368aca2a Author: Sainath Grandhi Date: Fri Feb 10 16:03:48 2017 -0800 tap: Tap character device creation/destroy API This patch provides tap device create/destroy APIs in tap.c. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/macvtap_main.c | 30 +++++++--------------- drivers/net/tap.c | 62 ++++++++++++++++++++++++++++++++++++++-------- include/linux/if_tap.h | 3 +++ 3 files changed, 63 insertions(+), 32 deletions(-) commit 635b8c8ecdd27142d7fdab0df334b2e9201481cf Author: Sainath Grandhi Date: Fri Feb 10 16:03:47 2017 -0800 tap: Renaming tap related APIs, data structures, macros Renaming tap related APIs, data structures and macros in tap.c from macvtap_.* to tap_.* Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/macvtap_main.c | 18 +-- drivers/net/tap.c | 332 ++++++++++++++++++++++----------------------- drivers/vhost/net.c | 3 +- include/linux/if_macvlan.h | 17 +-- include/linux/if_macvtap.h | 10 -- include/linux/if_tap.h | 23 ++++ 6 files changed, 202 insertions(+), 201 deletions(-) commit a8e04698732736f59fefe72c675791a006b76e1d Author: Sainath Grandhi Date: Fri Feb 10 16:03:46 2017 -0800 tap: Refactoring macvtap.c macvtap module has code for tap/queue management and link management. This patch splits the code into macvtap_main.c for link management and tap.c for tap/queue management. Functionality in tap.c can be re-used for implementing tap on other virtual interfaces. Signed-off-by: Sainath Grandhi Signed-off-by: David S. Miller drivers/net/Makefile | 2 + drivers/net/macvtap.c | 1374 -------------------------------------------- drivers/net/macvtap_main.c | 218 +++++++ drivers/net/tap.c | 1186 ++++++++++++++++++++++++++++++++++++++ include/linux/if_macvtap.h | 10 + 5 files changed, 1416 insertions(+), 1374 deletions(-) commit b180cf8b0bce3e0e1eb9c5d78bfc9ef2559a0b22 Author: H Hartley Sweeten Date: Fri Feb 10 11:11:57 2017 -0700 rtc: m48t86: add NVRAM support This RTC has 114 bytes of NVRAM. Provide access to it via a binary sysfs 'nvram' attribute file. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 8057c86d43a6579421c97b00c6df1ab0bc5e51a0 Author: H Hartley Sweeten Date: Fri Feb 10 11:11:56 2017 -0700 rtc: m48t86: allow driver to manage its resources Allow this driver to, optionally, manage it's own resources and do the read/write operations if the platform does not provide them. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 153 +++++++++++++++++++++++++++++++---------------- 1 file changed, 102 insertions(+), 51 deletions(-) commit 68b54f477fae4f50a4010a1b5019bd185d452fa7 Author: H Hartley Sweeten Date: Fri Feb 10 11:11:55 2017 -0700 rtc: m48t86: shorten register name defines For aesthetics. Shorten all the register names by removing '_REG' from all of them. This helps fix all the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 127 +++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 64 deletions(-) commit 6db6bd479d4c41de98c6c4f740fbc39e179e4b5f Author: Akinobu Mita Date: Wed Feb 8 04:36:53 2017 +0900 bindings: rtc: correct wrong reference in required properties There are currently two broken bindings descriptions for RTC: maxim,ds3231.txt pcf8563.txt They broke because of a improper RST documentation conversion with commit 8c27ceff3604b2 ("docs: fix locations of several documents that got moved") and now reference to a non-existing file: Documentation/devicetree/bindings/i2c/trivial-admin-guide/devices.rst However, the original reference to i2c/trivial-devices should have never been made in the first place. This change fixes this issue by replacing with correct descriptions. Reported-by: Wolfram Sang Cc: Alexandre Belloni Cc: Heiko Schocher Cc: Rob Herring Signed-off-by: Akinobu Mita Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/maxim,ds3231.txt | 3 ++- Documentation/devicetree/bindings/rtc/pcf8563.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit aaa65a9ce685fcdf37d647ec1ef5afeb3d02c916 Author: Wei Yongjun Date: Thu Feb 9 00:16:13 2017 +0000 rtc: sun6i: Fix return value check in sun6i_rtc_clk_init() In case of error, the function of_io_request_and_map() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") Signed-off-by: Wei Yongjun Acked-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d837bc01c2153565333b2ce71d613b6e7cc761c Author: Bhumika Goyal Date: Sun Feb 12 00:50:18 2017 +0530 clocksource/drivers/arm_arch_timer:: Mark cyclecounter __ro_after_init The object cyclecounter of type cyclecounter is only modified during initialization in arch_counter_register. So it can be marked __ro_after_init. Signed-off-by: Bhumika Goyal Cc: mark.rutland@arm.com Cc: keescook@chromium.org Cc: marc.zyngier@arm.com Cc: daniel.lezcano@linaro.org Cc: julia.lawall@lip6.fr Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1486840818-22214-1-git-send-email-bhumirks@gmail.com Signed-off-by: Thomas Gleixner drivers/clocksource/arm_arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2029b1e47b607619d1dd2cb0bbb77f64ec6b7c2 Author: Srinivas Pandruvada Date: Fri Feb 10 11:38:37 2017 -0800 perf/x86/intel: Add Kaby Lake support Add Kaby Lake mobile and desktop models for RAPL, CSTATE and UNCORE matching Skylake. Signed-off-by: Srinivas Pandruvada Cc: peterz@infradead.org Cc: kan.liang@intel.com Cc: bigeasy@linutronix.de Cc: dave.hansen@linux.intel.com Cc: piotr.luc@intel.com Cc: davidcc@google.com Cc: bp@suse.de Link: http://lkml.kernel.org/r/1486755517-17812-1-git-send-email-srinivas.pandruvada@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/events/intel/cstate.c | 3 +++ arch/x86/events/intel/rapl.c | 3 +++ arch/x86/events/intel/uncore.c | 2 ++ 3 files changed, 8 insertions(+) commit dd905a61e95e057277115888e1b8d5d9070795e1 Author: Ben Gardner Date: Thu Feb 9 11:36:08 2017 -0600 misc: eeprom: at24: use device_property_*() functions instead of of_get_property() Allow the at24 driver to get configuration information from both OF and ACPI by using the more generic device_property functions. This change was inspired by the at25.c driver. I have a custom board with a ST M24C02 EEPROM attached to an I2C bus. With the following ACPI construct, this patch instantiates a working instance of the driver. Device (EEP0) { Name (_HID, "PRP0001") Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"compatible", Package () {"st,24c02"}}, Package () {"pagesize", 16}, }, }) Name (_CRS, ResourceTemplate () { I2cSerialBus ( 0x0057, ControllerInitiated, 400000, AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00, ResourceConsumer,,) }) } Signed-off-by: Ben Gardner Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/misc/eeprom/at24.c | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit b96dea60bc1a1d2f3991457397f833033bfbd988 Merge: 9d3352a 6a6e1d5 Author: Greg Kroah-Hartman Date: Sat Feb 11 16:46:03 2017 +0100 Merge tag 'iio-fixes-for-4.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of IIO fixes for the 4.11 cycle. Regression fixes from 4.10. These are fixes that came in just to late for the 4.10 cycle. Two drivers made an accidental assumption of structure arrangement for struct iio_dev that are no longer true. It was a typo in the first place that happened to work until some elements were added to the structure. * mpl3115 - don't rely on structure field ordering * mpl115 - don't rely on structure field ordering. commit 9d12ba86f818aa9cfe9f01b750336aa441f2ffa2 Author: Rob Rice Date: Fri Feb 3 12:55:33 2017 -0500 crypto: brcm - Add Broadcom SPU driver Add Broadcom Secure Processing Unit (SPU) crypto driver for SPU hardware crypto offload. The driver supports ablkcipher, ahash, and aead symmetric crypto operations. Signed-off-by: Steve Lin Signed-off-by: Rob Rice Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 15 + drivers/crypto/Makefile | 1 + drivers/crypto/bcm/Makefile | 15 + drivers/crypto/bcm/cipher.c | 4964 +++++++++++++++++++++++++++++++++++++++++++ drivers/crypto/bcm/cipher.h | 483 +++++ drivers/crypto/bcm/spu.c | 1251 +++++++++++ drivers/crypto/bcm/spu.h | 287 +++ drivers/crypto/bcm/spu2.c | 1401 ++++++++++++ drivers/crypto/bcm/spu2.h | 228 ++ drivers/crypto/bcm/spum.h | 174 ++ drivers/crypto/bcm/util.c | 581 +++++ drivers/crypto/bcm/util.h | 116 + 12 files changed, 9516 insertions(+) commit 206dc4fc27be61732db4800f78c7c3ef74d6441e Author: Rob Rice Date: Fri Feb 3 12:55:32 2017 -0500 crypto: brcm - DT documentation for Broadcom SPU hardware Device tree documentation for Broadcom Secure Processing Unit (SPU) crypto hardware. Signed-off-by: Steve Lin Signed-off-by: Rob Rice Acked-by: Rob Herring Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/brcm,spu-crypto.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 62ad8b5c09641d385a0bfdb58b5e0eb7f3c5015e Author: George Cherian Date: Tue Feb 7 14:51:15 2017 +0000 crypto: cavium - Enable CPT options crypto for build Add the CPT options in crypto Kconfig and update the crypto Makefile Update the MAINTAINERS file too. Signed-off-by: George Cherian Reviewed-by: David Daney Signed-off-by: Herbert Xu MAINTAINERS | 7 +++++++ drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + 3 files changed, 9 insertions(+) commit c694b233295b99c33dd5ac28aede9f171f5a6862 Author: George Cherian Date: Tue Feb 7 14:51:14 2017 +0000 crypto: cavium - Add the Virtual Function driver for CPT Enable the CPT VF driver. CPT is the cryptographic Acceleration Unit in Octeon-tx series of processors. Signed-off-by: George Cherian Reviewed-by: David Daney Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/Makefile | 3 +- drivers/crypto/cavium/cpt/cptvf.h | 135 ++++ drivers/crypto/cavium/cpt/cptvf_algs.c | 444 +++++++++++++ drivers/crypto/cavium/cpt/cptvf_algs.h | 113 ++++ drivers/crypto/cavium/cpt/cptvf_main.c | 936 +++++++++++++++++++++++++++ drivers/crypto/cavium/cpt/cptvf_mbox.c | 211 ++++++ drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 593 +++++++++++++++++ drivers/crypto/cavium/cpt/request_manager.h | 147 +++++ 8 files changed, 2581 insertions(+), 1 deletion(-) commit 9e2c7d99941d000a36f68a3594cec27a1bbea274 Author: George Cherian Date: Tue Feb 7 14:51:13 2017 +0000 crypto: cavium - Add Support for Octeon-tx CPT Engine Enable the Physical Function driver for the Cavium Crypto Engine (CPT) found in Octeon-tx series of SoC's. CPT is the Cryptographic Accelaration Unit. CPT includes microcoded GigaCypher symmetric engines (SEs) and asymmetric engines (AEs). Signed-off-by: George Cherian Reviewed-by: David Daney Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/Kconfig | 16 + drivers/crypto/cavium/cpt/Makefile | 2 + drivers/crypto/cavium/cpt/cpt_common.h | 158 +++++++ drivers/crypto/cavium/cpt/cpt_hw_types.h | 658 ++++++++++++++++++++++++++++ drivers/crypto/cavium/cpt/cptpf.h | 69 +++ drivers/crypto/cavium/cpt/cptpf_main.c | 708 +++++++++++++++++++++++++++++++ drivers/crypto/cavium/cpt/cptpf_mbox.c | 163 +++++++ 7 files changed, 1774 insertions(+) commit 87f3d0887c9cc63d7b8e7b0b7e5a48dca8cc8564 Author: David Daney Date: Mon Feb 6 14:28:46 2017 -0800 hwrng: cavium - Use per device name to allow for multiple devices. Systems containing the Cavium HW RNG may have one device per NUMA node. A typical configuration is a 2-node NUMA system, which results in 2 RNG devices. The hwrng subsystem refuses (and rightly so) to register more than one device with he same name, so we get failure messages on these systems. Make the hwrng name unique by including the underlying device name. Also remove spaces from the name to make it possible to switch devices via the sysfs knobs. Signed-off-by: David Daney Signed-off-by: Herbert Xu drivers/char/hw_random/cavium-rng-vf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4c147bcff52b582cd278f39261302a4659da3fef Author: Arnd Bergmann Date: Mon Feb 6 13:32:16 2017 +0100 crypto: atmel - fix 64-bit build warnings When we enable COMPILE_TEST building for the Atmel sha and tdes implementations, we run into a couple of warnings about incorrect format strings, e.g. In file included from include/linux/platform_device.h:14:0, from drivers/crypto/atmel-sha.c:24: drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu': drivers/crypto/atmel-sha.c:571:19: error: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Werror=format=] In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-tdes.c:17: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop': include/linux/kern_levels.h:4:18: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Werror=format=] These are all fixed by using the "%z" modifier for size_t data. There are also a few uses of min()/max() with incompatible types: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start': drivers/crypto/atmel-tdes.c:528:181: error: comparison of distinct pointer types lacks a cast [-Werror] Where possible, we should use consistent types here, otherwise we can use min_t()/max_t() to get well-defined behavior without a warning. Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 16 ++++++++-------- drivers/crypto/atmel-tdes.c | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) commit ceb4afb3086ab08f0d1d9cb3da536a18ea2e5918 Author: Arnd Bergmann Date: Mon Feb 6 13:32:15 2017 +0100 crypto: atmel - refine Kconfig dependencies With the new authenc support, we get a harmless Kconfig warning: warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91) The problem is that each of the options has slightly different dependencies, although they all seem to want the same thing: allow building for real AT91 targets that actually have the hardware, and possibly for compile testing. This makes all four options consistent: instead of depending on a particular dmaengine implementation, we depend on the ARM platform, CONFIG_COMPILE_TEST as an alternative when that is turned off. This makes the 'select' statements work correctly. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit db91af0fbe20474cec33263e28d15f5e6b45ebc9 Author: Ard Biesheuvel Date: Sun Feb 5 10:06:12 2017 +0000 crypto: algapi - make crypto_xor() and crypto_inc() alignment agnostic Instead of unconditionally forcing 4 byte alignment for all generic chaining modes that rely on crypto_xor() or crypto_inc() (which may result in unnecessary copying of data when the underlying hardware can perform unaligned accesses efficiently), make those functions deal with unaligned input explicitly, but only if the Kconfig symbol HAVE_EFFICIENT_UNALIGNED_ACCESS is set. This will allow us to drop the alignmasks from the CBC, CMAC, CTR, CTS, PCBC and SEQIV drivers. For crypto_inc(), this simply involves making the 4-byte stride conditional on HAVE_EFFICIENT_UNALIGNED_ACCESS being set, given that it typically operates on 16 byte buffers. For crypto_xor(), an algorithm is implemented that simply runs through the input using the largest strides possible if unaligned accesses are allowed. If they are not, an optimal sequence of memory accesses is emitted that takes the relative alignment of the input buffers into account, e.g., if the relative misalignment of dst and src is 4 bytes, the entire xor operation will be completed using 4 byte loads and stores (modulo unaligned bits at the start and end). Note that all expressions involving misalign are simply eliminated by the compiler when HAVE_EFFICIENT_UNALIGNED_ACCESS is defined. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/algapi.c | 68 ++++++++++++++++++++++++++++++++++++------------- crypto/cbc.c | 3 --- crypto/cmac.c | 3 +-- crypto/ctr.c | 2 +- crypto/cts.c | 3 --- crypto/pcbc.c | 3 --- crypto/seqiv.c | 2 -- include/crypto/algapi.h | 20 +++++++++++++-- 8 files changed, 70 insertions(+), 34 deletions(-) commit 7d6e9105026788c497f0ab32fa16c82f4ab5ff61 Author: Arnd Bergmann Date: Fri Feb 3 23:33:23 2017 +0100 crypto: improve gcc optimization flags for serpent and wp512 An ancient gcc bug (first reported in 2003) has apparently resurfaced on MIPS, where kernelci.org reports an overly large stack frame in the whirlpool hash algorithm: crypto/wp512.c:987:1: warning: the frame size of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=] With some testing in different configurations, I'm seeing large variations in stack frames size up to 1500 bytes for what should have around 300 bytes at most. I also checked the reference implementation, which is essentially the same code but also comes with some test and benchmarking infrastructure. It seems that recent compiler versions on at least arm, arm64 and powerpc have a partial fix for this problem, but enabling "-fsched-pressure", but even with that fix they suffer from the issue to a certain degree. Some testing on arm64 shows that the time needed to hash a given amount of data is roughly proportional to the stack frame size here, which makes sense given that the wp512 implementation is doing lots of loads for table lookups, and the problem with the overly large stack is a result of doing a lot more loads and stores for spilled registers (as seen from inspecting the object code). Disabling -fschedule-insns consistently fixes the problem for wp512, in my collection of cross-compilers, the results are consistently better or identical when comparing the stack sizes in this function, though some architectures (notable x86) have schedule-insns disabled by default. The four columns are: default: -O2 press: -O2 -fsched-pressure nopress: -O2 -fschedule-insns -fno-sched-pressure nosched: -O2 -no-schedule-insns (disables sched-pressure) default press nopress nosched alpha-linux-gcc-4.9.3 1136 848 1136 176 am33_2.0-linux-gcc-4.9.3 2100 2076 2100 2104 arm-linux-gnueabi-gcc-4.9.3 848 848 1048 352 cris-linux-gcc-4.9.3 272 272 272 272 frv-linux-gcc-4.9.3 1128 1000 1128 280 hppa64-linux-gcc-4.9.3 1128 336 1128 184 hppa-linux-gcc-4.9.3 644 308 644 276 i386-linux-gcc-4.9.3 352 352 352 352 m32r-linux-gcc-4.9.3 720 656 720 268 microblaze-linux-gcc-4.9.3 1108 604 1108 256 mips64-linux-gcc-4.9.3 1328 592 1328 208 mips-linux-gcc-4.9.3 1096 624 1096 240 powerpc64-linux-gcc-4.9.3 1088 432 1088 160 powerpc-linux-gcc-4.9.3 1080 584 1080 224 s390-linux-gcc-4.9.3 456 456 624 360 sh3-linux-gcc-4.9.3 292 292 292 292 sparc64-linux-gcc-4.9.3 992 240 992 208 sparc-linux-gcc-4.9.3 680 592 680 312 x86_64-linux-gcc-4.9.3 224 240 272 224 xtensa-linux-gcc-4.9.3 1152 704 1152 304 aarch64-linux-gcc-7.0.0 224 224 1104 208 arm-linux-gnueabi-gcc-7.0.1 824 824 1048 352 mips-linux-gcc-7.0.0 1120 648 1120 272 x86_64-linux-gcc-7.0.1 240 240 304 240 arm-linux-gnueabi-gcc-4.4.7 840 392 arm-linux-gnueabi-gcc-4.5.4 784 728 784 320 arm-linux-gnueabi-gcc-4.6.4 736 728 736 304 arm-linux-gnueabi-gcc-4.7.4 944 784 944 352 arm-linux-gnueabi-gcc-4.8.5 464 464 760 352 arm-linux-gnueabi-gcc-4.9.3 848 848 1048 352 arm-linux-gnueabi-gcc-5.3.1 824 824 1064 336 arm-linux-gnueabi-gcc-6.1.1 808 808 1056 344 arm-linux-gnueabi-gcc-7.0.1 824 824 1048 352 Trying the same test for serpent-generic, the picture is a bit different, and while -fno-schedule-insns is generally better here than the default, -fsched-pressure wins overall, so I picked that instead. default press nopress nosched alpha-linux-gcc-4.9.3 1392 864 1392 960 am33_2.0-linux-gcc-4.9.3 536 524 536 528 arm-linux-gnueabi-gcc-4.9.3 552 552 776 536 cris-linux-gcc-4.9.3 528 528 528 528 frv-linux-gcc-4.9.3 536 400 536 504 hppa64-linux-gcc-4.9.3 524 208 524 480 hppa-linux-gcc-4.9.3 768 472 768 508 i386-linux-gcc-4.9.3 564 564 564 564 m32r-linux-gcc-4.9.3 712 576 712 532 microblaze-linux-gcc-4.9.3 724 392 724 512 mips64-linux-gcc-4.9.3 720 384 720 496 mips-linux-gcc-4.9.3 728 384 728 496 powerpc64-linux-gcc-4.9.3 704 304 704 480 powerpc-linux-gcc-4.9.3 704 296 704 480 s390-linux-gcc-4.9.3 560 560 592 536 sh3-linux-gcc-4.9.3 540 540 540 540 sparc64-linux-gcc-4.9.3 544 352 544 496 sparc-linux-gcc-4.9.3 544 344 544 496 x86_64-linux-gcc-4.9.3 528 536 576 528 xtensa-linux-gcc-4.9.3 752 544 752 544 aarch64-linux-gcc-7.0.0 432 432 656 480 arm-linux-gnueabi-gcc-7.0.1 616 616 808 536 mips-linux-gcc-7.0.0 720 464 720 488 x86_64-linux-gcc-7.0.1 536 528 600 536 arm-linux-gnueabi-gcc-4.4.7 592 440 arm-linux-gnueabi-gcc-4.5.4 776 448 776 544 arm-linux-gnueabi-gcc-4.6.4 776 448 776 544 arm-linux-gnueabi-gcc-4.7.4 768 448 768 544 arm-linux-gnueabi-gcc-4.8.5 488 488 776 544 arm-linux-gnueabi-gcc-4.9.3 552 552 776 536 arm-linux-gnueabi-gcc-5.3.1 552 552 776 536 arm-linux-gnueabi-gcc-6.1.1 560 560 776 536 arm-linux-gnueabi-gcc-7.0.1 616 616 808 536 I did not do any runtime tests with serpent, so it is possible that stack frame size does not directly correlate with runtime performance here and it actually makes things worse, but it's more likely to help here, and the reduced stack frame size is probably enough reason to apply the patch, especially given that the crypto code is often used in deep call chains. Link: https://kernelci.org/build/id/58797d7559b5149efdf6c3a9/logs/ Link: http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11488 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 Cc: Ralf Baechle Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu crypto/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 4860620da7e5752d916737472c40be573aec1869 Author: Ard Biesheuvel Date: Fri Feb 3 14:49:37 2017 +0000 crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver On ARMv8 implementations that do not support the Crypto Extensions, such as the Raspberry Pi 3, the CCM driver falls back to the generic table based AES implementation to perform the MAC part of the algorithm, which is slow and not time invariant. So add a CBCMAC implementation to the shared glue code between NEON AES and Crypto Extensions AES, so that it can be used instead now that the CCM driver has been updated to look for CBCMAC implementations other than the one it supplies itself. Also, given how these algorithms mostly only differ in the way the key handling and the final encryption are implemented, expose CMAC and XCBC algorithms as well based on the same core update code. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 240 +++++++++++++++++++++++++++++++++++++++++- arch/arm64/crypto/aes-modes.S | 29 ++++- 2 files changed, 267 insertions(+), 2 deletions(-) commit f15f05b0a5de667c821a9727c33bce9d1d9b26dd Author: Ard Biesheuvel Date: Fri Feb 3 14:49:36 2017 +0000 crypto: ccm - switch to separate cbcmac driver Update the generic CCM driver to defer CBC-MAC processing to a dedicated CBC-MAC ahash transform rather than open coding this transform (and much of the associated scatterwalk plumbing) in the CCM driver itself. This cleans up the code considerably, but more importantly, it allows the use of alternative CBC-MAC implementations that don't suffer from performance degradation due to significant setup time (e.g., the NEON based AES code needs to enable/disable the NEON, and load the S-box into 16 SIMD registers, which cannot be amortized over the entire input when using the cipher interface) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/Kconfig | 1 + crypto/ccm.c | 381 ++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 245 insertions(+), 137 deletions(-) commit 092acf069813a7a07371de0d05010de80d8e613b Author: Ard Biesheuvel Date: Fri Feb 3 14:49:35 2017 +0000 crypto: testmgr - add test cases for cbcmac(aes) In preparation of splitting off the CBC-MAC transform in the CCM driver into a separate algorithm, define some test cases for the AES incarnation of cbcmac. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.c | 7 +++++++ crypto/testmgr.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit b5e0b032b6c31c052ee0132ee70b155c22cf7b28 Author: Ard Biesheuvel Date: Thu Feb 2 16:37:40 2017 +0000 crypto: aes - add generic time invariant AES cipher Lookup table based AES is sensitive to timing attacks, which is due to the fact that such table lookups are data dependent, and the fact that 8 KB worth of tables covers a significant number of cachelines on any architecture, resulting in an exploitable correlation between the key and the processing time for known plaintexts. For network facing algorithms such as CTR, CCM or GCM, this presents a security risk, which is why arch specific AES ports are typically time invariant, either through the use of special instructions, or by using SIMD algorithms that don't rely on table lookups. For generic code, this is difficult to achieve without losing too much performance, but we can improve the situation significantly by switching to an implementation that only needs 256 bytes of table data (the actual S-box itself), which can be prefetched at the start of each block to eliminate data dependent latencies. This code encrypts at ~25 cycles per byte on ARM Cortex-A57 (while the ordinary generic AES driver manages 18 cycles per byte on this hardware). Decryption is substantially slower. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/Kconfig | 17 +++ crypto/Makefile | 1 + crypto/aes_ti.c | 375 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) commit ec38a9376163f9f7cb671e49b7667129c7bb8f8b Author: Ard Biesheuvel Date: Thu Feb 2 15:58:57 2017 +0000 crypto: aes-generic - drop alignment requirement The generic AES code exposes a 32-bit align mask, which forces all users of the code to use temporary buffers or take other measures to ensure the alignment requirement is adhered to, even on architectures that don't care about alignment for software algorithms such as this one. So drop the align mask, and fix the code to use get_unaligned_le32() where appropriate, which will resolve to whatever is optimal for the architecture. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/aes_generic.c | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit c459bd7beda0295ea67db0ce2004a49addb2f765 Author: Tim Chen Date: Wed Feb 1 10:45:02 2017 -0800 crypto: sha512-mb - Protect sha512 mb ctx mgr access The flusher and regular multi-buffer computation via mcryptd may race with another. Add here a lock and turn off interrupt to to access multi-buffer computation state cstate->mgr before a round of computation. This should prevent the flusher code jumping in. Signed-off-by: Tim Chen Signed-off-by: Herbert Xu arch/x86/crypto/sha512-mb/sha512_mb.c | 64 +++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 22 deletions(-) commit 5d3d9c8bda2c74b13185704e504cdf0aa5210723 Author: Ard Biesheuvel Date: Wed Feb 1 15:35:40 2017 +0000 crypto: arm64/crc32 - merge CRC32 and PMULL instruction based drivers The PMULL based CRC32 implementation already contains code based on the separate, optional CRC32 instructions to fallback to when operating on small quantities of data. We can expose these routines directly on systems that lack the 64x64 PMULL instructions but do implement the CRC32 ones, which makes the driver that is based solely on those CRC32 instructions redundant. So remove it. Note that this aligns arm64 with ARM, whose accelerated CRC32 driver also combines the CRC32 extension based and the PMULL based versions. Signed-off-by: Ard Biesheuvel Tested-by: Matthias Brugger Signed-off-by: Herbert Xu arch/arm64/configs/defconfig | 1 - arch/arm64/crypto/Kconfig | 9 +- arch/arm64/crypto/Makefile | 4 - arch/arm64/crypto/crc32-arm64.c | 290 -------------------------------------- arch/arm64/crypto/crc32-ce-glue.c | 49 +++++-- 5 files changed, 41 insertions(+), 312 deletions(-) commit ca8d8e03b4c9ad447d1e882cc8014e538f653018 Author: William Breathitt Gray Date: Thu Feb 9 10:03:41 2017 -0500 iio: 104-quad-8: Fix off-by-one error when addressing flag register The flag register is offset by 1 from the respective channel data register. This patch fixes an off-by-one error when attempting to read a channel flag register where the base address was not properly offset. Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8") Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/counter/104-quad-8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a6e1d56a0769795a36c0461c64bf5e5b9bbb4c0 Author: Peter Rosin Date: Wed Feb 1 21:40:57 2017 +0100 iio: pressure: mpl115: do not rely on structure field ordering Fixes a regression triggered by a change in the layout of struct iio_chan_spec, but the real bug is in the driver which assumed a specific structure layout in the first place. Hint: the three bits were not OR:ed together as implied by the indentation prior to this patch, there was a comma between the first two, which accidentally moved the ..._SCALE and ..._OFFSET bits to the next structure field. That field was .info_mask_shared_by_type before the _available attributes was added by commit 51239600074b ("iio:core: add a callback to allow drivers to provide _available attributes") and .info_mask_separate_available afterwards, and the regression happened. info_mask_shared_by_type is actually a better choice than the originally intended info_mask_separate for the ..._SCALE and ..._OFFSET bits since a constant is returned from mpl115_read_raw for the scale/offset. Using info_mask_shared_by_type also preserves the behavior from before the regression and is therefore less likely to cause other interesting side effects. The above mentioned regression causes unintended sysfs attibutes to show up that are not backed by code, in turn causing a NULL pointer defererence to happen on access. Fixes: 3017d90e8931 ("iio: Add Freescale MPL115A2 pressure / temperature sensor driver") Fixes: 51239600074b ("iio:core: add a callback to allow drivers to provide _available attributes") Signed-off-by: Peter Rosin Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl115.c | 1 + 1 file changed, 1 insertion(+) commit 9cf6cdba586ced75c69b8314b88b2d2f5ce9b3ed Author: Peter Rosin Date: Wed Feb 1 21:40:56 2017 +0100 iio: pressure: mpl3115: do not rely on structure field ordering Fixes a regression triggered by a change in the layout of struct iio_chan_spec, but the real bug is in the driver which assumed a specific structure layout in the first place. Hint: the two bits were not OR:ed together as implied by the indentation prior to this patch, there was a comma between them, which accidentally moved the ..._SCALE bit to the next structure field. That field was .info_mask_shared_by_type before the _available attributes was added by commit 51239600074b ("iio:core: add a callback to allow drivers to provide _available attributes") and .info_mask_separate_available afterwards, and the regression happened. info_mask_shared_by_type is actually a better choice than the originally intended info_mask_separate for the ..._SCALE bit since a constant is returned from mpl3115_read_raw for the scale. Using info_mask_shared_by_type also preserves the behavior from before the regression and is therefore less likely to cause other interesting side effects. The above mentioned regression causes an unintended sysfs attibute to show up that is not backed by code, in turn causing the following NULL pointer defererence to happen on access. Segmentation fault Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ecc3c000 [00000000] *pgd=87f91831 Internal error: Oops: 80000007 [#1] SMP ARM Modules linked in: CPU: 1 PID: 1051 Comm: cat Not tainted 4.10.0-rc5-00009-gffd8858-dirty #3 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: ed54ec00 task.stack: ee2bc000 PC is at 0x0 LR is at iio_read_channel_info_avail+0x40/0x280 pc : [<00000000>] lr : [] psr: a0070013 sp : ee2bdda8 ip : 00000000 fp : ee2bddf4 r10: c0a53c74 r9 : ed79f000 r8 : ee8d1018 r7 : 00001000 r6 : 00000fff r5 : ee8b9a00 r4 : ed79f000 r3 : ee2bddc4 r2 : ee2bddbc r1 : c0a86dcc r0 : ee8d1000 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 3cc3c04a DAC: 00000051 Process cat (pid: 1051, stack limit = 0xee2bc210) Stack: (0xee2bdda8 to 0xee2be000) dda0: ee2bddc0 00000002 c016d720 c016d394 ed54ec00 00000000 ddc0: 60070013 ed413780 00000001 edffd480 ee8b9a00 00000fff 00001000 ee8d1018 dde0: ed79f000 c0a53c74 ee2bde0c ee2bddf8 c0513c58 c06fbbe8 edffd480 edffd540 de00: ee2bde3c ee2bde10 c0293474 c0513c40 c02933e4 ee2bde60 00000001 ed413780 de20: 00000001 ed413780 00000000 edffd480 ee2bde4c ee2bde40 c0291d00 c02933f0 de40: ee2bde9c ee2bde50 c024679c c0291ce0 edffd4b0 b6e37000 00020000 ee2bdf78 de60: 00000000 00000000 ed54ec00 ed013200 00000817 c0a111fc edffd540 ed413780 de80: b6e37000 00020000 00020000 ee2bdf78 ee2bded4 ee2bdea0 c0292890 c0246604 dea0: c0117940 c016ba50 00000025 c0a111fc b6e37000 ed413780 ee2bdf78 00020000 dec0: ee2bc000 b6e37000 ee2bdf44 ee2bded8 c021d158 c0292770 c0117764 b6e36004 dee0: c0f0d7c4 ee2bdfb0 b6f89228 00021008 ee2bdfac ee2bdf00 c0101374 c0117770 df00: 00000000 00000000 ee2bc000 00000000 ee2bdf34 ee2bdf20 c016ba04 c0171080 df20: 00000000 00020000 ed413780 b6e37000 00000000 ee2bdf78 ee2bdf74 ee2bdf48 df40: c021e7a0 c021d130 c023e300 c023e280 ee2bdf74 00000000 00000000 ed413780 df60: ed413780 00020000 ee2bdfa4 ee2bdf78 c021e870 c021e71c 00000000 00000000 df80: 00020000 00020000 b6e37000 00000003 c0108084 00000000 00000000 ee2bdfa8 dfa0: c0107ee0 c021e838 00020000 00020000 00000003 b6e37000 00020000 0001a2b4 dfc0: 00020000 00020000 b6e37000 00000003 7fffe000 00000000 00000000 00020000 dfe0: 00000000 be98eb4c 0000c740 b6f1985c 60070010 00000003 00000000 00000000 Backtrace: [] (iio_read_channel_info_avail) from [] (dev_attr_show+0x24/0x50) r10:c0a53c74 r9:ed79f000 r8:ee8d1018 r7:00001000 r6:00000fff r5:ee8b9a00 r4:edffd480 [] (dev_attr_show) from [] (sysfs_kf_seq_show+0x90/0x110) r5:edffd540 r4:edffd480 [] (sysfs_kf_seq_show) from [] (kernfs_seq_show+0x2c/0x30) r10:edffd480 r9:00000000 r8:ed413780 r7:00000001 r6:ed413780 r5:00000001 r4:ee2bde60 r3:c02933e4 [] (kernfs_seq_show) from [] (seq_read+0x1a4/0x4e0) [] (seq_read) from [] (kernfs_fop_read+0x12c/0x1cc) r10:ee2bdf78 r9:00020000 r8:00020000 r7:b6e37000 r6:ed413780 r5:edffd540 r4:c0a111fc [] (kernfs_fop_read) from [] (__vfs_read+0x34/0x118) r10:b6e37000 r9:ee2bc000 r8:00020000 r7:ee2bdf78 r6:ed413780 r5:b6e37000 r4:c0a111fc [] (__vfs_read) from [] (vfs_read+0x90/0x11c) r8:ee2bdf78 r7:00000000 r6:b6e37000 r5:ed413780 r4:00020000 [] (vfs_read) from [] (SyS_read+0x44/0x90) r8:00020000 r7:ed413780 r6:ed413780 r5:00000000 r4:00000000 [] (SyS_read) from [] (ret_fast_syscall+0x0/0x1c) r10:00000000 r8:c0108084 r7:00000003 r6:b6e37000 r5:00020000 r4:00020000 Code: bad PC value ---[ end trace 9c4938ccd0389004 ]--- Fixes: cc26ad455f57 ("iio: Add Freescale MPL3115A2 pressure / temperature sensor driver") Fixes: 51239600074b ("iio:core: add a callback to allow drivers to provide _available attributes") Reported-by: Ken Lin Tested-by: Ken Lin Signed-off-by: Peter Rosin Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl3115.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35eeacf1820a08305c2b0960febfa190f5a6dd63 Merge: bed45f7 1ee1832 Author: David S. Miller Date: Sat Feb 11 02:31:11 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 87d08b11b1616cbc70c28c9d3601bd1a3642bae5 Author: Christian Lamparter Date: Fri Feb 10 17:12:29 2017 +0100 devicetree: add lm90 thermal_zone sensor support This patch updates the LM90's devicetree definition to include the #thermal-sensor-cells property as well as the sensor constants in include/dt-bindings/thermal/lm90.h. Cc: Wei Ni Acked-by: Rob Herring Signed-off-by: Christian Lamparter Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/lm90.txt | 6 ++++++ MAINTAINERS | 1 + include/dt-bindings/thermal/lm90.h | 12 ++++++++++++ 3 files changed, 19 insertions(+) commit e531ffc0ff796eca578367b1924b03103abdcca4 Author: Guenter Roeck Date: Wed Feb 8 15:10:27 2017 -0800 hwmon: (it87) Add support for IT8792E The chip is similar to IT8732E, but supports only three fans and pwm outputs instead of four (the driver currently does not support the 4th fan and pwm output of IT8732E). Note that the chip ID is 0x8733, not 0x8792 as one would expect. Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 4c7b8ca1ae5ed9e27014732c8a918ba11a86cf09 Author: Guenter Roeck Date: Wed Feb 8 14:07:42 2017 -0800 hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers In IT8620E, after setting pwm control to manual, it was observed that pwm values for fan 4..6 have reversed results (writing 0 results in fans running at full speed, writing 255 results in fans turned off). With the new PWM control, pwm polarity for pwm control 4..6 is specified in its pwm control registers. Those registers are overwritten when setting the pwm mode or the temperature mapping. Do not touch bit 2..6 of pwm control registers on register writes to fix the problem. Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit d66777caa57ffade6061782f3a4d4056f0b0c1ac Author: Guenter Roeck Date: Wed Feb 8 14:05:56 2017 -0800 hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628 pwm4 is enabled if bit 2 of GPIO control register 4 is disabled, not when it is enabled. Since the check is for the skip condition, it is reversed. This applies to both IT8620 and IT8628. Fixes: 36c4d98a7883d ("hwmon: (it87) Add support for all pwm channels ...") Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82dbe987b70042b340f851bdc969a971081e5f02 Author: Guenter Roeck Date: Wed Feb 8 14:02:59 2017 -0800 hwmon: (it87) Ensure that pwm control cache is current before updating values If sensor attributes were never read, the pwm control data has not been initiialized, which can cause wrong driver behavior. Ensure that cached data is current before acting on it. Cc: stable@vger.kernel.org # 4.4+ Reported-by: Kevin Folz Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 2 ++ 1 file changed, 2 insertions(+) commit 638c1c07f99b752c14502009b50ffe4dd4de5ae2 Author: Guenter Roeck Date: Wed Feb 8 14:00:21 2017 -0800 hwmon: (it87) Improve IT8622 support Configuration registers on ITE8622 are different to 8620 and 8628 and require special handling. Also, the chip supports up to 5 pwm controls. Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 67 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 8 deletions(-) commit 8af1abae7275026ae18a8b10084c4410accdb1f0 Author: Guenter Roeck Date: Wed Feb 8 13:52:57 2017 -0800 hwmon: (it87) Add support for IT8622E IT8622E is similar to IT8620E, but only supports five pwm controls and five fan tachometers. Originally-from: Kevin Folz . Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a9eebd4f28ae47b07cce8db16c80ab02fb99ebfc Author: Guenter Roeck Date: Wed Feb 8 13:51:16 2017 -0800 hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5V On IT8622E and IT8628E, VIN3 is expected to be connected to +5V. Add feature flag and reflect in input label. Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5ff22646d246e23bf8056c63bed6aaf9fd22ed12 Author: Peter Zijlstra Date: Wed Feb 8 15:48:01 2017 +0100 module: Optimize search_module_extables() While looking through the __ex_table stuff I found that we do a linear lookup of the module. Also fix up a comment. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Signed-off-by: Jessica Yu kernel/module.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 0fc1223f0e77a748f7040562faaa7027f7db71ca Author: Rajat Jain Date: Mon Jan 2 22:34:10 2017 -0800 PCI/ASPM: Add L1 substate capability structure register definitions Add L1 substate capability structure register definitions for use in subsequent patches. See the PCIe r3.1 spec, sec 7.33. [bhelgaas: add PCIe spec reference] Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas include/uapi/linux/pci_regs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c10c8f7c27103bd7ac02d041d9d6e97296d48fc1 Author: Alex Deucher Date: Fri Feb 10 18:09:32 2017 -0500 drm/amdgpu/pm: check for headless before calling compute_clocks Don't update display bandwidth on headless asics. bug: https://bugs.freedesktop.org/show_bug.cgi?id=99387 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3278478084747c02725ba804d672235f2ba56bbc Author: Niyas Ahmed S T Date: Wed Feb 1 10:13:06 2017 +0530 PCI: exynos: Refactor to make it easier to support other SoCs Currently the Exynos PCIe driver only supports the Exynos5440 SoC. Refactor the driver to allow support for other Exynos SoC. Following are the main changes in this patch: 1) Add separate structs for memory, clock resources Future Exynos SoC will have different hardware resources such as iomem, clocks, regmap handles, etc., so keeping these resources in separate structs will let us initialize them via per-SoC ops and avoid littering the code with of_machine_is_compatible(). 2) Add exynos_pcie_ops struct which will allow us to support the differences in resources in different Exynos SoC. No functional change intended. Signed-off-by: Niyas Ahmed S T Signed-off-by: Pankaj Dubey Signed-off-by: Bjorn Helgaas Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Alim Akhtar Reviewed-by: Jaehoon Chung Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 346 ++++++++++++++++++++++++++---------------- 1 file changed, 217 insertions(+), 129 deletions(-) commit 948b7620c15411444167a62cfc14cdd4b0e44682 Author: Dennis Chen Date: Thu Dec 1 10:15:04 2016 +0800 PCI/MSI: Return -ENOSPC if pci_enable_msi_range() can't get enough vectors If device doesn't support as many MSI vectors as the driver requested, we previously returned -EINVAL from __pci_enable_msi_range() and pci_enable_msi_range(). In other similar situations in both __pci_enable_msi_range() and __pci_enable_msix_range(), we returned -ENOSPC. Return -ENOSPC from __pci_enable_msi_range() so we do it consistently. [bhelgaas: changelog] Signed-off-by: Dennis Chen Signed-off-by: Bjorn Helgaas CC: Tejun Heo CC: Christoph Hellwig CC: Tom Long Nguyen CC: Greg Kroah-Hartman CC: Marc Zyngier CC: Lorenzo Pieralisi CC: Steve Capper drivers/pci/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3674cc49da9a8fc55bf1dec2ab03a66c77f2dcdf Author: Christoph Hellwig Date: Wed Feb 1 14:41:43 2017 +0100 PCI/portdrv: Use pci_irq_alloc_vectors() Use pci_irq_alloc_vectors() and greatly simplify the code by managing the vector number for the subservices directly. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/pcie/portdrv_core.c | 161 ++++++++++++---------------------------- 1 file changed, 48 insertions(+), 113 deletions(-) commit 862290f9e23c39051e59bf12ce65707a8ec8b911 Author: Christoph Hellwig Date: Wed Feb 1 14:41:42 2017 +0100 PCI/MSI: Check that we have a legacy interrupt line before using it It seems like there are some devices (e.g. the PCIe root port driver) that may not always have a INTx interrupt. Check for dev->irq before returning a legacy interrupt in pci_irq_alloc_vectors to properly handle this case. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/msi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f1d722b607d610b66785f7f00d2e1d457260647c Author: Shawn Lin Date: Fri Feb 10 14:52:02 2017 +0800 PCI: rockchip: Fix rockchip_pcie_probe() error path to free resource list rockchip_pcie_probe() calls of_pci_get_host_bridge_resources() to parse resources from DT and build a resource list. The caller is responsible for disposing of the resource list. This is normally done by pci_release_host_bridge_dev() when the host bridge is removed. If the host bridge probe fails, dispose of the resource list in the probe error path. [bhelgaas: changelog] Suggested-by: Bjorn Helgaas Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 21b7245034aa83c80fb8d0011e18d597a62a91f1 Author: Andrey Smirnov Date: Tue Feb 7 07:50:25 2017 -0800 PCI: imx6: Fix a typo in error message Fix a typo in the "pcie_inbound_axi clock missing or invalid" error message. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Acked-by: Lucas Stach CC: yurovsky@gmail.com CC: Fabio Estevam drivers/pci/host/pci-imx6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 60e2e2fbafdd1285ae1b4ad39ded41603e0c74d0 Author: Dexuan Cui Date: Fri Feb 10 15:18:46 2017 -0600 PCI: hv: Fix wslot_to_devfn() to fix warnings on device removal The devfn of 00:02.0 is 0x10. devfn_to_wslot(0x10) == 0x2, and wslot_to_devfn(0x2) should be 0x10, while it's 0x2 in the current code. Due to this, hv_eject_device_work() -> pci_get_domain_bus_and_slot() returns NULL and pci_stop_and_remove_bus_device() is not called. Later when the real device driver's .remove() is invoked by hv_pci_remove() -> pci_stop_root_bus(), some warnings can be noticed because the VM has lost the access to the underlying device at that time. Signed-off-by: Jake Oshins Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: Haiyang Zhang CC: stable@vger.kernel.org CC: K. Y. Srinivasan CC: Stephen Hemminger drivers/pci/host/pci-hyperv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fed678145d02d08d75825d9f0854fad93cffd1a0 Author: Gabriel Krisman Bertazi Date: Mon Feb 6 13:34:14 2017 -0200 PCI: Remove duplicate check for positive return value from probe() functions Function __pci_device_probe() tries to be careful about a PCI driver probe() hook returning a positive value, but this is not really necessary, since the same fix up is already done in local_pci_probe() (preceded by a noisy warning), which renders this instance dead code. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 2 -- 1 file changed, 2 deletions(-) commit bed45f79a2afc9d7c279b880dfcac8f27d513b50 Author: Pablo Neira Date: Fri Feb 10 13:26:27 2017 +0100 gtp: add MAINTAINERS Add maintainers for this tunnel driver. Include main osmocom.org mailist list too. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit daa5fc711ee0fdbec8d55734d3975c17f2070b97 Merge: e40d5d7 bc6a3d9 Author: David S. Miller Date: Fri Feb 10 15:56:08 2017 -0500 Merge branch 'bpf-selftests-improve-and-use-library' Mickaël Salaün says: ==================== Improve BPF selftests and use the library (net-next tree) This series brings some fixes to selftests, add the ability to test unprivileged BPF programs as root and replace bpf_sys.h with calls to the BPF library. This is intended for the net-next tree and apply on c0e4dadb3494 ("net: dsa: mv88e6xxx: Move forward declaration to where it is needed"). Changes since v4: * align text for function calls as requested by Daniel Borkmann (bpf_load_program and bpf_map_update_elem) * rebase Changes since v3: * keep the bzero() calls Changes since v2: * use the patches from two previous series (unprivileged tests and bpf_sys.h replacement) * include one more stdint.h * rebase on net-next * add this cover letter Changes since v1: * exclude patches not intended for the net-next tree ==================== Signed-off-by: David S. Miller commit bc6a3d9977b6ea093cd7c567ef83657023e77f26 Author: Mickaël Salaün Date: Fri Feb 10 00:21:45 2017 +0100 bpf: Add test_tag to .gitignore Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 702498a1426bc95b6f49f9c5fba616110cbd3947 Author: Mickaël Salaün Date: Fri Feb 10 00:21:44 2017 +0100 bpf: Remove bpf_sys.h from selftests Add require dependency headers. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 6 ++++++ tools/testing/selftests/bpf/bpf_sys.h | 27 --------------------------- tools/testing/selftests/bpf/test_lpm_map.c | 1 - tools/testing/selftests/bpf/test_lru_map.c | 1 - tools/testing/selftests/bpf/test_maps.c | 1 - tools/testing/selftests/bpf/test_tag.c | 3 +-- tools/testing/selftests/bpf/test_verifier.c | 4 ++-- 7 files changed, 9 insertions(+), 34 deletions(-) commit f4874d01beba16a1bf2512929b9d460e003d7f3d Author: Mickaël Salaün Date: Fri Feb 10 00:21:43 2017 +0100 bpf: Use bpf_create_map() from the library Replace bpf_map_create() with bpf_create_map() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/bpf/bpf_sys.h | 15 --------------- tools/testing/selftests/bpf/test_lpm_map.c | 6 +++--- tools/testing/selftests/bpf/test_lru_map.c | 4 ++-- tools/testing/selftests/bpf/test_maps.c | 14 +++++++------- tools/testing/selftests/bpf/test_tag.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 4 ++-- 6 files changed, 15 insertions(+), 30 deletions(-) commit 5f155c2563592b1908a7df2dcbd44893fde3e419 Author: Mickaël Salaün Date: Fri Feb 10 00:21:42 2017 +0100 bpf: Use bpf_map_get_next_key() from the library Replace bpf_map_next_key() with bpf_map_get_next_key() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 2 +- tools/lib/bpf/bpf.h | 2 +- tools/testing/selftests/bpf/bpf_sys.h | 11 ---------- tools/testing/selftests/bpf/test_lru_map.c | 2 +- tools/testing/selftests/bpf/test_maps.c | 34 +++++++++++++++--------------- 5 files changed, 20 insertions(+), 31 deletions(-) commit e58383b803499bd623b737070038af94d0b8a3c7 Author: Mickaël Salaün Date: Fri Feb 10 00:21:41 2017 +0100 bpf: Use bpf_map_delete_elem() from the library Replace bpf_map_delete() with bpf_map_delete_elem() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 2 +- tools/lib/bpf/bpf.h | 2 +- tools/testing/selftests/bpf/bpf_sys.h | 10 ---------- tools/testing/selftests/bpf/test_lru_map.c | 6 +++--- tools/testing/selftests/bpf/test_maps.c | 22 +++++++++++----------- 5 files changed, 16 insertions(+), 26 deletions(-) commit e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70 Author: Mickaël Salaün Date: Fri Feb 10 00:21:40 2017 +0100 bpf: Use bpf_map_lookup_elem() from the library Replace bpf_map_lookup() with bpf_map_lookup_elem() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 2 +- tools/lib/bpf/bpf.h | 2 +- tools/testing/selftests/bpf/bpf_sys.h | 11 ----------- tools/testing/selftests/bpf/test_lpm_map.c | 16 ++++++++-------- tools/testing/selftests/bpf/test_lru_map.c | 28 ++++++++++++++-------------- tools/testing/selftests/bpf/test_maps.c | 30 +++++++++++++++--------------- 6 files changed, 39 insertions(+), 50 deletions(-) commit 10ecc728fe12dbd206e2d4d8b6e96082632b969c Author: Mickaël Salaün Date: Fri Feb 10 00:21:39 2017 +0100 bpf: Use bpf_map_update_elem() from the library Replace bpf_map_update() with bpf_map_update_elem() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 2 +- tools/lib/bpf/bpf.h | 2 +- tools/testing/selftests/bpf/bpf_sys.h | 13 ---- tools/testing/selftests/bpf/test_lpm_map.c | 15 ++--- tools/testing/selftests/bpf/test_lru_map.c | 97 +++++++++++++++++------------- tools/testing/selftests/bpf/test_maps.c | 61 ++++++++++--------- 6 files changed, 99 insertions(+), 91 deletions(-) commit 2ee89fb9a942e250b5adb5535de4acca14bb7fa2 Author: Mickaël Salaün Date: Fri Feb 10 00:21:38 2017 +0100 bpf: Use bpf_load_program() from the library Replace bpf_prog_load() with bpf_load_program() calls. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 6 +++--- tools/lib/bpf/bpf.h | 4 ++-- tools/testing/selftests/bpf/Makefile | 4 +++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 6 files changed, 17 insertions(+), 32 deletions(-) commit d02d8986a7688d3f0ff6ef61aa6beb41427692eb Author: Mickaël Salaün Date: Fri Feb 10 00:21:37 2017 +0100 bpf: Always test unprivileged programs If selftests are run as root, then execute the unprivileged checks as well. This switch from 243 to 368 tests. The test numbers are suffixed with "/u" when executed as unprivileged or with "/p" when executed as privileged. The geteuid() check is replaced with a capability check. Handling capabilities requires the libcap dependency. Signed-off-by: Mickaël Salaün Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Cc: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_verifier.c | 68 ++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 6 deletions(-) commit 7f73f39a89c25c04ac684661ee61edcae476eb15 Author: Mickaël Salaün Date: Fri Feb 10 00:21:36 2017 +0100 bpf: Change the include directory for selftest Use the tools include directory instead of the installed one to allow builds from other kernels. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: David S. Miller Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a7382662fc85b29f2b0dc4e7c61896cbd06593d Author: Mickaël Salaün Date: Fri Feb 10 00:21:35 2017 +0100 tools: Sync {,tools/}include/uapi/linux/bpf.h The tools version of this header is out of date; update it to the latest version from kernel header. Synchronize with the following commits: * b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") * a5e8c07059d0 ("bpf: add bpf_probe_read_str helper") * d1b662adcdb8 ("bpf: allow option for setting bpf_l4_csum_replace from scratch") Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Daniel Mack Cc: David S. Miller Cc: Gianluca Borello Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit e40d5d78df539c0c9b6625cdf5b1bc4b14c4d8bf Merge: 4f2bd6b 63461a0 Author: David S. Miller Date: Fri Feb 10 15:52:27 2017 -0500 Merge branch 'netronome-NFP4000-and-NFP6000-PF-driver' Jakub Kicinski says: ==================== Netronome NFP4000 and NFP6000 PF driver This is a base PF driver for Netronome NFP4000 and NFP6000 chips. This series doesn't add any exciting new features, it provides a foundation for supporting more advanced firmware applications. Patch 1 moves a bitfield-related helper from our BPF code to the global header. Patch 2 renames the kernel module and adds a new main file. We were considering 3-module approach (pf, vf, common netdev library) but ultimately settled on a single module to keep things simple. Patch 3 adds support for accessing chip internals. It provides a way of configuring access windows to different parts of chip memory and issuing pretty much any commands on chip's NoC. Patches 4, 5, 6, 7, 8 provide support for accessing and interpreting various hardware and firmware information structures. Patch 9 introduces service processor (NSP) ABI. This ABI gives us access to PHY/SFP module configuration and information as well as methods for unloading and loading application firmware. Patches 10 and 11 modify the existing netdev code to make it possible to support multi-port devices (sharing a PCI device). Patch 12 adds a new driver probe path which will be used for the PF PCI device IDs. It utilizes the newly added infrastructure and is able to load application FW and spawn netdevs for all card's ports. ==================== Signed-off-by: David S. Miller commit 63461a028f761f8e45d22d06fb7e7468def024b7 Author: Jakub Kicinski Date: Thu Feb 9 09:17:38 2017 -0800 nfp: add the PF driver Add PF driver for NFP4000 and NFP6000. 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.c | 332 +++++++++++- drivers/net/ethernet/netronome/nfp/nfp_main.h | 49 ++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 26 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 585 ++++++++++++++++++++++ 5 files changed, 970 insertions(+), 23 deletions(-) commit fdace6c224e9fc0e81337b6fee3cfd136824c983 Author: Jakub Kicinski Date: Thu Feb 9 09:17:37 2017 -0800 nfp: allocate irqs in lower driver PF services multiple ports using single PCI device therefore IRQs can no longer be allocated in the netdev code. Lower portion of the driver has to allocate the IRQs and hand them out to ports. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 17 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 144 +++++++++++---------- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 78 +++++++---- 3 files changed, 140 insertions(+), 99 deletions(-) commit 6f1cd5ca359276508a2c55e638a4a2cc28f8e4ae Author: Jakub Kicinski Date: Thu Feb 9 09:17:36 2017 -0800 nfp: add port layer to debugfs directories PF driver will support multiple ports per PCI device, add port number to DebugFS paths. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 15 ++++++--- .../net/ethernet/netronome/nfp/nfp_net_debugfs.c | 39 +++++++++++++++------- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 7 ++-- 3 files changed, 43 insertions(+), 18 deletions(-) commit 1a64821c6af7a85aa69835236f49aa3aa4c22ed1 Author: Jakub Kicinski Date: Thu Feb 9 09:17:35 2017 -0800 nfp: add support for service processor access NFP Service Processor (NSP) is an ARM core inside the chip which is responsible for management and control functions. Add support for chip reset, FW load and external module access using the NSP. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 2 + drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 14 + .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 2 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 13 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 417 +++++++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 270 +++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 81 ++++ 7 files changed, 799 insertions(+) commit 5f30fe4d460c975ca3debe90ec71cbd0a46e35e2 Author: Jakub Kicinski Date: Thu Feb 9 09:17:34 2017 -0800 nfp: add rtsym support Add support for using application FW symbol table to look up location of information in device memory. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 2 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 12 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 34 +++ .../net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c | 304 +++++++++++++++++++++ 5 files changed, 353 insertions(+) commit ab78c1d286df46ddc7aeaef2c22e27b7ec061ecc Author: Jakub Kicinski Date: Thu Feb 9 09:17:33 2017 -0800 nfp: add MIP reading support MIP is a vector of information which linker can optionally include in application firmware. It will be used to retrieve the location of symbol tables. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_mip.c | 174 +++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 10 ++ 3 files changed, 185 insertions(+) commit a0d8e02c35ff6068925d8c5ff4202b561aa90de6 Author: Jakub Kicinski Date: Thu Feb 9 09:17:32 2017 -0800 nfp: add support for reading nffw info NFFW info is a resource which contains information about the loaded application firmware. Add code which will allow us to decode it and retrieve MIP location. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c | 323 +++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 51 ++++ 3 files changed, 375 insertions(+) commit 59a8474888e9b06252ebe8979630b371c926a00c Author: Jakub Kicinski Date: Thu Feb 9 09:17:31 2017 -0800 nfp: add hwinfo support Hwinfo is a simple key=value store of information which is read from the flash and populated during chip power on. Add code to look up information in it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 4 + .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 3 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 15 + .../ethernet/netronome/nfp/nfpcore/nfp_hwinfo.c | 318 +++++++++++++++++++++ 5 files changed, 341 insertions(+) commit f01a2161577d31b14581e0db3bbbdfa963f145b6 Author: Jakub Kicinski Date: Thu Feb 9 09:17:30 2017 -0800 nfp: add support for resources Resource table is an array placed in a well defined location in device's memory which describes device resources and contains locks which have to be acquired to use them. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfpcore/crc32.h | 65 +++++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 88 +++++++ .../ethernet/netronome/nfp/nfpcore/nfp_resource.c | 279 +++++++++++++++++++++ 4 files changed, 433 insertions(+) commit 4cb584e0ee7df70fd0376aee60cf701855ea8c81 Author: Jakub Kicinski Date: Thu Feb 9 09:17:29 2017 -0800 nfp: add CPP access core Command Push Pull is the name of NFP's network on a chip. PCIe PF can access the interconnect through a number of mappings controlled via Base Access Registers. BARs allow the PF to issue pretty much any command or address any memory on the chip. Add appropriate logic and a handful of helper for simple operations like reading scalars from memories. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 4 + .../netronome/nfp/nfpcore/nfp6000/nfp6000.h | 88 + .../netronome/nfp/nfpcore/nfp6000/nfp_xpb.h | 57 + .../ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 1364 ++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp6000_pcie.h | 46 + .../net/ethernet/netronome/nfp/nfpcore/nfp_arm.h | 246 +++ .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 431 +++++ .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 1706 ++++++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_cpplib.c | 281 ++++ .../ethernet/netronome/nfp/nfpcore/nfp_target.c | 764 +++++++++ 10 files changed, 4987 insertions(+) commit 2633beb99b81f4dd005f99aabd98c8afa056c528 Author: Jakub Kicinski Date: Thu Feb 9 09:17:28 2017 -0800 nfp: rename the driver and add new main file Support for the PF driver is about to be added and will share much of the code. When the VF driver was added we planned to maintain the PF driver as a separate module but have decided that for our simple use case just maintaining a single module is more reasonable. Rename the driver to just "nfp" and update the Kconfig. While at it remove latent references to NFP3200. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 18 ++--- drivers/net/ethernet/netronome/Makefile | 2 +- drivers/net/ethernet/netronome/nfp/Makefile | 9 ++- drivers/net/ethernet/netronome/nfp/nfp_main.c | 85 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 48 ++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 9 +-- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 +- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 38 +--------- 8 files changed, 160 insertions(+), 57 deletions(-) commit 1697599ee301a52cded6499a09bd609f7f63fd06 Author: Jakub Kicinski Date: Thu Feb 9 09:17:27 2017 -0800 bitfield.h: add FIELD_FIT() helper Add a helper for checking at runtime that a value will fit inside a specified field/mask. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 2 -- include/linux/bitfield.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit abdbf4d635a9a8c956bb9757a9d4f08c2abe1f97 Author: Keith Busch Date: Fri Feb 3 16:46:13 2017 -0500 PCI/DPC: Wait for Root Port busy to clear Per PCIe r3.1, sec 6.2.10 and sec 7.13.4, on Root Ports that support "RP Extensions for DPC", When the DPC Trigger Status bit is Set and the DPC RP Busy bit is Set, software must leave the Root Port in DPC until the DPC RP Busy bit reads 0b. Wait up to 1 second for the Root Port to become non-busy. [bhelgaas: changelog, spec references] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pcie-dpc.c | 26 +++++++++++++++++++++++++- include/uapi/linux/pci_regs.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) commit 87b336d003d47876e376d943be3c9d35152f3b86 Author: Keith Busch Date: Fri Feb 3 16:46:12 2017 -0500 PCI/DPC: Decode extended reasons Decode the currently defined extended event reasons rather than just using the generic "extended" explanation. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pcie-dpc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 699c4cec238731a4c466f73fe6e9e45ab6f49a41 Author: Christoph Hellwig Date: Wed Feb 8 18:17:44 2017 +0100 PCI/MSI: Remove pci_msi_domain_{alloc,free}_irqs() Just call the msi_* version directly instead of having trivial wrappers for one or two callsites. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner arch/x86/kernel/apic/msi.c | 2 +- drivers/pci/msi.c | 30 ++---------------------------- include/linux/msi.h | 3 --- 3 files changed, 3 insertions(+), 32 deletions(-) commit 47feb41888bc82ba5c9268c344775adc483d6de7 Author: Christoph Hellwig Date: Wed Feb 8 18:17:43 2017 +0100 PCI/MSI: Remove unused pci_msi_create_default_irq_domain() pci_msi_create_default_irq_domain() is never called in the whole tree, so remove it as well as all the supporting code for a default PCI MSI domain. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner drivers/pci/msi.c | 50 ++------------------------------------------------ include/linux/msi.h | 3 --- 2 files changed, 2 insertions(+), 51 deletions(-) commit 26b54be568ad8611ebc62f02f9a5d5328e7b3392 Author: Bharat Kumar Gogada Date: Tue Jan 31 14:29:30 2017 +0530 PCI: xilinx-nwl: Remove mask for messages not supported by AXI Remove support for vendor-defined messages which are not supported by AXI. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 3adfb572f2978a980b250a9e1a56f84f3a031001 Author: Christophe JAILLET Date: Fri Jan 27 16:14:53 2017 +0100 PCI/MSI: Return failure when msix_setup_entries() fails If alloc_msi_entry() fails, we free resources and set ret = -ENOMEM. However, msix_setup_entries() returns 0 unconditionally. Return the error code instead. Fixes: e75eafb9b039 ("genirq/msi: Switch to new irq spreading infrastructure") Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Helgaas drivers/pci/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f2bd6b35b345523ac99b14ce9a1f4a98f21ebdb Merge: 0d2164a 4456f61 Author: David S. Miller Date: Fri Feb 10 14:43:01 2017 -0500 Merge branch 'devlink-small-cleanups' Jiri Pirko says: ==================== devlink: small cleanup around eswitch [sg]et Contains small devlink cleanup around eswitch get/set commands. ==================== Signed-off-by: David S. Miller commit 4456f61cfd2a589c4368fe0b9080b646b9bd470d Author: Jiri Pirko Date: Thu Feb 9 15:54:36 2017 +0100 devlink: allow to fillup eswitch attrs even if mode_get op does not exist Even when mode_get op is not present, other eswitch attrs need to be filled-up. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 1a6aa36b6f92b1a2f2e6789f6785372d4d6ddca9 Author: Jiri Pirko Date: Thu Feb 9 15:54:35 2017 +0100 devlink: use nla_put_failure goto label instead of out Be aligned with the rest of the code and use label named nla_put_failure. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 21e3d2dd4a19f842e7d134c341eb584970ff3b32 Author: Jiri Pirko Date: Thu Feb 9 15:54:34 2017 +0100 devlink: rename devlink_eswitch_fill to devlink_nl_eswitch_fill Be aligned with the rest of the file and name the helper function accordingly. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit adf200f31c000d707e4afe238ed1d1199e0cce7c Author: Jiri Pirko Date: Thu Feb 9 15:54:33 2017 +0100 devlink: fix the name of eswitch commands The eswitch_[gs]et command is supposed to be similar to port_[gs]et command - for multiple eswitch attributes. However, when it was introduced by 08f4b5918b2d ("net/devlink: Add E-Switch mode control") it was wrongly named with the word "mode" in it. So fix this now, make the oririnal enum value existing but obsolete. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/devlink.h | 10 ++++++++-- net/core/devlink.c | 18 +++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 0d2164af2696821b27b04bebd8420b0e881bf44d Merge: 1deeaa0 f181d6a Author: David S. Miller Date: Fri Feb 10 14:31:51 2017 -0500 Merge tag 'mac80211-next-for-davem-2017-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Some more updates: * use shash in mac80211 crypto code where applicable * some documentation fixes * pass RSSI levels up in change notifications * remove unused rfkill-regulator * various other cleanups ==================== Signed-off-by: David S. Miller commit d91f6cee98b6e0ef5a05209ca9b741d23086cdb2 Author: Wei Yongjun Date: Wed Feb 8 16:23:10 2017 +0000 mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Reviewed-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/spi-nor/aspeed-smc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4c7384131c8d343c0bf79abac3b3e78596d85b10 Author: Steven Rostedt (VMware) Date: Wed Feb 8 13:36:37 2017 -0500 tracing: Have COMM event filter key be treated as a string The GLOB operation "~" should be able to work with the COMM filter key in order to trace programs with a glob. For example echo 'COMM ~ "systemd*"' > events/syscalls/filter Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f435da416beaacc8934fc21820d9488269b39c98 Author: H Hartley Sweeten Date: Fri Feb 10 09:54:16 2017 -0700 genirq: Fix /proc/interrupts output alignment If the irq_desc being output does not have a domain associated the information following the 'name' is not aligned correctly. Signed-off-by: H Hartley Sweeten Link: http://lkml.kernel.org/r/20170210165416.5629-1-hsweeten@visionengravers.com Signed-off-by: Thomas Gleixner kernel/irq/proc.c | 2 ++ 1 file changed, 2 insertions(+) commit b977b644ccf821ab1269582f7efe1d0d85faa1f6 Author: Chuck Lever Date: Wed Feb 8 17:00:51 2017 -0500 sunrpc: Allow xprt->ops->timer method to sleep The transport lock is needed to protect the xprt_adjust_cwnd() call in xs_udp_timer, but it is not necessary for accessing the rq_reply_bytes_recvd or tk_status fields. It is correct to sublimate the lock into UDP's xs_udp_timer method, where it is required. The ->timer method has to take the transport lock if needed, but it can now sleep safely, or even call back into the RPC scheduler. This is more a clean-up than a fix, but the "issue" was introduced by my transport switch patches back in 2005. Fixes: 46c0ee8bc4ad ("RPC: separate xprt_timer implementations") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 2 -- net/sunrpc/xprtsock.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 9a5c63e9c4056de8a73555131e6f698ddb0b9e0d Author: Chuck Lever Date: Wed Feb 8 17:00:43 2017 -0500 xprtrdma: Refactor management of mw_list field Clean up some duplicate code. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 5 +---- net/sunrpc/xprtrdma/frwr_ops.c | 11 ++++------- net/sunrpc/xprtrdma/rpc_rdma.c | 6 +++--- net/sunrpc/xprtrdma/verbs.c | 15 +++++---------- net/sunrpc/xprtrdma/xprt_rdma.h | 16 ++++++++++++++++ 5 files changed, 29 insertions(+), 24 deletions(-) commit 0a90487bf7182c74830616b91bd33f68f8c6e18b Author: Chuck Lever Date: Wed Feb 8 17:00:35 2017 -0500 xprtrdma: Handle stale connection rejection A server rejects a connection attempt with STALE_CONNECTION when a client attempts to connect to a working remote service, but uses a QPN and GUID that corresponds to an old connection that was abandoned. This might occur after a client crashes and restarts. Fix rpcrdma_conn_upcall() to distinguish between a normal rejection and rejection of stale connection parameters. As an additional clean-up, remove the code that retries the connection attempt with different ORD/IRD values. Code audit of other ULP initiators shows no similar special case handling of initiator_depth or responder_resources. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 66 +++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 45 deletions(-) commit 18c0fb31a034023e5cb2d3c9c1320d5d47d91afe Author: Chuck Lever Date: Wed Feb 8 17:00:27 2017 -0500 xprtrdma: Properly recover FRWRs with in-flight FASTREG WRs Sriharsha (sriharsha.basavapatna@broadcom.com) reports an occasional double DMA unmap of an FRWR MR when a connection is lost. I see one way this can happen. When a request requires more than one segment or chunk, rpcrdma_marshal_req loops, invoking ->frwr_op_map for each segment (MR) in each chunk. Each call posts a FASTREG Work Request to register one MR. Now suppose that the transport connection is lost part-way through marshaling this request. As part of recovering and resetting that req, rpcrdma_marshal_req invokes ->frwr_op_unmap_safe, which hands all the req's registered FRWRs to the MR recovery thread. But note: FRWR registration is asynchronous. So it's possible that some of these "already registered" FRWRs are fully registered, and some are still waiting for their FASTREG WR to complete. When the connection is lost, the "already registered" frmrs are marked FRMR_IS_VALID, and the "still waiting" WRs flush. Then frwr_wc_fastreg marks these frmrs FRMR_FLUSHED_FR. But thanks to ->frwr_op_unmap_safe, the MR recovery thread is doing an unreg / alloc_mr, a DMA unmap, and marking each of these frwrs FRMR_IS_INVALID, at the same time frwr_wc_fastreg might be running. - If the recovery thread runs last, then the frmr is marked FRMR_IS_INVALID, and life continues. - If frwr_wc_fastreg runs last, the frmr is marked FRMR_FLUSHED_FR, but the recovery thread has already DMA unmapped that MR. When ->frwr_op_map later re-uses this frmr, it sees it is not marked FRMR_IS_INVALID, and tries to recover it before using it, resulting in a second DMA unmap of the same MR. The fix is to guarantee in-flight FASTREG WRs have flushed before MR recovery runs on those FRWRs. Thus we depend on ro_unmap_safe (called from xprt_rdma_send_request on retransmit, or from xprt_rdma_free) to clean up old registrations as needed. Reported-by: Sriharsha Basavapatna Signed-off-by: Chuck Lever Tested-by: Sriharsha Basavapatna Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 14 ++++++++------ net/sunrpc/xprtrdma/transport.c | 4 ---- 2 files changed, 8 insertions(+), 10 deletions(-) commit c6f5b47f9fdeef12c0896e5af4bb3416c97d91c4 Author: Chuck Lever Date: Wed Feb 8 17:00:18 2017 -0500 xprtrdma: Shrink send SGEs array We no longer need to accommodate an xdr_buf whose pages start at an offset and cross extra page boundaries. If there are more partial or whole pages to send than there are available SGEs, the marshaling logic is now smart enough to use a Read chunk instead of failing. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/xprt_rdma.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 16f906d66cd76fb9895cbc628f447532a7ac1faa Author: Chuck Lever Date: Wed Feb 8 17:00:10 2017 -0500 xprtrdma: Reduce required number of send SGEs The MAX_SEND_SGES check introduced in commit 655fec6987be ("xprtrdma: Use gathered Send for large inline messages") fails for devices that have a small max_sge. Instead of checking for a large fixed maximum number of SGEs, check for a minimum small number. RPC-over-RDMA will switch to using a Read chunk if an xdr_buf has more pages than can fit in the device's max_sge limit. This is considerably better than failing all together to mount the server. This fix supports devices that have as few as three send SGEs available. Reported-by: Selvin Xavier Reported-by: Devesh Sharma Reported-by: Honggang Li Reported-by: Ram Amrani Fixes: 655fec6987be ("xprtrdma: Use gathered Send for large ...") Cc: stable@vger.kernel.org # v4.9+ Tested-by: Honggang Li Tested-by: Ram Amrani Tested-by: Steve Wise Reviewed-by: Parav Pandit Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 26 +++++++++++++++++++++++--- net/sunrpc/xprtrdma/verbs.c | 13 +++++++------ net/sunrpc/xprtrdma/xprt_rdma.h | 2 ++ 3 files changed, 32 insertions(+), 9 deletions(-) commit c95a3c6b88658bcb8f77f85f31a0b9d9036e8016 Author: Chuck Lever Date: Wed Feb 8 17:00:02 2017 -0500 xprtrdma: Disable pad optimization by default Commit d5440e27d3e5 ("xprtrdma: Enable pad optimization") made the Linux client omit XDR round-up padding in normal Read and Write chunks so that the client doesn't have to register and invalidate 3-byte memory regions that contain no real data. Unfortunately, my cheery 2014 assessment that this optimization "is supported now by both Linux and Solaris servers" was premature. We've found bugs in Solaris in this area since commit d5440e27d3e5 ("xprtrdma: Enable pad optimization") was merged (SYMLINK is the main offender). So for maximum interoperability, I'm disabling this optimization again. If a CM private message is exchanged when connecting, the client recognizes that the server is Linux, and enables the optimization for that connection. Until now the Solaris server bugs did not impact common operations, and were thus largely benign. Soon, less capable devices on Linux NFS/RDMA clients will make use of Read chunks more often, and these Solaris bugs will prevent interoperation in more cases. Fixes: 677eb17e94ed ("xprtrdma: Fix XDR tail buffer marshalling") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit b5f0afbea4f2ea52c613ac2b06cb6de2ea18cb6d Author: Chuck Lever Date: Wed Feb 8 16:59:54 2017 -0500 xprtrdma: Per-connection pad optimization Pad optimization is changed by echoing into /proc/sys/sunrpc/rdma_pad_optimize. This is a global setting, affecting all RPC-over-RDMA connections to all servers. The marshaling code picks up that value and uses it for decisions about how to construct each RPC-over-RDMA frame. Having it change suddenly in mid-operation can result in unexpected failures. And some servers a client mounts might need chunk round-up, while others don't. So instead, copy the pad_optimize setting into each connection's rpcrdma_ia when the transport is created, and use the copy, which can't change during the life of the connection, instead. This also removes a hack: rpcrdma_convert_iovs was using the remote-invalidation-expected flag to predict when it could leave out Write chunk padding. This is because the Linux server handles implicit XDR padding on Write chunks correctly, and only Linux servers can set the connection's remote-invalidation-expected flag. It's more sensible to use the pad optimization setting instead. Fixes: 677eb17e94ed ("xprtrdma: Fix XDR tail buffer marshalling") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 28 ++++++++++++++-------------- net/sunrpc/xprtrdma/verbs.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 3 files changed, 16 insertions(+), 14 deletions(-) commit 24abdf1be15c478e2821d6fc903a4a4440beff02 Author: Chuck Lever Date: Wed Feb 8 16:59:46 2017 -0500 xprtrdma: Fix Read chunk padding When pad optimization is disabled, rpcrdma_convert_iovs still does not add explicit XDR round-up padding to a Read chunk. Commit 677eb17e94ed ("xprtrdma: Fix XDR tail buffer marshalling") incorrectly short-circuited the test for whether round-up padding is needed that appears later in rpcrdma_convert_iovs. However, if this is indeed a regular Read chunk (and not a Position-Zero Read chunk), the tail iovec _always_ contains the chunk's padding, and never anything else. So, it's easy to just skip the tail when padding optimization is enabled, and add the tail in a subsequent Read chunk segment, if disabled. Fixes: 677eb17e94ed ("xprtrdma: Fix XDR tail buffer marshalling") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1deeaa0b86973bef6629396cc0f5f092872bb6de Author: Ivan Khoronzhuk Date: Thu Feb 9 16:17:40 2017 +0200 net: ethernet: ti: netcp_core: remove netif_trans_update No need to update jiffies in txq->trans_start twice and only for tx 0, it's supposed to be done in netdev_start_xmit() and per tx queue. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 2 -- 1 file changed, 2 deletions(-) commit 1254856c07e0e5707d3291f625db8ed69a866be2 Merge: e3f29c4 4d56a29 Author: David S. Miller Date: Fri Feb 10 13:51:05 2017 -0500 Merge branch 'dsa-phy-include' Florian Fainelli says: ==================== net: dsa: remove unnecessary phy.h include Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h - the include itself only wants the declaration of a couple of structures and IFNAMSIZ. Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h and phy_fixed.h from net/dsa.h. This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable. In order to make this change, several drivers need to be updated to include necessary headers that they were picking up through this include. This has resulted in a much larger patch series. I'm assuming the 0-day builder has had 24 hours with this series, and hasn't reported any further issues with it - the last issue was two weeks ago (before I became ill) which I fixed over the last weekend. I'm hoping this doesn't conflict with what's already in net-next... David, this should probably go via your tree considering the diffstat. Changes in v2: - took Russell's patch series - removed Qualcomm EMAC patch - rebased against net-next/master ==================== Signed-off-by: David S. Miller commit 4d56a29f17508b2eb8bee66b8f0e3679201fa807 Author: Russell King Date: Tue Feb 7 15:03:05 2017 -0800 net: dsa: remove unnecessary phy*.h includes Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h - the include itself only wants the declaration of a couple of structures and IFNAMSIZ. Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h and phy_fixed.h from net/dsa.h. This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable. Tested-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + include/net/dsa.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 7ecb6227ca339f93cda447d586d119df5687ddf2 Author: Russell King Date: Tue Feb 7 15:03:04 2017 -0800 net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h Fix these errors reported by the 0-day builder by replacing the linux/export.h include with linux/module.h. In file included from include/linux/platform_device.h:14:0, from drivers/net/wireless/ath/ath5k/ahb.c:20: include/linux/device.h:1463:1: warning: data definition has no type or storage class module_init(__driver##_init); \ ^ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:1463:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] module_init(__driver##_init); \ ^ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included from include/linux/platform_device.h:14:0, from drivers/net/wireless/ath/ath5k/ahb.c:20: include/linux/device.h:1468:1: warning: data definition has no type or storage class module_exit(__driver##_exit); ^ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:1468:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int] module_exit(__driver##_exit); ^ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included from include/linux/platform_device.h:14:0, from drivers/net/wireless/ath/ath5k/ahb.c:20: drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_exit' defined but not used [-Wunused-function] module_platform_driver(ath_ahb_driver); ^ include/linux/device.h:1464:20: note: in definition of macro 'module_driver' static void __exit __driver##_exit(void) \ ^~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_init' defined but not used [-Wunused-function] module_platform_driver(ath_ahb_driver); ^ include/linux/device.h:1459:19: note: in definition of macro 'module_driver' static int __init __driver##_init(void) \ ^~~~~~~~ drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(ath_ahb_driver); ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Russell King Acked-by: Kalle Valo Signed-off-by: David S. Miller drivers/net/wireless/ath/ath5k/ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3bfc6e7baaac3992f62754228128427ac955e3a Author: Russell King Date: Tue Feb 7 15:03:03 2017 -0800 net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: type defaults to 'int' in declaration of 'MODULE_VERSION' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:36: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:37: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: error: type defaults to 'int' in declaration of 'module_init' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: error: type defaults to 'int' in declaration of 'module_exit' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:36: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:37: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:38: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:39: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: type defaults to 'int' in declaration of 'MODULE_VERSION' drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:40: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:41: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:42: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:43: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:46: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_main.c:48: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:53: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_main.c:54: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:57: error: expected ')' before 'sizeof' drivers/net/ethernet/cavium/liquidio/lio_main.c:58: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: data definitionhas no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:498: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_recv_vf_drv_notice': drivers/net/ethernet/cavium/liquidio/lio_main.c:4393: error: implicit declaration of function 'try_module_get' drivers/net/ethernet/cavium/liquidio/lio_main.c:4400: error: implicit declaration of function 'module_put' drivers/net/ethernet/cavium/liquidio/lio_main.c: At top level: drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: error: type defaults to 'int' in declaration of 'module_init' drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: error: type defaults to 'int' in declaration of 'module_exit' drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: parameter names (without types) in function declaration Add linux/module.h to both these files. drivers/net/ethernet/cavium/liquidio/octeon_console.c:40:31: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/octeon_console.c:42:4: error: expected ')' before string constant Add linux/moduleparam.h to this file. Signed-off-by: Russell King Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 + drivers/net/ethernet/cavium/liquidio/octeon_console.c | 1 + 3 files changed, 3 insertions(+) commit 7ca2ea8253f1fbb69c437b66255a2331ff2e14c2 Author: Russell King Date: Tue Feb 7 15:03:02 2017 -0800 MIPS: Octeon: Remove unnecessary MODULE_*() octeon-platform.c can not be built as a module for two reasons: (a) the Makefile doesn't allow it: obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o (b) the multiple *_initcall() statements, each of which are translated to a module_init() call when attempting a module build, become aliases to init_module(). Having more than one alias will cause a build error. Hence, rather than adding a linux/module.h include, remove the redundant MODULE_*() from this file. Acked-by: David Daney Signed-off-by: Russell King Signed-off-by: David S. Miller arch/mips/cavium-octeon/octeon-platform.c | 4 ---- 1 file changed, 4 deletions(-) commit da5df6205b9c493b9367dab057b0f80da46a0fdb Author: Russell King Date: Tue Feb 7 15:03:01 2017 -0800 iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration] Add linux/module.h to iscsi_target_login.c. Signed-off-by: Russell King Reviewed-by: Bart Van Assche Acked-by: Nicholas Bellinger Signed-off-by: David S. Miller drivers/target/iscsi/iscsi_target_login.c | 1 + 1 file changed, 1 insertion(+) commit 9303ab2b3402b60f6c39abfdbfa4ce00fce8bee4 Author: Russell King Date: Tue Feb 7 15:03:00 2017 -0800 net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/ethernet/marvell/mvneta.c:2694:26: error: storage size of 'status' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:26: error: storage size of 'changed' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:9: error: variable 'changed' has initializer but incomplete type drivers/net/ethernet/marvell/mvneta.c:2709:2: error: implicit declaration of function 'fixed_phy_update_state' [-Werror=implicit-function-declaration] Add linux/phy_fixed.h to mvneta.c Signed-off-by: Russell King Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 1 + 1 file changed, 1 insertion(+) commit f225e4e69770a79663c62c8d6629fdf3fcbc360a Author: Russell King Date: Tue Feb 7 15:02:59 2017 -0800 net: fman: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/ethernet/freescale/fman/fman_memac.c:519:21: error: dereferencing pointer to incomplete type 'struct fixed_phy_status' Add linux/phy_fixed.h to fman_memac.c Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_memac.c | 1 + 1 file changed, 1 insertion(+) commit 13bf77604e163b957948dea464752cf3cd4bbc52 Author: Russell King Date: Tue Feb 7 15:02:58 2017 -0800 net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/ethernet/broadcom/bgmac.c:1015:17: error: dereferencing pointer to incomplete type 'struct mii_bus' drivers/net/ethernet/broadcom/bgmac.c:1185:2: error: implicit declaration of function 'phy_start' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1198:2: error: implicit declaration of function 'phy_stop' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1239:9: error: implicit declaration of function 'phy_mii_ioctl' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1389:28: error: 'phy_ethtool_get_link_ksettings' undeclared here (not in a function) drivers/net/ethernet/broadcom/bgmac.c:1390:28: error: 'phy_ethtool_set_link_ksettings' undeclared here (not in a function) drivers/net/ethernet/broadcom/bgmac.c:1403:13: error: dereferencing pointer to incomplete type 'struct phy_device' drivers/net/ethernet/broadcom/bgmac.c:1417:3: error: implicit declaration of function 'phy_print_status' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1424:26: error: storage size of 'fphy_status' isn't known drivers/net/ethernet/broadcom/bgmac.c:1424:9: error: variable 'fphy_status' has initializer but incomplete type drivers/net/ethernet/broadcom/bgmac.c:1425:11: warning: excess elements in struct initializer drivers/net/ethernet/broadcom/bgmac.c:1425:3: error: unknown field 'link' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1426:12: note: in expansion of macro 'SPEED_1000' drivers/net/ethernet/broadcom/bgmac.c:1426:3: error: unknown field 'speed' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1427:13: note: in expansion of macro 'DUPLEX_FULL' drivers/net/ethernet/broadcom/bgmac.c:1427:3: error: unknown field 'duplex' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1432:12: error: implicit declaration of function 'fixed_phy_register' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1432:31: error: 'PHY_POLL' undeclared (first use in this function) drivers/net/ethernet/broadcom/bgmac.c:1438:8: error: implicit declaration of function 'phy_connect_direct' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1439:6: error: 'PHY_INTERFACE_MODE_MII' undeclared (first use in this function) drivers/net/ethernet/broadcom/bgmac.c:1521:2: error: implicit declaration of function 'phy_disconnect' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1541:15: error: expected declaration specifiers or '...' before string constant Add linux/phy.h to bgmac.c Signed-off-by: Russell King Acked-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 ++ 1 file changed, 2 insertions(+) commit 8c56ea410efb537e5b4d10365e14b140f110314c Author: Russell King Date: Tue Feb 7 15:02:57 2017 -0800 net: lan78xx: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/usb/lan78xx.c:394:33: sparse: expected ; at end of declaration drivers/net/usb/lan78xx.c:394:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/usb/lan78xx.c:394:33: sparse: got interface drivers/net/usb/lan78xx.c:403:1: sparse: Expected ; at the end of type declaration drivers/net/usb/lan78xx.c:403:1: sparse: got } Add linux/phy.h to lan78xx.c Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 1 + 1 file changed, 1 insertion(+) commit fc182b8512aa9b71c6cb43be4953c0ad9ebea908 Author: Russell King Date: Tue Feb 7 15:02:56 2017 -0800 net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h drivers/net/ethernet/cadence/macb.h:862:33: sparse: expected ; at end of declaration drivers/net/ethernet/cadence/macb.h:862:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/ethernet/cadence/macb.h:862:33: sparse: got phy_interface drivers/net/ethernet/cadence/macb.h:877:1: sparse: Expected ; at the end of type declaration drivers/net/ethernet/cadence/macb.h:877:1: sparse: got } In file included from drivers/net/ethernet/cadence/macb_pci.c:29:0: drivers/net/ethernet/cadence/macb.h:862:2: error: unknown type name 'phy_interface_t' phy_interface_t phy_interface; ^~~~~~~~~~~~~~~ Add linux/phy.h to macb.h Signed-off-by: Russell King Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 2 ++ 1 file changed, 2 insertions(+) commit 43cc277a93a2b74430e2ae03e92bd9bc4f303814 Author: Russell King Date: Tue Feb 7 15:02:55 2017 -0800 net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.h net/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or '...' before string constant MODULE_LICENSE("GPL v2"); ^~~~~~~~ Add linux/module.h to fix this. Signed-off-by: Russell King Signed-off-by: David S. Miller net/core/netprio_cgroup.c | 1 + 1 file changed, 1 insertion(+) commit f39b2dde4886450b965ccd0a6defe8bc33fcc938 Author: Russell King Date: Tue Feb 7 15:02:54 2017 -0800 net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h Removing linux/phy.h from net/dsa.h reveals a build error in the sunrpc code: net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put': net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration] net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_setup_rdma_bc': net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration] Fix this by adding linux/module.h to svc_rdma_backchannel.c Signed-off-by: Russell King Acked-by: Anna Schumaker Signed-off-by: David S. Miller net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 1 file changed, 1 insertion(+) commit e3f29c4809a5f562adc345c48ed9785f2597df78 Merge: dc37170 cbda794 Author: David S. Miller Date: Fri Feb 10 13:47:52 2017 -0500 Merge tag 'wireless-drivers-next-for-davem-2017-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 Mostly smaller changeds and fixes all over, nothing really major standing out. Major changes: iwlwifi * work on support for new A000 devices continues * fix 802.11w, which was failing to due an IGTK bug ath10k * add debugfs file peer_debug_trigger for debugging firmware ==================== Signed-off-by: David S. Miller commit dc371700d43e45ed9bf380746e293f063113c2b1 Author: Jiri Pirko Date: Thu Feb 9 14:42:03 2017 +0100 spectrum: flower: Treat ETH_P_ALL as a special case and translate for HW HW does not understand ETH_P_ALL. So treat this special case differently and translate to 0/0 key/mask. That will allow HW to match all ethertypes. Fixes: 7aa0f5aa9030 ("mlxsw: spectrum: Implement TC flower offload") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 201dacbb1d77e3227aa61b7b9fd375ae201e86b2 Merge: b668b90 f4563a7 Author: David S. Miller Date: Fri Feb 10 13:37:49 2017 -0500 Merge branch 'net-checkpatch' Tobin C. Harding says: ==================== Whitespace checkpatch fixes This patch set fixes various whitespace checkpatch errors and warnings. ==================== Signed-off-by: David S. Miller commit f4563a75fb93d6a756416d97e13f0773ac373a24 Author: tcharding Date: Thu Feb 9 17:56:07 2017 +1100 net: Fix checkpatch, Missing a blank line after declarations This patch fixes multiple occurrences of checkpatch WARNING: Missing a blank line after declarations. Signed-off-by: Tobin C. Harding Signed-off-by: David S. Miller net/core/dev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit eb13da1a103a808c05267816fa4d30d603bfda5e Author: tcharding Date: Thu Feb 9 17:56:06 2017 +1100 net: Fix checkpatch block comments warnings Fix multiple occurrences of checkpatch warning. WARNING: Block comments use * on subsequent lines. Also make comment blocks more uniform. Signed-off-by: Tobin C. Harding Signed-off-by: David S. Miller net/core/dev.c | 65 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit 643aa9cba0b688ffde28ac39aebec6f56fc2a8af Author: tcharding Date: Thu Feb 9 17:56:05 2017 +1100 net: Fix checkpatch whitespace errors This patch fixes two trivial whitespace errors. Brace should be on the previous line and trailing statements should be on next line. Signed-off-by: Tobin C. Harding Signed-off-by: David S. Miller net/core/dev.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 722c9a0cebb88ac1a982285f15d5fd44f4140c66 Author: tcharding Date: Thu Feb 9 17:56:04 2017 +1100 net: Fix checkpatch WARNING: please, no space before tabs This patch fixes multiple occurrences of space before tabs warnings. More lines of code were moved than required to keep kernel-doc comments uniform. Signed-off-by: Tobin C. Harding Signed-off-by: David S. Miller net/core/dev.c | 142 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) commit 3d492c2e0146ccaad08c7cbe16e2e229328b5e79 Author: Omar Sandoval Date: Fri Feb 10 10:32:34 2017 -0800 blk-mq-sched: don't hold queue_lock when calling exit_icq None of the other blk-mq elevator hooks are called with this lock held. Additionally, it can lead to circular locking dependencies between queue_lock and the private scheduler lock. Reported-by: Paolo Valente Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-ioc.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit b668b9030c0168cf86e054adfe72e89df49b2772 Merge: 58be242 853a14b Author: David S. Miller Date: Fri Feb 10 13:18:34 2017 -0500 Merge branch 'act_pedit-relative-offset' Amir Vadai says: ==================== net/sched: act_pedit: Use offset relative to conventional network headers Some FW/HW parser APIs are such that they need to get the specific header type (e.g IPV4 or IPV6, TCP or UDP) and not only the networking level (e.g network or transport). Enhancing the UAPI to allow for specifying that, would allow the same flows to be set into both SW and HW. This patchset also makes pedit more robust. Currently fields offset is specified by offset relative to the ip header, while using negative offsets for MAC layer fields. This series enables the user to set offset relative to the relevant header. Usage example: $ tc filter add dev enp0s9 protocol ip parent ffff: \ flower \ ip_proto tcp \ dst_port 80 \ action \ pedit munge ip ttl add 0xff \ pedit munge tcp dport set 8080 \ pipe action mirred egress redirect dev veth0 Will forward traffic destined to tcp dport 80, while modifying the destination port to 8080, and decreasing the ttl by one. I've uploaded a draft for the userspace [2] to make it easier to review and test the patchset. [1] - http://patchwork.ozlabs.org/patch/700909/ [2] - git: https://bitbucket.org/av42/iproute2.git branch: pedit Patchset was tested and applied on top of upstream commit bd092ad1463c ("Merge branch 'remove-__napi_complete_done'") Thanks, Amir Changes since V2: - Instead of reusing unused bits in existing uapi fields, using new netlink attributes for the new information. This way new/old user space and new/old kernel can live together without having misunderstandings. Changes since V1: - No changes - V1 was sent and didn't make it for 4.10. - You asked me [1] why did I use specific header names instead of layers (L2, L3...), and I explained that it is on purpose, this extra information is planned to be used by hardware drivers to offload the action. ==================== Signed-off-by: David S. Miller commit 853a14ba4682f820266469979c9297debc05f60c Author: Amir Vadai Date: Tue Feb 7 09:56:08 2017 +0200 net/act_pedit: Introduce 'add' operation This command could be useful to inc/dec fields. For example, to forward any TCP packet and decrease its TTL: $ tc filter add dev enp0s9 protocol ip parent ffff: \ flower ip_proto tcp \ action pedit munge ip ttl add 0xff pipe \ action mirred egress redirect dev veth0 In the example above, adding 0xff to this u8 field is actually decreasing it by one, since the operation is masked. Signed-off-by: Amir Vadai Reviewed-by: Or Gerlitz Signed-off-by: David S. Miller include/net/tc_act/tc_pedit.h | 1 + include/uapi/linux/tc_act/tc_pedit.h | 8 ++++++++ net/sched/act_pedit.c | 30 ++++++++++++++++++++++++++---- 3 files changed, 35 insertions(+), 4 deletions(-) commit 71d0ed7079dffbc5cd0941d77d9b84e04109c9bb Author: Amir Vadai Date: Tue Feb 7 09:56:07 2017 +0200 net/act_pedit: Support using offset relative to the conventional network headers Extend pedit to enable the user setting offset relative to network headers. This change would enable to work with more complex header schemes (vs the simple IPv4 case) where setting a fixed offset relative to the network header is not enough. After this patch, the action has information about the exact header type and field inside this header. This information could be used later on for hardware offloading of pedit. Backward compatibility was being kept: 1. Old kernel <-> new userspace 2. New kernel <-> old userspace 3. add rule using new userspace <-> dump using old userspace 4. add rule using old userspace <-> dump using new userspace When using the extended api, new netlink attributes are being used. This way, operation will fail in (1) and (3) - and no malformed rule be added or dumped. Of course, new user space that doesn't need the new functionality can use the old netlink attributes and operation will succeed. Since action can support both api's, (2) should work, and it is easy to write the new user space to have (4) work. The action is having a strict check that only header types and commands it can handle are accepted. This way future additions will be much easier. Usage example: $ tc filter add dev enp0s9 protocol ip parent ffff: \ flower \ ip_proto tcp \ dst_port 80 \ action pedit munge tcp dport set 8080 pipe \ action mirred egress redirect dev veth0 Will forward tcp port whose original dest port is 80, while modifying the destination port to 8080. Signed-off-by: Amir Vadai Reviewed-by: Or Gerlitz Signed-off-by: David S. Miller include/net/tc_act/tc_pedit.h | 5 + include/uapi/linux/tc_act/tc_pedit.h | 23 ++++ net/sched/act_pedit.c | 196 ++++++++++++++++++++++++++++++++--- 3 files changed, 208 insertions(+), 16 deletions(-) commit ea6da4fd388a1eeab30d64da3eab3c5338714c74 Author: Amir Vadai Date: Tue Feb 7 09:56:06 2017 +0200 net/skbuff: Introduce skb_mac_offset() Introduce skb_mac_offset() that could be used to get mac header offset. Signed-off-by: Amir Vadai Reviewed-by: Or Gerlitz Signed-off-by: David S. Miller include/linux/skbuff.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2bfc7452742617fe1182b742917e6e9032eae52c Author: Cédric Le Goater Date: Thu Feb 9 10:21:08 2017 +0100 dt-bindings: mtd: add a common label property to all mtd devices This can be used to easily identify a specific chip on a system with multiple chips. Signed-off-by: Cédric Le Goater Acked-by: Boris Brezillon Acked-by: Rob Herring Reviewed-by: Marek Vasut Signed-off-by: Brian Norris Documentation/devicetree/bindings/mtd/common.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 28309572aac4c632666053dc8bf9906a3594b8d2 Author: Cédric Le Goater Date: Thu Feb 9 10:21:07 2017 +0100 mtd: name the mtd device with an optional label property This can be used to easily identify a specific chip on a system with multiple chips. Suggested-by: Boris Brezillon Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Brian Norris include/linux/mtd/mtd.h | 3 +++ 1 file changed, 3 insertions(+) commit f6f94300cda0f85180a0dd8838d1cc855661e239 Author: Josef Bacik Date: Fri Feb 10 13:03:33 2017 -0500 block: set make_request_fn manually in blk_mq_update_nr_hw_queues Calling blk_queue_make_request resets a bunch of settings on the request_queue, but all we really want is to update the make_request_fn, so do this directly so we don't lose things like the logical and physical block sizes. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-mq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 398d8739bb900562f40e22aebdfc9970803d04b7 Merge: 4f04f68 7fa2c70 Author: Brian Norris Date: Fri Feb 10 10:05:51 2017 -0800 Merge tag 'spi-nor/for-4.11-v2' of git://github.com/spi-nor/linux From Cyrille: """ This pull request contains the following notable changes: - add support to the 4-byte address instruction set. - add support to new memory parts. - add support to S3AN memories. - add support to the Intel SPI controller. - add support to the Aspeed AST2400 and AST2550 controllers. - fix max SPI transfer and message sizes in m25p80_read(). - fix the Candence QSPI driver. - fix the Freescale QSPI driver. """ commit 4f04f68e1598087a8110e8946bfb321eebe115c9 Author: Brian Norris Date: Wed Feb 8 18:09:37 2017 -0800 mtd: physmap_of: fixup gemini/versatile dependencies physmap_of sort of depends on the gemini and versatile modules (when they're enabled), but this isn't expressed in Kconfig. Let's just merge the modules all together, when enabled. Then we can avoid exporting a few symbols, and the versatile and gemini code can now be modular again (the below commit accidentally made them built-in only). Resolves errors like this: ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined! ERROR: "of_flash_probe_gemini" [drivers/mtd/maps/physmap_of.ko] undefined! Fixes: 56ff337ea433 ("mtd: physmap_of: add a hook for Gemini flash probing") Cc: Linus Walleij Signed-off-by: Brian Norris Reviewed-by: Linus Walleij drivers/mtd/maps/Makefile | 8 ++++++-- drivers/mtd/maps/physmap_of_gemini.c | 1 - drivers/mtd/maps/physmap_of_versatile.c | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) commit 7da7a1a66e7700903bbc9ed09256fc95da34d43d Author: Bjorn Helgaas Date: Wed Feb 8 15:43:45 2017 -0600 PCI: xgene: Configure PCIe MPS settings Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 33707260422475385c6f33f526c71805a3dc5dab Author: Chris Packham Date: Wed Feb 8 09:28:15 2017 +1300 clk: mvebu: Expand mv98dx3236-core-clock support The initial implementation in commit e120c17a70e5 ("clk: mvebu: support for 98DX3236 SoC") hardcoded a fixed value for the main PLL frequency. Port code from the Marvell supplied Linux kernel to support different PLL frequencies and provide clock gating support. Signed-off-by: Chris Packham Signed-off-by: Stephen Boyd drivers/clk/mvebu/Makefile | 2 +- drivers/clk/mvebu/armada-xp.c | 13 --- drivers/clk/mvebu/mv98dx3236.c | 180 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 14 deletions(-) commit 48239135dd3fd4c5e90ae74cba79d798a9792238 Author: Baoyou Xie Date: Thu Feb 9 11:12:56 2017 +0800 clk: zte: add i2s clocks for zx296718 The i2s related clock support is missing from the existing zx296718 clock driver. This patch adds it, so that the upstream ZX I2S driver can work out. Signed-off-by: Baoyou Xie Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 4 ++++ 1 file changed, 4 insertions(+) commit a73effaf583f3e246b3e784b16443154a6105080 Author: Samuel Pitoiset Date: Thu Feb 9 23:28:24 2017 +0100 drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm() This removes code duplication. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4ce3bd45b351633f2a0512c587f7fcba2ce044e8 Author: Alex Deucher Date: Fri Feb 10 00:00:52 2017 -0500 drm/amdgpu: add more cases to DCE11 possible crtc mask setup Add cases for asics with 3 and 5 crtcs. Fixes an artificial limitation on asics with 3 or 5 crtcs. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99744 Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 58be2427da98a17426cff3d30c50e419781a230b Merge: 94134bf 90e0f0c Author: David S. Miller Date: Fri Feb 10 11:46:42 2017 -0500 Merge branch 'mlxsw-offload-mc-flood' Jiri Pirko says: ==================== mlxsw: Offload MC flood for unregister MC Nogah says: When multicast is enabled, the Linux bridge floods unregistered multicast packets only to ports connected to a multicast router. Devices capable of offloading the Linux bridge need to be made aware of such ports, for proper flooding behavior. On the other hand, when multicast is disabled, such packets should be flooded to all ports. This patchset aims to fix that, by offloading the multicast state and the list of multicast router ports. The first 3 patches adds switchdev attributes to offload this data. The rest of the patchset add implementation for handling this data in the mlxsw driver. The effects this data has on the MDB (namely, when the multicast is disabled the MDB should be considered as invalid, and when it is enabled, a packet that is flooded by it should also be flooded to the multicast routers ports) is subject of future work. Testing of this patchset included: Sending 3 mc packets streams, LL, register and unregistered, and checking that they reached only to the ports that should have received them. The configs were: mc disabled, mc without mc router ports and mc with fixed router port. It was checked for vlan aware bridge, vlan unaware bridge and vlan unaware bridge with another vlan unaware bridge on the same machine ==================== Signed-off-by: David S. Miller commit 90e0f0c1b4f2baa3639f957bfe904c9eda0d4db4 Author: Nogah Frankel Date: Thu Feb 9 14:54:49 2017 +0100 mlxsw: spectrum: Update mc_disabled flag by switchdev attr Add a function to update mc_disabled from switchdev attr SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 1e5d94327dfb0d3b877bb2a44328c0978734cfc2 Author: Nogah Frankel Date: Thu Feb 9 14:54:48 2017 +0100 mlxsw: spectrum: Extend port_orig_get for bridge devices The function mlxsw_sp_port_orig_get returns the vport from the physical port if needed, based on the original device. This patch addresses the case where the original device is a bridge. If it is vlan unaware bridge, it returns the matching vport. If it is vlan aware bridge, there is no matching vport, and it returns the original port. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8ecd4591e7612a7ea5c67589cf1a7f18bd17ba14 Author: Nogah Frankel Date: Thu Feb 9 14:54:47 2017 +0100 mlxsw: spectrum: Add an option to flood mc by mc_router_port The decision whether to flood a multicast packet to a port dependent on three flags: mc_disabled, mc_router_port, mc_flood. If mc_disabled is on, the port will be flooded according to mc_flood, otherwise, according to mc_router_port. To accomplish that, add those flags into the mlxsw_sp_port struct and update the mc flood table accordingly. Update mc_router_port by switchdev attribute SWITCHDEV_ATTR_ID_PORT_MC_ROUTER_PORT. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 34 ++++++++++++++++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) commit 71c365bdc4396893798c8e1c9247663096ff4829 Author: Nogah Frankel Date: Thu Feb 9 14:54:46 2017 +0100 mlxsw: spectrum: Separate bc and mc floods Break the bm (broadcast-multicast) into two tables, one for broadcast (and link local multicast that behaves like bc) and one for unknown multicasts. Add a bool into mlxsw_sp_port named mc_flood that reflect the value this port should have in the mc flood table (currently, always 1); Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 23 ++++++++++++++++------ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 ++++++++++++++------ 3 files changed, 35 insertions(+), 13 deletions(-) commit 63fe813c6008b5a10a06bffd64cee8da2984e716 Author: Nogah Frankel Date: Thu Feb 9 14:54:45 2017 +0100 mlxsw: spectrum: Change max vfid A user that wants many bridges will use 1.Q bridge which are scalable. One can have as many 1.Q bridges as vfids. This patch sets their number to 1k, which is a reasonably large number. This change is done here because the next patches will add a new flood table, and without it, it will increase the overall size of the flood tables dramatically. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69be01f374e4c09aae29be6e15a538ff0c282bb6 Author: Nogah Frankel Date: Thu Feb 9 14:54:44 2017 +0100 mlxsw: spectrum: Make port flood update more generic Currently, there is a per port flood update function only for the UC table. Make the function more generic by changing the table type to be an input. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) commit eaa7df3c5afe257e59e03746cdf9800fcd2494d2 Author: Nogah Frankel Date: Thu Feb 9 14:54:43 2017 +0100 mlxsw: spectrum: Break flood set func to be per table Currently, the flood set function can't operate on only one table, but sets both uc_flood and mb_flood together. This patch creates a function that sets the flood state per table. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 54 ++++++++++++++-------- 1 file changed, 34 insertions(+), 20 deletions(-) commit 6d5496483f5eb7b4da2e83c7b2149a21ad412d96 Author: Nogah Frankel Date: Thu Feb 9 14:54:42 2017 +0100 switchdev: bridge: Offload mc router ports Offload the mc router ports list, whenever it is being changed. It is done because in some cases mc packets needs to be flooded to all the ports in this list. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Acked-by: Ivan Vecera Signed-off-by: David S. Miller include/net/switchdev.h | 2 ++ net/bridge/br_multicast.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit f12e7d95d12fa4dbe655bd038a6d38526a879deb Author: Nogah Frankel Date: Thu Feb 9 14:54:41 2017 +0100 bridge: mcast: Merge the mc router ports deletions to one function There are three places where a port gets deleted from the mc router port list. This patch join the actual deletion to one function. It will be helpful for later patch that will offload changes in the mc router ports list. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Acked-by: Ivan Vecera Signed-off-by: David S. Miller net/bridge/br_multicast.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 147c1e9b902c25c868024260d24bb0b1dac1433d Author: Nogah Frankel Date: Thu Feb 9 14:54:40 2017 +0100 switchdev: bridge: Offload multicast disabled Offload multicast disabled flag, for more accurate mc flood behavior: When it is on, the mdb should be ignored. When it is off, unregistered mc packets should be flooded to mc router ports. Signed-off-by: Nogah Frankel Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Acked-by: Ivan Vecera Signed-off-by: David S. Miller include/net/switchdev.h | 2 ++ net/bridge/br_multicast.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 94134bf89a4747ac370ffea614a2ba483edf0ccc Merge: b4c4ebc 40c81b2 Author: David S. Miller Date: Fri Feb 10 11:38:10 2017 -0500 Merge branch 'sched-cls_api-small-cleanup' Jiri Pirko says: ==================== sched: cls_api: small cleanup This patchset makes couple of things in cls_api code a bit nicer and easier for reader to digest. ==================== Signed-off-by: David S. Miller commit 40c81b25b16cd871afe70630c131bd2544848d1f Author: Jiri Pirko Date: Thu Feb 9 14:39:00 2017 +0100 sched: check negative err value to safe one level of indent As it is more common, check err for !0. That allows to safe one level of indentation and makes the code easier to read. Also, make 'next' variable global in function as it is used twice. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 7215032ced14f9943c8b72b61f4ac52902002158 Author: Jiri Pirko Date: Thu Feb 9 14:38:59 2017 +0100 sched: add missing curly braces in else branch in tc_ctl_tfilter Curly braces need to be there, for stylistic reasons. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6bb16e7ae26095892e8c51de4142d8f344793340 Author: Jiri Pirko Date: Thu Feb 9 14:38:58 2017 +0100 sched: move err set right before goto errout in tc_ctl_tfilter This makes the reader to know right away what is the error value. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 33a48927c193d030c80ecaeb3e021b7ed85f9c78 Author: Jiri Pirko Date: Thu Feb 9 14:38:57 2017 +0100 sched: push TC filter protocol creation into a separate function Make the long function tc_ctl_tfilter a little bit shorter and easier to read. Also make the creation of filter proto symmetric to destruction. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 110 ++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 51 deletions(-) commit cf1facda2f61bc3e9ffd985b6d624dec6ad3f279 Author: Jiri Pirko Date: Thu Feb 9 14:38:56 2017 +0100 sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api Creation is done in this file, move destruction to be at the same place. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 ++ include/net/sch_generic.h | 2 -- net/sched/cls_api.c | 21 +++++++++++++++++++++ net/sched/sch_api.c | 22 ---------------------- net/sched/sch_atm.c | 1 + net/sched/sch_cbq.c | 1 + net/sched/sch_choke.c | 1 + net/sched/sch_dsmark.c | 1 + net/sched/sch_fq_codel.c | 1 + net/sched/sch_htb.c | 1 + net/sched/sch_ingress.c | 1 + net/sched/sch_multiq.c | 2 +- net/sched/sch_prio.c | 2 +- net/sched/sch_sfb.c | 1 + net/sched/sch_sfq.c | 1 + 15 files changed, 34 insertions(+), 26 deletions(-) commit 79112c26f14c38ddbac3b2739469e373ef424fe6 Author: Jiri Pirko Date: Thu Feb 9 14:38:55 2017 +0100 sched: rename tcf_destroy to tcf_destroy_proto This function destroys TC filter protocol, not TC filter. So name it accordingly. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/sch_generic.h | 2 +- net/sched/cls_api.c | 8 ++++---- net/sched/sch_api.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit b4db2b35fc444409daf483006111a2a705550fff Author: Arnd Bergmann Date: Fri Feb 10 16:34:07 2017 +0000 afs: Use core kernel UUID generation AFS uses a time based UUID to identify the host itself. This requires getting a timestamp which is currently done through the getnstimeofday() interface that we want to eventually get rid of. Instead of replacing it with a ktime-based interface, simply remove the entire function and use generate_random_uuid() instead, which has a v4 ("completely random") UUID instead of the time-based one. Signed-off-by: Arnd Bergmann Signed-off-by: David Howells fs/afs/internal.h | 11 +++++------ fs/afs/main.c | 48 +----------------------------------------------- fs/afs/netdevices.c | 21 --------------------- 3 files changed, 6 insertions(+), 74 deletions(-) commit ff548773106ec7f8031bc6172e0234bd2a02c19c Author: David Howells Date: Fri Feb 10 16:34:07 2017 +0000 afs: Move UUID struct to linux/uuid.h Move the afs_uuid struct to linux/uuid.h, rename it to uuid_v1 and change the u16/u32 fields to __be16/__be32 instead so that the structure can be cast to a 16-octet network-order buffer. Signed-off-by: David Howells Reviewed-by: Arnd Bergmann Date: Fri Feb 10 11:32:14 2017 -0500 Merge branch 'mlxsw-identical-routes-handling' Jiri Pirko says: ==================== mlxsw: Identical routes handling Ido says: The kernel can store several FIB aliases that share the same prefix and length. These aliases can differ in other parameters such as TOS and metric, which are taken into account during lookup. Offloading devices might not have the same flexibility, allowing only a single route with the same prefix and length to be reflected. mlxsw is one such device. This patchset aims to correctly handle this situation in the mlxsw driver. The first four patches introduce small changes in the IPv4 FIB code, so that listeners of the FIB notification chain will be able to correctly handle identical routes. The last three patches build on top of previous work and introduce the necessary changes in the mlxsw driver. The biggest change is the introduction of a FIB node, where identical routes are chained, instead of a primitive reference counting. This is explained in detail in the fifth patch. ==================== Signed-off-by: David S. Miller commit 599cf8f95f221aa03ac5a6e5e3ee4bc97a6eade5 Author: Ido Schimmel Date: Thu Feb 9 10:28:44 2017 +0100 mlxsw: spectrum_router: Add support for route replace Upon the reception of an ENTRY_REPLACE notification, resolve the FIB node corresponding to the prefix and length and insert the new route before the first matching entry. Since the notification also signals the deletion of the replaced route, delete it from the driver's cache. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 44 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) commit 4283bce5f8c2307d47313e0429e5f1357c43023d Author: Ido Schimmel Date: Thu Feb 9 10:28:43 2017 +0100 mlxsw: spectrum_router: Add support for route append When a new route is appended, it's placed after existing routes sharing the same parameters (prefix, length, table ID, TOS and priority). While the device supports only one route with the same prefix and length in a single table, it's important to correctly place the appended route in the driver's cache, as when a route is deleted the next one is programmed into the device. Following the reception of an ENTRY_APPEND notification, resolve the FIB node corresponding to the prefix and length and correctly place the new entry in its entry list. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 43 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) commit 9aecce1c7d977e52759167a4916d71e80aaf5070 Author: Ido Schimmel Date: Thu Feb 9 10:28:42 2017 +0100 mlxsw: spectrum_router: Correctly handle identical routes In the device, routes are indexed in a routing table based on the prefix and its length. This is in contrast to the kernel's FIB where several FIB aliases can exist with these parameters being identical. In such cases, the routes will be sorted by table ID (LOCAL first, then MAIN), TOS and finally priority (metric). During lookup, these routes will be evaluated in order. In case the packet's TOS field is non-zero and a FIB alias with a matching TOS is found, then it's selected. Otherwise, the lookup defaults to the route with TOS 0 (if it exists). However, if the requested scope is narrower than the one found, then the lookup continues. To best reflect the kernel's datapath we should take the above into account. Given a prefix and its length, the reflected route will always be the first one in the FIB alias list. However, if the route has a non-zero TOS then its action will be converted to trap instead of forward, since we currently don't support TOS-based routing. If this turns out to be a real issue, we can add support for that using policy-based switching. The route's scope can be effectively ignored as any packet being routed by the device would've been looked-up using the widest scope (UNIVERSE). To achieve that we need to do two changes. Firstly, we need to create another struct (FIB node) that will hold the list of FIB entries sharing the same prefix and length. This struct will be hashed using these two parameters. Secondly, we need to change the route reflection to match the above logic, so that the first FIB entry in the list will be programmed into the device while the rest will remain in the driver's cache in case of subsequent changes. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 581 ++++++++++++++------- 1 file changed, 403 insertions(+), 178 deletions(-) commit 2f3a5272e5c16c3c10fbba06928a513f9b1e2fcd Author: Ido Schimmel Date: Thu Feb 9 10:28:41 2017 +0100 ipv4: fib: Add events for FIB replace and append The FIB notification chain currently uses the NLM_F_{REPLACE,APPEND} flags to signal routes being replaced or appended. Instead of using netlink flags for in-kernel notifications we can simply introduce two new events in the FIB notification chain. This has the added advantage of making the API cleaner, thereby making it clear that these events should be supported by listeners of the notification chain. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko CC: Patrick McHardy Signed-off-by: David S. Miller include/net/ip_fib.h | 3 ++- net/ipv4/fib_trie.c | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) commit 5b7d616dbccc2fd6ae959045e1a9ca17de5dfc2a Author: Ido Schimmel Date: Thu Feb 9 10:28:40 2017 +0100 ipv4: fib: Send notification before deleting FIB alias When a FIB alias is replaced following NLM_F_REPLACE, the ENTRY_ADD notification is sent after the reference on the previous FIB info was dropped. This is problematic as potential listeners might need to access it in their notification blocks. Solve this by sending the notification prior to the deletion of the replaced FIB alias. This is consistent with ENTRY_DEL notifications. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko CC: Patrick McHardy Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 42d5aa76ec8fc9602922cc590a437ecd6693523b Author: Ido Schimmel Date: Thu Feb 9 10:28:39 2017 +0100 ipv4: fib: Send deletion notification with actual FIB alias type When a FIB alias is removed, a notification is sent using the type passed from user space - can be RTN_UNSPEC - instead of the actual type of the removed alias. This is problematic for listeners of the FIB notification chain, as several FIB aliases can exist with matching parameters, but the type. Solve this by passing the actual type of the removed FIB alias. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko CC: Patrick McHardy Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58e3bdd59742feef680861acec19126e40e4fa8d Author: Ido Schimmel Date: Thu Feb 9 10:28:38 2017 +0100 ipv4: fib: Only flush FIB aliases belonging to currently flushed table In case the MAIN table is flushed and its trie is shared with the LOCAL table, then we might be flushing FIB aliases belonging to the latter. This can lead to FIB_ENTRY_DEL notifications sent with the wrong table ID. The above doesn't affect current listeners, as the table ID is ignored during entry deletion, but this will change later in the patchset. When flushing a particular table, skip any aliases belonging to a different one. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko CC: Alexander Duyck CC: Patrick McHardy Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f1ba82616c3368e1ae9e64ef29cf3edc1be0860d Author: Paolo Valente Date: Tue Feb 7 18:24:43 2017 +0100 blk-mq: pass bio to blk_mq_sched_get_rq_priv bio is used in bfq-mq's get_rq_priv, to get the request group. We could pass directly the group here, but I thought that passing the bio was more general, giving the possibility to get other pieces of information if needed. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/blk-mq-sched.c | 8 +++++--- block/blk-mq-sched.h | 5 +++-- include/linux/elevator.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 17627157cda13089d8a6c1c2d35acb07334b899c Author: Konstantin Khlebnikov Date: Wed Feb 8 14:28:55 2017 +0300 kernfs: handle null pointers while printing node name and path Null kernfs nodes could be found at cgroups during construction. It seems safer to handle these null pointers right in kernfs in the same way as printf prints "(null)" for null pointer string. Signed-off-by: Konstantin Khlebnikov Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 10 ++++++++++ include/trace/events/cgroup.h | 20 ++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) commit 6d35b131caea3e41f06625e391833e183f9042c0 Author: Sergio Valverde Date: Tue Jan 31 13:33:47 2017 -0600 tty: Remove extra include in HVC console tty framework An extra "init.h" include is found in the HVC console code. As such, the extra line is deleted. Signed-off-by: Sergio Valverde Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvc_console.c | 1 - 1 file changed, 1 deletion(-) commit def95c73567dfacb22900cd0c4f01caff39e4c9e Author: Martijn Coenen Date: Fri Feb 3 14:40:52 2017 -0800 binder: Add support for file-descriptor arrays This patch introduces a new binder_fd_array object, that allows us to support one or more file descriptors embedded in a buffer that is scatter-gathered. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 137 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/android/binder.h | 28 ++++++++ 2 files changed, 165 insertions(+) commit 7980240b6d63e0694f5023c29cbc648fafdf3e23 Author: Martijn Coenen Date: Fri Feb 3 14:40:51 2017 -0800 binder: Add support for scatter-gather Previously all data passed over binder needed to be serialized, with the exception of Binder objects and file descriptors. This patchs adds support for scatter-gathering raw memory buffers into a binder transaction, avoiding the need to first serialize them into a Parcel. To remain backwards compatibile with existing binder clients, it introduces two new command ioctls for this purpose - BC_TRANSACTION_SG and BC_REPLY_SG. These commands may only be used with the new binder_transaction_data_sg structure, which adds a field for the total size of the buffers we are scatter-gathering. Because memory buffers may contain pointers to other buffers, we allow callers to specify a parent buffer and an offset into it, to indicate this is a location pointing to the buffer that we are fixing up. The kernel will then take care of fixing up the pointer to that buffer as well. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen [jstultz: Fold in small fix from Amit Pundir ] Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 244 ++++++++++++++++++++++++++++++++++-- include/uapi/linux/android/binder.h | 45 +++++++ 2 files changed, 276 insertions(+), 13 deletions(-) commit 4bfac80af3a63f2971b889b28999c830929e9256 Author: Martijn Coenen Date: Fri Feb 3 14:40:50 2017 -0800 binder: Add extra size to allocator The binder_buffer allocator currently only allocates space for the data and offsets buffers of a Parcel. This change allows for requesting an additional chunk of data in the buffer, which can for example be used to hold additional meta-data about the transaction (eg a security context). Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit a056af42032e56f6ee8e07cd22f1ea2b2e07f51b Author: Martijn Coenen Date: Fri Feb 3 14:40:49 2017 -0800 binder: Refactor binder_transact() Moved handling of fixup for binder objects, handles and file descriptors into separate functions. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 309 ++++++++++++++++++++++++++--------------------- 1 file changed, 172 insertions(+), 137 deletions(-) commit ac4812c5ffbb88dd3280a6dacd39fcb73e077fe4 Author: Martijn Coenen Date: Fri Feb 3 14:40:48 2017 -0800 binder: Support multiple /dev instances Add a new module parameter 'devices', that can be used to specify the names of the binder device nodes we want to populate in /dev. Each device node has its own context manager, and is therefore logically separated from all the other device nodes. The config option CONFIG_ANDROID_BINDER_DEVICES can be used to set the default value of the parameter. This approach was favored over using IPC namespaces, mostly because we require a single process to be a part of multiple binder contexts, which seemed harder to achieve with namespaces. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen [jstultz: minor checkpatch warning fix] Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/Kconfig | 12 +++++++ drivers/android/binder.c | 83 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 84 insertions(+), 11 deletions(-) commit 14db31814a9a21cf343e71d6773e7683a5b3f64d Author: Martijn Coenen Date: Fri Feb 3 14:40:47 2017 -0800 binder: Deal with contexts in debugfs Properly print the context in debugfs entries. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 342e5c90b60134ddd6e4d59e521b6aa66b75bdad Author: Martijn Coenen Date: Fri Feb 3 14:40:46 2017 -0800 binder: Support multiple context managers Move the context manager state into a separate struct context, and allow for each process to have its own context associated with it. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen [jstultz: Minor checkpatch fix] Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 59 +++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 21 deletions(-) commit feba3900cabb8e7c87368faa28e7a6936809ba22 Author: Martijn Coenen Date: Fri Feb 3 14:40:45 2017 -0800 binder: Split flat_binder_object flat_binder_object is used for both handling binder objects and file descriptors, even though the two are mostly independent. Since we'll have more fixup objects in binder in the future, instead of extending flat_binder_object again, split out file descriptors to their own object while retaining backwards compatibility to existing user-space clients. All binder objects just share a header. Cc: Greg Kroah-Hartman Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Martijn Coenen Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 158 +++++++++++++++++++++++++----------- include/uapi/linux/android/binder.h | 31 ++++++- 2 files changed, 137 insertions(+), 52 deletions(-) commit 8fa8bea728c261551baed01ef230e1138f2944ce Author: Dmitry Torokhov Date: Thu Feb 9 10:15:53 2017 -0800 auxdisplay: ht16k33: remove private workqueue There is no need for the driver to use private workqueue, standard system workqueue should suffice as they are going to use the same worker pool anyway. Acked-by: Robin van der Gracht Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/ht16k33.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit cac513f1a9f7ace21d27665435f8fe7e39050396 Author: Dmitry Torokhov Date: Thu Feb 9 10:15:52 2017 -0800 auxdisplay: ht16k33: rework input device initialization This patch fixes following issues in input device (keypad) handling: - requesting IRQ before allocating and initializing parts of the device that can be referenced from IRQ handler is racy, even if we try to disable interrupt after requesting it. Let's move allocations around so that everything is ready by the time we request IRQ. - using threaded interrupt handler to schedule a work item it sub-optimal. Disabling and then re-enabling interrupts in work item and in open/close methods is prone to races and exactly the reason theraded interrupts were introduced. Let's use the infrastructure properly and keep scanning the matrix array in IRQ thread, stopping when there are no keys, or when told to do so. Signed-off-by: Dmitry Torokhov Tested-by: Robin van der Gracht Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/ht16k33.c | 298 +++++++++++++++++++++---------------------- 1 file changed, 145 insertions(+), 153 deletions(-) commit bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0 Author: Dmitry Torokhov Date: Thu Feb 9 10:15:51 2017 -0800 auxdisplay: ht16k33: do not try to free fbdev 'fbdev' is allocated as part of larger ht16k33_priv structure; trying to free it will cause troubles. Acked-by: Robin van der Gracht Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/ht16k33.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 372b1e91343e657a7cc5e2e2bcecd5140ac28119 Author: K. Y. Srinivasan Date: Wed Feb 8 18:30:56 2017 -0700 drivers: hv: Turn off write permission on the hypercall page The hypercall page only needs to be executable but currently it is setup to be writable as well. Fix the issue. Signed-off-by: K. Y. Srinivasan Cc: Acked-by: Kees Cook Reported-by: Stephen Hemminger Tested-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3454323c954775098871559b5c23d877c3e23f77 Author: Stephen Hemminger Date: Sun Feb 5 17:20:34 2017 -0700 vmbus: remove unused kickq argument to sendpacket Since sendpacket no longer uses kickq argument remove it. Remove it no longer used xmit_more in sendpacket in netvsc as well. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 19 +++++++++---------- drivers/net/hyperv/netvsc.c | 21 +++------------------ include/linux/hyperv.h | 6 ++---- 3 files changed, 14 insertions(+), 32 deletions(-) commit f6c4391553573d592212e6624cfba5e2752cd5c8 Author: Stephen Hemminger Date: Sun Feb 5 17:20:33 2017 -0700 vmbus: remove no longer used signal_policy The explicit signal policy is no longer used. A different mechanism will be added later when xmit_more is supported. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman include/linux/hyperv.h | 18 ------------------ 1 file changed, 18 deletions(-) commit b103a56f80878b4370522ec26017fcadd526f5ad Author: Stephen Hemminger Date: Sun Feb 5 17:20:32 2017 -0700 vmbus: drop no longer used kick_q argument The flag to cause notification of host is unused after commit a01a291a282f7c2e ("Drivers: hv: vmbus: Base host signaling strictly on the ring state"). Therefore remove it from the ring buffer internal API. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 13 ++++--------- drivers/hv/hyperv_vmbus.h | 5 ++--- drivers/hv/ring_buffer.c | 8 +++----- 3 files changed, 9 insertions(+), 17 deletions(-) commit 5c1bec61fdfcd056df909a712e2a86bbaeb0f942 Author: Stephen Hemminger Date: Sun Feb 5 17:20:31 2017 -0700 vmbus: use kernel bitops for traversing interrupt mask Use standard kernel operations for find first set bit to traverse the channel bit array. This has added benefit of speeding up lookup on 64 bit and because it uses find first set instruction. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 8 ++----- drivers/hv/connection.c | 55 +++++++++++++++-------------------------------- drivers/hv/hyperv_vmbus.h | 16 ++++++++------ drivers/hv/vmbus_drv.c | 4 +--- 4 files changed, 29 insertions(+), 54 deletions(-) commit bb6a4db92f8345a210b369b791e6920253b10437 Author: K. Y. Srinivasan Date: Sat Feb 4 09:57:15 2017 -0700 Drivers: hv: util: Fix a typo Fix a typo. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3716a49a81ba19dda7202633a68b28564ba95eb5 Author: Vitaly Kuznetsov Date: Sat Feb 4 09:57:14 2017 -0700 hv_utils: implement Hyper-V PTP source With TimeSync version 4 protocol support we started updating system time continuously through the whole lifetime of Hyper-V guests. Every 5 seconds there is a time sample from the host which triggers do_settimeofday[64](). While the time from the host is very accurate such adjustments may cause issues: - Time is jumping forward and backward, some applications may misbehave. - In case an NTP server runs in parallel and uses something else for time sync (network, PTP,...) system time will never converge. - Systemd starts annoying you by printing "Time has been changed" every 5 seconds to the system log. Instead of doing in-kernel time adjustments offload the work to an NTP client by exposing TimeSync messages as a PTP device. Users may now decide what they want to use as a source. I tested the solution with chrony, the config was: refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0 The result I'm seeing is accurate enough, the time delta between the guest and the host is almost always within [-10us, +10us], the in-kernel solution was giving us comparable results. I also tried implementing PPS device instead of PTP by using not currently used Hyper-V synthetic timers (we use only one of four for clockevent) but with PPS source only chrony wasn't able to give me the required accuracy, the delta often more that 100us. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 179 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 152 insertions(+), 27 deletions(-) commit dee863b571b0a76e9c549ee99e8782bb4bc6502b Author: Vitaly Kuznetsov Date: Sat Feb 4 09:57:13 2017 -0700 hv: export current Hyper-V clocksource As a preparation to implementing Hyper-V PTP device supporting .getcrosststamp we need to export a reference to the current Hyper-V clocksource in use (MSR or TSC page). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 13 +++++++++---- arch/x86/include/asm/mshyperv.h | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) commit 9b06e1018abc65585b07c75c5b3f406dbabe7005 Author: K. Y. Srinivasan Date: Sat Feb 4 08:46:23 2017 -0700 Drivers: hv: Fix the bug in generating the guest ID Fix the bug in the generation of the guest ID. Without this fix the host side telemetry code is broken. Signed-off-by: K. Y. Srinivasan Fixes: 352c9624242d ("Drivers: hv: vmbus: Move the definition of generate_guest_id()") Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fda4ae1819ce3603857a6baceda53d2c46d5bbd9 Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:10 2017 +0100 misc: panel: Abstract temporary backlight handling Currently the periodic scan timer is used for three purposes, entangling keypad and display handling, which are both optional: 1. Scanning the keypad, 2. Flashing the backlight when a key is pressed, 3. Disabling temporary backlighting after a fixed period of time. Abstract the second purpose using a new lcd_poke() function. Make the non-periodic temporary backlight handling independent from keypad handling by converting it to a delayed workqueue. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 101 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 41 deletions(-) commit 204a4f6d67a4d7e65571c21bd90039fdccc35b2c Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:09 2017 +0100 misc: panel: Add lcd_home() helper Add a helper function to move the cursor to the home position, so callers no longer need access to internal state. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit 3f77b43965054c17fbc3111650c4e90f294a7bbe Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:08 2017 +0100 misc: panel: Remove always-true check from panel_detach() panel_detach() already verified that pptr is a valid pointer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 9db3cf1ccd5f78ad5c2a01a2fd5c5774d0ed0f6f Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:07 2017 +0100 misc: panel: Move all suboptions into a big if section All 18 suboptions related to the panel driver have individual dependencies on PANEL. Replace them by a single "if PANEL / endif # PANEL" section for easier dependency management. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 731fcec46980cb21fd429e9039f565b9dbe060ae Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:06 2017 +0100 misc: panel: Remove reference to misc device support As of commit 7c5763b8453a9487 ("drivers: misc: Remove MISC_DEVICES config option"), misc device support no longer needs to be enabled manually. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e28fa714aa8bb682d07136ba3821bc883c78f6df Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:05 2017 +0100 misc: panel: Remove unused LCD_FLAG_S and LCD_FLAG_ID These definitions were never used in any publicly available version since (at least) 2004. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 2 -- 1 file changed, 2 deletions(-) commit 30f468b2ea7a75aa7e212b7d89eb136a55462ee8 Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:04 2017 +0100 misc: panel: Remove PANEL_VERSION Hardcoded driver versions are so pre-git. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 84a1ed0407d209beff4d9cb41120d0f69a89d4b8 Author: Geert Uytterhoeven Date: Mon Feb 6 15:38:03 2017 +0100 misc: panel: Fix LCD_FLAG_F/LCD_FLAG_N exchange LCD_FLAG_F is the font flag, LCD_FLAG_N is the two-lines flag. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/misc/panel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 90beaf64226742733c1b38d086f9e5dcd3b7b0e5 Author: Wei Yongjun Date: Thu Feb 9 15:45:19 2017 +0000 w1: ds2405: use module_w1_family to simplify the code module_w1_family() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Acked-by: Maciej S. Szmigiero Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2405.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 45003a1e251a9777a55ab46bc49f6ddf747f7f94 Author: Wei Yongjun Date: Thu Feb 9 15:45:42 2017 +0000 w1: ds2490: use kmemdup rather than duplicating its implementation Use kmemdup rather than duplicating its implementation. Generated by: scripts/coccinelle/api/memdup.cocci Signed-off-by: Wei Yongjun Acked-by: Maciej S. Szmigiero Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds2490.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 425902f5c8e3034b2d9d7a714289d8d579c733b2 Author: Jason Gunthorpe Date: Wed Feb 1 12:48:45 2017 -0700 fpga zynq: Use the scatterlist interface This allows the driver to avoid a high order coherent DMA allocation and memory copy. With this patch it can DMA directly from the kernel pages that the bitfile is stored in. Since this is now a gather DMA operation the driver uses the ISR to feed the chips DMA queue with each entry from the SGL. Signed-off-by: Jason Gunthorpe Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman drivers/fpga/zynq-fpga.c | 174 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 135 insertions(+), 39 deletions(-) commit baa6d396635129d8a67793e884f3b2182c7354b3 Author: Jason Gunthorpe Date: Wed Feb 1 12:48:44 2017 -0700 fpga: Add scatterlist based programming Requiring contiguous kernel memory is not a good idea, this is a limited resource and allocation can fail under normal work loads. This introduces a .write_sg op that supporting drivers can provide to DMA directly from dis-contiguous memory and a new entry point fpga_mgr_buf_load_sg that users can call to directly provide page lists. The full matrix of compatibility is provided, either the linear or sg interface can be used by the user with a driver supporting either interface. A notable change for drivers is that the .write op can now be called multiple times. Signed-off-by: Jason Gunthorpe Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman Documentation/fpga/fpga-mgr.txt | 19 +++- drivers/fpga/fpga-mgr.c | 236 +++++++++++++++++++++++++++++++++++----- include/linux/fpga/fpga-mgr.h | 5 + 3 files changed, 227 insertions(+), 33 deletions(-) commit b496df86ac1bbe393a55ddbfed35d46e74ef9767 Author: Jason Gunthorpe Date: Wed Feb 1 12:48:43 2017 -0700 fpga zynq: Check the bitstream for validity There is no sense in sending a bitstream we know will not work, and with the variety of options for bitstream generation in Xilinx tools it is not terribly clear what the correct input should be. This is particularly important for Zynq since auto-correction was removed from the driver and the Zynq hardware only accepts a bitstream format that is different from what the Xilinx tools typically produce. Worse, the hardware provides no indication why the bitstream fails, it simply times out if the input is wrong. The best option here is to have the kernel print a message informing the user they are using a malformed bistream and programming failure isn't for any of the myriad of other reasons. Signed-off-by: Jason Gunthorpe Acked-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/zynq-fpga.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6b45e0f24c7b5316dea7ed5995e1b809a3266b43 Author: Jason Gunthorpe Date: Wed Feb 1 12:48:42 2017 -0700 fpga zynq: Check for errors after completing DMA The completion did not check the interrupt status to see if any error bits were asserted, check error bits and dump some registers if things went wrong. A few fixes are needed to make this work, the IXR_ERROR_FLAGS_MASK was wrong, it included the done bits, which shows a bug in mask/unmask_irqs which were using the wrong bits, simplify all of this stuff. Signed-off-by: Jason Gunthorpe Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/zynq-fpga.c | 54 ++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit cb97fbbcac15982406e0c74cd5512a8b6fcf10b3 Author: Alexander Usyskin Date: Wed Feb 8 00:41:45 2017 +0200 mei: remove support for broken parallel read Parallel reads from multiple threads on a file descriptor are not well defined and racy. It is safer to return to original behavior and simply fail the additional read. The solution is to remove request for next read credit. Cc: #4.9 Fixes: ff1586a7ea57 ("mei: enqueue consecutive reads") Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit dd37eed7db0f7607fa41887c11c1e428faa15d0c Author: Jeremy Kerr Date: Wed Feb 1 10:53:43 2017 -0600 drivers/fsi: add driver to device matches Driver bind to devices based on the engine types & (optional) versions. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 21 +++++++++++++++++++++ include/linux/fsi.h | 21 +++++++++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) commit fda07a6c94ac5c9bd73d7b0134c6cc6861375341 Author: Jeremy Kerr Date: Wed Feb 1 10:53:42 2017 -0600 drivers/fsi: Add device & driver definitions Add structs for fsi devices & drivers, and struct device conversion functions. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Greg Kroah-Hartman include/linux/fsi.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0508ad1fff11a8b0acdf0333b5fe108d7bd5fce4 Author: Jeremy Kerr Date: Wed Feb 1 10:53:41 2017 -0600 drivers/fsi: Add empty fsi bus definitions This change adds the initial (empty) fsi bus definition, and introduces drivers/fsi/. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Greg Kroah-Hartman drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/fsi/Kconfig | 12 ++++++++++++ drivers/fsi/Makefile | 2 ++ drivers/fsi/fsi-core.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/fsi.h | 22 ++++++++++++++++++++++ 6 files changed, 77 insertions(+) commit 38b0a526ec33314ee1d9926e3a347078f63eac8e Merge: 776906f 326ed31 Author: Thierry Reding Date: Fri Feb 10 15:15:56 2017 +0100 Merge branch 'for-4.11/drivers' into for-next commit 776906ff0350de74441a2e2387a2a69f55f0f71c Merge: 652f319 bf7696a Author: Thierry Reding Date: Fri Feb 10 15:15:55 2017 +0100 Merge branch 'for-4.11/acpi' into for-next commit 652f319667383f2b2c62dda7841265bedd89c5a3 Merge: 0c744ea b526a31 Author: Thierry Reding Date: Fri Feb 10 15:15:54 2017 +0100 Merge branch 'for-4.11/core' into for-next commit bf7696a12071afaca0139d7b8b9eadfc77252876 Author: Hans de Goede Date: Sun Jan 22 17:14:09 2017 +0100 acpi: lpss: call pwm_add_table() for BSW PWM device On x86 we do not have devicetree to link the PWM controller and the display controller together. So someone needs to call pwm_add_table() to create the link, so that the i915 driver's pwm_get(dev, "pwm_backlight") call returns the lpss' pwm0. The PWM subsystem does not want to have pwm_add_table() calls directly in PWM drivers (this leads to probe ordering issues), so lets do it here since the acpi-lpss code is always builtin. Signed-off-by: Hans de Goede Acked-by: Rafael J. Wysocki Signed-off-by: Thierry Reding drivers/acpi/acpi_lpss.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3aeeb37569a983a1254d7d908e9b1a279765bf67 Merge: 0c744ea b526a31 Author: Thierry Reding Date: Fri Feb 10 15:14:50 2017 +0100 Merge branch 'for-4.11/core' into for-4.11/acpi commit 172c33cb61da0df5ccbdf1a8e736c8837d165a00 Author: Jan Kiszka Date: Wed Feb 8 17:09:09 2017 +0100 serial: exar: Enable MSI support Use pci_alloc_irq_vectors to enable MSI when available. At least the XR17V352 supports this. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7e12357ed64afdc8e60d64b8f8f17d711acf950a Author: Jan Kiszka Date: Wed Feb 8 17:09:08 2017 +0100 serial: exar: Move register defines from uapi header to consumer site None of these registers is relevant for the userspace API. Signed-off-by: Jan Kiszka Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 13 +++++++++++++ drivers/tty/serial/8250/8250_port.c | 6 ++++++ include/uapi/linux/serial_reg.h | 18 ------------------ 3 files changed, 19 insertions(+), 18 deletions(-) commit 8d2932dd0634ebeb0a42df896976772bdb569bfe Merge: 99e8ccd fff2fd1 3b6bb5b aac7d39 087a908 2c9f1af f7116e1 d0f6f58 Author: Joerg Roedel Date: Fri Feb 10 15:13:10 2017 +0100 Merge branches 'iommu/fixes', 'arm/exynos', 'arm/renesas', 'arm/smmu', 'arm/mediatek', 'arm/core', 'x86/vt-d' and 'core' into next commit 0d560a1d549379e46139fb9eeae0b43328c76dea Author: Jan Kiszka Date: Wed Feb 8 17:09:07 2017 +0100 serial: pci: Remove unused pci_boards entries Became obsolete with the split-out of 8250_exar. Signed-off-by: Jan Kiszka Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit fc6cc9615779183f07d6ff4065368a732d09f49e Author: Jan Kiszka Date: Wed Feb 8 17:09:06 2017 +0100 serial: exar: Move Commtech adapters to 8250_exar as well Those are Exar-based, too. With the required refactoring of the code to fit into 8250_exar, we automatically fix the same issue pci_xr17v35x_setup had before: 8XMODE, FCTL, TXTRG and RXTRG were always only set for port 0. Now they are initialized for the correct target port by using port.membase. Now we can also cleanly fix the blacklist of 8250_pci so that all Commtech devices are rejected and 8250_exar can handle them. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 83 +++++++++++++++++++-- drivers/tty/serial/8250/8250_pci.c | 139 +----------------------------------- 2 files changed, 79 insertions(+), 143 deletions(-) commit 7795753661f1a9423c3c8fbde322f6a2a8b94b68 Author: Jan Kiszka Date: Wed Feb 8 17:09:05 2017 +0100 serial: exar: Fix feature control register constants According to the XR17V352 manual, bit 4 is IrDA control and bit 5 for 485. Fortunately, no driver used them so far. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman include/uapi/linux/serial_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b5f252d67afd7bd5b923c664206d60800bf5054 Author: Jan Kiszka Date: Wed Feb 8 17:09:04 2017 +0100 serial: exar: Fix initialization of EXAR registers for ports > 0 So far, pci_xr17v35x_setup always initialized 8XMODE, FCTR & Co. for port 0 because it used the address of that port instead of moving the pointer according to the port number. Fix this and remove the unneeded temporary ioremap by moving default_setup up and reusing the membase it fills into the port structure. Fixes: 14faa8cce88e ("tty/8250 Add support for Commtech's Fastcom Async-335 and Fastcom Async-PCIe cards") Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 24572af4fb6ce0726dbe12b0286de11d25ff008b Author: Jan Kiszka Date: Wed Feb 8 17:09:03 2017 +0100 serial: exar: Fix mapping of port I/O resources pcim_iomap_table only returns the table of mapping, it does not perform them. For that, we need to call pcim_iomap, but only if that mapping was not done before. Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci") Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 3 +++ 1 file changed, 3 insertions(+) commit 90afa5255f5c5ae67c869918e4c5f60b8580db70 Author: Ulrich Hecht Date: Wed Feb 8 18:31:14 2017 +0100 serial: sh-sci: fix hardware RX trigger level setting 1. Do not set the RX trigger level for software timeout devices on reset; there is no timeout by default, and data will rot. 2. Do set the RX trigger level for hardware timeout devices when set via sysfs attribute. Fixes SCIFA-type serial consoles. Signed-off-by: Ulrich Hecht Tested-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6a5f0e2f9352accf857f683518bd3cc6ef6ae6c6 Author: Alexandre Belloni Date: Fri Feb 3 23:53:16 2017 +0100 tty/serial: atmel: ensure state is restored after suspending When going to suspend, the UART registers may be lost because the power to VDDcore is cut. This is not an issue in the normal case but when no_console_suspend is used, we need to restore the registers in order to get a functional console. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 424d79183af07fbcb8059f9e86efc9ff8b346c75 Author: Douglas Anderson Date: Mon Feb 6 15:30:00 2017 -0800 serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt On a Rockchip rk3399-based board during suspend/resume testing, we found that we could get the console UART into a state where it would print this to the console a lot: serial8250: too much work for irq42 Followed eventually by: NMI watchdog: BUG: soft lockup - CPU#0 stuck for 11s! Upon debugging I found that we're in this state: iir = 0x000000cc lsr = 0x00000060 It appears that somehow we have a RX Timeout interrupt but there is no actual data present to receive. When we're in this state the UART driver claims that it handled the interrupt but it actually doesn't really do anything. This means that we keep getting the interrupt over and over again. Normally we don't actually need to do anything special to handle a RX Timeout interrupt. We'll notice that there is some data ready and we'll read it, which will end up clearing the RX Timeout. In this case we have a problem specifically because we got the RX TImeout without any data. Reading a bogus byte is confirmed to get us out of this state. It's unclear how exactly the UART got into this state, but it is known that the UART lines are essentially undriven and unpowered during suspend, so possibly during resume some garbage / half transmitted bits are seen on the line and put the UART into this state. The UART on the rk3399 is a DesignWare based 8250 UART. From mailing list posts, it appears that other people have run into similar problems with DesignWare based IP. Presumably this problem is unique to that IP, so I have placed the workaround there to avoid possibly of accidentally triggering bad behavior on other IP. Also note the RX Timeout behaves very differently in the DMA case, for for now the workaround is only applied to the non-DMA case. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 2c9f1af528a4581e8ef8590108daa3c3df08dd5a Author: Wei Yongjun Date: Thu Feb 9 16:01:58 2017 +0000 vfio/type1: Fix error return code in vfio_iommu_type1_attach_group() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 5d704992189f ("vfio/type1: Allow transparent MSI IOVA allocation") Signed-off-by: Wei Yongjun Reviewed-by: Eric Auger Acked-by: Alex Williamson Signed-off-by: Joerg Roedel drivers/vfio/vfio_iommu_type1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9d3352a3fe82b927d66309ee7f1944dd40a42325 Author: Simon Sandström Date: Fri Feb 10 13:33:53 2017 +0100 staging: bcm2835-audio: Make internal symbols static Fixes sparse warnings: warning: symbol 'xxx' was not declared. Should it be static? Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 626eea7df90e062e4fb89a427e7a47d600626989 Author: Abhijit Naik Date: Fri Feb 10 17:09:05 2017 +0530 staging: bcm2835-audio: Fixed initialization of global to "false" bcm2835-vchiq.c: fixing ERROR: do not initialise globals to false Instead of explicitly initializing global variable force_bulk to "false", declared force_bulk as static variable. Signed-off-by: Abhijit Naik Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55dd5a39a982dad9a39fe48a1c0066f46a8a0ba0 Author: Frans Klaver Date: Thu Feb 9 22:58:21 2017 +0100 staging: wlan_ng: fix logical continuation alignment It appears that our coding style prefers that logical continuations have the operator at the end of the line. Fix that. While at it, stick the 'if' after 'else' where it belongs. Signed-off-by: Frans Klaver Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mgmt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 29fcf85bc1b02bd87fcfb513f1314a42628b2184 Author: Arushi Singhal Date: Thu Feb 9 18:52:53 2017 +0530 staging:vt6656:baseband.h: fix function definition argument without identifier name issue Function definitions arguments should also have an identifier name as reported by checkpatch.pl. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 360daa82846601d095afa341fd0ac8cc8713bfcf Author: simran singhal Date: Thu Feb 9 17:45:14 2017 +0530 staging: rtl8192u: Adding a blank line after declarations This patch fixes the checkpatch warning by adding a blank line after declarations. WARNING: Missing a blank line after declarations Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1393f1bc112d05b7229ca0667b66cad95d21b30c Author: Colin Ian King Date: Thu Feb 9 11:37:54 2017 +0000 Staging: rtl8192e: remove redundant null check on array alg u.crypt.alg is an array of u8 integers and hence the null check on this array is redundant and can be removed. Detected with CoverityScan, CID#146583 ("Array compared against 0") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 32 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit f40c60db19ab1ec21aa310e54ba4fadc83292ebc Author: Stuart Yoder Date: Thu Feb 9 08:32:31 2017 -0600 staging: fsl-mc: update MAINTAINERS Add Laurentiu Tudor as a second maintainer and update Stuart Yoder's email address. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d0f6f5832603931b0a8da044fb9abe8289e201ee Author: Joerg Roedel Date: Thu Feb 2 12:19:12 2017 +0100 iommu: Remove iommu_register_instance interface And also move its remaining functionality to iommu_device_register() and 'struct iommu_device'. Cc: Rob Herring Cc: Frank Rowand Cc: Matthias Brugger Cc: Marek Szyprowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 2 -- drivers/iommu/arm-smmu.c | 1 - drivers/iommu/exynos-iommu.c | 2 -- drivers/iommu/iommu.c | 37 ++++++------------------------------- drivers/iommu/msm_iommu.c | 2 -- drivers/iommu/mtk_iommu.c | 1 - include/linux/iommu.h | 7 ------- include/linux/of_iommu.h | 6 ------ 8 files changed, 6 insertions(+), 52 deletions(-) commit d2c302b6e8b1a5c0735b59d63075132bae9c52ac Author: Joerg Roedel Date: Fri Feb 3 13:23:42 2017 +0100 iommu/exynos: Make use of iommu_device_register interface Register Exynos IOMMUs to the IOMMU core and make them visible in sysfs. This patch does not add the links between IOMMUs and translated devices yet. Cc: Marek Szyprowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2b5e77308f3356faad640b24af6dc5aa7233eb2d Author: Bartosz Golaszewski Date: Fri Feb 10 13:23:23 2017 +0100 irqdesc: Add a resource managed version of irq_alloc_descs() Add a devres flavor of __devm_irq_alloc_descs() and corresponding helper macros. Signed-off-by: Bartosz Golaszewski Cc: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1486729403-21132-1-git-send-email-bgolaszewski@baylibre.com Signed-off-by: Thomas Gleixner Documentation/driver-model/devres.txt | 5 ++++ include/linux/irq.h | 19 ++++++++++++ kernel/irq/devres.c | 55 +++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) commit 7fa2c7038cc0ec16ae5d8eee347ea136de0f4b65 Author: Colin Ian King Date: Tue Jan 31 15:53:17 2017 +0000 mtd: spi-nor: cqspi: remove redundant dead code on error return check Checking for ret < 0 is redundant because a previous check on ret being non-zero already handles the ret < 0 case. Remove the redundant code. Found by CoverityScan, CID#1398863, CID#1398864 Signed-off-by: Colin Ian King Reviewed-by: Richard Weinberger Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35fd766117de41ed475948410c3ec5ab07cd3d03 Author: Guochun Mao Date: Wed Jan 25 11:38:34 2017 +0800 Documentation: mtk-quadspi: update DT bindings Add "mediatek,mt2701-nor" for nor flash node's compatible. Signed-off-by: Guochun Mao Acked-by: John Crispin Acked-by: Rob Herring Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9b2a34906c917e6dacfa08f2eafa5beb8baff5e1 Author: Yunhui Cui Date: Thu Aug 18 15:37:57 2016 +0800 mtd: fsl-quadspi: Rename SEQID_QUAD_READ to SEQID_READ There are some read modes for flash, such as NORMAL, FAST, QUAD, DDR QUAD. These modes will use the identical lut table base So rename SEQID_QUAD_READ to SEQID_READ. Signed-off-by: Yunhui Cui Signed-off-by: Yunhui Cui Acked-by: Han xu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dfdb3eb56405861f691102d1bde3a5f85e2c1398 Author: Yunhui Cui Date: Thu Aug 18 15:37:56 2016 +0800 mtd:fsl-quadspi:use the property fields of SPI-NOR We can get the read/write/erase opcode from the spi nor framework directly. This patch uses the information stored in the SPI-NOR to remove the hardcode in the fsl_qspi_init_lut(). Signed-off-by: Yunhui Cui Signed-off-by: Yunhui Cui Acked-by: Han xu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/fsl-quadspi.c | 40 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit e9cf64dec1067e6f791ec035e916b30907a87365 Author: Kamal Dasu Date: Fri Jan 20 14:25:51 2017 -0500 mtd: spi-nor: Add support for gd25q16 Add GigaDevice GD25Q16 (16M-bit) to supported list. Signed-off-by: Kamal Dasu Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) commit 56c5c328962b26e6dc844b4e8e643f145974c04e Author: Ricardo Ribalda Date: Wed Jan 18 17:40:16 2017 +0100 mtd: spi-nor: Fix S3AN addressing calculation The page calculation under spi_nor_s3an_addr_convert() was wrong. On Default Address Mode we need to perform a divide by page_size. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f40a2725ea720a6270d3970cf11472da66924624 Author: Cédric Le Goater Date: Thu Jan 19 10:13:18 2017 +0100 mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb() The first argument of ioread32_rep() and ioread8_rep is not const. Change aspeed_smc_read_from_ahb() prototype to fix compile warning : drivers/mtd/spi-nor/aspeed-smc.c: In function 'aspeed_smc_read_from_ahb': drivers/mtd/spi-nor/aspeed-smc.c:212:16: warning: passing argument 1 of 'ioread32_rep' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ioread32_rep(src, buf, len >> 2); Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/aspeed-smc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3a08e933415c58689797c5bdc825e78a808fffe1 Author: Uwe Kleine-König Date: Tue Jan 17 12:03:38 2017 +0100 mtd: spi-nor: add dt support for Everspin MRAMs The MR25 family doesn't support JEDEC, so they need explicit mentioning in the list of supported spi IDs. This makes it possible to add these using for example: compatible = "everspin,mr25h40"; There was already an entry for mr25h256. Move that one out of the "keep for compatibility" section and put in a new group for Everspin MRAMs. Signed-off-by: Uwe Kleine-König Acked-by: Rob Herring Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++ drivers/mtd/devices/m25p80.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 9e43486a33abface0085d1b418c047a8566161ee Merge: fcf690a 87eb832 Author: Cyrille Pitchen Date: Fri Feb 10 14:03:03 2017 +0100 Merge tag 'ib-mfd-mtd-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd From Lee Jones: """ Immutable branch between MFD and MTD due for the v4.11 merge window """ commit fcf690a22b2bd71a74ae25f048ec3f9b221cd12f Author: Victor Shyba Date: Mon Jan 2 22:34:30 2017 -0300 mtd: spi-nor: Add lock/unlock support for f25l32pa This chip has write protection enabled on power-up, so this flag is necessary to support write operations. Signed-off-by: Victor Shyba Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba3ae6a1d4c78fce3b352b8bf026ada40b22117c Author: Cyrille Pitchen Date: Thu Oct 27 12:03:57 2016 +0200 mtd: spi-nor: add a stateless method to support memory size above 128Mib This patch provides an alternative mean to support memory above 16MiB (128Mib) by replacing 3byte address op codes by their associated 4byte address versions. Using the dedicated 4byte address op codes doesn't change the internal state of the SPI NOR memory as opposed to using other means such as updating a Base Address Register (BAR) and sending command to enter/leave the 4byte mode. Hence when a CPU reset occurs, early bootloaders don't need to be aware of BAR value or 4byte mode being enabled: they can still access the first 16MiB of the SPI NOR memory using the regular 3byte address op codes. Signed-off-by: Cyrille Pitchen Tested-by: Vignesh R Acked-by: Marek Vasut drivers/mtd/spi-nor/spi-nor.c | 101 +++++++++++++++++++++++++++++++++--------- 1 file changed, 80 insertions(+), 21 deletions(-) commit 902cc69a0820252c84c6f7caed350882cea166ba Author: Cyrille Pitchen Date: Thu Oct 27 11:55:39 2016 +0200 mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes This patch renames the SPINOR_OP_* macros of the 4-byte address instruction set so the new names all share a common pattern: the 4-byte address name is built from the 3-byte address name appending the "_4B" suffix. The patch also introduces new op codes to support other SPI protocols such as SPI 1-4-4 and SPI 1-2-2. This is a transitional patch and will help a later patch of spi-nor.c to automate the translation from the 3-byte address op codes into their 4-byte address version. Signed-off-by: Cyrille Pitchen Acked-by: Mark Brown Acked-by: Marek Vasut drivers/mtd/devices/serial_flash_cmds.h | 7 ------- drivers/mtd/devices/st_spi_fsm.c | 28 ++++++++++++++-------------- drivers/mtd/spi-nor/spi-nor.c | 8 ++++---- drivers/spi/spi-bcm-qspi.c | 6 +++--- include/linux/mtd/spi-nor.h | 22 ++++++++++++++++------ 5 files changed, 37 insertions(+), 34 deletions(-) commit 9e276de6a367cde07c1a63522152985d4e5cca8b Author: Heiner Kallweit Date: Fri Oct 28 07:58:46 2016 +0200 mtd: m25p80: consider max message size in m25p80_read Consider a message size limit when calculating the maximum amount of data that can be read. The message size limit has been introduced with 4.9, so cc it to stable. Signed-off-by: Heiner Kallweit Signed-off-by: Cyrille Pitchen drivers/mtd/devices/m25p80.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e84609e8cdb4ce841cc2f9a217996a0b1198d29 Author: Cédric Le Goater Date: Wed Dec 21 17:57:19 2016 +0100 mtd: spi-nor: bindings for the Aspeed memory controllers Signed-off-by: Cédric Le Goater Acked-by: Rob Herring Signed-off-by: Cyrille Pitchen .../devicetree/bindings/mtd/aspeed-smc.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e56beebbc7341fd72251bd31580ca4e4e5164d0f Author: Cédric Le Goater Date: Wed Dec 21 17:57:18 2016 +0100 mtd: aspeed: add memory controllers for the Aspeed AST2400 SoC This driver adds mtd support for the Aspeed AST2400 SoC static memory controllers: * New Static Memory Controller (referred as FMC) . BMC firmware . AST2500 compatible register set . 5 chip select pins (CE0 ∼ CE4) . supports NOR flash, NAND flash and SPI flash memory. * SPI Flash Controller (SPI) . host Firmware . slightly different register set, between AST2500 and the legacy controller . supports SPI flash memory . 1 chip select pin (CE0) The legacy static memory controller (referred as SMC) is not supported, as well as types other than SPI. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 2 +- drivers/mtd/spi-nor/aspeed-smc.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit ceb720c71b6309e7f0e91346779f538625eff3aa Author: Cédric Le Goater Date: Wed Dec 21 17:57:17 2016 +0100 mtd: spi-nor: add memory controllers for the Aspeed AST2500 SoC This driver adds mtd support for the Aspeed AST2500 SoC static memory controllers : * Firmware SPI Memory Controller (FMC) . BMC firmware . 3 chip select pins (CE0 ~ CE2) . supports SPI type flash memory (CE0-CE1) . CE2 can be of NOR type flash but this is not supported by the driver * SPI Flash Controller (SPI1 and SPI2) . host firmware . 2 chip select pins (CE0 ~ CE1) . supports SPI type flash memory Each controller has a memory range on which it maps its flash module slaves. Each slave is assigned a memory window for its mapping that can be changed at bootime with the Segment Address Register. Each SPI flash slave can then be accessed in two modes: Command and User. When in User mode, accesses to the memory segment of the slaves are translated in SPI transfers. When in Command mode, the HW generates the SPI commands automatically and the memory segment is accessed as if doing a MMIO. Currently, only the User mode is supported. Command mode needs a little more work to check that the memory window on the AHB bus fits the module size. Based on previous work from Milton D. Miller II Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 10 + drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/aspeed-smc.c | 726 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 737 insertions(+) commit bc0e151514d09cadb56e473a10c783e64e48ce0b Author: Cyrille Pitchen Date: Tue Dec 6 18:14:24 2016 +0100 mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write() This patch removes the WARN_ONCE() test in spi_nor_write(). This macro triggers the display of a warning message almost every time we use a UBI file-system because a write operation is performed at offset 64, which is in the middle of the SPI NOR memory page. This is a valid operation for ubifs. Hence this warning is pretty annoying and useless so we just remove it. Signed-off-by: Cyrille Pitchen Suggested-by: Richard Weinberger Suggested-by: Andras Szemzo Acked-by: Boris Brezillon drivers/mtd/spi-nor/spi-nor.c | 3 --- 1 file changed, 3 deletions(-) commit 32c90f1682a01ff9e1c2fa83c18a15e35f7563ce Author: Cyrille Pitchen Date: Tue Dec 6 17:01:41 2016 +0100 mtd: spi-nor: improve macronix_quad_enable() The patch checks whether the Quad Enable bit is already set in the Status Register. If so, the function exits immediately with a successful return code. Signed-off-by: Cyrille Pitchen Reviewed-by: Jagan Teki Acked-by: Marek Vasut drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) commit e99ca98f1d7190c16601b00d0c96212d7c00577d Author: Ricardo Ribalda Date: Fri Dec 2 12:31:44 2016 +0100 mtd: spi-nor: Add support for S3AN spi-nor devices Xilinx Spartan-3AN FPGAs contain an In-System Flash where they keep their configuration data and (optionally) some user data. The protocol of this flash follows most of the spi-nor standard. With the following differences: - Page size might not be a power of two. - The address calculation (default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Signed-off-by: Ricardo Ribalda Delgado Cc: Boris Brezillon Cc: Brian Norris Cc: Marek Vasut Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 154 ++++++++++++++++++++++++++++++++++++++++-- include/linux/mtd/spi-nor.h | 12 ++++ 2 files changed, 161 insertions(+), 5 deletions(-) commit b16c0170b53cfbf50db6cd60a427b52b0602b882 Author: Joerg Roedel Date: Fri Feb 3 12:57:32 2017 +0100 iommu/mediatek: Make use of iommu_device_register interface Register individual Mediatek IOMMUs to the iommu core and add sysfs entries. Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 26 ++++++++++++++++++++++++++ drivers/iommu/mtk_iommu.h | 2 ++ 2 files changed, 28 insertions(+) commit 42df43b36163ed7d0ab13992e411093252903273 Author: Joerg Roedel Date: Thu Feb 2 18:52:34 2017 +0100 iommu/msm: Make use of iommu_device_register interface Register the MSM IOMMUs to the iommu core and add sysfs entries for that driver. Signed-off-by: Joerg Roedel drivers/iommu/msm_iommu.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/iommu/msm_iommu.h | 3 ++ 2 files changed, 76 insertions(+) commit 9648cbc9625b67c91ed1aaf4b8b77f3f0c537496 Author: Joerg Roedel Date: Wed Feb 1 18:11:36 2017 +0100 iommu/arm-smmu: Make use of the iommu_register interface Also add the smmu devices to sysfs. Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 22 +++++++++++++++++++++- drivers/iommu/arm-smmu.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) commit c73e1ac8b2bc6ab18d9f9a96b17ee7388b49a0c0 Author: Joerg Roedel Date: Tue Feb 7 18:18:46 2017 +0100 iommu: Add iommu_device_set_fwnode() interface Allow to store a fwnode in 'struct iommu_device'; Signed-off-by: Joerg Roedel include/linux/iommu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e3d10af1128b6bc394f21656ff13753130f3c107 Author: Joerg Roedel Date: Wed Feb 1 17:23:22 2017 +0100 iommu: Make iommu_device_link/unlink take a struct iommu_device This makes the interface more consistent with iommu_device_sysfs_add/remove. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 ++-- drivers/iommu/intel-iommu.c | 4 ++-- drivers/iommu/iommu-sysfs.c | 16 ++++++++-------- include/linux/iommu.h | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) commit 39ab9555c24110671f8dc671311a26e5c985b592 Author: Joerg Roedel Date: Wed Feb 1 16:56:46 2017 +0100 iommu: Add sysfs bindings for struct iommu_device There is currently support for iommu sysfs bindings, but those need to be implemented in the IOMMU drivers. Add a more generic version of this by adding a struct device to struct iommu_device and use that for the sysfs bindings. Also convert the AMD and Intel IOMMU driver to make use of it. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 14 ++++++++----- drivers/iommu/amd_iommu_init.c | 6 ++---- drivers/iommu/amd_iommu_types.h | 3 --- drivers/iommu/dmar.c | 13 +++++------- drivers/iommu/intel-iommu.c | 15 ++++++++------ drivers/iommu/iommu-sysfs.c | 45 +++++++++++++++++------------------------ include/linux/intel-iommu.h | 1 - include/linux/iommu.h | 33 ++++++++++++++++-------------- 8 files changed, 61 insertions(+), 69 deletions(-) commit b0119e870837dcd15a207b4701542ebac5d19b45 Author: Joerg Roedel Date: Wed Feb 1 13:23:08 2017 +0100 iommu: Introduce new 'struct iommu_device' This struct represents one hardware iommu in the iommu core code. For now it only has the iommu-ops associated with it, but that will be extended soon. The register/unregister interface is also added, as well as making use of it in the Intel and AMD IOMMU drivers. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 ++-- drivers/iommu/amd_iommu_init.c | 5 +++++ drivers/iommu/amd_iommu_types.h | 3 +++ drivers/iommu/dmar.c | 9 +++++++++ drivers/iommu/intel-iommu.c | 4 ++-- drivers/iommu/iommu.c | 19 +++++++++++++++++++ include/linux/intel-iommu.h | 2 ++ include/linux/iommu.h | 35 +++++++++++++++++++++++++++++++++++ 8 files changed, 77 insertions(+), 4 deletions(-) commit c09e22d5370739e16463c113525df51b5980b1d5 Author: Joerg Roedel Date: Wed Feb 1 12:19:46 2017 +0100 iommu: Rename struct iommu_device The struct is used to link devices to iommu-groups, so 'struct group_device' is a better name. Further this makes the name iommu_device available for a struct representing hardware iommus. Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 534766dfef999f7e7349bbd91cd19c1673792af3 Author: Joerg Roedel Date: Tue Jan 31 16:58:42 2017 +0100 iommu: Rename iommu_get_instance() Rename the function to iommu_ops_from_fwnode(), because that is what the function actually does. The new name is much more descriptive about what the function does. Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 2 +- drivers/iommu/iommu.c | 2 +- include/linux/iommu.h | 4 ++-- include/linux/of_iommu.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 465b2c4ab8724196bc33d82679a19b28e7a1d37e Merge: 71ccea0 f211479 Author: Wolfram Sang Date: Fri Feb 10 12:51:23 2017 +0100 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.11 commit 38fd94b0275c91071157a03cc27676909b23dcde Author: Christopher Covington Date: Wed Feb 8 15:08:37 2017 -0500 arm64: Work around Falkor erratum 1003 The Qualcomm Datacenter Technologies Falkor v1 CPU may allocate TLB entries using an incorrect ASID when TTBRx_EL1 is being updated. When the erratum is triggered, page table entries using the new translation table base address (BADDR) will be allocated into the TLB using the old ASID. All circumstances leading to the incorrect ASID being cached in the TLB arise when software writes TTBRx_EL1[ASID] and TTBRx_EL1[BADDR], a memory operation is in the process of performing a translation using the specific TTBRx_EL1 being written, and the memory operation uses a translation table descriptor designated as non-global. EL2 and EL3 code changing the EL1&0 ASID is not subject to this erratum because hardware is prohibited from performing translations from an out-of-context translation regime. Consider the following pseudo code. write new BADDR and ASID values to TTBRx_EL1 Replacing the above sequence with the one below will ensure that no TLB entries with an incorrect ASID are used by software. write reserved value to TTBRx_EL1[ASID] ISB write new value to TTBRx_EL1[BADDR] ISB write new value to TTBRx_EL1[ASID] ISB When the above sequence is used, page table entries using the new BADDR value may still be incorrectly allocated into the TLB using the reserved ASID. Yet this will not reduce functionality, since TLB entries incorrectly tagged with the reserved ASID will never be hit by a later instruction. Based on work by Shanker Donthineni Reviewed-by: Catalin Marinas Signed-off-by: Christopher Covington Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 18 ++++++++++++++++++ arch/arm64/include/asm/assembler.h | 23 +++++++++++++++++++++++ arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/include/asm/mmu_context.h | 8 +++++++- arch/arm64/kernel/cpu_errata.c | 9 +++++++++ arch/arm64/mm/context.c | 11 +++++++++++ arch/arm64/mm/proc.S | 1 + 8 files changed, 72 insertions(+), 2 deletions(-) commit baa42a359e7272135aa61548aa99263be03fb668 Author: Jelle Martijn Kok Date: Wed Feb 8 16:53:08 2017 +0100 ohci-hub: fix typo in dbg_port macro The "dbg_port" macro uses the "outside" parameter (="temp") instead of the parameters (="value") given in the macro. As the macro can look outside its definition this causes no direct problem. Signed-off-by: Jelle Martijn Kok Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-hub.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 1e38da300e1e395a15048b0af1e5305bd91402f6 Author: Thomas Gleixner Date: Tue Jan 31 15:24:03 2017 +0100 timerfd: Protect the might cancel mechanism proper The handling of the might_cancel queueing is not properly protected, so parallel operations on the file descriptor can race with each other and lead to list corruptions or use after free. Protect the context for these operations with a seperate lock. The wait queue lock cannot be reused for this because that would create a lock inversion scenario vs. the cancel lock. Replacing might_cancel with an atomic (atomic_t or atomic bit) does not help either because it still can race vs. the actual list operation. Reported-by: Dmitry Vyukov Signed-off-by: Thomas Gleixner Cc: "linux-fsdevel@vger.kernel.org" Cc: syzkaller Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701311521430.3457@nanos Signed-off-by: Thomas Gleixner fs/timerfd.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 7551b02b94ad1daee3a79d667dc3c46d08328f87 Author: Mars Cheng Date: Thu Feb 9 15:50:15 2017 +0800 timer_list: Remove useless cast when printing hrtimer_resolution is already unsigned int, not necessary to cast it when printing. Signed-off-by: Mars Cheng Cc: CC Hwang Cc: wsd_upstream@mediatek.com Cc: Loda Chou Cc: Jades Shih Cc: Miles Chen Cc: John Stultz Cc: My Chuang Cc: Matthias Brugger Cc: Yingjoe Chen Link: http://lkml.kernel.org/r/1486626615-5879-1-git-send-email-mars.cheng@mediatek.com Signed-off-by: Thomas Gleixner kernel/time/timer_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 Author: Kees Cook Date: Wed Feb 8 11:26:59 2017 -0800 time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the tracer can give the same information, this patch entirely removes CONFIG_TIMER_STATS. Suggested-by: Thomas Gleixner Signed-off-by: Kees Cook Acked-by: John Stultz Cc: Nicolas Pitre Cc: linux-doc@vger.kernel.org Cc: Lai Jiangshan Cc: Shuah Khan Cc: Xing Gao Cc: Jonathan Corbet Cc: Jessica Frazelle Cc: kernel-hardening@lists.openwall.com Cc: Nicolas Iooss Cc: "Paul E. McKenney" Cc: Petr Mladek Cc: Richard Cochran Cc: Tejun Heo Cc: Michal Marek Cc: Josh Poimboeuf Cc: Dmitry Vyukov Cc: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Olof Johansson Cc: Andrew Morton Cc: linux-api@vger.kernel.org Cc: Arjan van de Ven Link: http://lkml.kernel.org/r/20170208192659.GA32582@beast Signed-off-by: Thomas Gleixner Documentation/timers/timer_stats.txt | 73 ------ include/linux/hrtimer.h | 11 - include/linux/timer.h | 45 ---- kernel/kthread.c | 1 - kernel/time/Makefile | 1 - kernel/time/hrtimer.c | 38 ---- kernel/time/timer.c | 48 +--- kernel/time/timer_list.c | 10 - kernel/time/timer_stats.c | 425 ----------------------------------- kernel/workqueue.c | 2 - lib/Kconfig.debug | 14 -- 11 files changed, 2 insertions(+), 666 deletions(-) commit 3fe2cf7eb21ada0a9683b26c1ae309e7f5e90131 Author: Takashi Iwai Date: Tue Feb 7 13:53:42 2017 +0100 ALSA: x86: Support S16 format Now we support S16 PCM format in addition. For this, we need to set packet_mode=1 in AUD_CONFIG register. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 85bd8748ca23a25f6dc56154d9a61d87ae07a807 Author: Takashi Iwai Date: Tue Feb 7 13:33:17 2017 +0100 ALSA: x86: Support S32 format The hardware has the support for the left-aligned 24bit format in 32bit packet. This corresponds to S32 format in ALSA. We need to set the msbits restriction as well to inform user-space that only MSB 24bit are available. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit e8de9859e4e834a74da824e13070aa992c32de10 Author: Takashi Iwai Date: Tue Feb 7 08:09:12 2017 +0100 ALSA: x86: Allow no-period-wakeup setup In the current implementation, the driver may update the BDs even at PCM pointer callback. This allows us to skip the period interrupt effectively. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8d48c0163d1ab0f56a18ebe9898a34ebcfdfaa1a Author: Takashi Iwai Date: Tue Feb 7 08:05:46 2017 +0100 ALSA: x86: Allow single period PCM operation This is an implementation of PCM streaming with only 1 period. Since the hardware requires the refresh of BDs after each BD processing finishes, we'd need at least two BDs. The trick is that both BDs point to the same content: the address of the PCM buffer head, and the whole buffer size. Then it loops over to the whole buffer again after it finished once. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 14 ++++++++++++-- sound/x86/intel_hdmi_lpe_audio.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) commit a9ebdd0ef261fb9838af2821c09d165f6a14789b Author: Takashi Iwai Date: Thu Feb 2 21:33:54 2017 +0100 ALSA: x86: Don't pass SNDRV_PCM_INFO_BATCH flag The PCM engine on LPE audio isn't like a batch-style process any longer, but rather it deals with the standard ring buffer. Remove the BATCH info flag so that PA can handle the buffer in timer-sched mode. Similarly, the DOUBLE flag is also superfluous. Drop both bits. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0cad93c3453fc9d11692d3924ac3a520821bbf64 Author: Waiman Long Date: Tue Feb 7 16:40:30 2017 -0500 debugobjects: Improve variable naming As suggested by Ingo, the debug_objects_alloc counter is now renamed to debug_objects_allocated with minor twist in comment and debug output. Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486503630-1501-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar lib/debugobjects.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7e5f3d30860ad10a03eece2a0f34633b3f16d2e3 Author: Changbin Du Date: Thu Feb 9 16:50:15 2017 +0800 drm/i915/gvt: fix crash at function release_shadow_wa_ctx In function dispatch_workload(), if it fail before calling intel_gvt_scan_and_shadow_wa_ctx(), the indirect ctx will not be shadowed so no cleaup need. wa_ctx->indirect_ctx.obj indicate whether indirect_ctx is shadowed. The obj is null if it is unshadowed. BUG: unable to handle kernel NULL pointer dereference at 00000000000001a0 IP: complete_execlist_workload+0x2c9/0x3e0 [i915] Oops: 0002 [#1] SMP task: ffff939546d2d880 task.stack: ffffbd9b82ac4000 RIP: 0010:complete_execlist_workload+0x2c9/0x3e0 [i915] RSP: 0018:ffffbd9b82ac7dd8 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff9393c725b540 RCX: 0000000000000006 RDX: 0000000000000007 RSI: 0000000000000202 RDI: ffff939559c8dd00 RBP: ffffbd9b82ac7e18 R08: 0000000000000001 R09: 000000000120dd8f R10: 0000000000000000 R11: 000000000120dd8f R12: ffff9393c725b540 R13: ffff9393c725b618 R14: ffffbd9b81f0d000 R15: ffff939520e0e000 FS: 0000000000000000(0000) GS:ffff939559c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000001a0 CR3: 000000043d664000 CR4: 00000000003426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: workload_thread+0x312/0xd70 [i915] ? __wake_up_sync+0x20/0x20 ? wake_atomic_t_function+0x60/0x60 kthread+0x101/0x140 Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9cc34a6e1a8e7d26d243c54fa6cef93556d44f2 Author: Arnd Bergmann Date: Thu Feb 2 15:46:26 2017 +0100 thermal: use cpumask_var_t for on-stack cpu masks Putting a bare cpumask structure on the stack produces a warning on large SMP configurations: drivers/thermal/cpu_cooling.c: In function 'cpufreq_state2power': drivers/thermal/cpu_cooling.c:644:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/thermal/cpu_cooling.c: In function '__cpufreq_cooling_register': drivers/thermal/cpu_cooling.c:898:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=] The recommended workaround is to use cpumask_var_t, which behaves just like a normal cpu mask in most cases, but turns into a dynamic allocation when CONFIG_CPUMASK_OFFSTACK is set. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Signed-off-by: Zhang Rui drivers/thermal/cpu_cooling.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit c462c2f5f5ee5ed77a790c361e6aae807ef923ce Author: Vincent Abriou Date: Thu Feb 2 09:58:39 2017 +0100 drm/sti: debug fps reset Reset the fps debug information when 'fps_show' is updated. Signed-off-by: Fabien Dessenne drivers/gpu/drm/sti/sti_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 97d7c576302979831c65a2ae8a0ef4f3acf7f107 Author: Vincent Abriou Date: Thu Feb 2 09:45:48 2017 +0100 drm/sti: hdmi: automatically check DVI/HDMI mode Remove the hdmi_mode_property and use drm_detect_hdmi_monitor function to check whether the connected monitor is HDMI capable or DVI only. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_hdmi.c | 31 ++++++------------------------- drivers/gpu/drm/sti/sti_hdmi.h | 17 ++--------------- 2 files changed, 8 insertions(+), 40 deletions(-) commit b7e05db3d1ff1adf45e2c028ea331e3a999fb56b Author: Vincent Abriou Date: Thu Feb 2 09:51:43 2017 +0100 drm/sti: unbind all components while driver cleanup Unbind all the components when the STI driver is unregistered. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_drv.c | 1 + 1 file changed, 1 insertion(+) commit e9f494d36fc4cab2ba7e9e7f3bb4edf5b214f651 Author: Vincent Abriou Date: Thu Feb 2 09:50:48 2017 +0100 drm/sti: do not post GDP command if no update Do not process update requests with unmodified parameters. This typically happens when the driver is called with legacy (non-atomic) IOCTL : in that case atomic_update() is called multiple times with the same parameters. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c5649ee49761f5367c46c5ae6579ab8e8b03575d Author: Vincent Abriou Date: Thu Feb 2 09:49:02 2017 +0100 drm/sti: do not set gdp pixel clock rate if mode is not set Fix a division by 0 case : in some cases, when the GDP plane is being disabled atomic_check() is called with "mode->clock = 0". In that case, do not set parent and pixel clock rate. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b7f145123f4d59e6b88a83b507c7981df0ee701 Author: Vincent Abriou Date: Thu Feb 2 09:47:32 2017 +0100 drm/sti: enable gdp pixel clock in atomic_update Set gdp pix clock rate and parent in atomic_check function and enable it in the atomic_update only the first time. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 70 ++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 38 deletions(-) commit 0c7ff84f7f9db4ea3eeb3da958fcd6d187c8351d Author: Vincent Abriou Date: Thu Feb 2 09:52:32 2017 +0100 drm/sti: remove deprecated legacy vtg slave stih416 chip family is no more supported in Linux v4.9. It is then useless to keep vtg slave field since it not used at all for the stih407/10 chip family supported by sti driver. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_vtg.c | 58 +++++++++++-------------------------------- 1 file changed, 14 insertions(+), 44 deletions(-) commit e6d50dc64779026c2e29e764441fd99dfe9a13f3 Author: Vincent Abriou Date: Wed Feb 1 18:04:00 2017 +0100 drm/sti: remove deprecated sink_term config stih416 chip family is no more supported in Linux v4.9. Then sink_term config becomes useless. The field of the register it was referring to is tag as reserved for stih410 chip family. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_hdmi.c | 7 ------- 1 file changed, 7 deletions(-) commit 6801723b0187c0bb0803758b7b7ef14ba22fdcf2 Author: Fabien DESSENNE Date: Thu Jan 12 17:27:37 2017 +0100 drm/sti: do not check hw scaling if mode is not set Fix a division by 0 case : in some cases, when the HQVDP plane is being disabled atomic_check() is called with "mode->clock = 0". In that case, do not check for scaling capabilities. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_hqvdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c62052d1469d283aff31527bfdccd9da08a46005 Author: Fabien DESSENNE Date: Thu Jan 12 17:27:36 2017 +0100 drm/sti: Fix up crtc_state->event handling Use drm-core to handle event. This is required to be able to use the nonblocking helpers. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_crtc.c | 46 +++++++++++++---------------------------- drivers/gpu/drm/sti/sti_mixer.h | 2 -- 2 files changed, 14 insertions(+), 34 deletions(-) commit 5e60f595d6cad3279f4653ea43843a3db91b59e5 Author: Fabien DESSENNE Date: Thu Jan 12 17:27:35 2017 +0100 drm/sti: use atomic_helper for commit Since nonblocking atomic commits are now supported, the driver can now use drm_atomic_helper_commit(). Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_drv.c | 84 ++++--------------------------------------- drivers/gpu/drm/sti/sti_drv.h | 6 ---- 2 files changed, 6 insertions(+), 84 deletions(-) commit bc88c10d7e6900916f5e1ba3829d66a9de92b633 Author: Waiman Long Date: Wed Feb 8 14:46:48 2017 -0500 locking/spinlock/debug: Remove spinlock lockup detection code The current spinlock lockup detection code can sometimes produce false positives because of the unfairness of the locking algorithm itself. So the lockup detection code is now removed. Instead, we are relying on the NMI watchdog to detect potential lockup. We won't have lockup detection if the watchdog isn't running. The commented-out read-write lock lockup detection code are also removed. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486583208-11038-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/spinlock_debug.c | 86 +++-------------------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) commit f9af456a61ecfbef8233c5046a9e347c9b98ba05 Author: Byungchul Park Date: Fri Jan 13 11:42:04 2017 +0900 lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should only be printed once. Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1484275324-28192-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ce77bfd6cedbff61eabf8837dc0901bb671cc86 Author: Alexander Shishkin Date: Thu Jan 26 11:40:57 2017 +0200 perf/core: Allow kernel filters on CPU events While supporting file-based address filters for CPU events requires some extra context switch handling, kernel address filters are easy, since the kernel mapping is preserved across address spaces. It is also useful as it permits tracing scheduling paths of the kernel. This patch allows setting up kernel filters for CPU events. 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: Mark Rutland Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Will Deacon Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170126094057.13805-4-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 2 ++ kernel/events/core.c | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 14 deletions(-) commit 9ccbfbb157a38921702402281ca7be530b4c3669 Author: Alexander Shishkin Date: Thu Jan 26 11:40:56 2017 +0200 perf/core: Do error out on a kernel filter on an exclude_filter event It is currently possible to configure a kernel address filter for a event that excludes kernel from its traces (attr.exclude_kernel==1). While in reality this doesn't make sense, the SET_FILTER ioctl() should return a error in such case, currently it does not. Furthermore, it will still silently discard the filter and any potentially valid filters that came with it. This patch makes the SET_FILTER ioctl() error out in such cases. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Poirier Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Will Deacon Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170126094057.13805-3-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit bb3bac2ca9a3a5b7fa601781adf70167a0449d75 Author: Steven Rostedt (VMware) Date: Mon Feb 6 11:04:26 2017 -0500 sched/core: Remove unlikely() annotation from sched_move_task() The check for 'running' in sched_move_task() has an unlikely() around it. That is, it is unlikely that the task being moved is running. That use to be true. But with a couple of recent updates, it is now likely that the task will be running. The first change came from ea86cb4b7621 ("sched/cgroup: Fix cpu_cgroup_fork() handling") that moved around the use case of sched_move_task() in do_fork() where the call is now done after the task is woken (hence it is running). The second change came from 8e5bfa8c1f84 ("sched/autogroup: Do not use autogroup->tg in zombie threads") where sched_move_task() is called by the exit path, by the task that is exiting. Hence it too is running. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20170206110426.27ca6426@gandalf.local.home Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff86b30010eee8249dc244ce1868b886bbee6449 Author: Kees Cook Date: Fri Feb 3 15:26:50 2017 -0800 lkdtm: Convert to refcount_t testing Since we'll be using refcount_t instead of atomic_t for refcounting, change the LKDTM tests to reflect the new interface and test conditions. Signed-off-by: Kees Cook Signed-off-by: Peter Zijlstra (Intel) Cc: Hans Liljestrand Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: dhowells@redhat.com Cc: dwindsor@gmail.com Cc: elena.reshetova@intel.com Cc: gregkh@linuxfoundation.org Cc: h.peter.anvin@intel.com Cc: kernel-hardening@lists.openwall.com Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1486164412-7338-3-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar drivers/misc/lkdtm.h | 8 +++-- drivers/misc/lkdtm_bugs.c | 87 +++++++++++++++++++++++++++++++++++++++-------- drivers/misc/lkdtm_core.c | 8 +++-- 3 files changed, 85 insertions(+), 18 deletions(-) commit 10383aea2f445bce9b2a2b308def08134b438c8e Author: Peter Zijlstra Date: Mon Nov 14 18:06:19 2016 +0100 kref: Implement 'struct kref' using refcount_t Use the refcount_t 'atomic' type to implement 'struct kref', this makes kref more robust by bringing saturation semantics. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/kref.h | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit f405df5de3170c00e5c54f8b7cf4766044a032ba Author: Peter Zijlstra Date: Mon Nov 14 18:06:19 2016 +0100 refcount_t: Introduce a special purpose refcount type Provide refcount_t, an atomic_t like primitive built just for refcounting. It provides saturation semantics such that overflow becomes impossible and thereby 'spurious' use-after-free is avoided. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/refcount.h | 294 +++++++++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 13 +++ 2 files changed, 307 insertions(+) commit 21ee2fcbf8c0f1242a947569c9e3a1e37d94b376 Merge: b626317 7ea6856 Author: Ingo Molnar Date: Fri Feb 10 08:36:12 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170209' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Add support for parsing Intel uncore vendor event files and add uncore vendor events for the Intel server processors (Haswell, Broadwell, IvyBridge), Xeon Phi (Knights Landing) and Broadwell DE (Andi Kleen) - Support --symfs in 'perf probe' (Uwe Kleine-König) - Add support for generating bpf prologue on the aarch64 architecture (He Kuang) - Show proper hint when SDT event not yet in place via 'perf probe' (Ravi Bangoria) - Take into account symfs setting when reading file build ID (Victor Kamensky) Infrastructure changes: - Map gcc7's '__attribute__ ((fallthrough))', that warns when code associated to case blocks in switches continue into the next case entry, to '__falltrough' and use it where warned by gcc, tested on Fedora Rawhide (Arnaldo Carvalho de Melo) - Fix buffer sizes used with snprintf that could lead to truncation, another warning introduced in gcc7 (Arnaldo Carvalho de Melo) - Robustify do_generate_dynamic_list_file in libtraceevent (David Carrillo-Cisneros) - Use zfree() in more places (Taeung Song) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f2114795f721bd5028284ddf84b150798a9b7a73 Author: Phil Reid Date: Wed Jan 25 09:31:08 2017 +0800 i2c: mux: pca954x: Add interrupt controller support Various muxes can aggregate multiple interrupts from each i2c bus. All of the muxes with interrupt support combine the active low irq lines using an internal 'and' function and generate a combined active low output. The muxes do provide the ability to read a control register to determine which irq is active. By making the mux an irq controller isr latency can potentially be reduced by reading the status register and then only calling the registered isr on that bus segment. As there is no irq masking on the mux irq are disabled until irq_unmask is called at least once. Signed-off-by: Phil Reid Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 141 +++++++++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 2 deletions(-) commit 9aedcc61ed101b4dbb7fa7013deca4a7ed7ff418 Author: Phil Reid Date: Wed Jan 25 09:31:07 2017 +0800 dt: bindings: i2c-mux-pca954x: Add documentation for interrupt controller Various muxes can aggregate multiple irq lines and provide a control register to determine the active line. Add bindings for interrupt controller support. Acked-by: Rob Herring Signed-off-by: Phil Reid Signed-off-by: Peter Rosin Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f8251f1dfda9e1200545bf19270d9df2273bdfa1 Author: Phil Reid Date: Wed Jan 25 09:31:06 2017 +0800 i2c: mux: pca954x: Add missing pca9542 definition to chip_desc The spec for the pca954x was missing. This chip is the same as the pca9540 except that it has interrupt lines. While the i2c_device_id table mapped the pca9542 to the pca9540 definition the compatible table did not. In preparation for irq support add the pca9542 definition. Signed-off-by: Phil Reid Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5469d7c3087ecaf760f54b447f11af6061b7c897 Author: Jan Kara Date: Fri Feb 10 00:56:09 2017 -0500 ext4: do not use stripe_width if it is not set Avoid using stripe_width for sbi->s_stripe value if it is not actually set. It prevents using the stride for sbi->s_stripe. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9b22cf9f5466a057f2a4f1e642b469fa9d73117 Author: Jan Kara Date: Fri Feb 10 00:50:56 2017 -0500 ext4: fix stripe-unaligned allocations When a filesystem is created using: mkfs.ext4 -b 4096 -E stride=512 and we try to allocate 64MB extent, we will end up directly in ext4_mb_complex_scan_group(). This is because the request is detected as power-of-two allocation (so we start in ext4_mb_regular_allocator() with ac_criteria == 0) however the check before ext4_mb_simple_scan_group() refuses the direct buddy scan because the allocation request is too large. Since cr == 0, the check whether we should use ext4_mb_scan_aligned() fails as well and we fall back to ext4_mb_complex_scan_group(). Fix the problem by checking for upper limit on power-of-two requests directly when detecting them. Reported-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b0b5a76579ea62a9eeb720e71fdaa9d37e80f8fd Author: Wei Yongjun Date: Thu Jan 12 15:09:21 2017 +0000 powerpc/pseries: Fix typo in parameter description Fix typo in "hotplug_delay" parameter description. This allows modinfo to match the help text to the parameter. Signed-off-by: Wei Yongjun Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/cmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a507c346b7fdc97296fa74626df49fdb7296a04e Merge: 9878f60 316d4d7 Author: David S. Miller Date: Thu Feb 9 22:59:36 2017 -0500 Merge branch 'openvswitch-Conntrack-integration-improvements' commit 316d4d78cf9b6795b83f97c45368748741df418c Author: Jarno Rajahalme Date: Thu Feb 9 11:22:01 2017 -0800 openvswitch: Pack struct sw_flow_key. struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 40 ++++++++++++++++++++-------------------- net/openvswitch/conntrack.h | 8 ++++---- net/openvswitch/flow.h | 14 ++++++++------ net/openvswitch/flow_netlink.c | 11 +++++++---- 4 files changed, 39 insertions(+), 34 deletions(-) commit dd41d33f0b033885211a5d6f3ee19e73238aa9ee Author: Jarno Rajahalme Date: Thu Feb 9 11:22:00 2017 -0800 openvswitch: Add force commit. Stateful network admission policy may allow connections to one direction and reject connections initiated in the other direction. After policy change it is possible that for a new connection an overlapping conntrack entry already exists, where the original direction of the existing connection is opposed to the new connection's initial packet. Most importantly, conntrack state relating to the current packet gets the "reply" designation based on whether the original direction tuple or the reply direction tuple matched. If this "directionality" is wrong w.r.t. to the stateful network admission policy it may happen that packets in neither direction are correctly admitted. This patch adds a new "force commit" option to the OVS conntrack action that checks the original direction of an existing conntrack entry. If that direction is opposed to the current packet, the existing conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Joe Stringer Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 5 +++++ net/openvswitch/conntrack.c | 26 ++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) commit 9dd7f8907c3705dc7a7a375d1c6e30b06e6daffc Author: Jarno Rajahalme Date: Thu Feb 9 11:21:59 2017 -0800 openvswitch: Add original direction conntrack tuple to sw_flow_key. Add the fields of the conntrack original direction 5-tuple to struct sw_flow_key. The new fields are initially marked as non-existent, and are populated whenever a conntrack action is executed and either finds or generates a conntrack entry. This means that these fields exist for all packets that were not rejected by conntrack as untrackable. The original tuple fields in the sw_flow_key are filled from the original direction tuple of the conntrack entry relating to the current packet, or from the original direction tuple of the master conntrack entry, if the current conntrack entry has a master. Generally, expected connections of connections having an assigned helper (e.g., FTP), have a master conntrack entry. The main purpose of the new conntrack original tuple fields is to allow matching on them for policy decision purposes, with the premise that the admissibility of tracked connections reply packets (as well as original direction packets), and both direction packets of any related connections may be based on ACL rules applying to the master connection's original direction 5-tuple. This also makes it easier to make policy decisions when the actual packet headers might have been transformed by NAT, as the original direction 5-tuple represents the packet headers before any such transformation. When using the original direction 5-tuple the admissibility of return and/or related packets need not be based on the mere existence of a conntrack entry, allowing separation of admission policy from the established conntrack state. While existence of a conntrack entry is required for admission of the return or related packets, policy changes can render connections that were initially admitted to be rejected or dropped afterwards. If the admission of the return and related packets was based on mere conntrack state (e.g., connection being in an established state), a policy change that would make the connection rejected or dropped would need to find and delete all conntrack entries affected by such a change. When using the original direction 5-tuple matching the affected conntrack entries can be allowed to time out instead, as the established state of the connection would not need to be the basis for packet admission any more. It should be noted that the directionality of related connections may be the same or different than that of the master connection, and neither the original direction 5-tuple nor the conntrack state bits carry this information. If needed, the directionality of the master connection can be stored in master's conntrack mark or labels, which are automatically inherited by the expected related connections. The fact that neither ARP nor ND packets are trackable by conntrack allows mutual exclusion between ARP/ND and the new conntrack original tuple fields. Hence, the IP addresses are overlaid in union with ARP and ND fields. This allows the sw_flow_key to not grow much due to this patch, but it also means that we must be careful to never use the new key fields with ARP or ND packets. ARP is easy to distinguish and keep mutually exclusive based on the ethernet type, but ND being an ICMPv6 protocol requires a bit more attention. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 20 +++++++++- net/openvswitch/actions.c | 2 + net/openvswitch/conntrack.c | 86 +++++++++++++++++++++++++++++++++++++--- net/openvswitch/conntrack.h | 10 ++++- net/openvswitch/flow.c | 34 +++++++++++++--- net/openvswitch/flow.h | 49 ++++++++++++++++++----- net/openvswitch/flow_netlink.c | 85 +++++++++++++++++++++++++++++---------- net/openvswitch/flow_netlink.h | 7 +++- 8 files changed, 246 insertions(+), 47 deletions(-) commit 09aa98ad496d6b11a698b258bc64d7f64c55d682 Author: Jarno Rajahalme Date: Thu Feb 9 11:21:58 2017 -0800 openvswitch: Inherit master's labels. We avoid calling into nf_conntrack_in() for expected connections, as that would remove the expectation that we want to stick around until we are ready to commit the connection. Instead, we do a lookup in the expectation table directly. However, after a successful expectation lookup we have set the flow key label field from the master connection, whereas nf_conntrack_in() does not do this. This leads to master's labels being inherited after an expectation lookup, but those labels not being inherited after the corresponding conntrack action with a commit flag. This patch resolves the problem by changing the commit code path to also inherit the master's labels to the expected connection. Resolving this conflict in favor of inheriting the labels allows more information be passed from the master connection to related connections, which would otherwise be much harder if the 32 bits in the connmark are not enough. Labels can still be set explicitly, so this change only affects the default values of the labels in presense of a master connection. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 6ffcea79957df43caeaa6d1de5062556a5afc262 Author: Jarno Rajahalme Date: Thu Feb 9 11:21:57 2017 -0800 openvswitch: Refactor labels initialization. Refactoring conntrack labels initialization makes changes in later patches easier to review. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 104 ++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 42 deletions(-) commit b87cec3814ccc7f6afb0a1378ee7e5110d07cdd3 Author: Jarno Rajahalme Date: Thu Feb 9 11:21:56 2017 -0800 openvswitch: Simplify labels length logic. Since 23014011ba42 ("netfilter: conntrack: support a fixed size of 128 distinct labels"), the size of conntrack labels extension has fixed to 128 bits, so we do not need to check for labels sizes shorter than 128 at run-time. This patch simplifies labels length logic accordingly, but allows the conntrack labels size to be increased in the future without breaking the build. In the event of conntrack labels increasing in size OVS would still be able to deal with the 128 first label bits. Suggested-by: Joe Stringer Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit cb80d58fae76d8ea93555149b2b16e19b89a1f4f Author: Jarno Rajahalme Date: Thu Feb 9 11:21:55 2017 -0800 openvswitch: Unionize ovs_key_ct_label with a u32 array. Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 8 ++++++-- net/openvswitch/conntrack.c | 15 ++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) commit 193e30967897f3a8b6f9f137ac30571d832c2c5c Author: Jarno Rajahalme Date: Thu Feb 9 11:21:54 2017 -0800 openvswitch: Do not trigger events for unconfirmed connections. Receiving change events before the 'new' event for the connection has been received can be confusing. Avoid triggering change events for setting conntrack mark or labels before the conntrack entry has been confirmed. Fixes: 182e3042e15d ("openvswitch: Allow matching on conntrack mark") Fixes: c2ac66735870 ("openvswitch: Allow matching on conntrack label") Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 9ff464db50e437eef131f719cc2e9902eea9c607 Author: Jarno Rajahalme Date: Thu Feb 9 11:21:53 2017 -0800 openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted. The conntrack lookup for existing connections fails to invert the packet 5-tuple for NATted packets, and therefore fails to find the existing conntrack entry. Conntrack only stores 5-tuples for incoming packets, and there are various situations where a lookup on a packet that has already been transformed by NAT needs to be made. Looking up an existing conntrack entry upon executing packet received from the userspace is one of them. This patch fixes ovs_ct_find_existing() to invert the packet 5-tuple for the conntrack lookup whenever the packet has already been transformed by conntrack from its input form as evidenced by one of the NAT flags being set in the conntrack state metadata. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 5e17da634a21b1200853fe82ba67d6571f2beabe Author: Jarno Rajahalme Date: Thu Feb 9 11:21:52 2017 -0800 openvswitch: Fix comments for skb->_nfct Fix comments referring to skb 'nfct' and 'nfctinfo' fields now that they are combined into '_nfct'. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0ddde5004d26c483c9e67005b2be5b4d389e8db2 Author: Naveen N. Rao Date: Wed Feb 8 01:24:16 2017 +0530 powerpc/kprobes: Remove kprobe_exceptions_notify() ... as the generic weak variant will do. Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 9 --------- 1 file changed, 9 deletions(-) commit fc62d0207ae0ebc9d19df68394c0dc925b4a92d1 Author: Naveen N. Rao Date: Wed Feb 8 01:24:14 2017 +0530 kprobes: Introduce weak variant of kprobe_exceptions_notify() kprobe_exceptions_notify() is not used on some of the architectures such as arm[64] and powerpc anymore. Introduce a weak variant for such architectures. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman kernel/kprobes.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9878f60240f786286ebfaa8ff9227ef38da1720c Merge: b66a804 3e5d689 Author: David S. Miller Date: Thu Feb 9 22:27:08 2017 -0500 Merge branch 'ena-bug-fixes' Netanel Belgazal says: ==================== Bug Fixes in ENA driver Changes from V3: * Rebase patchset to master and solve merge conflicts. * Remove redundant bug fix (fix error handling when probe fails) ==================== Signed-off-by: David S. Miller commit 3e5d6897176d38b54124da56183810abbd68c8bc Author: Netanel Belgazal Date: Thu Feb 9 15:21:39 2017 +0200 net/ena: update driver version to 1.1.2 Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd8427a78ffccbacf166a2d5d5eae55b586e1afe Author: Netanel Belgazal Date: Thu Feb 9 15:21:38 2017 +0200 net/ena: change condition for host attribute configuration Move the host info config to be the first admin command that is executed. This change require the driver to remove the 'feature check' from host info configuration flow. The check is removed since the supported features bitmask field is retrieved only after calling ENA_ADMIN_DEVICE_ATTRIBUTES admin command. If set host info is not supported an error will be returned by the device. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 8 +++----- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) commit 7102a18ac3f323805e3cd8f3dc64907644608c1e Author: Netanel Belgazal Date: Thu Feb 9 15:21:37 2017 +0200 net/ena: change driver's default timeouts The timeouts were too agressive and sometimes cause false alarms. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 5add6e4a222f2eb437992af6b39c8a9c9a28604a Author: Netanel Belgazal Date: Thu Feb 9 15:21:36 2017 +0200 net/ena: reduce the severity of ena printouts Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 27 +++++++++++++++++---------- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++++++++++--- 2 files changed, 28 insertions(+), 13 deletions(-) commit a8496eb81342393e4c8280a5ec27e1872a3fb9fd Author: Netanel Belgazal Date: Thu Feb 9 15:21:35 2017 +0200 net/ena: use READ_ONCE to access completion descriptors Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit b1669c9f5ac9d50651889e22e4a82f1b34af32d3 Author: Netanel Belgazal Date: Thu Feb 9 15:21:34 2017 +0200 net/ena: use napi_complete_done() return value Do not unamsk interrupts if we are in busy poll mode. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 ++++++++++++++++++---------- 1 file changed, 29 insertions(+), 15 deletions(-) commit 3f6159dbfc24c5e61fb5deb9b69e0abb934609bb Author: Netanel Belgazal Date: Thu Feb 9 15:21:33 2017 +0200 net/ena: fix potential access to freed memory during device reset If the ena driver detects that the device is not behave as expected, it tries to reset the device. The reset flow calls ena_down, which will frees all the resources the driver allocates and then it will reset the device. This flow can cause memory corruption if the device is still writes to the driver's memory space. To overcome this potential race, move the reset before the device resources are freed. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 56 +++++++++++++++++++++------- 1 file changed, 43 insertions(+), 13 deletions(-) commit d81db24056132fe8b83e2fba337e9ea76675e68d Author: Netanel Belgazal Date: Thu Feb 9 15:21:32 2017 +0200 net/ena: refactor ena_get_stats64 to be atomic context safe ndo_get_stat64() can be called from atomic context, but the current implementation sends an admin command to retrieve the statistics from the device. This admin command can sleep. This patch re-factors the implementation of ena_get_stats64() to use the {rx,tx}bytes/count from the driver's inner counters, and to obtain the rx drop counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 ++++ drivers/net/ethernet/amazon/ena/ena_netdev.c | 48 ++++++++++++++++-------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 3 files changed, 42 insertions(+), 15 deletions(-) commit 22b331c9e0a345126708af60f7d00d38b53db70b Author: Netanel Belgazal Date: Thu Feb 9 15:21:31 2017 +0200 net/ena: fix NULL dereference when removing the driver after device reset failed If for some reason the device stops responding, and the device reset failes to recover the device, the mmio register read data structure will not be reinitialized. On driver removal, the driver will also try to reset the device, but this time the mmio data structure will be NULL. To solve this issue, perform the device reset in the remove function only if the device is runnig. Crash log 54.240382] BUG: unable to handle kernel NULL pointer dereference at (null) [ 54.244186] IP: [] ena_com_reg_bar_read32+0x8a/0x180 [ena_drv] [ 54.244186] PGD 0 [ 54.244186] Oops: 0002 [#1] SMP [ 54.244186] Modules linked in: ena_drv(OE-) snd_hda_codec_generic kvm_intel kvm crct10dif_pclmul ppdev crc32_pclmul ghash_clmulni_intel aesni_intel snd_hda_intel aes_x86_64 snd_hda_controller lrw gf128mul cirrus glue_helper ablk_helper ttm snd_hda_codec drm_kms_helper cryptd snd_hwdep drm snd_pcm pvpanic snd_timer syscopyarea sysfillrect snd parport_pc sysimgblt serio_raw soundcore i2c_piix4 mac_hid lp parport psmouse floppy [ 54.244186] CPU: 5 PID: 1841 Comm: rmmod Tainted: G OE 3.16.0-031600-generic #201408031935 [ 54.244186] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 54.244186] task: ffff880135852880 ti: ffff8800bb640000 task.ti: ffff8800bb640000 [ 54.244186] RIP: 0010:[] [] ena_com_reg_bar_read32+0x8a/0x180 [ena_drv] [ 54.244186] RSP: 0018:ffff8800bb643d50 EFLAGS: 00010083 [ 54.244186] RAX: 000000000000deb0 RBX: 0000000000030d40 RCX: 0000000000000003 [ 54.244186] RDX: 0000000000000202 RSI: 0000000000000058 RDI: ffffc90000775104 [ 54.244186] RBP: ffff8800bb643d88 R08: 0000000000000000 R09: cf00000000000000 [ 54.244186] R10: 0000000fffffffe0 R11: 0000000000000001 R12: 0000000000000000 [ 54.244186] R13: ffffc90000765000 R14: ffffc90000775104 R15: 00007fca1fa98090 [ 54.244186] FS: 00007fca1f1bd740(0000) GS:ffff88013fd40000(0000) knlGS:0000000000000000 [ 54.244186] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 54.244186] CR2: 0000000000000000 CR3: 00000000b9cf6000 CR4: 00000000001406e0 [ 54.244186] Stack: [ 54.244186] 0000000000000202 0000005800000286 ffffc90000765000 ffffc90000765000 [ 54.244186] ffff880135f6b000 ffff8800b9360000 00007fca1fa98090 ffff8800bb643db8 [ 54.244186] ffffffffc0680b3d ffff8800b93608c0 ffffc90000765000 ffff880135f6b000 [ 54.244186] Call Trace: [ 54.244186] [] ena_com_dev_reset+0x1d/0x1b0 [ena_drv] [ 54.244186] [] ena_remove+0xa7/0x130 [ena_drv] [ 54.244186] [] pci_device_remove+0x46/0xc0 [ 54.244186] [] __device_release_driver+0x7f/0xf0 [ 54.244186] [] driver_detach+0xc8/0xd0 [ 54.244186] [] bus_remove_driver+0x59/0xd0 [ 54.244186] [] driver_unregister+0x2e/0x60 [ 54.244186] [] ? show_refcnt+0x40/0x40 [ 54.244186] [] pci_unregister_driver+0x23/0xa0 [ 54.244186] [] ena_cleanup+0x10/0xed1 [ena_drv] [ 54.244186] [] SyS_delete_module+0x157/0x1e0 [ 54.244186] [] ? do_notify_resume+0xc7/0xd0 [ 54.244186] [] system_call_fastpath+0x1a/0x1f [ 54.244186] Code: c3 4d 8d b5 04 01 01 00 4c 89 f7 e8 e1 5a 11 c1 48 89 45 c8 41 0f b7 85 00 01 01 00 8d 48 01 66 2d 52 21 66 41 89 8d 00 01 01 00 <66> 41 89 04 24 0f b7 45 d4 89 45 d0 89 c1 41 0f b7 85 00 01 01 [ 54.244186] RIP [] ena_com_reg_bar_read32+0x8a/0x180 [ena_drv] [ 54.244186] RSP [ 54.244186] CR2: 0000000000000000 [ 54.244186] ---[ end trace 18dd9889b6497810 ]--- Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 422e21e7619bb8751aa1cd32a9b671b1baaf3d18 Author: Netanel Belgazal Date: Thu Feb 9 15:21:30 2017 +0200 net/ena: fix RSS default hash configuration ENA default hash configures IPv4_frag hash twice instead of configure non-IP packets. The bug caused IPv4 fragmented packets to be calculated based on L2 source and destination address instead of L3 source and destination. IPv4 packets can reach to the wrong Rx queue. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e2de20ddc4b606a9b6b170a6bb21ee4dc4ad93a Author: Netanel Belgazal Date: Thu Feb 9 15:21:29 2017 +0200 net/ena: fix ethtool RSS flow configuration ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power of two values. This bug effect the ethtool set/get rxnfc. ethtool will report wrong values hash fields for get and will configure wrong hash fields in set. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6a1ce2fb67161f249b372a87d1d9899d8b087c8e Author: Netanel Belgazal Date: Thu Feb 9 15:21:28 2017 +0200 net/ena: fix queues number calculation The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus() while it should have use num_online_cpus() instead. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdeea0ad87fd05e5fcb5e7b6643eabc34f29405a Author: Netanel Belgazal Date: Thu Feb 9 15:21:27 2017 +0200 net/ena: remove ntuple filter support from device feature list Remove NETIF_F_NTUPLE from netdev->features. The ENA device driver does not support ntuple filtering. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 - 1 file changed, 1 deletion(-) commit 42e9401bd1467d22c4dc4d2c637347b874e6a80b Author: Sascha Hauer Date: Thu Feb 9 11:50:24 2017 +0100 mtd: Add partition device node to mtd partition devices The user visible change here is that mtd partitions get an of_node link in sysfs. Signed-off-by: Sascha Hauer Signed-off-by: Uwe Kleine-König Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 1 + drivers/mtd/ofpart.c | 1 + include/linux/mtd/partitions.h | 1 + 3 files changed, 3 insertions(+) commit 89a0d9a9f1941a086a82bc7cd73d275cec98ba14 Author: Rafał Miłecki Date: Tue Jan 10 23:15:25 2017 +0100 mtd: bcm47xxpart: support layouts with multiple TRX partitions Some devices may have an extra TRX partition used as failsafe one. If we detect such partition we should set a proper name for it and don't parse it. Signed-off-by: Rafał Miłecki Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/bcm47xxpart.c | 56 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) commit b522d7b0ebe3539340c2a6d46d787ae3d33bcb92 Author: Rafał Miłecki Date: Tue Jan 10 23:15:24 2017 +0100 mtd: bcm47xxpart: move TRX parsing code to separated function This change simplifies main parsing loop logic a bit. In future it may be useful for moving TRX support to separated module / parser (if we implement support for them at some point). Finally parsing TRX at the end puts us in a better position as we have better flash layout knowledge. It may be useful e.g. if it appears there is more than 1 TRX partition. Signed-off-by: Rafał Miłecki Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/bcm47xxpart.c | 121 ++++++++++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 47 deletions(-) commit 496e9cb5b2aa2ba303d2bbd08518f9be2219ab4b Author: Anton Blanchard Date: Fri Feb 10 12:16:59 2017 +1100 powerpc/ftrace: Fix confusing help text for DISABLE_MPROFILE_KERNEL The final paragraph of the help text is reversed. We want to enable this option by default, and disable it if the toolchain has a working -mprofile-kernel. Fixes: 8c50b72a3b4f ("powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel") Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7e0fb6c2029a780444d09560f739e020d54fe4d Author: Michael Ellerman Date: Tue Feb 7 21:01:01 2017 +1100 powerpc/powernv: Fix opal_exit tracepoint opcode Currently the opal_exit tracepoint usually shows the opcode as 0: -0 [047] d.h. 635.654292: opal_entry: opcode=63 -0 [047] d.h. 635.654296: opal_exit: opcode=0 retval=0 kopald-1209 [019] d... 636.420943: opal_entry: opcode=10 kopald-1209 [019] d... 636.420959: opal_exit: opcode=0 retval=0 This is because we incorrectly load the opcode into r0 before calling __trace_opal_exit(), whereas it expects the opcode in r3 (first function parameter). In fact we are leaving the retval in r3, so opcode and retval will always show the same value. Instead load the opcode into r3, resulting in: -0 [040] d.h. 636.618625: opal_entry: opcode=63 -0 [040] d.h. 636.618627: opal_exit: opcode=63 retval=0 Fixes: c49f63530bb6 ("powernv: Add OPAL tracepoints") Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99ad503287daf78e19e64e0e51f1d60a2a592217 Author: Michael Ellerman Date: Thu Feb 9 23:55:43 2017 +1100 powerpc: Add a prototype for mcount() so it can be versioned Currently we get a warning that _mcount() can't be versioned: WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. Add a prototype to asm-prototypes.h to fix it. The prototype is not really correct, mcount() is not a normal function, it has a special ABI. But for the purpose of versioning it doesn't matter. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 2 ++ 1 file changed, 2 insertions(+) commit be9ba9ff93cc3e44dc46da9ed25655780069411a Author: Shailendra Singh Date: Wed Feb 1 14:52:42 2017 -0800 powerpc: Drop GPL from of_node_to_nid() export to match other arches The generic implementation of of_node_to_nid() is EXPORT_SYMBOL, added in commit 298535c00a2c ("of, numa: Add NUMA of binding implementation."). The powerpc implementation added in commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with numa topology") is EXPORT_SYMBOL_GPL. This creates an inconsistency for of_node_to_nid() callers across architectures. Update the powerpc implementation to be exported consistently with the generic implementation. Signed-off-by: Shailendra Singh Reviewed-by: Andy Ritger Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 762df10bad6954b353ee649c387a8ffacf6dc347 Author: Anju T Date: Wed Feb 8 15:20:52 2017 +0530 powerpc/kprobes: Optimize kprobe in kretprobe_trampoline() Kprobe placed on the kretprobe_trampoline() during boot time can be optimized, since the instruction at probe point is a 'nop'. Signed-off-by: Anju T Sudhakar Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 8 ++++++++ arch/powerpc/kernel/optprobes.c | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 51c9c0843993528bffc920c54c2121d9e6f8b090 Author: Anju T Date: Wed Feb 8 15:20:51 2017 +0530 powerpc/kprobes: Implement Optprobes Current infrastructure of kprobe uses the unconditional trap instruction to probe a running kernel. Optprobe allows kprobe to replace the trap with a branch instruction to a detour buffer. Detour buffer contains instructions to create an in memory pt_regs. Detour buffer also has a call to optimized_callback() which in turn call the pre_handler(). After the execution of the pre-handler, a call is made for instruction emulation. The NIP is determined in advanced through dummy instruction emulation and a branch instruction is created to the NIP at the end of the trampoline. To address the limitation of branch instruction in POWER architecture, detour buffer slot is allocated from a reserved area. For the time being, 64KB is reserved in memory for this purpose. Instructions which can be emulated using analyse_instr() are the candidates for optimization. Before optimization ensure that the address range between the detour buffer allocated and the instruction being probed is within +/- 32MB. Signed-off-by: Anju T Sudhakar Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/include/asm/kprobes.h | 24 ++- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/optprobes.c | 348 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/optprobes_head.S | 135 ++++++++++++ arch/powerpc/lib/code-patching.c | 21 ++ 7 files changed, 530 insertions(+), 1 deletion(-) commit 30176466e36aadba01e1a630cf42397a3438efa4 Author: Naveen N. Rao Date: Wed Feb 8 14:27:31 2017 +0530 powerpc/kprobes: Fixes for kprobe_lookup_name() on BE Fix two issues with kprobes.h on BE which were exposed with the optprobes work: - one, having to do with a missing include for linux/module.h for MODULE_NAME_LEN -- this didn't show up previously since the only users of kprobe_lookup_name were in kprobes.c, which included linux/module.h through other headers, and - two, with a missing const qualifier for a local variable which ends up referring a string literal. Again, this is unique to how kprobe_lookup_name is being invoked in optprobes.c Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kprobes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ebfa50df435eed18e1389a43e0596246228e7298 Author: Anju T Date: Wed Feb 8 14:27:30 2017 +0530 powerpc: Add helper to check if offset is within relative branch range To permit the use of relative branch instruction in powerpc, the target address has to be relatively nearby, since the address is specified in an immediate field (24 bit filed) in the instruction opcode itself. Here nearby refers to 32MB on either side of the current instruction. This patch verifies whether the target address is within +/- 32MB range or not. Signed-off-by: Naveen N. Rao Signed-off-by: Anju T Sudhakar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/lib/code-patching.c | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) commit c233f5979b3dbb39a5b2473b5fcaf58baec8f1bd Author: Naveen N. Rao Date: Wed Feb 8 14:27:29 2017 +0530 powerpc/bpf: Introduce __PPC_SH64() Introduce __PPC_SH64() as a 64-bit variant to encode shift field in some of the shift and rotate instructions operating on double-words. Convert some of the BPF instruction macros to use the same. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/net/bpf_jit.h | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 438cc81a41e8c2905d0f4f300d4690445b2ab240 Author: David Gibson Date: Fri Dec 9 11:07:38 2016 +1100 powerpc/pseries: Automatically resize HPT for memory hot add/remove We've now implemented code in the pseries platform to use the new PAPR interface to allow resizing the hash page table (HPT) at runtime. This patch uses that interface to automatically attempt to resize the HPT when memory is hot added or removed. This tries to always keep the HPT at a reasonable size for our current memory size. Signed-off-by: David Gibson Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sparsemem.h | 1 + arch/powerpc/mm/hash_utils_64.c | 29 +++++++++++++++++++++++++++++ arch/powerpc/mm/mem.c | 4 ++++ 3 files changed, 34 insertions(+) commit 0de0fb09bbce1e1635a0d4c4781af6ec8cbfdb81 Author: David Gibson Date: Fri Dec 9 11:07:37 2016 +1100 powerpc/pseries: Advertise HPT resizing support via CAS The hypervisor needs to know a guest is capable of using the HPT resizing PAPR extension in order to make full advantage of it for memory hotplug. If the hypervisor knows the guest is HPT resize aware, it can size the initial HPT based on the initial guest RAM size, relying on the guest to resize the HPT when more memory is hot-added. Without this, the hypervisor must size the HPT for the maximum possible guest RAM, which can lead to a huge waste of space if the guest never actually expends to that maximum size. This patch advertises the guest's support for HPT resizing via the ibm,client-architecture-support OF interface. We use bit 5 of byte 6 of option vector 5 for this purpose, as defined in the PAPR ACR "HPT resizing option". Signed-off-by: David Gibson Reviewed-by: Anshuman Khandual Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit dbcf929c0062b758fbb6312ccaf30716c0c0a608 Author: David Gibson Date: Fri Dec 9 11:07:36 2016 +1100 powerpc/pseries: Add support for hash table resizing This adds support for using two hypercalls to change the size of the main hash page table while running as a PAPR guest. For now these hypercalls are only in experimental qemu versions. The interface is two part: first H_RESIZE_HPT_PREPARE is used to allocate and prepare the new hash table. This may be slow, but can be done asynchronously. Then, H_RESIZE_HPT_COMMIT is used to switch to the new hash table. This requires that no CPUs be concurrently updating the HPT, and so must be run under stop_machine(). This also adds a debugfs file which can be used to manually control HPT resizing or testing purposes. Signed-off-by: David Gibson Reviewed-by: Paul Mackerras [mpe: Rename the debugfs file to "hpt_order"] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/mm/hash_utils_64.c | 33 ++++++++ arch/powerpc/platforms/pseries/lpar.c | 109 ++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) commit 52176603795c2ab7e9faf6bb94820da1b726aabd Author: Dan Carpenter Date: Thu Feb 9 17:18:00 2017 +0000 KEYS: Use memzero_explicit() for secret data I don't think GCC has figured out how to optimize the memset() away, but they might eventually so let's future proof this code a bit. Signed-off-by: Dan Carpenter Signed-off-by: David Howells Acked-by: Mimi Zohar Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57cb17e764ba0aaa169d07796acce54ccfbc6cae Author: Dan Carpenter Date: Thu Feb 9 17:17:52 2017 +0000 KEYS: Fix an error code in request_master_key() This function has two callers and neither are able to handle a NULL return. Really, -EINVAL is the correct thing return here anyway. This fixes some static checker warnings like: security/keys/encrypted-keys/encrypted.c:709 encrypted_key_decrypt() error: uninitialized symbol 'master_key'. Fixes: 7e70cb497850 ("keys: add new key-type encrypted") Signed-off-by: Dan Carpenter Acked-by: Mimi Zohar Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f86880175d0db2e3f2e27c24881dd9b395b0b920 Author: Felix Fietkau Date: Thu Feb 9 17:17:45 2017 +0000 sign-file: fix build error in sign-file.c with libressl The sign-file tool failed to build against libressl. Fix this by extending the PKCS7 check and thus making sign-file link against libressl without an error. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: David Howells Signed-off-by: James Morris scripts/sign-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13f62f54d174d3417c3caaafedf5e22a0a03e442 Merge: f320d35 fad0612 Author: Dave Airlie Date: Fri Feb 10 10:13:30 2017 +1000 Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next Some additional fixes for 4.11. Delayed a bit due to Chinese New Year. Highlights: - Powerplay fixes - VCE and UVD powergating fixes - Clean up amdgpu SI gfx code to match CI and VI - Misc bug fixes * 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux: (30 commits) drm/amdgpu: report the number of bytes moved at buffer creation drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted() drm/amdgpu: add support for new smc firmware on polaris drm/amd/powerplay: refine code to avoid potential bug that the memory not cleared. drm/amdgpu: shut up #warning for compile testing drm/amdgpu/virt: fix double kfree on bo_va drm/radeon: remove some dead code drm/radeon: avoid kernel segfault in vce when gpu fails to resume drm/amd/powerplay: set fan speed to max in profile peak mode only. drm/amd/gfx6: update gb_addr_config drm/amdgpu: update HAINAN_GB_ADDR_CONFIG_GOLDEN drm/amdgpu: update VERDE_GB_ADDR_CONFIG_GOLDEN drm/amdgpu: refine si_read_register drm/amdgpu/gfx6: clean up spi configuration drm/amdgpu/gfx6: clean up cu configuration drm/amdgpu/gfx6: clean up rb configuration drm/amdgpu: refine vce3.0 code and related powerplay pg code. drm/amdgpu: move subfunctions to the front of vce_v2_0.c. drm/amdgpu: enable vce pg feature on Kv. drm/amdgpu: refine code for VCE2.0 and related dpm code. ... commit f320d3572344d34a6d8b516261416df0193602f6 Merge: 79b3349 ef15d36 Author: Dave Airlie Date: Fri Feb 10 10:12:56 2017 +1000 Merge tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next two minor fixes. * tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: check for clk_prepare_enable() error drm/fsl-dcu: remove unneeded 'ret' assignment commit 79b33494af518d3f20d1b7365a0c717daff83ab6 Merge: f864b00 f9ad86e Author: Dave Airlie Date: Fri Feb 10 10:12:00 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc into drm-next Just 3 bugfixes for 4.11 merge window: - fbdev module unload oops fix from Chris - patch from Dan that look really dangers, better safe than sorry * tag 'drm-misc-next-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc: drm/atomic: fix an error code in mode_fixup() drm: Cancel drm_fb_helper_resume_work on unload drm: Cancel drm_fb_helper_dirty_work on unload commit 8b9b22ba75907dcced88c815a5427ec0b4298aec Author: Wei Yongjun Date: Tue Feb 7 14:52:58 2017 +0000 scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn() 'conn_info' is malloced in qedi_iscsi_update_conn() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Wei Yongjun Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_iscsi.c | 4 ---- 1 file changed, 4 deletions(-) commit a2a15479d617ebbab67c60b4eed02524536af780 Merge: e2241be 1ea0ce4 Author: James Morris Date: Fri Feb 10 10:28:49 2017 +1100 Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/selinux into next commit 60db3a4d8cc9073cf56264785197ba75ee1caca4 Author: Sinan Kaya Date: Fri Jan 20 09:16:51 2017 -0500 PCI: Enable PCIe Extended Tags if supported Every PCIe device can generate 5-bit transaction Tags, which allow up to 32 concurrent requests. Some devices can generate 8-bit Extended Tags, which allow up to 256 concurrent requests. Per the ECN mentioned below, all PCIe Receivers are expected to support Extended Tags, so devices are allowed (but not required) to enable them by default. If a device supports Extended Tags but does not enable them by default, enable them. This allows the device to have up to 256 outstanding transactions at a time, which may improve performance. [bhelgaas: changelog, check for PCIe device] Link: https://pcisig.com/sites/default/files/specification_documents/ECN_Extended_Tag_Enable_Default_05Sept2008_final.pdf Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2fd260f03b6a365bad48522f3948463928f91c2c Author: Michael S. Tsirkin Date: Tue Jan 24 19:35:56 2017 +0200 PCI/AER: Remove unused .link_reset() callback No hardware seems to actually call .link_reset(), and no driver implements it as more than a nop stub. Drop mentions of the callback from everywhere. It's dropped from the documentation as well, but the doc really needs to be updated to reflect reality better (e.g., on PCIe, slot reset is the link reset). This will be done in a later patch. Signed-off-by: Michael S. Tsirkin Signed-off-by: Bjorn Helgaas Documentation/PCI/pci-error-recovery.txt | 24 +++--------------------- drivers/infiniband/hw/hfi1/pcie.c | 10 ---------- drivers/infiniband/hw/qib/qib_pcie.c | 8 -------- drivers/media/pci/ngene/ngene-cards.c | 7 ------- drivers/misc/genwqe/card_base.c | 1 - include/linux/pci.h | 3 --- 6 files changed, 3 insertions(+), 50 deletions(-) commit b66a8043d0baa9818a407ed857eada5cb21cd9bb Merge: c0e4dad 9c744d1 Author: David S. Miller Date: Thu Feb 9 17:24:30 2017 -0500 Merge branch 'enic-vxlan-offload' Govindarajulu Varadarajan says: ==================== enic: add vxlan offload support This series adds vxlan offload support for enic driver. The first patch adds vxlan devcmd for configuring vxland offload parameters. Second patch adds ndo_udp_tunnel_add/del and offload on rx path. There are to modes in which fw supports vxlan offload. mode 0: fcoe bit is set for encapsulated packet. fcoe_fc_crc_ok is set if checksum of csum is ok. This bit is or of ip_csum_ok and tcp_udp_csum_ok mode 2: BIT(0) in rss_hash is set if it is encapsulated packet. BIT(1) is set if outer_ip_csum_ok/ BIT(2) is set if outer_tcp_csum_ok Some hw supports only mode 0, some support mode 0 and 2. Driver gets the supported modes bitmap using get_supported_feature_ver devcmd and selects the highest mode both driver and fw supports. Third patch adds offload support on tx path by adding enic_features_check(). v2: Order local variable declarations from longest to shortest line, on all three patches. ==================== Signed-off-by: David S. Miller commit 9c744d10870c5d6f36264be39bf5de87447f1052 Author: Govindarajulu Varadarajan Date: Wed Feb 8 16:43:09 2017 -0800 enic: add vxlan offload on tx path Define ndo_features_check. Hw supports offload only for ipv4 inner and ipv4 outer pkt. Code refactor for setting inner tcp pseudo csum. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 126 +++++++++++++++++++++++++--- 1 file changed, 114 insertions(+), 12 deletions(-) commit 257e738238e8ee3960957097be4bf6be6c66a3c4 Author: Govindarajulu Varadarajan Date: Wed Feb 8 16:43:08 2017 -0800 enic: add udp_tunnel ndo for vxlan offload Defines enic_udp_tunnel_add/del for configuring vxlan tunnel offload. enic supports offload of only one ipv4/udp port. There are two modes that fw supports for vxlan offload. mode 0: fcoe bit is set for encapsulated packet. fcoe_fc_crc_ok is set if checksum of csum is ok. This bit is or of ip_csum_ok and tcp_udp_csum_ok mode 2: BIT(0) in rss_hash is set if it is encapsulated packet. BIT(1) is set if outer_ip_csum_ok/ BIT(2) is set if outer_tcp_csum_ok tcp_udp_csum_ok/ipv4_csum_ok is set if inner csum is OK. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 6 ++ drivers/net/ethernet/cisco/enic/enic_main.c | 156 +++++++++++++++++++++++++++- 2 files changed, 159 insertions(+), 3 deletions(-) commit ca0291798227a6da0f3ba6c2e3a43d94d5dcf591 Author: Govindarajulu Varadarajan Date: Wed Feb 8 16:43:07 2017 -0800 enic: add devcmds for vxlan offload This patch adds devcmds needed for vxlan offload. Implement 3 new devcmd overlay_offload_ctrl: enable/disable offload overlay_offload_cfg: update offload udp port number get_supported_feature_ver: get hw supported offload version. Each version has different bitmap for csum_ok/encap Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/vnic_dev.c | 34 ++++++++++++++++++ drivers/net/ethernet/cisco/enic/vnic_dev.h | 5 +++ drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 51 +++++++++++++++++++++++++++ drivers/net/ethernet/cisco/enic/vnic_enet.h | 1 + 4 files changed, 91 insertions(+) commit c0e4dadb3494bd0bf4fdeac341509deac8f4b47c Author: Andrew Lunn Date: Thu Feb 9 00:00:43 2017 +0100 net: dsa: mv88e6xxx: Move forward declaration to where it is needed Move it out from the middle for the #defines to just before it is needed. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50f008e583d11b3133f23f29b05a0fcac2af3b40 Author: Florian Fainelli Date: Wed Feb 8 14:40:04 2017 -0800 net: dsa: Fix duplicate object rule While adding switch.o to the list of DSA object files, we essentially duplicated the previous obj-y line and just added switch.o, remove the duplicate. Fixes: f515f192ab4f ("net: dsa: add switch notifier") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/Makefile | 1 - 1 file changed, 1 deletion(-) commit 165f1cc0b5858b17cbb31312e861495f4500d9f0 Merge: 15c2e10 038b940 Author: David S. Miller Date: Thu Feb 9 17:09:20 2017 -0500 Merge branch 'qcom-emac-more-ethtool' Timur Tabi says: ==================== net: qcom/emac: add the last ethtool functions These two patches implement the remaining two ethtool functions that are of interest to the Qualcomm EMAC driver. These are the last patches that will be submitted for the 4.11 merge window. ==================== Signed-off-by: David S. Miller commit 038b9404d4e2db4fbc03d5d2203abafc6e188528 Author: Timur Tabi Date: Wed Feb 8 15:49:28 2017 -0600 net: qcom/emac: add ethtool support for setting ring parameters Implement the set_ringparam method, which allows the user to specify the size of the TX and RX descriptor rings. The values are constrained to the limits of the hardware. Since the driver does not use separate queues for mini or jumbo frames, attempts to set those values are rejected. If the interface is already running when the setting is changed, then the interface is reset. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit c4e7beea21921733026b6a1bca0652c883d84680 Author: Timur Tabi Date: Wed Feb 8 15:49:27 2017 -0600 net: qcom/emac: add ethtool support for reading hardware registers Implement the get_regs_len and get_regs ethtool methods. The driver returns the values of selected hardware registers. The make the register offsets known to emac_ethtool, the the register offset macros are all combined into one header file. They were inexplicably and arbitrarily split between two files. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 40 ++++++++ drivers/net/ethernet/qualcomm/emac/emac-mac.c | 52 ----------- drivers/net/ethernet/qualcomm/emac/emac.h | 108 ++++++++++++++++------ 3 files changed, 119 insertions(+), 81 deletions(-) commit 15c2e102412d95af4fe88e5b28b3eba124545bbf Author: Arnd Bergmann Date: Wed Feb 8 22:24:19 2017 +0100 ARM: orion: remove unused wnr854t_switch_plat_data The other instances of this structure got removed along with the MDIO device change, but this one was left behind and needs to be removed as well: arch/arm/mach-orion5x/wnr854t-setup.c:109:44: error: 'wnr854t_switch_plat_data' defined but not used [-Werror=unused-variable] static struct dsa_platform_data __initdata wnr854t_switch_plat_data = { Fixes: 575e93f7b5e6 ("ARM: orion: Register DSA switch as a MDIO device") Signed-off-by: Arnd Bergmann Acked-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/mach-orion5x/wnr854t-setup.c | 5 ----- 1 file changed, 5 deletions(-) commit 051bd84bb45bc994b7d762467f60b3bd0c7aa6bc Author: Dave Gerlach Date: Fri Feb 3 11:29:29 2017 -0600 cpufreq: dt: Don't use generic platdev driver for ti-cpufreq platforms Some TI platforms, specifically those in the am33xx, am43xx, dra7xx, and am57xx families of SoCs can make use of the ti-cpufreq driver to selectively enable OPPs based on the exact configuration in use. The ti-cpufreq is given the responsibility of creating the cpufreq-dt platform device when the driver is in use so drop am33xx and dra7xx from the cpufreq-dt-platdev driver so it is not created twice. Acked-by: Viresh Kumar Signed-off-by: Dave Gerlach Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 2 -- 1 file changed, 2 deletions(-) commit e13cf046cd70894393a1085ca39da7ef751353fb Author: Dave Gerlach Date: Fri Feb 3 11:29:28 2017 -0600 cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime Some TI SoCs, like those in the AM335x, AM437x, DRA7x, and AM57x families, have different OPPs available for the MPU depending on which specific variant of the SoC is in use. This can be determined through use of the revision and an eFuse register present in the silicon. Introduce a ti-cpufreq driver that can read the aformentioned values and provide them as version matching data to the opp framework. Through this the opp-supported-hw dt binding that is part of the operating-points-v2 table can be used to indicate availability of OPPs for each device. This driver also creates the "cpufreq-dt" platform_device after passing the version matching data to the OPP framework so that the cpufreq-dt handles the actual cpufreq implementation. Even without the necessary data to pass the version matching data the driver will still create this device to maintain backwards compatibility with operating-points v1 tables. Acked-by: Viresh Kumar Signed-off-by: Dave Gerlach Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 11 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/ti-cpufreq.c | 272 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 284 insertions(+) commit 2cbf5b4212b1595449548f189a8fb2df0b25a03f Merge: caa2858 242bd2d Author: David S. Miller Date: Thu Feb 9 16:57:39 2017 -0500 Merge branch 'sctp-sender-stream-reconf-reset-add-streams' Xin Long says: ==================== sctp: add sender-side procedures for stream reconf asoc reset and add streams Patch 4/6 is to implement sender-side procedures for the SSN/TSN Reset Request Parameter described in rfc6525 section 5.1.4, patch 3/6 is ahead of it to define a function to make the request chunk for it. Patch 6/6 is to implement sender-side procedures for the Add Incoming and Outgoing Streams Request Parameter Request Parameter described in rfc6525 section 5.1.5 and 5.1.6, patch 5/6 is ahead of it to define a function to make the request chunk for it. Patch 2/6 is a fix to recover streams states when it fails to send request and Patch 1/6 is to drop some unncessary __packed from some old structures. v1->v2: - put these into a smaller group. - rename some temporary variables in the codes. - rename the titles of the commits and improve some changelogs. v2->v3: - re-split the patchset and make sure it has no dead codes for review. - move some codes into stream.c from socket.c. v3->v4: - add one more patch to fix a send reset stream request issue. - doing actual work only when request is sent successfully. - reduce some indents in sctp_send_add_streams. v4->v5: - close streams before sending request and recover them when sending fails in patch 1/5 and patch 3/5 v5->v6: - add patch 1/6 to drop some unncessary __packed from some old structures. - remove __packed from some new structures in patch 3/6 and 5/6. - define unsigned int outcnt and incnt to make codes smaller in patch 6/6. - use krealloc instead of kcalloc and remove ksize check in patch 6/6, as ksize check is acutally used in krealloc already. ==================== Signed-off-by: David S. Miller commit 242bd2d519d7194633e309286ba7ba29a1ad63e8 Author: Xin Long Date: Thu Feb 9 01:18:20 2017 +0800 sctp: implement sender-side procedures for Add Incoming/Outgoing Streams Request Parameter This patch is to implement Sender-Side Procedures for the Add Outgoing and Incoming Streams Request Parameter described in rfc6525 section 5.1.5-5.1.6. It is also to add sockopt SCTP_ADD_STREAMS in rfc6525 section 6.3.4 for users. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 2 ++ include/uapi/linux/sctp.h | 7 +++++ net/sctp/socket.c | 29 ++++++++++++++++++ net/sctp/stream.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) commit 78098117f8bfad4f2104c3f7b6b69071af95a246 Author: Xin Long Date: Thu Feb 9 01:18:19 2017 +0800 sctp: add support for generating stream reconf add incoming/outgoing streams request chunk This patch is to define Add Incoming/Outgoing Streams Request Parameter described in rfc6525 section 4.5 and 4.6. They can be in one same chunk trunk as rfc6525 section 3.1-7 describes, so make them in one function. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/linux/sctp.h | 7 +++++++ include/net/sctp/sm.h | 3 +++ net/sctp/sm_make_chunk.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit a92ce1a42dde1caaee4afae67531e3e7acecf6e4 Author: Xin Long Date: Thu Feb 9 01:18:18 2017 +0800 sctp: implement sender-side procedures for SSN/TSN Reset Request Parameter This patch is to implement Sender-Side Procedures for the SSN/TSN Reset Request Parameter descibed in rfc6525 section 5.1.4. It is also to add sockopt SCTP_RESET_ASSOC in rfc6525 section 6.3.3 for users. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 1 + include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 29 +++++++++++++++++++++++++++++ net/sctp/stream.c | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) commit c56480a1e90261842f54f3a5a9ebc12d827f0c3e Author: Xin Long Date: Thu Feb 9 01:18:17 2017 +0800 sctp: add support for generating stream reconf ssn/tsn reset request chunk This patch is to define SSN/TSN Reset Request Parameter described in rfc6525 section 4.3. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 5 +++++ include/net/sctp/sm.h | 2 ++ net/sctp/sm_make_chunk.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) commit 119aecbae57e6f10b85b7cd5e070eef006dbcd74 Author: Xin Long Date: Thu Feb 9 01:18:16 2017 +0800 sctp: streams should be recovered when it fails to send request. Now when sending stream reset request, it closes the streams to block further xmit of data until this request is completed, then calls sctp_send_reconf to send the chunk. But if sctp_send_reconf returns err, and it doesn't recover the streams' states back, which means the request chunk would not be queued and sent, so the asoc will get stuck, streams are closed and no packet is even queued. This patch is to fix it by recovering the streams' states when it fails to send the request, it is also to fix a return value. Fixes: 7f9d68ac944e ("sctp: implement sender-side procedures for SSN Reset Request Parameter") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 9faf1c0fd5a943e498dbc0c86ff42e965b347d08 Author: Xin Long Date: Thu Feb 9 01:18:15 2017 +0800 sctp: drop unnecessary __packed from some stream reconf structures commit 85c727b59483 ("sctp: drop __packed from almost all SCTP structures") has removed __packed from almost all SCTP structures. But there still are three structures where it should be dropped. This patch is to remove it from some stream reconf structures. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/linux/sctp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 83f66a6f08fa4004d6fb9d50c57735067bbbb405 Author: Jelle van der Waa Date: Sat Jan 14 10:25:02 2017 -0800 Input: add driver for Zeitec ZET6223 This is a basic driver for the Zeitec ZET6223 I2C touchscreen controllers. The driver does not support firmware loading, which is not required for all tablets which contain this chip. Signed-off-by: Jelle van der Waa Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/zet6223.txt | 32 +++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/input/touchscreen/Kconfig | 11 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/zet6223.c | 267 +++++++++++++++++++++ 5 files changed, 312 insertions(+) commit 953a0f18337406ab041252ce5a62db5d173bee5f Author: Dave Gerlach Date: Thu Feb 9 09:35:49 2017 -0600 Documentation: dt: add bindings for ti-cpufreq Add the device tree bindings document for the TI CPUFreq/OPP driver on AM33xx, AM43xx, DRA7xx, and AM57xx SoCs. The operating-points-v2 binding allows us to provide an opp-supported-hw property for each OPP to define when it is available. This driver is responsible for reading and parsing registers to determine which OPPs can be selectively enabled based on the specific SoC in use by matching against the opp-supported-hw data. Acked-by: Viresh Kumar Signed-off-by: Dave Gerlach Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki .../devicetree/bindings/cpufreq/ti-cpufreq.txt | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) commit 40e993aa04fc44ee426b27e86186b95c130f6630 Merge: b1e9a64 0764c60 Author: Rafael J. Wysocki Date: Thu Feb 9 22:52:35 2017 +0100 Merge OPP material for v4.11 to satisfy dependencies. commit 0764c604c8128f17fd740ff8b1701d0a1301eb7e Author: Dave Gerlach Date: Fri Feb 3 11:29:26 2017 -0600 PM / OPP: Expose _of_get_opp_desc_node as dev_pm_opp API Rename _of_get_opp_desc_node to dev_pm_opp_of_get_opp_desc_node and add it to include/linux/pm_opp.h to allow other drivers, such as platform OPP and cpufreq drivers, to make use of it. Acked-by: Viresh Kumar Signed-off-by: Dave Gerlach Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/of.c | 9 +++++---- include/linux/pm_opp.h | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) commit caa2858cd51c54fabd48c486b1b150ead539b872 Merge: df6dd79b e5fbd97 Author: David S. Miller Date: Thu Feb 9 16:47:54 2017 -0500 Merge branch 'sfc-more-encap-offloads' Edward Cree says: ==================== sfc: more encap offloads This patch series adds support for RX checksum offload of encapsulated packets. It also adds support for configuring the hardware's lists of UDP ports used for VXLAN and GENEVE encapsulation offloads. Since changing these lists causes the MC to reboot, the driver has been hardened against reboots, which used to be considered an exceptional occurrence but are now normal. ==================== Signed-off-by: David S. Miller commit e5fbd977641c92a3a2b559bb5ebb425458e3efe8 Author: Jon Cooper Date: Wed Feb 8 16:52:10 2017 +0000 sfc: configure UDP tunnel offload ports Implement ndo_udp_tunnel_{add,del} to update the NIC's list of VXLAN and GENEVE UDP ports. Also reset the port list to empty on driver load and on driver unload, with appropriate flag set on the unload case. These port numbers are used for RX inner checksum offload, and in future will also be used for TX inner checksum offload and encapsulated TSO. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 289 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/efx.c | 72 +++++++++ drivers/net/ethernet/sfc/mcdi.c | 8 +- drivers/net/ethernet/sfc/mcdi.h | 1 + drivers/net/ethernet/sfc/net_driver.h | 19 +++ drivers/net/ethernet/sfc/nic.h | 7 + drivers/net/ethernet/sfc/siena.c | 2 + 7 files changed, 397 insertions(+), 1 deletion(-) commit d4e85477cc3f1b2ca445cdf14b285238ea0d5516 Author: Matthew Slattery Date: Wed Feb 8 16:51:50 2017 +0000 sfc: update mcdi_pcol definitions for MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_pcol.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 0ca2b46dbb645c1aa23eda6f5ac49a7be31ac87d Author: Jon Cooper Date: Wed Feb 8 16:51:33 2017 +0000 sfc: call mcdi_reboot_detected() when MC reboots during an MCDI command This function wasn't being called in this particular case when the MC reboots. This caused resource reallocations to not be handled properly and often ended up disabling the interface. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a531400623c52b09bc3b718e9a6142eb60a11a7 Author: Jon Cooper Date: Wed Feb 8 16:51:18 2017 +0000 sfc: harden driver against MC resets during initial probe This is mainly to prepare for a future overlay networking patch that could cause an MC reset at probe time if the UDP tunnel port list is set immediately upon driver load. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 99 +++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 35 deletions(-) commit da50ae2eae96e00e0188b24014efc10161e60925 Author: Jon Cooper Date: Wed Feb 8 16:51:02 2017 +0000 sfc: set csum_level for encapsulated packets Set the csum_level for encapsulated packets where the encapsulation type, l3 class and l4 class are sets that need it. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 23 ++++++++++++++++++++--- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/rx.c | 5 ++++- 3 files changed, 25 insertions(+), 4 deletions(-) commit a0ee3541483767e82bf26b8269693eec25c01cba Author: Jon Cooper Date: Wed Feb 8 16:50:40 2017 +0000 sfc: process RX event inner checksum flags Add support for RX checksum offload of encapsulated packets. This essentially just means paying attention to the inner checksum flags in the RX event, and if *either* checksum flag indicates a fail then don't tell the kernel that checksum offload was successful. Also, count these checksum errors and export the counts to ethtool -S. Test the most common "good" case of RX events with a single bitmask instead of a series of ifs. Move the more specific error checking in to a separate function for clarity, and don't use unlikely() there since we know at least one of the bits is bad. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/bitfield.h | 3 + drivers/net/ethernet/sfc/ef10.c | 123 ++++++++++++++++++++++++++++++---- drivers/net/ethernet/sfc/ethtool.c | 5 ++ drivers/net/ethernet/sfc/net_driver.h | 19 ++++-- 4 files changed, 131 insertions(+), 19 deletions(-) commit 90858794c96028ec1294fda12488a19f3a2b1d4a Author: Paul Gortmaker Date: Sun Jul 24 20:51:44 2016 -0400 module.h: remove extable.h include now users have migrated With hopefully most/all users of module.h that were looking for exception table functions moved over to the new extable.h header, we can remove the back-compat include that let us transition without introducing build regressions. Cc: Rusty Russell Acked-by: Rusty Russell Acked-by: Jessica Yu Cc: Andrew Morton Cc: Linus Torvalds Signed-off-by: Paul Gortmaker include/linux/module.h | 1 - 1 file changed, 1 deletion(-) commit 8a293be0d6fa0720809db6ac35a0552c51710cd2 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 core: migrate exception table users off module.h and onto extable.h These files were including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and where possible, avoid all the extra header content in module.h that we don't really need to compile these non-modular files. Note: init/main.c still needs module.h for __init_or_module kernel/extable.c still needs module.h for is_module_text_address ...and so we don't get the benefit of removing module.h from the cpp feed for these two files, unlike the almost universal 1:1 exchange of module.h for extable.h we were able to do in the arch dirs. Cc: Rusty Russell Cc: Andrew Morton Cc: Linus Torvalds Acked-by: Jessica Yu Signed-off-by: Paul Gortmaker init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 3 files changed, 3 insertions(+) commit 45536d373a21d441bd488f618b6e3e9bfae839f3 Author: Raphael Assenat Date: Thu Dec 29 10:23:09 2016 -0800 Input: joydev - do not report stale values on first open Postpone axis initialization to the first open instead of doing it in joydev_connect. This is to make sure the generated startup events are representative of the current joystick state rather than what it was when joydev_connect() was called, potentially much earlier. Once the first user is connected to joydev node we'll be updating joydev->abs[] values and subsequent clients will be getting correct initial states as well. This solves issues with joystick driven menus that start scrolling up each time they are started, until the user moves the joystick to generate events. In emulator menu setups where the menu program is restarted every time the game exits, the repeated need to move the joystick to stop the unintended scrolling gets old rather quickly... Signed-off-by: Raphael Assenat Signed-off-by: Dmitry Torokhov drivers/input/joydev.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 81dec809aa728798c3ebff18c3d2d678237273aa Author: Benjamin Tissoires Date: Wed Feb 8 00:26:45 2017 -0800 Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guest On the latest series of ThinkPads, the button events for the TrackPoint are reported through the touchpad itself as opposed to the TrackPoint device. In order to report these buttons properly, we need to forward them to the TrackPoint device and notify psmouse to send the button presses/releases. Signed-off-by: Lyude Paul Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.h | 13 +++++++++ drivers/input/rmi4/rmi_f03.c | 38 ++++++++++++++++++++++++++ drivers/input/rmi4/rmi_f30.c | 60 ++++++++++++++++++++++++++++++----------- 3 files changed, 95 insertions(+), 16 deletions(-) commit bf3e8502eefdbb7ac1b8163e5c3acdcb505ae745 Author: Dmitry Torokhov Date: Wed Feb 8 12:02:07 2017 -0800 Input: synaptics-rmi4 - clean up F30 implementation This patch does several cleanup changes to F30 code - switch to using BIT() macro - use DIV_ROUND_UP() where appropriate - factor out code setting up and reporting buttons - use single loop when reporting buttons: arithmetic is cheap compared to conditionals and associated branch misprediction. Tested-By: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f30.c | 326 +++++++++++++++++++------------------------ 1 file changed, 144 insertions(+), 182 deletions(-) commit bf23cfc34317dcc10d5a52f27affb1c4dcc60a98 Author: Dmitry Torokhov Date: Thu Feb 9 11:34:08 2017 -0800 Input: synaptics - use SERIO_OOB_DATA to handle trackstick buttons Instead of using custom method of "passing" extended buttons from the touchpad to trackstick, let's switch to the newly introduced SERIO_OOB_DATA channel. Tested-By: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 26 +++++++++++++------------- drivers/input/mouse/synaptics.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) commit 19ba1eb15a2a9b7298d1d984043025ab9496fbfb Author: Benjamin Tissoires Date: Tue Feb 7 23:58:02 2017 -0800 Input: psmouse - add a custom serio protocol to send extra information The tracksticks on the Lenovo thinkpads have their buttons connected through the touchpad device. We already fixed that in synaptics.c, but when we switch the device into RMI4 mode to have proper support, the pass-through functionality can't deal with them easily. We add a new PS/2 flag and protocol designed for psmouse. The RMI4 F03 pass-through can then emit a special set of commands to notify psmouse the state of the buttons. This patch implements the protocol in psmouse, while an other will do the same for rmi4-f03. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 41 +++++++++++++++++++++++++++++++++++--- drivers/input/mouse/psmouse.h | 5 +++++ include/uapi/linux/serio.h | 7 ++++--- 3 files changed, 47 insertions(+), 6 deletions(-) commit eb68d0324dc4d88ab0d6159bdcd98c247a3a8954 Author: Mike Marshall Date: Tue Feb 7 12:41:02 2017 -0500 orangefs: fix buffer size mis-match between kernel space and user space. The deamon through which the kernel module communicates with the userspace part of Orangefs, the "client-core", sends initialization data to the kernel module with ioctl. The initialization data was built by the client-core in a 2k buffer and copy_from_user'd into a 1k buffer in the kernel module. When more than 1k of initialization data needed to be sent, some was lost, reducing the usability of the control by which debug levels are set. This patch sets the kernel side buffer to 2K to match the userspace side... Signed-off-by: Mike Marshall fs/orangefs/orangefs-dev-proto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 05973c2efb40122f2a9ecde2d065f7ea5068d024 Author: Mike Marshall Date: Thu Feb 9 14:38:50 2017 -0500 orangefs: Dan Carpenter influenced cleanups... This patch is simlar to one Dan Carpenter sent me, cleans up some return codes and whitespace errors. There was one place where he thought inserting an error message into the ring buffer might be too chatty, I hope I convinced him othewise. As a consolation I changed a truly chatty error message in another location into a debug message, system-admins had already yelled at me about that one... Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 5 +++-- fs/orangefs/orangefs-debugfs.c | 15 ++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) commit 4560e78f40cb55bd2ea8f1ef4001c5baa88531c7 Author: Christoph Hellwig Date: Tue Feb 7 14:07:58 2017 -0800 xfs: don't block the log commit handler for discards Instead we submit the discard requests and use another workqueue to release the extents from the extent busy list. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_discard.c | 29 ------------------ fs/xfs/xfs_discard.h | 1 - fs/xfs/xfs_log_cil.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++----- fs/xfs/xfs_log_priv.h | 1 + fs/xfs/xfs_mount.c | 1 + fs/xfs/xfs_super.c | 8 +++++ fs/xfs/xfs_super.h | 2 ++ 7 files changed, 88 insertions(+), 38 deletions(-) commit 46694129816851cb323e4bcf2dc41482d8d6c19b Author: Christoph Hellwig Date: Tue Feb 7 14:07:57 2017 -0800 xfs: improve busy extent sorting Sort busy extents by the full block number instead of just the AGNO so that we can issue consecutive discard requests that the block layer could merge (although we'll need additional block layer fixes for fast devices). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extent_busy.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 7ea6856d6f5629d742edc23b8b76e6263371ef45 Author: Arnaldo Carvalho de Melo Date: Thu Feb 9 15:22:22 2017 -0300 perf intel-pt: Use __fallthrough To address new warnings emmited by gcc 7, e.g.:: CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.o CC /tmp/build/perf/tests/parse-events.o util/intel-pt-decoder/intel-pt-pkt-decoder.c: In function 'intel_pt_pkt_desc': util/intel-pt-decoder/intel-pt-pkt-decoder.c:499:6: error: this statement may fall through [-Werror=implicit-fallthrough=] if (!(packet->count)) ^ util/intel-pt-decoder/intel-pt-pkt-decoder.c:501:2: note: here case INTEL_PT_CYC: ^~~~ CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-decoder.o cc1: all warnings being treated as errors Acked-by: Andi Kleen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-mf0hw789pu9x855us5l32c83@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 5 +++++ tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 ++ 2 files changed, 7 insertions(+) commit 26ae102f2cfd0215daa57dc790aa3bfe534403a9 Author: Trond Myklebust Date: Wed Feb 8 11:17:55 2017 -0500 NFSv4: Set the connection timeout to match the lease period Set the timeout for TCP connections to be 1 lease period to ensure that we don't lose our lease due to a faulty TCP connection. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4renewd.c | 2 +- include/linux/sunrpc/clnt.h | 5 +++-- net/sunrpc/clnt.c | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) commit 0ca582fd0463106e277e1f723b4554b4d0e5f700 Author: Alex Williamson Date: Wed Feb 8 13:13:26 2017 -0700 vfio: Replace module request with softdep Rather than doing a module request from within the init function, add a soft dependency on the available IOMMU backend drivers. This makes the dependency visible to userspace when picking modules for the ram disk. Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7196dbb02ea05835b9ee56910ee82cb55422c7f1 Author: Trond Myklebust Date: Wed Feb 8 11:17:54 2017 -0500 SUNRPC: Allow changing of the TCP timeout parameters on the fly When the NFSv4 server tells us the lease period, we usually want to adjust down the timeout parameters on the TCP connection to ensure that we don't miss lease renewals due to a faulty connection. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 4 ++++ include/linux/sunrpc/xprtsock.h | 3 +++ net/sunrpc/clnt.c | 30 ++++++++++++++++++------ net/sunrpc/xprtsock.c | 51 +++++++++++++++++++++++++++++++++++++---- 4 files changed, 77 insertions(+), 11 deletions(-) commit ebf55872616c7d4754db5a318591a72a8d5e6896 Author: Christoph Hellwig Date: Tue Feb 7 14:06:57 2017 -0800 xfs: improve handling of busy extents in the low-level allocator Currently we force the log and simply try again if we hit a busy extent, but especially with online discard enabled it might take a while after the log force for the busy extents to disappear, and we might have already completed our second pass. So instead we add a new waitqueue and a generation counter to the pag structure so that we can do wakeups once we've removed busy extents, and we replace the single retry with an unconditional one - after all we hold the AGF buffer lock, so no other allocations or frees can be racing with us in this AG. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 93 ++++++++++++++++++---------------- fs/xfs/xfs_extent_busy.c | 125 ++++++++++++++++++++++++++++++++++++---------- fs/xfs/xfs_extent_busy.h | 11 +++- fs/xfs/xfs_mount.c | 8 +++ fs/xfs/xfs_mount.h | 2 + 5 files changed, 166 insertions(+), 73 deletions(-) commit 5e30c23d13919a718b22d4921dc5c0accc59da27 Author: Christoph Hellwig Date: Tue Feb 7 14:06:46 2017 -0800 xfs: don't fail xfs_extent_busy allocation We don't just need the structure to track busy extents which can be avoided with a synchronous transaction, but also to keep track of pending discard. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extent_busy.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b20fe4730ea5c037c16631fb0df659c7b6d4b3b1 Author: Bill O'Donnell Date: Tue Feb 7 12:59:33 2017 -0800 xfs: correct null checks and error processing in xfs_initialize_perag If pag cannot be allocated, the current error exit path will trip a null pointer deference error when calling xfs_buf_hash_destroy with a null pag. Fix this by adding a new error exit labels and jumping to those accordingly, avoiding the hash destroy and unnecessary kmem_free on pag. Up to three things need to be properly unwound: 1) pag memory allocation 2) xfs_buf_hash_init 3) radix_tree_insert For any given iteration through the loop, any of the above which succeed must be unwound for /this/ pag, and then all prior initialized pags must be unwound. Addresses-Coverity-Id: 1397628 ("Dereference after null check") Reported-by: Colin Ian King Signed-off-by: Bill O'Donnell Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_mount.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit c5ecb42342852892f978572ddc6dca703460f25a Author: Christoph Hellwig Date: Mon Feb 6 17:45:51 2017 -0800 xfs: update ctime and mtime on clone destinatation inodes We're changing both metadata and data, so we need to update the timestamps for clone operations. Dedupe on the other hand does not change file data, and only changes invisible metadata so the timestamps should not be updated. This follows existing btrfs behavior. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: remove redundant is_dedupe test] Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8d1b8c62e0805af7df900ef121389778d2126997 Author: Trond Myklebust Date: Wed Feb 8 11:17:53 2017 -0500 SUNRPC: Refactor TCP socket timeout code into a helper function Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) commit d23bb113952db88b03a71c9533e5a40e444e18d3 Author: Trond Myklebust Date: Wed Feb 8 11:17:52 2017 -0500 SUNRPC: Remove unused function rpc_get_timeout() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 1 - net/sunrpc/clnt.c | 15 --------------- 2 files changed, 16 deletions(-) commit 2bf47e194608192b7346baea1d57929a87ced3f9 Author: Will Deacon Date: Thu Sep 22 11:25:25 2016 +0100 arm64: head.S: Enable EL1 (host) access to SPE when entered at EL2 The SPE architecture requires each exception level to enable access to the SPE controls for the exception level below it, since additional context-switch logic may be required to handle the buffer safely. This patch allows EL1 (host) access to the SPE controls when entered at EL2. Acked-by: Mark Rutland Acked-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 6e01398fe4505ac4ac963fe0ca44b25e46783fef Author: Ding Tianhong Date: Thu Feb 9 17:00:34 2017 +0000 arm64: arch_timer: document Hisilicon erratum 161010101 Now that we have a workaround for Hisilicon erratum 161010101, notes this in the arm64 silicon-errata document. The new config option is too long to fit in the existing kconfig column, so this is widened to accomodate it. At the same time, an existing whitespace error is corrected, and the existing pattern of a line space between vendors is enforced for recent additions. Signed-off-by: Ding Tianhong [Mark: split patch, reword commit message, rework table] Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 47 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 2e2bbc039fad9eabad6c4c1a473c8b2554cdd2d4 Author: Arnaldo Carvalho de Melo Date: Thu Feb 9 14:48:46 2017 -0300 perf tests: Avoid possible truncation with dirent->d_name + snprintf Addressing a few cases spotted by a new warning in gcc 7: tests/parse-events.c: In function 'test_pmu_events': tests/parse-events.c:1790:39: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 90 [-Werror=format-truncation=] snprintf(name, MAX_NAME, "cpu/event=%s/u", ent->d_name); ^~ In file included from /usr/include/stdio.h:939:0, from /git/linux/tools/perf/util/map.h:9, from /git/linux/tools/perf/util/symbol.h:7, from /git/linux/tools/perf/util/evsel.h:10, from tests/parse-events.c:3: /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 13 and 268 bytes into a destination of size 100 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tests/parse-events.c:1798:29: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 100 [-Werror=format-truncation=] snprintf(name, MAX_NAME, "%s:u,cpu/event=%s/u", ent->d_name, ent->d_name); Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 945aea220bb8 ("perf tests: Move test objects into 'tests' directory") Link: http://lkml.kernel.org/n/tip-ty4q2p8zp1dp3mskvubxskm5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/parse-events.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3aff8ba0a4c9c9191bb788171a1c54778e1246a2 Author: Arnaldo Carvalho de Melo Date: Thu Feb 9 14:39:42 2017 -0300 perf bench numa: Avoid possible truncation when using snprintf() Addressing this warning from gcc 7: CC /tmp/build/perf/bench/numa.o bench/numa.c: In function '__bench_numa': bench/numa.c:1582:42: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size between 8 and 17 [-Werror=format-truncation=] snprintf(tname, 32, "process%d:thread%d", p, t); ^~ bench/numa.c:1582:25: note: directive argument in the range [0, 2147483647] snprintf(tname, 32, "process%d:thread%d", p, t); ^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from bench/../util/util.h:47, from bench/../builtin.h:4, from bench/numa.c:11: /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 17 and 35 bytes into a destination of size 32 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Petr Holasek Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-twa37vsfqcie5gwpqwnjuuz9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66ead502af7de65d1e555189cdca8f47eddac400 Author: Baoyou Xie Date: Thu Feb 9 11:12:58 2017 +0800 ASoC: zx-i2s: introduce pclk for zx2967 family The pclk is necessary for zx2967 I2S controller. the driver currently doesn't handle it. This is something we need to fix. In turn, the driver supports zx296718's I2S controller. By the way, this patch also change the clock name from tx to wclk to make it clear. Signed-off-by: Baoyou Xie Reviewed-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Mark Brown sound/soc/zte/zx-i2s.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit b5f18ba89391da7a92605dc76822580d13e2ef74 Author: Baoyou Xie Date: Thu Feb 9 11:12:57 2017 +0800 ASoC: zx-i2s: Add the info of pclk to the binding document for zx2967 family ZTE's zx2967 I2S controller driver introduces pclk, this patch documents this fact. Signed-off-by: Baoyou Xie Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/zte,zx-i2s.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 71ccea095ea1d4efd004dab971be6d599e06fc3f Author: Chris Brandt Date: Tue Feb 7 21:41:22 2017 -0500 i2c: riic: correctly finish transfers This fixes the condition where the controller has not fully completed its final transfer and leaves the bus and controller in a undesirable state. At the end of the last transmitted byte, the existing driver would just signal for a STOP condition to be transmitted then immediately signal completion. However, the full STOP procedure might not have fully taken place by the time the runtime PM shuts off the peripheral clock, leaving the bus in a suspended state. Alternatively, the STOP condition on the bus may have completed, but when the next transaction is requested by the upper layer, not all the necessary register cleanup was finished from the last transfer which made the driver return BUS BUSY when it really wasn't. This patch now makes all transmit and receive transactions wait for the STOP condition to fully complete before signaling a completed transaction. With this new method, runtime PM no longer seems to be an issue. Fixes: 310c18a41450 ("i2c: riic: add driver") Signed-off-by: Chris Brandt Reviewed-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit 279fa580356301df27724a4b14ab4a95b65828fb Author: Wei Yongjun Date: Thu Feb 9 15:04:24 2017 +0000 EDAC, fsl_ddr: Make locally used symbols static Fix the following sparse warnings: drivers/edac/fsl_ddr_edac.c:148:1: warning: symbol 'dev_attr_inject_data_hi' was not declared. Should it be static? drivers/edac/fsl_ddr_edac.c:150:1: warning: symbol 'dev_attr_inject_data_lo' was not declared. Should it be static? drivers/edac/fsl_ddr_edac.c:152:1: warning: symbol 'dev_attr_inject_ctrl' was not declared. Should it be static? Signed-off-by: Wei Yongjun Cc: linux-edac Link: http://lkml.kernel.org/r/20170209150424.15124-1-weiyj.lk@gmail.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9827f9eb79c56424eac6409197a290601cf78eee Author: Mika Westerberg Date: Wed Feb 1 19:20:59 2017 +0300 i2c: i801: Add support for Intel Gemini Lake Intel Gemini Lake has the same SMBus host controller than Intel Broxton. Signed-off-by: Mika Westerberg Signed-off-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 | 3 +++ 3 files changed, 5 insertions(+) commit d9928b4c48a804cf4e4f5695855282bddf7e2c3b Author: Wei Yongjun Date: Tue Feb 7 14:30:03 2017 +0000 spi: armada-3700: Remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 1 - 1 file changed, 1 deletion(-) commit e278d64190c2dafc49f63857dd1e0e7689a15bfa Author: Javier Martinez Canillas Date: Mon Jan 16 10:54:55 2017 -0300 i2c: mux: pca9541: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas Acked-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca9541.c | 1 + 1 file changed, 1 insertion(+) commit acf6ef1d6c963532242b40731b0734e4acd3310f Author: Javier Martinez Canillas Date: Mon Jan 16 10:54:54 2017 -0300 i2c: mux: pca954x: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas Acked-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca954x.c | 1 + 1 file changed, 1 insertion(+) commit fad061270ac43ff9eed315f0eae7c40b694592de Author: Samuel Pitoiset Date: Thu Feb 9 11:33:37 2017 +0100 drm/amdgpu: report the number of bytes moved at buffer creation Like ttm_bo_validate(), ttm_bo_init() might need to move BO and the number of bytes moved by TTM should be reported. This can help the throttle buffer migration mechanism to make a better decision. v2: fix computation Reviewed-by: Christian König Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) commit 1da87267006246137a96682404bc0716a10c85a7 Author: Wei Yongjun Date: Thu Jan 12 14:29:04 2017 +0000 i2c: mux: mlxcpld: remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Acked-by: Vadim Pasternak Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-mlxcpld.c | 1 - 1 file changed, 1 deletion(-) commit 38fc4856ad98f230bc91da0421dec69e4aee40f8 Author: Samuel Pitoiset Date: Thu Feb 9 11:33:36 2017 +0100 drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted() When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fails and the mutex was locked as expected. This should fix (random) GPU hangs. The easy way to reproduce the issue is to change the "Super Sampling" option from 1.0 to 2.0 in Hitman. It will create a huge buffer, evict a bunch of buffers (around ~5k) and deadlock. This regression has been introduced pretty recently. v2: only release the mutex if resv is NULL Fixes: 12a852219583 ("drm/amdgpu: improve AMDGPU_GEM_CREATE_VRAM_CLEARED handling (v2)") Reviewed-by: Christian König Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fd8aa9095a95c02dcc35540a263267c29b8fda9d Author: Juergen Gross Date: Thu Feb 9 14:39:58 2017 +0100 xen: optimize xenbus driver for multiple concurrent xenstore accesses Handling of multiple concurrent Xenstore accesses through xenbus driver either from the kernel or user land is rather lame today: xenbus is capable to have one access active only at one point of time. Rewrite xenbus to handle multiple requests concurrently by making use of the request id of the Xenstore protocol. This requires to: - Instead of blocking inside xb_read() when trying to read data from the xenstore ring buffer do so only in the main loop of xenbus_thread(). - Instead of doing writes to the xenstore ring buffer in the context of the caller just queue the request and do the write in the dedicated xenbus thread. - Instead of just forwarding the request id specified by the caller of xenbus to xenstore use a xenbus internal unique request id. This will allow multiple outstanding requests. - Modify the locking scheme in order to allow multiple requests being active in parallel. - Instead of waiting for the reply of a user's xenstore request after writing the request to the xenstore ring buffer return directly to the caller and do the waiting in the read path. Additionally signal handling was optimized by avoiding waking up the xenbus thread or sending an event to Xenstore in case the addressed entity is known to be running already. As a result communication with Xenstore is sped up by a factor of up to 5: depending on the request type (read or write) and the amount of data transferred the gain was at least 20% (small reads) and went up to a factor of 5 for large writes. In the end some more rough edges of xenbus have been smoothed: - Handling of memory shortage when reading from xenstore ring buffer in the xenbus driver was not optimal: it was busy looping and issuing a warning in each loop. - In case of xenstore not running in dom0 but in a stubdom we end up with two xenbus threads running as the initialization of xenbus in dom0 expecting a local xenstored will be redone later when connecting to the xenstore domain. Up to now this was no problem as locking would prevent the two xenbus threads interfering with each other, but this was just a waste of kernel resources. - An out of memory situation while writing to or reading from the xenstore ring buffer no longer will lead to a possible loss of synchronization with xenstore. - The user read and write part are now interruptible by signals. Signed-off-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus.h | 48 ++- drivers/xen/xenbus/xenbus_comms.c | 307 ++++++++++++++++-- drivers/xen/xenbus/xenbus_dev_frontend.c | 188 +++++++---- drivers/xen/xenbus/xenbus_xs.c | 520 ++++++++++++++----------------- 4 files changed, 672 insertions(+), 391 deletions(-) commit 5584ea250ae44f929feb4c7bd3877d1c5edbf813 Author: Juergen Gross Date: Thu Feb 9 14:39:57 2017 +0100 xen: modify xenstore watch event interface Today a Xenstore watch event is delivered via a callback function declared as: void (*callback)(struct xenbus_watch *, const char **vec, unsigned int len); As all watch events only ever come with two parameters (path and token) changing the prototype to: void (*callback)(struct xenbus_watch *, const char *path, const char *token); is the natural thing to do. Apply this change and adapt all users. Cc: konrad.wilk@oracle.com Cc: roger.pau@citrix.com Cc: wei.liu2@citrix.com Cc: paul.durrant@citrix.com Cc: netdev@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/block/xen-blkback/xenbus.c | 6 +++--- drivers/net/xen-netback/xenbus.c | 8 ++++---- drivers/xen/cpu_hotplug.c | 5 ++--- drivers/xen/manage.c | 6 +++--- drivers/xen/xen-balloon.c | 2 +- drivers/xen/xen-pciback/xenbus.c | 2 +- drivers/xen/xenbus/xenbus.h | 6 +++--- drivers/xen/xenbus/xenbus_client.c | 4 ++-- drivers/xen/xenbus/xenbus_dev_frontend.c | 21 ++++++++------------- drivers/xen/xenbus/xenbus_probe.c | 11 ++++------- drivers/xen/xenbus/xenbus_probe_backend.c | 8 ++++---- drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++++++------- drivers/xen/xenbus/xenbus_xs.c | 29 ++++++++++++++--------------- include/xen/xenbus.h | 6 +++--- 14 files changed, 59 insertions(+), 69 deletions(-) commit 332f791dc98d98116f4473b726f67c9321b0f31e Author: Juergen Gross Date: Thu Feb 9 14:39:56 2017 +0100 xen: clean up xenbus internal headers The xenbus driver has an awful mixture of internally and globally visible headers: some of the internally used only stuff is defined in the global header include/xen/xenbus.h while some stuff defined in internal headers is used by other drivers, too. Clean this up by moving the externally used symbols to include/xen/xenbus.h and the symbols used internally only to a new header drivers/xen/xenbus/xenbus.h replacing xenbus_comms.h and xenbus_probe.h Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus.h | 97 ++++++++++++++++++++++++++++++ drivers/xen/xenbus/xenbus_client.c | 2 +- drivers/xen/xenbus/xenbus_comms.c | 2 +- drivers/xen/xenbus/xenbus_comms.h | 51 ---------------- drivers/xen/xenbus/xenbus_dev_backend.c | 2 +- drivers/xen/xenbus/xenbus_dev_frontend.c | 4 +- drivers/xen/xenbus/xenbus_probe.c | 3 +- drivers/xen/xenbus/xenbus_probe.h | 88 --------------------------- drivers/xen/xenbus/xenbus_probe_backend.c | 3 +- drivers/xen/xenbus/xenbus_probe_frontend.c | 3 +- drivers/xen/xenbus/xenbus_xs.c | 3 +- drivers/xen/xenfs/super.c | 2 +- drivers/xen/xenfs/xenstored.c | 2 +- include/xen/xenbus.h | 12 ++-- 14 files changed, 113 insertions(+), 161 deletions(-) commit 92d9d0dfb0fd2f1a6f0c411530df65fba274a79d Author: Bhumika Goyal Date: Fri Jan 27 23:36:17 2017 +0530 i2c: busses: constify i2c_algorithm structures Declare i2c_algorithm structures as const as they are only stored in the algo field of an i2c_adapter structure. This field is of type const, so i2c_algorithm structures having this property can be made const too. Signed-off-by: Bhumika Goyal Acked-by: Uwe Kleine-König for Acked-by: Patrice Chotard Acked-by: Jarkko Nikula Reviewed-by: Jean Delvare Acked-by: Ludovic Desroches Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91.c | 2 +- drivers/i2c/busses/i2c-bfin-twi.c | 2 +- drivers/i2c/busses/i2c-designware-core.c | 2 +- drivers/i2c/busses/i2c-eg20t.c | 2 +- drivers/i2c/busses/i2c-emev2.c | 2 +- drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +- drivers/i2c/busses/i2c-imx.c | 2 +- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-robotfuzz-osif.c | 2 +- drivers/i2c/busses/i2c-sh_mobile.c | 2 +- drivers/i2c/busses/i2c-st.c | 2 +- drivers/i2c/busses/i2c-xgene-slimpro.c | 2 +- drivers/i2c/busses/i2c-xlp9xx.c | 2 +- drivers/i2c/busses/i2c-xlr.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 6b66a6f27e799d9441ef2c0b1e00913a6a070fa5 Author: Peter Rosin Date: Tue Feb 7 22:41:55 2017 +0100 i2c: i2c-mux-gpio: rename i2c-gpio-mux to i2c-mux-gpio The rename did the wrong thing for this documentation file all those years ago. Fix that as well as the neglected rename of the platform data structure. Fixes: e7065e20d9a6 ("i2c: Rename last mux driver to standard pattern") Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/i2c/muxes/i2c-mux-gpio | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a52d120f62b83cafa14570c83c033a5de7458a01 Author: Alex Deucher Date: Wed Feb 8 22:35:51 2017 -0500 drm/amdgpu: add support for new smc firmware on polaris Some polaris variants require new smc firmware. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 33 ++++++++++++++++++++++----- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 2 ++ 2 files changed, 29 insertions(+), 6 deletions(-) commit 4d8d44c6ce8ce3c01f4dcc18fdaf542e0d16df45 Author: Rex Zhu Date: Mon Feb 6 12:58:57 2017 +0800 drm/amd/powerplay: refine code to avoid potential bug that the memory not cleared. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit bd0096d7467fbfa723cb1c12011098abf16de525 Author: Frank Rowand Date: Mon Oct 17 12:21:23 2016 -0700 of: Add missing space at end of pr_fmt(). Make pr_fmt() in fdt.c consistent with all other files in drivers/of/ Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e553f539f2af39db5e3b2c273cc1a22d34be49ad Author: Frank Rowand Date: Mon Oct 17 12:17:43 2016 -0700 of: make of_device_make_bus_id() static of_device_make_bus_id() was changed to non-static by commit c66012253800 ("of/device: Make of_device_make_bus_id() usable by other code") more than 6 years ago, but there are no users of it outside of platform.c. Make the function static again. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/platform.c | 2 +- include/linux/of_device.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 971d33cb422b3109fe3df034440debc3f4fe8423 Author: Jayachandran C Date: Sun Feb 5 00:57:03 2017 +0000 MAINTAINERS: Add Cavium ThunderX2 entry Add maintainer information for Cavium ThunderX2 ARM64 processor family. Signed-off-by: Jayachandran C Signed-off-by: Arnd Bergmann MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit e40a05dc3f5367956d6105e660f47c3f03c00380 Author: Jayachandran C Date: Sun Feb 5 00:57:06 2017 +0000 arm64: add ARCH_THUNDER2 to defconfig This will allow the default kernel build to boot on Cavium ThunderX2 CN99XX processors. Signed-off-by: Jayachandran C Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 03b6fd5db4a71d9511552f9d95de9b61f47b503e Author: Jayachandran C Date: Sun Feb 5 00:57:02 2017 +0000 arm64: add THUNDER2 processor family Add support for ThunderX2 CN99XX arm64 server processors. Introduce a new arm64 platform config option ARCH_THUNDER2 for these processors. Signed-off-by: Jayachandran C Signed-off-by: Arnd Bergmann arch/arm64/Kconfig.platforms | 7 +++++++ 1 file changed, 7 insertions(+) commit 8ef81a9a453f9048c1683e40b540a4221986a2d1 Author: Arnd Bergmann Date: Thu Feb 9 16:10:42 2017 +0100 KVM: x86: hide KVM_HC_CLOCK_PAIRING on 32 bit The newly added hypercall doesn't work on x86-32: arch/x86/kvm/x86.c: In function 'kvm_pv_clock_pairing': arch/x86/kvm/x86.c:6163:6: error: implicit declaration of function 'kvm_get_walltime_and_clockread';did you mean 'kvm_get_time_scale'? [-Werror=implicit-function-declaration] This adds an #ifdef around it, matching the one around the related functions that are also only implemented on 64-bit systems. Fixes: 55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall") Signed-off-by: Arnd Bergmann Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 4 ++++ 1 file changed, 4 insertions(+) commit cbab31977008a9eb9eb241879befc2e20285740c Merge: 01a9c7b d0979c0 Author: Arnd Bergmann Date: Thu Feb 9 16:20:23 2017 +0100 Merge tag 'mvebu-dt64-4.11-3' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "mvebu dt for 4.11 (part 3)" from Gregory CLEMENT: adjust name of sd-mmc-gop clock in sysco for Armada 7K/8K * tag 'mvebu-dt64-4.11-3' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: adjust name of sd-mmc-gop clock in syscon commit 01a9c7b7ee5db2351f409329cd825e6cc2630931 Merge: 0ca0d37 7c10da3 Author: Arnd Bergmann Date: Thu Feb 9 16:15:36 2017 +0100 Merge tag 'qcom-arm64-for-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64 Pull "Qualcomm ARM64 Updates for v4.11 Part 2" from Andy Gross: * Add CoreSight nodes for MSM8916 * tag 'qcom-arm64-for-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: qcom: Add msm8916 CoreSight components commit 0ca0d375822692d9dad64a693862c4e2e80aa20f Merge: ca6f848 b8bcf0e Author: Arnd Bergmann Date: Thu Feb 9 16:14:14 2017 +0100 Merge tag 'sunxi-dt64-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt64 Pull "Allwinner arm64 changes for 4.11" from Maxime Ripard: Some patches related the arm64 Allwinner SoCs, most notably: - Support for the MMC - Suport for the USB and mUSB controllers - New boards: Bananapi M64 * tag 'sunxi-dt64-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: arm64: allwinner: add BananaPi-M64 support arm64: allwinner: a64: add UART1 pin nodes arm64: allwinner: pine64: add MMC support arm64: allwinner: a64: Increase the MMC max frequency arm64: allwinner: a64: Add MMC pinctrl nodes arm64: allwinner: a64: Add MMC nodes arm64: dts: allwinner: Remove no longer used pinctrl/sun4i-a10.h header arm64: dts: enable the MUSB controller of Pine64 in host-only mode arm64: dts: add MUSB node to Allwinner A64 dtsi arm64: dts: allwinner: enable EHCI1, OHCI1 and USB PHY nodes in Pine64 arm64: dts: allwinner: sort the nodes in sun50i-a64-pine64.dts arm64: dts: allwinner: add USB1-related nodes of Allwinner A64 commit 3fb5561879d71b5b80ddb48b3e7e5fa18c696d2a Author: Dongdong Liu Date: Thu Jan 12 14:28:24 2017 +0800 PCI: generic: Call pci_fixup_irqs() only on ARM pci_fixup_irqs() is problematic because: - it's called when we enumerate a host bridge, so we don't fixup IRQs for hot-added PCI devices, and - it fixes up IRQs for all PCI devices in the system, so if we call it multiple times, e.g., if we have several host controllers, we may reallocate an IRQ for a device after a driver has already claimed it. We plan to replace pci_fixup_irqs() soon, but we still need it on ARM because we don't have any other generic method for doing this. On ARM64, we don't need pci_fixup_irqs() because we do IRQ setup when we bind a driver to the device (in the pci_device_probe() -> pcibios_alloc_irq() path). pci-host-common.c is currently only used on ARM and ARM64. In principle, it could be used on x86, and we wouldn't want pci_fixup_irqs() there either, because x86 does IRQ setup in the pci_enable_device() path. [bhelgaas: changelog, use #ifdef ARM, not #ifndef ARM64] Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Gabriele Paoloni Reviewed-by: Zhou Wang Acked-by: Lorenzo Pieralisi drivers/pci/host/pci-host-common.c | 2 ++ 1 file changed, 2 insertions(+) commit 72f2ff0deb870145a5a2d24cd75b4f9936159a62 Author: Dongdong Liu Date: Fri Feb 3 15:02:07 2017 -0600 PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports The PCIe Root Port in Hip06/Hip07 SoCs advertises an MSI capability, but it cannot generate MSIs. It can transfer MSI/MSI-X from downstream devices, but does not support MSI/MSI-X itself. Add a quirk to prevent use of MSI/MSI-X by the Root Port. [bhelgaas: changelog, sort vendor ID #define, drop device ID #define] Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Gabriele Paoloni Reviewed-by: Zhou Wang drivers/pci/quirks.c | 1 + include/linux/pci_ids.h | 2 ++ 2 files changed, 3 insertions(+) commit 4788316f743539076712d2b80b6cd289458fe2be Author: Bjorn Helgaas Date: Tue Feb 7 08:41:09 2017 -0600 PCI: hisi: Rename config space accessors to remove "acpi" There's nothing ACPI-specific about the config space accessors hisi_pcie_acpi_rd_conf() and hisi_pcie_acpi_wr_conf(), and they're used for both the ACPI and the DT driver model. Rename them to hisi_pcie_rd_conf() and hisi_pcie_wr_conf(). No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0549bde0fcb11a95773e7dc4121738b9e653abf4 Author: Qi Hou Date: Mon Feb 6 12:55:19 2017 +0800 of: fix of_node leak caused in of_find_node_opts_by_path During stepping down the tree, parent node is gotten first and its refcount is increased with of_node_get() in __of_get_next_child(). Since it just being used as tmp node, its refcount must be decreased with of_node_put() after traversing its child nodes. Or, its refcount will never be descreased to ZERO, then it will never be freed, as well as other related memory blocks. To fix this, decrease refcount of parent with of_node_put() after __of_find_node_by_path(). Signed-off-by: Qi Hou Acked-by: Peter Rosin Signed-off-by: Rob Herring drivers/of/base.c | 3 +++ 1 file changed, 3 insertions(+) commit db3b7e134185b27e6073618c1ad7eca1e4473eb4 Author: Bhumika Goyal Date: Mon Jan 16 00:45:00 2017 +0530 char: ipmi: constify ipmi_smi_handlers structures Declare ipmi_smi_handlers structures as const as they are only passed as an argument to the function ipmi_register_smi. This argument is of type const, so ipmi_smi_handlers structures having similar properties can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct ipmi_smi_handlers i@p={...}; @ok1@ identifier r1.i; position p; @@ ipmi_register_smi(&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct ipmi_smi_handlers i; Size details after cross compiling the .o file for powerpc architecture File size before: text data bss dec hex filename 2777 288 0 3065 bf9 drivers/char/ipmi/ipmi_powernv.o File size after: text data bss dec hex filename 2873 192 0 3065 bf9 drivers/char/ipmi/ipmi_powernv.o Signed-off-by: Bhumika Goyal Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c690d141489b0788db9ba95cc33075ad37d3ec30 Author: Corey Minyard Date: Thu Jan 5 10:52:54 2017 -0600 acpi:ipmi: Make IPMI user handler const ipmi_create_user() now takes the user handlers as const, make it const in the ACPI IPMI code. Cc: linux-acpi@vger.kernel.org Cc: Zhao Yakui Cc: Lv Zheng Signed-off-by: Corey Minyard Acked-by: Rafael J. Wysocki drivers/acpi/acpi_ipmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e751dfb5ffd20d1a31837dbc9718741df69bffe Merge: a0e136d 7b6b463 Author: Paolo Bonzini Date: Thu Feb 9 16:01:23 2017 +0100 Merge tag 'kvmarm-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD kvmarm updates for 4.11 - GICv3 save restore - Cache flushing fixes - MSI injection fix for GICv3 ITS - Physical timer emulation support commit f181d6a3bcc35633facf5f3925699021c13492c5 Author: Koen Vandeputte Date: Wed Feb 8 15:32:05 2017 +0100 mac80211: fix CSA in IBSS mode Add the missing IBSS capability flag during capability init as it needs to be inserted into the generated beacon in order for CSA to work. Fixes: cd7760e62c2ac ("mac80211: add support for CSA in IBSS mode") Signed-off-by: Piotr Gawlowicz Signed-off-by: Mikołaj Chwalisz Tested-by: Koen Vandeputte Signed-off-by: Johannes Berg net/mac80211/ibss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8585989d146c61dd073d2135c5bb11d0f979d576 Author: Luca Coelho Date: Wed Feb 8 15:00:34 2017 +0200 cfg80211: fix NAN bands definition The nl80211_nan_dual_band_conf enumeration doesn't make much sense. The default value is assigned to a bit, which makes it weird if the default bit and other bits are set at the same time. To improve this, get rid of NL80211_NAN_BAND_DEFAULT and add a wiphy configuration to let the drivers define which bands are supported. This is exposed to the userspace, which then can make a decision on which band(s) to use. Additionally, rename all "dual_band" elements to "bands", to make things clearer. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 18 ++++++++++---- include/uapi/linux/nl80211.h | 57 ++++++++++++++++++++------------------------ net/mac80211/cfg.c | 4 ++-- net/mac80211/trace.h | 16 ++++++------- net/wireless/core.c | 3 ++- net/wireless/nl80211.c | 35 ++++++++++++++++++++------- net/wireless/trace.h | 16 ++++++------- 7 files changed, 86 insertions(+), 63 deletions(-) commit 097472134851b237bc7c2c1e3996364bdcc61942 Author: Bob Moore Date: Wed Feb 8 11:00:22 2017 +0800 ACPICA: Update version to 20170119 ACPICA commit 711a8c19d3c646fdc069c38912d9037c7fa5e718 Version 20170119. Link: https://github.com/acpica/acpica/commit/711a8c19 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb7c61e03bcc241c4adcd634a839734d7c187df Author: Miles Chen Date: Thu Feb 9 19:45:34 2017 +0800 arm64: use is_vmalloc_addr To is_vmalloc_addr() to check if an address is a vmalloc address instead of checking VMALLOC_START and VMALLOC_END manually. Signed-off-by: Miles Chen Signed-off-by: Will Deacon arch/arm64/mm/ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 892411dd05847a76fbed1c45ab36f819ba1e2a98 Author: Bob Moore Date: Wed Feb 8 11:00:15 2017 +0800 ACPICA: Tools: Update common signon, remove compilation bit width ACPICA commit 43e04e75a9849072a1557b674004d8093bddb9ef Remove the bit width of the compiler that generated the tool from the tool signon. This was confusing and unnecessary. Changed the iASL signon to add "disassembler" to the name. Link: https://github.com/acpica/acpica/commit/43e04e75 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7735ca0eb4ebd6d47fdad40602d0ba7593219f8c Author: Bob Moore Date: Wed Feb 8 11:00:08 2017 +0800 ACPICA: Source tree: Update copyright notices to 2017 ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1 Affects all files. Link: https://github.com/acpica/acpica/commit/16577e52 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 4 ++-- drivers/acpi/acpica/accommon.h | 2 +- drivers/acpi/acpica/acdebug.h | 2 +- drivers/acpi/acpica/acdispat.h | 2 +- drivers/acpi/acpica/acevents.h | 2 +- drivers/acpi/acpica/acglobal.h | 2 +- drivers/acpi/acpica/achware.h | 2 +- drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acnamesp.h | 2 +- drivers/acpi/acpica/acobject.h | 2 +- drivers/acpi/acpica/acopcode.h | 2 +- drivers/acpi/acpica/acparser.h | 2 +- drivers/acpi/acpica/acpredef.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/acstruct.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/acutils.h | 2 +- drivers/acpi/acpica/amlcode.h | 2 +- drivers/acpi/acpica/amlresrc.h | 2 +- drivers/acpi/acpica/dbcmds.c | 2 +- drivers/acpi/acpica/dbconvert.c | 2 +- drivers/acpi/acpica/dbdisply.c | 2 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbfileio.c | 2 +- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dbinput.c | 2 +- drivers/acpi/acpica/dbmethod.c | 2 +- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/dbobject.c | 2 +- drivers/acpi/acpica/dbstats.c | 2 +- drivers/acpi/acpica/dbtest.c | 2 +- drivers/acpi/acpica/dbutils.c | 2 +- drivers/acpi/acpica/dbxface.c | 2 +- drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/dscontrol.c | 2 +- drivers/acpi/acpica/dsdebug.c | 2 +- drivers/acpi/acpica/dsfield.c | 2 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsmthdat.c | 2 +- drivers/acpi/acpica/dsobject.c | 2 +- drivers/acpi/acpica/dsopcode.c | 2 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswexec.c | 2 +- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/dswscope.c | 2 +- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/evevent.c | 2 +- drivers/acpi/acpica/evglock.c | 2 +- drivers/acpi/acpica/evgpe.c | 2 +- drivers/acpi/acpica/evgpeblk.c | 2 +- drivers/acpi/acpica/evgpeinit.c | 2 +- drivers/acpi/acpica/evgpeutil.c | 2 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 2 +- drivers/acpi/acpica/evregion.c | 2 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evsci.c | 2 +- drivers/acpi/acpica/evxface.c | 2 +- drivers/acpi/acpica/evxfevnt.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/evxfregn.c | 2 +- drivers/acpi/acpica/exconcat.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exconvrt.c | 2 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exdebug.c | 2 +- drivers/acpi/acpica/exdump.c | 2 +- drivers/acpi/acpica/exfield.c | 2 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exmisc.c | 2 +- drivers/acpi/acpica/exmutex.c | 2 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/exoparg1.c | 2 +- drivers/acpi/acpica/exoparg2.c | 2 +- drivers/acpi/acpica/exoparg3.c | 2 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exprep.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresnte.c | 2 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/exstore.c | 2 +- drivers/acpi/acpica/exstoren.c | 2 +- drivers/acpi/acpica/exstorob.c | 2 +- drivers/acpi/acpica/exsystem.c | 2 +- drivers/acpi/acpica/extrace.c | 2 +- drivers/acpi/acpica/exutils.c | 2 +- drivers/acpi/acpica/hwacpi.c | 2 +- drivers/acpi/acpica/hwesleep.c | 2 +- drivers/acpi/acpica/hwgpe.c | 2 +- drivers/acpi/acpica/hwpci.c | 2 +- drivers/acpi/acpica/hwregs.c | 2 +- drivers/acpi/acpica/hwsleep.c | 2 +- drivers/acpi/acpica/hwtimer.c | 2 +- drivers/acpi/acpica/hwvalid.c | 2 +- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/hwxfsleep.c | 2 +- drivers/acpi/acpica/nsaccess.c | 2 +- drivers/acpi/acpica/nsalloc.c | 2 +- drivers/acpi/acpica/nsarguments.c | 2 +- drivers/acpi/acpica/nsconvert.c | 2 +- drivers/acpi/acpica/nsdump.c | 2 +- drivers/acpi/acpica/nsdumpdv.c | 2 +- drivers/acpi/acpica/nseval.c | 2 +- drivers/acpi/acpica/nsinit.c | 2 +- drivers/acpi/acpica/nsload.c | 2 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 2 +- drivers/acpi/acpica/nsparse.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsprepkg.c | 2 +- drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 2 +- drivers/acpi/acpica/nssearch.c | 2 +- drivers/acpi/acpica/nsutils.c | 2 +- drivers/acpi/acpica/nswalk.c | 2 +- drivers/acpi/acpica/nsxfeval.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/nsxfobj.c | 2 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psloop.c | 2 +- drivers/acpi/acpica/psobject.c | 2 +- drivers/acpi/acpica/psopcode.c | 2 +- drivers/acpi/acpica/psopinfo.c | 2 +- drivers/acpi/acpica/psparse.c | 2 +- drivers/acpi/acpica/psscope.c | 2 +- drivers/acpi/acpica/pstree.c | 2 +- drivers/acpi/acpica/psutils.c | 2 +- drivers/acpi/acpica/pswalk.c | 2 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rsaddr.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsdump.c | 2 +- drivers/acpi/acpica/rsdumpinfo.c | 2 +- drivers/acpi/acpica/rsinfo.c | 2 +- drivers/acpi/acpica/rsio.c | 2 +- drivers/acpi/acpica/rsirq.c | 2 +- drivers/acpi/acpica/rslist.c | 2 +- drivers/acpi/acpica/rsmemory.c | 2 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsserial.c | 2 +- drivers/acpi/acpica/rsutils.c | 2 +- drivers/acpi/acpica/rsxface.c | 2 +- drivers/acpi/acpica/tbdata.c | 2 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 2 +- drivers/acpi/acpica/tbprint.c | 2 +- drivers/acpi/acpica/tbutils.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/tbxfload.c | 2 +- drivers/acpi/acpica/tbxfroot.c | 2 +- drivers/acpi/acpica/utaddress.c | 2 +- drivers/acpi/acpica/utalloc.c | 2 +- drivers/acpi/acpica/utascii.c | 2 +- drivers/acpi/acpica/utbuffer.c | 2 +- drivers/acpi/acpica/utcache.c | 2 +- drivers/acpi/acpica/utcopy.c | 2 +- drivers/acpi/acpica/utdebug.c | 2 +- drivers/acpi/acpica/utdecode.c | 2 +- drivers/acpi/acpica/utdelete.c | 2 +- drivers/acpi/acpica/uterror.c | 2 +- drivers/acpi/acpica/uteval.c | 2 +- drivers/acpi/acpica/utexcep.c | 2 +- drivers/acpi/acpica/utglobal.c | 2 +- drivers/acpi/acpica/uthex.c | 2 +- drivers/acpi/acpica/utids.c | 2 +- drivers/acpi/acpica/utinit.c | 2 +- drivers/acpi/acpica/utlock.c | 2 +- drivers/acpi/acpica/utmath.c | 2 +- drivers/acpi/acpica/utmisc.c | 2 +- drivers/acpi/acpica/utmutex.c | 2 +- drivers/acpi/acpica/utnonansi.c | 2 +- drivers/acpi/acpica/utobject.c | 2 +- drivers/acpi/acpica/utosi.c | 2 +- drivers/acpi/acpica/utownerid.c | 2 +- drivers/acpi/acpica/utpredef.c | 2 +- drivers/acpi/acpica/utprint.c | 2 +- drivers/acpi/acpica/utresrc.c | 2 +- drivers/acpi/acpica/utstate.c | 2 +- drivers/acpi/acpica/utstring.c | 2 +- drivers/acpi/acpica/utstrtoul64.c | 2 +- drivers/acpi/acpica/uttrack.c | 2 +- drivers/acpi/acpica/utuuid.c | 2 +- drivers/acpi/acpica/utxface.c | 2 +- drivers/acpi/acpica/utxferror.c | 2 +- drivers/acpi/acpica/utxfinit.c | 2 +- drivers/acpi/acpica/utxfmutex.c | 2 +- include/acpi/acbuffer.h | 2 +- include/acpi/acconfig.h | 2 +- include/acpi/acexcep.h | 2 +- include/acpi/acnames.h | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpi.h | 2 +- include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 2 +- include/acpi/actbl.h | 2 +- include/acpi/actbl1.h | 2 +- include/acpi/actbl2.h | 2 +- include/acpi/actbl3.h | 2 +- include/acpi/actypes.h | 2 +- include/acpi/acuuid.h | 2 +- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- include/acpi/platform/acgcc.h | 2 +- include/acpi/platform/acgccex.h | 2 +- include/acpi/platform/aclinux.h | 2 +- include/acpi/platform/aclinuxex.h | 2 +- tools/power/acpi/common/cmfsize.c | 2 +- tools/power/acpi/common/getopt.c | 2 +- tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixdir.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixmap.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixxf.c | 2 +- tools/power/acpi/tools/acpidump/acpidump.h | 2 +- tools/power/acpi/tools/acpidump/apdump.c | 2 +- tools/power/acpi/tools/acpidump/apfiles.c | 2 +- tools/power/acpi/tools/acpidump/apmain.c | 2 +- 224 files changed, 225 insertions(+), 225 deletions(-) commit b4f2d7c3424c00de162c042a5a3a5ed19974677c Merge: 788d239 34d677a Author: Thomas Gleixner Date: Thu Feb 9 14:43:08 2017 +0100 Merge tag 'irqchip-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 4.11 from Marc Zyngier - A number of gic-v3-its cleanups and fixes - A fix for the MIPS GIC - One new interrupt controller for the Cortina Gemini platform - Support for the Qualcomm interrupt combiner, together with its ACPI goodness commit ffab9188e444854882dbc291500d576d6bad7b7b Author: Lv Zheng Date: Wed Feb 8 11:00:01 2017 +0800 ACPICA: Linuxize: Restore and fix Intel compiler build ACPICA commit b59347d0b8b676cb555fe8da5cad08fcd4eeb0d3 The following commit cleans up compiler specific inclusions: Commit: 9fa1cebdbfff3db8953cebca8ee327d75edefc40 Subject: ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers But breaks one thing due to the following old issue: Buidling Linux kernel with Intel compiler originally depends on acgcc.h not acintel.h. So after making Intel compiler build working in ACPICA upstream by correctly using acintel.h, it becomes unable to build Linux kernel using Intel compiler as there is no acintel.h in the kernel source tree. This patch releases acintel.h to Linux kernel and fixes its inclusion in acenv.h. Fixes: 9fa1cebdbfff (ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers) Link: https://github.com/acpica/acpica/commit/b59347d0 Cc: 4.9+ # 4.9+ Tested-by: Stepan M Mishura Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acintel.h | 87 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) commit b1e9a64972bfecd2f3dc5eb816781fa4ef28007a Author: Tang Yuantian Date: Thu Feb 9 10:33:02 2017 +0800 cpufreq: qoriq: Don't look at clock implementation details Get the CPU clock's potential parent clocks from the clock interface itself, rather than manually parsing the clocks property to find a phandle, looking at the clock-names property of that, and assuming that those are valid parent clocks for the cpu clock. This is necessary now that the clocks are generated based on the clock driver's knowledge of the chip rather than a fragile device-tree description of the mux options. We can now rely on the clock driver to ensure that the mux only exposes options that are valid. The cpufreq driver was currently being overly conservative in some cases -- for example, the "min_cpufreq = get_bus_freq()" restriction only applies to chips with erratum A-004510, and whether the freq_mask used on p5020 is needed depends on the actual frequencies of the PLLs (FWIW, p5040 has a similar limitation but its .freq_mask was zero) -- and the frequency mask mechanism made assumptions about particular parent clock indices that are no longer valid. Signed-off-by: Scott Wood Signed-off-by: Tang Yuantian Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/qoriq-cpufreq.c | 148 +++++++++++++--------------------------- 1 file changed, 49 insertions(+), 99 deletions(-) commit 5026ac23145eb63f5208eb843ce3a6a7a596c2ee Author: Tang Yuantian Date: Thu Feb 9 10:33:01 2017 +0800 cpufreq: qoriq: add ARM64 SoCs support Add ARM64 config to Kconfig to enable CPU frequency feature on NXP ARM64 SoCs. Signed-off-by: Tang Yuantian Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16d0bf1882109da84b4b90d7ba4fc7ba18db0d67 Author: Geert Uytterhoeven Date: Wed Feb 8 19:37:55 2017 +0100 PM / Domains: Provide dummy governors if CONFIG_PM_GENERIC_DOMAINS=n This allows to compile-test drivers that refer to governors (always by reference) when CONFIG_PM_GENERIC_DOMAINS=n. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki include/linux/pm_domain.h | 3 +++ 1 file changed, 3 insertions(+) commit ecdc35c453986781b95961c01b48bc4662c09cf4 Author: Markus Elfring Date: Wed Jan 18 17:07:52 2017 +0100 m68k: Delete an unnecessary variable assignment in sys_cacheflush() Delete an assignment for the local variable "ret" in an if branch because it was initialised by the same value. Signed-off-by: Markus Elfring Signed-off-by: Geert Uytterhoeven arch/m68k/kernel/sys_m68k.c | 1 - 1 file changed, 1 deletion(-) commit 16a1a66a5e8324dd6a2864ceaf3e246fc11f93a5 Author: Finn Thain Date: Mon Jan 2 04:53:54 2017 -0500 m68k/mac: Clean up interrupt debug macros and printk statements Mac interrupt code has been debugged. The Penguin deficiencies that still cause unhandled interrupts aren't fixable here. Besides, interrupts are fast and frequent and these printk statements were never really useful IMO. Remove them. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/macints.h | 16 ---------------- arch/m68k/mac/baboon.c | 16 ---------------- arch/m68k/mac/macints.c | 8 -------- arch/m68k/mac/oss.c | 20 -------------------- arch/m68k/mac/psc.c | 11 ----------- arch/m68k/mac/via.c | 8 -------- 6 files changed, 79 deletions(-) commit ed6344e1fd647a97b286b55580416c350676aa4d Author: Finn Thain Date: Mon Jan 2 04:53:54 2017 -0500 m68k/mac: Remove SHUTUP_SONIC interrupt hack In macints.c there is some startup code which disables the SONIC interrupt in an attempt to avoid an unhandled slot interrupt, which would be fatal. This only works on those machines where the SONIC device is on-board. When the mac_sonic driver is built-in, there's little point in doing this, because the device will be initialized a few seconds later anyway. But when mac_sonic is a module, the window for an unhandled interrupt is longer. Either way, we've already run the gauntlet for 5 or 10 seconds by the time we get around to disabling this particular device. It's only by sheer luck that we got this far. Really, this is too little too late. The general problem of unhandled early interrupts also affects other devices on other models. There are better ways to resolve this problem. 1) When using the Penguin bootloader, boot Mac OS with extensions disabled (by holding down the shift key at startup or by use of the Extensions Manager control panel). The Penguin docs already contain this advice, as it is always effective. 2) Have the Penguin bootloader disable the device. It already attempts to disable slot interrupts. But since some hardware cannot mask slot interrupts, Penguin should probably close the relevant device drivers. 3) Use Emile instead of Penguin. AFAIK the boot ROM never enables network device interrupts and hence they don't need to be disabled. Remove this hack. It requires maintenance and it doesn't solve the problem. It improves the odds for a few models, but so does setting CONFIG_MAC_SONIC=y. Signed-off-by: Finn Thain Reviewed-by: Laurent Vivier Signed-off-by: Geert Uytterhoeven arch/m68k/mac/macints.c | 12 ------------ 1 file changed, 12 deletions(-) commit 3cd53b14e7c471f6c33f3645a5200a30ffb3f861 Author: Finn Thain Date: Mon Jan 2 04:53:54 2017 -0500 m68k/mac: Improve NMI handler mac_nmi_handler() is useless in its present form and locks up my PowerBook 180. Let's throw out the dead code and make it do something useful: print a register dump and a stack trace. mac_debug_handler() is also dead code. Remove it along with its static data. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/macints.c | 67 ++++++------------------------------------------- 1 file changed, 8 insertions(+), 59 deletions(-) commit c7ff87409d1a1b87d5a0ea7149416071dc8332cb Author: Geert Uytterhoeven Date: Mon Dec 26 17:33:40 2016 +0100 m68k/defconfig: Update defconfigs for v4.10-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 16 ++++++++++++++-- arch/m68k/configs/apollo_defconfig | 16 ++++++++++++++-- arch/m68k/configs/atari_defconfig | 16 ++++++++++++++-- arch/m68k/configs/bvme6000_defconfig | 16 ++++++++++++++-- arch/m68k/configs/hp300_defconfig | 16 ++++++++++++++-- arch/m68k/configs/mac_defconfig | 16 ++++++++++++++-- arch/m68k/configs/multi_defconfig | 16 ++++++++++++++-- arch/m68k/configs/mvme147_defconfig | 16 ++++++++++++++-- arch/m68k/configs/mvme16x_defconfig | 16 ++++++++++++++-- arch/m68k/configs/q40_defconfig | 16 ++++++++++++++-- arch/m68k/configs/sun3_defconfig | 16 ++++++++++++++-- arch/m68k/configs/sun3x_defconfig | 16 ++++++++++++++-- 12 files changed, 168 insertions(+), 24 deletions(-) commit 7fb48e746eeb3dfacb20c8983a85fd95c3a792f5 Author: Corentin Labbe Date: Thu Dec 15 16:02:08 2016 +0100 m68k/mac: Remove unneeded linux/miscdevice.h include arch/m68k/mac/misc.c does not use any miscdevice so the inclusion of linux/miscdevice.h is unnecessary. This patch remove this unnecessary include. Signed-off-by: Corentin Labbe Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 1 - 1 file changed, 1 deletion(-) commit 6c71100db53e4a0bc0cefce7d9180f5ec10f0f27 Author: Kinglong Mee Date: Thu Feb 9 20:45:22 2017 +0800 fanotify: simplify the code of fanotify_merge Signed-off-by: Kinglong Mee Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 54a21903df2f8020bd4bc9fe38668c031255e148 Merge: 2553482 5182c2c Author: Greg Kroah-Hartman Date: Thu Feb 9 13:57:05 2017 +0100 Merge tag 'usb-serial-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.11-rc1 These updates include - a new driver for Renesas uPD78F0730-based devices - several fixes of failures to check for short transfers, some of which could lead to minor information leaks, and in one case a loop-condition underflow - a fix of a long-standing regression in the ftdi_sio driver which resulted in excessive bulk-in interrupts - a fix for ftdi_sio line-status over-reporting which could lead to an endless stream of NULL-characters being forwarded to user space - a fix for a regression in the console driver - a fix for another mos7840 NULL-pointer dereference due to a missing endpoint sanity check Included are also some clean ups and fixes for various minor issues, as well as a couple of new device IDs that came in late. All but the final patch have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 10d258c51869916347adce4312e6fe41fa5144ad Author: Dan Carpenter Date: Wed Feb 8 10:23:24 2017 +0300 serdev: ttyport: check whether tty_init_dev() fails My static checker complains that we don't have any error handling here. It's simple enough to add it. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Signed-off-by: Dan Carpenter Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 2 ++ 1 file changed, 2 insertions(+) commit 80cd94e759fd3d7b9fb1a95fa41e2c23e557a525 Author: Wei Yongjun Date: Sun Feb 5 16:12:34 2017 +0000 serial: 8250_pci: make pciserial_detach_ports() static Fixes the following sparse warning: drivers/tty/serial/8250/8250_pci.c:3916:6: warning: symbol 'pciserial_detach_ports' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 255348289f714b96e0e95f9b702f435a638e6fd4 Author: Alexandre Bailon Date: Mon Feb 6 22:53:56 2017 -0600 usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS Despite the CPPI 4.1 is a generic DMA, it is tied to USB. On the DSPS, CPPI 4.1 interrupt's registers are in USBSS (the MUSB glue). Currently, to enable / disable and clear interrupts, the CPPI 4.1 driver maps and accesses to USBSS's register, which making CPPI 4.1 driver not really generic. Move the interrupt management to DSPS driver. Signed-off-by: Alexandre Bailon Acked-by: Vinod Koul Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/dma/cppi41.c | 28 ++++----------- drivers/usb/musb/musb_dsps.c | 81 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 86 insertions(+), 23 deletions(-) commit a96ca0d20636b594f28772454eedb2b7d8da5a1b Author: Alexandre Bailon Date: Mon Feb 6 22:53:55 2017 -0600 usb: musb: tusb6010: Clean up tusb_omap_dma structure A pointer to musb is now present in the dma_controller structure. Remove the one present in tusb_omap_dma structure. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 995ee0eab88df44bfb73fcafe600affb0d73f7c5 Author: Alexandre Bailon Date: Mon Feb 6 22:53:54 2017 -0600 usb: musb: cppi_dma: Clean up cppi41_dma_controller structure A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi41_dma_controller structure. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 03158f90155bcd6126b2636fca5b38fe96e5cbda Author: Alexandre Bailon Date: Mon Feb 6 22:53:53 2017 -0600 usb: musb: cppi_dma: Clean up cppi structure A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi structure. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/cppi_dma.c | 26 +++++++++++++------------- drivers/usb/musb/cppi_dma.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) commit ed232c0b4bebcb7325fbf38a21bcf4f6a8c0153f Author: Alexandre Bailon Date: Mon Feb 6 22:53:52 2017 -0600 usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback() Update cppi41_dma_callback() to detect an aborted transfer. This was not required before because cppi41_dma_callback() was only invoked on transfer completion. In order to make CPPI 4.1 driver more generic, cppi41_dma_callback() will be invoked after a transfer abort in order to let the MUSB driver perform some action such as acknowledge the interrupt that may be fired during a teardown. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 050dc900cfe88cc890d145c02e1a492915d93cce Author: Alexandre Bailon Date: Mon Feb 6 22:53:51 2017 -0600 usb: musb: dma: Add a DMA completion platform callback Currently, the CPPI 4.1 driver is not completely generic and only works on DSPS. This is because of IRQ management. Add a callback to dma_controller that could be invoked on DMA completion to acknowledge the IRQ. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 7 +++++-- drivers/usb/musb/musb_dma.h | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 7c92e5fbf4dac0dd4dd41a0383adc54f16f403e2 Author: Gustavo A. R. Silva Date: Thu Feb 9 01:49:56 2017 -0600 drivers: usb: usbip: Add missing break statement to switch Add missing break statement to prevent the code for case USB_PORT_FEAT_C_RESET falling through to the default case. Addresses-Coverity-ID: 143155 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 1 + 1 file changed, 1 insertion(+) commit b7ecfe7126d23b1329dc5e63db3caa5eecb322eb Author: Wei Yongjun Date: Sun Feb 5 16:25:38 2017 +0000 usb: mtu3: remove redundant dev_err call in get_ssusb_rscs() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit db17c640e7a9e38db1b9c300a339d54f2cd2b95c Author: Laurentiu Tudor Date: Tue Feb 7 09:43:53 2017 -0600 staging: fsl-mc: dprc: drop unused APIs Leave only APIs that area actually used in the bus driver. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed basis. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-cmd.h | 18 - drivers/staging/fsl-mc/bus/dprc.c | 666 ---------------------------------- drivers/staging/fsl-mc/include/dprc.h | 243 ------------- 3 files changed, 927 deletions(-) commit 5e62af8835656ee8d46a7580ecfc131267d42482 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:52 2017 -0600 staging: fsl-mc: dpbp: add a few missing EXPORT_SYMBOL()s Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp.c | 3 +++ 1 file changed, 3 insertions(+) commit 7337013473fdc5974329daf2ca788f1410bf46b2 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:51 2017 -0600 staging: fsl-mc: dpbp: drop unused APIs Leave only APIs that will be used in upcomming drivers. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed basis. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp-cmd.h | 116 --------- drivers/staging/fsl-mc/bus/dpbp.c | 449 ---------------------------------- drivers/staging/fsl-mc/include/dpbp.h | 129 ---------- 3 files changed, 694 deletions(-) commit 58acb3875bb11556fb15b5adb9d664e1d589ee70 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:50 2017 -0600 staging: fsl-mc: dpmng: drop unused prototype The implementation was removed in commit: decd3d0cf (staging: fsl-mc: uprev binary interface to match MC v10.x) but the prototype was left behind. Also fix a message that was wrongly mentioning it. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 2 +- drivers/staging/fsl-mc/include/dpmng.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit ee9d06064ee554733ba1d9aa82bbadc1eefc2e4f Author: Laurentiu Tudor Date: Tue Feb 7 09:43:49 2017 -0600 staging: fsl-mc: dpmcp: drop unused APIs These APIs are not used yet, so drop the dead code. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place Also in this patch, add missing prototype for version query function. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 95 -------- drivers/staging/fsl-mc/bus/dpmcp.c | 382 --------------------------------- drivers/staging/fsl-mc/bus/dpmcp.h | 100 +-------- 3 files changed, 4 insertions(+), 573 deletions(-) commit 9b65332e0e3f83586692fd829aa7e25c0e90a9b4 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:48 2017 -0600 staging: fsl-mc: remove slab cache for mc devices Let's drop the slab cache for objects until we actually have proof that it improves performance. This makes the code cleaner. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit dc341c4ec2bf7c122f818f881eb2a1d5d6e8e9c9 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:47 2017 -0600 staging: fsl-mc: don't use devres api for refcounted objects Mixing two memory management systems, in this case managed device resource api and refcounted objects is a bad idea. Lifetime of an object is controlled by its refcount so allocating it with other apis that have their own lifetime control is not ok. Drop devm_*() apis in favor of plain allocations. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95b3523b723e5354a375f4d185c74970322c7bf5 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:46 2017 -0600 staging: fsl-mc: add device release callback When hot unplugging a mc-bus device the kernel displays this pertinent message, followed by a stack dump: "Device 'foo.N' does not have a release() function, it is broken and must be fixed." Add the required callback to fix and drop the now uneeded explicit freeing. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 95b5daf5326a3875a1e7b8f32b61d24bb790ef43 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:45 2017 -0600 staging: fsl-mc: fix device ref counting Drop unneeded get_device() call at device creation and, as per documentation, drop reference count after using device_find_child() return. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 0e724ba37e388c6136c1a7a5b8e3804c4a96abc9 Author: Laurentiu Tudor Date: Tue Feb 7 09:43:44 2017 -0600 staging: fsl-mc: drop root dprc counting It was used just to sanity check some obscure cases that are unlikely to ever happen. Signed-off-by: Laurentiu Tudor Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) commit c075b6f2d357ea91e8ef01e860571e7d151f3aa3 Author: Matthieu Simon Date: Tue Feb 7 22:48:43 2017 -0800 staging: sm750fb: Replace POKE32 and PEEK32 by inline functions POKE32 and PEEK32 have been replaced by inlined functions poke32 and peek32. Having inline functions instead of macros help to get the correct type-checking and avoid the possible precedence issues reported by checkpatch. Signed-off-by: Matthieu Simon Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 42 ++++++------- drivers/staging/sm750fb/ddk750_chip.h | 13 +++- drivers/staging/sm750fb/ddk750_display.c | 44 ++++++------- drivers/staging/sm750fb/ddk750_hwi2c.c | 38 ++++++------ drivers/staging/sm750fb/ddk750_mode.c | 38 ++++++------ drivers/staging/sm750fb/ddk750_power.c | 26 ++++---- drivers/staging/sm750fb/ddk750_power.h | 4 +- drivers/staging/sm750fb/ddk750_swi2c.c | 34 +++++------ drivers/staging/sm750fb/sm750_cursor.c | 12 ++-- drivers/staging/sm750fb/sm750_hw.c | 102 +++++++++++++++---------------- 10 files changed, 180 insertions(+), 173 deletions(-) commit 0840ff76902da3c92ecda4660ee3b1a795bbc09d Author: Colin Ian King Date: Thu Feb 9 11:06:43 2017 +0000 staging: rtl8192u: remove redundant null check on array alg u.crypt.alg is an array of u8 integers and hence the null check on this array is redundant and can be removed. Detected with CoverityScan, CID#143214 ("Array compared against 0") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) commit 7a976ce11efe13a9f0c98559a13d6e43e94cb9da Author: Fu Yong Quah Date: Mon Feb 6 22:24:12 2017 -0500 staging: rtl8192u: Fix indentation Fix number of indentaions for block scopes as suggested by Documentation/CodingStyle. Signed-off-by: Fu Yong Quah Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_wx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df47a14c2c8b5a1eb06a6de5cefdafd6bcef4272 Author: Ivan Safonov Date: Mon Feb 6 20:23:28 2017 +0300 staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)() recv_frame->rx_(data|len|tail) duplicate pkt (skb) data|len|tail members and require special functions recvframe_(put|pull|pull_tail)() instead of skb_(put|pull|trim). Replace rx_(data|len|tail) with pkt->(data|len|tail), remove rx_(data|len|tail) and remove recvframe_(put|pull|pull_tail)(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 52 +++++++------- drivers/staging/rtl8188eu/core/rtw_recv.c | 92 ++++++++++++------------ drivers/staging/rtl8188eu/core/rtw_security.c | 12 ++-- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 62 ---------------- drivers/staging/rtl8188eu/os_dep/mon.c | 4 +- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 ++-- 8 files changed, 83 insertions(+), 159 deletions(-) commit e038e67f0891b5fddffd779c20f32a7c59288170 Author: Ivan Safonov Date: Mon Feb 6 20:23:27 2017 +0300 staging:r8188eu: update pkt->(data|tail|len) synchronously with rx_(data|tail|len) in recv_frame structure Original driver code uses rx_* members to store skb (pkt) fields (instead of pkt->* members), pkt->* updated only after data completely formed, not in process. Update pkt->* after data buffer changed (with rx_*). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bdf299c1407b249eb5d623b1ebdd7269a2a88729 Author: Ivan Safonov Date: Mon Feb 6 20:23:26 2017 +0300 staging:r8188eu: remove unused rtw_ieee80211_bar structure definition rtw_ieee80211_bar structure definition does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/wifi.h | 15 --------------- 1 file changed, 15 deletions(-) commit 35abf582a5378e5a878577cc46680bd707795e21 Author: Ivan Safonov Date: Mon Feb 6 20:23:25 2017 +0300 staging:r8188eu: replace rx_end member of recv_frame with pkt->end rx_end is duplication of pkt->end pointer. pkt->end is preferred, because it is native skb field supported by skb_*() functions. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 3 +-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 70cb11622cfac890f7b0bccda258b3d3961a8fd0 Author: Carlos Palminha Date: Thu Feb 9 10:18:42 2017 +0000 staging: rtl8712: rtl8712: fixed missing conversion to le32 Fixed missing conversion to le32, detected by sparse (invalid assignment from int to __le32) Signed-off-by: Carlos Palminha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3103a361795e2b04c1e11aba1da50062f31053f Author: Dan Carpenter Date: Tue Feb 7 16:17:57 2017 +0300 Staging: bcm2835-audio: remove unneeded NULL check We just dereferenced "instance" on the line before so checking it here is pointless. Anyway, it can't be NULL here so let's remove the check. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0afad91356392ab53ce3b3438173972b78bf9089 Author: Dan Carpenter Date: Tue Feb 7 16:17:34 2017 +0300 Staging: bcm2835-audio: fix an uninitialized return value "ret" isn't necessarily initialized on the success path. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 1 + 1 file changed, 1 insertion(+) commit 84472ecd7074576143aaf2772a304138fa4f1a09 Author: Dan Carpenter Date: Tue Feb 7 16:17:07 2017 +0300 staging: bcm2835-audio: off by one in snd_bcm2835_playback_open_generic() The > should be >= otherwise we write beyond the end of the array when we do: chip->alsa_stream[idx] = alsa_stream; Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1605cda06ba58f1b3b9570ae9ea13e9793aeca2a Author: Victor Vaschenko Date: Mon Feb 6 15:48:01 2017 +0300 Staging: bcm2835-audio: Fixed that open brace should be on previous line error in bcm2835-ctl.c Fixed ERROR: that open brace { should be on the previous line. One coding style correction for better readable code. Signed-off-by: Victor Vaschenko Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5182c2cf2a9bfb7f066ef0bdd2bb6330b94dd74e Author: Johan Hovold Date: Thu Feb 9 12:11:41 2017 +0100 USB: serial: mos7840: fix another NULL-deref at open Fix another NULL-pointer dereference at open should a malicious device lack an interrupt-in endpoint. Note that the driver has a broken check for an interrupt-in endpoint which means that an interrupt URB has never even been submitted. Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Cc: stable # v2.6.19: 5c75633ef751 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/mos7840.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b715b51e18584f828effc11c6bd4a8c09834f9d4 Author: Simon Sandström Date: Tue Feb 7 12:03:04 2017 +0100 staging: bcm2835-audio: Remove unnecessary space after cast Fixes checkpatch check "No space is necessary after a cast". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab601be466e3e2a81d2d3e2c123c00bab8322972 Author: Simon Sandström Date: Tue Feb 7 12:02:43 2017 +0100 staging: bcm2835-audio: Rewrite comparison to NULL Fixes checkpatch check "Comparison to NULL could be written '!chip'". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b48e8857106a4fc6d4bca215f266232834d9f82 Author: Simon Sandström Date: Tue Feb 7 12:02:26 2017 +0100 staging: bcm2835-audio: Fix argument indentation Fixes checkpatch CHECK: "Alignment should match open parenthesis". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit be36cefeca40ad6b31233859662a23937d6f35ee Author: Simon Sandström Date: Tue Feb 7 12:02:06 2017 +0100 staging: bcm2835-audio: Simplify bcm2835_alsa_device_init() Fixes checkpatch warning "Missing a blank line after declarations". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 99f36b1810729ea7d31bffb351d8ab63f2c92c53 Author: Simon Sandström Date: Tue Feb 7 12:01:46 2017 +0100 staging: bcm2835-audio: Move open brace to correct line Fixes checkpatch error "open brace { should be on the previous line". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ab7cfdbb7447394d7c5b155531c9bb20eef44b82 Author: Simon Sandström Date: Tue Feb 7 12:01:27 2017 +0100 staging: bcm2835-audio: Remove whitespace before quoted newline Fixes checkpatch warning "unnecessary whitespace before a quoted newline". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0042755fed69f955cc1b7559fad28d412d7054de Author: Simon Sandström Date: Tue Feb 7 12:01:10 2017 +0100 staging: bcm2835-audio: Remove incorrect whitespace According to the coding style, "bcm2835_ship ** rchip" should be "bcm2835 **rchip". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69c429864e693d2aaaea4adf2e6cfd0d30103781 Author: Simon Sandström Date: Tue Feb 7 12:00:56 2017 +0100 staging: bcm2835-audio: Remove static initialisation Static pointers are explicility initialised to NULL. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3ea53c7a45ce45fb65e220a1d65209d5e3e3f6a Author: Javier Rodriguez Date: Mon Feb 6 18:19:32 2017 +0100 staging: gdm724x: fix incorrect type in assignment Fix sparse warning issue. drivers/staging/gdm724x/gdm_lte.c:201:33: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_lte.c:201:33: expected unsigned int [unsigned] [addressable] [usertype] ph_len drivers/staging/gdm724x/gdm_lte.c:201:33: got restricted __be16 [usertype] payload_len Signed-off-by: Javier Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd47e4d69abfd5a3e85ba4ff282db5acfffd6fc2 Author: Dan Carpenter Date: Wed Feb 8 10:18:08 2017 +0300 staging: gdm724x: fix a couple array overflows The find_dev_index() function is frustrating. If you give it an invalid index then it returns 0. That was the intent except there is an off-by-one so it can return MAX_NIC_TYPE which is one higher than we want. There is one caller which had a sanity check to catch invalid returns, but the other two callers assumed that index was valid. My feeling is that when we are given invalid indexes, that should be treated like an error and we abandon what we were doing. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 57e60850e741137b37c302a4b569d33ad97631b0 Author: stephen knipe Date: Wed Feb 8 20:27:46 2017 +0100 staging: most: dim2_hdm octal permissions fix This patch is to make the permissions sent to module_param be explicitly octal in accordance with the linux style conventions. Issues found by checkpatch.pl. Signed-off-by: stephen knipe Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb837d6761ca25b9163c64c2b5d6a6f3f12b490e Author: Derek Robson Date: Mon Feb 6 15:28:13 2017 +1300 Staging: speakup: speakup.h - remove unused define As part of cleaning up symbolic permissions found define that is not used. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup.h | 4 ---- 1 file changed, 4 deletions(-) commit ffe3d1e43cc01457d513bf6e13605ebe8ae0fd9a Author: Miles Chen Date: Thu Feb 9 09:52:03 2017 +0800 arm64: use linux/sizes.h for constants Use linux/size.h to improve code readability. Signed-off-by: Miles Chen Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5982f0849e08fe4e4e7df5e345c4539ce9780b1b Author: Wei Yongjun Date: Wed Feb 8 16:20:01 2017 +0000 KVM: PPC: Book 3S: Fix error return in kvm_vm_ioctl_create_spapr_tce() Fix to return error code -ENOMEM from the memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio.c | 1 + 1 file changed, 1 insertion(+) commit dbec27298b0df86eaa6bc02e5df0ce55ec7d97f2 Author: Johan Hovold Date: Mon Jan 23 13:04:14 2017 +0100 staging: greybus: operation: add generic timeout support Add a struct timer_list to struct gb_operation and use that to implement generic operation timeouts. This simplifies the synchronous operation handling somewhat while also providing a generic timeout mechanism that drivers can use for asynchronous operations. Signed-off-by: Johan Hovold Acked-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 1 + drivers/staging/greybus/operation.c | 50 ++++++++++++++++++++++++++----------- drivers/staging/greybus/operation.h | 2 ++ 3 files changed, 39 insertions(+), 14 deletions(-) commit 64b40ffbc83029f035571cad9727e34e69dbf6d0 Author: David Gibson Date: Fri Dec 9 11:07:35 2016 +1100 powerpc/pseries: Add hypercall wrappers for hash page table resizing This adds the hypercall numbers and wrapper functions for the hash page table resizing hypercalls. These hypercall numbers are defined in the PAPR ACR "HPT resizing option". It also adds a new firmware feature flag to track the presence of the HPT resizing calls. Signed-off-by: David Gibson Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/firmware.h | 5 +++-- arch/powerpc/include/asm/hvcall.h | 2 ++ arch/powerpc/include/asm/plpar_wrappers.h | 12 ++++++++++++ arch/powerpc/platforms/pseries/firmware.c | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) commit 37b103830ec3e52a761bb647eb78da22a1fe4e09 Author: Florian Westphal Date: Tue Feb 7 15:00:19 2017 +0100 xfrm: policy: make policy backend const Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/ipv4/xfrm4_policy.c | 2 +- net/ipv6/xfrm6_policy.c | 2 +- net/xfrm/xfrm_policy.c | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) commit bdba9fe01e1bcb942c95a1a332b27ef829c87df4 Author: Florian Westphal Date: Tue Feb 7 15:00:18 2017 +0100 xfrm: policy: remove xfrm_policy_put_afinfo Alternative is to keep it an make the (unused) afinfo arg const to avoid the compiler warnings once the afinfo structs get constified. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit a2817d8b279bc8fe62da76e6019eb9ff9d4e319c Author: Florian Westphal Date: Tue Feb 7 15:00:17 2017 +0100 xfrm: policy: remove family field Only needed it to register the policy backend at init time. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 5 ++--- net/ipv4/xfrm4_policy.c | 5 +---- net/ipv6/xfrm6_policy.c | 5 +---- net/xfrm/xfrm_policy.c | 34 +++++++++++++++++----------------- 4 files changed, 21 insertions(+), 28 deletions(-) commit 3d7d25a68ea5153d9d0d01c8c83acf644eab9704 Author: Florian Westphal Date: Tue Feb 7 15:00:16 2017 +0100 xfrm: policy: remove garbage_collect callback Just call xfrm_garbage_collect_deferred() directly. This gets rid of a write to afinfo in register/unregister and allows to constify afinfo later on. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/ipv4/xfrm4_policy.c | 2 +- net/ipv6/xfrm6_policy.c | 2 +- net/xfrm/xfrm_policy.c | 6 ++---- 4 files changed, 5 insertions(+), 7 deletions(-) commit 2b61997aa0c68ae033d066ac2d9905ada81b761a Author: Florian Westphal Date: Tue Feb 7 15:00:15 2017 +0100 xfrm: policy: xfrm_policy_unregister_afinfo can return void Nothing checks the return value. Also, the errors returned on unregister are impossible (we only support INET and INET6, so no way xfrm_policy_afinfo[afinfo->family] can be anything other than 'afinfo' itself). Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_policy.c | 35 +++++++++++++---------------------- 2 files changed, 14 insertions(+), 23 deletions(-) commit f5e2bb4f5b2252e8f170f59bece2cf9a2efc8e6a Author: Florian Westphal Date: Tue Feb 7 15:00:14 2017 +0100 xfrm: policy: xfrm_get_tos cannot fail The comment makes it look like get_tos() is used to validate something, but it turns out the comment was about xfrm_find_bundle() which got removed years ago. xfrm_get_tos will return either the tos (ipv4) or 0 (ipv6). Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 960fdfdeb9e85a67bed136bc945c541ba61c2bdd Author: Florian Westphal Date: Tue Feb 7 14:52:30 2017 +0100 xfrm: input: constify xfrm_input_afinfo Nothing writes to these structures (the module owner was not used). While at it, size xfrm_input_afinfo[] by the highest existing xfrm family (INET6), not AF_MAX. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 5 ++--- net/ipv4/xfrm4_protocol.c | 3 +-- net/ipv6/xfrm6_protocol.c | 3 +-- net/xfrm/xfrm_input.c | 31 +++++++++++-------------------- 4 files changed, 15 insertions(+), 27 deletions(-) commit c282222a45cb9503cbfbebfdb60491f06ae84b49 Author: Florian Westphal Date: Wed Feb 8 11:52:29 2017 +0100 xfrm: policy: init locks early Dmitry reports following splat: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 13059 Comm: syz-executor1 Not tainted 4.10.0-rc7-next-20170207 #1 [..] spin_lock_bh include/linux/spinlock.h:304 [inline] xfrm_policy_flush+0x32/0x470 net/xfrm/xfrm_policy.c:963 xfrm_policy_fini+0xbf/0x560 net/xfrm/xfrm_policy.c:3041 xfrm_net_init+0x79f/0x9e0 net/xfrm/xfrm_policy.c:3091 ops_init+0x10a/0x530 net/core/net_namespace.c:115 setup_net+0x2ed/0x690 net/core/net_namespace.c:291 copy_net_ns+0x26c/0x530 net/core/net_namespace.c:396 create_new_namespaces+0x409/0x860 kernel/nsproxy.c:106 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:205 SYSC_unshare kernel/fork.c:2281 [inline] Problem is that when we get error during xfrm_net_init we will call xfrm_policy_fini which will acquire xfrm_policy_lock before it was initialized. Just move it around so locks get set up first. Reported-by: Dmitry Vyukov Fixes: 283bc9f35bbbcb0e9 ("xfrm: Namespacify xfrm state/policy locks") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b2c9652eba6c11787b5f6cfa53aaea752f58809e Author: Bart Van Assche Date: Fri Jun 5 16:17:51 2015 -0700 target: Remove command flag CMD_T_DEV_ACTIVE The code that tests the CMD_T_DEV_ACTIVE flag has been removed. Hence also remove the flag itself. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Andy Grover Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 1 - include/target/target_core_base.h | 1 - 2 files changed, 2 deletions(-) commit fd5e64def9170392fdf258d1eee5966433ee3d45 Author: Bart Van Assche Date: Tue Jan 3 10:44:11 2017 +0100 target: Remove command flag CMD_T_BUSY The patch that reworks task management function handling guarantees that target_remove_from_state_list() is always called with CMD_T_BUSY cleared. Since that function is the only function that tests that flag this means that that flag is now superfluous. Hence remove that flag. Signed-off-by: Bart Van Assche Reviewed-by: Andy Grover Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 2 +- drivers/target/target_core_transport.c | 12 ++++-------- include/target/target_core_base.h | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) commit 6b6427b6fd90ba1ff13e540bf7276f30a3e6f74f Author: Bart Van Assche Date: Tue Feb 7 12:19:16 2017 -0800 target: Move session check from target_put_sess_cmd() into target_release_cmd_kref() This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 39 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit b1a2ecdad72e0a4f0ebdbaff580b5330ebcf68c3 Author: Bart Van Assche Date: Wed Feb 1 16:58:35 2017 -0800 target: Inline transport_cmd_check_stop() The function transport_cmd_check_stop() has two callers. These callers invoke this function as follows: * transport_cmd_check_stop(cmd, true, false) * transport_cmd_check_stop(cmd, false, true) Hence inline this function into its callers. This patch does not change any functionality but improves source code readability. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Bryant G. Ly Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 68 +++++++++++++++++----------------- include/target/target_core_fabric.h | 2 +- 2 files changed, 34 insertions(+), 36 deletions(-) commit 580ab13ac445a2bb717bee995d8639ec6836f78c Author: Bart Van Assche Date: Sun Dec 27 13:48:09 2015 +0100 target: Remove an overly chatty debug message Enabling dynamic debug for the target_core_mod kernel module causes the system log to be spammed with the "Incremented ..." message. Hence remove it. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 2 -- 1 file changed, 2 deletions(-) commit a5eb307f37d1e9909284b6f0a8f72bf55423c137 Author: Bart Van Assche Date: Mon Jan 9 10:14:54 2017 -0800 target: Stop execution if CMD_T_STOP has been set Stop execution if CMD_T_STOP has been set for a command just after the command has been added to the device command list and before .write_pending() is called. The following sequence can trigger this: - transport_handle_cdb_direct() gets called. This function namely sets CMD_T_ACTIVE before it calls transport_generic_new_cmd(). - __transport_wait_for_tasks() is called concurrently. This function sets CMD_T_STOP for all active commands that have not been aborted. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d4760ee4720d5f0eeda770ce248244166676283 Author: Bart Van Assche Date: Tue Jan 10 10:03:28 2017 -0800 target: Correct transport_wait_for_tasks() documentation transport_wait_for_tasks() not only waits for command completion but also sets CMD_T_STOP. Additionally, this function is not only called by frontend drivers but also by the target core. Update the transport_wait_for_tasks() documentation to reflect this. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3a1e7ca64f2dae69536054c42b7b90e480db1045 Author: Bart Van Assche Date: Fri Dec 23 13:47:38 2016 +0100 target: Make core_tmr_abort_task() consider all commands It is possible that two commands with the same tag are present on sess_cmd_list because commands are removed from sess_cmd_list after a response has been sent to the initiator. Hence continue searching through sess_cmd_list even if a matching tag has already been found. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 4f4c6c3ddb15af396cd8cf81b487b59261199ee9 Author: Bart Van Assche Date: Fri Dec 23 13:23:45 2016 +0100 target: Remove se_tmr_req.tmr_lun Member tmr_lun of se_tmr_req is set but not used. Hence remove it. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 1 - include/target/target_core_base.h | 1 - 2 files changed, 2 deletions(-) commit 59b6986dbfcdab96a971f9663221849de79a7556 Author: Bart Van Assche Date: Thu Jan 5 12:39:57 2017 +0100 target/iscsi: Fix iSCSI task reassignment handling Allocate a task management request structure for all task management requests, including task reassignment. This change avoids that the se_tmr->response assignment dereferences an uninitialized se_tmr pointer. Reported-by: Moshe David Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Moshe David Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit e381fe9e89909ced3d878b8c3c3a9b344c02cbdc Author: Bart Van Assche Date: Fri Jan 6 11:32:08 2017 +0100 target/iscsi: Introduce a helper function for TMF translation This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Nicholas A. Bellinger Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 48 ++++++++++++++++++------------------- include/target/target_core_base.h | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) commit 53c561dca9fd66330fe63d8a03ef859407e2cd91 Author: Bart Van Assche Date: Fri Dec 23 14:40:24 2016 +0100 target/iscsi: Fix spelling of "reallegiance" Fix the spelling of this word in a function name, messages and source code comments. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Nicholas A. Bellinger Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 4 ++-- drivers/target/iscsi/iscsi_target_erl2.c | 6 +++--- drivers/target/iscsi/iscsi_target_erl2.h | 2 +- drivers/target/iscsi/iscsi_target_tmr.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 0d5efb8a3c62c598d092bedb579debacd3f746eb Author: Bart Van Assche Date: Fri Dec 23 14:37:52 2016 +0100 target/iscsi: Fix spelling of "perform" Change two occurrences of "preform" into "perform". Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Nicholas A. Bellinger Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1efaa949396b5d9e8d1e6edef7e97e9ce1a97319 Author: Bart Van Assche Date: Fri Dec 23 12:45:27 2016 +0100 target/iscsi: Fix indentation in iscsi_target_start_negotiation() This patch avoids that smatch complains about inconsistent indentation in iscsi_target_start_negotiation(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Nicholas A. Bellinger Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_nego.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 664a722b4f1bab63fee0193459036d1a95e19e99 Author: Bart Van Assche Date: Wed Jan 4 08:13:34 2017 +0100 target/tcm_fc: Remove a set-but-not-used variable This was detected by building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_cmd.c | 2 -- 1 file changed, 2 deletions(-) commit bdec5188745c4f03ecbc5b88bc2c3f76acb435ae Author: Varun Prakash Date: Tue Jan 24 17:07:02 2017 +0530 target/cxgbit: Use T6 specific macro to set the force bit For T6 adapters use T6 specific macro to set the force bit. Signed-off-by: Varun Prakash Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 4 ++++ drivers/target/iscsi/cxgbit/cxgbit_target.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 5cadafb236dffd8aa4772b32bf848af9128faedc Author: Bart Van Assche Date: Fri Jan 13 10:41:52 2017 -0800 target/cxgbit: Fix endianness annotations This patch does not change any functionality but avoids that sparse complains about endianness. Signed-off-by: Bart Van Assche Acked-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.h | 2 +- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 ++++++----- drivers/target/iscsi/cxgbit/cxgbit_main.c | 2 +- drivers/target/iscsi/cxgbit/cxgbit_target.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) commit 2fdbc65eae3989b566047b2ce21d66f52fe6bf69 Author: Bart Van Assche Date: Fri Jan 20 13:31:13 2017 -0800 qla2xxx: Avoid using variable-length arrays This patch does not change any functionality but avoids that sparse complains about using variable-length arrays. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25ff6af10562cfe30dd29452a8fc04ec022d4f18 Author: Joe Carnuccio Date: Thu Jan 19 22:28:04 2017 -0800 qla2xxx: Simplify usage of SRB structure in driver This patch simplifies SRB structure usage in driver. - Simplify sp->done() and sp->free() interfaces. - Remove sp->fcport->vha to use vha pointer from sp. - Use sp->vha context in qla2x00_rel_sp(). Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_bsg.c | 23 ++++----- drivers/scsi/qla2xxx/qla_def.h | 7 +-- drivers/scsi/qla2xxx/qla_gbl.h | 14 +++--- drivers/scsi/qla2xxx/qla_gs.c | 32 ++++++------ drivers/scsi/qla2xxx/qla_init.c | 100 +++++++++++++++++++------------------- drivers/scsi/qla2xxx/qla_inline.h | 13 +++-- drivers/scsi/qla2xxx/qla_iocb.c | 96 ++++++++++++++++++------------------ drivers/scsi/qla2xxx/qla_isr.c | 36 +++++++------- drivers/scsi/qla2xxx/qla_mr.c | 48 +++++++++--------- drivers/scsi/qla2xxx/qla_os.c | 35 +++++++------ drivers/scsi/qla2xxx/qla_target.c | 8 +-- 11 files changed, 201 insertions(+), 211 deletions(-) commit 41dc529a4602ac737020f423f84686a81de38e6d Author: Quinn Tran Date: Thu Jan 19 22:28:03 2017 -0800 qla2xxx: Improve RSCN handling in driver Current code blindly does State Change Registration when the link is up. Move SCR behind fabric scan, so that arbitrated loop scan would not get erroneous error message. Some of the other improvements are as follows - Add session deletion for TPRLO and send acknowledgment for TPRLO. - Enable FW option to move ABTS, RIDA & PUREX from RSPQ to ATIOQ. - Save NPort ID early in link init. - Move ABTS & RIDA to ATIOQ helps in keeping command ordering and link up sequence ordering. - Save Nport ID and update VP map so that SCSI CMD/ATIO won't be dropped. - fcport alloc does the initializes memory to zero. Remove memset to zero since It might corrupt link list. - Turn off Registration for State Change MB in loop mode. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 11 +- drivers/scsi/qla2xxx/qla_fw.h | 75 +++++++++--- drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_gs.c | 4 +- drivers/scsi/qla2xxx/qla_init.c | 150 ++++++++++++++++++++---- drivers/scsi/qla2xxx/qla_isr.c | 6 +- drivers/scsi/qla2xxx/qla_mbx.c | 144 +++++++++++++++-------- drivers/scsi/qla2xxx/qla_os.c | 48 ++++---- drivers/scsi/qla2xxx/qla_target.c | 238 ++++++++++++++++++++++++++++++++++---- 9 files changed, 533 insertions(+), 145 deletions(-) commit 0ca55938497412f9ffdbcb5cb7c4f8d6d28356ee Author: Himanshu Madhani Date: Thu Jan 19 22:28:02 2017 -0800 qla2xxx: Remove unused reverse_ini_mode With support for dual mode in the driver, this mode becomes dead code. Remove reverse_ini_mode from code. Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_target.c | 10 ---------- drivers/scsi/qla2xxx/qla_target.h | 8 -------- 3 files changed, 19 deletions(-) commit ead038556f646788e22ad7f0398556d10981ca5f Author: Quinn Tran Date: Thu Jan 19 22:28:01 2017 -0800 qla2xxx: Add Dual mode support in the driver Add switch to allow both Initiator Mode & Target mode to operate at the same time. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 6 +- drivers/scsi/qla2xxx/qla_isr.c | 19 ++++++- drivers/scsi/qla2xxx/qla_target.c | 110 +++++++++++++++++++++++++++++++------ drivers/scsi/qla2xxx/qla_target.h | 3 + drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 6 files changed, 119 insertions(+), 22 deletions(-) commit 726b85487067d7f5b23495bc33c484b8517c4074 Author: Quinn Tran Date: Thu Jan 19 22:28:00 2017 -0800 qla2xxx: Add framework for async fabric discovery Currently code performs a full scan of the fabric for every RSCN. Its an expensive process in a noisy large SAN. This patch optimizes expensive fabric discovery process by scanning switch for the affected port when RSCN is received. Currently Initiator Mode code makes login/logout decision without knowledge of target mode. This causes driver and firmware to go out-of-sync. This framework synchronizes both initiator mode personality and target mode personality in making login/logout decision. This patch adds following capabilities in the driver - Send Notification Acknowledgement asynchronously. - Update session/fcport state asynchronously. - Create a session or fcport struct asynchronously. - Send GNL asynchronously. The command will ask FW to provide a list of FC Port entries FW knows about. - Send GPDB asynchronously. The command will ask FW to provide detail data of an FC Port FW knows about or perform ADISC to verify the state of the session. - Send GPNID asynchronously. The command will ask switch to provide WWPN for provided NPort ID. - Send GPSC asynchronously. The command will ask switch to provide registered port speed for provided WWPN. - Send GIDPN asynchronously. The command will ask the switch to provide Nport ID for provided WWPN. - In driver unload path, schedule all session for deletion and wait for deletion to complete before allowing driver unload to proceed. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani [ bvanassche: fixed spelling in patch description ] Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_attr.c | 3 + drivers/scsi/qla2xxx/qla_def.h | 175 ++++- drivers/scsi/qla2xxx/qla_fw.h | 31 + drivers/scsi/qla2xxx/qla_gbl.h | 56 +- drivers/scsi/qla2xxx/qla_gs.c | 724 +++++++++++++++++-- drivers/scsi/qla2xxx/qla_init.c | 1396 ++++++++++++++++++++++++++++--------- drivers/scsi/qla2xxx/qla_inline.h | 7 +- drivers/scsi/qla2xxx/qla_iocb.c | 71 +- drivers/scsi/qla2xxx/qla_isr.c | 260 +++++-- drivers/scsi/qla2xxx/qla_mbx.c | 88 --- drivers/scsi/qla2xxx/qla_os.c | 271 ++++--- drivers/scsi/qla2xxx/qla_target.c | 1002 ++++++++++++++++++-------- drivers/scsi/qla2xxx/qla_target.h | 17 +- 13 files changed, 3114 insertions(+), 987 deletions(-) commit 5d964837c6a743193c63c8912f98834c7457ba5c Author: Quinn Tran Date: Thu Jan 19 22:27:59 2017 -0800 qla2xxx: Track I-T nexus as single fc_port struct Current code merges qla_tgt_sess and fc_port structure into single fc_port structure representing same I-T nexus. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani [ bvanassche: fixed spelling of patch description ] Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 112 ++++++++++++- drivers/scsi/qla2xxx/qla_dfs.c | 4 +- drivers/scsi/qla2xxx/qla_init.c | 12 -- drivers/scsi/qla2xxx/qla_iocb.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 326 ++++++++++++------------------------- drivers/scsi/qla2xxx/qla_target.h | 150 ++--------------- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 130 ++++++++------- drivers/scsi/qla2xxx/tcm_qla2xxx.h | 4 +- 8 files changed, 310 insertions(+), 430 deletions(-) commit 37cacc0a13012eee9fa0b07563eb149ec9244b1e Author: Quinn Tran Date: Thu Jan 19 22:27:58 2017 -0800 qla2xxx: Use d_id instead of s_id for more clarity Updated code with d_id from s_id for better readability and clarity. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Christoph Hellwig [ bvanassche: fixed spelling of patch description ] Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dfs.c | 9 ++++----- drivers/scsi/qla2xxx/qla_target.c | 24 +++++++++++----------- drivers/scsi/qla2xxx/qla_target.h | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 41 ++++++++++++++++++++------------------ 4 files changed, 39 insertions(+), 37 deletions(-) commit 5e4deaf6a47f397af68d3297bdc2913ae890bd4a Author: Quinn Tran Date: Thu Jan 19 22:27:57 2017 -0800 qla2xxx: Fix wrong argument in sp done callback Callback for sp->done expects scsi_qla_host is passed in as argument, Instead qla_hw_data is passed in. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_isr.c | 8 ++++---- drivers/scsi/qla2xxx/qla_mr.c | 6 +++--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 2c39b5ca2a8cb99fc463fd622e8ea3b9fbb980a2 Author: Himanshu Madhani Date: Thu Jan 19 22:27:56 2017 -0800 qla2xxx: Remove SRR code During initial implementation, tape support was included but not enabled by default on target. So far, we don't see any target customer requesting this support. Since this code is not being used actively, we want to remove it and we will add back if there are any request in future for SRR support. Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 641 -------------------------------------- drivers/scsi/qla2xxx/qla_target.h | 21 -- 2 files changed, 662 deletions(-) commit 1eb42f965cedafb700e9c902ddafb1c51e3117f7 Author: Quinn Tran Date: Thu Jan 19 22:27:55 2017 -0800 qla2xxx: Make trace flags more readable Trace flags are useful during debugging crash dumps using crash utility. These trace flags makes it easier to understand various states a command has successfully completed. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 28 +++++++++---------- drivers/scsi/qla2xxx/qla_target.h | 55 +++++++++++++++++--------------------- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 43 ++++++++++++++--------------- 3 files changed, 59 insertions(+), 67 deletions(-) commit be92fc3fde95c94bb54ff471219552a581640a6b Author: Quinn Tran Date: Thu Jan 19 22:27:54 2017 -0800 qla2xxx: Cleanup TMF code translation from qla_target Move code code which converts Task Mgmt Command flags for ATIO to TCM #defines, from qla2xxx driver to tcm_qla2xxx driver. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 75 ++++---------------------------------- drivers/scsi/qla2xxx/qla_target.h | 6 ++- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 40 +++++++++++++++++++- 3 files changed, 49 insertions(+), 72 deletions(-) commit df2e32c5ada8590b859863cf89f418c7962b9a21 Author: Quinn Tran Date: Thu Jan 19 22:27:53 2017 -0800 qla2xxx: Remove direct access of scsi_status field in se_cmd Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_target.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 811a4cf273afc6f651e0ef3d5400084bf0aeb75e Author: Chuanxiao Dong Date: Thu Feb 9 11:38:38 2017 +0800 drm/i915/gvt: enable IOMMU for gvt gvt driver has a check which doesn't allow to use gvt when host gpu iommu is enabled. This check can be removed after enable the iommu support in gvt Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 7 ------- 1 file changed, 7 deletions(-) commit b86dc6ed20f1543121757da1a77c0f52121d8bf1 Author: Chuanxiao Dong Date: Thu Feb 9 11:38:01 2017 +0800 drm/i915/gvt: map pfn for PTE entry in kvm When host i915 iommu enabled, gvt needs to use a mapped pfn in PTE entry So before kvm returns the pfn, map this pfn and return the mapped address which is so called iova. Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 62 +++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 13 deletions(-) commit 5de6bd4c23babc6a00fcd7dc7c90705c9d0ec69e Author: Chuanxiao Dong Date: Thu Feb 9 11:37:11 2017 +0800 drm/i915/gvt: Map shadow page before using it in shadow page table MFN usually refers to "Machine Frame Number" in virtulization world. Currently GVT-g populates the shadow PPGTT/GGTT page table with MFN according to the translation between MFN and Guest PFN. When host IOMMU is enabled, GPU DMA transactions go through the IOMMU, GPU needs an IOVA<->MFN mapping to walk the shadow page table in host main memory. This patch will map a page in IOMMU page table before using it in shadow page table and release the map when a shadow page is going to be freed. Signed-off-by: Zhi Wang Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 70 ++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 20 deletions(-) commit b15b2a612dfb8bac9d803f561dd1078fd5c025b9 Author: Changbin Du Date: Thu Feb 9 10:13:17 2017 +0800 drm/i915/gvt: reduce the line of interrupt logs and log friendly Reduce the line of logs in below functions and log friendly. o intel_vgpu_reg_imr_handler o intel_vgpu_reg_master_irq_handler o intel_vgpu_reg_ier_handler o intel_vgpu_reg_iir_handler Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/interrupt.c | 53 ++++++++---------------------------- 1 file changed, 11 insertions(+), 42 deletions(-) commit 3ce3274bff89c6ea5bed3f8f47abdbf672e216b2 Author: Changbin Du Date: Thu Feb 9 10:13:16 2017 +0800 drm/i915/gvt: remove a redundant end of line in debug log Remove a redundant end of line in below log. 'will complete workload %p\n, status: %d\n' Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e3745cea7521499e573aa193c52d801a9cb0c10 Author: Changbin Du Date: Thu Feb 9 10:13:15 2017 +0800 drm/i915/gvt: remove a noisy unimportant log in sched_policy Remove below unimportant log which is too noisy. 'no current vgpu search from q head' Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 1 - 1 file changed, 1 deletion(-) commit 31bb90f1cd084e0ca1359455eaf74bb64b5c5c82 Author: Arnd Bergmann Date: Wed Feb 1 16:59:21 2017 +0100 drm/amdgpu: shut up #warning for compile testing My randconfig tests on linux-next showed a newly introduced warning: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted': drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp] Generally speaking, warnings about bad kernel configuration are not particularly helpful. We could enforce the selection of X86_PAT through Kconfig, so the driver cannot even be used unless it is enabled, or we could just rely on the runtime warning that is also there. In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which shuts it up for me, but not people that may actually want to run the kernel as a compromize. Fixes: a2e2f29970aa ("drm/amdgpu: Bring bo creation in line with radeon driver (v2)") Reviewed-by: Michel Dänzer Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) commit 6127f4aee474a7b22330d1b9aa39d5c5f98bbaeb Author: Colin Ian King Date: Fri Feb 3 20:23:42 2017 +0000 drm/amdgpu/virt: fix double kfree on bo_va bo_va is being kfree'd twice, once in the call to amdgpu_vm_bo_rmv and then a short while later. Fix this double free by removing the 2nd kfree. Detected by CoverityScan, CID#1399524 ("Double Free") Reviewed-by: Monk Liu Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 - 1 file changed, 1 deletion(-) commit 9338acc579f904668d71760a871c67b165567569 Author: Dan Carpenter Date: Tue Feb 7 16:16:04 2017 +0300 drm/radeon: remove some dead code If "rdev->bios" is NULL then we don't need to free it. Reviewed-by: Michel Dänzer Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_bios.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b4821f8a4597c01318f3bebe208789bcf80aac9 Author: Jérôme Glisse Date: Mon Feb 6 15:13:18 2017 -0500 drm/radeon: avoid kernel segfault in vce when gpu fails to resume When GPU fails to resume we can not trust that value we write to GPU memory will post and we might get garbage (more like 0xffffffff on x86) when reading them back. This trigger out of range memory access in the kernel inside the vce resume code path. This patch use canonical value to compute offset instead of reading back value from GPU memory. Reviewed-by: Christian König Signed-off-by: Jérôme Glisse Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/vce_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8434a2ec13d5c8cb25716950bfbf7c9d7b64628a Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 21:57:22 2017 -0300 perf header: Fix handling of PERF_EVENT_UPDATE__SCALE In commit daeecbc0c431 ("perf tools: Add event_update event scale type"), the handling of PERF_EVENT_UPDATE__SCALE cast struct event_update_event->data to a pointer to event_update_event_scale, uses some field from this casted struct and then ends up falling through to the handling of another event type, PERF_EVENT_UPDATE__CPUS were it casts that ev->data to yet another type, oops, fix it by inserting the missing break. Noticed when building perf using gcc 7 on Fedora Rawhide: util/header.c: In function 'perf_event__process_event_update': util/header.c:3207:16: error: this statement may fall through [-Werror=implicit-fallthrough=] evsel->scale = ev_scale->scale; ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ util/header.c:3208:2: note: here case PERF_EVENT_UPDATE__CPUS: ^~~~ This wasn't noticed because probably PERF_EVENT_UPDATE__CPUS comes after PERF_EVENT_UPDATE__SCALE, so we would just create a bogus evsel->own_cpus when processing a PERF_EVENT_UPDATE__SCALE to then leak it and create a new cpu map with the correct data. Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: daeecbc0c431 ("perf tools: Add event_update event scale type") Link: http://lkml.kernel.org/n/tip-lukcf9hdj092ax2914ss95at@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 1 + 1 file changed, 1 insertion(+) commit 113f9017e503ba5a21138f93720857b77e4069f9 Author: Wei Yongjun Date: Tue Feb 7 15:56:45 2017 +0000 cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/brcmstb-avs-cpufreq.c | 2 -- 1 file changed, 2 deletions(-) commit a69261e4470d680185a15f748d9cdafb37c57a33 Author: Dan Carpenter Date: Tue Feb 7 16:19:06 2017 +0300 cpufreq: s3c2416: double free on driver init error path The "goto err_armclk;" error path already does a clk_put(s3c_freq->hclk); so this is a double free. Fixes: 34ee55075265 ([CPUFREQ] Add S3C2416/S3C2450 cpufreq driver) Signed-off-by: Dan Carpenter Reviewed-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/s3c2416-cpufreq.c | 1 - 1 file changed, 1 deletion(-) commit 2a96c9ecbbaa433715e5e756cd38bd5799a4acad Author: Markus Mayer Date: Tue Feb 7 13:58:56 2017 -0800 MIPS: BMIPS: enable CPUfreq Enable all applicable CPUfreq options. Signed-off-by: Markus Mayer Reviewed-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki arch/mips/configs/bmips_stb_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit cdb56cbfd7558bc48af032fcac64365c99ccb9f2 Author: Markus Mayer Date: Tue Feb 7 13:58:55 2017 -0800 cpufreq: bmips-cpufreq: CPUfreq driver for Broadcom's BMIPS SoCs Add the MIPS CPUfreq driver. This driver currently supports CPUfreq on BMIPS5xxx-based SoCs. Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/bmips-cpufreq.c | 188 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 199 insertions(+) commit a8d709b065929f95d173c87d400fab36e6629c6d Author: Markus Mayer Date: Tue Feb 7 13:58:54 2017 -0800 BMIPS: Enable prerequisites for CPUfreq in MIPS Kconfig. Turn on CPU_SUPPORTS_CPUFREQ and MIPS_EXTERNAL_TIMER for BMIPS. Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Signed-off-by: Rafael J. Wysocki arch/mips/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 71468d748ca0ef647d769a7d990258b47f5d1d6a Author: Markus Mayer Date: Tue Feb 7 13:58:53 2017 -0800 MIPS: BMIPS: Update defconfig Ran "make savedefconfig" to bring bmips_stb_defconfig up to date. Signed-off-by: Markus Mayer Reviewed-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki arch/mips/configs/bmips_stb_defconfig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 56c7303e62996fc7b49aea1fd967ccdf94f3a5d9 Merge: 6e978b2 565ebe8 Author: Rafael J. Wysocki Date: Thu Feb 9 01:18:14 2017 +0100 Merge back earlier cpufreq changes for v4.11. commit 0883ac038be12c4dba1a68a05030730f10442bc2 Author: Ulf Hansson Date: Wed Feb 8 13:39:00 2017 +0100 PM / Domains: Fix asynchronous execution of *noirq() callbacks As the PM core may invoke the *noirq() callbacks asynchronously, the current lock-less approach in genpd doesn't work. The consequence is that we may find concurrent operations racing to power on/off the PM domain. As of now, no immediate errors has been reported, but it's probably only a matter time. Therefor let's fix the problem now before this becomes a real issue, by deploying the locking scheme to the relevant functions. Reported-by: Brian Norris Signed-off-by: Ulf Hansson Tested-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 68 ++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 29 deletions(-) commit de55ce0de94b5daa804f69aa6ede793928900614 Author: Chris Packham Date: Fri Feb 3 13:43:16 2017 +1300 Documentation: powerpc/fsl: Update compatible for l2cache binding List all the current valid compatible strings for the l2cache binding. This should stop checkpatch.pl from complaining and will hopefully save someone from having to debug a typo in their dts. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Michael Ellerman .../devicetree/bindings/powerpc/fsl/l2cache.txt | 42 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 86f7ce4b4751aaf51ebcff6dc21e38b09894a915 Author: Benjamin Herrenschmidt Date: Tue Feb 7 11:37:28 2017 +1100 powerpc/opal-lpc: Remove unneeded include We don't need asm/xics.h Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-lpc.c | 1 - 1 file changed, 1 deletion(-) commit 2717a33d60745f2f72e521cdaedf79b00f66f8ca Author: Benjamin Herrenschmidt Date: Mon Feb 6 16:07:36 2017 +1100 powerpc/opal-irqchip: Use interrupt names if present Recent versions of OPAL can provide names for the various OPAL interrupts, so let's use them. This also modernises the code that fetches the interrupt array to use the helpers provided by the generic code instead of hand-parsing the property. Signed-off-by: Benjamin Herrenschmidt [mpe: Free irqs on error, check allocation of names, consolidate error handling, whitespace.] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-irqchip.c | 55 ++++++++++++++++++++------- 1 file changed, 42 insertions(+), 13 deletions(-) commit 470a36a8c014e5cac7bb2df382948597f7ec1b2c Author: Mahesh Salgaonkar Date: Wed Nov 16 10:58:02 2016 +0530 powerpc/powernv: Display the correct error info for CAPP errors. On some CAPP errors we see console messages that prints unknown HMIs for which CAPI recovery is in progress. This patch fixes this by printing correct error info for HMI generated due to CAPP recovery. Signed-off-by: Mahesh Salgaonkar Tested-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-hmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e623c54ec995899cf4179873070861dd438b8a9c Author: Michael Neuling Date: Mon Feb 6 13:55:43 2017 +1100 powerpc/powernv: Add XHCI and USB storage to defconfig These are common on bare metal machines, so put them in the defconfig. This adds 216KB to the vmlinux size Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 63b2547b155de2c41d40ea750155749232dde511 Author: Naveen N. Rao Date: Tue Feb 7 23:36:41 2017 +0530 powerpc/64: Include bpf/bcc related config options in defconfigs Specifically: - CONFIG_BPF_SYSCALL - CONFIG_NET_SCHED - CONFIG_NET_CLS_BPF - CONFIG_NET_CLS_ACT - CONFIG_NET_ACT_BPF - CONFIG_CGROUP_BPF - CONFIG_UPROBE_EVENT ... in pseries, ppc64 and powernv defconfigs. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 7 +++++++ arch/powerpc/configs/ppc64_defconfig | 7 +++++++ arch/powerpc/configs/pseries_defconfig | 7 +++++++ 3 files changed, 21 insertions(+) commit ccc38234fdc70120be79e7fb2df5c27ca5cd4c8a Author: Rafał Miłecki Date: Wed Feb 8 23:53:44 2017 +0100 mtd: bcm47xxsflash: support reading flash out of mapping window For reading flash content we use MMIO but it's possible to read only first 16 MiB this way. It's simply an arch design/limitation. To support flash sizes bigger than 16 MiB implement indirect access using ChipCommon registers. This has been tested using MX25L25635F. Signed-off-by: Rafał Miłecki Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/devices/bcm47xxsflash.c | 24 +++++++++++++++++++++--- drivers/mtd/devices/bcm47xxsflash.h | 3 +++ 2 files changed, 24 insertions(+), 3 deletions(-) commit 9c8d7ff32a0aa001ac8506180e1662ecdf927f32 Merge: 5d708ec a4077ce Author: Brian Norris Date: Wed Feb 8 15:00:24 2017 -0800 Merge tag 'nand/for-4.11' of github.com:linux-nand/linux From Boris: """ This pull request contains minor fixes/improvements on existing drivers: - sunxi: avoid busy-waiting for NAND events - ifc: fix ECC handling on IFC v1.0 - OX820: add explicit dependency on ARCH_OXNAS in Kconfig - core: add a new manufacture ID and fix a kernel-doc warning - fsmc: kill pdata support - lpc32xx_slc: remove unneeded NULL check """ Conflicts: include/linux/mtd/nand.h [Brian: trivial conflict in the comment section] commit 5ada90d55f6f652ae1103dac38bb92b445a368c5 Author: Rex Zhu Date: Tue Feb 7 17:34:11 2017 +0800 drm/amd/powerplay: set fan speed to max in profile peak mode only. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0d09a096c4c5853f3c689db416d701deb88ddc9c Author: Flora Cui Date: Tue Feb 7 15:36:32 2017 +0800 drm/amd/gfx6: update gb_addr_config Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +++ 1 file changed, 3 insertions(+) commit ea0875a0b6fc92c6d61376ec4890ae716a2156e4 Author: Flora Cui Date: Tue Feb 7 15:35:09 2017 +0800 drm/amdgpu: update HAINAN_GB_ADDR_CONFIG_GOLDEN Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d708ecc6c7718c22bcacabff0fbb32ecd19ad6b Author: Nobuhiro Iwamatsu Date: Fri Jan 27 10:36:38 2017 +0900 mtd: Fix typo: "occured" -> "occurred" Trivial typo fix in comment. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Brian Norris drivers/mtd/mtdchar.c | 2 +- drivers/mtd/spi-nor/spi-nor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2c0c8f2d38435ec7e20f50d658ddba0155b35663 Author: Flora Cui Date: Tue Feb 7 15:32:34 2017 +0800 drm/amdgpu: update VERDE_GB_ADDR_CONFIG_GOLDEN Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd5dfa61b4ff0165a8436f906ff377e9767ad2cf Author: Flora Cui Date: Tue Feb 7 15:24:25 2017 +0800 drm/amdgpu: refine si_read_register Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si.c | 90 +++++++++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 17 deletions(-) commit c5dc14fb9861d3c4fe857d43114946df289d10a3 Author: Flora Cui Date: Tue Feb 7 15:20:37 2017 +0800 drm/amdgpu/gfx6: clean up spi configuration Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 375d6f7057a9cbcc2867e2d3ccb40008dea55598 Author: Flora Cui Date: Tue Feb 7 15:18:27 2017 +0800 drm/amdgpu/gfx6: clean up cu configuration Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 100 +++++++++++++--------------------- 1 file changed, 38 insertions(+), 62 deletions(-) commit 69dd3d2c618d6127efca47d1ffdecce453ff0c80 Author: Flora Cui Date: Tue Feb 7 15:14:48 2017 +0800 drm/amdgpu/gfx6: clean up rb configuration Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 101 ++++++++++++++-------------------- 1 file changed, 42 insertions(+), 59 deletions(-) commit 6fc11b0ed354bc7a756ecf55af01fc974ae0f2f5 Author: Rex Zhu Date: Thu Jan 26 10:47:00 2017 +0800 drm/amdgpu: refine vce3.0 code and related powerplay pg code. 1. not start vce3.0 when hw_init 2. stop vce3.0 when vce idle. 3. pg mask used to ctrl power down/up vce. 4. change cg pg sequence in powerplay. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 17 +++---- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 59 +++++++++------------- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 11 ++-- 3 files changed, 36 insertions(+), 51 deletions(-) commit f1ea278d6fe00945b21ac9f9f56fd424b719bdea Author: Rex Zhu Date: Thu Jan 26 16:46:22 2017 +0800 drm/amdgpu: move subfunctions to the front of vce_v2_0.c. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 348 +++++++++++++++++----------------- 1 file changed, 171 insertions(+), 177 deletions(-) commit ca6d35031ff08eb2faf7b28115641dc3904609cd Author: Rex Zhu Date: Wed Jan 25 16:50:15 2017 +0800 drm/amdgpu: enable vce pg feature on Kv. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit beeea9819d1b85ea4f4beb09d176de9889079c75 Author: Rex Zhu Date: Thu Jan 26 16:25:05 2017 +0800 drm/amdgpu: refine code for VCE2.0 and related dpm code. v2: clean up vce cg function. use sw cg when vce stoped. 1. implement vce_stop function. 2. not start vce when hw_init. 3. refine vce cg/pg code. 4. delete bypass mode. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 12 ++- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 9 -- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 39 ++------ drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 163 +++++++++++++++++++-------------- 4 files changed, 111 insertions(+), 112 deletions(-) commit 28ed5504ab4b211a4e589e648e5ebd1e0caa7a6a Author: Rex Zhu Date: Wed Jan 25 17:35:14 2017 +0800 drm/amdgpu: when dpm disabled, also need to stop/start vce. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e3e672e6310527123d42ee6353e38c46179653a3 Author: Rex Zhu Date: Fri Jan 20 17:46:34 2017 +0800 drm/amdgpu: refine uvd5.0/6.0 code. 1. delete redundant cg pg mask check. pg mask use to ctrl power on/down uvd. not start/stop uvd. cg mask will be check when enable mgcg. 2. no need to start uvd when initializ. when ring test/ib test/encode, uvd was enabled. when uvd idle, uvd was stopped. 3. chang cg pg sequence in powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 24 +++++++++------------- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 21 ++++++++----------- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 15 ++++++-------- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 12 +++++------ 4 files changed, 30 insertions(+), 42 deletions(-) commit bac601ec00d306728aed18f0a09f10c58d5acaba Author: Rex Zhu Date: Fri Feb 3 17:33:11 2017 +0800 drm/amdgpu: fix uvd can't initialized when dpm disabled on Ci. need to start smc when dpm disabled. otherwise, uvd can't get response from smu. so uvd ring test and ib test will timeout. Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 8b55d17eeea70bd9b6e0711a6230fda10a002e6b Author: Rex Zhu Date: Fri Jan 20 15:56:45 2017 +0800 drm/amdgpu: refine uvd4.2 init/stop code. 1. set uvd_status busy before uvd_start. 2. clear uvd_status to 0 after uvd stop. smu firmware may check uvd_status. 3. wait uvd idle before stop uvd. 4. not start uvd when hw_init. Signed-off-by: Rex Zhu Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 111 +++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 41 deletions(-) commit d01c6236acff6ec460690dd5b040e53435799295 Author: Rex Zhu Date: Fri Jan 20 14:34:43 2017 +0800 drm/amdgpu: refine uvd pg code in kv_dpm.c 1. no need to set cg as use hw dynamic cg. 2. when uvd idle, stop uvd. encode, start uvd. 3. if pg feature enabled, power on/down uvd by smu. 4. drm/amdgpu: dpm do not set uvd pg status. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit 3a78696658a0c99d02efa109758c41d2e060eea0 Author: Rex Zhu Date: Fri Jan 20 15:07:47 2017 +0800 drm/amdgpu: power down/up uvd4 when smu disabled. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit cbd9262f80e71088c8758464f52a38c3c0299ff8 Author: Rex Zhu Date: Wed Jan 25 12:17:59 2017 +0800 drm/amdgpu: add current_pg_status register define for smu7.1 Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_0_1_d.h | 1 + 1 file changed, 1 insertion(+) commit e38ca2b3250f819b7dc12f82204db571232e7921 Author: Rex Zhu Date: Fri Jan 20 12:06:05 2017 +0800 drm/amdgpu: when dpm disabled, also can enable uvd cg/pg. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34da5f5f3bf5c0df1bd5528a98e07bd5a224e9d4 Author: Zach Brown Date: Tue Jan 10 13:30:21 2017 -0600 mtd: nand: set max_bb_per_die and blocks_per_die for ONFI compliant chips ONFI compliant chips contain the values for the max_bb_per_die and blocks_per_die fields in the parameter page. When the ONFI paged is retrieved/parsed the chip's fields are set by the corresponding fields in the param page. Signed-off-by: Zach Brown Acked-by: Boris Brezillon Acked-by: Brian Norris Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 3 +++ 1 file changed, 3 insertions(+) commit 5671842fced7aee1550194f743947953a2f8a27c Author: Zach Brown Date: Tue Jan 10 13:30:20 2017 -0600 mtd: nand: implement 'max_bad_blocks' mtd function Implement the new mtd function 'max_bad_blocks'. Using the chip's max_bb_per_die and blocks_per_die fields to determine the maximum bad blocks to reserve for an MTD. Signed-off-by: Jeff Westfahl Signed-off-by: Zach Brown Acked-by: Boris Brezillon Acked-by: Brian Norris Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit ceb374eb06848212e47fb884964a3ae5e79615b5 Author: Zach Brown Date: Tue Jan 10 13:30:19 2017 -0600 mtd: nand: Add max_bb_per_die and blocks_per_die fields to nand_chip The fields max_bb_per_die and blocks_per_die are useful determining the number of bad blocks a MTD needs to allocate. How they are set will depend on if the chip is ONFI, JEDEC or a full-id entry in the nand_ids table. Signed-off-by: Zach Brown Acked-by: Boris Brezillon Acked-by: Brian Norris Signed-off-by: Brian Norris include/linux/mtd/nand.h | 5 +++++ 1 file changed, 5 insertions(+) commit e70dda0868fad0f74c46df21f7f45fec24f29879 Author: Arnd Bergmann Date: Mon Oct 24 17:28:35 2016 +0200 mtd: ichxrom: maybe-uninitialized with gcc-4.9 pci_read_config_word() might fail and not initialize its output, as pointed out by older versions of gcc when using the -Wmaybe-unintialized flag: drivers/mtd/maps/ichxrom.c: In function ‘ichxrom_cleanup’: drivers/mtd/maps/ichxrom.c:63:2: error: ‘word’ is used uninitialized in this function [-Werror=uninitialized] This is apparently a correct warning, though it does not show up with newer compilers. Changing the code to not attempt to write back uninitialized data into PCI config space is a correct fix for the problem and avoids the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/maps/ichxrom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a974deee477af89411e0f80456bfb344ac433c98 Author: Trond Myklebust Date: Wed Feb 8 11:29:46 2017 -0500 NFSv4: Fix memory and state leak in _nfs4_open_and_get_state If we exit because the file access check failed, we currently leak the struct nfs4_state. We need to attach it to the open context before returning. Fixes: 3efb9722475e ("NFSv4: Refactor _nfs4_open_and_get_state..") Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ccc869169d0c59d288b20ec2b060317f87e08b4 Author: Kinglong Mee Date: Tue Feb 7 21:50:32 2017 +0800 sunrpc: use simple_read_from_buffer for reading cache flush Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker net/sunrpc/cache.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 3f373e81b1e8d26a90523cd12385cbce588f3f18 Author: Kinglong Mee Date: Tue Feb 7 21:49:57 2017 +0800 sunrpc: record rpc client pointer in seq->private directly pos in rpc_clnt_iter is useless, drop it and record clnt in seq_private. Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker net/sunrpc/debugfs.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit 6489a8f41370bcc53dac7107e298179da8c6cc05 Author: Kinglong Mee Date: Tue Feb 7 21:49:17 2017 +0800 sunrpc: update the comments of sunrpc proc path Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker net/sunrpc/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af4926e5619f8a33463f7202f27ba091893ed2ad Author: Kinglong Mee Date: Tue Feb 7 21:48:49 2017 +0800 sunrpc: remove dead codes of cr_magic in rpc_cred Don't found any place using the cr_magic. Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker include/linux/sunrpc/auth.h | 5 ----- net/sunrpc/auth.c | 3 --- net/sunrpc/auth_null.c | 3 --- 3 files changed, 11 deletions(-) commit 5786461bd8ea81433d81297215ee814a9a33ce7a Author: Kinglong Mee Date: Tue Feb 7 21:48:11 2017 +0800 sunrpc: rename NFS_NGROUPS to UNX_NGROUPS for auth unix NFS_NGROUPS has been move to sunrpc, rename to UNX_NGROUPS. Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker include/linux/sunrpc/auth.h | 1 + net/sunrpc/auth_unix.c | 18 ++++++++---------- net/sunrpc/svcauth_unix.c | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) commit 863d7d9c2e0cbbde6cd15f87c4431dd806f2d917 Author: Kinglong Mee Date: Tue Feb 7 21:47:16 2017 +0800 sunrpc/nfs: cleanup procfs/pipefs entry in cache_detail Record flush/channel/content entries is useless, remove them. Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker fs/nfs/cache_lib.c | 3 +-- include/linux/sunrpc/cache.h | 15 +++----------- net/sunrpc/cache.c | 49 +++++++++++++++----------------------------- 3 files changed, 21 insertions(+), 46 deletions(-) commit 2864486bd0fdd14431058650c91fcb9fba605d43 Author: Kinglong Mee Date: Tue Feb 7 21:46:39 2017 +0800 sunrpc: error out if register_shrinker fail register_shrinker may return error when register fail, error out. Signed-off-by: Kinglong Mee Signed-off-by: Anna Schumaker net/sunrpc/auth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 600424e3d91be7c6c8c38b95db713983a6307efa Author: Nicholas Piggin Date: Wed Jan 4 04:22:33 2017 +1000 nfs: no PG_private waiters remain, remove waker Since commit 4f52b6bb ("NFS: Don't call COMMIT in ->releasepage()"), no tasks wait on PagePrivate, so the wake introduced in commit 95905446 ("NFS: avoid deadlocks with loop-back mounted NFS filesystems.") can be removed. Signed-off-by: Nicholas Piggin Signed-off-by: Anna Schumaker fs/nfs/write.c | 2 -- 1 file changed, 2 deletions(-) commit 920b4530fb80430ff30ef83efe21ba1fa5623731 Author: Benjamin Coddington Date: Wed Feb 1 00:00:07 2017 -0500 NFS: nfs_rename() handle -ERESTARTSYS dentry left behind An interrupted rename will leave the old dentry behind if the rename succeeds. Fix this by moving the final local work of the rename to rpc_call_done so that the results of the RENAME can always be handled, even if the original process has already returned with -ERESTARTSYS. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/dir.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 6080ef6e7c0a0592cbcca11200d879faf65e27d4 Author: Jeff Westfahl Date: Tue Jan 10 13:30:17 2017 -0600 mtd: introduce function max_bad_blocks If implemented, 'max_bad_blocks' returns the maximum number of bad blocks to reserve for a MTD. An implementation for NAND is coming soon. Signed-off-by: Jeff Westfahl Signed-off-by: Zach Brown Acked-by: Boris Brezillon Acked-by: Brian Norris Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 10 ++++++++++ include/linux/mtd/mtd.h | 13 +++++++++++++ 2 files changed, 23 insertions(+) commit ce709f86501a013e941e9986cb072eae375ddf3e Author: Jon Mason Date: Fri Jan 27 16:44:09 2017 -0500 PCI: Add Broadcom Northstar2 PAXC quirk for device class and MPSS The Broadcom Northstar2 SoC has a number of quirks for the PAXC (internal/fake) PCI bus. Specifically, the PCI config space is shared between the root port and the first PF (ie., PF0), and a number of fields are tied to zero (thus preventing them from being set). These cannot be "fixed" in device firmware, so we must fix them with a quirk. Signed-off-by: Jon Mason Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d6fc8821c2d2aba4cc18447a467f543e46e7367d Author: Kinglong Mee Date: Wed Feb 8 09:54:42 2017 +0800 SUNRPC/Cache: Always treat the invalid cache as unexpired When the first time pynfs runs after rpc/nfsd startup, always get the warning, "Got error: Connection closed" I found the problem is caused by, 1. A new startup of nfsd, rpc.mountd, etc, 2. A rpc request from client (pynfs test, or normal mounting), 3. An ip_map cache is created but invalid, so upcall to rpc.mountd, 4. rpc.mountd process the ip_map upcall, before write the valid data to nfsd, do auth_reload(), and check_useipaddr(), 5. For the first time, old_use_ipaddr = -1, it causes rpc.mountd do write_flush that doing cache_clean, 6. The ip_map cache will be treat as expired and clean, 7. When rpc.mountd write the valid data to nfsd, a new ip_map is created and updated, the cache_check of old ip_map(doing the upcall) will return -ETIMEDOUT. 8. RPC layer return SVC_CLOSE and close the xprt after commit 4d712ef1db05 "svcauth_gss: Close connection when dropping an incoming message" NeilBrown suggest in another email, "If CACHE_VALID is not set, then there is no data in the cache item, so there is nothing to expire. So it would be nice if cache items that don't have CACHE_VALID are never treated as expired." v3, change the order of the two patches v2, change the checking of CACHE_PENDING to CACHE_VALID Reviewed-by: NeilBrown Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields include/linux/sunrpc/cache.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 471a930ad7d1b868456e835a67169a661ec73f65 Author: Kinglong Mee Date: Wed Feb 8 09:54:33 2017 +0800 SUNRPC: Drop all entries from cache_detail when cache_purge() User always free the cache_detail after sunrpc_destroy_cache_detail(), so, it must cleanup up entries that left in the cache_detail, otherwise, NULL reference may be caused when using the left entries. Also, NeriBrown suggests "write a stand-alone cache_purge()." v3, move the cache_fresh_unlocked() out of write lock, v2, a stand-alone cache_purge(), not only for sunrpc_destroy_cache_detail Signed-off-by: Kinglong Mee Reviewed-by: NeilBrown Signed-off-by: J. Bruce Fields net/sunrpc/cache.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 70bc1b684b49781c882fec44023b37b7b45fe359 Author: Bjorn Helgaas Date: Wed Feb 8 15:42:26 2017 -0600 PCI: versatile: Configure PCIe MPS settings Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-versatile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ec6bd78a09d9967c4fcec53e7fabfaabd4f0e367 Author: Bjorn Helgaas Date: Wed Feb 8 15:37:47 2017 -0600 PCI: xilinx: Configure PCIe MPS settings Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7da0fffb3a4cb76a4869bf12acb750a4f9e2f2c1 Author: Masahiro Yamada Date: Wed Dec 14 09:31:01 2016 +0900 mtd: fix typos in ooblayout comment blocks - "This functions return ..." -> "This function returns ..." - "I you want ..." -> "If you want ..." Signed-off-by: Masahiro Yamada Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/mtdcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d4836ab70d3c59bc934d244f0cccdd035c1ead8 Author: Jon Mason Date: Fri Jan 27 16:44:08 2017 -0500 PCI: iproc: Configure PCIe MPS settings Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. [bhelgaas: changelog] Signed-off-by: Jon Mason Signed-off-by: Bjorn Helgaas Acked-by: Ray Jui drivers/pci/host/pcie-iproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 906b268477bc03daaa04f739844c120fe4dbc991 Author: Arnd Bergmann Date: Fri Feb 3 10:49:17 2017 +0100 mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy kernelci.org reports a warning for this driver, as it copies a local variable into a 'const char *' string: drivers/mtd/maps/pmcmsp-flash.c:149:30: warning: passing argument 1 of 'strncpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] Using kstrndup() simplifies the code and avoids the warning. Signed-off-by: Arnd Bergmann Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/maps/pmcmsp-flash.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 56ff337ea433731fa5f04cf9901404705bbbb6e0 Author: Linus Walleij Date: Sat Jan 28 22:50:48 2017 +0100 mtd: physmap_of: add a hook for Gemini flash probing In order to support device tree probing of Gemini NOR flash chips, a certain register in the syscon needs to be poked to enable parallel flash mode. Such things used to happen in "necessarily different" board file code, and this indeed was also done for the Gemini, so the MTD driver could treat it as any memory-mapped NOR flash, but this is not the way in the future: board files need to go, and hardware concerns distributed down to the applicable drivers. This adds a hook in the same way that the Versatile did: if the Kconfig symbol is not selected the net total of supporting Gemini should be zero bytes of added code. To live up to this promise, also the return value error print from the Versatile extra probe call get to be removed in this patch, all printing need to happen in the add-ons. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/maps/Kconfig | 12 +++- drivers/mtd/maps/Makefile | 5 +- drivers/mtd/maps/physmap_of.c | 9 ++- drivers/mtd/maps/physmap_of_gemini.c | 118 +++++++++++++++++++++++++++++++++++ drivers/mtd/maps/physmap_of_gemini.h | 16 +++++ 5 files changed, 153 insertions(+), 7 deletions(-) commit 5f478e4ea5c5560b4e40eb136991a09f9389f331 Author: Tejun Heo Date: Wed Feb 8 15:19:07 2017 -0500 block: fix double-free in the failure path of cgwb_bdi_init() When !CONFIG_CGROUP_WRITEBACK, bdi has single bdi_writeback_congested at bdi->wb_congested. cgwb_bdi_init() allocates it with kzalloc() and doesn't do further initialization. This usually works fine as the reference count gets bumped to 1 by wb_init() and the put from wb_exit() releases it. However, when wb_init() fails, it puts the wb base ref automatically freeing the wb and the explicit kfree() in cgwb_bdi_init() error path ends up trying to free the same pointer the second time causing a double-free. Fix it by explicitly initilizing the refcnt to 1 and putting the base ref from cgwb_bdi_destroy(). Signed-off-by: Tejun Heo Reported-by: Dmitry Vyukov Fixes: a13f35e87140 ("writeback: don't embed root bdi_writeback_congested in bdi_writeback") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Jens Axboe mm/backing-dev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 40bc941d6559c2fdfceeb33af0750bfc3d04029d Author: John Crispin Date: Tue Dec 20 20:03:26 2016 +0100 mtd: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/maps/lantiq-flash.c | 4 ++-- drivers/mtd/nand/xway_nand.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit df6dd79be8d85ee098433bca23678fab508db541 Author: Ido Schimmel Date: Wed Feb 8 14:36:49 2017 +0100 mlxsw: spectrum_router: Don't reflect LINKDOWN nexthops The kernel resolves the nexthops for a given route using FIB_LOOKUP_IGNORE_LINKSTATE which means a notification can be sent for a route with one of its nexthops being LINKDOWN. In case IGNORE_ROUTES_WITH_LINKDOWN is set for the nexthop netdev, then we shouldn't reflect the nexthop to the device's table. Once the nexthop netdev's carrier goes up we'll be notified using NH_ADD and reflect it to the device. Signed-off-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 b35ba01ea6979125e9c23fb322517748278f15e6 Author: Christoph Hellwig Date: Wed Feb 8 14:46:50 2017 +0100 nvme: support ranged discard requests NVMe supports up to 256 ranges per DSM command, so wire up support for ranged discards up to that limit. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 30 +++++++++++++++++++++++------- include/linux/nvme.h | 2 ++ 2 files changed, 25 insertions(+), 7 deletions(-) commit 1e739730c5b9ea80a2f25e9cf6e1025d47e3d8ed Author: Christoph Hellwig Date: Wed Feb 8 14:46:49 2017 +0100 block: optionally merge discontiguous discard bios into a single request Add a new merge strategy that merges discard bios into a request until the maximum number of discard ranges (or the maximum discard size) is reached from the plug merging code. I/O scheduler merging is not wired up yet but might also be useful, although not for fast devices like NVMe which are the only user for now. Note that for now we don't support limiting the size of each discard range, but if needed that can be added later. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 27 +++++++++++++++++++++++++++ block/blk-merge.c | 5 ++++- block/blk-mq.c | 3 +++ block/blk-settings.c | 20 ++++++++++++++++++++ block/blk-sysfs.c | 12 ++++++++++++ block/blk.h | 2 ++ include/linux/blkdev.h | 26 ++++++++++++++++++++++++++ include/linux/elevator.h | 1 + 8 files changed, 95 insertions(+), 1 deletion(-) commit 34fe7c05400663e01e23cddd1fea68bb7a2b3d29 Author: Christoph Hellwig Date: Wed Feb 8 14:46:48 2017 +0100 block: enumify ELEVATOR_*_MERGE Switch these constants to an enum, and make let the compiler ensure that all callers of blk_try_merge and elv_merge handle all potential values. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 76 +++++++++++++++++++++++++----------------------- block/blk-merge.c | 2 +- block/blk-mq-sched.c | 35 +++++++++++----------- block/blk-mq.c | 32 +++++++++----------- block/blk.h | 2 +- block/cfq-iosched.c | 4 +-- block/deadline-iosched.c | 12 +++----- block/elevator.c | 10 ++++--- block/mq-deadline.c | 2 +- include/linux/elevator.h | 28 ++++++++++-------- 10 files changed, 102 insertions(+), 101 deletions(-) commit 6cf7677f1a94546e472658290b3b8bdbb16cc045 Author: Christoph Hellwig Date: Wed Feb 8 14:46:47 2017 +0100 block: move req_set_nomerge to blk.h This makes it available outside of blk-merge.c, and inlining such a trivial helper seems pretty useful to start with. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-merge.c | 7 ------- block/blk.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit bdf23a9a190d7ecea092fd5c4aabb7d4bd0a9980 Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 17:01:46 2017 -0300 perf thread_map: Correctly size buffer used with dirent->dt_name The size of dirent->dt_name is NAME_MAX + 1, but the size for the 'path' buffer is hard coded at 256, which may truncate it because we also prepend "/proc/", so that all that into account and thank gcc 7 for this warning: /git/linux/tools/perf/util/thread_map.c: In function 'thread_map__new_by_uid': /git/linux/tools/perf/util/thread_map.c:119:39: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 250 [-Werror=format-truncation=] snprintf(path, sizeof(path), "/proc/%s", dirent->d_name); ^~ In file included from /usr/include/stdio.h:939:0, from /git/linux/tools/perf/util/thread_map.c:5: /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 7 and 262 bytes into a destination of size 256 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-csy0r8zrvz5efccgd4k12c82@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b0214b702ad8e124e039a317beeebb3f020d125 Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 17:01:46 2017 -0300 perf top: Use __fallthrough The implicit fall through case label here is intended, so let us inform that to gcc >= 7: CC /tmp/build/perf/builtin-top.o builtin-top.c: In function 'display_thread': builtin-top.c:644:7: error: this statement may fall through [-Werror=implicit-fallthrough=] if (errno == EINTR) ^ builtin-top.c:647:3: note: here default: ^~~~~~~ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lmcfnnyx9ic0m6j0aud98p4e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d64b721d27aef3fbeb16ecda9dd22ee34818ff70 Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 17:01:46 2017 -0300 tools strfilter: Use __fallthrough The implicit fall through case label here is intended, so let us inform that to gcc >= 7: util/strfilter.c: In function 'strfilter_node__sprint': util/strfilter.c:270:6: error: this statement may fall through [-Werror=implicit-fallthrough=] if (len < 0) ^ util/strfilter.c:272:2: note: here case '!': ^~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-z2dpywg7u8fim000hjfbpyfm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/strfilter.c | 1 + 1 file changed, 1 insertion(+) commit 94bdd5edb34e472980d1e18b4600d6fb92bd6b0a Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 17:01:46 2017 -0300 tools string: Use __fallthrough in perf_atoll() The implicit fall through case label here is intended, so let us inform that to gcc >= 7: CC /tmp/build/perf/util/string.o util/string.c: In function 'perf_atoll': util/string.c:22:7: error: this statement may fall through [-Werror=implicit-fallthrough=] if (*p) ^ util/string.c:24:3: note: here case '\0': ^~~~ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-0ophb30v9apkk6o95el0rqlq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/string.c | 2 ++ 1 file changed, 2 insertions(+) commit b5bf1733d6a391c4e90ea8f8468d83023be74a2a Author: Arnaldo Carvalho de Melo Date: Wed Feb 8 17:01:46 2017 -0300 tools include: Add a __fallthrough statement For cases where implicit fall through case labels are intended, to let us inform that to gcc >= 7: CC /tmp/build/perf/util/string.o util/string.c: In function 'perf_atoll': util/string.c:22:7: error: this statement may fall through [-Werror=implicit-fallthrough=] if (*p) ^ util/string.c:24:3: note: here case '\0': ^~~~ So we introduce: #define __fallthrough __attribute__ ((fallthrough)) And use it in such cases. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: William Cohen Link: http://lkml.kernel.org/n/tip-qnpig0xfop4hwv6k4mv1wts5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit d9e1661dab02e62a2ce971cfc2b957ee52f7cdf3 Merge: b05d0cf 9665b74 Author: David S. Miller Date: Wed Feb 8 15:25:19 2017 -0500 Merge branch 'mlxsw-Reflect-nexthop-status-changes' Jiri Pirko says: ==================== mlxsw: Reflect nexthop status changes Ido says: When the kernel forwards IPv4 packets via multipath routes it doesn't consider nexthops that are dead or linkdown. For example, if the nexthop netdev is administratively down or doesn't have a carrier. Devices capable of offloading such multipath routes need to be made aware of changes in the reflected nexthops' status. Otherwise, the device might forward packets via non-functional nexthops, resulting in packet loss. This patchset aims to fix that. The first 11 patches deal with the necessary restructuring in the mlxsw driver, so that it's able to correctly add and remove nexthops from the device's adjacency table. The 12th patch adds the NH_{ADD,DEL} events to the FIB notification chain. These notifications are sent whenever the kernel decides to add or remove a nexthop from the forwarding plane. Finally, the last three patches add support for these events in the mlxsw driver, which is currently the only driver capable of offloading multipath routes. ==================== Signed-off-by: David S. Miller commit 9665b74562ab95bcf1b0684d599bc6779c433fca Author: Ido Schimmel Date: Wed Feb 8 11:16:42 2017 +0100 mlxsw: spectrum_router: Flush resources when RIF is deleted When the last IP address is removed from a netdev, its RIF is deleted. However, if user didn't first remove neighbours and nexthops using this interface, then they would still be present in the device's tables. Therefore, whenever a RIF is deleted, make sure all the neighbours and nexthops (adjacency entries) using it are removed from the relevant tables as well. The action associated with any route using this RIF would be refreshed, most likely to trap. If the kernel decides to remove the route (f.e., because all the nexthops are now DEAD), then an event would be sent, causing the route to be removed from the device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 86 +++++++++++++++++++++- 3 files changed, 93 insertions(+), 3 deletions(-) commit ad178c8eefdd94c946e3b808d8c772541a18b97d Author: Ido Schimmel Date: Wed Feb 8 11:16:40 2017 +0100 mlxsw: spectrum_router: Reflect nexthop status changes When a packet hits a multipath route in the device's routing table, a hash is computed over its headers, which is then used to select the appropriate nexthop from the device's adjacency table. There are situations in which the kernel removes a nexthop from a multipath route (e.g., no carrier) and the device should do the same. Upon the reception of NH_{ADD,DEL} events, add or remove a nexthop from the device's adjacency table and refresh all the routes using the nexthop group. If all the nexthops of a multipath route are invalid, then any packet hitting the route would be trapped to the CPU for forwarding. If all the nexthops are DEAD, then the kernel would remove the route entirely. On the other hand, if all the nexthops are merely LINKDOWN, then the kernel would keep the route and forward any incoming packet using a different route. While the last case might sound like a problem, it's expected that a routing daemon running in user space would remove such a route from the FIB as it's dumped with the DEAD flag set. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) commit 982acb97560c8118c2109504a22b0d78a580547d Author: Ido Schimmel Date: Wed Feb 8 11:16:39 2017 +0100 ipv4: fib: Notify about nexthop status changes When a multipath route is hit the kernel doesn't consider nexthops that are DEAD or LINKDOWN when IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN is set. Devices that offload multipath routes need to be made aware of nexthop status changes. Otherwise, the device will keep forwarding packets to non-functional nexthops. Add the FIB_EVENT_NH_{ADD,DEL} events to the fib notification chain, which notify capable devices when they should add or delete a nexthop from their tables. Cc: Roopa Prabhu Cc: David Ahern Cc: Andy Gospodarek Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller include/net/ip_fib.h | 7 +++++++ net/ipv4/fib_semantics.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 70ad35067c99dd6fb1fefbabf11dd53806f1978c Author: Ido Schimmel Date: Wed Feb 8 11:16:38 2017 +0100 mlxsw: spectrum_router: Use trap action only for some route types The device can have one of three actions associated with a route: 1) Remote - packets continue to the adjacency table 2) Local - packets continue to the neighbour table 3) Trap - packets continue to the CPU The first two actions can also trap packets to the CPU, but they do so using a different trap ID, which has a lower traffic class and less allotted bandwidth. We currently use the third action for both RTN_{LOCAL,BROADCAST} routes and RTN_UNICAST routes not pointing to the switch ports. However, packets that merely need to be forwarded by the switch are likely not control packets and can be therefore scheduled towards the CPU using a lower traffic class. Achieve the above by assigning the third action only to local and broadcast routes and have any other route use either of the first two actions, based on whether the route is gatewayed or not. This will also allow us to refresh routes using the local action and have them trap packets when their RIF is no longer valid following a NH_DEL event. One side effect of this patch is that we no longer give special treatment to multipath routes using both switch and non-switch ports towards their nexthops. If at least one of the nexthops can be resolved, then the device will forward the packets instead of trapping them. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 42 +++++++--------------- 1 file changed, 13 insertions(+), 29 deletions(-) commit 4b4114775143db27371cc4da500ea44e7601955f Author: Ido Schimmel Date: Wed Feb 8 11:16:37 2017 +0100 mlxsw: spectrum_router: Determine offload status using generic function The previous patch introduced a generic function to determine whether a route should be offloaded or not. Make use of it here. In the future we're going to add more conditions to this test (e.g., whether TOS is non-zero), so it makes sense to centralize it instead of open coding it in a few places. 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 013b20f953ab011ffb5d203a07b981bad16342f4 Author: Ido Schimmel Date: Wed Feb 8 11:16:36 2017 +0100 mlxsw: spectrum_router: More accurately set offload flag We currently set the RTNH_F_OFFLOAD flag for all routes using remote action, but this isn't always correct. If none of the nexthops associated with a gatewayed route can be offloaded into the device, then any packet hitting it would be trapped to the CPU and forwarded by the kernel. Solve this by pushing the setting of the offload flag to after the route was programmed into the device, thereby allowing us to take all the parameters into account. This change will also help us further in the patchset, when we refresh routes following the reception of NH_{ADD,DEL} events. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 100 ++++++++++++++++----- 1 file changed, 80 insertions(+), 20 deletions(-) commit a8c9701427987d959fec3f99bb2811d943686b7b Author: Ido Schimmel Date: Wed Feb 8 11:16:35 2017 +0100 mlxsw: spectrum_router: Refactor nexthop init routine The nexthop init and de-init functions both have symmetric parts concerned with the reflection of the neighbour entry into the device's adjacency table, in case it's used by a gatewayed route. These sections of code also need to be called when a nexthop is marked as valid / invalid following NH_{ADD,DEL} events. Break these out into appropriate functions, so that they could be invoked following the reception of above events. Signed-off-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, 49 insertions(+), 31 deletions(-) commit c8b030774f43a816e287e50581fe84e8ea905c44 Author: Ido Schimmel Date: Wed Feb 8 11:16:34 2017 +0100 mlxsw: spectrum_router: Remove FIB info from FIB entry struct After the previous changes, the FIB info is embedded in every nexthop group struct, which in turn is embedded in every FIB entry struct. We can therefore safely remove the FIB info from the entry struct. This has the added advantage of making the router-related structs more generic and suitable for use with IPv6 offloads. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b8399a1e5ad86807cee52b65820ffa543c8d66d0 Author: Ido Schimmel Date: Wed Feb 8 11:16:33 2017 +0100 mlxsw: spectrum_router: Store routes in a more generic way Up until now, the only FIB entries that were associated with a nexthop group were routes to remote networks where all the nexthop devices had a valid router interface (RIF). This is in contrast to the FIB code, where all the routes are associated with a FIB info. The same design choice needs to be applied to the driver's cache. Based on the NH_{ADD,DEL} events which will be added later in the patchset, we need to be able to change the action (forward / trap) associated with all the routes using the nexthop group. However, if we can't link between the nexthop and the routes using it, then the above is impossible. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 40 +++++++++++++++------- 1 file changed, 27 insertions(+), 13 deletions(-) commit b3e8d1ebad2d041d3226ce283451bc9d38cf5870 Author: Ido Schimmel Date: Wed Feb 8 11:16:32 2017 +0100 mlxsw: spectrum_router: Add gateway indication to nexthop group The next patch is going to generalize the way in which we store routes. Instead of attaching a nexthop group only to gatewayed routes, one will be attached to each route, in a similar way to the way the FIB code stores its routes. The above means that any function operating on a nexthop group cannot assume the group represents only gatewayed nexthops. One such function is the one that refreshes a nexthop group and updates the adjacency table following nexthop changes. For a nexthop group that doesn't represent any gateways this function would essentially be a NOP, but it would be useful if it did update the action associated with any route using it. This will allow us to later consolidate code paths when a nexthop changes following NH_{ADD,DEL} events. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d55409cb2858701292bbff7b3712d3beaefc17fe Author: Ido Schimmel Date: Wed Feb 8 11:16:31 2017 +0100 mlxsw: spectrum_router: Use nexthop's scope to set action type We currently use the scope of the FIB info to distinguish between a direct unicast route and a gatewayed one. However, the kernel is perfectly happy to configure a route with scope UNIVERSE to a directly connected network. Instead, we can rely on the first nexthop's scope to check if the route is gatewayed or not. 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 c53b8e1b5a6a84da753d8b19c4f59fd8b693d579 Author: Ido Schimmel Date: Wed Feb 8 11:16:30 2017 +0100 mlxsw: spectrum_router: Store nexthops in a hash table Later in the patchset we'll add the NH_{ADD,DEL} events which will let us know when a nexthop is considered to be dead. Based on these events we need to be able to add or remove the nexthop from the device's tables. Therefore, store the private nexthop structs in a hash table and use the kernel's fib_nh struct as the key, so that we'll be able to easily find them when the events are received. Signed-off-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 | 58 ++++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) commit e9ad5e7d8d3cf55ceb204b0f7a26c89bfd4b41fe Author: Ido Schimmel Date: Wed Feb 8 11:16:29 2017 +0100 mlxsw: spectrum_router: Store nexthop groups in a hash table Currently, when we're notified about a new RTN_UNICAST route we perform a lookup on the nexthop group list looking for a group with a matching configuration to that found in the FIB info. This is quite inefficient. Instead, we can simply rely on the kernel to consolidate several FIB configurations into the same FIB info and use the FIB info as the key for our private nexthop group struct. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 104 +++++++++++---------- 2 files changed, 54 insertions(+), 52 deletions(-) commit e58be79e2dc818b0e2b3c69ea3d3fefcbc8c709b Author: Ido Schimmel Date: Wed Feb 8 11:16:28 2017 +0100 mlxsw: spectrum_router: Nullify nexthop's neigh pointer When we invalidate a nexthop we should also invalidate its neighbour entry pointer as it might be destroyed later on. This makes the nexthop de-init function symmetric with its init and also ensures nobody will try to access the neighbour entry. Signed-off-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 0e517c93dc027e49d4523fe32631606b12f0752d Author: Johan Hovold Date: Wed Feb 8 18:53:09 2017 +0100 USB: serial: console: clean up sanity checks Drop two redundant NULL checks from usb_serial_console_disconnect(). The usb_serial_console_disconnect function is called from the USB-serial-device disconnect callback when a device is going away. Hence there is no need to check for the serial-device pointer being NULL. The serial-device port pointers are stored in an array that is a member of the serial struct so the address of the first member of the array (which the array name decays to) is never NULL either. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 14816b16fa0adac24f82492f18fa62c55acabbbe Author: Johan Hovold Date: Wed Feb 8 18:53:08 2017 +0100 USB: serial: console: fix uninitialised spinlock Since commit 4a510969374a ("tty: Make tty_files_lock per-tty") a new tty_struct spin lock is taken in the tty release path, but the USB-serial-console hack was never updated hence leaving the lock of its "fake" tty uninitialised. This was eventually detected by lockdep. Make sure to initialise the new lock also for the fake tty to address this regression. Yes, this code is a mess, but cleaning it up is left for another day. Fixes: 4a510969374a ("tty: Make tty_files_lock per-tty") Cc: stable # 4.6 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/console.c | 1 + 1 file changed, 1 insertion(+) commit b05d0cfa1932376dc388a0fe67564572a84374a3 Author: Jiri Pirko Date: Wed Feb 8 10:39:16 2017 +0100 mlxsw: acl: Fix mlxsw_afa_block_commit error path No rollback is needed since the chain is in consistent state and mlxsw_afa_block_destroy() will take care of putting it away. So remove the one we have now which is wrong. Also move the set of 'finished' flag to the beginning of the function, because the block is certainly unusable for future action addition no matter if the function succeeds or not. Reported-by: Dan Carpenter Fixes: 4cda7d8d7098 ("mlxsw: core: Introduce flexible actions support") Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit f790eb57e6ec8d77489755cc25a51c4409e2f590 Author: Alex Williamson Date: Wed Feb 8 13:13:25 2017 -0700 vfio/mdev: Use a module softdep for vfio_mdev Use an explicit module softdep rather than a request module call such that the dependency is exposed to userspace. This allows us to more easily support modules loaded at initrd time. Reviewed by: Kirti Wankhede Signed-off-by: Alex Williamson drivers/vfio/mdev/mdev_core.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit d88423f7844ea9941d55bde92716a50c3e131dd7 Author: Michael Ellerman Date: Wed Feb 8 13:13:25 2017 -0700 vfio: Fix build break when SPAPR_TCE_IOMMU=n Currently the kconfig logic for VFIO_IOMMU_SPAPR_TCE and VFIO_SPAPR_EEH is broken when SPAPR_TCE_IOMMU=n. Leading to: warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU) warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU) drivers/vfio/vfio_iommu_spapr_tce.c:113:8: error: implicit declaration of function 'mm_iommu_find' This stems from the fact that VFIO selects VFIO_IOMMU_SPAPR_TCE, and although it has an if clause, the condition is not correct. We could fix it by doing select VFIO_IOMMU_SPAPR_TCE if SPAPR_TCE_IOMMU, but the cleaner fix is to drop the selects and tie VFIO_IOMMU_SPAPR_TCE to the value of VFIO, and express the dependencies in only once place. Do the same for VFIO_SPAPR_EEH. The end result is that the values of VFIO_IOMMU_SPAPR_TCE and VFIO_SPAPR_EEH follow the value of VFIO, except when SPAPR_TCE_IOMMU=n and/or EEH=n. Which is exactly what we want to happen. Signed-off-by: Michael Ellerman Signed-off-by: Alex Williamson drivers/vfio/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9a9a7a572709487acb0d2de83b375e8fbb4f9d91 Merge: c502faf a6a3e02 Author: David S. Miller Date: Wed Feb 8 15:11:28 2017 -0500 Merge branch 'stmmac-cleanups' Corentin Labbe says: ==================== net: stmmac: misc fix I am currently working on dwmac-sun8i glue driver for Allwinner H3/A83T/A64. This series is the result of all minor problem found in the stmmac driver. All patch are tested on cubieboard2 via dwmac-sunxi and on pine64/orangepis via dwmac-sun8i. Changes since v1: - Removed netdev_dbg() in "net: stmmac: print phy information" - Removed patch "net: stmmac: Implement NAPI for TX", it will be reworked - Changed error message in "Correct the error message about invalid speed" - Added some acked-by ==================== Signed-off-by: David S. Miller commit a6a3e026f0d358904afd3df6b7f952ed8ea5b942 Author: LABBE Corentin Date: Wed Feb 8 09:31:21 2017 +0100 net: stmmac: replace unsigned by u32 checkpatch complains about two unsigned without type after. Since the value return is u32, it is simpler to replace it by u32 instead of "unsigned int" Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64679e565a4a099c5d5dc2ecf103dcaf039ef8c7 Author: LABBE Corentin Date: Wed Feb 8 09:31:20 2017 +0100 net: stmmac: remove unused variable in sysfs_display_ring The u64 x variable in sysfs_display_ring is unused. This patch remove it. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 --- 1 file changed, 3 deletions(-) commit 732fe78c0785aa8f1ff40a06a2fd5eb221a81157 Author: LABBE Corentin Date: Wed Feb 8 09:31:19 2017 +0100 net: stmmac: remove dead code in stmmac_tx_clean Since commit cf32deec16e4 ("stmmac: add tx_skbuff_dma to save descriptors used by PTP"), the struct dma_desc *p in stmmac_tx_clean was not used at all. This patch remove this dead code. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ------- 1 file changed, 7 deletions(-) commit b05c76a1f8fe708cd998042a5b0479aef7f2e70b Author: LABBE Corentin Date: Wed Feb 8 09:31:18 2017 +0100 net: stmmac: print phy information When a PHY is found, printing which one was found (and which type/model) is a good information to know. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e0a76606d6f0dfdb0954ddb2da2c8809329054d6 Author: LABBE Corentin Date: Wed Feb 8 09:31:17 2017 +0100 net: stmmac: rename rx_crc to rx_crc_errors The ethtool stat counter rx_crc from stmmac is mis-named, the name seems to speak about the number of RX CRC done, but in fact it is about errors. This patch rename it to rx_crc_errors, just like the same ifconfig counter. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 +- drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 2 +- drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 662ec2b7e842c0bb1ef482060497c44afa3f1037 Author: LABBE Corentin Date: Wed Feb 8 09:31:16 2017 +0100 net: stmmac: Rewrite two test against NULL value This patch rewrite two test against NULL value with correct style. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cba920affb7e7326aaea998797c76aa4989c130f Author: LABBE Corentin Date: Wed Feb 8 09:31:15 2017 +0100 net: stmmac: Correct the error message about invalid speed The message about invalid speed does not state 1000 as a valid speed. It is much simpler to said that the speed is invalid. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b2a8315a5c655ffa5b9330dfba2496e8f0a5d7ad Author: LABBE Corentin Date: Wed Feb 8 09:31:14 2017 +0100 net: stmmac: replace ENOSYS by EINVAL As said by checkpatch ENOSYS means 'invalid syscall nr' and nothing else. This patch replace ENOSYS by the more appropriate value EINVAL. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a70aeca80c2425b60ff821140b5b5c141e28ba1 Author: LABBE Corentin Date: Wed Feb 8 09:31:13 2017 +0100 net: stmmac: Use readl_poll_timeout The dwmac_dma_reset function use an open coded of readl_poll_timeout(). Replace the open coded handling with the proper function. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a5f48adc316aa21944c19019583fb9933af01b9a Author: LABBE Corentin Date: Wed Feb 8 09:31:12 2017 +0100 net: stmmac: replace stmmac_mdio_busy_wait by readl_poll_timeout The stmmac_mdio_busy_wait() function do the same job than readl_poll_timeout(). So is is better to replace it. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 33 ++++++++--------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit efd89b60a35d6ab0bfdd24348a0b6dbe7118aee4 Author: LABBE Corentin Date: Wed Feb 8 09:31:11 2017 +0100 net: stmmac: fix some code style problem Checkpatch complains about some code style problem on stmmac_mdio.c. This patch fix them. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bbf892849678ff9e25590cbf78d0202e35d7e41d Author: LABBE Corentin Date: Wed Feb 8 09:31:10 2017 +0100 net: stmmac: remplace asm/io.h by linux/io.h This patch fix the checkpatch warning about asm/io.h. Sorting all includes in the process. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit deeb6376caeeab38d2cf616aea6f2ca3a4ecf0ed Author: LABBE Corentin Date: Wed Feb 8 09:31:09 2017 +0100 net: stmmac: remove freesoftware address This patch fix the checkpatch warning about free software address. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/common.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/descs.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/descs_com.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac100.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/mmc.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 ---- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 4 ---- 26 files changed, 104 deletions(-) commit 8d45e42babb1c7b1a1974cc7c4582efcaba11a35 Author: LABBE Corentin Date: Wed Feb 8 09:31:08 2017 +0100 net: stmmac: fix some typos in comments This patch fix some typos in comments. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 6 +++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++-------- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) commit 6a2cac549b368960c9cd6a993f2f2cc6d720e935 Author: LABBE Corentin Date: Wed Feb 8 09:31:07 2017 +0100 net: stmmac: Remove the bus_setup function pointer The bus_setup function pointer is not used at all, this patch remove it. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ---- include/linux/stmmac.h | 1 - 2 files changed, 5 deletions(-) commit 280892226ba25289519c685a6d25ba2670f2d851 Author: LABBE Corentin Date: Wed Feb 8 09:31:06 2017 +0100 net: stmmac: fix the typo on MAC_RNABLE_RX the define MAC_RNABLE_RX have a typo, rename it to MAC_ENABLE_RX Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 168316db3583253b9e5d46392e5b9d03d531406f Author: Christoph Hellwig Date: Wed Feb 8 14:43:13 2017 -0500 dax: assert that i_rwsem is held exclusive for writes Make sure all callers follow the same locking protocol, given that DAX transparantly replaced the normal buffered I/O path. Signed-off-by: Christoph Hellwig Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/dax.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 81fa3275f95ac357188fe3ca81b8e7c75360c88d Author: Chuck Lever Date: Tue Feb 7 11:59:04 2017 -0500 svcrdma: Poll CQs in "workqueue" mode svcrdma calls svc_xprt_put() in its completion handlers, which currently run in IRQ context. However, svc_xprt_put() is meant to be invoked in process context, not in IRQ context. After the last transport reference is gone, it directly calls a transport release function that expects to run in process context. Change the CQ polling modes to IB_POLL_WORKQUEUE so that svcrdma invokes svc_xprt_put() only in process context. As an added benefit, bottom half-disabled spin locking can be eliminated from I/O paths. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 6 +++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit a3ab867fa64f9aedb3b01d570db5b43d2fc355fc Author: Chuck Lever Date: Tue Feb 7 11:58:56 2017 -0500 svcrdma: Combine list fields in struct svc_rdma_op_ctxt Clean up: The free list and the dto_q list fields are never used at the same time. Reduce the size of struct svc_rdma_op_ctxt by combining these fields. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 3 +-- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 14 ++++++-------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 33 +++++++++++++++----------------- 3 files changed, 22 insertions(+), 28 deletions(-) commit aba7d14ba18c93a2ab37d50b057a885964ef285c Author: Chuck Lever Date: Tue Feb 7 11:58:48 2017 -0500 svcrdma: Remove unused sc_dto_q field Clean up. Commit be99bb11400c ("svcrdma: Use new CQ API for RPC-over-RDMA server send CQs") removed code that used the sc_dto_q field, but neglected to remove sc_dto_q at the same time. Fixes: be99bb11400c ("svcrdma: Use new CQ API for RPC-over- ...") Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 1 - net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 - 2 files changed, 2 deletions(-) commit c2ccf64a6c4bf3bcbf4e6e6b94a51500991022a1 Author: Chuck Lever Date: Tue Feb 7 11:58:40 2017 -0500 svcrdma: Clean up backchannel send header encoding Replace C structure-based XDR decoding with pointer arithmetic. Pointer arithmetic is considered more portable. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 647e18e3bd0308b38d5341fc08cd70ed1ce28a71 Author: Chuck Lever Date: Tue Feb 7 11:58:32 2017 -0500 svcrdma: Clean up RPC-over-RDMA Call header decoder Replace C structure-based XDR decoding with pointer arithmetic. Pointer arithmetic is considered more portable. Rename the "decode" functions. Nothing is decoded here, they perform only transport header sanity checking. Use existing XDR naming conventions to help readability. Straight-line the hot path: - relocate the dprintk call sites out of line - remove unnecessary byte-swapping - reduce count of conditional branches Deprecate RDMA_MSGP. It's not properly spec'd by RFC5666, and therefore never used by any V1 client. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_marshal.c | 232 +++++++++++---------------------- 1 file changed, 79 insertions(+), 153 deletions(-) commit 98fc21d3bfd55a36ce9eb7b32d1ce146f0d1696d Author: Chuck Lever Date: Tue Feb 7 11:58:23 2017 -0500 svcrdma: Clean up RPC-over-RDMA Reply header encoder Replace C structure-based XDR decoding with pointer arithmetic. Pointer arithmetic is considered more portable, and is used throughout the kernel's existing XDR encoders. The gcc optimizer generates similar assembler code either way. Byte-swapping before a memory store on x86 typically results in an instruction pipeline stall. Avoid byte-swapping when encoding a new header. svcrdma currently doesn't alter a connection's credit grant value after the connection has been accepted, so it is effectively a constant. Cache the byte-swapped value in a separate field. Christoph suggested pulling the header encoding logic into the only function that uses it. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 7 ++----- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 18 +----------------- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 19 ++++++++++++------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 + 4 files changed, 16 insertions(+), 29 deletions(-) commit cbaf58032efca401834518b905f528ac912449e4 Author: Chuck Lever Date: Tue Feb 7 11:58:15 2017 -0500 svcrdma: Another sendto chunk list parsing update Commit 5fdca6531434 ("svcrdma: Renovate sendto chunk list parsing") missed a spot. svc_rdma_xdr_get_reply_hdr_len() also assumes the Write list has only one Write chunk. There's no harm in making this code more general. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/rpc_rdma.h | 9 +++++++ include/linux/sunrpc/svc_rdma.h | 2 +- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 49 ++++++++++++++++++---------------- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 ++- 4 files changed, 38 insertions(+), 25 deletions(-) commit 92004a064875e45f0ceec72f6962e258e59f0682 Author: Jaehoon Chung Date: Mon Jan 16 15:31:38 2017 +0900 PCI: exynos: Remove duplicated code Remove duplicated register reads and writes. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit c502faf94153bd0fedc5389a936f728a659cc6ab Author: Daniel Borkmann Date: Wed Feb 8 01:19:43 2017 +0100 bpf, lpm: fix overflows in trie_alloc checks Cap the maximum (total) value size and bail out if larger than KMALLOC_MAX_SIZE as otherwise it doesn't make any sense to proceed further, since we're guaranteed to fail to allocate elements anyway in lpm_trie_node_alloc(); likleyhood of failure is still high for large values, though, similarly as with htab case in non-prealloc. Next, make sure that cost vars are really u64 instead of size_t, so that we don't overflow on 32 bit and charge only tiny map.pages against memlock while allowing huge max_entries; cap also the max cost like we do with other map types. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/lpm_trie.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 2681c0e7ff70a6d41a81527f95f2edabafea4ace Author: Jaehoon Chung Date: Mon Jan 16 15:31:37 2017 +0900 PCI: exynos: Use the bitops BIT() macro to build bitmasks Use the bitops BIT() macro to build bitmasks. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit ff5462e39ca1d27e530d088c4e38741fd9cddad4 Author: Christoph Hellwig Date: Wed Feb 8 14:39:27 2017 -0500 ext4: fix DAX write locking Unlike O_DIRECT DAX is not an optional opt-in feature selected by the application, so we'll have to provide the traditional synchronіzation of overlapping writes as we do for buffered writes. This was broken historically for DAX, but got fixed for ext2 and XFS as part of the iomap conversion. Fix up ext4 as well. Signed-off-by: Christoph Hellwig Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/file.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 8ef9594764617e3fd4500205b080b53c45c14c4b Author: Roopa Prabhu Date: Tue Feb 7 16:12:00 2017 -0800 bridge: vlan tunnel id info range fill size calc cleanups This fixes a bug and cleans up tunnelid range size calculation code by using consistent variable names and checks in size calculation and fill functions. tested for a few cases of vlan-vni range mappings: (output from patched iproute2): $bridge vlan showtunnel port vid tunid vxlan0 100-105 1000-1005 200 2000 210 2100 211-213 2100-2102 214 2104 216-217 2108-2109 219 2119 Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Reported-by: Colin Ian King Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_netlink_tunnel.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 7a5980f9c0066d085319415ec15ee51f165111f5 Author: Mickaël Salaün Date: Tue Feb 7 21:56:05 2017 +0100 tools lib bpf: Add missing header to the library Include stddef.h to define size_t. Signed-off-by: Mickaël Salaün Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Joe Stringer Link: http://lkml.kernel.org/r/20170207205609.8035-2-mic@digikod.net Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/bpf.h | 1 + 1 file changed, 1 insertion(+) commit e3538f402453beca2d83002910cfe13b43d8a95b Author: Jaehoon Chung Date: Mon Jan 16 15:31:36 2017 +0900 PCI: exynos: Remove unnecessary local variables Remove unnecessary local variables: elbi_base, phy_base, block_base. We need one resource structure for assigning each resource. Reuse the single 'res' variable for all. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 76667024171a2d6811c5ddbe42a8f675987ad8a1 Author: Andi Kleen Date: Mon Oct 10 09:33:59 2016 -0700 perf vendor events intel: Add uncore events for Broadwell DE This is not a full uncore event list, but a short list of useful and understandable metrics. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/uncore-cache.json | 317 +++++++++++++++++++++ .../arch/x86/broadwellde/uncore-memory.json | 83 ++++++ .../arch/x86/broadwellde/uncore-power.json | 84 ++++++ 3 files changed, 484 insertions(+) commit 97e219b7c1f75b14b29abe28ad53e8709e8d15e5 Author: Eric Dumazet Date: Tue Feb 7 15:37:15 2017 -0800 gro_cells: move to net/core/gro_cells.c We have many gro cells users, so lets move the code to avoid duplication. This creates a CONFIG_GRO_CELLS option. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/Kconfig | 3 ++ include/net/gro_cells.h | 86 +++------------------------------------------ net/Kconfig | 4 +++ net/core/Makefile | 1 + net/core/gro_cells.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/Kconfig | 1 + net/ipv6/Kconfig | 1 + net/xfrm/Kconfig | 1 + 8 files changed, 107 insertions(+), 82 deletions(-) commit 22c8e5526b7bf33840c20b4e717e6560e5dfb294 Author: Andi Kleen Date: Mon Sep 19 09:36:31 2016 -0700 perf vendor events intel: Add uncore events for Xeon Phi (Knights Landing) Add metrics for memory and MCDRAM. Minimal metrics only for now. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/knightslanding/uncore-memory.json | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit dd32cb5d8fd42316bf8c2b9f7e5c51a38625f755 Author: Andi Kleen Date: Sat Sep 17 18:10:03 2016 -0700 perf vendor events intel: Add uncore events for Sandy Bridge Server This is not a full uncore event list, but a short list of useful and understandable metrics. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/jaketown/uncore-cache.json | 209 +++++++++++++++++ .../arch/x86/jaketown/uncore-interconnect.json | 46 ++++ .../arch/x86/jaketown/uncore-memory.json | 79 +++++++ .../pmu-events/arch/x86/jaketown/uncore-power.json | 248 +++++++++++++++++++++ 4 files changed, 582 insertions(+) commit d6da7d90fad8e34afdebeadbb08484ea4c98a792 Author: Jaehoon Chung Date: Mon Jan 16 15:31:35 2017 +0900 PCI: exynos: Replace the *_blk/*_phy/*_elb accessors There is no reason to maintain *_blk/phy/elbi_* as register accessors. They can be replaced by one accessor to make maintenance easier. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 184 +++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 102 deletions(-) commit 6b138c7b14d6134bed2419ccf7573b87e7a064b0 Author: Andi Kleen Date: Sat Sep 17 18:09:40 2016 -0700 perf vendor events intel: Add uncore events for IvyBridge Server This is not a full uncore event list, but a short list of useful and understandable metrics. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/ivytown/uncore-cache.json | 322 +++++++++++++++++++++ .../arch/x86/ivytown/uncore-interconnect.json | 46 +++ .../pmu-events/arch/x86/ivytown/uncore-memory.json | 75 +++++ .../pmu-events/arch/x86/ivytown/uncore-power.json | 249 ++++++++++++++++ 4 files changed, 692 insertions(+) commit 949c84efcac9662b1df520675cdfce07273f4d59 Author: Andi Kleen Date: Sat Sep 17 18:09:21 2016 -0700 perf vendor events intel: Add uncore events for Broadwell Server This is not a full uncore event list, but a short list of useful and understandable metrics. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellx/uncore-cache.json | 317 +++++++++++++++++++++ .../arch/x86/broadwellx/uncore-interconnect.json | 28 ++ .../arch/x86/broadwellx/uncore-memory.json | 83 ++++++ .../arch/x86/broadwellx/uncore-power.json | 84 ++++++ 4 files changed, 512 insertions(+) commit 7003f00fdb7b44662e8b47ebaf8ff6ce554df4bb Author: Andi Kleen Date: Sat Sep 17 18:08:45 2016 -0700 perf vendor events intel: Add uncore events for Haswell Server processor This is not a full uncore event list, but a short list of useful and understandable metrics. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-c0cix4eprbldfrx5zf60suvh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/haswellx/uncore-cache.json | 317 +++++++++++++++++++++ .../arch/x86/haswellx/uncore-interconnect.json | 28 ++ .../arch/x86/haswellx/uncore-memory.json | 83 ++++++ .../pmu-events/arch/x86/haswellx/uncore-power.json | 84 ++++++ 4 files changed, 512 insertions(+) commit 22f090a4b15bf08aab30d8bcdc93d6dc9d07c9a7 Author: Linus Walleij Date: Sun Jan 22 13:21:19 2017 +0100 mtd: add DT bindings for the Cortina Systems Gemini Flash This adds device tree bindings for the Cortina systems Gemini flash controller, a simple physmap which however need a few syscon bits to be poked to operate properly. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Brian Norris .../bindings/mtd/cortina,gemini-flash.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 40710cf9ad234778eb8b10ef07d922f435005cf7 Author: Philippe Reynes Date: Wed Feb 8 00:07:33 2017 +0100 net: mellanox: switchx2: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 47 ++++++++++++++++---------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 8ed81ec82a8c57c3a6ad69b4c4d3e4801163c256 Author: Lucas Stach Date: Thu Feb 2 18:15:31 2017 +0100 PCI: mvebu: Change delay after reset to the PCIe spec mandated 100ms The current default of 20ms cause some devices, which are slow to initialize, to not show up during the bus scanning. Change this to the PCIe spec mandated 100ms and document this in the DT binding. From PCIe base spec rev 3.0, chapter "6.6.1. Conventional Reset": To allow components to perform internal initialization, system software must wait a specified minimum period following the end of a Conventional Reset of one or more devices before it is permitted to issue Configuration Requests to those devices. With a Downstream Port that does not support Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms before sending a Configuration Request to the device immediately below that Port. Signed-off-by: Lucas Stach Signed-off-by: Bjorn Helgaas Acked-by: Jason Cooper Documentation/devicetree/bindings/pci/mvebu-pci.txt | 3 ++- drivers/pci/host/pci-mvebu.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 76624175dcae6f7a808d345c0592908a15ca6975 Author: Mark Rutland Date: Tue Feb 7 12:33:55 2017 +0000 arm64: uaccess: consistently check object sizes Currently in arm64's copy_{to,from}_user, we only check the source/destination object size if access_ok() tells us the user access is permissible. However, in copy_from_user() we'll subsequently zero any remainder on the destination object. If we failed the access_ok() check, that applies to the whole object size, which we didn't check. To ensure that we catch that case, this patch hoists check_object_size() to the start of copy_from_user(), matching __copy_from_user() and __copy_to_user(). To make all of our uaccess copy primitives consistent, the same is done to copy_to_user(). Cc: Catalin Marinas Acked-by: Kees Cook Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21bdbb7102edeaebb5ec4ef530c8f442f7562c96 Author: Neil Leeder Date: Tue Feb 7 13:14:04 2017 -0500 perf: add qcom l2 cache perf events driver Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Reviewed-by: Mark Rutland Signed-off-by: Neil Leeder [will: minimise nesting in l2_cache_associate_cpu_with_cluster] [will: use kstrtoul for unsigned long, remove redunant .owner setting] Signed-off-by: Will Deacon Documentation/perf/qcom_l2_pmu.txt | 38 ++ drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/qcom_l2_pmu.c | 1013 ++++++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 5 files changed, 1062 insertions(+) commit cbda794cf1bb2f4a2e75e11fda1f89457169772e Merge: 514612f 0c8d0a4 Author: Kalle Valo Date: Wed Feb 8 21:28:36 2017 +0200 Merge tag 'iwlwifi-next-for-kalle-2017-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Some patches focusing on bugfixes for v4.11: * Fix 802.11w, which was failing to due an IGTK bug; * A few more bugzilla bug fixes; * A channel-switch race condition fix; * Some fixes related to suspend/resume with new HW; * The RF-kill saga continues; * And some other fixes here and there... commit be5e5099183301fb7920f8f6b66bd3ac1f820a97 Author: Rafał Miłecki Date: Mon Jan 16 17:28:18 2017 +0100 mtd: bcm47xxsflash: use platform_(set|get)_drvdata We have generic place & helpers for storing platform driver data so there is no reason for using custom priv pointer. This allows cleaning up struct bcma_sflash from unneeded fields. Signed-off-by: Rafał Miłecki Acked-by: Kalle Valo Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/devices/bcm47xxsflash.c | 6 +++--- include/linux/bcma/bcma_driver_chipcommon.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) commit 2f7db55579943cb7723e7567bd9b9927d3777d29 Author: Arnaldo Carvalho de Melo Date: Tue Feb 7 16:15:21 2017 -0300 perf tools: Fix include of linux/mman.h It was using uapi/linux/mmap.h which caused for at least one reporter, that hasn't specified in what environment the problem manifests itself: ---- The original error is: In file included from util/event.c:2:0: ...tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory #include ^ compilation terminated. ---- Test built it on these containers: # dm 1 alpine:3.4: Ok 2 android-ndk:r12b-arm: Ok 3 archlinux:latest: Ok 4 centos:5: Ok 5 centos:6: Ok 6 centos:7: Ok 7 debian:7: Ok 8 debian:8: Ok 9 debian:experimental: Ok 10 debian:experimental-x-arm64: Ok 11 debian:experimental-x-mips: Ok 12 debian:experimental-x-mips64: Ok 13 debian:experimental-x-mipsel: Ok 14 fedora:20: Ok 15 fedora:21: Ok 16 fedora:22: Ok 17 fedora:23: Ok 18 fedora:24: Ok 19 fedora:24-x-ARC-uClibc: Ok 20 fedora:25: Ok 21 fedora:rawhide: Ok 22 mageia:5: Ok 23 opensuse:13.2: Ok 24 opensuse:42.1: Ok 25 opensuse:tumbleweed: Ok 26 ubuntu:12.04.5: Ok 27 ubuntu:14.04.4-x-linaro-arm64: Ok 28 ubuntu:15.10: Ok 29 ubuntu:16.04: Ok 30 ubuntu:16.04-x-arm: Ok 31 ubuntu:16.04-x-arm64: Ok 32 ubuntu:16.04-x-powerpc: Ok 33 ubuntu:16.04-x-powerpc64: Ok 34 ubuntu:16.04-x-powerpc64el: Ok 35 ubuntu:16.04-x-s390: Ok 36 ubuntu:16.10: Ok Reported-by: David Carrillo-Cisneros Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Michal Marek Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Uwe Kleine-König Cc: Wang Nan Fixes: fbef103fad50 ("perf tools: Do hugetlb handling in more systems") Link: http://lkml.kernel.org/n/tip-4wm5xmjz5wgbq7ucyz4dyd72@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c19bd6c52d441893ba19b3418825b27cfa4fd9c Author: Wu Fengguang Date: Wed Feb 8 03:42:05 2017 +0800 net: qcom/emac: fix semicolon.cocci warnings drivers/net/ethernet/qualcomm/emac/emac-ethtool.c:155:49-50: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Timur Tabi Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8480ac567959eecdc694cf4f9c02d6fa687384b6 Author: Vincent Abriou Date: Wed Feb 8 10:47:01 2017 +0100 ASoC: hdmi-codec: remove HDMI device unregister While unregistering the hdmi-codec, the hdmi device list must be cleaned up. It avoid kernel page fault when registering again the hdmi-codec. Signed-off-by: Vincent Abriou Reviewed-by: Philipp Zabel Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit e5028a259733ec2324893cb481023ed6cf7e9723 Author: Icenowy Zheng Date: Wed Feb 8 02:30:40 2017 +0800 ASoC: sunxi: allow the analog codec driver to be built on ARM64 As the 64-bit Allwinner H5 SoC has the same analog codec part (also the same digital part) as H3, enable the driver to be built on ARM64 Allwinner platform, so that it can be used on H5. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4d7641fa797b523c0789d2fa55b0a3d53abc2fb Author: Dmitry Torokhov Date: Mon Feb 6 19:56:14 2017 -0800 regulator: core: simplify _regulator_get() The code in _regulator_get() got a bit confusing over time, with control flow jumping to a label from couple of places. Let's untangle it a bit by doing the following: 1. Make handling of missing supplies and substituting them with dummy regulators more explicit: - check if we not have full constraints and refuse considering dummy regulators with appropriate message; - use "switch (get_type)" to handle different types of request explicitly as well. "Normal" requests will get dummies, exclusive will not and will notify user about that; optional will fail silently. 2. Stop jumping to a label in the middle of the function but instead have proper conditional flow. I believe jumps should be reserved for error handling, breaking from inner loop, or restarting a loop, but not for implementing normal conditional flow. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 66 +++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 32 deletions(-) commit 04d8a0a5f3b6887543850d991a5e37c4ec90e250 Author: Raju Lakkaraju Date: Tue Feb 7 19:10:26 2017 +0530 net: phy: Add LED mode driver for Microsemi PHYs. LED Mode: Microsemi PHY support 2 LEDs (LED[0] and LED[1]) to display different status information that can be selected by setting LED mode. LED Mode parameter (vsc8531, led-0-mode) and (vsc8531, led-1-mode) get from Device Tree. Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller .../devicetree/bindings/net/mscc-phy-vsc8531.txt | 10 +++ drivers/net/phy/mscc.c | 85 +++++++++++++++++++++- include/dt-bindings/net/mscc-phy-vsc8531.h | 29 ++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) commit acfe27633b4c380a67956bd2f73fc9a2c932cc39 Author: Johan Hovold Date: Wed Feb 8 13:49:19 2017 +0100 USB: serial: metro-usb: drop redundant URB reinitialisation No need to reinitialise the interrupt-in URB with values that have not changed before (some) resubmissions. This also allows the interrupt-in callback to have a single path for URB resubmission. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 168fc6c3c33ee7e9b2355e1a17d07e8313eb60f5 Author: Johan Hovold Date: Wed Feb 8 13:49:18 2017 +0100 USB: serial: metro-usb: drop function-tracing debugging Drop some unnecessary debug printks. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 12 ------------ 1 file changed, 12 deletions(-) commit d395c9ab00901cdd804c36857e9079dd794c3b1c Author: Johan Hovold Date: Wed Feb 8 13:49:17 2017 +0100 USB: serial: metro-usb: drop redundant URB unlink Drop redundant URB unlink as there's no need to unlink an URB which is about to be killed synchronously. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 1 - 1 file changed, 1 deletion(-) commit 965bbef552cdbf22ab7fb83e7f92b2f251d56f70 Author: Johan Hovold Date: Wed Feb 8 13:49:16 2017 +0100 USB: serial: metro-usb: drop unused interrupt-out callback Drop the unused interrupt-out callback. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 9 --------- 1 file changed, 9 deletions(-) commit ff4cf0e5ce952488074aa7f47734af1794f55fbc Author: Dan Carpenter Date: Tue Feb 7 16:15:27 2017 +0300 net: dsa: bcm_sf2: cleanup bcm_sf2_cfp_rule_get() a little This patch doesn't affect how the code works. My static checker complains that the mask and shift doesn't make sense because 0xffffff << 16 goes beyond the end of 32 bits. It should be 0xffff instead but the existing code won't cause runtime bugs. Also the casting here is not needed and not consistent with the rest of the code. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2acd8309a3a4e6dc04e72d2db0716825095c02d6 Author: Jeeja KP Date: Mon Feb 6 12:09:18 2017 +0530 ASoC: hdac_hdmi: Add support to handle MST capable pin To handle jack event and configuration of the pin widget for MST capable pin, this patch adds: o Flag to identify the pin is MST capable. o In notify callback(), based on the pipe and port information marks if the port is mst_capable. In case of non MST, port is defaulted to zero. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 8d13640f6b9f1f99035d7078b3cd4002e9af5d9c Author: Jeeja KP Date: Mon Feb 6 12:09:16 2017 +0530 ASoC: Intel: Skylake: Add route change to nau88l25_ssm4567 machine To support MST moved pin to port, this changes the routes based on port. So change the route in nau88l25_ssm4567 machine. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b0aad231bd1edd297a3e60acf26f9dceff1937a7 Author: Jeeja KP Date: Mon Feb 6 12:09:15 2017 +0530 ASoC: Intel: Skylake: Add route change to nau88l25_max98357a machine To support MST moved pin to port, this changes the routes based on port. So change the route in nau88l25_max98357a machine. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eaba31035aa925b04d7d63120283e40a0e96e4a8 Author: Jeeja KP Date: Mon Feb 6 12:09:17 2017 +0530 ASoC: Intel: bxt: Add route change to rt298 machine To support MST moved pin to port, this changes the routes based on port. So change the route in bxt_rt298 machine. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 754695f9960b58a9c9d6b9ab7fae68f7c4b47d9c Author: Jeeja KP Date: Mon Feb 6 12:09:14 2017 +0530 ASoC: hdac_hdmi: Begin to add support for DP Multi-stream audio With MST each pin contains several ports to which device can be connected. As a preparatory work to support DP MST this patch adds below changes: 1. Defines the port structure and moves all stream related information like ELD, converter list, chmap to port. 2. Creates ports for each pin based on the max_ports support. 3. Based on Pin-Port combination creates DAPM Mux widget instead of Pin to allow user to select a converter. 4. Port zero is the default port when pin does not support MST. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 393 ++++++++++++++++++++++++++----------------- 1 file changed, 240 insertions(+), 153 deletions(-) commit 2195bff041486eb7fcceaf058acaedcd057efbdc Author: Dave Hansen Date: Fri Feb 3 10:51:35 2017 -0800 selftests, x86, protection_keys: fix wrong offset in siginfo The siginfo contains a bunch of information about the fault. For protection keys, it tells us which protection key's permissions were violated. The wrong offset in here leads to reading garbage and thus failures in the tests. We should probably eventually move this over to using the kernel's headers defining the siginfo instead of a hard-coded offset. But, for now, just do the simplest fix. Signed-off-by: Dave Hansen Cc: Ingo Molnar Cc: Shuah Khan Signed-off-by: Shuah Khan tools/testing/selftests/x86/protection_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16846c2d96b0d7b3f7123257c4b58b06768c6d65 Author: Dave Hansen Date: Fri Feb 3 10:51:34 2017 -0800 selftests, x86, protection_keys: fix uninitialized variable warning 'orig_pkru' might have been uninitialized here. Fix it. Signed-off-by: Dave Hansen Signed-off-by: Shuah Khan tools/testing/selftests/x86/protection_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a7d2cd7407da88cec68556777458a4b897d91d8 Author: Viresh Kumar Date: Fri Jan 20 11:10:33 2017 +0530 selftest: cpufreq: Update MAINTAINERS file Update MAINTAINERS file with cpufreq's selftest directory. Signed-off-by: Viresh Kumar Signed-off-by: Shuah Khan MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 34d677a90f0682a26327dbefc0db1cf81647e7bc Author: Marc Zyngier Date: Mon Dec 19 17:16:45 2016 +0000 irqchip/gic-v3-its: Zero command on allocation When reusing commands from the ring buffer, it would be better to zero them out, even if the ITS should ignore the unused fields. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a0e136d436ded817c0aade72efdefa56a00b4e5e Author: Marcelo Tosatti Date: Tue Jan 24 15:09:42 2017 -0200 PTP: add kvm PTP driver Add a driver with gettime method returning hosts realtime clock. This allows Chrony to synchronize host and guest clocks with high precision (see results below). chronyc> sources MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== To configure Chronyd to use PHC refclock, add the following line to its configuration file: refclock PHC /dev/ptpX poll 3 dpoll -2 offset 0 Where /dev/ptpX is the kvmclock PTP clock. Signed-off-by: Marcelo Tosatti Acked-by: Richard Cochran Signed-off-by: Paolo Bonzini drivers/ptp/Kconfig | 12 +++ drivers/ptp/Makefile | 1 + drivers/ptp/ptp_kvm.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+) commit f4066c2bc4d0de4e5dcbff21dae41e89fe8f38c0 Author: Marcelo Tosatti Date: Tue Jan 24 15:09:41 2017 -0200 kvmclock: export kvmclock clocksource and data pointers To be used by KVM PTP driver. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvmclock.h | 6 ++++++ arch/x86/kernel/kvmclock.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 6f69f0ed6136c302976f8e8f859b73d47f0c0c5c Author: Eric Biggers Date: Tue Feb 7 12:42:10 2017 -0800 fscrypt: constify struct fscrypt_operations Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Richard Weinberger fs/ext4/super.c | 4 ++-- fs/f2fs/super.c | 4 ++-- fs/ubifs/crypto.c | 2 +- fs/ubifs/super.c | 2 +- fs/ubifs/ubifs.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 0c8d0a4770cb6863f78a25c8d211f42e9c82251c Author: Golan Ben-Ami Date: Wed Jan 25 15:11:30 2017 +0200 iwlwifi: mvm: avoid exceeding the allowed print length Divide a mfuart related print so it won't exceed the allowed MAX_MSG_LEN (110 bytes) per print. Fixes: 19f63c531b85 ("iwlwifi: mvm: support v2 of mfuart load notification") Signed-off-by: Golan Ben-Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit cd4d23c1ea9bb3769f2859b3b7b9ef24355bcba4 Author: Ilan Peer Date: Mon Jan 16 15:07:03 2017 +0200 iwlwifi: mvm: Fix removal of IGTK When removing an IGTK, iwl_mvm_send_sta_igtk() was called before station ID was retrieved, so the function was invoked with an invalid station ID. Fix this by first getting the station ID. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=192411 Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 735a0045f9ea8372bcf3e599cbd3aa891a216b26 Author: Goodstein, Mordechay Date: Sun Jan 15 16:00:12 2017 +0200 iwlwifi: mvm: avoid race condition in ADD_STA. The race happens when we send ADD_STA(auth->assoc) -> LQ_CMD between the commands the FW sometimes loses the medium for AUX, and sends a ndp to the AP and the flow becomes, ADD_STA -> send ndp -> LQ_CMD the problem is that there's no rates yet defined for sending the ndp and FW generates an assert. The fix: change the order of the commands to LQ_CMD -> ADD_STA Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b45242c99f503d0a526c2b1f647ad562f9cf9dd5 Author: Avraham Stern Date: Mon Jan 9 15:39:15 2017 +0200 iwlwifi: mvm: Fix CSA received immediately after association The session protection set for association is only removed when BSS_CHANGED_BEACON_INFO is set and BSS_CHANGED_ASSOC is not set. However, mac80211 may set both on association (in case a beacon was already received). In this case, mac80211 will not set BSS_CHANGED_BEACON_INFO on the next beacons because it has already notified the beacon change, so the session protection is never removed (until the session protection ends). When a CSA is received within this time, the station will fail to folllow the channel switch because it cannot schedule the time event. Fix this by removing the session protection when BSS_CHANGED_BEACON_INFO and BSS_CHANGED_ASSOC are both set. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2b18824a5d1eae58946e3c8a60d48f0b1ff32265 Author: Golan Ben Ami Date: Sun Dec 11 17:12:47 2016 +0200 iwlwifi: pcie: set STATUS_RFKILL immediately after interrupt Currently, when getting a RFKILL interrupt, the transport enters a flow in which it stops the device, disables other interrupts, etc. After stopping the device, the transport resets the hw, and sleeps. During the sleep, a context switch occurs and host commands are sent by upper layers (e.g. mvm) to the fw. This is possible since the op_mode layer and the transport layer hold different mutexes. Since the STATUS_RFKILL bit isn't set, the transport layer doesn't recognize that RFKILL was toggled on, and no commands can actually be sent, so it enqueues the command to the tx queue and sets a timer on the queue. After switching context back to stopping the device, STATUS_RFKILL is set, and then the transport can't send the command to the fw. This eventually results in a queue hang. Fix this by setting STATUS_RFKILL immediately when the interrupt is fired. Signed-off-by: Golan Ben-Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 43d59a4ce78b6460b32076ec7ac821fd8678cdc2 Author: Emmanuel Grumbach Date: Sat Jan 7 19:57:46 2017 +0200 iwlwifi: mvm: don't call << operator with a negative value In https://bugzilla.kernel.org/show_bug.cgi?id=177341 Bob reported a UBSAN WARNING on rs.c in iwldvm. Fix the same bug in iwlmvm. This because i = index - 1; for (mask = (1 << i); i >= 0; i--, mask >>= 1) is unsafe: i could be negative and hence we can call << on a negative value. This bug doesn't have any real impact since the condition of the for loop will prevent any usage of mask. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177341 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1aa0ec5cdf60b23dfc152f0e9e205f58b0a546b2 Author: Emmanuel Grumbach Date: Sat Jan 7 19:57:46 2017 +0200 iwlwifi: dvm: don't call << operator with a negative value In https://bugzilla.kernel.org/show_bug.cgi?id=177341 Bob reported a UBSAN WARNING on rs.c. Undefined behaviour in drivers/net/wireless/intel/iwlwifi/dvm/rs.c:746:18 This because i = index - 1; for (mask = (1 << i); i >= 0; i--, mask >>= 1) is unsafe: i could be negative and hence we can call << on a negative value. This bug doesn't have any real impact since the condition of the for loop will prevent any usage of mask. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177341 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6eac0e817aee2518a96b5ce9d02b904e0667f370 Author: Emmanuel Grumbach Date: Sat Jan 7 23:03:40 2017 +0200 iwlwifi: make RTPM depend on EXPERT Enabling the RTPM Kconfig option can be fairly risky. Runtime PM must be validated against a specific platform before it can be safely enabled. Hence, it makes no sense for distros and other big OS vendors to enable it since they ship code to various systems and unknown platform. Make sure that this is hinted properly by making the IWLWIFI_PCIE_RTPM Kconfig option depend on EXPERT. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=172411 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 04fa3e680b4dd2fdd11d0152fb9b6067e7aac140 Author: Emmanuel Grumbach Date: Sat Jan 7 20:11:47 2017 +0200 iwlwifi: pcie: don't increment / decrement a bool David reported that the code I added uses the decrement and increment operator on a boolean variable. Fix that. Fixes: 0cd58eaab148 ("iwlwifi: pcie: allow the op_mode to block the tx queues") Reported-by: David Binderman Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bc13c2cbeec776a2b724cb51bf11fbc30c23318 Author: Robert Richter Date: Wed Feb 1 18:38:25 2017 +0100 irqchip/gic-v3-its: Fix command buffer allocation The its command buffer must be page aligned, but kzalloc() is not guaranteed to be (though it is mostly when allocating 64k). Use __get_free_pages() as this is used for other buffers as well. Signed-off-by: Robert Richter [Marc: fixed the error path] Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 514612fc4425be5149cf94422517036149b5e0b6 Merge: cf81db3 5524ddd Author: Kalle Valo Date: Wed Feb 8 17:46:02 2017 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.11. Major changes: ath10k * add debugfs file peer_debug_trigger for debugging firmware commit 0704916a4b24b0f5db9e3e8a39e906247a50e30f Author: Sachin Shukla Date: Wed Feb 8 16:44:00 2017 +0100 video: fbdev: fsl-diu-fb: remove impossible condition xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Cc: Tomi Valkeinen Cc: sachiniiitm@gmail.com Cc: ravikant.s2@samsung.com Cc: p.shailesh@samsung.com Cc: ashish.kalra@samsung.com Cc: vidushi.koul@samsung.com Signed-off-by: Sachin Shukla Acked-by: Timur Tabi [b.zolnierkie: split from the bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fsl-diu-fb.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8018ce3f20c570e1ae75a42d924ee97db8cad82a Author: Sachin Shukla Date: Wed Feb 8 16:44:00 2017 +0100 video: fbdev: amifb: remove impossible condition xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Cc: Timur Tabi Cc: Tomi Valkeinen Cc: sachiniiitm@gmail.com Cc: ravikant.s2@samsung.com Cc: p.shailesh@samsung.com Cc: ashish.kalra@samsung.com Cc: vidushi.koul@samsung.com Signed-off-by: Sachin Shukla [b.zolnierkie: split from the bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amifb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6e376822ee9e06c5fa81424c8cf9218abfabefff Author: Tomi Valkeinen Date: Wed Feb 8 16:44:00 2017 +0100 fbdev/ssd1307fb: clear screen in probe SSD1306 does not clear the panel's framebuffer automatically, even if a HW reset happens, so we need to do that at probe time before enabling the panel. Cc: Rob Herring Cc: Maxime Ripard Cc: Benoît Cousson Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/ssd1307fb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ba14301e0356c99803e07db60e129a2ca9e50ff0 Author: Tomi Valkeinen Date: Wed Feb 8 16:43:59 2017 +0100 fbdev/ssd1307fb: add support to enable VBAT SSD1306 needs VBAT when it is wired in charge pump configuration. This patch adds support to the driver to enable VBAT regulator at init time. Cc: Rob Herring Cc: Maxime Ripard Cc: Benoît Cousson Signed-off-by: Tomi Valkeinen Reviewed-by: Roger Quadros Signed-off-by: Jyri Sarha Signed-off-by: Bartlomiej Zolnierkiewicz .../devicetree/bindings/display/ssd1307fb.txt | 1 + drivers/video/fbdev/ssd1307fb.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit fdde1a8148d81617582c138cd1fbdc4594d4c941 Author: Jyri Sarha Date: Wed Feb 8 16:43:59 2017 +0100 fbdev: ssd1307fb: Make reset gpio devicetree property optional Make reset gpio devicetree property optional. Depending on the board designing there may not be a dedicated gpio for resetting the display. Without a proper reset there may be some junk in the display memory at probe time, so in such a case the display memory is cleared before turning it on. The devicetree binding document is also updated. Cc: Rob Herring Cc: Tomi Valkeinen Cc: Maxime Ripard Cc: Benoît Cousson Signed-off-by: Jyri Sarha Signed-off-by: Bartlomiej Zolnierkiewicz .../devicetree/bindings/display/ssd1307fb.txt | 4 ++-- drivers/video/fbdev/ssd1307fb.c | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) commit 519b4dba586198eed8f72ba07bc71808af2e0e32 Author: Jyri Sarha Date: Wed Feb 8 16:43:59 2017 +0100 fbdev: ssd1307fb: Remove reset-active-low from the DT binding document Remove reset-active-low from the devicetree binding document. The actual implementation has never been there in the driver code and there is no reason to add it because the gpiod API supports gpio flags, including GPIO_ACTIVE_LOW, directly trough its own devicetree binding. Cc: Rob Herring Cc: Tomi Valkeinen Cc: Maxime Ripard Cc: Benoît Cousson Signed-off-by: Jyri Sarha Signed-off-by: Bartlomiej Zolnierkiewicz Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72db33355c1431fefcabb06c9c25705e8226eed5 Author: Jyri Sarha Date: Wed Feb 8 16:43:59 2017 +0100 fbdev: ssd1307fb: Start to use gpiod API for reset gpio Start to use gpiod API for reset gpio. Cc: Rob Herring Cc: Tomi Valkeinen Cc: Maxime Ripard Cc: Benoît Cousson Signed-off-by: Jyri Sarha Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/ssd1307fb.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit b49898ce606da268fa28fef40260cad8a20ce7b0 Author: Wei Yongjun Date: Wed Feb 8 16:43:59 2017 +0100 video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe() Fix to return error code -ENOMEM from the ioremap_nocache() error handling case instead of 0, as done elsewhere in this function. Cc: Kees Cook Signed-off-by: Wei Yongjun Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d22556873cbe36f30a0d018b9d8238425117515 Author: Dmitry Torokhov Date: Wed Feb 8 16:43:59 2017 +0100 video: fbdev: offb: switch to using for_each_node_by_type Instead of open-coding loops let's switch to a nice macro. Cc: Tomi Valkeinen Cc: Yongji Xie Signed-off-by: Dmitry Torokhov Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/offb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd7b917c98d6775fd1cb1eac84f5f1ea97b16e79 Author: Jan Stourac Date: Wed Feb 8 16:43:59 2017 +0100 video/console: use setup_timer and mod_timer instead of init_timer Use setup_timer and mod_timer functions instead of initializing timer with the function init_timer and data fields. Signed-off-by: Jan Stourac Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/fbcon.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cf81db30a6edcca791b1bfa5348a162471121d11 Author: Stanislaw Gruszka Date: Wed Feb 8 13:51:31 2017 +0100 rt2x00: remove queue_entry from skbdesc queue_entry field of skbdesc is not read any more, remove it to allow skbdesc contain other data. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 3 --- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 2 -- 2 files changed, 5 deletions(-) commit 2ceb813798e1fd33e71a574771828c0f298e077b Author: Stanislaw Gruszka Date: Wed Feb 8 13:51:30 2017 +0100 rt2x00: call entry directly in rt2x00_dump_frame Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 7 ++++--- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2 +- 10 files changed, 15 insertions(+), 14 deletions(-) commit 80a97eae304631f57ff8560f87c0b18b95321443 Author: Stanislaw Gruszka Date: Wed Feb 8 13:51:29 2017 +0100 rt61pci: use entry directly Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt61pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0488a6121dfe6cbd44de15ea3627913b7549a1e9 Author: Stanislaw Gruszka Date: Wed Feb 8 12:18:10 2017 +0100 rt2x00usb: fix anchor initialization If device fail to initialize we can OOPS in rt2x00lib_remove_dev(), due to using uninitialized usb_anchor structure: [ 855.435820] ieee80211 phy3: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1000 with error -19 [ 855.435826] ieee80211 phy3: rt2800_probe_rt: Error - Invalid RT chipset 0x0000, rev 0000 detected [ 855.435829] ieee80211 phy3: rt2x00lib_probe_dev: Error - Failed to allocate device [ 855.435845] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 [ 855.435900] IP: _raw_spin_lock_irq+0xd/0x30 [ 855.435926] PGD 0 [ 855.435953] Oops: 0002 [#1] SMP [ 855.437011] Call Trace: [ 855.437029] ? usb_kill_anchored_urbs+0x27/0xc0 [ 855.437061] rt2x00lib_remove_dev+0x190/0x1c0 [rt2x00lib] [ 855.437097] rt2x00lib_probe_dev+0x246/0x7a0 [rt2x00lib] [ 855.437149] ? ieee80211_roc_setup+0x9e/0xd0 [mac80211] [ 855.437183] ? __kmalloc+0x1af/0x1f0 [ 855.437207] ? rt2x00usb_probe+0x13d/0xc50 [rt2x00usb] [ 855.437240] rt2x00usb_probe+0x155/0xc50 [rt2x00usb] [ 855.437273] rt2800usb_probe+0x15/0x20 [rt2800usb] [ 855.437304] usb_probe_interface+0x159/0x2d0 [ 855.437333] driver_probe_device+0x2bb/0x460 Patch changes initialization sequence to fix the problem. Cc: Vishal Thanki Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 93c7018ec16bb83399dd4db61c361a6d6aba0d5a Author: Stanislaw Gruszka Date: Wed Feb 8 12:18:09 2017 +0100 rt2x00usb: do not anchor rx and tx urb's We might kill TX or RX urb during rt2x00usb_flush_entry(), what can cause anchor list corruption like shown below: [ 2074.035633] WARNING: CPU: 2 PID: 14480 at lib/list_debug.c:33 __list_add+0xac/0xc0 [ 2074.035634] list_add corruption. prev->next should be next (ffff88020f362c28), but was dead000000000100. (prev=ffff8801d161bb70). [ 2074.035670] Call Trace: [ 2074.035672] [] dump_stack+0x63/0x8c [ 2074.035674] [] __warn+0xd1/0xf0 [ 2074.035676] [] warn_slowpath_fmt+0x5f/0x80 [ 2074.035678] [] ? rt2x00usb_register_write_lock+0x3d/0x60 [rt2800usb] [ 2074.035679] [] __list_add+0xac/0xc0 [ 2074.035681] [] usb_anchor_urb+0x4c/0xa0 [ 2074.035683] [] rt2x00usb_kick_rx_entry+0xaf/0x100 [rt2x00usb] [ 2074.035684] [] rt2x00usb_clear_entry+0x22/0x30 [rt2x00usb] To fix do not anchor TX and RX urb's, it is not needed as during shutdown we kill those urbs in rt2x00usb_free_entries(). Cc: Vishal Thanki Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 4 ---- 1 file changed, 4 deletions(-) commit d5efe1535af07223b3ba81823a595be04f96969c Author: Larry Finger Date: Tue Feb 7 09:14:21 2017 -0600 rtlwifi: Move items out of rtl_pci_priv and rtl_usb_priv In commit 6773386f977c ("rtlwifi: rtl8192c-common: Fix "BUG: KASAN:"), a BUG detected when CONFIG_KASAN=y was fixed by reordering the layouts of struct rtl_pci_priv, and struct rtl_usb_priv so that the variables used by both PCI and USB drivers have the same offsets in both structs. The better fix of relocating the critical variables into struct rtl_priv was deferred as these changes do not have to be applied to stable kernels. This change also removes CamelCase variables with pLed0 => pled0. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 14 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/led.c | 19 +-- .../wireless/realtek/rtlwifi/rtl8192c/dm_common.c | 143 +++++++++--------- .../net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 166 ++++++++++----------- .../net/wireless/realtek/rtlwifi/rtl8192ce/led.c | 19 +-- .../net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192cu/led.c | 17 ++- .../net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 10 +- .../net/wireless/realtek/rtlwifi/rtl8192de/led.c | 19 +-- .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 6 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/led.c | 14 +- .../net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 12 +- .../net/wireless/realtek/rtlwifi/rtl8192se/led.c | 19 +-- .../net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 8 +- .../net/wireless/realtek/rtlwifi/rtl8723ae/led.c | 19 +-- .../net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 8 +- .../net/wireless/realtek/rtlwifi/rtl8723be/led.c | 15 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 10 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/led.c | 24 ++- drivers/net/wireless/realtek/rtlwifi/usb.h | 1 - drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 21 files changed, 261 insertions(+), 286 deletions(-) commit d0630555650a394cf5743268820511f527a561a5 Author: Rafał Miłecki Date: Thu Feb 2 22:33:15 2017 +0100 brcmfmac: merge two remaining brcmf_err macros Now we always have __brcmf_err function we can do perfectly fine with just one macro. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 087fa712a00685dac4bcc64b7c3dc8ae6bee8026 Author: Rafał Miłecki Date: Thu Feb 2 22:33:14 2017 +0100 brcmfmac: switch to C function (__brcmf_err) for printing errors This will allow extending code and using more detailed messages e.g. with the help of dev_err. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/common.c | 16 ++++++++++++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) commit 9587a01a7ead9efc5032c16e0d9668de58be1186 Author: Rafał Miłecki Date: Thu Feb 2 22:33:13 2017 +0100 brcmfmac: merge two brcmf_err macros into one This allows simplifying the code by adding a simple IS_ENABLED check for CONFIG_BRCMDB symbol. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f9ad86e42d0303eeb8e0d41bb208153022ebd9d2 Author: Dan Carpenter Date: Wed Feb 8 02:46:01 2017 +0300 drm/atomic: fix an error code in mode_fixup() Having "ret" be a bool type works for everything except ret = funcs->atomic_check(). The other functions all return zero on error but ->atomic_check() returns negative error codes. We want to propagate the error code but instead we return 1. I found this bug with static analysis and I don't know if it affects run time. Fixes: 4cd4df8080a3 ("drm/atomic: Add ->atomic_check() to encoder helpers") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207234601.GA23981@mwanda drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24f76b2c87ed68f79f9f0705b11ccbefaaa0d390 Author: Chris Wilson Date: Tue Feb 7 12:49:56 2017 +0000 drm: Cancel drm_fb_helper_resume_work on unload We can not allow the worker to run after its fbdev, or even the module, has been removed. Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()") Signed-off-by: Chris Wilson Cc: Noralf Trønnes Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Cc: # v4.9+ Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207124956.14954-2-chris@chris-wilson.co.uk drivers/gpu/drm/drm_fb_helper.c | 1 + 1 file changed, 1 insertion(+) commit f21b9a92ca7c29382909eaab9facc2cf46f2cc0b Author: Chris Wilson Date: Tue Feb 7 12:49:55 2017 +0000 drm: Cancel drm_fb_helper_dirty_work on unload We can not allow the worker to run after its fbdev, or even the module, has been removed. Fixes: eaa434defaca ("drm/fb-helper: Add fb_deferred_io support") Signed-off-by: Chris Wilson Cc: Noralf Trønnes Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Cc: # v4.7+ Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207124956.14954-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_fb_helper.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b6b46311a8562fb3a9e035ed6ffab6d49c28886 Author: Jintack Lim Date: Fri Feb 3 10:20:08 2017 -0500 KVM: arm/arm64: Emulate the EL1 phys timer registers Emulate read and write operations to CNTP_TVAL, CNTP_CVAL and CNTP_CTL. Now VMs are able to use the EL1 physical timer. Signed-off-by: Jintack Lim Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 37 ++++++++++++++++++++++++++++++++++--- include/kvm/arm_arch_timer.h | 2 ++ virt/kvm/arm/arch_timer.c | 2 +- 3 files changed, 37 insertions(+), 4 deletions(-) commit c9a3c58f01fb0af78b512ab4515d16f3ef1a03f1 Author: Jintack Lim Date: Fri Feb 3 10:20:07 2017 -0500 KVM: arm64: Add the EL1 physical timer access handler KVM traps on the EL1 phys timer accesses from VMs, but it doesn't handle those traps. This results in terminating VMs. Instead, set a handler for the EL1 phys timer access, and inject an undefined exception as an intermediate step. Signed-off-by: Jintack Lim Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit f242adaf0c7e8376e9f54ffd6ef088df84577893 Author: Jintack Lim Date: Fri Feb 3 10:20:06 2017 -0500 KVM: arm/arm64: Set up a background timer for the physical timer emulation Set a background timer for the EL1 physical timer emulation while VMs are running, so that VMs get the physical timer interrupts in a timely manner. Schedule the background timer on entry to the VM and cancel it on exit. This would not have any performance impact to the guest OSes that currently use the virtual timer since the physical timer is always not enabled. Signed-off-by: Jintack Lim Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit fb280e97576a91c01b2a1712dba31024748b3084 Author: Jintack Lim Date: Fri Feb 3 10:20:05 2017 -0500 KVM: arm/arm64: Set a background timer to the earliest timer expiration When scheduling a background timer, consider both of the virtual and physical timer and pick the earliest expiration time. Signed-off-by: Jintack Lim Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/arm.c | 3 ++- virt/kvm/arm/arch_timer.c | 53 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 14 deletions(-) commit 58e0c9732a31afdef488a41fd1edba065124f442 Author: Jintack Lim Date: Fri Feb 3 10:20:04 2017 -0500 KVM: arm/arm64: Update the physical timer interrupt level Now that we maintain the EL1 physical timer register states of VMs, update the physical timer interrupt level along with the virtual one. Signed-off-by: Jintack Lim Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 4 ++++ 1 file changed, 4 insertions(+) commit a91d18551e7b35e34a04b6fd199ca8568e7e9315 Author: Jintack Lim Date: Fri Feb 3 10:20:03 2017 -0500 KVM: arm/arm64: Initialize the emulated EL1 physical timer Initialize the emulated EL1 physical timer with the default irq number. Signed-off-by: Jintack Lim Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/reset.c | 9 ++++++++- arch/arm64/kvm/reset.c | 9 ++++++++- include/kvm/arm_arch_timer.h | 3 ++- virt/kvm/arm/arch_timer.c | 9 +++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) commit 009a5701bb2d166073f75643bc9237fe014c6bf5 Author: Jintack Lim Date: Fri Feb 3 10:20:02 2017 -0500 KVM: arm/arm64: Add the EL1 physical timer context Add the EL1 physical timer context. Signed-off-by: Jintack Lim Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier include/kvm/arm_arch_timer.h | 2 ++ 1 file changed, 2 insertions(+) commit 9171fa2e0951b0cb6c443e0dce2c4620de3b1dfe Author: Jintack Lim Date: Fri Feb 3 10:20:01 2017 -0500 KVM: arm/arm64: Decouple kvm timer functions from virtual timer Now that we have a separate structure for timer context, make functions generic so that they can work with any timer context, not just the virtual timer context. This does not change the virtual timer functionality. Signed-off-by: Jintack Lim Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/arm.c | 2 +- include/kvm/arm_arch_timer.h | 2 +- virt/kvm/arm/arch_timer.c | 54 ++++++++++++++++++++------------------------ 3 files changed, 27 insertions(+), 31 deletions(-) commit 90de943a430028ee389b22bf4a7ae5867c32ce0c Author: Jintack Lim Date: Fri Feb 3 10:20:00 2017 -0500 KVM: arm/arm64: Move cntvoff to each timer context Make cntvoff per each timer context. This is helpful to abstract kvm timer functions to work with timer context without considering timer types (e.g. physical timer or virtual timer). This also would pave the way for ever doing adjustments of the cntvoff on a per-CPU basis if that should ever make sense. Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 3 --- arch/arm/kvm/arm.c | 1 - arch/arm64/include/asm/kvm_host.h | 3 --- include/kvm/arm_arch_timer.h | 9 +++------ virt/kvm/arm/arch_timer.c | 38 ++++++++++++++++++++++++++++---------- virt/kvm/arm/hyp/timer-sr.c | 3 +-- 6 files changed, 32 insertions(+), 25 deletions(-) commit fbb4aeec5fc2ab47615b2a0cbabc503e1eef4c60 Author: Jintack Lim Date: Fri Feb 3 10:19:59 2017 -0500 KVM: arm/arm64: Abstract virtual timer context into separate structure Abstract virtual timer context into a separate structure and change all callers referring to timer registers, irq state and so on. No change in functionality. This is about to become very handy when adding the EL1 physical timer. Signed-off-by: Jintack Lim Acked-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Marc Zyngier include/kvm/arm_arch_timer.h | 27 ++++++++--------- virt/kvm/arm/arch_timer.c | 69 +++++++++++++++++++++++--------------------- virt/kvm/arm/hyp/timer-sr.c | 10 ++++--- 3 files changed, 56 insertions(+), 50 deletions(-) commit 0bdbf3b071986ba80731203683cf623d5c0cacb1 Author: Shanker Donthineni Date: Thu Feb 2 20:30:03 2017 -0600 KVM: arm/arm64: vgic: Stop injecting the MSI occurrence twice The IRQFD framework calls the architecture dependent function twice if the corresponding GSI type is edge triggered. For ARM, the function kvm_set_msi() is getting called twice whenever the IRQFD receives the event signal. The rest of the code path is trying to inject the MSI without any validation checks. No need to call the function vgic_its_inject_msi() second time to avoid an unnecessary overhead in IRQ queue logic. It also avoids the possibility of VM seeing the MSI twice. Simple fix, return -1 if the argument 'level' value is zero. Cc: stable@vger.kernel.org Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-irqfd.c | 3 +++ 1 file changed, 3 insertions(+) commit c0d197d55e8e8aeeea55f79bdf67e1c957bfa25d Author: Joe Perches Date: Wed Feb 8 03:33:36 2017 -0800 xenbus: Neaten xenbus_va_dev_error This function error patch can be simplified, so do so. Remove fail: label and somewhat obfuscating, used once "error_path" function. Signed-off-by: Joe Perches Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_client.c | 39 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) commit 5524ddd4c1f1624a7a96e6078a5ed81f493e7398 Author: Johannes Berg Date: Tue Feb 7 23:29:33 2017 +0100 ath10k: select WANT_DEV_COREDUMP This is necessary so that - if ath10k is the only driver using dev_coredump*() - the functionality is built into the kernel. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 949c2d0096753d518ef6e0bd8418c8086747196b Author: Johannes Berg Date: Tue Feb 7 15:33:28 2017 +0100 wil6210: include moduleparam.h This now declares a module parameter, so include the necessary header file for that. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 1 + 1 file changed, 1 insertion(+) commit dab55d1083db11d731df5c0d53865efe2bf8e9fe Author: Waldemar Rymarkiewicz Date: Thu Feb 2 18:53:42 2017 +0100 ath10k: remove unneeded semicolon Remove redundant semicolon after switch statement. Signed-off-by: Waldemar Rymarkiewicz Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe0a7ef74d1f65b86820a54636323df2b31e0c3f Author: Juri Lelli Date: Mon Feb 6 16:00:09 2017 +0000 arm64: remove wrong CONFIG_PROC_SYSCTL ifdef The sysfs cpu_capacity entry for each CPU has nothing to do with PROC_FS, nor it's in /proc/sys path. Remove such ifdef. Cc: Will Deacon Cc: Catalin Marinas Reported-and-suggested-by: Sudeep Holla Fixes: be8f185d8af4 ('arm64: add sysfs cpu_capacity attribute') Signed-off-by: Juri Lelli Signed-off-by: Will Deacon arch/arm64/kernel/topology.c | 2 -- 1 file changed, 2 deletions(-) commit 3046ec674d441562c6bb3e4284cd866743042ef3 Author: Will Deacon Date: Wed Feb 8 14:54:12 2017 +0000 ARM: smccc: Update HVC comment to describe new quirk parameter Commit 680a0873e193 ("arm: kernel: Add SMC structure parameter") added a new "quirk" parameter to the SMC and HVC SMCCC backends, but only updated the comment for the SMC version. This patch adds the new paramater to the comment describing the HVC version too. Signed-off-by: Will Deacon include/linux/arm-smccc.h | 1 + 1 file changed, 1 insertion(+) commit 4cfffcfa5106492f5785924ce2e9af49f075999b Author: Marcin Nowakowski Date: Wed Jan 25 15:08:25 2017 +0100 irqchip/mips-gic: Fix local interrupts Some local interrupts are not initialised properly at the moment and cannot be used since the domain's alloc method is never called for them. This has been observed earlier and partially fixed in commit e875bd66dfb ("irqchip/mips-gic: Fix local interrupts"), but that change still relied on the interrupt to be requested by an external driver (eg. drivers/clocksource/mips-gic-timer.c). This does however not solve the issue for interrupts that are not referenced by any driver through the device tree and results in request_irq() calls returning -ENOSYS. It can be observed when attempting to use perf tool to access hardware performance counters. Fix this by explicitly calling irq_create_fwspec_mapping() for local interrupts. Fixes: e875bd66dfb ("irqchip/mips-gic: Fix local interrupts") Signed-off-by: Marcin Nowakowski Cc: Paul Burton Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 9eeb0ed0f30938f31a3d9135a88b9502192c18dd Author: Minghsiu Tsai Date: Wed Feb 8 00:09:51 2017 -0200 [media] mtk-vcodec: fix build warnings without DEBUG After removing DEBUG from mtk_vcodec_util.h, some build warnings are generated as the following: .../drivers/media/platform/mtk-vcodec/vdec_vpu_if.c: In function 'vcodec_vpu_send_msg': .../drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:73:11: warning: unused variable 'msg_id' [-Wunused-variable] uint32_t msg_id = *(uint32_t *)msg; ^ .../drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c: In function 'vb2ops_vdec_buf_queue': .../drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:1129:7: warning: unused variable 'log_level' [-Wunused-variable] int log_level = ret ? 0 : 1; ^ .../drivers/media/platform/mtk-vcodec/venc_vpu_if.c: In function 'vpu_enc_send_msg': .../drivers/media/platform/mtk-vcodec/venc_vpu_if.c:82:12: warning: unused variable 'msg_id' [-Wunused-variable] uint32_t msg_id = *(uint32_t *)msg; ^ It is because mtk_vcodec_debug() and mtk_vcodec_err() are defined as empty macros. Without DEBUG definition, the variable for debugging is not used anymore. Fixing build warnings by moving the assignment of the variable to the argument of mtk_vcodec_debug() and mtk_vcodec_err(). Within the patch, build pass with/without DEBUG definition, and functions still work fine. Signed-off-by: Minghsiu Tsai Reviewed-by: Daniel Kurtz Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 9 ++++----- drivers/media/platform/mtk-vcodec/vdec_vpu_if.c | 5 ++--- drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 4 +--- 3 files changed, 7 insertions(+), 11 deletions(-) commit b4d3053c8ce9c71266f9da71c8ece79c0f8ebc23 Author: Linus Walleij Date: Mon Jan 30 20:28:49 2017 +0100 irqchip: Add a driver for Cortina Gemini As a part of transitioning the Gemini platform to device tree we create this clean, device-tree-only irqchip driver. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-gemini.c | 185 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) commit f59098c3ee775c874028f0ade4360cdf3e3b6810 Author: Linus Walleij Date: Mon Jan 30 20:28:38 2017 +0100 irqchip: DT bindings for Cortina Gemini irqchip This adds device tree bindings for the Cortina Gemini interrupt controller. They are pretty standard. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier .../cortina,gemini-interrupt-controller.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0d1270df836fe9f5cc7e8001b7372ca4fa3f00f6 Author: Arnd Bergmann Date: Tue Feb 7 11:01:41 2017 -0200 [media] zd1301: fix building interface driver without demodulator If the USB driver is enabled but the demodulator is not, we get a link error: ERROR: "zd1301_demod_get_dvb_frontend" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! ERROR: "zd1301_demod_get_i2c_adapter" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! Such a configuration obviously makes no sense, but we should not fail the build. This tries to mimic what we have for other drivers by turning the build failure into a runtime failure. Alternatively we could use an unconditional 'select' or 'depends on' to enforce a sane configuration. Fixes: 47d65372b3b6 ("[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver") Fixes: 992b39872b80 ("[media] zd1301: ZyDAS ZD1301 DVB USB interface driver") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/zd1301_demod.h | 18 ++++++++++++++++++ drivers/media/usb/dvb-usb-v2/zd1301.c | 4 ++++ 2 files changed, 22 insertions(+) commit 9165ba166cac5e8c9abda2012ea37cc3430c0b14 Author: Lubomir Rintel Date: Mon Feb 6 04:47:36 2017 -0200 [media] usbtv: add sharpness control Signed-off-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-video.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e3c484b183d3bbef0f0df527e10359163f0bb1db Author: Alim Akhtar Date: Wed Jan 4 13:54:20 2017 +0530 irqchip/gic-v3: Remove duplicate definition of GICD_TYPER_LPIS GICD_TYPER_LPIS macro is defined twice in this file. This patch removes the duplicate entry. Fixes: f5c1434c217f ("irqchip: GICv3: rework redistributor structure") Signed-off-by: Alim Akhtar Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 1 - 1 file changed, 1 deletion(-) commit 6a25ad3a9f9832f24df7987227122b8359f05c8e Author: Marc Zyngier Date: Tue Dec 20 15:52:26 2016 +0000 irqchip/gic-v3-its: Rename MAPVI to MAPTI Back in the days when the GICv3/v4 architecture was drafted, the command to an event to an LPI number was called MAPVI. Later on, and to avoid confusion with the GICv4 command VMAPI, it was renamed MAPTI. We've carried the old name for a long time, but it gets in the way of people reading the code in the light of the public architecture specification. Just repaint all the references and kill the old definition. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 28 ++++++++++++++-------------- include/linux/irqchip/arm-gic-v3.h | 2 -- 2 files changed, 14 insertions(+), 16 deletions(-) commit 3f190e3aec212fc8c61e202c51400afa7384d4bc Author: Stefan Brüns Date: Sun Feb 5 12:57:59 2017 -0200 [media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a read length of 0 by itself, avoid calling it using the dvb_usb_generic_read wrapper function. Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 4f46de9d2eda184b0e49e32bb2a92c6a06b336f5 Author: Marc Zyngier Date: Tue Dec 20 15:50:14 2016 +0000 irqchip/gic-v3-its: Drop deprecated GITS_BASER_TYPE_CPU During the development of the GICv3/v4 architecture, it was envisaged to have a CPU table, though the use for it was never completely clear (the collection table serves that role pretty well). It ended being dropped before the specification was published, though it lived on in the driver. In order to avoid people scratching their head too much, let's do the same in the kernel. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- include/linux/irqchip/arm-gic-v3.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4d36f136d57aea6f6440886106e246bb7e5918d8 Author: Marc Zyngier Date: Mon Dec 19 17:11:52 2016 +0000 irqchip/gic-v3-its: Refactor command encoding The way we encode the various ITS command fields is both tedious and error prone. Let's introduce a helper function that performs the encoding, and convert the existing encoders to use that helper. It also has the advantage of expressing the encoding in a way that matches the architecture specification. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 69d3973af1acd4c0989ec8218c05f12d303cd7cf Author: Arnd Bergmann Date: Thu Feb 2 12:51:28 2017 -0200 [media] ttpci: address stringop overflow warning gcc-7.0.1 warns about old code in ttpci: In file included from drivers/media/pci/ttpci/av7110.c:63:0: In function 'irdebi.isra.2', inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3, inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:659:3: drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] memcpy(av7110->debi_virt, (char *) &res, count); In function 'irdebi.isra.2', inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3, inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:668:3: drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] memcpy(av7110->debi_virt, (char *) &res, count); Apparently, 'count' can be negative here, which will then get turned into a giant size argument for memcpy. Changing the sizes to 'unsigned int' instead seems safe as we already check for maximum sizes, and it also simplifies the code a bit. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/av7110_hw.c | 8 ++++---- drivers/media/pci/ttpci/av7110_hw.h | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) commit 005145378c9ad7575a01b6ce1ba118fb427f583a Author: Arnd Bergmann Date: Thu Feb 2 12:36:01 2017 -0200 [media] dvb-usb-v2: avoid use-after-free I ran into a stack frame size warning because of the on-stack copy of the USB device structure: drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usbv2_disconnect': drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:1029:1: error: the frame size of 1104 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Copying a device structure like this is wrong for a number of other reasons too aside from the possible stack overflow. One of them is that the dev_info() call will print the name of the device later, but AFAICT we have only copied a pointer to the name earlier and the actual name has been freed by the time it gets printed. This removes the on-stack copy of the device and instead copies the device name using kstrdup(). I'm ignoring the possible failure here as both printk() and kfree() are able to deal with NULL pointers. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2fd632a00383e812db7186f903ebed808d9951bd Author: Shanker Donthineni Date: Wed Jan 25 21:51:41 2017 -0600 irqchip/gic-v3-its: Enable cacheable attribute Read-allocate hints Read-allocation hints are not enabled for both the GIC-ITS and GICR tables. This forces the hardware to always read the table contents from an external memory (DDR) which is slow compared to cache memory. Most of the tables are often read by hardware. So, it's better to enable Read-allocate hints in addition to Write-allocate hints in order to improve the GICR_PEND, GICR_PROP, Collection, Device, and vCPU tables lookup time. Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6467753d613993f30965d4e0717f7304eb933ef7 Author: David Carrillo-Cisneros Date: Tue Feb 7 21:28:40 2017 -0800 tools lib traceevent: Robustify do_generate_dynamic_list_file The dynamic-list-file used to export dynamic symbols introduced in commit e3d09ec8126f ("tools lib traceevent: Export dynamic symbols used by traceevent plugins") is generated without any sort of error checking. I experienced problems due to an old version of nm (v 0.158) that outputs in a format distinct from the assumed by the script. Robustify the built of dynamic symbol list by enforcing that the second column of $(NM) -u is either "U" (Undefined), "W" or "w" (undefined weak), which are the possible outputs from non-ancient $(NM) versions. Print an error if format is unexpected. v2: Accept "W" and "w" symbol options. Signed-off-by: David Carrillo-Cisneros Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Michal Marek Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Uwe Kleine-König Cc: Wang Nan Link: http://lkml.kernel.org/r/20170208052840.112182-1-davidcc@google.com [ Use STRING1 = STRING1 instead of == to make this work on Ubuntu systems ] Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 935b7f643018878bd9d4193eea8b575aff736b9b Author: Manuel Messner Date: Tue Feb 7 03:14:53 2017 +0100 netfilter: nft_exthdr: add TCP option matching This patch implements the kernel side of the TCP option patch. Signed-off-by: Manuel Messner Reviewed-by: Florian Westphal Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 17 ++++- net/netfilter/Kconfig | 4 +- net/netfilter/nft_exthdr.c | 119 +++++++++++++++++++++++++++---- 3 files changed, 124 insertions(+), 16 deletions(-) commit edee4f1e92458299505ff007733f676b00c516a1 Author: Florian Westphal Date: Fri Feb 3 13:35:50 2017 +0100 netfilter: nft_ct: add zone id set support zones allow tracking multiple connections sharing identical tuples, this is needed e.g. when tracking distinct vlans with overlapping ip addresses (conntrack is l2 agnostic). Thus the zone has to be set before the packet is picked up by the connection tracker. This is done by means of 'conntrack templates' which are conntrack structures used solely to pass this info from one netfilter hook to the next. The iptables CT target instantiates these connection tracking templates once per rule, i.e. the template is fixed/tied to particular zone, can be read-only and therefore be re-used by as many skbs simultaneously as needed. We can't follow this model because we want to take the zone id from an sreg at rule eval time so we could e.g. fill in the zone id from the packets vlan id or a e.g. nftables key : value maps. To avoid cost of per packet alloc/free of the template, use a percpu template 'scratch' object and use the refcount to detect the (unlikely) case where the template is still attached to another skb (i.e., previous skb was nfqueued ...). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) commit 5c178d81b69f08ca3195427a6ea9a46d9af23127 Author: Florian Westphal Date: Fri Feb 3 13:35:49 2017 +0100 netfilter: nft_ct: prepare for key-dependent error unwind Next patch will add ZONE_ID set support which will need similar error unwind (put operation) as conntrack labels. Prepare for this: remove the 'label_got' boolean in favor of a switch statement that can be extended in next patch. As we already have that in the set_destroy function place that in a separate function and call it from the set init function. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit ab23821f7ecfb022a4aec78fb6f4fd0f6aa1ccab Author: Florian Westphal Date: Fri Feb 3 13:35:48 2017 +0100 netfilter: nft_ct: add zone id get support Just like with counters the direction attribute is optional. We set priv->dir to MAX unconditionally to avoid duplicating the assignment for all keys with optional direction. For keys where direction is mandatory, existing code already returns an error. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_ct.c | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) commit 665153ff575207f3a092cfcea3c51238612a7b58 Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:13 2017 +0100 netfilter: nf_tables: add bitmap set type This patch adds a new bitmap set type. This bitmap uses two bits to represent one element. These two bits determine the element state in the current and the future generation that fits into the nf_tables commit protocol. When dumping elements back to userspace, the two bits are expanded into a struct nft_set_ext object. If no NFTA_SET_DESC_SIZE is specified, the existing automatic set backend selection prefers bitmap over hash in case of keys whose size is <= 16 bit. If the set size is know, the bitmap set type is selected if with 16 bit kets and more than 390 elements in the set, otherwise the hash table set implementation is used. For 8 bit keys, the bitmap consumes 66 bytes. For 16 bit keys, the bitmap takes 16388 bytes. Signed-off-by: Pablo Neira Ayuso net/netfilter/Kconfig | 6 + net/netfilter/Makefile | 1 + net/netfilter/nft_set_bitmap.c | 314 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 321 insertions(+) commit 0b5a78749260560f41e3b7c1f60f2c7dd9aff4f0 Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:12 2017 +0100 netfilter: nf_tables: add space notation to sets The space notation allows us to classify the set backend implementation based on the amount of required memory. This provides an order of the set representation scalability in terms of memory. The size field is still left in place so use this if the userspace provides no explicit number of elements, so we cannot calculate the real memory that this set needs. This also helps us break ties in the set backend selection routine, eg. two backend implementations provide the same performance. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 22 +++++++++++++++++----- net/netfilter/nft_set_hash.c | 1 + net/netfilter/nft_set_rbtree.c | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) commit 55af753cd9fda9c5300f5318253b08bd15fb412e Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:11 2017 +0100 netfilter: nf_tables: rename struct nft_set_estimate class field Use lookup as field name instead, to prepare the introduction of the memory class in a follow up patch. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 ++-- net/netfilter/nf_tables_api.c | 12 ++++++------ net/netfilter/nft_set_hash.c | 2 +- net/netfilter/nft_set_rbtree.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit 1f48ff6c5393aa7fe290faf5d633164f105b0aa7 Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:10 2017 +0100 netfilter: nf_tables: add flush field to struct nft_set_iter This provides context to walk callback iterator, thus, we know if the walk happens from the set flush path. This is required by the new bitmap set type coming in a follow up patch which has no real struct nft_set_ext, so it has to allocate it based on the two bit compact element representation. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 1 + net/netfilter/nf_tables_api.c | 4 ++++ 2 files changed, 5 insertions(+) commit 1ba1c41408df8a9d2f8b9b67e4c9e6f59b29d8ee Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:09 2017 +0100 netfilter: nf_tables: rename deactivate_one() to flush() Although semantics are similar to deactivate() with no implicit element lookup, this is only called from the set flush path, so better rename this to flush(). Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 8 ++++---- net/netfilter/nf_tables_api.c | 2 +- net/netfilter/nft_set_hash.c | 8 ++++---- net/netfilter/nft_set_rbtree.c | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) commit baa2d42cff088d9f962697a10e0345b444c8c409 Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:08 2017 +0100 netfilter: nf_tables: use struct nft_set_iter in set element flush Instead of struct nft_set_dump_args, remove unnecessary wrapper structure. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5cb82a38c6b5152b1deaba0c1596ce63222a4710 Author: Pablo Neira Ayuso Date: Wed Jan 18 18:30:07 2017 +0100 netfilter: nf_tables: pass netns to set->ops->remove() This new parameter is required by the new bitmap set type that comes in a follow up patch. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 ++- net/netfilter/nf_tables_api.c | 6 +++--- net/netfilter/nft_set_hash.c | 3 ++- net/netfilter/nft_set_rbtree.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) commit c078ca3b0c5bf82c2b31906c446d6e2ad8ea0783 Author: Phil Sutter Date: Tue Jan 17 22:51:26 2017 +0100 netfilter: nft_exthdr: Add support for existence check If NFT_EXTHDR_F_PRESENT is set, exthdr will not copy any header field data into *dest, but instead set it to 1 if the header is found and 0 otherwise. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 6 ++++++ net/netfilter/nft_exthdr.c | 22 ++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 57d7f939e7bdd746992f5c318a78697ba837c523 Author: Martin Schwidefsky Date: Tue Mar 22 10:54:24 2016 +0100 s390: add no-execute support Bit 0x100 of a page table, segment table of region table entry can be used to disallow code execution for the virtual addresses associated with the entry. There is one tricky bit, the system call to return from a signal is part of the signal frame written to the user stack. With a non-executable stack this would stop working. To avoid breaking things the protection fault handler checks the opcode that caused the fault for 0x0a77 (sys_sigreturn) and 0x0aad (sys_rt_sigreturn) and injects a system call. This is preferable to the alternative solution with a stub function in the vdso because it works for vdso=off and statically linked binaries as well. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cacheflush.h | 30 ++++++++-- arch/s390/include/asm/pgtable.h | 95 +++++++++++++++++++----------- arch/s390/include/asm/setup.h | 2 + arch/s390/kernel/early.c | 19 ++++++ arch/s390/kernel/entry.S | 12 ++-- arch/s390/kernel/kprobes.c | 8 ++- arch/s390/kernel/module.c | 3 +- arch/s390/kernel/vmlinux.lds.S | 9 ++- arch/s390/mm/dump_pagetables.c | 15 +++-- arch/s390/mm/fault.c | 42 +++++++++++-- arch/s390/mm/hugetlbpage.c | 10 +++- arch/s390/mm/init.c | 3 + arch/s390/mm/pageattr.c | 117 +++++++++++++++++-------------------- arch/s390/mm/pgtable.c | 2 + arch/s390/mm/vmem.c | 42 +++++++++---- 15 files changed, 277 insertions(+), 132 deletions(-) commit 2583b848cad049cf5f3f0a03af8b140668b376f3 Author: Martin Schwidefsky Date: Thu Mar 31 09:55:17 2016 +0200 s390: report new vector facilities Add hardware capability bits and feature tags to /proc/cpuinfo for the "Vector Packed Decimal Facility" (tag "vxd" / hwcap bit 2^12) and the "Vector Enhancements Facility 1" (tag "vxe" / hwcap bit 2^13). Signed-off-by: Martin Schwidefsky arch/s390/include/asm/elf.h | 2 ++ arch/s390/kernel/processor.c | 2 +- arch/s390/kernel/setup.c | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) commit 4920e3cf77347d7d7373552d4839e8d832321313 Author: Heiko Carstens Date: Sun Feb 5 23:03:18 2017 +0100 s390: use correct input data address for setup_randomness The current implementation of setup_randomness uses the stack address and therefore the pointer to the SYSIB 3.2.2 block as input data address. Furthermore the length of the input data is the number of virtual-machine description blocks which is typically one. This means that typically a single zero byte is fed to add_device_randomness. Fix both of these and use the address of the first virtual machine description block as input data address and also use the correct length. Fixes: bcfcbb6bae64 ("s390: add system information as device randomness") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f694bb3a36a8113addd31817e4b5aca42326353d Author: Heiko Carstens Date: Thu Feb 2 12:33:03 2017 +0100 s390/sclp: get rid of common response code handling Get rid of common response code handling. Each command requires its own response code handling anyway. Also the retry in case of -EBUSY does not work and can be simply removed. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.h | 1 - drivers/s390/char/sclp_early.c | 27 +++++++++++---------------- drivers/s390/char/sclp_early_core.c | 22 ++++++---------------- 3 files changed, 17 insertions(+), 33 deletions(-) commit 02407baaebdef86571e4e939ddbd3b32d9b5d389 Author: Heiko Carstens Date: Thu Feb 2 10:33:20 2017 +0100 s390/sclp: don't add new lines to each printed string The early vt220 sclp printk code added an extra new line to each printed multi-line text. If used for the early sclp console this will lead to numerous extra new lines. Therefore get rid of this semantic and require that each to be printed string contains a line feed character if a new line is wanted. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/als.c | 7 +++++-- arch/s390/kernel/swsusp.S | 2 +- drivers/s390/char/sclp_early_core.c | 16 +++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) commit d5ab7a34f9bbad54f89b812e6b0d2d898f9433db Author: Heiko Carstens Date: Tue Jan 24 15:58:52 2017 +0100 s390/sclp: make early sclp code readable This patch - unifies the old sclp early code and the sclp early printk code, so they can use common functions - makes sure all sclp early functions and variables have the same "sclp_early" prefix - converts the sclp early printk code into readable code by using existing data structures instead of hard coded magic arrays - splits the early sclp code into two files: sclp_early.c and sclp_early_core.c. The core file contains everything that is required by the kernel decompressor and may not call functions not contained within the core file. Otherwise the result would be a link error. - changes interrupt handling to be completely synchronous. The old early sclp code had a small window which allowed to receive several interrupts instead of exactly the single expected interrupt. This did hide a subtle potential bug, which is fixed with this large rework. - contains a couple of small cleanups. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/misc.c | 2 +- arch/s390/include/asm/sclp.h | 13 +- arch/s390/kernel/als.c | 10 +- arch/s390/kernel/early_printk.c | 2 +- arch/s390/kernel/ipl.c | 2 +- arch/s390/kernel/swsusp.S | 2 +- drivers/s390/char/sclp.c | 25 ---- drivers/s390/char/sclp.h | 34 ++++- drivers/s390/char/sclp_early.c | 178 ++++++++--------------- drivers/s390/char/sclp_early_core.c | 271 ++++++++++++++++++------------------ 10 files changed, 244 insertions(+), 295 deletions(-) commit 76fdf1416eed264dee18aa7db3a32dcfa8572e03 Author: Heiko Carstens Date: Fri Jan 27 15:54:57 2017 +0100 s390/sclp: disable early sclp code as soon as the base sclp driver is active Make sure the early sclp code does not generate any sclp requests anymore as soon as the base sclp driver is active. Otherwise both drivers may see unexpected requests or may miss expected interrupts. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.c | 7 ------- drivers/s390/char/sclp.h | 7 +++++++ drivers/s390/char/sclp_early_core.c | 4 ++++ 3 files changed, 11 insertions(+), 7 deletions(-) commit 9090f3feb3637dfdc20a5a4af88ed897b2fa894f Author: Heiko Carstens Date: Tue Jan 24 15:45:13 2017 +0100 s390/sclp: move early printk code to drivers Move the early sclp printk code to the drivers folder where also the rest of the sclp code can be found. This way it is possible to use the sclp private header files for further cleanups. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/Makefile | 3 +- arch/s390/kernel/Makefile | 10 +- arch/s390/kernel/sclp.c | 213 ------------------------------------ drivers/s390/char/Makefile | 16 ++- drivers/s390/char/sclp_early_core.c | 213 ++++++++++++++++++++++++++++++++++++ 5 files changed, 232 insertions(+), 223 deletions(-) commit d9c23523ed98a3acaa0bfd8fef143595d6aa631d Author: Sergey Senozhatsky Date: Sat Dec 24 23:09:01 2016 +0900 printk: drop call_console_drivers() unused param We do suppress_message_printing() check before we call call_console_drivers() now, so `level' param is not needed anymore. Link: http://lkml.kernel.org/r/20161224140902.1962-2-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Steven Rostedt Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit de6fcbdb68b29b475f4e6368cd465fd778ea421f Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:11 2016 +0900 printk: convert the rest to printk-safe This patch converts the rest of logbuf users (which are out of printk recursion case, but can deadlock in printk). To make printk-safe usage easier the patch introduces 4 helper macros: - logbuf_lock_irq()/logbuf_unlock_irq() lock/unlock the logbuf lock and disable/enable local IRQ - logbuf_lock_irqsave(flags)/logbuf_unlock_irqrestore(flags) lock/unlock the logbuf lock and saves/restores local IRQ state Link: http://lkml.kernel.org/r/20161227141611.940-9-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Steven Rostedt Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 103 +++++++++++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 38 deletions(-) commit 430ae1261c511efe9fc6293fbf24b1f71ea8c4ea Author: Piotr Oleszczyk Date: Wed Feb 1 18:26:42 2017 -0200 [media] add Hama Hybrid DVB-T Stick support Adding Hama Hybrid DVB-T Stick support. Technically it's the same device what Terratec Cinergy HT USB XE is. Signed-off-by: Piotr Oleszczyk Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb-usb-ids.h | 4 +++- drivers/media/usb/dvb-usb/dib0700_devices.c | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 8b1742c9c2071520efacf44e974dc03421360471 Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:10 2016 +0900 printk: remove zap_locks() function We use printk-safe now which makes printk-recursion detection code in vprintk_emit() unreachable. The tricky thing here is that, apart from detecting and reporting printk recursions, that code also used to zap_locks() in case of panic() from the same CPU. However, zap_locks() does not look to be needed anymore: 1) Since commit 08d78658f393 ("panic: release stale console lock to always get the logbuf printed out") panic flushing of `logbuf' to console ignores the state of `console_sem' by doing panic() console_trylock(); console_unlock(); 2) Since commit cf9b1106c81c ("printk/nmi: flush NMI messages on the system panic") panic attempts to zap the `logbuf_lock' spin_lock to successfully flush nmi messages to `logbuf'. Basically, it seems that we either already do what zap_locks() used to do but in other places or we ignore the state of the lock. The only reaming difference is that we don't re-init the console semaphore in printk_safe_flush_on_panic(), but this is not necessary because we don't call console drivers from printk_safe_flush_on_panic() due to the fact that we are using a deferred printk() version (as was suggested by Petr Mladek). Link: http://lkml.kernel.org/r/20161227141611.940-8-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Steven Rostedt Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 61 -------------------------------------------------- 1 file changed, 61 deletions(-) commit f975237b76827956fe13ecfe993a319158e2c303 Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:09 2016 +0900 printk: use printk_safe buffers in printk Use printk_safe per-CPU buffers in printk recursion-prone blocks: -- around logbuf_lock protected sections in vprintk_emit() and console_unlock() -- around down_trylock_console_sem() and up_console_sem() Note that this solution addresses deadlocks caused by printk() recursive calls only. That is vprintk_emit() and console_unlock(). The rest will be converted in a followup patch. Another thing to note is that we now keep lockdep enabled in printk, because we are protected against the printk recursion caused by lockdep in vprintk_emit() by the printk-safe mechanism - we first switch to per-CPU buffers and only then access the deadlock-prone locks. Examples: 1) printk() from logbuf_lock spin_lock section Assume the following code: printk() raw_spin_lock(&logbuf_lock); WARN_ON(1); raw_spin_unlock(&logbuf_lock); which now produces: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 366 at kernel/printk/printk.c:1811 vprintk_emit CPU: 0 PID: 366 Comm: bash Call Trace: warn_slowpath_null+0x1d/0x1f vprintk_emit+0x1cd/0x438 vprintk_default+0x1d/0x1f printk+0x48/0x50 [..] 2) printk() from semaphore sem->lock spin_lock section Assume the following code printk() console_trylock() down_trylock() raw_spin_lock_irqsave(&sem->lock, flags); WARN_ON(1); raw_spin_unlock_irqrestore(&sem->lock, flags); which now produces: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 363 at kernel/locking/semaphore.c:141 down_trylock CPU: 1 PID: 363 Comm: bash Call Trace: warn_slowpath_null+0x1d/0x1f down_trylock+0x3d/0x62 ? vprintk_emit+0x3f9/0x414 console_trylock+0x31/0xeb vprintk_emit+0x3f9/0x414 vprintk_default+0x1d/0x1f printk+0x48/0x50 [..] 3) printk() from console_unlock() Assume the following code: printk() console_unlock() raw_spin_lock(&logbuf_lock); WARN_ON(1); raw_spin_unlock(&logbuf_lock); which now produces: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 329 at kernel/printk/printk.c:2384 console_unlock CPU: 1 PID: 329 Comm: bash Call Trace: warn_slowpath_null+0x18/0x1a console_unlock+0x12d/0x559 ? trace_hardirqs_on_caller+0x16d/0x189 ? trace_hardirqs_on+0xd/0xf vprintk_emit+0x363/0x374 vprintk_default+0x18/0x1a printk+0x43/0x4b [..] 4) printk() from try_to_wake_up() Assume the following code: printk() console_unlock() up() try_to_wake_up() raw_spin_lock_irqsave(&p->pi_lock, flags); WARN_ON(1); raw_spin_unlock_irqrestore(&p->pi_lock, flags); which now produces: ------------[ cut here ]------------ WARNING: CPU: 3 PID: 363 at kernel/sched/core.c:2028 try_to_wake_up CPU: 3 PID: 363 Comm: bash Call Trace: warn_slowpath_null+0x1d/0x1f try_to_wake_up+0x7f/0x4f7 wake_up_process+0x15/0x17 __up.isra.0+0x56/0x63 up+0x32/0x42 __up_console_sem+0x37/0x55 console_unlock+0x21e/0x4c2 vprintk_emit+0x41c/0x462 vprintk_default+0x1d/0x1f printk+0x48/0x50 [..] 5) printk() from call_console_drivers() Assume the following code: printk() console_unlock() call_console_drivers() ... WARN_ON(1); which now produces: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 305 at kernel/printk/printk.c:1604 call_console_drivers CPU: 2 PID: 305 Comm: bash Call Trace: warn_slowpath_null+0x18/0x1a call_console_drivers.isra.6.constprop.16+0x3a/0xb0 console_unlock+0x471/0x48e vprintk_emit+0x1f4/0x206 vprintk_default+0x18/0x1a vprintk_func+0x6e/0x70 printk+0x3e/0x46 [..] 6) unsupported placeholder in printk() format now prints an actual warning from vscnprintf(), instead of 'BUG: recent printk recursion!'. ------------[ cut here ]------------ WARNING: CPU: 5 PID: 337 at lib/vsprintf.c:1900 format_decode Please remove unsupported % in format string CPU: 5 PID: 337 Comm: bash Call Trace: dump_stack+0x4f/0x65 __warn+0xc2/0xdd warn_slowpath_fmt+0x4b/0x53 format_decode+0x22c/0x308 vsnprintf+0x89/0x3b7 vscnprintf+0xd/0x26 vprintk_emit+0xb4/0x238 vprintk_default+0x1d/0x1f vprintk_func+0x6c/0x73 printk+0x43/0x4b [..] Link: http://lkml.kernel.org/r/20161227141611.940-7-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Reviewed-by: Steven Rostedt (VMware) kernel/printk/printk.c | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) commit ddb9baa822265b55afffd9815a2758a4b70006c1 Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:08 2016 +0900 printk: report lost messages in printk safe/nmi contexts Account lost messages in pritk-safe and printk-safe-nmi contexts and report those numbers during printk_safe_flush(). The patch also moves lost message counter to struct `printk_safe_seq_buf' instead of having dedicated static counters - this simplifies the code. Link: http://lkml.kernel.org/r/20161227141611.940-6-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Steven Rostedt Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/internal.h | 17 ----------------- kernel/printk/printk.c | 10 ---------- kernel/printk/printk_safe.c | 38 ++++++++++++++++++++++++++++---------- 3 files changed, 28 insertions(+), 37 deletions(-) commit 360e071b1822d40357e371357f24f6ec43f0a080 Author: Taeung Song Date: Wed Feb 1 21:34:07 2017 +0900 perf tools: Use zfree() to avoid keeping dangling pointers The cases changed in this patch are for when we free but keep the pointer to the freed area, which is not always a good idea. Be more defensive and zero the pointer to avoid possible use after free bugs to take more time to be detected. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485952447-7013-5-git-send-email-treeze.taeung@gmail.com [ rewrote commit log ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 506fde11a35f39e1b44478339c41e94dfd278aa2 Author: Taeung Song Date: Wed Feb 1 21:34:06 2017 +0900 perf tools: Use zfree() instead of ad hoc equivalent We have zfree(&ptr) for this very common pattern: free(ptr); ptr = NULL; So use it in a few more places. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485952447-7013-4-git-send-email-treeze.taeung@gmail.com [ rewrote commit log ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5aa365f29867eb739cde0713f00c7d80f36e0739 Author: Taeung Song Date: Wed Feb 1 21:34:05 2017 +0900 perf tools: Add missing check for failure in a zalloc() call Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485952447-7013-3-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 2 ++ 1 file changed, 2 insertions(+) commit 75fc5ae5cc53fff71041ecadeb3354a2b4c9fe42 Author: Taeung Song Date: Wed Feb 1 21:34:04 2017 +0900 perf tools: Only increase index if perf_evsel__new_idx() succeeds Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485952447-7013-2-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d5c3a937e0b3ac16d0d7d152fab6768f765350ac Author: Uwe Kleine-König Date: Thu Jul 21 11:48:32 2016 +0200 perf probe: Add option --symfs perf probe makes use of debug symbols, so add --symfs as the other commands have. Signed-off-by: Uwe Kleine-König Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel@pengutronix.de Link: http://lkml.kernel.org/r/1469094512-13440-2-git-send-email-u.kleine-koenig@pengutronix.de Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-probe.c | 2 ++ 1 file changed, 2 insertions(+) commit bed6838f0113ba72c35f14f9027f1db713ab4188 Author: Sakari Ailus Date: Wed Feb 1 10:48:06 2017 -0200 [media] et8ek8: Fix compiler / Coccinelle warnings Fix a compiler warning due to an unused but assigned variable. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d3e1b617ae20c459627f501b4bc55b1ea91f662b Author: Dmitry Torokhov Date: Thu Feb 2 17:41:28 2017 -0800 i2c: allow specify device properties in i2c_board_info With many drivers converting to using generic device properties, it is useful to provide array of device properties when instantiating new i2c client via i2c_board_info and have them automatically added to the device in question. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki drivers/i2c/i2c-core.c | 16 +++++++++++++++- include/linux/i2c.h | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 26db4d39064ed7feec873a860bee449b364e2e5b Author: Fengguang Wu Date: Tue Jan 31 12:20:27 2017 -0200 [media] media: fix semicolon.cocci warnings drivers/media/i2c/et8ek8/et8ek8_driver.c:1112:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Pavel Machek Signed-off-by: Fengguang Wu Acked-by: Pavel Machek Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91f2a7b24b8078f726c10bcae6750363518ed730 Author: Marek Szyprowski Date: Tue Jan 31 10:05:53 2017 -0200 [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter Add simple 'functionality' member to dummy Exynos IS i2c adapter to make i2c core happy and get rid of NULL pointer dereference during Exynos4 IS probe since v4.10-rc1: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 PID: 100 Comm: kworker/1:2 Not tainted 4.10.0-rc6-next-20170131-00054-g39e6e4233de6 #1921 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events deferred_probe_work_func task: ef2e0000 task.stack: ef2ec000 PC is at 0x0 LR is at i2c_register_adapter+0x98/0x5cc ... [] (i2c_register_adapter) from [] (fimc_is_i2c_probe+0x84/0xe4) [] (fimc_is_i2c_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x234/0x2dc) [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [] (bus_for_each_drv) from [] (__device_attach+0x9c/0x100) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (device_add+0x380/0x528) [] (device_add) from [] (of_platform_device_create_pdata+0x70/0xa4) [] (of_platform_device_create_pdata) from [] (of_platform_bus_create+0xec/0x320) [] (of_platform_bus_create) from [] (of_platform_populate+0x5c/0xac) [] (of_platform_populate) from [] (fimc_is_probe+0x1c0/0x4cc) [] (fimc_is_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x234/0x2dc) [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [] (bus_for_each_drv) from [] (__device_attach+0x9c/0x100) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x8c) [] (deferred_probe_work_func) from [] (process_one_work+0x120/0x31c) [] (process_one_work) from [] (process_scheduled_works+0x28/0x38) [] (process_scheduled_works) from [] (worker_thread+0x204/0x4ac) [] (worker_thread) from [] (kthread+0xfc/0x134) [] (kthread) from [] (ret_from_fork+0x14/0x3c) Signed-off-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is-i2c.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e22f709e055e0e71d65ae9bb9bf6d32c31f3a1ac Author: Niklas Söderlund Date: Tue Jan 31 10:08:31 2017 -0200 [media] v4l: of: check for unique lanes in data-lanes and clock-lanes All lanes in data-lanes and clock-lanes properties should be unique. Add a check for this in v4l2_of_parse_csi_bus() and print a warning if duplicated lanes are found. Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-of.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f3c826ac26766f82769319db68f5b4337d6efc24 Author: Ulf Hansson Date: Tue Jan 31 17:01:03 2017 +0100 PM / Domains: Correct comment in irq_safe_dev_in_no_sleep_domain() The earlier comment stated that the dev_warn_once() was going to be printed once per device. Let's fix that, as dev_warn_once() is printed only once, no matter of the device. Reported-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Acked-by: Lina Iyer Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2fe28feaebbbbe147e5e6e7bc68857f9bd7f6ad Author: Mauro Carvalho Chehab Date: Tue Jan 31 08:14:56 2017 -0200 [media] coda/imx-vdoa: constify structs As warned by checkpatch: WARNING: struct of_device_id should normally be const #318: FILE: drivers/media/platform/coda/imx-vdoa.c:318: +static struct of_device_id vdoa_dt_ids[] = { So, constify structs. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b200653518ea9ccc331b204c7d555d2440570d1 Author: Victor Kamensky Date: Mon Feb 6 15:48:28 2017 -0800 perf symbols: Take into account symfs setting when reading file build ID After commit 5baecbcd9c9a ("perf symbols: we can now read separate debug-info files based on a build ID") and when --symfs option is used perf failed to pick up symbols for file with the same name between host and sysroot specified by --symfs option. One can see message like this: bin/bash with build id 26f0062cb6950d4d1ab0fd9c43eae8b10ca42062 not found, continuing without symbols It happens because code added by 5baecbcd9c9a opens files directly by dso->long_name without symbol_conf.symfs consideration, which as result picks one from the host. It reads its build ID and later even code finds another proper file in directory pointed by --symfs perf ignores it because build id mismatches. Fix is to use __symbol__join_symfs to adjust file name according to --symfs setting. If no --symfs passed the operation would noop and picks the same host file as before. Also note in latter tree after 5baecbcd9c9a commit additional check for '!dso->has_build_id' was added, so to observe error condition 'perf record' should run with --no-buildid, so perf.data itself would not have build id for target binary in buildid perf section and 'perf report' will pass '!dso->has_build_id' condition. Or target binary should not have build id, but the same binary on host has build id, again '!dso->has_build_id' will pass in this case and incorrect build id could be read if --symfs is used. Signed-off-by: Victor Kamensky Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Chris Phlipot Cc: Dima Kogan Cc: He Kuang Cc: Kan Liang Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: xe-linux-external@cisco.com Fixes: 5baecbcd9c9a ("perf symbols: we can now read separate debug-info files based on a build ID") Link: http://lkml.kernel.org/r/1486424908-17094-1-git-send-email-kamensky@cisco.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 27cf5706a04e53f6844c71be1cbbf1df665f5d19 Author: Ravi Bangoria Date: Fri Feb 3 15:56:42 2017 +0530 perf sdt: Show proper hint when event not yet in place via 'perf probe' All events from 'perf list', except SDT events, can be directly recorded with 'perf record'. But, the flow is little different for SDT events. Probe points for SDT event needs to be created using 'perf probe' before recording it using 'perf record'. Perf shows misleading hint when a user tries to record SDT event without first creating a probe point. Show proper hint there. Before patch: $ perf record -a -e sdt_glib:idle__add event syntax error: 'sdt_glib:idle__add' \___ unknown tracepoint Error: File /sys/kernel/debug/tracing/events/sdt_glib/idle__add not found. Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?. ... After patch: $ perf record -a -e sdt_glib:idle__add event syntax error: 'sdt_glib:idle__add' \___ unknown tracepoint Error: File /sys/kernel/debug/tracing/events/sdt_glib/idle__add not found. Hint: SDT event cannot be directly recorded on. Please first use 'perf probe sdt_glib:idle__add' before recording it. ... $ perf probe sdt_glib:idle__add Added new event: sdt_glib:idle__add (on %idle__add in /usr/lib64/libglib-2.0.so.0.5000.2) You can now use it in all perf tools, such as: perf record -e sdt_glib:idle__add -aR sleep 1 $ perf record -a -e sdt_glib:idle__add [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.175 MB perf.data ] Suggested-and-Acked-by: Ingo Molnar Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170203102642.17258-1-ravi.bangoria@linux.vnet.ibm.com [ s/Please use/Please first use/ and break the Hint line in two ] Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/tracing_path.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 80e5d455339ad15d0a5995c8b72d267ce1f70841 Author: Lee Jones Date: Wed Feb 8 12:27:30 2017 +0000 MAINTAINERS: Rework entry for Backlight - Add Daniel Thompson as Maintainer. - Add new files - Shift Jingoo down the list due to a lack of time. Signed-off-by: Lee Jones MAINTAINERS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 29058690bd66deae6edbe8538814c38e8fc52882 Author: Hugues Fruchet Date: Thu Feb 2 12:59:53 2017 -0200 [media] st-delta: debug: trace stream/frame information & summary Adds some trace points showing input compressed stream or output decoded frame information. Adds an unconditional trace point when streaming starts showing the compressed stream and the decoded frame information. Adds an unconditional trace point at instance closure summarizing into a single line the decoding process (stream information, decoded and output frames number, potential errors observed). Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/delta/Makefile | 2 +- drivers/media/platform/sti/delta/delta-debug.c | 72 ++++++++++++++++++++++++++ drivers/media/platform/sti/delta/delta-debug.h | 18 +++++++ drivers/media/platform/sti/delta/delta-v4l2.c | 30 +++++++++-- 4 files changed, 117 insertions(+), 5 deletions(-) commit 433ff5b4a29bef98dfb92b591983adc1d63e12e9 Author: Hugues Fruchet Date: Thu Feb 2 12:59:52 2017 -0200 [media] st-delta: add mjpeg support Adds support of DELTA MJPEG video decoder back-end, implemented by calling JPEG_DECODER_HW0 firmware using RPMSG IPC communication layer. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 12 +- drivers/media/platform/sti/delta/Makefile | 4 + drivers/media/platform/sti/delta/delta-cfg.h | 3 + drivers/media/platform/sti/delta/delta-mjpeg-dec.c | 455 +++++++++++++++++++++ drivers/media/platform/sti/delta/delta-mjpeg-fw.h | 225 ++++++++++ drivers/media/platform/sti/delta/delta-mjpeg-hdr.c | 149 +++++++ drivers/media/platform/sti/delta/delta-mjpeg.h | 35 ++ drivers/media/platform/sti/delta/delta-v4l2.c | 3 + 8 files changed, 885 insertions(+), 1 deletion(-) commit 017c324242c2e9724938ef193ac6cb4ec5131778 Author: Hugues Fruchet Date: Thu Feb 2 12:59:51 2017 -0200 [media] st-delta: EOS (End Of Stream) support EOS (End Of Stream) support allows user to get all the potential decoded frames remaining in decoder pipeline after having reached the end of video bitstream. To do so, user calls VIDIOC_DECODER_CMD(V4L2_DEC_CMD_STOP) which will drain the decoder and get the drained frames that are then returned to user. User is informed of EOS completion in two ways: - dequeue of an empty frame flagged to V4L2_BUF_FLAG_LAST - reception of a V4L2_EVENT_EOS event. If, unfortunately, no buffer is available on CAPTURE queue to return the empty frame, EOS is delayed till user queue one CAPTURE buffer. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/delta/delta-v4l2.c | 146 +++++++++++++++++++++++++- drivers/media/platform/sti/delta/delta.h | 23 ++++ 2 files changed, 168 insertions(+), 1 deletion(-) commit 91c83f395fbe7c89eca46ad2d5bde49f4f8de2c4 Author: Hugues Fruchet Date: Thu Feb 2 12:59:50 2017 -0200 [media] st-delta: rpmsg ipc support IPC (Inter Process Communication) support for communication with DELTA coprocessor firmware using rpmsg kernel framework. Based on 4 services open/set_stream/decode/close and their associated rpmsg messages. The messages structures are duplicated on both host and firmware side and are packed (use only of 32 bits size fields in messages structures to ensure packing). Each service is synchronous; service returns only when firmware acknowledges the associated command message. Due to significant parameters size exchanged from host to copro, parameters are not inserted in rpmsg messages. Instead, parameters are stored in physical memory shared between host and coprocessor. Memory is non-cacheable, so no special operation is required to ensure memory coherency on host and on coprocessor side. Multi-instance support and re-entrance are ensured using host_hdl and copro_hdl in message header exchanged between both host and coprocessor. This avoids to manage tables on both sides to get back the running context of each instance. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 1 + drivers/media/platform/sti/delta/Makefile | 2 +- drivers/media/platform/sti/delta/delta-ipc.c | 594 ++++++++++++++++++++++++++ drivers/media/platform/sti/delta/delta-ipc.h | 76 ++++ drivers/media/platform/sti/delta/delta-v4l2.c | 11 + drivers/media/platform/sti/delta/delta.h | 21 + 6 files changed, 704 insertions(+), 1 deletion(-) commit c502e583506ec94cee780c080fff7b4e9ef6ef61 Author: Hugues Fruchet Date: Thu Feb 2 12:59:49 2017 -0200 [media] st-delta: add memory allocator helper functions Helper functions used by decoder back-ends to allocate physically contiguous memory required by hardware video decoder. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/delta/Makefile | 2 +- drivers/media/platform/sti/delta/delta-mem.c | 51 ++++++++++++++++++++++++++++ drivers/media/platform/sti/delta/delta-mem.h | 14 ++++++++ drivers/media/platform/sti/delta/delta.h | 8 +++++ 4 files changed, 74 insertions(+), 1 deletion(-) commit f386509e49594591f80af2e5a73d4c9ce389aa29 Author: Hugues Fruchet Date: Thu Feb 2 12:59:48 2017 -0200 [media] st-delta: STiH4xx multi-format video decoder v4l2 driver This V4L2 driver enables DELTA multi-format video decoder of STMicroelectronics STiH4xx SoC series. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 28 + drivers/media/platform/Makefile | 2 + drivers/media/platform/sti/delta/Makefile | 2 + drivers/media/platform/sti/delta/delta-cfg.h | 61 + drivers/media/platform/sti/delta/delta-v4l2.c | 1813 +++++++++++++++++++++++++ drivers/media/platform/sti/delta/delta.h | 514 +++++++ 6 files changed, 2420 insertions(+) commit f34b87e486c5e2b219b1e21084299855ca25a05d Author: Hugues Fruchet Date: Thu Feb 2 12:59:47 2017 -0200 [media] MAINTAINERS: add st-delta driver Add entry for the STMicroelectronics DELTA driver. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9a80d024e5322eead7c43efcedce9bfc84b266fd Author: Hugues Fruchet Date: Thu Feb 2 12:59:46 2017 -0200 [media] ARM: multi_v7_defconfig: enable STMicroelectronics DELTA Support Enables support of STMicroelectronics STiH4xx SoC series DELTA multi-format video decoder V4L2 driver. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit a1f32ffcfb10bf4237dd9af3678a4382fdc344c5 Author: Hugues Fruchet Date: Thu Feb 2 12:59:45 2017 -0200 [media] ARM: dts: STiH407-family: add DELTA dt node This patch adds DT node for STMicroelectronics DELTA V4L2 video decoder Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/stih407-family.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ce0b001bda3a216e6df234e58bc2adf2dbe32858 Author: Hugues Fruchet Date: Thu Feb 2 12:59:44 2017 -0200 [media] Documentation: DT: add bindings for ST DELTA This patch adds DT binding documentation for STMicroelectronics DELTA V4L2 video decoder. Acked-by: Peter Griffin Signed-off-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/st,st-delta.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f23610245c1aa0e912476e642bd5107d04122230 Author: Andi Kleen Date: Fri Jan 27 18:03:40 2017 -0800 perf list: Add debug support for outputing alias string For debugging and testing it is useful to see the converted alias string. Add support to perf stat/record and perf list to print the alias conversion. The text string is saved in the alias structure. For perf stat/record it is folded into the normal -v. For perf list -v was taken, so we use --debug. Before: % perf list ... cache: l1d.replacement [L1D data line replacements] l1d_pend_miss.fb_full [Cycles a demand request was blocked due to Fill Buffers inavailability] After % perf list --debug ... cache: l1d.replacement [L1D data line replacements] cpu/umask=0x1,period=2000003,event=0x51/ l1d_pend_miss.fb_full [Cycles a demand request was blocked due to Fill Buffers inavailability] cpu/umask=0x2,period=2000003,cmask=1,event=0x48/ Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170128020345.19007-6-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-list.c | 3 +++ tools/perf/util/parse-events.y | 3 +++ tools/perf/util/pmu.c | 8 ++++++++ tools/perf/util/pmu.h | 1 + 4 files changed, 15 insertions(+) commit 231bb2aa32498cbebef1306889a02114e9dfc934 Author: Andi Kleen Date: Fri Jan 27 18:03:39 2017 -0800 perf pmu: Support event aliases for non cpu// pmus The code for handling pmu aliases without specifying the PMU hardcoded only supported the cpu PMU. This patch extends it to work for all PMUs. We always duplicate the event for all PMUs that have an matching alias. This allows to automatically expand an alias for all instances of a PMU (so for example you can monitor all cache boxes with a single event) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170128020345.19007-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 46 ++++++++++++++++++++++++------------------ tools/perf/util/parse-events.y | 32 ++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 27 deletions(-) commit 15b22ed369aa23ef4d083ffb9621650c353d3ddd Author: Andi Kleen Date: Fri Jan 27 18:03:38 2017 -0800 perf pmu: Support per pmu json aliases Add support for registering json aliases per PMU. Any alias with an unit matching the prefix is registered to the PMU. Uncore has multiple instances of most units, so all these aliases get registered for each individual PMU (this is important later to run the event on every instance of the PMU). To avoid printing the events multiple times in perf list filter out duplicated events during printing. v2: Rely on uncore_ prefix already in unit v3: Document why calls were reordered Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170128020345.19007-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit fedb2b518239cbc00abcf0d200e0be8436251c11 Author: Andi Kleen Date: Fri Jan 27 18:03:37 2017 -0800 perf jevents: Add support for parsing uncore json files Handle the "Unit" field, which is needed to find the right PMU for an event. We call it "pmu" and convert it to the perf pmu name with an uncore prefix. Handle the "ExtSel" field, which just extends the event mask with an additional bit. Handle the "Filter" field which adds parameters to the main event to configure filtering. Handle the "Unit" field which declares the unit the values should be scaled too (similar to what the kernel exports) Set up the "perpkg" field for uncore events so that perf knows they are per package (similar to what the kernel exports) Then output the fields into the pmu-events data structures which are compiled into perf. Filter out zero fields, except for the event itself. v2: Fix compilation. Add uncore_ prefix at pre-processing time. Move eventcode change to separate patch. v3: Remove extra __maybe_unused v4: dont duplicate aliases for cpu pmu events Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170128020345.19007-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 74 +++++++++++++++++++++++++++++++++++--- tools/perf/pmu-events/jevents.h | 4 ++- tools/perf/pmu-events/pmu-events.h | 3 ++ tools/perf/util/pmu.c | 30 +++++++++++----- 4 files changed, 98 insertions(+), 13 deletions(-) commit d581141970ef3965c1624960fa928d765afd8a3e Author: Andi Kleen Date: Fri Jan 27 18:03:36 2017 -0800 perf jevents: Parse eventcode as number The next patch needs to modify event code. Previously eventcode was just passed through as a string. Now parse it as a number. v2: Don't special case 0 Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170128020345.19007-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4d416436f382c64675910bc2cd41ef6e57a249f6 Author: He Kuang Date: Tue Feb 7 07:34:12 2017 +0000 perf bpf: Add missing newline in debug messages These two debug messages are missing the trailing newline. Signed-off-by: He Kuang Cc: Alexander Shishkin Cc: Bintian Wang Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Wang Nan Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170207073412.26983-2-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bb53c9f124bd9297f18d58a395cff59dfaf8541 Author: He Kuang Date: Tue Feb 7 07:34:11 2017 +0000 perf tools arm64: Add support for generating bpf prologue Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name to offset for arm64, so the BPF prologue feature is ready to use. Signed-off-by: He Kuang Reviewed-by: Will Deacon Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Bintian Wang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170207073412.26983-1-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/util/dwarf-regs.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit cdd7950e7aa4a4d0d8ba71e3967aae6d25d09b03 Author: Douglas Anderson Date: Fri Jan 20 11:14:15 2017 +0100 input: cros_ec_keyb: Add non-matrix buttons and switches On some newer boards using mkbp we're hooking up non-matrix buttons and switches to the EC but NOT to the main application processor. Let's add kernel support to handle this. Rather than creating a whole new input driver, we'll continue to use cros_ec_keyb and just report the new keys. Signed-off-by: Douglas Anderson Signed-off-by: Enric Balletbo i Serra Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones drivers/input/keyboard/cros_ec_keyb.c | 447 ++++++++++++++++++++++++++++++---- 1 file changed, 402 insertions(+), 45 deletions(-) commit b44c4d3f1ee77e7947c525d6a907c0057fa238d2 Author: Douglas Anderson Date: Fri Jan 20 11:14:14 2017 +0100 mfd: cros-ec: Update cros_ec_commands.h for buttons and switches Add the defines for the new buttons and switches connected to the CrosEC. Signed-off-by: Douglas Anderson Signed-off-by: Enric Balletbo i Serra Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 73 +++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) commit d45cb20e123c5d7d6cd56301bc98f0bfd725cd77 Author: Emmanuel Grumbach Date: Wed Dec 28 10:43:02 2016 +0200 iwlwifi: mvm: use the PROBE_RESP_QUEUE to send deauth to unknown station When we send a deauth to a station we don't know about, we need to use the PROBE_RESP queue. This can happen when we send a deauth to a station that is not associated to us. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5351f9ab254c30d41659924265f1ecd7b4758d9e Author: Sara Sharon Date: Tue Jan 3 21:03:35 2017 +0200 iwlwifi: mvm: fix reorder timer re-arming When NSSN is behind the reorder buffer due to timeout the reorder timer isn't getting re-armed until NSSN catches up. Fix it. Fixes: 0690405fef29 ("iwlwifi: mvm: add reorder timeout per frame") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c56108b58ab870892277940a1def0d6b153f3e26 Author: Sara Sharon Date: Sun Jan 1 18:42:23 2017 +0200 iwlwifi: mvm: fix references to first_agg_queue in DQA mode In DQA mode, first_agg_queue is initialized to IWL_MVM_DQA_MIN_DATA_QUEUE. This causes two bugs in the tx response flow: 1. When TX fails, we set IEEE80211_TX_STAT_AMPDU_NO_BACK regardless if we actually have aggregation open on the queue. This causes mac80211 to send a BAR frame even though there is no aggregation open. Fix that by simply checking the AMPDU flag that is set on by mac80211 for AMPDU packets. 2. When reclaiming frames in aggregation mode, we reclaim based on scheduler ssn and not the SN. The reason is that scheduler ssn may be ahead of SN due to a hole in the BA window that was filled. However, if we have aggregations open on IWL_MVM_DQA_BSS_CLIENT_QUEUE the reclaim flow will still go to the code of non-aggregation instead of the aggregation code since IWL_MVM_DQA_BSS_CLIENT_QUEUE is smaller than IWL_MVM_DQA_MIN_DATA_QUEUE, although it is a valid aggregation queue. Fix that by always using the aggregation reclaim code by default in DQA mode (currently it is implicitly used by default for all queues except the reserved BSS queue). Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3374c3ab7f61cf820854cfe36405e4dcfc22a211 Author: Gregory Greenman Date: Wed Dec 21 16:18:44 2016 +0200 iwlwifi: mvm: fix a print of NSS for HT rate Handling of the number of space time streams was missing for HT rate in rate printing function. Fix it. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 2 ++ 1 file changed, 2 insertions(+) commit f4a1f04a3f66aebbe8665a28d9cf0b5e3d1c6f9d Author: Golan Ben Ami Date: Thu Dec 15 10:22:36 2016 +0200 iwlwifi: pcie: Re-configure IVAR table after stop device When getting RF_KILL and disabling radio, the device gets stopped and reset. This erases the IVAR table that matches the interrupt to its cause, and is essential for MSIX proper functionality. Till now, the table wasn't re-configured after the reset, and therefore the interrupt that enabled radio didn't fire on the right irq, and the driver didn't handle it correctly. To fix this, configure the IVAR table again after resetting the device. Signed-off-by: Golan Ben-Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d7270d619aaf4ce0e3d079fbdcae274476883e47 Author: Haim Dreyfuss Date: Mon Dec 12 14:09:49 2016 +0200 iwlwifi: pcie: re-configure IVAR table after suspend-resume During the suspend/resume flow some HW blocks are reset. This causes the IVAR table to be completely erased. This table is where interrupt causes are bound to specific IRQs. When the table is empty the interrupt handlers are not called correctly. Fix this by reconfiguring the IVAR table after resume. Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX") Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 8373005805043efa038ca00401b9bf6959031854 Author: Haim Dreyfuss Date: Tue Dec 13 12:40:34 2016 +0200 iwlwifi: pcie: separate between SW and HW MSIX configuration The MSIX configuration flow includes two different stages: configuring the HW by writing to the IVAR table and configuring the SW to reflect the HW configuration. The HW configuration is needed on each HW reset, whereas the SW configuration is only needed during the init flow. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 7acac3445acde1c94054cde69ab53503d296c393 Author: Sergey Senozhatsky Date: Tue Feb 7 01:42:53 2017 +0900 printk: always use deferred printk when flush printk_safe lines Always use printk_deferred() in printk_safe_flush_line(). Flushing can be done from NMI or printk_safe contexts (when we are in panic), so we can't call console drivers, yet still want to store the messages in the logbuf buffer. Therefore we use a deferred printk version. Link: http://lkml.kernel.org/r/20170206164253.GA463@tigerII.localdomain Cc: Andrew Morton Cc: Linus Torvalds Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Suggested-by: Petr Mladek Signed-off-by: Petr Mladek Reviewed-by: Steven Rostedt (VMware) kernel/printk/printk_safe.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 099f1c84c0052ec1b27f1c3942eed5830d86bdbb Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:06 2016 +0900 printk: introduce per-cpu safe_print seq buffer This patch extends the idea of NMI per-cpu buffers to regions that may cause recursive printk() calls and possible deadlocks. Namely, printk() can't handle printk calls from schedule code or printk() calls from lock debugging code (spin_dump() for instance); because those may be called with `sem->lock' already taken or any other `critical' locks (p->pi_lock, etc.). An example of deadlock can be vprintk_emit() console_unlock() up() << raw_spin_lock_irqsave(&sem->lock, flags); wake_up_process() try_to_wake_up() ttwu_queue() ttwu_activate() activate_task() enqueue_task() enqueue_task_fair() cfs_rq_of() task_of() WARN_ON_ONCE(!entity_is_task(se)) vprintk_emit() console_trylock() down_trylock() raw_spin_lock_irqsave(&sem->lock, flags) ^^^^ deadlock and some other cases. Just like in NMI implementation, the solution uses a per-cpu `printk_func' pointer to 'redirect' printk() calls to a 'safe' callback, that store messages in a per-cpu buffer and flushes them back to logbuf buffer later. Usage example: printk() printk_safe_enter_irqsave(flags) // // any printk() call from here will endup in vprintk_safe(), // that stores messages in a special per-CPU buffer. // printk_safe_exit_irqrestore(flags) The 'redirection' mechanism, though, has been reworked, as suggested by Petr Mladek. Instead of using a per-cpu @print_func callback we now keep a per-cpu printk-context variable and call either default or nmi vprintk function depending on its value. printk_nmi_entrer/exit and printk_safe_enter/exit, thus, just set/celar corresponding bits in printk-context functions. The patch only adds printk_safe support, we don't use it yet. Link: http://lkml.kernel.org/r/20161227141611.940-4-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Reviewed-by: Steven Rostedt (VMware) include/linux/printk.h | 21 +++++--- kernel/printk/Makefile | 2 +- kernel/printk/internal.h | 76 ++++++++++++++++++-------- kernel/printk/printk.c | 3 -- kernel/printk/printk_safe.c | 128 +++++++++++++++++++++++++++++++++++--------- 5 files changed, 172 insertions(+), 58 deletions(-) commit f92bac3b141b8233e34ddf32d227e12bfba07b48 Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:05 2016 +0900 printk: rename nmi.c and exported api A preparation patch for printk_safe work. No functional change. - rename nmi.c to print_safe.c - add `printk_safe' prefix to some (which used both by printk-safe and printk-nmi) of the exported functions. Link: http://lkml.kernel.org/r/20161227141611.940-3-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Steven Rostedt Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek include/linux/printk.h | 12 +- init/Kconfig | 16 +-- init/main.c | 2 +- kernel/kexec_core.c | 2 +- kernel/panic.c | 4 +- kernel/printk/Makefile | 2 +- kernel/printk/nmi.c | 291 -------------------------------------------- kernel/printk/printk_safe.c | 291 ++++++++++++++++++++++++++++++++++++++++++++ lib/nmi_backtrace.c | 2 +- 9 files changed, 312 insertions(+), 310 deletions(-) commit bd66a89249892acc9d938ba4956066b21403fa5f Author: Sergey Senozhatsky Date: Tue Dec 27 23:16:04 2016 +0900 printk: use vprintk_func in vprintk() vprintk(), just like printk(), better be using per-cpu printk_func instead of direct vprintk_emit() call. Just in case if vprintk() will ever be called from NMI, or from any other context that can deadlock in printk(). Link: http://lkml.kernel.org/r/20161227141611.940-2-sergey.senozhatsky@gmail.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Jan Kara Cc: Tejun Heo Cc: Calvin Owens Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Reviewed-by: Steven Rostedt Signed-off-by: Petr Mladek kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80fbd89cbd07287a7013006c14ddec923b7a4ff6 Author: Paolo Bonzini Date: Wed Feb 8 10:57:24 2017 +0100 KVM: x86: fix compilation Fix rebase breakage from commit 55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall", 2017-01-24), courtesy of the "I could have sworn I had pushed the right branch" department. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bee427b86217b78a0a5fc85575cc155e4c32bbf9 Author: Andrzej Zaborowski Date: Wed Jan 25 12:43:41 2017 +0100 cfg80211: Pass new RSSI level in CQM RSSI notification Update the drivers to pass the RSSI level as a cfg80211_cqm_rssi_notify parameter and pass this value to userspace in a new nl80211 attribute. This helps both userspace and also helps in the implementation of the multiple RSSI thresholds CQM mechanism. Note for marvell/mwifiex I pass 0 for the RSSI value because the new RSSI value is not available to the driver at the time of the cfg80211_cqm_rssi_notify call, but the driver queries the new value immediately after that, so it is actually available just a moment later if we wanted to defer caling cfg80211_cqm_rssi_notify until that moment. Without this, the new cfg80211 code (patch 3) will call .get_station which will send a duplicate HostCmd_CMD_RSSI_INFO command to the hardware. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++-- drivers/net/wireless/rndis_wlan.c | 2 +- include/net/cfg80211.h | 3 ++- include/uapi/linux/nl80211.h | 3 +++ net/mac80211/mlme.c | 2 +- net/wireless/nl80211.c | 9 +++++++-- net/wireless/trace.h | 11 +++++++---- 7 files changed, 23 insertions(+), 11 deletions(-) commit 769f07d8f0fb6a68a0eda6308bbe890bff894fd7 Author: Andrzej Zaborowski Date: Wed Jan 25 12:43:40 2017 +0100 mac80211: Pass new RSSI level in CQM RSSI notification Extend ieee80211_cqm_rssi_notify with a rssi_level parameter so that this information can be passed to netlink clients in the next patch, if available. Most drivers will have this value at hand. wl1251 receives events from the firmware that only tell it whether latest measurement is above or below threshold so we don't pass any value at this time (parameter is 0). Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/st/cw1200/sta.c | 2 +- drivers/net/wireless/ti/wl1251/event.c | 4 ++-- drivers/net/wireless/ti/wlcore/event.c | 3 ++- include/net/mac80211.h | 2 ++ net/mac80211/mlme.c | 7 ++++--- net/mac80211/trace.h | 11 +++++++---- 8 files changed, 21 insertions(+), 12 deletions(-) commit 548cf34b3a22262a798a4322048070271431a074 Author: Petr Mladek Date: Thu Dec 15 11:47:58 2016 +0100 MAINTAINERS: Add printk maintainers I and Sergey would like to volunteer as printk code maintainers. It is a code that everyone is using, various people fix bugs or even add features but there is nobody really interested into maintaining it. I and Sergey have put a lot of effort into understanding the code and related problems. We are working on solutions for some long term problems. There is a nice summary from the Kernel Summit presentation, see https://lwn.net/Articles/705938/ We have already started to use the gained knowledge and comment on other printk-related patches. The official role should help us to do it more effectively. Our priorities are: + prevent deadlocks (printk_safe patchset, console locks) + prevent softlocks (async printk, console_sem and flushing) + handle other bugs/fixes/features as they come with this in mind: + printk is used in different context + need special care in some modes, e.g. oops, panic, suspend + do best effort to store/show messages + the code is already pretty complicated and twisted; support clean ups; always think hard if a feature/fix is worth any complication Of course, it still will be much appreciated if other people review printk patches. Regarding the workflow. It will be highly appreciated if the patches might still go via Andrew's -mm tree at least for 4.10. In the long term, we would like to make Andrew's life easier and handle printk patches in an own git tree. But we first need to set it up and get familiar with the processes. Link: http://lkml.kernel.org/r/1481798878-31898-1-git-send-email-pmladek@suse.com Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Petr Mladek Signed-off-by: Sergey Senozhatsky Acked-by: Steven Rostedt MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit aad1e812eee31a0e075709c247577b0328a6deab Author: Arend Van Spriel Date: Fri Jan 27 12:27:44 2017 +0000 nl80211: fix validation of scheduled scan info for wowlan netdetect For wowlan netdetect a separate limit is defined for the number of matchsets. Currently, this limit is ignored and the regular limit for scheduled scan matchsets, ie. struct wiphy::max_match_sets, is used for the net-detect case as well. Cc: Johannes Berg Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/nl80211.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 66cd794e3c30b8af3b6befe42a378557efb3114a Author: Johannes Berg Date: Tue Feb 7 22:40:44 2017 +0200 nl80211: add HT/VHT capabilities to AP parameters For the benefit of drivers that rebuild IEs in firmware, parse the IEs for HT/VHT capabilities and the respective membership selector in the (extended) supported rates. This avoids duplicating the same code into all drivers that need this information. Signed-off-by: Johannes Berg include/linux/ieee80211.h | 3 ++- include/net/cfg80211.h | 8 ++++++++ net/wireless/nl80211.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 56 insertions(+), 2 deletions(-) commit a4956dca0764569640374ae1afb8be54a23201b8 Author: Luca Coelho Date: Tue Feb 7 22:13:56 2017 +0200 cfg80211: make rdev assignment clearer in nl80211_testmode_dump() Avoid assigning rdev to NULL when we already have it and getting it again from the wiphy index, by moving this code to relevant if block. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/wireless/nl80211.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b2347a322d1f6f93f1a39fe17ed08628fc959351 Author: Dan Carpenter Date: Tue Feb 7 16:20:53 2017 +0300 mac80211: check for allocation failure in debugfs code kmalloc() can fail. Also let's move the allocation out of the declaration block so it's easier to read. Fixes: 4a5eccaa9350 ("mac80211: Show pending txqlen in debugfs.") Signed-off-by: Dan Carpenter Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a4a741a04814170358f470d7103f8b13ceb6fefc Merge: 050f233 ab9bad0 Author: Paul Mackerras Date: Wed Feb 8 19:35:34 2017 +1100 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in a fix which touches both PPC and KVM code, which was therefore put into a topic branch in the powerpc tree. Signed-off-by: Paul Mackerras commit 26717828b75dd5c46e97f7f4a9b937d038bb2852 Author: Ard Biesheuvel Date: Mon Feb 6 10:49:28 2017 +0000 mac80211: aes-cmac: switch to shash CMAC driver Instead of open coding the CMAC algorithm in the mac80211 driver using byte wide xors and calls into the crypto layer for each block of data, instantiate a cmac(aes) synchronous hash and pass all the data into it directly. This does not only simplify the code, it also allows the use of more efficient and more secure implementations, especially on platforms where SIMD ciphers have a considerable setup cost. Signed-off-by: Ard Biesheuvel Signed-off-by: Johannes Berg net/mac80211/aes_cmac.c | 126 ++++++++++-------------------------------------- net/mac80211/aes_cmac.h | 11 +++-- net/mac80211/key.h | 2 +- 3 files changed, 32 insertions(+), 107 deletions(-) commit fe8de3da13bdbcbe8b583a3bbadf677da0f04f83 Author: Ard Biesheuvel Date: Mon Feb 6 10:49:27 2017 +0000 mac80211: fils_aead: Use crypto api CMAC shash rather than bare cipher Switch the FILS AEAD code to use a cmac(aes) shash instantiated by the crypto API rather than reusing the open coded implementation in aes_cmac_vector(). This makes the code more understandable, and allows platforms to implement cmac(aes) in a more secure (*) and efficient way than is typically possible when using the AES cipher directly. So replace the crypto_cipher by a crypto_shash, and update the aes_s2v() routine to call the shash interface directly. * In particular, the generic table based AES implementation is sensitive to known-plaintext timing attacks on the key, to which AES based MAC algorithms are especially vulnerable, given that their plaintext is not usually secret. Time invariant alternatives are available (e.g., based on SIMD algorithms), but may incur a setup cost that is prohibitive when operating on a single block at a time, which is why they don't usually expose the cipher API. Signed-off-by: Ard Biesheuvel Signed-off-by: Johannes Berg net/mac80211/Kconfig | 1 + net/mac80211/aes_cmac.h | 4 --- net/mac80211/fils_aead.c | 74 +++++++++++++++++++++--------------------------- 3 files changed, 34 insertions(+), 45 deletions(-) commit b699b71d82e77203be43bda5ff1b72516f129581 Author: Pichugin Dmitry Date: Sat Jan 28 17:06:53 2017 +0300 cfg80211 debugfs: Cleanup some checkpatch issues This fixes the checkpatch.pl warnings: * Macros should not use a trailing semicolon. * Spaces required around that '='. * Symbolic permissions 'S_IRUGO' are not preferred. Signed-off-by: Dmitriy Pichugin Signed-off-by: Johannes Berg net/wireless/debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7ca00409b5bd6e79a03d1cf3982dc429f371c02b Author: Haim Dreyfuss Date: Mon Dec 12 13:57:02 2016 +0200 iwlwifi: pcie: move msix conf functions above other functions msix configuration functions should be called by other functions. For example by pcie_d3_resume, move it above to enable it. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 206 ++++++++++++------------ 1 file changed, 103 insertions(+), 103 deletions(-) commit 1051408f7ecdcd1baf86f5dd5fdc44740be3b23d Author: Ingo Molnar Date: Wed Feb 1 18:42:41 2017 +0100 sched/autogroup: Rename auto_group.[ch] to autogroup.[ch] The names are all 'autogroup', not 'auto_group' - so rename the kernel/sched/auto_group.[ch] to match the existing nomenclature. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/Makefile | 2 +- kernel/sched/auto_group.c | 271 ---------------------------------------------- kernel/sched/auto_group.h | 64 ----------- kernel/sched/autogroup.c | 271 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/autogroup.h | 64 +++++++++++ kernel/sched/sched.h | 2 +- 6 files changed, 337 insertions(+), 337 deletions(-) commit e2241be62deabe09d7c681326fcb0bc707082147 Merge: 70ea163 a050a57 Author: James Morris Date: Wed Feb 8 19:01:07 2017 +1100 Merge branch 'stable-4.10' of git://git.infradead.org/users/pcmoore/selinux into next commit f3c4c73704b2e1a66c74504721e0af403174fdd3 Author: Chunfeng Yun Date: Tue Feb 7 14:13:33 2017 +0800 usb: xhci-mtk: make the reference clock optional Make the reference clock optional for DTS backward compatibility and ignore the error if it does not exist. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit ca12cb7cb06d08e54e3ac23b1ebe5ed81d68dbf0 Author: Chunfeng Yun Date: Tue Feb 7 14:13:32 2017 +0800 usb: mtu3: make the reference clock optional Make the reference clock optional for DTS backward compatibility and ignore the error if it does not exist. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit cb6efc7bea96202dfd2ed6b34f20e3e291f2b6c0 Author: Chunfeng Yun Date: Tue Feb 7 14:13:31 2017 +0800 arm64: dts: mt8173: add reference clock for usb Due to the reference clock comes from 26M oscillator directly on mt8173, and it is a fixed-clock in DTS which always turned on, we ignore it before. But on some platforms, it comes from PLL, and need be controlled, so here add it, no matter it is a fixed-clock or not. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/mediatek/mt8173.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 23f378ad3bdb2b7ea9f005a398e77d7f43f24276 Author: Gustavo A. R. Silva Date: Tue Feb 7 22:01:35 2017 -0600 drivers: usb-misc: sisusbvga: remove dead code The condition modex % 16 cannot be true when modex value is equal to 640 The condition du & 0xff cannot be true when du value is equal to 0x1400 Addresses-Coverity-Id: 101163 Addresses-Coverity-Id: 744373 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb.c | 6 ------ 1 file changed, 6 deletions(-) commit 3d95521c12d84d917d2f7ec3e002d4b0e0ef3c28 Author: Gustavo A. R. Silva Date: Wed Feb 8 00:18:50 2017 -0600 drivers: usb: early: remove unused code Remove this line of code because devnum is overwritten before it can be used. This could happen if line of code 609 (goto try_again;) is executed. Otherwise, devnum is never used again. Addresses-Coverity-ID: 1226870 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/early/ehci-dbgp.c | 1 - 1 file changed, 1 deletion(-) commit 5bf63fb40eacb7ed1f1de70ae30a597313fa9960 Author: Dan Carpenter Date: Tue Feb 7 17:53:07 2017 +0300 drm/i915/gvt/kvmgt: remove some dead code "caps.buf" is always NULL here and "caps.size" is always zero. The code is a no-op and can be removed. Signed-off-by: Dan Carpenter Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 5 ----- 1 file changed, 5 deletions(-) commit e0fa56489f21e319d0aa9654834209faa3eb481d Author: Baoyou Xie Date: Tue Feb 7 08:56:39 2017 +0800 dt: bindings: add documentation for zx2967 family thermal sensor This patch adds dt-binding documentation for zx2967 family thermal sensor. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Reviewed-by: Shawn Guo Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/zx2967-thermal.txt | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) commit ef15d36154cc741d7ded4ae4fa0cf7987354e313 Author: Fabio Estevam Date: Wed Dec 28 14:48:48 2016 -0200 drm/fsl-dcu: check for clk_prepare_enable() error clk_prepare_enable() may fail, so we should better check its return value. Also place the of_node_put() function right after clk_prepare_enable(), in order to avoid calling of_node_put() twice in case clk_prepare_enable() fails. Signed-off-by: Fabio Estevam Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5d2883d51d60ce34a773d4a07b468216109d9030 Author: Fabio Estevam Date: Wed Dec 28 14:48:47 2016 -0200 drm/fsl-dcu: remove unneeded 'ret' assignment When devm_kzalloc() fails there is no need to assign an error code to the 'ret' variable as it will not be used after jumping to the 'err_node_put' label, so just remove the assignment. Signed-off-by: Fabio Estevam Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1ea0ce40690dff38935538e8dab7b12683ded0d3 Author: Antonio Murdaca Date: Thu Feb 2 16:22:57 2017 +0100 selinux: allow changing labels for cgroupfs This patch allows changing labels for cgroup mounts. Previously, running chcon on cgroupfs would throw an "Operation not supported". This patch specifically whitelist cgroupfs. The patch could also allow containers to write only to the systemd cgroup for instance, while the other cgroups are kept with cgroup_t label. Signed-off-by: Antonio Murdaca Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 2 ++ 1 file changed, 2 insertions(+) commit 291e9e3f6931eda50be839500c15b1135146aaf6 Author: Even Xu Date: Fri Feb 3 14:24:53 2017 +0800 HID: intel-ish-hid: ipc: check FW status to distinguish ISH resume paths For ISH resume, there are two paths, they need different way to handle: one where ISH is not powered off, in that case a simple resume message is enough, in other case we need a reset sequence. We can use ISH FW status to distinguish those two cases and handle them properly. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h | 8 +++++++ drivers/hid/intel-ish-hid/ipc/hw-ish.h | 12 ++++++++++ drivers/hid/intel-ish-hid/ipc/pci-ish.c | 34 ++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 10 deletions(-) commit f864b00e03a0308beae7c88e2e145a429d5872dd Merge: 4eaa39c 7ff093d Author: Dave Airlie Date: Wed Feb 8 11:34:56 2017 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - Add UHD support on TM2/TM2E boards. . adding interlace mode support and 297MHz pixel clock support for UHD mode, setting sysreg register in case of HW trigger mode, and adding SiI8620 MHL bridge device support. - Fix trigger mode issue on Rinato board. . On Rinato board, HW trigger mode doesn't work so fix it. - Some fixup and cleanup. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: fimd: Do not use HW trigger for exynos3250 drm/exynos/hdmi: add bridge support drm/exynos/decon5433: signal vblank only on odd fields drm/exynos/decon5433: add support for interlace modes drm/exynos/hdmi: fix PLL for 27MHz settings drm/exynos/hdmi: fix VSI infoframe registers drm/exynos/hdmi: add 297MHz pixel clock support drm/exynos: g2d: change platform driver name to 'exynos-drm-g2d' drm/exynos/decon5433: configure sysreg in case of hardware trigger commit 4eaa39c63caf535dc1a8cc43b9a8677a100c09e1 Merge: 26d7f34 213c4b9 Author: Dave Airlie Date: Wed Feb 8 11:28:19 2017 +1000 Merge branch 'drm-rockchip-next-2017-02-07' of https://github.com/markyzq/kernel-drm-rockchip into drm-next Single compile fix. * 'drm-rockchip-next-2017-02-07' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: cdn-dp: fix cdn-dp complie warning commit 605cdf0875f80300be47e79bd91b2d60916407d3 Author: Christophe JAILLET Date: Mon Feb 6 23:00:13 2017 +0100 gdrom: Add missing error code In case of error, 'err' is known to be 0 here, because of the previous test. Set it to a -ENOMEM instead. Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/cdrom/gdrom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bb42ca47401010fc02901b5e8f79e40a26f208cb Author: Ding Tianhong Date: Mon Feb 6 16:47:42 2017 +0000 clocksource/drivers/arm_arch_timer: Work around Hisilicon erratum 161010101 Erratum Hisilicon-161010101 says that the ARM generic timer counter "has the potential to contain an erroneous value when the timer value changes". Accesses to TVAL (both read and write) are also affected due to the implicit counter read. Accesses to CVAL are not affected. The workaround is to reread the system count registers until the value of the second read is larger than the first one by less than 32, the system counter can be guaranteed not to return wrong value twice by back-to-back read and the error value is always larger than the correct one by 32. Writes to TVAL are replaced with an equivalent write to CVAL. Signed-off-by: Ding Tianhong [Mark: split patch, fix Kconfig, reword commit message] Signed-off-by: Mark Rutland Acked-by: Daniel Lezcano Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 10 ++++++++ drivers/clocksource/arm_arch_timer.c | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit 16d10ef29f25aba923779234bb93a451b14d20e6 Author: Ding Tianhong Date: Mon Feb 6 16:47:41 2017 +0000 clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure Currently we have code inline in the arch timer probe path to cater for Freescale erratum A-008585, complete with ifdeffery. This is a little ugly, and will get worse as we try to add more errata handling. This patch refactors the handling of Freescale erratum A-008585. Now the erratum is described in a generic arch_timer_erratum_workaround structure, and the probe path can iterate over these to detect errata and enable workarounds. This will simplify the addition and maintenance of code handling Hisilicon erratum 161010101. Signed-off-by: Ding Tianhong [Mark: split patch, correct Kconfig, reword commit message] Signed-off-by: Mark Rutland Acked-by: Daniel Lezcano Signed-off-by: Daniel Lezcano arch/arm64/include/asm/arch_timer.h | 38 +++++---------- drivers/clocksource/Kconfig | 4 ++ drivers/clocksource/arm_arch_timer.c | 92 ++++++++++++++++++++++++------------ 3 files changed, 80 insertions(+), 54 deletions(-) commit 5444ea6a7f46276876e94ecf8d44615af1ef22f7 Author: Ding Tianhong Date: Mon Feb 6 16:47:40 2017 +0000 clocksource/drivers/arm_arch_timer: Remove fsl-a008585 parameter Having a command line option to flip the errata handling for a particular erratum is a little bit unusual, and it's vastly superior to pass this in the DT. By common consensus, it's best to kill off the command line parameter. Signed-off-by: Ding Tianhong [Mark: split patch, reword commit message] Signed-off-by: Mark Rutland Acked-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Documentation/admin-guide/kernel-parameters.txt | 9 --------- drivers/clocksource/arm_arch_timer.c | 14 -------------- 2 files changed, 23 deletions(-) commit 729e55225b1f6225ee7a2a358d5141a3264627c4 Author: Ding Tianhong Date: Mon Feb 6 16:47:39 2017 +0000 clocksource/drivers/arm_arch_timer: Add dt binding for hisilicon-161010101 erratum This erratum describes a bug in logic outside the core, so MIDR can't be used to identify its presence, and reading an SoC-specific revision register from common arch timer code would be awkward. So, describe it in the device tree. Signed-off-by: Ding Tianhong Acked-by: Rob Herring Signed-off-by: Mark Rutland Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/arm/arch_timer.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 7942f7b568d7cda28c3aea9c81d48490769c853c Author: Venkat Gopalakrishnan Date: Fri Feb 3 16:58:24 2017 -0800 scsi: ufs: dump hw regs on link failures Dump host state, power info and host/vendor specific registers on link failures. This provides useful info to debug the failures. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 9c46b8676271857e7580f120cb6f8eefa7239ff4 Author: Venkat Gopalakrishnan Date: Fri Feb 3 16:58:12 2017 -0800 scsi: ufs-qcom: dump additional testbus registers Change testbus default config, dump additional testbus registers along with other debug vendor specific registers. These additional info are useful in debugging link related failures. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 48 +++++++++++++++++++++++++++++++++++++++------ drivers/scsi/ufs/ufs-qcom.h | 1 + 2 files changed, 43 insertions(+), 6 deletions(-) commit 0701e49da9852e455d63efb7bcd225d3c8af11df Author: subhashj@codeaurora.org Date: Fri Feb 3 16:58:01 2017 -0800 scsi: ufs: kick start clock scaling only after device detection UFS clock scaling might start kicking in even before the device is running at the fastest interface speed which is undesirable. This change moves the clock scaling kick start only after the device is detected and running at the fastest interface speed. Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 401f1e4490ee9d6e74d7514903dd01dae61488bf Author: subhashj@codeaurora.org Date: Fri Feb 3 16:57:39 2017 -0800 scsi: ufs: don't suspend clock scaling during clock gating Currently we are suspending clock scaling during clock gating which doesn't allow us to have clock gating timeout lower than clock scaling polling window. If clock gating timeout is smaller than the clock scaling polling window then we will mostly suspend the clock scaling before clock scaling polling window expires and we might get stuck in same state (scaled down or scaled up) for quite a long time. And for this reason, we have clock gating timeout (150ms) greater than clock scaling polling window (100ms). We would like to have aggressive clock gating timeout even lower than the clock scaling polling window hence this change is decoupling the clock scaling suspend/resume from clock gate/ungate. We will not suspend the clock scaling as part of clock gating instead clock scaling context will schedule scaling suspend work if there are no more pending transfer requests. Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 185 ++++++++++++++++++++++++++++++++++++---------- drivers/scsi/ufs/ufshcd.h | 31 +++++++- 2 files changed, 171 insertions(+), 45 deletions(-) commit 6ba65588381d59ee412b7cb83752d582df731d5c Author: Gilad Broner Date: Fri Feb 3 16:57:28 2017 -0800 scsi: ufs: add host state prints in failure cases Whenever some UFS failure occurs the driver prints the UFS registers in order to help with analysis of the failure. However this may not be sufficient in some cases, so having the host controller state as it is represented and managed in the driver will contribute to analysis efforts. Added prints of various fields in the hba struct which may be of interest. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a3cd5ec55f6c72834f812f9150deb38ddc019782 Author: subhashj@codeaurora.org Date: Fri Feb 3 16:57:02 2017 -0800 scsi: ufs: add load based scaling of UFS gear UFS driver's load based clock scaling feature scales down the ufs related clocks in order to allow low power modes of chipsets. UniPro 1.6 supports maximum gear up to HS-G3 (High Speed Gear3) and some of the chipsets low power modes may not be allowed in HS-G3 hence this change adds support to scale gear between HS-G3 and HS-G1 based on same existing load based clock scaling logic. Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 594 ++++++++++++++++++++++++++++++++-------------- drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 428 insertions(+), 175 deletions(-) commit 7fabb77b3aa01651f9ebc7c139a253bcabb06880 Author: Gilad Broner Date: Fri Feb 3 16:56:50 2017 -0800 scsi: ufs: reduce printout for aborted requests Details printed for each request that is aborted can overload the target as there can be several requests that are aborted at once. This change will print full request details only for the first aborted request since the last link reset, and minimal details for other subsequent requests. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 46 ++++++++++++++++++++++++++++++++-------------- drivers/scsi/ufs/ufshcd.h | 3 +++ 2 files changed, 35 insertions(+), 14 deletions(-) commit e0b299e36004f58f844b776df58f6882877bb18a Author: Gilad Broner Date: Fri Feb 3 16:56:40 2017 -0800 scsi: ufs: skip request abort task when previous aborts failed On certain error conditions request abort task itself might fail when aborting a request. In such case, subsequent request aborts should skip issuing the abort task as it is expected to fail as well, and device reset handler will be called next. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 20 ++++++++++++++++++++ drivers/scsi/ufs/ufshcd.h | 3 +++ 2 files changed, 23 insertions(+) commit a050a570db0190164e7250013214e29a5a9803ee Author: Stephen Smalley Date: Tue Jan 31 11:54:04 2017 -0500 selinux: fix off-by-one in setprocattr SELinux tries to support setting/clearing of /proc/pid/attr attributes from the shell by ignoring terminating newlines and treating an attribute value that begins with a NUL or newline as an attempt to clear the attribute. However, the test for clearing attributes has always been wrong; it has an off-by-one error, and this could further lead to reading past the end of the allocated buffer since commit bb646cdb12e75d82258c2f2e7746d5952d3e321a ("proc_pid_attr_write(): switch to memdup_user()"). Fix the off-by-one error. Even with this fix, setting and clearing /proc/pid/attr attributes from the shell is not straightforward since the interface does not support multiple write() calls (so shells that write the value and newline separately will set and then immediately clear the attribute, requiring use of echo -n to set the attribute), whereas trying to use echo -n "" to clear the attribute causes the shell to skip the write() call altogether since POSIX says that a zero-length write causes no side effects. Thus, one must use echo -n to set and echo without -n to clear, as in the following example: $ echo -n unconfined_u:object_r:user_home_t:s0 > /proc/$$/attr/fscreate $ cat /proc/$$/attr/fscreate unconfined_u:object_r:user_home_t:s0 $ echo "" > /proc/$$/attr/fscreate $ cat /proc/$$/attr/fscreate Note the use of /proc/$$ rather than /proc/self, as otherwise the cat command will read its own attribute value, not that of the shell. There are no users of this facility to my knowledge; possibly we should just get rid of it. UPDATE: Upon further investigation it appears that a local process with the process:setfscreate permission can cause a kernel panic as a result of this bug. This patch fixes CVE-2017-2618. Signed-off-by: Stephen Smalley [PM: added the update about CVE-2017-2618 to the commit description] Cc: stable@vger.kernel.org # 3.5: d6ea83ec6864e Signed-off-by: Paul Moore security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80a94bb357813901e61f2dc80deae2015c50fdcd Author: Arnd Bergmann Date: Tue Feb 7 13:59:30 2017 +0100 scsi: aacraid: avoid open-coded upper_32_bits Shifting a dma_addr_t right by 32 bits causes a compile-time warning when that type is only 32 bit wide: drivers/scsi/aacraid/src.c: In function 'aac_src_start_adapter': drivers/scsi/aacraid/src.c:414:29: error: right shift count >= width of type [-Werror=shift-count-overflow] This changes the driver to use the predefined macros consistently, including one correct but open-coded upper_32_bits() instance. Fixes: d1ef4da8487f ("scsi: aacraid: added support for init_struct_8") Fixes: 423400e64d37 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e78395334ba6034b53e21e09ce8a50c303d130a9 Author: Wei Yongjun Date: Tue Feb 7 10:00:37 2017 -0800 Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76291469772fb932523c2e0003848934cd29e7cb Author: Colin Ian King Date: Tue Feb 7 11:51:29 2017 +0000 scsi: aacraid: rcode is unsigned and should be signed int aac_fib_send can return -ve error returns and hence rcode should be signed. Currently the rcode >= 0 check is always true and -ve errors are not being checked. Thanks to Dan Carpenter for spotting my original broken fix to this issue. Signed-off-by: Colin Ian King Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3efa70d78f218e4c9276b0bac0545e5184c1c47b Merge: 76e0e70 926af627 Author: David S. Miller Date: Tue Feb 7 16:29:30 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net The conflict was an interaction between a bug fix in the netvsc driver in 'net' and an optimization of the RX path in 'net-next'. Signed-off-by: David S. Miller commit 76e0e70e6452b971a69cc9794ff4a6715c11f7f2 Author: Felix Manlunas Date: Tue Feb 7 12:10:58 2017 -0800 liquidio: do not dereference pointer if it's NULL Fix smatch errors by not dereferencing iq pointer if it's NULL. See http://marc.info/?l=kernel-janitors&m=148637299004834&w=2 Reported-by: Dan Carpenter Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0f5bf6d0afe4be6e1391908ff2d6dc9730e91550 Author: Laura Abbott Date: Mon Feb 6 16:31:58 2017 -0800 arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX Both of these options are poorly named. The features they provide are necessary for system security and should not be considered debug only. Change the names to CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX to better describe what these options do. Signed-off-by: Laura Abbott Acked-by: Jessica Yu Signed-off-by: Kees Cook Documentation/DocBook/kgdb.tmpl | 8 ++++---- Documentation/security/self-protection.txt | 4 ++-- arch/Kconfig | 4 ++-- arch/arm/configs/aspeed_g4_defconfig | 4 ++-- arch/arm/configs/aspeed_g5_defconfig | 4 ++-- arch/arm/include/asm/cacheflush.h | 2 +- arch/arm/kernel/patch.c | 4 ++-- arch/arm/kernel/vmlinux.lds.S | 8 ++++---- arch/arm/mm/Kconfig | 2 +- arch/arm/mm/init.c | 4 ++-- arch/arm64/Kconfig.debug | 2 +- arch/arm64/kernel/insn.c | 2 +- arch/parisc/configs/712_defconfig | 1 - arch/parisc/configs/c3000_defconfig | 1 - arch/parisc/mm/init.c | 2 +- include/linux/filter.h | 4 ++-- include/linux/init.h | 4 ++-- include/linux/module.h | 2 +- init/main.c | 4 ++-- kernel/configs/android-recommended.config | 2 +- kernel/module.c | 6 +++--- kernel/power/hibernate.c | 2 +- kernel/power/power.h | 4 ++-- kernel/power/snapshot.c | 4 ++-- 24 files changed, 41 insertions(+), 43 deletions(-) commit ad21fc4faa2a1f919bac1073b885df9310dbc581 Author: Laura Abbott Date: Mon Feb 6 16:31:57 2017 -0800 arch: Move CONFIG_DEBUG_RODATA and CONFIG_SET_MODULE_RONX to be common There are multiple architectures that support CONFIG_DEBUG_RODATA and CONFIG_SET_MODULE_RONX. These options also now have the ability to be turned off at runtime. Move these to an architecture independent location and make these options def_bool y for almost all of those arches. Signed-off-by: Laura Abbott Acked-by: Ingo Molnar Acked-by: Heiko Carstens Signed-off-by: Kees Cook Documentation/security/self-protection.txt | 6 ++++++ arch/Kconfig | 34 ++++++++++++++++++++++++++++++ arch/arm/Kconfig | 4 ++++ arch/arm/Kconfig.debug | 11 ---------- arch/arm/mm/Kconfig | 12 ----------- arch/arm64/Kconfig | 5 ++--- arch/arm64/Kconfig.debug | 11 ---------- arch/parisc/Kconfig | 1 + arch/parisc/Kconfig.debug | 11 ---------- arch/s390/Kconfig | 5 ++--- arch/s390/Kconfig.debug | 3 --- arch/x86/Kconfig | 5 ++--- arch/x86/Kconfig.debug | 11 ---------- 13 files changed, 51 insertions(+), 68 deletions(-) commit fb6002a8268c493435d0e6d0d6ad17873919a7f6 Author: Chris Brandt Date: Fri Jan 27 15:02:15 2017 -0500 clocksource/drivers/ostm: Add renesas-ostm timer driver This patch adds a OSTM driver for the Renesas architecture. The OS Timer (OSTM) has independent channels that can be used as a freerun or interval times. This driver uses the first probed device as a clocksource and then any additional devices as clock events. Signed-off-by: Chris Brandt Signed-off-by: Daniel Lezcano arch/arm/mach-shmobile/Kconfig | 1 + drivers/clocksource/Kconfig | 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/renesas-ostm.c | 265 +++++++++++++++++++++++++++++++++++++ 4 files changed, 274 insertions(+) commit a1966cd29d5fee2fada47b82dcb73126eb65dfd4 Author: Chris Brandt Date: Fri Jan 27 15:02:14 2017 -0500 clocksource/drivers/ostm: Document renesas-ostm timer DT bindings Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/renesas,ostm.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 7b9f1d16e6d1268ed45d98b36c77f8920e7a209e Author: David Engraf Date: Wed Jan 11 14:50:59 2017 +0100 clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock On newer boards the TC can be read as single 32 bit value without locking. Thus the clock can be used as reference for sched_clock which is much more accurate than the jiffies implementation. Tested on a Atmel SAMA5D2 board. Signed-off-by: David Engraf Acked-by: Nicolas Ferre Signed-off-by: Daniel Lezcano drivers/clocksource/tcb_clksrc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 4750535bc94b86fde06b0e698d6bac738b020be4 Author: Linus Walleij Date: Sun Jan 22 13:17:17 2017 +0100 clocksource/drivers/gemini: Add driver for the Cortina Gemini This is a rewrite of the Gemini timer driver in arch/arm/mach-gemini/timer.c trying to do everything the device tree way: - Make every IO-access relative to a base address and dynamic so we can do a dynamic ioremap and get going. - Do not poke around directly in the global syscon registers, access them using the syscon regmap style design pattern for the one register we need to check. - Find register range and interrupt from the device tree. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 10 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-gemini.c | 277 +++++++++++++++++++++++++++++++++++++ 3 files changed, 288 insertions(+) commit 9744b181ee3f0832e5a9a51055c8fd2c6ca6827a Author: Linus Walleij Date: Sun Jan 22 13:17:07 2017 +0100 clocksource: add DT bindings for Cortina Gemini This adds device tree bindings for the Cortina Systems Gemini timer block used in these SoCs. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Daniel Lezcano .../bindings/timer/cortina,gemini-timer.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 376bc27150f180d9f5eddec6a14117780177589d Author: Daniel Lezcano Date: Tue Apr 19 08:56:27 2016 +0200 clockevents: Add a clkevt-of mechanism like clksrc-of The current code uses the CLOCKSOURCE_OF_DECLARE macro to fill the clksrc table with a t-uple (name, init_function). Unfortunately it ends up to the clockevent and the clocksource being both initialized with this macro. It is not a problem by itself but there is not a clear distinction between a clockevent and a clocksource in the code initialization path. Somebody can argue there are the same IP block and the same DT node. But conceptually from the software side, there are two distincts entities and as is they should be initialized separetely. Some drivers which do not have a clocksource end up by using the CLOCKSOURCE_OF_DECLARE macro to declare a clockevent. Another result is the fuzzy organization in the clocksource directory, where the clockevents are implemented in the same file than the clocksources or file labelled timer-something implementing a clocksource. This patch provides another macro to specifically declare a clockevent in the same way than the clocksource and gives the opportunity to write two separate drivers, one for the clocksource and another for the clockevents. Hopefully, that can help to do some housework in the directory, perhaps split the drivers in to entities, for example: - clksrc-rockchip.c - clkevt-rockchip.c Also, it gives the possibility to declare clocksources separately in the DT and then use a clocksource from IP block while while clockevents are used from another IP block. Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 7 +++++ drivers/clocksource/Makefile | 1 + drivers/clocksource/clkevt-probe.c | 56 ++++++++++++++++++++++++++++++++++++++ include/linux/clockchips.h | 9 ++++++ 4 files changed, 73 insertions(+) commit 5739438b725c09938bb6af9e4477c4283b8326cf Author: Steven Rostedt (VMware) Date: Tue Feb 7 14:50:03 2017 -0500 ktest: Add variable run_command_status to save status of commands executed Create a variable called run_command_status that saves the status of the executed commands and can be used by other functions later to test for status. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c6057e101a2d09d24d84a3d2d701fd5e71f5e26a Author: Olof Johansson Date: Tue Feb 7 11:24:26 2017 -0800 ARM: ux500: remove deleted file from Makefile Cleanup removed the file, but Makefile was overlooked. Purge there too. Fixes: 4b483ed0be8b ('ARM: ux500: cut some platform data') Signed-off-by: Olof Johansson arch/arm/mach-ux500/Makefile | 1 - 1 file changed, 1 deletion(-) commit ca6d4480f87db9d9470d3d7bbe445953fa105e57 Author: stephen hemminger Date: Tue Feb 7 08:46:46 2017 -0800 bridge: avoid unnecessary read of jiffies Jiffies is volatile so read it once. Signed-off-by: Stephen Hemminger Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 6 ++++-- net/bridge/br_input.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 9bcdef3288f2f4d8b05d522128198fdcb3f07885 Author: Jiri Pirko Date: Tue Feb 7 17:27:47 2017 +0100 spectrum: acl_tcam: Fix catchall prio value This fixes an issue reported by smatch: mlxsw_sp_acl_tcam_chunk_create() warn: impossible condition '(priority == (-1)) => (0-u32max == u64max)' Reported-by: Or Gerlitz Reported-by: Ido Schimmel Reported-by: Dan Carpenter Fixes: 22a677661f56 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation") Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8cab863a75f2d353588d4c3c37dc37c77b96c83 Author: Roopa Prabhu Date: Tue Feb 7 06:43:23 2017 -0800 bridge: remove unnecessary check for vtbegin in br_fill_vlan_tinfo_range vtbegin should not be NULL in this function, Its already checked by the caller. this should silence the below smatch complaint: net/bridge/br_netlink_tunnel.c:144 br_fill_vlan_tinfo_range() error: we previously assumed 'vtbegin' could be null (see line 130) net/bridge/br_netlink_tunnel.c 129 130 if (vtbegin && vtend && (vtend->vid - vtbegin->vid) > 0) { ^^^^^^^ Check for NULL. Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Reported-By: Dan Carpenter Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_netlink_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85c727b5948344c8d559e2fda8925e9ddd41c29a Author: Marcelo Ricardo Leitner Date: Tue Feb 7 11:37:56 2017 -0200 sctp: drop __packed from almost all SCTP structures __packed is considered harmful as it potentially generates code that doesn't perform well and its usage should be avoided as much as possible. This patch drops __packed from all SCTP structures except one, which is sctp_signed_cookie. In there it's required, as per changelog on commit 9834a2bb4970 ("[SCTP]: Fix sctp_cookie alignment in the packet."). After this patch, no alignment changes neither in x86 or x86_64 and no exceptions were noticed during testing on both archs. Code size for SCTP module also didn't change with this patch. Cc: David Miller Cc: David Laight Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/linux/sctp.h | 80 +++++++++++++++++++++++----------------------- include/net/sctp/structs.h | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) commit bb580ad698aeb4e5455d701c228c50355f84c056 Author: Nikolay Aleksandrov Date: Tue Feb 7 12:46:46 2017 +0100 bridge: tunnel: fix attribute checks in br_parse_vlan_tunnel_info These checks should go after the attributes have been parsed otherwise we're using tb uninitialized. Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Reported-by: Colin Ian King Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink_tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1f02b5f42f53af516c4f5f747390e66d7a8f0bfe Author: Colin Ian King Date: Tue Feb 7 10:56:38 2017 +0000 net: bridge: remove redundant check to see if err is set The error check on err is redundant as it is being checked previously each time it has been updated. Remove this redundant check. Detected with CoverityScan, CID#140030("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 3 --- 1 file changed, 3 deletions(-) commit ee467fbaaf8eed86efc335753bd95971aa444f7a Author: Dan Carpenter Date: Tue Feb 7 10:44:31 2017 +0300 sfc: fix an off by one bug This bug is harmless because it's just a sanity check and we always pass valid values for "encap_type" but the test is off by one. Fixes: 9b4108012517 ("sfc: insert catch-all filters for encapsulated traffic") Signed-off-by: Dan Carpenter Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac6e058b75be71208e98a5808453aae9a17be480 Author: Lukasz Majewski Date: Tue Feb 7 06:20:24 2017 +0100 net: phy: dp83867: Recover from "port mirroring" N/A MODE4 The DP83867 when not properly bootstrapped - especially with LED_0 pin - can enter N/A MODE4 for "port mirroring" feature. To provide normal operation of the PHY, one needs not only to explicitly disable the port mirroring feature, but as well stop some IC internal testing (which disables RGMII communication). To do that the STRAP_STS1 (0x006E) register must be read and RESERVED bit 11 examined. When it is set, the another RESERVED bit (11) at PHYCR (0x0010) register must be clear to disable testing mode and enable RGMII communication. Thorough explanation of the problem can be found at following e2e thread: "DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) - Linux driver" https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/2096954#2096954 Signed-off-by: Lukasz Majewski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit fc6d39c39581f3c12c95f166ce95ef8beb2047e8 Author: Lukasz Majewski Date: Tue Feb 7 06:20:23 2017 +0100 net: phy: dp83867: Add lane swapping support in the DP83867 TI's PHY driver This patch adds support for enabling or disabling the lane swapping (called "port mirroring" in PHY's CFG4 register) feature of the DP83867 TI's PHY device. One use case is when bootstrap configuration enables this feature (because of e.g. LED_0 wrong wiring) so then one needs to disable it in software (at u-boot/Linux). Signed-off-by: Lukasz Majewski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 252ae5330daa121586e9713b704068851e8565d9 Author: Lukasz Majewski Date: Tue Feb 7 06:21:34 2017 +0100 Documentation: devicetree: Add PHY no lane swap binding Add the documentation to avoid PHY lane swapping. This is a boolean entry to notify the phy device drivers that the TX/RX lanes NO need to be swapped. The use case for this binding mostly happens after wrong HW configuration of PHY IC during bootstrap. Signed-off-by: Lukasz Majewski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/phy.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 9d312cfb3d91227423f6e0f318de01f317130be5 Merge: 501ec18 e69e462 Author: David S. Miller Date: Tue Feb 7 13:48:23 2017 -0500 Merge branch 'Incorrect-use-of-phy_read_status' Florian Fainelli says: ==================== net: Incorrect use of phy_read_status() This patch series removes incorrect uses of phy_read_status() which can clobber the PHY device link while we are executing with the state machine running. greth was potentially another candidate, but it does funky stuff with auto-negotation that I am still trying to understand. ==================== Signed-off-by: David S. Miller commit e69e46261063a25c3907bed16a2e9d18b115d1fd Author: Florian Fainelli Date: Mon Feb 6 15:55:23 2017 -0800 net: dsa: Do not clobber PHY link outside of state machine Calling phy_read_status() means that we may call into genphy_read_status() which in turn will use genphy_update_link() which can make changes to phydev->link outside of the state machine's state transitions. This is an invalid behavior that is now caught as of 811a919135b9 ("phy state machine: failsafe leave invalid RUNNING state") Reported-by: Zefir Kurtisi Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/slave.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6136c8fe53a8a28906e090ddd8914f9846eb8df8 Author: Florian Fainelli Date: Mon Feb 6 15:55:22 2017 -0800 net: netcp: Do not clobber PHY link outside of state machine Calling phy_read_status() means that we may call into genphy_read_status() which in turn will use genphy_update_link() which can make changes to phydev->link outside of the state machine's state transitions. This is an invalid behavior that is now caught as off 811a919135b9 ("phy state machine: failsafe leave invalid RUNNING state") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 2 -- 1 file changed, 2 deletions(-) commit 482ff9fdc84dd71099d54edb322a2b32d2f331e4 Author: Florian Fainelli Date: Mon Feb 6 15:55:21 2017 -0800 net: pxa168_eth: Do not clobber PHY link outside of state machine Calling phy_read_status() means that we may call into genphy_read_status() which in turn will use genphy_update_link() which can make changes to phydev->link outside of the state machine's state transitions. This is an invalid behavior that is now caught as of 811a919135b9 ("phy state machine: failsafe leave invalid RUNNING state") Since we don't have anything special, switch to the generic phy_ethtool_get_link_ksettings() function now. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/pxa168_eth.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 1105a2d3b36d1603043662d7f46c962b30ebca9e Author: Florian Fainelli Date: Mon Feb 6 15:55:20 2017 -0800 net: mv643xx_eth: Do not clobber PHY link outside of state machine Calling phy_read_status() means that we may call into genphy_read_status() which in turn will use genphy_update_link() which can make changes to phydev->link outside of the state machine's state transitions. This is an invalid behavior that is now caught as of 811a919135b9 ("phy state machine: failsafe leave invalid RUNNING state") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4b741bc35962ccf93b798a233512850c48c2646e Author: Thomas Petazzoni Date: Thu Feb 2 17:47:44 2017 +0100 dt-bindings: net: remove reference to fixed link support Contrary to what the Device Tree binding indicates, the binding for the PPv2 network device currently doesn't provide any fixed link functionality. This commit adjusts the Device Tree binding documentation accordingly. Reported-by: Russell King - ARM Linux Signed-off-by: Thomas Petazzoni Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/marvell-pp2.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 501ec18757abdaba95440dbbd1d5df0611f813c4 Merge: 219189e 8ca967a Author: David S. Miller Date: Tue Feb 7 13:44:08 2017 -0500 Merge tag 'mlx5-updates-2017-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-01-31 This series includes some updates to mlx5 core and ethernet driver. We got one patch from Or to fix some static checker warnings. 2nd patche from Dan came to add the support for 128B cache line in the HCA, which will configures the hardware to use 128B alignment only on systems with 128B cache lines, otherwise it will be kept as the current default of 64B. From me three patches to support no inline copy on TX on ConnectX-5 and later HCAs. Starting with two small infrastructure changes and refactoring patches followed by two patches to add the actual support for both xmit ndo and XDP xmit routines. Last patch is a simple fix to return a mistakenly removed pointer from the SQ structure, which was remove in previous submission of mlx5 4K UAR. Saeed. ==================== Signed-off-by: David S. Miller commit 219189e764be35372c298bee6492fc4c870b6ffd Author: Ivan Khoronzhuk Date: Tue Feb 7 00:53:45 2017 +0200 net: ethernet: ti: cpsw: remove netif_trans_update No need to update jiffies in txq->trans_start twice, it's supposed to be done in netdev_start_xmit() and anyway is re-written. Also, no reason to update trans time in case of an error. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 -- 1 file changed, 2 deletions(-) commit 919ce2a4f7487fea577131957448a457eb14d277 Merge: b44700e 3841340 Author: David S. Miller Date: Tue Feb 7 13:31:01 2017 -0500 Merge branch 'bnxt_en-Add-XDP-support' Michael Chan says: ==================== bnxt_en: Add XDP support. The first 10 patches refactor the code (rx/tx code paths and ring logic) and add the basic infrastructure to support XDP. The 11th patch adds basic ndo_xdp to support XDP_DROP and XDP_PASS only. The 12th patch completes the series with XDP_TX. Thanks to Andy Gospodarek for testing and uncovering some bugs. v3: Removed Kconfig option. Pass modified offset and length to stack for XDP_PASS. Improved buffer recycling scheme for XDP_TX. Other minor fixes. v2: Addressed review comments from Alexei Starovoitov, Jakub Kicinski, and David Miller: - Added missing dma syncs. - Added XDP headroom support. - Added tracing in exception path. - Clarified a parameter change. ==================== Signed-off-by: David S. Miller commit 38413406277fd060f46855ad527f6f8d4cf2652d Author: Michael Chan Date: Mon Feb 6 16:55:43 2017 -0500 bnxt_en: Add support for XDP_TX action. Add dedicated transmit function and transmit completion handler for XDP. The XDP transmit logic and completion logic are different than regular TX ring. The TX buffer is recycled back to the RX ring when it completes. v3: Improved the buffer recyling scheme for XDP_TX. v2: Add trace_xdp_exception(). Add dma_sync. Signed-off-by: Michael Chan Tested-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 36 ++++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 19 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 83 +++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 1 + 4 files changed, 122 insertions(+), 17 deletions(-) commit c6d30e8391b85e00eb544e6cf047ee0160ee9938 Author: Michael Chan Date: Mon Feb 6 16:55:42 2017 -0500 bnxt_en: Add basic XDP support. Add basic ndo_xdp support to setup and query program, configure the NIC to run in rx page mode, and support XDP_PASS, XDP_DROP, XDP_ABORTED actions only. v3: Pass modified offset and length to stack for XDP_PASS. Remove Kconfig option. v2: Added trace_xdp_exception() Added dma_syncs. Added XDP headroom support. Signed-off-by: Michael Chan Tested-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/Makefile | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 36 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 157 ++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 18 +++ 5 files changed, 214 insertions(+), 8 deletions(-) commit fa3e93e86cc3d1809fba67cb138883ed4bb74a5f Author: Michael Chan Date: Mon Feb 6 16:55:41 2017 -0500 bnxt_en: Refactor tx completion path. XDP_TX requires a different function to handle completion. Add a function pointer to handle tx completion logic. Regular TX rings will be assigned the current bnxt_tx_int() for the ->tx_int() function pointer. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 5f4492493e75dafc5cbb96eabe0f146c2ffb1e3d Author: Michael Chan Date: Mon Feb 6 16:55:40 2017 -0500 bnxt_en: Add a set of TX rings to support XDP. Add logic for an extra set of TX rings for XDP. If enabled, this set of TX rings equals the number of RX rings and shares the same IRQ as the RX ring set. A new field bp->tx_nr_rings_xdp is added to keep track of these TX XDP rings. Adjust all other relevant functions to handle bp->tx_nr_rings_xdp. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 +++++++++++++-------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 16 ++++++++++++---- 3 files changed, 27 insertions(+), 13 deletions(-) commit a960dec98861b009b4227d2ae3b94a142c83eb96 Author: Michael Chan Date: Mon Feb 6 16:55:39 2017 -0500 bnxt_en: Add tx ring mapping logic. To support XDP_TX, we need to add a set of dedicated TX rings, each associated with the NAPI of an RX ring. To assign XDP rings and regular rings in a flexible way, we add a bp->tx_ring_map[] array to do the remapping. The netdev txq index is stored in the new field txq_index so that we can retrieve the netdev txq when handling TX completions. In this patch, before we introduce XDP_TX, the mapping is 1:1. v2: Fixed a bug in bnxt_tx_int(). Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 ++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) commit d1e7925e6d80ce5f9ef6deb8f3cec7526f5c443c Author: Michael Chan Date: Mon Feb 6 16:55:38 2017 -0500 bnxt_en: Centralize logic to reserve rings. Currently, bnxt_setup_tc() and bnxt_set_channels() have similar and duplicated code to check and reserve rx and tx rings. Add a new function bnxt_reserve_rings() to centralize the logic. This will make it easier to add XDP_TX support which requires allocating a new set of TX rings. Also, the tx ring checking logic in bnxt_setup_msix() can be removed. The rings have been reserved before hand. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 68 ++++++++++++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 39 +++---------- 3 files changed, 52 insertions(+), 57 deletions(-) commit 4e5dbbda4c40a239e2ed4bbc98f2aa320e4dcca2 Author: Michael Chan Date: Mon Feb 6 16:55:37 2017 -0500 bnxt_en: Use event bit map in RX path. In the current code, we have separate rx_event and agg_event parameters to keep track of rx and aggregation events. Combine these events into an u8 event mask with different bits defined for different events. This way, it is easier to expand the logic to include XDP tx events. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 30 +++++++++++++++--------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 +++ 2 files changed, 18 insertions(+), 15 deletions(-) commit c61fb99cae51958a9096d8540c8c05e74cfa7e59 Author: Michael Chan Date: Mon Feb 6 16:55:36 2017 -0500 bnxt_en: Add RX page mode support. This mode is to support XDP. In this mode, each rx ring is configured with page sized buffers for linear placement of each packet. MTU will be restricted to what the page sized buffers can support. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 135 ++++++++++++++++++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 7 ++ 2 files changed, 124 insertions(+), 18 deletions(-) commit b3dba77cf0acb6e44b368979026df975658332bc Author: Michael Chan Date: Mon Feb 6 16:55:35 2017 -0500 bnxt_en: Parameterize RX buffer offsets. Convert the global constants BNXT_RX_OFFSET and BNXT_RX_DMA_OFFSET to device parameters. This will make it easier to support XDP with headroom support which requires different RX buffer offsets. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 +++++++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) commit 745fc05c9db1f17da076861c7f57507e13f28a3a Author: Michael Chan Date: Mon Feb 6 16:55:34 2017 -0500 bnxt_en: Add bp->rx_dir field for rx buffer DMA direction. When driver is running in XDP mode, rx buffers are DMA mapped as DMA_BIDIRECTIONAL. Add a field so the code will map/unmap rx buffers according to this field. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++++++++--------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 13 insertions(+), 15 deletions(-) commit 11cd119d31a71b37c2362fc621f225e2aa12aea1 Author: Michael Chan Date: Mon Feb 6 16:55:33 2017 -0500 bnxt_en: Don't use DEFINE_DMA_UNMAP_ADDR to store DMA address in RX path. To support XDP_TX, we need the RX buffer's DMA address to transmit the packet. Convert the DMA address field to a permanent field in bnxt_sw_rx_bd. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 +++++++++------------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) commit 6bb19474391d17954fee9a9997ecca25b35dfd46 Author: Michael Chan Date: Mon Feb 6 16:55:32 2017 -0500 bnxt_en: Refactor rx SKB function. Minor refactoring of bnxt_rx_skb() so that it can easily be replaced by a new function that handles packets in a single page. Also, use a function pointer bp->rx_skb_func() to switch to a new function when we add the new mode in the next patch. Add a new field data_ptr that points to the packet data in the bnxt_sw_rx_bd structure. The original data field is changed to void pointer so that it can either hold the kmalloc'ed data or a page pointer. The last parameter of bnxt_rx_skb() which was the length parameter is changed to include the payload offset of the packet in the upper 16 bit. The offset is needed to support the rx page mode and is not used in this existing function. v3: Added a new data_ptr parameter to bp->rx_skb_func(). The caller has the option to modify the starting address of the packet. This will be needed when XDP with headroom support is added. v2: Changed the name of the last parameter to offset_and_len to make the code more clear. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 49 ++++++++++++++++++++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 11 +++++-- 2 files changed, 44 insertions(+), 16 deletions(-) commit b44700e975848a9a569a509244672ff886ec99b3 Author: Timur Tabi Date: Mon Feb 6 15:34:52 2017 -0600 net: qcom/emac: add ethool support for setting pause parameters To support setting the pause parameters, the driver can no longer just mirror the PHY. The set_pauseparam feature allows the driver to force the setting in the MAC, regardless of how the PHY is configured. This means that we now need to maintain an internal state for pause frame support, and so get_pauseparam also needs to be updated. If the interface is already running when the setting is changed, then the interface is reset. Note that if the MAC is configured to enable RX pause frame support (i.e. it transmits pause frames to throttle the other end), but the PHY is configured to block those frames, then the feature will not work. Also some buffer size initialization code into emac_init_adapter(), so that it lives with similar code, including the initializtion of pause frame support. 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 | 18 ++++++++++---- drivers/net/ethernet/qualcomm/emac/emac.c | 11 ++++++--- drivers/net/ethernet/qualcomm/emac/emac.h | 7 ++++++ 4 files changed, 48 insertions(+), 18 deletions(-) commit 29ba6e7400a317725bdfb86a725d1824447dbcd7 Merge: b08d46b 51ce8bd Author: David S. Miller Date: Tue Feb 7 13:07:56 2017 -0500 Merge branch 'replace-dst_confirm' Julian Anastasov says: ==================== net: dst_confirm replacement This patchset addresses the problem of neighbour confirmation where received replies from one nexthop can cause confirmation of different nexthop when using the same dst. Thanks to YueHaibing for tracking the dst->pending_confirm problem. Sockets can obtain cached output route. Such routes can be to known nexthop (rt_gateway=IP) or to be used simultaneously for different nexthop IPs by different subnet prefixes (nh->nh_scope = RT_SCOPE_HOST, rt_gateway=0). At first look, there are more problems: - dst_confirm() sets flag on dst and not on dst->path, as result, indication is lost when XFRM is used - DNAT can change the nexthop, so the really used nexthop is not confirmed So, the following solution is to avoid using dst->pending_confirm. The current dst_confirm() usage is as follows: Protocols confirming dst on received packets: - TCP (1 dst per socket) - SCTP (1 dst per transport) - CXGB* Protocols supporting sendmsg with MSG_CONFIRM [ | MSG_PROBE ] to confirm neighbour: - UDP IPv4/IPv6 - ICMPv4 PING - RAW IPv4/IPv6 - L2TP/IPv6 MSG_CONFIRM for other purposes (fix not needed): - CAN Sending without locking the socket: - UDP (when no cork) - RAW (when hdrincl=1) Redirects from old to new GW: - rt6_do_redirect The patchset includes the following changes: 1. sock: add sk_dst_pending_confirm flag - used only by TCP with patch 4 to remember the received indication in sk->sk_dst_pending_confirm 2. net: add dst_pending_confirm flag to skbuff - skb->dst_pending_confirm will be used by all protocols in following patches, via skb_{set,get}_dst_pending_confirm 3. sctp: add dst_pending_confirm flag - SCTP uses per-transport dsts and can not use sk->sk_dst_pending_confirm like TCP 4. tcp: replace dst_confirm with sk_dst_confirm 5. net: add confirm_neigh method to dst_ops - IPv4 and IPv6 provision for slow neigh lookups for MSG_PROBE users. I decided to use neigh lookup only for this case because on MSG_PROBE the skb may pass MTU checks but it does not reach the neigh confirmation code. This patch will be used from patch 6. - xfrm_confirm_neigh: we use the last tunnel address, if present. When there are only transports, the original dest address is used. 6. net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP - dst_confirm conversion for UDP, RAW, ICMP and L2TP/IPv6 - these protocols use MSG_CONFIRM propagated by ip*_append_data to skb->dst_pending_confirm. sk->sk_dst_pending_confirm is not used because some sending paths do not lock the socket. For MSG_PROBE we use the slow lookup (dst_confirm_neigh). - there are also 2 cases that need the slow lookup: __ip6_rt_update_pmtu and rt6_do_redirect. I hope &ipv6_hdr(skb)->saddr is the correct nexthop address to use here. 7. net: pending_confirm is not used anymore - I failed to understand the CXGB* code, I see dst_confirm() calls but I'm not sure dst_neigh_output() was called. For now I just removed the dst->pending_confirm flag and left all dst_confirm() calls there. Any better idea? - Now may be old function neigh_output() should be restored instead of dst_neigh_output? ==================== Signed-off-by: David S. Miller commit 51ce8bd4d17a761e1a90a34a1b5c9b762cce7553 Author: Julian Anastasov Date: Mon Feb 6 23:14:17 2017 +0200 net: pending_confirm is not used anymore When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. As last step, we can remove the pending_confirm flag. Reported-by: YueHaibing Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/dst.h | 14 ++------------ net/core/dst.c | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) commit 0dec879f636f11b0ffda1cb5fd96a1754c59ead3 Author: Julian Anastasov Date: Mon Feb 6 23:14:16 2017 +0200 net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. The datagram protocols can use MSG_CONFIRM to confirm the neighbour. When used with MSG_PROBE we do not reach the code where neighbour is confirmed, so we have to do the same slow lookup by using the dst_confirm_neigh() helper. When MSG_PROBE is not used, ip_append_data/ip6_append_data will set the skb flag dst_pending_confirm. Reported-by: YueHaibing Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_output.c | 6 ++++++ net/ipv4/ping.c | 3 ++- net/ipv4/raw.c | 6 +++++- net/ipv4/udp.c | 3 ++- net/ipv6/ip6_output.c | 6 ++++++ net/ipv6/raw.c | 6 +++++- net/ipv6/route.c | 27 ++++++++++++++------------- net/ipv6/udp.c | 3 ++- net/l2tp/l2tp_ip6.c | 3 ++- 9 files changed, 44 insertions(+), 19 deletions(-) commit 63fca65d08632fbec9d9b655f671cf08aa1aeeb8 Author: Julian Anastasov Date: Mon Feb 6 23:14:15 2017 +0200 net: add confirm_neigh method to dst_ops Add confirm_neigh method to dst_ops and use it from IPv4 and IPv6 to lookup and confirm the neighbour. Its usage via the new helper dst_confirm_neigh() should be restricted to MSG_PROBE users for performance reasons. For XFRM prefer the last tunnel address, if present. With help from Steffen Klassert. Signed-off-by: Julian Anastasov Acked-by: Steffen Klassert Signed-off-by: David S. Miller include/net/arp.h | 16 ++++++++++++++++ include/net/dst.h | 7 +++++++ include/net/dst_ops.h | 2 ++ include/net/ndisc.h | 17 +++++++++++++++++ net/ipv4/route.c | 19 +++++++++++++++++++ net/ipv6/route.c | 16 ++++++++++++++++ net/xfrm/xfrm_policy.c | 19 +++++++++++++++++++ 7 files changed, 96 insertions(+) commit c3a2e8370534f810cac6050169db0ed3e0f94f0b Author: Julian Anastasov Date: Mon Feb 6 23:14:14 2017 +0200 tcp: replace dst_confirm with sk_dst_confirm When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. Use the new sk_dst_confirm() helper to propagate the indication from received packets to sock_confirm_neigh(). Reported-by: YueHaibing Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Tested-by: YueHaibing Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 12 +++--------- net/ipv4/tcp_metrics.c | 7 ++----- net/ipv4/tcp_output.c | 2 ++ 3 files changed, 7 insertions(+), 14 deletions(-) commit c86a773c78025f5b825bacd7b846f4fa60dc0317 Author: Julian Anastasov Date: Mon Feb 6 23:14:13 2017 +0200 sctp: add dst_pending_confirm flag Add new transport flag to allow sockets to confirm neighbour. When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. The flag is propagated from transport to every packet. It is reset when cached dst is reset. Reported-by: YueHaibing Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/sctp.h | 6 ++---- include/net/sctp/structs.h | 4 ++++ net/sctp/associola.c | 3 +-- net/sctp/output.c | 10 +++++++++- net/sctp/outqueue.c | 2 +- net/sctp/sm_make_chunk.c | 6 ++---- net/sctp/sm_sideeffect.c | 2 +- net/sctp/socket.c | 4 ++-- net/sctp/transport.c | 16 +++++++++++++++- 9 files changed, 37 insertions(+), 16 deletions(-) commit 4ff0620354f2b39b9fe2a91c22c4de9d1fba0c8e Author: Julian Anastasov Date: Mon Feb 6 23:14:12 2017 +0200 net: add dst_pending_confirm flag to skbuff Add new skbuff flag to allow protocols to confirm neighbour. When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. Add sock_confirm_neigh() helper to confirm the neighbour and use it for IPv4, IPv6 and VRF before dst_neigh_output. Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/vrf.c | 5 ++++- include/linux/skbuff.h | 12 ++++++++++++ include/net/sock.h | 14 ++++++++++++++ net/ipv4/ip_output.c | 5 ++++- net/ipv6/ip6_output.c | 1 + 5 files changed, 35 insertions(+), 2 deletions(-) commit 9b8805a325591cf5b6b9df71200de25a2bd721fd Author: Julian Anastasov Date: Mon Feb 6 23:14:11 2017 +0200 sock: add sk_dst_pending_confirm flag Add new sock flag to allow sockets to confirm neighbour. When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. As not all call paths lock the socket use full word for the flag. Add sk_dst_confirm as replacement for dst_confirm when called for received packets. Signed-off-by: Julian Anastasov Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 12 ++++++++++++ net/core/sock.c | 2 ++ 2 files changed, 14 insertions(+) commit b08d46b01e995dd7b653b22d35bd1d958d6ee9b4 Author: Florian Fainelli Date: Mon Feb 6 13:01:16 2017 -0800 net: phy: bcm7xxx: Add BCM74371 PHY ID Add the BCM74371 PHY ID to the list of supported chips. This is a 28nm technology Gigabit PHY SoC. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 2 ++ include/linux/brcmphy.h | 1 + 2 files changed, 3 insertions(+) commit 6474ace999edd714151c04c0b0534b89c2e9b6d8 Author: Steven Rostedt (VMware) Date: Tue Feb 7 12:13:08 2017 -0500 ktest.pl: Powercycle the box on reboot if no connection can be made When performing a reboot of the test box, try to ssh to it. If it can't connect for 5 seconds, then powercycle the box. This is useful because the reboot is done via ssh, and if you can't ssh to the box because it is hung, the reboot fails to reboot. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) commit 6e98d1b4415fe681ceb245e1374ed5e1942a332b Author: Steven Rostedt (VMware) Date: Tue Feb 7 12:22:03 2017 -0500 ktest: Add timeout to ssh command Add a timeout to performing an ssh command. This will let testing if a machine is alive or not, or if something else may be amiss. A timeout can be passed to ssh, where ssh will fail if it does not complete within the given timeout. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 8f00067a0d867e6ca63e266098ea18cf1a0b5e72 Merge: d9c0e59 fb7dc1d Author: Paolo Bonzini Date: Tue Feb 7 18:18:51 2017 +0100 Merge tag 'kvm-s390-next-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixes and features for 4.11 (via kvm/next) - enable some simd extensions for guests - enable nx for guests - debug log for cpu model - PER fixes - remove bitwise annotation from ar_t - detect guests in operation exception program check loops - fix potential null-pointer dereference for ucontrol guests - also contains merge for fix that went into 4.10 to avoid conflicts commit d9c0e59f92d491a7be5172eaf2d600b4953a0bd4 Merge: d5b798c 12ed1fa Author: Paolo Bonzini Date: Tue Feb 7 18:18:13 2017 +0100 Merge tag 'kvm_mips_4.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips into HEAD KVM: MIPS: GVA/GPA page tables, dirty logging, SYNC_MMU etc Numerous MIPS KVM fixes, improvements, and features for 4.11, many of which continue to pave the way for VZ support, the most interesting of which are: - Add GVA->HPA page tables for T&E, to cache GVA mappings. - Generate fast-path TLB refill exception handler which loads host TLB entries from GVA page table, avoiding repeated guest memory translation and guest TLB lookups. - Use uaccess macros when T&E needs to access guest memory, which with GVA page tables and the Linux TLB refill handler improves robustness against TLB faults and fixes EVA hosts. - Use BadInstr/BadInstrP registers when available to obtain instruction encodings after a synchronous trap. - Add GPA->HPA page tables to replace the inflexible linear array, allowing for multiple sparsely arranged memory regions. - Properly implement dirty page logging. - Add KVM_CAP_SYNC_MMU support so that changes in GPA mappings become effective in guests even if they are already running, allowing for copy-on-write, KSM, idle page tracking, swapping, and guest memory ballooning. - Add KVM_CAP_READONLY_MEM support, so writes to specified memory regions are treated as MMIO. - Implement proper CP0_EBase support in T&E. - Expose a few more missing CP0 registers to userland. - Add KVM_CAP_NR_VCPUS and KVM_CAP_MAX_VCPUS support, and allow up to 8 VCPUs to be created in a VM. - Various cleanups and dropping of dead and duplicated code. commit d5b798c15fb97136dc13ac5a9629f91e88d5d565 Merge: 55dd00a 050f233 Author: Paolo Bonzini Date: Tue Feb 7 18:17:02 2017 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD The big feature this time is support for POWER9 using the radix-tree MMU for host and guest. This required some changes to arch/powerpc code, so I talked with Michael Ellerman and he created a topic branch with this patchset, which I merged into kvm-ppc-next and which Michael will pull into his tree. Michael also put in some patches from Nick Piggin which fix bugs in the interrupt vector code in relocatable kernels when coming from a KVM guest. Other notable changes include: * Add the ability to change the size of the hashed page table, from David Gibson. * XICS (interrupt controller) emulation fixes and improvements, from Li Zhong. * Bug fixes from myself and Thomas Huth. These patches define some new KVM capabilities and ioctls, but there should be no conflicts with anything else currently upstream, as far as I am aware. commit 55dd00a73a518281bc846dc5de1a718349431eb2 Author: Marcelo Tosatti Date: Tue Jan 24 15:09:39 2017 -0200 KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall Add a hypercall to retrieve the host realtime clock and the TSC value used to calculate that clock read. Used to implement clock synchronization between host and guest. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/hypercalls.txt | 35 +++++++++++++++++ arch/x86/include/uapi/asm/kvm_para.h | 9 +++++ arch/x86/kvm/x86.c | 66 ++++++++++++++++++++++++++++++++ include/uapi/linux/kvm_para.h | 2 + 4 files changed, 112 insertions(+) commit 6342c50ad12e8ce0736e722184a7dbdea4a3477f Author: David Hildenbrand Date: Wed Jan 25 11:58:58 2017 +0100 KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail vmx_complete_nested_posted_interrupt() can't fail, let's turn it into a void function. Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 42cf014d38d8822cce63703a467e00f65d000952 Author: David Hildenbrand Date: Wed Jan 25 11:58:57 2017 +0100 KVM: nVMX: kmap() can't fail kmap() can't fail, therefore it will always return a valid pointer. Let's just get rid of the unnecessary checks. Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 --------- 1 file changed, 9 deletions(-) commit 32677207dcc5e594254b7fb4fb2352b1755b1d5b Author: Steven Rostedt (VMware) Date: Tue Feb 7 12:05:25 2017 -0500 ktest: Fix child exit code processing The child_exit errno needs to be shifted by 8 bits to compare against the return values for the bisect variables. Fixes: c5dacb88f0a64 ("ktest: Allow overriding bisect test results") Cc: stable@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e07c9f55ecabdf78746b9808fec6ab549a07f8a Author: Steven Rostedt (VMware) Date: Tue Feb 7 11:49:21 2017 -0500 ktest: Have POST_TEST run after the test has totally completed The POST_TEST config is to be executed after a test has fully compeleted, whether the test passed or failed. It currently is executed at the moment that the test has been decided if it failed or not. As the test does other clean ups, it isn't truly finished. Move the POST_TEST execution to after all the test cleanups have been done. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 8d1fb01df8f64af14c833805dcbd05bf4582e028 Author: Arnd Bergmann Date: Mon Feb 6 17:26:30 2017 +0100 mlxsw: add psample dependency for spectrum When PSAMPLE is a loadable module, spectrum must not be built-in: drivers/net/built-in.o: In function `mlxsw_sp_rx_listener_sample_func': spectrum.c:(.text+0xe357e): undefined reference to `psample_sample_packet' This adds a Kconfig dependency to enforce usable configurations. Fixes: 98d0f7b9acda ("mlxsw: spectrum: Add packet sample offloading support") Signed-off-by: Arnd Bergmann Acked-by: Yotam Gigi Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bb4005bae3dab0dd21b239b1da193053151c07ba Author: Wei Yongjun Date: Mon Feb 6 16:15:05 2017 +0000 ipv6: sr: fix non static symbol warnings Fixes the following sparse warnings: net/ipv6/seg6_iptunnel.c:58:5: warning: symbol 'nla_put_srh' was not declared. Should it be static? net/ipv6/seg6_iptunnel.c:238:5: warning: symbol 'seg6_input' was not declared. Should it be static? net/ipv6/seg6_iptunnel.c:254:5: warning: symbol 'seg6_output' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 89d82452d1fd283bb1e313bc7a1f7c324362cf02 Author: Wei Yongjun Date: Mon Feb 6 16:07:13 2017 +0000 net/sched: act_mirred: remove duplicated include from act_mirred.c Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/sched/act_mirred.c | 2 -- 1 file changed, 2 deletions(-) commit fee402211ff2d2f0a136a9d77b30d66aeea193b8 Author: Wei Yongjun Date: Mon Feb 6 15:26:17 2017 +0000 net: wan: slic_ds26522: Remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/wan/slic_ds26522.c | 1 - 1 file changed, 1 deletion(-) commit c3afa9955382ea5496e8997b307690aaca6e6e2f Author: Wei Yongjun Date: Mon Feb 6 15:25:52 2017 +0000 net: wan: slic_ds26522: Use module_spi_driver to simplify the code module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/wan/slic_ds26522.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit d2aff02f92598f8361f488424cdf1053edf3081d Merge: 28eedd1 b343d77 Author: Arnd Bergmann Date: Tue Feb 7 17:22:15 2017 +0100 Merge tag 'samsung-drivers-soc-pmu-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "soc: samsung: pmu for v4.11, third round" from Krzysztof Kozłowski: 3rd round of improvements for Exynos PMU driver for v4.11: 1. Add defines in header for future patches changing the pad retention control. * tag 'samsung-drivers-soc-pmu-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pmu: Add register defines for pad retention control commit 28eedd15ec3ea25a2cd9e706e8c00a4b197aca72 Merge: 57ac490 b13b233 Author: Arnd Bergmann Date: Tue Feb 7 17:20:07 2017 +0100 Merge tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "soc: samsung: pm_domains for v4.11" from Krzysztof Kozłowski: Improve the PM domains driver for Exynos by displaying a user-friendly name of power domain. Till now, the name of node from DT was used which mostly is just "power-domain". We need more than that. * tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pm_domains: Read domain name from the new label property soc: samsung: pm_domains: Remove message about failed memory allocation soc: samsung: pm_domains: Remove unused name field soc: samsung: pm_domains: Use full names in subdomains registration log commit 57ac490466a5f9f703a9183a8583df1d9660ce0c Merge: 1096ffd 7a1ca76 Author: Arnd Bergmann Date: Tue Feb 7 17:18:29 2017 +0100 Merge tag 'reset-for-4.11-2' of git://git.pengutronix.de/pza/linux into next/drivers Pull "Reset controller changes for v4.11, part 2" from Philipp Zabel: - Fix missing NULL check in reset_control_put for optional reset control conversion - Make zx2967 driver explicitly non-modular * tag 'reset-for-4.11-2' of git://git.pengutronix.de/pza/linux: reset: make zx2967 explicitly non-modular reset: core: fix reset_control_put commit 4f3a468666f78625142529434a51edf13c3acfed Merge: fa11b3d 11937f6 Author: Arnd Bergmann Date: Tue Feb 7 17:12:27 2017 +0100 Merge tag 'sunxi-defconfig-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/defconfig Pull "Allwinner defconfig changes for 4.11" from Maxime Ripard: A single patch to enable the thermal DT support in sunxi_defconfig * tag 'sunxi-defconfig-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: sunxi: Add CONFIG_THERMAL_OF commit 521613c5684068f2003d38b84c9a317b3d53948d Merge: a23b296 575e93f Author: David S. Miller Date: Tue Feb 7 10:51:48 2017 -0500 Merge branch 'dsa2-pdata' Florian Fainelli says: ==================== net: dsa: Support for pdata in dsa2 This is not exactly new, and was sent before, although back then, I did not have an user of the pre-declared MDIO board information, but now we do. Note that I have additional changes queued up to have b53 register platform data for MIPS bcm47xx and bcm63xx. Yes I know that we should have the Orion platforms eventually be converted to Device Tree, but until that happens, I don't want any remaining users of the old "dsa" platform device (hence the previous DTS submissions for ARM/mvebu) and, there will be platforms out there that most likely won't never see DT coming their way (BCM47xx is almost 100% sure, BCM63xx maybe not in a distant future). We would probably want the whole series to be merged via David Miller's tree to simplify things. Thanks! Changes in v5: - dropped changes to drivers/base/ because after more than a month, we cannot get any answer from Greg KH Changes in v4: - Changed device_find_class() to device_find_in_class_name() - Added kerneldoc above device_find_in_class_name() to explain what it does and the calling convention regarding device reference counts - Changed dev_to_net_device to device_to_net_device() added comments about what it does and the caller conventions regarding reference counts Changes in v3: - Tested EPROBE_DEFER from a mockup MDIO/DSA switch driver and everything is fine, once the driver finally probes we have access to platform data as expected - added comment above dsa_port_is_valid() that port->name is mandatory for platform data cases - added an extra check in dsa_parse_member() for a NULL pdata pointer - fixed a bunch of checkpatch errors and warnings Changes in v2: - Rebased against latest net-next/master - Moved dev_find_class() to device_find_class() into drivers/base/core.c - Moved dev_to_net_device into net/core/dev.c - Utilize dsa_chip_data directly instead of dsa_platform_data - Augmented dsa_chip_data to be multi-CPU port ready Changes from last submission (few months back): - rebased against latest net-next - do not introduce dsa2_platform_data which was overkill and was meant to allow us to do exaclty the same things with platform data and Device Tree we use the existing dsa_platform_data instead - properly register MDIO devices when the MDIO bus is registered and associate platform_data with them - add a change to the Orion platform code to demonstrate how this can be used Thank you ==================== Signed-off-by: David S. Miller commit 575e93f7b5e622edfd031ebda660f5f3064f39a3 Author: Florian Fainelli Date: Sat Feb 4 13:02:45 2017 -0800 ARM: orion: Register DSA switch as a MDIO device Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device anymore. Note that the MDIO devices registered by code in net/dsa/dsa2.c does not parse a dsa_platform_data, but directly take a dsa_chip_data (specific to a single switch chip), so we update the different call sites to pass this structure down to orion_ge00_switch_init(). Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/mach-orion5x/common.c | 2 +- arch/arm/mach-orion5x/common.h | 4 ++-- arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 7 +------ arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 7 +------ arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 7 +------ arch/arm/mach-orion5x/wnr854t-setup.c | 2 +- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 7 +------ arch/arm/plat-orion/common.c | 25 +++++++++++++++++++------ arch/arm/plat-orion/include/plat/common.h | 4 ++-- 9 files changed, 29 insertions(+), 36 deletions(-) commit 648ea0134069cda7d4940f397bcc6901fb88752a Author: Florian Fainelli Date: Sat Feb 4 13:02:44 2017 -0800 net: phy: Allow pre-declaration of MDIO devices Allow board support code to collect pre-declarations for MDIO devices by registering them with mdiobus_register_board_info(). SPI and I2C buses have a similar feature, we were missing this for MDIO devices, but this is particularly useful for e.g: MDIO-connected switches which need to provide their port layout (often board-specific) to a MDIO Ethernet switch driver. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Makefile | 3 +- drivers/net/phy/mdio-boardinfo.c | 86 ++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/mdio-boardinfo.h | 19 +++++++++ drivers/net/phy/mdio_bus.c | 4 ++ drivers/net/phy/mdio_device.c | 11 +++++ include/linux/mdio.h | 3 ++ include/linux/mod_devicetable.h | 1 + include/linux/phy.h | 19 +++++++++ 8 files changed, 145 insertions(+), 1 deletion(-) commit 71e0bbde0d88047f66b25721f69a441d46083748 Author: Florian Fainelli Date: Sat Feb 4 13:02:43 2017 -0800 net: dsa: Add support for platform data Allow drivers to use the new DSA API with platform data. Most of the code in net/dsa/dsa2.c does not rely so much on device_nodes and can get the same information from platform_data instead. We purposely do not support distributed configurations with platform data, so drivers should be providing a pointer to a 'struct dsa_chip_data' structure if they wish to communicate per-port layout. Multiple CPUs port could potentially be supported and dsa_chip_data is extended to receive up to one reference to an upstream network device per port described by a dsa_chip_data structure. dsa_dev_to_net_device() increments the network device's reference count, so we intentionally call dev_put() to be consistent with the DT-enabled path, until we have a generic notifier based solution. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 6 ++++ net/dsa/dsa2.c | 102 ++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 90 insertions(+), 18 deletions(-) commit 14b89f36eed2993670906a3991bca496a5ebf1a6 Author: Florian Fainelli Date: Sat Feb 4 13:02:42 2017 -0800 net: dsa: Rename and export dev_to_net_device() In preparation for using this function in net/dsa/dsa2.c, rename the function to make its scope DSA specific, and export it. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/dsa.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit a23b296198cbf2b78101e7e745f9c45663c3f82e Author: Andrew Lunn Date: Sat Feb 4 20:15:28 2017 +0100 net: dsa: mv88e6xxx: Refactor remaining port setup Move the remaining port configuration code which varies per device into port.c, using ops were necessary. This makes mv88e6xxx_6185_family() and mv88e6xxx_6095_family() unused, so remove them. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 51 +++++++++++++---------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 7 +++++ drivers/net/dsa/mv88e6xxx/port.c | 48 +++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 6 ++++- 4 files changed, 78 insertions(+), 34 deletions(-) commit cf3e80df13e534eb34a85835d5357c78d8689199 Author: Andrew Lunn Date: Sat Feb 4 20:12:24 2017 +0100 net: dsa: mv88e6xxx: Implement Clause 45 access to SMI devices The mv88e6390 MDIO bus controllers can support for clause 45 accesses. The internal SERDES interfaces need this, and it is likely external 10GHz PHYs will be clause 45. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 122 +++++++++++++++++++++++++++++++--- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 7 ++ 2 files changed, 120 insertions(+), 9 deletions(-) commit 8661a631e1040e71e938aab4b1ccbcbd46c4834f Merge: 108d9c7 f39908d Author: David S. Miller Date: Tue Feb 7 10:34:43 2017 -0500 Merge branch 'mv88e6390-CMODE' Andrew Lunn says: ==================== Set the CMODE for mv88e6390 ports The mv88e6390 ports 9 & 10 allow there CMODE to be set. CMODE is part of what linux defines as phy-mode. Add the needed phy-modes to linux, and add code which will act upon the phy-mode property to configure the switch port. These patches have been posted before as part of a bigger patchset which has now been broken up. I've added the received reviewed by tags, and added device tree documentation. ==================== Signed-off-by: David S. Miller commit f39908d3b1c45208c6898550167bfa766fdd6bb8 Author: Andrew Lunn Date: Sat Feb 4 20:02:50 2017 +0100 net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10 Unlike most ports, ports 9 and 10 of the 6390X family have configurable PHY modes. Set the mode as part of adjust_link(). Ordering is important, because the SERDES interfaces connected to ports 9 and 10 can be split and assigned to other ports. The CMODE has to be correctly set before the SERDES interface on another port can be configured. Such configuration is likely to be performed in port_enable() and port_disabled(), called on slave_open() and slave_close(). The simple case is port 9 and 10 are used for 'CPU' or 'DSA'. In this case, the CMODE is set via a phy-mode in dsa_cpu_dsa_setup(), which is called early in the switch setup. When ports 9 or 10 are used as user ports, and have a fixed-phy, when the fixed fixed-phy is attached, dsa_slave_adjust_link() is called, which results in the adjust_link function being called, setting the cmode. The port_enable() will for other ports will be called much later. When ports 9 or 10 are used as user ports and have a real phy attached which does not use all the available SERDES interface, e.g. a 1Gbps SGMII, there is currently no mechanism in place to set the CMODE of the port from software. It must be hoped the stripping resistors are correct. At the same time, add a function to get the cmode. This will be needed when configuring the SERDES interfaces. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 +++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 9 +++++ drivers/net/dsa/mv88e6xxx/port.c | 64 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 3 ++ 4 files changed, 84 insertions(+) commit 55601a880690cdeccdb5923c2493f0e3736f8f6b Author: Andrew Lunn Date: Sat Feb 4 20:02:49 2017 +0100 net: phy: Add 2000base-x, 2500base-x and rxaui modes The mv88e6390 ports 9 and 10 supports some additional PHY modes. Add these modes to the PHY core so they can be used in the binding. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 3 +++ include/linux/phy.h | 9 +++++++++ 2 files changed, 12 insertions(+) commit 40ce4b5d70b0c7e70c3e831e56d2586b57b54915 Author: Takashi Iwai Date: Tue Feb 7 16:17:06 2017 +0100 ALSA: x86: Cache AUD_CONFIG register value At enabling the audio, we modify AUD_CONFIG register bit 0. So far, it does read-modify-write procedure with a special hack for the channel bits due to the silicon bug. But we can optimize it by remembering the AUD_CONFIG register value privately. This simplifies the things a lot. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 39 ++++++++++++--------------------------- sound/x86/intel_hdmi_audio.h | 1 + 2 files changed, 13 insertions(+), 27 deletions(-) commit be07af29008e732257083013e82948d328b5878b Merge: ef4968f 902dcd1 Author: Arnd Bergmann Date: Tue Feb 7 16:23:55 2017 +0100 Merge tag 'arm-soc/for-4.11/maintainers' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom maintainers changes for 4.11" from Florian Fainelli: This pull request contains Broadcom MAINTAINERS entries updates for 4.11: - Eric updates the git repository for the BCM283x development * tag 'arm-soc/for-4.11/maintainers' of http://github.com/Broadcom/stblinux: MAINTAINERS: Update for the current location of the bcm2835 tree. commit ef4968f453a6b0093182cfef893fee1a4159b6b2 Merge: 5172d5a b074fed Author: Arnd Bergmann Date: Tue Feb 7 16:17:39 2017 +0100 Merge tag 'sunxi-core-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/soc Pull "Allwinner core changes for 4.11" from Maxime Ripard: Some patches to support two new SoCs: the H2+ and the V3s. * tag 'sunxi-core-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: arm: sunxi: add support for V3s SoC ARM: sunxi: add support for H2+ SoC commit 5172d5a5a95ff0278135896fe29c2edc4b946900 Merge: 7781e61 db88977 Author: Arnd Bergmann Date: Tue Feb 7 16:15:43 2017 +0100 Merge tag 'mvebu-soc-4.11-2' of git://git.infradead.org/linux-mvebu into next/soc Pull "mvebu soc for 4.11 (part 2)" from Gregory CLEMENT: SoC part of the support for the for Marvell switches with integrated CPUs based on Armada XP: the SMP support is slightly different. * tag 'mvebu-soc-4.11-2' of git://git.infradead.org/linux-mvebu: arm: mvebu: support for SMP on 98DX3336 SoC commit 3c38e32aad9b4fe11d037118008d2245bc273454 Merge: 2bad7f8 da2ee97 Author: Arnd Bergmann Date: Tue Feb 7 16:09:41 2017 +0100 Merge tag 'sunxi-dt-for-4.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Pull "Allwinner DT changes for 4.11, part 2" from Maxime Ripard: Support for the audio codec and Mali GPU for the A33 * tag 'sunxi-dt-for-4.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: dts: sun8i: sinlinx: Enable audio nodes ARM: dts: sun8i: parrot: Enable audio nodes ARM: dts: sun8i: Add audio codec, dai and card for A33 ARM: sun8i: dt: Add mali node dt-bindings: gpu: Add Mali Utgard bindings commit 2bad7f862ef8dba5e10191f68d874231d6620ede Merge: fd896f5 ef09e0f Author: Arnd Bergmann Date: Tue Feb 7 16:08:58 2017 +0100 Merge tag 'sunxi-dt-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Pull "Allwinner DT changes for 4.11" from Maxime Ripard: The usual chunk of DT changes, most notably: - Support for the H2+ and the V3s - CPUFreq support for the A33 - SPDIF support for the A31 and H3 - New boards: Beelink X2, Lichee Pi One, Lichee Pi Zero, Orange Pi Zero * tag 'sunxi-dt-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (42 commits) ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2 ARM: dts: sun8i-h3: Add the SPDIF block to the H3 ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3 ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB ARM: sun8i: sina33: Enable display ARM: sun8i: a23/a33: Add the oscillators accuracy ARM: sun8i: a23/a33: Enable the real LOSC and use it ARM: dts: sunxi: add support for Lichee Pi Zero board ARM: dts: sunxi: add dtsi file for V3s SoC ARM: dts: sun6i: sina31s: Enable USB OTG controller in peripheral mode ARM: dts: sun8i: reference-design: use AXP223 DTSI ARM: dts: sun8i: parrot: use AXP223 DTSI ARM: dts: sun8i: sina33: use AXP223 DTSI ARM: dts: sun8i: a33-olinuxino: use AXP223 DTSI ARM: dts: add DTSI for AXP223 dt-bindings: power: axp20x-usb: add axp223 compatible ARM: dts: sun7i: Add wifi dt node on Banana Pro ARM: dts: sun6i: Add SPDIF to the Mele I7 devicetree: bindings: Add vendor prefix for Shenzhen Xunlong Software ARM: dts: sun8i-h3: orange-pi-pc: Enable audio codec ... commit 108d9c71dcff8fc2523861b3462ab2ba8a754ed9 Merge: 152bff3 2de2f7f Author: David S. Miller Date: Tue Feb 7 10:05:13 2017 -0500 Merge branch 'virtio_net-XDP-adjust_head' John Fastabend says: ==================== XDP adjust head support for virtio This series adds adjust head support for virtio. The following is my test setup. I use qemu + virtio as follows, ./x86_64-softmmu/qemu-system-x86_64 \ -hda /var/lib/libvirt/images/Fedora-test0.img \ -m 4096 -enable-kvm -smp 2 -netdev tap,id=hn0,queues=4,vhost=on \ -device virtio-net-pci,netdev=hn0,mq=on,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,vectors=9 In order to use XDP with virtio until LRO is supported TSO must be turned off in the host. The important fields in the above command line are the following, guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off Also note it is possible to conusme more queues than can be supported because when XDP is enabled for retransmit XDP attempts to use a queue per cpu. My standard queue count is 'queues=4'. After loading the VM I run the relevant XDP test programs in, ./sammples/bpf For this series I tested xdp1, xdp2, and xdp_tx_iptunnel. I usually test with iperf (-d option to get bidirectional traffic), ping, and pktgen. I also have a modified xdp1 that returns XDP_PASS on any packet to ensure the normal traffic path to the stack continues to work with XDP loaded. It would be great to automate this soon. At the moment I do it by hand which is starting to get tedious. v2: original series dropped trace points after merge. ==================== Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 2de2f7f40ef92313d76c3df7f545be5d0899b1aa Author: John Fastabend Date: Thu Feb 2 19:16:29 2017 -0800 virtio_net: XDP support for adjust_head Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs another queue setup call. At the moment this code must do a full reset to ensure old buffers without headroom on program add or with headroom on program removal are not used incorrectly in the datapath. Ideally we would only have to disable/enable the RX queues being updated but there is no API to do this at the moment in virtio so use the big hammer. In practice it is likely not that big of a problem as this will only happen when XDP is enabled/disabled changing programs does not require the reset. There is some risk that the driver may either have an allocation failure or for some reason fail to correctly negotiate with the underlying backend in this case the driver will be left uninitialized. I have not seen this ever happen on my test systems and for what its worth this same failure case can occur from probe and other contexts in virtio framework. Signed-off-by: John Fastabend Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 154 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 125 insertions(+), 29 deletions(-) commit 9fe7bfce8b3e112e8e08c40deb72ee7e24c6f072 Author: John Fastabend Date: Thu Feb 2 19:16:01 2017 -0800 virtio_net: refactor freeze/restore logic into virtnet reset logic For XDP we will need to reset the queues to allow for buffer headroom to be configured. In order to do this we need to essentially run the freeze()/restore() code path. Unfortunately the locking requirements between the freeze/restore and reset paths are different however so we can not simply reuse the code. This patch refactors the code path and adds a reset helper routine. Signed-off-by: John Fastabend Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 75 +++++++++++++++++++++++++++++------------------- drivers/virtio/virtio.c | 42 +++++++++++++++------------ include/linux/virtio.h | 4 +++ 3 files changed, 73 insertions(+), 48 deletions(-) commit 722d82830a04ccff6c7390535fcdfb1e4d69d126 Author: John Fastabend Date: Thu Feb 2 19:15:32 2017 -0800 virtio_net: remove duplicate queue pair binding in XDP Factor out qp assignment. Signed-off-by: John Fastabend Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 0354e4d19cd5de51d6096a07ba44eda0ee61a6e9 Author: John Fastabend Date: Thu Feb 2 19:15:01 2017 -0800 virtio_net: factor out xdp handler for readability At this point the do_xdp_prog is mostly if/else branches handling the different modes of virtio_net. So remove it and handle running the program in the per mode handlers. Signed-off-by: John Fastabend Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 86 ++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 51 deletions(-) commit 473153291b8a131c86787fd9b076a529573e2c19 Author: John Fastabend Date: Thu Feb 2 19:14:32 2017 -0800 virtio_net: wrap rtnl_lock in test for calling with lock already held For XDP use case and to allow ethtool reset tests it is useful to be able to use reset paths from contexts where rtnl lock is already held. This requries updating virtnet_set_queues and free_receive_bufs the two places where rtnl_lock is taken in virtio_net. To do this we use the following pattern, _foo(...) { do stuff } foo(...) { rtnl_lock(); _foo(...); rtnl_unlock()}; this allows us to use freeze()/restore() flow from both contexts. Signed-off-by: John Fastabend Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 7781e61b5ba09a22e719636ae8b5a3186df438fc Author: Florian Fainelli Date: Thu Feb 2 12:12:26 2017 -0800 ARM: ep93xx: Disable TS-72xx watchdog before uncompressing The TS-72xx/73xx boards have a CPLD watchdog which is configured to reset the board after 8 seconds, if the kernel is large enough that this takes about this time to decompress the kernel, we will encounter a spurious reboot. Do not pull ts72xx.h, but instead locally define what we need to disable the watchdog. Signed-off-by: Florian Fainelli Reviewed-by: H Hartley Sweeten Signed-off-by: Arnd Bergmann arch/arm/mach-ep93xx/include/mach/uncompress.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4b483ed0be8b4aa8006300d502148aa4548fb261 Author: Linus Walleij Date: Tue Jan 31 22:08:32 2017 +0100 ARM: ux500: cut some platform data This platform data is revoked: the drivers are getting the DMA configuration from the device tree, it has been done like that since the DMA support was merged and this data has not been used since. The remaining auxdata is also unused. Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/mach-ux500/board-mop500-audio.c | 77 ----------------------------- arch/arm/mach-ux500/board-mop500.h | 17 ------- arch/arm/mach-ux500/cpu-db8500.c | 16 ------ arch/arm/mach-ux500/ste-dma40-db8500.h | 85 -------------------------------- 4 files changed, 195 deletions(-) commit fd896f5acd037c782f3bac8dedfb0d7e580d0b22 Merge: 5f2f35a cda1ade Author: Arnd Bergmann Date: Tue Feb 7 15:58:08 2017 +0100 Merge tag 'socfpga_dts_for_v4.11_part_2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt Pull "SoCFPGA DTS updates for v4.11, part 2" from Dinh Nguyen: - Add AXI configuration for DWMAC ethernet controllers on Arria10 - Use watchdog1 instead of watchdog0 on Arria10 * tag 'socfpga_dts_for_v4.11_part_2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: Add EMAC AXI settings for Arria10 ARM: dts: watchdog0 cannot reliably trigger reset commit 5f2f35a1ffb75669dfed0b2af9814d2ad36a285e Merge: a121efc 55d74ad Author: Arnd Bergmann Date: Tue Feb 7 15:50:58 2017 +0100 Merge tag 'samsung-dt-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DeviceTree update for v4.11, third round" from Krzysztof Kozlowski 1. Add descriptive user-friendly label names for power domains. This makes debugging easier. * tag 'samsung-dt-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add labels to all existing power domains commit 51f8f3c4e22535933ef9aecc00e9a6069e051b57 Author: Konstantin Khlebnikov Date: Tue Jan 10 21:30:21 2017 +0300 ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials If overlay was mounted by root then quota set for upper layer does not work because overlay now always use mounter's credentials for operations. Also overlay might deplete reserved space and inodes in ext4. This patch drops capability SYS_RESOURCE from saved credentials. This affects creation new files, whiteouts, and copy-up operations. Signed-off-by: Konstantin Khlebnikov Fixes: 1175b6b8d963 ("ovl: do operations on underlying file system in mounter's context") Cc: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e593b2bf513dd4d3fbfa0f435392eea2c7f776f0 Author: Amir Goldstein Date: Mon Jan 23 14:32:21 2017 +0200 ovl: properly implement sync_filesystem() overlayfs syncs all inode pages on sync_filesystem(), but it also needs to call s_op->sync_fs() of upper fs for metadata sync. This fixes correctness of syncfs(2) as demonstrated by following xfs specific test: xfs_sync_stats() { echo $1 echo -n "xfs_log_force = " grep log /proc/fs/xfs/stat | awk '{ print $5 }' } xfs_sync_stats "before touch" touch x xfs_sync_stats "after touch" xfs_io -c syncfs . xfs_sync_stats "after syncfs" xfs_io -c fsync x xfs_sync_stats "after fsync" xfs_io -c fsync x xfs_sync_stats "after fsync #2" When this test is run in overlay mount over xfs, log force count does not increase with syncfs command. Signed-off-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 01ad3eb8a07385bc8849f0ee7c800e7c8bd7287e Author: Amir Goldstein Date: Tue Jan 17 06:34:57 2017 +0200 ovl: concurrent copy up of regular files Now that copy up of regular file is done using O_TMPFILE, we don't need to hold rename_lock throughout copy up. Use the copy up waitqueue to synchronize concurrent copy up of the same file. Different regular files can be copied up concurrently. The upper dir inode_lock is taken instead of rename_lock, because it is needed for lookup and later for linking the temp file, but it is released while copying up data. Suggested-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 39d3d60a54df05a1a32fa71159d7a26a530dee6c Author: Amir Goldstein Date: Tue Jan 17 06:34:56 2017 +0200 ovl: introduce copy up waitqueue The overlay sb 'copyup_wq' and overlay inode 'copying' condition variable are about to replace the upper sb rename_lock, as finer grained synchronization objects for concurrent copy up. Suggested-by: Miklos Szeredi Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/ovl_entry.h | 2 ++ fs/overlayfs/super.c | 1 + fs/overlayfs/util.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+) commit d8514d8edb5b045cf7f708e14f888ce760d60f0b Author: Amir Goldstein Date: Tue Jan 17 06:34:55 2017 +0200 ovl: copy up regular file using O_TMPFILE In preparation for concurrent copy up, implement copy up of regular file as O_TMPFILE that is linked to upperdir instead of a file in workdir that is moved to upperdir. Suggested-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 42f269b925405d9dd45014823e5057786d6ca452 Author: Amir Goldstein Date: Tue Jan 17 06:34:54 2017 +0200 ovl: rearrange code in ovl_copy_up_locked() As preparation to implementing copy up with O_TMPFILE, name the variable for dentry before final rename 'temp' and assign it to 'newdentry' only after rename. Also lookup upper dentry before looking up temp dentry and move ovl_set_timestamps() into ovl_copy_up_locked(), because that is going to be more convenient for upcoming change. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) commit e7f52429b4a5b2e3224948d1737eb264c8f7e15f Author: Amir Goldstein Date: Tue Jan 17 06:34:53 2017 +0200 ovl: check if upperdir fs supports O_TMPFILE This is needed for choosing between concurrent copyup using O_TMPFILE and legacy copyup using workdir+rename. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 9 +++++++++ fs/overlayfs/ovl_entry.h | 1 + fs/overlayfs/super.c | 10 ++++++++++ 3 files changed, 20 insertions(+) commit a121efc23b1cd08afa45f727dc9e9dda632caae8 Merge: 4b5f483 3015d3b Author: Arnd Bergmann Date: Tue Feb 7 15:32:26 2017 +0100 Merge tag 'ux500-dt-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt Pull "Ux500 Device Tree updates for v4.11" from Linus Walleij: This cleans the device tree a bit and rectifies some clocking bugs. They are in a sense regressions, but there is no hurry for this platform. * tag 'ux500-dt-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: add the AB8500 sysclk to the device trees ARM: dts: Ux500: move USB PHY pins to PHY device ARM: dts: push MMC/SD to board and add comments commit 4b5f4835d16b0d8a7599e930b17e27fc6f1f3aba Merge: 54fe908 390891d Author: Arnd Bergmann Date: Tue Feb 7 15:25:19 2017 +0100 Merge tag 'stm32-dt-for-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt Pull "STM32 DT updates for v4.11, round 2" from Alexandre Torgue: Highlights: ---------- - ADD Timers support on STM32F429 MCU - Enable PWM1 & PWM3 on STM32F469 Disco board - Fix STM32F4_X_CLOCK macro - Use STM32F4_X_CLOCK macro in STM32 device tree - Add I2C1 support for STM32F429 MCU - Enable I2C1 on STM32F429 eval board * tag 'stm32-dt-for-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Add I2C1 support for STM32429 eval board ARM: dts: stm32: Add I2C1 support for STM32F429 SoC ARM: dts: stm32: Use clock DT binding definition on stm32f429 family dt-bindings: mfd: stm32f4: Add missing binding definition dt-bindings: mfd: stm32f4: Fix STM32F4_X_CLOCK() macro ARM: dts: stm32: Enable pwm1 and pwm3 for stm32f469-disco ARM: dts: stm32: add Timers driver for stm32f429 MCU commit 77531beeb97d079fb422d2b78a0d75c564384310 Author: Takashi Iwai Date: Tue Feb 7 12:17:23 2017 +0100 ALSA: x86: Rearrange defines We have two header files and everything is mixed up chaotically. Move the chip-specific definitions like the hardware registers to intel_hdmi_lpe_audio.h, and the rest, the implementation specific stuff into intel_hdmi_audio.h. In addition, put some more comments to the register fields, and fix the incorrect name prefix for AUD_HDMI_STATUS bits, too. The whole changes are merely a code shuffling, and there is no functional change. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 5 ++- sound/x86/intel_hdmi_audio.h | 64 +++++++++++++++++---------- sound/x86/intel_hdmi_lpe_audio.h | 95 +++++++++++++++++----------------------- 3 files changed, 83 insertions(+), 81 deletions(-) commit 54fe90874fd37caeb8914a1dee511920fa799c08 Merge: 387720c 5cb1309 Author: Arnd Bergmann Date: Tue Feb 7 15:08:17 2017 +0100 Merge tag 'mvebu-dt-4.11-3' of git://git.infradead.org/linux-mvebu into next/dt Merge "mvebu dt for 4.11 (part 3)" from Gregory CLEMENT: Add support for Marvell switches with integrated CPUs based on Armada XP * tag 'mvebu-dt-4.11-3' of git://git.infradead.org/linux-mvebu: ARM: dts: mvebu: Add device tree for db-dxbc2 and db-xc3-24g4xg boards ARM: dts: mvebu: Add device tree for 98DX3236 SoCs commit 387720c93812f1e702c20c667cb003a356e24a6c Author: Marc Zyngier Date: Wed Jan 18 09:27:28 2017 +0000 ARM: DTS: Fix register map for virt-capable GIC Since everybody copied my own mistake from the DT binding example, let's address all the offenders in one swift go. Most of them got the CPU interface size wrong (4kB, while it should be 8kB), except for both keystone platforms which got the control interface wrong (4kB instead of 8kB). In a few cases where I knew for sure what implementation was used, I've added the "arm,gic-400" compatible string. I'm 99% sure that this is what everyone is using, but short of having the TRM for all the other SoCs, I've left them alone. Acked-by: Shawn Guo Acked-by: Tony Lindgren Acked-by: Santosh Shilimkar Acked-by: Krzysztof Kozlowski Acked-by: Maxime Ripard Acked-by: Antoine Tenart Acked-by: Arnd Bergmann Acked-by: Matthias Brugger Acked-by: Heiko Stuebner Reviewed-by: Javier Martinez Canillas Signed-off-by: Marc Zyngier Signed-off-by: Arnd Bergmann arch/arm/boot/dts/alpine.dtsi | 2 +- arch/arm/boot/dts/axm55xx.dtsi | 2 +- arch/arm/boot/dts/dra7.dtsi | 2 +- arch/arm/boot/dts/ecx-2000.dts | 2 +- arch/arm/boot/dts/exynos3250.dtsi | 2 +- arch/arm/boot/dts/exynos5.dtsi | 4 ++-- arch/arm/boot/dts/exynos5260.dtsi | 2 +- arch/arm/boot/dts/exynos5440.dtsi | 2 +- arch/arm/boot/dts/imx6ul.dtsi | 4 ++-- arch/arm/boot/dts/keystone-k2g.dtsi | 4 ++-- arch/arm/boot/dts/keystone.dtsi | 4 ++-- arch/arm/boot/dts/ls1021a.dtsi | 4 ++-- arch/arm/boot/dts/mt2701.dtsi | 2 +- arch/arm/boot/dts/mt6580.dtsi | 2 +- arch/arm/boot/dts/mt6589.dtsi | 2 +- arch/arm/boot/dts/mt7623.dtsi | 2 +- arch/arm/boot/dts/mt8127.dtsi | 2 +- arch/arm/boot/dts/mt8135.dtsi | 2 +- arch/arm/boot/dts/omap5.dtsi | 2 +- arch/arm/boot/dts/r8a73a4.dtsi | 2 +- arch/arm/boot/dts/r8a7743.dtsi | 2 +- arch/arm/boot/dts/r8a7745.dtsi | 2 +- arch/arm/boot/dts/r8a7790.dtsi | 2 +- arch/arm/boot/dts/r8a7791.dtsi | 2 +- arch/arm/boot/dts/r8a7792.dtsi | 2 +- arch/arm/boot/dts/r8a7793.dtsi | 2 +- arch/arm/boot/dts/r8a7794.dtsi | 2 +- arch/arm/boot/dts/rk1108.dtsi | 2 +- arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot/dts/rk322x.dtsi | 2 +- arch/arm/boot/dts/rk3288.dtsi | 2 +- arch/arm/boot/dts/sun6i-a31.dtsi | 2 +- arch/arm/boot/dts/sun7i-a20.dtsi | 4 ++-- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- arch/arm/boot/dts/sun8i-a83t.dtsi | 2 +- arch/arm/boot/dts/sun8i-h3.dtsi | 2 +- arch/arm/boot/dts/sun9i-a80.dtsi | 2 +- 37 files changed, 43 insertions(+), 43 deletions(-) commit 1defa60e5dc43eccc6cd50deb8f39b5ee5c52463 Author: Marc Zyngier Date: Wed Jan 18 09:13:20 2017 +0000 dt-bindings: arm,gic: Fix binding example for a virt-capable GIC The joys of copy/paste: the example of a virtualization capable GIC in the DT binding was wrong, and propagated to dozens of platforms. By having a GICC region that is only 4kB (instead of 8kB), we end-up not being able to access the GICC_DIR register which is on the second page. Oh well. Let's fix the source of the crap before tackling individual offenders. Acked-by: Tony Lindgren Acked-by: Mark Rutland Acked-by: Arnd Bergmann Signed-off-by: Marc Zyngier Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1df989242d3d790aec79e72d12874bf763c958e1 Author: Arnd Bergmann Date: Tue Feb 7 14:38:51 2017 +0100 ALSA: x86: mark hdmi suspend/resume functions as __maybe_unused The two functions are unused when CONFIG_PM_SLEEP is disabled: sound/x86/intel_hdmi_audio.c:1633:12: error: 'hdmi_lpe_audio_resume' defined but not used [-Werror=unused-function] sound/x86/intel_hdmi_audio.c:1622:12: error: 'hdmi_lpe_audio_suspend' defined but not used [-Werror=unused-function] Marking them as __maybe_unused avoids the warning without introducing an ugly #ifdef. Fixes: 182cdf23dbf6 ("ALSA: x86: Implement runtime PM") Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfe219d373cadab761373aeea4c70406bc27ea2c Author: Amir Goldstein Date: Tue Jan 31 10:34:57 2017 +0200 vfs: wrap write f_ops with file_{start,end}_write() Before calling write f_ops, call file_start_write() instead of sb_start_write(). Replace {sb,file}_start_write() for {copy,clone}_file_range() and for fallocate(). Beyond correct semantics, this avoids freeze protection to sb when operating on special inodes, such as fallocate() on a blockdev. Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Miklos Szeredi fs/open.c | 4 ++-- fs/read_write.c | 4 ++-- include/linux/fs.h | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) commit 11cbfb10775aa2a01cee966d118049ede9d0bdf2 Author: Amir Goldstein Date: Tue Jan 31 10:34:56 2017 +0200 vfs: deny copy_file_range() for non regular files There is no in-tree file system that implements copy_file_range() for non regular files. Deny an attempt to copy_file_range() a directory with EISDIR and any other non regualr file with EINVAL to conform with behavior of vfs_{clone,dedup}_file_range(). This change is needed prior to converting sb_start_write() to file_start_write() in the vfs helper. Cc: linux-api@vger.kernel.org Cc: Al Viro Signed-off-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Miklos Szeredi fs/read_write.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9e79b1326302589a035fe20e8cce7c1a7d8333ed Author: Amir Goldstein Date: Tue Jan 31 10:34:55 2017 +0200 vfs: deny fallocate() on directory There was an obscure use case of fallocate of directory inode in the vfs helper with the comment: "Let individual file system decide if it supports preallocation for directories or not." But there is no in-tree file system that implements fallocate for directory operations. Deny an attempt to fallocate a directory with EISDIR error. This change is needed prior to converting sb_start_write() to file_start_write(), so freeze protection is correctly handled for cases of fallocate file and blockdev. Cc: linux-api@vger.kernel.org Cc: Al Viro Signed-off-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Miklos Szeredi fs/open.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit af7bd4dc13093bf1477f370722bbab24cf457b91 Author: Amir Goldstein Date: Tue Jan 17 06:34:52 2017 +0200 vfs: create vfs helper vfs_tmpfile() Factor out some common vfs bits from do_tmpfile() to be used by overlayfs for concurrent copy up. Signed-off-by: Amir Goldstein Cc: Al Viro Signed-off-by: Miklos Szeredi fs/namei.c | 68 ++++++++++++++++++++++++++++++++++-------------------- include/linux/fs.h | 3 +++ 2 files changed, 46 insertions(+), 25 deletions(-) commit 7a1c44ebc5ac2e2c28d95b0da6060728c334e7e4 Author: Boris Ostrovsky Date: Mon Feb 6 10:58:06 2017 -0500 xen/pvh: Use Xen's emergency_restart op for PVH guests Using native_machine_emergency_restart (called during reboot) will lead PVH guests to machine_real_restart() where we try to use real_mode_header which is not initialized. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross arch/x86/xen/enlighten.c | 3 +++ 1 file changed, 3 insertions(+) commit 2a7197f02dddf1f9cee300bd12512375ed56524a Author: Boris Ostrovsky Date: Mon Feb 6 10:58:05 2017 -0500 xen/pvh: Enable CPU hotplug PVH guests don't (yet) receive ACPI hotplug interrupts and therefore need to monitor xenstore for CPU hotplug event. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross drivers/xen/cpu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcc57df281d93dfa502c824e9f73e0191c3f7c34 Author: Boris Ostrovsky Date: Mon Feb 6 10:57:15 2017 -0500 xen/pvh: PVH guests always have PV devices Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Reviewed-by: Konrad Rzeszutek Wilk arch/x86/xen/platform-pci-unplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8613d78ab09900010a5b32e78ff229f551d661d6 Author: Boris Ostrovsky Date: Mon Feb 6 10:56:15 2017 -0500 xen/pvh: Initialize grant table for PVH guests Like PV guests, PVH does not have PCI devices and therefore cannot use MMIO space to store grants. Instead it balloons out memory and keeps grants there. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross drivers/xen/grant-table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5adad168e586cb381633f45d181bb729b04393a5 Author: Boris Ostrovsky Date: Sun Feb 5 19:50:58 2017 -0500 xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI Since we are not using PIC and (at least currently) don't have IOAPIC we want to make sure that acpi_irq_model doesn't stay set to ACPI_IRQ_MODEL_PIC (which is the default value). If we allowed it to stay then acpi_os_install_interrupt_handler() would try (and fail) to request_irq() for PIC. Instead we set the model to ACPI_IRQ_MODEL_PLATFORM which will prevent this from happening. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross arch/x86/xen/enlighten.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7243b93345f7f8de260e8f5b4670803e64fcbb00 Author: Boris Ostrovsky Date: Sun Feb 5 19:50:52 2017 -0500 xen/pvh: Bootstrap PVH guest Start PVH guest at XEN_ELFNOTE_PHYS32_ENTRY address. Setup hypercall page, initialize boot_params, enable early page tables. Since this stub is executed before kernel entry point we cannot use variables in .bss which is cleared by kernel. We explicitly place variables that are initialized here into .data. While adjusting xen_hvm_init_shared_info() make it use cpuid_e?x() instead of cpuid() (wherever possible). Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 1 + arch/x86/xen/enlighten.c | 124 +++++++++++++++++++++++++++++++++--- arch/x86/xen/xen-pvh.S | 161 +++++++++++++++++++++++++++++++++++++++++++++++ include/xen/xen.h | 5 ++ 5 files changed, 282 insertions(+), 11 deletions(-) commit cee2cfb7d18db1d7bcd0952b5e0e3f19c004023c Author: Boris Ostrovsky Date: Fri Feb 3 16:57:22 2017 -0500 xen/pvh: Import PVH-related Xen public interfaces Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Reviewed-by: Konrad Rzeszutek Wilk include/xen/interface/elfnote.h | 12 ++- include/xen/interface/hvm/hvm_vcpu.h | 143 +++++++++++++++++++++++++++++++++ include/xen/interface/hvm/start_info.h | 98 ++++++++++++++++++++++ 3 files changed, 252 insertions(+), 1 deletion(-) commit 063334f30543597430f172bd7690d21e3590e148 Author: Boris Ostrovsky Date: Fri Feb 3 16:57:22 2017 -0500 xen/x86: Remove PVH support We are replacing existing PVH guests with new implementation. We are keeping xen_pvh_domain() macro (for now set to zero) because when we introduce new PVH implementation later in this series we will reuse current PVH-specific code (xen_pvh_gnttab_setup()), and that code is conditioned by 'if (xen_pvh_domain())'. (We will also need a noop xen_pvh_domain() for !CONFIG_XEN_PVH). Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Reviewed-by: Konrad Rzeszutek Wilk arch/x86/xen/enlighten.c | 140 ++++++--------------------------------- arch/x86/xen/mmu.c | 21 +----- arch/x86/xen/setup.c | 37 +---------- arch/x86/xen/smp.c | 78 ++++++++-------------- arch/x86/xen/smp.h | 8 --- arch/x86/xen/xen-head.S | 62 ++--------------- arch/x86/xen/xen-ops.h | 1 - drivers/xen/events/events_base.c | 1 - include/xen/xen.h | 13 +--- 9 files changed, 54 insertions(+), 307 deletions(-) commit 5a7670ee23f2c07a639c263b70140eaf1da9f68f Author: Boris Ostrovsky Date: Fri Feb 3 16:57:22 2017 -0500 x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C The new Xen PVH entry point requires page tables to be setup by the kernel since it is entered with paging disabled. Pull the common code out of head_32.S so that mk_early_pgtbl_32() can be invoked from both the new Xen entry point and the existing startup_32() code. Convert resulting common code to C. Signed-off-by: Boris Ostrovsky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: matt@codeblueprint.co.uk Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1481215471-9639-1-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_32.h | 32 ++++++++++ arch/x86/kernel/head32.c | 62 +++++++++++++++++++ arch/x86/kernel/head_32.S | 121 +++----------------------------------- 3 files changed, 101 insertions(+), 114 deletions(-) commit 6ac423973397d17684528e89fbbca49b2ff7bb43 Author: Wei Yongjun Date: Mon Feb 6 14:29:55 2017 +0000 PM / OPP: Make _find_opp_table_unlocked() static Fixes the following sparse warning: drivers/base/power/opp/core.c:49:18: warning: symbol '_find_opp_table_unlocked' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Stephen Boyd Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit febf2407418a2d6c042fcd77b206040449cb9a70 Author: Vitaly Kuznetsov Date: Mon Feb 6 18:01:51 2017 +0100 x86/ACPI: keep x86_cpu_to_acpiid mapping valid on CPU hotplug We may or may not have all possible CPUs in MADT on boot but in any case we're overwriting x86_cpu_to_acpiid mapping with U32_MAX when acpi_register_lapic() is called again on the CPU hotplug path: acpi_processor_hotadd_init() -> acpi_map_cpu() -> acpi_register_lapic() As we have the required acpi_id information in acpi_processor_hotadd_init() propagate it to acpi_map_cpu() to always keep x86_cpu_to_acpiid mapping valid. Reported-by: Andrew Jones Signed-off-by: Vitaly Kuznetsov Signed-off-by: Rafael J. Wysocki arch/ia64/kernel/acpi.c | 3 ++- arch/x86/kernel/acpi/boot.c | 5 +++-- drivers/acpi/acpi_processor.c | 4 ++-- include/linux/acpi.h | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) commit 0c6543f6cda442f5497b2d59ac0dcdda45f4778c Author: Dan O'Donovan Date: Sun Feb 5 16:30:14 2017 +0000 spi: acpi: Initialize modalias from of_compatible When using devicetree spi_device.modalias is set to the compatible string with the vendor prefix removed. For SPI devices described via ACPI the spi_device.modalias string is initialized by acpi_device_hid. When using ACPI and DT ids this string ends up something like "PRP0001". Change acpi_register_spi_device to use the of_compatible property if present. This makes it easier to instantiate spi drivers through ACPI with DT ids. Signed-off-by: Dan O'Donovan Reviewed-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Tested-by: Jarkko Nikula Acked-by: Mark Brown Signed-off-by: Rafael J. Wysocki drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 622b307712f1d02048a7abbe376cf30f04c5b310 Author: Dan O'Donovan Date: Sun Feb 5 16:30:13 2017 +0000 i2c: acpi: Initialize info.type from of_compatible When using devicetree i2c_board_info.type is set to the compatible string with the vendor prefix removed. For I2C devices described via ACPI the i2c_board_info.type string is set to the ACPI device name. When using ACPI and DT ids this string ends up something like "PRP0001:00". If the of_compatible property is present try to use that instead. This makes it easier to instantiate i2c drivers through ACPI with DT ids. Signed-off-by: Dan O'Donovan Reviewed-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Tested-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki drivers/i2c/i2c-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51ede5d9668f14d57ea6ba6eaa1b11d5b8ed2780 Author: Dan O'Donovan Date: Sun Feb 5 16:30:12 2017 +0000 ACPI / bus: Introduce acpi_of_modalias() equiv of of_modalias_node() When using devicetree stuff like i2c_client.name or spi_device.modalias is initialized to the first DT compatible id with the vendor prefix stripped. Since some drivers rely on this try to replicate it when using ACPI with DT ids. Signed-off-by: Dan O'Donovan Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 2 ++ 2 files changed, 44 insertions(+) commit 2d479e1fa2d09c5a9518a75a5d21ef2713117946 Author: Dmitry Torokhov Date: Thu Feb 2 17:41:27 2017 -0800 device property: export code duplicating array of property entries When augmenting ACPI-enumerated devices with additional property data based on DMI info, a module has often several potential property sets, with only one being active on a given box. In order to save memory it should be possible to mark everything and __initdata or __initconst, execute DMI match early, and duplicate relevant properties. Then kernel will discard the rest of them. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 194 +++++++++++++++++++++++++++++++---------------- include/linux/property.h | 5 ++ 2 files changed, 134 insertions(+), 65 deletions(-) commit 9426998ce6f8616c48c2834cafbe5616da3f5abd Author: Dmitry Torokhov Date: Thu Feb 2 17:41:26 2017 -0800 device property: constify property arrays values Data that is fed into property arrays should not be modified, so let's mark relevant pointers as const. This will allow us making source arrays as const/__initconst. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 10 +++++----- include/linux/property.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit bec84da8d1da6677c458e6eedd8e814eea91b9fc Author: Dmitry Torokhov Date: Thu Feb 2 17:41:25 2017 -0800 device property: allow to constify properties There is no reason why statically defined properties should be modifiable, so let's make device_add_properties() and the rest of pset_*() functions to take const pointers to properties. This will allow us to mark properties as const/__initconst at definition sites. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 41 +++++++++++++++++++++-------------------- include/linux/property.h | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) commit 873ab035752e62a90eaeb1daf88a44dad1da6ea0 Author: Takashi Iwai Date: Tue Feb 7 12:14:04 2017 +0100 ALSA: x86: Fix driver name string overflow The driver sets card->driver name string over its size (16 bytes). Shorten the name string to fit with it. Also, set more verbose string to card->shortname and ->longname. This doesn't have to be identical with card->driver at all. Reported-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 3 ++- sound/x86/intel_hdmi_lpe_audio.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6c5da8031a3abfad259190d35f83d89568b72ee2 Author: Oleh Kravchenko Date: Sun Jan 29 16:07:31 2017 -0200 [media] cx231xx: Fix I2C on Internal Master 3 Bus Internal Master 3 Bus can send and receive only 4 bytes per time. Signed-off-by: Oleh Kravchenko Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a096fd6492ea676570e621d972f68ff03042d0c4 Author: Oleh Kravchenko Date: Sun Jan 29 16:03:51 2017 -0200 [media] cx231xx: Initial support Evromedia USB Full Hybrid Full HD This patch provide only digital support. The device is based on Si2168 30-demodulator, Si2158-20 tuner and CX23102-11Z chipset; USB id: 1b80:d3b2. Status: - DVB-T2 works fine; - Composite and SVideo works fine; - Analog not implemented. Signed-off-by: Oleh Kravchenko Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/Kconfig | 1 + drivers/media/usb/cx231xx/cx231xx-cards.c | 29 +++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 70 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 4 files changed, 101 insertions(+) commit f2cb13609d5397cdd747f3ed6fb651233851717d Author: Ingo Molnar Date: Wed Feb 1 13:10:18 2017 +0100 sched/topology: Split out scheduler topology code from core.c into topology.c Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/Makefile | 2 +- kernel/sched/core.c | 1659 +---------------------------------------------- kernel/sched/sched.h | 23 +- kernel/sched/topology.c | 1658 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1684 insertions(+), 1658 deletions(-) commit 004172bdad644327dc7a6543186b9d7b529ee944 Author: Ingo Molnar Date: Wed Feb 1 12:01:04 2017 +0100 sched/core: Remove unnecessary #include headers Over the years sched/core.c accumulated over 50 #include lines, 40 of which are superfluous. (!) Removing them decreases the preprocessed .c file (.i) size noticeably: triton:~/tip> wc -l kernel/sched/core.i Before: 76387 kernel/sched/core.i After: 75896 kernel/sched/core.i Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 59 +++++++++-------------------------------------------- 1 file changed, 10 insertions(+), 49 deletions(-) commit 535b9552bb81eebe112ee7bd34ee498857b0c26b Author: Ingo Molnar Date: Wed Feb 1 12:29:21 2017 +0100 sched/rq_clock: Consolidate the ordering of the rq_clock methods update_rq_clock_task() and update_rq_clock() we unnecessarily spread across core.c, requiring an extra prototype line. Move them next to each other and in the proper order. Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 153 ++++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 75 deletions(-) commit 4025819d328cd0efc53ee22e01b800631944b7f3 Author: Ingo Molnar Date: Wed Feb 1 11:58:42 2017 +0100 delayacct: Include include/linux/delayacct.h relies on 'struct taskstats' but does not include the header that defines it. This worked so far because files that included also happened to include other headers that included uapi/linux/taskstats.h. Fix it. Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/delayacct.h | 1 + 1 file changed, 1 insertion(+) commit d1ccc66df8bfe30ee2533ceef40633d65154b43d Author: Ingo Molnar Date: Wed Feb 1 11:46:42 2017 +0100 sched/core: Clean up comments Refresh the comments in the core scheduler code: - Capitalize sentences consistently - Capitalize 'CPU' consistently - ... and other small details. Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 358 ++++++++++++++++++++++++++-------------------------- 1 file changed, 182 insertions(+), 176 deletions(-) commit b3879a4d3a31ef14265a52e8d941cf4b0f6627ae Author: Ard Biesheuvel Date: Mon Feb 6 11:22:46 2017 +0000 efi/libstub: Make file I/O chunking x86-specific The ARM decompressor is finicky when it comes to uninitialized variables with local linkage, the reason being that it may relocate .text and .bss independently when executing from ROM. This is only possible if all references into .bss from .text are absolute, and this happens to be the case for references emitted under -fpic to symbols with external linkage, and so all .bss references must involve symbols with external linkage. When building the ARM stub using clang, the initialized local variable __chunk_size is optimized into a zero-initialized flag that indicates whether chunking is in effect or not. This flag is therefore emitted into .bss, which triggers the ARM decompressor's diagnostics, resulting in a failed build. Under UEFI, we never execute the decompressor from ROM, so the diagnostic makes little sense here. But we can easily work around the issue by making __chunk_size global instead. However, given that the file I/O chunking that is controlled by the __chunk_size variable is intended to work around known bugs on various x86 implementations of UEFI, we can simply make the chunking an x86 specific feature. This is an improvement by itself, and also removes the need to parse the efi= options in the stub entirely. Tested-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1486380166-31868-8-git-send-email-ard.biesheuvel@linaro.org [ Small readability edits. ] Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/efi-stub-helper.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 9661b332041dab63ba2e5222b40a9f916c1368a9 Author: David Howells Date: Mon Feb 6 11:22:45 2017 +0000 efi: Print the secure boot status in x86 setup_arch() Print the secure boot status in the x86 setup_arch() function, but otherwise do nothing more for now. More functionality will be added later, but this at least allows for testing. Signed-off-by: David Howells [ Use efi_enabled() instead of IS_ENABLED(CONFIG_EFI). ] 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/1486380166-31868-7-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f3cf6f7434debcc65f397228c689641b07c1be35 Author: Josh Boyer Date: Mon Feb 6 11:22:44 2017 +0000 efi: Disable secure boot if shim is in insecure mode A user can manually tell the shim boot loader to disable validation of images it loads. When a user does this, it creates a UEFI variable called MokSBState that does not have the runtime attribute set. Given that the user explicitly disabled validation, we can honor that and not enable secure boot mode if that variable is set. Signed-off-by: Josh Boyer Signed-off-by: David Howells 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/1486380166-31868-6-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/secureboot.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit de8cb458625c164bb3f93c4e415e479afce8fa9d Author: David Howells Date: Mon Feb 6 11:22:43 2017 +0000 efi: Get and store the secure boot status Get the firmware's secure-boot status in the kernel boot wrapper and stash it somewhere that the main kernel image can find. The efi_get_secureboot() function is extracted from the ARM stub and (a) generalised so that it can be called from x86 and (b) made to use efi_call_runtime() so that it can be run in mixed-mode. For x86, it is stored in boot_params and can be overridden by the boot loader or kexec. This allows secure-boot mode to be passed on to a new kernel. Suggested-by: Lukas Wunner Signed-off-by: David Howells 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/1486380166-31868-5-git-send-email-ard.biesheuvel@linaro.org [ Small readability edits. ] Signed-off-by: Ingo Molnar Documentation/x86/zero-page.txt | 2 + arch/x86/boot/compressed/eboot.c | 7 ++++ arch/x86/include/uapi/asm/bootparam.h | 3 +- arch/x86/kernel/asm-offsets.c | 1 + drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/arm-stub.c | 63 +++---------------------------- drivers/firmware/efi/libstub/secureboot.c | 61 ++++++++++++++++++++++++++++++ include/linux/efi.h | 8 ++++ 8 files changed, 88 insertions(+), 59 deletions(-) commit e58910cdc9f43cda2e52fcdf2fddbdc74e80b2f7 Author: Josh Boyer Date: Mon Feb 6 11:22:42 2017 +0000 efi: Add SHIM and image security database GUID definitions Add the definitions for shim and image security database, both of which are used widely in various Linux distros. Signed-off-by: Josh Boyer Signed-off-by: David Howells 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/1486380166-31868-4-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar include/linux/efi.h | 3 +++ 1 file changed, 3 insertions(+) commit 6d0ca4a47bf8cb313a5180eabb791c33467f4452 Author: David Howells Date: Mon Feb 6 11:22:41 2017 +0000 arm/efi: Allow invocation of arbitrary runtime services efi_call_runtime() is provided for x86 to be able abstract mixed mode support. Provide this for ARM also so that common code work in mixed mode also. Suggested-by: Lukas Wunner Signed-off-by: David Howells 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/1486380166-31868-3-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm/include/asm/efi.h | 1 + arch/arm64/include/asm/efi.h | 1 + 2 files changed, 2 insertions(+) commit a2cd2f3f29f26782b7484b32e2af172e29313717 Author: David Howells Date: Mon Feb 6 11:22:40 2017 +0000 x86/efi: Allow invocation of arbitrary runtime services Provide the ability to perform mixed-mode runtime service calls for x86 in the same way the following commit provided the ability to invoke for boot services: 0a637ee61247bd ("x86/efi: Allow invocation of arbitrary boot services") Suggested-by: Lukas Wunner Signed-off-by: David Howells 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/1486380166-31868-2-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 1 + arch/x86/boot/compressed/head_32.S | 6 +++--- arch/x86/boot/compressed/head_64.S | 8 ++++---- arch/x86/include/asm/efi.h | 5 +++++ 4 files changed, 13 insertions(+), 7 deletions(-) commit bddb2afcb6c52a545f18fb9bcd4829828ebf4a3a Author: Johannes Berg Date: Tue Feb 7 10:40:50 2017 +0100 mac80211: add back lost debugfs files Somehow these files were never present or lost, but the code is there and they seem somewhat useful, so add them back. Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 1 + net/mac80211/debugfs_sta.c | 1 + 2 files changed, 2 insertions(+) commit 543113d2f4b5dd40d46a95502effe86b845dfe34 Author: Dou Liyang Date: Tue Feb 7 12:44:48 2017 +0800 x86/apic: Fix a typo in a comment line s/bringin /bringing Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: trivial@kernel.org Link: http://lkml.kernel.org/r/1486442688-24690-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5773ebfee729acf93b330664eab4c8d77edc2193 Author: Niklas Cassel Date: Mon Feb 6 17:43:49 2017 +0100 x86/kconfig: Remove misleading note regarding hibernation and KASLR There used to be a restriction with KASLR and hibernation, but this is no longer true, and since commit: 65fe935dd238 ("x86/KASLR, x86/power: Remove x86 hibernation restrictions") the parameter "kaslr" does no longer exist. Signed-off-by: Niklas Cassel Cc: Kees Cook Cc: Linus Torvalds Cc: Niklas Cassel Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486399429-23078-1-git-send-email-niklass@axis.com Signed-off-by: Ingo Molnar arch/x86/Kconfig | 4 ---- 1 file changed, 4 deletions(-) commit 2d6ceb8e654a0ce998762b13f0ba2c275220a244 Author: Zhenyu Wang Date: Fri Jan 13 15:36:17 2017 +0800 drm/i915/gvt: fix vgpu type size init As now gvt init after knowing hw resource info, we can determine vGPU type from machine size instead of pre-defined value. Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/vgpu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 144730256f7a3a8b4cae0150852d0ac3be1a676b Author: Zhenyu Wang Date: Tue Dec 27 14:49:14 2016 +0800 drm/i915/gvt: use normal mmio read function for firmware exposure As now gvt init is late after MMIO initialization, use normal MMIO read function for initial firmware exposure if no available firmware loaded. Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 47 ++++--------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) commit 3de49a7314c9e17d71e97af4ed4b0564609e9ba7 Author: Zhenyu Wang Date: Tue Dec 27 14:47:04 2016 +0800 drm/i915/gvt: remove detect_host() MPT hook We only depend on pvinfo register for GVT-g state detection, not require hypervisor host detect any more. Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 7 ------- drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 32 -------------------------------- drivers/gpu/drm/i915/gvt/mpt.h | 12 ------------ 4 files changed, 52 deletions(-) commit d2896e34eb6f10b4f76b42df34b7e075b203c5ff Author: Zhenyu Wang Date: Fri Jan 13 15:31:58 2017 +0800 drm/i915/gvt: move intel iommu detection to intel_gvt_init() Prepare to remove detect_host() hook. Move intel iommu detection early in intel_gvt_init(). Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++ drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 26f837e8e1ec9748b55be3af6d7f54b9ad5a43b1 Author: Zhenyu Wang Date: Fri Jan 13 10:46:09 2017 +0800 drm/i915: make intel_gvt_init() later instead of too early Previously intel_gvt_init() was called very early even before MMIO initialization which had several drawbacks: - Have to handle MMIO access for initial MMIO state dump if golden state firmware is not available - Hypervisor detection should depend on pvinfo only instead of detecting hypervisor status. - Don't know hw resource size e.g aperture, ggtt size to determine for vGPU type, etc. This trys to move intel_gvt_init() call late after required info has already been initialized for GVT host. Acked-by: Chris Wilson Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/i915_drv.c | 14 +++++++------- drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) commit 2c88313650f3fb9f04221101901a943bb92059b2 Author: Chuanxiao Dong Date: Fri Jan 13 10:17:02 2017 +0800 drm/i915/gvt: add more resolutions in virtual edid The current virtual edid can only support the resolution up to 1024x768. Update the virtual edid so that can support more resoltions. With this new virtual edid, resolution can be up to 1920x1200. V2: add detailed modeline description in edid code comments Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 3a5e969bb2f6692a256352649355d56d018d6b88 Author: Felix Fietkau Date: Thu Feb 2 10:14:52 2017 +0100 ath9k: fix race condition in enabling/disabling IRQs The code currently relies on refcounting to disable IRQs from within the IRQ handler and re-enabling them again after the tasklet has run. However, due to race conditions sometimes the IRQ handler might be called twice, or the tasklet may not run at all (if interrupted in the middle of a reset). This can cause nasty imbalances in the irq-disable refcount which will get the driver permanently stuck until the entire radio has been stopped and started again (ath_reset will not recover from this). Instead of using this fragile logic, change the code to ensure that running the irq handler during tasklet processing is safe, and leave the refcount untouched. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/init.c | 1 + drivers/net/wireless/ath/ath9k/mac.c | 44 ++++++++++++++++++++++++++-------- drivers/net/wireless/ath/ath9k/mac.h | 1 + drivers/net/wireless/ath/ath9k/main.c | 27 +++++++++------------ 5 files changed, 48 insertions(+), 26 deletions(-) commit a34d0a0da1abae46a5f6ebd06fb0ec484ca099d9 Author: Felix Fietkau Date: Thu Feb 2 10:14:51 2017 +0100 ath9k_hw: check if the chip failed to wake up In an RFC patch, Sven Eckelmann and Simon Wunderlich reported: "QCA 802.11n chips (especially AR9330/AR9340) sometimes end up in a state in which a read of AR_CFG always returns 0xdeadbeef. This should not happen when when the power_mode of the device is ATH9K_PM_AWAKE." Include the check for the default register state in the existing MAC hang check. Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hw.c | 4 ++++ 1 file changed, 4 insertions(+) commit d63ffc45c5d3df15f6fc8c73079458ce4a111995 Author: Felix Fietkau Date: Thu Feb 2 10:14:50 2017 +0100 ath9k: rename tx_complete_work to hw_check_work Also include common MAC alive check. This should make the hang checks more reliable for modes where beacons are not sent and is used as a starting point for further hang check improvements Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ath9k.h | 6 ++--- drivers/net/wireless/ath/ath9k/init.c | 1 + drivers/net/wireless/ath/ath9k/link.c | 46 ++++++++++++++++++---------------- drivers/net/wireless/ath/ath9k/main.c | 10 +++++--- drivers/net/wireless/ath/ath9k/xmit.c | 2 -- 5 files changed, 35 insertions(+), 30 deletions(-) commit 03c95dbef64264b6d86d50c0f0d90fdf989e528e Author: Bjorn Andersson Date: Wed Feb 1 07:27:47 2017 -0800 wcn36xx: Implement cancel_hw_scan In the even that the wcn36xx interface is brought down while a hw_scan is active we must abort and wait for the ongoing scan to signal completion to mac80211. Reported-by: Mart Raudsepp Fixes: 886039036c20 ("wcn36xx: Implement firmware assisted scan") Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 25 ++++++++++++++++++++++++- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) commit 7f622593cc5add77a99cd39404e8a851be9de792 Author: Ashok Raj Nagarajan Date: Wed Feb 1 00:06:51 2017 +0530 ath10k: fix reading sram contents for QCA4019 With QCA4019 platform, SRAM address can be accessed directly from host but currently, we are assuming sram addresses cannot be accessed directly and hence we convert the addresses. While there, clean up growing hw checks during conversion of target CPU address to CE address. Now we have function pointer pertaining to different chips. Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 23 ++++++++++++++++ drivers/net/wireless/ath/ath10k/pci.c | 51 ++++++++++++++++++++++------------- drivers/net/wireless/ath/ath10k/pci.h | 5 ++++ 3 files changed, 60 insertions(+), 19 deletions(-) commit cb4281528b62207918b1e95827cad7527aa4dbaa Author: Tamizh chelvam Date: Thu Feb 2 08:32:18 2017 +0200 ath10k: fix boot failure in UTF mode/testmode Rx filter reset and the dynamic tx switch mode (EXT_RESOURCE_CFG) configuration are causing the following errors when UTF firmware is loaded to the target. Error message 1: [ 598.015629] ath10k_pci 0001:01:00.0: failed to ping firmware: -110 [ 598.020828] ath10k_pci 0001:01:00.0: failed to reset rx filter: -110 [ 598.141556] ath10k_pci 0001:01:00.0: failed to start core (testmode): -110 Error message 2: [ 668.615839] ath10k_ahb a000000.wifi: failed to send ext resource cfg command : -95 [ 668.618902] ath10k_ahb a000000.wifi: failed to start core (testmode): -95 Avoiding these configurations while bringing the target in testmode is solving the problem. Cc: stable@vger.kernel.org Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit ee8b08a1be82edca6cfc3cb7e86f674e0ede9de2 Author: Maharaja Kennadyrajan Date: Thu Feb 2 08:32:19 2017 +0200 ath10k: add debugfs support to get per peer tids log via tracing This patch provides support to get per peer tids log. echo 1 > /sys/kernel/debug/ieee80211/phyX/netdev\:wlanX/stations/ XX:XX/peer_debug_trigger These logs will be the part of FWLOGS which we collect the logs via tracing interface. Here we will get the peer tigd logs only once(not repeatedly) when we write 1 to the debugfs file. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debugfs_sta.c | 65 +++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 1 + 2 files changed, 66 insertions(+) commit 39bfe9f7c0c9ac84025d26a073d2a5de4f9b1c99 Author: Kalle Valo Date: Thu Feb 2 12:48:08 2017 +0200 ath10k: few whitespace fixes Fixes checkpatch warnings: drivers/net/wireless/ath/ath10k/pci.c:1593: Statements should start on a tabstop drivers/net/wireless/ath/ath10k/ce.c:962: Alignment should match open parenthesis Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 6 +++--- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 019e4280fac9bf9b382ed3623a574b6946e2870c Author: Kalle Valo Date: Thu Feb 2 12:47:56 2017 +0200 ath10k: use names in function definition arguments Fixes new checkpatch warnings: drivers/net/wireless/ath/ath10k/htt.h:1823: function definition argument 'struct sk_buff *' should also have an identifier name drivers/net/wireless/ath/ath10k/wmi.h:6607: function definition argument 'struct wmi_start_scan_arg *' should also have an identifier name Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt.h | 2 +- drivers/net/wireless/ath/ath10k/wmi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b2d60415684663d9dfc616ed97a6f78b3c73c29a Author: Kalle Valo Date: Thu Feb 2 12:47:45 2017 +0200 ath10k: prefer unsigned int over just unsigned Fixes new checkpatch warnings: drivers/net/wireless/ath/ath10k/htt.h:1639: Prefer 'unsigned int' to bare use of 'unsigned' drivers/net/wireless/ath/ath10k/htt.h:1660: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 075a1d46bed386138eb51f92a6a3130c82fdefec Author: Takashi Iwai Date: Tue Feb 7 07:55:27 2017 +0100 ALSA: x86: Rename had_enable_audio_int() to had_ack_irqs() had_enable_audio_int() came from the LPE audio shell set_caps callback with ENABLE_INT and DISABLE_INT caps. I interpreted as these correspond to enabling / disabling the audio interface, but the actual implementation is only to clear (send ACK) to both BUFFER_DONE and BUFFER_UNDERRUN interrupts unconditionally. And, there is no counterpart, DISABLE_INT, code at all. For avoiding the further misunderstanding, rename the function to the more fitting one, had_ack_irqs(), and drop the calls with enable=false in allover places. There is no functional changes at all. After this patch, there is only one caller at the PCM trigger start. Then it's doubtful whether this call is still really needed or not; I bet it not, but let's stay in the safer side for now and keep it as was. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 3e21a76ca32f535a7640b0657f8d56660527ddab Author: Takashi Iwai Date: Tue Feb 7 08:13:50 2017 +0100 ALSA: x86: Drop suspicious U24 format support U24 format is declared to be supported by the driver, but this looks really doubtful, as there is no corresponding code. Better to drop it. This format is very uncommon, so there should be practically no impact by this change. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5d81296b5e7849ba3bcc5bf430ffd37bf67ff7dc Author: Andrej Krutak Date: Mon Feb 6 20:34:58 2017 +0100 ALSA: line6: Always setup isochronous transfer properties While not all line6 devices currently support PCM, it causes no harm to 'have it prepared'. This also fixes toneport, which only has PCM - in which case we previously skipped the USB transfer properties detection completely. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 1e94320ffee29424ef70cdbb7f5601216382b7e6 Merge: e1b239f f3d8331 Author: Takashi Iwai Date: Tue Feb 7 09:38:44 2017 +0100 Merge branch 'for-linus' into for-next commit 6773386f977ce5af339f9678fa2918909a946c6b Author: Larry Finger Date: Sun Feb 5 10:24:22 2017 -0600 rtlwifi: rtl8192c-common: Fix "BUG: KASAN: Kernels built with CONFIG_KASAN=y report the following BUG for rtl8192cu and rtl8192c-common: ================================================================== BUG: KASAN: slab-out-of-bounds in rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] at addr ffff8801c90edb08 Read of size 1 by task kworker/0:1/38 page:ffffea0007243800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004000(head) page dumped because: kasan: bad access detected CPU: 0 PID: 38 Comm: kworker/0:1 Not tainted 4.9.7-gentoo #3 Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Z77-DS3H, BIOS F11a 11/13/2013 Workqueue: rtl92c_usb rtl_watchdog_wq_callback [rtlwifi] 0000000000000000 ffffffff829eea33 ffff8801d7f0fa30 ffff8801c90edb08 ffffffff824c0f09 ffff8801d4abee80 0000000000000004 0000000000000297 ffffffffc070b57c ffff8801c7aa7c48 ffff880100000004 ffffffff000003e8 Call Trace: [] ? dump_stack+0x5c/0x79 [] ? kasan_report_error+0x4b9/0x4e0 [] ? _usb_read_sync+0x15c/0x280 [rtl_usb] [] ? __asan_report_load1_noabort+0x45/0x50 [] ? rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] [] ? rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] [] ? rtl92c_dm_rf_saving+0x96e/0x1330 [rtl8192c_common] ... The problem is due to rtl8192ce and rtl8192cu sharing routines, and having different layouts of struct rtl_pci_priv, which is used by rtl8192ce, and struct rtl_usb_priv, which is used by rtl8192cu. The problem was resolved by placing the struct bt_coexist_info at the head of each of those private areas. Reported-and-tested-by: Dmitry Osipenko Signed-off-by: Larry Finger Cc: Stable # 4.0+ Cc: Dmitry Osipenko Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/pci.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/usb.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 41880bb38a558fab804d826488bbaef332f179a2 Author: Larry Finger Date: Fri Feb 3 11:35:21 2017 -0600 rtlwifi: btcoexist: Convert halbtcoutsrc.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtcoutsrc.c to use the standard routines. It also deletes the definitions of the now-unused debugging macros, and turns on compilation of all the routines in btcoexist. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile | 7 +++++-- .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 4 ++-- .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 12 ------------ 3 files changed, 7 insertions(+), 16 deletions(-) commit 10468c3b438c36a40e237bab86d15d2b87716046 Author: Larry Finger Date: Fri Feb 3 11:35:20 2017 -0600 rtlwifi: btcoexist: Convert halbtc8821a2ant.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8821a2ant.c to use the standard routines. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1075 +++++++++++--------- 1 file changed, 571 insertions(+), 504 deletions(-) commit bed4ff58af9d9c31da38522ead93403ffb661569 Author: Larry Finger Date: Fri Feb 3 11:35:19 2017 -0600 rtlwifi: btcoexist: Convert halbtc8821a1ant.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8821a1ant.c to use the standard routines. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 898 +++++++++++---------- 1 file changed, 480 insertions(+), 418 deletions(-) commit 2277f5f1154aa101dac87ea06fe4925d6025ddf3 Author: Larry Finger Date: Fri Feb 3 11:35:18 2017 -0600 rtlwifi: btcoexist: Convert halbtc8723b2ant.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8723b2ant.c to use the standard routines. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 993 +++++++++++---------- 1 file changed, 527 insertions(+), 466 deletions(-) commit dd192494e6ed5fb29e75c82cc8dc40f9e7f1f764 Author: Larry Finger Date: Fri Feb 3 11:35:17 2017 -0600 rtlwifi: btcoexist: Convert halbtc8723b1ant.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8723b1ant.c to use the standard routines. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 827 +++++++++++---------- 1 file changed, 443 insertions(+), 384 deletions(-) commit 258b93cc391bb781f0ad438cd84adf3666b86922 Author: Larry Finger Date: Fri Feb 3 11:35:16 2017 -0600 rtlwifi: btcoexist: Convert halbtc8192e2ant.c to use standard debugging The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8192e2ant.c to use the standard routines. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c | 237 +++++++++++---------- 1 file changed, 126 insertions(+), 111 deletions(-) commit d5e582523aead22cd1fd62aee232b6f9e4ce82c1 Author: Larry Finger Date: Fri Feb 3 11:35:15 2017 -0600 rtlwifi: rtl8821ae: Fix typo in symbol for bandwidth numbers In several places, "BANDWITH" is used when "BANDWIDTH" should have been used. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 10 +++++----- drivers/net/wireless/realtek/rtlwifi/wifi.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit a5b60de6972decc6b50a39abb376077c3c3621c8 Author: Ganapathi Bhat Date: Fri Feb 3 18:30:22 2017 +0530 mwifiex: Avoid skipping WEP key deletion for AP This patch fixes the issue specific to AP. AP is started with WEP security and external station is connected to it. Data path works in this case. Now if AP is restarted with WPA/WPA2 security, station is able to connect but ping fails. Driver skips the deletion of WEP keys if interface type is AP. Removing that redundant check resolves the issue. Fixes: e57f1734d87a ("mwifiex: add key material v2 support") Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 -- 1 file changed, 2 deletions(-) commit 6232c17438ed01f43665197db5a98a4a4f77ef47 Author: Stanislaw Gruszka Date: Thu Feb 2 10:57:40 2017 +0100 rt2x00: avoid introducing a USB dependency in the rt2x00lib module As reported by Felix: Though protected by an ifdef, introducing an usb symbol dependency in the rt2x00lib module is a major inconvenience for distributions that package kernel modules split into individual packages. Get rid of this unnecessary dependency by calling the usb related function from a more suitable place. Cc: Vishal Thanki Reported-by: Felix Fietkau Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 23 ++++++++--------------- drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 5 +++++ 2 files changed, 13 insertions(+), 15 deletions(-) commit 0f83ff69735651cc7a3d150466a5257ff829b62b Author: Rafał Miłecki Date: Tue Jan 17 23:35:50 2017 +0100 brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT This new helper reads extra frequency limits specified in DT and disables unavailable chanels. This is useful for devices (like home routers) with chipsets limited e.g. by board design. In order to respect info read from DT we simply need to check for IEEE80211_CHAN_DISABLED bit when constructing channel info. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 50d55b6d3f1c40485e2e06b2805ef81f881ee9db Author: Johannes Berg Date: Thu Jan 5 13:38:35 2017 +0100 mwifiex: don't include mac80211.h This driver doesn't use mac80211, so it shouldn't include mac80211.h, include only the necessary cfg80211.h instead. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/decl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87a8d03266a55f18f31fdb71c28a8dcffe39124d Merge: 696204f d5adbfc Author: Ingo Molnar Date: Tue Feb 7 08:49:17 2017 +0100 Merge tag 'v4.10-rc7' into efi/core, to pick up fixes Signed-off-by: Ingo Molnar commit d7eb3c0a6bb34cf0e6bc73ed65784363bbba6763 Merge: cceb0a5 8364fbb Author: Kalle Valo Date: Tue Feb 7 09:30:26 2017 +0200 Merge tag 'iwlwifi-next-for-kalle-2017-02-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Second batch of improvements and fixes for v4.11. * A bunch of bugfixes for the DQA code; * Work on support for new A000 devices continues; * Some clean-ups and general improvements commit cceb0a5973202b4a5d649ede937d35786d7ca168 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:08 2017 -0600 rtlwifi: Add work queue for c2h cmd. btcoex needs to sleep, thus it must run in thread context. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 93 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/base.h | 3 + .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 15 +++- .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 18 ++++- .../net/wireless/realtek/rtlwifi/rtl8723be/fw.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 18 ++++- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 3 + .../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 14 ++++ 12 files changed, 160 insertions(+), 13 deletions(-) commit 0ff78adeef117a9aa547e737f635cae8ca2f0c90 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:07 2017 -0600 rtlwifi: rtl8723be: fix ant_sel code When ant_sel is set, we need to fill single_ant_path to select correct antenna path. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e0215c1420262ee08b43ef7cb3dbd79c9f0d0632 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:06 2017 -0600 rtlwifi: btcoex: move bt_type declaration Routine rtl_get_hwpg_bt_type() is better in halbtcoutsrc.c than in rtl_btc.c. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 5 +++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7fe1fe75c311149653c362c607804639492d7166 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:05 2017 -0600 rtlwifi: rtl8723be: btcoex: add package_type function to btcoex The new code handles the package-type of the chip. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 7 +++++ .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 2 ++ drivers/net/wireless/realtek/rtlwifi/efuse.c | 5 ++-- drivers/net/wireless/realtek/rtlwifi/efuse.h | 1 + .../net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 33 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 9 ++++++ 6 files changed, 54 insertions(+), 3 deletions(-) commit 0de9b5db9fbf70e8d9a98eae8cbdf33f7c04252c Author: Ping-Ke Shih Date: Mon Feb 6 21:30:04 2017 -0600 rtlwifi: move btcoex's ant_num declaration File halbtcoutsrc.c is a better place for routine rtl_get_hwpg_ant_num() than file rtl_btc.c. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 12 ++++++++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 11 ----------- drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 2 ++ 4 files changed, 15 insertions(+), 12 deletions(-) commit db8cb0095b0ec9700d6f369f594eb31ff683e322 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:03 2017 -0600 rtlwifi: rtl8723be: btcoexist: Add single_ant_path Some devices with RTL8732BE wifi/Bluetooth adapters are shipped with only a single antenna. On a subset of these, the EEPROM is incorectly coded to indicate the wrong connection. The resulting problems have been fixed for wifi. This change handles them for BT. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 5 +++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 4 files changed, 8 insertions(+) commit d46fa3e47aebc10ec800dce1c55a7e149a57b93b Author: Larry Finger Date: Mon Feb 6 21:30:02 2017 -0600 rtlwifi: btcoexist: Change logging in halbtc8192e2ant.c This routine uses its own debugging macros These are changed to use the the recently rewritten RT_TRACE macro. There are also some renamed variables that were missed in the previous step. The only functional change is that some debugging statements have been dropped based on the final code supplied by Realtek. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/Makefile | 1 + .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c | 845 ++++++++++----------- 2 files changed, 417 insertions(+), 429 deletions(-) commit 1a2814739fe5876592048550cce15d5fceeae355 Author: Ping-Ke Shih Date: Mon Feb 6 21:30:01 2017 -0600 rtlwifi: btcoexist: Add vendor definition for new btcoexist Routine halbtc_get() will need to be able to get the vendor ID. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 3 +++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 7 +++++++ 2 files changed, 10 insertions(+) commit 6f85c03bc34ce7040f0b56eca963be4969b719de Author: Ping-Ke Shih Date: Mon Feb 6 21:30:00 2017 -0600 rtlwifi: Add a new enumeration value to btc_set_type The new value is needed for future capability. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 1 file changed, 1 insertion(+) commit 8d0d43e342083c9d2b15542e9a99727c0ef43a7f Author: Ping-Ke Shih Date: Mon Feb 6 21:29:59 2017 -0600 rtlwifi: Set retry limit depends on vif type. We assign different retry limit according to vif type, because it can boost performance in field. Signed-off-by: Ping-Ke Shih Signed-off-by: shaofu Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 21 ++++++++++++++++++--- drivers/net/wireless/realtek/rtlwifi/pci.c | 7 +++++++ drivers/net/wireless/realtek/rtlwifi/ps.c | 3 +++ 3 files changed, 28 insertions(+), 3 deletions(-) commit 1e75622c630b8701f11ea6af568e0006885c9b46 Author: Ping-Ke Shih Date: Mon Feb 6 21:29:58 2017 -0600 rtlwifi: Fix programing CAM content sequence. There is a potential race condition when the control byte of a CAM entry is written first. Write in reverse order to correct the condition. Signed-off-by: Ping-Ke Shih Signed-off-by: shaofu Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/cam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea417aa8a38bc7db929281d6dc4b671e75f51844 Author: Martin Schwidefsky Date: Wed Nov 16 09:48:41 2016 +0100 s390/debug: make debug event time stamps relative to the boot TOD clock The debug features currently uses absolute TOD time stamps for the debug events. Given that the TOD clock can jump forward and backward due to STP sync checks the order of debug events can get obfuscated. Replace the absolute TOD time stamps with a delta to the IPL time stamp. On a STP sync check the TOD clock correction is added to the IPL time stamp as well to make the deltas unaffected by STP sync check. The readout of the debug feature entries will convert the deltas back to absolute time stamps based on the Unix epoch. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/timex.h | 8 -------- arch/s390/kernel/debug.c | 13 +++++++------ arch/s390/kernel/time.c | 3 +-- 3 files changed, 8 insertions(+), 16 deletions(-) commit 8676caa4fb7fc02b2c76842a0024919d0caa4b8d Author: Martin Schwidefsky Date: Sat Feb 4 12:38:12 2017 +0100 s390/topology: correct allocation of topology information The data stored by the STSI instruction can be up to a page in size but the memblock_virt_alloc allocation for tl_info only specifies 16 bytes. The memory after the short allocation is overwritten every time arch_update_cpu_topology is called. Fixes: 8c9105802235 "s390/numa: establish cpu to node mapping early" Signed-off-by: Martin Schwidefsky arch/s390/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da8fd820f389a0e29080b14c61bf5cf1d8ef5ca1 Author: Heiko Carstens Date: Sat Feb 4 11:40:36 2017 +0100 s390: make setup_randomness work Commit bcfcbb6bae64 ("s390: add system information as device randomness") intended to add some virtual machine specific information to the randomness pool. Unfortunately it uses the page allocator before it is ready to use. In result the page allocator always returns NULL and the setup_randomness function never adds anything to the randomness pool. To fix this use memblock_alloc and memblock_free instead. Fixes: bcfcbb6bae64 ("s390: add system information as device randomness") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f74faec6b3af9d88943a33ccd08de63b0dab8bc7 Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 m68k/mac: Replace via-maciisi driver with via-cuda driver Change the device probe test in the via-cuda.c driver so it will load on Egret-based machines too. Remove the now redundant via-maciisi.c driver. Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman arch/m68k/include/asm/macintosh.h | 2 +- arch/m68k/mac/config.c | 18 +- arch/m68k/mac/misc.c | 72 +--- drivers/macintosh/Kconfig | 24 +- drivers/macintosh/Makefile | 1 - drivers/macintosh/adb.c | 4 - drivers/macintosh/via-cuda.c | 8 +- drivers/macintosh/via-maciisi.c | 677 -------------------------------------- 8 files changed, 30 insertions(+), 776 deletions(-) commit d23eee88b56921a0bccd3b2355fc6feb4b5d343b Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Add support for Egret system controller The Egret system controller was the predecessor to the Cuda and the differences are minor. On Cuda, byte acknowledgement requires one transition of the TACK signal; on Egret two are needed. On Cuda, TIP is active low; on Egret it is active high. And Cuda raises certain interrupts that Egret omits. Accomodating these differences complicates the Cuda driver slightly but avoids a lot of duplication (see next patch). Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 155 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 134 insertions(+), 21 deletions(-) commit 97ced1aac07e7b5348a560512b287af69f863917 Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Initialize data_index early and increment consistently Initialize data_index where appropriate to improve readability and assist debugging. This change doesn't affect driver behaviour. I prefer to see current_req->data[data_index++] in place of current_req->data[0] or current_req->data[1] inasmuchas it becomes obvious what the data_index variable does. Moreover, the actual value of data_index when examined at any given moment tells me something about prior events, which did prove helpful. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac39452e942af6a212e8f89e8a36b71354323845 Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Use spinlock_irq_save/restore instead of enable/disable_irq The cuda_start() function uses spinlock_irq_save/restore for mutual exclusion. Let's have cuda_poll() do the same when polling the VIA interrupt. The benefit to disabling local irqs when the interrupt is being polled is that the interrupt handler now has the same timing properties regardless of whether it is invoked normally or from cuda_poll(). This driver was written back when local irqs remained enabled during execution of interrupt handlers and cuda_poll() was probably trying to achieve the same effect by use of enable/disable_irq. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit a64662432200f8af6f67cd3664885a323f6a2f2d Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Avoid TREQ race condition When a read transaction completes, one of several things will happen: a new transfer is started by the driver, a new transfer request is raised by the Cuda (i.e. TREQ asserted), or both happen at once. When both happen at once, there is a race condition between the TREQ test in the read_done state and the same test in cuda_start(). Moreover, the former test uses a stale TREQ value. Theoretically, this can result in the undesirable outcome that the interrupt handler completes with the state machine 'idle' when it should instead start the next transaction. Avoid this race by calling cuda_start() first and then confirming that it succeeded. If not, test the current TREQ value before entering the 'reading' state. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cfbf99801bcaf8398492ebc16af72259ad7aa146 Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Fix re-initialization of reply_ptr and reading_reply When reading_reply is set, reply_ptr points into an adb_request struct. Conversely, when reply_ptr instead points into the global cuda_rbuf, reading_reply must be false. Unfortunately, this rule can be violated because re-initialization of reply_ptr and reading_reply presently depends on the TREQ input. Fix this by re-initializing reply_ptr and reading_reply as soon as they are known to be invalid. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe73b582f179354e233e5deddbd274efe8d3bbb9 Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Prevent read buffer overflow If the Cuda driver does not enter the 'read_done' state for some reason, it may continue in the 'reading' state until the buffer overflows. Add a bounds check to prevent this. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fd7a65a27c6cb9b0920130d9402b95695168092d Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Add TREQ, TIP and TACK signal helpers Introduce some helpers for handling the signalling between VIA and Cuda. This abstraction will be used to add support for Egret devices, which utilize slightly different signalling. Don't invert the sense of the Cuda's active-low signals when storing them in the 'status' variable. Just assert, negate and test those signals using the helpers. The state machine does not need to test its own output signals to figure out what to do next: the next state depends on the Cuda's TREQ output. Just call the TREQ_asserted() helper function to test for that. Similarly, there is no need to store pin directions in the 'status' variable. That was only useful for debugging messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 76 ++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 23 deletions(-) commit 06d7e99408acd2faa099d8af1a57cb1f6624062a Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Remove redundant temporary variable There is no possibility that current_req can change during execution of cuda_start(). This can be confirmed by inspection: cuda_lock is always held whenever cuda_start() is called or current_req is modified. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 523717d1496c794e8380d0e3de5ca6a8c1887dab Author: Finn Thain Date: Sat Dec 31 19:56:26 2016 -0500 via-cuda: Cleanup printk calls Add missing log message severity, remove old debug messages and replace printk() loop with print_hex_dump() call. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/via-cuda.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit ab9bad0ead9ab179ace09988a3f1cfca122eb7c2 Author: Benjamin Herrenschmidt Date: Tue Feb 7 16:03:17 2017 +1100 powerpc/powernv: Remove separate entry for OPAL real mode calls All entry points already read the MSR so they can easily do the right thing. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 7 --- arch/powerpc/kernel/idle_book3s.S | 6 +-- arch/powerpc/kvm/book3s_hv_builtin.c | 34 ++++--------- arch/powerpc/kvm/book3s_hv_rm_xics.c | 10 ++-- arch/powerpc/platforms/powernv/opal-wrappers.S | 70 +++++++++++--------------- arch/powerpc/platforms/powernv/pci-ioda.c | 5 -- 6 files changed, 46 insertions(+), 86 deletions(-) commit 2337d207288f163e10bd8d4d7eeb0c1c75046a0c Author: Nicholas Piggin Date: Fri Jan 27 14:24:33 2017 +1000 powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts The branch from hmi_exception_early to hmi_exception_realmode must use a "relocatable-style" branch, because it is branching from unrelocated exception code to beyond __end_interrupts. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 8 ++++++++ arch/powerpc/kernel/exceptions-64s.S | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit a5ecdad4847897007399d7a14c9109b65ce4c9b7 Author: Aneesh Kumar K.V Date: Tue Feb 7 00:09:27 2017 +0530 powerpc/mm: Add MMU_FTR_KERNEL_RO to possible feature mask Without this we will always find the feature disabled. Fixes: 984d7a1ec6 ("powerpc/mm: Fixup kernel read only mapping") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu.h | 1 + 1 file changed, 1 insertion(+) commit 7ff093d09f8f027c317282e18b566473df53e8a1 Author: Hoegeun Kwon Date: Fri Feb 3 15:12:16 2017 +0900 drm/exynos: fimd: Do not use HW trigger for exynos3250 Commit a6f75aa161c5 ("drm/exynos: fimd: add HW trigger support") added hardware trigger support to the FIMD controller driver. I have tested but this broke the display in at least the exynos3250 Gear 2. So until the issue is fixed, avoid using HW trigger for the exynos3250 based boards and use SW trigger as it was before the mentioned commit. Signed-off-by: Hoegeun Kwon Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 -- 1 file changed, 2 deletions(-) commit aa18157016009b2b63a44e7f29a4f1f46276b5b9 Author: Andrzej Hajda Date: Wed Feb 1 09:29:14 2017 +0100 drm/exynos/hdmi: add bridge support On TM2/TM2e platforms HDMI output is connected to MHL bridge SiI8620. To allow configure UltraHD modes on the bridge and to eliminate unsupported modes this bridge should be attached to drm_encoder implemented in exynos_hdmi. Changelog v1: - fix drm_attach_bridge argument. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 56 +++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 10 deletions(-) commit 1514d50b7a1b2c2bf72545625eb6bedef793c40a Author: Andrzej Hajda Date: Fri Jan 20 07:52:24 2017 +0100 drm/exynos/decon5433: signal vblank only on odd fields In case of interlace mode irq is generated for odd and even fields, but vblank should be signaled only for the last emitted field. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++++++ include/video/exynos5433_decon.h | 1 + 2 files changed, 8 insertions(+) commit 5aa6c9ace55d2ca2d41118208fe8476907b4b066 Author: Andrzej Hajda Date: Fri Jan 20 07:52:23 2017 +0100 drm/exynos/decon5433: add support for interlace modes Some registers should be programmed differently in interlace mode. Additionally IP does not signal stop state properly in interlaced mode, so warning has been removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 45 +++++++++++++++++++-------- include/video/exynos5433_decon.h | 1 + 2 files changed, 33 insertions(+), 13 deletions(-) commit 849fb0de898c907d1249edb2182ef0dfcaf4fdb4 Author: Andrzej Hajda Date: Fri Jan 20 07:52:21 2017 +0100 drm/exynos/hdmi: fix PLL for 27MHz settings Current settings for 27MHz and 27.027MHz do not work. Use the settings from vendor code instead. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 10abdbc5eeec964d0534f6ace94624a5fae64233 Author: Andrzej Hajda Date: Fri Jan 20 07:52:20 2017 +0100 drm/exynos/hdmi: fix VSI infoframe registers VSI infoframe registers address space is non-contiguous, so infoframe write should be split into two chunks. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 648225880264fde99eba8e57f6ac81801be1405d Author: Andrzej Hajda Date: Fri Jan 20 07:52:19 2017 +0100 drm/exynos/hdmi: add 297MHz pixel clock support 297MHz is used by Ultra HD modes. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d796ddc9ea0c88f7a1cc1e8df10553f8bbc6ba6b Author: Tobias Jakobi Date: Fri Jan 20 17:02:51 2017 +0100 drm/exynos: g2d: change platform driver name to 'exynos-drm-g2d' The current name is 's5p-g2d', which is identical with the driver name of the old V4L2 driver in media/platform. This is probably due to the DRM driver being based on the V4L2 driver when it was initially created. Still the clashing of driver names is confusing, so rename it to something in line with the other DRM subdrivers. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b93c2e8b5d9d1fb8241d9a9ef13a9f4ed01c93e6 Author: Andrzej Hajda Date: Wed Feb 1 15:35:07 2017 +0900 drm/exynos/decon5433: configure sysreg in case of hardware trigger In case of HW trigger mode, sysreg register should be configured to enable TE functionality. The patch refactors also trigger setup function. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 40 +++++++++++++++++++++------ 1 file changed, 32 insertions(+), 8 deletions(-) commit b14c8e6afd873cae97060272efaac376efec77a4 Author: Richard Weinberger Date: Wed Feb 1 21:32:09 2017 +0100 fscrypt: properly declare on-stack completion When a completion is declared on-stack we have to use COMPLETION_INITIALIZER_ONSTACK(). Fixes: 0b81d07790726 ("fs crypto: move per-file encryption from f2fs tree to fs/crypto") Signed-off-by: Richard Weinberger Signed-off-by: Theodore Ts'o fs/crypto/fscrypt_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f47e48008b63f5fd3a3bad8b79ba1a89fb625f Author: Eric Biggers Date: Tue Jan 24 10:58:06 2017 -0800 fscrypt: split supp and notsupp declarations into their own headers Previously, each filesystem configured without encryption support would define all the public fscrypt functions to their notsupp_* stubs. This list of #defines had to be updated in every filesystem whenever a change was made to the public fscrypt functions. To make things more maintainable now that we have three filesystems using fscrypt, split the old header fscrypto.h into several new headers. fscrypt_supp.h contains the real declarations and is included by filesystems when configured with encryption support, whereas fscrypt_notsupp.h contains the inline stubs and is included by filesystems when configured without encryption support. fscrypt_common.h contains common declarations needed by both. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o MAINTAINERS | 2 +- fs/crypto/fscrypt_private.h | 2 +- fs/ext4/ext4.h | 28 +--- fs/ext4/page-io.c | 1 - fs/f2fs/f2fs.h | 30 +--- fs/ubifs/ubifs.h | 28 +--- include/linux/fscrypt_common.h | 146 +++++++++++++++++ include/linux/fscrypt_notsupp.h | 168 +++++++++++++++++++ include/linux/fscrypt_supp.h | 66 ++++++++ include/linux/fscrypto.h | 347 ---------------------------------------- 10 files changed, 397 insertions(+), 421 deletions(-) commit 02680b31a0b3757e121d27223b6fe21778f52408 Author: Colin Ian King Date: Tue Jan 10 16:57:32 2017 +0000 fscrypt: remove redundant assignment of res res is assigned to sizeof(ctx), however, this is unused and res is updated later on without that assigned value to res ever being used. Remove this redundant assignment. Fixes CoverityScan CID#1395546 "Unused value" Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 1 - 1 file changed, 1 deletion(-) commit 152bff377653047c2a69c226435e2c3fd316b592 Merge: 63dfef7 83a718d Author: David S. Miller Date: Mon Feb 6 22:53:14 2017 -0500 Merge branch 'bridge-improve-cache-utilization' Nikolay Aleksandrov says: ==================== bridge: improve cache utilization This is the first set which begins to deal with the bad bridge cache access patterns. The first patch rearranges the bridge and port structs a little so the frequently (and closely) accessed members are in the same cache line. The second patch then moves the garbage collection to a workqueue trying to improve system responsiveness under load (many fdbs) and more importantly removes the need to check if the matched entry is expired in __br_fdb_get which was a major source of false-sharing. The third patch is a preparation for the final one which If properly configured, i.e. ports bound to CPUs (thus updating "updated" locally) then the bridge's HitM goes from 100% to 0%, but even without binding we get a win because previously every lookup that iterated over the hash chain caused false-sharing due to the first cache line being used for both mac/vid and used/updated fields. Some results from tests I've run: (note that these were run in good conditions for the baseline, everything ran on a single NUMA node and there were only 3 fdbs) 1. baseline 100% Load HitM on the fdbs (between everyone who has done lookups and hit one of the 3 hash chains of the communicating src/dst fdbs) Overall 5.06% Load HitM for the bridge, first place in the list 2. patched & ports bound to CPUs 0% Local load HitM, bridge is not even in the c2c report list Also there's 3% consistent improvement in netperf tests. ==================== Signed-off-by: David S. Miller commit 83a718d6294964fd1b227fa5f1ad001bc1fe7656 Author: Nikolay Aleksandrov Date: Sat Feb 4 18:05:09 2017 +0100 bridge: fdb: write to used and updated at most once per jiffy Writing once per jiffy is enough to limit the bridge's false sharing. After this change the bridge doesn't show up in the local load HitM stats. Suggested-by: David S. Miller Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 3 ++- net/bridge/br_input.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1214628cb1868254e107230c9052f28ff9899b6a Author: Nikolay Aleksandrov Date: Sat Feb 4 18:05:08 2017 +0100 bridge: move write-heavy fdb members in their own cache line Fdb's used and updated fields are written to on every packet forward and packet receive respectively. Thus if we are receiving packets from a particular fdb, they'll cause false-sharing with everyone who has looked it up (even if it didn't match, since mac/vid share cache line!). The "used" field is even worse since it is updated on every packet forward to that fdb, thus the standard config where X ports use a single gateway results in 100% fdb false-sharing. Note that this patch does not prevent the last scenario, but it makes it better for other bridge participants which are not using that fdb (and are only doing lookups over it). The point is with this move we make sure that only communicating parties get the false-sharing, in a later patch we'll show how to avoid that too. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_private.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f7cdee8a79a1cb03fa9ca71b825e72f880b344e1 Author: Nikolay Aleksandrov Date: Sat Feb 4 18:05:07 2017 +0100 bridge: move to workqueue gc Move the fdb garbage collector to a workqueue which fires at least 10 milliseconds apart and cleans chain by chain allowing for other tasks to run in the meantime. When having thousands of fdbs the system is much more responsive. Most importantly remove the need to check if the matched entry has expired in __br_fdb_get that causes false-sharing and is completely unnecessary if we cleanup entries, at worst we'll get 10ms of traffic for that entry before it gets deleted. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 1 + net/bridge/br_fdb.c | 31 +++++++++++++++++++------------ net/bridge/br_if.c | 2 +- net/bridge/br_ioctl.c | 2 +- net/bridge/br_netlink.c | 2 +- net/bridge/br_private.h | 4 ++-- net/bridge/br_stp.c | 2 +- net/bridge/br_stp_if.c | 4 ++-- net/bridge/br_stp_timer.c | 2 -- net/bridge/br_sysfs_br.c | 2 +- 10 files changed, 29 insertions(+), 23 deletions(-) commit 1f90c7f3470580e24da25f6a6c1fb480ed9371ac Author: Nikolay Aleksandrov Date: Sat Feb 4 18:05:06 2017 +0100 bridge: modify bridge and port to have often accessed fields in one cache line Move around net_bridge so the vlan fields are in the beginning since they're checked on every packet even if vlan filtering is disabled. For the port move flags & vlan group to the beginning, so they're in the same cache line with the port's state (both flags and state are checked on each packet). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_private.h | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 63dfef75ed75364901d7caa52c6420cec3e73519 Author: William Tu Date: Sat Feb 4 08:37:29 2017 -0800 bpf: enable verifier to add 0 to packet ptr The patch fixes the case when adding a zero value to the packet pointer. The zero value could come from src_reg equals type BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer reports the following error: [...] R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12 R4=imm4,min_value=4,max_value=4 R5=pkt(id=0,off=4,r=4) 269: (bf) r2 = r0 // r2 becomes imm0 270: (77) r2 >>= 3 271: (bf) r4 = r1 // r4 becomes pkt ptr 272: (0f) r4 += r2 // r4 += 0 addition of negative constant to packet pointer is not allowed Signed-off-by: William Tu Signed-off-by: Mihai Budiu Cc: Daniel Borkmann Cc: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) commit da8c1c46f2082ce4a094812806d7eab3c17a4817 Author: Augusto Mecking Caringi Date: Mon Jan 30 10:47:36 2017 +0000 thermal/intel_powerclamp: Remove set-but-not-used variables In poll_pkg_cstate() function, the variables jiffies_last and jiffies_now are set but never used. This has been detected by building the driver with W=1: drivers/thermal/intel_powerclamp.c: In function ‘poll_pkg_cstate’: drivers/thermal/intel_powerclamp.c:464:23: warning: variable ‘jiffies_last’ set but not used [-Wunused-but-set-variable] static unsigned long jiffies_last; ^ Signed-off-by: Augusto Mecking Caringi Acked-by: Jacob Pan Signed-off-by: Zhang Rui drivers/thermal/intel_powerclamp.c | 4 ---- 1 file changed, 4 deletions(-) commit 29200c199cc9bde59033ab30fcc40b6c8ae630b0 Author: Josef Bacik Date: Fri Feb 3 16:25:23 2017 -0500 bpf: test for AND edge cases These two tests are based on the work done for f23cc643f9ba. The first test is just a basic one to make sure we don't allow AND'ing negative values, even if it would result in a valid index for the array. The second is a cleaned up version of the original testcase provided by Jann Horn that resulted in the commit. Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Josef Bacik Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit a1fbf5bbef025b4844162b3b8868888003a7ee9c Author: Cameron Gutman Date: Mon Feb 6 17:03:03 2017 -0800 Input: xpad - restore LED state after device resume Set the LED_CORE_SUSPENDRESUME flag on our LED device so the LED state will be automatically restored by LED core on resume. Since Xbox One pads stop flashing only when reinitialized, we'll send them the initialization packet so they calm down too. Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 213c4b96639818a2dc8750d1b7a37672a9c9eaeb Author: Mark Yao Date: Sun Feb 5 17:10:57 2017 +0800 drm/rockchip: cdn-dp: fix cdn-dp complie warning fix warning: drivers/gpu/drm/rockchip/cdn-dp-reg.c:632:24: warning: 'val[1]' may be used uninitialized in this function [-Wmaybe-uninitialized] msa_misc = 2 * val[0] + 32 * val[1] + Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5 Author: Christoph Hellwig Date: Mon Feb 6 10:51:03 2017 -0800 xfs: allocate direct I/O COW blocks in iomap_begin Instead of preallocating all the required COW blocks in the high-level write code do it inside the iomap code, like we do for all other I/O. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 8 --- fs/xfs/xfs_iomap.c | 31 +++++------ fs/xfs/xfs_reflink.c | 146 +++++++++++++++++++-------------------------------- fs/xfs/xfs_reflink.h | 4 +- fs/xfs/xfs_trace.h | 2 - 5 files changed, 68 insertions(+), 123 deletions(-) commit a14234c72bf41ac96bc8c98e96e2c84b6d4bd4f2 Author: Christoph Hellwig Date: Mon Feb 6 10:50:49 2017 -0800 xfs: go straight to real allocations for direct I/O COW writes When we allocate COW fork blocks for direct I/O writes we currently first create a delayed allocation, and then convert it to a real allocation once we've got the delayed one. As there is no good reason for that this patch instead makes use call xfs_bmapi_write from the COW allocation path. The only interesting bits are a few tweaks the low-level allocator to allow for this, most notably the need to remove the call to xfs_bmap_extsize_align for the cowextsize in xfs_bmap_btalloc - for the existing convert case it's a no-op, but for the direct allocation case it would blow up our block reservation way beyond what we reserved for the transaction. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 3 +- fs/xfs/xfs_reflink.c | 94 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 68 insertions(+), 29 deletions(-) commit dcf9585a7511147c7ffd580be8580dd39bc52fb6 Author: Christoph Hellwig Date: Mon Feb 6 10:46:01 2017 -0800 xfs: return the converted extent in __xfs_reflink_convert_cow We'll need it for the direct I/O code. Also rename the function to xfs_reflink_convert_cow_extent to describe it a bit better. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f13eb2055ae46ded52961f27753c245dc5b8967d Author: Christoph Hellwig Date: Mon Feb 6 10:42:26 2017 -0800 xfs: introduce xfs_aligned_fsb_count Factor a helper to calculate the extent-size aligned block out of the iomap code, so that it can be reused by the upcoming reflink dio code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 11 ++--------- fs/xfs/xfs_iomap.h | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) commit 54a4ef8af4e0dc5c983d17fcb9cf5fd25666d94e Author: Christoph Hellwig Date: Mon Feb 6 13:00:54 2017 -0800 xfs: reject all unaligned direct writes to reflinked files We currently fall back from direct to buffered writes if we detect a remaining shared extent in the iomap_begin callback. But by the time iomap_begin is called for the potentially unaligned end block we might have already written most of the data to disk, which we'd now write again using buffered I/O. To avoid this reject all writes to reflinked files before starting I/O so that we are guaranteed to only write the data once. The alternative would be to unshare the unaligned start and/or end block before doing the I/O. I think that's doable, and will actually be required to support reflinks on DAX file system. But it will take a little more time and I'd rather get rid of the double write ASAP. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 9 +++++++++ fs/xfs/xfs_iomap.c | 12 +----------- fs/xfs/xfs_trace.h | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) commit db61ffe3a71c697aaa91c42c862a5f7557a0e562 Author: Fabio Estevam Date: Tue Jan 31 14:36:07 2017 -0200 random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block Building arm allnodefconfig causes the following build warning: drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable] Fix the warning by moving 'random_min_urandom_seed' declaration inside the CONFIG_SYSCTL ifdef block, where it is actually used. While at it, remove the comment prior to the variable declaration. Signed-off-by: Fabio Estevam Signed-off-by: Theodore Ts'o drivers/char/random.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 26d7f34cae7aad9600cd40ce07ec3fbe8606a567 Merge: 538f1dc 21c42da Author: Dave Airlie Date: Tue Feb 7 11:05:42 2017 +1000 Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next The big things this time around are: 1) support for hw cursor on newer mdp5 devices (snapdragon 820+, tested on db820c) 2) dsi encoder cleanup 3) gpu dt bindings cleanup so we can get the gpu nodes merged upstream * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (32 commits) drm/msm: return -EFAULT if copy_from_user() fails drm/msm/dsi: Add PHY/PLL for 8x96 drm/msm/dsi: Add new method to calculate 14nm PHY timings drm/msm/dsi: Move PHY operations out of host drm/msm/dsi: Reset both PHYs before clock operation for dual DSI drm/msm/dsi: Pass down use case to PHY drm/msm/dsi: Return more timings from PHY to host drm/msm/dsi: Add a PHY op that initializes version specific stuff drm/msm/dsi: Add 8x96 info in dsi_cfg drm/msm/dsi: Don't error if a DSI host doesn't have a device connected drm/msm/mdp5: Add support for legacy cursor updates drm/msm/mdp5: Refactor mdp5_plane_atomic_check drm/msm/mdp5: Add cursor planes drm/msm/mdp5: Misc cursor plane bits drm/msm/mdp5: Configure COLOR3_OUT propagation drm/msm/mdp5: Use plane helpers to configure src/dst rectangles drm/msm/mdp5: Prepare CRTC/LM for empty stages drm/msm/mdp5: Create only as many CRTCs as we need drm/msm/mdp5: cfg: Change count to unsigned int drm/msm/mdp5: Create single encoder per interface (INTF) ... commit 538f1dcdc5e20adb2488fa0932d56906de166405 Merge: 31f408c ef1844b Author: Dave Airlie Date: Tue Feb 7 11:03:30 2017 +1000 Merge branch 'drm-rockchip-next-2017-02-05' of https://github.com/markyzq/kernel-drm-rockchip into drm-next rockchip CDN-DP support. * 'drm-rockchip-next-2017-02-05' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: cdn-dp: don't configure hardware in mode_set drm/rockchip: cdn-dp: retry to check sink count drm/rockchip: cdn-dp: Move mutex_init to probe drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event drm/rockchip: cdn-dp: Do not run worker while suspended drm/rockchip: cdn-dp: Load firmware if no monitor connected drm/rockchip: cdn-dp: add cdn DP support for rk3399 drm/rockchip: return ERR_PTR instead of NULL drm/rockchip: vop: make vop register setting take effect commit 31f408c8a8e7c1976e868206156ae14bf35e4ac9 Merge: 99743ae bb18dfcc Author: Dave Airlie Date: Tue Feb 7 10:54:12 2017 +1000 Merge tag 'drm-misc-next-2017-02-03' of git://anongit.freedesktop.org/git/drm-misc into drm-next Final 4.11 feature pull request: - sii8520 bridge update from Andrzej - ->release callback, maybe somewhen in the future we'll even get drm_device lifetimes correct! (Chris Wilson) - drm_mm search improvements, and good docs for different search strategies now (Chris) - simplify fbdev emulation init parameters (Gabriel) - bunch of misc things all over ... and the first few patches from our small driver in drm-misc experiment: - cleanups for qxl and bochs from a few different people - dsi support for vc4 (not yet the panel driver, that's under discussion still) from Eric - meson rename to meson-drm to distinguish from other platform drivers (Neil Amstrong) * tag 'drm-misc-next-2017-02-03' of git://anongit.freedesktop.org/git/drm-misc: (47 commits) drm: kselftest for drm_mm and bottom-up allocation drm: Improve drm_mm search (and fix topdown allocation) with rbtrees drm: Fix build when FBDEV_EMULATION is disabled drm: Rely on mode_config data for fb_helper initialization drm: Provide a driver hook for drm_dev_release() drm: meson: rename driver name to meson-drm drm: meson: rename module name to meson-drm drm/bridge/sii8620: enable interlace modes drm/bridge/sii8620: enable MHL3 mode if possible drm/bridge/sii8620: add HSIC initialization code drm/bridge/sii8620: improve gen2 write burst IRQ routine drm/bridge/sii8620: send EMSC features on request drm/bridge/sii8620: rewrite hdmi start sequence drm/bridge/mhl: add MHL3 infoframe related definitions drm/bridge/sii8620: fix disconnect sequence drm/bridge/sii8620: split EDID read and write code drm/bridge/sii8620: add delay during cbus reset drm/bridge/sii8620: do not stop MHL output when TMDS input is stopped drm/bridge/sii8620: set gen2 write burst before sending MSC command drm/bridge/sii8620: abstract out sink detection code ... commit 8c87fe722053658467bcc9e5ea82051ce3d3a693 Author: Scott Bauer Date: Mon Feb 6 17:22:49 2017 -0700 Fix SED-OPAL UAPI structs to prevent 32/64 bit size differences. This patch is a quick fixup of the user structures that will prevent the structures from being different sizes on 32 and 64 bit archs. Taking this fix will allow us to *NOT* have to do compat ioctls for the sed code. Signed-off-by: Scott Bauer Fixes: 19641f2d7674 ("Include: Uapi: Add user ABI for Sed/Opal") Signed-off-by: Jens Axboe include/uapi/linux/sed-opal.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit a76037ff3479ad333a2505061915f7a21e7f3fb6 Author: Christoph Hellwig Date: Wed Feb 1 15:11:07 2017 +0100 scsi: pm8001: switch to pci_irq_alloc_vectors Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 35 ++++++++++++++--------------------- drivers/scsi/pm8001/pm8001_sas.h | 2 -- 2 files changed, 14 insertions(+), 23 deletions(-) commit 556e26a70b64a21507e231f9b54773adf74a7384 Author: Christoph Hellwig Date: Mon Jan 30 13:18:59 2017 +0100 scsi: remove tsk_mgmt_response and it_nexus_response transport methods They are never called and just dispatch to methods of the same names in the FC and SRP transport classes that are never implemented. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 17 ----------------- drivers/scsi/scsi_transport_srp.c | 16 ---------------- include/scsi/scsi_transport.h | 12 ------------ include/scsi/scsi_transport_srp.h | 7 ------- 4 files changed, 52 deletions(-) commit b6a05c823fc573a65efc4466f174abf05f922e0f Author: Christoph Hellwig Date: Mon Jan 30 13:18:58 2017 +0100 scsi: remove eh_timed_out methods in the transport template Instead define the timeout behavior purely based on the host_template eh_timed_out method and wire up the existing transport implementations in the host templates. This also clears up the confusion that the transport template method overrides the host template one, so some drivers have to re-override the transport template one. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/ata/libata-eh.c | 1 + drivers/ata/libata-transport.c | 1 - drivers/ata/libata.h | 1 - drivers/infiniband/ulp/iser/iscsi_iser.c | 1 + drivers/infiniband/ulp/srp/ib_srp.c | 1 + drivers/message/fusion/mptfc.c | 1 + drivers/message/fusion/mptsas.c | 2 +- drivers/s390/scsi/zfcp_scsi.c | 1 + drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/bfa/bfad_im.c | 2 ++ drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 1 + drivers/scsi/csiostor/csio_scsi.c | 2 ++ drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 1 + drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 + drivers/scsi/fcoe/fcoe.c | 1 + drivers/scsi/fnic/fnic_main.c | 1 + drivers/scsi/ibmvscsi/ibmvfc.c | 1 + drivers/scsi/ibmvscsi/ibmvscsi.c | 1 + drivers/scsi/iscsi_tcp.c | 1 + drivers/scsi/libiscsi.c | 5 ++--- drivers/scsi/lpfc/lpfc_scsi.c | 2 ++ drivers/scsi/qedi/qedi_iscsi.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/scsi_error.c | 4 +--- drivers/scsi/scsi_transport_fc.c | 9 ++++----- drivers/scsi/scsi_transport_srp.c | 5 ++--- drivers/scsi/storvsc_drv.c | 5 ----- include/linux/libata.h | 2 ++ include/scsi/libiscsi.h | 1 + include/scsi/scsi_transport.h | 11 ----------- include/scsi/scsi_transport_fc.h | 1 + include/scsi/scsi_transport_srp.h | 1 + 33 files changed, 38 insertions(+), 33 deletions(-) commit 28917d40e63a65c3923d45ed190c748e45b90ac7 Author: Christoph Hellwig Date: Mon Jan 30 13:18:57 2017 +0100 scsi: libsas: remove sas_scsi_timed_out EH_NOT_HANDLED is the default case if no eh_timed_out method is provided, so there is no need to supply it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_init.c | 1 - drivers/scsi/libsas/sas_internal.h | 2 -- drivers/scsi/libsas/sas_scsi_host.c | 7 ------- 3 files changed, 10 deletions(-) commit 103eb3b5d0f2cc2771b3c49181dd22f73735aaf2 Author: Christoph Hellwig Date: Mon Jan 30 13:18:56 2017 +0100 scsi: mvumi: remove fake transport template These days we can specify an eh_timed_out handler in the host_template, so don't have a transport_template definition just for it. [mkp: fixed typo] Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/mvumi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1f318a8bafcfba9f0d623f4870c4e890fd22e659 Author: Arnd Bergmann Date: Wed Feb 1 18:00:14 2017 +0100 modules: mark __inittest/__exittest as __maybe_unused clang warns about unused inline functions by default: arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function '__inittest' [-Wunused-function] arch/arm/crypto/aes-cipher-glue.c:69:1: warning: unused function '__exittest' [-Wunused-function] As these appear in every single module, let's just disable the warnings by marking the two functions as __maybe_unused. Signed-off-by: Arnd Bergmann Reviewed-by: Miroslav Benes Acked-by: Rusty Russell Signed-off-by: Jessica Yu include/linux/module.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09bdcd6e1784da3d14b3b8d4b6760610dffeb269 Author: Wei Yongjun Date: Mon Feb 6 16:09:26 2017 +0000 clk: sunxi-ng: sun9i-a80: Fix wrong pointer passed to PTR_ERR() PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: 783ab76ae553 ("clk: sunxi-ng: Add A80 Display Engine CCU") Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3f1ea34fe18c781c67c1b2fdba4c622e97bcf55 Author: Arnd Bergmann Date: Thu Feb 2 15:33:57 2017 +0100 clk: sunxi-ng: select SUNXI_CCU_MULT for sun5i We get a link error when CCU_MULT is not set with the newly added driver: drivers/clk/sunxi-ng/ccu-sun5i.o:(.data.__compound_literal.17+0x4): undefined reference to `ccu_mult_ops' drivers/clk/sunxi-ng/ccu-sun5i.o:(.data.__compound_literal.5+0x4): undefined reference to `ccu_mult_ops' Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver") Signed-off-by: Arnd Bergmann Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5d806f9fc8e63d7a44e0fd1ef26a7c27efae0e51 Author: Stephen Boyd Date: Fri Feb 3 12:43:11 2017 -0800 clk: sunxi-ng: Check kzalloc() for errors and cleanup error path This kzalloc() could fail. Let's bail out with -ENOMEM here instead of NULL dereferencing. That silences static checkers. We should also cleanup on the error path even though this function returning an error probably means the system won't boot. Cc: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu_common.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b880092109323d1cc608c420fa712d3e19508e13 Author: NeilBrown Date: Mon Jan 30 17:17:00 2017 +1100 NFSDv4: use export cache flushtime for changeid on V4ROOT objects. If you change the set of filesystems that are exported, then the contents of various directories in the NFSv4 pseudo-root is likely to change. However the change-id of those directories is currently tied to the underlying directory, so the client may not see the changes in a timely fashion. This patch changes the change-id number to be derived from the "flush_time" of the export cache. Whenever any changes are made to the set of exported filesystems, this flush_time is updated. The result is that clients see changes to the set of exported filesystems much more quickly, often immediately. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a2ec1996098c7da0593a0981190316025301eab1 Author: Dongdong Liu Date: Mon Feb 6 14:25:04 2017 +0800 PCI: hisi: Add DT almost-ECAM support for Hip06/Hip07 host controllers The PCIe controller in HiSilicon Hip06/Hip07 SoCs is not completely ECAM-compliant. It is non-ECAM only for the RC bus config space; for any other bus underneath the root bus it does support ECAM access. Add DT support for the almost-ECAM Hip06/Hip07 controllers. [bhelgaas: drop dev->of_node test, driver name "hisi-pcie-almost-ecam"] Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Gabriele Paoloni Reviewed-by: Zhou Wang .../devicetree/bindings/pci/hisilicon-pcie.txt | 37 +++++++++++++ drivers/pci/host/pcie-hisi.c | 62 +++++++++++++++++++++- 2 files changed, 98 insertions(+), 1 deletion(-) commit d5e6e0fa442a479e27dfb7d17aeef1260dc19b09 Merge: 57b8443 f32361b Author: Dmitry Torokhov Date: Mon Feb 6 14:17:39 2017 -0800 Merge branch 'synaptics-rmi4' into next Bring in latest RMI4 support in preparation to the merge window. commit f32361b71ae5c81b8fb96f796ab947ba2ad17aa8 Author: Benjamin Tissoires Date: Mon Feb 6 09:57:01 2017 -0800 Input: synaptics-rmi4 - add rmi_find_function() If a function needs to communicate with an other, it's better to have a way to retrieve this other. Reviewed-by: Andrew Duggan Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 13 +++++++++++++ drivers/input/rmi4/rmi_driver.h | 1 + 2 files changed, 14 insertions(+) commit 57b8443d3e5bd046a519ff714ca31c64c7f04309 Author: Cameron Gutman Date: Mon Feb 6 13:56:10 2017 -0800 Input: xpad - fix stuck mode button on Xbox One S pad The Xbox One S requires an ack to its mode button report, otherwise it continuously retransmits the report. This makes the mode button appear to be stuck down after it is pressed for the first time. Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 9172d2a026f95f217da81610037608996d3f6a3f Merge: 321fa4f 04d3a4c Author: David S. Miller Date: Mon Feb 6 16:53:30 2017 -0500 Merge branch 'dsa-add-fabric-notifier' Vivien Didelot says: ==================== net: dsa: add fabric notifier When a switch fabric is composed of multiple switch chips, these chips must be programmed accordingly when an event occurred on one of them. Examples of such event include hardware bridging: when a Linux bridge spans interconnected chips, they must be programmed to allow external ports to ingress frames on their internal ports. Another example is cross-chip hardware VLANs. Switch chips in-between interconnected bridge ports must also configure a given VLAN to allow packets to pass through them. In order to support that, this patchset introduces a non-intrusive notifier mechanism. It adds a notifier head in every DSA switch tree (the said fabric), and a notifier block in every DSA switch chip. When an even occurs, it is chained to all notifiers of the fabric. Switch chips can react accordingly if they are cross-chip capable. On a dynamic debug enabled system, bridging a port in a multi-chip fabric will print something like this (ZII Rev B board): # brctl addif br0 lan3 mv88e6085 0.1:00: crosschip DSA port 1.0 bridged to br0 mv88e6085 0.4:00: crosschip DSA port 1.0 bridged to br0 # brctl delif br0 lan3 mv88e6085 0.1:00: crosschip DSA port 1.0 unbridged from br0 mv88e6085 0.4:00: crosschip DSA port 1.0 unbridged from br0 Currently only bridging events are added. A patchset introducing support for cross-chip hardware bridging configuration in mv88e6xxx will follow right after. Then events for switchdev operations are next on the line. We should note that non-switchdev events do not support rolling-back switch-wide operations. We'll have to work on closer integration with switchdev for that, like introducing new attributes or objects, to benefit from the prepare and commit phases. ==================== Signed-off-by: David S. Miller commit 04d3a4c6af52a58370795bc9f70dc15f51f8bb84 Author: Vivien Didelot Date: Fri Feb 3 13:20:21 2017 -0500 net: dsa: introduce bridge notifier A slave device will now notify the switch fabric once its port is bridged or unbridged, instead of calling directly its switch operations. This code allows propagating cross-chip bridging events in the fabric. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 10 ++++++++++ net/dsa/slave.c | 40 +++++++++++++++++++++++++++++----------- net/dsa/switch.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 11 deletions(-) commit f515f192ab4f45bb695146b82432d63d98775787 Author: Vivien Didelot Date: Fri Feb 3 13:20:20 2017 -0500 net: dsa: add switch notifier Add a notifier block per DSA switch, registered against a notifier head in the switch fabric they belong to. This infrastructure will allow to propagate fabric-wide events such as port bridging, VLAN configuration, etc. If a DSA switch driver cares about cross-chip configuration, such events can be caught. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 7 +++++++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 6 ++++++ net/dsa/dsa2.c | 6 ++++++ net/dsa/dsa_priv.h | 4 ++++ net/dsa/switch.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 77 insertions(+) commit c5d35cb32cffa6e4c2db1cbd9a544e10a8d6fda9 Author: Vivien Didelot Date: Fri Feb 3 13:20:19 2017 -0500 net: dsa: change state setter scope The scope of the functions inside net/dsa/slave.c must be the slave net_device pointer. Change to state setter helper accordingly to simplify callers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 9c26542685130ef3b55cdb4e04eec0ac33376b41 Author: Vivien Didelot Date: Fri Feb 3 13:20:18 2017 -0500 net: dsa: rollback bridging on error When an error is returned during the bridging of a port in a NETDEV_CHANGEUPPER event, net/core/dev.c rolls back the operation. Be consistent and unassign dp->bridge_dev when this happens. In the meantime, add comments to document this behavior. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 8e92ab3a426e04dc355b196e3b4474f633025a3b Author: Vivien Didelot Date: Fri Feb 3 13:20:17 2017 -0500 net: dsa: simplify netdevice events handling Simplify the code handling the slave netdevice notifier call by providing a dsa_slave_changeupper helper for NETDEV_CHANGEUPPER, and so on (only this event is supported at the moment.) Return NOTIFY_DONE when we did not care about an event, and NOTIFY_OK when we were concerned but no error occurred, as the API suggests. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit 88e4f0ca4e4e7760e4aad544789c5408219886d5 Author: Vivien Didelot Date: Fri Feb 3 13:20:16 2017 -0500 net: dsa: move netdevice notifier registration Move the netdevice notifier block register code in slave.c and provide helpers for dsa.c to register and unregister it. At the same time, check for errors since (un)register_netdevice_notifier may fail. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa.c | 10 ++++------ net/dsa/dsa_priv.h | 4 ++-- net/dsa/slave.c | 22 ++++++++++++++++++++-- 3 files changed, 26 insertions(+), 10 deletions(-) commit 88e30752dd47f0a6398cd014af82332f1b9873ea Author: Bjorn Andersson Date: Mon Jan 30 09:00:07 2017 -0800 rpmsg: qcom: smd: Return positively when not enabled Remoteproc treats the error codes returned from the stubbed SMD API as errors, but the fact that SMD is not enabled should not affect remoteproc's ability to start the remote processors. Signed-off-by: Bjorn Andersson include/linux/rpmsg/qcom_smd.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 321fa4ffd94e333657e54037d2511c862ec92f6f Author: Arnd Bergmann Date: Fri Feb 3 17:37:03 2017 +0100 net/mlx5e: fix another maybe-uninitialized false-positive In commit abeffce ("net/mlx5e: Fix a -Wmaybe-uninitialized warning"), I fixed a gcc warning for the ipv4 offload handling. Now we get the same warning for the added ipv6 support: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized] We can apply the same workaround here as well. Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels") Signed-off-by: Arnd Bergmann Acked-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0d7b10b05945f40fefd4e60f457c61aefa3e9a9 Author: Parav Pandit Date: Sat Feb 4 11:00:49 2017 -0600 net-next: treewide use is_vlan_dev() helper function. This patch makes use of is_vlan_dev() function instead of flag comparison which is exactly done by is_vlan_dev() helper function. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Acked-by: Stephen Hemminger Acked-by: Jon Maxwell Acked-by: Johannes Thumshirn Acked-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/infiniband/core/cma.c | 6 ++---- drivers/infiniband/sw/rxe/rxe_net.c | 2 +- drivers/net/ethernet/broadcom/cnic.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/l2t.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++-- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 2 +- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 8 ++++---- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 4 ++-- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 6 +++--- drivers/scsi/cxgbi/libcxgbi.c | 6 +++--- drivers/scsi/fcoe/fcoe.c | 13 ++++++------- include/rdma/ib_addr.h | 6 ++---- net/hsr/hsr_slave.c | 3 ++- 14 files changed, 31 insertions(+), 35 deletions(-) commit 231c8dfd1a9ff530869e1327ba4168dbe592f3f9 Author: Loic Pallardy Date: Tue Jan 31 13:35:54 2017 +0100 remoteproc: st: add virtio communication support This patch provides virtio communication support based on mailbox for ST co-processors. Signed-off-by: Loic Pallardy Signed-off-by: Ludovic Barre Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 3 + drivers/remoteproc/st_remoteproc.c | 113 ++++++++++++++++++++++++++++++++++++- 2 files changed, 114 insertions(+), 2 deletions(-) commit 3e49ecf6b49c31b70235d260b957376c00265c1e Author: Loic Pallardy Date: Tue Jan 31 13:35:53 2017 +0100 remoteproc: st: correct probe error management Associated clock is prepared in st_rproc_parse_dt function. it should be unprepared in case of error during probing. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/st_remoteproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5e6533f72ce849bf49aaee96429bbe3558789d08 Author: Sarangdhar Joshi Date: Tue Jan 24 15:13:01 2017 -0800 remoteproc: Modify the function names The functions rproc_add_virtio_devices() and rproc_fw_config_virtio() are reduced to trigger auto-boot only. Modify these function names and related comments to reflect their current state. This patch does not add any functional change. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7a20c64ddb3deeb08bbe1ca8e9bcafd3241a5e0e Author: Sarangdhar Joshi Date: Tue Jan 24 15:13:00 2017 -0800 remoteproc: Reduce asynchronous request_firmware to auto-boot only The rproc_add_virtio_devices() requests firmware asynchronously and triggers boot if the auto_boot flag is set. However, this asynchronous call seems to be redundant for non auto-boot scenario since the rproc_boot() would call request_firmware() anyways. Move the auto_boot check to rproc_add() so that a redundant call to _request_firmware can be avoided for non auto-boot case. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 80c6b15732f0d8830032149cbcbc8d67e074b5e8 Author: Omar Sandoval Date: Mon Feb 6 12:52:24 2017 -0800 blk-mq-sched: (un)register elevator when (un)registering queue I noticed that when booting with a default blk-mq I/O scheduler, the /sys/block/*/queue/iosched directory was missing. However, switching after boot did create the directory. This is because we skip the initial elevator register/unregister when we don't have a ->request_fn(), but we should still do it for the ->mq_ops case. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-sysfs.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 66a66aa74ee262f03432f84de55ae314c391d9f5 Author: Sarangdhar Joshi Date: Thu Feb 2 16:04:37 2017 -0800 remoteproc: Drop qcom_scm_pas_supported() from adsp_probe() SCM call to check whether Peripheral Authentication Service (PAS) is supported returns false for ADSP on MSM8996. Drop this call from the driver so that the probe() function succeeds for ADSP PIL device. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 5 ----- 1 file changed, 5 deletions(-) commit 1a6822d194c3f627eeb6aaca6688a5d0a444663e Author: Nicholas Piggin Date: Tue Dec 6 11:41:12 2016 +1000 powerpc/64s: Use (start, size) rather than (start, end) for exception handlers start,size has the benefit of being easier to search for (start,end usually gives you the preceeding vector from the one you want, as first result). Suggested-by: Benjamin Herrenschmidt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/head-64.h | 158 ++++++++++++++-------------- arch/powerpc/kernel/exceptions-64s.S | 195 ++++++++++++++++++----------------- 2 files changed, 185 insertions(+), 168 deletions(-) commit 852e5da99d15d0631c09e718abaa4b2fccda1185 Author: Nicholas Piggin Date: Tue Dec 6 11:40:15 2016 +1000 powerpc/64s: Tidy up after exception handler rework Somewhere along the line, search/replace left some naming garbled, and untidy alignment (aka. mpe stuffed it up). Might as well fix them all up now while git blame history doesn't extend too far. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/head-64.h | 160 +++++++++++++++++------------------ arch/powerpc/kernel/exceptions-64s.S | 2 +- 2 files changed, 81 insertions(+), 81 deletions(-) commit b7eed6ddaa71f1a9afe2ba481d69dea3af0e0755 Author: Pratyush Anand Date: Mon Feb 6 19:46:22 2017 +0530 arm64: do not trace atomic operations Atomic operation function symbols are exported,when CONFIG_ARM64_LSE_ATOMICS is defined. Prefix them with notrace, so that an user can not trace these functions. Tracing these functions causes kernel crash. Signed-off-by: Pratyush Anand Signed-off-by: Will Deacon arch/arm64/include/asm/lse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e5afa6cbdae5cc2ceda232a68a9ddc943d1d5ce Author: Dan Carpenter Date: Tue Jan 17 16:36:23 2017 +0300 ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device() The function iort_add_smmu_platform_device() accidentally returns 0 (ie PTR_ERR(pdev) where pdev == NULL) if platform_device_alloc() fails; fix the bug by returning a proper error value. Fixes: 846f0e9e74a0 ("ACPI/IORT: Add support for ARM SMMU platform devices creation") Acked-by: Hanjun Guo Signed-off-by: Dan Carpenter [lorenzo.pieralisi@arm.com: improved commit log] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 030abd8a5d33057524c6c11c28d3191f3b5c63f6 Author: Lorenzo Pieralisi Date: Thu Jan 5 17:32:16 2017 +0000 ACPI/IORT: Fix iort_node_get_id() mapping entries indexing Commit 618f535a6062 ("ACPI/IORT: Add single mapping function") introduced a function (iort_node_get_id()) to retrieve ids for IORT named components. The iort_node_get_id() takes an index as input to refer to a specific mapping entry in the named component IORT node mapping array. For a mapping entry at a given index, iort_node_get_id() should return the id value (through the id_out function parameter) and the IORT node output_reference (through function return value) the given mapping entry refers to. Technically output_reference values may differ for different map entries, (see diagram below - mapped id values may refer to different eg IORT SMMU nodes; the kernel may not be able to handle different output_reference values for a given named component but the IORT kernel layer should still report the IORT mappings as reported by firmware) but current code in iort_node_get_id() fails to use the index function parameter to return the correct output_reference value (ie it always returns the output_reference value of the first entry in the mapping array whilst using the index correctly to retrieve the id value from the respective entry). |----------------------| | named component | |----------------------| | map entry[0] | |----------------------| | id value | | output_reference----------------> eg SMMU 1 |----------------------| | map entry[1] | |----------------------| | id value | | output_reference----------------> eg SMMU 2 |----------------------| . . . |----------------------| | map entry[N] | |----------------------| | id value | | output_reference----------------> eg SMMU 1 |----------------------| Consequently the iort_node_get_id() function always returns the IORT node pointed at by the output_reference value of the first named component mapping array entry, irrespective of the index parameter, which is a bug. Update the map array entry pointer computation in iort_node_get_id() to take into account the index value, fixing the issue. Fixes: 618f535a6062 ("ACPI/IORT: Add single mapping function") Reported-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Cc: Hanjun Guo Cc: Sinan Kaya Cc: Tomasz Nowicki Cc: Nate Watterson Cc: "Rafael J. Wysocki" Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc36143fba936d8f1a673e2b554bc5b6cb0dd9ce Author: Jonathan Corbet Date: Mon Feb 6 11:52:19 2017 -0700 docs: Remove the copyright year from conf.py It had gone stale, of course, as it would every year, a single date doesn't really cover things, and the date isn't really needed anyway. Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d526ee26ccdcbf8eb9ddd0b584b35ac17f8c566 Author: Ard Biesheuvel Date: Wed Dec 14 09:11:47 2016 +0000 arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA The NUMA code may get confused by the presence of NOMAP regions within zones, resulting in spurious BUG() checks where the node id deviates from the containing zone's node id. Since the kernel has no business reasoning about node ids of pages it does not own in the first place, enable CONFIG_HOLES_IN_ZONE to ensure that such pages are disregarded. Acked-by: Robert Richter Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 2185d4df8a50ba771d2f9cbd7d7b74c0e70aa1db Author: Jonathan Corbet Date: Mon Feb 6 11:35:20 2017 -0700 docs: Fix a warning in the Korean HOWTO.rst translation An extra space in the wrong place made Sphinx unhappy; take it out. Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 730c4c053012b058ccb5393bbc1691e4e872e741 Author: Rafael J. Wysocki Date: Thu Feb 2 01:38:54 2017 +0100 PM / sleep / docs: Convert PM notifiers document to reST Move the document describing PM notifiers (used during system sleep state transitions) to Documentation/driver-api/pm/, convert it to reST and update it to use current terminology. Also replace the remaining references to the old version of it in .txt documents with references to the new one. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/driver-api/pm/devices.rst | 2 +- Documentation/driver-api/pm/index.rst | 1 + Documentation/driver-api/pm/notifiers.rst | 70 +++++++++++++++++++++++++++++++ Documentation/power/00-INDEX | 2 - Documentation/power/freezing-of-tasks.txt | 3 +- Documentation/power/notifiers.txt | 55 ------------------------ Documentation/power/pci.txt | 2 +- 7 files changed, 75 insertions(+), 60 deletions(-) commit 2728b2d2e5be4b828a523a06089cd605419fc65c Author: Rafael J. Wysocki Date: Thu Feb 2 01:32:13 2017 +0100 PM / core / docs: Convert sleep states API document to reST Move the document describing the system sleep state transitions API for devices to Documentation/driver-api/pm/, convert it to reST and update it to use current terminology. Also remove the remaining reference to the old version of it from pm.h. The new document still contains references to some documents in the .txt format that will be converted later. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/driver-api/index.rst | 1 + Documentation/driver-api/pm/conf.py | 10 + Documentation/driver-api/pm/devices.rst | 732 ++++++++++++++++++++++++++++++++ Documentation/driver-api/pm/index.rst | 15 + Documentation/driver-api/pm/types.rst | 5 + Documentation/power/devices.txt | 716 ------------------------------- include/linux/pm.h | 3 - 7 files changed, 763 insertions(+), 719 deletions(-) commit 4d29b2e5ad37a50b186f828d73086cdbf36580bf Author: Rafael J. Wysocki Date: Thu Feb 2 01:30:49 2017 +0100 PM / core: Update kerneldoc comments in pm.h Refresh the struct dev_pm_ops kerneldoc comment, so that it looks better and is more readable after processing by Sphinx, and drop the kerneldoc marker from a few other comments ("PM_EVENT_ messages" and a couple of enum types declarations) which are not proper kerneldoc and generally confuse Sphinx. Also change the comment describing struct dev_pm_domain into a kerneldoc one. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet include/linux/pm.h | 113 +++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 56 deletions(-) commit 8ba605b607b7278548c1092b2ac36381627f0839 Author: Vineet Gupta Date: Thu Feb 2 09:09:50 2017 -0800 ARC: [plat-*] ARC_HAS_COH_CACHES no longer relevant A typical SMP system expects cache coherency. Initial NPS platform support was slated to be SMP w/o cache coherency. However it seems the platform now selects that option, so there is no point in keeping it around. Signed-off-by: Vineet Gupta arch/arc/Kconfig | 6 ------ arch/arc/plat-eznps/Kconfig | 1 - arch/arc/plat-sim/Kconfig | 1 - 3 files changed, 8 deletions(-) commit b48fba057ca850d69cd8fde5adbbdf927206514b Author: Yuriy Kolerov Date: Thu Feb 2 03:13:33 2017 +0300 ARCv2: intc: Delete useless comments in Device Trees Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta arch/arc/boot/dts/haps_hs_idu.dts | 1 - arch/arc/boot/dts/nsimosci_hs_idu.dts | 1 - 2 files changed, 2 deletions(-) commit ec69b269d87c123a66bbcdc31cd5918db4ce442a Author: Yuriy Kolerov Date: Thu Feb 2 03:13:32 2017 +0300 ARCv2: IDU-intc: Delete deprecated parameters in Device Trees No need for specifying a list of interrupts in the declaration of IDU interrupt controller anymore since the kernel can obtain a number of supported interrupts from the build register. Also delete support of the second parameter for devices which are connected to IDU because it is not used anywhere. Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta .../interrupt-controller/snps,archs-idu-intc.txt | 24 ++++++---------------- arch/arc/boot/dts/axc003_idu.dtsi | 23 +++------------------ arch/arc/boot/dts/haps_hs_idu.dts | 10 ++------- arch/arc/boot/dts/nsim_hs_idu.dts | 15 ++------------ arch/arc/boot/dts/nsimosci_hs_idu.dts | 20 ++++-------------- arch/arc/boot/dts/vdk_axc003_idu.dtsi | 13 +++--------- arch/arc/kernel/mcip.c | 17 +-------------- 7 files changed, 21 insertions(+), 101 deletions(-) commit fc73965ed0aa360d1c1813fcdb078533cbab03e3 Author: Yuriy Kolerov Date: Wed Feb 1 11:00:30 2017 -0800 ARCv2: IDU-intc: mask all common interrupts by default Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta [vgupta: broken off from a bigger patch] arch/arc/kernel/mcip.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6f0310a126f1a46cac366327751bb7eb8941bdde Author: Yuriy Kolerov Date: Tue Jan 31 14:45:23 2017 +0300 ARCv2: IDU-intc: Use build registers for getting numbers of interrupts This enhancement is needed to allow masking all available common interrupts in IDU interrupt controller in boot time since the kernel can discover a number of them from the build register. Also now there is no need to specify in device tree a list of used core interrupts by IDU. E.g. before: idu_intc: idu-interrupt-controller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <&core_intc>; #interrupt-cells = <2>; interrupts = <24 25 26 27 28 29 30 31>; }; and after: idu_intc: idu-interrupt-controller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <&core_intc>; #interrupt-cells = <2>; }; Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 19 +++++++++---------- include/soc/arc/mcip.h | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) commit be568e78dbb35383fdfd0563fd0cfbbff1bc42d0 Author: Yuriy Kolerov Date: Tue Jan 31 14:45:24 2017 +0300 ARCv2: intc: Set default priority for all core interrupts After reset all interrupts in the core interrupt controller has the highest priority P0. If the platform supports Fast IRQs and has more than 1 banks of registers then CPU automatically switch banks of registers when P0 interrupt comes. The problem is that the kernel expects that by default switching of banks is not used by all interrupts. It is necessary to set a default nonzero priority for all available interrupts to avoid undefined behaviour. Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta arch/arc/kernel/intc-arcv2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 179cf194e6d153fb6daeca811253502d5c84e4c8 Author: Vineet Gupta Date: Wed Feb 1 09:44:33 2017 -0800 ARCv2: intc: Use runtime value of irq count for setting up intc Signed-off-by: Vineet Gupta arch/arc/include/asm/irq.h | 1 + arch/arc/kernel/intc-arcv2.c | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) commit f33b8cddc8ad8ce83cd3214406bcf68ec6c4d8ec Author: Yuriy Kolerov Date: Tue Jan 31 14:45:22 2017 +0300 ARCv2: intc: Rework the build time irq count information Currently Kconfig knob ARC_NUMBER_OF_INTERRUPTS is used as indicator of hard irq count. But it is flawed that it doesn't affect - NR_IRQS : for number of virtual interrupts - NR_CPU_IRQS : for number of hardware interrupts Moreover the actual hardware irq count might still not be same as ARC_NUMBER_OF_INTERRUPTS. So use the information availble in the Build Configuration Registers and get rid of the Kconfig option. We still need "some" build time info about irq count to set up sufficient number of vector table entries. This is done with a sufficiently large NR_CPU_IRQS which will eventually be used soley for that purpose (subsequent patches will remove its usage elsewhere) So to summarize what this patch does: * NR_CPU_IRQS defines a maximum number of hardware interrupts. * Remove ARC_NUMBER_OF_INTERRUPTS option and create interrupts table for all possible hardware interrupts. * Increase a maximum number of virtual IRQs to 512. ARCv2 can support 240 interrupts in the core interrupts controllers and 128 interrupts in IDU. Thus 512 virtual IRQs must be enough for most configurations of boards. This patch leads to NR_CPU_IRQS in 2 places, to reduce the overall churn. The next patch will remove the 2nd definition anyways. Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta [vgupta: reworked the changelog a bit] arch/arc/Kconfig | 11 ----------- arch/arc/include/asm/irq.h | 8 +++++++- arch/arc/kernel/entry-arcv2.S | 7 ++++++- 3 files changed, 13 insertions(+), 13 deletions(-) commit fe7b10994618c846481fbcf9212d296df47bc1dc Author: Vineet Gupta Date: Wed Feb 1 10:14:11 2017 -0800 ARC: [intc-*]: confine NR_CPU_IRQS to intc code And even this willl change in subsequent patches where we resort to using run time info instead... Signed-off-by: Vineet Gupta arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/intc-arcv2.c | 2 ++ arch/arc/kernel/intc-compact.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit e98a7bf0b094dea1ceed3a4d52584dcd59af0980 Author: Yuriy Kolerov Date: Tue Jan 31 14:45:21 2017 +0300 ARCv2: intc: Use ARC_REG_STATUS32 for addressing STATUS32 reg It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 3 +++ arch/arc/kernel/intc-arcv2.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit cf16bf7779a68bc572c57ab0cb40054e1754223a Author: Alexey Brodkin Date: Wed Feb 1 19:42:53 2017 +0300 arc: vdk: Add support of UIO ARC VDK for EVSS uses UIO for communication with Embedded Vision Subsystem. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 8 ++++++++ arch/arc/configs/vdk_hs38_smp_defconfig | 2 ++ 2 files changed, 10 insertions(+) commit d9174e722debd070efe57323de60610cf54b0049 Author: Alexey Brodkin Date: Wed Feb 1 19:42:52 2017 +0300 arc: vdk: Add support of MMC controller ARC VDK virtual platform emulates host MMC controller (DW Mobile Storage) and moreover rootfs is situated on that virtual card. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 18 ++++++++++++++++++ arch/arc/configs/vdk_hs38_smp_defconfig | 4 ++++ 2 files changed, 22 insertions(+) commit 91447ec9b4d0c5ad6eaa66400f3fd7cb4baff7df Author: Alexey Brodkin Date: Wed Feb 1 19:42:51 2017 +0300 arc: vdk: Disable halt on reset In recent VDKs ARC cores are configured as "run on reset" which made existing kernel configuration outdated to effect that slave cores never start execution of the code keeping only master online. With that fix we're again in sync with VDK platform. And while at it we regenerate defconfig via savedefconfig so default options are now excluded. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/configs/vdk_hs38_smp_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 16620b483eaf7750413bae472f4363b6b959fcaa Author: Johan Hovold Date: Mon Feb 6 16:28:14 2017 +0100 USB: serial: sierra: fix bogus alternate-setting assumption Interface numbers do not change when enabling alternate settings as comment and code in this driver suggested. Remove the confusing comment and redundant retrieval of the interface number in probe, while simplifying and renaming the interface-number helper. Fixes: 4db2299da213 ("sierra: driver interface blacklisting") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/sierra.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit a6bb1e17a39818b01b55d8e6238b4b5f06d55038 Author: Johan Hovold Date: Thu Feb 2 17:38:35 2017 +0100 USB: serial: ftdi_sio: fix line-status over-reporting FTDI devices use a receive latency timer to periodically empty the receive buffer and report modem and line status (also when the buffer is empty). When a break or error condition is detected the corresponding status flags will be set on a packet with nonzero data payload and the flags are not updated until the break is over or further characters are received. In order to avoid over-reporting break and error conditions, these flags must therefore only be processed for packets with payload. This specifically fixes the case where after an overrun, the error condition is continuously reported and NULL-characters inserted until further data is received. Reported-by: Michael Walle Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break") Fixes: 166ceb690750 ("USB: ftdi_sio: clean up line-status handling") Cc: stable # v2.6.35 Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 8364fbb497f00de21d6d347194fa8b6bbae1d6f5 Author: Sara Sharon Date: Thu Dec 8 11:44:20 2016 +0200 iwlwifi: mvm: support new beacon template command Support new version of beacon template command which deprecates the use of the tx command inside. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 29 +++++++-- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 71 +++++++++++++++------- 2 files changed, 73 insertions(+), 27 deletions(-) commit 23aeea943b466083637dfd878b298e76416fcc29 Author: Johannes Berg Date: Tue Dec 13 10:29:07 2016 +0100 iwlwifi: pcie: fix another RF-kill race When resuming, it's possible for the following scenario to occur: * iwl_pci_resume() enables the RF-kill interrupt * iwl_pci_resume() reads the RF-kill state (e.g. to 'radio enabled') * RF_KILL interrupt triggers, and iwl_pcie_irq_handler() reads the state, now 'radio disabled', and acquires the &trans_pcie->mutex. * iwl_pcie_irq_handler() further calls iwl_trans_pcie_rf_kill() to indicate to the higher layers that the radio is now disabled (and stops the device while at it) * iwl_pcie_irq_handler() drops the mutex * iwl_pci_resume() continues, acquires the mutex and calls the higher layers to indicate that the radio is enabled. At this point, the device is stopped but the higher layers think it's available, and can call deeply into the driver to try to enable it. However, this will fail since the device is actually disabled. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 7 ++++--- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit 5594d80e9bf46d607bfcb08df0353b009dd6e2e8 Author: Sara Sharon Date: Wed Nov 23 17:08:20 2016 +0200 iwlwifi: support two phys for a000 devices Support differentiating between two phys for a000 devices in order to load the correct firmware. Eventually when moving completely to the new phy we will be able to remove this. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 30 +++++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 8 ++++++- 4 files changed, 33 insertions(+), 9 deletions(-) commit 0c4881ced8d2e380d0544f1e7e3249d7bbc45979 Author: Luca Coelho Date: Tue Dec 13 09:56:07 2016 +0200 iwlwifi: remove unnecessary cfg element in iwl_drv The iwl_drv structure contains trans which already contains cfg, so storing cfg separately in iwl_drv is redundant. Remove it and access trans->cfg instead. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 49060383a7585c61ab01c0043fd6202878ee9796 Author: Luca Coelho Date: Tue Dec 13 09:48:57 2016 +0200 iwlwifi: remove unnecessary argument to iwl_drv_start() When iwl_drv_start() is called, trans->cfg must already be set, so there's no need to pass cfg separately, since it can be accessed directly from trans->cfg. Signed-off-by: Luca Coelho Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/iwl-drv.h | 4 +--- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) commit 0d7f1b993b2e8babf424f009f5984fa06a713919 Author: Sara Sharon Date: Thu Dec 8 10:43:40 2016 +0200 iwlwifi: mvm: cleanup iwl_mvm_tx_mpdu a bit Unify code, remove redundant assignments. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 35 ++++++++++------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit 4b40571eaf423b96e3809006bd192b4efd52a64b Author: Johannes Berg Date: Thu Dec 8 10:38:08 2016 +0100 iwlwifi: mvm: align copy-break SKB payload for MQ RX When a small frame is copied completely into the skb->head, the code doesn't take alignment into account, making mac80211 copy it again later on architectures that need the alignment. Avoid this by taking the PAD flag from the device into account when copying. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 94c3e614df2117626fccfac8f821c66e30556384 Author: Sara Sharon Date: Wed Dec 7 15:04:37 2016 +0200 iwlwifi: mvm: fix pending frame counter calculation In DQA mode the check whether to decrement the pending frames counter relies on the tid status and not on the txq id. This may result in an inconsistent state of the pending frames counter in case frame is queued on a non aggregation queue but with this TID, and will be followed by a failure to remove the station and later on SYSASSERT 0x3421 when trying to remove the MAC. Such frames are for example bar and qos NDPs. Fix it by aligning the condition of incrementing the counter with the condition of decrementing it - rely on TID state for DQA mode. Also, avoid internal error like this affecting station removal for DQA mode - since we can know for sure it is an internal error. Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 33 ++++++++++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 ++++- 2 files changed, 25 insertions(+), 13 deletions(-) commit 2c6262b754f3c3338cb40b23880a3ac1f4693b25 Author: Sara Sharon Date: Wed Dec 7 12:22:11 2016 +0200 iwlwifi: pcie: fix the set of DMA memory mask Our 9000 device supports 64 bit DMA address for RX only, and not for TX. Setting DMA mask to 64 for the whole device is erroneous - we can do it only for a000 devices where device is capable of both RX & TX DMA with 64 bit address space. Fixes: 96a6497bc3ed ("iwlwifi: pcie: add 9000 series multi queue rx DMA support") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit df88c08d5c7e47c301339a966b5b287453edf86d Author: Liad Kaufman Date: Thu Nov 24 15:31:00 2016 +0200 iwlwifi: mvm: release static queues on bcast release A few of the static queues are enabled along with the bcast STA. Make sure they are removed along with it, rather than waiting for the mac ctxt release. This is needed because we sometimes have a STA being removed and then added again (either with the same sta_id or a different one). If we wait for the mac ctxt release we will try to allocate the queues again (as this is currently done in the STA allocation and not in the MAC init) although they weren't freed, and even if the sta_id of the STA has changed. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 34 +++------ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 16 ---- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 90 ++++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 +- 4 files changed, 85 insertions(+), 59 deletions(-) commit 05e5a7e58d3f8f597ebe6f78aaa13a2656b78239 Author: Johannes Berg Date: Fri Dec 2 10:04:49 2016 +0100 iwlwifi: mvm/pcie: adjust A-MSDU tx_cmd length in PCIe Instead of setting the tx_cmd length in the mvm code, which is complicated by the fact that DQA may want to temporarily store the SKB on the side, adjust the length in the PCIe code which also knows about this since it's responsible for duplicating all those headers that are account for in this code. As the PCIe code already relies on the tx_cmd->len field, this doesn't really introduce any new dependencies. To make this possible we need to move the memcpy() of the TX command until after it was updated. This does even simplify the code though, since the PCIe code already does a lot of manipulations to build A-MSDUs correctly and changing the length becomes a simple operation to see how much was added/removed, rather than predicting it. Fixes: 24afba7690e4 ("iwlwifi: mvm: support bss dynamic alloc/dealloc of queues") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 38 +++------------------------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 23 ++++++++++++++--- 2 files changed, 22 insertions(+), 39 deletions(-) commit bd05a5bd6b11d7fd26a668de83c5cb996de05f8f Author: Johannes Berg Date: Fri Dec 2 09:57:40 2016 +0100 iwlwifi: mvm: overwrite skb info later We don't really need clear the skb's status area nor store the dev_cmd into it until we really commit to the frame by handing it to the transport - defer those operations until just before we do that. This doesn't entirely fix the bug with frames not getting sent out after having been deferred due to DQA, because it doesn't restore the info->driver_data[0] place that was already set to zero (or another value) by the A-MSDU logic. Fixes: 24afba7690e4 ("iwlwifi: mvm: support bss dynamic alloc/dealloc of queues") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 73cfb2a2e49e166c569360ee60fe023b3efe3cf6 Author: Dan Carpenter Date: Fri Feb 3 12:54:59 2017 +0300 net/mlx4_en: fix a condition There is a "||" vs "|" typo here so we test 0x1 instead of 0x6. Fixes: 1f8176f7352a ("net/mlx4_en: Check the enabling pptx/pprx flags in SET_PORT wrapper flow") Signed-off-by: Dan Carpenter Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f820c0ac6cc84d4f9cb22c77d99ea510bd5c382a Author: Bert Kenward Date: Mon Feb 6 16:50:55 2017 +0000 sfc: don't rearm interrupts if busy polling Since commit 364b6055738b ("net: busy-poll: return busypolling status to drivers"), napi_complete_done() returns a boolean that can be used by drivers to conditionally rearm interrupts. Testing with a 7142 shows a small latency improvement of ~100 ns. Signed-off-by: Bert Kenward Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38c6fc32387ade2b4ce6ac494ca50b4a312a8d59 Author: Bjorn Andersson Date: Mon Jan 30 09:00:22 2017 -0800 MAINTAINERS: Add missing rpmsg include path Signed-off-by: Bjorn Andersson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4b48921a8f74e7dfff5b39ab966c86f99717db3a Author: Bjorn Andersson Date: Sun Jan 29 14:05:50 2017 -0800 remoteproc: qcom: Use common SMD edge handler Call the common SMD edge handler to instantiate subdevices to bring associated SMD edges up and down as the remoteproc is started and stopped. Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 2 ++ drivers/remoteproc/qcom_adsp_pil.c | 6 ++++++ drivers/remoteproc/qcom_q6v5_pil.c | 6 ++++++ 3 files changed, 14 insertions(+) commit b90fcfcb1378ddab1ee58ec7caaedbba2a8eb7c6 Author: Bjorn Andersson Date: Fri Jan 27 07:04:54 2017 -0800 remoteproc: qcom: wcnss: Make SMD handling common Move the SMD edge handling to the Qualcomm common file to make it reusable for other Qualcomm remoteproc drivers. Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_common.c | 50 ++++++++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_common.h | 15 ++++++++++-- drivers/remoteproc/qcom_wcnss.c | 28 ++++------------------ 3 files changed, 67 insertions(+), 26 deletions(-) commit 2aad40d911eeb7dcac91c669f2762a28134f0eb1 Author: Bjorn Andersson Date: Fri Jan 27 03:12:57 2017 -0800 remoteproc: Move qcom_mdt_loader into drivers/soc/qcom With the remoteproc parts cleaned out of the MDT loader we can move it to drivers/soc/qcom. Acked-by: Andy Gross Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 3 - drivers/remoteproc/Makefile | 1 - drivers/remoteproc/qcom_adsp_pil.c | 2 +- drivers/remoteproc/qcom_mdt_loader.c | 205 ----------------------------------- drivers/remoteproc/qcom_mdt_loader.h | 13 --- drivers/remoteproc/qcom_q6v5_pil.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/soc/qcom/Kconfig | 4 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/mdt_loader.c | 204 ++++++++++++++++++++++++++++++++++ include/linux/soc/qcom/mdt_loader.h | 18 +++ 11 files changed, 230 insertions(+), 225 deletions(-) commit 7f0dd07a9b29cfadffcd2fa08902a844f5c94e86 Author: Bjorn Andersson Date: Fri Jan 27 02:17:23 2017 -0800 remoteproc: qcom: mdt_loader: Refactor MDT loader Pushing the SCM calls into the MDT loader reduces duplication in the callers and allows for non-remoteproc clients to use the helper for parsing and loading MDT files. Cc: Andy Gross Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 30 +------- drivers/remoteproc/qcom_mdt_loader.c | 137 +++++++++++++++++++++++------------ drivers/remoteproc/qcom_mdt_loader.h | 7 +- drivers/remoteproc/qcom_wcnss.c | 29 +------- 4 files changed, 98 insertions(+), 105 deletions(-) commit 3e8b571a9a0881ba3381ca0915995696da145ab8 Author: Bjorn Andersson Date: Fri Jan 27 02:06:36 2017 -0800 remoteproc: qcom: mdt_loader: Don't overwrite firmware object The "fw" firmware object is passed from the remoteproc core and should not be overwritten, as that results in leaked buffers and a double free of the the last firmware object. Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_mdt_loader.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bde440eee27021617fcd33000209925cdc67db12 Author: Bjorn Andersson Date: Fri Jan 27 02:28:32 2017 -0800 remoteproc: qcom: Extract non-mdt related helper In preparation for moving the mdt loader out of remoteproc let's move the somewhat unrelated resource table dummy helper to a Qualcomm "common" file. Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 6 +++++ drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_adsp_pil.c | 1 + drivers/remoteproc/qcom_common.c | 46 ++++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_common.h | 11 +++++++++ drivers/remoteproc/qcom_mdt_loader.c | 19 --------------- drivers/remoteproc/qcom_mdt_loader.h | 1 - drivers/remoteproc/qcom_q6v5_pil.c | 1 + drivers/remoteproc/qcom_wcnss.c | 1 + 9 files changed, 67 insertions(+), 20 deletions(-) commit e7fd25226295270cc248254e7406d1e19181aea9 Author: Bjorn Andersson Date: Thu Jan 26 13:58:35 2017 -0800 remoteproc: qcom: q6v5: Decouple driver from MDT loader Rather than duplicating half of the MDT loader in the validation step move the entire MDT parser into the q6v5 driver. This allows us to make the shared MDT-loader call the SCM PAS operations directly which simplifies the client code and allows for better reuse of the code. Cc: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 - drivers/remoteproc/qcom_q6v5_pil.c | 146 +++++++++++++++++++++++-------------- 2 files changed, 90 insertions(+), 57 deletions(-) commit d15c9ede6123dbce14c17eb9ced229e488002735 Author: Xin Long Date: Fri Feb 3 17:37:06 2017 +0800 sctp: process fwd tsn chunk only when prsctp is enabled This patch is to check if asoc->peer.prsctp_capable is set before processing fwd tsn chunk, if not, it will return an ERROR to the peer, just as rfc3758 section 3.3.1 demands. Reported-by: Julian Cordes Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a98e58e54fbd0c80b6a46a7cac6e231eed3b3efa Author: Scott Bauer Date: Fri Feb 3 12:50:32 2017 -0700 nvme: Add Support for Opal: Unlock from S3 & Opal Allocation/Ioctls This patch implements the necessary logic to unlock an Opal enabled device coming back from an S3. The patch also implements the SED/Opal allocation necessary to support the opal ioctls. Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 25 +++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 14 ++++++++++++++ drivers/nvme/host/pci.c | 7 +++++++ 3 files changed, 46 insertions(+) commit 455a7b238cd6bc68c4a550cbbd37c1e22b64f71c Author: Scott Bauer Date: Fri Feb 3 12:50:31 2017 -0700 block: Add Sed-opal library This patch implements the necessary logic to bring an Opal enabled drive out of a factory-enabled into a working Opal state. This patch set also enables logic to save a password to be replayed during a resume from suspend. Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe MAINTAINERS | 11 + block/Kconfig | 7 + block/Makefile | 1 + block/opal_proto.h | 429 ++++++++ block/sed-opal.c | 2448 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/sed-opal.h | 178 ++++ 6 files changed, 3074 insertions(+) commit 19641f2d7674fbf2891e9579f61c1b23821086e8 Author: Scott Bauer Date: Fri Feb 3 12:50:30 2017 -0700 Include: Uapi: Add user ABI for Sed/Opal Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/uapi/linux/sed-opal.h | 118 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) commit 245c5c7b0863eda23e8cb1907e74579a42185888 Author: Arnd Bergmann Date: Mon Feb 6 13:27:11 2017 +0100 ASoC: fix ES8328_I2C/SPI dependencies The two front-ends to the codec can now be selected individually, but fail to build when the bus support is missing: sound/built-in.o: In function `es8328_spi_probe': es8328-spi.c:(.text+0x125854): undefined reference to `__devm_regmap_init_spi' sound/built-in.o: In function `es8328_spi_driver_init': es8328-spi.c:(.init.text+0x3589): undefined reference to `__spi_register_driver' Related to this, the added dependency on SND_SOC_ES8328 breaks: warning: (SND_SOC_ALL_CODECS) selects SND_SOC_ES8328_I2C which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_ES8328 && I2C) This adds the respective Kconfig dependencies and changes SND_SOC_ES8328 to a hidden symbol that is selected implicitly by the two more specific options, as we do for some other codecs. We have to remove the 'depends on' for SND_SOC_IMX_ES8328 in the same step to avoid a recursive dependency. Fixes: aa00f2c8aff7 ("ASoC: Allow to select ES8328_I2C and ES8328_SPI directly") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 12 +++++++----- sound/soc/fsl/Kconfig | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) commit 21c42da18ef128ca8fb4cc4ead888f5c61e3916a Author: Dan Carpenter Date: Mon Jan 16 14:58:08 2017 +0300 drm/msm: return -EFAULT if copy_from_user() fails copy_from_user_inatomic() is actually a local function that returns -EFAULT or positive values on error. Otherwise copy_from_user() returns the number of bytes remaining to be copied. We want to return -EFAULT here. I removed an unlikely() because we just did a copy_from_user() so I don't think it can possibly make a difference. Signed-off-by: Dan Carpenter Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f079f6d999cbf857f899732de680f2b62f245b8c Author: Archit Taneja Date: Tue Jan 3 19:45:43 2017 +0530 drm/msm/dsi: Add PHY/PLL for 8x96 Extend the DSI PHY/PLL drivers to support the DSI 14nm PHY/PLL found on 8x96. These are picked up from the downstream driver. The PHY part is similar to the other DSI PHYs. The PLL driver requires some trickery so that one DSI PLL can drive both the DSIs (i.e, dual DSI mode). In the case of dual DSI mode. One DSI instance becomes the clock master, and other the clock slave. The master PLL's output (Byte and Pixel clock) is fed to both the DSI hosts/PHYs. When the DSIs are configured in dual DSI mode, the PHY driver communicates to the PLL driver using msm_dsi_pll_set_usecase() which instance is the master and which one is the slave. When setting rate, the master PLL also configures some of the slave PLL/PHY registers which need to be identical to the master's for correct dual DSI behaviour. There are 2 PLL post dividers that should have ideally been modelled as generic clk_divider clocks, but require some customization for dual DSI. In particular, when the master PLL's post-diviers are set, the slave PLL's post-dividers need to be set too. The clk_ops for these use clk_divider's helper ops and flags internally to prevent redundant code. Cc: Stephen Boyd Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/Kconfig | 7 + drivers/gpu/drm/msm/Makefile | 2 + drivers/gpu/drm/msm/dsi/dsi.h | 8 + drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 + drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 169 +++++ drivers/gpu/drm/msm/dsi/pll/dsi_pll.c | 12 + drivers/gpu/drm/msm/dsi/pll/dsi_pll.h | 11 + drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c | 1104 ++++++++++++++++++++++++++++ 9 files changed, 1319 insertions(+) commit a4df68fa232e979fb74b2efe6997d0f38cbfc626 Author: Hai Li Date: Tue Jan 3 19:31:16 2017 +0530 drm/msm/dsi: Add new method to calculate 14nm PHY timings The 14nm DSI PHY on 8x96 (called PHY v2 downstream) requires a different set of calculations for computing D-PHY timing params. Create a timing_calc_v2 func for the newer v2 PHYs. Signed-off-by: Hai Li Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 117 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 11 +++- 2 files changed, 127 insertions(+), 1 deletion(-) commit b62aa70a98c5401ada63657eee7c88da70bdbb27 Author: Hai Li Date: Sat Jan 7 14:24:38 2017 +0530 drm/msm/dsi: Move PHY operations out of host Since DSI PHY has been a separate platform device, it should not depend on the resources in host to be functional. This change is to trigger PHY operations in manager, instead of host, so that host and PHY can be completely separated. Signed-off-by: Hai Li Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.h | 18 ++- drivers/gpu/drm/msm/dsi/dsi_host.c | 46 +++--- drivers/gpu/drm/msm/dsi/dsi_manager.c | 178 ++++++++++++++---------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 39 ++++-- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 4 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c | 4 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 4 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 4 +- 8 files changed, 172 insertions(+), 125 deletions(-) commit 34d9545b9f769c6553e31a6820c9cb51f5e93099 Author: Archit Taneja Date: Wed Jul 29 12:14:12 2015 -0400 drm/msm/dsi: Reset both PHYs before clock operation for dual DSI In case of dual DSI, some registers in PHY1 have been programmed during PLL0 clock's set_rate. The PHY1 reset called by host1 later will silently reset those PHY1 registers. This change is to reset and enable both PHYs before any PLL clock operation. [Originally worked on by Hai Li . Fixed up by Archit Taneja ] Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.h | 1 + drivers/gpu/drm/msm/dsi/dsi_host.c | 25 +++++++++++++------------ drivers/gpu/drm/msm/dsi/dsi_manager.c | 32 +++++++++++++++++++++++++++++--- 3 files changed, 43 insertions(+), 15 deletions(-) commit 57bf433893370c069a0c34842f35a3bb8aa130fc Author: Hai Li Date: Thu Sep 15 14:44:22 2016 +0530 drm/msm/dsi: Pass down use case to PHY For some new types of DSI PHY, more settings depend on use cases controlled by DSI manager. This change allows DSI manager to setup PHY with a use case. Signed-off-by: Hai Li Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.h | 8 +++++++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 43 ++++++++++++----------------------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 29 ++++++++++++++++++++++- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 1 + 4 files changed, 51 insertions(+), 30 deletions(-) commit dceac340155b66b6c97cb802b03d4778dd82e9be Author: Hai Li Date: Thu Sep 15 14:34:49 2016 +0530 drm/msm/dsi: Return more timings from PHY to host The DSI host is required to configure more timings calculated in PHY. By introducing a shared structure, this change allows more timing information passed from PHY to host. Signed-off-by: Hai Li Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.h | 13 ++++++++++--- drivers/gpu/drm/msm/dsi/dsi_host.c | 20 +++++++++++++------- drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 ++-- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 29 ++++++++++++++--------------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 ++ 5 files changed, 41 insertions(+), 27 deletions(-) commit 25c45d897016bd2c92820abfd59c800aaec7d62b Author: Archit Taneja Date: Wed Sep 14 12:23:59 2016 +0530 drm/msm/dsi: Add a PHY op that initializes version specific stuff Create an init() op for dsi_phy which sets up things specific to a given DSI PHY. The dsi_phy driver probe expects every DSI version to get a "dsi_phy_regulator" mmio base. This isn't the case for 8x96. Creating an init() op will allow us to accommodate such differences. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 33 ++++++++++++++++++------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 1 + 5 files changed, 30 insertions(+), 9 deletions(-) commit 3a3ff88a0fc18ad45f0f5818a4f3de395da68d47 Author: Archit Taneja Date: Wed Sep 14 12:23:07 2016 +0530 drm/msm/dsi: Add 8x96 info in dsi_cfg Add 8x96 DSI data in dsi_cfg. The downstream kernel's dsi_host driver enables core_mmss_clk. We're seeing some branch clock warnings on 8x96 when enabling this. There doesn't seem to be any negative effect with not enabling this clock, so use it once we figure out why we get the warnings. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_cfg.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 + 2 files changed, 26 insertions(+) commit a1b1a4f7e4c3cf3352ae477b86ddea2d4ed35d3e Author: Archit Taneja Date: Wed Jan 4 14:14:58 2017 +0530 drm/msm/dsi: Don't error if a DSI host doesn't have a device connected The driver returns an error if a DSI DT node is populated, but no device is connected to it or if the data-lane map isn't present. Ideally, such a DSI node shouldn't be probed at all (i.e, its status should be set to "disabled in DT"), but there isn't any harm in registering the DSI device even if it doesn't have a bridge/panel connected to it. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 10967a0687b13a27d77b4a77d97010359cb8267f Author: Archit Taneja Date: Fri Dec 16 11:59:57 2016 +0530 drm/msm/mdp5: Add support for legacy cursor updates This code has been more or less picked up from the vc4 and intel implementations of update_plane() funcs for cursor planes. The update_plane() func is usually the drm_atomic_helper_update_plane func that will issue an atomic commit with the plane updates. Such commits are not intended to be done faster than the vsync rate. The legacy cursor userspace API, on the other hand, expects the kernel to handle cursor updates immediately. Create a fast path in update_plane, which updates the cursor registers and flushes the configuration. The fast path is taken when there is only a change in the cursor's position in the crtc, or a change in the cursor's crop co-ordinates. For anything else, we go via the slow path. We take the slow path even when the fb changes, and when there is currently no fb tied to the plane. This should hopefully ensure that we always take a slow path for every new fb. This in turn should ensure that the fb is pinned/prepared. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 7 ++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 110 +++++++++++++++++++++++++++++- 3 files changed, 115 insertions(+), 3 deletions(-) commit 9142364e4666835e53586c21fe4e8983a8b09bb2 Author: Archit Taneja Date: Mon Jan 16 12:16:34 2017 +0530 drm/msm/mdp5: Refactor mdp5_plane_atomic_check In mdp5_plane_atomic_check, we get crtc_state from drm_plane_state. Later, for cursor planes, we'll populate the update_plane() func that takes a fast asynchronous path to implement cursor movements. There, we would need to call a similar atomic_check func to validate the plane state, but crtc_state would need to be derived differently. Refactor mdp5_plane_atomic_check to mdp5_plane_atomic_check_with_state such that the latter takes crtc_state as an argument. This is similar to what the intel driver has done for async cursor updates. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit bff8fba48b52d77b39084743b6209b6442a9e622 Author: Archit Taneja Date: Fri Dec 16 12:00:30 2016 +0530 drm/msm/mdp5: Add cursor planes Register cursor drm_planes. The loop in modeset_init that inits the planes and crtcs has to be refactored a bit. We first iterate all the hwpipes to find the cursor planes. Then, we loop again to create crtcs. In msm_atomic_wait_for_commit_done, remove the check which bypasses waiting for vsyncs if state->legacy_cursor_updates is true. We will later create a fast path for cursor position changes in the cursor plane's update_plane func that doesn't go via the regular atomic commit path. For rest of cursor related updates, we will have to wait for vsyncs, so ignore the legacy_cursor_updates flag. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 33 ++++++++++++++++++++++++++------- drivers/gpu/drm/msm/msm_atomic.c | 5 ----- 2 files changed, 26 insertions(+), 12 deletions(-) commit 5798c8e0d3e09be71d2e937b985b17d89f0b7535 Author: Archit Taneja Date: Mon Jan 16 11:57:04 2017 +0530 drm/msm/mdp5: Misc cursor plane bits These are various changes added in preparation for cursor planes: - Add a pipe_cursor block for 8x96 in mdp5_cfg. - Add a new pipe CAP called MDP_PIPE_CAP_CURSOR. Use this to ensure we assign a cursor SSPP for a drm_plane with type DRM_PLANE_TYPE_CURSOR. - Update mdp5_ctl_blend_mask/ext_blend_mask funcs to incorporate cursor SSPPs. - In mdp5_ctl_blend, iterate through MAX_STAGES instead of stage_cnt, we need to do this because we can now have empty stages in between. - In mdp5_crtc_atomic_check, make sure that the cursor plane has the highest zorder, and stage the cursor plane to the maximum stage # present on the HW. - Create drm_crtc_funcs that doesn't try to implement cursors using the older LM cursor HW. - Pass drm_plane_type in mdp5_plane_init instead of a bool telling whether plane is primary or not. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 10 +++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 34 +++++++++++++++++++++++++++---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 10 +++++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 10 +++++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 7 +++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.c | 8 ++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 8 +++++--- drivers/gpu/drm/msm/mdp/mdp_kms.h | 1 + 8 files changed, 75 insertions(+), 13 deletions(-) commit 829200ac913809ff554f53bc9091b8641ac1dd26 Author: Archit Taneja Date: Mon Dec 19 13:34:11 2016 +0530 drm/msm/mdp5: Configure COLOR3_OUT propagation In MDP5 Layer Mixer HW, the blender output is only the blended color components (i.e R, G and B, or COLOR0/1/2 in MDP5 HW terminology). This is fed to the BG input of the next blender. We also need to provide an alpha (COLOR3) value for the BG input at the next stage. This is configured via using the REG_MDP5_LM_BLEND_COLOR_OUT register. For each stage, we can propagate either the BG or FG alpha to the next stage. The approach taken by the driver is to propagate FG alpha, if the plane staged on that blender has an alpha. If it doesn't, we try to propagate the base layer's alpha. This is borrowed from downstream MDP5 kernel driver. Without this, we don't see any cursor plane content. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3b6acf144053794ca049a025b3579a68a6f4c3e5 Author: Archit Taneja Date: Mon Jan 16 11:46:17 2017 +0530 drm/msm/mdp5: Use plane helpers to configure src/dst rectangles The MDP5 plane's atomic_check ops doesn't perform clipping tests. This didn't hurt us much in the past, but clipping becomes important with cursor planes. Use drm_plane_helper_check_state, the way rockchip/intel/mtk drivers already do. Use these drivers as reference. Clipping requires knowledge of the crtc width and height. This requires us to call drm_atomic_helper_check_modeset before drm_atomic_helper_check_planes in the driver's atomic_check op, because check_modetest will populate the mode for the crtc, needed to populate the clip rectangle. We update the plane_enabled(state) local helper to use state->visible, since state->visible and 'state->fb && state->crtc' represent the same thing. One issue with the existing code is that we don't have a way to disable the plane when it's completely clipped out. Until there isn't an update on the crtc (which would de-stage the plane), we would still see the plane in its last 'visible' configuration. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 57 ++++++++++++++++++++++++------- drivers/gpu/drm/msm/msm_atomic.c | 21 ++++++++---- 2 files changed, 59 insertions(+), 19 deletions(-) commit 106f9727dda49e8047d56b4916e912cff30d4bff Author: Archit Taneja Date: Mon Dec 12 15:17:56 2016 +0530 drm/msm/mdp5: Prepare CRTC/LM for empty stages Use SSPP_NONE in mdp5_plane_pipe() if there is now hwpipe allocated for the drm_plane. Returning '0' means we are returning VIG0 pipe. Also, use the mdp5_pipe enum to pass around the stage array. Initialize the stage to SSPP_NONE by default. We do the above because 1) Cursor plane has to be staged at the topmost blender of the LM, which can result in empty stages in between 2) In the future, when we support multiple LMs per CRTC. We could have stages which don't have any pipe assigned to them. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.h | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit e5366ffe50cc1fff906d7bb45a670861a2174395 Author: Archit Taneja Date: Tue Dec 6 12:15:54 2016 +0530 drm/msm/mdp5: Create only as many CRTCs as we need We currently create CRTCs equaling to the # of Layer Mixer blocks we have on the MDP5 HW. This number is generally more than the # of encoders (INTFs) we have in the MDSS HW. The number of encoders connected to displays on the platform (as described by DT) would be even lesser. Create only N drm_crtcs, where N is the number of drm_encoders successfully registered. To do this, we call modeset_init_intf() before we init the drm_crtcs and drm_planes. Because of this change, setting encoder->possible_crtcs needs to be moved from construct_encoder() to a later point when we know how many CRTCs we have. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 39 ++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 710a651fdd6958c8530c72c62970b785179fce9f Author: Archit Taneja Date: Tue Dec 6 12:12:59 2016 +0530 drm/msm/mdp5: cfg: Change count to unsigned int Count can't be non-zero. Changing to uint will also prevent future warnings. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3a94705a0362fad1b25d559c3e0dd4433038f9e Author: Archit Taneja Date: Mon Jan 16 11:25:38 2017 +0530 drm/msm/mdp5: Create single encoder per interface (INTF) For the DSI interfaces, the mdp5_kms core creates 2 encoders for video and command modes. Create only a single encoder per interface. When creating the encoder, set the interface type to MDP5_INTF_MODE_NONE. It's the bridge (DSI/HDMI/eDP) driver's responsibility to set a different interface type. It can use the the kms func op set_encoder_mode to change the mode of operation, which in turn would configure the interface type for the INTF. In mdp5_cmd_encoder.c, we remove the redundant code, and make the commmand mode funcs as helpers that are used in mdp5_encoder.c Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 135 +++--------------------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 35 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 20 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 32 ++++-- 4 files changed, 66 insertions(+), 156 deletions(-) commit df8a71d2b22ffcecf4df6c07486a8baa5a49870a Author: Archit Taneja Date: Tue Dec 6 09:21:21 2016 +0530 drm/msm/mdp5: Prepare for merging video and command encoders Rename the mdp5_encoder_* ops for active displays to mdp5_vid_encoder_* ops. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 31 ++++++++++++++++++++++------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 3 ++- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 ++-- 3 files changed, 28 insertions(+), 10 deletions(-) commit 9c9f6f8d472cc9e11f2c0b370685ce78ab7eb2fa Author: Archit Taneja Date: Mon Dec 5 15:24:53 2016 +0530 drm/msm: Set encoder's mode of operation using a kms func The mdp5 kms driver currently sets up multiple encoders per interface (INTF), one for each kind of mode of operation it supports. We create 2 drm_encoders for DSI, one for Video Mode and the other for Command Mode operation. The reason behind this approach could have been that we aren't aware of the DSI device's mode of operation when we create the encoders. This makes things a bit complicated, since these encoders have to be further attached to the same DSI bridge. The easier way out is to create a single encoder, and make the DSI driver set its mode of operation when we know what the DSI device's mode flags are. Start with providing a way to set the mdp5_intf_mode using a kms func that sets the encoder's mode of operation. When constructing a DSI encoder, we set the mode of operation to Video Mode as default. When the DSI device is attached to the host, we probe the DSI mode flags and set the corresponding mode of operation. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.h | 1 + drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 37 +++++++++++++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 17 +++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 8 +++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + drivers/gpu/drm/msm/msm_kms.h | 3 +++ 7 files changed, 69 insertions(+) commit 97e00119534bf3c9f47c4eae0b7dd982ef2de92b Author: Archit Taneja Date: Mon Jan 16 09:42:03 2017 +0530 drm/msm: Construct only one encoder for DSI We currently create 2 encoders for DSI interfaces, one for command mode and other for video mode operation. This isn't needed as we can't really use both the encoders at the same time. It also makes connecting bridges harder. Switch to creating a single encoder. For now, we assume that the encoder is configured only in video mode. Later, the same encoder would be usable in both modes. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.c | 14 +++++--------- drivers/gpu/drm/msm/dsi/dsi.h | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_manager.c | 22 ++++------------------ drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 28 ++++++++++++---------------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 20 ++++++-------------- drivers/gpu/drm/msm/msm_drv.h | 11 +++-------- 6 files changed, 32 insertions(+), 67 deletions(-) commit 0bb70b82c2f91e4667f3c617505235efd6d77e46 Author: Archit Taneja Date: Wed Jan 11 11:59:56 2017 +0530 drm/msm/dsi: Set msm_dsi->encoders before initializing bridge The commit "drm: bridge: Link encoder and bridge in core code" updated the drm_bridge_attach() API to also include the drm_encoder pointer the bridge attaches to. The func msm_dsi_manager_bridge_init() now relies on the drm_encoder pointer stored in msm_dsi->encoders to pass the encoder to the bridge API. msm_dsi->encoders is unfortunately set after this function is called, resulting in us passing a NULL pointer to drm_brigde_attach. This results in an error and the DSI driver probe fails. Move the initialization of msm_dsi->encoders[] a bit up. Also, don't try to set the encoder's bridge. That's now managed by the bridge API. Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cd576abfffe43170ffc874065314478a3e14cbe0 Author: Archit Taneja Date: Mon Jan 16 11:35:36 2017 +0530 drm/msm/dsi: Update generated headers Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.xml.h | 269 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 256 insertions(+), 13 deletions(-) commit f71516bd5841c2464c7ccc847a4ff8ac4e192851 Author: Archit Taneja Date: Mon Jan 16 11:34:19 2017 +0530 drm/msm/mdp5: Update generated headers Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h | 48 +++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit d90d7026e75bc17cb56fd591f644225575ef6a5f Author: Archit Taneja Date: Mon Dec 12 15:10:21 2016 +0530 drm/msm/mdp5: cfg: Add pipe_cursor block Define the block in advance so that the generated mdp5.xml.h doesn't break build. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.h | 1 + 1 file changed, 1 insertion(+) commit 7f8036b7f6c6aa635b056fb3fe49ba7062982a5b Author: Rob Clark Date: Wed Dec 7 11:13:53 2016 -0500 drm/msm: let gpu wire up it's own fault handler Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 17 +++++++++++++++++ drivers/gpu/drm/msm/msm_iommu.c | 7 +++++-- drivers/gpu/drm/msm/msm_mmu.h | 9 +++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) commit 720c3bb80235ffb10129ee930bb394871afbd235 Author: Rob Clark Date: Mon Jan 30 11:30:58 2017 -0500 drm/msm: drop _clk suffix from clk names Suggested by Rob Herring. We still support the old names for compatibility with downstream android dt files. Cc: Rob Herring Signed-off-by: Rob Clark Reviewed-by: Eric Anholt Acked-by: Rob Herring Documentation/devicetree/bindings/display/msm/gpu.txt | 12 ++++++------ drivers/gpu/drm/msm/msm_drv.c | 19 +++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gpu.c | 7 +++---- 4 files changed, 29 insertions(+), 10 deletions(-) commit 4e09b95d72e502e200ad0f509fe89fb852add173 Author: Rob Clark Date: Mon Jan 30 11:15:14 2017 -0500 drm/msm: drop quirks binding This was never documented or used in upstream dtb. It is used by downstream bindings from android device kernels. But the quirks are a property of the gpu revision, and as such are redundant to be listed separately in dt. Instead, move the quirks to the device table. Signed-off-by: Rob Clark Reviewed-by: Eric Anholt drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- drivers/gpu/drm/msm/adreno/adreno_device.c | 18 ++++-------------- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 - drivers/gpu/drm/msm/adreno/adreno_gpu.h | 4 +--- 4 files changed, 7 insertions(+), 20 deletions(-) commit 1db7afa4914642146637f891c9d369948bb026c7 Author: Rob Clark Date: Mon Jan 30 11:02:27 2017 -0500 drm/msm: drop qcom,chipid The original way we determined the gpu version was based on downstream bindings from android kernel. A cleaner way is to get the version from the compatible string. Note that no upstream dtb uses these bindings. But the code still supports falling back to the legacy bindings (with a warning), so that we are still compatible with the gpu dt node from android device kernels. Signed-off-by: Rob Clark Reviewed-by: Eric Anholt Acked-by: Rob Herring .../devicetree/bindings/display/msm/gpu.txt | 11 +++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 40 +++++++++++++++++++++- drivers/gpu/drm/msm/msm_drv.c | 1 + 3 files changed, 46 insertions(+), 6 deletions(-) commit 1a4a66ddc7b290ea2fd492c9c922ee7205d44724 Author: Rob Clark Date: Mon Jan 30 10:46:35 2017 -0500 drm/msm: remove qcom,gpu-pwrlevels bindings The plan is to use the OPP bindings. For now, remove the documentation for qcom,gpu-pwrlevels, and make the driver fall back to a safe low clock if the node is not present. Note that no upstream dtb use this node. For now we keep compatibility with this node to avoid breaking compatibility with downstream android dt files. Signed-off-by: Rob Clark Reviewed-by: Eric Anholt Acked-by: Rob Herring Documentation/devicetree/bindings/display/msm/gpu.txt | 15 --------------- drivers/gpu/drm/msm/adreno/adreno_device.c | 6 ++++-- 2 files changed, 4 insertions(+), 17 deletions(-) commit 3bc32d0396d2a7214cb1d758df129bb781f7aa14 Merge: fcdc103 fd76d91 Author: David S. Miller Date: Mon Feb 6 11:25:58 2017 -0500 Merge branch 'mlxsw-cleanup-neigh-handling' Jiri Pirko says: ==================== mlxsw: cleanup neigh handling Ido says: This series addresses long standing issues in the mlxsw driver concerning neighbour reflection. It also prepares the code for follow-up changes dealing with proper resource cleanup and nexthop reflection. The first two patches convert the neighbour reflection code to use an ordered workqueue, to prevent re-ordering of NEIGH_UPDATE events that may happen following subsequent patches. The third to fifth patches remove the ndo_neigh_{construct,destroy} entry points from the driver, thereby relying only on NEIGH_UPDATE events for neighbour reflection. This simplifies the code considerably. Last patches are fallout and adjust nits in the code I noticed while going over it. ==================== Signed-off-by: David S. Miller commit fd76d9105b8e5b80bee58311a5c88d6594622c00 Author: Ido Schimmel Date: Mon Feb 6 16:20:17 2017 +0100 mlxsw: spectrum_router: Fix typo in comment 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 01b1aa359dd481579de6047af8d7874e6e529585 Author: Ido Schimmel Date: Mon Feb 6 16:20:16 2017 +0100 mlxsw: spectrum_router: Don't read 'nud_state' without lock We periodically ask the neighbouring system to try and resolve neighbours that are used for nexthops, but aren't currently resolved. However, 'nud_state' is protected by the neighbour lock, so we shouldn't access it without taking it. Instead, we can simply check the 'connected' field of the neighbour entry, which we update upon NEIGH_UPDATE events. 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 8a0b7275268504259cc1a17bae839d23c4f6e2bc Author: Ido Schimmel Date: Mon Feb 6 16:20:15 2017 +0100 mlxsw: spectrum_router: Remove redundant check We only add neighbour entries that are also used for nexthops to 'nexthop_neighs_list', so when iterating over this list there's no need to check that the entry is indeed used for nexthops. Remove the redundant check. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit a8eca326151ee1beac82a4fd86d9edad3a37aaed Author: Ido Schimmel Date: Mon Feb 6 16:20:14 2017 +0100 net: remove ndo_neigh_{construct, destroy} from stacked devices In commit 18bfb924f000 ("net: introduce default neigh_construct/destroy ndo calls for L2 upper devices") we added these ndos to stacked devices such as team and bond, so that calls will be propagated to mlxsw. However, previous commit removed the reliance on these ndos and no new users of these ndos have appeared since above mentioned commit. We can therefore safely remove this dead code. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 -- drivers/net/team/team.c | 2 -- include/linux/netdevice.h | 4 ---- net/8021q/vlan_dev.c | 2 -- net/bridge/br_device.c | 2 -- net/core/dev.c | 44 ----------------------------------------- 6 files changed, 56 deletions(-) commit 5c8802f14a0679e970e7b25f809a12c3ae1a873d Author: Ido Schimmel Date: Mon Feb 6 16:20:13 2017 +0100 mlxsw: spectrum_router: Simplify neighbour reflection Up until now we had two interfaces for neighbour related configuration: ndo_neigh_{construct,destroy} and NEIGH_UPDATE netevents. The ndos were used to add and remove neighbours from the driver's cache, whereas the netevent was used to reflect the neighbours into the device's tables. However, if the NUD state of a neighbour isn't NUD_VALID or if the neighbour is dead, then there's really no reason for us to keep it inside our cache. The only exception to this rule are neighbours that are also used for nexthops, which we periodically refresh to get them resolved. We can therefore eliminate the ndo entry point into the driver and simplify the code, making it similar to the FIB reflection, which is based solely on events. This also helps us avoid a locking issue, in which the RIF cache was traversed without proper locking during insertion into the neigh entry cache. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 - drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 - .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 263 +++++++++++---------- 3 files changed, 135 insertions(+), 134 deletions(-) commit de04b6a35887b742dccbc17e6663e4749aaa7542 Author: Ido Schimmel Date: Mon Feb 6 16:20:12 2017 +0100 mlxsw: spectrum_router: Remove unused variable Since commit 33b1341cd1bf ("mlxsw: spectrum_router: Fix handling of neighbour structure") we no longer use destination IP for neighbour lookup, so remove it. 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, 2 deletions(-) commit e60234ddb541b556b57353dfddca73155977d02f Author: Ido Schimmel Date: Mon Feb 6 16:20:11 2017 +0100 mlxsw: spectrum_router: Use ordered workqueue for neigh updates We currently associate each neighbour entry with a work item, so it's not possible to have multiple events queued for the same neighbour entry. However, this is about to be changed so that the neighbour entry is only resolved when the work item is scheduled. The above can result in a mismatch between the kernel's and the device's neighbour table, unless the associated work items are processed in the order in which they were submitted. Do that by migrating the NEIGH_UPDATE work items to be processed in the ordered workqueue which was recently introduced in mlxsw in commit a3832b31898f ("mlxsw: core: Create an ordered workqueue for FIB offload"). Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a0e4761d9bd546eba2e9d3a675863a843624e613 Author: Ido Schimmel Date: Mon Feb 6 16:20:10 2017 +0100 mlxsw: core: Queue work immediately instead of delaying it We always use zero delay before queueing a work on the ordered workqueue ('mlxsw_owq'), so use work_struct directly instead of delayable work. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/core.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 2bb5d9069999a2c2195a05f4aa3da7f14ea3102d Author: Bjorn Andersson Date: Mon Jan 30 03:20:27 2017 -0800 remoteproc: qcom: q6v5: Remove mss supply from 8916 The Q6V5 in MSM8916 doesn't have a mss supply, so remove this and update the code to support cases without proxy or active supplies. Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8ca967ab67671f07ac7daef4f854559bc66799a3 Author: Saeed Mahameed Date: Mon Jan 9 21:57:49 2017 +0200 net/mlx5e: Bring back bfreg uar map dedicated pointer 4K Uar series modified the mlx5e driver to use the new bfreg API, and mistakenly removed the sq->uar_map iomem data path dedicated pointer, which was meant to be read from xmit path for cache locality utilization. Fix that by returning that pointer to the SQ struct. Fixes: 7309cb4ad71e ("IB/mlx5: Support 4k UAR for libmlx5") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit b70149dd7dc98661fbbfe7281f127caa408028fe Author: Saeed Mahameed Date: Tue Dec 6 14:04:05 2016 +0200 net/mlx5e: XDP Tx, no inline copy on ConnectX-5 ConnectX-5 and later HW generations will report min inline mode == MLX5_INLINE_MODE_NONE, which means driver is not required to copy packet headers to inline fields of TX WQE. Avoid copy to inline segment in XDP TX routine when HW inline mode doesn't require it. This will improve CPU utilization and boost XDP TX performance. Tested with xdp2 single flow: CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz HCA: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 7.4Mpps After: 7.8Mpps Improvement: 5% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 20 +++++++++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) commit a6f402e4990145252ce4fde59b273fa7e4f91e1b Author: Saeed Mahameed Date: Tue Dec 6 13:53:49 2016 +0200 net/mlx5e: Tx, no inline copy on ConnectX-5 ConnectX-5 and later HW generations will report min inline mode == MLX5_INLINE_MODE_NONE, which means driver is not required to copy packet headers to inline fields of TX WQE. When inline is not required, vlan insertion will be handled in the TX descriptor rather than copy to inline. For LSO case driver is still required to copy headers, for the HW to duplicate on wire. This will improve CPU utilization and boost TX performance. Tested with pktgen burst single flow: CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz HCA: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 15.1Mpps After: 17.2Mpps Improvement: 14% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 +++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 30 +++++++++++++---------- 2 files changed, 26 insertions(+), 17 deletions(-) commit 2b31f7ae5f645edd852addfca445895b5806f3f9 Author: Saeed Mahameed Date: Mon Nov 28 18:04:50 2016 +0200 net/mlx5: TX WQE update Add new TX WQE fields for Connect-X5 vlan insertion support, type and vlan_tci, when type = MLX5_ETH_WQE_INSERT_VLAN the HW will insert the vlan and prio fields (vlan_tci) to the packet. Those bits and the inline header fields are mutually exclusive, and valid only when: MLX5_CAP_ETH(mdev, wqe_inline_mode) == MLX5_CAP_INLINE_MODE_NOT_REQUIRED and MLX5_CAP_ETH(mdev, wqe_vlan_insert), who will be set in ConnectX-5 and later HW generations. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/infiniband/hw/mlx5/qp.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 8 ++++---- include/linux/mlx5/mlx5_ifc.h | 3 ++- include/linux/mlx5/qp.h | 16 ++++++++++++++-- 5 files changed, 25 insertions(+), 12 deletions(-) commit f32f5bd2eb7e91a5090c06bbe1ed14bffbbda5d3 Author: Daniel Jurgens Date: Thu Nov 19 17:12:26 2015 +0200 net/mlx5: Configure cache line size for start and end padding There is a hardware feature that will pad the start or end of a DMA to be cache line aligned to avoid RMWs on the last cache line. The default cache line size setting for this feature is 64B. This change configures the hardware to use 128B alignment on systems with 128B cache lines. In addition we lower bound MPWRQ stride by HCA cacheline in mlx5e, MPWRQ stride should be at least the HCA cacheline, the current default is 64B and in case HCA_CAP.cach_line_128byte capability is set, MPWRQ RX stride will automatically be aligned to 128B. Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++++ include/linux/mlx5/mlx5_ifc.h | 6 ++++-- 4 files changed, 19 insertions(+), 6 deletions(-) commit fcdc103dac5bdabddd626a4dfe7e5aa5673a61c4 Merge: e158e5e 096de07 Author: David S. Miller Date: Mon Feb 6 11:08:51 2017 -0500 Merge tag 'linux-can-next-for-4.11-20170206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2017-02-06 this is a pull request of 16 patches for net-next/master. The first two patches by David Jander and me add the rx-offload framework for CAN devices to the kernel. The remaining 14 patches convert the flexcan driver to make use of it. ==================== Signed-off-by: David S. Miller commit e158e5ef24d191462428ff1be6b5048c0168fd14 Author: Elad Raz Date: Mon Feb 6 13:56:27 2017 +0100 mlxsw: reg: Fix HTGT register length HTGT register length is limited to 32 bytes and not 256 bytes. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f161e9a270bea2b18c62f75d497900faee1e4ceb Merge: c892925 4b0b0d9 Author: Jonathan Corbet Date: Mon Feb 6 09:05:31 2017 -0700 Merge branch 'ben' into docs-next Ben writes: "This series fixes some bugs I found in the new doc build system." commit 4b0b0d9d05aba12b42b2e5006627fa6821bcec62 Author: Ben Hutchings Date: Tue Jan 31 00:18:56 2017 +0000 doc-rst: Fix recursive make invocation from macros In any case where we recurse but don't mention $(MAKE) literally in the recipe, we need to add a '+' at the start of the command to ensure that parallel makes and various other options work properly. Fixes: 609afe6b49ef ("Documentation/sphinx: build the media intermediate ...") Tested-by: Markus Heiser Signed-off-by: Ben Hutchings Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 04b709117271d9f2f09cfeca09c34f63863beafe Author: Ben Hutchings Date: Tue Jan 31 00:18:44 2017 +0000 doc-rst: Delete output of failed dot-SVG conversion As we use redirection to create the SVG file, even a failed conversion will create the file and 'make' will consider it up-to-date if the build is retried. We should delete it in case of failure. Fixes: ec868e4ee2bc ("docs-rst: media: build SVG from graphviz files") Signed-off-by: Ben Hutchings Signed-off-by: Jonathan Corbet Documentation/media/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85bd9020d86bf51f9c300225d0c4d7d1b5aa9e48 Author: Ben Hutchings Date: Tue Jan 31 00:18:34 2017 +0000 doc-rst: Break shell command sequences on failure As $(SHELL) doesn't include the -e option, any loop or other sequence needs to include explicit checks for failing commands. Fixes: 609afe6b49ef ("Documentation/sphinx: build the media intermediate ...") Fixes: 606b9ac81a63 ("doc-rst: generic way to build only sphinx sub-folders") Fixes: cd21379b1698 ("doc-rst: generic way to build PDF of sub-folders") Tested-by: Markus Heiser Signed-off-by: Ben Hutchings Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b60a00f9c5f14695991cb77dce7e926623269d88 Author: Jingju Hou Date: Mon Feb 6 14:58:13 2017 +0800 net: mvneta: implement .set_wol and .get_wol The mvneta itself does not support WOL, but the PHY might. So pass the calls to the PHY Signed-off-by: Jingju Hou Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 096de07f1d7156e500dec5abe89e9b44314e38e5 Author: Marc Kleine-Budde Date: Tue Sep 1 10:28:46 2015 +0200 can: flexcan: switch imx6 and vf610 to timestamp based offloading This patch switches the imx6 and vf610 based SoCs from the hardware FIFO to the timestamp based rx offloading. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b3cf53e988cedb11a407d65abafca836da78b7c9 Author: Marc Kleine-Budde Date: Tue Sep 1 09:00:13 2015 +0200 can: flexcan: add support for timestamp based rx-offload The flexcan IP core has 64 mailboxes. For now they are configured for RX as a hardware FIFO. This FIFO has a fixed depth of 6 CAN frames. In some high load scenarios it turns out thas this buffer is too small. In order to have a buffer larger than the 6 frames FIFO, this patch adds support for timestamp based offloading via the generic rx-offload infrastructure. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 158 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 129 insertions(+), 29 deletions(-) commit 9eb7aa891101a4a09114ff3191f9877ea35eae06 Author: Marc Kleine-Budde Date: Tue Sep 1 08:57:55 2015 +0200 can: flexcan: add quirk FLEXCAN_QUIRK_ENABLE_EACEN_RRS In order to receive RTR frames in the non HW FIFO mode the RSS and EACEN bits of the reg_ctrl2 have to be activated. As this has no side effect in the FIFO mode, we do this unconditionally on cores with the reg_ctrl2. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4bd888a80b1d48dbd83f1cbf806e923a30051958 Author: Marc Kleine-Budde Date: Mon Aug 31 21:03:29 2015 +0200 can: flexcan: activate individual RX masking and initialize reg_rximr Modern flexcan IP cores support two RX modes. One is using the 6 fames deep hardware FIFO, the other is using up to 64 mailboxes (in non FIFO mode). For now only the HW FIFO mode is activated. In order to make use of the RX mailboxes the individual RX masking feature has to be activated, otherwise matching mailboxes are overwritten during the reception process. This however switches on the individual RX masking, which uses reg_rximr registers for masking. This patch activates the individual RX masking feature unconditionally and initializes the mask registers (reg_rximr) with 0x0 == "don't care", which switches off any filtering. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 30164759db1bb1062bdf0f92451f57ed295cfa48 Author: Marc Kleine-Budde Date: Sun May 10 15:26:58 2015 +0200 can: flexcan: make use of rx-offload's irq_offload_fifo This patch converts the flexcan driver to make use of the rx-offload can_rx_offload_irq_offload_fifo() helper function. The idea is to read the CAN frames already in the interrupt context, as the depth of the flexcan HW FIFO is too shallow, resulting in too many missed frames. During a normal NAPI poll the frames are the pushed into the upper layers. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 164 +++++++++++++++------------------------------- 1 file changed, 52 insertions(+), 112 deletions(-) commit b93917c3700636dadc6688144e7d55e07699367b Author: Marc Kleine-Budde Date: Sun Jul 12 00:47:47 2015 +0200 can: flexcan: make TX mailbox selectable during runtime This patch makes the TX mailbox selectable duing runtime. This is a preparation patch to use of the hardware FIFO selectable via runtime. As the TX mailbox number is different in HW FIFO and normal mode. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 28ac7dcd5b1354e46f5f28a53b5a6b443fcc88ed Author: Marc Kleine-Budde Date: Tue Aug 4 13:46:10 2015 +0200 can: flexcan: calculate default value for imask1 during runtime This patch converts the define FLEXCAN_IFLAG_DEFAULT into the runtime calculated value priv->reg_imask1_default. This is a preparation patch to make the TX mailbox selectable during runtime, too. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit dd2f122a96ea041679f46c063a18145a7cf6ff5f Author: Marc Kleine-Budde Date: Wed Jan 18 11:45:14 2017 +0100 can: flexcan: flexcan_irq(): don't unconditionally return IRQ_HANDLED This patch changes the flexcan_irq() function to only return IRQ_HANDLED, if the interrupt really has been handled, otherwise IRQ_NONE is returned. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit a5c02f668c36c05fbbb29d157507be4868ecd176 Author: Marc Kleine-Budde Date: Wed Jan 18 11:38:26 2017 +0100 can: flexcan: flexcan_poll_bus_err(): fold in do_bus_err() This patch folds in the do_bus_err() function into flexcan_poll_bus_err(). Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 238443df8154696018fd01c1a7c8fb352b9ee49e Author: Marc Kleine-Budde Date: Wed Jan 18 11:25:41 2017 +0100 can: flexcan: flexcan_poll_state(): no need to initialize new_state, rx_state, tx_state This patch removed the not needed initialisation from the new_state, rx_state, tx_state variabled. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d166f56bf58b64027679905a01001df9ac0764bd Author: Marc Kleine-Budde Date: Tue Jan 17 17:33:46 2017 +0100 can: flexcan: do_bus_err(): convert rx_,tx_errors into bool This patch converts the rx_errors and tx_errors from int into bool values, to reflect their actual meaning. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a3c11a7ac6cdd670324df39244ed1d2321bb0c9c Author: Marc Kleine-Budde Date: Mon Jul 4 14:45:44 2016 +0200 can: flexcan: make declaration of devtype_data const This patch changes the declaration of the devtype data to const. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1c10feee3e033b898a293d813ef4a4ebfb88dba2 Author: Marc Kleine-Budde Date: Mon Jul 4 14:43:53 2016 +0200 can: flexcan: remove write-only member pdata of struct flexcan_priv This patch removes the write only member pdata from the struct flexcan_priv. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 2 -- 1 file changed, 2 deletions(-) commit 62d1086e87223260fcdc49c232d5c2e26ff05721 Author: Marc Kleine-Budde Date: Thu Aug 27 16:01:27 2015 +0200 can: flexcan: add missing register definitions This patch adds some missing register definitions, which are needed in an upcoming patch. Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 3abbac0b5dd3e3b3dfb30a4885cdde5c20e1cb83 Author: Marc Kleine-Budde Date: Tue Sep 23 15:28:21 2014 +0200 can: rx-offload: Add support for timestamp based irq offloading Some CAN controllers don't implement a FIFO in hardware, but fill their mailboxes in a particular order (from lowest to highest or highest to lowest). This makes problems to read the frames in the correct order from the hardware, as new frames might be filled into just read (low) mailboxes. This gets worse, when following new frames are received into not read (higher) mailboxes. On the bright side some these CAN controllers put a timestamp on each received CAN frame. This patch adds support to offload CAN frames in interrupt context, order them by timestamp and then transmitted in a NAPI context. Signed-off-by: Marc Kleine-Budde drivers/net/can/rx-offload.c | 137 ++++++++++++++++++++++++++++++++++++++++- include/linux/can/rx-offload.h | 10 ++- 2 files changed, 144 insertions(+), 3 deletions(-) commit d254586c34538c0014280806c5d4795697cf21e5 Author: David Jander Date: Fri Oct 10 17:30:10 2014 +0200 can: rx-offload: Add support for HW fifo based irq offloading Some CAN controllers have a usable FIFO already but can still benefit from off-loading the CAN controller FIFO. The CAN frames of the FIFO are read and put into a skb queue during interrupt and then transmitted in a NAPI context. Signed-off-by: David Jander Signed-off-by: Marc Kleine-Budde drivers/net/can/Makefile | 3 +- drivers/net/can/rx-offload.c | 156 +++++++++++++++++++++++++++++++++++++++++ include/linux/can/rx-offload.h | 51 ++++++++++++++ 3 files changed, 209 insertions(+), 1 deletion(-) commit e06094ab6755efbba4944803ee08e67fc8c0ae6c Merge: d7cb3a5 53e74a1 Author: Arnaldo Carvalho de Melo Date: Mon Feb 6 11:09:26 2017 -0300 Merge remote-tracking branch 'tip/perf/urgent' into perf/core To pick fixes that are affecting tests of new 'perf diff' features in perf/core. Signed-off-by: Arnaldo Carvalho de Melo commit 8a68ea00a62e7ec33e9e4e7f3d9c2a845943c58d Author: Bartosz Golaszewski Date: Mon Feb 6 13:10:37 2017 +0100 gpio: mockup: implement naming the lines In order to allow testing line lookup by name from user space, add a new boolean parameter that indicates whether we want the lines to be named. The name is created by concatenating the chip name and the line offset value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit e4ba07bf8d1481e440d1f49652c96567f9560fdc Author: Bartosz Golaszewski Date: Mon Feb 6 13:10:36 2017 +0100 gpio: mockup: code shrink Moving a couple of lines around allows us to shrink the code a bit while keeping the same functionality. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit ca4091607847d25778db1b701a6e14dcc87a55ff Author: Bartosz Golaszewski Date: Mon Feb 6 13:10:35 2017 +0100 gpio: mockup: readability tweaks The following patch tries to improve the readability of the mockup driver. The driver is called gpio-mockup, so add the same prefix to all functions and structures. Add some newlines and use a temporary pointer in gpio_mockup_add(). Drop the name of the direction enum and rename the enum values to better reflect their purpose. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 123 ++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 57 deletions(-) commit a514a6e241f051dd8a4a00a456382dec0b1af21b Author: Eric Auger Date: Mon Feb 6 10:11:38 2017 +0100 iommu: Fix static checker warning in iommu_insert_device_resv_regions In case the device reserved region list is void, the returned value of iommu_insert_device_resv_regions is uninitialized. Let's return 0 in that case. This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions"). Reported-by: Dan Carpenter Signed-off-by: Eric Auger Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 909111ba0ba6aa228d9b6e9cf01dd68a46586cb4 Author: Zhen Lei Date: Fri Feb 3 17:35:02 2017 +0800 iommu: Avoid unnecessary assignment of dev->iommu_fwspec Move the assignment statement into if branch above, where it only needs to be. Signed-off-by: Zhen Lei Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 63104c06a9eddf53f88f6d16196bb036c62967b2 Author: Stefan Kristiansson Date: Mon Nov 3 14:28:14 2014 +0200 openrisc: add l.lwa/l.swa emulation This adds an emulation layer for implementations that lack the l.lwa and l.swa instructions. It handles these instructions both in kernel space and user space. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: Added delay slot pc adjust logic] Signed-off-by: Stafford Horne arch/openrisc/kernel/entry.S | 22 ++++- arch/openrisc/kernel/process.c | 3 + arch/openrisc/kernel/traps.c | 183 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+), 2 deletions(-) commit 8c9b7db0de3d64c9a6fcd12622636d4aa6a8c30c Author: Stefan Kristiansson Date: Sat May 17 19:18:58 2014 +0300 openrisc: head: refactor out tlb flush into it's own function This brings it inline with the other setup oprations done like the cache enables _ic_enable and _dc_enable. Also, this is going to make it easier to initialize additional cpu's when smp is introduced. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: Added commit body] Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit c2dc72437a5504bf8f4343ed83ae745afa388522 Author: Stefan Kristiansson Date: Wed Jan 8 13:15:05 2014 +0200 openrisc: head: use THREAD_SIZE instead of magic constant The stack size was hard coded to 0x2000, use the standard THREAD_SIZE definition loaded from thread_info.h. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: Added body to the commit message] Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 742fb582b4540a7b59427dc67be1fe4a5eac7078 Author: Stefan Kristiansson Date: Thu Aug 1 10:46:10 2013 +0300 openrisc: tlb miss handler optimizations By slightly reorganizing the code, the number of registers used in the tlb miss handlers can be reduced by two, thus removing the need to save them to memory. Also, some dead and commented out code is removed. No functional change. Signed-off-by: Stefan Kristiansson Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 141 +++++++++++++++----------------------------- 1 file changed, 46 insertions(+), 95 deletions(-) commit 3e06a16339303016b2c57b350a15afeaa7ba7813 Author: Stefan Kristiansson Date: Sat Apr 27 21:02:32 2013 +0300 openrisc: add cache way information to cpuinfo Motivation for this is to be able to print the way information properly in print_cpuinfo(), instead of hardcoding it to one. Signed-off-by: Stefan Kristiansson Signed-off-by: Jonas Bonn [shorne@gmail.com fixed conflict with show_cpuinfo change] Signed-off-by: Stafford Horne arch/openrisc/include/asm/cpuinfo.h | 2 ++ arch/openrisc/kernel/setup.c | 67 ++++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 31 deletions(-) commit c0fcaf554ed9b65477576439e8de63578d731070 Author: Jonas Bonn Date: Wed May 9 23:19:44 2012 +0200 openrisc: use SPARSE_IRQ The sparse IRQ framework is preferred nowadays so switch over to it. Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/Kbuild | 1 + 2 files changed, 2 insertions(+) commit 087a908f533f588d39c95e3d5f68545f132baf10 Author: Arnd Bergmann Date: Thu Feb 2 15:29:03 2017 +0100 iommu/mediatek: Remove bogus 'select' statements The mediatek IOMMU driver enables some drivers that it does not directly rely on, and that causes a warning for build testing: warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_VDECSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701) warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_IMGSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701) warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_MMSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701) This removes the select statements. Signed-off-by: Arnd Bergmann Signed-off-by: Joerg Roedel drivers/iommu/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit a1831bb9403720db6d4c033fe2d6bd0116dd28fe Author: Robin Murphy Date: Wed Feb 1 17:53:04 2017 +0000 iommu/dma: Remove bogus dma_supported() implementation Back when this was first written, dma_supported() was somewhat of a murky mess, with subtly different interpretations being relied upon in various places. The "does device X support DMA to address range Y?" uses assuming Y to be physical addresses, which motivated the current iommu_dma_supported() implementation and are alluded to in the comment therein, have since been cleaned up, leaving only the far less ambiguous "can device X drive address bits Y" usage internal to DMA API mask setting. As such, there is no reason to keep a slightly misleading callback which does nothing but duplicate the current default behaviour; we already constrain IOVA allocations to the iommu_domain aperture where necessary, so let's leave DMA mask business to architecture-specific code where it belongs. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 1 - drivers/iommu/dma-iommu.c | 10 ---------- include/linux/dma-iommu.h | 1 - 3 files changed, 12 deletions(-) commit 3b6bb5b705a4051c9899f5e3100c117c261d2742 Author: Geert Uytterhoeven Date: Tue Jan 31 12:17:07 2017 +0100 iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space Currently, the IPMMU/VMSA driver supports 32-bit I/O Virtual Addresses only, and thus sets io_pgtable_cfg.ias = 32. However, it doesn't force a 32-bit IOVA space through the IOMMU Domain Geometry. Hence if a device (e.g. SYS-DMAC) rightfully configures a 40-bit DMA mask, it will still be handed out a 40-bit IOVA, outside the 32-bit IOVA space, leading to out-of-bounds accesses of the PGD when mapping the IOVA. Force a 32-bit IOMMU Domain Geometry to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Robin Murphy Reviewed-by: Laurent Pinchart Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 2 ++ 1 file changed, 2 insertions(+) commit f95d7a46bc5722767c30ee223c8b67dd0f2e8793 Author: Kevin Cernekee Date: Thu Jan 26 14:49:44 2017 -0800 netfilter: ctnetlink: Fix regression in CTA_HELP processing Prior to Linux 4.4, it was usually harmless to send a CTA_HELP attribute containing the name of the current helper. That is no longer the case: as of Linux 4.4, if ctnetlink_change_helper() returns an error from the ct->master check, processing of the request will fail, skipping the NFQA_EXP attribute (if present). This patch changes the behavior to improve compatibility with user programs that expect the kernel interface to work the way it did prior to Linux 4.4. If a user program specifies CTA_HELP but the argument matches the current conntrack helper name, ignore it instead of generating an error. Signed-off-by: Kevin Cernekee Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a963d710f367f68cd13d562a07db55ccb8daade9 Author: Kevin Cernekee Date: Thu Jan 26 14:49:43 2017 -0800 netfilter: ctnetlink: Fix regression in CTA_STATUS processing The libnetfilter_conntrack userland library always sets IPS_CONFIRMED when building a CTA_STATUS attribute. If this toggles the bit from 0->1, the parser will return an error. On Linux 4.4+ this will cause any NFQA_EXP attribute in the packet to be ignored. This breaks conntrackd's userland helpers because they operate on unconfirmed connections. Instead of returning -EBUSY if the user program asks to modify an unchangeable bit, simply ignore the change. Also, fix the logic so that user programs are allowed to clear the bits that they are allowed to change. Signed-off-by: Kevin Cernekee Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_common.h | 4 ++++ net/netfilter/nf_conntrack_netlink.c | 26 +++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit fb7dc1d4ddce744c8d8e1aca19d4982102cf72e1 Author: Christian Borntraeger Date: Thu Jan 26 20:45:33 2017 +0100 KVM: s390: detect some program check loops Sometimes (e.g. early boot) a guest is broken in such ways that it loops 100% delivering operation exceptions (illegal operation) but the pgm new PSW is not set properly. This will result in code being read from address zero, which usually contains another illegal op. Let's detect this case and return to userspace. Instead of only detecting this for address zero apply a heuristic that will work for any program check new psw. We do not want guest problem state to be able to trigger a guest panic, e.g. by faulting on an address that is the same as the program check new PSW, so we check for the problem state bit being off. With proper handling in userspace we a: get rid of CPU consumption of such broken guests b: keep the program old PSW. This allows to find out the original illegal operation - making debugging such early boot issues much easier than with single stepping Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck arch/s390/kvm/intercept.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e1b239f371c0c745542cb8108d085ec728e8a69c Author: Takashi Iwai Date: Fri Feb 3 00:01:18 2017 +0100 ALSA: x86: Refactor PCM process engine This is again a big rewrite of the driver; now it touches the code to process PCM stream transfers. The most fundamental change is that the driver may support more than four periods. Instead of keeping the same index between both the ring buffer (with the fixed four buffer descriptors) and the PCM buffer periods, we keep difference indices for both (bd_head and pcm_head fields). In addition, when the periods are more than four, we need to track both head and next indices. That is, we now have three indices: bd_head, pcm_head and pcm_filled. Also, the driver works better for periods < 4, too: the remaining BDs out of four are marked as invalid, so that the hardware skips those BDs in its loop. By this flexibility, we can use even ALSA-lib dmix plugin, which requires 16 periods as default. The buffer size could be up to 20bit, so the max buffer size was increased accordingly. However, the buffer pre-allocation is kept as the old value (600kB) as default. The reason is the limited number of BDs: since it doesn't suffice for the useful SG page management that can fit with the usual page allocator like some other drivers, we have to still allocate continuous pages, hence we shouldn't take too big memories there. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 536 ++++++++++++++++----------------------- sound/x86/intel_hdmi_audio.h | 24 +- sound/x86/intel_hdmi_lpe_audio.h | 25 +- 3 files changed, 231 insertions(+), 354 deletions(-) commit dfe75ff8ca74f54b0fa5a326a1aa9afa485ed802 Author: Jiri Kosina Date: Wed Feb 1 21:01:54 2017 +0100 netfilter: nf_ct_helper: warn when not applying default helper assignment Commit 3bb398d925 ("netfilter: nf_ct_helper: disable automatic helper assignment") is causing behavior regressions in firewalls, as traffic handled by conntrack helpers is now by default not passed through even though it was before due to missing CT targets (which were not necessary before this commit). The default had to be switched off due to security reasons [1] [2] and therefore should stay the way it is, but let's be friendly to firewall admins and issue a warning the first time we're in situation where packet would be likely passed through with the old default but we're likely going to drop it on the floor now. Rewrite the code a little bit as suggested by Linus, so that we avoid spaghettiing the code even more -- namely the whole decision making process regarding helper selection (either automatic or not) is being separated, so that the whole logic can be simplified and code (condition) duplication reduced. [1] https://cansecwest.com/csw12/conntrack-attack.pdf [2] https://home.regit.org/netfilter-en/secure-use-of-helpers/ Signed-off-by: Jiri Kosina Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 39 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit a4077ce5871304f8a78f80b74b18b6052a410f1a Author: Andrey Jr. Melnikov Date: Thu Dec 8 19:57:08 2016 +0300 mtd: nand: Add Winbond manufacturer id Add WINBOND manufacturer id. Signed-off-by: Andrey Jr. Melnikov Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_ids.c | 1 + include/linux/mtd/nand.h | 1 + 2 files changed, 2 insertions(+) commit cff1f7a9a27d2562bc221d0506d30b459505649c Author: Paul Gortmaker Date: Thu Feb 2 15:17:40 2017 -0500 pinctrl: sunxi: make sun5i explicitly non-modular We had all these corrected in commit 0c8c6ba00cbf ("pinctrl: sunxi: make bool drivers explicitly non-modular") but this new one recently crept in. The Kconfig currently controlling compilation of this code is: drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN5I drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN5I ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij Cc: Maxime Ripard Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun5i.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e1e8a9624f7ba8ead4f056ff558ed070e86fa747 Author: Janosch Frank Date: Thu Feb 2 16:39:31 2017 +0100 KVM: s390: Disable dirty log retrieval for UCONTROL guests User controlled KVM guests do not support the dirty log, as they have no single gmap that we can check for changes. As they have no single gmap, kvm->arch.gmap is NULL and all further referencing to it for dirty checking will result in a NULL dereference. Let's return -EINVAL if a caller tries to sync dirty logs for a UCONTROL guest. Fixes: 15f36eb ("KVM: s390: Add proper dirty bitmap support to S390 kvm.") Cc: # 3.16+ Signed-off-by: Janosch Frank Reported-by: Martin Schwidefsky Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 3 +++ 1 file changed, 3 insertions(+) commit 1fe57d67e093d526d8206b071a086cd11a740945 Author: Chen-Yu Tsai Date: Thu Feb 2 00:02:09 2017 +0800 pinctrl: sunxi: Remove stray printk call in sun5i driver's probe function There is a stray printk call in the new sun5i pinctrl driver's probe function. Remove it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun5i.c | 2 -- 1 file changed, 2 deletions(-) commit b6263178b8dbd9fe70d55f136c2a1da39309520e Author: Masami Hiramatsu Date: Mon Feb 6 18:55:43 2017 +0900 kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() Use hlist_for_each_entry() in the first loop in the kretprobe trampoline_handler() function, because it doesn't change the hlist. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/148637493309.19245.12546866092052500584.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1ee3b1e30b4c6c0858e0c0b4ca1b4d86020ada Author: Masami Hiramatsu Date: Mon Feb 6 18:54:33 2017 +0900 kprobes/arm64: Remove a redundant dependency from the Kconfig Remove the 'HAVE_KPROBES' dependency from the HAVE_KRETPROBES line, since HAVE_KPROBES is already selected unconditionally in the Kconfig line above this one. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Catalin Marinas Cc: David A. Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sandeepa Prabhu Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/148637486369.19245.316601692744886725.stgit@devbox Signed-off-by: Ingo Molnar arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 304c92e8fcf5863a40de60baf0576cab6b046bcf Author: Arnd Bergmann Date: Wed Feb 1 17:16:24 2017 +0100 pinctrl: samsung: mark PM functions as __maybe_unused The rework of the suspend/resume handling uses the wrong #ifdef check, leading to a build warning without CONFIG_PM_SLEEP: drivers/pinctrl/samsung/pinctrl-samsung.c:1142:12: error: 'samsung_pinctrl_resume' defined but not used [-Werror=unused-function] drivers/pinctrl/samsung/pinctrl-samsung.c:1092:12: error: 'samsung_pinctrl_suspend' defined but not used [-Werror=unused-function] Using a __maybe_unused annotation instead of the #ifdef is a simple way to avoid this problem class. Fixes: 2b24efa8e5c5 ("pinctrl: samsung: Replace syscore ops with standard platform device pm_ops") Signed-off-by: Arnd Bergmann Acked-by: Marek Szyprowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 623461e23bd56bde2db72b44742932075e30db33 Author: Chen-Yu Tsai Date: Thu Feb 2 00:25:47 2017 +0800 pinctrl: sunxi: Remove redundant A31s pinctrl driver Now that we can support the A31s pin controller with the A31 driver using the new variants support, the independent A31s driver becomes redundant. Remove it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 - drivers/pinctrl/sunxi/Makefile | 1 - drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 809 ----------------------------- 3 files changed, 814 deletions(-) commit 4924982e306e256d2737f94fcd004a536da6df54 Author: Chen-Yu Tsai Date: Thu Feb 2 00:25:46 2017 +0800 pinctrl: sunxi: Support A31/A31s with pinctrl variants The A31s is a trimmed down version of the A31. Some hardware blocks are removed, thus not available for muxing on the external pins. Some external pins were directly removed. This makes it easy to support the A31s pin controller with the A31 driver. We just mark the pins and functions that were trimmed as A31 only. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 184 +++++++++++++++++++----------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 2 + 2 files changed, 121 insertions(+), 65 deletions(-) commit 0fc6d1ca14ebe1c405c0ad0a33a3811747d20506 Merge: d7cb3a5 53e74a1 Author: Ingo Molnar Date: Mon Feb 6 11:04:39 2017 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 02e74fc0401ae3f952423b04bea773195f2372ce Author: William Breathitt Gray Date: Wed Feb 1 15:37:55 2017 -0500 gpio: Add GPIO support for the ACCES PCI-IDIO-16 The ACCES PCI-IDIO-16 device provides 32 lines of digital I/O (16 lines of optically-isolated digital inputs for AC and DC control signals, and 16 lines of solid state switch digital outputs). An interrupt is generated when any of the inputs change state (low to high or high to low). Input filter control is not supported by this driver, and input filters are deactivated by this driver. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij MAINTAINERS | 6 + drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-pci-idio-16.c | 348 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 364 insertions(+) commit 9a593656def0dc2f6c227851e8e602077267a5f1 Author: Ken Lin Date: Sat Feb 4 04:00:24 2017 +0800 USB: serial: cp210x: add new IDs for GE Bx50v3 boards Add new USB IDs for cp2104/5 devices on Bx50v3 boards due to the design change. Signed-off-by: Ken Lin Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) commit a61d5ce9cc56e2e41bbb1ad62ca7a16d7e7567bd Author: Or Gerlitz Date: Thu Dec 8 12:58:45 2016 +0200 net/mlx5: Fix static checker warnings For some reason, sparse doesn't like using an expression of type (!x) with a bitwise | and &. In order to mitigate that, we use a local variable. This removes the following sparse complaints on the core driver (and similar ones on the IB driver too): drivers/net/ethernet/mellanox/mlx5/core/srq.c:83:9: warning: dubious: !x & y drivers/net/ethernet/mellanox/mlx5/core/srq.c:96:9: warning: dubious: !x & y drivers/net/ethernet/mellanox/mlx5/core/port.c:59:9: warning: dubious: !x & y drivers/net/ethernet/mellanox/mlx5/core/vport.c:561:9: warning: dubious: !x & y Signed-off-by: Or Gerlitz Signed-off-by: Matan Barak Reported-by: Bart Van Assche Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36523b6830fa468ae9e0335601aed475480b7dd3 Author: Lee Jones Date: Fri Feb 3 10:23:19 2017 +0000 ARM: dts: STiH410-b2260: Enable HW flow-control Hardware flow-control capability must be specified at a platform level in order to inform the ASC driver that the platform is capable (i.e. are the lines wired up, etc). STiH4{07,10} devices are indeed capable, so let's provide the property. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih410-b2260.dts | 1 + 1 file changed, 1 insertion(+) commit cf38e1a60ea99a81ec479e8f995c63b1d19d1f6a Author: Lee Jones Date: Fri Feb 3 10:23:18 2017 +0000 ARM: dts: STiH407-family: Use new Pinctrl groups Having just defined some new Pinctrl groups for when HW flow-control is {en,dis}abled, let's reference them for use within the driver. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih407-family.dtsi | 3 +-- arch/arm/boot/dts/stih410-b2260.dts | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 34224a0c1941715b6e0f7daf7b146aca5815aabb Author: Lee Jones Date: Fri Feb 3 10:23:17 2017 +0000 ARM: dts: STiH407-pinctrl: Add Pinctrl group for HW flow-control Each serial port which supports HW flow-control should have 2 Pinctrl groups. One for when HW flow-control is in progress, where the IP will take over controlling the lines and another group which enables the lines to be toggled using GPIO mechanisms. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih407-pinctrl.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 105fc00bc388d2dff089f3330fc7d9b009c519dc Author: Lee Jones Date: Fri Feb 3 10:23:16 2017 +0000 ARM: dts: STiH410-b2260: Identify the UART RTS line When hardware flow-control is disabled, manual toggling of the UART's reset line (RTS) using userland applications (e.g. stty) is not possible, since the ASC IP does not provide this functionality in the same was as some other IPs do. Thus, we have to do this manually. This patch configures the UART RTS line as a GPIO for manipulation within the UART driver when HW flow-control is not enabled. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih410-b2260.dts | 1 + 1 file changed, 1 insertion(+) commit 8ab99f59f42d0e70a853a10120828ab66bd734b1 Author: Lee Jones Date: Fri Feb 3 10:23:15 2017 +0000 dt-bindings: serial: Update 'uart-has-rtscts' description 'uart-has-rtscts' property and 'rts-gpios|cts-gpios' are normally mutually exclusive, however it is possible for some drivers to have a dynamic approach, meaning that both properties can be relevant. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/serial.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 233680a2b0da689719bf38e45d86c69e192e567c Author: Lee Jones Date: Fri Feb 3 10:23:14 2017 +0000 serial: st-asc: Use generic DT binding for announcing RTS/CTS lines The initial binding 'st,hw-flow-control' isn't used anywhere, in neither in upstream nor downstream kernels. It isn't even documented in dt-bindings, so we can safely assume it's safe to swap to the generic one. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7356256488c544b8fdc2c3a775ce069546d7933 Author: Lee Jones Date: Fri Feb 3 10:23:13 2017 +0000 serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles When hardware flow-control is disabled, manual toggling of the UART's reset line (RTS) using userland applications (e.g. stty) is not possible, since the ASC IP does not provide this functionality in the same was as some other IPs do. Thus, we have to do this manually. This patch ensures that when HW flow-control is disabled the RTS/CTS lines are free to be registered via the GPIO API. It also ensures any registered GPIO lines are unregistered when HW flow-control is requested, allowing the IP to control them automatically. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 6929cb00a5017633aa54c6a9071cc0abfd573b47 Author: Lee Jones Date: Fri Feb 3 10:23:12 2017 +0000 serial: st-asc: Read in all Pinctrl states There are now 2 possible separate/different Pinctrl states which can be provided from platform data. One which encompasses the lines required for HW flow-control (CTS/RTS) and another which does not specify these lines, such that they can be used via GPIO mechanisms for manually toggling (i.e. from a request by `stty`). Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit a4f6072fe45b2b4a6497c3760a53bba6694c520a Author: Lee Jones Date: Fri Feb 3 10:23:11 2017 +0000 serial: st-asc: Provide RTS functionality Until this point, it has not been possible for userland serial applications (e.g. stty) to toggle the UART RTS line. This can be useful with certain configurations. For example, when using a Mezzanine on a Linaro 96board, RTS line is used to take the on-board microcontroller in and out of reset. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 5ab066e5465b2984a45e205f33896b2ec1620c37 Author: Lee Jones Date: Fri Feb 3 10:23:10 2017 +0000 serial: st-asc: Ignore the parity error bit if 8-bit mode is enabled The datasheet states: "If the MODE field selects an 8-bit frame then this [parity error] bit is undefined. Software should ignore this bit when reading 8-bit frames." Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1c9c858e2ff8ae8024a3d75d2ed080063af43754 Author: Ian Abbott Date: Fri Feb 3 20:25:00 2017 +0000 serial: 8250_pci: Add MKS Tenta SCOM-0800 and SCOM-0801 cards The MKS Instruments SCOM-0800 and SCOM-0801 cards (originally by Tenta Technologies) are 3U CompactPCI serial cards with 4 and 8 serial ports, respectively. The first 4 ports are implemented by an OX16PCI954 chip, and the second 4 ports are implemented by an OX16C954 chip on a local bus, bridged by the second PCI function of the OX16PCI954. The ports are jumper-selectable as RS-232 and RS-422/485, and the UARTs use a non-standard oscillator frequency of 20 MHz (base_baud = 1250000). Signed-off-by: Ian Abbott Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5d23188a473da0b2fe6849ccf03578eebfead30e Author: Ulrich Hecht Date: Fri Feb 3 11:38:19 2017 +0100 serial: sh-sci: make RX FIFO parameters tunable via sysfs Allows tuning of the RX FIFO fill threshold and timeout. (The latter is only applicable to SCIFA and SCIFB). Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 039403765e5da3c6a4c2cc048c201bfad932033a Author: Ulrich Hecht Date: Fri Feb 3 11:38:18 2017 +0100 serial: sh-sci: SCIFA/B RX FIFO software timeout Implements support for FIFO fill thresholds greater than one with software timeout. This mechanism is not possible (or at least not useful) on SCIF family hardware other than SCIFA and SCIFB because they do not support turning off the DR hardware timeout interrupt separately from the RI interrupt. Signed-off-by: Ulrich Hecht Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 101 +++++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 33 deletions(-) commit 18e8cf159177100e69d528293f8cf6875c0b1bca Author: Ulrich Hecht Date: Fri Feb 3 11:38:17 2017 +0100 serial: sh-sci: increase RX FIFO trigger defaults for (H)SCIF Sets reasonable trigger defaults for the various SCIF variants. Also corrects the FIFO size for SH7705-style ports. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit d4168be73c8fdc3e9cdc61aa4b513e6c9b7bcf10 Author: Alexandre TORGUE Date: Fri Jan 27 17:15:16 2017 +0100 pinctrl: Amend bindings for STM32 pinctrl Adds "ngpios" and "gpio-ranges" bindings definition. Signed-off-by: Alexandre TORGUE Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/st,stm32-pinctrl.txt | 54 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit 117bd6e842a8d52e48f0d18be260a05bf96dc854 Author: Alexandre TORGUE Date: Tue Jan 31 14:14:20 2017 +0100 pinctrl: Add STM32 pinctrl driver DT bindings Add compatible sting for stm32h743 MCU. Signed-off-by: Alexandre TORGUE Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 98a5f361b8625c6f4841d6ba013bbf0e80d08147 Author: Benjamin Herrenschmidt Date: Fri Feb 3 17:20:07 2017 +1100 powerpc: Add new cache geometry aux vectors This adds AUX vectors for the L1I,D, L2 and L3 cache levels providing for each cache level the size of the cache in bytes and the geometry (line size and number of ways). We chose to not use the existing alpha/sh definition which packs all the information in a single entry per cache level as it is too restricted to represent some of the geometries used on POWER. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 1 + arch/powerpc/include/asm/elf.h | 20 ++++++++++++++++++++ arch/powerpc/include/uapi/asm/auxvec.h | 33 ++++++++++++++++++++++++++++++++- arch/powerpc/kernel/setup_64.c | 5 +++++ 4 files changed, 58 insertions(+), 1 deletion(-) commit 608b42140e966a65cabc68d997875065f3e63c2f Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:49 2017 -0600 powerpc/64: Hard code cache geometry on POWER8 All shipping firmware versions have it wrong in the device-tree Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 65e01f386fcddb3460be78fc886856889f80ecc7 Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:48 2017 -0600 powerpc/64: Add L2 and L3 cache shape info Retrieved from device-tree when available Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 26 +++++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) commit e2827fe5c1566f66a922dd7493cbe4522c50580a Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:47 2017 -0600 powerpc/64: Clean up ppc64_caches using a struct per cache We have two set of identical struct members for the I and D sides and mostly identical bunches of code to parse the device-tree to populate them. Instead make a ppc_cache_info structure with one copy for I and one for D Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 24 ++--- arch/powerpc/include/asm/page_64.h | 4 +- arch/powerpc/kernel/align.c | 2 +- arch/powerpc/kernel/asm-offsets.c | 12 +-- arch/powerpc/kernel/setup_64.c | 183 ++++++++++++++++++------------------- arch/powerpc/kernel/vdso.c | 16 ++-- 6 files changed, 119 insertions(+), 122 deletions(-) commit 5d451a87e5ebbde18c2b48284778f29d308816c2 Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:46 2017 -0600 powerpc/64: Retrieve number of L1 cache sets from device-tree It will be used to calculate the associativity Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit bd067f83b0840e798328d14133ce4542d3bf9e71 Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:45 2017 -0600 powerpc/64: Fix naming of cache block vs. cache line In a number of places we called "cache line size" what is actually the cache block size, which in the powerpc architecture, means the effective size to use with cache management instructions (it can be different from the actual cache line size). We fix the naming across the board and properly retrieve both pieces of information when available in the device-tree. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 12 ++++--- arch/powerpc/include/asm/page_64.h | 4 +-- arch/powerpc/kernel/align.c | 2 +- arch/powerpc/kernel/asm-offsets.c | 12 +++---- arch/powerpc/kernel/misc_64.S | 28 ++++++++-------- arch/powerpc/kernel/setup_64.c | 65 +++++++++++++++++++++----------------- arch/powerpc/kernel/vdso.c | 10 +++--- arch/powerpc/lib/copypage_64.S | 4 +-- arch/powerpc/lib/string_64.S | 6 ++-- 9 files changed, 75 insertions(+), 68 deletions(-) commit f9e473f1aa7597affff87bc6a599cf0aa389f0c1 Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:44 2017 -0600 powerpc: Remove obsolete comment about patching instructions We don't patch instructions based on the cache lines or block sizes these days. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 3 --- 1 file changed, 3 deletions(-) commit 33ec723cac63529e5d0efa1125c893d2049c023d Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:43 2017 -0600 powerpc: Move {d,i,u}cache_bsize definitions to a common place The variables are defined twice in setup_32.c and setup_64.c, do it once in setup-common.c instead Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 9 +++++++++ arch/powerpc/kernel/setup_32.c | 8 -------- arch/powerpc/kernel/setup_64.c | 8 -------- 3 files changed, 9 insertions(+), 16 deletions(-) commit 2a196e24b39aa85351ecd9eb7cf511914157f14b Author: Benjamin Herrenschmidt Date: Sun Jan 8 17:31:42 2017 -0600 powerpc: Move ARCH_DLINFO out of uapi It's an kernel private macro, it doesn't belong there Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/elf.h | 22 ++++++++++++++++++++++ arch/powerpc/include/uapi/asm/elf.h | 23 ----------------------- 2 files changed, 22 insertions(+), 23 deletions(-) commit 17fa87fe5a5141d3c082c5c91e950aca9e0ec701 Merge: 3b28f4f d5adbfc Author: Greg Kroah-Hartman Date: Mon Feb 6 09:39:13 2017 +0100 Merge 4.10-rc7 into char-misc-next We want the hv and other fixes in here as well to handle merge and testing issues. Signed-off-by: Greg Kroah-Hartman commit deb30f51aac2122b33ceff13bd2cc1542277fda9 Author: Alexandre TORGUE Date: Tue Jan 31 14:14:19 2017 +0100 pinctrl: stm32: Add STM32H743 MCU support This patch adds STM32H743 pinctrl and GPIO support, relies on the generic STM32 pinctrl driver. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 5 + drivers/pinctrl/stm32/Makefile | 1 + drivers/pinctrl/stm32/pinctrl-stm32h743.c | 1980 +++++++++++++++++++++++++++++ 3 files changed, 1986 insertions(+) commit 63b8482781ae8fb52969dc6825a6e5964cdc5736 Author: Alexandre TORGUE Date: Tue Jan 31 14:14:18 2017 +0100 include: dt-bindings: Add STM32H7 pinctrl DT defines Adds common pinctrl device tree defines for STM32H743 and STM32H753 MCU. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij include/dt-bindings/pinctrl/stm32h7-pinfunc.h | 1612 +++++++++++++++++++++++++ 1 file changed, 1612 insertions(+) commit a769f30c7bd7cf917eea05a2b448f3588a87d767 Merge: 307a082 d5adbfc Author: Greg Kroah-Hartman Date: Mon Feb 6 09:36:10 2017 +0100 Merge 4.10-rc7 into staging-next This resolves the merge errors that were reported in linux-next and it picks up the staging and IIO fixes that we need/want in here as well. Signed-off-by: Greg Kroah-Hartman commit cad32741218299eee3f75de21ac9ccab8485bd62 Author: Boris Brezillon Date: Fri Jan 6 10:42:07 2017 +0100 mtd: nand: sunxi: Improve sunxi_nfc_cmd_ctrl() We only need to call sunxi_nfc_wait_cmd_fifo_empty() if we want to send a new command. Move the sunxi_nfc_wait_cmd_fifo_empty() call to right place to avoid extra register reads. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8de15e1feb232086d1d14e01a6a7648d10002c19 Author: Boris Brezillon Date: Fri Jan 6 10:42:06 2017 +0100 mtd: nand: sunxi: Stop using polling mode when waiting for long operations Some operations, like read/write an entire page of data with the ECC engine enabled, are known to take a lot of time. Use the interrupt-based waiting mode in these situation. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 19649e2c16fbc94b664f7074ec4fa9f15292fdce Author: Boris Brezillon Date: Fri Jan 6 10:42:05 2017 +0100 mtd: nand: sunxi: Fix the non-polling case in sunxi_nfc_wait_events() wait_for_completion_timeout() returns 0 if a timeout occurred, 1 otherwise. Fix the sunxi_nfc_wait_events() accordingly. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7bddba775026d51dede9d726bd8158574c0ec5a6 Merge: 530b7a3 d5adbfc Author: Greg Kroah-Hartman Date: Mon Feb 6 09:32:06 2017 +0100 Merge 4.10-rc7 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 656441478ed55d960df5f3ccdf5a0f8c61dfd0b3 Author: Mark Marshall Date: Thu Jan 26 16:18:27 2017 +0100 mtd: nand: ifc: Fix location of eccstat registers for IFC V1.0 The commit 7a654172161c ("mtd/ifc: Add support for IFC controller version 2.0") added support for version 2.0 of the IFC controller. The version 2.0 controller has the ECC status registers at a different location to the previous versions. Correct the fsl_ifc_nand structure so that the ECC status can be read from the correct location for both version 1.0 and 2.0 of the controller. Cc: stable@vger.kernel.org Fixes: 7a654172161c ("mtd/ifc: Add support for IFC controller version 2.0") Signed-off-by: Mark Marshall Signed-off-by: Boris Brezillon drivers/mtd/nand/fsl_ifc_nand.c | 8 +++++++- include/linux/fsl_ifc.h | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit da2ee97311486063e86e7989b713ec6aca66ca3e Author: Mylène Josserand Date: Thu Feb 2 10:24:22 2017 +0100 ARM: dts: sun8i: sinlinx: Enable audio nodes Enable the audio codec and the audio dai for the sun8i A33 sinlinx board. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8e66f3f438cda57f7b82d218a86b0aa9a931df94 Author: Mylène Josserand Date: Thu Feb 2 10:24:21 2017 +0100 ARM: dts: sun8i: parrot: Enable audio nodes Enable the audio codec and the audio dai for the sun8i R16 Parrot board. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r16-parrot.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 870f1bd1f5e95a3aa860cbcd7b844cdcc6b95e43 Author: Mylène Josserand Date: Thu Feb 2 10:24:20 2017 +0100 ARM: dts: sun8i: Add audio codec, dai and card for A33 Add the audio codec, dai and a simple card to be able to use the audio stream of the builtin codec on sun8i SoC. This commit adds also an audio-routing for the sound card node to link the analog DAPM widgets (Right/Left DAC) and the digital one's as they are created in different drivers. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 783d948544993f55bdacc78b127532e8b6e2fc9f Author: Theodore Ts'o Date: Sun Feb 5 19:47:14 2017 -0500 ext4: add EXT4_IOC_GOINGDOWN ioctl This ioctl is modeled after the xfs's XFS_IOC_GOINGDOWN ioctl. (In fact, it uses the same code points.) Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 10 ++++++++++ fs/ext4/ioctl.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ext4/super.c | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) commit e4df1ebdfeb4c68523046667b2d8ef8ab20ae066 Merge: e8e1a5b 537b94d Author: Linus Walleij Date: Sun Feb 5 23:14:23 2017 +0100 Merge branch 'ib-gpiod-flags' into devel commit bd092ad1463ca0990581fa992e12a9b0ed295d25 Merge: 3976001 02c1602 Author: David S. Miller Date: Sun Feb 5 16:11:59 2017 -0500 Merge branch 'remove-__napi_complete_done' Eric Dumazet says: ==================== net: get rid of __napi_complete() This patch series removes __napi_complete() calls, in an effort to make NAPI API simpler and generalize GRO and napi_complete_done() ==================== Signed-off-by: David S. Miller commit 02c1602ee7b3e3d062c3eacd374d6a6e3a2ebb73 Author: Eric Dumazet Date: Sat Feb 4 15:25:02 2017 -0800 net: remove __napi_complete() All __napi_complete() callers have been converted to use the more standard napi_complete_done(), we can now remove this NAPI method for good. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/netdevice.h | 1 - net/core/dev.c | 24 +++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) commit 32e19300a4f6705e79354cdadac3b2ef3cd0c309 Author: Eric Dumazet Date: Sat Feb 4 15:25:01 2017 -0800 aeroflex/greth: use napi_complete_done() We plan to remove __napi_complete() soon, this driver is the last user. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/aeroflex/greth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d1a6333d90167f2b196f2cc0c2a988a10eb76c5 Author: Eric Dumazet Date: Sat Feb 4 15:25:00 2017 -0800 ibm/emac: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() We plan to remove __napi_complete() to reduce NAPI complexity. Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/mal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0eb7b85c9669fce5ebf22915ee5f93b6d721256e Author: Eric Dumazet Date: Sat Feb 4 15:24:59 2017 -0800 qla3xxx: add GRO support Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qla3xxx.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 7ea4007757e56bd2fb589820ba7676d2dfb0b47a Author: Eric Dumazet Date: Sat Feb 4 15:24:58 2017 -0800 ks8695net: add GRO support Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Note that rx_lock seems to be useless, NAPI logic should not need this extra care. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8695net.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 135844ef9feff93263319c18ead863a011381b57 Author: Eric Dumazet Date: Sat Feb 4 15:24:57 2017 -0800 skge: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API and get rid of napi_gro_flush() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/marvell/skge.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a3961789727c3b7cc3ae5f83c5e41005c6e2d1ec Author: Eric Dumazet Date: Sat Feb 4 15:24:56 2017 -0800 ep93xx_eth: add GRO support Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/ep93xx_eth.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 5b2ec6f2be512485cb9fde7eb1119279af524c28 Author: Eric Dumazet Date: Sat Feb 4 15:24:55 2017 -0800 pcnet32: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/amd/pcnet32.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c46e9907d4dcc2062f742d4e37e41a81a162fe7b Author: Eric Dumazet Date: Sat Feb 4 15:24:54 2017 -0800 amd8111e: add GRO support Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/amd/amd8111e.c | 164 ++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 92 deletions(-) commit 1fa8c5f33a7edb67cef8e44f22fa3afeb7d18e89 Author: Eric Dumazet Date: Sat Feb 4 15:24:53 2017 -0800 epic100: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/smsc/epic100.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit ab1e7e1d26669365e49e8312f96f7a5fa0b703a9 Author: Eric Dumazet Date: Sat Feb 4 15:24:52 2017 -0800 8139cp: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) Eventually get rid of napi_gro_flush() in the future. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139cp.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 617f01211bafed65b5cb2fa5b671e839c7f2af86 Author: Eric Dumazet Date: Sat Feb 4 15:24:51 2017 -0800 8139too: use napi_complete_done() Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139too.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 307a082484eb0201ad123f39f95510a9da11985b Author: Umang Raghuvanshi Date: Sun Feb 5 20:22:45 2017 +0530 staging: fbtft: fix unaligned parentheses Fix the following formatting issues: CHECK: Alignment should match open parenthesis Signed-off-by: Umang Raghuvanshi Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1306.c | 2 +- drivers/staging/fbtft/fb_ssd1331.c | 20 +++++++++++--------- drivers/staging/fbtft/fb_ssd1351.c | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) commit 163478dae0b6ce2437488e54012705b53ef43f3d Author: Dmitry Torokhov Date: Sat Feb 4 10:19:21 2017 -0800 regulator: core: have regulator_dev_lookup() return ERR_PTR-encoded errors Instead of returning both regulator_dev structure as return value and auxiliary error code in 'ret' argument, let's switch to using ERR_PTR encoded values. This makes it more obvious what is going on at call sites. Also, let's not unlock the mutex in the middle of a loop, but rather break out and have single unlock path. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 858274b6a13b4db0e6fb451eea7f8817c42426a7 Author: Waiman Long Date: Thu Jan 5 15:17:05 2017 -0500 debugobjects: Reduce contention on the global pool_lock On a large SMP system with many CPUs, the global pool_lock may become a performance bottleneck as all the CPUs that need to allocate or free debug objects have to take the lock. That can sometimes cause soft lockups like: NMI watchdog: BUG: soft lockup - CPU#35 stuck for 22s! [rcuos/1:21] ... RIP: 0010:[] [] _raw_spin_unlock_irqrestore+0x3b/0x60 ... Call Trace: [] free_object+0x81/0xb0 [] debug_check_no_obj_freed+0x193/0x220 [] ? trace_hardirqs_on_caller+0xf9/0x1c0 [] ? file_free_rcu+0x36/0x60 [] kmem_cache_free+0xd2/0x380 [] ? fput+0x90/0x90 [] file_free_rcu+0x36/0x60 [] rcu_nocb_kthread+0x1b3/0x550 [] ? rcu_nocb_kthread+0x101/0x550 [] ? sync_exp_work_done.constprop.63+0x50/0x50 [] kthread+0x101/0x120 [] ? trace_hardirqs_on_caller+0xf9/0x1c0 [] ret_from_fork+0x22/0x50 To reduce the amount of contention on the pool_lock, the actual kmem_cache_free() of the debug objects will be delayed if the pool_lock is busy. This will temporarily increase the amount of free objects available at the free pool when the system is busy. As a result, the number of kmem_cache allocation and freeing is reduced. To further reduce the lock operations free debug objects in batches of four. Signed-off-by: Waiman Long Cc: Christian Borntraeger Cc: "Du Changbin" Cc: Andrew Morton Cc: Jan Stancek Link: http://lkml.kernel.org/r/1483647425-4135-4-git-send-email-longman@redhat.com Signed-off-by: Thomas Gleixner lib/debugobjects.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit cb23ebdfa6a491cf2173323059d846b4c5c9264e Author: Derek Robson Date: Sat Feb 4 17:49:00 2017 +1300 Drivers: staging: speakup: spk_priv.h - style fix Changed function definition argument to have identifier name. found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_priv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38955adfeb94c34309ace7ae67f8c6ac42943ec9 Author: Stafford Horne Date: Sun Feb 5 16:07:33 2017 +0900 staging: vchip_shim: Remove unneeded stddef.h include Building on openrisc musl toolchain this causes the allyesconfig build to fail. drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:42:20: fatal error: stddef.h: No such file or directory Removing this causes no issues with the build. Signed-off-by: Stafford Horne Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 -- 1 file changed, 2 deletions(-) commit 6ddcf34f113a500d75e3e62b63079a924bc0d29c Author: Simon Sandström Date: Sat Feb 4 18:09:39 2017 +0100 staging: vt6656: Add missing identifier names Fix all "function definition argument '...' should also have an identifier name" warnings in vt6656. Use identifier name from each corresponding C file. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/channel.h | 2 +- drivers/staging/vt6656/dpc.h | 2 +- drivers/staging/vt6656/firmware.h | 6 +++--- drivers/staging/vt6656/int.h | 4 ++-- drivers/staging/vt6656/key.h | 2 +- drivers/staging/vt6656/mac.h | 31 ++++++++++++++++--------------- drivers/staging/vt6656/power.h | 6 +++--- drivers/staging/vt6656/rf.h | 10 +++++----- drivers/staging/vt6656/rxtx.h | 8 ++++---- drivers/staging/vt6656/usbpipe.h | 17 ++++++++++------- 10 files changed, 46 insertions(+), 42 deletions(-) commit 75ce077cc0b589008795d7efe160a71d8fddb0da Author: Michael Rupprecht Date: Fri Feb 3 18:06:17 2017 +0100 Staging: bcm2835-audio: removed spaces around parenthesis Removed unnecessary spaces around parenthesis as reported by checkpatch.pl Signed-off-by: Michael Rupprecht Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e495fac83932df75f2866a545250a6a064412e26 Author: Zhengyi Shen Date: Fri Feb 3 22:54:06 2017 +0800 staging:most/hdm-i2c: Replace symbolic permissions with octal permissions WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. This warning was detected by checkpatch.pl for hdm_i2c.c. Signed-off-by: Zhengyi Shen Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-i2c/hdm_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ad253fc0a090e9477b8466c0dba90045f4e02a6 Author: Kamal Heib Date: Fri Feb 3 16:02:24 2017 +0200 staging: octeon: Fix line over 80 characters This patch fix the line over 80 characters warning that was detected using checkpatch.pl script. Fixes: 6fe5efa1415c ('staging: octeon: Convert create_singlethread_workqueue()') Cc: Bhaktipriya Shridhar Signed-off-by: Kamal Heib Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17fa2dcbd6325ab877651bef04fca9dd828a2758 Author: Arnd Bergmann Date: Fri Feb 3 18:01:23 2017 +0100 iio: adc: handle unknow of_device_id data If we get an unknown 'childmode' value, a number of variables are not initialized properly: drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_probe': drivers/iio/adc/rcar-gyroadc.c:390:5: error: 'num_channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:426:22: error: 'sample_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:428:23: error: 'channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] The driver is currently correct, but handling this properly is more robust for possible modifications. There is also a false-positive warning about adcmode being possibly uninitialized, but that cannot happen as we also check the 'first' flag: drivers/iio/adc/rcar-gyroadc.c:398:26: error: 'adcmode' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for 'adcmode' and bails out for any unknown childmode. Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Arnd Bergmann Acked-by: Marek Vasut Signed-off-by: Jonathan Cameron drivers/iio/adc/rcar-gyroadc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ef1844b7ed847430955a95d20242f0d1b9f5fa64 Author: Chris Zhong Date: Sun Feb 5 15:55:02 2017 +0800 drm/rockchip: cdn-dp: don't configure hardware in mode_set With atomic modesetting the hardware will be powered off when the mode_set function is called. We should configure the hardware in the enable function. Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/cdn-dp-core.c | 49 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 13e0e2069401f2692cf25eb3c7f61137b5f9902d Author: Chris Zhong Date: Sun Feb 5 15:55:01 2017 +0800 drm/rockchip: cdn-dp: retry to check sink count Sometimes the Dock is disconnected, but cdn_dp_encoder_disable is not triggered by DRM. For example, unplug the Dock in console mode, and re-plug it again, the cdn_dp_event_work will try to get the sink count of Dock, since the DP is still active. But the Dock has been powered down, it need re-power on, and wait for a while until it is ready to DPCD communication. Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/cdn-dp-core.c | 91 +++++++++++++++++++--------------- drivers/gpu/drm/rockchip/cdn-dp-core.h | 1 + 2 files changed, 52 insertions(+), 40 deletions(-) commit be0270e4d14656d36e76c098ebe822ca2fc34044 Author: Jeffy Chen Date: Sun Feb 5 15:55:00 2017 +0800 drm/rockchip: cdn-dp: Move mutex_init to probe We're trying to lock mutex when cdn-dp shutdown, so we need to make sure the mutex is inited in cdn-dp's probe. Signed-off-by: Jeffy Chen Reviewed-by: Guenter Roeck Reviewed-by: Chris Zhong Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81632df69772efaacc6218281f58d5ed19d5c97e Author: Chris Zhong Date: Sun Feb 5 15:54:59 2017 +0800 drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event The cdn_dp_pd_event_work is using drm_helper_hpd_irq_event to update the connector status, this function is used to update all connectors of drm_device. Therefore, the detect of other connector will be call, when cdn_dp_pd_event_work is triggered, every time. It is not necessary, and it may cause system crash. replace drm_helper_hpd_irq_event with drm_kms_helper_hotplug_event, only update cdn-dp status. Signed-off-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5eb2e6ee97b5e9a8587143db339bc71b28a3e1ca Author: Guenter Roeck Date: Sun Feb 5 15:54:58 2017 +0800 drm/rockchip: cdn-dp: Do not run worker while suspended If the driver is in suspended mode, the dp block may be disabled, and chip registers may not be accessible. Yet, the worker may be triggered in this situation by an extcon event. If that happens, the following crash will be seen. cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] *ERROR* Enable dp failed -19 cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] Connected, not enabled. Enabling cdn Bad mode in Error handler detected, code 0xbf000002 -- SError CPU: 1 PID: 10357 Comm: kworker/1:2 Not tainted 4.4.21-05903-ge0514ea #1 Hardware name: Google Kevin (DT) Workqueue: events cdn_dp_pd_event_work task: ffffffc0cda67080 ti: ffffffc0b9b80000 task.ti: ffffffc0b9b80000 PC is at cdn_dp_clock_reset+0x30/0xa8 LR is at cdn_dp_enable+0x1e0/0x69c ... Call trace: [] cdn_dp_pd_event_work+0x58/0x3f4 [] process_one_work+0x240/0x424 [] worker_thread+0x2fc/0x424 [] kthread+0x10c/0x114 [] ret_from_fork+0x10/0x40 Problem is two-fold: The worker should not run while suspended, and the suspend function should not call cdn_dp_disable() while the worker is running. Signed-off-by: Guenter Roeck Signed-off-by: Sean Paul Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/cdn-dp-core.c | 15 +++++++++++++-- drivers/gpu/drm/rockchip/cdn-dp-core.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) commit 83c132ed46a7e9c8ac17be436ef3892850df8695 Author: Guenter Roeck Date: Sun Feb 5 15:54:57 2017 +0800 drm/rockchip: cdn-dp: Load firmware if no monitor connected If no monitor is connected, suspend/resume cycles result in firmware load errors because the driver attempts to load the firmware while the system is in suspend state. This results in a kernel warning and traceback. Loading the firmware during boot fixes the problem. Note that we can not just call schedule_work conditionally in cdn_dp_pd_event() if the insertion status changed. The problem would still be seen if a monitor is connected for the first time during suspend. Signed-off-by: Guenter Roeck Signed-off-by: Sean Paul Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 1a0f7ed3abe29cff8e652c69a8ad89aec2c40f00 Author: Chris Zhong Date: Sun Feb 5 15:54:56 2017 +0800 drm/rockchip: cdn-dp: add cdn DP support for rk3399 Add support for cdn DP controller which is embedded in the rk3399 SoCs. The DP is compliant with DisplayPort Specification, Version 1.3, This IP is compatible with the rockchip type-c PHY IP. There is a uCPU in DP controller, it need a firmware to work, please put the firmware file to /lib/firmware/rockchip/dptx.bin. The uCPU in charge of aux communication and link training, the host use mailbox to communicate with the ucpu. The dclk pin_pol of vop must not be invert for DP. Signed-off-by: Chris Zhong [seanpaul fixed up some races between the worker and modeset] [seanpaul squashed ~15 commits from chromium.org gerrit] Signed-off-by: Sean Paul [groeck fixed compilation errors when building as module] Signed-off-by: Guenter Roeck drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 2 + drivers/gpu/drm/rockchip/cdn-dp-core.c | 1237 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/cdn-dp-core.h | 110 +++ drivers/gpu/drm/rockchip/cdn-dp-reg.c | 979 +++++++++++++++++++++ drivers/gpu/drm/rockchip/cdn-dp-reg.h | 483 +++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 13 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 9 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 + 9 files changed, 2842 insertions(+), 3 deletions(-) commit 5a2c920c99bcd3a05edff184958c334c6b13c262 Author: Julia Lawall Date: Thu Nov 10 22:10:56 2016 +0100 drm/rockchip: return ERR_PTR instead of NULL rockchip_drm_framebuffer_init is only used in one case, in rockchip_drm_fbdev.c, where its return value is tested using IS_ERR. To enable propagating the reason for the error, change the definition so that it returns an ERR_PTR value. Problem found with the help of Coccinelle. Signed-off-by: Julia Lawall drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a794d768383527408e23f2a1a04ac64c3d2ba6 Author: Chris Zhong Date: Fri Aug 26 20:39:38 2016 -0700 drm/rockchip: vop: make vop register setting take effect The setting of vop registers need a reg_done writing to take effect. In vop_enable the vop return to work by by restoring registers, but the registers do not take effect immediately, it should a vop_cfg_done after it. The same thing is needed by windows_disabled in vop_crtc_disable. Signed-off-by: Chris Zhong drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1cf05ba2cafa079a943c2cbae51b2f2c2e247466 Author: Takashi Iwai Date: Sun Feb 5 08:58:46 2017 +0100 ALSA: pcm: Define dummy snd_pcm_suspend() for CONFIG_PM=n ... so that the driver can avoid ifdef's for the dead PM callbacks. The compiler should optimize them out in anyway. Reported-by: kbuild test robot Signed-off-by: Takashi Iwai include/sound/pcm.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit b556290f9a8386ff6afeec12cae29fbab77321a3 Author: Takashi Iwai Date: Sat Feb 4 22:05:33 2017 +0100 ALSA: x86: Unify local function prefix Use had_ prefix consistently to all local helper functions, as well as had_pcm_ for PCM ops. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 127 ++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 67 deletions(-) commit f4566aa112b86649b74f3d64c21ec2c8a84d5c1d Author: Takashi Iwai Date: Sat Feb 4 21:39:56 2017 +0100 ALSA: x86: Minor cleanup of reset buffer procedure The procedure to reset buffer pointers is performed in two places and still open-coded. Simplify the helper function and use it consistently. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 83af57dd515cf06883f6e954dd0efa9b15b514a6 Author: Takashi Iwai Date: Fri Feb 3 08:50:06 2017 +0100 ALSA: x86: Don't check connection in lowlevel accessors The lowlevel register read/write don't have to be careful about the connection state. It should be checked in the caller side instead. By dropping the check, we can simplify the code, and readability. This patch also refacors the functions slightly: namely, - drop the useless always-zero return values - fold the inline functions to the main accessor functions themselves - move the DP audio hack for AUD_CONFIG to the caller side - simplify snd_intelhad_eanble_audio() and drop the unused had_read_modify() Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 91 ++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 66 deletions(-) commit 412bbe7d5b8cdb103af82c3616149138c50d1efa Author: Takashi Iwai Date: Thu Feb 2 22:03:22 2017 +0100 ALSA: x86: Explicit specify 32bit DMA LPE audio is capable only up to 32bit address, as it seems. Then we should limit the DMA addresses accordingly via dma-mapping API. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c429ceb1e18252122ba96b52e689dcf87103c186 Author: Icenowy Zheng Date: Sun Jan 29 10:33:29 2017 +0800 dmaengine: sun6i: allow build on ARM64 platforms (sun50i) As 64-bit Allwinner H5 SoC has the same DMA engine with H3, the DMA driver should be allowed to be built for ARM64, in order to make it work on H5. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0db1ff222d40f1601c961f0edb86d10426992595 Author: Theodore Ts'o Date: Sun Feb 5 01:28:48 2017 -0500 ext4: add shutdown bit and check for it Add a shutdown bit that will cause ext4 processing to fail immediately with EIO. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 6 ++++++ fs/ext4/ext4_jbd2.c | 11 +++++++++++ fs/ext4/file.c | 12 ++++++++++++ fs/ext4/fsync.c | 3 +++ fs/ext4/ialloc.c | 3 +++ fs/ext4/inline.c | 3 +++ fs/ext4/inode.c | 30 ++++++++++++++++++++++++++++-- fs/ext4/namei.c | 12 ++++++++++++ fs/ext4/page-io.c | 2 +- fs/ext4/super.c | 21 +++++++++++++++++++++ fs/ext4/xattr.c | 3 +++ 11 files changed, 103 insertions(+), 3 deletions(-) commit 9549a168bd500db1a76914e50775f7cd1690acef Author: Theodore Ts'o Date: Sun Feb 5 01:27:48 2017 -0500 ext4: rename s_resize_flags to s_ext4_flags We are currently using one bit in s_resize_flags; rename it in order to allow more of the bits in that unsigned long for other purposes. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 10 +++++++--- fs/ext4/resize.c | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) commit 4753d8a24d4588657bc0a4cd66d4e282dff15c8c Author: Theodore Ts'o Date: Sun Feb 5 01:26:48 2017 -0500 ext4: return EROFS if device is r/o and journal replay is needed If the file system requires journal recovery, and the device is read-ony, return EROFS to the mount system call. This allows xfstests generic/050 to pass. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 97abd7d4b5d9c48ec15c425485f054e1c15e591b Author: Theodore Ts'o Date: Sat Feb 4 23:38:06 2017 -0500 ext4: preserve the needs_recovery flag when the journal is aborted If the journal is aborted, the needs_recovery feature flag should not be removed. Otherwise, it's the journal might not get replayed and this could lead to more data getting lost. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e112666b4959b25a8552d63bc564e1059be703e8 Author: Theodore Ts'o Date: Sat Feb 4 23:14:19 2017 -0500 jbd2: don't leak modified metadata buffers on an aborted journal If the journal has been aborted, we shouldn't mark the underlying buffer head as dirty, since that will cause the metadata block to get modified. And if the journal has been aborted, we shouldn't allow this since it will almost certainly lead to a corrupted file system. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/jbd2/transaction.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eb5efbcb762aee4b454b04f7115f73ccbcf8f0ef Author: Theodore Ts'o Date: Sat Feb 4 23:04:00 2017 -0500 ext4: fix inline data error paths The write_end() function must always unlock the page and drop its ref count, even on an error. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/inline.c | 9 ++++++++- fs/ext4/inode.c | 20 +++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) commit 3976001c9db0354a0bcbd77e324fdf1bc04e110f Merge: 4d6308a 7d4d506 Author: David S. Miller Date: Sat Feb 4 19:58:15 2017 -0500 Merge branch 'ipv6-Improve-user-experience-with-multipath-routes' David Ahern says: ==================== net: ipv6: Improve user experience with multipath routes This series closes a couple of gaps between IPv4 and IPv6 with respect to multipath routes: 1. IPv4 allows all nexthops of multipath routes to be deleted using just the prefix and length; IPv6 only deletes the first nexthop for the route if only the prefix and length are given. 2. IPv4 returns multipath routes encoded in the RTA_MULTIPATH attribute. IPv6 returns a series of routes with the same prefix and length - one for each nexthop. This happens for both dumps and notifications. IPv6 does accept RTA_MULTIPATH encoded routes, but installs them as a series of routes. Patch 1 addresses the first item by allowing IPv6 multipath routes to be deleted using just the prefix and length. Patch 2 addresses the second allowing IPv6 multipath routes to be returned encoded in the RTA_MULTIPATH. Patches 3 and 4 upate the RTM_{NEW,DEL}ROUTE notifications to generate 1 notification with RTA_MULTIPATH where applicable. Patch 5 prints IPv6 addresses in compressed format when showing route replace errors. This was noticed testing REPLACE failures. The end result for multipath routes: 1. Dump - RTA_MULTIPATH used for multipath routes $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:200::/120 metric 1024 nexthop via 2001:db8:1::2 dev eth1 weight 1 nexthop via 2001:db8:2::2 dev eth2 weight 1 ... 2. Route Add - one notification with RTA_MULTIPATH attribute $ ip -6 ro add vrf red 2001:db8:200::/120 nexthop via 2001:db8:1::2 nexthop via 2001:db8:2::2 $ ip mon route 2001:db8:200::/120 table red metric 1024 nexthop via 2001:db8:1::2 dev eth1 weight 1 nexthop via 2001:db8:2::2 dev eth2 weight 1 2. Route Replace - one notification with RTA_MULTIPATH attribute $ ip -6 ro replace vrf red 2001:db8:200::/120 nexthop via 2001:db8:1::16 nexthop via 2001:db8:2::16 $ ip mon route Replaced 2001:db8:200::/120 table red metric 1024 nexthop via 2001:db8:1::16 dev eth1 weight 1 nexthop via 2001:db8:2::16 dev eth2 weight 1 - on a failure after the insertion of the first nexthop (which means the original route has been replaced in the FIB), a notification is sent with the successful nexthops and then the nexthops are deleted with one notification per hop. This is consistent with how it works today except the successful additions are coalesced into 1 notification. 3. Route Delete - delete of entire multipath route using prefix/length only 1 notification is generated: $ ip -6 ro del vrf red 2001:db8:200::/120 $ ip mon route Deleted 2001:db8:200::/120 table red metric 1024 nexthop via 2001:db8:1::16 dev eth1 weight 1 nexthop via 2001:db8:2::16 dev eth2 weight 1 - if a delete request contains nexthops one notification is generated per nexthop deleted. This is unavoidable since IPv6 alllows a single nexthop to be deleted within a multipath route 4. Route Appends - IPv6 allows nexthops to be appended to an existing route. In this case one notification is sent for the new route with the append flag set. $ ip -6 ro append vrf red 2001:db8:200::/120 nexthop via 2001:db8:2::20 nexthop via 2001:db8:1::20 $ ip mon route Append 2001:db8:200::/120 table red metric 1024 nexthop via 2001:db8:1::2 dev eth1 weight 1 nexthop via 2001:db8:2::2 dev eth2 weight 1 nexthop via 2001:db8:2::20 dev eth2 weight 1 nexthop via 2001:db8:1::20 dev eth1 weight 1 - on failure of an append, a notification is sent with the route containing all of the nexthops successfully added, and it is followed by delete notifications as the hops are removed returning the route to its prior state. This is consistent with how it works today except the successful additions are coalesced into 1 notification. Addresses some of the inconsistencies also noted by Roopa at netdev0.1: https://www.netdev01.org/docs/prabhu-linux_ipv4_ipv6_inconsistencies_talk_slides.pdf v4 - changed series to do encoding in 1 patch and updating notificatons in separate patches to make it easier to review and understand - 1 notification for delete when using prefix/length; 1 notification for append - handle delete of a single nexthop without RTA_MULTIPATH in delete request - upated commit messages and cover letter v3 - removed the need for a user API to opt-in to change. Requiring an API just shifts the difference from same API with different behavior to different API to achieve equivalent behavior - route notifications changed to use RTA_MULTIPATH for add and replace - upated commit messages and cover letter v2 - fixed locking in patch 1 as noted by DaveM - changed user API for patch 2 to require an rtmsg with RTM_F_ALL_NEXTHOPS set in rtm_flags - revamped explanation of patch 2 and cover letter ==================== Signed-off-by: David S. Miller commit 7d4d5065ecb0cea9c5815d5e0df5fb586c5ee9b5 Author: David Ahern Date: Thu Feb 2 12:37:12 2017 -0800 net: ipv6: Use compressed IPv6 addresses showing route replace error ip6_print_replace_route_err logs an error if a route replace fails with IPv6 addresses in the full format. e.g,: IPv6: IPV6: multipath route replace failed (check consistency of installed routes): 2001:0db8:0200:0000:0000:0000:0000:0000 nexthop 2001:0db8:0001:0000:0000:0000:0000:0016 ifi 0 Change the message to dump the addresses in the compressed format. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16a16cd35ee29d9bea54dd60e55d9c1cc685a37d Author: David Ahern Date: Thu Feb 2 12:37:11 2017 -0800 net: ipv6: Change notifications for multipath delete to RTA_MULTIPATH If an entire multipath route is deleted using prefix and len (without any nexthops), send a single RTM_DELROUTE notification with the full route using RTA_MULTIPATH. This is done by generating the skb before the route delete when all of the sibling routes are still present but sending it after the route has been removed from the FIB. The skip_notify flag is used to tell the lower fib code not to send notifications for the individual nexthop routes. If a route is deleted using RTA_MULTIPATH for any nexthops or a single nexthop entry is deleted, then the nexthops are deleted one at a time with notifications sent as each hop is deleted. This is necessary given that IPv6 allows individual hops within a route to be deleted. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 3 ++- net/ipv6/route.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) commit 3b1137fe74829e021f483756a648cbb87c8a1b4a Author: David Ahern Date: Thu Feb 2 12:37:10 2017 -0800 net: ipv6: Change notifications for multipath add to RTA_MULTIPATH Change ip6_route_multipath_add to send one notifciation with the full route encoded with RTA_MULTIPATH instead of a series of individual routes. This is done by adding a skip_notify flag to the nl_info struct. The flag is used to skip sending of the notification in the fib code that actually inserts the route. Once the full route has been added, a notification is generated with all nexthops. ip6_route_multipath_add handles 3 use cases: new routes, route replace, and route append. The multipath notification generated needs to be consistent with the order of the nexthops and it should be consistent with the order in a FIB dump which means the route with the first nexthop needs to be used as the route reference. For the first 2 cases (new and replace), a reference to the route used to send the notification is obtained by saving the first route added. For the append case, the last route added is used to loop back to its first sibling route which is the first nexthop in the multipath route. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/netlink.h | 1 + net/ipv6/ip6_fib.c | 6 ++++-- net/ipv6/route.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 54 insertions(+), 3 deletions(-) commit beb1afac518dec5a15dc92ba8f0ca016dcf457b4 Author: David Ahern Date: Thu Feb 2 12:37:09 2017 -0800 net: ipv6: Add support to dump multipath routes via RTA_MULTIPATH attribute IPv6 returns multipath routes as a series of individual routes making their display and handling by userspace different and more complicated than IPv4, putting the burden on the user to see that a route is part of a multipath route and internally creating a multipath route if desired (e.g., libnl does this as of commit 29b71371e764). This patch addresses this difference, allowing multipath routes to be returned using the RTA_MULTIPATH attribute. The end result is that IPv6 multipath routes can be treated and displayed in a format similar to IPv4: $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:200::/120 metric 1024 nexthop via 2001:db8:1::2 dev eth1 weight 1 nexthop via 2001:db8:2::2 dev eth2 weight 1 Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 10 +++++ net/ipv6/route.c | 112 +++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 105 insertions(+), 17 deletions(-) commit 0ae8133586ad1c9be894411aaf8b17bb58c8efe5 Author: David Ahern Date: Thu Feb 2 12:37:08 2017 -0800 net: ipv6: Allow shorthand delete of all nexthops in multipath route IPv4 allows multipath routes to be deleted using just the prefix and length. For example: $ ip ro ls vrf red unreachable default metric 8192 1.1.1.0/24 nexthop via 10.100.1.254 dev eth1 weight 1 nexthop via 10.11.200.2 dev eth11.200 weight 1 10.11.200.0/24 dev eth11.200 proto kernel scope link src 10.11.200.3 10.100.1.0/24 dev eth1 proto kernel scope link src 10.100.1.3 $ ip ro del 1.1.1.0/24 vrf red $ ip ro ls vrf red unreachable default metric 8192 10.11.200.0/24 dev eth11.200 proto kernel scope link src 10.11.200.3 10.100.1.0/24 dev eth1 proto kernel scope link src 10.100.1.3 The same notation does not work with IPv6 because of how multipath routes are implemented for IPv6. For IPv6 only the first nexthop of a multipath route is deleted if the request contains only a prefix and length. This leads to unnecessary complexity in userspace dealing with IPv6 multipath routes. This patch allows all nexthops to be deleted without specifying each one in the delete request. Internally, this is done by walking the sibling list of the route matching the specifications given (prefix, length, metric, protocol, etc). $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:200::/120 via 2001:db8:1::2 dev eth1 metric 1024 pref medium 2001:db8:200::/120 via 2001:db8:2::2 dev eth2 metric 1024 pref medium ... $ ip -6 ro del vrf red 2001:db8:200::/120 $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium ... Because IPv6 allows individual nexthops to be deleted without deleting the entire route, the ip6_route_multipath_del and non-multipath code path (ip6_route_del) have to be discriminated so that all nexthops are only deleted for the latter case. This is done by making the existing fc_type in fib6_config a u16 and then adding a new u16 field with fc_delete_all_nh as the first bit. Suggested-by: Dinesh Dutt Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 4 +++- net/ipv6/route.c | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) commit 4d6308aac3258ecad8444811a16951a919adc131 Author: Eric Dumazet Date: Sat Feb 4 07:49:21 2017 -0800 virtio_net: exploit napi_complete_done() return value Since commit 364b6055738b ("net: busy-poll: return busypolling status to drivers"), napi_complete_done() returns a boolean that can be used by drivers to conditionally rearm interrupts. This patch changes virtio_net to use this boolean to avoid a bit of overhead for busy-poll users. Jason reports about 1.1% improvement for 1 byte TCP_RR (burst 100). Signed-off-by: Eric Dumazet Acked-by: Jason Wang Cc: Michael S. Tsirkin Cc: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/virtio_net.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4d8bb00604b182b62e7786bae0e58e0befeeff85 Author: Piotr Luc Date: Fri Jan 20 14:22:37 2017 +0100 x86/cpufeature: Enable RING3MWAIT for Knights Mill Enable ring 3 MONITOR/MWAIT for Intel Xeon Phi codenamed Knights Mill. We can't guarantee that this (KNM) will be the last CPU model that needs this hack. But, we do recognize that this is far from optimal, and there is an effort to ensure we don't keep doing extending this hack forever. Signed-off-by: Piotr Luc Cc: Piotr.Luc@intel.com Cc: dave.hansen@linux.intel.com Link: http://lkml.kernel.org/r/1484918557-15481-6-git-send-email-grzegorz.andrejczuk@intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 619e96f4bf9d3d79836c324d59803e3f22606a06 Author: Andrew Jeffery Date: Thu Feb 2 14:58:17 2017 +1030 gpio: aspeed: Remove dependence on GPIOF_* macros 1736f75d35e47409ad776273133d0f558a4c8253 is a (v2) patch which had unresolved review comments[1]. Address the comments by removing the use of macros from the consumer header (this patch represents the diff between v2 and v3[2]). [1] https://lkml.org/lkml/2017/1/26/337 [2] https://lkml.org/lkml/2017/1/26/786 Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC") Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 537b94dafce29af6a3e923d216472cfc2f3659af Author: Boris Brezillon Date: Thu Feb 2 14:53:11 2017 +0100 gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper devm_fwnode_get_gpiod_from_child() currently allows GPIO users to request a GPIO that is defined in a child fwnode instead of directly in the device fwnode. Extend this API by adding the devm_fwnode_get_index_gpiod_from_child() helper which does the same except you can also specify an index in case the 'xx-gpios' property describe several GPIOs. Signed-off-by: Boris Brezillon Signed-off-by: Linus Walleij drivers/gpio/devres.c | 20 +++++++++++--------- drivers/gpio/gpiolib.c | 9 +++++---- include/linux/gpio/consumer.h | 31 +++++++++++++++++++++---------- 3 files changed, 37 insertions(+), 23 deletions(-) commit 4b0947974e593d52aace18ca5c7e2746fdebae60 Author: Boris Brezillon Date: Thu Feb 2 14:53:10 2017 +0100 gpio: Rename devm_get_gpiod_from_child() Rename devm_get_gpiod_from_child() into devm_fwnode_get_gpiod_from_child() to reflect the fact that this function is operating on a fwnode object. Signed-off-by: Boris Brezillon Acked-by: Jacek Anaszewski Acked-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/gpio/devres.c | 15 ++++++++------- drivers/input/keyboard/gpio_keys.c | 6 ++++-- drivers/input/keyboard/gpio_keys_polled.c | 8 ++++---- drivers/leds/leds-gpio.c | 5 +++-- drivers/video/fbdev/amba-clcd-nomadik.c | 16 ++++++++-------- include/linux/gpio/consumer.h | 20 ++++++++++---------- 6 files changed, 37 insertions(+), 33 deletions(-) commit e8e1a5b5679b1ae1ff03a3883b011b84e7226171 Author: Axel Lin Date: Thu Feb 2 18:13:06 2017 +0800 gpio: mcp23s08: Select REGMAP/REGMAP_I2C to fix build error This driver now using devm_regmap_init/devm_regmap_init_i2c, so it needs to select REGMAP/REGMAP_I2C accordingly. Fixes: ("3d84fdb3f0b5 gpio: mcp23s08: use regmap") Signed-off-by: Axel Lin Acked-By: Sebastian Reichel Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit e980f62353c697cbf0c4325e43df6e44399aeb64 Author: Christoph Hellwig Date: Sat Feb 4 10:45:03 2017 +0100 dm: don't allow ioctls to targets that don't map to whole devices .. at least for unprivileged users. Before we called into the SCSI ioctl code to allow excemptions for a few SCSI passthrough ioctls, but this is pretty unsafe and except for this call dm knows nothing about SCSI ioctls. As the SCSI ioctl code is now optional, we really don't want to drag it in for DM, and the exception is not very useful anyway. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer Acked-by: Paolo Bonzini Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/md/dm.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a076d1bdc678a2b9157660af8bd691322c0ba3dd Merge: 6e7bc47 3308406 Author: David S. Miller Date: Sat Feb 4 12:13:27 2017 -0500 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-02-03 This series contains updates to i40e/i40evf only. Jake fixes up the driver to not call i40e_vsi_kill_vlan() or i40e_vsi_add_vlan() when the PVID is set or when the VID is less than 1. Cleaned up a check which really is not needed since there is no real reason why we cannot just call i40e_del_mac_all_vlan() directly. Renamed functions to better reflect their actual purpose and how they function in a more clear manner. Bimmy cleans up unused/deprecated macros. Mitch cleans up unused device ids which were intended for use when running Linux VF drivers under Hyper-V, but found to be not needed. Then cleaned up a function that is no longer needed since the client open and close functions were refactored. Adds a sleep without timeout until the reply from the PF driver has been received since the iWARP client cannot continue until the operation has been completed. Tushar Dave fixes an issue seen on SPARC where the use of the 'packed' directive was causing kernel unaligned errors. Alex does a refactor to pull some data off of the stack and store it in the transmit buffer info section of the transmit ring. Alan fixes a bug which was caused by passing a bad register value to the firmware, by refactoring the macro INTRL_USEC_TO_REG into a static inline function. Also added feedback to the user as to the actual interrupt rate limit being used when it differs from the requested limit. ==================== Signed-off-by: David S. Miller commit 1013fe32a63d1139b1b32049ea46c0c462738d8b Author: Geliang Tang Date: Mon Dec 19 22:35:57 2016 +0800 x86/mm/pat: Use rb_entry() To make the code clearer, use rb_entry() instead of open coding it Signed-off-by: Geliang Tang Cc: Masahiro Yamada Cc: Toshi Kani Cc: Paul Gortmaker Link: http://lkml.kernel.org/r/974a91cd4ed2d04c92e4faa4765077e38f248d6b.1482157956.git.geliangtang@gmail.com Signed-off-by: Thomas Gleixner arch/x86/mm/pat_rbtree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0cf5a17159edbebfe3ce2a0ce1dd36bd5809479a Author: Subhransu S. Prusty Date: Wed Jan 11 16:31:02 2017 +0530 ASoC: Intel: Skylake: Report Platform ID info from NHLT This patch create entry in sysfs file system to report the platform_id = "pci-id-oem_id-oem_table_id-oem_revision" for board identification. Signed-off-by: Subhransu S. Prusty Signed-off-by: Sodhi, VunnyX Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-nhlt.c | 42 +++++++++++++++++++++++++++++++++++--- sound/soc/intel/skylake/skl.c | 5 +++++ sound/soc/intel/skylake/skl.h | 2 ++ 3 files changed, 46 insertions(+), 3 deletions(-) commit eaae2ea735933bcf57227956ab9bcd8464d1519a Author: Romain Perier Date: Fri Feb 3 15:37:59 2017 +0100 ASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI The driver is used for Rockchip rk3288-based boards using a configurable analog output (can be an headphone) and the built-in HDMI audio output that is part of the RK3288 SoCs and use the Alsa HDMI codec driver. For some rk3288-based boards the analog output and the hdmi audio are plugged on the same i2s line, so we have to do the same in the driver by using a DAI link CPU to multicodecs. This configuration can be found for example on the Radxa Rock2 or the Firefly-RK3288. This commit is based on the initial work that was done by Sjoerd Simons with some improvements. Signed-off-by: Romain Perier Signed-off-by: Mark Brown .../bindings/sound/rockchip,rk3288-hdmi-analog.txt | 36 +++ sound/soc/rockchip/Kconfig | 9 + sound/soc/rockchip/Makefile | 2 + sound/soc/rockchip/rk3288_hdmi_analog.c | 299 +++++++++++++++++++++ 4 files changed, 346 insertions(+) commit aa00f2c8aff7b85f882b6fd1706fc4241046aba7 Author: Romain Perier Date: Fri Feb 3 15:37:58 2017 +0100 ASoC: Allow to select ES8328_I2C and ES8328_SPI directly Currently, we have to select these symbols explictly via Kconfig, from another entry. If we plan to use generic audio drivers like simple-audio-card, the user need to be able to enable these symbols directly via the menuconfig. This commit also fixes unmet dependencies to SND_SOC_IMX_ES8328 caused by these changes. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 8 ++++---- sound/soc/fsl/Kconfig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit b9b044e2967dd47f0ffe98b5a989fc99c684f6d2 Author: Romain Perier Date: Fri Feb 3 15:37:57 2017 +0100 ASoC: es8328: Add support for slave mode Currently, the function that changes the DAI format only supports master mode. Trying to use a slave mode exits the function with -EINVAL and leave the codec misconfigured. This commits adds support for enabling the slave mode. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 17db9f386632c9c9182a3318b89b742be08c1c2a Author: Hans Holmberg Date: Fri Feb 3 15:29:12 2017 +0100 regulator: gpio: correct default type The driver defaults to voltage, not current, type so correct this in the device tree binding documentation. Signed-off-by: Hans Holmberg Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/gpio-regulator.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba2103467794645e43d8115bef6f4fd18a40b47b Author: Jeeja KP Date: Tue Jan 24 21:49:07 2017 +0530 ASoC: Intel: bxt: add channel map support in bxt_da7219_max98357a machine HDMI registers channel map controls per PCM. As PCMs are not registered during dai_link init callback, store the pcm ids and codec DAIs during this init callback. Register for late probe and call the jack_init API which also registers channel map in the late probe callback handler. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 49 ++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit 6d707a74a79c7698bd3b797586c2f6ae55eae56c Author: Jeeja KP Date: Tue Jan 24 21:49:13 2017 +0530 ASoC: Intel: bxt: Add route change to da7219_max98357a machine To support MST moved pin to port, this changes the routes based on port. So change the route in bxt_da7219_max98357a machine. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 111c2ae1fb46f66e1acd8b077377919954d6aa64 Author: Jeeja KP Date: Tue Jan 24 21:49:09 2017 +0530 ASoC: Intel: Skylake: Add route change to rt286 machine To support MST moved pin to port, this changes the routes based on port. So change the route in skl_rt286 machine. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 51e0f3c825f0f800479aa6fd2066587b425d1010 Author: Jeeja KP Date: Tue Jan 24 21:49:06 2017 +0530 ASoC: Intel: bxt: add channel map support in rt298 machine HDMI registers channel map controls per pcm. As PCMs are not registered during dai_link init callback, store the pcm ids and codec DAIs during this init callback. Register for late probe and call the jack_init API which registers channel map in the late probe callback handler. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 52 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit ab1eea19d0223481fab7345072825d00ce98c339 Author: Jeeja KP Date: Tue Jan 24 21:49:05 2017 +0530 ASoC: hdac_hdmi: Move channel info from pin to PCM structure Channel info is part of the pcm parameter and channel map control is created for each pcm. So move channel info to pcm instead of pin structure and the mutex lock to pcm. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 76 ++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 42 deletions(-) commit 0ad4c07edd413cb64abed217355d51af3649c5a3 Author: Tony Lindgren Date: Thu Feb 2 15:43:57 2017 -0800 regulator: cpcap: Add basic regulator support Many Motorola phones like droid 4 are using a custom PMIC called CPCAP or 6556002. This PMIC is used with several SoCs, I've noticed at least omap3, omap4 and Tegra2 based Motorola phones and tablets using it. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown .../bindings/regulator/cpcap-regulator.txt | 34 ++ drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/cpcap-regulator.c | 464 +++++++++++++++++++++ 4 files changed, 506 insertions(+) commit c1644e3de45deb60f64548d8e112e44b48b0b6e0 Author: John Hsu Date: Fri Feb 3 16:19:24 2017 +0800 ASoC: nau8540: new codec driver Add codec driver of NAU85L40 Signed-off-by: John Hsu Signed-off-by: Mark Brown .../devicetree/bindings/sound/nau8540.txt | 16 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8540.c | 835 +++++++++++++++++++++ sound/soc/codecs/nau8540.h | 222 ++++++ 5 files changed, 1080 insertions(+) commit d6075c2601800a8a45bf6f7c3d87afa8598779b5 Author: Daniel Baluta Date: Wed Feb 1 15:37:35 2017 +0200 ASoC: Drop unnecessary debugfs ifdef This is a relict of 6553bf06a369 ("ASoC: Don't try to register debugfs entries if the parent does not exist"). Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 -- 1 file changed, 2 deletions(-) commit d1642ea717be09039114dad57a8ae08d77f17dfb Author: Dmitry Torokhov Date: Fri Feb 3 15:16:16 2017 -0800 regulator: core: fix typo in regulator_bulk_disable() "re-enable" was misspelled as "reename". Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eaeb4756336ad884a2a8eef3ca9e12845fb5391 Author: Dmitry Torokhov Date: Fri Feb 3 15:16:18 2017 -0800 regulator: core: optimize devm_regulator_bulk_get() When performing this bulk operation, there is no need to track every supply individually. It is more efficient to treat entire group as a single managed resource. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/devres.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit b8c77ff6902baa6ca93ca643bfff2d565801ea30 Author: Dmitry Torokhov Date: Fri Feb 3 15:16:17 2017 -0800 regulator: core: simplify regulator_bulk_force_disable() There is no need to have two loops there, we can store error for subsequent reporting. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit a8bd42a97741aefa5942605fa87418fc8a6c4169 Author: Dmitry Torokhov Date: Fri Feb 3 13:56:02 2017 -0800 regulator: core: have _regulator_get() accept get_type argument Instead of separate "exclusive" and "allow_dummy" arguments, that formed 3 valid combinations (normal, exclusive and optional) and an invalid one, let's accept explicit "get_type", like we did in devm-managed code. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 23 ++++++++++++++--------- drivers/regulator/devres.c | 21 +-------------------- drivers/regulator/internal.h | 10 ++++++++++ 3 files changed, 25 insertions(+), 29 deletions(-) commit 7d245afa24b3ed911f6fd90079d70932ac5e5923 Author: Dmitry Torokhov Date: Fri Feb 3 13:56:00 2017 -0800 regulator: core: remove dead code in _regulator_get() There is no point in assigning value to 'ret' before calling regulator_dev_lookup() as it will clobber 'ret' anyway. Also, let's explicitly return -PROBE_DEFER when try_module_get() fails, instead of relying that earlier initialization of "regulator" carries correct value. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/regulator/core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 07d495dae20717b00881798ef812f7aa53ca0eb3 Author: Alexander Kuleshov Date: Mon Nov 28 13:50:57 2016 +0600 x86/traps: Get rid of unnecessary preempt_disable/preempt_enable_no_resched Exception handlers which may run on IST stack call ist_enter() at the start of execution and ist_exit() in the end. ist_enter() disables preemption unconditionally and ist_exit() enables it. So the extra preempt_disable/enable() pairs nested inside the ist_enter/exit() regions are pointless and can be removed. Signed-off-by: Alexander Kuleshov Cc: Tony Luck Cc: Jianyu Zhan Cc: Paul Gortmaker Cc: Andy Lutomirski Cc: Borislav Petkov Link: http://lkml.kernel.org/r/20161128075057.7724-1-kuleshovmail@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/traps.c | 5 ----- 1 file changed, 5 deletions(-) commit 68dee8e2f2cacc54d038394e70d22411dee89da2 Author: Nikola Pajkovsky Date: Tue Nov 15 09:47:49 2016 +0100 x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0 commit 8fd524b355da ("x86: Kill bad_dma_address variable") has killed bad_dma_address variable and used instead of macro DMA_ERROR_CODE which is always zero. Since dma_addr is unsigned, the statement dma_addr >= DMA_ERROR_CODE is always true, and not needed. arch/x86/kernel/pci-calgary_64.c: In function ‘iommu_free’: arch/x86/kernel/pci-calgary_64.c:299:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (unlikely((dma_addr >= DMA_ERROR_CODE) && (dma_addr < badend))) { Fixes: 8fd524b355da ("x86: Kill bad_dma_address variable") Signed-off-by: Nikola Pajkovsky Cc: iommu@lists.linux-foundation.org Cc: Jon Mason Cc: Muli Ben-Yehuda Link: http://lkml.kernel.org/r/7612c0f9dd7c1290407dbf8e809def922006920b.1479161177.git.npajkovsky@suse.cz Signed-off-by: Thomas Gleixner arch/x86/kernel/pci-calgary_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 530b7a3e216e8a73ba0e0c364dbec330113bf86c Merge: 4ab53a69 753dfd2 Author: Greg Kroah-Hartman Date: Sat Feb 4 09:12:37 2017 +0100 Merge tag 'usb-ci-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Hi Greg, In this series, it adds qualcomm USB2 support. The review process takes more than half of year, thanks for Stephen Boyd's great work. Most of patches at linux-next more than ten days, and the last two small chipidea patches at my tree about one day, no warning is reported from autobuild robot. Thanks. commit 97dd552eb23c83dbf626a6e84666c7e281375d47 Author: Waiman Long Date: Thu Jan 5 15:17:04 2017 -0500 debugobjects: Scale thresholds with # of CPUs On a large SMP systems with hundreds of CPUs, the current thresholds for allocating and freeing debug objects (256 and 1024 respectively) may not work well. This can cause a lot of needless calls to kmem_aloc() and kmem_free() on those systems. To alleviate this thrashing problem, the object freeing threshold is now increased to "1024 + # of CPUs * 32". Whereas the object allocation threshold is increased to "256 + # of CPUs * 4". That should make the debug objects subsystem scale better with the number of CPUs available in the system. Signed-off-by: Waiman Long Cc: Christian Borntraeger Cc: "Du Changbin" Cc: Andrew Morton Cc: Jan Stancek Link: http://lkml.kernel.org/r/1483647425-4135-3-git-send-email-longman@redhat.com Signed-off-by: Thomas Gleixner lib/debugobjects.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit c4b73aabd0989d93b82894417ae501690bd1db5e Author: Waiman Long Date: Thu Jan 5 15:17:03 2017 -0500 debugobjects: Track number of kmem_cache_alloc/kmem_cache_free done New debugfs stat counters are added to track the numbers of kmem_cache_alloc() and kmem_cache_free() function calls to get a sense of how the internal debug objects cache management is performing. Signed-off-by: Waiman Long Cc: Christian Borntraeger Cc: "Du Changbin" Cc: Andrew Morton Cc: Jan Stancek Link: http://lkml.kernel.org/r/1483647425-4135-2-git-send-email-longman@redhat.com Signed-off-by: Thomas Gleixner lib/debugobjects.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 668802c25729a8e3423015c33c05f1c3be3858e9 Author: Waiman Long Date: Mon Jan 30 12:57:43 2017 -0500 tick/broadcast: Reduce lock cacheline contention It was observed that on an Intel x86 system without the ARAT (Always running APIC timer) feature and with fairly large number of CPUs as well as CPUs coming in and out of intel_idle frequently, the lock contention on the tick_broadcast_lock can become significant. To reduce contention, the lock is put into its own cacheline and all the cpumask_var_t variables are put into the __read_mostly section. Running the SP benchmark of the NAS Parallel Benchmarks on a 4-socket 16-core 32-thread Nehalam system, the performance number improved from 3353.94 Mop/s to 3469.31 Mop/s when this patch was applied on a 4.9.6 kernel. This is a 3.4% improvement. Signed-off-by: Waiman Long Cc: "Peter Zijlstra (Intel)" Cc: Andrew Morton Link: http://lkml.kernel.org/r/1485799063-20857-1-git-send-email-longman@redhat.com Signed-off-by: Thomas Gleixner include/linux/cpumask.h | 7 ++++++- kernel/time/tick-broadcast.c | 15 ++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) commit e16fd002afe2b16d828bbf738b8a81a185fe9272 Author: Grzegorz Andrejczuk Date: Fri Jan 20 14:22:36 2017 +0100 x86/cpufeature: Enable RING3MWAIT for Knights Landing Enable ring 3 MONITOR/MWAIT for Intel Xeon Phi x200 codenamed Knights Landing. Presence of this feature cannot be detected automatically (by reading any other MSR) therefore it is required to explicitly check for the family and model of the CPU before attempting to enable it. Signed-off-by: Grzegorz Andrejczuk Cc: Piotr.Luc@intel.com Cc: dave.hansen@linux.intel.com Link: http://lkml.kernel.org/r/1484918557-15481-5-git-send-email-grzegorz.andrejczuk@intel.com Signed-off-by: Thomas Gleixner Documentation/admin-guide/kernel-parameters.txt | 4 +++ arch/x86/kernel/cpu/intel.c | 37 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 1d12d0ef0194ccc4dcebed3d96bb2301b26fc3ee Author: Grzegorz Andrejczuk Date: Fri Jan 20 14:22:35 2017 +0100 x86/cpufeature: Add RING3MWAIT to CPU features Add software-defined CPUID bit for the non-architectural ring 3 MONITOR/MWAIT feature. Signed-off-by: Grzegorz Andrejczuk Cc: Piotr.Luc@intel.com Cc: dave.hansen@linux.intel.com Link: http://lkml.kernel.org/r/1484918557-15481-4-git-send-email-grzegorz.andrejczuk@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0274f9551eff55dbd63b5f5f3efe30fe5d4c801c Author: Grzegorz Andrejczuk Date: Fri Jan 20 14:22:34 2017 +0100 x86/elf: Add HWCAP2 to expose ring 3 MONITOR/MWAIT Introduce ELF_HWCAP2 variable for x86 and reserve its bit 0 to expose the ring 3 MONITOR/MWAIT. HWCAP variables contain bitmasks which can be used by userspace applications to detect which instruction sets are supported by CPU. On x86 architecture information about CPU capabilities can be checked via CPUID instructions, unfortunately presence of ring 3 MONITOR/MWAIT feature cannot be checked this way. ELF_HWCAP cannot be used as well, because on x86 it is set to CPUID[1].EDX which means that all bits are reserved there. HWCAP2 approach was chosen because it reuses existing solution present in other architectures, so only minor modifications are required to the kernel and userspace applications. When ELF_HWCAP2 is defined kernel maps it to AT_HWCAP2 during the start of the application. This way the ring 3 MONITOR/MWAIT feature can be detected using getauxval() API in a simple and fast manner. ELF_HWCAP2 type is u32 to be consistent with x86 ELF_HWCAP type. Signed-off-by: Grzegorz Andrejczuk Cc: Piotr.Luc@intel.com Cc: dave.hansen@linux.intel.com Link: http://lkml.kernel.org/r/1484918557-15481-3-git-send-email-grzegorz.andrejczuk@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/elf.h | 9 +++++++++ arch/x86/include/uapi/asm/hwcap2.h | 7 +++++++ arch/x86/kernel/cpu/common.c | 3 +++ 3 files changed, 19 insertions(+) commit ae47eda905e61ef6ba0b6f79b967c9de15ca4f8e Author: Grzegorz Andrejczuk Date: Fri Jan 20 14:22:33 2017 +0100 x86/msr: Add MSR_MISC_FEATURE_ENABLES and RING3MWAIT bit Define new MSR MISC_FEATURE_ENABLES (0x140). On supported CPUs if bit 1 of this MSR is set, then calling MONITOR and MWAIT instructions outside of ring 0 will not cause invalid-opcode exception. The MSR MISC_FEATURE_ENABLES is not yet documented in the SDM. Here is the relevant documentation: Hex Dec Name Scope 140H 320 MISC_FEATURE_ENABLES Thread 0 Reserved 1 If set to 1, the MONITOR and MWAIT instructions do not cause invalid-opcode exceptions when executed with CPL > 0 or in virtual-8086 mode. If MWAIT is executed when CPL > 0 or in virtual-8086 mode, and if EAX indicates a C-state other than C0 or C1, the instruction operates as if EAX indicated the C-state C1. 63:2 Reserved Signed-off-by: Grzegorz Andrejczuk Cc: Piotr.Luc@intel.com Cc: dave.hansen@linux.intel.com Link: http://lkml.kernel.org/r/1484918557-15481-2-git-send-email-grzegorz.andrejczuk@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 5 +++++ 1 file changed, 5 insertions(+) commit 1cfd3ba0c146a165951cedf293929a4983a45ae3 Author: Andy Shevchenko Date: Thu Jan 19 18:39:49 2017 +0200 platform/x86: intel_mid_powerbtn: Remove snail address The snail address is subject to change. This already happened once. Remove the address completely from the file to avoid potential noise when update. While here, adjust copyright years and list authors. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7591b9f52d6d119fe53fa80ae9e9943a45c28f15 Author: Andy Shevchenko Date: Thu Jan 19 18:39:48 2017 +0200 platform/x86: intel_mid_powerbtn: Sort headers alphabetically Sort header inclusion block in alphabetical order. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fdde1a82265ba635284c27f3ab65be461487ff00 Author: Andy Shevchenko Date: Thu Jan 19 18:39:47 2017 +0200 platform/x86: intel_mid_powerbtn: Join string literals There is no need and bad practice for debugging to split string literals. Join them back. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 6a0f998856383f4becfef585c18bb8949c34a1f0 Author: Andy Shevchenko Date: Thu Jan 19 18:39:46 2017 +0200 platform/x86: intel_mid_powerbtn: Enable driver for Merrifield Enable this driver to handle events from Basin Cove PMIC, which is installed on Intel Merrifield platform. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 553e9c1861b7f91492eb6e209adff81507624fa6 Author: Andy Shevchenko Date: Thu Jan 19 18:39:45 2017 +0200 platform/x86: intel_mid_powerbtn: Acknowledge interrupts Some platforms require interrupt to be acknowledged by clearing MSIC_PWRBTNM bit in interrupt level 1 mask register. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 1 + 1 file changed, 1 insertion(+) commit 4b819c6d5f3c9f9efb8ab334f735f6a223e84d14 Author: Andy Shevchenko Date: Thu Jan 19 18:39:44 2017 +0200 platform/x86: intel_mid_powerbtn: Factor out mfld_ack() Move Intel Medfield specific code to another callback, which will be used later. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 18934eceed987432ec90db46196e9653fe704d80 Author: Andy Shevchenko Date: Thu Jan 19 18:39:43 2017 +0200 platform/x86: intel_mid_powerbtn: Introduce driver data This is preparatory patch to extend the driver in order to support other Intel MID platform. Here the new driver data structure is introduced with split of ->pbstat() callback. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 62 ++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 6 deletions(-) commit 48b44529d35f715362ea93f070ca1ac938e205e3 Author: Andy Shevchenko Date: Thu Jan 19 18:39:42 2017 +0200 platform/x86: intel_mid_powerbtn: Substitute mfld by mid Replace all occurrences of mfld by mid to emphasize that driver is used for Intel MID platforms. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 07d9089d3989150a80ff2083799929354d7e6c53 Author: Andy Shevchenko Date: Thu Jan 19 18:39:41 2017 +0200 platform/x86: intel_mid_powerbtn: Convert to use devm_*() Convert driver to use managed resources. This eliminates error path boilerplate and makes code neat. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_powerbtn.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 4ec567b8dda20d0129b60da63a472246f09e03d4 Author: Srinivas Pandruvada Date: Wed Jan 18 10:29:15 2017 -0800 platform/x86: Support Turbo Boost Max 3.0 for non HWP systems On platforms supporting Intel Turbo Boost Max Technology 3.0, the maximum turbo frequencies (turbo ratio) of some cores in a CPU package may be higher than the other cores in the same package. In that case, better performance can be achieved by making the scheduler prefer to run tasks on the CPUs with higher max turbo frequencies. On Intel® Broadwell Xeon systems, it is optional to turn on HWP (Hardware P-States). When HWP is not turned on, the BIOS doesn't present required CPPC (Collaborative Processor Performance Control) tables. This table is used to get the per CPU core maximum performance ratio and inform scheduler (in cpufreq/intel_pstate driver). On such systems the maximum performance ratio can be read via over clocking (OC) mailbox interface for each CPU. This interface is not architectural and can change for every model of processors. This driver reads maximum performance ratio of each CPU and set up the scheduler priority metrics. In this way scheduler can prefer CPU with higher performance to schedule tasks. Signed-off-by: Srinivas Pandruvada Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 10 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_turbo_max_3.c | 152 +++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+) commit a28c7e93bf26f16948065dbbf4cbe3c457386f41 Author: Michał Kępień Date: Wed Jan 11 09:59:33 2017 +0100 platform/x86: fujitsu-laptop: make hotkey handling functions more similar Make two minor tweaks to acpi_fujitsu_hotkey_press() to make it more similar to acpi_fujitsu_hotkey_release(): * call vdbg_printk() after reporting the input event, * return immediately when kfifo_in_locked() fails. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Darren Hart drivers/platform/x86/fujitsu-laptop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 29544f03e52b2a6670ae1f1331033feefa216536 Author: Michał Kępień Date: Wed Jan 11 09:59:32 2017 +0100 platform/x86: fujitsu-laptop: break up complex loop condition The loop condition in acpi_fujitsu_hotkey_release() includes an assignment, a four-argument function call and a comparison, making it hard to read. Separate the assignment from the comparison to improve readability. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Darren Hart drivers/platform/x86/fujitsu-laptop.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2451d19d5d6a4659e5345024efdef3fc5336938a Author: Michał Kępień Date: Wed Jan 11 09:59:31 2017 +0100 platform/x86: fujitsu-laptop: move keycode processing to separate functions acpi_fujitsu_hotkey_notify() is pretty deeply nested, which hurts readability. Move the keycode processing part to two separate functions to make the code easier to understand and save a few line breaks. Rename variable keycode_r to keycode as there is no longer any need to differentiate between the two. Tweak indentations to make checkpatch happy. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Darren Hart drivers/platform/x86/fujitsu-laptop.c | 76 ++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 33 deletions(-) commit eb357cbaf7018342699386e93d292233181e8262 Author: Michał Kępień Date: Wed Jan 11 09:59:30 2017 +0100 platform/x86: fujitsu-laptop: decrease indentation in acpi_fujitsu_hotkey_notify() acpi_fujitsu_hotkey_notify() is pretty deeply nested, which hurts readability. Strip off one level of indentation by returning early when the event code supplied as argument is not ACPI_FUJITSU_NOTIFY_CODE1. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Darren Hart drivers/platform/x86/fujitsu-laptop.c | 152 +++++++++++++++++----------------- 1 file changed, 75 insertions(+), 77 deletions(-) commit 5c461e8e74a6a67cbd31ce0c9db5f8d0a41dccdd Author: Michał Kępień Date: Mon Jan 9 14:14:17 2017 +0100 platform/x86: fujitsu-laptop: simplify logolamp_get() Now that call_fext_func() is invoked by logolamp_set() for both LOGOLAMP_POWERON and LOGOLAMP_ALWAYS for every brightness value, logolamp_get() can be simplified to decrease indentation and number of local variables. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Andy Shevchenko drivers/platform/x86/fujitsu-laptop.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit dcb50b351646c3549fc28b5857d1414ec6487615 Author: Michał Kępień Date: Mon Jan 9 14:14:16 2017 +0100 platform/x86: fujitsu-laptop: rework logolamp_set() to properly handle errors Potential errors returned by some call_fext_func() calls inside logolamp_set() are currently ignored. Rework logolamp_set() to properly handle them. This causes one more call_fext_func() call to be made in the LED_OFF case, though one could argue that this is logically the right thing to do (even though the extra call is not needed to shut the LED off). Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Andy Shevchenko drivers/platform/x86/fujitsu-laptop.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 565ebe8073f84ced436a18e76a5ba8e6bb73dfb3 Author: Viresh Kumar Date: Fri Feb 3 15:26:25 2017 +0530 cpufreq: Fix typos in comments - s/freqnency/frequency/ - s/accomodating/accommodating/ Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki include/linux/cpufreq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fc7554ae5cc381e18bffa2469333ad28453d557 Author: Srinivas Pandruvada Date: Thu Jan 19 15:03:14 2017 -0800 cpufreq: intel_pstate: Calculate guaranteed performance for HWP When HWP is active, turbo activation ratio is not used to calculate max non turbo ratio. But on these systems the max non turbo ratio is decided by config TDP settings. This change removes usage of MSR_TURBO_ACTIVATION_RATIO for HWP systems, instead directly use TDP ratios, when more than one TDPs are available. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 75 +++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 26 deletions(-) commit 4e5d3f713b619e404618fc280ce861e473605f85 Author: Srinivas Pandruvada Date: Wed Jan 18 10:48:24 2017 -0800 cpufreq: intel_pstate: Make HWP limits compatible with legacy Under HWP the performance limits are calculated using max_perf_pct and min_perf_pct using possible performance, not available performance. The available performance can be reduced by no_turbo setting. To make compatible with legacy mode, use max/min performance percentage with respect to available performance. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7d9a8a9f4ee682e299fa2acee48031713aef1b76 Author: Srinivas Pandruvada Date: Wed Jan 18 10:48:23 2017 -0800 cpufreq: intel_pstate: Lower frequency than expected under no_turbo When turbo is not disabled by BIOS, but user disabled from intel P-State sysfs and changes max/min using cpufreq sysfs, the resultant frequency is lower than what user requested. The reason for this, when the perf limits are calculated in set_policy() callback, they are with reference to max cpu frequency (turbo frequency ), but when enforced in the intel_pstate_get_min_max() they are with reference to max available performance as documented in the intel_pstate documentation (in this case max non turbo P-State). This needs similar change as done in intel_cpufreq_verify_policy() for passive mode. Set policy->cpuinfo.max_freq based on the turbo status. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fb1fe1041c04ee5ba362cf239e83a7c559beb0f3 Author: Rafael J. Wysocki Date: Thu Jan 5 02:53:12 2017 +0100 cpufreq: intel_pstate: Operation mode control from sysfs Make it possible to change the operation mode of intel_pstate with the help of a new sysfs attribute called "status". There are three possible configurations that can be selected using this attribute: "off" - The driver is not in use at this time. "active" - The driver works as a P-state governor (default). "passive" - The driver works as a regular cpufreq one and collaborates with the generic cpufreq governors (it sets P-states as requested by those governors). [This is the same mode the driver can be started in by passing intel_pstate=passive in the kernel command line.] The current setting is returned by reads from this attribute. Writing one of the above strings to it changes the operation mode as indicated by that string, if possible. If HW-managed P-states (HWP) feature is enabled, it is not possible to change the driver's operation mode and attempts to write to this attribute will fail. Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/intel-pstate.txt | 15 +++ drivers/cpufreq/intel_pstate.c | 224 +++++++++++++++++++++++++------- 2 files changed, 195 insertions(+), 44 deletions(-) commit 0c30b65b3c8e5b8c72f39497aa8c61a662b6bcc0 Author: Rafael J. Wysocki Date: Wed Jan 11 04:12:16 2017 +0100 cpufreq: intel_pstate: Expose global sysfs attributes upfront Expose the intel_pstate's global sysfs attributes before registering the driver to prepare for the addition of an attribute that also will have to work if the driver is not registered. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 68 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) commit 052f573f5cca0ce0a16de409012660565bd792df Author: Viresh Kumar Date: Thu Jan 5 11:34:31 2017 +0530 cpufreq: Remove CPUFREQ_START notifier event Its not used anymore, remove it. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 3 --- drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 3 --- include/linux/cpufreq.h | 1 - 3 files changed, 7 deletions(-) commit fa29ae5f221860e22a7346d89ae38a28ed104045 Author: Viresh Kumar Date: Mon Jan 30 09:59:57 2017 +0530 ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START acpi_processor_ppc_notifier() can live without using CPUFREQ_START (which is gonna be removed soon), as it is only used while setting ignore_ppc to 0. This can be done with the help of "ignore_ppc < 0" check alone. The notifier function anyway ignores all events except CPUFREQ_ADJUST and dropping CPUFREQ_START wouldn't harm at all. Once CPUFREQ_START event is removed from the cpufreq core, acpi_processor_ppc_notifier() will get called only for CPUFREQ_NOTIFY or CPUFREQ_ADJUST event. Drop the return statement from the first if block to make sure we don't ignore any such events. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b12f7a2b01f7adebb9982a6547f4e930914829a9 Author: Shilpasri G Bhat Date: Tue Jan 3 16:36:00 2017 +0530 cpufreq: powernv: Add boost files to export ultra-turbo frequencies In P8+, Workload Optimized Frequency(WOF) provides the capability to boost the cpu frequency based on the utilization of the other cpus running in the chip. The On-Chip-Controller(OCC) firmware will control the achievability of these frequencies depending on the power headroom available in the chip. Currently the ultra-turbo frequencies provided by this feature are exported along with the turbo and sub-turbo frequencies as scaling_available_frequencies. This patch will export the ultra-turbo frequencies separately as scaling_boost_frequencies in WOF enabled systems. This patch will add the boost sysfs file which can be used to disable/enable ultra-turbo frequencies. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernv-cpufreq.c | 50 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit 7de962c0c79a810585eb323b90561b5923614ec8 Author: Viresh Kumar Date: Fri Jan 6 11:08:05 2017 +0530 cpufreq: Documentation: Updates based on current code The cpufreq core has gone though lots of updates in recent times, but on many occasions the documentation wasn't updated along with the code. This patch tries to catchup the documentation with the code. Also add Rafael and Viresh as the contributors to the documentation. Based on a patch from Claudio Scordino. Signed-off-by: Claudio Scordino Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/core.txt | 24 +++-- Documentation/cpu-freq/cpu-drivers.txt | 177 +++++++++++++++++-------------- Documentation/cpu-freq/cpufreq-stats.txt | 24 ++--- Documentation/cpu-freq/governors.txt | 117 +++++++++++--------- Documentation/cpu-freq/index.txt | 23 ++-- Documentation/cpu-freq/user-guide.txt | 60 ++++++----- 6 files changed, 232 insertions(+), 193 deletions(-) commit 4e660759becfe91a8fb8a867a01dcb5e6f67dd26 Author: Viresh Kumar Date: Fri Jan 6 11:08:04 2017 +0530 cpufreq: Documentation: Minor reformatting This patch doesn't change the content of the documentation, but rather reformat it to make it more readable. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/governors.txt | 205 +++++++++++++++++++---------------- 1 file changed, 112 insertions(+), 93 deletions(-) commit 801e0f378fe7d53f87246037bf40567277275418 Author: Viresh Kumar Date: Thu Jan 5 13:57:41 2017 +0530 cpufreq: Remove CONFIG_CPU_FREQ_STAT_DETAILS config option This doesn't have any benefit apart from saving a small amount of memory when it is disabled. The ifdef hackery in the code makes it dirty unnecessarily. Clean it up by removing the Kconfig option completely. Few defconfigs are also updated and CONFIG_CPU_FREQ_STAT_DETAILS is replaced with CONFIG_CPU_FREQ_STAT now in them, as users wanted stats to be enabled. Signed-off-by: Viresh Kumar Acked-by: Gregory CLEMENT Reviewed-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/configs/mvebu_v5_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/shmobile_defconfig | 2 +- arch/mips/configs/lemote2f_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/sh/configs/sh7785lcr_32bit_defconfig | 2 +- drivers/cpufreq/Kconfig | 8 -------- drivers/cpufreq/cpufreq_stats.c | 14 -------------- 11 files changed, 7 insertions(+), 31 deletions(-) commit f9f41e3ef99ac9d4e91b07634362e393fb929aad Author: Viresh Kumar Date: Thu Jan 5 10:17:27 2017 +0530 cpufreq: Remove policy create/remove notifiers Those were added by: commit fcd7af917abb ("cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly") but aren't used anymore since: commit 1aefc75b2449 ("cpufreq: stats: Make the stats code non-modular"). Remove them. Also remove the redundant parameter to the respective routines. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 16 +++++----------- include/linux/cpufreq.h | 2 -- 2 files changed, 5 insertions(+), 13 deletions(-) commit 4dd2eb633598cb6a5a0be2fd9a2be0819f5eeb5f Author: Hou Tao Date: Fri Feb 3 14:39:07 2017 -0800 xfs: reset b_first_retry_time when clear the retry status of xfs_buf_t After successful IO or permanent error, b_first_retry_time also needs to be cleared, else the invalid first retry time will be used by the next retry check. Signed-off-by: Hou Tao Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 1 + 1 file changed, 1 insertion(+) commit 6e7bc478c9a006c701c14476ec9d389a484b4864 Author: Eric Dumazet Date: Fri Feb 3 14:29:42 2017 -0800 net: skb_needs_check() accepts CHECKSUM_NONE for tx My recent change missed fact that UFO would perform a complete UDP checksum before segmenting in frags. In this case skb->ip_summed is set to CHECKSUM_NONE. We need to add this valid case to skb_needs_check() Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller net/core/dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 79e7fff47b7bb4124ef970a13eac4fdeddd1fc25 Author: Eric Dumazet Date: Thu Feb 2 18:43:28 2017 -0800 net: remove support for per driver ndo_busy_poll() We added generic support for busy polling in NAPI layer in linux-4.5 No network driver uses ndo_busy_poll() anymore, we can get rid of the pointer in struct net_device_ops, and its use in sk_busy_loop() Saves NETIF_F_BUSY_POLL features bit. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/netdev_features.h | 2 -- include/linux/netdevice.h | 3 --- net/core/dev.c | 15 --------------- net/core/ethtool.c | 1 - 4 files changed, 21 deletions(-) commit 7a655c6324a8968ea2f027bf3660c87c42ac3de4 Author: David S. Miller Date: Fri Feb 3 17:28:21 2017 -0500 enic: Remove local ndo_busy_poll() implementation. We do polling generically these days. Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 66 ++---------------------- drivers/net/ethernet/cisco/enic/vnic_rq.h | 78 ----------------------------- 2 files changed, 5 insertions(+), 139 deletions(-) commit 508aac6dee025f93eab1e806d20762ea6327b43d Author: Eric Dumazet Date: Thu Feb 2 16:59:18 2017 -0800 ixgbevf: get rid of custom busy polling code In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of code, we also remove one lock operation in fast path, and allow GRO to do its job. Signed-off-by: Eric Dumazet Cc: Jeff Kirsher Acked-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbevf/ethtool.c | 38 -------- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 113 ---------------------- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 64 ------------ 3 files changed, 215 deletions(-) commit 3ffc1af576550ec61d35668485954e49da29d168 Author: Eric Dumazet Date: Thu Feb 2 16:26:39 2017 -0800 ixgbe: get rid of custom busy polling code In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of code, we also remove one lock operation in fast path, and allow GRO to do its job. Signed-off-by: Eric Dumazet Cc: Jeff Kirsher Acked-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe.h | 125 ----------------------- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 40 -------- drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 5 - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 59 +---------- 4 files changed, 5 insertions(+), 224 deletions(-) commit 52e01b84a244473074fc0612c169e2e043d58b01 Merge: e60df62 2851940 Author: David S. Miller Date: Fri Feb 3 16:58:20 2017 -0500 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, they are: 1) Stash ctinfo 3-bit field into pointer to nf_conntrack object from sk_buff so we only access one single cacheline in the conntrack hotpath. Patchset from Florian Westphal. 2) Don't leak pointer to internal structures when exporting x_tables ruleset back to userspace, from Willem DeBruijn. This includes new helper functions to copy data to userspace such as xt_data_to_user() as well as conversions of our ip_tables, ip6_tables and arp_tables clients to use it. Not surprinsingly, ebtables requires an ad-hoc update. There is also a new field in x_tables extensions to indicate the amount of bytes that we copy to userspace. 3) Add nf_log_all_netns sysctl: This new knob allows you to enable logging via nf_log infrastructure for all existing netnamespaces. Given the effort to provide pernet syslog has been discontinued, let's provide a way to restore logging using netfilter kernel logging facilities in trusted environments. Patch from Michal Kubecek. 4) Validate SCTP checksum from conntrack helper, from Davide Caratti. 5) Merge UDPlite conntrack and NAT helpers into UDP, this was mostly a copy&paste from the original helper, from Florian Westphal. 6) Reset netfilter state when duplicating packets, also from Florian. 7) Remove unnecessary check for broadcast in IPv6 in pkttype match and nft_meta, from Liping Zhang. 8) Add missing code to deal with loopback packets from nft_meta when used by the netdev family, also from Liping. 9) Several cleanups on nf_tables, one to remove unnecessary check from the netlink control plane path to add table, set and stateful objects and code consolidation when unregister chain hooks, from Gao Feng. 10) Fix harmless reference counter underflow in IPVS that, however, results in problems with the introduction of the new refcount_t type, from David Windsor. 11) Enable LIBCRC32C from nf_ct_sctp instead of nf_nat_sctp, from Davide Caratti. 12) Missing documentation on nf_tables uapi header, from Liping Zhang. 13) Use rb_entry() helper in xt_connlimit, from Geliang Tang. ==================== Signed-off-by: David S. Miller commit e60df62492efd0b38e9575272d4621e6739facfd Merge: 3d67576 7aa0f5a Author: David S. Miller Date: Fri Feb 3 16:35:44 2017 -0500 Merge branch 'mlxsw-Introduce-TC-Flower-offload-using-TCAM' Jiri Pirko says: ==================== mlxsw: Introduce TC Flower offload using TCAM This patchset introduces support for offloading TC cls_flower and actions to Spectrum TCAM-base policy engine. The patchset contains patches to allow work with flexible keys and actions which are used in Spectrum TCAM. It also contains in-driver infrastructure for offloading TC rules to TCAM HW. The TCAM management code is simple and limited for now. It is going to be extended as a follow-up work. The last patch uses the previously introduced infra to allow to implement cls_flower offloading. Initially, only limited set of match-keys and only a drop and forward actions are supported. As a dependency, this patchset introduces parman - priority array area manager - as a library. v1->v2: - patch11: - use __set_bit and __test_and_clear_bit as suggested by DaveM - patch16: - Added documentation to the API functions as suggested by Tom Herbert - patch17: - use __set_bit and __clear_bit as suggested by DaveM ==================== Signed-off-by: David S. Miller commit 7aa0f5aa9030aa97e9d83d834fc977664cf1b066 Author: Jiri Pirko Date: Fri Feb 3 10:29:09 2017 +0100 mlxsw: spectrum: Implement TC flower offload Extend the existing setup_tc ndo call and allow to offload cls_flower rules. Only limited set of dissector keys and actions are supported now. Use previously introduced ACL infrastructure to offload cls_flower rules to be processed in the HW. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 4 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 15 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 + .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 309 +++++++++++++++++++++ 4 files changed, 331 insertions(+), 3 deletions(-) commit 69ca05ce9dec2cc95070df7f1f10ea6c9c12d237 Author: Jiri Pirko Date: Fri Feb 3 10:29:08 2017 +0100 sched: cls_flower: expose priority to offloading netdevice The driver that offloads flower rules needs to know with which priority user inserted the rules. So add this information into offload struct. Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller include/net/pkt_cls.h | 1 + net/sched/cls_flower.c | 3 +++ 2 files changed, 4 insertions(+) commit 22a677661f5624539d394f681276171f92d714df Author: Jiri Pirko Date: Fri Feb 3 10:29:07 2017 +0100 mlxsw: spectrum: Introduce ACL core with simple TCAM implementation Add ACL core infrastructure for Spectrum ASIC. This infra provides an abstraction layer over specific HW implementations. There are two basic objects used. One is "rule" and the second is "ruleset" which serves as a container of multiple rules. In general, within one ruleset the rules are allowed to have multiple priorities and masks. Each ruleset is bound to either ingress or egress a of port netdevice. The initial TCAM implementation is very simple and limited. It utilizes parman lsort manager to take care of TCAM region layout. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 17 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 100 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 572 +++++++++++ .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 1084 ++++++++++++++++++++ 6 files changed, 1769 insertions(+), 8 deletions(-) commit 44091d29f2075972aede47ef17e1e70db3d51190 Author: Jiri Pirko Date: Fri Feb 3 10:29:06 2017 +0100 lib: Introduce priority array area manager This introduces a infrastructure for management of linear priority areas. Priority order in an array matters, however order of items inside a priority group does not matter. As an initial implementation, L-sort algorithm is used. It is quite trivial. More advanced algorithm called P-sort will be introduced as a follow-up. The infrastructure is prepared for other algos. Alongside this, a testing module is introduced as well. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller MAINTAINERS | 8 + include/linux/parman.h | 76 ++++++++++ lib/Kconfig | 3 + lib/Kconfig.debug | 10 ++ lib/Makefile | 3 + lib/parman.c | 376 ++++++++++++++++++++++++++++++++++++++++++++++ lib/test_parman.c | 395 +++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 871 insertions(+) commit b862815c3ee7b49ec20a9ab25da55a5f0bcbb95e Author: Jiri Pirko Date: Fri Feb 3 10:29:05 2017 +0100 list: introduce list_for_each_entry_from_reverse helper Similar to list_for_each_entry_continue and its reverse variant list_for_each_entry_continue_reverse, introduce reverse helper for list_for_each_entry_from. Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/list.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8708ecf01d454607f15fe1b378c8b88de3b9c34b Author: Jiri Pirko Date: Fri Feb 3 10:29:04 2017 +0100 mlxsw: resources: Add ACL related resources Add couple of resource limits related to ACL. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit b876b9aaadce9c6bb47508c4b31efc474b70f179 Author: Jiri Pirko Date: Fri Feb 3 10:29:03 2017 +0100 mlxsw: spectrum: Introduce basic set of flexible key blocks Introduce basic set of Spectrum flexible key blocks. It contains blocks needed to carry all elements defined so far. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../mellanox/mlxsw/spectrum_acl_flex_keys.h | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 4cda7d8d7098e2b2c2c496ffb77b18f8b685e80d Author: Jiri Pirko Date: Fri Feb 3 10:29:02 2017 +0100 mlxsw: core: Introduce flexible actions support Each entry which is matched during ACL lookup points to an action set. This action set contains up to three separate actions. If more actions are needed to be chained, the extended set is created to hold them in KVD linear area. This patch implements handling of sets and encoding of actions. Currectly, only two actions are supported. Drop and forward. Forward action uses PBS pointer to KVD linear area, so the action code needs to take care of this as well. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +- .../mellanox/mlxsw/core_acl_flex_actions.c | 685 +++++++++++++++++++++ .../mellanox/mlxsw/core_acl_flex_actions.h | 66 ++ 3 files changed, 753 insertions(+), 1 deletion(-) commit 3f1a84e6962c7fd0703b9bb5db0355d1c28b201a Author: Jiri Pirko Date: Fri Feb 3 10:29:01 2017 +0100 mlxsw: core: Introduce flexible keys support Hardware supports matching on so called "flexible keys". The idea is to assemble an optimal key to use for matching according to the fields in packet (elements) requested by user. Certain sets of elements are combined into pre-defined blocks. There is a picker to find needed blocks. Keys consist of 1..n blocks. Alongside with that, an initial portion of elements is introduced in order to be able to offload basic cls_flower rules. Picked keys are cached so multiple rules could share them. There is an encode function provided that takes care of encoding key and mask values according to given key. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +- .../ethernet/mellanox/mlxsw/core_acl_flex_keys.c | 475 +++++++++++++++++++++ .../ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 238 +++++++++++ 3 files changed, 714 insertions(+), 1 deletion(-) commit e3426e12fee11cb7949b65428955127ca3dcb433 Author: Jiri Pirko Date: Fri Feb 3 10:29:00 2017 +0100 mlxsw: reg: Add Policy-Engine Extended Flexible Action Register PEFA register is used for accessing an extended flexible action entry in the central KVD Linear Database. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 39 ++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) commit d120649d86852f00d2c8afc943d1f480d6ed2703 Author: Jiri Pirko Date: Fri Feb 3 10:28:59 2017 +0100 mlxsw: reg: Add Policy-Engine Policy Based Switching Register The PPBS register retrieves and sets Policy Based Switching Table entries. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 937b682cc0bcebe19df7911f3697be7fd8c5dee6 Author: Jiri Pirko Date: Fri Feb 3 10:28:58 2017 +0100 mlxsw: reg: Add Policy-Engine Rules Copy Register The PRCR register is used for accessing rules within a TCAM region. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit af7170eee6ee269fe1d4f5cbd276bafc2ce064b8 Author: Jiri Pirko Date: Fri Feb 3 10:28:57 2017 +0100 mlxsw: reg: Add Policy-Engine Port Binding Table The PPBT is used for configuration of the Port Binding Table. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 0171cdec03bddcc00de50f318d253ff2da821c41 Author: Jiri Pirko Date: Fri Feb 3 10:28:56 2017 +0100 mlxsw: reg: Add Policy-Engine TCAM Entry Register Version 2 The PTCE-V2 register is used for accessing rules within a TCAM region. It is a new version of PTCE in order to support wider key, mask and action within a TCAM region. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit d9c2661e1c8a98583a48f25b24d44ea9fa57fa87 Author: Jiri Pirko Date: Fri Feb 3 10:28:55 2017 +0100 mlxsw: reg: Add Policy-Engine TCAM Allocation Register The PTAR register is used for allocation of regions in the TCAM. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 106 ++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit 10fabef5134b02aa5a6f8f894d9943095d9b2ce2 Author: Jiri Pirko Date: Fri Feb 3 10:28:54 2017 +0100 mlxsw: reg: Add Policy-Engine ACL Group Table register The PAGT register is used for configuration of the ACL Group Table. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 3279da4c8877357b1001b4a3359069d588053f27 Author: Jiri Pirko Date: Fri Feb 3 10:28:53 2017 +0100 mlxsw: reg: Add Policy-Engine ACL Register The PACL register is used for configuration of the ACL. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 47 +++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) commit d5e556c6a158893d9e50de3d4e7638f753ffd520 Author: Jiri Pirko Date: Fri Feb 3 10:28:52 2017 +0100 mlxsw: item: Add helpers for getting pointer into payload for char buffer item Sometimes it is handy to get a pointer to a char buffer item and use it direcly to write/read data. So add these helpers. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/item.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2946fde9fd7f6c38beaaf581514b706d07c7aec0 Author: Jiri Pirko Date: Fri Feb 3 10:28:51 2017 +0100 mlxsw: item: Add 8bit item helpers Item heplers for 8bit values are needed, let's add them. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/item.h | 79 +++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) commit 3d67576da15167b2669e4765ca9e383f6bcb4171 Author: Zhu Yanjun Date: Thu Feb 2 23:46:21 2017 -0500 bonding: Remove unnecessary returned value check The function bond_info_query alwarys returns 0. As such, in the function bond_do_ioctl, it is not necessary to check the returned value. So the interface type of the function bond_info_query is changed to void. The redundant check is removed. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 38ab52e8e1e2dd65f2d349f82553335813b638d2 Author: Eric Dumazet Date: Thu Feb 2 20:40:08 2017 -0800 tcp: clear pfmemalloc on outgoing skb Josef Bacik diagnosed following problem : I was seeing random disconnects while testing NBD over loopback. This turned out to be because NBD sets pfmemalloc on it's socket, however the receiving side is a user space application so does not have pfmemalloc set on its socket. This means that sk_filter_trim_cap will simply drop this packet, under the assumption that the other side will simply retransmit. Well we do retransmit, and then the packet is just dropped again for the same reason. It seems the better way to address this problem is to clear pfmemalloc in the TCP transmit path. pfmemalloc strict control really makes sense on the receive path. Signed-off-by: Eric Dumazet Acked-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5226b7919641f285bf0f8db84deeb3920b160ec7 Author: Eric Dumazet Date: Thu Feb 2 11:44:27 2017 -0800 cxgb4: get rid of custom busy poll code In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot of code, we also remove one spin_lock() from driver fast path. Signed-off-by: Eric Dumazet Cc: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 113 ------------------------ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 16 +--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 12 +-- drivers/net/ethernet/chelsio/cxgb4/sge.c | 39 -------- 4 files changed, 6 insertions(+), 174 deletions(-) commit 362108b5adddac6f496acc40696e499defd56d62 Author: Eric Dumazet Date: Thu Feb 2 10:50:48 2017 -0800 myri10ge: get rid of custom busy poll code Compared to custom busy_poll, the generic NAPI one is simpler and removes a lot of code. It removes one atomic in the fast path (when busy poll is not in action) since we do not have to use an extra spinlock. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 197 +---------------------- 1 file changed, 4 insertions(+), 193 deletions(-) commit fb6113e688e0bf5bc3081d6ff02e8ad77fed3c7a Author: Eric Dumazet Date: Thu Feb 2 10:16:00 2017 -0800 be2net: get rid of custom busy poll code Compared to custom busy_poll, the generic NAPI one is better, since it allows to use GRO, and it removes a lot of code and extra locked operations in fast path. Signed-off-by: Eric Dumazet Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 5 - drivers/net/ethernet/emulex/benet/be_main.c | 151 ++-------------------------- 2 files changed, 9 insertions(+), 147 deletions(-) commit 94b5e0f970258828bf163b5ef076da4e4b0802e0 Author: David Ahern Date: Thu Feb 2 08:52:21 2017 -0800 net: ipv6: Set protocol to kernel for local routes IPv6 stack does not set the protocol for local routes, so those routes show up with proto "none": $ ip -6 ro ls table local local ::1 dev lo proto none metric 0 pref medium local 2100:3:: dev lo proto none metric 0 pref medium local 2100:3::4 dev lo proto none metric 0 pref medium local fe80:: dev lo proto none metric 0 pref medium ... Set rt6i_protocol to RTPROT_KERNEL for consistency with IPv4. Now routes show up with proto "kernel": $ ip -6 ro ls table local local ::1 dev lo proto kernel metric 0 pref medium local 2100:3:: dev lo proto kernel metric 0 pref medium local 2100:3::4 dev lo proto kernel metric 0 pref medium local fe80:: dev lo proto kernel metric 0 pref medium ... Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 1 + 1 file changed, 1 insertion(+) commit 792e0a6814b63b120c6cfddf79a309046c6e840a Author: Shailendra Verma Date: Tue Jan 31 14:00:48 2017 -0600 PCI: hisi: Use of_device_get_match_data() to simplify probe The only way to call hisi_pcie_probe() is to match an entry in hisi_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the soc_ops pointer. No functional change intended. [bhelgaas: use of_device_get_match_data(), changelog] Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Shailendra Verma Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3898fac1f488c76e0eef5b5267b4ba8112a82ac4 Author: Daniel Borkmann Date: Thu Feb 2 17:09:54 2017 +0100 trace: rename trace_print_hex_seq arg and add kdoc Steven suggested to improve trace_print_hex_seq() a bit after commit 2acae0d5b0f7 ("trace: add variant without spacing in trace_print_hex_seq") in two ways: i) by adding a kdoc comment for the helper function itself and ii) by renaming 'spacing' argument into 'concatenate' to better denote that we don't add spaces between each hex bytes. Suggested-by: Steven Rostedt Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/trace_events.h | 2 +- include/trace/trace_events.h | 4 ++-- kernel/trace/trace_output.c | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) commit ca6f2796eef7fcff66a3b3f4bf45a7493ead0620 Author: Thierry Reding Date: Thu Nov 17 16:47:31 2016 +0100 clk: tegra: Add BPMP clock driver This driver uses the services provided by the BPMP firmware driver to implement a clock driver based on the MRQ_CLK request. This part of the BPMP ABI provides a means to enumerate and control clocks and should allow the driver to work on any chip that supports this ABI. Signed-off-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/Kconfig | 4 + drivers/clk/tegra/Makefile | 1 + drivers/clk/tegra/clk-bpmp.c | 620 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 625 insertions(+) commit 70ea163699b68963e222a905e184f6436e8a290d Author: Dan Carpenter Date: Fri Feb 3 13:30:40 2017 +0300 tpm: silence an array overflow warning We should check that we're within bounds first before checking that "chip->active_banks[i] != TPM2_ALG_ERROR" so I've re-ordered the two checks. Signed-off-by: Dan Carpenter Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f38c5ad79f1eb5569843ea24ac7f4cabccc3c657 Author: Jiri Pirko Date: Thu Feb 2 17:05:04 2017 +0100 MAINTAINERS: add Ivan as a switchdev maintainer Ivan will be taking care of switchdev code from now on. Signed-off-by: Jiri Pirko Acked-by: Ivan Vecera Acked-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3b19860c7f3d0c184385055cebded19bc537ff4a Merge: 5a0fd98 11538d0 Author: David S. Miller Date: Fri Feb 3 15:21:23 2017 -0500 Merge branch 'bridge-per-vlan-dst_metadata-support' Roopa Prabhu says: ==================== bridge: per vlan dst_metadata support High level summary: lwt and dst_metadata have enabled vxlan l3 deployments to use a single vxlan netdev for multiple vnis eliminating the scalability problem with using a single vxlan netdev per vni. This series tries to do the same for vxlan netdevs in pure l2 bridged networks. Use-case/deployment and details are below. Deployment scerario details: As we know VXLAN is used to build layer 2 virtual networks across the underlay layer3 infrastructure. A VXLAN tunnel endpoint (VTEP) originates and terminates VXLAN tunnels. And a VTEP can be a TOR switch or a vswitch in the hypervisor. This patch series mainly focuses on the TOR switch configured as a Vtep. Vxlan segment ID (vni) along with vlan id is used to identify layer 2 segments in a vxlan overlay network. Vxlan bridging is the function provided by Vteps to terminate vxlan tunnels and map the vxlan vni to traditional end host vlan. This is covered in the "VXLAN Deployment Scenarios" in sections 6 and 6.1 in RFC 7348. To provide vxlan bridging function, a vtep has to map vlan to a vni. The rfc says that the ingress VTEP device shall remove the IEEE 802.1Q VLAN tag in the original Layer 2 packet if there is one before encapsulating the packet into the VXLAN format to transmit it through the underlay network. The remote VTEP devices have information about the VLAN in which the packet will be placed based on their own VLAN-to-VXLAN VNI mapping configurations. Existing solution: Without this patch series one can deploy such a vtep configuration by adding the local ports and vxlan netdevs into a vlan filtering bridge. The local ports are configured as trunk ports carrying all vlans. A vxlan netdev per vni is added to the bridge. Vlan mapping to vni is achieved by configuring the vlan as pvid on the corresponding vxlan netdev. The vxlan netdev only receives traffic corresponding to the vlan it is mapped to. This configuration maps traffic belonging to a vlan to the corresponding vxlan segment. ----------------------------------- | bridge | | | ----------------------------------- |100,200 |100 (pvid) |200 (pvid) | | | swp1 vxlan1000 vxlan2000 This provides the required vxlan bridging function but poses a scalability problem with using a separate vxlan netdev for each vni. Solution in this patch series: The Goal is to use a single vxlan device to carry all vnis similar to the vxlan collect metadata mode but additionally allowing the bridge and vxlan driver to carry all the forwarding information and also learn. This implementation uses the existing dst_metadata infrastructure to map vlan to a tunnel id. - vxlan driver changes: - enable collect metadata mode to be used with learning, replication and fdb - A single fdb table hashed by (mac, vni) - rx path already has the vni - tx path expects a vni in the packet with dst_metadata and relies on learnt or static forwarding information table to forward the packet - Bridge driver changes: per vlan dst_metadata support: - Our use case is vxlan and 1-1 mapping between vlan and vni, but I have kept the api generic for any tunnel info - Uapi to configure/unconfigure/dump per vlan tunnel data - new bridge port flag to turn this feature on/off. off by default - ingress hook: - if port is a tunnel port, use tunnel info in attached dst_metadata to map it to a local vlan - egress hook: - if port is a tunnel port, use tunnel info attached to vlan to set dst_metadata on the skb Other approaches tried and vetoed: - tc vlan push/pop and tunnel metadata dst: - though tc can be used to do part of this, these patches address a deployment case where bridge driver vlan filtering and forwarding information database along with vxlan driver forwarding information table and learning are required. - making vxlan driver understand vlan-vni mapping: - I had a series almost ready with this one but soon realized it duplicated a lot of vlan handling code in the vxlan driver ==================== Signed-off-by: David S. Miller commit 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd Author: Roopa Prabhu Date: Tue Jan 31 22:59:55 2017 -0800 bridge: vlan dst_metadata hooks in ingress and egress paths - ingress hook: - if port is a tunnel port, use tunnel info in attached dst_metadata to map it to a local vlan - egress hook: - if port is a tunnel port, use tunnel info attached to vlan to set dst_metadata on the skb CC: Nikolay Aleksandrov Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_forward.c | 2 +- net/bridge/br_input.c | 8 ++++++- net/bridge/br_private.h | 2 ++ net/bridge/br_private_tunnel.h | 11 +++++++++ net/bridge/br_vlan.c | 7 ++++++ net/bridge/br_vlan_tunnel.c | 54 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 2 deletions(-) commit efa5356b0d9753b9d7e63e41459eba106cce30f3 Author: Roopa Prabhu Date: Tue Jan 31 22:59:54 2017 -0800 bridge: per vlan dst_metadata netlink support This patch adds support to attach per vlan tunnel info dst metadata. This enables bridge driver to map vlan to tunnel_info at ingress and egress. It uses the kernel dst_metadata infrastructure. The initial use case is vlan to vni bridging, but the api is generic to extend to any tunnel_info in the future: - Uapi to configure/unconfigure/dump per vlan tunnel data - netlink functions to configure vlan and tunnel_info mapping - Introduces bridge port flag BR_LWT_VLAN to enable attach/detach dst_metadata to bridged packets on ports. off by default. - changes to existing code is mainly refactor some existing vlan handling netlink code + hooks for new vlan tunnel code - I have kept the vlan tunnel code isolated in separate files. - most of the netlink vlan tunnel code is handling of vlan-tunid ranges (follows the vlan range handling code). To conserve space vlan-tunid by default are always dumped in ranges if applicable. Use case: example use for this is a vxlan bridging gateway or vtep which maps vlans to vn-segments (or vnis). iproute2 example (patched and pruned iproute2 output to just show relevant fdb entries): example shows same host mac learnt on two vni's and vlan 100 maps to vni 1000, vlan 101 maps to vni 1001 before (netdev per vni): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan1001 vlan 101 master bridge 00:02:00:00:00:03 dev vxlan1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan1000 vlan 100 master bridge 00:02:00:00:00:03 dev vxlan1000 dst 12.0.0.8 self after this patch with collect metdata in bridged mode (single netdev): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan0 vlan 101 master bridge 00:02:00:00:00:03 dev vxlan0 src_vni 1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan0 vlan 100 master bridge 00:02:00:00:00:03 dev vxlan0 src_vni 1000 dst 12.0.0.8 self CC: Nikolay Aleksandrov Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/Makefile | 5 +- net/bridge/br_netlink.c | 140 ++++++++++++------- net/bridge/br_netlink_tunnel.c | 296 +++++++++++++++++++++++++++++++++++++++++ net/bridge/br_private.h | 10 ++ net/bridge/br_private_tunnel.h | 72 ++++++++++ net/bridge/br_vlan.c | 17 ++- net/bridge/br_vlan_tunnel.c | 149 +++++++++++++++++++++ 7 files changed, 641 insertions(+), 48 deletions(-) commit b3c7ef0adadc5768e0baa786213c6bd1ce521a77 Author: Roopa Prabhu Date: Tue Jan 31 22:59:53 2017 -0800 bridge: uapi: add per vlan tunnel info New nested netlink attribute to associate tunnel info per vlan. This is used by bridge driver to send tunnel metadata to bridge ports in vlan tunnel mode. This patch also adds new per port flag IFLA_BRPORT_VLAN_TUNNEL to enable vlan tunnel mode. off by default. One example use for this is a vxlan bridging gateway or vtep which maps vlans to vn-segments (or vnis). User can configure per-vlan tunnel information which the bridge driver can use to bridge vlan into the corresponding vn-segment. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/linux/if_bridge.h | 1 + include/uapi/linux/if_bridge.h | 11 +++++++++++ include/uapi/linux/if_link.h | 1 + 3 files changed, 13 insertions(+) commit 3ad7a4b141ebd6091494913672d7166d5c2764e4 Author: Roopa Prabhu Date: Tue Jan 31 22:59:52 2017 -0800 vxlan: support fdb and learning in COLLECT_METADATA mode Vxlan COLLECT_METADATA mode today solves the per-vni netdev scalability problem in l3 networks. It expects all forwarding information to be present in dst_metadata. This patch series enhances collect metadata mode to include the case where only vni is present in dst_metadata, and the vxlan driver can then use the rest of the forwarding information datbase to make forwarding decisions. There is no change to default COLLECT_METADATA behaviour. These changes only apply to COLLECT_METADATA when used with the bridging use-case with a special dst_metadata tunnel info flag (eg: where vxlan device is part of a bridge). For all this to work, the vxlan driver will need to now support a single fdb table hashed by mac + vni. This series essentially makes this happen. use-case and workflow: vxlan collect metadata device participates in bridging vlan to vn-segments. Bridge driver above the vxlan device, sends the vni corresponding to the vlan in the dst_metadata. vxlan driver will lookup forwarding database with (mac + vni) for the required remote destination information to forward the packet. Changes introduced by this patch: - allow learning and forwarding database state in vxlan netdev in COLLECT_METADATA mode. Current behaviour is not changed by default. tunnel info flag IP_TUNNEL_INFO_BRIDGE is used to support the new bridge friendly mode. - A single fdb table hashed by (mac, vni) to allow fdb entries with multiple vnis in the same fdb table - rx path already has the vni - tx path expects a vni in the packet with dst_metadata - prior to this series, fdb remote_dsts carried remote vni and the vxlan device carrying the fdb table represented the source vni. With the vxlan device now representing multiple vnis, this patch adds a src vni attribute to the fdb entry. The remote vni already uses NDA_VNI attribute. This patch introduces NDA_SRC_VNI netlink attribute to represent the src vni in a multi vni fdb table. iproute2 example (patched and pruned iproute2 output to just show relevant fdb entries): example shows same host mac learnt on two vni's. before (netdev per vni): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan1000 dst 12.0.0.8 self after this patch with collect metadata in bridged mode (single netdev): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan0 src_vni 1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan0 src_vni 1000 dst 12.0.0.8 self Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 196 ++++++++++++++++++++++++++--------------- include/uapi/linux/neighbour.h | 1 + 2 files changed, 126 insertions(+), 71 deletions(-) commit f35581d64e55fc65753a62957b3b98127d560d07 Author: Roopa Prabhu Date: Tue Jan 31 22:59:51 2017 -0800 ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info mode New ip_tunnel_info flag to represent bridged tunnel metadata. Used by bridge driver later in the series to pass per vlan dst metadata to bridge ports. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/ip_tunnels.h | 1 + 1 file changed, 1 insertion(+) commit 5a0fd98b7b5be8773c53c40c47451ec6cd11d1ff Merge: 3541f9e 295a6e0 Author: David S. Miller Date: Fri Feb 3 15:16:46 2017 -0500 Merge branch 'ife-to-module' Yotam Gigi says: ==================== Extract IFE logic to module Extract ife logic from the tc_ife action into an independent module, and make the tc_ife action use it. This way, the ife encapsulation can be used by other modules other than tc_ife action. v1->v2: Fix duplicate symbol error by introducing a new patch that makes the original symbol static. The symbol ife_tlv_meta_extract is exported in act_ife, though not being used by any other module. As the symbol is being moved to the new ife module, introducing the new module creates duplicate symbol. To fix it, add a new patch (1/3) that makes the ife_tlv_meta_extract symbol static in act_ife, thus the symbol does not collide. ==================== Signed-off-by: David S. Miller commit 295a6e06d21e1f469c9f38b00125a13b60ad4e7c Author: Yotam Gigi Date: Wed Feb 1 15:30:03 2017 +0200 net/sched: act_ife: Change to use ife module Use the encode/decode functionality from the ife module instead of using implementation inside the act_ife. Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi Signed-off-by: Jamal Hadi Salim Signed-off-by: Roman Mashak Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 1 - include/uapi/linux/tc_act/tc_ife.h | 10 +--- net/sched/Kconfig | 1 + net/sched/act_ife.c | 110 +++++++++++-------------------------- 4 files changed, 34 insertions(+), 88 deletions(-) commit 1ce8460496c05379c66edc178c3c55ca4e953044 Author: Yotam Gigi Date: Wed Feb 1 15:30:02 2017 +0200 net: Introduce ife encapsulation module This module is responsible for the ife encapsulation protocol encode/decode logics. That module can: - ife_encode: encode skb and reserve space for the ife meta header - ife_decode: decode skb and extract the meta header size - ife_tlv_meta_encode - encodes one tlv entry into the reserved ife header space. - ife_tlv_meta_decode - decodes one tlv entry from the packet - ife_tlv_meta_next - advance to the next tlv Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi Signed-off-by: Jamal Hadi Salim Signed-off-by: Roman Mashak Signed-off-by: David S. Miller MAINTAINERS | 7 +++ include/net/ife.h | 51 +++++++++++++++++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/ife.h | 18 ++++++ net/Kconfig | 1 + net/Makefile | 1 + net/ife/Kconfig | 16 ++++++ net/ife/Makefile | 5 ++ net/ife/ife.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 242 insertions(+) commit 1d5e7c859e81a66674d194c346119d154d31e9dc Author: Yotam Gigi Date: Wed Feb 1 15:30:01 2017 +0200 net/sched: act_ife: Unexport ife_tlv_meta_encode As the function ife_tlv_meta_encode is not used by any other module, unexport it and make it static for the act_ife module. Signed-off-by: Yotam Gigi Signed-off-by: Jamal Hadi Salim Signed-off-by: Roman Mashak Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 2 -- net/sched/act_ife.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 5775a4c76fbc0321671503c815d8a2ef657e0281 Merge: 2a35322 a811498 Author: Stephen Boyd Date: Fri Feb 3 12:07:35 2017 -0800 Merge tag 'v4.11-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull Rockchip clk updates from Heiko Stuebner: "Non-critical fix for the pclk_edp divider on rk3399, one new clock-id and making niu (interconnect) clocks critical on rk3288, as CLK_IGNORE_UNUSED is not enough to keep them running all the time when more users access particular clock subtrees." * tag 'v4.11-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3288: make all niu clocks critical clk: rockchip: use rk3288 vip_out clock ids clk: rockchip: add rk3288 vip_out clock id clk: rockchip: fix the incorrect pclk_edp div width for RK3399 commit a118cf2a5b5a0d4541d04e8e8fcde8564803330c Author: Stefan Berger Date: Tue Jan 31 13:43:59 2017 -0500 tpm: fix the type of owned field in cap_t In cap_t the size of the type bool is assumed to be one byte. This commit sorts out the issue by changing the type to u8. Fixes: c659af78eb7b ("tpm: Check size of response before accessing data") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d23cc323cdbee1cbcd8a7f059fff9ef2b0c473d Author: Nayna Jain Date: Mon Jan 23 02:26:27 2017 -0500 tpm: add securityfs support for TPM 2.0 firmware event log Unlike the device driver support for TPM 1.2, the TPM 2.0 does not support the securityfs pseudo files for displaying the firmware event log. This patch enables support for providing the TPM 2.0 event log in binary form. TPM 2.0 event log supports a crypto agile format that records multiple digests, which is different from TPM 1.2. This patch enables the tpm_bios_log_setup for TPM 2.0 and adds the event log parser which understand the TPM 2.0 crypto agile format. Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakkinen Tested-by: Kenneth Goldman Tested-by: Stefan Berger Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Makefile | 2 +- drivers/char/tpm/tpm.h | 7 +- drivers/char/tpm/tpm1_eventlog.c | 469 +++++++++++++++++++++++++++++++++++++++ drivers/char/tpm/tpm2_eventlog.c | 203 +++++++++++++++++ drivers/char/tpm/tpm_acpi.c | 3 + drivers/char/tpm/tpm_eventlog.c | 462 -------------------------------------- drivers/char/tpm/tpm_eventlog.h | 51 ++++- 7 files changed, 727 insertions(+), 470 deletions(-) commit e46e22f12b19f0068b02afcf6edb716b4f49934f Author: Nayna Jain Date: Mon Jan 23 02:26:26 2017 -0500 tpm: enhance read_log_of() to support Physical TPM event log Physical TPMs use Open Firmware Device Tree bindings that are similar to the IBM Power virtual TPM to support event log. However, these properties store the values in different endianness for Physical and Virtual TPM. This patch fixes the endianness issue by doing appropriate conversion based on Physical or Virtual TPM. Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakkinen Tested-by: Kenneth Goldman Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_of.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit c1f92b4b04ad7006bdcbd1d5bb63f2864b06b7f8 Author: Nayna Jain Date: Mon Jan 30 04:59:41 2017 -0500 tpm: enhance TPM 2.0 PCR extend to support multiple banks The current TPM 2.0 device driver extends only the SHA1 PCR bank but the TCG Specification[1] recommends extending all active PCR banks, to prevent malicious users from setting unused PCR banks with fake measurements and quoting them. The existing in-kernel interface(tpm_pcr_extend()) expects only a SHA1 digest. To extend all active PCR banks with differing digest sizes, the SHA1 digest is padded with trailing 0's as needed. This patch reuses the defined digest sizes from the crypto subsystem, adding a dependency on CRYPTO_HASH_INFO module. [1] TPM 2.0 Specification referred here is "TCG PC Client Specific Platform Firmware Profile for TPM 2.0" Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Tested-by: Kenneth Goldman Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Kconfig | 1 + drivers/char/tpm/tpm-interface.c | 14 ++++++- drivers/char/tpm/tpm.h | 9 +++- drivers/char/tpm/tpm2-cmd.c | 91 +++++++++++++++++++++------------------- 4 files changed, 71 insertions(+), 44 deletions(-) commit 1db15344f874f656b267a79467d1e7ee6442ba09 Author: Nayna Jain Date: Mon Jan 30 04:59:40 2017 -0500 tpm: implement TPM 2.0 capability to get active PCR banks This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Tested-by: Kenneth Goldman Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm.h | 5 +++ drivers/char/tpm/tpm2-cmd.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) commit 7d761119a914ec0ac05ec2a5378d1f86e680967d Author: Jarkko Sakkinen Date: Wed Jan 25 23:00:22 2017 +0200 tpm: fix RC value check in tpm2_seal_trusted The error code handling is broken as any error code that has the same bits set as TPM_RC_HASH passes. Implemented tpm2_rc_value() helper to parse the error value from FMT0 and FMT1 error codes so that these types of mistakes are prevented in the future. Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm.h | 5 +++++ drivers/char/tpm/tpm2-cmd.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 419a16d9cda3408090704d5e3956c866e18f0af6 Author: Maciej S. Szmigiero Date: Wed Jan 25 22:07:36 2017 +0200 tpm_tis: fix iTPM probe via probe_itpm() function probe_itpm() function is supposed to send command without an itpm flag set and if this fails to repeat it, this time with the itpm flag set. However, commit 41a5e1cf1fe15 ("tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy") moved the itpm flag from an "itpm" variable to a TPM_TIS_ITPM_POSSIBLE chip flag, so setting the (now function-local) itpm variable no longer had any effect. Finally, this function-local itpm variable was removed by commit 56af322156dbe9 ("tpm/tpm_tis: remove unused itpm variable") Tested only on non-iTPM TIS TPM. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit fa2825da6f5d6d45122bd990958970a175fb1aef Author: Jason Gunthorpe Date: Mon Jan 23 17:06:08 2017 -0700 tpm: Begin the process to deprecate user_read_timer For a long time the cdev read/write interface had this strange idea that userspace had to read the result within 60 seconds otherwise it is discarded. Perhaps this made sense under some older locking regime, but in the modern kernel it is not required and is just dangerous. Since something may be relying on this, double the timeout and print a warning. We can remove the code in a few years, but this should be enough to prevent new users. Suggested-by: James Bottomley Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1d1915532b3fb0d08aed8b2d8af1c6ea40846782 Author: Jarkko Sakkinen Date: Wed Jan 25 16:47:39 2017 +0200 tpm: remove tpm_read_index and tpm_write_index from tpm.h These are non-generic functions and do not belong to tpm.h. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm.h | 11 ----------- drivers/char/tpm/tpm_atmel.h | 6 ++++++ drivers/char/tpm/tpm_nsc.c | 12 ++++++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) commit 2a3532214e5497be89157004c6ba562580f512c6 Author: Masahiro Yamada Date: Sat Jan 28 22:27:01 2017 +0900 clk: uniphier: add eMMC clock for LD11 and LD20 SoCs Add clock for the Cadence eMMC controller on LD11/LD20. For the other SoCs, the clock for the eMMC controller is included in the MIO/SD control block. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 19771622d852e2ccc276a88f386a20cd93e2f14d Author: Masahiro Yamada Date: Sat Jan 28 22:27:00 2017 +0900 clk: uniphier: add NAND clock for all UniPhier SoCs Add clock line for the Denali NAND controller. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2fbae64aade89c0d223c2e9c9efa910404ee03a2 Merge: eaff16b 64507fe Author: Stephen Boyd Date: Fri Feb 3 11:47:47 2017 -0800 Merge tag 'sunxi-clk-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-next Pull Allwinner clock updates from Maxime Ripard: - Support for one new SoC, the V3s - Conversion of two old SoCs to the new framework, the old sun5i family and the A80 - A bunch of fixes * tag 'sunxi-clk-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (25 commits) ARM: dts: sun9i: Switch to new clock bindings clk: sunxi-ng: Add A80 Display Engine CCU clk: sunxi-ng: Add A80 USB CCU clk: sunxi-ng: Add A80 CCU clk: sunxi-ng: Support separately grouped PLL lock status register clk: sunxi-ng: mux: Get closest parent rate possible with CLK_SET_RATE_PARENT clk: sunxi-ng: mux: honor CLK_SET_RATE_NO_REPARENT flag clk: sunxi-ng: mux: Fix determine_rate for mux clocks with pre-dividers clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for the GPU clk: sunxi-ng: Call divider_round_rate if we only have a single parent ARM: gr8: Convert to CCU ARM: sun5i: Convert to CCU clk: sunxi-ng: Add sun5i CCU driver clk: sunxi-ng: Implement global pre-divider clk: sunxi-ng: Implement multiplier maximum clk: sunxi-ng: mult: Fix minimum in round rate clk: sunxi-ng: Implement factors offsets clk: sunxi-ng: multiplier: Add fractional support clk: sunxi-ng: add support for V3s CCU dt-bindings: add device binding for the CCU of Allwinner V3s ... commit 5b0948dfe138f0837699f46f5877f4f81c252dac Author: Emil Tantilov Date: Fri Jan 6 13:59:08 2017 -0800 PCI: Lock each enable/disable num_vfs operation in sysfs Enabling/disabling SRIOV via sysfs by echo-ing multiple values simultaneously: # echo 63 > /sys/class/net/ethX/device/sriov_numvfs& # echo 63 > /sys/class/net/ethX/device/sriov_numvfs # sleep 5 # echo 0 > /sys/class/net/ethX/device/sriov_numvfs& # echo 0 > /sys/class/net/ethX/device/sriov_numvfs results in the following bug: kernel BUG at drivers/pci/iov.c:495! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 8050 Comm: bash Tainted: G W 4.9.0-rc7-net-next #2092 RIP: 0010:[] [] pci_iov_release+0x57/0x60 Call Trace: [] pci_release_dev+0x26/0x70 [] device_release+0x3e/0xb0 [] kobject_cleanup+0x67/0x180 [] kobject_put+0x2d/0x60 [] put_device+0x17/0x20 [] pci_dev_put+0x1a/0x20 [] pci_get_dev_by_id+0x5b/0x90 [] pci_get_subsys+0x35/0x40 [] pci_get_device+0x18/0x20 [] pci_get_domain_bus_and_slot+0x2b/0x60 [] pci_iov_remove_virtfn+0x57/0x180 [] pci_disable_sriov+0x65/0x140 [] ixgbe_disable_sriov+0xc7/0x1d0 [ixgbe] [] ixgbe_pci_sriov_configure+0x3d/0x170 [ixgbe] [] sriov_numvfs_store+0xdc/0x130 ... RIP [] pci_iov_release+0x57/0x60 Use the existing mutex lock to protect each enable/disable operation. Signed-off-by: Emil Tantilov Signed-off-by: Bjorn Helgaas Reviewed-by: Gavin Shan CC: Alexander Duyck drivers/pci/iov.c | 7 ------- drivers/pci/pci-sysfs.c | 23 ++++++++++++++++------- drivers/pci/pci.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) commit 70823b9bf3290855a7df895d89bd8209182b52e3 Author: Jan Kara Date: Thu Feb 2 18:34:11 2017 +0100 orangefs: Remove orangefs_backing_dev_info It is not used anywhere. CC: Mike Marshall Signed-off-by: Jan Kara Signed-off-by: Mike Marshall fs/orangefs/inode.c | 6 ------ fs/orangefs/orangefs-kernel.h | 1 - fs/orangefs/orangefs-mod.c | 12 +----------- 3 files changed, 1 insertion(+), 18 deletions(-) commit 31c829f3647683cc37c14b3cccaad6197957f1d2 Author: Martin Brandenburg Date: Thu Jan 26 10:25:30 2017 -0500 orangefs: Support readahead_readcnt parameter. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-sysfs.c | 32 ++++++++++++++++++++++++++++++-- fs/orangefs/upcall.h | 1 + 2 files changed, 31 insertions(+), 2 deletions(-) commit eb82fbcf82965c18da11ada92b82f1400b36e0ad Author: Dan Carpenter Date: Sat Jan 21 08:04:45 2017 +0300 orangefs: silence harmless integer overflow warning The issue here is that in orangefs_bufmap_alloc() we do: bufmap->buffer_index_array = kzalloc(DIV_ROUND_UP(bufmap->desc_count, BITS_PER_LONG), GFP_KERNEL); If we choose a bufmap->desc_count like -31 then it means the DIV_ROUND_UP ends up having an integer overflow. The result is that kzalloc() returns the ZERO_SIZE_PTR and there is a static checker warning. But this bug is harmless because on the next lines we use ->desc_count to do a kcalloc(). That has integer overflow checking built in so the kcalloc() fails and we return an error code. Anyway, it doesn't make sense to talk about negative sizes and blocking them silences the static checker warning. Signed-off-by: Dan Carpenter Signed-off-by: Mike Marshall fs/orangefs/orangefs-bufmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit c0bfc549e96231e0ead4424de6e4933fde819d70 Author: Stephen Boyd Date: Wed Jan 25 15:46:58 2017 -0800 perf: xgene: Include module.h I ran into a build error when I disabled CONFIG_ACPI and tried to compile this driver: drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class MODULE_DEVICE_TABLE(of, xgene_pmu_of_match); ^ drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int] Include module.h for the MODULE_DEVICE_TABLE macro that's implicitly included through ACPI. Tested-by: Tai Nguyen Signed-off-by: Stephen Boyd Signed-off-by: Will Deacon drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+) commit b128cb55f066caeb9859b99795d78e9213a58d2a Author: Geliang Tang Date: Wed Nov 23 22:39:52 2016 +0800 arm: perf: use builtin_platform_driver Use builtin_platform_driver() helper to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Will Deacon arch/arm/kernel/perf_event_v6.c | 6 +----- arch/arm/kernel/perf_event_v7.c | 6 +----- arch/arm/kernel/perf_event_xscale.c | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) commit 82bcd087029f6056506ea929f11af02622230901 Author: Andy Gross Date: Wed Feb 1 11:28:28 2017 -0600 firmware: qcom: scm: Fix interrupted SCM calls This patch adds a Qualcomm specific quirk to the arm_smccc_smc call. On Qualcomm ARM64 platforms, the SMC call can return before it has completed. If this occurs, the call can be restarted, but it requires using the returned session ID value from the interrupted SMC call. The quirk stores off the session ID from the interrupted call in the quirk structure so that it can be used by the caller. This patch folds in a fix given by Sricharan R: https://lkml.org/lkml/2016/9/28/272 Signed-off-by: Andy Gross Reviewed-by: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/smccc-call.S | 9 ++++++++- drivers/firmware/qcom_scm-64.c | 13 ++++++++++--- include/linux/arm-smccc.h | 11 ++++++++--- 3 files changed, 26 insertions(+), 7 deletions(-) commit 680a0873e193bae666439f4b5e32c758e68f114c Author: Andy Gross Date: Wed Feb 1 11:28:27 2017 -0600 arm: kernel: Add SMC structure parameter This patch adds a quirk parameter to the arm_smccc_(smc/hvc) calls. The quirk structure allows for specialized SMC operations due to SoC specific requirements. The current arm_smccc_(smc/hvc) is renamed and macros are used instead to specify the standard arm_smccc_(smc/hvc) or the arm_smccc_(smc/hvc)_quirk function. This patch and partial implementation was suggested by Will Deacon. Signed-off-by: Andy Gross Reviewed-by: Will Deacon Signed-off-by: Will Deacon arch/arm/kernel/armksyms.c | 4 ++-- arch/arm/kernel/smccc-call.S | 14 ++++++++------ arch/arm64/kernel/arm64ksyms.c | 4 ++-- arch/arm64/kernel/asm-offsets.c | 7 +++++-- arch/arm64/kernel/smccc-call.S | 14 ++++++++------ include/linux/arm-smccc.h | 40 ++++++++++++++++++++++++++++++++-------- 6 files changed, 57 insertions(+), 26 deletions(-) commit 4f69bd16df1a38c32d5d207a96d1d86df4808f87 Author: Matthew R. Ochs Date: Tue Nov 29 12:00:40 2016 -0600 PCI: Increase VPD access timeout to 125ms The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to complete. When an access does not complete within this period, a warning is logged and an error returned to the caller. While this default timeout is valid for most hardware, some devices can experience longer access delays under certain circumstances. For example, one of the IBM CXL Flash devices can take up to ~120ms in a worst-case scenario. These types of devices can benefit from an extended timeout. To support devices with a longer access delay, increase the timeout in pci_vpd_wait() to 125ms. The PCI specification is silent with respect to VPD delays, therefore there is no concern for violating a threshold. Tested-by: Uma Krishnan Signed-off-by: Matthew R. Ochs Signed-off-by: Bjorn Helgaas Reviewed-by: Gavin Shan drivers/pci/access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b037a0512d9f8675ec2693bed46c8ea6a884ab Author: Tuukka Toivonen Date: Fri Jan 27 08:32:56 2017 -0200 [media] v4l2-async: failing functions shouldn't have side effects v4l2-async had several functions doing some operations and then not undoing the operations in a failure situation. For example, v4l2_async_test_notify() moved a subdev into notifier's done list even if registering the subdev (v4l2_device_register_subdev) failed. If the subdev was allocated and v4l2_async_register_subdev() called from the driver's probe() function, as usually, the probe() function freed the allocated subdev and returned a failure. Nevertheless, the subdev was still left into the notifier's done list, causing an access to already freed memory when the notifier was later unregistered. A hand-edited call trace leaving freed subdevs into the notifier: v4l2_async_register_notifier(notifier, asd) cameradrv_probe sd = devm_kzalloc() v4l2_async_register_subdev(sd) v4l2_async_test_notify(notifier, sd, asd) list_move(sd, ¬ifier->done) v4l2_device_register_subdev(notifier->v4l2_dev, sd) cameradrv_registered(sd) -> fails ->v4l2_async_register_subdev returns failure ->cameradrv_probe returns failure ->devres frees the allocated sd ->sd was freed but it still remains in the notifier's list. This patch fixes this and several other cases where a failing function could leave nodes into a linked list while the caller might free the node due to a failure. Signed-off-by: Tuukka Toivonen Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 79a2eda80c6dab79790c308d9f50ecd2e5021ba3 Author: Dan Carpenter Date: Fri Jan 27 06:06:22 2017 -0200 [media] mantis_dvb: fix some error codes in mantis_dvb_init() We should be returning negative error codes here or it leads to a crash. This also silences a static checker warning. drivers/media/pci/mantis/mantis_cards.c:250 mantis_pci_probe() warn: 'mantis->dmxdev.dvbdev->fops' double freed Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/mantis/mantis_dvb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e4d750c97794ea2bab793d4c518b1f4006364588 Author: Jens Axboe Date: Fri Feb 3 09:48:28 2017 -0700 block: free merged request in the caller If we end up doing a request-to-request merge when we have completed a bio-to-request merge, we free the request from deep down in that path. For blk-mq-sched, the merge path has to hold the appropriate lock, but we don't need it for freeing the request. And in fact holding the lock is problematic, since we are now calling the mq sched put_rq_private() hook with the lock held. Other call paths do not hold this lock. Fix this inconsistency by ensuring that the caller frees a merged request. Then we can do it outside of the lock, making it both more efficient and fixing the blk-mq-sched problem of invoking parts of the scheduler with an unknown lock state. Reported-by: Paolo Valente Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-core.c | 12 +++++++++--- block/blk-merge.c | 15 ++++++++++++--- block/blk-mq-sched.c | 9 ++++++--- block/blk-mq-sched.h | 3 ++- block/mq-deadline.c | 8 ++++++-- 5 files changed, 35 insertions(+), 12 deletions(-) commit b973cb7e89fe3dcc2bc72c5b3aa7a3bfd9d0e6d5 Author: Jens Axboe Date: Thu Feb 2 08:54:40 2017 -0700 blk-merge: return the merged request When we attempt to merge request-to-request, we return a 0/1 if we ended up merging or not. Change that to return the pointer to the request that we freed. We will use this to move the freeing of that request out of the merge logic, so that callers can drop locks before freeing the request. There should be no functional changes in this patch. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-merge.c | 31 ++++++++++++++++--------------- block/blk.h | 4 ++-- 2 files changed, 18 insertions(+), 17 deletions(-) commit c1a7c40cff65719e0a5a2f101aa59868ff5eb8ce Merge: 374a504 91b0cb0 Author: Takashi Iwai Date: Fri Feb 3 17:46:28 2017 +0100 Merge branch 'topic/intel-lpe-audio' into for-next Lots of cleanups and refactoring of Intel LPE audio driver. commit 91b0cb0cc07bcb5114df2897531f4ea41c148c8e Author: Takashi Iwai Date: Thu Feb 2 17:46:49 2017 +0100 ALSA: x86: Rename drv_status to connected After the rewrite of the runtime PM code, we have only two driver status: CONNECTED and DISCONNECTED. So it's clearer to use a boolean flag, and name it easier one, "connected". Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 40 ++++++++++++++++++++-------------------- sound/x86/intel_hdmi_audio.h | 4 ++-- sound/x86/intel_hdmi_lpe_audio.h | 8 -------- 3 files changed, 22 insertions(+), 30 deletions(-) commit 73997b050c995f34f3617d344f1e767d15b2477d Author: Takashi Iwai Date: Thu Feb 2 17:38:50 2017 +0100 ALSA: x86: Yet more tidy-up and clean-ups - Add a few more comments to functions. - Move the initialization of some PCM state variables to open and prepare callbacks, where these are clearer places. - Remove superfluous NULL checks. - Get rid of the bogus drv_status change to CONNECTED at close; this doesn't make any sense. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 68 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 32 deletions(-) commit 44684f61b23c68786834dd2a99d4a68d40a13308 Author: Takashi Iwai Date: Thu Feb 2 17:27:40 2017 +0100 ALSA: x86: Simplify comments It's a stand-alone small driver code, and we don't have to describe too much formalized comments in kernel-doc style for local functions at all. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 66 ++++++++++---------------------------------- 1 file changed, 14 insertions(+), 52 deletions(-) commit 36ed34662f1944ebf553b30fcba1abab1703d125 Author: Takashi Iwai Date: Thu Feb 2 17:06:38 2017 +0100 ALSA: x86: Set CA bits for DisplayPort too This is a guess work. Usually the DP audio info frame is just 8-bit shifted from HDMI AI, so let's try to put CA in DIP frame 2 [24-31]. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4aedb9465f717a8393bb5f40581eb7942af12506 Author: Takashi Iwai Date: Thu Feb 2 16:38:39 2017 +0100 ALSA: x86: Create ELD control element Like other drivers, expose the ELD bytes via a control element so that user-space can parse it. For the simplicity, the code to register the ctl elements is refactored using an array. Also, since ELD ctl read copies the bytes also during disconnection, clear the ELD bytes at hot-unplug, in order to avoid the leak of the previous bogus ELD. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 72 +++++++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 21 deletions(-) commit 03c3437755881a9f6f1b5f8c05e62edf7898a87f Author: Takashi Iwai Date: Thu Feb 2 16:19:03 2017 +0100 ALSA: x86: Clean up unused defines and inclusions Many defines and constants are left unused. Clean them up. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 10 ++++-- sound/x86/intel_hdmi_audio.h | 11 +------ sound/x86/intel_hdmi_lpe_audio.h | 68 +++++++--------------------------------- 3 files changed, 20 insertions(+), 69 deletions(-) commit 7ceba75f21e4ecb520b110ffada72cc0c9f5c072 Author: Takashi Iwai Date: Thu Feb 2 15:58:35 2017 +0100 ALSA: x86: Reduce redundant register field names Currently each register definition contains the own prefix in the union struct itself; for example, union aud_ch_status_0 has status_0_regx and status_0_regval fields. These are simply superfluous, since usually the type of the variable is seen in its declaration or in its name. In this patch, we cut off these prefixes. Now all register definitions have regx and regval fields consistently, instead. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 102 ++++++++++++------------- sound/x86/intel_hdmi_audio.h | 1 - sound/x86/intel_hdmi_lpe_audio.h | 156 ++++++++++----------------------------- 3 files changed, 90 insertions(+), 169 deletions(-) commit df0435db1db9e385acdc0a354896d2c0e878dbd5 Author: Takashi Iwai Date: Thu Feb 2 15:37:11 2017 +0100 ALSA: x86: Use the standard ELD bytes definitions We have some constants defined in drm/drm_edid.h, and clean up our own definitions. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 14 ++--- sound/x86/intel_hdmi_audio.h | 3 +- sound/x86/intel_hdmi_lpe_audio.h | 119 --------------------------------------- 3 files changed, 9 insertions(+), 127 deletions(-) commit f69bd104b5cded0db547636fddd9512d7e6cfbf3 Author: Takashi Iwai Date: Thu Feb 2 14:57:22 2017 +0100 ALSA: x86: Move stream status into pcm_stream_info The only remaining field in struct had_stream_data is stream_type that holds the current stream status. Such information fits better in struct pcm_stream_info, so move it as a boolean "running" field to be clearer. This allows us to get rid or had_stream_data definition and references. Also, the superfluous status check get removed in a couple of places where we can call PCM helpers in anyway. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 50 +++++++++++----------------------------- sound/x86/intel_hdmi_audio.h | 6 +---- sound/x86/intel_hdmi_lpe_audio.h | 8 ------- 3 files changed, 14 insertions(+), 50 deletions(-) commit 182cdf23dbf6672954ac646871bf5902050268c7 Author: Takashi Iwai Date: Thu Feb 2 14:43:39 2017 +0100 ALSA: x86: Implement runtime PM Although the driver has some PM callbacks, it doesn't do it right: - the suspend callback doesn't handle to suspend the running PCM, - the runtime PM ops are missing, - pm_runtime_get_sync() isn't used at the right place. This patch covers the above and provides the basic runtime PM functionality. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 127 +++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 77 deletions(-) commit 313d9f28c1d5e0254ca16f2df0f1b737e30c0993 Author: Takashi Iwai Date: Thu Feb 2 13:00:12 2017 +0100 ALSA: x86: Properly manage PCM substream lifetype The PCM substream is referred not only in the PCM callbacks but also in the irq handler and in the hotplug/unplug codes. The latter code paths don't take the PCM lock, thus the PCM may be released unexpectedly while calling PCM helper functions or accessing pcm->runtime fields. This patch implements a simple refcount to assure the PCM substream accessibility while the other codes are accessing. It needed some code refactoring in the relevant functions for avoiding the doubly spinlocks. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 169 ++++++++++++++++++++++++------------------- sound/x86/intel_hdmi_audio.h | 3 +- 2 files changed, 98 insertions(+), 74 deletions(-) commit 7d9e79869ba2a8a552f4c2cf1df44cf9a0822f02 Author: Takashi Iwai Date: Wed Feb 1 22:25:58 2017 +0100 ALSA: x86: Drop unused fields from pcm_stream_info The struct pcm_stream_info contains a few unused or useless fields. str_id is always zero, buffer_ptr is volatile, never read, and sfreq is nowhere referred. Kill them. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 19 +------------------ sound/x86/intel_hdmi_audio.h | 3 --- 2 files changed, 1 insertion(+), 21 deletions(-) commit fa5dfe6a01481a8fa00469be42ea32beb468a501 Author: Takashi Iwai Date: Wed Feb 1 22:03:26 2017 +0100 ALSA: x86: Drop redundant had_stream_pvt The had_stream_pvt struct assigned to PCM runtime private data tracks merely the stream running status, and the very same information is carried by had_stream->stream_type. Kill it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 46 ++++------------------------------------ sound/x86/intel_hdmi_audio.h | 6 ------ sound/x86/intel_hdmi_lpe_audio.h | 15 ------------- 3 files changed, 4 insertions(+), 63 deletions(-) commit 0e9c67d7c88ce7054288e3b61deb09bfa59f8920 Author: Takashi Iwai Date: Wed Feb 1 17:53:19 2017 +0100 ALSA: x86: Drop superfluous state field The state field keeps the connection state and it's basically as same as drv_status field. Drop this redundancy. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 56 ++++++++++++++-------------------------- sound/x86/intel_hdmi_audio.h | 3 +-- sound/x86/intel_hdmi_lpe_audio.h | 6 ----- 3 files changed, 21 insertions(+), 44 deletions(-) commit d0e9b1a23ca3dbe24e88c6671218b9031e37db96 Author: Takashi Iwai Date: Wed Feb 1 17:37:36 2017 +0100 ALSA: x86: Drop flag_underrun field The flag_underrun flag is used to indicate to escalate the XRUN reporting at the next position inquiry, but there is a much simpler method to achieve it: just call snd_pcm_stop_xrun(). Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 9 +-------- sound/x86/intel_hdmi_audio.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) commit 8f8d1d7fe009c320d80ed1c7b0c1d3d48b538965 Author: Takashi Iwai Date: Wed Feb 1 17:24:02 2017 +0100 ALSA: x86: Fix racy access to chmap The access to chmap can be racy against the hotplug process, where it recreates the chmap on the fly. For protecting against it, a mutex is introduced in this patch. It's also used for protecting the change / reference of eld and state fields, too. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 32 +++++++++++++++++++++++--------- sound/x86/intel_hdmi_audio.h | 1 + 2 files changed, 24 insertions(+), 9 deletions(-) commit bcce775ca8d66a5222ac2d28e5388b5a6c2d9ad6 Author: Takashi Iwai Date: Wed Feb 1 17:18:20 2017 +0100 ALSA: x86: Remove superfluous irqsave flags We don't need to use irqsave/irqrestore versions for each spin lock, but judge the context properly and use the simpler versions. Also add some (still simplistic) comments to functions. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 71 ++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 38 deletions(-) commit 4a5ddb2cb1ef624300d1e66e9e6974cd37b7012f Author: Takashi Iwai Date: Wed Feb 1 16:45:38 2017 +0100 ALSA: x86: Constfy tables Some tables can be defined as const. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4151ee845ad8230d18ac4a0e0bf1037180c6d2d9 Author: Takashi Iwai Date: Tue Jan 31 18:14:15 2017 +0100 ALSA: x86: Remove _v[12] suffices Although we dropped the most of the obsoleted *_v1 definitions and codes, some codes still keep the _v1 or _v2 suffices. Now they are ripped off. The only thing to be done carefully here is the definition of control offsets. The original code defines enum hdmi_ctrl_reg_offset_v1 and a few new elements just for v2 on its top. After this cleanup, we remove the old AUD_HDMI_STATUS and AUD_HDMIW_INFOFR definitions and replace with the v2 values. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 46 ++++++++++++++++++++-------------------- sound/x86/intel_hdmi_audio.h | 2 +- sound/x86/intel_hdmi_lpe_audio.h | 24 ++++++--------------- 3 files changed, 31 insertions(+), 41 deletions(-) commit 2e52f5e518fb79aca459fcd25c3b8f185aa4bcf7 Author: Takashi Iwai Date: Tue Jan 31 17:09:13 2017 +0100 ALSA: x86: Tidy up codes Clean up codes, fix indentations, correct comments, etc. No functional change. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 148 +++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 89 deletions(-) commit 79f439ea4007b94beeb8ba1e00e71f9d128b0f90 Author: Takashi Iwai Date: Tue Jan 31 16:46:44 2017 +0100 ALSA: x86: Drop had_get_hwstate() The helper function isn't clearer than the plain condition check "if (drv_status == HDA_DRV_DISCONNECTED)". By expanding this, the compiler could even catch the possible uninitialized cases, so we could fix them, too. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit caa2a61a702a2a391b2fb695fc245ca5b8a4ffd8 Author: Takashi Iwai Date: Tue Jan 31 16:38:22 2017 +0100 ALSA: x86: Remove superfluous check at resume The had_get_hwstate() is identical with drv_status==DISCONECTED, which was already checked before the call. And, returning an error at resume is simply bad. That is, we should just kill this check. Also, spewing an error at resume for drv_status!=SUSPENDED is also annoying, as this is the normal case when the suspend was called without the monitor connection. Make it debug, too. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 99b2ab9d3aa08824dfefd7d9ad9f2b4c19555d05 Author: Takashi Iwai Date: Tue Jan 31 16:26:10 2017 +0100 ALSA: x86: Fix sleep-in-atomic via i915 notification i915 notification is executed in a spinlock, thus it must not sleep; i.e. we can't use kmalloc with GFP_KERNEL or such. For making it working properly, move the notification handler in a work, and handle it gracefully. We have already such a work, and it was used just at the start. This can be re-used in a more generic hotplug handling. Also, the patch adds the proper call of cancel_work_sync() to the destructor. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 51 +++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit f6a82a0c01e51dd494b6eb68861473368355e58b Author: Takashi Iwai Date: Tue Jan 31 16:17:14 2017 +0100 ALSA: x86: Drop superfluous PCM private_free snd_pcm_lib_preallocate_free_for_all() doesn't have to be called from each driver as it's called in the PCM core. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 12 ------------ 1 file changed, 12 deletions(-) commit e9d65abfa63fad3da372a3852dcade88b5506f4c Author: Takashi Iwai Date: Tue Jan 31 16:11:27 2017 +0100 ALSA: x86: Drop unused fields from snd_intelhad struct Also change the flag_underrun to bool to be clearer. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 14 +++++--------- sound/x86/intel_hdmi_audio.h | 14 +------------- 2 files changed, 6 insertions(+), 22 deletions(-) commit df76df12f178642cac616b86a762d2ee749fe402 Author: Takashi Iwai Date: Tue Jan 31 16:04:10 2017 +0100 ALSA: x86: Remove indirect call of snd_pcm_period_elapsed() Again another indirect call... Let's straighten it up. Also define the had_stream field with a proper type instead of a void pointer. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 15 ++++++--------- sound/x86/intel_hdmi_audio.h | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) commit e29c0f967261b0f6a95e05a224341be8f59df2d5 Author: Takashi Iwai Date: Wed Feb 1 17:27:48 2017 +0100 ALSA: x86: Fix for CONFIG_PM=n The direct access to power.runtime_status is taboo, let's use a helper macro to avoid the compile error with CONFIG_PM=n. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c75b0476245ad01306e4ea510bb3f7591767079f Author: Takashi Iwai Date: Tue Jan 31 15:49:15 2017 +0100 ALSA: x86: Replace pr_xxx() with dev_xxx() dev_xxx() helpers give a tidier output in general. While we're at it, remove many useless debug prints (e.g. the ones at each function entry), replace some too verbose errors with debugs, and use WARN_ON() for some serious errors. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 205 ++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 121 deletions(-) commit 372d855f87b535005e392094afff9927bc000cf9 Author: Takashi Iwai Date: Tue Jan 31 13:57:58 2017 +0100 ALSA: x86: Fold intel_hdmi_audio_if.c into main file As the very last step, we fold intel_hdmi_audio_if.c into the main file, intel_hdmi_audio.c. This is merely a cleanup, and no functional change. By this move, we can mark all functions and variables as static, which allows the compiler more optimizations. Signed-off-by: Takashi Iwai sound/x86/Makefile | 3 +- sound/x86/intel_hdmi_audio.c | 391 ++++++++++++++++++++++++++++++++++++++-- sound/x86/intel_hdmi_audio.h | 31 ---- sound/x86/intel_hdmi_audio_if.c | 390 --------------------------------------- 4 files changed, 376 insertions(+), 439 deletions(-) commit da8648097497505d05d8cff6892351f99c029791 Author: Takashi Iwai Date: Tue Jan 31 13:52:22 2017 +0100 ALSA: x86: Flatten two abstraction layers This is the final stage for a big clean-up series. Here we flatten the two layers into one. Formerly, the implementation was split to HDMI "shell" that talks with the platform device, and HDMI audio part that communicates via caps and other event handlers. All these would be good if there were multiple instantiations or if there were data protection. But neither are true in our case. That said, it'll be easier to have a flat driver structure in the end. In this patch, the former struct hdmi_lpe_audio_ctx is forged into the existing struct snd_intelhad. The latter has already a few members that are basically the copy from the former. Only a few new members for the lowlevel I/O are added by this change. Then, the had_get_caps() and had_set_caps() are simply replaced with the direct calls to copy the data in the struct fields. Also, the had_event_handler() calls are replaced with the direct call for each event as well. Signed-off-by: Takashi Iwai sound/x86/Makefile | 3 +- sound/x86/intel_hdmi_audio.c | 476 ++++++++++++++++++++++++++------------- sound/x86/intel_hdmi_audio.h | 37 +-- sound/x86/intel_hdmi_audio_if.c | 128 ++--------- sound/x86/intel_hdmi_lpe_audio.c | 462 ------------------------------------- sound/x86/intel_hdmi_lpe_audio.h | 23 +- 6 files changed, 358 insertions(+), 771 deletions(-) commit eeb756c5bf7566fd79312798a32f59e594688b79 Author: Takashi Iwai Date: Tue Jan 31 11:06:34 2017 +0100 ALSA: x86: Drop unused hdmi_audio_query() It's used nowhere. Kill it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.h | 1 - sound/x86/intel_hdmi_audio_if.c | 54 ----------------------------------------- 2 files changed, 55 deletions(-) commit 36ec0d99bbd7bb392bf64059cbda1818ee2be5a2 Author: Takashi Iwai Date: Tue Jan 31 08:47:05 2017 +0100 ALSA: x86: Call snd_card_register() at the end The card registration should be done at the last stage of the probe procedure. Otherwise user-space may access to the device before the whole initialization is done. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 301cf8a9559bb372ab64da3781d3d93d1ce38213 Author: Takashi Iwai Date: Tue Jan 31 08:44:23 2017 +0100 ALSA: x86: Check platform_data earlier Just a minor optimization; check the presence of platform_data earlier in the probe function before actually starting allocation, which makes the error path easier. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit c415022e487fbba19926b56b981c5474474c0465 Author: Takashi Iwai Date: Tue Jan 31 08:42:50 2017 +0100 ALSA: x86: Drop superfluous CHT PCI ID check Since the config base offset is now set per pipe id, we don't have to check Cherry Trail PCI IDs any longer. Currently it's used only for debug prints. Let's drop it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 14 -------------- 1 file changed, 14 deletions(-) commit 5647aec26640ffdf099d51b3403eaeac10d74147 Author: Takashi Iwai Date: Tue Jan 31 08:14:34 2017 +0100 ALSA: x86: Embed snd_intelhad into snd_card Instead of allocating snd_intelhad struct, use the card's private_data and embed it. It simplifies the code a lot. While we're at it, embed had_stream into snd_intelhad struct instead of individually allocating, and rename had_pvt_data to a bit more specific name, had_stream_data. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 77 +++++++---------------------------------- sound/x86/intel_hdmi_audio.h | 4 +-- sound/x86/intel_hdmi_audio_if.c | 32 ++++++++--------- 3 files changed, 31 insertions(+), 82 deletions(-) commit dae15a9d960e513d5b60c00c306cddd87465f1c4 Author: Takashi Iwai Date: Tue Jan 31 08:02:16 2017 +0100 ALSA: x86: Move dma_mask debug print into intel_hdmi_lpe_audio.c It belongs to the right place. And, remove a few sanity checks (e.g. NULL card) and debug prints as well. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 11 ----------- sound/x86/intel_hdmi_lpe_audio.c | 1 + 2 files changed, 1 insertion(+), 11 deletions(-) commit 4fed1b125eb6252bde478665fc05d4819f774fa8 Author: Jan Beulich Date: Fri Feb 3 01:54:05 2017 -0700 xen/manage: correct return value check on xenbus_scanf() A negative return value indicates an error; in fact the function at present won't ever return zero. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2987aaf0c9c2bcb0d4c5902d61473d9aa018a3d Author: Javier Martinez Canillas Date: Tue Jan 24 19:42:26 2017 -0200 [media] exynos-gsc: Avoid spamming the log on VIDIOC_TRY_FMT There isn't an ioctl to enum the supported field orders, so a user-space application can call VIDIOC_TRY_FMT using different field orders to know if one is supported. For example, GStreamer does this so during playback dozens of the following messages appear in the kernel log buffer: [ 442.143393] Not supported field order(4) Instead of printing this as an error, just keep it as debug information. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e18060f99a42c20f87d64eb30e5f424509643ae Author: Takashi Iwai Date: Tue Jan 31 07:53:56 2017 +0100 ALSA: x86: Drop unused hw_silence field It's nowhere used. Let's drop it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 1 - sound/x86/intel_hdmi_audio.h | 2 -- 2 files changed, 3 deletions(-) commit 6ddb3ab66f94109c524859ba4dd9d43772893676 Author: Takashi Iwai Date: Mon Jan 30 18:17:44 2017 +0100 ALSA: x86: Move the global underrun_count to struct snd_intelhad The last one is in intel_hdmi_audio.c, underrun_count: this can be embedded in snd_intelhad object. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 15 +++++++-------- sound/x86/intel_hdmi_audio.h | 2 ++ 2 files changed, 9 insertions(+), 8 deletions(-) commit 7f2e9ab5a2e1afcedd1e50650670c309e46822ac Author: Takashi Iwai Date: Mon Jan 30 18:15:40 2017 +0100 ALSA: x86: Drop global ELD copy Similarly like the previous patch, drop the global variable to keep the ELD copy. It can be embedded in hdmi_lpe_audio_ctx as well. And this makes easier to code, it's just a memcpy(), after all. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 055610b002c1066b8ca1919b8d051d80c9e2d86e Author: Takashi Iwai Date: Mon Jan 30 18:11:13 2017 +0100 ALSA: x86: Drop global hlpe_state Now it's the turn to drop the global hlpe_state variable. It can be gracefully embedded in hdmi_lpe_audio_ctx struct. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit bf8b24f8169096050795b552a778faaac349c73c Author: Takashi Iwai Date: Mon Jan 30 18:09:01 2017 +0100 ALSA: x86: Drop the global platform device reference Instead of referring to the global hlpe_pdev variable, pass the platform device object to each function properly. Accessing to the global object is really ugly and error-prone. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 15 ++-- sound/x86/intel_hdmi_lpe_audio.c | 146 ++++++++++++++++++--------------------- sound/x86/intel_hdmi_lpe_audio.h | 17 +++-- 3 files changed, 87 insertions(+), 91 deletions(-) commit af3e5c9c5d370e262da97fb8a8310a9d578efa0d Author: Takashi Iwai Date: Mon Jan 30 17:44:00 2017 +0100 ALSA: x86: Drop unused mid_hdmi_audio_is_busy() The function is nowhere used. Kill it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 23 ----------------------- sound/x86/intel_hdmi_lpe_audio.h | 1 - 2 files changed, 24 deletions(-) commit 43fab9793c1f44e665b4f98035a14942edf03ddc Author: Mauro Carvalho Chehab Date: Tue Jan 24 08:13:11 2017 -0200 [media] dvb-usb: don't use stack for firmware load As reported by Marc Duponcheel , firmware load on dvb-usb is using the stack, with is not allowed anymore on default Kernel configurations: [ 1025.958836] dvb-usb: found a 'WideView WT-220U PenType Receiver (based on ZL353)' in cold state, will try to load a firmware [ 1025.958853] dvb-usb: downloading firmware from file 'dvb-usb-wt220u-zl0353-01.fw' [ 1025.958855] dvb-usb: could not stop the USB controller CPU. [ 1025.958856] dvb-usb: error while transferring firmware (transferred size: -11, block size: 3) [ 1025.958856] dvb-usb: firmware download failed at 8 with -22 [ 1025.958867] usbcore: registered new interface driver dvb_usb_dtt200u [ 2.789902] dvb-usb: downloading firmware from file 'dvb-usb-wt220u-zl0353-01.fw' [ 2.789905] ------------[ cut here ]------------ [ 2.789911] WARNING: CPU: 3 PID: 2196 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x430/0x560 [usbcore] [ 2.789912] transfer buffer not dma capable [ 2.789912] Modules linked in: btusb dvb_usb_dtt200u(+) dvb_usb_af9035(+) btrtl btbcm dvb_usb dvb_usb_v2 btintel dvb_core bluetooth rc_core rfkill x86_pkg_temp_thermal intel_powerclamp coretemp crc32_pclmul aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd drm_kms_helper syscopyarea sysfillrect pcspkr i2c_i801 sysimgblt fb_sys_fops drm i2c_smbus i2c_core r8169 lpc_ich mfd_core mii thermal fan rtc_cmos video button acpi_cpufreq processor snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd crc32c_intel ahci libahci libata xhci_pci ehci_pci xhci_hcd ehci_hcd usbcore usb_common dm_mirror dm_region_hash dm_log dm_mod [ 2.789936] CPU: 3 PID: 2196 Comm: systemd-udevd Not tainted 4.9.0-gentoo #1 [ 2.789937] Hardware name: ASUS All Series/H81I-PLUS, BIOS 0401 07/23/2013 [ 2.789938] ffffc9000339b690 ffffffff812bd397 ffffc9000339b6e0 0000000000000000 [ 2.789939] ffffc9000339b6d0 ffffffff81055c86 000006300339b6a0 ffff880116c0c000 [ 2.789941] 0000000000000000 0000000000000000 0000000000000001 ffff880116c08000 [ 2.789942] Call Trace: [ 2.789945] [] dump_stack+0x4d/0x66 [ 2.789947] [] __warn+0xc6/0xe0 [ 2.789948] [] warn_slowpath_fmt+0x4a/0x50 [ 2.789952] [] usb_hcd_map_urb_for_dma+0x430/0x560 [usbcore] [ 2.789954] [] ? io_schedule_timeout+0xd8/0x110 [ 2.789956] [] usb_hcd_submit_urb+0x9c/0x980 [usbcore] [ 2.789958] [] ? copy_page_to_iter+0x14f/0x2b0 [ 2.789960] [] ? pagecache_get_page+0x28/0x240 [ 2.789962] [] ? touch_atime+0x20/0xa0 [ 2.789964] [] usb_submit_urb+0x2c4/0x520 [usbcore] [ 2.789967] [] usb_start_wait_urb+0x5a/0xe0 [usbcore] [ 2.789969] [] usb_control_msg+0xbc/0xf0 [usbcore] [ 2.789970] [] usb_cypress_writemem+0x3d/0x40 [dvb_usb] [ 2.789972] [] usb_cypress_load_firmware+0x4f/0x130 [dvb_usb] [ 2.789973] [] ? console_unlock+0x2fe/0x5d0 [ 2.789974] [] ? vprintk_emit+0x27c/0x410 [ 2.789975] [] ? vprintk_default+0x1a/0x20 [ 2.789976] [] ? printk+0x43/0x4b [ 2.789977] [] dvb_usb_download_firmware+0x60/0xd0 [dvb_usb] [ 2.789979] [] dvb_usb_device_init+0x3d8/0x610 [dvb_usb] [ 2.789981] [] dtt200u_usb_probe+0x92/0xd0 [dvb_usb_dtt200u] [ 2.789984] [] usb_probe_interface+0xfc/0x270 [usbcore] [ 2.789985] [] driver_probe_device+0x215/0x2d0 [ 2.789986] [] __driver_attach+0x96/0xa0 [ 2.789987] [] ? driver_probe_device+0x2d0/0x2d0 [ 2.789988] [] bus_for_each_dev+0x5b/0x90 [ 2.789989] [] driver_attach+0x19/0x20 [ 2.789990] [] bus_add_driver+0x11c/0x220 [ 2.789991] [] driver_register+0x5b/0xd0 [ 2.789994] [] usb_register_driver+0x7c/0x130 [usbcore] [ 2.789994] [] ? 0xffffffffa06a5000 [ 2.789996] [] dtt200u_usb_driver_init+0x1e/0x20 [dvb_usb_dtt200u] [ 2.789997] [] do_one_initcall+0x38/0x140 [ 2.789998] [] ? __vunmap+0x7c/0xc0 [ 2.789999] [] ? do_init_module+0x22/0x1d2 [ 2.790000] [] do_init_module+0x5a/0x1d2 [ 2.790002] [] load_module+0x1e11/0x2580 [ 2.790003] [] ? show_taint+0x30/0x30 [ 2.790004] [] ? kernel_read_file+0x100/0x190 [ 2.790005] [] SyS_finit_module+0xba/0xc0 [ 2.790007] [] entry_SYSCALL_64_fastpath+0x13/0x94 [ 2.790008] ---[ end trace c78a74e78baec6fc ]--- So, allocate the structure dynamically. Cc: stable@vger.kernel.org # Kernel 4.9+ Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 2b2d1d403343838401af029bd29b441a414beef3 Author: Christophe JAILLET Date: Mon Jan 23 19:16:56 2017 -0200 [media] exynos4-is: Add missing 'of_node_put' It is likely that a "of_node_put(ep)" is missing here. There is one in the previous error handling code, and one a few lines below in the normal case as well. Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd93e79c602c8219c0b69b0667601ed363b4191a Author: Bhumika Goyal Date: Sat Jan 21 07:45:31 2017 -0200 [media] media: dvb-frontends: constify vb2_ops structure Declare vb2_ops structure as const as it is only stored in the ops field of a vb2_queue structure. This field is of type const, so vb2_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p={...}; @ok1@ identifier r1.i; position p; struct sta2x11_vip vip; struct vb2_queue q; @@ ( vip.vb_vidq.ops=&i@p | q.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct vb2_ops i; File size details of media/dvb-frontends/rtl2832_sdr.o file remains the same before and after applying the patch. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832_sdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b6fe20a5d7bc467865adb08c5abcf9e712cdc39 Author: Bhumika Goyal Date: Sat Jan 21 07:37:25 2017 -0200 [media] media: pci: constify vb2_ops structure Declare vb2_ops structure as const as it is only stored in the ops field of a vb2_queue structure. This field is of type const, so vb2_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p={...}; @ok1@ identifier r1.i; position p; struct sta2x11_vip vip; struct vb2_queue q; @@ ( vip.vb_vidq.ops=&i@p | q.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct vb2_ops i; File size before: text data bss dec hex filename 8448 440 0 8888 22b8 media/pci/sta2x11/sta2x11_vip.o File size after: text data bss dec hex filename 8552 352 0 8904 22c8 media/pci/sta2x11/sta2x11_vip.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 909aa003eb7239161f0fa5773878035ed1754cf4 Author: Laurent Pinchart Date: Sun Jan 15 17:05:30 2017 -0200 [media] v4l: subdev: Clean up properly in subdev devnode registration error path Set the subdev devnode pointer right after registration to ensure that later errors won't skip the subdev when unregistering all devnodes. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 033e925f68c92d058f2be67f941804e7e4f06f7c Author: Takashi Iwai Date: Mon Jan 30 17:40:04 2017 +0100 ALSA: x86: Fix possible stale interrupt calls Registering the irq handler at the too early place may cause a system stall because the irq handler may be triggered before the other initializations. Move the irq handler registration to the later point. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 8af7779f3cbc1f6720d15f00abc797493710d1ab Author: Baruch Siach Date: Sun Jan 15 08:33:53 2017 -0200 [media] coda: add Freescale firmware compatibility location The Freescale provided imx-vpu looks for firmware files under /lib/firmware/vpu by default. Make coda look there for firmware files to ease the update path. Cc: Fabio Estevam Signed-off-by: Baruch Siach Reviewed-by: Fabio Estevam Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 ++++ drivers/media/platform/coda/coda.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 44750606b9dd2a3a070c3c17d4e44b3a7b363cf7 Author: Sean Young Date: Thu Feb 2 14:20:36 2017 -0200 [media] mce_kbd: add missing keys from UK layout The UK layout of the Microsoft Remote Keyboard has two missing keys: the hash key, and the messenger key which is sent using rc6 mce. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-mce_kbd-decoder.c | 2 +- drivers/media/rc/keymaps/rc-rc6-mce.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 32002f725fc708dccc6263b19b56fa3d91626be1 Author: Sean Young Date: Wed Feb 1 20:08:56 2017 -0200 [media] lirc: cannot read from tx-only device Bail out early, otherwise we follow a null pointer. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 7a6628b5c321343647bcb8d79cb0d21222597ca5 Author: Martin Blumenstingl Date: Tue Jan 31 19:13:42 2017 -0200 [media] Documentation: devicetree: add the RC map name of the geekbox remote Keep the list up to date with include/media/rc-map.h Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/rc.txt | 1 + 1 file changed, 1 insertion(+) commit 031d3e18f31749dd34a41c886a578a07d2abbed9 Author: Martin Blumenstingl Date: Tue Jan 31 19:21:12 2017 -0200 [media] Documentation: devicetree: meson-ir: "linux,rc-map-name" is supported The driver already parses the "linux,rc-map-name" property. Add this information to the documentation so .dts maintainers don't have to look it up in the source-code. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/meson-ir.txt | 3 +++ 1 file changed, 3 insertions(+) commit d46e0a8bdb6ef581167bb85129febc007e53d205 Author: Wei Yongjun Date: Thu Jan 12 13:32:29 2017 -0200 [media] gp8psk: make local symbol gp8psk_fe_ops static Fixes the following sparse warning: drivers/media/usb/dvb-usb/gp8psk.c:281:28: warning: symbol 'gp8psk_fe_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 634b2b5c65c8eafbd404ac5bc7ac710dcd1ca4eb Author: Wei Yongjun Date: Thu Jan 12 12:30:47 2017 -0200 [media] tm6000: fix typo in parameter description Fix typo in parameter description. Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 437af8f2946231ee141bc2a8d37063a8bb6047b0 Author: Takashi Iwai Date: Mon Jan 30 17:38:00 2017 +0100 ALSA: x86: Call event callback directly Currently the driver calls the event callback stored in its ctx pointer, but it's obviously inefficient. Replace it with the direct calls. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 11 ----------- sound/x86/intel_hdmi_audio.h | 4 ---- sound/x86/intel_hdmi_lpe_audio.c | 17 +---------------- sound/x86/intel_hdmi_lpe_audio.h | 4 ---- 4 files changed, 1 insertion(+), 35 deletions(-) commit dd895f2e9b013a5387372dbf3a7d8405aaeb494e Author: Takashi Iwai Date: Mon Jan 30 17:31:29 2017 +0100 ALSA: x86: Drop useless mutex at probe had_mutex is (supposedly) used to protect the concurrent calls of hdmi_audio_probe(). But we may have only one device at most, so it's utterly useless. Drop it. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 45459d16867988a792a18233bdfc294492976841 Author: Takashi Iwai Date: Tue Jan 31 08:29:56 2017 +0100 ALSA: x86: Handle the error from hdmi_audio_probe() properly The error from hdmi_audio_probe() wasn't handled properly, and it may leave some resources leaked or mapped. Fix it and also clean up the error paths. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 79dda75a2cfc5628f25338122d24ee8789b367cf Author: Takashi Iwai Date: Mon Jan 30 17:23:39 2017 +0100 ALSA: x86: Pass snd_intelhad object to helpers For reducing the global variable reference, keep snd_intelhad object in the context and pass it to each helper. It's a preliminary change for further cleanup. This also includes the simplification of the probe procedure: the LPE platform driver directly gets the created snd_intelhad object by hdmi_audio_probe(), and passes it to each helper and destructor, hdmi_audio_remove(). The hdmi_audio_probe() function doesn't call the back-registration any longer, which is fairly useless. The LPE platform driver initializes the stuff instead at the right place, and calls the wq after the object creation in the probe function itself. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 143 ++++++++++++++++++++------------------- sound/x86/intel_hdmi_audio.h | 24 ++++--- sound/x86/intel_hdmi_audio_if.c | 44 ++++++------ sound/x86/intel_hdmi_lpe_audio.c | 49 +++++--------- sound/x86/intel_hdmi_lpe_audio.h | 1 - 5 files changed, 131 insertions(+), 130 deletions(-) commit 6f9ecc76f4e04b111160d789f36a8c5bf1cc9ab6 Author: Takashi Iwai Date: Mon Jan 30 16:52:06 2017 +0100 ALSA: x86: Drop snd_intel_had_interface indirect calls Yet another indirection is killed: at this time, it's snd_intel_had_interface. It contains also the name string, but it's nowhere used, thus we can kill it, too. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 9 +---- sound/x86/intel_hdmi_audio.h | 2 +- sound/x86/intel_hdmi_audio_if.c | 3 +- sound/x86/intel_hdmi_lpe_audio.c | 87 +++++++++------------------------------- sound/x86/intel_hdmi_lpe_audio.h | 13 +----- 5 files changed, 23 insertions(+), 91 deletions(-) commit 9eca88c881f1c74c7f5dda3c67cb0b4178429e93 Author: Takashi Iwai Date: Mon Jan 30 16:37:06 2017 +0100 ALSA: x86: Replace indirect query_ops with direct calls Like the previous patch, this replaces the indirect query_ops calls via direct function calls. They are only get_caps and set_caps, so fairly straightforward at this time. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 10 +++------- sound/x86/intel_hdmi_audio.h | 2 -- sound/x86/intel_hdmi_lpe_audio.c | 26 +++++++------------------- sound/x86/intel_hdmi_lpe_audio.h | 16 ++++++---------- 4 files changed, 16 insertions(+), 38 deletions(-) commit f23df8071b178dcfa4f6014baf9323ddaa33e1fd Author: Takashi Iwai Date: Mon Jan 30 16:29:39 2017 +0100 ALSA: x86: Replace indirect register ops with direct calls Now about the indirect register ops: they are replaced with direct calls, too. The read / write / modify ops are simply replaced with the corresponding functions. The difference is that we calculate the offset inside the function now. So all the had_config_offset references in the caller side are dropped. This also simplifies the DP-audio check in hdmi_audio_write() and hdmi_audio_rmw(). The hdmi_audio_get_register_base is dropped since it's no longer used when the base address and config offset are referred in the read/write functions. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 11 ++--- sound/x86/intel_hdmi_audio.h | 2 - sound/x86/intel_hdmi_audio_if.c | 21 ---------- sound/x86/intel_hdmi_lpe_audio.c | 91 ++++++++++------------------------------ sound/x86/intel_hdmi_lpe_audio.h | 14 ++----- 5 files changed, 30 insertions(+), 109 deletions(-) commit 76296ef0ecec9bb887be22105744e429c6a5422a Author: Takashi Iwai Date: Mon Jan 30 16:09:11 2017 +0100 ALSA: x86: Drop indirect calls of had_ops We have only a single implementation of had_ops, hence there is no merit to use the indirect calls at all. Let's replace it with the direct calls -- which allows the compiler more optimizations. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 85 ++++++++++++++++++----------------------- sound/x86/intel_hdmi_audio.h | 21 ++-------- sound/x86/intel_hdmi_audio_if.c | 4 +- 3 files changed, 42 insertions(+), 68 deletions(-) commit 4812dcc437fbe0ddc2319dae7c31254f57d4ae44 Author: Takashi Iwai Date: Mon Jan 30 15:58:15 2017 +0100 ALSA: x86: Remove v1 ops and structs The v1 code refers to Medfield/Clovertrail. It's not used at all in the current driver, and probably won't be ever. Let's clean this up, then we can go to the next stage of cleanup tasks. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 206 +-------------------------------------- sound/x86/intel_hdmi_lpe_audio.h | 29 ------ 2 files changed, 1 insertion(+), 234 deletions(-) commit 3541f9e8bdebce02458882b66b638d7302c1f616 Author: Eric Dumazet Date: Thu Feb 2 08:04:56 2017 -0800 tcp: add tcp_mss_clamp() helper Small cleanup factorizing code doing the TCP_MAXSEG clamping. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 9 +++++++++ net/ipv4/tcp_ipv4.c | 5 +---- net/ipv4/tcp_minisocks.c | 7 ++----- net/ipv4/tcp_output.c | 14 ++++---------- net/ipv6/tcp_ipv6.c | 5 +---- 5 files changed, 17 insertions(+), 23 deletions(-) commit ff3edc9b8efc8200c25f3a5adfb1c1de0a882dc5 Author: Arnd Bergmann Date: Thu Feb 2 15:49:24 2017 +0100 hns_enet: use cpumask_var_t for on-stack mask On large SMP builds, we can run into a build warning: drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_set_irq_affinity.isra.27': drivers/net/ethernet/hisilicon/hns/hns_enet.c:1242:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] The solution here is to use cpumask_var_t, which can use dynamic allocation when CONFIG_CPUMASK_OFFSTACK is enabled. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit ceef438d613f6d496ca84bad2ddf21786ee0e9f6 Author: Eric Dumazet Date: Thu Feb 2 06:35:36 2017 -0800 virtio_net: remove custom busy_poll Generic NAPI busy polling allows us to remove custom implementations found in drivers. It is possible further optimization could be done by testing napi_complete_done() return value. Signed-off-by: Eric Dumazet Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) commit c45f8e109b6214a80c27d785c044178231ef4990 Author: Eric Dumazet Date: Thu Feb 2 06:09:14 2017 -0800 atl1e: add GRO support It is time to add GRO support to this driver. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d4b729dac35bb265533c79b554578a5ec6df384 Author: Arjun V Date: Thu Feb 2 12:43:29 2017 +0530 cxgb4: Fix uld_send() for ctrl pkts Without any uld being loaded, uld_txq_info[] will be NULL. uld_send() is also used for sending control work requests(for eg: setting filter) that dont require any ulds to be loaded. Hence move uld_txq_info[] assignment after ctrl_xmit(). Also added a NULL check for uld_txq_info[]. Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation of resources for ULD). Signed-off-by: Arjun V Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/sge.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e704eff3ff5138a462443dcd64d071165df18782 Author: Steven Rostedt (VMware) Date: Thu Feb 2 20:34:37 2017 -0500 ftrace: Have set_graph_function handle multiple functions in one write Currently, only one function can be written to set_graph_function and set_graph_notrace. The last function in the list will have saved, even though other functions will be added then removed. Change the behavior to be the same as set_ftrace_function as to allow multiple functions to be written. If any one fails, none of them will be added. The addition of the functions are done at the end when the file is closed. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 105 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 41 deletions(-) commit 649b988b12ddb9aed16047a3d9bb4d7bfdb47221 Author: Steven Rostedt (VMware) Date: Thu Feb 2 20:16:29 2017 -0500 ftrace: Do not hold references of ftrace_graph_{notrace_}hash out of graph_lock The hashs ftrace_graph_hash and ftrace_graph_notrace_hash are modified within the graph_lock being held. Holding a pointer to them and passing them along can lead to a use of a stale pointer (fgd->hash). Move assigning the pointer and its use to within the holding of the lock. Note, it's an rcu_sched protected data, and other instances of referencing them are done with preemption disabled. But the file manipuation code must be protected by the lock. The fgd->hash pointer is set to NULL when the lock is being released. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 0e684b6578ee463ecb5c9a1cd0c20069f063d9f0 Author: Steven Rostedt (VMware) Date: Thu Feb 2 17:58:18 2017 -0500 tracing: Reset parser->buffer to allow multiple "puts" trace_parser_put() simply frees the allocated parser buffer. But it does not reset the pointer that was freed. This means that if trace_parser_put() is called on the same parser more than once, it will corrupt the allocation system. Setting parser->buffer to NULL after free allows it to be called more than once without any ill effect. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) commit ae98d27afc3bde5a48f440d905317602a5cfb0d2 Author: Steven Rostedt (VMware) Date: Thu Feb 2 16:59:06 2017 -0500 ftrace: Have set_graph_functions handle write with RDWR Since reading the set_graph_functions uses seq functions, which sets the file->private_data pointer to a seq_file descriptor. On writes the ftrace_graph_data descriptor is set to file->private_data. But if the file is opened for RDWR, the ftrace_graph_write() will incorrectly use the file->private_data descriptor instead of ((struct seq_file *)file->private_data)->private pointer, and this can crash the kernel. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d4ad9a1ccac31a04a32b5e7547b70428830e0218 Author: Steven Rostedt (VMware) Date: Thu Feb 2 14:03:39 2017 -0500 ftrace: Reset fgd->hash in ftrace_graph_write() fgd->hash is saved and then freed, but is never reset to either ftrace_graph_hash nor ftrace_graph_notrace_hash. But if multiple writes are performed, then the freed hash could be accessed again. # cd /sys/kernel/debug/tracing # head -1000 available_filter_functions > /tmp/funcs # cat /tmp/funcs > set_graph_function Causes: general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC Modules linked in: [...] CPU: 2 PID: 1337 Comm: cat Not tainted 4.10.0-rc2-test-00010-g6b052e9 #32 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012 task: ffff880113a12200 task.stack: ffffc90001940000 RIP: 0010:free_ftrace_hash+0x7c/0x160 RSP: 0018:ffffc90001943db0 EFLAGS: 00010246 RAX: 6b6b6b6b6b6b6b6b RBX: 6b6b6b6b6b6b6b6b RCX: 6b6b6b6b6b6b6b6b RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff8800ce1e1d40 RBP: ffff8800ce1e1d50 R08: 0000000000000000 R09: 0000000000006400 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8800ce1e1d40 R14: 0000000000004000 R15: 0000000000000001 FS: 00007f9408a07740(0000) GS:ffff88011e500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000aee1f0 CR3: 0000000116bb4000 CR4: 00000000001406e0 Call Trace: ? ftrace_graph_write+0x150/0x190 ? __vfs_write+0x1f6/0x210 ? __audit_syscall_entry+0x17f/0x200 ? rw_verify_area+0xdb/0x210 ? _cond_resched+0x2b/0x50 ? __sb_start_write+0xb4/0x130 ? vfs_write+0x1c8/0x330 ? SyS_write+0x62/0xf0 ? do_syscall_64+0xa3/0x1b0 ? entry_SYSCALL64_slow_path+0x25/0x25 Code: 01 48 85 db 0f 84 92 00 00 00 b8 01 00 00 00 d3 e0 85 c0 7e 3f 83 e8 01 48 8d 6f 10 45 31 e4 4c 8d 34 c5 08 00 00 00 49 8b 45 08 <4a> 8b 34 20 48 85 f6 74 13 48 8b 1e 48 89 ef e8 20 fa ff ff 48 RIP: free_ftrace_hash+0x7c/0x160 RSP: ffffc90001943db0 ---[ end trace 999b48216bf4b393 ]--- Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 555fc7813eeada1738eca42aa9f9ebafd7dc23e6 Author: Steven Rostedt (VMware) Date: Thu Feb 2 10:15:22 2017 -0500 ftrace: Replace (void *)1 with a meaningful macro name FTRACE_GRAPH_EMPTY When the set_graph_function or set_graph_notrace contains no records, a banner is displayed of either "#### all functions enabled ####" or "#### all functions disabled ####" respectively. To tell the seq operations to do this, (void *)1 is passed as a return value. Instead of using a hardcoded meaningless variable, define it as a macro. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2b2c279c814112e15577757ec593aa78465e2e56 Author: Steven Rostedt (VMware) Date: Wed Feb 1 15:37:07 2017 -0500 ftrace: Create a slight optimization on searching the ftrace_hash This is a micro-optimization, but as it has to deal with a fast path of the function tracer, these optimizations can be noticed. The ftrace_lookup_ip() returns true if the given ip is found in the hash. If it's not found or the hash is NULL, it returns false. But there's some cases that a NULL hash is a true, and the ftrace_hash_empty() is tested before calling ftrace_lookup_ip() in those cases. But as ftrace_lookup_ip() tests that first, that adds a few extra unneeded instructions in those cases. A new static "always_inlined" function is created that does not perform the hash empty test. This most only be used by callers that do the check first anyway, as an empty or NULL hash could cause a crash if a lookup is performed on it. Also add kernel doc for the ftrace_lookup_ip() main function. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 2b0cce0e190f8f0b37fe8102ae657f5d9eb0976d Author: Steven Rostedt (VMware) Date: Wed Feb 1 12:19:33 2017 -0500 tracing: Add ftrace_hash_key() helper function Replace the couple of use cases that has small logic to produce the ftrace function key id with a helper function. No need for duplicate code. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 1586342e428d80e53f9a926b2e238d2175b9f5b5 Author: Kevin Cheng Date: Tue Jan 10 01:14:29 2017 -0200 [media] em28xx: support for Hauppauge WinTV-dualHD 01595 ATSC/QAM Hauppauge WinTV-dualHD model 01595 is a USB 2.0 dual ATSC/QAM tuner with the following components: USB bridge: Empia em28274 Demodulator: 2x LG LGDT3306a at addresses 0xb2 and 0x1c Tuner: 2x Silicon Labs si2157 at addresses 0xc0 and 0xc4 This patch enables only the first tuner. Signed-off-by: Kevin Cheng Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 19 +++++++++ drivers/media/usb/em28xx/em28xx-dvb.c | 74 +++++++++++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx.h | 1 + 3 files changed, 94 insertions(+) commit 4f75189024f4186a7ff9d56f4a8cb690774412ec Author: Kevin Cheng Date: Tue Jan 10 01:14:18 2017 -0200 [media] lgdt3306a: support i2c mux for use by em28xx Adds an i2c mux to the lgdt3306a demodulator. This was done to support the Hauppauge WinTV-dualHD 01595 USB TV tuner (em28xx), which utilizes two si2157 tuners behind gate control. Signed-off-by: Kevin Cheng Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 2 +- drivers/media/dvb-frontends/lgdt3306a.c | 108 ++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/lgdt3306a.h | 4 ++ 3 files changed, 113 insertions(+), 1 deletion(-) commit 3f7060887294339eaa60e3399cf7ff4d36620395 Author: Davidlohr Bueso Date: Mon Jan 9 13:41:34 2017 -0200 [media] media/usbvision: remove ctrl_urb_wq While the wakeup path seems to be set up, this waitqueue is actually never used as no-one enqueues themselves on the list. As such, wakeups are meaningless without waiters, so lets just get rid of the whole thing. Signed-off-by: Davidlohr Bueso Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-core.c | 2 -- drivers/media/usb/usbvision/usbvision-video.c | 1 - drivers/media/usb/usbvision/usbvision.h | 1 - 3 files changed, 4 deletions(-) commit 96f6a6134766de0d42a98c7758736dde16e0add5 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:38 2017 -0800 scsi: aacraid: update version Update the driver version to 50740 Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ba8fdae311fa2a862304aef2483a1b590104be0 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:37 2017 -0800 scsi: aacraid: Change Driver Version Prefix Change the aacraid driver prefix from 1.2-1 to 1.2.1 Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4babba0af362481e470fb493ea269c2bcd9e9fb Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:36 2017 -0800 scsi: aacraid: Update copyrights Added new copyright messages Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 8 +++++++- drivers/scsi/aacraid/aacraid.h | 32 ++++++++++++++++++++++++++++++++ drivers/scsi/aacraid/commctrl.c | 3 ++- drivers/scsi/aacraid/comminit.c | 3 ++- drivers/scsi/aacraid/commsup.c | 3 ++- drivers/scsi/aacraid/dpcsup.c | 3 ++- drivers/scsi/aacraid/linit.c | 3 ++- drivers/scsi/aacraid/nark.c | 3 ++- drivers/scsi/aacraid/rkt.c | 3 ++- drivers/scsi/aacraid/rx.c | 3 ++- drivers/scsi/aacraid/sa.c | 3 ++- drivers/scsi/aacraid/src.c | 3 ++- 12 files changed, 59 insertions(+), 11 deletions(-) commit c799d519bf088c0c5deb481b0190990417ace1bc Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:35 2017 -0800 scsi: aacraid: Retrieve HBA host information ioctl Added a new ioctl interface to retrieve the host device information. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 52 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/aacraid/commctrl.c | 26 +++++++++++++++++++++ 2 files changed, 78 insertions(+) commit 09867a0e34d20864c3b4b1e49f688470c3f8bdc2 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:34 2017 -0800 scsi: aacraid: Added ioctl to trigger IOP/IWBR reset Added a new ioctl interface to trigger an IOP or IWBR reset from ioctl. Primary used by management utility to trigger resets. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/commctrl.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit 3136432956501f071891c3d4b6194feb2df924a5 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:33 2017 -0800 scsi: aacraid: Added new IWBR reset Added a new IWBR soft reset type, reworked the IOP reset interface for a bit. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 2 - drivers/scsi/aacraid/aacraid.h | 15 +++-- drivers/scsi/aacraid/commsup.c | 17 ++++-- drivers/scsi/aacraid/linit.c | 12 +++- drivers/scsi/aacraid/rx.c | 10 ++-- drivers/scsi/aacraid/sa.c | 2 +- drivers/scsi/aacraid/src.c | 129 ++++++++++++++++++++++++++++++----------- 7 files changed, 133 insertions(+), 54 deletions(-) commit 999b3ffc0f3b12bb9eeafabaa88176bb7acb84a1 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:32 2017 -0800 scsi: aacraid: VPD 83 type3 support This patch adds support to retrieve the unique identifier data (VPD page 83 type3) for Logical drives created on SmartIOC 2000 products. In addition added a sysfs device structure to expose the id information. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 180 ++++++++++++++++++++++++++--------------- drivers/scsi/aacraid/aacraid.h | 2 + drivers/scsi/aacraid/linit.c | 31 +++++++ 3 files changed, 150 insertions(+), 63 deletions(-) commit 954b2b5ac76d6bde80974c0779d36f054e036aa5 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:31 2017 -0800 scsi: aacraid: Added support to abort cmd and reset lun Added task management command support to abort any timed out commands in case of a eh_abort call and to reset lun's in case of eh_reset call. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 48 ++++++ drivers/scsi/aacraid/linit.c | 353 +++++++++++++++++++++++++++++++---------- drivers/scsi/aacraid/src.c | 33 +++- 3 files changed, 346 insertions(+), 88 deletions(-) commit ab5d129f93c91fff74100bcd898d605da461f4a6 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:30 2017 -0800 scsi: aacraid: Add task management functionality Added support to send out task management commands. [mkp: removed // fibsize... ] Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 366 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 362 insertions(+), 4 deletions(-) commit 423400e64d377c0d8a2459795420681177e51e74 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:29 2017 -0800 scsi: aacraid: Include HBA direct interface Added support to send direct pasthru srb commands from management utilty to the controller. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 175 ++++++++++++++++++++++-- drivers/scsi/aacraid/commctrl.c | 294 ++++++++++++++++++++++++++++++---------- drivers/scsi/aacraid/commsup.c | 134 +++++++++++++++--- drivers/scsi/aacraid/dpcsup.c | 136 ++++++++++++------- drivers/scsi/aacraid/linit.c | 1 + drivers/scsi/aacraid/src.c | 118 ++++++++++------ 6 files changed, 669 insertions(+), 189 deletions(-) commit 6223a39fe6fbbeef0877a56dc427a6351f22ef6c Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:28 2017 -0800 scsi: aacraid: Added support for hotplug Added support for drive hotplug add and removal Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 13 ++-- drivers/scsi/aacraid/aacraid.h | 17 ++++- drivers/scsi/aacraid/commsup.c | 137 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+), 7 deletions(-) commit a052865fe2871a3888dbb4ecf8c5dcab77a19ae8 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:27 2017 -0800 scsi: aacraid: Added support to set QD of attached drives Added support to set qd of drives in slave_configure.This only works for HBA1000 attached drives. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 102 ++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 31 deletions(-) commit 71a91ca4f9838433a92f5d4e3d80955a753bda88 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:26 2017 -0800 scsi: aacraid: Retrieve Queue Depth from Adapter FW Retrieved queue depth from fw and saved it for future use. Only applicable for HBA1000 drives. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 78 +++++++++++++++++++++++++++++++++++++++- drivers/scsi/aacraid/aacraid.h | 81 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 157 insertions(+), 2 deletions(-) commit 3d77d84044783533581eec7b6229df1154c0b55f Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:25 2017 -0800 scsi: aacraid: Added support for periodic wellness sync This patch adds a new functions that periodically sync the time of host to the adapter. In addition also informs the adapter that the driver is alive and kicking. Only applicable to the HBA1000 and SMARTIOC2000. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 3 + drivers/scsi/aacraid/commsup.c | 179 ++++++++++++++++++++++++++++++++++------- 2 files changed, 151 insertions(+), 31 deletions(-) commit 113156bcea9ef1e6b3bafc53e64f7812c356b21b Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:24 2017 -0800 scsi: aacraid: Reworked aac_command_thread Reworked aac_command_thread into aac_process_events Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 468 ++++++++++++++++++++++++----------------- 1 file changed, 274 insertions(+), 194 deletions(-) commit f956a669bf1c2a7b273f753023717d630222d2cc Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:23 2017 -0800 scsi: aacraid: Added support for read medium error This patch processes Raw IO read medium errors. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 10 ++++++++++ drivers/scsi/aacraid/aacraid.h | 1 + 2 files changed, 11 insertions(+) commit 3ffd6c5a74d916a10afada8b679df8c964c1479b Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:22 2017 -0800 scsi: aacraid: Added support for response path This patch enables the driver to actually process the I/O, or srb replies from adapter. In addition to any HBA1000 or SmartIOC2000 adapter events. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 34 +++++++++++++++------------ drivers/scsi/aacraid/aacraid.h | 52 +++++++++++++++++++++++------------------- drivers/scsi/aacraid/commsup.c | 17 +++++++++----- drivers/scsi/aacraid/dpcsup.c | 20 ++++++++-------- drivers/scsi/aacraid/src.c | 38 ++++++++++++++++++++++-------- 5 files changed, 99 insertions(+), 62 deletions(-) commit 4ec57fb4edaec523f0f78a0449a3b063749ac58b Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:21 2017 -0800 scsi: aacraid: Process Error for response I/O Make sure that the driver processes error conditions even in the fast response path for response from the adapter. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 289 ++++++++++++++++++++++-------------------- 1 file changed, 151 insertions(+), 138 deletions(-) commit c4e2fbca374b9797276061840dc95708adf512ed Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:20 2017 -0800 scsi: aacraid: Reworked scsi command submission path Moved the READ and WRITE switch cases to the top. Added a default case to the switch case and replaced duplicate scsi result value with a macro. The idea is that since most of scsi commands we care about performance wise are read or write, we need to process them first. Internally the compiler (GCC) converts a switch case into either a jump table or a bunch of if else conditions, so placing the often used read, write cases at the top is an effort in optimization. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 172 +++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 102 deletions(-) commit c83b11e31cf9151974dd78e97af31c0fd07927cb Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:19 2017 -0800 scsi: aacraid: Retrieve and update the device types This patch adds support to retrieve the type of each adapter connected device. Applicable to HBA1000 and SmartIOC2000 products Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 144 ++++++++++++++++++++++++++++++++++++++++- drivers/scsi/aacraid/aacraid.h | 60 ++++++++++++++++- 2 files changed, 202 insertions(+), 2 deletions(-) commit d503e2fde2b6cea168cf1151b2ab52df3f47be88 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:18 2017 -0800 scsi: aacraid: Added sa firmware support sa_firmware adds the capability to differentiate the new SmartIOC family of adapters from the series 8 and below. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 4 ++ drivers/scsi/aacraid/comminit.c | 98 +++++++++++++++++------------------------ drivers/scsi/aacraid/linit.c | 2 +- 3 files changed, 45 insertions(+), 59 deletions(-) commit d1ef4da8487fa698ab619a14b8ab6394bb5156ca Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:17 2017 -0800 scsi: aacraid: added support for init_struct_8 This patch lays the groundwork for supporting the new HBA-1000 controller family.A new INIT structure INIT_STRUCT_8 has been added which allows for a variable size for MSI-x vectors among other things, and is used for both Series-8, HBA-1000 and SmartIOC-2000. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 8 +- drivers/scsi/aacraid/aacraid.h | 100 +++++++++++------ drivers/scsi/aacraid/comminit.c | 239 +++++++++++++++++++++++++--------------- drivers/scsi/aacraid/commsup.c | 13 ++- drivers/scsi/aacraid/linit.c | 2 +- drivers/scsi/aacraid/rkt.c | 2 +- drivers/scsi/aacraid/rx.c | 4 +- drivers/scsi/aacraid/sa.c | 4 +- drivers/scsi/aacraid/src.c | 27 +++-- 9 files changed, 261 insertions(+), 138 deletions(-) commit 24b043cb6150c21ac02d8edc5c2ba08a0d589ea0 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:16 2017 -0800 scsi: aacraid: Added aacraid.h include guard Added aacraid.h include guard Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 3 +++ 1 file changed, 3 insertions(+) commit d3e19175004583c65361e96da424175b99c3e715 Author: Raghava Aditya Renukunta Date: Thu Feb 2 15:53:15 2017 -0800 scsi: aacraid: Remove duplicate irq management code Removed duplicate code that for acquiring and releasing irqs Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 58 +++----------------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) commit a074faad512605a5bb5f7862e796485e6df572d2 Author: Fabian Frederick Date: Tue Jan 24 21:48:35 2017 +0100 udf: simplify udf_ioctl() "out" label was only returning error code. Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/file.c | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) commit 757b435aaabe5e76fc8c85f767061c70a98c0218 Author: Ard Biesheuvel Date: Thu Feb 2 17:33:19 2017 +0000 efi: arm64: Add vmlinux debug link to the Image binary When building with debugging symbols, take the absolute path to the vmlinux binary and add it to the special PE/COFF debug table entry. This allows a debug EFI build to find the vmlinux binary, which is very helpful in debugging, given that the offset where the Image is first loaded by EFI is highly unpredictable. On implementations of UEFI that choose to implement it, this information is exposed via the EFI debug support table, which is a UEFI configuration table that is accessible both by the firmware at boot time and by the OS at runtime, and lists all PE/COFF images loaded by the system. The format of the NB10 Codeview entry is based on the definition used by EDK2, which is our primary reference when it comes to the use of PE/COFF in the context of UEFI firmware. Signed-off-by: Ard Biesheuvel [will: use realpath instead of shell invocation, as discussed on list] Signed-off-by: Will Deacon arch/arm64/Kconfig.debug | 8 ++++++++ arch/arm64/kernel/Makefile | 4 ++++ arch/arm64/kernel/head.S | 47 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 1 deletion(-) commit 12ed1faece3f141c2604b5b3a8377ba71d23ec9d Author: James Hogan Date: Tue Dec 13 22:39:39 2016 +0000 KVM: MIPS: Allow multiple VCPUs to be created Increase the maximum number of MIPS KVM VCPUs to 8, and implement the KVM_CAP_NR_VCPUS and KVM_CAP_MAX_CPUS capabilities which expose the recommended and maximum number of VCPUs to userland. The previous maximum of 1 didn't allow for any form of SMP guests. We calculate the values similarly to ARM, recommending as many VCPUs as there are CPUs online in the system. This will allow userland to know how many VCPUs it is possible to create. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/mips.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit ad58d4d4a274e9290725188c557d16e7d0cd1b3d Author: James Hogan Date: Mon Feb 2 22:55:17 2015 +0000 KVM: MIPS/T&E: Expose read-only CP0_IntCtl register Expose the CP0_IntCtl register through the KVM register access API, which is a required register since MIPS32r2. It is currently read-only since the VS field isn't implemented due to lack of Config3.VInt or Config3.VEIC. It is implemented in trap_emul.c so that a VZ implementation can allow writes. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Documentation/virtual/kvm/api.txt | 1 + arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/trap_emul.c | 7 +++++++ 3 files changed, 9 insertions(+) commit 013044cc65f8661c5fa2b59da5e134b3453d975d Author: James Hogan Date: Wed Dec 7 17:16:37 2016 +0000 KVM: MIPS/T&E: Expose CP0_EntryLo0/1 registers Expose the CP0_EntryLo0 and CP0_EntryLo1 registers through the KVM register access API. This is fairly straightforward for trap & emulate since we don't support the RI and XI bits. For the sake of future proofing (particularly for VZ) it is explicitly specified that the API always exposes the 64-bit version of these registers (i.e. with the RI and XI bits in bit positions 63 and 62 respectively), and they are implemented in trap_emul.c rather than mips.c to allow them to be implemented differently for VZ. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Documentation/virtual/kvm/api.txt | 8 ++++++++ arch/mips/include/asm/kvm_host.h | 2 ++ arch/mips/kvm/trap_emul.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+) commit be67a0be94b65746dee63af5c184c78d00a707f6 Author: James Hogan Date: Wed Jan 18 16:20:31 2017 +0000 KVM: MIPS/T&E: Default to reset vector Set the default VCPU state closer to the architectural reset state, with PC pointing at the reset vector (uncached PA 0x1fc00000, which for KVM T&E is VA 0x5fc00000), and with CP0_Status.BEV and CP0_Status.ERL to 1. Although QEMU at least will overwrite this state, it makes sense to do this now that CP0_EBase is properly implemented to check BEV, and now that we support a sparse GPA layout potentially with a boot ROM at GPA 0x1fc00000. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7801bbe1bd907a8f8b136fc184583260508febb6 Author: James Hogan Date: Mon Nov 14 23:59:27 2016 +0000 KVM: MIPS/T&E: Implement CP0_EBase register The CP0_EBase register is a standard feature of MIPS32r2, so we should always have been implementing it properly. However the register value was ignored and wasn't exposed to userland. Fix the emulation of exceptions and interrupts to use the value stored in guest CP0_EBase, and fix the masks so that the top 3 bits (rather than the standard 2) are fixed, so that it is always in the guest KSeg0 segment. Also add CP0_EBASE to the KVM one_reg interface so it can be accessed by userland, also allowing the CPU number field to be written (which isn't permitted by the guest). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Documentation/virtual/kvm/api.txt | 1 + arch/mips/include/asm/kvm_host.h | 3 ++ arch/mips/kvm/emulate.c | 73 ++++++++++++++++++++++----------------- arch/mips/kvm/interrupt.c | 5 +-- arch/mips/kvm/trap_emul.c | 12 +++++++ 5 files changed, 61 insertions(+), 33 deletions(-) commit 654229a02456a9af372defb13d1911345360074d Author: James Hogan Date: Thu Dec 8 22:46:41 2016 +0000 KVM: MIPS/T&E: Move CP0 register access into T&E Access to various CP0 registers via the KVM register access API needs to be implementation specific to allow restrictions to be made on changes, for example when VZ guest registers aren't present, so move them all into trap_emul.c in preparation for VZ. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 - arch/mips/kvm/emulate.c | 2 +- arch/mips/kvm/mips.c | 198 --------------------------------------- arch/mips/kvm/trap_emul.c | 181 ++++++++++++++++++++++++++++++++++- 4 files changed, 179 insertions(+), 203 deletions(-) commit 230c57244c2c4d945dba7f9d15845bffe4135b58 Author: James Hogan Date: Fri May 8 17:11:49 2015 +0100 KVM: MIPS: Claim KVM_CAP_READONLY_MEM support Now that load/store faults due to read only memory regions are treated as MMIO accesses it is safe to claim support for read only memory regions (KVM_CAP_READONLY_MEM). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/uapi/asm/kvm.h | 2 ++ arch/mips/kvm/mips.c | 1 + 2 files changed, 3 insertions(+) commit 411740f5422a960c30a4285343d821b62daec34b Author: James Hogan Date: Tue Dec 13 16:32:39 2016 +0000 KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU Implement the SYNC_MMU capability for KVM MIPS, allowing changes in the underlying user host virtual address (HVA) mappings to be promptly reflected in the corresponding guest physical address (GPA) mappings. This allows for several features to work with guest RAM which require mappings to be altered or protected, such as copy-on-write, KSM (Kernel Samepage Merging), idle page tracking, memory swapping, and guest memory ballooning. There are two main aspects of this change, described below. The KVM MMU notifier architecture callbacks are implemented so we can be notified of changes in the HVA mappings. These arrange for the guest physical address (GPA) page tables to be modified and possibly for derived mappings (GVA page tables and TLBs) to be flushed. - kvm_unmap_hva[_range]() - These deal with HVA mappings being removed, for example before a copy-on-write takes place, which requires the corresponding GPA page table mappings to be removed too. - kvm_set_spte_hva() - These update a GPA page table entry to match the new HVA entry, but must be careful to respect KVM specific configuration such as not dirtying a clean guest page which is dirty to the host, and write protecting writable pages in read only memslots (which will soon be supported). - kvm[_test]_age_hva() - These update GPA page table entries to be old (invalid) so that access can be tracked, making them young again. The GPA page fault handling (kvm_mips_map_page) is updated to use gfn_to_pfn_prot() (which may provide read-only pages), to handle asynchronous page table invalidation from MMU notifier callbacks, and to handle more cases in the fast path. - mmu_notifier_seq is used to detect asynchronous page table invalidations while we're holding a pfn from gfn_to_pfn_prot() outside of kvm->mmu_lock, retrying if invalidations have taken place, e.g. a COW or a KSM page merge. - The fast path (_kvm_mips_map_page_fast) now handles marking old pages as young / accessed, and disallowing dirtying of clean pages that aren't actually writable (e.g. shared pages that should COW, and read-only memory regions when they are enabled in a future patch). - Due to the use of MMU notifications we no longer need to keep the page references after we've updated the GPA page tables. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 13 +++ arch/mips/kvm/Kconfig | 1 + arch/mips/kvm/mips.c | 1 + arch/mips/kvm/mmu.c | 235 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 233 insertions(+), 17 deletions(-) commit f9b11e51f89f6d2eca2ca8f41bb0ceb07c943e60 Author: James Hogan Date: Tue Dec 6 14:59:43 2016 +0000 KVM: MIPS/MMU: Pass GPA PTE bits to mapped GVA PTEs Propagate the GPA PTE protection bits on to the GVA PTEs on a mapped fault (except _PAGE_WRITE, and filtered by the guest TLB entry), rather than always overriding the protection. This allows dirty page tracking to work in mapped guest segments as a clear dirty bit in the GPA PTE will propagate to the GVA PTEs even when the guest TLB has the dirty bit set. Since the filtering of protection bits is now abstracted, if the buddy GVA PTE is also valid, we obtain the corresponding GPA PTE using a simple non-allocating walk and load that into the GVA PTE similarly (which may itself be invalid). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 56 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 19 deletions(-) commit b584f460e6d6f1bf968acfcd23aceb663ba996fa Author: James Hogan Date: Tue Dec 6 14:59:28 2016 +0000 KVM: MIPS/MMU: Pass GPA PTE bits to KSeg0 GVA PTEs Propagate the GPA PTE protection bits on to the GVA PTEs on a KSeg0 fault (except _PAGE_WRITE), rather than always overriding the protection. This allows dirty page tracking to work in KSeg0 as a clear dirty bit in the GPA PTE will propagate to the GVA PTEs. This makes it simpler to use a single kvm_mips_map_page() to obtain both the main GPA PTE and its buddy (which may be invalid), which also allows memory regions to be fully accessible when they don't start and end on a 2*PAGE_SIZE boundary. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit b5f1dd1ba4042bda191cd2e72726c920e6c2867f Author: James Hogan Date: Tue Dec 6 14:57:10 2016 +0000 KVM: MIPS/MMU: Handle dirty logging on GPA faults Update kvm_mips_map_page() to handle logging of dirty guest physical pages. Upcoming patches will propagate the dirty bit to the GVA page tables. A fast path is added for handling protection bits that can be resolved without calling into KVM, currently just dirtying of clean pages being written to. The slow path marks the GPA page table entry writable only on writes, and at the same time marks the page dirty in the dirty page logging bitmask. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) commit a1ac9e17b7c934666a780772866135b9fea17f4c Author: James Hogan Date: Tue Dec 6 14:56:20 2016 +0000 KVM: MIPS: Clean & flush on dirty page logging enable When an existing memory region has dirty page logging enabled, make the entire slot clean (read only) so that writes will immediately start logging dirty pages (once the dirty bit is transferred from GPA to GVA page tables in an upcoming patch). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e88643ba1acb48fa30345ba75cc324d7181aa2bf Author: James Hogan Date: Tue Dec 6 14:50:52 2016 +0000 KVM: MIPS/MMU: Use generic dirty log & protect helper MIPS hasn't up to this point properly supported dirty page logging, as pages in slots with dirty logging enabled aren't made clean, and tlbmod exceptions from writes to clean pages have been assumed to be due to guest TLB protection and unconditionally passed to the guest. Use the generic dirty logging helper kvm_get_dirty_log_protect() to properly implement kvm_vm_ioctl_get_dirty_log(), similar to how ARM does. This uses xchg to clear the dirty bits when reading them, rather than wiping them out afterwards with a memset, which would potentially wipe recently set bits that weren't caught by kvm_get_dirty_log(). It also makes the pages clean again using the kvm_arch_mmu_enable_log_dirty_pt_masked() architecture callback so that further writes after the shadow memslot is flushed will trigger tlbmod exceptions and dirty handling. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/Kconfig | 1 + arch/mips/kvm/mips.c | 42 +++++++++++++++++++++++------------------- arch/mips/kvm/mmu.c | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 19 deletions(-) commit f0c0c330f7bb1a640968798b63c0dffc6a8af0ec Author: James Hogan Date: Tue Dec 6 14:47:47 2016 +0000 KVM: MIPS/MMU: Add GPA PT mkclean helper Add a helper function to make a range of guest physical address (GPA) mappings in the GPA page table clean so that writes can be caught. This will be used in a few places to manage dirty page logging. Note that until the dirty bit is transferred from GPA page table entries to GVA page table entries in an upcoming patch this won't trigger a TLB modified exception on write. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/mmu.c | 124 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) commit 64ebc9e24074403c4127b06c0203f3e7b3367e69 Author: James Hogan Date: Tue Dec 13 13:02:36 2016 +0000 KVM: MIPS/T&E: Handle read only GPA in TLB mod Rewrite TLB modified exception handling to handle read only GPA memory regions, instead of unconditionally passing the exception to the guest. If the guest TLB is not the cause of the exception we call into the normal TLB fault handling depending on the memory segment, which will soon attempt to remap the physical page to be writable (handling dirty page tracking or copy on write in the process). Failing that we fall back to treating it as MMIO, due to a read only memory region. Once the capability is enabled, this will allow read only memory regions (such as the Malta boot flash as emulated by QEMU) to have writes treated as MMIO, while still allowing reads to run untrapped. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 5 --- arch/mips/kvm/emulate.c | 31 ------------------ arch/mips/kvm/trap_emul.c | 69 +++++++++++++++++++++++++--------------- 3 files changed, 43 insertions(+), 62 deletions(-) commit b8f79ddb7db95bb675b3d6009e7a4274161e1e53 Author: James Hogan Date: Mon May 11 23:31:45 2015 +0100 KVM: MIPS/T&E: Treat unhandled guest KSeg0 as MMIO Treat unhandled accesses to guest KSeg0 as MMIO, rather than only host KSeg0 addresses. This will allow read only memory regions (such as the Malta boot flash as emulated by QEMU) to have writes (before reads) treated as MMIO, and unallocated physical addresses to have all accesses treated as MMIO. The MMIO emulation uses the gva_to_gpa callback, so this is also updated for trap & emulate to handle guest KSeg0 addresses. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 1 - arch/mips/kvm/trap_emul.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) commit 420ea09b645b0fb05b326a539190c41ee900ef50 Author: James Hogan Date: Tue Dec 6 19:27:18 2016 +0000 KVM: MIPS/T&E: Abstract bad access handling Abstract the handling of bad guest loads and stores which may need to trigger an MMIO, so that the same code can be used in a later patch for guest KSeg0 addresses (TLB exception handling) as well as for host KSeg1 addresses (existing address error exception and TLB exception handling). We now use kvm_mips_emulate_store() and kvm_mips_emulate_load() directly rather than the more generic kvm_mips_emulate_inst(), as there is no need to expose emulation of any other instructions. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 119 ++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 47 deletions(-) commit 577ed7f71e9c37a46c45a7bd9a392dd0372a409c Author: James Hogan Date: Fri May 1 14:56:31 2015 +0100 KVM: MIPS: Pass type of fault down to kvm_mips_map_page() kvm_mips_map_page() will need to know whether the fault was due to a read or a write in order to support dirty page tracking, KVM_CAP_SYNC_MMU, and read only memory regions, so get that information passed down to it via new bool write_fault arguments to various functions. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 9 ++++++--- arch/mips/kvm/emulate.c | 7 ++++--- arch/mips/kvm/mmu.c | 21 +++++++++++++-------- arch/mips/kvm/trap_emul.c | 4 ++-- 4 files changed, 25 insertions(+), 16 deletions(-) commit 89d6ad8a6b26a51f6fdfd356a56681a11f309bba Author: James Hogan Date: Wed Dec 14 01:58:44 2016 +0000 KVM: MIPS/T&E: Ignore user writes to CP0_Config7 Ignore userland writes to CP0_Config7 rather than reporting an error, since we do allow reads of this register and it is claimed to exist in the ioctl API. This allows userland to blindly save and restore KVM registers without having to special case certain registers as not being writable, for example during live migration once dirty page logging is fixed. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 3 +++ 1 file changed, 3 insertions(+) commit b6209110863363b55dd60fe28a993e5367d4a215 Author: James Hogan Date: Tue Oct 25 00:01:37 2016 +0100 KVM: MIPS: Implement kvm_arch_flush_shadow_all/memslot Implement the kvm_arch_flush_shadow_all() and kvm_arch_flush_shadow_memslot() KVM functions for MIPS to allow guest physical mappings to be safely changed. The general MIPS KVM code takes care of flushing of GPA page table entries. kvm_arch_flush_shadow_all() flushes the whole GPA page table, and is always called on the cleanup path so there is no need to acquire the kvm->mmu_lock. kvm_arch_flush_shadow_memslot() flushes only the range of mappings in the GPA page table corresponding to the slot being flushed, and happens when memory regions are moved or deleted. MIPS KVM implementation callbacks are added for handling the implementation specific flushing of mappings derived from the GPA page tables. These are implemented for trap_emul.c using kvm_flush_remote_tlbs() which should now be functional, and will flush the per-VCPU GVA page tables and ASIDS synchronously (before next entering guest mode or directly accessing GVA space). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 11 ++++++++--- arch/mips/kvm/mips.c | 26 ++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 14 ++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) commit 4cf74c9c83dda79143490d7cc774b7830e257fcd Author: James Hogan Date: Sat Nov 26 00:37:28 2016 +0000 KVM: MIPS/Emulate: Use lockless GVA helpers for cache emulation Use the lockless GVA helpers to implement the reading of guest instructions for emulation. This will allow it to handle asynchronous TLB flushes when they are implemented. This is a little more complicated than the other two cases (get_inst() and dynamic translation) due to the need to emulate the appropriate guest TLB exception when the address isn't present or isn't valid in the guest TLB. Since there are several protected cache ops that may need to be performed safely, this is abstracted by kvm_mips_guest_cache_op() which is passed a protected cache op function pointer and takes care of the lockless operation and fault handling / retry if the op should fail, taking advantage of the new errors which the protected cache ops can now return. This allows the existing advance fault handling which relied on host TLB lookups to be removed, along with the now unused kvm_mips_host_tlb_lookup(), Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/emulate.c | 148 +++++++++++++++++---------------------- arch/mips/kvm/tlb.c | 35 --------- 3 files changed, 66 insertions(+), 119 deletions(-) commit 5207ce144a25aef89dd12b8fc3ccaa53aba4f2bd Author: James Hogan Date: Mon Nov 28 23:15:53 2016 +0000 KVM: MIPS/MMU: Use lockless GVA helpers for get_inst() Use the lockless GVA helpers to implement the reading of guest instructions for emulation. This will allow it to handle asynchronous TLB flushes when they are implemented. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 4b21e8abf959ca66c27f0656bf294fe69d3f2254 Author: James Hogan Date: Mon Nov 28 23:13:38 2016 +0000 KVM: MIPS/T&E: Use lockless GVA helpers for dyntrans Use the lockless GVA helpers to implement the dynamic translation of guest instructions. This will allow it to handle asynchronous TLB flushes when they are implemented. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/dyntrans.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 1880afd6057f34586919715e8ffe9c5858f4a326 Author: James Hogan Date: Mon Nov 28 23:04:52 2016 +0000 KVM: MIPS/T&E: Add lockless GVA access helpers Add helpers to allow for lockless direct access to the GVA space, by changing the VCPU mode to READING_SHADOW_PAGE_TABLES for the duration of the access. This allows asynchronous TLB flush requests in future patches to safely trigger either a TLB flush before the direct GVA space access, or a delay until the in-progress lockless direct access is complete. The kvm_trap_emul_gva_lockless_begin() and kvm_trap_emul_gva_lockless_end() helpers take care of guarding the direct GVA accesses, and kvm_trap_emul_gva_fault() tries to handle a uaccess fault resulting from a flush having taken place. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 15 ++++++++++ arch/mips/kvm/mmu.c | 51 +++++++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 65 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) commit 91737ea205856c41183c2530fdb6b407ceeb3836 Author: James Hogan Date: Fri Dec 2 23:40:52 2016 +0000 KVM: MIPS/T&E: Reduce stale ASID checks The stale ASID checks taking place on VCPU load can be reduced: - Now that we check for a stale ASID on guest re-entry, there is no need to do so when loading the VCPU outside of guest context, since it will happen before entering the guest. Note that a lot of KVM VCPU ioctls will cause the VCPU to be loaded but guest context won't be entered. - There is no need to check for a stale kernel_mm ASID when the guest is in user mode and vice versa. In fact doing so can potentially be problematic since the user_mm ASID regeneration may trigger a new ASID cycle, which would cause the kern_mm ASID to become stale after it has been checked for staleness. Therefore only check the ASID for the mm corresponding to the current guest mode, and only if we're already in guest context. We drop some of the related kvm_debug() calls here too. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) commit b29e115ae451a67a8c044dffb3aa02b19d4570a0 Author: James Hogan Date: Mon Nov 28 23:19:32 2016 +0000 KVM: MIPS/T&E: Handle TLB invalidation requests Add handling of TLB invalidation requests before entering guest mode. This will allow asynchonous invalidation of the VCPU mappings when physical memory regions are altered. Should the CPU running the VCPU already be in guest mode an IPI will be sent to trigger a guest exit. The reload_asid path will be used in a future patch for when GVA is about to be directly accessed by KVM. In the process, the stale user ASID check in the re-entry path (for lazy user GVA flushing) is generalised to check the ASID for the current guest mode, in case a TLB invalidation request was handled. This has the side effect of making the ASID checks on vcpu_load too conservative, which will be addressed in a later patch. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 71 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 8 deletions(-) commit 4841e0dd4f53c127b11947bdbe4423b5e9014ebc Author: James Hogan Date: Mon Nov 28 22:45:04 2016 +0000 KVM: MIPS: Update vcpu->mode and vcpu->cpu Keep the vcpu->mode and vcpu->cpu variables up to date so that kvm_make_all_cpus_request() has a chance of functioning correctly. This will soon need to be used for kvm_flush_remote_tlbs(). We can easily update vcpu->cpu when the VCPU context is loaded or saved, which will happen when accessing guest context and when the guest is scheduled in and out. We need to be a little careful with vcpu->mode though, as we will in future be checking for outstanding VCPU requests, and this must be done after the value of IN_GUEST_MODE in vcpu->mode is visible to other CPUs. Otherwise the other CPU could fail to trigger an IPI to wait for completion dispite the VCPU request not being seen. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 18 ++++++++++++++++++ arch/mips/kvm/mmu.c | 2 ++ 2 files changed, 20 insertions(+) commit 06c158c96ed8909a1d8696d4f953ca8a9ef55574 Author: James Hogan Date: Fri May 1 13:50:18 2015 +0100 KVM: MIPS/MMU: Convert guest physical map to page table Current guest physical memory is mapped to host physical addresses using a single linear array (guest_pmap of length guest_pmap_npages). This was only really meant to be temporary, and isn't sparse, so its wasteful of memory. A small amount of RAM at GPA 0 and a small boot exception vector at GPA 0x1fc00000 cannot be represented without a full 128KiB guest_pmap allocation (MIPS32 with 16KiB pages), which is one reason why QEMU currently runs its boot code at the top of RAM instead of the usual boot exception vector address. Instead use the existing infrastructure for host virtual page table management to allocate a page table for guest physical memory too. This should be sufficient for now, assuming the size of physical memory doesn't exceed the size of virtual memory. It may need extending in future to handle XPA (eXtended Physical Addressing) in 32-bit guests, as supported by VZ guests on P5600. Some of this code is based loosely on Cavium's VZ KVM implementation. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 7 +- arch/mips/kvm/mips.c | 48 ++----- arch/mips/kvm/mmu.c | 293 ++++++++++++++++++++++++++++++++++----- 3 files changed, 278 insertions(+), 70 deletions(-) commit 6a97c775ff77fb7c54adc3f7944205ae66cb5475 Author: James Hogan Date: Thu Apr 23 16:54:35 2015 +0100 KVM: MIPS: Use CP0_BadInstr[P] for emulation When exiting from the guest, store the values of the CP0_BadInstr and CP0_BadInstrP registers if they exist, which contain the encodings of the instructions which caused the last synchronous exception. When the instruction is needed for emulation, kvm_get_badinstr() and kvm_get_badinstrp() are used instead of calling kvm_get_inst() directly, to decide whether to read the saved CP0_BadInstr/CP0_BadInstrP registers (if they exist), or read the instruction from memory (if not). The use of these registers should be more robust than using kvm_get_inst(), as it actually gives the instruction encoding seen by the hardware rather than relying on user accessors after the fact, which can be fooled by incoherent icache or a racing code modification. It will also work with VZ, where the guest virtual memory isn't directly accessible by the host with user accessors. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 4 ++++ arch/mips/kvm/emulate.c | 48 +++++++++++++++++++++++++++++++++++++--- arch/mips/kvm/entry.c | 14 ++++++++++++ arch/mips/kvm/mips.c | 2 +- 4 files changed, 64 insertions(+), 4 deletions(-) commit 122e51d47418f74a69a93bf02f5535d11ff75bf5 Author: James Hogan Date: Mon Nov 28 17:23:14 2016 +0000 KVM: MIPS: Improve kvm_get_inst() error return Currently kvm_get_inst() returns KVM_INVALID_INST in the event of a fault reading the guest instruction. This has the rather arbitrary magic value 0xdeadbeef. This API isn't very robust, and in fact 0xdeadbeef is a valid MIPS64 instruction encoding, namely "ld t1,-16657(s5)". Therefore change the kvm_get_inst() API to return 0 or -EFAULT, and to return the instruction via a u32 *out argument. We can then drop the KVM_INVALID_INST definition entirely. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 +- arch/mips/kvm/emulate.c | 90 ++++++++++++++++++++-------------------- arch/mips/kvm/mips.c | 7 +++- arch/mips/kvm/mmu.c | 9 ++-- 4 files changed, 56 insertions(+), 53 deletions(-) commit a1ecc54d7ea629538116351a3ccc7d86bb9a3c69 Author: James Hogan Date: Mon Nov 28 18:39:24 2016 +0000 KVM: MIPS/T&E: Don't treat code fetch faults as MMIO In order to make use of the CP0_BadInstr & CP0_BadInstrP registers we need to be a bit more careful not to treat code fetch faults as MMIO, lest we hit an UNPREDICTABLE register value when we try to emulate the MMIO load instruction but there was no valid instruction word available to the hardware. Add a kvm_is_ifetch_fault() helper to try to figure out whether a load fault was due to a code fetch, and prevent MMIO instruction emulation in that case. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 27 +++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 12 ++++++++++++ 2 files changed, 39 insertions(+) commit a98dd7410370634496aa500abf90ec6336b494ae Author: James Hogan Date: Fri Oct 7 22:39:41 2016 +0100 KVM: MIPS/MMU: Drop kvm_get_new_mmu_context() MIPS KVM uses its own variation of get_new_mmu_context() which takes an extra vcpu pointer (unused) and does exactly the same thing. Switch to just using get_new_mmu_context() directly and drop KVM's version of it as it doesn't really serve any purpose. The nearby declarations of kvm_mips_alloc_new_mmu_context(), kvm_mips_vcpu_load() and kvm_mips_vcpu_put() are also removed from kvm_host.h, as no definitions or users exist. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 5 ----- arch/mips/kvm/emulate.c | 3 +-- arch/mips/kvm/mmu.c | 19 ------------------- arch/mips/kvm/trap_emul.c | 6 +++--- 4 files changed, 4 insertions(+), 29 deletions(-) commit 7071a8859bb36d34b8f766275b239e98760f010c Author: James Hogan Date: Tue Sep 13 12:58:08 2016 +0100 KVM: MIPS/Emulate: Drop redundant TLB flushes on exceptions When exceptions are injected into the MIPS KVM guest, the whole host TLB is flushed (except any entries in the guest KSeg0 range). This is certainly not mandated by the architecture when exceptions are taken (userland can't directly change TLB mappings anyway), and is a pretty heavyweight operation: - There may be hundreds of TLB entries especially when a 512 entry FTLB is present. These are walked and read and conditionally invalidated, so the TLBINV feature can't be used either. - It'll indiscriminately wipe out entries belonging to other memory spaces. A simple ASID regeneration would be much faster to perform, although it'd wipe out the guest KSeg0 mappings too. My suspicion is that this was simply to plaster over the fact that kvm_mips_host_tlb_inv() incorrectly only invalidated TLB entries in the ASID for guest usermode, and not the ASID for guest kernelmode. Now that the recent commit "KVM: MIPS/TLB: Flush host TLB entry in kernel ASID" fixes kvm_mips_host_tlb_inv() to flush TLB entries in the kernelmode ASID when the guest TLB changes, lets drop these calls and the otherwise unused kvm_mips_flush_host_tlb(). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 - arch/mips/kvm/emulate.c | 10 -------- arch/mips/kvm/tlb.c | 49 ---------------------------------------- 3 files changed, 60 deletions(-) commit 49ec508e3bd0b11aaf534af0d63e4a17e05594e4 Author: James Hogan Date: Fri Oct 7 22:32:13 2016 +0100 KVM: MIPS/TLB: Drop kvm_local_flush_tlb_all() Now that KVM no longer uses wired entries we can safely use local_flush_tlb_all() when we need to flush the entire TLB (on the start of a new ASID cycle). This doesn't flush wired entries, which allows other code to use them without KVM clobbering them all the time. It also is more up to date, knowing about the tlbinv architectural feature, flushing of micro TLB on cores where that is necessary (Loongson I believe), and knows to stop the HTW while doing so. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 - arch/mips/include/asm/mmu_context.h | 5 ----- arch/mips/kvm/mmu.c | 2 +- arch/mips/kvm/tlb.c | 29 ----------------------------- 4 files changed, 1 insertion(+), 36 deletions(-) commit 8af0e3c2e89e56dc5b064e5854b87a19e70e2710 Author: James Hogan Date: Mon Oct 17 16:37:45 2016 +0100 KVM: MIPS/Emulate: Fix CACHE emulation for EVA hosts Use protected_writeback_dcache_line() instead of flush_dcache_line(), and protected_flush_icache_line() instead of flush_icache_line(), so that CACHEE (the EVA variant) is used on EVA host kernels. Without this, guest floating point branch delay slot emulation via a trampoline on the user stack fails on EVA host kernels due to failure of the icache sync, resulting in the break instruction getting skipped and execution from the stack. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dacc3ed1dd608ff9553dcede6cd05369030ed099 Author: James Hogan Date: Fri Aug 19 15:27:22 2016 +0100 KVM: MIPS: Use uaccess to read/modify guest instructions Now that we have GVA page tables, use standard user accesses with page faults disabled to read & modify guest instructions. This should be more robust (than the rather dodgy method of accessing guest mapped segments by just directly addressing them) and will also work with Enhanced Virtual Addressing (EVA) host kernel configurations where dedicated instructions are needed for accessing user mode memory. For simplicity and speed we do this regardless of the guest segment the address resides in, rather than handling guest KSeg0 specially with kmap_atomic() as before. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 -- arch/mips/kvm/dyntrans.c | 28 +++++---------- arch/mips/kvm/mmu.c | 77 +++------------------------------------- arch/mips/kvm/trap_emul.c | 9 +++++ 4 files changed, 22 insertions(+), 94 deletions(-) commit 7a156e9f822d2eb6c294226aea2a4c12c05caa10 Author: James Hogan Date: Wed Nov 16 17:36:47 2016 +0000 KVM: MIPS: Drop vm_init() callback Now that the commpage doesn't use wired TLB entries, the per-CPU vm_init() callback is the only work done by kvm_mips_init_vm_percpu(). The trap & emulate implementation doesn't actually need to do anything from vm_init(), and the future VZ implementation would be better served by a kvm_arch_hardware_enable callback anyway. Therefore drop the vm_init() callback entirely, allowing the kvm_mips_init_vm_percpu() function to also be dropped, along with the kvm_mips_instance atomic counter. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 --- arch/mips/kvm/mips.c | 16 ---------------- arch/mips/kvm/tlb.c | 3 --- arch/mips/kvm/trap_emul.c | 6 ------ 4 files changed, 28 deletions(-) commit 4c86460cbc03f32c3649f7aaf9104e6e65c88a61 Author: James Hogan Date: Sat Oct 8 01:16:21 2016 +0100 KVM: MIPS/MMU: Convert commpage fault handling to page tables Now that we have GVA page tables and an optimised TLB refill handler in place, convert the handling of commpage faults from the guest kernel to fill the GVA page table and invalidate the TLB entry, rather than filling the wired TLB entry directly. For simplicity we no longer use a wired entry for the commpage (refill should be much cheaper with the fast-path handler anyway). Since we don't need to manipulate the TLB directly any longer, move the function from tlb.c to mmu.c. This puts it closer to the similar functions handling KSeg0 and TLB mapped page faults from the guest. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 --- arch/mips/kvm/mips.c | 34 +------------------------------ arch/mips/kvm/mmu.c | 21 +++++++++++++++++++ arch/mips/kvm/tlb.c | 44 ---------------------------------------- 4 files changed, 22 insertions(+), 80 deletions(-) commit 7e3d2a750bcb0a7fed84e14e562d752c39fdf542 Author: James Hogan Date: Sat Oct 8 01:15:19 2016 +0100 KVM: MIPS/MMU: Convert TLB mapped faults to page tables Now that we have GVA page tables and an optimised TLB refill handler in place, convert the handling of page faults in TLB mapped segment from the guest to fill a single GVA page table entry and invalidate the TLB entry, rather than filling a TLB entry pair directly. Also remove the now unused kvm_mips_get_{kernel,user}_asid() functions in mmu.c and kvm_mips_host_tlb_write() in tlb.c. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 7 +-- arch/mips/kvm/emulate.c | 6 ++- arch/mips/kvm/mmu.c | 93 +++++++++++++++------------------------- arch/mips/kvm/tlb.c | 64 --------------------------- 4 files changed, 40 insertions(+), 130 deletions(-) commit fb99589391a9ed2e505dc7c3d02651a1a7b9f72b Author: James Hogan Date: Thu Jan 5 10:44:38 2017 +0000 KVM: MIPS/MMU: Convert KSeg0 faults to page tables Now that we have GVA page tables and an optimised TLB refill handler in place, convert the handling of KSeg0 page faults from the guest to fill the GVA page tables and invalidate the TLB entry, rather than filling a TLB entry directly. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 79 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 15 deletions(-) commit aba8592950f1c698bb9c1b42d4f4dab07a145674 Author: James Hogan Date: Fri Dec 16 15:57:00 2016 +0000 KVM: MIPS/MMU: Invalidate stale GVA PTEs on TLBW Implement invalidation of specific pairs of GVA page table entries in one or both of the GVA page tables. This is used when existing mappings are replaced in the guest TLB by emulated TLBWI/TLBWR instructions. Due to the sharing of page tables in the host kernel range, we should be careful not to allow host pages to be invalidated. Add a helper kvm_mips_walk_pgd() which can be used when walking of either GPA (future patches) or GVA page tables is needed, optionally with allocation of page tables along the way when they don't exist. GPA page table walking will need to be protected by the kvm->mmu_lock, so we also add a small MMU page cache in each KVM VCPU, like that found for other architectures but smaller. This allows enough pages to be pre-allocated to handle a single fault without holding the lock, allowing the helper to run with the lock held without having to handle allocation failures. Using the same mechanism for GVA allows the same code to be used, and allows it to use the same cache of allocated pages if the GPA walk didn't need to allocate any new tables. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 17 +++++++ arch/mips/kvm/emulate.c | 6 +++ arch/mips/kvm/mips.c | 1 + arch/mips/kvm/mmu.c | 95 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+) commit a31b50d741bd85a127d5ef2c21c0788041bc41a9 Author: James Hogan Date: Fri Dec 16 15:57:00 2016 +0000 KVM: MIPS/MMU: Invalidate GVA PTs on ASID changes Implement invalidation of large ranges of virtual addresses from GVA page tables in response to a guest ASID change (immediately for guest kernel page table, lazily for guest user page table). We iterate through a range of page tables invalidating entries and freeing fully invalidated tables. To minimise overhead the exact ranges invalidated depends on the flags argument to kvm_mips_flush_gva_pt(), which also allows it to be used in future KVM_CAP_SYNC_MMU patches in response to GPA changes, which unlike guest TLB mapping changes affects guest KSeg0 mappings. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 17 +++++ arch/mips/kvm/emulate.c | 11 ++++ arch/mips/kvm/mmu.c | 134 +++++++++++++++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 5 +- 4 files changed, 165 insertions(+), 2 deletions(-) commit 57e3869cfaaec712f6ea1855ab7ba868f6f306ed Author: James Hogan Date: Sat Oct 8 00:15:52 2016 +0100 KVM: MIPS/TLB: Generalise host TLB invalidate to kernel ASID Refactor kvm_mips_host_tlb_inv() to also be able to invalidate any matching TLB entry in the kernel ASID rather than assuming only the TLB entries in the user ASID can change. Two new bool user/kernel arguments allow the caller to indicate whether the mapping should affect each of the ASIDs for guest user/kernel mode. - kvm_mips_invalidate_guest_tlb() (used by TLBWI/TLBWR emulation) can now invalidate any corresponding TLB entry in both the kernel ASID (guest kernel may have accessed any guest mapping), and the user ASID if the entry being replaced is in guest USeg (where guest user may also have accessed it). - The tlbmod fault handler (and the KSeg0 / TLB mapped / commpage fault handlers in later patches) can now invalidate the corresponding TLB entry in whichever ASID is currently active, since only a single page table will have been updated anyway. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 ++- arch/mips/kvm/emulate.c | 6 ++++-- arch/mips/kvm/tlb.c | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 13 deletions(-) commit f3a8603f098fd2c68311d945a6531d1e3b62271c Author: James Hogan Date: Fri Oct 7 22:01:05 2016 +0100 KVM: MIPS/TLB: Fix off-by-one in TLB invalidate kvm_mips_host_tlb_inv() uses the TLBP instruction to probe the host TLB for an entry matching the given guest virtual address, and determines whether a match was found based on whether CP0_Index > 0. This is technically incorrect as an index of 0 (with the high bit clear) is a perfectly valid TLB index. This is harmless at the moment due to the use of at least 1 wired TLB entry for the KVM commpage, however we will soon be ridding ourselves of that particular wired entry so lets fix the condition in case the entry needing invalidation does land at TLB index 0. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/tlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7cfa7ac1236937dac431845596a39ba27364a00 Author: James Hogan Date: Sat Sep 10 23:56:46 2016 +0100 KVM: MIPS: Add fast path TLB refill handler Use functions from the general MIPS TLB exception vector generation code (tlbex.c) to construct a fast path TLB refill handler similar to the general one, but cut down and capable of preserving K0 and K1. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/entry.c | 78 ++++++++++++++++++++++++++++++++++++++++ arch/mips/kvm/mips.c | 8 +++-- 3 files changed, 84 insertions(+), 3 deletions(-) commit 29b500b54ef379f1f3227b633dd477a4dd3cd62b Author: James Hogan Date: Fri Nov 11 14:08:32 2016 +0000 KVM: MIPS: Support NetLogic KScratch registers tlbex.c uses the implementation dependent $22 CP0 register group on NetLogic cores, with the help of the c0_kscratch() helper. Allow these registers to be allocated by the KVM entry code too instead of assuming KScratch registers are all $31, which will also allow pgd_reg to be handled since it is allocated that way. We also drop the masking of kscratch_mask with 0xfc, as it is redundant for the standard KScratch registers (Config4.KScrExist won't have the low 2 bits set anyway), and apparently not necessary for NetLogic. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/entry.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 7faa6eec6991715d6c1d85c192738dcac405ab89 Author: James Hogan Date: Fri Oct 7 23:58:53 2016 +0100 KVM: MIPS/T&E: Activate GVA page tables in guest context Activate the GVA page tables when in guest context. This will allow the normal Linux TLB refill handler to fill from it when guest memory is read, as well as preventing accidental reading from user memory. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/mmu_context.h | 4 +++- arch/mips/kvm/entry.c | 16 +++++++++++++++- arch/mips/kvm/trap_emul.c | 10 ++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) commit f7f1427dc0c67e21ba9ec2200b7c8853535b3842 Author: James Hogan Date: Thu Sep 8 22:57:03 2016 +0100 KVM: MIPS/T&E: Allocate GVA -> HPA page tables Allocate GVA -> HPA page tables for guest kernel and guest user mode on each VCPU, to allow for fast path TLB refill handling to be added later. In the process kvm_arch_vcpu_init() needs updating to pass on any error from the vcpu_init() callback. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 7 +++++- arch/mips/kvm/trap_emul.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) commit 630766b3694f0574f903863ef5c3cc4f2bbe736f Author: James Hogan Date: Thu Sep 8 23:00:24 2016 +0100 KVM: MIPS: Wire up vcpu uninit Wire up a vcpu uninit implementation callback. This will be used for the clean up of GVA->HPA page tables. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/mips.c | 5 +++++ arch/mips/kvm/trap_emul.c | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit a7ebb2e410f8be2b061557fd85241d75a1094221 Author: James Hogan Date: Tue Nov 15 00:06:05 2016 +0000 KVM: MIPS/T&E: active_mm = init_mm in guest context Set init_mm as the active_mm and update mm_cpumask(current->mm) to reflect that it isn't active when in guest context. This prevents cache management code from attempting cache flushes on host virtual addresses while in guest context, for example due to a cache management IPIs or later when writing of dynamically translated code hits copy on write. We do this using helpers in static kernel code to avoid having to export init_mm to modules. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 4 ++++ arch/mips/kvm/tlb.c | 35 +++++++++++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 12 +++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) commit 91cdee5710d5fe8f81915307b5ff38d364fbde33 Author: James Hogan Date: Fri Nov 18 13:25:24 2016 +0000 KVM: MIPS/T&E: Restore host asid on return to host We only need the guest ASID loaded while in guest context, i.e. while running guest code and while handling guest exits. We load the guest ASID when entering the guest, however we restore the host ASID later than necessary, when the VCPU state is saved i.e. vcpu_put() or slightly earlier if preempted after returning to the host. This mismatch is both unpleasant and causes redundant host ASID restores in kvm_trap_emul_vcpu_put(). Lets explicitly restore the host ASID when returning to the host, and don't bother restoring the host ASID on context switch in unless we're already in guest context. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit a2c046e40ff16ef6c20d534b0d77d526bc02a684 Author: James Hogan Date: Fri Nov 18 13:14:37 2016 +0000 KVM: MIPS: Add vcpu_run() & vcpu_reenter() callbacks Add implementation callbacks for entering the guest (vcpu_run()) and reentering the guest (vcpu_reenter()), allowing implementation specific operations to be performed before entering the guest or after returning to the host without cluttering kvm_arch_vcpu_ioctl_run(). This allows the T&E specific lazy user GVA flush to be moved into trap_emul.c, along with disabling of the HTW. We also move kvm_mips_deliver_interrupts() as VZ will need to restore the guest timer state prior to delivering interrupts. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 ++ arch/mips/kvm/mips.c | 43 ++--------------------------------- arch/mips/kvm/trap_emul.c | 48 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 41 deletions(-) commit c550d53934d821dbdd867ca314d417f2e918c72c Author: James Hogan Date: Tue Oct 11 23:14:39 2016 +0100 KVM: MIPS: Remove duplicated ASIDs from vcpu The kvm_vcpu_arch structure contains both mm_structs for allocating MMU contexts (primarily the ASID) but it also copies the resulting ASIDs into guest_{user,kernel}_asid[] arrays which are referenced from uasm generated code. This duplication doesn't seem to serve any purpose, and it gets in the way of generalising the ASID handling across guest kernel/user modes, so lets just extract the ASID straight out of the mm_struct on demand, and in fact there are convenient cpu_context() and cpu_asid() macros for doing so. To reduce the verbosity of this code we do also add kern_mm and user_mm local variables where the kernel and user mm_structs are used. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 4 +--- arch/mips/kvm/emulate.c | 13 +++++++------ arch/mips/kvm/entry.c | 22 +++++++++++++--------- arch/mips/kvm/mips.c | 8 +++----- arch/mips/kvm/mmu.c | 8 ++++---- arch/mips/kvm/tlb.c | 8 ++++---- arch/mips/kvm/trap_emul.c | 29 ++++++++++++----------------- 7 files changed, 44 insertions(+), 48 deletions(-) commit 1581ff3dbf698abba00f39039cc5bd854400b664 Author: James Hogan Date: Wed Nov 16 23:48:56 2016 +0000 KVM: MIPS/MMU: Move preempt/ASID handling to implementation The MIPS KVM host and guest GVA ASIDs may need regenerating when scheduling a process in guest context, which is done from the kvm_arch_vcpu_load() / kvm_arch_vcpu_put() functions in mmu.c. However this is a fairly implementation specific detail. VZ for example may use GuestIDs instead of normal ASIDs to distinguish mappings belonging to different guests, and even on VZ without GuestID the root TLB will be used differently to trap & emulate. Trap & emulate GVA ASIDs only relate to the user part of the full address space, so can be left active during guest exit handling (guest context) to allow guest instructions to be easily read and translated. VZ root ASIDs however are for GPA mappings so can't be left active during normal kernel code. They also aren't useful for accessing guest virtual memory, and we should have CP0_BadInstr[P] registers available to provide encodings of trapping guest instructions anyway. Therefore move the ASID preemption handling into the implementation callback. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 51 ------------------------------------------ arch/mips/kvm/trap_emul.c | 56 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 53 deletions(-) commit a60b8438bdba4a4b77c90b6c1b22804150b4f244 Author: James Hogan Date: Sat Nov 12 00:00:13 2016 +0000 KVM: MIPS: Convert get/set_regs -> vcpu_load/put Convert the get_regs() and set_regs() callbacks to vcpu_load() and vcpu_put(), which provide a cpu argument and more closely match the kvm_arch_vcpu_load() / kvm_arch_vcpu_put() that they are called by. This is in preparation for moving ASID management into the implementations. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/mmu.c | 4 ++-- arch/mips/kvm/trap_emul.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit 1534b3964901ff55465a9f582838204193354966 Author: James Hogan Date: Fri Mar 13 15:54:08 2015 +0000 KVM: MIPS/MMU: Simplify ASID restoration KVM T&E uses an ASID for guest kernel mode and an ASID for guest user mode. The current ASID is saved when the guest is scheduled out, and restored when scheduling back in, with checks for whether the ASID needs to be regenerated. This isn't really necessary as the ASID can be easily determined by the current guest mode, so lets simplify it to just read the required ASID from guest_kernel_asid or guest_user_asid even if the ASID hasn't been regenerated. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 --- arch/mips/kvm/mmu.c | 46 +++++++++++----------------------------- 2 files changed, 12 insertions(+), 37 deletions(-) commit 00104b4171491794b53f8d6cc255f539e8bf18b4 Author: James Hogan Date: Wed Jan 4 22:05:22 2017 +0000 KVM: MIPS: Drop partial KVM_NMI implementation MIPS incompletely implements the KVM_NMI ioctl to supposedly perform a CPU reset, but all it actually does is invalidate the ASIDs. It doesn't expose the KVM_CAP_USER_NMI capability which is supposed to indicate the presence of the KVM_NMI ioctl, and no user software actually uses it on MIPS. Since this is dead code that would technically need updating for GVA page table handling in upcoming patches, remove it now. If we wanted to implement NMI injection later it can always be done properly along with the KVM_CAP_USER_NMI capability, and if we wanted to implement a proper CPU reset it would be better done with a separate ioctl. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 716733032ab3203498f17f785c2e1d1ca08a51a1 Author: Takashi Iwai Date: Tue Jan 31 07:30:20 2017 +0100 ALSA: x86: Don't set PCM state to DISCONNECTED Theoretically setting the state to SNDRV_PCM_STATE_DISCONNECTED is correct. But, unfortunately, PA gets confused by this action, and it won't re-probe the device after HDMI/DP is re-plugged. (It reprobes only when the card itself is recreated.) As a workaround, set SNDRV_PCM_STATE_SETUP instead. Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adb0b25f780d543efb57738bcc525045a180e058 Merge: 5a6da5f 7170bdc Author: James Hogan Date: Thu Feb 2 13:50:39 2017 +0000 Merge MIPS prerequisites Merge in MIPS prerequisites from GVA page tables and GPA page tables series. The same branch can also merge into the MIPS tree. Signed-off-by: James Hogan commit 782deb2eecc018bfa278f7453f367e01f5479ccb Author: Fabian Frederick Date: Tue Jan 24 21:48:34 2017 +0100 udf: fix ioctl errors Currently, lsattr for instance in udf directory gives "udf: Invalid argument While reading flags on ..." This patch returns -ENOIOCTLCMD when command is unknown to have more accurate message like this: "Inappropriate ioctl for device While reading flags on ..." Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9db13e5f2d6dc85150cb8a69ab220b84d9b9fbe7 Author: Takashi Iwai Date: Thu Feb 2 11:03:48 2017 +0100 drm/i915: Enable VLV audio chicken bit for LPE audio The audio chicken bit (register offset 0x62f38) seems required to make DP audio working on some machines. At least, on Dell Wyse 3040, I failed to get the audio unless this bit is set once. Strangely, the bit seems necessary only once, and it persists after that, even some power-off cycles. The register is supposedly write-only, so it's no evidence whether the bit keeps effect persistently. But, judging from the experiment, it looks enough to set it up once at the device initialization. The patch is basically a cut from the original patch by Pierre-Louis Bossart. v1->v2: drop read since it's a write-only reg. Cc: Pierre-Louis Bossart Reviewed-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_lpe_audio.c | 5 +++++ 2 files changed, 8 insertions(+) commit 7170bdc777556dad87f92e6a73a6cc557bf3290e Author: James Hogan Date: Mon Nov 28 16:38:01 2016 +0000 MIPS: Add return errors to protected cache ops The protected cache ops contain no out of line fixup code to return an error code in the event of a fault, with the cache op being skipped in that case. For KVM however we'd like to detect this case as page faulting will be disabled so it could happen during normal operation if the GVA page tables were flushed, and need to be handled by the caller. Add the out-of-line fixup code to load the error value -EFAULT into the return variable, and adapt the protected cache line functions to pass the error back to the caller. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/r4kcache.h | 55 +++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 20 deletions(-) commit 722b45443146f425453525d3c2270ff2733f5dc4 Author: James Hogan Date: Sat Sep 10 23:55:07 2016 +0100 MIPS: Export some tlbex internals for KVM to use Export to TLB exception code generating functions so that KVM can construct a fast TLB refill handler for guest context without reinventing the wheel quite so much. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/tlbex.h | 26 ++++++++++++++++++++++++++ arch/mips/mm/tlbex.c | 33 ++++++++++++++++----------------- 2 files changed, 42 insertions(+), 17 deletions(-) commit 93a93c2461f9416a58c7d1e32fec201af8cc3aad Author: James Hogan Date: Sat Sep 10 23:53:57 2016 +0100 MIPS: uasm: Add include guards in asm/uasm.h Add include guards in asm/uasm.h to allow it to be safely used by a new header asm/tlbex.h in the next patch to expose TLB exception building functions for KVM to use. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/uasm.h | 5 +++++ 1 file changed, 5 insertions(+) commit ccf015166ddbbd4c43a16d6871ea15f1fcf51ccc Author: James Hogan Date: Fri Oct 16 16:33:13 2015 +0100 MIPS: Export pgd/pmd symbols for KVM Export pmd_init(), invalid_pmd_table and tlbmiss_handler_setup_pgd to GPL kernel modules so that MIPS KVM can use the inline page table management functions and switch between page tables: - pmd_init() will be used directly by KVM to initialise newly allocated pmd tables with invalid lower level table pointers. - invalid_pmd_table is used by pud_present(), pud_none(), and pud_clear(), which KVM will use to test and clear pud entries. - tlbmiss_handler_setup_pgd() will be called by KVM entry code to switch to the appropriate GVA page tables. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/mm/init.c | 1 + arch/mips/mm/pgtable-64.c | 2 ++ arch/mips/mm/tlbex.c | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) commit f20cc9b00c7b71f9b5e970b6bd4ac93b0d9cfd5b Author: Agustin Vega-Frias Date: Thu Feb 2 18:23:59 2017 -0500 irqchip/qcom: Add IRQ combiner driver Driver for interrupt combiners in the Top-level Control and Status Registers (TCSR) hardware block in Qualcomm Technologies chips. An interrupt combiner in this block combines a set of interrupts by OR'ing the individual interrupt signals into a summary interrupt signal routed to a parent interrupt controller, and provides read- only, 32-bit registers to query the status of individual interrupts. The status bit for IRQ n is bit (n % 32) within register (n / 32) of the given combiner. Thus, each combiner can be described as a set of register offsets and the number of IRQs managed. Signed-off-by: Agustin Vega-Frias Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 9 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/qcom-irq-combiner.c | 296 ++++++++++++++++++++++++++++++++++++ 3 files changed, 306 insertions(+) commit d44fa3d46079dc095c1346fa6e5bc96dca1ead41 Author: Agustin Vega-Frias Date: Thu Feb 2 18:23:58 2017 -0500 ACPI: Add support for ResourceSource/IRQ domain mapping ACPI extended IRQ resources may contain a ResourceSource to specify an alternate interrupt controller. Introduce acpi_irq_get and use it to implement ResourceSource/IRQ domain mapping. The new API is similar to of_irq_get and allows re-initialization of a platform resource from the ACPI extended IRQ resource, and provides proper behavior for probe deferral when the domain is not yet present when called. Acked-by: Rafael J. Wysocki Acked-by: Lorenzo Pieralisi Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Agustin Vega-Frias Signed-off-by: Marc Zyngier drivers/acpi/Makefile | 2 +- drivers/acpi/gsi.c | 98 ---------------- drivers/acpi/irq.c | 297 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/base/platform.c | 10 ++ include/linux/acpi.h | 10 ++ 5 files changed, 318 insertions(+), 99 deletions(-) commit fa20b176f609c813d2c677f54c814cbb7ea5f1d1 Author: Agustin Vega-Frias Date: Thu Feb 2 18:23:57 2017 -0500 ACPI: Generic GSI: Do not attempt to map non-GSI IRQs during bus scan ACPI extended IRQ resources may contain a Resource Source field to specify an alternate interrupt controller, attempting to map them as GSIs is incorrect, so just disable the platform resource. Since this field is currently ignored, we make this change conditional on CONFIG_ACPI_GENERIC_GSI to keep the current behavior on x86 platforms, in case some existing ACPI tables are using this incorrectly. Acked-by: Rafael J. Wysocki Acked-by: Lorenzo Pieralisi Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Agustin Vega-Frias Signed-off-by: Marc Zyngier drivers/acpi/resource.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 86bc8b310f1f323ccc9a311933e35d3442473034 Author: Eric Dumazet Date: Thu Feb 2 18:22:28 2017 -0800 sfc-falcon: get rid of custom busy polling code In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of tricky code, we also remove one lock operation in fast path. Signed-off-by: Eric Dumazet Cc: Edward Cree Cc: Bert Kenward Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon/efx.c | 42 --------- drivers/net/ethernet/sfc/falcon/net_driver.h | 125 --------------------------- drivers/net/ethernet/sfc/falcon/rx.c | 3 +- 3 files changed, 1 insertion(+), 169 deletions(-) commit e7fe9491261ee07b0c7456df42c34ca6a8538804 Author: Eric Dumazet Date: Thu Feb 2 17:13:19 2017 -0800 sfc: get rid of custom busy polling code In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of tricky code, we also remove one lock operation in fast path. Signed-off-by: Eric Dumazet Cc: Edward Cree Cc: Bert Kenward Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 42 ------------ drivers/net/ethernet/sfc/net_driver.h | 125 ---------------------------------- drivers/net/ethernet/sfc/rx.c | 3 +- 3 files changed, 1 insertion(+), 169 deletions(-) commit 9b54d816e00425c3a517514e0d677bb3cec49258 Author: Hou Tao Date: Fri Feb 3 17:19:07 2017 +0800 blkcg: fix double free of new_blkg in blkcg_init_queue If blkg_create fails, new_blkg passed as an argument will be freed by blkg_create, so there is no need to free it again. Signed-off-by: Hou Tao Signed-off-by: Jens Axboe block/blk-cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6ea29ce5749687d125d56b6748fa68eee1791f6e Author: Johannes Berg Date: Thu Dec 1 16:25:30 2016 +0100 iwlwifi: mvm: set AID to firmware only for associated stations The firmware will soon actually look at the AID field, and when it does that it'll try to ensure that the AID is never changing. Due to the way the station is added, it may start with an invalid AID before it's associated, so to ensure a constant AID (once it becomes non-zero), track the station state and set the AID only when the station is associated and when it disassociates. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 ++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) commit cba84570a0eb8826bcd69627fd975935bdcf7eaf Author: Johannes Berg Date: Wed Nov 30 17:04:52 2016 +0100 iwlwifi: mvm: fix D3 replay counter value This fixes a long-standing bug that was introduced when this code was introduced: cfg80211 passes a pointer, but we treat it as if it was passing a value. The result is that we pass the pointer to the firmware, instead of the value. It's not clear how this could ever have worked, unless the firmware is ignoring this value. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b70f07686d75d1eb5d956812cc810944e0b29b2 Author: Sara Sharon Date: Wed Nov 30 16:49:11 2016 +0200 iwlwifi: mvm: synchronize firmware DMA paging memory When driver needs to access the contents of a streaming DMA buffer without unmapping it it should call dma_sync_single_for_cpu(). Once the call has been made, the CPU "owns" the DMA buffer and can work with it as needed. Before the device accesses the buffer, however, ownership should be transferred back to it with dma_sync_single_for_device(). Both calls weren't performed by the driver, resulting with odd paging errors on some platforms. Fix it. Fixes: a6c4fb4441f4 ("iwlwifi: mvm: Add FW paging mechanism for the UMAC on PCI") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) commit 5c228d63f963bd7e20b6a9b06e93272093e98628 Author: Sara Sharon Date: Thu Nov 24 13:48:27 2016 +0200 iwlwifi: mvm: support new alive notification Support getting alive from two LMACs and dumping debug data from both. Deprecate older alive notifications no one is using. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 72 ++++------------ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 104 +++++++++--------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 12 ++- 5 files changed, 67 insertions(+), 125 deletions(-) commit 45b957e3edd22139a4e20067b39e15acbf36fb92 Author: Johannes Berg Date: Fri Dec 2 13:33:40 2016 +0100 iwlwifi: mvm: reduce usage of IEEE80211_SKB_CB() There's already a variable with the result in scope, use that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01796ff2fa6e81b0d806e735308d8171bcbfbec7 Author: Sara Sharon Date: Wed Nov 16 17:04:36 2016 +0200 iwlwifi: mvm: always free inactive queue when moving ownership If iwl_mvm_find_free_queue() doesn't find a free queue, it will return an inactive one. However, not all the call paths free this queue before reassigning it, which is a bug. Check it in other paths and act accordingly. Fixes: 9794c64f302d ("iwlwifi: mvm: support dqa queue inactivation upon timeout") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 101 ++++++++++++++++++--------- 1 file changed, 69 insertions(+), 32 deletions(-) commit 9ba221b372c177b6908ff8c39b7b056538622ae1 Author: Sara Sharon Date: Thu Nov 17 11:35:05 2016 +0200 iwlwifi: mvm: support new scan API For CDB devices we will want to configure scan parameters per band. Support the new scan API for now. Logic per band will be added in the future. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 106 +++++++--- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 228 +++++++++++++++------ 2 files changed, 238 insertions(+), 96 deletions(-) commit 0e7ac018dc06a1fcd7cbb54a1ee81082f46af870 Author: Sara Sharon Date: Thu Sep 8 17:32:19 2016 +0300 iwlwifi: mvm: support new statistics APIs For CDB arch there is another auxiliary mac. Support statistics APIs that were changed to reflect that. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 7 ++- .../net/wireless/intel/iwlwifi/mvm/fw-api-stats.h | 29 ++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 13 ++++ drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 70 ++++++++++++++++------ 4 files changed, 97 insertions(+), 22 deletions(-) commit 4f23f206ddce85a92b1acdebe0f4e9ed01b1d3f4 Author: Sara Sharon Date: Sun Nov 20 13:50:39 2016 +0200 iwlwifi: mvm: cleanup incorrect and redundant define Currently we have up to 3 phy contexts - defined by NUM_PHY_CTX. However - some code paths validate the ID by using MAX_PHYS define which is set to 4. While there is no harm it is incorrect - since the maximum is 3. Remove the define and use the correct one. Cleanup the code a bit while at it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/power.c | 26 +++++++++++-------------- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) commit 6574dc943fc32a2fce69fab14891abca7eecb67c Author: Beni Lev Date: Thu Nov 17 14:03:17 2016 +0200 iwlwifi: mvm: Use aux queue for offchannel frames in dqa Since offchannel activity doesn't always require a BSS, e.g. ANQP sessions, offchannel frames should not use the BSS queue, because it might not be initialized. Use the auxilary queue instead Fixes: e3118ad74d7e ("iwlwifi: mvm: support tdls in dqa mode") Signed-off-by: Beni Lev Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 19f63c531b85281003d7775490fd16d1579e2519 Author: Golan Ben-Ami Date: Mon Nov 7 17:40:43 2016 +0200 iwlwifi: mvm: support v2 of mfuart load notification Add to the v1 of the mfuart loading notification, the size of the mfuart image, and write it to dmesg once the notification is received. Signed-off-by: Golan Ben-Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 21 +++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) commit 1f3706508395043b5f29aff64d907e682b75de42 Author: Sara Sharon Date: Wed Aug 31 18:13:57 2016 +0300 iwlwifi: mvm: support unification of INIT and RT images For a000 devices the INIT and RT images are unified to one image. The changes in the flow are the following: * Driver load only RT firmware - meaning that the nvm access command will be done in the RT image load flow. * A new command (NVM_ACCESS_COMPLETE) now signals to the FW that the driver is done accessing the NVM and FW can proceed with phy calibrations. * Phy DB is no longer sent from INIT FW to be restored by driver for the RT FW - all the phy DB is now internal to the FW. INIT complete will now follow the NVM access command, without phy DB calls before. * Paging command is sent earlier in the flow before NVM access to enable a complete load of FW. * caution must be care when restart is called since we may have not completed init flow even though we are in RT firmware. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 12 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 208 ++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 - drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 24 ++- 5 files changed, 188 insertions(+), 61 deletions(-) commit 143b0b2ae8c1f0c0e036ec859d0a49482892234b Author: Emmanuel Grumbach Date: Wed Oct 26 14:21:27 2016 +0300 iwlwifi: mvm: fix PS-Poll enablement We added the uAPSD enabled ACs and that made the firmware choose to pull frames with uAPSD trigger frames instead of PS-Poll. Fix that. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/power.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 1059b687d002526452366b2307b2f94e30dd59cf Author: Baruch Siach Date: Wed Jan 4 11:47:17 2017 -0200 [media] v4l2-subdev.h: fix v4l2_subdev_pad_config documentation The fields of v4l2_subdev_pad_config are not pointers. Fixes: 21c29de1d09 ("[media] v4l2-subdev.h: Improve documentation") Cc: Mauro Carvalho Chehab Signed-off-by: Baruch Siach Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4c171636bc2beca81b25b07fbe4ac2a6ab27f982 Author: Nicolas Iooss Date: Mon Dec 26 11:31:39 2016 -0200 [media] v4l: rcar_fdp1: use %4.4s to format a 4-byte string Using %4s to format f->fmt.pix_mp.pixelformat in fdp1_try_fmt() and fdp1_s_fmt() may lead to more characters being printed (when the byte following field pixelformat is not zero). Add ".4" to the format specifier to limit the number of printed characters to four. The resulting format specifier "%4.4s" is also used by other media drivers to print pixelformat value. Signed-off-by: Nicolas Iooss Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_fdp1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d615128a7edb592f1979b593ca46a301c6afddbf Author: Niels Ole Salscheider Date: Sun Dec 25 13:38:20 2016 -0200 [media] cx23885: attach md88ds3103 driver via i2c_client for DVBSky S952 With this patch we use the new style to attach the frontend. Signed-off-by: Niels Ole Salscheider Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 54 +++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit f3287a995ac3520b1afcf03932b9c405f502657c Author: Benjamin Tissoires Date: Mon Jan 30 10:48:06 2017 +0100 HID: multitouch: fix LG Melfas touchscreen The LG Melfas touchscreen has a bad firmware where it declares the Contact ID field as constant while it shouldn't. This messes up the autodetection and the reporting of the events by hid-multitouch given that hid-input ignores constant fields. The autodetection is simply worked around by manually adding the device to hid_have_special_driver[]. The processing of the events requires either a report fixup, or some specific case handling. Given that the report fixup would require to basically rewrite all the report descriptor, I went for the programatic way of fixing that after the report descriptors are loaded. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1416181 Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit e7deb1570a527d3c74be4e21a72b1b459605c501 Author: Ping Cheng Date: Mon Jan 30 15:40:49 2017 -0800 HID: wacom: don't apply generic settings to old devices Non-generic devices have numbered_buttons set for both pen and touch interfaces by default. The actual number of buttons on the interface is normally manually decided later, which is different from what those HID generic devices are processed, where number of buttons are directly retrieved from HID descriptors. This patch adds the missed HID_GENERIC check and moves the statement to wacom_setup_pad_input_capabilities since it's not a quirk anymore. Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 081d0d8c234094bf0f825baa0e4f7cd0d2142a4d Author: Cao jin Date: Mon Dec 19 04:49:53 2016 -0200 [media] ngene: drop ngene_link_reset() In AER recovery, pci_error_handlers.link_reset() is never called, drop it now. Signed-off-by: Cao jin Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 7 ------- 1 file changed, 7 deletions(-) commit e90bbacd8ce475535d03ccb8ad88c1d55840580a Author: devendra sharma Date: Sun Dec 18 11:52:55 2016 -0200 [media] media: dvb: dmx: fixed coding style issues of spacing Fixed coding style issues of spacing Signed-off-by: Devendra Sharma Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 646933284e46bcb1476907a2e1fe5125f30e3415 Author: andrea.merello Date: Thu Feb 2 08:44:04 2017 +0100 DT: add binding documentation for STTS751 Signed-off-by: Andrea Merello Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/stts751.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 7f07ec0fa17ae6b4acf031d4c20a7da4f3fbc407 Author: andrea.merello Date: Thu Feb 2 08:44:03 2017 +0100 hwmon: new driver for ST stts751 thermal sensor This patch adds a HWMON driver for ST Microelectronics STTS751 temperature sensors. Thanks-to: LABBE Corentin [for suggestions] Thanks-to: Guenter Roeck [for suggestion and discussions] Signed-off-by: Andrea Merello Cc: LABBE Corentin Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/stts751.c | 834 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 845 insertions(+) commit 504fc0286d847a23aed30bea214a9e51802f0318 Author: Mauro Carvalho Chehab Date: Fri Feb 3 11:30:37 2017 -0200 [media] stk1160: make some functions static As warned by gcc: drivers/media/usb/stk1160/stk1160-ac97.c:117:5: warning: no previous prototype for 'stk1160_has_audio' [-Wmissing-prototypes] int stk1160_has_audio(struct stk1160 *dev) ^~~~~~~~~~~~~~~~~ drivers/media/usb/stk1160/stk1160-ac97.c:125:5: warning: no previous prototype for 'stk1160_has_ac97' [-Wmissing-prototypes] int stk1160_has_ac97(struct stk1160 *dev) ^~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/stk1160-ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a4825edbcd6f7d7da88696412c6b0436ed7cc0b Author: Marcel Hasler Date: Thu Dec 15 20:14:03 2016 -0200 [media] stk1160: Wait for completion of transfers to and from AC97 codec The STK1160 needs some time to transfer data to and from the AC97 codec. The transfer completion is indicated by command read/write bits in the chip's audio control register. The driver should poll these bits and wait until they have been cleared by hardware before trying to retrieve the results of a read operation or setting a new write command. [mchehab@s-opensource.com: make checkpatch happier] Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/stk1160-ac97.c | 39 +++++++++++++++++++++++++------- drivers/media/usb/stk1160/stk1160-reg.h | 2 ++ drivers/media/usb/stk1160/stk1160.h | 2 ++ 3 files changed, 35 insertions(+), 8 deletions(-) commit 1dc7df4d3d787639c9eeb8fc3841dd8d003de82a Author: Marcel Hasler Date: Thu Dec 15 20:13:34 2016 -0200 [media] stk1160: Check whether to use AC97 codec Some STK1160-based devices use the chip's internal 8-bit ADC. This is configured through a strap pin. The value of this and other pins can be read through the POSVA register. If the internal ADC is used, or if audio is disabled altogether, there's no point trying to setup the AC97 codec. Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/stk1160-ac97.c | 26 ++++++++++++++++++++++++++ drivers/media/usb/stk1160/stk1160-core.c | 3 +-- drivers/media/usb/stk1160/stk1160-reg.h | 8 ++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) commit e36e6b5f26c14fd588d5c7e78527d3707f8ac836 Author: Marcel Hasler Date: Thu Dec 15 20:17:26 2016 -0200 [media] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically Exposing all the channels of the device's internal AC97 codec to userspace is unnecessary and confusing. Instead the driver should setup the codec with proper values. This patch removes the mixer and sets up the codec using optimal values, i.e. the same values set by the Windows driver. This also makes the device work out-of-the-box, without the need for the user to reconfigure the device every time it's plugged in. Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/Kconfig | 10 +-- drivers/media/usb/stk1160/Makefile | 4 +- drivers/media/usb/stk1160/stk1160-ac97.c | 126 +++++++++++-------------------- drivers/media/usb/stk1160/stk1160-core.c | 5 +- drivers/media/usb/stk1160/stk1160.h | 9 +-- 5 files changed, 50 insertions(+), 104 deletions(-) commit 814e92b8cadf73ee79f689ec48f64408f3904d19 Author: Hans Verkuil Date: Wed Jan 25 05:38:07 2017 -0200 [media] v4l2-ctrls.c: add NULL check Check that the control whose events we want to delete is still there. Normally this will always be the case, but I am not 100% certain if there aren't any corner cases when a device is forcibly unbound. In any case, this will satisfy static checkers and simply make it more robust. Signed-off-by: Hans Verkuil Reported-by: Shaobo Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 3 +++ 1 file changed, 3 insertions(+) commit 75d1b1379fba4ca2fb6fb7b70141ac0afb807fbf Author: Matej Hulín Date: Mon Jan 23 07:12:30 2017 -0200 [media] media: radio-cadet, initialize timer with setup_timer Stop accessing timer struct members directly and use the setup_timer helper intended for that use. It makes the code cleaner and will allow for easier change of the timer struct internals. Signed-off-by: Matej Hulín Signed-off-by: Jiri Slaby Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-cadet.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c548a1c175608e268f6495f3f82461303584d1c9 Author: Andrew Price Date: Fri Feb 3 08:23:47 2017 -0500 gfs2: Make gfs2_write_full_page static It only gets called from aops.c and doesn't appear in any headers. Signed-off-by: Andrew Price Signed-off-by: Bob Peterson fs/gfs2/aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca80fbcd4ce61686d863fb9aca1fa3d6a9276361 Author: Colin Ian King Date: Wed Jan 18 13:10:57 2017 -0200 [media] saa7164: "first image" should be "second image" in error message The error message when the second image is not available is incorrect, replace "first image" with "second image". Fixes CoverityScan CID#1077508 ("Copy-paste error") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c099b73a29278c22a768a8c203c584e803388490 Author: Colin Ian King Date: Wed Jan 11 14:24:33 2017 -0200 [media] gspca_stv06xx: remove redundant check for err < 0 The comparison of err < 0 is redundant as err has been previously been assigned to 0 and has not changed. Remove the redundant check. Fixes CoverityScan CID#703363 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 3 --- 1 file changed, 3 deletions(-) commit 676c002af672d05ccf64ddd0927cbf4d170cc6aa Author: Mats Randgaard Date: Tue Dec 6 08:24:29 2016 -0200 [media] tc358743: ctrl_detect_tx_5v should always be updated The control for +5V Power detection must also be updated when the EDID is not present. Signed-off-by: Mats Randgaard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 1 + 1 file changed, 1 insertion(+) commit 0a1f085061e79aa911475d5420f05698bc6b62eb Author: Mats Randgaard Date: Tue Dec 6 08:24:28 2016 -0200 [media] tc358743: Disable HDCP with "manual HDCP authentication" bit Originally Toshiba told us that the only way to disable HDCP was to set the receiver in repeater mode, that would make the authentication fail because of missing software support. It has worked fine with all the sources we and our customers has used, until it was reported problems with Apple MacBook (Retina, 12-inch, Early 2015) (https://support.apple.com/kb/SP712?locale=en_US&viewlocale=en_US) with Apple A1612 USB type-C multiport adapter (http://www.apple.com/shop/product/MJ1K2AM/A/usb-c-digital-av-multiport-adapter) Finally Toshiba came up with a hidden bit that is named "Manual HDCP authentication". In this patch the original "repeater mode" concept is removed, and the new bit is set instead. With his patch HDCP is disabled when connected to the Apple MacBook and all other sources we have tested so far. The Apple MacBook is constantly trying to authenticate, but fails and continues to transmit unencrypted video. Signed-off-by: Mats Randgaard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 32 ++++++++++++-------------------- drivers/media/i2c/tc358743_regs.h | 1 + 2 files changed, 13 insertions(+), 20 deletions(-) commit 59e34ba82aebf75ea70508a114ada1ed3ca0df7c Author: Mats Randgaard Date: Tue Dec 6 08:24:27 2016 -0200 [media] tc358743: Do not read number of CSI lanes in use from chip The number of CSI lanes that should be used is set to the CSI_CONTROL register by indirectly writing to the CSI_CONFW register. When the number of lanes is read back from the CSI_CONTROL register the value is usually correct, but we have seen that it suddenly is 1 for a short moment before the correct value is restored again. Toshiba have not figured out why that happen, but we have found it safer to store the value in the driver. Signed-off-by: Mats Randgaard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 10106c13f444e3b5adf435d8c12e207f109f469c Author: Bhumika Goyal Date: Wed Dec 14 09:11:10 2016 -0200 [media] media: platform: s3c-camif: constify v4l2_subdev_ops structures Check for v4l2_subdev_ops structures that are only passed as an argument to the function v4l2_subdev_init. This argument is of type const, so v4l2_subdev_ops structures having this property can also be declared const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ v4l2_subdev_init(...,&i@p) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_ops i; File size before: text data bss dec hex filename 17171 1912 20 19103 4a9f platform/s3c-camif/camif-capture.o File size after: text data bss dec hex filename 17235 1848 20 19103 4a9f platform/s3c-camif/camif-capture.o Signed-off-by: Bhumika Goyal Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s3c-camif/camif-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5332b6263742cd75963eccdea9e3af4a464c2999 Author: Martin Wache Date: Tue Dec 13 18:21:41 2016 -0200 [media] dib7000p: avoid division by zero dib7000p_read_word() may return zero on i2c errors, resulting in dib7000p_get_internal_freq() returning zero. So don't divide by the result of dib7000p_get_internal_freq() without checking it for zero in dib7000p_set_dds(). On one of my machines the device ID 2304:0229 Pinnacle Systems, Inc. PCTV Dual DVB-T 2001e about once a day/every two days gets into a state, where most (all?) I2C reads return with an error. Tuning during this state will result in a divide by zero without this patch. This patch doesn't fix the root cause for the device getting into a bad state, but it allows me to unload/reload the drivers, bringing it back into a usable state. Signed-off-by: Martin Wache Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib7000p.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit f83435c42ee6e4233cc07130e2cf5022b95e1d32 Author: Julian Wiedmann Date: Mon Nov 21 11:34:25 2016 +0100 s390/qdio: improve some debug prints With multiple input queues, these DBFs turned out to be not very helpful... Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 72a01d0b6afb5862998d84c19ddc9e1c39a9588c Author: Julian Wiedmann Date: Mon Nov 21 11:19:57 2016 +0100 s390/qdio: fix up tiqdio_thinint_handler() kerneldoc Missed in commit f4eae94f7137 ("s390/airq: simplify adapter interrupt code") Signed-off-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_thinint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67bb323bfee7db1af047ae15a5d7f8f5a52a09a6 Author: Julian Wiedmann Date: Mon Nov 21 13:34:23 2016 +0100 s390/qdio: clean up q->irq_ptr usage In tiqdio_call_inq_handlers(), we're looping over all input queues on the *same* irq. So instead of using the queues' back pointer, we can just access the irq directly. No functional change. Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_thinint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1e4a382fdc0ba8d1a85b758c0811de3a3631085e Author: Julian Wiedmann Date: Mon Nov 21 13:37:48 2016 +0100 s390/qdio: clear DSCI prior to scanning multiple input queues For devices with multiple input queues, tiqdio_call_inq_handlers() iterates over all input queues and clears the device's DSCI during each iteration. If the DSCI is re-armed during one of the later iterations, we therefore do not scan the previous queues again. The re-arming also raises a new adapter interrupt. But its handler does not trigger a rescan for the device, as the DSCI has already been erroneously cleared. This can result in queue stalls on devices with multiple input queues. Fix it by clearing the DSCI just once, prior to scanning the queues. As the code is moved in front of the loop, we also need to access the DSCI directly (ie irq->dsci) instead of going via each queue's parent pointer to the same irq. This is not a functional change, and a follow-up patch will clean up the other users. In practice, this bug only affects CQ-enabled HiperSockets devices, ie. devices with sysfs-attribute "hsuid" set. Setting a hsuid is needed for AF_IUCV socket applications that use HiperSockets communication. Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks") Cc: # v3.2+ Reviewed-by: Ursula Braun Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_thinint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a63f53e34db8b49675448d03ae324f6c5bc04fe6 Author: Gerald Schaefer Date: Mon Jan 30 15:52:14 2017 +0100 s390/dcssblk: fix device size calculation in dcssblk_direct_access() Since commit dd22f551 "block: Change direct_access calling convention", the device size calculation in dcssblk_direct_access() is off-by-one. This results in bdev_direct_access() always returning -ENXIO because the returned value is not page aligned. Fix this by adding 1 to the dev_sz calculation. Fixes: dd22f551 ("block: Change direct_access calling convention") Cc: # 4.0+ Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky drivers/s390/block/dcssblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9893ae86066cf0a59a6beb3908b9cdac4c1347f3 Author: Jean Delvare Date: Thu Jan 5 09:14:43 2017 +0100 platform/x86: dell-smbios: Auto-select as needed Dell-smbios is a helper module, it serves no purpose on its own, so do not present it as an option to the user. Instead, select it automatically whenever a driver which needs it is selected. Also select DCDBAS as needed, instead of depending on it, so that the Dell driver options are always visible. As a clean-up, I removed the "default n" statements as they are not needed (n is the default default.) Signed-off-by: Jean Delvare Cc: Michał Kępień Cc: Pali Rohár Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 596c12423264917bb1086ab11571a5c884a70e9c Author: Guenter Roeck Date: Tue Jan 3 06:46:14 2017 -0800 platform/x86: intel_pmc_ipc: Remove unused iTCO_version variable iTCO_version was there since the driver was introduced but never used. Drop it. Signed-off-by: Guenter Roeck Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 2 -- 1 file changed, 2 deletions(-) commit a93151a72061e944a4915458b1b1d6d505c03bbf Author: Javier Martinez Canillas Date: Mon Jan 2 12:20:56 2017 -0300 platform/x86: intel_mid_thermal: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias $ After this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias alias: platform:msic_thermal Signed-off-by: Javier Martinez Canillas Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_thermal.c | 1 + 1 file changed, 1 insertion(+) commit 275721585b34e0104ccdeee21ffe4668da9b5fd3 Author: Javier Martinez Canillas Date: Mon Jan 2 12:20:55 2017 -0300 platform/x86: intel_mid_thermal: Remove duplicated platform device ID Commit 3fca3d3d5075 ("platform-x86: intel_mid_thermal: add msic_thermal alias") added a "msic_thermal" entry to the driver's platform device ID table since that was the platform dev name registered in some platforms and the only dev in the platform table was "msic_sensor" (DRIVER_NAME). But then commit 634830704d80 ("x86/mid/thermal: Add msic_thermal alias") changed DRIVER_NAME from "msic_sensor" to "msic_thermal", and so there's now duplicated entries in the platform device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_mid_thermal.c | 1 - 1 file changed, 1 deletion(-) commit 9a38b67c9877a7371a250454bbbbf521d02fded5 Author: Vadim Pasternak Date: Wed Dec 14 12:05:15 2016 +0000 platform/x86: mlx-platform: mlxcpld-hotplug driver style fixes The patch contains several styling fixes: - Make names of hotplug devices shorter; - Change register offset assignment to defines; - Add defines for the all event masks; - Use PLATFORM_DEVID_NONE instead of -1; Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 84 ++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 34 deletions(-) commit 3e491607600aacab5d9cc13aabb9c8b07b0c0909 Author: Ladislav Michl Date: Wed Dec 21 10:55:53 2016 +0100 platform/x86: hp_accel: Add support for HP ZBook 17 HP ZBook 17 laptop needs a non-standard mapping (xy_swap_yz_inverted). Signed-off-by: Ladislav Michl Signed-off-by: Andy Shevchenko drivers/platform/x86/hp_accel.c | 1 + 1 file changed, 1 insertion(+) commit 98d610c3739ac354319a6590b915f4624d9151e6 Author: Lee, Chun-Yi Date: Thu Nov 3 08:18:52 2016 +0800 platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event The accelerometer event relies on the ACERWMID_EVENT_GUID notify. So, this patch changes the codes to setup accelerometer input device when detected ACERWMID_EVENT_GUID. It avoids that the accel input device created on every Acer machines. In addition, patch adds a clearly parsing logic of accelerometer hid to acer_wmi_get_handle_cb callback function. It is positive matching the "SENR" name with "BST0001" device to avoid non-supported hardware. Reported-by: Bjørn Mork Cc: Darren Hart Signed-off-by: Lee, Chun-Yi [andy: slightly massage commit message] Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 5f25b0054f08be0914528a18bbac5e95eb5ed921 Author: Micha? K?pie? Date: Fri Dec 16 15:46:03 2016 +0100 platform/x86: fujitsu-laptop: set default trigger for radio LED to rfkill-any The "radio components indicator" LED present in Lifebook E734/E744/E754 should be lit when any radio transmitter is enabled, so set its default trigger to rfkill-any. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Andy Shevchenko drivers/platform/x86/fujitsu-laptop.c | 1 + 1 file changed, 1 insertion(+) commit 2ad6f30de7087515a0bc2a718fca6681a57739a0 Author: Mylène Josserand Date: Thu Feb 2 10:24:16 2017 +0100 ASoC: sun4i-i2s: Add quirks to handle a31 compatible Some SoCs have a reset line that must be asserted/deasserted. This patch adds a quirk to handle the new compatible "allwinner,sun6i-a31-i2s" which will deassert the reset line on probe function and assert it on remove's one. This new compatible is useful in case of A33 codec driver, for example. Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 57 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) commit 164e372747ce7a8b97459e98ce258b6aa969cb2f Author: Mylène Josserand Date: Thu Feb 2 10:24:19 2017 +0100 ASoC: codecs: Add sun8i-a33 binding documentation Add the documentation for dt-binding of the digital audio codec driver and the audio card driver for Sun8i-a33 SoCs. Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Mark Brown .../devicetree/bindings/sound/sun8i-a33-codec.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 36c684936fae7ed97a4816de6006d127d1854a5a Author: Mylène Josserand Date: Thu Feb 2 10:24:17 2017 +0100 ASoC: Add sun8i digital audio codec Add the sun8i audio codec which handles the digital register of A33 codec. The driver handles only the basic playback from the DAC to headphones. All other features (microphone, capture, etc) will be added later. Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/Kconfig | 11 + sound/soc/sunxi/Makefile | 1 + sound/soc/sunxi/sun8i-codec.c | 498 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 510 insertions(+) commit bf14da7e55169964a1e6f35dc9d7428dc9e9013c Author: Mylène Josserand Date: Thu Feb 2 10:24:18 2017 +0100 ASoC: sun8i-codec-analog: Add amplifier event to fix first delay When playing a sound for the first time, a short delay, where the audio file is not played, can be noticed. On a second play (right after), the sound is played correctly. If we wait a short time (~5 sec which corresponds to the aplay timeout), the delay is back. This patch fixes it by using an event on headphone amplifier. It allows to keep the amplifier enable while playing a sound. A delay of 700ms allows to wait that the amplifier is powered-up before playing the sound. Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec-analog.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 0f06feba91580df799c48bed753a7400a43d05f7 Author: Seraphime Kirkovski Date: Fri Feb 3 00:12:43 2017 +0100 staging: bcm2835: cleanup: remove deprecated include This replaces the last occurrence of the deprecated include in the staging directory with the newer Signed-off-by: Seraphime Kirkovski Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76bdaa161cd93d9c033bf6fe2b0a5661c8204441 Author: Dan Carpenter Date: Mon Jan 30 13:51:49 2017 +0300 staging: lustre: libcfs: double copy bug The problem is that we copy hdr.ioc_len, we verify it, then we copy it again without checking to see if it has changed in between the two copies. This could result in an information leak. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit dcdf43a01e950c9475fb325972d8f034afa19464 Author: Zhengyi Shen Date: Thu Feb 2 23:28:21 2017 +0800 staging: lustre: fix coding style issue in vvp_page.c This is a patch to fix "WARNING: line over 80 characters" found by checkpatch.pl in vvp_page.c. Signed-off-by: Zhengyi Shen Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/vvp_page.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a3463e64adfa0ad3d9d11ca769f0e670917039de Author: James Simmons Date: Sat Jan 28 19:05:27 2017 -0500 staging: lustre: ptlrpc : remove userland usage from ptlrpc The reason for __REQ_LAYOUT_USER__ was to expose a section of code in layout.c to userland for a utility similar to wireshark. This was done before wireshark existed but now that it does we no longer need to do this type of hack. This also reduces lustre_acl.h to strictly a kernel header now. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8945 Reviewed-on: https://review.whamcloud.com/24396 Reviewed-by: Dmitry Eremin Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_req_layout.h | 10 ++-------- drivers/staging/lustre/lustre/ptlrpc/layout.c | 9 --------- 2 files changed, 2 insertions(+), 17 deletions(-) commit 86df59846c924c2339603f4370779581e594d0e1 Author: James Simmons Date: Sat Jan 28 19:05:26 2017 -0500 staging: lustre: osc: avoid 64 divide in osc_cache_too_much The use of 64 bit time introduces an expensive 64 bit division operation. Since the time lapse being calculated in osc_cache_too_much will never be more than seventy years we can cast the time lapse to an long and perform a normal 32 bit divison operation instead. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8835 Reviewed-on: https://review.whamcloud.com/23814 Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_page.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1cf96da241f489fd29fe564c8fc045e51b5269b8 Author: wang di Date: Sat Jan 28 19:05:25 2017 -0500 staging: lustre: lmv: remove nlink check in lmv_revalidate_slaves If an application attempts to remove millions of files in a single directory it will fail. This failure was tracked down to the nlink < 2 check in lmv_revalidate_slaves, because after nlink reaches to maximum value of LDISKFS_LINK_MAX (65000), the nlink broadcast back from the server will be reported as one. The return value of 1 is not invalid so lets remove the check. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984 Reviewed-on: http://review.whamcloud.com/16490 Reviewed-by: James Simmons Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 77759771fb95420d23876cb104ab65c022613325 Author: Yang Sheng Date: Sat Jan 28 19:05:24 2017 -0500 staging: lustre: llite: don't invoke direct_IO for the EOF case The function generic_file_read_iter() does not check EOF before invoke direct_IO callback. So we have to check it ourselves. Signed-off-by: Yang Sheng Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969 Reviewed-on: https://review.whamcloud.com/24552 Reviewed-by: Bob Glossman Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62898c2d7efc1029d77b5fabe968871524f0297c Author: James Simmons Date: Sat Jan 28 19:05:23 2017 -0500 staging: lustre: obd: move s3 in lmd_parse to inner loop Building the lustre client with W=1 reports the following error: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a8dded1a3fcfb0c865a35688c86aa45bac37393 Author: Steve Guminski Date: Sat Jan 28 19:05:22 2017 -0500 staging: lustre: fid: Change positional struct initializers to C99 This patch makes no functional changes. Struct initializers in the fid directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializers have been updated: lustre/fid/fid_lib.c: const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE lustre/fid/lproc_fid.c: struct lprocfs_vars seq_client_debugfs_list Signed-off-by: Steve Guminski Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: https://review.whamcloud.com/23789 Reviewed-by: Nathaniel Clark Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_lib.c | 7 +++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) commit 15a4ca983fc3ab1fb839034f3e72dccae9f66efe Author: Niu Yawei Date: Sat Jan 28 19:05:21 2017 -0500 staging: lustre: ptlrpc: update replay cursor when close during replay The replay cursor should be updated properly when close happened during replay, otherwise, ptlrpc_replay_next() could run into a dead loop due to an invalid replay cursor: - replay cursor is moved to an open request during replay; - application close that open file, so the rq_replay of the open request is cleared; - ptlrpc_replay_next() calls ptlrpc_free_committed() to free committed/closed requests, the open request is removed from the committed list, so the replay cursor is changed to an empty list_head now. The open request won't be freed now since it's still held by the pending close request; - ptlrpc_replay_next() continue to move the replay cursor to next and run into a dead loop at the end; Another change in this patch is to remove the out of date comments in ptlrpc_replay_next() and cover the whole process of finding replay request within imp_lock, because: 1. With two separated replay lists and replay cursor introduced, finding replay request won't take much time as before, it's not necessary to do this "lock -> unlock -> lock -> unlock" trick anymore; 2. Nowadays there are various kind of non-replay requests are allowed during recovery, so ptlrpc_free_committed() may run in parallel to remove an open request while ptlrpc_replay_next() is iterating the open requests list; Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8765 Reviewed-on: https://review.whamcloud.com/23418 Reviewed-by: Yang Sheng Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 15 ++++++++++----- drivers/staging/lustre/lustre/ptlrpc/recover.c | 23 +---------------------- 2 files changed, 11 insertions(+), 27 deletions(-) commit 067e634307ce2c1e93f18e3de56a0cb7d5aae99a Author: Dmitry Eremin Date: Sat Jan 28 19:05:19 2017 -0500 staging: lustre: ptlrpc: update MODULE_PARAM_DESC in ptlrpcd.c Update max_ptlrpcds module parameter descriptions to let users know its obsolete. Change cpt to CPT for the module parameter description ptlrpcd_per_cpt_max so it matches documentation. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8890 Reviewed-on: https://review.whamcloud.com/24065 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b6d6d0571bac28c790463ac7f24dbbc5cda835d9 Author: Dmitry Eremin Date: Sat Jan 28 19:05:18 2017 -0500 staging: lustre: ptlrpc: remove unused pc->pc_env Environment for request interpreters is not used any more. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8887 Reviewed-on: https://review.whamcloud.com/24061 Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 4 ---- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 13 ------------- 2 files changed, 17 deletions(-) commit 04d8615889c82ece568afa0fe208f7ef9ab90063 Author: James Simmons Date: Sat Jan 28 19:05:17 2017 -0500 staging: lustre: socklnd: remove socklnd_init_msg Remove the inline function socklnd_init_msg. Its only used by the kernel code so no point keeping it in an UAPI header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/18506 Reviewed-by: Dmitry Eremin Reviewed-by: Doug Oucharek Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/socklnd.h | 9 --------- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 9 +++++++-- 2 files changed, 7 insertions(+), 11 deletions(-) commit 6cd67869214c3c80de7ab00fb8d1f7daada952e6 Author: Liang Zhen Date: Sat Jan 28 19:05:16 2017 -0500 staging: lustre: ksocklnd: ignore timedout TX on closing connection ksocklnd reaper thread always tries to close the connection for the first timedout zero-copy TX. This is wrong if this connection is already being closed, because the reaper will see the same TX again and again and cannot find out other timedout zero-copy TXs and close connections for them. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8867 Reviewed-on: https://review.whamcloud.com/23973 Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 59bedbccb5d27356a808f9451a3fb25adb093cc9 Author: John L. Hammond Date: Sat Jan 28 19:05:15 2017 -0500 staging: lustre: mdc: avoid returning freed request In mdc_close() if ptlrpc_request_pack() fails then set req to NULL so that an already freed request is not returned in *request. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8811 Reviewed-on: https://review.whamcloud.com/23843 Reviewed-by: Patrick Farrell Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 + 1 file changed, 1 insertion(+) commit 26d2bf1e71525f4c0f644820c30d1344633159e2 Author: Patrick Farrell Date: Sat Jan 28 19:05:14 2017 -0500 staging: lustre: mdc: Make IT_OPEN take lookup bits lock An earlier commit accidentally changed handling of IT_OPEN, making it take the MDS_INODELOCK_UPDATE bits lock instead of MDS_INODELOCK_LOOKUP. This does not cause any known bugs. Signed-off-by: Patrick Farrell Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8842 Reviewed-on: https://review.whamcloud.com/23797 Fixes: 70a251f68dea ("staging: lustre: obd: decruft md_enqueue() and md_intent_lock()" 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/mdc/mdc_locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acd8f3e4e85a0ea22f2d63a03ec04d621152f2d9 Author: Steve Guminski Date: Sat Jan 28 19:05:13 2017 -0500 staging: lustre: libcfs: Change positional struct initializers to C99 This patch makes no functional changes. Struct initializers in the libcfs directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializers have been updated: libcfs/include/libcfs/libcfs_crypto.h: static struct cfs_crypto_hash_type hash_types[] Signed-off-by: Steve Guminski Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: https://review.whamcloud.com/23332 Reviewed-by: Frank Zago Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_crypto.h | 60 ++++++++++++++++++---- 1 file changed, 50 insertions(+), 10 deletions(-) commit 69d3990cfdac8e1e5bd0ec89120cef2dbf889637 Author: Dmitry Eremin Date: Sat Jan 28 19:05:12 2017 -0500 staging: lustre: libcfs: fix error messages Don't treat unability to set CPU partition affinity as error. Improve those warning messages. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23307 Reviewed-by: Patrick Farrell Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 5 +++-- drivers/staging/lustre/lnet/libcfs/workitem.c | 2 +- drivers/staging/lustre/lnet/selftest/module.c | 3 ++- 5 files changed, 9 insertions(+), 7 deletions(-) commit 3ff31517459a9d1f1e91058537c13628e328fd27 Author: John L. Hammond Date: Sat Jan 28 19:05:11 2017 -0500 staging: lustre: obd: remove OBD_NOTIFY_CREATE None of the obd_notify() handlers listen for the OBD_NOTIFY_CREATE event, so remove it and its sole use in lov_add_target(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8403 Reviewed-on: https://review.whamcloud.com/21420 Reviewed-by: Ben Evans Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 -- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 -- 2 files changed, 4 deletions(-) commit c6de2b37b74d15dde6ccee650d8391a79054ba42 Author: Vladimir Saveliev Date: Sat Jan 28 19:05:10 2017 -0500 staging: lustre: ptlrpc: allow blocking asts to be delayed ptlrpc_import_delay_req() refuses to delay blocking asts when import is not in LUSTRE_IMP_FULL yet. That leads to client eviction assuming that it failed to respond. Allow delays for blocking asts being resent. Signed-off-by: Vladimir Saveliev Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8351 Seagate-bug-id: MRP-3500 Reviewed-on: https://review.whamcloud.com/21065 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/recover.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 7550387a6e4c042971d81bd476a7551d507344f8 Author: Steve Guminski Date: Sat Jan 28 19:05:09 2017 -0500 staging: lustre: osc: osc_match_base prototype differs from declaration The patch updates the prototype in osc_internal.h to match the enums used in the declaration. The osc_match_base declaration in lustre/osc/osc_request.c uses enums for stricter checking on the type and mode parameters: int osc_match_base(struct obd_export *exp, ... --> enum ldlm_type type, union ldlm_policy_data *policy, --> enum ldlm_mode mode, ... int unref) The prototype in lustre/osc/osc_internal.h instead used unsigned ints: int osc_match_base(struct obd_export *exp, ... --> __u32 type, union ldlm_policy_data *policy, --> __u32 mode, ... int unref); Signed-off-by: Steve Guminski Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8189 Reviewed-on: http://review.whamcloud.com/23167 Reviewed-by: Frank Zago Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d7cad1697541f26f2db0891d99147940c22e7f5a Author: Niu Yawei Date: Sat Jan 28 19:05:08 2017 -0500 staging: ptlrpc: leaked rs on difficult reply reply_out_callback() should call ptlrpc_schedule_difficult_reply() to finalize the rs if it's already not on uncommitted list, otherwise, the rs and the export held by rs could be leaked: - target_send_reply() sends a difficult reply before the transaction committed, the reply is linked to scp_rep_active; - export gets disconnected by umount or whatever reason, server_disconnect_export() is called to complete all outstanding replies, which will calls into ptlrpc_handle_rs() to dispose of the rs, so the rs is removed from the uncommitted list and LNetMDUnlink() is called to unlink the reply buffer and generate an unlink event; - reply_out_callback() is called to process above unlink event, ptlrpc_schedule_difficult_reply() is supposed to be called to dispose of the rs finally. However, it could be skipped because of following flawed code snippet: if (!rs->rs_no_ack || rs->rs_transno <= rs->rs_export->exp_obd->obd_last_committed) ptlrpc_schedule_difficult_reply(rs); The intention of above code is: if rs_no_ack is true (COS enabled), and transaction is not committed, we should rely on commit callback to release the rs. However, it overlooked the situation that rs could have been removed from the uncommitted list by disconnecting export. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7903 Reviewed-on: http://review.whamcloud.com/22696 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9fc9a344a3d6531a91abafdf8c5309831b038ab7 Author: James Simmons Date: Sat Jan 28 19:05:07 2017 -0500 staging: libcfs: remove integer types abstraction from libcfs Replace the ulong_ptr_t and long_ptr_t with standard kernel types. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/20204 Reviewed-by: Frank Zago Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h | 4 ---- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lnet/lnet/acceptor.c | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) commit 3f4f78240d7c098f3db2f8b671484406fff32dfc Author: Rahul Deshmukh Date: Sat Jan 28 19:05:06 2017 -0500 staging: lustre: llite: Adding timed wait in ll_umount_begin There exists timing race between umount and other thread which will increment the reference count on mnt e.g. getattr. If umount thread lose the race then umount fails with EBUSY error. To avoid this timed wait is added so that umount thread will wait for user to decrement the mnt reference count. Signed-off-by: Rahul Deshmukh Signed-off-by: Lokesh Nagappa Jaliminche Signed-off-by: Jian Yu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1882 Seagate-bug-id: MRP-1192 Reviewed-on: http://review.whamcloud.com/20061 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 71c5eec3ee38e10fad25a73b99c009ae8e467cc1 Author: Bobi Jam Date: Sat Jan 28 19:05:05 2017 -0500 staging: lustre: llite: specify READA debug mask for ras_update So that debug log only contains relevant messages for debugging purpose. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8413 Reviewed-on: http://review.whamcloud.com/22753 Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8e7a7362c3cbb67b867a39548f6b6e2eac58c01c Author: James Simmons Date: Sat Jan 28 19:05:04 2017 -0500 staging: lustre: header: remove assert from interval_set() In the case of interval_tree.h only interval_set() uses LASSERT which is removed in this patch and interval_set() instead reports a real error. The header libcfs.h for interval_tree.h is not needed anymore so we can just use the standard linux kernel headers instead.h Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22522 Reviewed-on: https://review.whamcloud.com/24323 Reviewed-by: Frank Zago Reviewed-by: Dmitry Eremin 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/interval_tree.h | 12 ++++++++---- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 5 +++-- drivers/staging/lustre/lustre/llite/range_lock.c | 10 ++++++++-- drivers/staging/lustre/lustre/llite/range_lock.h | 2 +- 4 files changed, 20 insertions(+), 9 deletions(-) commit 098b325b8fc3bb1e000cadbae538e20cd1ee1fa7 Author: Bobi Jam Date: Sat Jan 28 19:05:03 2017 -0500 staging: lustre: lov: ld_target could be NULL lov_device::ld_target[ost_idx] could be NULL if the OST target is not filled in lov_device::ld_lov::lov_tgt_desc[ost_idx] yet. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8018 Reviewed-on: http://review.whamcloud.com/21411 Reviewed-by: Jinshan Xiong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_object.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ff27098bba412fa2855c2567e6bfb6a80d86829c Author: Dmitry Eremin Date: Sat Jan 28 19:05:02 2017 -0500 staging: lustre: libcfs: default CPT matches NUMA topology Change default value of CPT pattern and make it match NUMA topology Signed-off-by: Liang Zhen Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5050 Reviewed-on: http://review.whamcloud.com/22377 Reviewed-by: James Simmons Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2351249f140aebdf911d86d7a1542c40b20fca3 Author: Dmitry Eremin Date: Sat Jan 28 19:05:01 2017 -0500 staging: lustre: libcfs: avoid stomping on module param cpu_pattern The function cfs_cpt_table_create_pattern() alters the string passed to it. Currently we are passing in the module parameter string cpu_pattern which is incorrect. Instead lets duplicate the module parameter string and pass that to the function cfs_cpt_table_create_pattern(). Signed-off-by: Liang Zhen Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5050 Reviewed-on: http://review.whamcloud.com/22377 Reviewed-by: James Simmons Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit aabb4adaddb39431ae68c126bd8d2d09e69dd3e0 Author: Jinshan Xiong Date: Sat Jan 28 19:05:00 2017 -0500 staging: lustre: osc: limits the number of chunks in write RPC OSC has to make sure that it won't issue write RPCs with too many chunks otherwise it will casue ZFS to create transactions much bigger than DMU_MAX_ACCESS in size, which will end up with write failure. Signed-off-by: Jinshan Xiong Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8135 Reviewed-on: http://review.whamcloud.com/22369 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8632 Reviewed-on: http://review.whamcloud.com/22654 Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 124 ++++++++++++++++++-------- 1 file changed, 87 insertions(+), 37 deletions(-) commit 553ed75d85123179b04ea89dfb4a3f41bcf38e9e Author: Niu Yawei Date: Sat Jan 28 19:04:59 2017 -0500 staging: lustre: clio: sync write should update mtime Sync write should update m/ctime promptly, otherwise, stale m/ctime could be updated on the OST object by the sync write RPC. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7310 Reviewed-on: http://review.whamcloud.com/21063 Reviewed-by: John L. Hammond Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c843ce20125d75663300baffd69692468d5c7d9f Author: Fan Yong Date: Sat Jan 28 19:04:58 2017 -0500 staging: lustre: ptlrpc: comment for FLD_QUERY RPC reply swab The 'fld_read_server' uses 'RMF_GENERIC_DATA' to hold the 'FLD_QUERY' RPC reply that is composed of 'struct lu_seq_range_array'. But there is not registered swabber function for 'RMF_GENERIC_DATA'. So the RPC peers need to handle the RPC reply with fixed little-endian format. In theory, we can define new structure with some swabber registered to handle the 'FLD_QUERY' RPC reply result automatically. But from the implementation view, it is not easy to be done within current 'struct req_msg_field' framework. Because the sequence range array in the RPC reply is not fixed length, instead, its length depends on 'lu_seq_range' count, that is unknown when prepare the RPC buffer. Generally, for such flexible length RPC usage, there will be a field in the RPC layout to indicate the data length. But for the 'FLD_READ' RPC, we have no way to do that unless we add new length filed that will broken the on-wire RPC protocol and cause interoperability trouble with old peer. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6284 Reviewed-on: http://review.whamcloud.com/22309 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/layout.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 07b71df1496b602ca36af42a6e217cde7ba6902c Author: Dmitry Eremin Date: Sat Jan 28 19:04:57 2017 -0500 staging: lustre: llite: Setting xattr are properly checked with and without ACLs Setting extended attributes permissions are properly checked with and without ACLs. In user.* namespace, only regular files and directories can have extended attributes. For sticky directories, only the owner and privileged user can write attributes. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1482 Reviewed-on: http://review.whamcloud.com/21496 Reviewed-by: John L. Hammond Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/xattr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit aad88bde74dc8530a5a8332a78f608f8e66cd038 Author: Andriy Skulysh Date: Sat Jan 28 19:04:56 2017 -0500 staging: lustre: ldlm: ASSERTION(flock->blocking_export!=0) failed Whole policy structure was zeroed twice. Once during enqueue and second time during resend or replay. Policy structure should be initialized with default values only in ldlm_lock_new(). Signed-off-by: Andriy Skulysh Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8349 Seagate-bug-id: MRP-2536, MRP-2909 Reviewed-on: http://review.whamcloud.com/21061 Reviewed-by: Alexander Boyko Reviewed-by: Vitaly Fertman Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 1 - drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 1 - drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 1 - 3 files changed, 3 deletions(-) commit 15134e0910909ff9b21fa8423c1124953bd3c4ab Author: Fan Yong Date: Sat Jan 28 19:04:55 2017 -0500 staging: lustre: mgc: handle config_llog_data::cld_refcount properly Originally, the logic of handling config_llog_data::cld_refcount is some confusing, it may cause the cld_refcount to be leaked or trigger "LASSERT(atomic_read(&cld->cld_refcount) > 0);" when put the reference. This patch clean related logic as following: 1) When the 'cld' is created, its reference is set as 1. 2) No need additional reference when add the 'cld' into the list 'config_llog_list'. 3) Inrease 'cld_refcount' when set lock data after mgc_enqueue() done successfully by mgc_process_log(). 4) When mgc_requeue_thread() traversals the 'config_llog_list', it needs to take additional reference on each 'cld' to avoid being freed during subsequent processing. The reference also prevents the 'cld' to be dropped from the 'config_llog_list', then the mgc_requeue_thread() can safely locate next 'cld', and then decrease the 'cld_refcount' for previous one. 5) mgc_blocking_ast() will drop the reference of 'cld_refcount' that is taken in mgc_process_log(). 6) The others need to call config_log_find() to find the 'cld' if want to access related config log data. That will increase the 'cld_refcount' to avoid being freed during accessing. The sponsor needs to call config_log_put() after using the 'cld'. 7) Other confused or redundant logic are dropped. On the other hand, the patch also enhances the protection for 'config_llog_data' flags, such as 'cld_stopping'/'cld_lostlock' as following. a) Use 'config_list_lock' (spinlock) to handle the possible parallel accessing of these flags among mgc_requeue_thread() and others config llog data visitors, such as mount/umount, blocking_ast, and so on. b) Use 'config_llog_data::cld_lock' (mutex) to pretect other parallel accessing of these flags among kinds of blockable operations, such as mount, umount, and blocking ast. The 'config_llog_data::cld_lock' is also used for protecting the sub-cld members, such as 'cld_sptlrpc'/'cld_params', and so on. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8408 Reviewed-on: http://review.whamcloud.com/21616 Reviewed-by: Alex Zhuravlev Reviewed-by: Hongchao Zhang Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mgc/mgc_request.c | 183 ++++++++++++------------ 1 file changed, 94 insertions(+), 89 deletions(-) commit d9421ff6c1998f2e4d829e571bbbd531ffd85e6f Author: Oleg Drokin Date: Sat Jan 28 19:04:54 2017 -0500 staging: lustre: llite: Trust creates in revalidate too. By forcing creates to always go via lookup we lose some important caching benefits too. Instead let's trust creates with positive cached entries. Then we have 3 possible outcomes: 1. Negative dentry - we go via atomic_open and do the create by name there. 2. Positive dentry, no contention - we just go straight to ll_intent_file_open and open by fid. 3. positive dentry, contention - by the time we reach the server, the inode is gone. We get ENOENT which is unacceptable to return from create. But since we know it's a create, we substitute it with ESTALE and VFS retries again with LOOKUP_REVAL set, we catch that in revalidate and force a lookup (same path as before this patch). Signed-off-by: Oleg Drokin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8371 Reviewed-on: http://review.whamcloud.com/21168 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dcache.c | 13 +++++-------- drivers/staging/lustre/lustre/llite/file.c | 11 +++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) commit e27bcd66cb84b67a1231e5c6245673826673b66d Author: Lai Siyao Date: Sat Jan 28 19:04:53 2017 -0500 staging: lustre: llite: normal user can't set FS default stripe Current client doesn't check permission before updating filesystem default stripe on MGS, which isn't secure and obvious. Since we setattr on MDS first, and then set default stripe on MGS, we can just return error upon setattr failure. Now filesystem default stripe is stored in ROOT in MDT, so saving it in system config is for compatibility with old servers, this will be removed in the future. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8454 Reviewed-on: http://review.whamcloud.com/21612 Reviewed-on: http://review.whamcloud.com/22580 Reviewed-by: Jian Yu Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit e39cb21b33dbacd8ad25e926fd9159da175833c2 Author: Ben Evans Date: Sat Jan 28 19:04:52 2017 -0500 staging: lustre: lustre: Remove old commented out code These #if 0 blocks have been in place for years. Assume they are not used and remove them Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8058 Reviewed-on: http://review.whamcloud.com/20416 Reviewed-by: John L. Hammond Reviewed-by: Frank Zago Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 -- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 9 +-------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 8 +------- 3 files changed, 2 insertions(+), 17 deletions(-) commit 24eac929de4918eac8f021bc20c4bccb30f96d31 Author: John L. Hammond Date: Sat Jan 28 19:04:51 2017 -0500 staging: lustre: lmv: remove unused placement parameter Remove the unused lmv.*.placement parameter along with supporting functions and struct members. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7674 Reviewed-on: http://review.whamcloud.com/18019 Reviewed-by: Ben Evans Reviewed-by: Frank Zago Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 8 ---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 - drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 68 --------------------------- 3 files changed, 77 deletions(-) commit 3cd9714d458f17407cbaf061dcff47b565092d20 Author: John L. Hammond Date: Sat Jan 28 19:04:48 2017 -0500 staging: lustre: llite: remove obsolete comment for ll_unlink() Remove obsolete comments about the behavior of ll_unlink() Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8003 Reviewed-on: http://review.whamcloud.com/19881 Reviewed-by: Andrew Perepechko Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 5 ----- 1 file changed, 5 deletions(-) commit 7304370b570751b199531a8963864b0dfdb74a35 Author: Andreas Dilger Date: Sat Jan 28 19:04:47 2017 -0500 staging: lustre: llite: handle inactive OSTs better in statfs Change the order of checks for inactive OSCs in lov_prep_statfs_set() so that administratively disabled OSTs do not generate any output in "lfs df" at all, to avoid needlessly cluttering the output. Enable the lazystatfs mount option by default, so that "df" does not hang when an OST is temporarily offline. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7759 Reviewed-on: http://review.whamcloud.com/19195 Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/lov/lov_request.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 4c43c27ddc461d8473cedd70f2549614641dfbc7 Author: Alexander Boyko Date: Sat Jan 28 19:04:46 2017 -0500 staging: lustre: ptlrpc: skip lock if export failed This patch resolves IO vs eviction race. After eviction failed export stayed at stale list, a client had IO processing and reconnected during it. A client sent brw rpc with last lock cookie and new connection. The lock with failed export was found and assert was happened. (ost_handler.c:1812:ost_prolong_lock_one()) ASSERTION( lock->l_export == opd->opd_exp ) failed: 1. Skip the lock at ldlm_handle2lock if lock export failed. 2. Validation of lock for IO was added at hpreq_check(). The lock searching is based on granted interval tree. If server doesn`t have a valid lock, it reply to client with ESTALE. Signed-off-by: Alexander Boyko Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7702 Seagate-bug-id: MRP-2787 Reviewed-on: http://review.whamcloud.com/18120 Reviewed-by: Fan Yong Reviewed-by: Vitaly Fertman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 7 +++++++ drivers/staging/lustre/lustre/ptlrpc/service.c | 21 ++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) commit 3f5b9d55f500d1fa69f4037a56719fd47daee8dc Author: Alex Zhuravlev Date: Sat Jan 28 19:04:45 2017 -0500 staging: lustre: obdclass: do not call lu_site_purge() for single object exceed First of all, this is expensive procedure including a global mutex and per-bucket spinlocks. also, all the threads observed exceed will be calling lu_site_purge() and essentially serialized on that. instead we can let other threads to skip the whole procedure. Signed-off-by: Alex Zhuravlev Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7896 Reviewed-on: http://review.whamcloud.com/19082 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 8 ++++++- drivers/staging/lustre/lustre/obdclass/lu_object.c | 26 +++++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) commit d49ae4383a1f6b5f127f74a2bbaa851833683d5a Author: Jinshan Xiong Date: Sat Jan 28 19:04:44 2017 -0500 staging: lustre: llite: don't ignore layout for group lock request ignore_layout can be set for operations that layout won't be changed, typically page operations. Ignoring layout change in group lock request will confuse layout change code at LOV layer and hit assertion. Signed-off-by: Henri Doreau Signed-off-by: Jinshan Xiong Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2766 Reviewed-on: http://review.whamcloud.com/6828 Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/lcommon_misc.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 7 ------- drivers/staging/lustre/lustre/lov/lov_lock.c | 5 +++++ drivers/staging/lustre/lustre/lov/lov_object.c | 23 +++++++++++++++++++++- drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + 5 files changed, 29 insertions(+), 9 deletions(-) commit 22aadb91c0a0055935109c175f5446abfb130702 Author: frank zago Date: Sat Jan 28 19:04:43 2017 -0500 staging: lustre: hsm: stack overrun in hai_dump_data_field The function hai_dump_data_field will do a stack buffer overrun when cat'ing /sys/fs/lustre/.../hsm/actions if an action has some data in it. hai_dump_data_field uses snprintf. But there is no check for truncation, and the value returned by snprintf is used as-is. The coordinator code calls hai_dump_data_field with 12 bytes in the buffer. The 6th byte of data is printed incompletely to make room for the terminating NUL. However snprintf still returns 2, so when hai_dump_data_field writes the final NUL, it does it outside the reserved buffer, in the 13th byte of the buffer. This stack buffer overrun hangs my VM. Fix by checking that there is enough room for the next 2 characters plus the NUL terminator. Don't print half bytes. Change the format to 02X instead of .2X, which makes more sense. Signed-off-by: frank zago Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8171 Reviewed-on: http://review.whamcloud.com/20338 Reviewed-by: John L. Hammond Reviewed-by: Jean-Baptiste Riaux Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre/lustre_user.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 30af99db7ab3483f5ce83ccb890533c9378c2ced Author: Ulka Vaze Date: Sat Jan 28 19:04:40 2017 -0500 staging: lustre: lmv: Error not handled for lmv_find_target This issue is found by smatch; has been reported as- Unchecked usage of potential ERR_PTR result in lmv_hsm_req_count and lmv_hsm_req_build. Added ERR_PTR in both functions and also return value check added. Signed-off-by: Ulka Vaze Signed-off-by: Aditya Pandit Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6523 Reviewed-on: http://review.whamcloud.com/14918 Reviewed-by: Dmitry Eremin Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit e202d55b05f29f7d17548167b84764bb951b5b90 Author: Ann Koehler Date: Sat Jan 28 19:04:39 2017 -0500 staging: lustre: obd: RCU stalls in lu_cache_shrink_count() The algorithm for counting freeable objects in the lu_cache shrinker does not scale with the number of cpus. The LU_SS_LRU_LEN counter for each cpu is read and summed at shrink time while holding the lu_sites_guard mutex. With a large number of cpus and low memory conditions, processes bottleneck on the mutex. This mod reduces the time spent counting by using the kernel's percpu counter functions to maintain the length of a site's lru. The summing occurs when a percpu value is incremented or decremented and a threshold is exceeded. lu_cache_shrink_count() simply returns the last such computed sum. This mod also replaces the lu_sites_guard mutex with a rw semaphore. The lock protects the lu_site list, which is modified when a file system is mounted/umounted or when the lu_site is purged. lu_cache_shrink_count simply reads data so it does not need to wait for other readers. lu_cache_shrink_scan, which actually frees the unused objects, is still serialized. Signed-off-by: Ann Koehler Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7997 Reviewed-on: http://review.whamcloud.com/19390 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 6 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 80 ++++++++++------------ 2 files changed, 43 insertions(+), 43 deletions(-) commit 65aaf99d5dc12a7807da3008e0cd9babc1cad265 Author: Giuseppe Di Natale Date: Sat Jan 28 19:04:37 2017 -0500 staging: lustre: lmv: Correctly generate target_obd The target_obd debugfs file was not being generated correctly in cases where nonconsecutive MDT indices were used when generating a filesystem. Signed-off-by: Giuseppe Di Natale Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8100 Reviewed-on: http://review.whamcloud.com/20336 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 8a140b45e4ad63377f9a1753a38613252ee6092a Author: Jeremy Filizetti Date: Sat Jan 28 19:04:36 2017 -0500 staging: lustre: ldlm: Restore connect flags on failure Restore connect flags on failure of ptlrpc_connect_import() to prevent an LBUG due to flags mismatch. Signed-off-by: Jeremy Filizetti Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7185 Reviewed-on: http://review.whamcloud.com/16950 Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 67597ce28a6b5a3b1faaeb8eb82794492d0433c4 Author: Niu Yawei Date: Sat Jan 28 19:04:35 2017 -0500 staging: lustre: ptlrpc: set proper mbits for EINPROGRESS resend Set mbits for EINPROGRESS resend in ptl_send_rpc(). Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8193 Reviewed-on: http://review.whamcloud.com/20377 Reviewed-by: Liang Zhen Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 7 +++++-- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 198a49a964a0f76f14c26079065fb48c71db48f3 Author: Jinshan Xiong Date: Sat Jan 28 19:04:34 2017 -0500 staging: lustre: clio: revise readahead to support 16MB IO Read ahead currently doesn't handle 16MB RPC packets correctly by assuming the packets are a default size instead of querying the size. This work adjust the read ahead policy to issue read ahead RPC by the underlying RPC size. Signed-off-by: Jinshan Xiong Signed-off-by: Gu Zheng Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7990 Reviewed-on: http://review.whamcloud.com/19368 Reviewed-by: Andreas Dilger Reviewed-by: Li Xi Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 10 +- .../staging/lustre/lustre/llite/llite_internal.h | 14 +- drivers/staging/lustre/lustre/llite/rw.c | 195 ++++++++++----------- drivers/staging/lustre/lustre/osc/osc_io.c | 3 +- 5 files changed, 114 insertions(+), 112 deletions(-) commit ea3f00df27159969c061031a21965970f85c1b61 Author: Andreas Dilger Date: Sat Jan 28 19:04:32 2017 -0500 staging: lustre: mdc: quiet console message for known -EINTR If a user process is waiting for MDS recovery during close, but the process is interrupted, the file is still closed but it prints a message on the console. Quiet the console message for -EINTR, since this is expected behaviour. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6627 Reviewed-on: http://review.whamcloud.com/14911 Reviewed-by: Frank Zago Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 279b7afab215d573d923ec8a376dd46d348edc44 Author: Bobi Jam Date: Sat Jan 28 19:04:31 2017 -0500 staging: lustre: clio: add cl_page LRU shrinker Register cache shrinker to reclaim memory from cl_page LRU list. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6842 Reviewed-on: http://review.whamcloud.com/15630 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 + drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 1 + drivers/staging/lustre/lustre/osc/osc_internal.h | 9 +++ drivers/staging/lustre/lustre/osc/osc_page.c | 87 ++++++++++++++++++++++++ drivers/staging/lustre/lustre/osc/osc_request.c | 21 ++++++ 5 files changed, 120 insertions(+) commit 58ff698c9076be0bb8f62ea5febac7b8f3759e4b Author: Lai Siyao Date: Sat Jan 28 19:04:30 2017 -0500 staging: lustre: statahead: drop support for remote entry This patch dropped support for remote entry statahead, because it needs 2 async RPCs to fetch both LOOKUP lock from parent MDT and UPDATE lock from client MDT, which is complicated. Plus not supporting remote entry statahead won't cause any issue. * pack child fid in statahead request. * lmv_intent_getattr_async() will compare parent and child MDT, if child is remote, return -ENOTSUPP. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6578 Reviewed-on: http://review.whamcloud.com/15767 Reviewed-by: Fan Yong Reviewed-by: wangdi Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 4 +- drivers/staging/lustre/lustre/include/obd_class.h | 5 +- drivers/staging/lustre/lustre/llite/statahead.c | 94 +++++++++-------------- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 30 ++++++-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 3 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 16 +--- 6 files changed, 68 insertions(+), 84 deletions(-) commit 1ed32aedc83e43f7b93dc5ac156dc408eb06cc1d Author: Jinshan Xiong Date: Sat Jan 28 19:04:29 2017 -0500 staging: lustre: llite: Remove access of stripe in ll_setattr_raw In ll_setattr_raw(), it needs to know if a file is released when the file is being truncated. It used to get this information by accessing lov_stripe_md. This turns out not necessary. This patch removes the access of lov_stripe_md and solves the problem in lov_io_init_released(). Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823 Reviewed-on: http://review.whamcloud.com/13514 Reviewed-by: James Simmons Reviewed-by: Henri Doreau 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/cl_object.h | 6 -- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 9 +- .../staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 109 ++++++++++----------- drivers/staging/lustre/lustre/llite/vvp_io.c | 10 +- drivers/staging/lustre/lustre/lov/lov_io.c | 7 +- drivers/staging/lustre/lustre/lov/lov_object.c | 3 - 8 files changed, 68 insertions(+), 79 deletions(-) commit b8780779057ad2a67e35a37820df573af6ad2f2e Author: Martin Karamihov Date: Tue Jan 31 21:24:56 2017 +0200 staging: rtl8188eu: remove not necessary braces {} (checkpatch fix) This is checkpatch fix for hal/bb_cfg.c file: remove not necessary braces {} Signed-off-by: Martin Karamihov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5f50ca98af96e33cabd2af22d2884dc87aba2f61 Author: Masanari Iida Date: Wed Feb 1 20:05:07 2017 +0900 staging: greybus: Remove duplicate include file This patch removed duplicated include line. Signed-off-by: Masanari Iida Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/authentication.c | 1 - 1 file changed, 1 deletion(-) commit de9a009b934a14b24d125e9ee150e2855580c3da Author: Colin Ian King Date: Thu Feb 2 12:12:02 2017 +0000 staging: rts5208: remove unncessary result set and check, just return SUCCESS Minor clean up, there is no need to assign result to zero, then check if it is less than zero. Just return SUCCESS. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 041b67b389fc0118015e5adc62725d89127dcc71 Author: Colin Ian King Date: Thu Feb 2 12:12:01 2017 +0000 staging: rts5208: remove redundant retval status check The retval status checks in the proceeding do loop return out of function ms_read_attritbute_info if there is an error condition, thus we never reach the end of the loop with retval failed status. Therefore, the retval status check at end of the do loop is redundant and can be removed. Detected with CoverityScan, CID#143000 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 6 ------ 1 file changed, 6 deletions(-) commit 22eb36b8142b1f07f23c365e87a5dad6c9f233f1 Author: Arnd Bergmann Date: Thu Feb 2 15:43:42 2017 +0100 staging: fbtft: change 'gamma' array to u32 Having a local variable of 1024 bytes on 64-bit architectures is a bit too much, and I ran into this warning while trying to see what functions use the largest stack: drivers/staging/fbtft/fbtft-sysfs.c: In function 'store_gamma_curve': drivers/staging/fbtft/fbtft-sysfs.c:132:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] As there is no need for 64-bit gamma values (on 32-bit architectures, we don't use those either), I'm changing the type from 'unsigned long' to 'u32' here, which cuts the required space in half everywhere. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_hx8340bn.c | 2 +- drivers/staging/fbtft/fb_hx8347d.c | 2 +- drivers/staging/fbtft/fb_hx8353d.c | 2 +- drivers/staging/fbtft/fb_ili9163.c | 2 +- drivers/staging/fbtft/fb_ili9320.c | 2 +- drivers/staging/fbtft/fb_ili9325.c | 2 +- drivers/staging/fbtft/fb_ili9341.c | 2 +- drivers/staging/fbtft/fb_pcd8544.c | 2 +- drivers/staging/fbtft/fb_s6d1121.c | 2 +- drivers/staging/fbtft/fb_ssd1289.c | 2 +- drivers/staging/fbtft/fb_ssd1305.c | 2 +- drivers/staging/fbtft/fb_ssd1306.c | 2 +- drivers/staging/fbtft/fb_ssd1325.c | 2 +- drivers/staging/fbtft/fb_ssd1331.c | 2 +- drivers/staging/fbtft/fb_ssd1351.c | 2 +- drivers/staging/fbtft/fb_st7735r.c | 2 +- drivers/staging/fbtft/fb_st7789v.c | 2 +- drivers/staging/fbtft/fb_tls8204.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/fbtft/fbtft-sysfs.c | 8 ++++---- drivers/staging/fbtft/fbtft.h | 4 ++-- drivers/staging/fbtft/internal.h | 2 +- 22 files changed, 26 insertions(+), 26 deletions(-) commit 26190d41b97734eee9ec076c12d6defe42de7efc Author: Arnd Bergmann Date: Thu Feb 2 15:38:24 2017 +0100 staging: rtl8192u: move stats_IndicateArray off stack Putting 128 pointers on the stack is rather wasteful, in particular on 64-bit architectures: drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c: In function 'RxPktPendingTimeout': drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:92:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] The rtl8192e driver has the exact same function, except that stores the array in its 'ieee' structure. Let's do it the same way here for consistency. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 90e51e6dd27d6418358ec6c9964d54ca9c25c1b9 Merge: 3b94bdd 2cf8e2d 671a911 Author: Mark Brown Date: Fri Feb 3 12:34:59 2017 +0100 Merge remote-tracking branches 'regmap/topic/doc' and 'regmap/topic/rbtree' into regmap-next commit 3b94bdd18106cf38adde4a4257ad69d9a3187c07 Merge: 69973b8 daaadbf Author: Mark Brown Date: Fri Feb 3 12:34:52 2017 +0100 Merge tag 'regmap-v4.10' into regmap-next regmap: Fix for v4.10 The only change for regmap this merge window is a single fix for an unused variable. # gpg: Signature made Mon 12 Dec 2016 17:03:19 CET # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit 5610ced4f13d5d864773ee2aa63e7cd9c3ca1c04 Author: Bhumika Goyal Date: Tue Dec 13 15:31:45 2016 -0200 [media] drivers: media: i2c: ml86v7667: constify v4l2_subdev_* structures v4l2_subdev_{core/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle: (One of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ v4l2_i2c_subdev_init(...,&i@p) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_ops i; File size before: text data bss dec hex filename 2732 608 8 3348 d14 drivers/media/i2c/ml86v7667.o File size after: text data bss dec hex filename 3100 232 8 3340 d0c drivers/media/i2c/ml86v7667.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ml86v7667.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d7aa5e9911c47cb40b0a5ed1b192ff50f4d6832 Author: Bhumika Goyal Date: Tue Dec 13 15:26:13 2016 -0200 [media] drivers: media: i2c: ak881x: constify v4l2_subdev_* structures v4l2_subdev_{core/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle: (One of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_video_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.video=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_video_ops i; File size before: text data bss dec hex filename 1809 872 0 2681 a79 drivers/media/i2c/ak881x.o File size after: text data bss dec hex filename 2185 496 0 2681 a79 drivers/media/i2c/ak881x.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ak881x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 646c3ae9d96fb92dda2b30b970d89c2a326f2749 Author: Bhumika Goyal Date: Tue Dec 13 09:49:45 2016 -0200 [media] media: i2c: m5mols: m5mols_core: constify v4l2_subdev_pad_ops structures v4l2_subdev_pad_ops structures are stored in the pad field of the v4l2_subdev_ops structure and this field is of type const. As the v4l2_subdev_pad_ops structures are never modified, they can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_pad_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.pad=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_pad_ops i; File size before: text data bss dec hex filename 7633 512 20 8165 1fe5 media/i2c/m5mols/m5mols_core.o File size after: text data bss dec hex filename 7761 384 20 8165 1fe5 media/i2c/m5mols/m5mols_core.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/m5mols/m5mols_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 964481ad0e03c161c395b95c7e53cb6ddfdc4b98 Author: Nicholas Mc Guire Date: Tue Dec 13 03:34:53 2016 -0200 [media] m5mols: set usleep_range delta greater 0 This delay is in non-atomic context and it does not seem to be time-critical so relax it to allow the timer subsystem to optimize hrtimers. Signed-off-by: Nicholas Mc Guire Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/m5mols/m5mols_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ef30da1c52c633a6eaa017ad0d075aaa809a6154 Author: Kuninori Morimoto Date: Thu Feb 2 05:01:05 2017 +0000 ASoC: rsnd: fixup reset timing of sync convert_rate Sync convert rate settings should be availabled *after* Playing. Thus, src->sync should be reset first of init function. Otherwise, it will set remaining settings when it start playing. This patch fixes it. Thanks to Yokoyama-san Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a66e2f60ef6a153bba387b1382e527248c959a0 Author: Laurent Pinchart Date: Mon Dec 12 08:37:42 2016 -0200 [media] v4l: vsp1: Add VIDIOC_EXPBUF support Use the vb2 ioctl handler directly. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 1 + 1 file changed, 1 insertion(+) commit 7c137c601b1104bddfc77937a12091a8a4c38287 Author: Bhumika Goyal Date: Mon Dec 12 05:45:32 2016 -0200 [media] drivers: media: i2c: constify v4l2_subdev_* structures v4l2_subdev_{core/pad/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle: (One of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_video_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.video=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_video_ops i; File sizes before: text data bss dec hex filename 7810 736 16 8562 2172 drivers/media/i2c/mt9p031.o 9652 736 24 10412 28ac drivers/media/i2c/mt9v032.o 4613 552 20 5185 1441 drivers/media/i2c/noon010pc30.o 2615 552 8 3175 c67 drivers/media/i2c/s5k6a3.o File sizes after: text data bss dec hex filename 8322 232 16 8570 217a drivers/media/i2c/mt9p031.o 10164 232 24 10420 28b4 drivers/media/i2c/mt9v032.o 4933 232 20 5185 1441 drivers/media/i2c/noon010pc30.o 2935 232 8 3175 c67 drivers/media/i2c/s5k6a3.o Signed-off-by: Bhumika Goyal Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 8 ++++---- drivers/media/i2c/mt9v032.c | 8 ++++---- drivers/media/i2c/noon010pc30.c | 4 ++-- drivers/media/i2c/s5k6a3.c | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) commit cebb31c8b5fdea701b94b4a1664b50b7705736eb Author: Bhumika Goyal Date: Sun Dec 11 07:52:32 2016 -0200 [media] media: platform: xilinx: xilinx-tpg: constify v4l2_subdev_* structures v4l2_subdev_{core/pad/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle: (One of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_video_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.video=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_video_ops i; File size before: text data bss dec hex filename 6170 2752 144 9066 236a media/platform/xilinx/xilinx-tpg.o File size after: text data bss dec hex filename 6666 2384 8 9058 2362 media/platform/xilinx/xilinx-tpg.o Signed-off-by: Bhumika Goyal Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/xilinx/xilinx-tpg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8726650a1a6c817333dd5933032244540c88bb21 Author: Markus Elfring Date: Sat Dec 10 17:56:04 2016 -0200 [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message() Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/dst_ca.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6e531f104cddff0385393819f84c61cc552faab5 Author: Markus Elfring Date: Sat Dec 10 17:50:58 2016 -0200 [media] bt8xx: Delete two error messages for a failed memory allocation Omit extra messages for a memory allocation failure in two functions. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/dst_ca.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1064f874abc0d05eeed8993815f584d847b72486 Author: Eric W. Biederman Date: Fri Jan 20 18:28:35 2017 +1300 mnt: Tuck mounts under others instead of creating shadow/side mounts. Ever since mount propagation was introduced in cases where a mount in propagated to parent mount mountpoint pair that is already in use the code has placed the new mount behind the old mount in the mount hash table. This implementation detail is problematic as it allows creating arbitrary length mount hash chains. Furthermore it invalidates the constraint maintained elsewhere in the mount code that a parent mount and a mountpoint pair will have exactly one mount upon them. Making it hard to deal with and to talk about this special case in the mount code. Modify mount propagation to notice when there is already a mount at the parent mount and mountpoint where a new mount is propagating to and place that preexisting mount on top of the new mount. Modify unmount propagation to notice when a mount that is being unmounted has another mount on top of it (and no other children), and to replace the unmounted mount with the mount on top of it. Move the MNT_UMUONT test from __lookup_mnt_last into __propagate_umount as that is the only call of __lookup_mnt_last where MNT_UMOUNT may be set on any mount visible in the mount hash table. These modifications allow: - __lookup_mnt_last to be removed. - attach_shadows to be renamed __attach_mnt and its shadow handling to be removed. - commit_tree to be simplified - copy_tree to be simplified The result is an easier to understand tree of mounts that does not allow creation of arbitrary length hash chains in the mount hash table. The result is also a very slight userspace visible difference in semantics. The following two cases now behave identically, where before order mattered: case 1: (explicit user action) B is a slave of A mount something on A/a , it will propagate to B/a and than mount something on B/a case 2: (tucked mount) B is a slave of A mount something on B/a and than mount something on A/a Histroically umount A/a would fail in case 1 and succeed in case 2. Now umount A/a succeeds in both configurations. This very small change in semantics appears if anything to be a bug fix to me and my survey of userspace leads me to believe that no programs will notice or care of this subtle semantic change. v2: Updated to mnt_change_mountpoint to not call dput or mntput and instead to decrement the counts directly. It is guaranteed that there will be other references when mnt_change_mountpoint is called so this is safe. v3: Moved put_mountpoint under mount_lock in attach_recursive_mnt As the locking in fs/namespace.c changed between v2 and v3. v4: Reworked the logic in propagate_mount_busy and __propagate_umount that detects when a mount completely covers another mount. v5: Removed unnecessary tests whose result is alwasy true in find_topper and attach_recursive_mnt. v6: Document the user space visible semantic difference. Cc: stable@vger.kernel.org Fixes: b90fa9ae8f51 ("[PATCH] shared mount handling: bind and rbind") Tested-by: Andrei Vagin Signed-off-by: "Eric W. Biederman" fs/mount.h | 1 - fs/namespace.c | 110 +++++++++++++++++++++++++++++++-------------------------- fs/pnode.c | 61 +++++++++++++++++++++++++------- fs/pnode.h | 2 ++ 4 files changed, 111 insertions(+), 63 deletions(-) commit 65c059bcaa73197ca71e8d4cc9a6c903560506c1 Author: Andrew Donnellan Date: Tue Dec 6 17:28:00 2016 +1100 powerpc: Enable support for GCC plugins Enable support for GCC plugins on powerpc. Add an additional version check in gcc-plugins-check to advise users to upgrade to gcc 5.2+ on powerpc to avoid issues with header files (gcc <= 4.6) or missing copies of rs6000-cpus.def (4.8 to 5.1 on 64-bit targets). Signed-off-by: Andrew Donnellan Acked-by: Kees Cook Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + scripts/Makefile.gcc-plugins | 8 ++++++++ 2 files changed, 9 insertions(+) commit eac6f8b0c7adb003776dbad9d037ee2fc64f9d62 Author: Andrew Donnellan Date: Tue Dec 6 17:27:59 2016 +1100 powerpc: Correctly disable latent entropy GCC plugin on prom_init.o Commit 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") excludes certain powerpc early boot code from the latent entropy plugin by adding appropriate CFLAGS. It looks like this was supposed to cover prom_init.o, but ended up saying init.o (which doesn't exist) instead. Fix the typo. Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b4010edff09929c253e6626ab19cade9e250505 Author: Andrew Donnellan Date: Tue Dec 6 17:27:58 2016 +1100 gcc-plugins: Fix definition of DISABLE_LATENT_ENTROPY_PLUGIN The variable DISABLE_LATENT_ENTROPY_PLUGIN is defined when CONFIG_PAX_LATENT_ENTROPY is set. This is leftover from the original PaX version of the plugin code and doesn't actually exist. Change the condition to depend on CONFIG_GCC_PLUGIN_LATENT_ENTROPY instead. Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39d40871526627fd0e2cfc1e2fb88500a5049c4c Author: Andrew Donnellan Date: Wed Feb 1 14:22:07 2017 +1100 cxl: Fix build when CONFIG_DEBUG_FS=n Stub out the debugfs functions so that the build doesn't break when CONFIG_DEBUG_FS=n. Reported-by: Michael Ellerman Signed-off-by: Andrew Donnellan Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/Makefile | 3 ++- drivers/misc/cxl/cxl.h | 59 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 5 deletions(-) commit 3b28f4f2c2c7fcb6770cdfe5e8cd284ee1bc9783 Author: Valentin Rothberg Date: Thu Feb 2 18:00:44 2017 +0100 checkkconfigsymbols.py: support Kconfig's 'imply' statement Support the new imply statement in Kconfig. The imply statement has been added by commit 237e3ad0f195 ("Kconfig: Introduce the "imply" keyword") and is a weak version of a select, but the target symbol can still be turned off. Signed-off-by: Andreas Ziegler Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47f60a017169d1d3c6cb086ece272f272f110845 Author: Alexander Usyskin Date: Thu Feb 2 11:26:54 2017 +0200 mei: me: generate an interrupt if the hw indicates reset. In rare case the driver may lose connection with the device after device reset due to a missed interrupt. The driver will unlock the flow by generating an interrupt towards the firmware (HIG) when the device is in the resetting state. The FW is able to ignore the interrupt during orderly flow. The effected platforms are skylake and newer. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9c7daa61d91647fba3b986a9941d3fb531b9b9ff Author: Alexander Usyskin Date: Thu Feb 2 11:26:53 2017 +0200 mei: me: add a wrapper to set host generated data interrupt Consolidate setting H_IG, an interrupt from host towards hw, into a wrapper to eliminate code duplication. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit e1ef962bf1255cea2f165f3a7374766a7ceb4308 Author: Miguel Bernal Marin Date: Tue Jan 31 18:02:16 2017 -0600 misc: fix typo on Kconfig When panel driver was moved from staging to misc a new line was missing to be added on Kconfig file. Fixes: 305b37bd01c2 ("misc: Move panel driver out of staging") Signed-off-by: Miguel Bernal Marin Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3bb434cdcc6af3d4e70ba041e6f596e465d11e14 Author: Christoph Hellwig Date: Wed Feb 1 15:42:57 2017 +0100 vmw_vmci: switch to pci_irq_alloc_vectors Cleans up the IRQ management code a lot, including removing a lot of state from the per-device structure. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_guest.c | 75 ++++++++++---------------------------- include/linux/vmw_vmci_defs.h | 7 ---- 2 files changed, 20 insertions(+), 62 deletions(-) commit bb18dfcc640d0551073e756e0af2ff60bea89e6d Author: Chris Wilson Date: Thu Feb 2 11:44:34 2017 +0000 drm: kselftest for drm_mm and bottom-up allocation Check that if we request bottom-up allocation from drm_mm_insert_node() we receive the next available hole from the bottom. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202114434.3060-2-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 100 +++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) commit 1a20b96612656b3ff2d6967c3111bec0e21904a8 Author: Ard Biesheuvel Date: Thu Feb 2 11:38:56 2017 +0000 crypto: arm/aes - don't use IV buffer to return final keystream block The ARM bit sliced AES core code uses the IV buffer to pass the final keystream block back to the glue code if the input is not a multiple of the block size, so that the asm code does not have to deal with anything except 16 byte blocks. This is done under the assumption that the outgoing IV is meaningless anyway in this case, given that chaining is no longer possible under these circumstances. However, as it turns out, the CCM driver does expect the IV to retain a value that is equal to the original IV except for the counter value, and even interprets byte zero as a length indicator, which may result in memory corruption if the IV is overwritten with something else. So use a separate buffer to return the final keystream block. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-neonbs-core.S | 16 +++++++++------- arch/arm/crypto/aes-neonbs-glue.c | 9 +++++---- 2 files changed, 14 insertions(+), 11 deletions(-) commit 88a3f582bea9e1da0346ea412950bbbdc3125cc1 Author: Ard Biesheuvel Date: Thu Feb 2 11:38:55 2017 +0000 crypto: arm64/aes - don't use IV buffer to return final keystream block The arm64 bit sliced AES core code uses the IV buffer to pass the final keystream block back to the glue code if the input is not a multiple of the block size, so that the asm code does not have to deal with anything except 16 byte blocks. This is done under the assumption that the outgoing IV is meaningless anyway in this case, given that chaining is no longer possible under these circumstances. However, as it turns out, the CCM driver does expect the IV to retain a value that is equal to the original IV except for the counter value, and even interprets byte zero as a length indicator, which may result in memory corruption if the IV is overwritten with something else. So use a separate buffer to return the final keystream block. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-neonbs-core.S | 37 +++++++++++++++++++++++-------------- arch/arm64/crypto/aes-neonbs-glue.c | 9 +++++---- 2 files changed, 28 insertions(+), 18 deletions(-) commit 12fcd92305880504c9827c99ea128fecf1c99f0d Author: Ard Biesheuvel Date: Sat Jan 28 23:25:39 2017 +0000 crypto: arm64/aes - replace scalar fallback with plain NEON fallback The new bitsliced NEON implementation of AES uses a fallback in two places: CBC encryption (which is strictly sequential, whereas this driver can only operate efficiently on 8 blocks at a time), and the XTS tweak generation, which involves encrypting a single AES block with a different key schedule. The plain (i.e., non-bitsliced) NEON code is more suitable as a fallback, given that it is faster than scalar on low end cores (which is what the NEON implementations target, since high end cores have dedicated instructions for AES), and shows similar behavior in terms of D-cache footprint and sensitivity to cache timing attacks. So switch the fallback handling to the plain NEON driver. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 2 +- arch/arm64/crypto/aes-neonbs-glue.c | 38 +++++++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 11 deletions(-) commit 4edd7d015b95abcedde591a0c45965305d7cd524 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:38 2017 +0000 crypto: arm64/aes-neon-blk - tweak performance for low end cores The non-bitsliced AES implementation using the NEON is highly sensitive to micro-architectural details, and, as it turns out, the Cortex-A53 on the Raspberry Pi 3 is a core that can benefit from this code, given that its scalar AES performance is abysmal (32.9 cycles per byte). The new bitsliced AES code manages 19.8 cycles per byte on this core, but can only operate on 8 blocks at a time, which is not supported by all chaining modes. With a bit of tweaking, we can get the plain NEON code to run at 22.0 cycles per byte, making it useful for sequential modes like CBC encryption. (Like bitsliced NEON, the plain NEON implementation does not use any lookup tables, which makes it easy on the D-cache, and invulnerable to cache timing attacks) So tweak the plain NEON AES code to use tbl instructions rather than shl/sri pairs, and to avoid the need to reload permutation vectors or other constants from memory in every round. Also, improve the decryption performance by switching to 16x8 pmul instructions for the performing the multiplications in GF(2^8). To allow the ECB and CBC encrypt routines to be reused by the bitsliced NEON code in a subsequent patch, export them from the module. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 2 + arch/arm64/crypto/aes-neon.S | 235 ++++++++++++++++++------------------------- 2 files changed, 102 insertions(+), 135 deletions(-) commit c458c4ada0e3e3c898a56d0640d2ef70c9f702e3 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:37 2017 +0000 crypto: arm64/aes - performance tweak Shuffle some instructions around in the __hround macro to shave off 0.1 cycles per byte on Cortex-A57. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-cipher-core.S | 52 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit 262ea4f670b792d0985090b1187b1f1ce2c2c648 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:36 2017 +0000 crypto: arm64/aes - avoid literals for cross-module symbol references Using simple adrp/add pairs to refer to the AES lookup tables exposed by the generic AES driver (which could be loaded far away from this driver when KASLR is in effect) was unreliable at module load time before commit 41c066f2c4d4 ("arm64: assembler: make adr_l work in modules under KASLR"), which is why the AES code used literals instead. So now we can get rid of the literals, and switch to the adr_l macro. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-cipher-core.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4d1108fd747f88a6555e644073ee5629bad610b9 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:35 2017 +0000 crypto: arm64/chacha20 - remove cra_alignmask Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/chacha20-neon-glue.c | 1 - 1 file changed, 1 deletion(-) commit ccc5d51ef968d0d7634d36afbaf0286126e12f09 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:34 2017 +0000 crypto: arm64/aes-blk - remove cra_alignmask Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 16 ++++++---------- arch/arm64/crypto/aes-modes.S | 8 +++----- 2 files changed, 9 insertions(+), 15 deletions(-) commit 8f4102dbd9b6a050491a966a74f030e65e29d33d Author: Ard Biesheuvel Date: Sat Jan 28 23:25:33 2017 +0000 crypto: arm64/aes-ce-ccm - remove cra_alignmask Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-ce-ccm-glue.c | 1 - 1 file changed, 1 deletion(-) commit 4a70b52620357a680ac71d5b63ceb533eb6216cb Author: Ard Biesheuvel Date: Sat Jan 28 23:25:32 2017 +0000 crypto: arm/chacha20 - remove cra_alignmask Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/chacha20-neon-glue.c | 1 - 1 file changed, 1 deletion(-) commit 1465fb13d3599e465b3b202f8ebbb5e1ca9b1970 Author: Ard Biesheuvel Date: Sat Jan 28 23:25:31 2017 +0000 crypto: arm/aes-ce - remove cra_alignmask Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-ce-core.S | 84 +++++++++++++++++++++---------------------- arch/arm/crypto/aes-ce-glue.c | 15 ++++---- 2 files changed, 47 insertions(+), 52 deletions(-) commit 5ba042c094f9438d9441ab5f8ba75f0d121df0a1 Author: Harsh Jain Date: Fri Jan 27 16:09:12 2017 +0530 crypto: chcr - Fix Smatch Complaint Initialise variable after null check. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d2826056cb5e4b4ddc90227b509473f71e15f011 Author: Harsh Jain Date: Fri Jan 27 16:09:11 2017 +0530 crypto: chcr - Fix wrong typecasting Typecast the pointer with correct structure. Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8f06601501995eee85e2449430af5d5f0b0480a4 Author: Harsh Jain Date: Fri Jan 27 16:09:10 2017 +0530 crypto: chcr - Change algo priority Update priorities to 3000 Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_crypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44e9f79916160f9a69542712e8529ee8da15c410 Author: Harsh Jain Date: Fri Jan 27 16:09:09 2017 +0530 crypto: chcr - Change cra_flags for cipher algos Change cipher algos flags to CRYPTO_ALG_TYPE_ABLKCIPHER. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8356ea515ba1396d6a24dd1e80f101ee9a20ff3c Author: Harsh Jain Date: Fri Jan 27 16:09:08 2017 +0530 crypto: chcr - Use cipher instead of Block Cipher in gcm setkey 1 Block of encrption can be done with aes-generic. no need of cbc(aes). This patch replaces cbc(aes-generic) with aes-generic. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit ee3bd84f55d670961f36df332be299f3386b7690 Author: Harsh Jain Date: Fri Jan 27 16:09:07 2017 +0530 crypto: chcr - fix itnull.cocci warnings The first argument to list_for_each_entry cannot be NULL. Generated by: scripts/coccinelle/iterators/itnull.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a13449fceb03f5423664f373254c5e19b853d46 Author: Harsh Jain Date: Fri Jan 27 16:09:05 2017 +0530 crypto: chcr - Change flow IDs Change assign flowc id to each outgoing request.Firmware use flowc id to schedule each request onto HW. FW reply may miss without this change. Reviewed-by: Hariprasad Shenai Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 18 ++++++++++-------- drivers/crypto/chelsio/chcr_algo.h | 9 +++++---- drivers/crypto/chelsio/chcr_core.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 8 ++++++++ 4 files changed, 24 insertions(+), 12 deletions(-) commit 0569fc46f09b46dc313f27c45283a7b62d96390a Author: Cyrille Pitchen Date: Thu Jan 26 17:07:57 2017 +0100 crypto: atmel-sha - add verbose debug facilities to print hw register names When VERBOSE_DEBUG is defined and SHA_FLAGS_DUMP_REG flag is set in dd->flags, this patch prints the register names and values when performing IO accesses. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 110 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) commit 89a82ef87e012061989fcaf7dd51d706ff2090e3 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:56 2017 +0100 crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes This patchs allows to combine the AES and SHA hardware accelerators on some Atmel SoCs. Doing so, AES blocks are only written to/read from the AES hardware. Those blocks are also transferred from the AES to the SHA accelerator internally, without additionnal accesses to the system busses. Hence, the AES and SHA accelerators work in parallel to process all the data blocks, instead of serializing the process by (de)crypting those blocks first then authenticating them after like the generic crypto/authenc.c driver does. Of course, both the AES and SHA hardware accelerators need to be available before we can start to process the data blocks. Hence we use their crypto request queue to synchronize both drivers. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 12 ++ drivers/crypto/atmel-aes-regs.h | 16 ++ drivers/crypto/atmel-aes.c | 448 +++++++++++++++++++++++++++++++++++++++- drivers/crypto/atmel-authenc.h | 64 ++++++ drivers/crypto/atmel-sha-regs.h | 14 ++ drivers/crypto/atmel-sha.c | 344 ++++++++++++++++++++++++++++-- 6 files changed, 883 insertions(+), 15 deletions(-) commit a1f613f167a36610d238b66f5e49bfdb1d04aa89 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:55 2017 +0100 crypto: atmel-aes - fix atmel_aes_handle_queue() This patch fixes the value returned by atmel_aes_handle_queue(), which could have been wrong previously when the crypto request was started synchronously but became asynchronous during the ctx->start() call. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 81d8750b2b59cd4e0fe4bf4fcf64e5348686c1f0 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:54 2017 +0100 crypto: atmel-sha - add support to hmac(shaX) This patch adds support to the hmac(shaX) algorithms. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha-regs.h | 4 + drivers/crypto/atmel-sha.c | 598 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 601 insertions(+), 1 deletion(-) commit 69303cf0f1dcfb1ace2956e1c0a1aa3a5222ce4c Author: Cyrille Pitchen Date: Thu Jan 26 17:07:53 2017 +0100 crypto: atmel-sha - add simple DMA transfers This patch adds a simple function to perform data transfer with the DMA controller. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 116 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit eec12f66b02c3812252103d5efcb80754b04012c Author: Cyrille Pitchen Date: Thu Jan 26 17:07:52 2017 +0100 crypto: atmel-sha - add atmel_sha_cpu_start() This patch adds a simple function to perform data transfer with PIO, hence handled by the CPU. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 563c47df79747412bf5d0fdb8fd24089d7316c2b Author: Cyrille Pitchen Date: Thu Jan 26 17:07:51 2017 +0100 crypto: atmel-sha - add SHA_MR_MODE_IDATAR0 This patch defines an alias macro to SHA_MR_MODE_PDC, which is not suited for DMA usage. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha-regs.h | 1 + 1 file changed, 1 insertion(+) commit 9064ed92695b4d9d20e4d5d72fe72465eaa1c162 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:50 2017 +0100 crypto: atmel-sha - add atmel_sha_wait_for_data_ready() This patch simply defines a helper function to test the 'Data Ready' flag of the Status Register. It also gives a chance for the crypto request to be processed synchronously if this 'Data Ready' flag is already set when polling the Status Register. Indeed, running synchronously avoid the latency of the 'Data Ready' interrupt. When the 'Data Ready' flag has not been set yet, we enable the associated interrupt and resume processing the crypto request asynchronously from the 'done' task just as before. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f07cebad63b28562d030eee8c762833eca50e46e Author: Cyrille Pitchen Date: Thu Jan 26 17:07:49 2017 +0100 crypto: atmel-sha - redefine SHA_FLAGS_SHA* flags to match SHA_MR_ALGO_SHA* This patch modifies the SHA_FLAGS_SHA* flags: those algo flags are now organized as values of a single bitfield instead of individual bits. This allows to reduce the number of bits needed to encode all possible values. Also the new values match the SHA_MR_ALGO_SHA* values hence the algorithm bitfield of the SHA_MR register could simply be set with: mr = (mr & ~SHA_FLAGS_ALGO_MASK) | (ctx->flags & SHA_FLAGS_ALGO_MASK) Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha-regs.h | 1 + drivers/crypto/atmel-sha.c | 45 +++++++++++++++++++++++++++++------------ 2 files changed, 33 insertions(+), 13 deletions(-) commit b5ce82a7b4938f278fc6da28ce00da34e7a0773c Author: Cyrille Pitchen Date: Thu Jan 26 17:07:48 2017 +0100 crypto: atmel-sha - make atmel_sha_done_task more generic This patch is a transitional patch. It updates atmel_sha_done_task() to make it more generic. Indeed, it adds a new .resume() member in the atmel_sha_dev structure. This hook is called from atmel_sha_done_task() to resume processing an asynchronous request. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit a29af939b24dc98c11e1e8a77be7669c4e4f5719 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:47 2017 +0100 crypto: atmel-sha - update request queue management to make it more generic This patch is a transitional patch. It splits the atmel_sha_handle_queue() function. Now atmel_sha_handle_queue() only manages the request queue and calls a new .start() hook from the atmel_sha_ctx structure. This hook allows to implement different kind of requests still handled by a single queue. Also when the req parameter of atmel_sha_handle_queue() refers to the very same request as the one returned by crypto_dequeue_request(), the queue management now gives a chance to this crypto request to be handled synchronously, hence reducing latencies. The .start() hook returns 0 if the crypto request was handled synchronously and -EINPROGRESS if the crypto request still need to be handled asynchronously. Besides, the new .is_async member of the atmel_sha_dev structure helps tagging this asynchronous state. Indeed, the req->base.complete() callback should not be called if the crypto request is handled synchronously. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 74 +++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 20 deletions(-) commit 8340c7fd28d1fc0b559c84be8f0e7413d2716fc2 Author: Cyrille Pitchen Date: Thu Jan 26 17:07:46 2017 +0100 crypto: atmel-sha - create function to get an Atmel SHA device This is a transitional patch: it creates the atmel_sha_find_dev() function, which will be used in further patches to share the source code responsible for finding a Atmel SHA device. Signed-off-by: Cyrille Pitchen Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 379d972b81151b811ab769db5ab8da9c71bbfb00 Author: Rabin Vincent Date: Thu Jan 26 16:33:00 2017 +0100 crypto: doc - Fix hash export state information The documentation states that crypto_ahash_reqsize() provides the size of the state structure used by crypto_ahash_export(). But it's actually crypto_ahash_statesize() which provides this size. Signed-off-by: Rabin Vincent Signed-off-by: Herbert Xu Documentation/crypto/api-digest.rst | 2 +- include/crypto/hash.h | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) commit 34cb58213948a0c26a228da903a3b37c2505843c Merge: 7dede91 7c2cf1c Author: Herbert Xu Date: Fri Feb 3 18:14:10 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge the crypto tree to pick up arm64 output IV patch. commit 4e64e5539d152e202ad6eea2b6f65f3ab58d9428 Author: Chris Wilson Date: Thu Feb 2 21:04:38 2017 +0000 drm: Improve drm_mm search (and fix topdown allocation) with rbtrees The drm_mm range manager claimed to support top-down insertion, but it was neither searching for the top-most hole that could fit the allocation request nor fitting the request to the hole correctly. In order to search the range efficiently, we create a secondary index for the holes using either their size or their address. This index allows us to find the smallest hole or the hole at the bottom or top of the range efficiently, whilst keeping the hole stack to rapidly service evictions. v2: Search for holes both high and low. Rename flags to mode. v3: Discover rb_entry_safe() and use it! v4: Kerneldoc for enum drm_mm_insert_mode. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Russell King Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: Lucas Stach Cc: Christian Gmeiner Cc: Rob Clark Cc: Thierry Reding Cc: Stephen Warren Cc: Alexandre Courbot Cc: Eric Anholt Cc: Sinclair Yeh Cc: Thomas Hellstrom Reviewed-by: Alex Deucher Reviewed-by: Sinclair Yeh # vmwgfx Reviewed-by: Lucas Stach #etnaviv Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202210438.28702-1-chris@chris-wilson.co.uk drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 20 +- drivers/gpu/drm/armada/armada_gem.c | 4 +- drivers/gpu/drm/drm_mm.c | 488 +++++++++++++++------------ drivers/gpu/drm/drm_vma_manager.c | 3 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 11 +- drivers/gpu/drm/i915/i915_gem.c | 10 +- drivers/gpu/drm/i915/i915_gem_evict.c | 9 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 39 +-- drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +- drivers/gpu/drm/msm/msm_gem.c | 3 +- drivers/gpu/drm/msm/msm_gem_vma.c | 3 +- drivers/gpu/drm/selftests/test-drm_mm.c | 58 ++-- drivers/gpu/drm/sis/sis_mm.c | 6 +- drivers/gpu/drm/tegra/gem.c | 4 +- drivers/gpu/drm/ttm/ttm_bo_manager.c | 18 +- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_hvs.c | 3 +- drivers/gpu/drm/vc4/vc4_plane.c | 6 +- drivers/gpu/drm/via/via_mm.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 10 +- include/drm/drm_mm.h | 184 +++++----- 23 files changed, 470 insertions(+), 442 deletions(-) commit 17aad8a340e6f98b62c2482d02bc3814eebde9a5 Merge: 7e6328f 99743ae Author: Daniel Vetter Date: Fri Feb 3 11:09:25 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next Yet another backmerge to get at latest etnaviv code, which is need for Chris' drm_mm patch. Signed-off-by: Daniel Vetter commit d2180e0cf77dc7a7049671d5d57dfa0a228f83c1 Author: Javi Merino Date: Mon Dec 5 08:09:56 2016 -0200 [media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay In asds configured with V4L2_ASYNC_MATCH_OF, the v4l2 subdev can be part of a devicetree overlay, for example: &media_bridge { ... my_port: port@0 { #address-cells = <1>; #size-cells = <0>; reg = <0>; ep: endpoint@0 { remote-endpoint = <&camera0>; }; }; }; / { fragment@0 { target = <&i2c0>; __overlay__ { my_cam { compatible = "foo,bar"; port { camera0: endpoint { remote-endpoint = <&my_port>; ... }; }; }; }; }; }; Each time the overlay is applied, its of_node pointer will be different. We are not interested in matching the pointer, what we want to match is that the path is the one we are expecting. Change to use of_node_cmp() so that we continue matching after the overlay has been removed and reapplied. Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Signed-off-by: Javi Merino Reviewed-by: Javier Martinez Canillas Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ce899423c150c38e2b1590a83a2e22f8c77b60a Author: Pan Bian Date: Sun Dec 4 03:40:06 2016 -0200 [media] media: pci: meye: set error code on failures The value of return variable ret is 0 on some error paths, for example, when pci_resource_start() returns a NULL pointer. 0 means no error in this context, which is contrary to the fact. This patch fixes the bug. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189011 Signed-off-by: Pan Bian Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/meye/meye.c | 1 + 1 file changed, 1 insertion(+) commit d54a90c4c19307986effa50a93e47d1df7a132a6 Author: Pan Bian Date: Sat Dec 3 10:39:33 2016 -0200 [media] media: platform: sti: return -ENOMEM on errors Function bdisp_debugfs_create() returns 0 even on errors. So its caller cannot detect the errors. It may be better to return "-ENOMEM" on the exception paths. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188801 Signed-off-by: Pan Bian Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/bdisp/bdisp-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4865fffa834884ffc49a551bb3c7ac8a76e8585d Author: Tiffany Lin Date: Fri Dec 2 00:38:34 2016 -0200 [media] mtk-vcodec: use V4L2_DEC_CMD_STOP to implement flush Also remove the code using size-0 OUTPUT buffer to flush. Signed-off-by: Tiffany Lin Signed-off-by: Wu-Cheng Li Reviewed-by: Kuang-che Wu Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 151 ++++++++++++++------- .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 14 ++ drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 2 + 3 files changed, 117 insertions(+), 50 deletions(-) commit 974eadf1fc4f9bd0e9da686e7ba6c3e4e708fc45 Author: Rasmus Villemoes Date: Wed Nov 30 19:39:12 2016 -0200 [media] lmedm04: make lme2510_powerup a little smaller gcc isn't smart enough to realize it can share most of the argument buildup and the actual function call between the two branches, so help it a little. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/lmedm04.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bfe17178a8240c008484c43cf9e018d43ff9a990 Author: Rasmus Villemoes Date: Wed Nov 30 19:39:11 2016 -0200 [media] lmedm04: make some string arrays static It takes more .text to initialize these on the stack than they occupy in .rodata, so just make them static const. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 75759e31e6e7f38625510a89fe580374a75db9f4 Author: Rasmus Villemoes Date: Wed Nov 30 19:39:10 2016 -0200 [media] lmedm04: change some static variables to automatic ibuf and rbuf in lme2510_int_response are always assigned to before they are read, and their addresses do not escape the function, so they have no reason to be static. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a3402d3180cc8aea65de52a8897701b5828a928 Author: Rasmus Villemoes Date: Wed Nov 30 19:39:09 2016 -0200 [media] lmedm04: use %phN for hex dump Using the %ph printf extension for hex dumps like this makes the generated code quite a bit smaller. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90cd366bc61cd539c797b7ad957a9d749d97200f Author: Shuah Khan Date: Tue Nov 29 21:59:54 2016 -0200 [media] media: Protect enable_source and disable_source handler code paths Drivers might try to access and run enable_source and disable_source handlers when the driver that implements these handlers is clearing the handlers during its unregister. Fix the following race condition: process 1 process 2 request video streaming unbind au0828 v4l2 checks if tuner is free ... ... au0828_unregister_media_device() ... ... (doesn't hold graph_mutex) mdev->enable_source = NULL; if (mdev && mdev->enable_source) mdev->disable_source = NULL; mdev->enable_source() (enable_source holds graph_mutex) As shown above enable_source check is done without holding the graph_mutex. If unbind happens to be in progress, au0828 could clear enable_source and disable_source handlers leading to null pointer de-reference. Fix it by protecting enable_source and disable_source set and clear and protecting enable_source and disable_source handler access and the call itself. process 1 process 2 request video streaming unbind au0828 v4l2 checks if tuner is free ... ... au0828_unregister_media_device() ... ... (hold graph_mutex while clearing) mdev->enable_source = NULL; if (mdev) mdev->disable_source = NULL; (hold graph_mutex to check and call enable_source) if (mdev->enable_source) mdev->enable_source() If graph_mutex is held to just heck for handler being null and needs to be released before calling the handler, there will be another window for the handlers to be cleared. Hence, enable_source and disable_source handlers no longer hold the graph_mutex and expect callers to hold it to avoid forcing them release the graph_mutex before calling the handlers. Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 24 ++++++++++++++++++------ drivers/media/usb/au0828/au0828-core.c | 21 +++++++++------------ drivers/media/v4l2-core/v4l2-mc.c | 26 ++++++++++++++++++-------- include/media/media-device.h | 2 ++ 4 files changed, 47 insertions(+), 26 deletions(-) commit 321d17c19bf51a5e0ea19163f7091563c70415a6 Author: Chris Packham Date: Thu Feb 2 12:16:24 2017 +1300 EDAC, mpc85xx: Add T2080 l2-cache support The L2 cache controller on the T2080 SoC has similar capabilities to the others already supported by the mpc85xx_edac driver. Add it to the list of compatible devices. Signed-off-by: Chris Packham Acked-by: Johannes Thumshirn Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: devicetree@vger.kernel.org Cc: linux-edac Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170201231624.28843-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 1 + drivers/edac/mpc85xx_edac.c | 1 + 2 files changed, 2 insertions(+) commit 92fbeb40b132f5b2ec335f644ba563a1a85ffd8b Author: Nicolas Iooss Date: Sat Nov 26 17:43:50 2016 -0200 [media] tw686x: silent -Wformat-security warning Using sprintf() with a non-literal string makes some compiler complain when building with -Wformat-security (eg. clang reports "format string is not a string literal (potentially insecure)"). Here sprintf() format parameter is indirectly a literal string so there is no security issue. Nevertheless adding a "%s" format string to silent the warning helps to detect real bugs in the kernel. Signed-off-by: Nicolas Iooss Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 062c5fff31be2e5324067859ef24a748f59ca029 Author: Dan Carpenter Date: Fri Nov 25 19:28:34 2016 -0200 [media] media: ti-vpe: vpdma: fix a timeout loop The check assumes that we end on zero but actually we end on -1. Change the post-op to a pre-op so that we do end on zero. Techinically now we only loop 499 times instead of 500 but that's fine. Fixes: dc12b124353b ("[media] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs") Signed-off-by: Dan Carpenter Acked-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti-vpe/vpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ee3fde047589dc9c201251f07d0ca1dc776feca Author: Rob Herring Date: Thu Feb 2 13:48:09 2017 -0600 tty_port: register tty ports with serdev bus Register a serdev controller with the serdev bus when a tty_port is registered. This creates the serdev controller and create's serdev devices for any DT child nodes of the tty_port's parent (i.e. the UART device). Signed-off-by: Rob Herring Reviewed-By: Sebastian Reichel Tested-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bed35c6dfa6a36233c3e1238a40dc1ae67955898 Author: Rob Herring Date: Thu Feb 2 13:48:08 2017 -0600 serdev: add a tty port controller driver Add a serdev controller driver for tty ports. The controller is registered with serdev when tty ports are registered with the TTY core. As the TTY core is built-in only, this has the side effect of making serdev built-in as well. Signed-off-by: Rob Herring Reviewed-By: Sebastian Reichel Tested-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/Kconfig | 8 ++ drivers/tty/serdev/Makefile | 2 + drivers/tty/serdev/serdev-ttyport.c | 224 ++++++++++++++++++++++++++++++++++++ include/linux/serdev.h | 21 ++++ 4 files changed, 255 insertions(+) commit cd6484e1830be260abfba80a9c7d8f65531126d6 Author: Rob Herring Date: Thu Feb 2 13:48:07 2017 -0600 serdev: Introduce new bus for serial attached devices The serdev bus is designed for devices such as Bluetooth, WiFi, GPS and NFC connected to UARTs on host processors. Tradionally these have been handled with tty line disciplines, rfkill, and userspace glue such as hciattach. This approach has many drawbacks since it doesn't fit into the Linux driver model. Handling of sideband signals, power control and firmware loading are the main issues. This creates a serdev bus with controllers (i.e. host serial ports) and attached devices. Typically, these are point to point connections, but some devices have muxing protocols or a h/w mux is conceivable. Any muxing is not yet supported with the serdev bus. Signed-off-by: Rob Herring Reviewed-By: Sebastian Reichel Tested-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 8 + drivers/char/Kconfig | 1 + drivers/tty/Makefile | 1 + drivers/tty/serdev/Kconfig | 8 + drivers/tty/serdev/Makefile | 3 + drivers/tty/serdev/core.c | 421 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/serdev.h | 241 +++++++++++++++++++++++++ 7 files changed, 683 insertions(+) commit c1c98dadb2de5d9645bdd142536ca81ca28361f7 Author: Rob Herring Date: Thu Feb 2 13:48:06 2017 -0600 dt/bindings: Add a serial/UART attached device binding Add a common binding for describing serial/UART attached devices. Common examples are Bluetooth, WiFi, NFC and GPS devices. Serial attached devices are represented as child nodes of a UART node. This may need to be extended for more complex devices with multiple interfaces, but for the simple cases a child node is sufficient. Tested-By: Sebastian Reichel Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/serial/slave-device.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit c3485ee0d560b182e1e0f67d67246718739f0782 Author: Rob Herring Date: Thu Feb 2 13:48:05 2017 -0600 tty_port: Add port client functions Introduce a client (upward direction) operations struct for tty_port clients. Initially supported operations are for receiving data and write wake-up. This will allow for having clients other than an ldisc. Convert the calls to the ldisc to use the client ops as the default operations. Signed-off-by: Rob Herring Reviewed-By: Sebastian Reichel Tested-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 17 +++-------------- drivers/tty/tty_port.c | 46 ++++++++++++++++++++++++++++++++++++++++------ include/linux/tty.h | 9 ++++++++- 3 files changed, 51 insertions(+), 21 deletions(-) commit d39e74fdcdcca2e40f5397c3436bc9b8106a66a0 Author: Shailendra Verma Date: Fri Nov 25 02:52:04 2016 -0200 [media] Staging: media: platform: davinci: - Fix for memory leak Fix to avoid possible memory leak if the decoder initialization got failed. Free the allocated memory for file handle object before return in case decoder initialization fails. Signed-off-by: Shailendra Verma Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpfe_capture.c | 2 ++ 1 file changed, 2 insertions(+) commit a380ed461f66d1b843cf13380a43a5fe790b8430 Author: Ulrich Hecht Date: Thu Feb 2 18:10:16 2017 +0100 serial: sh-sci: implement FIFO threshold register setting Sets the closest match for a desired RX trigger level. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 88641c79c501735efe3b638ccad57ec077ed47f7 Author: Ulrich Hecht Date: Thu Feb 2 18:10:15 2017 +0100 serial: sh-sci: consider DR (data ready) bit adequately To allow operation with a higher RX FIFO interrupt threshold in PIO mode, it is necessary to consider the DR bit ("FIFO not full, but no data received for 1.5 frames") as an indicator that data can be read. Otherwise the driver will let data rot in the FIFO until the threshold is reached. Signed-off-by: Ulrich Hecht Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54e14ae2f3e82b327853e40afa9382a984a56742 Author: Ulrich Hecht Date: Thu Feb 2 18:10:14 2017 +0100 serial: sh-sci: add FIFO trigger bits Defines the bits controlling FIFO thresholds, adds the additional HSCIF registers to the register map. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 2 ++ drivers/tty/serial/sh-sci.h | 6 ++++++ 2 files changed, 8 insertions(+) commit 30f895a9e1df6a44cef6e4e0fad70762026b8512 Author: Arnd Bergmann Date: Thu Nov 24 14:25:38 2016 -0200 [media] b2c2: use IS_REACHABLE() instead of open-coding it The FE_SUPPORTED() macro is basically the same as IS_REACHABLE, except that it causes a warning with gcc-7: common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] Using IS_REACHABLE() to define it avoids the warning. Fixes: 3785bc170f79 ("[media] b2c2: break it into common/pci/usb directories") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/common/b2c2/flexcop-fe-tuner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0832a462029538bab8dead15d12fa63f201a675a Author: Dmitry Torokhov Date: Wed Feb 1 15:20:12 2017 -0800 tty: serial: cpm_uart: make use of for_each_node_by_type() Instead of open-coding loop with of_find_node_by_type(), let's use canned macro. Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/cpm_uart/cpm_uart_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit aea9a80ba98a0c9b4de88850260e9fbdcc98360b Author: Sudeep Holla Date: Wed Feb 1 15:46:38 2017 +0000 tty: serial: pl011: add ttyAMA for matching pl011 console Commit c7cef0a84912 ("console: Add extensible console matching") added match() method to struct console which allows the console to perform console command line matching instead of (or in addition to) default console matching (ie., by fixed name and index). Commit ad1696f6f09d ("ACPI: parse SPCR and enable matching console") introduced support for SPCR as matching console. Commit 10879ae5f12e ("serial: pl011: add console matching function") added the match method for pl011 console which checks for the console string to be "pl011" Now on a platform which has both SPCR in the ACPI tables and ttyAMA in the command line, the ttyAMA is chosen as "selected console" but it doesn't pass the matching console method which results in CON_CONSDEV not being set on the "selected console". As a result of that, the bootconsole(SPCR in the above case) is not unregistered and all the beginning boot messages are seen twice. This patch adds "ttyAMA" so that it's considered to match pl011 console. Fixes: 10879ae5f12e ("serial: pl011: add console matching function") Cc: Russell King Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Hurley Cc: Aleksey Makarov Signed-off-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8a1781b87266a1b006e2223581facd0517e555b Author: 남영민 Date: Wed Feb 1 19:25:46 2017 +0900 serial: samsung: enable clock before accessing interrupt mask resister Ensure that the uart clock is enabled prior to writing to the interrupt mask register in s3c24xx_serial_resume_noirq function. Without enabing the uart clock, the uart register cannot be accessed. Signed-off-by: Youngmin Nam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 3 +++ 1 file changed, 3 insertions(+) commit 5d1a2388edee77930c8b542cf8be0c92342dbeb4 Author: Sudip Mukherjee Date: Mon Jan 30 22:28:22 2017 +0000 serial: 8250_pci: remove exar code Remove the Exar specific codes from 8250_pci and blacklist those chips so that the new Exar serial driver binds to the devices. Reviewed-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 336 +------------------------------------ drivers/tty/serial/8250/Kconfig | 1 + 2 files changed, 4 insertions(+), 333 deletions(-) commit d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 Author: Sudip Mukherjee Date: Mon Jan 30 22:28:21 2017 +0000 serial: exar: split out the exar code from 8250_pci Add the serial driver for the Exar chips. And also register the platform device for the GPIO provided by the Exar chips. Reviewed-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 396 ++++++++++++++++++++++++++++++++++++ drivers/tty/serial/8250/Kconfig | 4 + drivers/tty/serial/8250/Makefile | 1 + 3 files changed, 401 insertions(+) commit 6689638025a91bd795204c01b25a561fa93f11e8 Author: Mauro Carvalho Chehab Date: Thu Nov 24 09:52:35 2016 -0200 [media] ivtv: mark DVB "borrowed" ioctls as deprecated changeset da8ec560e3b4 ("[media] ivtv: implement new decoder command ioctls") implemented proper support for mpeg audio and video control at V4L2 API. Since then, the usage of the the DVB APIs is deprecated. However, we never actually marked it as deprecated nor provided any way to disable it. Let's do it now. This patch prepares for the removal of this bad usage on a couple of Kernel versions. Fixes: da8ec560e3b4 ("[media] ivtv: implement new decoder command ioctls") Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/Kconfig | 13 ++++++++++ drivers/media/pci/ivtv/ivtv-driver.h | 2 -- drivers/media/pci/ivtv/ivtv-ioctl.c | 49 ++++++++++++++++++++++++------------ 3 files changed, 46 insertions(+), 18 deletions(-) commit 4ab53a69257015381f0dba18cb928902e753758c Author: Wei Yongjun Date: Wed Feb 1 21:30:28 2017 -0600 usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static Fixes the following sparse warning: drivers/usb/musb/musb_dsps.c:270:6: warning: symbol 'dsps_musb_clear_ep_rxintr' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1fce66ecd271dee5379f419a69b8ff5dae49ba1 Author: Icenowy Zheng Date: Wed Feb 1 21:30:27 2017 -0600 usb: musb: sunxi: add support for the variant in H3/V3s SoC Allwinner H3/V3s features a variant of MUSB controller, which lacks one endpoint. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard [b-liu@ti.com: added usb: to commit subject prefix] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman .../bindings/usb/allwinner,sun4i-a10-musb.txt | 4 +-- drivers/usb/musb/sunxi.c | 35 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) commit c0927fea6ae6529893eeefe2cf97f76877e8929e Author: Bhumika Goyal Date: Wed Feb 1 21:30:26 2017 -0600 usb: musb: omap2430: constify dev_pm_ops structures Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Size details after cross compiling the .o file for arm architecture. File size before: drivers/usb/musb/omap2430.o text data bss dec hex filename 4141 400 8 4549 11c5 usb/musb/omap2430.o File size after: drivers/usb/musb/omap2430.o text data bss dec hex filename 4333 200 8 4541 11bd usb/musb/omap2430.o Signed-off-by: Bhumika Goyal [b-liu@ti.com: added omap2430 in commit subject prefix] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 369469a92393d8e365093d44c0df7a7b6430bc8b Author: Tony Lindgren Date: Wed Feb 1 21:30:25 2017 -0600 usb: musb: Add support for optional VBUS irq to dsps glue layer We can now configure the PMIC interrupt to provide us VBUS events. In that case we don't need to constantly poll the status and can make it optional. This is only wired up for the mini-B interface on beaglebone. Note that eventually we should get also the connect status for the host interface when the am335x internal PM coprocessor provides us with an IRQ chip. For now, we still need to poll for the host mode status. Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 117 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 93 insertions(+), 24 deletions(-) commit 1ef2bcefa21d1c0c61bfce1f994a0fcd12ab40e7 Author: Jérémy Lefaure Date: Wed Feb 1 21:30:24 2017 -0600 usb: musb: blackfin: fix unused warnings on suspend/resume When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use bfin_resume and bfin_suspend even if CONFIG_PM is enabled: drivers/usb/musb/blackfin.c:602:12: warning: ‘bfin_resume’ defined but not used [-Wunused-function] static int bfin_resume(struct device *dev) ^~~~~~~~~~~ drivers/usb/musb/blackfin.c:585:12: warning: ‘bfin_suspend’ defined but not used [-Wunused-function] static int bfin_suspend(struct device *dev) ^~~~~~~~~~~~ The preprocessor condition should be on CONFIG_PM_SLEEP, not on CONFIG_PM. However it is better to mark these functions as __maybe_unused. Signed-off-by: Jérémy Lefaure Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/blackfin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 45abfa683bec97427078d5c122c2166fb989a03a Author: Bin Liu Date: Wed Feb 1 21:30:23 2017 -0600 usb: musb: dsps: switch to static id for musb-hdrc platform devices The dsps glue uses PLATFORM_DEVID_AUTO when creating the musb-hdrc platform devices, this causes that the id will change in each system depending on the order of driver probe, the order of the usb instances defined in device-tree, or the list of enabled devices which use also PLATFORM_DEVID_AUTO in kernel config. This id inconsistency causes trouble in shell scripting or user guide documentation. So switch it to static id, starting from 0 to the musb instance with lower MMR offset. This scheme is also aligned to the naming in the SoC. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7eebe4ec412f9a392a59718ec9ab3eb4b4a34d92 Author: Pali Rohár Date: Wed Feb 1 21:30:22 2017 -0600 usb: musb: debugfs: allow forcing host mode together with speed in testmode Based on the musb ug, force_host bit is allowed to be set along with force_hs or force_fs bit. It could help to implement forced host mode via testmode on Nokia N900. Signed-off-by: Pali Rohár Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_debugfs.c | 46 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit bb1d1ce8c74ee967f578d5e4cae9b88d7344c12b Author: Chanwoo Choi Date: Wed Feb 1 21:30:21 2017 -0600 usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier This patch just uses the resource-managed extcon API when registering the extcon notifier. Signed-off-by: Chanwoo Choi Acked-by: Maxime Ripard Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/sunxi.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 486fc20ac8391338a42b015801b846acda4db7b7 Author: Alexandre Bailon Date: Wed Feb 1 21:30:20 2017 -0600 usb: musb: da8xx: Fix host mode suspend On da8xx, VBUS is not maintained during suspend when musb is in host mode. On resume, all the connected devices will be disconnected and then will be enumerated again. This happens because MUSB_DEVCTL is cleared during suspend. Use the quirk MUSB_PRESERVE_SESSION to preseve MUSB_DEVCTL during suspend. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a926ed11e7b4325f0ece739d7188e8bdbb99fb44 Author: Alexandre Bailon Date: Wed Feb 1 21:30:19 2017 -0600 usb: musb: Add a quirk to preserve the session during suspend On da8xx, VBUS is not maintained during suspend when musb is in host mode. On resume, all the connected devices will be disconnected and then will be enumerated again. This happens because MUSB_DEVCTL is cleared during suspend. Add a quirk to not clear MUSB_DEVCTL and then preserve the session during a suspend. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 3 ++- drivers/usb/musb/musb_core.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 71f5a0ad9e82c1239f0d748bda32a4b6e6dbcb80 Author: Alexandre Bailon Date: Wed Feb 1 21:30:18 2017 -0600 usb: musb: da8xx: Add support of suspend / resume Implement PM methods specifics for da8xx glue. The only thing to do is to power off the phy. As the registers are in retention during suspend, there is no need to save them. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit ca7c1d5094ec1c425bd9a38153789f9cedb0b8e2 Author: Bin Liu Date: Wed Feb 1 21:30:17 2017 -0600 usb: musb: davinci: remove redundant code The session is cleared in the core whenever musb_platform_disable() is called, so clearing it in the glue driver *_musb_disable() is redundant. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/davinci.c | 1 - 1 file changed, 1 deletion(-) commit be0e5c602cc520f7d8474192567a092643aec74a Author: Bin Liu Date: Wed Feb 1 21:30:16 2017 -0600 usb: musb: am35x: remove redundant code The session is cleared in the core whenever musb_platform_disable() is called, so clearing it in the glue driver *_musb_disable() is redundant. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/am35x.c | 1 - 1 file changed, 1 deletion(-) commit 41c4eb450fd3e1e17f51f77e58902e91e87b6e01 Author: Bin Liu Date: Wed Feb 1 21:30:15 2017 -0600 usb: musb: da8xx: remove redundant code The session is cleared in the core whenever musb_platform_disable() is called, so clearing it in the glue driver *_musb_disable() is redundant. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 1 - 1 file changed, 1 deletion(-) commit f2e3818ac89d9168c3051b9aaa23b78050df9b6d Author: Bin Liu Date: Wed Feb 1 21:30:14 2017 -0600 usb: musb: dsps: remove redundant code The session is cleared in the core whenever musb_platform_disable() is called, so clearing it in the glue driver *_musb_disable() is redundant. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 1 - 1 file changed, 1 deletion(-) commit e945953dd736b5f385fbb4b7ab368271dff5714a Author: Bin Liu Date: Wed Feb 1 21:30:13 2017 -0600 usb: musb: remove musb_generic_disable function musb_generic_disable() only has two lines of code. So remove it and let the callers directly call those two lines. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit a994ce2d7e66008381a0b184c73be9ae9b72eb5c Author: Alexandre Bailon Date: Wed Feb 1 21:30:12 2017 -0600 usb: musb: da8xx: Remove CPPI 3.0 quirk and methods DA8xx driver is registering and using the CPPI 3.0 DMA controller but actually, the DA8xx has a CPPI 4.1 DMA controller. Remove the CPPI 3.0 quirk and methods. Fixes: f8e9f34f80a2 ("usb: musb: Fix up DMA related macros") Fixes: 7f6283ed6fe8 ("usb: musb: Set up function pointers for DMA") Cc: Signed-off-by: Alexandre Bailon Acked-by: Sergei Shtylyov Acked-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 453785c64e090d9b4169636b7276fcd6d7489d33 Author: Colin Ian King Date: Thu Feb 2 11:51:48 2017 +0000 usb: misc: adutux: remove redundant error check on copy_to_user return code The 2nd check for a non-zero return from copy_to_user is redundant as it is has already been made a few lines earlier. This check was made redundant because of previous fix to the copy_to_user error return check. Detected by CoverityScan, CID#114347 ("Logically Dead Code") Fixes: 1865a9c382ede ("USB: adutux: fix misuse of return value of copy_to_user()") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 4 ---- 1 file changed, 4 deletions(-) commit 38611529a01191b82bb54e9bcbf6871bdb5fa873 Author: Antti Palosaari Date: Fri Jan 27 14:51:32 2017 -0200 [media] MAINTAINERS: remove hd29l2 Remove unused demod driver. Device that used it never went public. If someone later decide to add support for a device using this chipset, it should be easy enough to retrieve it from git history. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 10 - drivers/media/dvb-frontends/Kconfig | 7 - drivers/media/dvb-frontends/Makefile | 1 - drivers/media/dvb-frontends/hd29l2.c | 866 ------------------------------ drivers/media/dvb-frontends/hd29l2.h | 61 --- drivers/media/dvb-frontends/hd29l2_priv.h | 297 ---------- 6 files changed, 1242 deletions(-) commit e11415c811047189a132c61c4c838ed7fd8431c8 Author: Antti Palosaari Date: Fri Dec 9 15:11:09 2016 -0200 [media] mt2060: implement sleep I saw from ZyDAS ZD1301 sniffs it sets chip sleeping by using REG_MISC_CTRL. That has very huge effect for power management, around 0.9W. Sleep is still disabled for all the old hardware just to avoid possible regression as meaning of register bits are unknown. I tested it also with some other devices and it seems to be working, but I still consider it to be too risky to change it default. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mt2060.c | 25 +++++++++++++++++++++++-- drivers/media/tuners/mt2060_priv.h | 8 ++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) commit 753dfd23612dfb4b585b7814a94237987fdf3359 Author: Wei Yongjun Date: Wed Jan 25 14:02:48 2017 +0000 usb: chipidea: msm: Fix return value check in ci_hdrc_msm_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 2fc305be364e ("usb: chipidea: msm: Mux over secondary phy at the right time") Signed-off-by: Wei Yongjun Reviewed-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 490b63e6de63d13e82110f4cb5f1aa31dd27245a Author: Stephen Boyd Date: Wed Jan 25 14:32:43 2017 -0800 usb: chipidea: Configure phy for appropriate mode When the qcom chipidea controller is used with an extcon, we need to signal device mode or host mode to the phy so it can configure itself for the correct mode. This should be done after the phy is powered up, so that the register writes work correctly. Add in the appropriate phy_set_mode() call here. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit d4c554c374f3b7dd1d4e2560c303f050b318420b Author: Antti Palosaari Date: Mon Jul 27 08:10:25 2015 -0300 [media] MAINTAINERS: add zd1301 DVB USB interface driver DVB USB interface driver for ZyDAS ZD1301 chip. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 992b39872b800babcee278bb2b4b7a2d503ba984 Author: Antti Palosaari Date: Thu Jul 23 18:53:41 2015 -0300 [media] zd1301: ZyDAS ZD1301 DVB USB interface driver ZyDAS ZD1301 is chip having USB interface and DVB-T demodulator integrated. This driver is for USB interface part. Device has USB ID 0ace:13a1. Used tuner is MT2060. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb-usb-ids.h | 1 + drivers/media/usb/dvb-usb-v2/Kconfig | 8 + drivers/media/usb/dvb-usb-v2/Makefile | 3 + drivers/media/usb/dvb-usb-v2/zd1301.c | 294 ++++++++++++++++++++++++++++++++++ 4 files changed, 306 insertions(+) commit a40cc81477dc4a04de78a2dbf2c3a3e60bcffff2 Author: Antti Palosaari Date: Mon Jul 27 08:07:40 2015 -0300 [media] MAINTAINERS: add zd1301_demod driver DVB-T demodulator driver for ZyDAS ZD1301 chip. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 47d65372b3b699e2327230bf7ef8e97b9703d397 Author: Antti Palosaari Date: Thu Jul 23 18:43:06 2015 -0300 [media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver ZyDAS ZD1301 is chip having USB interface and DVB-T demodulator integrated. This driver is for demodulator part. Driver is very reduced, just basic demodulator functionality, no statistics at all. It registers as a platform driver to driver core. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 7 + drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/zd1301_demod.c | 551 +++++++++++++++++++++++++++++ drivers/media/dvb-frontends/zd1301_demod.h | 55 +++ 4 files changed, 614 insertions(+) commit 433c4864977a943eabea737f2f0894430795eca3 Author: Antti Palosaari Date: Sun Jul 26 17:30:07 2015 -0300 [media] mt2060: add param to split long i2c writes Add configuration parameter to split long i2c writes as some I2C adapters cannot write 10 bytes used as a one go. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mt2060.c | 21 +++++++++++++++++---- drivers/media/tuners/mt2060.h | 3 +++ drivers/media/tuners/mt2060_priv.h | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) commit 59e8b7aa931c8a82afad9f5868e4872f14c44cc7 Author: Antti Palosaari Date: Sun Jul 26 18:45:05 2015 -0300 [media] mt2060: add i2c bindings Add proper i2c driver model bindings. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mt2060.c | 83 ++++++++++++++++++++++++++++++++++++++ drivers/media/tuners/mt2060.h | 20 +++++++++ drivers/media/tuners/mt2060_priv.h | 2 + 3 files changed, 105 insertions(+) commit 33084060fb6d51ff566439a387f69ed90301280c Author: Alan Brady Date: Mon Nov 28 16:06:03 2016 -0800 i40e: add interrupt rate limit verbosity Due to the resolution of the register controlling interrupt rate limiting, setting certain values for the interrupt rate limit make it appear as though the limiting is not completely accurate. The problem is that the interrupt rate limit is getting rounded down to the nearest multiple of 4. This patch fixes the problem by adding some feedback to the user as to the actual interrupt rate limit being used when it differs from the requested limit. Without this patch setting interrupt rate limits may appear to behave inaccurately. Change-ID: I3093cf3f2d437d35a4c4f4bb5af5ce1b85ab21b7 Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1c0e6a3613d3f0bb088a3160095c8da4c1214d02 Author: Alan Brady Date: Mon Nov 28 16:06:02 2016 -0800 i40e: refactor macro INTRL_USEC_TO_REG This patch refactors the macro INTRL_USEC_TO_REG into a static inline function and fixes a couple subtle bugs caused by the macro. This patch fixes a bug which was caused by passing a bad register value to the firmware. If enabling interrupt rate limiting, a non-zero value for the rate limit must be used. Otherwise the firmware sets the interrupt rate limit to the maximum value. Due to the limited resolution of the register, attempting to set a value of 1, 2, or 3 would be rounded down to 0 and limiting was left enabled, causing unexpected behavior. This patch also fixes a possible bug in which using the macro itself can introduce unintended side-affects because the macro argument is used more than once in the macro definition (e.g. a variable post-increment argument would perform a double increment on the variable). Without this patch, attempting to set interrupt rate limits of 1, 2, or 3 results in unexpected behavior and future use of this macro could cause subtle bugs. Change-Id: I83ac842de0ca9c86761923d6e3a4d7b1b95f2b3f Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 04766b22cf805011620f546384b271586548e8a7 Author: Mitch Williams Date: Mon Nov 28 16:06:01 2016 -0800 i40e: remove unused function After refactoring the client open and close code, this is no longer needed. Remove it. Change-ID: If8e6e32baa354d857c2fd8b2f19404f1786011c4 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_client.c | 35 --------------------------- 2 files changed, 36 deletions(-) commit 11131e2b8e9454f79ebfc71e45fe246948ce4997 Author: Jayaprakash Shanmugam Date: Mon Nov 28 16:06:00 2016 -0800 i40e: Remove FPK HyperV VF device ID Requirement for VFs to use the VMBus has been removed that's why removing Hyper-V VF device ID. Change-ID: I84f0964f443ee0db3e5e444b5ace996eb71b8280 Signed-off-by: Jayaprakash Shanmugam Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 - 2 files changed, 2 deletions(-) commit 52ea3e802047552a8c1ec8c42cad361ffd4ca09c Author: Alexander Duyck Date: Mon Nov 28 16:05:59 2016 -0800 i40e: Quick refactor to start moving data off stack and into Tx buffer info This patch does some quick work to pull some of the data off of the stack and hopefully start storing it in the Tx buffer info section of the Tx ring. Ideally we should be moving away from having to store much of anything on the stack and can just maintain it all in the descriptor rings. Change-ID: I4b4715ea1920e122502482b3f9e56a9a6cb1e9fe Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 47 +++++++++++++++------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 47 +++++++++++++++------------ 2 files changed, 54 insertions(+), 40 deletions(-) commit 9588397d24eecb7298bce9307b589a5bc0ccafdd Author: Tushar Dave Date: Sat Nov 19 13:53:58 2016 -0800 i40e: remove unnecessary __packed 'struct i40e_dma_mem' defined with 'packed' directive causing kernel unaligned errors on sparc. e.g. i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.6.16-k i40e: Copyright (c) 2013 - 2014 Intel Corporation. Kernel unaligned access at TPC[44894c] dma_4v_alloc_coherent+0x1ac/0x300 Kernel unaligned access at TPC[44894c] dma_4v_alloc_coherent+0x1ac/0x300 Kernel unaligned access at TPC[44894c] dma_4v_alloc_coherent+0x1ac/0x300 Kernel unaligned access at TPC[44894c] dma_4v_alloc_coherent+0x1ac/0x300 Kernel unaligned access at TPC[44894c] dma_4v_alloc_coherent+0x1ac/0x300 i40e 0000:03:00.0: fw 5.1.40981 api 1.5 nvm 5.04 0x80002548 0.0.0 This can be fixed with get_unaligned/put_unaligned(). However no reference in driver shows that 'struct i40e_dma_mem' directly shoved into NIC hardware. But instead fields of the struct are being read and used for hardware. Therefore, __packed is unnecessary for 'struct i40e_dma_mem'. In addition, although 'struct i40e_virt_mem' doesn't cause any unaligned access, keeping it packed is unnecessary as well because of aforementioned reason. This change make 'struct i40e_dma_mem' and 'struct i40e_virt_mem' unpacked. Signed-off-by: Tushar Dave Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17901e1bde9b959b535d075f137d5a86ca64f1c9 Author: Mitch Williams Date: Fri Nov 11 12:39:39 2016 -0800 i40evf: remove unused device ID This device ID was intended for use when running Linux VF drivers under Hyper-V, but we have determined that it is not necessary. Since it is unused, and will never be used, remove it. Change-ID: I74998ab4237db043cd400547bb54a0a5e2a37ea5 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 - 1 file changed, 1 deletion(-) commit 6de432c5ae28e7330e14e85c4c614a67a0a12263 Author: Bimmy Pujari Date: Fri Nov 11 12:39:38 2016 -0800 i40e: Deprecating unused macro I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710 was supposed to be for 40G. But function i40e_is_mac_710 sets I40E_MAC_XL710 for all device IDS, I40E_MAC_X710 is not used at all. As there is nothing to compare there is no need for this function. Thus deprecating this extra macro and removing this function entirely and replacing it with a direct check. Change-ID: I7d1769954dccd574a290ac04adb836ebd156730e Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 13 ------------- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_type.h | 1 - drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 - 4 files changed, 3 insertions(+), 18 deletions(-) commit 9569a9a4547d5636827c3f6b09be73ed924b1d16 Author: Jacob Keller Date: Fri Nov 11 12:39:37 2016 -0800 i40e: when adding or removing MAC filters, correctly handle VLANs Instead of using i40e_add_filter or i40e_del_filter directly, when adding a MAC address, we should normally be using i40e_add_mac_filter or i40e_del_mac_filter. These functions correctly handle the various cases of VLAN mode or PVID settings. This ensures consistency and avoids the issues that can occur with the recent addition of a WARN_ON() in i40e_sync_vsi_filters. Change-ID: I7fe62db063391fdd1180b2d6a6a3c5ab4307eeee Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++++------- 2 files changed, 7 insertions(+), 10 deletions(-) commit 148141bb26cf942e6bc7249c55d9958dd62dd4f2 Author: Jacob Keller Date: Fri Nov 11 12:39:36 2016 -0800 i40e: avoid O(n^2) loop when deleting all filters Use __i40e_del_filter instead of using i40e_del_filter() which will avoid doing an additional search to delete a filter we already have the pointer for. Change-ID: Iea5a7e3cafbf8c682ed9d3b6c69cf5ff53f44daf 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 | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit feffdbe47d6f4c02b5e2764e14490c5f9d250bdb Author: Jacob Keller Date: Fri Nov 11 12:39:35 2016 -0800 i40e: rename i40e_put_mac_in_vlan and i40e_del_mac_all_vlan These functions purpose is to add a new MAC filter correctly, whether we're using VLANs or not. Their goal is to ensure that all active VLANs get the new MAC filter. Rename them so that their intent is clear. They function correctly regardless of whether we have any active VLANs or only have I40E_VLAN_ANY filters. The new names convey how they function in a more clear manner. Change-ID: Iec1961f968c0223a7132724a74e26a665750b107 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++++---------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++-- 3 files changed, 18 insertions(+), 16 deletions(-) commit d983001f044cf823490af7dcfcde39cfb42be0db Author: Jacob Keller Date: Fri Nov 11 12:39:34 2016 -0800 i40e: no need to check is_vsi_in_vlan before calling i40e_del_mac_all_vlan This function won't be appreciably slower when in VLAN mode, so there is no real reason to not just call it directly. In either case, we still must search the full table for a MAC/VLAN pair. We do get to stop searching a tiny bit early in the case of knowing we are not in VLAN mode, but this is a minor savings and we can avoid the code complexity by not having to worry about the check. Change-ID: I533412195b3a42f51cf629e3675dd5145aea8625 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7aaf9536c45021772a5bc6cd4b620a11eac750f7 Author: Jacob Keller Date: Fri Nov 11 12:39:33 2016 -0800 i40e: fold the i40e_is_vsi_in_vlan check into i40e_put_mac_in_vlan Fold the check for determining when to call i40e_put_mac_in_vlan directly into the function so that we don't need to decide which function to use ahead of time. This allows us to just call i40e_put_mac_in_vlan directly without having to check ahead of time. Change-ID: Ifff526940748ac14b8418be5df5a149502eed137 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++++------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 ++------ 2 files changed, 6 insertions(+), 13 deletions(-) commit f94484b7584765eebded5d7bfdeb0b2c7b1caf51 Author: Jacob Keller Date: Wed Dec 7 14:05:34 2016 -0800 i40e: don't allow i40e_vsi_(add|kill)_vlan to operate when VID<1 Now that we have the separate i40e_(add|rm)_vlan_all_mac functions, we should not be using the i40e_vsi_kill_vlan or i40e_vsi_add_vlan functions when PVID is set or when VID is less than 1. This allows us to remove some checks in i40e_vsi_add_vlan and ensures that callers which need to handle VID=0 or VID=-1 don't accidentally invoke the VLAN mode handling used to convert filters when entering VLAN mode. We also update the functions to take u16 instead of s16 as well since they no longer expect to be called with VID=I40E_VLAN_ANY. Change-ID: Ibddf44a8bb840dde8ceef2a4fdb92fd953b05a57 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) commit 8fe809a992639b2013c0d8da2ba55cdea28a959a Author: Eric Dumazet Date: Wed Feb 1 20:47:59 2017 -0800 net: add LINUX_MIB_PFMEMALLOCDROP counter Debugging issues caused by pfmemalloc is often tedious. Add a new SNMP counter to more easily diagnose these problems. Signed-off-by: Eric Dumazet Cc: Josef Bacik Acked-by: Josef Bacik Signed-off-by: David S. Miller include/uapi/linux/snmp.h | 1 + net/core/filter.c | 5 +++-- net/ipv4/proc.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 661091093918657ab544fb8ca91a5ab172a986dc Author: David Ahern Date: Wed Feb 1 18:41:25 2017 -0800 net: ipv4: remove fib_lookup.h from devinet.c include list nothing in devinet.c relies on fib_lookup.h; remove it from the includes Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/devinet.c | 2 -- 1 file changed, 2 deletions(-) commit b9ea2a7be758f2c07a0c044645edc409a8a388fd Author: Eric Dumazet Date: Wed Feb 1 18:13:23 2017 -0800 net: remove useless pfmemalloc setting When __alloc_skb() allocates an skb from fast clone cache, setting pfmemalloc on the clone is not needed. Clone will be properly initialized later at skb_clone() time, including pfmemalloc field, as it is included in the headers_start/headers_end section which is fully copied. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 1 - 1 file changed, 1 deletion(-) commit 749860ce242798fb090557a5a7868dee40af9268 Author: Pavel Tikhomirov Date: Mon Jan 30 18:06:12 2017 +0300 prctl: propagate has_child_subreaper flag to every descendant If process forks some children when it has is_child_subreaper flag enabled they will inherit has_child_subreaper flag - first group, when is_child_subreaper is disabled forked children will not inherit it - second group. So child-subreaper does not reparent all his descendants when their parents die. Having these two differently behaving groups can lead to confusion. Also it is a problem for CRIU, as when we restore process tree we need to somehow determine which descendants belong to which group and much harder - to put them exactly to these group. To simplify these we can add a propagation of has_child_subreaper flag on PR_SET_CHILD_SUBREAPER, walking all descendants of child- subreaper to setup has_child_subreaper flag. In common cases when process like systemd first sets itself to be a child-subreaper and only after that forks its services, we will have zero-length list of descendants to walk. Testing with binary subtree of 2^15 processes prctl took < 0.007 sec and has shown close to linear dependency(~0.2 * n * usec) on lower numbers of processes. Moreover, I doubt someone intentionaly pre-forks the children whitch should reparent to init before becoming subreaper, because some our ancestor migh have had is_child_subreaper flag while forking our sub-tree and our childs will all inherit has_child_subreaper flag, and we have no way to influence it. And only way to check if we have no has_child_subreaper flag is to create some childs, kill them and see where they will reparent to. Using walk_process_tree helper to walk subtree, thanks to Oleg! Timing seems to be the same. Optimize: a) When descendant already has has_child_subreaper flag all his subtree has it too already. * for a) to be true need to move has_child_subreaper inheritance under the same tasklist_lock with adding task to its ->real_parent->children as without it process can inherit zero has_child_subreaper, then we set 1 to it's parent flag, check that parent has no more children, and only after child with wrong flag is added to the tree. * Also make these inheritance more clear by using real_parent instead of current, as on clone(CLONE_PARENT) if current has is_child_subreaper and real_parent has no is_child_subreaper or has_child_subreaper, child will have has_child_subreaper flag set without actually having a subreaper in it's ancestors. b) When some descendant is child_reaper, it's subtree is in different pidns from us(original child-subreaper) and processes from other pidns will never reparent to us. So we can skip their(a,b) subtree from walk. v2: switch to walk_process_tree() general helper, move has_child_subreaper inheritance v3: remove csr_descendant leftover, change current to real_parent in has_child_subreaper inheritance v4: small commit message fix Fixes: ebec18a6d3aa ("prctl: add PR_{SET,GET}_CHILD_SUBREAPER to allow simple process supervision") Signed-off-by: Pavel Tikhomirov Reviewed-by: Oleg Nesterov Signed-off-by: Eric W. Biederman kernel/fork.c | 10 +++++++--- kernel/sys.c | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) commit 0f1b92cbdd0309afae0af1963e8cccddb3d2eaff Author: Oleg Nesterov Date: Mon Jan 30 18:06:11 2017 +0300 introduce the walk_process_tree() helper Add the new helper to walk the process tree, the next patch adds a user. Note that it visits the group leaders only, proc_visitor can do for_each_thread itself or we can trivially extend walk_process_tree() to do this. Signed-off-by: Oleg Nesterov Signed-off-by: Pavel Tikhomirov Signed-off-by: Eric W. Biederman include/linux/sched.h | 3 +++ kernel/fork.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit cda1ade6a25c85d0a7cc2001a96b0b20f6bfd3f0 Author: Thor Thayer Date: Thu Feb 2 16:05:21 2017 -0600 ARM: dts: Add EMAC AXI settings for Arria10 Add the device tree entries needed to support the EMAC AXI bus settings on the Arria10 SoCFPGA chip. Signed-off-by: Thor Thayer Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit bdcfa156039dcfe2be989b73c4ae1be3d5d0f804 Merge: 60f06fd 740117a Author: David S. Miller Date: Thu Feb 2 22:06:45 2017 -0500 Merge branch 'MV88E6390-fixes' Andrew Lunn says: ==================== MV88E6390 fixes Two patches, which have been posted before. Fix simple issues in the mv88e6390 support. These don't need to go to stable, since the mv88e6390 support in stable is insufficient to be usable. To apply cleanly, these patches rely on "net: dsa: mv88e6xxx: Workaround missing PHY". v2: Added Reviewed-by. Removed a redundant "the" ==================== Signed-off-by: David S. Miller commit 740117a8e2b0e89c5fd6f1d5bbc12f87c46c80d7 Author: Andrew Lunn Date: Thu Feb 2 00:46:16 2017 +0100 net: dsa: mv88e6xxx: Fix typ0 when configuring 2.5Gbps In order to enable 2.5Gbps mode, we need the base speed of 10G, plus the Alt bit setting. Fix a typ0 that used 1Gb base speed. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b91e055c57e45131470d4935e4a726bd65b14580 Author: Andrew Lunn Date: Thu Feb 2 00:46:15 2017 +0100 net: dsa: mv88e6xxx: Fix ATU age timer for MV88E6390 The MV88E6390 family uses a different ATU age timer coefficient. Fix the info structures. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 60f06fde4cff6f6134decbf09199b5e047bc3355 Author: Andrew Lunn Date: Thu Feb 2 00:35:03 2017 +0100 net: phy: marvell: Add support for 88e1545 PHY The 88e1545 PHYs are discrete Marvell PHYs, found in a quad package on the zii-devel-b board. Add support for it to the Marvell PHY driver. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 21 +++++++++++++++++++++ include/linux/marvell_phy.h | 1 + 2 files changed, 22 insertions(+) commit fd3984e6e78a569cd72d94687860501f7e73594c Author: Heiner Kallweit Date: Thu Feb 2 08:20:12 2017 +0100 net: stmmac: Fix wrong message in stmmac_probe_config_dt Most likely a copy & paste error in referenced commit. Restore the debug message to what it was before. Fixes: f573c0b9c4e0 ("stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure") Signed-off-by: Heiner Kallweit Acked-By: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 722eef28616798dd10f9a2e4254163a5bcd54eea Author: Heiner Kallweit Date: Wed Feb 1 22:02:02 2017 +0100 net: stmmac: add separate warning for PTP not being supported by HW Chips like Amlogic S905GXBB are supported by this driver but don't have support for PTP. Add a separate warning for missing HW support to differentiate it from other actual failures. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d6db61a40ee056f0b067b924d28b276306474a9c Author: Heiner Kallweit Date: Wed Feb 1 20:19:25 2017 +0100 net: stmmac: don't set tx delay in RGMII_ID and RGMII_TXID mode As documented in Documentation/devicetree/bindings/net/ethernet.txt, in RGMII_ID and RGMII_TXID mode the MAC should not add a tx delay. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit ba94f3088b792b16ea576a256a6030feddc87f24 Author: Andrey Vagin Date: Wed Feb 1 11:00:45 2017 -0800 unix: add ioctl to open a unix socket file with O_PATH This ioctl opens a file to which a socket is bound and returns a file descriptor. The caller has to have CAP_NET_ADMIN in the socket network namespace. Currently it is impossible to get a path and a mount point for a socket file. socket_diag reports address, device ID and inode number for unix sockets. An address can contain a relative path or a file may be moved somewhere. And these properties say nothing about a mount namespace and a mount point of a socket file. With the introduced ioctl, we can get a path by reading /proc/self/fd/X and get mnt_id from /proc/self/fdinfo/X. In CRIU we are going to use this ioctl to dump and restore unix socket. Here is an example how it can be used: $ strace -e socket,bind,ioctl ./test /tmp/test_sock socket(AF_UNIX, SOCK_STREAM, 0) = 3 bind(3, {sa_family=AF_UNIX, sun_path="test_sock"}, 11) = 0 ioctl(3, SIOCUNIXFILE, 0) = 4 ^Z $ ss -a | grep test_sock u_str LISTEN 0 1 test_sock 17798 * 0 $ ls -l /proc/760/fd/{3,4} lrwx------ 1 root root 64 Feb 1 09:41 3 -> 'socket:[17798]' l--------- 1 root root 64 Feb 1 09:41 4 -> /tmp/test_sock $ cat /proc/760/fdinfo/4 pos: 0 flags: 012000000 mnt_id: 40 $ cat /proc/self/mountinfo | grep "^40\s" 40 19 0:37 / /tmp rw shared:23 - tmpfs tmpfs rw Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller include/uapi/linux/un.h | 2 ++ net/unix/af_unix.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 2a7b6216692cd66f4c94e6ebb48e43038349ca7d Merge: 1f3d620 e4cf8a3 Author: David S. Miller Date: Thu Feb 2 21:50:52 2017 -0500 Merge branch 'mv88e6390-missing-phy-ID' Andrew Lunn says: ==================== Work around missing PHY prodcut ID in mv88e6390 The internal PHYs of the MV88E6390 have a Marvell OUI, but the product ID is zero. Work around this by trapping reads to the ID, and if it is zero, return the MV88E6390 family ID. v2: Move the workaround into the central mdio read function. Enable the temperature sensor, even though it does not work on the 6390, but it does on the 6341, which has the same ID problem. ==================== Signed-off-by: David S. Miller commit e4cf8a38fc0d257b4070066e46a678f4777fecaa Author: Andrew Lunn Date: Wed Feb 1 03:40:06 2017 +0100 net: phy: Marvell: Add mv88e6390 internal PHY The mv88e6390 Ethernet switch has internal PHYs. These PHYs don't have an model ID in the ID2 register. So the MDIO driver in the switch intercepts reads to this register, and returns the switch family ID. Extend the Marvell PHY driver by including this ID, and treat the PHY as a 88E1540. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 20 ++++++++++++++++++++ include/linux/marvell_phy.h | 6 ++++++ 2 files changed, 26 insertions(+) commit da9f33018e2c0b2f341cb574e3c08363e3b0dd28 Author: Andrew Lunn Date: Wed Feb 1 03:40:05 2017 +0100 net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390 The internal PHYs of the mv88e6390 do not have a model ID. Trap any calls to the ID register, and if it is zero, return the ID for the mv88e6390. The Marvell PHY driver can then bind to this ID. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 015bb305b8ebe8d601a238ab70ebdc394c7a19ba Merge: 93faccbb d95fa3c Author: Eric W. Biederman Date: Fri Feb 3 14:53:27 2017 +1300 Merge branch 'nsfs-discovery' Michael Kerrisk < writes: I would like to write code that discovers the namespace setup on a live system. The NS_GET_PARENT and NS_GET_USERNS ioctl() operations added in Linux 4.9 provide much of what I want, but there are still a couple of small pieces missing. Those pieces are added with this patch series. Here's an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, Licensed under the GNU General Public License v2 or later. Test whether a process (identified by PID) might (subject to LSM checks) have capabilities in a namespace (identified by a /proc/PID/ns/xxx file). */ } while (0) exit(EXIT_FAILURE); } while (0) /* Display capabilities sets of process with specified PID */ static void show_cap(pid_t pid) { cap_t caps; char *cap_string; caps = cap_get_pid(pid); if (caps == NULL) errExit("cap_get_proc"); cap_string = cap_to_text(caps, NULL); if (cap_string == NULL) errExit("cap_to_text"); printf("Capabilities: %s\n", cap_string); } /* Obtain the effective UID pf the process 'pid' by scanning its /proc/PID/file */ static uid_t get_euid_of_process(pid_t pid) { char path[PATH_MAX]; char line[1024]; int uid; snprintf(path, sizeof(path), "/proc/%ld/status", (long) pid); FILE *fp; fp = fopen(path, "r"); if (fp == NULL) errExit("fopen-/proc/PID/status"); for (;;) { if (fgets(line, sizeof(line), fp) == NULL) { /* Should never happen... */ fprintf(stderr, "Failure scanning %s\n", path); exit(EXIT_FAILURE); } if (strstr(line, "Uid:") == line) { sscanf(line, "Uid: %*d %d %*d %*d", &uid); return uid; } } } int main(int argc, char *argv[]) { int ns_fd, userns_fd, pid_userns_fd; int nstype; int next_fd; struct stat pid_stat; struct stat target_stat; char *pid_str; pid_t pid; char path[PATH_MAX]; if (argc < 2) { fprintf(stderr, "Usage: %s PID [ns-file]\n", argv[0]); fprintf(stderr, "\t'ns-file' is a /proc/PID/ns/xxxx file; " "if omitted, use the namespace\n" "\treferred to by standard input " "(file descriptor 0)\n"); exit(EXIT_FAILURE); } pid_str = argv[1]; pid = atoi(pid_str); if (argc <= 2) { ns_fd = STDIN_FILENO; } else { ns_fd = open(argv[2], O_RDONLY); if (ns_fd == -1) errExit("open-ns-file"); } /* Get the relevant user namespace FD, which is 'ns_fd' if 'ns_fd' refers to a user namespace, otherwise the user namespace that owns 'ns_fd' */ nstype = ioctl(ns_fd, NS_GET_NSTYPE); if (nstype == -1) errExit("ioctl-NS_GET_NSTYPE"); if (nstype == CLONE_NEWUSER) { userns_fd = ns_fd; } else { userns_fd = ioctl(ns_fd, NS_GET_USERNS); if (userns_fd == -1) errExit("ioctl-NS_GET_USERNS"); } /* Obtain 'stat' info for the user namespace of the specified PID */ snprintf(path, sizeof(path), "/proc/%s/ns/user", pid_str); pid_userns_fd = open(path, O_RDONLY); if (pid_userns_fd == -1) errExit("open-PID"); if (fstat(pid_userns_fd, &pid_stat) == -1) errExit("fstat-PID"); /* Get 'stat' info for the target user namesapce */ if (fstat(userns_fd, &target_stat) == -1) errExit("fstat-PID"); /* If the PID is in the target user namespace, then it has whatever capabilities are in its sets. */ if (pid_stat.st_dev == target_stat.st_dev && pid_stat.st_ino == target_stat.st_ino) { printf("PID is in target namespace\n"); printf("Subject to LSM checks, it has the following capabilities\n"); show_cap(pid); exit(EXIT_SUCCESS); } /* Otherwise, we need to walk through the ancestors of the target user namespace to see if PID is in an ancestor namespace */ for (;;) { int f; next_fd = ioctl(userns_fd, NS_GET_PARENT); if (next_fd == -1) { /* The error here should be EPERM... */ if (errno != EPERM) errExit("ioctl-NS_GET_PARENT"); printf("PID is not in an ancestor namespace\n"); printf("It has no capabilities in the target namespace\n"); exit(EXIT_SUCCESS); } if (fstat(next_fd, &target_stat) == -1) errExit("fstat-PID"); /* If the 'stat' info for this user namespace matches the 'stat' * info for 'next_fd', then the PID is in an ancestor namespace */ if (pid_stat.st_dev == target_stat.st_dev && pid_stat.st_ino == target_stat.st_ino) break; /* Next time round, get the next parent */ f = userns_fd; userns_fd = next_fd; close(f); } /* At this point, we found that PID is in an ancestor of the target user namespace, and 'userns_fd' refers to the immediate descendant user namespace of PID in the chain of user namespaces from PID to the target user namespace. If the effective UID of PID matches the owner UID of descendant user namespace, then PID has all capabilities in the descendant namespace(s); otherwise, it just has the capabilities that are in its sets. */ uid_t owner_uid, uid; if (ioctl(userns_fd, NS_GET_OWNER_UID, &owner_uid) == -1) { perror("ioctl-NS_GET_OWNER_UID"); exit(EXIT_FAILURE); } uid = get_euid_of_process(pid); printf("PID is in an ancestor namespace\n"); if (owner_uid == uid) { printf("And its effective UID matches the owner " "of the namespace\n"); printf("Subject to LSM checks, PID has all capabilities in " "that namespace!\n"); } else { printf("But its effective UID does not match the owner " "of the namespace\n"); printf("Subject to LSM checks, it has the following capabilities\n"); show_cap(pid); } exit(EXIT_SUCCESS); } 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- Michael Kerrisk (2): nsfs: Add an ioctl() to return the namespace type nsfs: Add an ioctl() to return owner UID of a userns fs/nsfs.c | 13 +++++++++++++ include/uapi/linux/nsfs.h | 9 +++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) commit d95fa3c76a66b6d76b1e109ea505c55e66360f3c Author: Michael Kerrisk (man-pages) Date: Wed Jan 25 14:04:15 2017 +1300 nsfs: Add an ioctl() to return owner UID of a userns I'd like to write code that discovers the user namespace hierarchy on a running system, and also shows who owns the various user namespaces. Currently, there is no way of getting the owner UID of a user namespace. Therefore, this patch adds a new NS_GET_CREATOR_UID ioctl() that fetches the UID (as seen in the user namespace of the caller) of the creator of the user namespace referred to by the specified file descriptor. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. If the owner UID does not have a mapping in the caller's user namespace return the overflow UID as that appears easier to deal with in practice in user-space applications. -- EWB Changed the handling of unmapped UIDs from -EOVERFLOW back to the overflow uid. Per conversation with Michael Kerrisk after examining his test code. Acked-by: Andrey Vagin Signed-off-by: Michael Kerrisk Signed-off-by: Eric W. Biederman fs/nsfs.c | 11 +++++++++++ include/uapi/linux/nsfs.h | 8 +++++--- 2 files changed, 16 insertions(+), 3 deletions(-) commit 0cacba6cf8252438f8166bd3fa1c3370dd28a769 Author: Omar Sandoval Date: Thu Feb 2 15:42:39 2017 -0800 blk-mq-sched: bypass the scheduler for flushes entirely There's a weird inconsistency that flushes are mostly hidden from the scheduler, but it needs to be aware of them in ->insert_requests(). Instead of having every scheduler call blk_mq_sched_bypass_insert(), let's do it in the common framework. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 25 +++++++++++++++++++++++-- block/blk-mq-sched.h | 1 - block/mq-deadline.c | 3 --- 3 files changed, 23 insertions(+), 6 deletions(-) commit e17354961bb50931ec7b33f59c0713dcf98ac7d2 Author: Jens Axboe Date: Thu Feb 2 16:53:07 2017 -0700 zram_drv: update for backing dev info changes A previous commit made the bdi embedded in the request queue a pointer, but neglected to fixup zram. Fix it up. Fixes: dc3b17cc8bf ("block: Use pointer to backing_dev_info from request_queue") Reported-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eda43000064a69a39fb7869cc63c9571535ad29 Author: Darrick J. Wong Date: Thu Feb 2 15:14:02 2017 -0800 xfs: mark speculative prealloc CoW fork extents unwritten Christoph Hellwig pointed out that there's a potentially nasty race when performing simultaneous nearby directio cow writes: "Thread 1 writes a range from B to c " B --------- C p "a little later thread 2 writes from A to B " A --------- B p [editor's note: the 'p' denote cowextsize boundaries, which I added to make this more clear] "but the code preallocates beyond B into the range where thread "1 has just written, but ->end_io hasn't been called yet. "But once ->end_io is called thread 2 has already allocated "up to the extent size hint into the write range of thread 1, "so the end_io handler will splice the unintialized blocks from "that preallocation back into the file right after B." We can avoid this race by ensuring that thread 1 cannot accidentally remap the blocks that thread 2 allocated (as part of speculative preallocation) as part of t2's write preparation in t1's end_io handler. The way we make this happen is by taking advantage of the unwritten extent flag as an intermediate step. Recall that when we begin the process of writing data to shared blocks, we create a delayed allocation extent in the CoW fork: D: --RRRRRRSSSRRRRRRRR--- C: ------DDDDDDD--------- When a thread prepares to CoW some dirty data out to disk, it will now convert the delalloc reservation into an /unwritten/ allocated extent in the cow fork. The da conversion code tries to opportunistically allocate as much of a (speculatively prealloc'd) extent as possible, so we may end up allocating a larger extent than we're actually writing out: D: --RRRRRRSSSRRRRRRRR--- U: ------UUUUUUU--------- Next, we convert only the part of the extent that we're actively planning to write to normal (i.e. not unwritten) status: D: --RRRRRRSSSRRRRRRRR--- U: ------UURRUUU--------- If the write succeeds, the end_cow function will now scan the relevant range of the CoW fork for real extents and remap only the real extents into the data fork: D: --RRRRRRRRSRRRRRRRR--- U: ------UU--UUU--------- This ensures that we never obliterate valid data fork extents with unwritten blocks from the CoW fork. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_aops.c | 6 +++ fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_reflink.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++---- fs/xfs/xfs_reflink.h | 2 + fs/xfs/xfs_trace.h | 8 +++- 5 files changed, 123 insertions(+), 11 deletions(-) commit 05a630d76bd3f39baf0eecfa305bed2820796dee Author: Darrick J. Wong Date: Thu Feb 2 15:14:01 2017 -0800 xfs: allow unwritten extents in the CoW fork In the data fork, we only allow extents to perform the following state transitions: delay -> real <-> unwritten There's no way to move directly from a delalloc reservation to an /unwritten/ allocated extent. However, for the CoW fork we want to be able to do the following to each extent: delalloc -> unwritten -> written -> remapped to data fork This will help us to avoid a race in the speculative CoW preallocation code between a first thread that is allocating a CoW extent and a second thread that is remapping part of a file after a write. In order to do this, however, we need two things: first, we have to be able to transition from da to unwritten, and second the function that converts between real and unwritten has to be made aware of the cow fork. Do both of those things. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 80 ++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 30 deletions(-) commit de14c5f541e78c59006bee56f6c5c2ef1ca07272 Author: Darrick J. Wong Date: Thu Feb 2 15:14:00 2017 -0800 xfs: verify free block header fields Perform basic sanity checking of the directory free block header fields so that we avoid hanging the system on invalid data. (Granted that just means that now we shutdown on directory write, but that seems better than hanging...) Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_dir2_node.c | 51 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) commit b3bf607d58520ea8c0666aeb4be60dbb724cd3a2 Author: Darrick J. Wong Date: Thu Feb 2 15:13:59 2017 -0800 xfs: check for obviously bad level values in the bmbt root We can't handle a bmbt that's taller than BTREE_MAXLEVELS, and there's no such thing as a zero-level bmbt (for that we have extents format), so if we see this, send back an error code. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_fork.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d5a91baeb6033c3392121e4d5c011cdc08dfa9f7 Author: Darrick J. Wong Date: Thu Feb 2 15:13:58 2017 -0800 xfs: filter out obviously bad btree pointers Don't let anybody load an obviously bad btree pointer. Since the values come from disk, we must return an error, not just ASSERT. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen fs/xfs/libxfs/xfs_bmap.c | 5 +---- fs/xfs/libxfs/xfs_btree.c | 3 ++- fs/xfs/libxfs/xfs_btree.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit 7a652bbe366464267190c2792a32ce4fff5595ef Author: Darrick J. Wong Date: Thu Feb 2 15:13:58 2017 -0800 xfs: fail _dir_open when readahead fails When we open a directory, we try to readahead block 0 of the directory on the assumption that we're going to need it soon. If the bmbt is corrupt, the directory will never be usable and the readahead fails immediately, so we might as well prevent the directory from being opened at all. This prevents a subsequent read or modify operation from hitting it and taking the fs offline. NOTE: We're only checking for early failures in the block mapping, not the readahead directory block itself. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_da_btree.c | 6 ++---- fs/xfs/libxfs/xfs_da_btree.h | 2 +- fs/xfs/xfs_file.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) commit 4b5bd5bf3fb182dc504b1b64e0331300f156e756 Author: Darrick J. Wong Date: Thu Feb 2 15:13:57 2017 -0800 xfs: fix toctou race when locking an inode to access the data map We use di_format and if_flags to decide whether we're grabbing the ilock in btree mode (btree extents not loaded) or shared mode (anything else), but the state of those fields can be changed by other threads that are also trying to load the btree extents -- IFEXTENTS gets set before the _bmap_read_extents call and cleared if it fails. We don't actually need to have IFEXTENTS set until after the bmbt records are successfully loaded and validated, which will fix the race between multiple threads trying to read the same directory. The next patch strengthens directory bmbt validation by refusing to open the directory if reading the bmbt to start directory readahead fails. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_fork.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1f3d62090d3ba4d0c14e5271be87812fc577b197 Author: Arnd Bergmann Date: Wed Feb 1 17:46:02 2017 +0100 xgene_enet: remove bogus forward declarations The device match tables for both the xgene_enet driver and its phy driver have forward declarations that declare an array without a length, leading to a clang warning when they are not followed by an actual defitinition: drivers/net/ethernet/apm/xgene/../../../phy/mdio-xgene.h:135:34: warning: tentative array definition assumed to have one element drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning: tentative array definition assumed to have one element The declarations for the mdio driver are even in a header file, so they cause duplicate definitions of the tables for each file that includes them. This removes all four forward declarations and moves the actual definitions up a little, so they are in front of their first user. For the OF match tables, this means having to remove the #ifdef around them, and passing the actual structure into of_match_device(). This has no effect on the generated object code though, as the of_match_device function has an empty stub that does not evaluate its argument, and the symbol gets dropped either way. Fixes: 43b3cf6634a4 ("drivers: net: phy: xgene: Add MDIO driver") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 50 ++++++++++++------------ drivers/net/phy/mdio-xgene.c | 50 ++++++++++++------------ drivers/net/phy/mdio-xgene.h | 4 -- 3 files changed, 48 insertions(+), 56 deletions(-) commit e2160156bf2a7d5018e99a9993fbcdda0abac09b Merge: 62e1309 6d04dfc Author: David S. Miller Date: Thu Feb 2 16:54:00 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net All merge conflicts were simple overlapping changes. Signed-off-by: David S. Miller commit a45463cbf3f9dcdae683033c256f50bded513d6a Author: Arnd Bergmann Date: Wed Feb 1 18:01:17 2017 +0100 workqueue: avoid clang warning Building with clang shows lots of warning like: drivers/amba/bus.c:447:8: warning: implicit conversion from 'long long' to 'int' changes value from 4294967248 to -48 [-Wconstant-conversion] static DECLARE_DELAYED_WORK(deferred_retry_work, amba_deferred_retry_func); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/workqueue.h:187:26: note: expanded from macro 'DECLARE_DELAYED_WORK' struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/workqueue.h:177:10: note: expanded from macro '__DELAYED_WORK_INITIALIZER' .work = __WORK_INITIALIZER((n).work, (f)), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/workqueue.h:170:10: note: expanded from macro '__WORK_INITIALIZER' .data = WORK_DATA_STATIC_INIT(), \ ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/workqueue.h:111:39: note: expanded from macro 'WORK_DATA_STATIC_INIT' ATOMIC_LONG_INIT(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ include/asm-generic/atomic-long.h:32:41: note: expanded from macro 'ATOMIC_LONG_INIT' #define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i) ~~~~~~~~~~~~^~ arch/arm/include/asm/atomic.h:21:27: note: expanded from macro 'ATOMIC_INIT' #define ATOMIC_INIT(i) { (i) } ~ ^ This makes the type cast explicit, which shuts up the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo include/linux/workqueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99743ae4c5f52f8f8ceb17783056fcc9b4f8b64c Merge: 18566ac 8226036 Author: Dave Airlie Date: Fri Feb 3 05:41:58 2017 +1000 Merge branch 'drm-etnaviv-next' of https://git.pengutronix.de/git/lst/linux into drm-next It includes code cleanups from Bhumika and Liviu, a significant shader performance fix and additions to the cmdstream validator from Wladimir and the addition of a cmdbuf suballocator by myself. The suballocator improves performance on all chips by reducing the CPU overhead of the kernel driver and side steps the GC3000 FE MMU flush erratum, now making the workarounds in IOVA allocation we had before unnecessary, which results in a nice cleanup of the code in that area. * 'drm-etnaviv-next' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: Remove duplicate header file include Revert "drm/etnaviv: trick drm_mm into giving out a low IOVA" drm/etnaviv: add cmdbuf suballocator drm/etnaviv: get cmdbuf physical address through the cmdbuf abstraction drm/etnaviv: wire up iova handling in new cmdbuf abstraction drm/etnaviv: move cmdbuf de-/allocation into own file drm/etnaviv: always flush MMU TLBs on map/unmap drm/etnaviv: constify etnaviv_iommu_ops structures drm/etnaviv: set up initial PULSE_EATER register drm/etnaviv: add new GC3000 sensitive states commit 7e6328fd1f84f366b4cc17dc757025f485139f1a Author: Gabriel Krisman Bertazi Date: Thu Feb 2 17:39:00 2017 -0200 drm: Fix build when FBDEV_EMULATION is disabled Commit be7f735cd5ea ("drm: Rely on mode_config data for fb_helper initialization") broke the build when CONFIG_DRM_FBDEV_EMULATION is disabled because it didn't update the prototype for drm_fb_helper_init in that case. Fixes: be7f735cd5ea ("drm: Rely on mode_config data for fb_helper initialization") Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202193900.22075-1-krisman@collabora.co.uk include/drm/drm_fb_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63f1ca59453aadae81f702840c7ac6ea8b9f9262 Merge: 576dd46 7896dfb Author: Tejun Heo Date: Thu Feb 2 13:50:35 2017 -0500 Merge branch 'cgroup/for-4.11-rdmacg' into cgroup/for-4.11 Merge in to resolve conflicts in Documentation/cgroup-v2.txt. The conflicts are from multiple section additions and trivial to resolve. Signed-off-by: Tejun Heo commit d7d29553d6a8a18dc3a5038ef8d8f346c6b6dc94 Author: Christian König Date: Mon Jan 30 10:24:13 2017 +0100 drm/amdgpu: stop reserving a shared fence for VA updates We don't add any fences do the buffer, but just use it's address. Additional to that we don't need a duplicates list here. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2ffdaafb5d5f37bf66da1b775333a7abc2b69563 Author: Christian König Date: Fri Jan 27 15:58:43 2017 +0100 drm/amdgpu: fix race in GEM VA map IOCTL v2 Somebody could try to free the bo_va between mapping and updating it. v2: fix typos in comment Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 47 +++++++++++---------------------- 1 file changed, 15 insertions(+), 32 deletions(-) commit 576dd464505fc53d501bb94569db76f220104d28 Author: Tejun Heo Date: Fri Jan 20 11:29:54 2017 -0500 cgroup: drop the matching uid requirement on migration for cgroup v2 Along with the write access to the cgroup.procs or tasks file, cgroup has required the writer's euid, unless root, to match [s]uid of the target process or task. On cgroup v1, this is necessary because there's nothing preventing a delegatee from pulling in tasks or processes from all over the system. If a user has a cgroup subdirectory delegated to it, the user would have write access to the cgroup.procs or tasks file. If there are no further checks than file write access check, the user would be able to pull processes from all over the system into its subhierarchy which is clearly not the intended behavior. The matching [s]uid requirement partially prevents this problem by allowing a delegatee to pull in the processes that belongs to it. This isn't a sufficient protection however, because a user would still be able to jump processes across two disjoint sub-hierarchies that has been delegated to them. cgroup v2 resolves the issue by requiring the writer to have access to the common ancestor of the cgroup.procs file of the source and target cgroups. This confines each delegatee to their own sub-hierarchy proper and bases all permission decisions on the cgroup filesystem rather than having to pull in explicit uid matching. cgroup v2 has still been applying the matching [s]uid requirement just for historical reasons. On cgroup2, the requirement doesn't serve any purpose while unnecessarily complicating the permission model. Let's drop it. Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 12 +++++------- kernel/cgroup/cgroup.c | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-) commit 968ebff1efde6948564308836ecf1ef57de4e106 Author: Tejun Heo Date: Sun Jan 29 14:35:20 2017 -0500 cgroup, perf_event: make perf_event controller work on cgroup2 hierarchy perf_event is a utility controller whose primary role is identifying cgroup membership to filter perf events; however, because it also tracks some per-css state, it can't be replaced by pure cgroup membership test. Mark the controller as implicitly enabled on the default hierarchy so that perf events can always be filtered based on cgroup v2 path as long as the controller is not mounted on a legacy hierarchy. "perf record" is updated accordingly so that it searches for both v1 and v2 hierarchies. A v1 hierarchy is used if perf_event is mounted on it; otherwise, it uses the v2 hierarchy. v2: Doc updated to reflect more flexible rebinding behavior. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Documentation/cgroup-v2.txt | 12 ++++++++++++ kernel/events/core.c | 6 ++++++ tools/perf/util/cgroup.c | 26 +++++++++++++++++++------- 3 files changed, 37 insertions(+), 7 deletions(-) commit 965861d66fad6ce07bd5c5ecbe6514bc50b8fc11 Author: Mark Rutland Date: Thu Feb 2 17:32:15 2017 +0000 arm64: ensure __raw_read_system_reg() is self-consistent We recently discovered that __raw_read_system_reg() erroneously mapped sysreg IDs to the wrong registers. To ensure that we don't get hit by a similar issue in future, this patch makes __raw_read_system_reg() use a macro for each case statement, ensuring that each case reads the correct register. To ensure that this patch hasn't introduced an issue, I've binary-diffed the object files before and after this patch. No code or data sections differ (though some debug section differ due to line numbering changing). Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 64 ++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 7d0928f18bf890d2853281f59aba0dd5a46b34f9 Author: Mark Rutland Date: Thu Feb 2 17:32:14 2017 +0000 arm64: fix erroneous __raw_read_system_reg() cases Since it was introduced in commit da8d02d19ffdd201 ("arm64/capabilities: Make use of system wide safe value"), __raw_read_system_reg() has erroneously mapped some sysreg IDs to other registers. For the fields in ID_ISAR5_EL1, our local feature detection will be erroneous. We may spuriously detect that a feature is uniformly supported, or may fail to detect when it actually is, meaning some compat hwcaps may be erroneous (or not enforced upon hotplug). This patch corrects the erroneous entries. Signed-off-by: Mark Rutland Fixes: da8d02d19ffdd201 ("arm64/capabilities: Make use of system wide safe value") Reported-by: Catalin Marinas Cc: Suzuki K Poulose Cc: Will Deacon Cc: stable@vger.kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f85279b4bd481a1a0697c1d2a8a5f15de216b120 Author: Will Deacon Date: Thu Sep 22 11:35:43 2016 +0100 arm64: KVM: Save/restore the host SPE state when entering/leaving a VM The SPE buffer is virtually addressed, using the page tables of the CPU MMU. Unusually, this means that the EL0/1 page table may be live whilst we're executing at EL2 on non-VHE configurations. When VHE is in use, we can use the same property to profile the guest behind its back. This patch adds the relevant disabling and flushing code to KVM so that the host can make use of SPE without corrupting guest memory, and any attempts by a guest to use SPE will result in a trap. Acked-by: Marc Zyngier Cc: Alex Bennée Cc: Christoffer Dall Signed-off-by: Will Deacon arch/arm64/include/asm/kvm_arm.h | 3 ++ arch/arm64/include/asm/kvm_host.h | 7 ++++- arch/arm64/kvm/debug.c | 6 ++++ arch/arm64/kvm/hyp/debug-sr.c | 66 +++++++++++++++++++++++++++++++++++++-- arch/arm64/kvm/hyp/switch.c | 17 +++++++++- 5 files changed, 95 insertions(+), 4 deletions(-) commit 3d29a9a0f88300b7ccb642ebee61b331ef0a8c27 Author: Dmitry Torokhov Date: Wed Feb 1 15:01:05 2017 -0800 arm64: make use of for_each_node_by_type() Instead of open-coding the loop, let's use canned macro. Signed-off-by: Dmitry Torokhov Signed-off-by: Will Deacon arch/arm64/kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4563f6ba71792c77aeccb2092cc23149b44e642 Author: Gabriel Krisman Bertazi Date: Thu Feb 2 14:26:40 2017 -0200 drm: Rely on mode_config data for fb_helper initialization Instead of receiving the num_crts as a parameter, we can read it directly from the mode_config structure. I audited the drivers that invoke this helper and I believe all of them initialize the mode_config struct accordingly, prior to calling the fb_helper. I used the following coccinelle hack to make this transformation, except for the function headers and comment updates. The first and second rules are split because I couldn't find a way to remove the unused temporary variables at the same time I removed the parameter. // @r@ expression A,B,D,E; identifier C; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ expression A,B,C,D,E; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ identifier r.C; type T; expression V; @@ - T C; <... when != C - C = V; ...> // Changes since v1: - Rebased on top of the tip of drm-misc-next. - Remove mention to sti since a proper fix got merged. Suggested-by: Daniel Vetter Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/arc/arcpgu_drv.c | 3 +-- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/ast/ast_fb.c | 3 +-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 - drivers/gpu/drm/bochs/bochs_fbdev.c | 3 +-- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_cma_helper.c | 15 +++++++-------- drivers/gpu/drm/drm_fb_helper.c | 10 +++++----- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 5 +---- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 3 +-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +-- drivers/gpu/drm/i915/intel_fbdev.c | 3 +-- drivers/gpu/drm/imx/imx-drm-core.c | 3 +-- drivers/gpu/drm/meson/meson_drv.c | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 2 +- drivers/gpu/drm/msm/msm_fbdev.c | 3 +-- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 +-- drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 +-- drivers/gpu/drm/qxl/qxl_fb.c | 1 - drivers/gpu/drm/radeon/radeon_fb.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 5 +---- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 4 +--- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +-- drivers/gpu/drm/udl/udl_fb.c | 3 +-- drivers/gpu/drm/vc4/vc4_kms.c | 1 - drivers/gpu/drm/virtio/virtgpu_fb.c | 1 - drivers/gpu/drm/zte/zx_drm_drv.c | 2 +- include/drm/drm_fb_cma_helper.h | 7 +++---- include/drm/drm_fb_helper.h | 3 +-- 38 files changed, 43 insertions(+), 73 deletions(-) commit b343d77b94b6702082f4f402e1492e71ef87095b Author: Marek Szyprowski Date: Mon Jan 30 13:38:22 2017 +0100 soc: samsung: pmu: Add register defines for pad retention control Add PMU defines related to pad retention control. Will be later used by the Exynos pin controller driver. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski include/linux/soc/samsung/exynos-regs-pmu.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6629490aa027a8af3160e63cffcddc97c1602c96 Author: Vivek Gautam Date: Wed Jan 18 12:02:53 2017 +0530 arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost Adding fixed voltage regulators for Vbus and Vbus-boost required by USB 3.0 DRD controller on Exynos7-espresso board. Signed-off-by: Vivek Gautam Signed-off-by: Pankaj Dubey Reviewed-by: Javier Martinez Canillas Reviewed-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit ad6afec832a77845a9a0f9353fe049225a976b16 Author: Vivek Gautam Date: Wed Jan 18 12:02:52 2017 +0530 arm64: dts: exynos: Add USB 3.0 controller node for Exynos7 Add USB 3.0 DRD controller device node, with its clock and phy information to enable the same on Exynos7. Signed-off-by: Vivek Gautam Signed-off-by: Pankaj Dubey Reviewed-by: Javier Martinez Canillas Reviewed-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7.dtsi | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 53225f638b100475984b9f227ce27385e6bb473e Author: Marcin Niestroj Date: Thu Feb 2 13:11:55 2017 +0100 ARM: dts: am335x-chiliboard: Support charger chiliBoard has a battery connector, so support charging battery through tps65217 chip. Additionally, enabling tps65217 charger allows us to get status of AC power. Signed-off-by: Marcin Niestroj Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-chiliboard.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 41f0e0670e527209cf6323c5a18961ee981b1a45 Author: Marcin Niestroj Date: Thu Feb 2 13:11:54 2017 +0100 ARM: dts: am335x-chiliboard: Support power button On chiliBoard power button is connected to TPS65217. It signals power button presses by asserting interrupt output and allows to read the state by i2c bus. Handle TPS65217 interrupts and enable notifications of power button presses. Signed-off-by: Marcin Niestroj Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-chiliboard.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6ac93117ab009d3901ed5d3d0f79056eb5fc0afd Author: Omar Sandoval Date: Tue Jan 31 14:53:22 2017 -0800 blktrace: use existing disk debugfs directory We may already have a directory to put the blktrace stuff in if 1. The disk uses blk-mq 2. CONFIG_BLK_DEBUG_FS is enabled 3. We are tracing the whole disk and not a partition Instead of hardcoding this very specific case, let's use the new debugfs_lookup(). If the directory exists, we use it, otherwise we create one and clean it up later. Fixes: 07e4fead45e6 ("blk-mq: create debugfs directory tree") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 62ebce16c0ac2ffac44e32f931a2d8f6e749be4c Author: Omar Sandoval Date: Tue Jan 31 14:53:21 2017 -0800 blk-mq: move debugfs_remove() of disk dir to blk_release_queue() This needs to happen after we tear down blktrace. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 2 +- block/blk-sysfs.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 18fbda91c6370d520278db9ee1e768b59ef5c4ab Author: Omar Sandoval Date: Tue Jan 31 14:53:20 2017 -0800 block: use same block debugfs directory for blk-mq and blktrace When I added the blk-mq debugging information to debugfs, I didn't notice that blktrace also creates a "block" directory in debugfs. Make them use the same dentry, now created in the core block code. Based on a patch from Jens. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 9 +++++++++ block/blk-mq-debugfs.c | 12 +++--------- block/blk-mq.c | 2 -- block/blk-mq.h | 5 ----- block/blk.h | 4 ++++ kernel/trace/blktrace.c | 18 +++++------------- 6 files changed, 21 insertions(+), 29 deletions(-) commit a428d314ebcf65842fd64ad850c02c280586e74d Author: Omar Sandoval Date: Tue Jan 31 14:53:19 2017 -0800 blktrace: make do_blk_trace_setup() static This isn't used outside of blktrace.c anymore. Fixes: 62c2a7d969f3 ("block: push BKL into blktrace ioctls") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe include/linux/blktrace_api.h | 4 ---- kernel/trace/blktrace.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 03796c149a99e14506db9de3adba710c26f83ba9 Author: Omar Sandoval Date: Tue Jan 31 14:53:18 2017 -0800 block: fix debugfs config conditional in struct request_queue The debugfs dentries are only used for CONFIG_BLK_DEBUG_FS, so make them conditional on that instead of CONFIG_DEBUG_FS. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7c5437b0bbec5165df6eb1efc5e37dc40b9e05d Author: Omar Sandoval Date: Tue Jan 31 14:53:17 2017 -0800 debugfs: add debugfs_lookup() We don't always have easy access to the dentry of a file or directory we created in debugfs. Add a helper which allows us to get a dentry we previously created. The motivation for this change is a problem with blktrace and the blk-mq debugfs entries introduced in 07e4fead45e6 ("blk-mq: create debugfs directory tree"). Namely, in some cases, the directory that blktrace needs to create may already exist, but in other cases, it may not. We _could_ rely on a bunch of implied knowledge to decide whether to create the directory or not, but it's much cleaner on our end to just look it up. Signed-off-by: Omar Sandoval Acked-by: Greg Kroah-Hartman Signed-off-by: Jens Axboe fs/debugfs/inode.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/debugfs.h | 8 ++++++++ 2 files changed, 44 insertions(+) commit 374a504025a0913d3d639cec7fbb46a5800fc447 Merge: fc28ab1 b1c01f4 Author: Takashi Iwai Date: Thu Feb 2 18:17:13 2017 +0100 Merge branch 'topic/intel-lpe-audio-dp' into for-next Merged more patches for Intel LPE audio driver, now to support DP audio. commit 51a2de551755c28c98191f80537acd3c7e1adda4 Author: Pankaj Dubey Date: Fri Jan 20 09:49:57 2017 +0530 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Pankaj Dubey Reviewed-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 4 +- arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 302 ++++++++++++------------ 2 files changed, 154 insertions(+), 152 deletions(-) commit 7633a727b040589e082d0600a6d5c79b7da189ca Merge: d1160eb 860ac88 Author: Krzysztof Kozlowski Date: Thu Feb 2 19:07:56 2017 +0200 Merge tag 'samsung-pinctrl-4.11' into next/dt64 Merge the pinctrl header before its usage. Defines for GPIO drive strengths on Exynos5433 and Exynos7, used in Device Tree sources. commit 860ac88abecab5d3d0e07306365f55cbc690c220 Author: Pankaj Dubey Date: Fri Jan 20 09:49:56 2017 +0530 pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions Exynos7 SoC pinctrl configurations are similar to existing Exynos4/5 except for FSYS1 pinctrl drive strengths. So adding Exynos7 specific FSYS1 blocks pinctrl driver strength related macros which will be used in Exynos7 DTSi files. Signed-off-by: Pankaj Dubey Reviewed-by: Alim Akhtar Acked-by: Sylwester Nawrocki Acked-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski include/dt-bindings/pinctrl/samsung.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1c83a9aab807f7452c4957b2401e1cbf43941820 Author: Jason A. Donenfeld Date: Thu Feb 2 11:52:14 2017 -0500 ext4: move halfmd4 into hash.c directly The "half md4" transform should not be used by any new code. And fortunately, it's only used now by ext4. Since ext4 supports several hashing methods, at some point it might be desirable to move to something like SipHash. As an intermediate step, remove half md4 from cryptohash.h and lib, and make it just a local function in ext4's hash.c. There's precedent for doing this; the other function ext can use for its hashes -- TEA -- is also implemented in the same place. Also, by being a local function, this might allow gcc to perform some additional optimizations. Signed-off-by: Jason A. Donenfeld Reviewed-by: Andreas Dilger Cc: Theodore Ts'o Signed-off-by: Theodore Ts'o fs/ext4/hash.c | 71 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/cryptohash.h | 2 -- lib/Makefile | 2 +- lib/halfmd4.c | 67 ------------------------------------------- 4 files changed, 71 insertions(+), 71 deletions(-) commit 7a1ca76dba35d1a443278811fb67625f0e98a713 Author: Paul Gortmaker Date: Thu Feb 2 09:52:12 2017 -0500 reset: make zx2967 explicitly non-modular The Kconfig currently controlling compilation of this code is: config RESET_ZX2967 bool "ZTE ZX2967 Reset Driver ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since builtin_platform_driver() was already in use, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file does not appear to use __init prefix anywhere. Cc: Jun Nie Signed-off-by: Paul Gortmaker Reviewed-by: Baoyou Xie Signed-off-by: Philipp Zabel drivers/reset/reset-zx2967.c | 7 ------- 1 file changed, 7 deletions(-) commit 0dba1314d4f81115dce711292ec7981d17231064 Author: Dan Williams Date: Wed Feb 1 14:05:23 2017 -0800 scsi, block: fix duplicate bdi name registration crashes Warnings of the following form occur because scsi reuses a devt number while the block layer still has it referenced as the name of the bdi [1]: WARNING: CPU: 1 PID: 93 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80 sysfs: cannot create duplicate filename '/devices/virtual/bdi/8:192' [..] Call Trace: dump_stack+0x86/0xc3 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 ? kernfs_path_from_node+0x4f/0x60 sysfs_warn_dup+0x62/0x80 sysfs_create_dir_ns+0x77/0x90 kobject_add_internal+0xb2/0x350 kobject_add+0x75/0xd0 device_add+0x15a/0x650 device_create_groups_vargs+0xe0/0xf0 device_create_vargs+0x1c/0x20 bdi_register+0x90/0x240 ? lockdep_init_map+0x57/0x200 bdi_register_owner+0x36/0x60 device_add_disk+0x1bb/0x4e0 ? __pm_runtime_use_autosuspend+0x5c/0x70 sd_probe_async+0x10d/0x1c0 async_run_entry_fn+0x39/0x170 This is a brute-force fix to pass the devt release information from sd_probe() to the locations where we register the bdi, device_add_disk(), and unregister the bdi, blk_cleanup_queue(). Thanks to Omar for the quick reproducer script [2]. This patch survives where an unmodified kernel fails in a few seconds. [1]: https://marc.info/?l=linux-scsi&m=147116857810716&w=4 [2]: http://marc.info/?l=linux-block&m=148554717109098&w=2 Cc: James Bottomley Cc: Bart Van Assche Cc: "Martin K. Petersen" Cc: Jan Kara Reported-by: Omar Sandoval Tested-by: Omar Sandoval Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 1 + block/genhd.c | 21 +++++++++++++++++++++ drivers/scsi/sd.c | 41 +++++++++++++++++++++++++++++++++-------- include/linux/blkdev.h | 1 + include/linux/genhd.h | 8 ++++++++ 5 files changed, 64 insertions(+), 8 deletions(-) commit efa7c9f97e3ef624e9a398bf69c15f58eea9f0e8 Author: Jan Kara Date: Thu Feb 2 15:56:53 2017 +0100 block: Get rid of blk_get_backing_dev_info() blk_get_backing_dev_info() is now a simple dereference. Remove that function and simplify some code around that. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/blk-core.c | 14 -------------- block/compat_ioctl.c | 7 ++----- block/ioctl.c | 7 ++----- fs/btrfs/disk-io.c | 2 +- fs/btrfs/volumes.c | 2 +- fs/xfs/xfs_buf.c | 3 +-- fs/xfs/xfs_buf.h | 1 - include/linux/backing-dev.h | 2 +- include/linux/blkdev.h | 1 - 9 files changed, 8 insertions(+), 31 deletions(-) commit b1d2dc5659b41741f5a29b2ade76ffb4e5bb13d8 Author: Jan Kara Date: Thu Feb 2 15:56:52 2017 +0100 block: Make blk_get_backing_dev_info() safe without open bdev Currenly blk_get_backing_dev_info() is not safe to be called when the block device is not open as bdev->bd_disk is NULL in that case. However inode_to_bdi() uses this function and may be call called from flusher worker or other writeback related functions without bdev being open which leads to crashes such as: [113031.075540] Unable to handle kernel paging request for data at address 0x00000000 [113031.075614] Faulting instruction address: 0xc0000000003692e0 0:mon> t [c0000000fb65f900] c00000000036cb6c writeback_sb_inodes+0x30c/0x590 [c0000000fb65fa10] c00000000036ced4 __writeback_inodes_wb+0xe4/0x150 [c0000000fb65fa70] c00000000036d33c wb_writeback+0x30c/0x450 [c0000000fb65fb40] c00000000036e198 wb_workfn+0x268/0x580 [c0000000fb65fc50] c0000000000f3470 process_one_work+0x1e0/0x590 [c0000000fb65fce0] c0000000000f38c8 worker_thread+0xa8/0x660 [c0000000fb65fd80] c0000000000fc4b0 kthread+0x110/0x130 [c0000000fb65fe30] c0000000000098f0 ret_from_kernel_thread+0x5c/0x6c Signed-off-by: Jens Axboe block/blk-core.c | 8 +++----- fs/block_dev.c | 7 +++++++ include/linux/fs.h | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) commit d03f6cdc1fc422accb734c7c07a661a0018d8631 Author: Jan Kara Date: Thu Feb 2 15:56:51 2017 +0100 block: Dynamically allocate and refcount backing_dev_info Instead of storing backing_dev_info inside struct request_queue, allocate it dynamically, reference count it, and free it when the last reference is dropped. Currently only request_queue holds the reference but in the following patch we add other users referencing backing_dev_info. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/blk-core.c | 12 +++++------- block/blk-sysfs.c | 2 +- include/linux/backing-dev-defs.h | 2 ++ include/linux/backing-dev.h | 10 +++++++++- include/linux/blkdev.h | 1 - mm/backing-dev.c | 34 +++++++++++++++++++++++++++++++++- 6 files changed, 50 insertions(+), 11 deletions(-) commit dc3b17cc8bf21307c7e076e7c778d5db756f7871 Author: Jan Kara Date: Thu Feb 2 15:56:50 2017 +0100 block: Use pointer to backing_dev_info from request_queue We will want to have struct backing_dev_info allocated separately from struct request_queue. As the first step add pointer to backing_dev_info to request_queue and convert all users touching it. No functional changes in this patch. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/blk-cgroup.c | 6 +++--- block/blk-core.c | 27 ++++++++++++++------------- block/blk-integrity.c | 4 ++-- block/blk-settings.c | 2 +- block/blk-sysfs.c | 8 ++++---- block/blk-wbt.c | 8 ++++---- block/genhd.c | 2 +- drivers/block/aoe/aoeblk.c | 4 ++-- drivers/block/drbd/drbd_main.c | 6 +++--- drivers/block/drbd/drbd_nl.c | 12 +++++++----- drivers/block/drbd/drbd_proc.c | 2 +- drivers/block/drbd/drbd_req.c | 2 +- drivers/block/pktcdvd.c | 4 ++-- drivers/block/rbd.c | 2 +- drivers/md/bcache/request.c | 10 +++++----- drivers/md/bcache/super.c | 8 ++++---- drivers/md/dm-cache-target.c | 2 +- drivers/md/dm-era-target.c | 2 +- drivers/md/dm-table.c | 2 +- drivers/md/dm-thin.c | 2 +- drivers/md/dm.c | 6 +++--- drivers/md/linear.c | 2 +- drivers/md/md.c | 6 +++--- drivers/md/multipath.c | 2 +- drivers/md/raid0.c | 6 +++--- drivers/md/raid1.c | 4 ++-- drivers/md/raid10.c | 10 +++++----- drivers/md/raid5.c | 12 ++++++------ fs/gfs2/ops_fstype.c | 2 +- fs/nilfs2/super.c | 2 +- fs/super.c | 2 +- include/linux/blkdev.h | 3 ++- mm/page-writeback.c | 4 ++-- 33 files changed, 90 insertions(+), 86 deletions(-) commit f44f1ab5a2dcd4e16eab850fd08e40ff2d0c28d4 Author: Jan Kara Date: Thu Feb 2 15:56:49 2017 +0100 block: Unhash block device inodes on gendisk destruction Currently, block device inodes stay around after corresponding gendisk hash died until memory reclaim finds them and frees them. Since we will make block device inode pin the bdi, we want to free the block device inode as soon as the device goes away so that bdi does not stay around unnecessarily. Furthermore we need to avoid issues when new device with the same major,minor pair gets created since reusing the bdi structure would be rather difficult in this case. Unhashing block device inode on gendisk destruction nicely deals with these problems. Once last block device inode reference is dropped (which may be directly in del_gendisk()), the inode gets evicted. Furthermore if the major,minor pair gets reallocated, we are guaranteed to get new block device inode even if old block device inode is not yet evicted and thus we avoid issues with possible reuse of bdi. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/genhd.c | 2 ++ fs/block_dev.c | 15 +++++++++++++++ include/linux/fs.h | 1 + 3 files changed, 18 insertions(+) commit 814f91bf3ea0962e4f802324766bf301ef6f5431 Author: James Hogan Date: Thu Feb 2 01:21:35 2017 +0000 MIPS: Move pgd_alloc() out of header pgd_alloc() references init_mm which is not exported to modules. In order for KVM to be able to use pgd_alloc() to allocate GVA page tables, move pgd_alloc() into a new pgtable.c file and export it to modules. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/pgalloc.h | 16 +--------------- arch/mips/mm/Makefile | 2 +- arch/mips/mm/pgtable.c | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 16 deletions(-) commit f30c92576af4bb155d26429540aae95e0a256ce2 Author: Chris Wilson Date: Thu Feb 2 09:36:32 2017 +0000 drm: Provide a driver hook for drm_dev_release() Some state is coupled into the device lifetime outside of the load/unload timeframe and requires teardown during final unreference from drm_dev_release(). For example, dmabufs hold both a device and module reference and may live longer than expected (i.e. the current pattern of the driver tearing down its state and then releasing a reference to the drm device) and yet touch driver private state when destroyed. v2: Export drm_dev_fini() and move the responsibility for finalizing the drm_device and freeing it to the release callback. (If no callback is provided, the core will call drm_dev_fini() and kfree(dev) as before.) v3: Remember to add drm_dev_fini() to drm_drv.h v4: Tidy language for kerneldoc v5: Cross reference from drm_dev_init() to note that driver->release() allows for arbitrary embedding. v6: Refer to driver data rather than driver state, as state is now becoming associated with the struct drm_atomic_state and friends. Signed-off-by: Chris Wilson Cc: Laurent Pinchart Cc: Daniel Vetter Reviewed-by: Laurent Pinchart [danvet: Use the proper reference for struct members, which is &drm_driver.release.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202093632.31017-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_drv.c | 65 ++++++++++++++++++++++++++++++++--------------- include/drm/drm_drv.h | 13 ++++++++++ 2 files changed, 58 insertions(+), 20 deletions(-) commit 8aaacbc0e5c729baa1dbae26f77755c96a23096e Author: Neil Armstrong Date: Thu Feb 2 10:47:44 2017 +0100 drm: meson: rename driver name to meson-drm The platform driver name is currently "meson" which can lead to some confusion, this patch renames it to "meson-drm" and removes the owner attribute since is always added by __platform_driver_register called by the module_platform_driver() macro. Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486028864-19622-3-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/meson/meson_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e6e2fd5531c6c028f444de8fcb255738c9c3f9b Author: Neil Armstrong Date: Thu Feb 2 10:47:43 2017 +0100 drm: meson: rename module name to meson-drm The module is currently named "meson.ko" which can lead to some confusion, this patches renames it "meson-drm.ko" Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486028864-19622-2-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/meson/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a6da5f78431f6b172078eb5bd524187833f360b Author: Markus Elfring Date: Thu Jan 19 11:10:26 2017 +0100 MIPS: KVM: Return directly after a failed copy_from_user() in kvm_arch_vcpu_ioctl() * Return directly after a call of the function "copy_from_user" failed in a case block. * Delete the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Paolo Bonzini Signed-off-by: James Hogan arch/mips/kvm/mips.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 2851940ffee313e0ff12540a8e11a8c54dea9c65 Author: Michal Kubeček Date: Tue Jan 31 10:30:06 2017 +0100 netfilter: allow logging from non-init namespaces Commit 69b34fb996b2 ("netfilter: xt_LOG: add net namespace support for xt_LOG") disabled logging packets using the LOG target from non-init namespaces. The motivation was to prevent containers from flooding kernel log of the host. The plan was to keep it that way until syslog namespace implementation allows containers to log in a safe way. However, the work on syslog namespace seems to have hit a dead end somewhere in 2013 and there are users who want to use xt_LOG in all network namespaces. This patch allows to do so by setting /proc/sys/net/netfilter/nf_log_all_netns to a nonzero value. This sysctl is only accessible from init_net so that one cannot switch the behaviour from inside a container. Signed-off-by: Michal Kubecek Signed-off-by: Pablo Neira Ayuso Documentation/networking/netfilter-sysctl.txt | 10 ++++++++++ include/net/netfilter/nf_log.h | 3 +++ net/bridge/netfilter/ebt_log.c | 2 +- net/ipv4/netfilter/nf_log_arp.c | 2 +- net/ipv4/netfilter/nf_log_ipv4.c | 2 +- net/ipv6/netfilter/nf_log_ipv6.c | 2 +- net/netfilter/nf_log.c | 24 ++++++++++++++++++++++++ 7 files changed, 41 insertions(+), 4 deletions(-) commit 90c1aff702d449a1a248c4829d51c0bc677f968e Author: David Windsor Date: Mon Jan 23 22:24:29 2017 -0500 ipvs: free ip_vs_dest structs when refcnt=0 Currently, the ip_vs_dest cache frees ip_vs_dest objects when their reference count becomes < 0. Aside from not being semantically sound, this is problematic for the new type refcount_t, which will be introduced shortly in a separate patch. refcount_t is the new kernel type for holding reference counts, and provides overflow protection and a constrained interface relative to atomic_t (the type currently being used for kernel reference counts). Per Julian Anastasov: "The problem is that dest_trash currently holds deleted dests (unlinked from RCU lists) with refcnt=0." Changing dest_trash to hold dest with refcnt=1 will allow us to free ip_vs_dest structs when their refcnt=0, in ip_vs_dest_put_and_free(). Signed-off-by: David Windsor Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) commit a9e419dc7be6997409dca6d1b9daf3cc7046902f Author: Florian Westphal Date: Mon Jan 23 18:21:59 2017 +0100 netfilter: merge ctinfo into nfct pointer storage area After this change conntrack operations (lookup, creation, matching from ruleset) only access one instead of two sk_buff cache lines. This works for normal conntracks because those are allocated from a slab that guarantees hw cacheline or 8byte alignment (whatever is larger) so the 3 bits needed for ctinfo won't overlap with nf_conn addresses. Template allocation now does manual address alignment (see previous change) on arches that don't have sufficent kmalloc min alignment. Some spots intentionally use skb->_nfct instead of skb_nfct() helpers, this is to avoid undoing the skb_nfct() use when we remove untracked conntrack object in the future. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/skbuff.h | 21 +++++++++------------ include/net/netfilter/nf_conntrack.h | 11 ++++++----- net/ipv6/netfilter/nf_dup_ipv6.c | 2 +- net/netfilter/core.c | 2 +- net/netfilter/nf_conntrack_core.c | 11 ++++++----- net/netfilter/nf_conntrack_standalone.c | 3 +++ net/netfilter/xt_CT.c | 4 ++-- 7 files changed, 28 insertions(+), 26 deletions(-) commit 303223092081963513494b4377fa1ac9e362ed4b Author: Florian Westphal Date: Mon Jan 23 18:21:58 2017 +0100 netfilter: guarantee 8 byte minalign for template addresses The next change will merge skb->nfct pointer and skb->nfctinfo status bits into single skb->_nfct (unsigned long) area. For this to work nf_conn addresses must always be aligned at least on an 8 byte boundary since we will need the lower 3bits to store nfctinfo. Conntrack templates are allocated via kmalloc. kbuild test robot reported BUILD_BUG_ON failed: NFCT_INFOMASK >= ARCH_KMALLOC_MINALIGN on v1 of this patchset, so not all platforms meet this requirement. Do manual alignment if needed, the alignment offset is stored in the nf_conn entry protocol area. This works because templates are not handed off to L4 protocol trackers. Reported-by: kbuild test robot Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 2 ++ net/netfilter/nf_conntrack_core.c | 29 ++++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) commit c74454fadd5ea6fc866ffe2c417a0dba56b2bf1c Author: Florian Westphal Date: Mon Jan 23 18:21:57 2017 +0100 netfilter: add and use nf_ct_set helper Add a helper to assign a nf_conn entry and the ctinfo bits to an sk_buff. This avoids changing code in followup patch that merges skb->nfct and skb->nfctinfo into skb->_nfct. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 3 +-- include/net/netfilter/nf_conntrack.h | 8 ++++++++ net/ipv4/netfilter/ipt_SYNPROXY.c | 3 +-- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 3 +-- net/ipv4/netfilter/nf_dup_ipv4.c | 3 +-- net/ipv6/netfilter/ip6t_SYNPROXY.c | 3 +-- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 6 ++---- net/ipv6/netfilter/nf_dup_ipv6.c | 3 +-- net/netfilter/nf_conntrack_core.c | 11 +++-------- net/netfilter/nft_ct.c | 3 +-- net/netfilter/xt_CT.c | 6 ++---- net/openvswitch/conntrack.c | 6 ++---- 12 files changed, 24 insertions(+), 34 deletions(-) commit cb9c68363efb6d1f950ec55fb06e031ee70db5fc Author: Florian Westphal Date: Mon Jan 23 18:21:56 2017 +0100 skbuff: add and use skb_nfct helper Followup patch renames skb->nfct and changes its type so add a helper to avoid intrusive rename change later. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/skbuff.h | 13 ++++++++++--- include/net/netfilter/nf_conntrack_core.h | 2 +- net/core/skbuff.c | 2 +- net/ipv4/netfilter/ipt_SYNPROXY.c | 8 ++++---- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/ipv4/netfilter/nf_defrag_ipv4.c | 4 ++-- net/ipv4/netfilter/nf_dup_ipv4.c | 2 +- net/ipv6/netfilter/ip6t_SYNPROXY.c | 8 ++++---- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 4 ++-- net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 4 ++-- net/netfilter/nf_conntrack_core.c | 4 ++-- net/netfilter/nf_nat_helper.c | 2 +- net/netfilter/xt_CT.c | 2 +- net/openvswitch/conntrack.c | 6 +++--- net/sched/cls_flow.c | 2 +- 15 files changed, 36 insertions(+), 29 deletions(-) commit 97a6ad13decc16c5adbf181283932daba7e17faf Author: Florian Westphal Date: Mon Jan 23 18:21:55 2017 +0100 netfilter: reduce direct skb->nfct usage Next patch makes direct skb->nfct access illegal, reduce noise in next patch by using accessors we already have. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 9 ++++++--- net/netfilter/nf_conntrack_core.c | 15 +++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) commit 6e10148c5c85629832d9156f337cbf67e96b69fe Author: Florian Westphal Date: Mon Jan 23 18:21:54 2017 +0100 netfilter: reset netfilter state when duplicating packet We should also toss nf_bridge_info, if any -- packet is leaving via ip_local_out, also, this skb isn't bridged -- it is a locally generated copy. Also this avoids the need to touch this later when skb->nfct is replaced with 'unsigned long _nfct' in followup patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_dup_ipv4.c | 2 +- net/ipv6/netfilter/nf_dup_ipv6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 11df4b760f11ca7528c62b1c4b870735d1c62116 Author: Florian Westphal Date: Mon Jan 23 18:21:53 2017 +0100 netfilter: conntrack: no need to pass ctinfo to error handler It is never accessed for reading and the only places that write to it are the icmp(6) handlers, which also set skb->nfct (and skb->nfctinfo). The conntrack core specifically checks for attached skb->nfct after ->error() invocation and returns early in this case. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 2 +- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 12 ++++++------ net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 12 ++++++------ net/netfilter/nf_conntrack_core.c | 3 +-- net/netfilter/nf_conntrack_proto_dccp.c | 1 - net/netfilter/nf_conntrack_proto_sctp.c | 2 +- net/netfilter/nf_conntrack_proto_tcp.c | 1 - net/netfilter/nf_conntrack_proto_udp.c | 3 +-- 8 files changed, 16 insertions(+), 20 deletions(-) commit 10435c1192d06bdb0bac7666452d8219d7e7c477 Author: Feng Date: Fri Jan 20 21:40:43 2017 +0800 netfilter: nf_tables: Eliminate duplicated code in nf_tables_table_enable() If something fails in nf_tables_table_enable(), it unregisters the chains. But the rollback code is the same as nf_tables_table_disable() almostly, except there is one counter check. Now create one wrapper function to eliminate the duplicated codes. Signed-off-by: Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 156650083f7d6fa04e580bb148dbb6f9a70c7e1a Author: Arnd Bergmann Date: Thu Feb 2 13:15:32 2017 +0100 staging: bcm2835: don't mark 'bcm2835_v4l2_debug' as static This one unfortunately slipped through my own build testing, my patch caused a new build error: bcm2835-camera.c:53:12: error: static declaration of 'bcm2835_v4l2_debug' follows non-static declaration We want the symbol to be global as it is indeed used in more than one file and declared 'extern' in a header. Fixes: 757b9bd074 ("staging: bcm2835: mark all symbols as 'static'") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/bcm2835-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 284a4e3ab55c11d73f2f4110184a0f1ad5b40d28 Author: Arushi Date: Thu Feb 2 00:49:42 2017 +0530 staging: rtl8192e: Aligning the * on each line in block comments This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d308d2b5847c9c73f38ff70dfe2d7f2af84c63a6 Author: David Kershner Date: Wed Feb 1 17:39:00 2017 -0500 staging: unisys: visorbus: get rid of unused payload info We no longer send payloads back to the s-Par firmware, we can get rid of the initialize and destroy functions since they weren't actually being used just created and destroyed. Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 101 +------------------------ 1 file changed, 3 insertions(+), 98 deletions(-) commit 85afaa681b68c6ec33a13193c459b26e1b4e42b3 Author: David Kershner Date: Wed Feb 1 17:38:59 2017 -0500 staging: unisys: visorbus: remove putfile data structures There were several unused data structures dealing with putfile that are no longer being used. So get rid of them. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 54 -------------------------- 1 file changed, 54 deletions(-) commit 9c70ee32ffedc48705b08d97212683a5482628cb Author: Tim Sell Date: Wed Feb 1 17:38:58 2017 -0500 staging: unisys: visornic: prevent hang doing 'modprobe -r visornic' A stray+extraneous 'netif_napi_add()' that we were doing in visornic_probe() was causing havoc when we got into visornic_remove(), called during 'modprobe -r visornic'. The symptom was a processor busy-wait loop on the modprobe process, which '/proc//stack' would show looping doing napi things. Presumably the stray line got there as a result of some merging snafoo, and has been deleted to fix the problem. With this patch 'modprobe -r visornic' and a subsequent 'modprobe visornic' both complete successfully, and result in an operational network. Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7289a8dd2b258d267e5405f656d7f27c82fba014 Author: David Binder Date: Wed Feb 1 17:38:56 2017 -0500 staging: unisys: visorbus: Consolidate kobject functions Simplifies kobject usage in visorchipset.c by combining pairs of functions that are better expressed combined. Signed-off-by: David Binder Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 76 +++++++++++--------------- 1 file changed, 31 insertions(+), 45 deletions(-) commit 308ee8aa1fd28102d078431a199106bc47d10128 Author: David Binder Date: Wed Feb 1 17:38:55 2017 -0500 staging: unisys: visorbus: Check controlvm message payload size Checks the controlvm message's payload size before copying it into a parser_context struct's name region. Signed-off-by: David Binder Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0c773962cfa605897c35dd20b910cdcba55f8a3c Author: David Binder Date: Wed Feb 1 17:38:54 2017 -0500 staging: unisys: visorbus: Remove unused struct in visorchannel.c Removes struct safe_uis_queue, which is within struct visorchannel. The struct is not used anywhere in the s-Par drivers. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 6 ------ 1 file changed, 6 deletions(-) commit a8e39c57c1f7782c12c9ccec83d823f05e06e1b9 Author: Miquel Raynal Date: Tue Jan 31 14:32:08 2017 +0100 staging: bcm2835-audio: fix style problem in vc_vchi_audioserv_defs.h Remove spaces around parenthesized expression to conform to the kernel coding style. Issue found by checkpatch.pl script. Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/vc_vchi_audioserv_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dd551e20ea2e27fc0579ad0be9e3c660e1147af Author: Colin Ian King Date: Wed Feb 1 11:57:11 2017 +0000 staging: bcm2835-audio: use | instead of || otherwise result is just boolean 1 The incorrect or operator is being used resulting in cookies being set to 1 (true) rather than the intended hex value. Fix this by using | instead of ||. Issue found with static analysis with cppcheck Fixes: 0cec463e391e05b807a ("staging: bcm2835-audio: Simplify callback structure for write data") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f440d909085e497540788fecc056dc39ea0471ed Author: Arnd Bergmann Date: Thu Feb 2 12:26:51 2017 +0100 staging: lustre: remove CLASSERT macro lustre uses a fake switch() statement as a compile-time assert, but unfortunately each use of that causes a warning when building with clang: drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case matching constant switch condition '42' drivers/staging/lustre/lnet/klnds/socklnd/../../../include/linux/libcfs/libcfs_private.h:294:36: note: expanded from macro 'CLASSERT' #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0) As Greg suggested, let's just kill off this macro completely instead of fixing it. This replaces it with BUILD_BUG_ON(), which means we have to negate all the conditions in the process. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_private.h | 16 -- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 16 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 2 +- .../lustre/lnet/klnds/socklnd/socklnd_proto.c | 2 +- drivers/staging/lustre/lnet/libcfs/hash.c | 2 +- drivers/staging/lustre/lnet/lnet/acceptor.c | 4 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 134 +++++++------- drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +- drivers/staging/lustre/lnet/lnet/net_fault.c | 8 +- drivers/staging/lustre/lnet/lnet/router_proc.c | 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/include/lustre_net.h | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 6 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 12 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 16 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 102 +++++------ drivers/staging/lustre/lustre/ptlrpc/pers.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 194 ++++++++++----------- 29 files changed, 269 insertions(+), 285 deletions(-) commit 757b9bd074312090107bc2582b27c04ea0eb2b88 Author: Arnd Bergmann Date: Thu Feb 2 12:34:11 2017 +0100 staging: bcm2835: mark all symbols as 'static' I got a link error in allyesconfig: drivers/staging/media/platform/bcm2835/bcm2835-camera.o: In function `vidioc_enum_framesizes': bcm2835-camera.c:(.text.vidioc_enum_framesizes+0x0): multiple definition of `vidioc_enum_framesizes' drivers/media/platform/vivid/vivid-vid-cap.o:vivid-vid-cap.c:(.text.vidioc_enum_framesizes+0x0): first defined here While both drivers are equally at fault for this problem, the bcm2835 one was just added and is easier to fix, as it is only one file, and none of its symbols need to be globally visible. This marks the three global symbols as static. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/bcm2835-camera.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b07525b89f95060dc2d8d954a7a77df4918d8bb8 Author: Arnd Bergmann Date: Wed Feb 1 17:22:25 2017 +0100 staging: bcm2835-audio: fix empty-body warning gcc-7 warns about debug statements being left out here: drivers/staging/bcm2835-audio/bcm2835-vchiq.c: In function 'bcm2835_audio_set_ctls': drivers/staging/bcm2835-audio/bcm2835-vchiq.c:572:54: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] It's better to use no_printk(), which has the added advantage of checking the format strings. Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe822dc6c12b1e3be3e820d088d431b55d57693b Author: Arnd Bergmann Date: Wed Feb 1 17:21:19 2017 +0100 staging: bcm2835-audio: remove incorrect include path The driver introduces a new instance of the missing-include-dirs warning that is enabled at the "make W=1" level but has no other output: cc1: error: /git/arm-soc/drivers/staging/vc04_services/interface/vcos/linuxkernel: No such file or directory [-Werror=missing-include-dirs] In order to let us enable the warning by default in the future, we should just remove the incorrect argument here. Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ad13763b5f4db9b8310ebd857136479c94413e5 Author: Arnd Bergmann Date: Wed Feb 1 17:15:06 2017 +0100 staging: bcm2835-v4l: remove incorrect include path The driver introduces a new instance of the missing-include-dirs warning that is enabled at the "make W=1" level but has no other output: cc1: error: drivers/staging/vc04_services/interface/vcos/linuxkernel: No such file or directory [-Werror=missing-include-dirs] cc1: all warnings being treated as errors scripts/Makefile.build:307: recipe for target 'drivers/staging/media/platform/bcm2835/bcm2835-camera.o' failed In order to let us enable the warning by default in the future, we should just remove the incorrect argument here. Fixes: 97b35807cc4d ("staging: bcm2835-v4l2: Add a build system for the module.") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/Makefile | 1 - 1 file changed, 1 deletion(-) commit d3a4e613bcc3212be7bcf93096a351ad81da246e Author: Michael Zoran Date: Wed Feb 1 06:31:54 2017 -0800 staging: bcm2835/mmal-vchiq: Replace call to vchi_msg_queue with vchi_queue_kernel_message The function vchi_msg_queue was made static in vc04_services and replaced with vchi_queue_kernel_message. Change the call to vchi_msg_queue to vchi_queue_kernel_message Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../staging/media/platform/bcm2835/mmal-vchiq.c | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit c07acb97fd564cffcfd7bdc18eab9278bd448633 Author: Michael Zoran Date: Wed Feb 1 06:31:53 2017 -0800 staging: bcm2835-audio: Replace call to vchi_msg_queue with vchi_queue_kernel_message The function vchi_msg_queue was made static in vc04_services and replaced with vchi_queue_kernel_message. Change the call to vchi_msg_queue to vchi_queue_kernel_message Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 9af684efc74e6a9ac56047461f3f424d03942d88 Author: Maxime Ripard Date: Wed Feb 1 09:53:23 2017 +0100 ARM: sun8i: dt: Add mali node The A23 and A33 have an ARM Mali 400 GPU. Now that we have a binding, add it to our DT. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 487a07fba0c9755864283c6c79d7ea86e811070a Author: Maxime Ripard Date: Wed Feb 1 09:53:22 2017 +0100 dt-bindings: gpu: Add Mali Utgard bindings The ARM Mali Utgard GPU family is embedded into a number of SoCs from Allwinner, Amlogic, Mediatek or Rockchip. Add a binding for the GPU of that family. Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Maxime Ripard .../devicetree/bindings/gpu/arm,mali-utgard.txt | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit fa6a8adf3ab78dde8a3e4b13af0922ae27328d10 Merge: 2038043 bfe7288 Author: Greg Kroah-Hartman Date: Thu Feb 2 11:26:23 2017 +0100 Merge tag 'iio-for-4.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of new device support, features and cleanups for IIO in the 4.11 cycle This also involves a merge of the ib-mid-iio-pwm-4.11 branch from mfd to bring in support for the stm32 timer triggers needed for the buffered features in the stm32 adc driver. New device support: * Amligic Meson SAR ADC - new driver and bindings * cros_ec barometer - new driver * max5481 digital potentiometers - new driver for 5481, 5482, 5483 and 5484 * Renesas GyroADC - a very specific spi offload engine for ADCs - new driver and bindings. * srf08 ultrasonic ranger - new driver, bindings and ABI docs, New features * Qualcomm PM8xxx ADC bindings. - due to a trivial build issues the driver will be following shortly. * stm32 ADC - Triggered buffer mode - Allow use of stm32 timer triggers - Add trigger polarity control - Optional DMA support with bindings update * stx104 - add support for gpio names - support set_multiple callback * tmp007 - optional interrupt support Cleanups * ad7150 - alignment fix. * ad7816 - octal rather than symbolic permissions. * lsm6dsx - allow selection of data ready pin via device tree bindings. * ssp_sensors - use devm_iio_device_register to handle unregister automatically. * stx104 - use devm functions in probe allowing removal or the remove function. - drop unneeded struct stx104_dev * tmp007 - fix the name attribute to be a meaninful description of the part. commit 45d0ea86d235251305a0e2e63485b08b5caa79e7 Author: Andrzej Hajda Date: Wed Feb 1 08:47:52 2017 +0100 drm/bridge/sii8620: enable interlace modes Bug in DECON(CRTC) driver prevented interlace modes from proper work. Since DECON is fixed interlace modes can be enabled in MHL. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-26-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 3 --- 1 file changed, 3 deletions(-) commit 9fc6ade810c0ad4f72d77525444fbe925716e7fc Author: Andrzej Hajda Date: Wed Feb 1 08:47:51 2017 +0100 drm/bridge/sii8620: enable MHL3 mode if possible Since all sub-protocols of MHL3 are already supported MHL3 mode can be enabled. With this patch it is possible to use packed pixel modes and clocks up to 300MHz - 1920x1080@60Hz and 4K modes. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-25-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit a21e658bfbcdbbac26e92a76aa22db507b439f7c Author: Andrzej Hajda Date: Wed Feb 1 08:47:50 2017 +0100 drm/bridge/sii8620: add HSIC initialization code In case of MHL3 HSIC should be initialized. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-24-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 38 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/sil-sii8620.h | 10 ++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) commit 581a923730b41e678579aa268d4155bf345859fd Author: Andrzej Hajda Date: Wed Feb 1 08:47:49 2017 +0100 drm/bridge/sii8620: improve gen2 write burst IRQ routine The patch adds code to report back feature complete IRQ, and code to read and drop burst writes from peer. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-23-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 269ed8eec9c2e66a00e4c127e4c06bf87d518112 Author: Andrzej Hajda Date: Wed Feb 1 08:47:48 2017 +0100 drm/bridge/sii8620: send EMSC features on request Device should report to the peer which features are really supported. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-22-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 27 +++++++++++++++++++++++---- drivers/gpu/drm/bridge/sil-sii8620.h | 16 ++++++++-------- 2 files changed, 31 insertions(+), 12 deletions(-) commit bf1722cab55a32a7a18c0155034351084bac59fa Author: Andrzej Hajda Date: Wed Feb 1 08:47:47 2017 +0100 drm/bridge/sii8620: rewrite hdmi start sequence MHL3 protocol requires registry adjustments depending on chosen video mode. Necessary information is gathered in mode_fixup callback. In case of HDMI video modes driver should also send special AVI and MHL3 infoframes. The patch introduces generic helpers for handling MHL3 infoframes, in case of appearance of other users of MHL3 infoframes these function can be moved to common library. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-21-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 280 +++++++++++++++++++++++++++++++---- drivers/gpu/drm/bridge/sil-sii8620.h | 15 +- 2 files changed, 262 insertions(+), 33 deletions(-) commit be1cd6fe205806fbbcf59061d7b64759b160ca31 Author: Andrzej Hajda Date: Wed Feb 1 08:47:46 2017 +0100 drm/bridge/mhl: add MHL3 infoframe related definitions MHL3 protocol uses vendor specific infoframes to transmit additional information to the sink. This patch adds definitions of structures and constants used to create such frames. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-20-git-send-email-a.hajda@samsung.com include/drm/bridge/mhl.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 003f9929f85270a74a34990a60263fa847408fd0 Author: Andrzej Hajda Date: Wed Feb 1 08:47:45 2017 +0100 drm/bridge/sii8620: fix disconnect sequence The patch allows to avoid rare cases when discovery fails. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-19-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 263b5c93a2947bcab329b55e52b859e43a6539ee Author: Andrzej Hajda Date: Wed Feb 1 08:47:44 2017 +0100 drm/bridge/sii8620: split EDID read and write code MHL3 requires that after reading EDID from the sink source should ask peer for features. To make both protocols happy the patch splits the code accordingly. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-18-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 4dc3c0712720ca70b0563b4b64cf14175a96ef8c Author: Andrzej Hajda Date: Wed Feb 1 08:47:43 2017 +0100 drm/bridge/sii8620: add delay during cbus reset Without delay CBUS sometimes was not reset properly. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-17-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6bed9bc2ae483c5e8a7743515b63653eaad829c6 Author: Andrzej Hajda Date: Wed Feb 1 08:47:42 2017 +0100 drm/bridge/sii8620: do not stop MHL output when TMDS input is stopped Stopping output causes full re-detection of the sink and slows down the process. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-16-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 13 ------------- 1 file changed, 13 deletions(-) commit 26a4cef8155026488fe796cef56939fca909856f Author: Andrzej Hajda Date: Wed Feb 1 08:47:41 2017 +0100 drm/bridge/sii8620: set gen2 write burst before sending MSC command Write burst should be enabled for MHL_INT_RC_FEAT_REQ and disabled for other commands. The patch moves functions up and adds delay setting for MHL3 burst mode. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-15-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 88 ++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 38 deletions(-) commit 9a466cd1dd0da76deef9641dbe64a59194e5ee41 Author: Andrzej Hajda Date: Wed Feb 1 08:47:40 2017 +0100 drm/bridge/sii8620: abstract out sink detection code MHL1 and MHL3 have different initialization paths. To make both protocols happy sink detection is put into continuation after link mode enablement. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-14-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit ef822a0745720fc477ea87a497e847ddc2feb1f0 Author: Andrzej Hajda Date: Wed Feb 1 08:47:39 2017 +0100 drm/bridge/sii8620: fix initialization sequence for MHL2 receivers MHL2 receiver require disabling transmitter on initialization. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-13-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d6d59c5a57ebe49e4aeca8e32760c076b4cb8f7f Author: Andrzej Hajda Date: Wed Feb 1 08:47:38 2017 +0100 drm/bridge/sii8620: fix MSC message removal Messages queue can be cleaned up by message callbacks, to avoid repeated removal of current message it should be removed from the queue before calling these callbacks. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-12-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a5d25d500656b9642b554117b0d9c870ba76c1 Author: Andrzej Hajda Date: Wed Feb 1 08:47:37 2017 +0100 drm/bridge/sii8620: remove spare CBUS bring-up sequence In case of MHL3 CBUS is bring-up already in sii8620_got_ecbus_speed. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-11-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 ---- 1 file changed, 4 deletions(-) commit e3a654872d1b1b18eebe6a4a7e0fcb5b997f33ea Author: Andrzej Hajda Date: Wed Feb 1 08:47:36 2017 +0100 drm/bridge/sii8620: fix peer device capabilities read code Peer capabilities should be read differently depending on protocol version. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-10-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 4a36888585278635d0e47c80e19c803f8fd0884e Author: Andrzej Hajda Date: Wed Feb 1 08:47:35 2017 +0100 drm/bridge/sii8620: respond to feature requests MHL3 protocol requires device to respond to feature request from peer. This minimal answer fulfills the requirement and allows to continue negotiation. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-9-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++++ 1 file changed, 4 insertions(+) commit e19e9c692f81b87dc1414eb7945f4ad5dedbb49c Author: Andrzej Hajda Date: Wed Feb 1 08:47:34 2017 +0100 drm/bridge/sii8620: add support for burst eMSC transmissions Burst transmissions are used in MHL3 mode negotiation. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-8-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 194 ++++++++++++++++++++++++++++++++++- drivers/gpu/drm/bridge/sil-sii8620.h | 4 + 2 files changed, 197 insertions(+), 1 deletion(-) commit 981b3f372458220fca74cd79d61375a5b793b578 Author: Andrzej Hajda Date: Wed Feb 1 08:47:33 2017 +0100 drm/bridge/mhl: add write burst related definitions Burst transmissions are required in MHL3 modes. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-7-git-send-email-a.hajda@samsung.com include/drm/bridge/mhl.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 2c8fb853c063181bf80154e2fc3474d6f8c4a89c Author: Andrzej Hajda Date: Wed Feb 1 08:47:32 2017 +0100 drm/bridge/sii8620: initial support for eCBUS-S mode The Single-ended eCBUS Mode (eCBUS-S) mode provides 60 Mb/s full-duplex bidirectional traffic for three channels: - CBUS data (CBUS1 channel), - High-bandwidth MHL data (eMSC channel), - tunneling data (T-CBUS channel). It is required to fully support MHL3 dongles. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-6-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 104 ++++++++++++++++++++++++++++++++++- drivers/gpu/drm/bridge/sil-sii8620.h | 5 ++ 2 files changed, 107 insertions(+), 2 deletions(-) commit 0c2d18756b5b54f2ae5d00ff841c3db608d33fb9 Author: Andrzej Hajda Date: Wed Feb 1 08:47:31 2017 +0100 drm/bridge/sii8620: add continuations to messages Due to asynchronous nature of MHL flow of execution is dispersed. Logical continuation of some actions happens after response of peer, i.e in interrupt handler. To simplify coding continuation mechanism has been added - it is now possible to provide continuation callback, which will be called after peer responds to given action. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-5-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e9c6da270aaae54fb67aeb5858c456f3beffa6d9 Author: Andrzej Hajda Date: Wed Feb 1 08:47:30 2017 +0100 drm/bridge/sii8620: add reading device capability registers This functionality is necessary to implement MHL3 modes. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-4-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit bb4954c77c2515f383f8828b18c2a7357455d3d1 Author: Andrzej Hajda Date: Wed Feb 1 08:47:29 2017 +0100 drm/bridge/sii8620: add MHL3 mode check helper MHL3 modes differs significantly from MHL1 mode, this helper will be used frequently to clearly distinguish them. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-3-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dd12312906b33053319cdc0bb5c247185d24bffe Author: Andrzej Hajda Date: Wed Feb 1 08:47:28 2017 +0100 drm/bridge/sii8620: simplify MHL3 mode setting It is not necessary to set REG_COC_CTL0, REG_MHL_COC_CTL1 registers. Signed-off-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-2-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 673bc4354d42731018494bb69d63b6513f9ae2bb Author: Nathan Fontenot Date: Wed Jan 11 12:00:58 2017 -0500 powerpc/pseries: Report DLPAR capabilities As we add the ability to do DLPAR of additional devices through the sysfs interface we need to know which devices are supported. This adds the reporting of supported devices with a comma separated list reported in the existing /sys/kernel/dlpar. Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 675d8ee685195249d1b35e12a29f614a9888b16d Author: John Allen Date: Fri Jan 6 13:28:54 2017 -0600 powerpc/pseries: Update affinity for memory and cpus specified in a PRRN event Extend the existing PRRN infrastructure to perform the actual affinity updating for cpus and memory in addition to the device tree updating. For cpus, dynamic affinity updating already appears to exist in the kernel in the form of arch_update_cpu_topology(). For memory, we must place a READD operation on the hotplug queue for any phandle included in the PRRN event that is determined to be an LMB. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtasd.c | 7 ++++++- arch/powerpc/platforms/pseries/mobility.c | 34 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) commit 82260364fd0c7822c782771374cb4a4deb00d3f6 Author: Liviu Dudau Date: Tue Jan 31 18:56:20 2017 +0000 drm/etnaviv: Remove duplicate header file include etnaviv_gem.h header gets included twice. Remove duplicate. Signed-off-by: Liviu Dudau Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 - 1 file changed, 1 deletion(-) commit e17d0bf23f124f3e341415377a2ccbe0195f4158 Author: Lucas Stach Date: Tue Jan 17 11:04:45 2017 +0100 Revert "drm/etnaviv: trick drm_mm into giving out a low IOVA" Now that commandstreams are handled through the cmdbuf suballocator the workaround to make the IOVA games work is not needed anymore. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e66774dd6f6a3d44559599e4eeb785734c28d034 Author: Lucas Stach Date: Mon Jan 16 17:29:57 2017 +0100 drm/etnaviv: add cmdbuf suballocator There are 3 big benefits to suballocating a single big DMA buffer for command submission: 1. Avoid hammering CMA. The old way of allocating and freeing a DMA buffer for each submission was hitting some of the real slow pathes in CMA, as this allocator was not designed for a concurrent small buffers load. 2. Less TLB flushes on IOMMUv2. If a new command buffer is mapped into the GPU address space the MMU TLBs need to be flushed. By having one big buffer statically mapped to the GPU, a lot of those flushes can be avoided. 3. No funky workarounds for GC3000. The FE TLB flush on GC3000 isn't reliable. To work around that we tried to lay out the cmdbufs in the GPU address space in a way to avoid this issue. This hasn't always worked if the address space is crowded. A single statically mapped buffer avoids the erratum completely. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 123 +++++++++++++++++++++++---- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 21 +++-- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 5 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 14 ++- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 5 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 45 +++++----- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 10 ++- 7 files changed, 165 insertions(+), 58 deletions(-) commit 9912b4db7beae07cfa8d435530cddf375873c6f3 Author: Lucas Stach Date: Mon Jan 16 17:00:08 2017 +0100 drm/etnaviv: get cmdbuf physical address through the cmdbuf abstraction Don't allow IOMMUv2 to peek directly into the cmdbuf, but get the needed PA through a dedicated function. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 5 +++++ drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 ++- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) commit c3ef4b8c3e108397980014a4616c56f50026d547 Author: Lucas Stach Date: Mon Jan 16 16:52:44 2017 +0100 drm/etnaviv: wire up iova handling in new cmdbuf abstraction Don't call the IOMMU directly, but go through the new cmdbuf abstraction. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 13 +++++++------ drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 5 +++++ drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 2 ++ drivers/gpu/drm/etnaviv/etnaviv_dump.c | 5 ++--- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++-- 5 files changed, 18 insertions(+), 11 deletions(-) commit ea1f5729aa1bbe68f9a394e259288d6ff894b0aa Author: Lucas Stach Date: Mon Jan 16 16:09:51 2017 +0100 drm/etnaviv: move cmdbuf de-/allocation into own file This will get more complex with the following changes, so move it into its own place. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/Makefile | 1 + drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 54 ++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 46 ++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_dump.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 5 +-- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 45 ++++------------------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 27 ++------------ drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 1 + 11 files changed, 117 insertions(+), 66 deletions(-) commit d46450737c007b16bb81f9d5dea56d1f4b9a2c21 Author: Lucas Stach Date: Tue Jan 17 10:59:37 2017 +0100 drm/etnaviv: always flush MMU TLBs on map/unmap This ensures that the GPU isn't able to write into already freed objects, as doing this in the IOVA reaper isn't enough, as the gem_free_object path will also cause unmaps to happen. On MMUv2 this also ensures that stale entries, which may have been prefetched into the TLB will be purged. The flush is low overhead, as it gets batched up with the next user command buffer, so this isn't incuring an overhead for each buffer map/unmap. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bc179f08d26a61f11260ee7528484f317c59e6b0 Author: Bhumika Goyal Date: Mon Jan 16 00:20:28 2017 +0530 drm/etnaviv: constify etnaviv_iommu_ops structures Declare etnaviv_iommu_ops structure as const as it is only used when the reference of one of its field is stored in the ops field of a iommu_domain structure. This ops field is of type const, so etnaviv_iommu_ops structures having similar properties can be declared const too. Done using Coccinelle. Before and after size details of .o file remains the same after cross compiling for arm architecture. lst: Trimmed commit message, apply the same change to iommu_v2. Signed-off-by: Bhumika Goyal Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cbdded7f8a633ee9418047c50a7114ce2282b912 Author: Gabriel Krisman Bertazi Date: Thu Jan 26 23:05:48 2017 -0200 drm: qxl: Embed drm_device into driver structure This is the recommended way to create the drm_device structure, according to DRM documentation. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-4-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_debugfs.c | 6 +++--- drivers/gpu/drm/qxl/qxl_display.c | 32 ++++++++++++++++---------------- drivers/gpu/drm/qxl/qxl_drv.c | 30 +++++++++--------------------- drivers/gpu/drm/qxl/qxl_drv.h | 6 +++--- drivers/gpu/drm/qxl/qxl_fb.c | 10 +++++----- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 +- drivers/gpu/drm/qxl/qxl_irq.c | 2 +- drivers/gpu/drm/qxl/qxl_kms.c | 11 +++++++++-- drivers/gpu/drm/qxl/qxl_object.c | 8 ++++---- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- 10 files changed, 52 insertions(+), 57 deletions(-) commit d74d74aeaf0b29a158bc95c63c6b6b107a57f4f5 Author: Gabriel Krisman Bertazi Date: Thu Jan 26 23:05:47 2017 -0200 drm: qxl: Drop duplicated pci_device pointer attribute qxl_device duplicates the pointer to struct pci_dev, which is not needed since we already have it in the drm_device structure. Clean it up. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-3-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_ioctl.c | 2 +- drivers/gpu/drm/qxl/qxl_kms.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) commit 5472bdee3f7ac3393e6911fc21eaa339b978cfed Author: Gabriel Krisman Bertazi Date: Thu Jan 26 23:05:46 2017 -0200 drm: qxl: Drop duplicated device pointer attribute qxl_device duplicates a pointer to struct device, which is not needed since we already have it in the drm_device structure. Clean it up. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-2-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_kms.c | 1 - drivers/gpu/drm/qxl/qxl_object.c | 16 ++++++++-------- drivers/gpu/drm/qxl/qxl_object.h | 8 ++++---- 4 files changed, 12 insertions(+), 14 deletions(-) commit 768851b92cf224a6dc37cb99d78dd94377d51f0e Author: Gabriel Krisman Bertazi Date: Thu Jan 26 23:05:45 2017 -0200 drm: qxl: Drop misleading comment No longer true since commit 07f8d9bdb235 ("drm/qxl: add support for > 1 output"). qxl_num_crtc defaults to 4 and is configurable as a module parameter. Signed-off-by: Gabriel Krisman Bertazi Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-1-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1acf566195e135bc0b557ecb8ad5395b47d9ad27 Author: Max Staudt Date: Wed Jan 18 19:10:12 2017 +0100 drm/bochs: Implement nomodeset Up until now, the bochsdrm driver didn't handle the nomodeset option at boot, and didn't provide a "modeset" module option either. This patch implements both. The new parameter can be used by specifying bochs-drm.modeset=0 at boot time. Signed-off-by: Max Staudt Link: http://patchwork.freedesktop.org/patch/msgid/1484763012-17783-1-git-send-email-mstaudt@suse.de Cc: Gerd Hoffmann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e64d5fbe56259c94df504af8ce804cfc6a022adb Author: Dave Hansen Date: Wed Feb 1 14:56:29 2017 -0800 x86/mpx: Re-add MPX to selftests Makefile Ingo pointed out that the MPX tests were no longer in the selftests Makefile. It appears that I shot myself in the foot on this one and accidentally removed them when I added the pkeys tests, probably from bungling a merge conflict. Reported-by: Ingo Molnar Signed-off-by: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests") Link: http://lkml.kernel.org/r/20170201225629.C3070852@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36401cb7ffae731295a6dd1ce2b40d7ad74245f4 Author: Rafał Miłecki Date: Mon Jan 30 16:09:52 2017 +0100 brcmfmac: be more verbose when PSM's watchdog fires It's important to inform user so he knows things went wrong. He may also want to get memory dump for further debugging purposes. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f4737a62033d7f3e0db740c449fc62119da7ab8a Author: Rafał Miłecki Date: Mon Jan 30 16:09:51 2017 +0100 brcmfmac: check brcmf_bus_get_memdump result for error This method may be unsupported (see: USB bus) or may just fail (see: SDIO bus). While at it rework logic in brcmf_sdio_bus_get_memdump function to avoid too many conditional code nesting levels. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/debug.c | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit e70d59700fc32c9249b26acd4120303c497e84f1 Author: John Allen Date: Fri Jan 6 13:27:26 2017 -0600 powerpc/pseries: Introduce memory hotplug READD operation Currently, memory must be hot removed and subsequently re-added in order to dynamically update the affinity of LMBs specified by a PRRN event. Earlier implementations of the PRRN event handler ran into issues in which the hot remove would occur successfully, but a hotplug event would be initiated from another source and grab the hotplug lock preventing the hot add from occurring. To prevent this situation, this patch introduces the notion of a hot "readd" action for memory which atomizes a hot remove and a hot add into a single, serialized operation on the hotplug queue. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/platforms/pseries/hotplug-memory.c | 41 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit c21f515c743687c6c2b3d38227e6ad8e6b733409 Author: John Allen Date: Fri Jan 6 13:25:53 2017 -0600 powerpc/pseries: Make the acquire/release of the drc for memory a seperate step When adding and removing LMBs we should make the acquire/release of the DRC a separate step to allow for a few improvements. First this will ensure that LMBs removed during a remove by count operation are all available if a error occurs and we need to add them back. By first removeing all the LMBs from the kernel before releasing their DRCs the LMBs are available to add back should an error occur. Also, this will allow for faster re-add operations of memory for PRRN event handling since we can skip the unneeded step of having to release the DRC and the acquire it back. Signed-off-by: Nathan Fontenot Signed-off-by: John Allen Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 34 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 12 deletions(-) commit e71ff89c712cb387914abff373ac830d6298b012 Author: Madhavan Srinivasan Date: Thu Jan 5 16:38:15 2017 +0530 powerpc/xmon: Cleanup to use is_kernel_addr macro Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4eb43875a1859b8d4fb6c56a441a18bcf5957413 Author: Michael Ellerman Date: Wed Feb 1 16:59:35 2017 +1100 powerpc/boot: Update .gitignore Add a few things that have been missed from .gitignore over the years. Signed-off-by: Michael Ellerman arch/powerpc/boot/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit 1c877f71b7b9c0a5144e29d599eac2c62c91070c Author: Michael Ellerman Date: Wed Feb 1 13:21:22 2017 +1100 powerpc/debug: PTDUMP should depend on DEBUG_FS CONFIG_PPC_PTDUMP currently selects CONFIG_DEBUG_FS. But CONFIG_DEBUG_FS is user-selectable, so we shouldn't select it. Instead depend on it. Signed-off-by: Michael Ellerman arch/powerpc/Kconfig.debug | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1925febe4bc4a6f3abc3b2e322f39348d090509c Author: Anton Blanchard Date: Thu Jan 12 21:17:34 2017 +1100 powerpc/64: Add BPF_JIT to powernv and pseries defconfigs Commit db9112173b18 ("powerpc: Turn on BPF_JIT in ppc64_defconfig") only added BPF_JIT to the ppc64 defconfig. Add it to our powernv and pseries defconfigs too. Signed-off-by: Anton Blanchard Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/pseries_defconfig | 1 + 2 files changed, 2 insertions(+) commit d6c569b99558b219fcf0ce0d3af8ec8f077ba924 Author: Anton Blanchard Date: Thu Jan 12 21:17:33 2017 +1100 powerpc/64: Move HAVE_CONTEXT_TRACKING from pseries to common Kconfig We added support for HAVE_CONTEXT_TRACKING, but placed the option inside PPC_PSERIES. This has the undesirable effect that NO_HZ_FULL can be enabled on a kernel with both powernv and pseries support, but cannot on a kernel with powernv only support. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit f2ca809059294b27703d709a3c4218197c5f16dc Author: Daniel Axtens Date: Mon Jan 30 17:41:55 2017 +1100 powerpc/sparse: Constify the address pointer in __get_user_nosleep() In __get_user_nosleep, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_nosleep macro. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d466f6c5cac17e0c9f22bd4250020bf885049db7 Author: Daniel Axtens Date: Mon Jan 30 17:41:54 2017 +1100 powerpc/sparse: Constify the address pointer in __get_user_nocheck() In __get_user_nocheck, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_nocheck macro. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f84ed59a612d866cde0bd17ad2a52acb524d44c9 Author: Daniel Axtens Date: Mon Jan 30 17:41:53 2017 +1100 powerpc/sparse: Constify the address pointer in __get_user_check() In __get_user_check, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_check macro. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b1c764339ef35dccaa49d8466ec2bb08362c233 Author: Michael Ellerman Date: Thu Feb 2 16:21:44 2017 +1100 powerpc/powernv: Fix section mismatch from opal_lpc_init() opal_lpc_init() is called from an __init routine, and calls other __init routines, so should also be __init, init? Fixes: 023b13a50183 ("powerpc/powernv: Add support for direct mapped LPC on POWER9") Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd01b690f8f4b1e414f89e5a9a5326bf720d6652 Author: Eric Biggers Date: Wed Feb 1 21:07:11 2017 -0500 ext4: fix use-after-iput when fscrypt contexts are inconsistent In the case where the child's encryption context was inconsistent with its parent directory, we were using inode->i_sb and inode->i_ino after the inode had already been iput(). Fix this by doing the iput() in the correct places. Note: only ext4 had this bug, not f2fs and ubifs. Fixes: d9cdc9033181 ("ext4 crypto: enforce context consistency") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dbfcef6b0f4012c57bc0b6e0e660d5ed12a5eaed Author: Sahitya Tummala Date: Wed Feb 1 20:49:35 2017 -0500 jbd2: fix use after free in kjournald2() Below is the synchronization issue between unmount and kjournald2 contexts, which results into use after free issue in kjournald2(). Fix this issue by using journal->j_state_lock to synchronize the wait_event() done in journal_kill_thread() and the wake_up() done in kjournald2(). TASK 1: umount cmd: |--jbd2_journal_destroy() { |--journal_kill_thread() { write_lock(&journal->j_state_lock); journal->j_flags |= JBD2_UNMOUNT; ... write_unlock(&journal->j_state_lock); wake_up(&journal->j_wait_commit); TASK 2 wakes up here: kjournald2() { ... checks JBD2_UNMOUNT flag and calls goto end-loop; ... end_loop: write_unlock(&journal->j_state_lock); journal->j_task = NULL; --> If this thread gets pre-empted here, then TASK 1 wait_event will exit even before this thread is completely done. wait_event(journal->j_wait_done_commit, journal->j_task == NULL); ... write_lock(&journal->j_state_lock); write_unlock(&journal->j_state_lock); } |--kfree(journal); } } wake_up(&journal->j_wait_done_commit); --> this step now results into use after free issue. } Signed-off-by: Sahitya Tummala Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0d9111a2d53785847763c64c40af2d4c4c5a8b7 Author: Josef Bacik Date: Wed Feb 1 16:11:40 2017 -0500 nbd: use an idr to keep track of nbd devices To prepare for dynamically adding new nbd devices to the system switch from using an array for the nbd devices and instead use an idr. This copies what loop does for keeping track of its devices. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 213 ++++++++++++++++++++++++++++------------------------ 1 file changed, 115 insertions(+), 98 deletions(-) commit 124d6db07c3bd0bdb57ba0e22ff4e5b87e7cb32e Author: Josef Bacik Date: Wed Feb 1 16:11:11 2017 -0500 nbd: use our own workqueue for recv threads Since we are in the memory reclaim path we need our recv work to be on a workqueue that has WQ_MEM_RECLAIM set so we can avoid deadlocks. Also set WQ_HIGHPRI since we are in the completion path for IO. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ae6f8dd4d0c87bfb72da9d9b56342adf53e69c31 Author: Pavel Shilovsky Date: Thu Nov 17 13:59:23 2016 -0800 CIFS: Allow to switch on encryption with seal mount option This allows users to inforce encryption for SMB3 shares if a server supports it. Signed-off-by: Pavel Shilovsky fs/cifs/connect.c | 41 ++++++++++++++++++++++++++++------------- fs/cifs/smb2pdu.c | 33 +++++++++++++++------------------ 2 files changed, 43 insertions(+), 31 deletions(-) commit c42a6abe3012832a68a371dabe17c2ced97e62ad Author: Pavel Shilovsky Date: Thu Nov 17 16:20:23 2016 -0800 CIFS: Add capability to decrypt big read responses Allow to decrypt transformed packets that are bigger than the big buffer size. In particular it is used for read responses that can only exceed the big buffer size. Signed-off-by: Pavel Shilovsky fs/cifs/cifsproto.h | 1 + fs/cifs/cifssmb.c | 8 +-- fs/cifs/smb2ops.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 169 insertions(+), 13 deletions(-) commit 4326ed2f6a16ae9d33e4209b540dc9a371aba840 Author: Pavel Shilovsky Date: Thu Nov 17 15:24:46 2016 -0800 CIFS: Decrypt and process small encrypted packets Allow to decrypt transformed packets, find a corresponding mid and process as usual further. Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 1 + fs/cifs/cifsproto.h | 2 + fs/cifs/connect.c | 9 ++ fs/cifs/smb2ops.c | 226 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.c | 4 +- fs/cifs/smb2proto.h | 2 + fs/cifs/smb2transport.c | 2 +- 7 files changed, 243 insertions(+), 3 deletions(-) commit d70b9104b1ca586f73aaf59426756cec3325a40e Author: Pavel Shilovsky Date: Thu Nov 17 16:20:18 2016 -0800 CIFS: Add copy into pages callback for a read operation Since we have two different types of reads (pagecache and direct) we need to process such responses differently after decryption of a packet. The change allows to specify a callback that copies a read payload data into preallocated pages. Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 3 +++ fs/cifs/file.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 6 deletions(-) commit 9b7c18a2d4b798963ea80f6769701dcc4c24b55e Author: Pavel Shilovsky Date: Wed Nov 16 14:06:17 2016 -0800 CIFS: Add mid handle callback We need to process read responses differently because the data should go directly into preallocated pages. This can be done by specifying a mid handle callback. Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 8 ++++++++ fs/cifs/cifsproto.h | 2 +- fs/cifs/cifssmb.c | 6 +++--- fs/cifs/smb2pdu.c | 10 +++++----- fs/cifs/transport.c | 5 +++-- 5 files changed, 20 insertions(+), 11 deletions(-) commit 9bb17e0916a03ab901fb684e874d77a1e96b3d1e Author: Pavel Shilovsky Date: Thu Nov 17 15:24:34 2016 -0800 CIFS: Add transform header handling callbacks We need to recognize and parse transformed packets in demultiplex thread to find a corresponsing mid and process it further. Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 3 +++ fs/cifs/connect.c | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) commit 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398 Author: Pavel Shilovsky Date: Thu Nov 3 16:47:37 2016 -0700 CIFS: Encrypt SMB3 requests before sending This change allows to encrypt packets if it is required by a server for SMB sessions or tree connections. Signed-off-by: Pavel Shilovsky fs/cifs/Kconfig | 2 + fs/cifs/cifsencrypt.c | 13 ++- fs/cifs/cifsfs.c | 2 + fs/cifs/cifsglob.h | 2 + fs/cifs/cifsproto.h | 2 +- fs/cifs/connect.c | 4 +- fs/cifs/smb2ops.c | 256 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.h | 5 +- fs/cifs/smb2proto.h | 3 + fs/cifs/smb2transport.c | 41 +++++++- 10 files changed, 320 insertions(+), 10 deletions(-) commit cabfb3680f78981d26c078a26e5c748531257ebb Author: Pavel Shilovsky Date: Mon Nov 7 18:20:50 2016 -0800 CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky fs/cifs/sess.c | 22 ++++++++++------------ fs/cifs/smb2pdu.c | 12 ++---------- 2 files changed, 12 insertions(+), 22 deletions(-) commit 7fb8986e7449d0a5cebd84d059927afa423fbf85 Author: Pavel Shilovsky Date: Mon Oct 31 13:49:30 2016 -0700 CIFS: Add capability to transform requests before sending This will allow us to do protocol specific tranformations of packets before sending to the server. For SMB3 it can be used to support encryption. Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 7 +++ fs/cifs/smb2pdu.c | 129 ++++++++++++++++++++++++++++++++++++++++++---------- fs/cifs/transport.c | 33 ++++++++++---- 3 files changed, 136 insertions(+), 33 deletions(-) commit b8f57ee8aad414a3122bff72d7968a94baacb9b6 Author: Pavel Shilovsky Date: Wed Nov 23 15:31:54 2016 -0800 CIFS: Separate RFC1001 length processing for SMB2 read Allocate and initialize SMB2 read request without RFC1001 length field to directly call cifs_send_recv() rather than SendReceive2() in a read codepath. Signed-off-by: Pavel Shilovsky fs/cifs/cifsproto.h | 3 ++ fs/cifs/smb2pdu.c | 89 ++++++++++++++++++++++++++++++++++++++++------------- fs/cifs/smb2pdu.h | 5 +-- fs/cifs/transport.c | 2 +- 4 files changed, 74 insertions(+), 25 deletions(-) commit cb200bd6264a80c04e09e8635fa4f3901cabdaef Author: Pavel Shilovsky Date: Mon Oct 24 16:59:57 2016 -0700 CIFS: Separate SMB2 sync header processing Do not process RFC1001 length in smb2_hdr_assemble() because it is not a part of SMB2 header. This allows to cleanup the code and adds a possibility combine several SMB2 packets into one for compounding. Signed-off-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 50 ++++++++++++++++++++++++++++++-------------------- fs/cifs/smb2pdu.h | 5 +++++ 2 files changed, 35 insertions(+), 20 deletions(-) commit 738f9de5cdb9175c19d24cfdf90b4543fc3b47bf Author: Pavel Shilovsky Date: Wed Nov 23 15:14:57 2016 -0800 CIFS: Send RFC1001 length in a separate iov In order to simplify further encryption support we need to separate RFC1001 length and SMB2 header when sending a request. Put the length field in iov[0] and the rest of the packet into following iovs. Signed-off-by: Pavel Shilovsky fs/cifs/cifsencrypt.c | 38 +++++++++++++--------- fs/cifs/cifsglob.h | 2 +- fs/cifs/cifssmb.c | 51 +++++++++++++++++------------ fs/cifs/smb2pdu.c | 64 ++++++++++++++++++++++-------------- fs/cifs/smb2transport.c | 28 +++++++++------- fs/cifs/transport.c | 86 +++++++++++++++++++++++++++++++++++++------------ 6 files changed, 174 insertions(+), 95 deletions(-) commit fb2036d817584df42504910fe104f68517e8990e Author: Pavel Shilovsky Date: Wed Nov 23 15:08:14 2016 -0800 CIFS: Make send_cancel take rqst as argument Signed-off-by: Pavel Shilovsky fs/cifs/cifsglob.h | 2 +- fs/cifs/smb1ops.c | 4 ++-- fs/cifs/transport.c | 33 +++++++++++++++++++-------------- 3 files changed, 22 insertions(+), 17 deletions(-) commit da502f7df03d2d0b416775f92ae022f3f82bedd5 Author: Pavel Shilovsky Date: Tue Oct 25 11:38:47 2016 -0700 CIFS: Make SendReceive2() takes resp iov Now SendReceive2 frees the first iov and returns a response buffer in it that increases a code complexity. Simplify this by making a caller responsible for freeing request buffer itself and returning a response buffer in a separate iov. Signed-off-by: Pavel Shilovsky fs/cifs/cifsproto.h | 3 +- fs/cifs/cifssmb.c | 70 ++++++++++++++++------------ fs/cifs/sess.c | 5 +- fs/cifs/smb2pdu.c | 128 +++++++++++++++++++++++++++++++++------------------- fs/cifs/transport.c | 30 ++++-------- 5 files changed, 136 insertions(+), 100 deletions(-) commit 31473fc4f9653b73750d3792ffce6a6e1bdf0da7 Author: Pavel Shilovsky Date: Mon Oct 24 15:33:04 2016 -0700 CIFS: Separate SMB2 header structure In order to support compounding and encryption we need to separate RFC1001 length field and SMB2 header structure because the protocol treats them differently. This change will allow to simplify parsing of such complex SMB2 packets further. Signed-off-by: Pavel Shilovsky fs/cifs/smb2glob.h | 5 ++ fs/cifs/smb2maperror.c | 5 +- fs/cifs/smb2misc.c | 61 ++++++++++++---------- fs/cifs/smb2ops.c | 26 +++++----- fs/cifs/smb2pdu.c | 132 ++++++++++++++++++++++++++---------------------- fs/cifs/smb2pdu.h | 12 +++-- fs/cifs/smb2transport.c | 81 +++++++++++++++-------------- 7 files changed, 174 insertions(+), 148 deletions(-) commit 9c25702cee1405099f982894c865c163de7909a8 Author: Pavel Shilovsky Date: Thu Jan 19 13:53:15 2017 -0800 CIFS: Fix splice read for non-cached files Currently we call copy_page_to_iter() for uncached reading into a pipe. This is wrong because it treats pages as VFS cache pages and copies references rather than actual data. When we are trying to read from the pipe we end up calling page_cache_pipe_buf_confirm() which returns -ENODATA. This error is translated into 0 which is returned to a user. This issue is reproduced by running xfs-tests suite (generic test #249) against mount points with "cache=none". Fix it by mapping pages manually and calling copy_to_iter() that copies data into the pipe. Cc: Stable Signed-off-by: Pavel Shilovsky fs/cifs/file.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b9be76d585d48cb25af8db0d35e1ef9030fbe13a Author: Jean Delvare Date: Wed Jan 25 16:09:10 2017 +0100 cifs: Add soft dependencies List soft dependencies of cifs so that mkinitrd and dracut can include the required helper modules. Reviewed-by: Pavel Shilovsky Signed-off-by: Jean Delvare Cc: Steve French fs/cifs/cifsfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3692304bba6164be3810afd41b84ecb0e1e41db1 Author: Jean Delvare Date: Wed Jan 25 16:08:17 2017 +0100 cifs: Only select the required crypto modules The sha256 and cmac crypto modules are only needed for SMB2+, so move the select statements to config CIFS_SMB2. Also select CRYPTO_AES there as SMB2+ needs it. Reviewed-by: Pavel Shilovsky Signed-off-by: Jean Delvare Cc: Steve French fs/cifs/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c1ecea87471bbb614f8121e00e5787f363140365 Author: Jean Delvare Date: Wed Jan 25 16:07:29 2017 +0100 cifs: Simplify SMB2 and SMB311 dependencies * CIFS_SMB2 depends on CIFS, which depends on INET and selects NLS. So these dependencies do not need to be repeated for CIFS_SMB2. * CIFS_SMB311 depends on CIFS_SMB2, which depends on INET. So this dependency doesn't need to be repeated for CIFS_SMB311. Reviewed-by: Pavel Shilovsky Signed-off-by: Jean Delvare Cc: Steve French fs/cifs/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bbfc3c5d6c7882dc65c1230e781644e35c29839f Author: Tahsin Erdogan Date: Tue Jan 31 22:36:50 2017 -0800 block: queue lock must be acquired when iterating over rls blk_set_queue_dying() does not acquire queue lock before it calls blk_queue_for_each_rl(). This allows a racing blkg_destroy() to remove blkg->q_node from the linked list and have blk_queue_for_each_rl() loop infitely over the removed blkg->q_node list node. Signed-off-by: Tahsin Erdogan Signed-off-by: Jens Axboe block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 902dcd14dae10e6ddc464d5034b1709d10c30d8e Author: Eric Anholt Date: Tue Jan 31 11:48:01 2017 -0800 MAINTAINERS: Update for the current location of the bcm2835 tree. I've been maintaining the bcm2835 branches here for a year or so. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren Acked-by: Stephen Warren Signed-off-by: Florian Fainelli MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4078f57571442345d09edddb2ac79c951b9d6db2 Author: Eric Anholt Date: Tue Jan 31 11:29:11 2017 -0800 drm/vc4: Add DSI driver The DSI0 and DSI1 blocks on the 2835 are related hardware blocks. Some registers move around, and the featureset is slightly different, as DSI1 (the 4-lane DSI) is a later version of the hardware block. This driver doesn't yet enable DSI0, since we don't have any hardware to test against, but it does put a lot of the register definitions and code in place. v2: Use the clk_hw interfaces, don't set CLK_IS_BASIC (from review by Stephen Boyd) Signed-off-by: Eric Anholt Acked-by: Daniel Vetter (v1) Link: http://patchwork.freedesktop.org/patch/msgid/20170131192912.11316-1-eric@anholt.net drivers/gpu/drm/vc4/Kconfig | 2 + drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/vc4/vc4_debugfs.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 5 + drivers/gpu/drm/vc4/vc4_dsi.c | 1725 +++++++++++++++++++++++++++++++++++++ 6 files changed, 1735 insertions(+) commit 302cee3648ba1a7322b77511de9112e61a1bfff8 Author: Eric Anholt Date: Wed Dec 14 11:46:16 2016 -0800 dt-bindings: Document the VC4 DSI module nodes. These are part of the vc4 display pipeline. Signed-off-by: Eric Anholt Acked-by: Rob Herring Link: http://patchwork.freedesktop.org/patch/msgid/20161214194621.16499-7-eric@anholt.net .../devicetree/bindings/display/brcm,bcm-vc4.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit a86773d120d75569d151b95ac8e0df657d4bfe48 Author: Eric Anholt Date: Wed Dec 14 11:46:15 2016 -0800 drm/vc4: Add support for feeding DSI encoders from the pixel valve. We have to set a different pixel format, which tells the hardware to use the pix_width field that's fed in sideband from the DSI encoder to divide the "pixel" clock. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161214194621.16499-6-eric@anholt.net drivers/gpu/drm/vc4/vc4_crtc.c | 33 +++++++++++++++++++-------------- drivers/gpu/drm/vc4/vc4_regs.h | 2 ++ 2 files changed, 21 insertions(+), 14 deletions(-) commit d17a1bb9b801f7046af29c31b946a9619bfe382d Author: Eric Anholt Date: Wed Dec 14 11:46:14 2016 -0800 drm/vc4: Set up SCALER_DISPCTRL at boot. We want the HVS on, obviously, and we also want DSP3 (PV1's source) to be muxed from HVS channel 2 like we expect in vc4_crtc.c. The firmware wasn't setting the DSP3 mux up when both the LCD and HDMI were disabled. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161214194621.16499-5-eric@anholt.net drivers/gpu/drm/vc4/vc4_hvs.c | 14 ++++++++++++++ drivers/gpu/drm/vc4/vc4_regs.h | 3 +++ 2 files changed, 17 insertions(+) commit c8929258a59b784a61dc0bbe3cfca6ebed5f47c4 Author: Jani Nikula Date: Mon Jan 30 18:58:15 2017 +0200 Documentation/sphinx: make targets independent of Sphinx work for HAVE_SPHINX=0 Make targets that don't depend on Sphinx work without warnings about missing Sphinx. 'make cleandocs' will work without Sphinx just fine, and the targets that are no-ops for Sphinx should just be skipped. Move them outside of the HAVE_SPHINX checks to take precedence over the .DEFAULT target for HAVE_SPHINX=0. Reported-by: Jim Davis Reference: http://lkml.kernel.org/r/CA+r1ZhjRVqkjPXGOGB_BOAX2Hkfb+qQCtTzFfBMFeH1Mfeej7w@mail.gmail.com Signed-off-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7cabd5ac69a4135fd8dbc1f1bb9c9531a5f1e5c7 Author: Markus Heiser Date: Tue Jan 31 10:57:41 2017 +0100 doc-rst: fixed cleandoc target when used with O=dir The cleandocs target won't work if I use a different output folder:: $ make O=/tmp/kernel SPHINXDIRS="process" cleandocs make[1]: Entering directory '/tmp/kernel' make[3]: *** No rule to make target 'clean'. Stop. ... Documentation/Makefile.sphinx:100: recipe for target 'cleandocs' failed Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a0f4038a4919712a62031dc63aa871a84b4ad05 Author: Jani Nikula Date: Tue Jan 31 20:18:05 2017 +0200 Documentation/sphinx: prevent generation of .pyc files in the source tree Use PYTHONDONTWRITEBYTECODE=1 to prevent python from creating .pyc files in the source tree. Python 3.2 has a __pycache__ scheme [1], but before that the only alternative seems to be to copy the source files to the build tree to ensure the .pyc files are created there too. Just prevent .pyc file generation for simplicity. Considering the small amount of python code to compile (assuming sphinx itself has .pyc around), the impact on build is neglible. [1] http://stackoverflow.com/questions/3522079/changing-the-directory-where-pyc-files-are-created References: http://lkml.kernel.org/r/CAMuHMdVxqpH7-9XJ+YE_pgoA+-fe0969cSkOehYh3uubYcrhZA@mail.gmail.com Reported-by: Geert Uytterhoeven References: http://lkml.kernel.org/r/1485816692.2900.17.camel@decadent.org.uk Reported-by: Ben Hutchings Cc: Jonathan Corbet Signed-off-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 1 + 1 file changed, 1 insertion(+) commit 5fad1b64aed8bd63ca7da2ba92107ba9ecd9a2c8 Author: Bart Van Assche Date: Wed Feb 1 08:20:08 2017 -0800 block: Update comments that refer to __bio_map_user() and bio_map_user() Since __bio_map_user() and bio_map_user() have been removed, update the comments that still refer to these functions. Signed-off-by: Bart Van Assche References: commit ddad8dd0a162 ("block: use blk_rq_map_user_iov to implement blk_rq_map_user") Cc: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 72f2f8f6929cf680d42ca44f87b7d370aff94d85 Author: Bart Van Assche Date: Wed Feb 1 10:20:59 2017 -0800 blk-mq-debug: Introduce debugfs_create_files() Replace the two debugfs_create_file() loops by a call to the new debugfs_create_files() function. Add an empty element at the end of the two attribute arrays such that the array size does not have to be passed to debugfs_create_files(). Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 8c0f14eab8f138689e68b3498c0c5fd6ff20a948 Author: Bart Van Assche Date: Wed Feb 1 10:20:58 2017 -0800 blk-mq-debug: Make show() operations interruptible Allow users to interrupt show operations instead of making a user space process unkillable if ownership of q->sysfs_lock cannot be obtained. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit a1ae0f74a73fbd113647321c49032a561b3f3781 Author: Bart Van Assche Date: Wed Feb 1 12:22:23 2017 -0700 blk-mq-debug: Avoid that sparse complains about req_flags_t usage Avoid that sparse reports the following complaints: block/elevator.c:541:29: warning: incorrect type in assignment (different base types) block/elevator.c:541:29: expected bool [unsigned] [usertype] next_sorted block/elevator.c:541:29: got restricted req_flags_t block/blk-mq-debugfs.c:92:54: warning: cast from restricted req_flags_t Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- block/elevator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f3bcb0e60685acfc258a20caa0607e084271c482 Author: Bart Van Assche Date: Wed Feb 1 10:20:56 2017 -0800 blk-mq-debugfs: Add missing __acquires() / __releases() annotations This patch avoids that sparse complains about lock imbalances. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62e13097c46c69dbd7544ab2cd585ccf48f360a4 Author: Rafał Miłecki Date: Tue Jan 31 22:54:54 2017 +0100 net: phy: broadcom: rehook BCM54612E specific init This extra BCM54612E code in PHY driver isn't really aneg specific. Even without it aneg works OK but the problem is no packets pass through PHY. Moreover putting this code inside config_aneg callback didn't allow resuming PHY correctly. When driver called phy_stop and phy_start it was putting PHY machine into RESUMING state. After that machine was switching into AN and NOLINK without ever calling phy_start_aneg. This prevented this extra setup from being called and PHY didn't work. This change has been verified to fix network on BCM47186B0 SoC device with BCM54612E. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 67 +++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit 8cf4664332d3072ce9458135e45267c5075d033c Author: Guenter Roeck Date: Mon Jan 30 11:51:22 2017 +0100 dt-bindings: power: reset: qnap-poweroff: Drop reference to pm_power_off Replace reference to pm_power_off (which is an implementation detail) and replace it with a more generic description of the driver's functionality. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Acked-by: Mark Rutland Acked-by: Andrew Lunn Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Rob Herring Documentation/devicetree/bindings/power/reset/qnap-poweroff.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a7f5cf38013802f1172a66c15f5c1ad0860c8dd9 Author: Guenter Roeck Date: Mon Jan 30 11:51:21 2017 +0100 dt-bindings: power: reset: gpio-poweroff: Drop reference to pm_power_off pm_power_off is an implementation detail. Replace it with a more generic description of the driver's functionality. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Acked-by: Mark Rutland Acked-by: Andrew Lunn Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Rob Herring .../devicetree/bindings/power/reset/gpio-poweroff.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c3b5dda04f3d041c228827e048279a6813ea7889 Author: Guenter Roeck Date: Mon Jan 30 11:51:20 2017 +0100 dt-bindings: mfd: as3722: Drop reference to pm_power_off Devicetree bindings are supposed to be operating system independent and should thus not describe how a specific functionality is implemented in Linux. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Guenter Roeck Acked-by: Lee Jones Signed-off-by: Thierry Reding Signed-off-by: Rob Herring Documentation/devicetree/bindings/mfd/as3722.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 88c68f9dbf47833f3f13c79cd2ed7057fc094add Author: Rob Herring Date: Tue Jan 31 11:47:56 2017 -0600 dt-bindings: display: move ANX7814 and SiI8620 bridge bindings A few bindings snuck into bindings/video/bridge since consolidating everything under bindings/display/bridge/. Move them to the correct spot. Cc: Andrzej Hajda Acked-by: Thierry Reding Acked-by: Archit Taneja Acked-by: Enric Balletbo i Serra Signed-off-by: Rob Herring .../devicetree/bindings/display/bridge/anx7814.txt | 40 ++++++++++++++++++++++ .../bindings/display/bridge/sil-sii8620.txt | 33 ++++++++++++++++++ .../devicetree/bindings/video/bridge/anx7814.txt | 40 ---------------------- .../bindings/video/bridge/sil-sii8620.txt | 33 ------------------ 4 files changed, 73 insertions(+), 73 deletions(-) commit 974c3f19acebaa40e391c69056ccf851e40a9c0c Merge: 6107dbd f3b2031 Author: David S. Miller Date: Wed Feb 1 14:10:04 2017 -0500 Merge branch 'act_sample-Little-fixes' Yotam Gigi says: ==================== net/sched: act_sample: Little fixes Little fixes in sample tc action. ==================== Acked-by: Cong Wang Signed-off-by: David S. Miller commit f3b20313aef93f9cfda76fec2c05625f88510f18 Author: Yotam Gigi Date: Tue Jan 31 11:33:54 2017 +0200 net/sched: act_psample: Remove unnecessary ASSERT_RTNL The ASSERT_RTNL is not necessary in the init function, as it does not touch any rtnl protected structures, as opposed to the mirred action which does have to hold a net device. Reported-by: Cong Wang Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi Signed-off-by: David S. Miller net/sched/act_sample.c | 1 - 1 file changed, 1 deletion(-) commit cadb9c9fdbc6a624d57b5ecdfd412b5800848703 Author: Yotam Gigi Date: Tue Jan 31 11:33:53 2017 +0200 net/sched: act_sample: Fix error path in init Fix error path of in sample init, by releasing the tc hash in case of failure in psample_group creation. Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action") Reported-by: Cong Wang Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi Signed-off-by: David S. Miller net/sched/act_sample.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bfe7288e0dd143268359f703ac9b8d4f904d3f75 Author: William Breathitt Gray Date: Thu Jan 19 10:06:16 2017 -0500 iio: stx104: Add GPIO set_multiple callback function support The Apex Embedded Systems STX104 series provides a digital output register where 4 lines may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple digital output lines to be set more efficiently in groups. Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 5ec69524d43095752510fdcdadc4a6baf50d7c18 Author: Dmitry Torokhov Date: Sat Jan 28 11:01:33 2017 -0800 Input: joydev - use clamp() macro We have a nice macro ensuring that the value is within certain range, let's use it instead of open-coding. Signed-off-by: Dmitry Torokhov drivers/input/joydev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77e546b7ba3e39e8a739cb18489582044222b7ba Author: Pierre-Louis Bossart Date: Wed Feb 1 12:27:05 2017 -0600 ASoC: cht-bsw-rt5645: fix unused variable compiler warning Missed unused variable in previous changes, oops. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 1 - 1 file changed, 1 deletion(-) commit cec55827dde1e87f6b91e34f205744d70a7225bc Author: Pierre-Louis Bossart Date: Wed Feb 1 12:27:04 2017 -0600 ASoC: rt5645: fix error handling for gpio detection Optional gpio handling should not cause an error status and prevent probing if it's missing. Remove error return for -ENOENT case and move error message to dev_info Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6ecfe51b4082e7cff12609f97daa052ae04b61fd Author: Dmitry Torokhov Date: Tue Jan 31 15:09:08 2017 -0800 Input: refuse to register absolute devices without absinfo If device is supposed to send absolute events (i.e. EV_ABS bit is set in dev->evbit) but dev->absinfo is not allocated, then the driver has done something wrong, and we should not register such device. Otherwise we'll crash later, when driver tries to send absolute event. Reviewed-by: Benjamin Tissoires Acked-by: Jiri Kosina Signed-off-by: Dmitry Torokhov drivers/input/input.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6107dbdb64465848e310b85ebe589236e24a9680 Merge: 889711a 0cf45a3 Author: David S. Miller Date: Wed Feb 1 12:53:59 2017 -0500 Merge branch 'sh_eth-fixes-for-MagicPacket-handling' Niklas Söderlund says: ==================== sh_eth: fixes for MagicPacket handling This series contain two fixes for MagicPacket handling. It's based on top of net-next and is tested on Koelsch. ==================== Signed-off-by: David S. Miller commit 0cf45a3b1e2c47bbcc9e75cbed5c660492e297da Author: Niklas Söderlund Date: Wed Feb 1 15:41:55 2017 +0100 sh_eth: fix wakeup event reporting from MagicPacket If a link change interrupt happens along side the MagicPacket interrupt and the link change interrupt is ignored the interrupt handler will return and the wakeup event is not registered. Fix this by moving the MagicPacket check before the link change check. Signed-off-by: Niklas Söderlund Reported-by: Sergei Shtylyov Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e2ed1329ee074229d5a2f4389035be818120980 Author: Niklas Söderlund Date: Wed Feb 1 15:41:54 2017 +0100 sh_eth: align usage of sh_eth_modify() with rest of driver To be consistent with the rest of the driver when setting bits using sh_eth_modify() the same bit should also be cleared. This have no functional change and should have been done from the start. Signed-off-by: Niklas Söderlund Suggested-by: Sergei Shtylyov Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 889711a03e0fba427fb85317900e93c74e3be02a Merge: ff1176f 7243a1a Author: David S. Miller Date: Wed Feb 1 12:46:17 2017 -0500 Merge tag 'wireless-drivers-next-for-davem-2017-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 It's nice to see rt2x00 development has becoming active, for example adding support for a new chip version. Also wcn36xx has been converted to use the recently merged QCOM_SMD subsystem. Otherwise new features and fixes it lots of drivers. Major changes: iwlwifi * some more work in preparation for A000 family support * add support for radiotap timestamps * some work on our firmware debugging capabilities wcn36xx * convert to a proper QCOM_SMD driver (from the platform_driver interface) ath10k * VHT160 support * dump Copy Engine registers during firmware crash * search board file extension from SMBIOS wil6210 * add disable_ap_sme module parameter rt2x00 * support RT3352 with external PA * support for RT3352 with 20MHz crystal * add support for RT5350 WiSoC brcmfmac * add support for BCM43455 sdio device rtl8xxxu * add support for D-Link DWA-131 rev E1, TP-Link TL-WN822N v4 and others ==================== Signed-off-by: David S. Miller commit ff1176f6164f3d151ee64c05d3f7b6662a81b982 Author: Dan Carpenter Date: Wed Feb 1 11:52:15 2017 +0300 ethernet: aquantia: fix dma_mapping_error test dma_mapping_error() returns 1 if there is an error and 0 if not. Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cdb478e5e413864df73096ef4f0e5d518395a92b Author: Satanand Burla Date: Tue Jan 31 13:04:42 2017 -0800 liquidio: fix for iq and droq cnts going negative Flush the mmio writes before releasing spin locks. if the maintained counts get too high > 2M force writeback of the counts to clear them Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 +++++- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 6 +++++- drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 1 + drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) commit 390891d0baf82278a04835c8a62bb14dca98b96b Author: M'boumba Cedric Madianga Date: Wed Feb 1 18:20:43 2017 +0100 ARM: dts: stm32: Add I2C1 support for STM32429 eval board This patch adds I2C1 instance support for STM32x9I-Eval board. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 9834ffd1ecc3a401d0ce64c2d4235a726da6d4f9 Author: Matt Ranostay Date: Tue Jan 31 13:21:43 2017 -0800 ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches We can get audio errors if hitting deeper idle states on omaps: [alsa.c:230] error: Fatal problem with alsa output, error -5. [audio.c:614] error: Error in writing audio (Input/output error?)! This seems to happen with off mode idle enabled as power for the whole SoC may get cut off between filling the McBSP fifo using DMA. While active DMA blocks deeper idle states in hardware, McBSP activity does not seem to do so. Basing the QoS latency calculation on the FIFO size, threshold, sample rate, and channels. Based on the original patch by Tony Lindgren Link: https://patchwork.kernel.org/patch/9305867/ Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Tested-by: Tony Lindgren Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/omap/mcbsp.h | 3 +++ sound/soc/omap/omap-mcbsp.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) commit 51576d360305436a10d92babca37d86b18d32f46 Author: M'boumba Cedric Madianga Date: Wed Feb 1 18:19:07 2017 +0100 ARM: dts: stm32: Add I2C1 support for STM32F429 SoC This patch adds I2C1 support for STM32F429 SoC Signed-off-by: Patrice Chotard Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1f5e29ce7989eb75652774004b962ee1eb6e56ca Author: David Ahern Date: Tue Jan 31 16:51:37 2017 -0800 net: ipv6: add NLM_F_APPEND in notifications when applicable IPv6 does not set the NLM_F_APPEND flag in notifications to signal that a NEWROUTE is an append versus a new route or a replaced one. Add the flag if the request has it. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 3 +++ 1 file changed, 3 insertions(+) commit f696186203076770f51eb5890712e696e6bb72d7 Author: Grygorii Strashko Date: Tue Jan 31 14:04:04 2017 -0600 net: ethernet: ti: cpsw: fix NULL pointer dereference in switch mode In switch mode on struct cpsw_slave->ndev field will be initialized with proper value only for the one cpsw slave port, as result cpsw_get_usage_count() will generate "Unable to handle kernel NULL pointer dereference" exception when first ethernet interface is opening cpsw_ndo_open(). This issue causes boot regression on AM335x EVM and reproducible on am57xx-evm (switch mode). Fix it by adding additional check for !cpsw->slaves[i].ndev in cpsw_get_usage_count(). Cc: Ivan Khoronzhuk Fixes: 03fd01ad0eea ("net: ethernet: ti: cpsw: don't duplicate ndev_running") Signed-off-by: Grygorii Strashko Reviewed-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2504a5dbef3305ef41988ad270b0e8ec289331c Author: Eric Dumazet Date: Tue Jan 31 10:20:32 2017 -0800 net: reduce skb_warn_bad_offload() noise Dmitry reported warnings occurring in __skb_gso_segment() [1] All SKB_GSO_DODGY producers can allow user space to feed packets that trigger the current check. We could prevent them from doing so, rejecting packets, but this might add regressions to existing programs. It turns out our SKB_GSO_DODGY handlers properly set up checksum information that is needed anyway when packets needs to be segmented. By checking again skb_needs_check() after skb_mac_gso_segment(), we should remove these pesky warnings, at a very minor cost. With help from Willem de Bruijn [1] WARNING: CPU: 1 PID: 6768 at net/core/dev.c:2439 skb_warn_bad_offload+0x2af/0x390 net/core/dev.c:2434 lo: caps=(0x000000a2803b7c69, 0x0000000000000000) len=138 data_len=0 gso_size=15883 gso_type=4 ip_summed=0 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 6768 Comm: syz-executor1 Not tainted 4.9.0 #5 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c063ecd8 ffffffff82346bdf ffffffff00000001 1ffff100380c7d2e ffffed00380c7d26 0000000041b58ab3 ffffffff84b37e38 ffffffff823468f1 ffffffff84820740 ffffffff84f289c0 dffffc0000000000 ffff8801c063ee20 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51 [] panic+0x1fb/0x412 kernel/panic.c:179 [] __warn+0x1c4/0x1e0 kernel/panic.c:542 [] warn_slowpath_fmt+0xc5/0x100 kernel/panic.c:565 [] skb_warn_bad_offload+0x2af/0x390 net/core/dev.c:2434 [] __skb_gso_segment+0x482/0x780 net/core/dev.c:2706 [] skb_gso_segment include/linux/netdevice.h:3985 [inline] [] validate_xmit_skb+0x5c9/0xc20 net/core/dev.c:2969 [] __dev_queue_xmit+0xe6b/0x1e70 net/core/dev.c:3383 [] dev_queue_xmit+0x17/0x20 net/core/dev.c:3424 [] packet_snd net/packet/af_packet.c:2930 [inline] [] packet_sendmsg+0x32ed/0x4d30 net/packet/af_packet.c:2955 [] sock_sendmsg_nosec net/socket.c:621 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:631 [] ___sys_sendmsg+0x8fa/0x9f0 net/socket.c:1954 [] __sys_sendmsg+0x138/0x300 net/socket.c:1988 [] SYSC_sendmsg net/socket.c:1999 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:1995 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Willem de Bruijn Signed-off-by: David S. Miller net/core/dev.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 969218fee101af5335314e8521fb1a29e49e560b Author: Takashi Iwai Date: Tue Jan 17 17:43:29 2017 +0100 drm: Clean up the 1366x768 fixup codes This is just a cleanup, no functional change. The fixup code for 1366x768 in drm_mode_create_from_cmdline_mode() is basically a copy of the existing code in drm_edid.c. Make the latter code public so that it can be called from the former function. Signed-off-by: Takashi Iwai Link: http://patchwork.freedesktop.org/patch/msgid/20170117164329.10551-1-tiwai@suse.de Reviewed-by: Ville Syrjälä [vsyrjala: include drm_crtc_internal.h to make sparse happy] Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_crtc_internal.h | 3 +++ drivers/gpu/drm/drm_edid.c | 8 +++++--- drivers/gpu/drm/drm_modes.c | 8 ++------ 3 files changed, 10 insertions(+), 9 deletions(-) commit 160ca0142431c19386db976302fd4b07c587f651 Author: Theuns Verwoerd Date: Tue Jan 31 12:23:46 2017 +1300 rtnetlink: Handle IFLA_MASTER parameter when processing rtnl_newlink Allow a master interface to be specified as one of the parameters when creating a new interface via rtnl_newlink. Previously this would require invoking interface creation, waiting for it to complete, and then separately binding that new interface to a master. In particular, this is used when creating a macvlan child interface for VRRP in a VRF configuration, allowing the interface creator to specify directly what master interface should be inherited by the child, without having to deal with asynchronous complications and potential race conditions. Signed-off-by: Theuns Verwoerd Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 04cdf13e34e912dcab9a94f391e15b2c26dfd0a2 Merge: 624374a 1995876 Author: David S. Miller Date: Wed Feb 1 11:22:38 2017 -0500 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-02-01 1) Some typo fixes, from Alexander Alemayhu. 2) Don't acquire state lock in get_mtu functions. The only rece against a dead state does not matter. From Florian Westphal. 3) Remove xfrm4_state_fini, it is unused for more than 10 years. From Florian Westphal. 4) Various rcu usage improvements. From Florian Westphal. 5) Properly handle crypto arrors in ah4/ah6. From Gilad Ben-Yossef. 6) Try to avoid skb linearization in esp4 and esp6. 7) The esp trailer is now set up in different places, add a helper for this. 8) With the upcomming usage of gro_cells in IPsec, a gro merged skb can have a secpath. Drop it before freeing or reusing the skb. 9) Add a xfrm dummy network device for napi. With this we can use gro_cells from within xfrm, it allows IPsec GRO without impact on the generic networking code. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit f20a406bf74f073d8b22a04eb1bf9062c3e4f848 Author: Gabriel Fernandez Date: Wed Feb 1 16:16:27 2017 +0100 ARM: dts: stm32: Use clock DT binding definition on stm32f429 family This patch uses clock DT binding definition instead numerical values for stm32f429 board. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 2 +- arch/arm/boot/dts/stm32f429.dtsi | 102 ++++++++++++++++++----------------- 2 files changed, 54 insertions(+), 50 deletions(-) commit 2cfb397b1506d0ed99ee00e3690bf206d75c94b1 Author: Gabriel Fernandez Date: Wed Feb 1 14:09:00 2017 +0100 dt-bindings: mfd: stm32f4: Add missing binding definition This patch adds missing binding definition (backupram, ethernet, otg, qspi, adc & dsi) Acked-by: Lee Jones Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE include/dt-bindings/mfd/stm32f4-rcc.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 982b159297d025687cfc84add4e56fd1cac40dc2 Author: Gabriel Fernandez Date: Wed Feb 1 14:09:00 2017 +0100 dt-bindings: mfd: stm32f4: Fix STM32F4_X_CLOCK() macro Macro to select a clock was not correct. Offset of enable register starts at 0x30, then calculation to select a bit is: (@enable_reg - 0x30) / 4 * 32 + bit_to_select Tested-by: M'boumba Cedric Madianga Acked-by: Stephen Boyd Acked-by: Lee Jones Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE include/dt-bindings/mfd/stm32f4-rcc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 82da3bbf4d463b40789a09a9b2f9742db5ee6d3e Author: Benjamin Gaignard Date: Wed Feb 1 11:18:13 2017 +0100 ARM: dts: stm32: Enable pwm1 and pwm3 for stm32f469-disco Define and enable pwm1 and pwm3 for stm32f469 discovery board Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit c0e14fc712d9169a4c3030dcc22acdf2a17362fb Author: Benjamin Gaignard Date: Wed Feb 1 17:00:34 2017 +0100 ARM: dts: stm32: add Timers driver for stm32f429 MCU Add Timers and it sub-nodes into DT for stm32f429 family. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 275 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) commit d9ff80f83ecbf4cbdf56d32d01c312498e4fb1cd Author: Christopher Covington Date: Tue Jan 31 12:50:19 2017 -0500 arm64: Work around Falkor erratum 1009 During a TLB invalidate sequence targeting the inner shareable domain, Falkor may prematurely complete the DSB before all loads and stores using the old translation are observed. Instruction fetches are not subject to the conditions of this erratum. If the original code sequence includes multiple TLB invalidate instructions followed by a single DSB, onle one of the TLB instructions needs to be repeated to work around this erratum. While the erratum only applies to cases in which the TLBI specifies the inner-shareable domain (*IS form of TLBI) and the DSB is ISH form or stronger (OSH, SYS), this changes applies the workaround overabundantly-- to local TLBI, DSB NSH sequences as well--for simplicity. Based on work by Shanker Donthineni Signed-off-by: Christopher Covington Acked-by: Mark Rutland Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 10 ++++++++++ arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/include/asm/tlbflush.h | 18 +++++++++++++++--- arch/arm64/kernel/cpu_errata.c | 9 +++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) commit 93faccbbfa958a9668d3ab4e30f38dd205cee8d8 Author: Eric W. Biederman Date: Wed Feb 1 06:06:16 2017 +1300 fs: Better permission checking for submounts To support unprivileged users mounting filesystems two permission checks have to be performed: a test to see if the user allowed to create a mount in the mount namespace, and a test to see if the user is allowed to access the specified filesystem. The automount case is special in that mounting the original filesystem grants permission to mount the sub-filesystems, to any user who happens to stumble across the their mountpoint and satisfies the ordinary filesystem permission checks. Attempting to handle the automount case by using override_creds almost works. It preserves the idea that permission to mount the original filesystem is permission to mount the sub-filesystem. Unfortunately using override_creds messes up the filesystems ordinary permission checks. Solve this by being explicit that a mount is a submount by introducing vfs_submount, and using it where appropriate. vfs_submount uses a new mount internal mount flags MS_SUBMOUNT, to let sget and friends know that a mount is a submount so they can take appropriate action. sget and sget_userns are modified to not perform any permission checks on submounts. follow_automount is modified to stop using override_creds as that has proven problemantic. do_mount is modified to always remove the new MS_SUBMOUNT flag so that we know userspace will never by able to specify it. autofs4 is modified to stop using current_real_cred that was put in there to handle the previous version of submount permission checking. cifs is modified to pass the mountpoint all of the way down to vfs_submount. debugfs is modified to pass the mountpoint all of the way down to trace_automount by adding a new parameter. To make this change easier a new typedef debugfs_automount_t is introduced to capture the type of the debugfs automount function. Cc: stable@vger.kernel.org Fixes: 069d5ac9ae0d ("autofs: Fix automounts by using current_real_cred()->uid") Fixes: aeaa4a79ff6a ("fs: Call d_automount with the filesystems creds") Reviewed-by: Trond Myklebust Reviewed-by: Seth Forshee Signed-off-by: "Eric W. Biederman" fs/afs/mntpt.c | 2 +- fs/autofs4/waitq.c | 4 ++-- fs/cifs/cifs_dfs_ref.c | 7 ++++--- fs/debugfs/inode.c | 8 ++++---- fs/namei.c | 3 --- fs/namespace.c | 17 ++++++++++++++++- fs/nfs/namespace.c | 2 +- fs/nfs/nfs4namespace.c | 2 +- fs/super.c | 13 ++++++++++--- include/linux/debugfs.h | 3 ++- include/linux/mount.h | 3 +++ include/uapi/linux/fs.h | 1 + kernel/trace/trace.c | 4 ++-- 13 files changed, 47 insertions(+), 22 deletions(-) commit b1c01f4df20a6376fe6245644225ff9fe97c5f95 Author: Takashi Iwai Date: Mon Jan 30 17:56:39 2017 +0100 drm/i915: Pass platform device to LPE audio notifier This allows the LPE HDMI driver to clean up its global variable reference. Also drop to pass the eld pointer because the connection status and the ELD bytes can be retrieved from the attached pdata. Acked-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/intel_lpe_audio.c | 3 +-- include/drm/intel_lpe_audio.h | 4 +++- sound/x86/intel_hdmi_lpe_audio.c | 23 +++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) commit 0843e043cf2e5d12a4041efd9c794a213a3ef93b Author: Pierre-Louis Bossart Date: Tue Jan 31 14:16:53 2017 -0600 ALSA: x86: Use config base depending on the pipe Now the pipe that is being used is passed over i915 notification, we can re-setup the relevant register offset depending on pipe assignments during hotplug. This allows playback on single port machines such Zotac Pi330 or dual-port machines such as Dell Wyse 3040 box Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 964ca8083c0239b5a729ed08c9f50b6c31ab3a93 Author: Pierre-Louis Bossart Date: Tue Jan 31 14:16:52 2017 -0600 ALSA: x86: intel_hdmi: add definitions and logic for DP audio Imported from legacy patches Note: the new code doesn't assume a modified ELD but an explicit notification that DP is present. It appears that the i915 code does change the ELD so we could use the ELD-based tests to check for DP audio Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 173 +++++++++++++++++++++++++++++++++------ sound/x86/intel_hdmi_audio.h | 8 +- sound/x86/intel_hdmi_lpe_audio.c | 36 +++++++- sound/x86/intel_hdmi_lpe_audio.h | 29 +++++++ 4 files changed, 216 insertions(+), 30 deletions(-) commit f95e29b92190607c66dc5c96b7e0de9c332062c2 Author: Takashi Iwai Date: Tue Jan 31 14:16:51 2017 -0600 drm/i915: Pass pipe to LPE audio notification The LPE audio configuration depends on the pipe, thus we need to pass the currently used pipe. It's now embedded in struct intel_hdmi_lpe_audio_eld as well as port id. Acked-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_audio.c | 6 +++--- drivers/gpu/drm/i915/intel_lpe_audio.c | 3 ++- include/drm/intel_lpe_audio.h | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) commit 9c9191f3de5926830346750ce4417d261027ab80 Author: Takashi Iwai Date: Tue Jan 31 14:16:50 2017 -0600 drm/i915: Avoid MST pipe handling for LPE audio The pipe gets cleared to -1 for non-MST before the ELD audio notification due to the MST audio support. This makes sense for HD-audio that received the MST handling, but it's useless for LPE audio. Handle the MST pipe hack conditionally only for HD-audio. Reported-by: Pierre-Louis Bossart Acked-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/intel_audio.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit d5d8c3a19e43ca588555d88e1d43a00aeacd0e56 Author: Pierre-Louis Bossart Date: Tue Jan 31 14:16:49 2017 -0600 drm/i915: add DisplayPort amp unmute for LPE audio mode Enable unmute/mute amp notification. This doesn't seem to affect HDMI support so this is done unconditionally. An earlier version of this patch set a chicken bit at address 0x62F38 prior to the mute/unmute but this register doesn't seem to do anything so this phase was removed. v1->v2: Drop needless pipe A check, avoid temporary reg offset variable. v2->v3: Add "_" prefix to VLV_AUD_PORT_EN_X_DBG as they are internal. Signed-off-by: Pierre-Louis Bossart Acked-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++ drivers/gpu/drm/i915/intel_lpe_audio.c | 12 ++++++++++++ 2 files changed, 22 insertions(+) commit b5f2be9ae5bf88f5751cc9f5813ed28e7f87402d Author: Pierre-Louis Bossart Date: Tue Jan 31 14:16:48 2017 -0600 drm/i915: add DP support in LPE audio mode If DisplayPort is detected, pass flag and link rate to audio driver Signed-off-by: Pierre-Louis Bossart Acked-by: Ville Syrjälä Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/intel_audio.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/intel_lpe_audio.c | 7 ++++++- include/drm/intel_lpe_audio.h | 2 ++ 4 files changed, 25 insertions(+), 6 deletions(-) commit 5238f60feb408efbb5ad212d9b5b98a44d97af3a Author: William Breathitt Gray Date: Mon Jan 30 13:33:47 2017 -0500 gpio: ws16c48: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the WinSystems WS16C48. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 210b4bde5fc9974e60a912f9a17c014c7cbf5b75 Author: William Breathitt Gray Date: Mon Jan 30 13:33:37 2017 -0500 gpio: gpio-mm: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the Diamond Systems GPIO-MM. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-gpio-mm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit e0af4b5e248bcfbdb056691c9b12ee697b07c213 Author: William Breathitt Gray Date: Mon Jan 30 13:33:21 2017 -0500 gpio: 104-idio-16: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-IDIO-16. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4891486fb2c80eaf3bb0f9eb065d15ecd357702f Author: Heiner Kallweit Date: Wed Feb 1 08:05:22 2017 +0100 reset: core: fix reset_control_put Commit "reset: make optional functions really optional" missed to adjust one check in reset_control_put, causing a NULL pointer access for optional resets. Fixes: bb475230b8e5 "reset: make optional functions really optional" Signed-off-by: Heiner Kallweit Signed-off-by: Philipp Zabel drivers/reset/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a71dc2537a1ad792d6c3dc6129c60ec28447f215 Author: William Breathitt Gray Date: Mon Jan 30 13:33:11 2017 -0500 gpio: 104-idi-48: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-IDI-48. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 7bdba73effe286fd607da9bb7448dd07a4452a33 Author: William Breathitt Gray Date: Mon Jan 30 13:32:58 2017 -0500 gpio: 104-dio-48e: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-DIO-48E. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 9e1b487bb494f1fd45ce4952aa665ba1611d34b4 Author: William Breathitt Gray Date: Mon Jan 30 09:40:26 2017 -0500 gpio: ws16c48: Remove unnecessary driver_data set Setting driver_data was necessary to access private data in the ws16c48_remove function. Now that the ws16c48_remove function is gone, driver_data is no longer used. This patch removes the relevant code. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 2 -- 1 file changed, 2 deletions(-) commit 232a448706a2ad102b3689687c1ba99e67847e68 Author: William Breathitt Gray Date: Mon Jan 30 09:40:15 2017 -0500 gpio: gpio-mm: Remove unnecessary driver_data set Setting driver_data was necessary to access private data in the gpiomm_remove function. Now that the gpiomm_remove function is gone, driver_data is no longer used. This patch removes the relevant code. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-gpio-mm.c | 2 -- 1 file changed, 2 deletions(-) commit c74f04d4b5b5049d6bd94bdc85a9da7b5896ca4b Author: William Breathitt Gray Date: Mon Jan 30 09:39:57 2017 -0500 gpio: 104-idio-16: Remove unnecessary driver_data set Setting driver_data was necessary to access private data in the idio_16_remove function. Now that the idio_16_remove function is gone, driver_data is no longer used. This patch removes the relevant code. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 2 -- 1 file changed, 2 deletions(-) commit b4e73edee51a3c1c00186fe86b51f6626757ffc3 Author: William Breathitt Gray Date: Mon Jan 30 09:39:47 2017 -0500 gpio: 104-idi-48: Remove unnecessary driver_data set Setting driver_data was necessary to access private data in the idi_48_remove function. Now that the idi_48_remove function is gone, driver_data is no longer used. This patch removes the relevant code. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 2 -- 1 file changed, 2 deletions(-) commit 3547f1405d0346d5c10c377762a70b7090f8ed7b Author: William Breathitt Gray Date: Mon Jan 30 09:39:37 2017 -0500 gpio: 104-dio-48e: Remove unnecessary driver_data set Setting driver_data was necessary to access private data in the dio48e_remove function. Now that the dio48e_remove function is gone, driver_data is no longer used. This patch removes the relevant code. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 2 -- 1 file changed, 2 deletions(-) commit d7cb3a507d23ef42574709fc5f2ca954e274ff91 Merge: 5443624 b05d109 Author: Ingo Molnar Date: Wed Feb 1 15:32:36 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170201' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Allow configuring a 'perf ftrace' default --tracer (Taeung Song) Infrastructure changes: - Sync tools/arch/{powerpc,arm}/include/uapi/asm/kvm.h and tools/arch/x86/include/asm/cpufeatures.h (Ingo Molnar) - Add BPF program file system pinning APIs and respective 'perf test' entry (Joe Stringer) - Make tools tree support 'make -s' (Josh Poimboeuf) - Reference count maps in callchains, fixing SEGFAULT when referencing maps after it is freed (Krister Johansen) - Create for_each_event trace points iterator (Taeung Song) - Do not consider an error not to have any perfconfig file (Arnaldo Carvalho de Melo - Propagate perf_config() errors (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 93946c49cdafd6a2e4039a8208564fd18e9120c3 Author: Alexandre Belloni Date: Wed Feb 1 12:54:13 2017 +0100 rtc: sun6i: extend test coverage COMPILE_TEST was wrongly placed, move it to the "depends on" line. Also depend on COMMON_CLK as the driver now needs it to be properly compiled. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 15829cf4b3f8dd3849446138830e629715848d7f Author: Chen-Yu Tsai Date: Sun Jan 29 18:13:43 2017 +0800 rtc: sun6i: Fix compatibility with old DT binding Commit 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") adds a new clock for the rtc block with a 2 step probe mechanism. To share the register region between both the clock and rtc instance, a static pointer is used to keep the related data structure. To preserve compatibility with the old binding, the data structure should be saved as soon as the registers are mapped in, regardless of the presence of the clock bindings, so that the rtc device can retrieve it when it is probed. This fixes the rtc device not probing when we use the updated driver with an old device tree blob. Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7bb633b1a9812a6b9f3e49d0cf17f60a633914e5 Author: Guy Shapiro Date: Sun Jan 29 11:57:19 2017 +0200 rtc: snvs: add a missing write sync The clear of the LPTA_EN flag should be synced before writing to the alarm register. Omitting this synchronization creates a race when trying to change existing alarm. Signed-off-by: Guy Shapiro Signed-off-by: Alexandre Belloni drivers/rtc/rtc-snvs.c | 1 + 1 file changed, 1 insertion(+) commit 4c466872d8ae8e3cdc3e5e1a47e28a15e3020d8b Author: Enric Balletbo i Serra Date: Fri Jan 27 18:43:46 2017 +0100 rtc: bq32000: add support to enable disable the trickle charge FET bypass The bq32000 includes a trickle charge circuit to maintain the charge of the backup supply when a super capacitor is used. You can enable the charging circuit by setting 'trickle-resistor-ohms', additionally you can set TCFE to 1 to bypass the internal diode and boost the charge voltage of the backup supply. You might want to enable/disable the TCFE switch from userspace (e.g when device is only connected to a battery) This patch introduces a new sysfs entry to enable and disable this FET form userspace. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Alexandre Belloni .../ABI/testing/sysfs-bus-i2c-devices-bq32k | 7 ++ drivers/rtc/rtc-bq32k.c | 76 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) commit 5dff3a3113173a0c835abbda0eef3c0a2a56cc3a Author: Maxime Ripard Date: Mon Jan 23 11:41:50 2017 +0100 rtc: sun6i: Switch to devm_rtc_device_register Now that we have a devm variant of rtc_device_register, switch to it. Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 3855c2c3e5461ab5ece9c1578650fcc23dd248c2 Author: Maxime Ripard Date: Mon Jan 23 11:41:49 2017 +0100 rtc: sun6i: Expose the 32kHz oscillator The RTC controls the input source of the main 32kHz oscillator in the system, feeding it to the clock unit too. By default, this is using an internal, very inaccurate (+/- 30%) oscillator with a divider to make it roughly around 32kHz. This is however quite impractical for the RTC, since our time will not be tracked properly. Since this oscillator is an input of the main clock unit, and since that clock unit will be probed using CLK_OF_DECLARE, we have to use it as well, leading to a two stage probe: one to enable the clock, the other one to enable the RTC. There is also a slight change in the binding that is required (and should have been from the beginning), since we'll need a phandle to the external oscillator used on that board. We support the old binding by not allowing to switch to the external oscillator and only using the internal one (which was the previous behaviour) in the case where we're missing that phandle. Signed-off-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/sun6i-rtc.txt | 10 ++ drivers/rtc/rtc-sun6i.c | 146 +++++++++++++++++++-- 2 files changed, 143 insertions(+), 13 deletions(-) commit fb61bb82cb46a932ef2fc62e1c731c8e7e6640d5 Author: Maxime Ripard Date: Mon Jan 23 11:41:48 2017 +0100 rtc: sun6i: Switch to the external oscillator The RTC is clocked from either an internal, imprecise, oscillator or an external one, which is usually much more accurate. The difference perceived between the time elapsed and the time reported by the RTC is in a 10% scale, which prevents the RTC from being useful at all. Fortunately, the external oscillator is reported to be mandatory in the Allwinner datasheet, so we can just switch to it. Cc: stable@vger.kernel.org Fixes: 9765d2d94309 ("rtc: sun6i: Add sun6i RTC driver") Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a9422a19ce270a22fc520f2278fb7e80c58be508 Author: Maxime Ripard Date: Mon Jan 23 11:41:47 2017 +0100 rtc: sun6i: Add some locking Some registers have a read-modify-write access pattern that are not atomic. Add some locking to prevent from concurrent accesses. Cc: stable@vger.kernel.org Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 11710dec8a45084a3e0ad2f6da944c990fad23a4 Author: Christoffer Dall Date: Wed Feb 1 11:03:45 2017 +0100 KVM: arm/arm64: Remove kvm_vgic_inject_mapped_irq The only benefit of having kvm_vgic_inject_mapped_irq separate from kvm_vgic_inject_irq is that we pass a boolean that we use for error checking on the injection path. While this could potentially help in some aspect of robustness, it's also a little bit of a defensive move, and arguably callers into the vgic should have make sure they have marked their virtual IRQs as mapped if required. Acked-by: Marc Zyngier Reviewed-by: Andre Przywara Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 3 ++- virt/kvm/arm/vgic/vgic.c | 50 +++++++++++++++-------------------------------- 2 files changed, 18 insertions(+), 35 deletions(-) commit 5443624bedd0d23e112d5f2a919435182875bce9 Author: Alexander Shishkin Date: Fri Jan 27 17:16:43 2017 +0200 perf/x86/intel/pt: Add format strings for PTWRITE and power event tracing Commit: 8ee83b2ab3 ("perf/x86/intel/pt: Add support for PTWRITE and power event tracing") forgot to add format strings to the PT driver. So one could enable these features by setting corresponding bits in the event config, but not by their mnemonic names. This patch adds the format strings. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Fixes: 8ee83b2ab3 ("perf/x86/intel/pt: Add support for PTWRITE...") Link: http://lkml.kernel.org/r/20170127151644.8585-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 975e155ed8732cb81f55c021c441ae662dd040b5 Author: Shile Zhang Date: Sat Jan 28 22:00:49 2017 +0800 sched/rt: Show the 'sched_rr_timeslice' SCHED_RR timeslice tuning knob in milliseconds We added the 'sched_rr_timeslice_ms' SCHED_RR tuning knob in this commit: ce0dbbbb30ae ("sched/rt: Add a tuning knob to allow changing SCHED_RR timeslice") ... which name suggests to users that it's in milliseconds, while in reality it's being set in milliseconds but the result is shown in jiffies. This is obviously confusing when HZ is not 1000, it makes it appear like the value set failed, such as HZ=100: root# echo 100 > /proc/sys/kernel/sched_rr_timeslice_ms root# cat /proc/sys/kernel/sched_rr_timeslice_ms 10 Fix this to be milliseconds all around. Signed-off-by: Shile Zhang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1485612049-20923-1-git-send-email-shile.zhang@nokia.com Signed-off-by: Ingo Molnar include/linux/sched/sysctl.h | 1 + kernel/sched/core.c | 5 +++-- kernel/sched/rt.c | 1 + kernel/sysctl.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) commit 733ce725aa4bfa9063be053bfe7f4597d76f0dd1 Author: Paul Gortmaker Date: Fri Jan 27 12:38:16 2017 -0500 sched/clock: Add dummy clear_sched_clock_stable() stub function In commit: acb04058de494 ("sched/clock: Fix hotplug crash") the PARISC code gained a call to this function. However the prototype for it is within a CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y #ifdef/#endif. That, combined with this: arch/parisc/Kconfig: select HAVE_UNSTABLE_SCHED_CLOCK if SMP means that PARISC can have it either enabled or disabled, resulting in the following build fail: arch/parisc/kernel/setup.c:180:2: error: implicit declaration of function 'clear_sched_clock_stable' [-Werror=implicit-function-declaration] Add a no-op stub for the non-SMP case to prevent this. Signed-off-by: Paul Gortmaker Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: acb04058de49 ("sched/clock: Fix hotplug crash") Link: http://lkml.kernel.org/r/20170127173816.22733-1-paul.gortmaker@windriver.com Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ++++ 1 file changed, 4 insertions(+) commit ec671b5360b914fb3ad79053593d195996a95dde Author: Arnd Bergmann Date: Wed Feb 1 17:56:28 2017 +0100 remoteproc: qcom: fix initializers for qcom_mss_reg_res array The recently added initialization is rather unusual because it uses a constructor for a variable-length array to assign a constant structure to a member that uses a fixed-length array. This confuses clang and breaks the build. drivers/remoteproc/qcom_q6v5_pil.c:1024:18: error: incompatible pointer types initializing 'const char *' with an expression of type :%s 'struct qcom_mss_reg_res [4]' [-Werror,-Wincompatible-pointer-types] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/remoteproc/qcom_q6v5_pil.c:1024:18: warning: suggest braces around initialization of subobject [-Wmissing-braces] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can either turn this constructor into a regular initializer by removing the 'struct qcom_mss_reg_res[])', or we can make the array variable length. The latter approach is used for the arrays of strings in the same structure, so let's use that here too. Fixes: 19f902b53b47 ("remoteproc: qcom: Initialize and enable proxy and active regulators.") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e74016370ec3d552a7f5df18bb2b0f1c80b5a9f Author: travis@sgi.com Date: Wed Jan 25 10:35:24 2017 -0600 x86/platform/UV: Clean up the NMI code to match current coding style Update UV NMI to current coding style. Signed-off-by: Mike Travis Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Link: http://lkml.kernel.org/r/20170125163518.419094259@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/uv_nmi.c | 74 +++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 9ec808a0225aabab59fb2932b70784b087ac0f58 Author: travis@sgi.com Date: Wed Jan 25 10:35:23 2017 -0600 x86/platform/UV: Ensure uv_system_init is called when necessary Move the check to whether this is a UV system that needs initialization from is_uv_system() to the internal uv_system_init() function. This is because on a UV system without a HUB the is_uv_system() returns false. But we still need some specific UV system initialization. See the uv_system_init() for change to a quick check if UV is applicable. This change should not increase overhead since is_uv_system() also called into this same area. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163518.256403963@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 56e17ca2c5ed31f5812ed8e0694e7ef880068cfd Author: travis@sgi.com Date: Wed Jan 25 10:35:22 2017 -0600 x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source The initialize PCH NMI I/O function is separate and may be moved to BIOS for security reasons. This function detects whether the PCH NMI config has already been done and if not, it will then initialize the PCH here. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163518.089387859@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/uv_nmi.c | 127 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) commit f550e4692749a909d3f5453ef11b4c8ab2071070 Author: travis@sgi.com Date: Wed Jan 25 10:35:21 2017 -0600 x86/platform/UV: Verify NMI action is valid, default is standard Verify that the NMI action being set is valid. The default NMI action changes from the non-standard 'kdb' to the more standard 'dump'. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Reviewed-by: Alex Thorlton Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163517.922751779@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/uv_nmi.c | 69 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 11 deletions(-) commit 278c9b099b2fc0cc0a51de95a1dcefcf54ca2183 Author: travis@sgi.com Date: Wed Jan 25 10:35:20 2017 -0600 x86/platform/UV: Add basic CPU NMI health check Add a low impact health check triggered by the system NMI command that essentially checks which CPUs are responding to external NMI's. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Reviewed-by: Alex Thorlton Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163517.756690240@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/uv_nmi.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit abdf1df6bc0416ec19b841e92b497ca55b23454c Author: travis@sgi.com Date: Wed Jan 25 10:35:19 2017 -0600 x86/platform/UV: Add Support for UV4 Hubless NMIs Merge new UV Hubless NMI support into existing UV NMI handler. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163517.585269837@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_hub.h | 3 + arch/x86/kernel/apic/x2apic_uv_x.c | 2 + arch/x86/platform/uv/uv_nmi.c | 193 ++++++++++++++++++++++++++++++++----- 3 files changed, 176 insertions(+), 22 deletions(-) commit 74862b03b46a852662c1a30c859b985261ff5d5c Author: travis@sgi.com Date: Wed Jan 25 10:35:18 2017 -0600 x86/platform/UV: Add Support for UV4 Hubless systems Add recognition and support for UV4 hubless systems. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Acked-by: Thomas Gleixner Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170125163517.398537358@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv.h | 2 ++ arch/x86/kernel/apic/x2apic_uv_x.c | 30 ++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) commit 7243e10689fd17a3e151f41216569295cefa2958 Author: Ingo Molnar Date: Sat Jan 14 09:26:12 2017 +0100 x86/platform/UV: Clean up the UV APIC code Make it more readable. Acked-by: Thomas Gleixner Cc: Dimitri Sivanich Cc: Linus Torvalds Cc: Mike Travis Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170114082612.GA27842@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 500 ++++++++++++++++++------------------- 1 file changed, 244 insertions(+), 256 deletions(-) commit 1055e0ba568b2ab03de384b70947cd41d2c6ad82 Merge: e2e2eab 0becc0a Author: Ingo Molnar Date: Wed Feb 1 10:19:35 2017 +0100 Merge branch 'x86/urgent' into x86/platform, to pick up fixes Signed-off-by: Ingo Molnar commit 0754445d71c37a7afd4f0790a9be4cf53c1b8cc4 Author: Davidlohr Bueso Date: Sun Jan 29 07:15:31 2017 -0800 sched/wake_q: Clarify queue reinit comment As of: bcc9a76d5ac ("locking/rwsem: Reinit wake_q after use") the comment regarding the list reinitialization no longer applies, update it with the new wake_q_init() helper. Signed-off-by: Davidlohr Bueso Acked-by: Waiman Long Cc: peterz@infradead.org Cc: longman@redhat.com Cc: akpm@linux-foundation.org Cc: paulmck@linux.vnet.ibm.com Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20170129151531.GA2444@linux-80c1.suse Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e1f9467d1e48c64c27d6a32de1bfd1b9cdb1002 Author: Davidlohr Bueso Date: Sun Jan 29 07:42:12 2017 -0800 sched/wait, rcuwait: Fix typo in comment Forgot to update the comment after renaming the call. Signed-off-by: Davidlohr Bueso Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1485704532-9290-1-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar include/linux/rcuwait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b672592f022152155fde7db99aafbcf04a2c3ba5 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:51 2017 +0100 sched/cputime: Remove generic asm headers cputime_t is now only used by two architectures: * powerpc (when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y) * s390 And since the core doesn't use it anymore, we don't need any arch support from the others. So we can remove their stub implementations. A final cleanup would be to provide an efficient pure arch implementation of cputime_to_nsec() for s390 and powerpc and finally remove include/linux/cputime.h . Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-36-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/Kbuild | 1 - arch/arc/include/asm/Kbuild | 1 - arch/arm/include/asm/Kbuild | 1 - arch/arm64/include/asm/Kbuild | 1 - arch/avr32/include/asm/Kbuild | 1 - arch/blackfin/include/asm/Kbuild | 1 - arch/c6x/include/asm/Kbuild | 1 - arch/cris/include/asm/Kbuild | 1 - arch/frv/include/asm/Kbuild | 1 - arch/h8300/include/asm/Kbuild | 1 - arch/hexagon/include/asm/Kbuild | 1 - arch/ia64/include/asm/cputime.h | 4 +--- arch/m32r/include/asm/Kbuild | 1 - arch/m68k/include/asm/Kbuild | 1 - arch/metag/include/asm/Kbuild | 1 - arch/microblaze/include/asm/Kbuild | 1 - arch/mips/include/asm/Kbuild | 1 - arch/mn10300/include/asm/Kbuild | 1 - arch/nios2/include/asm/Kbuild | 1 - arch/openrisc/include/asm/Kbuild | 1 - arch/parisc/include/asm/Kbuild | 1 - arch/powerpc/include/asm/cputime.h | 4 +--- arch/score/include/asm/Kbuild | 1 - arch/sh/include/asm/Kbuild | 1 - arch/sparc/include/asm/Kbuild | 1 - arch/tile/include/asm/Kbuild | 1 - arch/um/include/asm/Kbuild | 1 - arch/unicore32/include/asm/Kbuild | 1 - arch/x86/include/asm/Kbuild | 1 - arch/xtensa/include/asm/Kbuild | 1 - include/asm-generic/cputime.h | 7 ------- include/linux/cputime.h | 2 ++ 32 files changed, 4 insertions(+), 41 deletions(-) commit 934ad473552a48d303a54279518aa19cf674567d Author: Frederic Weisbecker Date: Tue Jan 31 04:09:50 2017 +0100 sched/cputime: Remove unused nsec_to_cputime() It's unused now. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-35-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/cputime.h | 5 ----- 1 file changed, 5 deletions(-) commit ea3a96d0b4d223fc5e70e06281356762613487bc Author: Frederic Weisbecker Date: Tue Jan 31 04:09:49 2017 +0100 s390, sched/cputime: Remove unused cputime definitions Since the core doesn't deal with cputime_t anymore, most of these APIs have been left unused. Lets remove these. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-34-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/s390/include/asm/cputime.h | 107 ---------------------------------------- 1 file changed, 107 deletions(-) commit e7f340ca9c0709508e6f590ac64f341058df241d Author: Frederic Weisbecker Date: Tue Jan 31 04:09:48 2017 +0100 powerpc, sched/cputime: Remove unused cputime definitions Since the core doesn't deal with cputime_t anymore, most of these APIs have been left unused. Lets remove these. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-33-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/include/asm/cputime.h | 173 ------------------------------------- arch/powerpc/kernel/time.c | 20 +---- 2 files changed, 2 insertions(+), 191 deletions(-) commit 42b425b3360a20ed08e0d735623f389bdf5e4500 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:47 2017 +0100 s390, sched/cputime: Make arch_cpu_idle_time() to return nsecs This way we don't need to deal with cputime_t details from the core code. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-32-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/s390/include/asm/cputime.h | 2 +- arch/s390/kernel/idle.c | 5 +++-- fs/proc/stat.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit c833d82df73483c1716243bcd9cb5b6fef94621f Author: Frederic Weisbecker Date: Tue Jan 31 04:09:46 2017 +0100 ia64, sched/cputime: Remove unused cputime definitions This nsec based cputime_t implementation isn't used anymore. We can remove it. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-31-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/include/asm/cputime.h | 106 ---------------------------------------- 1 file changed, 106 deletions(-) commit e2339a4caa5e83a3da5e76880d81e8a23e97aa16 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:45 2017 +0100 ia64: Convert vtime to use nsec units directly There is no need anymore for this cputime_t midlayer. Let's use nsec units directly. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-30-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/head.S | 4 ++-- arch/ia64/kernel/time.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 4c562529f1ded4801f572e6dfcb464e598ef8f15 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:44 2017 +0100 ia64, sched/cputime: Move the nsecs based cputime headers to the last arch using it Initially, nsec based cputime_t implementation belonged to IA64. It got exported later for CONFIG_VIRT_CPU_ACCOUNTING_GEN but now it is again only used by IA64. So let's move it back there. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-29-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/include/asm/cputime.h | 108 +++++++++++++++++++++++++++++++- include/asm-generic/cputime.h | 4 -- include/asm-generic/cputime_nsecs.h | 121 ------------------------------------ 3 files changed, 106 insertions(+), 127 deletions(-) commit f22d6df0b23e66b6d9058e2570402606a6ad069a Author: Frederic Weisbecker Date: Tue Jan 31 04:09:43 2017 +0100 sched/cputime: Remove jiffies based cputime This cputime_t implementation is now unused, we can remove it. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-28-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/asm-generic/cputime.h | 4 -- include/asm-generic/cputime_jiffies.h | 75 ----------------------------------- 2 files changed, 79 deletions(-) commit bfce1d6006f383fbb55a89580af37819a77195b7 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:42 2017 +0100 sched/cputime, vtime: Return nsecs instead of cputime_t to account Turn the full dynticks cputime clock source to return nsec while keeping its very internals jiffies based for performance reasons. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-27-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 2b1f967d80e8e5d7361f0e1654c842869570f573 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:41 2017 +0100 sched/cputime: Complete nsec conversion of tick based accounting This is the final step toward tick based cputime conversion. Now that the whole cputime accounting engine accounts in nsecs, we can convert the very source of the cputime to account in nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-26-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 52 +++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 30 deletions(-) commit fb8b049c988f1ff460b063b8a41ea9a3c79921c2 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:40 2017 +0100 sched/cputime: Push time to account_system_time() in nsecs This is one more step toward converting cputime accounting to pure nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-25-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 11 ++++++----- arch/powerpc/kernel/time.c | 15 ++++++++------- arch/s390/kernel/idle.c | 2 +- arch/s390/kernel/vtime.c | 6 +++--- include/linux/kernel_stat.h | 7 +++---- kernel/sched/cputime.c | 39 +++++++++++++++++++-------------------- 6 files changed, 40 insertions(+), 40 deletions(-) commit 18b43a9bd7ae91185e398dd983fb4fffb9e81b3a Author: Frederic Weisbecker Date: Tue Jan 31 04:09:39 2017 +0100 sched/cputime: Push time to account_idle_time() in nsecs This is one more step toward converting cputime accounting to pure nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-24-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 2 +- arch/powerpc/kernel/time.c | 2 +- arch/s390/kernel/idle.c | 2 +- include/linux/kernel_stat.h | 2 +- kernel/sched/cputime.c | 18 +++++++++--------- 5 files changed, 13 insertions(+), 13 deletions(-) commit be9095ed4fb3cf69e9fdf64e28ff6b5bd0ec7215 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:38 2017 +0100 sched/cputime: Push time to account_steal_time() in nsecs This is one more step toward converting cputime accounting to pure nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-23-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/kernel/time.c | 2 +- arch/s390/kernel/vtime.c | 2 +- include/linux/kernel_stat.h | 2 +- kernel/sched/cputime.c | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) commit 23244a5c8003d4154161a8289a7d3783b0237c08 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:37 2017 +0100 sched/cputime: Push time to account_user_time() in nsecs This is one more step toward converting cputime accounting to pure nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-22-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 2 +- arch/powerpc/kernel/time.c | 2 +- arch/s390/kernel/vtime.c | 2 +- include/linux/kernel_stat.h | 2 +- kernel/sched/cputime.c | 42 ++++++++++++++++++++++++------------------ 5 files changed, 28 insertions(+), 22 deletions(-) commit 71ea47b197de9a53bc3747a8b1c667df9c6a4c68 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:36 2017 +0100 sched/cputime: Remove temporary cputime_t accessors Now that the whole cputime conversion to nsec units is complete, we can remove the compatibility accessors. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-21-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 40 ---------------------------------------- 1 file changed, 40 deletions(-) commit 858cf3a8c59968e7c5f7c1a1192459a0d52d1ab4 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:35 2017 +0100 timers/itimer: Convert internal cputime_t units to nsec Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Also convert itimers to use nsec based internal counters. This simplifies it and removes the whole game with error/inc_error which served to deal with cputime_t random granularity. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-20-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/posix-timers.h | 2 +- include/linux/sched.h | 6 ++-- include/trace/events/timer.h | 26 ++++++++--------- kernel/time/itimer.c | 64 +++++++++++++++--------------------------- kernel/time/posix-cpu-timers.c | 43 +++++++++++----------------- 5 files changed, 55 insertions(+), 86 deletions(-) commit ebd7e7fc4bc63be5eaf9da903b8060b02dd711ea Author: Frederic Weisbecker Date: Tue Jan 31 04:09:34 2017 +0100 timers/posix-timers: Convert internals to use nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Also convert posix-cpu-timers to use nsec based internal counters to simplify it. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-19-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/posix-timers.h | 12 +-- include/linux/sched.h | 6 +- kernel/fork.c | 2 +- kernel/sched/cputime.c | 6 +- kernel/sched/stats.h | 4 +- kernel/time/itimer.c | 6 +- kernel/time/posix-cpu-timers.c | 210 +++++++++++++++++------------------------ 7 files changed, 100 insertions(+), 146 deletions(-) commit 715eb7a9243a058a0722aa2f6ba703ede9113e76 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:33 2017 +0100 timers/posix-timers: Use TICK_NSEC instead of a dynamically ad-hoc calculated version Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-18-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/time/posix-cpu-timers.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a499a5a14dbd1d0315a96fc62a8798059325e9e6 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:32 2017 +0100 sched/cputime: Increment kcpustat directly on irqtime account The irqtime is accounted is nsecs and stored in cpu_irq_time.hardirq_time and cpu_irq_time.softirq_time. Once the accumulated amount reaches a new jiffy, this one gets accounted to the kcpustat. This was necessary when kcpustat was stored in cputime_t, which could at worst have jiffies granularity. But now kcpustat is stored in nsecs so this whole discretization game with temporary irqtime storage has become unnecessary. We can now directly account the irqtime to the kcpustat. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-17-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 50 +++++++++++++++++--------------------------------- kernel/sched/sched.h | 7 ++++--- 2 files changed, 21 insertions(+), 36 deletions(-) commit bde8285e5cf78417afda79f53bbc26ef801a27e7 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:31 2017 +0100 signal: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-16-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/signal.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 605dc2b31a2ab235570107cb650036b41e741165 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:30 2017 +0100 tsacct: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-15-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 +- kernel/tsacct.c | 27 ++++++++++++--------------- 2 files changed, 13 insertions(+), 16 deletions(-) commit dbf3da1c2d14a6b0b9bac76a3f9912aff48487e7 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:29 2017 +0100 delaycct: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-14-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/delayacct.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d4bc42af73bf297f7182ed978b19850553242195 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:28 2017 +0100 acct: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-13-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 +- kernel/acct.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit cd19c364b313c179410fcac8376330964cc9bfd9 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:27 2017 +0100 fs/binfmt: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-12-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/mips/kernel/binfmt_elfn32.c | 12 ++---------- arch/mips/kernel/binfmt_elfo32.c | 12 ++---------- arch/parisc/kernel/binfmt_elf32.c | 11 ++--------- fs/binfmt_elf.c | 26 ++++++++++---------------- fs/binfmt_elf_fdpic.c | 16 ++++++++-------- fs/compat_binfmt_elf.c | 18 ++---------------- include/linux/compat.h | 20 +++++++++++++++++++- 7 files changed, 45 insertions(+), 70 deletions(-) commit c0e7a5000d4da3d64b2eeabfb7e9f327626f6ade Author: Frederic Weisbecker Date: Tue Jan 31 04:09:26 2017 +0100 isdn: Convert obsolete cputime type to nsecs Not sure if MISDN stats are ABI but it displays task cputime in cputime_t raw value regardless of what type cputime_t wraps which could be either jiffies, nsecs, usecs, or whatever random time unit. Plus it wrongly assumes that cputime_t is long. Given that this dump is broken anyway, lets just display the nanosec value and stick with that. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-11-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar drivers/isdn/mISDN/stack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7dcd63de44219fb5e9a36fc2c0ca23ddd79d01c Author: Frederic Weisbecker Date: Tue Jan 31 04:09:25 2017 +0100 x86: Convert obsolete cputime type to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-10-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/apm_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc9b77b56c2e78f18139bddc844bc484fc4281ba Author: Frederic Weisbecker Date: Tue Jan 31 04:09:24 2017 +0100 alpha: Convert obsolete cputime_t to nsecs Use the new nsec based cputime accessors as part of the whole cputime conversion from cputime_t to nsecs. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-9-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5613fda9a503cd6137b120298902a34a1386b2c1 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:23 2017 +0100 sched/cputime: Convert task/group cputime to nsecs Now that most cputime readers use the transition API which return the task cputime in old style cputime_t, we can safely store the cputime in nsecs. This will eventually make cputime statistics less opaque and more granular. Back and forth convertions between cputime_t and nsecs in order to deal with cputime_t random granularity won't be needed anymore. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-8-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 4 ++-- arch/powerpc/kernel/time.c | 4 ++-- arch/s390/kernel/vtime.c | 6 ++--- arch/x86/kvm/hyperv.c | 5 +++-- fs/binfmt_elf.c | 11 +++++++-- fs/binfmt_elf_fdpic.c | 4 ++-- fs/proc/array.c | 10 ++++----- include/linux/sched.h | 55 ++++++++++++++++++++++++++++----------------- kernel/exit.c | 4 ++-- kernel/sched/cputime.c | 35 ++++++++++++++--------------- kernel/signal.c | 4 ++-- kernel/sys.c | 16 ++++++------- 12 files changed, 89 insertions(+), 69 deletions(-) commit a1cecf2ba78e0a6de00ff99df34b662728535aa5 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:22 2017 +0100 sched/cputime: Introduce special task_cputime_t() API to return old-typed cputime This API returns a task's cputime in cputime_t in order to ease the conversion of cputime internals to use nsecs units instead. Blindly converting all cputime readers to use this API now will later let us convert more smoothly and step by step all these places to use the new nsec based cputime. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-7-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/alpha/kernel/osf_sys.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- drivers/isdn/mISDN/stack.c | 2 +- fs/binfmt_elf.c | 6 +++--- fs/binfmt_elf_fdpic.c | 6 +++--- include/linux/sched.h | 32 ++++++++++++++++++++++++++--- kernel/acct.c | 2 +- kernel/delayacct.c | 4 ++-- kernel/signal.c | 4 ++-- kernel/time/itimer.c | 2 +- kernel/time/posix-cpu-timers.c | 46 +++++++++++++++++++++--------------------- kernel/tsacct.c | 6 +++--- 12 files changed, 70 insertions(+), 44 deletions(-) commit 16a6d9be90373fb0b521850cd0185a4d460dd152 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:21 2017 +0100 sched/cputime: Convert guest time accounting to nsecs (u64) cputime_t is being obsolete and replaced by nsecs units in order to make internal timestamps less opaque and more granular. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-6-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar fs/proc/array.c | 6 +++--- include/linux/sched.h | 10 +++++----- kernel/sched/cputime.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 564b733c899f4e12a64946658960fce80cad0b05 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:20 2017 +0100 macintosh/rack-meter: Convert cputime64_t use to u64 cputime_t is going to be removed and replaced by nsecs units, so convert the drivers/macintosh/rack-meter.c use to u64.. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-5-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar drivers/macintosh/rack-meter.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 7fb1327ee9b92fca27662f9b9d60c7c3376d6c69 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:19 2017 +0100 sched/cputime: Convert kcpustat to nsecs Kernel CPU stats are stored in cputime_t which is an architecture defined type, and hence a bit opaque and requiring accessors and mutators for any operation. Converting them to nsecs simplifies the code and is one step toward the removal of cputime_t in the core code. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/s390/appldata/appldata_os.c | 16 ++++----- drivers/cpufreq/cpufreq.c | 6 ++-- drivers/cpufreq/cpufreq_governor.c | 2 +- drivers/cpufreq/cpufreq_stats.c | 1 - drivers/macintosh/rack-meter.c | 2 +- fs/proc/stat.c | 68 +++++++++++++++++++------------------- fs/proc/uptime.c | 7 ++-- kernel/sched/cpuacct.c | 2 +- kernel/sched/cputime.c | 22 ++++++------ 9 files changed, 61 insertions(+), 65 deletions(-) commit ba03ce822db234f8acb559de4a317a5c1f95c029 Author: Frederic Weisbecker Date: Tue Jan 31 04:09:18 2017 +0100 sched/cputime: Remove the unused INIT_CPUTIME macro It's a leftover from removed code. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 7 ------- 1 file changed, 7 deletions(-) commit 07e5f5e353aaa61696c8353d87050994a0c4648a Author: Frederic Weisbecker Date: Tue Jan 31 04:09:17 2017 +0100 time: Introduce jiffies64_to_nsecs() This will be needed for the cputime_t to nsec conversion. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/jiffies.h | 2 ++ kernel/time/time.c | 10 ++++++++++ kernel/time/timeconst.bc | 6 ++++++ 3 files changed, 18 insertions(+) commit 93825f2ec736f30e034ab7c9d56b42849c5b00da Author: Frederic Weisbecker Date: Tue Jan 31 04:09:16 2017 +0100 jiffies: Reuse TICK_NSEC instead of NSEC_PER_JIFFY NSEC_PER_JIFFY is an ad-hoc redefinition of TICK_NSEC. Let's rather use a unique and well maintained version. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Tony Luck Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1485832191-26889-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/time/jiffies.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit ed5c8c854f2b990dfa4d85c4995d115768a05d3c Merge: 619bd4a a2ca3d6 Author: Ingo Molnar Date: Wed Feb 1 09:12:25 2017 +0100 Merge branch 'linus' into sched/core, to pick up fixes and refresh the branch Signed-off-by: Ingo Molnar commit 45bf86e7731606a475b7f989486de23b0784bfe7 Merge: 059c7a5 18566ac Author: Daniel Vetter Date: Wed Feb 1 09:06:26 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next Backmerge to resync and also so that Ville can apply a cleanup patch from Takashi. Signed-off-by: Daniel Vetter commit 696204faa6e8a318320ebb49d9fa69bc8275644d Author: Ard Biesheuvel Date: Tue Jan 31 13:21:42 2017 +0000 efi/libstub: Preserve .debug sections after absolute relocation check The build commands for the ARM and arm64 EFI stubs strip the .debug sections and other sections that may legally contain absolute relocations, in order to inspect the remaining sections for the presence of such relocations. This leaves us without debugging symbols in the stub for no good reason, considering that these sections are omitted from the kernel binary anyway, and that these relocations are thus only consumed by users of the ELF binary, such as debuggers. So move to 'strip' for performing the relocation check, and if it succeeds, invoke objcopy as before, but leaving the .debug sections in place. Note that these sections may refer to ksymtab/kcrctab contents, so leave those in place as well. 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/1485868902-20401-11-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/Makefile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 22c091d02a5422d2825a4fb1af71e5a62f9e4d0f Author: Dave Young Date: Tue Jan 31 13:21:41 2017 +0000 efi/x86: Add debug code to print cooked memmap It is not obvious if the reserved boot area are added correctly, add a efi_print_memmap() call to print the new memmap. Tested-by: Nicolai Stange Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Reviewed-by: Nicolai Stange Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-10-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7b0a911478c74ca02581d496f732c10e811e894f Author: Dave Young Date: Tue Jan 31 13:21:40 2017 +0000 efi/x86: Move the EFI BGRT init code to early init code Before invoking the arch specific handler, efi_mem_reserve() reserves the given memory region through memblock. efi_bgrt_init() will call efi_mem_reserve() after mm_init(), at which time memblock is dead and should not be used anymore. The EFI BGRT code depends on ACPI initialization to get the BGRT ACPI table, so move parsing of the BGRT table to ACPI early boot code to ensure that efi_mem_reserve() in EFI BGRT code still use memblock safely. Tested-by: Bhupesh Sharma Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Cc: Len Brown Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-9-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/kernel/acpi/boot.c | 9 ++++++ arch/x86/platform/efi/efi-bgrt.c | 59 +++++++++++++++++----------------------- arch/x86/platform/efi/efi.c | 5 ---- drivers/acpi/bgrt.c | 28 +++++++++++++------ include/linux/efi-bgrt.h | 11 ++++---- init/main.c | 1 - 6 files changed, 59 insertions(+), 54 deletions(-) commit c4c39c70c5fef43655019236bec8ba5e7273b868 Author: Ard Biesheuvel Date: Tue Jan 31 13:21:39 2017 +0000 efi: Use typed function pointers for the runtime services table Instead of using void pointers, and casting them to correctly typed function pointers upon use, declare the runtime services pointers as function pointers using their respective prototypes, for which typedefs are already available. Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-8-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar include/linux/efi.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit e66880808960322d8126f878d7fe315a3f1ada74 Author: Colin Ian King Date: Tue Jan 31 13:21:38 2017 +0000 efi/esrt: Fix typo in pr_err() message 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/1485868902-20401-7-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/esrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18141e89a76c58101860486fd9cc0999da2eed43 Author: Sai Praneeth Date: Tue Jan 31 13:21:37 2017 +0000 x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE UEFI v2.6 introduces EFI_MEMORY_ATTRIBUTES_TABLE which describes memory protections that may be applied to the EFI Runtime code and data regions by the kernel. This enables the kernel to map these regions more strictly thereby increasing security. Presently, the only valid bits for the attribute field of a memory descriptor are EFI_MEMORY_RO and EFI_MEMORY_XP, hence use these bits to update the mappings in efi_pgd. The UEFI specification recommends to use this feature instead of EFI_PROPERTIES_TABLE and hence while updating EFI mappings we first check for EFI_MEMORY_ATTRIBUTES_TABLE and if it's present we update the mappings according to this table and hence disregarding EFI_PROPERTIES_TABLE even if it's published by the firmware. We consider EFI_PROPERTIES_TABLE only when EFI_MEMORY_ATTRIBUTES_TABLE is absent. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: Fenghua Yu Cc: Lee, Chun-Yi Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-6-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_64.c | 64 +++++++++++++++++++++++++++++++++++------- drivers/firmware/efi/memattr.c | 5 +++- 2 files changed, 58 insertions(+), 11 deletions(-) commit a19ebf59e20880c87dd49b6336476307559ac5ba Author: Sai Praneeth Date: Tue Jan 31 13:21:36 2017 +0000 efi: Introduce the EFI_MEM_ATTR bit and set it from the memory attributes table UEFI v2.6 introduces a configuration table called EFI_MEMORY_ATTRIBUTES_TABLE which provides additional information about EFI runtime regions. Currently this table describes memory protections that may be applied to the EFI Runtime code and data regions by the kernel. Allocate a EFI_XXX bit to keep track of whether this feature is published by firmware or not. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Reviewed-by: Lee, Chun-Yi Cc: Borislav Petkov Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-5-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/memattr.c | 1 + include/linux/efi.h | 1 + 2 files changed, 2 insertions(+) commit 3a6b6c6fb23667fa383053bd5259aabc96468571 Author: Sai Praneeth Date: Tue Jan 31 13:21:35 2017 +0000 efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures Since EFI_PROPERTIES_TABLE and EFI_MEMORY_ATTRIBUTES_TABLE deal with updating memory region attributes, it makes sense to call EFI_MEMORY_ATTRIBUTES_TABLE initialization function from the same place as EFI_PROPERTIES_TABLE. This also moves the EFI_MEMORY_ATTRIBUTES_TABLE initialization code to a more generic efi initialization path rather than ARM specific efi initialization. This is important because EFI_MEMORY_ATTRIBUTES_TABLE will be supported by x86 as well. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Reviewed-by: Lee, Chun-Yi Cc: Borislav Petkov Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-4-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/arm-init.c | 1 - drivers/firmware/efi/efi.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit db4545d9a7881db0a7e18599e6cd1adbcb93db33 Author: Lukas Wunner Date: Tue Jan 31 13:21:34 2017 +0000 x86/efi: Deduplicate efi_char16_printk() Eliminate the separate 32-bit and 64x- bit code paths by way of the shiny new efi_call_proto() macro. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-3-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 26 ++------------------------ include/linux/efi.h | 8 ++++---- 2 files changed, 6 insertions(+), 28 deletions(-) commit 2bd79f30eea1a7c3082c930a91370bb68435b86d Author: Lukas Wunner Date: Tue Jan 31 13:21:33 2017 +0000 efi: Deduplicate efi_file_size() / _read() / _close() There's one ARM, one x86_32 and one x86_64 version which can be folded into a single shared version by masking their differences with the shiny new efi_call_proto() macro. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-2-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 148 ------------------------- drivers/firmware/efi/libstub/arm-stub.c | 69 ------------ drivers/firmware/efi/libstub/efi-stub-helper.c | 63 +++++++++++ drivers/firmware/efi/libstub/efistub.h | 8 -- 4 files changed, 63 insertions(+), 225 deletions(-) commit 12d70958a2e8d587acaa51dafd5d6620e00b7543 Author: Jens Axboe Date: Tue Jan 31 23:32:50 2017 -0700 blk-mq: don't fail allocating driver tag for stopped hw queue We rely on blk_mq_get_driver_tag() not failing if 'wait' is true, but it currently fails in that case if the queue happens to be stopped at the time of the call. We don't need to check for stopped here, it's just assigning the tag. If the queue is stopped, we'll handle it when attempting to run the queue. This fixes a stall/crash on flush intensive workloads, where we proceed to process a flush that doesn't have a valid tag assigned. Signed-off-by: Jens Axboe block/blk-mq.c | 3 --- 1 file changed, 3 deletions(-) commit c6c70f4455d1eda91065e93cc4f7eddf4499b105 Author: Oleg Nesterov Date: Mon Jan 30 19:17:35 2017 +0100 exit: fix the setns() && PR_SET_CHILD_SUBREAPER interaction find_new_reaper() checks same_thread_group(reaper, child_reaper) to prevent the cross-namespace reparenting but this is not enough if the exiting parent was injected by setns() + fork(). Suppose we have a process P in the root namespace and some namespace X. P does setns() to enter the X namespace, and forks the child C. C forks a grandchild G and exits. The grandchild G should be re-parented to X->child_reaper, but in this case the ->real_parent chain does not lead to ->child_reaper, so it will be wrongly reparanted to P's sub-reaper or a global init. Signed-off-by: Oleg Nesterov Signed-off-by: Eric W. Biederman kernel/exit.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 1328c727004d432bbdfba0ffa02a166df04c7305 Author: Seth Forshee Date: Thu Jan 26 14:33:46 2017 -0600 vfs: open() with O_CREAT should not create inodes with unknown ids may_create() rejects creation of inodes with ids which lack a mapping into s_user_ns. However for O_CREAT may_o_create() is is used instead. Add a similar check there. Fixes: 036d523641c6 ("vfs: Don't create inodes with a uid or gid unknown to the vfs") Signed-off-by: Seth Forshee Signed-off-by: "Eric W. Biederman" fs/namei.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 86e6828a8aed250be7d30f678e331b0b4180a892 Author: Lukas Herbolt Date: Thu Jan 26 10:00:37 2017 +0100 scsi: scsi_debug: Add OPTIMAL TRANSFER LENGTH GRANULARITY option. [mkp: whitespace fixes] Signed-off-by: Lukas Herbolt Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7cfa76963f1872461adff2e84edfbaa8e17d189b Author: Chaitra P B Date: Mon Jan 23 15:26:10 2017 +0530 scsi: mpt3sas: Updating driver version to v15.100.00.00 Updated driver version to "15.100.00.00" Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b4c335a0f6cc61c69cd24f24e40b118bd9f778a Author: Chaitra P B Date: Mon Jan 23 15:26:09 2017 +0530 scsi: mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test. Due existence of loop in the IO path our HBA will receive heavy IOs and also as driver is not updating the Reply Post Host Index frequently, So there will be a high chance that our Firmware unable to find any free entry in the Reply Post Descriptor Queue (i.e. Queue overflow occurs) and can observe 0x2100 firmware fault. So to fix this, we have defined a thresh hold value. After continuously processing this thresh hold number of reply descriptors driver will update the Reply Descriptor Host Index so that this thresh hold number of reply descriptors entries will be freed and these entries will be available for firmware and we won't observe this Firmware fault. We have defined this threshold value as 1/3rd of the hba queue depth. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 459325c466d278d3c9f51ddc9bb544c014136fd1 Author: Chaitra P B Date: Mon Jan 23 15:26:08 2017 +0530 scsi: mpt3sas: Fix for Crusader to achieve product targets with SAS devices. Small glitch/degraded performance in Crusader is improved with SAS drives by removing unnecessary spinlocks while clearing scsi command in drivers internal lookup table. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_ctl.c | 4 +++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 31 ++++++++++++++++++++++++++++--- 4 files changed, 33 insertions(+), 4 deletions(-) commit 6c44c0fe91af7bac78dcaf4c106421862530f499 Author: Chaitra P B Date: Mon Jan 23 15:26:07 2017 +0530 scsi: mpt3sas: Added print to notify cable running at a degraded speed. Driver processes the event MPI26_EVENT_ACTIVE_CABLE_DEGRADED when a cable is present and is running at a degraded speed (below the SAS3 12 Gb/s rate). Prints added to inform the user that the cable is not running at optimal speed. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpi/mpi2_ioc.h | 2 ++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) commit 96b6ce4e8b66b009396799843d6191fefcc36c33 Author: Don Brace Date: Mon Jan 30 16:05:17 2017 -0600 scsi: hpsa: remove coalescing settings for ioaccel2 - Setting coalescing has a significant negative impact on low queue-depth performance. - Does not help high queue-depth performance. Signed-off-by: Don Brace Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 526db94e5de8923eb293ae5e2dd6b19d75e26e4c Author: Christoph Hellwig Date: Sun Jan 29 10:12:18 2017 +0100 scsi: storvsc: remove bogus code to transfer struct scatterlist Remove a piece of code in storvsc_queuecommand that tries to pass the physical address of the kernel struct scatterlist pointer to the host. Fortunately the code can't ever be reached anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 7 ------- 1 file changed, 7 deletions(-) commit 546a4d1812b647fddad58a4416c7a44c27bb0499 Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: atari_scsi: Reset DMA during bus reset only under ST-DMA lock The atari_scsi driver should not access Falcon DMA chip registers unless it has acquired exclusive access to that chip. If the driver doesn't have exclusive access then there's no need for a DMA reset as there are no scsi commands in progress. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b15e791d0c51e778353777b3dd2993ee0a83388e Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: ncr5380: Improve target selection robustness Handle timeout or bus phase change errors that could occur when sending the IDENTIFY message. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4ab2a7878fa56ae7581bf8a94049b355c730aef0 Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: ncr5380: Resolve various static checker warnings Avoid various warnings from "make C=1" by annotating a couple of unlock-then-lock sequences, replacing a zero with NULL and correcting some type casts. Also avoid a warning from "make W=1" by adding braces. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 5 ++++- drivers/scsi/atari_scsi.c | 2 +- drivers/scsi/mac_scsi.c | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) commit 14d739f640d894b4b5db1ab3e1df17b865825a42 Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: ncr5380: Reduce #include files The NCR5380 wrapper drivers don't export symbols or declarations and don't actually need separate header files. Most of these header files were removed already; only sun3_scsi.h and g_NCR5380.h remain. Move the remaining definitions to the corresponding .c files to improve readability and proximity. The #defines which influence the #included core driver are no longer mixed up with unrelated #defines and #includes. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 45 ++++++++++++++++++++- drivers/scsi/g_NCR5380.h | 56 -------------------------- drivers/scsi/sun3_scsi.c | 80 ++++++++++++++++++++++++++++++++++++- drivers/scsi/sun3_scsi.h | 102 ----------------------------------------------- 4 files changed, 122 insertions(+), 161 deletions(-) commit 9507037304e581493bcd8bf76e013e44be71470e Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: ncr5380: Clean up dead code and redundant macro usage Remove dead code inside #if 0 conditionals. Remove the #ifdef __KERNEL__ test, since NCR5380.h has no definitions that relate to userspace code. Remove two redundant macro definitions which were overlooked in commit e9db3198e08b ("sun3_scsi: Adopt NCR5380.c core driver"). Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 7 ------- drivers/scsi/atari_scsi.c | 31 ------------------------------- drivers/scsi/sun3_scsi.c | 3 --- 3 files changed, 41 deletions(-) commit 090284610632bb32a5d2eea41420ee7c2b6975ca Author: Finn Thain Date: Sun Jan 15 18:50:57 2017 -0500 scsi: ncr5380: Shorten host info string by removing unused option macros The DIFFERENTIAL and PARITY option macros are unused: no supported hardware uses differential signalling and the core driver never implemented parity checking. These options just waste space in the host info string. While we are here, fix a typo in the NCR5380_info() kernel-doc comment. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 49 +++++++++---------------------------------------- drivers/scsi/NCR5380.h | 10 +--------- 2 files changed, 10 insertions(+), 49 deletions(-) commit 028f25332c4f7e8befb22e12eaedd105cd45acb2 Author: Jonathan Corbet Date: Fri Jan 27 16:50:34 2017 -0700 docs: Convert the regulator docbook to RST A fairly straightforward conversion to RST; the document is then added to the driver-api manual. Of course, this document has seen no substantive changes since 2008, so chances are it needs work in other areas as well. Cc: Mark Brown Signed-off-by: Jonathan Corbet Documentation/DocBook/regulator.tmpl | 304 --------------------------------- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/regulator.rst | 170 ++++++++++++++++++ 3 files changed, 171 insertions(+), 304 deletions(-) commit 8a8a602fdb834ffce9cf3e9f6021a86cdada78f0 Author: Jonathan Corbet Date: Fri Jan 27 15:43:01 2017 -0700 docs: Convert the deviceio template to RST Convert deviceiobook.tmpl to RST and incorporate it into the driver API manual. Like the rest of our documentation, this one could use some work. There's no mention of ioremap() and friends, no mention of io_read*() and friends. But we have nice documentation for all those folks writing new drivers that do port I/O :). The :c:func: notation has been left off of all the read*/write* functions. There's no kerneldoc comments for them anyway, so those links will never be live, and writing a bunch of repetitive "read a byte from I/O memory" comments lacks appeal. Cc: Matthew Wilcox Cc: Alan Cox Signed-off-by: Jonathan Corbet Documentation/DocBook/deviceiobook.tmpl | 323 -------------------------------- Documentation/driver-api/device-io.rst | 201 ++++++++++++++++++++ Documentation/driver-api/index.rst | 1 + 3 files changed, 202 insertions(+), 323 deletions(-) commit ce363f0dec73b8ec2209a02a7271a9e67ed61368 Author: Nick Dyer Date: Tue Jan 31 15:44:49 2017 -0800 Input: synaptics-rmi4 - add sysfs interfaces for hardware IDs These attributes provide various bits of information which may be enumerated under the RMI4 protocol to user space. This may be useful for displaying the particular version which is in use, or selecting the correct firmware to flash. Signed-off-by: Nick Dyer Tested-by: Chris Healy Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 2 +- drivers/input/rmi4/rmi_driver.h | 2 +- drivers/input/rmi4/rmi_f01.c | 104 +++++++++++++++++++++++++++++++++++++++- drivers/input/rmi4/rmi_f34.c | 48 +++++++++++++++++++ 4 files changed, 152 insertions(+), 4 deletions(-) commit 5a89916df2c8d2635b82a457cd4945dd73c1de3c Author: Nick Dyer Date: Tue Jan 31 15:25:56 2017 -0800 Input: synaptics-rmi4 - add sysfs attribute update_fw_status The attribute returns the percentage complete. If the firmware update fails, it reports a negative error code. Signed-off-by: Nick Dyer Tested-by: Chris Healy Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f34.c | 92 +++++++++++++++++++++++++++++------------- drivers/input/rmi4/rmi_f34.h | 4 ++ drivers/input/rmi4/rmi_f34v7.c | 11 +++++ 3 files changed, 80 insertions(+), 27 deletions(-) commit 7c10da3736983ac296b381ca9db2e33932efacce Author: Ivan T. Ivanov Date: Wed Jan 11 17:59:11 2017 +0200 arm64: dts: qcom: Add msm8916 CoreSight components Add initial set of CoreSight components found on Qualcomm msm8916 and apq8016 based platforms, including the DragonBoard 410c board. Signed-off-by: Ivan T. Ivanov Acked-by: Mathieu Poirier Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 240 ++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) commit 18566acac18f5784347bc5fe636a26897d1c963b Merge: 02a84c1 e41456bf Author: Dave Airlie Date: Wed Feb 1 08:43:42 2017 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next adding runtime PM support to MIC driver, and including some cleanups - especially using atomic helper functions instead of specific ones - and fixups. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: g2d: prevent integer overflow in drm/exynos: fix a timeout loop drm/exynos: use atomic helper commit drm/exynos: remove unnecessary codes drm/exynos: mic: Add runtime PM support drm/exynos: Stop using drm_framebuffer_unregister_private drm/exynos: mic: Fix parse_dt function drm/exynos: mic: Add mode_set callback function commit 02a84c135ee94924c094fdbb70030a49cddbe85b Merge: b75e169 0f0861e Author: Dave Airlie Date: Wed Feb 1 08:43:19 2017 +1000 Merge tag 'sunxi-drm-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.11 Just one minor fix. * tag 'sunxi-drm-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: Fix a return value in case of error commit b75e16959c9410b4eea1fb94e49835d40a671d0f Merge: 29a73d9 5d25fde Author: Dave Airlie Date: Wed Feb 1 08:40:13 2017 +1000 Merge branch 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux into drm-next This is to address what we've discussed, moving some of the minor changes into a drm-next request. * 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Use kmemdup instead of kmalloc and memcpy drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format drm/vmwgfx: Fix a potential integer overflow drm/vmwgfx: Clear an uninitialized struct member drm/vmwgfx: Annotate ignored return values drm/vmwgfx: Clear uninitialized fields of a parameter commit 29a73d906bd386839015602c4bd35ef2e3531abc Merge: 012bbe2 268c300 Author: Dave Airlie Date: Wed Feb 1 08:39:35 2017 +1000 Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next This is the main feature pull for radeon and amdgpu for 4.11. Highlights: - Power and clockgating improvements - Preliminary SR-IOV support - ttm buffer priority support - ttm eviction fixes - Removal of the ttm lru callbacks - Remove SI DPM quirks due to MC firmware issues - Handle VFCT with multiple vbioses - Powerplay improvements - Lots of driver cleanups * 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux: (120 commits) drm/amdgpu: fix amdgpu_bo_va_mapping flags drm/amdgpu: access stolen VRAM directly on CZ (v2) drm/amdgpu: access stolen VRAM directly on KV/KB (v2) drm/amdgpu: fix kernel panic when dpm disabled on Kv. drm/amdgpu: fix dpm bug on Kv. drm/amd/powerplay: fix regresstion issue can't set manual dpm mode. drm/amdgpu: handle vfct with multiple vbios images drm/radeon: handle vfct with multiple vbios images drm/amdgpu: move misc si headers into amdgpu drm/amdgpu: remove unused header si_reg.h drm/radeon: drop pitcairn dpm quirks drm/amdgpu: drop pitcairn dpm quirks drm: radeon: radeon_ttm: Handle return NULL error from ioremap_nocache drm/amd/amdgpu/amdgpu_ttm: Handle return NULL error from ioremap_nocache drm/amdgpu: add new virtual display ID drm/amd/amdgpu: remove the uncessary parameter for ib scheduler drm/amdgpu: Bring bo creation in line with radeon driver (v2) drm/amd/powerplay: fix misspelling in header guard drm/ttm: revert "add optional LRU removal callback v2" drm/ttm: revert "implement LRU add callbacks v2" ... commit e5c3b3e9f012b8862753a04f03c6e27344332718 Author: Bjorn Helgaas Date: Tue Jan 31 16:36:32 2017 -0600 PCI: iproc: Use of_device_get_match_data() to simplify probe The only way to call iproc_pcie_pltfm_probe() is to match an entry in iproc_pcie_of_match_table[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the pcie->type. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc-platform.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6dc2c04fd9868a5ad00b402935021d6f3ff27b17 Author: Bjorn Helgaas Date: Tue Jan 31 16:36:11 2017 -0600 PCI: layerscape: Use of_device_get_match_data() to simplify probe The only way to call ls_pcie_probe() is to match an entry in ls_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the drvdata pointer. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ff1677e231651205e7e19770a677057dea05cb70 Author: Bjorn Helgaas Date: Tue Jan 31 16:35:42 2017 -0600 PCI: rcar: Use of_device_get_match_data() to simplify probe This is a DT-only driver, so the only way to call rcar_pcie_probe() is to match an entry in rcar_pcie_of_match[], so of_id cannot be NULL. Furthermore, of_id->data can only be NULL if an rcar_pcie_of_match[] entry has a NULL .data member. That's a driver defect, and we don't want to return -EINVAL, which is easy to ignore. We'd rather take the NULL pointer dereference so we notice the problem and fix it. Use of_device_get_match_data() to retrieve the hw_init_fn pointer. No functional change intended. Suggested-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 012bbe28c0e3a479ec7ba6f311710cf8409647d4 Merge: bb7e983 55d6616 Author: Dave Airlie Date: Wed Feb 1 08:31:09 2017 +1000 Merge tag 'drm-misc-next-2017-01-30' of git://anongit.freedesktop.org/git/drm-misc into drm-next Another round of -misc stuff: - Noralf debugfs cleanup cleanup (not yet everything, some more driver patches awaiting acks). - More doc work. - edid/infoframe fixes from Ville. - misc 1-patch fixes all over, as usual Noralf needs this for his tinydrm pull request. * tag 'drm-misc-next-2017-01-30' of git://anongit.freedesktop.org/git/drm-misc: (48 commits) drm/vc4: Remove vc4_debugfs_cleanup() dma/fence: Export enable-signaling tracepoint for emission by drivers drm/tilcdc: Remove tilcdc_debugfs_cleanup() drm/tegra: Remove tegra_debugfs_cleanup() drm/sti: Remove drm_debugfs_remove_files() calls drm/radeon: Remove drm_debugfs_remove_files() call drm/omap: Remove omap_debugfs_cleanup() drm/hdlcd: Remove hdlcd_debugfs_cleanup() drm/etnaviv: Remove etnaviv_debugfs_cleanup() drm/etnaviv: allow build with COMPILE_TEST drm/amd/amdgpu: Remove drm_debugfs_remove_files() call drm/prime: Clarify DMA-BUF/GEM Object lifetime drm/ttm: Make sure BOs being swapped out are cacheable drm/atomic: Remove drm_atomic_debugfs_cleanup() drm: drm_minor_register(): Clean up debugfs on failure drm: debugfs: Remove all files automatically on cleanup drm/fourcc: add vivante tiled layout format modifiers drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F drm/edid: Set AVI infoframe Q even when QS=0 drm/edid: Introduce drm_hdmi_avi_infoframe_quant_range() ... commit bb7e98334157de206d7b1283377fdb4ea9e2e8c6 Merge: 3a5e6bb db02b76 Author: Dave Airlie Date: Wed Feb 1 08:30:19 2017 +1000 Merge tag 'drm/atmel-hlcdc/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bbrezillon/linux into drm-next Contains a single patch to create the fbdev at driver's registration time instead of waiting for the connector status change. * tag 'drm/atmel-hlcdc/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bbrezillon/linux: drm/atmel-hlcdc: Rework the fbdev creation logic commit 3a5e6bb9c660173cf6a1a3f29b0501553cd4db2f Merge: 2643105 098988c Author: Dave Airlie Date: Wed Feb 1 08:26:33 2017 +1000 Merge tag 'zxdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into drm-next ZTE DRM driver updates for 4.11: - Add missing selection of VIDEOMODE_HELPERS in Kconfig, since ZTE DRM driver uses drm_display_mode_to_videomode(). - Enable HDMI audio support through SPDIF interface based on generic hdmi-audio-codec driver. - Enable VOU VL (Video Layer) to support overlay plane with scaling function. - Refine zx_vou driver a bit and then add TV Encoder output device support. [airlied: fixup plane format change] * tag 'zxdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: drm: zte: add tvenc driver support dt: add bindings for ZTE tvenc device drm: zte: add function to configure vou_ctrl dividers drm: zte: move struct vou_inf into zx_vou driver drm: zte: add interlace mode support drm: zte: add overlay plane support drm: zte: add .atomic_disable hook to disable graphic layer drm: zte: make zx_plane accessible from zx_vou driver drm: zte: support hdmi audio through spdif drm: zte: select VIDEOMODE_HELPERS in Kconfig commit 2643105558099a4703f8209f2cad768673aff12d Merge: a155b75 8adabb8 Author: Dave Airlie Date: Wed Feb 1 08:26:02 2017 +1000 Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/git/drm-intel into drm-next Updated pull request after I pulled first time :) * 'drm-intel-next' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Pevent copying uninitialised garbage into vma->ggtt_view commit a155b75264949d2c087a67fd2e832dd61d3f8409 Merge: a5b2b6e 83d642e Author: Dave Airlie Date: Wed Feb 1 08:07:23 2017 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next Hope I'm not too late before the cutoff for the v4.11 with these patches. Mostly an asorted set of fixes that we have discovered while playing with the code and preparing for the next set of features. * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld: drm: mali-dp: fix stride setting for multi-plane formats drm: mali-dp: Add plane offset to the plane's physical start address register drm: mali-dp: Check for sufficient address space drm: mali-dp: Check hw version matches device-tree drm: mali-dp: Rename malidp_input_format to malidp_pixel_format drm: mali-dp: fix Lx_CONTROL register fields clobber drm: mali-dp: Fix transposed horizontal/vertical flip drm: mali-dp: Fix destination size handling when rotating drm: mali-dp: Don't force source size == crtc size drm: mali-dp: Check more use cases in the plane's ->atomic_check() drm: malidp: Remove event_list member from struct malidp_drm drm/arm/malidp: Fix possible dereference of NULL commit f447c196fe7a3a92c6396f7628020cb8d564be15 Author: Steven Rostedt (VMware) Date: Tue Jan 31 16:48:23 2017 -0500 tracing: Clean up the hwlat binding code Instead of initializing the affinity of the hwlat kthread in the thread itself, simply set up the initial affinity at thread creation. This simplifies the code. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_hwlat.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit cbc00c1310d34139a63946482b40a6b261a03fb9 Author: Zhang Rui Date: Mon Jan 16 10:55:45 2017 +0800 ACPI: save NVS memory for Lenovo G50-45 In commit 821d6f0359b0 (ACPI / sleep: Do not save NVS for new machines to accelerate S3), to optimize S3 suspend/resume speed, code is introduced to ignore NVS memory saving during S3 for all the platforms later than 2012. But, Lenovo G50-45, a platform released in 2015, still needs NVS memory saving during S3. A quirk is introduced for this platform. Link: https://bugzilla.kernel.org/show_bug.cgi?id=189431 Tested-by: Przemek Signed-off-by: Zhang Rui [ rjw: Drop unnecessary code ] Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d222678426faa5b0a5c14a468f78c32beb089937 Author: Colin Ian King Date: Tue Jan 17 14:57:20 2017 +0000 ACPI, APEI, EINJ: fix malformed newline escape The pr_warn message has a malformed newline escape, add in the missing \ Signed-off-by: Colin Ian King Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/einj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3015d3b05239e33b42b1ae9ac408cc60fa4772ce Author: Linus Walleij Date: Thu Jan 12 15:07:35 2017 +0100 ARM: dts: add the AB8500 sysclk to the device trees This clock has been missing since some early stages of device tree conversion. Adding the right clocks to the device tree makes USB work again. Cc: Ulf Hansson Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 ++ arch/arm/boot/dts/ste-href.dtsi | 2 ++ arch/arm/boot/dts/ste-snowball.dts | 2 ++ 3 files changed, 6 insertions(+) commit 6097c2d0afa4ff70ece8610875a0f0592064de29 Author: Linus Walleij Date: Thu Jan 12 15:22:42 2017 +0100 ARM: dts: Ux500: move USB PHY pins to PHY device The physical pins from the SoC are in a sense belonging to the PHY device (AB8500 USB) rather than the MUSB USB IP block. The driver definately assumes so: before this change it complains that it cannot control the pins it is using: abx5x0-usb ab8500-usb.0: could not get/set default pinstate After this patch the warning goes away. Cc: Ulf Hansson Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-href.dtsi | 12 ++++++------ arch/arm/boot/dts/ste-snowball.dts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit adef953bbc868b75ebe57eef10b396202c47639b Author: Linus Walleij Date: Fri Oct 7 09:30:46 2016 +0200 ARM: dts: push MMC/SD to board and add comments This moves the enable-active-high setting from the SoC to the board for the VMMCQ regulators. It should at least be in the vicinity of the GPIO line it is defined for. Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-href.dtsi | 2 +- arch/arm/boot/dts/ste-hrefprev60.dtsi | 1 + arch/arm/boot/dts/ste-hrefv60plus.dtsi | 1 + arch/arm/boot/dts/ste-snowball.dts | 6 +++++- 4 files changed, 8 insertions(+), 2 deletions(-) commit 81ab52fd94f32aaa8a9c27b41934e4ae932ca106 Author: Kamal Dasu Date: Mon Jan 30 16:11:16 2017 -0500 spi: bcm-qspi: Added mspi read fallback in bcm_qspi_flash_read() Added mspi read fallback under certain circumstances like unaligned buffer, address on short reads. Also takes care of version 3.0 spi controller where flash address crosses 4MB boundary on transfers the driver resorts to mspi reads. Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 116 +++++++++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 31 deletions(-) commit b6e643adfd68258e16babaf36353c9668384350f Author: Bjorn Andersson Date: Mon Jan 30 13:03:37 2017 -0800 ASoC: qcom: Drop __func__ usage from log prints The combination of dev_err() and __func__ make most of these log prints over 100 chars long. Remove the usage of __func__ to clean the kernel log and as the usage is not necessary to identify the individual log prints. Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown sound/soc/qcom/lpass-apq8016.c | 15 +++--- sound/soc/qcom/lpass-cpu.c | 86 ++++++++++++++------------------ sound/soc/qcom/lpass-platform.c | 106 ++++++++++++++++++++-------------------- sound/soc/qcom/storm.c | 22 +++------ 4 files changed, 103 insertions(+), 126 deletions(-) commit 46dccc3573bc69e13fb5ea3d14dea2e940b3a1a9 Author: Bjorn Andersson Date: Mon Jan 30 13:03:36 2017 -0800 ASoC: qcom: lpass-cpu: Remove unnecessary clock checks Clean up the clock calling code by removing numerous IS_ERR() checks by just assigning the clock NULL; as this turn all used functions in the clk API to nops. Also include the word "optional" in the error message when failing to acquire the optional osr clocks. Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 8324147f38019865b29d03baf28412d2ec0bd828 Author: Johan Hovold Date: Mon Jan 30 17:47:05 2017 +0100 spi: fix device-node leaks Make sure to release the device-node reference taken in of_register_spi_device() on errors and when deregistering the device. Fixes: 284b01897340 ("spi: Add OF binding support for SPI busses") Signed-off-by: Johan Hovold Signed-off-by: Mark Brown drivers/spi/spi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d486f1f204382557b5fbcb3ddbb5845cd4ba4e2c Author: Jens Axboe Date: Tue Jan 31 12:34:41 2017 -0700 block: move internal_tag to same cache line as tag Since we removed cmd_type, we now have a hole in the struct. Move the internal_tag member to the same cacheline as tag, since we use them at the same time. This doesn't fix the hole, just moves it elsewhere. Signed-off-by: Jens Axboe include/linux/blkdev.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aebf526b53aea164508730427597d45f3e06b376 Author: Christoph Hellwig Date: Tue Jan 31 16:57:31 2017 +0100 block: fold cmd_type into the REQ_OP_ space Instead of keeping two levels of indirection for requests types, fold it all into the operations. The little caveat here is that previously cmd_type only applied to struct request, while the request and bio op fields were set to plain REQ_OP_READ/WRITE even for passthrough operations. Instead this patch adds new REQ_OP_* for SCSI passthrough and driver private requests, althought it has to add two for each so that we can communicate the data in/out nature of the request. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 10 ----- block/blk-core.c | 6 +-- block/blk-flush.c | 1 - block/blk-map.c | 13 ++++--- block/blk-mq-debugfs.c | 4 +- block/bsg.c | 17 ++++----- block/scsi_ioctl.c | 9 +++-- drivers/block/cciss.c | 13 +++++-- drivers/block/floppy.c | 4 +- drivers/block/hd.c | 45 +++++++++++----------- drivers/block/mg_disk.c | 31 +++++++++------- drivers/block/nbd.c | 19 ++++++---- drivers/block/null_blk.c | 4 +- drivers/block/osdblk.c | 6 --- drivers/block/paride/pd.c | 15 +++----- drivers/block/pktcdvd.c | 2 +- drivers/block/ps3disk.c | 15 +++++--- drivers/block/rbd.c | 22 ++++++----- drivers/block/sx8.c | 4 +- drivers/block/virtio_blk.c | 61 +++++++++++++++--------------- drivers/block/xen-blkfront.c | 2 +- drivers/block/xsysace.c | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/cdrom/gdrom.c | 29 ++++++++------- drivers/ide/ide-atapi.c | 21 ++++++----- drivers/ide/ide-cd.c | 76 ++++++++++++++++++++++---------------- drivers/ide/ide-cd_ioctl.c | 3 +- drivers/ide/ide-devsets.c | 3 +- drivers/ide/ide-disk.c | 9 ++--- drivers/ide/ide-eh.c | 2 +- drivers/ide/ide-floppy.c | 19 +++++----- drivers/ide/ide-io.c | 2 +- drivers/ide/ide-ioctls.c | 6 +-- drivers/ide/ide-park.c | 6 +-- drivers/ide/ide-pm.c | 10 ++--- drivers/ide/ide-tape.c | 5 +-- drivers/ide/ide-taskfile.c | 6 +-- drivers/mtd/mtd_blkdevs.c | 13 +++---- drivers/mtd/ubi/block.c | 15 ++++---- drivers/nvme/host/core.c | 26 +++++++++---- drivers/nvme/host/rdma.c | 2 +- drivers/scsi/osd/osd_initiator.c | 3 +- drivers/scsi/osst.c | 3 +- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/scsi_lib.c | 30 +++++++-------- drivers/scsi/sg.c | 3 +- drivers/scsi/sr.c | 9 +++-- drivers/scsi/st.c | 6 +-- drivers/target/target_core_pscsi.c | 3 +- fs/nfsd/blocklayout.c | 2 +- include/linux/blk_types.h | 7 ++++ include/linux/blkdev.h | 22 +++++------ include/linux/ide.h | 14 +++---- 53 files changed, 338 insertions(+), 326 deletions(-) commit 2f5a8e80f79dc82e00f4cca557dc9ceaf064b450 Author: Christoph Hellwig Date: Tue Jan 31 16:57:30 2017 +0100 ide: don't abuse cmd_type Currently the legacy ide driver defines several request types of it's own, which is in the way of removing that field entirely. Instead add a type field to struct ide_request and use that to distinguish the different types of IDE-internal requests. It's a bit of a mess, but so is the surrounding code.. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller Signed-off-by: Jens Axboe drivers/ide/ide-atapi.c | 18 ++++++++++----- drivers/ide/ide-cd.c | 25 ++++++++++++--------- drivers/ide/ide-cd_ioctl.c | 1 + drivers/ide/ide-devsets.c | 1 + drivers/ide/ide-disk.c | 6 +++-- drivers/ide/ide-eh.c | 4 ++-- drivers/ide/ide-floppy.c | 18 ++++++++++----- drivers/ide/ide-io.c | 8 +++---- drivers/ide/ide-ioctls.c | 4 +++- drivers/ide/ide-park.c | 2 ++ drivers/ide/ide-pm.c | 16 ++++++++----- drivers/ide/ide-tape.c | 6 +++-- drivers/ide/ide-taskfile.c | 3 ++- include/linux/ide.h | 56 +++++++++++++++++++++++++++++++++++++--------- 14 files changed, 117 insertions(+), 51 deletions(-) commit 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd Author: Christoph Hellwig Date: Tue Jan 31 16:57:29 2017 +0100 block: introduce blk_rq_is_passthrough This can be used to check for fs vs non-fs requests and basically removes all knowledge of BLOCK_PC specific from the block layer, as well as preparing for removing the cmd_type field in struct request. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 8 ++++---- block/blk-exec.c | 2 +- block/blk.h | 2 +- block/elevator.c | 4 ++-- block/mq-deadline.c | 2 +- drivers/ata/libata-scsi.c | 2 +- drivers/block/cciss.c | 36 +++++++++++++++++------------------ drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/host/rdma.c | 4 ++-- drivers/nvme/target/loop.c | 2 +- drivers/scsi/hpsa.c | 4 ++-- drivers/scsi/scsi.c | 2 +- drivers/scsi/scsi_error.c | 4 ++-- drivers/scsi/scsi_lib.c | 6 +++--- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- drivers/scsi/sun3_scsi.c | 2 +- include/linux/blkdev.h | 16 +++++++++++----- include/linux/blktrace_api.h | 4 ++-- include/scsi/scsi_cmnd.h | 2 +- kernel/trace/blktrace.c | 2 +- 21 files changed, 59 insertions(+), 53 deletions(-) commit 09fc54ccc42744669e748434af5c2f8adcad900f Author: Christoph Hellwig Date: Tue Jan 31 16:57:28 2017 +0100 nbd: move request validity checking into nbd_send_cmd This is where we do the rest of the request handling, which will become much simpler soon, too. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/nbd.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 27410a8927fb89bd150de08d749a8ed7f67b7739 Author: Christoph Hellwig Date: Tue Jan 31 16:57:27 2017 +0100 nbd: remove REQ_TYPE_DRV_PRIV leftovers Disconnects don't use block layer requests these days, so all handling of private requests is dead code. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/nbd.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 55460a8a7e6f42ecc62f24277effbcc0bc78a1e4 Author: Christoph Hellwig Date: Tue Jan 31 16:57:26 2017 +0100 mspro_block: remove pointless prep_fn This driver will never see non-fs requests, and doesn't do anything else in the prep_fn. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/memstick/core/mspro_block.c | 13 ------------- 1 file changed, 13 deletions(-) commit cf22f802fc346742237c7d817be33ed57958f2d7 Author: Christoph Hellwig Date: Tue Jan 31 16:57:25 2017 +0100 ms_block: remove pointless prep_fn This driver will never see non-fs requests, and doesn't do anything else in the prep_fn. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/memstick/core/ms_block.c | 11 ----------- 1 file changed, 11 deletions(-) commit 261c83c1a9e5b74e41037cc804e8b9ae21623ddd Author: Christoph Hellwig Date: Tue Jan 31 16:57:24 2017 +0100 mmc: remove pointless request type check in mmc_prep_request The block layer won't send requests the driver isn't asking for, so remove this check. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/mmc/core/queue.c | 9 --------- 1 file changed, 9 deletions(-) commit 243842b8813dc9631c41bd2a9e975073dce8f1cb Author: Bhumika Goyal Date: Sat Jan 28 20:52:23 2017 +0530 regulator: rn5t618: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/rn5t618-regulator.o text data bss dec hex filename 375 5392 0 5767 1687 regulator/rn5t618-regulator.o File size after: drivers/regulator/rn5t618-regulator.o text data bss dec hex filename 631 5136 0 5767 1687 regulator/rn5t618-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/rn5t618-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68b568c797c0a93bd1f2e107a6022350d096154e Author: Christoph Hellwig Date: Tue Jan 31 16:57:23 2017 +0100 ѕd: remove pointless REQ_TYPE_FS check ->done can only be called for fs requests, so no need to check again here. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/sd.c | 3 --- 1 file changed, 3 deletions(-) commit 1dd128a1ff1eb75ab45c62d9438acdcf5558d3b7 Author: Christoph Hellwig Date: Tue Jan 31 16:57:22 2017 +0100 scm_blk: remove unneeded REQ_TYPE_FS check Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/s390/block/scm_blk.c | 7 ------- 1 file changed, 7 deletions(-) commit fb74036b83c1da0e59fcbcc0636ea8d53892d315 Author: Bhumika Goyal Date: Sat Jan 28 20:48:51 2017 +0530 regulator: rc5t583-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/rc5t583-regulator.o text data bss dec hex filename 931 3824 0 4755 1293 regulator/rc5t583-regulator.o File size after: drivers/regulator/rc5t583-regulator.o text data bss dec hex filename 1187 3568 0 4755 1293 regulator/rc5t583-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/rc5t583-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36fe20c7cd2c8aafa2d1073f95a63b80a3d59f03 Author: Bhumika Goyal Date: Sat Jan 28 20:45:39 2017 +0530 regulator: pv88090-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pv88090-regulator.o text data bss dec hex filename 2829 2032 8 4869 1305 regulator/pv88090-regulator.o File size after: drivers/regulator/pv88090-regulator.o text data bss dec hex filename 3341 1520 8 4869 1305 regulator/pv88090-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pv88090-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4fdf5e14eb31652e3f1da40bfba7da1a9e92374 Author: Bhumika Goyal Date: Sat Jan 28 20:44:01 2017 +0530 regulator: pv88080-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pv88080-regulator.o text data bss dec hex filename 3828 1808 8 5644 160c regulator/pv88080-regulator.o File size after: drivers/regulator/pv88080-regulator.o text data bss dec hex filename 4340 1296 8 5644 160c regulator/pv88080-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pv88080-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea51874cb34dd8e25181603c91030e42e4428453 Author: Bhumika Goyal Date: Sat Jan 28 20:40:51 2017 +0530 regulator: pv88060-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pv88060-regulator.o text data bss dec hex filename 6195 752 8 6955 1b2b regulator/pv88060-regulator.o File size after: drivers/regulator/pv88060-regulator.o text data bss dec hex filename 6739 240 8 6987 1b4b regulator/pv88060-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pv88060-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5053853d8d7cd37275cc964bbc929e9e3c44c46 Author: Bhumika Goyal Date: Sat Jan 28 20:38:57 2017 +0530 regulator: pfuze100-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pfuze100-regulator.o text data bss dec hex filename 3552 12528 16 16096 3ee0 regulator/pfuze100-regulator.o File size after: drivers/regulator/pfuze100-regulator.o text data bss dec hex filename 4576 11496 16 16088 3ed8 regulator/pfuze100-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pfuze100-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0be794314add6249b72b700c16eb7fa973989b4d Author: Bhumika Goyal Date: Sat Jan 28 20:30:16 2017 +0530 regulator: pcf50633-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pcf50633-regulator.o text data bss dec hex filename 2763 464 0 3227 c9b regulator/pcf50633-regulator.o File size after: drivers/regulator/pcf50633-regulator.o text data bss dec hex filename 3019 192 0 3211 c8b regulator/pcf50633-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pcf50633-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00804e6af96b4072eafb25337936532738dd537f Author: Bhumika Goyal Date: Sat Jan 28 20:27:15 2017 +0530 regulator: pcap-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pcap-regulator.o text data bss dec hex filename 5503 564 0 6067 17b3 regulator/pcap-regulator.o File size after: drivers/regulator/pcap-regulator.o text data bss dec hex filename 5759 308 0 6067 17b3 regulator/pcap-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pcap-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a180df71e7b3f40cc867accc41ac172ceda6c95a Author: Bhumika Goyal Date: Sat Jan 28 20:25:21 2017 +0530 regulator: pbias-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2545 624 0 3169 c61 regulator/pbias-regulator.o File size after: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2801 368 0 3169 c61 regulator/pbias-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/pbias-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e5a768008f0b27d4cd75ed3d03794fe4672902b Author: Bhumika Goyal Date: Sat Jan 28 20:23:55 2017 +0530 regulator: palmas-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/palmas-regulator.o text data bss dec hex filename 9752 6296 288 16336 3fd0 regulator/palmas-regulator.o File size after: drivers/regulator/palmas-regulator.o text data bss dec hex filename 12856 3480 8 16344 3fd0 regulator/palmas-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/palmas-regulator.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 6e09f4af13b4ace286bd22cef19e1e6311cc9c56 Author: Bhumika Goyal Date: Sat Jan 28 20:21:04 2017 +0530 regulator: max8952: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max8952.o text data bss dec hex filename 3048 496 0 3544 dd8 drivers/regulator/max8952.o File size after: drivers/regulator/max8952.o text data bss dec hex filename 3304 240 0 3544 dd8 drivers/regulator/max8952.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max8952.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85214c9a0ca82ee2ecad85c0a8256a59036e1b11 Author: Bhumika Goyal Date: Sat Jan 28 20:19:42 2017 +0530 regulator: max8925-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max8925-regulator.o text data bss dec hex filename 1356 7184 0 8540 215c regulator/max8925-regulator.o File size after: drivers/regulator/max8925-regulator.o text data bss dec hex filename 1868 6664 0 8532 2154 regulator/max8925-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max8925-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88c9d47aa4f7ee9f086f6fcb7e7b6a59e3380462 Author: Bhumika Goyal Date: Sat Jan 28 20:02:32 2017 +0530 regulator: max8907-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max8907-regulator.o text data bss dec hex filename 1384 9424 256 11064 2b38 regulator/max8907-regulator.o File size after: drivers/regulator/max8907-regulator.o text data bss dec hex filename 2664 8400 0 11064 2b38 regulator/max8907-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max8907-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0301987a89b25cc5fbcb5ea063fc068ef9c70268 Author: Bhumika Goyal Date: Sat Jan 28 19:55:54 2017 +0530 regulator: max77802-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77802-regulator.o text data bss dec hex filename 11811 1552 0 13363 3433 regulator/max77802-regulator.o File size after: drivers/regulator/max77802-regulator.o text data bss dec hex filename 13091 272 0 13363 3433 regulator/max77802-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max77802-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b68f907835b81b8987829f75177da17ad19fee3e Author: Bhumika Goyal Date: Sat Jan 28 19:54:09 2017 +0530 regulator: max77693-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77693-regulator.o text data bss dec hex filename 2230 720 0 2950 b86 regulator/max77693-regulator.o File size after: drivers/regulator/max77693-regulator.o text data bss dec hex filename 2486 464 0 2950 b86 regulator/max77693-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max77693-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 404826cb39fbe33998bec6ce5e1d51812b81bcda Author: Bhumika Goyal Date: Sat Jan 28 19:52:24 2017 +0530 regulator: max77686-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77686-regulator.o text data bss dec hex filename 9904 1320 0 11224 2bd8 regulator/max77686-regulator.o File size after: drivers/regulator/max77686-regulator.o text data bss dec hex filename 10928 280 0 11208 2bc8 regulator/max77686-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max77686-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 634dc7abc5f771cb8950b7228ee79e8b95608b08 Author: Bhumika Goyal Date: Sat Jan 28 19:50:37 2017 +0530 regulator: max77620-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77620-regulator.o text data bss dec hex filename 4811 6992 0 11803 2e1b regulator/max77620-regulator.o File size after: drivers/regulator/max77620-regulator.o text data bss dec hex filename 5075 6720 0 11795 2e13 regulator/max77620-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max77620-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18c6c42c0fb42e28180541214910a8dd59b8df77 Author: Bhumika Goyal Date: Sat Jan 28 19:48:28 2017 +0530 regulator: max14577-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max14577-regulator.o text data bss dec hex filename 2646 976 0 3622 e26 regulator/max14577-regulator.o File size after: drivers/regulator/max14577-regulator.o text data bss dec hex filename 3414 192 0 3606 e16 regulator/max14577-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/max14577-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f9e93acc14d1867176afaf3ab9bded914cd012f5 Author: Bhumika Goyal Date: Sat Jan 28 19:45:02 2017 +0530 regulator: ltc3676: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/ltc3676.o text data bss dec hex filename 2369 2808 288 5465 1559 drivers/regulator/ltc3676.o File size after: drivers/regulator/ltc3676.o text data bss dec hex filename 3145 2296 8 5449 1549 drivers/regulator/ltc3676.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/ltc3676.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c093c3a3db9d200461f3db52aadb611c87df357d Author: Bhumika Goyal Date: Sat Jan 28 19:43:54 2017 +0530 regulator: ltc3589: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/ltc3589.o text data bss dec hex filename 2564 3312 288 6164 1814 drivers/regulator/ltc3589.o File size after: drivers/regulator/ltc3589.o text data bss dec hex filename 3604 2544 8 6156 180c drivers/regulator/ltc3589.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/ltc3589.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d42797a416ff8c43cbf1366bc774a90870fb7cab Author: Bhumika Goyal Date: Sat Jan 28 19:41:30 2017 +0530 regulator: lp8755: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/lp8755.o text data bss dec hex filename 3519 2800 8 6327 18b7 drivers/regulator/lp8755.o File size after: drivers/regulator/lp8755.o text data bss dec hex filename 3779 2544 8 6331 18bb drivers/regulator/lp8755.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/lp8755.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc83c94ae513250c91bb91d88afda660e8493bdc Author: Bhumika Goyal Date: Sat Jan 28 19:40:08 2017 +0530 regulator: hi655x-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/hi655x-regulator.o text data bss dec hex filename 689 3120 0 3809 ee1 regulator/hi655x-regulator.o File size after: drivers/regulator/hi655x-regulator.o text data bss dec hex filename 1201 2608 0 3809 ee1 regulator/hi655x-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/hi655x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71880ab24723ff4efef1443b060adaf6efc1e144 Author: Bhumika Goyal Date: Sat Jan 28 19:32:05 2017 +0530 regulator: fan53555: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/fan53555.o text data bss dec hex filename 3512 496 8 4016 fb0 drivers/regulator/fan53555.o File size after: drivers/regulator/fan53555.o text data bss dec hex filename 3768 240 8 4016 fb0 drivers/regulator/fan53555.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/fan53555.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20f860c1604000e0969d9110a585dad3091a8a3c Author: Bhumika Goyal Date: Sat Jan 28 19:30:24 2017 +0530 regulator: bcm590xx-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/bcm590xx-regulator.o text data bss dec hex filename 1807 3360 0 5167 142f regulator/bcm590xx-regulator.o File size after: drivers/regulator/bcm590xx-regulator.o text data bss dec hex filename 2575 2592 0 5167 142f regulator/bcm590xx-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/bcm590xx-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef306e44ce89c4518ec11ef9c0f2d3de48089245 Author: Bhumika Goyal Date: Sat Jan 28 19:28:01 2017 +0530 regulator: axp20x-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/axp20x-regulator.o text data bss dec hex filename 16848 1232 0 18080 46a0 regulator/axp20x-regulator.o File size after: drivers/regulator/axp20x-regulator.o text data bss dec hex filename 17888 192 0 18080 46a0 regulator/axp20x-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1bacf46371941870fdf8bb55f8737f331e2c26eb Author: Bhumika Goyal Date: Sat Jan 28 19:25:00 2017 +0530 regulator: as3711-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/as3711-regulator.o text data bss dec hex filename 1517 4144 0 5661 161d regulator/as3711-regulator.o File size after: drivers/regulator/as3711-regulator.o text data bss dec hex filename 2301 3376 0 5677 162d regulator/as3711-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/as3711-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fc28ab1882b59f65d88f99348fdf01073e67349c Author: Dan Carpenter Date: Tue Jan 31 14:33:31 2017 +0300 sound: oss/ad1848: remove some dead code We never use the irq2dev[] array so we can remove this assignment. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/oss/ad1848.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2773ead133b11dcac19f27948eb616ad34e7936f Author: Bhumika Goyal Date: Sat Jan 28 19:10:00 2017 +0530 regulator: arizona-micsupp: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/arizona-micsupp.o text data bss dec hex filename 1738 464 8 2210 8a2 regulator/arizona-micsupp.o File size after: drivers/regulator/arizona-micsupp.o text data bss dec hex filename 1994 192 8 2194 892 regulator/arizona-micsupp.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03d06107f834db328da5579348524855f10a276d Author: Bhumika Goyal Date: Sat Jan 28 19:08:41 2017 +0530 regulator: arizona-ldo1: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/arizona-ldo1.o text data bss dec hex filename 1890 720 0 2610 a32 drivers/regulator/arizona-ldo1.o File size after: drivers/regulator/arizona-ldo1.o text data bss dec hex filename 2402 192 0 2594 a22 drivers/regulator/arizona-ldo1.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/arizona-ldo1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb24b9df7c2c75d1876ebcdcfe239fd76cf4e3e0 Author: Bhumika Goyal Date: Sat Jan 28 19:05:22 2017 +0530 regulator: ad5398: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/ad5398.o text data bss dec hex filename 1707 672 0 2379 94b drivers/regulator/ad5398.o File size after: drivers/regulator/ad5398.o text data bss dec hex filename 1963 416 0 2379 94b drivers/regulator/ad5398.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/ad5398.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed1da3c10168a383b3c8c3e233c813bd034d6d9 Author: Bhumika Goyal Date: Sat Jan 28 19:03:28 2017 +0530 regulator: act8945a-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/act8945a-regulator.o text data bss dec hex filename 3680 464 0 4144 1030 regulator/act8945a-regulator.o File size after: drivers/regulator/act8945a-regulator.o text data bss dec hex filename 3936 192 0 4128 1020 regulator/act8945a-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/act8945a-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2abf29af907abef1ea6f71eb96a62b50d8b5dceb Author: Bhumika Goyal Date: Sat Jan 28 19:00:52 2017 +0530 regulator: aat2870-regulator: constify regulator_ops structure Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/aat2870-regulator.o text data bss dec hex filename 938 1424 0 2362 93a regulator/aat2870-regulator.o File size after: drivers/regulator/aat2870-regulator.o text data bss dec hex filename 1194 1168 0 2362 93a regulator/aat2870-regulator.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/aat2870-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32cb5d30cf4948e74be3dda5fd85781bc8eb9d49 Author: Bhumika Goyal Date: Sat Jan 28 18:58:34 2017 +0530 regulator: 88pm8607: constify regulator_ops structure Declare regulator_ops structures as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/88pm8607.o text data bss dec hex filename 3466 5488 0 8954 22fa drivers/regulator/88pm8607.o File size after: drivers/regulator/88pm8607.o text data bss dec hex filename 3978 4976 0 8954 22fa drivers/regulator/88pm8607.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/88pm8607.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9f19321287fd9adbc98541b3d9d4cd85de2f482 Author: Bhumika Goyal Date: Sat Jan 28 18:53:18 2017 +0530 regulator: 88pm800: constify regulator_ops structures Declare regulator_ops structures as const as they are only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/88pm800.o text data bss dec hex filename 1001 6288 0 7289 1c79 drivers/regulator/88pm800.o File size after: drivers/regulator/88pm800.o text data bss dec hex filename 1513 5776 0 7289 1c79 drivers/regulator/88pm800.o Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown drivers/regulator/88pm800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9b0bdc74735a5173cdce67f8a85f85c2e8bccee Author: Sergej Sawazki Date: Fri Jan 27 23:20:53 2017 +0100 ASoC: wm8741: Remove unused WM8741_NUM_RATES macro This macro is unused since commit e369bd006fd6 ("ASoC: wm8741: Allow master clock switching"). Signed-off-by: Sergej Sawazki Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8741.c | 2 -- 1 file changed, 2 deletions(-) commit b1b9e0d3d98ebb1a228d9994b4c9dbac7215e2b9 Author: Enric Balletbo i Serra Date: Fri Jan 27 16:20:42 2017 +0100 ASoC: mt8173-max98090: remove the call to snd_soc_jack_add_pins. The snd_soc_card_jack_new function can call snd_soc_jack_add_pins for you, so pass directly the pins struct when you create the new jack. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-max98090.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 059c7a5a748d4e7481d8b1b4cf0e182cb81496ad Author: Liviu Dudau Date: Tue Jan 31 17:41:09 2017 +0000 Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct drm-mm.rst contains some unformatted dump of the vm_operations_struct structure. Add some C formatting around it and some context for the dump. While there, update the structure to resemble the new signature for the fault handler after commit 25d3db7600b8 (mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf). Signed-off-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170131174109.13690-1-Liviu.Dudau@arm.com Documentation/gpu/drm-mm.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 7bde09dfcf600e7a5c76a5325c6c3dfa60d08295 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:45 2017 -0600 ASoC: Intel: cht-bsw-rt5645: fix DAI formats Remove default and set I2S mode correctly both on codec and cpu sides Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 39 ++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) commit bf92c6efc68add6b934a2790f650a675a4c38286 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:40 2017 -0600 ASoC: Intel: add support for ALC3270 codec Use ACPI ID 10EC3270 to load machine driver for cht-bsw-rt5645 and add reference to 3270 to use the rt5645 mode Tested on Asus T100HA Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 3 +++ sound/soc/intel/boards/cht_bsw_rt5645.c | 1 + 2 files changed, 4 insertions(+) commit d74390b5fe47710e94b03b550d1b8b8f249cd416 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:44 2017 -0600 ASoC: Intel: cht-bsw-rt5645: select ASRC source based on routing quirk Some platforms use AIF2, use routing information to set ASRC as needed Suggested-by: Bard Liao Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 22af29114eb4c400f6847d425caab460c6241c4e Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:43 2017 -0600 ASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing This driver may be used on Baytrail CR platforms where SSP2 is not available. Add quirks and routing detection based on work done for RT5640. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 238 +++++++++++++++++++++++++++++--- 1 file changed, 220 insertions(+), 18 deletions(-) commit ff9d1fbb3ffa901472cbaf331c999745b5915906 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:37 2017 -0600 ASoc: rt5645: add ACPI ID 10EC3270 ALC3270 is a low-cost version of RT5645, add ACPI ID to enable probe and use rt5645 codec driver Tested on Asus T100HA Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 1 + 1 file changed, 1 insertion(+) commit fd0138dc5d17c636477b371d99265c406437c583 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:35 2017 -0600 ASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10 the BIOS reports this codec as RT5640 but it's a rt5670. Use the quirk mechanism to use the cht_bsw_rt5672 machine driver Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit 42648c2270ca0c96935dfc5d0f5c4f8d2406cf75 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:41 2017 -0600 ASoC: Intel: cht_bsw_rt5645: harden ACPI device detection Fix classic issue of having multiple codecs listed in DSDT but a single one actually enabled. The previous code did not handle such errors and could also lead to uninitalized configurations Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e1d06914542a198a6ab3d41b9d7f5d62dd744f8b Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:39 2017 -0600 ASoC: Intel: Atom: add machine driver for baytrail-rt5645 hardware Use machine driver initially defined for CherryTrail Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 11ad80898620e09bde6ced7147a5f762bcecce81 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:36 2017 -0600 ASoC: rt5645: add support for RT5648 add ACPI ID 10EC5648 found e.g on Asus X205TA and use rt5645 driver Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 1 + sound/soc/intel/boards/cht_bsw_rt5645.c | 1 + 2 files changed, 2 insertions(+) commit 93ffeaa8ee3f10a0628ad135b552a2497e0bef2c Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:34 2017 -0600 ASoC: codecs: rt5670: add quirk for Lenovo Thinkpad 10 the BIOS incorrectly reports this codec as 5640 but it is really a rt5670 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 1 + 1 file changed, 1 insertion(+) commit a1a91752cb9c18a81a3e0027054d38da37243ba2 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:33 2017 -0600 ASoC: Intel: add support for Realtek 5651 on Cherrytrail RT5651 is used on some Cherrytrail platforms, add the ACPI ID in machine table. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156191 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e7974816a8fce6cd11dc4dfa9f1c1844a9b5d8df Author: Alexandrov Stansilav Date: Thu Jan 26 14:09:32 2017 -0600 ASoC: Intel: Atom: Add HP Pavilion x2 10-p000 machine entry Add machine entry for HP X2 Pavilion 10-p100. This notebook contains rt5640 codec, but with ACPI ID "10EC3276". Signed-off-by: Alexandrov Stansilav Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 2 ++ 1 file changed, 2 insertions(+) commit 03200140ee83b3655152bc0c144378732fec8af1 Author: Alexandrov Stansilav Date: Thu Jan 26 14:09:31 2017 -0600 ASoC: rt5640: Add "10EC3276" ACPI ID Add ACPI ID "10EC3276" for sound card found on notebook HP Pavilion X2 10-p000. ACPI DSDT Table on this device describes this card as ALC3276, but it is in fact rt5640. Signed-off-by: Alexandrov Stansilav Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 1 + 1 file changed, 1 insertion(+) commit a50477e55fff69e1028f25624ee9fc9182d59b1f Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:38 2017 -0600 ASoC: Intel: cht_bsw_rt5645: add Baytrail MCLK support The existing code assumes a 19.2 MHz MCLK as the default hardware configuration. This is valid for CherryTrail but not for Baytrail. Add explicit MCLK configuration to set the 19.2 clock on/off depending on DAPM events. This is a prerequisite step to enable devices with Baytrail and RT5645 such as Asus X205TA Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 84 ++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 13 deletions(-) commit 39d75485689de9abd2b27e9b2771c48db8e4be23 Merge: 5b101ab f12f5c8 Author: Mark Brown Date: Tue Jan 31 20:03:10 2017 +0000 Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit f12f5c84e35c7b66dbc5066a46b502b832b69669 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:29 2017 -0600 ASoC: Intel: atom: fix frame polarity The current frame sync polarity definitions are inconsistent in the Atom/DPCM driver, fix to align with regular ASoC definitions and update code in platform and machine drivers for RT5640 and RT5651. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 6 ++---- sound/soc/intel/boards/bytcr_rt5640.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) commit 3639ac1cd5177685a5c8abb7230096b680e1d497 Author: Pierre-Louis Bossart Date: Thu Jan 26 14:09:30 2017 -0600 ASoC: Intel: boards: remove .pm_ops in all Atom/DPCM machine drivers This patch corrects an omission in bytcr_rt5640 and bytcr_rt5651. All existing machine drivers shall not use .pm_ops to avoid a double suspend, as initially implemented by 3f2dcbeaeb2b ("ASoC: Intel: Remove soc pm handling to allow platform driver handle it"). Reported-by: Shrirang Bagul Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 1 - sound/soc/intel/boards/bytcr_rt5651.c | 1 - 2 files changed, 2 deletions(-) commit 1ce24864bff40e11500a699789412115fdf244bf Author: Daniel Kurtz Date: Fri Jan 27 00:21:54 2017 +0800 spi: mediatek: Only do dma for 4-byte aligned buffers Mediatek SPI DMA only works when tx and rx buffer addresses are 4-byte aligned. Unaligned DMA transactions appeared to work previously, since we the spi core was incorrectly using the spi_master device for dma, which had a 0 dma_mask, and therefore the swiotlb dma map operations were falling back to using bounce buffers. Since each DMA transaction would use its own buffer, the mapped starting address of each transaction was always aligned. When doing real DMA, the mapped address will share the alignment of the raw tx/rx buffer provided by the SPI user, which may or may not be aligned. If a buffer is not aligned, we cannot use DMA, and must use FIFO based transaction instead. So, this patch implements a scheme that allows using the FIFO for arbitrary length transactions (larger than the 32-byte FIFO size) by reloading the FIFO in the interrupt handler. Signed-off-by: Daniel Kurtz Cc: Leilk Liu Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 88b0aa544af58ce3be125a1845a227264ec9ab89 Author: Daniel Kurtz Date: Fri Jan 27 00:21:53 2017 +0800 spi: When no dma_chan map buffers with spi_master's parent Back before commit 1dccb598df54 ("arm64: simplify dma_get_ops"), for arm64, devices for which dma_ops were not explicitly set were automatically configured to use swiotlb_dma_ops, since this was hard-coded as the global "dma_ops" in arm64_dma_init(). Now that global "dma_ops" has been removed, all devices much have their dma_ops explicitly set by a call to arch_setup_dma_ops(), otherwise the device is assigned dummy_dma_ops, and thus calls to map_sg for such a device will fail (return 0). Mediatek SPI uses DMA but does not use a dma channel. Support for this was added by commit c37f45b5f1cd ("spi: support spi without dma channel to use can_dma()"), which uses the master_spi dev to DMA map buffers. The master_spi device is not a platform device, rather it is created in spi_alloc_device(), and therefore its dma_ops are never set. Therefore, when the mediatek SPI driver when it does DMA (for large SPI transactions > 32 bytes), SPI will use spi_map_buf()->dma_map_sg() to map the buffer for use in DMA. But dma_map_sg()->dma_map_sg_attrs() returns 0, because ops->map_sg is dummy_dma_ops->__dummy_map_sg, and hence spi_map_buf() returns -ENOMEM (-12). Fix this by using the real spi_master's parent device which should be a real physical device with DMA properties. Signed-off-by: Daniel Kurtz Fixes: c37f45b5f1cd ("spi: support spi without dma channel to use can_dma()") Cc: Leilk Liu Signed-off-by: Mark Brown drivers/spi/spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5b101ab465c5c01b091c04b7fbaba6d912372947 Author: Sebastien Guiriec Date: Thu Jan 26 13:07:04 2017 +0100 ASoC: Intel: Atom: Configure media_loop1 and sprot_loop in stereo Most of the devices are using stereo speakers so media_loop1 and sprot_loop default mode should be stereo. As per default all the routing UCM configuration doesn't enable Post processing loops it is not impacting curent configurations. Signed-off-by: Sebastien Guiriec Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1160ebff1fea7ac7f6e6533b43144d377b56e6f Author: Marek Szyprowski Date: Mon Jan 30 11:57:36 2017 +0100 arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e Add initial clock configuration for display subsystem for Exynos5433 based TM2/TM2e boards in device tree in order to avoid dependency on the configuration left by the bootloader. This initial configuration is also needed to ensure that display subsystem is operational if display power domain gets turned off before clock controller is probed and the inital clock configuration left by the bootloader saved. TM2 and TM2e uses different rate for DISP PLL clock, but for better maintainability all 'assigned-clocks-*' properties for DISP CMU are defines in each board dts instead of redefining the rates property. Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 12 -------- arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 34 ++++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 34 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 12 deletions(-) commit 67707c78f592590c83604d37e709f2e5218a5ac0 Merge: 7547162 698e0d1 Author: Krzysztof Kozlowski Date: Tue Jan 31 21:36:52 2017 +0200 Merge tag 'clk-v4.11-samsung-dphy' of git://linuxtv.org/snawrocki/samsung into next/dt64 Exporting clocks for MIPI DSI DPHY and the display PLL frequency list update for Exynos5433 SoC. commit 73d8ef76006b649f9c272cb4473039e25fcc9908 Author: Dmitry Torokhov Date: Tue Dec 27 11:53:45 2016 -0800 Input: mousedev - stop offering PS/2 to userspace by default 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. Acked-by: Jiri Kosina Acked-by: Peter Hutterer Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 8b1a315b35a961198336b944635c6936321b4a77 Author: Dmitry Torokhov Date: Tue Jan 17 14:18:50 2017 -0800 Input: tca8418 - switch to using generic device properties Let's drop legacy platform data support (there are no users in mainline) and switch to using generic device properties, which will make the driver simpler (non-OF boards can use property sets to describe hardware). Reviewed-by: Maxime Ripard Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 90 ++++++++++----------------------- include/linux/input/tca8418_keypad.h | 44 ---------------- 2 files changed, 26 insertions(+), 108 deletions(-) commit aef01aad89e457e34a60ff6e8fd69ff6740cf201 Author: Dmitry Torokhov Date: Fri Nov 11 12:43:12 2016 -0800 Input: matrix-keypad - switch to using generic device properties Instead of being OF-specific, let's switch to using generic device properties, which will make this code usable on ACPI, device tree and legacy boards that use property sets. As part of the change let's rename matrix_keypad_parse_of_params() to matrix_keypad_parse_properties(). Signed-off-by: Dmitry Torokhov drivers/input/keyboard/bcm-keypad.c | 2 +- drivers/input/keyboard/cros_ec_keyb.c | 3 +- drivers/input/keyboard/lpc32xx-keys.c | 2 +- drivers/input/keyboard/omap4-keypad.c | 4 +- drivers/input/keyboard/pmic8xxx-keypad.c | 2 +- drivers/input/keyboard/pxa27x_keypad.c | 2 +- drivers/input/keyboard/st-keyscan.c | 4 +- drivers/input/keyboard/stmpe-keypad.c | 2 +- drivers/input/keyboard/tca8418_keypad.c | 2 +- drivers/input/keyboard/twl4030_keypad.c | 4 +- drivers/input/matrix-keymap.c | 109 ++++++++++++++++--------------- include/linux/input/matrix_keypad.h | 21 +----- 12 files changed, 73 insertions(+), 84 deletions(-) commit 55d74adfa9758cad5dd989b22cb2558303fe9a0f Author: Marek Szyprowski Date: Mon Jan 30 13:19:00 2017 +0100 ARM: dts: exynos: Add labels to all existing power domains Provide human readable names for all power domains defined in Exynos SoCs. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 7 +++++++ arch/arm/boot/dts/exynos4210.dtsi | 1 + arch/arm/boot/dts/exynos4412.dtsi | 1 + arch/arm/boot/dts/exynos5250.dtsi | 3 +++ arch/arm/boot/dts/exynos5420.dtsi | 5 +++++ 5 files changed, 17 insertions(+) commit b13b2330aab53af4ebaa2859f72f2c802d01abad Author: Marek Szyprowski Date: Mon Jan 30 13:18:59 2017 +0100 soc: samsung: pm_domains: Read domain name from the new label property Device tree nodes for each power domain should use generic "power-domain" name, so using it as a domain name doesn't give much benefits. This patch adds support for human readable names defined in 'label' property. Such names are visible to userspace and makes debugging much easier. When no 'label' property is found, driver keeps using the name constructed from full node name. Suggested-by: Krzysztof Kozlowski Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/power/pd-samsung.txt | 4 ++++ drivers/soc/samsung/pm_domains.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit d1a09872fe2f28bf1a9e224abaf1688807adda91 Author: Marek Szyprowski Date: Mon Jan 30 13:18:58 2017 +0100 soc: samsung: pm_domains: Remove message about failed memory allocation Memory subsystem already prints message about failed memory allocation, there is no need to do it in the drivers. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/pm_domains.c | 2 -- 1 file changed, 2 deletions(-) commit 066502d483dead0417841c5fa7cddb0a50f828e1 Author: Marek Szyprowski Date: Mon Jan 30 13:18:57 2017 +0100 soc: samsung: pm_domains: Remove unused name field Name is now in generic pm domain structure, so there is no need to duplicate it in private data. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/pm_domains.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 402e73c5192b78ea4734f1c76fb7e68d9a41e3e2 Author: Marek Szyprowski Date: Mon Jan 30 13:18:56 2017 +0100 soc: samsung: pm_domains: Use full names in subdomains registration log Device tree none name for each power domain should be "power-domain", so use a bit more descriptive full node name in messages about subdomain registration. This way the following meaningless message: power-domain has as child subdomain: power-domain. is changed to a bit more meaningful one: /soc/power-domain@105c40a0 has as child subdomain: /soc/power-domain@105c4020. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/pm_domains.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b05d1093987a78695766b71a2d723aa65b5c25c5 Author: Taeung Song Date: Tue Jan 31 20:38:29 2017 +0900 perf ftrace: Add ftrace.tracer config option Currently 'perf ftrace' command allows selecting 'function_graph' or 'function', defaulting to 'function_graph'. Add ftrace.tracer config option to select the default tracer: # cat ~/.perfconfig [ftrace] tracer = function # perf ftrace usleep 123456 | head -10 <...>-14450 [002] d... 10089.284231: finish_task_switch <-__schedule <...>-14450 [002] .... 10089.284232: finish_wait <-pipe_wait <...>-14450 [002] .... 10089.284232: mutex_lock <-pipe_wait <...>-14450 [002] .... 10089.284232: _cond_resched <-mutex_lock Committer notes: Retesting it with invalid variables, invalid values for ftrace.tracer, and a valid one: # cat ~/.perfconfig [ftrace] trace = function # perf ftrace usleep 1 Error: wrong config key-value pair ftrace.trace=function # cat ~/.perfconfig [ftrace] tracer = functin # perf ftrace usleep 1 Please select "function_graph" (default) or "function" Error: wrong config key-value pair ftrace.tracer=functin # cat ~/.perfconfig [ftrace] tracer = function # perf ftrace usleep 1 | head -5 -0 [000] d... 3855.820847: switch_mm_irqs_off <-__schedule <...>-18550 [000] d... 3855.820849: finish_task_switch <-__schedule <...>-18550 [000] d... 3855.820851: smp_irq_work_interrupt <-irq_work_interrupt <...>-18550 [000] d... 3855.820851: irq_enter <-smp_irq_work_interrupt <...>-18550 [000] d... 3855.820851: rcu_irq_enter <-irq_enter # Signed-off-by: Taeung Song Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485862711-20216-3-git-send-email-treeze.taeung@gmail.com [ Added missign space in error message, changed the logic to make it more compact and less error prone ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 43d41deb71fe1850264e5dd8109211683954ea14 Author: Taeung Song Date: Tue Jan 31 20:38:28 2017 +0900 perf tools: Create for_each_event macro for tracepoints iteration Similar to for_each_subsystem and for_each_event in util/parse-events.c, add new macro 'for_each_event' for easy iteration over the tracepoints in order to be more compact and readable. Signed-off-by: Taeung Song Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1485862711-20216-2-git-send-email-treeze.taeung@gmail.com [ Slight change to keep existing style for checking strcmp() return ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event-info.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit a26305363d4b3a586a2d3554c22705538aa4e926 Author: Joe Stringer Date: Thu Jan 26 13:20:01 2017 -0800 perf test: Add libbpf pinning test Add a test for the newly added BPF object pinning functionality. For example: # tools/perf/perf test 37 37: BPF filter : 37.1: Basic BPF filtering : Ok 37.2: BPF pinning : Ok 37.3: BPF prologue generation : Ok 37.4: BPF relocation checker : Ok # tools/perf/perf test 37 -v 2>&1 | grep pinned libbpf: pinned map '/sys/fs/bpf/perf_test/flip_table' libbpf: pinned program '/sys/fs/bpf/perf_test/func=SyS_epoll_wait/0' Signed-off-by: Joe Stringer Requested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-7-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 71dc4c30680fa7e7fd4b82352a845e2fb4d86b2b Author: Joe Stringer Date: Thu Jan 26 13:20:00 2017 -0800 tools lib api fs: Add bpf_fs filesystem detector Allow mounting of the BPF filesystem at /sys/fs/bpf. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-6-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/fs.c | 16 ++++++++++++++++ tools/lib/api/fs/fs.h | 1 + 2 files changed, 17 insertions(+) commit 9a9c733d68c5cb89bd5c5ab91b9821e1a5d69272 Author: Joe Stringer Date: Thu Jan 26 13:19:59 2017 -0800 tools perf util: Make rm_rf(path) argument const rm_rf() doesn't modify its path argument, and a future caller will pass a string constant into it to delete. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-5-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.c | 2 +- tools/perf/util/util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d5148d8554d08f03b3e34ecc286ab1729c35c24c Author: Joe Stringer Date: Thu Jan 26 13:19:58 2017 -0800 tools lib bpf: Add bpf_object__pin() Add a new API to pin a BPF object to the filesystem. The user can specify the path within a BPF filesystem to pin the object. Programs will be pinned under a subdirectory named the same as the program, with each instance appearing as a numbered file under that directory, and maps will be pinned under the path using the name of the map as the file basename. For example, with the directory '/sys/fs/bpf/foo' and a BPF object which contains two instances of a program named 'bar', and a map named 'baz': /sys/fs/bpf/foo/bar/0 /sys/fs/bpf/foo/bar/1 /sys/fs/bpf/foo/baz Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-4-joe@ovn.org [ Check snprintf >= for truncation, as snprintf(bf, size, ...) == size also means truncation ] Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 1 + 2 files changed, 54 insertions(+) commit b6989f35e80bf830f8dc97b74128d619faef0273 Author: Joe Stringer Date: Thu Jan 26 13:19:57 2017 -0800 tools lib bpf: Add bpf_map__pin() Add a new API to pin a BPF map to the filesystem. The user can specify the path full path within a BPF filesystem to pin the map. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-3-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 22 ++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 1 + 2 files changed, 23 insertions(+) commit f367540c8c13d65603c431e29a0b87a7db893d6c Author: Joe Stringer Date: Thu Jan 26 13:19:56 2017 -0800 tools lib bpf: Add BPF program pinning APIs Add new APIs to pin a BPF program (or specific instances) to the filesystem. The user can specify the path full path within a BPF filesystem to pin the program. bpf_program__pin_instance(prog, path, n) will pin the nth instance of 'prog' to the specified path. bpf_program__pin(prog, path) will create the directory 'path' (if it does not exist) and pin each instance within that directory. For instance, path/0, path/1, path/2. Committer notes: - Add missing headers for mkdir() - Check strdup() for failure - Check snprintf >= size, not >, as == also means truncated, see 'man snprintf', return value. - Conditionally define BPF_FS_MAGIC, as it isn't in magic.h in older systems and we're not yet having a tools/include/uapi/linux/magic.h copy. - Do not include linux/magic.h, not present in older distros. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-2-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 3 ++ 2 files changed, 123 insertions(+) commit 9c68ae98c6f714ef573826cfc9055af1bd5e97b1 Author: Krister Johansen Date: Thu Jan 5 22:23:31 2017 -0800 perf callchain: Reference count maps If dso__load_kcore frees all of the existing maps, but one has already been attached to a callchain cursor node, then we can get a SIGSEGV in any function that happens to try to use this invalid cursor. Use the existing map refcount mechanism to forestall cleanup of a map until the cursor iterates past the node. Signed-off-by: Krister Johansen Tested-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: stable@kernel.org Fixes: 84c2cafa2889 ("perf tools: Reference count struct map") Link: http://lkml.kernel.org/r/20170106062331.GB2707@templeofstupid.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 11 +++++++++-- tools/perf/util/callchain.h | 6 ++++++ tools/perf/util/hist.c | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) commit 1c74a6da1e4fefb9db9ce467b5e482fb6a15c676 Author: Linus Walleij Date: Tue Jan 17 15:25:13 2017 +0100 iio: adc: add device tree bindings for Qualcomm PM8xxx ADCs This adds the device tree bindings for the Qualcomm PM8xxx ADCs. This is based on the existing DT bindings for the SPMI ADC so there are hopefully no controversial features. Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: Ivan T. Ivanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: Srinivas Kandagatla Cc: Rama Krishna Phani A Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron .../bindings/iio/adc/qcom,pm8xxx-xoadc.txt | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) commit 7d816e54b847b1e9e7357bf890a03a00f2025381 Author: William Breathitt Gray Date: Mon Jan 30 12:16:04 2017 -0500 iio: stx104: Add support for GPIO names This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the Apex Embedded Systems STX104. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 624374a56419c2d6d428c862f32cc1b20519095d Merge: 953046e 8e6f31b Author: David S. Miller Date: Tue Jan 31 13:44:50 2017 -0500 Merge branch 'bgmac-phy-init' Rafał Miłecki says: ==================== net-next: use one struct bgmac & add PHY support This patchset adds support for initializing PHY using PHY subsystem. It's required e.g. for wireless access point devices that use bgmac supported Ethernet device connected to some external PHY. Implementing this required accessing phydev in bcma specific code which wasn't possible with core code allocating struct bgmac on its own. This is why I needed to modify alloc_etherdev usage first. ==================== Signed-off-by: David S. Miller commit 8e6f31baba7e2c13ab7e954fe6179420a7545a8b Author: Rafał Miłecki Date: Tue Jan 31 19:37:56 2017 +0100 net: bgmac: use PHY subsystem for initializing PHY This adds support for using bgmac with PHYs supported by standalone PHY drivers. Having any PHY initialization in bgmac is hacky and shouldn't be extended but rather removed if anyone has hardware to test it. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit aa8863e5d49417094b9457a0d53e8505e95a1863 Author: Rafał Miłecki Date: Tue Jan 31 19:37:55 2017 +0100 net: bgmac: drop struct bcma_mdio we don't need anymore Adding struct bcma_mdio was a workaround for bcma code not having access to the struct bgmac used in the core code. Now we don't duplicate this struct we can just use it internally in bcma code. This simplifies code & allows access to all bgmac driver details from all places in bcma code. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c | 98 ++++++++++--------------- drivers/net/ethernet/broadcom/bgmac-bcma.c | 2 +- drivers/net/ethernet/broadcom/bgmac.h | 2 +- 3 files changed, 42 insertions(+), 60 deletions(-) commit 34a5102c3235c470a6c77fba16cb971964d9c136 Author: Rafał Miłecki Date: Tue Jan 31 19:37:54 2017 +0100 net: bgmac: allocate struct bgmac just once & don't copy it So far were were allocating struct bgmac in 3 places: platform code, bcma code and shared bgmac_enet_probe function. The reason for this was bgmac_enet_probe: 1) Requiring early-filled struct bgmac 2) Calling alloc_etherdev on its own in order to use netdev_priv later This solution got few drawbacks: 1) Was duplicating allocating code 2) Required copying early-filled struct 3) Resulted in platform/bcma code having access only to unused struct Solve this situation by simply extracting some probe code into the new bgmac_alloc function. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 4 +--- drivers/net/ethernet/broadcom/bgmac-platform.c | 2 +- drivers/net/ethernet/broadcom/bgmac.c | 25 +++++++++++++++++-------- drivers/net/ethernet/broadcom/bgmac.h | 3 ++- 4 files changed, 21 insertions(+), 13 deletions(-) commit 953046e1af0f188ffe7061ee05160318e7f9d0dd Author: Florian Fainelli Date: Mon Jan 30 19:17:16 2017 -0800 net: dsa: bcm_sf2: Fix build module Commit 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc") added a new object to build: bcm_sf2_cfp.o, but in doing so, we essentially just built this object and no longer bcm_sf2.o. Fix this by creating a module named bcm-sf2.ko which links in bcm_sf2.o and bcm_sf2_cfp.o. Fixes: 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d909aa7c276584cc17413a7bec64d4fb5da2968 Author: Ganesh Goudar Date: Tue Jan 31 13:21:50 2017 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number 1.16.26.0. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4d1ceea8516cd6adf21f6b75995e2a7d4f376f9b Author: Alexei Starovoitov Date: Mon Jan 30 18:25:18 2017 -0800 net: ethtool: convert large order kmalloc allocations to vzalloc under memory pressure 'ethtool -S' command may warn: [ 2374.385195] ethtool: page allocation failure: order:4, mode:0x242c0c0 [ 2374.405573] CPU: 12 PID: 40211 Comm: ethtool Not tainted [ 2374.423071] Call Trace: [ 2374.423076] [] dump_stack+0x4d/0x64 [ 2374.423080] [] warn_alloc_failed+0xeb/0x150 [ 2374.423082] [] ? __alloc_pages_direct_compact+0x43/0xf0 [ 2374.423084] [] __alloc_pages_nodemask+0x4dc/0xbf0 [ 2374.423091] [] ? cmd_exec+0x722/0xcd0 [mlx5_core] [ 2374.423095] [] alloc_pages_current+0x8c/0x110 [ 2374.423097] [] alloc_kmem_pages+0x19/0x90 [ 2374.423099] [] kmalloc_order_trace+0x2e/0xe0 [ 2374.423101] [] __kmalloc+0x204/0x220 [ 2374.423105] [] dev_ethtool+0xe4e/0x1f80 [ 2374.423106] [] ? dev_get_by_name_rcu+0x5e/0x80 [ 2374.423108] [] dev_ioctl+0x156/0x560 [ 2374.423111] [] ? mem_cgroup_commit_charge+0x78/0x3c0 [ 2374.423117] [] sock_do_ioctl+0x42/0x50 [ 2374.423119] [] sock_ioctl+0x1b3/0x250 [ 2374.423121] [] do_vfs_ioctl+0x92/0x580 [ 2374.423123] [] ? do_audit_syscall_entry+0x4b/0x70 [ 2374.423124] [] ? syscall_trace_enter_phase1+0xfc/0x120 [ 2374.423126] [] SyS_ioctl+0x79/0x90 [ 2374.423127] [] do_syscall_64+0x50/0xa0 [ 2374.423129] [] entry_SYSCALL64_slow_path+0x25/0x25 ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed under memory pressure. Convert them to vzalloc() as ethtool_get_regs() does. Also take care of drivers without counters similar to commit 67ae7cf1eeda ("ethtool: Allow zero-length register dumps again") and reduce warn_on to warn_on_once. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/ethtool.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit f8244ab55200dbe074380c3388804adff03a8a19 Author: Philippe Reynes Date: Mon Jan 30 23:04:42 2017 +0100 net: aquantia: atlantic: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Pavel Belous Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 23 +++++----- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 51 ++++++++++++++-------- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 6 ++- 3 files changed, 49 insertions(+), 31 deletions(-) commit 97b50a654d5de505ccf972c6b7ea7bfda1c0c475 Author: Christoph Hellwig Date: Sat Jan 28 09:32:53 2017 +0100 virtio_blk: make SCSI passthrough support configurable The SCSI passthrough idea was a a bad idea to start with (guess who came up with it?), and has been removed from the virtio 1.O spec, and is not enabled by defauly by any host I know of. Add a separate config option for it so that we don't need to enable it for most setups. That way any bugs related to it (like the one recently fixed for vmapped stacks) do not affect other users, and the size of the virtblk_req structure also shrinks significantly. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/Kconfig | 11 +++- drivers/block/virtio_blk.c | 143 +++++++++++++++++++++++++++++---------------- 2 files changed, 104 insertions(+), 50 deletions(-) commit 85dada09eeb31c0eb183e4b2fac01b2381706b79 Author: Christoph Hellwig Date: Sat Jan 28 09:32:52 2017 +0100 virtio_blk: remove struct request backpointer from virtblk_req We can simply use blk_mq_rq_from_pdu to get back at the request at I/O completion time. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/virtio_blk.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 72148aecf4fd9218e2db1333534e8403fdd66eb9 Author: Christoph Hellwig Date: Sat Jan 28 09:32:51 2017 +0100 block: make scsi_request and scsi ioctl support optional We only need this code to support scsi, ide, cciss and virtio. And at least for virtio it's a deprecated feature to start with. This should shrink the kernel size for embedded device that only use, say eMMC a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/Kconfig | 5 +++++ block/Makefile | 5 +++-- drivers/block/Kconfig | 4 ++++ drivers/block/paride/Kconfig | 1 + drivers/ide/Kconfig | 1 + drivers/scsi/Kconfig | 1 + drivers/target/Kconfig | 1 + fs/nfsd/Kconfig | 1 + 8 files changed, 17 insertions(+), 2 deletions(-) commit 3719fa8622a9f5b0eccebad08785161696b54456 Author: Christoph Hellwig Date: Sat Jan 28 09:32:50 2017 +0100 skd: implement trivial scsi ioctls directly This way there is no need to drag in a dependency on the BLOCK_PC code, which is going to become optional. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/skd_main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit c528fcb116e61afc379a2e0a0f70906b937f1e2c Author: Johan Hovold Date: Tue Jan 31 17:17:29 2017 +0100 USB: serial: keyspan_pda: fix receive sanity checks Make sure to check for short transfers before parsing the receive buffer to avoid acting on stale data. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/keyspan_pda.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 1b0aed2b1600f6e5c7b9acfbd610a4e351ef5232 Author: Johan Hovold Date: Tue Jan 31 17:17:28 2017 +0100 USB: serial: digi_acceleport: fix incomplete rx sanity check Make sure the received data has the required headers before parsing it. Also drop the redundant urb-status check, which has already been handled by the caller. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/digi_acceleport.c | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 2d380889215fe20b8523345649dee0579821800c Author: Johan Hovold Date: Tue Jan 31 17:17:27 2017 +0100 USB: serial: digi_acceleport: fix OOB data sanity check Make sure to check for short transfers to avoid underflow in a loop condition when parsing the receive buffer. Also fix an off-by-one error in the incomplete sanity check which could lead to invalid data being parsed. Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # v2.6.30 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/digi_acceleport.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 32ddd944a056c786f6acdd95ed29e994adc613a2 Author: J. Bruce Fields Date: Tue Jan 3 12:30:11 2017 -0500 nfsd: opt in to labeled nfs per export Currently turning on NFSv4.2 results in 4.2 clients suddenly seeing the individual file labels as they're set on the server. This is not what they've previously seen, and not appropriate in may cases. (In particular, if clients have heterogenous security policies then one client's labels may not even make sense to another.) Labeled NFS should be opted in only in those cases when the administrator knows it makes sense. It's helpful to be able to turn 4.2 on by default, and otherwise the protocol upgrade seems free of regressions. So, default labeled NFS to off and provide an export flag to reenable it. Users wanting labeled NFS support on an export will henceforth need to: - make sure 4.2 support is enabled on client and server (as before), and - upgrade the server nfs-utils to a version supporting the new "security_label" export flag. - set that "security_label" flag on the export. This is commit may be seen as a regression to anyone currently depending on security labels. We believe those cases are currently rare. Reported-by: tibbs@math.uh.edu Signed-off-by: J. Bruce Fields fs/nfsd/export.c | 1 + fs/nfsd/nfs4proc.c | 4 ++++ fs/nfsd/nfs4xdr.c | 5 ++++- include/uapi/linux/nfsd/export.h | 5 +++-- 4 files changed, 12 insertions(+), 3 deletions(-) commit 5cf23dbb1d3122bbc378dbbd96880a086c1b63df Author: J. Bruce Fields Date: Wed Jan 11 20:40:36 2017 -0500 nfsd: constify nfsd_suppatttrs To keep me from accidentally writing to this again.... Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 2 +- fs/nfsd/nfsd.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit c01410f7f6fd476072c9a71241938c24bed8b6f9 Author: Scott Mayhew Date: Thu Jan 5 16:34:50 2017 -0500 lockd: initialize sin6_scope_id in lockd_inet6addr_event() I noticed this was missing when I was testing with link local addresses. Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b19824de685eae9802f679cab7457aad486d185 Author: Scott Mayhew Date: Thu Jan 5 16:34:49 2017 -0500 nfsd: initialize sin6_scope_id in nfsd_inet6addr_event() I noticed this was missing when I was testing with link local addresses. Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 2 ++ 1 file changed, 2 insertions(+) commit 865d50b23e4d29c4958e6082c2ed8631472c613f Author: Kinglong Mee Date: Sat Dec 31 21:00:21 2016 +0800 NFSD: Remove unused value inode in nfsd_vfs_write This is just cleanup, no change in functionality. Signed-off-by: Kinglong Mee Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/vfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 52e380e049d28732ec280c1e8840c9eddc716adb Author: Kinglong Mee Date: Sat Dec 31 21:00:13 2016 +0800 NFSD: cleanup dead codes and values in nfsd_write This is just cleanup, no change in functionality. Signed-off-by: Kinglong Mee Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/nfs3proc.c | 8 +++----- fs/nfsd/nfsproc.c | 7 ++----- fs/nfsd/vfs.c | 35 +++++++++++------------------------ fs/nfsd/vfs.h | 4 ++-- 4 files changed, 18 insertions(+), 36 deletions(-) commit 54bbb7d206db78a3dfd87bc8d9735cbe3ac3f938 Author: Kinglong Mee Date: Sat Dec 31 20:59:53 2016 +0800 NFSD: pass an integer for stable type to nfsd_vfs_write After fae5096ad217 "nfsd: assume writeable exportabled filesystems have f_sync" we no longer modify this argument. This is just cleanup, no change in functionality. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfs3proc.c | 2 +- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfs4xdr.c | 2 +- fs/nfsd/nfsproc.c | 3 +-- fs/nfsd/vfs.c | 11 +++++------ fs/nfsd/vfs.h | 4 ++-- 6 files changed, 11 insertions(+), 13 deletions(-) commit e35659f1b03c03946cae8abb6b0a9e170b574f1c Author: NeilBrown Date: Wed Dec 21 14:32:19 2016 +1100 NFSD: correctly range-check v4.x minor version when setting versions. Writing to /proc/fs/nfsd/versions allows individual major versions and NFSv4 minor versions to be enabled or disabled. However NFSv4.0 cannot currently be disabled, thought there is no good reason. Also the minor number is parsed as a 'long' but used as an 'int' so '4294967297' will be incorrectly treated as '1'. This patch removes the test on 'minor == 0' and switches to kstrtouint() to get correct range checking. When reading from /proc/fs/nfsd/versions, 4.0 is current not reported. To allow the disabling for v4.0 to be visible, while maintaining backward compatibility, change code to report "-4.0" if appropriate, but not "+4.0". Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 2b477c00f3bd87c3286f5940cb4174d8b01ee0d5 Author: Neil Brown Date: Thu Dec 22 12:38:06 2016 -0500 svcrpc: free contexts immediately on PROC_DESTROY We currently handle a client PROC_DESTROY request by turning it CACHE_NEGATIVE, setting the expired time to now, and then waiting for cache_clean to clean it up later. Since we forgot to set the cache's nextcheck value, that could take up to 30 minutes. Also, though there's probably no real bug in this case, setting CACHE_NEGATIVE directly like this probably isn't a great idea in general. So let's just remove the entry from the cache directly, and move this bit of cache manipulation to a helper function. Signed-off-by: Neil Brown Reported-by: Andy Adamson Signed-off-by: Andy Adamson Signed-off-by: J. Bruce Fields include/linux/sunrpc/cache.h | 1 + net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- net/sunrpc/cache.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) commit e9904990e8e70a51574e6ec6b872f3c705ec75f0 Author: Colin Ian King Date: Tue Jan 31 16:30:02 2017 +0000 sfc: fix an off-by-one compare on an array size encap_type should be checked to see if it is greater or equal to the size of array map to fix an off-by-one array size check. This fixes an array overrun read as detected by static analysis by CoverityScan, CID#1398883 ("Out-of-bounds-read") Fixes: 9b41080125176841e ("sfc: insert catch-all filters for encapsulated traffic") Signed-off-by: Colin Ian King Acked-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec663d967b2276448a416406ca59ff247c0c80c5 Author: Catalin Marinas Date: Fri Jan 27 10:54:12 2017 +0000 arm64: Improve detection of user/non-user mappings in set_pte(_at) Commit cab15ce604e5 ("arm64: Introduce execute-only page access permissions") allowed a valid user PTE to have the PTE_USER bit clear. As a consequence, the pte_valid_not_user() macro in set_pte() was replaced with pte_valid_global() under the assumption that only user pages have the nG bit set. EFI mappings, however, also have the nG bit set and set_pte() wrongly ignores issuing the DSB+ISB. This patch reinstates the pte_valid_not_user() macro and adds the PTE_UXN bit check since all kernel mappings have this bit set. For clarity, pte_exec() is renamed to pte_user_exec() as it only checks for the absence of PTE_UXN. Consequently, the user executable check in set_pte_at() drops the pte_ng() test since pte_user_exec() is sufficient. Fixes: cab15ce604e5 ("arm64: Introduce execute-only page access permissions") Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f57e9618738da2ec562adf2dc312070b7b9a0dec Author: Mauro Carvalho Chehab Date: Thu Nov 24 09:52:34 2016 -0200 [media] ivtv: use pr_foo() instead of calling printk() directly pr_foo() provides a convenient way for printk's, enforcing that they'll all prepend the error message with the driver's name. Use it inside ivtv. Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-alsa-main.c | 11 +++++------ drivers/media/pci/ivtv/ivtv-driver.c | 12 ++++++------ drivers/media/pci/ivtv/ivtvfb.c | 6 +++--- 3 files changed, 14 insertions(+), 15 deletions(-) commit bbdba43f202bcd724063524aef1436459af0e5ec Author: Mauro Carvalho Chehab Date: Thu Nov 24 09:01:20 2016 -0200 [media] ivtv: prepare to convert to pr_foo() Move the pr_fmt() macro to ivtv_driver.h and ensure that it will be the first file to be included on all ivtv files. While here, put the includes inside ivtv-driver.h on alphabetic order. Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-alsa-main.c | 15 +++--------- drivers/media/pci/ivtv/ivtv-alsa-mixer.c | 13 ++++------- drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 15 +++++------- drivers/media/pci/ivtv/ivtv-driver.h | 39 +++++++++++++++++--------------- drivers/media/pci/ivtv/ivtv-mailbox.c | 4 ++-- drivers/media/pci/ivtv/ivtvfb.c | 17 +++++--------- 6 files changed, 42 insertions(+), 61 deletions(-) commit 6fdb7b0c0e6412a351deb1eaab0e5eb9635d6086 Author: Johan Hovold Date: Tue Jan 31 11:51:09 2017 +0100 USB: serial: ark3116: use port device for info and error messages Use the port device rather than usb device in info and error messages. This makes sure that driver and tty port is included in the messages, while also making them more uniform. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 41a2af93aeebd43daaac397b6662d5822f0742fc Author: Johan Hovold Date: Tue Jan 31 11:51:08 2017 +0100 USB: serial: ark3116: remove redundant interrupt-urb check Remove redundant check of num_interrupt_in which has already been verified in probe (killing a NULL-urb would also have been fine). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecb10b694b72ca5ea51b3c90a71ff2a11963425a Author: Lv Zheng Date: Thu Jan 12 15:47:40 2017 +0800 ACPI / button: Remove lid_init_state=method mode The mode is buggy, and lid_init__state=open is more useful than this mode, so this patch makes it deprecated. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki Documentation/acpi/acpi-lid.txt | 16 ++++------------ drivers/acpi/button.c | 9 --------- 2 files changed, 4 insertions(+), 21 deletions(-) commit 77e9a4aa9de10cc1418bf9a892366988802a8025 Author: Lv Zheng Date: Thu Jan 12 15:47:34 2017 +0800 ACPI / button: Change default behavior to lid_init_state=open More and more platforms need the button.lid_init_state=open quirk. This patch sets it the default behavior. If a platform doesn't send lid open event or lid open event is lost due to the underlying system problems, then we can compare various combinations: 1. systemd/acpid is used to suspend system or not, systemd has a special logic forcing open event after resuming; 2. _LID returns a cached value or not. The result is as follows: 1. lid_init_state=method 1. cached 1. resumed by lid: (x) event=close (x) systemd=suspends again (x) acpid=suspends again (x) state=close 2. resumed by other: (o) event=close (x) systemd=suspends again (x) acpid=suspends again (o) state=close 2. non-cached 1. resumed by lid: (o) event=open (o) systemd=resumes (o) acpid=resumes (o) state=open 2. resumed by other: (o) event=close (x) systemd=suspends again (x) acpid=suspends again (o) state=close 2. lid_init_state=open 1. cached 1. resumed by lid: (o) event=open (o) systemd=resumes (o) acpid=resumes (x) state=close 2. resumed by other: (x) event=open (o) systemd=resumes (o) acpid=resumes (o) state=close 2. non-cached 1. resumed by lid: (o) event=open (o) systemd=resumes (o) acpid=resumes (o) state=open 2. resumed by other: (x) event=open (o) systemd=resumes (o) acpid=resumes (o) state=close 3. lid_init_state=ignore 1. cached 1. resumed by lid: (o) event=none (x) systemd=suspends again (o) acpid=resumes (x) state=close 2. resumed by other: (o) event=none (x) systemd=suspends again (o) acpid=resumes (o) state=close 2. non-cached 1. resumed by lid: (o) event=none (x) systemd=suspends again (o) acpid=resumes (o) state=open 2. resumed by other: (o) event=none (x) systemd=suspends again (o) acpid=resumes (o) state=close As a conclusion: 1. With systemd changed, lid_init_state=ignore has only one problem and the problem comes from an underlying issue, not userspace and kernel lid handling. 2. Without systemd changed, lid_init_state=open can be the default behavior as the pass ratio is not much worse than lid_init_state=ignore. 3. lid_init_state=method is buggy, we can have a separate patch to make it deprectated. Link: https://bugzilla.kernel.org/show_bug.cgi?id=187271 Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4481200364ab1d6820a77ed442775a6e4f7c979f Author: Johan Hovold Date: Tue Jan 31 11:51:07 2017 +0100 USB: serial: ark3116: fix endpoint-check return value Return -ENODEV rather than -EINVAL on probe errors due to a missing endpoint. Also clean up the endpoint sanity check somewhat and use the interface device for logging a more compact error in case an expected endpoint is missing. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 7bf7d778620d83f14fcd92d0938fb97c7d78bf19 Author: Keith Busch Date: Tue Jan 24 18:07:00 2017 -0500 nvme/pci: Don't mark IOD as aborted if abort wasn't sent This patch sets the aborted flag only if an abort was sent, reducing excessive kernel message spamming for completed IO that wasn't actually aborted. Reported-by: Jens Axboe Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9a69b0ed6257ae5e71c99bf21ce53f98c558476a Author: Javier González Date: Tue Jan 31 13:17:20 2017 +0100 lightnvm: allow targets to use sysfs In order to register through the sysfs interface, a driver needs to know its kobject. On a disk structure, this happens when the partition information is added (device_add_disk), which for lightnvm takes place after the target has been initialized. This means that on target initialization, the kboject has not been created yet. This patch adds a target function to let targets initialize their own kboject as a child of the disk kobject. Signed-off-by: Javier González Added exit typedef and passed gendisk instead of void pointer for exit. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 9 +++++++++ include/linux/lightnvm.h | 6 ++++++ 2 files changed, 15 insertions(+) commit deccf5a52ea59843f5575cb49fe532c7cb8801e4 Author: Javier González Date: Tue Jan 31 13:17:19 2017 +0100 lightnvm: free properly on target creation error Fix a memory leak when target creation fails. More specifically, free the entire device structure given to the target (tgt_dev). Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38ea2f7656f815e7330868cbec7bada0fd7933a8 Author: Javier González Date: Tue Jan 31 13:17:18 2017 +0100 lightnvm: Add CRC read error Let the host differentiate between a read error and a CRC check error on the device side. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe include/linux/lightnvm.h | 1 + 1 file changed, 1 insertion(+) commit 06894efea706b3cd4ce31e341ec51b4c62c34a86 Author: Matias Bjørling Date: Tue Jan 31 13:17:17 2017 +0100 lightnvm: use end_io callback instead of instance When the lightnvm core had the "gennvm" layer between the device and the target, there was a need for the core to be able to figure out which target it should send an end_io callback to. Leading to a "double" end_io, first for the media manager instance, and then for the target instance. Now that core and gennvm is merged, there is no longer a need for this, and a single end_io callback will do. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 3 ++- drivers/lightnvm/core.c | 7 +++---- drivers/lightnvm/rrpc.c | 7 +++---- drivers/lightnvm/rrpc.h | 3 --- drivers/nvme/host/lightnvm.c | 3 ++- include/linux/lightnvm.h | 10 +++------- 6 files changed, 13 insertions(+), 20 deletions(-) commit 84d4add793c65b5bda802dcefcf0d7ab1a8e22ed Author: Matias Bjørling Date: Tue Jan 31 13:17:16 2017 +0100 lightnvm: add ioctls for vector I/Os Enable user-space to issue vector I/O commands through ioctls. To issue a vector I/O, the ppa list with addresses is also required and must be mapped for the controller to access. For each ioctl, the result and status bits are returned as well, such that user-space can retrieve the open-channel SSD completion bits. The implementation covers the traditional use-cases of bad block management, and vectored read/write/erase. Signed-off-by: Matias Bjørling Metadata implementation, test, and fixes. Signed-off-by: Simon A.F. Lund Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 + drivers/nvme/host/lightnvm.c | 220 ++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 6 ++ include/uapi/linux/lightnvm.h | 50 ++++++++++ 4 files changed, 280 insertions(+) commit 19bd6fe73ca812964963aa30827cff9aae64a715 Author: Matias Bjørling Date: Tue Jan 31 13:17:15 2017 +0100 lightnvm: reduce number of nvm_id groups to one The number of configuration groups has been limited to one in current code, even if there is support for up to four. With the introduction of the open-channel SSD 1.3 specification, only a single group is exposed onwards. Reflect this in the nvm_id structure. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 3 +- drivers/lightnvm/core.c | 12 ++---- drivers/nvme/host/lightnvm.c | 87 +++++++++++++++++++++----------------------- include/linux/lightnvm.h | 3 +- 4 files changed, 47 insertions(+), 58 deletions(-) commit dab8ee9e8a30620a5b5f22d6c0b3749217093803 Author: Matias Bjørling Date: Tue Jan 31 13:17:14 2017 +0100 lightnvm: cleanup nvm transformation functions Going from target specific ppa addresses to device was accomplished by first converting target to generic ppa addresses and generic to device addresses. The conversion was either open-coded or used the built-in nvm_trans_* and nvm_map_* functions for conversion. Simplify the interface and cleanup the calls to provide clean functions that now either take a list of ppas or a nvm_rq, and is exposed through: void nvm_ppa_* - target to/from device with a list of PPAs, void nvm_rq_* - target to/from device with a nvm_rq. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 115 ++++++++++++++--------------------------------- include/linux/lightnvm.h | 14 +++--- 2 files changed, 40 insertions(+), 89 deletions(-) commit 61a561d8d7d1e1cac46618d01aa3298eb447eece Author: Matias Bjørling Date: Tue Jan 31 13:17:13 2017 +0100 lightnvm: make nvm_map_* return void The only check there was done was a debugging check. Remove it and replace the return value with void to reduce error checking. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) commit 8f4fe008fb256649bd0e16c96a6eafa3bd916ac3 Author: Matias Bjørling Date: Tue Jan 31 13:17:12 2017 +0100 lightnvm: remove nvm_get_bb_tbl and nvm_set_bb_tbl Since the merge of gennvm and core, there is no longer a need for the device specific bad block functions. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 40 ++++------------------------------------ include/linux/lightnvm.h | 2 -- 2 files changed, 4 insertions(+), 38 deletions(-) commit 583b7058b2e8071f59646c8fb027f6c3597417ac Author: Matias Bjørling Date: Tue Jan 31 13:17:11 2017 +0100 lightnvm: remove nvm_submit_ppa* functions The nvm_submit_ppa* functions are no longer needed after gennvm and core have been merged. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 109 ----------------------------------------------- include/linux/lightnvm.h | 4 -- 2 files changed, 113 deletions(-) commit 10995c3dc9d7f47b92ff3e74b4bd191ddb7991ff Author: Matias Bjørling Date: Tue Jan 31 13:17:10 2017 +0100 lightnvm: collapse nvm_erase_ppa and nvm_erase_blk After gennvm and core have been merged, there are no more callers to nvm_erase_ppa. Therefore collapse the device specific and target specific erase functions. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 57 ++++++++++++++++++++++-------------------------- include/linux/lightnvm.h | 1 - 2 files changed, 26 insertions(+), 32 deletions(-) commit ade69e2432b795c76653e1dfa09c684549826a50 Author: Matias Bjørling Date: Tue Jan 31 13:17:09 2017 +0100 lightnvm: merge gennvm with core For the first iteration of Open-Channel SSDs, it was anticipated that there could be various media managers on top of an open-channel SSD, such to allow vendors to plug in their own host-side FTLs, without the media manager in between. Now that an Open-Channel SSD is exposed as a traditional block device, there is no longer a need for this. Therefore lets merge the gennvm code with core and simplify the stack. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/Kconfig | 9 - drivers/lightnvm/Makefile | 3 +- drivers/lightnvm/core.c | 786 ++++++++++++++++++++++++++++++++----------- drivers/lightnvm/gennvm.c | 657 ------------------------------------ drivers/lightnvm/gennvm.h | 62 ---- drivers/lightnvm/sysblk.c | 733 ---------------------------------------- drivers/nvme/host/lightnvm.c | 7 +- include/linux/lightnvm.h | 97 +----- 8 files changed, 606 insertions(+), 1748 deletions(-) commit a3035886852cd859e371550fe726da08b85c67d0 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:09 2017 +0100 ARM: davinci: remove BUG_ON() from da850_register_sata() The ahci driver now supports other refclk clock rates. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/devices-da8xx.c | 3 --- 1 file changed, 3 deletions(-) commit 00bacfbfaf508940fd5fba22372a0935c4a01358 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:03 2017 +0100 ARM: davinci: da850: model the SATA refclk Register a fixed rate clock modelling the external SATA oscillator for da850 (both DT and board file mode). Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da8xx-dt.c | 8 ++++++++ arch/arm/mach-davinci/devices-da8xx.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-davinci/include/mach/da8xx.h | 1 + 3 files changed, 38 insertions(+) commit 8ba0f6caa41c0786b964dcf75ab74bb05c726ec3 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:02 2017 +0100 ARM: davinci: da850: add con_id for the SATA clock The ahci-da850 SATA driver is now capable of retrieving clocks by con_id. Add the connection id for the sysclk2-derived SATA clock. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da850.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b88a10765471cff87025794fbe1ccaa96c7945a8 Merge: 57a66aa 430d7dd Author: Sekhar Nori Date: Tue Jan 31 20:45:32 2017 +0530 Merge branch 'v4.11/fixes-non-critical' into v4.11/soc This merge is because patches in branch v4.11/soc conflict with cleanup done as part of 0a5011673af0 ("ARM: davinci: da850: coding style fix") that is already queued as a non-critical fix. commit cdf0ead3747200d527f37170d3fdd41e368f88b0 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:08 2017 +0100 sata: ahci-da850: un-hardcode the MPY bits All platforms using this driver now register the SATA refclk. Remove the hardcoded default value from the driver and instead read the rate of the external clock and calculate the required MPY value from it. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo [nsekhar@ti.com: fix checkpatch warning about an unneeded else] Signed-off-by: Sekhar Nori drivers/ata/ahci_da850.c | 91 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 15 deletions(-) commit 3988d663c02fc050afddb78953e8b0cad83e9905 Author: Christophe JAILLET Date: Fri Jan 27 12:56:42 2017 +0100 gpiolib: Fix a WARN_ON that can never trigger "if (!x) WARN_ON(x)" can never trigger. Signed-off-by: Christophe JAILLET Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7354740666cd07b089af81eb91f0d4a8f1253eb9 Author: Linus Walleij Date: Tue Jan 31 15:43:05 2017 +0100 gpio: random documentation update Updated and proofread the documentation for GPIO drivers a bit when looking over the changes for generic configuration. Signed-off-by: Linus Walleij Documentation/gpio/driver.txt | 55 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 9 deletions(-) commit e7b3a2b22176d01db0c3b31d6389ccf542ba1967 Author: Mauro Carvalho Chehab Date: Tue Jan 31 12:00:45 2017 -0200 [media] st-hva: hva_dbg_summary() should be static As reported by gcc: drivers/media/platform/sti/hva/hva-v4l2.c:227:6: warning: no previous prototype for 'hva_dbg_summary' [-Wmissing-prototypes] void hva_dbg_summary(struct hva_ctx *ctx) ^~~~~~~~~~~~~~~ This function is used only internally, so make it static. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/hva-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c610b5a8e22a5a312a9f431716cdd630be4e0e6f Author: Jean-Christophe Trotin Date: Tue Jan 31 08:37:57 2017 -0200 [media] st-hva: add debug file system This patch creates 4 static debugfs entries to dump: - the device-related information ("st-hva/device") - the list of registered encoders ("st-hva/encoders") - the current values of the hva registers ("st-hva/regs") - the information about the last closed instance ("st-hva/last") It also creates dynamically a debugfs entry for each opened instance, ("st-hva/") to dump: - the information about the frame (format, resolution) - the information about the stream (format, profile, level, resolution) - the control parameters (bitrate mode, framerate, GOP size...) - the potential (system, encoding...) errors - the performance information about the encoding (HW processing duration, average bitrate, average framerate...) Each time a running instance is closed, its context (including the debug information) is saved to feed, on demand, the last closed instance debugfs entry. Signed-off-by: Yannick Fertre Acked-by: Hans Verkuil Signed-off-by: Jean-Christophe Trotin Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 11 + drivers/media/platform/sti/hva/Makefile | 1 + drivers/media/platform/sti/hva/hva-debugfs.c | 422 +++++++++++++++++++++++++++ drivers/media/platform/sti/hva/hva-hw.c | 43 +++ drivers/media/platform/sti/hva/hva-hw.h | 3 + drivers/media/platform/sti/hva/hva-v4l2.c | 29 +- drivers/media/platform/sti/hva/hva.h | 88 +++++- 7 files changed, 594 insertions(+), 3 deletions(-) commit f7e1a6dba9ddac1da6fec2eb4dbf95b5b0cb3ce5 Author: Jean-Christophe Trotin Date: Tue Jan 31 08:37:56 2017 -0200 [media] st-hva: encoding summary at instance release This patch adds a short summary about the encoding operation at each instance closing, for debug purpose (through dev_dbg()): - information about the frame (format, resolution) - information about the stream (format, profile, level, resolution) - number of encoded frames - potential (system, encoding...) errors Signed-off-by: Yannick Fertre Acked-by: Hans Verkuil Signed-off-by: Jean-Christophe Trotin Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/hva-h264.c | 6 ++++ drivers/media/platform/sti/hva/hva-hw.c | 5 ++++ drivers/media/platform/sti/hva/hva-mem.c | 5 +++- drivers/media/platform/sti/hva/hva-v4l2.c | 49 ++++++++++++++++++++++++------- drivers/media/platform/sti/hva/hva.h | 8 +++++ 5 files changed, 62 insertions(+), 11 deletions(-) commit 0df03379c541ec027c94b025f2ef259f243eeb58 Author: Nicholas Mc Guire Date: Mon Jan 16 11:58:33 2017 -0200 [media] ov9650: use msleep() for uncritical long delay ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 25ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Reviwed-by: Laurent Pinchart Signed-off-by: Nicholas Mc Guire Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70829035ba7106c4052346247e30157362de6403 Author: Laurent Pinchart Date: Tue Jan 26 16:11:51 2016 -0200 [media] v4l: mt9v032: Remove unneeded gpiod NULL check The gpiod API checks for NULL descriptors, there's no need to duplicate the check in the driver. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9v032.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit da42c3c641ea5bcf032170540bf64f5c09db925e Author: Mauro Carvalho Chehab Date: Tue Jan 31 11:50:52 2017 -0200 Revert "[media] coda/imx-vdoa: constify structs" Despite checkpatch comments, it seems that ARM doesn't like to use constified structs. As reported by kernel build robot: In file included from drivers/media/platform/coda/imx-vdoa.c:22:0: drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_init': >> include/linux/device.h:1461:20: warning: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] return __register(&(__driver) , ##__VA_ARGS__); \ ^ include/linux/platform_device.h:198:29: note: in definition of macro 'platform_driver_register' __platform_driver_register(drv, THIS_MODULE) ^~~ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ >> drivers/media/platform/coda/imx-vdoa.c:333:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(vdoa_driver); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/platform_device.h:199:12: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *' extern int __platform_driver_register(struct platform_driver *, ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/media/platform/coda/imx-vdoa.c:18:0: drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_exit': >> include/linux/device.h:1466:15: warning: passing argument 1 of 'platform_driver_unregister' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] __unregister(&(__driver) , ##__VA_ARGS__); \ ^ include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^~~~~~~~~~~~~ >> drivers/media/platform/coda/imx-vdoa.c:333:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(vdoa_driver); ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/media/platform/coda/imx-vdoa.c:22:0: include/linux/platform_device.h:201:13: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *' extern void platform_driver_unregister(struct platform_driver *); ^~~~~~~~~~~~~~~~~~~~~~~~~~ So, let's just remove it. This reverts commit 126f52b02e6ec6a25f0b32058a91648304922d4a. Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2aec4901c78dcda33c1f3e7d9eaefe12a3ca213 Author: Shailendra Verma Date: Fri Nov 25 02:49:14 2016 -0200 [media] v4l: omap4iss: Clean up file handle in open() and release() Both functions initialize the file handle with v4l2_fh_init() and thus need to call clean up with v4l2_fh_exit() as appropriate. Fix it. Signed-off-by: Shailendra Verma Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_video.c | 2 ++ 1 file changed, 2 insertions(+) commit 5cb13094484ba89d9a2623ddb72b36ea498e2bff Author: Chris Packham Date: Mon Jan 30 12:20:35 2017 +1300 ARM: dts: mvebu: Add device tree for db-dxbc2 and db-xc3-24g4xg boards These boards are Marvell's evaluation boards for the 98DX4251 and 98DX3336 SoCs. [gregory.clement@free-electrons.com: fix topic and update Makefile] Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/armada-xp-db-dxbc2.dts | 151 ++++++++++++++++++++++++++ arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts | 142 ++++++++++++++++++++++++ 3 files changed, 295 insertions(+) commit 3f81df559fb198bf0165f2adf17175516a898cca Author: Chris Packham Date: Mon Jan 30 12:20:34 2017 +1300 ARM: dts: mvebu: Add device tree for 98DX3236 SoCs The Marvell 98DX3236, 98DX3336, 98DX4521 and variants are switch ASICs with integrated CPUs. They are similar to the Armada XP SoCs but have different I/O interfaces. [gregory.clement@free-electrons.com: fix topic] Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../devicetree/bindings/arm/marvell/98dx3236.txt | 23 ++ .../devicetree/bindings/net/marvell,prestera.txt | 50 ++++ arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 254 +++++++++++++++++++++ arch/arm/boot/dts/armada-xp-98dx3336.dtsi | 76 ++++++ arch/arm/boot/dts/armada-xp-98dx4251.dtsi | 90 ++++++++ 5 files changed, 493 insertions(+) commit 8f2e045ec878ef77aa2b2650f40fdb7d01b831af Author: Jani Nikula Date: Fri Jan 27 17:34:51 2017 +0200 drm/color: un-inline drm_color_lut_extract() The function is not that big, but it's also not used for anything performance critical. Make it a normal function. As a side effect, this apparently makes sparse smarter about what it's doing, and gets rid of the warning: ./include/drm/drm_color_mgmt.h:53:28: warning: shift too big (4294967295) for type unsigned long ./include/drm/drm_color_mgmt.h:53:28: warning: cast truncates bits from constant value (8000000000000000 becomes 0) v2: rebased Cc: Lionel Landwerlin Reviewed-by: Daniel Vetter Reviewed-by: Lionel Landwerlin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485531291-24821-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_color_mgmt.c | 24 ++++++++++++++++++++++++ include/drm/drm_color_mgmt.h | 27 ++------------------------- 2 files changed, 26 insertions(+), 25 deletions(-) commit 1deb54d4c081862b4287d6c72bf8b526138d872f Author: Shailendra Verma Date: Fri Nov 25 02:44:32 2016 -0200 [media] v4l: omap3isp: Clean up file handle in open() and release() Both functions initialize the file handle with v4l2_fh_init() and thus need to call clean up with v4l2_fh_exit() as appropriate. Fix it. Signed-off-by: Shailendra Verma Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispvideo.c | 2 ++ 1 file changed, 2 insertions(+) commit 39dc3aaeec638f1f5399777eea5e21dd5a699f46 Author: Jaejoong Kim Date: Wed Jan 11 23:31:21 2017 -0200 [media] uvcvideo: Change result code of debugfs_init to void The device driver should keep going even if debugfs initialization fails. So, change the return type to void. Signed-off-by: Jaejoong Kim Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_debugfs.c | 15 ++++++--------- drivers/media/usb/uvc/uvcvideo.h | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) commit 17c341ec0115837a610b2da15e32546e26068234 Author: Guennadi Liakhovetski Date: Mon Dec 12 09:16:51 2016 -0200 [media] uvcvideo: Fix a wrong macro Don't mix up UVC_BUF_STATE_* and VB2_BUF_STATE_* codes. Fixes: 6998b6fb4b1c ("[media] uvcvideo: Use videobuf2-vmalloc") Cc: stable@vger.kernel.org Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 313fe8473bd5bf50f5c209df3deafed5f1d84136 Author: Guennadi Liakhovetski Date: Mon Dec 12 09:16:50 2016 -0200 [media] uvcvideo: (cosmetic) Remove a superfluous assignment Remove a superfluous assignment to a local variable at the end of a function. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb1d34875cac75b809230aafbceebce813c9175b Author: Guennadi Liakhovetski Date: Mon Dec 12 09:16:49 2016 -0200 [media] uvcvideo: (cosmetic) Add and use an inline function Add an inline function to obtain a struct uvc_buffer pointer from a struct vb2_v4l2_buffer one. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_queue.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 239dd6164c867f31e1d37b065724c893237d2627 Author: Antti Palosaari Date: Mon Dec 19 01:42:37 2016 -0200 [media] af9033: estimate cnr from formula Use formulas for cnr estimates and get rid of old lut-based estimate. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9033.c | 68 +++++++++++++--------- drivers/media/dvb-frontends/af9033_priv.h | 97 +------------------------------ 2 files changed, 42 insertions(+), 123 deletions(-) commit a71e479c132a084d49246908808ba96c33e59226 Author: Antti Palosaari Date: Mon Nov 7 02:01:03 2016 -0200 [media] af9035: correct demod i2c addresses Chip uses so called 8-bit i2c addresses, but on bus there is of course correct 7-bit addresses with rw bit as lsb - verified with oscilloscope. Lets still use correct addresses in driver. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9035.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 8efb34b280401acdaad19b6f1920af09d2628334 Author: Antti Palosaari Date: Thu Nov 10 01:24:50 2016 -0200 [media] it913x: add chip device ids for binding Driver supports 2 different device versions, AX and BX. Use device IDs to pass chip version information to driver. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/it913x.c | 11 ++++++++++- drivers/media/tuners/it913x.h | 5 ----- drivers/media/usb/dvb-usb-v2/af9035.c | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) commit 35ef193b2aa35e404c08d0c9ad010cf171a88cbd Author: Antti Palosaari Date: Mon Nov 7 01:14:23 2016 -0200 [media] af9035: register it9133 tuner using platform binding it913x tuner driver is changed to platform model so we need bind it using platform_device_register_data(). Also remove hacks from I2C adapter where fake tuner driver address (addr >> 1) were used as those are no longer needed. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9035.c | 124 ++++++++++++++++------------------ drivers/media/usb/dvb-usb-v2/af9035.h | 2 + 2 files changed, 62 insertions(+), 64 deletions(-) commit 675ee801633396389e73dc8a8e148ff3cad1d470 Author: Antti Palosaari Date: Sun Nov 6 22:00:45 2016 -0200 [media] it913x: change driver model from i2c to platform That tuner is integrated to demodulator and communicates via demodulators address space. We cannot register both demodulator and tuner having same address to same I2C bus, so better to change it platform driver in order to implement I2C adapter correctly. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/it913x.c | 89 +++++++++++++++++-------------------------- drivers/media/tuners/it913x.h | 29 ++++++-------- 2 files changed, 48 insertions(+), 70 deletions(-) commit 3461831adc35959bedf03bbf24678b60f73890b3 Author: Antti Palosaari Date: Sun Nov 6 22:14:18 2016 -0200 [media] af9033: return regmap for integrated IT913x tuner driver IT9130 series contains integrated tuner driver, which uses that demodulator address space. Return regmap in order to allow it913x driver communication. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9033.c | 1 + drivers/media/dvb-frontends/af9033.h | 6 ++++++ 2 files changed, 7 insertions(+) commit 81e19912558d0c50bdba0f7a5b2d1b2fad8c1d0e Author: Antti Palosaari Date: Sun Nov 6 18:55:36 2016 -0200 [media] af9033: style related and minor changes Fix coding style and other small issues. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9033.c | 263 ++++++++++++++---------------- drivers/media/dvb-frontends/af9033.h | 7 +- drivers/media/dvb-frontends/af9033_priv.h | 86 ++++++---- 3 files changed, 184 insertions(+), 172 deletions(-) commit c2feb9ffce1e29463eedee8bebc30016d533b25f Author: Antti Palosaari Date: Sun Nov 6 15:27:16 2016 -0200 [media] af9033: use 64-bit div macro where possible Replace Booth's binary division algo with 64-bit multiply and division. Fix related IF calculations. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9033.c | 103 +++++++++--------------------- drivers/media/dvb-frontends/af9033_priv.h | 1 + 2 files changed, 32 insertions(+), 72 deletions(-) commit bc85d5e2fa730fd3deb0ccf825dc9af8d237a283 Author: Antti Palosaari Date: Sun Nov 6 02:20:29 2016 -0200 [media] af9033: convert to regmap api Use regmap to cover I2C register operations. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb-frontends/af9033.c | 420 ++++++++++-------------------- drivers/media/dvb-frontends/af9033_priv.h | 1 + 3 files changed, 145 insertions(+), 277 deletions(-) commit 09bfd96ca32638596be95e43a3b981b96f9b5b30 Author: Antti Palosaari Date: Fri Nov 4 20:43:49 2016 -0200 [media] af9035: read and store whole eeprom Read eeprom content to chip state and read values there when needed. Also debug dump eeprom content. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9035.c | 126 +++++++++++++++------------------- drivers/media/usb/dvb-usb-v2/af9035.h | 5 +- 2 files changed, 60 insertions(+), 71 deletions(-) commit c62d29c81736c6f3a6a9cc6ba2f5aad1cfa6afbc Author: Antti Palosaari Date: Fri Dec 9 11:11:32 2016 -0200 [media] si2168: implement ucb statistics Implement DVBv5 UCB. Only uncorrected blocks are currently counted. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8393c00369f1fe68182295b7adca80a73646fdd3 Author: Antti Palosaari Date: Thu Dec 8 22:19:19 2016 -0200 [media] si2168: implement ber statistics Implement DVBv5 BER. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 46 +++++++++++++++++++++++++++++-- drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 45 insertions(+), 2 deletions(-) commit 91aba937086daedba96c3227b40697b7c4da1520 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:11 2017 +0100 ARM: dts: da850-lcdk: enable the SATA node Enable the SATA node for da850-lcdk. We omit the pinctrl property on purpose - the muxed SATA pins are not hooked up to anything SATA-related on the lcdk. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 031913931bc8d54390b45d7c46d67efbce9076df Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:10 2017 +0100 ARM: dts: da850: add the SATA node Add the SATA node to the da850 device tree. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit e5360224ebce416586eae3b3967ee8dbd87ad17d Author: Pavel Machek Date: Tue Dec 27 18:59:23 2016 -0200 [media] mark myself as mainainer for camera on N900 Mark and Sakari as maintainers for Nokia N900 camera pieces. Signed-off-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit c5254e72b8edc2ca0a98703e92e8c34959343d2c Author: Pavel Machek Date: Thu Dec 22 08:01:04 2016 -0200 [media] media: Driver for Toshiba et8ek8 5MP sensor Add driver for et8ek8 sensor, found in Nokia N900 main camera. Can be used for taking photos in 2.5MP resolution with fcam-dev. Signed-off-by: Ivaylo Dimitrov Signed-off-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/et8ek8/Kconfig | 6 + drivers/media/i2c/et8ek8/Makefile | 2 + drivers/media/i2c/et8ek8/et8ek8_driver.c | 1515 ++++++++++++++++++++++++++++++ drivers/media/i2c/et8ek8/et8ek8_mode.c | 587 ++++++++++++ drivers/media/i2c/et8ek8/et8ek8_reg.h | 96 ++ 7 files changed, 2208 insertions(+) commit d3d557cf646c52add72d050790bdf41670c96bab Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:07 2017 +0100 sata: ahci-da850: add a workaround for controller instability We have a use case with the da850 SATA controller where at PLL0 frequency of 456MHz (needed to properly service the LCD controller) the chip becomes unstable and the hardreset operation is ignored the first time 50% of times. The sata core driver already retries to resume the link because some controllers ignore writes to the SControl register, but just retrying the resume operation doesn't work - we need to issue he phy/wake reset again to make it work. Reimplement ahci_hardreset() in the driver and poke the controller a couple times before really giving up. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo Signed-off-by: Sekhar Nori drivers/ata/ahci_da850.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit d436501e06792dd44101e0e45c32f6c1ea965acb Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:06 2017 +0100 sata: ahci: export ahci_do_hardreset() locally We need a way to retrieve the information about the online state of the link in the ahci-da850 driver. Create a new function: ahci_do_hardreset() which is called from ahci_hardreset() for backwards compatibility, but has an additional argument: 'online' - which can be used to check if the link is online after this function returns. The new routine will be used in the ahci-da850 driver to avoid code duplication when implementing a workaround for tha da850 SATA controller quirk/instability. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo Signed-off-by: Sekhar Nori drivers/ata/ahci.h | 3 +++ drivers/ata/libahci.c | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) commit f4d435f3265661d04e5290a0a0450e3a38898128 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:05 2017 +0100 sata: ahci-da850: implement a workaround for the softreset quirk There's an issue with the da850 SATA controller: if port multiplier support is compiled in, but we're connecting the drive directly to the SATA port on the board, the drive can't be detected. To make SATA work on the da850-lcdk board: first try to softreset with pmp - if the operation fails with -EBUSY, retry without pmp. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo Signed-off-by: Sekhar Nori drivers/ata/ahci_da850.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 23b017a623a0bd19c24e6c1c41fe587c644e9dbc Merge: 566cf87 4585fbc Author: Rafael J. Wysocki Date: Tue Jan 31 13:18:06 2017 +0100 Merge tag 'pullreq_20170131' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq changes for v4.11 from MyungJoo Ham. * tag 'pullreq_20170131' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Modify the device name as devfreq(X) for sysfs PM / devfreq: Simplify the sysfs name of devfreq-event device PM / devfreq: Remove unnecessary separate _remove_devfreq() PM / devfreq: Fix wrong trans_stat of passive devfreq device PM / devfreq: Fix available_governor sysfs PM / devfreq: exynos-ppmu: Show the registred device for ppmu device PM / devfreq: Fix the wrong description for userspace governor PM / devfreq: Fix the checkpatch warnings PM / devfreq: exynos-bus: Print the real clock rate of bus PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registers PM / devfreq: exynos-bus: Add the detailed correlation for Exynos5433 PM / devfreq: Don't delete sysfs group twice commit bf4ae3f07889db3056033d462dcd37eb6385fbc2 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:04 2017 +0100 sata: ahci-da850: add device tree match table We're using device tree for da850-lcdk. Add the match table to allow to probe the driver. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo Signed-off-by: Sekhar Nori drivers/ata/ahci_da850.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ded9a92a626d69fc6891293d58e44d96eb7e34a9 Author: Pavel Machek Date: Mon Nov 14 16:30:40 2016 -0200 [media] media: et8ek8: add device tree binding documentation Add device tree binding documentation for toshiba et8ek8 sensor. Signed-off-by: Ivaylo Dimitrov Signed-off-by: Pavel Machek Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../bindings/media/i2c/toshiba,et8ek8.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit a2fafda66dccb84592d4b9e42e429471c356c4fc Author: Bhumika Goyal Date: Mon Dec 12 16:03:57 2016 -0200 [media] exynos4-is: constify v4l2_subdev_* structures v4l2_subdev_{core/pad/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle:(one of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ v4l2_subdev_init(e1,&i@p) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_ops i; File size before: text data bss dec hex filename 16830 1064 0 17894 45e6 platform/exynos4-is/fimc-capture.o 7787 704 20 8511 213f platform/exynos4-is/mipi-csis.o File size after: text data bss dec hex filename 17022 880 0 17902 45ee platform/exynos4-is/fimc-capture.o 8299 192 20 8511 213f platform/exynos4-is/mipi-csis.o Signed-off-by: Bhumika Goyal Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-capture.c | 4 ++-- drivers/media/platform/exynos4-is/mipi-csis.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4742575cde1f3cee0ea6b41af42781672315b04b Author: Arvind Yadav Date: Tue Dec 6 05:42:51 2016 -0200 [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Free memory mapping, if fimc_is_probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cb610c8fdfbe06dfb7534470a96a01adc19fc7cc Author: Javier Martinez Canillas Date: Thu Jan 19 20:36:19 2017 -0200 [media] exynos-gsc: Fix unbalanced pm_runtime_enable() error Commit a006c04e6218 ("[media] exynos-gsc: Fixup clock management at ->remove()") changed the driver's .remove function logic to fist do a pm_runtime_get_sync() to make sure the device is powered before attempting to gate the gsc clock. But the commit also removed a pm_runtime_disable() call that leads to an unbalanced pm_runtime_enable() error if the driver is removed and re-probed: exynos-gsc 13e00000.video-scaler: Unbalanced pm_runtime_enable! exynos-gsc 13e10000.video-scaler: Unbalanced pm_runtime_enable! Fixes: a006c04e6218 ("[media] exynos-gsc: Fixup clock management at ->remove()") Signed-off-by: Javier Martinez Canillas Acked-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 1 + 1 file changed, 1 insertion(+) commit 3a07a8278ae7a38806e017994c50a95ad50750c3 Author: Shailendra Verma Date: Fri Dec 2 02:45:27 2016 -0200 [media] exynos-gsc: Clean up file handle in open() error path The file handle is not yet added in the vfd list. So no need to call v4l2_fh_del(&ctx->fh) if it fails to create controls. Signed-off-by: Shailendra Verma Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e6df4eb255af36b36f6b31b4bcece23cffefc5c Author: Shailendra Verma Date: Fri Dec 2 02:43:05 2016 -0200 [media] exynos4-is: Clean up file handle in open() error path The file handle is not yet added in the vfd list. So no need to call v4l2_fh_del(&ctx->fh) if it fails to create controls. Signed-off-by: Shailendra Verma Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 319fe159889a06b47a2621a1201c813502b7a842 Author: Guenter Roeck Date: Tue Jan 31 03:56:08 2017 -0800 hwmon: Register thermal zone only if 'dev' parameter was provided Rgistering a thermal zone uses devm_kzalloc(), which requires a pointer to the parent device. Reported-by: Dan Carpenter Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82dbe1a68fd65a4dae8f01e4f214221857f8161b Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:01 2017 +0100 sata: ahci-da850: get the sata clock using a connection id In preparation for using two clocks in the driver (the sysclk2-based clock and the external REFCLK), check if we got the functional clock after calling ahci_platform_get_resources(). If not, retry calling clk_get() with con_id specified. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo Signed-off-by: Sekhar Nori drivers/ata/ahci_da850.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 74d3b6419772e49563877b9a3c502b763d24b075 Author: Guenter Roeck Date: Fri Jan 27 19:35:57 2017 -0800 hwmon: Relax name attribute validation for new APIs While invalid name attributes are really not desirable and do mess up libsensors, enforcing valid names has the detrimental effect of driving users away from using the new hardware monitoring API, especially those registering name attributes violating the ABI restrictions. Another undesirable side effect is that this violation and the resulting error may only be discovered some time after a conversion to the new API, which in turn may trigger a revert of that conversion. To solve the problem, relax validation and only issue a warning instead of returning an error if a name attribute violating the ABI is provided. This lets callers continue to provide invalid name attributes while notifying them about it. Many thanks are due to Dmitry Torokhov for the idea. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f7116e115acdd74bc75a4daf6492b11d43505125 Author: David Dillow Date: Mon Jan 30 19:11:11 2017 -0800 iommu/vt-d: Don't over-free page table directories dma_pte_free_level() recurses down the IOMMU page tables and frees directory pages that are entirely contained in the given PFN range. Unfortunately, it incorrectly calculates the starting address covered by the PTE under consideration, which can lead to it clearing an entry that is still in use. This occurs if we have a scatterlist with an entry that has a length greater than 1026 MB and is aligned to 2 MB for both the IOMMU and physical addresses. For example, if __domain_mapping() is asked to map a two-entry scatterlist with 2 MB and 1028 MB segments to PFN 0xffff80000, it will ask if dma_pte_free_pagetable() is asked to PFNs from 0xffff80200 to 0xffffc05ff, it will also incorrectly clear the PFNs from 0xffff80000 to 0xffff801ff because of this issue. The current code will set level_pfn to 0xffff80200, and 0xffff80200-0xffffc01ff fits inside the range being cleared. Properly setting the level_pfn for the current level under consideration catches that this PTE is outside of the range being cleared. This patch also changes the value passed into dma_pte_free_level() when it recurses. This only affects the first PTE of the range being cleared, and is handled by the existing code that ensures we start our cursor no lower than start_pfn. This was found when using dma_map_sg() to map large chunks of contiguous memory, which immediatedly led to faults on the first access of the erroneously-deleted mappings. Fixes: 3269ee0bd668 ("intel-iommu: Fix leaks in pagetable freeing") Reviewed-by: Benjamin Serebrin Signed-off-by: David Dillow Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21e722c4c8377b5bc82ad058fed12165af739c1b Author: Ashok Raj Date: Mon Jan 30 09:39:53 2017 -0800 iommu/vt-d: Tylersburg isoch identity map check is done too late. The check to set identity map for tylersburg is done too late. It needs to be done before the check for identity_map domain is done. To: Joerg Roedel To: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Cc: Ashok Raj Fixes: 86080ccc22 ("iommu/vt-d: Allocate si_domain in init_dmars()") Signed-off-by: Ashok Raj Reported-by: Yunhong Jiang Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aaa59306b0b7e0ca4ba92cc04c5db101cbb1c096 Author: CQ Tang Date: Mon Jan 30 09:39:52 2017 -0800 iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu Some of the macros are incorrect with wrong bit-shifts resulting in picking the incorrect invalidation granularity. Incorrect Source-ID in extended devtlb invalidation caused device side errors. To: Joerg Roedel To: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Cc: CQ Tang Cc: Ashok Raj Fixes: 2f26e0a9 ("iommu/vt-d: Add basic SVM PASID support") Signed-off-by: CQ Tang Signed-off-by: Ashok Raj Tested-by: CQ Tang Signed-off-by: Joerg Roedel include/linux/intel-iommu.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cbef9099398cbc45c4245b413ec73737ed88eb83 Author: Dhinakaran Pandiyan Date: Mon Jan 30 22:18:38 2017 -0800 drm/docs: Fix documentation for drm_atomic_set_mode_for_crtc drm_atomic_set_mode_for_crtc() modifies the .enable member of CRTC state but documentation claims otherwise, fix that. Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1485843518-28438-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_atomic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ff2ac58a45914cb65ae4bdc716d108193a867038 Author: Laurent Vivier Date: Tue Jan 24 14:12:29 2017 +0100 virtio-gpu: disable VIRGL with BE kernel VIRTIO_GPU_F_VIRGL is added in features list only for LE kernel, so we must check for it only on LE kernel, otherwise virtio_has_feature() calls BUG() and crashes the kernel. Suggested-by: Gerd Hoffmann Signed-off-by: Laurent Vivier Link: http://patchwork.freedesktop.org/patch/msgid/1485263549-28743-1-git-send-email-lvivier@redhat.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_kms.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 050f23390f6bdbfa7dd2800884d32490489851b7 Author: David Gibson Date: Tue Dec 20 16:49:07 2016 +1100 KVM: PPC: Book3S HV: Advertise availablity of HPT resizing on KVM HV This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the presence of in-kernel HPT resizing on KVM HV. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/powerpc.c | 3 +++ 1 file changed, 3 insertions(+) commit b5baa68773150772c275b4af1bb31327200cfc05 Author: David Gibson Date: Tue Dec 20 16:49:06 2016 +1100 KVM: PPC: Book3S HV: KVM-HV HPT resizing implementation This adds the "guts" of the implementation for the HPT resizing PAPR extension. It has the code to allocate and clear a new HPT, rehash an existing HPT's entries into it, and accomplish the switchover for a KVM guest from the old HPT to the new one. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 188 +++++++++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 1 deletion(-) commit 5e9859699aba74c0e297645e7d1734cd4b964de7 Author: David Gibson Date: Tue Dec 20 16:49:05 2016 +1100 KVM: PPC: Book3S HV: Outline of KVM-HV HPT resizing implementation This adds a not yet working outline of the HPT resizing PAPR extension. Specifically it adds the necessary ioctl() functions, their basic steps, the work function which will handle preparation for the resize, and synchronization between these, the guest page fault path and guest HPT update path. The actual guts of the implementation isn't here yet, so for now the calls will always fail. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 3 + arch/powerpc/include/asm/kvm_ppc.h | 4 + arch/powerpc/kvm/book3s_64_mmu_hv.c | 191 ++++++++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_hv.c | 25 +++++ 4 files changed, 223 insertions(+) commit 639e459768845924705933db9142baef545ff5fc Author: David Gibson Date: Tue Dec 20 16:49:04 2016 +1100 KVM: PPC: Book3S HV: Create kvmppc_unmap_hpte_helper() The kvm_unmap_rmapp() function, called from certain MMU notifiers, is used to force all guest mappings of a particular host page to be set ABSENT, and removed from the reverse mappings. For HPT resizing, we will have some cases where we want to set just a single guest HPTE ABSENT and remove its reverse mappings. To prepare with this, we split out the logic from kvm_unmap_rmapp() to evict a single HPTE, moving it to a new helper function. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 77 +++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 33 deletions(-) commit f98a8bf9ee201b7e22fc05e27150b1e481d4949f Author: David Gibson Date: Tue Dec 20 16:49:03 2016 +1100 KVM: PPC: Book3S HV: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size The KVM_PPC_ALLOCATE_HTAB ioctl() is used to set the size of hashed page table (HPT) that userspace expects a guest VM to have, and is also used to clear that HPT when necessary (e.g. guest reboot). At present, once the ioctl() is called for the first time, the HPT size can never be changed thereafter - it will be cleared but always sized as from the first call. With upcoming HPT resize implementation, we're going to need to allow userspace to resize the HPT at reset (to change it back to the default size if the guest changed it). So, we need to allow this ioctl() to change the HPT size. This patch also updates Documentation/virtual/kvm/api.txt to reflect the new behaviour. In fact the documentation was already slightly incorrect since 572abd5 "KVM: PPC: Book3S HV: Don't fall back to smaller HPT size in allocation ioctl" Signed-off-by: David Gibson Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 14 ++++++++------ arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 29 ++++++++++++++++------------- arch/powerpc/kvm/book3s_hv.c | 5 +---- 4 files changed, 26 insertions(+), 24 deletions(-) commit 57a66aafda62aacd15f0d1f4f260cc0efdf1d0e4 Author: Bartosz Golaszewski Date: Mon Jan 30 11:02:00 2017 +0100 ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA This entry is needed for the ahci driver to get a functional clock. Signed-off-by: Bartosz Golaszewski [nsekhar@ti.com: subject line adjustment] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) commit aae0777f1e8224b4fbb78b2c692060852ee750c8 Author: David Gibson Date: Tue Dec 20 16:49:02 2016 +1100 KVM: PPC: Book3S HV: Split HPT allocation from activation Currently, kvmppc_alloc_hpt() both allocates a new hashed page table (HPT) and sets it up as the active page table for a VM. For the upcoming HPT resize implementation we're going to want to allocate HPTs separately from activating them. So, split the allocation itself out into kvmppc_allocate_hpt() and perform the activation with a new kvmppc_set_hpt() function. Likewise we split kvmppc_free_hpt(), which just frees the HPT, from kvmppc_release_hpt() which unsets it as an active HPT, then frees it. We also move the logic to fall back to smaller HPT sizes if the first try fails into the single caller which used that behaviour, kvmppc_hv_setup_htab_rma(). This introduces a slight semantic change, in that previously if the initial attempt at CMA allocation failed, we would fall back to attempting smaller sizes with the page allocator. Now, we try first CMA, then the page allocator at each size. As far as I can tell this change should be harmless. To match, we make kvmppc_free_hpt() just free the actual HPT itself. The call to kvmppc_free_lpid() that was there, we move to the single caller. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s_64.h | 4 ++ arch/powerpc/include/asm/kvm_ppc.h | 5 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 97 ++++++++++++++++---------------- arch/powerpc/kvm/book3s_hv.c | 17 +++++- 4 files changed, 68 insertions(+), 55 deletions(-) commit 3d089f84c6f9b7b0eda993142d73961a44b553d2 Author: David Gibson Date: Tue Dec 20 16:49:01 2016 +1100 KVM: PPC: Book3S HV: Don't store values derivable from HPT order Currently the kvm_hpt_info structure stores the hashed page table's order, and also the number of HPTEs it contains and a mask for its size. The last two can be easily derived from the order, so remove them and just calculate them as necessary with a couple of helper inlines. Signed-off-by: David Gibson Reviewed-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s_64.h | 12 ++++++++++++ arch/powerpc/include/asm/kvm_host.h | 2 -- arch/powerpc/kvm/book3s_64_mmu_hv.c | 28 +++++++++++++--------------- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 +++++++++--------- 4 files changed, 34 insertions(+), 26 deletions(-) commit 3f9d4f5a5f35e402e91bedf0c15e29cef187a29d Author: David Gibson Date: Tue Dec 20 16:49:00 2016 +1100 KVM: PPC: Book3S HV: Gather HPT related variables into sub-structure Currently, the powerpc kvm_arch structure contains a number of variables tracking the state of the guest's hashed page table (HPT) in KVM HV. This patch gathers them all together into a single kvm_hpt_info substructure. This makes life more convenient for the upcoming HPT resizing implementation. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 20 +++++--- arch/powerpc/kvm/book3s_64_mmu_hv.c | 92 ++++++++++++++++++------------------- arch/powerpc/kvm/book3s_hv.c | 2 +- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 62 ++++++++++++------------- 4 files changed, 92 insertions(+), 84 deletions(-) commit db9a290d9c3c596e5325e2a42133594435e5de46 Author: David Gibson Date: Tue Dec 20 16:48:59 2016 +1100 KVM: PPC: Book3S HV: Rename kvm_alloc_hpt() for clarity The difference between kvm_alloc_hpt() and kvmppc_alloc_hpt() is not at all obvious from the name. In practice kvmppc_alloc_hpt() allocates an HPT by whatever means, and calls kvm_alloc_hpt() which will attempt to allocate it with CMA only. To make this less confusing, rename kvm_alloc_hpt() to kvm_alloc_hpt_cma(). Similarly, kvm_release_hpt() is renamed kvm_free_hpt_cma(). Signed-off-by: David Gibson Reviewed-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 4 ++-- arch/powerpc/kvm/book3s_64_mmu_hv.c | 8 ++++---- arch/powerpc/kvm/book3s_hv_builtin.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit ef1ead0c3b1dfb43d33caa4f50c8d214f86b6bc8 Author: David Gibson Date: Tue Dec 20 16:48:58 2016 +1100 KVM: PPC: Book3S HV: HPT resizing documentation and reserved numbers This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to advertise whether KVM is capable of handling the PAPR extensions for resizing the hashed page table during guest runtime. It also adds definitions for two new VM ioctl()s to implement this extension, and documentation of the same. Note that, HPT resizing is already possible with KVM PR without kernel modification, since the HPT is managed within userspace (qemu). The capability defined here will only be set where an in-kernel implementation of resizing is necessary, i.e. for KVM HV. To determine if the userspace resize implementation can be used, it's necessary to check KVM_CAP_PPC_ALLOC_HTAB. Unfortunately older kernels incorrectly set KVM_CAP_PPC_ALLOC_HTAB even with KVM PR. If userspace it want to support resizing with KVM PR on such kernels, it will need a workaround. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 95 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 11 +++++ 2 files changed, 106 insertions(+) commit ccc4df4e2c3825919456c13b153d2a67bbf328dc Author: David Gibson Date: Tue Dec 20 16:48:57 2016 +1100 Documentation: Correct duplicate section number in kvm/api.txt Both KVM_CREATE_SPAPR_TCE_64 and KVM_REINJECT_CONTROL have section number 4.98 in Documentation/virtual/kvm/api.txt, presumably due to a naive merge. This corrects the duplication. [paulus@ozlabs.org - correct section numbers for following sections, KVM_PPC_CONFIGURE_V3_MMU and KVM_PPC_GET_RMMU_INFO, as well.] Signed-off-by: David Gibson Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 484290350c8d6ec119d255304ff32d7e255ed208 Author: Bartosz Golaszewski Date: Mon Jan 30 11:01:59 2017 +0100 ARM: davinci_all_defconfig: enable SATA modules Add the da850-ahci driver to davinci defconfig. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 79a2dc9849301620e07ddc80788ce2cabeb97183 Author: Bartosz Golaszewski Date: Mon Jan 30 11:01:58 2017 +0100 devicetree: bindings: add bindings for ahci-da850 Add DT bindings for the TI DA850 AHCI SATA controller. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Sekhar Nori Documentation/devicetree/bindings/ata/ahci-da850.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d0979c07ff52a316aa762ac749ba6377b2c10d61 Author: Thomas Petazzoni Date: Wed Dec 21 11:26:57 2016 +0100 arm64: dts: marvell: adjust name of sd-mmc-gop clock in syscon This commit adjusts the names of gatable clock #18 of the Marvell Armada CP110 system controller. This clock not only controls SD/MMC, but also the GOP (Group Of Ports) used for networking. So the clock is renamed to {cpm,cps}-sd-mmc-gop instead of {cpm,cps}-sd-mmc. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0ffb94b6cc5df6376ab6bff5b80075641f6716f8 Author: Antti Palosaari Date: Mon Jan 16 19:27:41 2017 -0200 [media] cxd2820r: fix gpio null pointer dereference Setting GPIOs during probe causes null pointer deference when GPIOLIB was not selected by Kconfig. Initialize driver private field before calling set gpios. It is regressing bug since 4.9. Fixes: 07fdf7d9f19f ("[media] cxd2820r: add I2C driver bindings") Reported-by: Chris Rankin Tested-by: Chris Rankin Tested-by: Håkan Lennestål Cc: # v4.9+ Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d40e98c13b3e7cb1aa16e9c14f35db3c8c3dd033 Author: Michael Tretter Date: Fri Jan 20 12:00:25 2017 -0200 [media] coda: support YUYV output if VDOA is used The VDOA is able to transform the NV12 custom macroblock tiled format of the CODA to YUYV format. If and only if the VDOA is available, the driver can also provide YUYV support. While the driver is configured to produce YUYV output, the CODA must be configured to produce NV12 macroblock tiled frames and the VDOA must transform the intermediate result into the final YUYV output. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 7 +++++-- drivers/media/platform/coda/coda-common.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) commit e7f3c54810350827823d241905fb7823eee30c21 Author: Michael Tretter Date: Fri Jan 20 12:00:24 2017 -0200 [media] coda: use VDOA for un-tiling custom macroblock format If the CODA driver is configured to produce NV12 output and the VDOA is available, the VDOA can be used to transform the custom macroblock tiled format to a raster-ordered format for scanout. In this case, set the output format of the CODA to the custom macroblock tiled format, disable the rotator, and use the VDOA to write to the v4l2 buffer. The VDOA is synchronized with the CODA to always un-tile the frame that the CODA finished in the previous run. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 86 +++++++++++++++++------- drivers/media/platform/coda/coda-common.c | 104 ++++++++++++++++++++++++++++-- drivers/media/platform/coda/coda.h | 3 + 3 files changed, 163 insertions(+), 30 deletions(-) commit 7691f821ff19af21b1768d8f347764e61f9f5d2b Author: Michael Tretter Date: Fri Jan 20 12:00:23 2017 -0200 [media] coda: fix frame index to returned error display_idx refers to the frame that will be returned in the next round. The currently processed frame is ctx->display_idx and errors should be reported for this frame. Signed-off-by: Michael Tretter Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d677b6482bafc4006540917935a3c2e8f2f236b8 Author: Philipp Zabel Date: Fri Jan 20 12:00:22 2017 -0200 [media] coda: add debug output about tiling In order to make the VDOA work correctly, the CODA must produce frames in tiled format. Print this information in the debug output. Also print the color format in fourcc instead of the numeric value. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4ec319eb828af736a11b48f47bc2421294c76f50 Author: Philipp Zabel Date: Fri Jan 20 12:00:21 2017 -0200 [media] coda: correctly set capture compose rectangle Correctly store the rectangle of valid video data in the destination q_data before rounding up to macroblock size. This fixes the output of VIDIOC_G_SELECTION for the capture side compose rectangle. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 37 ++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) commit 126f52b02e6ec6a25f0b32058a91648304922d4a Author: Mauro Carvalho Chehab Date: Tue Jan 31 08:13:43 2017 -0200 [media] coda/imx-vdoa: constify structs As warned by checkpatch: WARNING: struct of_device_id should normally be const #318: FILE: drivers/media/platform/coda/imx-vdoa.c:318: +static struct of_device_id vdoa_dt_ids[] = { So, constify structs. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cadf8106661c061ab5041282a8e088de4e470526 Author: Alexander Dahl Date: Sat Jan 28 10:45:32 2017 +0100 doc: convert UIO howto from docbook to sphinx Converted with tmplcvt. Only some tiny things needed manual fixing. Signed-off-by: Alexander Dahl Cc: Hans-Jürgen Koch Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/uio-howto.tmpl | 1112 -------------------------------- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/uio-howto.rst | 705 ++++++++++++++++++++ MAINTAINERS | 2 +- 5 files changed, 708 insertions(+), 1114 deletions(-) commit b0444f18e0b18abce566e9e023d52e77e9cb68e1 Author: Philipp Zabel Date: Fri Jan 20 12:00:20 2017 -0200 [media] coda: add i.MX6 VDOA driver The i.MX6 Video Data Order Adapter's (VDOA) sole purpose is to convert from a custom macroblock tiled format produced by the CODA960 decoder into linear formats that can be used for scanout. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 3 + drivers/media/platform/coda/Makefile | 1 + drivers/media/platform/coda/imx-vdoa.c | 338 +++++++++++++++++++++++++++++++++ drivers/media/platform/coda/imx-vdoa.h | 58 ++++++ 4 files changed, 400 insertions(+) commit f8a096059fc5f719301d314e5d7451f1bab5032a Author: Tomas Winkler Date: Thu Jan 26 17:16:26 2017 +0200 mei: simplify error handling via devres function. Use devm_ and pcim_ functions to make error handling simpler and code smaller and tidier. Based on original patch by mei: me: use managed functions pcim_* and devm_* https://lkml.org/lkml/2016/2/1/339 Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me.c | 6 ++-- drivers/misc/mei/hw-txe.c | 4 +-- drivers/misc/mei/hw-txe.h | 2 +- drivers/misc/mei/pci-me.c | 50 +++++++-------------------------- drivers/misc/mei/pci-txe.c | 69 +++++++--------------------------------------- 5 files changed, 26 insertions(+), 105 deletions(-) commit 67c5900658fbe8210e47a8f8b09671af2f941849 Author: Philipp Zabel Date: Fri Jan 20 12:00:19 2017 -0200 [media] dt-bindings: Add a binding for Video Data Order Adapter Add a DT binding documentation for the Video Data Order Adapter (VDOA) of the Freescale i.MX6 SoC. Also, add the compatible property and correct clock to the device tree to match the documentation. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/fsl-vdoa.txt | 21 +++++++++++++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 2 ++ 2 files changed, 23 insertions(+) commit f046192d98c9a929c3eefdd65b885000d341d969 Author: Tomas Winkler Date: Fri Jan 27 16:32:46 2017 +0200 mei: revamp io list cleanup function. Specify in function names by which object is the io list filtered: cl for a client and fp for file descriptor. In that course a code duplication is resolved by dropping mei_cl_read_cb_flush and mei_clear_list and using mei_io_list_free_fp function. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 34 ++++--------------- drivers/misc/mei/client.c | 83 ++++++++++++++++++++++------------------------- drivers/misc/mei/client.h | 2 +- 3 files changed, 47 insertions(+), 72 deletions(-) commit 962ff7bcec243dc5ff6dd3cbad6ed585e3177556 Author: Alexander Usyskin Date: Fri Jan 27 16:32:45 2017 +0200 mei: replace callback structures used as list head by list_head mei_dev structure used struct mei_cl_cb type variables as for holding callbacks list heads. Replace them by the actual struct list_head as there is no other info that is handled. This slims down the mei_dev structure and mostly streamline the code. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 11 +++++----- drivers/misc/mei/client.c | 52 ++++++++++++++++++++++---------------------- drivers/misc/mei/client.h | 20 +++++------------ drivers/misc/mei/hbm.c | 2 +- drivers/misc/mei/hw-me.c | 10 ++++----- drivers/misc/mei/hw-txe.c | 10 ++++----- drivers/misc/mei/init.c | 22 +++++++++---------- drivers/misc/mei/interrupt.c | 36 +++++++++++++++--------------- drivers/misc/mei/mei_dev.h | 20 ++++++++--------- 9 files changed, 85 insertions(+), 98 deletions(-) commit 9ecdbc58f96bd145669510822bc44eafde3c7351 Author: Tomas Winkler Date: Fri Jan 27 16:32:44 2017 +0200 mei: amthif: allow the read completion after close The amthif client connection is shared over multiple file descriptors. In case a file descriptor was closed immediately after a write, the read credits should be still available so the pending reads can be cleaned from the queue, hence we cannot drop the control read list, this is done only upon connection close. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6537ae2f20412dd1c7464272dfff77d5afb50d25 Author: Tomas Winkler Date: Fri Jan 27 16:32:43 2017 +0200 mei: amthif: clean command queue upon disconnection In order to prevent memory leak clean up the amthif command queue upon disconnection. The issue may happen only on error path as the command queue is cleaned upon file descriptor close. And remove the cleanup from mei_cl_flush_queues as this code is never reached for amthif client. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c0d6701a551ac344e63935535db0494110c5f4e Author: Alexander Usyskin Date: Fri Jan 27 16:32:42 2017 +0200 mei: abort waiting for notification on unsupported HW On legacy HW, pre Skylake, the notifications are not supported, return -EOPNOTSUPP in mei_cl_notify_get and prevent waiting indefinitely. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7c47d2ca0feca767479329da23523ed798acb854 Author: Alexander Usyskin Date: Fri Jan 27 16:32:41 2017 +0200 mei: return error on notification request to a disconnected client Request for a notification from a disconnected client will be ignored silently by the FW but the caller should know that the operation hasn't succeeded. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 3 +++ 1 file changed, 3 insertions(+) commit 57080e88240a46c62cf7538de009545eb03d2568 Author: Alexander Usyskin Date: Fri Jan 27 16:32:40 2017 +0200 mei: bus: unregister callbacks upon me client disable call Stop and unregister receive and notification callbacks from the disable function, to allow its later re-enablement. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 5d88246090c5e9b178eb05bcfb52bbaad2ae48f3 Author: Alexander Usyskin Date: Fri Jan 27 16:32:39 2017 +0200 mei: bus: prevent hardware module unload if device on bus is active The hardware module should not be unloaded if the bus has active devices. Get get_/put_ bus parent module upon client device connection/disconnection, to prevent the hardware managing module to disappear underneath. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 31 +++++++++++++++++++++++++++++++ drivers/misc/mei/client.c | 10 ++++++++-- drivers/misc/mei/mei_dev.h | 2 ++ 3 files changed, 41 insertions(+), 2 deletions(-) commit 9ecb839f16a353e71175981a098842fda4ddc7f1 Author: Alexander Usyskin Date: Fri Jan 27 16:32:38 2017 +0200 mei: bus: cancel and disable callback after release call A driver on the mei bus may rely on the availability of the receive callback during driver remove() call, e.g. mei_wdt. Move callbacks dismantling after the remove() call to unblock that scenario. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1274a690f6b2bd2b37447c47e3062afa8aa43f93 Author: Alex Ng Date: Sat Jan 28 12:37:18 2017 -0700 Drivers: hv: Log the negotiated IC versions. Log the negotiated IC versions. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_fcopy.c | 9 +++++++-- drivers/hv/hv_kvp.c | 8 ++++++-- drivers/hv/hv_snapshot.c | 11 ++++++++--- drivers/hv/hv_util.c | 4 ++-- 4 files changed, 23 insertions(+), 9 deletions(-) commit a1656454131880980bc3a5313c8bf66ef5990c91 Author: Alex Ng Date: Sat Jan 28 12:37:17 2017 -0700 Drivers: hv: vmbus: Use all supported IC versions to negotiate Previously, we were assuming that each IC protocol version was tied to a specific host version. For example, some Windows 10 preview hosts only support v3 TimeSync even though driver assumes v4 is supported by all Windows 10 hosts. The guest will stop trying to negotiate even though older supported versions may still be offered by the host. Make IC version negotiation more robust by going through all versions that are supported by the guest. Fixes: 3da0401b4d0e ("Drivers: hv: utils: Fix the mapping between host version and protocol to use") Reported-by: Rolf Neugebauer Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 80 +++++++++++++++++++++++++++------------- drivers/hv/hv_fcopy.c | 20 +++++++--- drivers/hv/hv_kvp.c | 41 +++++++++------------ drivers/hv/hv_snapshot.c | 18 +++++++-- drivers/hv/hv_util.c | 94 +++++++++++++++++++++++++---------------------- include/linux/hyperv.h | 7 ++-- 6 files changed, 154 insertions(+), 106 deletions(-) commit ad6d41253bf91eabb41626683c35a712ba27a20c Author: Vitaly Kuznetsov Date: Sat Jan 28 12:37:16 2017 -0700 Drivers: hv: balloon: add a fall through comment to hv_memory_notifier() Coverity scan gives a warning when there is fall through in a switch without a comment. This fall through is intentional as ol_waitevent needs to be completed to unblock hv_mem_hot_add() allowing it to process next requests regardless of the result of if we were able to online this block. Reported-by: Stephen Hemminger Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 1 + 1 file changed, 1 insertion(+) commit 5647dbf8f0807a35421bd0232247b02413ef2cab Author: Vitaly Kuznetsov Date: Sat Jan 28 12:37:15 2017 -0700 Drivers: hv: restore TSC page cleanup before kexec We need to cleanup the TSC page before doing kexec/kdump or the new kernel may crash if it tries to use it. Fixes: 63ed4e0c67df ("Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code") Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 4 ++++ 1 file changed, 4 insertions(+) commit d6f3609d2b4c6d0eec01f398cb685e50da3e6013 Author: Vitaly Kuznetsov Date: Sat Jan 28 12:37:14 2017 -0700 Drivers: hv: restore hypervcall page cleanup before kexec We need to cleanup the hypercall page before doing kexec/kdump or the new kernel may crash if it tries to use it. Reuse the now-empty hv_cleanup function renaming it to hyperv_cleanup and moving to the arch specific code. Fixes: 8730046c1498 ("Drivers: hv vmbus: Move Hypercall page setup out of common code") Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 16 ++++++++++++++++ arch/x86/include/asm/mshyperv.h | 1 + drivers/hv/hv.c | 10 ---------- drivers/hv/hyperv_vmbus.h | 2 -- drivers/hv/vmbus_drv.c | 10 +++------- 5 files changed, 20 insertions(+), 19 deletions(-) commit 17244623a4c0f68d3f02c9c74d9b6ae259425826 Author: Vitaly Kuznetsov Date: Sat Jan 28 12:37:13 2017 -0700 hv_util: switch to using timespec64 do_settimeofday() is deprecated, use do_settimeofday64() instead. Signed-off-by: Vitaly Kuznetsov Acked-by: John Stultz Acked-by: Thomas Gleixner Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7cf8c1000dcda869af75178448013e43d12b7af4 Author: Markus Elfring Date: Thu Dec 22 17:25:39 2016 -0200 [media] pvrusb2-io: Add some spaces for better code readability Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-io.c | 120 ++++++++++++++++----------------- 1 file changed, 60 insertions(+), 60 deletions(-) commit 16eddbe352e78829111315889b697037d09b26a1 Author: Markus Elfring Date: Thu Dec 22 16:26:52 2016 -0200 [media] pvrusb2-io: Use kmalloc_array() in pvr2_stream_buffer_count() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 56271bc8da2323b6205b3a978294f86f100db49a Author: Kevin Hilman Date: Wed Dec 7 16:30:25 2016 -0200 [media] davinci: VPIF: add basic support for DT init Add basic support for initialization via DT Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit faa3185114f7d64d5e731dbc890f115f49d52046 Author: Kevin Hilman Date: Wed Dec 7 16:30:24 2016 -0200 [media] dt-bindings: add TI VPIF documentation Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/ti,da850-vpif.txt | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 62dd4acd0bc8640ff2804bf8fda5baace266e95f Author: Kevin Hilman Date: Wed Dec 7 16:30:23 2016 -0200 [media] davinci: vpif_capture: fix start/stop streaming locking Video capture subdevs may be over I2C and may sleep during xfer, so we cannot do IRQ-disabled locking when calling the subdev. The IRQ-disabled locking is meant to protect the DMA queue list throughout the rest of the driver, so update the locking in [start|stop]_streaming to protect just this list, and update the irqlock comment to reflect what it actually protects. Suggested-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 6 +++--- drivers/media/platform/davinci/vpif_capture.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2d40cb3f0d710bb4c656f9b2f021c964f501baea Author: Kevin Hilman Date: Wed Dec 7 16:30:22 2016 -0200 [media] davinci: vpif_capture: remove hard-coded I2C adapter id Remove hard-coded I2C adapter in favor of getting the ID from platform_data. Signed-off-by: Kevin Hilman Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 5 ++++- include/media/davinci/vpif_types.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit bff782d78a96ff9bd50fd6d726fdb9d4b033795e Author: Kevin Hilman Date: Fri Dec 16 22:47:54 2016 -0200 [media] davinci: VPIF: fix module loading, init errors Fix problems with automatic module loading by adding MODULE_ALIAS. Also fix various load-time errors cause by incorrect or not present platform_data. Acked-by: Sakari Ailus Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif.c | 5 ++++- drivers/media/platform/davinci/vpif_capture.c | 13 +++++++++++++ drivers/media/platform/davinci/vpif_display.c | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) commit e3bb3cddd177550d63a3e4909cf1a7782f13414d Author: Randy Dunlap Date: Sat Jan 7 23:08:49 2017 -0200 [media] media: fix dm1105.c build error Fix dm1105 build error when CONFIG_I2C_ALGOBIT=m and CONFIG_DVB_DM1105=y. drivers/built-in.o: In function `dm1105_probe': dm1105.c:(.text+0x2836e7): undefined reference to `i2c_bit_add_bus' Signed-off-by: Randy Dunlap Reported-by: kbuild test robot Cc: Javier Martinez Canillas Cc: stable@vger.kernel.org # applies to 4.0 (maybe even 3.x) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/dm1105/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2370ba2752538404e363346b339869c9973aeac Author: Andrzej Hajda Date: Thu Jan 5 10:34:07 2017 -0200 [media] v4l: s5c73m3: fix negation operator Bool values should be negated using logical operators. Using bitwise operators results in unexpected and possibly incorrect results. Reported-by: David Binderman Signed-off-by: Andrzej Hajda Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21b5a1c33e11bf5a6284ff4fcf42fcc5473b83a4 Author: Pavel Machek Date: Tue Dec 27 18:59:23 2016 -0200 [media] Add maintainers for camera on N900 Mark me and Sakari as maintainers for Nokia N900 camera pieces. Signed-off-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit bc2be239feef9ac9fc8ad17adf7c03b353f6546f Author: Fabio Estevam Date: Mon Jan 30 09:12:12 2017 -0200 serial: imx: Fix the CTS_B polarity in RS485 mode When userspace passes the SER_RS485_RTS_ON_SEND flag it means that the CTS_B pin should go to logic level high before the transmission begins. CTS_B goes to logic level high when both CTSC and CTS bits are cleared. When userspace passes the SER_RS485_RTS_AFTER_SEND flag it means that the CTS_B pin should go to logic level low after the transmission finishes. CTS_B goes to logic level low when CTSC bit is cleared and CTS bit is set. So fix the CTS_B polarity logic. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1a613626d2895f4f6b95a3b0a6413e52e00b5f95 Author: Fabio Estevam Date: Mon Jan 30 09:12:11 2017 -0200 serial: imx: Fix the RTS GPIO polarity in RS485 mode On a board that needs to drive RTS GPIO high in order to enable the transmission of a RS485 transceiver the following description is passed in the devide tree: &uart4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart4>; rts-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; status = "okay"; }; and userspace configures the uart port as follows: /* enable RS485 mode: */ rs485conf.flags |= SER_RS485_ENABLED; /* set logical level for RTS pin equal to 1 when sending: */ rs485conf.flags |= SER_RS485_RTS_ON_SEND; /* set logical level for RTS pin equal to 0 after sending: */ rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND); However the RTS GPIO polarity observed in the oscilloscope is inverted. When the SER_RS485_RTS_ON_SEND flag is set the imx_port_rts_active() function should be called and following the same logic when SER_RS485_RTS_AFTER_SEND flag is cleared the imx_port_rts_inactive() should be called. Do such logic change so that RS485 communication in half duplex can work successfully when the RTS GPIO pin is passed via device tree. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4f8c483ab4e96cb8ee18f307319141693434dc4e Merge: 4ddecf7 0b10f64 Author: Greg Kroah-Hartman Date: Tue Jan 31 10:51:45 2017 +0100 Merge tag 'phy-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.11 *) Add USB HSIC and HS phy driver for Qualcomm's SoC *) Add USB3 PHY driver for Broadcom NSP SoC *) Make sun4i-usb-phy driver to be used for V3s USB PHY *) Misc fixes and cleanups Signed-off-by: Kishon Vijay Abraham I commit 203804300820c2c1ed28f9868c0fbd67b816cef3 Author: Michael Zoran Date: Sun Jan 29 23:31:11 2017 -0800 staging: vc04_services: Make vchi_msg_queue static The vchi_msg_queue function which is used by other drivers to queue a message is difficult to understand and overly generic. Make the function static and remove it from the exported symbols. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/vchi.h | 8 -------- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) commit 619969770f1486b82daa03d0b6f00eca3331f2ca Author: Michael Zoran Date: Sun Jan 29 23:31:10 2017 -0800 staging: vc04_services: Add vchi_queue_user_message function The vchi_msg_queue function which is used by other drivers to queue a message is difficult to understand and overly generic. Add a new function which is a wrapper on top of vchi_msg_queue that is specifically for queuing a message located in user address space. int vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, void __user *data, unsigned int size) Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchi/vchi.h | 6 ++++ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 34 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit fbcaed9e324de3c17fd57f8c8e65069c4e1eab8f Author: Michael Zoran Date: Sun Jan 29 23:31:09 2017 -0800 staging: vc04_services: Add vchi_queue_kernel_message function The vchi_msg_queue function which is used by other drivers to queue a message is difficult to understand and overly generic. Add a new function which is a wrapper on top of vchi_msg_queue that is specifically for queuing a message located in kernel address space. int vchi_queue_kernel_message(VCHI_SERVICE_HANDLE_T handle, void *data, unsigned int size) Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchi/vchi.h | 6 ++++++ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit ba21d0ea218983f269f957de267ca62fdbf96be3 Author: Stefan Haberland Date: Wed Jan 25 16:59:46 2017 +0100 s390/dasd: correct inconsistent indenting Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca732e111ff7017e79a0cbb8aa0636c6ce48eb7d Author: Stefan Haberland Date: Wed Jan 25 16:56:41 2017 +0100 s390/dasd: check blockdevice pointer before trying to sync blockdevice If safe offline is called for a DASD alias device a null pointer is passed to fsync_bdev. So check for existence of the blockdevice before calling fsync_bdev. Should not be a real world problem since safe offline for an alias device does not make sense and fsync_bdev can deal with a NULL pointer which it gets after successful NULL pointer dereferencing on s390. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2202134e48a3b50320aeb9e3dd1186833e9d7e66 Author: Stefan Haberland Date: Wed Jan 25 14:47:32 2017 +0100 s390/dasd: check for device error pointer within state change interrupts Check if the device pointer is valid. Just a sanity check since we already are in the int handler of the device. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit defc2a9b9899511445cfbaa2c3a6509964b71207 Author: Stefan Haberland Date: Wed Jan 25 14:08:20 2017 +0100 s390/dasd: allow 0 for path_threshold attribute Allow 0 as valid input for the path_threshold attribute to deactivate the IFCC/CCC error handling. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0cec463e391e05b807a5114e9f0635e4980b805e Author: Michael Zoran Date: Sat Jan 28 21:39:45 2017 -0800 staging: bcm2835-audio: Simplify callback structure for write data The device sends data to the audio devices by sending a message with the data through VC04_SERVICES/VCHIQ. This message contains a callback pointer that is always filled in with the same function. This is prone to corruption issues. Instead fill the callback fields with a fixed cookie value to perforam some validation on the message response and call the handler function directly instead of through the callback pointer. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-pcm.c | 9 +----- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 35 ++++++++++------------ drivers/staging/bcm2835-audio/bcm2835.h | 4 +-- .../staging/bcm2835-audio/vc_vchi_audioserv_defs.h | 18 +++-------- 4 files changed, 22 insertions(+), 44 deletions(-) commit 9c4f728693f7384144bb13dcd65dd8f6997e29e8 Author: Michael Zoran Date: Sat Jan 28 21:39:44 2017 -0800 staging: bcm2835-audio: Remove code for non device tree init The bcm2835-audio driver has a legacy code path for initializing devices without a device tree. Delete this code path and remove the non device tree devices. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.c | 271 +------------------------------- 1 file changed, 2 insertions(+), 269 deletions(-) commit 6c07499d631496807b224c5619b16c878d85b158 Author: Michael Zoran Date: Sun Jan 29 06:39:09 2017 -0800 staging: bcm2835-audio: Add TODO list Add a TODO list of possible cleanup items. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/TODO | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f9e9c0669f15919a0e5e2908369eb6406af95ca0 Author: Markus Elfring Date: Mon Dec 26 15:14:33 2016 -0200 [media] v4l2-async: Use kmalloc_array() in v4l2_async_notifier_unregister() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34525e1f7e8dc47834b52d19b02c94b250df6f1f Author: Martin Schwidefsky Date: Wed Jan 25 12:54:17 2017 +0100 s390: store breaking event address only for program checks The principles of operations specifies that the breaking event address is stored to the address 0x110 in the prefix page only for program checks. The last branch in user space is lost as soon as a branch in kernel space is executed after e.g. an svc. This makes it impossible to accurately maintain the breaking event address for a user space process. Simplify the code, just copy the current breaking event address from 0x110 to the task structure for program checks from user space. Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 50 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 38 deletions(-) commit 9945cf9997b5fc10b47c010cdb40b2753ccc77d9 Author: Shyam Saini Date: Fri Dec 23 17:34:36 2016 -0200 [media] media: usb: cpia2: Use kmemdup instead of kmalloc and memcpy When some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cpia2/cpia2_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b1bea012710c1a299573c7a6a0584d623e6cbcf Author: Jan Höppner Date: Tue Nov 22 18:11:46 2016 +0100 s390/dasd: Improve parameter list parsing The function dasd_busid() still uses simple_strtoul() to convert a string to an integer value. This function is obsolete for quite some time already and should be replaced. The whole parameter parsing semantic still relies somewhat on the fact, that simple_strtoul() parses a string containing literals without complains and just returns the parsed integer value plus the residual string. kstrtoint(), however, would return -EINVAL in such a case. Since we want to get rid of simple_strtoul() and now have a nice dasd[] containing only single elements, we can clean up and simplify a few things. Replace simple_strtoul() with kstrtouint(), improve and simplify the overall parameter parsing by the following: - instead of residual strings return proper error codes - remove dasd_parse_next_element() and decide directly what sort of element is being parsed - if we parse a device or a range of devices, split that element into separate bits with a new function - remove warning about invalid ending as it doesn't apply anymore - annotate all parsing functions and data that can be freed after initialisation with __init and __initdata respectively - clean up bits and pieces while at it Reviewed-by: Stefan Haberland Reviewed-by: Sebastian Ott Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 258 +++++++++++++++++++-------------------- drivers/s390/block/dasd_int.h | 2 +- 2 files changed, 125 insertions(+), 135 deletions(-) commit 09762dcb623b5cff08c624250130cdcd389d5044 Author: Jan Höppner Date: Mon Nov 21 13:21:59 2016 +0100 s390/dasd: Always store parameter elements in an array When the DASD driver is built into the kernel, the entire comma separated parameter list is stored as one single element in the dasd[] array, opposed to the module build where each element is stored separately in dasd[]. There is no point in doing so. Therefore, store each part of the list as single elements in dasd[] as well when built into the kernel. Also, create a define for the maximum of 256 parameters. Reviewed-by: Stefan Haberland Reviewed-by: Sebastian Ott Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 7fbe5c0f2af3ab82fe6880af557e98a10d711370 Author: Harald Freudenberger Date: Mon Jan 16 09:43:29 2017 +0100 s390/zcrypt: use spin_lock_bh for all queue locks and unlocks. During tests the Kernel complained about inconsistend lock state: inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. Now all the queue locks use spin_lock_bh/spin_unlock_bh. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d34b1acb78af41b8b8d5c60972b6555ea19f7564 Author: Harald Freudenberger Date: Tue Dec 20 11:32:47 2016 +0100 s390/prng: Adjust generation of entropy to produce real 256 bits. The generate_entropy function used a sha256 for compacting together 256 bits of entropy into 32 bytes hash. However, it is questionable if a sha256 can really be used here, as potential collisions may reduce the max entropy fitting into a 32 byte hash value. So this batch introduces the use of sha512 instead and the required buffer adjustments for the calling functions. Further more the working buffer for the generate_entropy function has been widened from one page to two pages. So now 1024 stckf invocations are used to gather 256 bits of entropy. This has been done to be on the save side if the jitters of stckf values isn't as good as supposed. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/prng.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 01faa0d9c79e9c6a52d33e01f953588a946e3d87 Author: Santosh Kumar Singh Date: Mon Dec 19 15:20:37 2016 -0200 [media] pvrusb2: Clean up file handle in open() error path Fix to avoid possible exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4f2779ecf2f42b0997fedef6fd20a931c40a3e3 Author: Harald Freudenberger Date: Thu Dec 15 14:58:08 2016 +0100 s390/crypto: Extend key length check for AES-XTS in fips mode. In fips mode only xts keys with 128 bit or 125 bit are allowed. This fix extends the xts_aes_set_key function to check for these valid key lengths in fips mode. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f3d3584faf29e8901e00794f4e5f770b9f1eb7a6 Author: Matthew Rosato Date: Thu Dec 15 14:54:30 2016 +0100 s390/crypto: Check des3_ede keys for uniqueness in fips mode Triple-DES implementations will soon be required to check for uniqueness of keys with fips mode enabled. Add checks to ensure none of the 3 keys match. Signed-off-by: Matthew Rosato Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/des_s390.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c5b81fe36cc6ff2e5426dbee6c665a90f640069a Author: Santosh Kumar Singh Date: Mon Dec 19 15:12:07 2016 -0200 [media] ivtv: Clean up file handle in open() error path Fix to avoid possible exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 1 + 1 file changed, 1 insertion(+) commit 1e071039b1535e2a781acc750681deb2eb838565 Author: Santosh Kumar Singh Date: Mon Dec 19 15:10:58 2016 -0200 [media] tm6000: Clean up file handle in open() error path Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2217a1d1cb0673daa398a08475e6c493b1dc663f Author: Santosh Kumar Singh Date: Mon Dec 19 14:47:44 2016 -0200 [media] zoran: Clean up file handle in open() error path Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/zoran/zoran_driver.c | 1 + 1 file changed, 1 insertion(+) commit 60d5c020bbc0e4ef789c35266f92ba69eeb76c34 Author: Eric Anholt Date: Fri Jan 27 13:55:03 2017 -0800 staging: bcm2835-v4l2: Apply spelling fixes from checkpatch. Generated with checkpatch.pl --fix-inplace and git add -p out of the results. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/bcm2835-camera.c | 6 +++--- drivers/staging/media/platform/bcm2835/mmal-vchiq.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit 03b0a78d067fbabd256b704e1c52d0ea0bc2552d Author: Eric Anholt Date: Fri Jan 27 13:55:02 2017 -0800 staging: bcm2835-v4l2: Apply many whitespace fixes from checkpatch. Generated with checkpatch.pl --fix-inplace, some manual fixes for cases where checkpatch fixed one out of multiple lines of mis-indented function parameters, and then git add -p out of the results. I skipped some fixes that should probably instead be replaced with the BIT() macro. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../media/platform/bcm2835/bcm2835-camera.c | 90 ++++---- drivers/staging/media/platform/bcm2835/controls.c | 236 ++++++++++----------- .../staging/media/platform/bcm2835/mmal-vchiq.c | 13 +- 3 files changed, 167 insertions(+), 172 deletions(-) commit 7002786a12f64f80aefd083ab4807009a3a3dd13 Author: Eric Anholt Date: Fri Jan 27 13:55:01 2017 -0800 staging: bcm2835-v4l2: Add a TODO file for improvements we need. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/TODO | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 97b35807cc4d3d0cf1d2c61f5ed0727551416ad0 Author: Eric Anholt Date: Fri Jan 27 13:55:00 2017 -0800 staging: bcm2835-v4l2: Add a build system for the module. This is derived from the downstream tree's build system, but with just a single Kconfig option. For now the driver only builds on 32-bit arm -- the aarch64 build breaks due to the driver using arm-specific cache flushing functions. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/media/Kconfig | 2 ++ drivers/staging/media/Makefile | 1 + drivers/staging/media/platform/bcm2835/Kconfig | 10 ++++++++++ drivers/staging/media/platform/bcm2835/Makefile | 11 +++++++++++ 4 files changed, 24 insertions(+) commit 411d68bef922862286bae2ad3476f7a57f17ec79 Author: Eric Anholt Date: Fri Jan 27 13:54:59 2017 -0800 staging: bcm2835-v4l2: Update the driver to the current VCHI API. 49bec49fd7f2 ("staging: vc04_services: remove vchiq_copy_from_user") removed the flags/msg_handle arguments, which were unused, and pushed the implementation of copying using memcpy vs copy_from_user to the caller. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/mmal-vchiq.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a Author: Eric Anholt Date: Fri Jan 27 13:54:58 2017 -0800 staging: Import the BCM2835 MMAL-based V4L2 camera driver. - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. - Uses 3.6.10 timestamping - Camera power based on use - Uses immutable input mode on video encoder This code comes from the Raspberry Pi kernel tree (rpi-4.9.y) as of a15ba877dab4e61ea3fc7b006e2a73828b083c52. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../media/platform/bcm2835/bcm2835-camera.c | 2016 ++++++++++++++++++++ .../media/platform/bcm2835/bcm2835-camera.h | 145 ++ drivers/staging/media/platform/bcm2835/controls.c | 1345 +++++++++++++ .../staging/media/platform/bcm2835/mmal-common.h | 53 + .../media/platform/bcm2835/mmal-encodings.h | 127 ++ .../media/platform/bcm2835/mmal-msg-common.h | 50 + .../media/platform/bcm2835/mmal-msg-format.h | 81 + .../staging/media/platform/bcm2835/mmal-msg-port.h | 107 ++ drivers/staging/media/platform/bcm2835/mmal-msg.h | 404 ++++ .../media/platform/bcm2835/mmal-parameters.h | 689 +++++++ .../staging/media/platform/bcm2835/mmal-vchiq.c | 1916 +++++++++++++++++++ .../staging/media/platform/bcm2835/mmal-vchiq.h | 178 ++ 12 files changed, 7111 insertions(+) commit 7c13a4d6997ddb84b8c27bd90234c5ef1b020226 Author: Santosh Kumar Singh Date: Mon Dec 19 14:12:46 2016 -0200 [media] vim2m: Clean up file handle in open() error path Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vim2m.c | 2 ++ 1 file changed, 2 insertions(+) commit c4d27f4b4dc99715317696556d713f9094dca509 Author: Kees Cook Date: Fri Dec 16 23:05:36 2016 -0200 [media] solo6x10: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6351db2b4df3e086793b2472cc124fb9ae8d8458 Author: Kees Cook Date: Fri Dec 16 23:00:31 2016 -0200 [media] mtk-vcodec: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 8 ++++---- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 6792eb0cf9310ec240b7e7c9bfa86dff4c758c68 Author: Sudip Mukherjee Date: Fri Dec 16 19:31:49 2016 -0200 [media] bt8xx: fix memory leak If dvb_attach() fails then we were just printing an error message and exiting but the memory allocated to state was not released. Signed-off-by: Sudip Mukherjee Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 + 1 file changed, 1 insertion(+) commit 7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8 Author: Sean Young Date: Fri Jan 20 10:10:11 2017 -0200 [media] lirc: fix null dereference for tx-only devices tx-only RC devices do not have a receive buffer. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f348b4d323a67a5639ccbd3de5add5383573e4a5 Author: Sean Young Date: Thu Jan 19 19:44:00 2017 -0200 [media] lirc: LIRC_GET_MIN_TIMEOUT should be in range LIRC_SET_REC_TIMEOUT can fail if the value returned by LIRC_GET_MIN_TIMEOUT is set due to rounding errors. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8caebcdc53c9716ed6ae493aa6c0b1d3a67f0d5d Author: Sean Young Date: Thu Jan 19 19:33:49 2017 -0200 [media] rc: remove excessive spaces from error message The current message has some wanted spaces on it: rc_core: Loaded IR protocol module ir-jvc-decoder, but protocol jvc still not available Merge it into a single line. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c9bbd5661fa85e086ee52aa5905b62d14ee8b7a3 Author: Sean Young Date: Thu Jan 19 19:27:17 2017 -0200 [media] lirc: fix transmit-only read features An RC device which is transmit-only shouldn't have the LIRC_CAN_REC_MODE2 feature. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 126f6846cb184d21d2f86e50d0b6459e94cf9428 Author: Martin Blumenstingl Date: Fri Jan 13 12:22:12 2017 -0200 [media] rc/keymaps: add a keytable for the GeekBox remote control The GeekBox ships with a 12 button remote control which seems to use the NEC protocol. The button keycodes were captured with the "ir-keytable" tool (ir-keytable -p $PROTOCOL -t; human_button_pusher). Signed-off-by: Martin Blumenstingl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-geekbox.c | 55 +++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 57 insertions(+) commit 2b4883d00baac8cde86ce8fa1fe2fe92bc05ab33 Author: Sean Wang Date: Fri Jan 13 05:35:38 2017 -0200 [media] Documentation: devicetree: Add document bindings for mtk-cir This patch adds documentation for devicetree bindings for consumer Mediatek IR controller. Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/mtk-cir.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 330d432bc3a73cd0db273add46b592f57312ea1f Author: Sean Wang Date: Fri Jan 13 05:35:37 2017 -0200 [media] Documentation: devicetree: move shared property used by rc into a common place Most IR drivers uses the same label to identify the scancode/key table they used by multiple bindings and lack explanation well. So move the shared property into a common place and give better explanation. Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/gpio-ir-receiver.txt | 3 +- .../devicetree/bindings/media/hix5hd2-ir.txt | 2 +- Documentation/devicetree/bindings/media/rc.txt | 116 +++++++++++++++++++++ .../devicetree/bindings/media/sunxi-ir.txt | 2 +- 4 files changed, 120 insertions(+), 3 deletions(-) commit 6691e7b9a57c2475138edf106e76ae626d86a32b Author: Sean Wang Date: Fri Jan 13 05:35:39 2017 -0200 [media] rc: add driver for IR remote receiver on MT7623 SoC This patch adds driver for IR controller on MT7623 SoC. and should also work on similar Mediatek SoC. Currently testing successfully on NEC and SONY remote controller only but it should work on others (lirc, rc-5 and rc-6). Signed-off-by: Sean Wang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 11 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/mtk-cir.c | 335 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 347 insertions(+) commit 922ee72da7c739157ed02ea04a5c100d19f67226 Author: Sean Young Date: Mon Jan 30 17:58:19 2017 -0200 [media] rx51: broken build As reported by kernel build test: In file included from arch/arm/mach-omap2/pdata-quirks.c:15:0: >> arch/arm/mach-omap2/pdata-quirks.c:536:49: error: 'rx51_lirc_data' undeclared here (not in a function) OF_DEV_AUXDATA("nokia,n900-ir", 0, "n900-ir", &rx51_lirc_data), ^ include/linux/of_platform.h:52:21: note: in definition of macro 'OF_DEV_AUXDATA' .platform_data = _pdata } ^~~~~~ Since "a92def1 [media] ir-rx51: port to rc-core" the build fails on some arm configurations. Reported-by: kbuild test robot Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab arch/arm/mach-omap2/pdata-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50e66ccbb72d50edc25844bb476f0e4645e12f7a Author: Masanari Iida Date: Mon Jan 30 12:32:31 2017 +0900 staging: unisys: visornic: Fix typo in visornic_main.c This patch fix some spelling typos found in visornic_main.c Signed-off-by: Masanari Iida Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2c474b8579e9b67ff72b2bcefce9f53c7f4469d4 Author: Igor Pylypiv Date: Mon Jan 30 21:39:54 2017 -0800 staging: wlan-ng: add missing byte order conversion Conversion macros le16_to_cpu was removed and that caused new sparse warning sparse output: drivers/staging/wlan-ng/p80211netdev.c:241:44: warning: incorrect type in argument 2 (different base types) drivers/staging/wlan-ng/p80211netdev.c:241:44: expected unsigned short [unsigned] [usertype] fc drivers/staging/wlan-ng/p80211netdev.c:241:44: got restricted __le16 [usertype] fc Fixes: 7ad82572348c ("staging:wlan-ng:Fix sparse warning") Signed-off-by: Igor Pylypiv Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9c3b5a7645a75f4bfcd65f11857361443dce31b Author: Vitali Liaukovich Date: Sat Jan 28 13:02:40 2017 +0200 Staging: speakup: speakup_bns: fix comment Fixed comment formatting issue. Signed-off-by: Vitali Liaukovich Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_bns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73c3700e86ab1d82b62b43ec24d12777e06935af Author: Derek Robson Date: Sat Jan 28 19:35:01 2017 +1300 Staging: speakup - syle fix permissions to octal A style fix across whole driver. changed permissions to octal style, found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 4 ++-- drivers/staging/speakup/speakup.h | 4 ++-- drivers/staging/speakup/speakup_acntpc.c | 26 +++++++++++++------------- drivers/staging/speakup/speakup_acntsa.c | 26 +++++++++++++------------- drivers/staging/speakup/speakup_apollo.c | 28 ++++++++++++++-------------- drivers/staging/speakup/speakup_audptr.c | 28 ++++++++++++++-------------- drivers/staging/speakup/speakup_bns.c | 26 +++++++++++++------------- drivers/staging/speakup/speakup_decext.c | 28 ++++++++++++++-------------- drivers/staging/speakup/speakup_decpc.c | 26 +++++++++++++------------- drivers/staging/speakup/speakup_dectlk.c | 28 ++++++++++++++-------------- drivers/staging/speakup/speakup_dtlk.c | 32 ++++++++++++++++---------------- drivers/staging/speakup/speakup_dummy.c | 26 +++++++++++++------------- drivers/staging/speakup/speakup_keypc.c | 22 +++++++++++----------- drivers/staging/speakup/speakup_ltlk.c | 32 ++++++++++++++++---------------- drivers/staging/speakup/speakup_soft.c | 32 ++++++++++++++++---------------- drivers/staging/speakup/speakup_spkout.c | 28 ++++++++++++++-------------- drivers/staging/speakup/speakup_txprt.c | 26 +++++++++++++------------- 17 files changed, 211 insertions(+), 211 deletions(-) commit 167c76e05591c2b656c0f329282f453dd46f4ea5 Merge: fcd4f3c 8cf4ecc Author: Paul Mackerras Date: Tue Jan 31 19:21:26 2017 +1100 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in the POWER9 radix MMU host and guest support, which was put into a topic branch because it touches both powerpc and KVM code. Signed-off-by: Paul Mackerras commit b1fe0cf06f92ff8ebe77959810ec3ff2555ff56c Author: Linus Walleij Date: Tue Jan 31 00:12:21 2017 -0800 Input: delete MPU3050 driver The MPU3050 driver in the input subsystem has been superseded by a proper IIO driver found in drivers/iio/gyro/mpu3050*. Patches have been submitted to remove all defconfig and related references to the old driver and replace this input driver with the IIO driver. So delete the input driver. Input was never a good fit for sensors anyway. Signed-off-by: Linus Walleij Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Torokhov drivers/input/misc/Kconfig | 10 - drivers/input/misc/Makefile | 1 - drivers/input/misc/mpu3050.c | 481 ------------------------------------------- 3 files changed, 492 deletions(-) commit 8cf4ecc0ca9bd9bdc9b4ca0a99f7445a1e74afed Author: Paul Mackerras Date: Mon Jan 30 21:21:53 2017 +1100 KVM: PPC: Book3S HV: Enable radix guest support This adds a few last pieces of the support for radix guests: * Implement the backends for the KVM_PPC_CONFIGURE_V3_MMU and KVM_PPC_GET_RMMU_INFO ioctls for radix guests * On POWER9, allow secondary threads to be on/off-lined while guests are running. * Set up LPCR and the partition table entry for radix guests. * Don't allocate the rmap array in the kvm_memory_slot structure on radix. * Don't try to initialize the HPT for radix guests, since they don't have an HPT. * Take out the code that prevents the HV KVM module from initializing on radix hosts. At this stage, we only support radix guests if the host is running in radix mode, and only support HPT guests if the host is running in HPT mode. Thus a guest cannot switch from one mode to the other, which enables some simplifications. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s.h | 2 + arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 - arch/powerpc/kvm/book3s_64_mmu_radix.c | 45 +++++++++++++++++ arch/powerpc/kvm/book3s_hv.c | 88 ++++++++++++++++++++++++---------- arch/powerpc/kvm/powerpc.c | 2 +- 5 files changed, 111 insertions(+), 27 deletions(-) commit f11f6f79b606fb54bb388d0ea652ed889b2fdf86 Author: Paul Mackerras Date: Mon Jan 30 21:21:52 2017 +1100 KVM: PPC: Book3S HV: Invalidate ERAT on guest entry/exit for POWER9 DD1 On POWER9 DD1, we need to invalidate the ERAT (effective to real address translation cache) when changing the PIDR register, which we do as part of guest entry and exit. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 ++++++ 1 file changed, 6 insertions(+) commit 53af3ba2e8195f504d6a3a0667ccb5e7d4c57599 Author: Paul Mackerras Date: Mon Jan 30 21:21:51 2017 +1100 KVM: PPC: Book3S HV: Allow guest exit path to have MMU on If we allow LPCR[AIL] to be set for radix guests, then interrupts from the guest to the host can be delivered by the hardware with relocation on, and thus the code path starting at kvmppc_interrupt_hv can be executed in virtual mode (MMU on) for radix guests (previously it was only ever executed in real mode). Most of the code is indifferent to whether the MMU is on or off, but the calls to OPAL that use the real-mode OPAL entry code need to be switched to use the virtual-mode code instead. The affected calls are the calls to the OPAL XICS emulation functions in kvmppc_read_one_intr() and related functions. We test the MSR[IR] bit to detect whether we are in real or virtual mode, and call the opal_rm_* or opal_* function as appropriate. The other place that depends on the MMU being off is the optimization where the guest exit code jumps to the external interrupt vector or hypervisor doorbell interrupt vector, or returns to its caller (which is __kvmppc_vcore_entry). If the MMU is on and we are returning to the caller, then we don't need to use an rfid instruction since the MMU is already on; a simple blr suffices. If there is an external or hypervisor doorbell interrupt to handle, we branch to the relocation-on version of the interrupt vector. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_builtin.c | 38 ++++++++++++++++++++++----------- arch/powerpc/kvm/book3s_hv_rm_xics.c | 8 +++---- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 29 +++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 17 deletions(-) commit a29ebeaf5575d03eef178bb87c425a1e46cae1ca Author: Paul Mackerras Date: Mon Jan 30 21:21:50 2017 +1100 KVM: PPC: Book3S HV: Invalidate TLB on radix guest vcpu movement With radix, the guest can do TLB invalidations itself using the tlbie (global) and tlbiel (local) TLB invalidation instructions. Linux guests use local TLB invalidations for translations that have only ever been accessed on one vcpu. However, that doesn't mean that the translations have only been accessed on one physical cpu (pcpu) since vcpus can move around from one pcpu to another. Thus a tlbiel might leave behind stale TLB entries on a pcpu where the vcpu previously ran, and if that task then moves back to that previous pcpu, it could see those stale TLB entries and thus access memory incorrectly. The usual symptom of this is random segfaults in userspace programs in the guest. To cope with this, we detect when a vcpu is about to start executing on a thread in a core that is a different core from the last time it executed. If that is the case, then we mark the core as needing a TLB flush and then send an interrupt to any thread in the core that is currently running a vcpu from the same guest. This will get those vcpus out of the guest, and the first one to re-enter the guest will do the TLB flush. The reason for interrupting the vcpus executing on the old core is to cope with the following scenario: CPU 0 CPU 1 CPU 4 (core 0) (core 0) (core 1) VCPU 0 runs task X VCPU 1 runs core 0 TLB gets entries from task X VCPU 0 moves to CPU 4 VCPU 0 runs task X Unmap pages of task X tlbiel (still VCPU 1) task X moves to VCPU 1 task X runs task X sees stale TLB entries That is, as soon as the VCPU starts executing on the new core, it could unmap and tlbiel some page table entries, and then the task could migrate to one of the VCPUs running on the old core and potentially see stale TLB entries. Since the TLB is shared between all the threads in a core, we only use the bit of kvm->arch.need_tlb_flush corresponding to the first thread in the core. To ensure that we don't have a window where we can miss a flush, this moves the clearing of the bit from before the actual flush to after it. This way, two threads might both do the flush, but we prevent the situation where one thread can enter the guest before the flush is finished. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_host.h | 2 ++ arch/powerpc/kvm/book3s_hv.c | 45 +++++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_hv_rm_mmu.c | 11 ++++++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 38 +++++++++++++++++++--------- 4 files changed, 82 insertions(+), 14 deletions(-) commit 65dae5403a162fe6ef7cd8b2835de9d23c303891 Author: Paul Mackerras Date: Mon Jan 30 21:21:49 2017 +1100 KVM: PPC: Book3S HV: Make HPT-specific hypercalls return error in radix mode If the guest is in radix mode, then it doesn't have a hashed page table (HPT), so all of the hypercalls that manipulate the HPT can't work and should return an error. This adds checks to make them return H_FUNCTION ("function not supported"). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rm_mmu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8f7b79b8379a85fb8dd0c3f42d9f452ec5552161 Author: Paul Mackerras Date: Mon Jan 30 21:21:48 2017 +1100 KVM: PPC: Book3S HV: Implement dirty page logging for radix guests This adds code to keep track of dirty pages when requested (that is, when memslot->dirty_bitmap is non-NULL) for radix guests. We use the dirty bits in the PTEs in the second-level (partition-scoped) page tables, together with a bitmap of pages that were dirty when their PTE was invalidated (e.g., when the page was paged out). This bitmap is stored in the first half of the memslot->dirty_bitmap area, and kvm_vm_ioctl_get_dirty_log_hv() now uses the second half for the bitmap that gets returned to userspace. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s.h | 7 ++- arch/powerpc/kvm/book3s_64_mmu_hv.c | 28 ++++----- arch/powerpc/kvm/book3s_64_mmu_radix.c | 111 ++++++++++++++++++++++++++++++--- arch/powerpc/kvm/book3s_hv.c | 31 +++++++-- 4 files changed, 144 insertions(+), 33 deletions(-) commit 01756099e0a5f431bbada9693d566269acfb51f9 Author: Paul Mackerras Date: Mon Jan 30 21:21:47 2017 +1100 KVM: PPC: Book3S HV: MMU notifier callbacks for radix guests This adapts our implementations of the MMU notifier callbacks (unmap_hva, unmap_hva_range, age_hva, test_age_hva, set_spte_hva) to call radix functions when the guest is using radix. These implementations are much simpler than for HPT guests because we have only one PTE to deal with, so we don't need to traverse rmap chains. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s.h | 6 ++++ arch/powerpc/kvm/book3s_64_mmu_hv.c | 64 +++++++++++++++++++++++----------- arch/powerpc/kvm/book3s_64_mmu_radix.c | 54 ++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 21 deletions(-) commit 5a319350a46572d073042a3194676099dd2c135d Author: Paul Mackerras Date: Mon Jan 30 21:21:46 2017 +1100 KVM: PPC: Book3S HV: Page table construction and page faults for radix guests This adds the code to construct the second-level ("partition-scoped" in architecturese) page tables for guests using the radix MMU. Apart from the PGD level, which is allocated when the guest is created, the rest of the tree is all constructed in response to hypervisor page faults. As well as hypervisor page faults for missing pages, we also get faults for reference/change (RC) bits needing to be set, as well as various other error conditions. For now, we only set the R or C bit in the guest page table if the same bit is set in the host PTE for the backing page. This code can take advantage of the guest being backed with either transparent or ordinary 2MB huge pages, and insert 2MB page entries into the guest page tables. There is no support for 1GB huge pages yet. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s.h | 8 + arch/powerpc/kvm/book3s.c | 1 + arch/powerpc/kvm/book3s_64_mmu_hv.c | 7 +- arch/powerpc/kvm/book3s_64_mmu_radix.c | 385 +++++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_hv.c | 17 +- 5 files changed, 415 insertions(+), 3 deletions(-) commit f4c51f841d2ac7d36cacb84efbc383190861f87c Author: Paul Mackerras Date: Mon Jan 30 21:21:45 2017 +1100 KVM: PPC: Book3S HV: Modify guest entry/exit paths to handle radix guests This adds code to branch around the parts that radix guests don't need - clearing and loading the SLB with the guest SLB contents, saving the guest SLB contents on exit, and restoring the host SLB contents. Since the host is now using radix, we need to save and restore the host value for the PID register. On hypervisor data/instruction storage interrupts, we don't do the guest HPT lookup on radix, but just save the guest physical address for the fault (from the ASDR register) in the vcpu struct. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kernel/asm-offsets.c | 2 ++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 57 ++++++++++++++++++++++++++------- 3 files changed, 49 insertions(+), 11 deletions(-) commit 9e04ba69beec372ddf857c700ff922e95f50b0d0 Author: Paul Mackerras Date: Mon Jan 30 21:21:44 2017 +1100 KVM: PPC: Book3S HV: Add basic infrastructure for radix guests This adds a field in struct kvm_arch and an inline helper to indicate whether a guest is a radix guest or not, plus a new file to contain the radix MMU code, which currently contains just a translate function which knows how to traverse the guest page tables to translate an address. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s.h | 3 + arch/powerpc/include/asm/kvm_book3s_64.h | 6 ++ arch/powerpc/include/asm/kvm_host.h | 2 + arch/powerpc/kvm/Makefile | 3 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 10 ++- arch/powerpc/kvm/book3s_64_mmu_radix.c | 139 +++++++++++++++++++++++++++++++ 6 files changed, 160 insertions(+), 3 deletions(-) commit ef8c640cb9cc865a461827b698fcc55b0ecaa600 Author: Paul Mackerras Date: Mon Jan 30 21:21:43 2017 +1100 KVM: PPC: Book3S HV: Use ASDR for HPT guests on POWER9 POWER9 adds a register called ASDR (Access Segment Descriptor Register), which is set by hypervisor data/instruction storage interrupts to contain the segment descriptor for the address being accessed, assuming the guest is using HPT translation. (For radix guests, it contains the guest real address of the access.) Thus, for HPT guests on POWER9, we can use this register rather than looking up the SLB with the slbfee. instruction. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 ++++++++ 1 file changed, 8 insertions(+) commit 468808bd35c4aa3cf7d9fde0ebb010270038734b Author: Paul Mackerras Date: Mon Jan 30 21:21:42 2017 +1100 KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9 This adds the implementation of the KVM_PPC_CONFIGURE_V3_MMU ioctl for HPT guests on POWER9. With this, we can return 1 for the KVM_CAP_PPC_MMU_HASH_V3 capability. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c | 35 +++++++++++++++++++++++++++++++---- arch/powerpc/kvm/powerpc.c | 2 +- 3 files changed, 33 insertions(+), 5 deletions(-) commit c92701322711682de89b2bd0f32affad040b6e86 Author: Paul Mackerras Date: Mon Jan 30 21:21:41 2017 +1100 KVM: PPC: Book3S HV: Add userspace interfaces for POWER9 MMU This adds two capabilities and two ioctls to allow userspace to find out about and configure the POWER9 MMU in a guest. The two capabilities tell userspace whether KVM can support a guest using the radix MMU, or using the hashed page table (HPT) MMU with a process table and segment tables. (Note that the MMUs in the POWER9 processor cores do not use the process and segment tables when in HPT mode, but the nest MMU does). The KVM_PPC_CONFIGURE_V3_MMU ioctl allows userspace to specify whether a guest will use the radix MMU or the HPT MMU, and to specify the size and location (in guest space) of the process table. The KVM_PPC_GET_RMMU_INFO ioctl gives userspace information about the radix MMU. It returns a list of supported radix tree geometries (base page size and number of bits indexed at each level of the radix tree) and the encoding used to specify the various page sizes for the TLB invalidate entry instruction. Initially, both capabilities return 0 and the ioctls return -EINVAL, until the necessary infrastructure for them to operate correctly is added. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman Documentation/virtual/kvm/api.txt | 83 +++++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/kvm_ppc.h | 2 + arch/powerpc/include/uapi/asm/kvm.h | 20 +++++++++ arch/powerpc/kvm/book3s_hv.c | 13 ++++++ arch/powerpc/kvm/powerpc.c | 32 ++++++++++++++ include/uapi/linux/kvm.h | 6 +++ 6 files changed, 156 insertions(+) commit bc3551257af837fc603d295e59f9e32953525b98 Author: Paul Mackerras Date: Mon Jan 30 21:21:40 2017 +1100 powerpc/64: Allow for relocation-on interrupts from guest to host With host and guest both using radix translation, it is feasible for the host to take interrupts that come from the guest with relocation on, and that is in fact what the POWER9 hardware will do when LPCR[AIL] = 3. All such interrupts use HSRR0/1 not SRR0/1 except for system call with LEV=1 (hcall). Therefore this adds the KVM tests to the _HV variants of the relocation-on interrupt handlers, and adds the KVM test to the relocation-on system call entry point. We also instantiate the relocation-on versions of the hypervisor data storage and instruction interrupt handlers, since these can occur with relocation on in radix guests. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 10 +++--- arch/powerpc/kernel/exceptions-64s.S | 53 +++++++++++++++++--------------- 2 files changed, 34 insertions(+), 29 deletions(-) commit 16ed141677c5a1a796408e74ccd0a6f6554c3f21 Author: Paul Mackerras Date: Mon Jan 30 21:21:39 2017 +1100 powerpc/64: Make type of partition table flush depend on partition type When changing a partition table entry on POWER9, we do a particular form of the tlbie instruction which flushes all TLBs and caches of the partition table for a given logical partition ID (LPID). This instruction has a field in the instruction word, labelled R (radix), which should be 1 if the partition was previously a radix partition and 0 if it was a HPT partition. This implements that logic. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_64.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit ba9b399aee6fb70cbe988f0750d6dd9f6677293b Author: Paul Mackerras Date: Mon Jan 30 21:21:38 2017 +1100 powerpc/64: Export pgtable_cache and pgtable_cache_add for KVM This exports the pgtable_cache array and the pgtable_cache_add function so that HV KVM can use them for allocating radix page tables for guests. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/mm/init-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dbcbfee0c81c7938e40d7d6bc659a5191f490b50 Author: Paul Mackerras Date: Mon Jan 30 21:21:37 2017 +1100 powerpc/64: More definitions for POWER9 This adds definitions for bits in the DSISR register which are used by POWER9 for various translation-related exception conditions, and for some more bits in the partition table entry that will be needed by KVM. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 12 +++++++++++- arch/powerpc/include/asm/reg.h | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit cc3d2940133d24000e2866b21e03ce32adfead0a Author: Paul Mackerras Date: Mon Jan 30 21:21:36 2017 +1100 powerpc/64: Enable use of radix MMU under hypervisor on POWER9 To use radix as a guest, we first need to tell the hypervisor via the ibm,client-architecture call first that we support POWER9 and architecture v3.00, and that we can do either radix or hash and that we would like to choose later using an hcall (the H_REGISTER_PROC_TBL hcall). Then we need to check whether the hypervisor agreed to us using radix. We need to do this very early on in the kernel boot process before any of the MMU initialization is done. If the hypervisor doesn't agree, we can't use radix and therefore clear the radix MMU feature bit. Later, when we have set up our process table, which points to the radix tree for each process, we need to install that using the H_REGISTER_PROC_TBL hcall. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 6 ++++++ arch/powerpc/include/asm/hvcall.h | 11 +++++++++++ arch/powerpc/include/asm/prom.h | 9 +++++++++ arch/powerpc/kernel/prom_init.c | 18 +++++++++++++++++- arch/powerpc/mm/init_64.c | 12 +++++++----- arch/powerpc/mm/pgtable-radix.c | 2 ++ arch/powerpc/platforms/pseries/lpar.c | 29 +++++++++++++++++++++++++++++ 7 files changed, 81 insertions(+), 6 deletions(-) commit 3f4ab2f83b4e443c66549206eb88a9fa5a85d647 Author: Paul Mackerras Date: Mon Jan 30 21:21:35 2017 +1100 powerpc/pseries: Fixes for the "ibm,architecture-vec-5" options This fixes the byte index values for some of the option bits in the "ibm,architectur-vec-5" property. The "platform facilities options" bits are in byte 17 not byte 14, so the upper 8 bits of their definitions need to be 0x11 not 0x0E. The "sub processor support" option is in byte 21 not byte 15. Note none of these options are actually looked up in "ibm,architecture-vec-5" at this time, so there is no bug. When checking whether option bits are set, we should check that the offset of the byte being checked is less than the vector length that we got from the hypervisor. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/prom.h | 8 ++++---- arch/powerpc/platforms/pseries/firmware.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 18569c1f134e1c5c88228f043c09678ae6052b7c Author: Paul Mackerras Date: Mon Jan 30 21:21:34 2017 +1100 powerpc/64: Don't try to use radix MMU under a hypervisor Currently, if the kernel is running on a POWER9 processor under a hypervisor, it will try to use the radix MMU even though it doesn't have the necessary code to use radix under a hypervisor (it doesn't negotiate use of radix, and it doesn't do the H_REGISTER_PROC_TBL hcall). The result is that the guest kernel will crash when it tries to turn on the MMU. This fixes it by looking for the /chosen/ibm,architecture-vec-5 property, and if it exists, clears the radix MMU feature bit, before we decide whether to initialize for radix or HPT. This property is created by the hypervisor as a result of the guest calling the ibm,client-architecture-support method to indicate its capabilities, so it will indicate whether the hypervisor agreed to us using radix. Systems without a hypervisor may have this property also (for example, skiboot creates it), so we check the HV bit in the MSR to see whether we are running as a guest or not. If we are in hypervisor mode, then we can do whatever we like including using the radix MMU. The reason for using this property is that in future, when we have support for using radix under a hypervisor, we will need to check this property to see whether the hypervisor agreed to us using radix. Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit a97a65d53d9f53b6897dc1b2aed381bc1707136b Author: Nicholas Piggin Date: Fri Jan 27 14:00:34 2017 +1000 KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts 64-bit Book3S exception handlers must find the dynamic kernel base to add to the target address when branching beyond __end_interrupts, in order to support kernel running at non-0 physical address. Support this in KVM by branching with CTR, similarly to regular interrupt handlers. The guest CTR saved in HSTATE_SCRATCH1 and restored after the branch. Without this, the host kernel hangs and crashes randomly when it is running at a non-0 address and a KVM guest is started. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 45 +++++++++++++++++++++++++++++--- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 12 ++++++--- arch/powerpc/kvm/book3s_segment.S | 7 +++++ 4 files changed, 58 insertions(+), 8 deletions(-) commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14 Author: Chanwoo Choi Date: Tue Jan 31 16:47:57 2017 +0900 PM / devfreq: Modify the device name as devfreq(X) for sysfs This patch modifies the device name as devfreq(X) for sysfs by using the 'devfreq' prefix word instead of separate device name. On user-space aspect, user would find the some devfreq drvier with 'devfreq(X)' pattern. So, this patch modify the device name as following: - /sys/class/devfreq/[non-standard device name] -> /sys/class/devfreq/devfreq(X) Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 775fa8c3aa22df720f433e871f94cfb182f5913d Author: Chanwoo Choi Date: Tue Jan 31 16:47:56 2017 +0900 PM / devfreq: Simplify the sysfs name of devfreq-event device This patch just removes '.' character from the sysfs name of devfreq-event device as following. Usually, the subsystem uses the similiar naming style such as {framework name}{Number}. - old : /sys/class/devfreq-event/event.(X) - new : /sys/class/devfreq-event/event(X) And this patch initializes the value of 'event_no' with -1 in order to remove the unneeded operation (-1) when calling the atomic_inc_return(&event_no). Lastly, this patch adds the ABI document for devfreq-event class. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham .../ABI/testing/sysfs-class-devfreq-event | 25 ++++++++++++++++++++++ drivers/devfreq/devfreq-event.c | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) commit 7243a1af37a4dc9225004546d9d0756c529ad3ce Merge: b1a4c9a f2593cb Author: Kalle Valo Date: Tue Jan 31 09:50:50 2017 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.11. Major changes: wcn36xx * convert to a proper QCOM_SMD driver (from the platform_driver interface) ath10k * VHT160 support * dump Copy Engine registers during firmware crash * search board file extension from SMBIOS wil6210 * add disable_ap_sme module parameter commit f26483eaedec39b09b1f2bdfc3f0d18f86764327 Merge: da0aa3d 24c2503 Author: Ingo Molnar Date: Tue Jan 31 08:38:17 2017 +0100 Merge branch 'x86/urgent' into x86/microcode, to resolve conflicts Conflicts: arch/x86/kernel/cpu/microcode/amd.c arch/x86/kernel/cpu/microcode/core.c Signed-off-by: Ingo Molnar commit 3ad38ceb2769f08d0abd132331a7a6130536a36c Author: Kees Cook Date: Mon Jan 30 16:37:11 2017 -0800 x86/mm: Remove CONFIG_DEBUG_NX_TEST CONFIG_DEBUG_NX_TEST has been broken since CONFIG_DEBUG_SET_MODULE_RONX=y was added in v2.6.37 via: 84e1c6bb38eb ("x86: Add RO/NX protection for loadable kernel modules") since the exception table was then made read-only. Additionally, the manually constructed extables were never fixed when relative extables were introduced in v3.5 via: 706276543b69 ("x86, extable: Switch to relative exception table entries") However, relative extables won't work for test_nx.c, since test instruction memory areas may be more than INT_MAX away from an executable fixup (e.g. stack and heap too far away from executable memory with the fixup). Since clearly no one has been using this code for a while now, and similar tests exist in LKDTM, this should just be removed entirely. Signed-off-by: Kees Cook Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jinbum Park Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170131003711.GA74048@beast Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 8 --- arch/x86/kernel/Makefile | 1 - arch/x86/kernel/test_nx.c | 173 ---------------------------------------------- 3 files changed, 182 deletions(-) commit b1a4c9a19659465d63924568b7b68a2fa65e159c Author: Rafał Miłecki Date: Sat Jan 28 23:11:34 2017 +0100 bcma: make OF code more generic (not platform_device specific) OF allows not only specifying platform devices but also describing devices on standard buses like PCI or USB. This change will allow reading info from DT for bcma buses hosted on PCI cards. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 6715208d0a95ae417203f8e4a7937c1b4c4947f2 Author: Stanislaw Gruszka Date: Mon Jan 30 12:12:47 2017 +0100 rt2800: enable rt3290 unconditionally on pci probe When we restart system using sysrq RT3290 device do not initalize properly, hance always enable it via WLAN_FUN_CTRL register on probe. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=85461 Reported-and-tested-by: Giedrius Statkevičius Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 --- 1 file changed, 3 deletions(-) commit a971df0b9d04674e325346c17de9a895425ca5e1 Author: Rafał Miłecki Date: Sat Jan 28 14:31:22 2017 +0100 bcma: use (get|put)_device when probing/removing device driver This allows tracking device state and e.g. makes devm work as expected. Signed-off-by: Rafał Miłecki Cc: Stable Signed-off-by: Kalle Valo drivers/bcma/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2a2a5d1835b6f0baa0e207426d3c79eefd32e253 Author: Arend Van Spriel Date: Fri Jan 27 12:27:48 2017 +0000 brcmfmac: add .update_connect_params() callback Add support for the .update_connect_params() callback for roaming or subsequent (re)association. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0b57010fc18e12c19d14379cd739d4eb7c3898f3 Author: Arend Van Spriel Date: Fri Jan 27 12:27:47 2017 +0000 brcmfmac: allow wowlan support to be per device The wowlan support is (partially) determined dynamic by checking the device/firmware capabilities. So they can differ per device. So it is not possible to use a static global. Instead use the global as a template and use kmemdup(). When kmemdup() fails the template is used unmodified. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) commit d29afe91af5995306d940b3dfee2419e0bb24a51 Author: Arend Van Spriel Date: Fri Jan 27 12:27:46 2017 +0000 brcmfmac: fix handling firmware results for wowl netdetect For wowl netdetect the event data changed for newer chips. This was recently fixed for scheduled scan, but same change is needed for wowl netdetect. Removing now pointles += operation from both result handlers. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2ef0359031b9ed891ca381b2687186fb52b277f8 Author: Arend Van Spriel Date: Fri Jan 27 12:27:45 2017 +0000 brcmfmac: provide a value for struct wowlan_support::max_nd_match_sets The driver advertises support for WOWLAN_NETDETECT but did not specify maximum amount of netdetect match sets. This was no issue due to a bug in nl80211. As that has been fixed, brcmfmac also needs fixing. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) commit d546530e569463a7f0a4ead482d277b5ef42a3aa Author: Sara Sharon Date: Mon Jan 30 12:34:32 2017 +0200 iwlwifi: alloc memory dynamically also for DVM For old firmwares the memory wasn't allocated, resulting in panic. Make it dynamically allocated as well. Allow any order of functions call. Fixes: eef187a7b8a1 ("iwlwifi: enlarge number of ucode sections") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Tested-by: Kalle Valo Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 33e962c8871f015f5c8978384553dddcf5b81b22 Author: Stanislaw Gruszka Date: Sun Jan 29 12:40:52 2017 +0100 rt2x00: fix clk_get call clk_get() takes two arguments and might return ERR_PTR(), so we have to nullify pointer on that case, to do not break further call to clk_get_rate(). Reported-by: Felix Fietkau Fixes: 34db70b92fae ("rt2x00: add copy of clk for soc devices") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 29b6968b05b6a4a858ba3ce767be1025ab59f2ca Author: Chanwoo Choi Date: Tue Jan 31 15:38:18 2017 +0900 PM / devfreq: Remove unnecessary separate _remove_devfreq() The _remove_devfreq() releases the all resources of the devfreq device. This function is only called in the devfreq_dev_release(). For that reason, the devfreq core doesn't need to leave the _remove_devfreq() separately. This patch releases the all resources in the devfreq_dev_release() and then removes the _remove_devfreq(). Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 30582c25a4b4e0a5e456a309fde79b845e9473b2 Author: Chanwoo Choi Date: Tue Jan 31 15:38:17 2017 +0900 PM / devfreq: Fix wrong trans_stat of passive devfreq device Until now, the trans_stat information of passive devfreq is not updated. This patch updates the trans_stat information after setting the target frequency of passive devfreq device. Fixes: 996133119f57 ("PM / devfreq: Add new passive governor") Cc: stable@vger.kernel.org Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 3 ++- drivers/devfreq/governor.h | 2 ++ drivers/devfreq/governor_passive.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit bcf23c79c4e46130701370af4383b61a3cba755c Author: Chanwoo Choi Date: Tue Jan 31 15:38:16 2017 +0900 PM / devfreq: Fix available_governor sysfs The devfreq using passive governor is not able to change the governor. So, the user can not change the governor through 'available_governor' sysfs entry. Also, the devfreq which don't use the passive governor is not able to change to 'passive' governor on the fly. Fixes: 996133119f57 ("PM / devfreq: Add new passive governor") Cc: stable@vger.kernel.org Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 31 +++++++++++++++++++++++++++---- drivers/devfreq/governor_passive.c | 1 + include/linux/devfreq.h | 3 +++ 3 files changed, 31 insertions(+), 4 deletions(-) commit a8709fa4a06d4af5f86e3660839531cbe0f2a19b Merge: f9a42e0 31945aa Author: Ingo Molnar Date: Tue Jan 31 07:45:42 2017 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU changes from Paul E. McKenney: - Dynticks updates, consolidating open-coded counter accesses into a well-defined API - SRCU updates: Simplify algorithm, add formal verification - Documentation updates - Miscellaneous fixes - Torture-test updates Signed-off-by: Ingo Molnar commit b0d75c08092f870825fbb766ac191faedd248918 Author: Chanwoo Choi Date: Mon Jan 16 21:26:05 2017 +0900 PM / devfreq: exynos-ppmu: Show the registred device for ppmu device This patch just adds the simple log to show the PPMU device's registration during the kernel booting. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Javier Martinez Canillas Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-ppmu.c | 3 +++ 1 file changed, 3 insertions(+) commit c701335e7afaef95519b0a3a405bb646e0ffef5f Author: Chanwoo Choi Date: Mon Jan 16 21:26:04 2017 +0900 PM / devfreq: Fix the wrong description for userspace governor This patch fixes the wrong description of governor_userspace.c and removes the unneeded blank line. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/governor_userspace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9d0109be482cf75d731f2d8ea86ce2471b98a429 Author: Chanwoo Choi Date: Sat Nov 19 22:47:36 2016 +0900 PM / devfreq: Fix the checkpatch warnings This patch just fixes the checkpatch warnings. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 7b70246c3b8cdd62835d1d467e8af1841c316805 Author: Chanwoo Choi Date: Thu Dec 1 19:42:17 2016 +0900 PM / devfreq: exynos-bus: Print the real clock rate of bus This patch shows the real clock rate after calling clk_set_rate() to debug it. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/exynos-bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a3ea6478912a6d6739042bac25a7aa7d0342093 Author: Chanwoo Choi Date: Sun Nov 20 01:48:14 2016 +0900 PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registers This patch uses the regmap interface to read and write the registers for exynos PPMU device instead of the legacy memory map functions. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-ppmu.c | 326 ++++++++++++++++++++++++++---------- 1 file changed, 237 insertions(+), 89 deletions(-) commit b513652443fc515ec90202d005230f2afee457ad Author: Chanwoo Choi Date: Fri Dec 2 15:29:02 2016 +0900 PM / devfreq: exynos-bus: Add the detailed correlation for Exynos5433 This patch adds the detailed corrleation between sub-blocks and VDD_INT power line for Exynos5433. VDD_INT provided the power source to INT (Internal) block. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham Documentation/devicetree/bindings/devfreq/exynos-bus.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 924b9111a14f2c913782597d9d0795c67f1a6898 Author: Chris Diamand Date: Thu Jan 12 14:57:41 2017 +0000 PM / devfreq: Don't delete sysfs group twice The 'userspace' governor adds a sysfs entry, which is removed when the governor is changed, or the devfreq device is released. However, when the latter occurs via device_unregister(), device_del() is called first, which removes the sysfs entries recursively and deletes the kobject. This means we get an Oops when the governor calls sysfs_remove_group() on the deleted kobject. Fix this by only doing the call when kobj *hasn't* been kobject_del()'d. Note that we can't just remove the call to sysfs_remove_group() entirely - it's needed for when the governor is changed to one which doesn't need a sysfs entry. Signed-off-by: Chris Diamand Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/governor_userspace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 92f3e6ebf6e43fdd5e2f044fc26d973f341b7ef0 Author: Jean Delvare Date: Mon Jan 30 09:52:01 2017 +0100 firmware: arm_scpi: Add hardware dependencies With a name like that, I assume that the ARM SCPI protocol is only useful on the ARM architectures. Signed-off-by: Jean Delvare Acked-by: Sudeep Holla Cc: Jon Medhurst (Tixy) Signed-off-by: Olof Johansson drivers/firmware/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ca6f848694b0a81a73c03ec7ee8c5a99a886514f Merge: 84b4e9f 7547162 Author: Olof Johansson Date: Mon Jan 30 21:07:34 2017 -0800 Merge tag 'samsung-dt64-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Samsung DeviceTree ARM64 update for v4.11, second round: 1. Use proper drive strengths on Exynos7. 2. Fix significant current leak on Exynos5433-based TM2/TM2E due to disabled regulator. 3. Add touchkey to TM2, set display clocks for Ultra HD modes. 4. Cleanups and minor fixes for Exynos5433, TM2 and TM2E. * tag 'samsung-dt64-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add clocks to Exynos5433 LPASS module arm64: dts: exynos: set LDO7 regulator as always on arm64: dts: exynos: configure TV path clocks for Ultra HD modes arm64: dts: exynos: Fix drive strength of sd0_xxx pin definitions arm64: dts: exynos: Disable pull down for audio pins in Exynos5433 SoCs arm64: dts: exynos: Add TM2 touchkey node arm64: dts: exynos: Remove unneeded unit names in Exynos5433 nodes Signed-off-by: Olof Johansson commit eb02c2a1fa7f01cf68a4465c65527bd1a7d63ac3 Merge: a694eb6 a4e6964 Author: Olof Johansson Date: Mon Jan 30 21:03:25 2017 -0800 Merge tag 'stm32-dt-for-v4.11-1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt STM32 DT updates for v4.11, round 1 Version 2. Highlights: ---------- - ADD RTC support on STM32F429 MCU - Enable RTC on STM32F469and STM32F429 boards - ADD ADC support on STM32F429 MCU - Enable ADC on STM32F429 Eval board - Add I2S external clock - Fix memory size for STM32F429 Disco * tag 'stm32-dt-for-v4.11-1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: enable RTC on stm32429i-eval ARM: dts: stm32: enable RTC on stm32f469-disco ARM: dts: stm32: enable RTC on stm32f429-disco ARM: dts: stm32: Add RTC support for STM32F429 MCU ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f429 ARM: dts: stm32: Include auxiliary stm32fx clock definition ARM: dts: stm32: Add external I2S clock on stm32f429 MCU ARM: dts: stm32: enable ADC on stm32f429i-eval board ARM: dts: stm32: Add ADC support to stm32f429 ARM: dts: stm32: Add missing USART3 pin config to stm32f469-disco board ARM: dts: stm32: Fix memory size from 8MB to 16MB on stm32f469-disco board clk: stm32f4: Update DT bindings documentation Signed-off-by: Olof Johansson commit 77d65d6f3d60cebb2dc24cf05408255a21bb6409 Author: Boris Brezillon Date: Fri Jan 27 17:42:01 2017 +0100 dmaengine: Provide a wrapper for memcpy operations Almost all ->device_prep_dma_xx() methods have a wrapper defined in dmaengine.h. Add one for ->device_prep_dma_memcpy(). Signed-off-by: Boris Brezillon Signed-off-by: Vinod Koul include/linux/dmaengine.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1bae6c99decf9137069646b593d3439171a8a8e2 Merge: 63c1904 2b2d3eb Author: David S. Miller Date: Mon Jan 30 22:05:52 2017 -0500 Merge branch 'sh_eth-E-DMAC-interrupt-mask-cleanups' Sergei Shtylyov says: ==================== sh_eth: E-DMAC interrupt mask cleanups Here's a set of 3 patches against DaveM's 'net-next.git' repo. The main goal of this set is to stop using the bare numbers for the E-DMAC interrupt masks. [1/3] sh_eth: rename EESIPR bits [2/3] sh_eth: add missing EESIPR bits [3/3] sh_eth: stop using bare numbers for EESIPR values ==================== Signed-off-by: David S. Miller commit 2b2d3eb41c920b47df2fcedd1489cf748bd09466 Author: Sergei Shtylyov Date: Sun Jan 29 15:13:48 2017 +0300 sh_eth: stop using bare numbers for EESIPR values Now that we have almost all EESIPR bits declared (and those that are still not are most probably reserved anyway) we can at last replace the bare numbers used for 'sh_eth_cpu_data::eesipr_value' initializers with the bit names ORed together... Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 91 ++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 11 deletions(-) commit 00300b2aac27556e2829cfd047b787af0f13b081 Author: Sergei Shtylyov Date: Sun Jan 29 15:08:09 2017 +0300 sh_eth: add missing EESIPR bits Renesas SH77{34|63} manuals describe more EESIPR bits than the current driver. Declare the new bits with the end goal of using the bit names instead of the bare numbers for the 'sh_eth_cpu_data::eesipr_value' initializers... Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1a0bee6c1e788218fd1d141db320db970aace7f0 Author: Sergei Shtylyov Date: Sun Jan 29 15:07:34 2017 +0300 sh_eth: rename EESIPR bits Since the commit b0ca2a21f769 ("sh_eth: Add support of SH7763 to sh_eth") the *enum* declaring the EESIPR bits (interrupt mask) went out of sync with the *enum* declaring the EESR bits (interrupt status) WRT bit naming and formatting. I'd like to restore the consistency by using EESIPR as the bit name prefix, renaming the *enum* to EESIPR_BIT, and (finally) renaming the bits according to the available Renesas SH77{34|63} manuals; additionally, reconstruct couple names using the EESR bit declaration above... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 22 ++++++++++----------- drivers/net/ethernet/renesas/sh_eth.h | 36 ++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 24 deletions(-) commit 0d0a4bc2a6f7de19cb0256a55891955961d70b1c Author: Reza Arbab Date: Mon Jan 16 13:07:46 2017 -0600 powerpc/mm: unstub radix__vmemmap_remove_mapping() Use remove_pagetable() and friends for radix vmemmap removal. We do not require the special-case handling of vmemmap done in the x86 versions of these functions. This is because vmemmap_free() has already freed the mapped pages, and calls us with an aligned address range. So, add a few failsafe WARNs, but otherwise the code to remove physical mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 4b5d62ca17a1cd2ffc8399e1d1c3ebbabf16e78f Author: Reza Arbab Date: Mon Jan 16 13:07:45 2017 -0600 powerpc/mm: add radix__remove_section_mapping() Tear down and free the four-level page tables of physical mappings during memory hotremove. Borrow the basic structure of remove_pagetable() and friends from the identically-named x86 functions. Reduce the frequency of tlb flushes and page_table_lock spinlocks by only doing them in the outermost function. There was some question as to whether the locking is needed at all. Leave it for now, but we could consider dropping it. Memory must be offline to be removed, thus not in use. So there shouldn't be the sort of concurrent page walking activity here that might prompt us to use RCU. Signed-off-by: Reza Arbab Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c | 133 +++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 1 deletion(-) commit 6cc27341b21a81052f36c137bc44cf55f83e46ff Author: Reza Arbab Date: Mon Jan 16 13:07:44 2017 -0600 powerpc/mm: add radix__create_section_mapping() Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 4 ++++ arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) commit b5200ec9edf038459619fce9988842efa751a2c5 Author: Reza Arbab Date: Mon Jan 16 13:07:43 2017 -0600 powerpc/mm: refactor radix physical page mapping Move the page mapping code in radix_init_pgtable() into a separate function that will also be used for memory hotplug. The current goto loop progressively decreases its mapping size as it covers the tail of a range whose end is unaligned. Change this to a for loop which can do the same for both ends of the range. Signed-off-by: Reza Arbab Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 88 +++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 38 deletions(-) commit 023b13a50183d9cfc4fc5a66cb1f773ace22024c Author: Benjamin Herrenschmidt Date: Mon Jan 30 18:11:57 2017 +1100 powerpc/powernv: Add support for direct mapped LPC on POWER9 Use the new non-PCI ISA bridge support to expose the POWER9 LPC bus as direct mapped via the ISA IO port range. This enables direct access via drivers such as 8250 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/legacy_serial.c | 3 ++- arch/powerpc/platforms/powernv/opal-lpc.c | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) commit b3c711a9e19eb2b300132f1712ff3d5afb4b02dc Author: Benjamin Herrenschmidt Date: Mon Jan 30 18:11:56 2017 +1100 powerpc: Add support for non-PCI ISA bridges The POWER9 chip supports an LPC bus that isn't hanging off a PCI bus, so let's add support for that, mapping it to the reserved space at ISA_IO_BASE Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/isa-bridge.h | 1 + arch/powerpc/kernel/isa-bridge.c | 91 +++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit 38e9d36bc149932964dcd25818c7f7283239592d Author: Benjamin Herrenschmidt Date: Mon Jan 30 18:11:55 2017 +1100 powerpc: Move isa bridge definitions to separate include We'll be adding non-PCI isa bridge support so let's not have all the definition in pci-bridge.h Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/isa-bridge.h | 28 ++++++++++++++++++++++++++++ arch/powerpc/include/asm/pci-bridge.h | 18 ------------------ arch/powerpc/kernel/iomap.c | 1 + arch/powerpc/kernel/isa-bridge.c | 1 + arch/powerpc/platforms/maple/pci.c | 1 + arch/powerpc/platforms/powernv/opal-lpc.c | 1 + arch/powerpc/platforms/pseries/setup.c | 1 + 7 files changed, 33 insertions(+), 18 deletions(-) commit 7598d167df99ddadb7f7bd803d1413af740f3617 Author: Joe Lawrence Date: Thu Jan 12 11:57:44 2017 -0500 livepatch/module: print notice of TAINT_LIVEPATCH Add back the "tainting kernel with TAINT_LIVEPATCH" kernel log message that commit 2992ef29ae01 ("livepatch/module: make TAINT_LIVEPATCH module-specific") dropped. Now that it's a module-specific taint flag, include the module name. Signed-off-by: Joe Lawrence Acked-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal Signed-off-by: Jessica Yu kernel/module.c | 2 ++ 1 file changed, 2 insertions(+) commit 1dbba0863468f509f3fccb498b34f1b1e24356d9 Author: Eric Sandeen Date: Fri Jan 27 23:24:28 2017 -0800 xfs: remove unused full argument from bmap The "full" argument was used only by the fiemap formatter, which is now gone with the iomap updates. Remove the unused arg. Signed-off-by: Eric Sandeen Reviewed-by: Alex Elder Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 6 ++---- fs/xfs/xfs_bmap_util.h | 2 +- fs/xfs/xfs_ioctl.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) commit e4229d6b0bc9280f29624faf170cf76a9f1ca60e Author: Brian Foster Date: Fri Jan 27 23:22:57 2017 -0800 xfs: fix eofblocks race with file extending async dio writes It's possible for post-eof blocks to end up being used for direct I/O writes. dio write performs an upfront unwritten extent allocation, sends the dio and then updates the inode size (if necessary) on write completion. If a file release occurs while a file extending dio write is in flight, it is possible to mistake the post-eof blocks for speculative preallocation and incorrectly truncate them from the inode. This means that the resulting dio write completion can discover a hole and allocate new blocks rather than perform unwritten extent conversion. This requires a strange mix of I/O and is thus not likely to reproduce in real world workloads. It is intermittently reproduced by generic/299. The error manifests as an assert failure due to transaction overrun because the aforementioned write completion transaction has only reserved enough blocks for btree operations: XFS: Assertion failed: tp->t_blk_res_used <= tp->t_blk_res, \ file: fs/xfs//xfs_trans.c, line: 309 The root cause is that xfs_free_eofblocks() uses i_size to truncate post-eof blocks from the inode, but async, file extending direct writes do not update i_size until write completion, long after inode locks are dropped. Therefore, xfs_free_eofblocks() effectively truncates the inode to the incorrect size. Update xfs_free_eofblocks() to serialize against dio similar to how extending writes are serialized against i_size updates before post-eof block zeroing. Specifically, wait on dio while under the iolock. This ensures that dio write completions have updated i_size before post-eof blocks are processed. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 3 +++ 1 file changed, 3 insertions(+) commit c3155097ad89a956579bc305856a1f2878494e52 Author: Brian Foster Date: Fri Jan 27 23:22:56 2017 -0800 xfs: sync eofblocks scans under iolock are livelock prone The xfs_eofblocks.eof_scan_owner field is an internal field to facilitate invoking eofb scans from the kernel while under the iolock. This is necessary because the eofb scan acquires the iolock of each inode. Synchronous scans are invoked on certain buffered write failures while under iolock. In such cases, the scan owner indicates that the context for the scan already owns the particular iolock and prevents a double lock deadlock. eofblocks scans while under iolock are still livelock prone in the event of multiple parallel scans, however. If multiple buffered writes to different inodes fail and invoke eofblocks scans at the same time, each scan avoids a deadlock with its own inode by virtue of the eof_scan_owner field, but will never be able to acquire the iolock of the inode from the parallel scan. Because the low free space scans are invoked with SYNC_WAIT, the scan will not return until it has processed every tagged inode and thus both scans will spin indefinitely on the iolock being held across the opposite scan. This problem can be reproduced reliably by generic/224 on systems with higher cpu counts (x16). To avoid this problem, simplify the semantics of eofblocks scans to never invoke a scan while under iolock. This means that the buffered write context must drop the iolock before the scan. It must reacquire the lock before the write retry and also repeat the initial write checks, as the original state might no longer be valid once the iolock was dropped. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 13 +++++++++---- fs/xfs/xfs_icache.c | 45 +++++++-------------------------------------- fs/xfs/xfs_icache.h | 2 -- 3 files changed, 16 insertions(+), 44 deletions(-) commit a36b926180cda375ac2ec89e1748b47137cfc51c Author: Brian Foster Date: Fri Jan 27 23:22:55 2017 -0800 xfs: pull up iolock from xfs_free_eofblocks() xfs_free_eofblocks() requires the IOLOCK_EXCL lock, but is called from different contexts where the lock may or may not be held. The need_iolock parameter exists for this reason, to indicate whether xfs_free_eofblocks() must acquire the iolock itself before it can proceed. This is ugly and confusing. Simplify the semantics of xfs_free_eofblocks() to require the caller to acquire the iolock appropriately and kill the need_iolock parameter. While here, the mp param can be removed as well as the xfs_mount is accessible from the xfs_inode structure. This patch does not change behavior. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 41 ++++++++++++++++------------------------ fs/xfs/xfs_bmap_util.h | 3 +-- fs/xfs/xfs_icache.c | 24 +++++++++++++++--------- fs/xfs/xfs_inode.c | 51 +++++++++++++++++++++++++++----------------------- 4 files changed, 60 insertions(+), 59 deletions(-) commit 64f61ab6040c9f04ba181cca7580212f23b89f74 Author: Eric Sandeen Date: Fri Jan 27 23:21:08 2017 -0800 xfs: remove unused struct declarations After scratching my head looking for "xfs_busy_extent" I realized it's not used; it's xfs_extent_busy, and the declaration for the other name is bogus. Remove that and a few others as well. (struct xfs_log_callback is used, but the 2nd declaration is unnecessary). Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_log_recover.h | 1 - fs/xfs/xfs_log.h | 1 - fs/xfs/xfs_trace.h | 1 - fs/xfs/xfs_trans.h | 1 - 4 files changed, 4 deletions(-) commit 8ff6daa17b6a64e59bbabaa116b9bd854fa4da1f Author: Christoph Hellwig Date: Fri Jan 27 23:20:26 2017 -0800 iomap: constify struct iomap_ops Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/dax.c | 6 +++--- fs/ext2/ext2.h | 2 +- fs/ext2/inode.c | 4 ++-- fs/ext4/ext4.h | 2 +- fs/ext4/inode.c | 2 +- fs/internal.h | 2 +- fs/iomap.c | 18 +++++++++--------- fs/xfs/xfs_iomap.c | 4 ++-- fs/xfs/xfs_iomap.h | 4 ++-- include/linux/dax.h | 8 ++++---- include/linux/iomap.h | 14 +++++++------- 11 files changed, 33 insertions(+), 33 deletions(-) commit b6f41e448277ff080fea734b93121e6cd7513f0c Author: Eric Sandeen Date: Fri Jan 27 23:16:39 2017 -0800 xfs: remove boilerplate around xfs_btree_init_block Now that xfs_btree_init_block_int is able to determine crc status from the passed-in mp, we can determine the proper magic as well if we are given a btree number, rather than an explicit magic value. Change xfs_btree_init_block[_int] callers to pass in the btree number, and let xfs_btree_init_block_int use the xfs_magics array via the xfs_btree_magic macro to determine which magic value is needed. This makes all of the if (crc) / else stanzas identical, and the if/else can be removed, leading to a single, common init_block call. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 19 ++++--------------- fs/xfs/libxfs/xfs_bmap_btree.c | 10 ++-------- fs/xfs/libxfs/xfs_btree.c | 11 +++++------ fs/xfs/libxfs/xfs_btree.h | 4 ++-- fs/xfs/xfs_fsops.c | 31 ++++++------------------------- 5 files changed, 19 insertions(+), 56 deletions(-) commit af7d20fd83d9e2b3111a847e4220bf943e2d531c Author: Eric Sandeen Date: Fri Jan 27 23:16:38 2017 -0800 xfs: make xfs_btree_magic more generic Right now the xfs_btree_magic() define takes only a cursor; change this to take crc and btnum args to make it more generically useful, and move to a function. This will allow xfs_btree_init_block_int callers which don't have a cursor to make use of the xfs_magics array, which will happen in the next patch. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.c | 34 ++++++++++++++++++++++++++-------- fs/xfs/libxfs/xfs_btree.h | 2 ++ 2 files changed, 28 insertions(+), 8 deletions(-) commit f88ae46b09e93ef07ac9efaf85df62adb5ba58e6 Author: Eric Sandeen Date: Fri Jan 27 23:16:37 2017 -0800 xfs: glean crc status from mp not flags in xfs_btree_init_block_int xfs_btree_init_block_int() can determine whether crcs are in effect without the passed-in XFS_BTREE_CRC_BLOCKS flag; the mp argument allows us to determine this from the superblock. Remove the flag from callers, and use xfs_sb_version_hascrc(&mp->m_sb) internally instead. This removes one difference between the if & else cases in the callers. Signed-off-by: Eric Sandeen 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_bmap_btree.c | 2 +- fs/xfs/libxfs/xfs_btree.c | 6 ++++-- fs/xfs/xfs_fsops.c | 14 ++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) commit 1ded56df3247d358390ae6dc09ccee620262ac5f Author: Dan Carpenter Date: Sat Jan 21 07:49:49 2017 +0300 PCI: xgene: Fix double free on init error The "port" variable was allocated with devm_kzalloc() so if we free it with kfree() it will be freed twice. Also I changed it to propogate the error from devm_ioremap_resource() instead of returning -ENOMEM. Fixes: c5d460396100 ("PCI: Add MCFG quirks for X-Gene host controller") Also-posted-by: Shawn Lin Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Acked-by: Tanmay Inamdar drivers/pci/host/pci-xgene.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e41456bfc811f12b5dcda6f2d6849bdff68f6c0a Author: Joonyoung Shim Date: Mon Jan 23 18:13:54 2017 +0900 drm/exynos: g2d: prevent integer overflow in The size computations done in the ioctl function use an integer. If userspace submits a request with req->cmd_nr or req->cmd_buf_nr set to INT_MAX, the integer computations overflow later, leading to potential (kernel) memory corruption. Prevent this issue by enforcing a limit on the number of submitted commands, so that we have enough headroom later for the size computations. Note that this change has no impact on the currently available users in userspace, like e.g. libdrm/exynos. While at it, also make a comment about the size computation more detailed. Signed-off-by: Joonyoung Shim Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 8646dcb8a0def1c1cd4c855e08b17abce0cdc5d1 Author: Dan Carpenter Date: Fri Jan 20 17:54:32 2017 +0100 drm/exynos: fix a timeout loop We were trying to print an error message if we timed out here, but the loop actually ends with "tries" set to UINT_MAX and not zero. Fix this by changing from tries-- to --tries. A for loop would actually be the most natural way to do this. My fix means we only loop 99 times instead of 100 but that's probably ok. Fixes: a696394c5224 ('drm/exynos: mixer: simplify loop in vp_win_reset()') Signed-off-by: Dan Carpenter Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41cbf0fdaa2886241f92f014ae1fd12bd5689af4 Author: Inki Dae Date: Fri Jan 20 12:51:41 2017 +0900 drm/exynos: use atomic helper commit This patch replaces specific atomic commit function with atomic helper commit one. For this, it removes existing atomic commit function and relevant code specific to Exynos DRM and makes atomic helper commit to be used instead. Below are changes for the use of atomic helper commit: - add atomic_commit_tail callback specific to Exynos DRM . default implemention of atomic helper doesn't mesh well with runtime PM so the device driver which supports runtime PM should call drm_atomic_helper_commit_modeset_enables function prior to drm_atomic_helper_commit_planes function call. atomic_commit_tail callback implements this call ordering. - allow plane commit only in case that CRTC device is enabled. . for this, it calls atomic_helper_commit_planes function with DRM_PLANE_COMMIT_ACTIVE_ONLY flag in atomic_commit_tail callback. Signed-off-by: Inki Dae Reviewed-by: Gustavo Padovan drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 +++ drivers/gpu/drm/exynos/exynos_drm_drv.c | 109 ------------------------------- drivers/gpu/drm/exynos/exynos_drm_fb.c | 32 ++++++++- 3 files changed, 39 insertions(+), 110 deletions(-) commit 9db41d43236411d38778eda2b5987f9b65498c48 Author: Inki Dae Date: Tue Jan 17 19:47:26 2017 +0900 drm/exynos: remove unnecessary codes This patch removes exynos_drm_crtc_cancel_page_flip call when drm is closed because at that time, events will be released by drm_events_release function. Changelog v1: - remove exynos_drm_crtc_cancel_page_flip function also because this funtion isn't used anymore. Signed-off-by: Inki Dae Reviewed-by: Andrzej Hajda drivers/gpu/drm/exynos/exynos_drm_crtc.c | 20 -------------------- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 ---- drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 ----- 3 files changed, 29 deletions(-) commit 4e8ba5cc8863562cb948e26f614217a873f34bac Author: Marek Szyprowski Date: Fri Jan 13 09:30:00 2017 +0100 drm/exynos: mic: Add runtime PM support This patch adds runtime support calls to notify device core when MIC device is really in use. Runtime PM is implemented by enabling and disabling clocks like in other Exynos DRM subdrivers. Adding runtime PM support is needed to let power domain with this device to be turned off when display is not used. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 82 ++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 23 deletions(-) commit 328c057ca4def7040872032cd22df5347fa5e956 Author: Daniel Vetter Date: Tue Dec 27 11:49:23 2016 +0100 drm/exynos: Stop using drm_framebuffer_unregister_private This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But exynos is using drm_framebuffer_remove and a free-standing fb, so this is rendundant. Signed-off-by: Daniel Vetter Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cc2b022518b0d3b040a9016dffccd35d47e8bd8f Author: Hoegeun Kwon Date: Thu Jan 5 19:20:07 2017 +0900 drm/exynos: mic: Fix parse_dt function The OF graph is not necessary because the panel is a child of dsi. therefore, the parse_dt function of dsi does not need to check the remote_node connected to the panel. and the whole parse_dt function should be refactored later. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit e87eb57c69003a99b18d43abe58d5850ad19e188 Author: Hoegeun Kwon Date: Thu Jan 5 19:20:06 2017 +0900 drm/exynos: mic: Add mode_set callback function Before applying the patch, used the of_get_videomode function to parse the display-timings in the panel which is the child driver of dsi in the devicetree. this is wrong. So removed the of_get_videomode and fixed to get videomode struct through mode_set callback function. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit a71280722eeba8f1afa51ad6656028dcb96e110b Author: Lucas Stach Date: Fri Jan 20 16:58:37 2017 +0100 PCI: imx6: Remove LTSSM disable workaround This causes CPU hangs when the system is reset by the watchdog, as the GPRs aren't cleared, but the clocks are back to disabled state. If the bootloader uses PCIe, it must take care to bring it down into a safe state, before passing control to the Linux kernel. This is the only way to get a properly operating system at all times and circumstances. Signed-off-by: Lucas Stach Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit cdcb33f9824429a926b971bf041a6cec238f91ff Author: Bjorn Helgaas Date: Fri Jan 13 18:05:12 2017 -0600 PCI: Avoid possible deadlock on pci_lock and p->pi_lock pci_lock is an IRQ-safe spinlock that protects all accesses to PCI configuration space (see PCI_OP_READ() and PCI_OP_WRITE() in pci/access.c). The pci_cfg_access_unlock() path acquires pci_lock, then p->pi_lock (inside wake_up_all()). According to lockdep, there is a possible path involving snbep_uncore_pci_read_counter() that could acquire them in the reverse order: acquiring p->pi_lock, then pci_lock, which could result in a deadlock. Lockdep details are in the bugzilla below. Avoid the possible deadlock by dropping pci_lock before waking up any config access waiters. Link: https://bugzilla.kernel.org/show_bug.cgi?id=192901 Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2099c77d4af7d1582db6d4437014cf18fe62e74b Author: Sarangdhar Joshi Date: Mon Jan 23 17:53:19 2017 -0800 remoteproc: Drop firmware_loading_complete firmware_loading_complete is used to synchronize operations on rproc while asynchronous firmware loading is in progress. However, rproc_boot() no longer waits on firmware_loading_complete. Hence drop this completion variable altogether and handle the race between rproc_del() and rproc_boot() using new state RPROC_DELETED. The request_firmware_nowait() will hold the reference to rproc device by using a get_device()/put_device(), so the rproc struct will remain valid even when we return from rproc_del() before the asynchronous call to rproc_fw_config_virtio() completes. CC: Loic Pallardy CC: Bjorn Andersson Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 22 +++++++++++----------- include/linux/remoteproc.h | 2 -- 2 files changed, 11 insertions(+), 13 deletions(-) commit 608d792192d7136d354bc1b44585c441164dc54e Author: Sarangdhar Joshi Date: Mon Jan 23 17:53:18 2017 -0800 remoteproc: Add RPROC_DELETED state Add new state RPROC_DELETED to handle synchronization between rproc_del() and other operations on rproc. This state represents the rproc device that has been "deleted". CC: Loic Pallardy CC: Bjorn Andersson Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_sysfs.c | 1 + include/linux/remoteproc.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit b003d45b37b2d2c682f279e6fd5a9254b8ddc244 Author: Sarangdhar Joshi Date: Mon Jan 23 17:48:48 2017 -0800 remoteproc: Move rproc_delete_debug_dir() to rproc_del() The "remoteproc{0,1...}" sysfs entries are added in rproc_add() and deleted in rproc_type_release() instead of in rproc_del(). That leaves these lingering entries sticking around after we return from rproc_del(). Move the rproc_delete_debug_dir() to rproc_del() to fix this. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b807421a720ff00bc31774d254f51313f4a7656b Author: Tejun Heo Date: Fri Jan 20 12:06:08 2017 -0500 cgroup: misc cleanups * cgrp_dfl_implicit_ss_mask is ulong instead of u16 unlike other ss_masks. Make it a u16. * Move have_canfork_callback together with other callback ss_masks. Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 63c190429020a9701b42887ac22c28f287f1762f Merge: cdaf25d 1558727 Author: David S. Miller Date: Mon Jan 30 16:50:57 2017 -0500 Merge branch 'ESPRESSObin-ethernet' Gregory CLEMENT says: ==================== dsa: Add support for the ethernet switch on the ESPRESSObin This set of patches adds support for the Marvell Ethernet Topaz switch family (88E6141/88E6341) which is found on the ESPRESSObin. With this series the network is usable on this board. As usual, I rebased the series on the very last net-next/master. In this series there is no temperature support which need some patches form Andrew Lunn. As soon as Andrew Lunn will post the needed patch I will send a patch to enable the temperature support. Changelog: v6 -> v7: - rebased on net-next/master (5b8784aaf29b) - Fixed the wrong age time coeff from 15s to 3.75s. - Remove support for temperature sensor v5 -> v6: - rebased on net-next/master (d140199af510) - Fix the redundant check on mv88e6xxx_6341_family (reported by Julia Lawall) - Add support for the 88E6141 - Move support for temperature sensor in the phy part ==================== Signed-off-by: David S. Miller commit 1558727a1c1b65459cb9ae31f36ace45d56c6767 Author: Gregory CLEMENT Date: Mon Jan 30 20:29:35 2017 +0100 net: dsa: mv88e6xxx: Add support for ethernet switch 88E6141 The Marvell 88E6341 device is single-chip, 6-port Ethernet switch with four integrated 10/100/1000Mbps Ethernet transceivers and one high speed SerDes interfaces. It belongs to the Topaz family and unlike the 88E6341 it does not have a TCAM. Signed-off-by: Gregory CLEMENT Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 42 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 ++ 2 files changed, 44 insertions(+) commit a75961d0ebfd8866e03855bfdbb5733a268b0a44 Author: Gregory CLEMENT Date: Mon Jan 30 20:29:34 2017 +0100 net: dsa: mv88e6xxx: Add support for ethernet switch 88E6341 The Marvell 88E6341 device is single-chip, 6-port Ethernet switch with four integrated 10/100/1000Mbps Ethernet transceivers and one high speed SerDes interfaces. It is partially compatible with switches of family 88E6352 and switches of family 88E6390. This commit adds an initial support for this switch by describing its capabilities to the driver and introducing a new family. Signed-off-by: Gregory CLEMENT Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 54 +++++++++++++++++++++++++++++++++-- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 19 +++++++++++- 2 files changed, 69 insertions(+), 4 deletions(-) commit 891daf49b0f6e900af6bde51e2dc2cbc72b83f4e Author: Romain Perier Date: Mon Jan 30 20:29:33 2017 +0100 net: dsa: mv88e6xxx: Don't forbid MDIO I/Os for PHY addr >= num_of_ports Some Marvell ethernet switches have internal ethernet transceivers with hardcoded phy addresses. These addresses can be greater than the number of ports or its value might be different than the associated port number. This is for example the case for MV88E6341 that has 6 ports and internal Port 1 to Port4 PHYs mapped at SMI addresses from 0x11 to 0x14. This commits fixes the issue by removing the condition in MDIO callbacks. Signed-off-by: Romain Perier Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 6 ------ 1 file changed, 6 deletions(-) commit 90a068ed3fc93e088d8a216826e33b0c14edec59 Author: Avaneesh Kumar Dwivedi Date: Mon Jan 30 20:33:08 2017 +0530 remoteproc: qcom: Add SLPI rproc support to load and boot slpi proc. This patch add slpi remoteproc support in existing adsp rproc driver. Signed-off-by: Avaneesh Kumar Dwivedi [bjorn: documented aggre2 and px-supply] Signed-off-by: Bjorn Andersson .../devicetree/bindings/remoteproc/qcom,adsp.txt | 41 ++++++++++++++++++++-- drivers/remoteproc/qcom_adsp_pil.c | 10 +++++- 2 files changed, 47 insertions(+), 4 deletions(-) commit cdaf25dfc058ee6f7a7b2e2353de00fa288c0cd4 Author: Dan Carpenter Date: Mon Jan 30 10:55:04 2017 +0100 smc: some potential use after free bugs Say we got really unlucky and these failed on the last iteration, then it could lead to a use after free bug. Fixes: cd6851f30386 ("smc: remote memory buffers (RMBs)") Signed-off-by: Dan Carpenter Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit e323fc030c458d2f3eb1b9031cb4334ebf9a3484 Author: Avaneesh Kumar Dwivedi Date: Mon Jan 30 20:33:07 2017 +0530 remoteproc: qcom: Add additional agree2_clk and px regulator resource. This patch add additional clock and regulator resource which are initialized based on compatible and has no impact on existing driver working. This resourse addition enable the existing driver to handle. low pass sensor processor device also. Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 43 +++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) commit b48ff52043f489d594b989b318c120ca340a2e41 Author: Gautham R. Shenoy Date: Wed Jan 25 14:06:29 2017 +0530 Documentation:powerpc: Add device-tree bindings for power-mgt Document the device-tree bindings defining the the properties under the @power-mgt node in the device tree that describe the idle states for Linux running on baremetal POWER servers. These bindings are documented separately instead of using the the common idle state bindings since the idle-states on POWER servers are exposed as property arrays where as the common idle state bindings expect idle-states to be described as nodes. Acked-by: Rob Herring Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman .../devicetree/bindings/powerpc/opal/power-mgt.txt | 118 +++++++++++++++++++++ 1 file changed, 118 insertions(+) commit 09206b600c76f20984e80d99f3b5343c79332a97 Author: Gautham R. Shenoy Date: Wed Jan 25 14:06:28 2017 +0530 powernv: Pass PSSCR value and mask to power9_idle_stop The power9_idle_stop method currently takes only the requested stop level as a parameter and picks up the rest of the PSSCR bits from a hand-coded macro. This is not a very flexible design, especially when the firmware has the capability to communicate the psscr value and the mask associated with a particular stop state via device tree. This patch modifies the power9_idle_stop API to take as parameters the PSSCR value and the PSSCR mask corresponding to the stop state that needs to be set. These PSSCR value and mask are respectively obtained by parsing the "ibm,cpu-idle-state-psscr" and "ibm,cpu-idle-state-psscr-mask" fields from the device tree. In addition to this, the patch adds support for handling stop states for which ESL and EC bits in the PSSCR are zero. As per the architecture, a wakeup from these stop states resumes execution from the subsequent instruction as opposed to waking up at the System Vector. The older firmware sets only the Requested Level (RL) field in the psscr and psscr-mask exposed in the device tree. For older firmware where psscr-mask=0xf, this patch will set the default sane values that the set for for remaining PSSCR fields (i.e PSLL, MTL, ESL, EC, and TR). For the new firmware, the patch will validate that the invariants required by the ISA for the psscr values are maintained by the firmware. This skiboot patch that exports fully populated PSSCR values and the mask for all the stop states can be found here: https://lists.ozlabs.org/pipermail/skiboot/2016-September/004869.html [Optimize the number of instructions before entering STOP with ESL=EC=0, validate the PSSCR values provided by the firimware maintains the invariants required as per the ISA suggested by Balbir Singh] Acked-by: Balbir Singh Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 44 ++++++++++ arch/powerpc/include/asm/processor.h | 3 +- arch/powerpc/kernel/idle_book3s.S | 30 ++++--- arch/powerpc/platforms/powernv/idle.c | 138 ++++++++++++++++++++++++++++--- arch/powerpc/platforms/powernv/powernv.h | 3 +- arch/powerpc/platforms/powernv/smp.c | 14 ++-- drivers/cpuidle/cpuidle-powernv.c | 52 +++++++++--- 7 files changed, 241 insertions(+), 43 deletions(-) commit 9e9fc6f00a54f7064dc681ac187be6498d566a4f Author: Gautham R. Shenoy Date: Wed Jan 25 14:06:27 2017 +0530 cpuidle:powernv: Add helper function to populate powernv idle states. In the current code for powernv_add_idle_states, there is a lot of code duplication while initializing an idle state in powernv_states table. Add an inline helper function to populate the powernv_states[] table for a given idle state. Invoke this for populating the "Nap", "Fastsleep" and the stop states in powernv_add_idle_states. Signed-off-by: Gautham R. Shenoy Acked-by: Balbir Singh Acked-by: Rafael J. Wysocki Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 89 +++++++++++++++++++++++---------------- include/linux/cpuidle.h | 1 + 2 files changed, 54 insertions(+), 36 deletions(-) commit dd34c74c97b6c3ed1ac7caec0b46267142659aff Author: Gautham R. Shenoy Date: Wed Jan 25 14:06:26 2017 +0530 powernv:stop: Rename pnv_arch300_idle_init to pnv_power9_idle_init Balbir pointed out that the name of the function pnv_arch300_idle_init was inconsistent with the names of the variables and functions pertaining to POWER9 features in book3s_idle.S. This patch renames pnv_arch300_idle_init to pnv_power9_idle_init. This patch does not change any behaviour. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 823b7bd5156a93872d9561b3f033dfe5cb80204e Author: Gautham R. Shenoy Date: Wed Jan 25 14:06:25 2017 +0530 powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Currently all the low-power idle states are expected to wake up at reset vector 0x100. Which is why the macro IDLE_STATE_ENTER_SEQ that puts the CPU to an idle state and never returns. On ISA v3.0, when the ESL and EC bits in the PSSCR are zero, the CPU is expected to wake up at the next instruction of the idle instruction. This patch adds a new macro named IDLE_STATE_ENTER_SEQ_NORET for the no-return variant and reuses the name IDLE_STATE_ENTER_SEQ for a variant that allows resuming operation at the instruction next to the idle-instruction. Acked-by: Balbir Singh Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 5 ++++- arch/powerpc/kernel/exceptions-64s.S | 6 +++--- arch/powerpc/kernel/idle_book3s.S | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) commit c7715e47bf6dc4c52297cde7b7aedc4530937dc5 Author: Avaneesh Kumar Dwivedi Date: Mon Jan 30 20:33:06 2017 +0530 remoteproc: qcom: Compatible string based resource initialization. This patch initialize certain driver related data based on compatible string. This enable driver to handle more than one similar device in by differentiating in probe their private data. Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 47 ++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) commit 0abd6bdde04f3f7e9a1b76d474f3d9e804ef1867 Author: Dan Carpenter Date: Sat Jan 21 07:53:40 2017 +0300 rpmsg: unlock on error in rpmsg_eptdev_read() We should unlock before returning if skb_dequeue() returns a NULL. Fixes: c0cdc19f84a4 ("rpmsg: Driver for user space endpoint interface") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_char.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1930b60352e7e195f55b27cde15d2a8f43342a8b Merge: 4be9993 ec960de Author: David S. Miller Date: Mon Jan 30 15:55:48 2017 -0500 Merge branch 'dsa-port-mirroring' Florian Fainelli says: ==================== net: dsa: Port mirroring support This patch series adds support for port mirroring in the two Broadcom switch drivers. The major part of the functional are actually with the plumbing between tc and the drivers. Changes in v5: - Added Jiri's Reviewed-by tag to first patch - rebase against latest net-next/master after bcm_sf2 CFP series Changes in v4: - rebased against latest net-next/master after Vivien's changes Changes in v3: - removed multiline comments from added structures - simplify error handling in dsa_slave_add_cls_matchall Changes in v2: - fixed filter removal logic to disable the ingress or egress mirroring when there are no longer ports being monitored in ingress or egress - removed a stray list_head in dsa_port structure that is not used Tested using the two iproute2 examples: tc qdisc add dev eth1 handle ffff: ingress tc filter add dev eth1 parent ffff: \ matchall skip_sw \ action mirred egress mirror \ dev eth2 tc qdisc add dev eth1 handle 1: root prio tc filter add dev eth1 parent 1: \ matchall skip_sw \ action mirred egress mirror \ dev eth2 ==================== Signed-off-by: David S. Miller commit ec960de61503ef349588dccfa3ae02efabcc2762 Author: Florian Fainelli Date: Mon Jan 30 12:41:43 2017 -0800 net: dsa: bcm_sf2: Add support for port mirroring We can use b53_mirror_add and b53_mirror_del because the Starfighter 2 is register compatible in that specific case. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 2 ++ 1 file changed, 2 insertions(+) commit ed3af5fd08ebe3b39cdd37ec2a473ef98e05ce39 Author: Florian Fainelli Date: Mon Jan 30 12:41:42 2017 -0800 net: dsa: b53: Add support for port mirroring Add support for configuring port mirroring through the cls_matchall classifier. We do a full ingress or egress capture towards the capture port. Future improvements could include leveraging the divider to allow less frames to be captured, as well as matching specific MAC DA/SA. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 67 ++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/b53/b53_priv.h | 4 +++ 2 files changed, 71 insertions(+) commit 151da0171e12607b987d9a028a046104358b7f0d Author: Florian Fainelli Date: Mon Jan 30 12:41:41 2017 -0800 net: dsa: b53: Add mirror capture register definitions Add definitions for the different Roboswitch registers relevant for ingress and egress mirroring. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_regs.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit f50f212749e8a28803af3628acbeb85ee0458ed5 Author: Florian Fainelli Date: Mon Jan 30 12:41:40 2017 -0800 net: dsa: Add plumbing for port mirroring Add necessary plumbing at the slave network device level to have switch drivers implement ndo_setup_tc() and most particularly the cls_matchall classifier. We add support for two switch operations: port_add_mirror and port_del_mirror() which configure, on a per-port basis the mirror parameters requested from the cls_matchall classifier. Code is largely borrowed from the Mellanox Spectrum switch driver. Reviewed-by: Jiri Pirko Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 33 +++++++++++++ net/dsa/dsa_priv.h | 3 ++ net/dsa/slave.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 172 insertions(+), 1 deletion(-) commit 0b351c986a5ffedb502632c1b27690c9730d79c4 Author: Arnd Bergmann Date: Fri Jan 20 17:24:30 2017 +0100 PCI: rockchip: Mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get harmless build warnings: host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq' defined but not used [-Werror=unused-function] host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq' defined but not used [-Werror=unused-function] Marking both functions as __maybe_unused avoids the warning without the need for #ifdef around them. Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7faebda21d573a6889bab1e0100ed4092a5a4716 Author: Shawn Lin Date: Wed Jan 18 16:29:15 2017 +0800 PCI: rockchip: Use readl_poll_timeout() instead of open-coding it Use readl_poll_timeout() instead of open-coding it. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 52 +++++++++++++--------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit 87ac0c24bd8ee970be14173d15bf2872e5f39d71 Author: Lars-Peter Clausen Date: Mon Jan 30 11:18:25 2017 +0100 iio: tmp007: Fix `name` attribute ABI The IIO ABI specifies the name field of the IIO device as: Description of the physical chip / device for device X. Typically a part number. The tmp007 driver currently uses the name of the parent device instead. Change this to the part name to be in accordance with the ABI. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/temperature/tmp007.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4be9993493bc7ee3fdf950a83bc050a3e6cf2a45 Merge: 30357d7 1f8176f Author: David S. Miller Date: Mon Jan 30 15:26:44 2017 -0500 Merge branch 'mlx4-misc-improvements' Tariq Toukan says: ==================== mlx4 misc improvements This patchset contains several improvements and cleanups from the team to the mlx4 Eth and core drivers. Series generated against net-next commit: 4e8f2fc1a55d Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Thanks, Tariq. v3: * Patch 6/9: forgot to actually update the commit message in v2, now it is. v2: * Patch 1/9: used EOPNOTSUPP and not ENOTSUPP. * Patch 3/9: dropped, to be submitted separately in the future. * Patch 6/9: updated commit message. ==================== Signed-off-by: David S. Miller commit 1f8176f7352abfe1a424ac7eb845b4c2e7c31e5f Author: Shaker Daibes Date: Sun Jan 29 18:56:20 2017 +0200 net/mlx4_en: Check the enabling pptx/pprx flags in SET_PORT wrapper flow Make sure pptx/pprx mask flag is set using new fields upon set port request. In addition, move this code into a helper function for better code readability. Signed-off-by: Shaker Daibes Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_port.h | 1 - drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 ++- drivers/net/ethernet/mellanox/mlx4/port.c | 42 ++++++++++++++++++---------- 3 files changed, 31 insertions(+), 16 deletions(-) commit bf1f9396831ca7a4f527a326f1438f1bf85e2239 Author: Shaker Daibes Date: Sun Jan 29 18:56:19 2017 +0200 net/mlx4_en: Check the enabling mtu flag in SET_PORT wrapper flow Make sure MTU mask flag is set using new field upon set port request. In addition, move this code into a helper function for better code readability. Signed-off-by: Shaker Daibes Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/port.c | 59 +++++++++++++++++++------------ 1 file changed, 37 insertions(+), 22 deletions(-) commit 40fb4fc1e18bc641a0d0887ac21943fd194c1fa9 Author: Shaker Daibes Date: Sun Jan 29 18:56:18 2017 +0200 net/mlx4_en: Pass user MTU value to Firmware at set port command When starting the port, driver will inform Firmware about the actual MTU which does not include implicit headers, such as FCS or VLAN tags. Signed-off-by: Shaker Daibes Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 +++ drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 7 ++- drivers/net/ethernet/mellanox/mlx4/port.c | 71 ++++++++++++++++++++++++-- include/linux/mlx4/device.h | 1 + 5 files changed, 82 insertions(+), 7 deletions(-) commit 297e1cf29eac13d3e5bb896d18c64a50b6bb48eb Author: Ariel Levkovich Date: Sun Jan 29 18:56:17 2017 +0200 net/mlx4_en: Adding support of turning off link autonegotiation via ethtool This feature will allow the user to disable auto negotiation on the port for mlx4 devices while setting the speed is limited to 1GbE speeds. Other speeds will not be accepted in autoneg off mode. This functionality is permitted providing that the firmware is compatible with this feature. The above is determined by querying a new dedicated capability bit in the device. Signed-off-by: Ariel Levkovich Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 24 +++++++++++++++++++----- include/linux/mlx4/device.h | 7 ++++++- 2 files changed, 25 insertions(+), 6 deletions(-) commit 4b5e5b7ececc3265092712a4fef140cc6ef0d028 Author: Alaa Hleihel Date: Sun Jan 29 18:56:16 2017 +0200 net/mlx4_core: Get num_tc using netdev_get_num_tc Avoid reading num_tc directly from struct net_device, but use the helper function netdev_get_num_tc. Fixes: bc6a4744b827 ("net/mlx4_en: num cores tx rings for every UP") Fixes: f5b6345ba8da ("net/mlx4_en: User prio mapping gets corrupted when changing number of channels") Signed-off-by: Alaa Hleihel Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ae5a2e29d11eb9c6f0ed0676dc801996a933605b Author: Matan Barak Date: Sun Jan 29 18:56:15 2017 +0200 net/mlx4_core: Add resource alloc/dealloc debugging In order to aid debugging of functions that take a resource but don't put it, add the last function name that successfully grabbed this resource. Signed-off-by: Matan Barak Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx4/resource_tracker.c | 49 ++++++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) commit 38353364015c64cde0ba30564069eb88874aa8ec Author: Yishai Hadas Date: Sun Jan 29 18:56:14 2017 +0200 net/mlx4_core: Device revision support The device revision field returned by the NodeInfo MAD is incorrect on ConnectX3 devices. This patch is driver side handling to complete a FW fix added at 2.11.1172. INIT_HCA - bit at offset 0x0C.12 is set to 1 so that FW will report correct device revision. Older FW versions won't be affected from turning on that bit, no capability bit is needed. Signed-off-by: Yishai Hadas 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 72b8eaab245e66e5789378eb8812f72c8354dda6 Author: Tariq Toukan Date: Sun Jan 29 18:56:13 2017 +0200 net/mlx4: Replace ENOSYS with better fitting error codes Conform the following warning: WARNING: ENOSYS means 'invalid syscall nr' and nothing else. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 30357d7d8aaf2a980ab17c2ce054b2b87e60af88 Author: David Ahern Date: Mon Jan 30 12:07:37 2017 -0800 lwtunnel: remove device arg to lwtunnel_build_state Nothing about lwt state requires a device reference, so remove the input argument. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/lwtunnel.h | 6 +++--- net/core/lwt_bpf.c | 2 +- net/core/lwtunnel.c | 4 ++-- net/ipv4/fib_semantics.c | 27 ++++++++------------------- net/ipv4/ip_tunnel_core.c | 4 ++-- net/ipv6/ila/ila_lwt.c | 2 +- net/ipv6/route.c | 2 +- net/ipv6/seg6_iptunnel.c | 2 +- net/mpls/mpls_iptunnel.c | 2 +- 9 files changed, 20 insertions(+), 31 deletions(-) commit 6ad20165d376fa07919a70e4f43dfae564601829 Author: Eric Dumazet Date: Mon Jan 30 08:22:01 2017 -0800 drivers: net: generalize napi_complete_done() napi_complete_done() allows to opt-in for gro_flush_timeout, added back in linux-3.19, commit 3b47d30396ba ("net: gro: add a per device gro flush timer") This allows for more efficient GRO aggregation without sacrifying latencies. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/can/at91_can.c | 2 +- drivers/net/can/c_can/c_can.c | 2 +- drivers/net/can/flexcan.c | 2 +- drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- drivers/net/can/janz-ican3.c | 2 +- drivers/net/can/m_can/m_can.c | 2 +- drivers/net/can/rcar/rcar_can.c | 2 +- drivers/net/can/rcar/rcar_canfd.c | 2 +- drivers/net/can/xilinx_can.c | 2 +- drivers/net/ethernet/3com/typhoon.c | 2 +- drivers/net/ethernet/adi/bfin_mac.c | 2 +- drivers/net/ethernet/agere/et131x.c | 2 +- drivers/net/ethernet/altera/altera_tse_main.c | 2 +- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 2 +- drivers/net/ethernet/arc/emac_main.c | 2 +- drivers/net/ethernet/atheros/alx/main.c | 2 +- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 2 +- drivers/net/ethernet/atheros/atlx/atl1.c | 2 +- drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- drivers/net/ethernet/broadcom/bgmac.c | 2 +- drivers/net/ethernet/broadcom/bnx2.c | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/sb1250-mac.c | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 2 +- drivers/net/ethernet/cadence/macb.c | 2 +- drivers/net/ethernet/calxeda/xgmac.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +- drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- drivers/net/ethernet/chelsio/cxgb/sge.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/sge.c | 4 ++-- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +- drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++-- drivers/net/ethernet/dec/tulip/interrupt.c | 6 +++--- drivers/net/ethernet/dnet.c | 2 +- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- drivers/net/ethernet/ethoc.c | 2 +- drivers/net/ethernet/ezchip/nps_enet.c | 2 +- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 2 +- drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- drivers/net/ethernet/hisilicon/hisi_femac.c | 2 +- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- drivers/net/ethernet/ibm/ibmveth.c | 2 +- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 +- drivers/net/ethernet/korina.c | 2 +- drivers/net/ethernet/lantiq_etop.c | 21 +++++++++------------ drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 6 ++---- drivers/net/ethernet/marvell/mvpp2.c | 2 +- drivers/net/ethernet/marvell/pxa168_eth.c | 2 +- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +- drivers/net/ethernet/natsemi/natsemi.c | 2 +- drivers/net/ethernet/neterion/s2io.c | 4 ++-- drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 +++--- drivers/net/ethernet/nvidia/forcedeth.c | 2 +- drivers/net/ethernet/nxp/lpc_eth.c | 2 +- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- drivers/net/ethernet/pasemi/pasemi_mac.c | 2 +- .../net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 10 +++++----- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac.c | 2 +- drivers/net/ethernet/realtek/r8169.c | 2 +- drivers/net/ethernet/rocker/rocker_main.c | 2 +- drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 +- drivers/net/ethernet/sfc/efx.c | 2 +- drivers/net/ethernet/sfc/falcon/efx.c | 2 +- drivers/net/ethernet/smsc/smsc9420.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/sun/niu.c | 2 +- drivers/net/ethernet/sun/sungem.c | 2 +- drivers/net/ethernet/sun/sunvnet_common.c | 2 +- drivers/net/ethernet/tehuti/tehuti.c | 2 +- drivers/net/ethernet/ti/cpsw.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 2 +- drivers/net/ethernet/tile/tilegx.c | 2 +- drivers/net/ethernet/tile/tilepro.c | 2 +- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 +- drivers/net/ethernet/toshiba/spider_net.c | 2 +- drivers/net/ethernet/toshiba/tc35815.c | 2 +- drivers/net/ethernet/tundra/tsi108_eth.c | 2 +- drivers/net/ethernet/via/via-rhine.c | 2 +- drivers/net/ethernet/via/via-velocity.c | 2 +- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- drivers/net/fjes/fjes_main.c | 2 +- drivers/net/vmxnet3/vmxnet3_drv.c | 4 ++-- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- drivers/net/wan/hd64572.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/wil6210/netdev.c | 2 +- drivers/net/xen-netback/interface.c | 2 +- drivers/net/xen-netfront.c | 2 +- drivers/staging/octeon/ethernet-rx.c | 2 +- drivers/staging/unisys/visornic/visornic_main.c | 2 +- 109 files changed, 132 insertions(+), 137 deletions(-) commit 6705e1277c21976f74ab3b3870b0f16d7cc78232 Author: William Breathitt Gray Date: Mon Jan 30 08:58:50 2017 -0500 iio: stx104: Remove unneeded struct stx104_dev code The stx104_dev structure was used to hold private data for use in the stx104_remove function. Now that the stx104_remove function is gone, the stx104_dev structure and relevant code is no longer needed. This patch removes the unnecessary code. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 63a6fff353d01da5a22b72670c434bf12fa0e3b8 Author: Robert Shearman Date: Thu Jan 26 18:02:24 2017 +0000 net: Avoid receiving packets with an l3mdev on unbound UDP sockets Packets arriving in a VRF currently are delivered to UDP sockets that aren't bound to any interface. TCP defaults to not delivering packets arriving in a VRF to unbound sockets. IP route lookup and socket transmit both assume that unbound means using the default table and UDP applications that haven't been changed to be aware of VRFs may not function correctly in this case since they may not be able to handle overlapping IP address ranges, or be able to send packets back to the original sender if required. So add a sysctl, udp_l3mdev_accept, to control this behaviour with it being analgous to the existing tcp_l3mdev_accept, namely to allow a process to have a VRF-global listen socket. Have this default to off as this is the behaviour that users will expect, given that there is no explicit mechanism to set unmodified VRF-unaware application into a default VRF. Signed-off-by: Robert Shearman Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 7 +++++++ Documentation/networking/vrf.txt | 7 ++++--- include/net/netns/ipv4.h | 4 ++++ net/ipv4/sysctl_net_ipv4.c | 11 +++++++++++ net/ipv4/udp.c | 27 ++++++++++++++++++++------- net/ipv6/udp.c | 27 ++++++++++++++++++++------- 6 files changed, 66 insertions(+), 17 deletions(-) commit 376e5f5449d11811a8e3f61a4d4b54d68c0fd849 Author: Gustavo Padovan Date: Fri Jan 27 15:54:44 2017 -0200 MAINTAINERS: add dma-fence* files to Sync File maintainership As Sync File is highly dependent on dma-fence* tracks it under SYNC FILE_FRAMEWORK as well. Signed-off-by: Gustavo Padovan Acked-by: Daniel Vetter Acked-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170127175444.7995-1-gustavo@padovan.org MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a3a4de056ed5cfb22085173d8f0f13b0ca6b6d60 Merge: 40be0dd 7318166 Author: David S. Miller Date: Mon Jan 30 14:49:59 2017 -0500 Merge branch 'net-dsa-bcm_sf2-CFP-support' Florian Fainelli says: ==================== net: dsa: bcm_sf2: CFP support This patch series adds support for the Broadcom Compact Field Processor (CFP) which is a classification and matching engine built into most Broadcom switches. We support that using ethtool::rxnfc because it allows all known uses cases from the users I support to work, and more importantly, it allows the selection of a target rule index, which is later used by e.g: offloading hardware, this is an essential feature that I could not find being supported with cls_* for instance. Thanks! Changes in v3: - rebased against latest net-next/master after Vivien's changes Changes in v2: - fixed modular builds reported by kbuild test robot ==================== Signed-off-by: David S. Miller commit 7318166cacad158b46240f66250d7cc5a481653b Author: Florian Fainelli Date: Mon Jan 30 09:48:43 2017 -0800 net: dsa: bcm_sf2: Add support for ethtool::rxnfc Add support for configuring classification rules using the ethtool::rxnfc API. This is useful to program the switch's CFP/TCAM to redirect specific packets to specific ports/queues for instance. For now, we allow any kind of IPv4 5-tuple matching. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Makefile | 1 + drivers/net/dsa/bcm_sf2.c | 14 + drivers/net/dsa/bcm_sf2.h | 17 ++ drivers/net/dsa/bcm_sf2_cfp.c | 613 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 645 insertions(+) commit 853458087ef0e5300fa978dccef40b73d411c6e6 Author: Florian Fainelli Date: Mon Jan 30 09:48:42 2017 -0800 net: dsa: bcm_sf2: Add CFP registers definitions Add Compact Field Processor definitions for the Broadcom Starfighter 2 and compatible versions of the switch. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_regs.h | 146 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) commit e1b9147cbdb84cae017f450b34781f4cfc790095 Author: Florian Fainelli Date: Mon Jan 30 09:48:41 2017 -0800 net: dsa: bcm_sf2: Configure traffic classes to queue mapping By default, all traffic goes to queue 0, re-configure the traffic classes to quality of service mapping such that priority X maps to queue X, where X is from 0 through 7. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 9 +++++++++ drivers/net/dsa/bcm_sf2_regs.h | 4 ++++ 2 files changed, 13 insertions(+) commit bf9f26485d232916cdc2257e42831781e1f075e8 Author: Florian Fainelli Date: Mon Jan 30 09:48:40 2017 -0800 net: dsa: Hook {get,set}_rxnfc ethtool operations In preparation for adding support for CFP/TCAMP in the bcm_sf2 driver add the plumbing to call into driver specific {get,set}_rxnfc operations. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 8 ++++++++ net/dsa/slave.c | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit c0621acf45a9d8c3b501633b5eca11495fff8f66 Author: Ingo Molnar Date: Mon Jan 30 09:11:31 2017 +0100 tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h, {tools/,}arch/x86/include/asm/cpufeatures.h and {tools/,}arch/arm/include/uapi/asm/kvm.h The following upstream headers were updated: - The x86 cpufeatures.h file picked up a couple of new feature entries - The PowerPC and ARM KVM headers picked up new features None of which requires changes to perf tooling, so refresh the tooling copy. Solves these build time warnings: Warning: arch/x86/include/asm/cpufeatures.h differs from kernel Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel Warning: arch/arm/include/uapi/asm/kvm.h differs from kernel Signed-off-by: Ingo Molnar Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170130081131.GA8322@gmail.com [ resync tools/arch/x86/include/asm/cpufeatures.h ] Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 9 +++++++++ tools/arch/powerpc/include/uapi/asm/kvm.h | 5 +++++ tools/arch/x86/include/asm/cpufeatures.h | 11 +++++++++++ 3 files changed, 25 insertions(+) commit 6b6a1867667a90f399762dc1ee6add5b4aa646c9 Author: Neil Armstrong Date: Mon Jan 16 11:22:45 2017 +0100 ARM64: dts: meson-gxbb-p200: add ADC laddered keys Add the 5 buttons connected to a resistor laddered matrix and sampled by the SAR ADC channel 0. Only the p200 board has these buttons, the P201 doesn't. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit bd80ef5ed46233d90f216805ff40aba326ff1bdd Author: Martin Blumenstingl Date: Sun Jan 22 19:17:14 2017 +0100 ARM64: dts: meson: meson-gx: add the SAR ADC Add the SAR ADC to meson-gxbb.dtsi and meson-gxl.dtsi. GXBB provides a 10-bit ADC while GXL and GXM provide a 12-bit ADC. Some boards use resistor ladder buttons connected through one of the ADC channels. On newer devices (GXL and GXM) some boards use pull-ups/downs to change the resistance (and thus the ADC value) on one of the ADC channels to indicate the board revision. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 8 ++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 10 ++++++++++ arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 4 ++++ 4 files changed, 32 insertions(+) commit 68e33bd6bbb79819e5cb7bce26559191b144c465 Author: Wei Yongjun Date: Thu Jan 12 15:39:18 2017 +0000 NFSv4: Fix warning for using 0 as NULL Fixes the following sparse warning: fs/nfs/nfs4state.c:862:60: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e54b9b1b0ace6997aa4f9811af0811b2d8160f2 Author: Wei Yongjun Date: Thu Jan 12 15:38:06 2017 +0000 pNFS/flexfiles: Make local symbol layoutreturn_ops static Fixes the following sparse warning: fs/nfs/flexfilelayout/flexfilelayout.c:2114:34: warning: symbol 'layoutreturn_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 045c551947a8c6e787437d696262b562520ff2f0 Author: Anna Schumaker Date: Wed Jan 11 16:59:48 2017 -0500 NFS: Return the comparison result directly in nfs41_match_stateid() Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 49ad0145c3a81612482ecc064ce6ab908ae3bb1a Author: Anna Schumaker Date: Wed Jan 11 16:51:59 2017 -0500 NFS: Clean up nfs41_same_server_scope() The function is cleaner this way, since we can use the result of memcmp() directly Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 81b68de493a3c60517ef0435d2635b531ed590b9 Author: Anna Schumaker Date: Wed Jan 11 16:41:34 2017 -0500 NFS: No need to set and return status in nfs41_lock_expired() Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9df1336ca42c16622f1cae5dff246a0c9c644514 Author: Anna Schumaker Date: Wed Jan 11 16:30:08 2017 -0500 NFS: Remove unnecessary goto in nfs4_lookup_root_sec() Once again, it's easier and cleaner just to return the error directly. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 334f87dd11b7a0ed8f3d3b223fb5cede201e210a Author: Anna Schumaker Date: Wed Jan 11 16:17:17 2017 -0500 NFS: Remove nfs4_recover_expired_lease() This function doesn't add much, since all it does is access the server's nfs_client variable. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d7e9825848cede4cf7589b63029b76428ae76958 Author: Anna Schumaker Date: Wed Jan 11 16:13:29 2017 -0500 NFS: Remove an extra if in _nfs4_recover_proc_open() It's simpler just to return the status unconditionally Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 37a8484aef09638b9eead7070cb0ee27adb74ceb Author: Anna Schumaker Date: Wed Jan 11 16:08:35 2017 -0500 NFS: Return errors directly in _nfs4_opendata_reclaim_to_nfs4_state() There is no need for a goto just to return an error code without any cleanup. Returning the error directly helps to clean up the code. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 820bf85ce249ec5b4da9f6aaefa3f5491b23b587 Author: Anna Schumaker Date: Wed Jan 11 15:01:43 2017 -0500 NFS: Remove nfs4_wait_for_completion_rpc_task() Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit eeea5361634eeef9a09b7b5ae449b41623c23886 Author: Anna Schumaker Date: Wed Jan 11 16:01:21 2017 -0500 NFS: Clean up _nfs4_is_integrity_protected() We can cut out the if statement and return the results of the comparison directly. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d9b67e1e499b056a83d2db6046d74652cf836998 Author: Anna Schumaker Date: Wed Jan 11 15:04:25 2017 -0500 NFS: Fix inconsistent indentation in nfs4proc.c Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit ad05cc0f04341216923895c05e2c364ef34f1bb4 Author: Anna Schumaker Date: Wed Jan 11 13:37:06 2017 -0500 NFS: Make trace_nfs4_setup_sequence() available to NFS v4.0 This tracepoint displays information about the slot that was chosen for the RPC, in addition to session information. This could be useful information for debugging, and we can set the session id hash to 0 to indicate that there is no session. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 4 +--- fs/nfs/nfs4session.h | 2 ++ fs/nfs/nfs4trace.h | 64 ++++++++++++++++++++++++++-------------------------- 3 files changed, 35 insertions(+), 35 deletions(-) commit 3d35808b1de48e0c478668b3177fcd3360aae543 Author: Anna Schumaker Date: Wed Jan 11 10:54:04 2017 -0500 NFS: Merge the remaining setup_sequence functions This creates a single place for all the work to happen, using the presence of a session to determine if extra values need to be set. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 87 +++++++++++++------------------------------------------ 1 file changed, 20 insertions(+), 67 deletions(-) commit 76ee03540f316948c3bc89fc76ded86c88e887a5 Author: Anna Schumaker Date: Tue Jan 10 16:49:31 2017 -0500 NFS: Check if the slot table is draining from nfs4_setup_sequence() Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 0dcee8bb749e5de43b180ccfcb0c5005aa529c92 Author: Anna Schumaker Date: Tue Jan 10 16:29:54 2017 -0500 NFS: Handle setup sequence task rescheduling in a single place Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 6994cdd798568a0ddb8e0a85e2af24dbe655c341 Author: Anna Schumaker Date: Tue Jan 10 16:13:27 2017 -0500 NFS: Lock the slot table from a single place during setup sequence Rather than implementing this twice for NFS v4.0 and v4.1 Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 9dd9107f330c5d371c62b460975a32d8bd5712b4 Author: Anna Schumaker Date: Tue Jan 10 12:01:46 2017 -0500 NFS: Move slot-already-allocated check into nfs_setup_sequence() This puts the check in a single place, rather than needing to implement it twice for v4.0 and v4.1. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 7981c8a659143173882dda43b3056a777faeeb7b Author: Anna Schumaker Date: Tue Jan 10 11:39:53 2017 -0500 NFS: Create a single nfs4_setup_sequence() function The inline ifdef lets us put everything in a single place, rather than having two (very similar) versions of this function. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 76 +++++++++++++++++++++---------------------------------- 1 file changed, 29 insertions(+), 47 deletions(-) commit 6de7e12f53a154d35d9aceae718b764ada23e430 Author: Anna Schumaker Date: Mon Jan 9 16:51:52 2017 -0500 NFS: Use nfs4_setup_sequence() everywhere This does the right thing depending on if we have a session, rather than needing to handle this manually in multiple places. Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 6 ++--- fs/nfs/flexfilelayout/flexfilelayout.c | 40 ++++++++++------------------------ fs/nfs/nfs42proc.c | 4 ++-- fs/nfs/nfs4_fs.h | 5 +---- fs/nfs/nfs4proc.c | 30 ++++++++++++------------- 5 files changed, 33 insertions(+), 52 deletions(-) commit 42e1cca7e91e1a7502694cfd18857ed243f54174 Author: Anna Schumaker Date: Mon Jan 9 15:48:22 2017 -0500 NFS: Change nfs4_setup_sequence() to take an nfs_client structure I want to have all callers use this function, rather than calling the NFS v4.0 and v4.1 versions directly. This includes pNFS, which only has access to the nfs_client structure in some places. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 172d9de15a0da9b6d52d2bae21a362689d82d35a Author: Anna Schumaker Date: Thu May 14 10:56:10 2015 -0400 NFS: Change nfs4_get_session() to take an nfs_client structure pNFS only has access to the nfs_client structure, and not the nfs_server, so we need to make this change so the function can be used by pNFS as well. Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 5 ++--- fs/nfs/nfs4proc.c | 10 +++++----- fs/nfs/nfs4session.h | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) commit efc6f4aa742d7e8a67e44d11ab18b1c865880b4c Author: Anna Schumaker Date: Mon Jan 9 15:14:33 2017 -0500 NFS: Move nfs4_get_session() into nfs4_session.h This puts session related functions together in the same space. I only keep one version of this function, since this variable will always be NULL when using NFS v4.0. Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs4_fs.h | 10 ---------- fs/nfs/nfs4session.h | 5 +++++ 3 files changed, 6 insertions(+), 10 deletions(-) commit 6f6e3c09c0dde7fbaf36f02ffa97bbb13fecd637 Author: NeilBrown Date: Fri Jan 13 11:04:27 2017 +1100 NFS: tidy up nfs_show_mountd_netid This function is a bit clumsy, incorrectly producing ",mountproto=" if mountd_protocol is 0 and !showdefaults, and duplicating the code for reporting "auto". Tidy it up so that it only makes a single seq_printf() call, and more obviously does the right thing. Fixes: ee671b016fbf ("NFS: convert proto= option to use netids rather than a protoname") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/super.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 4c3ffd058c28bb1aac30a68d1f02de4a2077823e Author: NeilBrown Date: Fri Jan 6 14:19:58 2017 +1100 SUNRPC: two small improvements to rpcauth shrinker. 1/ If we find an entry that is too young to be pruned, return SHRINK_STOP to ensure we don't get called again. This is more correct, and avoids wasting a little CPU time. Prior to 3.12, it can prevent drop_slab() from spinning indefinitely. 2/ Return a precise number from rpcauth_cache_shrink_count(), rather than rounding down to a multiple of 100 (of whatever sysctl_vfs_cache_pressure is). This ensures that when we "echo 3 > /proc/sys/vm/drop_caches", this cache is still purged, even if it has fewer than 100 entires. Neither of these are really important, they just make behaviour more predicatable, which can be helpful when debugging related issues. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker net/sunrpc/auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ddeaa6379d50a530f9f57b3d12f7940e079b052c Author: Joe Perches Date: Sat Oct 15 13:59:03 2016 -0700 sunrpc & nfs: Add and use dprintk_cont macros Allow line continuations to work properly with KERN_CONT. Signed-off-by: Joe Perches [Anna: Add fallback dprintk_cont() for when CONFIG_SUNRPC_DEBUG=n] Signed-off-by: Anna Schumaker fs/nfs/write.c | 6 ++--- include/linux/sunrpc/debug.h | 58 ++++++++++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 21 deletions(-) commit a052af2a548decf1da5cccf9e777aa02321e3ffb Author: Scott Matheina Date: Sun Jan 8 21:00:39 2017 -0200 [media] staging/media/s5p-cec/exynos_hdmi_cecctrl.c Fixed blank line before closing brace '}' Fixed checkpatch check blank line before closing brace '}' Signed-off-by: Scott Matheina Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c | 1 - 1 file changed, 1 deletion(-) commit 7f01be234a2d9b627ff123a128f8c811789620e0 Author: Scott Matheina Date: Sun Jan 8 21:00:38 2017 -0200 [media] staging/s5p-cec: fixed alignment should match open parenthesis Fixed Checkpatch check "Alignment should match open parenthesis" Signed-off-by: Scott Matheina Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f98e5f555d770e807a7d89868f3619b6525d46d Author: Baruch Siach Date: Tue Jan 3 18:22:43 2017 -0200 [media] adv7170: drop redundant ret local Simplifies return value logic of adv7170_set_fmt(). Signed-off-by: Baruch Siach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7170.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 30e0e2ed7cf60944e810201aeff5974b5959aec5 Author: Baruch Siach Date: Tue Jan 3 18:06:56 2017 -0200 [media] ov2659: remove NOP assignment The loop over the ov2659_formats[] array just a few lines above verifies that mf->code matches the selected array entry. Signed-off-by: Baruch Siach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2659.c | 1 - 1 file changed, 1 deletion(-) commit 7289cf4acfbfedf725a04e58ec0113927c023f64 Author: Colin Ian King Date: Fri Dec 30 12:46:19 2016 -0200 [media] gp8psk: fix spelling mistake: "firmare" -> "firmware" trivial fix to spelling mistake in err message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 187a1446cbde4ee923592c2b792308d1a9b2499c Author: Colin Ian King Date: Thu Dec 29 15:23:15 2016 -0200 [media] b2c2: fix spelling mistake: "Contunuity" -> "Continuity" trivial fix to spelling mistake in deb_chk message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/b2c2/flexcop-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 774ad26b2cd7bc44780212ea19009ccdcf2c7098 Author: Colin Ian King Date: Wed Dec 28 19:45:58 2016 -0200 [media] cobalt: fix spelling mistake: "Celcius" -> "Celsius" trivial fix to spelling mistake in cobalt_info message. Anders Celsius was the Swedish astronomer. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-cpld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8d5219dcd3bf08b61116124637507fcb3e2da6c Author: Colin Ian King Date: Wed Dec 28 19:35:48 2016 -0200 [media] dvb-frontends: fix spelling mistake on cx24123_pll_calcutate trivial fix to spelling mistake of function name in err message, should be cx24123_pll_calculate instead of cx24123_pll_calcutate. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cx24123.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ebf75774f823ddbdbd10921006989d4df222f4a Author: Nicolas Iooss Date: Tue Dec 27 16:02:36 2016 -0200 [media] am437x-vpfe: always assign bpp variable In vpfe_s_fmt(), when the sensor format and the requested format were the same, bpp was assigned to vpfe->bpp without being initialized first. Grab the bpp value that is currently used by using __vpfe_get_format() instead of its wrapper, vpfe_try_fmt(). This use of uninitialized variable has been found by compiling the kernel with clang. Fixes: 417d2e507edc ("[media] media: platform: add VPFE capture driver support for AM437X") Cc: stable@vger.kernel.org Signed-off-by: Nicolas Iooss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/am437x/am437x-vpfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05a89739e9f537855b02f5756ca04b7c77f1e9aa Author: Hans Verkuil Date: Fri Dec 16 07:22:08 2016 -0200 [media] gen-errors.rst: document EIO Document the EIO error since this can happen anywhere anytime and applications should be aware of this. Also fix typo: exaustive -> exhaustive Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/gen-errors.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6ab1a322dcafc2de6a2f9a5f876e661b4457d0c9 Author: Soren Brinkmann Date: Thu Dec 15 23:17:57 2016 -0200 [media] vivid: Enable 4k resolution for webcam capture device Add 3840x2160 as valid resolution for the webcam capture input and adjust the webcam intervals accordingly. Signed-off-by: Soren Brinkmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-cap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fc2cc75a20b7bb058e095b56c58f5075b9fc0f2e Author: Corentin Labbe Date: Thu Dec 15 12:03:24 2016 -0200 [media] media: s5p-cec: Remove references to non-existent PLAT_S5P symbol Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol PLAT_S5P. This patch remove the last occurrence of this symbol. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba218bf91176ba2f24fc0c42e818ae2ab2862d11 Author: Corentin Labbe Date: Thu Dec 15 12:03:23 2016 -0200 [media] media: s5p-cec: Remove unneeded linux/miscdevice.h include s5p-cec: does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/exynos_hdmi_cec.h | 1 - 1 file changed, 1 deletion(-) commit da8892d410db224d9a24104529794e6e37e0c100 Author: Lars-Peter Clausen Date: Tue Nov 29 09:23:48 2016 -0200 [media] adv7604: Initialize drive strength to default when using DT The adv7604 driver platform data contains fields for configuring the drive strength of the output pins. When probing the driver through DT these fields are not explicitly initialized, which means they are left at 0. This is a reserved setting for the drive strength configuration though and can cause signal integrity issues. Whether these signal integrity issues are visible depends on the PCB specifics (e.g. the higher the load capacitance for the output the more visible the issue). But it has been observed on existing solutions at high pixel clock rates. Initialize the drive strength settings to the power-on-reset value of the device when probing through devicetree to avoid this issue. Fixes: 0e158be0162b ("adv7604: Add DT support") Signed-off-by: Lars-Peter Clausen Reviewed-by: Laurent Pinchart Tested-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 3 +++ 1 file changed, 3 insertions(+) commit aacee72061a352d52ef9d3854f8db3b86b93ea16 Author: Bob Peterson Date: Mon Jan 30 11:51:21 2017 -0500 GFS2: Reduce contention on gfs2_log_lock This patch modifies functions gfs2_trans_add_meta and _data so that they check whether the buffer_head is already in a transaction, and if so, avoid taking the gfs2_log_lock. Signed-off-by: Bob Peterson fs/gfs2/trans.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 32dd9e873bba08fbcf31682c38c76efd90a476e3 Author: Bhumika Goyal Date: Mon Dec 12 06:09:53 2016 -0200 [media] media: platform: soc_camera_platform : constify v4l2_subdev_* structures v4l2_subdev_{core/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle:(One of the scripts) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_core_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.core=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_core_ops i; File size before: text data bss dec hex filename 858 576 0 1434 59a soc_camera/soc_camera_platform.o File size after: text data bss dec hex filename 1234 192 0 1426 592 soc_camera/soc_camera_platform.o Signed-off-by: Bhumika Goyal Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/soc_camera_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a5bc63f28a384e2961dcd9069d71ccded8406ce6 Author: Christophe JAILLET Date: Fri Nov 18 15:49:15 2016 -0200 [media] soc-camera: Fix a return value in case of error If 'ov9640_reg_read()' does not return 0, then 'val' is left unmodified. As it is not initialized either, the return value can be anything. It is likely that returning the error code was expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov9640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 561eb9d09a93d71ca97ca401b3b71bf7725738b1 Author: Lars-Peter Clausen Date: Mon Jan 30 17:39:49 2017 +0100 fbdev: omap/lcd: Make callbacks optional Most OMAP FB LCD drivers don't have anything to do in their panel callbacks. This leads to a large set of empty boilerplate functions in the panel drivers. Make those callbacks optional by checking if they are set before calling them. This allows those boilerplate functions to be removed. Cc: Tomi Valkeinen Signed-off-by: Lars-Peter Clausen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/lcd_ams_delta.c | 6 ------ drivers/video/fbdev/omap/lcd_h3.c | 17 ----------------- drivers/video/fbdev/omap/lcd_htcherald.c | 30 ------------------------------ drivers/video/fbdev/omap/lcd_inn1510.c | 18 ------------------ drivers/video/fbdev/omap/lcd_inn1610.c | 6 ------ drivers/video/fbdev/omap/lcd_osk.c | 18 ------------------ drivers/video/fbdev/omap/lcd_palmte.c | 30 ------------------------------ drivers/video/fbdev/omap/lcd_palmtt.c | 23 ----------------------- drivers/video/fbdev/omap/lcd_palmz71.c | 24 ------------------------ drivers/video/fbdev/omap/omapfb_main.c | 31 ++++++++++++++++++++----------- 10 files changed, 20 insertions(+), 183 deletions(-) commit b2c1e8a75b2b3a5eb517f5f67eceae6d8c81ee1e Author: Lars-Peter Clausen Date: Mon Jan 30 17:39:49 2017 +0100 fbdev: omap/lcd: Staticize non-exported lcd_panel structs None of the lcd_panel structs defined by the OMAP LCD drivers are referenced outside of their compilation unit. Follow best practices and mark them as static. Cc: Tomi Valkeinen Signed-off-by: Lars-Peter Clausen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/lcd_h3.c | 2 +- drivers/video/fbdev/omap/lcd_htcherald.c | 2 +- drivers/video/fbdev/omap/lcd_inn1510.c | 2 +- drivers/video/fbdev/omap/lcd_inn1610.c | 2 +- drivers/video/fbdev/omap/lcd_osk.c | 2 +- drivers/video/fbdev/omap/lcd_palmte.c | 2 +- drivers/video/fbdev/omap/lcd_palmtt.c | 2 +- drivers/video/fbdev/omap/lcd_palmz71.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 0ed711168a2079ae4a0935638ef8d0e314c261b0 Author: Lars-Peter Clausen Date: Mon Jan 30 17:39:49 2017 +0100 fbdev: omap/lcd: Remove no-op driver callbacks Every single one of the OMAP fbdev LCD drivers implements no-op remove, suspend and resume callbacks for their platform_driver. This is not necessary as the driver core handles the case where the callbacks are not set just fine. So they are just unnecessary boilerplate that can be removed. Cc: Tomi Valkeinen Signed-off-by: Lars-Peter Clausen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/lcd_ams_delta.c | 19 ------------------- drivers/video/fbdev/omap/lcd_h3.c | 18 ------------------ drivers/video/fbdev/omap/lcd_htcherald.c | 19 ------------------- drivers/video/fbdev/omap/lcd_inn1510.c | 19 ------------------- drivers/video/fbdev/omap/lcd_inn1610.c | 19 ------------------- drivers/video/fbdev/omap/lcd_osk.c | 18 ------------------ drivers/video/fbdev/omap/lcd_palmte.c | 18 ------------------ drivers/video/fbdev/omap/lcd_palmtt.c | 18 ------------------ drivers/video/fbdev/omap/lcd_palmz71.c | 19 ------------------- 9 files changed, 167 deletions(-) commit 0a9aae40a6762fb509bc6b6b8f08ac83ab428a11 Author: Geliang Tang Date: Mon Jan 30 17:39:49 2017 +0100 video/mbx: use simple_open() Drop open_file_generic(), use simple_open() instead of it. Signed-off-by: Geliang Tang Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/mbx/mbxdebugfs.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 74a2b96e61d78051c70c24ad4499e0c8dcd1a0f1 Author: Arvind Yadav Date: Mon Jan 30 17:39:49 2017 +0100 video: fbdev: stifb: handle NULL return value from ioremap_nocache Add missing error check for ioremap_nocache() failure (prevents NULL pointer dereference on error). Cc: "James E.J. Bottomley" Cc: Helge Deller Signed-off-by: Arvind Yadav [b.zolnierkie: minor fixes] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/stifb.c | 4 ++++ 1 file changed, 4 insertions(+) commit f998ff681c0628c8da700a15975b4a57ec0ce707 Author: Maciej W. Rozycki Date: Mon Jan 30 17:39:48 2017 +0100 video: fbdev: pmagb-b-fb: Remove bad `__init' annotation Fix: WARNING: drivers/video/fbdev/pmagb-b-fb.o(.text+0x6dc): Section mismatch in reference from the function pmagbbfb_probe() to the function .init.text:pmagbbfb_erase_cursor() The function pmagbbfb_probe() references the function __init pmagbbfb_erase_cursor(). This is often because pmagbbfb_probe lacks a __init annotation or the annotation of pmagbbfb_erase_cursor is wrong. -- a fallout from a missed update from commit 5b1638d94080 ("VIDEO: PMAGB-B: Fix section mismatch") and then commit 48c68c4f1b54 ("Drivers: video: remove __dev* attributes.") Signed-off-by: Maciej W. Rozycki Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pmagb-b-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 879e5a0df626f39cbb3c61bb90373e56d67012c4 Author: Maciej W. Rozycki Date: Mon Jan 30 17:39:48 2017 +0100 video: fbdev: pmag-ba-fb: Remove bad `__init' annotation Fix: WARNING: drivers/video/fbdev/pmag-ba-fb.o(.text+0x308): Section mismatch in reference from the function pmagbafb_probe() to the function .init.text:pmagbafb_erase_cursor() The function pmagbafb_probe() references the function __init pmagbafb_erase_cursor(). This is often because pmagbafb_probe lacks a __init annotation or the annotation of pmagbafb_erase_cursor is wrong. -- a fallout from a missed update from commit 9625b51350cc ("VIDEO: PMAG-BA: Fix section mismatch") and then commit 48c68c4f1b54 ("Drivers: video: remove __dev* attributes.") Signed-off-by: Maciej W. Rozycki Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pmag-ba-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6306b3a58c91806a9d9b1bf60fa66804b29beecb Author: Vladimir Zapolskiy Date: Mon Jan 30 17:39:48 2017 +0100 video: ARM CLCD: use panel device node for getting backlight and mode Having obtained panel device node in clcdfb_of_init_display() it allows to generalize and simplify two more helper functions clcdfb_of_get_backlight() and clcdfb_of_get_mode(). Cc: Tomi Valkeinen Cc: Russell King Cc: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit be7367968f54b452ee221ba03458593499e040cc Author: Vladimir Zapolskiy Date: Mon Jan 30 17:39:48 2017 +0100 video: ARM CLCD: use panel device node for panel initialization There is no necessity to pass an endpoint device node to custom panel initialization functions, because a child panel device node should be sufficient, note that the existing init_panel() callback declaration from linux/amba/clcd.h already prompts to use the panel device node here. Cc: Tomi Valkeinen Cc: Russell King Cc: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd-nomadik.c | 9 +-------- drivers/video/fbdev/amba-clcd-nomadik.h | 5 ++--- drivers/video/fbdev/amba-clcd-versatile.c | 14 +++----------- drivers/video/fbdev/amba-clcd-versatile.h | 5 ++--- drivers/video/fbdev/amba-clcd.c | 8 ++++++-- 5 files changed, 14 insertions(+), 27 deletions(-) commit 69550ad23d30af6250c83fd213db645d8730c557 Author: Vladimir Zapolskiy Date: Mon Jan 30 17:39:48 2017 +0100 video: ARM CLCD: sort included headers out alphabetically To simplify the task of looking through the list of included headers sort them out alphabetically, some of the truly redundant headers are removed from the list. Cc: Tomi Valkeinen Cc: Russell King Cc: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit f41003a23a02dc7299539300f74360c2a932714a Author: Sean Young Date: Tue Dec 20 12:18:06 2016 -0200 [media] staging: lirc_imon: port remaining usb ids to imon and remove The staging lirc_imon driver contains 4 usb ids. Two of those have a VFD and two don't. The VFD code is exactly the same in the mainline imon driver, so that part is easily ported. The staging driver produces raw IR rather than scancodes for the four devices, so I've ported the raw IR code from staging to mainline imon. Now that mainline imon can handle these four devices, lirc_imon is no longer needed. Compile tested only. Signed-off-by: Sean Young Cc: Venky Raju Cc: Jarod Wilson Cc: Alexey Khoroshilov Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 133 ++++- drivers/staging/media/lirc/Kconfig | 8 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_imon.c | 979 --------------------------------- 4 files changed, 127 insertions(+), 994 deletions(-) commit d48982f49b53ca9bf0c5fb17834830254d84390f Author: Sean Young Date: Mon Dec 19 20:20:03 2016 -0200 [media] staging: lirc_bt829: remove This driver is for an old mach64 VT board, which also has a framebuffer driver (atyfb) and userspace mach64 X driver. It was merged in 2010 and noone has attempted to port it to rc-core, which would be necessary to get it out of staging. I have not been able to track down the hardware either. Signed-off-by: Sean Young Cc: Jarod Wilson Cc: Leonid Froenchenko Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/Kconfig | 6 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_bt829.c | 401 -------------------------------- 3 files changed, 408 deletions(-) commit 2933974cbb03168dec7037d5656158bdd15c9213 Author: Sean Young Date: Mon Dec 19 20:10:41 2016 -0200 [media] staging: lirc_parallel: remove The lirc_parallel driver was merged in 2010 and noone has attempted to do the work necessary to get it out of staging (i.e. port it to rc-core). I have not been able to find one of these devices, and a machine with a parallel port is pretty rare too. Signed-off-by: Sean Young Cc: Jarod Wilson Cc: Christoph Bartelmus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/Kconfig | 6 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_parallel.c | 741 ----------------------------- drivers/staging/media/lirc/lirc_parallel.h | 26 - 4 files changed, 774 deletions(-) commit cc06393aae592d7009988aa5028f8a98d9c5e142 Author: Sean Young Date: Mon Dec 19 20:07:08 2016 -0200 [media] staging: lirc_sir: port to rc-core Before this driver can be moved out of staging, it should be ported to rc-core. I've tried to make the minimum changes possible without upsetting checkpatch. Compile tested only. Signed-off-by: Sean Young Cc: Jarod Wilson Cc: Christoph Bartelmus Cc: Milan Pikula Cc: Frank Przybylski Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/Kconfig | 2 +- drivers/staging/media/lirc/lirc_sir.c | 296 ++++++++-------------------------- 2 files changed, 69 insertions(+), 229 deletions(-) commit a92def1becf33e91fc460c7ae575aa9210ba8f40 Author: Sean Young Date: Mon Dec 19 18:48:29 2016 -0200 [media] ir-rx51: port to rc-core This driver was written using lirc since rc-core did not support transmitter-only hardware at that time. Now that it does, port this driver. Compile tested only. Signed-off-by: Sean Young Cc: Timo Kokkonen Cc: Ivaylo Dimitrov Signed-off-by: Mauro Carvalho Chehab arch/arm/mach-omap2/pdata-quirks.c | 8 +- drivers/media/rc/Kconfig | 2 +- drivers/media/rc/ir-rx51.c | 332 ++++++++++------------------ include/linux/platform_data/media/ir-rx51.h | 6 +- 4 files changed, 126 insertions(+), 222 deletions(-) commit fe052da49201ec95bdb0e1c97d574180f8905174 Author: Andi Shyti Date: Fri Dec 16 04:12:18 2016 -0200 [media] rc: add support for IR LEDs driven through SPI The ir-spi is a simple device driver which supports the connection between an IR LED and the MOSI line of an SPI device. The driver, indeed, uses the SPI framework to stream the raw data provided by userspace through an rc character device. The chardev is handled by the LIRC framework and its functionality basically provides: - write: the driver gets a pulse/space signal and translates it to a binary signal that will be streamed to the IR led through the SPI framework. - set frequency: sets the frequency whith which the data should be sent. This is handle with ioctl with the LIRC_SET_SEND_CARRIER flag (as per lirc documentation) - set duty cycle: this is also handled with ioctl with the LIRC_SET_SEND_DUTY_CYCLE flag. The driver handles duty cycles of 50%, 60%, 70%, 75%, 80% and 90%, calculated on 16bit data. The character device is created under /dev/lircX name, where X is and ID assigned by the LIRC framework. Example of usage: fd = open("/dev/lirc0", O_RDWR); if (fd < 0) return -1; val = 608000; ret = ioctl(fd, LIRC_SET_SEND_CARRIER, &val); if (ret < 0) return -1; val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 9 +++ drivers/media/rc/Makefile | 1 + drivers/media/rc/ir-spi.c | 199 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 209 insertions(+) commit 182c2909e22d8a3ec39f8a4530fa19867cbd989b Author: Andi Shyti Date: Sun Dec 18 09:11:37 2016 -0200 [media] Documentation: bindings: add documentation for ir-spi device driver Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit d5083677b3ba5128527b6674d27f3c6c19daafbc Author: Andi Shyti Date: Fri Dec 16 04:12:16 2016 -0200 [media] rc-ir-raw: do not generate any receiving thread for raw transmitters Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-ir-raw.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d34aee1018342568334de27fa04f0b916ff7d7a1 Author: Andi Shyti Date: Fri Dec 16 04:12:15 2016 -0200 [media] rc-core: add support for IR raw transmitters IR raw transmitter driver type is specified in the enum rc_driver_type as RC_DRIVER_IR_RAW_TX which includes all those devices that transmit raw stream of bit to a receiver. The data are provided by userspace applications, therefore they don't need any input device allocation, but still they need to be registered as raw devices. Suggested-by: Sean Young Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 42 +++++++++++++++++++++++++----------------- include/media/rc-core.h | 9 ++++++--- 2 files changed, 31 insertions(+), 20 deletions(-) commit 7ff2c2bc259e1032dc385a427c58afce4a38956b Author: Andi Shyti Date: Fri Dec 16 04:12:14 2016 -0200 [media] rc-main: split setup and unregister functions Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 143 +++++++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 62 deletions(-) commit 0f7499fddb153a333dff3c1dc4280c178b9b5a80 Author: Andi Shyti Date: Fri Dec 16 06:50:58 2016 -0200 [media] rc-main: assign driver type during allocation The driver type can be assigned immediately when an RC device requests to the framework to allocate the device. This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device. Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value. Suggested-by: Sean Young Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/cec/cec-core.c | 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c | 2 +- drivers/media/pci/cx23885/cx23885-input.c | 11 +---------- drivers/media/pci/cx88/cx88-input.c | 3 +-- drivers/media/pci/dm1105/dm1105.c | 3 +-- drivers/media/pci/mantis/mantis_input.c | 2 +- drivers/media/pci/saa7134/saa7134-input.c | 2 +- drivers/media/pci/smipcie/smipcie-ir.c | 3 +-- drivers/media/pci/ttpci/budget-ci.c | 2 +- drivers/media/rc/ati_remote.c | 3 +-- drivers/media/rc/ene_ir.c | 3 +-- drivers/media/rc/fintek-cir.c | 3 +-- drivers/media/rc/gpio-ir-recv.c | 3 +-- drivers/media/rc/igorplugusb.c | 3 +-- drivers/media/rc/iguanair.c | 3 +-- drivers/media/rc/img-ir/img-ir-hw.c | 2 +- drivers/media/rc/img-ir/img-ir-raw.c | 3 +-- drivers/media/rc/imon.c | 3 +-- drivers/media/rc/ir-hix5hd2.c | 3 +-- drivers/media/rc/ite-cir.c | 3 +-- drivers/media/rc/mceusb.c | 3 +-- drivers/media/rc/meson-ir.c | 3 +-- drivers/media/rc/nuvoton-cir.c | 3 +-- drivers/media/rc/rc-loopback.c | 3 +-- drivers/media/rc/rc-main.c | 9 ++++++--- drivers/media/rc/redrat3.c | 3 +-- drivers/media/rc/serial_ir.c | 3 +-- drivers/media/rc/st_rc.c | 3 +-- drivers/media/rc/streamzap.c | 3 +-- drivers/media/rc/sunxi-cir.c | 3 +-- drivers/media/rc/ttusbir.c | 3 +-- drivers/media/rc/winbond-cir.c | 3 +-- drivers/media/usb/au0828/au0828-input.c | 3 +-- drivers/media/usb/cx231xx/cx231xx-input.c | 2 +- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 3 +-- drivers/media/usb/dvb-usb/dvb-usb-remote.c | 3 +-- drivers/media/usb/em28xx/em28xx-input.c | 2 +- drivers/media/usb/tm6000/tm6000-input.c | 3 +-- include/media/rc-core.h | 6 ++++-- 42 files changed, 50 insertions(+), 85 deletions(-) commit 97c129747af52c23a4dd9c6fc8c73ab8be3b9038 Author: Antti Seppälä Date: Tue Mar 31 14:48:12 2015 -0300 [media] rc: nuvoton-cir: Add support wakeup via sysfs filter callback Nuvoton-cir utilizes the encoding capabilities of rc-core to convert scancodes from user space to pulse/space format understood by the underlying hardware. Converted samples are then written to the wakeup fifo along with other necessary configuration to enable wake up functionality. Signed-off-by: Antti Seppälä Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: Jarod Wilson Cc: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 120 ++++++++++++++++++++++++++++++++--------- 1 file changed, 96 insertions(+), 24 deletions(-) commit 914535c05971603490e3c025ab5e4bb729a7b0b9 Author: James Hogan Date: Tue Mar 31 14:48:11 2015 -0300 [media] rc: rc-loopback: Add loopback of filter scancodes Add the s_wakeup_filter callback to the rc-loopback driver, which instead of setting the filter just feeds the scancode back through the input device so that it can be verified. Signed-off-by: James Hogan Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-loopback.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f423ccc1a32f8111ddfec9ef7efbccc8b73f3ea5 Author: James Hogan Date: Tue Mar 31 14:48:10 2015 -0300 [media] rc: rc-core: Add support for encode_wakeup drivers Add support in rc-core for drivers which implement the wakeup scancode filter by encoding the scancode using the raw IR encoders. This is by way of rc_dev::encode_wakeup which should be set to true and rc_dev::allowed_wakeup_protocols should be set to the raw IR encoders. We also do not permit the mask to be set as we cannot generate IR which would match that. Signed-off-by: James Hogan Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 26 +++++++++++++++++++++----- include/media/rc-core.h | 3 +++ include/media/rc-map.h | 9 +++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) commit 103293be9d23de8347fc2e5aecd06f8962d18154 Author: Sean Young Date: Tue Dec 6 18:33:57 2016 -0200 [media] rc: ir-sony-decoder: Add encode capability Add the capability to encode Sony scancodes as raw events. Sony uses pulse length rather than pulse distance. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-sony-decoder.c | 48 ++++++++++++++++++++++++++++ drivers/media/rc/rc-core-priv.h | 20 ++++++++++++ drivers/media/rc/rc-ir-raw.c | 64 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+) commit d35afc5fe0971bd1d40c824bd3c7587aeda823b2 Author: Sean Young Date: Tue Dec 6 18:11:30 2016 -0200 [media] rc: ir-sharp-decoder: Add encode capability Add the capability to encode Sharp scancodes as raw events. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-sharp-decoder.c | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit cb981257dc75a68f2134e9b2c562e323e2583324 Author: Sean Young Date: Tue Dec 6 18:01:05 2016 -0200 [media] rc: ir-sanyo-decoder: Add encode capability Add the capability to encode Sanyo scancodes as raw events. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-sanyo-decoder.c | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit d8a2ae5cbdc82aca603c366c87920ffaa14571ba Author: Sean Young Date: Tue Dec 6 17:01:03 2016 -0200 [media] rc: ir-jvc-decoder: Add encode capability Add the capability to encode JVC scancodes as raw events. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-jvc-decoder.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 141cfb1432f5c8e120d49229be52a32c8705afba Author: James Hogan Date: Fri Mar 14 20:04:14 2014 -0300 [media] rc: ir-nec-decoder: Add encode capability Add the capability to encode NEC scancodes as raw events. The scancode_to_raw is pretty much taken from the img-ir NEC filter() callback, and modulation uses the pulse distance helper added in a previous commit. Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: Antti Seppälä Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-nec-decoder.c | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 9d974e49339dc0ad9a6fbd7438a0887d7a445e29 Author: Antti Seppälä Date: Tue Mar 31 14:48:09 2015 -0300 [media] rc: ir-rc6-decoder: Add encode capability Add the capability to encode RC-6 and RC-6A scancodes as raw events. The Manchester modulation helper is used several times with various timings so that RC-6 header preamble, the header, header trailing bit and the data itself can be modulated correctly. Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: James Hogan Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-rc6-decoder.c | 117 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit e9ab364a28c7ada075d6983946c08363df9c8a63 Author: James Hogan Date: Tue Mar 31 14:48:08 2015 -0300 [media] rc: ir-rc5-decoder: Add encode capability Add the capability to encode RC-5, RC-5X and RC-5-SZ scancodes as raw events. The Manchester modulation helper is used, and for RC-5X it is used twice with two sets of timings, the first with a short trailer space for the space in the middle, and the second with no leader so that it can continue the space. The encoding in RC-5-SZ first inserts a pulse and then simply utilizes the generic Manchester encoder available in rc-core. Signed-off-by: James Hogan Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-rc5-decoder.c | 97 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit caec098477d228d44ae2266ee78a37bed070441a Author: James Hogan Date: Fri Mar 14 20:04:12 2014 -0300 [media] rc: rc-ir-raw: Add pulse-distance modulation helper Add IR encoding helper for pulse-distance modulation as used by the NEC protocol. Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: Antti Seppälä Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 52 ++++++++++++++++++++++++++++++++++++ drivers/media/rc/rc-ir-raw.c | 59 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) commit 844a4f45f43b6d46b4dd87f61b3e2d2836c822b1 Author: Antti Seppälä Date: Tue Mar 31 14:48:07 2015 -0300 [media] rc: rc-ir-raw: Add Manchester encoder (phase encoder) helper Adding a simple Manchester encoder to rc-core. Manchester coding is used by at least RC-5 and RC-6 protocols and their variants. Signed-off-by: Antti Seppälä Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 33 ++++++++++++++++ drivers/media/rc/rc-ir-raw.c | 85 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) commit 3875233d0b42c6d194657735d1a4b6a8797bfaaa Author: James Hogan Date: Tue Mar 31 14:48:06 2015 -0300 [media] rc: rc-ir-raw: Add scancode encoder callback Add a callback to raw ir handlers for encoding and modulating a scancode to a set of raw events. This could be used for transmit, or for converting a wakeup scancode to a form that is more suitable for raw hardware wake up filters. Signed-off-by: James Hogan Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 2 ++ drivers/media/rc/rc-ir-raw.c | 37 +++++++++++++++++++++++++++++++++++++ include/media/rc-core.h | 2 ++ 3 files changed, 41 insertions(+) commit d9bf28e2650fe3eeefed7e34841aea07d10c6543 Author: Jason Gunthorpe Date: Mon Dec 12 11:30:20 2016 -0700 PCI: mvebu: Handle changes to the bridge windows while enabled The PCI core will write to the bridge window config multiple times while they are enabled. This can lead to mbus failures like this: mvebu_mbus: cannot add window '4:e8', conflicts with another window mvebu-pcie mbus:pex@e0000000: Could not create MBus window at [mem 0xe0000000-0xe00fffff]: -22 For me this is happening during a hotplug cycle. The PCI core is not changing the values, just writing them twice while active. The patch addresses the general case of any change to an active window, but not atomically. The code is slightly refactored so io and mem can share more of the window logic. Signed-off-by: Jason Gunthorpe Signed-off-by: Bjorn Helgaas Acked-by: Jason Cooper drivers/pci/host/pci-mvebu.c | 101 +++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 41 deletions(-) commit 1a7347c7dba9c88f47d1b81622917794b2e2ade3 Author: Christoph Hellwig Date: Sat Jan 28 09:32:49 2017 +0100 nvme/scsi: don't rely on BLK_MAX_CDB The NVMe SCSI emulation doesn't use BLOCK_PC requests, so BLK_MAX_CDB doesn't have a meaning for it. Instead opencode the value of 16 and refactor the code a bit so that related checks are next to each other and we only need to use the value in one place. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dca72e09e0cd50f7caa8517264f552657b671a69 Author: Alexandre TORGUE Date: Fri Jan 27 17:15:14 2017 +0100 pinctrl: stm32: fix bad location of gpiochip_lock_as_irq Move gpio lock as irq from "domain alloc" callback to "domain activate" callback. It will allow to use gpiolib sysfs correctly. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 37 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 838adb576d4a3da03d4e35a3149dc015dfeec299 Author: Icenowy Zheng Date: Thu Jan 26 23:48:51 2017 +0800 drivers: pinctrl: add driver for Allwinner H5 SoC Based on the Allwinner H5 datasheet and the pinctrl driver of the backward-compatible H3 this introduces the pin multiplex assignments for the H5 SoC. H5 introduced some more pin functions (e.g. three more groups of TS pins, and one more groups of SIM pins) than H3. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c | 558 +++++++++++++++++++++ 4 files changed, 564 insertions(+) commit 122fac030e912ed723fe94d8eb0d5d0f6b31535e Author: Robin Murphy Date: Mon Jan 16 13:24:55 2017 +0000 iommu/dma: Implement PCI allocation optimisation Whilst PCI devices may have 64-bit DMA masks, they still benefit from using 32-bit addresses wherever possible in order to avoid DAC (PCI) or longer address packets (PCIe), which may incur a performance overhead. Implement the same optimisation as other allocators by trying to get a 32-bit address first, only falling back to the full mask if that fails. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit f51d7bb79c1124f7f02e9f472ef935eba13bca8e Author: Robin Murphy Date: Mon Jan 16 13:24:54 2017 +0000 iommu/dma: Stop getting dma_32bit_pfn wrong iommu_dma_init_domain() was originally written under the misconception that dma_32bit_pfn represented some sort of size limit for IOVA domains. Since the truth is almost the exact opposite of that, rework the logic and comments to reflect its real purpose of optimising lookups when allocating from a subset of the available 64-bit space. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit ce273db0ff1ae64fea785af25a43977b0b6a4555 Merge: 93fa6cf 14b4dba Author: Joerg Roedel Date: Mon Jan 30 16:05:18 2017 +0100 Merge branch 'iommu/iommu-priv' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/core commit aac7d39f200de84c511f79d9e9da286e1288f176 Merge: 566cf87 3677a64 Author: Joerg Roedel Date: Mon Jan 30 16:01:16 2017 +0100 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit 93fa6cf60aad833e7572a61f98b2d0aa6f67de40 Merge: 566cf87 5018c8d Author: Joerg Roedel Date: Mon Jan 30 15:58:47 2017 +0100 Merge branch 'iommu/guest-msi' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/core commit 3d84fdb3f0b5367248b403b6d4da11e124eb71fa Author: Sebastian Reichel Date: Fri Jan 27 15:47:37 2017 +0100 gpio: mcp23s08: use regmap Use regmap API to save some lines of codes and have debugfs support for all of the MCP's registers. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/gpio/gpio-mcp23s08.c | 320 ++++++++++++++++++------------------------- 1 file changed, 130 insertions(+), 190 deletions(-) commit 8c34b5c4c82e060de0d8bbf26b978c68bffe5a18 Author: Sean Young Date: Sat Dec 3 08:55:56 2016 -0200 [media] rc: raw IR drivers cannot handle cec, unknown or other unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Bruno Prémont Signed-off-by: Mauro Carvalho Chehab drivers/hid/hid-picolcd_cir.c | 2 +- drivers/media/common/siano/smsir.c | 2 +- drivers/media/pci/cx23885/cx23885-input.c | 14 +++++++------- drivers/media/rc/ene_ir.c | 2 +- drivers/media/rc/fintek-cir.c | 2 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/igorplugusb.c | 4 ++-- drivers/media/rc/iguanair.c | 2 +- drivers/media/rc/ir-hix5hd2.c | 2 +- drivers/media/rc/ite-cir.c | 2 +- drivers/media/rc/mceusb.c | 2 +- drivers/media/rc/meson-ir.c | 2 +- drivers/media/rc/nuvoton-cir.c | 2 +- drivers/media/rc/rc-loopback.c | 2 +- drivers/media/rc/redrat3.c | 2 +- drivers/media/rc/serial_ir.c | 2 +- drivers/media/rc/st_rc.c | 2 +- drivers/media/rc/streamzap.c | 2 +- drivers/media/rc/sunxi-cir.c | 2 +- drivers/media/rc/ttusbir.c | 2 +- drivers/media/rc/winbond-cir.c | 2 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +- drivers/media/usb/dvb-usb/technisat-usb2.c | 2 +- include/media/rc-map.h | 10 ++++++++++ 24 files changed, 40 insertions(+), 30 deletions(-) commit 459fbe00693449fade2d1bc802791b081c94edcf Author: John Ogness Date: Mon Jan 30 09:41:21 2017 +0100 x86/mm/cpa: Avoid wbinvd() for PREEMPT Although wbinvd() is faster than flushing many individual pages, it blocks the memory bus for "long" periods of time (>100us), thus directly causing unusually large latencies on all CPUs, regardless of any CPU isolation features that may be active. This is an unpriviledged operatation as it is exposed to user space via the graphics subsystem. For 1024 pages, flushing those pages individually can take up to 2200us, but the task remains fully preemptible during that time. Signed-off-by: John Ogness Acked-by: Peter Zijlstra (Intel) Cc: Sebastian Siewior Cc: linux-rt-users Signed-off-by: Thomas Gleixner arch/x86/mm/pageattr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f4742e1d2dd36143d397ea40ff7b80ab129780b3 Author: Sean Young Date: Sat Dec 3 08:29:45 2016 -0200 [media] winbond-cir: use sysfs wakeup filter Now that we can select the exact variant of the protocol for wakeup filter, the winbond-cir can use the wakeup filter rather than module parameters. Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/winbond-cir.c | 257 +++++++++++++++++++++-------------------- 1 file changed, 131 insertions(+), 126 deletions(-) commit 6eae57e9d5b01d0ee4b1932b66102b1b9b6cd93d Author: Sean Young Date: Thu Dec 15 07:37:48 2016 -0200 [media] rc: unify nec32 protocol scancode format There are two different encodings used for nec32: - The ir-nec-decoder.c decoder treats it as 32 bit msb first. - The img-ir decoder/encoder, winbond wakeup, dib0700, ir-ctl userspace, treat nec32 analogous to necx and nec: 4 bytes, each lsb first. So this format reverses the 4 bytes. There are arguments to be had for both formats, but we should not use different formats in different parts of the kernel. Selecting the second format introduces the least code churn. It does mean that the TiVo keymap needs updating. This change was submitted before as "18bc174 [media] media: rc: change 32bit NEC scancode format", which was reverted because it was unclear what scancode rc drivers produce. There are now more examples of drivers which produce nec32 in lsb format. The TiVo keymap is verified against the Nero Liquid TiVo remote. The keymap is not for the Tivo DVR remote, which uses rc-5. Signed-off-by: Sean Young Cc: James Hogan Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-nec-decoder.c | 5 ++- drivers/media/rc/keymaps/rc-tivo.c | 86 +++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 44 deletions(-) commit b590c0bfaee6a3edb6bcaaab68dfe9e2f6db9eb9 Author: Sean Young Date: Mon Dec 5 19:24:59 2016 -0200 [media] rc: Add scancode validation We need to valdiate that scancodes are valid for their protocol; an incorrect necx scancode could actually be a nec scancode, for example. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) commit 0751d33c27eacfcd4e15a3425a9e035614ab9713 Author: Sean Young Date: Mon Dec 5 17:08:35 2016 -0200 [media] rc: change wakeup_protocols to list all protocol variants For IR wakeup, a driver has to program the hardware to wakeup at a specific IR sequence, so it makes no sense to allow multiple wakeup protocols to be selected. In the same manner the sysfs interface only allows one scancode to be provided. In addition, we need to know the specific variant of the protocol. In short, these changes are made to the wakeup_protocols sysfs entry: - list all the protocol variants rather than the protocol groups, e.g. "nec nec-x nec-32" rather than just "nec". - only allow one protocol variant to be selected rather than multiple - wakeup_filter can only be set once a protocol has been selected in wakeup_protocols. This is an API change, however the only user of this API is the img-ir, but the wakeup code was never merged to mainline, so it was never used. Signed-off-by: Sean Young Cc: James Hogan Cc: Sifan Naeem Signed-off-by: Mauro Carvalho Chehab Documentation/ABI/testing/sysfs-class-rc | 14 +- Documentation/media/uapi/rc/rc-sysfs-nodes.rst | 13 +- drivers/media/rc/img-ir/img-ir-hw.c | 13 +- drivers/media/rc/img-ir/img-ir-nec.c | 21 +- drivers/media/rc/img-ir/img-ir-sony.c | 26 ++- drivers/media/rc/rc-ir-raw.c | 1 - drivers/media/rc/rc-main.c | 253 +++++++++++++++++++------ include/media/rc-core.h | 12 +- 8 files changed, 262 insertions(+), 91 deletions(-) commit 0fcd3f0a3f8e74e0a20b66e51954a004b90f2eb2 Author: Sean Young Date: Fri Dec 2 15:16:14 2016 -0200 [media] rc5x: document that this is the 20 bit variant There are many variants of extended rc5. This implements the 20 bit version. Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-rc5-decoder.c | 6 +++--- drivers/media/rc/rc-main.c | 2 +- include/media/rc-map.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit fd844d905d1ba13326f59835f77a4827076fdcac Author: Sean Young Date: Fri Dec 2 15:16:13 2016 -0200 [media] rc5x: 6th command bit is S2 bit The 2nd stop bit in rc5 is reused as an inverted 6th command bit in 20 bits rc5x. Currently the rc5x decoder sets the 6th command bit as an inverted duplicate of the lowest system bit; as a result we do not have all the command bits. Note that there are no rc5x keymaps present. Signed-off-by: Sean Young Cc: David Härdeman Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-rc5-decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56a6036c5fcb784290edde050baacddb168f4a33 Author: Sean Young Date: Fri Dec 2 15:16:12 2016 -0200 [media] rc: allow software timeout to be set Both the iguanair and the technotrend usb ir do not do any timeout handling in hardware, so timeout is entirely done in ir_raw_event_store_with_filter(). Any sensible timeout value will do, so allow it to be set using LIRC_SET_REC_TIMEOUT. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/iguanair.c | 4 +++- drivers/media/rc/ttusbir.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 6693f9f96a0936488dd7876b8079933786e27b1b Author: Mika Westerberg Date: Fri Jan 27 13:07:16 2017 +0300 pinctrl: intel: Add Intel Gemini Lake pin controller support This driver adds pinctrl/GPIO support for Intel Gemini Lake SoC. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. This commit includes material from David E. Box. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/Kconfig | 8 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-geminilake.c | 512 +++++++++++++++++++++++++++++ 3 files changed, 521 insertions(+) commit 2940c7e49775ea2d83c9a8c1ea1e37c4f584ee6c Author: Sean Young Date: Fri Dec 2 15:16:11 2016 -0200 [media] serial_ir: generate timeout No timeout is generated by serial_ir since the port only generates interrupts on edges. Some IR protocols like rc6 and rc5 need a trailing space or timeout so they know there are no more bits coming. Without it, the current key will only be reported once some more IR occurs. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/serial_ir.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 04cc058f0c5261c5bd6fa5febf79056db4a187a6 Author: Mika Westerberg Date: Fri Jan 27 13:07:15 2017 +0300 pinctrl: intel: Add support for 1k additional pull-down The next generation Intel GPIO hardware supports additional 1k pull-down per-pad. Add support for this to the Intel core pinctrl driver. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 18 +++++++++++++++++- drivers/pinctrl/intel/pinctrl-intel.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) commit 17809ed219945b38a750aa382d1aafe3a9f09b02 Author: Sean Young Date: Fri Dec 2 15:16:10 2016 -0200 [media] em28xx: IR protocol not reported correctly Report the correct NEC variant. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit e57725eabf87c9c75bc73bd19ea00e887155e43f Author: Mika Westerberg Date: Fri Jan 27 13:07:14 2017 +0300 pinctrl: intel: Add support for hardware debouncer The next generation Intel GPIO hardware has two additional registers PADCFG2 and PADCFG3. The latter is marked as reserved but the former includes configuration for per-pad hardware debouncer. This patch adds support for that in the Intel pinctrl core driver. Since these are additional features on top of the current generation hardware, we use revision number and feature flags to enable this if detected. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 130 +++++++++++++++++++++++++++++++++- drivers/pinctrl/intel/pinctrl-intel.h | 5 ++ 2 files changed, 133 insertions(+), 2 deletions(-) commit 74694269116bf04a97d89dfce7489fde7eb41ab1 Merge: 9037c13 07254d8 Author: Linus Walleij Date: Mon Jan 30 14:58:57 2017 +0100 Merge tag 'sh-pfc-for-v4.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.11 (take two) - Add Gyro-ADC pin groups for R-Car M2-W. commit 9037c138ebe49a6a967333144d0775f94d4a90d8 Merge: 82bbd8c d7ae8f8 Author: Linus Walleij Date: Mon Jan 30 14:55:27 2017 +0100 Merge branch 'ib-mvebu-98dx3236' into devel commit d7ae8f8dee7f3f759e119335e2d8deb2683a8161 Author: Kalyan Kinthada Date: Mon Jan 30 12:20:33 2017 +1300 pinctrl: mvebu: pinctrl driver for 98DX3236 SoC This pinctrl driver supports the 98DX3236, 98DX3336 and 98DX4251 SoCs from Marvell. Signed-off-by: Kalyan Kinthada Signed-off-by: Chris Packham Acked-by: Rob Herring Acked-by: Sebastian Hesselbarth Signed-off-by: Linus Walleij .../pinctrl/marvell,armada-98dx3236-pinctrl.txt | 46 ++++++ drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 156 +++++++++++++++++++++ 2 files changed, 202 insertions(+) commit 07e9293c188dbfff4617b0ac5bb56ad5478d33a5 Author: Sean Young Date: Fri Dec 2 15:16:09 2016 -0200 [media] lirc: LIRC_{G,S}ET_SEND_MODE fail if device cannot transmit These ioctls should not succeed if the device cannot send. Also make it clear that these ioctls should return the lirc mode, although the actual value does not change. Signed-off-by: Sean Young Reviewed-by: Andi Shyti Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit bd291208d7f5d6b2d6a033fee449a429230b06df Author: Sean Young Date: Fri Dec 2 15:16:08 2016 -0200 [media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these ioctls no longer work. Signed-off-by: Sean Young Cc: # v4.8+ Reviewed-by: Andi Shyti Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cf8d8e4fcc4c3f9ec5fa27c179a9016530822f8 Author: Sean Young Date: Fri Dec 2 15:16:07 2016 -0200 [media] mceusb: LIRC_SET_SEND_CARRIER returns 0 on success LIRC_SET_SEND_CARRIER ioctl should not return the carrier used, it should return 0. Signed-off-by: Sean Young Reviewed-by: Andi Shyti Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 517b500713fd321f1519996904a7c21a141ad3e9 Author: Sean Young Date: Sun Nov 20 07:45:52 2016 -0200 [media] cxusb: port to rc-core The d680_dmb keymap has some new new mappings. Tested-by: Vincent McIntyre Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 3 + drivers/media/rc/keymaps/rc-d680-dmb.c | 75 +++++++ drivers/media/rc/keymaps/rc-dvico-mce.c | 85 ++++++++ drivers/media/rc/keymaps/rc-dvico-portable.c | 76 +++++++ drivers/media/usb/dvb-usb/cxusb.c | 312 +++++++-------------------- include/media/rc-map.h | 3 + 6 files changed, 322 insertions(+), 232 deletions(-) commit 9d93dc1c96ec446bef9c34a189ea24556f1af89a Author: Marc Zyngier Date: Wed Jan 25 13:47:43 2017 +0000 arm/arm64: KVM: Get rid of KVM_MEMSLOT_INCOHERENT KVM_MEMSLOT_INCOHERENT is not used anymore, as we've killed its only use in the arm/arm64 MMU code. Let's remove the last artifacts. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/mmu.c | 9 --------- include/linux/kvm_host.h | 1 - 2 files changed, 10 deletions(-) commit 13b7756cec3d6e8329fa21c314fe150c12601c6c Author: Marc Zyngier Date: Wed Jan 25 13:33:11 2017 +0000 arm/arm64: KVM: Stop propagating cacheability status of a faulted page Now that we unconditionally flush newly mapped pages to the PoC, there is no need to care about the "uncached" status of individual pages - they must all be visible all the way down. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 3 +-- arch/arm/kvm/mmu.c | 11 ++++------- arch/arm64/include/asm/kvm_mmu.h | 3 +-- 3 files changed, 6 insertions(+), 11 deletions(-) commit 8f36ebaf21fdae99c091c67e8b6fab33969f2667 Author: Marc Zyngier Date: Wed Jan 25 12:29:59 2017 +0000 arm/arm64: KVM: Enforce unconditional flush to PoC when mapping to stage-2 When we fault in a page, we flush it to the PoC (Point of Coherency) if the faulting vcpu has its own caches off, so that it can observe the page we just brought it. But if the vcpu has its caches on, we skip that step. Bad things happen when *another* vcpu tries to access that page with its own caches disabled. At that point, there is no garantee that the data has made it to the PoC, and we access stale data. The obvious fix is to always flush to PoC when a page is faulted in, no matter what the state of the vcpu is. Cc: stable@vger.kernel.org Fixes: 2d58b733c876 ("arm64: KVM: force cache clean on page fault when caches are off") Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 9 +-------- arch/arm64/include/asm/kvm_mmu.h | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) commit e363e05e12d76b3311618d442ad545dff4d08728 Author: Vijaya Kumar K Date: Thu Jan 26 19:50:53 2017 +0530 KVM: arm/arm64: Documentation: Update arm-vgic-v3.txt Update error code returned for Invalid CPU interface register value and access in AArch32 mode. Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Vijaya Kumar K Signed-off-by: Marc Zyngier Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e96a006cb0663cca88c45ce125ec5e183f568f80 Author: Vijaya Kumar K Date: Thu Jan 26 19:50:52 2017 +0530 KVM: arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl Userspace requires to store and restore of line_level for level triggered interrupts using ioctl KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO. Reviewed-by: Eric Auger Signed-off-by: Vijaya Kumar K Signed-off-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 6 +++++ arch/arm64/include/uapi/asm/kvm.h | 6 +++++ virt/kvm/arm/vgic/vgic-kvm-device.c | 45 ++++++++++++++++++++++++++++++- virt/kvm/arm/vgic/vgic-mmio-v3.c | 14 ++++++++++ virt/kvm/arm/vgic/vgic-mmio.c | 54 +++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 5 ++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 7 files changed, 131 insertions(+), 1 deletion(-) commit d017d7b0bd7ab32644d35666a6c4412daa0b0a1d Author: Vijaya Kumar K Date: Thu Jan 26 19:50:51 2017 +0530 KVM: arm/arm64: vgic: Implement VGICv3 CPU interface access VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. It is used to identify the cpu for registers access. The VM that supports SEIs expect it on destination machine to handle guest aborts and hence checked for ICC_CTLR_EL1.SEIS compatibility. Similarly, VM that supports Affinity Level 3 that is required for AArch64 mode, is required to be supported on destination machine. Hence checked for ICC_CTLR_EL1.A3V compatibility. The arch/arm64/kvm/vgic-sys-reg-v3.c handles read and write of VGIC CPU registers for AArch64. For AArch32 mode, arch/arm/kvm/vgic-v3-coproc.c file is created but APIs are not implemented. Updated arch/arm/include/uapi/asm/kvm.h with new definitions required to compile for AArch32. The version of VGIC v3 specification is defined here Documentation/virtual/kvm/devices/arm-vgic-v3.txt Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Pavel Fedin Signed-off-by: Vijaya Kumar K Signed-off-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 3 + arch/arm/kvm/Makefile | 4 +- arch/arm/kvm/vgic-v3-coproc.c | 35 ++++ arch/arm64/include/uapi/asm/kvm.h | 3 + arch/arm64/kvm/Makefile | 3 +- arch/arm64/kvm/vgic-sys-reg-v3.c | 346 ++++++++++++++++++++++++++++++++++++ include/kvm/arm_vgic.h | 8 + virt/kvm/arm/vgic/vgic-kvm-device.c | 27 +++ virt/kvm/arm/vgic/vgic-mmio-v3.c | 6 + virt/kvm/arm/vgic/vgic-v3.c | 8 + virt/kvm/arm/vgic/vgic.h | 25 +++ 11 files changed, 465 insertions(+), 3 deletions(-) commit 5fb247d79c04240dce86c842976cde1edde7f7ed Author: Vijaya Kumar K Date: Thu Jan 26 19:50:50 2017 +0530 KVM: arm/arm64: vgic: Introduce VENG0 and VENG1 fields to vmcr struct ICC_VMCR_EL2 supports virtual access to ICC_IGRPEN1_EL1.Enable and ICC_IGRPEN0_EL1.Enable fields. Add grpen0 and grpen1 member variables to struct vmcr to support read and write of these fields. Also refactor vgic_set_vmcr and vgic_get_vmcr() code. Drop ICH_VMCR_CTLR_SHIFT and ICH_VMCR_CTLR_MASK macros and instead use ICH_VMCR_EOI* and ICH_VMCR_CBPR* macros. Signed-off-by: Vijaya Kumar K Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 2 -- virt/kvm/arm/vgic/vgic-mmio-v2.c | 16 ---------------- virt/kvm/arm/vgic/vgic-mmio.c | 16 ++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 20 ++++++++++++++++++-- virt/kvm/arm/vgic/vgic.h | 5 +++++ 5 files changed, 39 insertions(+), 20 deletions(-) commit 5c34153704898ed7ec0f8c0dceb651cbe4b713fd Author: Vijaya Kumar K Date: Thu Jan 26 19:50:49 2017 +0530 irqchip/gic-v3: Add missing system register definitions Define register definitions for ICH_VMCR_EL2, ICC_CTLR_EL1 and ICH_VTR_EL2, ICC_BPR0_EL1, ICC_BPR1_EL1 registers. Signed-off-by: Vijaya Kumar K Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 43 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit 4b927b94d5df24381e850dc1a3ecb34b3136d545 Author: Vijaya Kumar K Date: Thu Jan 26 19:50:48 2017 +0530 KVM: arm/arm64: vgic: Introduce find_reg_by_id() In order to implement vGICv3 CPU interface access, we will need to perform table lookup of system registers. We would need both index_to_params() and find_reg() exported for that purpose, but instead we export a single function which combines them both. Signed-off-by: Pavel Fedin Signed-off-by: Vijaya Kumar K Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 27 ++++++++++++++++----------- arch/arm64/kvm/sys_regs.h | 4 ++++ 2 files changed, 20 insertions(+), 11 deletions(-) commit 94574c9488e253c65ad2e8955163e330f07119b6 Author: Vijaya Kumar K Date: Thu Jan 26 19:50:47 2017 +0530 KVM: arm/arm64: vgic: Add distributor and redistributor access VGICv3 Distributor and Redistributor registers are accessed using KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_REDIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. These registers are accessed as 32-bit and cpu mpidr value passed along with register offset is used to identify the cpu for redistributor registers access. The version of VGIC v3 specification is defined here Documentation/virtual/kvm/devices/arm-vgic-v3.txt Also update arch/arm/include/uapi/asm/kvm.h to compile for AArch32 mode. Signed-off-by: Vijaya Kumar K Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 4 + arch/arm64/include/uapi/asm/kvm.h | 4 + virt/kvm/arm/vgic/vgic-kvm-device.c | 161 ++++++++++++++++++++++++++++++++---- virt/kvm/arm/vgic/vgic-mmio-v2.c | 40 ++++----- virt/kvm/arm/vgic/vgic-mmio-v3.c | 85 +++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.c | 2 +- virt/kvm/arm/vgic/vgic.h | 40 ++++++++- 7 files changed, 300 insertions(+), 36 deletions(-) commit 2df903a89a81c44da7ae94837af5c00a72ce6aaf Author: Vijaya Kumar K Date: Thu Jan 26 19:50:46 2017 +0530 KVM: arm/arm64: vgic: Implement support for userspace access Read and write of some registers like ISPENDR and ICPENDR from userspace requires special handling when compared to guest access for these registers. Refer to Documentation/virtual/kvm/devices/arm-vgic-v3.txt for handling of ISPENDR, ICPENDR registers handling. Add infrastructure to support guest and userspace read and write for the required registers Also moved vgic_uaccess from vgic-mmio-v2.c to vgic-mmio.c Signed-off-by: Vijaya Kumar K Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio-v2.c | 25 ----------- virt/kvm/arm/vgic/vgic-mmio-v3.c | 96 ++++++++++++++++++++++++++++++++-------- virt/kvm/arm/vgic/vgic-mmio.c | 78 +++++++++++++++++++++++++++++--- virt/kvm/arm/vgic/vgic-mmio.h | 19 ++++++++ 4 files changed, 169 insertions(+), 49 deletions(-) commit 74d47d75beb17babe5a999ae357b599caf1a1fcd Author: Heiner Kallweit Date: Tue Aug 2 02:44:07 2016 -0300 [media] rc: refactor raw handler kthread I think we can get rid of the spinlock protecting the kthread from being interrupted by a wakeup in certain parts. Even with the current implementation of the kthread the only lost wakeup scenario could happen if the wakeup occurs between the kfifo_len check and setting the state to TASK_INTERRUPTIBLE. In the changed version we could lose a wakeup if it occurs between processing the fifo content and setting the state to TASK_INTERRUPTIBLE. This scenario is covered by an additional check for available events in the fifo and setting the state to TASK_RUNNING in this case. In addition the changed version flushes the kfifo before ending when the kthread is stopped. With this patch we gain: - Get rid of the spinlock - Simplify code - Don't grep / release the mutex for each individual event but just once for the complete fifo content. This reduces overhead if a driver e.g. triggers processing after writing the content of a hw fifo to the kfifo. Signed-off-by: Heiner Kallweit Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 2 -- drivers/media/rc/rc-ir-raw.c | 46 +++++++++++++++-------------------------- 2 files changed, 17 insertions(+), 31 deletions(-) commit 82bbd8c8400edea612505ab8992bf53e540cda75 Author: Andy Shevchenko Date: Thu Jan 26 17:10:38 2017 +0200 pinctrl: broxton: No need to take pointer of a pointer There is no need to take pointer of a pointer to an array of SoC data in platform driver. Do it in the same way as it's done for ACPI. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-broxton.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db88977894aba193deee70b335c3db58b7ac6393 Author: Chris Packham Date: Mon Jan 30 12:20:32 2017 +1300 arm: mvebu: support for SMP on 98DX3336 SoC Compared to the armada-xp the 98DX3336 uses different registers to set the boot address for the secondary CPU so a new enable-method is needed. This will only work if the machine definition doesn't define an overall smp_ops because there is not currently a way of overriding this from the device tree if it is set in the machine definition. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Documentation/devicetree/bindings/arm/cpus.txt | 1 + .../bindings/arm/marvell/98dx3236-resume-ctrl.txt | 16 +++++ arch/arm/mach-mvebu/platsmp.c | 75 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) commit 7f36f5d11cda050b118f76d774151427a18d15ef Merge: 2b24efa 566cf87 Author: Linus Walleij Date: Mon Jan 30 14:39:20 2017 +0100 Merge tag 'v4.10-rc6' into devel Linux 4.10-rc6 Resolved conflicts in: drivers/pinctrl/pinctrl-amd.c drivers/pinctrl/samsung/pinctrl-exynos.c commit 0cffd6312f3fd9e51fec946eb918a988b109b520 Author: Sakari Ailus Date: Mon Nov 28 09:48:33 2016 -0200 [media] davinci: Use a local media device pointer instead The function has a local variable that points to the media device; use that instead of finding the media device under the entity. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2312d8b8a09a5524bd511c6626b6d666dbd1afb1 Author: Sakari Ailus Date: Mon Nov 28 09:48:03 2016 -0200 [media] xilinx: Use a local media device pointer instead The function has a local variable that points to the media device; use that instead of finding the media device under the entity. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/xilinx/xilinx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ac44c88fd060c5729cdcc0186e0914408b20c8 Author: Sakari Ailus Date: Mon Nov 28 08:42:44 2016 -0200 [media] omap3isp: Use a local media device pointer instead The function has a local variable that points to the media device; use that instead of finding the media device under the entity. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa79a84f65b37785ff56b30dc808c88bbc25a91b Author: Sakari Ailus Date: Wed Jul 20 12:39:02 2016 -0300 [media] media: entity: Add debug information to graph walk Use dev_dbg() to tell about the progress of the graph traversal algorithm. This is intended to make debugging of the algorithm easier. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 91b619adeb3753dc8fdc9f6aef692701f88f7420 Author: Sakari Ailus Date: Thu Dec 8 13:22:29 2016 -0200 [media] media: Use single quotes to quote entity names Instead of double quotes, use single quotes to quote entity names. Using single quotes is consistent with the English language and is also in line with the practices across the kernel. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e17a0ded5ca158bbb801082edc0810b38b1d4e74 Author: Wladimir J. van der Laan Date: Thu Dec 15 13:11:30 2016 +0100 drm/etnaviv: set up initial PULSE_EATER register Set up the PULSE_EATER register (0x0010C) in etnaviv_gpu_hw_init. This ports three mostly undocumented model/revision-specific register overrides from the Vivante kernel driver. This is relevant as at least the "disable internal DFS" for revisions > 0x5420 has shown to have a huge impact on shader performance (sped up memory read performance by 7.5x and write performance by 1.5x) on an affected GPU. Signed-off-by: Wladimir J. van der Laan Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit a1540a7fa4ec53713f19a76f915d9ddeefccfe9f Author: Wladimir J. van der Laan Date: Thu Dec 15 13:03:02 2016 +0100 drm/etnaviv: add new GC3000 sensitive states - Add PS.INST_ADDR (0x01028) and VS.INST_ADDR (0x0086C): GC3000 loads shader code from these addresses if ICACHE is used. - Add new NFE vertex stream addresses (0x14600). - Add PE Multple Render Target pipe addresses (0x14800). - Add TS Multiple Render Target pipe addresses (0x017C0, 0x17E0). Signed-off-by: Wladimir J. van der Laan Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c3a696b6e8f8f75f9f75e556a9f9f6472eae2655 Author: Lv Zheng Date: Fri Jan 20 16:42:48 2017 +0800 ACPI / EC: Use busy polling mode when GPE is not enabled When GPE is not enabled, it is not efficient to use the wait polling mode as it introduces an unexpected scheduler delay. So before the GPE handler is installed, this patch uses busy polling mode for all EC(s) and the logic can be applied to non boot EC(s) during the suspend/resume process. Link: https://bugzilla.kernel.org/show_bug.cgi?id=191561 Tested-by: Jakobus Schurz Tested-by: Chen Yu Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 62 ++++++++++++++++++++++++------------------------- drivers/acpi/internal.h | 4 ++-- 2 files changed, 32 insertions(+), 34 deletions(-) commit 4c237371f290d1ed3b2071dd43554362137b1cce Author: Lv Zheng Date: Wed Jan 4 11:17:17 2017 +0800 ACPI / EC: Remove old CLEAR_ON_RESUME quirk IRQ polling logic has been implemented to drain the post-boot/resume EC events: 1. Triggered by the following code, invoked from acpi_ec_enable_event(): if (!test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) advance_transaction(ec); 2. Drained by the following code, invoked after acpi_ec_complete_query(): if (status & ACPI_EC_FLAG_SCI) acpi_ec_submit_query(ec); This facility is safer than the old CLEAR_ON_RESUME quirk as the CLEAR_ON_RESUME quirk sends EC query commands unconditionally. The behavior is apparently not suitable for firmware that requires QUERY_HANDSHAKE quirk. Though the QUERY_HANDSHAKE quirk isn't used now because of the improvement done in the EC transaction state machine (ec_event_clearing=QUERY), it is the proof that we cannot send EC query command unconditionally. So it's time to delete the out-dated CLEAR_ON_RESUME quirk to let the users to try the newer approach. Link: https://bugzilla.kernel.org/show_bug.cgi?id=191211 Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) commit 612f0c0b859ee99f800dc88ad470d938d90ad111 Author: Borislav Petkov Date: Thu Jan 26 09:08:19 2017 +0100 perf/x86/events: Add an AMD-specific Makefile Move the AMD pieces from the generic Makefile so that $ make arch/x86/events/amd/.s can work too. Otherwise you get: $ make arch/x86/events/amd/ibs.s scripts/Makefile.build:44: arch/x86/events/amd/Makefile: No such file or directory make[1]: *** No rule to make target 'arch/x86/events/amd/Makefile'. Stop. Makefile:1636: recipe for target 'arch/x86/events/amd/ibs.s' failed make: *** [arch/x86/events/amd/ibs.s] Error 2 Signed-off-by: Borislav Petkov 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 Link: http://lkml.kernel.org/r/20170126080819.417-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/events/Makefile | 13 +++---------- arch/x86/events/amd/Makefile | 7 +++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit da6adaea2b7ef658c61a557c28508668eac29fe1 Author: Janakarajan Natarajan Date: Mon Jan 16 17:36:23 2017 -0600 perf/x86/amd/uncore: Update sysfs attributes for Family17h processors This patch updates the sysfs attributes for AMD Family17h processors. In Family17h, the event bit position is changed for both the NorthBridge and Last level cache counters. The sysfs attributes are assigned based on the family and the type of the counter. Signed-off-by: Janakarajan Natarajan Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/617570ed3634e804991f95db62c3cf3856a9d2a7.1484598705.git.Janakarajan.Natarajan@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 77 ++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 21 deletions(-) commit bc1daef6b5da574bca0a2ec7f9b4d0c5fe0c7d11 Author: Janakarajan Natarajan Date: Mon Jan 16 17:36:22 2017 -0600 perf/x86/amd/uncore: Update the number of uncore counters This patch updates the AMD uncore driver to support AMD Family17h processors. In Family17h, there are two extra last level cache counters. The maximum available counters is increased and the number of counters for each uncore type is now based on the family. Signed-off-by: Janakarajan Natarajan Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/799f9c5be8963cc209d9169a08f4a2643b748dc7.1484598705.git.Janakarajan.Natarajan@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit a83f4c00dd6a646ac3c7604ee255d732fc5e0e0b Author: Janakarajan Natarajan Date: Mon Jan 16 17:36:21 2017 -0600 perf/x86/amd/uncore: Rename 'L2' to 'LLC' This patch renames L2 counters to LLC counters. In AMD Family17h processors, L3 cache counter is supported. Since older families have at most L2 counters, last level cache (LLC) indicates L2/L3 based on the family. Signed-off-by: Janakarajan Natarajan Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/5d8cd8736d8d578354597a548e64ff16210c319b.1484598705.git.Janakarajan.Natarajan@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 98 ++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit 40999312c703f80e8d31bc77cf00e6e84d36e091 Author: Kan Liang Date: Wed Jan 18 08:21:01 2017 -0500 perf/core: Try parent PMU first when initializing a child event perf has additional overhead when monitoring the task which frequently generates child tasks. perf_init_event() is one of the hotspots for the additional overhead: Currently, to get the PMU, it tries to search the type in pmu_idr at first. But it is not always successful, especially for the widely used PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE events. So it has to go to the slow path which go through the whole PMUs list. It will be a big performance issue, if the PMUs list is long (e.g. server with many uncore boxes) and the task frequently generates child tasks. The child event inherits its parent event. So the child event should try its parent PMU first. Here is some data from the overhead test on Broadwell server: perf record -e $TEST_EVENTS -- ./loop.sh 50000 loop.sh start=$(date +%s%N) i=0 while [ "$i" -le "$1" ] do date > /dev/null i=`expr $i + 1` done end=$(date +%s%N) elapsed=`expr $end - $start` Event# Original elapsed time Elapsed time with patch delta 1 196,573,192,397 189,162,029,998 -3.77% 2 257,567,753,013 241,620,788,683 -6.19% 4 398,730,726,971 370,518,938,714 -7.08% 8 824,983,761,120 740,702,489,329 -10.22% 16 1,883,411,923,498 1,672,027,508,355 -11.22% ... which shows a nice performance improvement. 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 Link: http://lkml.kernel.org/r/1484745662-15928-2-git-send-email-kan.liang@intel.com [ Tidied up the changelog and the code comment. ] Signed-off-by: Ingo Molnar kernel/events/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 487f05e18aa4efacee6357480f293a5afe6593b5 Author: Alexander Shishkin Date: Thu Jan 19 18:43:30 2017 +0200 perf/core: Optimize event rescheduling on active contexts When new events are added to an active context, we go and reschedule all cpu groups and all task groups in order to preserve the priority (cpu pinned, task pinned, cpu flexible, task flexible), but in reality we only need to reschedule groups of the same priority as that of the events being added, and below. This patch changes the behavior so that only groups that need to be rescheduled are rescheduled. Reported-by: Adrian Hunter 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/20170119164330.22887-3-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 80 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 11 deletions(-) commit fe45bafbd0e1b5e828aa9d44d07e569df85869a2 Author: Alexander Shishkin Date: Thu Jan 19 18:43:29 2017 +0200 perf/core: Don't re-schedule CPU flexible events needlessly In the sched-in path, we first remove a CPU's flexible events in order to give priority to the task's pinned events. However, this step can be safely skipped if the task doesn't have its own pinned events. This patch implements this skipping. Reported-by: Adrian Hunter 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/20170119164330.22887-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1fd7e416995401ec082fc0fe6090a223969beda5 Author: David Carrillo-Cisneros Date: Wed Jan 18 11:24:54 2017 -0800 perf/core: Remove perf_cpu_context::unique_pmu cpuctx->unique_pmu was originally introduced as a way to identify cpuctxs with shared pmus in order to avoid visiting the same cpuctx more than once in a for_each_pmu loop. cpuctx->unique_pmu == cpuctx->pmu in non-software task contexts since they have only one pmu per cpuctx. Since perf_pmu_sched_task() is only called in hw contexts, this patch replaces cpuctx->unique_pmu by cpuctx->pmu in it. The change above, together with the previous patch in this series, removed the remaining uses of cpuctx->unique_pmu, so we remove it altogether. Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Dave Hansen Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Paul Turner Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vikas Shivappa Cc: Vince Weaver Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170118192454.58008-3-davidcc@google.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 1 - kernel/events/core.c | 31 +------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) commit 058fe1c0440e68a1ba3c2270ae43e9f0298b27d8 Author: David Carrillo-Cisneros Date: Wed Jan 18 11:24:53 2017 -0800 perf/core: Make cgroup switch visit only cpuctxs with cgroup events This patch follows from a conversation in CQM/CMT's last series about speeding up the context switch for cgroup events: https://patchwork.kernel.org/patch/9478617/ This is a low-hanging fruit optimization. It replaces the iteration over the "pmus" list in cgroup switch by an iteration over a new list that contains only cpuctxs with at least one cgroup event. This is necessary because the number of PMUs have increased over the years e.g modern x86 server systems have well above 50 PMUs. The iteration over the full PMU list is unneccessary and can be costly in heavy cache contention scenarios. Below are some instrumentation measurements with 10, 50 and 90 percentiles of the total cost of context switch before and after this optimization for a simple array read/write microbenchark. Contention Level Nr events Before (us) After (us) Median L2 L3 types (10%, 50%, 90%) (10%, 50%, 90% Speedup -------------------------------------------------------------------------- Low Low 1 (1.72, 2.42, 5.85) (1.35, 1.64, 5.46) 29% High Low 1 (2.08, 4.56, 19.8) (1720, 2.20, 13.7) 51% High High 1 (2.86, 10.4, 12.7) (2.54, 4.32, 12.1) 58% Low Low 2 (1.98, 3.20, 6.89) (1.68, 2.41, 8.89) 24% High Low 2 (2.48, 5.28, 22.4) (2150, 3.69, 14.6) 30% High High 2 (3.32, 8.09, 13.9) (2.80, 5.15, 13.7) 36% where: 1 event type = cycles 2 event types = cycles,intel_cqm/llc_occupancy/ Contention L2 Low: workset < L2 cache size. High: " >> L2 " " . Contention L3 Low: workset of task on all sockets < L3 cache size. High: " " " " " " >> L3 " " . Median Speedup is (50%ile Before - 50%ile After) / 50%ile Before Unsurprisingly, the benefits of this optimization decrease with the number of cpuctxs with a cgroup events, yet, is never detrimental. Tested-by: Mark Rutland Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Dave Hansen Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Paul Turner Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vikas Shivappa Cc: Vince Weaver Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170118192454.58008-2-davidcc@google.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 1 + kernel/events/core.c | 98 +++++++++++++++++++++------------------------- 2 files changed, 46 insertions(+), 53 deletions(-) commit 07f76443ef81e2b76bb6f7858ba183cd60357ada Author: Wei Yongjun Date: Tue Jan 17 14:22:46 2017 +0000 mtd: nand: mediatek: remove redundant dev_err call in mtk_nfc_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Acked-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_nand.c | 1 - 1 file changed, 1 deletion(-) commit de0b34455afd1204a3644c9eb25b0b3b0aeb2fe9 Author: Jean Delvare Date: Mon Jan 9 11:58:14 2017 +0100 mtd: nand: Add OX820 NAND hardware dependency The oxnas NAND driver is only needed for a specific platform, do not propose it on other platforms unless build-testing. Signed-off-by: Jean Delvare Fixes: 668592492409 ("mtd: nand: Add OX820 NAND Support") Cc: Rob Herring Cc: Neil Armstrong Cc: Boris Brezillon Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Cyrille Pitchen Acked-by: Marek Vasut Acked-by: Neil Armstrong Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4404d7d821c33ac8105f1d52deb60f736d7c6a06 Author: Linus Walleij Date: Sun Dec 18 12:34:55 2016 +0100 mtd: nand: fsmc: remove stale non-DT probe path The FSMC driver has an execution path and a header file in that serves to support passing in platform data through board files, albeit no upstream users of this mechanism exist. The header file also contains function headers for functions that do not exist in the kernel. Delete this and move the platform data struct, parsing and handling into the driver, assume we are using OF and make the driver depend on OF, remove the ifdefs making that optional. Cc: Viresh Kumar Cc: Stefan Roese Cc: Vipin Kumar Signed-off-by: Linus Walleij Reviewed-by: Stefan Roese Acked-by: Viresh Kumar Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 1 + drivers/mtd/nand/fsmc_nand.c | 153 ++++++++++++++++++++++++++++++++++++------ include/linux/mtd/fsmc.h | 156 ------------------------------------------- 3 files changed, 133 insertions(+), 177 deletions(-) commit 4339b7fdbb90ab579862b0fcde6ee0f342f12692 Author: Fabio Estevam Date: Tue Nov 29 13:28:52 2016 -0200 mtd: nand: lpc32xx_slc: Remove unneeded NULL check on 'rc' devm_ioremap_resource() does a NULL check on the 'rc' argument, so remove the unneeded manual NULL check. While at it, place the 'rc' assignment just before devm_ioremap_resource() to improve readability. Signed-off-by: Fabio Estevam Acked-by: Marek Vasut Acked-by: Vladimir Zapolskiy Signed-off-by: Boris Brezillon drivers/mtd/nand/lpc32xx_slc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 61babe943938bb41fcd7e2b1dec7d1537ea3892f Author: Randy Dunlap Date: Mon Nov 21 18:32:08 2016 -0800 mtd: nand: fix nand.h kernel-doc warnings Fix kernel-doc warnings in : ..//include/linux/mtd/nand.h:658: warning: No description found for parameter 'tCEH_min' ..//include/linux/mtd/nand.h:877: warning: No description found for parameter 'data_interface' Fixes: eee64b700e26 ("mtd: nand: Introduce nand_data_interface") Signed-off-by: Randy Dunlap Signed-off-by: Boris Brezillon include/linux/mtd/nand.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b1d4185050d204d638166e62b85c26c81326eff Author: Thierry Reding Date: Fri Jan 20 15:57:35 2017 +0100 gpu: host1x: Set OF node for new host1x devices We use the OF node of the host1x device's parent because it's the closest we have. Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 1 + 1 file changed, 1 insertion(+) commit ae5112a825ac7460c0c2c6c3daf21142c741d058 Merge: e2cf00c 0b3589b Author: Ingo Molnar Date: Mon Jan 30 11:47:00 2017 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 619bd4a71874a8fd78eb6ccf9f272c5e98bcc7b7 Author: Sebastian Andrzej Siewior Date: Tue Jan 24 15:40:06 2017 +0100 sched/rt: Add a missing rescheduling point Since the change in commit: fd7a4bed1835 ("sched, rt: Convert switched_{from, to}_rt() / prio_changed_rt() to balance callbacks") ... we don't reschedule a task under certain circumstances: Lets say task-A, SCHED_OTHER, is running on CPU0 (and it may run only on CPU0) and holds a PI lock. This task is removed from the CPU because it used up its time slice and another SCHED_OTHER task is running. Task-B on CPU1 runs at RT priority and asks for the lock owned by task-A. This results in a priority boost for task-A. Task-B goes to sleep until the lock has been made available. Task-A is already runnable (but not active), so it receives no wake up. The reality now is that task-A gets on the CPU once the scheduler decides to remove the current task despite the fact that a high priority task is enqueued and waiting. This may take a long time. The desired behaviour is that CPU0 immediately reschedules after the priority boost which made task-A the task with the lowest priority. Suggested-by: Peter Zijlstra Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Thomas Gleixner Fixes: fd7a4bed1835 ("sched, rt: Convert switched_{from, to}_rt() prio_changed_rt() to balance callbacks") Link: http://lkml.kernel.org/r/20170124144006.29821-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 3 +-- kernel/sched/rt.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 4b12db939166042eb78e592bdf94ef113c14e379 Author: Mathieu Poirier Date: Tue Jan 24 14:11:35 2017 -0700 sched/core: Fix &rd->cpudl memory leak While in the process of initialising a root domain, if function cpupri_init() fails the memory allocated in cpudl_init() is not reclaimed. Adding a new goto target to cleanup the previous initialistion of the root_domain's dl_bw structure reclaims said memory. Signed-off-by: Mathieu Poirier Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1485292295-21298-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92c99ac829931abba33107e09358447c8ad6bd32 Author: Mathieu Poirier Date: Tue Jan 24 14:11:34 2017 -0700 sched/core: Fix &rd->rto_mask memory leak If function cpudl_init() fails the memory allocated for &rd->rto_mask needs to be freed, something this patch is addressing. Signed-off-by: Mathieu Poirier Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1485292295-21298-1-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d25b35ea3729affd37d69c78191ce6f92766e1a Author: Matt Fleming Date: Wed Oct 26 16:15:44 2016 +0100 sched/fair: Restore previous rq_flags when migrating tasks in hotplug __migrate_task() can return with a different runqueue locked than the one we passed as an argument. So that we can repin the lock in migrate_tasks() (and keep the update_rq_clock() bit) we need to restore the old rq_flags before repinning. Note that it wouldn't be correct to change move_queued_task() to repin because of the change of runqueue and the fact that having an up-to-date clock on the initial rq doesn't mean the new rq has one too. Signed-off-by: Matt Fleming 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/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1b1d62254df0fe42a711eb71948f915918987790 Author: Peter Zijlstra Date: Mon Jan 23 16:05:55 2017 +0100 sched/core: Add missing update_rq_clock() call in sched_move_task() Bug was noticed via this warning: WARNING: CPU: 6 PID: 1 at kernel/sched/sched.h:804 detach_task_cfs_rq+0x8e8/0xb80 rq->clock_update_flags < RQCF_ACT_SKIP Modules linked in: CPU: 6 PID: 1 Comm: systemd Not tainted 4.10.0-rc5-00140-g0874170baf55-dirty #1 Hardware name: Supermicro SYS-4048B-TRFT/X10QBi, BIOS 1.0 04/11/2014 Call Trace: dump_stack+0x4d/0x65 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 detach_task_cfs_rq+0x8e8/0xb80 ? allocate_cgrp_cset_links+0x59/0x80 task_change_group_fair+0x27/0x150 sched_change_group+0x48/0xf0 sched_move_task+0x53/0x150 cpu_cgroup_attach+0x36/0x70 cgroup_taskset_migrate+0x175/0x300 cgroup_migrate+0xab/0xd0 cgroup_attach_task+0xf0/0x190 __cgroup_procs_write+0x1ed/0x2f0 cgroup_procs_write+0x14/0x20 cgroup_file_write+0x3f/0x100 kernfs_fop_write+0x104/0x180 __vfs_write+0x37/0x140 vfs_write+0xb8/0x1b0 SyS_write+0x55/0xc0 do_syscall_64+0x61/0x170 entry_SYSCALL64_slow_path+0x25/0x25 Reported-by: Ingo Molnar Reported-by: Borislav Petkov 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/core.c | 1 + 1 file changed, 1 insertion(+) commit 49ee576809d837442624ac18804b07943267cd57 Author: Peter Zijlstra Date: Thu Jan 19 18:44:08 2017 +0100 sched/core: Optimize pick_next_task() for idle_sched_class Steve noticed that when we switch from IDLE to SCHED_OTHER we fail to take the shortcut, even though all runnable tasks are of the fair class, because prev->sched_class != &fair_sched_class. Since I reworked the put_prev_task() stuff, we don't really care about prev->class here, so removing that condition will allow this case. This increases the likely case from 78% to 98% correct for Steve's workload. Reported-by: Steven Rostedt (VMware) Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170119174408.GN6485@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b9c16a0e1f733c97e48798b2a9362c485bb3b731 Author: Peter Zijlstra Date: Tue Jan 17 16:06:09 2017 +0100 locking/mutex: Fix lockdep_assert_held() fail In commit: 659cf9f5824a ("locking/ww_mutex: Optimize ww-mutexes by waking at most one waiter for backoff when acquiring the lock") I replaced a comment with a lockdep_assert_held(). However it turns out we hide that lock from lockdep for hysterical raisins, which results in the assertion always firing. Remove the old debug code as lockdep will easily spot the abuse it was meant to catch, which will make the lock visible to lockdep and make the assertion work as intended. Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Nicolai Haehnle Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 659cf9f5824a ("locking/ww_mutex: Optimize ww-mutexes by waking at most one waiter for backoff when acquiring the lock") Link: http://lkml.kernel.org/r/20170117150609.GB32474@worktop Signed-off-by: Ingo Molnar kernel/locking/mutex-debug.h | 17 ----------------- kernel/locking/mutex.c | 25 +++++++++++-------------- kernel/locking/mutex.h | 4 ---- 3 files changed, 11 insertions(+), 35 deletions(-) commit 4009f4b3a9d8b74547269f293e6a920adf278996 Author: Steven Rostedt (VMware) Date: Thu Jan 19 11:32:34 2017 -0500 locking/rtmutex: Flip unlikely() branch to likely() in __rt_mutex_slowlock() Running my likely/unlikely profiler for 3 weeks on two production machines, I discovered that the unlikely() test in __rt_mutex_slowlock() checking if state is TASK_INTERRUPTIBLE is hit 100% of the time, making it a very likely case. The reason is, on a vanilla kernel, the majority case of calling rt_mutex() is from the futex code. This code is always called as TASK_INTERRUPTIBLE. In the -rt patch, this code is commonly called when PREEMPT_RT is enabled with TASK_UNINTERRUPTIBLE. But that's not the likely scenario. The rt_mutex() code should be optimized for the common vanilla case, and that is from a futex, with TASK_INTERRUPTIBLE as the state. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170119113234.1efeedd1@gandalf.local.home Signed-off-by: Ingo Molnar kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8bcf0e1b21273584b6829bafe30f2949a062c34 Author: Andre Przywara Date: Tue Jan 10 01:22:33 2017 +0000 arm64: allwinner: add BananaPi-M64 support The Banana Pi M64 board is a typical single board computer based on the Allwinner A64 SoC. Aside from the usual peripherals it features eMMC storage, which is connected to the 8-bit capable SDHC2 controller. Also it has a soldered WiFi/Bluetooth chip, so we enable UART1 and SDHC1 as those two interfaces are connected to it. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 120 +++++++++++++++++++++ 2 files changed, 121 insertions(+) commit e7ba733d32cc9487b62b07219ad911c77764a681 Author: Andre Przywara Date: Tue Jan 10 01:22:32 2017 +0000 arm64: allwinner: a64: add UART1 pin nodes On many boards UART1 connects to a Bluetooth chip, so add the pinctrl nodes for the only pins providing access to that UART. That includes those pins for hardware flow control (RTS/CTS). Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ebe3ae29c6314217edf40d9ee23c36d610ff0fb8 Author: Andre Przywara Date: Tue Jan 10 01:22:31 2017 +0000 arm64: allwinner: pine64: add MMC support All Pine64 boards connect an micro-SD card slot to the first MMC controller. Enable the respective DT node and specify the (always-on) regulator and card-detect pin. As a micro-SD slot does not feature a write-protect switch, we disable this feature. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 22be992faea70b95bcb48e2d5efa41733fcfeab7 Author: Maxime Ripard Date: Mon Jan 9 15:53:59 2017 +0100 arm64: allwinner: a64: Increase the MMC max frequency The eMMC controller seem to have a maximum frequency of 200MHz, while the regular MMC controllers are capped at 150MHz. Since older SoCs cannot go that high, we cannot change the default maximum frequency, but fortunately for us we have a property for that in the DT. This also has the side effect of allowing to use the MMC HS200 and SD SDR104 modes for the boards that support it (with either 1.2v or 1.8v IOs). Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit a3e8f4926248b3c12933aacec4432e9b6de004bb Author: Maxime Ripard Date: Mon Jan 9 16:39:15 2017 +0100 arm64: allwinner: a64: Add MMC pinctrl nodes The A64 only has a single set of pins for each MMC controller. Since we already have boards that require all of them, let's add them to the DTSI. Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit f3dff3478a8a7b09f9a92023955a151584658893 Author: Andre Przywara Date: Thu Oct 6 02:25:22 2016 +0100 arm64: allwinner: a64: Add MMC nodes The A64 has 3 MMC controllers, one of them being especially targeted to eMMC. Among other things, it has a data strobe signal and a 8 bits data width. The two other are more usual controllers that will have a 4 bits width at most and no data strobe signal, which limits it to more usual SD or MMC peripherals. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard Tested-by: Florian Vaussard Acked-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 9556ad6ad0c60a23a7db36af65c9ffff51bbf644 Merge: 4c45c51 b18b6a9 Author: Thomas Gleixner Date: Mon Jan 30 11:22:39 2017 +0100 Merge branch 'fortglx/4.11/time' of https://git.linaro.org/people/john.stultz/linux into timers/core - Remove unused functions - Document udelay inaccuracy - Remove posix timer data from task struct when posix timers are off commit a8c39dd77cb9fad0d0e5c5e6581851bdcbc1e6f6 Author: Christian Borntraeger Date: Wed Jan 18 16:01:02 2017 +0100 KVM: s390: Add debug logging to basic cpu model interface Let's log something for changes in facilities, cpuid and ibc now that we have a cpu model in QEMU. All of these calls are pretty seldom, so we will not spill the log, the they will help to understand pontential guest issues, for example if some instructions are fenced off. As the s390 debug feature has a limited amount of parameters and strings must not go away we limit the facility printing to 3 double words, instead of building that list dynamically. This should be enough for several years. If we ever exceed 3 double words then the logging will be incomplete but no functional impact will happen. Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit af0f339a6c18468421a67f361a60f14bc5144345 Merge: 4bead2a 0447819 Author: Christian Borntraeger Date: Mon Jan 30 11:19:20 2017 +0100 Merge tag 'kvm-s390-master-4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kernelorgnext avoid merge conflicts, pull update for master also into next. commit 4bead2a423ea5268b0ab3cba058e215c65ee2cbd Author: Janosch Frank Date: Fri Jan 27 10:23:59 2017 +0100 KVM: s390: Fix RRBE return code not being CC reset_guest_reference_bit needs to return the CC, so we can set it in the guest PSW when emulating RRBE. Right now it only returns 0. Let's fix that. Signed-off-by: Janosch Frank Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a69cbe81b2f38437113c05019a134a4731a3aa78 Author: David Hildenbrand Date: Tue May 24 12:40:11 2016 +0200 KVM: s390: guestdbg: filter PER i-fetch on EXECUTE properly When we get a PER i-fetch event on an EXECUTE or EXECUTE RELATIVE LONG instruction, because the executed instruction generated a PER i-fetch event, then the PER address points at the EXECUTE function, not the fetched one. Therefore, when filtering PER events, we have to take care of the really fetched instruction, which we can only get by reading in guest virtual memory. For icpt code 4 and 56, we directly have additional information about an EXECUTE instruction at hand. For icpt code 8, we always have to read in guest virtual memory. Signed-off-by: David Hildenbrand Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger [small fixes] arch/s390/kvm/guestdbg.c | 98 ++++++++++++++++++++++++++++++++++++++++++----- arch/s390/kvm/intercept.c | 4 +- arch/s390/kvm/kvm-s390.h | 2 +- 3 files changed, 93 insertions(+), 11 deletions(-) commit 3fa8cad7402cfe982a60d746609e89aafe15d131 Author: David Hildenbrand Date: Tue May 24 12:00:49 2016 +0200 KVM: s390: prepare to read random guest instructions We will have to read instructions not residing at the current PSW address. Reviewed-by: Eric Farman Signed-off-by: David Hildenbrand Cc: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.h | 9 +++++---- arch/s390/kvm/kvm-s390.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit f41711788c9c281a61c8cf3222dca8a0e74a4fb3 Author: David Hildenbrand Date: Tue May 24 12:33:52 2016 +0200 KVM: s390: guestdbg: filter i-fetch events on icpts We already filter PER events reported via icpt code 8. For icpt code 4 and 56, this is still missing. So let's properly detect if we have a debugging event and if we have to inject a PER i-fetch event into the guest at all. Signed-off-by: David Hildenbrand Reviewed-by: Christian Borntraeger Cc: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/guestdbg.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 2f87d942be9d0f86e44fbcbd473264c26c7f1809 Author: Guenther Hutzl Date: Fri Jun 3 14:37:17 2016 +0200 KVM: s390: Introduce BCD Vector Instructions to the guest We can directly forward the vector BCD instructions to the guest if available and VX is requested by user space. Please note that user space will have to take care of the final state of the facility bit when migrating to older machines. Signed-off-by: Guenther Hutzl Reviewed-by: Christian Borntraeger Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 4 ++++ 1 file changed, 4 insertions(+) commit 53743aa7f14671dea6f3567ddca2f7d97454f3fe Author: Maxim Samoylov Date: Wed Feb 10 10:31:23 2016 +0100 KVM: s390: Introduce Vector Enhancements facility 1 to the guest We can directly forward the vector enhancement facility 1 to the guest if available and VX is requested by user space. Please note that user space will have to take care of the final state of the facility bit when migrating to older machines. Reviewed-by: David Hildenbrand Signed-off-by: Maxim Samoylov Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 4 ++++ 1 file changed, 4 insertions(+) commit 27f67f8727843fbbbcd05a003183af79693759e9 Author: Christian Borntraeger Date: Fri Dec 9 12:44:40 2016 +0100 KVM: s390: Get rid of ar_t sparse with __CHECK_ENDIAN__ shows that ar_t was never properly used across KVM on s390. We can now: - fix all places - do not make ar_t special Since ar_t is just used as a register number (no endianness issues for u8), and all other register numbers are also just plain int variables, let's just use u8, which matches the __u8 in the userspace ABI for the memop ioctl. Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank Reviewed-by: Cornelia Huck arch/s390/kvm/gaccess.c | 14 +++++++------- arch/s390/kvm/gaccess.h | 10 +++++----- arch/s390/kvm/kvm-s390.h | 10 ++++------ arch/s390/kvm/priv.c | 30 +++++++++++++++--------------- 4 files changed, 31 insertions(+), 33 deletions(-) commit d051ae531324fb5130366d47e05bf8eadeb95535 Author: Heiko Carstens Date: Tue Dec 13 14:25:32 2016 +0100 KVM: s390: get rid of bogus cc initialization The plo inline assembly has a cc output operand that is always written to and is also as such an operand declared. Therefore the compiler is free to omit the rather pointless and misleading initialization. Get rid of this. Signed-off-by: Heiko Carstens Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1836f583d78bdd15ef748f4d85bf007569c7ad Author: Janosch Frank Date: Thu Aug 4 09:57:36 2016 +0200 KVM: s390: instruction-execution-protection support The new Instruction Execution Protection needs to be enabled before the guest can use it. Therefore we pass the IEP facility bit to the guest and enable IEP interpretation. Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 2 ++ arch/s390/kvm/vsie.c | 3 +++ arch/s390/tools/gen_facilities.c | 1 + 3 files changed, 6 insertions(+) commit a679c547d19ded9b7d1a88e17cf5e5b69ac619b6 Author: Christian Borntraeger Date: Thu Dec 15 15:58:14 2016 +0100 KVM: s390: gaccess: add ESOP2 handling When we access guest memory and run into a protection exception, we need to pass the exception data to the guest. ESOP2 provides detailed information about all protection exceptions which ESOP1 only partially provided. The gaccess changes make sure, that the guest always gets all available information. Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.c | 12 +++++++++--- arch/s390/tools/gen_facilities.c | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) commit 37efa4b41ffb31dcdfc3beb97d47992bb2a083e5 Author: Alex Shi Date: Thu Jan 12 21:27:03 2017 +0800 CPU / PM: expose pm_qos_resume_latency for CPUs The cpu-dma PM QoS constraint impacts all the cpus in the system. There is no way to let the user to choose a PM QoS constraint per cpu. The following patch exposes to the userspace a per cpu based sysfs file in order to let the userspace to change the value of the PM QoS latency constraint. This change is inoperative in its form and the cpuidle governors have to take into account the per cpu latency constraint in addition to the global cpu-dma latency constraint in order to operate properly. BTW The pm_qos_resume_latency usage defined in Documentation/ABI/testing/sysfs-devices-power The /sys/devices/.../power/pm_qos_resume_latency_us attribute contains the PM QoS resume latency limit for the given device, which is the maximum allowed time it can take to resume the device, after it has been suspended at run time, from a resume request to the moment the device will be ready to process I/O, in microseconds. If it is equal to 0, however, this means that the PM QoS resume latency may be arbitrary. Signed-off-by: Alex Shi Signed-off-by: Rafael J. Wysocki drivers/base/cpu.c | 2 ++ 1 file changed, 2 insertions(+) commit 9908859acaa95640d4a07991a93f7cd5bfc18e02 Author: Alex Shi Date: Thu Jan 12 21:27:04 2017 +0800 cpuidle/menu: add per CPU PM QoS resume latency consideration There may be special requirements on CPU response time, like if a interrupt is pinned to a CPU, that CPU should not go into excessively deep idle states. For this reason, add a mechanism for adding PM QoS resume latency constraints for individual CPUs and modify the menu governor to take them into account. To that end, extend the device PM QoS pm_qos_resume_latency attribute to CPUs, which is possible, because the exit latency for CPUs is effectively equivalent to the resume latency for devices. Signed-off-by: Alex Shi Acked-by: Rik van Riel [ rjw : Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/menu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef Author: Alex Shi Date: Thu Jan 12 21:27:02 2017 +0800 cpuidle/menu: stop seeking deeper idle if current state is deep enough Obsolete commit 71abbbf856a0 (cpuidle: extend cpuidle and menu governor to handle dynamic states) wanted to introduce dynamic C-states, but that idea was dropped long ago. The nonsense deeper C-state checking remained, though. Since both target_residency and exit_latency are longer for deeper idle state, there's no need to waste CPU time on useless checks. Signed-off-by: Alex Shi Acked-by: Rik van Riel [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db02b7614a54bf0bf548db07bc8d3e7518fd9481 Author: Boris Brezillon Date: Mon Nov 28 15:56:53 2016 +0100 drm/atmel-hlcdc: Rework the fbdev creation logic Now that we wait for DRM panels to be available before registering the DRM device (returning -EPROBE_DEFER if the panel has not been probed yet), we no longer need to put the fbdev creation code in ->output_poll_changed(). This removes the 10 secs delay between DRM dev registration and fbdev creation (polling period = 10 seconds). Signed-off-by: Boris Brezillon Reported-by: Alex Vazquez drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 616badd2fb499320d3ac3b54462f55dededd0e0f Author: Alistair Popple Date: Tue Jan 10 15:41:44 2017 +1100 powerpc/powernv: Use OPAL call for TCE kill on NVLink2 Add detection of NPU2 PHBs. NPU2/NVLink2 has a different register layout for the TCE kill register therefore TCE invalidation should be done via the OPAL call rather than using the register directly as it is for PHB3 and NVLink1. This changes TCE invalidation to use the OPAL call in the case of a NPU2 PHB model. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 9 ++++++++- arch/powerpc/platforms/powernv/pci.c | 7 +++++++ arch/powerpc/platforms/powernv/pci.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 1d0761d2557d1540727723e4f05395d53321d555 Author: Alistair Popple Date: Wed Dec 14 13:36:51 2016 +1100 powerpc/powernv: Initialise nest mmu POWER9 contains an off core mmu called the nest mmu (NMMU). This is used by other hardware units on the chip to translate virtual addresses into real addresses. The unit attempting an address translation provides the majority of the context required for the translation request except for the base address of the partition table (ie. the PTCR) which needs to be programmed into the NMMU. This patch adds a call to OPAL to set the PTCR for the nest mmu in opal_init(). Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 3 ++- arch/powerpc/include/asm/opal.h | 1 + arch/powerpc/include/asm/powernv.h | 19 +++++++++++++++++++ arch/powerpc/mm/pgtable-radix.c | 2 ++ arch/powerpc/mm/pgtable_64.c | 6 +++++- arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + arch/powerpc/platforms/powernv/opal.c | 11 +++++++++++ 7 files changed, 41 insertions(+), 2 deletions(-) commit 55d6616585363ff2aa9430bfe1ff1345bdc0599a Author: Noralf Trønnes Date: Thu Jan 26 23:56:18 2017 +0100 drm/vc4: Remove vc4_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: eric@anholt.net Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-17-noralf@tronnes.org drivers/gpu/drm/vc4/vc4_debugfs.c | 6 ------ drivers/gpu/drm/vc4/vc4_drv.c | 1 - drivers/gpu/drm/vc4/vc4_drv.h | 1 - 3 files changed, 8 deletions(-) commit b526a314263ea217b8fa9758dca5dc245fd49997 Author: Hans de Goede Date: Sun Jan 22 17:14:08 2017 +0100 pwm: Try to load modules during pwm_get() Add a module name string to the pwm_lookup struct and if specified try to load the module using request_module() if pwmchip_find_by_name() is unable to find the PWM chip. This is a last resort to work around drivers that can't - and can't be made to - deal with deferred probe. Signed-off-by: Hans de Goede [thierry.reding@gmail.com: rename new macro, reword commit message] [thierry.reding@gmail.com: add comment explaining use-case] Signed-off-by: Thierry Reding drivers/pwm/core.c | 14 ++++++++++++++ include/linux/pwm.h | 23 +++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) commit 6185deaac579d5f6b1f811ba83ebcb92c53e94c8 Author: Viresh Kumar Date: Mon Jan 23 10:11:52 2017 +0530 PM / OPP: Update Documentation to remove RCU specific bits Update OPP documentation to remove the RCU specific bits. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Documentation/power/opp.txt | 52 ++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit cdd3e614cfda724826ec8a522022709380b84597 Author: Viresh Kumar Date: Mon Jan 23 10:11:51 2017 +0530 PM / OPP: Simplify dev_pm_opp_get_max_volt_latency() dev_pm_opp_get_max_volt_latency() calls _find_opp_table() two times effectively. Merge _get_regulator_count() into dev_pm_opp_get_max_volt_latency() to avoid that. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) commit a7f3987ea1af0a4b5a9003d4b22b2260e4afad03 Author: Viresh Kumar Date: Mon Jan 23 10:11:50 2017 +0530 PM / OPP: Simplify _opp_set_availability() As we don't use RCU locking anymore, there is no need to replace an earlier OPP node with a new one. Just update the existing one. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 052c6f19141dd13f266cc465fde6f38ddc93d5fb Author: Viresh Kumar Date: Mon Jan 23 10:11:49 2017 +0530 PM / OPP: Move away from RCU locking The RCU locking isn't well suited for the OPP core. The RCU locking fits better for reader heavy stuff, while the OPP core have at max one or two readers only at a time. Over that, it was getting very confusing the way RCU locking was used with the OPP core. The individual OPPs are mostly well handled, i.e. for an update a new structure was created and then that replaced the older one. But the OPP tables were updated directly all the time from various parts of the core. Though they were mostly used from within RCU locked region, they didn't had much to do with RCU and were governed by the mutex instead. And that mixed with the 'opp_table_lock' has made the core even more confusing. Now that we are already managing the OPPs and the OPP tables with kernel reference infrastructure, we can get rid of RCU locking completely and simplify the code a lot. Remove all RCU references from code and comments. Acquire opp_table->lock while parsing the list of OPPs though. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 294 +++++++++++------------------------------- drivers/base/power/opp/cpu.c | 18 --- drivers/base/power/opp/of.c | 40 +----- drivers/base/power/opp/opp.h | 22 +--- 4 files changed, 80 insertions(+), 294 deletions(-) commit 5b650b388844f26c61c70564865598836d05dcb3 Author: Viresh Kumar Date: Mon Jan 23 10:11:48 2017 +0530 PM / OPP: Take kref from _find_opp_table() Take reference of the OPP table from within _find_opp_table(). Also update the callers of _find_opp_table() to call dev_pm_opp_put_opp_table() after they have used the OPP table. Note that _find_opp_table() increments the reference under the opp_table_lock. Now that the OPP table wouldn't get freed until the callers of _find_opp_table() call dev_pm_opp_put_opp_table(), there is no need to take the opp_table_lock or rcu_read_lock() around it. Drop them. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 191 +++++++++++++++++++----------------------- drivers/base/power/opp/cpu.c | 26 ++---- 2 files changed, 95 insertions(+), 122 deletions(-) commit 8a31d9d94297b1ecae3012069d35d78c959693c2 Author: Viresh Kumar Date: Mon Jan 23 10:11:47 2017 +0530 PM / OPP: Update OPP users to put reference This patch updates dev_pm_opp_find_freq_*() routines to get a reference to the OPPs returned by them. Also updates the users of dev_pm_opp_find_freq_*() routines to call dev_pm_opp_put() after they are done using the OPPs. As it is guaranteed the that OPPs wouldn't get freed while being used, the RCU read side locking present with the users isn't required anymore. Drop it as well. This patch also updates all users of devfreq_recommended_opp() which was returning an OPP received from the OPP core. Note that some of the OPP core routines have gained rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs within them. Signed-off-by: Viresh Kumar Reviewed-by: Chanwoo Choi [Devfreq] Signed-off-by: Rafael J. Wysocki arch/arm/mach-omap2/pm.c | 5 +- drivers/base/power/opp/core.c | 114 +++++++++++++++++++---------------- drivers/base/power/opp/cpu.c | 22 ++----- drivers/clk/tegra/clk-dfll.c | 17 ++---- drivers/cpufreq/exynos5440-cpufreq.c | 5 +- drivers/cpufreq/imx6q-cpufreq.c | 10 +-- drivers/cpufreq/mt8173-cpufreq.c | 8 +-- drivers/cpufreq/omap-cpufreq.c | 4 +- drivers/devfreq/devfreq.c | 14 ++--- drivers/devfreq/exynos-bus.c | 14 ++--- drivers/devfreq/governor_passive.c | 4 +- drivers/devfreq/rk3399_dmc.c | 16 ++--- drivers/devfreq/tegra-devfreq.c | 4 +- drivers/thermal/cpu_cooling.c | 11 +--- drivers/thermal/devfreq_cooling.c | 15 ++--- 15 files changed, 110 insertions(+), 153 deletions(-) commit 7034764a1e4a6edbb60914e89aad8384e3fe5d17 Author: Viresh Kumar Date: Mon Jan 23 10:11:46 2017 +0530 PM / OPP: Add 'struct kref' to struct dev_pm_opp Add kref to struct dev_pm_opp for easier accounting of the OPPs. Note that the OPPs are freed under the opp_table->lock mutex only. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 27 ++++++++++++--------------- drivers/base/power/opp/opp.h | 3 +++ include/linux/pm_opp.h | 3 +++ 3 files changed, 18 insertions(+), 15 deletions(-) commit b83c1899a0e98cabd0997531434e1fb3b6574db8 Author: Viresh Kumar Date: Mon Jan 23 10:11:45 2017 +0530 PM / OPP: Use dev_pm_opp_get_opp_table() instead of _add_opp_table() Migrate all users of _add_opp_table() to use dev_pm_opp_get_opp_table() to guarantee that the OPP table doesn't get freed while being used. Also update _managed_opp() to get the reference to the OPP table. Now that the OPP table wouldn't get freed while these routines are executing after dev_pm_opp_get_opp_table() is called, there is no need to take opp_table_lock. Drop them as well. Now that _add_opp_table(), _remove_opp_table() and the unlocked release routines aren't used anymore, remove them. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 63 ++++--------------------------------------- drivers/base/power/opp/of.c | 54 +++++++++++++++++-------------------- drivers/base/power/opp/opp.h | 1 - 3 files changed, 29 insertions(+), 89 deletions(-) commit 31641cda53dd71c0447fca5e6d42e0e3e8391733 Author: Viresh Kumar Date: Mon Jan 23 10:11:44 2017 +0530 PM / OPP: Take reference of the OPP table while adding/removing OPPs Take reference of the OPP table while adding and removing OPPs, that helps us remove special checks in _remove_opp_table(). Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fa30184d192ec78d443cf6d3abc37d9eb3b9253e Author: Viresh Kumar Date: Mon Jan 23 10:11:43 2017 +0530 PM / OPP: Return opp_table from dev_pm_opp_set_*() routines Now that we have proper kernel reference infrastructure in place for OPP tables, use it to guarantee that the OPP table isn't freed while being used by the callers of dev_pm_opp_set_*() APIs. Make them all return the pointer to the OPP table after taking its reference and put the reference back with dev_pm_opp_put_*() APIs. Now that the OPP table wouldn't get freed while these routines are executing after dev_pm_opp_get_opp_table() is called, there is no need to take opp_table_lock. Drop them as well. Remove the rcu specific comments from these routines as they aren't relevant anymore. Note that prototypes of dev_pm_opp_{set|put}_regulators() were already updated by another patch. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 243 +++++++++--------------------------------- drivers/cpufreq/sti-cpufreq.c | 13 +-- include/linux/pm_opp.h | 35 +++--- 3 files changed, 74 insertions(+), 217 deletions(-) commit f067a982cefa8df5642212bb0c7e25974831f781 Author: Viresh Kumar Date: Mon Jan 23 10:11:42 2017 +0530 PM / OPP: Add 'struct kref' to OPP table Add kref to struct opp_table for easier accounting of the OPP table. Note that the new routine dev_pm_opp_get_opp_table() takes the reference from under the opp_table_lock, which guarantees that the OPP table doesn't get freed unless dev_pm_opp_put_opp_table() is called for the OPP table. Two separate release mechanisms are added: locked and unlocked. In unlocked version the routines aren't required to take/drop opp_table_lock as the callers have already done that. This is required to avoid breaking git bisect, otherwise we may get lockdeps between commits. Once all the users of OPP table are updated the unlocked version shall be removed. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 51 +++++++++++++++++++++++++++++++++++++++++-- drivers/base/power/opp/opp.h | 3 +++ include/linux/pm_opp.h | 10 +++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) commit 37a73ec0c9bbd712d24cc2035696893e5b6119a5 Author: Viresh Kumar Date: Mon Jan 23 10:11:41 2017 +0530 PM / OPP: Add per OPP table mutex Add per OPP table lock to protect opp_table->opp_list. Note that at few places opp_list is used under the rcu_read_lock() and so a mutex can't be added there for now. This will be fixed by a later patch. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 31 +++++++++++++++++++++++++++---- drivers/base/power/opp/opp.h | 2 ++ 2 files changed, 29 insertions(+), 4 deletions(-) commit 69efb3439ccf2ce72e01edde05d2c63d624e251e Author: Hans de Goede Date: Sun Jan 22 17:14:07 2017 +0100 pwm: Don't hold pwm_lookup_lock longer than necessary There is no need to hold pwm_lookup_lock after we're done with looping over pwm_lookup_list, so release it earlier. Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding drivers/pwm/core.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 42883cbc086b3f7aca9f1754f2d570af922825fc Author: Lothar Wassmann Date: Sun Jan 29 22:54:13 2017 +0100 pwm: Make the PWM_POLARITY flag in DTB optional Change the PWM chip driver registration so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the polarity flag as part of the specifier. This is done to provide polarity inversion support for the pwm-imx driver without having to modify all existing DTS files. Signed-off-by: Lothar Wassmann Signed-off-by: Bhuvanchandra DV Suggested-by: Sascha Hauer Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/core.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit f2dafc095018fcc6a71793cfefdd490c9f1c63be Author: Lothar Wassmann Date: Sun Jan 29 22:54:05 2017 +0100 pwm: Print error messages with pr_err() instead of pr_debug() Make the messages that are printed in case of fatal errors actually visible to the user without having to recompile the driver with debugging enabled. Signed-off-by: Lothar Waßmann Signed-off-by: Bhuvanchandra DV Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 326ed314fefebb259563926c8c6110a009562e07 Author: Lukasz Majewski Date: Sun Jan 29 22:54:15 2017 +0100 pwm: imx: Add polarity inversion support to i.MX's PWMv2 With this patch the polarity settings for i.MX's PWMv2 is now supported on top of atomic PWM setting Signed-off-by: Bhuvanchandra DV Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit c322f457755aea8eea91c79c473e17ffa7f12cfc Author: Lukasz Majewski Date: Sun Jan 29 22:54:14 2017 +0100 pwm: imx: doc: Update imx-pwm.txt documentation entry The imx-pwm.txt documentation update as a preparation for polarity support. Signed-off-by: Bhuvanchandra DV Signed-off-by: Lukasz Majewski Acked-by: Rob Herring Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 871985b154ada5a0edaf1aa22d6a1de115b0213d Author: Lukasz Majewski Date: Sun Jan 29 22:54:12 2017 +0100 pwm: imx: Remove redundant i.MX PWMv2 code The code providing functionality surpassed by the atomic PWM is not needed anymore and hence can be removed. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 127 -------------------------------------------------- 1 file changed, 127 deletions(-) commit 0ca1a11a1d816c8fb0bb29b985666cef912958c1 Author: Lukasz Majewski Date: Sun Jan 29 22:54:11 2017 +0100 pwm: imx: Provide atomic PWM support for i.MX PWMv2 This commit provides apply() callback implementation for i.MX's PWMv2. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 73b1ff1f3e5ccc22b31fa44c98460ef05393181c Author: Lukasz Majewski Date: Sun Jan 29 22:54:10 2017 +0100 pwm: imx: Move PWMv2 wait for fifo slot code to a separate function The code, which waits for fifo slot, has been extracted from imx_pwm_config_v2 function and moved to new one - imx_pwm_wait_fifo_slot(). This change reduces the overall size of imx_pwm_config_v2() and prepares it for atomic PWM operation. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit 970247a486751c79903c7d853198d0106805c641 Author: Lukasz Majewski Date: Sun Jan 29 22:54:09 2017 +0100 pwm: imx: Move PWMv2 software reset code to a separate function The software reset code has been extracted from imx_pwm_config_v2 function and moved to new one - imx_pwm_sw_reset(). This change reduces the overall size of imx_pwm_config_v2() and prepares it for atomic PWM operation. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit b3c088fe0297d7580bef5d5830fa5fc69ae8443c Author: Lukasz Majewski Date: Sun Jan 29 22:54:08 2017 +0100 pwm: imx: Rewrite v1 code to facilitate switch to atomic PWM The code has been rewritten to remove "generic" calls to imx_pwm_{enable|disable|config}. Such approach would facilitate switch to atomic PWM (a.k.a ->apply()) implementation. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Reviewed-by: Stefan Agner Signed-off-by: Lukasz Majewski Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 0038922954236a6af424e2604ece88404dfbc41c Author: Lukasz Majewski Date: Sun Jan 29 22:54:07 2017 +0100 pwm: imx: Add separate set of PWM ops for v1 and v2 This patch provides separate set of PWM operations utilized by i.MX's v1 and v2 of the PWM hardware. Signed-off-by: Lothar Waßmann Signed-off-by: Bhuvanchandra DV Signed-off-by: Lukasz Majewski Acked-by: Shawn Guo Reviewed-by: Sascha Hauer Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 9fb27fac39f47632aa32ffd787b4de1dbd0b8655 Author: Sascha Hauer Date: Sun Jan 29 22:54:06 2017 +0100 pwm: imx: Remove ipg clock and enable per clock when required The use of the ipg clock was introduced with commit 7b27c160c681 ("pwm: i.MX: fix clock lookup"). In the commit message it was claimed that the ipg clock is enabled for register accesses. This is true for the ->config() callback, but not for the ->set_enable() callback. Given that the ipg clock is not consistently enabled for all register accesses we can assume that either it is not required at all or that the current code does not work. Remove the ipg clock code for now so that it's no longer in the way of refactoring the driver. On the other hand, the i.MX 7 IP requires the peripheral clock to be enabled before accessing its registers. Since ->config() can be called when the PWM is disabled (in which case, the peripheral clock is also disabled), we need to surround the imx->config() with clk_prepare_enable(per_clk)/clk_disable_unprepare(per_clk) calls. Note that the driver was working fine for the i.MX 7 IP so far because the ipg and peripheral clock use the same hardware clock gate, which guaranteed peripheral clock activation even when ->config() was called when the PWM was disabled. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon Cc: Philipp Zabel Reviewed-by: Stefan Agner Tested-by: Stefan Agner Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 858a0d7eb5300b5f620d98ab3c4b96c9d5f19131 Merge: e326ce0 47087ee Author: Rafael J. Wysocki Date: Mon Jan 30 09:00:02 2017 +0100 Merge back earlier suspend/hibernation changes for v4.11. commit 1b62d134d3c5f9e67de096af7ea3e9fe48966f17 Merge: 7a37052 e9ca038 Author: Rafael J. Wysocki Date: Mon Jan 30 08:57:22 2017 +0100 Merge back earlier ACPICA changes for v4.11. commit 64507fe38de3eb7ed60f26843e0ddf1c565a9b21 Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:39 2017 +0800 ARM: dts: sun9i: Switch to new clock bindings Now that we have a full clock driver for sun9i, switch to it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 404 +++++++++++---------------------------- 1 file changed, 107 insertions(+), 297 deletions(-) commit 783ab76ae553abc23f80ef7511052d055697531b Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:36 2017 +0800 clk: sunxi-ng: Add A80 Display Engine CCU With the A80 SoC, Allwinner grouped and moved some subsystem specific clock controls to a separate address space, and possibly separate hardware block. One such subsystem is the display engine. The main clock control unit now only has 1 set of bus gate, dram gate, module clock, and reset control for the entire display subsystem. These feed into a secondary clock control unit, which has controls for each individual module of the display pipeline. This block is not documented in the user manual. Allwinner's kernel was used as the reference. Add support for the display engine clock controls found on the A80. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sun9i-de.txt | 28 ++ drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 283 +++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun9i-a80-de.h | 33 +++ include/dt-bindings/clock/sun9i-a80-de.h | 80 ++++++ include/dt-bindings/reset/sun9i-a80-de.h | 58 +++++ 6 files changed, 483 insertions(+) commit 439b65c4bb66564e46a8df38c06863ee7cecb4e4 Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:35 2017 +0800 clk: sunxi-ng: Add A80 USB CCU Add support for the USB clock controls found on the A80. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sun9i-usb.txt | 24 ++++ drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c | 144 +++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.h | 25 ++++ include/dt-bindings/clock/sun9i-a80-usb.h | 59 +++++++++ include/dt-bindings/reset/sun9i-a80-usb.h | 56 ++++++++ 6 files changed, 309 insertions(+) commit b8eb71dcdd0817ce75f2874301a068fb211dab41 Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:34 2017 +0800 clk: sunxi-ng: Add A80 CCU Add support for the main clock unit found in the A80. Some clocks were not documented in the released user manual, but were found in the official kernel from Allwinner. These include controls for the I2S, SPDIF, SATA, and eDP blocks. Note that on the A80, some subsystems have separate clock controllers downstream of the main clock unit. These include the MMC, USB, and display engine subsystems. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + drivers/clk/sunxi-ng/Kconfig | 10 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 1223 ++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun9i-a80.h | 57 + include/dt-bindings/clock/sun9i-a80-ccu.h | 162 +++ include/dt-bindings/reset/sun9i-a80-ccu.h | 102 ++ 7 files changed, 1556 insertions(+) commit 3de64bf187ce838b78ccd6ee7c1cc25e0aba07bd Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:33 2017 +0800 clk: sunxi-ng: Support separately grouped PLL lock status register On the Allwinner A80 SoC, the PLL lock status indicators are grouped together in a separate register, as opposed to being scattered in each PLL's configuration register. Add a flag to support this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_common.c | 9 +++++++-- drivers/clk/sunxi-ng/ccu_common.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 82aab516ec96ab9f9ad4b80a0bab9368b1cd5cdc Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:32 2017 +0800 clk: sunxi-ng: mux: Get closest parent rate possible with CLK_SET_RATE_PARENT If the CLK_SET_RATE_PARENT flag is set, we want to try getting the closest parent rate. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 216abdcc3ae7b1dbe145f1e78cf727b6832db9b4 Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:31 2017 +0800 clk: sunxi-ng: mux: honor CLK_SET_RATE_NO_REPARENT flag This patch adds support for the CLK_SET_RATE_NO_REPARENT flag to the mux determine_rate helper, based on examples from clk-composite and clk-mux. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ed48205fb4054bab68fe47648ba4b7ceb67fcc17 Author: Chen-Yu Tsai Date: Sat Jan 28 20:22:30 2017 +0800 clk: sunxi-ng: mux: Fix determine_rate for mux clocks with pre-dividers The determine_rate helper used ccu_mux_helper_adjust_parent_for_prediv() to adjust the parent_rate to account for pre-dividers, but then passed the pristine parent clock rate from clk_hw_get_rate() to the round() callback, thereby ignoring the pre-divider adjustment. In addition, it was saving the adjusted parent rate back into struct clk_rate_request. This patch fixes this by saving the pristine parent clock rate, and adding a copy that is adjusted and passed to the round() callback. The pristine copy, if it is the best solution, would be saved back to struct clk_rate_request. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ae2520540cb0090eb8cdba559bcb6a82266f0308 Author: Mika Westerberg Date: Sat Jan 28 17:10:44 2017 +0200 pwm: lpss: Add Intel Gemini Lake PCI ID Intel Gemini Lake PWM is pretty much same as used in Intel Broxton. Add this new PCI ID to the list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss-pci.c | 1 + 1 file changed, 1 insertion(+) commit 9900073cf5587662df9b7ef59f649ff100229d85 Author: Andy Shevchenko Date: Sat Jan 28 17:10:43 2017 +0200 pwm: lpss: Do not export board infos for different PWM types The PWM LPSS probe drivers just pass a pointer to the exported board info structures to pwm_lpss_probe() based on device PCI or ACPI ID. In order to remove the knowledge of specific devices from library part of the driver and reduce noise in exported namespace just duplicate the board info structures and stop exporting them. Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss-pci.c | 21 +++++++++++++++++++++ drivers/pwm/pwm-lpss-platform.c | 21 +++++++++++++++++++++ drivers/pwm/pwm-lpss.c | 24 ------------------------ drivers/pwm/pwm-lpss.h | 4 ---- 4 files changed, 42 insertions(+), 28 deletions(-) commit 10d56a4cb1c6c894c60acbaec0f8aa44aba833b0 Author: Ilkka Koskinen Date: Sat Jan 28 17:10:42 2017 +0200 pwm: lpss: Avoid reconfiguring while UPDATE bit is still enabled PWM Configuration register has SW_UPDATE bit that is set when a new configuration is written to the register. The bit is automatically cleared at the start of the next output cycle by the IP block. If one writes a new configuration to the register while it still has the bit enabled, PWM may freeze. That is, while one can still write to the register, it won't have an effect. Thus, we try to sleep long enough that the bit gets cleared and make sure the bit is not enabled while we update the configuration. Reviewed-by: Mika Westerberg Tested-by: Richard Griffiths Signed-off-by: Ilkka Koskinen Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss.c | 52 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) commit b14e8ceff03404cce4d9b85204246d3ed1259ec7 Author: Andy Shevchenko Date: Sat Jan 28 17:10:41 2017 +0200 pwm: lpss: Switch to new atomic API Instead of doing things separately, which is not so reliable on some platforms, switch the driver to use new atomic API, i.e. ->apply() callback. The change has been tested on Intel platforms such as Broxton, BayTrail, and Merrifield. Reviewed-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss.c | 64 +++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 35 deletions(-) commit b5c050c719922901891bdd8580d224e2a0035db5 Author: Andy Shevchenko Date: Sat Jan 28 17:10:40 2017 +0200 pwm: lpss: Allow duty cycle to be 0 A duty cycle is represented by values [0..] which reflects [0%..100%]. 0% of the duty cycle means always off (logical "0") on output. Allow this in the driver. Reviewed-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss.c | 2 -- 1 file changed, 2 deletions(-) commit 684309e5043efaaa94d9b4e65f53f7fdde1f6675 Author: Andy Shevchenko Date: Sat Jan 28 17:10:39 2017 +0200 pwm: lpss: Avoid potential overflow of base_unit The resolution of base_unit is derived from base_unit_bits and thus must be equal to (2^base_unit_bits - 1). Otherwise frequency and therefore base_unit might potentially overflow. Prevent the above by substracting 1 in all cases where base_unit_bits or derivative is used. Reviewed-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding drivers/pwm/pwm-lpss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a8628d41602dc9f988af051a657eef648eec5c0 Author: Reza Arbab Date: Wed Nov 16 10:45:03 2016 -0600 powerpc/mm: Allow memory hotplug into an offline node Relax the check preventing us from hotplugging into an offline node. This limitation was added in commit 482ec7c403d2 ("[PATCH] powerpc numa: Support sparse online node map") to prevent adding resources to an uninitialized node. These days, there is no harm in doing so. The addition will actually cause the node to be initialized and onlined; add_memory_resource() calls hotadd_new_pgdat() (if necessary) and node_set_online(). Signed-off-by: Reza Arbab Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7656cd8e8e23ac4b059f4d96939cb73eb3121ae9 Author: Reza Arbab Date: Thu Oct 13 13:45:30 2016 -0500 powerpc/mm: Simplify loop control in parse_numa_properties() The flow of the main loop in parse_numa_properties() is overly complicated. Simplify it to be less confusing and easier to read. No functional change. The end of the main loop in parse_numa_properties() looks like this: for_each_node_by_type(...) { ... if (!condition) { if (--ranges) goto new_range; else continue; } statement(); if (--ranges) goto new_range; /* else * continue; <- implicit, this is the end of the loop */ } The only effect of !condition is to skip execution of statement(). This can be rewritten in a simpler way: for_each_node_by_type(...) { ... if (condition) statement(); if (--ranges) goto new_range; } Signed-off-by: Reza Arbab Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 1995876a06bcf6f9f7d7b699bdbf387831679771 Author: Steffen Klassert Date: Mon Jan 30 06:45:43 2017 +0100 xfrm: Add a dummy network device for napi. This patch adds a dummy network device so that we can use gro_cells for IPsec GRO. With this, we handle IPsec GRO with no impact on the generic networking code. Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f991bb9da142ba79b54ed0757f22e756f45e2c5a Author: Steffen Klassert Date: Mon Jan 30 06:45:38 2017 +0100 net: Drop secpath on free after gro merge. With a followup patch, a gro merged skb can have a secpath. So drop it before freeing or reusing the skb. Signed-off-by: Steffen Klassert net/core/dev.c | 2 ++ 1 file changed, 2 insertions(+) commit f2a5e8f0023eba847ad2adb145b2f631934bb12b Author: Mahesh Salgaonkar Date: Mon Oct 24 23:51:51 2016 +0530 powerpc/fadump: Fix the race in crash_fadump(). There are chances that multiple CPUs can call crash_fadump() simultaneously and would start duplicating same info to vmcoreinfo ELF note section. This causes makedumpfile to fail during kdump capture. One example is, triggering dumprestart from HMC which sends system reset to all the CPUs at once. makedumpfile --dump-dmesg /proc/vmcore read_vmcoreinfo_basic_info: Invalid data in /tmp/vmcoreinfoyjgxlL: CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971 makedumpfile Failed. Running makedumpfile --dump-dmesg /proc/vmcore failed (1). makedumpfile -d 31 -l /proc/vmcore read_vmcoreinfo_basic_info: Invalid data in /tmp/vmcoreinfo1mmVdO: CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971CRASHTIME=1475605971 makedumpfile Failed. Running makedumpfile -d 31 -l /proc/vmcore failed (1). Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 79270e0a3fd124388a0407f9edbd6ace75eacb69 Author: Aneesh Kumar K.V Date: Sat Jan 28 21:18:40 2017 +0530 powerpc/mm/hash: Properly mask the ESID bits when building proto VSID The proto VSID is built using both the MMU context id and effective segment ID (ESID). We should not have overlapping bits between those. That could result in us having a VSID collision. With the current code we missed masking the top bits of the ESID. This implies for kernel address we ended up using the top 4 bits of the ESID as part of the proto VSID, which is wrong. The current code use the top 4 context values (0x7fffc - 0x7ffff) for the kernel. With those context IDs used for the kernel, we don't run into VSID collisions because we get the same proto VSID irrespective of whether we mask the ESID bits or not. eg: ea = 0xf000000000000000 context = 0x7ffff w/out masking: proto_vsid = (0x7ffff << 6 | 0xf000000000000000 >> 40) = (0x1ffffc0 | 0xf00000) = 0x1ffffc0 with masking: proto_vsid = (0x7ffff << 6 | ((0xf000000000000000 >> 40) & 0x3f)) = (0x1ffffc0 | (0xf00000 & 0x3f)) = 0x1ffffc0 | 0) = 0x1ffffc0 So although there is no bug, the code is still overly subtle, so fix it to save ourselves pain in future. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1564dd1d2f876dcc288fae94a5179baccc89de8f Merge: a329b0c 95ed41d Author: Olof Johansson Date: Sun Jan 29 21:23:52 2017 -0800 Merge tag 'samsung-soc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung mach/soc update for v4.11, second round: 1. Remove mach code for Exynos4415 as a continuation of removal of this SoC. 2. Remove obsolete property from the bindings documentation. * tag 'samsung-soc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: video: exynos7-decon: Remove obsolete samsung,power-domain property ARM: EXYNOS: Remove Exynos4415 arch code (SoC not supported anymore) Signed-off-by: Olof Johansson commit a694eb64dbd6badbfaf8e77a5868360328284627 Merge: c3fcab3 dfaf06b Author: Olof Johansson Date: Sun Jan 29 21:19:26 2017 -0800 Merge tag 'samsung-dt-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DeviceTree update for v4.11, second round: 1. Use bigger reserved memory region for Multi Format Codec on all Exynos chipsets so it could decode FullHD easily. * tag 'samsung-dt-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Fix indentation of EHCI and OHCI ports ARM: dts: exynos: Increase MFC left reserved memory region size Signed-off-by: Olof Johansson commit 1096ffd75aa50fc27d74a30b336ef2efe0b6cbbf Merge: 2a742e1 ee55ae6 Author: Olof Johansson Date: Sun Jan 29 21:18:44 2017 -0800 Merge tag 'samsung-drivers-soc-pmu-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Continuation of improvements for Exynos PM drivers for v4.11: 1. Add support for Exynos5433 to Power Management Unit (PMU) and Power Domains drivers. 2. Cleanups of duplicated and unused defines. * tag 'samsung-drivers-soc-pmu-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register soc: samsung: pmu: Remove unused and duplicated defines soc: samsung: pm_domains: Add new Exynos5433 compatible soc: samsung: pmu: Add dummy support for Exynos5433 SoC Signed-off-by: Olof Johansson commit fa11b3dd54ec26ad1daf442e78063eb21f4d93d4 Author: Masahiro Yamada Date: Mon Jan 30 10:55:47 2017 +0900 arm64: defconfig: enable CONFIG_MTD_NAND and CONFIG_MTD_NAND_DENALI_DT Enable the NAND framework and the Denali NAND controller driver. This NAND controller is used on UniPhier SoCs. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit ddf4d59b3450eb1c710f90b0e682216dbd80fdc7 Author: Masahiro Yamada Date: Mon Jan 30 10:55:46 2017 +0900 arm64: defconfig: enable CONFIG_MTD_BLOCK Enable the block layer support for MTD devices. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2a742e1b180785464accac3adf14fa1ccc9d02b0 Merge: 2998954c 3755584 Author: Olof Johansson Date: Sun Jan 29 21:17:24 2017 -0800 Merge tag 'zte-pd-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers ZTE PM domain driver support for 4.11: - It includes a series which adds DT bindings and PM domain driver for PCU (Power Control Unit) block found on ZTE ZX2967 family SoC. * tag 'zte-pd-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: zte: pm_domains: Add support for zx296718 soc: zte: pm_domains: Prepare for supporting ARMv8 zx2967 family soc: zte: Add header for PM domains specifiers MAINTAINERS: add zx2967 SoC drivers to ARM ZTE architecture dt-bindings: zte: add bindings document for zx2967 power domain controller Signed-off-by: Olof Johansson commit 84b4e9f5a83e9d0afd3aed4c2272815719af6f84 Merge: ac43d9e eb2e2a8 Author: Olof Johansson Date: Sun Jan 29 21:15:52 2017 -0800 Merge tag 'zte-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 ZTE arm64 device tree update for 4.11: - Enable cpufreq support for zx296718 by using new operating-points-v2 bindings, so that it works with the generic cpufreq-dt driver. * tag 'zte-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: zx: support cpu-freq for zx296718 Signed-off-by: Olof Johansson commit 9450a5dc5391e40ca8f2aa50e4fa91fe4fb7c5be Merge: 14463a0 5aaac42 Author: Olof Johansson Date: Sun Jan 29 21:09:56 2017 -0800 Merge tag 'imx-defconfig-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig i.MX defconfig updates for 4.11: - Select wireless extensions option for imx_v6_v7_defconfig, so that wireless works out of box with userspace tools such as 'iwconfig'. - Enable EXT4 filesystem support for vf610m4_defconfig. * tag 'imx-defconfig-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: vf610m4: defconfig: enable EXT4 filesystem ARM: imx_v6_v7_defconfig: Select wireless extensions option Signed-off-by: Olof Johansson commit ac43d9e0e5647052d78ba1e8d939549262fc268e Merge: bb414fc 73447f6 Author: Olof Johansson Date: Sun Jan 29 21:09:19 2017 -0800 Merge tag 'imx-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Freescale arm64 device tree updates for 4.11: - Add support for LS1012A SoC which is an ARMv8 SoC with single Cortex-A53 core, and the corresponding board support: FRDM, QDS and RDB. - Enable TMU (Thermal Monitoring Unit) support for LS1046A SoC. - Enable PCA9547 device for ls2080a-rdb board by removing 'disabled' status setting. * tag 'imx-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: clockgen: Add compatible string for LS1012A Documentation: DT: add LS1012A compatible for SCFG and DCFG Documentation: DT: Add entry for FSL LS1012A RDB, FRDM, QDS boards arm64: dts: ls1046a: Add TMU device tree support arm64: dts: Add support for FSL's LS1012A SoC arm64: dts: ls2080a-rdb: remove disable status of pca9547 Signed-off-by: Olof Johansson commit c3fcab3af4a35959af175f421b758bc2f328fa79 Merge: 0ff3758 18ba386 Author: Olof Johansson Date: Sun Jan 29 21:07:40 2017 -0800 Merge tag 'imx-dt-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX device tree updates for 4.11: - New board support: vf610-zii-dev-rev-c, imx6ul-opos6uldev, imx6ul-isiot, imx6qdl-savageboard, imx6q-mccmon6. - A patch from Alexandre to correct the mangled license text which has been copied & pasted all over the i.MX device tree files. - Update cpu nodes of some i.MX SoCs to make them consistent and match ePAPR spec. - Add OCOTP device for i.MX6UL SoC. - Add security violation interrupt for i.MX25 DryIce. - Enable USB OTG, WIFI and Bluetooth support for i.MX6SX Udoo Neo board. - Enable S/PDIF and 2nd display pipeline support for CompuLab board.. - Add SPI and LTC3676 PMIC support for Gateworks Ventana boards. - A few random device addition for various boards: TVE DAC regulators for imx53-qsb, EEPROM for vf610-zii-dev, eMMC and NAND support for i.MX6UL Engicam boards. - Cleanups on obsoleted or unused properties. * tag 'imx-dt-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (32 commits) ARM: dts: udoo_neo: Add Bluetooth support ARM: dts: udoo_neo: Add Wifi support ARM: dts: udoo_neo: Add UDOO Neo USB OTG1 and OTG2 support ARM: dts: imx6ul: Add Engicam Is.IoT MX6UL NAND initial support ARM: dts: imx6ul: Add Engicam Is.IoT MX6UL eMMC initial support ARM: dts: imx6qdl: Fix "ERROR: code indent should use tabs where possible" ARM: dts: vf610-zii-dev: add EEPROM entry to Rev C ARM: dts: add Armadeus Systems OPOS6UL and OPOS6ULDEV support ARM: dts: imx6q-utilite-pro: enable 2nd display pipeline ARM: dts: vf610-zii-dev: Add .dts file for rev. C ARM: dts: vf610-zii-dev-rev-b: Remove leftover PWM pingroup ARM: dts: imx6: Support Savageboard quad ARM: dts: imx6: Support Savageboard dual ARM: dts: imx6: Add Savageboard common file ARM: dts: imx53-qsb: Provide the TVE DAC regulators ARM: dts: imx6q: Add mccmon6 board support Doc: devicetree: bindings: Add vendor prefix entry - lwn ARM: dts: imx/vf: Correct license text ARM: dts: imx25.dtsi: DryIce security violation interrupt ARM: dts: imx: Add ocotp node for imx6ul ... Signed-off-by: Olof Johansson commit a329b0cac2e3f345f2161ed7cbfb0f2ce11226d9 Merge: 0cc7d0a 5fdb98d Author: Olof Johansson Date: Sun Jan 29 21:06:43 2017 -0800 Merge tag 'imx-cleanup-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc i.MX cleanup for 4.11: - Remove unused flexcan and esdhc device definitions for i.MX25. - A series from Fabio to remove camera device initialization code from i.MX platform support, since the corresponding media driver has been deprecated and removed from kernel tree. * tag 'imx-cleanup-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mach-mx27_3ds: Remove camera support ARM: mach-pcm037: Remove camera support ARM: mach-mx35_3ds: Remove camera support ARM: mx31moboard-smartbot: Remove camera support ARM: mx31moboard-marxbot: Remove camera support ARM: mach-mx31_3ds: Remove camera support ARM: imx: remove unused device definitions Signed-off-by: Olof Johansson commit 0ff3758bc349e8675b859f314e8a65457e22d3ab Merge: 3c63c24 8b649e4 Author: Olof Johansson Date: Sun Jan 29 21:05:53 2017 -0800 Merge tag 'imx-fixes-nc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX non-critical device tree fixes for 4.11: - A couple of fixes on anatop regulator voltage and constraints according to hardware datasheet. - Correct FEC interrupt routing for i.MX6QP which has got the hardware bug found on i.MX6Q fixed. - Remove unit address from i.MX6 LDB device node to fix DTC warning. - A fix on imx53-qsb board FEC pinmux config to remove the dependency on firmware for setting up pins. - A series from Sascha to fix LPSR pins for i.MX7 boards. * tag 'imx-fixes-nc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx53-qsb-common: fix FEC pinmux config ARM: imx6: remove unit address from LDB node ARM: imx6qp: adapt DT to changed FEC interrupts ARM: imx6: fix regulator constraints on anatop 1p1 and 2p5 ARM: imx6: fix min/max voltage of anatop 2p5 regulator ARM: dts: imx7: Add "LPSR" to LPSR iomux pin names ARM: dts: imx7d-cl-som: Fix OTG power pinctrl ARM: dts: imx7d-sdb: Fix watchdog and pwm pinmux ARM: dts: imx7s-warp: Fix watchdog pinmux Signed-off-by: Olof Johansson commit 2998954c40d2dd845484e30118c614cc6c397529 Merge: 95f4e56 87108dc Author: Olof Johansson Date: Sun Jan 29 21:05:16 2017 -0800 Merge tag 'at91-ab-4.11-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers Drivers for 4.11 #2: - more EBI fixes * tag 'at91-ab-4.11-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: memory: atmel-ebi: Enable the SMC clock if specified memory: atmel-ebi: Properly handle multiple reference to the same CS memory: atmel-ebi: Fix the test to enable generic SMC logic Signed-off-by: Olof Johansson commit 14463a0453f0af579c61acf550bd52158015da32 Merge: 4e15a50 770e96f Author: Olof Johansson Date: Sun Jan 29 21:04:16 2017 -0800 Merge tag 'stm32-defconfig-for-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/defconfig STM32 defconfig updates for v4.11, round 1. Highlights: ---------- - Enable ADC - Enable RTC * tag 'stm32-defconfig-for-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: configs: stm32: Add RTC support in STM32 defconfig ARM: configs: stm32: enable ADC driver Signed-off-by: Olof Johansson commit bb414fc1901c28fa05eea9e4446dfaaa2c23b371 Merge: 4c8cb9c 7292ff6 Author: Olof Johansson Date: Sun Jan 29 21:03:12 2017 -0800 Merge tag 'mvebu-dt64-4.11-2' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.11 (part 2) - Add a new Armada 8K based board: MACCHIATOBin - Enable AHCI on the Armada 7K/8K SoCs * tag 'mvebu-dt64-4.11-2' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add generic-ahci compatibles for CP110 ahci arm64: dts: marvell: Add DT for MACCHIATOBin board Signed-off-by: Olof Johansson commit 3c63c24d8150ed566f81f83af2826dba83fadae0 Merge: b744158 a3fe1d5 Author: Olof Johansson Date: Sun Jan 29 21:02:20 2017 -0800 Merge tag 'mvebu-dt-4.11-2' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.11 (part 2) Switch device tree files to the new DSA binding * tag 'mvebu-dt-4.11-2' of git://git.infradead.org/linux-mvebu: ARM: dts: kirkwood-rd88f6281: Utilize new DSA binding ARM: dts: kirkwood-mv88f6281gtw-ge: Utilize new DSA binding ARM: dts: kirkwood-linksys-viper: Utilize new DSA binding ARM: dts: kirkwood-dir665: Utilize new DSA binding ARM: dts: armada-xp-linksys-mamba: Utilize new DSA binding ARM: dts: armada-388-clearfog: Utilize new DSA binding ARM: dts: armada-385-linksys: Utilize new DSA binding ARM: dts: armada-370-rd: Utilize new DSA binding Signed-off-by: Olof Johansson commit 0cc7d0a6eadf65e5d51ead251c73586260558a57 Merge: faff11d f2591b9 Author: Olof Johansson Date: Sun Jan 29 21:01:52 2017 -0800 Merge tag 'mvebu-soc-4.11-1' of git://git.infradead.org/linux-mvebu into next/soc mvebu soc for 4.11 (part 1) Cleanup up on dove pmu and mv78x00 pci * tag 'mvebu-soc-4.11-1' of git://git.infradead.org/linux-mvebu: soc: dove: constify reset_control_ops structures ARM: mv78xx0: fix possible PCI buffer overflow Signed-off-by: Olof Johansson commit b7441582a3692a4002577021b2490a4cc9d8645a Merge: 2dcfbf1 c58736c Author: Olof Johansson Date: Sun Jan 29 21:01:23 2017 -0800 Merge branch 'sti-dt-for-v4.11-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt * 'sti-dt-for-v4.11-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: Add missing pwm irq Signed-off-by: Olof Johansson commit 4c8cb9c40a5eb50ad4edbdea69b3c0a40dfc8f57 Merge: 9cbcb07 7bcf266 Author: Olof Johansson Date: Sun Jan 29 20:59:55 2017 -0800 Merge tag 'tegra-for-4.11-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 arm64: tegra: Device tree changes for v4.11-rc1 This contains three patches that reintroduce symbolic identifiers for clocks, resets and mailboxes. These had been converted to literals in the v4.10 release to avoid complicated dependencies between branches. * tag 'tegra-for-4.11-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Use symbolic reset identifiers arm64: tegra: Use symbolic clock identifiers arm64: tegra: Use symbolic HSP identifiers Signed-off-by: Olof Johansson commit 2dcfbf13f460b445e34233eefabe010749b1e318 Merge: d4794986 393a33c Author: Olof Johansson Date: Sun Jan 29 20:58:56 2017 -0800 Merge tag 'tegra-for-4.11-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt ARM: tegra: Device tree changes for v4.11-rc1 This contains a set of patches that add hardware compatibility for newer revisions of the Toradex Apalis TK1. Also included is a fix to the PAZ00 that stabilizes panel initialization on boot as well as a patch to add card detection for the µSD card slot on TrimSlice. To round things off there are a couple of fixes and changes to the Nyan device tree files to fix the battery charger, add compatibility with new revisions of Nyan Blaze and Nyan Big, as well as properly support the TPM. * tag 'tegra-for-4.11-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: nyan-blaze: Proper pinmux for TPM I2C ARM: tegra: nyan-big: Proper pinmux for TPM I2C ARM: tegra: nyan-blaze: Include compatible revisions for proper detection ARM: tegra: nyan-big: Include compatible revisions for proper detection ARM: tegra: nyan: Use external control for bq24735 charger ARM: tegra: nyan: Use proper IRQ type definitions ARM: dts: tegra: Fix missing card detection in Trimslice µSD card slot ARM: tegra: paz00: Mark panel regulator as enabled on boot ARM: tegra: apalis-tk1: Update compatibility comment ARM: tegra: apalis-tk1: Fix SD card detect on v1.1 HW ARM: tegra: apalis-tk1: Adjust pin muxing for v1.1 HW ARM: tegra: apalis-tk1: Optional DisplayPort hot-plug detect ARM: tegra: apalis-tk1: Pull-up temperature alert Signed-off-by: Olof Johansson commit faff11d1bc129ca829067d7c54c671bc82140b41 Merge: 8b6bc21 ed0a27ef Author: Olof Johansson Date: Sun Jan 29 20:58:22 2017 -0800 Merge tag 'tegra-for-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/soc ARM: tegra: Core SoC changes for v4.11-rc1 This contains a single cleanup patch for the placement of the __initdata annotation, as suggested by checkpatch. * tag 'tegra-for-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: paz00: Fix __initdata placement Signed-off-by: Olof Johansson commit 95f4e568eb1786e300353ffba7830c365ab78682 Merge: 874767e b92f438 Author: Olof Johansson Date: Sun Jan 29 20:57:59 2017 -0800 Merge tag 'tegra-for-4.11-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers memory: tegra: Changes for v4.11-rc1 This contains a single commit that plugs a potential device node leak in error handling code. * tag 'tegra-for-4.11-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Add a missing 'of_node_put()' call Signed-off-by: Olof Johansson commit 9cbcb077bfb451206a1743613e87b2567a8a4d13 Merge: 656b532 7e1c23b Author: Olof Johansson Date: Sun Jan 29 20:57:26 2017 -0800 Merge tag 'renesas-arm64-dt2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Second Round of Renesas ARM64 Based SoC DT Updates for v4.11 r8a779[56] SoCs: * Mark EthernetAVB device node disabled in DT for r8a779[56] SoCs - They are enabled as appropriate in board DT files * Link ARM GIC to clock and clock domain on r8a779[56] SoCs * Add thermal support r8a7795 SoC: * Tidyup audma definition order on r8a7795 SoC * Add missing power-domains property for SATA r8a7795/h3ulcb board: * Add MIX/CTU support as per support present in DT for r8a7796 * tag 'renesas-arm64-dt2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: r8a7796: Mark EthernetAVB device node disabled arm64: dts: r8a7795: Mark EthernetAVB device node disabled arm64: dts: r8a7795: tidyup audma definition order arm64: dts: r8a7796: Link ARM GIC to clock and clock domain arm64: dts: r8a7795: Link ARM GIC to clock and clock domain arm64: dts: r8a7796: Add R-Car Gen3 thermal support arm64: dts: r8a7795: Add R-Car Gen3 thermal support arm64: dts: r8a7795: Add missing power-domains property for sata arm64: dts: h3ulcb: follow sound CTU/MIX supports Signed-off-by: Olof Johansson commit d47949868bc2232242eef91de2919bc3a024ae3e Merge: 18e738d 78162d4 Author: Olof Johansson Date: Sun Jan 29 20:56:06 2017 -0800 Merge tag 'at91-ab-4.11-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt DT for 4.11 #2: - Enable the DMA on sama5d2 and sama5d4 xplained to fix an issue seen by kernelci * tag 'at91-ab-4.11-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: Enable DMA on sama5d2_xplained console ARM: dts: at91: Enable DMA on sama5d4_xplained console Signed-off-by: Olof Johansson commit 8b6bc21e69480c746f489f85ec8ef528fb2f2bd0 Merge: 4b35ba1 aa7f39d Author: Olof Johansson Date: Sun Jan 29 20:55:29 2017 -0800 Merge tag 'renesas-soc2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Second Round of Renesas ARM Based SoC Updates for v4.11 * Add more register documentation to R-Car Gen2 PM * tag 'renesas-soc2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Add more register documentation Signed-off-by: Olof Johansson commit 18e738d767542675bc15f296f9d87ff8444c0b94 Merge: 1a0c4ca 5786ac1 Author: Olof Johansson Date: Sun Jan 29 20:54:21 2017 -0800 Merge tag 'renesas-dt2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Updates for v4.11 Enhancements: - Add power-domains to mmcif on r7s72100 SoC - Add OSTM to rskrza1/r7s72100 - Link ARM GIC to clock and clock domain on r8a774[35] SoCs Clean-up: - Correct SATA device status on r8a7779/marzen * tag 'renesas-dt2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r7s72100: add power-domains to mmcif ARM: dts: rskrza1: add ostm DT support ARM: dts: r7s72100: add ostm to device tree ARM: dts: r7s72100: add ostm clock to device tree ARM: dts: r8a7745: Link ARM GIC to clock and clock domain ARM: dts: r8a7743: Link ARM GIC to clock and clock domain ARM: dts: r8a7779, marzen: Fix sata device status Signed-off-by: Olof Johansson commit f605208e01f5b8ee7b44f3624ec8807cfe85ea7e Author: Jens Axboe Date: Sun Jan 29 20:04:49 2017 -0700 nvme: fix compilation of scsi component Since we moved the cdb parts and define out of the block proper, we need to include scsi/scsi_request.h for the nvme scsi layer. Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Reported-by: Stephen Rothwell Signed-off-by: Jens Axboe drivers/nvme/host/scsi.c | 1 + 1 file changed, 1 insertion(+) commit 44e4e5fb57fbcf80877906b85e4b03920e44f167 Author: Andreas Färber Date: Thu Jan 26 15:20:28 2017 +0100 MAINTAINERS: Extend ARM/Mediatek SoC support section Catch mt7623 and arm64 dts subdirectory. Signed-off-by: Andreas Färber Signed-off-by: Matthias Brugger Signed-off-by: Olof Johansson MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 4b35ba1108517ccda8a484876e69dd9ea78e9570 Merge: f2d53a8 d9bd264 Author: Olof Johansson Date: Sun Jan 29 17:36:44 2017 -0800 Merge tag 'pxa-for-4.11' of https://github.com/rjarzmik/linux into next/soc This is the pxa changes for v4.11 cycle. This cycle is a minor fixes one, covering : - build fixes from Arnd, mainly include related - transfer of maintainance of Motorala phone to Robert * tag 'pxa-for-4.11' of https://github.com/rjarzmik/linux: MAINTAINERS: transfer maintainership for the EZX platform ARM: pxa: include linux/leds.h ARM: pxa: ezx: fix a910 camera data Signed-off-by: Olof Johansson commit a3e3fa0bfaedc057b484b0a5a043e1657eabafa2 Author: Masahiro Yamada Date: Mon Dec 26 11:14:53 2016 +0900 arm64: defconfig: enable CONFIG_MMC_SDHCI_CADENCE Enable the Cadence SD/SDIO/eMMC controller. This is used on Socionext UniPhier SoC family. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit f2d53a8f6e8045ff5978156e41d00d0f7166d0fe Merge: f0d0b8c 0ecac9f Author: Olof Johansson Date: Sun Jan 29 17:30:56 2017 -0800 Merge tag 'hisi-armv7-soc-for-4.11' of git://github.com/hisilicon/linux-hisi into next/soc ARM: mach-hisi: Hisilicon SoC updates for 4.11 - Drop the declaration of the unimplemented hip01_cpu_die * tag 'hisi-armv7-soc-for-4.11' of git://github.com/hisilicon/linux-hisi: arm: hisi: drop extern hip01_cpu_die Signed-off-by: Olof Johansson commit 4e15a5057b76a5537d05f8d1a26a20fdabc61f02 Merge: 8179a77 0f84832f Author: Olof Johansson Date: Sun Jan 29 17:30:09 2017 -0800 Merge tag 'hisi-defconfig-for-4.11' of git://github.com/hisilicon/linux-hisi into next/defconfig ARM64: hisilicon: defconfig updates for 4.11 - Enable ARM_SMMU_V3 in the arm64 defconfig - Enable NUMA and NUMA_BALANCING in the arm64 defconfig * tag 'hisi-defconfig-for-4.11' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: Enable NUMA and NUMA_BALANCING arm64: defconfig: enable SMMUv3 config Signed-off-by: Olof Johansson commit 656b532ffc60590cfc3433eb4d6ccdfd1741a1f5 Merge: 5ee3dd8 35ca816 Author: Olof Johansson Date: Sun Jan 29 17:28:40 2017 -0800 Merge tag 'hisi-arm64-dt-for-4.11' of git://github.com/hisilicon/linux-hisi into next/dt64 ARM64: DT: Hisilicon SoC DT updates for 4.11 - Add binding for Hi3660 SoC and HiKey960 Board - Add binding for ARM Cortex-A73 - Add dts files for HiKey960 development board * tag 'hisi-arm64-dt-for-4.11' of git://github.com/hisilicon/linux-hisi: arm64: dts: Add dts files for Hisilicon Hi3660 SoC dt-bindings: Add a support cpu type for cortex-a73 document: dt: add binding for Hi3660 SoC Signed-off-by: Olof Johansson commit 5ee3dd850c2ca073cbe0b9d9dc9fd51f9db864b0 Merge: 62f838c 6de1845 Author: Olof Johansson Date: Sun Jan 29 17:21:10 2017 -0800 Merge tag 'v4.10-next-dts' of https://github.com/mbgg/linux-mediatek into next/dt64 For mt8173: - set mm_sel clock to 400 MHz to support 4K HDMI - adjust power efficiency between the little and big cores - add a node for thermal calibration via e-fuse data * tag 'v4.10-next-dts' of https://github.com/mbgg/linux-mediatek: arm64: dts: mt8173: add node for thermal calibration arm64: dts: mt8173: Fix cpu_thermal cooling-maps contributions arm64: dts: mt8173: add mmsel clocks for 4K support Signed-off-by: Olof Johansson commit 1a0c4ca509e77f46cc1f985f53523fe55ab50052 Merge: 7a38003 e348dc7 Author: Olof Johansson Date: Sun Jan 29 17:19:58 2017 -0800 Merge tag 'v4.10-next-dts32' of https://github.com/mbgg/linux-mediatek into next/dt Lots of updates for mt2701: Rearrange the dt nodes and fix unit address for pincontroler Add nodes for: - clock controller subsystems - scpsys controller - iommu and smi - spi - nand - auxadc - thermal controller and zones Email address updated for mt7623 devicetree files. * tag 'v4.10-next-dts32' of https://github.com/mbgg/linux-mediatek: arm: dts: mt2701: Add thermal device node. arm: dts: mt2701: Add auxadc device node. arm: dts: mt2701: Add nand device node arm: dts: mt2701: Add spi device node ARM: dts: mt2701: add iommu/smi dtsi node for mt2701 ARM: dts: mediatek: update my email address arm: dts: mt2701: Add power domain controller device node arm: dts: mt2701: Add subsystem clock controller device nodes arm: dts: mt2701: Sort DT nodes by register address Signed-off-by: Olof Johansson commit 8179a77deb17323af44c2bad302caaba31b342c4 Merge: e66e937 ac57feb Author: Olof Johansson Date: Sun Jan 29 17:18:21 2017 -0800 Merge tag 'omap-for-v4.11/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/defconfig Few omap2plus_defconfig changes for v4.11 merge window: - Switch to use LIS3LV02DL IIO driver instead of the LIS3LC02D misc driver - Set CONFIG_SERIAL_8250_RUNTIME_UARTS=6 to avoid runtime warnings on omap5 and dra7 - Enable ksz9021 phy and m41t80 rtc as they are used at least on phyCORE-AM335x * tag 'omap-for-v4.11/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Enable support for RTC M41T80 ARM: omap2plus_defconfig: Enable support for micrell phys ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 ARM: defconfig: omap2plus: switch LIS3LV02DL driver Signed-off-by: Olof Johansson commit 7a38003b6907335bc253b134d70b05481e88bde9 Merge: 2e33f29 d8e166b Author: Olof Johansson Date: Sun Jan 29 17:16:52 2017 -0800 Merge tag 'omap-for-v4.11/dt-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Device tree changes for omaps for v4.11 merge window. These changes add earlycon stdout-path propety for the SoCs so far tested with it. The other changes are addition of BeagleBone green and making WLAN work on BeagleBone black wireless and green wireless. The rest of the changes are the usual enabling features on various devices: - Enable devices on am335x-sl50 - Changes to dra7-evm boards to enable enable irqs for dp83867 eth phys, add pinmux configuration for mmc, remov erratum i869 pinmux configurations, disable NAND support because of pin conflict, add pcf8575 used for lcd - Remove NAND partition table for omap3-igep - Configure USB Ethernet MAC from device tree for beagleboard xm, pandaboard, omap5-uevm and igepv5 - Configure am335x-chilisom to wake from RTC-only state - Update Nanobone for external FRAM chip - Clean up n900 dts - Update am335x-phycore and am335x-wega for various devices - Changes for am57xx-beagle-x15 to implement rgmii2 errata * tag 'omap-for-v4.11/dt-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (35 commits) ARM: dts: dra72/1-evm: add pcf8575 used for lcd ARM: dts: dra7xx: Add stdout-path property ARM: dts: am57xx: Add stdout-path property ARM: dts: am43xx: Add stdout-path property ARM: dts: am33xx: Add stdout-path property ARM: dts: am335x-sl50: Enable the Ambient Light Sensor. ARM: dts: am335x-sl50: Enable the MCP23017 GPIO Expander. ARM: dts: am335x-sl50: Enable BQ32000 Real Time Clock. ARM: dts: am335x-sl50: Enable SPI0 interface and Flash Memory. ARM: dts: am335x-sl50: Enable UART1. ARM: dts: am335x-sl50: Remove I2C1 node. ARM: dts: omap3-igep: Remove NAND partition table ARM: dts: am57xx-beagle-x15: implement errata "Ethernet RGMII2 Limited to 10/100 Mbps" ARM: dts: am335x-phycore-som: Remove partition tables ARM: dts: dra72-evm-revc: enable irqs for dp83867 eth phys ARM: dts: Configure BeagleBone peripheral USB VBUS irq ARM: dts: omap5-igep0050: Allow bootloader to configure USB Ethernet MAC ARM: dts: omap5-uevm: Allow bootloader to configure USB Ethernet MAC ARM: dts: pandaboard: Allow bootloader to configure USB Ethernet MAC ARM: omap3: beagleboard-xm: dt: Add ethernet to the device tree ... Signed-off-by: Olof Johansson commit 874767e52cec4f5726ce11339b12cc08386cf88e Merge: 1ae7776 36cc9fd Author: Olof Johansson Date: Sun Jan 29 17:16:17 2017 -0800 Merge tag 'omap-for-v4.11/drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers Just a single wkup_m3_ipc clean-up for v4.11 merge window. We don't currently have anything else for drivers/soc to merge, but I'd expect that to change as soon as we can start moving PM code into drivers with the recently posted SRAM changes. Anyways, sent as a separate pull request to make it easy to group the ARM SoC pull requests. * tag 'omap-for-v4.11/drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: wkup_m3_ipc: Drop wait from wkup_m3_rproc_boot_thread Signed-off-by: Olof Johansson commit f0d0b8cb6bb361bd88f10900e9716eec73e262d9 Merge: 37b3785 8c4bc91 Author: Olof Johansson Date: Sun Jan 29 17:15:36 2017 -0800 Merge tag 'omap-for-v4.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc SoC changes for omaps for v4.11 merge window. This adds support for keeping the interconnect target module active for uart if earlycon is specified. And we're adding Aaro Koskinen as a co-maintainer for omap1 to make sure things stay working for omap1. The other changes are mostly clean-up of old legacy code: - Remove unused omap_display_init() - Make omapdss_find_dss_of_node() function static - Add support for earlycon - Tidy up omap1 usb logging output with pr_cont - Make omap_otg_init() static - Delete redundant CPU class checks for omap1 - Remove unused mpurate cmdline option that has not done anything for past 1.5 years at least * tag 'omap-for-v4.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: clock: Remove unused mpurate cmdline option ARM: OMAP2+: omap_hwmod: Add support for earlycon MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer ARM: OMAP1: USB: delete redundant CPU class checks ARM: OMAP1: USB: make omap_otg_init() static ARM: OMAP1: USB: tidy up logging output ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static ARM: OMAP2+: Remove unused omap_display_init() function Signed-off-by: Olof Johansson commit c0d32456091a81b0880e302d8c38c736a4dddab0 Merge: 2af49ab6 631af44 Author: Olof Johansson Date: Sun Jan 29 17:14:43 2017 -0800 Merge tag 'omap-for-v4.11/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical Non-urgent fixes for omaps for v4.11 merge window. These all are fixes for things that have never worked or have been broken for a long time and nobody noticed: - Fix omap3 off mode pull defines - Allow multiple pdata quirks instead of just one - Fix am335x and dm814x scm syscon to probe children too - Fix compatible for ti81xx to allow use with 8250_omap as well - Fix 8250_omap on omap5 by adding HWMOD_SWSUP_SIDLE_ACT flag - Fix SoC detection for omap36/37 SoCs * tag 'omap-for-v4.11/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP3: Fix SoC detection of OMAP36/37 Family ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART ARM: dts: Fix compatible for ti81xx uarts for 8250 ARM: dts: Fix am335x and dm814x scm syscon to probe children ARM: OMAP2+: Fix init for multiple quirks for the same SoC ARM: dts: Fix omap3 off mode pull defines Signed-off-by: Olof Johansson commit e66e937121321e6a7aa692a87de888aae7bc9d23 Author: Marc Gonzalez Date: Wed Jan 25 18:43:23 2017 +0100 ARM: Import tango4_defconfig Import a minimal defconfig for tango4 boards. Signed-off-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/configs/tango4_defconfig | 94 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit cf63d01af40c293b92141e4867479a3288b3e3c6 Merge: e6fb51c 685db57 Author: Olof Johansson Date: Sun Jan 29 17:05:52 2017 -0800 Merge tag 'davinci-for-v4.11/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Enable config options for DaVinci VPIF, LCDC, PWM, Pull up/down pinconf driver and IIO in davinci_all_defconfig * tag 'davinci-for-v4.11/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable iio ARM: davinci_all_defconfig: Enable PWM modules ARM: davinci_all_defconfig: enable DA8xx pinconf ARM: davinci_all_defconfig: enable pwm-beeper ARM: davinci_all_defconfig: enable dumb vga-dac drm bridge ARM: davinci_all_defconfig: enable video capture as modules Signed-off-by: Olof Johansson commit 2e33f29400c38b70729c916da65b44294d956a03 Merge: 43d08e2 4302a38 Author: Olof Johansson Date: Sun Jan 29 17:05:23 2017 -0800 Merge tag 'davinci-for-v4.11/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Device tree updates for DaVinci DA850 * GPIO keys on DA850 LCDK * LCDC display on DA850 LCDK * USB OHCI on DA850 LCDK * VPIF (video input) on DA850 LCDK * Add a DA8xx specific compatible for UARTs * Introduce support for Lego Mindstorms EV3 * tag 'davinci-for-v4.11/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: Add LEGO MINDSTORMS EV3 dts dt-bindings: add "microchip,24c128" compatible string dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification dt-bindings: Add vendor prefix for LEGO ARM: dts: da850: Add ti,da830-uart compatible for serial ports ARM: dts: davinci: da850-lcdk: enable VPIF ARM: dts: davinci: da850-evm: enable VPIF ARM: dts: davinci: da850: VPIF: add node and muxing ARM: dts: da850-lcdk: Enable ohci for omapl138 lcdk ARM: dts: da850: Add usb device node ARM: dts: da850: specify the maximum pixel clock rate for tilcdc ARM: dts: da850-lcdk: add the vga-bridge node ARM: dts: da850: rename the display node label ARM: dts: da850-lcdk: add gpio-keys Signed-off-by: Olof Johansson commit 2af49ab6868ca84e7a0c5e8d984d4e1754edb5a5 Merge: 0c744ea 430d7dd Author: Olof Johansson Date: Sun Jan 29 16:58:18 2017 -0800 Merge tag 'davinci-for-v4.11/fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/fixes-non-critical Non-critical DaVinci fixes for v4.11 * Coding style and typo fix * Make PLL0 rate setting API for DA850 less confusing to use. * tag 'davinci-for-v4.11/fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: bus: da850-mstpri: fix my e-mail address ARM: davinci: da850: fix da850_set_pll0rate() ARM: davinci: da850: coding style fix Signed-off-by: Olof Johansson commit 40be0dda0725886b623d67868db3219a2e74683b Author: Rafał Miłecki Date: Sat Jan 28 15:15:42 2017 +0100 net: add devm version of alloc_etherdev_mqs function This patch adds devm_alloc_etherdev_mqs function and devm_alloc_etherdev macro. These can be used for simpler netdev allocation without having to care about calling free_netdev. Thanks to this change drivers, their error paths and removal paths may get simpler by a bit. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller include/linux/etherdevice.h | 5 +++++ net/ethernet/eth.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 936f459bea07868723b057ece43d321446c82f0a Merge: 678550c6 3e7514a Author: David S. Miller Date: Sun Jan 29 19:21:26 2017 -0500 Merge tag 'batadv-next-for-davem-20170128' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two fixes for batman-adv for net-next: - fix double call of dev_queue_xmit(), caused by the recent introduction of net_xmit_eval(), by Sven Eckelmann - Fix includes for IS_ERR/ERR_PTR, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 678550c651aee051d66112933c87894f129b9355 Author: Yuchung Cheng Date: Fri Jan 27 16:24:39 2017 -0800 tcp: include locally failed retries in retransmission stats Currently the retransmission stats are not incremented if the retransmit fails locally. But we always increment the other packet counters that track total packet/bytes sent. Awkwardly while we don't count these failed retransmits in RETRANSSEGS, we do count them in FAILEDRETRANS. If the qdisc is dropping many packets this could under-estimate TCP retransmission rate substantially from both SNMP or per-socket TCP_INFO stats. This patch changes this by always incrementing retransmission stats on retransmission attempts and failures. Another motivation is to properly track retransmists in SCM_TIMESTAMPING_OPT_STATS. Since SCM_TSTAMP_SCHED collection is triggered in tcp_transmit_skb(), If tp->total_retrans is incremented after the function, we'll always mis-count by the amount of the latest retransmission. Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7e98102f489775d8c000884fca8a0d995ea688a9 Author: Yuchung Cheng Date: Fri Jan 27 16:24:38 2017 -0800 tcp: record pkts sent and retransmistted Add two stats in SCM_TIMESTAMPING_OPT_STATS: TCP_NLA_DATA_SEGS_OUT: total data packets sent including retransmission TCP_NLA_TOTAL_RETRANS: total data packets retransmitted The names are picked to be consistent with corresponding fields in TCP_INFO. This allows applications that are using the timestamping API to measure latency stats to also retrive retransmission rate of application write. Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/tcp.h | 2 ++ net/ipv4/tcp.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 43d08e211f75e77170c74a07c72aae0c9f8d73b1 Merge: d12556e 7a5c275 Author: Olof Johansson Date: Sun Jan 29 16:09:01 2017 -0800 Merge tag 'qcom-dts-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm Device Tree Changes for v4.11 * Add Coresight components for APQ8064 * Fixup PM8058 nodes * Add APQ8060 gyro and accel support * Enable SD600 HDMI support * Add RIVA supprort for Sony Yuga and SD600 * Add PM8821 support * Add MSM8974 ADSP, USB gadget, SMD, and SMP2P support * Fix IPQ8064 clock frequencies * tag 'qcom-dts-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: qcom: Add apq8064 CoreSight components ARM: dts: Add gyro and accel to APQ8060 Dragonboard ARM: dts: reference PM8058 as IRQ parent ARM: dts: rename MSM8660/APQ8060 pmicintc to pm8058 ARM: dts: sd-600eval: enable 1.8v regulator on LS expansion ARM: dts: sd-600eval: add hdmi support ARM: dts: move hdmi pinctrl out of board file. ARM: dts: qcom: sd600eval: Enable riva-pil ARM: dts: qcom: sd600-eval: pm8921_s2 regulator properties ARM: dts: qcom: apq8064-sony-yuga: Enable riva-pil ARM: dts: qcom: apq8064: Add riva-pil node ARM: dts: apq8064: add support to pm8821 arm: dts: qcom: Fix ipq board clock rates ARM: dts: msm8974: Remove "unused" reserved region ARM: dts: msm8974: Add ADSP PIL node ARM: dts: msm8974: Add ADSP smp2p and smd nodes ARM: dts: qcom: msm8974: Add USB gadget nodes Signed-off-by: Olof Johansson commit 1ae777618948ef6be566a8f993fce0638e08fc99 Merge: 5f1223c a811b42 Author: Olof Johansson Date: Sun Jan 29 16:08:07 2017 -0800 Merge tag 'qcom-drivers-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Qualcomm ARM Based Driver Updates for v4.11 * Fix issues with SCM compile testing * Add SCM set remote state API * Mask APQ8064 SCM clock dependency issue * Add Qualcomm DMA folder to MAINTAINERS * Fix EBI2 dependencies * tag 'qcom-drivers-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: firmware: qcom_scm: Add set remote state API MAINTAINERS: Update the files to include the Qualcomm DMA folder bus: qcom_ebi2: default y if ARCH_QCOM firmware: qcom: scm: Mask APQ8064 core clk dependency firmware: qcom: scm: Add empty functions to help compile testing Signed-off-by: Olof Johansson commit f33f4ac3d3a6e29f1c5a9d8cd1058d298f4685f4 Merge: 5b8784a fd0e97b Author: David S. Miller Date: Sun Jan 29 19:07:03 2017 -0500 Merge branch 'qcom-emac-misc' Timur Tabi says: ==================== net: qcom/emac: Although not related, these patches affect the same files, so they should be applied in order. The first patch cleans up logging of when the the phy driver is attached. The second patch always configures the SGMII to use autonegotiation mode. The third patch removes a redundant call to emac_mac_start(). The fourth patch removes some extraneous non-functioning WOL code. The fifth patch adds an error handler for the SGMII block. ==================== Signed-off-by: David S. Miller commit fd0e97b806f0331df95f5fc58cdd488d169efb7f Author: Timur Tabi Date: Fri Jan 27 16:43:48 2017 -0600 net: qcom/emac: add an error interrupt handler for the sgmii The SGMII (internal PHY) can report decode errors via an interrupt. It can also report autonegotiation status changes, but we don't need to track those. The SGMII can recover automatically from most decode errors, so we only reset the interface if we get multiple consecutive errors. It's possible for bogus decode errors to be reported while the link is being brought up. The interrupt is registered when the interface is opened, and it's enabled after the link is up. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 8 +- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 126 +++++++++++++++++++++++- drivers/net/ethernet/qualcomm/emac/emac-sgmii.h | 16 ++- drivers/net/ethernet/qualcomm/emac/emac.c | 10 ++ 4 files changed, 153 insertions(+), 7 deletions(-) commit e7e7454b40d290f6efb63c792c56c416922dcef8 Author: Timur Tabi Date: Fri Jan 27 16:43:47 2017 -0600 net: qcom/emac: remove extraneous wake-on-lan code The EMAC driver does not support wake-on-lan, but there is still code left-over that partially enables it. Remove that code and a few macros that support it. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 10 ---------- drivers/net/ethernet/qualcomm/emac/emac.h | 4 ---- 2 files changed, 14 deletions(-) commit 0f20276dd51bf4b74c7ba961c32fffb5a155fb1e Author: Timur Tabi Date: Fri Jan 27 16:43:45 2017 -0600 net: qcom/emac: do not call emac_mac_start twice emac_mac_start() uses information from the external PHY to program the MAC, so it makes no sense to call it before the link is up. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-mac.h | 1 - drivers/net/ethernet/qualcomm/emac/emac.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) commit 3db5d555eaec44ee0e1c80194963c4256b23f6ee Author: Timur Tabi Date: Fri Jan 27 16:43:44 2017 -0600 net: qcom/emac: always use autonegotiation to configure the SGMII link Regardless of how the external PHY is configured, the internal PHY (the "SGMII" block) is capable of configuring the SGMII link automatically. When the external PHY link comes up, regardless of how it is configured, the SGMII link is configured automatically. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 49 +++++-------------------- 1 file changed, 10 insertions(+), 39 deletions(-) commit 9da34f27c13bfc8d13b5599808d815382ef41128 Author: Timur Tabi Date: Fri Jan 27 16:43:43 2017 -0600 net: qcom/emac: display the phy driver info after we connect The PHY driver is attached only when the driver calls phy_connect_direct(). Calling phy_attached_print() to display information about the PHY driver prior to that point is meaningless. The interface can be brought down, a new PHY driver can be loaded, and the interface then brought back up. This is the correct time to display information about the attached driver. Since phy_attached_print() also prints information about the interrupt, that needs to be set as well. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 4 +++- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) commit 5b8784aaf29be20ba8d363e1124d7436d42ef9bf Author: andy zhou Date: Fri Jan 27 13:45:28 2017 -0800 openvswitch: Simplify do_execute_actions(). do_execute_actions() implements a worthwhile optimization: in case an output action is the last action in an action list, skb_clone() can be avoided by outputing the current skb. However, the implementation is more complicated than necessary. This patch simplify this logic. Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit cc272163ea554a97dac180fa8dd6cd54c2810bd1 Author: Mohit Gambhir Date: Thu Jan 26 13:12:27 2017 -0500 x86/xen: Fix APIC id mismatch warning on Intel This patch fixes the following warning message seen when booting the kernel as Dom0 with Xen on Intel machines. [0.003000] [Firmware Bug]: CPU1: APIC id mismatch. Firmware: 0 APIC: 1] The code generating the warning in validate_apic_and_package_id() matches cpu_data(cpu).apicid (initialized in init_intel()-> detect_extended_topology() using cpuid) against the apicid returned from xen_apic_read(). Now, xen_apic_read() makes a hypercall to retrieve apicid for the boot cpu but returns 0 otherwise. Hence the warning gets thrown for all but the boot cpu. The idea behind xen_apic_read() returning 0 for apicid is that the guests (even Dom0) should not need to know what physical processor their vcpus are running on. This is because we currently do not have topology information in Xen and also because xen allows more vcpus than physical processors. However, boot cpu's apicid is required for loading xen-acpi-processor driver on AMD machines. Look at following patch for details: commit 558daa289a40 ("xen/apic: Return the APIC ID (and version) for CPU 0.") So to get rid of the warning, this patch modifies xen_cpu_present_to_apicid() to return cpu_data(cpu).apicid instead of calling xen_apic_read(). The warning is not seen on AMD machines because init_amd() populates cpu_data(cpu).apicid by calling hard_smp_processor_id()->xen_apic_read() as opposed to using apicid from cpuid as is done on Intel machines. Signed-off-by: Mohit Gambhir Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56dd5af9bc23d0d5d23bb207c477715b4c2216c5 Author: Juergen Gross Date: Tue Jan 10 14:32:52 2017 +0100 xen/netback: set default upper limit of tx/rx queues to 8 The default for the maximum number of tx/rx queues of one interface is the number of cpus of the system today. As each queue pair reserves 512 grant pages this default consumes a ridiculous number of grants for large guests. Limit the queue number to 8 as default. This value can be modified via a module parameter if required. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/net/xen-netback/netback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 034702a64a6692a8d5d0d9630064a014fc633728 Author: Juergen Gross Date: Tue Jan 10 14:32:51 2017 +0100 xen/netfront: set default upper limit of tx/rx queues to 8 The default for the number of tx/rx queues of one interface is the number of vcpus of the system today. As each queue pair reserves 512 grant pages this default consumes a ridiculous number of grants for large guests. Limit the queue number to 8 as default. This value can be modified via a module parameter if required. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/net/xen-netfront.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6d45408db1ad87c2080cffeb7868553eec6e053b Merge: 1f5d492 ddd3a0c Author: David S. Miller Date: Sun Jan 29 18:42:47 2017 -0500 Merge branch 'dsa-multi-chip-prep' Vivien Didelot says: ==================== net: dsa: preparatory patches for multi-chip In order to introduce support for multi-chip configuration, we need to do a few enhancements. This patchset makes the number of ports in a switch dynamic (instead of capping to DSA_MAX_PORTS), stores the switch and index of a port in the dsa_port structure, uses it in the slave private structure, and exposes the bridge device a port belongs to. ==================== Signed-off-by: David S. Miller commit ddd3a0c8408df9ec07279f1e3dc9a98781a5217e Author: Vivien Didelot Date: Fri Jan 27 15:29:44 2017 -0500 net: dsa: b53: use dsa_port's bridge pointer Now that DSA exposes the bridge device pointer to which a port belongs, use it when programming the port based VLANs and thus remove the cache. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 9 +++------ drivers/net/dsa/b53/b53_priv.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) commit 922754a48a4e4b87ee6f5bf80e7463a82e124ab8 Author: Vivien Didelot Date: Fri Jan 27 15:29:43 2017 -0500 net: dsa: qca8k: use dsa_port's bridge pointer Now that DSA exposes the bridge device pointer to which a port belongs, use it when programming the port based VLANs and thus remove the cache. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 12 ++++-------- drivers/net/dsa/qca8k.h | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) commit fae8a25e5b3b627f1ea005ffa663d067f4d5fe44 Author: Vivien Didelot Date: Fri Jan 27 15:29:42 2017 -0500 net: dsa: mv88e6xxx: use dsa_port's bridge pointer Now that DSA exposes the bridge device pointer to which a port belongs, use it when programming the port based VLANs and thus remove the cache. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 27 +++++++++++---------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 6 ------ 2 files changed, 11 insertions(+), 22 deletions(-) commit f123f2fbedc7c2723ceb050cd88c2ea1d6a8be32 Author: Vivien Didelot Date: Fri Jan 27 15:29:41 2017 -0500 net: dsa: pass bridge device when a port leaves Upon reception of the NETDEV_CHANGEUPPER, a leaving port is already unbridged, so reflect this by assigning the port's bridge_dev pointer to NULL before calling the port_bridge_leave DSA driver operation. Now that the bridge_dev pointer is exposed to the drivers, reflecting the current state of the DSA switch fabric is necessary for the drivers to adjust their port based VLANs correctly. Pass the bridge device pointer to the port_bridge_leave operation so that drivers have all information to re-program their chips properly, and do not need to cache it anymore. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/b53/b53_priv.h | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 3 ++- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 3 ++- net/dsa/slave.c | 10 +++++----- 6 files changed, 12 insertions(+), 10 deletions(-) commit a5e9a02e1f182237ef44eb3919cf4dd45ed4db9b Author: Vivien Didelot Date: Fri Jan 27 15:29:40 2017 -0500 net: dsa: move bridge device in dsa_port Move the bridge_dev pointer from dsa_slave_priv to dsa_port so that DSA drivers can access this information and remove the need to cache it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/dsa_priv.h | 1 - net/dsa/slave.c | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) commit afdcf151c1f7346207dcee3f8d6d82991dbbb7e5 Author: Vivien Didelot Date: Fri Jan 27 15:29:39 2017 -0500 net: dsa: store a dsa_port in dsa_slave_priv Store a pointer to the dsa_port structure in the dsa_slave_priv structure, instead of the switch/port index. This will allow to store more information such as the bridge device, needed in DSA drivers for multi-chip configuration. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 8 +-- net/dsa/slave.c | 164 +++++++++++++++++++++++++------------------------- net/dsa/tag_brcm.c | 4 +- net/dsa/tag_dsa.c | 8 +-- net/dsa/tag_edsa.c | 8 +-- net/dsa/tag_qca.c | 2 +- net/dsa/tag_trailer.c | 2 +- 7 files changed, 96 insertions(+), 100 deletions(-) commit 818be8489d6fc8f4cc2c7699bbfd8e1983080f10 Author: Vivien Didelot Date: Fri Jan 27 15:29:38 2017 -0500 net: dsa: add ds and index to dsa_port Add the physical switch instance and port index a DSA port belongs to to the dsa_port structure. That can be used later to retrieve information about a physical port when configuring a switch fabric, or lighten up struct dsa_slave_priv. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 2 ++ net/dsa/dsa2.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 26895e299cfb583d304553e9c259e694a7e83397 Author: Vivien Didelot Date: Fri Jan 27 15:29:37 2017 -0500 net: dsa: use ds->num_ports when possible The dsa_switch structure contains the number of ports. Use it where the structure is valid instead of the DSA_MAX_PORTS value. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa.c | 16 ++++++++-------- net/dsa/dsa2.c | 12 ++++++------ net/dsa/slave.c | 2 +- net/dsa/tag_brcm.c | 2 +- net/dsa/tag_dsa.c | 2 +- net/dsa/tag_edsa.c | 2 +- net/dsa/tag_trailer.c | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) commit a0c02161ecfc2f40a0837926efac5376bc6fd6d3 Author: Vivien Didelot Date: Fri Jan 27 15:29:36 2017 -0500 net: dsa: variable number of ports Change the ports[DSA_MAX_PORTS] array of the dsa_switch structure for a zero-length array, allocated at the same time as the dsa_switch structure itself. A dsa_switch_alloc() helper is provided for that. This commit brings no functional change yet since we pass DSA_MAX_PORTS as the number of ports for the moment. Future patches can update the DSA drivers separately to support dynamic number of ports. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 7 ++++--- drivers/net/dsa/mv88e6xxx/chip.c | 3 +-- drivers/net/dsa/qca8k.c | 3 +-- include/net/dsa.h | 6 +++++- net/dsa/dsa.c | 5 ++--- net/dsa/dsa2.c | 16 ++++++++++++++++ 6 files changed, 29 insertions(+), 11 deletions(-) commit e6fb51c1a9eaa632e947a84990ca4a575b9e8db1 Merge: de474f9 e96165a Author: Olof Johansson Date: Sun Jan 29 15:40:07 2017 -0800 Merge tag 'qcom-defconfig-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM Based defconfig Updates for v4.11 * Enable APQ8060 Dragonboard related devices * Enable AHCI, PCIE, USB, thermal sensors, and ATL1C related configs * Enable RPM/RPM-SMD clocks * tag 'qcom-defconfig-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: defconfig: qcom: add APQ8060 DragonBoard devices ARM: qcom_defconfig: enable thermal sensors ARM: qcom_defconfig: add ahci configs ARM: qcom_defconfig: add pcie and atl1c ethernet configs ARM: qcom_defconfig: add usb related configs ARM: qcom_defconfig: Enable RPM/RPM-SMD clocks Signed-off-by: Olof Johansson commit 1f5d492a34311545b87d223c7fc1d531c610a410 Merge: 1a28242 0e98f9d Author: David S. Miller Date: Sun Jan 29 18:35:44 2017 -0500 Merge branch 'ravb-gigabit-R-Car-H3-ES1.1-and-R-Car-M3-W' Simon Horman says: ==================== ravb: Support 1Gbps on R-Car H3 ES1.1+ and R-Car M3-W this series adds support for gigabit communication to the Renesas EthernetAVB controller when used in conjunction with R-Car Gen3 H3 ES1.1+ and M3-W SoCs. Gigabit is already supported with R-Car Gen 2 SoCs. The patch from Geert was previously posted for inclusion in v4.10 and acked by Dave for that purpose. It was, however, not accepted by the ARM SoC maintainers. The path from Mizuguchi-san is to address timing problems observed with gigabit transfers. I would like it considered although my own testing on M3-W did not show any timing problems. Changes since v1: * Address various feedback for "APSR" patch as noted in its changelog ==================== Signed-off-by: David S. Miller commit 0e98f9d5f0b4a9012bd4fb5ff88b3ea290deb6a8 Author: Geert Uytterhoeven Date: Fri Jan 27 20:46:27 2017 +0100 ravb: Support 1Gbps on R-Car H3 ES1.1+ and R-Car M3-W The limitation to 10/100Mbit speeds on R-Car Gen3 is valid for R-Car H3 ES1.0 only. Check for the exact SoC model to allow 1Gbps on newer revisions of R-Car H3, and on R-Car M3-W. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 61fccb2d6274f77de6d16a0dc74eda813e90eb64 Author: Kazuya Mizuguchi Date: Fri Jan 27 20:46:26 2017 +0100 ravb: Add tx and rx clock internal delays mode of APSR This patch enables tx and rx clock internal delay modes (TDM and RDM). This is to address a failure in the case of 1Gbps communication using the by salvator-x board with the KSZ9031RNX phy. This has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs. With this change APSR internal delay modes are enabled for "rgmii-id", "rgmii-rxid" and "rgmii-txid" phy modes as follows: phy mode | ASPR delay mode -----------+---------------- rgmii-id | TDM and RDM rgmii-rxid | RDM rgmii-txid | TDM Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb.h | 10 ++++++++++ drivers/net/ethernet/renesas/ravb_main.c | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 1a28242bac44b9eb24fb2e84131256cb3c63372c Author: Colin Ian King Date: Fri Jan 27 15:06:46 2017 +0000 net: ethernet: aquantia: return -ETIME in macro AQ_HW_WAIT_FOR The macro is returning ETIME which means various checks to see if the returned err is less than zero never work. I believe a -ETIME should be returned instead. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f81e5ca9155e8b4527662aa66ba984f58257ccdb Author: Colin Ian King Date: Fri Jan 27 15:00:25 2017 +0000 net: ethernet: aquantia: remove another redundant err check The check on err < 0 is redundant and can be removed. Detected by CoverityScan, CID#1398318 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 2 -- 1 file changed, 2 deletions(-) commit e52cfb63a0ba55bc962e61b5af9be166f08827ae Author: Colin Ian King Date: Fri Jan 27 14:43:46 2017 +0000 net: ethernet: aquantia: remove redundant err check The check on err < 0 is redundant and can be removed. Detected by CoverityScan, CID#1398321 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 -- 1 file changed, 2 deletions(-) commit 62f838c9988bf09553b84113da0a7b2303ac40e2 Merge: f41afa5 3a52153 Author: Olof Johansson Date: Sun Jan 29 15:08:11 2017 -0800 Merge tag 'qcom-arm64-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64 Qualcomm ARM64 Updates for v4.11 * Add Vol+ support for DB820C and APQ8016 * Add HDMI audio support for APQ8016 * Fix DB820C GPIO pinctrl name * Enable WCNSS on MSM8916 * Add SCM node for MSM8996 * Use fixed XO clock on MSM8916 * tag 'qcom-arm64-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: db820c: add support to volume up key arm64: dts: apq8016-sbc: Limit MPP4 high state to 1.8V arm64: dts: apq8016-sbc: Add Volume Up key device node arm64: dts: apq8016-sbc: add support to hdmi audio via adv7533 arm64: dts: db820c: fix gpio pinctrl name correctly ARM: dts: msm8916: Add and enable wcnss node arm64: dts: msm8996: Add SCM DT node arm64: dts: qcom: msm8916: Use fixed factor xo clock Signed-off-by: Olof Johansson commit f41afa53ad3e9f0494c6e88b67b3e50269e3239b Merge: dc6328f 3a93cc2 Author: Olof Johansson Date: Sun Jan 29 14:49:04 2017 -0800 Merge tag 'uniphier-dt64-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64 UniPhier ARM64 SoC DT updates for v4.11 - Add an SD reset controller node for LD11 SoC - Add an eMMC controller node for LD11/LD20 SoC * tag 'uniphier-dt64-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add eMMC controller node for LD11/LD20 arm64: dts: uniphier: add SD-ctrl node for LD11 SoC Signed-off-by: Olof Johansson commit d12556ea05037c321a7e88e762cf374113cc0f56 Merge: 89f6ce1 74b5146 Author: Olof Johansson Date: Sun Jan 29 14:47:53 2017 -0800 Merge tag 'uniphier-dt-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt UniPhier ARM SoC DT updates for v4.11 - Add eMMC, SD pin-mux nodes * tag 'uniphier-dt-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add SD pin-mux node ARM: dts: uniphier: add eMMC pin-mux node Signed-off-by: Olof Johansson commit 5f1223c5b09262bb5c88f77d2938c9a5ffefa40c Merge: 61c5e49 6e03f65 Author: Olof Johansson Date: Sun Jan 29 14:47:22 2017 -0800 Merge tag 'keystone_soc_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers Couple of minor cleanups for Navigator drivers for 4.11 * tag 'keystone_soc_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: ti: knav: cleanup includes and sort header files soc: ti: knav_dma: fix typos in trace message Signed-off-by: Olof Johansson commit de474f9b9724c683789bda823c1a80d703738a45 Merge: b5f8c90 a2735c3 Author: Olof Johansson Date: Sun Jan 29 14:46:54 2017 -0800 Merge tag 'keystone_config_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/defconfig ARM: Keystone config support for 4.11 - Enable Reset controller and on chip MSM RAM support. * tag 'keystone_config_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: Keystone: Enable ARCH_HAS_RESET_CONTROLLER ARM: configs: keystone: Enable Generic on-chip SRAM driver Signed-off-by: Olof Johansson commit 89f6ce1be2c94210e23bf00f6bcbc78c2153df07 Merge: eb9503e 0623013 Author: Olof Johansson Date: Sun Jan 29 14:45:17 2017 -0800 Merge tag 'keystone_dts_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt ARM: Keystone DTS update for 4.11 Brief: - MSM RAM node support for the Keystone 2 SOCs. - PSC node & reset controller node support for keystone 2 SOCs. - da830 UART node support. * tag 'keystone_dts_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone-k2e: Add PSC reset controller node ARM: dts: keystone-k2l: Add PSC reset controller node ARM: dts: keystone-k2hk: Add PSC reset controller node ARM: dts: keystone: Add PSC node ARM: keystone: dts: fix netcp clocks and add names ARM: dts: keystone-k2g: Reserve MSM RAM for boot monitor ARM: dts: keystone-k2e: Reserve MSM RAM for boot monitor ARM: dts: keystone-k2l: Reserve MSM RAM for boot monitor ARM: dts: keystone-k2hk: Reserve MSM RAM for boot monitor ARM: dts: keystone-k2g: Add MSM RAM node ARM: dts: keystone-k2e: Add MSM RAM node ARM: dts: keystone-k2l: Add MSM RAM node ARM: dts: keystone-k2hk: Add MSM RAM node ARM: dts: keystone: Add "ti,da830-uart" compatible string Signed-off-by: Olof Johansson commit dc6328feeb994d638bbeedf85dd3ce36a6237ea2 Merge: 560741d 8cbb59a Author: Olof Johansson Date: Sun Jan 29 14:42:21 2017 -0800 Merge tag 'v4.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 64bit dts changes with some adjustments to the pcie controller, usb clocks, grf phandles for the rk3399 CRUs, epd pinctrl settings, a phandle to the rk3399 tsadc and converting boards to use the recently introduced pin constants. * tag 'v4.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add rockchip,grf property for RK3399 PMUCRU/CRU arm64: dts: rockchip: add aspm-no-l0s for rk3399 arm64: dts: rockchip: add max-link-speed for rk3399 arm64: dts: rockchip: use pin constants to describe gpios arm64: dts: rockchip: add u2phy clock for ehci and ohci of rk3399 arm64: dts: rockchip: add rk3399 eDP HPD pinctrl arm64: dts: rockchip: add rk3399 thermal_zones phandle Signed-off-by: Olof Johansson commit eb9503e99a39496903939eb64d7252badf08fe45 Merge: 828a34b ec7c98e Author: Olof Johansson Date: Sun Jan 29 14:42:05 2017 -0800 Merge tag 'v4.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Bit of cleanup for the cortex-a9 uarts to have that soc-specific spare-compatible as all others have, conversion to gpio constants and addition of rk3288 qos nodes that need to be saved before a power-domain gets turned off. * tag 'v4.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add soc-specific uart compatibles for rk3066/rk3188 ARM: dts: rockchip: use pin constants to describe gpios ARM: dts: rockchip: add qos node for rk3288 Signed-off-by: Olof Johansson commit 61c5e4927b271ee01c2f808e6196e1f62d7be092 Merge: ef73594 19f0f30 Author: Olof Johansson Date: Sun Jan 29 14:32:07 2017 -0800 Merge tag 'v4.11-armsoc-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers Some extensions to the power-domain driver to support domains in hiword registers (write-mask in upper 16bit) and domain-definitions for the rk3328 soc. Secondly a "driver" that attaches to the already existing grf nodes and is able to set static defaults for settings that cannot really be attached to any specific subsystem. Most GRF settings can already be set from drivers using them, but there are some behavioural settings like the mmc/jtag switch that cannot. As the commit message states this is really meant as a last line of defence for things that neither belong to a subsystem nor to the Having this here allows arm64 socs to have this as well and also moves another bit of code out of the arm32 mach-rockchip. * tag 'v4.11-armsoc-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: drop rk3288 jtag/mmc switch handling soc: rockchip: add driver handling grf setup dt-bindings: add used but undocumented rockchip grf compatible values soc: rockchip: power-domain: add power domain support for rk3328 dt-bindings: add binding for rk3328 power domains dt-bindings: power: add RK3328 SoCs header for idle-request soc: rockchip: power-domain: Support domain control in hiword-registers Signed-off-by: Olof Johansson commit ef73594a38a6df91bf9fa7a513237f677e7ad8c2 Merge: a6589b4 1da6de3 Author: Olof Johansson Date: Sun Jan 29 14:30:31 2017 -0800 Merge tag 'samsung-drivers-soc-pmu-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Improvements for Exynos PMU driver for v4.11: Beside basic function of setting proper configuration for low power modes, the Exynos PMU (Power Management Unit) driver is also a provider of syscon regmap for its registers. This regmap is essential to many other drivers wanting to or needing to implement low power mode. Exynos pinctrl driver, before getting support for Runtime Power Management, needs access to this syscon regmap. Let's do it in a DT ABI friendly way. * tag 'samsung-drivers-soc-pmu-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pmu: Remove messages for failed memory allocation soc: samsung: pmu: Use of_device_get_match_data helper soc: samsung: pmu: Provide global function to get PMU regmap Signed-off-by: Olof Johansson commit a6589b44b077bcd615127aa1e574564029c8f4b1 Merge: 0ff6454 bb47523 Author: Olof Johansson Date: Sun Jan 29 14:29:23 2017 -0800 Merge tag 'reset-for-4.11' of git://git.pengutronix.de/pza/linux into next/drivers Reset controller changes for v4.11 - fix ti_syscon reset_status reporting - add Hisilicon Hi3660 reset controller driver - add ZTE ZX2967 reset controller driver - add LD11 SD-reset block to uniphier reset controller driver - typo and correctness fixes - make reset_control_get variants return NULL instead of an error for optional, not specified resets and have the other reset API functions silently ignore rstc == NULL parameters. * tag 'reset-for-4.11' of git://git.pengutronix.de/pza/linux: reset: make optional functions really optional reset: Change shared flag from int to bool reset: uniphier: add compatible string for LD11 SD-reset block reset: zx2967: add reset controller driver for ZTE's zx2967 family MAINTAINERS: add zx2967 reset controller driver to ARM ZTE architecture dt: bindings: add documentation for zx2967 family reset controller Documentation: dt: reset: Revise typos in TI syscon reset example reset: constify reset_control_ops structures reset: hisilicon: add reset-hi3660 dt-bindings: Document the hi3660 reset bindings reset: ti_syscon: fix a ti_syscon_reset_status issue Signed-off-by: Olof Johansson commit 744cc304a18f1c9de4f3215fbe93fe878f934179 Author: Quentin Schulz Date: Fri Jan 27 09:54:43 2017 +0100 power: supply: add AC power supply driver for AXP20X and AXP22X PMICs The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. Moreover, the AXP20X can also expose the current current and voltage values of the AC power supply. This adds the driver which exposes the status of the AC power supply of the AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron Acked-by: Maxime Ripard [removed unused elements from struct axp20x_ac_power] Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 12 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/axp20x_ac_power.c | 253 +++++++++++++++++++++++++++++++++ 3 files changed, 266 insertions(+) commit 38fa69682fe91295f42cf2153bd1cf74eea35740 Author: Quentin Schulz Date: Fri Jan 27 09:54:41 2017 +0100 dt-bindings: power: supply: add AXP20X/AXP22X AC power supply The X-Powers AXP20X and AXP22X PMICs have an AC entry to supply power to the board. They have a few registers dedicated to the status of the AC power supply. This adds the DT binding documentation for the AC power supply for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Signed-off-by: Sebastian Reichel .../bindings/power/supply/axp20x_ac_power.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 33863c938caa2538397170f1a355885f1ea1564e Author: Quentin Schulz Date: Fri Jan 27 09:54:36 2017 +0100 power: supply: axp20x_usb_power: use IIO channels when available The X-Powers AXP20X PMIC exposes the current current and voltage measures via an internal ADC. This adds the possibility to read IIO channels directly for processed values rather than reading the registers and computing the value. For backward compatibility purpose, if the IIO driver is not compiled, this driver will fall back on previous behaviour which is direct register readings. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Jonathan Cameron Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_usb_power.c | 70 +++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) commit 166e8dbd630af5248c66c29082480d3cc44da010 Author: Javier Martinez Canillas Date: Wed Jan 25 10:38:55 2017 -0300 power: supply: max14656: Export I2C and OF device ID as module aliases If the driver is built as a module, I2C module alias information is not filled so the module won't be autoloaded. Export the I2C and OF devices ID to the module by using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/power/supply/max14656_charger_detector.ko | grep alias $ After this patch: $ modinfo drivers/power/supply/max14656_charger_detector.ko | grep alias alias: i2c:max14656 alias: of:N*T*Cmaxim,max14656C* alias: of:N*T*Cmaxim,max14656 Signed-off-by: Javier Martinez Canillas Signed-off-by: Sebastian Reichel drivers/power/supply/max14656_charger_detector.c | 2 ++ 1 file changed, 2 insertions(+) commit 95ed41df129ca8f76eb190534d20f4a6dcd37213 Author: Krzysztof Kozlowski Date: Wed Dec 28 19:50:25 2016 +0200 dt-bindings: video: exynos7-decon: Remove obsolete samsung,power-domain property The samsung,power-domain property is obsolete since commit 0da658704136 ("ARM: dts: convert to generic power domain bindings for exynos DT"). Replace it with generic one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Reviewed-by: Javier Martinez Canillas Acked-by: Rob Herring Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfaf06baad0c088a55570f7a324949c498f2106c Author: Krzysztof Kozlowski Date: Sat Jan 7 10:52:00 2017 +0200 ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Replace spaces with tabs in EHCI and OHCI ports indentation. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas arch/arm/boot/dts/exynos4.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0cb8eb30d425d2d2ae28ab630596c44a158784c4 Author: Hans de Goede Date: Sun Jan 29 14:42:52 2017 +0100 leds: class: Add new optional brightness_hw_changed attribute Some LEDs may have their brightness level changed autonomously (outside of kernel control) by hardware / firmware. This commit adds support for an optional brightness_hw_changed attribute to signal such changes to userspace (if a driver can detect them): What: /sys/class/leds//brightness_hw_changed Date: January 2017 KernelVersion: 4.11 Description: Last hardware set brightness level for this LED. Some LEDs may be changed autonomously by hardware/firmware. Only LEDs where this happens and the driver can detect this, will have this file. This file supports poll() to detect when the hardware changes the brightness. Reading this file will return the last brightness level set by the hardware, this may be different from the current brightness. Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to their flags field and call led_classdev_notify_brightness_hw_changed() with the hardware set brightness when they detect a hardware / firmware triggered brightness change. Signed-off-by: Hans de Goede Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski Documentation/ABI/testing/sysfs-class-led | 17 +++++++ Documentation/leds/leds-class.txt | 15 ++++++ drivers/leds/Kconfig | 9 ++++ drivers/leds/led-class.c | 76 +++++++++++++++++++++++++++++++ include/linux/leds.h | 15 ++++++ 5 files changed, 132 insertions(+) commit c51dfff8eb8acb2a20f10922a514a14272993eb7 Merge: 4e8f2fc 1796a81 Author: David S. Miller Date: Sun Jan 29 13:54:01 2017 -0500 Merge branch 'gtp-simple-improvements' Andreas Schultz says: ==================== gtp: simple gtp improvements This is the part of the previous "simple gtp improvements" series that Pablo indicated should go into net-next. The rcu_lock removal is small correctness changes. Passing invalid to user space allows for more standards compliant handling of invalid tunnels. ==================== Signed-off-by: David S. Miller commit 1796a81de4fbd3a93290de61e443ea4153ad28d4 Author: Andreas Schultz Date: Thu Jan 26 16:21:49 2017 +0100 gtp: let userspace handle packets for invalid tunnels enable userspace to send error replies for invalid tunnels Acked-by: Harald Welte Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 10931923b5a5624d254ec3c8db6970f63b277cac Author: Andreas Schultz Date: Thu Jan 26 16:21:48 2017 +0100 gtp: remove unnecessary rcu_read_lock The rcu read lock is hold by default in the ip input path. There is no need to hold it twice in the socket recv decapsulate code path. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 2763ea0585c999f0bd98d67cbeadee8d872103a2 Author: Fabrice Gasnier Date: Thu Jan 26 15:28:33 2017 +0100 iio: adc: stm32: add optional dma support Add DMA optional support to STM32 ADC, as there is a limited number DMA channels (request lines) that can be assigned to ADC. This way, driver may fall back using interrupts when all DMA channels are in use for other IPs. Use dma cyclic mode with two periods. Allow to tune period length by using watermark. Coherent memory is used for dma (max buffer size is fixed to PAGE_SIZE). Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 + drivers/iio/adc/stm32-adc-core.c | 1 + drivers/iio/adc/stm32-adc-core.h | 2 + drivers/iio/adc/stm32-adc.c | 229 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 219 insertions(+), 14 deletions(-) commit 4e6a8d9b224f886362ea6e8f6046b541437c944f Author: Jaegeuk Kim Date: Thu Dec 29 14:07:53 2016 -0800 f2fs: relax async discard commands more This patch relaxes async discard commands to avoid waiting its end_io during checkpoint. Instead of waiting them during checkpoint, it will be done when actually reusing them. Test on initial partition of nvme drive. # time fstrim /mnt/test Before : 6.158s After : 4.822s Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 7 ++----- fs/f2fs/f2fs.h | 4 +++- fs/f2fs/segment.c | 24 +++++++++++++++++++----- fs/f2fs/super.c | 3 +++ 4 files changed, 27 insertions(+), 11 deletions(-) commit bb95d9ab2a9d4afd03b59a603cccb2c601f68b78 Author: Jaegeuk Kim Date: Tue Jan 3 17:19:30 2017 -0800 f2fs: drop exist_data for inline_data when truncated to 0 A test program gets the SEEK_DATA with two values between a new created file and the exist file on f2fs filesystem. F2FS filesystem, (the first "test1" is a new file) SEEK_DATA size != 0 (offset = 8192) SEEK_DATA size != 0 (offset = 4096) PNFS filesystem, (the first "test1" is a new file) SEEK_DATA size != 0 (offset = 4096) SEEK_DATA size != 0 (offset = 4096) int main(int argc, char **argv) { char *filename = argv[1]; int offset = 1, i = 0, fd = -1; if (argc < 2) { printf("Usage: %s f2fsfilename\n", argv[0]); return -1; } /* if (!access(filename, F_OK) || errno != ENOENT) { printf("Needs a new file for test, %m\n"); return -1; }*/ fd = open(filename, O_RDWR | O_CREAT, 0777); if (fd < 0) { printf("Create test file %s failed, %m\n", filename); return -1; } for (i = 0; i < 20; i++) { offset = 1 << i; ftruncate(fd, 0); lseek(fd, offset, SEEK_SET); write(fd, "test", 5); /* Get the alloc size by seek data equal zero*/ if (lseek(fd, 0, SEEK_DATA)) { printf("SEEK_DATA size != 0 (offset = %d)\n", offset); break; } } close(fd); return 0; } Reported-and-Tested-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) commit 363fa4e078cbdc97a172c19d19dc04b41b52ebc8 Author: Jaegeuk Kim Date: Wed Dec 28 17:31:15 2016 -0800 f2fs: don't allow encrypted operations without keys This patch fixes the renaming bug on encrypted filenames, which was pointed by (ext4: don't allow encrypted operations without keys) Cc: Theodore Ts'o Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 26a28a0c1eb756ba18bfb1f93309c4b4406b9cd9 Author: Jaegeuk Kim Date: Wed Dec 28 13:55:09 2016 -0800 f2fs: show the max number of atomic operations This patch adds to show the max number of atomic operations which are conducting concurrently. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 7 +++++++ fs/f2fs/f2fs.h | 17 +++++++++++++++++ fs/f2fs/file.c | 8 ++++++-- fs/f2fs/segment.c | 1 + 4 files changed, 31 insertions(+), 2 deletions(-) commit ec91538dccd44329ad83d3aae1aa6a8389b5c75f Author: Jaegeuk Kim Date: Wed Dec 21 17:09:19 2016 -0800 f2fs: get io size bit from mount option This patch adds to set io_size_bits from mount option. Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 ++ fs/f2fs/super.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 0a595ebaaa6b53a2226d3fee2a2fd616ea5ba378 Author: Jaegeuk Kim Date: Wed Dec 14 10:12:56 2016 -0800 f2fs: support IO alignment for DATA and NODE writes This patch implements IO alignment by filling dummy blocks in DATA and NODE write bios. If we can guarantee, for example, 32KB or 64KB for such the IOs, we can eliminate underlying dummy page problem which FTL conducts in order to close MLC or TLC partial written pages. Note that, - it requires "-o mode=lfs". - IO size should be power of 2, not exceed BIO_MAX_PAGES, 256. - read IO is still 4KB. - do checkpoint at fsync, if dummy NODE page was written. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++-- fs/f2fs/f2fs.h | 4 +++- fs/f2fs/segment.c | 9 ++++++-- fs/f2fs/segment.h | 3 +++ fs/f2fs/super.c | 13 +++++++++++- include/linux/f2fs_fs.h | 6 ++++++ 6 files changed, 84 insertions(+), 6 deletions(-) commit 554b5125f5cfca6653461fd52bad24d4ef35ec29 Author: Jaegeuk Kim Date: Wed Dec 21 12:13:03 2016 -0800 f2fs: add submit_bio tracepoint This patch adds final submit_bio() tracepoint. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 12 ++++++++---- include/trace/events/f2fs.h | 45 ++++++++++++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 19 deletions(-) commit d621e6b3707f4c3535e5e2c0b0c204753a9f00b2 Author: Jaegeuk Kim Date: Wed Dec 21 14:26:39 2016 -0800 f2fs: fix wrong tracepoints for op and op_flags This patch fixes wrong tracepoints in terms of op and op_flags. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 9d52a504db6db9e4e254576130aa867838daff55 Author: Jaegeuk Kim Date: Wed Dec 21 11:51:32 2016 -0800 f2fs: reassign new segment for mode=lfs Otherwise we can remain wrong curseg->next_blkoff, resulting in fsck failure. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 --- 1 file changed, 3 deletions(-) commit 650d3c4e56e1e92ee6e004648c9deb243e5963e0 Author: Yunlei He Date: Thu Dec 22 11:46:24 2016 +0800 f2fs: fix a missing discard prefree segments If userspace issue a fstrim with a range not involve prefree segments, it will reuse these segments without discard. This patch fix it. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ed0b56209fe79a1309653d4b03f5c3147f580f6b Author: Geliang Tang Date: Tue Dec 20 21:57:42 2016 +0800 f2fs: use rb_entry_safe Use rb_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 746e2403927efbd7c7f2e796314e3cfb3cfabaa4 Author: Yunlei He Date: Tue Dec 20 11:11:35 2016 +0800 f2fs: add a case of no need to read a page in write begin If the range we write cover the whole valid data in the last page, we do not need to read it. Signed-off-by: Yunlei He [Jaegeuk Kim: nullify the remaining area (fix: xfstests/f2fs/001)] Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7855eba4d6102f811b6dd142d6c749f53b591fa3 Author: Yunlei He Date: Mon Dec 19 20:10:48 2016 +0800 f2fs: fix a problem of using memory after free This patch fix a problem of using memory after free in function __try_merge_extent_node. Fixes: 0f825ee6e873 ("f2fs: add new interfaces for extent tree") Cc: Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 07fe8d44409f88be8f4a4e8f22b47ee709a22657 Author: Dan Carpenter Date: Fri Dec 16 11:18:15 2016 +0300 f2fs: remove unneeded condition We checked that "inode" is not an error pointer earlier so there is no need to check again here. Signed-off-by: Dan Carpenter Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c9e418436f3445d7cc4f3ba2964f231a4b33f17 Author: Chao Yu Date: Tue Dec 13 18:54:59 2016 +0800 f2fs: don't cache nat entry if out of memory If we run out of memory, in cache_nat_entry, it's better to avoid loop for allocating memory to cache nat entry, so in low memory scenario, for read path of node block, I expect this can avoid unneeded latency. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit fed24668482e07421b8e746a4886e7725434050a Author: Yunlei He Date: Tue Dec 13 17:23:37 2016 +0800 f2fs: remove unused values in recover_fsync_data This patch remove unused values in function recover_fsync_data Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 4 ---- 1 file changed, 4 deletions(-) commit 73447f68d7b2bc1df870da88b0e21d2bc1afc025 Author: Harninder Rai Date: Wed Nov 9 23:40:53 2016 +0530 dt-bindings: clockgen: Add compatible string for LS1012A Signed-off-by: Harninder Rai Signed-off-by: Bhaskar Upadhaya Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/clock/qoriq-clock.txt | 1 + 1 file changed, 1 insertion(+) commit ce3ef577276c1f1a04425c2bf637f2747b17ca84 Author: Harninder Rai Date: Wed Nov 9 23:34:39 2016 +0530 Documentation: DT: add LS1012A compatible for SCFG and DCFG Signed-off-by: Harninder Rai Signed-off-by: Bhaskar Upadhaya Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d3db2f79b8317853d65569973f54cc9e3fffc46 Author: Harninder Rai Date: Wed Nov 9 23:34:11 2016 +0530 Documentation: DT: Add entry for FSL LS1012A RDB, FRDM, QDS boards Signed-off-by: Harninder Rai Signed-off-by: Bhaskar Upadhaya Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8b649e426336d7d4800ff9c82858328f4215ba01 Author: Patrick Bruenn Date: Wed Jan 25 06:25:48 2017 +0100 ARM: dts: imx53-qsb-common: fix FEC pinmux config The pinmux configuration in device tree was different from manual muxing in /board/freescale/mx53loco/mx53loco.c All pins were configured as NO_PAD_CTL(1 << 31), which was fine as the bootloader already did the correct pinmuxing for us. But recently u-boot is migrating to reuse device tree files from the kernel tree, so it seems to be better to have the correct pinmuxing in our files, too. Signed-off-by: Patrick Bruenn Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsb-common.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 18ba386826f143dc4177830cc7c24c7abf4de4be Author: Breno Lima Date: Mon Jan 23 18:26:54 2017 -0200 ARM: dts: udoo_neo: Add Bluetooth support Udoo Neo has a TI WL1831 Bluetooth chip connected to the UART3 port. Add support for it. Signed-off-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 850a983f16eced30e2a825b6d11be256cf647d11 Author: Breno Lima Date: Mon Jan 23 18:26:53 2017 -0200 ARM: dts: udoo_neo: Add Wifi support Udoo Neo has a TI WL1831 Wifi chip connected to the USDHC3 port. Add support for it. Signed-off-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit ab51eba74c72d07915bf9edc9c5e3acb6ddf92ab Author: Breno Lima Date: Mon Jan 23 18:26:52 2017 -0200 ARM: dts: udoo_neo: Add UDOO Neo USB OTG1 and OTG2 support Add support for micro USB (OTG1) and USB Host (OTG2) for UDOO Neo board. Tested on a UDOO Neo Full board by mounting a mass storage device on both ports. Signed-off-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit c519d57b1962d29cc838bebf2c1fd5daf4547b6c Author: Lucas Stach Date: Fri Jan 20 17:44:01 2017 +0100 ARM: imx6: remove unit address from LDB node The LDB has no reg property as it uses the IOMUX-GPR syscon to access its registers. Remove the unit address from the DT node to make DT compiler happy. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c3f836369f9362933f856f6e57b30b59381d887 Author: Lucas Stach Date: Fri Jan 20 17:17:40 2017 +0100 ARM: imx6qp: adapt DT to changed FEC interrupts On i.MX6QP the FEC interrupts are wired to the GPC, just like all other device interrupts. This allows to FEC to wake the CPU from WFI, but for this to work the kernel needs to know about the new IRQ routing. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ecbf5e7019cc0a7a81f18fc2c69f2f067da73946 Author: Lucas Stach Date: Thu Jan 19 15:21:34 2017 +0100 ARM: imx6: fix regulator constraints on anatop 1p1 and 2p5 Fix the min/max voltage constraints for the anatop 1p1 and 2p5 regulator to match the typical operating range mentioned in the datasheet. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 993051b27e9f0c45df687e769dbf468de393b84c Author: Lucas Stach Date: Thu Jan 19 15:21:33 2017 +0100 ARM: imx6: fix min/max voltage of anatop 2p5 regulator The regulation bound of this regulator are 2.1V to 2.875V, the wrong DT values cause the driver to miscalculate the effective voltage. This isn't really an issue right now, as nobody actively changes the regulator voltage, but better fix it now. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 213e51ca8df192709dd38052511f3fb2e4683daa Author: Sascha Hauer Date: Thu Jan 19 10:09:24 2017 +0100 ARM: dts: imx7: Add "LPSR" to LPSR iomux pin names The i.MX7 has two iomux controllers. the iomuxc and the iomuxc_lpsr. In a board dts we have to make sure that both controllers are supplied with the correct pins. It's way too easy to do this wrong since only a look into the reference manual can reveal which pins belong to which controller. To make this clearer add "LPSR" to the pin names which belong to the LPSR controller. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 16 ++--- arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 2 +- arch/arm/boot/dts/imx7d-nitrogen7.dts | 14 ++-- arch/arm/boot/dts/imx7d-pinfunc.h | 110 ++++++++++++++++---------------- arch/arm/boot/dts/imx7d-sdb.dts | 4 +- arch/arm/boot/dts/imx7s-warp.dts | 2 +- 6 files changed, 74 insertions(+), 74 deletions(-) commit ccc59b0c18e9935a84710d43c1a2b31635caa564 Author: Sascha Hauer Date: Thu Jan 19 10:09:23 2017 +0100 ARM: dts: imx7d-cl-som: Fix OTG power pinctrl GPIO01_IO05 is controlled by the LPSR iomux controller, so attach the corresponding pin to this controller. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9a20aa2677fd4858ccda0059dfbda354bda90070 Author: Sascha Hauer Date: Thu Jan 19 10:09:22 2017 +0100 ARM: dts: imx7d-sdb: Fix watchdog and pwm pinmux The watchdog pin and the pwm output pin are controlled by the iomuxc_lpsr, not the regular iomux, so move the pins there. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 1d4a594338fb2414f864b9e5454b4d17173df075 Author: Sascha Hauer Date: Thu Jan 19 10:09:21 2017 +0100 ARM: dts: imx7s-warp: Fix watchdog pinmux The watchdog pin is controlled by the iomuxc_lpsr, not the regular iomux, so move it there. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 2 ++ 1 file changed, 2 insertions(+) commit 4e0a90b381bd8bddf1644591dc585cf4c6ea652e Author: Jaehoon Chung Date: Mon Jan 16 15:31:34 2017 +0900 PCI: exynos: Rename all pointer names from "exynos_pcie" to "ep" Rename the simple pointer name as "ep" instead of "exynos_pcie". After applying this patch, it can save the 10 characthers within one line. Signed-off-by: Jaehoon Chung Signed-off-by: Bjorn Helgaas Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han drivers/pci/host/pci-exynos.c | 348 +++++++++++++++++++++--------------------- 1 file changed, 173 insertions(+), 175 deletions(-) commit 45345e9a85f94f2f7f563cd9b881a19e5d99c72c Author: Simon Horman Date: Thu Jan 26 09:47:31 2017 +0100 i2c: sh_mobile: document support for r8a7796 (R-Car M3-W) Explicitly list per-SoC binding for r8a7796. No driver change is required as the initialisation sequence is currently the same as for the R-Car Gen3 fallback binding. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 1 + 1 file changed, 1 insertion(+) commit 22ae11245e17a74c1b0864b55b63c0ed21f10ceb Author: Guenter Roeck Date: Tue Jul 26 15:34:01 2016 -0700 i2c: i2c-cros-ec-tunnel: Reduce logging noise If an i2c access through i2c-cros-ec-tunnel returns an error, the following log message is seen on the console. cros-ec-i2c-tunnel ff200000.spi:ec@0:i2c-tunnel: Error parsing EC i2c message -121 This can happen a lot if, for example, the i2c-detect command is executed. Since it is perfectly normal for an i2c controller to report an error, drop the message. Also, report -ENXIO instead of -EREMOTEIO if the access error is due to NAK from the device, and return -EIO instead of -EREMOTEIO for other errors, as suggested in Documentation/i2c/fault-codes. Signed-off-by: Guenter Roeck Reviewed-by: Douglas Anderson Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cros-ec-tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cefae80249f6bf3fdbc7c3a00bc43deb4c1bccf0 Author: Luis Oliveira Date: Thu Jan 26 17:45:32 2017 +0000 i2c: core: helper function to detect slave mode This function has the purpose of mode detection by checking the device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. Currently only checks using OF functions (ACPI slave not supported yet). Signed-off-by: Luis Oliveira Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 33 +++++++++++++++++++++++++++++++++ include/linux/i2c.h | 1 + 2 files changed, 34 insertions(+) commit 7184f5b451cf3dc61de79091d235b5d2bba2782d Author: Alex Williamson Date: Thu Jan 19 08:51:30 2017 -0700 PCI: Add ACS quirk for Intel Union Point Intel 200-series chipsets have the same errata as 100-series: the ACS capability doesn't follow the PCIe spec, the capability and control registers are dwords rather than words. Add PCIe root port device IDs to existing quirk. Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 122b5f4580519b2e2563467a6dc9ac952f1d33da Author: Fabrice Gasnier Date: Thu Jan 26 15:28:32 2017 +0100 Documentation: dt: iio: stm32-adc: optional dma support STM32 ADC can use dma. Add dt documentation for optional dma support. Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 732f2dc46813821824db853e867f08b1ccabb1ab Author: Fabrice Gasnier Date: Thu Jan 26 15:28:31 2017 +0100 iio: adc: stm32: add trigger polarity extended attribute Define extended attribute so that user may choose rising, falling or both edges for external trigger sources. Default to rising edge in case it isn't set. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-adc-stm32 | 18 +++++++++ drivers/iio/adc/stm32-adc.c | 46 ++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) commit f24a33b3e2a393856c315b23bbb5bebf422b0611 Author: Fabrice Gasnier Date: Thu Jan 26 15:28:30 2017 +0100 iio: adc: stm32: Enable use of stm32 timer triggers STM32 ADC has external timer trigger sources. Use stm32 timer triggers API (e.g. is_stm32_timer_trigger()) with local ADC lookup table to validate a trigger can be used. This also provides correct trigger selection value (e.g. extsel). Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 ++ drivers/iio/adc/stm32-adc.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit da9b948514c36da480cc15f7c75f51417f882175 Author: Fabrice Gasnier Date: Thu Jan 26 15:28:29 2017 +0100 iio: adc: stm32: add support for triggered buffer mode STM32 ADC conversions can be launched using hardware triggers. It can be used to start conversion sequences (group of channels). Selected channels are select via sequence registers. Trigger source is selected via 'extsel' (external trigger mux). Trigger polarity is set to rising edge by default. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 + drivers/iio/adc/stm32-adc.c | 317 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 298 insertions(+), 21 deletions(-) commit 6db0f7ccc9f3876840e36c23ce357204cdc2d0ae Merge: 1dc2af8 93fbe91 Author: Jonathan Cameron Date: Sat Jan 28 18:21:49 2017 +0000 Merge tag 'ib-mfd-iio-pwm-4.11' into test Immutable branch between MFD, IIO and PWM due for the v4.11 merge window Pulled into IIO to allow follow up series of triggered capture for the STM32 ADCs. commit 1dc2af87877dd43e6874ef331974505df63378e7 Author: Andreas Klinger Date: Wed Jan 25 20:07:47 2017 +0100 iio: distance: srf08: add driver ABI documentation Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver, especially: - sensitivity which the device documentation calls gain for amplifying the signal - max_range for limiting the maximum distance for expected echos and therefore limiting the time waiting for telegrams Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-distance-srf08 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 78f839029e1dc860157b6b923c854dc93ade6b26 Author: Andreas Klinger Date: Wed Jan 25 20:07:19 2017 +0100 iio: distance: srf08: add IIO driver for us ranger This is the IIO driver for devantech srf08 ultrasonic ranger which can be used to measure the distances to an object. The sensor supports I2C with some registers. Supported Features include: - read the distance in ranging mode in centimeters - output of the driver is directly the read value - together with the scale the driver delivers the distance in meters - only the first echo of the nearest object is delivered - set sensitivity as analog value in the range of 0-31 means setting gain register on device - set range registers; userspace enters max. range in millimeters in 43 mm steps Features not supported by this driver: - ranging mode in inches or in microseconds - ANN mode - change I2C address through this driver - light sensor The driver was added in the directory "proximity" of the iio subsystem and the menu in den config is now called "Proximity and distance sensors" Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron drivers/iio/proximity/Kconfig | 13 +- drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/srf08.c | 398 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 411 insertions(+), 1 deletion(-) commit 2bee073c0d4cc7ef6243c13da590da02515846de Author: Andreas Klinger Date: Wed Jan 25 20:06:48 2017 +0100 iio: distance: srf08: add trivial DT binding - Add DT binding for devantech,srf08 - Add vendor devantech to vendor list Signed-off-by: Andreas Klinger Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 + Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 2 insertions(+) commit bb46d1eb41a4736e0df83dcf521ba785aeddfdae Author: Javier Martinez Canillas Date: Fri Jan 27 17:10:46 2017 -0300 ARM: dts: exynos: Increase MFC left reserved memory region size The sizes of the MFC reserved memory regions for CMA are 16 MiB for the left bank and 8 MiB for the right bank. But this isn't enough to decode high resolution videos so increase the size for the left bank to 36 MiB which is enough for 1080p (1920x1080). Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e8f2fc1a55d543717efb70e170b09e773d0542b Merge: 158f323 1b1bc42 Author: David S. Miller Date: Sat Jan 28 10:33:06 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Two trivial overlapping changes conflicts in MPLS and mlx5. Signed-off-by: David S. Miller commit d732248fdb5c5434f2ab0c258ce25a7e2ff2521a Author: Gwendal Grignou Date: Tue Jan 24 14:41:41 2017 +0100 iio: cros_ec: Add cros_ec barometer driver Handle the barometer sensor presented by the ChromeOS EC Sensor hub. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo Serra Signed-off-by: Jonathan Cameron drivers/iio/pressure/Kconfig | 10 ++ drivers/iio/pressure/Makefile | 1 + drivers/iio/pressure/cros_ec_baro.c | 220 ++++++++++++++++++++++++++++++++++ drivers/platform/chrome/cros_ec_dev.c | 3 + include/linux/mfd/cros_ec_commands.h | 3 +- 5 files changed, 236 insertions(+), 1 deletion(-) commit 1bd9900b8301fc505f032c90ea487824cf824e99 Author: Yazen Ghannam Date: Fri Jan 27 11:24:23 2017 -0600 EDAC, amd64: Add x86cpuid sanity check during init Match one of the devices in amd64_cpuids[] before loading the module. This is an additional sanity check against users trying to load amd64_edac_mod on unsupported systems. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-9-git-send-email-Yazen.Ghannam@amd.com [ Get rid of err_ret label, make it a bit more readable this way. ] Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 6 ++++-- drivers/edac/amd64_edac.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 4688c9b42dd2040673a1c2208a1008822b07ee4a Author: Yazen Ghannam Date: Fri Jan 27 11:24:22 2017 -0600 EDAC, amd64: Don't treat ECC disabled as failure Having ECC disabled on a node doesn't necessarily mean that it's disabled for the entire system. So let's return a non-failing code when ECC is disabled on a node. This way we can skip initialization for the node but still continue with the remaining nodes. After probing all instances, make sure we have at least one MC device allocated. This issue is seen and fix tested on Fam15h and Fam17h MCM systems. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-8-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d7fc9d77acb8651e5fcb77df71dfd11fcf1f08ba Author: Yazen Ghannam Date: Fri Jan 27 11:24:21 2017 -0600 EDAC: Add routine to check if MC devices list is empty We need to know if any MC devices have been allocated. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-7-git-send-email-Yazen.Ghannam@amd.com [ Prettify text. ] Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 14 ++++++++++++++ drivers/edac/edac_mc.h | 9 +++++++++ 2 files changed, 23 insertions(+) commit b2d226caecfc2dbf85b2abd2814b42627c5dde0a Author: William Breathitt Gray Date: Tue Jan 24 15:26:17 2017 -0500 iio: stx104: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and iio_device_register call with the devm_gpiochip_add_data call and devm_iio_device_register call respectively. In addition, the stx104_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 75de5546100e27a88e8d13067a4335f61d334ba2 Author: Lorenzo Bianconi Date: Sun Jan 22 19:32:25 2017 +0100 Documentation: dt: iio: imu: st_lsm6dsx: add st,drdy-int-pin property Add st,drdy-int-pin property to select interrupt pin of the package Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 2 ++ 1 file changed, 2 insertions(+) commit dba329048ee5ddad7c7b6891e32b007c0d955f68 Author: Lorenzo Bianconi Date: Sun Jan 22 19:32:24 2017 +0100 iio: imu: st_lsm6dsx: add possibility to select drdy pin Add capability to route data ready signal on pin 1 or pin 2 of the package Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 59 +++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 6 deletions(-) commit 3adbf34273306fc1ee71e34162af28b53b6461fe Author: Martin Blumenstingl Date: Sun Jan 22 19:17:13 2017 +0100 iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs This adds support for the SAR (Successive Approximation Register) ADC on the Amlogic Meson SoCs. The code is based on the public S805 (Meson8b) and S905 (GXBB) datasheets (see [0] and [1]), as well as by reading (various versions of) the vendor driver and by inspecting the registers on the vendor kernels of my testing-hardware. Currently the GXBB, GXL and GXM SoCs are supported. GXBB hardware has 10-bit ADC resolution, while GXL and GXM have 12-bit ADC resolution. The code was written to support older SoCs (Meson8 and Meson8b) as well, but due to lack of actual testing-hardware no of_device_id was added for these. Two "features" from the vendor driver are currently missing: - the vendor driver uses channel #7 for calibration (this improves the accuracy of the results - in my tests the results were less than 3% off without calibration compared to the vendor driver). Adding support for this should be easy, but is not required for most applications. - channel #6 is connected to the SoCs internal temperature sensor. Adding support for this is probably not so easy since (based on the u-boot sources) most SoC versions are using different registers and algorithms for the conversion from "ADC value" to temperature. Supported by the hardware but currently not supported by the driver: - reading multiple channels at the same time (the hardware has a FIFO buffer which stores multiple results) - continuous sampling (this would require a way to enable this individually because otherwise the ADC would be drawing power constantly) - interrupt support (similar to the vendor driver this new driver is polling the results. It is unclear if the IRQ-mode is supported on older (Meson6 or Meson8) hardware as well or if there are any errata) [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf [1] http://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/meson_saradc.c | 922 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 935 insertions(+) commit 564c364c35ca126024cb41ff76f9b3c2cc7605b7 Author: Martin Blumenstingl Date: Sun Jan 22 19:17:12 2017 +0100 Documentation: dt-bindings: add the Amlogic Meson SAR ADC documentation This adds the devicetree binding documentation for the SAR ADC found in Amlogic Meson SoCs. Currently only the GXBB, GXL and GXM SoCs are supported. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Andreas Färber Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../bindings/iio/adc/amlogic,meson-saradc.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7f47d56c5b05006892a5e3e9d122b19c358e86ef Author: Julián de Gortari Date: Mon Jan 23 12:08:29 2017 -0600 Staging: iio: adc: ad7816: fix symbolic permissions coding style issue Octal permissions should be used instead of symbolic ones for easier reading. Signed-off-by: Julián de Gortari Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7816.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit df64636fa4816b6d562835475d9846dcfbfd8c7e Author: Yazen Ghannam Date: Fri Jan 27 11:24:20 2017 -0600 EDAC, amd64: Remove unused printing macros amd64_{debug,notice} don't have any users, so remove them. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-6-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.h | 6 ------ 1 file changed, 6 deletions(-) commit 11ab1cae5881fe47fd4a18e8f6c4982c673bb16c Author: Yazen Ghannam Date: Fri Jan 27 11:24:19 2017 -0600 EDAC, amd64: Rework messages in ecc_enabled() Print the node number when informing that DRAM ECC is disabled so that we can show which nodes have DRAM ECC disabled. Also, print more detailed system information as edac_dbg(), so as to not bother general users. Switch amd64_notice to amd64_info to match the message above it. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-5-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 349ee0402c4be95ef6cb2f89f0fa7fb0ee81b5bb Author: Anthony Brandon Date: Mon Jan 23 14:14:12 2017 +0100 drivers:staging:iio:cdc: Style fix. Align parameters to parentheses. Signed-off-by: Anthony Brandon Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 752d01d9907b32ed55e07d36fde49a153ad6fe36 Author: Wei Yongjun Date: Sun Jan 22 17:15:06 2017 +0000 iio: common: ssp_sensors: gyro: use devm_iio_device_register() Use devm_iio_device_register() for IIO subsystem device registration and delete the remove function since there is no need after this change. Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/gyro/ssp_gyro_sensor.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit fa4c115ca5bd9d9bef8f0a471c9fa32dc16c2453 Author: Wei Yongjun Date: Sun Jan 22 16:36:12 2017 +0000 iio: common: ssp_sensors: accel: use devm_iio_device_register() Use devm_iio_device_register() for IIO subsystem device registration and delete the remove function since there is no need after this change. Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/accel/ssp_accel_sensor.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit df1fd2de118e3bf980e2bbada16c650b9eea529b Author: Matt Weber Date: Thu Jan 26 21:26:15 2017 +0100 iio: max5481: Add support for Maxim digital potentiometers Add implementation for Maxim Integrated 5481, 5482, 5483, and 5484 digital potentiometer devices. Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX5481-MAX5484.pdf Signed-off-by: Maury Anderson Signed-off-by: Matthew Weber Signed-off-by: Slawomir Stepien Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../bindings/iio/potentiometer/max5481.txt | 23 +++ drivers/iio/potentiometer/Kconfig | 11 + drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/max5481.c | 223 +++++++++++++++++++++ 4 files changed, 258 insertions(+) commit 234365f56e75d91c5bd7fbde2b8a9b02851845b8 Author: Yazen Ghannam Date: Tue Jan 24 16:32:25 2017 -0600 EDAC, amd64: Move global code out of instance functions We have a few functions that register/unregister an ECC error decoding routine. These functions are called when we init/remove instances. However, they are global and so don't need to be registered/unregistered multiple times. So move them out of the init/remove instance functions and into the module init/exit routines. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485297149-13733-4-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 2b9b2c465928260f40e2f570c953881bff291bef Author: Yazen Ghannam Date: Tue Jan 24 16:32:24 2017 -0600 EDAC, amd64: Free unused memory when init_one_instance() fails Jump to memory freeing routines when init_one_instance() fails. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485297149-13733-3-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 2 ++ 1 file changed, 2 insertions(+) commit 67d7fd306ef2ef1ba5cdb8ce2dfde1339d4c8136 Author: Yazen Ghannam Date: Tue Jan 24 16:32:23 2017 -0600 EDAC, mce_amd: Give more context to deferred error message Users may not be familiar with the concept of deferred errors. There is no action for users to take on this type of error, so give more context in the error message to make this more clear. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485297149-13733-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba34b3a2df09ff44555f0b19c0c8f30ba748b9aa Author: Manivannan Sadhasivam Date: Mon Jan 23 21:58:09 2017 +0530 Documentation: dt-bindings: tmp007: Add optional interrupt support This patch adds optional interrupt binding support for TI TMP007 - IR thermopiler sensor Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/tmp007.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 059c53b3232960cfd38cc46de0a7bedd642021f5 Author: Marek Vasut Date: Sat Jan 28 00:08:37 2017 +0100 iio: adc: Add Renesas GyroADC driver Add IIO driver for the Renesas RCar GyroADC block. This block is a simple 4/8-channel ADC which samples 12/15/24 bits of data every cycle from all channels. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Jonathan Cameron Cc: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang Signed-off-by: Jonathan Cameron MAINTAINERS | 6 + drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/rcar-gyroadc.c | 631 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 651 insertions(+) commit ec2ef15335547d6b96dcfb92e2dcebe08e156bc2 Author: Marek Vasut Date: Sat Jan 28 00:08:36 2017 +0100 iio: adc: Add Renesas GyroADC bindings Add DT bindings for the Renesas RCar GyroADC block. This block is a simple 4/8-channel ADC which samples 12/15/24 bits of data every cycle from all channels. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Jonathan Cameron Cc: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang Cc: Rob Herring Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Jonathan Cameron .../bindings/iio/adc/renesas,gyroadc.txt | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 3e7514afc7d728dd47c5fe9d7a1f5216fe659cda Author: Sven Eckelmann Date: Sat Jan 28 10:23:30 2017 +0100 batman-adv: Fix includes for IS_ERR/ERR_PTR IS_ERR/ERR_PTR are not defined in linux/device.h but in linux/err.h. The files using these macros therefore have to include the correct one. Reported-by: Linus Luessing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/debugfs.c | 2 +- net/batman-adv/tp_meter.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7c946062b3ae2b7f002383e5e402113e98ad3c77 Author: Sven Eckelmann Date: Sat Jan 28 10:12:39 2017 +0100 batman-adv: Fix double call of dev_queue_xmit The net_xmit_eval has side effects because it is not making sure that e isn't evaluated twice. #define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e)) The code requested by David Miller [1] return net_xmit_eval(dev_queue_xmit(skb)); will get transformed into return ((dev_queue_xmit(skb)) == NET_XMIT_CN ? 0 : (dev_queue_xmit(skb))) dev_queue_xmit will therefore be tried again (with an already consumed skb) whenever the return code is not NET_XMIT_CN. [1] https://lkml.kernel.org/r/20170125.225624.965229145391320056.davem@davemloft.net Fixes: c33705188c49 ("batman-adv: Treat NET_XMIT_CN as transmit successfully") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f58576666ccdcfb9cf7cae8669dffe1eed844f88 Author: Jonathan Corbet Date: Fri Jan 27 16:17:52 2017 -0700 x86/mm: Improve documentation for low-level device I/O functions Add kerneldoc comments for memcpy_{to,from}io() and memset_io(). The existing documentation for ioremap() was distant from the definition, causing kernel-doc to miss it; move it appropriately. Signed-off-by: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170127161752.0b95e95b@lwn.net Signed-off-by: Ingo Molnar arch/x86/include/asm/io.h | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) commit 9a1f4150fe932fb892c05084029b3718b8ed1baf Merge: f284424 1b1bc42 Author: Ingo Molnar Date: Sat Jan 28 09:30:11 2017 +0100 Merge branch 'linus' into x86/boot, to pick up fixes Signed-off-by: Ingo Molnar commit 575ddce0507789bf9830d089557d2199d2f91865 Author: Michael Schenk Date: Thu Jan 26 11:25:04 2017 -0600 rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down In the function rtl_usb_start we pre-allocate a certain number of urbs for RX path but they will not be freed when calling rtl_usb_stop. This results in leaking urbs when doing ifconfig up and down. Eventually, the system has no available urbs. Signed-off-by: Michael Schenk Signed-off-by: Larry Finger Cc: Stable Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/usb.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 64ad08605e8433b86249fef29b671812ccca65a5 Author: Guy Mishol Date: Thu Jan 26 17:35:13 2017 +0200 wlcore: print the sdio buffer after reading it fix an issue where we printed the sdio buffer before actually read it. Signed-off-by: Guy Mishol Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/sdio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cc37d8efd2ba3a4cf395a727935f920c00b6f1a2 Author: Amitkumar Karwar Date: Tue Jan 24 19:05:45 2017 +0530 mwifiex: use pci_dma_sync_single* APIs On some platforms, driver is unable read sleep cookie signature even if firmware has written it through DMA. The problem is fixed by using pci_dma_sync_single* APIs while reading DMA buffer shared with firmware. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3e66849865edca1d04c9c6227b9153e9bdbdaec0 Author: Amitkumar Karwar Date: Tue Jan 24 19:05:44 2017 +0530 mwifiex: mwifiex_unmap_pci_memory() handling for sleep confirm Sleep confirm is a special command for which "adapter->cur_cmd" pointer is not set. When it's response is received, host writes SLEEP confirm done to a register. Firmware will perform DMA for writing sleep cookie signature on same buffer after this. Let's not immediately call mwifiex_unmap_pci_memory() for this special command. Unmapping will be done when firmware completes writing sleep cookie signature. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 19 ++++++++++++++++--- drivers/net/wireless/marvell/mwifiex/pcie.h | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) commit 98e71f44c51d0ade36896dc34115c108912d909d Author: Serge Vasilugin Date: Fri Jan 20 14:28:26 2017 +0100 rt2x00: add support for RT5350 WiSoC Support for the RT5350 WiSoC was added to OpenWrt after having a lengthy debate about the legality of the original submission, see https://lists.openwrt.org/pipermail/openwrt-devel/2013-January/018224.html MTK/Ralink Acked replied and says we can merge this patch under the GPL. https://dev.openwrt.org/changeset/36177 Signed-off-by: Serge Vasilugin Tested-by: Michel Stempin Acked-by: John Crispin [daniel@makrotopia.org: added commit message, cleaned up code] Signed-off-by: Daniel Golle Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 125 +++++++++++++++++++++++-- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + 3 files changed, 120 insertions(+), 7 deletions(-) commit 5c4412e0728063583ec971323f8256e8005a32b6 Author: Daniel Golle Date: Fri Jan 20 14:28:25 2017 +0100 rt2x00: rt2800lib: add support for RT3352 with 20MHz crystal On Rt3352 the driver needs to know the frequency of an external crystal which can be either 40 MHz (as on all other WiSoCs until now) or 20 MHz. Get the clock attached by ramips WiSoC platform code which probes SYSC_REG_SYSCFG (added by John Crispin in commit 6ac8579b96e3b) and introduce a new flag clk_is_20mhz in struct hw_mode_spec to make the driver aware and use either 40 MHz or 20 MHz specific rf_vals on those WiSoC platforms. The introduced support for boards with a 20 MHz crystal is also needed for RT5350. Signed-off-by: Daniel Golle Signed-off-by: Gabor Juhos Signed-off-by: Mathias Kresin Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 31 +++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 34db70b92faed22f59fdc1dba766e8cb6248fe9e Author: Stanislaw Gruszka Date: Fri Jan 20 14:28:24 2017 +0100 rt2x00: add copy of clk for soc devices Since clk_get() is not trivial add copy of clk pointer to rt2x00dev for System On Chip devices and initialize it on probe routine. Signed-off-by: Stanislaw Gruszka Acked-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++++ drivers/net/wireless/ralink/rt2x00/rt2x00soc.c | 1 + 2 files changed, 5 insertions(+) commit b3d75a81f07c757ab73c9022631170c3baefe380 Author: Rafał Miłecki Date: Thu Jan 19 10:51:25 2017 +0100 brcmfmac: drop duplicated core selection from brcmf_pcie_attach It was left after reworking PCIe reset in commit 07fe2e38c7fd ("brcmfmac: Reset PCIE devices after recognition."). Cc: Hante Meuleman Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 - 1 file changed, 1 deletion(-) commit 098988cbe5849e3e125b0bc02a6545a1dc414ab1 Author: Shawn Guo Date: Thu Jan 19 22:28:38 2017 +0800 drm: zte: add tvenc driver support It adds the TV Encoder driver to support video output in PAL and NTSC format. The driver uses syscon/regmap interface to configure register bit sitting in SYSCTRL module for DAC power control. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/Makefile | 1 + drivers/gpu/drm/zte/zx_drm_drv.c | 1 + drivers/gpu/drm/zte/zx_drm_drv.h | 1 + drivers/gpu/drm/zte/zx_tvenc.c | 407 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/zte/zx_tvenc_regs.h | 31 +++ drivers/gpu/drm/zte/zx_vou.c | 5 + 6 files changed, 446 insertions(+) commit 9f17d740432cfcc76b538808b3724ed90905fe91 Author: Shawn Guo Date: Thu Jan 19 23:34:25 2017 +0800 dt: add bindings for ZTE tvenc device It adds bindings doc for ZTE VOU TV Encoder device. Signed-off-by: Shawn Guo Acked-by: Rob Herring Documentation/devicetree/bindings/display/zte,vou.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9cc2a68519aeac42775161a4131d91120f3a927e Author: Shawn Guo Date: Thu Jan 12 22:20:31 2017 +0800 drm: zte: add function to configure vou_ctrl dividers The clock control module (CRM) cannot always provide desired frequency for all VOU output devices. That's why VOU integrates a few dividers to further divide the clocks from CRM. Let's add an interface for configuring these dividers. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_vou.c | 79 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/zte/zx_vou.h | 25 +++++++++++++ drivers/gpu/drm/zte/zx_vou_regs.h | 16 ++++++++ 3 files changed, 120 insertions(+) commit 831a8d5e0bef97ae89b68dd3a637f0834cb6977b Author: Shawn Guo Date: Thu Jan 12 16:27:35 2017 +0800 drm: zte: move struct vou_inf into zx_vou driver Although data in struct vou_inf is defined per output device, it doesn't belong to the device itself but VOU control module. All these data can just be defined in VOU driver, and output device driver only needs to invoke VOU driver function with device ID to enable/disable specific output device. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_hdmi.c | 12 ++---------- drivers/gpu/drm/zte/zx_vou.c | 38 +++++++++++++++++++++++++++++++------- drivers/gpu/drm/zte/zx_vou.h | 18 ++---------------- 3 files changed, 35 insertions(+), 33 deletions(-) commit b246a9d2671f4f6cfab3f98199568e0b3028f6e5 Author: Matthew Wilcox Date: Mon Dec 19 11:07:17 2016 -0500 tools: Provide a definition of WARN_ON The definition of WARN_ON being used by the radix tree test suite was deficient in two ways: it did not provide a return value, and it stopped execution instead of continuing. This version of WARN_ON tells you which file & line the assertion was triggered in. Signed-off-by: Matthew Wilcox tools/include/asm/bug.h | 8 ++++++++ tools/testing/radix-tree/linux/kernel.h | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) commit c68a2aab3300df4106f368568bd7361d6f465993 Author: Matthew Wilcox Date: Fri Dec 16 11:52:43 2016 -0500 radix tree test suite: Remove duplicate bitops code By adding __set_bit and __clear_bit to the tools include directory, we can share the bitops code. This reveals an include loop between kernel.h, log2.h, bitmap.h and bitops.h. Break it the same way as the kernel does; by moving the kernel.h include from bitops.h to bitmap.h. Signed-off-by: Matthew Wilcox tools/include/asm-generic/bitops/atomic.h | 3 + tools/include/linux/bitmap.h | 1 + tools/include/linux/bitops.h | 1 - tools/testing/radix-tree/linux/bitops.h | 160 --------------------- tools/testing/radix-tree/linux/bitops/__ffs.h | 43 ------ tools/testing/radix-tree/linux/bitops/ffs.h | 41 ------ tools/testing/radix-tree/linux/bitops/ffz.h | 12 -- tools/testing/radix-tree/linux/bitops/find.h | 13 -- tools/testing/radix-tree/linux/bitops/fls.h | 41 ------ tools/testing/radix-tree/linux/bitops/fls64.h | 14 -- tools/testing/radix-tree/linux/bitops/hweight.h | 11 -- tools/testing/radix-tree/linux/bitops/le.h | 53 ------- tools/testing/radix-tree/linux/bitops/non-atomic.h | 110 -------------- tools/testing/radix-tree/linux/kernel.h | 6 +- 14 files changed, 8 insertions(+), 501 deletions(-) commit 35534c869c62f59203c1822769bbef14e894a9e9 Author: Matthew Wilcox Date: Mon Dec 19 17:43:19 2016 -0500 radix tree: constify some pointers If we're just getting the value of a tag, or looking up an entry, we won't modify the radix tree, so we can declare these functions as taking a const pointer. Mostly for documentation purposes, though it might help code generation. Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 22 +++++++++--------- lib/radix-tree.c | 57 +++++++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 37 deletions(-) commit 15f2e88ddd4bc9b2c6b6236162993b5caa80abb9 Author: Matthew Wilcox Date: Fri Dec 16 14:46:09 2016 -0500 radix tree: Add some implicit includes We were using spinlock_t and INIT_LIST_HEAD without including spinlock.h or list.h. They were being implicitly included through some other header file, but that's fragile. Signed-off-by: Matthew Wilcox include/linux/radix-tree.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6848af2d2fdb13de7758deccea037b7ec3afad4a Author: Shawn Guo Date: Thu Jan 12 14:44:40 2017 +0800 drm: zte: add interlace mode support It adds interlace mode support in VOU TIMING_CTRL and channel control block, so that VOU driver gets ready to support output device in interlace mode like TV Encoder. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_vou.c | 52 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/zte/zx_vou_regs.h | 15 +++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) commit 4e986d3705dfb3fd16b54b795b2427a48af22674 Author: Shawn Guo Date: Wed Nov 16 14:43:59 2016 +0800 drm: zte: add overlay plane support It enables VOU VL (Video Layer) to support overlay plane with scaling function. VL0 has some quirks on scaling support. We choose to skip it and only adds VL1 and VL2 into DRM core for now. Function zx_plane_atomic_disable() gets moved around with no changes to save a forward declaration. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_plane.c | 301 +++++++++++++++++++++++++++++++++--- drivers/gpu/drm/zte/zx_plane_regs.h | 51 ++++++ drivers/gpu/drm/zte/zx_vou.c | 72 ++++++++- drivers/gpu/drm/zte/zx_vou_regs.h | 18 +++ 4 files changed, 413 insertions(+), 29 deletions(-) commit 7254b1f91ebc221ef71f7b23129a2ec0558e50cb Author: Shawn Guo Date: Thu Dec 29 08:03:03 2016 +0800 drm: zte: add .atomic_disable hook to disable graphic layer There are a few hardware bits for each graphic layer to control main/aux channel and clock selection, as well as the layer enabling. These bits sit outside the layer block itself, but in VOU control glue block. We currently set these bits up at CRTC initialization for once, and do not support disabling the layer. This patch creates a pair of functions zx_vou_layer_enable[disable] to be invoked from plane hooks .atomic_update and .atomic_disable to set up and tear down the layer. This is generic for both graphic and video layers, so it will make the overlay plane support to be added later much easier. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_plane.c | 15 +++++++++ drivers/gpu/drm/zte/zx_plane.h | 1 + drivers/gpu/drm/zte/zx_vou.c | 70 ++++++++++++++++++++++++++++++------------ drivers/gpu/drm/zte/zx_vou.h | 3 ++ 4 files changed, 69 insertions(+), 20 deletions(-) commit 98ae9869d187ab737b5b231e7879d15e1e9a763d Author: Shawn Guo Date: Wed Dec 28 14:41:37 2016 +0800 drm: zte: make zx_plane accessible from zx_vou driver Move struct zx_plane from zx_plane.c to zx_plane.h, so that it can be accessed from zx_vou driver, and we can save the use of struct zx_layer_data completely. More importantly, those additional data used by VOU controller to enable/disable graphic and video layers can later be added and accessed much more easily from zx_vou driver. While at it, we make two changes to zx_plane_init() interface: - Encode struct device pointer in zx_plane, so that we do not need to pass it as a parameter. - Change return of zx_plane_init() from struct drm_plane pointer to error code, since we can get the pointer from zx_plane in zx_vou driver now. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul drivers/gpu/drm/zte/zx_plane.c | 36 +++++++----------------------------- drivers/gpu/drm/zte/zx_plane.h | 11 +++++++---- drivers/gpu/drm/zte/zx_vou.c | 31 +++++++++++++++++++------------ 3 files changed, 33 insertions(+), 45 deletions(-) commit 83d7115250c181da6dacd187671e174f8be71dfd Author: Shawn Guo Date: Thu Dec 1 17:20:31 2016 +0800 drm: zte: support hdmi audio through spdif It enables HDMI audio support through SPDIF interface based on generic hdmi-audio-codec driver. The HDMI hardware supports more audio interfaces than SPDIF, like I2S, which may be added later. Signed-off-by: Shawn Guo drivers/gpu/drm/zte/Kconfig | 1 + drivers/gpu/drm/zte/zx_hdmi.c | 148 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/zte/zx_hdmi_regs.h | 14 ++++ drivers/gpu/drm/zte/zx_vou.c | 9 +++ drivers/gpu/drm/zte/zx_vou.h | 10 +++ drivers/gpu/drm/zte/zx_vou_regs.h | 2 + 6 files changed, 184 insertions(+) commit 1aaaac1f955ba0eeca1f7e4587456e1ab8162a5a Author: Shawn Guo Date: Mon Jan 9 15:19:19 2017 +0800 drm: zte: select VIDEOMODE_HELPERS in Kconfig ZTE DRM driver uses drm_display_mode_to_videomode() in function zx_crtc_enable(). Select VIDEOMODE_HELPERS in Kconfig to fix the following link error. LD vmlinux.o MODPOST vmlinux.o drivers/built-in.o: In function `zx_crtc_enable': :(.text+0xbdeb8): undefined reference to `drm_display_mode_to_videomode' Signed-off-by: Shawn Guo drivers/gpu/drm/zte/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fb045ca25cc7b6d46368ab8221774489c2a81648 Author: Christoph Hellwig Date: Mon Jan 23 14:31:09 2017 +0100 block: don't assign cmd_flags in __blk_rq_prep_clone These days we have the proper flags set since request allocation time. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 1 - 1 file changed, 1 deletion(-) commit 82ed4db499b8598f16f8871261bff088d6b0597f Author: Christoph Hellwig Date: Fri Jan 27 09:46:29 2017 +0100 block: split scsi_request out of struct request And require all drivers that want to support BLOCK_PC to allocate it as the first thing of their private data. To support this the legacy IDE and BSG code is switched to set cmd_size on their queues to let the block layer allocate the additional space. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 31 ----------- block/blk-exec.c | 17 ------ block/blk-mq.c | 10 ---- block/bsg-lib.c | 34 ++++++++---- block/bsg.c | 47 ++++++++--------- block/scsi_ioctl.c | 76 ++++++++++++++------------ drivers/ata/libata-scsi.c | 2 +- drivers/block/cciss.c | 28 +++++----- drivers/block/pktcdvd.c | 6 +-- drivers/block/virtio_blk.c | 11 ++-- drivers/cdrom/cdrom.c | 32 +++++------ drivers/ide/ide-atapi.c | 43 ++++++++------- drivers/ide/ide-cd.c | 91 +++++++++++++++----------------- drivers/ide/ide-cd_ioctl.c | 1 + drivers/ide/ide-cd_verbose.c | 6 +-- drivers/ide/ide-devsets.c | 9 ++-- drivers/ide/ide-disk.c | 1 + drivers/ide/ide-eh.c | 2 +- drivers/ide/ide-floppy.c | 4 +- drivers/ide/ide-io.c | 3 +- drivers/ide/ide-ioctls.c | 6 ++- drivers/ide/ide-park.c | 12 +++-- drivers/ide/ide-pm.c | 2 + drivers/ide/ide-probe.c | 36 +++++++++++-- drivers/ide/ide-tape.c | 32 +++++------ drivers/ide/ide-taskfile.c | 1 + drivers/ide/sis5513.c | 2 +- drivers/message/fusion/mptsas.c | 8 +-- drivers/scsi/libfc/fc_lport.c | 2 +- drivers/scsi/libsas/sas_expander.c | 8 +-- drivers/scsi/libsas/sas_host_smp.c | 38 ++++++------- drivers/scsi/mpt3sas/mpt3sas_transport.c | 8 +-- drivers/scsi/osd/osd_initiator.c | 19 +++---- drivers/scsi/osst.c | 15 +++--- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 6 ++- drivers/scsi/qla2xxx/qla_mr.c | 2 +- drivers/scsi/scsi_error.c | 22 ++++---- drivers/scsi/scsi_lib.c | 51 ++++++++++-------- drivers/scsi/scsi_transport_sas.c | 5 ++ drivers/scsi/sd.c | 4 +- drivers/scsi/sg.c | 30 ++++++----- drivers/scsi/st.c | 22 ++++---- drivers/target/target_core_pscsi.c | 11 ++-- fs/nfsd/blocklayout.c | 17 +++--- include/linux/blkdev.h | 13 ----- include/linux/ide.h | 8 ++- include/scsi/scsi_cmnd.h | 2 + include/scsi/scsi_request.h | 30 +++++++++++ 49 files changed, 458 insertions(+), 410 deletions(-) commit 8ae94eb65be9425af4d57a4f4cfebfdf03081e93 Author: Christoph Hellwig Date: Tue Jan 3 15:25:02 2017 +0300 block/bsg: move queue creation into bsg_setup_queue Simply the boilerplate code needed for bsg nodes a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/bsg-lib.c | 21 +++++++++++---------- drivers/scsi/scsi_transport_fc.c | 36 ++++++++---------------------------- drivers/scsi/scsi_transport_iscsi.c | 15 ++++----------- include/linux/bsg-lib.h | 5 ++--- 4 files changed, 25 insertions(+), 52 deletions(-) commit e9c787e65c0c36529745be47d490d998b4b6e589 Author: Christoph Hellwig Date: Mon Jan 2 21:55:26 2017 +0300 scsi: allocate scsi_cmnd structures as part of struct request Rely on the new block layer functionality to allocate additional driver specific data behind struct request instead of implementing it in SCSI itѕelf. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/hosts.c | 20 +-- drivers/scsi/scsi.c | 319 ---------------------------------------------- drivers/scsi/scsi_error.c | 17 ++- drivers/scsi/scsi_lib.c | 122 ++++++++++++------ drivers/scsi/scsi_priv.h | 8 +- include/scsi/scsi_host.h | 3 - 6 files changed, 95 insertions(+), 394 deletions(-) commit d48777a633d6fa7ccde0f0e6509f0c01fbfc5299 Author: Christoph Hellwig Date: Mon Jan 2 21:52:10 2017 +0300 scsi: remove __scsi_alloc_queue Instead do an internal export of __scsi_init_queue for the transport classes that export BSG nodes. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 19 ++++--------------- drivers/scsi/scsi_transport_fc.c | 6 ++++-- drivers/scsi/scsi_transport_iscsi.c | 3 ++- include/scsi/scsi_host.h | 2 -- include/scsi/scsi_transport.h | 2 ++ 5 files changed, 12 insertions(+), 20 deletions(-) commit eeff68c5618c8d0920b14533c70b2df007bd94b4 Author: Christoph Hellwig Date: Mon Jan 2 15:26:34 2017 +0300 scsi: remove scsi_cmd_dma_pool There is no need for GFP_DMA allocations of the scsi_cmnd structures themselves, all that might be DMAed to or from is the actual payload, or the sense buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/scsi.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 0a6ac4ee7c21098cb0e41cc4053b9d9ddc9e70a1 Author: Christoph Hellwig Date: Tue Jan 3 08:28:41 2017 +0300 scsi: respect unchecked_isa_dma for blk-mq Currently blk-mq always allocates the sense buffer using normal GFP_KERNEL allocation. Refactor the cmd pool code to split the cmd and sense allocation and share the code to allocate the sense buffers as well as the sense buffer slab caches between the legacy and blk-mq path. Note that this switches to lazy allocation of the sense slab caches - the slab caches (not the actual allocations) won't be destroy until the scsi module is unloaded instead of keeping track of hosts using them. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/hosts.c | 4 ++++ drivers/scsi/scsi.c | 24 ++++--------------- drivers/scsi/scsi_lib.c | 62 +++++++++++++++++++++++++++++++++++++++++++++--- drivers/scsi/scsi_priv.h | 5 ++++ 4 files changed, 73 insertions(+), 22 deletions(-) commit 0fbc3e0ff623f1012e7c2af96e781eeb26bcc0d7 Author: Christoph Hellwig Date: Mon Jan 2 14:38:03 2017 +0300 scsi: remove gfp_flags member in scsi_host_cmd_pool When using the slab allocator we already decide at cache creation time if an allocation comes from a GFP_DMA pool using the SLAB_CACHE_DMA flag, and there is no point passing the kmalloc-family only GFP_DMA flag to kmem_cache_alloc. Drop all the infrastructure for doing so. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/scsi.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 80e1836cf94e0c9a410c1e31302b1d61bf5b7363 Author: Hannes Reinecke Date: Thu Nov 3 14:20:23 2016 +0100 scsi_dh_hp_sw: switch to scsi_execute_req_flags() Switch to scsi_execute_req_flags() instead of using the block interface directly. This will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/device_handler/scsi_dh_hp_sw.c | 222 ++++++++-------------------- 1 file changed, 65 insertions(+), 157 deletions(-) commit b78205c93297b821974deaf607bc2efd89842621 Author: Hannes Reinecke Date: Thu Nov 3 14:20:22 2016 +0100 scsi_dh_emc: switch to scsi_execute_req_flags() Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/device_handler/scsi_dh_emc.c | 247 +++++++----------------------- 1 file changed, 56 insertions(+), 191 deletions(-) commit 3278255741326b6d66d8ca7d1cb2c57633ee43d9 Author: Hannes Reinecke Date: Thu Nov 3 14:20:21 2016 +0100 scsi_dh_rdac: switch to scsi_execute_req_flags() Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/device_handler/scsi_dh_rdac.c | 174 +++++++++-------------------- 1 file changed, 51 insertions(+), 123 deletions(-) commit eb8db831be80692bf4bda3dfc55001daf64ec299 Author: Christoph Hellwig Date: Sun Jan 22 18:32:46 2017 +0100 dm: always defer request allocation to the owner of the request_queue DM already calls blk_mq_alloc_request on the request_queue of the underlying device if it is a blk-mq device. But now that we allow drivers to allocate additional data and initialize it ahead of time we need to do the same for all drivers. Doing so and using the new cmd_size infrastructure in the block layer greatly simplifies the dm-rq and mpath code, and should also make arbitrary combinations of SQ and MQ devices with SQ or MQ device mapper tables easily possible as a further step. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-core.h | 1 - drivers/md/dm-mpath.c | 132 ++++------------------ drivers/md/dm-rq.c | 251 ++++++++++-------------------------------- drivers/md/dm-rq.h | 2 +- drivers/md/dm-target.c | 7 -- drivers/md/dm.c | 30 ++--- drivers/md/dm.h | 3 +- include/linux/device-mapper.h | 3 - 8 files changed, 85 insertions(+), 344 deletions(-) commit 4bf58435fae39ec2ea01a2ff9934d377add234b1 Author: Christoph Hellwig Date: Tue Jan 10 10:03:39 2017 +0100 dm: remove incomplete BLOCK_PC support DM tries to copy a few fields around for BLOCK_PC requests, but given that no dm-target ever wires up scsi_cmd_ioctl BLOCK_PC can't actually be sent to dm. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/dm-rq.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 48b77ad6084481ef9330a5d2bee289966da0975b Author: Christoph Hellwig Date: Fri Jan 27 09:35:54 2017 +0100 block: cleanup tracing A couple tweaks to the tracing code: - trace the request size for all requests - trace request sector and nr_sectors only for fs requests, enforced by helpers - drop SCSI CDB tracing - we have SCSI tracing for this and are going to me the CDB out of the generic struct request soon. With this the tracing code stops to know about BLOCK_PC requests entirely, it's just FS vs passthrough requests now, where the latter includes any driver-private requests. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blktrace_api.h | 14 +++++++------- include/trace/events/block.h | 27 +++++++++++---------------- kernel/trace/blktrace.c | 43 ++++++------------------------------------- 3 files changed, 24 insertions(+), 60 deletions(-) commit 6d247d7f71d1fa4b66a5f4da7b1daa21510d529b Author: Christoph Hellwig Date: Fri Jan 27 09:51:45 2017 -0700 block: allow specifying size for extra command data This mirrors the blk-mq capabilities to allocate extra drivers-specific data behind struct request by setting a cmd_size field, as well as having a constructor / destructor for it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 59 ++++++++++++++++++++++++++++++++++++++++---------- block/blk-flush.c | 5 ++--- block/blk-sysfs.c | 7 ++++-- include/linux/blkdev.h | 7 ++++++ 4 files changed, 61 insertions(+), 17 deletions(-) commit 5ea708d15a928f7a479987704203616d3274c03b Author: Christoph Hellwig Date: Tue Jan 3 14:52:44 2017 +0300 block: simplify blk_init_allocated_queue Return an errno value instead of the passed in queue so that the callers don't have to keep track of two queues, and move the assignment of the request_fn and lock to the caller as passing them as argument doesn't simplify anything. While we're at it also remove two pointless NULL assignments, given that the request structure is zeroed on allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 38 +++++++++++++++----------------------- drivers/md/dm-rq.c | 3 ++- include/linux/blkdev.h | 3 +-- 3 files changed, 18 insertions(+), 26 deletions(-) commit e6f7f93d58de74700f83dd0547dd4306248a093d Author: Christoph Hellwig Date: Wed Jan 25 11:17:11 2017 +0100 block: fix elevator init check We can't initalize the elevator fields for flushes as flush share space in struct request with the elevator data. But currently we can't communicate that a request is a flush through blk_get_request as we can only pass READ or WRITE, and the low-level code looks at the possible NULL bio to check for a flush. Fix this by allowing to pass any block op and flags, and by checking for the flush flags in __get_request. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit 309bd96af9e26da3038661bf5cdad780eef49dd9 Author: Christoph Hellwig Date: Wed Jan 25 11:15:20 2017 +0100 md: cleanup bio op / flags handling in raid1_write_request No need for the local variables, the bio is still live and we can just assign the bits we want directly. Make me wonder why we can't assign all the bio flags to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/md/raid1.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f924ba70c1b12706c6679d793202e8f4c125f7ae Merge: 7a308bb 400f73b Author: Jens Axboe Date: Fri Jan 27 15:08:31 2017 -0700 Merge branch 'for-4.11/block' into for-4.11/rq-refactor Signed-off-by: Jens Axboe commit 400f73b23f457a82288814e21af57dbc9f3f2afd Author: Omar Sandoval Date: Fri Jan 27 15:03:01 2017 -0700 blk-mq: fix debugfs compilation issues This fixes a couple of problems: 1. In the !CONFIG_DEBUG_FS case, the stub definitions were bogus. 2. In the !CONFIG_BLOCK case, blk-mq-debugfs.c shouldn't be compiled at all. Fix the stub definitions and add a CONFIG_BLK_DEBUG_FS Kconfig option. Fixes: 07e4fead45e6 ("blk-mq: create debugfs directory tree") Signed-off-by: Omar Sandoval Augment Kconfig description. Signed-off-by: Jens Axboe block/Kconfig | 12 ++++++++++++ block/Makefile | 2 +- block/blk-mq.h | 11 ++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) commit eaff16bc49882ec3e835ab8a9e0867edf48cdedc Author: Jeremy McNicoll Date: Fri Jan 27 01:10:00 2017 -0800 clk: qcom: SDHCI enablement on Nexus 5X / 6P Add missing clock branch to enable onboard storage for msm899(2/4). Signed-off-by: Jeremy McNicoll Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8994.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6eeaf8ff2f7f9238c294199a8c5d3e9b42884c1e Author: Jeremy McNicoll Date: Fri Jan 27 01:10:01 2017 -0800 dt-bindings: qcom: clk: Add missing binding for SDCHI enablement on Nexus 5X/6P AHB clock branch is needed in order to enable SDHCI on msm899(2/4). Signed-off-by: Jeremy McNicoll Signed-off-by: Stephen Boyd include/dt-bindings/clock/qcom,gcc-msm8994.h | 1 + 1 file changed, 1 insertion(+) commit b18b6a9cef7f30e9a8b7738d5fc8d568cf660855 Author: Nicolas Pitre Date: Sat Jan 21 00:09:08 2017 -0500 timers: Omit POSIX timer stuff from task_struct when disabled When CONFIG_POSIX_TIMERS is disabled, it is preferable to remove related structures from struct task_struct and struct signal_struct as they won't contain anything useful and shouldn't be relied upon by mistake. Code still referencing those structures is also disabled here. Signed-off-by: Nicolas Pitre Signed-off-by: John Stultz fs/proc/base.c | 4 ++-- include/linux/init_task.h | 40 +++++++++++++++++++++++++--------------- include/linux/sched.h | 13 ++++++++++--- kernel/fork.c | 10 +++++++++- kernel/sched/rt.c | 4 ++++ kernel/sched/stats.h | 32 ++++++++++++++++++++------------ 6 files changed, 70 insertions(+), 33 deletions(-) commit ef09e0f539f124c67aa44d4154730bc8492196bf Author: Marcus Cooper Date: Fri Jan 27 16:48:08 2017 +0100 ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2 Enable the S/PDIF transmitter that is present on the Beelink X2 STB. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit b91a391204a040b3e1cd7b2c9bd8213dd9dec65d Author: Marcus Cooper Date: Fri Jan 27 16:48:07 2017 +0100 ARM: dts: sun8i-h3: Add the SPDIF block to the H3 Add the SPDIF transceiver controller block to the H3 dtsi. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b0f36154230081aea475da9e39dc2e334c52a0f1 Author: Marcus Cooper Date: Fri Jan 27 16:48:06 2017 +0100 ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3 Add the SPDIF TX pin to the H3 dtsi. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 63d8d50ce356687e0cac575335a9068ddc229b76 Author: Maxime Rossi Bellom Date: Fri Jan 27 11:58:52 2017 +0100 staging: lustre: lnet: Fix coding style errors Replace a mix of tabs and spaces indentation by tabs only. Errors were reported by checkpatch.pl as WARNING: Statements should start on a tabstop WARNING: suspect code indent for conditional statement Signed-off-by: Maxime Rossi Bellom Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4d9119132bc7f2caa76fdeb1f169943d412070b1 Author: William Blough Date: Fri Jan 27 13:54:26 2017 -0500 staging: rtl8188eu: Fix coding style issues Convert leading spaces to tabs Signed-off-by: William Blough Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_security.c | 128 +++++++++++++------------- 1 file changed, 64 insertions(+), 64 deletions(-) commit e4d9861cd98decd80ab7620708aa6ff2b850a4d1 Author: sayli karnik Date: Sat Jan 28 00:44:36 2017 +0530 staging: xgifb: XGI_main_26: Remove multiple assignments This patch resolves the checkpatch issue: multiple assignments should be avoided Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 195559506981c0a4c62397ad0220888324750070 Merge: d646d81 02c952c Author: Stephen Boyd Date: Fri Jan 27 11:53:06 2017 -0800 Merge tag 'clk-v4.11-samsung-2' of git://linuxtv.org/snawrocki/samsung into clk-next Pull Samsung clk driver updates from Sylwester Nawrocki: - Exporting clock IDs for Exynos5433 SoC MIPI DSI DPHY - Exynos PLL code updates and overall minor clean-ups * tag 'clk-v4.11-samsung-2' of git://linuxtv.org/snawrocki/samsung: clk: samsung: mark s3c...._clk_sleep_init() as __init clk: samsung: Add enable/disable support for PLL35XX clocks clk: samsung: exynos5433: Correct typos in SoC name clk: samsung: exynos5433: Add data for 250MHz and 278MHz PLL rates clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks commit d646d812f37c412bfec3503c9d4308eea2fa0df8 Merge: e120c17 d963654 Author: Stephen Boyd Date: Fri Jan 27 11:51:37 2017 -0800 Merge tag 'clk-renesas-for-v4.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull Renesas clk driver updates from Geert Uytterhoeven: - Use CLK_IS_CRITICAL to handle critical clocks, - Add Reset Control Support for R-Car Gen2 and Gen3, and RZ/G1, - Add IIC-DVFS clocks for R-Car H3 and M3-W, - Minor cleanups. * tag 'clk-renesas-for-v4.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add IIC-DVFS clock clk: renesas: r8a7795: Add IIC-DVFS clock clk: renesas: cpg-mssr: Add support for reset control clk: renesas: cpg-mssr: Rename cpg_mssr_priv.mstp_lock clk: renesas: cpg-mssr: Document suitability for RZ/G1 dt-bindings: clock: renesas: cpg-mssr: Document reset control support clk: renesas: mstp: Reformat cpg_mstp_clock_register() for git diff clk: renesas: mstp: Make INTC-SYS a critical clock clk: renesas: cpg-mssr: Migrate to CLK_IS_CRITICAL commit 3b136499e906460919f0d21a49db1aaccf0ae963 Author: Jan Kara Date: Fri Jan 27 14:35:38 2017 -0500 ext4: fix data corruption in data=journal mode ext4_journalled_write_end() did not propely handle all the cases when generic_perform_write() did not copy all the data into the target page and could mark buffers with uninitialized contents as uptodate and dirty leading to possible data corruption (which would be quickly fixed by generic_perform_write() retrying the write but still). Fix the problem by carefully handling the case when the page that is written to is not uptodate. CC: stable@vger.kernel.org Reported-by: Al Viro Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit cd648b8a8fd5071d232242d5ee7ee3c0815776af Author: Jan Kara Date: Fri Jan 27 14:34:30 2017 -0500 ext4: trim allocation requests to group size If filesystem groups are artifically small (using parameter -g to mkfs.ext4), ext4_mb_normalize_request() can result in a request that is larger than a block group. Trim the request size to not confuse allocation code. Reported-by: "Kirill A. Shutemov" Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/mballoc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 24dc831b77eca9361cf835be59fa69ea0e471afc Author: Yuval Shaia Date: Wed Jan 25 18:41:37 2017 +0200 IB/core: Add inline function to validate port Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 18 ++++++++---------- drivers/infiniband/core/cma.c | 6 ++---- drivers/infiniband/core/device.c | 4 ++-- drivers/infiniband/core/verbs.c | 3 +-- include/rdma/ib_verbs.h | 7 +++++++ 5 files changed, 20 insertions(+), 18 deletions(-) commit 2bce1a6d2209c8c776a9598741f5aa1991689dcb Author: Bart Van Assche Date: Fri Dec 9 11:00:33 2016 -0800 IB/srpt: Accept GUIDs as port names Port and ACL information must be configured before an initiator logs in. Make it possible to configure this information before a subnet prefix has been assigned to a port by not only accepting GIDs as target port and initiator port names but by also accepting port GUIDs. Add a 'priv' member to struct se_wwn to allow target drivers to associate their own data with struct se_wwn. Reported-by: Doug Ledford References: http://www.spinics.net/lists/linux-rdma/msg39505.html Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Nicholas Bellinger Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 139 ++++++++++++++++++++-------------- drivers/infiniband/ulp/srpt/ib_srpt.h | 18 +++-- drivers/target/target_core_tpg.c | 1 + include/target/target_core_base.h | 1 + 4 files changed, 98 insertions(+), 61 deletions(-) commit a3dd3a48a5f6ce433e06863d311dfdd57a26bf67 Author: Christophe Jaillet Date: Fri Jan 27 14:15:35 2017 +0100 IB/cma: Fix reversed test This test looks reverted. We should log an error message only if 'ib_attach_mcast()' fails. Signed-off-by: Christophe JAILLET Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2593cb1b29185d38db706cbcbe22ed538720ae1 Author: Waldemar Rymarkiewicz Date: Fri Jan 27 19:52:19 2017 +0200 ath10k: Search SMBIOS for OEM board file extension Board Data File (BDF) is loaded upon driver boot-up procedure. The right board data file is identified, among others, by device and sybsystem ids. The problem, however, can occur when the (default) board data file cannot fulfill with the vendor requirements and it is necessary to use a different board data file. To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name Extension to specify the extension/variant name. The driver will take the extension suffix into consideration and will load the right (non-default) board data file if necessary. If it is unnecessary to use extension board data file, please leave the SMBIOS field blank and default configuration will be used. Example: If a default board data file for a specific board is identified by a string "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028, subsystem-device=0310" then the OEM specific data file, if used, could be identified by variant suffix: "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028, subsystem-device=0310,variant=DE_1AB" Signed-off-by: Waldemar Rymarkiewicz Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 84 ++++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/core.h | 19 ++++++++ 2 files changed, 100 insertions(+), 3 deletions(-) commit c440408cf6901eeb2c09563397e24a9097907078 Author: Jason A. Donenfeld Date: Sun Jan 22 16:34:08 2017 +0100 random: convert get_random_int/long into get_random_u32/u64 Many times, when a user wants a random number, he wants a random number of a guaranteed size. So, thinking of get_random_int and get_random_long in terms of get_random_u32 and get_random_u64 makes it much easier to achieve this. It also makes the code simpler. On 32-bit platforms, get_random_int and get_random_long are both aliased to get_random_u32. On 64-bit platforms, int->u32 and long->u64. Signed-off-by: Jason A. Donenfeld Cc: Greg Kroah-Hartman Cc: Theodore Ts'o Signed-off-by: Theodore Ts'o drivers/char/random.c | 55 +++++++++++++++++++++++++------------------------- include/linux/random.h | 17 ++++++++++++++-- 2 files changed, 42 insertions(+), 30 deletions(-) commit f5b98461cb8167ba362ad9f74c41d126b7becea7 Author: Jason A. Donenfeld Date: Fri Jan 6 19:32:01 2017 +0100 random: use chacha20 for get_random_int/long Now that our crng uses chacha20, we can rely on its speedy characteristics for replacing MD5, while simultaneously achieving a higher security guarantee. Before the idea was to use these functions if you wanted random integers that aren't stupidly insecure but aren't necessarily secure either, a vague gray zone, that hopefully was "good enough" for its users. With chacha20, we can strengthen this claim, since either we're using an rdrand-like instruction, or we're using the same crng as /dev/urandom. And it's faster than what was before. We could have chosen to replace this with a SipHash-derived function, which might be slightly faster, but at the cost of having yet another RNG construction in the kernel. By moving to chacha20, we have a single RNG to analyze and verify, and we also already get good performance improvements on all platforms. Implementation-wise, rather than use a generic buffer for both get_random_int/long and memcpy based on the size needs, we use a specific buffer for 32-bit reads and for 64-bit reads. This way, we're guaranteed to always have aligned accesses on all platforms. While slightly more verbose in C, the assembly this generates is a lot simpler than otherwise. Finally, on 32-bit platforms where longs and ints are the same size, we simply alias get_random_int to get_random_long. Signed-off-by: Jason A. Donenfeld Suggested-by: Theodore Ts'o Cc: Theodore Ts'o Cc: Hannes Frederic Sowa Cc: Andy Lutomirski Signed-off-by: Theodore Ts'o drivers/char/random.c | 84 ++++++++++++++++++++++++++------------------------ include/linux/random.h | 1 - init/main.c | 1 - 3 files changed, 43 insertions(+), 43 deletions(-) commit 20f482ab9e0f800d1e01ce748ebd382d085abe56 Author: Lans Zhang Date: Fri Jan 6 12:38:11 2017 +0800 ima: allow to check MAY_APPEND Otherwise some mask and inmask tokens with MAY_APPEND flag may not work as expected. Signed-off-by: Lans Zhang Signed-off-by: Mimi Zohar security/integrity/ima/ima_api.c | 3 ++- security/integrity/ima/ima_main.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit bc15ed663e7e53ee4dc3e60f8d09c93a0528c694 Author: Mimi Zohar Date: Tue Jan 17 06:45:41 2017 -0500 ima: fix ima_d_path() possible race with rename On failure to return a pathname from ima_d_path(), a pointer to dname is returned, which is subsequently used in the IMA measurement list, the IMA audit records, and other audit logging. Saving the pointer to dname for later use has the potential to race with rename. Intead of returning a pointer to dname on failure, this patch returns a pointer to a copy of the filename. Reported-by: Al Viro Signed-off-by: Mimi Zohar Cc: stable@vger.kernel.org security/integrity/ima/ima.h | 2 +- security/integrity/ima/ima_api.c | 20 ++++++++++++++++++-- security/integrity/ima/ima_main.c | 8 +++++--- 3 files changed, 24 insertions(+), 6 deletions(-) commit 249a2243e97edcd2cb0bef01a934d4ba21fb167f Author: Martin Blumenstingl Date: Sun Jan 22 22:05:28 2017 +0100 ARM64: dts: meson-gxl: add the pwm_ao_b pin This adds the pwm_ao_b pin to allow boards which have an LED connected to GPIOAO_9 to use the leds-pwm driver (by activating the pwm_AO_ab node and passing the pwm_ao_b_pin pinctrl-reference). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit e48512244f653960cfbb002597686362558533d1 Author: Martin Blumenstingl Date: Sun Jan 22 22:05:26 2017 +0100 ARM64: dts: meson-gx: add the missing pwm_AO_ab node All Meson GX SoCs (GXBB, GXL and GXM) have a PWM controller within the AO domain. When one of the board's LEDs is connected to one of the AO PWM pins then this can be used to dim that LED (when the leds-pwm driver is used). Add the pwm_AO_ab to allow such devices to use the leds-pwm driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 2d3b74d3836901c8601e147b1ae24170f9fa2982 Author: jbrunet Date: Thu Jan 26 17:05:49 2017 +0100 clk: gxbb: fix CLKID_ETH defined twice CLKID_ETH is define in the dt-bindings but has not be commented out in the clock driver. Just do it now. Fixes: 738f66d3211d ("clk: gxbb: add AmLogic GXBB clk controller driver") Signed-off-by: Jerome Brunet Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e120c17a70e5bad1ed601502844f708837b132a8 Author: Chris Packham Date: Fri Jan 27 16:25:42 2017 +1300 clk: mvebu: support for 98DX3236 SoC The 98DX3236, 98DX3336, 98DX4521 and variants have a different TCLK from the Armada XP (200MHz vs 250MHz). The CPU core clock is fixed at 800MHz. The clock gating options are a subset of those on the Armada XP. The core clock divider is different to the Armada XP also. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/mvebu-corediv-clock.txt | 1 + .../devicetree/bindings/clock/mvebu-cpu-clock.txt | 1 + drivers/clk/mvebu/armada-xp.c | 39 ++++++++++++++++++++++ drivers/clk/mvebu/clk-corediv.c | 23 +++++++++++++ drivers/clk/mvebu/clk-cpu.c | 8 +++++ 5 files changed, 72 insertions(+) commit a1f817dc8ed79cdff2b76bc51d545fb9465982be Merge: 04102c7 69973b8 Author: Mike Marshall Date: Fri Jan 27 13:33:25 2017 -0500 Merge tag 'v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into for-next Linux 4.9 commit 5b1f8329121f553cbe83d22f7c62f86041c79257 Author: Sakari Ailus Date: Wed Jul 20 12:31:39 2016 -0300 [media] media: entity: Split graph walk iteration into two functions With media_entity_graph_walk_next() getting more and more complicated (and especially so with has_routing() support added), split the function into two. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit 20b852273642f41ce5c97601acb89185cbcee772 Author: Sakari Ailus Date: Mon Nov 21 14:48:30 2016 -0200 [media] media: Rename graph and pipeline structs and functions The media_entity_pipeline_start() and media_entity_pipeline_stop() functions are renamed as media_pipeline_start() and media_pipeline_stop(), respectively. The reason is two-fold: the pipeline struct is, rightly, already called media_pipeline (rather than media_entity_pipeline) and what this really is about is a pipeline. A pipeline consists of entities --- and, well, other objects embedded in these entities. As the pipeline object will be in the future moved from entities to pads in order to support multiple pipelines through a single entity, do the renaming now. Similarly, functions operating on struct media_entity_graph as well as the struct itself are renamed by dropping the "entity_" part from the prefix of the function family and the data structure. The graph traversal which is what the functions are about is not specifically about entities only and will operate on pads for the same reason as the media pipeline. The patch has been generated using the following command: git grep -l media_entity |xargs perl -i -pe ' s/media_entity_pipeline/media_pipeline/g; s/media_entity_graph/media_graph/g' And a few manual edits related to line start alignment and line wrapping. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/mc-core.rst | 18 ++--- drivers/media/media-device.c | 8 +-- drivers/media/media-entity.c | 77 +++++++++++----------- drivers/media/platform/exynos4-is/fimc-capture.c | 8 +-- drivers/media/platform/exynos4-is/fimc-isp-video.c | 8 +-- drivers/media/platform/exynos4-is/fimc-lite.c | 8 +-- drivers/media/platform/exynos4-is/media-dev.c | 16 ++--- drivers/media/platform/exynos4-is/media-dev.h | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 16 ++--- drivers/media/platform/s3c-camif/camif-capture.c | 6 +- drivers/media/platform/vsp1/vsp1_drm.c | 4 +- drivers/media/platform/vsp1/vsp1_video.c | 16 ++--- drivers/media/platform/xilinx/xilinx-dma.c | 16 ++--- drivers/media/usb/au0828/au0828-core.c | 4 +- drivers/media/v4l2-core/v4l2-mc.c | 18 ++--- drivers/staging/media/davinci_vpfe/vpfe_video.c | 25 ++++--- drivers/staging/media/davinci_vpfe/vpfe_video.h | 2 +- drivers/staging/media/omap4iss/iss_video.c | 32 ++++----- include/media/media-device.h | 2 +- include/media/media-entity.h | 65 +++++++++--------- 20 files changed, 174 insertions(+), 177 deletions(-) commit 1ad38fd719da87980480886f21130053c73007ac Author: Srinivas Kandagatla Date: Fri Jan 27 19:52:37 2017 +0200 ath10k: fix typo in addr calculation CORE_CTRL_ADDRESS is offset in register address space, it does not make sense to OR it to derive the final address. It looks like its a typo, so fix it. Signed-off-by: Srinivas Kandagatla Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0de4df5ba2ad3f3c46d2c079f3a76c69d71800be Author: Srinivas Kandagatla Date: Fri Jan 27 19:52:37 2017 +0200 ath10k: use dma_zalloc_coherent() use dma_zalloc_coherent() instead of dma_alloc_coherent and memset(). Signed-off-by: Srinivas Kandagatla Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 9 +-------- drivers/net/wireless/ath/ath10k/pci.c | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) commit dd51fa3d8a1d4781647f333e731590b65965b332 Author: Srinivas Kandagatla Date: Fri Jan 27 19:52:36 2017 +0200 ath10k: remove multiple defines of DIAG_TRANSFER_LIMIT DIAG_TRANSFER_LIMIT is redefined with same value and comments just below this entry, remove this duplicate entry. Signed-off-by: Srinivas Kandagatla Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.h | 5 ----- 1 file changed, 5 deletions(-) commit 78484c44e4b305b23cbfcfb9257ed96c8753e86d Author: Maya Erez Date: Fri Jan 20 13:49:53 2017 +0200 wil6210: convert symbolic permissions to octal permissions Symbolic permissions are no longer recommended. This patch changes the symbolic permissions in wil6210 driver to octal permissions. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +- drivers/net/wireless/ath/wil6210/debugfs.c | 128 ++++++++++++++-------------- drivers/net/wireless/ath/wil6210/main.c | 16 ++-- drivers/net/wireless/ath/wil6210/pcie_bus.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 4 +- drivers/net/wireless/ath/wil6210/wmi.c | 6 +- 6 files changed, 79 insertions(+), 79 deletions(-) commit c3bfea05a6fdecee03c7cf08f5bfee6aa0645cee Author: Lior David Date: Fri Jan 20 13:49:52 2017 +0200 wil6210: option to override A-BFT length in start AP/PCP Add an option to specify and override the A-BFT length when starting an AP/PCP. See IEEE P802.11-2016, 10.38.5. The abft_len must be set before starting AP/PCP. It is only needed for diagnostics and certification. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 1 + drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 1 + 3 files changed, 3 insertions(+) commit 9d865ee232eccf51950b16f223f4130f7dc06e0f Author: Lior David Date: Fri Jan 20 13:49:51 2017 +0200 wil6210: report association ID (AID) per station in debugfs Add reporting of the association ID (AID) for each station as part of the stations file in the debugfs. Valid AID values are 1-254. 0 is reported if the AID is unknown or not reported by firmware. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 4 +++- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) commit a52fb913aee97149f5986fd001a424e68c096d19 Author: Lior David Date: Fri Jan 20 13:49:50 2017 +0200 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: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.h | 45 ++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit a895cb8b990c12945b70f70d9e0798d587d507c0 Author: Lior David Date: Fri Jan 20 13:49:50 2017 +0200 wil6210: fix for broadcast workaround in PBSS Currently we do not have full support for broadcast from a station inside a PBSS network. We have a workaround where instead of broadcast we do a unicast to every known station in the PBSS. This workaround was performed only for P2P clients. This fix will perform the broadcast workaround also for a regular station inside a PBSS. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 1 + drivers/net/wireless/ath/wil6210/txrx.c | 35 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 16 deletions(-) commit 3ee908dc3b48fa0a5be2883362d36e085b6b52f4 Author: Hamad Kadmany Date: Fri Jan 20 13:49:49 2017 +0200 wil6210: protect against false interrupt during reset sequence During reset sequence it is seen that device is generating an interrupt eventhough interrupts are masked at device level. Add workaround to disable the interrupts from host side during reset and clear any pending interrupts before re-enabling the interrupt. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 4d4c4dc324b4444d40e9164834044feebaf2d72d Author: Lior David Date: Fri Jan 20 13:49:48 2017 +0200 wil6210: missing reinit_completion in wmi_call The code in wmi_call uses the wil->wmi_call completion structure to wait for a reply. In some scenarios, complete was called twice on the completion structure. This happened mainly with a disconnect event which can arrive both unsolicited and as a reply to a disconnect request. In this case the completion structure was left marked as "done" and the next wmi_call returned immediately with a corrupted reply buffer. This caused unexpected results including crashes. Fix this by adding the missing call to reinit_completion. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.c | 1 + 1 file changed, 1 insertion(+) commit 0d2370e939acca97b5e1abc1aedd47c5c9a5f500 Author: Dedy Lansky Date: Fri Jan 20 13:49:47 2017 +0200 wil6210: support new WMI-only FW capability WMI_ONLY FW is used for testing in production. It cannot be used for scan/connect, etc. In case FW reports this capability, driver will not allow interface up. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/netdev.c | 5 +++-- drivers/net/wireless/ath/wil6210/pcie_bus.c | 10 +++++++--- drivers/net/wireless/ath/wil6210/wmi.h | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) commit af3db60a30331d3a37b534570bc52dd64a7c0e5d Author: Lazar Alexei Date: Fri Jan 20 13:49:46 2017 +0200 wil6210: remove __func__ from debug printouts __func__ is automatically added to printouts by dynamic debug mechanism and by wil_info/wil_err macros. Remove __func__ from debug printouts to avoid duplication. Signed-off-by: Lazar Alexei Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 79 +++++++++++------------ drivers/net/wireless/ath/wil6210/debugfs.c | 4 +- drivers/net/wireless/ath/wil6210/ethtool.c | 10 +-- drivers/net/wireless/ath/wil6210/interrupt.c | 30 ++++----- drivers/net/wireless/ath/wil6210/main.c | 50 +++++++------- drivers/net/wireless/ath/wil6210/netdev.c | 14 ++-- drivers/net/wireless/ath/wil6210/p2p.c | 36 +++++------ drivers/net/wireless/ath/wil6210/pcie_bus.c | 14 ++-- drivers/net/wireless/ath/wil6210/pm.c | 17 ++--- drivers/net/wireless/ath/wil6210/pmc.c | 79 +++++++++++------------ drivers/net/wireless/ath/wil6210/rx_reorder.c | 8 +-- drivers/net/wireless/ath/wil6210/txrx.c | 36 ++++++----- drivers/net/wireless/ath/wil6210/wil_crash_dump.c | 18 +++--- drivers/net/wireless/ath/wil6210/wmi.c | 50 +++++++------- 14 files changed, 211 insertions(+), 234 deletions(-) commit a351f2f537b711bed3d0f6a75d7e9fddcbe51ffe Author: Lazar Alexei Date: Fri Jan 20 13:49:45 2017 +0200 wil6210: support loading dedicated image for sparrow-plus devices Driver may be used in platforms where some use sparrow cards while other use sparrow-plus cards, where different FW image is needed. Add the capability to load dedicated FW image in case sparrow-plus card is detected and fallback to default image if such does not exist. Signed-off-by: Lazar Alexei Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 3 ++- drivers/net/wireless/ath/wil6210/fw.c | 7 +++--- drivers/net/wireless/ath/wil6210/fw_inc.c | 21 ++++++++++++++++- drivers/net/wireless/ath/wil6210/main.c | 8 +++---- drivers/net/wireless/ath/wil6210/pcie_bus.c | 36 ++++++++++++++++++++++------- drivers/net/wireless/ath/wil6210/wil6210.h | 18 +++++++++++---- 6 files changed, 72 insertions(+), 21 deletions(-) commit 849a564b7e28db7afed18d4b921303b7bd883112 Author: Dedy Lansky Date: Fri Jan 20 13:49:44 2017 +0200 wil6210: add disable_ap_sme module parameter By default, AP SME is handled by driver/FW. In case disable_ap_sme is true, driver doesn't turn-on WIPHY_FLAG_HAVE_AP_SME and the responsibility for AP SME is passed to user space. With AP SME disabled, driver reports assoc request frame to user space which is then responsible for sending assoc response frame and for sending NL80211_CMD_NEW_STATION. Driver also reports disassoc frame to user space which should then send NL80211_CMD_DEL_STATION. NL80211_CMD_SET_STATION with NL80211_STA_FLAG_AUTHORIZED is used by user space to allow/disallow data transmit. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 92 +++++++++++++++++++++++++++-- drivers/net/wireless/ath/wil6210/main.c | 10 +++- drivers/net/wireless/ath/wil6210/wil6210.h | 9 ++- drivers/net/wireless/ath/wil6210/wmi.c | 68 +++++++++++++++++---- drivers/net/wireless/ath/wil6210/wmi.h | 23 +++++++- 5 files changed, 178 insertions(+), 24 deletions(-) commit 8c96c678011eeb1676da18f203e90dea7e0d69d2 Author: Chris Wilson Date: Tue Jan 24 11:57:58 2017 +0000 dma/fence: Export enable-signaling tracepoint for emission by drivers Currently this tracepoint is solely used by dma_fence_enable_sw_signaling, however I have a need to manually perform the hw enabling of the signaling and would like to emit this tracepoint for completeness. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Daniel Vetter Acked-by: Sumit Semwal Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170124115758.31353-1-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 1 + 1 file changed, 1 insertion(+) commit 268c3001842cb179b54a2825dad9b70151bf4de6 Author: Christian König Date: Wed Jan 18 14:49:43 2017 +0100 drm/amdgpu: fix amdgpu_bo_va_mapping flags They are 64bit not 32 for a while now. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 999446a786727af6bb5affccf2893b7c3976b675 Author: Christian König Date: Mon Nov 7 10:19:40 2016 +0100 drm/amdgpu: access stolen VRAM directly on CZ (v2) We don't need to use the PCI BAR on APUs. This allows us to access the full VRAM directly without being limited by the BAR size. v2: squash in 64bit shift fix Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f39093059b2f2998198ab1f7a4e0a92e177f0d66 Author: Christian König Date: Fri Nov 4 13:23:41 2016 +0100 drm/amdgpu: access stolen VRAM directly on KV/KB (v2) We don't need to use the PCI BAR on APUs. This allows us to access the full VRAM directly without being limited by the BAR size. v2: squash in 64bit shift fix Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8485b5e1876b46d7c4f63a2cfcec2ee30362a207 Author: Rex Zhu Date: Fri Jan 20 14:30:51 2017 +0800 drm/amdgpu: fix kernel panic when dpm disabled on Kv. Return early if it's disabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 3 +++ 1 file changed, 3 insertions(+) commit 36a94a8ad74e83a135a4b0a2157dabe50b4562a6 Author: Rex Zhu Date: Fri Jan 20 14:27:22 2017 +0800 drm/amdgpu: fix dpm bug on Kv. 1. current_ps/request_ps not update. 2. compare crrent_ps and request_ps, if same, don't re-set power state. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 44 ++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit cb256cc383bddd5e5f135279ebb4112dfb991f37 Author: Rex Zhu Date: Tue Jan 24 17:47:36 2017 +0800 drm/amd/powerplay: fix regresstion issue can't set manual dpm mode. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) commit 17ed9be815821f18eb2a42282fa5416c06da03b0 Author: Alex Deucher Date: Wed Jan 25 15:35:38 2017 -0500 drm/amdgpu: handle vfct with multiple vbios images The vfct table can contain multiple vbios images if the platform contains multiple GPUs. Noticed by netkas on phoronix forums. This patch fixes those platforms. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 66 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 32 deletions(-) commit a882f5de402ded769af74fbf276132f9c175049c Author: Alex Deucher Date: Wed Jan 25 15:33:44 2017 -0500 drm/radeon: handle vfct with multiple vbios images The vfct table can contain multiple vbios images if the platform contains multiple GPUs. Noticed by netkas on phoronix forums. This patch fixes those platforms. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_bios.c | 66 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 30 deletions(-) commit 689957b12b6315c63bd8cce879e2b259a8a4b666 Author: Alex Deucher Date: Tue Jan 24 18:00:57 2017 -0500 drm/amdgpu: move misc si headers into amdgpu Move these to the amdgpu directory to match what we do for other asics. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/clearstate_si.h | 941 ++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_smc.c | 2 +- drivers/gpu/drm/amd/amdgpu/sid.h | 2461 ++++++++++++++++++++ .../drm/amd/include/asic_reg/si/clearstate_si.h | 941 -------- drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 2461 -------------------- 10 files changed, 3408 insertions(+), 3408 deletions(-) commit d848c0ba66a05650055b5e3af643a5741b300d46 Author: Alex Deucher Date: Tue Jan 24 17:54:37 2017 -0500 drm/amdgpu: remove unused header si_reg.h All of these are available elsewhere. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/si/si_reg.h | 105 ----------------------- 1 file changed, 105 deletions(-) commit e894f7ef32deaff134d4c78106a3819eb4ff4136 Author: Alex Deucher Date: Tue Jan 24 17:01:11 2017 -0500 drm/radeon: drop pitcairn dpm quirks No longer necessary with the new 58 mc ucode. bug: https://bugs.freedesktop.org/show_bug.cgi?id=76490 Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/si_dpm.c | 47 +---------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) commit 85d2fce605e4625871a4028b36e9c352de2d1ee9 Author: Alex Deucher Date: Tue Jan 24 16:59:35 2017 -0500 drm/amdgpu: drop pitcairn dpm quirks No longer necessary with the new 58 mc ucode. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 47 +------------------------------------ 1 file changed, 1 insertion(+), 46 deletions(-) commit 3b2c69328280278593e0cd87e83da51bbc748ce7 Author: Arvind Yadav Date: Tue Jan 24 14:46:16 2017 +0530 drm: radeon: radeon_ttm: Handle return NULL error from ioremap_nocache Here, If ioremap_nocache will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_ttm.c | 2 ++ 1 file changed, 2 insertions(+) commit 8ba28ac9f5cc36f91b64273b11d302e02bd77508 Author: Arvind Yadav Date: Tue Jan 24 14:55:33 2017 +0530 drm/amd/amdgpu/amdgpu_ttm: Handle return NULL error from ioremap_nocache Here, If ioremap_nocache will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+) commit 967de2a9dcd52b248e447608fa03d30db4eb05ed Author: Yintian Tao Date: Sun Jan 22 15:16:51 2017 +0800 drm/amdgpu: add new virtual display ID In the case of pass-through, amdgpu.ko may be included into a image with the hard code ID therefore loading driver with specified virtual display ID will lose efficacy when the BDF of GPU modifies.So add the new ID string "all" for it as same as vf case what does. Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Yintian Tao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 50ddc75e32bba7cce994d530ec27aec697a372f8 Author: Junwei Zhang Date: Mon Jan 23 16:30:38 2017 +0800 drm/amd/amdgpu: remove the uncessary parameter for ib scheduler Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- 13 files changed, 17 insertions(+), 18 deletions(-) commit a2e2f29970aa1e53219e3499382c41d61c8959f8 Author: Nils Holland Date: Sun Jan 22 20:15:27 2017 +0100 drm/amdgpu: Bring bo creation in line with radeon driver (v2) Add the bo creation changes that have been done to the radeon driver in recent times, e.g. disable GTT WC on 32 bit because it is broken there, and also disable it generally (and print a warning message) when CONFIG_X86_PAT is not set. v2: agd: fix warning in defined(CONFIG_X86) && !defined(CONFIG_X86_PAT) case Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Nils Holland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 08f1408c474fb558098112c9143433e159145d8e Author: Nicolas Iooss Date: Sun Jan 22 14:47:39 2017 +0100 drm/amd/powerplay: fix misspelling in header guard In smu7_clockpowergating.h, the #ifndef statement which prevents multiple inclusions of the header file uses _SMU7_CLOCK_POWER_GATING_H_ but the following #define statement uses _SMU7_CLOCK__POWER_GATING_H_. Signed-off-by: Nicolas Iooss Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 896d630d240e90850fdb094f75445823fe0e0849 Author: Christian König Date: Thu Jan 12 11:54:11 2017 +0100 drm/ttm: revert "add optional LRU removal callback v2" Without the custom LRU management the callback is not used any more. agd: fix trivial warning Reviewed-by: Sinclair Yeh Signed-off-by: Christian König Reviewed-and-Tested-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 13 +++++-------- include/drm/ttm/ttm_bo_driver.h | 6 ------ 2 files changed, 5 insertions(+), 14 deletions(-) commit 260498f2cdfcf3a3a266b212a86c9059623ffa32 Author: Christian König Date: Thu Jan 12 11:50:13 2017 +0100 drm/ttm: revert "implement LRU add callbacks v2" The additional housekeeping had too much CPU overhead, let's use the BO priorities instead. agd: also revert hibmc changes Reviewed-by: Sinclair Yeh Signed-off-by: Christian König Reviewed-and-Tested-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 -- drivers/gpu/drm/ast/ast_ttm.c | 2 -- drivers/gpu/drm/bochs/bochs_mm.c | 2 -- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 -- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 -- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 -- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 -- drivers/gpu/drm/qxl/qxl_ttm.c | 2 -- drivers/gpu/drm/radeon/radeon_ttm.c | 2 -- drivers/gpu/drm/ttm/ttm_bo.c | 19 +++++-------------- drivers/gpu/drm/virtio/virtgpu_ttm.c | 2 -- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 2 -- include/drm/ttm/ttm_bo_driver.h | 9 --------- 13 files changed, 5 insertions(+), 45 deletions(-) commit 373308a5f5f3f82656567481f688350887abb771 Author: Christian König Date: Mon Jan 23 16:28:06 2017 -0500 drm/amdgpu: double the priority of kernel allocations Give kernel allocations a higher priority cause it is often more work to swap them back in. Signed-off-by: Christian König Reviewed-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) commit e1f055b30187204439b6693a118b9dde9cda04ae Author: Christian König Date: Tue Jan 10 17:27:49 2017 +0100 drm/amdgpu: user BO priority instead of self coding it (v2) Keeping groups of BOs on the LRU is to time consuming on command submission. Instead use the newly added BO priority to give a certain eviction order. v2: agd: trivial warning fix Signed-off-by: Christian König Reviewed-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 69 +----------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 ------ 3 files changed, 5 insertions(+), 79 deletions(-) commit cf6c467d67d319e239aec57d7ba31cb9946f29bf Author: Christian König Date: Tue Jan 10 14:08:28 2017 +0100 drm/ttm: add BO priorities for the LRUs This way the driver can specify a priority for a BO which has the effect that a BO is only evicted when all other BOs with a lower priority are evicted first. Reviewed-by: Sinclair Yeh Signed-off-by: Christian König Reviewed-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 +- drivers/gpu/drm/ttm/ttm_bo.c | 67 ++++++++++++++++++++++----------- include/drm/ttm/ttm_bo_api.h | 2 + include/drm/ttm/ttm_bo_driver.h | 6 ++- 4 files changed, 52 insertions(+), 27 deletions(-) commit 2ee7fc92cfd327fe41377f64a7f04ddc30c851e7 Author: Christian König Date: Fri Jan 6 19:16:07 2017 +0100 drm/ttm: remove allow_errors parameter from ttm_bo_force_list_clean Not allowing errors here is completely pointless and actually dangerous cause trying to continue on an error can cause an endless loop. Reviewed-by: Sinclair Yeh Signed-off-by: Christian König Reviewed-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 49f6cba617fef4bc097a291e0dfd028cc7073c52 Author: Mark Rutland Date: Fri Jan 27 16:15:38 2017 +0000 arm64: handle sys and undef traps consistently If an EL0 instruction in the SYS class triggers an exception, do_sysintr looks for a sys64_hook matching the instruction, and if none is found, injects a SIGILL. This mirrors what we do for undefined instruction encodings in do_undefinstr, where we look for an undef_hook matching the instruction, and if none is found, inject a SIGILL. Over time, new SYS instruction encodings may be allocated. Prior to allocation, exceptions resulting from these would be handled by do_undefinstr, whereas after allocation these may be handled by do_sysintr. To ensure that we have consistent behaviour if and when this happens, it would be beneficial to have do_sysinstr fall back to do_undefinstr. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Suzuki Poulose Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 158f323b9868b59967ad96957c4ca388161be321 Author: Eric Dumazet Date: Fri Jan 27 07:11:27 2017 -0800 net: adjust skb->truesize in pskb_expand_head() Slava Shwartsman reported a warning in skb_try_coalesce(), when we detect skb->truesize is completely wrong. In his case, issue came from IPv6 reassembly coping with malicious datagrams, that forced various pskb_may_pull() to reallocate a bigger skb->head than the one allocated by NIC driver before entering GRO layer. Current code does not change skb->truesize, leaving this burden to callers if they care enough. Blindly changing skb->truesize in pskb_expand_head() is not easy, as some producers might track skb->truesize, for example in xmit path for back pressure feedback (sk->sk_wmem_alloc) We can detect the cases where it should be safe to change skb->truesize : 1) skb is not attached to a socket. 2) If it is attached to a socket, destructor is sock_edemux() My audit gave only two callers doing their own skb->truesize manipulation. I had to remove skb parameter in sock_edemux macro when CONFIG_INET is not set to avoid a compile error. Signed-off-by: Eric Dumazet Reported-by: Slava Shwartsman Signed-off-by: David S. Miller include/net/sock.h | 2 +- net/core/skbuff.c | 14 +++++++++++--- net/netlink/af_netlink.c | 8 +++----- net/wireless/util.c | 2 -- 4 files changed, 15 insertions(+), 11 deletions(-) commit b41fd8fdef5ad4a1dbd2a159714bd4358bb49625 Merge: 2b368b2 9b41080 Author: David S. Miller Date: Fri Jan 27 11:59:32 2017 -0500 Merge branch 'sfc-encapsulated-filters' Edward Cree says: ==================== sfc: encapsulated filters This series adds support for setting up filters for encapsulated traffic on SFC 8000-series adapters, which recognise VXLAN, GENEVE and NVGRE packets by parsing packet headers. (VXLAN and GENEVE will only be recognised if the driver on the primary PF has notified the firmware of relevant UDP ports, which this driver does not yet do.) While the driver currently has no way of using these filters for flow steering, it is nonetheless necessary to insert catch-all (aka 'default') filters to direct this traffic, similar to the existing unencapsulated uni- and multi-cast catch-all filters, as otherwise the traffic will be dropped by the NIC - implementation details of the hardware filtering mean that the traffic will not get matched on outer MAC address to unencapsulated catch- all filters. (Yes, this is a mess.) Although this is, therefore, fixing a bug in the existing driver, it's a bug which has existed since 8000 series support was added, and the fix involves quite a big patch with an 'adding features' flavour to it, hence why this is for net-next rather than net and stable. v2: move netif_cond_dbg into netdevice.h and its own patch ==================== Signed-off-by: David S. Miller commit 9b41080125176841ece49b661aa133afffe99381 Author: Edward Cree Date: Fri Jan 27 15:02:52 2017 +0000 sfc: insert catch-all filters for encapsulated traffic 8000 series adapters support filtering VXLAN, NVGRE and GENEVE traffic based on inner fields, and when the NIC recognises such traffic, it does not match unencapsulated traffic filters any more. So add catch- all filters for encapsulated traffic on supporting platforms. Although recognition of VXLAN and GENEVE is based on UDP ports, and thus will not occur until the driver (on the primary PF) notifies the firmware of UDP ports to use, NVGRE will always be recognised, hence without this patch 8000 series adapters will drop all NVGRE traffic. Partly based on patches by Jon Cooper . Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 554 ++++++++++++++++++++++++++++---------- drivers/net/ethernet/sfc/filter.h | 41 ++- 2 files changed, 449 insertions(+), 146 deletions(-) commit 34e7aefb2a15f3180635e5730f01f5ce4a0734ec Author: Jon Cooper Date: Fri Jan 27 15:02:39 2017 +0000 sfc: refactor debug-or-warnings printks Rationalise several debug-or-warnings printks using netif_cond_dbg to make output more consistent. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 8 ++++---- drivers/net/ethernet/sfc/mcdi.c | 19 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) commit f617f27653c4d9f5b2aa43d567ac0405df889944 Author: Edward Cree Date: Fri Jan 27 15:02:26 2017 +0000 net: implement netif_cond_dbg macro For reporting things that may or may not be serious, depending on some condition, netif_cond_dbg will check the condition and print the report at either dbg (if the condition is true) or the specified level. Suggested-by: Jon Cooper Signed-off-by: Edward Cree Signed-off-by: David S. Miller include/linux/netdevice.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2d3d4ec01641148636f8961ccd64308dbf2072f4 Author: Jon Cooper Date: Fri Jan 27 15:02:11 2017 +0000 sfc: fixes to filter restore handling If the NIC is switched from full-featured to low-latency, encapsulated filters are no longer available, and this causes errors. This patch removes those filters from the filter table on restore. Also, if filters which are removed by the above, or which we fail to insert when restoring filters, were UC, MC or broadcast default filters, invalidate the corresponding vlan->default_filters entry. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 42 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit f2591b993ec95fd8d67c68187f07f30c9d79b38c Author: Bhumika Goyal Date: Mon Jan 9 22:04:50 2017 +0530 soc: dove: constify reset_control_ops structures Declare reset_control_ops as const as they are only stored in the ops field of a reset_controller_dev structure. This field is of type const struct reset_control_ops *, so reset_control_ops structures having this property can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct reset_control_ops i@p={...}; @ok1@ identifier r1.i; position p; struct reset_controller_dev x; @@ x.ops=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct reset_control_ops i; File size before: drivers/soc/dove/pmu.o text data bss dec hex filename 2447 112 16 2575 a0f drivers/soc/dove/pmu.o File size after: drivers/soc/dove/pmu.o text data bss dec hex filename 2479 80 16 2575 a0f drivers/soc/dove/pmu.o Signed-off-by: Bhumika Goyal Acked-by: Russell King Signed-off-by: Gregory CLEMENT drivers/soc/dove/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5de267b299829b99990305ad0440753bb8aa3de2 Author: Arnd Bergmann Date: Wed Jan 11 14:41:40 2017 +0100 ARM: mv78xx0: fix possible PCI buffer overflow gcc-7.0 reports a potential array overflow: arch/arm/mach-mv78xx0/pcie.c: In function 'mv78xx0_pcie_preinit': arch/arm/mach-mv78xx0/pcie.c:81:4: error: output may be truncated before the last format character [-Werror=format-truncation=] I haven't checked if this can actually happen, but making the array one 32-bit word longer addresses the warning and makes it completely safe. Signed-off-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/mach-mv78xx0/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c58736c160c1346bedda77d739f0f85710fa00cf Author: Patrice Chotard Date: Fri Jan 27 17:34:03 2017 +0100 ARM: dts: STiH407-family: Add missing pwm irq Add the missing interrupt node to properly probe the pwm device. This fix following error log : [ 0.208119] sti-pwm 9510000.pwm: Failed to obtain IRQ [ 0.222352] pwm-regulator pwm-regulator: Failed to get PWM: -517 Signed-off-by: Lionel Debieve Signed-aff-by: Patrice CHOTARD arch/arm/boot/dts/stih407-family.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2b368b234ec43abbf46f2983478c438d36e58134 Author: Tobias Klauser Date: Fri Jan 27 15:26:32 2017 +0100 net: wan: Remove unused stats member from struct frad_local The stats member of struct frad_locl is used neither by the dlci nor the sdla driver, so it might as well be removed. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller include/linux/if_frad.h | 2 -- 1 file changed, 2 deletions(-) commit 0fc9ae107669760c2a8658cb5b5876dbe525e08d Author: Rafał Miłecki Date: Fri Jan 27 14:07:01 2017 +0100 net: phy: broadcom: add support for BCM54210E It's Broadcom PHY simply described as single-port RGMII 10/100/1000BASE-T PHY. It requires disabling delay skew and GTXCLK bits. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 34 +++++++++++++++++++++++++++++++++- include/linux/brcmphy.h | 1 + 2 files changed, 34 insertions(+), 1 deletion(-) commit a00ebc464d210dbb293212a7552e47d8ed645d66 Merge: 45ce0fd 1e9bbb9 Author: David S. Miller Date: Fri Jan 27 11:19:29 2017 -0500 Merge tag 'linux-can-next-for-4.11-20170124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2017-01-24 this is a pull request of 4 patches for net-next/master. The first patch by Oliver Hartkopp adds a netlink API to configure the interface termination of a CAN card. The next two patches are by me and add a netlink API to query and configure CAN interfaces that only support fixed bitrates. The last patch by Colin Ian King simplifies the return path in the softing_cs driver's softingcs_probe() function. ==================== Signed-off-by: David S. Miller commit 63d24f8846b0095cbbd94746b6fc8a6acbda8f5e Author: Xiangliang Yu Date: Wed Jan 18 12:50:14 2017 +0800 drm/amdgpu/vi: fix mailbox irq mistake For virt, freed mailbox irq should be handled in hw fini, not hw init. Correct it. Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e941ea997d3388dd6d6a8712453c13caacc7a966 Author: Xiangliang Yu Date: Wed Jan 18 12:47:55 2017 +0800 drm/amdgpu: fix reboot failure issue for virtualization Reboot process will call HW fini functions of IP blocks. For virt, need to send event three before hw fini and send event four after hw fini. Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9a9993590d03794a56365d6025cf694fd1a8f6da Author: Tom St Denis Date: Wed Jan 18 13:01:25 2017 -0500 drm/amd/amdgpu: Add PCI info to gca_config debugfs So we can determine which device the entry is before connecting a display. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bc1e59b24d55320a8729eaf68b727ff65dfb521d Author: Monk Liu Date: Wed Jan 18 10:38:06 2017 +0800 drm/amdgpu:insert switch buffer only for VM submit for non-VM submit which is from kernel side, no need to switch buffer at all. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79bbbf8bfe646d63a52dcb1f8272a27adbcae097 Author: Monk Liu Date: Wed Jan 18 10:37:34 2017 +0800 drm/amdgpu:Preamble is forbid to be ignored in SRIOV SR-IOV requires the preamble. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 714fbf80392248170c2e67cd77062e2cab0d8a82 Author: Monk Liu Date: Wed Jan 18 10:31:18 2017 +0800 drm/amdgpu:set cond_exec polling value to 1 in ring_init no need to set it per ib_schedule(), hw won't override this polling address. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) commit c2ce92fc7912d0eb2f4ae5a40977fa8a0378e796 Author: Monk Liu Date: Tue Jan 17 10:56:16 2017 +0800 drm/amdgpu:in cntx_ctrl we need insert meta-init for CE/DE(V2) to support SRIOV preemption. v2: fix emit_frame_size Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7e6bf80f739bc2becb71964f27ce60e207d10aca Author: Monk Liu Date: Tue Jan 17 10:55:42 2017 +0800 drm/amdgpu:introduce new flag to identify VM domain for cntx_ctrl To determine whether the context uses GPUVM or not. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +++ 2 files changed, 4 insertions(+) commit acad2b2a7b7040b3e9e3a3239f137b7c67dea37b Author: Monk Liu Date: Tue Jan 17 10:52:58 2017 +0800 drm/amdgpu:implement CE/DE meta-init routines those package need to insert into ring buffer for SRIOV case. they are used to let CP do preemption. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 0a8e147369d558287e46b21a12b15e883abc2075 Author: Monk Liu Date: Tue Jan 17 10:52:33 2017 +0800 drm/amdgpu:implement ring_write_multiple Write multiple dwords to the ring. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ae65a26dd387fec18dd1645fbb4b901b379cd6f5 Author: Monk Liu Date: Thu Jan 12 15:32:44 2017 +0800 drm/amdgpu:add META_DATA struct for CSA/SRIOV v2 META-DATA is used in GFX cmd submit, we have two format suit for META-DATA-init, one is legacy and another is for chained-ib preempt, which is used in vulkan UMD. v2: drop use CP version number to judge if chain-ib supports or not, we wait for it mature Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 ++ drivers/gpu/drm/amd/amdgpu/vi.h | 112 +++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) commit a1970a6382b8781380de9494b2e256aa85814b79 Author: Rex Zhu Date: Thu Jan 12 21:50:18 2017 +0800 drm/amdgpu: refine ci uvd dpm code. Fix up the powergating logic. Signed-off-by: Rex Zhu Ack-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 50261151a13176a99ee6117dbbb2e557fd0b608b Author: Nils Wallménius Date: Mon Jan 16 21:56:48 2017 +0100 drm/amdgpu: simplify allocation of scratch regs The scratch regs are sequential so there's no need to keep them in an array, we can just return the index of the first free register + the base register. Also change the array of bools for keeping track of the free regs to a bitfield. Reviewed-by: Christian König Signed-off-by: Nils Wallménius Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 21 +++++++-------------- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 7 +------ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 7 +------ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 +------ 5 files changed, 11 insertions(+), 34 deletions(-) commit cb341a319f7e66f879d69af929c3dadfc1a8f31e Author: Andrey Grodzovsky Date: Mon Dec 5 15:15:33 2016 -0500 drm/amdgpu: Refactor flip into prepare submit and submit. (v3) Make pflip atomic friendly. Split the fuinction into whatever can fail part and the actual flip submit part. Call the pre-submit function before atomic states are swapped so in case of error we can fail the IOCTL. v2: Update due to target_vblank code change. Fix identetation. Change return type for amdgpu_crtc_submit_flip to void v3: agd: fix formatting Signed-off-by: Andrey Grodzovsky Reviewed-by Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 136 ++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 15 +++ 2 files changed, 123 insertions(+), 28 deletions(-) commit 3caf861e987a3409deb0a6e0daded2429d4f4750 Author: Andrey Grodzovsky Date: Sun Dec 18 16:16:53 2016 -0500 drm/amdgpu: Switch error code when bo pin fails. (v3) Switching to -ENOMEM resolves a hang in case the driver uses this function in atomic code path. v2: Update commit message. v3: Remove forcing -EINVAL in case of amdgpu_bo_pin fail since there is no apparent reason for not just passing through the the return value. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Reviewed-by Harry Wentland Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 - 1 file changed, 1 deletion(-) commit f10b478d9e5f70f62d6a7b964922ab91299279eb Author: Julia Lawall Date: Tue Jan 10 06:52:59 2017 +0100 drm/amdgpu/gfx8: fix bugon.cocci warnings Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Reviewed-by: Christian König Reviewd-by: Xiangliang.Yu CC: Xiangliang Yu Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 034041f33498ba57d9fd1d3e4aea7e40ea4988da Author: Alex Deucher Date: Wed Jan 11 16:11:48 2017 -0500 drm/amdgpu: use the num_rings variable for checking vce rings Difference families may have different numbers of rings. Use the variable rather than a hardcoded number. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1543f58cbc7f62c4ea0cca57bbb4a95dc752264 Author: Nicolai Hähnle Date: Tue Jan 10 20:36:56 2017 +0100 drm/amd/amdgpu: fix locking in bo creation error path Unlock the resv lock only if we were the ones to lock it in the first place. Signed-off-by: Nicolai Hähnle Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36ea83d1512008ab6631c54971e8de8cf2f0a7b4 Author: Nicolai Hähnle Date: Tue Jan 10 19:06:00 2017 +0100 drm/amd/amdgpu: lock reservation object while creating shadow bo ttm_bo_init checks that the reservation object is locked. This is the caller's responsibility when resv != NULL. Otherwise, the inline reservation object of the newly allocated buffer is used and must explicitly be locked. Uninterruptible w/w locks without an acquire context are always successful. v2: use ww_mutex_lock Signed-off-by: Nicolai Hähnle Reviewed-by: Edward O'Callaghan (v1) Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 54170226a6c9a2122620a3c5c432a76e84026794 Author: Huang Rui Date: Wed Jan 11 09:55:34 2017 +0800 drm/amdgpu: fix typo of CGTS Fixes: 9e8590861e9 ('drm/amdgpu: add parse clock gating state') Reported-by: Tom StDenis Signed-off-by: Huang Rui Reviewed-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb140b293b7142de2e215d3ab6c842ac73ceebeb Author: Xiangliang Yu Date: Sat Dec 17 22:48:57 2016 +0800 drm/amdgpu: do not reset gpu for virtualization Current amdgpu reset process only works on bare-metal and for SRIOV many inside it need re-work to adapt to vf device. This is a temporary workaround to skip gpu reset. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 06465d8ec91a884ee5373f242a0aa63ae4b7658b Author: Xiangliang Yu Date: Wed Jan 11 17:18:40 2017 +0800 drm/amdgpu/virt: enable virtual display Virtual display is default setting for virtualization, enable it. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 99581cc57387a1a25f44e338e46338c58138fedc Author: Xiangliang Yu Date: Thu Jan 12 15:22:18 2017 +0800 drm/amdgpu/vi: add support virtualization Call VI virtualization functions if device is Vf. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 3149d9da12263b696d6123f90e44968ebde2115d Author: Xiangliang Yu Date: Thu Jan 12 15:14:36 2017 +0800 drm/amdgpu: request/release full gpu access if device is vf For gpu vf device, first need to request full gpu access before accessing gpu registers, and release full gpu access after the access is done. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit ab71ac56f6d832443fcd9f884460263b2dc3ff6b Author: Xiangliang Yu Date: Thu Jan 12 15:00:41 2017 +0800 drm/amdgpu/virt: implement VI virt operation interfaces VI has asic specific virt support, which including mailbox and golden registers init. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Signed-off-by: shaoyunl Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 + drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 592 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mxgpu_vi.h | 55 +++ 4 files changed, 651 insertions(+), 1 deletion(-) commit 1e9f1392795e63f20d109b2ee6d44a7ffc99b7ab Author: Xiangliang Yu Date: Thu Jan 12 14:53:08 2017 +0800 drm/amdgpu/virt: add high level interfaces for virt Add high level interfaces that is not relate to specific asic. So asic files just need to implement the interfaces to support virtualization. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 67 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 23 ++++++++--- 2 files changed, 85 insertions(+), 5 deletions(-) commit bc992ba5a3c19c79873fab46f17dcb20a9b84a85 Author: Xiangliang Yu Date: Thu Jan 12 14:29:34 2017 +0800 drm/amdgpu/virt: use kiq to access registers (v2) For virtualization, it is must for driver to use KIQ to access registers when it is out of GPU full access mode. v2: agd: rebase Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 58 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 +++ drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++ 4 files changed, 75 insertions(+) commit 5ec9f06e105dabaaa6b7b9f3b230ddff39b6837f Author: Xiangliang Yu Date: Thu Jan 12 14:11:53 2017 +0800 drm/amdgpu/virt: add runtime flag Add new flag to define gpu runtime that is out of full gpu access. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 ++++ 1 file changed, 4 insertions(+) commit 880e87e380985480cc5bee5f389f912554064930 Author: Xiangliang Yu Date: Thu Jan 12 13:57:48 2017 +0800 drm/amdgpu/gfx8: implement emit_rreg/wreg function Implement emit_rreg/wreg function for kiq ring. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit b6091c1217e16606ee231c053cde000d8fa1f674 Author: Xiangliang Yu Date: Tue Jan 10 12:53:52 2017 +0800 drm/amdgpu/ring: add two interfaces to support r/w registers with kiq During virtual runtime, need to send command to kiq ring to read/write GPU registers. Add two interface to support the two actions. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Linu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ 2 files changed, 4 insertions(+) commit 2493664f0594d4140a5025de8e419ca2c16ccee9 Author: Monk Liu Date: Mon Jan 9 15:54:32 2017 +0800 drm/amdgpu:invoke CSA functions (v2) Make sure the CSA is mapped. v2: agd: rebase. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++++++ 3 files changed, 40 insertions(+) commit 4e4bbe7343a6d8269342189329b865355fe1bb51 Author: Monk Liu Date: Mon Jan 9 15:21:13 2017 +0800 drm/amdgpu:add new file for SRIOV for SRIOV usage, CSA is only used per device and each VM will map on it. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 93 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 ++ 3 files changed, 98 insertions(+), 1 deletion(-) commit bd7de27d81a73c91fad9a3358f56ecf7f0dc8ede Author: Monk Liu Date: Mon Jan 9 15:23:17 2017 +0800 drm/amdgpu:new field members for SRIOV and implement CSA functions in this file Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 2 files changed, 8 insertions(+) commit 3e19e69ab01f53d68fc85e2fedcdd93c74994415 Author: Nicolai Hähnle Date: Mon Dec 12 11:53:11 2016 +0100 drm/amd/amdgpu: add check that shadow page tables are GPU-accessible Skip amdgpu_gem_va_update_vm otherwise. Also clean up the check for the non-shadow page tables using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory -> amdgpu_ttm_bind -> amdgpu_gtt_mgr_alloc v2: actually check bo->shadow instead of just checking bo twice Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d1144b84fc15755afcfefe5ced1748acf6c5a7c2 Author: Nicolai Hähnle Date: Mon Dec 12 12:09:12 2016 +0100 drm/amd/amdgpu: add check that shadow page directory is GPU-accessible Skip amdgpu_gem_va_update_vm when shadow the page directory is swapped out. Clean up the check for non-shadow BOs as well using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory -> amdgpu_ttm_bind -> amdgpu_gtt_mgr_alloc Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b99f31030a50f6bb0d1e5e67a966ec1b0f5942a8 Author: Nicolai Hähnle Date: Thu Dec 15 17:04:51 2016 +0100 drm/amd/amdgpu: add amdgpu_bo_gpu_accessible helper function Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 661a7606c97b6e6a73f553b0a6b60f553d5afa77 Author: Nicolai Hähnle Date: Thu Dec 15 17:26:42 2016 +0100 drm/amd/amdgpu: move eviction counting to amdgpu_bo_move_notify This catches evictions of shadow page tables from the GART. Since shadow page tables are always stored in system memory, amdgpu_bo_move is never called for them. This fixes a crash during command submission that occurs when only a shadow page table and no other BOs were evicted since the last submission. Fixes: 1baa439fb2f4e586 ("drm/amdgpu: allocate shadow for pd/pt bo V2") Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 66257db7a5276d7f1aff8850388a0eb675ffa2e1 Author: Nicolai Hähnle Date: Thu Dec 15 17:23:49 2016 +0100 drm/ttm: add evict parameter to ttm_bo_driver::move_notify Ensure that the driver can listen to evictions even when they don't take the path through ttm_bo_driver::move. This is crucial for amdgpu, which relies on an eviction counter to skip re-binding page tables when possible. Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 ++- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 ++- drivers/gpu/drm/qxl/qxl_ttm.c | 1 + drivers/gpu/drm/radeon/radeon_object.c | 1 + drivers/gpu/drm/radeon/radeon_object.h | 1 + drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++---- drivers/gpu/drm/virtio/virtgpu_ttm.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 1 + include/drm/ttm/ttm_bo_driver.h | 10 ++++++++-- 10 files changed, 22 insertions(+), 8 deletions(-) commit 714b1f5371fc4b4d5f49dd1715a595c17871edac Author: Rex Zhu Date: Tue Jan 10 19:54:25 2017 +0800 drm/amdgpu: refine vce3.0 initialize. 1. disable vce cg when vce hw initialize. 2. initizlize vce clock to 10KHz fo dgpu, so no need to set bypass clock to vce. Change-Id: I934c2c4820cc95c1bfa2fa41ff0f40a0d3cd1c40 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 21 ++++----------------- drivers/gpu/drm/amd/amdgpu/vi.c | 32 +++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 18 deletions(-) commit 570272d2296ce42b7d0b4c5afa5b668100930507 Author: Rex Zhu Date: Fri Jan 6 13:32:49 2017 +0800 drm/amdgpu: extend profiling mode. in profiling mode, powerplay will fix power state as stable as possible.and disable gfx cg and LBPW feature. profile_standard: as a prerequisite, ensure power and thermal sustainable, set clocks ratio as close to the highest clock ratio as possible. profile_min_sclk: fix mclk as profile_normal, set lowest sclk profile_min_mclk: fix sclk as profile_normal, set lowest mclk profile_peak: set highest sclk and mclk, power and thermal not sustainable profile_exit: exit profile mode. enable gfx cg/lbpw feature. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 38 ++++--- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 5 +- drivers/gpu/drm/amd/include/amd_shared.h | 6 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 127 ++++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 6 files changed, 154 insertions(+), 26 deletions(-) commit 7f61bed0c45df0b58af589b0569ce3349cbc53cb Author: Rex Zhu Date: Wed Dec 21 20:40:53 2016 +0800 drm/amd/powerplay: refine DIDT feature in Powerplay. Updating SQ DIDT settings and block mask so SQ uses PCC on Polaris11. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 + .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 224 ++++++++++++++++----- 2 files changed, 179 insertions(+), 49 deletions(-) commit 7ef600e8084a8160be6d72f3d4108cdd057dc6db Author: Rex Zhu Date: Wed Dec 21 20:40:03 2016 +0800 drm/amd/powerplay: add new smu message. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h | 3 +++ 1 file changed, 3 insertions(+) commit e31e8a226ac93d3ef89b97715bb478d354f13b39 Author: Rex Zhu Date: Wed Dec 21 20:37:49 2016 +0800 drm/amd/powerplay: Configuring DIDT blocks only SQ enabled on Polaris11. following firmware's request. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 8e7afd34fd5fca66f59c959e0d97e57ad2c0b3ef Author: Rex Zhu Date: Mon Jan 9 15:18:01 2017 +0800 drm/amdgpu: fix bug return invalid value to sysfs. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c79b55618a9c9fe2b8cd30ab2c9486d3ca3f1ff3 Author: Huang Rui Date: Thu Jan 5 21:27:31 2017 +0800 drm/amdgpu: add get clockgating_state method for vce v3 Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 40 +++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) commit c8781f56c85997a42e8ab3254f37c0c301f6b490 Author: Huang Rui Date: Thu Jan 5 21:07:02 2017 +0800 drm/amdgpu: add get clockgating_state method for uvd v5&v6 Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 33 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 63 insertions(+), 4 deletions(-) commit abd2c2fe1212698ed326d5746e487abecb2ed325 Author: Huang Rui Date: Thu Jan 5 20:48:06 2017 +0800 drm/amdgpu: add get clockgating_state method for vi common Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 41c360f6a6ccd477481a3309608e9b3388bdd83d Author: Huang Rui Date: Thu Jan 5 20:18:43 2017 +0800 drm/amdgpu: add get clockgating_state method for sdma v3 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8bcab092f8635002fa8fca0e14deb9ff46bdeeb8 Author: Huang Rui Date: Thu Jan 5 20:03:27 2017 +0800 drm/amdgpu: add get clockgating_state method for gmc v8 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ebd843d6ee915394094777c72f01fe55356c8eae Author: Huang Rui Date: Thu Jan 5 18:48:44 2017 +0800 drm/amdgpu: add get clockgating_state method for gfx v8 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit a8503b15ab770967c13bc61ae8a2216165c9760a Author: Huang Rui Date: Thu Jan 5 19:17:13 2017 +0800 drm/amdgpu: add parse clock gating state Suggested-by: Felix Kuehling Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Cc: William Lewis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 33 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 6 ++++++ 2 files changed, 39 insertions(+) commit 6cb2d4e4f3b1f0857c720ab8c41a764f18995377 Author: Huang Rui Date: Thu Jan 5 18:44:41 2017 +0800 drm/amdgpu: introduce an interface to get clock gating status dynamically Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++++ drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ 4 files changed, 19 insertions(+) commit c8394f38fa2362385fd34f7034a2276b458c640e Author: Xiangliang Yu Date: Mon Jan 9 11:53:14 2017 +0800 drm/amdgpu: remove detect_hw_virtualization interface Call detection function driectly, so remove the interface. V2: ci and si also need to call the detect function. Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/cik.c | 3 ++- drivers/gpu/drm/amd/amdgpu/si.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) commit 91caa081378c612030bfa9762fd7d88036508238 Author: Xiangliang Yu Date: Mon Jan 9 11:49:27 2017 +0800 drm/amdgpu/vi: move virtualization detection forward Move the detection forward into vi_set_ip_blocks function, then add ip blocks virtualization need if device is VF. V2: add ip blocks according to asic type. Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 5a5099cbf4d8e68bde0554cf6f61bd4adf9fa243 Author: Xiangliang Yu Date: Mon Jan 9 18:06:57 2017 -0500 drm/amdgpu/virt: rename fieldes of virtualization structure Use acronym to rename fields to make easy to spell out. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/amdgpu/si.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) commit 4e638ae9c1e7a2b85155f2dd91c8105ce109ea7e Author: Xiangliang Yu Date: Fri Dec 23 15:00:01 2016 +0800 drm/amdgpu/gfx8: add support kernel interface queue(KIQ) KIQ is queue-memory based initialization method: setup KIQ queue firstly, then send command to KIQ to setup other queues, without accessing registers. For virtualization, need KIQ to access virtual function registers when running on guest mode. V2: use amdgpu_bo_create/free_kernel to allocate BO. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 607 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/vid.h | 2 + 3 files changed, 620 insertions(+), 2 deletions(-) commit b64a18c502fedab9e7b8b1b557909994637972c5 Author: Amber Lin Date: Wed Jan 4 08:06:58 2017 -0500 drm/amdgpu: PCI I/O bar can be disabled PCI I/O bar can be disabled in VBIOS to save the resource. It is often disabled in large aperture VBIOS. Don't call it an error. Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5b580e1193e057a7ee82eae376cbb8c5c3c2518 Author: Rex Zhu Date: Thu Dec 29 15:30:38 2016 +0800 drm/amd/powerplay: change function name to make code more readable Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) commit 63b55943b3e1536da09c7d46396fd1f9a0ee8058 Author: Rex Zhu Date: Thu Dec 29 15:23:44 2016 +0800 drm/amd/powerplay: refine smumgr code 1. delete asic_smum_init functions, export asic private functions to smumgr directly, make code more readable. 2. create asic private data in asic_init_func. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 13 ++++----- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 22 +++++--------- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.h | 4 --- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 34 +++++++++------------- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 28 +++++++----------- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 25 +++++----------- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 11 +++---- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 28 ++++++------------ 8 files changed, 61 insertions(+), 104 deletions(-) commit a0aa70463e49ed9069c402d7907bba892dd8ef7f Author: Rex Zhu Date: Wed Dec 28 20:15:45 2016 +0800 drm/amd/powerplay: fix memory leak in smu7_hwmgr add pp_smu7_thermal_fini function to free related data when smu7_hwmgr_fini. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 15 --------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 21 ++++++++++++++++++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 6 ++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.h | 1 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - 5 files changed, 25 insertions(+), 19 deletions(-) commit cd576e63d222c1d6307cec7cb185a64db2985ee8 Author: Rex Zhu Date: Wed Dec 28 20:14:44 2016 +0800 drm/amd/powerplay: fix memory leak in cz_hwmgr.c Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4c283acf69cf85f4e72c380b055a8fdba01d272e Author: Rex Zhu Date: Mon Jan 2 18:37:36 2017 +0800 drm/amd/powerplay: not free hwmgr/smumgr in asic private functions. struct smumgr/hwmgr will be freed on amd_powerplay_destory and if we free them in one of asic private functions, other private date may not be freed. for example: power state and power table in hwmgr. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) commit 6f4dc24a88a015ca31c8dbb79f9ad3bcc34f386e Author: Rex Zhu Date: Wed Dec 28 19:50:58 2016 +0800 drm/amd/powerplay: not use module parameter in powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) commit 1c86380248467b99a0d9a9f7fdd0834fa0c6c5aa Author: Rex Zhu Date: Wed Dec 28 19:43:23 2016 +0800 drm/amd/powerplay: refine powerplay interface. v2: add pp_check function to check pp_instance valid. 1. powerplay export two new interface to amdgpu, amd_powerplay_create/amd_powerplay_destroy. 2. create pp_instance/smumgr/hwmgr/eventmgr in early init, destroy them when lata_fini. 3. in sw_init, create and init asic private smumgr data, and free them when sw_fini. 4. in hw_init, create and init asic private hwmgr data, and free them when hw_fini. 5. export powerplay state: PP_DPM_DISABLED. when user disabled powerplay or hwmgr/eventmgr init failed, powerplay return this state to amdgpu. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 108 ++-- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 709 +++++++++++----------- drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 9 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 114 +++- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 13 +- drivers/gpu/drm/amd/powerplay/inc/eventmgr.h | 3 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 13 +- drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 5 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 6 +- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 17 +- 10 files changed, 518 insertions(+), 479 deletions(-) commit ae6a58e4090365f0ed6b24e0a67b8a08f6b55856 Author: Rex Zhu Date: Wed Dec 21 20:32:38 2016 +0800 drm/amdgpu: use same enter/exit safe mode for gfx_8. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 95 +---------------------------------- 1 file changed, 1 insertion(+), 94 deletions(-) commit 3bd58979648fd105258934fb9f0fea1d73341d08 Author: Rex Zhu Date: Fri Dec 23 15:24:37 2016 +0800 drm/amd/powerplay: add profiling mode in dpm level In some case, App need to run under max stable clock. so export profiling mode: GFX CG was disabled. and user can select the max stable clock of the device. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 4 ++-- drivers/gpu/drm/amd/include/amd_shared.h | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- 5 files changed, 24 insertions(+), 4 deletions(-) commit 9d273495e691f9473db6b2ae2da41515d53a70e9 Author: Rex Zhu Date: Wed Dec 28 11:09:00 2016 +0800 drm/amdgpu: delete dead definitions of dpm_ip_funcs Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 9 --------- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 9 --------- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 8 -------- 3 files changed, 26 deletions(-) commit b9bc58140e43ae0ff69a5a52d31e397cb7dee4cd Author: Rex Zhu Date: Tue Dec 27 15:51:45 2016 +0800 drm/amdgpu: delete dead module parameter:amdgpu_powerplay. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ---- 2 files changed, 5 deletions(-) commit 23c8ea921d286449a214732738a42f115870f44b Author: Rex Zhu Date: Thu Dec 15 17:39:04 2016 +0800 drm/amd/powerplay: fix issue can't load another smu firmware. need to release failed smu firmware before load another firmware. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + 1 file changed, 1 insertion(+) commit bcb5487bceb30e6c544556dc0931e04040dacf90 Author: Rex Zhu Date: Mon Dec 19 13:10:58 2016 +0800 drm/amd/powerplay: refine code in cz_smumgr.c cz_smu_init will be called in sw_init. so it should not touch other blocks's firmware as they were not ready. Signed-off-by: Rex Zhu Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 136 ++++++++++++----------- 1 file changed, 70 insertions(+), 66 deletions(-) commit 0d12570aaf5ddf5535569ae5c0ad46bb0aed4b01 Author: Rex Zhu Date: Fri Dec 23 16:08:12 2016 +0800 drm/amd/powerplay: fix bug dpm level unexpectly be reset to auto. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 5 ++++- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit e5d03ac2b8bd6d738c8e1ed6ea9a6a164ce86d3c Author: Rex Zhu Date: Fri Dec 23 14:39:41 2016 +0800 drm/amd/powerplay: Unify dpm level defines Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 19 ++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 39 +++++++++-------------- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 12 +++---- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 +++--- drivers/gpu/drm/amd/include/amd_shared.h | 7 ++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 7 ---- 7 files changed, 45 insertions(+), 59 deletions(-) commit db7da7aa3a8c6a25964f2216fed35f4bf11ceac1 Author: Rex Zhu Date: Fri Dec 23 14:07:25 2016 +0800 drm/amd/powerplay: delete dpm code for Cz/St. The powerplay implementation has been the default for a while now. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 8 +- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 2320 ------------------------- drivers/gpu/drm/amd/amdgpu/cz_dpm.h | 239 --- drivers/gpu/drm/amd/amdgpu/cz_smc.c | 995 ----------- drivers/gpu/drm/amd/amdgpu/cz_smumgr.h | 94 - 6 files changed, 2 insertions(+), 3657 deletions(-) commit 634a24d8af026d7e7df9b8c3a5efe3802de1299c Author: Huang Rui Date: Mon Dec 26 15:09:33 2016 +0800 drm/amd/powerplay: update all printk to pr_* on smumgr Signed-off-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 28 +++++++++++----------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 8 +++---- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 8 +++---- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 4 ++-- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 8 +++---- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 12 +++++----- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 14 +++++------ .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- 10 files changed, 45 insertions(+), 45 deletions(-) commit b5c11b8e37aa032773886c10bfc67179d7862070 Author: Huang Rui Date: Mon Dec 26 15:00:22 2016 +0800 drm/amd/powerplay: update all printk to pr_* on hwmgr Signed-off-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 26 +++++++++++----------- .../gpu/drm/amd/powerplay/hwmgr/functiontables.c | 14 ++++++------ drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 8 +++---- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 6 ++--- .../amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 26 +++++++++++----------- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 +- 7 files changed, 43 insertions(+), 43 deletions(-) commit 19946cfd370b26c62f947ae72d593b4e9cfbc908 Author: Huang Rui Date: Mon Dec 26 15:11:34 2016 +0800 drm/amd/powerplay: update all printk to pr_* on eventmgr Signed-off-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fb829def63d5217baef112f9d5c0478016467c7 Author: Huang Rui Date: Mon Dec 26 14:24:05 2016 +0800 drm/amd/powerplay: refine print message for amd_powerplay Signed-off-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 7bd55429fdbd061306a7881b394aec991198ebcf Author: Huang Rui Date: Mon Dec 26 14:05:30 2016 +0800 drm/amd/powerplay: reshuffle headers to make pr_fmt macro before This patch reshuffles headers to define pr_fmt before . It can avoid pr_fmt redefine warnning from linux/xxx.h like below: CC [M] /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.o /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.c:24:0: warning: "pr_fmt" redefined #define pr_fmt(fmt) "[powerplay] " fmt ^ In file included from include/linux/kernel.h:13:0, from include/linux/list.h:8, from include/linux/agp_backend.h:33, Signed-off-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) commit 7739b1e7e153bb2fe8dfa94d1bd685500ed5a35f Author: Huang Rui Date: Fri Dec 23 10:45:07 2016 +0800 drm/amd/powerplay: add prefix for all powerplay pr_* prints Powerplay will use them instead of raw printk, and we can dynamic change the debug level with it. The prefix is like below: [ xxx.xxxxxx] amdgpu: [powerplay] ... Suggested-by: Grazvydas Ignotas Signed-off-by: Huang Rui Cc: Arindam Nath Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5c964221003d9a31ad56d4784773c91a291cba97 Author: Rex Zhu Date: Wed Dec 14 17:14:16 2016 +0800 drm/amdgpu: refine gfx_v8 pg code. move en/disable GFX CP/SMU_HS PG to function gfx_v8_0_set_powergating_state Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit f6f534e2af5b518f522b5df244accf945a6207ec Author: Rex Zhu Date: Thu Dec 8 10:58:15 2016 +0800 drm/amdgpu: add drm light sleep support for Vi v2: fix copy error. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e8a95b274d2f1a46dda12fa8e0cd2806df791701 Author: Rex Zhu Date: Wed Dec 21 20:30:58 2016 +0800 drm/amdgpu: add cgs interface for enter/exit rlc safe mode. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 7 +++++++ 2 files changed, 25 insertions(+) commit 919db4c199127781cef99b7ea0b74e3a9572ea32 Author: Ken Xue Date: Wed Dec 21 18:35:28 2016 +0800 drm/amdgpu: Refine the way to get atom bios There are several ways to check out a ATOMBIOS. In previous codes, try a new way to fetch out vbios/rom, until current vbios/rom is started with 0x55aa, then check if this vbios is ATOMBIOS. Now, try a new way to fetch out vbios until all flags of ATOMBIOS are verified. Signed-off-by: Ken Xue Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 179 ++++++++++++++++++------------- 1 file changed, 105 insertions(+), 74 deletions(-) commit 33503e9e5a5a0ba64ce1e5a4115ec32a6a026fe4 Author: Harry Wentland Date: Mon Nov 28 17:00:20 2016 -0500 drm/amd/amdgpu: Add DPHY_SCRAM_CNTL register defines This is required for DP HBR2 test pattern Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/dce/dce_10_0_d.h | 8 ++++++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_10_0_sh_mask.h | 4 ++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_0_d.h | 9 +++++++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_0_sh_mask.h | 4 ++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_2_d.h | 9 +++++++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_2_sh_mask.h | 4 ++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_8_0_d.h | 8 ++++++++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_8_0_sh_mask.h | 4 ++++ 8 files changed, 50 insertions(+) commit 8c27f5c1fda5e06405d9c3092735fbc5ec2b1dfa Author: Harry Wentland Date: Mon Nov 28 16:30:24 2016 -0500 drm/amd/amdgpu: Add HDMI_DATA_SCRAMBLE register definition This is required by HDMI 2.0 Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_0_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_2_sh_mask.h | 2 ++ 2 files changed, 4 insertions(+) commit 9e4bd4ca621d722b9783484cc323cd843d74027d Author: Huang Rui Date: Sat Dec 17 13:08:44 2016 +0800 drm/amdgpu: cleanup useless extern functions Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi_dpm.h | 4 ---- 1 file changed, 4 deletions(-) commit 35af17b0e5b5ed5fe73c3537a484c2dddad24e3b Author: Huang Rui Date: Sat Dec 17 13:07:30 2016 +0800 drm/amdgpu: cleanup useless smu_ucode_xfer_vi.h This header won't be used at amdgpu, it moved to powerplay. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/smu_ucode_xfer_vi.h | 101 ------------------------- 1 file changed, 101 deletions(-) commit 5c1104b9dc6bc65f71468c70408747034e5aa3f7 Author: Huang Rui Date: Mon Dec 19 15:15:35 2016 +0800 drm/amd/powerplay: fix request smc_sk firmware case This patch fixes firmware request error on polaris protection mode. Because we need load smc_sk instead of smc under security protection mode. Signed-off-by: Huang Rui Tested-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 ++++ 1 file changed, 4 insertions(+) commit e81f749452001cc4c08aca1b1e9c0f51f878042a Author: Huang Rui Date: Thu Dec 15 10:55:09 2016 +0800 drm/amd/powerplay: add request_firmware/release_firmware for smu7 Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 613e61a0252c54371c957d44767544a76f0da3a6 Author: Kees Cook Date: Fri Dec 16 17:02:32 2016 -0800 drm/amdgpu: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 84 +++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 10 +-- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 12 +++- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 58 +++++++-------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 22 +++--- 5 files changed, 96 insertions(+), 90 deletions(-) commit f7e9e9feb09f833d03f5fc3f378083b4664bd374 Author: Nils Wallménius Date: Wed Dec 14 21:52:45 2016 +0100 drm/amdgpu: Remove checking for atombios This is a left over from radeon, amdgpu doesn't support any non-atombios parts and amdgpu_device_init would bail if the check for atombios failed anyway. Reviewed-by: Edward O'Callaghan Signed-off-by: Nils Wallménius Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 10 ++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +------- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 ++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 3 +-- drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 6 ------ 7 files changed, 16 insertions(+), 34 deletions(-) commit e11666eb9b6bd55dfcfba7c2e029161932568335 Author: Tom St Denis Date: Wed Dec 14 10:52:00 2016 -0500 drm/amd/amdgpu: Widen mmio trace register address width Support wider address spaces, make it 32-bit so we don't have to revisit this for a while. Signed-off-by: Tom St Denis Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44879b6261530b14be339958a0f34805a8fa739a Author: Arindam Nath Date: Mon Dec 12 15:29:33 2016 +0530 drm/amd/amdgpu: get maximum and used UVD handles (v4) Change History -------------- v4: Changes suggested by Emil, Christian - return -ENODATA for asics with unlimited sessions v3: changes suggested by Christian - Add a check for UVD IP block using AMDGPU_HW_IP_UVD query type. - Add a check for asic_type to be less than CHIP_POLARIS10 since starting Polaris, we support unlimited UVD instances. - Add kerneldoc style comment for amdgpu_uvd_used_handles(). v2: as suggested by Christian - Add a new query AMDGPU_INFO_NUM_HANDLES - Create a helper function to return the number of currently used UVD handles. - Modify the logic to count the number of used UVD handles since handles can be freed in non-linear fashion. v1: - User might want to query the maximum number of UVD instances supported by firmware. In addition to that, if there are multiple applications using UVD handles at the same time, he might also want to query the currently used number of handles. For this we add two variables max_handles and used_handles inside drm_amdgpu_info_hw_ip. So now an application (or libdrm) can use AMDGPU_INFO IOCTL with AMDGPU_INFO_HW_IP_INFO query type to get these values. Signed-off-by: Arindam Nath Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + include/uapi/drm/amdgpu_drm.h | 9 +++++++++ 4 files changed, 56 insertions(+) commit 0ef5b226c472ca6048cce315b20d1d462f23b589 Author: Rex Zhu Date: Tue Jan 3 17:36:04 2017 -0500 drm/amd/powerplay: move vi smu firmware declares to powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 13 ------------- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) commit 78bbe771174cc70a4697b7d45558844defcefa32 Author: Tom St Denis Date: Fri Dec 16 08:08:27 2016 -0500 drm/amd/amdgpu: De-numberify golden SI registers Where possible replace numeric constants in the table with their register names. Compile tested + executed on a Tahiti. Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si.c | 975 ++++++++++++++++++++-------------------- 1 file changed, 492 insertions(+), 483 deletions(-) commit 167112bff8a753f0b1e5f649a3dfb48246bc6afe Author: Huang Rui Date: Wed Dec 14 16:26:54 2016 +0800 drm/amd/powerplay: add callbacks to move smc firmware request into sw_init phase Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 12 ++++++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 ++ 2 files changed, 14 insertions(+) commit f3a8ab7d55bc49b44baa229723e0b5b6ebacac4a Author: Jens Axboe Date: Fri Jan 27 09:08:23 2017 -0700 block: cleanup remaining manual checks for PREFLUSH|FUA Use op_is_flush() where applicable. Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq-sched.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bd6737f1ae92e2f1c6e8362efe96dbe7f18fa07d Author: Jens Axboe Date: Fri Jan 27 01:00:47 2017 -0700 blk-mq-sched: add flush insertion into blk_mq_sched_insert_request() Instead of letting the caller check this and handle the details of inserting a flush request, put the logic in the scheduler insertion function. This fixes direct flush insertion outside of the usual make_request_fn calls, like from dm via blk_insert_cloned_request(). Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-exec.c | 2 +- block/blk-flush.c | 2 +- block/blk-mq-sched.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sched.h | 45 ++++++---------------------------------- block/blk-mq-tag.c | 8 +++++++- block/blk-mq.c | 25 +++++++++++----------- block/blk-mq.h | 2 ++ 8 files changed, 89 insertions(+), 55 deletions(-) commit f73f44eb00cb136990cfb7d40e436c13d7669ec8 Author: Christoph Hellwig Date: Fri Jan 27 08:30:47 2017 -0700 block: add a op_is_flush helper This centralizes the checks for bios that needs to be go into the flush state machine. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 8 ++++---- block/blk-mq-sched.c | 5 ++--- block/blk-mq.c | 4 ++-- drivers/md/bcache/request.c | 2 +- drivers/md/dm-cache-target.c | 13 +++---------- drivers/md/dm-thin.c | 13 +++++-------- include/linux/blk_types.h | 9 +++++++++ 7 files changed, 26 insertions(+), 28 deletions(-) commit 45ce0fd19da9ca21635c367d504b9e4904621ff4 Author: Felix Jia Date: Thu Jan 26 16:59:18 2017 +1300 net/ipv6: support more tunnel interfaces for EUI64 link-local generation Signed-off-by: Felix Jia Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 +++++ net/ipv6/ip6_gre.c | 3 +++ net/ipv6/ip6_vti.c | 4 ++++ 3 files changed, 12 insertions(+) commit d35a00b8e33dab7385f724e713ae71c8be0a49f4 Author: Felix Jia Date: Thu Jan 26 16:59:17 2017 +1300 net/ipv6: allow sysctl to change link-local address generation mode The address generation mode for IPv6 link-local can only be configured by netlink messages. This patch adds the ability to change the address generation mode via sysctl. v1 -> v2 Removed the rtnl lock and switch to use RCU lock to iterate through the netdev list. v2 -> v3 Removed the addrgenmode variable from the idev structure and use the systcl storage for the flag. Simplifed the logic for sysctl handling by removing the supported for all operation. Added support for more types of tunnel interfaces for link-local address generation. Based the patches from net-next. v3 -> v4 Removed unnecessary whitespace changes. Signed-off-by: Felix Jia Signed-off-by: David S. Miller include/linux/ipv6.h | 1 + include/net/if_inet6.h | 1 - include/uapi/linux/ipv6.h | 1 + net/ipv6/addrconf.c | 104 +++++++++++++++++++++++++++++++++++++--------- 4 files changed, 86 insertions(+), 21 deletions(-) commit ecc4c5614b24ee8ebaa35b834b5768dc9302ee3e Author: Arnaldo Carvalho de Melo Date: Tue Jan 24 13:44:10 2017 -0300 perf tools: Propagate perf_config() errors Previously these were being ignored, sometimes silently. Stop doing that, emitting debug messages and handling the errors. Testing it: $ cat ~/.perfconfig cat: /home/acme/.perfconfig: No such file or directory $ perf stat -e cycles usleep 1 Performance counter stats for 'usleep 1': 938,996 cycles:u 0.003813731 seconds time elapsed $ perf top --stdio Error: You may not have permission to collect system-wide stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid, [ perf record: Captured and wrote 0.019 MB perf.data (7 samples) ] [acme@jouet linux]$ perf report --stdio # To display the perf.data header info, please use --header/--header-only options. # Overhead Command Shared Object Symbol # ........ ....... ................. ......................... 71.77% usleep libc-2.24.so [.] _dl_addr 27.07% usleep ld-2.24.so [.] _dl_next_ld_env_entry 1.13% usleep [kernel.kallsyms] [k] page_fault $ $ touch ~/.perfconfig $ ls -la ~/.perfconfig -rw-rw-r--. 1 acme acme 0 Jan 27 12:14 /home/acme/.perfconfig $ $ perf stat -e instructions usleep 1 Performance counter stats for 'usleep 1': 244,610 instructions:u 0.000805383 seconds time elapsed $ [root@jouet ~]# chown acme.acme ~/.perfconfig [root@jouet ~]# perf stat -e cycles usleep 1 Warning: File /root/.perfconfig not owned by current user or root, ignoring it. Performance counter stats for 'usleep 1': 937,615 cycles 0.000836931 seconds time elapsed # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-j2rq96so6xdqlr8p8rd6a3jx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 6 ++++-- tools/perf/builtin-kmem.c | 8 ++++++-- tools/perf/builtin-record.c | 4 +++- tools/perf/builtin-report.c | 4 +++- tools/perf/builtin-top.c | 4 +++- tools/perf/perf.c | 15 ++++++++++----- tools/perf/util/callchain.c | 16 ++++++++++++++-- tools/perf/util/config.c | 9 +++++---- tools/perf/util/data-convert-bt.c | 7 +++++-- tools/perf/util/hist.c | 4 +++- tools/perf/util/intel-pt.c | 4 +++- tools/perf/util/llvm-utils.c | 4 +++- 12 files changed, 62 insertions(+), 23 deletions(-) commit c13660a08c8b3bb49def4374bfd414aaaa564662 Author: Jens Axboe Date: Thu Jan 26 12:40:07 2017 -0700 blk-mq-sched: change ->dispatch_requests() to ->dispatch_request() When we invoke dispatch_requests(), the scheduler empties everything into the passed in list. This isn't always a good thing, since it means that we remove items that we could have potentially merged with. Change the function to dispatch single requests at the time. If we do that, we can backoff exactly at the point where the device can't consume more IO, and leave the rest with the scheduler for better merging and future dispatch decision making. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval Tested-by: Hannes Reinecke block/blk-mq-sched.c | 23 +++++++++++++++-------- block/blk-mq.c | 2 +- block/mq-deadline.c | 10 ++++++---- include/linux/elevator.h | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) commit 50e1dab86aa2c10cbca2f754aae9542169403141 Author: Jens Axboe Date: Thu Jan 26 14:42:34 2017 -0700 blk-mq-sched: fix starvation for multiple hardware queues and shared tags If we have both multiple hardware queues and shared tag map between devices, we need to ensure that we propagate the hardware queue restart bit higher up. This is because we can get into a situation where we don't have any IO pending on a hardware queue, yet we fail getting a tag to start new IO. If that happens, it's not enough to mark the hardware queue as needing a restart, we need to bubble that up to the higher level queue as well. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval Tested-by: Hannes Reinecke block/blk-mq-sched.c | 28 ++++++++++++++++++++++++++++ block/blk-mq-sched.h | 15 +++++++++------ block/blk-mq.c | 3 ++- block/blk-mq.h | 1 + include/linux/blkdev.h | 1 + 5 files changed, 41 insertions(+), 7 deletions(-) commit 99cf1dc580f0766825395aae4f60ec1d8438f011 Author: Jens Axboe Date: Thu Jan 26 12:32:32 2017 -0700 blk-mq: release driver tag on a requeue event We don't want to hold on to this resource when we have a scheduler attached. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval Tested-by: Hannes Reinecke block/blk-mq.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3c782d67c16889d753a79a8da5422c583d7cfd51 Author: Jens Axboe Date: Thu Jan 26 12:50:36 2017 -0700 blk-mq: fix potential race in queue restart and driver tag allocation Once we mark the queue as needing a restart, re-check if we can get a driver tag. This fixes a theoretical issue where the needed IO completes _after_ blk_mq_get_driver_tag() fails, but before we manage to set the restart bit. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval Tested-by: Hannes Reinecke block/blk-mq.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0abad774124351ba211b9053786ebd5a5a722d53 Author: Jens Axboe Date: Thu Jan 26 12:28:10 2017 -0700 blk-mq: improve scheduler queue sync/async running We'll use the same criteria for whether we need to run the queue sync or async when we have a scheduler, as we do without one. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval Tested-by: Hannes Reinecke block/blk-mq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e582b47a92522e10eb5e52f161baede7185d57a1 Author: Marcus Cooper Date: Thu Jan 26 20:48:04 2017 +0100 ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB The Beelink X2 is an STB based on the Allwinner H3 SoC with a uSD slot, 2 USB ports( 1 * USB-2 Host, 1 USB OTG), a 10/100M ethernet port using the SoC's integrated PHY, Wifi via an sdio wifi chip, HDMI, an IR receiver, a dual colour LED and an optical S/PDIF connector. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 136 ++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) commit 7ac91832679f6e768834ccfa68c02a2cbc609e55 Author: Maxime Ripard Date: Tue Sep 6 16:46:20 2016 +0200 ARM: sun8i: sina33: Enable display Enable the display pipeline with the associated 7" panel sold with the SinA33. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit fc26feeb2eff08720b1035ba72097fc14f95f7af Author: Maxime Ripard Date: Mon Jan 23 11:41:52 2017 +0100 ARM: sun8i: a23/a33: Add the oscillators accuracy The datasheet provided by Allwinner requires oscillators with an accuracy of 50ppm. Add it to our fixed clocks so that we can properly track the accuracy chain. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit e7f68403f49e901732df3c02731b6e714cfbe417 Author: Maxime Ripard Date: Mon Jan 23 11:41:51 2017 +0100 ARM: sun8i: a23/a33: Enable the real LOSC and use it So far, the LOSC was generated through the RTC internal oscillator, which was a pretty poor and inaccurate choice. Now that the RTC properly exposes its internal mux between its oscillator and the external oscillator, we can use it were relevant. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 01dc563b63e915d0eea05a2afb99bac7935d7dcb Author: Icenowy Zheng Date: Fri Jan 20 01:54:48 2017 +0800 ARM: dts: sunxi: add support for Lichee Pi Zero board Lichee Pi Zero is a small-sized V3s board, which is breadboard-compatible, and with a MicroUSB port with both OTG function and power function. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 103 ++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) commit f989086ccbc67987dee57e01d5cd2c2e35cf3e61 Author: Icenowy Zheng Date: Fri Jan 20 01:54:47 2017 +0800 ARM: dts: sunxi: add dtsi file for V3s SoC As we have the pinctrl and clock support for the V3s SoC, it's now to run a mainline Linux on it. So add a .dtsi file for it. Signed-off-by: Icenowy Zheng [Maxime: Removed the dependency on the CCU headers] Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v3s.dtsi | 309 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) commit 4a46f05ebf9921dcba35770106e42574d323d6dd Author: Omar Sandoval Date: Wed Jan 25 08:06:49 2017 -0800 blk-mq: move hctx and ctx counters from sysfs to debugfs These counters aren't as out-of-place in sysfs as the other stuff, but debugfs is a slightly better home for them. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 64 ----------------- 2 files changed, 181 insertions(+), 64 deletions(-) commit be21547318b2c7d9988237b106cc63767b86eae4 Author: Omar Sandoval Date: Wed Jan 25 08:06:48 2017 -0800 blk-mq: move hctx io_poll, stats, and dispatched from sysfs to debugfs These statistics _might_ be useful to userspace, but it's better not to commit to an ABI for these yet. Also, the dispatched file in sysfs couldn't be cleared, so make it clearable like the others in debugfs. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 92 ---------------------------------- 2 files changed, 132 insertions(+), 92 deletions(-) commit d7e3621ad1e48f08dc14c34e353af69f7c35cb20 Author: Omar Sandoval Date: Wed Jan 25 08:06:47 2017 -0800 blk-mq: add tags and sched_tags bitmaps to debugfs These can be used to debug issues like tag leaks and stuck requests. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit d96b37c0af3e4f42928a1361d5cd9f4f8921b4a8 Author: Omar Sandoval Date: Wed Jan 25 08:06:46 2017 -0800 blk-mq: move tags and sched_tags info from sysfs to debugfs These are very tied to the blk-mq tag implementation, so exposing them to sysfs isn't a great idea. Move the debugging information to debugfs and add basic entries for the number of tags and the number of reserved tags to sysfs. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 33 ++++++++++++------------ block/blk-mq-tag.c | 27 ------------------- block/blk-mq-tag.h | 1 - 4 files changed, 86 insertions(+), 45 deletions(-) commit 0bfa5288a78176be8a895ce65dbbf61f63f54b96 Author: Omar Sandoval Date: Wed Jan 25 08:06:45 2017 -0800 blk-mq: export software queue pending map to debugfs This is useful for debugging problems where we've gotten stuck with requests in the software queues. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 24af1ccfe12adddbe17d11801e1689791a4cc282 Author: Omar Sandoval Date: Wed Jan 25 14:32:13 2017 -0800 sbitmap: add helpers for dumping to a seq_file This is useful debugging information that will be used in the blk-mq debugfs directory. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Changed 'weight' to 'busy'. Signed-off-by: Jens Axboe include/linux/sbitmap.h | 30 ++++++++++++++++ lib/sbitmap.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) commit 7b3938524cfbd7abd1814d879ecfcd2e2a9aa775 Author: Omar Sandoval Date: Wed Jan 25 08:06:43 2017 -0800 blk-mq: add extra request information to debugfs The request pointers by themselves aren't super useful. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 950cd7e9ffdc44c340b8914126b39cc079f0c844 Author: Omar Sandoval Date: Wed Jan 25 08:06:42 2017 -0800 blk-mq: move hctx->dispatch and ctx->rq_list from sysfs to debugfs These lists are only useful for debugging; they definitely don't belong in sysfs. Putting them in debugfs also removes the limitation of a single page of output. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 57 -------------------------- 2 files changed, 106 insertions(+), 57 deletions(-) commit 9abb2ad21e8b9b7a2555411fbee225a508cf962d Author: Omar Sandoval Date: Wed Jan 25 08:06:41 2017 -0800 blk-mq: add hctx->{state,flags} to debugfs hctx->state could come in handy for bugs where the hardware queue gets stuck in the stopped state, and hctx->flags is just useful to know. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 07e4fead45e6e1932f0b960655ab554b6aab6a08 Author: Omar Sandoval Date: Wed Jan 25 08:06:40 2017 -0800 blk-mq: create debugfs directory tree In preparation for putting blk-mq debugging information in debugfs, create a directory tree mirroring the one in sysfs: # tree -d /sys/kernel/debug/block /sys/kernel/debug/block |-- nvme0n1 | `-- mq | |-- 0 | | `-- cpu0 | |-- 1 | | `-- cpu1 | |-- 2 | | `-- cpu2 | `-- 3 | `-- cpu3 `-- vda `-- mq `-- 0 |-- cpu0 |-- cpu1 |-- cpu2 `-- cpu3 Also add the scaffolding for the actual files that will go in here, either under the hardware queue or software queue directories. Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/Makefile | 1 + block/blk-mq-debugfs.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 8 +++ block/blk-mq.c | 2 + block/blk-mq.h | 33 +++++++++++ include/linux/blkdev.h | 5 ++ 6 files changed, 201 insertions(+) commit d3e328f2cb01f6f09259a5810baae3edf5416076 Author: Junaid Shahid Date: Wed Dec 21 20:29:32 2016 -0800 kvm: x86: mmu: Verify that restored PTE has needed perms in fast page fault Before fast page fault restores an access track PTE back to a regular PTE, it now also verifies that the restored PTE would grant the necessary permissions for the faulting access to succeed. If not, it falls back to the slow page fault path. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 127 ++++++++++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 59 deletions(-) commit d162f30a7cebe9731fd331419b3a14089d0b41e3 Author: Junaid Shahid Date: Wed Dec 21 20:29:30 2016 -0800 kvm: x86: mmu: Move pgtbl walk inside retry loop in fast_page_fault Redo the page table walk in fast_page_fault when retrying so that we are working on the latest PTE even if the hierarchy changes. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 20d65236d01cdbe14a88f0e2c0f985669f8c41fc Author: Junaid Shahid Date: Wed Dec 21 20:29:31 2016 -0800 kvm: x86: mmu: Update comment in mark_spte_for_access_track Reword the comment to hopefully make it more clear. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 312b616b30d87581b88d3db54c14ed89610cc97b Author: Junaid Shahid Date: Wed Dec 21 20:29:29 2016 -0800 kvm: x86: mmu: Set SPTE_SPECIAL_MASK within mmu.c Instead of the caller including the SPTE_SPECIAL_MASK in the masks being supplied to kvm_mmu_set_mmio_spte_mask() and kvm_mmu_set_mask_ptes(), those functions now themselves include the SPTE_SPECIAL_MASK. Note that bit 63 is now reset in the default MMIO mask. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 5 ++++- arch/x86/kvm/vmx.c | 6 ++---- arch/x86/kvm/x86.c | 3 --- 3 files changed, 6 insertions(+), 8 deletions(-) commit ab22a4733fe919d22bc2957680506ed17e40941e Author: Junaid Shahid Date: Wed Dec 21 20:29:28 2016 -0800 kvm: x86: mmu: Rename EPT_VIOLATION_READ/WRITE/INSTR constants Rename the EPT_VIOLATION_READ/WRITE/INSTR constants to EPT_VIOLATION_ACC_READ/WRITE/INSTR to more clearly indicate that these signify the type of the memory access as opposed to the permissions granted by the PTE. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/include/asm/vmx.h | 12 ++++++------ arch/x86/kvm/vmx.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 12030f489ef87dd879400d65381482a1f2177adc Author: Sakari Ailus Date: Wed Jul 20 09:19:03 2016 -0300 [media] media: entity: Be vocal about failing sanity checks Commit 3801bc7d1b8d ("[media] media: Media Controller fix to not let stream_count go negative") added a sanity check for negative stream_count, but a failure of the check remained silent. Make sure the failure is noticed. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56cbbf25b783961a2d725937e2d3dcd4ca9076e5 Author: Noralf Trønnes Date: Thu Jan 26 23:56:17 2017 +0100 drm/tilcdc: Remove tilcdc_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Also remove the unused tilcdc_module_ops.debugfs_cleanup() callback. drm_debugfs_cleanup() removes all debugfs files using debugfs_remove_recursive(), so there should be no need for such a callback in the future. Cc: jsarha@ti.com Cc: tomi.valkeinen@ti.com Signed-off-by: Noralf Trønnes Reviewed-by: Jyri Sarha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-16-noralf@tronnes.org drivers/gpu/drm/tilcdc/tilcdc_drv.c | 12 ------------ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 -- 2 files changed, 14 deletions(-) commit 5b6954b98b827ec3c31d746022bb1564fc044156 Author: Noralf Trønnes Date: Thu Jan 26 23:56:16 2017 +0100 drm/tegra: Remove tegra_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: thierry.reding@gmail.com Signed-off-by: Noralf Trønnes Reviewed-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-15-noralf@tronnes.org drivers/gpu/drm/tegra/drm.c | 7 ------- 1 file changed, 7 deletions(-) commit fc3706ea00303fd57cb0a47a75c956c24725e291 Author: Noralf Trønnes Date: Thu Jan 26 23:56:15 2017 +0100 drm/sti: Remove drm_debugfs_remove_files() calls drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need for adding fake drm_info_node entries. Cc: benjamin.gaignard@linaro.org Cc: vincent.abriou@st.com Signed-off-by: Noralf Trønnes Acked-by: Vincent Abriou Tested-by: Vincent Abriou Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-14-noralf@tronnes.org drivers/gpu/drm/sti/sti_drv.c | 48 ++++++----------------------------------- drivers/gpu/drm/sti/sti_dvo.c | 10 --------- drivers/gpu/drm/sti/sti_hda.c | 11 ---------- drivers/gpu/drm/sti/sti_hdmi.c | 11 ---------- drivers/gpu/drm/sti/sti_tvout.c | 8 ------- 5 files changed, 6 insertions(+), 82 deletions(-) commit c8e73d1a2645db6eddda0d30b891f7f719f2b987 Author: Noralf Trønnes Date: Thu Jan 26 23:56:14 2017 +0100 drm/radeon: Remove drm_debugfs_remove_files() call drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Noralf Trønnes Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-13-noralf@tronnes.org drivers/gpu/drm/radeon/radeon_device.c | 16 ---------------- 1 file changed, 16 deletions(-) commit c259e81bcd0e7b7e6ecdde4d5d4ce26aed409575 Author: Noralf Trønnes Date: Thu Jan 26 23:56:13 2017 +0100 drm/omap: Remove omap_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: tomi.valkeinen@ti.com Signed-off-by: Noralf Trønnes Reviewed-by: Tomi Valkeinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-12-noralf@tronnes.org drivers/gpu/drm/omapdrm/omap_debugfs.c | 9 --------- drivers/gpu/drm/omapdrm/omap_drv.c | 1 - drivers/gpu/drm/omapdrm/omap_drv.h | 1 - 3 files changed, 11 deletions(-) commit e0dfccf48339b9a9be0fa8e906cfcc19dac3c82b Author: Noralf Trønnes Date: Thu Jan 26 23:56:10 2017 +0100 drm/hdlcd: Remove hdlcd_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: liviu.dudau@arm.com Signed-off-by: Noralf Trønnes Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-9-noralf@tronnes.org drivers/gpu/drm/arm/hdlcd_drv.c | 7 ------- 1 file changed, 7 deletions(-) commit 59defa7cb68b9beed997848c2914e03f4a362182 Author: Noralf Trønnes Date: Thu Jan 26 23:56:09 2017 +0100 drm/etnaviv: Remove etnaviv_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: l.stach@pengutronix.de Cc: linux+etnaviv@armlinux.org.uk Cc: christian.gmeiner@gmail.com Signed-off-by: Noralf Trønnes Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-8-noralf@tronnes.org drivers/gpu/drm/etnaviv/etnaviv_drv.c | 7 ------- 1 file changed, 7 deletions(-) commit 2f38a67a725bc3cb2c5143510b2da1b660b5d912 Author: Noralf Trønnes Date: Thu Jan 26 23:56:08 2017 +0100 drm/etnaviv: allow build with COMPILE_TEST Make it possible to compile test the driver on other platforms. Cc: l.stach@pengutronix.de Cc: linux+etnaviv@armlinux.org.uk Cc: christian.gmeiner@gmail.com Signed-off-by: Noralf Trønnes Acked-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-7-noralf@tronnes.org drivers/gpu/drm/etnaviv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41387a59c8fd55975c6a26cc12fc5c9ca61fcc0f Author: Sakari Ailus Date: Wed Jul 20 08:32:49 2016 -0300 [media] media: entity: Fix stream count check There's a sanity check for the stream count remaining positive or zero on error path, but instead of performing the check on the traversed entity it is performed on the entity where traversal ends. Fix this. Fixes: commit 3801bc7d1b8d ("[media] media: Media Controller fix to not let stream_count go negative") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30a1710187502b3db1ee209597c17d8f9103b1db Author: Noralf Trønnes Date: Thu Jan 26 23:56:06 2017 +0100 drm/amd/amdgpu: Remove drm_debugfs_remove_files() call drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so no need to call drm_debugfs_remove_files(). Also remove empty drm_driver.debugfs_cleanup callback. Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Noralf Trønnes Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-5-noralf@tronnes.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 -------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - 3 files changed, 22 deletions(-) commit 6a4bc2b4c3c9afd643e8da44dd2318a5c5f22cd0 Author: Florian Fainelli Date: Thu Jan 26 14:44:17 2017 -0800 net: Fix ndo_setup_tc comment Commit 16e5cc647173 ("net: rework setup_tc ndo op to consume general tc operand") changed the ndo_setup_tc() signature, but did not update the comments in netdevice.h, so do that now. Signed-off-by: Florian Fainelli Acked-by: John Fastabend Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/netdevice.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fa4c1de4a1aeeb0ef4dca692c779abbcc6c4960f Author: Oleksandr Andrushchenko Date: Fri Jan 27 09:04:25 2017 +0200 drm/prime: Clarify DMA-BUF/GEM Object lifetime From the description of the "DMA-BUF/GEM Object references and lifetime overview" it is not clear when exactly dma_buf gets destroyed and memory freed: only driver .release function mentioned which makes confusion on the real buffer's lifetime. Add more description so all the paths are covered. Cc: Rob Clark Cc: Dave Airlie Cc: Daniel Vetter Signed-off-by: Oleksandr Andrushchenko [danvet: Minor spelling fixes, and some clarification of the 2nd paragraph.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1485500665-27690-1-git-send-email-andr2000@gmail.com drivers/gpu/drm/drm_prime.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit fa715319c11f7f94ae3d19efb9c2cd69fa933f48 Author: Christopher Covington Date: Wed Jan 25 10:52:31 2017 -0500 arm64: Use __tlbi() macros in KVM code Refactor the KVM code to use the __tlbi macros, which will allow an errata workaround that repeats tlbi dsb sequences to only change one location. This is not intended to change the generated assembly and comparing before and after vmlinux objdump shows no functional changes. Acked-by: Christoffer Dall Signed-off-by: Christopher Covington Signed-off-by: Will Deacon arch/arm64/kvm/hyp/tlb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ea5f9d1a69654dd5bf4d7dc60278b91d354afc64 Author: Shanker Donthineni Date: Wed Jan 25 10:52:29 2017 -0500 arm64: Define Falkor v1 CPU Define the MIDR implementer and part number field values for the Qualcomm Datacenter Technologies Falkor processor version 1 in the usual manner. Signed-off-by: Shanker Donthineni Signed-off-by: Christopher Covington Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 4 ++++ 1 file changed, 4 insertions(+) commit bcb63314e2c23f1ed622418b65f9409512659c73 Author: Sakari Ailus Date: Fri Oct 28 09:31:20 2016 -0200 [media] media: Drop FSF's postal address from the source code files Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", ); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus drivers/media/common/b2c2/flexcop.c | 4 ---- drivers/media/common/cx2341x.c | 4 ---- drivers/media/common/siano/sms-cards.c | 4 ---- drivers/media/common/siano/sms-cards.h | 4 ---- drivers/media/common/siano/smscoreapi.c | 4 ---- drivers/media/common/tveeprom.c | 4 ---- drivers/media/dvb-core/demux.h | 4 ---- drivers/media/dvb-core/dmxdev.c | 4 ---- drivers/media/dvb-core/dmxdev.h | 4 ---- drivers/media/dvb-core/dvb_ca_en50221.c | 7 ++----- drivers/media/dvb-core/dvb_demux.c | 4 ---- drivers/media/dvb-core/dvb_demux.h | 4 ---- drivers/media/dvb-core/dvb_frontend.c | 7 ++----- drivers/media/dvb-core/dvb_math.c | 4 ---- drivers/media/dvb-core/dvb_math.h | 4 ---- drivers/media/dvb-core/dvb_net.c | 7 ++----- drivers/media/dvb-core/dvb_net.h | 4 ---- drivers/media/dvb-core/dvb_ringbuffer.c | 4 ---- drivers/media/dvb-core/dvbdev.c | 4 ---- drivers/media/dvb-core/dvbdev.h | 4 ---- drivers/media/dvb-frontends/af9013.c | 4 ---- drivers/media/dvb-frontends/af9013.h | 4 ---- drivers/media/dvb-frontends/af9013_priv.h | 4 ---- drivers/media/dvb-frontends/atbm8830.c | 4 ---- drivers/media/dvb-frontends/atbm8830.h | 4 ---- drivers/media/dvb-frontends/atbm8830_priv.h | 4 ---- drivers/media/dvb-frontends/au8522_decoder.c | 5 ----- drivers/media/dvb-frontends/bcm3510.h | 4 ---- drivers/media/dvb-frontends/bcm3510_priv.h | 4 ---- drivers/media/dvb-frontends/bsbe1-d01a.h | 7 ++----- drivers/media/dvb-frontends/bsbe1.h | 7 ++----- drivers/media/dvb-frontends/bsru6.h | 7 ++----- drivers/media/dvb-frontends/cx24113.c | 4 ---- drivers/media/dvb-frontends/cx24113.h | 4 ---- drivers/media/dvb-frontends/cx24123.c | 4 ---- drivers/media/dvb-frontends/dib0070.c | 4 ---- drivers/media/dvb-frontends/dib0090.c | 4 ---- drivers/media/dvb-frontends/drx39xyj/drx39xxj.h | 4 ---- drivers/media/dvb-frontends/drxd.h | 8 ++------ drivers/media/dvb-frontends/drxd_firm.c | 8 ++------ drivers/media/dvb-frontends/drxd_firm.h | 8 ++------ drivers/media/dvb-frontends/drxd_hard.c | 8 ++------ drivers/media/dvb-frontends/drxd_map_firm.h | 8 ++------ drivers/media/dvb-frontends/drxk_hard.c | 8 ++------ drivers/media/dvb-frontends/dvb-pll.c | 4 ---- drivers/media/dvb-frontends/dvb_dummy_fe.c | 4 ---- drivers/media/dvb-frontends/dvb_dummy_fe.h | 4 ---- drivers/media/dvb-frontends/ec100.c | 4 ---- drivers/media/dvb-frontends/ec100.h | 4 ---- drivers/media/dvb-frontends/hd29l2.c | 4 ---- drivers/media/dvb-frontends/hd29l2.h | 4 ---- drivers/media/dvb-frontends/hd29l2_priv.h | 4 ---- drivers/media/dvb-frontends/isl6405.c | 7 ++----- drivers/media/dvb-frontends/isl6405.h | 7 ++----- drivers/media/dvb-frontends/isl6421.c | 7 ++----- drivers/media/dvb-frontends/isl6421.h | 7 ++----- drivers/media/dvb-frontends/itd1000.c | 4 ---- drivers/media/dvb-frontends/itd1000.h | 4 ---- drivers/media/dvb-frontends/itd1000_priv.h | 4 ---- drivers/media/dvb-frontends/ix2505v.c | 4 ---- drivers/media/dvb-frontends/ix2505v.h | 4 ---- drivers/media/dvb-frontends/lg2160.c | 4 ---- drivers/media/dvb-frontends/lg2160.h | 4 ---- drivers/media/dvb-frontends/lgdt3305.c | 4 ---- drivers/media/dvb-frontends/lgdt3305.h | 4 ---- drivers/media/dvb-frontends/lgdt330x.c | 4 ---- drivers/media/dvb-frontends/lgdt330x.h | 4 ---- drivers/media/dvb-frontends/lgdt330x_priv.h | 4 ---- drivers/media/dvb-frontends/lgs8gxx.c | 4 ---- drivers/media/dvb-frontends/lgs8gxx.h | 4 ---- drivers/media/dvb-frontends/lgs8gxx_priv.h | 4 ---- drivers/media/dvb-frontends/lnbh24.h | 4 ---- drivers/media/dvb-frontends/lnbp21.c | 7 ++----- drivers/media/dvb-frontends/lnbp21.h | 7 ++----- drivers/media/dvb-frontends/lnbp22.c | 7 ++----- drivers/media/dvb-frontends/lnbp22.h | 7 ++----- drivers/media/dvb-frontends/mt352.c | 4 ---- drivers/media/dvb-frontends/mt352.h | 4 ---- drivers/media/dvb-frontends/mt352_priv.h | 4 ---- drivers/media/dvb-frontends/nxt200x.c | 4 ---- drivers/media/dvb-frontends/nxt200x.h | 4 ---- drivers/media/dvb-frontends/or51132.c | 4 ---- drivers/media/dvb-frontends/or51132.h | 4 ---- drivers/media/dvb-frontends/or51211.c | 4 ---- drivers/media/dvb-frontends/or51211.h | 4 ---- drivers/media/dvb-frontends/s5h1420.c | 4 ---- drivers/media/dvb-frontends/s5h1420.h | 4 ---- drivers/media/dvb-frontends/s5h1432.c | 4 ---- drivers/media/dvb-frontends/s5h1432.h | 4 ---- drivers/media/dvb-frontends/stv0367.c | 4 ---- drivers/media/dvb-frontends/stv0367.h | 4 ---- drivers/media/dvb-frontends/stv0367_priv.h | 4 ---- drivers/media/dvb-frontends/stv0367_regs.h | 4 ---- drivers/media/dvb-frontends/stv0900.h | 4 ---- drivers/media/dvb-frontends/stv0900_core.c | 4 ---- drivers/media/dvb-frontends/stv0900_init.h | 4 ---- drivers/media/dvb-frontends/stv0900_priv.h | 4 ---- drivers/media/dvb-frontends/stv0900_reg.h | 4 ---- drivers/media/dvb-frontends/stv0900_sw.c | 4 ---- drivers/media/dvb-frontends/stv6110.c | 4 ---- drivers/media/dvb-frontends/stv6110.h | 4 ---- drivers/media/dvb-frontends/tda18271c2dd.c | 8 ++------ drivers/media/dvb-frontends/tdhd1.h | 7 ++----- drivers/media/dvb-frontends/tua6100.c | 4 ---- drivers/media/dvb-frontends/tua6100.h | 4 ---- drivers/media/dvb-frontends/zl10036.c | 4 ---- drivers/media/dvb-frontends/zl10036.h | 4 ---- drivers/media/dvb-frontends/zl10039.c | 4 ---- drivers/media/dvb-frontends/zl10353.c | 4 ---- drivers/media/dvb-frontends/zl10353.h | 4 ---- drivers/media/dvb-frontends/zl10353_priv.h | 4 ---- drivers/media/i2c/adp1653.c | 5 ----- drivers/media/i2c/adv7170.c | 4 ---- drivers/media/i2c/adv7175.c | 4 ---- drivers/media/i2c/adv7180.c | 4 ---- drivers/media/i2c/adv7183.c | 4 ---- drivers/media/i2c/adv7183_regs.h | 4 ---- drivers/media/i2c/aptina-pll.c | 5 ----- drivers/media/i2c/aptina-pll.h | 5 ----- drivers/media/i2c/as3645a.c | 5 ----- drivers/media/i2c/bt819.c | 4 ---- drivers/media/i2c/bt856.c | 4 ---- drivers/media/i2c/cs5345.c | 4 ---- drivers/media/i2c/cs53l32a.c | 4 ---- drivers/media/i2c/cx25840/cx25840-audio.c | 4 ---- drivers/media/i2c/cx25840/cx25840-core.c | 4 ---- drivers/media/i2c/cx25840/cx25840-core.h | 4 ---- drivers/media/i2c/cx25840/cx25840-firmware.c | 4 ---- drivers/media/i2c/cx25840/cx25840-ir.c | 5 ----- drivers/media/i2c/cx25840/cx25840-vbi.c | 4 ---- drivers/media/i2c/ir-kbd-i2c.c | 4 ---- drivers/media/i2c/ks0127.c | 4 ---- drivers/media/i2c/ks0127.h | 4 ---- drivers/media/i2c/m52790.c | 4 ---- drivers/media/i2c/msp3400-driver.c | 5 ----- drivers/media/i2c/msp3400-kthreads.c | 5 ----- drivers/media/i2c/mt9m032.c | 5 ----- drivers/media/i2c/ov7640.c | 4 ---- drivers/media/i2c/saa7110.c | 4 ---- drivers/media/i2c/saa7115.c | 4 ---- drivers/media/i2c/saa7127.c | 4 ---- drivers/media/i2c/saa717x.c | 4 ---- drivers/media/i2c/saa7185.c | 4 ---- drivers/media/i2c/sony-btf-mpx.c | 4 ---- drivers/media/i2c/tlv320aic23b.c | 4 ---- drivers/media/i2c/tvp514x.c | 4 ---- drivers/media/i2c/tvp514x_regs.h | 4 ---- drivers/media/i2c/tvp7002.c | 4 ---- drivers/media/i2c/tvp7002_reg.h | 4 ---- drivers/media/i2c/tw2804.c | 4 ---- drivers/media/i2c/tw9903.c | 4 ---- drivers/media/i2c/tw9906.c | 4 ---- drivers/media/i2c/uda1342.c | 4 ---- drivers/media/i2c/upd64031a.c | 4 ---- drivers/media/i2c/upd64083.c | 5 ----- drivers/media/i2c/vp27smpx.c | 4 ---- drivers/media/i2c/vpx3220.c | 4 ---- drivers/media/i2c/vs6624.c | 4 ---- drivers/media/i2c/vs6624_regs.h | 4 ---- drivers/media/i2c/wm8739.c | 4 ---- drivers/media/i2c/wm8775.c | 4 ---- drivers/media/media-device.c | 4 ---- drivers/media/media-devnode.c | 4 ---- drivers/media/media-entity.c | 4 ---- drivers/media/pci/bt8xx/bttv-input.c | 4 ---- drivers/media/pci/bt8xx/dvb-bt8xx.c | 4 ---- drivers/media/pci/bt8xx/dvb-bt8xx.h | 4 ---- drivers/media/pci/cx18/cx18-alsa-main.c | 5 ----- drivers/media/pci/cx18/cx18-alsa-mixer.c | 5 ----- drivers/media/pci/cx18/cx18-alsa-mixer.h | 5 ----- drivers/media/pci/cx18/cx18-alsa-pcm.c | 5 ----- drivers/media/pci/cx18/cx18-alsa-pcm.h | 5 ----- drivers/media/pci/cx18/cx18-alsa.h | 5 ----- drivers/media/pci/cx18/cx18-audio.c | 5 ----- drivers/media/pci/cx18/cx18-audio.h | 5 ----- drivers/media/pci/cx18/cx18-av-audio.c | 5 ----- drivers/media/pci/cx18/cx18-av-core.c | 5 ----- drivers/media/pci/cx18/cx18-av-core.h | 5 ----- drivers/media/pci/cx18/cx18-av-firmware.c | 5 ----- drivers/media/pci/cx18/cx18-av-vbi.c | 5 ----- drivers/media/pci/cx18/cx18-cards.c | 5 ----- drivers/media/pci/cx18/cx18-cards.h | 4 ---- drivers/media/pci/cx18/cx18-controls.c | 5 ----- drivers/media/pci/cx18/cx18-driver.c | 5 ----- drivers/media/pci/cx18/cx18-driver.h | 5 ----- drivers/media/pci/cx18/cx18-dvb.c | 4 ---- drivers/media/pci/cx18/cx18-dvb.h | 4 ---- drivers/media/pci/cx18/cx18-fileops.c | 5 ----- drivers/media/pci/cx18/cx18-fileops.h | 5 ----- drivers/media/pci/cx18/cx18-firmware.c | 5 ----- drivers/media/pci/cx18/cx18-firmware.h | 5 ----- drivers/media/pci/cx18/cx18-gpio.c | 5 ----- drivers/media/pci/cx18/cx18-gpio.h | 4 ---- drivers/media/pci/cx18/cx18-i2c.c | 5 ----- drivers/media/pci/cx18/cx18-i2c.h | 5 ----- drivers/media/pci/cx18/cx18-io.c | 5 ----- drivers/media/pci/cx18/cx18-io.h | 5 ----- drivers/media/pci/cx18/cx18-ioctl.c | 5 ----- drivers/media/pci/cx18/cx18-ioctl.h | 5 ----- drivers/media/pci/cx18/cx18-irq.c | 5 ----- drivers/media/pci/cx18/cx18-irq.h | 5 ----- drivers/media/pci/cx18/cx18-mailbox.c | 5 ----- drivers/media/pci/cx18/cx18-mailbox.h | 5 ----- drivers/media/pci/cx18/cx18-queue.c | 5 ----- drivers/media/pci/cx18/cx18-queue.h | 5 ----- drivers/media/pci/cx18/cx18-scb.c | 5 ----- drivers/media/pci/cx18/cx18-scb.h | 5 ----- drivers/media/pci/cx18/cx18-streams.c | 5 ----- drivers/media/pci/cx18/cx18-streams.h | 5 ----- drivers/media/pci/cx18/cx18-vbi.c | 5 ----- drivers/media/pci/cx18/cx18-vbi.h | 5 ----- drivers/media/pci/cx18/cx18-version.h | 5 ----- drivers/media/pci/cx18/cx18-video.c | 5 ----- drivers/media/pci/cx18/cx18-video.h | 5 ----- drivers/media/pci/cx18/cx23418.h | 5 ----- drivers/media/pci/cx25821/cx25821-alsa.c | 4 ---- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 4 ---- drivers/media/pci/cx25821/cx25821-audio-upstream.h | 4 ---- drivers/media/pci/cx25821/cx25821-audio.h | 4 ---- drivers/media/pci/cx25821/cx25821-biffuncs.h | 4 ---- drivers/media/pci/cx25821/cx25821-cards.c | 4 ---- drivers/media/pci/cx25821/cx25821-core.c | 4 ---- drivers/media/pci/cx25821/cx25821-gpio.c | 4 ---- drivers/media/pci/cx25821/cx25821-i2c.c | 4 ---- drivers/media/pci/cx25821/cx25821-medusa-defines.h | 4 ---- drivers/media/pci/cx25821/cx25821-medusa-reg.h | 4 ---- drivers/media/pci/cx25821/cx25821-medusa-video.c | 4 ---- drivers/media/pci/cx25821/cx25821-medusa-video.h | 4 ---- drivers/media/pci/cx25821/cx25821-reg.h | 4 ---- drivers/media/pci/cx25821/cx25821-sram.h | 4 ---- drivers/media/pci/cx25821/cx25821-video-upstream.c | 4 ---- drivers/media/pci/cx25821/cx25821-video-upstream.h | 4 ---- drivers/media/pci/cx25821/cx25821-video.c | 4 ---- drivers/media/pci/cx25821/cx25821-video.h | 4 ---- drivers/media/pci/cx25821/cx25821.h | 4 ---- drivers/media/pci/ddbridge/ddbridge-core.c | 8 ++------ drivers/media/pci/ddbridge/ddbridge-regs.h | 8 ++------ drivers/media/pci/ddbridge/ddbridge.h | 8 ++------ drivers/media/pci/dm1105/dm1105.c | 4 ---- drivers/media/pci/ivtv/ivtv-alsa-main.c | 5 ----- drivers/media/pci/ivtv/ivtv-alsa-mixer.c | 5 ----- drivers/media/pci/ivtv/ivtv-alsa-mixer.h | 5 ----- drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 5 ----- drivers/media/pci/ivtv/ivtv-alsa-pcm.h | 5 ----- drivers/media/pci/ivtv/ivtv-alsa.h | 5 ----- drivers/media/pci/meye/meye.c | 4 ---- drivers/media/pci/meye/meye.h | 4 ---- drivers/media/pci/ngene/ngene-cards.c | 8 ++------ drivers/media/pci/ngene/ngene-core.c | 8 ++------ drivers/media/pci/ngene/ngene-dvb.c | 8 ++------ drivers/media/pci/ngene/ngene-i2c.c | 8 ++------ drivers/media/pci/ngene/ngene.h | 8 ++------ drivers/media/pci/pluto2/pluto2.c | 4 ---- drivers/media/pci/pt1/pt1.c | 4 ---- drivers/media/pci/pt1/va1j5jf8007s.c | 4 ---- drivers/media/pci/pt1/va1j5jf8007s.h | 4 ---- drivers/media/pci/pt1/va1j5jf8007t.c | 4 ---- drivers/media/pci/pt1/va1j5jf8007t.h | 4 ---- drivers/media/pci/saa7134/saa7134-alsa.c | 4 ---- drivers/media/pci/saa7134/saa7134-cards.c | 4 ---- drivers/media/pci/saa7134/saa7134-core.c | 4 ---- drivers/media/pci/saa7134/saa7134-dvb.c | 4 ---- drivers/media/pci/saa7134/saa7134-empress.c | 4 ---- drivers/media/pci/saa7134/saa7134-i2c.c | 4 ---- drivers/media/pci/saa7134/saa7134-input.c | 4 ---- drivers/media/pci/saa7134/saa7134-ts.c | 4 ---- drivers/media/pci/saa7134/saa7134-tvaudio.c | 4 ---- drivers/media/pci/saa7134/saa7134-vbi.c | 4 ---- drivers/media/pci/saa7134/saa7134-video.c | 4 ---- drivers/media/pci/saa7134/saa7134.h | 4 ---- drivers/media/pci/saa7164/saa7164-api.c | 4 ---- drivers/media/pci/saa7164/saa7164-buffer.c | 4 ---- drivers/media/pci/saa7164/saa7164-bus.c | 4 ---- drivers/media/pci/saa7164/saa7164-cards.c | 4 ---- drivers/media/pci/saa7164/saa7164-cmd.c | 4 ---- drivers/media/pci/saa7164/saa7164-core.c | 4 ---- drivers/media/pci/saa7164/saa7164-dvb.c | 4 ---- drivers/media/pci/saa7164/saa7164-encoder.c | 4 ---- drivers/media/pci/saa7164/saa7164-fw.c | 4 ---- drivers/media/pci/saa7164/saa7164-i2c.c | 4 ---- drivers/media/pci/saa7164/saa7164-reg.h | 4 ---- drivers/media/pci/saa7164/saa7164-types.h | 4 ---- drivers/media/pci/saa7164/saa7164-vbi.c | 4 ---- drivers/media/pci/saa7164/saa7164.h | 4 ---- drivers/media/pci/sta2x11/sta2x11_vip.h | 4 ---- drivers/media/pci/ttpci/av7110.c | 7 ++----- drivers/media/pci/ttpci/av7110_av.c | 7 ++----- drivers/media/pci/ttpci/av7110_ca.c | 7 ++----- drivers/media/pci/ttpci/av7110_hw.c | 7 ++----- drivers/media/pci/ttpci/av7110_ir.c | 7 ++----- drivers/media/pci/ttpci/av7110_v4l.c | 7 ++----- drivers/media/pci/ttpci/budget-av.c | 7 ++----- drivers/media/pci/ttpci/budget-ci.c | 7 ++----- drivers/media/pci/ttpci/budget-core.c | 7 ++----- drivers/media/pci/ttpci/budget-patch.c | 7 ++----- drivers/media/pci/ttpci/budget.c | 7 ++----- drivers/media/pci/ttpci/dvb_filter.h | 4 ---- drivers/media/pci/zoran/videocodec.c | 4 ---- drivers/media/pci/zoran/videocodec.h | 4 ---- drivers/media/pci/zoran/zoran.h | 4 ---- drivers/media/pci/zoran/zoran_card.c | 4 ---- drivers/media/pci/zoran/zoran_card.h | 4 ---- drivers/media/pci/zoran/zoran_device.c | 4 ---- drivers/media/pci/zoran/zoran_device.h | 4 ---- drivers/media/pci/zoran/zoran_driver.c | 4 ---- drivers/media/pci/zoran/zoran_procfs.c | 4 ---- drivers/media/pci/zoran/zoran_procfs.h | 4 ---- drivers/media/pci/zoran/zr36016.c | 4 ---- drivers/media/pci/zoran/zr36016.h | 4 ---- drivers/media/pci/zoran/zr36050.c | 4 ---- drivers/media/pci/zoran/zr36050.h | 4 ---- drivers/media/pci/zoran/zr36057.h | 4 ---- drivers/media/pci/zoran/zr36060.c | 4 ---- drivers/media/pci/zoran/zr36060.h | 4 ---- drivers/media/platform/blackfin/bfin_capture.c | 4 ---- drivers/media/platform/blackfin/ppi.c | 4 ---- drivers/media/platform/davinci/ccdc_hw_device.h | 4 ---- drivers/media/platform/davinci/dm355_ccdc.c | 4 ---- drivers/media/platform/davinci/dm355_ccdc_regs.h | 4 ---- drivers/media/platform/davinci/dm644x_ccdc.c | 4 ---- drivers/media/platform/davinci/dm644x_ccdc_regs.h | 4 ---- drivers/media/platform/davinci/isif.c | 4 ---- drivers/media/platform/davinci/isif_regs.h | 4 ---- drivers/media/platform/davinci/vpbe.c | 4 ---- drivers/media/platform/davinci/vpbe_osd.c | 4 ---- drivers/media/platform/davinci/vpbe_osd_regs.h | 4 ---- drivers/media/platform/davinci/vpbe_venc.c | 4 ---- drivers/media/platform/davinci/vpbe_venc_regs.h | 4 ---- drivers/media/platform/davinci/vpfe_capture.c | 4 ---- drivers/media/platform/davinci/vpif_capture.c | 4 ---- drivers/media/platform/davinci/vpif_capture.h | 4 ---- drivers/media/platform/davinci/vpss.c | 4 ---- drivers/media/radio/dsbr100.c | 4 ---- drivers/media/radio/radio-isa.c | 5 ----- drivers/media/radio/radio-isa.h | 5 ----- drivers/media/radio/radio-keene.c | 4 ---- drivers/media/radio/radio-ma901.c | 4 ---- drivers/media/radio/radio-mr800.c | 4 ---- drivers/media/radio/radio-shark.c | 4 ---- drivers/media/radio/radio-shark2.c | 4 ---- drivers/media/radio/radio-tea5764.c | 4 ---- drivers/media/radio/radio-tea5777.c | 4 ---- drivers/media/radio/radio-tea5777.h | 4 ---- drivers/media/radio/radio-timb.c | 4 ---- drivers/media/radio/radio-wl1273.c | 4 ---- drivers/media/radio/saa7706h.c | 4 ---- drivers/media/radio/si470x/radio-si470x-common.c | 4 ---- drivers/media/radio/si470x/radio-si470x-i2c.c | 4 ---- drivers/media/radio/si470x/radio-si470x-usb.c | 4 ---- drivers/media/radio/si470x/radio-si470x.h | 4 ---- drivers/media/radio/si4713/radio-platform-si4713.c | 4 ---- drivers/media/radio/si4713/si4713.c | 4 ---- drivers/media/radio/tef6862.c | 4 ---- drivers/media/radio/wl128x/fmdrv.h | 4 ---- drivers/media/radio/wl128x/fmdrv_common.c | 4 ---- drivers/media/radio/wl128x/fmdrv_common.h | 4 ---- drivers/media/radio/wl128x/fmdrv_rx.c | 4 ---- drivers/media/radio/wl128x/fmdrv_rx.h | 4 ---- drivers/media/radio/wl128x/fmdrv_tx.c | 4 ---- drivers/media/radio/wl128x/fmdrv_tx.h | 4 ---- drivers/media/radio/wl128x/fmdrv_v4l2.c | 4 ---- drivers/media/radio/wl128x/fmdrv_v4l2.h | 4 ---- drivers/media/rc/ati_remote.c | 4 ---- drivers/media/rc/ene_ir.c | 5 ----- drivers/media/rc/ene_ir.h | 5 ----- drivers/media/rc/fintek-cir.c | 5 ----- drivers/media/rc/fintek-cir.h | 5 ----- drivers/media/rc/iguanair.c | 4 ---- drivers/media/rc/imon.c | 4 ---- drivers/media/rc/ite-cir.c | 5 ----- drivers/media/rc/ite-cir.h | 5 ----- drivers/media/rc/keymaps/rc-technisat-usb2.c | 4 ---- drivers/media/rc/lirc_dev.c | 4 ---- drivers/media/rc/mceusb.c | 4 ---- drivers/media/rc/nuvoton-cir.c | 5 ----- drivers/media/rc/nuvoton-cir.h | 5 ----- drivers/media/rc/rc-loopback.c | 4 ---- drivers/media/rc/redrat3.c | 4 ---- drivers/media/rc/streamzap.c | 4 ---- drivers/media/rc/ttusbir.c | 4 ---- drivers/media/rc/winbond-cir.c | 4 ---- drivers/media/tuners/fc0011.c | 4 ---- drivers/media/tuners/fc0012-priv.h | 4 ---- drivers/media/tuners/fc0012.c | 4 ---- drivers/media/tuners/fc0012.h | 4 ---- drivers/media/tuners/fc0013-priv.h | 4 ---- drivers/media/tuners/fc0013.c | 4 ---- drivers/media/tuners/fc0013.h | 4 ---- drivers/media/tuners/fc001x-common.h | 4 ---- drivers/media/tuners/it913x.c | 4 ---- drivers/media/tuners/it913x.h | 4 ---- drivers/media/tuners/max2165.c | 4 ---- drivers/media/tuners/max2165.h | 4 ---- drivers/media/tuners/max2165_priv.h | 4 ---- drivers/media/tuners/mc44s803.c | 4 ---- drivers/media/tuners/mc44s803.h | 4 ---- drivers/media/tuners/mc44s803_priv.h | 4 ---- drivers/media/tuners/mt2060.c | 4 ---- drivers/media/tuners/mt2060.h | 4 ---- drivers/media/tuners/mt2060_priv.h | 4 ---- drivers/media/tuners/mt2131.c | 4 ---- drivers/media/tuners/mt2131.h | 4 ---- drivers/media/tuners/mt2131_priv.h | 4 ---- drivers/media/tuners/mxl5007t.c | 4 ---- drivers/media/tuners/mxl5007t.h | 4 ---- drivers/media/tuners/qt1010.c | 4 ---- drivers/media/tuners/qt1010.h | 4 ---- drivers/media/tuners/qt1010_priv.h | 4 ---- drivers/media/tuners/tda18218.c | 4 ---- drivers/media/tuners/tda18218.h | 4 ---- drivers/media/tuners/tda18218_priv.h | 4 ---- drivers/media/tuners/tda827x.c | 4 ---- drivers/media/tuners/xc4000.c | 4 ---- drivers/media/tuners/xc4000.h | 4 ---- drivers/media/tuners/xc5000.c | 4 ---- drivers/media/tuners/xc5000.h | 4 ---- drivers/media/usb/au0828/au0828-cards.c | 4 ---- drivers/media/usb/au0828/au0828-cards.h | 4 ---- drivers/media/usb/au0828/au0828-core.c | 4 ---- drivers/media/usb/au0828/au0828-dvb.c | 4 ---- drivers/media/usb/au0828/au0828-i2c.c | 4 ---- drivers/media/usb/au0828/au0828-reg.h | 4 ---- drivers/media/usb/au0828/au0828-video.c | 5 ----- drivers/media/usb/au0828/au0828.h | 4 ---- drivers/media/usb/cpia2/cpia2.h | 4 ---- drivers/media/usb/cpia2/cpia2_core.c | 4 ---- drivers/media/usb/cpia2/cpia2_registers.h | 4 ---- drivers/media/usb/cpia2/cpia2_usb.c | 4 ---- drivers/media/usb/cpia2/cpia2_v4l.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-417.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-audio.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-dif.h | 4 ---- drivers/media/usb/dvb-usb-v2/af9015.c | 4 ---- drivers/media/usb/dvb-usb-v2/af9015.h | 4 ---- drivers/media/usb/dvb-usb-v2/anysee.c | 4 ---- drivers/media/usb/dvb-usb-v2/anysee.h | 4 ---- drivers/media/usb/dvb-usb-v2/au6610.c | 4 ---- drivers/media/usb/dvb-usb-v2/au6610.h | 4 ---- drivers/media/usb/dvb-usb-v2/ce6230.c | 4 ---- drivers/media/usb/dvb-usb-v2/ce6230.h | 4 ---- drivers/media/usb/dvb-usb-v2/dvbsky.c | 4 ---- drivers/media/usb/dvb-usb-v2/ec168.c | 4 ---- drivers/media/usb/dvb-usb-v2/ec168.h | 4 ---- drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h | 4 ---- drivers/media/usb/dvb-usb/af9005-fe.c | 4 ---- drivers/media/usb/dvb-usb/af9005-remote.c | 4 ---- drivers/media/usb/dvb-usb/af9005.c | 4 ---- drivers/media/usb/dvb-usb/af9005.h | 4 ---- drivers/media/usb/dvb-usb/cinergyT2-core.c | 4 ---- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 4 ---- drivers/media/usb/dvb-usb/cinergyT2.h | 4 ---- drivers/media/usb/dvb-usb/dtv5100.c | 4 ---- drivers/media/usb/dvb-usb/dtv5100.h | 4 ---- drivers/media/usb/dvb-usb/technisat-usb2.c | 4 ---- drivers/media/usb/em28xx/em28xx-audio.c | 4 ---- drivers/media/usb/gspca/autogain_functions.c | 4 ---- drivers/media/usb/gspca/benq.c | 4 ---- drivers/media/usb/gspca/conex.c | 4 ---- drivers/media/usb/gspca/cpia1.c | 4 ---- drivers/media/usb/gspca/etoms.c | 4 ---- drivers/media/usb/gspca/finepix.c | 4 ---- drivers/media/usb/gspca/gspca.c | 4 ---- drivers/media/usb/gspca/jeilinj.c | 4 ---- drivers/media/usb/gspca/jl2005bcd.c | 4 ---- drivers/media/usb/gspca/jpeg.h | 4 ---- drivers/media/usb/gspca/kinect.c | 4 ---- drivers/media/usb/gspca/konica.c | 4 ---- drivers/media/usb/gspca/mars.c | 4 ---- drivers/media/usb/gspca/mr97310a.c | 4 ---- drivers/media/usb/gspca/nw80x.c | 4 ---- drivers/media/usb/gspca/ov519.c | 4 ---- drivers/media/usb/gspca/ov534.c | 4 ---- drivers/media/usb/gspca/ov534_9.c | 4 ---- drivers/media/usb/gspca/pac207.c | 4 ---- drivers/media/usb/gspca/pac7302.c | 4 ---- drivers/media/usb/gspca/pac7311.c | 4 ---- drivers/media/usb/gspca/pac_common.h | 4 ---- drivers/media/usb/gspca/se401.c | 4 ---- drivers/media/usb/gspca/se401.h | 4 ---- drivers/media/usb/gspca/sn9c2028.c | 4 ---- drivers/media/usb/gspca/sn9c2028.h | 4 ---- drivers/media/usb/gspca/sn9c20x.c | 4 ---- drivers/media/usb/gspca/sonixb.c | 4 ---- drivers/media/usb/gspca/sonixj.c | 4 ---- drivers/media/usb/gspca/spca1528.c | 4 ---- drivers/media/usb/gspca/spca500.c | 4 ---- drivers/media/usb/gspca/spca501.c | 4 ---- drivers/media/usb/gspca/spca505.c | 4 ---- drivers/media/usb/gspca/spca506.c | 4 ---- drivers/media/usb/gspca/spca508.c | 4 ---- drivers/media/usb/gspca/spca561.c | 4 ---- drivers/media/usb/gspca/sq905.c | 4 ---- drivers/media/usb/gspca/sq905c.c | 4 ---- drivers/media/usb/gspca/sq930x.c | 4 ---- drivers/media/usb/gspca/stk014.c | 4 ---- drivers/media/usb/gspca/stk1135.c | 4 ---- drivers/media/usb/gspca/stk1135.h | 4 ---- drivers/media/usb/gspca/stv0680.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h | 4 ---- drivers/media/usb/gspca/sunplus.c | 4 ---- drivers/media/usb/gspca/t613.c | 4 ---- drivers/media/usb/gspca/tv8532.c | 4 ---- drivers/media/usb/gspca/vc032x.c | 4 ---- drivers/media/usb/gspca/vicam.c | 4 ---- drivers/media/usb/gspca/w996Xcf.c | 4 ---- drivers/media/usb/gspca/xirlink_cit.c | 4 ---- drivers/media/usb/gspca/zc3xx.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-audio.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-audio.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-context.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-context.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ctrl.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ctrl.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debug.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debugifc.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debugifc.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-devattr.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-devattr.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-eeprom.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-encoder.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-encoder.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-io.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-io.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ioread.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ioread.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-main.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-std.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-std.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-sysfs.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-sysfs.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-util.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-v4l2.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-wm8775.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-wm8775.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2.h | 4 ---- drivers/media/usb/s2255/s2255drv.c | 4 ---- drivers/media/usb/stkwebcam/stk-sensor.c | 4 ---- drivers/media/usb/stkwebcam/stk-webcam.c | 4 ---- drivers/media/usb/stkwebcam/stk-webcam.h | 4 ---- drivers/media/usb/tm6000/tm6000-cards.c | 4 ---- drivers/media/usb/tm6000/tm6000-core.c | 4 ---- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ---- drivers/media/usb/tm6000/tm6000-i2c.c | 4 ---- drivers/media/usb/tm6000/tm6000-input.c | 4 ---- drivers/media/usb/tm6000/tm6000-regs.h | 4 ---- drivers/media/usb/tm6000/tm6000-stds.c | 4 ---- drivers/media/usb/tm6000/tm6000-usb-isoc.h | 4 ---- drivers/media/usb/tm6000/tm6000-video.c | 4 ---- drivers/media/usb/tm6000/tm6000.h | 4 ---- drivers/media/usb/ttusb-dec/ttusb_dec.c | 4 ---- drivers/media/usb/ttusb-dec/ttusbdecfe.c | 4 ---- drivers/media/usb/ttusb-dec/ttusbdecfe.h | 4 ---- drivers/media/usb/usbvision/usbvision-cards.c | 4 ---- drivers/media/usb/usbvision/usbvision-core.c | 4 ---- drivers/media/usb/usbvision/usbvision-i2c.c | 4 ---- drivers/media/usb/usbvision/usbvision-video.c | 4 ---- drivers/media/usb/usbvision/usbvision.h | 4 ---- drivers/media/usb/zr364xx/zr364xx.c | 4 ---- drivers/media/v4l2-core/v4l2-event.c | 5 ----- drivers/media/v4l2-core/v4l2-fh.c | 5 ----- drivers/media/v4l2-core/v4l2-subdev.c | 4 ---- include/media/blackfin/ppi.h | 4 ---- include/media/davinci/ccdc_types.h | 4 ---- include/media/davinci/dm355_ccdc.h | 4 ---- include/media/davinci/dm644x_ccdc.h | 4 ---- include/media/davinci/isif.h | 4 ---- include/media/davinci/vpbe.h | 4 ---- include/media/davinci/vpbe_osd.h | 4 ---- include/media/davinci/vpbe_types.h | 4 ---- include/media/davinci/vpbe_venc.h | 4 ---- include/media/davinci/vpfe_capture.h | 4 ---- include/media/davinci/vpfe_types.h | 4 ---- include/media/davinci/vpif_types.h | 4 ---- include/media/davinci/vpss.h | 4 ---- include/media/drv-intf/tea575x.h | 4 ---- include/media/i2c/adp1653.h | 5 ----- include/media/i2c/adv7183.h | 4 ---- include/media/i2c/as3645a.h | 5 ----- include/media/i2c/lm3560.h | 5 ----- include/media/i2c/mt9m032.h | 5 ----- include/media/i2c/smiapp.h | 5 ----- include/media/i2c/ths7303.h | 4 ---- include/media/i2c/tvp514x.h | 4 ---- include/media/i2c/tvp7002.h | 4 ---- include/media/i2c/upd64031a.h | 4 ---- include/media/i2c/upd64083.h | 4 ---- include/media/media-device.h | 4 ---- include/media/media-devnode.h | 4 ---- include/media/media-entity.h | 4 ---- include/media/v4l2-event.h | 5 ----- include/media/v4l2-fh.h | 5 ----- 627 files changed, 82 insertions(+), 2644 deletions(-) commit afc45cf52c93009f1f4432e50365ce294ba7a474 Author: Arnaldo Carvalho de Melo Date: Fri Jan 27 10:21:01 2017 -0300 perf config: Do not consider an error not to have any perfconfig file While propagating the errors from perf_config(), which were being completely ignored, everything stopped working for people without a ~/.perfconfig file, because the perf_config_set__init() was considering an error not to have a .perfconfig file, duh, fix it by checking the errno after the failed stat() call. It should also not return an error when it says it is ignoring the file, and also a empty file should not return an error either. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Taeung Song Cc: Wang Nan Fixes: 8beeb00f2c84 ("perf config: Use new perf_config_set__init() to initialize config set") Link: http://lkml.kernel.org/n/tip-ygpbab3apbs6l8wr97xedwks@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 192738b711d3e41a7326347db5d6923d2136b6d0 Author: Bob Peterson Date: Wed Jan 25 12:57:42 2017 -0500 GFS2: Inline function meta_lo_add This patch simply combines function meta_lo_add with its only caller, trans_add_meta. This makes the code easier to read and will make it easier to reduce contention on gfs2_log_lock. Signed-off-by: Bob Peterson fs/gfs2/trans.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit 98d85f3cb912fde14593ead54dea4c1a00b3966f Author: Sakari Ailus Date: Mon Jan 2 08:32:47 2017 -0200 [media] media: Properly pass through media entity types in entity enumeration When the functions replaced media entity types, the range which was allowed for the types was incorrect. This meant that media entity types for specific devices were not passed correctly to the userspace through MEDIA_IOC_ENUM_ENTITIES. Fix it. Fixes: commit b2cd27448b33 ("[media] media-device: map new functions into old types for legacy API") Reported-and-tested-by: Antti Laakso Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Cc: stable@vger.kernel.org # For v4.5 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9862ca056e654633e521b303f74fb123f7f17e98 Author: Bob Peterson Date: Wed Jan 25 12:50:47 2017 -0500 GFS2: Switch tr_touched to flag in transaction This patch eliminates the int variable tr_touched in favor of a new flag in the transaction. This is a step toward reducing contention on the gfs2_log_lock spin_lock. Signed-off-by: Bob Peterson fs/gfs2/incore.h | 10 +++++++--- fs/gfs2/log.c | 6 +++--- fs/gfs2/meta_io.c | 6 +++--- fs/gfs2/trans.c | 19 ++++++++++--------- 4 files changed, 23 insertions(+), 18 deletions(-) commit 02c952c8f95fd0adf1835704db95215f57cfc8e6 Author: Martin Kaiser Date: Wed Jan 25 22:42:25 2017 +0100 clk: samsung: mark s3c...._clk_sleep_init() as __init These functions are referencing s3c...._clk_regs[], which are marked as __initdata. When compiling with CONFIG_DEBUG_SECTION_MISMATCH=y, this produces warnings like WARNING: vmlinux.o(.text+0x198350): Section mismatch in reference from the function s3c2410_clk_sleep_init() to the (unknown reference) .init.data:(unknown) Mark the s3c...._clk_sleep_init() functions as __init in order to fix this. Fixes: ca2e90ac1809 ("clk: samsung: add clock controller driver for s3c2412") Signed-off-by: Martin Kaiser Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-s3c2410.c | 4 ++-- drivers/clk/samsung/clk-s3c2412.c | 4 ++-- drivers/clk/samsung/clk-s3c2443.c | 4 ++-- drivers/clk/samsung/clk-s3c64xx.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 96a8d7536f2bdd0b2f587ebff9b73e744d02e05e Author: Marek Szyprowski Date: Wed Jan 25 12:52:32 2017 +0100 clk: samsung: Add enable/disable support for PLL35XX clocks Some PLLs might be disabled by default after turning off and then on a power domain which they belongs to. To avoid configuring a disabled PLL, add proper code for handling PLL enable/disable. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-pll.c | 45 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) commit 9341e39d41b75b3ad3a0ba46c47995372c6219a2 Author: Marek Szyprowski Date: Thu Jan 26 13:43:42 2017 +0100 clk: samsung: exynos5433: Correct typos in SoC name This patch fixes simple typos in Exynos5433 clocks driver. The SoC name was referred a few times as '5443' instead of '5433'. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit b07609cecaac6681a2fca3eebc1bae7b00282620 Author: Kuninori Morimoto Date: Fri Jan 27 06:37:51 2017 +0000 ASoC: soc-core: remove OF adjusting for snd_soc_of_parse_card_name Because prototype of OF-graph sound card support didn't have Sound Card node, commit 8f5ebb1bee15b5720741a98414767bb86f6c2b23 ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_card_name") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit 8f5ebb1bee15b5720741a98414767bb86f6c2b23. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 7 ++----- sound/soc/soc-core.c | 11 +++++------ 2 files changed, 7 insertions(+), 11 deletions(-) commit 440a3006f154a3aca4badf72841c61ac93a72110 Author: Kuninori Morimoto Date: Fri Jan 27 06:37:16 2017 +0000 ASoC: soc-core: remove OF adjusting for snd_soc_of_parse_audio_prefix Because prototype of OF-graph sound card support didn't have Sound Card node, commit b6defcca0a604129155ae472b116a2e1688d8995 ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_prefix") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit b6defcca0a604129155ae472b116a2e1688d8995. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 6 +----- sound/soc/soc-core.c | 9 +++------ 2 files changed, 4 insertions(+), 11 deletions(-) commit 21efde50ca9cba9230d1b1ea54aadbf6d96c4157 Author: Kuninori Morimoto Date: Fri Jan 27 06:37:34 2017 +0000 ASoC: soc-core: remove OF adjusting for snd_soc_of_parse_audio_simple_widgets Because prototype of OF-graph sound card support didn't have Sound Card node, commit 1ef5bcd57be5c8b31286b7b47828064be25f266b ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_simple_widgets") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit 1ef5bcd57be5c8b31286b7b47828064be25f266b. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 8 ++------ sound/soc/soc-core.c | 9 +++------ 2 files changed, 5 insertions(+), 12 deletions(-) commit 2bc644af610f28d05812f224636a95a57c2631d1 Author: Kuninori Morimoto Date: Fri Jan 27 06:36:50 2017 +0000 ASoC: soc-core: remove OF adjusting for snd_soc_of_parse_audio_routing Because prototype of OF-graph sound card support didn't have Sound Card node, commit 7364c8dc255232db33bcd1c5b19eb8f34cf6108a ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_routing") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit 7364c8dc255232db33bcd1c5b19eb8f34cf6108a. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 9 ++------- sound/soc/soc-core.c | 9 +++------ 2 files changed, 5 insertions(+), 13 deletions(-) commit 3f81d9aa80ae4b513416440e416a6486ef2ad817 Author: Shailendra Verma Date: Fri Jan 27 16:40:57 2017 +0530 ASoC: davinci - Fix possible NULL derefrence. of_match_device could return NULL, and so can cause a NULL pointer dereference later. Signed-off-by: Shailendra Verma Signed-off-by: Mark Brown sound/soc/davinci/davinci-evm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 0b9c1ac1936aa2abf0f8d50e00b53cab92e28fd3 Merge: 106e0de 758c98e Author: Kalle Valo Date: Fri Jan 27 13:23:48 2017 +0200 Merge tag 'iwlwifi-next-for-kalle-2017-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Some improvements, bugfixes and new features: * A bunch of cleanups here and there; * A few simple bugfixes; * Some more work in preparation for A000 family support; * Add support for radiotap timestamps; * Some work on our firmware debugging capabilities; commit b6160e26936bcf1b9181bb34ad4f420ccd3f39f0 Author: Viresh Kumar Date: Mon Jan 2 14:41:04 2017 +0530 PM / OPP: Split out part of _add_opp_table() and _remove_opp_table() Split out parts of _add_opp_table() and _remove_opp_table() into separate routines. This improves readability as well. Should result in no functional changes. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 76 +++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 32 deletions(-) commit dc2c9ad52af45ebecf9743aacb1916ebb2f1e848 Author: Viresh Kumar Date: Mon Jan 2 14:41:03 2017 +0530 PM / OPP: Don't expose srcu_head to register notifiers Let the OPP core provide helpers to register notifiers for any device, instead of exposing srcu_head outside of the core. Signed-off-by: Viresh Kumar Acked-by: MyungJoo Ham Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 66 ++++++++++++++++++++++++++++++++----------- drivers/devfreq/devfreq.c | 26 ++--------------- include/linux/pm_opp.h | 14 ++++++--- 3 files changed, 62 insertions(+), 44 deletions(-) commit 3aa26a3b2ea63c4d09420e74421370655aa1cf8f Author: Viresh Kumar Date: Mon Jan 2 14:41:02 2017 +0530 PM / OPP: Rename dev_pm_opp_get_suspend_opp() and return OPP rate There is only one user of dev_pm_opp_get_suspend_opp() and that uses it to get the OPP rate for the suspend_opp. Rename dev_pm_opp_get_suspend_opp() as dev_pm_opp_get_suspend_opp_freq() and return the rate directly from it. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 27 +++++++++++++-------------- drivers/cpufreq/cpufreq-dt.c | 7 +------ include/linux/pm_opp.h | 6 +++--- 3 files changed, 17 insertions(+), 23 deletions(-) commit 8cd2f6e8f34e75198063a6d84675b18bdb106824 Author: Viresh Kumar Date: Mon Jan 2 14:41:01 2017 +0530 PM / OPP: Don't allocate OPP table from _opp_allocate() There is no point in trying to find/allocate the table for every OPP that is added for a device. It would be far more efficient to allocate the table only once and pass its pointer to the routines that add the OPP entry. Locking is removed from _opp_add_static_v2() and _opp_add_v1() now as the callers call them with that lock already held. Call to _remove_opp_table() routine is also removed from _opp_free() now, as opp_table isn't allocated from within _opp_allocate(). This is handled by the routines which created the OPP table in the first place. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 67 +++++++++++++++++++------------------- drivers/base/power/opp/of.c | 75 ++++++++++++++++++++++--------------------- drivers/base/power/opp/opp.h | 9 ++++-- 3 files changed, 78 insertions(+), 73 deletions(-) commit 9274c892430ef3240acf3f336916f64fe2b67b02 Author: Viresh Kumar Date: Mon Jan 2 14:41:00 2017 +0530 PM / OPP: Rename and split _dev_pm_opp_remove_table() Later patches would want to remove OPP table (and its OPPs) using the opp_table pointer instead of 'dev'. In order to prepare for that, rename _dev_pm_opp_remove_table() as _dev_pm_opp_find_and_remove_table() split out part of it. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 35 ++++++++++++++++++++++------------- drivers/base/power/opp/of.c | 2 +- drivers/base/power/opp/opp.h | 2 +- 3 files changed, 24 insertions(+), 15 deletions(-) commit 969fceb3c7e6fc7fd0419b0392435717824f7ba5 Author: Viresh Kumar Date: Mon Jan 2 14:40:59 2017 +0530 PM / OPP: Add light weight _opp_free() routine The OPPs which are never successfully added using _opp_add() are not required to be freed with the _opp_remove() routine, as a simple kfree() is enough for them. Introduce a new light weight routine _opp_free(), which will do that. That also helps us removing the 'notify' parameter to _opp_remove(), which isn't required anymore. Note that _opp_free() contains a call to _remove_opp_table() as the OPP table might have been added for this very OPP only. The _remove_opp_table() routine returns quickly if there are more OPPs in the table. This will be simplified in later patches though. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 20 +++++++++++--------- drivers/base/power/opp/of.c | 2 +- drivers/base/power/opp/opp.h | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) commit 04a86a84c42ca18f37ab446127dc619b41dd3b23 Author: Viresh Kumar Date: Mon Jan 2 14:40:58 2017 +0530 PM / OPP: Error out on failing to add static OPPs for v1 bindings The code adding static OPPs for V2 bindings already does so. Make the V1 bindings specific code behave the same. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/of.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 63a69ea4b88f37bda3bb13c4fb417a3218902022 Author: Viresh Kumar Date: Mon Jan 2 14:40:57 2017 +0530 PM / OPP: Rename _allocate_opp() to _opp_allocate() Make the naming consistent with how other routines are named. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 4 ++-- drivers/base/power/opp/of.c | 2 +- drivers/base/power/opp/opp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 1715371ddd5affdd63c7cb5220d104062c74ad66 Author: Viresh Kumar Date: Mon Jan 2 14:40:56 2017 +0530 PM / OPP: Remove useless TODO This TODO doesn't make sense anymore as we have all the information in a single OPP table. Remove it. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/of.c | 2 -- 1 file changed, 2 deletions(-) commit 7f8538ebaefc075f364f14a4f4852b1885ed897c Author: Viresh Kumar Date: Mon Jan 2 14:40:55 2017 +0530 PM / OPP: Fix memory leak while adding duplicate OPPs There are two types of duplicate OPPs that get different behavior from the core: A) An earlier OPP is marked 'available' and has same freq/voltages as the new one. B) An earlier OPP with same frequency, but is marked 'unavailable' OR doesn't have same voltages as the new one. The OPP core returns 0 for the first one, but -EEXIST for the second. While the OPP core returns 0 for the first case, its callers don't free the newly allocated OPP structure which isn't used anymore. Fix that by returning -EBUSY instead of 0, but make the callers return 0 eventually. As this isn't a critical fix, its not getting marked for stable kernel. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 18 ++++++++++++++++-- drivers/base/power/opp/of.c | 6 +++++- 2 files changed, 21 insertions(+), 3 deletions(-) commit 698e0d1d22346ef03d7a13fcd9c2cc86a24bf317 Author: Marek Szyprowski Date: Thu Jan 26 13:37:53 2017 +0100 clk: samsung: exynos5433: Add data for 250MHz and 278MHz PLL rates Default clock configuration applied by the bootloader for TM2 and TM2e boards includes 250MHz and 278MHz rate for DISP PLL clock. To ensure such configuration for those boards with 'assigned-clock-*' properties, parameters for those two additional rates are needed. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 2 ++ 1 file changed, 2 insertions(+) commit 5ccb58968bf7f46dbd128df88f71838a5a9750b8 Author: Marek Szyprowski Date: Thu Jan 26 13:37:52 2017 +0100 clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Add missing identifiers for phyclk_mipidphy0_bitclkdiv8_phy and phyclk_mipidphy0_rxclkesc0_phy clocks. Access to those clocks is needed to setup initial clock configuration for display subsystem in device tree in order to avoid dependency on the configuration left by the bootloader. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 6 ++++-- include/dt-bindings/clock/exynos5433.h | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) commit 47087eeb744c83482774e8f6dc20cf2b11fff53f Author: Geliang Tang Date: Mon Dec 19 23:03:11 2016 +0800 PM / Hibernate: Use rb_entry() instead of container_of() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f497a4310646f14ab518ab6108dbef07f4606af Author: Corentin LABBE Date: Thu Dec 15 11:15:25 2016 +0100 PM / QoS: Remove unneeded linux/miscdevice.h include pm_qos.h does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Rafael J. Wysocki include/linux/pm_qos.h | 1 - 1 file changed, 1 deletion(-) commit 03bc39beb7602d967aaadfe82005d60167c21609 Author: Todd E Brandt Date: Wed Dec 14 10:37:07 2016 -0800 scripts: analyze_suspend.py: Update to upstream v4.5 - Kernel errors shown in timeline - Tool log: The tool output log is now available in the html timeline - Selective ftrace filter: can choose phase and test run (for x2) - further instrumentation of dev mode to cover wifi Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki scripts/analyze_suspend.py | 591 +++++++++++++++++++++------------------------ 1 file changed, 272 insertions(+), 319 deletions(-) commit 1ea39643b64a791406a7324a9c44b82ac646c9d8 Author: Todd E Brandt Date: Wed Dec 14 10:37:06 2016 -0800 scripts: analyze_suspend.py: Update to upstream v4.4 - when running with sudo, change output dir back to SUDO_USER ownership - replace all os.system/popen instances with subprocess.call/Popen - graph pm device callbacks and async threads in separate sections - remove kprobe config section and replaced it with timeline_functions - added new kprobe config section for dev mode: dev_timeline_functions - merge call loops in dev mode to create a single event with a count - added hover text to all header entries to explain what they mean - changed the -filter option to grep device driver/name for a string - added new options for tuning the dev mode timeline/custom kprobes Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki scripts/analyze_suspend.py | 565 ++++++++++++++++++++++++--------------------- 1 file changed, 300 insertions(+), 265 deletions(-) commit 203f1f986a0d8504f0f843b42fa7f087d0c91a29 Author: Todd E Brandt Date: Wed Dec 14 10:37:05 2016 -0800 scripts: analyze_suspend.py: Update to upstream v4.3 - config file support added - dev mode for monitoring kernel source calls and async kernel threads - custom command support for executing a user cmd instead of suspend - proc mode support for monitoring user processes with cpu exec data - kprobe support for custom function tracing - advanced callgraph support for function debug - many bug fixes and formatting upgrades Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki scripts/analyze_suspend.py | 972 ++++++++++++++++++++++++++++++--------------- 1 file changed, 660 insertions(+), 312 deletions(-) commit 2dc8ffad8c53e65f85d1a9ece2721463d729054a Author: Nick Desaulniers Date: Mon Dec 12 15:28:05 2016 -0800 ACPI / idle: small formatting fixes A quick cleanup with scripts/checkpatch.pl -f . Signed-off-by: Nick Desaulniers Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/cstate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7292ff67b9b28feb3bef97b437f08c7e7568786f Author: Russell King Date: Fri Jan 13 18:57:39 2017 +0000 arm64: dts: marvell: add generic-ahci compatibles for CP110 ahci Testing with an Armada 8040 board shows that adding the generic-ahci compatible to the CP110 AHCI nodes gets us working AHCI on the board. A previous patch series posted by Thomas Petazzoni was retracted when it was realised that the IP was supposed to be, and is, compatible with the standard register layout. Add this compatible. Signed-off-by: Russell King Acked-by: Mark Rutland Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 3 ++- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 64afa89ff60844f561a8934f40f0ed93e37b6a8b Author: Maxime Ripard Date: Tue Jan 24 10:41:19 2017 +0100 clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for the GPU In order to achieve all the rates asked by the GPU, we might need to change the parent frequency. Signed-off-by: Maxime Ripard Acked-by: Stephen Boyd Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf3be2caa593e1e35ff8d8d5b32c2c9a6a85e1d8 Author: Maxime Ripard Date: Tue Jan 24 10:41:18 2017 +0100 clk: sunxi-ng: Call divider_round_rate if we only have a single parent The divider_get_val function that is used in our determine_rate callback doesn't try to change the parent rate at all, while clk_divider_bestdiv, used in divider_round_rate, does. If we have a single parent, call divider_round_rate. Signed-off-by: Maxime Ripard Acked-by: Stephen Boyd Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fcd4f3c6d150357a02af8526e69bfebb82dd5d46 Author: Thomas Huth Date: Wed Jan 25 13:27:22 2017 +0100 KVM: PPC: Book3S PR: Refactor program interrupt related code into separate function The function kvmppc_handle_exit_pr() is quite huge and thus hard to read, and even contains a "spaghetti-code"-like goto between the different case labels of the big switch statement. This can be made much more readable by moving the code related to injecting program interrupts / instruction emulation into a separate function instead. Signed-off-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr.c | 130 +++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 65 deletions(-) commit ee55ae6194a5439bde3a3b8ee0abda63c610e740 Author: Krzysztof Kozlowski Date: Wed Jan 25 21:09:44 2017 +0200 soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register The register ARM_L2_OPTION (0x2608 in Exynos4 and Exynos5 PMU) was defined twice. Both names were used in the Exynos542x code. Simplify this. Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/suspend.c | 6 +++--- drivers/soc/samsung/exynos5250-pmu.c | 2 +- drivers/soc/samsung/exynos5420-pmu.c | 4 ++-- include/linux/soc/samsung/exynos-regs-pmu.h | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) commit 87108dc78eb8935b5cebab70f8158807d5a7617f Author: Boris Brezillon Date: Fri Jan 27 10:24:09 2017 +0100 memory: atmel-ebi: Enable the SMC clock if specified Newer versions of the SMC block requires the SMC clock to be enabled before the SMC logic can be used. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 51 +++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 14 deletions(-) commit 4cb3e3782776f82400a5d135909dda466b813d45 Author: Krzysztof Kozlowski Date: Wed Jan 25 21:34:51 2017 +0200 soc: samsung: pmu: Remove unused and duplicated defines The exynos-regs-pmu.h was never a complete list of PMU registers. It contained a lot of holes for registers which were not used. However, a lot of unused defines came along with porting the code from vendor kernel. Few of defines were also duplicated. Remove them so the file will be slightly smaller. Signed-off-by: Krzysztof Kozlowski include/linux/soc/samsung/exynos-regs-pmu.h | 72 +++-------------------------- 1 file changed, 7 insertions(+), 65 deletions(-) commit 8464c8842de2249061d3c5abc2ccce1bbbd10e7a Author: Paul Mackerras Date: Tue Dec 6 20:42:05 2016 +1100 KVM: PPC: Book3S HV: Fix H_PROD to actually wake the target vcpu The H_PROD hypercall is supposed to wake up an idle vcpu. We have an implementation, but because Linux doesn't use it except when doing cpu hotplug, it was never tested properly. AIX does use it, and reported it broken. It turns out we were waking the wrong vcpu (the one doing H_PROD, not the target of the prod) and we weren't handling the case where the target needs an IPI to wake it. Fix it by using the existing kvmppc_fast_vcpu_kick_hv() function, which is intended for this kind of thing, and by using the target vcpu not the current vcpu. We were also not looking at the prodded flag when checking whether a ceded vcpu should wake up, so this adds checks for the prodded flag alongside the checks for pending exceptions. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 987e079ecab7298cf5d5b43473d25bc31006e0e0 Author: Boris Brezillon Date: Fri Jan 27 10:10:37 2017 +0100 memory: atmel-ebi: Properly handle multiple reference to the same CS Some devices are defining several sub-ranges within the same CS iomem range. In this case, we should not duplicate the EBI device config. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 427456e4772caf155c20604a60265dbc5a126267 Author: Boris Brezillon Date: Fri Jan 27 10:10:36 2017 +0100 memory: atmel-ebi: Fix the test to enable generic SMC logic We should test the apply value and not the ret one here. Signed-off-by: Boris Brezillon Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver") Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bcf266462da736ae4b42d5c73cd5dc0da540772 Author: Thierry Reding Date: Mon Nov 21 10:25:31 2016 +0100 arm64: tegra: Use symbolic reset identifiers Now that the corresponding device tree binding include has been merged, convert the DTS files to use symbolic names instead of numeric ones. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 41 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 7e1c23b94ed7f0d2719795a9828402003de5335d Author: Geert Uytterhoeven Date: Wed Jan 25 14:19:31 2017 +0100 arm64: dts: r8a7796: Mark EthernetAVB device node disabled Device nodes representing I/O devices should be marked disabled in the SoC-specific DTS, and overridden by board-specific DTSes where needed. Fixes: 8e8b9eaef8fb05d9 ("arm64: dts: renesas: r8a7796: Add EthernetAVB instance") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0d1390ff283f6c38595288e7f74da6829896b8b7 Author: Geert Uytterhoeven Date: Wed Jan 25 14:19:30 2017 +0100 arm64: dts: r8a7795: Mark EthernetAVB device node disabled Device nodes representing I/O devices should be marked disabled in the SoC-specific DTS, and overridden by board-specific DTSes where needed. Fixes: a92843c8a6f8c039 ("arm64: dts: r8a7795: add EthernetAVB device node") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 1 + 1 file changed, 1 insertion(+) commit 769fa8369b9db469ffacb356766b78dd1c7eae5a Author: Kuninori Morimoto Date: Wed Dec 21 04:56:54 2016 +0000 arm64: dts: r8a7795: tidyup audma definition order Current r8a7795.dtsi defines audma -> ipmmu -> dma order. Because of this order, dma can connect to ipmmu, but audma can't connect to it. This patch moves audma order as ipmmu -> dma -> audma. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 132 +++++++++++++++---------------- 1 file changed, 66 insertions(+), 66 deletions(-) commit 239ac65fa5ffab71adf66e642750f940e7241d99 Author: Michel Dänzer Date: Wed Jan 25 17:21:31 2017 +0900 drm/ttm: Make sure BOs being swapped out are cacheable The current caching state may not be tt_cached, even though the placement contains TTM_PL_FLAG_CACHED, because placement can contain multiple caching flags. Trying to swap out such a BO would trip up the BUG_ON(ttm->caching_state != tt_cached); in ttm_tt_swapout. Cc: stable@vger.kernel.org Signed-off-by: Michel Dänzer Reviewed-by: Thomas Hellstrom Reviewed-by: Christian König . Reviewed-by: Sinclair Yeh Signed-off-by: Christian König drivers/gpu/drm/ttm/ttm_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23b028c871e1131c96aa8c2bd8cc7e0d15f5efcd Author: Michael Zoran Date: Wed Jan 25 16:39:49 2017 -0800 staging: bcm2835-audio: initial staging submission Initial cleanup of bcm2835-audio driver for the bcm2535(Raspberry PI) Driver provides HDMI audio through ALSA and is built on top of the vc04_services driver. Original version of the driver is available at: http://www.github.com/raspberry/linux Driver compiles without any build errors or warnings. Tested on a RPI 3 running in ARM64 mode with the vlc player and alsautils. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 2 + drivers/staging/bcm2835-audio/Kconfig | 7 + drivers/staging/bcm2835-audio/Makefile | 5 + drivers/staging/bcm2835-audio/bcm2835-ctl.c | 346 ++++++++ drivers/staging/bcm2835-audio/bcm2835-pcm.c | 560 +++++++++++++ drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 903 +++++++++++++++++++++ drivers/staging/bcm2835-audio/bcm2835.c | 519 ++++++++++++ drivers/staging/bcm2835-audio/bcm2835.h | 169 ++++ .../staging/bcm2835-audio/vc_vchi_audioserv_defs.h | 121 +++ 10 files changed, 2634 insertions(+) commit e7b56b14b87964c8caeb9e9ee7e823f578c0dc1e Author: Colin Vidal Date: Thu Jan 26 20:22:00 2017 +0100 staging/rtl8192u: add endianness conversions Fields frag_size and playload_size of struct ieee80211_txb are encoded as short little-endian. This patch adds conversions to / from cpu byte order when copy / write these values in variables of architecture independent byte order. It also avoid a sparse type warning. Signed-off-by: Colin Vidal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e99c2d2405fd10765c8d154961f5ae6bfebf890 Author: simran singhal Date: Fri Jan 27 03:39:36 2017 +0530 staging: rtl8192u: Adding space after ',' This patch fixes the checkpatch issue by adding space after ','. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fa687e739c22602abac55df6b58402307dc011bb Author: simran singhal Date: Fri Jan 27 03:01:34 2017 +0530 staging: rtl8192u: Adding space around '=' This patch fixes the checkpatch issue by adding space around '='. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95134d435c765ca3a2b11d245c7520450ff16e30 Author: =?UTF-8?q?Simon=20Sandstr=C3=B6m?= Date: Thu Jan 26 22:29:48 2017 +0100 staging: vt6656: Add missing identifier names Fix multiple checkpatch.pl warnings: function definition argument '...' should also have an identifier name Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 520488621eb074628457d09fb7651eb1de180db7 Author: Ernestas Kulik Date: Tue Jan 24 19:40:50 2017 +0200 staging: lustre: llite: use octal permissions Using octal permissions instead of symbolic ones is preferred. Signed-off-by: Ernestas Kulik Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ++-- drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit b40b4bc5fb06e957ab800a08a0b4d00b6e667ba4 Author: Ernestas Kulik Date: Tue Jan 24 19:40:49 2017 +0200 staging: lustre: libcfs: use octal permissions Using octal permissions instead of symbolic ones is preferred. Signed-off-by: Ernestas Kulik Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74e3bb75315ce62a4567f2871276bab32802e8b4 Author: Arnd Bergmann Date: Wed Jan 25 23:36:34 2017 +0100 staging: lustre: ptlrpc: avoid warning on missing return The newly added function triggers a harmless warning: drivers/staging/lustre/lustre/ptlrpc/pack_generic.c: In function 'lustre_shrink_msg': drivers/staging/lustre/lustre/ptlrpc/pack_generic.c:472:1: error: control reaches end of non-void function [-Werror=return-type] This probably happens because LASSERTF() contains an 'unlikely()' that sometimes prevents gcc from analysing the control flow correctly. Adding a return statement here seems harmless and lets us keep that unlikely(). Fixes: 96049bd1ecd0 ("staging: lustre: ptlrpc: embed highest XID in each request") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + 1 file changed, 1 insertion(+) commit f3147b66a8132a021561d6339a78191471f29dc0 Author: Sebastian Haas Date: Wed Jan 25 23:47:43 2017 +0100 staging: most: hdm-usb: fix symbolic permissions warning Replace symbolic permissions with their octect representation to fix checkpatch warnings. Signed-off-by: Sebastian Haas Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62f79ecdb8d24b0f986edebd3e538eaa580df92c Author: Umang Raghuvanshi Date: Thu Jan 26 14:40:59 2017 +0000 staging: fbtft: fix unaligned parentheses Fix the following formatting issues: CHECK: Alignment should match open parenthesis Signed-off-by: Umang Raghuvanshi Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 33b8807a6fe10d0e675e0704444373a6fad93188 Author: Johan Hovold Date: Thu Jan 26 12:37:32 2017 +0100 staging: greybus: loopback: fix broken udelay The loopback driver allows the user to set a minimum delay of up to one second to be inserted between test iterations (i.e. request submissions). The delay is currently specified in microseconds and is implemented using udelay. Busy looping for long periods is not just anti-social; udelay must not be used for delays longer than a few milliseconds due to the risk of integer overflow. Replace the broken udelay with a usleep_range with a 100 us range for short delays (< 20 ms) and otherwise revert to using msleep. Fixes: b36f04fa9417 ("greybus: loopback: Convert thread delay to microseconds") Signed-off-by: Johan Hovold Cc: stable # 4.9+ Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 946d7c78a07e78bcfb9e47d123e3f0c216bc3c74 Author: Franck Demathieu Date: Wed Jan 25 18:38:01 2017 +0100 staging: greybus: sdio: Prefer u32 over uint32_t It fixes the following issue reported by checkpatch.pl: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Franck Demathieu Acked-by: Rui Miguel Silva Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 414850d9ce650bf75576126e52948595e3bbf871 Author: Johan Hovold Date: Wed Jan 25 18:07:52 2017 +0100 staging: greybus: uart: fix TIOCGSERIAL flags This driver does not have a low-latency mode and should not report anything else. Also drop the skip-test flag which isn't used either. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 1 - 1 file changed, 1 deletion(-) commit 0b10f64dbe60cb1b2056f647c052b4278627fe24 Author: Vivek Gautam Date: Fri Jan 27 13:40:19 2017 +0530 phy: qcom-ufs: Fix misplaced jump label We want to skip only tx/rx_iface clocks and not ref_clk_src as well. Fix the jump label accordingly. Fixes: 300f96771d78 ("phy: qcom-ufs: Skip obtaining rx/tx_iface_clk for msm8996 based phy") Cc: Subhash Jadavani Cc: Martin K. Petersen Cc: Kishon Vijay Abraham I Cc: stable@vger.kernel.org Signed-off-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bacdbc76b5aad0c109198e0b289d759e0cb9a9b Author: Geert Uytterhoeven Date: Tue Jan 17 13:49:20 2017 +0100 arm64: dts: r8a7796: Link ARM GIC to clock and clock domain Link the ARM GIC to the INTC-AP module clock, and add it to the SYSC "always-on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit b6e56e4c1fd747028437956f48832452462ef407 Author: Geert Uytterhoeven Date: Tue Jan 17 13:49:19 2017 +0100 arm64: dts: r8a7795: Link ARM GIC to clock and clock domain Link the ARM GIC to the INTC-AP module clock, and add it to the SYSC "always-on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit af25d1c2a9cac5fde6e77836c33a3689077ffd2a Author: Wolfram Sang Date: Fri Jan 20 12:26:43 2017 +0100 arm64: dts: r8a7796: Add R-Car Gen3 thermal support Signed-off-by: Hien Dang Signed-off-by: Thao Nguyen Signed-off-by: Khiem Nguyen Signed-off-by: Niklas Söderlund Acked-by: Eduardo Valentin Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit b443cd1740a28195e965d78b9478a88117ea73f9 Author: Wolfram Sang Date: Fri Jan 20 12:26:42 2017 +0100 arm64: dts: r8a7795: Add R-Car Gen3 thermal support Signed-off-by: Hien Dang Signed-off-by: Thao Nguyen Signed-off-by: Khiem Nguyen Signed-off-by: Niklas Söderlund Acked-by: Eduardo Valentin Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 2cab226c345378b3cff652a9c8232f5070d31216 Author: Geert Uytterhoeven Date: Mon Jan 16 17:57:53 2017 +0100 arm64: dts: r8a7795: Add missing power-domains property for sata This went unnoticed as the sata_rcar driver doesn't support Runtime PM yet, but manages module clocks manually. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 1 + 1 file changed, 1 insertion(+) commit aa42db44f6705334c6130103492484ea3c7199b3 Author: Arnd Bergmann Date: Wed Jan 25 23:19:01 2017 +0100 8250: of: remove remnants of generic of_serial driver During build testing, I ran into a warning in a driver that I had written myself at some point: drivers/tty/serial/8250/8250_of.c: In function 'of_platform_serial_probe': drivers/tty/serial/8250/8250_of.c:233:1: error: the frame size of 1200 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] This is harmless by itself, but it shows two other problems in the driver: - It still tries to be generic enough to handle all kinds of serial ports, where in reality the driver has been 8250-only for a while, and every other uart has its own DT support - As a result of that generalization, we keep two copies of 'struct uart_port' on the stack during probe(). This is completely unnessary. Removing the last code dealing with unsupported port_type values solves both problems nicely, and reduces the stack size. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 93 ++++++++++----------------------------- 1 file changed, 24 insertions(+), 69 deletions(-) commit 54b12c48f0c603f25bac3c7c58a02cee65610171 Author: Geert Uytterhoeven Date: Wed Jan 25 15:55:49 2017 +0100 serial: sh-sci: Reformat sci_parse_dt() for git diff As the function header of sci_parse_dt() is split in an unusual way, "git diff" gets confused when changes to the body of the function are made, and attributes them to the wrong function. Reformat the function header to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2331e06865047a0c4ff3fb838716210e7a296a4d Author: Bhumika Goyal Date: Wed Jan 25 23:18:52 2017 +0530 tty: serial: constify uart_ops structures Declare uart_ops structures as const as they are only stored in the ops field of an uart_port structure. This field is of type const, so uart_ops structures having this property can be made const too. File size details before and after patching. First line of every .o file shows the file size before patching and second line shows the size after patching. text data bss dec hex filename 2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o 3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o 3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o 3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o 10668 753 1 11422 2c9e drivers/tty/serial/icom.o 10860 561 1 11422 2c9e drivers/tty/serial/icom.o 23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o 24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o 10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o 10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o 7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o 8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o 10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o 10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o 8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o 8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o 3808 456 0 4264 10a8 drivers/tty/serial/pxa.o 4000 264 0 4264 10a8 drivers/tty/serial/pxa.o 21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o 22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o 2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o 2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o 5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o 5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o 6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o 6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o Cross compiled for mips architecture. 3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o 3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o 4272 196 1056 5524 1594 drivers/tty/serial/dz.o 4368 100 1056 5524 1594 drivers/tty/serial/dz.o 6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o 6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o 9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o 9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o 4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o 4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o Cross compiled for arm archiecture. 11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o 11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o 13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o 13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o Cross compiled for sparc architecture. 4664 528 32 5224 1468 drivers/tty/serial/sunhv.o 4848 344 32 5224 1468 drivers/tty/serial/sunhv.o 8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o 8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o Cross compiled for ia64 architecture. 10226 549 472 11247 2bef drivers/tty/serial/sn_console.o 10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and drivers/tty/serial/lantiq.o did not compile. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl010.c | 2 +- drivers/tty/serial/amba-pl011.c | 2 +- drivers/tty/serial/ar933x_uart.c | 2 +- drivers/tty/serial/dz.c | 2 +- drivers/tty/serial/efm32-uart.c | 2 +- drivers/tty/serial/icom.c | 2 +- drivers/tty/serial/ioc3_serial.c | 2 +- drivers/tty/serial/ioc4_serial.c | 2 +- drivers/tty/serial/ip22zilog.c | 2 +- drivers/tty/serial/lantiq.c | 2 +- drivers/tty/serial/lpc32xx_hs.c | 2 +- drivers/tty/serial/mpsc.c | 2 +- drivers/tty/serial/omap-serial.c | 2 +- drivers/tty/serial/pmac_zilog.c | 2 +- drivers/tty/serial/pnx8xxx_uart.c | 2 +- drivers/tty/serial/pxa.c | 2 +- drivers/tty/serial/serial-tegra.c | 2 +- drivers/tty/serial/serial_txx9.c | 2 +- drivers/tty/serial/sirfsoc_uart.c | 2 +- drivers/tty/serial/sn_console.c | 2 +- drivers/tty/serial/sprd_serial.c | 2 +- drivers/tty/serial/sunhv.c | 2 +- drivers/tty/serial/sunzilog.c | 2 +- drivers/tty/serial/vr41xx_siu.c | 2 +- drivers/tty/serial/vt8500_serial.c | 2 +- drivers/tty/serial/zs.c | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) commit f2d697604cc860a177b793f669b22ef9c13131b9 Author: Wei Yongjun Date: Wed Jan 25 14:09:52 2017 +0000 eeprom: idt_89hpesx: Drop kfree for memory allocated with devm_kzalloc It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") Signed-off-by: Wei Yongjun Signed-off-by: Dan Carpenter Acked-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 4 ---- 1 file changed, 4 deletions(-) commit aed74b140e10725caf8a982ea26610d1dd1f612c Author: Serge Semin Date: Thu Jan 26 16:00:36 2017 +0300 eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc Indeed, the data structure is allocated by device resource manager, so the driver doesn't need to free anything on remove() callback. Reported-by: Julia Lawall Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 3 --- 1 file changed, 3 deletions(-) commit ba0c6d0087510b5db4d4b4f96f202bc893844c55 Author: Noralf Trønnes Date: Thu Jan 26 23:56:05 2017 +0100 drm/atomic: Remove drm_atomic_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so no need to call drm_debugfs_remove_files(). Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-4-noralf@tronnes.org drivers/gpu/drm/drm_atomic.c | 7 ------- drivers/gpu/drm/drm_crtc_internal.h | 1 - drivers/gpu/drm/drm_debugfs.c | 9 --------- 3 files changed, 17 deletions(-) commit d963654e109565cf73399815d7585917f2d69a30 Author: Khiem Nguyen Date: Mon Apr 4 09:01:19 2016 +0700 clk: renesas: r8a7796: Add IIC-DVFS clock This patch adds DVFS clock for R8A7796 SoC. Signed-off-by: Khiem Nguyen Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Acked-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 2c8e79898c9af08e04b36d3678384642b59f6509 Author: Keita Kobayashi Date: Mon May 23 11:05:42 2016 +0900 clk: renesas: r8a7795: Add IIC-DVFS clock This patch adds DVFS clock for R8A7795 SoC. Signed-off-by: Keita Kobayashi Signed-off-by: Gaku Inami Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Acked-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 6197aa65c4905532943155d03031ba0f3a4b2a3b Author: Geert Uytterhoeven Date: Fri Jan 20 11:03:03 2017 +0100 clk: renesas: cpg-mssr: Add support for reset control Add optional support for the Reset Control feature of the Renesas Clock Pulse Generator / Module Standby and Software Reset module on R-Car Gen2, R-Car Gen3, and RZ/G1 SoCs. This allows to reset SoC devices using the Reset Controller API. Signed-off-by: Geert Uytterhoeven Acked-by: Philipp Zabel Acked-by: Stephen Boyd Reviewed-by: Niklas Söderlund drivers/clk/renesas/renesas-cpg-mssr.c | 126 +++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) commit a4ea6a0f83073f256547a49fa6433806cee2cc87 Author: Geert Uytterhoeven Date: Fri Jan 20 10:58:11 2017 +0100 clk: renesas: cpg-mssr: Rename cpg_mssr_priv.mstp_lock The spinlock is used to protect Read-Modify-Write register accesses, which won't be limited to SMSTPCR register accesses. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd drivers/clk/renesas/renesas-cpg-mssr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 67c995b55e1ade919a0037723ecc9210c79007f8 Author: Geert Uytterhoeven Date: Fri Jan 20 10:53:11 2017 +0100 clk: renesas: cpg-mssr: Document suitability for RZ/G1 The Renesas CPG/MSSR driver is already in active use for RZ/G1 since commits c0b2d75d2a4bf6a3 ("clk: renesas: cpg-mssr: Add R8A7743 support") and 9127d54bb8947159 ("clk: renesas: cpg-mssr: Add R8A7745 support"). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98aabfff7df441597c27a57584f8a1d5cfd506b7 Author: Geert Uytterhoeven Date: Mon Oct 12 11:35:34 2015 +0200 dt-bindings: clock: renesas: cpg-mssr: Document reset control support Document properties needed to use the Reset Control feature of the Renesas Clock Pulse Generator / Module Standby and Software Reset module. Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 1ce87dd2f0bb8dee1378ec3bff94c4454feaaa30 Author: Geert Uytterhoeven Date: Mon Jan 23 10:48:21 2017 +0100 clk: renesas: mstp: Reformat cpg_mstp_clock_register() for git diff As the function header of cpg_mstp_clock_register() is split in an unusual way, "git diff" gets confused when changes to the body of the function are made, and attributes them to the wrong function. Reformat the function header to fix this. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd drivers/clk/renesas/clk-mstp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a67834f8bfa1e2f48bb27d07b9a552ba7c3af82a Author: Noralf Trønnes Date: Thu Jan 26 23:56:04 2017 +0100 drm: drm_minor_register(): Clean up debugfs on failure Call drm_debugfs_cleanup() in case drm_debugfs_init() fails to cover for failure in the drm_driver.debugfs_init callback. Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-3-noralf@tronnes.org drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 086f2e5cde747dcae800b2d8b0ac7741a8c6fcbe Author: Noralf Trønnes Date: Thu Jan 26 23:56:03 2017 +0100 drm: debugfs: Remove all files automatically on cleanup Instead of having the drivers call drm_debugfs_remove_files() in their drm_driver->debugfs_cleanup hook, do it automatically by traversing minor->debugfs_list. Also use debugfs_remove_recursive() so drivers who add their own debugfs files don't have to keep track of them for removal. Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-2-noralf@tronnes.org drivers/gpu/drm/drm_debugfs.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 73f1a5858bf82f3bf2326af2d2adea7305c830de Author: Philipp Zabel Date: Thu Jan 26 16:32:17 2017 +0100 drm/fourcc: add vivante tiled layout format modifiers Vivante GC hardware uses simple 4x4 tiled and nested 64x64 supertiled formats as well as so-called split-tiled variants for dual-pipe hardware, where even and odd tiles start at different base addresses. Signed-off-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126153217.26916-1-p.zabel@pengutronix.de include/uapi/drm/drm_fourcc.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 6bce1974f64aba108ad344cb2ef0110d9c09ebd2 Author: Chanwoo Choi Date: Wed Jan 25 12:55:35 2017 +0100 soc: samsung: pm_domains: Add new Exynos5433 compatible Add a new compatible string for Exynos5433 because it uses the 0xf value instead of 0x7 for domain on/off registers. Signed-off-by: Jonghwa Lee Signed-off-by: Chanwoo Choi Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/power/pd-samsung.txt | 1 + drivers/soc/samsung/pm_domains.c | 7 +++++++ 2 files changed, 8 insertions(+) commit fb43e86f42dbba09472c1e87c8d8b866767bcc51 Author: Randy Dunlap Date: Thu Jan 26 09:42:41 2017 -0800 phy: fix rockchip-inno-usb2 build errors Fix build errors in phy-rockchip-inno-usb2.c. The driver uses extcon interfaces so it should depend on EXTCON. Fixes these build errors: drivers/built-in.o: In function `rockchip_usb2phy_otg_sm_work': phy-rockchip-inno-usb2.c:(.text+0x2bcb): undefined reference to `extcon_get_state' phy-rockchip-inno-usb2.c:(.text+0x2cd4): undefined reference to `extcon_set_state_sync' phy-rockchip-inno-usb2.c:(.text+0x2cec): undefined reference to `extcon_set_state_sync' phy-rockchip-inno-usb2.c:(.text+0x2d2d): undefined reference to `extcon_get_state' drivers/built-in.o: In function `rockchip_usb2phy_probe': phy-rockchip-inno-usb2.c:(.text+0x31d7): undefined reference to `extcon_get_edev_by_phandle' phy-rockchip-inno-usb2.c:(.text+0x321a): undefined reference to `devm_extcon_dev_allocate' phy-rockchip-inno-usb2.c:(.text+0x3230): undefined reference to `devm_extcon_dev_register' phy-rockchip-inno-usb2.c:(.text+0x375a): undefined reference to `extcon_register_notifier' Found in linux-next but is also needed in mainline. Signed-off-by: Randy Dunlap Cc: MyungJoo Ham Cc: Chanwoo Choi Cc: Heiko Stuebner Reviewed-by: Chanwoo Choi Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d7bc1a7d41bfb99ded18e91c1976276a8445768a Author: Yendapally Reddy Dhananjaya Reddy Date: Tue Jan 17 11:14:29 2017 -0500 phy: Add USB3 PHY support for Broadcom NSP SoC This patch adds support for Broadcom NSP USB3 PHY Signed-off-by: Yendapally Reddy Dhananjaya Reddy Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 8 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-bcm-nsp-usb3.c | 177 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+) commit c8ca631f9480cb4c6df78dd3d2eeeb5ac99ba4f3 Author: Yendapally Reddy Dhananjaya Reddy Date: Tue Jan 17 11:14:27 2017 -0500 dt-bindings: phy: Add documentation for NSP USB3 PHY Add documentation for USB3 PHY available in Northstar plus SoC Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/brcm,nsp-usb3-phy.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 42020c70656f9966e9ed83f9fe67369b0abf75e8 Author: Bjorn Andersson Date: Sun Jan 22 13:17:49 2017 -0800 phy: qcom-ufs: Suppress extraneous logging The error paths of the common qcom-ufs functions for registering the phy, acquiring clocks and acquiring regulators all print specific error messages before returning an error, so there is no value in printing yet another - more generic - message when this occur. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-ufs-qmp-14nm.c | 15 +++------------ drivers/phy/phy-qcom-ufs-qmp-20nm.c | 12 ++---------- 2 files changed, 5 insertions(+), 22 deletions(-) commit 96c163f108ef7c0102ff71a543f5d5f2ad5c60a7 Author: Bjorn Andersson Date: Sun Jan 22 13:17:48 2017 -0800 phy: qcom-ufs: Remove -always-on property The fact that a regulator is always-on is a property of the regulator, not a specific consumer. Implementing this in the driver leads to a system behaviour that is dependent on if the Qualcomm UFS PHY was ever (partially) probed. If the specific regulator should be always on in a particular device, mark it so by specifying "regulator-always-on" in the regulator node. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - drivers/phy/phy-qcom-ufs-i.h | 1 - drivers/phy/phy-qcom-ufs.c | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) commit 3471426f6ddb341debb0fc500ea9b4bb5f3f74ec Author: Bjorn Andersson Date: Sun Jan 22 13:17:47 2017 -0800 phy: qcom-ufs: Correct usage of regulator_get() When regulator_get() tries to resolve a regulator supply but fail to find a matching property in DeviceTree it returns a dummy regulator, if a matching supply is specified but unavailable the regulator core will return an error. Based on this we should not ignore errors upon failing to acquire the optional "vddp-ref-clk" supply. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-ufs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit e7d5e412160c2143de1f818668774b33b3cdab0b Author: Bjorn Andersson Date: Sun Jan 22 13:17:46 2017 -0800 phy: qcom-ufs: Don't kfree devres resource Upon failing to acquire regulator supplies the qcom-ufs driver calls kfree() on the devm allocated memory used to store the name of the regulator, leading to devres corruption. Rather than switching to using the appropriate free function the patch acknowledge the fact that "name" is always a constant string and we don't actually need to create a local copy of it, but rather just reference the constant string. Fixes: add78fc05702 ("phy: qcom-ufs: Use devm sibling of kstrdup for regulator names") Cc: stable@vger.kernel.org Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-ufs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit e2427b09ba929c2b9d02556b74a85161a7364792 Author: Stephen Boyd Date: Wed Jan 25 14:32:45 2017 -0800 phy: Add support for Qualcomm's USB HS phy The high-speed phy on qcom SoCs is controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Acked-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/qcom,usb-hs-phy.txt | 84 ++++++ drivers/phy/Kconfig | 8 + drivers/phy/Makefile | 1 + drivers/phy/phy-qcom-usb-hs.c | 296 +++++++++++++++++++++ 4 files changed, 389 insertions(+) commit 605b8652f7f005452c89db1e6cef085479da2f16 Author: Stephen Boyd Date: Wed Jan 25 14:32:44 2017 -0800 phy: Add support for Qualcomm's USB HSIC phy The HSIC USB controller on qcom SoCs has an integrated all digital phy controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Acked-by: Rob Herring Cc: Signed-off-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 65 +++++++++ drivers/phy/Kconfig | 7 + drivers/phy/Makefile | 1 + drivers/phy/phy-qcom-usb-hsic.c | 160 +++++++++++++++++++++ 4 files changed, 233 insertions(+) commit 5d25fde23b3176c7f94d2a992cb9762707d7c2a0 Author: Shyam Saini Date: Thu Jan 19 13:45:34 2017 -0800 drm/vmwgfx: Use kmemdup instead of kmalloc and memcpy When some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8c95742e566f3945f992472a5f99f78aaa7f890b Author: Sinclair Yeh Date: Wed Jan 18 14:14:01 2017 -0800 drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format Currently the pitch is passed in as depth. This causes drm_mode_legacy_fb_format() to return the wrong pixel format. The wrong pixel format will be rejected by vmw_kms_new_framebuffer(), thus leaving par->set_fb to NULL. This eventually causes a crash in vmw_fb_setcolreg() when the code tries to dereference par->set_fb. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0f580386b6ad295c04c1b32120826494f8a29c1c Author: Thomas Hellstrom Date: Thu Jan 19 11:01:04 2017 -0800 drm/vmwgfx: Fix a potential integer overflow Found by coverity. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Charmaine Lee drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fd67c1cb80231ff18633d5a22f56efe1f6ee917 Author: Thomas Hellstrom Date: Thu Jan 19 10:58:52 2017 -0800 drm/vmwgfx: Clear an uninitialized struct member The uninitialized bug unused member confused coverity. Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h | 2 ++ 1 file changed, 2 insertions(+) commit f08c86c30e967b8dd37060b66046667790cc9995 Author: Thomas Hellstrom Date: Thu Jan 19 10:57:00 2017 -0800 drm/vmwgfx: Annotate ignored return values Cast return values to void since they, based on input arguments, are known to be zero. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Charmaine Lee drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8cd9f2514711019c0a5f99b8c8547d255d85c3f0 Author: Thomas Hellstrom Date: Thu Jan 19 10:53:02 2017 -0800 drm/vmwgfx: Clear uninitialized fields of a parameter The uninitialized field is not currently used, but might be in the future, and static analyzers complain. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Charmaine Lee drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ede531773ea69fa56b02a873ed83ce3507eb8d5 Author: Nicholas Piggin Date: Thu Dec 22 04:29:26 2016 +1000 KVM: PPC: Book3S: Move 64-bit KVM interrupt handler out from alt section A subsequent patch to make KVM handlers relocation-safe makes them unusable from within alt section "else" cases (due to the way fixed addresses are taken from within fixed section head code). Stop open-coding the KVM handlers, and add them both as normal. A more optimal fix may be to allow some level of alternate feature patching in the exception macros themselves, but for now this will do. The TRAMP_KVM handlers must be moved to the "virt" fixed section area (name is arbitrary) in order to be closer to .text and avoid the dreaded "relocation truncated to fit" error. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/head-64.h | 2 +- arch/powerpc/kernel/exceptions-64s.S | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit d3918e7fd4a27564f93ec46d0359a9739c5deb8d Author: Nicholas Piggin Date: Thu Dec 22 04:29:25 2016 +1000 KVM: PPC: Book3S: Change interrupt call to reduce scratch space use on HV Change the calling convention to put the trap number together with CR in two halves of r12, which frees up HSTATE_SCRATCH2 in the HV handler. The 64-bit PR handler entry translates the calling convention back to match the previous call convention (i.e., shared with 32-bit), for simplicity. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 24 +++++++++++------------- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 16 +++++++++------- arch/powerpc/kvm/book3s_segment.S | 25 ++++++++++++++++++------- 3 files changed, 38 insertions(+), 27 deletions(-) commit a5b2b6ebf34b20e70a2bdb5214c371744e7fa260 Author: Chris Wilson Date: Wed Jan 25 10:10:44 2017 +0000 drm/sti: Fix compilation failure for drm_framebuffer.pixel_format drivers/gpu/drm/sti/sti_plane.c:76:33: error: ‘struct drm_framebuffer’ has no member named ‘pixel_format’; did you mean ‘format’? I didn't look to hard at the casting to a char * and just did a mechanical transformation of s/pixel_format/format->format/ as given in commit 438b74a5497c ("drm: Nuke fb->pixel_format"). Fixes: 438b74a5497c ("drm: Nuke fb->pixel_format") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Benjamin Gaignard Cc: Vincent Abriou Acked-by: Vincent Abriou Reviewed-by: Ville Syrjälä Signed-off-by: Dave Airlie drivers/gpu/drm/sti/sti_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3875623c561f9e83181d9621e0a963ed457c4bf6 Merge: a7e2641 6f897f5 Author: Dave Airlie Date: Fri Jan 27 12:10:24 2017 +1000 Merge tag 'drm-misc-next-2017-01-23' of git://anongit.freedesktop.org/git/drm-misc into drm-next - cleanups&fixes for dw-hdmi bride driver (Laurent) - updates for adv bridge driver (John Stultz) for nexus - drm_crtc_from_index helper rollout (Shawn Guo) - removing drm_framebuffer_unregister_private from drivers&core - target_vblank (Andrey Grodzovsky) - misc tiny stuff * tag 'drm-misc-next-2017-01-23' of git://anongit.freedesktop.org/git/drm-misc: (49 commits) drm: qxl: Open code teardown function for qxl drm: qxl: Open code probing sequence for qxl drm/bridge: adv7511: Re-write the i2c address before EDID probing drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event() drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context drm: vc4: use crtc helper drm_crtc_from_index() drm: tegra: use crtc helper drm_crtc_from_index() drm: nouveau: use crtc helper drm_crtc_from_index() drm: mediatek: use crtc helper drm_crtc_from_index() drm: kirin: use crtc helper drm_crtc_from_index() drm: exynos: use crtc helper drm_crtc_from_index() dt-bindings: display: dw-hdmi: Clean up DT bindings documentation drm: bridge: dw-hdmi: Assert SVSRET before resetting the PHY drm: bridge: dw-hdmi: Fix the name of the PHY reset macros drm: bridge: dw-hdmi: Define and use macros for PHY register addresses drm: bridge: dw-hdmi: Detect PHY type at runtime drm: bridge: dw-hdmi: Handle overflow workaround based on device version ... commit a7e2641aafe261bf70de01ff5fc68dea50468237 Merge: c4d79c2 add6329 Author: Dave Airlie Date: Fri Jan 27 12:08:32 2017 +1000 Merge tag 'drm-intel-next-2017-01-23' of git://anongit.freedesktop.org/git/drm-intel into drm-next Final block of feature work for 4.11: - gen8 pd cleanup from Matthew Auld - more cleanups for view/vma (Chris) - dmc support on glk (Anusha Srivatsa) - use core crc api (Tomue) - track wedged requests using fence.error (Chris) - lots of psr fixes (Nagaraju, Vathsala) - dp mst support, acked for merging through drm-intel by Takashi (Libin) - huc loading support, including uapi for libva to use it (Anusha Srivatsa) * tag 'drm-intel-next-2017-01-23' of git://anongit.freedesktop.org/git/drm-intel: (111 commits) drm/i915: Update DRIVER_DATE to 20170123 drm/i915: reinstate call to trace_i915_vma_bind drm/i915: Assert that created vma has a whole number of pages drm/i915: Assert the drm_mm_node is allocated when on the VM lists drm/i915: Treat an error from i915_vma_instance() as unlikely drm/i915: Reject vma creation larger than address space drm/i915: Use common LRU inactive vma bumping for unpin_from_display drm/i915: Do an unlocked wait before set-cache-level ioctl drm/i915/huc: Assert that HuC vma is placed in GuC accessible range drm/i915/huc: Avoid attempting to authenticate non-existent fw drm/i915: Set adjustment to zero on Up/Down interrupts if freq is already max/min drm/i915: Remove the double handling of 'flags from intel_mode_from_pipe_config() drm/i915: Remove crtc->config usage from intel_modeset_readout_hw_state() drm/i915: Release temporary load-detect state upon switching drm/i915: Remove i915_gem_object_to_ggtt() drm/i915: Remove i915_vma_create from VMA API drm/i915: Add a check that the VMA instance we lookup matches the request drm/i915: Rename some warts in the VMA API drm/i915: Track pinned vma in intel_plane_state drm/i915/get_params: Add HuC status to getparams ... commit c4d79c22015564a9d922715434a0ec09d1deee30 Author: Dave Airlie Date: Fri Jan 27 12:04:08 2017 +1000 Reinstate "drm/probe-helpers: Drop locking from poll_enable"" This reverts commit 54a07c7bb0da0343734c78212bbe9f3735394962, and reinstates the original. [airlied: this might be a bad plan for git]. commit 3846fd9b86001bea171943cc3bb9222cb6da6b42 Author: Daniel Vetter Date: Wed Jan 11 10:01:17 2017 +0100 drm/probe-helpers: Drop locking from poll_enable It was only needed to protect the connector_list walking, see commit 8c4ccc4ab6f64e859d4ff8d7c02c2ed2e956e07f Author: Daniel Vetter Date: Thu Jul 9 23:44:26 2015 +0200 drm/probe-helper: Grab mode_config.mutex in poll_init/enable Unfortunately the commit message of that patch fails to mention that the new locking check was for the connector_list. But that requirement disappeared in commit c36a3254f7857f1ad9badbe3578ccc92be541a8e Author: Daniel Vetter Date: Thu Dec 15 16:58:43 2016 +0100 drm: Convert all helpers to drm_connector_list_iter and so we can drop this again. This fixes a locking inversion on nouveau, where the rpm code needs to re-enable. But in other places the rpm_get() calls are nested within the big modeset locks. While at it, also improve the kerneldoc for these two functions a notch. v2: Update the kerneldoc even more to explain that these functions can't be called concurrently, or bad things happen (Chris). drivers/gpu/drm/drm_probe_helper.c | 51 ++++++++++++++---------------------- drivers/gpu/drm/i915/intel_hotplug.c | 4 +-- include/drm/drm_crtc_helper.h | 1 - 3 files changed, 22 insertions(+), 34 deletions(-) commit b0df0b251b25b0bf89ef3e518330fcac300add86 Merge: f0493e6 ff9f8a7 Author: Dave Airlie Date: Fri Jan 27 11:00:42 2017 +1000 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next Backmerge Linus master to get the connector locking revert. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: (645 commits) sysctl: fix proc_doulongvec_ms_jiffies_minmax() Revert "drm/probe-helpers: Drop locking from poll_enable" MAINTAINERS: add Dan Streetman to zbud maintainers MAINTAINERS: add Dan Streetman to zswap maintainers mm: do not export ioremap_page_range symbol for external module mn10300: fix build error of missing fpu_save() romfs: use different way to generate fsid for BLOCK or MTD frv: add missing atomic64 operations mm, page_alloc: fix premature OOM when racing with cpuset mems update mm, page_alloc: move cpuset seqcount checking to slowpath mm, page_alloc: fix fast-path race with cpuset update or removal mm, page_alloc: fix check for NULL preferred_zone kernel/panic.c: add missing \n fbdev: color map copying bounds checking frv: add atomic64_add_unless() mm/mempolicy.c: do not put mempolicy before using its nodemask radix-tree: fix private list warnings Documentation/filesystems/proc.txt: add VmPin mm, memcg: do not retry precharge charges proc: add a schedule point in proc_pid_readdir() ... commit 86e12eac1f7f84b03512ecfa110c48b9204e6286 Author: Ulf Hansson Date: Thu Dec 8 14:45:20 2016 +0100 PM / Domains: Rename functions in genpd for power on/off Currently the mix of genpd_poweron(), genpd_power_on(), genpd_sync_poweron() and the ->power_on() callback, makes a bit difficult to follow the path of execution. The similar applies to the functions dealing with power off. In a way to improve this understanding, let's do the following renaming: genpd_power_on() -> _genpd_power_on() genpd_poweron() -> genpd_power_on() genpd_sync_poweron() -> genpd_sync_power_on() genpd_power_off() -> _genpd_power_off() genpd_poweroff() -> genpd_power_off() genpd_sync_poweroff() -> genpd_sync_power_off() genpd_poweroff_unused() -> genpd_power_off_unused() Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 2e6f38cef8838a5edd6051c3110ecf06f37ec544 Author: Pierre-Louis Bossart Date: Mon Jan 23 12:07:45 2017 -0600 platform/x86: fix typo in comment s/Acumulate/Accumulate/ Signed-off-by: Pierre-Louis Bossart Acked-by: Andy Shevchenko Signed-off-by: Stephen Boyd include/linux/platform_data/x86/pmc_atom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 282a4e4ce5f99e3c166abac929498885a711e19f Author: Irina Tirdea Date: Mon Jan 23 12:07:44 2017 -0600 platform/x86: Enable Atom PMC platform clocks The BayTrail and CherryTrail platforms provide platform clocks through their Power Management Controller (PMC). The SoC supports up to 6 clocks (PMC_PLT_CLK[0..5]) with a frequency of either 19.2 MHz (PLL) or 25 MHz (XTAL) for BayTrail and a frequency of 19.2 MHz (XTAL) for CherryTrail. These clocks are available for general system use, where appropriate. For example, the usage for platform clocks suggested in the datasheet is the following: PLT_CLK[0..2] - Camera PLT_CLK[3] - Audio Codec PLT_CLK[4] - PLT_CLK[5] - COMMs Signed-off-by: Irina Tirdea Signed-off-by: Pierre-Louis Bossart Acked-by: Andy Shevchenko Signed-off-by: Stephen Boyd drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/pmc_atom.c | 79 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 3 deletions(-) commit 80a7581f38c0b2e83dc883a2125340b90b5635ec Author: Irina Tirdea Date: Mon Jan 23 12:07:43 2017 -0600 arch/x86/platform/atom: Move pmc_atom to drivers/platform/x86 The pmc_atom driver does not contain any architecture specific code. It only enables the SoC Power Management Controller driver for BayTrail and CherryTrail platforms. Move the pmc_atom driver from arch/x86/platform/atom to drivers/platform/x86. Also clean-up and reorder include files by alphabetical order in pmc_atom.h Signed-off-by: Irina Tirdea Signed-off-by: Pierre-Louis Bossart Acked-by: Thomas Gleixner Acked-by: Andy Shevchenko Signed-off-by: Stephen Boyd arch/x86/Kconfig | 4 - arch/x86/include/asm/pmc_atom.h | 158 ---------- arch/x86/platform/atom/Makefile | 1 - arch/x86/platform/atom/pmc_atom.c | 460 ----------------------------- drivers/acpi/acpi_lpss.c | 2 +- drivers/platform/x86/Kconfig | 4 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/pmc_atom.c | 459 ++++++++++++++++++++++++++++ include/linux/platform_data/x86/pmc_atom.h | 158 ++++++++++ 9 files changed, 623 insertions(+), 624 deletions(-) commit 1141d9d08184565b71a943a50ffe712b2dfc697f Author: Irina Tirdea Date: Mon Jan 23 12:07:42 2017 -0600 clk: x86: Add Atom PMC platform clocks The BayTrail and CherryTrail platforms provide platform clocks through their Power Management Controller (PMC). The SoC supports up to 6 clocks (PMC_PLT_CLK[0..5]) with a frequency of either 19.2 MHz (PLL) or 25 MHz (XTAL) for BayTrail and a frequency of 19.2 MHz (XTAL) for CherryTrail. These clocks are available for general system use, where appropriate, and each have Control & Frequency register fields associated with them. Port from legacy by Pierre Bossart, integration in clock framework by Irina Tirdea Signed-off-by: Irina Tirdea Signed-off-by: Pierre-Louis Bossart Acked-by: Andy Shevchenko Signed-off-by: Stephen Boyd drivers/clk/x86/Makefile | 1 + drivers/clk/x86/clk-pmc-atom.c | 371 +++++++++++++++++++++++++ include/linux/platform_data/x86/clk-pmc-atom.h | 44 +++ 3 files changed, 416 insertions(+) commit f35b6542c3ac3f28056d298348a81f7d56d3a041 Author: Pierre-Louis Bossart Date: Mon Jan 23 12:07:41 2017 -0600 clk: Make x86/ conditional on CONFIG_COMMON_CLK Fix Makefile for x86 support, dependency on CONFIG_COMMON_CLK was not explicit Fixes: 701190fd7419 ('clk: x86: add support for Lynxpoint LPSS clocks') Signed-off-by: Pierre-Louis Bossart Acked-by: Andy Shevchenko Signed-off-by: Stephen Boyd drivers/clk/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 55da97e38cab844682abb71400a908b871d0054c Author: Leo Yan Date: Sat Jan 21 10:26:31 2017 +0800 clk: hisilicon: fix lock assignment In clock driver initialize phase the spinlock is missed to assignment to struct clkgate_separated, finally there have no locking to protect exclusive accessing for clock registers. This bug introduces the console has no output after enable coresight driver on 96boards Hikey; this is because console using UART3, which has shared the same register with coresight clock enabling bit. After applied this patch it can assign lock properly to protect exclusive accessing, and console can work well after enabled coresight modules. Fixes: 0aa0c95f743a ("clk: hisilicon: add common clock support") Signed-off-by: Leo Yan Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clkgate-separated.c | 1 + 1 file changed, 1 insertion(+) commit de9b5a24047d50490ff58428bd1dc8bc4b63a225 Merge: 3d21a4b 55921ce Author: Stephen Boyd Date: Thu Jan 26 16:10:57 2017 -0800 Merge branch 'clk-ux500' into clk-next * clk-ux500: clk: ux500: Convert ABx500 clocks to use OF probing clk: ux500: Add device tree bindings for ABx500 clocks clk: ux500: move AB8500 sysclk over to PRCMU clk driver commit 55921ce27695325e7bab667ccc7e4ada81a74f02 Author: Linus Walleij Date: Fri Jan 13 16:08:42 2017 +0100 clk: ux500: Convert ABx500 clocks to use OF probing These clocks have been broken for a long time unfortunately, a hurdle of misc problems made them stop working at some point breaking USB and audio on Ux500. The platform as such and all "regular" clocks are migrated to OF/device tree, so let's migrate also this driver. With this patch and the corresponding DTS fixes, and a bunch of probe deferral fixes, audio starts working again on Ux500. Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/ux500/abx500-clk.c | 36 ++++++++++++++++++++++++---------- include/dt-bindings/clock/ste-ab8500.h | 11 +++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) commit 839a72af88635f222f6daef430e13a3f2dcb1e6e Author: Linus Walleij Date: Fri Jan 20 14:25:39 2017 +0100 clk: ux500: Add device tree bindings for ABx500 clocks This adds device tree bindings for the ABx500 clocks on the ST-Ericsson platforms. Cc: devicetree@vger.kernel.org Acked-by: Ulf Hansson Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/stericsson,abx500.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 689a318c166774f9e757d0224a2a70d635fda66c Author: Linus Walleij Date: Fri Jan 13 16:07:47 2017 +0100 clk: ux500: move AB8500 sysclk over to PRCMU clk driver The AB8500 sysclk is just another PRCMU-controlled clock, there is no reason why it should be in the ABx500-controlled part of the clock implementation. Doing this and the corresponding device tree changes makes USB work on the Ux500 again. Acked-by: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/ux500/abx500-clk.c | 8 -------- drivers/clk/ux500/u8500_of_clk.c | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) commit 3d21a4b6462aa2578192705b7b1eb4d40054d531 Author: Jean Delvare Date: Tue Jan 24 13:09:12 2017 +0100 clk: mediatek: Fix MT8135 dependencies The MT8135 is a 32-bit SoC, so only propose it on ARM architecture, not ARM64. Signed-off-by: Jean Delvare Fixes: 234d511d8c15 ("clk: mediatek: Add hardware dependency") Cc: Andreas Färber Acked-by: James Liao Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e9c0d5a3347047891936821d18d28903192468c Author: Jean Delvare Date: Tue Jan 24 13:07:04 2017 +0100 clk: mediatek: Fix MT2701 dependencies If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no. Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing. Signed-off-by: Jean Delvare Fixes: e9862118272a ("clk: mediatek: Add MT2701 clock support") Reviewed-by: Andreas Färber Reviewed-by: James Liao Cc: Shunli Wang Cc: Erin Lo Cc: Michael Turquette Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ced3068344ec9730eb160b462154e5fc53f6c2c5 Author: Keerthy Date: Fri Dec 2 14:35:43 2016 +0530 clk: ti: divider: Add the table parsing to get the best divider value Currently the divider selection logic blindly divides the parent_rate by the clk rate and gives the divider value for the divider clocks which do not have the CLK_SET_RATE_PARENT flag set. Add the clk divider table parsing to get the closest divider available in the table provided via Device tree. The code is pretty much taken from: drivers/clk/clk-divider.c. and used here to fix up the best divider selection logic. Signed-off-by: Keerthy Reported-by: Richard Woodruff Acked-by: Tero Kristo Signed-off-by: Stephen Boyd drivers/clk/ti/divider.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 843be1e7fb30f6309aa9389344b16dca57e6d4e2 Author: Rajendra Nayak Date: Mon Jan 23 09:56:21 2017 +0530 clk: qcom: gdsc: Fix handling of hw control enable/disable Once a gdsc is brought in and out of HW control, there is a power down and up cycle which can take upto 1us. Polling on the gdsc status immediately after the hw control enable/disable can mislead software/firmware to belive the gdsc is already either on or off, while its yet to complete the power cycle. To avoid this add a 1us delay post a enable/disable of HW control mode. Also after the HW control mode is disabled, poll on the status to check gdsc status reflects its 'on' before force disabling it in software. Reported-by: Stanimir Varbanov Reviewed-by: Stanimir Varbanov Tested-by: Stanimir Varbanov Signed-off-by: Rajendra Nayak Fixes: 904bb4f5c7de ("clk: qcom: gdsc: Add support for gdscs with HW control") Signed-off-by: Stephen Boyd drivers/clk/qcom/gdsc.c | 58 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 13 deletions(-) commit 340a84ce1eddd6671ce0c57d890fd90f6ae27fa2 Author: Jerome Brunet Date: Wed Jan 25 11:53:06 2017 +0100 clk: meson8b: fix clk81 register address During meson8b clock probe, clk81 register address is fixed twice. First using the meson8b_clk_gates array, then by directly changing meson8b_clk81 register. As a result meson8b_clk81.reg = HHI_MPEG_CLK_CNTL + clk_base + clk_base. Fixed by just removing the second fixup. Fixes: e31a1900c1ff ("meson: clk: Add support for clock gates") Signed-off-by: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/meson/meson8b.c | 1 - 1 file changed, 1 deletion(-) commit 88c9b70bb2b2182fda8ef764ab49ec9e175c8ee2 Author: Gabriel Fernandez Date: Fri Jan 6 14:59:23 2017 +0100 clk: stm32f7: Introduce stm32f7 clocks for STM32F746 boards This patch enables clocks for STM32F746 boards. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 277 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 271 insertions(+), 6 deletions(-) commit 0875dd5938eebe105bdf7357cccca83f310d1b32 Merge: f080a49 52af855 Author: Stephen Boyd Date: Thu Jan 26 15:52:55 2017 -0800 Merge branch 'clk-stm32f4' into clk-next * clk-stm32f4: clk: stm32f7: Add stm32f7 clock DT bindings for STM32F746 boards commit f080a493860094a79c613bf64b7d6e0444896e3f Author: Masahiro Yamada Date: Wed Jan 18 21:31:19 2017 +0900 clk: uniphier: continue probing even if some clocks fail to register Do not let the entire probe function fail even if some clocks fail to register. Let's continue with succeeded clocks. This will give the system more chances to boot and allow us to investigate the cause of the failure. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 645ebb1daa6c7d26a0ad5c7e919e3ed907956a51 Merge: c567fb3 6847c4c 3f91958 Author: Stephen Boyd Date: Thu Jan 26 15:52:37 2017 -0800 Merge branch 'clk-imx7', 'clk-bcm2835' into clk-next * clk-imx7: clk: imx7d: Add the OCOTP clock * clk-bcm2835: clk: bcm2835: Add leaf clock measurement support, disabled by default clk: bcm2835: Register the DSI0/DSI1 pixel clocks. clk: bcm2835: Don't rate change PLLs on behalf of DSI PLL dividers. commit 75b824727680a9d12c34d78096a5ac642e53f5d0 Author: Christophe Leroy Date: Thu Dec 15 13:42:18 2016 +0100 powerpc/8xx: Perf events on PPC 8xx This patch has been reworked since RFC version. In the RFC, this patch was preceded by a patch clearing MSR RI for all PPC32 at all time at exception prologs. Now MSR RI clearing is done only when this 8xx perf events functionality is compiled in, it is therefore limited to 8xx and merged inside this patch. Other main changes have been to take into account detailed review from Peter Zijlstra. The instructions counter has been reworked to behave as a free running counter like the three other counters. The 8xx has no PMU, however some events can be emulated by other means. This patch implements the following events (as reported by 'perf list'): cpu-cycles OR cycles [Hardware event] instructions [Hardware event] dTLB-load-misses [Hardware cache event] iTLB-load-misses [Hardware cache event] 'cycles' event is implemented using the timebase clock. Timebase clock corresponds to CPU clock divided by 16, so number of cycles is approximatly 16 times the number of TB ticks On the 8xx, TLB misses are handled by software. It is therefore easy to count all TLB misses each time the TLB miss exception is called. 'instructions' is calculated by using instruction watchpoint counter. This patch sets counter A to count instructions at address greater than 0, hence we count all instructions executed while MSR RI bit is set. The counter is set to the maximum which is 0xffff. Every 65535 instructions, debug instruction breakpoint exception fires. The exception handler increments a counter in memory which then represent the upper part of the instruction counter. We therefore end up with a 48 bits counter. In order to avoid unnecessary overhead while no perf event is active, this counter is started when the first event referring to this counter is added, and the counter is stopped when the last event referring to it is deleted. In order to properly support breakpoint exceptions, MSR RI bit has to be unset in exception epilogs in order to avoid breakpoint exceptions during critical sections during changes to SRR0 and SRR1 would be problematic. All counters are handled as free running counters. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/reg.h | 2 + arch/powerpc/include/asm/reg_8xx.h | 4 + arch/powerpc/kernel/entry_32.S | 15 +++ arch/powerpc/kernel/head_8xx.S | 46 ++++++++- arch/powerpc/perf/8xx-pmu.c | 173 +++++++++++++++++++++++++++++++++ arch/powerpc/perf/Makefile | 2 + arch/powerpc/platforms/Kconfig.cputype | 7 ++ 7 files changed, 248 insertions(+), 1 deletion(-) commit 2add203169fd6bf419176e283f701d26944bce41 Author: Christophe Leroy Date: Tue Dec 13 17:57:38 2016 +0100 powerpc/32: Remove FIX_SRR1 FIX_SRR1() is defined as blank. Last useful instance of FIX_SRR1() was removed by commit 40ef8cbc6d360 ("powerpc: Get 64-bit configs to compile with ARCH=powerpc") in 2005. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/ppc_asm.h | 1 - arch/powerpc/kernel/entry_32.S | 4 ---- arch/powerpc/kernel/head_32.S | 3 --- 3 files changed, 8 deletions(-) commit 1f17e2f2c8a8be3430813119fa7b633398f6185b Author: David Ahern Date: Thu Jan 26 13:54:08 2017 -0800 net: ipv6: ignore null_entry on route dumps lkp-robot reported a BUG: [ 10.151226] BUG: unable to handle kernel NULL pointer dereference at 00000198 [ 10.152525] IP: rt6_fill_node+0x164/0x4b8 [ 10.153307] *pdpt = 0000000012ee5001 *pde = 0000000000000000 [ 10.153309] [ 10.154492] Oops: 0000 [#1] [ 10.154987] CPU: 0 PID: 909 Comm: netifd Not tainted 4.10.0-rc4-00722-g41e8c70ee162-dirty #10 [ 10.156482] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 10.158254] task: d0deb000 task.stack: d0e0c000 [ 10.159059] EIP: rt6_fill_node+0x164/0x4b8 [ 10.159780] EFLAGS: 00010296 CPU: 0 [ 10.160404] EAX: 00000000 EBX: d10c2358 ECX: c1f7c6cc EDX: c1f6ff44 [ 10.161469] ESI: 00000000 EDI: c2059900 EBP: d0e0dc4c ESP: d0e0dbe4 [ 10.162534] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 [ 10.163482] CR0: 80050033 CR2: 00000198 CR3: 10d94660 CR4: 000006b0 [ 10.164535] Call Trace: [ 10.164993] ? paravirt_sched_clock+0x9/0xd [ 10.165727] ? sched_clock+0x9/0xc [ 10.166329] ? sched_clock_cpu+0x19/0xe9 [ 10.166991] ? lock_release+0x13e/0x36c [ 10.167652] rt6_dump_route+0x4c/0x56 [ 10.168276] fib6_dump_node+0x1d/0x3d [ 10.168913] fib6_walk_continue+0xab/0x167 [ 10.169611] fib6_walk+0x2a/0x40 [ 10.170182] inet6_dump_fib+0xfb/0x1e0 [ 10.170855] netlink_dump+0xcd/0x21f This happens when the loopback device is set down and a ipv6 fib route dump is requested. ip6_null_entry is the root of all ipv6 fib tables making it integrated into the table and hence passed to the ipv6 route dump code. The null_entry route uses the loopback device for dst.dev but may not have rt6i_idev set because of the order in which initializations are done -- ip6_route_net_init is run before addrconf_init has initialized the loopback device. Fixing the initialization order is a much bigger problem with no obvious solution thus far. The BUG is triggered when the loopback is set down and the netif_running check added by a1a22c1206 fails. The fill_node descends to checking rt->rt6i_idev for ignore_routes_with_linkdown and since rt6i_idev is NULL it faults. The null_entry route should not be processed in a dump request. Catch and ignore. This check is done in rt6_dump_route as it is the highest place in the callchain with knowledge of both the route and the network namespace. Fixes: a1a22c1206("net: ipv6: Keep nexthop of multipath route on admin down") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3b7b2b0acdbf9ffe4d3a7915e59e6127988b05db Author: David Ahern Date: Thu Jan 26 14:08:36 2017 -0800 net: ipv6: remove skb_reserve in getroute Remove skb_reserve and skb_reset_mac_header from inet6_rtm_getroute. The allocated skb is not passed through the routing engine (like it is for IPv4) and has not since the beginning of git time. Signed-off-by: David Ahern Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 6 ------ 1 file changed, 6 deletions(-) commit 21acd0e4df04f02176e773468658c3cebff096bb Author: Li Zhong Date: Fri Nov 11 12:57:36 2016 +0800 KVM: PPC: Book 3S: XICS: Don't lock twice when checking for resend This patch improves the code that takes lock twice to check the resend flag and do the actual resending, by checking the resend flag locklessly, and add a boolean parameter check_resend to icp_[rm_]deliver_irq(), so the resend flag can be checked in the lock when doing the delivery. We need make sure when we clear the ics's bit in the icp's resend_map, we don't miss the resend flag of the irqs that set the bit. It could be ordered through the barrier in test_and_clear_bit(), and a newly added wmb between setting irq's resend flag, and icp's resend_map. Signed-off-by: Li Zhong Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rm_xics.c | 40 ++++++++++++------------ arch/powerpc/kvm/book3s_xics.c | 59 +++++++++++++++++------------------- 2 files changed, 48 insertions(+), 51 deletions(-) commit 17d48610ae0fa218aa386b16a538c792991a3652 Author: Li Zhong Date: Fri Nov 11 12:57:35 2016 +0800 KVM: PPC: Book 3S: XICS: Implement ICS P/Q states This patch implements P(Presented)/Q(Queued) states for ICS irqs. When the interrupt is presented, set P. Present if P was not set. If P is already set, don't present again, set Q. When the interrupt is EOI'ed, move Q into P (and clear Q). If it is set, re-present. The asserted flag used by LSI is also incorporated into the P bit. When the irq state is saved, P/Q bits are also saved, they need some qemu modifications to be recognized and passed around to be restored. KVM_XICS_PENDING bit set and saved should also indicate KVM_XICS_PRESENTED bit set and saved. But it is possible some old code doesn't have/recognize the P bit, so when we restore, we set P for PENDING bit, too. The idea and much of the code come from Ben. Signed-off-by: Li Zhong Signed-off-by: Paul Mackerras arch/powerpc/include/uapi/asm/kvm.h | 2 + arch/powerpc/kvm/book3s_hv_rm_xics.c | 100 +++++++++++++++++++--------- arch/powerpc/kvm/book3s_xics.c | 125 ++++++++++++++++++++++++----------- arch/powerpc/kvm/book3s_xics.h | 5 +- 4 files changed, 161 insertions(+), 71 deletions(-) commit bf5a71d53835110d46d33eb5335713ffdbff9ab6 Author: Li Zhong Date: Fri Nov 11 12:57:34 2016 +0800 KVM: PPC: Book 3S: XICS: Fix potential issue with duplicate IRQ resends It is possible that in the following order, one irq is resent twice: CPU 1 CPU 2 ics_check_resend() lock ics_lock see resend set unlock ics_lock /* change affinity of the irq */ kvmppc_xics_set_xive() write_xive() lock ics_lock see resend set unlock ics_lock icp_deliver_irq() /* resend */ icp_deliver_irq() /* resend again */ It doesn't have any user-visible effect at present, but needs to be avoided when the following patch implementing the P/Q stuff is applied. This patch clears the resend flag before releasing the ics lock, when we know we will do a re-delivery after checking the flag, or setting the flag. Signed-off-by: Li Zhong Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rm_xics.c | 3 +++ arch/powerpc/kvm/book3s_xics.c | 4 ++++ 2 files changed, 7 insertions(+) commit 37451bc95dee0e666927d6ffdda302dbbaaae6fa Author: Li Zhong Date: Fri Nov 11 12:57:33 2016 +0800 KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Some counters are added in Commit 6e0365b78273 ("KVM: PPC: Book3S HV: Add ICP real mode counters"), to provide some performance statistics to determine whether further optimizing is needed for real mode functions. The n_reject counter counts how many times ICP rejects an irq because of priority in real mode. The redelivery of an lsi that is still asserted after eoi doesn't fall into this category, so the increasement there is removed. Also, it needs to be increased in icp_rm_deliver_irq() if it rejects another one. Signed-off-by: Li Zhong Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5efa6605151b84029edeb2e07f2d2d74b52c106f Author: Li Zhong Date: Fri Nov 11 12:57:32 2016 +0800 KVM: PPC: Book 3S: XICS cleanup: remove XICS_RM_REJECT Commit b0221556dbd3 ("KVM: PPC: Book3S HV: Move virtual mode ICP functions to real-mode") removed the setting of the XICS_RM_REJECT flag. And since that commit, nothing else sets the flag any more, so we can remove the flag and the remaining code that handles it, including the counter that counts how many times it get set. Signed-off-by: Li Zhong Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xics.c | 12 +++--------- arch/powerpc/kvm/book3s_xics.h | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) commit 2069889ff78cb00fa274818b03cec6d976b3187c Author: Andy Deng Date: Wed Jan 25 12:14:33 2017 +0800 docs/zh_CN: Add coding-style into docs build system Tested by the command: make htmldocs During the compiling process, zh_CN/coding-style.rst has no errors and warnings generated, the generated html document has been checked. Signed-off-by: Andy Deng Signed-off-by: Jonathan Corbet Documentation/index.rst | 10 +- Documentation/translations/zh_CN/CodingStyle | 950 ---------------------- Documentation/translations/zh_CN/coding-style.rst | 950 ++++++++++++++++++++++ Documentation/translations/zh_CN/index.rst | 12 + 4 files changed, 971 insertions(+), 951 deletions(-) commit 0dacbc9df5c9fc6037060fbb12c1d7da80f5b580 Author: Andy Deng Date: Wed Jan 25 12:14:32 2017 +0800 zh_CN/CodingStyle: Convert to ReST markup This commit applies all changes from the English version, and should be able to work with the documentation build system. Signed-off-by: Andy Deng Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/CodingStyle | 788 ++++++++++++++++----------- 1 file changed, 462 insertions(+), 326 deletions(-) commit 9e5e74e61ce8615d4105b2651f6b7d46434014f2 Author: Andy Deng Date: Wed Jan 25 12:14:31 2017 +0800 zh_CN/CodingStyle: improve translation Some of the sentences in Chapters 19 and 20 are re-translated: - Fixed translation errors in Section 2 of Chapter 19 to prevent misleading readers; - Retranslate some sentences to make the translation more clear and accurate. Signed-off-by: Andy Deng Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/CodingStyle | 61 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 30 deletions(-) commit 8da9704c8bb7d4b0a2b051a5a7eda9b049f5f766 Author: Masanari Iida Date: Tue Jan 24 21:45:15 2017 +0900 Doc: Fix double words in Documentation This patch fix some double words found in Documentation. Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet Documentation/block/pr.txt | 2 +- Documentation/ioctl/botching-up-ioctls.txt | 2 +- Documentation/livepatch/livepatch.txt | 2 +- Documentation/networking/kcm.txt | 2 +- Documentation/usb/power-management.txt | 2 +- Documentation/vm/transhuge.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 710584b9daefe25a2b5dc2c6c10dbb00e1b3b451 Merge: c659af7 83a1e53 Author: James Morris Date: Fri Jan 27 09:23:21 2017 +1100 Merge branch 'smack-for-4.11' of git://github.com/cschaufler/smack-next into next commit 5a0bc578e0723b71ecb19f5796d0b0f937785d92 Author: Matthew Wilcox Date: Mon Jan 23 00:18:10 2017 -0800 kernel-doc: Handle returning pointers to pointers Clearly nobody ever tried to build the documentation for the radix tree before: include/linux/radix-tree.h:400: warning: cannot understand function prototype: 'void ** radix_tree_iter_init(struct radix_tree_iter *iter, unsigned long start) ' Indeed, the regexes only handled a single '*', not one-or-more. I have tried to fix that, but now I have perl regexes all over my hands, and I fear I shall never be clean again. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet scripts/kernel-doc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 31fc93d5f29b300307cda5aef95d890954337e01 Author: Steven Price Date: Tue Jan 17 13:38:49 2017 +0000 dynamic-debug-howto: Correct echo -c to -n Two of the example command lines use an argument to echo of "-c" which isn't valid in (most versions of) echo causing these examples to fail. Correct the argument to "-n" which works correctly. Signed-off-by: Steven Price Signed-off-by: Jonathan Corbet Documentation/admin-guide/dynamic-debug-howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c80c45019957dcb226f549ebfbeaa9ef7b4eb8c5 Author: Florian Fainelli Date: Mon Jan 16 14:31:15 2017 -0800 Documentation: dontdiff: Update with additional entries Add a bunch of entries reflective of programs that the kernel build: sortextable, dtc. And while at it, expand the lex*.c entries to cover e.g: dtc-lexer.c. Finally, exclude devicetable-offsets.h Signed-off-by: Florian Fainelli Signed-off-by: Jonathan Corbet Documentation/dontdiff | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3deda5e50c893be38c1b6b3a73f8f8fb5560baa4 Author: Paul Mackerras Date: Tue Dec 20 14:02:29 2016 +1100 KVM: PPC: Book3S HV: Don't try to signal cpu -1 If the target vcpu for kvmppc_fast_vcpu_kick_hv() is not running on any CPU, then we will have vcpu->arch.thread_cpu == -1, and as it happens, kvmppc_fast_vcpu_kick_hv will call kvmppc_ipi_thread with -1 as the cpu argument. Although this is not meaningful, in the past, before commit 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9", 2016-11-18), it was harmless because CPU -1 is not in the same core as any real CPU thread. On a POWER9, however, we don't do the "same core" check, so we were trying to do a msgsnd to thread -1, which is invalid. To avoid this, we add a check to see that vcpu->arch.thread_cpu is >= 0 before calling kvmppc_ipi_thread() with it. Since vcpu->arch.thread_vcpu can change asynchronously, we use READ_ONCE to ensure that the value we check is the same value that we use as the argument to kvmppc_ipi_thread(). Fixes: 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9") Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b48fda0976a802e0fe4fc0bedefb7cf380ec6426 Author: Jens Axboe Date: Thu Jan 26 14:52:20 2017 -0700 blk-mq-sched: check for successful allocation before assigning tag We don't trigger this from the normal IO path, since we always use blocking allocations from there. But Bart saw it testing multipath dm, since that is a heavy user of atomic request allocations in the map and clone path. Reported-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bdf3d06bedebd31539b68b4a744054f994ecc2e1 Merge: bfc2cf6 07cd129 Author: Tejun Heo Date: Thu Jan 26 16:47:42 2017 -0500 Merge branch 'for-4.10-fixes' into for-4.11 commit 10c55cacb8b20518fddf92de43fbfb198f288eb2 Author: Aaron Armstrong Skomra Date: Wed Jan 25 12:08:42 2017 -0800 HID: wacom: generic: support LEDs Add support for the LEDs around the mode switch to the generic code path in support of the second generation Intuos Pro. Signed-off-by: Aaron Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 2 ++ drivers/hid/wacom_sys.c | 39 ++++++++++++++++++++++++++++++++++++--- drivers/hid/wacom_wac.c | 14 +++++++++++++- drivers/hid/wacom_wac.h | 1 + 4 files changed, 52 insertions(+), 4 deletions(-) commit d2ec58aee8b1d68d309656a0561c81c12197a987 Author: Aaron Armstrong Skomra Date: Wed Jan 25 12:08:41 2017 -0800 HID: wacom: generic: support generic touch switch The second generation Intuos Pro is the first device in the generic codepath which has a touchswitch. We utilize a flag in wacom_shared in order to report this switch event received from the pad on the touch input. Signed-off-by: Aaron Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 26 +++++++++++++++++++------- drivers/hid/wacom_wac.c | 19 ++++++++++++++++++- drivers/hid/wacom_wac.h | 4 +++- 3 files changed, 40 insertions(+), 9 deletions(-) commit ac2423c975dbd3e8c2afc6dec53ee25be38f723b Author: Aaron Armstrong Skomra Date: Wed Jan 25 12:08:40 2017 -0800 HID: wacom: generic: add vendor defined touch Add vendor defined touch to support the second generation Intuos Pro. Previously all generic Wacom devices used true HID to report their touch. Signed-off-by: Aaron Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 + drivers/hid/wacom_sys.c | 13 ++++++++++--- drivers/hid/wacom_wac.c | 22 +++++++++++++++++----- drivers/hid/wacom_wac.h | 16 +++++++++++++++- 4 files changed, 43 insertions(+), 9 deletions(-) commit 60a221869803a0864c4b1683395ef574ee15aba6 Author: Aaron Armstrong Skomra Date: Wed Jan 25 12:08:39 2017 -0800 HID: wacom: generic: add support for touchring Add support for the touchring to the generic code path in support of the second generation Intuos Pro. We also add checks for usage->type to ensure that we handle the usage before we report it, or change the inrange_state based on it. Signed-off-by: Aaron Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 65ef4c1e98b73176a64fb6e9829e4166249392ec Author: Aaron Armstrong Skomra Date: Wed Jan 25 12:08:38 2017 -0800 HID: wacom: generic: remove input_event_flag Input_event_flag duplicates the information we track in wacom_wac->hid_data.inrange_state for the pad. Signed-off-by: Aaron Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 9 +-------- drivers/hid/wacom_wac.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) commit 4922cd26f03c1c71bf7dd6cbdb638e7e36a4a50b Author: Jason Gerecke Date: Wed Jan 25 12:08:37 2017 -0800 HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface In addition to its USB interface, the second-generation Intuos Pro includes a Bluetooth radio that offers two pairing interfaces: classic and low-energy. The classic interface functions just like the earlier Bluetooth-enabled Intuos4 and Graphire4 tablets, appearing as a HID device that our driver can work with. The low-energy interface is intented to be used by userspace applications that make use of its paper-to-digital capabilities. Despite the USB interface using Wacom's new vendor-defined HID usages, the Bluetooth interface provides us with useless black-box "blob" report descriptors like past devices. We thus have to explicitly add support for the PIDs and reports used. These devices pack a /lot/ of information into a single Bluetooth input report. Each report contains up to seven snapshots of the pen state, four snapshots of the touch state (of five touches each), pad state, and battery data. Thankfully this isn't too hard for the driver to report -- it just takes a fair amount of code to extract! Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 25 ++++++ drivers/hid/wacom_wac.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/hid/wacom_wac.h | 6 +- 3 files changed, 226 insertions(+), 2 deletions(-) commit 5ba13c6495010cd39e0ecb89ce1e546189bd6006 Author: Jason Gerecke Date: Wed Jan 25 12:08:36 2017 -0800 HID: wacom: Move WAC_CMD_* into wacom_wac.h Centralize our definition of report IDs by moving those for device commands into wacom_wac.h alongside those for input reports. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 8 -------- drivers/hid/wacom_wac.h | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) commit b9e06256932bd462b7ee392d7742a79ade679abe Author: Jason Gerecke Date: Wed Jan 25 12:08:35 2017 -0800 HID: wacom: Enable HID_GENERIC codepath for Bluetooth devices There no reason a Bluetooth device with the appropriate HID descriptor couldn't be used through the HID_GENERIC codepath in the future. Ensure that the driver attempts to bind to these devices. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+) commit b95db6687f9ecc1705e2de0be216ab78439dbbf3 Merge: 80c8eae bc1727d Author: David S. Miller Date: Thu Jan 26 15:43:54 2017 -0500 Merge branch 'dsa2-pdata-prepatory-patches' Florian Fainelli says: ==================== net: dsa: Preparatory patches This patch series extracts the 4 patches of the larger: net: dsa: Support for pdata in dsa2 while we wait for feedback from Greg KH on the device references. Changes in v2: - rebased properly after the multi-MDIO bus support added to mv88e6xxx ==================== Signed-off-by: David S. Miller commit bc1727d242fa595c84e8f42b292e82151ba8cf06 Author: Florian Fainelli Date: Thu Jan 26 10:45:54 2017 -0800 net: dsa: Move ports assignment closer to error checking Move the assignment of ports in _dsa_register_switch() closer to where it is checked, no functional change. Re-order declarations to be preserve the inverted christmas tree style. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3512a8e95e6acb51d4cd04480689ac484ed538c2 Author: Florian Fainelli Date: Thu Jan 26 10:45:53 2017 -0800 net: dsa: Suffix function manipulating device_node with _dn Make it clear that these functions take a device_node structure pointer Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 293784a8f856e854b4742be4aacf435062d91e9c Author: Florian Fainelli Date: Thu Jan 26 10:45:52 2017 -0800 net: dsa: Make most functions take a dsa_port argument In preparation for allowing platform data, and therefore no valid device_node pointer, make most DSA functions takes a pointer to a dsa_port structure whenever possible. While at it, introduce a dsa_port_is_valid() helper function which checks whether port->dn is NULL or not at the moment. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa.c | 15 ++++++++------ net/dsa/dsa2.c | 61 +++++++++++++++++++++++++++++------------------------- net/dsa/dsa_priv.h | 4 ++-- 3 files changed, 44 insertions(+), 36 deletions(-) commit 55ed0ce0898e15fec30d2ca2a563d7934b082375 Author: Florian Fainelli Date: Thu Jan 26 10:45:51 2017 -0800 net: dsa: Pass device pointer to dsa_register_switch In preparation for allowing dsa_register_switch() to be supplied with device/platform data, pass down a struct device pointer instead of a struct device_node. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 7 +++---- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 2 +- net/dsa/dsa2.c | 7 ++++--- 5 files changed, 10 insertions(+), 10 deletions(-) commit 80c8eae6ee66b52e1304c9ffd02b4472d5976608 Author: Satanand Burla Date: Thu Jan 26 11:52:35 2017 -0800 liquidio: Avoid accessing skb after submitting to input queue Accessing skb after submitting to input queue can cause access to stale pointers if the skb ends up being transmitted and freed by that time. Signed-off-by: Satanand Burla Signed-off-by: Derek Chickles Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 +++--- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit cbe99c538d1776009e8710755bb6e726f7fffa9b Author: Arnd Bergmann Date: Wed Jan 25 23:22:36 2017 +0100 leds: ktd2692: avoid harmless maybe-uninitialized warning gcc gets confused about the control flow in ktd2692_parse_dt(), causing it to warn about what seems like a potential bug: drivers/leds/leds-ktd2692.c: In function 'ktd2692_probe': drivers/leds/leds-ktd2692.c:244:15: error: '*((void *)&led_cfg+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/leds/leds-ktd2692.c:225:7: error: 'led_cfg.flash_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/leds/leds-ktd2692.c:232:3: error: 'led_cfg.movie_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code is fine, and slightly reworking it in an equivalent way lets gcc figure that out too, which gets rid of the warning. Fixes: 77e7915b15bb ("leds: ktd2692: Add missing of_node_put") Signed-off-by: Arnd Bergmann Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-ktd2692.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7547162ac351483df3641f64e99e10be329dd6a2 Author: Marek Szyprowski Date: Thu Jan 26 09:33:50 2017 +0100 arm64: dts: exynos: Add clocks to Exynos5433 LPASS module Exynos5433 LPASS module requires some clocks for proper operation with power domain. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit fa59aa70907b2e5c08f58d63ed7c1e5017e39301 Author: Marek Szyprowski Date: Thu Jan 26 09:33:47 2017 +0100 soc: samsung: pmu: Add dummy support for Exynos5433 SoC Add compatible for Exynos5433 SoC, so the driver will bind and let other drivers to use PMU regmap. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/exynos-pmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 49b3eb772505dc42b61c2920ca777d55455a8ee4 Merge: 27d8071 c337051 Author: David S. Miller Date: Thu Jan 26 14:31:08 2017 -0500 Merge tag 'batadv-next-for-davem-20170126' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - ignore self-generated loop detect MAC addresses in translation table, by Simon Wunderlich - install uapi batman_adv.h header, by Sven Eckelmann - bump copyright years, by Sven Eckelmann - Remove an unused variable in translation table code, by Sven Eckelmann - Handle NET_XMIT_CN like NET_XMIT_SUCCESS (revised according to Davids suggestion), and a follow up code clean up, by Gao Feng (2 patches) ==================== Signed-off-by: David S. Miller commit e572d0887137acfc53f18175522964ec19d88175 Author: Josh Poimboeuf Date: Wed Jan 18 22:16:55 2017 -0600 tools build: Add tools tree support for 'make -s' When doing a kernel build with 'make -s', everything is silenced except the objtool build. That's because the tools tree support for silent builds is some combination of missing and broken. Three changes are needed to fix it: - Makefile: propagate '-s' to the sub-make's MAKEFLAGS variable so the tools Makefiles can see it. - tools/scripts/Makefile.include: fix the tools Makefiles' ability to recognize '-s'. The MAKE_VERSION and MAKEFLAGS checks are copied from the top-level Makefile. This silences the "DESCEND objtool" message. - tools/build/Makefile.build: add support to the tools Build files for recognizing '-s'. Again the MAKE_VERSION and MAKEFLAGS checks are copied from the top-level Makefile. This silences all the object compile/link messages. Reported-and-Tested-by: Peter Zijlstra Signed-off-by: Josh Poimboeuf Cc: Jiri Olsa Cc: Michal Marek Link: http://lkml.kernel.org/r/e8967562ef640c3ae9a76da4ae0f4e47df737c34.1484799200.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo Makefile | 6 ++++-- tools/build/Makefile.build | 10 ++++++++++ tools/scripts/Makefile.include | 12 +++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) commit 5a797e00dc93593c9915841779881b15d9856237 Author: Jens Axboe Date: Thu Jan 26 12:22:11 2017 -0700 blk-mq: don't lose flags passed in to blk_mq_alloc_request() If we come in from blk_mq_alloc_requst() with NOWAIT set in flags, we must ensure that we don't later overwrite that in blk_mq_sched_get_request(). Initialize alloc_data->flags before passing it in. Reported-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-sched.c | 2 +- block/blk-mq.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 27d807180ae0a9e50d90adf9b22573c21be904c2 Author: Arnd Bergmann Date: Wed Jan 25 23:15:53 2017 +0100 ISDN: eicon: reduce stack size of sig_ind function I noticed that this function uses a lot of kernel stack when the "latent entropy" plugin is enabled: drivers/isdn/hardware/eicon/message.c: In function 'sig_ind': drivers/isdn/hardware/eicon/message.c:6113:1: error: the frame size of 1168 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] We currently don't warn about this, as we raise the warning limit to 2048 bytes in mainline, but I'd like to lower that limit again in the future, and this function can easily be changed to be more efficient and avoid that warning, by making some of its local variables 'const'. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/isdn/hardware/eicon/message.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit bf062bd20e6c4988a9c593824ea6bb58730b6289 Author: Taeung Song Date: Thu Jan 26 18:35:37 2017 +0900 perf ftrace: Remove needless code setting default tracer As a result of commit a3497642c261 ("perf ftrace: Make 'function_graph' be the default tracer") the ftrace.tracer variable can't be NULL but the other code setting default tracer remained. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1485423339-22780-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3677a649a751c8f061ba379a98c369473ccac980 Author: Tomasz Nowicki Date: Mon Jan 16 08:16:07 2017 +0100 iommu/arm-smmu: Fix for ThunderX erratum #27704 The goal of erratum #27704 workaround was to make sure that ASIDs and VMIDs are unique across all SMMU instances on affected Cavium systems. Currently, the workaround code partitions ASIDs and VMIDs by increasing global cavium_smmu_context_count which in turn becomes the base ASID and VMID value for the given SMMU instance upon the context bank initialization. For systems with multiple SMMU instances this approach implies the risk of crossing 8-bit ASID, like for 1-socket CN88xx capable of 4 SMMUv2, 128 context banks each: SMMU_0 (0-127 ASID RANGE) SMMU_1 (127-255 ASID RANGE) SMMU_2 (256-383 ASID RANGE) <--- crossing 8-bit ASID SMMU_3 (384-511 ASID RANGE) <--- crossing 8-bit ASID Since now we use 8-bit ASID (SMMU_CBn_TCR2.AS = 0) we effectively misconfigure ASID[15:8] bits of SMMU_CBn_TTBRm register for SMMU_2/3. Moreover, we still assume non-zero ASID[15:8] bits upon context invalidation. In the end, except SMMU_0/1 devices all other devices under other SMMUs will fail on guest power off/on. Since we try to invalidate TLB with 16-bit ASID but we actually have 8-bit zero padded 16-bit entry. This patch adds 16-bit ASID support for stage-1 AArch64 contexts so that we use ASIDs consistently for all SMMU instances. Signed-off-by: Tomasz Nowicki Reviewed-by: Robin Murphy Reviewed-by: Tirumalesh Chalamarla Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 3 +++ 1 file changed, 3 insertions(+) commit dc0eaa4e19a7db1cb046b3979945536fdc914517 Author: Aleksey Makarov Date: Thu Jan 19 17:36:36 2017 +0300 iommu/arm-smmu: Support for Extended Stream ID (16 bit) It is the time we have the real 16-bit Stream ID user, which is the ThunderX. Its IO topology uses 1:1 map for Requester ID to Stream ID translation for each root complex which allows to get full 16-bit Stream ID. Firmware assigns bus IDs that are greater than 128 (0x80) to some buses under PEM (external PCIe interface). Eventually SMMU drops devices on that buses because their Stream ID is out of range: pci 0006:90:00.0: stream ID 0x9000 out of range for SMMU (0x7fff) To fix above issue enable the Extended Stream ID optional feature when available. Reviewed-by: Tomasz Nowicki Signed-off-by: Aleksey Makarov Tested-by: Tomasz Nowicki Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 69 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 21 deletions(-) commit 65e251a4634c5644efca6f7e15803f0962d8943d Author: Lorenzo Pieralisi Date: Tue Jan 3 17:34:56 2017 +0000 iommu: Drop the of_iommu_{set/get}_ops() interface With the introduction of the new iommu_{register/get}_instance() interface in commit e4f10ffe4c9b ("iommu: Make of_iommu_set/get_ops() DT agnostic") (based on struct fwnode_handle as look-up token, so firmware agnostic) to register IOMMU instances with the core IOMMU layer there is no reason to keep the old OF based interface around any longer. Convert all the IOMMU drivers (and OF IOMMU core code) that rely on the of_iommu_{set/get}_ops() to the new kernel interface to register/retrieve IOMMU instances and remove the of_iommu_{set/get}_ops() remaining glue code in order to complete the interface rework. Cc: Matthias Brugger Cc: Will Deacon Cc: Joerg Roedel Cc: Marek Szyprowski Reviewed-by: Robin Murphy Tested-by: Sricharan R Tested-by: Yong Wu Signed-off-by: Lorenzo Pieralisi Signed-off-by: Will Deacon drivers/iommu/exynos-iommu.c | 2 +- drivers/iommu/msm_iommu.c | 2 +- drivers/iommu/mtk_iommu.c | 2 +- drivers/iommu/of_iommu.c | 4 ++-- include/linux/of_iommu.h | 11 ----------- 5 files changed, 5 insertions(+), 16 deletions(-) commit 692c4e422dae023a5247c0c6fc3b7b89305ca974 Author: Nate Watterson Date: Tue Jan 10 14:47:13 2017 -0500 iommu/arm-smmu-v3: limit use of 2-level stream tables In the current arm-smmu-v3 driver, all smmus that support 2-level stream tables are being forced to use them. This is suboptimal for smmus that support fewer stream id bits than would fill in a single second level table. This patch limits the use of 2-level tables to smmus that both support the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 810871c57011eb3e89e6768932757f169d666cd2 Author: Nate Watterson Date: Tue Dec 20 23:11:48 2016 -0500 iommu/arm-smmu-v3: Clear prior settings when updating STEs To prevent corruption of the stage-1 context pointer field when updating STEs, rebuild the entire containing dword instead of clearing individual fields. Signed-off-by: Nate Watterson Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 4ddecf76b5aebb5db4a771ca52c18135291235e3 Author: Johan Hovold Date: Wed Jan 25 18:02:49 2017 +0100 USB: cdc-acm: fix TIOCGSERIAL flags The driver reports that it always uses a low-latency mode by returning the ASYNC_LOW_LATENCY flag through TIOCGSERIAL. Even if this behaviour could not be changed, this may have made some sense prior to 7a9a65ced11e ("cdc-acm: Fix long standing abuse of tty->low_latency") which removed the unconditional setting of the corresponding tty low_latency flag (something which had always been broken in itself). Since the driver does not have a low-latency mode, let's drop the flag. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 1 - 1 file changed, 1 deletion(-) commit 228c8c6b1f4376788e9d5ab00d50b10228eb40d3 Author: Johannes Berg Date: Thu Jan 26 17:15:44 2017 +0100 wireless: define cipher/AKM suites using a macro The spec writes cipher/AKM suites as something like 00-0F-AC:9, but the part after the colon isn't hex, it's decimal, so that we've already had a few mistakes (in other code, or unmerged patches) to e.g. write 0x000FAC10 instead of 0x000FAC0A. Use a macro to avoid that problem. Reviewed-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit fcc8a22cc9053a8d1bbb94833ec103cd5961feef Author: Ville Syrjälä Date: Wed Jan 11 14:57:25 2017 +0200 drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F CEA-861-F tells us: "When transmitting any RGB colorimetry, the Source should set the YQ-field to match the RGB Quantization Range being transmitted (e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB, set YQ=1) and the Sink shall ignore the YQ-field." So let's go ahead and do that. Perhaps there are sinks that don't ignore the YQ as they should for RGB? I wasn't able to find similar text in CEA-861-E, so it would seem to be a fairly "recent" addition. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Eric Anholt drivers/gpu/drm/drm_edid.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 779c4c2866150c1e5518d703b747f794f91f044c Author: Ville Syrjälä Date: Wed Jan 11 14:57:24 2017 +0200 drm/edid: Set AVI infoframe Q even when QS=0 HDMI 2.0 recommends that we set the Q bits in the AVI infoframe even when the sink does not support quantization range selection (QS=0). According to CEA-861 we can do that as long as the Q we send matches the default quantization range for the mode. Previously I think I had misread the spec as saying that you can't send a non-zero Q at all when QS=0. But that's not what the spec actually says. v2: Fix typo in commit message (Jani) Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Eric Anholt drivers/gpu/drm/drm_edid.c | 8 +++++++- drivers/gpu/drm/i915/intel_hdmi.c | 6 ++++-- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- include/drm/drm_edid.h | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) commit a2ce26f815b16500d390fc46381ec770192a5fbe Author: Ville Syrjälä Date: Wed Jan 11 14:57:23 2017 +0200 drm/edid: Introduce drm_hdmi_avi_infoframe_quant_range() Pull the logic to populate the quantization range information in the AVI infoframe into a small helper. We'll be adding a bit more logic to it, and having it in a central place seems like a good idea since it's based on the CEA-861 spec. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Eric Anholt drivers/gpu/drm/drm_edid.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_hdmi.c | 13 +++++-------- drivers/gpu/drm/vc4/vc4_hdmi.c | 14 +++++--------- include/drm/drm_edid.h | 4 ++++ 4 files changed, 40 insertions(+), 17 deletions(-) commit c8127cf08ab9797c3954df463741ac47039d2b55 Author: Ville Syrjälä Date: Wed Jan 11 16:18:35 2017 +0200 drm/edid: Introduce drm_default_rgb_quant_range() Make the code selecting the RGB quantization range a little less magicy by wrapping it up in a small helper. v2: s/adjusted_mode/mode in vc4 to make it actually compile v3: Add a comment proposed by Eric Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170111141835.25369-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Eric Anholt drivers/gpu/drm/drm_edid.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 4 +++- drivers/gpu/drm/i915/intel_hdmi.c | 3 ++- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++- include/drm/drm_edid.h | 2 ++ 5 files changed, 29 insertions(+), 3 deletions(-) commit 00147934598478f7fbd0a4ce5380f2fecad542b5 Author: Ville Syrjälä Date: Wed Jan 11 14:57:21 2017 +0200 drm/edid: Have drm_edid.h include hdmi.h drm_edid.h depends on hdmi.h on account of enum hdmi_picture_aspect, so let's just include hdmi.h and drop some useless struct declarations. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Eric Anholt include/drm/drm_edid.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb07a829ec38d2628a7443563fbff5483a3157f2 Author: Teresa Remmet Date: Tue Jan 24 11:09:34 2017 +0100 ARM: dts: Add support for phyCORE-AM335x PCM-953 carrier board The phyCORE-AM335x development kit is a combination of the phyCORE-AM335x SoM and a PCM-953 carrier board. The features of the PCM-953 are: * ETH phy on carrier board: 1x RGMII * 1x CAN * Up to 4x UART * USB0 (otg) * USB1 (host) * SD slot * User gpio-keys * User LEDs Signed-off-by: Teresa Remmet Reviewed-by: Wadim Egorov Acked-by: Rob Herring Signed-off-by: Tony Lindgren .../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-pcm-953.dtsi | 288 +++++++++++++++++++++ arch/arm/boot/dts/am335x-phycore-rdk.dts | 27 ++ 4 files changed, 319 insertions(+) commit 287215e9c4664d8bc15140105a6ce2836722aa94 Merge: a6f9dec eacc8da Author: Takashi Iwai Date: Thu Jan 26 17:02:55 2017 +0100 Merge branch 'topic/intel-lpe-audio' into for-next commit a6f9dec2a99aaae9950f57ceb3be1ffd897f3867 Author: Bhumika Goyal Date: Thu Jan 26 21:11:05 2017 +0530 ALSA: cs46xx: constify snd_pcm_ops structures Declare snd_pcm_ops structures as const as they are either stored in the ops field of a snd_pcm_substream structure or passed as an argument to the function snd_pcm_set_ops. The function argument and the ops field are of type const, so snd_pcm_ops structures having this property can be made const too. File size before: sound/pci/cs46xx/cs46xx_lib.o text data bss dec hex filename 26047 5304 16 31367 7a87 sound/pci/cs46xx/cs46xx_lib.o File size after: sound/pci/cs46xx/cs46xx_lib.o text data bss dec hex filename 27335 4036 16 31387 7a9b sound/pci/cs46xx/cs46xx_lib.o Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/pci/cs46xx/cs46xx_lib.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 9ae8282d7f194e7e5fff30c82133dbb85923255d Author: Paul Gortmaker Date: Sun Jan 22 23:43:49 2017 -0500 cris: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Reported-by: kbuild test robot Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-kernel@axis.com Signed-off-by: Paul Gortmaker arch/cris/arch-v32/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e8fb9c3684e1315ae0458d606316438c73fe2f7 Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 hexagon: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Richard Kuo Cc: linux-hexagon@vger.kernel.org Signed-off-by: Paul Gortmaker arch/hexagon/mm/vm_fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a75f3108f5181e30f45b5a443dd1a66bc80498be Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 microblaze: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Michal Simek Signed-off-by: Paul Gortmaker arch/microblaze/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f91f3f6fa5a5825cc3d058a99bf41e546e3d0df Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 unicore32: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Guan Xuetao Signed-off-by: Paul Gortmaker arch/unicore32/mm/extable.c | 2 +- arch/unicore32/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0f296af85be8bc7b3c46ae2cd7a0917a1cc9e7b4 Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 score: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: Chen Liqin Cc: Lennox Wu Signed-off-by: Paul Gortmaker arch/score/kernel/traps.c | 2 +- arch/score/mm/extable.c | 2 +- arch/score/mm/fault.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6bb6bf7fdab5f9e190cca69ec9ddf9e916dc729d Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 metag: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: James Hogan Signed-off-by: Paul Gortmaker arch/metag/mm/extable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9ce6dbe8ea42ddf3ce8e6d0d2fa3b5d73448314e Author: Paul Gortmaker Date: Tue Jan 10 14:13:29 2017 -0500 arc: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Since the file does have some EXPORT_SYMBOL, we add export.h include. Cc: Vineet Gupta Acked-by: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Paul Gortmaker arch/arc/mm/extable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e227e88187f871fcdc1e69cd7b56fd9a5a41ca5 Author: Paul Gortmaker Date: Tue Jan 10 09:51:08 2017 -0500 nios2: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Reported-by: kbuild test robot Cc: Ley Foon Tan Reviewed-by: Tobias Klauser Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Paul Gortmaker arch/nios2/mm/extable.c | 2 +- arch/nios2/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5437344c2bb81fdb8a5074f15899788eed537655 Author: Paul Gortmaker Date: Tue Jan 10 10:12:55 2017 -0500 sparc: migrate exception table users onto extable.h This file was using module.h for search_exception_table. We've now separated that content out into its own file "extable.h" so now move over to that. Unlike most other instances, we can't delete the module.h include here since the file needs that for the within_module_init definition. Reported-by: kbuild test robot Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Paul Gortmaker arch/sparc/mm/extable.c | 1 + 1 file changed, 1 insertion(+) commit ce139ab8e629426cf0f909584160a21a17a284be Author: Paul Gortmaker Date: Tue Jan 10 10:46:25 2017 -0500 openrisc: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Reported-by: kbuild test robot Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: openrisc@lists.librecores.org Signed-off-by: Paul Gortmaker arch/openrisc/kernel/traps.c | 2 +- arch/openrisc/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2b24efa8e5c5042b0f126c09622b3e9e3c86a4fa Author: Marek Szyprowski Date: Thu Jan 26 10:29:27 2017 +0100 pinctrl: samsung: Replace syscore ops with standard platform device pm_ops Once the dependency on PMU driver (for pad retention control) has been removed, there is no reason to use syscore_ops based suspend/resume. This patch replaces it with standard platform device pm_ops based solution. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 72 ++++++------------------------- 1 file changed, 14 insertions(+), 58 deletions(-) commit dabd14569299c34f8c32b87760b464de6ed3f350 Author: Marek Szyprowski Date: Thu Jan 26 10:29:26 2017 +0100 pinctrl: samsung: Move retention control from mach-s5pv210 to the pinctrl driver This patch moves pad retention control from S5PV210 machine code to Exynos pin controller driver. This helps to avoid possible ordering and logical dependencies between machine and pin control code. Till now it worked fine only because sys_ops for machine code and pin controller were called in registration order. Signed-off-by: Marek Szyprowski Acked-by: Tomasz Figa For mach-s5pv210: Acked-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij arch/arm/mach-s5pv210/pm.c | 7 ---- arch/arm/mach-s5pv210/regs-clock.h | 4 --- drivers/pinctrl/samsung/pinctrl-exynos.c | 56 ++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 11 deletions(-) commit 07731019c59c06e257aac351d774b2292c251dde Author: Marek Szyprowski Date: Thu Jan 26 10:29:25 2017 +0100 pinctrl: samsung: Move retention control from mach-exynos to the pinctrl driver This patch moves pad retention control from PMU driver to Exynos pin controller driver. This helps to avoid possible ordering and logical dependencies between machine, PMU and pin control code. Till now it worked fine only because sys_ops for PMU and pin controller were called in registration order. This is also a preparation for adding new features to Exynos pin controller driver, like runtime power management and suspending individual pin controllers, which might be a part of some power domain. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij arch/arm/mach-exynos/suspend.c | 64 -------------- drivers/pinctrl/samsung/pinctrl-exynos.c | 145 +++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 64 deletions(-) commit 545e3e7da3d1356d3416faea2a8f94488c7a0056 Merge: a41dfe7 1da6de3 Author: Linus Walleij Date: Thu Jan 26 16:56:41 2017 +0100 Merge tag 'samsung-drivers-soc-pmu-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into devel Improvements for Exynos PMU driver for v4.11: Beside basic function of setting proper configuration for low power modes, the Exynos PMU (Power Management Unit) driver is also a provider of syscon regmap for its registers. This regmap is essential to many other drivers wanting to or needing to implement low power mode. Exynos pinctrl driver, before getting support for Runtime Power Management, needs access to this syscon regmap. Let's do it in a DT ABI friendly way. commit a41dfe799a22a5da7e59ac5743be3d5338b6d373 Merge: 3655a1ca 0c744ea Author: Linus Walleij Date: Thu Jan 26 16:56:31 2017 +0100 Merge tag 'v4.10-rc2' into devel Linux 4.10-rc2 commit 6f15f84c38d1d4f389f41b947b9b884d32ddb884 Author: Chris Wilson Date: Thu Jan 26 11:44:09 2017 +0000 drm: Silence the compiler for drm_mode_get_hv_timings() Since moving drm_crtc_get_hv_timings() into drm_modes.c, the compiler has been able to get smarter and spots that drm_mode_copy() is trying to preserve garbage from the stack. Fixes: 196cd5d3758c ("drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Alex Deucher Reviewed-by: Ville Syrjälä Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126114409.9115-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 83d642ee6dbec57ef1639a3de1e383fbfc5c44ec Author: Mihail Atanassov Date: Mon Jan 23 15:24:35 2017 +0000 drm: mali-dp: fix stride setting for multi-plane formats Hardware has multiple (2 or 3, depending on model) stride registers per layer; add a function that correctly takes that into account. On hardware that only has 2 stride registers, ensure that 3-plane (YUV) content has identical strides for both chroma planes. Signed-off-by: Mihail Atanassov [Removed smart layer stride setup, comment and commit message clarifications] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.c | 17 ++++++++++------- drivers/gpu/drm/arm/malidp_hw.h | 5 +++++ drivers/gpu/drm/arm/malidp_planes.c | 34 +++++++++++++++++++++++++++++++--- drivers/gpu/drm/arm/malidp_regs.h | 4 ++++ 4 files changed, 50 insertions(+), 10 deletions(-) commit b70b332f14b704b22894571bc422812f539aea4f Author: Liviu Dudau Date: Wed Jan 25 17:40:02 2017 +0000 drm: mali-dp: Add plane offset to the plane's physical start address register Add the fb->offset[] value to the plane's physical start address registe. Without that, packed formats are rendered incorrectly. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 1 + 1 file changed, 1 insertion(+) commit 4d6000edcd9df048477ef4335296513d05e3b544 Author: Mihail Atanassov Date: Mon Jan 23 13:46:42 2017 +0000 drm: mali-dp: Check for sufficient address space If the device-tree 'reg' node doesn't reserve enough space for the DP, fail to bind. Reviewed-by: Brian Starkey Signed-off-by: Mihail Atanassov [renamed added function to malidp_has_sufficient_address_space] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 20 ++++++++++++++++++++ drivers/gpu/drm/arm/malidp_regs.h | 2 ++ 2 files changed, 22 insertions(+) commit 592d8c8ccef6c8bdbe6d03fd01fd5baea921dc83 Author: Mihail Atanassov Date: Mon Jan 23 13:46:41 2017 +0000 drm: mali-dp: Check hw version matches device-tree Refuse to bind if the device-tree compatible string lists a different hardware version. Reviewed-by: Brian Starkey Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 52 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/arm/malidp_regs.h | 2 ++ 2 files changed, 54 insertions(+) commit 6211b4868ea615227d61859d65e22bd2942f32a0 Author: Brian Starkey Date: Mon Oct 3 15:08:12 2016 +0100 drm: mali-dp: Rename malidp_input_format to malidp_pixel_format We're going to use the same format list for output formats, so rename everything related to input formats to avoid confusion. Signed-off-by: Brian Starkey [touched commit title to clarify the final struct name] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.c | 24 ++++++++++++------------ drivers/gpu/drm/arm/malidp_hw.h | 8 ++++---- drivers/gpu/drm/arm/malidp_planes.c | 8 ++++---- 3 files changed, 20 insertions(+), 20 deletions(-) commit 3655a1ca6bd8e7300f2bb196208d5139aa6b2eda Author: Alexander Stein Date: Thu Jan 26 14:17:54 2017 +0100 pinctrl: baytrail: Fix debugfs offset output Apparently each GPIO pad's register are 16 bytes, so multiply the pad_map by that. The same is done in byt_gpio_reg the only other place where pad_map is used. Signed-off-by: Alexander Stein Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fc8ad86f73689b4e47f8d3c89aab946120468f3 Author: Marek Szyprowski Date: Thu Jan 26 10:29:24 2017 +0100 pinctrl: samsung: Add infrastructure for pin-bank retention control Pad retention control after suspend/resume cycle should be done from pin controller driver instead of PMU (power management unit) driver to avoid possible ordering and logical dependencies. Till now it worked fine only because PMU driver registered its sys_ops after pin controller. This patch adds infrastructure to handle pad retention during pin control driver resume. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 12 +++++++++ drivers/pinctrl/samsung/pinctrl-samsung.h | 42 +++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 991efb0f151fb9ee603818b2ee1e56666ff6a5eb Author: Marek Szyprowski Date: Thu Jan 26 10:29:22 2017 +0100 pinctrl: samsung: Remove dead code 'enable' parameter has been removed a while ago, so all code for handling it can be simply removed. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9abc2b90977d1410cfe7b30c845fc7d88f5673f0 Author: Marek Szyprowski Date: Thu Jan 26 10:29:23 2017 +0100 pinctrl: samsung: Use generic of_device_get_match_data helper Replace custom code with generic helper. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ed07bda4024d1a1e8f3ebc3fa96244153c87f6d3 Author: Marek Szyprowski Date: Thu Jan 26 10:29:21 2017 +0100 pinctrl: samsung: Add missing initconst annotation Exynos5433 support has been added in parallel to adding initconst annotation to most of the init data structures, so add those annotations also to Exynos5433 structures. Signed-off-by: Marek Szyprowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 38575edcabb4012cb79d02ba9e133cb31aad5137 Author: Uwe Kleine-König Date: Wed Jan 25 22:01:44 2017 +0100 gpio-hammer: fix make consumer_label suitable to work on gpio-nails There are no gpio-nalils, so fix label accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij tools/gpio/gpio-hammer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79d6208988a03a0a3f908b2d5c40ea020d887d5b Author: Jean Delvare Date: Wed Jan 25 10:32:09 2017 +0100 pinctrl: mediatek: Use real dependencies Do not hide pinctrl drivers for Mediatek platforms using conditionals. Doing so actually leaves the symbols present (but always disabled) on all other platforms, which is confusing and inefficient. Better use real dependencies so that the symbols do not exist at all on platforms where they are not relevant. Signed-off-by: Jean Delvare Reported-by: Andreas Färber Reviewed-by: Matthias Brugger Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/Kconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit e2cf00c257f5bbc071b489b1dfbeaa30b6f12da6 Merge: 47cd95a ec34787 Author: Ingo Molnar Date: Thu Jan 26 16:20:59 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170126' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull the latest perf/core updates from Arnaldo Carvalho de Melo: New features: - Introduce 'perf ftrace' a perf front end to the kernel's ftrace function and function_graph tracer, defaulting to the "function_graph" tracer, more work will be done in reviving this effort, forward porting it from its initial patch submission (Namhyung Kim) - Add 'e' and 'c' hotkeys to expand/collapse call chains for a single hist entry in the 'perf report' and 'perf top' TUI (Jiri Olsa) Fixes: - Fix wrong register name for arm64, used in 'perf probe' (He Kuang) - Fix map offsets in relocation in libbpf (Joe Stringer) - Fix looking up dwarf unwind stack info (Matija Glavinic Pecotic) Infrastructure changes: - libbpf prog functions sync with what is exported via uapi (Joe Stringer) Trivial changes: - Remove unnecessary checks and assignments in 'perf probe's try_to_find_absolute_address() (Markus Elfring) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit b4cad1bc5ff63881b92a0fe9683723b4379d8c40 Author: William Breathitt Gray Date: Tue Jan 24 15:01:15 2017 -0500 gpio: ws16c48: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and request_irq call with the devm_gpiochip_add_data call and devm_request_irq call respectively. In addition, the ws16c48_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 2141b0a1d718d5f75b581530ef4f9641c7c4284c Author: William Breathitt Gray Date: Tue Jan 24 15:01:04 2017 -0500 gpio: gpio-mm: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call with the devm_gpiochip_add_data call. In addition, the gpiomm_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-gpio-mm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 837143d356fd066ed6fb0a3a91700d66a7916841 Author: William Breathitt Gray Date: Tue Jan 24 15:00:54 2017 -0500 gpio: 104-idio-16: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and request_irq call with the devm_gpiochip_add_data call and devm_request_irq call respectively. In addition, the idio_16_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit e43fee60344ae4b64cfb4ddeb5355c86606681fa Author: William Breathitt Gray Date: Tue Jan 24 15:00:43 2017 -0500 gpio: 104-idi-48: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and request_irq call with the devm_gpiochip_add_data call and devm_request_irq call respectively. In addition, the idi_48_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 00de1a518aebed3bcf44389cd5dae12a77ade726 Author: William Breathitt Gray Date: Tue Jan 24 15:00:31 2017 -0500 gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and request_irq call with the devm_gpiochip_add_data call and devm_request_irq call respectively. In addition, the dio48e_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit ec347870a9d423a4b88657d6a85b5163b3f949ee Author: Arnaldo Carvalho de Melo Date: Wed Jan 18 21:49:14 2017 -0300 perf ftrace: Make 'function_graph' be the default tracer So that we can suppress the '-t function_graph' and get a more compact command line: # perf ftrace usleep 123456 | grep raw_spin_lock | sort -k2 -nr | head -5 2) 0.555 us | _raw_spin_lock(); 2) 0.516 us | _raw_spin_lock(); 2) 0.410 us | _raw_spin_lock_irq(); 2) 0.374 us | _raw_spin_lock_irqsave(); # Tested-by: Masami Hiramatsu Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jeremy Eder Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ss9xgx5htpxcv86x42pnh3m6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d01f4e8db22cf4d04f6c86351d959b584eb1f5f7 Author: Namhyung Kim Date: Thu Mar 7 21:45:20 2013 +0900 perf ftrace: Introduce new 'ftrace' tool The 'perf ftrace' command is a simple wrapper of kernel's ftrace functionality. It only supports single thread tracing currently and just reads trace_pipe in text and then write it to stdout. Committer notes: Testing it: # perf ftrace -f function_graph usleep 123456 2) | SyS_nanosleep() { 2) | _copy_from_user() { 2) 0.900 us | } 2) 1.354 us | } 2) | hrtimer_nanosleep() { 2) 0.062 us | __hrtimer_init(); 2) | do_nanosleep() { 2) | hrtimer_start_range_ns() { 2) 5.025 us | } 2) | schedule() { 2) 0.125 us | rcu_note_context_switch(); 2) 0.057 us | _raw_spin_lock(); 2) | deactivate_task() { 2) 0.369 us | update_rq_clock.part.77(); 2) | dequeue_task_fair() { 2) + 22.453 us | } 2) + 23.736 us | } 2) | pick_next_task_fair() { 2) + 47.167 us | } 2) | pick_next_task_idle() { 2) 4.462 us | } ------------------------------------------ 2) usleep-20387 => -0 ------------------------------------------ 2) 0.806 us | switch_mm_irqs_off(); ------------------------------------------ 2) -0 => usleep-20387 ------------------------------------------ 2) 0.151 us | finish_task_switch(); 2) @ 123597.2 us | } 2) 0.037 us | _cond_resched(); 2) | hrtimer_try_to_cancel() { 2) 0.064 us | hrtimer_active(); 2) 0.353 us | } 2) @ 123605.3 us | } 2) @ 123606.2 us | } 2) @ 123608.3 us | } /* SyS_nanosleep */ 2) | __do_page_fault() { Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Tested-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Jeremy Eder Cc: Jiri Olsa , Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt Link: http://lkml.kernel.org/n/tip-r1hgmsj4dxny8arn3o9mw512@git.kernel.org [ Various foward port fixes, add man page ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/Documentation/perf-ftrace.txt | 36 +++++ tools/perf/builtin-ftrace.c | 242 +++++++++++++++++++++++++++++++ tools/perf/builtin.h | 1 + tools/perf/command-list.txt | 1 + tools/perf/perf.c | 1 + 6 files changed, 282 insertions(+) commit a7619aef6dca913d830675dd914ca6fe7241a730 Author: Namhyung Kim Date: Thu Apr 18 21:24:16 2013 +0900 perf util: Add more debug message on failure path It's helpful for debugging on tracing features. Signed-off-by: Namhyung Kim Tested-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Jeremy Eder Cc: Jiri Olsa , Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt Link: http://lkml.kernel.org/n/tip-rjysr9ljiesymgk4qblteaty@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 4 ++- tools/perf/util/trace-event-read.c | 53 ++++++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 18 deletions(-) commit cd4ceb63438e9e28299f4352ae7b75d2967a772d Author: Namhyung Kim Date: Thu Apr 11 17:25:04 2013 +0900 perf util: Save pid-cmdline mapping into tracing header Current trace info data lacks the saved cmdline mapping which is needed for pevent to find out the comm of a task. Add this and bump up the version number so that perf can determine its presence when reading. This is mostly corresponding to trace.dat file version 6, but still lacks 4 byte of number of cpus, and 10 bytes of type string - and I think we don't need those anyway. Signed-off-by: Namhyung Kim Tested-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Jeremy Eder Cc: Jiri Olsa , Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt [ Change version test from == to >= ] Link: http://lkml.kernel.org/n/tip-vaooqpxsikxbb3359p0corcb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event-info.c | 33 ++++++++++++++++++++++++++++++++- tools/perf/util/trace-event-parse.c | 17 +++++++++++++++++ tools/perf/util/trace-event-read.c | 36 ++++++++++++++++++++++++++++++++++-- tools/perf/util/trace-event.h | 1 + 4 files changed, 84 insertions(+), 3 deletions(-) commit 0a87e7bc6c55dd248270ee0ab4212cd0ef8ea04a Author: Arnaldo Carvalho de Melo Date: Tue Jan 24 13:19:06 2017 -0300 perf scripting perl: Do not die() when not founding event for a type Do just like handling other cases i.e. print some debug message and ignore the sample. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-t7kzlm3cxyvbd7d9n9554ai9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-perl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e28ff1a8382ee02b10cf11cf3b48541dc3d14a58 Author: Joe Stringer Date: Sun Jan 22 17:11:25 2017 -0800 tools lib bpf: Add libbpf_get_error() This function will turn a libbpf pointer into a standard error code (or 0 if the pointer is valid). This also allows removal of the dependency on linux/err.h in the public header file, which causes problems in userspace programs built against libbpf. Signed-off-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-5-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 8 ++++++++ tools/lib/bpf/libbpf.h | 4 +++- tools/perf/tests/llvm.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) commit 7803ba73099867d1f6ca866857277d92e0da4080 Author: Joe Stringer Date: Sun Jan 22 17:11:24 2017 -0800 tools lib bpf: Add set/is helpers for all prog types These bpf_prog_types were exposed in the uapi but there were no corresponding functions to set these types for programs in libbpf. Signed-off-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-4-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 5 +++++ tools/lib/bpf/libbpf.h | 10 ++++++++++ 2 files changed, 15 insertions(+) commit ed7940731ac89616b8a516c560a76dca44a152a8 Author: Joe Stringer Date: Sun Jan 22 17:11:23 2017 -0800 tools lib bpf: Define prog_type fns with macro Turning this into a macro allows future prog types to be added with a single line per type. Signed-off-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-3-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit 94e5adece8b37a23d99fb1f8a5de94b23194f387 Author: Joe Stringer Date: Sun Jan 22 17:11:22 2017 -0800 tools lib bpf: Fix map offsets in relocation Commit 4708bbda5cb2 ("tools lib bpf: Fix maps resolution") attempted to fix map resolution by identifying the number of symbols that point to maps, and using this number to resolve each of the maps. However, during relocation the original definition of the map size was still in use. For up to two maps, the calculation was correct if there was a small difference in size between the map definition in libbpf and the one that the client library uses. However if the difference was large, particularly if more than two maps were used in the BPF program, the relocation would fail. For example, when using a map definition with size 28, with three maps, map relocation would count: (sym_offset / sizeof(struct bpf_map_def) => map_idx) (0 / 16 => 0), ie map_idx = 0 (28 / 16 => 1), ie map_idx = 1 (56 / 16 => 3), ie map_idx = 3 So, libbpf reports: libbpf: bpf relocation: map_idx 3 large than 2 Fix map relocation by checking the exact offset of maps when doing relocation. Signed-off-by: Joe Stringer [Allow different map size in an object] Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps resolution") Link: http://lkml.kernel.org/r/20170123011128.26534-2-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/libbpf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d1d0e29cb7d03a6019caa125e4c0288366a4f359 Author: Markus Elfring Date: Mon Jan 23 15:10:19 2017 +0100 perf probe: Delete an unnecessary assignment in try_to_find_absolute_address() Remove an error code assignment which is redundant in an if branch for the handling of a memory allocation failure because the same value was set for the local variable "err" before. Signed-off-by: Markus Elfring Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Wang Nan Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/0ede09ec-79b6-c8bd-5b20-02c63ed98aab@users.sourceforge.net Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 42e233cacc052bd545417c68155f2b9abd1bab72 Author: Markus Elfring Date: Mon Jan 23 14:54:26 2017 +0100 perf probe: Delete an unnecessary check in try_to_find_absolute_address() Remove a condition check which is unnecessary at the end because this source code place should usually only be reached with a non-zero pointer. Signed-off-by: Markus Elfring Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Wang Nan Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/a3f2473b-6383-a326-bce0-b826423608b8@users.sourceforge.net Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1b29dfbba124be5077a24996a272205baec1c008 Author: He Kuang Date: Tue Jan 24 10:30:14 2017 +0000 perf probe: Fix wrong register name for arm64 The register name of arm64 architecture is x0-x31 not r0-r31, this patch changes this typo. Before this patch: # perf probe --definition 'sys_write count' p:probe/sys_write _text+1502872 count=%r2:s64 # echo 'p:probe/sys_write _text+1502872 count=%r2:s64' > \ /sys/kernel/debug/tracing/kprobe_events Parse error at argument[0]. (-22) After this patch: # perf probe --definition 'sys_write count' p:probe/sys_write _text+1502872 count=%x2:s64 # echo 'p:probe/sys_write _text+1502872 count=%x2:s64' > \ /sys/kernel/debug/tracing/kprobe_events # echo 1 >/sys/kernel/debug/tracing/events/probe/enable # cat /sys/kernel/debug/tracing/trace ... sh-422 [000] d... 650.495930: sys_write: (SyS_write+0x0/0xc8) count=22 sh-422 [000] d... 651.102389: sys_write: (SyS_write+0x0/0xc8) count=26 sh-422 [000] d... 651.358653: sys_write: (SyS_write+0x0/0xc8) count=86 Signed-off-by: He Kuang Acked-by: Masami Hiramatsu Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Bintian Wang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20170124103015.1936-2-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/include/dwarf-regs-table.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cff2b010250c0e0984fc9e71a96c55495a3ae9e7 Author: Martin Blumenstingl Date: Sun Jan 22 22:05:27 2017 +0100 pinctrl: meson: meson-gxl: add the pwm_ao_b pin This adds support for the pwm_ao_b pin. Unfortunately the registers for the pwm_ao pins are not documented at all. The source for the pwm_ao_b pin from this patch is the Khadas VIM GPL kernel source, which sets bit 3 and unsets bits 4 and 31 to enable the PWM LEDs. Signed-off-by: Martin Blumenstingl Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ece2dac9f13eff4ce446c08ca5e76b1b0188089b Author: Andy Shevchenko Date: Wed Jan 25 22:29:34 2017 +0200 pinctrl: broxton: Rename apl-pinctrl driver While we have no users yet rename the platform driver to use the same pattern as the rest of Intel SoCs, i.e. use full SoC name in 'apollolake-pinctrl'. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-broxton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc46e23c34259c842a138f10acc371e4e2cdb287 Merge: 6969408 e42a5db Author: Greg Kroah-Hartman Date: Thu Jan 26 15:36:28 2017 +0100 Merge tag 'usb-for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB: changes for v4.11 Here's the big pull request for the Gadget API. Again the majority of changes sit in dwc2 driver. Most important changes contain a workaround for GOTGCTL being wrong, a sleep-inside-spinlock fix and the big series of cleanups on dwc2. One important thing on dwc3 is that we don't anymore need gadget drivers to cope with unaligned OUT transfers for us. We have support for appending one extra chained TRB to align transfer ourselves. Apart from these, the usual set of typos, non-critical fixes, etc. commit 2191e4ef688ef0e99090696f0f347c60b0cf5a1e Merge: 1011509 d56923d Author: Mark Brown Date: Thu Jan 26 14:31:59 2017 +0000 Merge branch 'topic/hdac-hdmi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 283a981387c498f846e89450bd83b2c349223b4f Merge: 6596e59 2956b5d Author: Linus Walleij Date: Thu Jan 26 15:28:02 2017 +0100 Merge branch 'ib-pinctrl-genprops' of /home/linus/linux-pinctrl into devel commit 27a2873617415f7a5b9881a532008efd92334b05 Merge: af81ba3 2956b5d Author: Linus Walleij Date: Thu Jan 26 15:27:54 2017 +0100 Merge branch 'ib-pinctrl-genprops' into devel commit 2956b5d94a76b596fa5057c2b3ca915cb27d7652 Author: Mika Westerberg Date: Mon Jan 23 15:34:34 2017 +0300 pinctrl / gpio: Introduce .set_config() callback for GPIO chips Currently we already have two pin configuration related callbacks available for GPIO chips .set_single_ended() and .set_debounce(). In future we expect to have even more, which does not scale well if we need to add yet another callback to the GPIO chip structure for each possible configuration parameter. Better solution is to reuse what we already have available in the generic pinconf. To support this, we introduce a new .set_config() callback for GPIO chips. The callback takes a single packed pin configuration value as parameter. This can then be extended easily beyond what is currently supported by just adding new types to the generic pinconf enum. If the GPIO driver is backed up by a pinctrl driver the GPIO driver can just assign gpiochip_generic_config() (introduced in this patch) to .set_config and that will take care configuration requests are directed to the pinctrl driver. We then convert the existing drivers over .set_config() and finally remove the .set_single_ended() and .set_debounce() callbacks. Suggested-by: Linus Walleij Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Documentation/gpio/driver.txt | 9 +++-- drivers/gpio/gpio-bcm-kona.c | 14 ++++++- drivers/gpio/gpio-dln2.c | 12 ++++-- drivers/gpio/gpio-dwapb.c | 14 ++++++- drivers/gpio/gpio-ep93xx.c | 11 ++++-- drivers/gpio/gpio-f7188x.c | 19 +++++---- drivers/gpio/gpio-lp873x.c | 14 +++---- drivers/gpio/gpio-max77620.c | 20 +++++----- drivers/gpio/gpio-menz127.c | 34 +++++++++++----- drivers/gpio/gpio-merrifield.c | 14 ++++++- drivers/gpio/gpio-omap.c | 14 ++++++- drivers/gpio/gpio-tc3589x.c | 15 ++++--- drivers/gpio/gpio-tegra.c | 14 ++++++- drivers/gpio/gpio-tps65218.c | 14 +++---- drivers/gpio/gpio-vx855.c | 13 ++++--- drivers/gpio/gpio-wcove.c | 13 +++---- drivers/gpio/gpio-wm831x.c | 21 +++++----- drivers/gpio/gpio-wm8994.c | 13 +++---- drivers/gpio/gpiolib.c | 56 +++++++++++++++++---------- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 14 ++++++- drivers/pinctrl/pinctrl-amd.c | 14 ++++++- drivers/pinctrl/pinctrl-sx150x.c | 55 +++++++------------------- drivers/staging/greybus/gpio.c | 15 ++++--- drivers/usb/serial/cp210x.c | 13 ++++--- include/linux/gpio/driver.h | 37 ++++-------------- include/linux/pinctrl/pinconf-generic.h | 33 +++++++--------- 26 files changed, 297 insertions(+), 218 deletions(-) commit 15381bc7c7f52d56f87c56dd7c948ad78704b852 Author: Mika Westerberg Date: Mon Jan 23 15:34:33 2017 +0300 pinctrl: Allow configuration of pins from gpiolib based drivers When a GPIO driver is backed by a pinctrl driver the GPIO driver sometimes needs to call the pinctrl driver to configure certain things, like whether the pin is used as input or output. In addition to this there are other configurations applicable to GPIOs such as setting debounce time of the GPIO. To support this we introduce a new function pinctrl_gpio_set_config() that can be used by gpiolib based driver to pass configuration requests to the backing pinctrl driver. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 29 +++++++++++++++++++++++++++++ drivers/pinctrl/pinconf.c | 12 ++++++++++++ drivers/pinctrl/pinconf.h | 9 +++++++++ include/linux/pinctrl/consumer.h | 6 ++++++ 4 files changed, 56 insertions(+) commit 58957d2edfa19e9b8f80385ba042495058e5e60e Author: Mika Westerberg Date: Mon Jan 23 15:34:32 2017 +0300 pinctrl: Widen the generic pinconf argument from 16 to 24 bits The current pinconf packed format allows only 16-bit argument limiting the maximum value 65535. For most types this is enough. However, debounce time can be in range of hundreths of milliseconds in case of mechanical switches so we cannot represent the worst case using the current format. In order to support larger values change the packed format so that the lower 8 bits are used as type which leaves 24 bits for the argument. This allows representing values up to 16777215 and debounce times up to 16 seconds. We also convert the existing users to use 32-bit integer when extracting argument from the packed configuration value. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 6 +++--- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 6 +++--- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 6 +++--- drivers/pinctrl/intel/pinctrl-cherryview.c | 4 ++-- drivers/pinctrl/meson/pinctrl-meson.c | 2 -- drivers/pinctrl/pinctrl-da850-pupd.c | 2 -- drivers/pinctrl/pinctrl-lpc18xx.c | 10 +++++----- drivers/pinctrl/pinctrl-max77620.c | 2 +- drivers/pinctrl/pinctrl-palmas.c | 2 +- drivers/pinctrl/pinctrl-rockchip.c | 2 +- drivers/pinctrl/pinctrl-single.c | 2 +- drivers/pinctrl/sirf/pinctrl-atlas7.c | 3 ++- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +- drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 4 ++-- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- drivers/rtc/rtc-omap.c | 2 +- include/linux/pinctrl/pinconf-generic.h | 19 +++++++++++-------- 18 files changed, 39 insertions(+), 39 deletions(-) commit af81ba3cfdeefcb743e3f82cdbdbac8294ae6779 Author: Arnd Bergmann Date: Mon Jan 23 13:17:25 2017 +0100 pinctrl: mvebu: remove unused variable A cleanup caused a harmless warning: drivers/pinctrl/mvebu/pinctrl-kirkwood.c: In function 'kirkwood_pinctrl_probe': drivers/pinctrl/mvebu/pinctrl-kirkwood.c:460:19: error: unused variable 'res' [-Werror=unused-variable] The obvious fix is to remove the declaration of the now unused variable. Fixes: ad9ec4ecee68 ("pinctrl: mvebu: switch drivers to generic simple mmio") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 1 - 1 file changed, 1 deletion(-) commit 1736f75d35e47409ad776273133d0f558a4c8253 Author: Andrew Jeffery Date: Tue Jan 24 16:46:46 2017 +1030 gpio: aspeed: Add banks Y, Z, AA, AB and AC This is less straight-forward than one would hope, as some banks only have 4 pins rather than 8, others are output only, yet more (W and X, already supported) are input-only, and in the case of the g4 SoC bank AC doesn't exist. Add some structs to describe the varying properties of different banks and integrate mechanisms to deny requests for unsupported configurations. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 174 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 160 insertions(+), 14 deletions(-) commit 8ccb6dc6e999008bc5d50bdb5badedd636f58e1c Author: Andrew Jeffery Date: Mon Jan 23 15:57:17 2017 +1030 pinctrl: aspeed: g4: Fix mux configuration for GPIOs AA[4-7], AB[0-7] Incorrect video output configuration bits were being tested on pins in GPIO banks AA and AB for the ROM{8,16} mux functions. The ROM{8,16} functions are the highest priority for the relevant pins and also the default function, so we require the relevant video output configuration be disabled to mux GPIO functionality. As the wrong bits were being tested a GPIO export would succeed but leave the pin in an unresponsive state (i.e. value updates were ignored). This misbehaviour was discovered as part of extending the GPIO controller's support to cover banks Y, Z, AA, AB and AC (AC in the case of the g5 SoC). Fixes: 6d329f14a75f ("pinctrl: aspeed-g4: Add mux configuration for all pins") Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 7153f8ef679d5fcb2d9c69a19613399194600f5b Author: Joel Stanley Date: Mon Jan 23 15:56:06 2017 +1030 gpio: aspeed: Make bank names strings The Aspeed SoCs have more GPIOs than can be represented with A-Z. The documentation uses two letter names such as AA and AB, so make the names a three-character array in the bank struct to accommodate this. Signed-off-by: Joel Stanley Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit adbe7e26f4257f72817495b9bce114284060b0d7 Author: Robin Murphy Date: Wed Jan 25 18:31:31 2017 +0000 arm64: dma-mapping: Fix dma_mapping_error() when bypassing SWIOTLB When bypassing SWIOTLB on small-memory systems, we need to avoid calling into swiotlb_dma_mapping_error() in exactly the same way as we avoid swiotlb_dma_supported(), because the former also relies on SWIOTLB state being initialised. Under the assumptions for which we skip SWIOTLB, dma_map_{single,page}() will only ever return the DMA-offset-adjusted physical address of the page passed in, thus we can report success unconditionally. Fixes: b67a8b29df7e ("arm64: mm: only initialize swiotlb when necessary") CC: stable@vger.kernel.org CC: Jisheng Zhang Reported-by: Aaro Koskinen Signed-off-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 2e449048a25eb75d48dff12882b93f26d130a1c6 Author: Kefeng Wang Date: Thu Jan 26 11:19:55 2017 +0800 arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set Fix warning: "(COMPAT) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF)" Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ba11d24b28ead94b976c4d7c8bf8e6c349eb36 Author: Ard Biesheuvel Date: Tue Jan 24 17:11:40 2017 +0000 arm64: kernel: do not mark reserved memory regions as IORESOURCE_BUSY Memory regions marked as NOMAP should not be used for general allocation by the kernel, and should not even be covered by the linear mapping (hence the name). However, drivers or other subsystems (such as ACPI) that access the firmware directly may legally access them, which means it is also reasonable for such drivers to claim them by invoking request_resource(). Currently, this is prevented by the fact that arm64's request_standard_resources() marks reserved regions as IORESOURCE_BUSY. So drop the IORESOURCE_BUSY flag from these requests. Reported-by: Hanjun Guo Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c33dc1015be482ca1a248981698d75369ce8cdc Author: Geert Uytterhoeven Date: Tue Jan 24 16:30:19 2017 +0100 drivers: firmware: psci: Use __pa_symbol for cpu_resume If CONFIG_DEBUG_VIRTUAL=y, during s2ram: virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60 ... [] __virt_to_phys+0x28/0x60 [] psci_system_suspend+0x20/0x44 [] cpu_suspend+0x3c/0x68 [] psci_system_suspend_enter+0x18/0x20 [] suspend_devices_and_enter+0x3f8/0x7e8 [] pm_suspend+0x544/0x5f4 Fixes: 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol") Acked-by: Mark Rutland Acked-by: Laura Abbott Signed-off-by: Geert Uytterhoeven Signed-off-by: Will Deacon drivers/firmware/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbb999dd0b452991f4f698142aa7ffe566c0b415 Author: Geert Uytterhoeven Date: Tue Jan 24 12:43:40 2017 +0100 arm64: Use __pa_symbol for empty_zero_page If CONFIG_DEBUG_VIRTUAL=y and CONFIG_ARM64_SW_TTBR0_PAN=y: virt_to_phys used for non-linear address: ffffff8008cc0000 (empty_zero_page+0x0/0x1000) WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60 ... [] __virt_to_phys+0x28/0x60 [] setup_arch+0x46c/0x4d4 Fixes: 2077be6783b5936c ("arm64: Use __pa_symbol for kernel symbols") Acked-by: Mark Rutland Acked-by: Laura Abbott Signed-off-by: Geert Uytterhoeven Signed-off-by: Will Deacon arch/arm64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33f0698a52d9ebc089eccff7d2fc376974d7e7bf Author: Arnd Bergmann Date: Wed Jan 25 23:20:59 2017 +0100 regulator: s2mpa01: reduce stack size for probe function In some rare configurations we can run into rather high kernel stack consumption: drivers/regulator/s2mpa01.c:397:1: error: the frame size of 1536 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] This is probably harmless since it happens only in the probe function, but there is also a relatively simple workaround, moving the regulator match data into the device specific structure. As a small downside, we waste a little memory at runtime. An alternative approach would free the array at the end of the probe function, which in turn is a little more complicated. Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/regulator/s2mpa01.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 58fb24cb95562da6e54763463464d168ec5a1caa Author: Borislav Petkov Date: Wed Jan 25 16:08:27 2017 +0100 EDAC, i7300: Test for the second channel properly REDMEMB[17] is the ECC_Locator bit, which, when set, identifies the CS[3:2] as the simbols in error. And thus the second channel. The macro computing it was wrong so get rid of it (it was used at one place only) and get rid of the conditional too. Generates better code this way anyway. Signed-off-by: Borislav Petkov Reported-by: David Binderman Reviewed-by: Mauro Carvalho Chehab drivers/edac/i7300_edac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eacc8dafa8d9e3dc8eee378ed030a6a447aa13c2 Author: Takashi Iwai Date: Thu Jan 26 10:50:43 2017 +0100 Documentation/gpu: Move LPE audio section after HD-audio As Daniel suggested, it makes more sense and reduces the conflicts. Also, while we're at it, tidy up the section title from all lower letters. Signed-off-by: Takashi Iwai Documentation/gpu/i915.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 4f9758302ccaf753cd4ba6a5eb740392a4d24773 Author: Chen-Yu Tsai Date: Tue Jan 24 10:32:29 2017 +0800 arm64: dts: allwinner: Remove no longer used pinctrl/sun4i-a10.h header All dts files for the sunxi platform have been switched to the generic pinconf bindings. As a result, the sunxi specific pinctrl macros are no longer used. Remove the #include entry with the following command: sed -i -e '/pinctrl\/sun4i-a10.h/D' \ arch/arm64/boot/dts/allwinner/*.dts? Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 1 - 1 file changed, 1 deletion(-) commit 6596e59e63cd4c0c0b787ce8c1e8bdd1d957b16e Author: Sudip Mukherjee Date: Thu Jan 19 22:23:20 2017 +0000 gpio: exar: add gpio for exar cards Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which can be controlled using gpio interface. Add the gpio specific code. Signed-off-by: Sudip Mukherjee Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-exar.c | 200 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit 8adabb8928bcf75d6dc3f81b30a82884e70599cf Author: Chris Wilson Date: Mon Jan 23 14:52:45 2017 +0000 drm/i915: Pevent copying uninitialised garbage into vma->ggtt_view Since tweaking i915_vma_compare() we allowed constructors to skip clearing the ggtt_view believing that we didn't access the unused members. That, as it turns out, was not entirely true. In particular, i915_gem_fault() uses ret = remap_io_mapping(area, area->vm_start + (vma->ggtt_view.partial.offset << PAGE_SHIFT), (ggtt->mappable_base + vma->node.start) >> PAGE_SHIFT, min_t(u64, vma->size, area->vm_end - area->vm_start), &ggtt->mappable); i.e. the ggtt_view.partial for both normal and partial views. If we allowed garbage into the normal vma->ggtt_view and then try userspace tried to mmap it, we could explode in an unobvious fashion. Fixes: 7b92c047bae2 ("drm/i915: Eliminate superfluous i915_ggtt_view_rotated") Fixes: 3bf4d5751943 ("drm/i915: Stop clearing i915_ggtt_view") Reported-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170123145245.3972-1-chris@chris-wilson.co.uk Tested-by: Matthew Auld Reviewed-by: Matthew Auld (cherry picked from commit 7c518460303353084ebcfca99bc4b67ce33745a1) drivers/gpu/drm/i915/i915_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b03ca903fb07a69ba88d2e1629fe145771f116 Author: Julia Cartwright Date: Fri Jan 20 10:13:47 2017 -0600 pinctrl: qcom: Use raw spinlock variants The MSM pinctrl driver currently implements an irq_chip for handling GPIO 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. On real-time kernels, this fixes an OOPs which looks like the following, as reported by Brian Wrenn: kernel BUG at kernel/locking/rtmutex.c:1014! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: spidev_irq(O) smsc75xx wcn36xx [last unloaded: spidev] CPU: 0 PID: 1163 Comm: irq/144-mmc0 Tainted: G W O 4.4.9-linaro-lt-qcom #1 PC is at rt_spin_lock_slowlock+0x80/0x2d8 LR is at rt_spin_lock_slowlock+0x68/0x2d8 [..] Call trace: rt_spin_lock_slowlock rt_spin_lock msm_gpio_irq_ack handle_edge_irq generic_handle_irq msm_gpio_irq_handler generic_handle_irq __handle_domain_irq gic_handle_irq Reported-by: Brian Wrenn Tested-by: Brian Wrenn Signed-off-by: Julia Cartwright Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 99c8ac957e6b7c670b78ad7b8667051de8624d37 Author: William Breathitt Gray Date: Thu Jan 19 10:05:59 2017 -0500 gpio: ws16c48: Add set_multiple callback function support The WinSystems WS16C48 provides registers where 8 lines of GPIO may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple GPIO output lines to be set more efficiently in groups. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit eaeebffa90f35e0f92658249b0e5c49ddfa89915 Author: Stefan Agner Date: Thu Dec 8 14:54:31 2016 -0800 drm/panel: simple: Specify bus width and flags for EDT displays The display has a 18-Bit parallel LCD interface, require DE to be active high and data driven by the controller on falling pixel clock edge (display samples on rising edge). Signed-off-by: Stefan Agner Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 4 ++++ 1 file changed, 4 insertions(+) commit 65502a12adc343037e8a1e6e936dd8c01f4117b2 Author: William Breathitt Gray Date: Thu Jan 19 10:05:48 2017 -0500 gpio: gpio-mm: Add set_multiple callback function support The Diamond Systems GPIO-MM series provides registers where 8 lines of GPIO may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple GPIO output lines to be set more efficiently in groups. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-gpio-mm.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 9d7ae8127ff9eea84375dd8d962ce776a3734119 Author: William Breathitt Gray Date: Thu Jan 19 10:05:37 2017 -0500 gpio: 104-idio-16: Add set_multiple callback function support The ACCES 104-IDIO-16 series provides registers where 8 lines of GPIO may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple GPIO output lines to be set more efficiently in groups. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e6c2f066d5ed5ba61d48d54b603698bad1c6a270 Author: Maxime Ripard Date: Tue Sep 6 16:46:17 2016 +0200 drm/panel: simple: Add Netron DY E231732 The E231732 is a 7" panel with a resolution of 1024x600. Signed-off-by: Maxime Ripard [treding@nvidia.com: add missing device tree binding] Signed-off-by: Thierry Reding .../bindings/display/panel/netron-dy,e231732.txt | 7 ++++++ drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit be18320222811fcb4fea752b57e2b4fb504db3b4 Author: William Breathitt Gray Date: Thu Jan 19 10:05:27 2017 -0500 gpio: 104-dio-48e: Add set_multiple callback function support The ACCES 104-DIO-48E series provides registers where 8 lines of GPIO may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple GPIO output lines to be set more efficiently in groups. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 559bdaf729bfd4e112c3efce95eb3c894288d281 Author: Daniel Vetter Date: Wed Jan 25 07:26:55 2017 +0100 drm/doc: Fix typos for early_unregister doc There's no late_unregister. While at it switch to the new canonical reference style. Cc: Chris Wilson Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-14-daniel.vetter@ffwll.ch include/drm/drm_crtc.h | 2 +- include/drm/drm_encoder.h | 2 +- include/drm/drm_plane.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 196cd5d3758cbf587fc0254cae7132d95993461e Author: Daniel Vetter Date: Wed Jan 25 07:26:56 2017 +0100 drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ The function operates on modes, not CRTCs. Also move it into drm_modes.[hc]. Spotted while reviewing CRTC docs. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-15-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_crtc.c | 23 +---------------------- drivers/gpu/drm/drm_modes.c | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 4 ++-- include/drm/drm_crtc.h | 2 -- include/drm/drm_modes.h | 2 ++ 6 files changed, 27 insertions(+), 27 deletions(-) commit 0683c0ab1640229cea9e47e75c33cfb192c6aca8 Author: Daniel Vetter Date: Wed Jan 25 07:26:54 2017 +0100 drm/moc: Mark legacy fields in drm_driver as such No point in documenting these, they only confuse. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-13-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - include/drm/drm_drv.h | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 9b5dd047eb5662e55b881be077df235217456372 Author: Daniel Vetter Date: Wed Jan 25 07:26:53 2017 +0100 drm: Nuke ums vgaarb support i915, nouveau (ever since merged to upstream) and radeon all lack ums support in upstream. No point keeping the ums vgaarb support around. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-12-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_irq.c | 26 -------------------------- include/drm/drm_drv.h | 3 --- 2 files changed, 29 deletions(-) commit 2ce0264d61548b51d5d406ff9f414af10b9c7348 Author: Daniel Vetter Date: Wed Jan 25 07:26:52 2017 +0100 drm: remove device_is_agp callback With that the drm_pci_device_is_agp function becomes trivial, so inline that too. And while at it, move the drm_pci_agp_destroy declaration into drm-internal.h, since it's not used by drivers. Cc: Alex Deucher Cc: Ben Skeggs Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_pci.c | 2 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/radeon/radeon_cs.c | 3 ++- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- include/drm/drmP.h | 15 --------------- include/drm/drm_drv.h | 14 -------------- 7 files changed, 6 insertions(+), 33 deletions(-) commit 858b2c1bf820ebfba89c5e2867ab882bdb5b2f5a Author: Daniel Vetter Date: Wed Jan 25 07:26:51 2017 +0100 drm/mga: remove device_is_agp callback It's only for a device quirk, and we might as well do that in the load callback. Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-10-daniel.vetter@ffwll.ch drivers/gpu/drm/mga/mga_dma.c | 20 +++++++++++++++++++- drivers/gpu/drm/mga/mga_drv.c | 37 ------------------------------------- 2 files changed, 19 insertions(+), 38 deletions(-) commit 49d66d8de22851bc4413b355cc1139fa8faea667 Author: Daniel Vetter Date: Wed Jan 25 07:26:50 2017 +0100 drm/i810: drop device_is_agp callback Use the same trick we used for i915 when we still had ums support: Just initialize the agp support unconditionally in the driver load function. Unfortunately that means we need to export drm_agp_init again, but I think that's a lesser evil. Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-9-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_agpsupport.c | 2 ++ drivers/gpu/drm/i810/i810_dma.c | 24 ++++++++---------------- drivers/gpu/drm/i810/i810_drv.c | 1 - drivers/gpu/drm/i810/i810_drv.h | 1 - 4 files changed, 10 insertions(+), 18 deletions(-) commit aec97460e9001816deed33770e1e30435aa24809 Author: Daniel Vetter Date: Wed Jan 25 07:26:48 2017 +0100 drm/doc: Clarify connector overview There was a bit of mix-up between initialization and registering. v2: Review from Gustavo. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-7-daniel.vetter@ffwll.ch Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-8-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 505c9d41057455f1947cadf93a7961f3786b089b Author: Maxime Ripard Date: Tue Sep 6 16:46:16 2016 +0200 of: Add vendor prefix for Netron DY Netron DY is a brand of LCD panels found on SBCs and tablets. Signed-off-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit adb973ef53a711524d44cf92b6e039e91c82d987 Author: Gary Bisson Date: Fri Dec 2 09:52:08 2016 +0100 drm/panel: simple: Add support for Tianma TM070JDHG30 The Tianma TM070JDHG30 is a 7" LVDS display with a resolution of 1280x800. http://usa.tianma.com/products-technology/product/tm070jdhg30-00 You can also find this product along with a FT5x06 touch controller from Boundary Devices: https://boundarydevices.com/product/bd070lic2/ Signed-off-by: Gary Bisson Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/display/panel/tianma,tm070jdhg30.txt | 7 ++++++ drivers/gpu/drm/panel/panel-simple.c | 27 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit c81cbc2e33accb0c99c9411b338b124b7dae4a7a Author: Gary Bisson Date: Fri Dec 2 09:52:07 2016 +0100 of: Add vendor prefix for Tianma Micro-electronics Tianma Micro-electronics Co., Ltd. (Tianma) specializes in providing display solutions and efficient support services worldwide. More info: http://en.tianma.com/about.shtml Signed-off-by: Gary Bisson Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit cac1a41125e7a871c630fb6ca3c5a9337e60e65d Author: Caesar Wang Date: Wed Dec 14 11:19:56 2016 +0800 drm/panel: simple: Add support BOE NV101WXMN51 The BOE NV101WXMN51 is a 10.1" WXGA color active matrix TFT LCD module using amorphous silicon TFT's as an active switching devices. It can be supported by the simple-panel driver. Read the panel default EDID information: EDID MODE DETAILS name = pixel_clock = 71900 lvds_dual_channel = 0 refresh = 0 ha = 1280 hbl = 160 hso = 48 hspw = 32 hborder = 0 va = 800 vbl = 32 vso = 3 vspw = 5 vborder = 0 phsync = + pvsync = - x_mm = 0 y_mm = 0 drm_display_mode .hdisplay = 1280 .hsync_start = 1328 .hsync_end = 1360 .htotal = 1440 .vdisplay = 800 .vsync_start = 803 .vsync_end = 808 .vtotal = 832 There are two modes in the EDID: Detailed mode1: Clock 71.900 MHz, 216 mm x 135 mm 1280 1328 1360 1440 hborder 0 800 803 808 832 vborder 0 +hsync -vsync Detailed mode2: Clock 57.500 MHz, 216 mm x 135 mm 1280 1328 1360 1440 hborder 0 800 803 808 832 vborder 0 +hsync -vsync Support both of these modes on the panel. Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson Reviewed-by: Stéphane Marchesin Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 095790b750686190410e83d1bb4bf496e99f56cf Author: Caesar Wang Date: Wed Dec 14 11:19:55 2016 +0800 dt-bindings: display: Add BOE NV101WXMN51 panel binding The BOE 10.1" NV101WXMN51 panel is an WXGA TFT LCD panel. Signed-off-by: Caesar Wang Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/display/panel/boe,nv101wxmn51.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit ea534e0b404762894ac55ee416c0ac9f5cd5045a Author: Maksim Salau Date: Wed Jan 25 23:40:40 2017 +0300 USB: serial: add uPD78F0730 USB to Serial Adaptor Driver The adaptor can be found on development boards for 78k, RL78 and V850 microcontrollers produced by Renesas Electronics Corporation. This is not a full-featured USB to serial converter, however it allows basic communication and simple control which is enough for programming of on-board flash and debugging through a debug monitor. uPD78F0730 is a USB-enabled microcontroller with USB-to-UART conversion implemented in firmware. This chip is also present in some debugging adaptors which use it for USB-to-SPI conversion as well. The present driver doesn't cover SPI, only USB-to-UART conversion is supported. Signed-off-by: Maksim Salau Signed-off-by: Johan Hovold drivers/usb/serial/Kconfig | 9 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/upd78f0730.c | 440 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 450 insertions(+) commit e42a5dbb8a3d14f5a35bffa3bf7dcb87883f767a Author: Felipe Balbi Date: Thu Jan 26 11:17:37 2017 +0200 usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions dwc3 revisions <=3.00a have a limitation where Port Disable command doesn't work. Set the quirk-broken-port-ped property for such controllers so XHCI core can do the necessary workaround. [rogerq@ti.com] Updated code from platform data to device property. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/host.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 1f7b8eae5c16e6b16c6467ac8e96d0af9c9de81e Author: Marek Szyprowski Date: Thu Jan 19 14:48:46 2017 +0100 pinctrl: samsung: Fix samsung_pinctrl_create_functions return value Return proper error code in case of memory allocation failure. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa5c0f46e2b9a1793313272fd19778fa2db92bf4 Author: Marek Szyprowski Date: Thu Jan 19 14:48:45 2017 +0100 pinctrl: samsung: Remove messages for failed memory allocation Memory subsystem already prints message about failed memory allocation, there is no need to do it in the drivers. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 8 ++------ drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 12 +++--------- drivers/pinctrl/samsung/pinctrl-samsung.c | 24 ++++++------------------ 3 files changed, 11 insertions(+), 33 deletions(-) commit 9d7b1f28c1ff83a0c395f7898a9927ef8b2a0178 Author: Marek Szyprowski Date: Thu Jan 19 14:48:44 2017 +0100 pinctrl: samsung: Document Exynos3250 SoC support Add missing compatible id for Exynos3250 SoC to device tree docs. Exynos pin control driver supports it since commit d97f5b9804bfcdc1 ("pinctrl: exynos: Add driver data for Exynos3250"). Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit 8c541b11483b099b8ce49211e766c6df77dce11b Merge: 49cec4d b2987d7 Author: Linus Walleij Date: Thu Jan 26 10:00:31 2017 +0100 Merge branch 'ib-gpiod-flags' into devel commit 49cec4d8326b27e64779f888c680466d7863558f Author: Linus Walleij Date: Sun Jan 22 13:18:44 2017 +0100 gpio: Add a driver for Cortina Systems Gemini GPIO This is a heavy edit/rewrite of the GPIO driver for the Gemini SoC from arch/arm/mach-gemini/gpio.c. This rewrite uses all the best-in-class helper like generic GPIO and GPIOLIB_IRQCHIP and has been tested on ITian Square One Gemini-based NAS/router. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-gemini.c | 236 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) commit 284864f990ac3e186fb5beb4b0d5b3188fe8f225 Author: Linus Walleij Date: Sun Jan 22 13:18:30 2017 +0100 gpio: add DT bindings for Cortina Gemini GPIO This adds fairly standard DT bindings for the Cortina Systems Gemini GPIO controller. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/gpio/cortina,gemini-gpio.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 035a86b85790ffc8491c6d41cbbb5e74d6a17504 Author: Keerthy Date: Tue Jan 17 21:59:14 2017 +0530 gpio: davinci: Remove custom .xlate With the current redesign of driver it's not necessary to have custom .xlate() as the gpiolib will assign default of_gpio_simple_xlate(). Suggested-by: Grygorii Strashko Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 8e11047b8f3cc0dc6df956cf01915077a574168e Author: Keerthy Date: Tue Jan 17 21:49:14 2017 +0530 gpio: davinci: Add support for multiple GPIO controllers Update GPIO driver to support Multiple GPIO controllers by updating the base of subsequent GPIO chips with total of previous chips gpio count so that gpio_add_chip gets unique numbers. Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 4 +++- include/linux/platform_data/gpio-davinci.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit b5cf3fd827d2e11355c126b44ea625650ebf4d39 Author: Keerthy Date: Fri Jan 13 09:50:12 2017 +0530 gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip The Davinci GPIO driver is implemented to work with one monolithic Davinci GPIO platform device which may have up to Y(144) gpios. The Davinci GPIO driver instantiates number of GPIO chips with max 32 gpio pins per each during initialization and one IRQ domain. So, the current GPIO's opjects structure is: Davinci GPIO controller |- ------| ... |--- irq_domain (hwirq [0..143]) |- ------| Current driver creates one chip for every 32 GPIOs in a controller. This was a limitation earlier now there is no need for that. Hence redesigning the driver to create one gpio chip for all the ngpio in the controller. |- ------|--- irq_domain (hwirq [0..143]). The previous discussion on this can be found here: https://www.spinics.net/lists/linux-omap/msg132869.html Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 127 +++++++++++++++++------------ include/linux/platform_data/gpio-davinci.h | 12 ++- 2 files changed, 83 insertions(+), 56 deletions(-) commit 53d333ac93911dab22d12a78b0a6414f9afb0117 Author: Keerthy Date: Tue Jan 17 21:49:12 2017 +0530 gpio: davinci: Remove unwanted blank line Remove redundant blank line. Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij include/linux/platform_data/gpio-davinci.h | 1 - 1 file changed, 1 deletion(-) commit 8f7cf8c65746d94d58fa94edc134a22a7e528de4 Author: Keerthy Date: Tue Jan 17 21:49:11 2017 +0530 gpio: davinci: Remove gpio2regs function gpio2regs is written making an assumption that driver supports only one instance of gpio controller. Removing this and adding a generic array so as to support multiple instances of gpio controllers. Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) commit fbc2a294f29e726787a0f5238b27137904f26b81 Author: Augusto Mecking Caringi Date: Mon Jan 16 14:30:41 2017 +0000 gpio: intel-mid: Fix build warning when !CONFIG_PM The only usage of function intel_gpio_runtime_idle() is here (in the same file): static const struct dev_pm_ops intel_gpio_pm_ops = { SET_RUNTIME_PM_OPS(NULL, NULL, intel_gpio_runtime_idle) }; And when CONFIG_PM is not set, the macro SET_RUNTIME_PM_OPS expands to nothing, causing the following compiler warning: drivers/gpio/gpio-intel-mid.c:324:12: warning: ‘intel_gpio_runtime_idle’ defined but not used [-Wunused-function] static int intel_gpio_runtime_idle(struct device *dev) Fix it by annotating the function with __maybe_unused. Signed-off-by: Augusto Mecking Caringi Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-intel-mid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2987d7438e0ca949d81774ca8b43d370a1f9947 Author: Alexander Stein Date: Thu Jan 12 17:39:24 2017 +0100 gpio: Pass GPIO label down to gpiod_request Currently all users of fwnode_get_named_gpiod() have no way to specify a label for the GPIO. So GPIOs listed in debugfs are shown with label "?". With this change a proper label is used. Also adjust all users so they can pass a label, properly retrieved from device tree properties. Signed-off-by: Alexander Stein Cc: Andy Shevchenko Acked-by: Jacek Anaszewski Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/gpio/devres.c | 5 +++-- drivers/gpio/gpiolib.c | 5 +++-- drivers/input/keyboard/gpio_keys.c | 3 ++- drivers/input/keyboard/gpio_keys_polled.c | 3 ++- drivers/leds/leds-gpio.c | 13 +++++++------ drivers/video/fbdev/amba-clcd-nomadik.c | 12 ++++++++---- include/linux/gpio/consumer.h | 12 ++++++++---- 7 files changed, 33 insertions(+), 20 deletions(-) commit a264d10ff45c688293d9112fddd8d29c819e0853 Author: Andy Shevchenko Date: Mon Jan 9 16:02:28 2017 +0200 gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/devres.c | 9 +++++++-- drivers/gpio/gpiolib.c | 20 ++++++++++++++++---- drivers/input/keyboard/gpio_keys.c | 9 +-------- drivers/input/keyboard/gpio_keys_polled.c | 11 ++--------- drivers/leds/leds-gpio.c | 2 +- drivers/video/fbdev/amba-clcd-nomadik.c | 15 +++++---------- include/linux/gpio/consumer.h | 19 +++++++++++++------ 7 files changed, 45 insertions(+), 40 deletions(-) commit d9bd264596b9ec364990ab64c8cc1792586425e3 Author: Stefan Schmidt Date: Sat Dec 3 22:59:57 2016 +0100 MAINTAINERS: transfer maintainership for the EZX platform Neither Daniel, Harald or myself are looking into this anymore. Robert thankfully agreed to handle the maintenance from now on. Also remove the outdated entries for website, git tree and mailing list. Signed-off-by: Stefan Schmidt Acked-by: Harald Welte Signed-off-by: Robert Jarzmik MAINTAINERS | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4fe160d51e4226a80f81b3d9b5193e0b8d2ebcbd Author: Heiner Kallweit Date: Wed Jan 25 23:13:37 2017 +0100 usb: dwc2: eliminate irq parameter from dwc2_hcd_init The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Acked-by: John Youn Signed-off-by: Heiner Kallweit Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/hcd.c | 4 ++-- drivers/usb/dwc2/hcd.h | 2 +- drivers/usb/dwc2/platform.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 348becdcc3196addbe882e8a10451744e489e389 Author: Heiner Kallweit Date: Wed Jan 25 23:10:51 2017 +0100 usb: dwc2: fix "iomem 0x00000000" message Set the iomem parameters in the usb_hcd to fix this misleading message during driver load: dwc2 c9100000.usb: irq 22, io mem 0x00000000 Acked-by: John Youn Signed-off-by: Heiner Kallweit Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit df2c0cc1093495df6f44e9b558edebcd52d42b03 Author: Arnd Bergmann Date: Wed Jan 25 23:30:31 2017 +0100 usb: phy: ab8500: remove unused ab8500_eyediagram_workaroud() The only caller of this function is gone, so now we get a warning: drivers/usb/phy/phy-ab8500-usb.c:1026:17: error: 'ab8500_eyediagram_workaroud' defined but not used [-Werror=unused-function] It is possible that we should in fact still call the function from somewhere else, but I don't see from where. Fixes: 635f997a499b ("usb: phy: ab8500: Remove the set_power callback") Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/phy/phy-ab8500-usb.c | 13 ------------- 1 file changed, 13 deletions(-) commit 5528954a1a0c49c6974ef1b8d6eaceff536204d5 Author: Magnus Lilja Date: Wed Jan 25 22:07:59 2017 +0100 usb: gadget: udc: fsl: Add missing complete function. Commit 304f7e5e1d08 ("usb: gadget: Refactor request completion") removed check if req->req.complete is non-NULL, resulting in a NULL pointer derefence and a kernel panic. This patch adds an empty complete function instead of re-introducing the req->req.complete check. Fixes: 304f7e5e1d08 ("usb: gadget: Refactor request completion") Signed-off-by: Magnus Lilja Cc: # 3.18+ Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fsl_udc_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 731977e97b3697454a862fec656c2561eabc0b87 Author: Amadeusz Sławiński Date: Tue Jan 24 16:42:10 2017 +0100 mac80211: use helper function to access ieee802_1d_to_ac[] cleanup patch to make use of ieee80211_ac_from_tid() to retrieve ac from ieee802_1d_to_ac[] Signed-off-by: Amadeusz Sławiński Signed-off-by: Johannes Berg net/mac80211/rx.c | 2 +- net/mac80211/status.c | 2 +- net/mac80211/tx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 51211a3d9b59b5c00f81512c2a16d9f3f607c0d9 Author: Johan Hovold Date: Wed Jan 25 18:22:54 2017 +0100 USB: serial: drop unused ASYNC flags Do not report ASYNC_SKIP_TEST or ASYNC_AUTO_IRQ as being set in TIOCGSERIAL handlers as these flags are not supported and do not really make any sense for USB serial devices in the first place. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 1 - drivers/usb/serial/io_ti.c | 1 - drivers/usb/serial/mos7720.c | 1 - drivers/usb/serial/mos7840.c | 1 - drivers/usb/serial/opticon.c | 1 - drivers/usb/serial/quatech2.c | 1 - drivers/usb/serial/ssu100.c | 1 - drivers/usb/serial/whiteheat.c | 1 - 8 files changed, 8 deletions(-) commit 59556608139edda5aeeed5f73e435e8ddbb16516 Author: Johan Hovold Date: Wed Jan 25 18:22:53 2017 +0100 USB: serial: ftdi_sio: clean up ioctl handler Clean up the ioctl handler and make sure to pass an unsigned-int rather than serial_struct pointer to the TIOCSERGETLSR helper as this it what the user argument really is. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit c33705188c493b7de3b8dc2956d67de91b444727 Author: Gao Feng Date: Mon Nov 21 23:00:32 2016 +0800 batman-adv: Treat NET_XMIT_CN as transmit successfully The tc could return NET_XMIT_CN as one congestion notification, but it does not mean the packet is lost. Other modules like ipvlan, macvlan, and others treat NET_XMIT_CN as success too. So batman-adv should handle NET_XMIT_CN also as NET_XMIT_SUCCESS. Signed-off-by: Gao Feng [sven@narfation.org: Moved NET_XMIT_CN handling to batadv_send_skb_packet] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 758c98e089389e90732fe45087fdee3177493a81 Author: Sara Sharon Date: Thu Sep 29 16:07:35 2016 +0300 iwlwifi: mvm: cleanup redundant assignment This set of station id is redundant - it is being initialised above. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ---- 1 file changed, 4 deletions(-) commit cf90da352a329e755df923fd2c9e810cb75c83a9 Author: Sara Sharon Date: Mon Nov 7 15:22:28 2016 +0200 iwlwifi: mvm: use mvm_disable_queue instead of sharing logic When removing inactive queue - use the central disable queue function. This is needed due to a000 changes to come, but is a proper cleanup anyway. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 29 +++++++------------------- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 10 +++++---- 3 files changed, 16 insertions(+), 27 deletions(-) commit 758d1a8a8af04c70addb26761796019df267f420 Author: Luca Coelho Date: Wed Nov 9 10:02:46 2016 +0200 iwlwifi: mvm: mark ret as maybe_unused in iwl_dbgfs_fw_restart_write() The value returned from iwl_mvm_send_cmd_pdu() in this function is not used and always returns an error (which is the whole point of the call). Tag the ret variable with __maybe_unused to avoid this compile warning when W=1 is used: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c: In function ‘iwl_dbgfs_fw_restart_write’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:875:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a43ae1de13f48831a3bd530e419f43390f3ba3c4 Author: Luca Coelho Date: Wed Nov 9 09:45:58 2016 +0200 iwlwifi: dvm: remove unused variable compiler warning in debugfs.c When compiling with W=1, we get the following warning in debugfs.c: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c: In function ‘iwl_dbgfs_fw_restart_write’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c:2313:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ Fix it by ignoring the return value in this case. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18c44b271b672dd7961399ce6ad099eac5ae1a6a Author: Luca Coelho Date: Wed Nov 9 10:05:18 2016 +0200 iwlwifi: mvm: remove unused sta_id variable in iwl_mvm_change_queue_owner() Remove the sta_id variable, to avoid this compile warning when compiling with W=1: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/sta.c: In function ‘iwl_mvm_change_queue_owner’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/sta.c:871:5: warning: variable ‘sta_id’ set but not used [-Wunused-but-set-variable] s8 sta_id; ^ Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 -- 1 file changed, 2 deletions(-) commit 727c02dfb8480fd5b233a18786ee5de2c0be741c Author: Sara Sharon Date: Wed Oct 26 14:28:23 2016 +0300 iwlwifi: pcie: cleanup rfkill checks Move repeating code to a separate function. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 39 ++++++++++++------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit ad04e088d48a37871a5635de4acdfa689a0b2429 Author: Luca Coelho Date: Wed Nov 9 09:48:49 2016 +0200 iwlwifi: dvm: make rs_tl_get_load() return void The return value from this function is never used, so make it return void to avoid getting the following warning when compiling wiht W=1: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/rs.c: In function ‘rs_tl_turn_on_agg_for_tid’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/rs.c:400:6: warning: variable ‘load’ set but not used [-Wunused-but-set-variable] u32 load; ^ Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 3ce4a03852d6dd3fd28c2fb2ee9f89bb9ccf9a9b Author: Kirtika Ruchandani Date: Tue Nov 8 21:50:48 2016 -0800 iwlwifi: pcie: trans: Remove unused 'shift_param' shift_param is defined and set in iwl_pcie_load_cpu_sections but not used. Fix this to avoid -Wunused-but-set-variable warning. The code using it turned into dead code with commit dcab8ecd5617 ("iwlwifi: mvm: support ucode load for family_8000 B0 only") which added a separate function iwl_pcie_load_given_ucode_8000 (then 8000b) for IWL_DEVICE_FAMILY_8000. Commit 76f8c0e17edc ("iwlwifi: pcie: remove dead code") removed the dead code but left shift_param as is. iwlwifi/pcie/trans.c: In function ‘iwl_pcie_load_cpu_sections’: iwlwifi/pcie/trans.c:871:6: warning: variable ‘shift_param’ set but not used [-Wunused-but-set-variable] Fixes: dcab8ecd5617 ("iwlwifi: mvm: support ucode load for family_8000 B0 only") Fixes: 76f8c0e17edc ("iwlwifi: pcie: remove dead code") Signed-off-by: Kirtika Ruchandani Cc: Sara Sharon Cc: Luca Coelho Cc: Liad Kaufman Cc: Emmanuel Grumbach [removed some unnecessary braces] Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9d50443575fa379c3c72848162af1375a4d43b50 Author: Kirtika Ruchandani Date: Tue Nov 8 21:50:33 2016 -0800 iwlwifi: mvm: rs: Remove unused 'mcs' variable Commit 5fc0f76c4 introduced Rx stats from debugfs, the function iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use it. Compiling iwlwifi with W=1 gives this warning - iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’: iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable] Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs) Signed-off-by: Kirtika Ruchandani Cc: Eyal Shapira Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c94aace0030eed6d26827aaecba207dbc30af112 Author: Kirtika Ruchandani Date: Tue Nov 8 21:50:15 2016 -0800 iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variables mvmvif is defined and set in rs_mimo_allow but not used. Compiling iwlwifi with W=1 gives the following warning, remove it. mvmsta is used only to obtain mvmvif so remove it as well. iwlwifi/mvm/rs.c: In function 'rs_mimo_allow': iwlwifi/mvm/rs.c:165:22: warning: variable 'mvmvif' set but not used.[-Wunused-but-set-variable] This fix removes calls to iwl_mvm_sta_from_mac & iwl_mvm_vif_from_mac. They are both accessors, and do not have any side-effects. Commit e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P") removed a workaround that disabled MIMO on P2P, 'mvmvif' was used for that workaround, but not removed with it. Fixes: e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P") Signed-off-by: Kirtika Ruchandani Cc: Alexander Bondar Cc: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 ------ 1 file changed, 6 deletions(-) commit 7b1be5ad26d36a8ed5e930793f269f3d844166f1 Author: Luca Coelho Date: Wed Nov 9 10:07:14 2016 +0200 iwlwifi: mvm: remove unused variable in iwl_mvm_handle_statistics() The temperature variable is set but not used in iwl_mvm_handle_statistics(). Remove it to avoid the following compiler warning when W=1 is used: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/rx.c: In function ‘iwl_mvm_handle_rx_statistics’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/rx.c:759:6: warning: variable ‘temperature’ set but not used [-Wunused-but-set-variable] u32 temperature; ^ Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 -- 1 file changed, 2 deletions(-) commit d8320d75b59ecdc1b8e60ac793d3a54d84333a18 Author: Jürg Billeter Date: Mon Oct 10 18:30:00 2016 +0200 iwlwifi: fix MODULE_FIRMWARE for 6030 IWL6000G2B_UCODE_API_MAX is not defined. ucode_api_max of IWL_DEVICE_6030 uses IWL6000G2_UCODE_API_MAX. Use this also for MODULE_FIRMWARE. Fixes: 9d9b21d1b616 ("iwlwifi: remove IWL_*_UCODE_API_OK") Signed-off-by: Jürg Billeter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34118c25a9093e6ed99ad1c38ddffa4998d3c13e Author: Sara Sharon Date: Tue Nov 8 18:34:42 2016 +0200 iwlwifi: mvm: support version 2 of stored beacon notification For 9000 devices withg upload, FW cannot send the entire phy flags, and will send only the band - which is what we really care about anyway. Change is backward compatible. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5ec295dbbd674dfbddfcac091857264804f5dc25 Author: Sara Sharon Date: Tue Nov 1 10:52:11 2016 +0200 iwlwifi: mvm: separate rate calculation to a new function In preparation for the new TX cmd - move the rate calculation to a diffrent function, and make it independent of the TX command. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 84 +++++++++++++++-------------- 1 file changed, 45 insertions(+), 39 deletions(-) commit b86dd74f8c73212db4c4c9349d46ce2350fb8106 Author: Sara Sharon Date: Thu Sep 29 15:16:03 2016 +0300 iwlwifi: mvm: change iwl_mvm_tx_csum to return value Currently the function changes the TX cmd itself. Make it more generic by returning a value, as preperation to the new TX cmd. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit eef187a7b8a144a1a0c35c1ccccadc8fd5218504 Author: Sara Sharon Date: Tue Oct 25 11:38:31 2016 +0300 iwlwifi: enlarge number of ucode sections The maximum number of firmware sections is now 32 instead of 16 for a000 devices. Set the appropriate define. Avoid out of bounds access in case there are more sections than the maximum set by driver. Make the driver extensible to FW size changes by allocating the section memory dynamically. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/ucode.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 31 ++++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 1 - drivers/net/wireless/intel/iwlwifi/iwl-fw.h | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 +-- 8 files changed, 33 insertions(+), 16 deletions(-) commit 850fe9af62b2ec28b4c1fc5d02924cd469452283 Author: Sara Sharon Date: Thu Oct 27 17:58:27 2016 +0300 iwlwifi: mvm: replace the number of blocks calculation The logic in the paging calculations is a bit hard to follow. Replace it with a kernel define. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08d785fd809cdaf34d289d917bcb1733a77d9787 Author: Sara Sharon Date: Thu Oct 27 17:27:23 2016 +0300 iwlwifi: mvm: simplify paging allocation code Some of the code there is duplicate while the only change is the block size. Unifying it shortens the code and make the difference clearer. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 61 +++++++---------------------- 1 file changed, 15 insertions(+), 46 deletions(-) commit 5d81fbd5df9654940dfc14b4fed193273a83aab2 Author: Luca Coelho Date: Wed Oct 26 16:04:43 2016 +0300 iwlwifi: mvm: bump max API to 28 We skipped one release, so bump twice, to 28. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit c2e27e16f2411155b906db201b7e478144034ffe Author: Johannes Berg Date: Thu Oct 20 15:25:00 2016 +0200 iwlwifi: mvm: properly check for transport data in dump When copying from vmalloc'ed memory to the SG list, don't crash if the transport didn't provide any data. Fixes: 7e62a699aafb ("iwlwifi: mvm: use dev_coredumpsg()") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5bdaa0ef77065e07be5443b3cea5224ac72c9ac0 Author: Johannes Berg Date: Thu Oct 20 10:01:43 2016 +0200 iwlwifi: allow memory debug TLV to specify the memory type Due to some new features and changes, the firmware file will now specify what type of memory to dump, in upper 8 bits of the type field of the TLV. Parse it (types we don't understand are errors) and teach the code to dump periphery memory. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 12 +++++ drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 15 +++++- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 65 +++++++++++++++++++----- 3 files changed, 79 insertions(+), 13 deletions(-) commit 0843f197c46dd3c432a3202de80e8bc1fcb96a6b Author: Gao Feng Date: Mon Nov 21 23:01:09 2016 +0800 batman-adv: Remove one condition check in batadv_route_unicast_packet It could decrease one condition check to collect some statements in the first condition block. Signed-off-by: Gao Feng Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/routing.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 269cee621847a09b9cfcdb6469ff9b546efbcac1 Author: Sven Eckelmann Date: Sat Dec 17 11:58:29 2016 +0100 batman-adv: Remove unused variable in batadv_tt_local_set_flags Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 2 -- 1 file changed, 2 deletions(-) commit ac79cbb96b58614ce13c4fccc00a9b4d43c2f79b Author: Sven Eckelmann Date: Sun Jan 1 00:00:00 2017 +0100 batman-adv: update copyright years for 2017 Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batman_adv.h | 2 +- net/batman-adv/Makefile | 2 +- net/batman-adv/bat_algo.c | 2 +- net/batman-adv/bat_algo.h | 2 +- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_iv_ogm.h | 2 +- net/batman-adv/bat_v.c | 2 +- net/batman-adv/bat_v.h | 2 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_elp.h | 2 +- net/batman-adv/bat_v_ogm.c | 2 +- net/batman-adv/bat_v_ogm.h | 2 +- net/batman-adv/bitarray.c | 2 +- net/batman-adv/bitarray.h | 2 +- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/bridge_loop_avoidance.h | 2 +- net/batman-adv/debugfs.c | 2 +- net/batman-adv/debugfs.h | 2 +- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/distributed-arp-table.h | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/fragmentation.h | 2 +- net/batman-adv/gateway_client.c | 2 +- net/batman-adv/gateway_client.h | 2 +- net/batman-adv/gateway_common.c | 2 +- net/batman-adv/gateway_common.h | 2 +- net/batman-adv/hard-interface.c | 2 +- net/batman-adv/hard-interface.h | 2 +- net/batman-adv/hash.c | 2 +- net/batman-adv/hash.h | 2 +- net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/icmp_socket.h | 2 +- net/batman-adv/log.c | 2 +- net/batman-adv/log.h | 2 +- net/batman-adv/main.c | 2 +- net/batman-adv/main.h | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/multicast.h | 2 +- net/batman-adv/netlink.c | 2 +- net/batman-adv/netlink.h | 2 +- net/batman-adv/network-coding.c | 2 +- net/batman-adv/network-coding.h | 2 +- net/batman-adv/originator.c | 2 +- net/batman-adv/originator.h | 2 +- net/batman-adv/packet.h | 2 +- net/batman-adv/routing.c | 2 +- net/batman-adv/routing.h | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/send.h | 2 +- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/soft-interface.h | 2 +- net/batman-adv/sysfs.c | 2 +- net/batman-adv/sysfs.h | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/tp_meter.h | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/translation-table.h | 2 +- net/batman-adv/tvlv.c | 2 +- net/batman-adv/tvlv.h | 2 +- net/batman-adv/types.h | 2 +- 60 files changed, 60 insertions(+), 60 deletions(-) commit e60bf3ea67673fc6dd2645946e6dcf135fd7e30c Author: Sven Eckelmann Date: Sun Dec 11 13:16:07 2016 +0100 uapi: install batman_adv.h header 09748a22f4ab ("batman-adv: add generic netlink family for batman-adv") introduced the new batman_adv.h which describes the netlink attributes and commands of batman-adv. But the Kbuild entry to install the header was not added. All currently known tools ship their own copy of batman_adv.h but it should be installed anyway to later be able to migrate to the system batman_adv.h. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit d3e9768ab97fbbff43d9face2711692206a576a9 Author: Simon Wunderlich Date: Thu Nov 24 16:11:01 2016 +0100 batman-adv: don't add loop detect macs to TT The bridge loop avoidance (BLA) feature of batman-adv sends packets to probe for Mesh/LAN packet loops. Those packets are not sent by real clients and should therefore not be added to the translation table (TT). Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.h | 18 ++++++++++++++++++ net/batman-adv/soft-interface.c | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 5b9d6b154a622d0481123c1b149afdf377264268 Author: Arnd Bergmann Date: Wed Jan 25 23:29:33 2017 +0100 bridge: move maybe_deliver_addr() inside #ifdef The only caller of this new function is inside of an #ifdef checking for CONFIG_BRIDGE_IGMP_SNOOPING, so we should move the implementation there too, in order to avoid this harmless warning: net/bridge/br_forward.c:177:13: error: 'maybe_deliver_addr' defined but not used [-Werror=unused-function] Fixes: 6db6f0eae605 ("bridge: multicast to unicast") Signed-off-by: Arnd Bergmann Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/bridge/br_forward.c | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 0901df3aeaee6cb5dde2fd51089786aff6225ebf Author: Daniel Borkmann Date: Thu Jan 26 00:42:49 2017 +0100 bpf: use prefix_len in test_tag when reading fdinfo We currently used len instead of prefix_len for the strncmp() in fdinfo on the prog_tag. It still worked as we matched on the correct output line also with first 8 instead of 10 chars, but lets fix it properly to use the intended length. Fixes: 62b64660262a ("bpf: add prog tag test case to bpf selftests") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1541f98cc252fac55d4e7cc933deddf341ff1710 Merge: 4345029 5e7bfa6 Author: David S. Miller Date: Wed Jan 25 23:13:45 2017 -0500 Merge branch 'broadcom-phy-cleanup' Rafał Miłecki says: ==================== net-next: Broadcom PHY driver cleanup I will probably need to use broadcom.ko for PHY connected to interface of bgmac supported device so I started looking at it willing to understand it better. I found AUXCTL part of the driver / lib a bit confusing and hard to read so I'm trying to clean it up a bit. I hope this patchset makes following AUXCTL operations much easier making it clear which defines are for registers and which for values. There is no functional change in this pachset. ==================== Signed-off-by: David S. Miller commit 5e7bfa6cb0a94c673f6d565e58353366d88e2aa5 Author: Rafał Miłecki Date: Wed Jan 25 21:00:27 2017 +0100 net: phy: bcm-phy-lib: clean up remaining AUXCTL register defines 1) Use 0x%02x format for register number. This follows some other defines and makes it easier to distinct register from values. 2) Put register define above values and sort the values. It makes reading header code easier. 3) Use 0x%04x format for all values. It's about consistency with other values (and most of the header) not a personal preference. 4) Separate define for reading shift value with an extre empty line. It's user for all AUXCTL registers in a bcm54xx_auxctl_read. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/brcmphy.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8293c7bcdef1b866610bf21dee3eb0d181cee753 Author: Rafał Miłecki Date: Wed Jan 25 21:00:26 2017 +0100 net: phy: broadcom: drop duplicated define for RGMII SKEW delay We had two defines for the same bit (both were used with the MII_BCM54XX_AUXCTL_SHDWSEL_MISC register). Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 2 +- include/linux/brcmphy.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 85b4685da52f6680635370c2cfb9a42f04ac9652 Author: Rafał Miłecki Date: Wed Jan 25 21:00:25 2017 +0100 net: phy: broadcom: use auxctl reading helper in BCM54612E code Starting with commit 5b4e29005123 ("net: phy: broadcom: add bcm54xx_auxctl_read") we have a reading helper so use it and avoid code duplication. It also means we don't need MII_BCM54XX_AUXCTL_SHDWSEL_MISC define as it's the same as MII_BCM54XX_AUXCTL_SHDWSEL_MISC just for reading needs (same value shifted by 12 bits). Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 6 ++---- include/linux/brcmphy.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit 50b918c5a6ffad1d9fae29c4fdcb52383b123665 Author: Bhumika Goyal Date: Sun Jan 15 15:29:41 2017 +0530 i2c: omap: constify dev_pm_ops structures Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Signed-off-by: Bhumika Goyal Acked-by: Tony Lindgren Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4f64ae2b5434fe1f3e8dc157dc5260628b0f582 Author: Grzegorz Jaszczyk Date: Thu Dec 22 16:54:02 2016 +0100 i2c: mv64xxx: add suspend/resume support This commit implements suspend/resume support in the mv64xxx I2C controller driver. There is no need to implement a ->suspend() hook, as calling mv64xxx_i2c_hw_init() at ->resume() time is enough. Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Nadav Haklai Reviewed-by: Lior Amsalem Tested-by: Lior Amsalem [Thomas: switch to dev_pm_ops, fix build warning when !PM.] Signed-off-by: Thomas Petazzoni Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 62817fc8d282996b67dcfeae28e0beeb7fd028dd Author: M'boumba Cedric Madianga Date: Thu Jan 19 14:25:13 2017 +0100 i2c: stm32f4: add driver This patch adds support for the STM32F4 I2C controller. Signed-off-by: M'boumba Cedric Madianga Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-stm32f4.c | 897 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 908 insertions(+) commit e1a063f43a5e0435ecf8a2b6d42e10e20e8caf61 Merge: 9eb5d0e 0369d63 Author: Takashi Iwai Date: Wed Jan 25 22:11:17 2017 +0100 Merge branch 'topic/intel-lpe-audio' into for-next commit 0369d6315bc2bc56da2a2b15c8074b889096a47e Author: Julia Lawall Date: Tue Jan 24 17:07:48 2017 +0100 ALSA: x86: hdmi: fix returnvar.cocci warnings Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Jerome Anand Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio_if.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 31945aa9f14085c81cb3257e51bb210698b78626 Merge: e3c50df 38d30b3 8dc7988 7f554a3 7d02594 Author: Paul E. McKenney Date: Wed Jan 25 12:56:05 2017 -0800 Merge branches 'doc.2017.01.15b', 'dyntick.2017.01.23a', 'fixes.2017.01.23a', 'srcu.2017.01.25a' and 'torture.2017.01.15b' into HEAD doc.2017.01.15b: Documentation updates dyntick.2017.01.23a: Dyntick tracking consolidation fixes.2017.01.23a: Miscellaneous fixes srcu.2017.01.25a: SRCU rewrite, fixes, and verification torture.2017.01.15b: Torture-test updates commit 7f554a3d05bea9f6b7bf8e0b041d09447f82d74a Author: Paul E. McKenney Date: Tue Jan 24 08:51:34 2017 -0800 srcu: Reduce probability of SRCU ->unlock_count[] counter overflow Because there are no memory barriers between the srcu_flip() ->completed increment and the summation of the read-side ->unlock_count[] counters, both the compiler and the CPU can reorder the summation with the ->completed increment. If the updater is preempted long enough during this process, the read-side counters could overflow, resulting in a too-short grace period. This commit therefore adds a memory barrier just after the ->completed increment, ensuring that if the summation misses an increment of ->unlock_count[] from __srcu_read_unlock(), the next __srcu_read_lock() will see the new value of ->completed, thus bounding the number of ->unlock_count[] increments that can be missed to NR_CPUS. The actual overflow computation is more complex due to the possibility of nesting of __srcu_read_lock(). Reported-by: Lance Roy Signed-off-by: Paul E. McKenney kernel/rcu/srcu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 418b2977b34378f67c46930c72a776f94e7bf903 Author: Lance Roy Date: Sat Dec 31 16:33:50 2016 -0800 rcutorture: Add CBMC-based formal verification for SRCU This commit creates a formal/srcu-cbmc directory containing scripts that pull SRCU in from the source code, filter it to remove things that CBMC cannot handle, and run a series of verifications on it. This has a number of shortcomings: 1. It does not yet hook into the upper-level self-test Makefiles. 2. It tests only a single scenario, store buffering. 3. There is no gcc-based syntax-error prefiltering. Nevertheless, it does fully verify a piece of SRCU under a moderately weak memory model (PSO). Signed-off-by: Lance Roy Signed-off-by: Paul E. McKenney .../rcutorture/formal/srcu-cbmc/.gitignore | 1 + .../selftests/rcutorture/formal/srcu-cbmc/Makefile | 16 + .../formal/srcu-cbmc/empty_includes/linux/delay.h | 0 .../formal/srcu-cbmc/empty_includes/linux/export.h | 0 .../formal/srcu-cbmc/empty_includes/linux/mutex.h | 0 .../formal/srcu-cbmc/empty_includes/linux/percpu.h | 0 .../srcu-cbmc/empty_includes/linux/preempt.h | 0 .../srcu-cbmc/empty_includes/linux/rcupdate.h | 0 .../formal/srcu-cbmc/empty_includes/linux/sched.h | 0 .../formal/srcu-cbmc/empty_includes/linux/smp.h | 0 .../srcu-cbmc/empty_includes/linux/workqueue.h | 0 .../srcu-cbmc/empty_includes/uapi/linux/types.h | 0 .../formal/srcu-cbmc/include/linux/.gitignore | 1 + .../formal/srcu-cbmc/include/linux/kconfig.h | 1 + .../formal/srcu-cbmc/include/linux/types.h | 155 +++++++++ .../rcutorture/formal/srcu-cbmc/modify_srcu.awk | 375 +++++++++++++++++++++ .../rcutorture/formal/srcu-cbmc/src/assume.h | 16 + .../rcutorture/formal/srcu-cbmc/src/barriers.h | 41 +++ .../rcutorture/formal/srcu-cbmc/src/bug_on.h | 13 + .../formal/srcu-cbmc/src/combined_source.c | 13 + .../rcutorture/formal/srcu-cbmc/src/config.h | 27 ++ .../rcutorture/formal/srcu-cbmc/src/include_srcu.c | 31 ++ .../rcutorture/formal/srcu-cbmc/src/int_typedefs.h | 33 ++ .../rcutorture/formal/srcu-cbmc/src/locks.h | 220 ++++++++++++ .../rcutorture/formal/srcu-cbmc/src/misc.c | 11 + .../rcutorture/formal/srcu-cbmc/src/misc.h | 58 ++++ .../rcutorture/formal/srcu-cbmc/src/percpu.h | 92 +++++ .../rcutorture/formal/srcu-cbmc/src/preempt.c | 78 +++++ .../rcutorture/formal/srcu-cbmc/src/preempt.h | 58 ++++ .../formal/srcu-cbmc/src/simple_sync_srcu.c | 50 +++ .../rcutorture/formal/srcu-cbmc/src/workqueues.h | 102 ++++++ .../srcu-cbmc/tests/store_buffering/.gitignore | 1 + .../srcu-cbmc/tests/store_buffering/Makefile | 11 + .../tests/store_buffering/assert_end.fail | 1 + .../srcu-cbmc/tests/store_buffering/force.fail | 1 + .../srcu-cbmc/tests/store_buffering/force2.fail | 1 + .../srcu-cbmc/tests/store_buffering/force3.fail | 1 + .../srcu-cbmc/tests/store_buffering/main.pass | 0 .../formal/srcu-cbmc/tests/store_buffering/test.c | 72 ++++ .../formal/srcu-cbmc/tests/test_script.sh | 102 ++++++ 40 files changed, 1582 insertions(+) commit d85b62f18d543c663cbdd6061054efeb9e66cee7 Author: Paul E. McKenney Date: Mon Nov 28 12:08:49 2016 -0800 srcu: Force full grace-period ordering If a process invokes synchronize_srcu(), is delayed just the right amount of time, and thus does not sleep when waiting for the grace period to complete, there is no ordering between the end of the grace period and the code following the synchronize_srcu(). Similarly, there can be a lack of ordering between the end of the SRCU grace period and callback invocation. This commit adds the necessary ordering. Reported-by: Lance Roy Signed-off-by: Paul E. McKenney [ paulmck: Further smp_mb() adjustment per email with Lance Roy. ] include/linux/rcupdate.h | 12 ++++++++++++ kernel/rcu/srcu.c | 10 ++++++++-- kernel/rcu/tree.h | 12 ------------ 3 files changed, 20 insertions(+), 14 deletions(-) commit f2c4689640e9a34bc45c013032185ed4ce47e7ff Author: Lance Roy Date: Mon Jan 23 13:35:18 2017 -0800 srcu: Implement more-efficient reader counts SRCU uses two per-cpu counters: a nesting counter to count the number of active critical sections, and a sequence counter to ensure that the nesting counters don't change while they are being added together in srcu_readers_active_idx_check(). This patch instead uses per-cpu lock and unlock counters. Because both counters only increase and srcu_readers_active_idx_check() reads the unlock counter before the lock counter, this achieves the same end without having to increment two different counters in srcu_read_lock(). This also saves a smp_mb() in srcu_readers_active_idx_check(). Possible bug: There is no guarantee that the lock counter won't overflow during srcu_readers_active_idx_check(), as there are no memory barriers around srcu_flip() (see comment in srcu_readers_active_idx_check() for details). However, this problem was already present before this patch. Suggested-by: Mathieu Desnoyers Signed-off-by: Lance Roy Cc: Paul E. McKenney Cc: Lai Jiangshan Cc: Peter Zijlstra Signed-off-by: Paul E. McKenney include/linux/srcu.h | 10 ++-- kernel/rcu/rcutorture.c | 19 +++++++- kernel/rcu/srcu.c | 122 +++++++++++++++++------------------------------- 3 files changed, 66 insertions(+), 85 deletions(-) commit 33eb46e1dca1cdeeb4b5a7e794f7b8c3eb98fba4 Author: M'boumba Cedric Madianga Date: Thu Jan 19 14:25:12 2017 +0100 dt-bindings: Document the STM32 I2C bindings This patch adds documentation of device tree bindings for the STM32 I2C controller. Signed-off-by: M'boumba Cedric Madianga Acked-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-stm32.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 434502930f59995f37fcc2c02cab79e059fb5043 Author: Andrew Lunn Date: Wed Jan 25 15:04:17 2017 +0100 net: dsa: Mop up remaining NET_DSA_HWMON references Previous patches have moved the temperature sensor code into the Marvell PHYs. A few now dead references to NET_DSA_HWMON were left behind. Go reap them. Reported-by: Valentin Rothberg Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/networking/dsa/dsa.txt | 24 ------------------------ include/net/dsa.h | 8 -------- 2 files changed, 32 deletions(-) commit 6eacfb54ea1825a3f1062bbfd71669b594168646 Author: Tomáš Pilař Date: Wed Jan 25 13:48:17 2017 +0000 sfc: reduce severity of PIO buffer alloc failures PIO buffer allocation can fail for two valid reasons: - we've run out of them (results in -ENOSPC) - the NIC configuration doesn't support them (results in -EPERM) Since both these failures are expected netif_err is excessive. Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 761095c238f7b234bd63c164416ac42792a8eeb1 Merge: 3979ad7 fff37fd Author: David S. Miller Date: Wed Jan 25 14:42:37 2017 -0500 Merge branch 'thunderx-ethtool' Sunil Goutham says: ==================== thunderx: More ethtool support and BGX configuration changes These patches adds support to set queue sizes from ethtool and changes the way serdes lane configuration is done by BGX driver on 81/83xx platforms. ==================== Signed-off-by: David S. Miller commit fff37fdad9df3b214294ef83943d92aa9e1c7ecc Author: Sunil Goutham Date: Wed Jan 25 17:36:24 2017 +0530 net: thunderx: Leave serdes lane config on 81/83xx to firmware For DLMs and SLMs on 80/81/83xx, many lane configurations across different boards are coming up. Also kernel doesn't have any way to identify board type/info and since firmware does, just get rid of figuring out lane to serdes config and take whatever has been programmed by low level firmware. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 95 +++++------------------ 1 file changed, 18 insertions(+), 77 deletions(-) commit fff4ffdde175bfa4516394db95ae56153224664b Author: Sunil Goutham Date: Wed Jan 25 17:36:23 2017 +0530 net: thunderx: Support to configure queue sizes from ethtool Adds support to set Rx/Tx queue sizes from ethtool. Fixes an issue with retrieving queue size. Also sets SQ's CQ_LIMIT based on configured Tx queue size such that HW doesn't process SQEs when there is no sufficient space in CQ. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller .../net/ethernet/cavium/thunder/nicvf_ethtool.c | 39 ++++++++++++++++++++-- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 19 +++++++++-- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 16 ++++++--- 3 files changed, 65 insertions(+), 9 deletions(-) commit 3979ad7e82dfe3fb94a51c3915e64ec64afa45c3 Author: Willy Tarreau Date: Wed Jan 25 14:42:46 2017 +0100 net/tcp-fastopen: make connect()'s return case more consistent with non-TFO Without TFO, any subsequent connect() call after a successful one returns -1 EISCONN. The last API update ensured that __inet_stream_connect() can return -1 EINPROGRESS in response to sendmsg() when TFO is in use to indicate that the connection is now in progress. Unfortunately since this function is used both for connect() and sendmsg(), it has the undesired side effect of making connect() now return -1 EINPROGRESS as well after a successful call, while at the same time poll() returns POLLOUT. This can confuse some applications which happen to call connect() and to check for -1 EISCONN to ensure the connection is usable, and for which EINPROGRESS indicates a need to poll, causing a loop. This problem was encountered in haproxy where a call to connect() is precisely used in certain cases to confirm a connection's readiness. While arguably haproxy's behaviour should be improved here, it seems important to aim at a more robust behaviour when the goal of the new API is to make it easier to implement TFO in existing applications. This patch simply ensures that we preserve the same semantics as in the non-TFO case on the connect() syscall when using TFO, while still returning -1 EINPROGRESS on sendmsg(). For this we simply tell __inet_stream_connect() whether we're doing a regular connect() or in fact connecting for a sendmsg() call. Cc: Wei Wang Cc: Yuchung Cheng Cc: Eric Dumazet Signed-off-by: Willy Tarreau Signed-off-by: David S. Miller include/net/inet_common.h | 2 +- net/ipv4/af_inet.c | 6 +++--- net/ipv4/tcp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit eb92f76ef54f988af529c89e843958f8673de9e8 Merge: a9c54ad 19f6d3f Author: David S. Miller Date: Wed Jan 25 14:04:39 2017 -0500 Merge branch 'tcp-fastopen-new-API' Wei Wang says: ==================== net/tcp-fastopen: Add new userspace API support The patch series is to add support for new userspace API for TCP fastopen sockets. In the current code, user has to call sendto()/sendmsg() with special flag MSG_FASTOPEN for TCP fastopen sockets. This API is quite different from the normal TCP socket API and can be cumbersome for applications to make use fastopen sockets. So this new patch introduces a new way of using TCP fastopen sockets which is similar to normal TCP sockets with a new sockopt TCP_FASTOPEN_CONNECT. More details about it is described in the third patch. (First 2 patches are preparations for the third patch.) ==================== Signed-off-by: David S. Miller commit 19f6d3f3c8422d65b5e3d2162e30ef07c6e21ea2 Author: Wei Wang Date: Mon Jan 23 10:59:22 2017 -0800 net/tcp-fastopen: Add new API support This patch adds a new socket option, TCP_FASTOPEN_CONNECT, as an alternative way to perform Fast Open on the active side (client). Prior to this patch, a client needs to replace the connect() call with sendto(MSG_FASTOPEN). This can be cumbersome for applications who want to use Fast Open: these socket operations are often done in lower layer libraries used by many other applications. Changing these libraries and/or the socket call sequences are not trivial. A more convenient approach is to perform Fast Open by simply enabling a socket option when the socket is created w/o changing other socket calls sequence: s = socket() create a new socket setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN_CONNECT …); newly introduced sockopt If set, new functionality described below will be used. Return ENOTSUPP if TFO is not supported or not enabled in the kernel. connect() With cookie present, return 0 immediately. With no cookie, initiate 3WHS with TFO cookie-request option and return -1 with errno = EINPROGRESS. write()/sendmsg() With cookie present, send out SYN with data and return the number of bytes buffered. With no cookie, and 3WHS not yet completed, return -1 with errno = EINPROGRESS. No MSG_FASTOPEN flag is needed. read() Return -1 with errno = EWOULDBLOCK/EAGAIN if connect() is called but write() is not called yet. Return -1 with errno = EWOULDBLOCK/EAGAIN if connection is established but no msg is received yet. Return number of bytes read if socket is established and there is msg received. The new API simplifies life for applications that always perform a write() immediately after a successful connect(). Such applications can now take advantage of Fast Open by merely making one new setsockopt() call at the time of creating the socket. Nothing else about the application's socket call sequence needs to change. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Yuchung Cheng Signed-off-by: David S. Miller include/linux/tcp.h | 3 ++- include/net/inet_sock.h | 6 +++++- include/net/tcp.h | 1 + include/uapi/linux/tcp.h | 1 + net/ipv4/af_inet.c | 31 ++++++++++++++++++++++++------- net/ipv4/tcp.c | 35 ++++++++++++++++++++++++++++++++++- net/ipv4/tcp_fastopen.c | 33 +++++++++++++++++++++++++++++++++ net/ipv4/tcp_ipv4.c | 7 ++++++- net/ipv6/tcp_ipv6.c | 5 +++++ 9 files changed, 111 insertions(+), 11 deletions(-) commit 25776aa943401662617437841b3d3ea4693ee98a Author: Wei Wang Date: Mon Jan 23 10:59:21 2017 -0800 net: Remove __sk_dst_reset() in tcp_v6_connect() Remove __sk_dst_reset() in the failure handling because __sk_dst_reset() will eventually get called when sk is released. No need to handle it in the protocol specific connect call. This is also to make the code path consistent with ipv4. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 1 - 1 file changed, 1 deletion(-) commit 065263f40f0972d5f1cd294bb0242bd5aa5f06b2 Author: Wei Wang Date: Mon Jan 23 10:59:20 2017 -0800 net/tcp-fastopen: refactor cookie check logic Refactor the cookie check logic in tcp_send_syn_data() into a function. This function will be called else where in later changes. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Yuchung Cheng Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp_fastopen.c | 21 +++++++++++++++++++++ net/ipv4/tcp_output.c | 16 ++-------------- 3 files changed, 25 insertions(+), 14 deletions(-) commit a9c54ad2c737853b1f404b10b09da4ca7fa18597 Author: hayeswang Date: Wed Jan 25 13:41:45 2017 +0800 r8152: fix the wrong spelling Replace rumtime with runtime. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d234559952f4f2b1bf89229da0d54be5281613d7 Author: Andrew Lunn Date: Wed Jan 25 02:44:48 2017 +0100 Doc: DT: bindings: net: dsa: marvell.txt: Tabification Replace spaces with tabs. Fix indentation to be multiples of tabs, not a mixture or tabs and spaces. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/marvell.txt | 112 ++++++++++----------- 1 file changed, 56 insertions(+), 56 deletions(-) commit cca316f3562afea7efa35acdd84ed899e23e6e29 Merge: 60b1af3 a67edbf Author: David S. Miller Date: Wed Jan 25 13:17:48 2017 -0500 Merge branch 'bpf-tracepoints' Daniel Borkmann says: ==================== BPF tracepoints This set adds tracepoints to BPF for better introspection and debugging. The first two patches are prerequisite for the actual third patch that adds the tracepoints. I think the first two are small and straight forward enough that they could ideally go via net-next, but I'm also open to other suggestions on how to route them in case that's not applicable (it would reduce potential merge conflicts on BPF side, though). For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit a67edbf4fb6deadcfe57a04a134abed4a5ba3bb5 Author: Daniel Borkmann Date: Wed Jan 25 02:28:18 2017 +0100 bpf: add initial bpf tracepoints This work adds a number of tracepoints to paths that are either considered slow-path or exception-like states, where monitoring or inspecting them would be desirable. For bpf(2) syscall, tracepoints have been placed for main commands when they succeed. In XDP case, tracepoint is for exceptions, that is, f.e. on abnormal BPF program exit such as unknown or XDP_ABORTED return code, or when error occurs during XDP_TX action and the packet could not be forwarded. Both have been split into separate event headers, and can be further extended. Worst case, if they unexpectedly should get into our way in future, they can also removed [1]. Of course, these tracepoints (like any other) can be analyzed by eBPF itself, etc. Example output: # ./perf record -a -e bpf:* sleep 10 # ./perf script sock_example 6197 [005] 283.980322: bpf:bpf_map_create: map type=ARRAY ufd=4 key=4 val=8 max=256 flags=0 sock_example 6197 [005] 283.980721: bpf:bpf_prog_load: prog=a5ea8fa30ea6849c type=SOCKET_FILTER ufd=5 sock_example 6197 [005] 283.988423: bpf:bpf_prog_get_type: prog=a5ea8fa30ea6849c type=SOCKET_FILTER sock_example 6197 [005] 283.988443: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[06 00 00 00] val=[00 00 00 00 00 00 00 00] [...] sock_example 6197 [005] 288.990868: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[01 00 00 00] val=[14 00 00 00 00 00 00 00] swapper 0 [005] 289.338243: bpf:bpf_prog_put_rcu: prog=a5ea8fa30ea6849c type=SOCKET_FILTER [1] https://lwn.net/Articles/705270/ Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 12 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 15 +- drivers/net/ethernet/qlogic/qede/qede_fp.c | 4 + drivers/net/virtio_net.c | 12 +- include/linux/bpf_trace.h | 7 + include/trace/events/bpf.h | 347 +++++++++++++++++++++ include/trace/events/xdp.h | 53 ++++ kernel/bpf/core.c | 9 + kernel/bpf/inode.c | 17 +- kernel/bpf/syscall.c | 19 +- 11 files changed, 483 insertions(+), 15 deletions(-) commit 0fe05591790e953f3ef9cf4f1bce08b6dd7b771f Author: Daniel Borkmann Date: Wed Jan 25 02:28:17 2017 +0100 lib, traceevent: add PRINT_HEX_STR variant Add support for the __print_hex_str() macro that was added for tracing, so that user space tools such as perf can understand it as well. Signed-off-by: Daniel Borkmann Cc: Steven Rostedt Cc: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller tools/lib/traceevent/event-parse.c | 34 ++++++++++++++++++++-- tools/lib/traceevent/event-parse.h | 1 + .../perf/util/scripting-engines/trace-event-perl.c | 1 + .../util/scripting-engines/trace-event-python.c | 1 + 4 files changed, 34 insertions(+), 3 deletions(-) commit 2acae0d5b0f73a8fb4b180bd13491feb96e55fc6 Author: Daniel Borkmann Date: Wed Jan 25 02:28:16 2017 +0100 trace: add variant without spacing in trace_print_hex_seq For upcoming tracepoint support for BPF, we want to dump the program's tag. Format should be similar to __print_hex(), but without spacing. Add a __print_hex_str() variant for exactly that purpose that reuses trace_print_hex_seq(). Signed-off-by: Daniel Borkmann Cc: Steven Rostedt Cc: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller include/linux/trace_events.h | 3 ++- include/trace/trace_events.h | 8 +++++++- kernel/trace/trace_output.c | 7 ++++--- 3 files changed, 13 insertions(+), 5 deletions(-) commit 60b1af3300724d211bb0b420c1fbe6bf5b87b013 Author: Eric Dumazet Date: Tue Jan 24 14:57:36 2017 -0800 tcp: reduce skb overhead in selected places tcp_add_backlog() can use skb_condense() helper to get better gains and less SKB_TRUESIZE() magic. This only happens when socket backlog has to be used. Some attacks involve specially crafted out of order tiny TCP packets, clogging the ofo queue of (many) sockets. Then later, expensive collapse happens, trying to copy all these skbs into single ones. This unfortunately does not work if each skb has no neighbor in TCP sequence order. By using skb_condense() if the skb could not be coalesced to a prior one, we defeat these kind of threats, potentially saving 4K per skb (or more, since this is one page fragment). A typical NAPI driver allocates gro packets with GRO_MAX_HEAD bytes in skb->head, meaning the copy done by skb_condense() is limited to about 200 bytes. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 1 + net/ipv4/tcp_ipv4.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit 716dcaebed99120cf5d3d9faa9720d6bceddae3d Merge: a08ef47 5eb0249 Author: David S. Miller Date: Wed Jan 25 12:49:58 2017 -0500 Merge tag 'mlx5-updates-2017-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-24-01 The first seven patches from Or Gerlitz in this series further enhances the mlx5 SRIOV switchdev mode to support offloading IPv6 tunnels using the TC tunnel key set (encap) and unset (decap) actions. Or Gerlitz says: ======================== As part of doing this change, few cleanups are done in the IPv4 code, later we move to use the full tunnel key info provided to the driver as the key for our internal hashing which is used to identify cases where the same tunnel is used for encapsulating multiple flows. As done in the IPv4 case, the control path for offloading IPv6 tunnels uses route/neigh lookups and construction of the IPv6 tunnel headers on the encap path and matching on the outer hears in the decap path. The last patch of the series enlarges the HW FDB size for the switchdev mode, so it has now room to contain offloaded flows as many as min(max number of HW flow counters supported, max HW table size supported). ======================== Next to Or's series you can find several patches handling several topics. From Mohamad, add support for SRIOV VF min rate guarantee by using the TSAR BW share weights mechanism. From Or, Two patches to enable Eth VFs to query their min-inline value for user-space. for that we move a mlx5 low level min inline helper function from mlx5 ethernet driver into the core driver and then use it in mlx5_ib to expose the inline mode to rdma applications through libmlx5. From Kamal Heib, Reduce memory consumption on kdump kernel. From Shaker Daibes, code reuse in CQE compression control logic ==================== Signed-off-by: David S. Miller commit a08ef4768f479a712f80426fba42d16253feb37c Author: Dan Carpenter Date: Tue Jan 24 12:49:35 2017 +0300 tipc: uninitialized return code in tipc_setsockopt() We shuffled some code around and added some new case statements here and now "res" isn't initialized on all paths. Fixes: 01fd12bb189a ("tipc: make replicast a user selectable option") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1045ba77a5962a22bce7777678ef46714107ea63 Author: Jamal Hadi Salim Date: Tue Jan 24 07:02:41 2017 -0500 net sched actions: Add support for user cookies Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The kernel _should not_ intepret it. The user can store whatever they wish in the 128 bits. Sample exercise(showing variable length use of cookie) .. create an accept action with cookie a1b2c3d4 sudo $TC actions add action ok index 1 cookie a1b2c3d4 .. dump all gact actions.. sudo $TC -s actions ls action gact action order 0: gact action pass random type none pass val 0 index 1 ref 1 bind 0 installed 5 sec used 5 sec Action statistics: Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 cookie a1b2c3d4 .. bind the accept action to a filter.. sudo $TC filter add dev lo parent ffff: protocol ip prio 1 \ u32 match ip dst 127.0.0.1/32 flowid 1:1 action gact index 1 ... send some traffic.. $ ping 127.0.0.1 -c 3 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.020 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.027 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.038 ms Signed-off-by: David S. Miller include/net/act_api.h | 1 + include/net/pkt_cls.h | 8 ++++++++ include/uapi/linux/pkt_cls.h | 3 +++ net/sched/act_api.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) commit 93fbe91b552194af970256ce72934745d01df435 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:07 2017 +0100 iio: Add STM32 timer trigger driver Timers IPs can be used to generate triggers for other IPs like DAC or ADC. Each trigger may result of timer internals signals like counter enable, reset or edge, this configuration could be done through "master_mode" device attribute. Since triggers could be used by DAC or ADC their names are defined in include/ nux/iio/timer/stm32-timer-trigger.h and is_stm32_iio_timer_trigger function could be used to check if the trigger is valid or not. "trgo" trigger have a "sampling_frequency" attribute which allow to configure timer sampling frequency. version 8: - change kernel version from 4.10 to 4.11 in ABI documentation version 7: - remove all iio_device related code - move driver into trigger directory version 5: - simplify tables of triggers - only create an IIO device when needed version 4: - get triggers configuration from "reg" in DT - add tables of triggers - sampling frequency is enable/disable when writing in trigger sampling_frequency attribute - no more use of interruptions version 3: - change compatible to "st,stm32-timer-trigger" - fix attributes access right - use string instead of int for master_mode and slave_mode - document device attributes in sysfs-bus-iio-timer-stm32 version 2: - keep only one compatible - use st,input-triggers-names and st,output-triggers-names to know which triggers are accepted and/or create by the device Signed-off-by: Benjamin Gaignard Acked-by: Jonathan Cameron Signed-off-by: Lee Jones .../ABI/testing/sysfs-bus-iio-timer-stm32 | 29 ++ drivers/iio/trigger/Kconfig | 9 + drivers/iio/trigger/Makefile | 1 + drivers/iio/trigger/stm32-timer-trigger.c | 342 +++++++++++++++++++++ include/linux/iio/timer/stm32-timer-trigger.h | 62 ++++ 5 files changed, 443 insertions(+) commit bf2d8581b1b3ddd72a679e06157b57c1e2dd7b23 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:06 2017 +0100 iio: Add bindings for STM32 timer trigger driver Define bindings for STM32 timer trigger version 8: - reword "reg" parameter description version 4: - remove triggers enumeration from DT - add reg parameter version 3: - change file name - add cross reference with mfd bindings version 2: - only keep one compatible - add DT parameters to set lists of the triggers: one list describe the triggers created by the device another one give the triggers accepted by the device Signed-off-by: Benjamin Gaignard Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Lee Jones .../bindings/iio/timer/stm32-timer-trigger.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 7edf7369205baa158b08dea9efa2764bee41ab03 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:05 2017 +0100 pwm: Add driver for STM32 plaftorm This driver adds support for PWM driver on STM32 platform. The SoC have multiple instances of the hardware IP and each of them could have small differences: number of channels, complementary output, auto reload register size... version 9: - fix commit message header - remove one space MODULE_ALIAS version 8: - fix comments done by Thierry on version 7 version 6: - change st,breakinput parameter to make it usuable for stm32f7 too. version 4: - detect at probe time hardware capabilities - fix comments done on v2 and v3 - use PWM atomic ops version 2: - only keep one comptatible - use DT parameters to discover hardware block configuration Signed-off-by: Benjamin Gaignard Acked-by: Thierry Reding Signed-off-by: Lee Jones drivers/pwm/Kconfig | 9 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-stm32.c | 397 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 407 insertions(+) commit 35ca8168133c9c035e32eff10cce94b8e8c279b3 Author: Chen Feng Date: Tue Jan 24 16:57:28 2017 +0800 arm64: dts: Add dts files for Hisilicon Hi3660 SoC Add initial dtsi file to support Hisilicon Hi3660 SoC with support of Octal core CPUs in two clusters(4 * A53 & 4 * A73). Also add dts file to support HiKey960 development board which based on Hi3660 SoC. The output console is earlycon "earlycon=pl011,0xfdf05000". And the con_init uart5 with a fixed clock, which already configured at bootloader. When clock is available, the uart5 will be modified. Tested on HiKey960 Board. Signed-off-by: Chen Feng Acked-by: Arnd Bergmann Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/Makefile | 1 + arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 33 +++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 160 ++++++++++++++++++++++ 3 files changed, 194 insertions(+) commit 022e53bef93cfbec37629cf2b05ed092322dde8b Author: Chen Feng Date: Tue Jan 24 16:57:29 2017 +0800 dt-bindings: Add a support cpu type for cortex-a73 Add arm cpu type cortex-a73 Signed-off-by: Chen Feng Acked-by: Mark Rutland Acked-by: Arnd Bergmann Signed-off-by: Wei Xu Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) commit 59d94d2ed45d598211feb52566e6a806d17f8a3f Author: Dinh Nguyen Date: Wed Jan 25 10:01:28 2017 -0600 ARM: dts: watchdog0 cannot reliably trigger reset On the Arria10, because of hardware bug, watchdog0 cannot reliably trigger a reset to the CPU. The workaround would be to use watchdog1 instead. Also for watchdog1, there is a dependency on the bootloader to enable the boot_clk source to be from the cb_intosc_hs_clk/2, versus from EOSC1. This corresponds to the (SWCTRLBTCLKEN & SWCTRLBTCLKSEL) bits enabled in the control register in the clock manager module of Arria10. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02d71a98a86eb2eb0818538687b6c0c6cb7e74e1 Author: Chen Feng Date: Tue Jan 24 16:57:27 2017 +0800 document: dt: add binding for Hi3660 SoC Add binding for hisilicon Hi3660 SoC and HiKey960 Board. Signed-off-by: Chen Feng Acked-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Wei Xu Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | 4 ++++ 1 file changed, 4 insertions(+) commit c6dce2626606ef16434802989466636bc28c1419 Author: Johan Hovold Date: Wed Jan 25 15:35:20 2017 +0100 USB: serial: ftdi_sio: fix extreme low-latency setting Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") the FTDI driver has been using a receive latency-timer value of 1 ms instead of the device default of 16 ms. The latency timer is used to periodically empty a non-full receive buffer, but a status header is always sent when the timer expires including when the buffer is empty. This means that a two-byte bulk message is received every millisecond also for an otherwise idle port as long as it is open. Let's restore the pre-2009 behaviour which reduces the rate of the status messages to 1/16th (e.g. interrupt frequency drops from 1 kHz to 62.5 Hz) by not setting ASYNC_LOW_LATENCY by default. Anyone willing to pay the price for the minimum-latency behaviour should set the flag explicitly instead using the TIOCSSERIAL ioctl or a tool such as setserial (e.g. setserial /dev/ttyUSB0 low_latency). Note that since commit 0cbd81a9f6ba ("USB: ftdi_sio: remove tty->low_latency") the ASYNC_LOW_LATENCY flag has no other effects but to set a minimal latency timer. Reported-by: Antoine Aubert Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") Cc: stable@vger.kernel.org # v2.6.31: e3e574ad85a2 Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 2 -- 1 file changed, 2 deletions(-) commit d5d487eb07c3e4652cde70651373d6a85173f685 Author: Daniel Vetter Date: Wed Jan 25 07:26:57 2017 +0100 drm: Update kerneldoc for drm_crtc.[hc] After going through all the trouble of splitting out parts from drm_crtc.[hc] and then properly documenting each I've entirely forgotten to show the same TLC for CRTCs themselves! Let's make amends asap. v2: Review from Eric. Reviewed-by: Eric Engestrom Signed-off-by: Daniel Vetter Documentation/gpu/drm-kms.rst | 8 +++++++- drivers/gpu/drm/drm_crtc.c | 21 +++++++++++++++++++++ include/drm/drm_crtc.h | 25 +++++++++++++++++++------ 3 files changed, 47 insertions(+), 7 deletions(-) commit 1031548c61fe5c129ea42408bad8c38171558a63 Author: Daniel Vetter Date: Wed Jan 25 07:26:49 2017 +0100 drm/gma500: Nuke device_is_agp callback Returning 0 for an on-chip gpu doesn't change anything at all. Cc: Patrik Jakobsson Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-8-daniel.vetter@ffwll.ch drivers/gpu/drm/gma500/psb_drv.c | 6 ------ 1 file changed, 6 deletions(-) commit d574528a64c3a3b2a9c6a125e2428b38bddbdf3c Author: Daniel Vetter Date: Wed Jan 25 07:26:45 2017 +0100 drm/kms-core: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... v2: Review from Eric. Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Eric Engestrom Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 78 ++++++++++++++++++------------------- drivers/gpu/drm/drm_blend.c | 11 +++--- drivers/gpu/drm/drm_connector.c | 12 +++--- drivers/gpu/drm/drm_crtc.c | 7 ++-- drivers/gpu/drm/drm_dumb_buffers.c | 4 +- drivers/gpu/drm/drm_encoder.c | 2 +- drivers/gpu/drm/drm_encoder_slave.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 12 +++--- drivers/gpu/drm/drm_modeset_lock.c | 10 ++--- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/drm_property.c | 4 +- include/drm/drm_atomic.h | 6 ++- include/drm/drm_color_mgmt.h | 2 +- include/drm/drm_connector.h | 42 ++++++++++---------- include/drm/drm_crtc.h | 31 ++++++++------- include/drm/drm_framebuffer.h | 15 ++++--- include/drm/drm_mode_config.h | 12 +++--- include/drm/drm_mode_object.h | 13 +++++-- include/drm/drm_modeset_lock.h | 2 +- include/drm/drm_plane.h | 22 +++++------ include/drm/drm_property.h | 8 ++-- 21 files changed, 150 insertions(+), 147 deletions(-) commit ef40cbf9998528e4f4457df52624d56ae95a7dee Author: Daniel Vetter Date: Wed Jan 25 07:26:47 2017 +0100 drm/core: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... v2: Review from Gustavo. Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_auth.c | 4 ++-- drivers/gpu/drm/drm_drv.c | 8 ++++---- drivers/gpu/drm/drm_fops.c | 11 ++++++----- drivers/gpu/drm/drm_irq.c | 19 +++++++++---------- drivers/gpu/drm/drm_pci.c | 2 +- drivers/gpu/drm/drm_platform.c | 2 +- drivers/gpu/drm/drm_sysfs.c | 2 +- include/drm/drm_auth.h | 12 ++++++------ include/drm/drm_drv.h | 2 +- include/drm/drm_irq.h | 4 ++-- 10 files changed, 33 insertions(+), 33 deletions(-) commit 940eba2d58a7dad5cb5dd90458c682e4d929e6f2 Author: Daniel Vetter Date: Wed Jan 25 07:26:46 2017 +0100 drm/gem|prime|mm: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-5-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_gem.c | 24 ++++++++++++------------ drivers/gpu/drm/drm_mm.c | 4 ++-- drivers/gpu/drm/drm_prime.c | 2 +- include/drm/drm_gem.h | 16 ++++++++-------- 4 files changed, 23 insertions(+), 23 deletions(-) commit 6806cdf9aa1c822afd89881e48908315aed18451 Author: Daniel Vetter Date: Wed Jan 25 07:26:43 2017 +0100 drm/kms-helpers: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... v2: Comments from Gustavo. Cc: Jani Nikula Cc: Chris Wilson Rewiewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-2-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 97 ++++++++++---------- drivers/gpu/drm/drm_crtc_helper.c | 28 +++--- drivers/gpu/drm/drm_dp_helper.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 48 +++++----- drivers/gpu/drm/drm_plane_helper.c | 9 +- drivers/gpu/drm/drm_probe_helper.c | 14 +-- include/drm/drm_atomic_helper.h | 13 +-- include/drm/drm_dp_mst_helper.h | 7 +- include/drm/drm_flip_work.h | 2 +- include/drm/drm_modeset_helper_vtables.h | 146 ++++++++++++++++--------------- include/drm/drm_simple_kms_helper.h | 12 +-- 11 files changed, 197 insertions(+), 181 deletions(-) commit 200e86b3372b51e136a382e007b6b904b1dac7e4 Author: Jens Axboe Date: Wed Jan 25 08:11:38 2017 -0700 blk-mq: only apply active queue tag throttling for driver tags If we have a scheduler attached, we have two sets of tags. We don't want to apply our active queue throttling for the scheduler side of tags, that only applies to driver tags since that's the resource we need to dispatch an IO. Signed-off-by: Jens Axboe block/blk-mq-tag.c | 12 +++++++----- block/blk-mq.c | 13 ++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) commit 42f82e2e62ae748a27741e63dbb035bfbe3353c9 Author: Johannes Berg Date: Wed Jan 25 15:36:57 2017 +0100 wireless: radiotap: rewrite the radiotap header file The header file has grown a lot of #define's etc, but they are nicer as enums, so rewrite the file from the documentation as such. Signed-off-by: Johannes Berg include/net/ieee80211_radiotap.h | 455 ++++++++++++++------------------------- 1 file changed, 157 insertions(+), 298 deletions(-) commit 47cd95a6326888a46e7ce8389cd394a3e1c647e7 Merge: 9f6f941 883af14 Author: Ingo Molnar Date: Wed Jan 25 15:52:46 2017 +0100 Merge branch 'linus' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit f172841573c41428b422b541bd5f50af0144c330 Author: Guenter Roeck Date: Tue Jan 24 20:24:36 2017 -0800 hwmon: Update documentation to clarify rules for the 'name' attribute Clarify that the name attribute must report a valid name, and the rules for valid names. Also clarify that the name parameter must be provided for all supported API functions. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck Documentation/hwmon/hwmon-kernel-api.txt | 4 ++++ Documentation/hwmon/sysfs-interface | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 8353863a52a82c7701d9d10433bea703fd24ec2d Author: Guenter Roeck Date: Tue Jan 24 06:32:57 2017 -0800 hwmon: Make name attribute mandatory for new APIs It does not make sense to use one of the the new APIs when not even providing a name attribute. Make it mandatory. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f0fd4122f0526b7575d10f6699b57f03e9bfd1ec Author: kbuild test robot Date: Tue Jan 24 23:41:46 2017 +0800 ALSA: x86: fix resource_size.cocci warnings sound/x86/intel_hdmi_lpe_audio.c:498:24-27: ERROR: Missing resource_size with res_mmio Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci CC: Jerome Anand Signed-off-by: Fengguang Wu Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_lpe_audio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 232892fb14265b07b7a50061f36aaa5a6b81fb9d Author: Jerome Anand Date: Wed Jan 25 04:27:53 2017 +0530 ALSA: x86: hdmi: continue playback even when display resolution changes When the display resolution changes, the drm disables the display pipes due to which audio rendering stops. At this time, we need to ensure the existing audio pointers and buffers are cleared out so that the playback can restarted once the display pipe is enabled with a different N/CTS values Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 5dab11d89777230b3ff38f19ee1b6fbba9688b23 Author: Jerome Anand Date: Wed Jan 25 04:27:52 2017 +0530 ALSA: x86: hdmi: Add audio support for BYT and CHT Hdmi audio driver based on the child platform device created by gfx driver is implemented. This audio driver is derived from legacy intel hdmi audio driver. The interfaces for interaction between gfx and audio are updated and the driver implementation updated to derive interrupts in its own address space based on irq chip framework The changes to calculate sub-period positions was triggered by David Henningsson and is accomodated in this patch Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand Signed-off-by: Takashi Iwai sound/x86/Makefile | 2 + sound/x86/intel_hdmi_audio.c | 1855 ++++++++++++++++++++++++++++++++++++++ sound/x86/intel_hdmi_audio.h | 197 ++++ sound/x86/intel_hdmi_audio_if.c | 551 +++++++++++ sound/x86/intel_hdmi_lpe_audio.c | 15 +- 5 files changed, 2614 insertions(+), 6 deletions(-) commit 287599cf2d7719c812774ff49db9ae8ca4fa844a Author: Jerome Anand Date: Wed Jan 25 04:27:51 2017 +0530 ALSA: add Intel HDMI LPE audio driver for BYT/CHT-T On Baytrail and Cherrytrail, HDaudio may be fused out or disabled by the BIOS. This driver enables an alternate path to the i915 display registers and DMA. Although there is no hardware path between i915 display and LPE/SST audio clusters, this HDMI capability is referred to in the documentation as "HDMI LPE Audio" so we keep the name for consistency. There is no hardware path or control dependencies with the LPE/SST DSP functionality. The hdmi-lpe-audio driver will be probed when the i915 driver creates a child platform device. Since this driver is neither SoC nor PCI, a new x86 folder is added Additional indirections in the code will be cleaned up in the next series to aid smoother DP integration Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand Signed-off-by: Takashi Iwai sound/Kconfig | 2 + sound/Makefile | 2 +- sound/x86/Kconfig | 15 + sound/x86/Makefile | 4 + sound/x86/intel_hdmi_lpe_audio.c | 614 +++++++++++++++++++++++++++++++++++ sound/x86/intel_hdmi_lpe_audio.h | 683 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 1319 insertions(+), 1 deletion(-) commit 46d196ec460b9c45ca225f815c0b05f9de67290d Author: Jerome Anand Date: Wed Jan 25 04:27:50 2017 +0530 drm/i915: Add support for audio driver notifications Notifiations like mode change, hot plug and edid to the audio driver are added. This is inturn used by the audio driver for its functionality. A new interface file capturing the notifications needed by the audio driver is added Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand Acked-by: Jani Nikula Signed-off-by: Takashi Iwai drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_audio.c | 6 +++++ drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lpe_audio.c | 49 ++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) commit eef57324d926f0d8c7a40069e7d26e0cb0651b47 Author: Jerome Anand Date: Wed Jan 25 04:27:49 2017 +0530 drm/i915: setup bridge for HDMI LPE audio driver Enable support for HDMI LPE audio mode on Baytrail and Cherrytrail when HDaudio controller is not detected Setup minimum required resources during i915_driver_load: 1. Create a platform device to share MMIO/IRQ resources 2. Make the platform device child of i915 device for runtime PM. 3. Create IRQ chip to forward HDMI LPE audio irqs. HDMI LPE audio driver (a standalone sound driver) probes the LPE audio device and creates a new sound card. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand Acked-by: Jani Nikula Signed-off-by: Takashi Iwai Documentation/gpu/i915.rst | 9 + drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 11 ++ drivers/gpu/drm/i915/i915_irq.c | 16 ++ drivers/gpu/drm/i915/i915_reg.h | 3 + drivers/gpu/drm/i915/intel_audio.c | 25 +++ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_lpe_audio.c | 321 +++++++++++++++++++++++++++++++++ include/drm/intel_lpe_audio.h | 46 +++++ 10 files changed, 438 insertions(+), 2 deletions(-) commit 10f92c4c537794f4e2b5f545a8953790c5445d0f Author: Christoffer Dall Date: Tue Jan 17 23:09:13 2017 +0100 KVM: arm/arm64: vgic: Add debugfs vgic-state file Add a file to debugfs to read the in-kernel state of the vgic. We don't do any locking of the entire VGIC state while traversing all the IRQs, so if the VM is running the user/developer may not see a quiesced state, but should take care to pause the VM using facilities in user space for that purpose. We also don't support LPIs yet, but they can be added easily if needed. Reviewed-by: Eric Auger Tested-by: Eric Auger Tested-by: Andre Przywara Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/Makefile | 1 + arch/arm64/kvm/Makefile | 1 + include/kvm/arm_vgic.h | 5 + virt/kvm/arm/vgic/vgic-debug.c | 283 +++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-init.c | 4 + virt/kvm/arm/vgic/vgic.h | 3 + 6 files changed, 297 insertions(+) commit 31489c0b1d8b33e5b696ba18feb880617e937554 Author: Kuninori Morimoto Date: Wed Jan 25 00:51:04 2017 +0000 ASoC: cq93vc: remove MFD_DAVINCI_VOICECODEC dependency from CQ0093VC CQ0093VC is no longer dependent on MFD_DAVINCI_VOICECODEC, let's remove it. Otherwise, we can't compile it by COMPILE_TEST on non-DAVINCE platform Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8694e4da66a636665f51b94a6a7a40c9fc0dc5ec Author: Christoffer Dall Date: Mon Jan 23 14:07:18 2017 +0100 KVM: arm/arm64: Remove struct vgic_irq pending field One of the goals behind the VGIC redesign was to get rid of cached or intermediate state in the data structures, but we decided to allow ourselves to precompute the pending value of an IRQ based on the line level and pending latch state. However, this has now become difficult to base proper GICv3 save/restore on, because there is a potential to modify the pending state without knowing if an interrupt is edge or level configured. See the following post and related message for more background: https://lists.cs.columbia.edu/pipermail/kvmarm/2017-January/023195.html This commit gets rid of the precomputed pending field in favor of a function that calculates the value when needed, irq_is_pending(). The soft_pending field is renamed to pending_latch to represent that this latch is the equivalent hardware latch which gets manipulated by the input signal for edge-triggered interrupts and when writing to the SPENDR/CPENDR registers. After this commit save/restore code should be able to simply restore the pending_latch state, line_level state, and config state in any order and get the desired result. Reviewed-by: Andre Przywara Reviewed-by: Marc Zyngier Tested-by: Andre Przywara Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 5 +++-- virt/kvm/arm/vgic/vgic-its.c | 6 +++--- virt/kvm/arm/vgic/vgic-mmio-v2.c | 6 +++--- virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 +- virt/kvm/arm/vgic/vgic-mmio.c | 19 +++++-------------- virt/kvm/arm/vgic/vgic-v2.c | 12 +++++------- virt/kvm/arm/vgic/vgic-v3.c | 12 +++++------- virt/kvm/arm/vgic/vgic.c | 16 +++++++--------- virt/kvm/arm/vgic/vgic.h | 8 ++++++++ 9 files changed, 40 insertions(+), 46 deletions(-) commit 105db5991240cb2675f193589130ef0c8a4f70fe Author: Mike Snitzer Date: Fri Jan 6 15:38:08 2017 -0500 dm raid: cleanup awkward branching in raid_message() option processing Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 977f1a0a3f8185136eb78a65b579def69862c635 Author: Heinz Mauelshagen Date: Sat Jan 14 03:53:11 2017 +0100 dm raid: use mddev rather than rdev->mddev Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2568465bd55b3ee619d9ebd02cc330feffaae04 Author: Heinz Mauelshagen Date: Sat Jan 14 03:53:10 2017 +0100 dm raid: use read_disk_sb() throughout For consistency, call read_disk_sb() from attempt_restore_of_faulty_devices() instead of calling sync_page_io() directly. Explicitly set device to faulty on superblock read error. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 63c32ed4afc2afd6b5551a8fcdea5b546dcaca4f Author: Heinz Mauelshagen Date: Wed Nov 30 22:31:05 2016 +0100 dm raid: add raid4/5/6 journaling support Add md raid4/5/6 journaling support (upstream commit bac624f3f86a started the implementation) which closes the write hole (i.e. non-atomic updates to stripes) using a dedicated journal device. Background: raid4/5/6 stripes hold N data payloads per stripe plus one parity raid4/5 or two raid6 P/Q syndrome payloads in an in-memory stripe cache. Parity or P/Q syndromes used to recover any data payloads in case of a disk failure are calculated from the N data payloads and need to be updated on the different component devices of the raid device. Those are non-atomic, persistent updates. Hence a crash can cause failure to update all stripe payloads persistently and thus cause data loss during stripe recovery. This problem gets addressed by writing whole stripe cache entries (together with journal metadata) to a persistent journal entry on a dedicated journal device. Only if that journal entry is written successfully, the stripe cache entry is updated on the component devices of the raid device (i.e. writethrough type). In case of a crash, the entry can be recovered from the journal and be written again thus ensuring consistent stripe payload suitable to data recovery. Future dependencies: once writeback caching being worked on to compensate for the throughput implictions involved with writethrough overhead is supported with journaling in upstream, an additional patch based on this one will support it in dm-raid. Journal resilience related remarks: because stripes are recovered from the journal in case of a crash, the journal device better be resilient. Resilience becomes mandatory with future writeback support, because loosing the working set in the log means data loss as oposed to writethrough, were the loss of the journal device 'only' reintroduces the write hole. Fix comment on data offsets in parse_dev_params() and initialize new_data_offset as well. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 13 +++ drivers/md/dm-raid.c | 161 +++++++++++++++++++++++++++----- 2 files changed, 153 insertions(+), 21 deletions(-) commit 50c4feb9a3e3df9574d952a4ed2f009f8135e4c7 Author: Heinz Mauelshagen Date: Sat Jan 14 03:53:08 2017 +0100 dm raid: be prepared to accept arbitrary '- -' tuples During raid set resize checks and setting up the recovery offset in case a raid set grows, calculated rd->md.dev_sectors is compared to rs->dev[0].rdev.sectors. Device 0 may not be defined in case userspace passes in '- -' for it (lvm2 doesn't do that so far), thus it's device sectors can't be taken authoritatively in this comparison and another valid device must be used to retrieve the device size. Use mddev->dev_sectors in checking for ongoing recovery for the same reason. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit c63ede3b4211e1e2489eda6a2efb0eb6fa26483a Author: Heinz Mauelshagen Date: Sat Jan 14 03:53:07 2017 +0100 dm raid: fix transient device failure processing This fix addresses the following 3 failure scenarios: 1) If a (transiently) inaccessible metadata device is being passed into the constructor (e.g. a device tuple '254:4 254:5'), it is processed as if '- -' was given. This erroneously results in a status table line containing '- -', which mistakenly differs from what has been passed in. As a result, userspace libdevmapper puts the device tuple seperate from the RAID device thus not processing the dependencies properly. 2) False health status char 'A' instead of 'D' is emitted on the status status info line for the meta/data device tuple in this metadata device failure case. 3) If the metadata device is accessible when passed into the constructor but the data device (partially) isn't, that leg may be set faulty by the raid personality on access to the (partially) unavailable leg. Restore tried in a second raid device resume on such failed leg (status char 'D') fails after the (partial) leg returned. Fixes for aforementioned failure scenarios: - don't release passed in devices in the constructor thus allowing the status table line to e.g. contain '254:4 254:5' rather than '- -' - emit device status char 'D' rather than 'A' for the device tuple with the failed metadata device on the status info line - when attempting to restore faulty devices in a second resume, allow the device hot remove function to succeed by setting the device to not in-sync In case userspace intentionally passes '- -' into the constructor to avoid that device tuple (e.g. to split off a raid1 leg temporarily for later re-addition), the status table line will correctly show '- -' and the status info line will provide a '-' device health character for the non-defined device tuple. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 4 ++ drivers/md/dm-raid.c | 87 ++++++++++++++------------------- 2 files changed, 42 insertions(+), 49 deletions(-) commit f28442497b5caf7bf573ade22a7f8d3559e3ef56 Author: Dave Jiang Date: Wed Jan 11 16:20:01 2017 -0700 x86/boot: Fix KASLR and memmap= collision CONFIG_RANDOMIZE_BASE=y relocates the kernel to a random base address. However it does not take into account the memmap= parameter passed in from the kernel command line. This results in the kernel sometimes being put in the middle of memmap. Teach KASLR to not insert the kernel in memmap defined regions. We support up to 4 memmap regions: any additional regions will cause KASLR to disable. The mem_avoid set has been augmented to add up to 4 unusable regions of memmaps provided by the user to exclude those regions from the set of valid address range to insert the uncompressed kernel image. The nn@ss ranges will be skipped by the mem_avoid set since it indicates that memory is useable. Signed-off-by: Dave Jiang Reviewed-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Baoquan He 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: dan.j.williams@intel.com Cc: david@fromorbit.com Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/148417664156.131935.2248592164852799738.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/boot.h | 1 + arch/x86/boot/compressed/kaslr.c | 140 ++++++++++++++++++++++++++++++++++++++- arch/x86/boot/string.c | 13 ++++ 3 files changed, 151 insertions(+), 3 deletions(-) commit 393a33c74554be3c30233907e3aa0f84603fee31 Author: Jerome Coste Date: Sun Jan 22 16:47:53 2017 +0100 ARM: tegra: nyan-blaze: Proper pinmux for TPM I2C This corrects the pinmux for accessing the TPM over the I2C line. Thus, it allows correctly probing the module, that previously failed with I2C errors. Signed-off-by: Jerome Coste Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan-blaze.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8a44a98d911f4cadc93a5e5bf316c5d90c65263c Author: Paul Kocialkowski Date: Sun Jan 22 16:47:52 2017 +0100 ARM: tegra: nyan-big: Proper pinmux for TPM I2C This corrects the pinmux for accessing the TPM over the I2C line. Thus, it allows correctly probing the module, that previously failed with I2C errors. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan-big.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a02620ea09da2ac9a9b6b6cca978a52032ccf3fb Author: Paul Kocialkowski Date: Sun Jan 22 16:47:51 2017 +0100 ARM: tegra: nyan-blaze: Include compatible revisions for proper detection Depthcharge (the payload used with cros devices) will attempt to detect boards using their revision. This includes all the known revisions for the nyan-blaze board so that the dtb can be selected preferably. Defining compatibly revisions allows depthcharge to select the kernel via the revision it detects instead of using the default kernel. This allows having a FIT image with multiple kernels for multiple devices. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan-blaze.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bfa3c0d4e8ba8eff525d34dbde0e76a98ebfbade Author: Paul Kocialkowski Date: Sun Jan 22 16:47:50 2017 +0100 ARM: tegra: nyan-big: Include compatible revisions for proper detection Depthcharge (the payload used with cros devices) will attempt to detect boards using their revision. This includes all the known revisions for the nyan-big board so that the dtb can be selected preferably. Defining compatibly revisions allows depthcharge to select the kernel via the revision it detects instead of using the default kernel. This allows having a FIT image with multiple kernels for multiple devices. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan-big.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5fc01a9909273f5b9b6f01e96e1eded4adebd953 Author: Paul Kocialkowski Date: Sun Jan 22 16:47:49 2017 +0100 ARM: tegra: nyan: Use external control for bq24735 charger Nyan boards come with an embedded controller that controls when to enable and disable the charge. Thus, it should not be left up to the kernel to handle that. Using the ti,external-control property allows specifying this use-case. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan.dtsi | 1 + 1 file changed, 1 insertion(+) commit 38333641b6dd0b7e3538d515cf7e4a0e25075065 Author: Paul Kocialkowski Date: Sun Jan 22 16:47:48 2017 +0100 ARM: tegra: nyan: Use proper IRQ type definitions This switches a few interrupt definitions that were using GPIO_ACTIVE_HIGH as IRQ type, which is invalid. This is mostly a cosmetic change, that doesn't affect any driver. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a336c934623b011c289a298aff3b7fdefb3f876 Author: Manuel Schölling Date: Fri Jan 13 21:07:58 2017 +0100 console: Make persistent scrollback a boot parameter The impact of the persistent scrollback feature on the code size is rather small, so the config option is removed. The feature stays disabled by default and can be enabled by using the boot command line parameter 'vgacon.scrollback_persistent=1' or by setting VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y. Signed-off-by: Manuel Schölling Suggested-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman drivers/video/console/Kconfig | 12 +++++++----- drivers/video/console/vgacon.c | 25 ++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit aabd31c421ddc730edf6d89c4ed3885e4fca5e30 Author: Manuel Schölling Date: Fri Jan 13 21:07:57 2017 +0100 console: Add persistent scrollback buffers for all VGA consoles Add a scrollback buffers for each VGA console. The benefit is that the scrollback history is not flushed when switching between consoles but is persistent. The buffers are allocated on demand when a new console is opened. This breaks tools like clear_console that rely on flushing the scrollback history by switching back and forth between consoles which is why this feature is disabled by default. Use the escape sequence \e[3J instead for flushing the buffer. Signed-off-by: Manuel Schölling Reviewed-by: Andrey Utkin Tested-by: Andrey Utkin Tested-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/video/console/Kconfig | 25 +++++++- drivers/video/console/vgacon.c | 142 ++++++++++++++++++++++++++--------------- 2 files changed, 111 insertions(+), 56 deletions(-) commit bcd375f7f71f7106c97516bf5395149954ef8810 Author: Manuel Schölling Date: Fri Jan 13 21:07:56 2017 +0100 console: Add callback to flush scrollback buffer to consw struct This new callback is in preparation for persistent scrollback buffer support for VGA consoles. With a single scrollback buffer for all consoles, we could flush the buffer just by invocating consw->con_switch(). But when each VGA console has its own scrollback buffer, we need a new callback to tell the video console driver which buffer to flush. Signed-off-by: Manuel Schölling Reviewed-by: Andrey Utkin Tested-by: Andrey Utkin Tested-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 9 +++++++++ drivers/video/console/vgacon.c | 24 +++++++++++++++++++++++- include/linux/console.h | 4 ++++ 3 files changed, 36 insertions(+), 1 deletion(-) commit 66da39eb91b42ab70dd49ef0b9ac5f4cfa76c9c3 Author: Manuel Schölling Date: Fri Jan 13 21:07:55 2017 +0100 console: Move scrollback data into its own struct This refactoring is in preparation for persistent scrollback support for VGA console. Signed-off-by: Manuel Schölling Reviewed-by: Andrey Utkin Tested-by: Andrey Utkin Tested-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/video/console/vgacon.c | 91 ++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 44 deletions(-) commit 061132d2b9c9504a9f314dcd73f6483a7d8cd1e8 Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:10 2017 -0800 test_firmware: add test custom fallback trigger We have no custom fallback mechanism test interface. Provide one. This tests both the custom fallback mechanism and cancelling the it. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 45 ++++++++++++++++ tools/testing/selftests/firmware/fw_fallback.sh | 68 +++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit eb67bc3ffd1796e198fc923da2ba15beb7965529 Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:09 2017 -0800 tools: firmware: add fallback cancelation testing Add a test case for cancelling the sync fallback mechanism. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_fallback.sh | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 823b0221a522bb22dcd278a06fca308a95545471 Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:08 2017 -0800 tools: firmware: rename fallback mechanism script Calling it user mode helper only creates confusion. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/Makefile | 2 +- tools/testing/selftests/firmware/fw_fallback.sh | 124 ++++++++++++++++++++++ tools/testing/selftests/firmware/fw_userhelper.sh | 123 --------------------- 3 files changed, 125 insertions(+), 124 deletions(-) commit afb999cdef69148f366839e74470d8f5375ba5f1 Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:07 2017 -0800 tools: firmware: check for distro fallback udev cancel rule Some distributions (Debian, OpenSUSE) have a udev rule in place to cancel all fallback mechanism uevents immediately. This would obviously make it hard to test against the fallback mechanism test interface, so we need to check for this. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_userhelper.sh | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 083a93b0c1f2eff2561305d0b95ac238fbfd100b Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:06 2017 -0800 test_firmware: use device attribute groups This simplifies init and exit. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) commit 67fd553ce0e55a468ee24f61ddf6b40ba610bbb5 Author: Luis R. Rodriguez Date: Mon Jan 23 08:11:05 2017 -0800 test_firmware: move misc_device down This will make further changes easier to review. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fd0c478c0dd800449e2d70025ef742679a16a8de Author: Vivek Gautam Date: Sun Jan 22 23:02:40 2017 +0000 nvmem: core: Allow getting nvmem cell with a NULL cell id The nvmem cell with a NULL cell name/id should be the one with no accompanying 'nvmem-cell-names' property, and thus will be the cell at index 0 in the device tree. So, we default to index 0 and update the cell index only when nvmem cell name id exists. Suggested-by: Stephen Boyd Signed-off-by: Vivek Gautam Reviewed-by: Stephen Boyd Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 29143268ec7d292ae4531bdf8deb6e55239a0051 Author: Vivek Gautam Date: Sun Jan 22 23:02:39 2017 +0000 nvmem: core: Correct a bunch of function documentations Correct the documentation for arguments to a number of functions. Signed-off-by: Vivek Gautam Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 3b4a687726f0019115bd903d9724db6cdcbb00fe Author: Vivek Gautam Date: Sun Jan 22 23:02:38 2017 +0000 nvmem: core: Allow ignoring length when reading a cell nvmem_cell_read() API fills in the argument 'len' with the number of bytes read from the cell. Many users don't care about this length value. So allow users to pass a NULL pointer to this len field. Signed-off-by: Vivek Gautam Reviewed-by: Stephen Boyd Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1e928fff9a7444cbfbbb2420eb8cec79bfa53c6f Author: Bai Ping Date: Sun Jan 22 23:02:37 2017 +0000 devicetree: bindings: nvmem: Add compatible string for imx6ul Add new compatible string for i.MX6UL SOC. Signed-off-by: Bai Ping Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4aa2b480204638c3b8801132efa9cb4af6000a05 Author: Bai Ping Date: Sun Jan 22 23:02:36 2017 +0000 nvmem: octop: Add support for imx6ul i.MX6UL is an new SOC of i.MX6 family. Enable ocotp driver support for this SOC. Signed-off-by: Bai Ping Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 1 + 1 file changed, 1 insertion(+) commit 28781789051ef65ced5dbc40734bfacb5e1e8ea4 Author: Felipe Balbi Date: Mon Jan 23 18:01:59 2017 +0200 usb: dwc3: gadget: read IN ep FIFO size from HW Instead of assuming all IN endpoints support 1024 bytes, let's read the actual value from HW and pass that to gadget API. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 37afff0d87c9939843c664970af6c6d952f95712 Author: Dave Gerlach Date: Thu Jan 12 14:52:20 2017 -0600 misc: sram: Integrate protect-exec reserved sram area type Introduce a new "protect-exec" reserved sram area type which is makes use of the the existing functionality provided for the "pool" sram region type for use with the genalloc framework and with the added requirement that it be maintained as read-only and executable while allowing for an arbitrary number of drivers to share the space. This introduces a common way to maintain a region of sram as read-only and executable and also introduces a helper function, sram_exec_copy, which allows for copying data to this protected region while maintaining locking to avoid conflicts between multiple users of the same space. A region of memory that is marked with the "protect-exec" flag in the device tree also has the requirement of providing a page aligned block of memory so that the page attribute manipulation does not affect surrounding regions. Also, selectively enable this only for builds that support set_memory_* calls, for now just ARM, through the use of Kconfig. Signed-off-by: Dave Gerlach Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/sram/sram.txt | 6 ++++++ drivers/misc/Kconfig | 4 ++++ drivers/misc/Makefile | 1 + drivers/misc/sram.c | 21 +++++++++++++++++++-- drivers/misc/sram.h | 1 + 5 files changed, 31 insertions(+), 2 deletions(-) commit 728bbe75c82fdc6bdf157652a4351856ed08afc4 Author: Dave Gerlach Date: Thu Jan 12 14:52:19 2017 -0600 misc: sram: Introduce support code for protect-exec sram type Some platforms, like many ARM SoCs, require the ability to run code from on-chip memory like SRAM for tasks like reconfiguring the SDRAM controller or entering low-power sleep modes. In order to do this we must be able to allocate memory that the code can be copied to but then change the mapping to be read-only and executable so that no memory is both writable and executable at the same time to avoid opening any unneccesary security holes. By using the existing "pool" partition type that the SRAM driver allows we can create a memory space that will already be exposed by the genalloc framework to allow for allocating memory but we must extend this to meet the executable requirements. By making use of various set_memory_* APIs we can change the attributes of pages to make them writable for code upload but then read-only and executable when we want to actually run code. Because SRAM is a shared resource we need a centralized manager of these set memory calls. Because the SRAM driver itself is responsible for allocating the memory we can introduce a sram_copy_exec API for the driver that works like memcpy but also manages the page attributes and locking to allow multiple users of the same SRAM space to all copy their code over independent of other each before starting execution. It is maintained in a separate file from the core SRAM driver to allow it to be selectively built depending on whether or not a platform has the appropriate set_memory_* APIs. A future patch will integrate it with the core SRAM driver. Signed-off-by: Dave Gerlach Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/misc/sram-exec.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/sram.h | 18 ++++++++ include/linux/sram.h | 27 ++++++++++++ 3 files changed, 150 insertions(+) commit cdd1737cba7a6453c9453c55c4537a15cc1f49b2 Author: Dave Gerlach Date: Thu Jan 12 14:52:18 2017 -0600 misc: sram: Split sram data structures into local header In preparation of a coming file split of the sram driver, move the common data structures into a local header file that can be shared between files related to the sram driver. Signed-off-by: Dave Gerlach Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/misc/sram.c | 30 ++---------------------------- drivers/misc/sram.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 28 deletions(-) commit 8a0934bf9b2c5d4b6ead0bf6f3f3a21c540053c1 Author: Andrew F. Davis Date: Thu Jan 5 14:37:46 2017 -0600 w1: Fixup source file headers Remove filename from file, this is not done anymore as it doesn't add anything and usually is incorrect as filename change often. Also shorten the GPL to the more common address-less version and remove excess white-space. Signed-off-by: Andrew F. Davis Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 7 ------- drivers/w1/w1.h | 7 ------- drivers/w1/w1_family.c | 7 ------- drivers/w1/w1_family.h | 7 ------- drivers/w1/w1_int.c | 7 ------- drivers/w1/w1_int.h | 7 ------- drivers/w1/w1_io.c | 7 ------- drivers/w1/w1_log.h | 7 ------- drivers/w1/w1_netlink.c | 7 ------- drivers/w1/w1_netlink.h | 7 ------- 10 files changed, 70 deletions(-) commit d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a Author: Maciej S. Szmigiero Date: Sat Jan 21 23:50:18 2017 +0100 w1: don't leak refcount on slave attach failure in w1_attach_slave_device() Near the beginning of w1_attach_slave_device() we increment a w1 master reference count. Later, when we are going to exit this function without actually attaching a slave device (due to failure of __w1_attach_slave_device()) we need to decrement this reference count back. Signed-off-by: Maciej S. Szmigiero Cc: stable@vger.kernel.org Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread") Cc: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 1 + 1 file changed, 1 insertion(+) commit dd6478d68b16ce3d165b9d0e4ac0c021923e0f5a Author: Maciej S. Szmigiero Date: Thu Jan 19 21:26:51 2017 +0100 w1: add DS2405 addressable switch driver This adds a driver for a DS2405 1-wire single-channel addressable switch. The DS2405 can also work as a single-channel binary remote sensor. This driver supports two attributes: "state" and "output" which are the same attribute names as supported by existing DS2406, DS2408 and DS2413 drivers. Signed-off-by: Maciej S. Szmigiero Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/Kconfig | 8 ++ drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2405.c | 238 ++++++++++++++++++++++++++++++++++++++++++ drivers/w1/w1_family.h | 1 + drivers/w1/w1_io.c | 1 + 5 files changed, 249 insertions(+) commit 61cd1b4cd1e8f7f7642ab64529d9bd52e8374641 Author: Maciej S. Szmigiero Date: Wed Jan 18 21:31:11 2017 +0100 w1: ds2490: USB transfer buffers need to be DMAable ds2490 driver was doing USB transfers from / to buffers on a stack. This is not permitted and made the driver non-working with vmapped stacks. Since all these transfers are done under the same bus_mutex lock we can simply use shared buffers in a device private structure for two most common of them. While we are at it, let's also fix a comparison between int and size_t in ds9490r_search() which made the driver spin in this function if state register get requests were failing. Signed-off-by: Maciej S. Szmigiero Cc: stable Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds2490.c | 142 ++++++++++++++++++++++++++------------------ 1 file changed, 84 insertions(+), 58 deletions(-) commit 8333eb153a9fd86028abd0942c6aec0705764410 Author: Christophe JAILLET Date: Mon Jan 9 01:13:00 2017 +0100 w1: omap_hdq: Free resources on error path In case of error returned by '_omap_hdq_reset()', free resources as done elsewhere in this function. This patch slighly changes the semantic of the code. It now propagates the error code returned by '_omap_hdq_reset()' instead of returning -EINVAL unconditionally. Signed-off-by: Christophe JAILLET Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/omap_hdq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27a7e2a72c02785156ca3876bd7ca57f56a433ff Author: Mathieu Poirier Date: Mon Jan 23 10:41:24 2017 -0700 coresight: etm4x: Fix timestamp configuration when working from perf When using the ETM4x tracers from the perf interface two trace options are available: cycle accurate and timestamp. Enabling the timestamp feature is done by setting TRCCONFIGR.TS (bit 11). The position of the timestamp bit in that register coincidentally happens to be the same as what was chosen to enable timestamping from the 'mode' sysFS entry. The code does the right thing but the semantic is wrong. This patch sets TRCCONFIGR.TS explicitly, as it is done from the sysFS interface. That way timestamps are set the same way from both perf and sysFS and there is no misunderstanding as to what is intended. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae3fabcda00de54029b5342a3d6d82d65e7c4e6b Author: Mike Leach Date: Mon Jan 23 10:41:23 2017 -0700 coresight: etm4x: Fix enabling of cycle accurate tracing in perf. Using perf record 'cyclacc' option in cs_etm event was not setting up cycle accurate trace correctly. Corrects bit set in TRCCONFIGR to enable cycle accurate trace. Programs TRCCCCTLR with a valid threshold value as required by ETMv4 spec. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 7 +++++-- drivers/hwtracing/coresight/coresight-etm4x.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) commit f09444639099584bc4784dfcd85ada67c6f33e0f Author: Wang Nan Date: Mon Jan 23 10:41:22 2017 -0700 coresight: fix kernel panic caused by invalid CPU Commit d52c9750f150 ("coresight: reset "enable_sink" flag when need be") caused a kernel panic because of the using of an invalid value: after 'for_each_cpu(cpu, mask)', value of local variable 'cpu' become invalid, causes following 'cpu_to_node' access invalid memory area. This patch brings the deleted 'cpu = cpumask_first(mask)' back. Panic log: $ perf record -e cs_etm// ls Unable to handle kernel paging request at virtual address fffe801804af4f10 pgd = ffff8017ce031600 [fffe801804af4f10] *pgd=0000000000000000, *pud=0000000000000000 Internal error: Oops: 96000004 [#1] SMP Modules linked in: CPU: 33 PID: 1619 Comm: perf Not tainted 4.7.1+ #16 Hardware name: Huawei Taishan 2280 /CH05TEVBA, BIOS 1.10 11/24/2016 task: ffff8017cb0c8400 ti: ffff8017cb154000 task.ti: ffff8017cb154000 PC is at tmc_alloc_etf_buffer+0x60/0xd4 LR is at tmc_alloc_etf_buffer+0x44/0xd4 pc : [] lr : [] pstate: 60000145 sp : ffff8017cb157b40 x29: ffff8017cb157b40 x28: 0000000000000000 ...skip... 7a60: ffff000008c64dc8 0000000000000006 0000000000000253 ffffffffffffffff 7a80: 0000000000000000 0000000000000000 ffff0000080872cc 0000000000000001 [] tmc_alloc_etf_buffer+0x60/0xd4 [] etm_setup_aux+0x1dc/0x1e8 [] rb_alloc_aux+0x2b0/0x338 [] perf_mmap+0x414/0x568 [] mmap_region+0x324/0x544 [] do_mmap+0x334/0x3e0 [] vm_mmap_pgoff+0xa4/0xc8 [] SyS_mmap_pgoff+0xb0/0x22c [] sys_mmap+0x18/0x28 [] el0_svc_naked+0x24/0x28 Code: 912040a5 d0001c00 f873d821 911c6000 (b8656822) ---[ end trace 98933da8f92b0c9a ]--- Signed-off-by: Wang Nan Cc: Xia Kaixu Cc: Li Zefan Cc: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: d52c9750f150 ("coresight: reset "enable_sink" flag when need be") Signed-off-by: Mathieu Poirier Cc: stable # 4.10 Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + 1 file changed, 1 insertion(+) commit 9797484ba83d68f18fe1cbd964b7cd830f78f0f7 Author: Stefano Babic Date: Fri Jan 20 10:38:20 2017 -0500 VME: restore bus_remove function causing incomplete module unload Commit 050c3d52cc7810d9d17b8cd231708609af6876ae ("vme: make core vme support explicitly non-modular") dropped the remove function because it appeared as if it was for removal of the bus, which is not supported. However, vme_bus_remove() is called when a VME device is removed from the bus and not when the bus is removed; as it calls the VME device driver's cleanup function. Without this function, the remove() in the VME device driver is never called and VME device drivers cannot be reloaded again. Here we restore the remove function that was deleted in that commit, and the reference to the function in the bus structure. Fixes: 050c3d52cc78 ("vme: make core vme support explicitly non-modular") Cc: Manohar Vanga Acked-by: Martyn Welch Cc: devel@driverdev.osuosl.org Signed-off-by: Stefano Babic Signed-off-by: Paul Gortmaker Cc: stable # 4.9 Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9ba60573638e2006170ebcc5489fb1e068afbc8f Author: Juerg Haefliger Date: Thu Jan 19 11:40:13 2017 +0100 lkdtm: Fix Oops when unloading the module No jprobe is registered when the module is loaded without specifying a crashpoint that uses a jprobe. At the moment, we unconditionally try to unregister the jprobe on module unload which results in an Oops. Add a check to fix this. Signed-off-by: Juerg Haefliger Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8ade6039b8404a28a7f76eac37a92c464b69499a Author: Julia Lawall Date: Fri Jan 20 21:57:57 2017 +0100 eeprom: fix platform_no_drv_owner.cocci warnings No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Serge Semin Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 1 - 1 file changed, 1 deletion(-) commit acf50ec773703f7043944aaf957b625a82fc9ce0 Author: Colin Ian King Date: Tue Jan 24 14:38:38 2017 +0000 eeprom: fix memory leak on buf when failed allocation of csraddr_str The error return path When csraddr_str fails to free buf, causing a memory leak. Fix this by returning via the free_buf label that performs the necessary cleanup. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3c84dc7e79f5bd676599a79a6bfed4d30a38ae30 Author: Michal Simek Date: Mon Jan 23 12:53:36 2017 +0100 char: xilinx_hwicap: Remove pointless local variables Remove unused variables which generates these warnings: [linux-4.10-rc5/drivers/char/xilinx_hwicap/buffer_icap.c:301]: (style) Variable 'num_writes' is modified but its new value is never used. [linux-4.10-rc5/drivers/char/xilinx_hwicap/buffer_icap.c:356]: (style) Variable 'read_count' is modified but its new value is never used. Reported-by: David Binderman Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/char/xilinx_hwicap/buffer_icap.c | 4 ---- 1 file changed, 4 deletions(-) commit ced04842d282a81b71c5d875340cee0fe4aedd2c Author: Abdul Rauf Date: Tue Jan 24 00:20:10 2017 +0000 staging: fbtft: fix checkpatch decimal permissions error Fix the following errors: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_hx8340bn.c | 2 +- drivers/staging/fbtft/fb_pcd8544.c | 4 ++-- drivers/staging/fbtft/fb_ssd1289.c | 2 +- drivers/staging/fbtft/fb_tls8204.c | 2 +- drivers/staging/fbtft/fb_uc1611.c | 12 ++++++------ drivers/staging/fbtft/fb_watterott.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/fbtft/fbtft_device.c | 38 ++++++++++++++++++------------------ 8 files changed, 32 insertions(+), 32 deletions(-) commit dec9fcd03284c227e2f27a52451e9e494f0f4679 Author: Joseph Wright Date: Tue Jan 24 08:17:18 2017 +0000 Staging: rtl8712: fix spelling errors Found by checkpatch: - s/cacluated/calculated/ - s/convertor/converter/ - s/psudo/pseudo/ - s/halfs/halves/ Signed-off-by: Joseph Wright Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 4 ++-- drivers/staging/rtl8712/rtl8712_xmit.c | 2 +- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 4 ++-- drivers/staging/rtl8712/rtl871x_security.c | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) commit d58812486bda7ae71dec508b2c471914c2344712 Author: Amitesh Singh Date: Tue Jan 24 23:16:14 2017 +0530 staging: fbtft: remove duplicate entries of ili9225 There are multiple entries for ili9225 display defined in flexfb_chip_table array. remove duplicate entries and keep single entry. Signed-off-by: Amitesh Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/flexfb.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 5786ac14239a0809ca13e6a6f77147e6bb04aa29 Author: Chris Brandt Date: Mon Jan 23 09:13:49 2017 -0500 ARM: dts: r7s72100: add power-domains to mmcif Signed-off-by: Chris Brandt Reported-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 1 + 1 file changed, 1 insertion(+) commit aa7f39d51e33555fc45645c08bc74a74e22b166f Author: Geert Uytterhoeven Date: Wed Jan 25 10:02:13 2017 +0100 ARM: shmobile: rcar-gen2: Add more register documentation Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/pm-rcar-gen2.c | 40 +++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) commit 4e0f5cc65098ea32a1e77baae74215b9bd5276b1 Author: Tony Lindgren Date: Fri Jan 20 12:22:31 2017 -0800 serial: 8250_omap: Fix probe and remove for PM runtime Otherwise the interconnect related code implementing PM runtime will produce these errors on a failed probe: omap_uart 48066000.serial: omap_device: omap_device_enable() called from invalid state 1 omap_uart 48066000.serial: use pm_runtime_put_sync_suspend() in driver? Note that we now also need to check for priv in omap8250_runtime_suspend() as it has not yet been registered if probe fails. And we need to use pm_runtime_put_sync() to properly idle the device like we already do in omap8250_remove(). Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver") Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f99b63afb943c920bde71bf69880be5578c4c4f6 Author: Paul Gortmaker Date: Sat Jan 21 22:08:25 2017 -0500 serial: hp300: mask the warning for people just doing build coverage Currently this warning is triggered for allmodconfig on m68k. It is well intentioned, in that if you are building the driver but not enabling one of the platforms where the hardware exists, you get a warning. The warning dates back to pre-git days, and now we have COMPILE_TEST so we can use that to mask the warning for people who are obviously just doing build coverage on tree wide changes. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_hp300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5935a2b3a57c03d7e6fea967ef0b926f82fc995e Author: Yasir-Khan Date: Mon Jan 23 13:26:08 2017 +0100 serial: xuartps: Enable uart loopback mode This patch adds xilinx uart loopback support by modifying the cdns_uart_set_mctrl function to handle the switch to loopback mode. After this patch, the loopback mode can be enabled/disabled by setting/clearing the TIOCM_LOOP modem bit via TIOCMBIS/TIOCMBIC ioctls respectively. Signed-off-by: Yasir-Khan Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 36bebcff6f3895384fd2566f4c4adb91cfdfecdb Merge: 8e27a23 567ab5a Author: Greg Kroah-Hartman Date: Wed Jan 25 11:05:04 2017 +0100 Merge tag 'extcon-next-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 4.11 Detailed description for this pull request: 1. Add the new extcon driver. - Intel INT3496 ACPI USB id detection driver detects whether EXTCON_USB_HOST is attached or detached. (extcon-intel-int3496.c) 2. Add the new type of external connector. - EXTCON_CHG_USB_PD (USB Power Delivery) provides the increased power more than 7.5W to device with larger power demand. 3. Add the description for EXTCON_CHG_USB_(SDP|ACA|SLOW|FAST) - EXTCON_CHG_USB_SDP should always appear together with EXTCON_USB - EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST. - EXTCON_CHG_USB_SLOW can provide at least 500mA of current at 5V - EXTCON_CHG_USB_FAST can provide at least 1A of current at 5V. 4. Modify the connector name of EXTCON_USB_HOST - "USB_HOST" -> "USB-HOST" 5. Update the extcon core - Move the private extcon structure into driver/extcon directory. The 'struct extcon_dev' should be only handled by extcon core to prevent the direct access and to maintain the integrity of it. - Remove the ambigous operation of extcon_register_notifier() in case of the 'extcon_dev' instance is NULL. The user of extcon_register_notifier() have to specify the correct instance of the provider extcon driver. 6. Update the extcon drivers and fix the minor issues - Update the extcon-axp288 driver to remove the unncessary code. - Add pinctrl operation during suspend mode to extcon-usb-gpio driver. - Clean up the extcon-arizona/adc-jack driver. - Use the dev_dbg() for debug messsage on extcon-palmas driver. - Return the error code on failure of extcon_sync() commit 067fdeb2f391bfa071f741a2b3eb74b8ff3785cd Author: Jun Nie Date: Tue Jan 10 17:23:40 2017 +0800 dmaengine: zx: fix build warning Fix build warning that related to PAGE_SIZE. The maximum DMA length has nothing to do with PAGE_SIZE, just use a fix number for the definition. drivers/dma/zx_dma.c: In function 'zx_dma_prep_memcpy': drivers/dma/zx_dma.c:523:8: warning: division by zero [-Wdiv-by-zero] drivers/dma/zx_dma.c: In function 'zx_dma_prep_slave_sg': drivers/dma/zx_dma.c:567:11: warning: division by zero [-Wdiv-by-zero] Signed-off-by: Jun Nie Tested-by: Shawn Guo Signed-off-by: Vinod Koul drivers/dma/zx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6969408de2681e1f9dfaed0b311d067ce3c75474 Author: Mathias Nyman Date: Mon Jan 23 14:20:27 2017 +0200 xhci: refactor xhci_urb_enqueue Use switch instead of several if statements Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 93 ++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 56 deletions(-) commit 7e64b0373af50fa46d3bf441f1c079615bbdf77f Author: Mathias Nyman Date: Mon Jan 23 14:20:26 2017 +0200 xhci: simplify how we store TDs in urb private data Instead of storing a zero length array of td pointers, and then allocate memory both for the td pointer array and the td's, just use a zero length array of actual td's in urb private data. old: struct urb_priv { struct xhci_td *td[0] } new: struct urb_priv { struct xhci_td td[0] } Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 5 +---- drivers/usb/host/xhci-ring.c | 20 ++++++++++---------- drivers/usb/host/xhci.c | 24 ++++++------------------ drivers/usb/host/xhci.h | 2 +- 4 files changed, 18 insertions(+), 33 deletions(-) commit 9ef7fbbb4fdfb857e606a9fd550faa8011cce5e2 Author: Mathias Nyman Date: Mon Jan 23 14:20:25 2017 +0200 xhci: Rename variables related to transfer descritpors urb_priv structure has a count on how many TDs the URB contains, and how many of those TD's we have handled. rename: length -> num_tds td_cnt -> num_tds_done No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 10 +++++----- drivers/usb/host/xhci.c | 14 +++++++------- drivers/usb/host/xhci.h | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) commit e6f7caa3de7a6a093e23d2722e45676a6e886e4c Author: Mathias Nyman Date: Mon Jan 23 14:20:24 2017 +0200 xhci: rename size variable to num_tds No functinal changes. num_tds describes the number of transfer descriptor better than "size" Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a711edeeb1a1e80fb8626ee28acc15f084dcb107 Author: Felipe Balbi Date: Mon Jan 23 14:20:23 2017 +0200 usb: host: xhci: add xhci_virt_device tracer Let's start tracing at least part of an xhci_virt_device lifetime. We might want to extend this tracepoint class later, but for now it already exposes quite a bit of valuable information. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 ++ drivers/usb/host/xhci-mem.c | 7 ++++++ drivers/usb/host/xhci-trace.h | 57 +++++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci.c | 1 + 4 files changed, 67 insertions(+) commit d4d93e6c55021aca954603b0e18b2de27026d433 Author: Felipe Balbi Date: Mon Jan 23 14:20:22 2017 +0200 usb: host: xhci: remove newline from tracer If we add that newline, the output will look like the following: kworker/2:1-42 [002] .... 169.811435: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@153fbd000, ctx_va=@ffff880153fbd000 We would rather have that in a single line. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0e625c41abbcc12c4981823889e3dc126252fb5 Author: Felipe Balbi Date: Mon Jan 23 14:20:21 2017 +0200 usb: host: xhci: convert several if() to a single switch statement when getting endpoint type, a switch statement looks better than a series of if () branches. There are no functional changes with this patch, cleanup only. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5abdc2e6e12ff040a218dc807be4c4d9866b265f Author: Felipe Balbi Date: Mon Jan 23 14:20:20 2017 +0200 usb: host: xhci: add urb_enqueue/dequeue/giveback tracers These three new tracers will help us tie TRBs into URBs by *also* looking into URB lifetime. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 1 + drivers/usb/host/xhci-trace.h | 70 +++++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci.c | 5 ++++ 3 files changed, 76 insertions(+) commit a37c3f76e6a6b5eabacb1364c2218b0daafab18a Author: Felipe Balbi Date: Mon Jan 23 14:20:19 2017 +0200 usb: host: xhci: make a generic TRB tracer instead of having a tracer that can only trace command completions, let's promote this tracer so it can trace and decode any TRB. With that, it will be easier to extrapolate the lifetime of any TRB which might help debugging certain issues. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 14 +- drivers/usb/host/xhci-trace.h | 55 ++++--- drivers/usb/host/xhci.h | 329 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 375 insertions(+), 23 deletions(-) commit ed6d643b14e7bc2fac794a0bbac7dd742ca2ed80 Author: Felipe Balbi Date: Mon Jan 23 14:20:18 2017 +0200 usb: host: xhci: combine event TRB completion debugging messages If we just provide a helper to convert completion code to string, we can combine all debugging messages into a single print. [keep the old debug messages, for warn and grep -Mathias] Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit a54cfae3c7727c2c172fdcd5886b4235b833da6c Author: Felipe Balbi Date: Mon Jan 23 14:20:17 2017 +0200 usb: host: xhci: convert to list_for_each_entry_safe() instead of using while(!list_empty()) followed by list_first_entry(), we can actually use list_for_each_entry_safe(). Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 5278204c98188ac9fd2e75b936eec1015d062a75 Author: Mathias Nyman Date: Mon Jan 23 14:20:16 2017 +0200 xhci: use the trb_to_noop() helper for command trbs Remove duplicate code by using trb_to_noop() when handling Aborted commads Based on earlier code by Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit ae1e3f07320884ff25354d8233dc18d5283b0bb8 Author: Mathias Nyman Date: Mon Jan 23 14:20:15 2017 +0200 xhci: Introduce helper to turn one TRB into a no-op Useful for turning both transfer and command trbs into no-ops. Based on earlier code by Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit a60f2f2ffabe14a559510dcf347bef9a7a312516 Author: Felipe Balbi Date: Mon Jan 23 14:20:14 2017 +0200 usb: host: xhci: unconditionally call xhci_unmap_td_bounce_buffer() xhci_unmap_td_bounce_buffer() already checks for a valid td->bounce_seg and bails out early if that's invalid. There's no need to check for this twice. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit f45e2a02112a1ed03925521c9f48e4bdc25c7032 Author: Felipe Balbi Date: Mon Jan 23 14:20:13 2017 +0200 usb: host: xhci: check for a valid ring when unmapping bounce buffer This way we can remove checks for valid ring from call sites of xhci_unmap_td_bounce_buffer() Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3899a28e2b8a6f208187033789ac0f038d3c08e Author: Felipe Balbi Date: Mon Jan 23 14:20:12 2017 +0200 usb: host: xhci: remove bogus __releases()/__acquires() annotation handle_tx_event() is not releasing xhci->lock nor reacquiring it, remove the bogus annotation. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) commit 55fa4396b24db2adbcf5659ce3d7397c31e6b51c Author: Felipe Balbi Date: Mon Jan 23 14:20:11 2017 +0200 usb: host: xhci: introduce xhci_td_cleanup() By extracting xhci_td_cleanup() from finish_td(), code before clearer and easier to follow. There are no functional changes with this patch. It's merely a cleanup. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 92 ++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 42 deletions(-) commit be0f50c2e3c4bb9bd8fcb4b89879ae62308019bf Author: Felipe Balbi Date: Mon Jan 23 14:20:10 2017 +0200 usb: host: xhci: reorder variable definitions no functional changes. Simple cleanup to make sure variables are ordered in a 'reverse christmas tree' fashion. While at that, also remove an obsolete comment which doesn't apply anymore. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 04861f83367eaa3f32e3a1433afe8274e9a5f7f1 Author: Felipe Balbi Date: Mon Jan 23 14:20:09 2017 +0200 usb: host: xhci: use slightly better list helpers Replace list_entry() with list_first_entry() and list_for_each() with list_for_each_entry(). This makes the code slightly more readable. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit ec84481708adc5e02c00d36262679237573fe618 Author: Felipe Balbi Date: Mon Jan 23 14:20:08 2017 +0200 usb: host: xhci: remove unneded semicolon it does no good, let's remove it. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ext-caps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76a35293b901915c5dcb4a87a4a0da8d7caf39fe Author: Felipe Balbi Date: Mon Jan 23 14:20:07 2017 +0200 usb: host: xhci: simplify irq handler return Instead of having several return points, let's use a local variable and a single place to return. This makes the code slightly easier to read. [set ret = IRQ_HANDLED in default working case -Mathias] Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 0b7c105a04ca793acf5d39ff9bafebe89182fc6b Author: Felipe Balbi Date: Mon Jan 23 14:20:06 2017 +0200 usb: host: xhci: rename completion codes to match spec Cleanup only. This patch is a mechaninal rename to make sure our macros for TRB completion codes match what the specification uses to refer to such errors. The idea behind this is that it makes it far easier to grep the specification and match it with implementation. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 +- drivers/usb/host/xhci-ring.c | 124 +++++++++++++++++++++---------------------- drivers/usb/host/xhci.c | 48 ++++++++--------- drivers/usb/host/xhci.h | 106 +++++++++++++----------------------- 4 files changed, 124 insertions(+), 157 deletions(-) commit ced09c95963795374c7f8710eeabca1d734315e2 Author: Felipe Balbi Date: Mon Jan 23 14:20:05 2017 +0200 usb: host: xhci: print HCIVERSION on debug When calling xhci_dbg_regs() we actually _do_ want to know XHCI's version. This might help figure out why certain problems only happen in some cases. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 2 -- 1 file changed, 2 deletions(-) commit 98871e9470a50c8c0154b7220495b60ec055e02f Author: Felipe Balbi Date: Mon Jan 23 14:20:04 2017 +0200 usb: host: xhci: change pre-increments to post-increments This is a cleanup patch only, no functional changes. The idea is just to make sure for loops look the same all over the driver. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 20 ++++++++++---------- drivers/usb/host/xhci-mem.c | 8 ++++---- drivers/usb/host/xhci.c | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) commit 989bad111979f6e3827f23c3797f6ecd67766bab Author: Lu Baolu Date: Mon Jan 23 14:20:03 2017 +0200 usb: xhci: remove unnecessary return in xhci_pci_setup() Remove the unnecessary return line in xhci_pci_setup(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit daa47f2132dce31fcab7c6ebdcb957e598c768f2 Author: Lu Baolu Date: Mon Jan 23 14:20:02 2017 +0200 usb: xhci: use list_is_singular for cmd_list Use list_is_singular() to check if cmd_list has only one entry. [use list_empty() in queue command instead -Mathias] Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fb79a6da459b20554151eed84c991cd9bd35ff15 Author: Lu Baolu Date: Mon Jan 23 14:20:01 2017 +0200 usb: xhci: avoid unnecessary calculation No need to calculate remainder and length_field, if there is no data phase of a control transfer. 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, 10 insertions(+), 10 deletions(-) commit 80c479622fb4564c40813c8f752d3fffd4c5be47 Author: Lu Baolu Date: Mon Jan 23 14:20:00 2017 +0200 usb: xhci: remove unnecessary assignment Drop an unnecessary assignment in prepare_transfer(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) commit 21939f003ad09355d9c975735750bb22aa37d8de Author: Felipe Balbi Date: Mon Jan 23 14:19:59 2017 +0200 usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested In case 'quirk-broken-port-ped' property is passed in via device property, we should enable the corresponding BROKEN_PED quirk flag for XHCI core. [rogerq@ti.com] Updated code from platform data to device property and added DT binding. Signed-off-by: Felipe Balbi Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci-plat.c | 3 +++ 2 files changed, 4 insertions(+) commit 41135de1e7fd14c6fcb9158404ba5c8fb97bf259 Author: Felipe Balbi Date: Mon Jan 23 14:19:58 2017 +0200 usb: xhci: add quirk flag for broken PED bits Some devices from Texas Instruments [1] suffer from a silicon bug where Port Enabled/Disabled bit should not be used to silence an erroneous device. The bug is so that if port is disabled with PED bit, an IRQ for device removal (or attachment) will never fire. Just for the sake of completeness, the actual problem lies with SNPS USB IP and this affects all known versions up to 3.00a. A separate patch will be added to dwc3 to enabled this quirk flag if version is <= 3.00a. [1] - AM572x Silicon Errata http://www.ti.com/lit/er/sprz429j/sprz429j.pdf Section i896— USB xHCI Port Disable Feature Does Not Work Signed-off-by: Felipe Balbi Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 6 ++++++ drivers/usb/host/xhci.h | 3 +++ 2 files changed, 9 insertions(+) commit 52c31bd5294d838315ea0211a991cfcd60b625ff Author: Alexander Stein Date: Mon Jan 23 14:19:57 2017 +0200 xhci: Put warning message on a single line This allows someone to grep for the complete warning message as in; xhci-hcd xhci-hcd.0.auto: USB core suspending device not in U0/U1/U2. Signed-off-by: Alexander Stein Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e22caf8bc140d8efa52922040c173c0b84647b66 Author: Baolin Wang Date: Mon Jan 23 14:19:56 2017 +0200 usb: host: xhci: Remove unused 'addr_64' variable in xhci_hcd structure Since the 'addr_64' variable as legacy is unused now, then remove it from xhci_hcd structure. Signed-off-by: Baolin Wang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 1 - 1 file changed, 1 deletion(-) commit 1cc6d8617b9107f22ab86cec168f7f53f5ef42be Author: Lu Baolu Date: Mon Jan 23 14:19:55 2017 +0200 usb: xhci: remove unnecessary second abort try The second try was a workaround for (what we thought was) command ring failing to stop in the first place. But this turns out to be due to the race that we have fixed(see "xhci: Fix race related to abort operation"). With that fix, it is time to remove the second try. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 6b02e97491c9b4ef54a3b2295f2962b2ceeb25f8 Author: Mathias Nyman Date: Mon Jan 23 14:19:54 2017 +0200 xhci: remove unnecessary check for pending timer Checking if the command timeout timer is pending when queueing the first command to the command ring is not really useful, remove it. Suggested-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f99265965b3203baf5266994578db14851fbf7fa Author: Mathias Nyman Date: Mon Jan 23 14:19:53 2017 +0200 xhci: detect stop endpoint race using pending timer instead of counter. A counter was used to find out if the stop endpoint completion raced with the stop endpoint timeout timer. This was needed in case the stop ep completion failed to delete the timer as it was running on anoter cpu. The EP_STOP_CMD_PENDING flag was not enough as a new stop endpoint command may be queued between the command completion and timeout function, which would set the flag back. Instead of the separate counter that was used we can detect the race by checking both the STOP_EP_PENDING flag and timer_pending in the timeout function. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 27 +++++++++++---------------- drivers/usb/host/xhci.c | 1 - drivers/usb/host/xhci.h | 1 - 3 files changed, 11 insertions(+), 18 deletions(-) commit 9983a5fc39bfce7581db49f884aa782f24149d93 Author: Mathias Nyman Date: Mon Jan 23 14:19:52 2017 +0200 xhci: rename EP_HALT_PENDING to EP_STOP_CMD_PENDING We don't want to confuse halted and stalled endpoint states with a flag indicating we are waiting for a stop endpoint command to finish or timeout Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 6 +++--- drivers/usb/host/xhci.c | 6 +++--- drivers/usb/host/xhci.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 505f581c48bc27cd72beb42df47b3012b617ea5c Author: Mathias Nyman Date: Mon Jan 23 14:19:51 2017 +0200 xhci: simplify if statement to make it more readable No functional change, De Morgan !(A && B) = (!A || !B) Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 92190e365a28b0c15685a23750c20433902d026d Author: Augusto Mecking Caringi Date: Tue Jan 24 18:11:23 2017 +0000 usb: storage: sddr09: Remove a set-but-not-used variable The 'isnew' variable in 'sddr09_write_lba' function is set but never used. This has been detected by building the driver with W=1: drivers/usb/storage/sddr09.c: In function ‘sddr09_write_lba’: drivers/usb/storage/sddr09.c:873:17: warning: variable ‘isnew’ set but not used [-Wunused-but-set-variable] int i, result, isnew; ^ Signed-off-by: Augusto Mecking Caringi Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/sddr09.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1e572aa5686a6871eee7840e227f86e474cc7c2a Author: Bhumika Goyal Date: Wed Jan 25 00:52:22 2017 +0530 usb: musb: constify musb_hdrc_config structures Declare musb_hdrc_config structures as const as they are only stored in the config field of a musb_hdrc_platform_data structure. This field is of type const, so musb_hdrc_config structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct musb_hdrc_config x@p={...}; @ok@ struct musb_hdrc_platform_data pdata; identifier r.x; position p; @@ pdata.config=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct musb_hdrc_config x; File size before: text data bss dec hex filename 1212 338 0 1550 60e drivers/usb/musb/jz4740.o File size after: text data bss dec hex filename 1268 290 0 1558 616 drivers/usb/musb/jz4740.o File size before: text data bss dec hex filename 6151 333 16 6500 1964 drivers/usb/musb/sunxi.o File size after: text data bss dec hex filename 6215 269 16 6500 1964 drivers/usb/musb/sunxi.o File size before: text data bss dec hex filename 3668 864 0 4532 11b4 drivers/usb/musb/ux500.o File size after: text data bss dec hex filename 3724 808 0 4532 11b4 drivers/usb/musb/ux500.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/jz4740.c | 2 +- drivers/usb/musb/sunxi.c | 2 +- drivers/usb/musb/ux500.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a3e4863ea90801813e1c99104f517c7fcb8aabf6 Author: Rask Ingemann Lambertsen Date: Sun Jan 22 22:17:48 2017 +0100 ARM: dts: tegra: Fix missing card detection in Trimslice µSD card slot Card insertion and removal currently goes undetected. AFAIK there's no way to generate interrupts on card changes in this slot, so use polling. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20-trimslice.dts | 1 + 1 file changed, 1 insertion(+) commit 9729017f844431ab2800519297d8d1b0ecbc420d Author: Andy Lutomirski Date: Wed Jan 18 11:15:42 2017 -0800 x86/fpu: Fix the "Giving up, no FPU found" test We would never print "Giving up, no FPU found" because X86_FEATURE_FPU was in REQUIRED_MASK on non-FPU-emulating builds, so the boot_cpu_has() test didn't do anything. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37ac78b67b3384d1ced5424d5a13ee146041bda3 Author: Andy Lutomirski Date: Wed Jan 18 11:15:41 2017 -0800 x86/fpu: Fix CPUID-less FPU detection The old code didn't work at all because it adjusted the current caps instead of the forced caps. Anything it did would be undone later during CPU identification. Fix that and, while we're at it, improve the logging and don't bother running it if CPUID is available. Reported-by: Matthew Whitehead Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/f1134e30cafa73c4e2e68119e9741793622cfd15.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/init.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 9170fb409437b246078bcad3f1481d32dfe2ca28 Author: Andy Lutomirski Date: Wed Jan 18 11:15:40 2017 -0800 x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message That message isn't at all clear -- what does "Legacy x87" even mean? Clarify it. If there's no FPU, say: x86/fpu: No FPU detected If there's an FPU that doesn't have XSAVE, say: x86/fpu: x87 FPU will use FSAVE|FXSAVE Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/bb839385e18e27bca23fe8666dfdad8170473045.1484705016.git.luto@kernel.org [ Small tweaks to the messages. ] Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 60d3450167433f2d099ce2869dc52dd9e7dc9b29 Author: Andy Lutomirski Date: Wed Jan 18 11:15:39 2017 -0800 x86/cpu: Re-apply forced caps every time CPU caps are re-read Calling get_cpu_cap() will reset a bunch of CPU features. This will cause the system to lose track of force-set and force-cleared features in the words that are reset until the end of CPU initialization. This can cause X86_FEATURE_FPU, for example, to change back and forth during boot and potentially confuse CPU setup. To minimize the chance of confusion, re-apply forced caps every time get_cpu_cap() is called. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/c817eb373d2c67c2c81413a70fc9b845fa34a37e.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8bf1ebca215c262e48c15a4a15f175991776f57f Author: Andy Lutomirski Date: Wed Jan 18 11:15:38 2017 -0800 x86/cpu: Factor out application of forced CPU caps There are multiple call sites that apply forced CPU caps. Factor them into a helper. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/623ff7555488122143e4417de09b18be2085ad06.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 78d1b296843a719935277b0d24d1358416ed0204 Author: Borislav Petkov Date: Wed Jan 18 11:15:37 2017 -0800 x86/cpu: Add X86_FEATURE_CPUID Add a synthetic CPUID flag denoting whether the CPU sports the CPUID instruction or not. This will come useful later when accomodating CPUID-less CPUs. Signed-off-by: Borislav Petkov [ Slightly prettified. ] Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/dcb355adae3ab812c79397056a61c212f1a0c7cc.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/common.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 4ad8622dc54895c0072ddc919a83ea2a2f05605f Author: Christophe Leroy Date: Tue Nov 29 09:52:15 2016 +0100 powerpc/8xx: Implement hw_breakpoint This patch implements HW breakpoint on the 8xx. The 8xx has capability to manage HW breakpoints, which is slightly different than BOOK3S: 1/ The breakpoint match doesn't trigger a DSI exception but a dedicated data breakpoint exception. 2/ The breakpoint happens after the instruction has completed, no need to single step or emulate the instruction, 3/ Matched address is not set in DAR but in BAR, 4/ DABR register doesn't exist, instead we have registers LCTRL1, LCTRL2 and CMPx registers, 5/ The match on one comparator is not on a double word but on a single word. The patch does: 1/ Prepare the dedicated registers in call to __set_dabr(). In order to emulate the double word handling of BOOK3S, comparator E is set to DABR address value and comparator F to address + 4. Then breakpoint 1 is set to match comparator E or F, 2/ Skip the singlestepping stage when compiled for CONFIG_PPC_8xx, 3/ Implement the exception. In that exception, the matched address is taken from SPRN_BAR and manage as if it was from SPRN_DAR. 4/ I/D TLB error exception routines perform a tlbie on bad TLBs. That tlbie triggers the breakpoint exception when performed on the breakpoint address. For this reason, the routine returns if the match is from one of those two tlbie. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/reg_8xx.h | 7 +++++++ arch/powerpc/kernel/head_8xx.S | 28 +++++++++++++++++++++++++++- arch/powerpc/kernel/hw_breakpoint.c | 6 +++++- arch/powerpc/kernel/process.c | 22 ++++++++++++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) commit fa769d3f58e6b0db4ed9f5f05ef1f251692f90c6 Author: Christophe Leroy Date: Tue Nov 29 09:52:13 2016 +0100 powerpc/32: Enable HW_BREAKPOINT on BOOK3S BOOK3S also has DABR register and capability to handle data breakpoints, so this patch enable it on all BOOK3S, not only 64 bits. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/processor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fdc8c4adb6a465b5873df97fcbd1cb332ade019b Author: Valentin Longchamp Date: Thu Dec 15 14:22:28 2016 +0100 powerpc/corenet: add support for the kmcent2 board This board is built around Freescale's T1040 SoC. The peripherals used by this design are: - DDR3 RAM with SPD support - parallel NOR Flash as boot medium - 1 PCIe bus (PCIe1 x1) - 3 FMAN Ethernet devices (FMAN1 DTSEC1/2/5) - 4 IFC bus devices: - NOR flash - NAND flash - QRIO reset/power mgmt CPLD - BFTIC chassis management CPLD - 2 I2C buses - 1 SPI bus - HDLC bus with the QE's UCC1 - last but not least, the mandatory serial port The board can be used with the corenet32_smp_defconfig. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/kmcent2.dts | 303 ++++++++++++++++++++++++++ arch/powerpc/platforms/85xx/corenet_generic.c | 1 + 2 files changed, 304 insertions(+) commit 7b51f8e35e11b9226f439d154f54b8ae8d128e34 Author: Valentin Longchamp Date: Thu Dec 15 14:22:27 2016 +0100 powerpc/85xx: remove the kmp204x_defconfig It is not maintained and thus obsolete. corenet32_smp_defconfig can be used as reference for the kmcoge4/kmp204x boards. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood arch/powerpc/configs/85xx/kmp204x_defconfig | 220 ---------------------------- 1 file changed, 220 deletions(-) commit a674c7d470bb47e82f4eb1fa944eadeac2f6bbaf Author: Valentin Longchamp Date: Thu Dec 15 14:22:26 2016 +0100 powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 It is not implemented on the kmcoge4 hardware and if not disabled it leads to error messages with the corenet32_smp_defconfig. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/kmcoge4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 1c06552a703c6a4256976a1615d262b5a0d754e5 Author: Jason Jin Date: Fri Nov 25 14:40:55 2016 +0800 powerpc/85xx: Enable display support for t1042rdb Add a diu_ops implementation for t1042rdb. Signed-off-by: Jason Jin [Meng Yi: Made file t1042rdb-specific] Signed-off-by: Meng Yi [scottwood: clean up commit message] Signed-off-by: Scott Wood arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/t1042rdb_diu.c | 152 +++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) commit c58f5f88483974adebc49996b3cbfd89e944222f Author: Thierry Reding Date: Mon Nov 21 10:25:36 2016 +0100 arm64: tegra: Use symbolic clock identifiers Now that the corresponding device tree binding include has been merged, convert the DTS files to use symbolic names instead of numeric ones. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 41 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 5edcebb96b2f6815f94d7030408cbe08c0dd4b80 Author: Thierry Reding Date: Mon Nov 21 10:25:34 2016 +0100 arm64: tegra: Use symbolic HSP identifiers Now that the corresponding device tree binding include has been merged, convert the DTS files to use symbolic names instead of numeric ones. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 692665c621bb73f298d37bf6c6dad47ef94a5c2b Merge: afa197e 7a308bb Author: Greg Kroah-Hartman Date: Wed Jan 25 09:20:49 2017 +0100 Merge 4.10-rc5 into usb-next We need the USB fixes in here as well to handle future merge issues and dependancies. Signed-off-by: Greg Kroah-Hartman commit 0c18927f51f4d390abdcf385bff5f995407ee732 Author: Marc Dietrich Date: Fri Dec 9 10:20:38 2016 +0100 ARM: tegra: paz00: Mark panel regulator as enabled on boot Current U-Boot enables the display already. Marking the regulator as enabled on boot fixes sporadic panel initialization failures. Signed-off-by: Marc Dietrich Tested-by: Misha Komarovskiy Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20-paz00.dts | 1 + 1 file changed, 1 insertion(+) commit ed0a27ef6411b22c75ae596ca2722dd7b621bcd0 Author: Dmitry Torokhov Date: Sun Jan 22 23:43:47 2017 -0800 ARM: tegra: paz00: Fix __initdata placement Placement of attributes, such as __initdata, is standardized through the checkpatch script. Fix up this instance to make checkpatch happy. Signed-off-by: Dmitry Torokhov Signed-off-by: Thierry Reding arch/arm/mach-tegra/board-paz00.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5828ed3d03d38399159dc17a98cefde3109a66b Author: Yu-cheng Yu Date: Tue Jan 24 10:25:46 2017 -0800 x86/fpu/xstate: Move XSAVES state init to a function Make XSTATE init similar to existing code; move it to a separate function. There is no functionality change. Signed-off-by: Yu-cheng Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1485282346-15437-1-git-send-email-yu-cheng.yu@intel.com [ Minor cleanliness edits. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 10 ++++++++++ arch/x86/kernel/fpu/core.c | 9 +-------- 2 files changed, 11 insertions(+), 8 deletions(-) commit b92f4380a1c7eb3ed19d6f68ad7b66c66d8102b4 Author: Christophe Jaillet Date: Wed Jan 4 08:13:24 2017 +0100 memory: tegra: Add a missing 'of_node_put()' call If 'of_find_device_by_node()' fails, an 'of_node_put()' call is missing in the error handling path. Fix it by reordering the code. While at it, remove some empty lines in a more or less similar construction a few lines below. Signed-off-by: Christophe JAILLET Signed-off-by: Thierry Reding drivers/memory/tegra/tegra124-emc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6270bd3d9187650aba71c51492de932c168a5e03 Author: Marcel Ziswiler Date: Tue Nov 22 01:14:07 2016 +0100 ARM: tegra: apalis-tk1: Update compatibility comment Now with the new V1.1A HW card detect being implemented update resp. compatibility information. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab9670d5524af2359663ae590ee02e3b27d13b88 Author: Marcel Ziswiler Date: Tue Nov 22 01:14:06 2016 +0100 ARM: tegra: apalis-tk1: Fix SD card detect on v1.1 HW Add SD card detect SD1_CD# applicable for V1.1 modules using GPIO_PV2. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 5142bd659c1bd6da102a54d8cd7aae4af38c38b2 Author: Marcel Ziswiler Date: Tue Nov 22 01:14:05 2016 +0100 ARM: tegra: apalis-tk1: Adjust pin muxing for v1.1 HW Configure Apalis MMC1 D6 GPIO on SDMMC3_CLK_LB_IN as reserved function without any pull-up/down. Configure GPIO_PV2 as SD1_CD# according to latest V1.1 HW. Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output driver enabled aka not tristated and input driver enabled as well as it features some magic properties even though the external loopback is disabled and the internal loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM! This pin is now a not-connect on V1.1 HW in order to avoid any interference. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 53 +++++++++++++++------------------- 1 file changed, 23 insertions(+), 30 deletions(-) commit a7f9d4febc8159fd977cbf08113e67cadc70214c Author: Marcel Ziswiler Date: Tue Nov 22 01:14:04 2016 +0100 ARM: tegra: apalis-tk1: Optional DisplayPort hot-plug detect Configure DP_HPD_PFF0 pin as optional DisplayPort hot-plug detect. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02888f8be5ef056b1ffa7e149a9674d9a233493f Author: Marcel Ziswiler Date: Tue Nov 22 01:14:03 2016 +0100 ARM: tegra: apalis-tk1: Pull-up temperature alert Pull-up GPIO_PI6 connected to TMP451's ALERT#/THERM2#. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7c799e950f96191a16f18606e43e6f861b2a361 Author: Andy Shevchenko Date: Tue Jan 17 13:57:32 2017 +0200 dmaengine: dw: we do support Merrifield SoC in PCI mode Intel Merrifield platform contains Intel integrated DMA (iDMA 32-bit) which has a slightly different register mapping, e.g. some bits in CTL_* and CFG_* channel registers, and has to use platform data since there is no autoconfiguration. The iDMA 32-bit specification is available in the publicly available documentation for Intel Braswell and BayTrail SoCs as LPE Audio DMA. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/pci.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 199244d69458770770890f8b5988a1b6cad701ad Author: Andy Shevchenko Date: Tue Jan 17 13:57:31 2017 +0200 dmaengine: dw: add support of iDMA 32-bit hardware iDMA 32-bit is Intel designed DMA controller that behaves like Synopsys Designware DMA. This patch adds a support of the new Intel hardware. Due to iDMA 32-bit has no autoconfiguration the platform code must provide a platform data to dw_dma_probe(). By default full FIFO (1024 bytes) is assigned to channel 0. Here we slice FIFO on equal parts between channels for iDMA 32-bit case. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 101 +++++++++++++++++++++++++++++++---- include/linux/platform_data/dma-dw.h | 2 + 2 files changed, 94 insertions(+), 9 deletions(-) commit a9f4d1b8314396cc09301fa3ab954167ff81a46b Author: Andy Shevchenko Date: Tue Jan 17 13:57:30 2017 +0200 dmaengine: dw: introduce register mappings for iDMA 32-bit The integrated DMA (iDMA 32-bit) is Intel designed DMA controller which mimics Synopsys Designware DMA. This patch appends the register mappings for the parts which are slightly different to the DesignWare hardware. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/regs.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) commit 2d248812aa14d5f9bc6fc11a222c722524f25159 Author: Andy Shevchenko Date: Tue Jan 17 13:57:29 2017 +0200 dmaengine: dw: introduce block2bytes() and bytes2block() The newly introduced helpers prepare driver to support new DMA controller hardware. While here, introduce DWC_CTLH_BLOCK_TS() macro as well. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 52 ++++++++++++++++++++++++++++++--------------------- drivers/dma/dw/regs.h | 6 ++++-- 2 files changed, 35 insertions(+), 23 deletions(-) commit f4aa3183c36d2f32695b0e7f0ce7296568729830 Author: Andy Shevchenko Date: Tue Jan 17 13:57:28 2017 +0200 dmaengine: dw: extract dwc_chan_pause() for future use iDMA 32-bit has a special handling of the FIFO during pause() / terminate_all(). Prepare code to implement that. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit be242f4e2e551e55d1f76504a8adcb703e0127c3 Author: Andy Shevchenko Date: Tue Jan 17 13:57:27 2017 +0200 dmaengine: dw: replace convert_burst() with one liner Replace convert_burst() with one liner in place. The change simplifies further extension of the driver to cover new DMA controller hardware. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 08d62f58aa2587132a930afbe8664379b430e2dd Author: Andy Shevchenko Date: Tue Jan 17 13:57:26 2017 +0200 dmaengine: dw: register IRQ and DMA pool with instance ID It is really useful not only for debugging to have an IRQ line and DMA pool labeled with driver and its instance ID. Do this for DesignWare DMA driver. All current users of this IP would be enhanced later on. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 7 +++++-- drivers/dma/dw/pci.c | 1 + drivers/dma/dw/platform.c | 1 + drivers/dma/dw/regs.h | 1 + include/linux/dma/dw.h | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) commit a46a7634017ae5da1adf352c5bd0c66a772f20b5 Author: Jarkko Nikula Date: Tue Jan 17 13:57:25 2017 +0200 dmaengine: dw: Fix data corruption in large device to memory transfers When transferring more data than the maximum block size supported by the HW multiplied by source width the transfer is split into smaller chunks. Currently code calculates the memory width and thus aligment before splitting for both memory to device and device to memory transfers. For memory to device transfers this work fine since alignment is preserved through the splitting and split blocks are still memory width aligned. However in device to memory transfers aligment breaks when maximum block size multiplied by register width doesn't have the same alignment than the buffer. For instance when transferring from an 8-bit register 4100 bytes (32-bit aligned) on a DW DMA that has maximum block size of 4095 elements. An attempt to do such transfers caused data corruption. Fix this by calculating and setting the destination memory width after splitting by using the split block aligment and length. Signed-off-by: Jarkko Nikula Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 567ab5a81ba569b823b51f4af74f26c437e98b56 Author: Roger Quadros Date: Tue Jan 24 16:54:07 2017 +0200 extcon: palmas: Use dev_dbg macro for the debug messages User is not interested in USB cable events appearing on the console. Use dev_dbg() instead of dev_info() for these events. Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7b0a89a6db9a5912065e174162ec4a653c9b25d6 Author: Dhinakaran Pandiyan Date: Tue Jan 24 15:49:29 2017 -0800 drm/dp: Store drm_device in MST topology manager struct drm_dp_mst_topology_mgr currently stores a pointer to struct dev. Changing this to instead hold a pointer to drm_device is more useful as it gives access to DRM structures. This also makes it consistent with other DRM structures like drm_crtc, drm_connector etc. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Dave Airlie Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1485301777-3465-2-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 6 +++--- drivers/gpu/drm/i915/intel_dp_mst.c | 3 ++- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/radeon/radeon_dp_mst.c | 2 +- include/drm/drm_dp_mst_helper.h | 7 +++++-- 5 files changed, 12 insertions(+), 8 deletions(-) commit 10528b9c45cfb9e8f45217ef2f5ef8b876bbd3f5 Author: Naveen N. Rao Date: Fri Jan 13 22:40:01 2017 +0530 powerpc/bpf: Flush the entire JIT buffer With bpf_jit_binary_alloc(), we allocate at a page granularity and fill the rest of the space with illegal instructions to mitigate BPF spraying attacks, while having the actual JIT'ed BPF program at a random location within the allocated space. Under this scenario, it would be better to flush the entire allocated buffer rather than just the part containing the actual program. We already flush the buffer from start to the end of the BPF program. Extend this to include the illegal instructions after the BPF program. Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Michael Ellerman arch/powerpc/net/bpf_jit_comp64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 052de33ca4f840bf35587eacdf78b3bf8d347bb8 Author: Daniel Borkmann Date: Fri Jan 13 22:40:00 2017 +0530 powerpc/bpf: Remove redundant check for non-null image We have a check earlier to ensure we don't proceed if image is NULL. As such, the redundant check can be removed. Signed-off-by: Daniel Borkmann [Added similar changes for classic BPF JIT] Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Signed-off-by: Michael Ellerman arch/powerpc/net/bpf_jit_comp.c | 17 +++++++++-------- arch/powerpc/net/bpf_jit_comp64.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 14a3ae34bfd0bcb1cc12d55b06a8584c11fac6fc Author: Andrew Donnellan Date: Fri Dec 9 17:18:50 2016 +1100 cxl: Prevent read/write to AFU config space while AFU not configured During EEH recovery, we deconfigure all AFUs whilst leaving the corresponding vPHB and virtual PCI device in place. If something attempts to interact with the AFU's PCI config space (e.g. running lspci) after the AFU has been deconfigured and before it's reconfigured, cxl_pcie_{read,write}_config() will read invalid values from the deconfigured struct cxl_afu and proceed to Oops when they try to dereference pointers that have been set to NULL during deconfiguration. Add a rwsem to struct cxl_afu so we can prevent interaction with config space while the AFU is deconfigured. Reported-by: Pradipta Ghosh Suggested-by: Frederic Barrat Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Andrew Donnellan Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/main.c | 3 ++- drivers/misc/cxl/pci.c | 2 ++ drivers/misc/cxl/vphb.c | 51 ++++++++++++++++++++++++++++--------------------- 4 files changed, 35 insertions(+), 23 deletions(-) commit d7b1946c7925a270062b2e0718aa57b42ba619c0 Author: Vaibhav Jain Date: Wed Jan 4 11:48:52 2017 +0530 cxl: Force psl data-cache flush during device shutdown This change adds a force psl data cache flush during device shutdown callback. This should reduce a possibility of psl holding a dirty cache line while the CAPP is being reinitialized, which may result in a UE [load/store] machine check error. Signed-off-by: Vaibhav Jain Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e17166d377e74164e4067ae162ed19226352a97 Author: Greg Kurz Date: Thu Jan 19 11:50:10 2017 +0100 cxl: Drop unused header asm/pnv-pci.h The kernel API does not use anything from this header file. Signed-off-by: Greg Kurz Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 1 - 1 file changed, 1 deletion(-) commit a967f161abc7c4a6936ceb15737f75c52bfd07f2 Author: Markus Elfring Date: Sat Jan 21 16:10:50 2017 +0100 powerpc/mm: Return directly after a failed __copy_from_user() in sys_subpage_prot() This function already has multiple exit points, so there's no harm adding another. Although it looks odd to return directly in a function which takes a lock, we've actually just dropped the mmap_sem in this code, so there's really no reason to go via a label. And it means we can drop the unhelpfully named out2 label. Signed-off-by: Markus Elfring [mpe: Rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/subpage-prot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3c4b66a6d0d2b9f2418f9a09d528e42e2dc18acf Author: Markus Elfring Date: Sat Jan 21 15:30:15 2017 +0100 powerpc/sstep: Return directly after a failed address_ok() in emulate_step() Setting err and going to ldst_done just returns 0, without using err, so just return 0 directly. We already do that for other call sites in this function. Signed-off-by: Markus Elfring [mpe: Rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8b2577832100706124fd6fe09f887992c8d7c0c6 Author: Gavin Shan Date: Tue Jan 24 09:49:54 2017 +1100 powerpc/kernel: Fix unbalanced refcount on RTAS device node The RTAS device-tree node's refcount has been increased by one in the function call of_find_node_by_name(), but it's missed to be decreased by one in the error path. It leads to unbalanced refcount on RTAS device-tree node. This fixes above issue by decreasing RTAS device-tree node's refcount in error path. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtas.c | 1 + 1 file changed, 1 insertion(+) commit de6d2d1b7bf2b3a8d5e57ebffad9f2688fe00a7a Author: Gavin Shan Date: Tue Jan 24 09:49:53 2017 +1100 powerpc/kernel: Use of_property_read_u32() in rtas_initialize() This uses of_property_read_u32() in rtas_initialize() so that we needn't explicitly care the CPU's endian. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtas.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit dbecd5093043faa9da83c720ed0e08ec1a5b410e Author: Gavin Shan Date: Tue Jan 24 09:49:52 2017 +1100 powerpc/kernel: Remove nested if statements in rtas_initialize() This removes the unnecessary nested if statements in function rtas_initialize(), to simplify the code. No functional changes introduced. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtas.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit fb37e12896c1ba0407012fe8cdc0b054da063b6f Author: Markus Elfring Date: Wed Aug 24 22:26:37 2016 +0200 powerpc/powernv/pci: Use kmalloc_array() in two functions Use kmalloc_array(), which checks for overflow of the multiplication, rather than doing it by hand. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4ab2537c4204b976e4ca350bbdc193b4649cad28 Author: Aneesh Kumar K.V Date: Thu Dec 8 09:12:13 2016 +0530 powerpc/mm: Fixup wrong LPCR_VRMASD value In commit a4b349540a26af ("powerpc/mm: Cleanup LPCR defines") we updated LPCR_VRMASD wrongly as below. -#define LPCR_VRMASD (0x1ful << (63-16)) +#define LPCR_VRMASD_SH 47 +#define LPCR_VRMASD (ASM_CONST(1) << LPCR_VRMASD_SH) We initialize the VRMA bits in LPCR to 0x00 in kvm. Hence using a different mask value as above while updating lpcr should not have any impact. This patch updates it to the correct value. Fixes: a4b349540a26 ("powerpc/mm: Cleanup LPCR defines") Reported-by: Ram Pai Signed-off-by: Aneesh Kumar K.V Signed-off-by: Jia He Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4fde568a34a93897dfb9ae64cfe9dda9d5c908c Author: Paul Mackerras Date: Thu Nov 3 16:15:42 2016 +1100 powerpc/64: Use optimized checksum routines on little-endian Currently we have optimized hand-coded assembly checksum routines for big-endian 64-bit systems, but for little-endian we use the generic C routines. This modifies the optimized routines to work for little-endian. With this, we no longer need to enable CONFIG_GENERIC_CSUM. This also fixes a couple of comments in checksum_64.S so they accurately reflect what the associated instruction does. Signed-off-by: Paul Mackerras [mpe: Use the more common __BIG_ENDIAN__] Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/checksum.h | 4 ++++ arch/powerpc/lib/Makefile | 2 -- arch/powerpc/lib/checksum_64.S | 12 ++++++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) commit b492f7e4e07a28e706db26cf4943bb0911435426 Author: Paul Mackerras Date: Thu Nov 3 16:10:55 2016 +1100 powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold These functions compute an IP checksum by computing a 64-bit sum and folding it to 32 bits (the "nofold" in their names refers to folding down to 16 bits). However, doing (u32) (s + (s >> 32)) is not sufficient to fold a 64-bit sum to 32 bits correctly. The addition can produce a carry out from bit 31, which needs to be added in to the sum to produce the correct result. To fix this, we copy the from64to32() function from lib/checksum.c and use that. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/checksum.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 14a41d6b7572026cf8fc88ee72e81b6b40db2ec0 Author: Joel Stanley Date: Fri Jan 13 14:23:49 2017 +1030 powerpc/powernv: Report size of OPAL memcons log The OPAL memory console is reported to be size zero, as we do not initialise the struct attr with any size information due to the size being variable. This leads users to think that the console is empty. Instead report the maximum size. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-msglog.c | 4 ++++ 1 file changed, 4 insertions(+) commit 98e58b01e1671e5784c67972ec1b58a8997f784e Author: Hauke Mehrtens Date: Fri Dec 30 12:18:27 2016 +0100 MIPS: Lantiq: Lock DMA register accesses for SMP The DMA controller channel and port configuration is changed by selecting the port or channel in one register and then update the configuration in other registers. This has to be done in an atomic operation. Previously only the local interrupts were deactivated which works for single CPU systems. If the system supports SMP a better locking is needed, use spinlocks instead. On more recent SoCs (at least xrx200 and later) there are two memory regions to change the configuration, there we could use one area for each CPU and do not have to synchronize between the CPUs and more. Signed-off-by: Hauke Mehrtens Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14912/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/dma.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit b3d91db3f71d5f70ea60d900425a3f96aeb3d065 Author: Arvind Yadav Date: Mon Jan 2 15:18:21 2017 +0530 mips: ath79: clock:- Unmap region obtained by of_iomap Free memory mapping, if ath79_clocks_init_dt_ng is not successful. Signed-off-by: Arvind Yadav Fixes: 3bdf1071ba7d ("MIPS: ath79: update devicetree clock support for AR9132") Cc: antonynpavlov@gmail.com Cc: albeu@free.fr Cc: hackpascal@gmail.com Cc: sboyd@codeaurora.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14915/ Signed-off-by: Ralf Baechle arch/mips/ath79/clock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a3078e593b74fe196e69f122f03ff0b32f652c53 Author: Matt Redfearn Date: Mon Jan 23 14:08:13 2017 +0000 MIPS: Generic: Fix big endian CPUs on generic machine Big endian CPUs require SWAP_IO_SPACE enabled to swap accesses to little endian peripherals. Without this patch, big endian kernels fail to communicate with little endian periperals, such as PCI devices, on QEMU and FPGA based platforms. Signed-off-by: Matt Redfearn Fixes: eed0eabd12ef ("MIPS: generic: Introduce generic DT-based board support") Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15105/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e7093053f7a5ab91241e41df273f0e34552a3a22 Author: Dan Haab Date: Mon Jan 23 12:50:38 2017 -0700 MIPS: BCM47XX: Add Luxul devices to the database So far only Luxul XWR-1750 router was supported. This adds a set of other Luxul devices based on BCM47XX. It's a standard support for LEDs and buttons. Signed-off-by: Dan Haab Cc: Hauke Mehrtens Cc: Rafał Miłecki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15106/ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/board.c | 9 +++ arch/mips/bcm47xx/buttons.c | 72 +++++++++++++++++++ arch/mips/bcm47xx/leds.c | 81 ++++++++++++++++++++++ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 9 +++ 4 files changed, 171 insertions(+) commit c9d3fdf3372d06690fd5cbc1ac5beabe52927382 Author: Markus Elfring Date: Wed Jan 18 19:30:47 2017 +0100 MIPS: syscall: Return directly in mips_mmap() * Return an error code without storing it in an intermediate variable. * Delete the local variable "result" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Cc: Paul Gortmaker Cc: linux-mips@linux-mips.org Cc: LKML Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15073/ Signed-off-by: Ralf Baechle arch/mips/kernel/syscall.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a45526bb78529911eb6b2525347762e977fce125 Author: Markus Elfring Date: Wed Jan 18 19:18:37 2017 +0100 MIPS: MT: Move an assignment for the variable "retval" in mipsmt_sys_sched_setaffinity() A local variable was set to an error code in one case before a concrete error situation was detected. Thus move the corresponding assignment into an if branch to indicate a software failure there. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Paul Gortmaker Cc: linux-mips@linux-mips.org Cc: LKML Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15072/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-mt-fpaff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fcf4aec13b56edcfc837fa138d8b1d99b26e5ce4 Author: Markus Elfring Date: Wed Jan 18 19:00:05 2017 +0100 MIPS: Return directly in 32_mmap2() * Return a failure indication without storing it in an intermediate variable. * Delete the local variable "error" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Cc: Paul Gortmaker Cc: linux-mips@linux-mips.org Cc: LKML Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15071/ Signed-off-by: Ralf Baechle arch/mips/kernel/linux32.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 42b76a1d6dfede2a412567d37bd0df0cfac99adf Author: Arnd Bergmann Date: Tue Jan 17 16:18:47 2017 +0100 MIPS: Avoid old-style declaration gcc warns about nonstandard declarations: arch/mips/sgi-ip32/ip32-irq.c:31:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] arch/mips/sgi-ip32/ip32-irq.c:36:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] arch/mips/sgi-ip27/ip27-klnuma.c: In function 'replicate_kernel_text': arch/mips/sgi-ip27/ip27-klnuma.c:85:116: error: old-style function definition [-Werror=old-style-definition] Moving 'inline' before the return type, and adding argument types shuts up the warning here. This patch affects several platforms, but all in a trivial way. I'm fixing up all instances I found in any of the 'defconfig' builds. Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15050/ Signed-off-by: Ralf Baechle arch/mips/emma/markeins/setup.c | 2 +- arch/mips/netlogic/xlp/wakeup.c | 2 +- arch/mips/sgi-ip27/ip27-klnuma.c | 2 +- arch/mips/sgi-ip32/ip32-irq.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 23ca9b522383d3b9b7991d8586db30118992af4a Author: Arnd Bergmann Date: Tue Jan 17 16:18:46 2017 +0100 MIPS: ip22: Fix ip28 build for modern gcc kernelci reports a failure of the ip28_defconfig build after upgrading its gcc version: arch/mips/sgi-ip22/Platform:29: *** gcc doesn't support needed option -mr10k-cache-barrier=store. Stop. The problem apparently is that the -mr10k-cache-barrier=store option is now rejected for CPUs other than r10k. Explicitly including the CPU in the check fixes this and is safe because both options were introduced in gcc-4.4. Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15049/ Signed-off-by: Ralf Baechle arch/mips/sgi-ip22/Platform | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9663b13c81b6d2ee8bb529e565d2e3ceeb2c84d Author: Arnd Bergmann Date: Tue Jan 17 16:18:45 2017 +0100 MIPS: Octeon: Avoid empty-body warning gcc-6 reports a harmless build warning: arch/mips/cavium-octeon/dma-octeon.c: In function 'octeon_dma_alloc_coherent': arch/mips/cavium-octeon/dma-octeon.c:179:3: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] We can fix this by rearranging the code slightly using the IS_ENABLED() macro. Signed-off-by: Arnd Bergmann Cc: Hans-Christian Noren Egtvedt Cc: Vineet Gupta Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15048 Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/dma-octeon.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 72d1cfc924f8cb7cf51732262b627da1205b34e1 Author: Arnd Bergmann Date: Tue Jan 17 16:18:44 2017 +0100 MIPS: Loongson64: Fix empty-body warning in dma_alloc A new gcc warning shows up for this old code with gcc-6: arch/mips/loongson64/common/dma-swiotlb.c: In function 'loongson_dma_alloc_coherent': arch/mips/loongson64/common/dma-swiotlb.c:35:2: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] The code can be easily restructured to look more readable and avoid the warning at the same time. Signed-off-by: Arnd Bergmann Cc: Robin Murphy Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15047/ Signed-off-by: Ralf Baechle arch/mips/loongson64/common/dma-swiotlb.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 886f9c69fc68f56ddea34d3de51ac1fc2ac8dfbc Author: Arnd Bergmann Date: Tue Jan 17 16:18:43 2017 +0100 MIPS: ralink: Remove unused rt*_wdt_reset functions All pointers to these functions were removed, so now they produce warnings: arch/mips/ralink/rt305x.c:92:13: error: 'rt305x_wdt_reset' defined but not used [-Werror=unused-function] This removes the functions. If we need them again, the patch can be reverted later. Fixes: f576fb6a0700 ("MIPS: ralink: cleanup the soc specific pinmux data") Signed-off-by: Arnd Bergmann Cc: John Crispin Cc: Colin Ian King Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15044/ Signed-off-by: Ralf Baechle arch/mips/ralink/rt288x.c | 10 ---------- arch/mips/ralink/rt305x.c | 11 ----------- arch/mips/ralink/rt3883.c | 10 ---------- 3 files changed, 31 deletions(-) commit 6d2700a95f7387f389d320ef87f33b7661fc1af5 Author: Arnd Bergmann Date: Tue Jan 17 16:18:42 2017 +0100 MIPS: ralink: Fix request_mem_region error handling request_mem_region returns a NULL pointer on error, comparing it against a number results in a warning: arch/mips/ralink/of.c: In function 'plat_of_remap_node': arch/mips/ralink/of.c:45:15: error: ordered comparison of pointer with integer zero [-Werror=extra] arch/mips/ralink/irq.c: In function 'intc_of_init': arch/mips/ralink/irq.c:167:15: error: ordered comparison of pointer with integer zero [-Werror=extra] Signed-off-by: Arnd Bergmann Cc: John Crispin Cc: Tobias Wolf Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15045/ Signed-off-by: Ralf Baechle arch/mips/ralink/irq.c | 4 ++-- arch/mips/ralink/of.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit d92240d12a9c010e0094bbc9280aae4a6be9a2d5 Author: Arnd Bergmann Date: Tue Jan 17 16:18:41 2017 +0100 MIPS: ralink: Remove unused timer functions The functions were originally used for the module unload path, but are not referenced any more and just cause warnings: arch/mips/ralink/timer.c:104:13: error: 'rt_timer_disable' defined but not used [-Werror=unused-function] arch/mips/ralink/timer.c:74:13: error: 'rt_timer_free' defined but not used [-Werror=unused-function] Cc: Paul Gortmaker Fixes: 62ee73d284e7 ("MIPS: ralink: Make timer explicitly non-modular") Signed-off-by: Arnd Bergmann Cc: Paul Gortmaker Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15041/ Signed-off-by: Ralf Baechle arch/mips/ralink/timer.c | 14 -------------- 1 file changed, 14 deletions(-) commit 98ea51cb0c8ce009d9da1fd7b48f0ff1d7a9bbb0 Author: Arnd Bergmann Date: Tue Jan 17 16:18:40 2017 +0100 MIPS: Lantiq: Fix another request_mem_region() return code check Hauke already fixed a couple of them, but one instance remains that checks for a negative integer when it should check for a NULL pointer: arch/mips/lantiq/xway/sysctrl.c: In function 'ltq_soc_init': arch/mips/lantiq/xway/sysctrl.c:473:19: error: ordered comparison of pointer with integer zero [-Werror=extra] Fixes: 6e807852676a ("MIPS: Lantiq: Fix check for return value of request_mem_region()") Signed-off-by: Arnd Bergmann Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15043/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/sysctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e45587293c6939f7e64b7cd75be41c3a2a6cd1dc Author: Arnd Bergmann Date: Tue Jan 17 16:18:39 2017 +0100 MIPS: Alchemy: Remove duplicate initializer We get a harmless warning about a duplicate initalizer for the i2c board info structure: arch/mips/alchemy/board-gpr.c:239:11: error: initialized field overwritten [-Werror=override-init] As both initializers have the identical value, we can simply drop the second one. Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15046/ Signed-off-by: Ralf Baechle arch/mips/alchemy/board-gpr.c | 1 - 1 file changed, 1 deletion(-) commit 8c9b23ffb3f92ffa4cbe37b1bab4542586e0bfd1 Author: Arnd Bergmann Date: Tue Jan 17 16:18:37 2017 +0100 MIPS: 'make -s' should be silent A clean mips64 build produces no output except for two lines: Checking missing-syscalls for N32 Checking missing-syscalls for O32 On other architectures, there is no output at all, so let's do the same here for the sake of build testing. The 'kecho' macro is used to print the message on a normal build but skip it with 'make -s'. Fixes: e48ce6b8df5b ("[MIPS] Simplify missing-syscalls for N32 and O32") Signed-off-by: Arnd Bergmann Cc: Paul Burton Cc: Matt Redfearn Cc: Huacai Chen Cc: Maarten ter Huurne Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15040/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1742ac265046f34223e06d5d283496f0291be259 Author: Arnd Bergmann Date: Tue Jan 17 16:18:36 2017 +0100 MIPS: VDSO: avoid duplicate CAC_BASE definition vdso.h includes implicitly after defining CONFIG_32BITS. This defeats the override in mach-ip27/spaces.h, leading to a build error that shows up in kernelci.org: In file included from arch/mips/include/asm/mach-ip27/spaces.h:29:0, from arch/mips/include/asm/page.h:12, from arch/mips/vdso/vdso.h:26, from arch/mips/vdso/gettimeofday.c:11: arch/mips/include/asm/mach-generic/spaces.h:28:0: error: "CAC_BASE" redefined [-Werror] #define CAC_BASE _AC(0x80000000, UL) An earlier patch tried to make the second definition conditional, but that patch had the #ifdef in the wrong place, and would lead to another warning: arch/mips/include/asm/io.h: In function 'phys_to_virt': arch/mips/include/asm/io.h:138:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] For all I can tell, there is no other reason than vdso32 to ever include this file with CONFIG_32BITS set, and the vdso itself should never refer to the base addresses as it is running in user space, so adding an #ifdef here is safe. Link: https://patchwork.kernel.org/patch/9418187/ Fixes: 3ffc17d8768b ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0") Signed-off-by: Arnd Bergmann Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15039/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ip27/spaces.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5ff5ce6e20ee22511398bb31fb912466cf82a36 Author: Michael Kerrisk (man-pages) Date: Wed Jan 25 14:03:36 2017 +1300 nsfs: Add an ioctl() to return the namespace type Linux 4.9 added two ioctl() operations that can be used to discover: * the parental relationships for hierarchical namespaces (user and PID) [NS_GET_PARENT] * the user namespaces that owns a specified non-user-namespace [NS_GET_USERNS] For no good reason that I can glean, NS_GET_USERNS was made synonymous with NS_GET_PARENT for user namespaces. It might have been better if NS_GET_USERNS had returned an error if the supplied file descriptor referred to a user namespace, since it suggests that the caller may be confused. More particularly, if it had generated an error, then I wouldn't need the new ioctl() operation proposed here. (On the other hand, what I propose here may be more generally useful.) I would like to write code that discovers namespace relationships for the purpose of understanding the namespace setup on a running system. In particular, given a file descriptor (or pathname) for a namespace, N, I'd like to obtain the corresponding user namespace. Namespace N might be a user namespace (in which case my code would just use N) or a non-user namespace (in which case my code will use NS_GET_USERNS to get the user namespace associated with N). The problem is that there is no way to tell the difference by looking at the file descriptor (and if I try to use NS_GET_USERNS on an N that is a user namespace, I get the parent user namespace of N, which is not what I want). This patch therefore adds a new ioctl(), NS_GET_NSTYPE, which, given a file descriptor that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk Signed-off-by: Eric W. Biederman fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) commit 264e6777f958d2b7b05619c65f89a1eaf5b4709e Merge: f2ceab0 1130383 Author: David S. Miller Date: Tue Jan 24 16:29:02 2017 -0500 Merge branch 'netvsc-enhancements' Stephen Hemminger says: ==================== netvsc driver enhancements for net-next Lots of little things in here. Support for minor more ethtool control, negotiation of offload parameters with host (based on FreeBSD) and several cleanups. ==================== Signed-off-by: David S. Miller commit 1130383c174499826a3f01486e574e89be17e2d2 Author: stephen hemminger Date: Tue Jan 24 13:06:15 2017 -0800 netvsc: call netif_receive_skb To improve performance, netvsc can call network stack directly and avoid the local backlog queue. This is safe since incoming packets are handled in softirq context already because the receive function callback is called from a tasklet. 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 b58a185801dab4eefccad868c466296795c5bae7 Author: stephen hemminger Date: Tue Jan 24 13:06:14 2017 -0800 netvsc: simplify get next send section Use kernel for_each_clear_bit macro to simplify finding next available send section. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 6c80f3fc2398aef22798e8ac4258454b1062f3fb Author: Simon Xiao Date: Tue Jan 24 13:06:13 2017 -0800 netvsc: report per-channel stats in ethtool statistics Report packets and bytes transferred through a vmbus channel via ethtool. This supersedes need for per-cpu statistics. Example: $ ethtool -S eth0 NIC statistics: ... tx_queue_0_packets: 3523179 tx_queue_0_bytes: 505370920 rx_queue_0_packets: 41430490 rx_queue_0_bytes: 62714661254 tx_queue_1_packets: 0 tx_queue_1_bytes: 0 rx_queue_1_packets: 0 rx_queue_1_bytes: 0 ... Reviewed-by: Long Li Reviewed-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang Signed-off-by: Simon Xiao Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 5 +- drivers/net/hyperv/netvsc.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 143 +++++++++++++++++++++++++--------------- 3 files changed, 93 insertions(+), 57 deletions(-) commit 793e39555511bccd73308c41205b72448d0077db Author: stephen hemminger Date: Tue Jan 24 13:06:12 2017 -0800 netvsc: account for packets/bytes transmitted after completion Most drivers do not increment transmit statistics until after the transmit is completed. This will also be necessary for BQL support. Slight additional complexity because the netvsc driver aggregates multiple packets into one transmit. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 4 +++- drivers/net/hyperv/netvsc.c | 19 ++++++++++++++++--- drivers/net/hyperv/netvsc_drv.c | 13 +++---------- 3 files changed, 22 insertions(+), 14 deletions(-) commit 46b4f7f5d1f7410de48128540ef2d1aab913a619 Author: stephen hemminger Date: Tue Jan 24 13:06:11 2017 -0800 netvsc: eliminate per-device outstanding send counter Since now keep track of per-queue outstanding sends, we can avoid one atomic update by removing no longer needed per-device atomic. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 - drivers/net/hyperv/netvsc.c | 44 ++++++++++++++------------------------- drivers/net/hyperv/rndis_filter.c | 21 ++++++++++++++++--- 3 files changed, 34 insertions(+), 32 deletions(-) commit 2289f0aa706e5160e078f73c32fcbfb56a3ff1e2 Author: stephen hemminger Date: Tue Jan 24 13:06:10 2017 -0800 netvsc: simplify rndis_filter_remove All caller's already have pointer to netvsc_device so pass it. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 ++- drivers/net/hyperv/netvsc_drv.c | 8 ++++---- drivers/net/hyperv/rndis_filter.c | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) commit 2c7f83ca713fa0ac5c4698e4134b09a355f60263 Author: stephen hemminger Date: Tue Jan 24 13:06:09 2017 -0800 netvsc: don't pass void * to internal device_add All the caller's/callee's know that the format of the device_add parameter is a netvsc_device_info struct. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 5 +++-- drivers/net/hyperv/netvsc.c | 6 +++--- drivers/net/hyperv/rndis_filter.c | 5 ++--- 3 files changed, 8 insertions(+), 8 deletions(-) commit dc54a08cd3620e6457382c0cd0c8f03513dd749a Author: stephen hemminger Date: Tue Jan 24 13:06:08 2017 -0800 netvsc: optimize receive path Do manual optimizations of receive path: - remove checks for impossible conditions (but keep checks for bad data from host) - pass argument down, rather than having callee recompute what is already known - remove indirection about receive buffer datalength - remove dependence on VLAN_TAG_PRESENCE - use _hot/_cold and likely/unlikely Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 21 +++++---- drivers/net/hyperv/netvsc.c | 74 ++++++++++++----------------- drivers/net/hyperv/netvsc_drv.c | 32 ++++++------- drivers/net/hyperv/rndis_filter.c | 99 +++++++++++++++------------------------ 4 files changed, 93 insertions(+), 133 deletions(-) commit b8b835a89b2f7a7fe681983dfe5c489cb9ad9500 Author: stephen hemminger Date: Tue Jan 24 13:06:07 2017 -0800 netvsc: group all per-channel state together Put all the per-channel state together in one data struct. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 14 +++++--- drivers/net/hyperv/netvsc.c | 73 +++++++++++++++++++-------------------- drivers/net/hyperv/netvsc_drv.c | 5 ++- drivers/net/hyperv/rndis_filter.c | 6 ++-- 4 files changed, 51 insertions(+), 47 deletions(-) commit ceaaea0483cf82a2c817781f3cbacf29f2c5cc97 Author: stephen hemminger Date: Tue Jan 24 13:06:06 2017 -0800 netvsc: remove unused variables Fixes set but never used warnings Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ---- drivers/net/hyperv/rndis_filter.c | 3 --- 2 files changed, 7 deletions(-) commit d8e18ee0fa9679e24aa1dacb1edc7bf934c8ddd4 Author: stephen hemminger Date: Tue Jan 24 13:06:05 2017 -0800 netvsc: enhance transmit select_queue The netvsc select queue function was missing many of the flow caching features that exist in default tx queue selection. Add the same logic to remember queue based on socket and implement two level mapping (like RSS). Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit ff4a44199012ee32839278cb84f82ae32c01dbc9 Author: stephen hemminger Date: Tue Jan 24 13:06:04 2017 -0800 netvsc: allow get/set of RSS indirection table Allow setting receive indirection table. Also uses the system standard for initialization. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc_drv.c | 26 +++++++++++++++++++++++--- drivers/net/hyperv/rndis_filter.c | 9 +++++++-- 3 files changed, 31 insertions(+), 5 deletions(-) commit 2b01888d1b453096b5b13c0d4b73e630411198b4 Author: stephen hemminger Date: Tue Jan 24 13:06:03 2017 -0800 netvsc: allow more flexible setting of number of channels This allows for number of channels to be managed in a manner similar to existing hardware drivers. It also removes the restriction of maximum 8 channels and allows as many as the host will allow. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc_drv.c | 128 +++++++++++++++------------------------- 2 files changed, 50 insertions(+), 79 deletions(-) commit 962f3fee83a4ef9010ae84dc43ae7aecb572e2a9 Author: stephen hemminger Date: Tue Jan 24 13:06:02 2017 -0800 netvsc: add ethtool ops to get/set RSS key For some cases it is useful to be able to change RSS key value. For example, replacing RSS key with a symmetric hash. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 7 +++++- drivers/net/hyperv/netvsc_drv.c | 46 +++++++++++++++++++++++++++++++++++++++ drivers/net/hyperv/rndis_filter.c | 34 +++++++++++++++-------------- 3 files changed, 70 insertions(+), 17 deletions(-) commit b5a5dc8dc8ac311c5ee1cf7fa4c6ef2f4e1743b6 Author: stephen hemminger Date: Tue Jan 24 13:06:01 2017 -0800 netvsc: report rss field values Report current components used in RSS hash. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b448f4e89272ba26a73f28b0b3dd93e749b30c86 Author: stephen hemminger Date: Tue Jan 24 13:06:00 2017 -0800 netvsc: report number of rx queues in ethtool Report actual number of receive queues to ethtool. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 23312a3be999c22ec70c0fdf9f01cdee05fac986 Author: stephen hemminger Date: Tue Jan 24 13:05:59 2017 -0800 netvsc: negotiate checksum and segmentation parameters Redo how Hyper-V network driver negotiates offload features. Query the host to determine offload settings, and use the result. Also: * disable IPv4 header checksum offload (not used by Linux) * enable TSO only if host supports * enable UDP checksum offload if supported * don't advertise support for checksumming of non-IP protocols * adjust GSO maximum segment size * enable HIGHDMA Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 149 +++++++++++++++++++++++++++++++++++--- drivers/net/hyperv/netvsc_drv.c | 92 ++++++++++------------- drivers/net/hyperv/rndis_filter.c | 140 +++++++++++++++++++++++++++++++---- 3 files changed, 305 insertions(+), 76 deletions(-) commit 0b307ebd6834012c483b8ee9801164123a54f79a Author: stephen hemminger Date: Tue Jan 24 13:05:58 2017 -0800 netvsc: remove no longer needed receive staging buffers The ring buffer mapping now handles the wraparound case inside get_next_pkt_raw. Therefore it is not necessary to have an additional special receive staging buffer. See commit 1562edaed8c164ca5199 ("Drivers: hv: ring_buffer: count on wrap around mappings") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 5 --- drivers/net/hyperv/netvsc.c | 83 ++++++--------------------------------- drivers/net/hyperv/rndis_filter.c | 11 ------ 3 files changed, 11 insertions(+), 88 deletions(-) commit 5c37077fd025c0fa3aa3ab2e6b607d653a4fc604 Author: Zhu Yanjun Date: Wed Jan 18 23:16:06 2017 -0500 IB/ipoib: Remove the unnecessary error check The function ipoib_mcast_start_thread/ipoib_ib_dev_up always return zero. As such, in the function ipoib_open, err_stop will never be reached. So remove this err_stop and change the return type of the function ipoib_mcast_start_thread/ipoib_ib_dev_up to void. Signed-off-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 +++--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 +----- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 4 +--- 4 files changed, 7 insertions(+), 13 deletions(-) commit 3f9fade5e77da67f618ac766ce1a6ded1679fb1a Author: Shiraz Saleem Date: Wed Jan 18 11:48:29 2017 -0600 i40iw: Set maj_err and min_err in i40iw_sc_cqp_create Set maj_err and min_err in i40iw_sc_cqp_create so that it returns correct values for all return cases. This also addresses an uninitialized variable warning for maj_err and min_err in i40iw_create_cqp. Reported-by: Dan Carpenter Reported-by: Yuval Shaia Signed-off-by: Shiraz Saleem Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 +++ 1 file changed, 3 insertions(+) commit 564649b4ea862588be41da4ae2b96b41208b57be Author: Leon Romanovsky Date: Wed Jan 18 07:57:58 2017 +0200 IB/qib: Remove empty function Commit f06267104dd9 ("RDMA: Update workqueue usage") removed content of qib_qsfp_deinit(...) and left it empty. This patch deletes all leftovers of that function. Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 1 - drivers/infiniband/hw/qib/qib_qsfp.c | 10 ---------- drivers/infiniband/hw/qib/qib_qsfp.h | 1 - 3 files changed, 12 deletions(-) commit 21d6454a392d552c7e845f39884f7cf86f9426b9 Author: Jack Wang Date: Tue Jan 17 10:11:12 2017 +0100 RDMA/core: create struct ib_port_cache As Jason suggested, we have 4 elements for per port arrays, it's better to have a separate structure to represent them. It simplifies code a bit, ~ 30 lines of code less :) Signed-off-by: Jack Wang Reviewed-by: Michael Wang Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 134 +++++++++++++++------------------------- include/rdma/ib_verbs.h | 12 ++-- 2 files changed, 59 insertions(+), 87 deletions(-) commit dfc0e5550664a727a59921db7d9e7a41c21d03bb Author: Zhu Yanjun Date: Thu Jan 12 02:39:01 2017 -0500 IB/ipoib: function interface change The ipoib_ib_dev_down/ipoib_ib_dev_stop return zero unconditionally and the callers never check the returned values, change the return type to void and remove the redundant return values. Reviewed-by: Shan Hai Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) commit 820cd30ac2ad28fcfeb28f382aa21a29e921678a Author: Dan Carpenter Date: Mon Jan 9 23:12:16 2017 +0300 i40iw: fix some indenting in i40iw_sc_vsi_init() The debug printk was indented more than it should have been and we can remove an unnecessary line break. Signed-off-by: Dan Carpenter Acked-by: Shiraz Saleem Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19b752a19dcec188f404a070f4d4c33607ea493b Author: Moni Shoua Date: Thu Jan 5 16:16:36 2017 +0200 IB/cma: Allow port reuse for rdma_id When allocating a port number for binding to a rdma_id, assuming the allocation is not for a specific port, the rule is to allow only ports that were not in use before by any other rdma_id. This condition is too strong to achieve the goal of a unique 5 tuple rdma_id. Instead, we can compare current rdma_id with other rdma_id for difference in one of destination port, source address and destination address to allow port reuse. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 67 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 7 deletions(-) commit 498683c6a7eec5e6ca4f8371d92061618f0827bc Author: Moni Shoua Date: Thu Jan 5 16:16:35 2017 +0200 IB/cma: Add debug messages to error flows Print debug messages to the kernel log to add more information about RDMA_CM events that indicate an error. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 2 ++ drivers/infiniband/core/cma.c | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) commit f7534f45dcbc1a2ecb486b019db0443188e957d6 Author: Zhu Yanjun Date: Thu Jan 5 03:56:08 2017 -0500 IB/ipoib: Remove unnecessary returned value check In the function ipoib_set_dev_features, the returned value is always 0. As such, it is not necessary to check the returned value. This is not a bug. It is a trivial problem. Reviewed-by: Guanglei Li Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++------ drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-) commit 506f71d1811aaf2d6a6c0bd132ceba29f5c14f3e Author: Colin Ian King Date: Fri Dec 30 14:38:05 2016 +0000 IB/isert: fix spelling mistake: "teminating" -> "terminating" Trivial fix to spelling mistake in isert_warn message Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/isert/ib_isert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f719315b52b56c34d31c51c1926cea33a89cc9af Author: Bhumika Goyal Date: Tue Jan 24 10:33:55 2017 -0800 Input: constify device_type structures Declare device_type structures as const as they are only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structures. File size before: text data bss dec hex filename 17184 1344 80 18608 48b0 drivers/input/input.o File size after: text data bss dec hex filename 17248 1280 80 18608 48b0 drivers/input/input.o File size before: text data bss dec hex filename 2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.o File size after: text data bss dec hex filename 2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.o Signed-off-by: Bhumika Goyal Signed-off-by: Dmitry Torokhov drivers/input/input.c | 2 +- drivers/input/rmi4/rmi_bus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0cce284537fb42d9c28b9b31038ffc9b464555f5 Merge: cefb26d 7a308bb Author: Dmitry Torokhov Date: Tue Jan 24 12:37:43 2017 -0800 Merge tag 'v4.10-rc5' into next Sync up with mainline to bring up improvements in various subsystems. commit f2ceab0bafb97ec4cf895fda31fa2e0b1657870e Merge: 1464086 c61a6a7 Author: David S. Miller Date: Tue Jan 24 15:33:52 2017 -0500 Merge branch 'mv88e6xxx-external-MDIO' Andrew Lunn says: ==================== External MDIO support for mv88e6xxx The mv88e6390 family of switches has two MDIO busses, one internal to the switch and a second one for external usage. Older generations of switches have a single MDIO bus, which is used both internally and externally. Refactor the existing MDIO driver code to allow for multiple MDIO busses, and implement the second MDIO bus on mv88e6390. This is a rewrite of a patch previously submitted as part of "Batch 3". It has been broken up into 5 smaller patches. A compatible string is now used in the device tree to indicate the external MDIO bus. ==================== Signed-off-by: David S. Miller commit c61a6a71e7a48ff3a8714a93b9d4f6caa67990b1 Author: Andrew Lunn Date: Tue Jan 24 14:53:51 2017 +0100 net: dsa: mv88e6xxx: Implement the 6390 external MDIO bus With all the infrastructure in place, implement access to the external MDIO bus on the 6390 family. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 8 ++++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 2 files changed, 9 insertions(+) commit a3c53be55c955b7150cda17874c3fcb4eeb97a89 Author: Andrew Lunn Date: Tue Jan 24 14:53:50 2017 +0100 net: dsa: mv88e6xxx: Support multiple MDIO busses The mv88e6390 has multiple MDIO busses. Generalize the parsing of the device tree to support multiple mdio nodes. The external mdio bus has a compatible strings to indicate it is external. Keep a linked list of busses, placing the external mdio bus at the tail of the list. When within the driver an mdio bus is needed, e.g. for EEE or SERDES, use the head of the list which should be the internal bus. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/marvell.txt | 41 +++++++- drivers/net/dsa/mv88e6xxx/chip.c | 110 +++++++++++++++------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 10 +- 3 files changed, 126 insertions(+), 35 deletions(-) commit 0dd12d54c4252e5a51f3b9f7b622b3b7a5b95293 Author: Andrew Lunn Date: Tue Jan 24 14:53:49 2017 +0100 net: dsa: mv88e6xxx: Add mdio private structure Have the MDIO bus driver code allocate a private structure and make the chip a member of it. This will allow us to add further members in the future. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 4 ++++ 2 files changed, 13 insertions(+), 4 deletions(-) commit ee26a2284b3d1ab0fb6c183d1cca7a85a05c82e0 Author: Andrew Lunn Date: Tue Jan 24 14:53:48 2017 +0100 net: dsa: mv88e6xxx: Pass mii_bus to all PHY operations In preparation for supporting multiple MDIO busses, pass the mii_bus structure to all PHY operations. It will in future then be clear on which MDIO bus the operation should be performed. For reads/write from phylib, the mii_bus is readily available. However some internal code also access the PHY, e.g. for EEE and SERDES. Make this code use the one and only currently available MDIO bus. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 42 +++++++++++++++++++++++++---------- drivers/net/dsa/mv88e6xxx/global2.c | 10 +++++---- drivers/net/dsa/mv88e6xxx/global2.h | 12 ++++++---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 10 +++++---- 4 files changed, 50 insertions(+), 24 deletions(-) commit efb3e74da2e1818565a9ffc5ec55d9e7bda17e8e Author: Andrew Lunn Date: Tue Jan 24 14:53:47 2017 +0100 net: dsa: mv88e6xxx: Abstract mv88e6165 PHY operations The mv88e6165 family has the internal PHYs mapped directly onto the SMI register space as the switch. So the registers can be read directly. Put a wrapper around this, in preparation for changing the signature in order to support the external MDIO bus of the 6390. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 146408693945a68f227175c1cea3772fc0f98f20 Author: Colin Ian King Date: Tue Jan 24 09:25:54 2017 +0000 net: sctp: fix array overrun read on sctp_timer_tbl Table sctp_timer_tbl is missing a TIMEOUT_RECONF string so add this in. Also compare timeout with the size of the array sctp_timer_tbl rather than SCTP_EVENT_TIMEOUT_MAX. Also add a build time check that SCTP_EVENT_TIMEOUT_MAX is correct so we don't ever get this kind of mismatch between the table and SCTP_EVENT_TIMEOUT_MAX in the future. Kudos to Marcelo Ricardo Leitner for spotting the missing string and suggesting the build time sanity check. Fixes CoverityScan CID#1397639 ("Out-of-bounds read") Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer") Signed-off-by: Colin Ian King Acked-by: Neil Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7110fe471efb0160f89dbcb58251bd69842ceba1 Merge: 82272db aa13f7c Author: David S. Miller Date: Tue Jan 24 15:03:42 2017 -0500 Merge branch 'aquantia' David VomLehn says: ==================== net: ethernet: aquantia: Add AQtion 2.5/5 GB NIC driver This series introduces the AQtion NIC driver for the aQuantia AQC107/AQC108 network devices. v1: Initial version v2: o Make necessary drivers/net/ethernet changes to integrate software o Drop intermediate atlantic directory o Remove Makefile things only appropriate to out of tree module building v3: o Move changes to drivers/net/ethernet/{Kconfig,Makefile} to the last patch to ensure clean bisection. o Removed inline attribute aq_hw_write_req() as it was defined in only one .c file. o #included pci.h in aq_common.h to get struct pci definition. o Modified code to unlock based execution flow rather than using a flag. o Made a number of functions that were only used in a single file static. o Cleaned up error and return code handling in various places. o Remove AQ_CFG_IP_ALIGN definition. o Other minor code clean up. v4: o Using do_div for 64 bit division. o Modified NIC statistics code. o Using build_skb instead netdev_alloc_skb for single fragment packets. o Removed extra aq_nic.o from Makefile v5: o Removed extra newline at the end of the files. v6: o Removed unnecessary cast from void*. o Reworked strings array for ethtool statistics. o Added stringset == ETH_SS_STATS checking. o AQ_OBJ_HEADER replaced to aq_obj_header_s struct. o AQ_OBJ_SET/TST/CLR macroses replaced to inline functions. o Driver sources placed in to atlantic directory. o Fixed compilation warnings (Make W=1) o Added firmware version checking. o Code cleaning. v7 o Removed unnecessary cast from memory allocation function (aq_ring.c). v8 o Switched to using kcalloc instead kzalloc. o Now provide bus_info for ethtool o Used div() to avoid __bad_udelay build error. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: David M. VomLehn ==================== Signed-off-by: David S. Miller commit aa13f7cedd9f2813acb83db98bbd3041dfa1e8fa Author: David VomLehn Date: Mon Jan 23 22:09:20 2017 -0800 net: ethernet: aquantia: Integrate AQtion 2.5/5 GB NIC driver Modify the drivers/net/ethernet/{Makefile,Kconfig} file to make them a part of the network drivers build. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + 2 files changed, 2 insertions(+) commit ee6d6d0055449c6d9d5fcce6e72614d6eaa18c01 Author: David VomLehn Date: Mon Jan 23 22:09:19 2017 -0800 net: ethernet: aquantia: Receive side scaling Add definitions that support receive side scaling. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_rss.h | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit c5760d03d4ebd12f1b2d6723aec4b45327a1d2eb Author: David VomLehn Date: Mon Jan 23 22:09:18 2017 -0800 net: ethernet: aquantia: Ethtool support Add the driver interfaces required for support by the ethtool utility. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 261 +++++++++++++++++++++ .../net/ethernet/aquantia/atlantic/aq_ethtool.h | 19 ++ 2 files changed, 280 insertions(+) commit 753f4783be7b60b2c936c6985ddf42f8ce268ad9 Author: David VomLehn Date: Mon Jan 23 22:09:17 2017 -0800 net: ethernet: aquantia: Hardware interface and utility functions Add functions to interface with the hardware and some utility functions. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 177 +++++++++++++++++++++ .../net/ethernet/aquantia/atlantic/aq_hw_utils.c | 68 ++++++++ .../net/ethernet/aquantia/atlantic/aq_hw_utils.h | 47 ++++++ 3 files changed, 292 insertions(+) commit 98c4c20142e985faeb693d8546e53d2ff7eebe26 Author: David VomLehn Date: Mon Jan 23 22:09:16 2017 -0800 net: ethernet: aquantia: Atlantic hardware abstraction layer Add common functions for Atlantic hardware abstraction layer. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 570 +++++++++++++++++++++ .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 210 ++++++++ 2 files changed, 780 insertions(+) commit a4d36e20d035140bbc26d04595cdd4ea2913cfcc Author: David VomLehn Date: Mon Jan 23 22:09:15 2017 -0800 net: ethernet: aquantia: PCI operations Add functions that handle the PCI bus interface. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/aq_pci_func.c | 345 +++++++++++++++++++++ .../net/ethernet/aquantia/atlantic/aq_pci_func.h | 34 ++ 2 files changed, 379 insertions(+) commit 970a2e9864b0ba45f639aebf464a5edcaabb5be0 Author: David VomLehn Date: Mon Jan 23 22:09:14 2017 -0800 net: ethernet: aquantia: Vector operations Add functions to manululate the vector of receive and transmit rings. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel.Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 392 ++++++++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/aq_vec.h | 42 +++ 2 files changed, 434 insertions(+) commit bab6de8fd180bc284e3c191e59ceccf9a5ed14be Author: David VomLehn Date: Mon Jan 23 22:09:13 2017 -0800 net: ethernet: aquantia: Atlantic A0 and B0 specific functions. Add Atlantic A0 and B0 specific functions. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 905 +++++++++++++++++++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.h | 34 + .../aquantia/atlantic/hw_atl/hw_atl_a0_internal.h | 155 ++++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 958 +++++++++++++++++++++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.h | 34 + .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 207 +++++ 6 files changed, 2293 insertions(+) commit 97bde5c4f909a55ab4c36cf0ac9094f6c9e4cdf6 Author: David VomLehn Date: Mon Jan 23 22:09:12 2017 -0800 net: ethernet: aquantia: Support for NIC-specific code Add support for code specific to the Atlantic NIC. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 273 ++++++ drivers/net/ethernet/aquantia/atlantic/aq_main.h | 17 + drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 937 +++++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 108 +++ .../ethernet/aquantia/atlantic/aq_nic_internal.h | 46 + 5 files changed, 1381 insertions(+) commit ef8115356aeef87969124d3bfe92daed7c137666 Author: David VomLehn Date: Mon Jan 23 22:09:11 2017 -0800 net: ethernet: aquantia: Low-level hardware interfaces Add definitions of functions that interface directly with the hardware. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel.Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 1394 ++++++++++++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h | 677 ++++++ .../aquantia/atlantic/hw_atl/hw_atl_llh_internal.h | 2375 ++++++++++++++++++++ 3 files changed, 4446 insertions(+) commit 018423e90bee8978105eaaa265a26e70637f9f1e Author: David VomLehn Date: Mon Jan 23 22:09:10 2017 -0800 net: ethernet: aquantia: Add ring support code Add code to support the transmit and receive ring buffers. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 376 +++++++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 157 ++++++++++ 2 files changed, 533 insertions(+) commit 3a35780f31679724732738a7eb94f78bb97e0f0c Author: David VomLehn Date: Mon Jan 23 22:09:09 2017 -0800 net: ethernet: aquantia: Common functions and definitions Add files containing the functions and definitions used in common in different functional areas. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 77 ++++++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/aq_common.h | 23 +++++++ drivers/net/ethernet/aquantia/atlantic/aq_utils.h | 50 ++++++++++++++ 3 files changed, 150 insertions(+) commit 5015024ddfe5efccf1b964f14f078c2152b3b335 Author: David VomLehn Date: Mon Jan 23 22:09:08 2017 -0800 net: ethernet: aquantia: Make and configuration files. Patches to create the make and configuration files. Signed-off-by: Alexander Loktionov Signed-off-by: Dmitrii Tarakanov Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: David M. VomLehn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/Kconfig | 24 ++++++++++++++ drivers/net/ethernet/aquantia/Makefile | 5 +++ drivers/net/ethernet/aquantia/atlantic/Makefile | 42 +++++++++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/ver.h | 18 +++++++++++ 4 files changed, 89 insertions(+) commit 82272db84d874ebe8b4ae24d4e64d770882dbdd1 Author: Florian Fainelli Date: Mon Jan 23 19:19:07 2017 -0800 net: dsa: Drop WARN() in tag_brcm.c We may be able to see invalid Broadcom tags when the hardware and drivers are misconfigured, or just while exercising the error path. Instead of flooding the console with messages, flat out drop the packet. 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 3ebe8344eb8a4214c09424bf8094025c8bf61823 Author: Stephen Boyd Date: Mon Jan 23 17:49:20 2017 -0800 net: ks8851: Drop eeprom_size structure member After commit 51b7b1c34e19 (KSZ8851-SNL: Add ethtool support for EEPROM via eeprom_93cx6, 2011-11-21) this structure member is unused. Delete it. Signed-off-by: Stephen Boyd Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8851.c | 7 ------- 1 file changed, 7 deletions(-) commit bef4e179b0854062509576bc805445815a29db0c Merge: 1870241 3fadc80 Author: David S. Miller Date: Tue Jan 24 14:46:07 2017 -0500 Merge branch 'bpf-misc' Daniel Borkmann says: ==================== Misc BPF improvements This series adds various misc improvements to BPF, f.e. allowing skb_load_bytes() helper to be used with filter/reuseport programs to facilitate programming, test cases for program tag, etc. For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit 3fadc80115837b86f989d17c4aa92bb5cb7bc1b6 Author: Daniel Borkmann Date: Tue Jan 24 01:06:30 2017 +0100 bpf: enable verifier to better track const alu ops William reported couple of issues in relation to direct packet access. Typical scheme is to check for data + [off] <= data_end, where [off] can be either immediate or coming from a tracked register that contains an immediate, depending on the branch, we can then access the data. However, in case of calculating [off] for either the mentioned test itself or for access after the test in a more "complex" way, then the verifier will stop tracking the CONST_IMM marked register and will mark it as UNKNOWN_VALUE one. Adding that UNKNOWN_VALUE typed register to a pkt() marked register, the verifier then bails out in check_packet_ptr_add() as it finds the registers imm value below 48. In the first below example, that is due to evaluate_reg_imm_alu() not handling right shifts and thus marking the register as UNKNOWN_VALUE via helper __mark_reg_unknown_value() that resets imm to 0. In the second case the same happens at the time when r4 is set to r4 &= r5, where it transitions to UNKNOWN_VALUE from evaluate_reg_imm_alu(). Later on r4 we shift right by 3 inside evaluate_reg_alu(), where the register's imm turns into 3. That is, for registers with type UNKNOWN_VALUE, imm of 0 means that we don't know what value the register has, and for imm > 0 it means that the value has [imm] upper zero bits. F.e. when shifting an UNKNOWN_VALUE register by 3 to the right, no matter what value it had, we know that the 3 upper most bits must be zero now. This is to make sure that ALU operations with unknown registers don't overflow. Meaning, once we know that we have more than 48 upper zero bits, or, in other words cannot go beyond 0xffff offset with ALU ops, such an addition will track the target register as a new pkt() register with a new id, but 0 offset and 0 range, so for that a new data/data_end test will be required. Is the source register a CONST_IMM one that is to be added to the pkt() register, or the source instruction is an add instruction with immediate value, then it will get added if it stays within max 0xffff bounds. >From there, pkt() type, can be accessed should reg->off + imm be within the access range of pkt(). [...] from 28 to 30: R0=imm1,min_value=1,max_value=1 R1=pkt(id=0,off=0,r=22) R2=pkt_end R3=imm144,min_value=144,max_value=144 R4=imm0,min_value=0,max_value=0 R5=inv48,min_value=2054,max_value=2054 R10=fp 30: (bf) r5 = r3 31: (07) r5 += 23 32: (77) r5 >>= 3 33: (bf) r6 = r1 34: (0f) r6 += r5 cannot add integer value with 0 upper zero bits to ptr_to_packet [...] from 52 to 80: R0=imm1,min_value=1,max_value=1 R1=pkt(id=0,off=0,r=34) R2=pkt_end R3=inv R4=imm272 R5=inv56,min_value=17,max_value=17 R6=pkt(id=0,off=26,r=34) R10=fp 80: (07) r4 += 71 81: (18) r5 = 0xfffffff8 83: (5f) r4 &= r5 84: (77) r4 >>= 3 85: (0f) r1 += r4 cannot add integer value with 3 upper zero bits to ptr_to_packet Thus to get above use-cases working, evaluate_reg_imm_alu() has been extended for further ALU ops. This is fine, because we only operate strictly within realm of CONST_IMM types, so here we don't care about overflows as they will happen in the simulated but also real execution and interaction with pkt() in check_packet_ptr_add() will check actual imm value once added to pkt(), but it's irrelevant before. With regards to 06c1c049721a ("bpf: allow helpers access to variable memory") that works on UNKNOWN_VALUE registers, the verifier becomes now a bit smarter as it can better resolve ALU ops, so we need to adapt two test cases there, as min/max bound tracking only becomes necessary when registers were spilled to stack. So while mask was set before to track upper bound for UNKNOWN_VALUE case, it's now resolved directly as CONST_IMM, and such contructs are only necessary when f.e. registers are spilled. For commit 6b17387307ba ("bpf: recognize 64bit immediate loads as consts") that initially enabled dw load tracking only for nfp jit/ analyzer, I did couple of tests on large, complex programs and we don't increase complexity badly (my tests were in ~3% range on avg). I've added a couple of tests similar to affected code above, and it works fine with verifier now. Reported-by: William Tu Signed-off-by: Daniel Borkmann Cc: Gianluca Borello Cc: William Tu Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 64 +++++++++++++++------- tools/testing/selftests/bpf/test_verifier.c | 82 +++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 19 deletions(-) commit 62b64660262ab512cb428c9dd6e5a5586a0beb53 Author: Daniel Borkmann Date: Tue Jan 24 01:06:29 2017 +0100 bpf: add prog tag test case to bpf selftests Add the test case used to compare the results from fdinfo with af_alg's output on the tag. Tests are from min to max sized programs, with and without maps included. # ./test_tag test_tag: OK (40945 tests) Tested on x86_64 and s390x. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/test_tag.c | 202 +++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+), 2 deletions(-) commit d1b662adcdb87944b7f6f7bd2f95cbb1404dbf18 Author: Daniel Borkmann Date: Tue Jan 24 01:06:28 2017 +0100 bpf: allow option for setting bpf_l4_csum_replace from scratch When programs need to calculate the csum from scratch for small UDP packets and use bpf_l4_csum_replace() to feed the result from helpers like bpf_csum_diff(), then we need a flag besides BPF_F_MARK_MANGLED_0 that would ignore the case of current csum being 0, and which would still allow for the helper to set the csum and transform when needed to CSUM_MANGLED_0. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 2492d3b867043f6880708d095a7a5d65debcfc32 Author: Daniel Borkmann Date: Tue Jan 24 01:06:27 2017 +0100 bpf: enable load bytes helper for filter/reuseport progs BPF_PROG_TYPE_SOCKET_FILTER are used in various facilities such as for SO_REUSEPORT and packet fanout demuxing, packet filtering, kcm, etc, and yet the only facility they can use is BPF_LD with {BPF_ABS, BPF_IND} for single byte/half/word access. Direct packet access is only restricted to tc programs right now, but we can still facilitate usage by allowing skb_load_bytes() helper added back then in 05c74e5e53f6 ("bpf: add bpf_skb_load_bytes helper") that calls skb_header_pointer() similarly to bpf_load_pointer(), but for stack buffers with larger access size. Name the previous sk_filter_func_proto() as bpf_base_func_proto() since this is used everywhere else as well, similarly for the ctx converter, that is, bpf_convert_ctx_access(). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 4faf940dd869c36436ff6f0a0b20369fdf5da68b Author: Daniel Borkmann Date: Tue Jan 24 01:06:26 2017 +0100 bpf: simplify __is_valid_access test on cb The __is_valid_access() test for cb[] from 62c7989b24db ("bpf: allow b/h/w/dw access for bpf's cb in ctx") was done unnecessarily complex, we can just simplify it the same way as recent fix from 2d071c643f1c ("bpf, trace: make ctx access checks more robust") did. Overflow can never happen as size is 1/2/4/8 depending on access. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit bab572f1d42dc79d366095fe939f012c59f603f4 Author: Ganesh Goudar Date: Fri Jan 20 12:32:01 2017 +0530 iw_cxgb4: Guard against null cm_id in dump_ep/qp Endpoints that are aborting can have already dereferenced the cm_id and set ep->com.cm_id to NULL. So guard against that in dump_ep() and dump_qp(). Also create a common function for setting up ip address pointers since the same logic is needed in several places. Reviewed-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 133 ++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 49 deletions(-) commit f57e8ca50e23b9e69b2d9f057ca07f9817daab09 Author: Yuval Shaia Date: Thu Jan 19 16:48:31 2017 +0200 IB/mad: Add port_num to error message Print the invalid port number to ease troubleshooting. Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Reviewed-by: Johannes Thumshirn Reviewed-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1dd70ea36077f320dadad120d1a611b9ce706ea5 Author: Yuval Shaia Date: Tue Jan 17 10:34:00 2017 +0200 IB/vmw_pvrdma: Remove unused qp_type Remove the unused qp_type parameter from function's args Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6c6e51a617df3ef6acdbdb550d61c70899e6033e Author: Yuval Shaia Date: Wed Jan 4 22:17:14 2017 +0200 IB/core: Fix typo in comment Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eb0249b4352c813f0a3c31b967f6cb4b9869a50 Author: Shaker Daibes Date: Sat Dec 10 18:45:55 2016 +0200 net/mlx5e: CQE compression control code reuse This patch is intended for code reuse of mlx5e_modify_rx_cqe_compression function. Signed-off-by: Shaker Daibes Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 7 +++++-- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 13 ++----------- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 ++------ 4 files changed, 10 insertions(+), 20 deletions(-) commit b4e029da29ce8244879b607fbf0514d1087dc3f5 Author: Kamal Heib Date: Tue Nov 22 11:03:32 2016 +0200 net/mlx5e: Reduce memory consumption on kdump kernel Reduce memory consumption on kdump kernel by decreasing the number of channels to 1 and the size of RQs and SQs to the minimal values. Signed-off-by: Kamal Heib Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 +------ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 ++++++++++++++++++--- 3 files changed, 21 insertions(+), 11 deletions(-) commit 7898489880f55a9c3a954cd5660a0fb4fd81b625 Author: Or Gerlitz Date: Wed Nov 30 20:33:33 2016 +0200 IB/mlx5: Enable Eth VFs to query their min-inline value for user-space For some mlx5 HW models (CX4, CX4Lx), the VF driver needs to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering. This is called "min-inline", it's advertized to the VF by the FW and also enforced on them by the HW, such that if they don't obey, their packets are dropped. SRIOV VF libmlx5 instances should take into account the min-inline value of their vports. For that end, we provide this value through the vendor response part of init_ucontext command. The min inline value is reported in a way which will let newer libmlx5 instances realize that they are running over an older kernel and act accordingly (e.g apply some educated guess). Signed-off-by: Or Gerlitz Reviewed-by: Matan Barak Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 9 +++++++++ include/uapi/rdma/mlx5-abi.h | 14 +++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 8c7245a60ef8f8c4a427349690c5a141cfed6217 Author: Or Gerlitz Date: Wed Nov 30 20:23:51 2016 +0200 net/mlx5: Push min-inline mode resolution helper into the core So we can use that from the IB driver too in downstream patches. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 18 +----------------- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 17 +++++++++++++++++ include/linux/mlx5/vport.h | 1 + 3 files changed, 19 insertions(+), 17 deletions(-) commit c9497c98901c689bf6c357f812bf864ed8f50ace Author: Mohamad Haj Yahia Date: Thu Dec 15 14:02:53 2016 +0200 net/mlx5: Add support for setting VF min rate Add support for SRIOV VF min rate guarantee by using the TSAR BW share weights mechanism. The TSAR BW share vport attribute represents the weight of that vport among the other vports weights which means that the actual vport BW percentage is the same vport weight percentage among the total vports weights sum. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 97 +++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 11 ++- include/linux/mlx5/mlx5_ifc.h | 4 +- 4 files changed, 104 insertions(+), 13 deletions(-) commit 264d7bf3c1cfd3a128d621b367f57b81d038ba10 Author: Or Gerlitz Date: Tue Dec 20 12:38:05 2016 +0200 net/mlx5: E-Switch, Enlarge the FDB size for the switchdev mode The E-Switch FDB size was hard coded to 8k. Change it to be min(max eswitch table size, max flow counters * num flow groups) where the max values are read from the firmware and the number of flow groups is hard-coded as before this change. We don't know upfront the division of flows to group. This setup allows each group to be of size up to the where we want to support (we mandate pairing of flows with counters for offloading). Thus, we don't expect multiple occurences for a group which in turn adds steering hops. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Tested-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ce99f6b97fcdcb4e7f6f7e2fe5e5fe6c65585cab Author: Or Gerlitz Date: Sun Dec 11 21:28:28 2016 +0200 net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels Add the missing parts for offloading IPv6 tunnels. This includes route and neigh lookups and construnction of the IPv6 tunnel headers. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 159 ++++++++++++++++++++++-- 1 file changed, 151 insertions(+), 8 deletions(-) commit 9a941117fb761dcfb4f698f1f67340484b781b90 Author: Or Gerlitz Date: Tue Jan 3 19:03:00 2017 +0200 net/mlx5e: Maximize ip tunnel key usage on the TC offloading path Use more fields out of the tunnel key (e.g the tunnel source IP address) provided by upper layers for the route lookup done on the encap offload path. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 76f7444dd5a4349af40e4c67e4b995d4ae3c5c92 Author: Or Gerlitz Date: Thu Jan 5 16:43:29 2017 +0200 net/mlx5e: Use the full tunnel key info for encapsulation offload house-keeping Currently we use subset of the input tunnel key fields (id, ip daddr, dst port) which are provided by upper layers to indentify flows that should go through the same encapsulation and maintain the HW encapsulation table. This is redundant and can get us wrong. Instead, keep a copy of the ip tunnel info provided by the user through TC and have the tunnel key part as the key to our internal hash. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 38 +++++++++-------------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 9 ++---- 2 files changed, 17 insertions(+), 30 deletions(-) commit 75c33da827365afa6f3d708ad1f7abe18e0ba4a3 Author: Or Gerlitz Date: Wed Dec 21 17:31:18 2016 +0200 net/mlx5e: TC ipv4 tunnel encap offload cosmetic changes Move around some settings of variables as pre-step to make things more robust and clear for the ipv6 case in down-stream patch. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 19f4440141af8cd9b2f280ec38476baa86dc87f9 Author: Or Gerlitz Date: Sun Dec 11 12:20:53 2016 +0200 net/mlx5e: Add TC offloads matching on IPv6 encapsulation headers Enhance the parsing of offloaded TC rules to set HW matching on outer IPv6 encapsulation headers. This effectively adds support for TC tunnel key release action (decapsulation) of SRIOV offloads over IPv6 tunnels. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 30 ++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 073ff3c8e6acdd6bae91a037e6f2d0edeed4165d Author: Or Gerlitz Date: Sun Dec 11 12:15:08 2016 +0200 net/mlx5: Use exact encap header size for the FW input buffer The current code is allocating the max encap size supported by the firmware and not the size requested by the caller, fix that. Also, spare a warning when the size of the encapsulation headers is bigger from what is supported by the firmware. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 187024144c6e0c82bc32ebb46f3cd0585264833e Author: Arnd Bergmann Date: Mon Jan 23 13:18:41 2017 +0100 phy: marvell: remove conflicting initializer One line was apparently pasted incorrectly during a new feature patch: drivers/net/phy/marvell.c:2090:15: error: initialized field overwritten [-Werror=override-init] .features = PHY_GBIT_FEATURES, I'm removing the extraneous line here to avoid the W=1 warning and restore the previous flags value, and I'm slightly reordering the lines for consistency to make it less likely to happen again in the future. The ordering in the array is still not the same as in the structure definition, instead I picked the order that is most common in this file and that seems to make more sense here. Fixes: 0b04680fdae4 ("phy: marvell: Add support for temperature sensor") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit e1636836e0a080b71da1954f8604b1238e53d3b9 Author: Phil Sutter Date: Mon Jan 23 12:17:33 2017 +0100 net: dummy: Introduce dummy virtual functions The idea for this was born when testing VF support in iproute2 which was impeded by hardware requirements. In fact, not every VF-capable hardware driver implements all netdev ops, so testing the interface is still hard to do even with a well-sorted hardware shelf. To overcome this and allow for testing the user-kernel interface, this patch allows to turn dummy into a PF with a configurable amount of VFs. Since my patch series 'bus-agnostic-num-vf' has been accepted, implementing the required interfaces is pretty straightforward: Iff 'num_vfs' module parameter was given a value >0, a dummy bus type is being registered which implements the 'num_vf()' callback. Additionally, a dummy parent device common to all dummy devices is registered which sits on the above dummy bus. Joint work with Sabrina Dubroca. Signed-off-by: Sabrina Dubroca Signed-off-by: Phil Sutter Signed-off-by: David S. Miller drivers/net/dummy.c | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 215 insertions(+), 2 deletions(-) commit 8b86b2c1b83e3a3a9ac5192b4e9d4ee23d88b218 Author: Philippe Reynes Date: Sat Jan 21 14:43:16 2017 +0100 net: broadcom: bnx2x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Acked-by: Yuval Mintz Signed-off-by: David S. Miller .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 199 +++++++++++---------- 1 file changed, 109 insertions(+), 90 deletions(-) commit 36f877804c2471226b6c5cd72232c707e0e4c497 Merge: d36db83 98d0f7b Author: David S. Miller Date: Tue Jan 24 13:44:29 2017 -0500 Merge branch 'packet-sampling-offload' Jiri Pirko says: ==================== Add support for offloading packet-sampling Yotam says: The first patch introduces the psample module, a netlink channel dedicated to packet sampling implemented using generic netlink. This module provides a generic way for kernel modules to sample packets, while not being tied to any specific subsystem like NFLOG. The second patch adds the sample tc action, which uses psample to randomly sample packets that match a classifier. The user can configure the psample group number, the sampling rate and the packet's truncation (to save kernel-user traffic). The last two patches add the support for offloading the matchall-sample tc command in the mlxsw driver, for ingress qdiscs. An example for psample usage can be found in the libpsample project at: https://github.com/Mellanox/libpsample v1->v2: - Reword first patch's commit message - Fix typo in comment in second patch - Change order of tc_sample uapi enum to match convention - Rename act_sample action callback tcf_sample -> tcf_sample_act ==================== Signed-off-by: David S. Miller commit 98d0f7b9acda0cf15259f83ca1758ad6017c0942 Author: Yotam Gigi Date: Mon Jan 23 11:07:11 2017 +0100 mlxsw: spectrum: Add packet sample offloading support Using the MPSC register, add the functions that configure port-based packet sampling in hardware and the necessary datatypes in the mlxsw_sp_port struct. In addition, add the necessary trap for sampled packets and integrate with matchall offloading to allow offloading of the sample tc action. The current offload support is for the tc command: tc filter add dev parent ffff: \ matchall skip_sw \ action sample rate group [trunc ] Where only ingress qdiscs are supported, and only a combination of matchall classifier and sample action will lead to activating hardware packet sampling. Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 111 +++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 +++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 + 3 files changed, 122 insertions(+) commit 0677d6828b039bdccc6161a4ea6ae715489dca7e Author: Yotam Gigi Date: Mon Jan 23 11:07:10 2017 +0100 mlxsw: reg: add the Monitoring Packet Sampling Configuration Register The MPSC register allows to configure ingress packet sampling on specific port of the mlxsw device. The sampled packets are then trapped via PKT_SAMPLE trap. Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 5c5670fae43027778e84b9d9ff3b9d91a10a8131 Author: Yotam Gigi Date: Mon Jan 23 11:07:09 2017 +0100 net/sched: Introduce sample tc action This action allows the user to sample traffic matched by tc classifier. The sampling consists of choosing packets randomly and sampling them using the psample module. The user can configure the psample group number, the sampling rate and the packet's truncation (to save kernel-user traffic). Example: To sample ingress traffic from interface eth1, one may use the commands: tc qdisc add dev eth1 handle ffff: ingress tc filter add dev eth1 parent ffff: \ matchall action sample rate 12 group 4 Where the first command adds an ingress qdisc and the second starts sampling randomly with an average of one sampled packet per 12 packets on dev eth1 to psample group 4. Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: David S. Miller include/net/tc_act/tc_sample.h | 50 +++++++ include/uapi/linux/tc_act/Kbuild | 1 + include/uapi/linux/tc_act/tc_sample.h | 26 ++++ net/sched/Kconfig | 12 ++ net/sched/Makefile | 1 + net/sched/act_sample.c | 274 ++++++++++++++++++++++++++++++++++ 6 files changed, 364 insertions(+) commit 6ae0a6286171154661b74f7f550f9441c6008424 Author: Yotam Gigi Date: Mon Jan 23 11:07:08 2017 +0100 net: Introduce psample, a new genetlink channel for packet sampling Add a general way for kernel modules to sample packets, without being tied to any specific subsystem. This netlink channel can be used by tc, iptables, etc. and allow to standardize packet sampling in the kernel. For every sampled packet, the psample module adds the following metadata fields: PSAMPLE_ATTR_IIFINDEX - the packets input ifindex, if applicable PSAMPLE_ATTR_OIFINDEX - the packet output ifindex, if applicable PSAMPLE_ATTR_ORIGSIZE - the packet's original size, in case it has been truncated during sampling PSAMPLE_ATTR_SAMPLE_GROUP - the packet's sample group, which is set by the user who initiated the sampling. This field allows the user to differentiate between several samplers working simultaneously and filter packets relevant to him PSAMPLE_ATTR_GROUP_SEQ - sequence counter of last sent packet. The sequence is kept for each group PSAMPLE_ATTR_SAMPLE_RATE - the sampling rate used for sampling the packets PSAMPLE_ATTR_DATA - the actual packet bits The sampled packets are sent to the PSAMPLE_NL_MCGRP_SAMPLE multicast group. In addition, add the GET_GROUPS netlink command which allows the user to see the current sample groups, their refcount and sequence number. This command currently supports only netlink dump mode. Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: David S. Miller MAINTAINERS | 7 + include/net/psample.h | 36 ++++++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/psample.h | 35 +++++ net/Kconfig | 1 + net/Makefile | 1 + net/psample/Kconfig | 15 +++ net/psample/Makefile | 5 + net/psample/psample.c | 301 +++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 402 insertions(+) commit d36db83bac41e46cb89bd1ef57e049ce80a7433a Merge: dd8e01f 8a180cc Author: David S. Miller Date: Tue Jan 24 13:37:51 2017 -0500 Merge branch 'mdio_module_driver-misc' Florian Fainelli says: ==================== net: couple mdio_module_driver changes Small patch series fixing a comment for mdio_module_driver and finally utilizing it in b53_mdio. ==================== Signed-off-by: David S. Miller commit 8a180cc79debf6302eb0afc819673b44d0fa5b21 Author: Florian Fainelli Date: Sun Jan 22 21:17:33 2017 -0800 net: dsa: b53: Utilize mdio_module_driver Eliminate a bit of boilerplate code. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_mdio.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b70f43a16182c7dbc0779bc5bd9f621711f13eb3 Author: Florian Fainelli Date: Sun Jan 22 21:17:32 2017 -0800 net: phy: Fix typo for MDIO module boilerplate comment The module boilerplate macro is named mdio_module_driver and not module_mdio_driver, fix that. Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/linux/mdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd8e01fbffb4237244e0d9d3f7fca80187e070d5 Merge: 23e3d61 b765234 Author: David S. Miller Date: Tue Jan 24 13:35:41 2017 -0500 Merge branch 'stmmac-dwmac-meson8b-configurable-RGMII-TX-delay' Martin Blumenstingl says: ==================== stmmac: dwmac-meson8b: configurable RGMII TX delay Currently the dwmac-meson8b stmmac glue driver uses a hardcoded 1/4 cycle (= 2ns) TX clock delay. This seems to work fine for many boards (for example Odroid-C2 or Amlogic's reference boards) but there are some others where TX traffic is simply broken. There are probably multiple reasons why it's working on some boards while it's broken on others: - some of Amlogic's reference boards are using a Micrel PHY - hardware circuit design - maybe more... iperf3 results on my Mecool BB2 board (Meson GXM, RTL8211F PHY) with TX clock delay disabled on the MAC (as it's enabled in the PHY driver). TX throughput was virtually zero before: $ iperf3 -c 192.168.1.100 -R Connecting to host 192.168.1.100, port 5201 Reverse mode, remote host 192.168.1.100 is sending [ 4] local 192.168.1.206 port 52828 connected to 192.168.1.100 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 108 MBytes 901 Mbits/sec [ 4] 1.00-2.00 sec 94.2 MBytes 791 Mbits/sec [ 4] 2.00-3.00 sec 96.5 MBytes 810 Mbits/sec [ 4] 3.00-4.00 sec 96.2 MBytes 808 Mbits/sec [ 4] 4.00-5.00 sec 96.6 MBytes 810 Mbits/sec [ 4] 5.00-6.00 sec 96.5 MBytes 810 Mbits/sec [ 4] 6.00-7.00 sec 96.6 MBytes 810 Mbits/sec [ 4] 7.00-8.00 sec 96.5 MBytes 809 Mbits/sec [ 4] 8.00-9.00 sec 105 MBytes 884 Mbits/sec [ 4] 9.00-10.00 sec 111 MBytes 934 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 1000 MBytes 839 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 998 MBytes 837 Mbits/sec receiver iperf Done. $ iperf3 -c 192.168.1.100 Connecting to host 192.168.1.100, port 5201 [ 4] local 192.168.1.206 port 52832 connected to 192.168.1.100 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.01 sec 99.5 MBytes 829 Mbits/sec 117 139 KBytes [ 4] 1.01-2.00 sec 105 MBytes 884 Mbits/sec 129 70.7 KBytes [ 4] 2.00-3.01 sec 107 MBytes 889 Mbits/sec 106 187 KBytes [ 4] 3.01-4.01 sec 105 MBytes 878 Mbits/sec 92 143 KBytes [ 4] 4.01-5.00 sec 105 MBytes 882 Mbits/sec 140 129 KBytes [ 4] 5.00-6.01 sec 106 MBytes 883 Mbits/sec 115 195 KBytes [ 4] 6.01-7.00 sec 102 MBytes 863 Mbits/sec 133 70.7 KBytes [ 4] 7.00-8.01 sec 106 MBytes 884 Mbits/sec 143 97.6 KBytes [ 4] 8.01-9.01 sec 104 MBytes 875 Mbits/sec 124 107 KBytes [ 4] 9.01-10.01 sec 105 MBytes 876 Mbits/sec 90 139 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.01 sec 1.02 GBytes 874 Mbits/sec 1189 sender [ 4] 0.00-10.01 sec 1.02 GBytes 873 Mbits/sec receiver iperf Done. I get similar TX throughput on my Meson GXBB "MXQ Pro+" board when I disable the PHY's TX-delay and configure a 4ms TX-delay on the MAC. So changes to at least the RTL8211F PHY driver are needed to get it working properly in all situations. Changes since v4: - add a fallback of 2ns (the value which was previously hardcoded) for the TX delay so we are backwards-compatible with older .dts' - update the documentation with the new fallback value and add a small note that the "amlogic,tx-delay" property is ignored when the phy-mode is "rmii". Changes since v3: - rebased to apply against current net-next branch (fixes a conflict with d2ed0a7755fe14c7 "net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Changes since v2: - moved all .dts patches (3-7) to a separate series - removed the default 2ns TX delay when phy-mode RGMII is specified - (rebased against current net-next) Changes since v1: - renamed the devicetree property "amlogic,tx-delay" to "amlogic,tx-delay-ns", which makes the .dts easier to read as we can simply specify human-readable values instead of having "preprocessor defines and calculation in human brain". Thanks to Andrew Lunn for the suggestion! - improved documentation to indicate when the MAC TX-delay should be configured and how to use the PHY's TX-delay - changed the default TX-delay in the dwmac-meson8b driver from 2ns to 0ms when any of the rgmii-*id modes are used (the 2ns default value still applies for phy-mode "rgmii") - added patches to properly reset the PHY on Meson GXBB devices and to use a similar configuration than the one we use on Meson GXL devices (by passing a phy-handle to stmmac and defining the PHY in the mdio0 bus - patch 3-6) - add the "amlogic,tx-delay-ns" property to all boards which are using the RGMII PHY (patch 7) ==================== Signed-off-by: David S. Miller commit b765234e72fcba484a5fdd219e81ab526f416bf7 Author: Martin Blumenstingl Date: Sun Jan 22 23:02:46 2017 +0100 net: stmmac: dwmac-meson8b: make the RGMII TX delay configurable Prior to this patch we were using a hardcoded RGMII TX clock delay of 2ns (= 1/4 cycle of the 125MHz RGMII TX clock). This value works for many boards, but unfortunately not for all (due to the way the actual circuit is designed, sometimes because the TX delay is enabled in the PHY, etc.). Making the TX delay on the MAC side configurable allows us to support all possible hardware combinations. This allows fixing a compatibility issue on some boards, where the RTL8211F PHY is configured to generate the TX delay. We can now turn off the TX delay in the MAC, because otherwise we would be applying the delay twice (which results in non-working TX traffic). Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit d5490f1f67116419ddf3b4c7b9f3d5a0fb2fd407 Author: Martin Blumenstingl Date: Sun Jan 22 23:02:45 2017 +0100 net: dt-bindings: add RGMII TX delay configuration to meson8b-dwmac This allows configuring the RGMII TX clock delay. The RGMII clock is generated by underlying hardware of the the Meson 8b / GXBB DWMAC glue. The configuration depends on the actual hardware (no delay may be needed due to the design of the actual circuit, the PHY might add this delay, etc.). Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/meson-dwmac.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 23e3d618e49eb560052fe59a3c9629d3650ba46e Author: Andrew Lunn Date: Sun Jan 22 22:16:45 2017 +0100 net: dsa: Fix inverted test for multiple CPU interface Remove the wrong !, otherwise we get false positives about having multiple CPU interfaces. Fixes: b22de490869d ("net: dsa: store CPU switch structure in the tree") Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1011509dfd25f90db333f82fa85c39b0861d2b09 Author: Jeeja KP Date: Tue Jan 24 21:49:04 2017 +0530 ASoC: Intel: Skylake: Use set_tdm_slot to set the dma channel DMA channel(stream tag) used by the HDA link need to programmed in codec so that codec receives packet from the link associated with the same channel. DMA channel is allocated in link BE dai hw_params, the same needs to be set for the BE codec dai. Instead of using get/set dma_data(), use dai_ops snd_soc_dai_set_tdm_slot() to set the stream tag. Signed-off-by: Subhransu S. Prusty Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c9bfb5d74dd2a704bf3c622c6b268f6dc6f37ca6 Author: Jeeja KP Date: Tue Jan 24 21:49:03 2017 +0530 ASoC: hdac_hdmi: Register widget event handlers In case of hdmi connect/disconnect or when stream need to be route to multiple monitors, corresponding port and audio infoframe needs to be reconfigured. Currently all the configuration are done in DAI ops which results in silence playback. So use dapm widget event handlers to program audio infoframe and enable /disable port configuration when widget is power on/off. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 350 ++++++++++++++++++++++--------------------- 1 file changed, 183 insertions(+), 167 deletions(-) commit 6c992d35b8891646f838a8dc13ba042a1cc0cef0 Author: Andrzej Hajda Date: Tue Jan 24 13:45:28 2017 +0100 arm64: dts: exynos: set LDO7 regulator as always on LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos 5433 SoC. Disabling it causes serious current leak - about 200mA. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 3753941475ae6501dcd1e41832bd0e6c35247d6a Author: Maxime Ripard Date: Mon Jan 23 11:41:46 2017 +0100 rtc: sun6i: Disable the build as a module Since we have to provide the clock very early on, the RTC driver cannot be built as a module. Make sure that won't happen. Cc: stable@vger.kernel.org Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sun6i.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) commit bc7d8ebf37e725ec028e7699e6b497c96678d63a Author: Linus Walleij Date: Sun Jan 22 13:19:50 2017 +0100 rtc: gemini: Add device tree probing This adds bindings and simple probing for the Cortina Systems Gemini SoC RTC. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 ++++++++++++++ drivers/rtc/rtc-gemini.c | 7 +++++++ 2 files changed, 21 insertions(+) commit ece74f63b1f3a4d7466c949b3d9db6fc29445213 Author: Paul Gortmaker Date: Tue Jan 10 09:51:08 2017 -0500 frv: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Reported-by: kbuild test robot Signed-off-by: Paul Gortmaker arch/frv/mm/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d92280d1328fe1e32a1c806c145427a2582c8fce Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 sh: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. One uses "print_modules" so that prevents us removing module.h in that case, however. We also delete a duplicate prototype that doesn't need to exist, as it duplicates content in extable.h Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Gortmaker arch/sh/include/asm/uaccess.h | 1 - arch/sh/kernel/kprobes.c | 2 +- arch/sh/kernel/traps.c | 3 ++- arch/sh/mm/extable_32.c | 2 +- arch/sh/mm/extable_64.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 6cc306ea5cda3bf75c590140703c792a7cfe1be6 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 xtensa: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Paul Gortmaker arch/xtensa/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ac449e44b7320d6922ebc95471e12aa5a0f5b37 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 mn10300: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: David Howells Cc: linux-am33-list@redhat.com Signed-off-by: Paul Gortmaker arch/mn10300/mm/extable.c | 2 +- arch/mn10300/mm/misalignment.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9c14f8353e4c3cc73c9d8005fe4cfa83ee37e109 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 alpha: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Paul Gortmaker arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0ea9365a51f9993d4b62fe10e523988d3feb4ad7 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 arm: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ae26cdae4f00995d01291a9829f57d205a04b6b7 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 m32r: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: Sudip Mukherjee Acked-by: Sudip Mukherjee Signed-off-by: Paul Gortmaker arch/m32r/mm/extable.c | 2 +- arch/m32r/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e7088170e3a788bca50287821a5a8417c016c231 Author: Paul Gortmaker Date: Sat Jul 23 14:01:45 2016 -0400 ia64: ensure exception table search users include extable.h We start with a delete of a duplicate prototype in asm/exception.h that no longer needs to exist, as it duplicates content in extable.h and since that header is so small, there is no point trying to avoid using it. Then we make sure anyone using search_exception_tables directly or via the ia64_done_with_exception macro has included extable.h In the process, we remove an include of moduleloader.h that was apparently not really required; it would have been fetching in module.h and hence the previous location of the exception search function prototypes, but we need not rely on that anymore. Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Paul Gortmaker arch/ia64/include/asm/exception.h | 1 - arch/ia64/kernel/kprobes.c | 2 +- arch/ia64/kernel/traps.c | 3 ++- arch/ia64/kernel/unaligned.c | 1 + arch/ia64/mm/fault.c | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) commit 82ed1ac9c2628d72c6699fae4448b72599df2f51 Author: Paul Gortmaker Date: Mon Sep 19 18:28:25 2016 -0400 ia64: move ia64_done_with_exception out of asm/uaccess.h Move ia64_done_with_exception out of asm/uaccess.h (which is widely used) and into asm/exception.h (like ARM has) and then ensure the few callers of it include this new header. Most of the other C content in asm files is implemented in macro form. So we do that conversion at the same time as the move. There are two C exception prototypes that move along with the macro. One of them will become redundant when we switch over to using the instead of header in a subsequent commit. Also relocate a couple of the automated asm --> linux uaccess conversions to preserve the linux and asm independent grouping, since we are in the file at that location anyway. Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Paul Gortmaker arch/ia64/include/asm/exception.h | 36 ++++++++++++++++++++++++++++++++++++ arch/ia64/include/asm/uaccess.h | 15 --------------- arch/ia64/kernel/kprobes.c | 2 +- arch/ia64/kernel/traps.c | 3 ++- arch/ia64/kernel/unaligned.c | 3 ++- arch/ia64/mm/fault.c | 1 + 6 files changed, 42 insertions(+), 18 deletions(-) commit 6db6f0eae6052b70885562e1733896647ec1d807 Author: Felix Fietkau Date: Sat Jan 21 21:01:32 2017 +0100 bridge: multicast to unicast Implements an optional, per bridge port flag and feature to deliver multicast packets to any host on the according port via unicast individually. This is done by copying the packet per host and changing the multicast destination MAC to a unicast one accordingly. multicast-to-unicast works on top of the multicast snooping feature of the bridge. Which means unicast copies are only delivered to hosts which are interested in it and signalized this via IGMP/MLD reports previously. This feature is intended for interface types which have a more reliable and/or efficient way to deliver unicast packets than broadcast ones (e.g. wifi). However, it should only be enabled on interfaces where no IGMPv2/MLDv1 report suppression takes place. This feature is disabled by default. The initial patch and idea is from Felix Fietkau. Signed-off-by: Felix Fietkau [linus.luessing@c0d3.blue: various bug + style fixes, commit message] Signed-off-by: Linus Lüssing Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/if_bridge.h | 1 + include/uapi/linux/if_link.h | 1 + net/bridge/br_forward.c | 39 ++++++++++++++++++- net/bridge/br_mdb.c | 2 +- net/bridge/br_multicast.c | 90 ++++++++++++++++++++++++++++++++------------ net/bridge/br_netlink.c | 5 +++ net/bridge/br_private.h | 3 +- net/bridge/br_sysfs_if.c | 2 + 8 files changed, 114 insertions(+), 29 deletions(-) commit 0bbb3b7496eabb6779962a998a8a91f4a8e589ff Author: Bart Van Assche Date: Fri Jan 20 13:04:37 2017 -0800 IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it Make the rxe and rdmavt drivers use dma_virt_ops. Update the comments that refer to the source files removed by this patch. Remove struct ib_dma_mapping_ops. Remove ib_device.dma_ops. Signed-off-by: Bart Van Assche Cc: Andrew Boyer Cc: Dennis Dalessandro Cc: Jonathan Toppins Cc: Alex Estrin Cc: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Kconfig | 1 + drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/dma.c | 198 ---------------------------------- drivers/infiniband/sw/rdmavt/dma.h | 53 --------- drivers/infiniband/sw/rdmavt/mr.c | 8 +- drivers/infiniband/sw/rdmavt/vt.c | 4 +- drivers/infiniband/sw/rdmavt/vt.h | 1 - drivers/infiniband/sw/rxe/Kconfig | 1 + drivers/infiniband/sw/rxe/Makefile | 1 - drivers/infiniband/sw/rxe/rxe_dma.c | 183 ------------------------------- drivers/infiniband/sw/rxe/rxe_loc.h | 2 - drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +- include/rdma/ib_verbs.h | 103 ++---------------- 13 files changed, 18 insertions(+), 542 deletions(-) commit b668970e610f186aa11f9fe7a7f7e35ae2c83476 Author: Arnd Bergmann Date: Tue Jan 17 16:18:35 2017 +0100 MIPS: Fix modversions kernelci.org reports tons of build warnings for linux-next: 35 WARNING: "memcpy" [fs/fat/msdos.ko] has no CRC! 35 WARNING: "__copy_user" [fs/fat/fat.ko] has no CRC! 32 WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned. 32 WARNING: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned. 32 WARNING: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned. 32 WARNING: EXPORT symbol "__strncpy_from_user_nocheck_asm" [vmlinux] version generation failed, symbol will not be versioned. The problem here is mainly the missing asm/asm-prototypes.h header file that is supposed to include the prototypes for each symbol that is exported from an assembler file. A second problem is that the asm/uaccess.h header contains some but not all the necessary declarations for the user access helpers. Finally, the vdso build is broken once we add asm/asm-prototypes.h, so we have to fix this at the same time by changing the vdso header. My approach here is to just not look for exported symbols in the VDSO assembler files, as the symbols cannot be exported anyway. Fixes: 576a2f0c5c6d ("MIPS: Export memcpy & memset functions alongside their definitions") Signed-off-by: Arnd Bergmann Cc: Al Viro Cc: James Hogan Cc: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15038/ Patchwork: https://patchwork.linux-mips.org/patch/15069/ Signed-off-by: Ralf Baechle arch/mips/include/asm/asm-prototypes.h | 5 +++++ arch/mips/include/asm/uaccess.h | 18 ++++++++++++++++++ arch/mips/lib/strlen_user.S | 4 +++- arch/mips/lib/strncpy_user.S | 10 ++++++---- arch/mips/lib/strnlen_user.S | 8 ++++++-- arch/mips/vdso/Makefile | 7 +++++-- 6 files changed, 43 insertions(+), 9 deletions(-) commit ea58fca1842a5dc410cae4167b01643db971a4e2 Author: Arnd Bergmann Date: Wed Jan 11 15:29:50 2017 +0100 MIPS: Update ip27_defconfig for SCSI_DH change Since linux-4.3, SCSI_DH is a bool symbol, causing a warning in kernelci.org: arch/mips/configs/ip27_defconfig:136:warning: symbol value 'm' invalid for SCSI_DH This updates the defconfig to have the feature built-in. Fixes: 086b91d052eb ("scsi_dh: integrate into the core SCSI code") Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15001/ Signed-off-by: Ralf Baechle arch/mips/configs/ip27_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f6046186ef45acfeebc5a59c9fb45cefc685e7 Author: Arnd Bergmann Date: Wed Jan 11 15:29:49 2017 +0100 MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change Since linux-4.8, CPU_FREQ_STAT is a bool symbol, causing a warning in kernelci.org: arch/mips/configs/lemote2f_defconfig:42:warning: symbol value 'm' invalid for CPU_FREQ_STAT This updates the defconfig to have the feature built-in. Fixes: 1aefc75b2449 ("cpufreq: stats: Make the stats code non-modular") Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15000/ Signed-off-by: Ralf Baechle arch/mips/configs/lemote2f_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ddc16ad8e0bc7742fc96d5aaabc5b8698512cd1 Author: Arnd Bergmann Date: Wed Jan 11 15:29:48 2017 +0100 MIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change In linux-4.10-rc, NF_CT_PROTO_UDPLITE and NF_CT_PROTO_DCCP are bool symbols instead of tristate, and kernelci.org reports a bunch of warnings for this, like: arch/mips/configs/malta_kvm_guest_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/mips/configs/malta_defconfig:62:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP arch/mips/configs/malta_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/mips/configs/ip22_defconfig:70:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP arch/mips/configs/ip22_defconfig:71:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE This changes all the MIPS defconfigs with these symbols to have them built-in. Fixes: 9b91c96c5d1f ("netfilter: conntrack: built-in support for UDPlite") Fixes: c51d39010a1b ("netfilter: conntrack: built-in support for DCCP") Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14999/ Signed-off-by: Ralf Baechle arch/mips/configs/ip22_defconfig | 4 ++-- arch/mips/configs/malta_defconfig | 4 ++-- arch/mips/configs/malta_kvm_defconfig | 4 ++-- arch/mips/configs/malta_kvm_guest_defconfig | 4 ++-- arch/mips/configs/maltaup_xpa_defconfig | 4 ++-- arch/mips/configs/nlm_xlp_defconfig | 2 +- arch/mips/configs/nlm_xlr_defconfig | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) commit d783738c0014fe6d7af6288a468272683f32941f Author: Jaedon Shin Date: Tue Jan 10 11:00:31 2017 +0900 MIPS: BMIPS: Add support SPI device nodes Adds SPI device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Kevin Cernekee Cc: Rob Herring Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14990/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7125.dtsi | 49 +++++++++++++++++++++++++++++-- arch/mips/boot/dts/brcm/bcm7346.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7420.dtsi | 49 +++++++++++++++++++++++++++++-- arch/mips/boot/dts/brcm/bcm7425.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 43 +++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97125cbmb.dts | 4 +++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 4 +++ arch/mips/boot/dts/brcm/bcm97358svmb.dts | 36 +++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 36 +++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 4 +++ arch/mips/boot/dts/brcm/bcm97420c.dts | 4 +++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 36 +++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 4 +++ 16 files changed, 478 insertions(+), 6 deletions(-) commit 35e7f7885e1b1b272a73c0de3227fc9a3e95a7e3 Author: James Hogan Date: Tue Jan 3 14:51:20 2017 +0000 MIPS: Fix printk continuations in cpu-bugs64.c 64-bit pre-r6 kernels output the following broken printk continuation lines during boot: Checking for the multiply/shift bug... no. Checking for the daddiu bug... no. Checking for the daddi bug... no. Fix the printk continuations in cpu-bugs64.c to use pr_cont to restore the correct output: Checking for the multiply/shift bug... no. Checking for the daddiu bug... no. Checking for the daddi bug... no. Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14916/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-bugs64.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 99db9494035f5b9fbb1d579f89c6fa1beba6dbb7 Author: Bart Van Assche Date: Fri Jan 20 13:04:36 2017 -0800 IB/core: Remove ib_device.dma_device Add code in ib_register_device() for copying the DMA masks. Use &ib_device.dev in DMA mapping operations instead of dma_device. Remove ib_device.dma_device because due to this and previous patches it is no longer used. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 17 +++++++++-------- include/rdma/ib_verbs.h | 31 +++++++++++++------------------ 2 files changed, 22 insertions(+), 26 deletions(-) commit 92f4ae3559832ef1e5f785cfea14c231ef40612e Author: Bart Van Assche Date: Fri Jan 20 13:04:35 2017 -0800 nvme-rdma: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Acked-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f68dcaff5524007ebaeafb45e9e9477f4da2a73 Author: Bart Van Assche Date: Fri Jan 20 13:04:34 2017 -0800 RDS: net: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Santosh Shilimkar Acked-by: Santosh Shilimkar Signed-off-by: Doug Ledford net/rds/ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3dfa60c0a1804d5934c11cd1680e373384aa0a0 Author: Bart Van Assche Date: Fri Jan 20 13:04:33 2017 -0800 IB/srpt: Modify a debug statement Since a later patch will remove ib_device.dma_device and since knowing the value of that pointer is not too important, remove dma_device from the debug output. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dee2b82a5faf426723d3d077e9b17d172715d167 Author: Bart Van Assche Date: Fri Jan 20 13:04:32 2017 -0800 IB/srp: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 61118cecf2683c082ec9bc86a8916d35c73d6e5b Author: Bart Van Assche Date: Fri Jan 20 13:04:31 2017 -0800 IB/iser: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db97ed0a2edfb2903c790d86e15d15baa1edf95d Author: Bart Van Assche Date: Fri Jan 20 13:04:30 2017 -0800 IB/IPoIB: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 85e9f1dbbd1422805fb83bd391fc8ebba1087591 Author: Bart Van Assche Date: Fri Jan 20 13:04:29 2017 -0800 IB/rxe: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a62ef9a7d2542fff44f9ca68a730e3d1677b7040 Author: Bart Van Assche Date: Fri Jan 20 13:04:28 2017 -0800 IB/vmw_pvrdma: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Adit Ranadive Cc: VMware PV-Drivers Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b06d52dbe79ebd2ef2715a5cd1c62ca367e3776 Author: Bart Van Assche Date: Fri Jan 20 13:04:27 2017 -0800 IB/usnic: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Christian Benvenuti Cc: Dave Goodell Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 989ab358f795998e1e889884c14503ee8101f867 Author: Bart Van Assche Date: Fri Jan 20 13:04:26 2017 -0800 IB/qib: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69117101f95c17cb2ff173332a240ab697e5dda2 Author: Bart Van Assche Date: Fri Jan 20 13:04:25 2017 -0800 IB/qedr: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Ram Amrani Cc: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6a73f26721d135bd402d9cff17705b1e2b9f673 Author: Bart Van Assche Date: Fri Jan 20 13:04:24 2017 -0800 IB/ocrdma: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Selvin Xavier Cc: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a487a0bff383d5931f2e877ceada36ecae01111e Author: Bart Van Assche Date: Fri Jan 20 13:04:23 2017 -0800 IB/nes: Remove a superfluous assignment statement Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_verbs.c | 1 - 1 file changed, 1 deletion(-) commit 26e372705f360bda968bdd3215e83594481ec9d1 Author: Bart Van Assche Date: Fri Jan 20 13:04:22 2017 -0800 IB/mthca: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b0c289ec4a56054c0f9f7e441568dcc44618ec6 Author: Bart Van Assche Date: Fri Jan 20 13:04:21 2017 -0800 IB/mlx5: Switch from dma_device to dev.parent Signed-off-by: Bart Van Assche Cc: Matan Barak Cc: Leon Romanovsky Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/mr.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit d66c88a8fcf7267108eabdb7c975cc85707216f7 Author: Bart Van Assche Date: Fri Jan 20 13:04:20 2017 -0800 IB/mlx4: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 +- drivers/infiniband/hw/mlx4/mr.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit f2296adccfe973fbc326ed9b2fe55d56e206e3d5 Author: Bart Van Assche Date: Fri Jan 20 13:04:19 2017 -0800 IB/i40iw: Remove a superfluous assignment statement Due to a previous patch initializing ib_device.dev.parent is sufficient and initializing dma_device is no longer needed. Signed-off-by: Bart Van Assche Cc: Faisal Latif Cc: Shiraz Saleem Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 - 1 file changed, 1 deletion(-) commit fecd02eb2c527abd4889779497250f09c1f12eeb Author: Bart Van Assche Date: Fri Jan 20 13:04:18 2017 -0800 IB/hns: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Lijun Ou Cc: Wei Hu(Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3067771c517b64a0a72d14ef8a24e882a9adbdcf Author: Bart Van Assche Date: Fri Jan 20 13:04:17 2017 -0800 IB/hfi1: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d08868a15a780f8cae2856c196eee8874f2187a0 Author: Bart Van Assche Date: Fri Jan 20 13:04:16 2017 -0800 IB/cxgb4: Set dev.parent instead of dma_device Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Hariprasad S Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91f734b4f3085a8758ac58237afe8a3de82cc96a Author: Bart Van Assche Date: Fri Jan 20 13:04:15 2017 -0800 IB/cxgb3: Set dev.parent instead of dma_device Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Steve Wise Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e35a0880fb80834a973b51a84c9657208ec0fad Author: Bart Van Assche Date: Fri Jan 20 13:04:14 2017 -0800 IB/core: Use dev.parent instead of dma_device Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/core/ucm.c | 2 +- drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 97a9ea848016fef86e4a42dc6a65f4384eed32cd Author: Bart Van Assche Date: Fri Jan 20 13:04:13 2017 -0800 IB/core: Initialize ib_device.dev.parent earlier Move the ib_device.dev.parent initialization code from ib_device_register_sysfs() to ib_register_device(). Additionally, allow HBA drivers to set ib_device.dev.parent without setting ib_device.dma_device. This is the first step towards removing ib_device.dma_device. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 8 ++++++++ drivers/infiniband/core/sysfs.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 5f0cb80134a0035829bf7580126ea371c4aefec5 Author: Bart Van Assche Date: Fri Jan 20 13:04:12 2017 -0800 IB/qib: Remove DMA mapping code The qib DMA mapping code is no longer built since commit eb636ac0e49e ("IB/qib: Remove dma.c and use rdmavt version of dma functions"). Hence remove it. Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_dma.c | 169 ----------------------------------- drivers/infiniband/hw/qib/qib_keys.c | 5 +- 2 files changed, 1 insertion(+), 173 deletions(-) commit e6d356d3cdfdacaff5d9d3e26de05c6068c03ca4 Author: Bart Van Assche Date: Fri Jan 20 13:04:11 2017 -0800 IB/hf1: Remove DMA mapping code The hfi1 DMA mapping code has never been built in any upstream kernel. Hence remove it. Signed-off-by: Bart Van Assche Cc: Dennis Dalessandro Cc: Dean Luick Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/dma.c | 183 --------------------------------------- 1 file changed, 183 deletions(-) commit d43dbacfc06349309a99e50c575d86bc36ca4178 Author: Bart Van Assche Date: Fri Jan 20 13:04:10 2017 -0800 IB/core: Change the type of an ib_dma_alloc_coherent() argument Change the type of the dma_handle argument from u64 * to dma_addr_t *. This patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 13 ++++++------- net/rds/ib.h | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) commit 69324c2015e9ba852f1d66a8150d1a871cc62922 Author: Bart Van Assche Date: Fri Jan 20 13:04:09 2017 -0800 RDS: IB: Remove an unused structure member Signed-off-by: Bart Van Assche Acked-by: Santosh Shilimkar Cc: David S. Miller Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Cc: rds-devel@oss.oracle.com Signed-off-by: Doug Ledford net/rds/ib_mr.h | 1 - 1 file changed, 1 deletion(-) commit 6532c380bf4099e81e55e0c8c14a13232ead08c0 Author: Bart Van Assche Date: Fri Jan 20 13:04:08 2017 -0800 IB/core: Remove ib_dma_*map_single_attrs() Remove these functions because these are not used. Additionally, the implementation of these functions is not correct for the hfi1, qib and rxe drivers because dma_device is used instead of dma_ops. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 551199aca1c3102ebed390566d681cc1290284ca Author: Bart Van Assche Date: Fri Jan 20 13:04:07 2017 -0800 lib/dma-virt: Add dma_virt_ops Several RDMA drivers (hfi1, qib and rxe) expect that ib_sge.addr is a virtual address. Provide DMA mapping operations that are suitable for these drivers. Signed-off-by: Bart Van Assche Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Andy Lutomirski Cc: Michael S. Tsirkin Signed-off-by: Doug Ledford include/linux/dma-mapping.h | 1 + lib/Kconfig | 5 ++++ lib/Makefile | 1 + lib/dma-virt.c | 72 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) commit 7844572c633964c864d9f32dc3f2a8ffe5d70371 Author: Bart Van Assche Date: Fri Jan 20 13:04:06 2017 -0800 lib/dma-noop: Only build dma_noop_ops for s390 and m32r Reduce the kernel size by only building dma_noop_ops for those architectures that actually use it. This was suggested by Christoph Hellwig. Signed-off-by: Bart Van Assche Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Andy Lutomirski Cc: Michael S. Tsirkin Cc: Christoph Hellwig Signed-off-by: Doug Ledford arch/m32r/Kconfig | 1 + arch/s390/Kconfig | 1 + lib/Kconfig | 5 +++++ lib/Makefile | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) commit 1eec9e2befd35270b19a91bb633db595dc55975e Author: Bart Van Assche Date: Fri Jan 20 13:04:05 2017 -0800 lib/dma-noop: Clarify a comment The next patch in this series will introduce another set of DMA operations that map 1:1 with memory. Clarify that dma-noop maps to physical addresses. Signed-off-by: Bart Van Assche Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Andy Lutomirski Cc: Michael S. Tsirkin Signed-off-by: Doug Ledford lib/dma-noop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 815dd18788fe0d41899f51b91d0560279cf16b0d Author: Bart Van Assche Date: Fri Jan 20 13:04:04 2017 -0800 treewide: Consolidate get_dma_ops() implementations Introduce a new architecture-specific get_arch_dma_ops() function that takes a struct bus_type * argument. Add get_dma_ops() in . Signed-off-by: Bart Van Assche Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: David Woodhouse Cc: Juergen Gross Cc: H. Peter Anvin Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Russell King Cc: x86@kernel.org Signed-off-by: Doug Ledford arch/alpha/include/asm/dma-mapping.h | 2 +- arch/arc/include/asm/dma-mapping.h | 2 +- arch/arm/include/asm/dma-mapping.h | 4 ++-- arch/arm64/include/asm/dma-mapping.h | 4 ++-- arch/avr32/include/asm/dma-mapping.h | 2 +- arch/blackfin/include/asm/dma-mapping.h | 2 +- arch/c6x/include/asm/dma-mapping.h | 2 +- arch/cris/include/asm/dma-mapping.h | 4 ++-- arch/frv/include/asm/dma-mapping.h | 2 +- arch/h8300/include/asm/dma-mapping.h | 2 +- arch/hexagon/include/asm/dma-mapping.h | 5 +---- arch/ia64/include/asm/dma-mapping.h | 5 ++++- arch/m32r/include/asm/dma-mapping.h | 4 +--- arch/m68k/include/asm/dma-mapping.h | 2 +- arch/metag/include/asm/dma-mapping.h | 2 +- arch/microblaze/include/asm/dma-mapping.h | 2 +- arch/mips/include/asm/dma-mapping.h | 7 ++----- arch/mn10300/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/dma-mapping.h | 2 +- arch/openrisc/include/asm/dma-mapping.h | 2 +- arch/parisc/include/asm/dma-mapping.h | 2 +- arch/powerpc/include/asm/dma-mapping.h | 7 ++----- arch/powerpc/include/asm/ps3.h | 2 +- arch/s390/include/asm/dma-mapping.h | 4 +--- arch/sh/include/asm/dma-mapping.h | 2 +- arch/sparc/include/asm/dma-mapping.h | 4 ++-- arch/tile/include/asm/dma-mapping.h | 7 ++----- arch/unicore32/include/asm/dma-mapping.h | 2 +- arch/x86/include/asm/dma-mapping.h | 9 +-------- arch/xtensa/include/asm/dma-mapping.h | 7 ++----- include/linux/dma-mapping.h | 7 +++++++ 31 files changed, 48 insertions(+), 64 deletions(-) commit ca6e8e1031419549f67291ca31b43126f07cecdb Author: Bart Van Assche Date: Fri Jan 20 13:04:03 2017 -0800 treewide: Consolidate set_dma_ops() implementations Now that all set_dma_ops() implementations are identical (ignoring BUG_ON() statements), remove the architecture specific definitions and add a definition in . Signed-off-by: Bart Van Assche Cc: Benjamin Herrenschmidt Cc: Chris Metcalf Cc: David Woodhouse Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Paul Mackerras Cc: Russell King Signed-off-by: Doug Ledford arch/arm/include/asm/dma-mapping.h | 6 ------ arch/powerpc/include/asm/dma-mapping.h | 5 ----- arch/tile/include/asm/dma-mapping.h | 5 ----- include/linux/dma-mapping.h | 5 +++++ 4 files changed, 5 insertions(+), 16 deletions(-) commit 5657933dbb6e25feaf5d8df8c88f96cdade693a3 Author: Bart Van Assche Date: Fri Jan 20 13:04:02 2017 -0800 treewide: Move dma_ops from struct dev_archdata into struct device Some but not all architectures provide set_dma_ops(). Move dma_ops from struct dev_archdata into struct device such that it becomes possible on all architectures to configure dma_ops per device. Signed-off-by: Bart Van Assche Acked-by: Greg Kroah-Hartman Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: David Woodhouse Cc: Juergen Gross Cc: H. Peter Anvin Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Russell King Cc: x86@kernel.org Signed-off-by: Doug Ledford arch/arm/include/asm/device.h | 1 - arch/arm/include/asm/dma-mapping.h | 6 +++--- arch/arm64/include/asm/device.h | 1 - arch/arm64/include/asm/dma-mapping.h | 4 ++-- arch/arm64/mm/dma-mapping.c | 8 ++++---- arch/m32r/include/asm/device.h | 1 - arch/m32r/include/asm/dma-mapping.h | 4 ++-- arch/mips/include/asm/device.h | 5 ----- arch/mips/include/asm/dma-mapping.h | 4 ++-- arch/mips/pci/pci-octeon.c | 2 +- arch/powerpc/include/asm/device.h | 4 ---- arch/powerpc/include/asm/dma-mapping.h | 4 ++-- arch/powerpc/kernel/dma.c | 2 +- arch/powerpc/platforms/cell/iommu.c | 2 +- arch/powerpc/platforms/pasemi/iommu.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 2 +- arch/powerpc/platforms/ps3/system-bus.c | 4 ++-- arch/powerpc/platforms/pseries/ibmebus.c | 2 +- arch/s390/include/asm/device.h | 1 - arch/s390/include/asm/dma-mapping.h | 4 ++-- arch/s390/pci/pci.c | 2 +- arch/tile/include/asm/device.h | 3 --- arch/tile/include/asm/dma-mapping.h | 6 +++--- arch/x86/include/asm/device.h | 3 --- arch/x86/include/asm/dma-mapping.h | 4 ++-- arch/x86/kernel/pci-calgary_64.c | 4 ++-- arch/x86/pci/common.c | 2 +- arch/x86/pci/sta2x11-fixup.c | 8 ++++---- arch/xtensa/include/asm/device.h | 4 ---- arch/xtensa/include/asm/dma-mapping.h | 4 ++-- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- drivers/iommu/amd_iommu.c | 6 +++--- drivers/misc/mic/bus/mic_bus.c | 2 +- drivers/misc/mic/bus/scif_bus.c | 2 +- drivers/misc/mic/bus/vop_bus.c | 2 +- include/linux/device.h | 1 + 36 files changed, 48 insertions(+), 70 deletions(-) commit 5299709d0a87342dadc1fc9850484fadeb488bf8 Author: Bart Van Assche Date: Fri Jan 20 13:04:01 2017 -0800 treewide: Constify most dma_map_ops structures Most dma_map_ops structures are never modified. Constify these structures such that these can be write-protected. This patch has been generated as follows: git grep -l 'struct dma_map_ops' | xargs -d\\n sed -i \ -e 's/struct dma_map_ops/const struct dma_map_ops/g' \ -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \ -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \ -e 's/const const struct dma_map_ops /const struct dma_map_ops /g'; sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \ $(git grep -l 'struct dma_map_ops intel_dma_ops'); sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \ $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc); sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \ -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \ -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \ drivers/pci/host/*.c sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: David Woodhouse Cc: Juergen Gross Cc: H. Peter Anvin Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Russell King Cc: x86@kernel.org Signed-off-by: Doug Ledford arch/alpha/include/asm/dma-mapping.h | 4 +-- arch/alpha/kernel/pci-noop.c | 4 +-- arch/alpha/kernel/pci_iommu.c | 4 +-- arch/arc/include/asm/dma-mapping.h | 4 +-- arch/arc/mm/dma.c | 2 +- arch/arm/common/dmabounce.c | 2 +- arch/arm/include/asm/device.h | 2 +- arch/arm/include/asm/dma-mapping.h | 10 +++--- arch/arm/mm/dma-mapping.c | 22 ++++++------ arch/arm/xen/mm.c | 4 +-- arch/arm64/include/asm/device.h | 2 +- arch/arm64/include/asm/dma-mapping.h | 6 ++-- arch/arm64/mm/dma-mapping.c | 6 ++-- arch/avr32/include/asm/dma-mapping.h | 4 +-- arch/avr32/mm/dma-coherent.c | 2 +- arch/blackfin/include/asm/dma-mapping.h | 4 +-- arch/blackfin/kernel/dma-mapping.c | 2 +- arch/c6x/include/asm/dma-mapping.h | 4 +-- arch/c6x/kernel/dma.c | 2 +- arch/cris/arch-v32/drivers/pci/dma.c | 2 +- arch/cris/include/asm/dma-mapping.h | 6 ++-- arch/frv/include/asm/dma-mapping.h | 4 +-- arch/frv/mb93090-mb00/pci-dma-nommu.c | 2 +- arch/frv/mb93090-mb00/pci-dma.c | 2 +- arch/h8300/include/asm/dma-mapping.h | 4 +-- arch/h8300/kernel/dma.c | 2 +- arch/hexagon/include/asm/dma-mapping.h | 4 +-- arch/hexagon/kernel/dma.c | 4 +-- arch/ia64/hp/common/hwsw_iommu.c | 4 +-- arch/ia64/hp/common/sba_iommu.c | 4 +-- arch/ia64/include/asm/dma-mapping.h | 2 +- arch/ia64/include/asm/machvec.h | 4 +-- arch/ia64/kernel/dma-mapping.c | 4 +-- arch/ia64/kernel/pci-dma.c | 10 +++--- arch/ia64/kernel/pci-swiotlb.c | 2 +- arch/m32r/include/asm/device.h | 2 +- arch/m32r/include/asm/dma-mapping.h | 2 +- arch/m68k/include/asm/dma-mapping.h | 4 +-- arch/m68k/kernel/dma.c | 2 +- arch/metag/include/asm/dma-mapping.h | 4 +-- arch/metag/kernel/dma.c | 2 +- arch/microblaze/include/asm/dma-mapping.h | 4 +-- arch/microblaze/kernel/dma.c | 2 +- arch/mips/cavium-octeon/dma-octeon.c | 4 +-- arch/mips/include/asm/device.h | 2 +- arch/mips/include/asm/dma-mapping.h | 4 +-- .../include/asm/mach-cavium-octeon/dma-coherence.h | 2 +- arch/mips/include/asm/netlogic/common.h | 2 +- arch/mips/loongson64/common/dma-swiotlb.c | 2 +- arch/mips/mm/dma-default.c | 4 +-- arch/mips/netlogic/common/nlm-dma.c | 2 +- arch/mn10300/include/asm/dma-mapping.h | 4 +-- arch/mn10300/mm/dma-alloc.c | 2 +- arch/nios2/include/asm/dma-mapping.h | 4 +-- arch/nios2/mm/dma-mapping.c | 2 +- arch/openrisc/include/asm/dma-mapping.h | 4 +-- arch/openrisc/kernel/dma.c | 2 +- arch/parisc/include/asm/dma-mapping.h | 8 ++--- arch/parisc/kernel/drivers.c | 2 +- arch/parisc/kernel/pci-dma.c | 4 +-- arch/powerpc/include/asm/device.h | 2 +- arch/powerpc/include/asm/dma-mapping.h | 6 ++-- arch/powerpc/include/asm/pci.h | 4 +-- arch/powerpc/include/asm/swiotlb.h | 2 +- arch/powerpc/kernel/dma-swiotlb.c | 2 +- arch/powerpc/kernel/dma.c | 6 ++-- arch/powerpc/kernel/pci-common.c | 6 ++-- arch/powerpc/platforms/cell/iommu.c | 4 +-- arch/powerpc/platforms/powernv/npu-dma.c | 2 +- arch/powerpc/platforms/ps3/system-bus.c | 4 +-- arch/powerpc/platforms/pseries/ibmebus.c | 2 +- arch/powerpc/platforms/pseries/vio.c | 2 +- arch/s390/include/asm/device.h | 2 +- arch/s390/include/asm/dma-mapping.h | 4 +-- arch/s390/pci/pci_dma.c | 2 +- arch/sh/include/asm/dma-mapping.h | 4 +-- arch/sh/kernel/dma-nommu.c | 2 +- arch/sh/mm/consistent.c | 2 +- arch/sparc/include/asm/dma-mapping.h | 8 ++--- arch/sparc/kernel/iommu.c | 4 +-- arch/sparc/kernel/ioport.c | 8 ++--- arch/sparc/kernel/pci_sun4v.c | 2 +- arch/tile/include/asm/device.h | 2 +- arch/tile/include/asm/dma-mapping.h | 12 +++---- arch/tile/kernel/pci-dma.c | 24 ++++++------- arch/unicore32/include/asm/dma-mapping.h | 4 +-- arch/unicore32/mm/dma-swiotlb.c | 2 +- arch/x86/include/asm/device.h | 4 +-- arch/x86/include/asm/dma-mapping.h | 4 +-- arch/x86/include/asm/iommu.h | 2 +- arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/pci-calgary_64.c | 2 +- arch/x86/kernel/pci-dma.c | 4 +-- arch/x86/kernel/pci-nommu.c | 2 +- arch/x86/kernel/pci-swiotlb.c | 2 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/xen/pci-swiotlb-xen.c | 2 +- arch/xtensa/include/asm/device.h | 2 +- arch/xtensa/include/asm/dma-mapping.h | 4 +-- arch/xtensa/kernel/pci-dma.c | 2 +- drivers/iommu/amd_iommu.c | 4 +-- drivers/misc/mic/bus/mic_bus.c | 2 +- drivers/misc/mic/bus/scif_bus.c | 2 +- drivers/misc/mic/bus/scif_bus.h | 2 +- drivers/misc/mic/bus/vop_bus.c | 2 +- drivers/misc/mic/host/mic_boot.c | 4 +-- drivers/parisc/ccio-dma.c | 2 +- drivers/parisc/sba_iommu.c | 2 +- drivers/pci/host/vmd.c | 2 +- include/linux/dma-mapping.h | 42 +++++++++++----------- include/linux/mic_bus.h | 2 +- include/xen/arm/hypervisor.h | 2 +- lib/dma-noop.c | 2 +- 113 files changed, 227 insertions(+), 227 deletions(-) commit 4548b683b78137f8eadeb312b94e20bb0d4a7141 Author: Krister Johansen Date: Fri Jan 20 17:49:11 2017 -0800 Introduce a sysctl that modifies the value of PROT_SOCK. Add net.ipv4.ip_unprivileged_port_start, which is a per namespace sysctl that denotes the first unprivileged inet port in the namespace. To disable all privileged ports set this to zero. It also checks for overlap with the local port range. The privileged and local range may not overlap. The use case for this change is to allow containerized processes to bind to priviliged ports, but prevent them from ever being allowed to modify their container's network configuration. The latter is accomplished by ensuring that the network namespace is not a child of the user namespace. This modification was needed to allow the container manager to disable a namespace's priviliged port restrictions without exposing control of the network namespace to processes in the user namespace. Signed-off-by: Krister Johansen Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 9 ++++++ include/net/ip.h | 10 +++++++ include/net/netns/ipv4.h | 1 + net/ipv4/af_inet.c | 5 +++- net/ipv4/sysctl_net_ipv4.c | 50 +++++++++++++++++++++++++++++++++- net/ipv6/af_inet6.c | 3 +- net/netfilter/ipvs/ip_vs_ctl.c | 7 ++--- net/sctp/socket.c | 10 ++++--- security/selinux/hooks.c | 3 +- 9 files changed, 86 insertions(+), 12 deletions(-) commit dbbc21bbf2c640dd148903e82f752c2f269fc58a Merge: f6fa11a 7ce7d89 Author: Mark Brown Date: Tue Jan 24 16:24:18 2017 +0000 Merge tag 'v4.10-rc1' into asoc-intel Linux 4.10-rc1 commit 73b2951414f661e22dc4b88e4e6590c9406cf822 Author: Kefeng Wang Date: Tue Jan 24 20:08:29 2017 +0800 ata: pata_of_platform: using of_property_read_u32() helper Using better of_property_read_u32() than generic of_get_property(). Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Tejun Heo Signed-off-by: Kefeng Wang Signed-off-by: Tejun Heo drivers/ata/pata_of_platform.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8c4bc910633d942b4422e8b264c39a48e230a261 Author: Andrew Murray Date: Mon Jan 23 22:04:03 2017 +0000 ARM: OMAP: clock: Remove unused mpurate cmdline option The 'mpurate' option, historically used for specifying an initial MPU rate at boot, no longer has any effect due to the supporting code being removed as it was 'wrong and dangerous' [1]. This patch removes the remaining dead code associated with the __setup macros to avoid confusion and reduce bloat. [1] https://patchwork.kernel.org/patch/5954631/ Signed-off-by: Andrew Murray Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren arch/arm/mach-omap1/clock.c | 20 --------------- arch/arm/mach-omap1/clock.h | 2 -- arch/arm/mach-omap2/clock.c | 61 --------------------------------------------- arch/arm/mach-omap2/clock.h | 4 --- 4 files changed, 87 deletions(-) commit e33a316a5415fd53938f6a92144e3e0fe5ddfa71 Merge: 8dd6666 57b6bfc Author: Tony Lindgren Date: Tue Jan 24 07:19:08 2017 -0800 Merge branch 'omap-for-v4.11/omap1' into omap-for-v4.11/soc commit ac57feb25833a6f3832a436d28808ffc16c672b3 Author: Teresa Remmet Date: Tue Jan 24 11:09:36 2017 +0100 ARM: omap2plus_defconfig: Enable support for RTC M41T80 The phyCORE-AM335x SoM has a RV4162 RTC populated which is supported by the M41T80 driver. Enabled it so make the RTC support on the SoM available. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit e5e6cf4b8179cbf54e620bba76a6da2e3ca7ed43 Author: Teresa Remmet Date: Tue Jan 24 11:09:35 2017 +0100 ARM: omap2plus_defconfig: Enable support for micrell phys The phyCORE-AM335x SoM with PCM-953 carrierboard has a KSZ9021 phy mounted. To add support for this we need to enable the micrell phy driver in the config. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 3c6aea7344c363f298bfb9952e2906b9574f59dc Author: Sevak Arakelyan Date: Mon Jan 23 15:01:45 2017 -0800 usb: dwc2: gadget: Add checking for g-tx-fifo-size parameter Add dwc2_check_param_tx_fifo_sizes function which validates the members of g_tx_fifo_size array and sets to average or default values if it is needed. Cc: Stefan Wahren Signed-off-by: Sevak Arakelyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit c138ecfa6108edee17fabfa56285b00f66641659 Author: Sevak Arakelyan Date: Mon Jan 23 15:01:23 2017 -0800 usb: dwc2: gadget: Set TX FIFO depths to calculated defaults Remove legacy DWC2_G_P_LEGACY_TX_FIFO_SIZE array for TX FIFOs. Update dwc2_set_param_tx_fifo_sizes function to calculate and assign default average FIFO depth to each member of g_tx_fifo_size array. Total FIFO size, EP Info block's size, FIFO operation mode and device operation mode are taken into consideration during the calculation. Cc: Stefan Wahren Signed-off-by: Sevak Arakelyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 16 ++++---- drivers/usb/dwc2/gadget.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/params.c | 12 ++++-- 3 files changed, 110 insertions(+), 11 deletions(-) commit e1f411d1b3db49a2089f47087410dcfec6564e28 Author: Sevak Arakelyan Date: Mon Jan 23 15:01:01 2017 -0800 usb: dwc2: host: Correct snpsid checking for GDFIFOCFG GDFIFOCFG is available from IP version 2.91a. Fix the code to reflect this. Signed-off-by: Sevak Arakelyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit d3fe81d2ccc41b355e494413115c0c7c18426fa1 Author: Nicholas Mc Guire Date: Mon Jan 23 15:00:40 2017 -0800 usb: dwc2: host: use msleep() for long delay ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 100ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 2938fc63e0c2 ("usb: dwc2: Properly account for the force mode delays") Signed-off-by: Nicholas Mc Guire Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca8b03324877e1804161fd4e0100d49f03ad9fce Author: Chen Yu Date: Mon Jan 23 15:00:18 2017 -0800 usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220 The Hi6220's usb controller is limited in that it does not support "Split Transactions", so it does not support communicating with low-speed and full-speed devices behind a high-speed hub. Thus it requires a quirk so that we can manually drop the usb speed when low/full-speed are attached, and bump back to high speed when they are removed. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 7 ++++++ drivers/usb/dwc2/hcd.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/params.c | 1 + 3 files changed, 68 insertions(+) commit 9156a7ef1c3ba482f85f2733edcde2b10189de8c Author: Chen Yu Date: Mon Jan 23 14:59:57 2017 -0800 usb: dwc2: Force port resume on switching to device mode We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fc30c4bb44a3665edcc76bd7af93f009bc9dc672 Author: John Stultz Date: Mon Jan 23 14:59:35 2017 -0800 usb: dwc2: Workaround case where GOTGCTL state is wrong When removing a USB-A to USB-otg adapter cable, we get a change status irq, and then in dwc2_conn_id_status_change, we erroneously see the GOTGCTL_CONID_B flag set. This causes us to get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, spitting out "Waiting for Peripheral Mode, Mode=Host" warnings until it fails out many seconds later. This patch works around the issue by re-reading the GOTGCTL state to check if the GOTGCTL_CONID_B is still set and if not restarting the change status logic. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Reviewed-by: Vardan Mikayelyan Signed-off-by: John Stultz Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6e6360b67d12370638ad1bc8943cc63d4c89da27 Author: John Stultz Date: Mon Jan 23 14:59:14 2017 -0800 usb: dwc2: Avoid sleeping while holding hsotg->lock Basically when plugging in various cables in different orders, I'm occasionally seeing the following BUG splat: [ 86.215403] BUG: scheduling while atomic: kworker/u16:2/53/0x00000002 [ 86.219164] usb 1-1: USB disconnect, device number 9 [ 86.226845] Preemption disabled at:[ 86.230218] [] dwc2_conn_id_status_change+0x120/0x250 [ 86.236894] CPU: 0 PID: 53 Comm: kworker/u16:2 Tainted: G W 4.9.0-rc8-00051-gd5a7979-dirty #1702 [ 86.246836] Hardware name: HiKey Development Board (DT) [ 86.252100] Workqueue: dwc2 dwc2_conn_id_status_change [ 86.257279] Call trace: [ 86.259771] [] dump_backtrace+0x0/0x1a0 [ 86.265210] [] show_stack+0x14/0x20 [ 86.270308] [] dump_stack+0x90/0xb0 [ 86.275401] [] __schedule_bug+0x6c/0xb8 [ 86.280841] [] __schedule+0x4f8/0x5b0 [ 86.286099] [] schedule+0x38/0xa0 [ 86.291017] [] schedule_hrtimeout_range_clock+0x8c/0xf0 [ 86.297846] [] schedule_hrtimeout_range+0x10/0x18 [ 86.304150] [] usleep_range+0x50/0x58 [ 86.309418] [] dwc2_wait_for_mode.isra.4+0x54/0xd0 [ 86.315815] [] dwc2_core_reset+0xe0/0x168 [ 86.321431] [] dwc2_hsotg_core_init_disconnected+0x2c/0x310 [ 86.328602] [] dwc2_conn_id_status_change+0x130/0x250 [ 86.335254] [] process_one_work+0x118/0x370 [ 86.341035] [] worker_thread+0x48/0x498 [ 86.346473] [] kthread+0xd0/0xe8 [ 86.351299] [] ret_from_fork+0x10/0x50 This seems to be caused by the dwc2_wait_for_mode() calling usleep_range() while the hstog->lock spinlock is held, since we take that before calling dwc2_hsotg_core_init_disconnected(). This patch avoids the issue by adding an extra argument to dwc2_core_reset(), as suggested by John Youn, which allows us to skip the waiting, which should be unnecessary when calling from dwc2_hsotg_core_init_disconnected(). Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 6 +++--- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/gadget.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 2124f9e673124b72fdbd2d534526ab76f0771766 Author: John Youn Date: Mon Jan 23 14:58:52 2017 -0800 usb: dwc2: Show dr_mode via debugfs Show the value of dr_mode via a debufs file. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/debugfs.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 5dc6422564b3f6ab8f87611ca1ade3adb369770b Author: John Youn Date: Mon Jan 23 14:58:31 2017 -0800 usb: dwc2: Remove debug prints in params.c Remove debugging prints to show params. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) commit 4bd1ac641c7c76ab7f74810c28c74d2b993248bc Author: John Youn Date: Mon Jan 23 14:58:09 2017 -0800 usb: dwc2: Add debugfs file to show params Show the core params and hardware params. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/debugfs.c | 127 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) commit 06e75df1b98eda998ec693e7eaa79f61cdf2d4b3 Author: John Youn Date: Mon Jan 23 14:57:48 2017 -0800 usb: dwc2: Remove unnecessary parameters Further reduce the set of parameters set by platforms. Many of them are unnecessary as they should be reported by hardware. They should only need to be overridden if there is a problem. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 11 ----------- 1 file changed, 11 deletions(-) commit 95832c00bc5ce3ed140f5f9b669803f75ac1431e Author: John Youn Date: Mon Jan 23 14:57:26 2017 -0800 usb: dwc2: Fix usage of bool params Check these parameters only for true or false. There is no need to check for greater or less than 0. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 4 +- drivers/usb/dwc2/core.h | 5 -- drivers/usb/dwc2/core_intr.c | 2 +- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c | 113 +++++++++++++++++++++---------------------- drivers/usb/dwc2/hcd_ddma.c | 4 +- drivers/usb/dwc2/hcd_intr.c | 45 +++++++++-------- drivers/usb/dwc2/hcd_queue.c | 14 +++--- drivers/usb/dwc2/params.c | 4 +- 9 files changed, 93 insertions(+), 100 deletions(-) commit 7de1debcd2de17c6dc2471f0f57fb0fd456d2b41 Author: John Youn Date: Mon Jan 23 14:57:04 2017 -0800 usb: dwc2: Remove platform static params Remove the platform-specific static param structs and set only those params that are necessary for each platform. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 262 +++++++++++++++++++--------------------------- 1 file changed, 108 insertions(+), 154 deletions(-) commit d936e666aea157a6c552334cce30bce2ae4576b3 Author: John Youn Date: Mon Jan 23 14:56:43 2017 -0800 usb: dwc2: Check core parameters Check that core parameters have valid values and adjust them if they aren't. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 185 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) commit 57b8e23511408e45e8948616cc3345dc3e08d20b Author: John Youn Date: Mon Jan 23 14:56:20 2017 -0800 usb: dwc2: Rearrange param structure members Group the members by global, host, and gadget params. Formatting and organizational change only. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 51 ++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) commit d21bcc3f035ce324f43903c29f9931ebcd0b2c44 Author: John Youn Date: Mon Jan 23 14:55:58 2017 -0800 usb: dwc2: Update parameter types Update the param types to appropriately sized ints and bools. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit f9f93cbb3c11e56d500fd77beb8eac6ded534d6c Author: John Youn Date: Mon Jan 23 14:55:35 2017 -0800 usb: dwc2: Get device properties After setting the default core parameter values, read in the device properties and modify core parameter values if needed. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 245977c967eee19de4d5e95ec67227dcfe57b0e2 Author: John Youn Date: Mon Jan 23 14:55:14 2017 -0800 usb: dwc2: Set core parameters to default values Initialize the core parameters to their default, auto-detected values. Remove all the previous dwc2_set_param* methods. Most of what this code is doing is handling defaults for "not set" values and other trivial checks. The checking can be simplified and will be done in a later commit. This allows us to change only those parameters that won't work with default settings. It also allows us to use non-int parameters. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 - drivers/usb/dwc2/params.c | 990 ++++------------------------------------------ 2 files changed, 75 insertions(+), 919 deletions(-) commit 0f3a7459ae2fd47cce099735ea3260979729cbfd Author: John Youn Date: Mon Jan 23 14:54:52 2017 -0800 usb: dwc2: Remove unused otg_ver parameter The otg_ver parameter only controls the SRP pulsing method and defaults to the 1.3 behavior. It is unused and can be removed. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 5 ----- drivers/usb/dwc2/core.h | 9 --------- drivers/usb/dwc2/hcd.c | 3 --- drivers/usb/dwc2/params.c | 23 ----------------------- 4 files changed, 40 deletions(-) commit 749494b6bdbbaf0899aa1c62a1ad74cd747bce47 Author: Krzysztof Opasiak Date: Tue Jan 24 03:27:24 2017 +0100 usb: gadget: f_hid: fix: Move IN request allocation to set_alt() Since commit: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()") we cannot allocate any requests in bind() as we check if we should align request buffer based on endpoint descriptor which is assigned in set_alt(). Allocating request in bind() function causes a NULL pointer dereference. This commit moves allocation of IN request from bind() to set_alt() to prevent this issue. Fixes: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()") Cc: stable@vger.kernel.org Tested-by: David Lechner Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 89 ++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 22 deletions(-) commit 5aaac4278afa6ef8a42dc2c51f3e1a1a20d5bd97 Author: afzal mohammed Date: Tue Jan 24 03:34:06 2017 +0530 ARM: vf610m4: defconfig: enable EXT4 filesystem Enable EXT4_FS to have rootfs in EXT[2-4]. Other changes are result of savedefconfig keeping minimal config (even without enabling EXT4_FS, these would be present). Signed-off-by: afzal mohammed Signed-off-by: Shawn Guo arch/arm/configs/vf610m4_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1e9bbb9bc2aa549d31fa0a0496ec33df0b3ae7a8 Author: Colin Ian King Date: Wed Jan 11 15:02:38 2017 +0000 can: softing_cs: ret is never non-zero, so remove non-zero check and -ENODEV return The error return ret is never zero in the error handling path in softingcs_probe, so the check for non-zero and returning -ENODEV is logically dead code and hence redundant. Remove it and just return ret. Signed-off-by: Colin Ian King Signed-off-by: Marc Kleine-Budde drivers/net/can/softing/softing_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 431af779256cd6cb8328ac23c5696bae63c33a51 Author: Marc Kleine-Budde Date: Wed Jan 11 17:05:35 2017 +0100 can: dev: add CAN interface API for fixed bitrates Some CAN interfaces only support fixed fixed bitrates. This patch adds a netlink interface to get the list of the CAN interface's fixed bitrates and data bitrates. Inside the driver arrays of supported data- bitrate values are defined. const u32 drvname_bitrate[] = { 20000, 50000, 100000 }; const u32 drvname_data_bitrate[] = { 200000, 500000, 1000000 }; struct drvname_priv *priv; priv = netdev_priv(dev); priv->bitrate_const = drvname_bitrate; priv->bitrate_const_cnt = ARRAY_SIZE(drvname_bitrate); priv->data_bitrate_const = drvname_data_bitrate; priv->data_bitrate_const_cnt = ARRAY_SIZE(drvname_data_bitrate); Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 81 ++++++++++++++++++++++++++++++++-------- include/linux/can/dev.h | 4 ++ include/uapi/linux/can/netlink.h | 2 + 3 files changed, 71 insertions(+), 16 deletions(-) commit c3606d438a14faa8319eccb75b9502960a97af16 Author: Marc Kleine-Budde Date: Fri Jan 6 11:12:41 2017 +0100 can: dev: can_changelink: allow to set bitrate on devices not providing {data_,}bittiming_const Until commit 08da7da41ea4 can: provide a separate bittiming_const parameter to bittiming functions it was possible to have devices not providing bittiming_const. This can be used for hardware that only support pre-defined fixed bitrates. Although no mainline driver is using this feature so far. This patch re-introduces this feature for the bitrate and the data bitrate (of CANFD controllers). The driver can specify the {data_,}bittiming_const (if the bittiming parameters should be calculated from the bittiming_const) as before or no {data_,}bittiming_const but implement the do_set_{data,}bittiming callback. Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 12a6075cabc0d9ffbc0366b44daa22f278606312 Author: Oliver Hartkopp Date: Tue Jan 10 18:52:06 2017 +0100 can: dev: add CAN interface termination API This patch adds a netlink interface to configure the CAN bus termination of CAN interfaces. Inside the driver an array of supported termination values is defined: const u16 drvname_termination[] = { 60, 120, CAN_TERMINATION_DISABLED }; struct drvname_priv *priv; priv = netdev_priv(dev); priv->termination_const = drvname_termination; priv->termination_const_cnt = ARRAY_SIZE(drvname_termination); priv->termination = CAN_TERMINATION_DISABLED; And the funtion to set the value has to be defined: priv->do_set_termination = drvname_set_termination; Signed-off-by: Oliver Hartkopp Reviewed-by: Ramesh Shanmugasundaram Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 49 +++++++++++++++++++++++++++++++++++++++- include/linux/can/dev.h | 4 ++++ include/uapi/linux/can/netlink.h | 5 ++++ 3 files changed, 57 insertions(+), 1 deletion(-) commit 37dfe2afc5618d42d3214a61ed017ce4bbc12254 Author: Chris Brandt Date: Mon Jan 23 08:55:20 2017 -0500 ARM: dts: rskrza1: add ostm DT support Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-rskrza1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 69b5c6dceaa138859f03ca20e3adca7ddec6bae7 Author: Chris Brandt Date: Mon Jan 23 08:55:19 2017 -0500 ARM: dts: r7s72100: add ostm to device tree Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit cfddd3db08f619bf0c1764b3103caedb6793bc48 Author: Chris Brandt Date: Mon Jan 23 08:55:18 2017 -0500 ARM: dts: r7s72100: add ostm clock to device tree Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 9 +++++++++ include/dt-bindings/clock/r7s72100-clock.h | 4 ++++ 2 files changed, 13 insertions(+) commit d589d8b83503c1f153965f4c2747349ccca6995e Author: Charles Keepax Date: Tue Jan 24 11:44:01 2017 +0000 ASoC: wm_adsp: Fixup wm_adsp2_boot_work error paths Currently we are not disabling MEM_ENA on the error path, we should really do this to unwind the state back to how it was. This patch adds a clear of MEM_ENA on the error path, again there is no major issues caused by this minor fix. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e779974b86491cc938dfdcbfbf8fb363a40bc9ea Author: Charles Keepax Date: Tue Jan 24 11:44:00 2017 +0000 ASoC: wm_adsp: Set booted/running flags at the end of bring up The booted and running flags should really only be set once all the steps at that power level have been complete. Currently operations can fail after the flags have been set, which would leave us in an inconsistent state where the flags are set but the things expected to reach that level have not happened. Whilst there isn't really any major impact from this it is best to clean it up. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bb24ee411ae949eaffe24c6be2b3d87f271507b5 Author: Charles Keepax Date: Tue Jan 24 11:43:59 2017 +0000 ASoC: wm_adsp: Correct some missing locking The recent refactoring overlooked some places which should be covered by the pwr_lock, all code that affects or depends on the power status of the DSP should be covered, this patch adds the missing coverage. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e348dc74f798c2df31c685bf0c814396f4f3b735 Author: Dawei Chien Date: Tue Jan 17 17:24:09 2017 +0800 arm: dts: mt2701: Add thermal device node. Add thermal controller device nodes for MT2701. Signed-off-by: Dawei Chien Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 1331b62c97217459780e040e8a66bb609f2acd20 Author: Johannes Berg Date: Mon Jan 2 16:01:57 2017 +0100 rfkill: remove rfkill-regulator There are no users of this ("vrfkill") in the tree, so it's just dead code - remove it. This also isn't really how rfkill is supposed to be used - it's intended as a signalling mechanism to/from the device, which the driver (and partially cfg80211) will handle - having a separate rfkill instance for a regulator is confusing, the driver should use the regulator instead to turn off the device when requested. Signed-off-by: Johannes Berg include/linux/rfkill-regulator.h | 48 ------------ net/rfkill/Kconfig | 11 --- net/rfkill/Makefile | 1 - net/rfkill/rfkill-regulator.c | 154 --------------------------------------- 4 files changed, 214 deletions(-) commit 57eeb2086d6477968990e1790a9d8d0ec7ee8a4d Author: Johannes Berg Date: Fri Jan 13 11:12:01 2017 +0100 mac80211: fix documentation warnings For a few restructured text warnings in mac80211, making the documentation warning-free (for now). In order to not add trailing whitespace, but also not introduce too much noise into this change, move just the affected docs into inline comments. Signed-off-by: Johannes Berg include/net/mac80211.h | 74 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 29 deletions(-) commit c6c94aea821640ac422c435f9d4c895af76ed6f6 Author: Johannes Berg Date: Fri Jan 13 10:02:13 2017 +0100 cfg80211: fix a documentation warning The new restructured text parser complains about the formatting, and really this should be a definition list. In order to fix this without introducing trailing whitespace, convert to the inline kernel-doc format. Signed-off-by: Johannes Berg include/net/cfg80211.h | 63 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 16 deletions(-) commit 442ffefc0c3f6fa854dbda2e2d5e15473ad8f5a6 Author: Chris Wilson Date: Mon Jan 23 09:53:57 2017 +0000 drm/vgem: Switch to reservation_object_lock() helpers For the convenience of encapsulation the reservation object's ww_mutex was wrapped in pair of lock/unlock helpers. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170123095357.29514-1-chris@chris-wilson.co.uk drivers/gpu/drm/vgem/vgem_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6a9534cdd19f1c1bab76538c529ce92d85eb4d8 Author: Noralf Trønnes Date: Sun Jan 22 19:11:11 2017 +0100 drm/simple-helpers: Add missing includes Add missing includes to pull in definitions for drm_crtc, drm_plane and drm_encoder. Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170122181117.8210-4-noralf@tronnes.org include/drm/drm_simple_kms_helper.h | 4 ++++ 1 file changed, 4 insertions(+) commit a4405b567eb9d29bc4ff911b9377077a94663f57 Author: Noralf Trønnes Date: Sun Jan 22 19:11:09 2017 +0100 drm/fb-cma-helper: Add drm_fbdev_cma_set_suspend_unlocked() Add a CMA version of drm_fb_helper_set_suspend_unlocked(). Cc: laurent.pinchart@ideasonboard.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170122181117.8210-2-noralf@tronnes.org drivers/gpu/drm/drm_fb_cma_helper.c | 18 ++++++++++++++++++ include/drm/drm_fb_cma_helper.h | 2 ++ 2 files changed, 20 insertions(+) commit b46b54a55841ceaba8097460dfa8e65435872c0e Author: Chris Wilson Date: Sat Jan 21 18:19:44 2017 +0000 drm: Update drm_cache.c to pull in the new drm_cache.h The prototypes were moved to a new header, but the function definitions were not updated to pull in the declarations. drivers/gpu/drm/drm_cache.c:79:1: warning: no previous prototype for ‘drm_clflush_pages’ [-Wmissing-prototypes] drivers/gpu/drm/drm_cache.c:120:1: warning: no previous prototype for ‘drm_clflush_sg’ [-Wmissing-prototypes] drivers/gpu/drm/drm_cache.c:152:1: warning: no previous prototype for ‘drm_clflush_virt_range’ [-Wmissing-prototypes] Fixes: f9a87bd7d5b6 ("drm: Move drm_clflush prototypes to drm_cache header file") Signed-off-by: Chris Wilson Cc: Gabriel Krisman Bertazi Cc: Alex Deucher Cc: Daniel Vetter Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170121181944.24672-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 977ac789507a0270e4ac9426bfedcb37946bb084 Author: Bhumika Goyal Date: Mon Jan 23 22:56:04 2017 +0530 usb: gadget: udc: constify usb_ep_ops structures Declare usb_ep_ops structures as const as they are only stored in the ops field of an usb_ep structure. This field is of type const, so usb_ep_ops structures having this property can be made const too. Done using Coccinelle( A smaller version of the script) @r disable optional_qualifier@ identifier i; position p; @@ static struct usb_ep_ops i@p={...}; @ok@ identifier r.i; position p; struct mv_ep a; struct mv_u3d_ep b; struct omap_ep c; @@ ( a.ep.ops=&i@p; | b.ep.ops=&i@p; | c.ep.ops=&i@p; ) @bad@ position p!={r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ +const struct usb_ep_ops i; File size details before and after applying the patch. First line of every .o file shows the file size before patching and second line shows the file size after patching. text data bss dec hex filename 7782 384 8 8174 1fee usb/gadget/udc/fotg210-udc.o 7878 296 8 8182 1ff6 usb/gadget/udc/fotg210-udc.o 17866 992 40 18898 49d2 usb/gadget/udc/fsl_udc_core.o 17954 896 40 18890 49ca usb/gadget/udc/fsl_udc_core.o 9646 288 8 9942 26d6 usb/gadget/udc/fusb300_udc.o 9742 192 8 9942 26d6 usb/gadget/udc/fusb300_udc.o 12752 416 8 13176 3378 drivers/usb/gadget/udc/goku_udc.o 12832 328 8 13168 3370 drivers/usb/gadget/udc/goku_udc.o 16541 1696 8 18245 4745 drivers/usb/gadget/udc/gr_udc.o 16637 1600 8 18245 4745 drivers/usb/gadget/udc/gr_udc.o 15798 288 16 16102 3ee6 drivers/usb/gadget/udc/m66592-udc.o 15894 192 16 16102 3ee6 drivers/usb/gadget/udc/m66592-udc.o 17751 3808 16 21575 5447 usb/gadget/udc/mv_u3d_core.o 17839 3712 16 21567 543f usb/gadget/udc/mv_u3d_core.o 17348 1112 24 18484 4834 usb/gadget/udc/mv_udc_core.o 17436 1016 24 18476 482c usb/gadget/udc/mv_udc_core.o 25990 2620 13 28623 6fcf drivers/usb/gadget/udc/net2272.o 26086 2524 13 28623 6fcf drivers/usb/gadget/udc/net2272.o 18409 7312 8 25729 6481 drivers/usb/gadget/udc/pxa27x_udc.o 18505 7208 8 25721 6479 drivers/usb/gadget/udc/pxa27x_udc.o 18644 288 16 18948 4a04 usb/gadget/udc/r8a66597-udc.o 18740 192 16 18948 4a04 usb/gadget/udc/r8a66597-udc.o Files: drivers/usb/gadget/udc/{s3c-hsudc.o/omap_udc.o/fsl_qe_udc.o} did not complie. Signed-off-by: Bhumika Goyal Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fotg210-udc.c | 2 +- drivers/usb/gadget/udc/fsl_qe_udc.c | 2 +- drivers/usb/gadget/udc/fsl_udc_core.c | 2 +- drivers/usb/gadget/udc/fusb300_udc.c | 2 +- drivers/usb/gadget/udc/goku_udc.c | 2 +- drivers/usb/gadget/udc/gr_udc.c | 2 +- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/gadget/udc/mv_u3d_core.c | 2 +- drivers/usb/gadget/udc/mv_udc_core.c | 2 +- drivers/usb/gadget/udc/net2272.c | 4 ++-- drivers/usb/gadget/udc/omap_udc.c | 2 +- drivers/usb/gadget/udc/pxa27x_udc.c | 2 +- drivers/usb/gadget/udc/r8a66597-udc.c | 2 +- drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) commit 741d2558bf0aa8da9c0834ad43e1b9a1b16aa515 Author: Cristian Birsan Date: Mon Jan 23 16:45:59 2017 +0200 usb: gadget: udc: atmel: Update endpoint allocation scheme This patch updates the usb endpoint allocation scheme for atmel usba driver to make sure all endpoints are allocated in order. This requirement comes from the datasheet of the controller. The allocation scheme is decided by fifo_mode parameter. For fifo_mode = 0 the driver tries to autoconfigure the endpoints fifo size. All other modes contain fixed configurations optimized for different purposes. The idea is somehow similar with the approach used on musb driver. Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 14 ++ drivers/usb/gadget/udc/atmel_usba_udc.c | 236 +++++++++++++++++++++++++++----- drivers/usb/gadget/udc/atmel_usba_udc.h | 10 +- 3 files changed, 227 insertions(+), 33 deletions(-) commit 41dc9ac163e76718d445a8149f8ce635375c8c38 Author: Vincent Pelletier Date: Mon Jan 23 14:41:04 2017 +0000 usb: gadget: f_fs: Accept up to 30 endpoints. It is allowed by the USB specification to enabled same-address, opposite- direction endpoints simultaneously, which means 30 non-zero endpoints are allowed. So double eps_addrmap length to 30. The original code only accepted 14 descriptors out of a likely intended 15 (as there are 15 endpoint addresses, ignoring direction), because the first eps_addrmap entry is unused (it is a placeholder for endpoint zero). So increase eps_addrmap length by one to 31. Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/function/u_fs.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit f199a80cfece94b67f9e3d2955666e47c6051517 Author: Vincent Pelletier Date: Tue Jan 17 13:20:11 2017 +0000 usb: gadger: f_fs: Do not copy past descriptor end. Endpoint descriptors come in 2 sizes, struct usb_endpoint_descriptor being the largest. Use bLength to stop on endpoint descriptor boundary, and not 2 bytes too far. Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a98feef743a254fc976a1db8b773a3cd9fec1a30 Author: Baolin Wang Date: Wed Jan 18 20:19:49 2017 +0800 usb: phy: fsl: Remove the set_power callback Since the set_power callback did not do anything for power setting, then remove it. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/phy/phy-fsl-usb.c | 12 ------------ 1 file changed, 12 deletions(-) commit 7b61980a99dfa36eb40df8b7c56bde3f29de0ae9 Author: Baolin Wang Date: Wed Jan 18 20:19:48 2017 +0800 usb: phy: msm: Remove the set_power callback Since it will not set the PMIC current drawn from USB configuration by set_power callback, then remove it. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 788c8abbef6c8bf979cafb83d84f0978deb5ab59 Author: Baolin Wang Date: Wed Jan 18 20:19:47 2017 +0800 usb: phy: ab8500: Remove the set_power callback There are no users will use the vbus_draw variable set by set_power() callback to set the vbus current. Thus we can remove it. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/phy/phy-ab8500-usb.c | 20 -------------------- 1 file changed, 20 deletions(-) commit f87c842f7268b4d4731446c00b354235b7998441 Author: Sevak Arakelyan Date: Wed Jan 18 18:34:19 2017 -0800 usb: dwc2: gadget: Set GDFIFOCFG Add programming of GDFIFOCFG register in device mode. It must contain start address for EP Info block and total FIFO depth. Signed-off-by: Sevak Arakelyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) commit e92b9d449d0490800160bfeb5ee1175a02979f47 Author: Peter Chen Date: Wed Jan 4 10:19:23 2017 +0800 usb: gadget: uac2: add req_number as parameter There are only two requests for uac2, it may not be enough at high loading system which usb interrupt handler can't be serviced on time, then the data will be lost since it is isoc transfer for audio. In this patch, we introduce a parameter for the number for usb request, and the user can override it if current number for request is not enough for his/her use case. Besides, update this parameter for legacy audio gadget and documentation. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi Documentation/usb/gadget-testing.txt | 2 ++ drivers/usb/gadget/function/f_uac2.c | 39 +++++++++++++++++++++++++++--------- drivers/usb/gadget/function/u_uac2.h | 2 ++ drivers/usb/gadget/legacy/audio.c | 1 + 4 files changed, 34 insertions(+), 10 deletions(-) commit ec33efe28f9f87e51cc79ce060ae0101eedd5a19 Author: John Youn Date: Tue Jan 17 20:32:41 2017 -0800 usb: dwc2: Fix sizeof in kzalloc Take the sizeof '*req' instead of 'struct dwc2_hsotg_req'. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2e91091330570655f2cd16fb3c624783387d8c Author: John Youn Date: Tue Jan 17 20:32:27 2017 -0800 usb: dwc2: Remove 'return' from void function The function returns void so a return is unnecessary. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_queue.c | 1 - 1 file changed, 1 deletion(-) commit 77b6200e186b2dd4babfe3801ca41df21408e454 Author: John Youn Date: Tue Jan 17 20:32:12 2017 -0800 usb: dwc2: Fix code indentation after conditionals The indent should be only one tab. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b98866c25aecac30f447e45b7d410e8fa009156e Author: John Youn Date: Tue Jan 17 20:31:58 2017 -0800 usb: dwc2: Fix lines over 80 characters Fix lines over 80 characters. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 13 +++++++++---- drivers/usb/dwc2/gadget.c | 14 +++++++++----- drivers/usb/dwc2/hcd.c | 4 ++-- drivers/usb/dwc2/hcd_intr.c | 13 +++++++------ drivers/usb/dwc2/params.c | 14 +++++++------- 5 files changed, 34 insertions(+), 24 deletions(-) commit 34c0887fde3489b10fb712ab0312ca735fc85dd4 Author: John Youn Date: Tue Jan 17 20:31:43 2017 -0800 usb: dwc2: Fix brace usage * Remove braces for one-line statements * Add missing braces where another arm in if-statement uses braces Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 10 ++++------ drivers/usb/dwc2/platform.c | 12 ++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) commit ab2832028f07f19da9587310d3a6978dc4a34d61 Author: John Youn Date: Tue Jan 17 20:31:28 2017 -0800 usb: dwc2: Fix logical continuations Fix the formatting of logical statements to end the line with the logical operator. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 5 ++--- drivers/usb/dwc2/hcd_ddma.c | 8 ++++---- drivers/usb/dwc2/hcd_queue.c | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) commit 38beaec6fc8857c7e2dd1dd05975ed5211281f38 Author: John Youn Date: Tue Jan 17 20:31:13 2017 -0800 usb: dwc2: Fix comment alignment and format Fix misaligned and over 80-character comments. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 19 ++++++++++--------- drivers/usb/dwc2/gadget.c | 43 +++++++++++++++++++++++-------------------- drivers/usb/dwc2/hcd.c | 2 +- drivers/usb/dwc2/hcd_intr.c | 37 +++++++++++++++++++++---------------- 4 files changed, 55 insertions(+), 46 deletions(-) commit 3b1920e782287af73bc234ace0f7d6db31a324d3 Author: John Youn Date: Tue Jan 17 20:30:58 2017 -0800 usb: dwc2: Add identifier in prototypes Fixes checkpatch warning: WARNING: function definition argument 'struct dwc2_hsotg *' should also have an identifier name Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9da5197475a09e51a467388308f14dcbdcee8ba9 Author: John Youn Date: Tue Jan 17 20:30:27 2017 -0800 usb: dwc2: Cleanup some checkpatch issues This commmit is the result of running checkpatch --fix. The results were verified for correctness. Some of the fixes result in line over 80 char which we will fix manually later. The following is a summary of what was done by checkpatch: * Remove externs on function prototypes. * Replace symbolic permissions with octal. * Align code to open parens. * Replace 'unsigned' with 'unsigned int'. * Remove unneccessary blank lines. * Add blank lines after declarations. * Add spaces around operators. * Remove unnecessary spaces after casts. * Replace 'x == NULL' with '!x'. * Replace kzalloc() with kcalloc(). * Concatenate multi-line strings. * Use the BIT() macro. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 22 +- drivers/usb/dwc2/core.h | 69 ++--- drivers/usb/dwc2/core_intr.c | 6 +- drivers/usb/dwc2/debug.h | 4 +- drivers/usb/dwc2/debugfs.c | 26 +- drivers/usb/dwc2/gadget.c | 142 +++++------ drivers/usb/dwc2/hcd.c | 35 ++- drivers/usb/dwc2/hcd.h | 76 +++--- drivers/usb/dwc2/hcd_ddma.c | 11 +- drivers/usb/dwc2/hcd_intr.c | 23 +- drivers/usb/dwc2/hcd_queue.c | 20 +- drivers/usb/dwc2/hw.h | 596 +++++++++++++++++++++---------------------- drivers/usb/dwc2/params.c | 14 +- drivers/usb/dwc2/pci.c | 2 +- drivers/usb/dwc2/platform.c | 2 +- 15 files changed, 521 insertions(+), 527 deletions(-) commit 33e4c1a9987a1fc3b42c3b534100b5b006d55c61 Author: Krzysztof Opasiak Date: Thu Jan 19 18:55:29 2017 +0100 usb: gadget: f_hid: Use spinlock instead of mutex As IN request has to be allocated in set_alt() and released in disable() we cannot use mutex to protect it as we cannot sleep in those funcitons. Let's replace this mutex with a spinlock. Cc: stable@vger.kernel.org Tested-by: David Lechner Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 57 ++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit aa65d11aa008f4de58a9cee7e121666d9d68505e Author: Krzysztof Opasiak Date: Thu Jan 19 18:55:28 2017 +0100 usb: gadget: f_hid: fix: Prevent accessing released memory When we unlock our spinlock to copy data to user we may get disabled by USB host and free the whole list of completed out requests including the one from which we are copying the data to user memory. To prevent from this let's remove our working element from the list and place it back only if there is sth left when we finish with it. Fixes: 99c515005857 ("usb: gadget: hidg: register OUT INT endpoint for SET_REPORT") Cc: stable@vger.kernel.org Tested-by: David Lechner Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 20d2ca955bd09639c7b01db5761d157c297aea0a Author: Krzysztof Opasiak Date: Thu Jan 19 18:55:27 2017 +0100 usb: gadget: f_hid: fix: Free out requests Requests for out endpoint are allocated in bind() function but never released. This commit ensures that all pending requests are released when we disable out endpoint. Fixes: 99c515005857 ("usb: gadget: hidg: register OUT INT endpoint for SET_REPORT") Cc: stable@vger.kernel.org Tested-by: David Lechner Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 271d2d6d94dd56e2897ff989f3ce5ac8ad727323 Author: Felipe Balbi Date: Tue Jan 17 15:07:19 2017 +0200 tools: usb: ffs-test: add SS descriptors Without SS descriptors, we have no possibility of running on SS controllers such as DWC3. Signed-off-by: Felipe Balbi tools/usb/ffs-test.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit 5abb9b91e8e5e824aa781334f6e4945fd33fcfa8 Author: Felipe Balbi Date: Tue Jan 17 15:04:07 2017 +0200 tools: usb: ffs-test: switch to _DEFAULT_SOURCE _BSD_SOURCE is deprecated and gives a build warning. Let's use _DEFAULT_SOURCE instead. Signed-off-by: Felipe Balbi tools/usb/ffs-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffb80fc672c3a7b6afd0cefcb1524fb99917b2f3 Author: Felipe Balbi Date: Thu Jan 19 13:38:42 2017 +0200 usb: dwc3: gadget: skip Set/Clear Halt when invalid At least macOS seems to be sending ClearFeature(ENDPOINT_HALT) to endpoints which aren't Halted. This makes DWC3's CLEARSTALL command time out which causes several issues for the driver. Instead, let's just return 0 and bail out early. Cc: Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 5 +++++ 1 file changed, 5 insertions(+) commit 538967983b883a6059292a9f4f096357302ce1e5 Author: Baolin Wang Date: Sat Jan 14 16:40:39 2017 +0800 usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase When handing the SETUP packet by composite_setup(), we will release the dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup function, which means we need to delay handling the STATUS phase. But during the lock release period, maybe the request for handling delay STATUS phase has been queued into list before we set 'dwc->delayed_status' flag or entering 'EP0_STATUS_PHASE' phase, then we will miss the chance to handle the STATUS phase. Thus we should check if the request for delay STATUS phase has been enqueued when entering 'EP0_STATUS_PHASE' phase in dwc3_ep0_xfernotready(), if so, we should handle it. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 746c90857b3bf4ea1b2410096ad350537f70449b Author: Chanwoo Choi Date: Mon Jan 16 21:37:01 2017 +0900 usb: phy: tahvo: Replace the deprecated extcon API This patch replaces the deprecated extcon API as following: - extcon_set_cable_state_() -> extcon_set_state_sync() Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/phy/phy-tahvo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c773bb0b9264206958a8d1e032baaa57ec66c22c Author: Chanwoo Choi Date: Mon Jan 16 21:36:57 2017 +0900 usb: dwc3: omap: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Cc: linux-omap@vger.kernel.org Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-omap.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit ea07b8cf08f71fe5fb49c02b4a29b92a6b357218 Author: Chanwoo Choi Date: Mon Jan 16 21:37:02 2017 +0900 usb: renesas_usbhs: Replace the deprecated extcon API This patch replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 874c9cc99e7dc4af1de231d57d06b493d0fa9ddf Author: Chanwoo Choi Date: Mon Jan 16 21:37:00 2017 +0900 usb: phy: qcom-8x16-usb: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/phy/phy-qcom-8x16-usb.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit e61bebde51d4c71db8cf8622b550bfbebbe0be7c Author: Chanwoo Choi Date: Mon Jan 16 21:36:58 2017 +0900 usb: phy: msm: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit 7df337891e61f32cceaacceca073a01080298a80 Author: Chanwoo Choi Date: Mon Jan 16 21:36:59 2017 +0900 usb: phy: omap-otg: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Cc: linux-omap@vger.kernel.org Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/phy/phy-omap-otg.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit c6267a51639b0a8e76cc6d4b0d88c07d29b4b2bf Author: Felipe Balbi Date: Thu Jan 5 14:58:46 2017 +0200 usb: dwc3: gadget: align transfers to wMaxPacketSize Instead of passing quirk_ep_out_aligned_size, we can use one extra TRB to align transfer to wMaxPacketSize. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/gadget.c | 69 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 8 deletions(-) commit 905dc04ea796e77e003c5020a3f9f1509cc7a275 Author: Felipe Balbi Date: Thu Jan 5 14:46:52 2017 +0200 usb: dwc3: gadget: allocate bounce buffer for unaligned xfers Allocate a coherent buffer of 1024 bytes (size of a single superspeed bulk packet) to serve as bounce buffer for an extra TRB needed to align transfers to wMaxPacketSize. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 3 +++ drivers/usb/dwc3/gadget.c | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit e49d3cf4926af0ff713238acd31514e50f1004ec Author: Felipe Balbi Date: Thu Jan 5 14:40:53 2017 +0200 usb: dwc3: gadget: extract __dwc3_prepare_one_trb() This new internal function will be used to solve a minor issue with dwc3 which exists in regards to short packets with OUT endpoints. Currently we're asking gadget driver to *always* send us aligned requests; however if we have enough TRBs we can easily append one extra TRB chained to the previous and keep a throw away 1024 byte buffer around for that. The actual fix will come in a separate patch, this is merely in preparation for such fix. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 58 +++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 22 deletions(-) commit 843053093f4708fd2ee93cc6591f31bb260bb8a6 Author: Felipe Balbi Date: Thu Jan 5 14:32:02 2017 +0200 usb: dwc3: gadget: simplify dwc3_prepare_one_trb() We are already passing struct dwc3_request * to dwc3_prepare_one_trb(), because of that there's no need to extract dma address and length in the caller. We can let dwc3_prepare_one_trb() itself handle that part. This simplifies the prototype of the function by removing two arguments. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 88f950a69174eca60d3e7df558ecb53d6d4d4e6f Author: Peter Chen Date: Wed Jan 4 10:19:22 2017 +0800 usb: gadget: f_uac2: improve error handling If it is out of memory, we should return -ENOMEM; Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uac2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 07423fd8e0e06f252d9126611b985bacde6878be Author: Yegor Yefremov Date: Sun Jan 15 13:14:28 2017 +0100 Documentation: usb: fix wrong documentation paths Fixes wrong spelled "pinctrl-bindings.txt" and "qcom-dwc3-usb-phy.txt" file names as also wrong specified "mt8173-mtu3.txt" file name. Signed-off-by: Yegor Yefremov Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3-st.txt | 4 ++-- Documentation/devicetree/bindings/usb/ehci-st.txt | 2 +- Documentation/devicetree/bindings/usb/mt8173-mtu3.txt | 2 +- Documentation/devicetree/bindings/usb/mt8173-xhci.txt | 4 ++-- Documentation/devicetree/bindings/usb/qcom,dwc3.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 433def4da8a557aeb91ec8158c7724231639c4f9 Author: Martin Blumenstingl Date: Wed Jan 11 15:59:42 2017 +0100 Documentation: dt: dwc3: add reference to the usb-xhci properties dwc3 internally creates a usb-xhci device which means that all properties documented in usb-xhci.txt are supported as well. Acked-by: Rob Herring Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 4 ++++ 1 file changed, 4 insertions(+) commit fdb09b3e0c1db50aa72755cb001dd13fd7e27111 Author: Nicholas Mc Guire Date: Thu Jan 12 16:55:02 2017 +0100 usb: dwc2: host: use true/false for boolean For boolean variables true/false is preferred over 1/0 for readability. Acked-by: John Youn Signed-off-by: Nicholas Mc Guire Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 04a9db799253e0993ebb46b4096f7514c62193f7 Author: Nicholas Mc Guire Date: Thu Jan 12 16:54:03 2017 +0100 usb: dwc2: host: use msleep() for long delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 20+ ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. Acked-by: John Youn Signed-off-by: Nicholas Mc Guire Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0e4018ff5d12866a134dbdd0204d1b2629f71e31 Author: Javier Martinez Canillas Date: Thu Jan 12 10:59:01 2017 -0300 usb: dwc3: exynos: Remove MODULE_ALIAS() Exynos is DT-only, so there's no need for a platform MODALIAS. Signed-off-by: Javier Martinez Canillas Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-exynos.c | 1 - 1 file changed, 1 deletion(-) commit 3e27b3f66a56825eaaa73885810e4828a7b66163 Author: Shuah Khan Date: Tue Jan 10 14:20:59 2017 -0700 usb: dwc3: exynos remove suspend clock unspecified debug message dwc3-exynos prints debug message when suspend clock is not specified. The suspend clock is optional and driver can work without it. This debug message doesn't add any value and leads to confusion and concern. Remove it. Signed-off-by: Shuah Khan Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-exynos.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bee562358dd36773b019481cb79dc36442576a07 Author: Bhumika Goyal Date: Wed Jan 11 00:20:04 2017 +0530 usb: gadget: constify usb_gadget_ops structures Declare usb_gadget_ops structures as const as they are only stored in the ops field of a usb_gadget structure. This field is of type const, so usb_gadget_ops structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct usb_gadget_ops i@p={...}; @ok1@ identifier r1.i; position p; struct fotg210_udc fotg210; @@ fotg210.gadget.ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct usb_gadget_ops i; File size before: text data bss dec hex filename 7559 384 8 7951 1f0f usb/gadget/udc/fotg210-udc.o File size after: text data bss dec hex filename 7655 288 8 7951 1f0f usb/gadget/udc/fotg210-udc.o Signed-off-by: Bhumika Goyal Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fotg210-udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00c704ccb5b375859908caf5049eba5c08bd580d Author: Leo Yan Date: Fri Jan 6 19:28:26 2017 -0800 usb: dwc2: use u32 for DT binding parameters Commit 05ee799f2021 ("usb: dwc2: Move gadget settings into core_params") changes to type u16 for DT binding "g-rx-fifo-size" and "g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the the first two parameters cannot be passed successfully with wrong data format. This is found the data transferring broken on 96boards Hikey. This patch is to change all parameters to u32 type, and verified on Hikey board the DT parameters can pass successfully. [johnyoun: minor rebase] Signed-off-by: Leo Yan Signed-off-by: John Youn Tested-by: John Stultz Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/params.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit ff86110e26c53634fc6c413732f68a6489ea40b2 Author: Colin Ian King Date: Wed Dec 28 16:52:41 2016 +0000 usb: renesas_usbhs: mod_host: fix typo: "connecte" -> "connected" trivial fix to typo in dev_dbg message Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdc01cc286be9d32140631469b7608f3f58c2db3 Author: Krzysztof Opasiak Date: Wed Dec 21 09:48:45 2016 +0100 usb: gadget: printer: Remove pnp_string static buffer pnp string is usually much shorter than 1k so let's stop wasting 1k of memory for its buffer and make it dynamically alocated. This also removes 1k len limitation for pnp_string and adds a new line after string content if required. Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_printer.c | 57 +++++++++++++++++++++++++-------- drivers/usb/gadget/function/u_printer.h | 5 ++- drivers/usb/gadget/legacy/printer.c | 28 +++++++++------- 3 files changed, 62 insertions(+), 28 deletions(-) commit 00b6c62eb74d665caa7e399ffd5da55572b61c50 Author: Krzysztof Opasiak Date: Wed Dec 21 09:48:44 2016 +0100 usb: gadget: ether: Add \n to each attribute of ethernet functions Generally in SysFS and ConfigFS files are new line terminated. Also most of USB functions adds a trailing newline to each attribute. Let's follow this convention also in ethernet functions. Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 24 ++++++++++++++++++++---- drivers/usb/gadget/function/u_ether_configfs.h | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) commit 8236800da115a3e24b9165c573067343f51cf5ea Author: Krzysztof Opasiak Date: Mon Jan 16 08:40:57 2017 +0100 usb: gadget: udc-core: Rescan pending list on driver unbind Since: commit 855ed04a3758 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") if we load gadget module but there is no free udc available then it will be stored on a pending gadgets list. $ modprobe g_zero.ko $ modprobe g_ether.ko [] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers We scan this list each time when new UDC appears in system. But we can get a free UDC each time after gadget unbind. This commit add scanning of that list directly after unbinding gadget from udc. Thanks to this, when we unload first gadget: $ rmmod g_zero.ko gadget which is pending is automatically attached to that UDC (if name matches). Fixes: 855ed04a3758 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") Cc: stable Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 45 +++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 9026cc82b632ed1a859935c82ed8ad65f27f2781 Author: Borislav Petkov Date: Mon Jan 23 19:35:14 2017 +0100 x86/ras, EDAC, acpi: Assign MCE notifier handlers a priority Assign all notifiers on the MCE decode chain a priority so that they get called in the correct order. Suggested-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-10-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 9 +++++++++ arch/x86/kernel/cpu/mcheck/mce.c | 8 +++----- drivers/acpi/acpi_extlog.c | 1 + drivers/acpi/nfit/mce.c | 1 + drivers/edac/i7core_edac.c | 1 + drivers/edac/mce_amd.c | 1 + drivers/edac/sb_edac.c | 3 ++- drivers/edac/skx_edac.c | 3 ++- 8 files changed, 20 insertions(+), 7 deletions(-) commit cff4c0391a692cf9b89932c62a7f879fb3637148 Author: Borislav Petkov Date: Mon Jan 23 19:35:13 2017 +0100 x86/ras: Get rid of mce_process_work() Make mce_gen_pool_process() the workqueue function directly and save us an indirection. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-9-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-genpool.c | 2 +- arch/x86/kernel/cpu/mcheck/mce-internal.h | 2 +- arch/x86/kernel/cpu/mcheck/mce.c | 12 +----------- 3 files changed, 3 insertions(+), 13 deletions(-) commit 0bceab677dcef409f6281d922461057721d547b3 Author: Borislav Petkov Date: Mon Jan 23 19:35:12 2017 +0100 EDAC/mce/amd: Dump TSC value Dump the TSC value of the time when the MCE got logged. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-8-bp@alien8.de Signed-off-by: Ingo Molnar drivers/edac/mce_amd.c | 3 +++ 1 file changed, 3 insertions(+) commit 1fbcd909035251b5eac267f1c5d6d67b32d16b62 Author: Borislav Petkov Date: Mon Jan 23 19:35:11 2017 +0100 EDAC/mce/amd: Unexport amd_decode_mce() It is not used outside of the driver anymore. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-7-bp@alien8.de Signed-off-by: Ingo Molnar drivers/edac/mce_amd.c | 4 ++-- drivers/edac/mce_amd.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit bd43f60a260c83cbc9befd7d710a3f2bfd3b2dd2 Author: Borislav Petkov Date: Mon Jan 23 19:35:10 2017 +0100 x86/ras/amd/inj: Change dependency Change dependency to mce.c as we're using mce_inject_log() now to stick an MCE into the MCA subsystem. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-6-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/ras/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 669c00f09935fc7a22297eadee04536af141595b Author: Borislav Petkov Date: Mon Jan 23 19:35:09 2017 +0100 x86/ras: Flip the TSC-adding logic Add the TSC value to the MCE record only when the MCE being logged is precise, i.e., it is logged as an exception or an MCE-related interrupt. So it doesn't look particularly easy to do without touching/changing a bunch of places. That's why I'm trying tricks first. For example, the mce-apei.c case I'm addressing by setting ->tsc only for errors of panic severity. The idea there is, that, panic errors will have raised an #MC and not polled. And then instead of propagating a flag to mce_setup(), it seems easier/less code to set ->tsc depending on the call sites, i.e., are we polling or are we preparing an MCE record in an exception handler/thresholding interrupt. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-5-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-apei.c | 5 ++++- arch/x86/kernel/cpu/mcheck/mce.c | 12 +++--------- arch/x86/kernel/cpu/mcheck/mce_amd.c | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) commit 0b737a9c2af85cc8295f9308d9250f9111bbf94d Author: Yazen Ghannam Date: Mon Jan 23 19:35:08 2017 +0100 x86/ras/amd: Make sysfs names of banks more user-friendly Currently, we append the MCA_IPID[InstanceId] to the bank name to create the sysfs filename. The InstanceId field uniquely identifies a bank instance but it doesn't look very nice for most banks. Replace the InstanceId with a simpler, ascending (0, 1, ..) value. Only use this in the sysfs name when there is more than 1 instance. Otherwise, just use the bank's name as the sysfs name. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1484322741-41884-3-git-send-email-Yazen.Ghannam@amd.com Link: http://lkml.kernel.org/r/20170123183514.13356-4-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 5 +++-- arch/x86/kernel/cpu/mcheck/mce_amd.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) commit 9b052ea4ced0fa1ad30a2eafe86984a16297e6f1 Author: Borislav Petkov Date: Mon Jan 23 19:35:07 2017 +0100 x86/ras/therm_throt: Do not log a fake MCE for thermal events We log a fake bank 128 MCE to note that we're handling a CPU thermal event. However, this confuses people into thinking that their hardware generates MCEs. Hijacking MCA for logging thermal events is a gross misuse anyway and it shouldn't have been done in the first place. And besides we have other means for dealing with thermal events which are much more suitable. So let's kill the MCE logging part. Signed-off-by: Borislav Petkov Acked-by: Ashok Raj Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170105213846.GA12024@gmail.com Link: http://lkml.kernel.org/r/20170123183514.13356-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 6 ------ arch/x86/kernel/cpu/mcheck/mce.c | 25 ------------------------- arch/x86/kernel/cpu/mcheck/therm_throt.c | 30 +++++++++++------------------- 3 files changed, 11 insertions(+), 50 deletions(-) commit d4b2ac63b0eae461fc10c9791084be24724ef57a Author: Borislav Petkov Date: Mon Jan 23 19:35:06 2017 +0100 x86/ras/inject: Make it depend on X86_LOCAL_APIC=y ... and get rid of the annoying: arch/x86/kernel/cpu/mcheck/mce-inject.c:97:13: warning: ‘mce_irq_ipi’ defined but not used [-Wunused-function] when doing randconfig builds. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/20170123183514.13356-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/kernel/cpu/mcheck/mce-inject.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) commit abb397f479e0181ed3f1401f4cadb4283d2f8591 Author: Jagan Teki Date: Mon Jan 23 17:43:10 2017 +0800 ARM: dts: imx6ul: Add Engicam Is.IoT MX6UL NAND initial support Engicam Is.IoT MX6UL has separate module for NAND, so add nand dts file for imx6ul-isiot.dtsi. dmesg: ----- nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda nand: Micron MT29F2G08ABAEAH4 nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5 gpmi-nand 1806000.gpmi-nand: driver registered. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6ul-isiot-nand.dts | 79 +++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit e44a3bfc17313f6c67d1fde93519fde3ae856ab8 Author: Jagan Teki Date: Mon Jan 23 17:38:34 2017 +0800 ARM: dts: imx6ul: Add Engicam Is.IoT MX6UL eMMC initial support Engicam Is.IoT MX6UL has separate module for eMMC, so add emmc dts file for imx6ul-isiot.dtsi, usdhc2 node represent eMMC. dmesg: ----- mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA mmc1: new DDR MMC card at address 0001 mmcblk1: mmc1:0001 M62704 3.53 GiB Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 +- arch/arm/boot/dts/imx6ul-isiot-emmc.dts | 77 +++++++++++++++++++++ arch/arm/boot/dts/imx6ul-isiot.dts | 119 -------------------------------- arch/arm/boot/dts/imx6ul-isiot.dtsi | 114 ++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+), 120 deletions(-) commit d5ad78436a8829c9951d82b1b0bdec761dbabfa9 Author: Arnd Bergmann Date: Mon Jan 23 13:20:38 2017 +0100 drm: bridge: dw-hdmi: fix building without CONFIG_OF The of_node member in struct drm_bridge is hidden when CONFIG_OF is disabled, causing a build error: drivers/gpu/drm/bridge/dw-hdmi.c: In function '__dw_hdmi_probe': drivers/gpu/drm/bridge/dw-hdmi.c:2063:14: error: 'struct drm_bridge' has no member named 'of_node' We could fix this either using a Kconfig dependency on CONFIG_OF or making the one line conditional. The latter gives us better compile test coverage, so this is what I'm doing here. Fixes: 69497eb9234e ("drm: bridge: dw-hdmi: Implement DRM bridge registration") Signed-off-by: Arnd Bergmann Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170123122312.3290934-1-arnd@arndb.de drivers/gpu/drm/bridge/dw-hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit d140199af510ad4749dc5e38b7922135258ba5fd Author: Daniel Borkmann Date: Tue Jan 24 01:26:46 2017 +0100 bpf, lpm: fix kfree of im_node in trie_update_elem We need to initialize im_node to NULL, otherwise in case of error path it gets passed to kfree() as uninitialized pointer. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/lpm_trie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68eb94f16227336a5773b83ecfa8290f1d6b78ce Author: Eric W. Biederman Date: Tue Jan 3 10:23:11 2017 +1300 proc: Better ownership of files for non-dumpable tasks in user namespaces Instead of making the files owned by the GLOBAL_ROOT_USER. Make non-dumpable files whose mm has always lived in a user namespace owned by the user namespace root. This allows the container root to have things work as expected in a container. Signed-off-by: "Eric W. Biederman" fs/proc/base.c | 102 ++++++++++++++++++++++++++++++----------------------- fs/proc/fd.c | 12 +------ fs/proc/internal.h | 16 ++------- 3 files changed, 61 insertions(+), 69 deletions(-) commit 9227dd2a84a765fcfef1677ff17de0958b192eda Author: Eric W. Biederman Date: Mon Jan 23 17:26:31 2017 +1300 exec: Remove LSM_UNSAFE_PTRACE_CAP With previous changes every location that tests for LSM_UNSAFE_PTRACE_CAP also tests for LSM_UNSAFE_PTRACE making the LSM_UNSAFE_PTRACE_CAP redundant, so remove it. Signed-off-by: "Eric W. Biederman" fs/exec.c | 8 ++------ include/linux/security.h | 3 +-- security/apparmor/domain.c | 2 +- security/commoncap.c | 2 +- security/selinux/hooks.c | 3 +-- security/smack/smack_lsm.c | 2 +- 6 files changed, 7 insertions(+), 13 deletions(-) commit 20523132ec5d1b481e1d66557292ed3a3021e817 Author: Eric W. Biederman Date: Mon Jan 23 17:17:26 2017 +1300 exec: Test the ptracer's saved cred to see if the tracee can gain caps Now that we have user namespaces and non-global capabilities verify the tracer has capabilities in the relevant user namespace instead of in the current_user_ns(). As the test for setting LSM_UNSAFE_PTRACE_CAP is currently ptracer_capable(p, current_user_ns()) and the new task credentials are in current_user_ns() this change does not have any user visible change and simply moves the test to where it is used, making the code easier to read. Signed-off-by: "Eric W. Biederman" security/commoncap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70169420f555210147f3cab74bb0f6debd488bdb Author: Eric W. Biederman Date: Thu Nov 17 01:38:35 2016 -0600 exec: Don't reset euid and egid when the tracee has CAP_SETUID Don't reset euid and egid when the tracee has CAP_SETUID in it's user namespace. I punted on relaxing this permission check long ago but now that I have read this code closely it is clear it is safe to test against CAP_SETUID in the user namespace. Signed-off-by: "Eric W. Biederman" security/commoncap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cce1eea0aff51201753fcaca421df825b0813b6 Author: Nikolay Borisov Date: Wed Dec 14 15:56:33 2016 +0200 inotify: Convert to using per-namespace limits This patchset converts inotify to using the newly introduced per-userns sysctl infrastructure. Currently the inotify instances/watches are being accounted in the user_struct structure. This means that in setups where multiple users in unprivileged containers map to the same underlying real user (i.e. pointing to the same user_struct) the inotify limits are going to be shared as well, allowing one user(or application) to exhaust all others limits. Fix this by switching the inotify sysctls to using the per-namespace/per-user limits. This will allow the server admin to set sensible global limits, which can further be tuned inside every individual user namespace. Additionally, in order to preserve the sysctl ABI make the existing inotify instances/watches sysctls modify the values of the initial user namespace. Signed-off-by: Nikolay Borisov Acked-by: Jan Kara Acked-by: Serge Hallyn Signed-off-by: Eric W. Biederman fs/notify/inotify/inotify.h | 17 +++++++++++++++++ fs/notify/inotify/inotify_fsnotify.c | 6 ++---- fs/notify/inotify/inotify_user.c | 34 +++++++++++++++++----------------- include/linux/fsnotify_backend.h | 3 ++- include/linux/sched.h | 4 ---- include/linux/user_namespace.h | 4 ++++ kernel/ucount.c | 6 +++++- 7 files changed, 47 insertions(+), 27 deletions(-) commit 1110f8e37d6601b19acdfa7fd0b0d63808156f6c Author: Johannes Berg Date: Thu Oct 20 09:44:05 2016 +0200 iwlwifi: mvm: make iwl_dump_prph() void The return value is never used, so make the function void. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2ed1e01910825240e5d53c8d59106230d6e5c52b Author: Johannes Berg Date: Thu Oct 20 09:41:14 2016 +0200 iwlwifi: mvm: accept arbitrary memory dump TLVs There's no reason to be validating the memory dump types, or checking them for duplication, or anything, since we really just pass them through from the TLV to the dump. Thus, change the way we handle memory dump TLVs to let the driver just blindly use anything specified there, dumping it into the memory dump output file. This makes the system extensible without driver changes. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 57 +++++++++--------------- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 18 +------- drivers/net/wireless/intel/iwlwifi/iwl-fw.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 47 +++++++++---------- 4 files changed, 46 insertions(+), 80 deletions(-) commit bac453ab3745eaa64137ea6e77e009b45954f0ae Author: Luca Coelho Date: Fri Oct 7 15:16:26 2016 +0300 iwlwifi: mvm: don't restart HW if suspend fails with unified image For unified images, we shouldn't restart the HW if suspend fails. The only reason for restarting the HW with non-unified images is to go back to the D0 image. Fixes: 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 371a17ed415af2023dddf90210122241d69b6727 Author: Johannes Berg Date: Mon Aug 15 09:26:32 2016 +0200 iwlwifi: mvm: expose device timestamp in radiotap Set the relevant fields to export the 32-bit device timestamp to radiotap using the new mac80211 infrastructure. This will be useful to allow synchronising monitor captures taken on different hardware simultaneously. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2acc76cbb7b7ad4f1e35d6c1d973f8cba1dde0bc Merge: 10eeb5e b8a943e Author: David S. Miller Date: Mon Jan 23 16:10:38 2017 -0500 Merge branch 'bpf-lpm' Daniel Mack says: ==================== bpf: add longest prefix match map This patch set adds a longest prefix match algorithm that can be used to match IP addresses to a stored set of ranges. It is exposed as a bpf map type. Internally, data is stored in an unbalanced tree of nodes that has a maximum height of n, where n is the prefixlen the trie was created with. Note that this has nothing to do with fib or fib6 and is in no way meant to replace or share code with it. It's rather a much simpler implementation that is specifically written with bpf maps in mind. Patch 1/2 adds the implementation, 2/2 an extensive test suite and 3/3 has benchmarking code for the new trie type. Feedback is much appreciated. Changelog: v3 -> v4: * David added a 3rd patch that augments map_perf_test for LPM trie benchmarks * Limit allocation of maps of this new type to CAP_SYS_ADMIN for now, as requested by Alexei * Add a stub .map_delete_elem so the core does not stumble over a NULL pointer when the syscall is invoked * Tests for non-power-of-2 prefix lengths were added * More comment style fixes v2 -> v3: * Store both the key match data and the caller provided value in the same byte array attached to a node. This avoids double allocations * Bring back node->flags to distinguish between 'real' and intermediate nodes * Fix comment style and some typos v1 -> v2: * Turn spin lock into raw spinlock * Lock with irqsave options during trie_update_elem() * Return -ENOMEM properly from trie_alloc() * Force attr->flags == BPF_F_NO_PREALLOC during creation * Set trie->map.pages after creation to account for map memory * Allow arbitrary value sizes * Removed node->flags and denode intermediate nodes through node->value == NULL instead rfc -> v1: * Add __rcu pointer annotations to make sparse happy * Fold _lpm_trie_find_target_node() into its only caller * Fix some minor documentation issues ==================== Signed-off-by: David S. Miller commit b8a943e2942296aad37a8e7adc43db493413e54b Author: David Herrmann Date: Sat Jan 21 17:26:13 2017 +0100 samples/bpf: add lpm-trie benchmark Extend the map_perf_test_{user,kern}.c infrastructure to stress test lpm-trie lookups. We hook into the kprobe on sys_gettid() and measure the latency depending on trie size and lookup count. On my Intel Haswell i7-6400U, a single gettid() syscall with an empty bpf program takes roughly 6.5us on my system. Lookups in empty tries take ~1.8us on first try, ~0.9us on retries. Lookups in tries with 8192 entries take ~7.1us (on the first _and_ any subsequent try). Signed-off-by: David Herrmann Reviewed-by: Daniel Mack Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 30 ++++++++++++++++++++++++ samples/bpf/map_perf_test_user.c | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 4d3381f5a322dd5db2477e224821790478488173 Author: David Herrmann Date: Sat Jan 21 17:26:12 2017 +0100 bpf: Add tests for the lpm trie map The first part of this program runs randomized tests against the lpm-bpf-map. It implements a "Trivial Longest Prefix Match" (tlpm) based on simple, linear, single linked lists. The implementation should be pretty straightforward. Based on tlpm, this inserts randomized data into bpf-lpm-maps and verifies the trie-based bpf-map implementation behaves the same way as tlpm. The second part uses 'real world' IPv4 and IPv6 addresses and tests the trie with those. Signed-off-by: David Herrmann Signed-off-by: Daniel Mack Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/test_lpm_map.c | 358 +++++++++++++++++++++++++++++ 3 files changed, 361 insertions(+), 2 deletions(-) commit b95a5c4db09bc7c253636cb84dc9b12c577fd5a0 Author: Daniel Mack Date: Sat Jan 21 17:26:11 2017 +0100 bpf: add a longest prefix match trie map implementation This trie implements a longest prefix match algorithm that can be used to match IP addresses to a stored set of ranges. Internally, data is stored in an unbalanced trie of nodes that has a maximum height of n, where n is the prefixlen the trie was created with. Tries may be created with prefix lengths that are multiples of 8, in the range from 8 to 2048. The key used for lookup and update operations is a struct bpf_lpm_trie_key, and the value is a uint64_t. The code carries more information about the internal implementation. Signed-off-by: Daniel Mack Reviewed-by: David Herrmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 7 + kernel/bpf/Makefile | 2 +- kernel/bpf/lpm_trie.c | 503 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 511 insertions(+), 1 deletion(-) commit 10eeb5e645b5332b24986a554046f6c9cc2c22d4 Author: Bhumika Goyal Date: Sat Jan 21 12:28:58 2017 +0530 net: xilinx: constify net_device_ops structure Declare net_device_ops structure as const as it is only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct net_device_ops i@p={...}; @ok1@ identifier r1.i; position p; struct net_device ndev; @@ ndev.netdev_ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct net_device_ops i; File size before: text data bss dec hex filename 6201 744 0 6945 1b21 ethernet/xilinx/xilinx_emaclite.o File size after: text data bss dec hex filename 6745 192 0 6937 1b19 ethernet/xilinx/xilinx_emaclite.o Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_emaclite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30bd2f52e56ea35028cf1d13c21484918b6ff22d Author: Bhumika Goyal Date: Sat Jan 21 12:27:26 2017 +0530 net: moxa: constify net_device_ops structures Declare net_device_ops structure as const as it is only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct net_device_ops i@p={...}; @ok1@ identifier r1.i; position p; struct net_device ndev; @@ ndev.netdev_ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct net_device_ops i; File size before: text data bss dec hex filename 4821 744 0 5565 15bd ethernet/moxa/moxart_ether.o File size after: text data bss dec hex filename 5373 192 0 5565 15bd ethernet/moxa/moxart_ether.o Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca7b89647b76a2f5c26f0927bb72fdaf854d6592 Author: Alexander Sverdlin Date: Thu Jan 19 11:06:16 2017 +0100 of/unittest: Swap arguments of of_unittest_apply_overlay() Function signature of_unittest_apply_overlay(int unittest_nr, int overlay_nr, ... and call sites, like in of_unittest_apply_overlay_check(): ret = of_unittest_apply_overlay(overlay_nr, unittest_nr, ... do not match. Fix this in one place (function signature). The only affected test case is 15, which supplies non-existing overlay number 16, but two bugs matched here. Fix the test case. Signed-off-by: Alexander Sverdlin Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring drivers/of/unittest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38d30b336ccf8ee98e0e494a13738a0fade5a5e6 Author: Paul E. McKenney Date: Thu Dec 1 09:55:27 2016 -0800 rcu: Adjust FQS offline checks for exact online-CPU detection Commit 7ec99de36f40 ("rcu: Provide exact CPU-online tracking for RCU"), as its title suggests, got rid of RCU's remaining CPU-hotplug timing guesswork. This commit therefore removes the one-jiffy kludge that was used to paper over this guesswork. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 3a19b46a5c17b12ef0691df19c676ba3da330a57 Author: Paul E. McKenney Date: Wed Nov 30 11:21:21 2016 -0800 rcu: Check cond_resched_rcu_qs() state less often to reduce GP overhead Commit 4a81e8328d37 ("rcu: Reduce overhead of cond_resched() checks for RCU") moved quiescent-state generation out of cond_resched() and commit bde6c3aa9930 ("rcu: Provide cond_resched_rcu_qs() to force quiescent states in long loops") introduced cond_resched_rcu_qs(), and commit 5cd37193ce85 ("rcu: Make cond_resched_rcu_qs() apply to normal RCU flavors") introduced the per-CPU rcu_qs_ctr variable, which is frequently polled by the RCU core state machine. This frequent polling can increase grace-period rate, which in turn increases grace-period overhead, which is visible in some benchmarks (for example, the "open1" benchmark in Anton Blanchard's "will it scale" suite). This commit therefore reduces the rate at which rcu_qs_ctr is polled by moving that polling into the force-quiescent-state (FQS) machinery, and by further polling it only after the grace period has been in effect for at least jiffies_till_sched_qs jiffies. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett include/trace/events/rcu.h | 10 +++++----- kernel/rcu/tree.c | 46 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 17 deletions(-) commit 02a5c550b2738f2bfea8e1e00aa75944d71c9e18 Author: Paul E. McKenney Date: Wed Nov 2 17:25:06 2016 -0700 rcu: Abstract extended quiescent state determination This commit is the fourth step towards full abstraction of all accesses to the ->dynticks counter, implementing previously open-coded checks and comparisons in new rcu_dynticks_in_eqs() and rcu_dynticks_in_eqs_since() functions. This abstraction will ease changes to the ->dynticks counter operation. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett include/linux/rcutiny.h | 6 ++++++ kernel/rcu/tree.c | 52 +++++++++++++++++++++++++++++++++++------------- kernel/rcu/tree.h | 2 ++ kernel/rcu/tree_exp.h | 6 +++--- kernel/rcu/tree_plugin.h | 2 +- kernel/rcu/tree_trace.c | 2 +- 6 files changed, 51 insertions(+), 19 deletions(-) commit 2625d469baeef3aabdfe122572e00c517e2d9451 Author: Paul E. McKenney Date: Wed Nov 2 14:23:30 2016 -0700 rcu: Abstract dynticks extended quiescent state enter/exit operations This commit is the third step towards full abstraction of all accesses to the ->dynticks counter, implementing the previously open-coded atomic add of 1 and entry checks in a new rcu_dynticks_eqs_enter() function, and the same but with exit checks in a new rcu_dynticks_eqs_exit() function. This abstraction will ease changes to the ->dynticks counter operation. Note that this commit gets rid of the smp_mb__before_atomic() and the smp_mb__after_atomic() calls that were previously present. The reason that this is OK from a memory-ordering perspective is that the atomic operation is now atomic_add_return(), which, as a value-returning atomic, guarantees full ordering. Signed-off-by: Paul E. McKenney [ paulmck: Fixed RCU_TRACE() statements added by this commit. ] Reviewed-by: Josh Triplett kernel/rcu/tree.c | 88 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 26 deletions(-) commit 5946fdaee4ba449e8fbb5d403e1ed69437f916e8 Author: Darren Stevens Date: Mon Jan 23 14:38:28 2017 -0500 pata_atiixp: Don't use unconnected secondary port on SB600/SB700 The SB600 and SB700 southbridge chips from ATI/AMD only have connections for the primary IDE port. As these chips have unique pci device ID's use these to mark the secondary port as 'dummy' Signed-off-by: Darren Stevens Signed-off-by: Tejun Heo drivers/ata/pata_atiixp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8dc79888a792f6c365c2a26903e49ff919e72488 Author: Paul E. McKenney Date: Mon Jan 9 15:25:55 2017 -0800 rcu: Add lockdep checks to synchronous expedited primitives The non-expedited synchronize_*rcu() primitives have lockdep checks, but their expedited counterparts lack these checks. This commit therefore adds these checks to the expedited synchronize_*rcu() primitives. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree_exp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bb4e2c08bbfa8eb032db7814f6100086aac102d3 Author: Paul E. McKenney Date: Fri Jan 6 22:04:22 2017 -0800 rcu: Eliminate unused expedited_normal counter Expedited grace periods no longer fall back to normal grace periods in response to lock contention, given that expedited grace periods now use the rcu_node tree so as to avoid contention. This commit therfore removes the expedited_normal counter. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Documentation/RCU/trace.txt | 5 +---- kernel/rcu/tree.h | 1 - kernel/rcu/tree_trace.c | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) commit d78973c32a210b0057b51880f7119bf2b61d5a65 Author: Joel Fernandes Date: Mon Dec 12 18:01:45 2016 -0800 llist: Clarify comments about when locking is needed llist.h comments are confusing about when locking is needed versus when it isn't. Clarify these comments by being more descriptive about why locking is needed for llist_del_first. Cc: Ingo Molnar Cc: Will Deacon Cc: Paul McKenney Acked-by: Huang Ying Acked-by: Mathieu Desnoyers Signed-off-by: Joel Fernandes Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett include/linux/llist.h | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 9831ce3bb4f8b8f18f6e9719b64ba4e727d70fb3 Author: Paul E. McKenney Date: Mon Jan 2 14:24:24 2017 -0800 rcu: Fix comment in rcu_organize_nocb_kthreads() It used to be that the rcuo callback-offload kthreads were spawned in rcu_organize_nocb_kthreads(), and the comment before the "for" loop says as much. However, this spawning has long since moved to the CPU-hotplug code, so this commit fixes this comment. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree_plugin.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 961518259b3ba79a3cfc634794dc12ea9565dac4 Author: Matt Fleming Date: Fri Dec 23 15:17:53 2016 +0000 rcu: Enable RCU tracepoints by default to aid in debugging While debugging a performance issue I needed to understand why RCU sofitrqs were firing so frequently. Unfortunately, the RCU callback tracepoints are hidden behind CONFIG_RCU_TRACE which defaults to off in the upstream kernel and is likely to also be disabled in enterprise distribution configs. Enable it by default for CONFIG_TREE_RCU. However, we must keep it disabled for tiny RCU, because it would otherwise pull in a large amount of code that would make tiny RCU less than tiny. I ran some file system metadata intensive workloads (git checkout, FS-Mark) on a variety of machines with this patch and saw no detectable change in performance. Cc: Mel Gorman Signed-off-by: Matt Fleming Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit fdbb9b315ce40922f3a8d2b8352776d7bc963d84 Author: Paul E. McKenney Date: Tue Dec 20 07:17:58 2016 -0800 rcu: Make rcu_cpu_starting() use its "cpu" argument The rcu_cpu_starting() function uses this_cpu_ptr() to locate the incoming CPU's rcu_data structure. This works for the boot CPU and for all CPUs onlined after rcu_init() executes (during very early boot). Currently, this is the full set of CPUs, so all is well. But if anyone ever parallelizes boot before rcu_init() time, it will fail. This commit therefore substitutes the rcu_cpu_starting() function's this_cpu_pointer() for per_cpu_ptr(), future-proofing the code and (arguably) improving readability. This commit inadvertently fixes a latent bug: If there ever had been more than just the boot CPU online at rcu_init() time, the old code would not initialize the non-boot CPUs, but rather would repeatedly initialize the boot CPU. Reported-by: Boqun Feng Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09e2db37ec6d22bc27e2ba94ab4889541567f52e Author: Paul E. McKenney Date: Sun Dec 18 13:31:02 2016 -0800 rcu: Add comment headers to expedited-grace-period counter functions These functions (rcu_exp_gp_seq_start(), rcu_exp_gp_seq_end(), rcu_exp_gp_seq_snap(), and rcu_exp_gp_seq_done() seemed too obvious to comment when written, but not so much when being documented. This commit therefore adds header comments to each of them. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree_exp.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 630c7ed9ca0608912fa7c8591d05dfc8742dc9e6 Author: Paul E. McKenney Date: Thu Dec 15 15:37:47 2016 -0800 rcu: Don't wake rcuc/X kthreads on NOCB CPUs Chris Friesen notice that rcuc/X kthreads were consuming CPU even on NOCB CPUs. This makes no sense because the only purpose or these kthreads is to invoke normal (non-offloaded) callbacks, of which there will never be any on NOCB CPUs. This problem was due to a bug in cpu_has_callbacks_ready_to_invoke(), which should have been checking ->nxttail[RCU_NEXT_TAIL] for NULL, but which was instead (incorrectly) checking ->nxttail[RCU_DONE_TAIL]. Because ->nxttail[RCU_DONE_TAIL] is never NULL, the only effect is to cause the rcuc/X kthread to execute when it should not do so. This commit therefore checks ->nxttail[RCU_NEXT_TAIL], which is NULL for NOCB CPUs. Reported-by: Chris Friesen Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1626c365f8e60bbe790605dc475847f070927dd7 Author: Paul E. McKenney Date: Wed Dec 14 14:03:14 2016 -0800 rcu: Re-enable TASKS_RCU for User Mode Linux Now that User Mode Linux supports arch_irqs_disabled_flags(), this commit re-enables TASKS_RCU for User Mode Linux. Reported-by: Richard Weinberger Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett init/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 7aa92230c9e86b2150f718185f70e0af592e290b Author: Paul E. McKenney Date: Tue Nov 29 05:49:06 2016 -0800 rcu: Once again use NMI-based stack traces in stall warnings This commit is for all intents and purposes a revert of bc1dce514e9b ("rcu: Don't use NMIs to dump other CPUs' stacks"). The reason to suppose that this can now safely be reverted is the presence of 42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI"), which is said to have made NMI-based stack dumps safe. However, this reversion keeps one nice property of bc1dce514e9b ("rcu: Don't use NMIs to dump other CPUs' stacks"), namely that only those CPUs blocking the grace period are dumped. The new trigger_single_cpu_backtrace() is used to make this happen, as suggested by Josh Poimboeuf. Reported-by: Vince Weaver Signed-off-by: Paul E. McKenney Cc: Petr Mladek Cc: Peter Zijlstra Reviewed-by: Josh Poimboeuf Reviewed-by: Petr Mladek Reviewed-by: Josh Triplett kernel/rcu/tree.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit b201fa67371862229f27a1f022196423aa5c7381 Author: Paul E. McKenney Date: Fri Nov 25 00:07:23 2016 -0800 rcu: Remove short-term CPU kicking Commit 4914950aaa12d ("rcu: Stop treating in-kernel CPU-bound workloads as errors") added a (relatively) short-timeout call to resched_cpu(). This was inspired by as issue that was fixed by b7e7ade34e61 ("sched/core: Fix remote wakeups"). But given that this issue was fixed, it is time for the current commit to remove this call to resched_cpu(). Reported-by: Byungchul Park Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 5 ----- 1 file changed, 5 deletions(-) commit 589d572671fe7ca342d25cde07a0e310a6912971 Author: Darren Stevens Date: Mon Jan 23 14:33:36 2017 -0500 libata-sff: Don't scan disabled ports when checking for legacy mode. libata-sff.c checks for legacy mode by testing if both primary and secondary ports on a controller are in legacy mode and selects legacy if either one is. However on some south bridge chips (e.g AMD SB600/SB700) the secondary port is not wired, and when it is disabled by setting the disable bit in the PCI header it appears as a fixed legacy port. Prevent incorrect detection by not testing ports that are marked as 'dummy' tj: Addressed Sergei's review points. Other style edits. Signed-off-by: Darren Stevens Signed-off-by: Tejun Heo Cc: Sergei Shtylyov drivers/ata/libata-sff.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 28053bc72c0e588c577557ce9e95a6cb65078471 Author: Paul E. McKenney Date: Thu Dec 1 11:31:31 2016 -0800 rcu: Add long-term CPU kicking This commit prepares for the removal of short-term CPU kicking (in a subsequent commit). It does so by starting to invoke resched_cpu() for each holdout at each force-quiescent-state interval that is more than halfway through the stall-warning interval. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 94060d2235cf419f2d46dbce95727e6f826b233c Author: Tobias Klauser Date: Mon Oct 17 11:13:07 2016 +0200 rcu: Remove unused but set variable Since commit 7ec99de36f40 ("rcu: Provide exact CPU-online tracking for RCU"), the variable mask in rcu_init_percpu_data is set but no longer used. Remove it to fix the following warning when building with 'W=1': kernel/rcu/tree.c: In function ‘rcu_init_percpu_data’: kernel/rcu/tree.c:3765:16: warning: variable ‘mask’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-) commit 2535db485cad8f302196af05888721ce82528978 Author: Paul E. McKenney Date: Thu Nov 17 11:00:44 2016 -0800 rcu: Remove unneeded rcu_process_callbacks() declarations The declarations of __rcu_process_callbacks() and rcu_process_callbacks() are not needed, as the definition of both of these functions appear before any uses. This commit therefore removes both declarations. Reported-by: "Ahmed, Iftekhar" Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tiny.c | 2 -- 1 file changed, 2 deletions(-) commit c4402b27f1778fad0dbc27b2d88bb06ca22a06f0 Author: Byungchul Park Date: Wed Nov 9 17:57:13 2016 +0900 rcu: Only dump stalled-tasks stacks if there was a real stall The print_other_cpu_stall() function currently unconditionally invokes rcu_print_detail_task_stall(). This is OK because if there was a stall sufficient to cause print_other_cpu_stall() to be invoked, that stall is very likely to persist through the entire print_other_cpu_stall() execution. However, if the stall did not persist, the variable ndetected will be zero, and that variable is already tested in an "if" statement. Therefore, this commit moves the call to rcu_print_detail_task_stall() under that pre-existing "if" to improve readability, with a very rare reduction in overhead. Signed-off-by: Byungchul Park [ paulmck: Reworked commit log. ] Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 907565337ebf998a68cb5c5b2174ce5e5da065eb Author: Mathieu Desnoyers Date: Thu Nov 3 10:29:28 2016 -0600 Fix: Disable sys_membarrier when nohz_full is enabled Userspace applications should be allowed to expect the membarrier system call with MEMBARRIER_CMD_SHARED command to issue memory barriers on nohz_full CPUs, but synchronize_sched() does not take those into account. Given that we do not want unrelated processes to be able to affect real-time sensitive nohz_full CPUs, simply return ENOSYS when membarrier is invoked on a kernel with enabled nohz_full CPUs. Signed-off-by: Mathieu Desnoyers CC: Josh Triplett CC: Steven Rostedt CC: [3.10+] Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker Cc: Chris Metcalf Cc: Rik van Riel Acked-by: Lai Jiangshan Reviewed-by: Josh Triplett kernel/membarrier.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4d4f88fa235f7f9ef8213564dc1804144332238b Author: Paul E. McKenney Date: Sat Nov 5 04:17:15 2016 -0700 lockdep: Make RCU suspicious-access splats use pr_err This commit switches RCU suspicious-access splats use pr_err() instead of the current INFO printk()s. This change makes it easier to automatically classify splats. Reported-by: Dmitry Vyukov Signed-off-by: Paul E. McKenney kernel/locking/lockdep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d786b91f422c6ad4c0d9bb9c1bef2dd5008e3d9d Author: Tejun Heo Date: Mon Jan 23 14:28:51 2017 -0500 pata_octeon_cf: remove unused local variables from octeon_cf_set_piomode() @t1 and @t2i are calculated along with @t2 but never used. Drop them. Signed-off-by: Tejun Heo Reported-by: David Binderman drivers/ata/pata_octeon_cf.c | 8 -------- 1 file changed, 8 deletions(-) commit d8e166b4ad0e3626af0378cadb2d7ba41efa005a Author: Tomi Valkeinen Date: Fri Jan 20 13:52:20 2017 -0600 ARM: dts: dra72/1-evm: add pcf8575 used for lcd DRA72 and DRA718 EVM boards has a pcf8575 gpio expander which is used for the LCD/LEDs and USB vbus detection. Add the node for the pcf8575. Signed-off-by: Tomi Valkeinen Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra71-evm.dts | 5 +++++ arch/arm/boot/dts/dra72-evm-common.dtsi | 9 +++++++++ 2 files changed, 14 insertions(+) commit 4cd6a59f5c1a9b0cca0da09fbba42b9450ffc899 Author: Tony Lindgren Date: Fri Jan 20 12:13:19 2017 -0800 ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 We have more than four uarts on some SoCs and that can cause noise with errors while booting. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7eea67101b9713ae438955e8899b3c4b078419f9 Author: Kevin Hilman Date: Fri Jan 20 07:57:52 2017 -0800 ARM64: dts: meson-gxl: rename Nexbox A95x for consistency Since the GXL family has S905X and S905D SoCs, we're keeping the SoC name in the DTS filename for clarity. Rename this file accordingly to be consistent with the rest of the GXL DTS files. Cc: Neil Armstrong Reviewed-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 2 +- .../boot/dts/amlogic/meson-gxl-nexbox-a95x.dts | 221 --------------------- .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 221 +++++++++++++++++++++ 3 files changed, 222 insertions(+), 222 deletions(-) commit 33d0fcdfe0e87070d96c678e554d711ae15b9fa6 Author: Martin Blumenstingl Date: Thu Jan 19 15:58:20 2017 +0100 clk: gxbb: add the SAR ADC clocks and expose them The HHI_SAR_CLK_CNTL contains three SAR ADC specific clocks: - a mux clock to choose between different ADC reference clocks (this is 2-bit wide, but the datasheet only lists the parents for the first bit) - a divider for the input/reference clock - a gate which enables the ADC clock Additionally this exposes the ADC core clock (CLKID_SAR_ADC) and CLKID_SANA (which seems to enable the analog inputs, but unfortunately there is no documentation for this - we just mimic what the vendor driver does). Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.c | 48 +++++++++++++++++++++++++++++++++++ drivers/clk/meson/gxbb.h | 9 ++++--- include/dt-bindings/clock/gxbb-clkc.h | 4 +++ 3 files changed, 58 insertions(+), 3 deletions(-) commit 0264a88d6153e6cd5ee61239058b2002f36dde6b Author: Neil Armstrong Date: Wed Jan 18 11:50:42 2017 +0100 dt-bindings: amlogic: Add WeTek boards Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 2 ++ 1 file changed, 2 insertions(+) commit d537d289de06f57f5342106208ecf17ea83f23e2 Author: Neil Armstrong Date: Wed Jan 18 11:50:41 2017 +0100 ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play Adds support for the WeTek Hub and Play2 boards. The Hub is an extremely small IPTv Set-Top-Box and the Play2 is a more traditionnal Satellite or Terrestrial and IPTv Set-Top-Box. Both are based on the p200 Reference Design and out-of-tree support is based on LibreELEC kernel at [1]. [1] https://github.com/wetek-enigma/linux-amlogic Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 2 + .../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 66 +++++++++++++++ .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 94 ++++++++++++++++++++++ 3 files changed, 162 insertions(+) commit 9bfa24e90956cc79362572391657b84cf54a559a Author: Sylwester Nawrocki Date: Tue Jan 17 14:16:41 2017 +0100 ASoC: Revert "Drop SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag" This reverts commit c6644119a3f80ea644bde10009d5e1013b5aff29 and restores the ability to specify DMA channel names per DAI dma_data. Unfortunately the functionality removed in the patch being reverted cannot be entirely replaced by specifying DMA channel names in struct snd_dmaengine_pcm_config as that does not cover devices with more than 2 DMA channels. Together with patch "ASoC: Revert "samsung: Remove unneeded initialization of chan_name"" this fixes broken sound on the s3c24xx SoC platforms. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown include/sound/dmaengine_pcm.h | 6 ++++++ sound/soc/soc-generic-dmaengine-pcm.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit b8ab0ccc0b6e517ff595f1b06fb9f578c8b4001f Author: Sylwester Nawrocki Date: Tue Jan 17 14:16:42 2017 +0100 ASoC: Revert "samsung: Remove unneeded initialization of chan_name" This reverts commit cdaf9af1eaeb539e32bfd6da6310b41ad6c3ba23 which breaks I2S support on the non-DT Samsung SoC platforms, since the default "tx", "rx" DMA channel names for playback and capture streams or custom channel names in struct snd_dmaengine_pcm_config are supported in the ASoC dmaengine module only for devicetree booting case. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/dmaengine.c | 8 ++++++-- sound/soc/samsung/i2s.c | 3 +++ sound/soc/samsung/s3c2412-i2s.c | 2 ++ sound/soc/samsung/s3c24xx-i2s.c | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) commit ca7734ad77b4ffb83a03c80b8d64d40c7ef49263 Author: Andrey Smirnov Date: Tue Jan 10 08:30:14 2017 -0800 regulator: anatop: Add support for "anatop-enable-bit" Add code to support support for "anatop-enable-bit" device-tree property. This property translates to LINREG_ENABLE bit in real hardware and is present on 1p1, 2p5 and 3p0 regulators on i.MX6 and 1p0d regulator on i.MX7. Signed-off-by: Andrey Smirnov Signed-off-by: Mark Brown .../devicetree/bindings/regulator/anatop-regulator.txt | 1 + drivers/regulator/anatop-regulator.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 64e02cb0bdfc7cef0a01e2ad4d567fdc0a74450e Author: Jan Kiszka Date: Sat Jan 21 10:06:39 2017 +0100 spi: pca2xx-pci: Allow MSI Now that the core is ready for edge-triggered interrupts, we can safely allow the PCI versions that provide this to enable the feature and, thus, have less shared interrupts. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 100bd9a961e368490daa8cdbb2f41b03ef50164a Author: Neil Armstrong Date: Wed Jan 18 11:50:40 2017 +0100 dt-bindings: vendor-prefix: Add wetek vendor prefix Add prefix for WeTek Electronics, limited, a company producing multimedia Set-Top-Boxes and supporting KODI and LibreELEC distributions. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e51e9b93049f624c179bab2c651995bca22b5bb7 Author: Jan Kiszka Date: Sat Jan 21 10:06:38 2017 +0100 spi: pxa2xx: Prepare for edge-triggered interrupts When using the a device with edge-triggered interrupts, such as MSIs, the interrupt handler has to ensure that there is a point in time during its execution where all interrupts sources are silent so that a new event can trigger a new interrupt again. This is achieved here by disabling all interrupt sources for a moment before processing them according to the status register. If a new interrupt should have arrived after we read the status, it will now re-trigger the interrupt, even in edge mode. Signed-off-by: Jan Kiszka Acked-by: Robert Jarzmik Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 3 +++ 1 file changed, 3 insertions(+) commit 5f166156dbd4c0cf85632799ee7330d24deeec4e Author: Romain Perier Date: Mon Jan 23 11:41:46 2017 +0100 ASoC: es8328-i2c: Add compatible for ES8388 This commit adds a compatible string for everest,es8388. This is an audio codec that is compatible with es8328. Signed-off-by: Romain Perier Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/es8328.txt | 2 +- sound/soc/codecs/es8328-i2c.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 4404323c6ac256c2a11d86fda65fbdb7d198ff8c Author: Timur Tabi Date: Fri Jan 20 17:21:04 2017 -0600 net: qcom/emac: claim the irq only when the device is opened During reset, functions emac_mac_down() and emac_mac_up() are called, so we don't want to free and claim the IRQ unnecessarily. Move those operations to open/close. Signed-off-by: Timur Tabi Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 13 ------------- drivers/net/ethernet/qualcomm/emac/emac.c | 11 +++++++++++ drivers/net/ethernet/qualcomm/emac/emac.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) commit 41c1093f2e1a33f4bf38848b4b1526903c5052bb Author: Timur Tabi Date: Fri Jan 20 17:21:03 2017 -0600 net: qcom/emac: rename emac_phy to emac_sgmii and move it The EMAC has an internal PHY that is often called the "SGMII". This SGMII is also connected to an external PHY, which is managed by phylib. These dual PHYs often cause confusion. In this case, the data structure for managing the SGMII was mis-named and located in the wrong header file. Structure emac_phy is renamed to emac_sgmii to clearly indicate it applies to the internal PHY only. It also also moved from emac_phy.h (which supports the external PHY) to emac_sgmii.h (where it belongs). To keep the changes minimal, only the structure name is changed, not the names of any variables of that type. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-phy.c | 2 -- drivers/net/ethernet/qualcomm/emac/emac-phy.h | 13 ------------- drivers/net/ethernet/qualcomm/emac/emac-sgmii-fsm9900.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-sgmii-qdf2400.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-sgmii-qdf2432.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 8 ++++---- drivers/net/ethernet/qualcomm/emac/emac-sgmii.h | 13 +++++++++++++ drivers/net/ethernet/qualcomm/emac/emac.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac.h | 3 ++- 9 files changed, 23 insertions(+), 24 deletions(-) commit b4c2e158a1e1be38ce95366cf85b151fb6bd8e47 Author: Måns Andersson Date: Mon Jan 23 11:28:10 2017 +0100 regulator: tps65217: Allow DCDC1 and DCDC3 up to 3.3V The data sheet statement that DCDC1 and DCDC3 only can be set in the range 0.9V - 1.5V refers to storage on its internal EEPROM and therefore cold boot configuration. After power-on the device can be reconfigured over i2c and DCDC1/3 set up to 3.3V. Signed-off-by: Måns Andersson Signed-off-by: Mark Brown drivers/regulator/tps65217-regulator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e984fd61e860ce3c45e79d69cf214b8cc6cae7d9 Author: Kuninori Morimoto Date: Mon Jan 23 07:29:42 2017 +0000 ASoC: simple-card: use devm_get_clk_from_child() Current simple-card-utils is getting clk by of_clk_get(), but didn't call clk_free(). Now we can use devm_get_clk_from_child() for this purpose. Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 11 ++++++----- sound/soc/generic/simple-card-utils.c | 8 ++++---- sound/soc/generic/simple-card.c | 4 ++-- sound/soc/generic/simple-scu-card.c | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) commit 4e09f4a6b620d6617f2ce7ee858c6d98176d156e Author: Andrzej Hajda Date: Mon Jan 23 11:05:49 2017 +0100 arm64: dts: exynos: configure TV path clocks for Ultra HD modes Ultra HD modes requires clock ticking at increased rate. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c659af78eb7b7d7be40f23d9d97bde58eb1368ac Author: Stefan Berger Date: Thu Jan 19 07:19:12 2017 -0500 tpm: Check size of response before accessing data Make sure that we have not received less bytes than what is indicated in the header of the TPM response. Also, check the number of bytes in the response before accessing its data. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 70 ++++++++++++++++++++++++++++------------ drivers/char/tpm/tpm-sysfs.c | 28 ++++++++++------ drivers/char/tpm/tpm.h | 7 ++-- drivers/char/tpm/tpm2-cmd.c | 66 +++++++++++++++++++++++++++---------- drivers/char/tpm/tpm_tis_core.c | 3 +- 5 files changed, 123 insertions(+), 51 deletions(-) commit 1d70fe9d9c3a4c627f9757cbba5d628687b121c1 Author: Maciej S. Szmigiero Date: Fri Jan 13 22:37:00 2017 +0100 tpm_tis: use default timeout value if chip reports it as zero Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no longer works. The initialization proceeds fine until we get and start using chip-reported timeouts - and the chip reports C and D timeouts of zero. It turns out that until commit 8e54caf407b98e ("tpm: Provide a generic means to override the chip returned timeouts") we had actually let default timeout values remain in this case, so let's bring back this behavior to make chips like Atmel 3203 work again. Use a common code that was introduced by that commit so a warning is printed in this case and /sys/class/tpm/tpm*/timeouts correctly says the timeouts aren't chip-original. Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Cc: stable@vger.kernel.org Signed-off-by: Maciej S. Szmigiero Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 53 ++++++++++++++++++++++++---------------- drivers/char/tpm/tpm_tis.c | 2 +- drivers/char/tpm/tpm_tis_core.c | 6 ++--- drivers/char/tpm/tpm_tis_core.h | 2 +- 4 files changed, 37 insertions(+), 26 deletions(-) commit 62bfdacbac4c5868862effbde8067c7582407190 Author: Jason Gunthorpe Date: Mon Nov 21 11:31:09 2016 -0700 tpm: Do not print an error message when doing TPM auto startup This is a regression when this code was reworked and made the error print unconditional. The original code deliberately suppressed printing of the first error message so it could quietly sense TPM_ERR_INVALID_POSTINIT. Fixes: a502feb67b47 ("tpm: Clean up reading of timeout and duration capabilities") Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 19b7bf51fc3dcd8b743da72cfb69578de6eb9877 Author: Jiandi An Date: Sun Dec 18 22:20:53 2016 -0600 tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() crb_check_resource() in TPM CRB driver calls acpi_dev_resource_memory() which only handles 32-bit resources. Adding a call to acpi_dev_resource_address_space() in TPM CRB driver which handles 64-bit resources. Signed-off-by: Jiandi An Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit aea7f54f3c757af82e033034b6c38e9e46564bdb Author: Geliang Tang Date: Wed Nov 23 23:18:53 2016 +0800 tpm/tpm_tis_spi: drop duplicate header module.h Drop duplicate header module.h from tpm_tis_spi.c. Signed-off-by: Geliang Tang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 1 - 1 file changed, 1 deletion(-) commit 176cebc56bc74dc65dfb57947b8ba70ecfbee92e Author: Corentin Labbe Date: Thu Dec 15 18:10:17 2016 +0100 tpm/st33zp24: Remove unneeded linux/miscdevice.h include tpm/st33zp24/st33zp24.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/st33zp24.c | 1 - 1 file changed, 1 deletion(-) commit 93c12f293f879825d2b960cfff01ec881e6a44fd Author: Winkler, Tomas Date: Wed Nov 23 12:04:14 2016 +0200 tpm/vtpm: fix kdoc warnings Use corret kdoc format for function description and eliminate warning of type: tpm_ibmvtpm.c:66: warning: No description found for parameter 'count' Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_ibmvtpm.c | 106 ++++++++++++++++++++------------------ drivers/char/tpm/tpm_vtpm_proxy.c | 48 ++++++++++++----- 2 files changed, 91 insertions(+), 63 deletions(-) commit 2998b02b2fb58f36ccbc318b00513174e9947d8e Author: Winkler, Tomas Date: Wed Nov 23 12:04:13 2016 +0200 tmp: use pdev for parent device in tpm_chip_alloc The tpm stack uses pdev name convention for the parent device. Fix that also in tpm_chip_alloc(). Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")' Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 794c6e109b5938da935afde944d1f081e2f51e7d Author: Winkler, Tomas Date: Wed Nov 23 12:04:12 2016 +0200 tpm/tpm2-chip: fix kdoc errors Use correct kdoc format, describe correct parameters and return values. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2-cmd.c | 104 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 48 deletions(-) commit f865c196856d3e27c29cd1466d858ba4375adf3e Author: Winkler, Tomas Date: Wed Nov 23 12:04:11 2016 +0200 tpm: add kdoc for tpm_transmit and tpm_transmit_cmd Functions tpm_transmit and transmit_cmd are referenced from other functions kdoc hence deserve documentation. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit b9032741e4f86844d8c4a7c18001ee328dae2f7a Author: Eric Dumazet Date: Fri Jan 20 08:25:34 2017 -0800 bnx2x: avoid two atomic ops per page on x86 Commit 4cace675d687 ("bnx2x: Alloc 4k fragment for each rx ring buffer element") added extra put_page() and get_page() calls on arches where PAGE_SIZE=4K like x86 Reorder things to avoid this overhead. Signed-off-by: Eric Dumazet Cc: Gabriel Krisman Bertazi Cc: Yuval Mintz Cc: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 1cf417530375b475d4a8a9f18dc0867f91e52d78 Author: Markus Elfring Date: Sat Jan 21 22:44:07 2017 +0100 cfq-iosched: Adjust one function call together with a variable assignment The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: Jens Axboe block/cfq-iosched.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d609af3a1397511a7a2c213f9f855fa82df771ee Author: Markus Elfring Date: Sat Jan 21 22:15:33 2017 +0100 blk-throttle: Adjust two function calls together with a variable assignment The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code places. Signed-off-by: Markus Elfring Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-throttle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4d608baac5f4e72b033a122b2d6d9499532c3afc Author: Alexander Potapenko Date: Mon Jan 23 15:06:43 2017 +0100 block: Initialize cfqq->ioprio_class in cfq_get_queue() KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of uninitialized memory in cfq_init_cfqq(): ================================================================== BUG: KMSAN: use of unitialized memory ... Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x157/0x1d0 lib/dump_stack.c:51 [] kmsan_report+0x205/0x360 ??:? [] __msan_warning+0x5b/0xb0 ??:? [< inline >] cfq_init_cfqq block/cfq-iosched.c:3754 [] cfq_get_queue+0xc80/0x14d0 block/cfq-iosched.c:3857 ... origin: [] save_stack_trace+0x27/0x50 arch/x86/kernel/stacktrace.c:67 [] kmsan_internal_poison_shadow+0xab/0x150 ??:? [] kmsan_poison_slab+0xbb/0x120 ??:? [< inline >] allocate_slab mm/slub.c:1627 [] new_slab+0x3af/0x4b0 mm/slub.c:1641 [< inline >] new_slab_objects mm/slub.c:2407 [] ___slab_alloc+0x323/0x4a0 mm/slub.c:2564 [< inline >] __slab_alloc mm/slub.c:2606 [< inline >] slab_alloc_node mm/slub.c:2669 [] kmem_cache_alloc_node+0x1d2/0x1f0 mm/slub.c:2746 [] cfq_get_queue+0x47d/0x14d0 block/cfq-iosched.c:3850 ... ================================================================== (the line numbers are relative to 4.8-rc6, but the bug persists upstream) The uninitialized struct cfq_queue is created by kmem_cache_alloc_node() and then passed to cfq_init_cfqq(), which accesses cfqq->ioprio_class before it's initialized. Signed-off-by: Alexander Potapenko Signed-off-by: Jens Axboe block/cfq-iosched.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c9b1bc25291e275b04f758f2549c81e092954f5 Author: Kevin Hilman Date: Mon Jan 9 12:55:29 2017 -0800 ARM: davinci: add skeleton for pdata-quirks Add skeleton pdata-quirks for davinci. Signed-off-by: Kevin Hilman [nsekhar@ti.com: move changes to build pdata-quirks.c and call to pdata_quirks_init() to this patch] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/Makefile | 2 +- arch/arm/mach-davinci/da8xx-dt.c | 1 + arch/arm/mach-davinci/include/mach/common.h | 2 ++ arch/arm/mach-davinci/pdata-quirks.c | 39 +++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) commit 90ffc1ecc500c04bf43a45d804bb151505c0d6a6 Author: Kuninori Morimoto Date: Fri Jan 20 04:23:29 2017 +0000 ASoC: rsnd: fixup for_each_rsnd_mod_array{s} iterator increment commit 5f222a292 ("ASoC: rsnd: use for_each_rsnd_mod_xxx() ...") modifies rsnd_dai_call() to use for_each_rsnd_mod_arrays(). Current rsnd is incrementing iterator in rsnd_mod_next(), but the iterator will indicate +1 position in for_each loop in this case. Incremental position should be inside for() Reported-by: Hoan Nguyen An Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 -- sound/soc/sh/rcar/rsnd.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 4a8d8a14c0d08c2437cb80c05e88f6cc1ca3fb2c Author: Will Deacon Date: Fri Jan 6 10:49:12 2017 +0000 arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA The arm64 DMA-mapping implementation sets the DMA ops to the IOMMU DMA ops if we detect that an IOMMU is present for the master and the DMA ranges are valid. In the case when the IOMMU domain for the device is not of type IOMMU_DOMAIN_DMA, then we have no business swizzling the ops, since we're not in control of the underlying address space. This patch leaves the DMA ops alone for masters attached to non-DMA IOMMU domains. Reviewed-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 5018c8d5ef0c172592eb98cf10e253d47b544ba8 Author: Eric Auger Date: Thu Jan 19 20:58:03 2017 +0000 iommu/arm-smmu: Do not advertise IOMMU_CAP_INTR_REMAP anymore IOMMU_CAP_INTR_REMAP has been advertised in arm-smmu(-v3) although on ARM this property is not attached to the IOMMU but rather is implemented in the MSI controller (GICv3 ITS). Now vfio_iommu_type1 checks MSI remapping capability at MSI controller level, let's correct this. Signed-off-by: Eric Auger Acked-by: Will Deacon Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 2 -- drivers/iommu/arm-smmu.c | 2 -- 2 files changed, 4 deletions(-) commit 9d72f87babf144ff3ca5d85655c710de05110038 Author: Eric Auger Date: Thu Jan 19 20:58:02 2017 +0000 vfio/type1: Check MSI remapping at irq domain level In case the IOMMU translates MSI transactions (typical case on ARM), we check MSI remapping capability at IRQ domain level. Otherwise it is checked at IOMMU level. At this stage the arm-smmu-(v3) still advertise the IOMMU_CAP_INTR_REMAP capability at IOMMU level. This will be removed in subsequent patches. Signed-off-by: Eric Auger Acked-by: Alex Williamson Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/vfio/vfio_iommu_type1.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5d704992189fe8683a23f583a2f4f137a9b9d28b Author: Eric Auger Date: Thu Jan 19 20:58:01 2017 +0000 vfio/type1: Allow transparent MSI IOVA allocation When attaching a group to the container, check the group's reserved regions and test whether the IOMMU translates MSI transactions. If yes, we initialize an IOVA allocator through the iommu_get_msi_cookie API. This will allow the MSI IOVAs to be transparently allocated on MSI controller's compose(). Signed-off-by: Eric Auger Acked-by: Alex Williamson Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/vfio/vfio_iommu_type1.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 59768527db3de41afb0586e677e322012e6a392b Author: Eric Auger Date: Thu Jan 19 20:58:00 2017 +0000 irqchip/gicv3-its: Sets IRQ_DOMAIN_FLAG_MSI_REMAP The GICv3 ITS is MSI remapping capable. Let's advertise this property so that VFIO passthrough can assess IRQ safety. Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/irqchip/irq-gic-v3-its.c | 1 + 1 file changed, 1 insertion(+) commit c7b41f0af38f53e46050b56a5b0e96710097b83c Author: Eric Auger Date: Thu Jan 19 20:57:59 2017 +0000 irqdomain: irq_domain_check_msi_remap This new function checks whether all MSI irq domains implement IRQ remapping. This is useful to understand whether VFIO passthrough is safe with respect to interrupts. On ARM typically an MSI controller can sit downstream to the IOMMU without preventing VFIO passthrough. As such any assigned device can write into the MSI doorbell. In case the MSI controller implements IRQ remapping, assigned devices will not be able to trigger interrupts towards the host. On the contrary, the assignment must be emphasized as unsafe with respect to interrupts. Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon include/linux/irqdomain.h | 1 + kernel/irq/irqdomain.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit 88156f00904183d99e19269fbdb5cb56dc1522c3 Author: Eric Auger Date: Thu Jan 19 20:57:58 2017 +0000 genirq/msi: Set IRQ_DOMAIN_FLAG_MSI on MSI domain creation Now we have a flag value indicating an IRQ domain implements MSI, let's set it on msi_create_irq_domain(). Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon kernel/irq/msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 631a9639ac413da6242cb15558ebd661cf633622 Author: Eric Auger Date: Thu Jan 19 20:57:57 2017 +0000 irqdomain: Add irq domain MSI and MSI_REMAP flags We introduce two new enum values for the irq domain flag: - IRQ_DOMAIN_FLAG_MSI indicates the irq domain corresponds to an MSI domain - IRQ_DOMAIN_FLAG_MSI_REMAP indicates the irq domain has MSI remapping capabilities. Those values will be useful to check all MSI irq domains have MSI remapping support when assessing the safety of IRQ assignment to a guest. irq_domain_hierarchical_is_msi_remap() allows to check if an irq domain or any parent implements MSI remapping. Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon include/linux/irqdomain.h | 35 +++++++++++++++++++++++++++++++++++ kernel/irq/irqdomain.c | 14 ++++++++++++++ 2 files changed, 49 insertions(+) commit 50019f09a4baa0bd6635d4933c1bfed22d66b640 Author: Eric Auger Date: Thu Jan 19 20:57:56 2017 +0000 iommu/arm-smmu-v3: Implement reserved region get/put callbacks The get() populates the list with the MSI IOVA reserved window. At the moment an arbitray MSI IOVA window is set at 0x8000000 of size 1MB. This will allow to report those info in iommu-group sysfs. Signed-off-by: Eric Auger Acked-by: Will Deacon Reviewed-by: Tomasz Nowicki Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f3ebee80b3131d4cdb49d39cf07b32afe40b811c Author: Eric Auger Date: Thu Jan 19 20:57:55 2017 +0000 iommu/arm-smmu: Implement reserved region get/put callbacks The get() populates the list with the MSI IOVA reserved window. At the moment an arbitray MSI IOVA window is set at 0x8000000 of size 1MB. This will allow to report those info in iommu-group sysfs. Signed-off-by: Eric Auger Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Acked-by: Will Deacon Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7dede913fc2ab9c0d3bff3a49e26fa9e858b0c13 Author: Li Zhong Date: Fri Jan 20 16:35:33 2017 +0800 crypto: vmx - disable preemption to enable vsx in aes_ctr.c Some preemptible check warnings were reported from enable_kernel_vsx(). This patch disables preemption in aes_ctr.c before enabling vsx, and they are now consistent with other files in the same directory. Signed-off-by: Li Zhong Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_ctr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d03f7b0d58ac1bed9d98960dfe831f69a6f15aab Author: Ryder Lee Date: Fri Jan 20 13:41:15 2017 +0800 crypto: mediatek - add support to GCM mode This patch adds support to the GCM mode. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 2 + drivers/crypto/mediatek/mtk-aes.c | 369 ++++++++++++++++++++++++++++++++- drivers/crypto/mediatek/mtk-platform.h | 2 + 3 files changed, 369 insertions(+), 4 deletions(-) commit e04a31d7f5712a757245cde7f535a105b67ca99b Author: Ryder Lee Date: Fri Jan 20 13:41:14 2017 +0800 crypto: mediatek - add support to CTR mode This patch adds support to the CTR mode. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 151 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 146 insertions(+), 5 deletions(-) commit 059b14947aaa2b5eb66465be5fa0ba816044ab01 Author: Ryder Lee Date: Fri Jan 20 13:41:13 2017 +0800 crypto: mediatek - fix typo and indentation Dummy patch to fix typo and indentation. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 90 +++++++++++++++++----------------- drivers/crypto/mediatek/mtk-platform.h | 2 +- drivers/crypto/mediatek/mtk-sha.c | 40 +++++++-------- 3 files changed, 63 insertions(+), 69 deletions(-) commit 0abc271494d1209e097f2837e324ecd9c05716e5 Author: Ryder Lee Date: Fri Jan 20 13:41:12 2017 +0800 crypto: mediatek - regroup functions by usage This patch only regroup functions by usage. This will help to integrate the GCM support patch later by adjusting some shared code section, such as common code which will be reused by GCM, AES mode setting, and DMA transfer. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 272 ++++++++++++++++++++------------------ 1 file changed, 141 insertions(+), 131 deletions(-) commit 87421984b4d2e04cfe858849db10ac326d9f3aed Author: Ryder Lee Date: Fri Jan 20 13:41:11 2017 +0800 crypto: mediatek - rework crypto request completion This patch introduces a new callback 'resume' in the struct mtk_aes_rec. This callback is run to resume/complete the processing of the crypto request when woken up by AES interrupts when DMA completion. This callback will help implementing the GCM mode support in further patches. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 25 +++++++++++++------------ drivers/crypto/mediatek/mtk-platform.h | 3 +++ 2 files changed, 16 insertions(+), 12 deletions(-) commit 382ae57d5e52a62e77d62e60e5be9a6526d40da0 Author: Ryder Lee Date: Fri Jan 20 13:41:10 2017 +0800 crypto: mediatek - make crypto request queue management more generic This patch changes mtk_aes_handle_queue() to make it more generic. The function argument is now a pointer to struct crypto_async_request, which is the common base of struct ablkcipher_request and struct aead_request. Also this patch introduces struct mtk_aes_base_ctx which will be the common base of all the transformation contexts. Hence the very same queue will be used to manage both block cipher and AEAD requests (such as gcm and authenc implemented in further patches). Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 75 ++++++++++++++++++++-------------- drivers/crypto/mediatek/mtk-platform.h | 14 ++++--- 2 files changed, 53 insertions(+), 36 deletions(-) commit 4432861fb9747fce52f94bc13da0d9b41292ef69 Author: Ryder Lee Date: Fri Jan 20 13:41:09 2017 +0800 crypto: mediatek - fix incorrect data transfer result This patch fixes mtk_aes_xmit() data transfer bug. The original function uses the same loop and ring->pos to handle both command and result descriptors. But this produces incomplete results when src.sg_len != dst.sg_len. To solve the problem, we splits the descriptors into different loops and uses cmd_pos and res_pos to record them respectively. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 44 ++++++++++++++++++++-------------- drivers/crypto/mediatek/mtk-platform.h | 6 +++-- drivers/crypto/mediatek/mtk-sha.c | 29 ++++++++++++---------- 3 files changed, 47 insertions(+), 32 deletions(-) commit a873996238e4019c54c49b56fcc1fef35a93da41 Author: Ryder Lee Date: Fri Jan 20 13:41:08 2017 +0800 crypto: mediatek - move HW control data to transformation context This patch moves hardware control block members from mtk_*_rec to transformation context and refines related definition. This makes operational context to manage its own control information easily for each DMA transfer. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 144 ++++++++++++++++----------------- drivers/crypto/mediatek/mtk-platform.h | 26 +----- drivers/crypto/mediatek/mtk-sha.c | 101 ++++++++++++----------- 3 files changed, 126 insertions(+), 145 deletions(-) commit e183914af00e15eb41ae666d44e323bfa154be13 Author: Denys Vlasenko Date: Thu Jan 19 22:33:04 2017 +0100 crypto: x86 - make constants readonly, allow linker to merge them A lot of asm-optimized routines in arch/x86/crypto/ keep its constants in .data. This is wrong, they should be on .rodata. Mnay of these constants are the same in different modules. For example, 128-bit shuffle mask 0x000102030405060708090A0B0C0D0E0F exists in at least half a dozen places. There is a way to let linker merge them and use just one copy. The rules are as follows: mergeable objects of different sizes should not share sections. You can't put them all in one .rodata section, they will lose "mergeability". GCC puts its mergeable constants in ".rodata.cstSIZE" sections, or ".rodata.cstSIZE." if -fdata-sections is used. This patch does the same: .section .rodata.cst16.SHUF_MASK, "aM", @progbits, 16 It is important that all data in such section consists of 16-byte elements, not larger ones, and there are no implicit use of one element from another. When this is not the case, use non-mergeable section: .section .rodata[.VAR_NAME], "a", @progbits This reduces .data by ~15 kbytes: text data bss dec hex filename 11097415 2705840 2630712 16433967 fac32f vmlinux-prev.o 11112095 2690672 2630712 16433479 fac147 vmlinux.o Merged objects are visible in System.map: ffffffff81a28810 r POLY ffffffff81a28810 r POLY ffffffff81a28820 r TWOONE ffffffff81a28820 r TWOONE ffffffff81a28830 r PSHUFFLE_BYTE_FLIP_MASK <- merged regardless of ffffffff81a28830 r SHUF_MASK <------------- the name difference ffffffff81a28830 r SHUF_MASK ffffffff81a28830 r SHUF_MASK .. ffffffff81a28d00 r K512 <- merged three identical 640-byte tables ffffffff81a28d00 r K512 ffffffff81a28d00 r K512 Use of object names in section name suffixes is not strictly necessary, but might help if someday link stage will use garbage collection to eliminate unused sections (ld --gc-sections). Signed-off-by: Denys Vlasenko CC: Herbert Xu CC: Josh Poimboeuf CC: Xiaodong Liu CC: Megha Dey CC: linux-crypto@vger.kernel.org CC: x86@kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 37 +++++++++++++++++----- arch/x86/crypto/aesni-intel_avx-x86_64.S | 32 ++++++++++++++----- arch/x86/crypto/camellia-aesni-avx-asm_64.S | 5 ++- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 12 +++++-- arch/x86/crypto/cast5-avx-x86_64-asm_64.S | 14 ++++++-- arch/x86/crypto/cast6-avx-x86_64-asm_64.S | 12 +++++-- arch/x86/crypto/chacha20-avx2-x86_64.S | 9 ++++-- arch/x86/crypto/chacha20-ssse3-x86_64.S | 7 ++-- arch/x86/crypto/crct10dif-pcl-asm_64.S | 14 ++++++-- arch/x86/crypto/des3_ede-asm_64.S | 2 +- arch/x86/crypto/ghash-clmulni-intel_asm.S | 3 +- arch/x86/crypto/poly1305-avx2-x86_64.S | 6 ++-- arch/x86/crypto/poly1305-sse2-x86_64.S | 6 ++-- arch/x86/crypto/serpent-avx-x86_64-asm_64.S | 5 +-- arch/x86/crypto/serpent-avx2-asm_64.S | 9 ++++-- arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S | 6 ++-- arch/x86/crypto/sha1-mb/sha1_mb_mgr_submit_avx2.S | 3 +- arch/x86/crypto/sha1-mb/sha1_x8_avx2.S | 15 +++++++-- arch/x86/crypto/sha1_ni_asm.S | 8 +++-- arch/x86/crypto/sha256-avx-asm.S | 9 +++++- arch/x86/crypto/sha256-avx2-asm.S | 9 +++++- .../crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S | 6 ++-- .../crypto/sha256-mb/sha256_mb_mgr_submit_avx2.S | 3 +- arch/x86/crypto/sha256-mb/sha256_x8_avx2.S | 7 +++- arch/x86/crypto/sha256-ssse3-asm.S | 8 ++++- arch/x86/crypto/sha256_ni_asm.S | 4 ++- arch/x86/crypto/sha512-avx-asm.S | 9 ++++-- arch/x86/crypto/sha512-avx2-asm.S | 10 ++++-- .../crypto/sha512-mb/sha512_mb_mgr_flush_avx2.S | 10 ++++-- .../crypto/sha512-mb/sha512_mb_mgr_submit_avx2.S | 4 ++- arch/x86/crypto/sha512-mb/sha512_x4_avx2.S | 4 ++- arch/x86/crypto/sha512-ssse3-asm.S | 9 ++++-- arch/x86/crypto/twofish-avx-x86_64-asm_64.S | 6 ++-- 33 files changed, 229 insertions(+), 74 deletions(-) commit 587d531b8f67ebe62f8326849a7a685a03cbc904 Author: Denys Vlasenko Date: Thu Jan 19 22:28:05 2017 +0100 crypto: x86/crc32c - fix %progbits -> @progbits %progbits form is used on ARM (where @ is a comment char). x86 consistently uses @progbits everywhere else. Signed-off-by: Denys Vlasenko CC: Herbert Xu CC: Josh Poimboeuf CC: Xiaodong Liu CC: Megha Dey CC: George Spelvin CC: linux-crypto@vger.kernel.org CC: x86@kernel.org CC: linux-kernel@vger.kernel.org Reviewed-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13954e788dc7e3a47cc00419c120a63756be4eb1 Author: Ard Biesheuvel Date: Thu Jan 19 12:23:32 2017 +0000 crypto: arm/aes-neonbs - fix issue with v2.22 and older assembler The GNU assembler for ARM version 2.22 or older fails to infer the element size from the vmov instructions, and aborts the build in the following way; .../aes-neonbs-core.S: Assembler messages: .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1h[1],r10' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1h[0],r9' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1l[1],r8' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1l[0],r7' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2h[1],r10' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2h[0],r9' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2l[1],r8' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2l[0],r7' Fix this by setting the element size explicitly, by replacing vmov with vmov.32. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-neonbs-core.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 76512f2d8ca5e68160f4df0dead5e8e7b4bdb08e Author: Rabin Vincent Date: Wed Jan 18 14:54:05 2017 +0100 crypto: tcrypt - Add debug prints tcrypt is very tight-lipped when it succeeds, but a bit more feedback would be useful when developing or debugging crypto drivers, especially since even a successful run ends with the module failing to insert. Add a couple of debug prints, which can be enabled with dynamic debug: Before: # insmod tcrypt.ko mode=10 insmod: can't insert 'tcrypt.ko': Resource temporarily unavailable After: # insmod tcrypt.ko mode=10 dyndbg tcrypt: testing ecb(aes) tcrypt: testing cbc(aes) tcrypt: testing lrw(aes) tcrypt: testing xts(aes) tcrypt: testing ctr(aes) tcrypt: testing rfc3686(ctr(aes)) tcrypt: all tests passed insmod: can't insert 'tcrypt.ko': Resource temporarily unavailable Signed-off-by: Rabin Vincent Signed-off-by: Herbert Xu crypto/tcrypt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3bfb2e6b32443841ff90460a78bdefb19f8d61e8 Author: Nicolas Iooss Date: Sun Jan 15 13:37:50 2017 +0100 crypto: img-hash - use dma_data_direction when calling dma_map_sg The fourth argument of dma_map_sg() and dma_unmap_sg() is an item of dma_data_direction enum. Function img_hash_xmit_dma() wrongly used DMA_MEM_TO_DEV, which is an item of dma_transfer_direction enum. Replace DMA_MEM_TO_DEV (which value is 1) with DMA_TO_DEVICE (which value is fortunately also 1) when calling dma_map_sg() and dma_unmap_sg(). Signed-off-by: Nicolas Iooss Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd9a99c2f8e890e84c593e393796b12ba7743128 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:04 2017 +0100 dt-bindings: pwm: Add STM32 bindings Define bindings for pwm-stm32 version 9: - change commit message header version 8: - reword st,breakinput description. version 6: - change st,breakinput parameter format to make it usuable on stm32f7 too. version 2: - use parameters instead of compatible of handle the hardware configuration Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Lee Jones .../devicetree/bindings/pwm/pwm-stm32.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d0f949e220fdf5ed1033e9f6e80749b05f2e7b70 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:03 2017 +0100 mfd: Add STM32 Timers driver This hardware block could at used at same time for PWM generation and IIO timers. 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. version 7: - rebase on v4.10-rc2 version 6: - rename files to stm32-timers - rename functions to stm32_timers_xxx version 5: - fix Lee comments about detect function - add missing dependency on REGMAP_MMIO version 4: - add a function to detect Auto Reload Register (ARR) size - rename the structure shared with other drivers version 2: - rename driver "stm32-gptimer" to be align with SoC documentation - only keep one compatible - use of_platform_populate() instead of devm_mfd_add_devices() Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: Lee Jones drivers/mfd/Kconfig | 11 ++++++ drivers/mfd/Makefile | 2 + drivers/mfd/stm32-timers.c | 80 ++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/stm32-timers.h | 71 +++++++++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+) commit 8f9359c6c6a00b43273480a5cf5b0f240aa3b648 Author: Benjamin Gaignard Date: Fri Jan 20 10:15:02 2017 +0100 dt-bindings: mfd: Add bindings for STM32 Timers driver Add bindings information for STM32 Timers version 6: - rename stm32-gtimer to stm32-timers - change compatible - add description about the IPs version 2: - rename stm32-mfd-timer to stm32-gptimer - only keep one compatible string Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/stm32-timers.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 4397f32c03a757acb3e44d268c20233fa1758ed9 Author: Eric Auger Date: Thu Jan 19 20:57:54 2017 +0000 iommu/amd: Declare MSI and HT regions as reserved IOVA regions This patch registers the MSI and HT regions as non mappable reserved regions. They will be exposed in the iommu-group sysfs. For direct-mapped regions let's also use iommu_alloc_resv_region(). Signed-off-by: Eric Auger Signed-off-by: Will Deacon drivers/iommu/amd_iommu.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 0659b8dc45a6b13a4fec73b2ebb51c96b41974c4 Author: Eric Auger Date: Thu Jan 19 20:57:53 2017 +0000 iommu/vt-d: Implement reserved region get/put callbacks This patch registers the [FEE0_0000h - FEF0_000h] 1MB MSI range as a reserved region and RMRR regions as direct regions. This will allow to report those reserved regions in the iommu-group sysfs. Signed-off-by: Eric Auger Signed-off-by: Will Deacon drivers/iommu/intel-iommu.c | 92 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 18 deletions(-) commit bc7d12b91bd35477fd650c4d72b61239de9d9066 Author: Eric Auger Date: Thu Jan 19 20:57:52 2017 +0000 iommu: Implement reserved_regions iommu-group sysfs file A new iommu-group sysfs attribute file is introduced. It contains the list of reserved regions for the iommu-group. Each reserved region is described on a separate line: - first field is the start IOVA address, - second is the end IOVA address, - third is the type. Signed-off-by: Eric Auger Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon .../ABI/testing/sysfs-kernel-iommu_groups | 12 ++++++++ drivers/iommu/iommu.c | 36 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 6c65fb318e8bbf21e939e651028b955324f1d873 Author: Eric Auger Date: Thu Jan 19 20:57:51 2017 +0000 iommu: iommu_get_group_resv_regions Introduce iommu_get_group_resv_regions whose role consists in enumerating all devices from the group and collecting their reserved regions. The list is sorted and overlaps between regions of the same type are handled by merging the regions. Signed-off-by: Eric Auger Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/iommu.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/iommu.h | 8 +++++ 2 files changed, 106 insertions(+) commit 544a25d904cab2ae68bd71b334603ec3a49b60dd Author: Eric Auger Date: Thu Jan 19 20:57:50 2017 +0000 iommu: Only map direct mapped regions As we introduced new reserved region types which do not require mapping, let's make sure we only map direct mapped regions. Signed-off-by: Eric Auger Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/iommu.c | 3 +++ 1 file changed, 3 insertions(+) commit 2b20cbba3390a55c511acba2f0f517dd27a528b2 Author: Eric Auger Date: Thu Jan 19 20:57:49 2017 +0000 iommu: iommu_alloc_resv_region Introduce a new helper serving the purpose to allocate a reserved region. This will be used in iommu driver implementing reserved region callbacks. Signed-off-by: Eric Auger Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/iommu.c | 18 ++++++++++++++++++ include/linux/iommu.h | 2 ++ 2 files changed, 20 insertions(+) commit d30ddcaa7b028049cdfee3a40248002d07b2bbf3 Author: Eric Auger Date: Thu Jan 19 20:57:48 2017 +0000 iommu: Add a new type field in iommu_resv_region We introduce a new field to differentiate the reserved region types and specialize the apply_resv_region implementation. Legacy direct mapped regions have IOMMU_RESV_DIRECT type. We introduce 2 new reserved memory types: - IOMMU_RESV_MSI will characterize MSI regions that are mapped - IOMMU_RESV_RESERVED characterize regions that cannot by mapped. Signed-off-by: Eric Auger Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/amd_iommu.c | 1 + include/linux/iommu.h | 7 +++++++ 2 files changed, 8 insertions(+) commit e5b5234a36ca283158721d3d2e0cddfa324abdf9 Author: Eric Auger Date: Thu Jan 19 20:57:47 2017 +0000 iommu: Rename iommu_dm_regions into iommu_resv_regions We want to extend the callbacks used for dm regions and use them for reserved regions. Reserved regions can be - directly mapped regions - regions that cannot be iommu mapped (PCI host bridge windows, ...) - MSI regions (because they belong to another address space or because they are not translated by the IOMMU and need special handling) So let's rename the struct and also the callbacks. Signed-off-by: Eric Auger Acked-by: Robin Murphy Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/amd_iommu.c | 20 ++++++++++---------- drivers/iommu/iommu.c | 22 +++++++++++----------- include/linux/iommu.h | 29 +++++++++++++++-------------- 3 files changed, 36 insertions(+), 35 deletions(-) commit fdbe574eb69312a7fbe09674d69c01b80e4ed9dc Author: Robin Murphy Date: Thu Jan 19 20:57:46 2017 +0000 iommu/dma: Allow MSI-only cookies IOMMU domain users such as VFIO face a similar problem to DMA API ops with regard to mapping MSI messages in systems where the MSI write is subject to IOMMU translation. With the relevant infrastructure now in place for managed DMA domains, it's actually really simple for other users to piggyback off that and reap the benefits without giving up their own IOVA management, and without having to reinvent their own wheel in the MSI layer. Allow such users to opt into automatic MSI remapping by dedicating a region of their IOVA space to a managed cookie, and extend the mapping routine to implement a trivial linear allocator in such cases, to avoid the needless overhead of a full-blown IOVA domain. Signed-off-by: Robin Murphy Reviewed-by: Tomasz Nowicki Reviewed-by: Eric Auger Tested-by: Eric Auger Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon drivers/iommu/dma-iommu.c | 119 +++++++++++++++++++++++++++++++++++++--------- include/linux/dma-iommu.h | 6 +++ 2 files changed, 102 insertions(+), 23 deletions(-) commit 6b48644b1d29d78c146bc94814afe01625dd0f0d Author: Maxime Ripard Date: Sun Oct 16 18:54:26 2016 +0200 ARM: gr8: Convert to CCU Now that we have a driver for the GR8, we can convert our DT to it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-gr8.dtsi | 520 +++++---------------------------------- 1 file changed, 56 insertions(+), 464 deletions(-) commit 98a59a0fbf80ec6a00c43fd0c62b8bcfe6e1ac24 Author: Maxime Ripard Date: Sat Oct 15 22:36:19 2016 +0200 ARM: sun5i: Convert to CCU Now that we have drivers for all of them, convert all the SoCs that share the sun5i DTSI to the new CCU driver. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a10s.dtsi | 85 ++------- arch/arm/boot/dts/sun5i-a13.dtsi | 140 ++------------- arch/arm/boot/dts/sun5i-r8.dtsi | 10 +- arch/arm/boot/dts/sun5i.dtsi | 353 ++++---------------------------------- 4 files changed, 75 insertions(+), 513 deletions(-) commit 5e73761786d6ff7e10c371703835528dee9306e3 Author: Maxime Ripard Date: Tue Oct 4 10:09:58 2016 +0200 clk: sunxi-ng: Add sun5i CCU driver The Allwinner A10s, A13, R8 and NextThing GR8 are all based on the same silicon, and all share the same clocks. However, they're not packaged in the same way, and therefore not all the controllers are actually available on all these SoCs. Introduce a clock controller driver for all these SoCs with different compatibles to take that into account. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 10 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun5i.c | 1022 +++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun5i.h | 67 +++ include/dt-bindings/clock/sun5i-ccu.h | 103 ++++ include/dt-bindings/reset/sun5i-ccu.h | 32 ++ 6 files changed, 1235 insertions(+) commit 7c09b858961df25a3bd1ac22e802525795338a6d Author: Maxime Ripard Date: Thu Jan 19 22:49:26 2017 +0100 clk: sunxi-ng: Implement global pre-divider Some clocks have a global pre-divider that applies to all their parents. Since it might also apply to clocks that have a single parent, this is merged in the ccu_common structure, unlike the other pre-divider settings that are tied to a specific index, and thus a specific parent. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_common.h | 2 ++ drivers/clk/sunxi-ng/ccu_mux.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 0c3c8e135897eb8e896a0bb82a5aff6c9bc158cc Author: Maxime Ripard Date: Fri Oct 14 12:08:19 2016 +0200 clk: sunxi-ng: Implement multiplier maximum Some multipliers have a maximum rate that is lower than what the register width allows to. Add a field in the multiplier structure to allow CCU driver to set that maximum. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mult.c | 14 ++++++++++++-- drivers/clk/sunxi-ng/ccu_mult.h | 10 ++++++---- drivers/clk/sunxi-ng/ccu_nk.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_nkm.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_nkmp.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_nm.c | 4 ++-- 6 files changed, 32 insertions(+), 20 deletions(-) commit c9520be3839063bbb50aabec531cc0d0b8595564 Author: Maxime Ripard Date: Sat Jan 21 23:41:56 2017 +0100 clk: sunxi-ng: mult: Fix minimum in round rate The previous code was always taking 1 as the minimum in it's round_rate function, ignoring entirely what was set as minimum in the clock definition. Make sure that's not the case anymore. Fixes: 2beaa601c849 ("clk: sunxi-ng: Implement minimum for multipliers") Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mult.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e66f81bbd7464621215219b72a0523f1b1078fae Author: Maxime Ripard Date: Tue Nov 8 18:12:34 2016 +0100 clk: sunxi-ng: Implement factors offsets The factors we've seen so far all had an offset of one. However, on the earlier Allwinner SoCs, some factors could have no offset at all, meaning that the value computed to reach the rate we want to use was the one we had to program in the registers. Implement an additional field for the factors that can have such an offset (linears, not based on a power of two) to specify that offset. This offset is not linked to the extremums that can be specified in those structures too. The minimum and maximum are representing the range of values we can use to try to compute the best rate. The offset comes later on when we want to set the best value in the registers. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_div.h | 10 +++++++++- drivers/clk/sunxi-ng/ccu_mp.c | 10 +++++++--- drivers/clk/sunxi-ng/ccu_mult.c | 6 +++--- drivers/clk/sunxi-ng/ccu_mult.h | 20 ++++++++++++++------ drivers/clk/sunxi-ng/ccu_nk.c | 14 ++++++++++---- drivers/clk/sunxi-ng/ccu_nkm.c | 18 +++++++++++++----- drivers/clk/sunxi-ng/ccu_nkmp.c | 17 +++++++++++++---- drivers/clk/sunxi-ng/ccu_nm.c | 13 ++++++++++--- 8 files changed, 79 insertions(+), 29 deletions(-) commit d77e8135b3405dd08a6bf05613d765cbd0bfd5a6 Author: Maxime Ripard Date: Thu Oct 13 12:44:55 2016 +0200 clk: sunxi-ng: multiplier: Add fractional support Some clocks on the earlier SoCs such as the video PLLs are multipliers with fractional settings. Support those cases. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_mult.c | 8 ++++++++ drivers/clk/sunxi-ng/ccu_mult.h | 2 ++ 2 files changed, 10 insertions(+) commit b25e67161c295c98acda92123b2dd1e7d8642901 Author: Mike Frysinger Date: Thu Jan 19 22:28:57 2017 -0600 seccomp: dump core when using SECCOMP_RET_KILL The SECCOMP_RET_KILL mode is documented as immediately killing the process as if a SIGSYS had been sent and not caught (similar to a SIGKILL). However, a SIGSYS is documented as triggering a coredump which does not happen today. This has the advantage of being able to more easily debug a process that fails a seccomp filter. Today, most apps need to recompile and change their filter in order to get detailed info out, or manually run things through strace, or enable detailed kernel auditing. Now we get coredumps that fit into existing system-wide crash reporting setups. From a security pov, this shouldn't be a problem. Unhandled signals can already be sent externally which trigger a coredump independent of the status of the seccomp filter. The act of dumping core itself does not cause change in execution of the program. URL: https://crbug.com/676357 Signed-off-by: Mike Frysinger Acked-by: Jorge Lucangeli Obes Acked-by: Kees Cook Signed-off-by: James Morris kernel/seccomp.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 127c1225bf89764976f80e6a0afb4e26df33c2f2 Author: Nicolas Iooss Date: Sun Jan 22 18:28:06 2017 +0100 EDAC, sb_edac: Get rid of ->show_interleave_mode() Function sbridge_register_mci() sets pvt->info.show_interleave_mode to knl_show_interleave_mode() on Knight's Landing and show_interleave_mode() anywhere else. Merge show_interleave_mode() and knl_show_interleave_mode() in a single implementation and use it without an indirect function pointer. Signed-off-by: Nicolas Iooss Cc: Mauro Carvalho Chehab Cc: linux-edac Link: http://lkml.kernel.org/r/20170122172806.10412-1-nicolas.iooss_linux@m4x.org [ Call it get_intlv_mode_str(). ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) commit e34084fb9a023d1dd008c989523af5a037f1d692 Author: Geert Uytterhoeven Date: Tue Mar 17 17:20:52 2015 +0100 clk: renesas: mstp: Make INTC-SYS a critical clock INTC-SYS is the module clock for the GIC. Accessing the GIC while it is disabled causes: Unhandled fault: asynchronous external abort (0x1211) at 0x00000000 Currently, the GIC-400 driver cannot enable its module clock for several reasons: - It does not use a platform device, so Runtime PM is not an option, - gic_of_init() runs before any clocks are registered, so it cannot enable the clock explicitly, - gic_of_init() cannot return -EPROBE_DEFER, as IRQCHIP_DECLARE() doesn't support deferred probing. Hence we have to keep on relying on the boot loader for enabling the module clock. To prevent the module clock from being disabled when the CCF core thinks it is unused, and thus causing a system lock-up, add a check to the MSTP clock driver and enable CLK_IS_CRITICAL. This will make sure the module clock is never disabled. This is a hard dependency for describing the INTC-SYS clock in DT on R-Mobile APE6 and R-Car Gen2. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd drivers/clk/renesas/clk-mstp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 72f5df2c2bbb66d4a555cb51eb9f412abf1af77f Author: Geert Uytterhoeven Date: Mon Jan 16 16:15:50 2017 +0100 clk: renesas: cpg-mssr: Migrate to CLK_IS_CRITICAL When the Renesas CPG/MSSR driver was introduced, it was anticipated that critical clocks would be handled through a new CLK_ENABLE_HAND_OFF flag soon. However, CLK_ENABLE_HAND_OFF never made it upstream. Instead, commit 32b9b10961860860 ("clk: Allow clocks to be marked as CRITICAL") introduced CLK_IS_CRITICAL, a flag with slightly differing semantics. Still, it can be used to prevent e.g. the GIC module clock from being turned off, until the GIC-400 driver has full support for Runtime PM. Hence migrate the Renesas CPG/MSSR driver from CLK_ENABLE_HAND_OFF to CLK_IS_CRITICAL. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd drivers/clk/renesas/renesas-cpg-mssr.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a544c619a54bd5e552b1c8c308e77f37f1e3ad7c Author: Benjamin Tissoires Date: Fri Jan 20 16:20:13 2017 +0100 HID: wacom: do not attempt to switch mode while in probe The Intuos Pro seems to not like when we set the features right after being powered up. Instead of waiting during probe, we can schedule the switch mode and LED control in a deferred worker so that we don't have the 5 secs of delay from USB when the device is not accessible. The USB timeout delays were really a pain because if you happen to unplug the tablet while it is still waiting, you are just adding 5 second timeouts to the USB stack. Which means that a new plug of the same tablet will also gets delayed, and will also attempt to access the hardware while in .probe(). So the tablet doesn't appear in the dmesg, the user unplug/replug it to make it appearing... and so on so forth. Really, this is for the best :) Signed-off-by: Benjamin Tissoires Acked-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 + drivers/hid/wacom_sys.c | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) commit c0265a9488c2a3aea315b61a9239d5494997fa71 Author: Benjamin Tissoires Date: Fri Jan 20 16:20:12 2017 +0100 HID: wacom: remove warning while disconnecting devices When the LED class gets removed, it actually tries to reset the LED. However, the device being disconnected, the set_report fails. Previously, the attempt to cut lose this last event was through unsetting the HID drvdata, but it was not working properly. Simply reset the LED groups to NULL makes a more efficient solution. Signed-off-by: Benjamin Tissoires Acked-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5b779fc52020ac6f5beea31c5eafc3d25cf70dc1 Author: Benjamin Tissoires Date: Fri Jan 20 16:20:11 2017 +0100 HID: wacom: release the resources before leaving despite devm In the general case, the resources are properly released by devm without needing to do anything. However, when unplugging the wireless receiver, the kernel segfaults from time to time while calling devres_release_all(). I think in that case the resources attempt to access hid_get_drvdata(hdev) which has been set to null while leaving wacom_remove(). Signed-off-by: Benjamin Tissoires Acked-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+) commit c7ffa59cf03c38b91d6ef01e42c1b52fd7a4f285 Author: Mihail Atanassov Date: Fri Dec 23 09:57:20 2016 +0000 drm: mali-dp: fix Lx_CONTROL register fields clobber When updating the rotation fields, one of the assignments zeroes out the rest of the register fields, which include settings for chroma siting, inverse gamma, AMBA AXI caching, and alpha blending. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7916efe5b57505080b3cebf5bdb228b4eda008ea Author: Brian Starkey Date: Wed Dec 7 13:20:28 2016 +0000 drm: mali-dp: Fix transposed horizontal/vertical flip The horizontal and vertical flip flags were the wrong way around, causing reflect-x to result in reflect-y being applied and vice-versa. Fix them. Fixes: ad49f8602fe8 ("drm/arm: Add support for Mali Display Processors") Signed-off-by: Brian Starkey Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edabb3c4cd2d035bc93a3d67b25a304ea6217301 Author: Brian Starkey Date: Wed Dec 7 13:17:21 2016 +0000 drm: mali-dp: Fix destination size handling when rotating The destination rectangle provided by userspace in the CRTC_X/Y/W/H properties is already expressed as the dimensions after rotation. This means we shouldn't swap the width and height ourselves when a 90/270 degree rotation is requested, so remove the code doing the swap. Fixes: ad49f8602fe8 ("drm/arm: Add support for Mali Display Processors") Signed-off-by: Brian Starkey Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b2a2ddb0e2a1617d79ad77b14be547c989665d0c Author: Brian Starkey Date: Wed Dec 7 13:14:51 2016 +0000 drm: mali-dp: Don't force source size == crtc size Remove the check enforcing that src_w and src_h match crtc_w and crtc_h, as this prevents rotation from working. The check was intended to disallow scaling, but drm_plane_helper_check_state() does that for us, while also taking rotation into account, so the removed check was redundant in any case. Signed-off-by: Brian Starkey Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b9c3315c57fa6dcbf7b24ff1aa45e92e726d891f Author: Liviu Dudau Date: Fri Nov 25 14:28:54 2016 +0000 drm: mali-dp: Check more use cases in the plane's ->atomic_check() Mali DP's plane ->atomic_check() only checks for the new state submitting frame buffers with supported pixel formats and if there is enough rotation memory for rotated planes. Add a call to drm_plane_helper_check_state() to add additional checks for plane state validity and clipping issues. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit cf4c8870844658a84371f0d603fbb94b5c0bf4b2 Author: Liviu Dudau Date: Thu Oct 6 18:01:39 2016 +0100 drm: malidp: Remove event_list member from struct malidp_drm This struct member managed to outlive the submission process without being removed. It is useless. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 2 -- drivers/gpu/drm/arm/malidp_drv.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 94d8b9b75c6118075ed54ad2fa0bea03c0f27145 Author: Shailendra Verma Date: Fri Nov 11 13:35:00 2016 +0000 drm/arm/malidp: Fix possible dereference of NULL There is possible deference of NULL pointer on return of malidp_duplicate_plane_state() if kmalloc fails. Check the returned kmalloc pointer before continuing. Signed-off-by: Shailendra Verma [cleaned up the code and re-formatted the commit message] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit db017f399639f68827edc954205803272ef20b24 Author: Geert Uytterhoeven Date: Tue Jan 17 13:49:18 2017 +0100 ARM: dts: r8a7745: Link ARM GIC to clock and clock domain Link the ARM GIC to the INTC-SYS module clock, and add it to the SYSC "always-on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 7add1da17ac8d5c4a2ecc967843ca5b55ce35fa6 Author: Geert Uytterhoeven Date: Tue Jan 17 13:49:17 2017 +0100 ARM: dts: r8a7743: Link ARM GIC to clock and clock domain Link the ARM GIC to the INTC-SYS module clock, and add it to the SYSC "always-on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit ca38f9cb76c847de139eaae7edd8a769f2c64c91 Author: Jagan Teki Date: Fri Jan 20 00:09:33 2017 +0100 ARM: dts: imx6qdl: Fix "ERROR: code indent should use tabs where possible" Fixed code indent tabs in respective imx6qdl dtsi files and also add space on imx6qdl-icore-rqs.dtsi on usdhc bus-width nodes. Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 6de18454e06f4eb9c0c7008d3999cd1d0b289d42 Author: dawei.chien@mediatek.com Date: Fri Jan 13 13:52:51 2017 +0800 arm64: dts: mt8173: add node for thermal calibration Add this for supporting thermal calibration by e-fuse data. Signed-off-by: Dawei Chien Reviewed-by: Daniel Kurtz Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit da0aa3dde05108e180eecd76534c55f43ea4b9c8 Author: Borislav Petkov Date: Fri Jan 20 21:29:55 2017 +0100 x86/microcode/AMD: Remove struct cont_desc.eq_id The equivalence ID was needed outside of the container scanning logic but now, after this has been cleaned up, not anymore. Now, cont_desc.mc is used to denote whether the container we're looking at has the proper microcode patch for this CPU or not. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-17-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 69f5f983001f6d097aac774a9e917f44657f3367 Author: Borislav Petkov Date: Fri Jan 20 21:29:54 2017 +0100 x86/microcode/AMD: Remove AP scanning optimization The idea was to not scan the microcode blob on each AP (Application Processor) during boot and thus save us some milliseconds. However, on architectures where the microcode engine is shared between threads, this doesn't work. Here's why: The microcode on CPU0, i.e., the first thread, gets updated. The second thread, i.e., CPU1, i.e., the first AP walks into load_ucode_amd_ap(), sees that there's no container cached and goes and scans for the proper blob. It finds it and as a last step of apply_microcode_early_amd(), it tries to apply the patch but that core has already the updated microcode revision which it has received through CPU0's update. So it returns false and we do desc->size = -1 to prevent other APs from scanning. However, the next AP, CPU2, has a different microcode engine which hasn't been updated yet. The desc->size == -1 test prevents it from scanning the blob anew and we fail to update it. The fix is much more straight-forward than it looks: the BSP (BootStrapping Processor), i.e., CPU0, caches the microcode patch in amd_ucode_patch. We use that on the AP and try to apply it. In the 99.9999% of cases where we have homogeneous cores - *not* mixed-steppings - the application will be successful and we're good to go. In the remaining small set of systems, we will simply rescan the blob and find (or not, if none present) the proper patch and apply it then. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-16-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 78 +++++++++---------------------------- 1 file changed, 18 insertions(+), 60 deletions(-) commit 72edfe950b36308353e27cdc02f334431239938a Author: Borislav Petkov Date: Fri Jan 20 21:29:53 2017 +0100 x86/microcode/AMD: Simplify saving from initrd No need to use the previously stashed info in the container - simply go ahead and parse the initrd once more. It simplifies and streamlines the code a whole lot. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-15-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 43 +++++++++++-------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) commit e71bb4ec073901ad50bfa86fed74fce7ac3210fe Author: Borislav Petkov Date: Fri Jan 20 21:29:52 2017 +0100 x86/microcode/AMD: Unify load_ucode_amd_ap() Use a version for both bitness by adding a helper which does the actual container finding and parsing which can be used on any CPU - BSP or AP. Streamlines the paths more. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-14-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 81 ++++++++++++++----------------------- 1 file changed, 31 insertions(+), 50 deletions(-) commit f3ad136d6ef966c8ba9090770c2bfe7e85f18471 Author: Borislav Petkov Date: Fri Jan 20 21:29:51 2017 +0100 x86/microcode/AMD: Check patch level only on the BSP Check final patch levels for AMD only on the BSP. This way, we decide early and only once whether to continue loading or to leave the loader disabled on such systems. Simplify a lot. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-13-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/microcode_amd.h | 2 - arch/x86/kernel/cpu/microcode/amd.c | 78 +++++------------------------------- arch/x86/kernel/cpu/microcode/core.c | 41 +++++++++++++++++++ 3 files changed, 52 insertions(+), 69 deletions(-) commit 7a93a40be23e5557934d773cc89b7b3627c08097 Author: Borislav Petkov Date: Fri Jan 20 21:29:50 2017 +0100 x86/microcode: Remove local vendor variable Use x86_cpuid_vendor() directly. No functionality change. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-12-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8cc26e0b4c49246564f773edbbefa3d5dc91d56e Author: Borislav Petkov Date: Fri Jan 20 21:29:49 2017 +0100 x86/microcode/AMD: Use find_microcode_in_initrd() Use the generic helper instead of semi-open-coding the procedure. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-11-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 3da9b41794590022d09caa345aaa7c812ac22971 Author: Borislav Petkov Date: Fri Jan 20 21:29:48 2017 +0100 x86/microcode/AMD: Get rid of global this_equiv_id We have a container which we update/prepare each time before applying a microcode patch instead of using a global. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-10-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 309aac77768c0c689eac4900ca8a6e9ef470035c Author: Borislav Petkov Date: Fri Jan 20 21:29:47 2017 +0100 x86/microcode: Decrease CPUID use Get CPUID(1).EAX value once per CPU and propagate value into the callers instead of conveniently calling it every time. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-9-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 52 +++++++++++++++++------------------- arch/x86/kernel/cpu/microcode/core.c | 38 ++++++++++---------------- 2 files changed, 38 insertions(+), 52 deletions(-) commit 8801b3fcb5744dc536272ba4ccfd6faca9b46705 Author: Borislav Petkov Date: Fri Jan 20 21:29:46 2017 +0100 x86/microcode/AMD: Rework container parsing It was pretty clumsy before and the whole work of parsing the microcode containers was spread around the functions wrongly. Clean it up so that there's a main scan_containers() function which iterates over the microcode blob and picks apart the containers glued together. For each container, it calls a parse_container() helper which concentrates on one container only: sanity-checking, parsing, counting microcode patches in there, etc. It makes much more sense now and it is actually very readable. Oh, and we luvz a diffstat removing more crap than adding. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-8-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 238 ++++++++++++++++-------------------- 1 file changed, 105 insertions(+), 133 deletions(-) commit f454177f739e92620d84a1f42f91b03007a1cdd0 Author: Borislav Petkov Date: Fri Jan 20 21:29:45 2017 +0100 x86/microcode/AMD: Extend the container struct Make it into a container descriptor which is being passed around and stores important info like the matching container and the patch for the current CPU. Make it static too. Later patches will use this and thus get rid of a double container parsing. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-7-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit ef901dc33dfa9abffe7d954628b5ec7ba7f62aec Author: Borislav Petkov Date: Fri Jan 20 21:29:44 2017 +0100 x86/microcode/AMD: Shorten function parameter's name The whole driver calls this "mc", do that here too. No functionality change. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-6-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1f02ac0682055418753fe30e6433dcb11fd03e1c Author: Borislav Petkov Date: Fri Jan 20 21:29:43 2017 +0100 x86/microcode/AMD: Clean up find_equiv_id() No need to have it marked "inline" - let gcc decide. Also, shorten the argument name and simplify while-test. While at it, make it into a proper for-loop and simplify it even more, as tglx suggests. No functionality change. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-5-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 0c12d18ab96e4da9f3e963bc242689bdeaaf2330 Author: Borislav Petkov Date: Fri Jan 20 21:29:42 2017 +0100 x86/microcode: Convert to bare minimum MSR accessors Having tracepoints to the MSR accessors makes them unsuitable for early microcode loading: think 32-bit before paging is enabled and us chasing pointers to test whether a tracepoint is enabled or not. Results in a reliable triple fault. Convert to the bare ones. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170120202955.4091-4-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/microcode.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a585df8edabdb47ae25214ebb3a627ca7ce800d3 Author: Borislav Petkov Date: Fri Jan 20 21:29:41 2017 +0100 x86/MSR: Carve out bare minimum accessors Add __rdmsr() and __wrmsr() which *only* read and write an MSR with exception handling. Those are going to be used in early code, like the microcode loader, which cannot stomach tracing code piggybacking on the MSR operation. While at it, get rid of __native_write_msr_notrace(). Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170120202955.4091-3-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/apic.h | 2 +- arch/x86/include/asm/msr.h | 51 +++++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 21 deletions(-) commit 30a9566a4f6071ef159f83e18f8c15a66ee08c2d Author: Jisheng Zhang Date: Mon Jan 23 15:09:23 2017 +0800 usb: chipidea: usb2: delete the redundant setting default DMA mask code Similar as commit 2b2fe36def08 ("usb: chipidea: imx: delete the redundant setting default DMA mask code"), the ci_hdrc_usb2 platform device is also created by device tree, the default DMA mask should be already set by of_dma_configure when the device are created. So delete the redundant code at driver. Signed-off-by: Jisheng Zhang Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ---- 1 file changed, 4 deletions(-) commit bec584a87780f2ad0c04157bc7dd3796abfebd2c Author: Jisheng Zhang Date: Mon Jan 23 15:05:45 2017 +0800 usb: chipidea: delete an useless header include is for net phy drivers, we don't need it. Signed-off-by: Jisheng Zhang Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 1 - 1 file changed, 1 deletion(-) commit 1c5fa1c7dbff0b9abc87730cd06bcdb29c9e0589 Author: Sudip Mukherjee Date: Sat Jan 21 00:55:54 2017 +0000 staging: media: lirc: use new parport device model Modify lirc_parallel driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_parallel.c | 93 ++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 31 deletions(-) commit 76f2507be8834a11bb88753a83756a828cfee65d Author: James Simmons Date: Sat Jan 21 19:40:32 2017 -0500 staging: lustre: lnet: change msg union in struct lnet_hdr to proper structure Modify all the msg union fields from typedefs to to proper structures. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) commit c532c91f3706ef362dcb1132254a3e50568cf6ce Author: James Simmons Date: Sat Jan 21 19:40:31 2017 -0500 staging: lustre: lnet: change lnet_hdr_t to proper structure Change lnet_hdr_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 8 +- .../staging/lustre/include/linux/lnet/lib-types.h | 2 +- .../staging/lustre/include/linux/lnet/socklnd.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 6 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 6 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 10 +-- .../lustre/lnet/klnds/socklnd/socklnd_proto.c | 22 ++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 96 +++++++++++----------- drivers/staging/lustre/lnet/lnet/lib-move.c | 18 ++-- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +- drivers/staging/lustre/lnet/lnet/net_fault.c | 4 +- 14 files changed, 91 insertions(+), 91 deletions(-) commit 5f991c4ce77e430b46e1d434d89570b27d6d2842 Author: James Simmons Date: Sat Jan 21 19:40:30 2017 -0500 staging: lustre: lnet: change lnet_magicversion_t to proper structure Change lnet_magicversion_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- .../staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 16 ++++++++-------- 4 files changed, 15 insertions(+), 15 deletions(-) commit 9fbf9201e13d56a22e58f8a792a5f99613156766 Author: James Simmons Date: Sat Jan 21 19:40:29 2017 -0500 staging: lustre: lnet: change lnet_acceptor_connreq_t to proper structure Change lnet_acceptor_connreq_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/acceptor.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 2ea8f9aae72f1711e58ec95217d1daddd40bd694 Author: James Simmons Date: Sat Jan 21 19:40:28 2017 -0500 staging: lustre: lnet: change lnet_process_id_packed_t to proper structure Change lnet_process_id_packed_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.c | 10 +++++----- drivers/staging/lustre/lnet/selftest/framework.c | 8 ++++---- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 581c38f3296cc283cc56270aa6ffec94f0b030d5 Author: James Simmons Date: Sat Jan 21 19:40:27 2017 -0500 staging: lustre: lnet: change lnet_ni_status_t to proper structure Change lnet_ni_status_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/router.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 3236dd367da81428efab75ea99a64994731cb143 Author: James Simmons Date: Sat Jan 21 19:40:26 2017 -0500 staging: lustre: lnet: change lnet_ping_info_t to proper structure Change lnet_ping_info_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- .../staging/lustre/include/linux/lnet/lib-types.h | 6 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 4 +-- drivers/staging/lustre/lnet/lnet/api-ni.c | 42 +++++++++++----------- drivers/staging/lustre/lnet/lnet/router.c | 6 ++-- 5 files changed, 30 insertions(+), 30 deletions(-) commit af7e07cc6a696b8c2a0afccd3bb927d58896691d Author: James Simmons Date: Sat Jan 21 19:40:25 2017 -0500 staging: lustre: lnet: change lnet_handle_wire_t to proper structure Change lnet_handle_wire_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 12 ++++++------ drivers/staging/lustre/lnet/lnet/api-ni.c | 10 +++++----- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) commit 41a5d7c0085379c6f147ade7c9e1e15ed6bd9d36 Author: Marcos Paulo de Souza Date: Sun Jan 22 15:49:21 2017 -0200 staging: greybus: audio_gb.c: Change uint32_t to u32 Change uint32_t to u32, solved the issue reported by checkpatch.pl: CHECK: Prefer kernel type 'u32' over 'uint32_t' + uint32_t *format, uint32_t *rate, u8 *channels, CHECK: Prefer kernel type 'u32' over 'uint32_t' + uint32_t format, uint32_t rate, u8 channels, Signed-off-by: Marcos Paulo de Souza Acked-by: Mark Greer Acked-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11b74593cbd375dd607945ce82c5a7f67ac9a0e9 Author: Derek Robson Date: Sun Jan 22 18:17:24 2017 +1300 Staging: rtl8188eu: os_dep: usb_ops_linux.c - style fix Fixed comparison, moved the constant to the right side of the test Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0f619b2c91867fbd4c55a8954a9ce60aa9bcbb8 Author: simran singhal Date: Fri Jan 20 23:18:23 2017 +0530 staging: rtl8192u: Adding space around '=' This patch fixes the checkpatch issue by adding space around '='. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7afee63d1c91af8ba6823855a4791fda7f1aa2a Author: Tobias Jakobi Date: Fri Jan 20 17:02:50 2017 +0100 drm/exynos: Remove Kconfig deps for FIMD and DECON7 While the Kconfig entries of FIMD and DECON7 both select FB_MODE_HELPERS, the code doesn't use any of the functionality. Signed-off-by: Tobias Jakobi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484928172-16784-1-git-send-email-tjakobi@math.uni-bielefeld.de drivers/gpu/drm/exynos/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit ed8959f40a6638812bec7427244ab32aa6d2337c Author: Linus Walleij Date: Fri Jan 20 10:46:05 2017 +0100 iio: accel: fix Kconfig warning commit 762227721fe6225be5b6d233ef681aea5871f5f3 "iio: accel: st_accel: handle deprecated bindings" attempted to be smart and let users use the old I2C driver and the new SPI driver, or the old SPI driver and the new I2C driver in combination for the LIS3LV02, and put the restrictions on the I2C and SPI subdrivers not not be combined with the old subdrivers. This doesn't work since the IIO ST accel top-level component selects the I2C and SPI subdrivers, resulting in the following Kconfig noise: warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C) warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI) (...) This fixes the issue by putting the dependencies directly in the top-level component instead, so that it never gets to select its unselectable subcomponent. Fixes: 762227721fe6 ("iio: accel: st_accel: handle deprecated bindings") Reported-by: Stephen Rothwell Signed-off-by: Linus Walleij Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman drivers/iio/accel/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d352f352a377750e5b555e3b6329e0db7a6e8aea Author: Chris Wilson Date: Thu Jan 19 09:05:13 2017 +0000 drm: Show leaked connectors upon unload After warning that the connector list is not empty on device unregistration (i.e. module unload) also print out which connectors are still hanging around to aide finding the leak. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170119090513.4154-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mode_config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 08cad739ba28a986a753681105ce1885ccc392eb Merge: 994261d 10e840d Author: Greg Kroah-Hartman Date: Mon Jan 23 09:23:23 2017 +0100 Merge tag 'iio-for-4.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next Jonathan writes: Second round of IIO new device support, cleanups and features for the 4.11 cycle New device support: * lsm6dsx imu - new driver and bindings. * max11100 adc - new driver and bindings. * tlc4541 - new driver * tmp007 thermopile - new driver. Core * in kernel interfaces - pass through raw values if no scaling provided and a processed value is requested. * trigger - close a race condition in acquiring trigger reference. - constify device_type structures. - rework the viio_trigger_alloc function to be much neater and easier to read. - free trigger resources correctly on some error paths. Avoids putting a module we don't have. Documentation * ABI - specify a unit for proximity measurements. Cleanups and features * ads1015 - constify iio_info structure. * ads7950 cleanups following merge in previous pull - Add device tree bindings - Drop the ti prefix from the module name in common with other drivers. - Change regulator name to vref to match datasheet and other drivers. * ak8974 - remove a redundant zero timeout check. * bmi160 - use variable names for sizeof instead of types. * cm3605 - mark PM functions as __maybe_unused to avoid a build warning. * isl29028 (on it's way towards moving out of staging). - alignment fixes and newline improvements. - combine proxim_get and read_proxim for simpler code. - drop unused ISL29028_DEV_ATTR macro - move some error logging into functions to cut out repitition. - make error messages more consistent. - tidy up some brackets. - drop the enable flag that nothing uses. - only set proximity rate and ALS scale when relevant channel type is enabled. - runtime pm support. * lsm6dsx - fix wrong values for gyro sensitivitiy. * mag3110 - claim direct mode during sysfs reads to avoid a race condition. * max1363 - export OF device table IDs as module aliases. * max30100 - use msleep for long uncritical delays. * mcp4531 - export OF device table as module aliases. * ms5611 - claim direct mode during sysfs reads to avoid a race condition. * opt3001 - export OF device table as module aliases. * sx9500 - claim direct mode during oversampling changes to avoid a race condition. commit 8ad43336b5c1ad9ac945148cb5e26a1200ccd45c Author: Aneesh Kumar K.V Date: Wed Jan 4 08:19:12 2017 +0530 powerpc/mm/4k: don't allocate larger pmd page table for 4k We now support THP with both 64k and 4K page size configuration for radix. (hash only support THP with 64K page size). Hence we will have CONFIG_TRANSPARENT_HUGEPAGE enabled for both PPC_64K and PPC_4K config. Since we only need large pmd page table with hash configuration (to store the slot information in the second half of the table) restrict the large pmd page table to THP and 64K configs. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9859f0c7e05b424a7a42032e639a8c44dd537328 Author: Aneesh Kumar K.V Date: Wed Dec 14 10:09:45 2016 +0530 powerpc/mm: Remove the debug hugepd_ok check We don't do this for other page table entries. So lets keep this simple and always return false for hugepd check on a 64K page size config. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 5 ----- arch/powerpc/mm/hugetlbpage-hash64.c | 21 --------------------- 2 files changed, 26 deletions(-) commit 717c8ae7aae4f23100cbd33f9aa6772fe67a74f4 Author: Chris Wilson Date: Fri Jan 13 23:51:19 2017 +0000 lib/prime_numbers: Suppress warn on kmalloc failure The allocation for the bitmap may become very large, larger than MAX_ORDER, for large requests. We fail gracefully by falling back to trail-division, so disable the warning from kmalloc: 521.961092] WARNING: CPU: 0 PID: 30637 at mm/page_alloc.c:3548 __alloc_pages_slowpath+0x237/0x9a0 [ 521.961105] Modules linked in: i915(+) drm_kms_helper intel_gtt prime_numbers [last unloaded: drm_kms_helper] [ 521.961126] CPU: 0 PID: 30637 Comm: drv_selftest Tainted: G U W 4.10.0-rc3+ #321 [ 521.961137] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 521.961148] Call Trace: [ 521.961161] dump_stack+0x4d/0x6f [ 521.961172] __warn+0xc1/0xe0 [ 521.961181] warn_slowpath_null+0x18/0x20 [ 521.961189] __alloc_pages_slowpath+0x237/0x9a0 [ 521.961200] ? sg_init_table+0x1a/0x40 [ 521.961208] ? get_page_from_freelist+0x3fa/0x910 [ 521.961275] ? i915_gem_object_get_sg+0x272/0x2b0 [i915] [ 521.961285] __alloc_pages_nodemask+0x1ea/0x220 [ 521.961295] kmalloc_order+0x1c/0x50 [ 521.961304] __kmalloc+0x115/0x170 [ 521.961314] expand_to_next_prime+0x43/0x180 [prime_numbers] [ 521.961324] next_prime_number+0x47/0xc0 [prime_numbers] [ 521.961377] igt_vma_rotate+0x386/0x590 [i915] [ 521.961429] i915_subtests+0x37/0xc0 [i915] [ 521.961481] i915_vma_mock_selftests+0x3d/0x70 [i915] [ 521.961532] run_selftests+0x16e/0x1f0 [i915] [ 521.961541] ? 0xffffffffa02a4000 [ 521.961592] i915_mock_selftests+0x29/0x40 [i915] [ 521.961638] i915_init+0xa/0x5e [i915] [ 521.961646] ? 0xffffffffa02a4000 [ 521.961655] do_one_initcall+0x3e/0x160 [ 521.961664] ? __vunmap+0x7c/0xc0 [ 521.961672] ? vfree+0x29/0x70 [ 521.961680] ? kmem_cache_alloc+0xcf/0x120 [ 521.961690] do_init_module+0x55/0x1c4 [ 521.961699] load_module+0x1f3f/0x25b0 [ 521.961707] ? __symbol_put+0x40/0x40 [ 521.961716] ? kernel_read_file+0x100/0x190 [ 521.961725] SYSC_finit_module+0xbc/0xf0 [ 521.961734] SyS_finit_module+0x9/0x10 [ 521.961744] entry_SYSCALL_64_fastpath+0x17/0x98 [ 521.961752] RIP: 0033:0x7f111aca4119 [ 521.961760] RSP: 002b:00007ffd8be6cbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 521.961773] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f111aca4119 [ 521.961781] RDX: 0000000000000000 RSI: 000055dfc18bc8e0 RDI: 0000000000000006 [ 521.961789] RBP: 00007ffd8be6bbe0 R08: 0000000000000000 R09: 0000000000000000 [ 521.961796] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000005 [ 521.961805] R13: 000055dfc18bd3a0 R14: 00007ffd8be6bbc0 R15: 0000000000000005 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170113235119.22528-1-chris@chris-wilson.co.uk lib/prime_numbers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bdf6f135973acb409b3ec5a6214fb597670a0bc0 Author: Wei Yongjun Date: Thu Jan 12 15:19:21 2017 +0000 drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer") Signed-off-by: Wei Yongjun Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170112151921.16538-1-weiyj.lk@gmail.com drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 899cc5f14054267b89ebeef4d3c749473ab28eed Author: Wei Yongjun Date: Thu Jan 12 14:21:57 2017 +0000 drm/atomic: make release_crtc_commit() static Fixes the following sparse warning: drivers/gpu/drm/drm_atomic_helper.c:1360:6: warning: symbol 'release_crtc_commit' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170112142157.14684-1-weiyj.lk@gmail.com drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8d4c8246b290ce97f88752d833804843041ac84 Author: Xunlei Pang Date: Mon Jan 23 14:48:23 2017 +0800 x86/crash: Update the stale comment in reserve_crashkernel() CRASH_KERNEL_ADDR_MAX has been missing for a long time, update it with a more detailed explanation. Signed-off-by: Xunlei Pang Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov Cc: Dave Young Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Robert LeBlanc Cc: Thomas Gleixner Cc: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/1485154103-18426-1-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8fe1764ea8d27fd8d43e4c91ed169879f7c13c54 Author: Vivien Didelot Date: Thu Jan 12 18:06:20 2017 -0500 ARM: dts: vf610-zii-dev: add EEPROM entry to Rev C The ZII Dev Rev C board has EEPROMs hanging the 88E6390 Ethernet switch chips. Add an "eeprom-length" property to allow access from ethtool. Signed-off-by: Vivien Didelot Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 ++ 1 file changed, 2 insertions(+) commit add6329c728cdc705e076fc3d1663bc78bb50a66 Author: Daniel Vetter Date: Mon Jan 23 08:27:12 2017 +0100 drm/i915: Update DRIVER_DATE to 20170123 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13444ac9eeaebf32e3f0078390245915f8173c39 Author: Sébastien Szymanski Date: Tue Jan 10 14:32:53 2017 +0100 ARM: dts: add Armadeus Systems OPOS6UL and OPOS6ULDEV support OPOS6UL is an i.MX6UL based SoM. OPOS6ULDev is a carrier board for the OPOS6UL SoM. For more details see: http://www.opossom.com/english/products-processor_boards-opos6ul.html http://www.opossom.com/english/products-development_boards-opos6ul_dev.html Signed-off-by: Sébastien Szymanski arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6ul-opos6ul.dtsi | 192 +++++++++++++++ arch/arm/boot/dts/imx6ul-opos6uldev.dts | 412 ++++++++++++++++++++++++++++++++ 3 files changed, 605 insertions(+) commit d8f2be936c19fa0ddb5f628dbb16eb1498341e61 Author: Christopher Spinrath Date: Fri Dec 2 15:37:22 2016 +0100 ARM: dts: imx6q-utilite-pro: enable 2nd display pipeline Apart from the already enabled Designware HDMI port, the Utilite Pro has a second display pipeline which has the following shape: IPU1 DI0 --> Parallel display --> tfp410 rgb24 to DVI encoder --> HDMI connector. Enable support for it. In addition, since this pipeline is hardwired to IPU1, sever the link between IPU1 and the SoC-internal Designware HDMI encoder forcing the latter to be connected to IPU2 instead of IPU1. Otherwise, it is not possible to drive both displays at high resolution due to the bandwidth limitations of a single IPU. Signed-off-by: Christopher Spinrath Reviewed-by: Philipp Zabel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-utilite-pro.dts | 115 ++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit f0493e653f9679114d1dfd54ab88b54ce95576e1 Author: Mathieu Larouche Date: Fri Oct 21 12:47:07 2016 -0400 drm/mgag200: Added support for the new device G200eH3 - Added the new device ID - Added new pll algorithm Signed-off-by: Mathieu Larouche Signed-off-by: Dave Airlie drivers/gpu/drm/mgag200/mgag200_drv.c | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_i2c.c | 1 + drivers/gpu/drm/mgag200/mgag200_mode.c | 77 +++++++++++++++++++++++++--------- 4 files changed, 61 insertions(+), 19 deletions(-) commit cefb26d4b37c329f624eb235a1bdc7b6b8dd9430 Author: Guenter Roeck Date: Sun Jan 22 17:19:12 2017 -0800 Input: touchscreen - drop unnecessary calls to input_set_drvdata Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 1 - drivers/input/touchscreen/egalax_ts.c | 2 -- drivers/input/touchscreen/elants_i2c.c | 2 -- drivers/input/touchscreen/ili210x.c | 1 - drivers/input/touchscreen/mcs5000_ts.c | 1 - drivers/input/touchscreen/raydium_i2c_ts.c | 2 -- 6 files changed, 9 deletions(-) commit 86178c8634ff8abe04933839d009c4440213040f Author: Guenter Roeck Date: Sun Jan 22 17:18:45 2017 -0800 Input: dm355evm_keys - drop unnecessary call to input_set_drvdata Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/dm355evm_keys.c | 2 -- 1 file changed, 2 deletions(-) commit 555c765b0cc29119f4ff767334c479040587a1d6 Author: Guenter Roeck Date: Sun Jan 22 17:18:24 2017 -0800 Input: mouse - drop unnecessary calls to input_set_drvdata Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/mouse/cypress_ps2.c | 2 -- drivers/input/mouse/maplemouse.c | 1 - 2 files changed, 3 deletions(-) commit 0ff44b0fd35c4bb1c2ec3d94043a465ff15b3099 Author: Guenter Roeck Date: Sun Jan 22 17:18:04 2017 -0800 Input: maplecontrol - drop unnecessary call to input_set_drvdata Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/joystick/maplecontrol.c | 1 - 1 file changed, 1 deletion(-) commit 14fdb924afd9290d43e64eeb2377d51806de1197 Author: Guenter Roeck Date: Sun Jan 22 17:17:40 2017 -0800 Input: keyboard - drop unnecessary calls to input_set_drvdata If there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5520-keys.c | 2 -- drivers/input/keyboard/bf54x-keys.c | 2 -- drivers/input/keyboard/maple_keyb.c | 1 - drivers/input/keyboard/opencores-kbd.c | 2 -- drivers/input/keyboard/tca8418_keypad.c | 2 -- drivers/input/keyboard/tm2-touchkey.c | 2 -- 6 files changed, 11 deletions(-) commit 43c73221b3b1cdc9156c78287c5f4b29dc085d22 Author: Theodore Ts'o Date: Sun Jan 22 19:35:52 2017 -0500 ext4: replace BUG_ON with WARN_ON in mb_find_extent() The last BUG_ON in mb_find_extent() is apparently triggering in some rare cases. Most of the time it indicates a bug in the buddy bitmap algorithms, but there are some weird cases where it can trigger when buddy bitmap is still in memory, but the block bitmap has to be read from disk, and there is disk or memory corruption such that the block bitmap and the buddy bitmap are out of sync. Google-Bug-Id: #33702157 Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 01daf9452569fe2e69e27fe3e617b43d2ebb1e93 Author: Theodore Ts'o Date: Sun Jan 22 19:35:49 2017 -0500 ext4: propagate error values from ext4_inline_data_truncate() Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 +- fs/ext4/inline.c | 40 +++++++++++++++++++++++----------------- fs/ext4/inode.c | 4 +++- 3 files changed, 27 insertions(+), 19 deletions(-) commit 618a6109ecb7fccba155f59675ee7092b2e338a2 Merge: 01f5e69 8bf7938 Author: Dave Airlie Date: Mon Jan 23 10:19:45 2017 +1000 Merge tag 'drm-amdkfd-next-2017-01-16' of git://people.freedesktop.org/~gabbayo/linux into drm-next two amdkfd patches. * tag 'drm-amdkfd-next-2017-01-16' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: fix improper return value on error amdkfd: fix spelling mistake in kfd_ioctl_dbg_unrgesiter commit 01f5e6912c8abc8a23248e6cf66939756f0fb27c Merge: d64a166 42f7f3c Author: Dave Airlie Date: Mon Jan 23 10:17:06 2017 +1000 Merge tag 'omapdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for 4.11 The main change here is the IRQ code cleanup, which gives us properly working vblank counts and timestamps. We also get much less calls to runtime PM gets & puts. * tag 'omapdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (26 commits) drm/omap: panel-sony-acx565akm.c: Add MODULE_ALIAS drm/omap: dsi: fix compile errors when enabling debug prints drm: omapdrm: Perform initialization/cleanup at probe/remove time drm: Move vblank cleanup from unregister to release drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures drm: omapdrm: Remove global variables drm: omapdrm: Simplify IRQ wait implementation drm: omapdrm: Inline the pipe2vbl function drm: omapdrm: Don't call DISPC power handling in IRQ wait functions drm: omapdrm: Remove unused parameter from omap_drm_irq handler drm: omapdrm: Don't expose the omap_irq_(un)register() functions drm: omapdrm: Keep vblank interrupt enabled while CRTC is active drm: omapdrm: Use a spinlock to protect the CRTC pending flag drm: omapdrm: Prevent processing the same event multiple times drm: omapdrm: Check the CRTC software state at enable/disable time drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs drm: omapdrm: Replace DSS manager state check with omapdrm CRTC state drm: omapdrm: Handle OCP error IRQ directly drm: omapdrm: Handle CRTC error IRQs directly drm: omapdrm: Handle FIFO underflow IRQs internally ... commit d64a1661c8f783214e1a4fd9d38c2919d5b8231d Merge: 282d0a3 1ae0d5a Author: Dave Airlie Date: Mon Jan 23 10:15:44 2017 +1000 Merge tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux into drm-next stih410 cleanup, create fbdev at binding, HQVDP fixes. * tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux: drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache drm/sti: remove deprecated sti_vtac.c file drm/sti: create fbdev at binding drm/sti: update fps debugfs entries drm/sti: do not post HQVDP command if no update drm/sti: load XP70 firmware only once drm/sti: allow audio playback on HDMI even if disabled. commit a811498902cf4c3f6e659f9bc877a1cd1c180606 Author: Jacob Chen Date: Wed Jan 18 13:42:40 2017 +0800 clk: rockchip: rk3288: make all niu clocks critical NIU clocks are related to the interconnect and it's important to other blocks. Since we don't have a driver to handle it, we should always enable it to avoid casually close. Make all of them critical,so that we don't have to each clock on its own once things break. Signed-off-by: Jacob Chen [dropped the matching CLK_IGNORE_UNUSED flags] Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 1d70ba3bfb30cf8d151f18f5bf7d7a218ecede57 Author: Amelie Delaunay Date: Mon Jan 16 11:08:53 2017 +0100 rtc: stm32: fix comparison warnings This patches fixes comparison between signed and unsigned values as it could produce an incorrect result when the signed value is converted to unsigned: drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_valid_alrm': drivers/rtc/rtc-stm32.c:404:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((((tm->tm_year > cur_year) && ... It also fixes comparison always true or false due to the fact that unsigned value is compared against zero with >= or <: drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_init': drivers/rtc/rtc-stm32.c:514:35: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] for (pred_a = pred_a_max; pred_a >= 0; pred_a-- ) { drivers/rtc/rtc-stm32.c:530:44: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] (rate - ((pred_a + 1) * (pred_s + 1)) < 0) ? Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a560c527638d78bc05d06585fef2d94b22b727b8 Author: Amelie Delaunay Date: Mon Jan 16 09:57:38 2017 +0100 rtc: stm32: use 0 instead of ~PWR_CR_DBP in regmap_update_bits Using the ~ operator on a BIT() constant results in a large 'unsigned long' constant that won't fit into an 'unsigned int' function argument on 64-bit architectures, resulting in a harmless build warning in x86 allmodconfig: drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe': drivers/rtc/rtc-stm32.c:651:51: error: large integer implicitly truncated to unsigned type [-Werror=overflow] regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP); As PWR_CR_DBP mask prevents other bits to be cleared, replace all ~PWR_CR_DBP by 0. Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fa4086987506b2ab8c92f8f99f2295db9918856 Author: Thierry Reding Date: Thu Jan 12 17:07:43 2017 +0100 rtc: tegra: Implement clock handling Accessing the registers of the RTC block on Tegra requires the module clock to be enabled. This only works because the RTC module clock will be enabled by default during early boot. However, because the clock is unused, the CCF will disable it at late_init time. This causes the RTC to become unusable afterwards. This can easily be reproduced by trying to use the RTC: $ hwclock --rtc /dev/rtc1 This will hang the system. I ran into this by following up on a report by Martin Michlmayr that reboot wasn't working on Tegra210 systems. It turns out that the rtc-tegra driver's ->shutdown() implementation will hang the CPU, because of the disabled clock, before the system can be rebooted. What confused me for a while is that the same driver is used on prior Tegra generations where the hang can not be observed. However, as Peter De Schrijver pointed out, this is because on 32-bit Tegra chips the RTC clock is enabled by the tegra20_timer.c clocksource driver, which uses the RTC to provide a persistent clock. This code is never enabled on 64-bit Tegra because the persistent clock infrastructure does not exist on 64-bit ARM. The proper fix for this is to add proper clock handling to the RTC driver in order to ensure that the clock is enabled when the driver requires it. All device trees contain the clock already, therefore no additional changes are required. Reported-by: Martin Michlmayr Acked-By Peter De Schrijver Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 78162d48466d23c45a784034630c5928af631e3d Author: Alexandre Belloni Date: Thu Jan 19 23:05:39 2017 +0100 ARM: dts: at91: Enable DMA on sama5d2_xplained console Enable DMA on uart1 to get a more reliable console. Cc: stable #v4.3+ Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 ++ 1 file changed, 2 insertions(+) commit 2ea9c2362b562e227a944e0ae370c9868024884e Author: Marcos Paulo de Souza Date: Sun Jan 22 14:29:22 2017 -0800 Input: i8042 - add dbg msg when a command can't write its parameter This can happen in cases like bug #102951[1], so add a proper debug msg as done in wait_read. Also, change wait_read debug message to differ from wait_write. [1] https://bugzilla.kernel.org/show_bug.cgi?id=102951 Signed-off-by: Marcos Paulo de Souza Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a5e5da2b6f129d2a4f7a3f0b73dba2f6f63208ef Author: Dmitry Torokhov Date: Sat Jan 21 23:36:05 2017 -0800 Input: max11801_ts - drop call to input_set_drvdata() Nobody calls input_get_drvdata() so setting it is not required. Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/max11801_ts.c | 1 - 1 file changed, 1 deletion(-) commit 41e8c70ee1628a32606bfafd9cfce4f5ae3b5205 Merge: b20b564 039a7b8 Author: David S. Miller Date: Sun Jan 22 16:59:00 2017 -0500 Merge branch 'bcm7278' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Add support for BCM7278 This patch series adds support for the Broadcom BCM7278 integrated switch which is a successor of the BCM7445 switch. We have a little bit of register shuffling going on, which is why most of the functional changes are to deal with that. ==================== Signed-off-by: David S. Miller commit 039a7b8592ab932f729e56f193a2534f3f911409 Author: Florian Fainelli Date: Fri Jan 20 12:36:34 2017 -0800 net: phy: bcm7xxx: Implement EGPHY workaround for 7278 Implement the HW design team recommended workaround in for 7278. Since the GPHY now returns its revision information in MII_PHYS_ID[23] we need to check whether the revision provided in flags is 0 or not. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 582d0ac397ca02a6a3fb653b13154ac87b884beb Author: Florian Fainelli Date: Fri Jan 20 12:36:33 2017 -0800 net: phy: bcm7xxx: Add entry for BCM7278 Add support for the BCM7278 28nm process Gigabit Ethernet PHY. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 2 ++ include/linux/brcmphy.h | 1 + 2 files changed, 3 insertions(+) commit 64ff2aef91afdff7f22eaef05a65b5bc3429ef21 Author: Florian Fainelli Date: Fri Jan 20 12:36:32 2017 -0800 net: dsa: bcm_sf2: Allow non-IMP ports to have Broadcom tags enabled Parse the "brcm,use-bcm-hdr" boolean property during ports identification to fill a bitmask of ports that should have Broadcom tags enabled. This is needed in some configurations where per-packet metadata can be exchanged using Broadcom tags between the switch and an on-chip acceleration device. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt | 8 ++++++++ drivers/net/dsa/bcm_sf2.c | 7 +++++++ drivers/net/dsa/bcm_sf2.h | 3 +++ 3 files changed, 18 insertions(+) commit ebb2ac4f32c32364b6f522270aeb0811829bd3cb Author: Florian Fainelli Date: Fri Jan 20 12:36:31 2017 -0800 net: dsa: bcm_sf2: Move code enabling Broadcom tags In preparation for enabling Broadcom tags on different ports based on configuration information, dedicate a function that is responsible for enabling Broadcom tags for a given port and update the IMP port setup to call it. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 61 ++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 27 deletions(-) commit 0fe9933804eb860b7c26fd3fcd5839dc6bb66533 Author: Florian Fainelli Date: Fri Jan 20 12:36:30 2017 -0800 net: dsa: bcm_sf2: Add support for BCM7278 integrated switch Add support for the integrated switch found on BCM7278: - core_reg_align is set to 1, to force a translation into the target address space which is 8 bytes aligned - an alternate SWITCH_REG layout is provided since registers are largely bit/masks compatible but have different offsets - conditional for all CORE_STS_OVERRIDE_{IMP,GMII_P} since those got moved way out of the traditional register space Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/brcm,bcm7445-switch-v4.0.txt | 2 +- drivers/net/dsa/b53/b53_common.c | 12 +++++ drivers/net/dsa/b53/b53_priv.h | 4 +- drivers/net/dsa/bcm_sf2.c | 56 ++++++++++++++++++---- drivers/net/dsa/bcm_sf2_regs.h | 4 ++ 5 files changed, 68 insertions(+), 10 deletions(-) commit a78e86ed586dba0808f765a9498f1fcd803f6ac6 Author: Florian Fainelli Date: Fri Jan 20 12:36:29 2017 -0800 net: dsa: bcm_sf2: Prepare for different register layouts In preparation for supporting a new device with a slightly different register layout, affecting the SWITCH_REG and SWITCH_CORE address spaces, perform a few preparatory steps: - allow matching the compatible string against a data description - convert the SWITCH_REG register accesses into an indirection table - prepare for supporting a SWITCH_CORE register alignment requirement Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 57 +++++++++++++++++++++++++++++++++++++----- drivers/net/dsa/bcm_sf2.h | 34 +++++++++++++++++++++++-- drivers/net/dsa/bcm_sf2_regs.h | 43 ++++++++++++++++++------------- 3 files changed, 109 insertions(+), 25 deletions(-) commit 329b5c58f8b2833f330d64d5a2a1517a0c1e070e Author: Florian Fainelli Date: Fri Jan 20 12:36:28 2017 -0800 net: dsa: bcm_sf2: Make SF2_IO64_MACRO() utilize 32-bit macro There is no point inlining the 32-bit direct register read/write part, just infer it from the existing macro. This will make it easier to centralize the address rewriting that we are going to introduce later on. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b20b564b9533f02cd498477189359a9a3ac79890 Merge: 9ca677b1 44a4524 Author: David S. Miller Date: Sun Jan 22 16:56:07 2017 -0500 Merge branch 'systemport-lite' Florian Fainelli says: ==================== net: systemport: Add support for SYSTEMPORT lite This patch series adds support for SYSTEMPORT Lite which is an evolution of the existing SYSTEMPORT adapter. The two generations are largely identical as far as the transmit/receive path are concerned, and there were just a few control path changes here and there. ==================== Signed-off-by: David S. Miller commit 44a4524c54af2059bd7e967b0527fb7c6618672a Author: Florian Fainelli Date: Fri Jan 20 11:08:27 2017 -0800 net: systemport: Add support for SYSTEMPORT Lite Add supporf for the SYSTEMPORT Lite Ethernet controller, this piece of hardware is largely based on the full-blown SYSTEMPORT and differs in the following: - no full-blown UniMAC, instead we have the MagicPacket matching from UniMAC at same offset, and a GMII Interface Block (GIB) for the MAC-level stuff, since we are always interfaced to an Ethernet switch which is fully Ethernet compliant shortcuts could be made - 16 transmit queues, whose interrupts are moved into the first Level-2 interrupt controller bank - slight TDMA offset change (a register was inserted after TDMA_STATUS, *sigh*) - 256 RX descriptors (512 words) and 256 TX descriptors (not visible) As a consequence of these two things, update the code paths accordingly to differentiate the full-blown from the light version. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/brcm,systemport.txt | 5 +- drivers/net/ethernet/broadcom/bcmsysport.c | 323 +++++++++++++++++---- drivers/net/ethernet/broadcom/bcmsysport.h | 78 ++++- 3 files changed, 327 insertions(+), 79 deletions(-) commit 7b78be48a8eb6c34e4e1b1581eceff4074bb4bf1 Author: Florian Fainelli Date: Fri Jan 20 11:08:26 2017 -0800 net: systemport: Dynamically allocate number of TX rings In preparation for adding SYSTEMPORT Lite, which has twice as less transmit queues than SYSTEMPORT make sure we do allocate TX rings based on the systemport,txq property to get an appropriate memory footprint. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 11 +++++++++++ drivers/net/ethernet/broadcom/bcmsysport.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) commit 9ca677b1bd8979f9a7702db5ed4028e4b8b232e8 Author: Eric Dumazet Date: Fri Jan 20 08:08:56 2017 -0800 ipv6: add NUMA awareness to seg6_hmac_init_algo() Since we allocate per cpu storage, let's also use NUMA hints. Signed-off-by: Eric Dumazet Acked-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_hmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f4ec60644a7f9f8bd9571c30c573ce54c4b0ad97 Author: jpinto Date: Fri Jan 20 16:00:26 2017 +0000 net: stmicro: fix LS field mask in EEE configuration This patch fixes the LS mask when setting EEE timer. LS field is 10 bits long and not 11 as currently. Signed-off-by: Joao Pinto Reported-By: Rayagond Kokatanur Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3704eb6f6fd09023e2c94e8ead687b908ab02135 Author: Geliang Tang Date: Fri Jan 20 22:36:57 2017 +0800 net/mlx4: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 530cef21d98930c4d10f188325e00330455d216d Author: Geliang Tang Date: Fri Jan 20 22:36:53 2017 +0800 6lowpan: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller net/6lowpan/nhc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 10e840dfb0b7fc345082dd9e5fff3c1c02e7690e Author: Alison Schofield Date: Thu Jan 19 19:47:38 2017 -0800 iio: trigger: free trigger resource correctly These stand-alone trigger drivers were using iio_trigger_put() where they should have been using iio_trigger_free(). The iio_trigger_put() adds a module_put which is bad since they never did a module_get. In the sysfs driver, module_get/put's are used as triggers are added & removed. This extra module_put() occurs on an error path in the probe routine (probably rare). In the bfin-timer & interrupt trigger drivers, the module resources are not explicitly managed, so it's doing a put on something that was never get'd. It occurs on the probe error path and on the remove path (not so rare). Tested with the sysfs trigger driver. The bfin & interrupt drivers were build tested & inspected only. Signed-off-by: Alison Schofield Signed-off-by: Jonathan Cameron drivers/iio/trigger/iio-trig-interrupt.c | 8 ++++---- drivers/iio/trigger/iio-trig-sysfs.c | 2 +- drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit cf9790e0fcd1a2444bc72efdf6fffc6f64d82d0d Author: Jacob Chen Date: Wed Jan 18 13:42:39 2017 +0800 clk: rockchip: use rk3288 vip_out clock ids Reference the newly added vip clock-ids in the clock-tree. Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6f5ddcbff8f253b5fed00cf58a7669a08b787d2 Merge: 3e1531d db86dad Author: Heiko Stuebner Date: Sun Jan 22 17:07:37 2017 +0100 Merge branch 'v4.11-shared/clkids' into v4.11-clk/next commit db86dadf18c86d984f1162e10da9ab173fc7c092 Author: Jacob Chen Date: Wed Jan 18 13:42:38 2017 +0800 clk: rockchip: add rk3288 vip_out clock id Add clock-ids for the vip block of the rk3288 Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3288-cru.h | 1 + 1 file changed, 1 insertion(+) commit 2c99f1a09da3dcc1fbbed4b85c274d045f352b43 Author: Dan Carpenter Date: Sat Jan 21 07:55:58 2017 +0300 iio: trigger: clean up viio_trigger_alloc() 1) Reverse the test for kmalloc() failure so we can pull everything back one tab. 2) Use gotos for unwinding. 3) Some of the extra line breaks for the 80 character limit are no longer needed so we can remove them. Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 69 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 35 deletions(-) commit 74b51465c02fe08f5f1e2a83d84e831e93ae8f52 Author: Masahiro Yamada Date: Sun Jan 22 21:46:49 2017 +0900 ARM: dts: uniphier: add SD pin-mux node The Pro4 SoC has 2 slots of SD controllers, so 2 pin-mux nodes (SD and SD1) are needed. The other SoCs have only 1 SD slot. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 99a22f062b1c279a5d332946de655ef0a244e583 Author: Bhumika Goyal Date: Sat Jan 21 22:33:00 2017 +0530 iio: adc: constify iio_info structures Declare iio_info structures as const as they are only stored in the info field of a iio_dev structure. This field is of type const, so iio_info structures having similar properties can be made const too. File size before: text data bss dec hex filename 6944 792 0 7736 1e38 drivers/iio/adc/ti-ads1015.o File size after: text data bss dec hex filename 7264 472 0 7736 1e38 drivers/iio/adc/ti-ads1015.o Signed-off-by: Bhumika Goyal Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bdafc49f5df9f2f741c71b12b76d202211e06f6 Author: Bhumika Goyal Date: Sat Jan 21 22:29:49 2017 +0530 iio: industrialio-trigger: constify device_type structures Declare device_type structure as const as it is only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structure. File size before: text data bss dec hex filename 5389 208 48 5645 160d iio/industrialio-trigger.o File size after: text data bss dec hex filename 5453 176 48 5677 162d iio/industrialio-trigger.o Signed-off-by: Bhumika Goyal Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5d24bcc0a10a755ee77149e2f311c4ddafc19db Author: Alison Schofield Date: Sat Jan 21 19:28:52 2017 -0800 iio: trigger: close race condition in acquiring trigger reference In iio_trigger_write_current() we find the trigger we want while holding mutex on the list of triggers, but we don't actually do a get on it while holding mutex. We wait until further validations are completed and we're sure it's the one we want. Race condition is that it could be freed by the time we do the get. Solution is to grab the trigger (iio_trigger_get) as soon as we find it while holding mutex on the list of triggers. If later we decide it's not the right one, put it back. (iio_trigger_put). Signed-off-by: Alison Schofield Suggested-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit dfebd8d81dc69afa9f20459ec9839f857f8c135f Author: Lorenzo Bianconi Date: Tue Jan 17 19:38:23 2017 +0100 iio: imu: st_lsm6dsx: fix typo in gyro sensitivity definition Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2db5054ac28d4ab2eaa6c67e2d9f61fa5ba006b8 Author: Brian Masney Date: Tue Jan 17 04:25:02 2017 -0500 staging: iio: isl29028: add runtime power management support This patch adds runtime power management support to the isl29028 driver. It defaults to powering off the device after two seconds of inactivity. isl29028_chip_init_and_power_on() currently only zeros the CONFIGURE register on the chip, which will cause the chip to turn off. This patch also renames that function to isl29028_clear_configure_reg() since it is now used in several places. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 118 ++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 8 deletions(-) commit 0fac96ed50d1bb6a0ce8dd44b94d3643a0dc3c91 Author: Brian Masney Date: Tue Jan 17 04:25:01 2017 -0500 staging: iio: isl29028: only set ALS scale when ALS/IR sensing is enabled isl29028_chip_init_and_power_on() calls isl29028_set_als_scale() and this is not needed until the user actually needs to take a reading from the ALS/IR sensor. This patch moves the isl29028_set_als_scale() call from isl29028_chip_init_and_power_on() to isl29028_set_als_ir_mode(). This sets the stage for faster resume times from runtime power management if the user is only querying the proximity sensor. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 84a76694bc17dd31eed84ab2fae857f18909da42 Author: Brian Masney Date: Tue Jan 17 04:25:00 2017 -0500 staging: iio: isl29028: only set proximity sampling rate when proximity is enabled isl29028_chip_init_and_power_on() calls isl29028_set_proxim_sampling() and this is not needed until the user actually needs to take a proximity reading. This patch moves the isl29028_set_proxim_sampling() call from isl29028_chip_init_and_power_on() to isl29028_enable_proximity(). This sets the stage for faster resume times from the runtime power management if the user is only querying the ALS/IR sensor. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6766342441cbf286940f2c44b5cc869fa5a57046 Author: Brian Masney Date: Tue Jan 17 04:24:59 2017 -0500 staging: iio: isl29028: remove enable flag from isl29028_enable_proximity() isl29028_enable_proximity() has a boolean argument named enable. This function is only called once and the enable flag is set to true in that call. This patch removes the enable parameter from that function. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 71a0a643468e96caad4f0aa48d1041f319f3ba83 Author: Brian Masney Date: Tue Jan 17 04:24:58 2017 -0500 staging: iio: isl29028: remove unnecessary parenthesis isl29028_write_raw() contains unnecessary parenthesis when checking to see if the passed in lux scale is valid. This patch removes the unnecessary parenthesis. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c93940268065a69c08ae6bc3bc6165ba45cac71 Author: Brian Masney Date: Tue Jan 17 04:24:57 2017 -0500 staging: iio: isl29028: remove out of memory log message If the call to devm_iio_device_alloc() fails, then isl29028_probe() logs a message saying that memory cannot be allocated. The user's system most likely has larger issues at this point. This patch removes that error message since the error code is passed on and the message is not necessary. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 65ac716b2013b97d68dbec4be0b5fb01a16efe7e Author: Brian Masney Date: Tue Jan 17 04:24:56 2017 -0500 staging: iio: isl29028: remove unnecessary error logging in isl29028_chip_init_and_power_on() If the call to isl29028_chip_init_and_power_on() in isl29028_probe() fails, then isl29028_probe() will log an error message. All of the error paths in that call path already have error logging in place. This patch removes the unnecessary logging. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 578e02a7ed551f8d5aa8ee9fd094369bd84e7b01 Author: Brian Masney Date: Tue Jan 17 04:24:55 2017 -0500 staging: iio: isl29028: made error messages consistent The wording and style of the different error messages was not consistent. This patch makes the wording and style consistent throughout the driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 56 ++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 24 deletions(-) commit bcf5104e27187b8441aa10714b2dbe49f154bc92 Author: Brian Masney Date: Tue Jan 17 04:24:54 2017 -0500 staging: iio: isl29028: move failure logging into isl29028_set_als_scale() When isl29028_set_als_scale() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_als_scale() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit ae1e5238f71ca76f79fa79bfb357ea1bbd1b85b8 Author: Brian Masney Date: Tue Jan 17 04:24:53 2017 -0500 staging: iio: isl29028: move failure logging into isl29028_set_proxim_sampling() When isl29028_set_proxim_sampling() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_proxim_sampling() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 19140ae90484a89dc21ccea0cb077b80bf727019 Author: Brian Masney Date: Tue Jan 17 04:24:52 2017 -0500 staging: iio: isl29028: remove unused define ISL29028_DEV_ATTR The #define ISL29028_DEV_ATTR was not used so this patch removes the unnecessary code. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 1 - 1 file changed, 1 deletion(-) commit b1dda969350e75f2a4a0c036748c028f6f70ba7f Author: Brian Masney Date: Tue Jan 17 04:24:51 2017 -0500 staging: iio: isl29028: change newlines to improve readability Add and remove newlines to improve code readability in preparation for moving the driver out of staging. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 6db2fa0ab5d9b0b431617a3711c7990e3084c561 Author: Brian Masney Date: Tue Jan 17 04:24:48 2017 -0500 staging: iio: isl29028: made alignment of variables in struct isl29028_chip consistent The alignment of the variables in the struct isl29028_chip is not consistent. This changes all of the variables to use consistent alignment to improve the code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b44b1f3193ff8f442c844035815d7b2ebc26366b Author: Brian Masney Date: Tue Jan 17 04:24:50 2017 -0500 staging: iio: isl29028: combine isl29028_proxim_get() and isl29028_read_proxim() isl29028_proxim_get() checks to see if the promixity needs to be enabled on the chip and then calls isl29028_read_proxim(). There are no other callers of isl29028_read_proxim(). The naming between these two functions can be confusing so this patch combines the two to avoid the confusion. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit c4f60925984f4b22cb11ba76141855b5562d5423 Author: Brian Masney Date: Tue Jan 17 04:24:49 2017 -0500 staging: iio: isl29028: fix alignment of function arguments Two separate calls to regmap_update_bits() in isl29028_set_als_scale() and isl29028_set_als_ir_mode() did not have their function arguments on the next line aligned correctly to the open parenthesis. This patch corrects the alignment. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 99be230db9879088d291ab832641af539d94a5b4 Author: Javier Martinez Canillas Date: Mon Jan 16 12:50:45 2017 -0300 iio: adc: max1363: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 1 + 1 file changed, 1 insertion(+) commit 9c6e4efded8d1d811f3d5ab5ee8b1cfd033d9107 Author: Javier Martinez Canillas Date: Mon Jan 16 12:50:44 2017 -0300 iio: potentiometer: mcp4531: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/mcp4531.c | 1 + 1 file changed, 1 insertion(+) commit b1450ae9b66c6d6118322b1fb839531e33aae6c4 Author: Javier Martinez Canillas Date: Mon Jan 16 12:50:43 2017 -0300 iio: light: opt3001: Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/light/opt3001.c | 1 + 1 file changed, 1 insertion(+) commit 18e2452a3c4e830bff9628ec0e25a814df491e30 Author: Nicholas Mc Guire Date: Mon Jan 16 16:35:53 2017 +0100 iio: health: max30100: use msleep() for long uncritical delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 35ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Fixes: commit 4d33615df58b ("iio: light: add MAX30100 oximeter driver support") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/health/max30100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac2bec9d587c6a423a00c7a2d21a8a5928dfedf5 Author: Phil Reid Date: Mon Jan 16 16:38:24 2017 +0800 iio: adc: tlc4541: add support for TI tlc4541 adc This adds TI's tlc4541 16-bit ADC driver. Which is a single channel ADC. Supports raw and trigger buffer access. Also supports the tlc3541 14-bit device, which has not been tested. Implementation of the tlc3541 is fairly straight forward thou. Acked-by: Rob Herring Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 12 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max11100.c | 17 +-- drivers/iio/adc/ti-tlc4541.c | 271 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 287 insertions(+), 14 deletions(-) commit 0dbe71c274550a4a848f0b0753337a57f9125c92 Author: Jacopo Mondi Date: Wed Jan 18 17:30:53 2017 +0100 dt-bindings: iio: document MAX11100 ADC Add device tree bindings documentation for Maxim MAX11100 single-channel ADC Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/max11100.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e1bd326f4caf3f197b1472096e8620e249eaf92c Author: Masahiro Yamada Date: Sun Jan 22 21:46:49 2017 +0900 ARM: dts: uniphier: add eMMC pin-mux node All UniPhier SoCs support an eMMC controller. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3a93cc261a29bde973a5ac9a9800c12ce362f5a1 Author: Masahiro Yamada Date: Thu Apr 21 19:33:56 2016 +0900 arm64: dts: uniphier: add eMMC controller node for LD11/LD20 Add Cadence's eMMC controller node for LD11/LD20. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 10 ++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 10 ++++++++++ 2 files changed, 20 insertions(+) commit 8f32b8124a99a8f7a433d50ca041a75f096ffc7b Author: Masahiro Yamada Date: Sun Nov 27 03:10:53 2016 +0900 arm64: dts: uniphier: add SD-ctrl node for LD11 SoC The LD11 SoC is equipped with SD-ctrl (0x59810000) as well as MIO-ctrl (0x5b3e0000). The SD-ctrl block on this SoC has just one register for controlling RST_n pin of the eMMC device. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3a09b8d45b3c05d49e581831de626927c37599f8 Author: Zhou Chengming Date: Sun Jan 22 15:22:35 2017 +0800 sched/Documentation/sched-rt-group: Fix incorrect example I feel that the example given in the document to show the possibility of task starvation of configurable period is wrong. The example says group A and B both have 50% bandwidth, and a while (1) loop in A will run for the full period of B and can starve B's tasks. So I think the runtime of group A should be 50000us, then the period and runtime of group B should be 50000us and 25000us. Signed-off-by: Zhou Chengming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: corbet@lwn.net Cc: iamyooon@gmail.com Cc: linux-doc@vger.kernel.org Cc: lizefan@huawei.com Link: http://lkml.kernel.org/r/1485069755-44287-1-git-send-email-zhouchengming1@huawei.com Signed-off-by: Ingo Molnar Documentation/scheduler/sched-rt-group.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4c45c5167c9563b1a2eee3e2fe954621355e4ca8 Author: Jiri Slaby Date: Thu Jan 19 12:47:30 2017 +0100 x86/timer: Make delay() work during early bootup When a panic happens during bootup, "Rebooting in X seconds.." is shown, but reboot happens immediatelly. It is because panic() uses mdelay() and mdelay() calls __const_udelay() immediately, which does not work while booting. The per_cpu cpu_info.loops_per_jiffy value is not initialized yet, so __const_udelay() actually multiplies the number of loops by zero. This results in __const_udelay() to delay the execution only by a nanosecond or so. So check whether cpu_info.loops_per_jiffy is zero and use loops_per_jiffy in that case. mdelay() will not be so precise without proper calibration, but it works relatively well. Before: [ 0.170039] delaying 100ms [ 0.170828] done After [ 0.214042] delaying 100ms [ 0.313974] done I do not think the added check matters given we are about to spin the processor in the next few hundred cycles. Signed-off-by: Jiri Slaby Reviewed-by: Andy Shevchenko Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170119114730.2670-1-jslaby@suse.cz [ Minor edits. ] Signed-off-by: Ingo Molnar arch/x86/lib/delay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcc9a76d5ac426bc45c9e863b1830347827ca77a Author: Waiman Long Date: Sat Jan 21 21:33:35 2017 -0500 locking/rwsem: Reinit wake_q after use In __rwsem_down_write_failed_common(), the same wake_q variable name is defined twice, with the inner wake_q hiding the one in outer scope. We can either use different names for the two wake_q's. Even better, we can use the same wake_q twice, if necessary. To enable the latter change, we need to define a new helper function wake_q_init() to enable reinitalization of wake_q after use. Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1485052415-9611-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/sched.h | 6 ++++++ kernel/locking/rwsem-xadd.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 2de8b4110c82c243530a68381a1c39a4fe05c14f Author: Dmitry Torokhov Date: Thu Jan 19 13:52:49 2017 -0800 Input: pwm-beeper - switch to using "atomic" PWM API The "atomic" API allows us to configure PWM period and duty cycle and enable it in one call. Reviewed-by: Thierry Reding Tested-by: David Lechner Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 9e54924432783bfb21e905e0bf7042556bcb4b90 Author: David Lechner Date: Sun Jan 15 17:09:43 2017 -0800 Input: pwm-beeper - add optional amplifier regulator This adds an optional regulator to the pwm-beeper device. This regulator acts as an amplifier. The amplifier is only enabled while beeping in order to reduce power consumption. Tested on LEGO MINDSTORMS EV3, which has a speaker connected to PWM through an amplifier. Signed-off-by: David Lechner Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/pwm-beeper.txt | 16 ++++++ drivers/input/misc/pwm-beeper.c | 63 +++++++++++++++++----- 2 files changed, 66 insertions(+), 13 deletions(-) commit 62481881401246859d9bd06b7c7b9a391c78892c Author: David Lechner Date: Fri Jan 6 10:35:16 2017 -0800 Input: pwm-beeper - suppress error message on probe defer This suppress printing an error message when pwm_get returns -EPROBE_DEFER. Otherwise you get a bunch of noise in the kernel log. Signed-off-by: David Lechner Reviewed-by: Thierry Reding Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e9728f0dd7dc06fb0f0d18552ab9599005cd2ab7 Author: Dmitry Torokhov Date: Thu Jan 19 11:13:37 2017 -0800 Input: pwm-beeper - fix race when suspending Usually userspace sends SND_BELL and SND_TONE events, and by the time pwm_beeper_suspend() runs userpsace is already frozen, but theoretically in-kernel users may send these events too, and that may cause pwm_beeper_event() scheduling another work after we canceled it. Let's introduce a "suspended" flag and check it in pwm_beeper_event() to avoid this race. Reviewed-by: Thierry Reding Tested-by: David Lechner Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 48a55d7de79f95176f3ab372be66165a60be222f Author: Dmitry Torokhov Date: Fri Jan 6 09:54:14 2017 -0800 Input: pwm-beeper - use input_set_capability() Instead of manipulating capability bits directly, let's use input_set_capability() API. Reviewed-by: Thierry Reding Tested-by: David Lechner Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcf4b0460ba558b1e1fcaa7c160076751b560d03 Author: Dmitry Torokhov Date: Fri Jan 6 09:50:14 2017 -0800 Input: pwm-beeper - switch to using managed resources Use of managed resources (devm) simplifies error handling and tear down of the driver. Reviewed-by: Thierry Reding Tested-by: David Lechner Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 44 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) commit 2031717544cab77b9b6fd8c33fd24cbbe2f607b6 Author: Dmitry Torokhov Date: Fri Jan 6 09:48:20 2017 -0800 Input: pwm-beeper - remove calls to legacy pwm_request API There are no more users of pwm-beeper driver in mainline relying on this legacy API, so let's remove it and simplify the driver code. Acked-by: Thierry Reding Tested-by: David Lechner Signed-off-by: Dmitry Torokhov drivers/input/misc/pwm-beeper.c | 6 ------ 1 file changed, 6 deletions(-) commit ed77bdf4e4bea810014cdf68b771bcbe3d47163f Author: Guenter Roeck Date: Sat Jan 21 23:46:16 2017 -0800 Input: synaptics-rmi4 - use local variables consistently If a function declares a variable to access a structure element, use it conssistently. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_bus.c | 4 ++-- drivers/input/rmi4/rmi_driver.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8010e0db7071bdcd0fbd47983e88990d6ce979fb Author: Guenter Roeck Date: Sat Jan 21 23:50:09 2017 -0800 Input: misc - drop empty remove functions Empty remove functions don't serve a useful purpose and can be removed. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/e3x0-button.c | 6 ------ drivers/input/misc/hisi_powerkey.c | 6 ------ drivers/input/misc/pmic8xxx-pwrkey.c | 6 ------ drivers/input/misc/retu-pwrbutton.c | 6 ------ drivers/input/misc/sirfsoc-onkey.c | 6 ------ 5 files changed, 30 deletions(-) commit f20b161f59b73d40043199b3bff362e656a9c673 Author: Guenter Roeck Date: Sat Jan 21 23:49:38 2017 -0800 Input: serio - drop unnecessary calls to device_init_wakeup Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/serio/hyperv-keyboard.c | 1 - 1 file changed, 1 deletion(-) commit 8e1b4d83cf8b0e62f5a45792d07f027783c1a07c Author: Guenter Roeck Date: Sat Jan 21 23:49:13 2017 -0800 Input: touchscreen - drop unnecessary calls to device_init_wakeup Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ads7846.c | 2 -- drivers/input/touchscreen/bu21013_ts.c | 2 -- drivers/input/touchscreen/eeti_ts.c | 1 - drivers/input/touchscreen/lpc32xx_ts.c | 1 - drivers/input/touchscreen/st1232.c | 1 - 5 files changed, 7 deletions(-) commit 56580c2cb7d72e2176136b8146bcc6a527d8ac38 Author: Guenter Roeck Date: Sat Jan 21 23:48:45 2017 -0800 Input: misc - drop unnecessary calls to device_init_wakeup Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/88pm80x_onkey.c | 1 - drivers/input/misc/e3x0-button.c | 1 - drivers/input/misc/gp2ap002a00f.c | 2 -- drivers/input/misc/hisi_powerkey.c | 2 -- drivers/input/misc/pm8941-pwrkey.c | 1 - drivers/input/misc/pmic8xxx-pwrkey.c | 2 -- drivers/input/misc/sirfsoc-onkey.c | 2 -- 7 files changed, 11 deletions(-) commit de3a00ef21d6e803ee7c674c76a269016a1b308c Author: Guenter Roeck Date: Sat Jan 21 23:47:44 2017 -0800 Input: keyboard - drop unnecessary calls to device_init_wakeup Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 2 -- drivers/input/keyboard/matrix_keypad.c | 2 -- drivers/input/keyboard/omap4-keypad.c | 3 --- drivers/input/keyboard/samsung-keypad.c | 2 -- drivers/input/keyboard/spear-keyboard.c | 2 -- 5 files changed, 11 deletions(-) commit d7ddf15414dd598b9b875664e6b7aebe6c988f5d Author: Guenter Roeck Date: Sat Jan 21 23:46:47 2017 -0800 Input: touchscreen - use local variables consistently If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- drivers/input/touchscreen/fsl-imx25-tcq.c | 2 +- drivers/input/touchscreen/ili210x.c | 2 +- drivers/input/touchscreen/pixcir_i2c_ts.c | 4 ++-- drivers/input/touchscreen/rohm_bu21023.c | 3 +-- drivers/input/touchscreen/s3c2410_ts.c | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) commit ad56814fccfba3fe3613fa4d9accff3816786f3c Author: Guenter Roeck Date: Sat Jan 21 23:44:46 2017 -0800 Input: mouse - use local variables consistently If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 2 +- drivers/input/mouse/bcm5974.c | 2 +- drivers/input/mouse/cyapa.c | 6 ++--- drivers/input/mouse/cypress_ps2.c | 4 ++-- drivers/input/mouse/elan_i2c_core.c | 46 +++++++++++++++---------------------- drivers/input/mouse/elantech.c | 2 +- drivers/input/mouse/hgpk.c | 5 ++-- drivers/input/mouse/logips2pp.c | 2 +- drivers/input/mouse/trackpoint.c | 4 ++-- 9 files changed, 31 insertions(+), 42 deletions(-) commit a0d86ecd23a9e8ae36e274191e55068cc4d10129 Author: Guenter Roeck Date: Sat Jan 21 23:44:18 2017 -0800 Input: misc - use local variables consistently If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/drv260x.c | 2 +- drivers/input/misc/gpio_tilt_polled.c | 2 +- drivers/input/misc/hisi_powerkey.c | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) commit b4e66e7d1948e0a54a38102462b016ee1ed489c2 Author: Guenter Roeck Date: Sat Jan 21 23:40:45 2017 -0800 Input: keyboard - use local variables consistently If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/davinci_keyscan.c | 4 ++-- drivers/input/keyboard/gpio_keys.c | 24 +++++++++++------------- drivers/input/keyboard/gpio_keys_polled.c | 6 +++--- drivers/input/keyboard/mpr121_touchkey.c | 18 +++++++++--------- 4 files changed, 25 insertions(+), 27 deletions(-) commit 8300445cc7c14b1532a4891f2d25a649d6437daa Author: Guenter Roeck Date: Sat Jan 21 23:33:01 2017 -0800 Input: touchscreen - drop calls to platform_set_drvdata and i2c_set_clientdata There is no call to i2c_get_clientdata(), platform_get_drvdata(), or dev_get_drvdata() in any of the drivers in this patch. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/88pm860x-ts.c | 3 --- drivers/input/touchscreen/colibri-vf50-ts.c | 2 -- drivers/input/touchscreen/egalax_ts.c | 1 - drivers/input/touchscreen/max11801_ts.c | 1 - drivers/input/touchscreen/sx8654.c | 1 - 5 files changed, 8 deletions(-) commit 4cd216cbe744f907e7201f1f93f383980b7f931a Author: Guenter Roeck Date: Sat Jan 21 23:32:34 2017 -0800 Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdata There is no call to i2c_get_clientdata(), platform_get_drvdata(), or dev_get_drvdata() in any of the drivers in this patch. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/arizona-haptics.c | 2 -- drivers/input/misc/atmel_captouch.c | 1 - drivers/input/misc/da9063_onkey.c | 1 - drivers/input/misc/e3x0-button.c | 1 - drivers/input/misc/twl4030-pwrbutton.c | 1 - 5 files changed, 6 deletions(-) commit 666c0b8366b8d5d44251a3889f6a2c264a38dee9 Author: Guenter Roeck Date: Sat Jan 21 23:29:36 2017 -0800 Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata There is no call to i2c_get_clientdata(), platform_get_drvdata(), or dev_get_drvdata() in any of the drivers in this patch. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adc-keys.c | 2 -- drivers/input/keyboard/cap11xx.c | 1 - drivers/input/keyboard/gpio_keys_polled.c | 1 - drivers/input/keyboard/jornada680_kbd.c | 2 -- drivers/input/keyboard/max7359_keypad.c | 1 - drivers/input/keyboard/nspire-keypad.c | 2 -- drivers/input/keyboard/opencores-kbd.c | 2 -- drivers/input/keyboard/sun4i-lradc-keys.c | 1 - 8 files changed, 12 deletions(-) commit 68f0c8c923951eef2cde1d9ab6bc598aceecfc27 Author: Florian Fainelli Date: Sat Jan 21 11:20:10 2017 -0800 hwmon: (lm70) Add support for TI TMP122/124 Add support for Texas Instruments TMP122/124 which are nearly identical to their TMP121/123 except that they also support programmable temperature thresholds. Signed-off-by: Florian Fainelli Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/lm70.txt | 1 + Documentation/hwmon/lm70 | 8 ++++++-- drivers/hwmon/lm70.c | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) commit e8295146503720db914f2b82569de31bacbf6387 Author: Florian Fainelli Date: Sat Jan 21 11:20:09 2017 -0800 hwmon: (lm70) Utilize dev_warn instead of pr_warn We have a device reference, utilize it instead of pr_warn(). Signed-off-by: Florian Fainelli Signed-off-by: Guenter Roeck drivers/hwmon/lm70.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 83e4947a569f4d544ef4a1361f51c91d73a9c915 Author: Hans de Goede Date: Sat Jan 21 11:16:47 2017 -0800 Input: gpio-keys - add support for setkeycode gpio-keys input devices created by the soc_button_array driver are configured with key-codes based on ACPI provided information. Unfortunately on some tablets this info is wrong, and we need to have a quirk to fix things up. Add support for input_setkeycode to the gpio-keys driver, so that the existing udev hwdb mechanism can be used to fix things up on these tablets. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 40 ++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) commit 5c4fa2a6da7fbc76290d1cb54a7e35633517a522 Author: Hans de Goede Date: Sat Jan 21 11:14:14 2017 -0800 Input: soc_button_array - debounce the buttons The soc_button_array driver was initializing (kzalloc) the debounce_interval value to 0, leading to no debouncing at all, while the buttons are simple mechanical switches. This commit sets debounce_interval to 50ms to avoid spurious button press reports both on press and release of the button. Note 50ms may seem like a lot but soc_button_array is typically used with cheap tablets, with not so great buttons. I tried 10ms on my tablet and it is not enough, where as 50ms works well. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 2 ++ 1 file changed, 2 insertions(+) commit bb85ceb1b312b8e28b3017768c64fe76711451d4 Author: Javier Martinez Canillas Date: Mon Jan 16 11:52:27 2017 -0300 hwmon: (ltc4151) Export OF device ID table as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/hwmon/ltc4151.ko | grep alias alias: i2c:ltc4151 After this patch: $ modinfo drivers/hwmon/ltc4151.ko | grep alias alias: i2c:ltc4151 alias: of:N*T*Clltc,ltc4151C* alias: of:N*T*Clltc,ltc4151 Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ltc4151.c | 1 + 1 file changed, 1 insertion(+) commit 9f6fe6f0137642d487a5add88fc205a7496e4f69 Author: Pankaj Dubey Date: Fri Jan 20 09:49:55 2017 +0530 arm64: dts: exynos: Fix drive strength of sd0_xxx pin definitions As per Exynos7 datasheet FSYS1 pinctrl block does not support drive strength value of 0x3. This patch fixes this and update the correct drive strength for sd0_xxx pin definitions. Signed-off-by: Pankaj Dubey Reviewed-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a8e7e88df9ec1b7df2d12b6ee4ec48aee7b6aec7 Author: Jacopo Mondi Date: Wed Jan 18 17:30:52 2017 +0100 iio: adc: Add Maxim MAX11100 driver Add iio driver for Maxim MAX11100 single-channel ADC. Signed-off-by: Jacopo Mondi Tested-by: Marek Vasut Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 9 +++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max11100.c | 192 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+) commit 2d3f956e2ea8c247ce433323ca9f764da139aae7 Author: Alison Schofield Date: Sun Jan 15 21:01:10 2017 -0800 iio: bmi160: use variable names for sizeof() operator Replace the types with the actual variable names when using the sizeof() operator. This is kernel preferred style as it's more obvious that it is correct. Signed-off-by: Alison Schofield Signed-off-by: Jonathan Cameron drivers/iio/imu/bmi160/bmi160_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d1242acc566a9288cbca441be1a7358c0316197e Author: Arnd Bergmann Date: Fri Jan 20 17:25:15 2017 +0100 iio: light: cm3605: mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get a harmless warning drivers/iio/light/cm3605.c:292:12: error: 'cm3605_pm_resume' defined but not used [-Werror=unused-function] drivers/iio/light/cm3605.c:281:12: error: 'cm3605_pm_suspend' defined but not used [-Werror=unused-function] Marking the functions as possibly unused avoids the warning without needing to add an #ifdef. Fixes: 8afa505c1230 ("iio: light: add driver for Capella CM3605") Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Cameron drivers/iio/light/cm3605.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bc1abcddb24f55b9c251e03caa4f9bd22ff748b Author: Alison Schofield Date: Fri Jan 20 12:22:58 2017 -0800 iio: pressure: ms5611: claim direct mode during oversampling changes Driver was checking for direct mode before changing oversampling ratios, but was not locking it. Use the claim/release helper functions to guarantee the device stays in direct mode while the oversampling ratios are being updated. Continue to use the drivers private state lock to protect against conflicting direct mode access of the state data. Signed-off-by: Alison Schofield Signed-off-by: Jonathan Cameron drivers/iio/pressure/ms5611_core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 6b2e7589b82ff534dd5c6d67dd83c53f13691bec Author: Alison Schofield Date: Fri Jan 20 14:11:30 2017 -0800 iio: proximity: sx9500: claim direct mode during raw proximity reads Driver was checking for direct mode but not locking it. Use the claim/release helper functions to guarantee the device stays in direct mode during raw reads of proximity data. Signed-off-by: Alison Schofield Reviewed-by: Vlad Dogaru Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 80dea21f95a4672cce545f48dc2ca500b69a2584 Author: Alison Schofield Date: Fri Jan 20 12:39:32 2017 -0800 iio: magnetometer: mag3110: claim direct mode during raw writes Driver was checking for direct mode but not locking it. Use claim/release helper functions to guarantee the device stays in direct mode during raw writes. Signed-off-by: Alison Schofield Acked-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/mag3110.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 6146e6da5c961735dacf9b6c0c8b5f1382193ee2 Author: Daniele Ceraolo Spurio Date: Fri Jan 20 13:51:23 2017 -0800 drm/i915: reinstate call to trace_i915_vma_bind The call went away in: commit 3b16525cc4c1a43e9053cfdc414356eea24bdfad Author: Chris Wilson Date: Thu Aug 4 16:32:25 2016 +0100 drm/i915: Split insertion/binding of an object into the VM It is useful to have this trace as it pairs nicely with the vma_unbind one to track vma activity. Added inside the i915_vma_bind function (was outside before) to keep a similar placement as trace_i915_vma_unbind. v2: print bind_flags instead of flags (Chris) Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/1484949083-11430-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_vma.c | 1 + 1 file changed, 1 insertion(+) commit b00ddb27324eee53cbed8be7fc00dc572727bb0e Author: Chris Wilson Date: Thu Jan 19 19:26:59 2017 +0000 drm/i915: Assert that created vma has a whole number of pages VMA (and their objects) are supposed to composed of whole pages. Add an assert to catch any invalid construct when we create the VMA. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-6-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 2 ++ 1 file changed, 2 insertions(+) commit 44a0ec0d3bd5ebbe2233b48cc53b5c79b66277b7 Author: Chris Wilson Date: Thu Jan 19 19:26:58 2017 +0000 drm/i915: Assert the drm_mm_node is allocated when on the VM lists Before moving the vma between the VM active/inactive lists, assert that the node is still allocated. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_stolen.c | 2 ++ drivers/gpu/drm/i915/i915_vma.c | 2 ++ 2 files changed, 4 insertions(+) commit e0216b762a7096639db395a22bdda7d1a7213c0f Author: Chris Wilson Date: Thu Jan 19 19:26:57 2017 +0000 drm/i915: Treat an error from i915_vma_instance() as unlikely When pinning into the global GTT, an error from creating the VMA is unlikely, so mark it so. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fcdaa7e72a7666a8367cabd77db092992357328 Author: Chris Wilson Date: Thu Jan 19 19:26:56 2017 +0000 drm/i915: Reject vma creation larger than address space Disallow creation of a vma that is larger than the available address space, or triggers an overflow on fence expansion. Testcase: igt/gem_exec_reloc/gtt-32 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit befedbb7e24935e149640ddfc2b82dab42985e3c Author: Chris Wilson Date: Thu Jan 19 19:26:55 2017 +0000 drm/i915: Use common LRU inactive vma bumping for unpin_from_display Now that i915_gem_object_bump_inactive_ggtt() exists, also make use of it for the LRU bumping from i915_gem_object_unpin_from_display() Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-2-chris@chris-wilson.co.uk Reviewed-by: Jonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d65415df0708700e306fcbcaece23369de4cb74e Author: Chris Wilson Date: Thu Jan 19 08:22:10 2017 +0000 drm/i915: Do an unlocked wait before set-cache-level ioctl Since a change in cache level is likely to trigger an unbind, avoid waiting under the mutex by preemptively doing an unlocked wait. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170119082211.21257-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit a1b94355ea3fde5e13db7ff37c0272fcde4e29b2 Author: Colin Ian King Date: Fri Jan 20 13:25:06 2017 +0000 power: supply: bq2415x: check for NULL acpi_id to avoid null pointer dereference acpi_match_device can potentially return NULL, so it is prudent to check if acpi_id is null before it is dereferenced. Add a check and an error message to indicate the failure. Signed-off-by: Colin Ian King Reviewed-by: Pali Rohár Signed-off-by: Sebastian Reichel drivers/power/supply/bq2415x_charger.c | 5 +++++ 1 file changed, 5 insertions(+) commit 52af8557bb59b0efd731a6e79170486dd91bf85f Author: Gabriel Fernandez Date: Fri Jan 6 14:59:22 2017 +0100 clk: stm32f7: Add stm32f7 clock DT bindings for STM32F746 boards This patch introduces the stm32f7 clock DT bindings. Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st,stm32-rcc.txt | 20 ++++++++++++++++++++ include/dt-bindings/clock/stm32fx-clock.h | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 6847c4c296a4d44c5cd1230a59b997aea9a9d35d Author: Fabio Estevam Date: Wed Jan 18 15:53:56 2017 -0200 clk: imx7d: Add the OCOTP clock Add the OCOTP so that this hardware block can be used. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 3f9195811d8d829556c4cd88d3f9e56a80d5ba60 Author: Eric Anholt Date: Wed Jan 18 07:31:57 2017 +1100 clk: bcm2835: Add leaf clock measurement support, disabled by default This proved incredibly useful during debugging of the DSI driver, to see if our clocks were running at rate we requested. Let's leave it here for the next person interacting with clocks on the platform (and so that hopefully we can just hook it up to debugfs some day). Signed-off-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 144 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 119 insertions(+), 25 deletions(-) commit 8a39e9fa578229fd4604266c6ebb1a3a77d7994c Author: Eric Anholt Date: Wed Jan 18 07:31:56 2017 +1100 clk: bcm2835: Register the DSI0/DSI1 pixel clocks. The DSI pixel clocks are muxed from clocks generated in the analog phy by the DSI driver. In order to set them as parents, we need to do the same name lookup dance on them as we do for our root oscillator. Signed-off-by: Eric Anholt Signed-off-by: Stephen Boyd .../bindings/clock/brcm,bcm2835-cprman.txt | 15 ++- drivers/clk/bcm/clk-bcm2835.c | 121 +++++++++++++++++++-- include/dt-bindings/clock/bcm2835.h | 2 + 3 files changed, 125 insertions(+), 13 deletions(-) commit 55486091bd1e1c5ed28c43c0d6b3392468a9adb5 Author: Eric Anholt Date: Wed Jan 18 07:31:55 2017 +1100 clk: bcm2835: Don't rate change PLLs on behalf of DSI PLL dividers. Our core PLLs are intended to be configured once and left alone. With the SET_RATE_PARENT, asking to set the PLLD_DSI1 clock rate would change PLLD just to get closer to the requested DSI clock, thus changing PLLD_PER, the UART and ethernet PHY clock rates downstream of it, and breaking ethernet. We *do* want PLLH to change so that PLLH_AUX can be exactly the value we want, though. Thus, we need to have a per-divider policy of whether to pass rate changes up. Signed-off-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit c567fb37f123511d752a454fb11d8bcaf46a7895 Author: Khiem Nguyen Date: Tue Jan 10 06:50:58 2017 +0000 clk: cs2000: add Suspend/Resume feature CS2000 needs re-setup when redume, otherwise, it can't handle correct clock rate. Signed-off-by: Khiem Nguyen [Kuninori: cleanup original patch] Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 3e1aec4e2c415346df7d5429f7413837ddaaedd7 Author: Marek Vasut Date: Thu Jan 12 02:03:24 2017 +0100 clk: vc5: Add support for IDT VersaClock 5P49V5923 and 5P49V5933 Add driver for IDT VersaClock 5 5P49V5923 and 5P49V5933 chips. These chips have two clock inputs, XTAL or CLK, which are muxed into single PLL/VCO input. In case of 5P49V5923, the XTAL in built into the chip while the 5P49V5923 requires external XTAL. The PLL feeds two fractional dividers. Each fractional divider feeds output mux, which allows selecting between clock from the fractional divider itself or from output mux on output N-1. In case of output mux 0, the output N-1 is instead connected to the output from the mux feeding the PLL. The driver thus far supports only the 5P49V5923 and 5P49V5933, while it should be easily extensible to the whole 5P49V59xx family of chips as they are all pretty similar. Signed-off-by: Marek Vasut Cc: Michael Turquette Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Stephen Boyd MAINTAINERS | 5 + drivers/clk/Kconfig | 10 + drivers/clk/Makefile | 1 + drivers/clk/clk-versaclock5.c | 791 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 807 insertions(+) commit 13c599069130e5a1f04a9409d65566e149b12708 Author: Xiang Chen Date: Fri Jan 20 20:45:24 2017 +0800 scsi: hisi_sas: decrease running_req in hisi_sas_slot_task_free() There is an issue that hisi_sas_dev.running_req is not decremented properly for internal abort and TMF. To resolve, only decrease running_req in hisi_sas_slot_task_free() Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++---- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) commit 0757f041b171d19cab9b6dac186a588ba0260055 Author: Xiang Chen Date: Fri Jan 20 20:45:23 2017 +0800 scsi: hisi_sas: fix probe ordering problem There is a potential probe issue in how we trigger the hw initialisation. Although we use 1s timer to delay hw initialisation, there is still a potential that sas_register_ha() is not be finished before we start the PHY init from hw->hw_init(). To avoid this issue, initialise the hw after sas_register_ha() in the same probe context. Note: it is not necessary to use 1s timer now (modified v2 hw only). Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++---- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) commit 297d73023ac559ea0cb4f1638fc8563b8c763c1e Author: John Garry Date: Fri Jan 20 20:45:22 2017 +0800 scsi: hisi_sas: downgrade internal abort exit print Downgrade the exit print in hisi_sas_internal_task_abort() to dbg level, as info is not required. Signed-off-by: John Garry Reviewed-by: Xiang Chen Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0edef7e46c24b86dc51e6ba7e22c3070ced7328c Author: Xiang Chen Date: Fri Jan 20 20:45:21 2017 +0800 scsi: hisi_sas: modify hard reset for directed-attached disk Correctly set registers in v2 for root PHY hardreset for directly attached disk. Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 87e287c1ebf887acdc2b1b0563b52f0c4449dccb Author: John Garry Date: Fri Jan 20 20:45:20 2017 +0800 scsi: hisi_sas: downgrade refclk message The message to inform that the controller has no refclk is currently at warning level, which is unnecessary, so downgrade to debug. Signed-off-by: John Garry Reviewed-by: Xiang Chen Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c399acfb85974a3ebc0dec0e7fb7b60cb1aeac7b Author: Xiang Chen Date: Fri Jan 20 20:45:19 2017 +0800 scsi: hisi_sas: modify some values of ITCT table Set SMP connection timeout and continue AWT timer; Clear ITCT table when dev gone. Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit f2f89c32a0f1512856ffb4569bfdf2f20e42fcab Author: Xiang Chen Date: Fri Jan 20 20:45:18 2017 +0800 scsi: hisi_sas: workaround v2 hw SATA IO timeout issue The v2 SAS controller needs more time to detect channel idle and send setup link request than SATA disk does, so it is difficult for the SAS controller to setup an STP link. Therefore it may cause some IO timeouts. We need to periodically configure the SAS controller so it doesn't receive STP setup requests from SATA disks for a while, so IO can be sent during this period. Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 75 +++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) commit 9044d87377b3edbd06468a93818f0609d640c238 Author: Marek Vasut Date: Thu Jan 12 02:03:23 2017 +0100 clk: vc5: Add bindings for IDT VersaClock 5P49V5923 and 5P49V5933 Add bindings for IDT VersaClock 5 5P49V5923 and 5P49V5933 chips. These are I2C clock generators with optional clock source from either XTal or dedicated clock generator and, depending on the model, two or more clock outputs. Signed-off-by: Marek Vasut Cc: Michael Turquette Reviewed-by: Laurent Pinchart Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/idt,versaclock5.txt | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit e2934ed183b94cff7626a517877ecc9bbe82cdc8 Author: James Smart Date: Tue Jan 17 12:31:56 2017 -0800 scsi: lpfc: Fix lpfc_wwn_set return code check When I reversed the patch to re-add the lpfc_soft_wwn parameter feature, it re-added code that had a long-standing bug. (that's what I get I guess :) As Dan Carpenter pointed out - error checks looked at wrong polarity. 0 is success, -errno is failure. Updated checks. Signed-off-by: James Smart Reported-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 060982670bf5cf09968e2fd8dd21872dfaf34c82 Merge: d07ed23 1a0abcd Author: Stephen Boyd Date: Fri Jan 20 15:51:55 2017 -0800 Merge tag 'v4.11-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull Rockchip clk updates from Heiko Stuebner: A new clock-type for the 1-2 muxes per soc that are for whatever reason controlled through the General Register Files, support for the rk3328 clock-controller (including a new pll-type) and the usual clock ids and some fixes. * tag 'v4.11-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: dt-bindings: clk: add rockchip,grf property for RK3399 clk: rockchip: use clock ids for memory controller parts on rk3066/rk3188 clk: rockchip: use rk3288 isp_in clock ids clk: rockchip: add clock ids for memory controller parts on rk3066/rk3188 clk: rockchip: add rk3288 isp_in clock ids clk: rockchip: Remove useless init of "grf" to -EPROBE_DEFER clk: rockchip: add clock controller for rk3328 dt-bindings: add bindings for rk3328 clock controller clk: rockchip: add dt-binding header for rk3328 clk: rockchip: add new pll-type for rk3328 clk: rockchip: describe aclk_vcodec using the new muxgrf type on rk3288 clk: rockchip: add a clock-type for muxes based in the grf commit d07ed23f4c4aa8fb6de2f18bf505e7da17719165 Merge: f4a0a6c cb4ac94 Author: Stephen Boyd Date: Fri Jan 20 15:49:47 2017 -0800 Merge tag 'clk-v4.11-samsung' of git://linuxtv.org/snawrocki/samsung into clk-next Pull Samsung clk updates from Sylwester Nawrocki: - addition of the CPU clock configuration data for Exynos4412 Prime SoC variant, - removal of driver for deprecated Exynos4415 SoC, - switching from the syscore to regular system sleep PM ops in the audio subsystem clocks controller driver, - updates of the definitions of some "Network On Chip" related clocks. * tag 'clk-v4.11-samsung' of git://linuxtv.org/snawrocki/samsung: clk: samsung: Remove Exynos4415 driver (SoC not supported anymore) clk: samsung: exynos-audss: Replace syscore PM with platform device PM clk: samsung: exynos5433: Set NoC (Network On Chip) clocks as critical clk: samsung: Add CPU clk configuration data for Exynos4412 Prime commit f4a0a6c309ce55a8b199e710e9eeddcb9929ada7 Author: Lucas Stach Date: Fri Jan 13 18:39:43 2017 +0100 clk: imx6: don't restrict LDB mux changes on QuadPlus The LDB mux/gate layout has been fixed on QuadPlus, so there is no need to restrict the LDB mux changes on this hardware, as the erratum preventing this from working properly is gone. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6q.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 3a1ba8ba67b8f642652c418d3836cf29f116b7fe Merge: 89d5dcc e6bdf28 Author: Stephen Boyd Date: Fri Jan 20 15:17:50 2017 -0800 Merge tag 'clk-renesas-for-v4.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull renesas clk updates from Geert Uytterhoeven: - Add CAN and MSIOF related clocks for R-Car M3-W. * tag 'clk-renesas-for-v4.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add MSIOF controller clocks clk: renesas: r8a7796: Add CAN FD peripheral clock clk: renesas: r8a7796: Add CANFD clock clk: renesas: r8a7796: Add CAN peripheral clock commit 9f8197980d87a28ec3d0b3b986f770e7e7878485 Author: Russell King Date: Thu Jan 19 10:59:13 2017 +0000 delay: Add explanation of udelay() inaccuracy There seems to be some misunderstanding that udelay() and friends will always guarantee the specified delay. This is a false understanding. When udelay() is based on CPU cycles, it can return early for many reasons which are detailed by Linus' reply to me in a thread in 2011: http://lists.openwall.net/linux-kernel/2011/01/12/372 However, a udelay test module was created in 2014 which allows udelay() to only be 0.5% fast, which is outside of the CPU-cycles udelay() results I measured back in 2011, which were deemed to be in the "we don't care" region. test_udelay() should be fixed to reflect the real allowable tolerance on udelay(), rather than 0.5%. Cc: David Riley Cc: John Stultz Signed-off-by: Russell King Signed-off-by: John Stultz include/linux/delay.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f2a3313d65f0bf6d3fefe8fa40e0208fe003e59e Author: John Pittman Date: Thu Jan 12 16:17:20 2017 -0500 scsi: sd: Cleaned up comment references to @sdp argument explanation. In sd.c there are two comment references to 'struct scsi_device *sdp' as an argument. One of the references has a typo and the other should be a reference to 'struct device *dev' instead. Fixed by correcting the typo in the first and changing the explanation in the second. Signed-off-by: John Pittman Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f253473699b2e308e48a6e2eacb4391e045410c9 Author: Wei Yongjun Date: Thu Jan 12 14:21:32 2017 +0000 scsi: be2iscsi: Use GFP_ATOMIC under spin lock A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 987132167f4b ("scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset") Signed-off-by: Wei Yongjun Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e01ea5e2a3f2a127ace8b671a830a5c789f07510 Author: Shyam Saini Date: Sat Dec 24 16:21:07 2016 +0530 scsi: lpfc: Replace BUG() with BUG_ON() Replace BUG() with BUG_ON() using coccinelle. Signed-off-by: Shyam Saini Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0b4c208d443ba2af82b4c70f99ca8df31e9a0020 Author: Jim Mattson Date: Tue Dec 20 16:34:50 2016 -0800 Revert "KVM: nested VMX: disable perf cpuid reporting" This reverts commit bc6134942dbbf31c25e9bd7c876be5da81c9e1ce. A CPUID instruction executed in VMX non-root mode always causes a VM-exit, regardless of the leaf being queried. Fixes: bc6134942dbb ("KVM: nested VMX: disable perf cpuid reporting") Signed-off-by: Jim Mattson [The issue solved by bc6134942dbb has been resolved with ff651cb613b4 ("KVM: nVMX: Add nested msr load/restore algorithm").] Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.c | 6 ------ arch/x86/kvm/vmx.c | 2 -- 2 files changed, 8 deletions(-) commit d0f11d14b0bc673db36e64814ac9cd1a17de09c9 Author: Icenowy Zheng Date: Fri Jan 20 01:54:45 2017 +0800 clk: sunxi-ng: add support for V3s CCU V3s has a similar but cut-down CCU to H3. Some muxes, especially clocks about CSI, are different, which makes it to need a new CCU driver. Add such a new driver for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 11 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 591 ++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 63 ++++ include/dt-bindings/clock/sun8i-v3s-ccu.h | 107 ++++++ include/dt-bindings/reset/sun8i-v3s-ccu.h | 78 ++++ 6 files changed, 851 insertions(+) commit 4a9decc9a7649811b4c47cf5ab55acf374cd828d Author: Icenowy Zheng Date: Fri Jan 20 01:54:46 2017 +0800 dt-bindings: add device binding for the CCU of Allwinner V3s Allwinner V3s is now driven by sunxi-ng CCU driver. Add devicetree binding for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 1 + 1 file changed, 1 insertion(+) commit b074fede01c0be4a45a7883620f40ff88c61488a Author: Icenowy Zheng Date: Fri Jan 20 01:54:44 2017 +0800 arm: sunxi: add support for V3s SoC Allwinner V3s is a low-end single-core Cortex-A7 SoC, with 64MB integrated DRAM, and several peripherals. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/arm/sunxi/README | 4 ++++ arch/arm/mach-sunxi/sunxi.c | 1 + 2 files changed, 5 insertions(+) commit 3139b4a3a24c0a84fed1c1041eb254c858087c72 Author: Michał Winiarski Date: Fri Jan 20 20:23:47 2017 +0100 drm/i915/huc: Assert that HuC vma is placed in GuC accessible range HuC firmware is mapped at GuC accessible range. Let's add an assert to verify that. Cc: Anusha Srivatsa Cc: Arkadiusz Hiler Cc: Chris Wilson Reviewed-by: Michal Wajdeczko Signed-off-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170120192348.2049-2-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_huc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e8d12bc733fc9deeb5d78140cda169030fa2ac5 Author: Michał Winiarski Date: Fri Jan 20 20:23:46 2017 +0100 drm/i915/huc: Avoid attempting to authenticate non-existent fw HuC authentication is called even if HuC firmware is not present in the system, leading to NULL ptr dereference on not allocated gem_object. Let's avoid trying to authenticate HuC if its firmware is not loaded successfully. Fixes: dac84a388528 ("drm/i915/huc: Support HuC authentication") v2: Check inside the auth function, split the assert (Michał) v3: Oops, hit send before compiling, s/huc_fw/huc->fw Cc: Anusha Srivatsa Cc: Arkadiusz Hiler Cc: Chris Wilson Reviewed-by: Michal Wajdeczko Signed-off-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170120192348.2049-1-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_huc.c | 3 +++ 1 file changed, 3 insertions(+) commit 190bacca16d0627dce1d4ceb873f041ebbaef69a Author: Jiri Olsa Date: Fri Jan 20 10:20:32 2017 +0100 perf c2c report: Coalesce by default only by pid,iaddr It seems to be the most used argument for -c option so far. In the beginning when you want to have the overall process report, so it makes sense to make it the default one. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1484904032-11040-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-c2c.txt | 2 +- tools/perf/builtin-c2c.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8763e6ac2d368ac9d650df35b00c3af2a7c1878b Author: Jiri Olsa Date: Fri Jan 20 10:20:31 2017 +0100 perf c2c report: Display Total records column in offset view Adding "Total records" column into cacheline pareto table, between cycles and cpu info. $ perf c2c report ... --- ---------- cycles ---------- Total cpu rmt hitm lcl hitm load records cnt ... ........ ........ ........ ....... ........ 0 112 71 34 4 0 0 0 18 1 0 0 0 2 1 0 132 0 3 3 ... It's useful to see how many recorded samples represent each offset. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1484904032-11040-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 1 + 1 file changed, 1 insertion(+) commit b9b0c831bed2682c2e3e9f5420fb6985549ef020 Author: Namhyung Kim Date: Fri Jan 20 11:44:47 2017 +0900 ftrace: Convert graph filter to use hash tables Use ftrace_hash instead of a static array of a fixed size. This is useful when a graph filter pattern matches to a large number of functions. Now hash lookup is done with preemption disabled to protect from the hash being changed/freed. Link: http://lkml.kernel.org/r/20170120024447.26097-3-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 190 +++++++++++++++++++++++++++++++++----------------- kernel/trace/trace.h | 64 ++++++++--------- 2 files changed, 158 insertions(+), 96 deletions(-) commit 4046bf023b0647d09704a32d9fe8aecbcee3e4c3 Author: Namhyung Kim Date: Fri Jan 20 11:44:46 2017 +0900 ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip It will be used when checking graph filter hashes later. Link: http://lkml.kernel.org/r/20170120024447.26097-2-namhyung@kernel.org Signed-off-by: Namhyung Kim [ Moved ftrace_hash dec and functions outside of FUNCTION_GRAPH define ] Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 14 +------------- kernel/trace/trace.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 14 deletions(-) commit 9a549c1e35b0a363c3b46b9a08009252c5bc32c3 Merge: 319554f cf1a56a Author: David S. Miller Date: Fri Jan 20 14:42:52 2017 -0500 Merge branch 'dsa-hwmon' Andrew Lunn says: ==================== net: dsa: Move temperature sensor code into PHY. Marvell Ethernet switches contain a temperature sensor. There appears to be one sensor, which is shared by each of the internal PHYs. Each PHY has independent registers to read this sensor, and to set a limit for when an alarm should be raised. Some Marvell discrete PHY also have the same sensor and registers. Moving the HWMON code from DSA into the PHY makes the sensor available in discrete PHYs, and removes the layering violation, the switch driver poking around in PHY registers. While moving the code into the PHY driver, it has been re-written to use the new HWMON APIs. v2: Better Cover note explaining one sensor, but multiple independent registers Simply error checking. ==================== Signed-off-by: David S. Miller commit cf1a56a4cf196a2922e66e9a8e0bf80d324c5548 Author: Andrew Lunn Date: Fri Jan 20 01:37:50 2017 +0100 net: dsa: Remove hwmon support Only the Marvell mv88e6xxx DSA driver made use of the HWMON support in DSA. The temperature sensor registers are actually in the embedded PHYs, and the PHY driver now supports it. So remove all HWMON support from DSA and drivers. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 154 ---------------------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 16 ---- include/net/dsa.h | 8 -- net/dsa/Kconfig | 11 --- net/dsa/Makefile | 1 - net/dsa/dsa.c | 4 - net/dsa/dsa_priv.h | 9 -- net/dsa/hwmon.c | 147 -------------------------------- 8 files changed, 350 deletions(-) commit 0b04680fdae464ee51409b8cb36005f6ef8bd689 Author: Andrew Lunn Date: Fri Jan 20 01:37:49 2017 +0100 phy: marvell: Add support for temperature sensor Some Marvell PHYs have an inbuilt temperature sensor. Add hwmon support for this sensor. There are two different variants. The simpler, older chips have a 5 degree accuracy. The newer devices have 1 degree accuracy. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 423 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 420 insertions(+), 3 deletions(-) commit 319554f284dda9f2737d09df82ba3610bd8ddea3 Author: Josef Bacik Date: Thu Jan 19 17:47:46 2017 -0500 inet: don't use sk_v6_rcv_saddr directly When comparing two sockets we need to use inet6_rcv_saddr so we get a NULL sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our comparison function can be wrong. Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a reuseport sk") 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 7d982567f41e25a154b961c610303f23dfdd2820 Merge: cc15478 3dd69e3 Author: David S. Miller Date: Fri Jan 20 14:22:27 2017 -0500 Merge tag 'mlx5-updates-2017-01-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 and mlx5e updates 2017-01-19 This series includes some updates for mlx5 core and mlx5e netdevice driver. From Leon, a small fix that remove an unnecessary print. From Eli Cohen, a fix to the FW version printout in case of internal error. From Eugenia Emantayev, two patches, the 1st adds mlx5 1pps (pulse per second) mlx5 infrastructure support and the 2nd adds the necessary bits for mlx5e ptp logic and structures. From Mohamad, add support for s-tagged packet receive when in promiscuous mode. Form Gal Pressman, MCAM (Management capabilities mask register) and PCAM (Ports capabilities mask register) registers infrastructure, those registers are needed in order to query the different statistics registers support in FW, in order for the driver to enable/disable query and reporting them back to user. On top of this infrastructure we've exposed new set of statistics groups: - MPCNT: Physical layer statistical counters (For symbol errors) - PPCNT: PCIe performance counters In addition to the statistics capabilities series we've moved the mlx5 HCA capabilities fields to a dedicated struct under the driver private data. At the end a small patch to update & query statistics in the most desired order. ==================== Signed-off-by: David S. Miller commit 8dd6666f4937d7cc94781771e1a8fc837fea84fb Author: Lokesh Vutla Date: Fri Jan 20 10:39:10 2017 -0800 ARM: OMAP2+: omap_hwmod: Add support for earlycon Hwmod core tries to reset and idles each IP that is registered with hwmod. In case of earlycon, that specific uart IP cannot be reset or keep it in idle state else earlycon hangs once hwmod resets that uart IP. So add support to not reset uart that is being used as earlycon only if CONFIG_SERIAL_EARLYCON is enabled. Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 220fbc13c2f7c4aecd7205e65a4e551b16e34497 Author: Lokesh Vutla Date: Wed Jan 18 09:33:26 2017 +0530 ARM: dts: dra7xx: Add stdout-path property Add stdout-path property in /chosen node so that earlycon can be used by just adding earlycon in bootargs. Tested-by: Vignesh R Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 4 ++++ arch/arm/boot/dts/dra72-evm-common.dtsi | 4 ++++ 2 files changed, 8 insertions(+) commit bc1baa6b8f77e256ccfb8a4e265d34d39b83b0d8 Author: Lokesh Vutla Date: Wed Jan 18 09:33:25 2017 +0530 ARM: dts: am57xx: Add stdout-path property Add stdout-path property in /chosen node so that earlycon can be used by just adding earlycon in bootargs. Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 4 ++++ arch/arm/boot/dts/am57xx-idk-common.dtsi | 4 ++++ 2 files changed, 8 insertions(+) commit 24a1eb45b47f24a45a615c210a3823ff0533f9f4 Author: Lokesh Vutla Date: Wed Jan 18 09:33:24 2017 +0530 ARM: dts: am43xx: Add stdout-path property Add stdout-path property in /chosen node so that earlycon can be used by just adding earlycon in bootargs. Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 4 ++++ arch/arm/boot/dts/am437x-idk-evm.dts | 4 ++++ arch/arm/boot/dts/am437x-sk-evm.dts | 4 ++++ arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++++ 4 files changed, 16 insertions(+) commit b763973a18f554d0cefbff983d8569cae69c1187 Author: Lokesh Vutla Date: Wed Jan 18 09:33:23 2017 +0530 ARM: dts: am33xx: Add stdout-path property Add stdout-path property in /chosen node so that earlycon can be used by just adding earlycon in bootargs. Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evm.dts | 4 ++++ arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++ arch/arm/boot/dts/am335x-icev2.dts | 4 ++++ 3 files changed, 12 insertions(+) commit 885658fd373611c3a0796f2f864989344dece9d5 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:36 2017 +0100 ARM: dts: am335x-sl50: Enable the Ambient Light Sensor. Add support for the ISL29023 ALS connected via the I2C bus. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 4340f9d7e093c88bfa0502bb0b6151997789adc0 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:35 2017 +0100 ARM: dts: am335x-sl50: Enable the MCP23017 GPIO Expander. Add support for the 16-Bit I/O Expander connected via the I2C bus. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 1d669a7128984a01927d50abe18df0d1909b3273 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:34 2017 +0100 ARM: dts: am335x-sl50: Enable BQ32000 Real Time Clock. Add support for the BQ32000 Real Time Clock connected to the I2C bus and disable the AM335x Real Time Clock. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f37f911b805e8d8b020aae4bc394be4f41609db0 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:33 2017 +0100 ARM: dts: am335x-sl50: Enable SPI0 interface and Flash Memory. Add support for the 32Mb Serial Flash Memory connected to SPI0 and using CS1. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e9c7bebed367e3af7c4226a7471f1cd7b87c17d3 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:32 2017 +0100 ARM: dts: am335x-sl50: Enable UART1. The UART1 is connected to the infrared (IR) receiver module, so enable it to be able to comunicate with it. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fd252312016e0e458a9338db206ad4be31eec932 Author: Enric Balletbo i Serra Date: Mon Jan 16 17:57:31 2017 +0100 ARM: dts: am335x-sl50: Remove I2C1 node. I2C1 is not used so remove it in order to avoid conflicts. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 13 ------------- 1 file changed, 13 deletions(-) commit 631af44c10f9430163296626c6134db16a4f51fb Author: Adam Ford Date: Fri Jan 20 10:44:01 2017 -0600 ARM: OMAP3: Fix SoC detection of OMAP36/37 Family The OMAP36/37 families are similar, but there are a few features sections that can help identify some of them. Let's add checks for 3630/3730, OMAP3621, DM3725, OMAP3615/DM3715, OMAP3611, and AM3703 all based on features similar to what was done for the OMAP34xx/35xx series The checkpatch flags some warnings for braces, but I kept the coding style to match the adjacent code for consistency. I don't have an OMAP36xx to test, but this was tested on both a DM3730 and AM3703. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/mach-omap2/id.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit bd5e444bf1dcea50b89b3555e85e895843a82f32 Author: Vignesh R Date: Wed Jan 18 17:18:07 2017 +0530 ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART According to the commit ca43ea345de9 ("ARM: OMAP2+: hwmod: Add a new flag to handle SIDLE in SWSUP only in active"), UART IP needs the sidle mode to be controlled in SW only while they are active. Once inactive, the IP needs to be put back in HW control so they are also wakeup capable. The flag HWMOD_SWSUP_SIDLE takes care of this. So add this flag to all instances of UART. With this change, 8250 UART now gives out proper RX Timeout interrupts and is usable as console. Signed-off-by: Vignesh R Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cc154783e71007b6d5d92dfe5dd7b6093496dfd1 Merge: e9f3a68 022d7ad Author: David S. Miller Date: Fri Jan 20 12:35:11 2017 -0500 Merge branch 'cpsw-common-res-usage' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: correct common res usage This series is intended to remove unneeded redundancies connected with common resource usage function. Since v1: - changed name to cpsw_get_usage_count() - added comments to open/closw for cpsw_get_usage_count() - added patch: net: ethernet: ti: cpsw: clarify ethtool ops changing num of descs Based on net-next/master ==================== Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit 022d7ad71dc50a6c255a68f7aa8e879615a29c4c Author: Ivan Khoronzhuk Date: Thu Jan 19 18:58:27 2017 +0200 net: ethernet: ti: cpsw: clarify ethtool ops changing num of descs After adding cpsw_set_ringparam ethtool op, better to carry out common parts of similar ops splitting descriptors in runtime. It allows to reuse these parts and shows what the ops actually do. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 132 ++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 73 deletions(-) commit fe734d0aa9e120a48999885355f08a99fcf45c77 Author: Ivan Khoronzhuk Date: Thu Jan 19 18:58:26 2017 +0200 net: ethernet: ti: cpsw: don't duplicate common res in rx handler No need to duplicate the same function in rx handler to get info if any interface is running. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit 03fd01ad0eead23eb79294b6fb4d71dcac493855 Author: Ivan Khoronzhuk Date: Thu Jan 19 18:58:25 2017 +0200 net: ethernet: ti: cpsw: don't duplicate ndev_running No need to create additional vars to identify if interface is running. So simplify code by removing redundant var and checking usage counter instead. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 176b0cbffdf3f240a19386635811034dfe0fc8ab Author: Ivan Khoronzhuk Date: Thu Jan 19 18:58:24 2017 +0200 net: ethernet: ti: cpsw: don't disable interrupts in ndo_open No need to disable interrupts if no open devices, they are disabled anyway. Even no need to disable interrupts if some ndev is opened, In this case shared resources are not touched, only parameters of ndev shell, so no reason to disable them also. Removed lines have proved it. So, no need in redundant check and interrupt disable. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 -- 1 file changed, 2 deletions(-) commit aafc93a3b6b033a698b528b39fa99fae9fc5299f Author: Ivan Khoronzhuk Date: Thu Jan 19 18:58:23 2017 +0200 net: ethernet: ti: cpsw: remove dual check from common res usage function Common res usage is possible only in case an interface is running. In case of not dual emac here can be only one interface, so while ndo_open and switch mode, only one interface can be opened, thus if open is called no any interface is running ... and no common res are used. So remove check on dual emac, it will simplify code/understanding and will match the name it's called. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) commit e9f3a685a2b7685a730d990b4e87248b513907a0 Merge: 264b87f 322dc6e Author: David S. Miller Date: Fri Jan 20 12:22:27 2017 -0500 Merge branch 'rxbusy' Mahesh Bandewar says: ==================== use netdev_is_rx_handler_busy() in few known cases netdev_rx_handler_register() was recently split into two parts - (a) check if the handler is used, (b) register the new handler, parts. This is helpful in scenarios like bonding where at the time of registration there is too much state to unwind and it should check if the device is free before building that state. IPvlan and macvlan drivers don't have this issue however it can make use of the same check instead of using a device specific check. ==================== Signed-off-by: David S. Miller commit 322dc6e067a15a17e66ce35338ca701f13c6422d Author: Mahesh Bandewar Date: Wed Jan 18 15:02:55 2017 -0800 macvlan: use netdev_is_rx_handler_busy instead of checking specific type netdev_is_rx_handler_busy() check is a superset of netif_is_ipvlan_port() check and hence should be preferred. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/macvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3262d9deccaa7e796b0145b2d26f53c0e2d178f Author: Mahesh Bandewar Date: Wed Jan 18 15:02:53 2017 -0800 ipvlan: use netdev_is_rx_handler_busy instead of checking specific type IPvlan checks if the master device is already used by checking a specific device (here it's macvlan device). This is technically not sufficient and it should just ensure the rx_handler is busy or not. This would be a super check that includes macvlan and any other that has already registered rx-handler. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b7cd0044e4a9f69aaf00511870b07fcdeda591d Author: Mahesh Bandewar Date: Wed Jan 18 15:02:49 2017 -0800 net: remove duplicate code. netdev_rx_handler_register() checks to see if the handler is already busy which was recently separated into netdev_is_rx_handler_busy(). So use the same function inside register() to avoid code duplication. Essentially this change should be a no-op Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller net/core/dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 264b87fa617e758966108db48db220571ff3d60e Author: Andrew Collins Date: Wed Jan 18 14:04:28 2017 -0700 fq_codel: Avoid regenerating skb flow hash unless necessary The fq_codel qdisc currently always regenerates the skb flow hash. This wastes some cycles and prevents flow seperation in cases where the traffic has been encrypted and can no longer be understood by the flow dissector. Change it to use the prexisting flow hash if one exists, and only regenerate if necessary. Signed-off-by: Andrew Collins Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_fq_codel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1f6cc07e170364212b6d81321f79f166089a60d9 Author: Lance Richardson Date: Wed Jan 18 15:24:57 2017 -0500 vxlan: preserve type of dst_port parm for encap_bypass_if_local() Eliminate sparse warning by maintaining type of dst_port as __be16. Signed-off-by: Lance Richardson Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22fbece133b71895ca6bb66890b2d9b1ddaa908c Author: Lance Richardson Date: Wed Jan 18 15:14:56 2017 -0500 csum: eliminate sparse warning in remcsum_unadjust() Cast second parameter of csum_sub() from __sum16 to __wsum. Signed-off-by: Lance Richardson Signed-off-by: David S. Miller include/net/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d00e20221f5007cc48a45d9706622df03cf8844 Merge: a5e8c07 01fd12b Author: David S. Miller Date: Fri Jan 20 12:10:17 2017 -0500 Merge branch 'tipc-multicast-through-replication' Jon Maloy says: ==================== tipc: emulate multicast through replication TIPC multicast messages are currently distributed via L2 broadcast or IP multicast to all nodes in the cluster, irrespective of the number of real destinations of the message. In this series we introduce an option to transport messages via replication ("replicast") across a selected number of unicast links, instead of relying on the underlying media. This option is used when true broadcast/multicast is not supported by the media, or when the number of true destinations is much smaller than the cluster size. ==================== Signed-off-by: David S. Miller commit 01fd12bb189a0772301dd37e9b31e53761269a1b Author: Jon Paul Maloy Date: Wed Jan 18 13:50:53 2017 -0500 tipc: make replicast a user selectable option If the bearer carrying multicast messages supports broadcast, those messages will be sent to all cluster nodes, irrespective of whether these nodes host any actual destinations socket or not. This is clearly wasteful if the cluster is large and there are only a few real destinations for the message being sent. In this commit we extend the eligibility of the newly introduced "replicast" transmit option. We now make it possible for a user to select which method he wants to be used, either as a mandatory setting via setsockopt(), or as a relative setting where we let the broadcast layer decide which method to use based on the ratio between cluster size and the message's actual number of destination nodes. In the latter case, a sending socket must stick to a previously selected method until it enters an idle period of at least 5 seconds. This eliminates the risk of message reordering caused by method change, i.e., when changes to cluster size or number of destinations would otherwise mandate a new method to be used. Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 6 +++-- net/tipc/bcast.c | 62 ++++++++++++++++++++++++++++++++++++++++++----- net/tipc/bcast.h | 17 ++++++++++++- net/tipc/link.c | 4 +++ net/tipc/node.h | 4 ++- net/tipc/socket.c | 36 +++++++++++++++++++++------ 6 files changed, 112 insertions(+), 17 deletions(-) commit a853e4c6d0843729e1f25a7a7beff168e1dd7420 Author: Jon Paul Maloy Date: Wed Jan 18 13:50:52 2017 -0500 tipc: introduce replicast as transport option for multicast TIPC multicast messages are currently carried over a reliable 'broadcast link', making use of the underlying media's ability to transport packets as L2 broadcast or IP multicast to all nodes in the cluster. When the used bearer is lacking that ability, we can instead emulate the broadcast service by replicating and sending the packets over as many unicast links as needed to reach all identified destinations. We now introduce a new TIPC link-level 'replicast' service that does this. Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 105 ++++++++++++++++++++++++++++++++++++++++++------------ net/tipc/bcast.h | 3 +- net/tipc/link.c | 8 ++++- net/tipc/msg.c | 17 +++++++++ net/tipc/msg.h | 9 +++-- net/tipc/node.c | 27 +++++++++----- net/tipc/socket.c | 27 +++++++++----- 7 files changed, 149 insertions(+), 47 deletions(-) commit 2ae0b8af1fe35ddaa2e46704ae31a2f9cac0349d Author: Jon Paul Maloy Date: Wed Jan 18 13:50:51 2017 -0500 tipc: add functionality to lookup multicast destination nodes As a further preparation for the upcoming 'replicast' functionality, we add some necessary structs and functions for looking up and returning a list of all nodes that host destinations for a given multicast message. Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 33 +++++++++++++++++++++++++++++++-- net/tipc/bcast.h | 15 ++++++++++++++- net/tipc/name_table.c | 38 +++++++++++++++++++++++++++++++++----- net/tipc/name_table.h | 9 +++++++++ 4 files changed, 87 insertions(+), 8 deletions(-) commit 9999974a8318b605ebae08a87e86232659e56a52 Author: Jon Paul Maloy Date: Wed Jan 18 13:50:50 2017 -0500 tipc: add function for checking broadcast support in bearer As a preparation for the 'replicast' functionality we are going to introduce in the next commits, we need the broadcast base structure to store whether bearer broadcast is available at all from the currently used bearer or bearers. We do this by adding a new function tipc_bearer_bcast_support() to the bearer layer, and letting the bearer selection function in bcast.c use this to give a new boolean field, 'bcast_support' the appropriate value. Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 12 +++++++++--- net/tipc/bearer.c | 15 ++++++++++++++- net/tipc/bearer.h | 8 +++++++- net/tipc/udp_media.c | 8 ++++---- 4 files changed, 34 insertions(+), 9 deletions(-) commit a5e8c07059d0f0b31737408711d44794928ac218 Author: Gianluca Borello Date: Wed Jan 18 17:55:49 2017 +0000 bpf: add bpf_probe_read_str helper Provide a simple helper with the same semantics of strncpy_from_unsafe(): int bpf_probe_read_str(void *dst, int size, const void *unsafe_addr) This gives more flexibility to a bpf program. A typical use case is intercepting a file name during sys_open(). The current approach is: SEC("kprobe/sys_open") void bpf_sys_open(struct pt_regs *ctx) { char buf[PATHLEN]; // PATHLEN is defined to 256 bpf_probe_read(buf, sizeof(buf), ctx->di); /* consume buf */ } This is suboptimal because the size of the string needs to be estimated at compile time, causing more memory to be copied than often necessary, and can become more problematic if further processing on buf is done, for example by pushing it to userspace via bpf_perf_event_output(), since the real length of the string is unknown and the entire buffer must be copied (and defining an unrolled strnlen() inside the bpf program is a very inefficient and unfeasible approach). With the new helper, the code can easily operate on the actual string length rather than the buffer size: SEC("kprobe/sys_open") void bpf_sys_open(struct pt_regs *ctx) { char buf[PATHLEN]; // PATHLEN is defined to 256 int res = bpf_probe_read_str(buf, sizeof(buf), ctx->di); /* consume buf, for example push it to userspace via * bpf_perf_event_output(), but this time we can use * res (the string length) as event size, after checking * its boundaries. */ } Another useful use case is when parsing individual process arguments or individual environment variables navigating current->mm->arg_start and current->mm->env_start: using this helper and the return value, one can quickly iterate at the right offset of the memory area. The code changes simply leverage the already existent strncpy_from_unsafe() kernel function, which is safe to be called from a bpf program as it is used in bpf_trace_printk(). Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 15 ++++++++++++++- kernel/trace/bpf_trace.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) commit 0760462860f3e4b04ffd5addafb9c0cc571fbddf Merge: 6c59ebd 9af15c3 Author: David S. Miller Date: Fri Jan 20 11:43:17 2017 -0500 Merge branch 'bus-agnostic-num-vf' Phil Sutter says: ==================== Retrieve number of VFs in a bus-agnostic way Previously, it was assumed that only PCI NICs would be capable of having virtual functions - with my proposed enhancement of dummy NIC driver implementing (fake) ones for testing purposes, this is no longer true. Discussion of said patch has led to the suggestion of implementing a bus-agnostic method for VF count retrieval so rtnetlink could work with both real VF-capable PCI NICs as well as my dummy modifications without introducing ugly hacks. The following series tries to achieve just that by introducing a bus type callback to retrieve a device's number of VFs, implementing this callback for PCI bus and finally adjusting rtnetlink to make use of the generalized infrastructure. ==================== Signed-off-by: David S. Miller commit 9af15c38254d81c9991eba89335ca7c537d7f2c3 Author: Phil Sutter Date: Wed Jan 18 14:04:39 2017 +0100 device: Implement a bus agnostic dev_num_vf routine Now that pci_bus_type has num_vf callback set, dev_num_vf can be implemented in a bus type independent way and the check for whether a PCI device is being handled in rtnetlink can be dropped. Signed-off-by: Phil Sutter Signed-off-by: David S. Miller include/linux/device.h | 7 +++++++ include/linux/pci.h | 2 -- net/core/rtnetlink.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) commit 02e0bea6c83c657617195135667e6a3f50d3bfb3 Author: Phil Sutter Date: Wed Jan 18 14:04:38 2017 +0100 PCI: implement num_vf bus type callback Signed-off-by: Phil Sutter Signed-off-by: David S. Miller drivers/pci/pci-driver.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 582a686f52d2e002da64093fe4b9aa5befcaf4e4 Author: Phil Sutter Date: Wed Jan 18 14:04:37 2017 +0100 device: bus_type: Introduce num_vf callback This allows for bus types to implement their own method of retrieving the number of virtual functions a NIC on that type of bus supports. Signed-off-by: Phil Sutter Signed-off-by: David S. Miller include/linux/device.h | 4 ++++ 1 file changed, 4 insertions(+) commit 3e278c0dc1cf5070d9462ececde1c07369b469b2 Author: Namhyung Kim Date: Fri Jan 20 11:44:45 2017 +0900 ftrace: Factor out __ftrace_hash_move() The __ftrace_hash_move() is to allocates properly-sized hash and move entries in the src ftrace_hash. It will be used to set function graph filters which has nothing to do with the dyn_ftrace records. Link: http://lkml.kernel.org/r/20170120024447.26097-1-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 0ecac9f312f4e974614be5a9f56af2c8e892c897 Author: Kefeng Wang Date: Wed Jan 18 13:57:10 2017 +0800 arm: hisi: drop extern hip01_cpu_die Since the hip01 doesn't support cpu hotplug now, and doesn't implement the hip01_cpu_die function, drop the declaration. Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm/mach-hisi/core.h | 1 - 1 file changed, 1 deletion(-) commit 6c59ebd356ff2ca64cdf1f61c5fe17f6fa8fc045 Author: Geliang Tang Date: Fri Jan 20 22:27:04 2017 +0800 sock: use hlist_entry_safe Use hlist_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller include/net/sock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1da6de33e43901ec5220cbf292d71172635ada67 Author: Marek Szyprowski Date: Thu Jan 19 14:48:43 2017 +0100 soc: samsung: pmu: Remove messages for failed memory allocation Memory subsystem already prints message about failed memory allocation, there is no need to do it in the driver. Signed-off-by: Marek Szyprowski Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/exynos-pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0e3fa7a7acdd5f6ec89b3692276e35006c06fb92 Author: Jiri Olsa Date: Fri Jan 20 10:20:30 2017 +0100 perf hists browser: Add e/c hotkeys to expand/collapse callchain for current entry Currently we allow only to expand or collapse all entries in the browser with 'E' or 'C' keys. Allow user to expand or collapse only current entry in the browser with e or c key. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1484904032-11040-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ec7cc5b15ecc919e3d8c986a528bcc8fb8d76e8a Author: Marek Szyprowski Date: Thu Jan 19 14:48:42 2017 +0100 soc: samsung: pmu: Use of_device_get_match_data helper Replace custom code with generic helper to retrieve driver data. Signed-off-by: Marek Szyprowski Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/exynos-pmu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c10aa71b9d823603306a3bcd19f6c584bdf14ef7 Author: Jakub Sitnicki Date: Fri Jan 20 14:53:06 2017 +0100 gre6: Clean up unused struct ipv6_tel_txoption definition Commit b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common GRE functions") removed the ip6gre specific transmit function, but left the struct ipv6_tel_txoption definition. Clean it up. Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 5 ----- 1 file changed, 5 deletions(-) commit 76640b84bd7a9d68c70d8bc8ecd02cdc4bd8855e Author: Marek Szyprowski Date: Thu Jan 19 14:48:41 2017 +0100 soc: samsung: pmu: Provide global function to get PMU regmap PMU is something like a SoC wide service, so add a helper function to get PMU regmap. This will be used by other Exynos device drivers. This way it can be avoided to model this dependency in device tree (as phandles to PMU node) for almost every device in the SoC. Signed-off-by: Marek Szyprowski Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski drivers/soc/samsung/exynos-pmu.c | 11 +++++++++++ include/linux/soc/samsung/exynos-pmu.h | 10 ++++++++++ 2 files changed, 21 insertions(+) commit c2a2efbbfcb31bedcf81170fc1aa920255c33b8f Author: Eric Dumazet Date: Fri Jan 20 05:06:08 2017 -0800 net: remove bh disabling around percpu_counter accesses Shaohua Li made percpu_counter irq safe in commit 098faf5805c8 ("percpu_counter: make APIs irq safe") We can safely remove BH disable/enable sections around various percpu_counter manipulations. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/dst_ops.h | 9 +-------- include/net/inet_frag.h | 8 +------- net/ipv4/inet_connection_sock.c | 3 +-- net/ipv4/proc.c | 2 -- net/ipv4/tcp.c | 2 -- net/ipv4/tcp_ipv4.c | 2 -- 6 files changed, 3 insertions(+), 23 deletions(-) commit 0a327889f64619ac3ec886208644191cd87de525 Author: Arnd Bergmann Date: Wed Jan 18 15:52:51 2017 +0100 cxgb4: hide unused warnings The two new variables are only used inside of an #ifdef and cause harmless warnings when that is disabled: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c: In function 'init_one': drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4646:9: error: unused variable 'port_vec' [-Werror=unused-variable] drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4646:6: error: unused variable 'v' [-Werror=unused-variable] This adds another #ifdef around the declarations. Fixes: 96fe11f27b70 ("cxgb4: Implement ndo_get_phys_port_id for mgmt dev") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 0f84832fb8f92b06f5e9b33d56836acb340dac53 Author: Kefeng Wang Date: Wed Jan 18 13:57:19 2017 +0800 arm64: defconfig: Enable NUMA and NUMA_BALANCING Since much more arm64 SoCs with numa nodes, it's better to enable NUMA and NUMA_BALANCING to improve the performance on test. Cc: Arnd Bergmann Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 70f36b6001bf596eb411c4b302e84c4824ae8730 Author: Jens Axboe Date: Thu Jan 19 10:59:07 2017 -0700 blk-mq: allow resize of scheduler requests Add support for growing the tags associated with a hardware queue, for the scheduler tags. Currently we only support resizing within the limits of the original depth, change that so we can grow it as well by allocating and replacing the existing scheduler tag set. This is similar to how we could increase the software queue depth with the legacy IO stack and schedulers. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq-tag.c | 51 ++++++++++++++++++++++++++++++++++++++++++++------- block/blk-mq-tag.h | 4 +++- block/blk-mq.c | 19 ++++++++++++++----- 3 files changed, 61 insertions(+), 13 deletions(-) commit e2d2cfac441607814abb66a36d18c85f58bd88e7 Author: Zhou Wang Date: Mon Jan 9 19:50:46 2017 +0800 arm64: defconfig: enable SMMUv3 config Signed-off-by: Zhou Wang Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit cd6111b26280a2f38a9fb8e6630c63a96477e4bf Author: Arnaud Pouliquen Date: Tue Jan 3 16:52:52 2017 +0100 ASoC: hdmi-codec: add channel mapping control Add user interface to provide channel mapping. In a first step this control is read only. As TLV type, the control provides all configuration available for HDMI sink(ELD), and provides current channel mapping selected by codec based on ELD and number of channels specified by user on open. When control is called before the number of the channel is specified (i.e. hw_params is set), it returns all channels set to UNKNOWN. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 380 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 379 insertions(+), 1 deletion(-) commit 25f7b701c20db3e9ae09e28dd652949bd977e5cd Author: Arnaud Pouliquen Date: Tue Jan 3 16:52:51 2017 +0100 ASoC: core: add optional pcm_new callback for DAI driver During probe, DAIs can need to perform some actions that requests the knowledge of the pcm runtime handle. The callback is called during DAIs linking, after PCM device creation. For instance this can be used to add relationship between a DAI pcm control and the pcm device. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown include/sound/soc-dai.h | 3 +++ sound/soc/soc-core.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit c82dbe5c055e4d246bd07c4d7b24801c9445c241 Author: Arnaud Pouliquen Date: Tue Jan 3 16:52:50 2017 +0100 DRM: add help to get ELD speaker allocation Add helper to allow users to retrieve the speaker allocations without knowledge of the ELD structure. Signed-off-by: Arnaud Pouliquen Reviewed-by: Jani Nikula Signed-off-by: Mark Brown include/drm/drm_edid.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 20422a0c2956e67f15da5b589a93a14611a4087b Author: Marek Szyprowski Date: Fri Jan 20 07:56:53 2017 +0100 arm64: dts: exynos: Disable pull down for audio pins in Exynos5433 SoCs Common definition for I2S, PMC, SPDIF buses should not define any pull control for the individual pins. Correct this by changing samsung,pin-pud property to EXYNOS_PIN_PULL_NONE like it is defined for other Exynos SoCs. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aaf0f2fa682861e47a4f6a8762d2b8a9a4a51077 Author: Eric Dumazet Date: Fri Jan 20 06:34:22 2017 -0800 percpu_counter: percpu_counter_hotcpu_callback() cleanup In commit ebd8fef304f9 ("percpu_counter: make percpu_counters_lock irq-safe") we disabled irqs in percpu_counter_hotcpu_callback() We can grab every counter spinlock without having to disable irqs again. Signed-off-by: Eric Dumazet Cc: Tejun Heo Signed-off-by: Tejun Heo lib/percpu_counter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 994261dc8f3dfcd19feecafae3040e932c8f90cf Author: Greg Kroah-Hartman Date: Fri Jan 20 16:02:19 2017 +0100 devicetree: sort the Garmin vendor prefix properly. The addition of Garmin put it in the incorrect place. This fixes that issue. Reported-by: Stephen Rothwell Fixes: 9b27c270d403 ("devicetree: add Garmin vendor prefix") Cc: Rob Herring Cc: Matt Ranostay Cc: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Documentation/devicetree/bindings/vendor-prefixes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d193c169149abb1c54e4e969e78600ae75141e36 Author: Dennis Chen Date: Thu Jan 19 06:32:10 2017 -0500 HID: whitespace cleanup Removes trailing whitespace in hid-core.c and usbhid/hid-quirks.c Signed-off-by: Dennis Chen Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- drivers/hid/usbhid/hid-quirks.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0a76ac80e84d0be0aba24ab60ac3bc14bc49bbc9 Author: Dennis Chen Date: Thu Jan 19 06:32:09 2017 -0500 HID: multitouch: enable Surface 3 Type Cover Pro to report multitouch data Nearly identical to the previous set of patches related to Microsoft Surface Keyboards. Removes Surface Pro 3 generation TypeCover support from hid-microsoft so proper multitouch data can be reported from the touchpad. Signed-off-by: Dennis Chen Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 8 +------- drivers/hid/hid-ids.h | 3 --- drivers/hid/hid-microsoft.c | 6 ------ drivers/hid/usbhid/hid-quirks.c | 3 --- 4 files changed, 1 insertion(+), 19 deletions(-) commit a4e6964a78946bf3ce969d9fef5f201e0236f0ea Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32429i-eval This patch enables RTC on stm32429i-eval with default LSE clock source. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 3709e0ce191f4a6681d730c28d43e6eecd0e3136 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32f469-disco This patch enables RTC on stm32f469-disco with default LSE clock source. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 8cc12f2668a3d63f2503a1fce34483cb45dfa7a6 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32f429-disco This patch enables RTC on stm32f429-disco with LSI as clock source because X2 crystal for LSE is not fitted by default. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429-disco.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 5e6ec1b58c7b15fa0496938edc3d3a10d22cdef7 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: Add RTC support for STM32F429 MCU This patch adds STM32 RTC bindings for STM32F429. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8867295da3934ba637580df2fd1f7b4f6783deeb Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f429 This patch set HSE_RTC clock frequency to 1 MHz, as the clock supplied to the RTC must be 1 MHz. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 2da751b09ac47dfc213cf2eea6e15b5c45b67aba Author: Gabriel Fernandez Date: Tue Dec 13 15:20:00 2016 +0100 ARM: dts: stm32: Include auxiliary stm32fx clock definition This patch include auxiliary clock definition (clocks which are not derived from system clock. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 1 + 1 file changed, 1 insertion(+) commit 305b0495e404a080a0330717be50e75f7dbf26c4 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:00 2016 +0100 ARM: dts: stm32: Add external I2S clock on stm32f429 MCU This patch adds an external I2S clock in the DT. The I2S clock could be derived from an external I2S clock or by I2S pll. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7465d81191a12f0896d121f319da702580739433 Author: Fabrice GASNIER Date: Mon Jan 9 14:08:32 2017 +0100 ARM: dts: stm32: enable ADC on stm32f429i-eval board Enable analog to digital converter on stm32f429i-eval board. It has on-board potentimeter wired to ADC3 in8 analog pin and uses fixed regulator to provide reference voltage. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ee58bfa158d45d9583e479e16b1c63c6e38607fb Author: Fabrice GASNIER Date: Fri Dec 2 14:57:00 2016 +0100 ARM: dts: stm32: Add ADC support to stm32f429 Add ADC support & pinctrl analog phandle (adc3_in8) to stm32f429. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 872c87f0ea925ba63a277fce7c3efb15241f6bab Author: Bruno Meirelles Herrera Date: Fri Nov 18 16:10:00 2016 +0100 ARM: dts: stm32: Add missing USART3 pin config to stm32f469-disco board This patch adds USART3 pin configuration on PB10/PA11 pins for STM32F469I-DISCO board. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 13 +++++++++++++ arch/arm/boot/dts/stm32f469-disco.dts | 2 ++ 2 files changed, 15 insertions(+) commit 38b3200f866646afde0cab2fed309ecdae73e836 Author: Bruno Herrera Date: Fri Nov 18 15:58:00 2016 +0100 ARM: dts: stm32: Fix memory size from 8MB to 16MB on stm32f469-disco board This patch fix memory size to support 16MB of external SDRAM. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e27a236312c4ab6dc8dbd303552b771d3569cf1 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:59 2017 -0700 Drivers: hv: vmbus: Cleanup hyperv_vmbus.h Get rid of all unused definitions. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hyperv_vmbus.h | 152 +--------------------------------------------- 1 file changed, 2 insertions(+), 150 deletions(-) commit 37e11d5c7052a5ca55ef807731c75218ea341b4c Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:58 2017 -0700 Drivers: hv: vmbus: Define an APIs to manage interrupt state As part of cleaning up architecture specific code, define APIs to manage interrupt state. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 3 +++ drivers/hv/hv.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 7297ff0ca9db7e2d830841035b95d8b94b529142 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:57 2017 -0700 Drivers: hv: vmbus: Define an API to retrieve virtual processor index As part of cleaning up architecture specific code, define an API to retrieve the virtual procesor index. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 2 ++ drivers/hv/hv.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 06d1d98a839f196e94cb726008fb2118e430f356 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:56 2017 -0700 Drivers: hv: vmbus: Define APIs to manipulate the synthetic interrupt controller As part of cleaning up architecture specific code, define APIs to manipulate the interrupt controller state. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 3 +++ drivers/hv/hv.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit 8e307bf82d76ab02e95a00d132d926f04db6ccab Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:55 2017 -0700 Drivers: hv: vmbus: Define APIs to manipulate the event page As part of cleaning up architecture specific code, define APIs to manipulate the event page. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 3 +++ drivers/hv/hv.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit 155e4a2f28a59e5344dfa7c5d003161fe59a5bf2 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:54 2017 -0700 Drivers: hv: vmbus: Define APIs to manipulate the message page As part of cleaning up architecture specific code, define APIs to manipulate the message page. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 3 +++ drivers/hv/hv.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit d383877db60bcc7fd02d1051a90e078d731dfb59 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:53 2017 -0700 Drivers: hv: vmbus: Get rid of an unsused variable The version variable while it is initialized is not used; get rid of it. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 4 ---- 1 file changed, 4 deletions(-) commit 232aa35e1b68265aecfd79dc1228eabb4cfe29cc Merge: 7ce7d89 f8b5036 Author: Alexandre TORGUE Date: Fri Jan 20 14:48:23 2017 +0100 Merge commit 'f8b5036361412a27c07a4ac9c3a4b80678cbd1e1' into stm32-dt-for-v4.11 commit 305f7549c9298247723c255baddb7a54b4e63050 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:52 2017 -0700 Drivers: hv: util: Use hv_get_current_tick() to get current tick As part of the effort to interact with Hyper-V in an instruction set architecture independent way, use the new API to get the current tick. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d5116b4091ecca271c249ede43a49c1245920558 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:51 2017 -0700 Drivers: hv: vmbus: Restructure the clockevents code Move the relevant code that programs the hypervisor to an architecture specific file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 4 ++++ drivers/hv/hv.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) commit e810e48c0c9a1a1ebb90cfe966bce6dc80ce08e7 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:50 2017 -0700 Drivers: hv: vmbus: Move the code to signal end of message As part of the effort to separate out architecture specific code, move the code for signaling end of message. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 37 +++++++++++++++++++++++++++++++++++++ drivers/hv/channel_mgmt.c | 1 + drivers/hv/hyperv_vmbus.h | 35 ----------------------------------- 3 files changed, 38 insertions(+), 35 deletions(-) commit 73638cddaad861a5ebb2b119d8b318d4bded8f8d Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:49 2017 -0700 Drivers: hv: vmbus: Move the check for hypercall page setup As part of the effort to separate out architecture specific code, move the check for detecting if the hypercall page is setup. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 15 +++++++++++++++ arch/x86/include/asm/mshyperv.h | 1 + drivers/hv/hv.c | 7 +------ 3 files changed, 17 insertions(+), 6 deletions(-) commit d058fa7e98ff01a4b4750a2210fc19906db3cbe1 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:48 2017 -0700 Drivers: hv: vmbus: Move the crash notification function As part of the effort to separate out architecture specific code, move the crash notification function. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 26 ++++++++++++++++++++++++++ arch/x86/include/asm/mshyperv.h | 1 + arch/x86/include/uapi/asm/hyperv.h | 8 ++++++++ drivers/hv/hyperv_vmbus.h | 10 ---------- drivers/hv/vmbus_drv.c | 25 ------------------------- 5 files changed, 35 insertions(+), 35 deletions(-) commit 8de8af7e0873c4fdac2205327dff922819e16657 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:47 2017 -0700 Drivers: hv: vmbus: Move the extracting of Hypervisor version information As part of the effort to separate out architecture specific code, extract hypervisor version information in an architecture specific file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 19 ++++++++++++++++ arch/x86/kernel/cpu/mshyperv.c | 20 +++++++++++++++++ drivers/hv/connection.c | 7 ++---- drivers/hv/hv.c | 49 ----------------------------------------- drivers/hv/hyperv_vmbus.h | 27 ----------------------- 5 files changed, 41 insertions(+), 81 deletions(-) commit 63ed4e0c67df332681ebfef6eca6852da28d6300 Author: K. Y. Srinivasan Date: Thu Jan 19 11:51:46 2017 -0700 Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code As part of the effort to separate out architecture specific code, consolidate all Hyper-V specific clocksource code to an architecture specific code. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 105 ++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/mshyperv.h | 12 +++++ arch/x86/kernel/cpu/mshyperv.c | 23 --------- drivers/hv/hv.c | 95 ------------------------------------ drivers/hv/hyperv_vmbus.h | 8 --- 5 files changed, 117 insertions(+), 126 deletions(-) commit aa75941ca1de08e876ec21f7eaf390a5de62519f Author: Vignesh R Date: Fri Jan 20 13:46:54 2017 +0530 serial: 8250_omap: Remove rx_dma_broken flag 8250 UART DMA support was marked broken by default as it was not possible to pause ongoing RX DMA transfer. Now that both SDMA and EDMA can support pause operation for RX DMA transactions, don't set rx_dma_broken to true by default. With this patch 8250_omap driver will use DMA by default. Signed-off-by: Vignesh R Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 5 ----- 1 file changed, 5 deletions(-) commit b6ffcf21082300519bc4f9c3d24f61207cc9eae4 Author: Vignesh R Date: Fri Jan 20 13:46:53 2017 +0530 serial: 8250_omap: Add OMAP_DMA_TX_KICK quirk for AM437x UART uses as EDMA as dma engine on AM437x SoC and therefore, requires OMAP_DMA_TX_KICK quirk just like AM33xx. So, enable OMAP_DMA_TX_KICK quirk for AM437x platform as well. While at that, drop use of of_machine_is_compatible() and instead pass quirks via device data. Signed-off-by: Vignesh R Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 75f54acc086940ccef8b6d67ba8537529bda104c Author: Vignesh R Date: Fri Jan 20 13:46:52 2017 +0530 serial: 8250_omap: pause DMA only if DMA transfer in progress It is possible that DMA transfer is already complete but, completion handler is yet to be called, when dmaengine_pause() is called in case of error condition(like break/rx timeout). This leads to dmaengine_pause() API to return EINVAL (as descriptor is already NULL) causing rx_dma_broken flag to be set and effectively disabling RX DMA. Fix this by calling dmaengine_pause() only when transfer is in progress. Signed-off-by: Vignesh R Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 669c256cb9fb29a540ce4befb4328d88c665e523 Author: Alexander Usyskin Date: Fri Jan 20 02:17:17 2017 +0200 mei: make mei_cl_set_disconnected static mei_cl_set_disconnected is used only in client.c, so make it local to the file and mark static. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 2 +- drivers/misc/mei/client.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 29fe7d59bdd8cea561187fca155dbf5cee918bb8 Author: Alexander Usyskin Date: Fri Jan 20 02:17:16 2017 +0200 mei: make mei_io_list_flush static mei_io_list_flush is used only in client.c so make it local to the file and mark static. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 2 +- drivers/misc/mei/client.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit bb9fdbfdaae8870086787f76e6f890c53dbf36e8 Author: Abdul Rauf Date: Fri Jan 20 00:35:19 2017 +0000 staging: skein: fix checkpatch block comments warning Fix the following warnings: Block comments should align the * on each line Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/skein/skein_base.h | 112 +++++++++++++++++++----------------- drivers/staging/skein/skein_block.c | 32 ++++++----- drivers/staging/skein/skein_block.h | 20 ++++--- drivers/staging/skein/skein_iv.h | 24 ++++---- 4 files changed, 99 insertions(+), 89 deletions(-) commit f6fa11a35c548a516a41ce1669d0dbcdaabb267f Author: Sandeep Tayal Date: Wed Jan 18 21:34:41 2017 +0530 ASoC: hdac_hdmi: use audio component framework to read ELD With codec read sometimes the pin_sense shows invalid monitor present and eld_valid. Currently driver polls for few times to get the valid eld data. To avoid the latency, Instead of reading ELD from codec, read it directly from the display driver using audio component framework. and removed the unused direct codec helper functions. Signed-off-by: Sandeep Tayal Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 201 ++++++++++++------------------------------- 1 file changed, 56 insertions(+), 145 deletions(-) commit ce8f45370e118fb6d5fe820b97558b9e2e2fece5 Author: Tang Yuantian Date: Fri Jan 20 14:59:36 2017 +0800 ahci: qoriq: added ls2088a platforms support Ls2088a is new introduced arm-based soc with sata support with following features: 1. Complies with the serial ATA 3.0 specification and the AHCI 1.3.1 specification 2. Contains a high-speed descriptor-based DMA controller 3. Supports the following: a. Speeds of 1.5 Gb/s (first-generation SATA), 3 Gb/s (second-generation SATA), and 6 Gb/s (third-generation SATA) b. FIS-based switching c. Native command queuing (NCQ) commands d. Port multiplier operation e. Asynchronous notification f. SATA BIST mode Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 01f2901a264d954d3985e8bce1bf637ae52d4918 Author: Tang Yuantian Date: Fri Jan 20 14:59:35 2017 +0800 ahci: qoriq: report error when ecc register address is missing in dts For ls1021a, and armv8 chasis 2 socs, sata ecc must be disabled. If ecc register is not found in sata node in dts, report error. This is a chip erratum described as bellow: The Read DMA operations get early termination indication from the controller. This issue is observed as CRC error in the status registers. The issue is due to address collision at address 0 in the dual port memory. The read is a dummy read to flush out the header, but due to collision the controller logs the mbit error reported by the ECC check logic. This results in the early termination of the Read DMA operation by the controller. The issue happens to all the interface speeds(GEN1/2/3) for all the products. Workaround: Disable ECC feature on those platforms. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 386dc3b87a04fe4929bc3afb83660f050a5a0faa Author: Tang Yuantian Date: Fri Jan 20 14:59:34 2017 +0800 ahci: qoriq: added a condition to enable dma coherence Enable DMA coherence in SATA controller on condition that dma-coherent property exists in sata node in DTS. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 07254d835dfc1e06a8cdfb565e7371176a4b93f9 Author: Jacopo Mondi Date: Thu Dec 1 23:14:12 2016 +0100 pinctrl: sh-pfc: r8a7791: Add ADI pinconf support Add pin configuration support for Gyro-ADC, named ADI on r8a7791 SoC. Signed-off-by: Jacopo Mondi Tested-by: Marek Vasut Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 639467c8f26d834c934215e8b59129ce442475fe Author: Linus Walleij Date: Fri Jan 20 14:07:52 2017 +0100 ASoC: dapm: fix some pointer error handling commit 66feeec9322132689d42723df2537d60f96f8e44 "RFC: ASoC: dapm: handle probe deferrals" forgot a to update some two sites where the call was used. The static codechecks quickly found them. Reported-by: Dan Carpenter Fixes: 66feeec93221 ("RFC: ASoC: dapm: handle probe deferrals") Signed-off-by: Linus Walleij Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b33f922651011effafec4508474e8591569a3e98 Author: Jiri Olsa Date: Fri Jan 20 10:20:29 2017 +0100 perf hists browser: Put hist_entry folding logic into single function It will be used in following patch to expand or collapse only the current browser entry. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1484904032-11040-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 43 ++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit 1bd92af877abfeddcc4b83a35482ed4139591acf Author: Marcus Cooper Date: Thu Jan 19 20:52:58 2017 +0100 ASoC: sun4i-spdif: Add support for the H3 SoC The H3 SoC uses the same SPDIF block as found in earlier SoCs, but its TXFIFO is mapped to another address. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cb5c978f9a56c459d5f13901efcfe44b97c4182d Author: Marcus Cooper Date: Thu Jan 19 20:52:57 2017 +0100 ASoC: sunxi: Add bindings for sun8i to SPDIF The H3 SoC uses the same SPDIF block as found in earlier SoCs, but the transmit fifo is at a different address. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt | 1 + 1 file changed, 1 insertion(+) commit 826e83de58e3bb243b154380837c6506a0575395 Author: Kuninori Morimoto Date: Fri Jan 20 04:23:29 2017 +0000 ASoC: rsnd: fixup for_each_rsnd_mod_array{s} iterator increment commit 5f222a292 ("ASoC: rsnd: use for_each_rsnd_mod_xxx() ...") modifies rsnd_dai_call() to use for_each_rsnd_mod_arrays(). Current rsnd is incrementing iterator in rsnd_mod_next(), but the iterator will indicate +1 position in for_each loop in this case. Incremental position should be inside for() Reported-by: Hoan Nguyen An Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 -- sound/soc/sh/rcar/rsnd.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 685db57ace04411387b33e607d6abde9763819e7 Author: David Lechner Date: Fri Jan 13 14:00:12 2017 -0600 ARM: davinci_all_defconfig: enable iio This enables the iio subsystem. This will be used by LEGO MINDSTORMS EV3, which has an ADS7957 chip. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4302a38ef6f1ebdbdec886bcc7b2d27654e50aea Author: David Lechner Date: Fri Jan 13 13:03:42 2017 -0600 ARM: dts: Add LEGO MINDSTORMS EV3 dts This adds a device tree definition file for LEGO MINDSTORMS EV3. What is working: * Pin muxing * Pinconf * GPIOs * MicroSD card reader * UART on input port 1 * Buttons * LEDs * Poweroff/reset * Flash memory * EEPROM * USB host port * USB peripheral port What is not working/to be added later: * Speaker - have patch submitted to get pwm-beeper working - maybe someday it will have a real sound driver that uses PRU * A/DC chip - have driver submitted and accepted - waiting for ack on device tree bindings * Display - waiting for "simple DRM" to be mainlined * Bluetooth - needs new driver for sequencing power/enable/clock * Input and output ports - need some sort of new phy or extcon driver as well as PRU UART and PRU I2C drivers * Battery indication - needs new power supply driver Note on flash partitions: These partitions are based on the official EV3 firmware from LEGO. It is expected that most users of the mainline kernel on EV3 will be booting from an SD card while retaining the official firmware in the flash memory. Furthermore, the official firmware uses an ancient U-Boot (2009) that has no device tree support. So, it makes sense to have this partition table in the EV3 device tree file. In the unlikely case that anyone does create their own firmware image with different partitioning, they can use a modern U-Boot in their own firmware image that modifies the device tree with the custom partitions. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/da850-lego-ev3.dts | 313 +++++++++++++++++++++++++++++++++++ 2 files changed, 315 insertions(+), 1 deletion(-) commit b514aeae49aa4238c27cd752efdd26a3c52f4f14 Author: David Lechner Date: Fri Jan 13 13:03:41 2017 -0600 dt-bindings: add "microchip,24c128" compatible string This adds "microchip,24c128" to the list of compatible strings for i2c eeproms. Acked-by: Rob Herring Signed-off-by: David Lechner Signed-off-by: Sekhar Nori Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++ 1 file changed, 2 insertions(+) commit 21078ab174c99885ca83a5c32db0d33b1617745e Author: David Lechner Date: Fri Jan 13 13:03:40 2017 -0600 dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification This adds the board level device tree specification for LEGO MINDSTORMS EV3 Acked-by: Rob Herring Signed-off-by: David Lechner Signed-off-by: Sekhar Nori Documentation/devicetree/bindings/arm/davinci.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 7dcc31e2e68a386a29070384b51683ece80982bf Author: David Lechner Date: Fri Jan 13 13:03:39 2017 -0600 dt-bindings: Add vendor prefix for LEGO Add a vendor prefix for LEGO Systems A/S Acked-by: Rob Herring Signed-off-by: David Lechner Signed-off-by: Sekhar Nori Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit cb190af290329c281ed2fbaf41ce6e4686b69922 Author: Liam Breck Date: Wed Jan 18 09:26:51 2017 -0800 power: supply: bq24190_charger: Adjust formatting Add breathing room in probe() out* section. Signed-off-by: Liam Breck Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ba52e75718784fda1b683ee0bfded72a0b83b047 Author: Liam Breck Date: Wed Jan 18 09:26:54 2017 -0800 power: supply: bq24190_charger: Handle fault before status on interrupt Reading both fault and status registers and logging any fault should take priority over handling status register update. Fix by moving the status handling to later in interrupt routine. Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 68abfb8015832ddf728b911769659468efaf8bd9 Author: Liam Breck Date: Wed Jan 18 09:26:53 2017 -0800 power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread() Caching the fault register after a single I2C read may not keep an accurate value. Fix by doing two reads in irq_handle_thread() and using the cached value elsewhere. If a safety timer fault later clears itself, we apparently don't get an interrupt (INT), however other interrupts would refresh the register cache. From the data sheet: "When a fault occurs, the charger device sends out INT and keeps the fault state in REG09 until the host reads the fault register. Before the host reads REG09 and all the faults are cleared, the charger device would not send any INT upon new faults. In order to read the current fault status, the host has to read REG09 two times consecutively. The 1st reads fault register status from the last read [1] and the 2nd reads the current fault register status." [1] presumably a typo; should be "last fault" Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 94 ++++++++++------------------------ 1 file changed, 27 insertions(+), 67 deletions(-) commit 2d9fee6a42ea170e4378b3363a7ad385d0e67281 Author: Liam Breck Date: Wed Jan 18 09:26:52 2017 -0800 power: supply: bq24190_charger: Call power_supply_changed() for relevant component We wrongly get uevents for bq24190-charger and bq24190-battery on every register change. Fix by checking the association with charger and battery before emitting uevent(s). Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 50 ++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 23 deletions(-) commit d62acc5ef0621463446091ebd7a345e06e9ab80c Author: Liam Breck Date: Wed Jan 18 09:26:50 2017 -0800 power: supply: bq24190_charger: Install irq_handler_thread() at end of probe() The device specific data is not fully initialized on request_threaded_irq(). This may cause a crash when the IRQ handler tries to reference them. Fix the issue by installing IRQ handler at the end of the probe. Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit e05ad7e0741ce0505e1df157c62b22b95172bb97 Author: Liam Breck Date: Wed Jan 18 09:26:49 2017 -0800 power: supply: bq24190_charger: Call set_mode_host() on pm_resume() pm_resume() does a register_reset() which clears charger host mode. Fix by calling set_mode_host() after the reset. Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 1 + 1 file changed, 1 insertion(+) commit 767eee362fd72bb2ca44cc80419ca4b38c6d8369 Author: Liam Breck Date: Wed Jan 18 09:26:48 2017 -0800 power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING The interrupt signal is TRIGGER_FALLING. This is is specified in the data sheet PIN FUNCTIONS: "The INT pin sends active low, 256us pulse to host to report charger device status and fault." Also the direction can be seen in the data sheet Figure 37 "BQ24190 with D+/D- Detection and USB On-The-Go (OTG)" which shows a 10k pull-up resistor installed for the sample configurations. Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Signed-off-by: Liam Breck Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70f16cef06b5bf72d50b8016e1188995eddc073a Author: Fabian Frederick Date: Wed Jan 18 19:39:35 2017 +0100 udf: allow implicit blocksize specification during mount udf_fill_super() used udf_parse_options() to flag UDF_FLAG_BLOCKSIZE_SET when blocksize was specified otherwise used 512 bytes (bdev_logical_block_size) and 2048 bytes (UDF_DEFAULT_BLOCKSIZE) IOW both 1024 and 4096 specifications were required or resulted in "mount: wrong fs type, bad option, bad superblock on /dev/loop1" This patch loops through different block values but also updates udf_load_vrs() to return -EINVAL instead of 0 when udf_check_vsd() fails (and uopt->novrs = 0). The later being the reason for the RFC; we have that case when mounting a 4kb blocksize against other values but maybe VRS is not mandatory there ? Tested with 512, 1024, 2048 and 4096 blocksize Reported-by: Jan Kara Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/super.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 106e0deca1ac6ac627a10617fe77a95200cb01a7 Author: Larry Finger Date: Thu Jan 19 14:28:08 2017 -0600 rtlwifi: rtl8192cu: Convert driver to use common macros These drivers use a set of complicated macros to extract and insert information for the RX and TX descriptors. Driver rtl8192cu had a different set than was used for the PCI-based drivers. To simplify the code, rtl8192cu is switched to use the common version. In the process, two errors in those common macros were found and fixed. Besides simplifying the code, there is an additional benefit. We have no BE hardware to test the PCI driver, but using the common macros provides an additional test for the validity of many endian-sensitive operations. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.h | 272 ++++++++++----------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 23 +- 2 files changed, 132 insertions(+), 163 deletions(-) commit 69d8597e9fe5ca76da8ad18245d51af96cf8457a Author: Larry Finger Date: Thu Jan 19 14:28:07 2017 -0600 rtlwifi: rtl8192cu: Calculate descriptor checksum correctly for BE This driver requires a checksum for the descriptors so that the wifi chip is assured that the USB transmission was correct. These entries are little-endian, but the driver was always using cpu order in the calculation. As a result, the driver failed on BE hardware. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89d32c9071aacdd7f631c36ff9c7d3403229d568 Author: Larry Finger Date: Thu Jan 19 14:28:06 2017 -0600 rtlwifi: Download firmware as bytes rather than as dwords The firmware is read from disk as a little-endian byte string. The code that loads the firmware into the device transfers it as 4-byte quantities. The routines that write multi-byte quantities on BE hardware assume that the data are in CPU order, and automatically do the conversion to the LE order required by the device. As a result, the firmware is transmitted incorrectly. Rather than do multiple byte swaps on the data, the download routine is revised to transmit bytes rather than dwords. Although the number of I/O operations is increased, the firmware is not often loaded. All drivers have the same bug, and use essentially the same code to download firmware. These routines have been moved into rtlwifi. Some CamelCase variables have been renamed. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/efuse.c | 45 ++++++++++++++ drivers/net/wireless/realtek/rtlwifi/efuse.h | 4 ++ .../net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 67 ++------------------- .../wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 70 +++------------------- .../net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 70 +++------------------- .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 68 ++------------------- .../realtek/rtlwifi/rtl8723com/fw_common.c | 69 ++------------------- .../realtek/rtlwifi/rtl8723com/fw_common.h | 6 -- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 67 ++------------------- 9 files changed, 85 insertions(+), 381 deletions(-) commit 9336d376edf131e00ef986741afc134b114cfc37 Author: Larry Finger Date: Thu Jan 19 11:25:21 2017 -0600 rtlwifi: Remove debugging entry in sysfs As the kernel provides access to module parameters through entries in /sys/module//parameters/, there is no need for a private interface. Thus the existing code for setting the debug level is removed. Reported-by: Kalle Valo Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 59 ----------------------------- drivers/net/wireless/realtek/rtlwifi/base.h | 1 - drivers/net/wireless/realtek/rtlwifi/pci.c | 8 ---- 3 files changed, 68 deletions(-) commit c34df318ec9fccd92f23b4ac15f06cbf7bfeec0c Author: Larry Finger Date: Thu Jan 19 11:25:20 2017 -0600 rtlwifi: Convert COMP_XX entries into a proper debugging mask The debugging macros contain a parameter COMP_XX that could be used as a mask; however, the code turns all these various bits on at the same time. This change implements them as a proper mask, and adds module parameters to set the mask at load time. The current name "debug" for the debug level has been changed to "debug_level" to better differentiate it from "debug_mask". The debug routines have also been changed to interrogate the structure that is loaded at entry time. As a result, the structure rtl_debug is no longer needed, and all references to it are deleted. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 6 +-- drivers/net/wireless/realtek/rtlwifi/debug.c | 43 +++++----------------- drivers/net/wireless/realtek/rtlwifi/debug.h | 2 - drivers/net/wireless/realtek/rtlwifi/pci.c | 10 ----- .../net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 10 +++-- .../net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 11 +++--- .../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 11 +++--- drivers/net/wireless/realtek/rtlwifi/usb.c | 1 - drivers/net/wireless/realtek/rtlwifi/wifi.h | 15 ++------ 15 files changed, 70 insertions(+), 105 deletions(-) commit 102e295ed5a42cc7428baf1d1ffc08826dad99e7 Author: Larry Finger Date: Thu Jan 19 11:25:19 2017 -0600 rtlwifi: Redo debugging macros RTPRINT and RT_PRINT_DATA These two debugging formss implement debugging using rather complicated macro constructions. These are replaced with compiled code that is easier to understand. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/debug.c | 42 ++++++++++++++++++++++++---- drivers/net/wireless/realtek/rtlwifi/debug.h | 33 ++++++++++------------ 2 files changed, 51 insertions(+), 24 deletions(-) commit e8cd47501fa0c0a591bb07d5878dcc8d63d60e57 Author: Rafał Miłecki Date: Wed Jan 18 11:48:54 2017 +0100 brcmfmac: rename brcmf_bus_start function to brcmf_bus_started This intends to make init/attach process slightly easier to follow. What driver was doing in brcmf_bus_start wasn't bus specific at all and function brcmf_bus_stop wasn't undoing things done there. This function is supposed to be called by bus specific code when the bus is ready. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit bfa7295e5b4d32cdab28d4cdc3a9791f73aed089 Author: Rafał Miłecki Date: Wed Jan 18 11:48:53 2017 +0100 brcmfmac: drop brcmf_bus_detach and inline its code Driver used to call brcmf_bus_detach only from one place and it already contained a check for drvr not being NULL. We can get rid of this extra function, call brcmf_bus_stop directly and simplify the code. There also isn't brcmf_bus_attach function which one could expect so it looks more consistent this way. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit f5611e038172101561b570554c81e290a39517ed Author: Rafał Miłecki Date: Wed Jan 18 11:48:52 2017 +0100 brcmfmac: move brcmf_c_set_joinpref_default declaration to common.h Function brcmf_c_set_joinpref_default is in common.c, so move it to the related header. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit c8d870794d5dd42d6e05a78cc92d1ff7acf11f6a Author: Rafał Miłecki Date: Wed Jan 18 11:48:51 2017 +0100 brcmfmac: drop unneeded function declarations from headers Functions brcmf_c_prec_enq and brcmf_sdio_init don't exist so we really don't need their declarations. Function brcmf_parse_tlvs is used in cfg80211.c only so make it static and drop from header as well. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 4 ---- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) commit 8e290cecdd0178f3d4cf7d463c51dc7e462843b4 Author: Gavin Li Date: Tue Jan 17 15:24:05 2017 -0800 brcmfmac: fix incorrect event channel deduction brcmf_sdio_fromevntchan() was being called on the the data frame rather than the software header, causing some frames to be mischaracterized as on the event channel rather than the data channel. This fixes a major performance regression (due to dropped packets). With this patch the download speed jumped from 1Mbit/s back up to 40MBit/s due to the sheer amount of packets being incorrectly processed. Fixes: c56caa9db8ab ("brcmfmac: screening firmware event packet") Signed-off-by: Gavin Li Cc: # 4.7+ Acked-by: Arend van Spriel [kvalo@codeaurora.org: improve commit logs based on email discussion] Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ee83789fc1fb40f4d2f3dddd838c2c3860dadb9 Author: Jes Sorensen Date: Tue Jan 17 18:18:56 2017 -0500 rtl8xxxu: Update author/maintainer contact info Update copyright year and email address. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo MAINTAINERS | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit 5407fd7de69f3352aed659244d4bef18e3cabf5c Author: Axel Köllhofer Date: Tue Jan 17 18:18:55 2017 -0500 rtl8xxxu: Add additional USB IDs for rtl8192eu devices These IDs originate from the vendor driver Signed-off-by: Axel Köllhofer Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 66dfa26ebca8de9764190fed6ef509cd2b514c74 Author: Axel Köllhofer Date: Tue Jan 17 18:18:54 2017 -0500 rtl8xxxu: Add USB ID for D-Link DWA-131 rev E1 (rtl8192eu) This was tested by David Patiño. Reported-by: David Patiño Signed-off-by: Axel Köllhofer Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +++ 1 file changed, 3 insertions(+) commit c14239f23adb80aa2532909e312986317ba3cd09 Author: Jes Sorensen Date: Tue Jan 17 18:18:53 2017 -0500 rtl8xxxu: Add another 8192eu device to the USB list TP-Link TL-WN822N v4 (2357:0108) Reported-by: Gregory Auzanneau Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +++ 1 file changed, 3 insertions(+) commit d607e396566a10ad1dc64affe82c019098deb162 Author: Jes Sorensen Date: Tue Jan 17 18:18:52 2017 -0500 rtl8xxxu: Mark 8192eu device 0x0bda:0x818b as tested Device reported as working fine, so tell the driver not to warn about it being untested. Reported-by: Aex Aey Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 + 1 file changed, 1 insertion(+) commit a62a77881b1b6708ffeddd9bf0529494f7b199e3 Author: Martin Blumenstingl Date: Mon Jan 16 11:17:57 2017 +0100 brcmfmac: add support for BCM43455 with modalias sdio:c00v02D0dA9BF BCM43455 is a more recent revision of the BCM4345. Some of the BCM43455 got a dedicated SDIO device ID which is currently not supported by brcmfmac. Adding the new sdio_device_id to brcmfmac is enough to get the BCM43455 supported because the chip itself is already supported (due to BCM4345 support in the driver). Signed-off-by: Martin Blumenstingl Acked-by: Arend van Spriel Reviewed-by: Andreas Färber Tested-by: Andreas Färber Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + include/linux/mmc/sdio_ids.h | 1 + 2 files changed, 2 insertions(+) commit 0ed917d09d517646b4dffc96427e5a4cc14056de Author: Brian Norris Date: Fri Jan 13 18:16:57 2017 -0800 mwifiex: don't complain about 'unknown event id: 0x63' Marvell folks tell me this is a debugging event that the driver doesn't need to handle, but on 8997 w/ firmware 16.68.1.p97, I see several of these sorts of messages at (for instance) boot time: [ 13.825848] mwifiex_pcie 0000:01:00.0: event: unknown event id: 0x63 [ 14.838561] mwifiex_pcie 0000:01:00.0: event: unknown event id: 0x63 [ 14.850397] mwifiex_pcie 0000:01:00.0: event: unknown event id: 0x63 [ 32.529923] mwifiex_pcie 0000:01:00.0: event: unknown event id: 0x63 Let's handle this "event" with a much lower verbosity. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 1 + drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++++ 2 files changed, 5 insertions(+) commit fe116788393942eef11d5c0f1cb16b1ef423970d Author: Brian Norris Date: Fri Jan 13 15:35:38 2017 -0800 mwifiex: pcie: read FROMDEVICE DMA-able memory with READ_ONCE() In mwifiex_delay_for_sleep_cookie(), we're looping and waiting for the PCIe endpoint to write a magic value back to memory, to signal that it has finished going to sleep. We're not letting the compiler know that this might change underneath our feet though. Let's do that, for good hygiene. I'm not aware of this fixing any concrete problems. I also give no guarantee that this loop is actually correct in any other way, but at least this looks like an improvement to me. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d5ddb5e0d9bc3ff3f377c6e03a074d13606a6e5 Author: Brian Norris Date: Fri Jan 13 15:35:37 2017 -0800 mwifiex: pcie: don't loop/retry interrupt status checks The following sequence occurs when using IEEE power-save on 8997: (a) driver sees SLEEP event (b) driver issues SLEEP CONFIRM (c) driver recevies CMD interrupt; within the interrupt processing loop, we do (d) and (e): (d) wait for FW sleep cookie (and often time out; it takes a while), FW is putting card into low power mode (e) re-check PCIE_HOST_INT_STATUS register; quit loop with 0 value But at (e), no one actually signaled an interrupt (i.e., we didn't check adapter->int_status). And what's more, because the card is going to sleep, this register read appears to take a very long time in some cases -- 3 milliseconds in my case! Now, I propose that (e) is completely unnecessary. If there were any additional interrupts signaled after the start of this loop, then the interrupt handler would have set adapter->int_status to non-zero and queued more work for the main loop -- and we'd catch it on the next iteration of the main loop. So this patch drops all the looping/re-reading of PCIE_HOST_INT_STATUS, which avoids the problematic (and slow) register read in step (e). Incidentally, this is a very similar issue to the one fixed in commit ec815dd2a5f1 ("mwifiex: prevent register accesses after host is sleeping"), except that the register read is just very slow instead of fatal in this case. Tested on 8997 in both MSI and (though not technically supported at the moment) MSI-X mode. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 102 +++++++++------------------- 1 file changed, 32 insertions(+), 70 deletions(-) commit 062e008a6e83e7c4da7df0a9c6aefdbc849e2bb3 Author: Brian Norris Date: Fri Jan 13 15:35:36 2017 -0800 mwifiex: pcie: use posted write to wake up firmware Depending on system factors (e.g., the PCIe link PM state), the first read to wake up the Wifi firmware can take a long time. There is no reason to use a (blocking, non-posted) read at this point, so let's just use a write instead. Write vs. read doesn't matter functionality-wise -- it's just a dummy operation. But let's make sure to re-write with the correct "ready" signature, since we check for that in other parts of the driver. This has been shown to decrease the time spent blocking in this function on RK3399. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bb475230b8e59a547ab66ac3b02572df21a580e9 Author: Ramiro Oliveira Date: Fri Jan 13 17:57:41 2017 +0000 reset: make optional functions really optional The *_get_optional_* functions weren't really optional so this patch makes them really optional. These *_get_optional_* functions will now return NULL instead of an error if no matching reset phandle is found in the DT, and all the reset_control_* functions now accept NULL rstc pointers. Signed-off-by: Ramiro Oliveira Signed-off-by: Philipp Zabel drivers/reset/core.c | 49 +++++++++++++++++++++++++++++++++++++++---------- include/linux/reset.h | 45 ++++++++++++++++++++++++++------------------- 2 files changed, 65 insertions(+), 29 deletions(-) commit ee48c726d0b014ac8dd5ec803fb63ce0596a42cf Author: Ramiro Oliveira Date: Fri Jan 13 17:57:40 2017 +0000 reset: Change shared flag from int to bool Since the new parameter being added is going to be a bool this patch changes the shared flag from int to bool to match the new parameter. Signed-off-by: Ramiro Oliveira Signed-off-by: Philipp Zabel drivers/reset/core.c | 8 ++++---- include/linux/reset.h | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) commit 88a7f5237dfdd7f02939c4ec7ac7452e14adceab Author: Masahiro Yamada Date: Sun Jan 15 04:04:46 2017 +0900 reset: uniphier: add compatible string for LD11 SD-reset block The LD11 SoC is equipped with not only MIO-reset but also SD-reset for controlling RST_n pin of the eMMC device. Update the binding document and remove unneeded "." from each line in itemization. Signed-off-by: Masahiro Yamada Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/uniphier-reset.txt | 47 +++++++++++----------- drivers/reset/reset-uniphier.c | 4 ++ 2 files changed, 28 insertions(+), 23 deletions(-) commit b38386f46bc7b8871665d863246476c9b6eb89ec Author: Baoyou Xie Date: Tue Jan 17 11:22:57 2017 +0800 reset: zx2967: add reset controller driver for ZTE's zx2967 family This patch adds reset controller driver for ZTE's zx2967 family. Signed-off-by: Baoyou Xie Reviewed-by: Shawn Guo Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-zx2967.c | 106 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) commit 8041311cbfd63c242e3f004f3202047a5b5e309f Author: Baoyou Xie Date: Tue Jan 17 11:22:56 2017 +0800 MAINTAINERS: add zx2967 reset controller driver to ARM ZTE architecture Add the zx2967 reset controller driver as maintained by ARM ZTE architecture maintainers, as they're parts of the core IP. Signed-off-by: Baoyou Xie Signed-off-by: Philipp Zabel MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit e76a96effb23d838cf0f50e5b8f728cdcfcaa52e Author: Baoyou Xie Date: Tue Jan 17 11:22:55 2017 +0800 dt: bindings: add documentation for zx2967 family reset controller This patch adds dt-binding documentation for zx2967 family reset controller. Signed-off-by: Baoyou Xie Reviewed-by: Shawn Guo Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/zte,zx2967-reset.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7e79a6836cfd1bac20e2be3fafdc3caca27c9d69 Author: Sagar Arun Kamble Date: Fri Jan 20 09:18:24 2017 +0530 drm/i915: Set adjustment to zero on Up/Down interrupts if freq is already max/min When we reach the user's RPS limits, stop requesting an adjustment. Even though we will clamp the requested frequency later, we rely on interrupt masking to disable further adjustments in the same direction. Even though it is unlikely (one scenario is a bug in the driver, another is careful manipulation through the uAPI) if we keep exponentially increasing the adjustment value, it will wrap and cause a negative adjustment. Signed-off-by: Chris Wilson Reviewed-by: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/1484884104-28134-2-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e2e2eabb68dfd00502bf8501b015862eb8b3f392 Author: Andy Shevchenko Date: Thu Jan 19 21:24:25 2017 +0200 x86/platform/intel-mid: Move watchdog registration to arch_initcall() There is no need to choose a random initcall level for certainly architecture dependent code. Move watchdog registration to arch_initcall() from rootfs_initcall(). Signed-off-by: Andy Shevchenko Link: http://lkml.kernel.org/r/20170119192425.189899-5-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 939533955d1f1d51e8e37d7d675646ce9d55534b Author: Andy Shevchenko Date: Thu Jan 19 21:24:24 2017 +0200 x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() When call mp_map_gsi_to_irq() and return its error code do not shadow it. Note that 0 is not an error. Signed-off-by: Andy Shevchenko Link: http://lkml.kernel.org/r/20170119192425.189899-4-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 910a26f6e952148a0c8815281737aaead640626c Author: Andy Shevchenko Date: Thu Jan 19 21:24:23 2017 +0200 x86/platform/intel-mid: Allocate RTC interrupt for Merrifield Legacy RTC requires interrupt line 8 to be dedicated for it. On Intel MID platforms the legacy PIC is absent and in order to make RTC work we need to allocate interrupt separately. Current solution brought by commit de1c2540aa4f does it in a wrong place, and since it's done unconditionally for all x86 devices, some of them, e.g. PNP based, might get it wrong because they execute the MID specific code due to x86_platform.legacy.rtc flag being set. Move intel_mid_legacy_rtc_init() to its own module and call it before x86 RTC CMOS initialization. Fixes: de1c2540aa4f ("x86/platform/intel-mid: Enable RTC on Intel Merrifield") Signed-off-by: Andy Shevchenko Cc: "Luis R . Rodriguez" Link: http://lkml.kernel.org/r/20170119192425.189899-3-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/platform/intel-mid/device_libs/Makefile | 1 + .../intel-mid/device_libs/platform_mrfld_rtc.c | 48 ++++++++++++++++++++++ arch/x86/platform/intel-mid/sfi.c | 14 ------- 3 files changed, 49 insertions(+), 14 deletions(-) commit 358e96deaed3330a59d9dd6a7e419f4da08d6497 Author: Andy Shevchenko Date: Thu Jan 19 21:24:22 2017 +0200 x86/ioapic: Return suitable error code in mp_map_gsi_to_irq() mp_map_gsi_to_irq() in some cases might return legacy -1, which would be wrongly interpreted as -EPERM. Correct those cases to return proper error code. Signed-off-by: Andy Shevchenko Link: http://lkml.kernel.org/r/20170119192425.189899-2-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/io_apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 06321dd2d1ae5b5bdc847958ab9e71d22a29a33e Author: Waiman Long Date: Thu Jan 19 09:31:52 2017 -0500 locking/rwsem: Remove unnecessary atomic_long_t casts Since sem->count had been changed to a atomic_long_t type, it is no longer necessary to use the atomic_long_t cast anymore. So remove them. Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Arnd Bergmann Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Link: http://lkml.kernel.org/r/1484836312-6656-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar include/asm-generic/rwsem.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit afff6067b305697dd4b3b2f2d8b2dd5da78539c8 Author: Stephen Boyd Date: Wed Dec 28 14:57:08 2016 -0800 usb: chipidea: Drop lock across event_notify during gadget stop The CI_HDRC_CONTROLLER_STOPPED_EVENT may want to call sleeping APIs similar to how _gadget_stop_activity() may. Let's drop the lock across the event so that glue drivers can make sleeping calls. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed04f19f28ff4900fe9d26b03e5c14600c072391 Author: Stephen Boyd Date: Wed Dec 28 14:57:07 2016 -0800 usb: chipidea: msm: Be silent on probe defer errors If something fails in ci_hdrc_add_device() due to probe defer, we shouldn't print an error message. Be silent in this case as we'll try probe again later. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 11893dae63da0f5b251cf7f9a24d64c8ff4771ff Author: Stephen Boyd Date: Wed Dec 28 14:57:06 2016 -0800 usb: chipidea: msm: Handle phy power states The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Hook the phy initialization into the RESET event and the phy power off into the STOPPED event. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 40 +++++++++++++++++++------------------- drivers/usb/chipidea/core.c | 8 ++++++-- drivers/usb/chipidea/host.c | 8 ++++++-- include/linux/usb/chipidea.h | 2 +- 4 files changed, 33 insertions(+), 25 deletions(-) commit 1b8fc5a5253d593daff68378444f8fc4bc50af1a Author: Stephen Boyd Date: Wed Dec 28 14:57:05 2016 -0800 usb: chipidea: msm: Add reset controller for PHY POR bit The MSM chipidea wrapper has two bits that are used to reset the first or second phy. Add support for these bits via the reset controller framework, so that phy drivers can reset their hardware at the right time during initialization. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/Kconfig | 1 + drivers/usb/chipidea/ci_hdrc_msm.c | 50 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) commit 26f8e3a8cb81b4b8495e8e75596bc60cddf5af1e Author: Stephen Boyd Date: Wed Dec 28 14:57:04 2016 -0800 usb: chipidea: msm: Make platform data driver local instead of global If two devices are probed with this same driver, they'll share the same platform data structure, while the chipidea core layer writes and modifies it. This can lead to interesting results especially if one device is an OTG type chipidea controller and another is a host. Let's create a copy of this structure per each device instance so that odd things don't happen. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 47654a1620818ab1da1e81ce6cdb2433ff3bb6bf Author: Stephen Boyd Date: Wed Dec 28 14:57:03 2016 -0800 usb: chipidea: msm: Restore wrapper settings after reset When the RESET bit is set in the USBCMD register it resets quite a few of the wrapper's registers to their reset state. This includes the GENCONFIG and GENCONFIG2 registers. Currently this is done by the usb phy and ehci-msm drivers writing into the controller wrapper's MMIO address space. Let's consolidate the register writes into the wrapper driver instead so that we clearly split the wrapper from the phys. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 2fc305be364ed2a4ea4bdf83554a2a76521dc6c4 Author: Stephen Boyd Date: Wed Dec 28 14:57:02 2016 -0800 usb: chipidea: msm: Mux over secondary phy at the right time We need to pick the correct phy at runtime based on how the SoC has been wired onto the board. If the secondary phy is used, take it out of reset and mux over to it by writing into the TCSR register. Make sure to do this on reset too, because this register is reset to the default value (primary phy) after the RESET bit is set in USBCMD. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 62 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) commit e9f15a71f17b328be44767cb893576c7c838f996 Author: Stephen Boyd Date: Wed Dec 28 14:57:01 2016 -0800 usb: chipidea: msm: Add proper clk and reset support The msm chipidea controller uses two main clks, an AHB clk to read/write the MMIO registers and a core clk called the system clk that drives the controller itself. Add support for these clks as they're required in all designs. Also add support for an optional third clk that we need to turn on to reset the controller and wrapper logic and other "housekeeping" things. This clk was removed in later revisions of the hardware because the reset methodology no longer required clks to be enabled to propagate resets. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 72 +++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) commit ee33f6e70b9e611b7363f1a5c4efb642a8995889 Author: Stephen Boyd Date: Wed Dec 28 14:57:00 2016 -0800 usb: chipidea: msm: Use hw_write_id_reg() instead of writel The MSM_USB_BASE macro trick is not very clear, and we're using it for only one register write so let's just move to using hw_write_id_reg() and passing the ci pointer instead. That clearly shows what offset we're using and avoids needing to include the msm_hsusb_hw.h file when we're going to delete that file soon. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dd3749099cfa2c80039193c438b90f3160eaf7f9 Author: Stephen Boyd Date: Wed Dec 28 14:56:59 2016 -0800 usb: chipidea: msm: Rely on core to override AHBBURST The core framework already handles setting this parameter with a platform quirk. Add the appropriate flag so that we always set AHBBURST to 0. Technically DT should be doing this, but we always do it for msm chipidea devices so setting the flag in the driver works just as well. If the burst needs to be anything besides 0, we expect the 'ahb-burst-config' dts property to be present. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c8ea46d3e5462c54120f6bca42e2ccee4e48904 Author: Stephen Boyd Date: Wed Dec 28 14:56:58 2016 -0800 usb: chipidea: msm: Mark device as runtime pm active We're not properly marking the glue layer/wrapper device as runtime active, so runtime PM believes that the hardware state is inactive when we call pm_runtime_enable() in this driver. This causes a problem when the glue layer has a power domain associated with it, because runtime PM will go and disable the power domain to match the 'inactive' state of the device. Let's mark the device as active so that runtime PM doesn't improperly power down this device when it's actually active. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 1 + 1 file changed, 1 insertion(+) commit c3b674a04b8ab62a1d35e86714d466af0a0ecc18 Author: Peter Chen Date: Wed Oct 19 15:32:58 2016 +0800 usb: chipidea: vbus event may exist before starting gadget At some situations, the vbus may already be there before starting gadget. So we need to check vbus event after switching to gadget in order to handle missing vbus event. The typical use cases are plugging vbus cable before driver load or the vbus has already been there after stopping host but before starting gadget. Signed-off-by: Peter Chen Tested-by: Stephen Boyd Reported-by: Stephen Boyd drivers/usb/chipidea/otg.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 5cc49268995a1f063a7a569299393e4cf9d06923 Author: Stephen Boyd Date: Fri Jan 20 15:11:55 2017 +0800 usb: chipidea: Consolidate extcon notifiers The two extcon notifiers are almost the same except for the variable name for the cable structure and the id notifier inverts the cable->state logic. Make it the same and replace two functions with one to save some lines. This also makes it so that the id cable state is true when the id pin is pulled low, so we change the name of ->state to ->connected to properly reflect that we're interested in the cable being connected. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Cc: "Ivan T. Ivanov" Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 45 ++++++++++++-------------------------------- drivers/usb/chipidea/otg.c | 8 ++++---- include/linux/usb/chipidea.h | 4 ++-- 3 files changed, 18 insertions(+), 39 deletions(-) commit d852d39432f5d9822dd0ea8760573448338caf41 Author: Geliang Tang Date: Tue Dec 20 21:57:44 2016 +0800 timerqueue: Use rb_entry_safe() instead of open-coding it Signed-off-by: Geliang Tang Cc: Andrew Morton Cc: John Stultz Link: http://lkml.kernel.org/r/0d5cf199ac43792df0b6f7e2145545c30fa1dbbe.1482222135.git.geliangtang@gmail.com Signed-off-by: Thomas Gleixner lib/timerqueue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8d254a340efb12b40c4c1ff25a48a4f48f7bbd6b Author: Clemens Gruber Date: Tue Dec 13 16:52:50 2016 +0100 pwm: pca9685: Fix period change with same duty cycle When first implementing support for changing the output frequency, an optimization was added to continue the PWM after changing the prescaler without having to reprogram the ON and OFF registers for the duty cycle, in case the duty cycle stayed the same. This was flawed, because we compared the absolute value of the duty cycle in nanoseconds instead of the ratio to the period. Fix the problem by removing the shortcut. Fixes: 01ec8472009c9 ("pwm-pca9685: Support changing the output frequency") Cc: # v4.3+ Signed-off-by: Clemens Gruber Reviewed-by: Mika Westerberg Signed-off-by: Thierry Reding drivers/pwm/pwm-pca9685.c | 11 ----------- 1 file changed, 11 deletions(-) commit a1a22c12060e4b9c52f45d4b3460f614e00162a2 Author: David Ahern Date: Wed Jan 18 07:40:36 2017 -0800 net: ipv6: Keep nexthop of multipath route on admin down IPv6 deletes route entries associated with multipath routes on an admin down where IPv4 does not. For example: $ ip ro ls vrf red unreachable default metric 8192 1.1.1.0/24 metric 64 nexthop via 10.100.1.254 dev eth1 weight 1 nexthop via 10.100.2.254 dev eth2 weight 1 10.100.1.0/24 dev eth1 proto kernel scope link src 10.100.1.4 10.100.2.0/24 dev eth2 proto kernel scope link src 10.100.2.4 $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2:: dev red proto none metric 0 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:11::/120 via 2001:db8:1::16 dev eth1 metric 1024 pref medium 2001:db8:11::/120 via 2001:db8:2::17 dev eth2 metric 1024 pref medium ... Set link down: $ ip li set eth1 down IPv4 retains the multihop route but flags eth1 route as dead: $ ip ro ls vrf red unreachable default metric 8192 1.1.1.0/24 nexthop via 10.100.1.16 dev eth1 weight 1 dead linkdown nexthop via 10.100.2.16 dev eth2 weight 1 10.100.2.0/24 dev eth2 proto kernel scope link src 10.100.2.4 and IPv6 deletes the route as part of flushing all routes for the device: $ ip -6 ro ls vrf red 2001:db8:2:: dev red proto none metric 0 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:11::/120 via 2001:db8:2::17 dev eth2 metric 1024 pref medium ... Worse, on admin up of the device the multipath route has to be deleted to get this leg of the route re-added. This patch keeps routes that are part of a multipath route if ignore_routes_with_linkdown is set with the dead and linkdown flags enabling consistency between IPv4 and IPv6: $ ip -6 ro ls vrf red 2001:db8:2:: dev red proto none metric 0 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:11::/120 via 2001:db8:1::16 dev eth1 metric 1024 dead linkdown pref medium 2001:db8:11::/120 via 2001:db8:2::17 dev eth2 metric 1024 pref medium ... Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dceeab0e5258fccad5dbf95b54821ae4e919e0b6 Author: Eric Dumazet Date: Tue Jan 17 20:14:10 2017 -0800 mlx4: support __GFP_MEMALLOC for rx Commit 04aeb56a1732 ("net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC") added code that appears to be not needed at that time, since mlx4 never used __GFP_MEMALLOC allocations anyway. As using memory reserves is a must in some situations (swap over NFS or iSCSI), this patch adds this flag. Note that this driver does not reuse pages (yet) so we do not have to add anything else. Signed-off-by: Eric Dumazet Cc: Konstantin Khlebnikov Cc: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 564e73d283af9d4c1d642079d5c7ac601876162f Author: Wolfram Sang Date: Thu Dec 22 11:38:21 2016 +0100 thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver Add support for R-Car Gen3 thermal sensors. Polling only for now, interrupts will be added incrementally. Same goes for reading fuses. This is documented already, but no hardware available for now. Signed-off-by: Hien Dang Signed-off-by: Thao Nguyen Signed-off-by: Khiem Nguyen Signed-off-by: Wolfram Sang [Niklas: document and rework temperature calculation] Signed-off-by: Niklas Söderlund Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 9 + drivers/thermal/Makefile | 1 + drivers/thermal/rcar_gen3_thermal.c | 335 ++++++++++++++++++++++++++++++++++++ 3 files changed, 345 insertions(+) commit b022e9b9d0e67f4cba62bc790bd387e23c29dc6c Author: Wolfram Sang Date: Thu Dec 22 11:38:20 2016 +0100 thermal: rcar_gen3_thermal: Document the R-Car Gen3 Signed-off-by: Hien Dang Signed-off-by: Khiem Nguyen Signed-off-by: Wolfram Sang Signed-off-by: Niklas Söderlund Signed-off-by: Eduardo Valentin .../bindings/thermal/rcar-gen3-thermal.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 8a43c052c7c1a7fd6cde46591deeb39be63a1223 Author: Timur Tabi Date: Tue Jan 17 16:31:19 2017 -0600 Revert "net: qcom/emac: configure the external phy to allow pause frames" This reverts commit 3e884493448131179a5b7cae1ddca1028ffaecc8. With commit 529ed1275263 ("net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause"), phylib now handles automatically enabling pause frame support in the PHY, and the MAC driver should follow suit. Since the EMAC driver driver does this, we no longer need to force pause frames support. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 6 ------ 1 file changed, 6 deletions(-) commit 7bb7e9b1a4319d7c305c033c2df46028fbcc10ae Author: Stephen Boyd Date: Wed Dec 28 14:56:55 2016 -0800 usb: chipidea: Add support for ULPI PHY bus Some phys for the chipidea controller are controlled via the ULPI viewport. Add support for the ULPI bus so that these sorts of phys can be probed and read/written automatically without having to duplicate the viewport logic in each phy driver. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Cc: Heikki Krogerus Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/Kconfig | 7 +++ drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/ci.h | 21 ++++++++ drivers/usb/chipidea/core.c | 31 +++++++++--- drivers/usb/chipidea/ulpi.c | 113 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+), 6 deletions(-) commit 732a4af85e87091dee130669de8ce50727fd28b4 Author: Stephen Boyd Date: Wed Dec 28 14:56:54 2016 -0800 usb: chipidea: Remove locking in ci_udc_start() We don't call hw_device_reset() with the ci->lock held, so it doesn't seem like this lock here is protecting anything. Let's just remove it. This allows us to call sleeping functions like phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 3 --- 1 file changed, 3 deletions(-) commit b90a17c5ba81bc34cf2becab49a1a2eeff45c70b Author: Stephen Boyd Date: Wed Dec 28 14:56:53 2016 -0800 usb: chipidea: Notify events when switching host mode The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to the wrapper drivers when it calls hw_device_reset(), but that function is not called from chipidea/host.c. And the udc.c file sends the CI_HDRC_CONTROLLER_STOPPED_EVENT but the host.c file doesn't do anything. The intent of the reset event is to allow the wrapper driver to do any wrapper specific things after the reset bit has been set in the usb command register. Therefore, add this event hook in the host role after we toggle that bit. Similarly, the intent of the stopped event is to allow the wrapper driver to do any wrapper specific things after the device is stopped. So when we stop the host role, send the stopped event. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/host.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8feb3680bd0363a8d784fa0d065e0a6cdc9e0cff Author: Stephen Boyd Date: Wed Dec 28 14:56:52 2016 -0800 usb: chipidea: Add platform flag for wrapper phy management The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Therefore, add a flag to skip any phy power management in the core layer, leaving it up to the glue driver to manage. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 6 ++++++ include/linux/usb/chipidea.h | 1 + 2 files changed, 7 insertions(+) commit a89b94b53371bbfa582787c2fa3378000ea4263d Author: Stephen Boyd Date: Wed Dec 28 14:56:51 2016 -0800 usb: chipidea: Handle extcon events properly We're currently emulating the vbus and id interrupts in the OTGSC read API, but we also need to make sure that if we're handling the events with extcon that we don't enable the interrupts for those events in the hardware. Therefore, properly emulate this register if we're using extcon, but don't enable the interrupts. This allows me to get my cable connect/disconnect working properly without getting spurious interrupts on my device that uses an extcon for these two events. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Cc: "Ivan T. Ivanov" Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect") Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/otg.c | 46 +++++++++++++++++++++++++++++++++++++++----- include/linux/usb/chipidea.h | 2 ++ 2 files changed, 43 insertions(+), 5 deletions(-) commit f60f8ccd54e03c1afafb2b20ceb029a0eaf7a134 Author: Stephen Boyd Date: Wed Dec 28 14:56:50 2016 -0800 usb: chipidea: Only read/write OTGSC from one place With the id and vbus detection done via extcon we need to make sure we poll the status of OTGSC properly by considering what the extcon is saying, and not just what the register is saying. Let's move this hw_wait_reg() function to the only place it's used and simplify it for polling the OTGSC register. Then we can make certain we only use the hw_read_otgsc() API to read OTGSC, which will make sure we properly handle extcon events. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Cc: "Ivan T. Ivanov" Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect") Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/usb/chipidea/ci.h | 3 --- drivers/usb/chipidea/core.c | 32 -------------------------------- drivers/usb/chipidea/otg.c | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 30 insertions(+), 39 deletions(-) commit ef6a7bcfb01c9c8df172ad06fb547216ca788711 Author: Stephen Boyd Date: Wed Dec 28 14:56:49 2016 -0800 usb: ulpi: Support device discovery via DT The qcom HSIC ULPI phy doesn't have any bits set in the vendor or product ID registers. This makes it impossible to make a ULPI driver match against the ID registers. Add support to discover the ULPI phys via DT help alleviate this problem. In the DT case, we'll look for a ULPI bus node underneath the device registering the ULPI viewport (or the parent of that device to support chipidea's device layout) and then match up the phy node underneath that with the ULPI device that's created. The side benefit of this is that we can use standard properties in the phy node like clks, regulators, gpios, etc. because we don't have firmware like ACPI to turn these things on for us. And we can use the DT phy binding to point our phy consumer to the phy provider. The ULPI bus code supports native enumeration by reading the vendor ID and product ID registers at device creation time, but we can't be certain that those register reads will succeed if the phy is not powered up. To avoid any problems with reading the ID registers before the phy is powered we fallback to DT matching when the ID reads fail. If the ULPI spec had some generic power sequencing for these registers we could put that into the ULPI bus layer and power up the device before reading the ID registers. Unfortunately this doesn't exist and the power sequence is usually device specific. By having the device matched up with DT we can avoid this problem. Cc: Greg Kroah-Hartman Acked-by: Heikki Krogerus Cc: Acked-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen Documentation/devicetree/bindings/usb/ulpi.txt | 20 +++++++ drivers/usb/common/ulpi.c | 79 ++++++++++++++++++++++++-- 2 files changed, 93 insertions(+), 6 deletions(-) commit 7a3b7cd332db08546f3cdd984f11773e0d1999e7 Author: Stephen Boyd Date: Wed Dec 28 14:56:48 2016 -0800 of: device: Export of_device_{get_modalias, uvent_modalias} to modules The ULPI bus can be built as a module, and it will soon be calling these functions when it supports probing devices from DT. Export them so they can be used by the ULPI module. Acked-by: Rob Herring Cc: Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/of/device.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c829c097f2f1cbebcfff69a7254b1df9852fe4e Author: Stephen Boyd Date: Wed Dec 28 14:56:47 2016 -0800 of: device: Support loading a module with OF based modalias In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to request it with the OF based modalias instead. Add a common function that allows anyone to request a module with the OF based modalias. Acked-by: Rob Herring Cc: Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen drivers/of/device.c | 23 +++++++++++++++++++++++ include/linux/of_device.h | 6 ++++++ 2 files changed, 29 insertions(+) commit 3f991aa0b665c8e9bb702421a4e5005c3588fb62 Author: Chanwoo Choi Date: Wed Nov 30 14:57:33 2016 +0900 usb: chipdata: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit acb04058de49458010c44bb35b849d45113fd668 Author: Peter Zijlstra Date: Thu Jan 19 14:36:33 2017 +0100 sched/clock: Fix hotplug crash Mike reported that he could trigger the WARN_ON_ONCE() in set_sched_clock_stable() using hotplug. This exposed a fundamental problem with the interface, we should never mark the TSC stable if we ever find it to be unstable. Therefore set_sched_clock_stable() is a broken interface. The reason it existed is that not having it is a pain, it means all relevant architecture code needs to call clear_sched_clock_stable() where appropriate. Of the three architectures that select HAVE_UNSTABLE_SCHED_CLOCK ia64 and parisc are trivial in that they never called set_sched_clock_stable(), so add an unconditional call to clear_sched_clock_stable() to them. For x86 the story is a lot more involved, and what this patch tries to do is ensure we preserve the status quo. So even is Cyrix or Transmeta have usable TSC they never called set_sched_clock_stable() so they now get an explicit mark unstable. Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 9881b024b7d7 ("sched/clock: Delay switching sched_clock to stable") Link: http://lkml.kernel.org/r/20170119133633.GB6536@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/ia64/kernel/setup.c | 2 ++ arch/parisc/kernel/setup.c | 2 ++ arch/x86/kernel/cpu/amd.c | 6 ++++-- arch/x86/kernel/cpu/centaur.c | 6 ++++-- arch/x86/kernel/cpu/common.c | 3 +++ arch/x86/kernel/cpu/cyrix.c | 2 ++ arch/x86/kernel/cpu/intel.c | 6 ++++-- arch/x86/kernel/cpu/transmeta.c | 3 +++ arch/x86/kernel/kvmclock.c | 2 +- include/linux/sched.h | 1 - kernel/sched/clock.c | 29 ++++++++--------------------- 11 files changed, 33 insertions(+), 29 deletions(-) commit 828a34b94c9eba99b23d9409d3d38f531341485b Merge: 15fa000 c5a8e3a Author: Olof Johansson Date: Thu Jan 19 16:25:07 2017 -0800 Merge tag 'arm-soc/for-4.11/devicetree' of http://github.com/Broadcom/stblinux into next/dt This pull request contains Broadcom ARM-based SoC Device Tree changes for 4.11, please pull the following changes: - Rafal enables the UART by default on all BCM5301x, BCM4708, BCM4709 since every device found out there has it enabled by default. He also fixes the LED definitions for the Luxul XWR-3100 device, enables USB controllers and their respective PHY devices, specifies the correct GPIO to power on USB HUBs, adds the additional RAM bank for somes devices, and finally sets the correct 5Ghz frequency limits on the Netgear R8000 - Jon does a number of Norsthar Plus SoC cleanups, fixes NAND partitions unit addresses, adds QSPI support to a bunch of boards, adds Ethernet switch ports to the BCM958625K reference board, enables 3rd Ethernet MAC instance to relevant DTSes, enables Ethernet on the XMC board, and finally adds SD/MMC support to the XMC board - Boris adds the Video Encoder nodes to the Raspberry Pi DTS include files ands enables it on the relevant boards - Dan adds support for two new Luxul devices: XAP-1410 and XWR-1200, both BCM47081 based SoCs * tag 'arm-soc/for-4.11/devicetree' of http://github.com/Broadcom/stblinux: ARM: dts: bcm283x: Enable the VEC IP on all RaspberryPi boards ARM: dts: bcm283x: Add VEC node in bcm283x.dtsi ARM: dts: BCM5301X: Add DT for Luxul XWR-1200 ARM: dts: BCM5301X: Add DT for Luxul XAP-1410 ARM: dts: BCM5301X: Set 5 GHz wireless frequency limits on Netgear R8000 ARM: dts: NSP: Add SD/MMC support ARM: dts: NSP: Add Ethernet to NSP XMC ARM: dts: NSP: Add and enable amac2 ARM: dts: NSP: Add BCM958625K switch ports ARM: dts: NSP: Add QSPI support to missing boards ARM: dts: NSP: Correct NAND partition unit address ARM: dts: NSP: DT Clean-ups ARM: dts: BCM53573: Specify USB ports of on-SoC controllers ARM: dts: BCM5301X: Specify all RAM by including an extra block ARM: dts: BCM5301X: Set GPIO enabling USB power on Netgear R7000 ARM: dts: BCM5301X: Specify USB controllers in DT ARM: dts: BCM5301X: Fix LAN LED labels for Luxul XWR-3100 ARM: dts: BCM5301X: Enable UART by default for BCM4708(1), BCM4709(4) & BCM53012 Signed-off-by: Olof Johansson commit 15fa00090850d79ef5e25d9b4544f10e3bd98cbf Author: Marc Gonzalez Date: Thu Jan 19 15:59:04 2017 +0100 ARM: dts: tango4: Import USB nodes Tango4 provides 2 USB 2.0 controllers. Signed-off-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/boot/dts/tango4-common.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit ab3b8023f0f4575d7e7f8111a4075fa3f5e85979 Author: Marc Gonzalez Date: Thu Jan 19 15:57:54 2017 +0100 ARM: dts: tango4: Import MMC nodes Tango4 provides 2 SD/SDIO/eMMC controllers. Signed-off-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/boot/dts/tango4-common.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/tango4-vantage-1172.dts | 4 ++++ 2 files changed, 20 insertions(+) commit 0e89d65176ba787ff8fb401150289b85d0199569 Author: Marc Gonzalez Date: Thu Jan 19 15:52:04 2017 +0100 ARM: dts: tango4: Add alias for eth0 http://elinux.org/Device_Tree_Usage#aliases_Node Signed-off-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/boot/dts/tango4-vantage-1172.dts | 1 + 1 file changed, 1 insertion(+) commit d3f4759bcf6171c77e1a4ffef94ba85296df4bc6 Author: Russell King Date: Tue Jan 17 11:17:35 2017 +0000 arm64: dts: marvell: Add DT for MACCHIATOBin board Add a cut-down version of the DTS file for the community board MACCHIATOBin from SolidRun based on Marvell Armada 8040 SoC to suit the current mainlined Armada 8040 state. This brings support for mainly SATA, SPI flash and UART. The USB descriptions are included but are not tested in this form due to the lack of mainline GPIO. Signed-off-by: Konstantin Porotchkin Acked-by: Rabeeh Khoury Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/Makefile | 1 + arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 138 ++++++++++++++++++++++ 2 files changed, 139 insertions(+) commit a3fe1d5dce142400945ecdc0d2e91b1645b6ebfa Author: Florian Fainelli Date: Tue Jan 17 10:22:24 2017 -0800 ARM: dts: kirkwood-rd88f6281: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-rd88f6281-a.dts | 9 +++--- arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 11 ++++++++ arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 44 +++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 5 deletions(-) commit cd0cc11acba94299247926243c33df865a2949b3 Author: Florian Fainelli Date: Tue Jan 17 10:22:23 2017 -0800 ARM: dts: kirkwood-mv88f6281gtw-ge: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 69e8e6aead712f919231b1bc57eb136b2db761a9 Author: Florian Fainelli Date: Tue Jan 17 10:22:22 2017 -0800 ARM: dts: kirkwood-linksys-viper: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-linksys-viper.dts | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 5f84613ba19ca455ca8f0f92554a593212e1bdc0 Author: Florian Fainelli Date: Tue Jan 17 10:22:21 2017 -0800 ARM: dts: kirkwood-dir665: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Tested-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-dir665.dts | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 499400c9ac20b5f81f037018e33bd6d765613ba9 Author: Florian Fainelli Date: Tue Jan 17 10:22:20 2017 -0800 ARM: dts: armada-xp-linksys-mamba: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Tested-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit c0405563a61312cda8aa9ccda28c807974670ed6 Author: Florian Fainelli Date: Tue Jan 17 10:22:19 2017 -0800 ARM: dts: armada-388-clearfog: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Acked-by: Russell King Signed-off-by: Florian Fainelli Tested-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 455b82f03f5204d28dc820ee451554da7c9b93e2 Author: Florian Fainelli Date: Tue Jan 17 10:22:18 2017 -0800 ARM: dts: armada-385-linksys: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 52 ++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 4cb2ec8cad8c82cd7cfd19edcacd846861d6e703 Author: Florian Fainelli Date: Tue Jan 17 10:22:17 2017 -0800 ARM: dts: armada-370-rd: Utilize new DSA binding Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled. Tested-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-rd.dts | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit ef8d02d4a2c36f7a93e74c95a9c419353b310117 Author: Alexandre Belloni Date: Thu Jan 19 01:46:58 2017 +0100 ARM: dts: at91: Enable DMA on sama5d4_xplained console Enable DMA on usart3 to get a more reliable console. This is especially useful for automation and kernelci were a kernel with PROVE_LOCKING enabled is quite susceptible to character loss, resulting in tests failure. Cc: stable #v4.1+ Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 ++ 1 file changed, 2 insertions(+) commit 3dd69e3dd21969a34406862ae299538e2e6387e7 Author: Saeed Mahameed Date: Wed Dec 28 17:07:17 2016 +0200 net/mlx5e: Reorder update stats Reorder update stats flow to update most important counters last, to get more accurate results. New update order: - PCIe counters - Port counters - Vport counters - Queue counters - Software counters Signed-off-by: Saeed Mahameed Reviewed-by: Gal Pressman drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 701052c578195e6e02a22647fa6fd1c90c31dafd Author: Gal Pressman Date: Wed Dec 14 17:40:41 2016 +0200 net/mlx5: Move cached hca caps to designated caps struct The caps structure consists of hca caps and port/management caps, all under one roof. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++-- include/linux/mlx5/device.h | 34 +++++++++++------------ include/linux/mlx5/driver.h | 4 +-- 4 files changed, 23 insertions(+), 23 deletions(-) commit 0f7f348192a9ba445463261ecc15a63d0ba48722 Author: Gal Pressman Date: Thu Nov 17 13:46:02 2016 +0200 net/mlx5e: Expose PCIe statistics to ethtool This patch exposes PCIe performance counters, queried with ethtool -S . Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 9 +++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 23 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 22 ++++++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) commit 8ed1a6306dc7892b63be7cdb1e3b1123265f42ff Author: Gal Pressman Date: Thu Nov 17 13:46:01 2016 +0200 net/mlx5: Add MPCNT register infrastructure Add the needed infrastructure for future use of MPCNT register. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 4 ++++ include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 5db0a4f64c042f6f64bd645488278f7a5df33c07 Author: Gal Pressman Date: Tue Aug 23 12:23:29 2016 +0300 net/mlx5e: Expose physical layer statistical counters to ethtool Use ethtool -S to query physical layer statistical counters including: - rx_symbol_errors_phy: Number of symbol errors that were not corrected by FEC correction algorithm or that FEC was not active on this interface. - rx_corrected_bits_phy: Number of corrected bits according to active FEC (RS/FC). Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 +++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 18 +++++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) commit d8dc0508c50f838f8abcf023cd74ca9a0f86b5a8 Author: Gal Pressman Date: Tue Sep 27 17:04:51 2016 +0300 net/mlx5: Add PPCNT physical layer statistical group infrastructure Add the needed infrastructure for future use of PPCNT physical layer statistical group. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/device.h | 1 + include/linux/mlx5/mlx5_ifc.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 71862561f3a62015a11de16d1c306481e8415c08 Author: Gal Pressman Date: Thu Dec 8 16:03:31 2016 +0200 net/mlx5: Query and cache PCAM, MCAM registers on initialization On load_one, we now cache our capabilities registers internally, similar to QUERY_HCA_CAP. Capabilities can later be queried using macros introduced in this patch. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 20 ++++++++++++++++++++ include/linux/mlx5/device.h | 6 ++++++ include/linux/mlx5/driver.h | 4 ++++ 3 files changed, 30 insertions(+) commit c835ad64683bd3e2d1b31ed2cb1ff4366932edb1 Author: Gal Pressman Date: Thu Dec 8 15:56:00 2016 +0200 net/mlx5: Implement PCAM, MCAM access register commands Introduced registers will expose capabilities of new registers and features related to port/management. Driver will query MCAM and PCAM in order to avoid failing on old firmwares with lack of support. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/port.c | 24 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit cfdcbceaeffc669b70d904d80a2df9c86c232566 Author: Gal Pressman Date: Thu Dec 8 15:52:00 2016 +0200 net/mlx5: Expose PCAM, MCAM registers infrastructure PCAM: Ports capabilities mask register. MCAM: Management capabilities mask register. PCAM and MCAM registers will provide information regarding firmware support for different features, in order to avoid cases where new driver combined with old firmware results in syndromes (for ex. PCIe counters before this patchset). Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 16 ++++++++++++ include/linux/mlx5/driver.h | 2 ++ include/linux/mlx5/mlx5_ifc.h | 60 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 1 deletion(-) commit 8a271746a264c1bd05fd98da1d96d97b79799970 Author: Mohamad Haj Yahia Date: Sun Oct 9 17:05:31 2016 +0300 net/mlx5e: Receive s-tagged packets in promiscuous mode Today when the driver enter to promiscuous mode or vlan filter is disabled, we add flow rule to receive any c-taggd packets, therefore s-tagged packets are dropped. In order to receive s-tagged packets as well we need to add flow rule to receive any s-tagged packet. Fixes: 7cb21b794baa ('net/mlx5e: Rename en_flow_table.c to en_fs.c') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 83 +++++++++++++++++++------ 2 files changed, 68 insertions(+), 20 deletions(-) commit 105433659d394b70dc3b6ceb65d0c1673e14cee1 Author: Mohamad Haj Yahia Date: Sun Oct 9 16:25:43 2016 +0300 net/mlx5: Add support to s-tag in mlx5 firmware interface Add svlan_tag and rename vlan_tag to cvlan_tag in flow table entry match param. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 12 ++++++------ include/linux/mlx5/mlx5_ifc.h | 12 +++++++----- 6 files changed, 24 insertions(+), 22 deletions(-) commit ee7f12205abc21c2e83b266636e27b1cb2fd4e21 Author: Eugenia Emantayev Date: Mon Aug 22 14:57:41 2016 +0300 net/mlx5e: Implement 1PPS support This patch enables the 1PPS IN and 1PPS OUT support according to the advertised HCA capability. Single pin may be configured to one of the above mutual exclusive functions via standard Linux tools and APIs. For example, testptp open source application. Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 218 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 +- 3 files changed, 232 insertions(+), 1 deletion(-) commit f9a1ef720e9e32bc6a4a382c15ac77d62749c79e Author: Eugenia Emantayev Date: Mon Oct 10 16:05:53 2016 +0300 net/mlx5: Add MTPPS and MTPPSE registers infrastructure Implement query and set functionality for MTPPS and MTPPSE registers. MTPPS (Management Pulse Per Second) provides the device PPS capabilities, configures the PPS in and out modules and holds the PPS in time stamp. Query MTPPS is supported only when HCA_CAP.pps is set and modify is supported when HCA_CAP.pps_modify is set. MTPPSE (Management Pulse Per Second Event) configures the different event generation modes for PPS. Supported when HCA_CAP.pps is set. Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 9 ++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 ++ drivers/net/ethernet/mellanox/mlx5/core/port.c | 48 +++++++++++++++++ include/linux/mlx5/device.h | 18 +++++++ include/linux/mlx5/driver.h | 3 ++ include/linux/mlx5/mlx5_ifc.h | 60 +++++++++++++++++++++- 6 files changed, 142 insertions(+), 1 deletion(-) commit 712bfef60912d91033cb25739f7444d5b8d8c59f Author: Eli Cohen Date: Fri Dec 16 10:30:15 2016 -0600 net/mlx5: Fix version printout in case of health issue Firmware representation of the firmware version on the health buffer has changed for newer device. The representation in the initialization segment does not and will not change. In addition, we print the health buffer firmware version as a raw hex number. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit f82eed45239988db125d1fc8c52994f3684324c6 Author: Leon Romanovsky Date: Thu Dec 1 10:34:57 2016 +0200 net/mlx5: Remove information print after attempt to load mlx5_ib module Infiniband part of mlx5 driver can be compiled as a module or as a part of bzImage (compiled in). In the second case, the call to request_module will return an error -ENOENT. It will cause to a misleading print "failed request module on mlx5_ib". This patch removes this print, In order to comply with mlx4. Fixes: f66f049fb738 ("net/mlx5_core: Request the mlx5 IB module on driver load") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5205761d7a2ecf7af559f285b061da2345ea79ac Author: Jaechul Lee Date: Tue Jan 17 14:54:39 2017 +0900 arm64: dts: exynos: Add TM2 touchkey node Add DT node for TM2 touchkey device. Signed-off-by: Beomho Seo Signed-off-by: Jaechul Lee Signed-off-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4e6118974c7ab5d65e77fe8c47c87a85e9c7ed7d Author: Neil Armstrong Date: Thu Jan 19 09:21:57 2017 +0100 ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency In order to keep consistency naming with the Nexbox A1 DTS file, remove the S912 SoC name in the GXM DT files. Suggested-by: Andreas Färber Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 4 +- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 77 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxm-q201.dts | 58 ++++++++++++++++ .../arm64/boot/dts/amlogic/meson-gxm-s912-q200.dts | 77 ---------------------- .../arm64/boot/dts/amlogic/meson-gxm-s912-q201.dts | 58 ---------------- 5 files changed, 137 insertions(+), 137 deletions(-) commit 079a248b0e4c24432dc4838cad333b2e759813e0 Author: Yong Zhi Date: Wed Jan 11 21:18:05 2017 -0800 ASoC: Intel: boards: Remove ignore_suspend for WoV streams When Ref capture is used during S0IX, only the DSP pipelines are needed, thus remove the ignore_suspend for WoV streams so that DMA can be suspended, but keep them for WoV endpoints. Signed-off-by: Yong Zhi Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 1 - 1 file changed, 1 deletion(-) commit 0623013ca629d311be2114314ddaf220604493d3 Author: Suman Anna Date: Thu Jan 19 09:44:11 2017 -0800 ARM: dts: keystone-k2e: Add PSC reset controller node The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node. Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2E SoCs. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2ae4dad3523be2779a5844348c8bf84d1c9c1584 Author: Suman Anna Date: Thu Jan 19 09:44:11 2017 -0800 ARM: dts: keystone-k2l: Add PSC reset controller node The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node. Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2L SoCs. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2l.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e695c71892e711effa3df6ca3c4027fccba53df4 Author: Suman Anna Date: Thu Jan 19 09:44:11 2017 -0800 ARM: dts: keystone-k2hk: Add PSC reset controller node The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node. Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2H SoCs. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2hk.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e2dd60f9a5ff224518c8b5c07a95e72e87ee9895 Author: Suman Anna Date: Thu Jan 19 09:44:11 2017 -0800 ARM: dts: keystone: Add PSC node The Power Sleep Controller (PSC) module is responsible for the power and clock management for each of the peripherals present on the SoC. Represent this as a syscon node so that multiple users can leverage it for various functionalities. Signed-off-by: Suman Anna [afd@ti.com: add simple-mfd compatible] Signed-off-by: Andrew F. Davis Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit a2735c3067e7c25c46433c1d73b97d4d4e512de8 Author: Suman Anna Date: Thu Jan 19 09:36:08 2017 -0800 ARM: Keystone: Enable ARCH_HAS_RESET_CONTROLLER The Keystone 2 family of SoCs will use various Reset Controller drivers for managing the resets of remote processor devices like DSPs on the SoC, so select the ARCH_HAS_RESET_CONTROLLER option by default to enable the Reset framework. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/mach-keystone/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6f897f51c4181397bf811d260eb7fef8d7ccd14f Author: Gabriel Krisman Bertazi Date: Thu Jan 19 11:48:06 2017 -0200 drm: qxl: Open code teardown function for qxl This avoids using the deprecated drm_put_dev() and unload() hook interfaces in the qxl driver. Signed-off-by: Gabriel Krisman Bertazi Cc: Dave Airlie Cc: Daniel Vetter Cc: Gustavo Padovan Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170119134806.8926-2-krisman@collabora.co.uk drivers/gpu/drm/qxl/qxl_drv.c | 11 +++++++++-- drivers/gpu/drm/qxl/qxl_drv.h | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 16 ---------------- 3 files changed, 9 insertions(+), 20 deletions(-) commit 2b65d5677a797f8b53e97548003d1f38677fee81 Author: Gabriel Krisman Bertazi Date: Thu Jan 19 11:48:05 2017 -0200 drm: qxl: Open code probing sequence for qxl This avoids using the deprecated drm_get_pci_dev() and load() hook interfaces in the qxl driver. The only tricky part is to ensure TTM debugfs initialization happens after the debugfs root node is created, which is done by moving that code into the debufs_init() hook. Tested on qemu with igt and running a WM on top of X. Changes since v1: - Drop verification for primary minor in qxl_debugsfs_init. Changes since V2: - Put new header together with other debugfs headers. Signed-off-by: Gabriel Krisman Bertazi Cc: Dave Airlie Cc: Daniel Vetter Cc: Gustavo Padovan Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170119134806.8926-1-krisman@collabora.co.uk drivers/gpu/drm/qxl/qxl_debugfs.c | 10 +++++++ drivers/gpu/drm/qxl/qxl_drv.c | 58 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/qxl/qxl_drv.h | 6 +++- drivers/gpu/drm/qxl/qxl_kms.c | 40 ++------------------------- drivers/gpu/drm/qxl/qxl_ttm.c | 8 +----- 5 files changed, 74 insertions(+), 48 deletions(-) commit 1e4c2830c36914feb7d03916e21f7c2e45dc2055 Author: Viresh Kumar Date: Fri Jan 13 12:06:48 2017 +0530 selftest: cpufreq: Add special tests This patch adds support for special tests which were reported on the PM list over the years, which helped catching core bugs by several developers. Signed-off-by: Viresh Kumar Signed-off-by: Shuah Khan tools/testing/selftests/cpufreq/Makefile | 2 +- tools/testing/selftests/cpufreq/governor.sh | 7 ++ tools/testing/selftests/cpufreq/main.sh | 25 ++++- tools/testing/selftests/cpufreq/special-tests.sh | 115 +++++++++++++++++++++++ 4 files changed, 146 insertions(+), 3 deletions(-) commit 6751faf3d8338d525e8d9c35ae87cbfed48ce958 Author: Viresh Kumar Date: Fri Jan 13 12:06:47 2017 +0530 selftest: cpufreq: Add support to test cpufreq modules This patch adds support for cpufreq modules like cpufreq drivers and cpufreq governors. The tests will insert the modules in different orders and them perform basic cpufreq tests. The modules are then removed from the kernel. Signed-off-by: Viresh Kumar Signed-off-by: Shuah Khan tools/testing/selftests/cpufreq/Makefile | 2 +- tools/testing/selftests/cpufreq/main.sh | 45 +++++- tools/testing/selftests/cpufreq/module.sh | 243 ++++++++++++++++++++++++++++++ 3 files changed, 284 insertions(+), 6 deletions(-) commit b03eaf8dbac5534590ec52612f789d8fb292af9c Author: Viresh Kumar Date: Fri Jan 13 12:06:46 2017 +0530 selftest: cpufreq: Add suspend/resume/hibernate support This patch adds support to test basic suspend/resume and hibernation to the cpufreq selftests. Signed-off-by: Viresh Kumar Signed-off-by: Shuah Khan tools/testing/selftests/cpufreq/cpufreq.sh | 40 ++++++++++++++++++++++++++++++ tools/testing/selftests/cpufreq/main.sh | 14 +++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) commit e66d5b673741cf6b7da250da9f84a165b1e4342d Author: Viresh Kumar Date: Fri Jan 13 12:06:45 2017 +0530 selftest: cpufreq: Add support for cpufreq tests This patch adds supports for basic cpufreq tests, which can be performed independent of any platform. It does basic tests for now, like - reading all cpufreq files - trying to update them - switching frequencies - switching governors This can be extended to have more specific tests later on. Signed-off-by: Viresh Kumar Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpufreq/Makefile | 8 ++ tools/testing/selftests/cpufreq/cpu.sh | 84 ++++++++++++ tools/testing/selftests/cpufreq/cpufreq.sh | 201 ++++++++++++++++++++++++++++ tools/testing/selftests/cpufreq/governor.sh | 146 ++++++++++++++++++++ tools/testing/selftests/cpufreq/main.sh | 128 ++++++++++++++++++ 6 files changed, 568 insertions(+) commit 32a34441a9bdd95ab79dc018367de89858efda1c Author: Murali Karicheri Date: Thu Jan 19 09:31:48 2017 -0800 ARM: keystone: dts: fix netcp clocks and add names Fix the pa clock to point to the clkpa which has clock rate of 1/3 of PA PLL clock and add clock names. Signed-off-by: Murali Karicheri Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e-netcp.dtsi | 3 ++- arch/arm/boot/dts/keystone-k2hk-netcp.dtsi | 3 ++- arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 6320303fb27ae46919c13b2f9ebf3f3a3ad63859 Author: Stafford Horne Date: Thu Jan 12 00:16:07 2017 +0900 selftests: Add intel_pstate to TARGETS This test was missing from the TARGETS list. The test requires patches to cpupower to pass correctly. Cc: Prarit Bhargava Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 1 + 1 file changed, 1 insertion(+) commit 29fa1d436e96954ebcdac0beecb2e0d96c26350d Author: Stafford Horne Date: Thu Jan 12 00:16:06 2017 +0900 selftests/intel_pstate: Update makefile to match new style Recent changes from Bamvor (88baa78d1f318) have standardized the variable names like TEST_GEN_FILES and removed the need for make targets all and clean. These changes bring the intel_pstate test inline with those changes. Cc: Prarit Bhargava Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit aff985fd07cf785fbd1544194f8fae08333e523e Author: Stafford Horne Date: Thu Jan 12 00:16:05 2017 +0900 selftests/intel_pstate: Fix warning on loop index overflow The build was showing the warning: aperf.c:60:27: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations] for (i=0; i<0x8fffffff; i++) { This change sets i, cpu and fd to unsigned int as they should not need to be signed. Cc: Prarit Bhargava Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/aperf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4da39ceb269cee9f96815a54f97931a7e59f9e7f Author: Stafford Horne Date: Thu Jan 12 00:16:04 2017 +0900 cpupower: Restore format of frequency-info limit The intel_pstate kselftest expects that the output of `cpupower frequency-info -l | tail -1 | awk ' { print $1 } '` to get frequency limits. This does not work after the following two changes. - 562e5f1a3: rework the "cpupower frequency-info" command (Jacob Tanenbaum) removed parsable limit output - ce512b840: Do not analyse offlined cpus (Thomas Renninger) added newline to break limit parsing more This change preserves human readable output if wanted as well as parsable output for scripts/tests. Cc: Thomas Renninger Cc: "Shreyas B. Prabhu" Cc: "Rafael J. Wysocki" Cc: linux-pm@vger.kernel.org Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/power/cpupower/utils/cpufreq-info.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 99c21f6d004d07667d7345e56e44a5b805e1dfa9 Author: Stafford Horne Date: Thu Jan 12 00:11:16 2017 +0900 selftests/futex: Add headers to makefile dependencies The futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up. Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/testing/selftests/futex/functional/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 083f345151938706d33969b37b92e7e13ab02b3e Author: Stafford Horne Date: Thu Jan 12 00:11:14 2017 +0900 selftests/futex: Add stdio used for logging Fix missing printf compile warnings. Signed-off-by: Stafford Horne Signed-off-by: Shuah Khan tools/testing/selftests/futex/include/logging.h | 1 + 1 file changed, 1 insertion(+) commit 4567d686f5c6d955e57a3afa1741944c1e7f4033 Author: Volodymyr Bendiuga Date: Thu Jan 19 17:05:04 2017 +0100 phy: increase size of MII_BUS_ID_SIZE and bus_id Some bus names are pretty long and do not fit into 17 chars. Increase therefore MII_BUS_ID_SIZE and phy_fixup.bus_id to larger number. Now mii_bus.id can host larger name. Signed-off-by: Volodymyr Bendiuga Signed-off-by: Magnus Öberg Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/linux/phy.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c2594d804d5c8033861d44840673d852d98508c1 Author: Andrei.Pistirica@microchip.com Date: Thu Jan 19 17:56:15 2017 +0200 macb: Common code to enable ptp support for MACB/GEM This patch does the following: - MACB/GEM-PTP interface - registers and bitfields for TSU - capability flags to enable PTP per platform basis Signed-off-by: Andrei Pistirica Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 32 +++++++++++++++- drivers/net/ethernet/cadence/macb.h | 74 +++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 2 deletions(-) commit 54c30f604dcc110dba21db7c2c09ddf25b65acbe Author: Tobias Klauser Date: Thu Jan 19 16:04:25 2017 +0100 net: caif: Remove unused stats member from struct chnl_net The stats member of struct chnl_net is used nowhere in the code, so it might as well be removed. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/caif/chnl_net.c | 1 - 1 file changed, 1 deletion(-) commit c92d781f1a5ea19708b1e1e2b85a3fbd4a738b30 Author: Rob Herring Date: Mon Jan 16 16:54:31 2017 -0600 tty: constify tty_ldisc_receive_buf buffer pointer This is needed to work with the client operations which uses const ptrs. Really, the flags pointer could be const, too, but this would be a tree wide fix. Signed-off-by: Rob Herring Reviewed-by: Andy Shevchenko Reviewed-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 2 +- include/linux/tty.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3086365db61ec00d206afa2dbaec4b3d771a38f1 Author: Rob Herring Date: Mon Jan 16 16:54:30 2017 -0600 tty_port: make tty_port_register_device wrap tty_port_register_device_attr tty_register_device is just a wrapper for tty_register_device_attr with NULL passed for drvdata and attr_grp. So similarly make tty_port_register_device a wrapper of tty_port_register_device_attr so that additions don't have to be made in both functions. Signed-off-by: Rob Herring Reviewed-by: Andy Shevchenko Reviewed-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ed3f0af8c0b7e161efc5ba7228ca4cbd747c903d Author: Alan Cox Date: Mon Jan 16 16:54:29 2017 -0600 tty_port: allow a port to be opened with a tty that has no file handle Let us create tty objects entirely in kernel space. Untested proposal to show why all the ideas around rewriting half the uart stack are not needed. With this a kernel created non file backed tty object could be used to handle data, and set terminal modes. Not all ldiscs can cope with this as N_TTY in particular has to work back to the fs/tty layer. The tty_port code is however otherwise clean of file handles as far as I can tell as is the low level tty port write path used by the ldisc, the configuration low level interfaces and most of the ldiscs. Currently you don't have any exposure to see tty hangups because those are built around the file layer. However a) it's a fixed port so you probably don't care about that b) if you do we can add a callback and c) you almost certainly don't want the userspace tear down/rebuild behaviour anyway. This should however be sufficient if we wanted for example to enumerate all the bluetooth bound fixed ports via ACPI and make them directly available. It doesn't deal with the case of a user opening a port that's also kernel opened and that would need some locking out (so it returned EBUSY if bound to a kernel device of some kind). That needs resolving along with how you "up" or "down" your new bluetooth device, or enumerate it while providing the existing tty API to avoid regressions (and to debug). Signed-off-by: Alan Cox Reviewed-by: Andy Shevchenko Reviewed-By: Sebastian Reichel Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 2 +- drivers/tty/tty_port.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 39b7b6a6247568f99df059e8a4c9bd674f6b99ac Author: Arnd Bergmann Date: Thu Jan 19 10:45:31 2017 +0100 net/sched: cls_flower: reduce fl_change stack size The new ARP support has pushed the stack size over the edge on ARM, as there are two large objects on the stack in this function (mask and tb) and both have now grown a bit more: net/sched/cls_flower.c: In function 'fl_change': net/sched/cls_flower.c:928:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] We can solve this by dynamically allocating one or both of them. I first tried to do it just for the mask, but that only saved 152 bytes on ARM, while this version just does it for the 'tb' array, bringing the stack size back down to 664 bytes. Fixes: 99d31326cbe6 ("net/sched: cls_flower: Support matching on ARP") Signed-off-by: Arnd Bergmann Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit ec7c98ec9b8dd2c04ed75cad88e91eebedbb1a25 Author: Heiko Stuebner Date: Thu Jan 19 17:04:44 2017 +0100 ARM: dts: rockchip: add soc-specific uart compatibles for rk3066/rk3188 The serial IPs in Rockchip socs are based on Designware uarts and thus bind against the snps,dw-apb-uart compatible. On all newer socs we also carry around per-soc compatibles that allow us to have more specific drivers in the future - if needed. The cortex-a9 socs rk3066 and rk3188 that were added first don't have those yet, so add them for completenes sake. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3066a.dtsi | 4 ++++ arch/arm/boot/dts/rk3188.dtsi | 4 ++++ 2 files changed, 8 insertions(+) commit 14b4dbafa7e7e13323e402efd7723aafa391d69a Author: Robin Murphy Date: Fri Jan 6 18:58:16 2017 +0530 Revert "iommu/arm-smmu: Set PRIVCFG in stage 1 STEs" This reverts commit df5e1a0f2a2d779ad467a691203bcbc74d75690e. Now that proper privileged mappings can be requested via IOMMU_PRIV, unconditionally overriding the incoming PRIVCFG becomes the wrong thing to do, so stop it. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e19898077cfb642fe151ba22981e795c74d9e114 Author: Sricharan R Date: Fri Jan 6 18:58:15 2017 +0530 iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged' Currently the driver sets all the device transactions privileges to UNPRIVILEGED, but there are cases where the iommu masters wants to isolate privileged supervisor and unprivileged user. So don't override the privileged setting to unprivileged, instead set it to default as incoming and let it be controlled by the pagetable settings. Acked-by: Will Deacon Signed-off-by: Sricharan R Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b2354dbcc7b232b50f26dfd47fd4c529edfc20a Author: Mitchel Humpherys Date: Fri Jan 6 18:58:14 2017 +0530 dmaengine: pl330: Make sure microcode is privileged The PL330 is hard-wired such that instruction fetches on both the manager and channel threads go out onto the bus with the "privileged" bit set. This can become troublesome once there is an IOMMU or other form of memory protection downstream, since those will typically be programmed by the DMA mapping subsystem in the expectation of normal unprivileged transactions (such as the PL330 channel threads' own data accesses as currently configured by this driver). To avoid the case of, say, an IOMMU blocking an unexpected privileged transaction with a permission fault, use the newly-introduced DMA_ATTR_PRIVILEGED attribute for the mapping of our microcode buffer. That way the DMA layer can do whatever it needs to do to make things continue to work as expected on more complex systems. Cc: Dan Williams Cc: Vinod Koul Reviewed-by: Robin Murphy Tested-by: Robin Murphy Acked-by: Will Deacon Acked-by: Vinod Koul Signed-off-by: Mitchel Humpherys [rm: remove now-redundant local variable, clarify commit message] Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/dma/pl330.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7d2822dfea122acd498a8ec4481af5d51777fec1 Author: Sricharan R Date: Fri Jan 6 18:58:13 2017 +0530 arm/dma-mapping: Implement DMA_ATTR_PRIVILEGED The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Adding it to the arm dma-mapping.c so that the ARM32 DMA IOMMU mapper can make use of it. Signed-off-by: Sricharan R Reviewed-by: Will Deacon Signed-off-by: Will Deacon arch/arm/mm/dma-mapping.c | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) commit 737c85ca1c3af4f97acb61cd53415ec039b31111 Author: Mitchel Humpherys Date: Fri Jan 6 18:58:12 2017 +0530 arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Mitchel Humpherys Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 6 +++--- drivers/iommu/dma-iommu.c | 12 +++++++++--- include/linux/dma-iommu.h | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) commit b2fb366425ceb85dca56afa538257ec5a2c4f6d1 Author: Mitchel Humpherys Date: Fri Jan 6 18:58:11 2017 +0530 common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute This patch adds the DMA_ATTR_PRIVILEGED attribute to the DMA-mapping subsystem. Some advanced peripherals such as remote processors and GPUs perform accesses to DMA buffers in both privileged "supervisor" and unprivileged "user" modes. This attribute is used to indicate to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-doc@vger.kernel.org Reviewed-by: Robin Murphy Tested-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Mitchel Humpherys Signed-off-by: Will Deacon Documentation/DMA-attributes.txt | 10 ++++++++++ include/linux/dma-mapping.h | 7 +++++++ 2 files changed, 17 insertions(+) commit 5baf1e9d0bb223b086c422b880359c9fe2ee1476 Author: Robin Murphy Date: Fri Jan 6 18:58:10 2017 +0530 iommu/io-pgtable-arm-v7s: Add support for the IOMMU_PRIV flag The short-descriptor format also allows privileged-only mappings, so let's wire it up. Signed-off-by: Robin Murphy Tested-by: Sricharan R Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e7468a23daec1a7737a004c659fd041ddff8b918 Author: Jeremy Gebben Date: Fri Jan 6 18:58:09 2017 +0530 iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Allow the creation of privileged mode mappings, for stage 1 only. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Jeremy Gebben Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 579b2a65d245c093d3e63845c320b9321f112b75 Author: Mitchel Humpherys Date: Fri Jan 6 18:58:08 2017 +0530 iommu: add IOMMU_PRIV attribute Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys Acked-by: Will Deacon Signed-off-by: Will Deacon include/linux/iommu.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 1de777fed54dfa93e166a3c934c5846920b86f0c Author: Jeeja KP Date: Tue Jan 10 17:57:48 2017 +0530 ASoC: hdac_hdmi: Enable pin and converter in prepare Instead of enabling pin and cvt in pcm_open(), need to restore pin and cvt state after system resume to restart the playback which is paused/stopped before system suspend. So enable pin and cvt in playback_prepare and call prepare when trigger cmd is paused/started and resume to reconfigure pin and cvt. Signed-off-by: Sachin Mokashi Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit a700a1e65aa3ee76d2e8c58150ee7b7272d93608 Author: Jeeja KP Date: Tue Jan 10 17:57:47 2017 +0530 ASoC: Intel: Skylake: set the resume point to LPIB In system suspend, the firmware pipelines will be deleted and there is no need to save the pipeline context. Driver will save the DPIB and LPIB pointers in suspend. In system resume, the firmware pipelines will be created again and the RD/RW pointers in the Firmware buffer points to the base address. So need to fetch the non-played data again to firmware buffer. LPIB indicates the HW rendered position. Instead of setting DPIB as resume point, set it to LPIB to restore from the HW render position so that DMA would fetch the non-played data one more time. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cbfdf87f422211b9a1f2845acb2e39597b3ef7e Author: Jeeja KP Date: Tue Jan 10 17:57:46 2017 +0530 ASoC: Intel: Skylake: Don't reset pass-through pipe in BE prepare When pipe is pass-through, BE and FE modules are defined inside a pipe, reset of pipe will be done in FE DAI prepare. So don't reset in the BE prepare. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e96128235b0fbddff1228b37033077397dbd21d9 Author: Ville Syrjälä Date: Thu Dec 22 16:04:42 2016 +0200 drm/i915: Remove the double handling of 'flags from intel_mode_from_pipe_config() We're trying to copy the flags from the adjusted mode to the passed in mode twice. Once is enough. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161222140442.7204-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 1 - 1 file changed, 1 deletion(-) commit a8cd6da0c0d5b9dc7533f1d88098e9852dc2d5aa Author: Ville Syrjälä Date: Thu Dec 22 16:04:41 2016 +0200 drm/i915: Remove crtc->config usage from intel_modeset_readout_hw_state() crtc->config is on its way out. Let's reduce our dependence on it a little bit by removing it from intel_modeset_readout_hw_state(). Also replace crtc->acttive checks with crtc_state->base.active checks. Cc: Maarten Lankhorst Suggested-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161222140442.7204-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 38 +++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 7e79dadce222e06e0c30a77280f3426014bee185 Author: Jens Axboe Date: Thu Jan 19 07:58:59 2017 -0700 blk-mq: stop hardware queue in blk_mq_delay_queue() The run handler we register for the delayed work requires that the queue be stopped, yet we leave that up to the caller. Let's move it into blk_mq_delay_queue() itself, so that the API is sane. This fixes a stall with SCSI, where it calls blk_mq_delay_queue() without having stopped the queue. Hence the queue is never run. Reported-by: Hannes Reinecke Fixes: 70f4db639c5b ("blk-mq: add blk_mq_delay_queue") Signed-off-by: Jens Axboe block/blk-mq.c | 1 + 1 file changed, 1 insertion(+) commit e18a80acd1365e91e3efcd69942d9073936cf851 Author: David E. Box Date: Thu Jan 19 16:25:21 2017 +0200 spi: pxa2xx: Add support for Intel Gemini Lake Gemini Lake reuses the same LPSS SPI configuration as Broxton Signed-off-by: David E. Box Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8cecb07d70e761eb0112f921d939b9ab2ea2171f Author: Jens Axboe Date: Thu Jan 19 07:39:17 2017 -0700 blk-mq-tag: remove redundant check for 'data->hctx' being non-NULL We used to pass in NULL for hctx for reserved tags, but we don't do that anymore. Hence the check for whether hctx is NULL or not is now redundant, kill it. Reported-by: Dan Carpenter Fixes: a642a158aec6 ("blk-mq-tag: cleanup the normal/reserved tag allocation") Signed-off-by: Jens Axboe block/blk-mq-tag.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 610d886c0c22fa7504e817b6d03c402de64b0264 Author: Jens Axboe Date: Thu Jan 19 07:10:13 2017 -0700 elevator: fix unnecessary put of elevator in failure case We already checked that e is NULL, so no point in calling elevator_put() to free it. Reported-by: Dan Carpenter Fixes: dc877dbd088f ("blk-mq-sched: add framework for MQ capable IO schedulers") Signed-off-by: Jens Axboe block/elevator.c | 4 ---- 1 file changed, 4 deletions(-) commit 068f530b3f274d313395663bf8d674798d4858c6 Author: Steven Rostedt (VMware) Date: Thu Jan 19 08:57:41 2017 -0500 tracing: Add the constant count for branch tracer The unlikely/likely branch profiler now gets called even if the if statement is a constant (always goes in one direction without a compare). Add a value to denote this in the likely/unlikely tracer as well. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_branch.c | 17 +++++++++-------- kernel/trace/trace_entries.h | 6 ++++-- 2 files changed, 13 insertions(+), 10 deletions(-) commit 134e6a034cb004ed5acd3048792de70ced1c6cf5 Author: Steven Rostedt (VMware) Date: Thu Jan 19 08:57:14 2017 -0500 tracing: Show number of constants profiled in likely profiler Now that constants are traced, it is useful to see the number of constants that are traced in the likely/unlikely profiler in order to know if they should be ignored or not. The likely/unlikely will display a number after the "correct" number if a "constant" count exists. Signed-off-by: Steven Rostedt (VMware) include/linux/compiler.h | 15 ++++++---- kernel/trace/trace_branch.c | 68 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 18 deletions(-) commit 7abbd11f344aa7abe29befb218774a1ea26018ac Author: Chris Wilson Date: Thu Jan 19 11:37:49 2017 +0000 drm/i915: Release temporary load-detect state upon switching After we call drm_atomic_commit() on the load-detect state, we can free our local reference. Upon restore, we only apply and free the previous state. Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Daniel Vetter Cc: # v4.10-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170119113749.2517-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) commit 8c9faa556a37e62799fd22d7409386b1b8ddd4e7 Author: Martin Blumenstingl Date: Sun Jan 15 23:32:52 2017 +0100 tty: serial: meson: allow baud-rates higher than 115200 The vendor driver allows setting baud-rates higher than 115200 baud. There is a check in the vendor driver which prevents using more than 115200 baud during startup, however it does not have such a check in .set_termios. Higher baud-rates are often used by the bluetooth modules embedded into the SDIO wifi chips (Amlogic devices use brcmfmac based wifi chips quite often, 2000000 baud seems to be a common value for the UART baud-rate in Amlogic's "libbt"). I have tested this on a Meson GXL device with uart_A (to which the bluetooth module is connected, where initialization times out with 115200 baud) and uart_AO (which I manually set to 2000000 baud and then connected with my USB UART adapter to that). Signed-off-by: Martin Blumenstingl Acked-by: Kevin Hilman Tested-by: Andreas Färber Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ed90d20449b01beb71a4e125d291a36c80c4ad4 Author: Rob Herring Date: Mon Jan 16 16:54:28 2017 -0600 tty: move the non-file related parts of tty_release to new tty_release_struct For in-kernel tty users, we need to be able to create and destroy 'struct tty' that are not associated with a file. The creation side is fine, but tty_release() needs to be split into the file handle portion and the struct tty portion. Introduce a new function, tty_release_struct, to handle just the destroying of a struct tty. Signed-off-by: Rob Herring Reviewed-by: Andy Shevchenko Reviewed-By: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 50 ++++++++++++++++++++++++++++++++------------------ include/linux/tty.h | 1 + 2 files changed, 33 insertions(+), 18 deletions(-) commit 2cc32b18d1243d65dc312478be08dd5856b44523 Author: Arvind Yadav Date: Thu Jan 19 13:30:44 2017 +0530 tty: serial: 8250: 8250_gsc:- Handle return NULL error from ioremap_nocache Here, If ioremap_nocache will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_gsc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 28ec9570a22fcf42d5154f6a48dc5b2afdd8d9a3 Author: Lokesh Vutla Date: Thu Jan 19 15:29:38 2017 +0530 serial: omap: Add omapserial earlycon Add DT earlycon for omap_serial driver. This boot console is included with CONFIG_SERIAL_EARLYCON=y, CONFIG_OF=y, CONFIG_SERIAL_OMAP=y, and CONFIG_OF_EARLY_FLATTREE=y. This boot console is enabled with the command line option "earlycon" (without "=...") when the DT 'stdout-path' property matches a compatible uart. Signed-off-by: Lokesh Vutla Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 7951ffc9eadefded3e7c83a453930e6522c2d1b7 Author: Alexander Sverdlin Date: Wed Jan 18 10:47:33 2017 +0100 serial: pl011: Mark console as CON_ANYTIME Exactly as in a80c49db ("serial8250: Mark console as CON_ANYTIME"), to enable printk() during CPU hot-plugging. Actually most of the serial console drivers do not use per-cpu resources and can be marked as CON_ANYTIME. Signed-off-by: Alexander Sverdlin Cc: Russell King Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ea146a7dc9acbdbecadf9adc9eb2a75fa722a3f Author: Bhumika Goyal Date: Sun Jan 15 16:30:30 2017 +0530 tty: serial: constify dev_pm_ops structures Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Size details after cross compiling the .o file for blackfin architecture. File size before: text data bss dec hex filename 3572 320 16 3908 f44 tty/serial/bfin_sport_uart.o File size after: text data bss dec hex filename 3664 228 16 3908 f44 tty/serial/bfin_sport_uart.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/bfin_sport_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 216e234d66860c265f0c20d11d768e4596a8d2e6 Author: Andy Shevchenko Date: Wed Jan 11 16:31:37 2017 +0200 serial: 8250_mid: set PCI master only for DMA capable device There is no need to set PCI bus mastering when device is not doing any DMA. It includes MSI type of interrupts. Currently only UART on Denverton, which is DMA capable, might have MSI enabled. Taking above into account enable bus mastering for Denverton case only. Reviewed-by: Heikki Krogerus Reviewed-by: Jan Kiszka Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d59225f2da7e8db31aa10b458eef7e8d8f53076 Author: Andy Shevchenko Date: Wed Jan 11 16:31:36 2017 +0200 serial: 8250_mid: enable MSI on Denverton Enable MSI type of interrupt if PCI BIOS supports it. Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mid.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4831e0d9054c62c0bd134315de34e7701804707a Author: Andy Shevchenko Date: Wed Jan 11 16:31:35 2017 +0200 serial: 8250_mid: handle interrupt correctly in DMA case Starting from Tangier B0 and continuing on Anniedale the HSU DMA interrupt line is actually shared with UART. Handling them independently is racy and quite often comes with the following traceback. irq 54: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.0-rc6-edison64-86244934+ #1 Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 ffff88003f203eb0 ffffffff8130e718 ffff880032627000 ffff88003262709c ffff88003f203ed8 ffffffff810a3960 ffff880032627000 0000000000000000 ffff880032627000 ffff88003f203f10 ffffffff810a3cc7 ffff880032627000 Call Trace: [] dump_stack+0x4d/0x65 [] __report_bad_irq+0x30/0xc0 [] note_interrupt+0x227/0x270 [] handle_irq_event_percpu+0x40/0x50 [] handle_irq_event+0x27/0x50 [] handle_fasteoi_irq+0x85/0x150 [] handle_irq+0x6e/0x120 [] ? _local_bh_enable+0x1c/0x50 [] do_IRQ+0x46/0xd0 [] common_interrupt+0x7f/0x7f [] ? mwait_idle+0x7d/0x140 [] arch_cpu_idle+0xa/0x10 [] default_idle_call+0x20/0x30 [] cpu_startup_entry+0x16d/0x1d0 [] rest_init+0x6d/0x70 [] start_kernel+0x3e2/0x3ef [] x86_64_start_reservations+0x38/0x3a [] x86_64_start_kernel+0xea/0xed handlers: [] serial8250_interrupt Disabling IRQ #54 Fix this by handling interrupt only in one place. The issue is discussed here: https://github.com/andy-shev/linux/issues/5 Moreover this also fixes another bug when Rx DMA returns wrong residue and we can't rely on it. Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Acked-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman drivers/dma/hsu/pci.c | 17 +++++++++++++++-- drivers/tty/serial/8250/8250_mid.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit 6a171b29937984a5e0bf29d6577b055998f03edb Author: Jason Uy Date: Wed Jan 11 11:48:20 2017 -0800 serial: 8250_dw: Allow hardware flow control to be used In the most common use case, the Synopsys DW UART driver does not set the set_termios callback function. This prevents UPSTAT_AUTOCTS from being set when the UART flag CRTSCTS is set. As a result, the driver will use software flow control as opposed to hardware flow control. To fix the problem, the set_termios callback function is set to the DW specific function. The logic to set UPSTAT_AUTOCTS is moved so that any clock error will not affect setting the hardware flow control. Reviewed-by: Scott Branden Reviewed-by: Ray Jui Signed-off-by: Jason Uy Reviewed-by: Kefeng Wang Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c75c398be6edd3c7e40b905ec4c9db40b0685bd0 Author: Mohammed Shafi Shajakhan Date: Mon Jan 16 17:31:08 2017 +0200 ath10k: dump Copy Engine registers during firmware crash Dump Copy Engine source and destination ring addresses. This is useful information to debug firmware crashes, assertes or hangs over long run assessing the Copy Engine Register status. This also enables dumping CE register status in debugfs Crash Dump file. Screenshot: ath10k_pci 0000:02:00.0: simulating hard firmware crash ath10k_pci 0000:02:00.0: firmware crashed! (uuid 84901ff5-d33c-456e-93ee-0165dea643cf) ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000 ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1 ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.59-2 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 4159f498 ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08 ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 ath10k_pci 0000:02:00.0: firmware register dump: ath10k_pci 0000:02:00.0: [00]: 0x4100016C 0x00000000 0x009A0F2A 0x00000000 ath10k_pci 0000:02:00.0: [04]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [08]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [12]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [16]: 0x00000000 0x00000000 0x00000000 0x009A0F2A ath10k_pci 0000:02:00.0: [20]: 0x00000000 0x00401930 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [24]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [28]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [32]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [36]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [40]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [44]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [48]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [52]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: [56]: 0x00000000 0x00000000 0x00000000 0x00000000 ath10k_pci 0000:02:00.0: Copy Engine register dump: ath10k_pci 0000:02:00.0: [00]: 0x00057400 7 7 3 3 ath10k_pci 0000:02:00.0: [01]: 0x00057800 18 18 85 86 ath10k_pci 0000:02:00.0: [02]: 0x00057c00 49 49 48 49 ath10k_pci 0000:02:00.0: [03]: 0x00058000 16 16 17 16 ath10k_pci 0000:02:00.0: [04]: 0x00058400 4 4 44 4 ath10k_pci 0000:02:00.0: [05]: 0x00058800 12 12 11 12 ath10k_pci 0000:02:00.0: [06]: 0x00058c00 3 3 3 3 ath10k_pci 0000:02:00.0: [07]: 0x00059000 0 0 0 0 ieee80211 phy0: Hardware restart was requested ath10k_pci 0000:02:00.0: device successfully recovered Signed-off-by: Mohammed Shafi Shajakhan [kvalo@qca.qualcomm.com: simplify the implementation] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 39 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/ce.h | 4 ++-- drivers/net/wireless/ath/ath10k/core.h | 16 ++++++++++++++ drivers/net/wireless/ath/ath10k/debug.c | 16 ++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 3 +++ drivers/net/wireless/ath/ath10k/pci.c | 1 + 6 files changed, 77 insertions(+), 2 deletions(-) commit 0f8a2b7772f75d155c95ce3d023b81ad911234c9 Author: Mohammed Shafi Shajakhan Date: Fri Jan 13 16:00:03 2017 +0530 ath10k: fix per station tx bit rate reporting Not clearing the previous tx bit rate status results in a ambigous tx bit rate reporting to mac80211/cfg80211, for example the previous bit rate status would have been marked as legacy rate , while the current rate would have been an HT/VHT rate with the tx bit rate flags set and this results in exporting tx bitrate as legacy rate but with HT/VHT rate flags set, fix this by clearing the tx bitrate status for each event. This also fixes the below warning when we do: iw dev wlan#N station dump WARNING: net/wireless/util.c:1222 cfg80211 [] (warn_slowpath_null) from [] (cfg80211_calculate_bitrate+0x110/0x1f4 [cfg80211]) [] (cfg80211_calculate_bitrate [cfg80211]) from [] (nl80211_put_sta_rate+0x44/0x1dc [cfg80211]) [] (nl80211_put_sta_rate [cfg80211]) from [] (nl80211_set_interface+0x724/0xd70 [cfg80211]) [] (nl80211_set_interface [cfg80211]) from [] (nl80211_dump_station+0xdc/0x100 [cfg80211]) [] (nl80211_dump_station [cfg80211]) Fixes: cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4") Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 2 ++ 1 file changed, 2 insertions(+) commit 0a744d927406389e00687560d9ce3c5ab0e58db9 Author: Michal Kazior Date: Thu Jan 12 16:14:30 2017 +0100 ath10k: prevent sta pointer rcu violation Station pointers are RCU protected so driver must be extra careful if it tries to store them internally for later use outside of the RCU section it obtained it in. It was possible for station teardown to race with some htt events. The possible outcome could be a use-after-free and a crash. Only peer-flow-control capable firmware was affected (so hardware-wise qca99x0 and qca4019). This could be done in sta_state() itself via explicit synchronize_net() call but there's already a convenient sta_pre_rcu_remove() op that can be hooked up to avoid extra rcu stall. The peer->sta pointer itself can't be set to NULL/ERR_PTR because it is later used in sta_state() for extra sanity checks. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) commit dfc80387aefb78161f83732804c6d01c89c24595 Author: Laurent Pinchart Date: Wed Jan 11 16:43:40 2017 +0200 serial: sh-sci: Compute the regshift value for SCI ports SCI instances found in SH SoCs have different spacing between registers depending on the SoC. The platform data contains a regshift field that tells the driver by how many bits to shift the register offset to compute its address. We can compute the regshift value automatically based on the memory resource size, there's no need to pass the value through platform data. Fix the sh7750 SCI and sh7760 SIM port memory resources length to ensure proper computation of the regshift value. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh3/setup-sh770x.c | 1 - arch/sh/kernel/cpu/sh4/setup-sh7750.c | 3 +-- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 10 ++++++++-- drivers/tty/serial/sh-sci.c | 8 +++++++- include/linux/serial_sci.h | 1 - 5 files changed, 16 insertions(+), 7 deletions(-) commit 97ed9790c514066bfae67f22e084b505ed5af436 Author: Laurent Pinchart Date: Wed Jan 11 16:43:39 2017 +0200 serial: sh-sci: Remove unused platform data capabilities field The field isn't set by any platform but is only used internally in the driver to hold data parsed from DT. Move it to the sci_port structure. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 11 +++++++---- include/linux/serial_sci.h | 6 ------ 2 files changed, 7 insertions(+), 10 deletions(-) commit d5cb1319a91d4f1328b1c70b82c5899acd96af85 Author: Laurent Pinchart Date: Wed Jan 11 16:43:38 2017 +0200 serial: sh-sci: Remove manual break debouncing The sh-sci driver implements manual break debouncing for a few SH platforms by reading the value of the RX pin port register. This feature is optional and the driver considers all negative or zero values of the platform data port_reg field as invalid. As the four platforms that set the field to a register address all use an address higher than 0x7fffffff, the driver will always consider the value as invalid and never perform debouncing. The feature is unused, remove it. Debouncing could be implemented properly in the future using the pinctrl and GPIO APIs if desired. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 124 +++----------------------------------------- include/linux/serial_sci.h | 5 -- 2 files changed, 7 insertions(+), 122 deletions(-) commit 219fb0c1436e4893a290ba270bc0e644d02465a3 Author: Laurent Pinchart Date: Wed Jan 11 16:43:37 2017 +0200 serial: sh-sci: Remove the platform data dma slave rx/tx channel IDs Only SH platforms still use platform data for the sh-sci, and none of them declare DMA channels connected to the SCI. Remove the corresponding platform data fields and simplify the driver accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 23 ++++++----------------- include/linux/serial_sci.h | 3 --- 2 files changed, 6 insertions(+), 20 deletions(-) commit b2f20ed9c483859e2e83cfb1a3193e40760c18ad Author: Laurent Pinchart Date: Wed Jan 11 16:43:36 2017 +0200 serial: sh-sci: Extend sci_port_params with more port parameters The fifo size, overrun register and mask, sampling rate mask and error mask all depend on the port type only and don't need to be computed at runtime. Add them to the sci_port_parameters structure. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 181 ++++++++++++++++++++++++-------------------- drivers/tty/serial/sh-sci.h | 4 +- 2 files changed, 102 insertions(+), 83 deletions(-) commit daf5a8959a835bd91534e0ab049d0bfe8448536d Author: Laurent Pinchart Date: Wed Jan 11 16:43:35 2017 +0200 serial: sh-sci: Constify platform data The driver modifies platform data for internal purpose only. Fix that and make the platform data structure const. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 97 +++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 48 deletions(-) commit e095ee6b447a35ea90c523ce399d5a61753ade25 Author: Laurent Pinchart Date: Wed Jan 11 16:43:34 2017 +0200 serial: sh-sci: Replace regmap array with port parameters Turn the regmap two-dimensional array to an array of port parameters and store a pointer to the port parameters in the sci_port structure. This will allow handling additional port type dependent parameters. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 278 ++++++++++++++++++++++++-------------------- 1 file changed, 155 insertions(+), 123 deletions(-) commit 40b34ddb0385a2a698dec150b50e6b400fc373a0 Author: Laurent Pinchart Date: Wed Jan 11 16:43:33 2017 +0200 serial: sh-sci: Remove initialization of zero fields in sci_port_params The compiler zeros uninitialized fields, don't zero them manually. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 94 --------------------------------------------- 1 file changed, 94 deletions(-) commit a752ba18af8285e3eeda572f40dddaebff0c3621 Author: Laurent Pinchart Date: Wed Jan 11 16:43:32 2017 +0200 serial: sh-sci: Fix register offsets for the IRDA serial port Even though most of its registers are 8-bit wide, the IRDA has two 16-bit registers that make it a 16-bit peripheral and not a 8-bit peripheral with addresses shifted by one. Fix the registers offset in the driver and the platform data regshift value. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh3/setup-sh770x.c | 1 - drivers/tty/serial/sh-sci.c | 17 ++++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) commit f48debc42f9aee5fcdde44f4ef2120dd25394a65 Author: Laurent Pinchart Date: Wed Jan 11 16:43:31 2017 +0200 sh: Don't set the sh-sci platform data REIE bit when not implemented According to the datasheets, the sh7760 SIM and sh7723 SCIFA instances don't implement the REIE bit. Don't set it in platform data. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh4/setup-sh7760.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 3 --- 2 files changed, 4 deletions(-) commit a05ea9e26456c1c249d1e50f033898390e92679e Author: Laurent Pinchart Date: Wed Jan 11 16:43:30 2017 +0200 sh: Don't set the sh-sci platform data scscr CKE0 bit The bit is only set by platforms that also set the CKE1 but, in which case its value is ignored by the device. Don't set it, this simplifies platform data and only leaves the CKE1 bit to be handled. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit bcce9daa87cd0ad44bf9bdd433eae0474f51e1e2 Author: Laurent Pinchart Date: Wed Jan 11 16:43:29 2017 +0200 sh: Don't set sh-sci port_reg The driver considers all negative or zero values of the port_reg field as invalid. The four platforms that set the field to a register address all use an address higher than 0x7fffffff, which is thus considered by the driver as invalid. The feature is thus never used, remove it. The feature could be implemented properly in the future using the pinctrl and GPIO APIs if desired. While at it, don't set the field to SCIx_NOT_SUPPORTED (-1) either, leaving it unset leads to the same result. This will allow removing the SCIx_NOT_SUPPORTED macro. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh3/setup-sh770x.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 6 ------ 5 files changed, 16 deletions(-) commit 9c21ac508c6a75ba2670efe25f6de902ce32e98e Author: Laurent Pinchart Date: Wed Jan 11 16:43:28 2017 +0200 sh: Don't set the sh-sci pdata UPF_BOOT_AUTOCONF flags The flag is set by the driver internally, don't set it in platform data. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh2/setup-sh7619.c | 3 --- arch/sh/kernel/cpu/sh2a/setup-mxg.c | 1 - arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 8 -------- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 4 ---- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 4 ---- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 8 -------- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 8 -------- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 -- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 3 --- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 2 -- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 1 - arch/sh/kernel/cpu/sh4/setup-sh7750.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 10 ---------- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 2 -- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-shx3.c | 3 --- arch/sh/kernel/cpu/sh5/setup-sh5.c | 2 +- 28 files changed, 1 insertion(+), 112 deletions(-) commit 1b10b8853157e5768014161cc83407c321e6dfa9 Author: Laurent Pinchart Date: Wed Jan 11 16:43:27 2017 +0200 sh: sh726[49]: Don't set sh-sci pdata scscr TOIE bit The SCIF ports on sh7264 and sh7269 don't support the TOIE bit according to the datasheets. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 16 ++++++++-------- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 203a1aeb5da58c2d228df057f0264efced85a57b Author: Laurent Pinchart Date: Wed Jan 11 16:43:26 2017 +0200 sh: Don't set sh-sci pdata scscr TIE and RIE bits The scscr platform data field is used by the driver in three locations. One of them masks out all bits except SCSCR_REIE. The two other are the set_termios handler and the console write handler. The set_termios handler calls sci_start_rx() to enable the receiver, which sets the RIE bit unconditionally. It then calls sci_port_disable() that effectively disables both the transmitter and the receiver. The TIE bit will thus get set later when the serial cores reenables the serial port. The console write handler runs with interrupts disabled, and saves and restores the SCSCR register value. The RIE and TIE bits are thus not needed there. The bits are thus not necessary in platform data, remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 8 ++++---- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 16 ++++++++-------- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 16 ++++++++-------- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 3 +-- 4 files changed, 21 insertions(+), 22 deletions(-) commit c3fa400b276325b57a20e1e54e6fcc18a98e962c Author: Laurent Pinchart Date: Wed Jan 11 16:43:25 2017 +0200 sh: Don't set sh-sci pdata scscr TE and RE bits The bits are set by the driver internally, don't set them in platform data. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/cpu/sh2/setup-sh7619.c | 6 +++--- arch/sh/kernel/cpu/sh2a/setup-mxg.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 16 ++++++++-------- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 12 ++++-------- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 8 ++++---- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 24 ++++++++---------------- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 24 ++++++++---------------- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 5 ++--- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 3 --- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 6 ++---- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 3 +-- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 8 ++++---- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 8 ++++---- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 6 +++--- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 12 ++++++------ arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 9 +++------ arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 12 ++++++------ arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 6 +++--- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 6 +++--- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 20 ++++++++++---------- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 4 ++-- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 12 ++++++------ arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 12 ++++++------ arch/sh/kernel/cpu/sh4a/setup-shx3.c | 6 +++--- arch/sh/kernel/cpu/sh5/setup-sh5.c | 2 +- 28 files changed, 103 insertions(+), 135 deletions(-) commit 3d73f32bfa312155a0990efd95803a3e7061140c Author: Laurent Pinchart Date: Wed Jan 11 16:43:24 2017 +0200 serial: sh-sci: Don't rely on platform data flags when not needed The UPF_BOOT_AUTOCONF platform data flag is set by all platforms, hardcode it. The UPF_IOREMAP flag is set by a single SH platform and thus needs to be kept. However, for ARM platforms, we can base the decision on whether an OF node is present and bypass the platform data flags completely. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9f8325b3c19cf2e5df6b9624480748421104d00c Author: Laurent Pinchart Date: Wed Jan 11 16:43:23 2017 +0200 serial: sh-sci: Set the SCSCR TE and RE bits in the driver The Transmit Enable and Receive Enable bits are set in the scscr field of all instances of the sh-sci platform data. Set them in the driver directly to prepare for their removal from platform data. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 96d179b517a91008f1e335a8c12533a952925ab3 Author: Wei Yongjun Date: Wed Jan 11 16:31:30 2017 +0000 ath6kl: fix warning for using 0 as NULL Fixes the following sparse warning: drivers/net/wireless/ath/ath6kl/sdio.c:716:55: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a51741ebe1315c88488ed35f942e95f427ea2d31 Author: Yegor Yefremov Date: Sun Jan 15 13:14:28 2017 +0100 Documentation: usb: fix wrong documentation paths Fixes wrong spelled "pinctrl-bindings.txt" and "qcom-dwc3-usb-phy.txt" file names as also wrong specified "mt8173-mtu3.txt" file name. Signed-off-by: Yegor Yefremov Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/dwc3-st.txt | 4 ++-- Documentation/devicetree/bindings/usb/ehci-st.txt | 2 +- Documentation/devicetree/bindings/usb/mt8173-mtu3.txt | 2 +- Documentation/devicetree/bindings/usb/mt8173-xhci.txt | 4 ++-- Documentation/devicetree/bindings/usb/qcom,dwc3.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit dab38e7d251d26917935352bee605974cc46eaec Author: Daniel Golle Date: Mon Jan 16 04:14:57 2017 +0100 rt2x00: rt2800lib: support for for RT3352 with external PA This is needed for WiFi to work e.g. on DIR-615 rev.H1 which got external RF power amplifiers connected to the WiSoC. Signed-off-by: Daniel Golle Signed-off-by: Gabor Juhos Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 24 ++++++++ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 76 +++++++++++++++++++++----- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 + 3 files changed, 89 insertions(+), 13 deletions(-) commit b8c2db58d5a1a5e216e84c0e1ea97f1b6d9a8c45 Author: Felix Fietkau Date: Mon Jan 16 04:13:01 2017 +0100 rt2x00: rt2800lib: fix rf id for RT3352 Signed-off-by: Felix Fietkau Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ 1 file changed, 2 insertions(+) commit e974f3acafe3c7cc84ceef35c8e6ab59dea2f91a Author: Serge Vasilugin Date: Mon Jan 16 04:08:38 2017 +0100 rt2x00: rt2800lib: correctly set HT20/HT40 filter Simple patch to correct HT20/HT40 filter setting. Tested with Rt3290, Rt3352 and Rt5350 Signed-off-by: Serge Vasilugin Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit feecb0cb466ba458f59640b4d59ecef1cd956b1f Author: Stanislaw Gruszka Date: Fri Jan 13 15:55:07 2017 +0100 rt2800: remove warning on bcn_num != rt2x00dev->intf_beaconing Since rt2800pci update beacon settings asynchronously from tbtt tasklet, without beacon_skb_mutex protection, number of currently active beacons entries can be different than number pointed by rt2x00dev->intf_beaconing. Remove warning about that inconsistency. Reported-by: evaxige@qq.com Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 -- 1 file changed, 2 deletions(-) commit 5f0a221f59ad6b72202ef9c6e232086de8c336f2 Author: Xinming Hu Date: Wed Jan 11 21:41:24 2017 +0530 mwifiex: remove redundant dma padding in AMSDU We already ensure 64 bytes alignment and add padding if required during skb_aggr allocation. Alignment and padding in mwifiex_11n_form_amsdu_txpd() is redundant. We may end up accessing more data than allocated size with this. This patch fixes following issue by removing redundant padding. [ 370.241338] skbuff: skb_over_panic: text:ffffffffc046946a len:3550 put:72 head:ffff880000110000 data:ffff8800001100e4 tail:0xec2 end:0xec0 dev: [ 370.241374] ------------[ cut here ]------------ [ 370.241382] kernel BUG at net/core/skbuff.c:104! 370.244032] Call Trace: [ 370.244041] [] skb_put+0x44/0x45 [ 370.244055] [] mwifiex_11n_aggregate_pkt+0x1e9/0xa50 [mwifiex] [ 370.244067] [] mwifiex_wmm_process_tx+0x44a/0x6b7 [mwifiex] [ 370.244074] [] ? 0xffffffffc0411eb8 [ 370.244084] [] mwifiex_main_process+0x476/0x5a5 [mwifiex] [ 370.244098] [] mwifiex_main_process+0x5a3/0x5a5 [mwifiex] [ 370.244113] [] process_one_work+0x1a4/0x309 [ 370.244123] [] worker_thread+0x20c/0x2ee [ 370.244130] [] ? rescuer_thread+0x383/0x383 [ 370.244136] [] ? rescuer_thread+0x383/0x383 [ 370.244143] [] kthread+0x11c/0x124 [ 370.244150] [] ? kthread_parkme+0x24/0x24 [ 370.244157] [] ret_from_fork+0x3f/0x70 [ 370.244168] [] ? kthread_parkme+0x24/0x24 Fixes: 84b313b35f8158d ("mwifiex: make tx packet 64 byte DMA aligned") Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit e457a8a01a19277e96830d3d95887e0e3c1e2f26 Author: Rafał Miłecki Date: Sat Jan 7 23:43:45 2017 +0100 brcmfmac: make brcmf_of_probe more generic We may want to use Open Firmware for other devices than just SDIO ones. In future we may want to support more Broadcom properties so there is really no reason for such limitation. Call brcmf_of_probe for all kind of devices & move extra conditions to the body of that funcion. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 8 +++----- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 7 +++++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h | 6 ++++-- 3 files changed, 12 insertions(+), 9 deletions(-) commit 259010c509b6f28b3b851ae45238cf526f52e185 Author: Pan Bian Date: Sat Dec 3 18:27:37 2016 +0800 libertas: fix improper return value Function lbs_cmd_802_11_sleep_params() always return 0, even if the call to lbs_cmd_with_response() fails. In this case, the parameter @sp will keep uninitialized. Because the return value is 0, its caller (say lbs_sleepparams_read()) will not detect the error, and will copy the uninitialized stack memory to user sapce, resulting in stack information leak. To avoid the bug, this patch returns variable ret (which takes the return value of lbs_cmd_with_response()) instead of 0. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188451 Signed-off-by: Pan Bian Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64e90a8acb8590c2468c919f803652f081e3a4bf Author: Greg Kroah-Hartman Date: Mon Jan 16 16:22:39 2017 +0100 Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Some usermode helper applications are defined at kernel build time, while others can be changed at runtime. To provide a sane way to filter these, add a new kernel option "STATIC_USERMODEHELPER". This option routes all call_usermodehelper() calls through this binary, no matter what the caller wishes to have called. The new binary (by default set to /sbin/usermode-helper, but can be changed through the STATIC_USERMODEHELPER_PATH option) can properly filter the requested programs to be run by the kernel by looking at the first argument that is passed to it. All other options should then be passed onto the proper program if so desired. To disable all call_usermodehelper() calls by the kernel, set STATIC_USERMODEHELPER_PATH to an empty string. Thanks to Neil Brown for the idea of this feature. Cc: NeilBrown Signed-off-by: Greg Kroah-Hartman kernel/kmod.c | 14 ++++++++++++++ security/Kconfig | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 377e7a27c049d6df9c1804454904e438ed12f1a4 Author: Greg Kroah-Hartman Date: Sun Dec 11 18:00:43 2016 +0100 Make static usermode helper binaries constant There are a number of usermode helper binaries that are "hard coded" in the kernel today, so mark them as "const" to make it harder for someone to change where the variables point to. Cc: Benjamin Herrenschmidt Cc: Thomas Sailer Cc: "Rafael J. Wysocki" Cc: Johan Hovold Cc: Alex Elder Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: David Howells Signed-off-by: Greg Kroah-Hartman drivers/macintosh/windfarm_core.c | 4 ++-- drivers/net/hamradio/baycom_epp.c | 10 +++++++--- drivers/pnp/pnpbios/core.c | 5 +++-- drivers/staging/greybus/svc_watchdog.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 ++++---- fs/nfsd/nfs4layouts.c | 6 ++++-- security/keys/request_key.c | 7 ++++--- 7 files changed, 26 insertions(+), 18 deletions(-) commit 09249ecdfd9bafd14bfcf71f6801290c2fafda5a Author: Andy Shevchenko Date: Thu Jan 19 12:45:45 2017 +0200 staging: fbtft: fb_ssd1306: Refactor write_vmem() Refactor write_vmem() for sake of readability. While here, fix indentation in one comment. Acked-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1306.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 95ecde0f65661d7fd34bb3e846e1cc7bcbfe7b6d Author: Andy Shevchenko Date: Thu Jan 19 12:45:44 2017 +0200 staging: fbtft: fb_ssd1306: Support smaller screen sizes There is 64x48 display exists. In order to support that set multiplexer to 48 pixels and window address to proper position in the graphic display data RAM. Acked-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1306.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 09142c17daed255710bd4d9813d1f89f551a8e10 Author: Andy Shevchenko Date: Thu Jan 19 12:45:43 2017 +0200 staging: fbtft: propagate error code from kstrto*() kstrto*() functions return proper error code. Do propogate it to the user. Acked-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-sysfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7c3eaadd0209fe21f331600ea2d904c3a0e9b287 Author: Andy Shevchenko Date: Thu Jan 19 12:45:42 2017 +0200 staging: fbtft: remove custom DMA mapped buffer There is no need to duplicate what SPI core already does, i.e. mapping buffers for DMA capable transfers. Remove all related pices of code. Note, that code, besides its redundancy, was buggy: DMA address potentially can be 0, SPI slave device has nothing to do with DMA capable device properties and DMA mask in particular. Suggested-by: Noralf Trønnes Acked-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 4 ---- drivers/staging/fbtft/fbtft-core.c | 22 ++-------------------- drivers/staging/fbtft/fbtft-io.c | 4 ---- drivers/staging/fbtft/fbtft.h | 1 - 4 files changed, 2 insertions(+), 29 deletions(-) commit 9ed2bfb3e39bfbe79ddcf2d03eef28242ea60253 Author: Andy Shevchenko Date: Thu Jan 19 12:45:41 2017 +0200 staging: fbtft: convert fbtft_reset() to be non-atomic First of all, fbtft in current state doesn't allow to override GPIOs to be optional, like "reset" one. It might be a bug somewhere, but rather out of scope of this fix. Second, not all GPIOs available on the board would be SoC based, some of them might sit on I2C GPIO expanders, for example, on Intel Edison/Arduino, and thus any communication with them might sleep. Besides that using udelay() and mdelay() is kinda resource wasteful. Summarize all of the above, convert fbtft_reset() function to non-atomic variant by using gpio_set_value_cansleep(), usleep_range(), and msleep(). Reviewed-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6d2c5d6c46dd3d9924831efd6c913fdf4d484985 Author: Greg Kroah-Hartman Date: Mon Jan 16 17:50:02 2017 +0100 kmod: make usermodehelper path a const string This is in preparation for making it so that usermode helper programs can't be changed, if desired, by userspace. We will tackle the mess of cleaning up the write-ability of argv and env later, that's going to take more work, for much less gain... Signed-off-by: Greg Kroah-Hartman include/linux/kmod.h | 7 ++++--- kernel/kmod.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 7a11a1d1b58873b2e5a6922dcdc23b6b339b14ba Author: Arnd Bergmann Date: Wed Jan 11 15:56:44 2017 +0100 lkdtm: hide stack overflow warning for corrupt-stack test After the latest change to make sure the compiler actually does a memset, it is now smart enough to flag the stack overflow at compile time, at least with gcc-7.0: drivers/misc/lkdtm_bugs.c: In function 'lkdtm_CORRUPT_STACK': drivers/misc/lkdtm_bugs.c:88:144: warning: 'memset' writing 64 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=] To outsmart the compiler again, this moves the memset into a noinline function where (for now) it doesn't see that we intentionally write broken code here. Fixes: c55d240003ae ("lkdtm: Prevent the compiler from optimising lkdtm_CORRUPT_STACK()") Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_bugs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4474f4c40a9c607c7317e686b23619b7b768004f Author: Suzuki K Poulose Date: Mon Jan 16 18:00:00 2017 +0000 coresight: STM: Balance enable/disable The stm is automatically enabled when an application sets the policy via ->link() call back by using coresight_enable(), which keeps the refcount of the current users of the STM. However, the unlink() callback issues stm_disable() directly, which leaves the STM turned off, without the coresight layer knowing about it. This prevents any further uses of the STM hardware as the coresight layer still thinks the STM is turned on and doesn't enable the hardware when required. Even manually enabling the STM via sysfs can't really enable the hw. e.g, $ echo 1 > $CS_DEVS/$ETR/enable_sink $ mkdir -p $CONFIG_FS/stp-policy/$source.0/stm_test/ $ echo 32768 65535 > $CONFIG_FS/stp-policy/$source.0/stm_test/channels $ echo 64 > $CS_DEVS/$source/traceid $ ./stm_app Sending 64000 byte blocks of pattern 0 at 0us intervals Success to map channel(32768~32783) to 0xffffa95fa000 Sending on channel 32768 $ dd if=/dev/$ETR of=~/trace.bin.1 597+1 records in 597+1 records out 305920 bytes (306 kB) copied, 0.399952 s, 765 kB/s $ ./stm_app Sending 64000 byte blocks of pattern 0 at 0us intervals Success to map channel(32768~32783) to 0xffff7e9e2000 Sending on channel 32768 $ dd if=/dev/$ETR of=~/trace.bin.2 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0232083 s, 0.0 kB/s Note that we don't get any data from the ETR for the second session. Also dmesg shows : [ 77.520458] coresight-tmc 20800000.etr: TMC-ETR enabled [ 77.537097] coresight-replicator etr_replicator@20890000: REPLICATOR enabled [ 77.558828] coresight-replicator main_replicator@208a0000: REPLICATOR enabled [ 77.581068] coresight-funnel 208c0000.main_funnel: FUNNEL inport 0 enabled [ 77.602217] coresight-tmc 20840000.etf: TMC-ETF enabled [ 77.618422] coresight-stm 20860000.stm: STM tracing enabled [ 139.554252] coresight-stm 20860000.stm: STM tracing disabled # End of first tracing session [ 146.351135] coresight-tmc 20800000.etr: TMC read start [ 146.514486] coresight-tmc 20800000.etr: TMC read end # Note that the STM is not turned on via stm_generic_link()->coresight_enable() # and hence none of the components are turned on. [ 152.479080] coresight-tmc 20800000.etr: TMC read start [ 152.542632] coresight-tmc 20800000.etr: TMC read end This patch fixes the problem by balancing the unlink operation by using the coresight_disable(), keeping the coresight layer in sync with the hardware state and thus allowing normal usage of the STM component. Fixes: commit 237483aa5cf43 ("coresight: stm: adding driver for CoreSight STM component") Cc: Pratik Patel Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org # 4.7+ Acked-by: Mathieu Poirier Reviewed-by: Chunyan Zhang Reported-by: Robert Walker Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8e22fb4ccace71731193d3cf85d08e238b6e4f9 Author: Bartosz Golaszewski Date: Fri Jan 13 11:00:26 2017 +0100 ARM: da850: add the nand dev_id to the clock lookup table The aemif driver can now access struct of_dev_auxdata (using platform data). Add the device id to the clock lookup table for the nand clock and create a separate lookup table for aemif subnodes. Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman arch/arm/mach-davinci/da850.c | 10 +--------- arch/arm/mach-davinci/da8xx-dt.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 10 deletions(-) commit f95bd041203b9f27a14e6ab733b9598049d7ffef Author: Bartosz Golaszewski Date: Fri Jan 13 11:00:25 2017 +0100 memory: aemif: allow passing device lookup table as platform data TI aemif driver creates its own subnodes of the device tree in order to guarantee that all child devices are probed after the AEMIF timing parameters are configured. Some devices (e.g. da850) use struct of_dev_auxdata for clock lookup but nodes created from within the aemif driver can't access the lookup table. Create a platform data structure that holds a pointer to of_dev_auxdata so that we can use it with of_platform_populate(). Signed-off-by: Bartosz Golaszewski Acked-by: Sekhar Nori Acked-by: Santosh Shilimkar Signed-off-by: Greg Kroah-Hartman drivers/memory/ti-aemif.c | 8 +++++++- include/linux/platform_data/ti-aemif.h | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit ad90a3de9dd12e8d5f738d2ff0fdef3272bd363f Author: William Breathitt Gray Date: Tue Jan 10 13:50:54 2017 -0500 pc104: Introduce the PC104 Kconfig option PC/104 form factor devices serve a specific niche of embedded system users; most Linux users will not have PC/104 form factor devices. This patch introduces the PC104 Kconfig option, which should be used to filter PC/104 specific device drivers and options, so that only those users interested in PC/104 related options are exposed to them. Signed-off-by: William Breathitt Gray Signed-off-by: Greg Kroah-Hartman init/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit 14a1699225957328e4fb07db7e4751cc9d02ae11 Author: Rajendra Nayak Date: Wed Jan 18 02:46:37 2017 -0800 regulator: qcom-smd: Add PM8994 regulator support This patch adds support for the PM8994 regulators found on msm8992, msm8994 and msm8996 platforms. Signed-off-by: Rajendra Nayak [bjorn: Add DT binding doc and vdd_lvs1_2 supply] Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown .../bindings/regulator/qcom,smd-rpm-regulator.txt | 56 +++++++++++ drivers/regulator/qcom_smd-regulator.c | 102 +++++++++++++++++++++ 2 files changed, 158 insertions(+) commit 6ab42a66d2cc10afefea9f9e5d9a5ad5a836d254 Author: K. Y. Srinivasan Date: Wed Jan 18 16:45:03 2017 -0700 Drivers: hv: vmbus: Move Hypercall invocation code out of common code As part of the effort to separate out architecture specific code, move the hypercall invocation code to an architecture specific file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 54 +++++++++++++++++++++++++++++++++++++---- arch/x86/include/asm/mshyperv.h | 1 - drivers/hv/hv.c | 52 --------------------------------------- drivers/hv/hyperv_vmbus.h | 1 - 4 files changed, 49 insertions(+), 59 deletions(-) commit 8730046c1498e8fb8c9a124789893944e8ce8220 Author: K. Y. Srinivasan Date: Wed Jan 18 16:45:02 2017 -0700 Drivers: hv vmbus: Move Hypercall page setup out of common code As part of the effort to separate out architecture specific code, move the hypercall page setup to an architecture specific file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + arch/x86/Kbuild | 3 ++ arch/x86/hyperv/Makefile | 1 + arch/x86/hyperv/hv_init.c | 62 +++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/mshyperv.h | 5 ++++ arch/x86/kernel/cpu/mshyperv.c | 7 +++++ drivers/hv/hv.c | 45 ++---------------------------- 7 files changed, 82 insertions(+), 42 deletions(-) commit 352c9624242d5836ad8a960826183011367871a4 Author: K. Y. Srinivasan Date: Wed Jan 18 16:45:01 2017 -0700 Drivers: hv: vmbus: Move the definition of generate_guest_id() As part of the effort to separate out architecture specific code, move the definition of generate_guest_id() to x86 specific header file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 43 +++++++++++++++++++++++++++++++++++++++++ drivers/hv/hyperv_vmbus.h | 43 ----------------------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) commit 3f646ed70ccd1c4e5c1263d2922247d28c8e08f0 Author: K. Y. Srinivasan Date: Wed Jan 18 16:45:00 2017 -0700 Drivers: hv: vmbus: Move the definition of hv_x64_msr_hypercall_contents As part of the effort to separate out architecture specific code, move the definition of hv_x64_msr_hypercall_contents to x86 specific header file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 12 ++++++++++++ drivers/hv/hyperv_vmbus.h | 15 --------------- 2 files changed, 12 insertions(+), 15 deletions(-) commit a0227cf344e2a33bd4454cf09e56a2a9a8fbfc1d Author: Serge Semin Date: Fri Jan 13 15:16:53 2017 +0300 eeprom: Add IDT 89HPESx driver bindings file IDT 89HPESx PCIe-switches exposes SMBus interface to have an access to the device CSRs and EEPROM. So to properly utilize the interface functionality, developer should declare a valid dts-file node, which would refer to the corresponding 89HPESx device. Signed-off-by: Serge Semin Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/misc/idt_89hpesx.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit cfad6425382ec81acd073fdf24361e1c30b4cb36 Author: Serge Semin Date: Fri Jan 13 15:16:52 2017 +0300 eeprom: Add IDT 89HPESx EEPROM/CSR driver This driver provides an access to EEPROM of IDT PCIe-switches. IDT PCIe- switches expose a simple SMBus interface to perform IO-operations from/to EEPROM, which is located at private (so called Master) SMBus. The driver creates a simple binary sysfs-file to have an access to the EEPROM using the SMBus-slave interface in the i2c-device susfs-directory: /sys/bus/i2c/devices/-/eeprom In case if read-only flag is specified at dts-node of the device, User-space applications won't be able to write to the EEPROM sysfs-node. Additionally IDT 89HPESx SMBus interface has an ability to read/write values of device CSRs. This driver exposes debugfs-file to perform simple IO-operations using that ability for just basic debug purpose. Particularly the next file is created in the specific debugfs-directory: /sys/kernel/debug/idt_csr/ Format of the debugfs-file value is: $ cat /sys/kernel/debug/idt_csr/-/; : So reading the content of the file gives current CSR address and it value. If User-space application wishes to change current CSR address, it can just write a proper value to the sysfs-file: $ echo "" > /sys/kernel/debug/idt_csr/-/ If it wants to change the CSR value as well, the format of the write operation is: $ echo ":" > \ /sys/kernel/debug/idt_csr/-/; CSR address and value can be any of hexadecimal, decimal or octal format. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/Kconfig | 10 + drivers/misc/eeprom/Makefile | 1 + drivers/misc/eeprom/idt_89hpesx.c | 1587 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1598 insertions(+) commit f17331eb4bbb1db8a05ac1c63d39f4d5adec8835 Author: Shyam Saini Date: Mon Jan 16 09:48:19 2017 +0530 staging: rtl8188eu: core: Remove NULL test before vfree vfree frees the virtually continuous block of memory beginning at addr. If addr is NULL, no operation is performed. So, NULL test is not needed before vfree(). Signed-off-by: Shyam Saini Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 564f87f95263a15667ddf32dd14f707d3a2aeb81 Author: Adrien Descamps Date: Tue Jan 17 19:57:08 2017 +0100 staging: vc04: Fix coding style errors "open brace go on the same line" Open braces for enum, union and struct go on the same line. Signed-off-by: Adrien Descamps Reviewed-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../interface/vchi/connections/connection.h | 3 +-- .../interface/vchi/message_drivers/message.h | 9 +++------ drivers/staging/vc04_services/interface/vchi/vchi.h | 18 ++++++------------ .../staging/vc04_services/interface/vchi/vchi_common.h | 9 +++------ .../vc04_services/interface/vchiq_arm/vchiq_debugfs.h | 3 +-- 5 files changed, 14 insertions(+), 28 deletions(-) commit 8e8e333179d6ea50fd0491b138e71dc9d98378ba Author: Valentin Rothberg Date: Wed Jan 18 13:08:19 2017 +0100 checkkconfigsymbols.py: don't sort similar symbols Don't sort the list of string-similar Kconfig symbols alphabetically to preserve the correct order of string similarity. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 481a6f7dcf43c73644e483c7b736cafd1bc305a2 Author: Chris Wilson Date: Mon Jan 16 15:21:31 2017 +0000 drm/i915: Remove i915_gem_object_to_ggtt() With the last user of this convenience wrapper gone, we can kill the wrapper and in the process make the lookup function static. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 7 ------- drivers/gpu/drm/i915/i915_vma.c | 27 ++++++--------------------- drivers/gpu/drm/i915/i915_vma.h | 5 ----- 3 files changed, 6 insertions(+), 33 deletions(-) commit a01cb37affb7ac698ed260c0e31d02af8df6b785 Author: Chris Wilson Date: Mon Jan 16 15:21:30 2017 +0000 drm/i915: Remove i915_vma_create from VMA API With the introduce of i915_vma_instance() for obtaining the VMA singleton for a (obj, vm, view) tuple, we can remove the i915_vma_create() in favour of a single entry point. We do incur a lookup onto an empty tree, but the i915_vma_create() were being called infrequently and during initialisation, so the small overhead is negligible. v2: Drop the i915_ prefix from the now static vma_create() function Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 35 ++++------------------------ drivers/gpu/drm/i915/i915_vma.h | 5 ---- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 ++--- 8 files changed, 13 insertions(+), 45 deletions(-) commit 4ea9527cc03e73afc6a4ac5979d1ecde43b85cf3 Author: Chris Wilson Date: Mon Jan 16 15:21:29 2017 +0000 drm/i915: Add a check that the VMA instance we lookup matches the request Just as added paranoia against our future-selves add another check that the lookup/created VMA instance matches the request. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 1 + 1 file changed, 1 insertion(+) commit 718659a63054261d052cd94f2f9502111ff5173f Author: Chris Wilson Date: Mon Jan 16 15:21:28 2017 +0000 drm/i915: Rename some warts in the VMA API Whilst writing testcases to exercise the VMA API, some oddities came to light, such as i915_gem_obj_lookup_or_create(). Joonas suggested i915_vma_instance() as a neat replacement, so rename them, move them to i915_vma.c and add some kerneldoc as a sugary bonus. s/i915_gem_obj_to_vma/i915_vma_lookup/ s/i915_gem_obj_lookup_or_create_vma/i915_vma_instance/ Suggested-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 12 +--- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 45 --------------- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 90 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_vma.h | 10 ++++ 7 files changed, 103 insertions(+), 60 deletions(-) commit be1e341513ca23b0668b7b0f26fa6e2ffc46ba20 Author: Chris Wilson Date: Mon Jan 16 15:21:27 2017 +0000 drm/i915: Track pinned vma in intel_plane_state With atomic plane states we are able to track an allocation right from preparation, during use and through to the final free after being swapped out for a new plane. We can couple the VMA we pin for the framebuffer (and its rotation) to this lifetime and avoid all the clumsy lookups in between. v2: Remove residual vma on plane cleanup (Chris) v3: Add a description for the vma destruction in intel_plane_destroy_state (Maarten) References: https://bugs.freedesktop.org/show_bug.cgi?id=98829 Signed-off-by: Chris Wilson Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-1-chris@chris-wilson.co.uk Acked-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 16 +--- drivers/gpu/drm/i915/intel_atomic_plane.c | 20 +++++ drivers/gpu/drm/i915/intel_display.c | 130 +++++++++++------------------- drivers/gpu/drm/i915/intel_drv.h | 9 ++- drivers/gpu/drm/i915/intel_fbc.c | 52 +++++------- drivers/gpu/drm/i915/intel_fbdev.c | 4 +- drivers/gpu/drm/i915/intel_sprite.c | 8 +- 7 files changed, 104 insertions(+), 135 deletions(-) commit 079550b95d2989ff1eeef6ba414b73365325da3f Author: James Simmons Date: Mon Jan 16 16:30:37 2017 -0500 staging: lustre: lnet: change sfw_counter_t to proper structure Change sfw_counter_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/console.c | 4 ++-- drivers/staging/lustre/lnet/selftest/framework.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit f7a985a0262fc1983822a5c4d11fa26e2fe82008 Author: James Simmons Date: Mon Jan 16 16:30:36 2017 -0500 staging: lustre: lnet: change srpc_counters_t to proper structure Change srpc_counters_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/console.c | 4 ++-- drivers/staging/lustre/lnet/selftest/rpc.c | 6 +++--- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit ba0b6953b5c1ce686b86e2a1ce695f120a8ad177 Author: James Simmons Date: Mon Jan 16 16:30:35 2017 -0500 staging: lustre: lnet: change lst_test_ping_param_t to proper structure Change lst_test_ping_param_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 28c9901090de2303bbae5da6f7bb2485260cc52f Author: James Simmons Date: Mon Jan 16 16:30:34 2017 -0500 staging: lustre: lnet: change lst_test_bulk_param_t to proper structure Change lst_test_bulk_param_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0c65aa798fd3d515de3b4400496a9bcc47768586 Author: James Simmons Date: Mon Jan 16 16:30:33 2017 -0500 staging: lustre: lnet: change lst_brw_[type|flags]_t to proper enum Change lst_brw_[type|flags]_t from typedef to proper enum. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 538a92698a0e63f497c7752f626e2b4c76fcf98f Author: James Simmons Date: Mon Jan 16 16:30:32 2017 -0500 staging: lustre: lnet: change lstio_test_args_t to proper structure Change lstio_test_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit e7f8efc4b436b970e49434b414575f5c15378c3c Author: James Simmons Date: Mon Jan 16 16:30:31 2017 -0500 staging: lustre: lnet: change lst_test_type_t to proper enum Change lst_test_type_t from typedef to proper enum. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 887793eaf60a7462b89e52bab6576b3b2f010c5b Author: James Simmons Date: Mon Jan 16 16:30:30 2017 -0500 staging: lustre: lnet: change lstio_stat_args_t to proper structure Change lstio_stat_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit be3ebc084c4a74541db53a9204b9ffaf17699956 Author: James Simmons Date: Mon Jan 16 16:30:29 2017 -0500 staging: lustre: lnet: change lstio_batch_info_args_t to proper structure Change lstio_batch_info_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit aa7a7ac934ee6b50bd79d2683d51fc3e18e2d253 Author: James Simmons Date: Mon Jan 16 16:30:28 2017 -0500 staging: lustre: lnet: change lstio_batch_list_args_t to proper structure Change lstio_batch_list_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5092eb424f7b2eee460d492433f2aaa7208e240e Author: James Simmons Date: Mon Jan 16 16:30:27 2017 -0500 staging: lustre: lnet: change lstio_batch_query_args_t to proper structure Change lstio_batch_query_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 383dbccc6b75538bdc41118bf0baecb406bb67f3 Author: James Simmons Date: Mon Jan 16 16:30:26 2017 -0500 staging: lustre: lnet: change lstio_batch_stop_args_t to proper structure Change lstio_batch_stop_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1fb74e9e5efa6afdac70c5706d15b7e0b42ae37b Author: James Simmons Date: Mon Jan 16 16:30:25 2017 -0500 staging: lustre: lnet: change lstio_batch_run_args_t to proper structure Change lstio_batch_run_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b1181c460c773a5098d99c6e6aa81b1813c818a7 Author: James Simmons Date: Mon Jan 16 16:30:24 2017 -0500 staging: lustre: lnet: change lstio_batch_del_args_t to proper structure Change lstio_batch_del_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a14a433bc4cceecefe7bd996db32c91314903527 Author: James Simmons Date: Mon Jan 16 16:30:23 2017 -0500 staging: lustre: lnet: change lstio_batch_add_args_t to proper structure Change lstio_batch_add_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 920fe8689f1d69e6bc50a0e8fd76c60026a080d6 Author: James Simmons Date: Mon Jan 16 16:30:22 2017 -0500 staging: lustre: lnet: change lstio_group_info_args_t to proper structure Change lstio_group_info_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6e9be2931c18a2e86a03bec4551f190bc78d6bab Author: James Simmons Date: Mon Jan 16 16:30:21 2017 -0500 staging: lustre: lnet: change lstio_group_list_args_t to proper structure Change lstio_group_list_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit d0debbe786593f276a0e1f926f399af37f1f8cba Author: James Simmons Date: Mon Jan 16 16:30:20 2017 -0500 staging: lustre: lnet: change lstio_group_nodes_args_t to proper structure Change lstio_group_nodes_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 165949c64ec6a849c565a3753427dd6efd754f7e Author: James Simmons Date: Mon Jan 16 16:30:19 2017 -0500 staging: lustre: lnet: change lstio_group_update_args_t to proper structure Change lstio_group_update_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 41ec7aa21bbd64e639ea1a4dac90a8911a773b48 Author: James Simmons Date: Mon Jan 16 16:30:18 2017 -0500 staging: lustre: lnet: change lstio_group_del_args_t to proper structure Change lstio_group_del_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 884258d7051751779a2c6286c8b5d87946fc4a91 Author: James Simmons Date: Mon Jan 16 16:30:17 2017 -0500 staging: lustre: lnet: change lstio_group_add_args_t to proper structure Change lstio_group_add_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7f6d6dd1e63f3d48901a695c430d2503be8ed643 Author: James Simmons Date: Mon Jan 16 16:30:16 2017 -0500 staging: lustre: lnet: change lstio_debug_args_t to proper structure Change lstio_debug_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 223d3e07d0bac8db7b76ac2735b8c4b7e24c6bfe Author: James Simmons Date: Mon Jan 16 16:30:15 2017 -0500 staging: lustre: lnet: change lstio_session_end_args_t to proper structure Change lstio_session_end_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6de6921b5b17b0253f44c16492e2f020358e4427 Author: James Simmons Date: Mon Jan 16 16:30:14 2017 -0500 staging: lustre: lnet: change lstio_session_info_args_t to proper structure Change lstio_session_info_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 18a28fb4f88493474d8a653438e93921358805e5 Author: James Simmons Date: Mon Jan 16 16:30:13 2017 -0500 staging: lustre: lnet: change lstio_session_new_args_t to proper structure Change lstio_session_new_args_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4f6c6934e3fe4fc426f822a8a6df45e08fa5243e Author: James Simmons Date: Mon Jan 16 16:30:12 2017 -0500 staging: lustre: lnet: change lstcon_trans_stat_t to proper structure Change lstcon_trans_stat_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 34 +++++++++++----------- drivers/staging/lustre/lnet/selftest/conctl.c | 4 +-- drivers/staging/lustre/lnet/selftest/conrpc.c | 8 ++--- drivers/staging/lustre/lnet/selftest/conrpc.h | 2 +- drivers/staging/lustre/lnet/selftest/console.h | 4 +-- 5 files changed, 26 insertions(+), 26 deletions(-) commit ef9114c2fe6a4e4f0e641f4c318a04a2a14ba87e Author: James Simmons Date: Mon Jan 16 16:30:11 2017 -0500 staging: lustre: lnet: change lstcon_rpc_ent_t to proper structure Change lstcon_rpc_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.c | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.h | 2 +- drivers/staging/lustre/lnet/selftest/console.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) commit cd9f7d7e29125f4cba8bae7cc8653c9e37533eb5 Author: James Simmons Date: Mon Jan 16 16:30:10 2017 -0500 staging: lustre: lnet: change lstcon_test_batch_ent_t to proper structure Change lstcon_test_batch_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 6 +++--- drivers/staging/lustre/lnet/selftest/console.c | 10 +++++----- drivers/staging/lustre/lnet/selftest/console.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 55442b5153ef341793442921017aec3193234b30 Author: James Simmons Date: Mon Jan 16 16:30:09 2017 -0500 staging: lustre: lnet: change lstcon_batch_ent_t to proper structure Change lstcon_batch_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b38531271acdfc5054694b1838f2cefb23a82005 Author: James Simmons Date: Mon Jan 16 16:30:08 2017 -0500 staging: lustre: lnet: change lstcon_test_ent_t to proper structure Change lstcon_test_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 652c3076dde516e7853541ee159030c502df9e49 Author: James Simmons Date: Mon Jan 16 16:30:07 2017 -0500 staging: lustre: lnet: change lstcon_ndlist_ent_t to proper structure Change lstcon_ndlist_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 16 ++++++++-------- drivers/staging/lustre/lnet/selftest/console.c | 14 +++++++------- drivers/staging/lustre/lnet/selftest/console.h | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) commit 11535af7f6f6c096705746f755a0e635e4f4a53e Author: James Simmons Date: Mon Jan 16 16:30:06 2017 -0500 staging: lustre: lnet: change lstcon_node_ent_t to proper structure Change lstcon_node_ent_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 8 ++++---- drivers/staging/lustre/lnet/selftest/console.c | 6 +++--- drivers/staging/lustre/lnet/selftest/console.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit cc35d8d1bf1d4bb44ed82ddce4b722a2907c7b42 Author: James Simmons Date: Mon Jan 16 16:30:05 2017 -0500 staging: lustre: lnet: change lst_bid_t to proper structure Change lst_bid_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++-- drivers/staging/lustre/lnet/selftest/console.h | 2 +- drivers/staging/lustre/lnet/selftest/framework.c | 4 ++-- drivers/staging/lustre/lnet/selftest/rpc.h | 4 ++-- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit cb850bb369f1f6e3f99d543730387ddae2149c9c Author: James Simmons Date: Mon Jan 16 16:30:04 2017 -0500 staging: lustre: lnet: change lst_nid_t to proper structure Change lst_nid_t from typedef to proper structure. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lnetst.h | 12 ++++----- drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +- drivers/staging/lustre/lnet/selftest/console.c | 12 ++++----- drivers/staging/lustre/lnet/selftest/console.h | 8 +++--- drivers/staging/lustre/lnet/selftest/framework.c | 4 +-- drivers/staging/lustre/lnet/selftest/rpc.h | 30 +++++++++++----------- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-) commit a2db578bc07468a28d213fed37057ce1e182112e Author: Phil Elwell Date: Tue Jan 17 20:56:15 2017 +0000 staging: vchiq_arm: Avoid premature message stalls The constants MAX_COMPLETIONS and MSG_QUEUE_SIZE control the number of messages that can be outstanding to each client before the system as a whole stalls. If the numbers are too small then unnecessary thread switching will occur while waiting for a (potentially low priority) client thread to consume some data; badly written clients can even lead to deadlock. For services that carry many short messages, 16 messages can represent a very small amount of data. Since the resources are small - 16 bytes for a completion, 4 bytes for a message pointer - increase the limits so they are unlikely to be hit except in exceptional circumstances. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca3df03b83f2abaf0c50d777eccf4d12bc4d4dec Author: Phil Elwell Date: Tue Jan 17 20:56:14 2017 +0000 staging: vc04_services: Fix messages appearing twice An issue was observed when flushing openmax components which generate a large number of messages returning buffers to host. We occasionally found a duplicate message from 16 messages prior, resulting in a buffer returned twice. So fix the issue by adding more memory barriers. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 45 +++++++++++++--------- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 24 +++++++++--- 2 files changed, 46 insertions(+), 23 deletions(-) commit 5069c86acb0d4cd2858580140ef7bf6701825236 Author: Phil Elwell Date: Tue Jan 17 20:56:13 2017 +0000 staging: vchiq_arm: Service callbacks must not fail Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if the service is closing, but this is not an error and should not be reported as such. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72ed1db4cd4eb8bd7e46b5b6f9dd56b1b36fe660 Author: Phil Elwell Date: Tue Jan 17 20:56:12 2017 +0000 staging: vchiq_arm: Fix unlocked access to dequeue_pending The dequeue_pending flag wasn't protected by a spinlock in the service_callback. So fix this to make it safe. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit c599a22e60f95f405fe6cb9f5b25d88fd7e59a7f Author: Phil Elwell Date: Tue Jan 17 20:56:11 2017 +0000 staging: vchiq_core: Reduce the memdump size This reduces the memory dump size to a sufficient value of 16 bytes. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 055fb9ce92d59da9e8d1040b54ecd9b6fff439d7 Author: Vaibhav Agarwal Date: Wed Jan 18 22:51:53 2017 +0530 staging: greybus: audio: Ensure proper byte order Proper byte order was completely disregarded for multi byte data shared between AP and module (and APB1). Fix this. Signed-off-by: Vaibhav Agarwal Signed-off-by: Vaibhav Agarwal Acked-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 2 +- drivers/staging/greybus/audio_topology.c | 94 +++++++++++++++++--------------- 2 files changed, 51 insertions(+), 45 deletions(-) commit 96249da9ce2f33e16eb6b2ef812ea590d734057d Author: Vaibhav Agarwal Date: Wed Jan 18 22:51:52 2017 +0530 staging: greybus: audio: Cleanup junk codec registers Dummy codec register were initially added while populating dummy codec mixer controls until module topology parser was available. Now, these dummy registers are nowhere used and thus can be safely removed. Since ASoC framework requires a valid callback for both read & write register APIS, currently empty placeholders are kept to avoid panic. Later, register mapping logic can be defined: 1. Assuming fixed number of maximum modules connected and register bits corresponds to basic info of each module OR 2. With a logic to dynamically grow register_cache_size based on codec modules added/removed. Signed-off-by: Vaibhav Agarwal Signed-off-by: Vaibhav Agarwal Acked-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 39 ++--------------------------- drivers/staging/greybus/audio_codec.h | 46 ----------------------------------- 2 files changed, 2 insertions(+), 83 deletions(-) commit 1023ab9c3800e58581b546b510e6d3d813535bce Author: Vaibhav Agarwal Date: Wed Jan 18 22:51:51 2017 +0530 staging: greybus: audio: Initialize sig_bits before configuring hwparams Uninitialized variable sig_bits was used while configuring stream params for codec module. These params are used to configure PCM settings for APBridgeA. Usually, this is dependent on codec capability and thus populated via codec dai_driver definition. In our case, it is fixed to 16 based on the data format, container supported. Signed-off-by: Vaibhav Agarwal Signed-off-by: Vaibhav Agarwal Acked-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 84510052d658221282e6860f2ed1c347fd51add3 Author: Vaibhav Agarwal Date: Wed Jan 18 22:51:50 2017 +0530 staging: greybus: audio: Avoid less than zero check for le32 variable mixer control->info call back function checks for -ve values to rebase min and max values. However, le32 variable is used to fetch values from GB module FW. Thus negative value checking is not required. Fix this!! Signed-off-by: Vaibhav Agarwal Acked-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e965af6bb9320cda34a346717c914e1b4054d0fe Author: Igor Pylypiv Date: Wed Jan 18 18:21:23 2017 -0800 staging: greybus: loopback_test: use octal permissions instead of symbolic checkpatch.pl warning: Symbolic permissions are not preferred. Consider using octal permissions. Signed-off-by: Igor Pylypiv Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0367cd002c63363d70262a2fc274487119ca88d8 Author: Stefano Manni Date: Wed Jan 18 00:38:01 2017 +0100 staging: fbtft: replace decimal with 4-digit octal permissions Following error detected by checkpatch.pl: ERROR: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Stefano Manni Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/flexfb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ca366962eee3a9b48a35603444a085edb3b3028e Author: Pierre-Yves Kerbrat Date: Tue Jan 17 20:47:00 2017 +0100 staging: rtl8188eu: fix type sign of len in rtw_get_bcn_info len was declared unsigned int where we use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: expected int *len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: got unsigned int * drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: expected int *len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: got unsigned int * Signed-off-by: Pierre-Yves Kerbrat Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84f2634d4ae083ce85bccc26c2df5bb2c7eea38d Author: Pierre-Yves Kerbrat Date: Tue Jan 17 20:46:59 2017 +0100 staging: rtl8188eu: fix type of wpa_ielen in rtw_get_cipher_info wpa_ielen was declared u32 when we actually use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: expected int *wpa_ie_len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: got unsigned int * drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1021:69: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Pierre-Yves Kerbrat Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d380a1e09bed1acb7bc1ee900d4aa67fed913c6 Author: Abdul Rauf Date: Mon Jan 16 22:32:58 2017 +0000 staging: unisys: visorbus: fix checkpatch block comments warning Fix the following warnings: Block comments should align the * on each line Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- drivers/staging/unisys/visorbus/vmcallinterface.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 910f404afcf611f692ba4bdbbb98ffb4fb569fc9 Author: Ian Abbott Date: Mon Jan 16 14:12:26 2017 +0000 staging: comedi: ni_pcimio: Support more PXI cards Add support for NI PXI-6220, PXI-6221, PXI-6229, PXI-6250, PXI-6254, PXI-6259, PXIe-6259, PXI-6280, PXI-6284, and PXI-6289 boards, treating them the same as the correspondingly numbered PCI and PCIe boards (apart from having different Comedi board name strings). The same has previously been done for other PXI boards supported by the driver. The PCI device IDs for the newly supported boards come from the "nixswv.inf" file in National Instrument's Windows drivers. Also, sort `ni_pcimio_pci_table[]` by PCI device ID. It is mostly sorted already, so only the entries for PXI-6251 and PXIe-6251 need moving. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/Kconfig | 8 +- drivers/staging/comedi/drivers/ni_pcimio.c | 173 +++++++++++++++++++++++++++-- 2 files changed, 167 insertions(+), 14 deletions(-) commit 0d0ad8298d06197c58a43c8d518bd5b67a58116b Author: Ian Abbott Date: Mon Jan 16 14:12:55 2017 +0000 staging: comedi: ni_660x: Support PCI-6224 Add support for the NI PCI-6224 board, assuming it behaves like the NI PXI-6224 board at the register level. The PCI device ID comes from the "nitiowv.inf" file in National Instrument's Windows drivers. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/ni_660x.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 4463c3e72dd3058eda8b3d806f1f186c5ddad232 Merge: 1fac9c5 e30eca0 Author: Greg Kroah-Hartman Date: Thu Jan 19 10:40:44 2017 +0100 Merge tag 'iio-for-4.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of new device support, features and cleanups for IIO in the 4.11 cycle. It's shaping to be another fairly busy cycle. Lots more on the way! New device support * ads7950 - new driver supporting ads7950, ads7951, ads7952, ads7953, ads7954, ads7955, ads7956, ads7957, ads7958, ads7959, ads7960, and ads7961 ADCs. * cm3605 - New driver for this light sensor and proximity sensor which is an analog part with some additional digital controls. * hx711 - New driver. Core new stuff * Gravity sensor type. This is a processed datastream in which the device will try to work out which way is down. * Split the buffer.h file into two parts. One provides the interface to 'use' a buffer, the second provides the internals of the buffer functionality as needed by implementations of buffers. - Move documentation inline so as to allow use of private: tag when generating documentation. - Add some utility functions for the few things that are directly done with the buffers. - Stop exporting functions that no-one uses outside of the core code. - Push docs down by the code in the c file where they should have always been. - Fix typo in kernel-doc for buffer. - push down some includes that were previously happening implicitly. - stop enabling the timestamp of the dummy device. Features and cleanups * ad5592r - ACPI support * ad5593r -ACPI support. * ad5933 - Fix a false comment about size of a particular register. * ad7150 - replace S_IRUGO | S_IWUSR with 0644. I'm not that keen on these patches in general, but as it was nicely presented I took this one anyway. As a general rule will only take these as part of a larger driver cleanup. - don't eat an error but rather reutnr it in the write_event_config callback. * ad7606 - replace non standard range attibute with _scale * ade7753 - use usleep_range for short sleeps * ade7754 - use usleep_range for short sleeps * ade7758 - use usleep_range for short sleeps * ade7759 - use usleep_range for short sleeps * ade7854 - use usleep_range for short sleeps * adis16201 - fix description * adis16203 - fix description - fix copyright year * adis16209 - fix description * adt7316 - Add braces to arms of if else statement (for consistency) - Alignment fixes. * axp288 - Fix up an issue with accidental overwrites of data. * bmi160 - add deivce tables for i2c and spi to support correctly identifying the full dt name (including manufacturer). - device tree binding. * bmp280 - use usleep_range for short sleeps. * cm3232 - return error from cm3232_reg_init rather than eating it if the last write fails. * dummy driver - remove a semicolor found at end of a function defintition. * exynos-adc - use usleep_range for short sleeps. * hid-sensor (accel) - Add timestamp support. The hardware can provide timestamps so lets support them. If not fall back to timestamps estimated in kernel. * hid-sensor (light) - Add a duplicate ID for the light channels so as to keep existing interface whilst also using the more standard IIO interface. * hts221 - acpi probing * imx25-gcq - Add a macro call to allow this driver to be automatically loaded. * isl29028 - reorganise code to avoid deep nesting of if statements. - move chip test and default regs into a function suitable or sharing with power management code. - tidy up some code alignment. * lidar-lite-v3 - introduce compatible strings that make it clear Garmin have consideral friends. * mma8452 - avoid returning signed value when unsigned is appropriate * spmi-vadc - Update function for generic voltage conversion to take into account that different channels on this device should be handled differently. - Rework code to allow per channel voltage scaling and support the standard options for this hardware. - Fixup three minor issues with the above patches for this part. These all effect test builds rather than the native builds for the part, but good to clean them up anyway. * st_sensors - support device matching from the ACPI DST tables. - acpi based probing for accelerometers - acpi based probing for pressure sensors - Allow pressure sensors to read negative values. - Export sampling frequency for lps25h and lps331ap. - Add support for the old DT bindings from the period when these deivces were often supported through windows. Docs fixup: * typo in sysfs-bus-iio commit afa197e3cb240fdd6194dd4c8545cdd45c82770e Author: Chunfeng Yun Date: Wed Jan 18 14:08:27 2017 +0800 dt-bindings: mt8173-mtu3: add reference clock add a reference clock for compatibility Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mt8173-mtu3.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 63376c10f0f6eaaa20765ef00dd2b9a398576fd4 Author: Chunfeng Yun Date: Wed Jan 18 14:08:26 2017 +0800 dt-bindings: mt8173-xhci: add reference clock add a reference clock for compatibility Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mt8173-xhci.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9c4afd429bee4ee9fd75a71bd0a1024851cbfa17 Author: Chunfeng Yun Date: Wed Jan 18 14:08:24 2017 +0800 usb: xhci-mtk: add reference clock usually, the reference clock comes from 26M oscillator directly, but some SoCs are not, add it for compatibility. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 15 +++++++++++++++ drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 16 insertions(+) commit 4d70d0c6c1bf3f26358f7903535735fa557b1b54 Author: Chunfeng Yun Date: Wed Jan 18 14:08:23 2017 +0800 usb: mtu3: add reference clock usually, the reference clock comes from 26M oscillator directly, but some SoCs are not, add it for compatibility. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_plat.c | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) commit 5cbf2d69f69e89aac63f119a9dc6d029a79d2244 Author: Chunfeng Yun Date: Wed Jan 18 14:08:22 2017 +0800 usb: mtu3: get resources that cause deferred probe earlier Some resources such as regulator, clock usually cause deferred probe, get them earlier to avoid more ineffective processing. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5de4e1ea9a731cad195ce5152705c21daef3bbba Author: William wu Date: Tue Jan 17 15:32:07 2017 +0800 usb: host: xhci: plat: check hcc_params after add hcd The commit 4ac53087d6d4 ("usb: xhci: plat: Create both HCDs before adding them") move add hcd to the end of probe, this cause hcc_params uninitiated, because xHCI driver sets hcc_params in xhci_gen_setup() called from usb_add_hcd(). This patch checks the Maximum Primary Stream Array Size in the hcc_params register after add primary hcd. Signed-off-by: William wu Acked-by: Roger Quadros Cc: stable # 4.2+ Fixes: 4ac53087d6d4 ("usb: xhci: plat: Create both HCDs before adding them") Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fd7723e29e4f61c54d2e08295cda1986665dc8e5 Author: Bhumika Goyal Date: Sun Jan 15 17:23:25 2017 +0530 usb: host: constify dev_pm_ops structures Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Size details after cross compiling the .o file for powerpc architecture. File size before: text data bss dec hex filename 3183 372 0 3555 de3 drivers/usb/host/ehci-fsl.o File size after: text data bss dec hex filename 3275 280 0 3555 de3 drivers/usb/host/ehci-fsl.o 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 3774e02c742973c3fb343e8626f34041548ad5c7 Author: Bhumika Goyal Date: Wed Jan 11 00:02:54 2017 +0530 usb: isp1760: constify usb_gadget_ops structures Declare usb_gadget_ops structures as const as they are only stored in the ops field of a usb_gadget structure. This field is of type const, so usb_gadget_ops structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct usb_gadget_ops i@p={...}; @ok1@ identifier r1.i; position p; struct isp1760_udc udc; @@ udc.gadget.ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct usb_gadget_ops i; File size before: drivers/usb/isp1760/isp1760-udc.o text data bss dec hex filename 12434 4136 16 16586 40ca usb/isp1760/isp1760-udc.o File size after: drivers/usb/isp1760/isp1760-udc.o text data bss dec hex filename 12530 4048 16 16594 40d2 usb/isp1760/isp1760-udc.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/isp1760/isp1760-udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5954a5046b32637535eb819a478a11ab5b84be80 Author: Bhumika Goyal Date: Wed Jan 11 00:20:04 2017 +0530 usb: gadget: constify usb_gadget_ops structures Declare usb_gadget_ops structures as const as they are only stored in the ops field of a usb_gadget structure. This field is of type const, so usb_gadget_ops structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct usb_gadget_ops i@p={...}; @ok1@ identifier r1.i; position p; struct fotg210_udc fotg210; @@ fotg210.gadget.ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct usb_gadget_ops i; File size before: text data bss dec hex filename 7559 384 8 7951 1f0f usb/gadget/udc/fotg210-udc.o File size after: text data bss dec hex filename 7655 288 8 7951 1f0f usb/gadget/udc/fotg210-udc.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/fotg210-udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76b8db0d480e8045e1a1902fc9ab143b3b9ef115 Author: William wu Date: Fri Jan 13 11:04:22 2017 +0800 usb: hcd: initialize hcd->flags to 0 when rm hcd On some platforms(e.g. rk3399 board), we can call hcd_add/remove consecutively without calling usb_put_hcd/usb_create_hcd in between, so hcd->flags can be stale. If the HC dies due to whatever reason then without this patch we get the below error on next hcd_add. [173.296154] xhci-hcd xhci-hcd.2.auto: HC died; cleaning up [173.296209] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller [173.296762] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 6 [173.296931] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM. [173.297179] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003 [173.297203] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [173.297222] usb usb6: Product: xHCI Host Controller [173.297240] usb usb6: Manufacturer: Linux 4.4.21 xhci-hcd [173.297257] usb usb6: SerialNumber: xhci-hcd.2.auto [173.298680] hub 6-0:1.0: USB hub found [173.298749] hub 6-0:1.0: 1 port detected [173.299382] rockchip-dwc3 usb@fe800000: USB HOST connected [173.395418] hub 5-0:1.0: activate --> -19 [173.603447] irq 228: nobody cared (try booting with the "irqpoll" option) [173.603493] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.21 #9 [173.603513] Hardware name: Google Kevin (DT) [173.603531] Call trace: [173.603568] [] dump_backtrace+0x0/0x160 [173.603596] [] show_stack+0x20/0x28 [173.603623] [] dump_stack+0x90/0xb0 [173.603650] [] __report_bad_irq+0x48/0xe8 [173.603674] [] note_interrupt+0x1e8/0x28c [173.603698] [] handle_irq_event_percpu+0x1d4/0x25c [173.603722] [] handle_irq_event+0x4c/0x7c [173.603748] [] handle_fasteoi_irq+0xb4/0x124 [173.603777] [] generic_handle_irq+0x30/0x44 [173.603804] [] __handle_domain_irq+0x90/0xbc [173.603827] [] gic_handle_irq+0xcc/0x188 ... [173.604500] [] el1_irq+0x80/0xf8 [173.604530] [] cpu_startup_entry+0x38/0x3cc [173.604558] [] rest_init+0x8c/0x94 [173.604585] [] start_kernel+0x3d0/0x3fc [173.604607] [<0000000000b16000>] 0xb16000 [173.604622] handlers: [173.604648] [] usb_hcd_irq [173.604673] Disabling IRQ #228 Signed-off-by: William wu Acked-by: Roger Quadros Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 1 + 1 file changed, 1 insertion(+) commit 58268de5e7e34eebbd5ce06a95054d43d598910e Author: Sudip Mukherjee Date: Thu Jan 12 21:13:53 2017 +0000 usb: storage: ene_ub6250: remove unused variable The variable Newblk was only being assigned some value but was never used after that. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/ene_ub6250.c | 2 -- 1 file changed, 2 deletions(-) commit 51c7629ed0096b6ab273135ea274e81797a8df51 Author: Sudip Mukherjee Date: Thu Jan 12 21:16:40 2017 +0000 usb: host: oxu210hp-hcd: remove unused variable The variable live was assigned the host controller running status but it was never used or checked after that. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/usb/host/oxu210hp-hcd.c | 2 -- 1 file changed, 2 deletions(-) commit 123b7b30814221b007aaa47584eb2c87b4450d97 Author: Jaejoong Kim Date: Wed Jan 18 15:19:04 2017 +0900 usb: core: update comments for send message functions The commonly use of bottom halves are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() functions note that do not use this function within an interrupt context, like a 'bottom half' handler. With this comment, it makes confuse about usage of these functions. To more clarify, remove 'bottom half' comment. Signed-off-by: Jaejoong Kim Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 4fb6fde74d6724dc6d64ec729f950fbdeefd7f07 Author: Aaron Miller Date: Thu Nov 3 15:01:53 2016 -0700 EDAC: Expose per-DIMM error counts in sysfs The old csrowX sysfs directories have per-csrow error counters, but the new dimmX directories do not currently expose error counts. EDAC already keeps these counts, add them to sysfs so per-DIMM counts are still available when CONFIG_EDAC_LEGACY_SYSFS=n. Signed-off-by: Aaron Miller Cc: linux-edac Link: http://lkml.kernel.org/r/20161103220153.3997328-1-aaronmiller@fb.com Signed-off-by: Borislav Petkov Documentation/ABI/testing/sysfs-devices-edac | 17 +++++++++++++ Documentation/admin-guide/ras.rst | 20 +++++++++++++++ drivers/edac/edac_mc_sysfs.c | 38 ++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) commit 5464cd657632502c61c64775dffef1cc7ebd4839 Author: Anusha Srivatsa Date: Wed Jan 18 08:05:58 2017 -0800 drm/i915/get_params: Add HuC status to getparams This patch will allow for getparams to return the status of the HuC. As the HuC has to be validated by the GuC this patch uses the validated status to show when the HuC is loaded and ready for use. You cannot use the loaded status as with the GuC as the HuC is verified after it is loaded and is not usable until it is verified. v2: removed the forewakes as the registers are already force-woken. (T.Ursulin) v3: rebased on top of drm-tip. Removed any reference to intel_huc.h v4: rebased. Rename I915_PARAM_HAS_HUC to I915_PARAM_HUC_STATUS. Remove intel_is_huc_valid() since it is used only in one place. Put the case of I915_PARAM_HAS_HUC() in the right place. v5: rebased. Add a comment to specify that I915_READ(reg) does not read garbage value. The register HUC_STATUS2 is force woken and no rpm is needed. Signed-off-by: Anusha Srivatsa Signed-off-by: Peter Antoine Reviewed-by: Arkadiusz Hiler Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-6-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_drv.c | 7 +++++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 8 insertions(+) commit dac84a388528ab002b517213be47f53dc0fd978a Author: Anusha Srivatsa Date: Wed Jan 18 08:05:57 2017 -0800 drm/i915/huc: Support HuC authentication The HuC authentication is done by host2guc call. The HuC RSA keys are sent to GuC for authentication. v2: rebased on top of drm-tip. Changed name format and upped version 1.7. v3: changed wait_for_atomic to wait_for v4: rebased. Rename intel_huc_auh() to intel_guc_auth_huc() and place the prototype in intel_guc.h,correct the comments. v5: rebased. Moved intel_guc_auth_huc from i915_guc_submission.c to intel_uc.c.Update dev to dev_priv in intel_guc_auth_huc(). Renamed HOST2GUC_ACTION_AUTHENTICATE_HUC TO INTEL_GUC_ACTION_ AUTHENTICATE_HUC v6: rebased. Add newline on DRM_ERRORs that already dont have one. v7: rebased. Replace wait_for with intel_wait_for_register() since the latter employs sleep optimisations for quick responses- as pointed out by Chris Wilson. v8: rebased. Cleanup the intel_guc_auth_huc() by removing checks already performed in earlier functions. Make comments more descriptive. v9: rebased. Changed the bias for pinning the HuC object. Move intel_guc_auth_huc() to intel_huc.c. Change DRM_DEBUGs to DRM_ERRORs in intel_guc_auth_huc(). Add return status to DRM_ERRORs. v10: Remove message not required for the user.. Cc: Chris Wilson Cc: Arkadiusz Hiler Cc: Michal Wajdeczko Tested-by: Xiang Haihao Signed-off-by: Anusha Srivatsa Signed-off-by: Alex Dai Signed-off-by: Peter Antoine Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-5-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_guc_fwif.h | 1 + drivers/gpu/drm/i915/intel_guc_loader.c | 2 ++ drivers/gpu/drm/i915/intel_huc.c | 49 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 1 + 4 files changed, 53 insertions(+) commit 0509ead114937436368b8862156f33b9773e99c4 Author: Anusha Srivatsa Date: Wed Jan 18 08:05:56 2017 -0800 drm/i915/huc: Add debugfs for HuC loading status check Add debugfs entry for HuC loading status check. v2: rebased on top of drm-tip. Cc: Michal wajdeczko Tested-by: Xiang Haihao Signed-off-by: Anusha Srivatsa Signed-off-by: Alex Dai Signed-off-by: Peter Antoine Reviewed-by: Jeff McGee Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-4-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit f2ec71d550d3c7891c509ba831e67563044278d4 Author: Anusha Srivatsa Date: Wed Jan 18 08:05:55 2017 -0800 drm/i915/HuC: Add KBL huC loading Support This patch adds the support to load HuC on KBL Version 2.0 v2: rebased on top of drm-tip. Rename KBL_FW_ to KBL_HUC_FW_ v3: rebased. Remove old checks. Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Signed-off-by: Anusha Srivatsa Reviewed-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-3-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_huc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit cd69098579d4c7862fb3330a129ddb71c0d0da16 Author: Anusha Srivatsa Date: Wed Jan 18 08:05:54 2017 -0800 drm/i915/huc: Add BXT HuC Loading Support This patch adds the HuC Loading for the BXT by using the updated file construction. Version 1.7 of the HuC firmware. v2: rebased on to top drm-tip. Rename BXT_FW_MAJOR to BXT_HUC_FW_ Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Signed-off-by: Anusha Srivatsa Reviewed-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-2-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_huc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bd132858e9f9ad1c03a7d4982deaac7f0c0a4f0d Author: Anusha Srivatsa Date: Wed Jan 18 08:05:53 2017 -0800 drm/i915/huc: Add HuC fw loading support The HuC loading process is similar to GuC. The intel_uc_fw_fetch() is used for both cases. HuC loading needs to be before GuC loading. The WOPCM setting must be done early before loading any of them. v2: rebased on-top of drm-intel-nightly. removed if(HAS_GUC()) before the guc call. (D.Gordon) update huc_version number of format. v3: rebased to drm-intel-nightly, changed the file name format to match the one in the huc package. Changed dev->dev_private to to_i915() v4: moved function back to where it was. change wait_for_atomic to wait_for. v5: rebased. Changed the year in the copyright message to reflect the right year.Correct the comments,remove the unwanted WARN message, replace drm_gem_object_unreference() with i915_gem_object_put().Make the prototypes in intel_huc.h non-extern. v6: rebased. Update the file construction done by HuC. It is similar to GuC.Adopted the approach used in- https://patchwork.freedesktop.org/patch/104355/ v7: Change dev to dev_priv in macro definition. Corrected comments. v8: rebased on top of drm-tip. Updated functions intel_huc_load(), intel_huc_init() and intel_uc_fw_fetch() to accept dev_priv instead of dev. Moved contents of intel_huc.h to intel_uc.h. v9: change SKL_FW_ to SKL_HUC_FW_. Add intel_ prefix to guc_wopcm_size(). Remove unwanted checks in intel_uc.h. Rename huc_fw in struct intel_huc to simply fw to avoid redundency. v10: rebased. Correct comments. Make intel_huc_fini() accept dev_priv instead of dev like intel_huc_init() and intel_huc_load().Move definition to i915_guc_reg.h from intel_uc.h. Clean DMA_CTRL bits after HuC DMA transfer in huc_ucode_xfer() instead of guc_ucode_xfer(). Add suitable WARNs to give extra info. v11: rebased. Add proper bias for HuC and make sure there are asserts on failure by using guc_ggtt_offset_vma(). Introduce intel_huc.c and remove intel_huc_loader.c since it has functions that do more than just loading.Correct year in copyright. v12: remove invalidates that are not required anymore. Cc: Arkadiusz Hiler Cc: Michal Wajdeczko Tested-by: Xiang Haihao Signed-off-by: Anusha Srivatsa Signed-off-by: Alex Dai Signed-off-by: Peter Antoine Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 3 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_guc_reg.h | 6 + drivers/gpu/drm/i915/intel_guc_loader.c | 7 +- drivers/gpu/drm/i915/intel_huc.c | 262 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 14 ++ 7 files changed, 292 insertions(+), 3 deletions(-) commit 5b8cd0755f8a06a851c436a013e7be0823fb155a Author: Clint Taylor Date: Wed Jan 18 13:38:43 2017 -0800 drm/i915: prevent crash with .disable_display parameter The .disable_display parameter was causing a fatal crash when fbdev was dereferenced during driver init. V1: protection in i915_drv.c V2: Moved protection to intel_fbdev.c Fixes: 43cee314345a ("drm/i915/fbdev: Limit the global async-domain synchronization") Testcase: igt/drv_module_reload/basic-no-display Cc: Chris Wilson Signed-off-by: Clint Taylor Link: http://patchwork.freedesktop.org/patch/msgid/1484775523-29428-1-git-send-email-clinton.a.taylor@intel.com Reviewed-by: Chris Wilson Cc: Lukas Wunner Cc: Daniel Vetter Cc: Jani Nikula Cc: # v4.8+ Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_fbdev.c | 3 +++ 1 file changed, 3 insertions(+) commit 02cfdc95a0104fa5812d855d1e4ec687312aaa6f Author: Tim Chen Date: Wed Jan 18 14:30:29 2017 -0800 sched/x86: Remove unnecessary TBM3 check to update topology Scheduling to the max performance core is enabled by default for Turbo Boost Maxt Technology 3.0 capable platforms. Remove the useless sysctl_sched_itmt_enabled check to update sched topology for adding the prioritized core scheduling flag. Signed-off-by: Tim Chen Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Thomas Gleixner Cc: bp@suse.de Cc: jolsa@redhat.com Cc: linux-acpi@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/1484778629-4404-1-git-send-email-tim.c.chen@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/itmt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 85b36c931ff328297572a3e6136fac573795ad79 Author: Luis R. Rodriguez Date: Wed Jan 18 09:38:04 2017 -0800 jump_labels: Move header guard #endif down where it belongs The ending header guard is misplaced. This has no functional change, this is just an eye-sore. Signed-off-by: Luis R. Rodriguez Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: bp@suse.de Cc: catalin.marinas@arm.com Cc: jbaron@akamai.com Cc: pbonzini@redhat.com Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/20170118173804.16281-1-mcgrof@kernel.org Signed-off-by: Ingo Molnar include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b70ea16d2d55db5d4b59d615d002046647e49a1e Author: Arnd Bergmann Date: Thu Jan 19 15:54:55 2017 +0100 rpmsg: char: add CONFIG_NET dependency Without CONFIG_NET, we get a build failure for the new driver: ERROR: "skb_queue_tail" [drivers/rpmsg/rpmsg_char.ko] undefined! ERROR: "skb_put" [drivers/rpmsg/rpmsg_char.ko] undefined! ERROR: "__alloc_skb" [drivers/rpmsg/rpmsg_char.ko] undefined! ERROR: "kfree_skb" [drivers/rpmsg/rpmsg_char.ko] undefined! ERROR: "skb_dequeue" [drivers/rpmsg/rpmsg_char.ko] undefined! This adds a dependency so we don't try to build the broken configuration. Fixes: c0cdc19f84a4 ("rpmsg: Driver for user space endpoint interface") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3587c856675c45809010c2cee5b21096f6e8e938 Author: John Stultz Date: Mon Jan 16 16:52:52 2017 -0800 drm/bridge: adv7511: Re-write the i2c address before EDID probing I've found that by just turning the chip on and off via the POWER_DOWN register, I end up getting i2c_transfer errors on HiKey. Investigating further, it turns out that some of the register state in hardware is getting lost, as the device registers are reset when the chip is powered down. Thus this patch simply re-writes the i2c address to the ADV7511_REG_EDID_I2C_ADDR register to ensure its properly set before we try to read the EDID data. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-7-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4226d9b127cf4758ba0e07931b3f0d59f1b1a50c Author: John Stultz Date: Mon Jan 16 16:52:51 2017 -0800 drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Thus this patch changes the EDID probing logic so that we re-use the __adv7511_power_on/off() calls instead of duplciating logic. This does change behavior slightly as it adds the HPD signal pulse to the EDID probe path, but Archit has had a patch to add HPD signal pulse to the EDID probe path before, so this should address the cases where that helped. Another difference is that regcache_mark_dirty() is also called in the power off path once EDID is probed. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-6-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 651e4769ba2a9f20c4b8a823ae2727bf7fa9c9f0 Author: John Stultz Date: Mon Jan 16 16:52:50 2017 -0800 drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally In chasing down issues with EDID probing, I found some duplicated but incomplete logic used to power the chip on and off. This patch refactors the adv7511_power_on/off functions, so they can be used for internal needs. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-5-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 40d86d2d22b04c2b2e48e2fe7054b85cf5021f25 Author: Archit Taneja Date: Mon Jan 16 16:52:49 2017 -0800 drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection On some adv7511 implementations, we can get some spurious disconnect signals which can cause monitor probing to fail. This patch enables HPD (hot plug detect) interrupt support which allows the monitor to be properly re-initialized when the spurious disconnect signal goes away. This also enables proper hotplug support. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Acked-by: Laurent Pinchart Tested-by: Laurent Pinchart Originally-by: Archit Taneja [jstultz: Added proper commit message] Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-4-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6d5104c5a6b56385426e15047050584794bb6254 Author: John Stultz Date: Mon Jan 16 16:52:48 2017 -0800 drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event() In chasing down a previous issue with EDID probing from calling drm_helper_hpd_irq_event() from irq context, Laurent noticed that the DRM documentation suggests that drm_kms_helper_hotplug_event() should be used instead. Thus this patch replaces drm_helper_hpd_irq_event() with drm_kms_helper_hotplug_event(), which requires we update the connector.status entry and only call _hotplug_event() when the status changes. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-3-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 518cb7057a59b9441336d2e88a396d52b6ab0cce Author: John Stultz Date: Mon Jan 16 16:52:47 2017 -0800 drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context I was recently seeing issues with EDID probing, where the logic to wait for the EDID read bit to be set by the IRQ wasn't happening and the code would time out and fail. Digging deeper, I found this was due to the fact that IRQs were disabled as we were running in IRQ context from the HPD signal. Thus this patch changes the logic to handle the HPD signal via a work_struct so we can be out of irq context. With this patch, the EDID probing on hotplug does not time out. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-2-git-send-email-john.stultz@linaro.org drivers/gpu/drm/bridge/adv7511/adv7511.h | 2 ++ drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 5d0e5ea343a0f70351428476bcf8715e0731f26a Author: Stephan Müller Date: Tue Dec 27 23:41:22 2016 +0100 random: fix comment for unused random_min_urandom_seed The variable random_min_urandom_seed is not needed any more as it defined the reseeding behavior of the nonblocking pool. Though it is not needed any more, it is left in the code for user space interface compatibility. Signed-off-by: Stephan Mueller Signed-off-by: Theodore Ts'o drivers/char/random.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 43d8a72cd985ca5279a9eb84d61fcbb3ee3d3774 Author: Stephan Müller Date: Tue Dec 27 23:40:59 2016 +0100 random: remove variable limit The variable limit was used to identify the nonblocking pool's unlimited random number generation. As the nonblocking pool is a thing of the past, remove the limit variable and any conditions around it (i.e. preserve the branches for limit == 1). Signed-off-by: Stephan Mueller Signed-off-by: Theodore Ts'o drivers/char/random.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 2e03c36f25ebb52d3358b8baebcdf96895c33a87 Author: Stephan Müller Date: Tue Dec 27 23:39:31 2016 +0100 random: remove stale urandom_init_wait The urandom_init_wait wait queue is a left over from the pre-ChaCha20 times and can therefore be savely removed. Signed-off-by: Stephan Mueller Signed-off-by: Theodore Ts'o drivers/char/random.c | 1 - 1 file changed, 1 deletion(-) commit 3d071d8da1f586c24863a57349586a1611b9aa67 Author: Stephan Mueller Date: Thu Dec 15 12:42:33 2016 +0100 random: remove stale maybe_reseed_primary_crng The function maybe_reseed_primary_crng is not used anywhere and thus can be removed. Signed-off-by: Stephan Mueller Signed-off-by: Theodore Ts'o drivers/char/random.c | 7 ------- 1 file changed, 7 deletions(-) commit d69dece5f5b6bc7a5e39d2b6136ddc69469331fe Author: Casey Schaufler Date: Wed Jan 18 17:09:05 2017 -0800 LSM: Add /sys/kernel/security/lsm I am still tired of having to find indirect ways to determine what security modules are active on a system. I have added /sys/kernel/security/lsm, which contains a comma separated list of the active security modules. No more groping around in /proc/filesystems or other clever hacks. Unchanged from previous versions except for being updated to the latest security next branch. Signed-off-by: Casey Schaufler Acked-by: John Johansen Acked-by: Paul Moore Acked-by: Kees Cook Signed-off-by: James Morris Documentation/security/LSM.txt | 7 +++++++ include/linux/lsm_hooks.h | 12 ++++-------- security/apparmor/lsm.c | 3 ++- security/commoncap.c | 3 ++- security/inode.c | 26 ++++++++++++++++++++++++-- security/loadpin/loadpin.c | 2 +- security/security.c | 38 ++++++++++++++++++++++++++++++++++++++ security/selinux/hooks.c | 2 +- security/smack/smack_lsm.c | 2 +- security/tomoyo/tomoyo.c | 2 +- security/yama/yama_lsm.c | 2 +- 11 files changed, 82 insertions(+), 17 deletions(-) commit c5a8e3add28ca4063410353acfbe6e650174e432 Merge: 3b4b625 5ab1a37 Author: Florian Fainelli Date: Tue Jan 17 17:10:32 2017 -0800 Merge tag 'bcm2835-dt-next-2017-01-17' into devicetree/next This pull request brings in the DT changes for VEC (TV-out) on Raspberry Pi. Signed-off-by: Florian Fainelli commit 5ab1a37c6027c114a87a1ae32cfc5ef303d643c5 Author: Boris Brezillon Date: Fri Dec 2 14:48:13 2016 +0100 ARM: dts: bcm283x: Enable the VEC IP on all RaspberryPi boards Enable the VEC IP on all RaspberryPi boards. Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit b899c45208d6f204a6da9a1132577993eeecf0fb Author: Boris Brezillon Date: Fri Dec 2 14:48:12 2016 +0100 ARM: dts: bcm283x: Add VEC node in bcm283x.dtsi Add the VEC (Video EnCoder) node definition in bcm283x.dtsi. Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3b4b6252f0b57776511b47bbe554a51d365fa98d Author: Dan Haab Date: Sat Jan 14 19:29:28 2017 -0700 ARM: dts: BCM5301X: Add DT for Luxul XWR-1200 Luxul XWR-1200 in a dual-band router based on BCM47081. It uses serial flash (for bootloader and NVRAM) and NAND flash (for firmware). Signed-off-by: Dan Haab Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 107 ++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) commit 3ba116a04530a0b9ecc8e53b67a09bcdec42076f Author: Dan Haab Date: Sat Jan 14 19:29:27 2017 -0700 ARM: dts: BCM5301X: Add DT for Luxul XAP-1410 Luxul XAP-1410 in a dual-band access point device based on BCM47081 with serial flash. It has 3 LEDs and just one (reset) button. Signed-off-by: Dan Haab Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 60 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 5d1f2d2c253037a5d89b48347d90868fa9407102 Author: Rafał Miłecki Date: Sat Jan 14 00:58:57 2017 +0100 ARM: dts: BCM5301X: Set 5 GHz wireless frequency limits on Netgear R8000 Netgear R8000 is a tri-band home router. It has three BCM43602 chipsets two of them for 5 GHz band. Both seem the same and their firmwares report the same set of channels. The problem is due to hardware / board design there are extra limitations that should be respected. First PHY should be used for U-NII-2 and U-NII-3. Third PHY should be used for U-NII-1. Using them in a different way may result in wireless not working or in noticeably reduced performance. Basic version of this info was provided by Broadcom employee, then it has been verified by me using original vendor firmware (which has limitations hardcoded in UI). This patch uses recently introduced ieee80211-freq-limit property to describe these limitations at DT level. Referencing PCIe devices in DT required specifying all related bridges. Below you can see (a bit complex) PCI tree from R8000 that explains all entries that I needed to put in DT. 0000:00:00.0 14e4:8012 Bridge Device └─ 0000:01:00.0 14e4:aa52 Network Controller 0001:00:00.0 14e4:8012 Bridge Device └─ 0001:01:00.0 10b5:8603 Bridge Device ├─ 0001:02:01.0 10b5:8603 Bridge Device │ └─ 0001:03:00.0 14e4:aa52 Network Controller ├─ 0001:02:02.0 10b5:8603 Bridge Device │ └─ 0001:04:00.0 14e4:aa52 Network Controller ├─ 0001:02:03.0 000d:0000 0x000000 ├─ 0001:02:04.0 000d:0000 0x000000 ├─ 0001:02:05.0 000d:0000 0x000000 ├─ 0001:02:06.0 000d:0000 0x000000 ├─ (...) ├─ 0001:02:1d.0 000d:0000 0x000000 ├─ 0001:02:1e.0 000d:0000 0x000000 └─ 0001:02:1f.0 000d:0000 0x000000 Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 48 +++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm5301x.dtsi | 8 +++++ 2 files changed, 56 insertions(+) commit 3107fa5bcfb2408b02203a7e318496c6adcbc50b Author: Jon Mason Date: Tue Dec 13 13:13:51 2016 -0500 ARM: dts: NSP: Add SD/MMC support Add SD/MMC support to the Broadcom NSP SVK and XMC. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++ arch/arm/boot/dts/bcm958525xmc.dts | 6 +- arch/arm/boot/dts/bcm958625k.dts | 118 ++++++++++++++++++++++++------------- 3 files changed, 90 insertions(+), 43 deletions(-) commit b6318107f4e1f0021515c7b1b9911e4e9716f53c Author: Jon Mason Date: Tue Dec 13 13:13:50 2016 -0500 ARM: dts: NSP: Add Ethernet to NSP XMC Enable the ethernet in the NSP XMC (bcm958525xmc) device tree Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958525xmc.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5aeda7bf8a1effd9902efc11e56687c242acbd5d Author: Jon Mason Date: Tue Dec 13 13:13:49 2016 -0500 ARM: dts: NSP: Add and enable amac2 Add and enable the third AMAC ethernet interface in the device trees for the platforms where it is present. Also, enable amac1 on some of the platforms where that was missing. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++++++++ arch/arm/boot/dts/bcm958622hr.dts | 8 ++++++++ arch/arm/boot/dts/bcm958623hr.dts | 8 ++++++++ arch/arm/boot/dts/bcm958625hr.dts | 8 ++++++++ arch/arm/boot/dts/bcm958625k.dts | 4 ++++ arch/arm/boot/dts/bcm988312hr.dts | 8 ++++++++ 6 files changed, 45 insertions(+) commit d9ff8878bbedf3d3443ebdeb7c995326a286ad8b Author: Jon Mason Date: Tue Dec 13 13:13:48 2016 -0500 ARM: dts: NSP: Add BCM958625K switch ports Add the layout of the switch ports found on the BCM958625K reference board. The CPU port is hooked up to the AMAC0 Ethernet controller adapter. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625k.dts | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 89b0a4c7da3d8e799a4aaae4e745d9504ae05f09 Author: Jon Mason Date: Tue Dec 13 13:13:47 2016 -0500 ARM: dts: NSP: Add QSPI support to missing boards QSPI device tree entries are present in bcm958625k, but missing from bcm958522er, bcm958525er, bcm958525xmc, bcm958622hr, bcm958623hr, bcm958625hr, and bcm988312hr. Duplicate the entry in bcm958625k for all of those that are missing it (as they are identical). Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958522er.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm958525er.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm958525xmc.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm958622hr.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm958623hr.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm958625hr.dts | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm988312hr.dts | 34 ++++++++++++++++++++++++++++++++++ 7 files changed, 238 insertions(+) commit fe6bf9999723a4a0b176267fc00ae38fa0560429 Author: Jon Mason Date: Tue Dec 13 13:13:46 2016 -0500 ARM: dts: NSP: Correct NAND partition unit address The NAND partition unit address does not match the other NSP device tree files. This change makes them uniform. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625k.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1fd2bb6ceb401d8adaaf6ddb02ae67811054f401 Author: Jon Mason Date: Tue Dec 13 13:13:45 2016 -0500 ARM: dts: NSP: DT Clean-ups The QSPI entry was added out of the sequental order that the rest of the DTSI file is in. Move it to make it fit in properly. Also, some other entries have been added in a non-alphabetical order in the DTS files, making them different from the other NSP DTS files. Move the relevant peices to make it match. Finally, remove errant new lines. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 46 +++++++++++++-------------- arch/arm/boot/dts/bcm958522er.dts | 1 - arch/arm/boot/dts/bcm958525er.dts | 1 - arch/arm/boot/dts/bcm958525xmc.dts | 26 ++++++++-------- arch/arm/boot/dts/bcm958623hr.dts | 16 +++++----- arch/arm/boot/dts/bcm958625hr.dts | 30 +++++++++--------- arch/arm/boot/dts/bcm958625k.dts | 64 +++++++++++++++++++------------------- 7 files changed, 91 insertions(+), 93 deletions(-) commit a503cf0cbe66f153f77fe9d0ecaa12e65b2a42a5 Author: Rafał Miłecki Date: Wed Dec 7 08:56:55 2016 +0100 ARM: dts: BCM53573: Specify USB ports of on-SoC controllers Broadcom OHCI and EHCI controllers always have 2 ports each on the root hub. Describe them in DT to allow specifying extra info or referencing port nodes. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm53573.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a252ccd3d2327556c6331e926abd82f4bfe4ce52 Author: Rafał Miłecki Date: Wed Dec 7 08:56:54 2016 +0100 ARM: dts: BCM5301X: Specify all RAM by including an extra block The first 128 MiB of RAM can be accessed using an alias at address 0x0. In theory we could access whole RAM using 0x80000000 - 0xbfffffff range (up to 1 GiB) but it doesn't seem to work on Northstar. For some reason (hardware setup left by the bootloader maybe?) 0x80000000 - 0x87ffffff range can't be used. I reproduced this problem on: 1) Buffalo WZR-600DHP2 (BCM47081) 2) Netgear R6250 (BCM4708) 3) D-Link DIR-885L (BCM47094) So it seems we're forced to access first 128 MiB using alias at 0x0 and the rest using real base address + 128 MiB offset which is 0x88000000. Signed-off-by: Rafał Miłecki Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 3 ++- arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 3 ++- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 3 ++- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 3 ++- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 3 ++- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 3 ++- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 3 ++- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 3 ++- arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 3 ++- arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 3 ++- arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 3 ++- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 3 ++- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 3 ++- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 3 ++- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 3 ++- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 3 ++- 16 files changed, 32 insertions(+), 16 deletions(-) commit 849af7f45862b7b059276c1d0333ac781861bd9c Author: Rafał Miłecki Date: Wed Dec 7 08:56:53 2016 +0100 ARM: dts: BCM5301X: Set GPIO enabling USB power on Netgear R7000 There is one GPIO controlling power for both USB ports. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0725c8421c729dfbbe21a2fbaf967b38e800285b Author: Rafał Miłecki Date: Wed Dec 7 08:56:52 2016 +0100 ARM: dts: BCM5301X: Specify USB controllers in DT There are 3 separated controllers, one per USB /standard/. With PHY drivers in place they can be simply supported with generic drivers. Signed-off-by: Rafał Miłecki Reviewed-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 226cc022057f9e937d4c601c5c6f4e110ba08814 Author: Rafał Miłecki Date: Wed Dec 7 08:56:51 2016 +0100 ARM: dts: BCM5301X: Fix LAN LED labels for Luxul XWR-3100 They were named incorrectly most likely due to copy & paste mistake. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b790d3b2943bf8e7e7bafe184008bd6451fe0bd Author: Rafał Miłecki Date: Thu Dec 1 18:40:51 2016 +0100 ARM: dts: BCM5301X: Enable UART by default for BCM4708(1), BCM4709(4) & BCM53012 Every device tested so far got UART0 (at 0x18000300) working as serial console. It's most likely part of reference design and all vendors use it that way. It seems to be easier to enable it by default and just disable it if we ever see a device with different hardware design. Signed-off-by: Rafał Miłecki Acked-by: Jon Mason Acked-by: Hauke Mehrtens Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 4 ---- arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 4 ---- arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 4 ---- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 4 ---- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ---- arch/arm/boot/dts/bcm4708.dtsi | 4 ++++ arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ---- arch/arm/boot/dts/bcm47081.dtsi | 4 ++++ arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 4 ---- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 4 ---- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 ---- arch/arm/boot/dts/bcm4709.dtsi | 1 + arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 4 ---- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 4 ---- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 4 ---- arch/arm/boot/dts/bcm47094.dtsi | 1 + arch/arm/boot/dts/bcm94708.dts | 4 ---- arch/arm/boot/dts/bcm94709.dts | 4 ---- arch/arm/boot/dts/bcm953012er.dts | 4 ---- arch/arm/boot/dts/bcm953012k.dts | 1 - 20 files changed, 10 insertions(+), 61 deletions(-) commit 560741d7d97ed9ad428f241462ab1f8c0cea376b Merge: 992ffc3 096fe872 Author: Olof Johansson Date: Wed Jan 18 16:30:43 2017 -0800 Merge tag 'arm-soc/for-4.11/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64 This pull request contains Broadcom ARM64-based SoC Device Tree changes for 4.11, please pull the following changes: - Jon adds Device Tree nodes for the GICv2m and PAXB/PAXC PCIe interfaces on the Northstar 2 SoCs, he also enables PAXC on the Northstar 2 SVK reference board. He also updates the reserved memory entry for the Nitro firmware, required to get the on-chip NICs to work. Finally he adds support for the BCM958712DxXMC reference board which is a subset of existing boards. * tag 'arm-soc/for-4.11/devicetree-arm64' of http://github.com/Broadcom/stblinux: arm64: dts: NS2: add support for XMC form factor arm64: dts: NS2: reserve memory for Nitro firmware arm64: dts: NS2: enable PAXC on NS2 SVK arm64: dts: NS2: enable GICv2m for PAXB/PAXC interfaces Signed-off-by: Olof Johansson commit 558d8181a89047c88ff9eacf46e27f338c4532eb Merge: 28e603b 8f9bafb Author: Olof Johansson Date: Wed Jan 18 16:25:03 2017 -0800 Merge tag 'aspeed-4.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt Aspeed devicetree updates for 4.11 This introduces the first OpenPower Power9 BMC system, Romulus. Romulus is based on the ast2500 SoC from Aspeed. These commits also add newly upstreamed drivers to the Palmetto BMC and ast2500 eval board. We now have working network, ipmi bt, gpio and pinmux on all platforms. * tag 'aspeed-4.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Add Romulus BMC platform ARM: dts: aspeed: Add ftgmac100 to g4 and g5 platforms ARM: dts: aspeed: Correct palmetto device tree ARM: dts: aspeed: Reserve framebuffer memory ARM: dts: aspeed-g5: Add gpio controller to devicetree ARM: dts: aspeed-g5: Add syscon and pin controller nodes ARM: dts: aspeed-g5: Add LPC Controller node ARM: dts: aspeed-g5: Add SoC Display Controller node ARM: dts: aspeed-g4: Add gpio controller to devicetree ARM: dts: aspeed-g4: Add syscon and pin controller nodes Signed-off-by: Olof Johansson commit 37b3785b136289b36f5403b4f59b2dc47c35c485 Merge: 8151339 43c08c1 Author: Olof Johansson Date: Wed Jan 18 16:23:58 2017 -0800 Merge tag 'aspeed-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/soc Apseed SoC updates for 4.11 One commit that selects the newly upstreamed pinctrl driver for all SoCs. * tag 'aspeed-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: aspeed: Select pinctrl drivers Signed-off-by: Olof Johansson commit b5f8c90c75106f1167615f26b13927a05a1da9a7 Merge: 4b9ea20 0e81eb7 Author: Olof Johansson Date: Wed Jan 18 16:19:20 2017 -0800 Merge tag 'aspeed-4.11-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/defconfig Aspeed defconfig updates for 4.11 Just the one commit that updates our defconfigs with network (ftgmac100 and ncsi), bt ipmi, gpio and ncsi. * tag 'aspeed-4.11-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: configs: Update Aspeed with new drivers Signed-off-by: Olof Johansson commit 4b9ea2007894b54f582431d6ae518164faea9cba Merge: d602ede f46b1d4 Author: Olof Johansson Date: Wed Jan 18 16:18:37 2017 -0800 Merge tag 'at91-ab-4.11-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/defconfig defconfig for 4.11: - Add driver support for the Axentia TSE-850 * tag 'at91-ab-4.11-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: sama5_defconfig: add support for the Axentia TSE-850 board Signed-off-by: Olof Johansson commit 28e603b2ad829f8320b804f825dfba4a9303d5bd Merge: c2b3604 21dd0ec Author: Olof Johansson Date: Wed Jan 18 16:17:26 2017 -0800 Merge tag 'at91-ab-4.11-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt DT for 4.11: - New boards: Axentia TSE-850, sama5d36ek CMP - new device definitions for sama5d2 - Fix DMA allocation on sama5d4 for secure peripherals * tag 'at91-ab-4.11-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: add devicetree for the Axentia TSE-850 ARM: dts: at91: add dts file for sama5d36ek CMP board ARM: dts: at91: sama5d2: add ssc0 definition ARM: dts: at91: sama5d2 Xplained: use DMA for UART3 ARM: dts: at91: sama5d2: move UART3 to DMA1 ARM: dts: at91: add dma1 definition to sama5d2 ARM: dts: at91: sama5d4 Xplained: enable UART1 node with DMA ARM: dts: at91: sama5d4: change DMA allocation for secure peripherals ARM: dts: at91: sama5d3_uart: fix reg sizes to match documentation Signed-off-by: Olof Johansson commit 0ff6454b2aa09c5ec0ba9007704a7706d476e2c8 Merge: a121103 ee19428 Author: Olof Johansson Date: Wed Jan 18 16:16:59 2017 -0800 Merge tag 'at91-ab-4.11-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers Drivers for 4.11: - atmel-ebi: Fix ns <-> cycles conversions * tag 'at91-ab-4.11-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: memory/atmel-ebi: Fix ns <-> cycles conversions Signed-off-by: Olof Johansson commit 815133987cc94670e1db9c9f9a6a2284e9e9fd89 Merge: d2d08ab 6cc7fbd Author: Olof Johansson Date: Wed Jan 18 16:16:06 2017 -0800 Merge tag 'at91-ab-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/soc SoC for 4.11: - small cleanup * tag 'at91-ab-4.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: pm: remove useless extern definition Signed-off-by: Olof Johansson commit 992ffc3eb10df4fcc6758b96b1a058a16d7d4b3a Merge: f638d8f 1492a86 Author: Olof Johansson Date: Wed Jan 18 16:14:29 2017 -0800 Merge tag 'juno-updates-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt64 ARMv8 Vexpress/Juno DT updates for v4.11 1. Addition of Coresight support on Juno R1 and R2 variants 2. Addition of STM(System Trace Macrocell) support on all Juno variants 3. Removed incorrect nesting of dtsi files 4. Removed untested USB hub only available on initial Juno R0 motherboard 5. Added ETR SMMU power domain and dma-ranges property * tag 'juno-updates-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: remove motherboard USB node arm64: dts: juno: add ETR SMMU power domain arm64: dts: juno: add dma-ranges property arm64: dts: juno: add missing CoreSight STM component arm64: dts: juno: add CoreSight support for Juno r1/r2 variants arm64: dts: juno: refactor CoreSight support on Juno r0 arm64: dts: juno: remove dtsi nesting inside tree structure Signed-off-by: Olof Johansson commit b2ec9efc1f4fb1dc13a599db88019d5472deef9b Author: Bhumika Goyal Date: Tue Jan 10 23:42:06 2017 +0530 pwm: constify pwm_ops structures Declare pwm_ops structures as const as they are only stored in the ops field of a pwm_chip structure. This field is of type const struct pwm_ops *, so pwm_ops structures having this property can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct pwm_ops i@p={...}; @ok1@ identifier r1.i; position p; struct pxa_pwm_chip pwm; struct bfin_pwm_chip bwm; struct vt8500_chip vp; struct imx_chip icp; @@ ( pwm.chip.ops=&i@p | bwm.chip.ops=&i@p | vp.chip.ops=&i@p | icp.chip.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct pwm_ops i; File size details: text data bss dec hex filename 1646 328 0 1974 7b6 drivers/pwm/pwm-imx.o 1742 224 0 1966 7ae drivers/pwm/pwm-imx.o 1941 296 0 2237 8bd drivers/pwm/pwm-pxa.o 2037 192 0 2229 8b5 drivers/pwm/pwm-pxa.o 1946 296 0 2242 8c2 drivers/pwm/pwm-vt8500.o 2050 192 0 2242 8c2 drivers/pwm/pwm-vt8500.o The drivers/pwm/pwm-bfin.o file did not compile. Signed-off-by: Bhumika Goyal Signed-off-by: Thierry Reding drivers/pwm/pwm-bfin.c | 2 +- drivers/pwm/pwm-imx.c | 2 +- drivers/pwm/pwm-pxa.c | 2 +- drivers/pwm/pwm-vt8500.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 5bf22ff32e736beb8ba91a99a3e116d12e7eabd0 Author: Scott Branden Date: Sat Oct 8 13:54:05 2016 -0700 pwm: bcm-iproc: Update dependencies for compile-test Add dependency on COMMON_CLK and allow COMPILE_TEST for broader compile coverage. Default to Y for IPROC SoCs. This allows the driver to simply be enabled by selecting PWM. Signed-off-by: Scott Branden Reviewed-by: Ray Jui [thierry.reding@gmail.com: reword commit message] Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bccec89f0a35f65302734d1cdb01479df0f33ac9 Author: Mika Westerberg Date: Tue Sep 20 17:40:56 2016 +0300 pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO The PCA9685 controller has full on/off bit for each PWM channel. Setting this bit bypasses the PWM control and the line works just as it would be a GPIO. Furthermore in Intel Galileo it is actually used as GPIO output for discreet muxes on the board. This patch adds GPIO output only support for the driver so that we can control the muxes on Galileo using standard GPIO interfaces available in the kernel. GPIO and PWM functionality is exclusive so only one can be active at a time on a single PWM channel. Signed-off-by: Mika Westerberg Acked-by: Linus Walleij Signed-off-by: Thierry Reding drivers/pwm/pwm-pca9685.c | 164 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 163 insertions(+), 1 deletion(-) commit 8dca4a41f1ad65043a78c2338d9725f859c8d2c3 Author: Wei Yongjun Date: Tue Jan 17 15:55:32 2017 +0000 pinctrl/amd: Drop pinctrl_unregister for devm_ registered device It's not necessary to unregister pin controller device registered with devm_pinctrl_register() and using pinctrl_unregister() leads to a double free. Fixes: 3bfd44306c65 ("pinctrl: amd: Add support for additional GPIO") Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 1 - 1 file changed, 1 deletion(-) commit 72d1f2346ded5b1743d7938f4522550b4da9c82d Author: Jaechul Lee Date: Wed Jan 18 14:35:42 2017 -0800 Input: tm2-touchkey - add touchkey driver support for TM2 This patch adds support for the TM2 touch key and led functionality. The driver interfaces with userspace through an input device and reports KEY_PHONE and KEY_BACK event types. LED brightness can be controlled by "/sys/class/leds/tm2-touchkey/brightness". Signed-off-by: Beomho Seo Signed-off-by: Jaechul Lee Reviewed-by: Javier Martinez Canillas Reviewed-by: Andi Shyti Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/cypress,tm2-touchkey.txt | 27 ++ drivers/input/keyboard/Kconfig | 11 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/tm2-touchkey.c | 286 +++++++++++++++++++++ 4 files changed, 325 insertions(+) commit 38dbb7dd4db184da4d2673f4bb963f7006465c37 Author: Jens Axboe Date: Wed Jan 18 15:37:27 2017 -0700 blk-cgroup: don't quiesce the queue on policy activate/deactivate There's no potential harm in quiescing the queue, but it also doesn't buy us anything. And we can't run the queue async for policy deactivate, since we could be in the path of tearing the queue down. If we schedule an async run of the queue at that time, we're racing with queue teardown AFTER having we've already torn most of it down. Reported-by: Omar Sandoval Fixes: 4d199c6f1c84 ("blk-cgroup: ensure that we clear the stop bit on quiesced queues") Tested-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-cgroup.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit b949165c86cdd230fbb7997a2b2966e860caf372 Author: Neil Armstrong Date: Tue Jan 17 13:05:38 2017 +0100 ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes Add pinctrl nodes for HDMI HPD and DDC pins modes for Amlogic Meson GXL and GXBB SoCs. Signed-off-by: Neil Armstrong Acked-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 14 ++++++++++++++ 2 files changed, 28 insertions(+) commit 2fbbc4bf69f293df317559a267f4120f290b8fc4 Author: Andreas Färber Date: Tue Jan 17 02:17:53 2017 +0100 ARM64: dts: meson-gxbb-vega-s95: Add LED There is one blue LED on the front of the device. Keep it lit and configure it as panic indicator. Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 261e1d5cc5ee994f17089d8f0d4f8443743d732d Author: Martin Blumenstingl Date: Sun Jan 15 23:32:53 2017 +0100 ARM64: dts: meson-gx: add the serial CTS and RTS pin groups This adds pinctrl group nodes for the CTS and RTS pins of each serial controller. This makes it possible to enable the CTS and RTS pins which are controlled by the serial controller hardware (through the meson_uart driver). Signed-off-by: Martin Blumenstingl Tested-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 40 +++++++++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 40 +++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit 890a96a257b497e8361055ffbf66e2fd08833074 Author: Martin Blumenstingl Date: Sun Jan 15 23:20:29 2017 +0100 ARM64: dts: meson-gx: add the missing uart_AO_B This adds the missing node for the uart_AO_B port to the meson-gx.dtsi (as this is supported by GXBB, GXL and GXM) along with the required pinctrl pins. This is required as some boards are using it (the boards from the Khadas VIM series for example have it exposed on the pin headers). Signed-off-by: Martin Blumenstingl Acked-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 8 ++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 7 +++++++ 3 files changed, 22 insertions(+) commit aa6f9222218273cc54ec8d3c91ad8207eef21f99 Author: Guenter Roeck Date: Wed Jan 18 14:26:47 2017 -0800 Input: sis_i2c - drop unnecessary call to i2c_set_clientdata There is no call to i2c_get_clientdata() or dev_get_drvdata(). Drop the unnecessary call to i2c_set_clientdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sis_i2c.c | 1 - 1 file changed, 1 deletion(-) commit 4a7c972644c1151f6dd34ff4b5f7eacb239e22ee Author: Tobias Klauser Date: Wed Jan 18 17:45:01 2017 +0100 net: Remove usage of net_device last_rx member The network stack no longer uses the last_rx member of struct net_device since the bonding driver switched to use its own private last_rx in commit 9f242738376d ("bonding: use last_arp_rx in slave_last_rx()"). However, some drivers still (ab)use the field for their own purposes and some driver just update it without actually using it. Previously, there was an accompanying comment for the last_rx member added in commit 4dc89133f49b ("net: add a comment on netdev->last_rx") which asked drivers not to update is, unless really needed. However, this commend was removed in commit f8ff080dacec ("bonding: remove useless updating of slave->dev->last_rx"), so some drivers added later on still did update last_rx. Remove all usage of last_rx and switch three drivers (sky2, atp and smc91c92_cs) which actually read and write it to use their own private copy in netdev_priv. Compile-tested with allyesconfig and allmodconfig on x86 and arm. Cc: Eric Dumazet Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Cc: Mirko Lindner Cc: Stephen Hemminger Signed-off-by: Tobias Klauser Acked-by: Eric Dumazet Reviewed-by: Jay Vosburgh Signed-off-by: David S. Miller arch/m68k/emu/nfeth.c | 1 - drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 - drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 - drivers/net/ethernet/hisilicon/hns/hns_enet.c | 1 - drivers/net/ethernet/intel/e1000e/netdev.c | 6 +++--- drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++---- drivers/net/ethernet/marvell/sky2.c | 6 +++--- drivers/net/ethernet/marvell/sky2.h | 1 + drivers/net/ethernet/qualcomm/emac/emac-mac.c | 1 - drivers/net/ethernet/realtek/atp.c | 7 +++---- drivers/net/ethernet/smsc/smc91c92_cs.c | 6 ++++-- drivers/net/irda/bfin_sir.c | 5 ++--- drivers/net/irda/sh_sir.c | 1 - drivers/staging/ks7010/ks_hostif.c | 2 -- drivers/staging/netlogic/xlr_net.c | 1 - drivers/staging/rtl8192e/rtllib_rx.c | 1 - drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 ---- drivers/staging/wlan-ng/hfa384x_usb.c | 1 - drivers/staging/wlan-ng/p80211netdev.c | 2 -- include/linux/netdevice.h | 3 --- net/batman-adv/bridge_loop_avoidance.c | 1 - net/batman-adv/distributed-arp-table.c | 1 - net/batman-adv/soft-interface.c | 2 -- 24 files changed, 22 insertions(+), 46 deletions(-) commit 9520ed8fb8410dcb6babf751561a08f73ca03812 Author: Vivien Didelot Date: Tue Jan 17 20:41:39 2017 -0500 net: dsa: use cpu_switch instead of ds[0] Now that the DSA Ethernet switches are true Linux devices, the CPU switch is not necessarily the first one. If its address is higher than the second switch on the same MDIO bus, its index will be 1, not 0. Avoid any confusion by using dst->cpu_switch instead of dst->ds[0]. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa.c | 2 +- net/dsa/dsa2.c | 8 ++++---- net/dsa/slave.c | 6 +++--- net/dsa/tag_brcm.c | 2 +- net/dsa/tag_qca.c | 2 +- net/dsa/tag_trailer.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) commit b22de490869da354116ea4cbbaa09dcbc260b2b4 Author: Vivien Didelot Date: Tue Jan 17 20:41:38 2017 -0500 net: dsa: store CPU switch structure in the tree Store a dsa_switch pointer to the CPU switch in the tree instead of only its index. This avoids the need to initialize it to -1. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 8 ++++---- net/dsa/dsa.c | 7 +++---- net/dsa/dsa2.c | 5 ++--- 3 files changed, 9 insertions(+), 11 deletions(-) commit e33c2ef106d17ad8cdb16a0be0ef0daebb2d2c16 Author: Ivan Khoronzhuk Date: Wed Jan 18 02:28:06 2017 +0200 net: ethernet: ti: davinci_cpdma: correct check on NULL in set rate Check "ch" on NULL first, then get ctlr. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3e37e701713731b22f8cebfa1f5deed455cad8a Merge: 1a8b6d7 5503fce Author: David S. Miller Date: Wed Jan 18 16:35:30 2017 -0500 Merge branch 'vhost_net-batching' Jason Wang says: ==================== vhost_net tx batching This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+% rx-frames = 0 0.91 +0% rx-frames = 4 1.00 +9.8% rx-frames = 8 1.00 +9.8% rx-frames = 16 1.01 +10.9% rx-frames = 32 1.07 +17.5% rx-frames = 48 1.07 +17.5% rx-frames = 64 1.08 +18.6% rx-frames = 64 (no MSG_MORE) 0.91 +0% Changes from V4: - stick to NAPI_POLL_WEIGHT for rx-frames is user specify a value greater than it. Changes from V3: - use ethtool instead of module parameter to control the maximum number of batched packets - avoid overhead when MSG_MORE were not set and no packet queued Changes from V2: - remove uselss queue limitation check (and we don't drop any packet now) Changes from V1: - drop NAPI handler since we don't use NAPI now - fix the issues that may exceeds max pending of zerocopy - more improvement on available buffer detection - move the limitation of batched pacekts from vhost to tuntap ==================== Signed-off-by: David S. Miller commit 5503fcecd49f599e52d10f82057fe0c9d53c8f03 Author: Jason Wang Date: Wed Jan 18 15:02:03 2017 +0800 tun: rx batching We can only process 1 packet at one time during sendmsg(). This often lead bad cache utilization under heavy load. So this patch tries to do some batching during rx before submitting them to host network stack. This is done through accepting MSG_MORE as a hint from sendmsg() caller, if it was set, batch the packet temporarily in a linked list and submit them all once MSG_MORE were cleared. Tests were done by pktgen (burst=128) in guest over mlx4(noqueue) on host: Mpps -+% rx-frames = 0 0.91 +0% rx-frames = 4 1.00 +9.8% rx-frames = 8 1.00 +9.8% rx-frames = 16 1.01 +10.9% rx-frames = 32 1.07 +17.5% rx-frames = 48 1.07 +17.5% rx-frames = 64 1.08 +18.6% rx-frames = 64 (no MSG_MORE) 0.91 +0% User were allowed to change per device batched packets through ethtool -C rx-frames. NAPI_POLL_WEIGHT were used as upper limitation to prevent bh from being disabled too long. Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tun.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 6 deletions(-) commit 0ed005ce02fa0a88e5e6b7b5f7ff452171881610 Author: Jason Wang Date: Wed Jan 18 15:02:02 2017 +0800 vhost_net: tx batching This patch tries to utilize tuntap rx batching by peeking the tx virtqueue during transmission, if there's more available buffers in the virtqueue, set MSG_MORE flag for a hint for backend (e.g tuntap) to batch the packets. Reviewed-by: Stefan Hajnoczi Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/net.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 275bf960ac69744430a6725a4ed7f50d36cf1441 Author: Jason Wang Date: Wed Jan 18 15:02:01 2017 +0800 vhost: better detection of available buffers This patch tries to do several tweaks on vhost_vq_avail_empty() for a better performance: - check cached avail index first which could avoid userspace memory access. - using unlikely() for the failure of userspace access - check vq->last_avail_idx instead of cached avail index as the last step. This patch is need for batching supports which needs to peek whether or not there's still available buffers in the ring. Reviewed-by: Stefan Hajnoczi Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1a8b6d76dc5b489cd0123fa8447b6e20569f357b Author: Mao Wenan Date: Wed Jan 18 08:50:05 2017 +0800 net:add one common config ARCH_WANT_RELAX_ORDER to support relax ordering Relax ordering(RO) is one feature of 82599 NIC, to enable this feature can enhance the performance for some cpu architecure, such as SPARC and so on. Currently it only supports one special cpu architecture(SPARC) in 82599 driver to enable RO feature, this is not very common for other cpu architecture which really needs RO feature. This patch add one common config CONFIG_ARCH_WANT_RELAX_ORDER to set RO feature, and should define CONFIG_ARCH_WANT_RELAX_ORDER in sparc Kconfig firstly. Signed-off-by: Mao Wenan Reviewed-by: Alexander Duyck Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller arch/Kconfig | 3 +++ arch/sparc/Kconfig | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) commit 1e48aac14cc896b5a6a8f8f32c9744c52bebf4ee Merge: 1ce463d f8cfe2c Author: David S. Miller Date: Wed Jan 18 15:44:00 2017 -0500 Merge branch 'ipv6-simplify-rt6_fill_node' David Ahern says: ==================== net: ipv6: simplify rt6_fill_node Remove a couple of unnecessary input arguments to rt6_fill_node. ==================== Signed-off-by: David S. Miller commit f8cfe2ceb1c2ebe1469040d037a733815d2255d5 Author: David Ahern Date: Tue Jan 17 15:51:08 2017 -0800 net: ipv6: remove prefix arg to rt6_fill_node The prefix arg to rt6_fill_node is non-0 in only 1 path - rt6_dump_route where a user is requesting a prefix only dump. Simplify rt6_fill_node by removing the prefix arg and moving the prefix check to rt6_dump_route. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit fd61c6ba313de6758aeeab58fe03bd9fbbc8cea9 Author: David Ahern Date: Tue Jan 17 15:51:07 2017 -0800 net: ipv6: remove nowait arg to rt6_fill_node All callers of rt6_fill_node pass 0 for nowait arg. Remove the arg and simplify rt6_fill_node accordingly. rt6_fill_node passes the nowait of 0 to ip6mr_get_route. Remove the nowait arg from it as well. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/mroute6.h | 2 +- net/ipv6/ip6mr.c | 9 ++------- net/ipv6/route.c | 27 ++++++++++----------------- 3 files changed, 13 insertions(+), 25 deletions(-) commit 6c0ca7ae292adea09b8bdd33a524bb9326c3e989 Author: Omar Sandoval Date: Wed Jan 18 11:55:22 2017 -0800 sbitmap: fix wakeup hang after sbq resize When we resize a struct sbitmap_queue, we update the wakeup batch size, but we don't update the wait count in the struct sbq_wait_states. If we resized down from a size which could use a bigger batch size, these counts could be too large and cause us to miss necessary wakeups. To fix this, update the wait counts when we resize (ensuring some careful memory ordering so that it's safe w.r.t. concurrent clears). This also fixes a theoretical issue where two threads could end up bumping the wait count up by the batch size, which could also potentially lead to hangs. Reported-by: Martin Raiber Fixes: e3a2b3f931f5 ("blk-mq: allow changing of queue depth through sysfs") Fixes: 2971c35f3588 ("blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cnt") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe lib/sbitmap.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) commit f66227de5924ed0fde1823f5cbc4d8b8f45faaa2 Author: Omar Sandoval Date: Wed Jan 18 11:55:21 2017 -0800 sbitmap: use smp_mb__after_atomic() in sbq_wake_up() We always do an atomic clear_bit() right before we call sbq_wake_up(), so we can use smp_mb__after_atomic(). While we're here, comment the memory barriers in here a little more. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe lib/sbitmap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1a28ad74ebd8f9d3c7eae0d781f72a6d30545e17 Author: Gao Feng Date: Mon Jan 16 22:02:57 2017 +0800 netfilter: nf_tables: eliminate useless condition checks The return value of nf_tables_table_lookup() is valid pointer or one pointer error. There are two cases: 1) IS_ERR(table) is true, it would return the error or reset the table as NULL, it is unnecessary to perform the latter check "table != NULL". 2) IS_ERR(obj) is false, the table is one valid pointer. It is also unnecessary to perform that check. The nf_tables_newset() and nf_tables_newobj() have same logic codes. In summary, we could move the block of condition check "table != NULL" in the else block to eliminate the original condition checks. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 62bc306e2083436675e33b5bdeb6a77907d35971 Author: Richard Guy Briggs Date: Tue Jan 17 11:07:15 2017 -0500 audit: log 32-bit socketcalls 32-bit socketcalls were not being logged by audit on x86_64 systems. Log them. This is basically a duplicate of the call from net/socket.c:sys_socketcall(), but it addresses the impedance mismatch between 32-bit userspace process and 64-bit kernel audit. See: https://github.com/linux-audit/audit-kernel/issues/14 Signed-off-by: Richard Guy Briggs Acked-by: David S. Miller Signed-off-by: Paul Moore include/linux/audit.h | 20 ++++++++++++++++++++ net/compat.c | 17 ++++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) commit c61f13eaa1ee17728c41370100d2d45c254ce76f Author: Kees Cook Date: Fri Jan 13 11:14:39 2017 -0800 gcc-plugins: Add structleak for more stack initialization This plugin detects any structures that contain __user attributes and makes sure it is being fully initialized so that a specific class of information exposure is eliminated. (This plugin was originally designed to block the exposure of siginfo in CVE-2013-2141.) Ported from grsecurity/PaX. This version adds a verbose option to the plugin and the Kconfig. Signed-off-by: Kees Cook arch/Kconfig | 22 +++ include/linux/compiler.h | 6 +- scripts/Makefile.gcc-plugins | 4 + scripts/gcc-plugins/structleak_plugin.c | 246 ++++++++++++++++++++++++++++++++ 4 files changed, 277 insertions(+), 1 deletion(-) commit 1ce463dd75d4ba0c64191e2b9c73c202a5a6cc3a Merge: b16ed2b 7f9d68a Author: David S. Miller Date: Wed Jan 18 14:55:11 2017 -0500 Merge branch 'sctp-sender-side-stream-reconf-ssn-reset-request-chunk' Xin Long says: ==================== sctp: add sender-side procedures for stream reconf ssn reset request chunk Patch 6/6 is to implement sender-side procedures for the Outgoing and Incoming SSN Reset Request Parameter described in rfc6525 section 5.1.2 and 5.1.3 Patches 1-5/6 are ahead of it to define some apis and asoc members for it. Note that with this patchset, asoc->reconf_enable has no chance yet to be set, until the patch "sctp: add get and set sockopt for reconf_enable" is applied in the future. As we can not just enable it when sctp is not capable of processing reconf chunk yet. v1->v2: - put these into a smaller group. - rename some temporary variables in the codes. - rename the titles of the commits and improve some changelogs. v2->v3: - re-split the patchset and make sure it has no dead codes for review. v3->v4: - move sctp_make_reconf() into patch 1/6 to avoid kbuild warning. - drop unused struct sctp_strreset_req. ==================== Signed-off-by: David S. Miller commit 7f9d68ac944e24ee5f9ac8d059ca00b1c1d34137 Author: Xin Long Date: Wed Jan 18 00:44:47 2017 +0800 sctp: implement sender-side procedures for SSN Reset Request Parameter This patch is to implement sender-side procedures for the Outgoing and Incoming SSN Reset Request Parameter described in rfc6525 section 5.1.2 and 5.1.3. It is also add sockopt SCTP_RESET_STREAMS in rfc6525 section 6.3.2 for users. Note that the new asoc member strreset_outstanding is to make sure only one reconf request chunk on the fly as rfc6525 section 5.1.1 demands. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sctp.h | 6 ++++ include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 11 +++++++ net/sctp/outqueue.c | 33 +++++++++++++------ net/sctp/socket.c | 29 +++++++++++++++++ net/sctp/stream.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 149 insertions(+), 10 deletions(-) commit 9fb657aec0e20b4ed4401c44a4140f8d7b7a9ca0 Author: Xin Long Date: Wed Jan 18 00:44:46 2017 +0800 sctp: add sockopt SCTP_ENABLE_STREAM_RESET This patch is to add sockopt SCTP_ENABLE_STREAM_RESET to get/set strreset_enable to indicate which reconf request type it supports, which is described in rfc6525 section 6.3.1. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 4 +++ include/uapi/linux/sctp.h | 7 ++++ net/sctp/associola.c | 1 + net/sctp/socket.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+) commit c28445c3cb07ba1da2c1dc7b5f3066c686a6acc6 Author: Xin Long Date: Wed Jan 18 00:44:45 2017 +0800 sctp: add reconf_enable in asoc ep and netns This patch is to add reconf_enable field in all of asoc ep and netns to indicate if they support stream reset. When initializing, asoc reconf_enable get the default value from ep reconf_enable which is from netns netns reconf_enable by default. It is also to add reconf_capable in asoc peer part to know if peer supports reconf_enable, the value is set if ext params have reconf chunk support when processing init chunk, just as rfc6525 section 5.1.1 demands. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/netns/sctp.h | 3 +++ include/net/sctp/structs.h | 7 +++++-- net/sctp/associola.c | 1 + net/sctp/endpointola.c | 1 + net/sctp/protocol.c | 3 +++ net/sctp/sm_make_chunk.c | 15 +++++++++++++++ 6 files changed, 28 insertions(+), 2 deletions(-) commit 7a090b04522b46a219c271d4cd2abbf572623e03 Author: Xin Long Date: Wed Jan 18 00:44:44 2017 +0800 sctp: add stream reconf primitive This patch is to add a primitive based on sctp primitive frame for sending stream reconf request. It works as the other primitives, and create a SCTP_CMD_REPLY command to send the request chunk out. sctp_primitive_RECONF would be the api to send a reconf request chunk. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/constants.h | 3 ++- include/net/sctp/sctp.h | 2 ++ include/net/sctp/sm.h | 1 + net/sctp/primitive.c | 3 +++ net/sctp/sm_statefuns.c | 13 +++++++++++++ net/sctp/sm_statetable.c | 20 ++++++++++++++++++++ 6 files changed, 41 insertions(+), 1 deletion(-) commit 7b9438de0cd4b46a6914416bfede6cf839cd9e68 Author: Xin Long Date: Wed Jan 18 00:44:43 2017 +0800 sctp: add stream reconf timer This patch is to add a per transport timer based on sctp timer frame for stream reconf chunk retransmission. It would start after sending a reconf request chunk, and stop after receiving the response chunk. If the timer expires, besides retransmitting the reconf request chunk, it would also do the same thing with data RTO timer. like to increase the appropriate error counts, and perform threshold management, possibly destroying the asoc if sctp retransmission thresholds are exceeded, just as section 5.1.1 describes. This patch is also to add asoc strreset_chunk, it is used to save the reconf request chunk, so that it can be retransmitted, and to check if the response is really for this request by comparing the information inside with the response chunk as well. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/constants.h | 1 + include/net/sctp/sm.h | 2 ++ include/net/sctp/structs.h | 6 ++++++ net/sctp/associola.c | 9 +++++++++ net/sctp/sm_sideeffect.c | 32 ++++++++++++++++++++++++++++++++ net/sctp/sm_statefuns.c | 28 ++++++++++++++++++++++++++++ net/sctp/sm_statetable.c | 20 ++++++++++++++++++++ net/sctp/transport.c | 17 +++++++++++++++-- 8 files changed, 113 insertions(+), 2 deletions(-) commit cc16f00f6529aa2378f2b949a6f68e9dc6dec363 Author: Xin Long Date: Wed Jan 18 00:44:42 2017 +0800 sctp: add support for generating stream reconf ssn reset request chunk This patch is to add asoc strreset_outseq and strreset_inseq for saving the reconf request sequence, initialize them when create assoc and process init, and also to define Incoming and Outgoing SSN Reset Request Parameter described in rfc6525 section 4.1 and 4.2, As they can be in one same chunk as section rfc6525 3.1-3 describes, it makes them in one function. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 27 ++++++++++ include/net/sctp/sm.h | 5 +- include/net/sctp/structs.h | 3 ++ net/sctp/associola.c | 1 + net/sctp/sm_make_chunk.c | 121 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 156 insertions(+), 1 deletion(-) commit 8beb7172b428a63634684a8a2bf8754002756056 Author: Guenter Roeck Date: Wed Jan 18 11:48:11 2017 -0800 Input: bcm-keypad - drop unnecessary call to platform_set_drvdata There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/bcm-keypad.c | 2 -- 1 file changed, 2 deletions(-) commit e634d08dec48023394f816cdf17cc9f040b8d56f Author: Guenter Roeck Date: Wed Jan 18 11:45:25 2017 -0800 Input: twl4030_keypad - drop unnecessary call to platform_set_drvdata There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/twl4030_keypad.c | 1 - 1 file changed, 1 deletion(-) commit b8f6a6ad777f14e3ec48d410a840621a45fce98a Author: Guenter Roeck Date: Wed Jan 18 11:44:55 2017 -0800 Input: ab8500-ponkey - drop unnecessary call to platform_set_drvdata There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/ab8500-ponkey.c | 1 - 1 file changed, 1 deletion(-) commit 8ace98df9ade746de229dd75c144a25ec9fe2613 Author: Guenter Roeck Date: Wed Jan 18 11:42:44 2017 -0800 Input: tps65218-pwrbutton - drop unnecessary call to platform_set_drvdata There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Also use existing variable 'dev' instead of dereferencing it several times. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/tps65218-pwrbutton.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit aa45590ae8581e25b909f2fed591c3499cd8e352 Author: Guenter Roeck Date: Wed Jan 18 11:41:51 2017 -0800 Input: soc_button_array - use 'dev' instead of dereferencing it Use local variable 'dev' instead of dereferencing it several times. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9e85aa695659407bb7a2b2d5de47be8c335049c0 Author: Guenter Roeck Date: Wed Jan 18 11:41:01 2017 -0800 Input: mma8450 - drop unnecessary call to i2c_set_clientdata There is no call to i2c_get_clientdata() or dev_get_drvdata(). Drop the unnecessary call to i2c_set_clientdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/mma8450.c | 2 -- 1 file changed, 2 deletions(-) commit a196b2c9f5f752e139f91d306fcb471e97723253 Author: Guenter Roeck Date: Wed Jan 18 11:40:04 2017 -0800 Input: gpio_decoder - drop unnecessary call to platform_set_drvdata There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/gpio_decoder.c | 1 - 1 file changed, 1 deletion(-) commit 0265c324b8a2bbe502fee3007361d310de3b6d0c Author: Guenter Roeck Date: Wed Jan 18 11:36:25 2017 -0800 Input: bfin_rotary - switch to using devm_add_action_or_reset() Use local variable 'dev' instead of dereferencing it several times and replace devm_add_action() and manual error handling with devm_add_action_or_reset(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/misc/bfin_rotary.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ad03ae44baeb82b28024c8c582e18146b96d637e Author: Guenter Roeck Date: Wed Jan 18 11:24:06 2017 -0800 Input: eeti_ts - drop goto to return statement Replace 'goto l; ... l: return e;' with 'return e;' Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5d20b927fa17d016e633857c756788516078b94e Author: Guenter Roeck Date: Wed Jan 18 11:21:24 2017 -0800 Input: atmel-wm97xx - drop unnecessary error messages Error messages after memory allocation failures are unnecessary and can be dropped, especially give that they were emitted as dev_dbg() so noone except person actively debugging the driver would see them. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel-wm97xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a8e90be161099a6e4d985a7e4a43f9acc8adfcae Author: Guenter Roeck Date: Wed Jan 18 11:20:18 2017 -0800 Input: ar1021_i2c - drop unnecessary call to i2c_set_clientdata There is no call to i2c_get_clientdata() or dev_get_drvdata(). Drop the unnecessary call to i2c_set_clientdata(). Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 1 - 1 file changed, 1 deletion(-) commit 32237677fb6a15f08aadfe2bb4129b2de7e7caab Author: Guenter Roeck Date: Wed Jan 18 11:16:12 2017 -0800 Input: xilinx_ps2 - use 'dev' instead of dereferencing it Use local variable 'dev' instead of dereferencing it several times. Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/serio/xilinx_ps2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 009af5fdb4fb65e73c5783bf2de64490fcd84910 Author: Guenter Roeck Date: Wed Jan 18 11:12:00 2017 -0800 Input: at32psif - drop unnecessary error messages and other changes Error messages after memory allocation failures are unnecessary and can be dropped, given that they are emitted as dev_dbg() so nobody except person actively debugging the driver would see them. Also replace jump to return 'goto l; ... l: return e;' with 'return e;' Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/serio/at32psif.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 2057e15945a8b5d867c086371a5fb946fd8221da Author: Guenter Roeck Date: Wed Jan 18 10:37:49 2017 -0800 Input: cros_ec_keyb - drop unnecessary call to dev_set_drvdata and other changes There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to dev_set_drvdata(). Other relevant changes: Use existing variable 'dev' instead of dereferencing it several times This conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop dev_set_drvdata() - Use local variable 'struct device *dev' consistently Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 92c82e8a322b32a6cabe7d8800dc10401157a623 Author: Richard Guy Briggs Date: Fri Jan 13 03:26:29 2017 -0500 audit: add feature audit_lost reset Add a method to reset the audit_lost value. An AUDIT_SET message with the AUDIT_STATUS_LOST flag set by itself will return a positive value repesenting the current audit_lost value and reset the counter to zero. If AUDIT_STATUS_LOST is not the only flag set, the reset command will be ignored. The value sent with the command is ignored. The return value will be the +ve lost value at reset time. An AUDIT_CONFIG_CHANGE message will be queued to the listening audit daemon. The message will be a standard CONFIG_CHANGE message with the fields "lost=0" and "old=" with the latter containing the value of audit_lost at reset time. See: https://github.com/linux-audit/audit-kernel/issues/3 Signed-off-by: Richard Guy Briggs Acked-by: Steve Grubb Signed-off-by: Paul Moore include/uapi/linux/audit.h | 6 +++++- kernel/audit.c | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit f169fd695b192dd7b23aff8e69d25a1bc881bbfa Author: Liping Zhang Date: Sat Jan 7 21:33:55 2017 +0800 netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family After adding the following nft rule, then ping 224.0.0.1: # nft add rule netdev t c pkttype host counter The warning complain message will be printed out again and again: WARNING: CPU: 0 PID: 10182 at net/netfilter/nft_meta.c:163 \ nft_meta_get_eval+0x3fe/0x460 [nft_meta] [...] Call Trace: dump_stack+0x85/0xc2 __warn+0xcb/0xf0 warn_slowpath_null+0x1d/0x20 nft_meta_get_eval+0x3fe/0x460 [nft_meta] nft_do_chain+0xff/0x5e0 [nf_tables] So we should deal with PACKET_LOOPBACK in netdev family too. For ipv4, convert it to PACKET_BROADCAST/MULTICAST according to the destination address's type; For ipv6, convert it to PACKET_MULTICAST directly. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_meta.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 9a6d87626252496311cd122aaa9fbf21ae19e449 Author: Liping Zhang Date: Sat Jan 7 21:33:54 2017 +0800 netfilter: pkttype: unnecessary to check ipv6 multicast address Since there's no broadcast address in IPV6, so in ipv6 family, the PACKET_LOOPBACK must be multicast packets, there's no need to check it again. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_meta.c | 5 +---- net/netfilter/xt_pkttype.c | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) commit d4ae1e2648daf12e433b81f5718dac4be84abd01 Author: Tejun Heo Date: Wed Jan 18 11:11:58 2017 -0800 Revert "libata: switch to dynamic allocation instead of ata_scsi_rbuf" This reverts commit a234f7395c9301a5048cb2daa4c86f15c6f02de8. The commit tried to get rid of the shared global SCSI response buffer. Unfortunately, it added blocking allocation to atomic path. Revert it for now. Signed-off-by: Tejun Heo Cc: Christoph Hellwig drivers/ata/libata-scsi.c | 122 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 36 deletions(-) commit 22dfab102cfab6a79c7eb1e57e38f2943dbefa03 Author: Krzysztof Kozlowski Date: Sat Jan 14 14:36:39 2017 +0200 ARM: EXYNOS: Remove Exynos4415 arch code (SoC not supported anymore) Support for Exynos4415 is going away because there are no internal nor external users. Since commit 46dcf0ff0de3 ("ARM: dts: exynos: Remove exynos4415.dtsi"), the platform cannot be instantiated so remove also the mach code. Signed-off-by: Krzysztof Kozlowski Acked-by: Kukjin Kim Reviewed-by: Chanwoo Choi arch/arm/mach-exynos/Kconfig | 5 ----- arch/arm/mach-exynos/exynos.c | 1 - arch/arm/mach-exynos/suspend.c | 1 - 3 files changed, 7 deletions(-) commit c008fad264f61efc809bd067becc6d1db9bb3730 Author: Bhumika Goyal Date: Sun Jan 1 16:13:37 2017 +0530 drivers: remoteproc: constify rproc_ops structures Declare rproc_ops structures as const as they are only passed as an argument to the function rproc_alloc. This argument is of type const, so rproc_ops structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct rproc_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ rproc_alloc(...,&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct rproc_ops i; File size details: Size of the file remoteproc/da8xx_remoteproc.o remains the same before and after applying the changes. text data bss dec hex filename 1312 100 4 1416 588 remoteproc/da8xx_remoteproc.o 1312 100 4 1416 588 remoteproc/da8xx_remoteproc.o 970 240 0 1210 4ba remoteproc/omap_remoteproc.o 1002 192 0 1194 4aa remoteproc/omap_remoteproc.o 1901 240 0 2141 85d remoteproc/st_remoteproc.o 1933 192 0 2125 84d remoteproc/st_remoteproc.o 1288 96 0 1384 568 remoteproc/st_slim_rproc.o 1320 64 0 1384 568 remoteproc/st_slim_rproc.o 2121 240 0 2361 939 remoteproc/wkup_m3_rproc.o 2161 192 0 2353 931 remoteproc/wkup_m3_rproc.o Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 2 +- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/remoteproc/st_remoteproc.c | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/wkup_m3_rproc.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 19f902b53b47327e87daecacf0aea450b990f33e Author: Avaneesh Kumar Dwivedi Date: Fri Dec 30 19:24:02 2016 +0530 remoteproc: qcom: Initialize and enable proxy and active regulators. Certain regulators need voting by rproc on behalf of hexagon only during restart operation but certain regulator need to be voted till hexagon is up, these regulators are identified as proxy and active regulators respectively. This patch provide interface to initialize, enable and disable proxy and active regulators separately. Signed-off-by: Avaneesh Kumar Dwivedi [bjorn: dropped disable of proxy regulators from stop] Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 219 ++++++++++++++++++++++++++++--------- 1 file changed, 169 insertions(+), 50 deletions(-) commit 39b2410bdcdbc2f7a96cde9966d8eabe861e6d3c Author: Avaneesh Kumar Dwivedi Date: Fri Dec 30 19:24:01 2016 +0530 remoteproc: qcom: Initialize and enable proxy and active clocks. Certain clocks need voting by rproc on behalf of hexagon only during restart operation but certain clocks need to be voted till hexagon is up, these clocks are identified as proxy and active clocks respectively. This patch provide interface to initialize, enable and disable proxy and active clocks separately. Signed-off-by: Avaneesh Kumar Dwivedi [bjorn: dropped disable of proxy clocks on stop] Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 151 ++++++++++++++++++++++++++----------- 1 file changed, 109 insertions(+), 42 deletions(-) commit 7a8ffe1fcaf89bb7d2588b98cba3163ee7d9db7a Author: Avaneesh Kumar Dwivedi Date: Fri Dec 30 19:24:00 2016 +0530 remoteproc: qcom: Compatible string based private resource initialization. MSS rproc loader need chip specific resources initialization during probe to load and boot modem firmware, this need compatible string based differentiation in resources to be initialized. This patch add and provide a template struct whose fields represent all those resources which are needed to load and boot modem fw and which may differ from chip to chip. This patch also add new compatible string for msm8916, msm8974 platform. Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 4 +++- drivers/remoteproc/qcom_q6v5_pil.c | 25 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) commit a73d9468c802359c44ca9ba0d7b171f4a1548e44 Author: Pavel Machek Date: Mon Dec 19 10:22:50 2016 +0100 remoteproc: add some kind of help Top level config option without any kind of help... is kind of strange. Remote processors could also mean some kind of distributed computing... Signed-off-by: Pavel Machek Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0be363bf4bf7addac30b84e2d6749e5a33296b6d Author: Bjorn Andersson Date: Wed Jan 11 06:35:13 2017 -0800 rpmsg: smd: Register rpmsg user space interface for edges Create and register a rpmsg device for use with the rpmsg user space interface, allowing user space to access SMD channels. Also provide the "rpmsg_name" device attribute to expose the edge name in sysfs, allowing the user to write udev rules for specific rpmsg devices and their children. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit c0cdc19f84a4712cf74888f83af286e3c2e14efd Author: Bjorn Andersson Date: Wed Jan 11 06:35:12 2017 -0800 rpmsg: Driver for user space endpoint interface This driver allows rpmsg instances to expose access to rpmsg endpoints to user space processes. It provides a control interface, allowing userspace to export endpoints and an endpoint interface for each exposed endpoint. The implementation is based on prior art by Texas Instrument, Google, PetaLogix and was derived from a FreeRTOS performance statistics driver written by Michal Simek. The control interface provides a "create endpoint" ioctl, which is fed a name, source and destination address. The three values are used to create the endpoint, in a backend-specific way, and a rpmsg endpoint device is created - with the three parameters are available in sysfs for udev usage. E.g. to create an endpoint device for one of the Qualcomm SMD channel related to DIAG one would issue: struct rpmsg_endpoint_info info = { "DIAG_CNTL", 0, 0 }; int fd = open("/dev/rpmsg_ctrl0", O_RDWR); ioctl(fd, RPMSG_CREATE_EPT_IOCTL, &info); Each created endpoint device shows up as an individual character device in /dev, allowing permission to be controlled on a per-endpoint basis. The rpmsg endpoint will be created and destroyed following the opening and closing of the endpoint device, allowing rpmsg backends to open and close the physical channel, if supported by the wire protocol. Cc: Marek Novak Cc: Matteo Sartori Cc: Michal Simek Signed-off-by: Bjorn Andersson Documentation/ioctl/ioctl-number.txt | 1 + drivers/rpmsg/Kconfig | 8 + drivers/rpmsg/Makefile | 1 + drivers/rpmsg/rpmsg_char.c | 585 +++++++++++++++++++++++++++++++++++ drivers/rpmsg/rpmsg_internal.h | 15 + include/uapi/linux/rpmsg.h | 35 +++ 6 files changed, 645 insertions(+) commit adaa11b02c34ebbcaa7dff43f9cfadd4a9a226fd Author: Bjorn Andersson Date: Wed Jan 11 06:35:11 2017 -0800 rpmsg: qcom_smd: Implement endpoint "poll" Add support for polling the status of the write buffer so that user space can use rpmsg character devices in non-blocking mode. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 84d58132d285b2edef951d6633c1e5224e8b5283 Author: Bjorn Andersson Date: Wed Jan 11 06:35:10 2017 -0800 rpmsg: Introduce "poll" to endpoint ops This allows rpmsg backends to implement polling of the outgoing buffer, which provides poll support to user space when using the rpmsg character device. Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 20 ++++++++++++++++++++ drivers/rpmsg/rpmsg_internal.h | 3 +++ include/linux/rpmsg.h | 13 +++++++++++++ 3 files changed, 36 insertions(+) commit 5e53c42c33bbde53a2650c6aa7201ec63bbfdc49 Author: Bjorn Andersson Date: Fri Dec 2 14:06:02 2016 -0800 rpmsg: qcom_smd: Add support for "label" property Add support for the "label" property, used to give the edge a name other than the one of the DT node. This allows the implementor to provide consistently named edges when using the rpmsg character device. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 9315e63d3ced9c2bbdfd301d463cc91e6964a65f Author: Arnd Bergmann Date: Wed Jan 18 17:49:24 2017 +0100 ARM: pxa: include linux/leds.h When the header is not included implicitly, we get a build failure: arch/arm/mach-pxa/idp.c:205:22: error: field 'cdev' has incomplete type struct led_classdev cdev; This adds an explicit #include. Signed-off-by: Arnd Bergmann Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/idp.c | 1 + 1 file changed, 1 insertion(+) commit 5a582cff47c90af29ecb293caa2f667bd4d45e54 Author: Neil Armstrong Date: Tue Jan 17 13:08:48 2017 +0100 clk: meson-gxbb: Export HDMI clocks Export HDMI clock from internal to dt-bindings. Signed-off-by: Neil Armstrong Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 4 ++-- include/dt-bindings/clock/gxbb-clkc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 67af5ebde1a4cd10e7bb663440de0773b7597c70 Author: Arnd Bergmann Date: Thu Nov 24 17:29:18 2016 +0100 ARM: pxa: ezx: fix a910 camera data The camera_supply_dummy_device definition is shared between a780 and a910, but only provided when the first is enabled and fails to build for a configuration with only a910: arch/arm/mach-pxa/ezx.c:1097:3: error: 'camera_supply_dummy_device' undeclared here (not in a function) This moves the definition into its own section. Fixes: 6c1b417adc8f ("ARM: pxa: ezx: use the new pxa_camera platform_data") Signed-off-by: Arnd Bergmann Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/ezx.c | 56 ++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit b16ed2b1d0eee0425037a159e5d99fa4b6535921 Merge: ab70e58 637bc8b Author: David S. Miller Date: Wed Jan 18 13:04:30 2017 -0500 Merge branch 'rework-inet_csk_get_port' Josef Bacik says: ==================== Rework inet_csk_get_port V3->V4: -Removed the random include of addrconf.h that is no longer needed. V2->V3: -Dropped the fastsock from the tb and instead just carry the saddrs, family, and ipv6 only flag. -Reworked the helper functions to deal with this change so I could still use them when checking the fast path. -Killed tb->num_owners as per Eric's request. -Attached a reproducer to the bottom of this email. V1->V2: -Added a new patch 'inet: collapse ipv4/v6 rcv_saddr_equal functions into one' at Hannes' suggestion. -Dropped ->bind_conflict and just use the new helper. -Fixed a compile bug from the original ->bind_conflict patch. The original description of the series follows: At some point recently the guys working on our load balancer added the ability to use SO_REUSEPORT. When they restarted their app with this option enabled they immediately hit a softlockup on what appeared to be the inet_bind_bucket->lock. Eventually what all of our debugging and discussion led us to was the fact that the application comes up without SO_REUSEPORT, shuts down which creates around 100k twsk's, and then comes up and tries to open a bunch of sockets using SO_REUSEPORT, which meant traversing the inet_bind_bucket owners list under the lock. Since this lock is needed for dealing with the twsk's and basically anything else related to connections we would softlockup, and sometimes not ever recover. To solve this problem I did what you see in Path 5/5. Once we have a SO_REUSEPORT socket on the tb->owners list we know that the socket has no conflicts with any of the other sockets on that list. So we can add a copy of the sock_common (really all we need is the recv_saddr but it seemed ugly to copy just the ipv6, ipv4, and flag to indicate if we were ipv6 only in there so I've copied the whole common) in order to check subsequent SO_REUSEPORT sockets. If they match the previous one then we can skip the expensive inet_csk_bind_conflict check. This is what eliminated the soft lockup that we were seeing. Patches 1-4 are cleanups and re-workings. For instance when we specify port == 0 we need to find an open port, but we would do two passes through inet_csk_bind_conflict every time we found a possible port. We would also keep track of the smallest_port value in order to try and use it if we found no port our first run through. This however made no sense as it would have had to fail the first pass through inet_csk_bind_conflict, so would not actually pass the second pass through either. Finally I split the function into two functions in order to make it easier to read and to distinguish between the two behaviors. I have tested this on one of our load balancing boxes during peak traffic and it hasn't fallen over. But this is not my area, so obviously feel free to point out where I'm being stupid and I'll get it fixed up and retested. Thanks, ==================== Signed-off-by: David S. Miller commit 637bc8bbe6c0a288a596edfdcdd5657c72a848db Author: Josef Bacik Date: Tue Jan 17 07:51:06 2017 -0800 inet: reset tb->fastreuseport when adding a reuseport sk If we have non reuseport sockets on a tb we will set tb->fastreuseport to 0 and never set it again. Which means that in the future if we end up adding a bunch of reuseport sk's to that tb we'll have to do the expensive scan every time. Instead add the ipv4/ipv6 saddr fields to the bind bucket, as well as the family so we know what comparison to make, and the ipv6 only setting so we can make sure to compare with new sockets appropriately. Once one sk has made it onto the list we know that there are no potential bind conflicts on the owners list that match that sk's rcv_addr. So copy the sk's information into our bind bucket and set tb->fastruseport to FASTREUSESOCK_STRICT so we know we have to do an extra check for subsequent reuseport sockets and skip the expensive bind conflict check. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller include/net/inet_hashtables.h | 9 ++++ net/ipv4/inet_connection_sock.c | 106 ++++++++++++++++++++++++++++++++-------- 2 files changed, 95 insertions(+), 20 deletions(-) commit 289141b7688b71dc69b8d7a54bf67a4d7bc79f96 Author: Josef Bacik Date: Tue Jan 17 07:51:05 2017 -0800 inet: split inet_csk_get_port into two functions inet_csk_get_port does two different things, it either scans for an open port, or it tries to see if the specified port is available for use. Since these two operations have different rules and are basically independent lets split them into two different functions to make them both more readable. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 66 +++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 22 deletions(-) commit 6cd66616834c89b8a6c8a182c4c99e5478cf6d6b Author: Josef Bacik Date: Tue Jan 17 07:51:04 2017 -0800 inet: don't check for bind conflicts twice when searching for a port This is just wasted time, we've already found a tb that doesn't have a bind conflict, and we don't drop the head lock so scanning again isn't going to give us a different answer. Instead move the tb->reuse setting logic outside of the found_tb path and put it in the success: path. Then make it so that we don't goto again if we find a bind conflict in the found_tb path as we won't reach this anymore when we are scanning for an ephemeral port. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit b9470c27607bed1ad3450de789c154f225530112 Author: Josef Bacik Date: Tue Jan 17 07:51:03 2017 -0800 inet: kill smallest_size and smallest_port In inet_csk_get_port we seem to be using smallest_port to figure out where the best place to look for a SO_REUSEPORT sk that matches with an existing set of SO_REUSEPORT's. However if we get to the logic if (smallest_size != -1) { port = smallest_port; goto have_port; } we will do a useless search, because we would have already done the inet_csk_bind_conflict for that port and it would have returned 1, otherwise we would have gone to found_tb and succeeded. Since this logic makes us do yet another trip through inet_csk_bind_conflict for a port we know won't work just delete this code and save us the time. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller include/net/inet_hashtables.h | 1 - net/ipv4/inet_connection_sock.c | 26 ++++---------------------- net/ipv4/inet_hashtables.c | 3 --- 3 files changed, 4 insertions(+), 26 deletions(-) commit aa078842b702b4a45111f028a604a6c8f69cb27d Author: Josef Bacik Date: Tue Jan 17 07:51:02 2017 -0800 inet: drop ->bind_conflict The only difference between inet6_csk_bind_conflict and inet_csk_bind_conflict is how they check the rcv_saddr, so delete this call back and simply change inet_csk_bind_conflict to call inet_rcv_saddr_equal. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller include/net/inet6_connection_sock.h | 5 ----- include/net/inet_connection_sock.h | 6 ------ net/dccp/ipv4.c | 1 - net/dccp/ipv6.c | 2 -- net/ipv4/inet_connection_sock.c | 22 +++++++------------- net/ipv4/tcp_ipv4.c | 1 - net/ipv6/inet6_connection_sock.c | 40 ------------------------------------- net/ipv6/tcp_ipv6.c | 2 -- 8 files changed, 7 insertions(+), 72 deletions(-) commit fe38d2a1c8bee0b3a0be40de5b621a28200612e5 Author: Josef Bacik Date: Tue Jan 17 07:51:01 2017 -0800 inet: collapse ipv4/v6 rcv_saddr_equal functions into one We pass these per-protocol equal functions around in various places, but we can just have one function that checks the sk->sk_family and then do the right comparison function. I've also changed the ipv4 version to not cast to inet_sock since it is unneeded. Signed-off-by: Josef Bacik Signed-off-by: David S. Miller include/net/addrconf.h | 4 +-- include/net/inet_hashtables.h | 5 +-- include/net/udp.h | 1 - net/ipv4/inet_connection_sock.c | 72 ++++++++++++++++++++++++++++++++++++++++ net/ipv4/inet_hashtables.c | 16 +++------ net/ipv4/udp.c | 58 +++++++------------------------- net/ipv6/inet6_connection_sock.c | 4 +-- net/ipv6/inet6_hashtables.c | 46 +------------------------ net/ipv6/udp.c | 2 +- 9 files changed, 95 insertions(+), 113 deletions(-) commit ab70e5862670177d207ea0e0e16454e4083a5ad5 Author: jpinto Date: Tue Jan 17 14:53:07 2017 +0000 stmicro: add more information to Kconfig This patch adds more info to stmicro' Kconfig files in order to be clearer that the driver can be used by ethernet cards based on 10/100/1000/EQOS Synopsys IP Cores. EQOS was also added stmmac/Kconfig Kconfig, since dwmac4 is in fact EQoS, one of Synopsys Ethernet IPs. More info at: https://www.synopsys.com/dw/ipdir.php?ds=dwc_ether_qos Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/Kconfig | 3 ++- drivers/net/ethernet/stmicro/stmmac/Kconfig | 15 +++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit d8bec2b29a82981acb229215e3970d4d50a7e6eb Author: Martin KaFai Lau Date: Tue Jan 17 22:06:07 2017 -0800 net/mlx5e: Support bpf_xdp_adjust_head() This patch adds bpf_xdp_adjust_head() support to mlx5e. 1. rx_headroom is added to struct mlx5e_rq. It uses an existing 4 byte hole in the struct. 2. The adjusted data length is checked against MLX5E_XDP_MIN_INLINE and MLX5E_SW2HW_MTU(rq->netdev->mtu). 3. The macro MLX5E_SW2HW_MTU is moved from en_main.c to en.h. MLX5E_HW2SW_MTU is also moved to en.h for symmetric reason but it is not a must. v2: - Keep the xdp specific logic in mlx5e_xdp_handle() - Update dma_len after the sanity checks in mlx5e_xmit_xdp_frame() Signed-off-by: Martin KaFai Lau Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 18 ++++----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 47 ++++++++++++++--------- 3 files changed, 40 insertions(+), 29 deletions(-) commit acff07d060d8175b2b54c5bc2d9bb910a6db1049 Author: Charles Keepax Date: Wed Jan 18 15:27:05 2017 +0000 ASoC: arizona: Propagate errors from arizona_spk_init arizona_spk_init uses snd_soc_dapm_new_control which since commit 37e1df8c95e2 ("ASoC: dapm: handle probe deferrals") will occasionally request a probe deferral. Which means we should propagate the error out of our driver from it. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/cs47l24.c | 5 ++++- sound/soc/codecs/wm5102.c | 5 ++++- sound/soc/codecs/wm5110.c | 5 ++++- sound/soc/codecs/wm8997.c | 6 +++++- sound/soc/codecs/wm8998.c | 6 +++++- 5 files changed, 22 insertions(+), 5 deletions(-) commit 0e879a3e7d35613ed0e7e1e53614e915ffa7297a Author: Javier Martinez Canillas Date: Wed Jan 18 12:50:13 2017 -0300 arm64: dts: exynos: Remove unneeded unit names in Exynos5433 nodes The "samsung,exynos5433-mipi-video-phy" and "samsung,exynos5250-dwusb3" DT bindings don't specify a reg property for these nodes, so having a unit name leads to the following DTC warnings: Node /soc/video-phy@105c0710 has a unit name, but no reg property Node /soc/usb@15400000 has a unit name, but no reg property Node /soc/usb@15a00000 has a unit name, but no reg property Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 51962a359cdcea82b298810e52953ec59ed74427 Author: Arnd Bergmann Date: Wed Jan 18 16:12:10 2017 +0100 power: supply: qcom_smbb: add regulator dependency The added regulator dependency in the smbb driver causes build errors when regulators are disabled, e.g. in randconfig build testing: drivers/power/supply/qcom_smbb.o: In function `smbb_chg_otg_is_enabled': qcom_smbb.c:(.text.smbb_chg_otg_is_enabled+0x18): undefined reference to `rdev_get_drvdata' drivers/power/supply/qcom_smbb.o: In function `smbb_charger_probe': qcom_smbb.c:(.text.smbb_charger_probe+0x410): undefined reference to `devm_regulator_register' This adds a Kconfig dependency to avoid the link error. Fixes: 61274eff0dde ("power: supply: qcom_smbb: Add otg regulator for control of vbus") Signed-off-by: Arnd Bergmann Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b6d30432e04c750504dcfa19223cad830c89d02b Author: Alexandre Belloni Date: Wed Jan 18 00:07:38 2017 +0100 power: reset: at91-reset: remove leftover platform_device_id commit eacd8d09db7f ("power/reset: at91-reset: remove useless at91_reset_platform_probe()") removed non DT probe support but forgot to remove the now useless id_table. Do that now. Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 8 -------- 1 file changed, 8 deletions(-) commit f22dfd86f0b32660ba026e38d8478faf174f9481 Author: Szemző András Date: Wed Jan 18 00:07:37 2017 +0100 power: reset: at91-reset: add samx7 support Add samx7 support. It is lacking a few bits and needs a new reset function. Signed-off-by: Szemző András Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9343e45bf6cc4a05f6e271e9f8d06bc87875c604 Author: Matija Glavinic Pecotic Date: Tue Jan 17 15:50:35 2017 +0100 perf unwind: Fix looking up dwarf unwind stack info Using perf with call graph method dwarf fails to provide backtrace support for stripped binary even though .gnu_debuglink points to *.dbg flavor with properly populated debug symbols. Problem is reproduced on ARM (v7, v8), kernels 3.14.y, 4.4.y and 4.10.rc3. Perf is configured with libunwind, and unwind dwarf support [1]. Test code (stress_bt.c) can be found on [2]. Running (explicitly disable other unwinding methods): $ gcc -g -o stress_bt -fomit-frame-pointer -fno-unwind-tables \ -fno-asynchronous-unwind-tables stress_bt.c $ perf record -N --call-graph dwarf ./stress_bt $ perf report results in properly generated call graph. Stripping the binary and running it results with missing call graph. Expected result is to have call graph: $ gcc -g -o stress_bt -fomit-frame-pointer -fno-unwind-tables \ -fno-asynchronous-unwind-tables stress_bt.c $ objcopy --only-keep-debug stress_bt stress_bt.dbg $ objcopy --strip-debug stress_bt $ objcopy --add-gnu-debuglink=stress_bt.dbg stress_bt $ perf record -N --call-graph dwarf ./stress_bt $ perf report Problem is that perf doesn't try to read symbols pointed by gnu debuglink. Patch adds checking, and reading of the symbols from debuglink and symsrc. Order of the check is to first check within dso, then check whether symsrc is defined and try to read from it. Finally, debuglink is checked. Default locations of debug files are discussed in [3] and [4]. Comments on RFC are on [5]. [1] https://wiki.linaro.org/LEG/Engineering/TOOLS/perf-callstack-unwinding [2] [1]#Backtrace_stress_application [3] https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html [4] https://sourceware.org/binutils/docs/binutils/objcopy.html [5] https://lkml.org/lkml/2016/8/22/473 Signed-off-by: Matija Glavinic Pecotic Acked-by: Jiri Olsa Cc: Alexander Sverdlin Cc: Masami Hiramatsu Cc: Namhyung Kim Link: http://lkml.kernel.org/r/d309d40a-463f-482b-68e1-1465326efdc1@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 48 +++++++++++++++++++++------- tools/perf/util/unwind-libunwind-local.c | 54 +++++++++++++++++++++++++++++--- 2 files changed, 86 insertions(+), 16 deletions(-) commit 4d199c6f1c847151ea393d5b9946a17cc57cdf6d Author: Jens Axboe Date: Wed Jan 18 07:43:26 2017 -0700 blk-cgroup: ensure that we clear the stop bit on quiesced queues If we call blk_mq_quiesce_queue() on a queue, we must remember to pair that with something that clears the stopped by on the queues later on. Signed-off-by: Jens Axboe block/blk-cgroup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c77b9abf3c5ae86dcb0e414d55d42fb213e51b2a Author: Shawn Guo Date: Mon Jan 9 19:25:45 2017 +0800 drm: vc4: use crtc helper drm_crtc_from_index() Use drm_crtc_from_index() to find drm_crtc for given index, so that we do not need to maintain a pointer array in struct vc4_dev. Signed-off-by: Shawn Guo Cc: Eric Anholt Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-7-git-send-email-shawnguo@kernel.org drivers/gpu/drm/vc4/vc4_crtc.c | 17 +++++++---------- drivers/gpu/drm/vc4/vc4_drv.h | 1 - 2 files changed, 7 insertions(+), 11 deletions(-) commit 75bcb0545b56eab2d69dbccf95ff7505b7114e5d Author: Shawn Guo Date: Mon Jan 9 19:25:44 2017 +0800 drm: tegra: use crtc helper drm_crtc_from_index() Function tegra_crtc_from_pipe() does the exactly same thing as what crtc helper drm_crtc_from_index() provides. Use the helper to save some code. Signed-off-by: Shawn Guo Cc: Thierry Reding Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-6-git-send-email-shawnguo@kernel.org drivers/gpu/drm/tegra/drm.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit ea441bd33f93aa7f6f404c8877e6d3313a4dbdbe Author: Shawn Guo Date: Mon Jan 9 19:25:43 2017 +0800 drm: nouveau: use crtc helper drm_crtc_from_index() Use drm_crtc_from_index() to find drm_crtc for given index. Signed-off-by: Shawn Guo Cc: Ben Skeggs Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-5-git-send-email-shawnguo@kernel.org drivers/gpu/drm/nouveau/nouveau_display.c | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit ffec8925836caf1e91dce9c37c322c363eef58b3 Author: Shawn Guo Date: Mon Jan 9 19:25:42 2017 +0800 drm: mediatek: use crtc helper drm_crtc_from_index() Use drm_crtc_from_index() to find drm_crtc for given index, so that we do not need to maintain a pointer array in struct mtk_drm_private. Signed-off-by: Shawn Guo Cc: CK Hu Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-4-git-send-email-shawnguo@kernel.org drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 9 ++++----- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) commit b8bf6836bf00419e9b714ea70fbd8315b118c3bf Author: Shawn Guo Date: Mon Jan 9 19:25:41 2017 +0800 drm: kirin: use crtc helper drm_crtc_from_index() Use drm_crtc_from_index() to find drm_crtc for given index, so that we do not need to maintain a pointer array in struct kirin_drm_private. Reviewed-by: Xinliang Liu Signed-off-by: Shawn Guo Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-3-git-send-email-shawnguo@kernel.org drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 ++++------ drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) commit 1492a864364ed46be2abeaaaf3b1a248f19e6644 Author: Robin Murphy Date: Wed Jan 18 12:12:52 2017 +0000 arm64: dts: juno: remove motherboard USB node The first batch of Juno boards included a discrete USB controller chip as a contingency in case of issues with the USB 2.0 IP integrated into the SoC. As it turned out, the latter was fine, and to the best of my knowledge the motherboard USB was never even brought up and validated. Since this also isn't present on later boards, and uses a compatible string undocumented and unmatched by any driver in the kernel, let's just tidy it away for ever to avoid any confusion. Acked-by: Liviu Dudau Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 7 ------- 1 file changed, 7 deletions(-) commit fd47c2062aa873d4aad311ee68ab1dc021fe6166 Author: Robin Murphy Date: Wed Jan 18 12:12:51 2017 +0000 arm64: dts: juno: add ETR SMMU power domain It is not at all clear from the documentation, but straightforward to determine in practice, that the ETR SMMU is actually in the DEBUGSYS power domain. Add that to the DT so that anyone brave enough to enable said SMMU doesn't experience a system lockup on boot, especially a sneaky one which goes away as soon as you connect an external debugger to have a look at where it's stuck (thus powering up DEBUGSYS by other means and allowing it to make progress again before actually halting...) Acked-by: Liviu Dudau Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 1 + 1 file changed, 1 insertion(+) commit 193d00a2b35ee3353813b4006a18131122087205 Author: Robin Murphy Date: Wed Jan 18 12:12:50 2017 +0000 arm64: dts: juno: add dma-ranges property The interconnects around Juno have a 40-bit address width, and DMA masters have no restrictions beyond their own individual limitations. Describe this to ensure that DT-based DMA masks get set up correctly for all devices capable of 40-bit addressing. Acked-by: Liviu Dudau Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 1 + 1 file changed, 1 insertion(+) commit a3c764e9884aad26176f149a7490daac978dd209 Author: Shawn Guo Date: Mon Jan 9 19:25:40 2017 +0800 drm: exynos: use crtc helper drm_crtc_from_index() Use drm_crtc_from_index() to find drm_crtc for given index, so that we do not need to maintain a pointer array in struct exynos_drm_private. Signed-off-by: Shawn Guo Cc: Inki Dae Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-2-git-send-email-shawnguo@kernel.org drivers/gpu/drm/exynos/exynos_drm_crtc.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 ++-------- 2 files changed, 2 insertions(+), 14 deletions(-) commit 1e5a15d65d4cecb553d7e81c3ac05b1ffbc4bb27 Author: Ander Conselvan de Oliveira Date: Wed Jan 18 14:34:28 2017 +0200 drm/i915: Avoid drm_atomic_state_put(NULL) on error paths The error paths in hsw_trans_edp_pipe_A_crc_wa() and intel_prepare_reset() would potentially call drm_atomic_state_put with a NULL state, which would lead to a NULL pointer dereference. Found by coverity. v2: Improve the error paths. (Chris) Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Cc: Chris Wilson Cc: Daniel Vetter Cc: # v4.10-rc1+ Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1484742868-9551-1-git-send-email-ander.conselvan.de.oliveira@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 10 +++------- drivers/gpu/drm/i915/intel_pipe_crc.c | 10 ++++++---- 2 files changed, 9 insertions(+), 11 deletions(-) commit 1fe8d6cbfb47deff69e6fad2a33c044ac745679c Author: Neil Armstrong Date: Tue Jan 17 13:05:37 2017 +0100 pinctrl: meson: Add HDMI HPD/DDC pins functions Add pinctrl functions for HDMI HPD pin and DDC pins on Amlogic Meson GXL and GXBB SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 19 +++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson-gxl.c | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) commit 3c5e37f169cb67cbd03c6116fbc93e0805815d29 Author: Chris Wilson Date: Sun Jan 15 12:58:25 2017 +0000 drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume intel_display_resume() may be called without an atomic state to restore, i.e. dev_priv->modeset_reset_restore state is NULL. One such case is following a lid open/close event and the forced modeset in intel_lid_notify(). Reported-by: Stefan Seyfried Tested-by: Stefan Seyfried Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: # v4.10-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170115125825.18597-1-chris@chris-wilson.co.uk Reviewed-by: Ander Conselvan de Oliveira drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cde6f9ab10c6099f5e8daed898a43562b9911b70 Author: Mike Leach Date: Wed Jan 11 20:44:09 2017 +0000 arm64: dts: juno: add missing CoreSight STM component This patch adds the missing CoreSight STM component definition to the device tree of all the juno variants(r0,r1,r2) STM component is connected to different funnels depending on Juno platform variant. Reviewed-and-tested-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Mike Leach [sudeep.holla@arm.com: minor changelog update and reorganising the STM node back into juno-base.dtsi to avoid duplication] Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/arm/juno-r1.dts | 4 ++++ arch/arm64/boot/dts/arm/juno-r2.dts | 4 ++++ arch/arm64/boot/dts/arm/juno.dts | 16 ++++++++++++++++ 4 files changed, 39 insertions(+) commit cdc07e96047a89466c52d723a8b62739ad5604eb Author: Mike Leach Date: Wed Jan 11 20:44:08 2017 +0000 arm64: dts: juno: add CoreSight support for Juno r1/r2 variants The CoreSight support added for Juno is valid for only Juno r0. The Juno r1 and r2 variants have additional components and alternative connection routes between trace source and sinks. This patch builds on top of the existing r0 support and extends it to Juno r1/r2 variants. Reviewed-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Mike Leach [sudeep.holla@arm.com: minor changelog update and major reorganisation of the common coresight components back into juno-base.dtsi to avoid duplication, also renamed funnel node names] Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 100 ++++++++++++++++++++++++++++++ arch/arm64/boot/dts/arm/juno-r1.dts | 9 +++ arch/arm64/boot/dts/arm/juno-r2.dts | 9 +++ 3 files changed, 118 insertions(+) commit 19ac17c031ce37c697966b6513d611f9e322a290 Author: Sudeep Holla Date: Thu Jan 12 11:53:35 2017 +0000 arm64: dts: juno: refactor CoreSight support on Juno r0 Currently the Coresight components are supported only on Juno r0 variant. In preparation to add support to Juno r1/r2 variants, this patch refactors the existing coresight device nodes so that r1/r2 support can be added easily. It also cleans up some of the device node names which were previously named so as they were confused as the labels rather than the node names. Reviewed-and-tested-by: Mathieu Poirier Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 20 ++++++++++---------- arch/arm64/boot/dts/arm/juno.dts | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) commit d29e849cafe666195ecfa0afd61ae6ff096cc140 Author: Sudeep Holla Date: Tue Jan 17 10:20:59 2017 +0000 arm64: dts: juno: remove dtsi nesting inside tree structure Currently juno-clock.dtsi and juno-base.dtsi are nested badly inside the device tree structure. It's generally good practice to ensure that individual dtsi stand by themselves at the top of the file. This patch removes the nesting of the above mentioned dtsi files and makes them independent. Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 6 ++++-- arch/arm64/boot/dts/arm/juno-clocks.dtsi | 3 ++- arch/arm64/boot/dts/arm/juno-r1.dts | 3 +-- arch/arm64/boot/dts/arm/juno-r2.dts | 3 +-- arch/arm64/boot/dts/arm/juno.dts | 3 +-- 5 files changed, 9 insertions(+), 9 deletions(-) commit a9b4f08770b415f30f2fb0f8329a370c8f554aa3 Author: Ruslan Ruslichenko Date: Tue Jan 17 16:13:52 2017 +0200 x86/ioapic: Restore IO-APIC irq_chip retrigger callback commit d32932d02e18 removed the irq_retrigger callback from the IO-APIC chip and did not add it to the new IO-APIC-IR irq chip. There is no harm because the interrupts are resent in software when the retrigger callback is NULL, but it's less efficient. So restore them. [ tglx: Massaged changelog ] Fixes: d32932d02e18 ("x86/irq: Convert IOAPIC to use hierarchical irqdomain interfaces") Signed-off-by: Ruslan Ruslichenko Cc: xe-linux-external@cisco.com Link: http://lkml.kernel.org/r/1484662432-13580-1-git-send-email-rruslich@cisco.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/io_apic.c | 2 ++ 1 file changed, 2 insertions(+) commit 71895a085879d7bc490611994c7efb156162f33d Author: Mika Kuoppala Date: Tue Jan 17 17:59:07 2017 +0200 drm/i915: Add comment how we treat hung contexts Explain in a comment how and why we treat hung context like we do. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-7-git-send-email-mika.kuoppala@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 0e178aef8f13ff11dc9dec82c2cd849981cb1ad1 Author: Chris Wilson Date: Tue Jan 17 17:59:06 2017 +0200 drm/i915: Detect a failed GPU reset+recovery If we can't recover the GPU after the reset, mark it as wedged to cancel the outstanding tasks and to prevent new users from trying to use the broken GPU. v2: Check the same ring is hung again before declaring the reset broken. v3: use engine_stalled (Mika) Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-6-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_drv.c | 7 ++++++- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 16 ++++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) commit 61da536204ca0de24f8fc725c8297019f1e4963d Author: Mika Kuoppala Date: Tue Jan 17 17:59:05 2017 +0200 drm/i915: Tidy up engine reset logic Split engine reset for engine and request specific parts. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-5-git-send-email-mika.kuoppala@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit bf2f04366c1e3920fb23b57226ecb39207b1a104 Author: Mika Kuoppala Date: Tue Jan 17 17:59:04 2017 +0200 drm/i915: Introduce engine_stalled helper Move the engine stalled/pardoned check into a helper function. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-4-git-send-email-mika.kuoppala@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 211b12afe68c5d3b01f828957420e224329a9d99 Author: Mika Kuoppala Date: Tue Jan 17 17:59:03 2017 +0200 drm/i915: Cleanup request skip decision Since we now only skip banned contexts, preventing the skip of default contexts is no longer sensible. For a similar argument as before 'commit 7ec73b7e36d0 ("drm/i915: Only skip requests once a context is banned")' we end up with an inconsistent API if we only mark future execbufs from the default ctx as banned but fail to mark those currently executing as failed. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-3-git-send-email-mika.kuoppala@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 36193acd54bdf1b790bfebfb132e37ece4af4982 Author: Mika Kuoppala Date: Tue Jan 17 17:59:02 2017 +0200 drm/i915: Introduce engine_skip_context Add a new function for skipping all pending requests for a context in order to make engine reset flow more readable. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-2-git-send-email-mika.kuoppala@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 45 ++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit 4c9655436522eaf4ba35572851150ccb71f3866e Author: Chris Wilson Date: Tue Jan 17 17:59:01 2017 +0200 drm/i915: Move engine reset preparation to i915_gem_reset_prepare() Now that we have prepare/finish routines for the GEM reset, move the disabling of the engine->irq_tasklet into them to reduce repetition. The device irq enable/disable is split out to ensure it is run first and last always (even if the GPU reset fails). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_drv.c | 21 ++------------------- drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 24 deletions(-) commit 9635af833eaf96d0baf2f301b4d804777b786e5d Author: Krzysztof Kozlowski Date: Sat Jan 14 14:36:41 2017 +0200 pinctrl: samsung: Remove support for Exynos4415 (SoC not supported anymore) Support for Exynos4415 is going away because there are no internal nor external users. Since commit 46dcf0ff0de3 ("ARM: dts: exynos: Remove exynos4415.dtsi"), the platform cannot be instantiated so remove also the drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 75 ------------------------------- drivers/pinctrl/samsung/pinctrl-samsung.c | 2 - drivers/pinctrl/samsung/pinctrl-samsung.h | 1 - 3 files changed, 78 deletions(-) commit 77affa31722be7c584b4b1be792423079e64a47d Author: Chris Wilson Date: Mon Jan 16 13:06:22 2017 +0000 drm/i915/psr: Fix compiler warnings for hsw_psr_disable() drivers/gpu/drm/i915/intel_psr.c:634 hsw_psr_disable() warn: if statement not indented drivers/gpu/drm/i915/intel_psr.c:644 hsw_psr_disable() warn: if statement not indented Fixes: 3fcb0ca1d8db ("drm/i915/psr: fix blank screen issue for psr2") Signed-off-by: Chris Wilson Cc: Rodrigo Vivi Cc: Jim Bride Cc: Vathsala Nagaraju Cc: Patil Deepti Link: http://patchwork.freedesktop.org/patch/msgid/20170116130622.20369-2-chris@chris-wilson.co.uk Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_psr.c | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit b86bef20e0f62dab61a1f9b33465061bb27cdb49 Author: Chris Wilson Date: Mon Jan 16 13:06:21 2017 +0000 drm/i915: Fix compiler warnings for i915_edp_psr_status() Appease both the poor reader and the compiler by rewriting the string lookup for EDP_PSR2_STATUS_CTL: drivers/gpu/drm/i915/i915_debugfs.c:2662 i915_edp_psr_status() warn: if statement not indented Fixes: 6ba1f9e1772f ("drm/i915/psr: report live PSR2 State") Signed-off-by: Chris Wilson Cc: Rodrigo Vivi Cc: Jim Bride Cc: Vathsala Nagaraju Cc: Patil Deepti Link: http://patchwork.freedesktop.org/patch/msgid/20170116130622.20369-1-chris@chris-wilson.co.uk Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_debugfs.c | 49 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 3e1531dbc333997ae19324993119c42436d3e6b6 Author: Xing Zheng Date: Wed Jan 18 12:20:56 2017 +0800 clk: rockchip: fix the incorrect pclk_edp div width for RK3399 The range of the pclk_edp_div_con is [13:8] and 6 bits, not 5. Reported-by: Lin Huang Signed-off-by: Xing Zheng Tested-by: Lin Huang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eb5d0e635ebe2f227d591e531d48c6f01c0dd78 Author: Kailang Yang Date: Tue Jan 17 15:40:25 2017 +0800 ALSA: hda/realtek - Add support headphone Mic for ALC221 of HP platform ALC221 HP platform need to support Headphone Mic. This patch will turn on headphone Mic supported. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fbbad73e1b78d2e3d7ce7f82613a8136f2116f13 Author: Anusha Srivatsa Date: Fri Jan 13 17:17:05 2017 -0800 drm/i915/huc: Unified css_header struct for GuC and HuC HuC firmware css header has almost exactly same definition as GuC firmware except for the sw_version. Also, add a new member fw_type into intel_uc_fw to indicate what kind of fw it is. So, the loader will pull right sw_version from header. v2: rebased on-top of drm-intel-nightly v3: rebased. Rename device_id to guc_branch_client_version, make guc_sw_version a union. . Put UC_FW_TYPE_GUC and UC_FW_TYPE_HUC into an enum. v4: rebased on top of drm-tip.Update dev to dev_priv in intel_uc_fw_fetch. v5: rebased. Add INTEL_ prefix to an enum. Add fw_type declaration from patch 1.Combine two different unions for huc and guc version, reserved etc into one union with two structs. v6: rebased. Change fw_type to enum. v7: rebased. Rename the enum fw_type to intel_uc_fw_type. Cc: Michal Wajdeczko Tested-by: Xiang Haihao Signed-off-by: Anusha Srivatsa Signed-off-by: Alex Dai Signed-off-by: Peter Antoine Reviewed-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484356631-16139-3-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_guc_fwif.h | 23 ++++++++++++++---- drivers/gpu/drm/i915/intel_guc_loader.c | 41 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/intel_uc.h | 6 +++++ 3 files changed, 53 insertions(+), 17 deletions(-) commit db0a091bcd141e4cd56df54d021440505e5307cb Author: Anusha Srivatsa Date: Fri Jan 13 17:17:04 2017 -0800 drm/i915/guc: Make the GuC fw loading helper functions general Rename some of the GuC fw loading code to make them more general. We will utilise them for HuC loading as well. s/intel_guc_fw/intel_uc_fw/g s/GUC_FIRMWARE/INTEL_UC_FIRMWARE/g Struct intel_guc_fw is renamed to intel_uc_fw. Prefix of tts members, such as 'guc' or 'guc_fw' either is renamed to 'uc' or removed for same purpose. v2: rebased on top of nightly. reapplied the search/replace as upstream code as changed. v3: removed G from messages in shared fw fetch function. v4: rebased.Updated dev to dev_priv in intel_guc_setup(), guc_fw_getch() and intel_guc_init(). v5: rebased. Remove uint32_t fw_type to patch 2. Add INTEL_ prefix for fields in enum intel_uc_fw_status. Remove uc_dev field since its never used.Rename uc_fw to just fw and guc_fw to fw to avoid redundency. v6: rebased. Remove sections of code that were commented and no longer required. v7: rebased. Remove uc_fw_ prefix from path and obj fields in intel_uc_fw struct as suggested by Michal. v8: rebased. Add declaration of intel_guc_wopcm_size() in this patch instead of patch 3. Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Signed-off-by: Anusha Srivatsa Signed-off-by: Alex Dai Signed-off-by: Peter Antoine Reviewed-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484356631-16139-2-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 12 +-- drivers/gpu/drm/i915/i915_guc_submission.c | 4 +- drivers/gpu/drm/i915/intel_guc_loader.c | 156 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_uc.h | 37 +++---- 4 files changed, 105 insertions(+), 104 deletions(-) commit 731d43cd6bacd39c39b5c957fa2bb0031bda0dce Author: Colin Ian King Date: Fri Jan 13 13:20:39 2017 +0000 pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int pin is an unsigned int and therefore can never be < 0 so this check is redundant. Remove the check and the associated dev_err error message. Fixes CoverityScan CID#1396438 ("Unsigned compared against 0") Signed-off-by: Colin Ian King Acked-by: Nishanth Menon Signed-off-by: Linus Walleij drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 6 ------ 1 file changed, 6 deletions(-) commit 9f6f941e25bad8fcffc24d10762962d62edba767 Merge: 5b48562 d94386f Author: Ingo Molnar Date: Wed Jan 18 10:06:20 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170117' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Account thread wait time (off CPU time) separately: sleep, iowait and preempt, based on the prev_state of the last event, show the breakdown when using "perf sched timehist --state" (Namhyumg Kim) Infrastructure changes: - Factor out PMU scale conversion code (Andi Kleen) - Remove unnecessary feature-dwarf warning (David Carrillo-Cisneros) - Add missing member name in OPT_() macros (Soramichi AKIYAMA) - Move variables referenced in libperf.a object files from perf's main() file, so that other tools can use libperf.a with a different main() (Soramichi AKIYAMA) Documentation changes: - Fix 'perf script' man page about --dump-raw-trace option (Michael Petlan) - Also allow forcing reading of non-root owned files by root in 'perf script' (Yannick Brosseau) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 0a13cd1a05e7a549259d4f803d2ec2efda07ed7c Author: Peter Zijlstra Date: Mon Nov 14 18:03:11 2016 +0100 locking/atomic, kref: Implement kref_put_lock() Because home-rolling your own is _awesome_, stop doing it. Provide kref_put_lock(), just like kref_put_mutex() but for a spinlock. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/kref.h | 22 ++++++++++++++++------ net/sunrpc/svcauth.c | 15 ++++++++++----- 2 files changed, 26 insertions(+), 11 deletions(-) commit d068b0988a48418a1b6679f5b7d650400846d17f Author: Russell King Date: Fri Jan 13 11:03:35 2017 +0000 pinctrl: mvebu: add simple regmap based pinctrl implementation Add a simple regmap based pinctrl implementation for mvebu, for syscon based regmap drivers. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 60 +++++++++++++++++++++++++++++++++++ drivers/pinctrl/mvebu/pinctrl-mvebu.h | 16 +++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) commit ad9ec4ecee6889321ae1752ce8793524a8cdfa7a Author: Russell King Date: Fri Jan 13 11:03:30 2017 +0000 pinctrl: mvebu: switch drivers to generic simple mmio Move the mvebu pinctrl drivers over to the generic simple mmio implementation, saving a substantial number of lines of code in the process. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-370.c | 24 ++------------ drivers/pinctrl/mvebu/pinctrl-armada-375.c | 24 ++------------ drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 24 ++------------ drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 24 ++------------ drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 31 ++++-------------- drivers/pinctrl/mvebu/pinctrl-dove.c | 52 +++++++++++++++--------------- drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 28 +++------------- drivers/pinctrl/mvebu/pinctrl-mvebu.h | 24 -------------- 8 files changed, 45 insertions(+), 186 deletions(-) commit 44aa9d0604f578cdd839d2f5295a9d920fb54999 Author: Russell King Date: Fri Jan 13 11:03:25 2017 +0000 pinctrl: mvebu: provide generic simple mmio-based implementation Provide a generic simple mmio-based probe function and methods, which pinctrl drivers can use to initialise the mvebu pinctrl subsystem. Most mvebu pinctrl drivers can use this. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 57 +++++++++++++++++++++++++++++++++++ drivers/pinctrl/mvebu/pinctrl-mvebu.h | 6 ++++ 2 files changed, 63 insertions(+) commit 20955c5f5c423bb1f2ed03c564a6657738d61955 Author: Russell King Date: Fri Jan 13 11:03:20 2017 +0000 pinctrl: mvebu: provide per-control private data Provide per-control private data into each mvebu pinctrl method, which will allow us to provide some completely generic helpers without the global variable and per-instance function definitions that would be required when we have multiple pin controllers on a SoC. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-370.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-armada-375.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-dove.c | 50 ++++++++++++++++++++---------- drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 6 ++-- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 14 ++++++--- drivers/pinctrl/mvebu/pinctrl-mvebu.h | 21 ++++++++++--- drivers/pinctrl/mvebu/pinctrl-orion.c | 6 ++-- 10 files changed, 88 insertions(+), 39 deletions(-) commit 30be3fb9b89c1c606a6ed35ca437426f620ae4f6 Author: Russell King Date: Fri Jan 13 11:03:15 2017 +0000 pinctrl: mvebu: constify mvebu_mpp_ctrl structures As the mvebu_mpp_ctrl structures contain function pointers, it is preferable for these to be made read-only to prevent the function pointers being modified. So make these const. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-370.c | 2 +- drivers/pinctrl/mvebu/pinctrl-armada-375.c | 2 +- drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 2 +- drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 2 +- drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 6 +++--- drivers/pinctrl/mvebu/pinctrl-dove.c | 2 +- drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 6 +++--- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 6 +++--- drivers/pinctrl/mvebu/pinctrl-mvebu.h | 2 +- drivers/pinctrl/mvebu/pinctrl-orion.c | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) commit f9cda04867804e232987a2bc8832ee109907ed6f Author: Michal Wajdeczko Date: Fri Jan 13 17:41:57 2017 +0000 drm/i915/guc: Move GuC log related functions into dedicated file Functions supporting GuC logging capabilities were spread across many files, with unnecessary exposures and mixed with unrelated code. Dedicate file will make maintenance of all GuC functions easier as more functions are coming to support GuC submissions. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Arkadiusz Hiler Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170113174157.104492-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 594 +------------------------- drivers/gpu/drm/i915/intel_guc_loader.c | 6 - drivers/gpu/drm/i915/intel_guc_log.c | 658 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.c | 26 -- drivers/gpu/drm/i915/intel_uc.h | 13 +- 7 files changed, 673 insertions(+), 629 deletions(-) commit c9c9ac714b3f246b6f920238bcce9d47af6a045a Author: Chen-Yu Tsai Date: Wed Jan 18 09:01:05 2017 +0800 ARM: dts: sun6i: sina31s: Enable USB OTG controller in peripheral mode While the SinA31s does have a proper 5-pin mini USB OTG port, the ID pin does not seem to work. The pin used in the schematics is always low, regardless of the attached OTG cable or SoC internal pin bias settings. The v1.5 board is missing bias resistors shown in the schematics for earlier revisions, and the connections of the remaining one does not match the schematics either. In addition, VBUS for this port is disconnected from the board's 5V power rail. The board features a pad to solder jumper pins to connect VBUS to 5V manually. Given the above and the fact that the board has 5 more USB host ports, it makes more sense to have the OTG port work in peripheral mode. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 01f8c951c25f9a87f2e9dbc09ceca274e80fff4e Author: Laurent Pinchart Date: Tue Jan 17 10:29:10 2017 +0200 dt-bindings: display: dw-hdmi: Clean up DT bindings documentation Make it clear that the core bridge/dw_hdmi.txt document isn't a device tree binding by itself but is meant to be referenced by platform device tree bindings, and update the Rockchip and Freescale DWC HDMI TX bindings to reference it. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-21-laurent.pinchart+renesas@ideasonboard.com .../devicetree/bindings/display/bridge/dw_hdmi.txt | 85 +++++++++------------- .../devicetree/bindings/display/imx/hdmi.txt | 51 +++++++------ .../bindings/display/rockchip/dw_hdmi-rockchip.txt | 43 +++++++---- 3 files changed, 91 insertions(+), 88 deletions(-) commit 2668db37888ff63282147b00dcf54fa491831df3 Author: Laurent Pinchart Date: Tue Jan 17 10:29:09 2017 +0200 drm: bridge: dw-hdmi: Assert SVSRET before resetting the PHY According to the PHY IP core vendor, the SVSRET signal must be asserted before resetting the PHY. Tests on RK3288 and R-Car Gen3 showed no regression, the change should thus be safe. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-20-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 54d72737b098f3597c57693e1aa96699a21b11fe Author: Laurent Pinchart Date: Tue Jan 17 10:29:08 2017 +0200 drm: bridge: dw-hdmi: Fix the name of the PHY reset macros The PHY reset signal is controlled by bit PHYRSTZ in the MC_PHYRSTZ register. The signal is active low on Gen1 PHYs and active high on Gen2 PHYs. The driver toggles the signal high then low, which is correct for all currently supported platforms, but the register values macros are incorrectly named. Replace them with a single macro named after the bit, and add a comment to the source code to explain the behaviour. The driver's behaviour isn't changed by this rename, the code will still need to be fixed to support Gen1 PHYs. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-19-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 6 +++--- drivers/gpu/drm/bridge/dw-hdmi.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) commit f0e7f2f3b6333a02dd7cb89822e6330631c9a3e3 Author: Laurent Pinchart Date: Tue Jan 17 10:29:07 2017 +0200 drm: bridge: dw-hdmi: Define and use macros for PHY register addresses Replace the hardcoded register address numerical values with macros to clarify the code. This change has been tested by comparing the assembly code before and after the change. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-18-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 35 ++++++++++++--------- drivers/gpu/drm/bridge/dw-hdmi.h | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 15 deletions(-) commit faba6c3cff177689aec132291b1cf537831d9a2e Author: Laurent Pinchart Date: Tue Jan 17 10:29:06 2017 +0200 drm: bridge: dw-hdmi: Detect PHY type at runtime Detect the PHY type and use it to handle the PHY type-specific SVSRET signal. Signed-off-by: Laurent Pinchart Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-17-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 68 ++++++++++++++++++++++++++++++++++++++-- include/drm/bridge/dw_hdmi.h | 10 ++++++ 2 files changed, 75 insertions(+), 3 deletions(-) commit be41fc55f1aa3c9ae0eb9e0b384db5150eca055f Author: Laurent Pinchart Date: Tue Jan 17 10:29:05 2017 +0200 drm: bridge: dw-hdmi: Handle overflow workaround based on device version Use the device version queried at runtime instead of the device type provided through platform data to handle the overflow workaround. This will make support of other SoCs integrating the same HDMI TX controller version easier. Among the supported platforms only i.MX6DL and i.MX6Q have been identified as needing the workaround. Disabling it on Rockchip RK3288 (which integrates a v2.00a controller) didn't produce any error or artifact. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-16-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 46 ++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-) commit 0c674948b7f4e4ffc19ba5af65a274e945c0c689 Author: Laurent Pinchart Date: Tue Jan 17 10:29:04 2017 +0200 drm: bridge: dw-hdmi: Detect AHB audio DMA using correct register Bit 0 in CONFIG1_ID tells whether the IP core uses an AHB slave interface for control. The correct way to identify AHB audio DMA support is through bit 1 in CONFIG3_ID. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-15-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 6 +++--- drivers/gpu/drm/bridge/dw-hdmi.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 0527e12e8264ae96b1fcc550b4a9e5940f4ffc30 Author: Laurent Pinchart Date: Tue Jan 17 10:29:03 2017 +0200 drm: bridge: dw-hdmi: Reject invalid product IDs The DWC HDMI TX can be recognized by the two product identification registers. If the registers don't read as expect the IP will be very different than what the driver has been designed for, or will be misconfigured in a way that makes it non-operational (invalid memory address, incorrect clocks, ...). We should reject this situation with an error. While this isn't critical for proper operation with supported IPs at the moment, the driver will soon gain automatic device-specific handling based on runtime device identification. This change makes it easier to implement that without having to default to a random guess in case the device can't be identified. While at it print a readable version number in the device identification message instead of raw register values. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-14-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 25 +++++++++++++++++++------ drivers/gpu/drm/bridge/dw-hdmi.h | 8 ++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) commit f4104e8fe12c173fbba5e7e30b846e09eeb5bfbd Author: Laurent Pinchart Date: Tue Jan 17 10:29:02 2017 +0200 drm: bridge: dw-hdmi: Rename CONF0 SPARECTRL bit to SVSRET The bit is documented in a Rockchip BSP as #define m_SVSRET_SIG (1 << 5) /* depend on PHY_MHL_COMB0=1 */ This is confirmed by a Renesas platform, which uses a 2.0 DWC HDMI TX as the RK3288. Rename the bit accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-13-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 8 ++++---- drivers/gpu/drm/bridge/dw-hdmi.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1acc6bdeee1ef2ecac3ba070a403827ab8f16be5 Author: Kieran Bingham Date: Tue Jan 17 10:29:01 2017 +0200 drm: bridge: dw-hdmi: Remove PHY configuration resolution parameter The current code hard codes the call of hdmi_phy_configure() to be 8bpp and provides extraneous error checking to verify that this hardcoded value is correct. Simplify the implementation by removing the argument. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-12-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 69497eb9234eb34994b9a0d2f2c17c4c09f2e969 Author: Laurent Pinchart Date: Tue Jan 17 10:29:00 2017 +0200 drm: bridge: dw-hdmi: Implement DRM bridge registration As an option for drivers not based on the component framework, register the bridge with the DRM core with the DRM bridge API. Existing drivers based on dw_hdmi_bind() and dw_hdmi_unbind() are not affected as those functions are preserved with their current behaviour. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-11-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 112 ++++++++++++++++++++++++++++----------- include/drm/bridge/dw_hdmi.h | 3 ++ 2 files changed, 83 insertions(+), 32 deletions(-) commit d2ae94ae840bd0b347e417e88b1637df95d499ac Author: Laurent Pinchart Date: Tue Jan 17 10:28:59 2017 +0200 drm: bridge: dw-hdmi: Create connector in the bridge attach operation The DRM device is not guaranteed by the bridge API to be available before the attach callback. The driver performs properly at the moment as it doesn't use the drm_bridge_add() registration method. As this will be changed later, move connector creation to attach time to ensure compatibility with the API. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-10-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit fd30b38c27c305fcb522bfa7911de241ee1799b5 Author: Laurent Pinchart Date: Tue Jan 17 10:28:58 2017 +0200 drm: bridge: dw-hdmi: Reorder functions to prepare for next commit The next commit will reference structures and functions in a way that currently requires forward declarations. Reorder the functions to avoid that. No functional change to the code is performed. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-9-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit c608119dfdde9710e4bd068d632beb68bb3517db Author: Laurent Pinchart Date: Tue Jan 17 10:28:57 2017 +0200 drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code There's no need to duplicate identical code in multiple drivers (two at the moment, one more to come soon). Move it to the dw-hdmi core where it can be shared. If resource allocation ever becomes device-specific later we'll always have the option of splitting it out again. While it at pass the platform device to the bind function to avoid having to cast struct device to struct platform_device. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-8-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 13 ++++++++++--- drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 +----------- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 12 +----------- include/drm/bridge/dw_hdmi.h | 3 +-- 4 files changed, 13 insertions(+), 27 deletions(-) commit ba5d7e6160b7aed4df92d1764aa90790db0e7996 Author: Laurent Pinchart Date: Tue Jan 17 10:28:56 2017 +0200 drm: bridge: dw-hdmi: Don't forward HPD events to DRM core before attach Hotplug events should only be forwarded to the DRM core by the interrupt handler when the bridge has been attached, otherwise the DRM device pointer will be NULL, resulting in a crash. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-7-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 527b863f6ad4f4f1707cbc2237df9d83d0c848c1 Author: Laurent Pinchart Date: Tue Jan 17 10:28:55 2017 +0200 drm: bridge: dw-hdmi: Remove encoder field from struct dw_hdmi The field isn't needed, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-6-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 70c963ec4f15a13197524611875168f23acc4a97 Author: Laurent Pinchart Date: Tue Jan 17 10:28:54 2017 +0200 drm: bridge: dw-hdmi: Embed drm_bridge in struct dw_hdmi The drm_bridge instance is always needed, there's no point in allocating it separately. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-5-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit dfa73065d61b6ce57aed90bb0d745c4b6f5b71e7 Author: Kieran Bingham Date: Tue Jan 17 10:28:53 2017 +0200 drm: bridge: dw-hdmi: Remove unused function parameter The 'prep' parameter passed to hdmi_phy_configure() is useless. It is hardcoded as 0, and if set, simply prevents the configure function from executing. Remove it. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-4-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ecaa98f1e6f7ed3f79def1861f21ff2eac82b8e9 Author: Laurent Pinchart Date: Tue Jan 17 10:28:52 2017 +0200 drm: bridge: dw-hdmi: Remove unneeded arguments to bind/unbind functions The master argument isn't used. The data argument, a void pointer, is used by the bind function only where it's cast to a drm_device pointer, which can easily be obtained from the encoder argument instead. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-3-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 8 +++----- drivers/gpu/drm/imx/dw_hdmi-imx.c | 4 ++-- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 4 ++-- include/drm/bridge/dw_hdmi.h | 5 ++--- 4 files changed, 9 insertions(+), 12 deletions(-) commit cc7e96232763ff33418b088b436a564441347b15 Author: Laurent Pinchart Date: Tue Jan 17 10:28:51 2017 +0200 drm: bridge: dw-hdmi: Merge __hdmi_phy_i2c_write and hdmi_phy_i2c_write The latter is just an int wrapper around the former void function that unconditionally returns 0. As the return value is never checked, merge the two functions into one. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-2-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 259b77ef853cc375a5c9198cf81f9b79fc19413c Author: Maxime Ripard Date: Tue Jan 17 13:24:22 2017 -0800 Input: tca8418 - use the interrupt trigger from the device tree The TCA8418 might be used using different interrupt triggers on various boards. This is not working so far because the current code forces a falling edge trigger. The device tree already provides a trigger type, so let's use whatever it sets up, and since we can be loaded without DT, keep the old behaviour for the non-DT case. Signed-off-by: Maxime Ripard Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a5e4c7d0aa6784d8abe95c3ceef0da9656d17468 Author: Ville Syrjälä Date: Mon Nov 7 22:20:54 2016 +0200 drm/i915: Ignore bogus plane coordinates on SKL when the plane is not visible When the plane is invisible we may have all sorts of bogus stuff in the coordinates, which we must ignore or else we might fail the plane update. This started to happen on SKL when I moved the plane offset computation to happen in the check phase. Previously we happily ignored it all since we never called the update_plane hook with an invisible plane. Cc: Sivakumar Thulasimani Cc: drm-intel-fixes@lists.freedesktop.org Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98258 Testcase: igt/pm_rpm/legacy-planes Testcase: igt/pm_rpm/universal-planes Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e40f4c9593ba2c7c30150ed669da97bd581c0cd Author: Jason Baron Date: Tue Jan 17 13:37:19 2017 -0500 tcp: accept RST for rcv_nxt - 1 after receiving a FIN Using a Mac OSX box as a client connecting to a Linux server, we have found that when certain applications (such as 'ab'), are abruptly terminated (via ^C), a FIN is sent followed by a RST packet on tcp connections. The FIN is accepted by the Linux stack but the RST is sent with the same sequence number as the FIN, and Linux responds with a challenge ACK per RFC 5961. The OSX client then sometimes (they are rate-limited) does not reply with any RST as would be expected on a closed socket. This results in sockets accumulating on the Linux server left mostly in the CLOSE_WAIT state, although LAST_ACK and CLOSING are also possible. This sequence of events can tie up a lot of resources on the Linux server since there may be a lot of data in write buffers at the time of the RST. Accepting a RST equal to rcv_nxt - 1, after we have already successfully processed a FIN, has made a significant difference for us in practice, by freeing up unneeded resources in a more expedient fashion. A packetdrill test demonstrating the behavior: // testing mac osx rst behavior // Establish a connection 0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 0.000 bind(3, ..., ...) = 0 0.000 listen(3, 1) = 0 0.100 < S 0:0(0) win 32768 0.100 > S. 0:0(0) ack 1 0.200 < . 1:1(0) ack 1 win 32768 0.200 accept(3, ..., ...) = 4 // Client closes the connection 0.300 < F. 1:1(0) ack 1 win 32768 // now send rst with same sequence 0.300 < R. 1:1(0) ack 1 win 32768 // make sure we are in TCP_CLOSE 0.400 %{ assert tcpi_state == 7 }% Signed-off-by: Jason Baron Cc: Eric Dumazet Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit a870a97757dd4f165f4f7bb749350bee7df31716 Author: Tobias Klauser Date: Tue Jan 17 15:01:08 2017 +0100 net: ethoc: Make needlessly global struct ethtool_ops static Make the needlessly global struct ethtool_ops ethoc_ethtool_ops static to fix a sparse warning. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49a67b5db791590654fea18e22f8d47343a17ad4 Merge: 96fe11f a707d18 Author: David S. Miller Date: Tue Jan 17 15:49:52 2017 -0500 Merge branch 'sfc-RX-hash-config' Edward Cree says: ==================== sfc: RX hash configuration This series improves support for getting and setting RX hashing configuration on Solarflare adapters through ethtool. ==================== Signed-off-by: David S. Miller commit a707d18851a3bab517e21a6449806e468703bc3d Author: Edward Cree Date: Tue Jan 17 12:02:12 2017 +0000 sfc: read back RX hash config from the NIC when querying it with ethtool -x Ensures that we report the key and indirection table the NIC is using, rather than (if setting them failed earlier) what we wanted it to use. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 52 +++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/ethtool.c | 5 ++++ drivers/net/ethernet/sfc/farch.c | 16 +++++++++++ drivers/net/ethernet/sfc/net_driver.h | 2 ++ drivers/net/ethernet/sfc/nic.h | 1 + drivers/net/ethernet/sfc/siena.c | 20 ++++++++++++++ 6 files changed, 96 insertions(+) commit f74d1995192cd0834eea13a8287a3e26a7317b6d Author: Edward Cree Date: Tue Jan 17 12:01:53 2017 +0000 sfc: support setting RSS hash key through ethtool API Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 32 ++++++++++++++++++++++++-------- drivers/net/ethernet/sfc/ethtool.c | 24 +++++++++++++++++++----- drivers/net/ethernet/sfc/net_driver.h | 3 ++- drivers/net/ethernet/sfc/siena.c | 7 +++++-- 4 files changed, 50 insertions(+), 16 deletions(-) commit 96fe11f27b70f6b64f62a2d13ed209aa02e02a48 Author: Ganesh Goudar Date: Tue Jan 17 14:09:38 2017 +0530 cxgb4: Implement ndo_get_phys_port_id for mgmt dev Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a7ef6715c4b5905b663dddf3832dbdf77b3bf8ac Author: Gao Feng Date: Tue Jan 17 10:21:19 2017 +0800 net: ping: Use right format specifier to avoid type casting The inet_num is u16, so use %hu instead of casting it to int. And the sk_bound_dev_if is int actually, so it needn't cast to int. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/ping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0ee28e31553a6f2ed13223e565ae5a4d7a376942 Author: Shyam Saini Date: Tue Jan 17 07:35:04 2017 +0530 qed: Replace memset with eth_zero_addr Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Also, it makes the code clearer Signed-off-by: Shyam Saini Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit 53631a5f9c6669264adb7b4e92fd95d1d6ffa7d3 Author: Lance Richardson Date: Mon Jan 16 18:11:35 2017 -0500 bridge: sparse fixes in br_ip6_multicast_alloc_query() Changed type of csum field in struct igmpv3_query from __be16 to __sum16 to eliminate type warning, made same change in struct igmpv3_report for consistency. Fixed up an ntohs() where htons() should have been used instead. Signed-off-by: Lance Richardson Acked-by: Stephen Hemminger Signed-off-by: David S. Miller include/uapi/linux/igmp.h | 4 ++-- net/bridge/br_multicast.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 580bdf5650fff8f66468ce491f8308f1117b7074 Merge: e60a426 a249708 Author: David S. Miller Date: Tue Jan 17 15:19:37 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit d45ae1f7041ac52ade6c5ec76d96bbed765d67aa Author: Steven Rostedt (VMware) Date: Tue Jan 17 12:29:35 2017 -0500 tracing: Process constants for (un)likely() profiler When running the likely/unlikely profiler, one of the results did not look accurate. It noted that the unlikely() in link_path_walk() was 100% incorrect. When I added a trace_printk() to see what was happening there, it became 80% correct! Looking deeper into what whas happening, I found that gcc split that if statement into two paths. One where the if statement became a constant, the other path a variable. The other path had the if statement always hit (making the unlikely there, always false), but since the #define unlikely() has: #define unlikely() (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) Where constants are ignored by the branch profiler, the "constant" path made by the compiler was ignored, even though it was hit 80% of the time. By just passing the constant value to the __branch_check__() function and tracing it out of line (as always correct, as likely/unlikely isn't a factor for constants), then we get back the accurate readings of branches that were optimized by gcc causing part of the execution to become constant. Signed-off-by: Steven Rostedt (VMware) include/linux/compiler.h | 14 ++++++++------ kernel/trace/trace_branch.c | 6 +++++- 2 files changed, 13 insertions(+), 7 deletions(-) commit e60a42635b764b56ae23c5fd8d36aac27c30f0ae Merge: 55f78fc 27d6910 Author: David S. Miller Date: Tue Jan 17 14:38:44 2017 -0500 Merge branch 'mpls-packet-stats' Robert Shearman says: ==================== mpls: Packet stats This patchset records per-interface packet stats in the MPLS forwarding path and exports them using a nest of attributes root at a new IFLA_STATS_AF_SPEC attribute as part of RTM_GETSTATS messages: [IFLA_STATS_AF_SPEC] -> [AF_MPLS] -> [MPLS_STATS_LINK] -> struct mpls_link_stats The first patch adds the rtnl infrastructure for this, including a new callbacks to per-AF ops of fill_stats_af and get_stats_af_size. The second patch records MPLS stats and makes use of the infrastructure to export them. The rtnl infrastructure could also be used to export IPv6 stats in the future. Changes in v2: - make incrementing IPv6 stats in mpls_stats_inc_outucastpkts conditional on CONFIG_IPV6 to fix build with CONFIG_IPV6=n ==================== Signed-off-by: David S. Miller commit 27d691056bde4a6feca5e83fd92b787332c46302 Author: Robert Shearman Date: Mon Jan 16 14:16:37 2017 +0000 mpls: Packet stats Having MPLS packet stats is useful for observing network operation and for diagnosing network problems. In the absence of anything better, RFC2863 and RFC3813 are used for guidance for which stats to expose and the semantics of them. In particular rx_noroutes maps to in unknown protos in RFC2863. The stats are exposed to userspace via AF_MPLS attributes embedded in the IFLA_STATS_AF_SPEC attribute of RTM_GETSTATS messages. All the introduced fields are 64-bit, even error ones, to ensure no overflow with long uptimes. Per-CPU counters are used to avoid cache-line contention on the commonly used fields. The other fields have also been made per-CPU for code to avoid performance problems in error conditions on the assumption that on some platforms the cost of atomic operations could be more expensive than sending the packet (which is what would be done in the success case). If that's not the case, we could instead not use per-CPU counters for these fields. Only unicast and non-fragment are exposed at the moment, but other counters can be exposed in the future either by adding to the end of struct mpls_link_stats or by additional netlink attributes in the AF_MPLS IFLA_STATS_AF_SPEC nested attribute. Signed-off-by: Robert Shearman Signed-off-by: David S. Miller include/uapi/linux/mpls.h | 30 ++++++++ net/mpls/af_mpls.c | 181 ++++++++++++++++++++++++++++++++++++++++------ net/mpls/internal.h | 58 ++++++++++++++- net/mpls/mpls_iptunnel.c | 11 ++- 4 files changed, 252 insertions(+), 28 deletions(-) commit aefb4d4ad83b608cb8e0cab8d3cd8e57d3f91feb Author: Robert Shearman Date: Mon Jan 16 14:16:36 2017 +0000 net: AF-specific RTM_GETSTATS attributes Add the functionality for including address-family-specific per-link stats in RTM_GETSTATS messages. This is done through adding a new IFLA_STATS_AF_SPEC attribute under which address family attributes are nested and then the AF-specific attributes can be further nested. This follows the model of IFLA_AF_SPEC on RTM_*LINK messages and it has the advantage of presenting an easily extended hierarchy. The rtnl_af_ops structure is extended to provide AFs with the opportunity to fill and provide the size of their stats attributes. One alternative would have been to provide AFs with the ability to add attributes directly into the RTM_GETSTATS message without a nested hierarchy. I discounted this approach as it increases the rate at which the 32 attribute number space is used up and it makes implementation a little more tricky for stats dump resuming (at the moment the order in which attributes are added to the message has to match the numeric order of the attributes). Another alternative would have been to register per-AF RTM_GETSTATS handlers. I discounted this approach as I perceived a common use-case to be getting all the stats for an interface and this approach would necessitate multiple requests/dumps to retrieve them all. Signed-off-by: Robert Shearman Acked-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/rtnetlink.h | 4 ++++ include/uapi/linux/if_link.h | 1 + net/core/rtnetlink.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit ebad64d19377957976963f99ce1fcf2f09796357 Author: Mylène Josserand Date: Tue Jan 17 15:02:21 2017 +0100 ASoC: sun4i-i2s: Increase DMA max burst to 8 As done previously for sun4i-codec, the DMA maxburst of 4 is not supported by every SoCs so the DMA controller engine returns "unsupported value". As a maxburst of 8 is supported by all variants, this patch increases it to 8. For more details, see commit from Chen-Yu Tsai: commit 730e2dd0cbc7 ("ASoC: sun4i-codec: Increase DMA max burst to 8") Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45e861a1c12cfd717b8e47103f1aaf2e34cc6688 Author: Markus Elfring Date: Fri Jan 13 17:00:08 2017 +0100 spi/topcliff-pch: Delete an error message for a failed memory allocation in pch_spi_set_tx() Omit an extra message for a memory allocation failure in this function. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-topcliff-pch.c | 1 - 1 file changed, 1 deletion(-) commit b996356d305fd311eaa652890b255a0ff4d13de4 Author: Markus Elfring Date: Fri Jan 13 16:36:09 2017 +0100 spi/topcliff-pch: Combine substrings for four messages The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-topcliff-pch.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit baa35f5734aa1c0207e4e6b8e15079475b1fa252 Author: Markus Elfring Date: Fri Jan 13 15:46:35 2017 +0100 spi/topcliff-pch: Improve size determinations in pch_spi_probe() 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. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-topcliff-pch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 84aa0ba12442fa46f461c491c42efdadf6995c96 Author: Markus Elfring Date: Fri Jan 13 15:25:22 2017 +0100 spi/topcliff-pch: Use kcalloc() in pch_spi_handle_dma() * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-topcliff-pch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ceb3b27b1edd1112f1879cc1f149d39a3da2dc2 Author: Markus Elfring Date: Fri Jan 13 15:57:03 2017 +0100 spi/topcliff-pch: Delete an unnecessary return statement in two functions The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such statements here. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-topcliff-pch.c | 2 -- 1 file changed, 2 deletions(-) commit 797236f10a095a1742373bca5f284c5ec8afb446 Author: Markus Elfring Date: Fri Jan 13 14:30:43 2017 +0100 spi/ppc4xx: Use kcalloc() in spi_ppc4xx_of_probe() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-ppc4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffcaef5ac27b62b480b94036615b3ae4f1b725fe Author: Markus Elfring Date: Fri Jan 13 14:43:06 2017 +0100 spi/ppc4xx: Combine substrings for a message in spi_ppc4xx_of_probe() The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-ppc4xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9c4f0440ba8f3ad57bebb46cfa29a18333fe4860 Author: Markus Elfring Date: Fri Jan 13 14:14:45 2017 +0100 spi/mpc52xx: Combine substrings for two messages The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-mpc52xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8b6c8955b5dc21358cb1f67cadc5514d2353375d Author: Markus Elfring Date: Fri Jan 13 14:06:10 2017 +0100 spi/mpc52xx: Use kmalloc_array() in mpc52xx_spi_probe() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-mpc52xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 31ae779421098e9a58a3f10e1e09b2c63f4514fa Author: Markus Elfring Date: Fri Jan 13 13:50:21 2017 +0100 spi: fsl: Combine substrings for two messages The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-fsl-spi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5223db0b10c7917d7c6b4f7d8e2c0af0eb1158f5 Author: Markus Elfring Date: Fri Jan 13 13:33:02 2017 +0100 spi: fsl: Use kcalloc() in of_fsl_spi_get_chipselects() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-fsl-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9bc4a8539a518636cd70d498e94787e32ea8fbe Author: Markus Elfring Date: Fri Jan 13 13:37:25 2017 +0100 spi: fsl: Use kmalloc_array() in of_fsl_spi_get_chipselects() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi-fsl-spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f9bdb7fdd2cac17bdc9c344b6036e6939fa087cd Author: Markus Elfring Date: Fri Jan 13 12:28:04 2017 +0100 spi: Use kcalloc() in spi_register_board_info() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcb8c270829a639b8b838809d7c2b540e65f4e01 Author: Jörg Krause Date: Fri Jan 13 21:44:27 2017 +0100 ASoC: mxs-saif: fix setting master base rate The SAIF base oversample rates are either 512*fs or 384*fs. An additional divider exists within the SAIF to generate sub-multiples of these two base rates if MCLK is required by the codec. * The sub-rates for the 512x base rate are: 256x, 128x, 64x, and 32x. * The sub-rates for the 384x base rate are: 192x, 96x, and 48x. Setting the base rate depending on the modulo operation with 32 and 48 give wrong results for some mclk. If mclk=18.432MHz both modulo operations results in 0. As testing the result with 32 is done first, a wrong base rate of 512*fs is set instead of the correct 384*fs. Fix this by setting the base rate depending on the calculated sub-rate. Signed-off-by: Jörg Krause Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit b25658ed7d24cd8b1f9a72148e80e216b6a0c17a Author: Jörg Krause Date: Fri Jan 13 21:44:28 2017 +0100 ASoC: mxs-saif: fix setting SAIF1 register If SAIF0 is used in master and SAIF1 in slave mode setting the SAIF1 register in mxs_saif_set_dai_fmt() does not have any effect on the interface as the clk gate needs to be cleared before the register can be written. Signed-off-by: Jörg Krause Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b03124825b8612bf371e5b4ccc2cd812ed3c2dbb Author: Jan Kiszka Date: Mon Jan 16 19:44:54 2017 +0100 spi: pxa2xx: Factor out handle_bad_msg As suggested by Andy Shevchenko: Decouple this corner cause from the general handling logic in ssp_int. Signed-off-by: Jan Kiszka Reviewed-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 13861a44b4d3eac678e4535eef29030b74ea3919 Author: kbuild test robot Date: Fri Jan 13 02:04:06 2017 +0800 ASoC: rt5659: fix platform_no_drv_owner.cocci warnings sound/soc/codecs/rt5659.c:4236:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 1 - 1 file changed, 1 deletion(-) commit 37e1df8c95e2c8a57c77eafc097648f6e40a60ff Author: Linus Walleij Date: Fri Jan 13 10:23:52 2017 +0100 ASoC: dapm: handle probe deferrals This starts to handle probe deferrals on regulators and clocks on the ASoC DAPM. I came to this patch after audio stopped working on Ux500 ages ago and I finally looked into it to see what is wrong. I had messages like this in the console since a while back: ab8500-codec.0: ASoC: Failed to request audioclk: -517 ab8500-codec.0: ASoC: Failed to create DAPM control audioclk ab8500-codec.0: Failed to create new controls -12 snd-soc-mop500.0: ASoC: failed to instantiate card -12 snd-soc-mop500.0: Error: snd_soc_register_card failed (-12)! snd-soc-mop500: probe of snd-soc-mop500.0 failed with error -12 Apparently because the widget table for the codec looks like this (sound/soc/codecs/ab8500-codec.c): static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = { /* Clocks */ SND_SOC_DAPM_CLOCK_SUPPLY("audioclk"), /* Regulators */ SND_SOC_DAPM_REGULATOR_SUPPLY("V-AUD", 0, 0), SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC1", 0, 0), SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC2", 0, 0), SND_SOC_DAPM_REGULATOR_SUPPLY("V-DMIC", 0, 0), So when we call snd_soc_register_codec() and any of these widgets get a deferred probe we do not get an -EPROBE_DEFER (-517) back as we should and instead we just fail. Apparently the code assumes that clocks and regulators must be available at this point and not defer. After this patch it rather looks like this: ab8500-codec.0: Failed to create new controls -517 snd-soc-mop500.0: ASoC: failed to instantiate card -517 snd-soc-mop500.0: Error: snd_soc_register_card failed (-517)! (...) abx500-clk.0: registered clocks for ab850x snd-soc-mop500.0: ab8500-codec-dai.0 <-> ux500-msp-i2s.1 mapping ok snd-soc-mop500.0: ab8500-codec-dai.1 <-> ux500-msp-i2s.3 mapping ok I'm pretty happy about the patch as it it, but I'm a bit uncertain on how to proceed: there are a lot of users of the external functions snd_soc_dapm_new_control() (111 sites) and that will now return an occassional error pointer, which is not handled in the calling sites. I want an indication from the maintainers whether I should just go in and augment all these call sites, or if deferred probe is frowned upon when it leads to this much overhead. Signed-off-by: Linus Walleij Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 42 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/soc-topology.c | 9 +++++++++ 2 files changed, 51 insertions(+) commit 72bc7ae0633e2b580217d254114ac6650380b7f6 Author: Dan Carpenter Date: Fri Jan 13 10:42:53 2017 +0300 spi: s3c64xx: potential oops on probe error We accidentally mixed up freeing the rx and tx channels which would a leak and an oops. Fixes: 3d63a47a380a ("spi: s3c64xx: Don't request/release DMA channels for each SPI transfer") Signed-off-by: Dan Carpenter Acked-by: Marek Szyprowski Acked-by: Andi Shyti Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6496bb72bf20c1c7e4d6be44dfa663163e709116 Author: Kenny Yu Date: Fri Jan 13 08:58:34 2017 -0800 uprobe: Find last occurrence of ':' when parsing uprobe PATH:OFFSET Previously, `create_trace_uprobe` found the *first* occurence of the ':' character when parsing `PATH:OFFSET` for a uprobe. However, if the path contains a ':' character, then the function would parse the path incorrectly. Even worse, if the path does not exist, the subsequent call to `kern_path()` would set `ret` to `ENOENT`, leading to very cryptic errno values in user space. The fix is to find the *last* occurence of ':'. How to repro:: The write fails with "No such file or directory", suggesting incorrectly that the `uprobe_events` file does not exist. $ mkdir testing && cd testing $ cp /bin/bash . $ cp /bin/bash ./bash:with:colon $ echo "p:uprobes/p__root_testing_bash_0x6 /root/testing/bash:0x6" > /sys/kernel/debug/tracing/uprobe_events # this works $ echo "p:uprobes/p__root_testing_bash_with_colon_0x6 /root/testing/bash:with:colon:0x6" >> /sys/kernel/debug/tracing/uprobe_events # this doesn't -bash: echo: write error: No such file or directory With the patch: $ echo "p:uprobes/p__root_testing_bash_0x6 /root/testing/bash:0x6" > /sys/kernel/debug/tracing/uprobe_events # this still works $ echo "p:uprobes/p__root_testing_bash_with_colon_0x6 /root/testing/bash:with:colon:0x6" >> /sys/kernel/debug/tracing/uprobe_events # this works now too! $ cat /sys/kernel/debug/tracing/uprobe_events p:uprobes/p__root_testing_bash_0x6 /root/testing/bash:0x0000000000000006 p:uprobes/p__root_testing_bash_with_colon_0x6 /root/testing/bash:with:colon:0x0000000000000006 Link: http://lkml.kernel.org/r/20170113165834.4081016-1-kennyyu@fb.com Signed-off-by: Kenny Yu Reviewed-by: Omar Sandoval Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3122c66fd2159f4ab210da8d95465af2f145fad7 Author: Mengdong Lin Date: Sat Jan 14 16:13:09 2017 +0800 ASoC: Intel: Use DMI name for sound card long name in Broadwell machine driver Intel Broadwell machine driver will call API snd_soc_set_dmi_name() to use DMI info to make the sound card long name. For example, here are the changed long name for two Broadwell-based machines: Dell XPS-13(2015): DellInc.-XPS139343-01-0310JH Intel WilsonBeach: Intel Corp.-BroadwellClientplatform-0.1-WilsonBeachSDS They still share the same card name "broadwell-rt286". Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown sound/soc/intel/boards/broadwell.c | 2 ++ 1 file changed, 2 insertions(+) commit 345233d7c6be80d4124140f2a0993880c7ae2453 Author: Liam Girdwood Date: Sat Jan 14 16:13:02 2017 +0800 ASoC: core: Add API to use DMI name in sound card long name Intel DSP platform drivers are used by many different devices but are difficult for userspace to differentiate. This patch adds an API to allow the DMI name to be used in the sound card long name, thereby helping userspace load the correct UCM configuration. Usually machine drivers uses their own name as the sound card name (short name), and leave the long name and driver name blank. This API will use the DMI info like vendor, product and board to make up the card long name. If the machine driver has already explicitly set the long name, this API will do nothing. This patch also allows for further differentiation as many devices that share the same DMI name i.e. Minnowboards, UP boards may be configured with different codecs or firmwares. The API supports flavoring the DMI name into the card longname to provide the extra differentiation required for these devices. For Use Case Manager (UCM) in the user space, changing card long name by this API is backward compatible, since the card name does not change. For a given sound card, even if there is no device-specific UCM configuration file that uses the card long name, UCM will fall back to load the default configuration file that uses the card name. Signed-off-by: Liam Girdwood Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown include/sound/soc.h | 4 ++ sound/soc/soc-core.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) commit 2914266975fcb09a688cefe98874625366e67c65 Author: Andy Shevchenko Date: Mon Jan 16 15:12:28 2017 +0200 ASoC: Intel: remove ignored dependencies For selected only options the explicit dependencies do not make much sense becase Kbuild ignores them anyway. Remove them explicitly. Acked-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ebf79091bf85d9b2270ab29191de9cd3aaf888c5 Author: Andy Shevchenko Date: Mon Jan 16 15:12:26 2017 +0200 ASoC: Intel: select DW_DMAC_CORE since it's mandatory Select DW_DMAC_CORE like the rest of glue drivers do, e.g. drivers/dma/dw/Kconfig. While here group selectors under SND_SOC_INTEL_HASWELL and SND_SOC_INTEL_BAYTRAIL. Make platforms, which are using a common SST firmware driver, to be dependent on DMADEVICES. Signed-off-by: Andy Shevchenko Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 231a091ef8dece94b0ad2b85affb059c483af33c Author: Andy Shevchenko Date: Mon Jan 16 15:12:29 2017 +0200 ASoC: Intel: rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM Rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM to make it clear that is not only about Medfield platform. The new name is derived from Intel Atom and HiFi2. HiFi2 is the DSP version, it's public information for Intel *Field/*Trail parts, see https://www.alsa-project.org/main/index.php/Firmware. By combining HiFi2 with Atom we get a unique non-ambiguous description of the core+DSP hardware for Intel Medfield through Intel Cherrytrail. Suggested-by: Pierre-Louis Bossart Acked-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 14 +++++++------- sound/soc/intel/Makefile | 2 +- sound/soc/intel/atom/Makefile | 7 ++++--- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 1 + 4 files changed, 13 insertions(+), 11 deletions(-) commit dd8275771f7a65dd552137e1839d39e15b313ed2 Author: Andy Shevchenko Date: Mon Jan 16 15:12:27 2017 +0200 ASoC: Intel: remove redundant select SND_SOC_INTEL_SST SND_SOC_INTEL_SKYLAKE selects SND_SOC_INTEL_SST already. Thus no need to duplicate. Remove duplications. Acked-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 5 ----- 1 file changed, 5 deletions(-) commit 829d2bd1339220b742e5e61a5f1975eb6f74cad3 Author: Mark Rutland Date: Tue Jan 17 16:10:58 2017 +0000 arm64: entry-ftrace.S: avoid open-coded {adr,ldr}_l Some places in the kernel open-code sequences using ADRP for a symbol another instruction using a :lo12: relocation for that same symbol. These sequences are easy to get wrong, and more painful to read than is necessary. For these reasons, it is preferable to use the {adr,ldr,str}_l macros for these cases. This patch makes use of these in entry-ftrace.S, removing open-coded sequences using adrp. This results in a minor code change, since a temporary register is not used when generating the address for some symbols, but this is fine, as the value of the temporary register is not used elsewhere. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/entry-ftrace.S | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 526d10ae022c36722ce5b2db22b02f9353281875 Author: Mark Rutland Date: Tue Jan 17 16:10:57 2017 +0000 arm64: efi-entry.S: avoid open-coded adr_l Some places in the kernel open-code sequences using ADRP for a symbol another instruction using a :lo12: relocation for that same symbol. These sequences are easy to get wrong, and more painful to read than is necessary. For these reasons, it is preferable to use the {adr,ldr,str}_l macros for these cases. This patch makes use of these in efi-entry.S, removing open-coded sequences using adrp. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Cc: Catalin Marinas Cc: Matt Fleming Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/efi-entry.S | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9bb003600ed9aabfe33b7330fa7e93acf959e8df Author: Mark Rutland Date: Tue Jan 17 16:10:56 2017 +0000 arm64: head.S: avoid open-coded adr_l Some places in the kernel open-code sequences using ADRP for a symbol another instruction using a :lo12: relocation for that same symbol. These sequences are easy to get wrong, and more painful to read than is necessary. For these reasons, it is preferable to use the {adr,ldr,str}_l macros for these cases. This patch makes use of adr_l these in head.S, removing an open-coded sequence using adrp. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d34849913819a5e0cbfbe724dbe79df89278c524 Author: Jens Axboe Date: Fri Jan 13 14:43:58 2017 -0700 blk-mq-sched: allow setting of default IO scheduler Add Kconfig entries to manage what devices get assigned an MQ scheduler, and add a blk-mq flag for drivers to opt out of scheduling. The latter is useful for admin type queues that still allocate a blk-mq queue and tag set, but aren't use for normal IO. Signed-off-by: Jens Axboe Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval block/Kconfig.iosched | 56 +++++++++++++++++++++++++++++++++++++++++++------ block/blk-mq-sched.c | 20 ++++++++++++++++++ block/blk-mq-sched.h | 2 ++ block/blk-mq.c | 8 +++++++ block/elevator.c | 8 ++++++- drivers/nvme/host/pci.c | 1 + include/linux/blk-mq.h | 1 + 7 files changed, 89 insertions(+), 7 deletions(-) commit 945ffb60c11dfb228130f3f2bdde961cecb76671 Author: Jens Axboe Date: Sat Jan 14 17:11:11 2017 -0700 mq-deadline: add blk-mq adaptation of the deadline IO scheduler This is basically identical to deadline-iosched, except it registers as a MQ capable scheduler. This is still a single queue design. Signed-off-by: Jens Axboe Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval block/Kconfig.iosched | 6 + block/Makefile | 1 + block/mq-deadline.c | 553 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 560 insertions(+) commit bd166ef183c263c5ced656d49ef19c7da4adc774 Author: Jens Axboe Date: Tue Jan 17 06:03:22 2017 -0700 blk-mq-sched: add framework for MQ capable IO schedulers This adds a set of hooks that intercepts the blk-mq path of allocating/inserting/issuing/completing requests, allowing us to develop a scheduler within that framework. We reuse the existing elevator scheduler API on the registration side, but augment that with the scheduler flagging support for the blk-mq interfce, and with a separate set of ops hooks for MQ devices. We split driver and scheduler tags, so we can run the scheduling independently of device queue depth. Signed-off-by: Jens Axboe Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval block/Makefile | 2 +- block/blk-cgroup.c | 24 +++- block/blk-core.c | 4 +- block/blk-exec.c | 3 +- block/blk-flush.c | 12 +- block/blk-ioc.c | 8 +- block/blk-merge.c | 2 +- block/blk-mq-sched.c | 368 +++++++++++++++++++++++++++++++++++++++++++++++ block/blk-mq-sched.h | 170 ++++++++++++++++++++++ block/blk-mq-sysfs.c | 13 ++ block/blk-mq.c | 318 +++++++++++++++++++++++----------------- block/blk-mq.h | 8 +- block/blk-tag.c | 1 + block/elevator.c | 204 ++++++++++++++++++++------ include/linux/blk-mq.h | 5 +- include/linux/blkdev.h | 4 +- include/linux/elevator.h | 32 +++++ 17 files changed, 984 insertions(+), 194 deletions(-) commit 2af8cbe30531eca73c8f3ba277f155fc0020b01a Author: Jens Axboe Date: Fri Jan 13 14:39:30 2017 -0700 blk-mq: split tag ->rqs[] into two This is in preparation for having two sets of tags available. For that we need a static index, and a dynamically assignable one. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq-tag.c | 4 ++-- block/blk-mq-tag.h | 1 + block/blk-mq.c | 30 +++++++++++++++++++++++------- 3 files changed, 26 insertions(+), 9 deletions(-) commit fd2d332677c687ca90c12a47d6c377c547100b56 Author: Jens Axboe Date: Thu Jan 12 10:04:45 2017 -0700 blk-mq: add support for carrying internal tag information in blk_qc_t No functional change in this patch, just in preparation for having two types of tags available to the block layer for a single request. Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq.c | 11 ++++++++--- include/linux/blk_types.h | 22 +++++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) commit cc71a6f43886a8af57dbbce2a45b4b2aaf570fe6 Author: Jens Axboe Date: Wed Jan 11 14:29:56 2017 -0700 blk-mq: abstract out helpers for allocating/freeing tag maps Prep patch for adding an extra tag map for scheduler requests. Signed-off-by: Jens Axboe Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval block/blk-mq.c | 117 ++++++++++++++++++++++++++++++++++++--------------------- block/blk-mq.h | 14 ++++--- 2 files changed, 83 insertions(+), 48 deletions(-) commit 4941115bef2bc891aa00a2f0edeaf06dc982325a Author: Jens Axboe Date: Fri Jan 13 08:09:05 2017 -0700 blk-mq-tag: cleanup the normal/reserved tag allocation This is in preparation for having another tag set available. Cleanup the parameters, and allow passing in of tags for blk_mq_put_tag(). Signed-off-by: Jens Axboe [hch: even more cleanups] Signed-off-by: Christoph Hellwig Reviewed-by: Omar Sandoval block/blk-mq-tag.c | 94 +++++++++++++++++++++--------------------------------- block/blk-mq-tag.h | 4 +-- block/blk-mq.c | 2 +- block/blk-mq.h | 5 +++ 4 files changed, 44 insertions(+), 61 deletions(-) commit 2c3ad667902ef6f4b60ef0a3c6f7d8c2b007769a Author: Jens Axboe Date: Wed Dec 14 14:34:47 2016 -0700 blk-mq: export some helpers we need to the scheduling framework Signed-off-by: Jens Axboe Reviewed-by: Johannes Thumshirn Reviewed-by: Omar Sandoval block/blk-mq.c | 39 +++++++++++++++++++++------------------ block/blk-mq.h | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 18 deletions(-) commit 16a3c2a70cad5ccdc2dc0a4544bff82554807493 Author: Jens Axboe Date: Thu Dec 15 14:27:46 2016 -0700 blk-mq: un-export blk_mq_free_hctx_request() It's only used in blk-mq, kill it from the main exported header and kill the symbol export as well. Signed-off-by: Jens Axboe Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval block/blk-mq.c | 5 ++--- include/linux/blk-mq.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) commit c23ecb426084a98418ee29124c139e37c274ad04 Author: Jens Axboe Date: Wed Dec 14 14:23:43 2016 -0700 block: move rq_ioc() to blk.h We want to use it outside of blk-core.c. Signed-off-by: Jens Axboe Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval block/blk-core.c | 16 ---------------- block/blk.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) commit c51ca6cf545bc51ad38bd50816bde37c647d608d Author: Jens Axboe Date: Sat Dec 10 15:13:59 2016 -0700 block: move existing elevator ops to union Prep patch for adding MQ ops as well, since doing anon unions with named initializers doesn't work on older compilers. Signed-off-by: Jens Axboe Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval block/blk-ioc.c | 8 +++---- block/blk-merge.c | 4 ++-- block/blk.h | 10 ++++---- block/cfq-iosched.c | 2 +- block/deadline-iosched.c | 2 +- block/elevator.c | 60 ++++++++++++++++++++++++------------------------ block/noop-iosched.c | 2 +- include/linux/elevator.h | 4 +++- 8 files changed, 47 insertions(+), 45 deletions(-) commit a17f32270af1e1054bbc8858b0f27226a2c859ba Author: Piotr Luc Date: Tue Jan 10 18:34:03 2017 +0100 kvm: x86: Expose Intel VPOPCNTDQ feature to guest Vector population count instructions for dwords and qwords are to be used in future Intel Xeon & Xeon Phi processors. The bit 14 of CPUID[level:0x07, ECX] indicates that the new instructions are supported by a processor. The spec can be found in the Intel Software Developer Manual (SDM) or in the Instruction Set Extensions Programming Reference (ISE). Signed-off-by: Piotr Luc Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9ff720e0fee2f64c279e71c1bf86e93804295d2 Merge: 21e7fbe 06b35d9 Author: Radim Krčmář Date: Tue Jan 17 17:53:01 2017 +0100 Merge branch 'x86/cpufeature' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next For AVX512_VPOPCNTDQ. commit 55f78fcdd88c6298933645b74c32ce3788bed7eb Author: Philippe Reynes Date: Sat Jan 14 23:26:22 2017 +0100 net: marvell: sky2: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 68 ++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 28 deletions(-) commit 0f826385a6fa699d31fc1f835fb9ef9a724b523e Author: Philippe Reynes Date: Mon Jan 16 22:46:08 2017 +0100 net: marvell: skge: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. The callback set_link_ksettings no longer update the value of advertising, as the struct ethtool_link_ksettings is defined as const. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/marvell/skge.c | 63 ++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit c523838c8514e1fdccc60b0a584bae374e6c5c0f Author: Philippe Reynes Date: Sun Jan 15 23:18:21 2017 +0100 net: jme: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/jme.c | 34 +++++++++++++++++----------------- drivers/net/ethernet/jme.h | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) commit af473688ce44b7faad6fa25bb9df43c7b48308c7 Author: Philippe Reynes Date: Sat Jan 14 12:33:19 2017 +0100 net: korina: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 603a0c8af9cb23f7cf94d57e76113fef51848200 Author: Mylène Josserand Date: Tue Jan 17 15:02:22 2017 +0100 clk: sunxi-ng: a33: Add CLK_SET_RATE_PARENT to ac-dig The audio DAI needs to set the clock rates of the ac-dig clock. To make it possible, the parent PLL audio clock rates should also be changed. This is possible via "CLK_SET_RATE_PARENT" flag. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5082b70adfe8e1ea1cf4a8eff92c9f260e364d2 Author: Alden Tondettar Date: Sun Jan 15 15:31:56 2017 -0700 partitions/efi: Fix integer overflow in GPT size calculation If a GUID Partition Table claims to have more than 2**25 entries, the calculation of the partition table size in alloc_read_gpt_entries() will overflow a 32-bit integer and not enough space will be allocated for the table. Nothing seems to get written out of bounds, but later efi_partition() will read up to 32768 bytes from a 128 byte buffer, possibly OOPSing or exposing information to /proc/partitions and uevents. The problem exists on both 64-bit and 32-bit platforms. Fix the overflow and also print a meaningful debug message if the table size is too large. Signed-off-by: Alden Tondettar Acked-by: Ard Biesheuvel Signed-off-by: Jens Axboe block/partitions/efi.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 797a8b4d768c58caac58ee3e8cb36a164d1b7751 Author: Robin Murphy Date: Mon Jan 16 12:58:07 2017 +0000 iommu: Handle default domain attach failure We wouldn't normally expect ops->attach_dev() to fail, but on IOMMUs with limited hardware resources, or generally misconfigured systems, it is certainly possible. We report failure correctly from the external iommu_attach_device() interface, but do not do so in iommu_group_add() when attaching to the default domain. The result of failure there is that the device, group and domain all get left in a broken, part-configured state which leads to weird errors and misbehaviour down the line when IOMMU API calls sort-of-but-don't-quite work. Check the return value of __iommu_attach_device() on the default domain, and refactor the error handling paths to cope with its failure and clean up correctly in such cases. Fixes: e39cb8a3aa98 ("iommu: Make sure a device is always attached to a domain") Reported-by: Punit Agrawal Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit b368f53378a4dc193239b5b8ffe8789bbb8b90a8 Author: Zhenyu Wang Date: Tue Jan 17 22:06:11 2017 +0800 drm/i915: Fix a typo in vgt_balloon_space() Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper") introduces this typo which can cause a driver loading failure in Linux GVT-g guest. Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper") Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhiyuan Lv Signed-off-by: Zhenyu Wang Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/1484661972-9366-1-git-send-email-zhi.a.wang@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a61266ebdf2c412df6fe2c81e74cb67b719915d5 Author: Markus Elfring Date: Thu Jan 12 17:12:30 2017 +0100 pinctrl: mvebu: Use seq_putc() in mvebu_pinconf_group_dbg_show() Single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 420dc61642920849d824a0de2aa853db59f5244f Author: Markus Elfring Date: Thu Jan 12 16:51:00 2017 +0100 pinctrl: mvebu: Use seq_puts() in mvebu_pinconf_group_dbg_show() Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 39c7c5abe8cfd6ff3da5df1e78b3e6833f045af5 Author: Markus Elfring Date: Thu Jan 12 16:30:24 2017 +0100 pinctrl: mvebu: Delete an unnecessary return statement in mvebu_pinconf_group_dbg_show() The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 1 - 1 file changed, 1 deletion(-) commit 77d3d2e275629b50a24d805c80800a973ccfe04a Author: Markus Elfring Date: Thu Jan 12 16:15:34 2017 +0100 pinctrl: mvebu: Delete an error message for a failed memory allocation in three functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit e6e965ce5608e1d34214c34483a7364600917b63 Author: Markus Elfring Date: Thu Jan 12 16:00:15 2017 +0100 pinctrl: mvebu: Use kmalloc_array() in mvebu_pinctrl_dt_node_to_map() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". 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: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d94386f28abad0c5879f0760712e34e71f88a7da Author: Soramichi AKIYAMA Date: Tue Jan 17 22:22:33 2017 +0900 perf evlist: Fix typo in deliver_sample() This patch fixes a typo: s/delievery/delivery/ Signed-off-by: Soramichi Akiyama Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170117222233.dfd92de0ad701e7c53396950@m.soramichi.jp Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d25ed5d9fad98fd36ffca0bb5c3a0761a11e3f3c Author: Soramichi AKIYAMA Date: Tue Jan 17 00:22:37 2017 +0900 perf tools: Move two variables usied in libperf from perf.c The use_browser and perf_version_string variables are both declared in perf.c but they are also referenced by other functions of libperf.a. Therefore a user linking an own main() with libperf.a must declare those two variables in their files even if the files never use the browser or the version information. This patch fixes this issue by moving use_browser and perf_version_string out of perf.c to some other files. Signed-off-by: Soramichi Akiyama Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170117002237.c1aec0ce3b4d675dca018deb@m.soramichi.jp Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 3 +-- tools/perf/perf.c | 3 --- tools/perf/ui/setup.c | 1 + tools/perf/util/Build | 1 + tools/perf/util/header.c | 2 ++ 5 files changed, 5 insertions(+), 5 deletions(-) commit 587782c52a83b35673201fd9a54364fa2b189b33 Author: Namhyung Kim Date: Fri Jan 13 19:45:23 2017 +0900 perf sched timehist: Show total wait times for summary When --state option is given, the summary will show total run, sleep, iowait, preempt and delay time instead of statistics of runtime. $ perf sched timehist -s --state Wait-time summary comm parent sched-in run-time sleep iowait preempt delay (count) (msec) (msec) (msec) (msec) (msec) --------------------------------------------------------------------- systemd[1] 0 3 0.497 1.685 0.000 0.000 0.061 ksoftirqd/0[3] 2 21 0.434 989.948 0.000 0.000 0.325 rcu_preempt[7] 2 28 0.386 993.211 0.000 0.000 0.712 migration/0[10] 2 12 0.126 50.174 0.000 0.000 0.044 watchdog/0[11] 2 1 0.009 0.000 0.000 0.000 0.016 migration/1[13] 2 2 0.029 11.755 0.000 0.000 0.007 Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Minchan Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170113104523.31212-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 414e050c68ec2a3dd815544ea48ff6016f1a7a11 Author: Namhyung Kim Date: Fri Jan 13 19:45:22 2017 +0900 perf sched timehist: Add --state option The --state option is to show task state when switched out. The state is printed as a single character like in the /proc but I added 'I' for idle state rather than 'R'. $ perf sched timehist --state | head Samples do not have callchains. time cpu task name wait time sch delay run time state [tid/pid] (msec) (msec) (msec) -------- --- ----------------------- -------- ------------------ ----- 1.753791 [3] 0.000 0.000 0.000 I 1.753834 [1] perf[27469] 0.000 0.000 0.000 S 1.753904 [3] perf[27470] 0.000 0.006 0.112 S 1.753914 [1] 0.000 0.000 0.079 I 1.753915 [3] migration/3[23] 0.000 0.002 0.011 S 1.754287 [2] 0.000 0.000 0.000 I 1.754335 [2] transmission[1773/1739] 0.000 0.004 0.047 S Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Minchan Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170113104523.31212-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-sched.txt | 2 ++ tools/perf/builtin-sched.c | 38 +++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) commit 941bdea79e194dec7e7b42780aa5620020548f8a Author: Namhyung Kim Date: Fri Jan 13 19:45:21 2017 +0900 perf sched timehist: Account thread wait time separately Separate thread wait time into 3 parts - sleep, iowait and preempt based on the prev_state of the last event. Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Minchan Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170113104523.31212-1-namhyung@kernel.org [ Fix the build on centos:5 where 'wait' shadows a global declaration ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 50 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) commit 7f2f61377bcad5e14d7faf38d4d4317c7d984e71 Author: Larry Finger Date: Tue Jan 10 10:15:26 2017 -0600 rtlwifi: rtl8192de: Remove a pointless goto In commit c93ac39da0064 ("rtlwifi: Remove some redundant code), a goto statement was inadvertently left in the code. Fixes: c93ac39da0064 ("rtlwifi: Remove some redundant code) Reported-by: kbuild test robot Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 1 - 1 file changed, 1 deletion(-) commit 9a802431c527f0ef860399f066a9793794cac17b Author: Sudeep Holla Date: Mon Jan 16 10:40:44 2017 +0000 arm64: cacheinfo: add support to override cache levels via device tree The cache hierarchy can be identified through Cache Level ID(CLIDR) architected system register. However in some cases it will provide only the number of cache levels that are integrated into the processor itself. In other words, it can't provide any information about the caches that are external and/or transparent. Some platforms require to export the information about all such external caches to the userspace applications via the sysfs interface. This patch adds support to override the cache levels using device tree to take such external non-architected caches into account. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Tested-by: Tan Xiaojun Signed-off-by: Sudeep Holla Signed-off-by: Will Deacon arch/arm64/kernel/cacheinfo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 5fa23530d4fcc7e84be9a557c58d0e670a15c042 Author: Sudeep Holla Date: Mon Jan 16 10:40:43 2017 +0000 of: base: add support to find the level of the last cache It is useful to have helper function just to get the number of cache levels for a given logical cpu. We can obtain the same by just checking the level at which the last cache is present. This patch adds support to find the level of the last cache for a given cpu. It will be used on ARM64 platform where the device tree provides the information for the additional non-architected/transparent/external last level caches that are not integrated with the processors. Cc: Mark Rutland Suggested-by: Rob Herring Acked-by: Rob Herring Tested-by: Tan Xiaojun Signed-off-by: Sudeep Holla [will: use u32 instead of int for cache_level] Signed-off-by: Will Deacon drivers/of/base.c | 26 ++++++++++++++++++++++++++ include/linux/of.h | 1 + 2 files changed, 27 insertions(+) commit 6183468a23fc6b6903f8597982017ad2c7fdefcf Author: Brian Norris Date: Mon Jan 9 15:33:50 2017 -0800 mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print Similar to commit fcd2042e8d36 ("mwifiex: printk() overflow with 32-byte SSIDs"), we failed to account for the existence of 32-char SSIDs in our debugfs code. Unlike in that case though, we zeroed out the containing struct first, and I'm pretty sure we're guaranteed to have some padding after the 'ssid.ssid' and 'ssid.ssid_len' fields (the struct is 33 bytes long). So, this is the difference between: # cat /sys/kernel/debug/mwifiex/mlan0/info ... essid="0123456789abcdef0123456789abcdef " ... and the correct output: # cat /sys/kernel/debug/mwifiex/mlan0/info ... essid="0123456789abcdef0123456789abcdef" ... Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab99063f873749b3c3b1e5d44038559883465e74 Author: Rafał Miłecki Date: Sat Jan 7 21:36:05 2017 +0100 brcmfmac: setup wiphy bands after registering it first During bands setup we disable all channels that firmware doesn't support in the current regulatory setup. If we do this before wiphy_register it will result in copying set flags (including IEEE80211_CHAN_DISABLED) to the orig_flags which is supposed to be persistent. We don't want this as regulatory change may result in enabling some channels. We shouldn't mess with orig_flags then (by changing them or ignoring them) so it's better to just take care of their proper values. This patch cleanups code a bit (by taking orig_flags more seriously) and allows further improvements like disabling really unavailable channels. We will need that e.g. if some frequencies should be disabled for good due to hardware setup (design). Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9ea0c307609fd20e03f53546b9cefbb20b96785d Author: Rafał Miłecki Date: Sat Jan 7 21:36:04 2017 +0100 brcmfmac: don't preset all channels as disabled During init we take care of regulatory stuff by disabling all unavailable channels (see brcmf_construct_chaninfo) so this predisabling them is not really required (and this patch won't change any behavior). It will on the other hand allow more detailed runtime control over channels which is the main reason for this change. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 -- 1 file changed, 2 deletions(-) commit 66ecec02e851cb32b1f30392d545dc821e71aaa9 Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:18 2017 +0100 rt2800: set max_psdu to 3 on usb devices All Ralink USB devices I have, including old ones, work well with max_psdu = 3 (64kB tx AMPDUs). Fix indent on the way. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 51583248187cf224485327aed54b64c348f415dc Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:17 2017 +0100 rt2x00: do not flush empty queue Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1701221696764b6861d0ee66850812a8900b9b9b Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:16 2017 +0100 rt2800usb: mark tx failure on timeout If we do not get TX status in reasonable time, we most likely fail to send frame hence mark it as so. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e4019e7f95302c45fad5c35d62c9b3ca8fc30fb2 Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:14 2017 +0100 rt2800: tune TX_RTS_CFG config Enable RTS frame retry fall-back and limit number of RTS retries to 7 what is default number of retries for small frames. As RTS/CTS is used for TXOP protection, those settings prevent posting lots of RTS frames when remote station do not response with CTS at the moment. After sending 7 RTS's the HW will start back-off mechanism and after it will start posing RTS again to get access to the medium. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01d97ef4b25f8ca79ff1522416cdaf5b0c6b9047 Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:13 2017 +0100 rt2800: change default retry settings We do not have option to set per frame retry count. We have only global TX_RTY_CFG registers which specify the number or retries. Set setting of that register to value that correspond rate control algorithm number of frame post (number of retries + 1), which is 3 for aggregated frames. This should help with big amount of retries on bad conditions, hence mitigate buffer-bloat like problems. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 15ec51b25e05ab434173ec647fa678b6c7b660bb Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:12 2017 +0100 rt2x00: save conf settings before reset tuner Reset tuner use curr_band value, make sure it is updated. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00config.c | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) commit cfe82fbd84239b7b65b380eba2f02cd5b12e99d7 Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:11 2017 +0100 rt2800: increase TX timeout When medium is busy or frames have to be resend, it takes time to send the frames and get TX status from hardware. For some really bad medium conditions it can take seconds. Patch change TX status timeout to give HW more time to provide it, however 500ms is not enough for bad conditions. In the future this timeout should be removed and replaced with proper watchdog mechanism. Increase flush timeout accordingly as well. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 480b468625da1f054c487f7168e9a9bdc1bf869b Author: Stanislaw Gruszka Date: Fri Jan 6 14:05:10 2017 +0100 rt2800usb: remove watchdog On rt2800usb, if we do not get TX status from HW, we assume frames were posted and after entry->last_action timeout, we forcibly provide TX status to mac80211. So it's not possible to detect hardware TX hung based on the timeout. Additionally TXRQ_PCNT tells on number of frames in the Packet Buffer (buffer between bus interface and chip MAC subsystem), which can be non zero on normal conditions. To check HW hung we will need provide some different mechanism, for now remove watchdog as current implementation is wrong and not useful. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 42 -------------------------- 1 file changed, 42 deletions(-) commit 77c0d0cd10e793989d1e8b835a9a09694182cb39 Author: Rafał Miłecki Date: Wed Jan 4 12:09:41 2017 +0100 brcmfmac: avoid writing channel out of allocated array Our code was assigning number of channels to the index variable by default. If firmware reported channel we didn't predict this would result in using that initial index value and writing out of array. This never happened so far (we got a complete list of supported channels) but it means possible memory corruption so we should handle it anyway. This patch simply detects unexpected channel and ignores it. As we don't try to create new entry now, it's also safe to drop hw_value and center_freq assignment. For known channels we have these set anyway. I decided to fix this issue by assigning NULL or a target channel to the channel variable. This was one of possible ways, I prefefred this one as it also avoids using channel[index] over and over. Fixes: 58de92d2f95e ("brcmfmac: use static superset of channels for wiphy bands") Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 0e8edb9aed03892844713bb76a8e1d2d138f3175 Author: Arnd Bergmann Date: Fri Jan 13 16:35:03 2017 +0100 mwifiex: fix uninitialized variable access in pcie_remove Checking the firmware status from PCIe register only works if the register is available, otherwise we end up with random behavior: drivers/net/wireless/marvell/mwifiex/pcie.c: In function 'mwifiex_pcie_remove': drivers/net/wireless/marvell/mwifiex/pcie.c:585:5: error: 'fw_status' may be used uninitialized in this function [-Werror=maybe-uninitialized] This makes sure we treat the absence of the register as a failure. Fixes: 045f0c1b5e26 ("mwifiex: get rid of global user_rmmod flag") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e945cba255f41d2413e3208d480588c2420c657 Author: Gabriel Krisman Bertazi Date: Thu Jan 12 14:16:08 2017 -0200 drm: qxl: Let DRM core handle connector registering Registering the connector explicitly right after creation is not necessary for modesetting drivers, because drm_dev_register already takes care of this on the core side, by calling drm_modeset_register_all. In addition, performing the initialization too early will get in the way of the load() hook removal, because the connector interface cannot be published prior to registering the minors. Signed-off-by: Gabriel Krisman Bertazi CC: Dave Airlie CC: Daniel Vetter CC: dri-devel@lists.freedesktop.org Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170112161610.19924-1-krisman@collabora.co.uk drivers/gpu/drm/qxl/qxl_display.c | 1 - 1 file changed, 1 deletion(-) commit eb758c8864d49f5786432ce38fd8a72bdbbd10cf Author: Steffen Klassert Date: Tue Jan 17 10:23:08 2017 +0100 esp: Introduce a helper to setup the trailer We need to setup the trailer in two different cases, so add a helper to avoid code duplication. Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 44 +++++++++++++++++++------------------------- net/ipv6/esp6.c | 44 +++++++++++++++++++------------------------- 2 files changed, 38 insertions(+), 50 deletions(-) commit 03e2a30f6a27e2f3e5283b777f6ddd146b38c738 Author: Steffen Klassert Date: Tue Jan 17 10:23:03 2017 +0100 esp6: Avoid skb_cow_data whenever possible This patch tries to avoid skb_cow_data on esp6. On the encrypt side we add the IPsec tailbits to the linear part of the buffer if there is space on it. If there is no space on the linear part, we add a page fragment with the tailbits to the buffer and use separate src and dst scatterlists. On the decrypt side, we leave the buffer as it is if it is not cloned. With this, we can avoid a linearization of the buffer in most of the cases. Joint work with: Sowmini Varadhan Ilan Tayari Signed-off-by: Sowmini Varadhan Signed-off-by: Ilan Tayari Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 302 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 246 insertions(+), 56 deletions(-) commit cac2661c53f35cbe651bef9b07026a5a05ab8ce0 Author: Steffen Klassert Date: Tue Jan 17 10:22:57 2017 +0100 esp4: Avoid skb_cow_data whenever possible This patch tries to avoid skb_cow_data on esp4. On the encrypt side we add the IPsec tailbits to the linear part of the buffer if there is space on it. If there is no space on the linear part, we add a page fragment with the tailbits to the buffer and use separate src and dst scatterlists. On the decrypt side, we leave the buffer as it is if it is not cloned. With this, we can avoid a linearization of the buffer in most of the cases. Joint work with: Sowmini Varadhan Ilan Tayari Signed-off-by: Sowmini Varadhan Signed-off-by: Ilan Tayari Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 + net/ipv4/esp4.c | 338 +++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 266 insertions(+), 74 deletions(-) commit bf6b2030bed9371240127afa4a3219c78cf0119d Author: Chris Wilson Date: Mon Jan 16 14:52:42 2017 +0000 drm/i915: Assert internal objects are page aligned Internal objects must be passed a page-aligned size. Check it. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170116145242.13875-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_internal.c | 1 + 1 file changed, 1 insertion(+) commit e8aa6811ca9547bc82baa6ed44c38dde01fb0d86 Author: Geert Uytterhoeven Date: Mon Jan 16 17:56:53 2017 +0100 ARM: dts: r8a7779, marzen: Fix sata device status Device nodes representing I/O devices should be marked disabled in the SoC-specific DTS, and overridden by board-specific DTSes where needed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7779-marzen.dts | 4 ++++ arch/arm/boot/dts/r8a7779.dtsi | 1 + 2 files changed, 5 insertions(+) commit 788d23930a9724fc85cdf9999521a867d8748019 Author: Matthias Brugger Date: Mon Jan 16 19:48:20 2017 +0100 irq/platform-msi: Fix comment about maximal MSIs Commit aff5e06b0dda ("irq/platform-MSI: Increase the maximum MSIs the MSI framework can support") increased the maximum MSIs to 2048. Fix the comment to reflect that. Signed-off-by: Matthias Brugger Cc: gregkh@linuxfoundation.org Cc: majun258@huawei.com Link: http://lkml.kernel.org/r/1484592500-15400-1-git-send-email-mbrugger@suse.com Signed-off-by: Thomas Gleixner drivers/base/platform-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2b360449e4799f165ee1135a3c9f545b86e2bbe Merge: 8e60a94 d99c664 Author: Olof Johansson Date: Mon Jan 16 22:47:51 2017 -0800 Merge tag 'stm32-dt-for-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt STM32 DT updates for v4.11, round 1. Highlights: ---------- - ADD RTC support on STM32F429 MCU - Enable RTC on STM32F469and STM32F429 boards - ADD ADC support on STM32F429 MCU - Enable ADC on STM32F429 Eval board - Add I2S external clock - Fix memory size for STM32F429 Disco Note: ----- First patch "clk: stm32f4: Update DT bindings documentation") has already been merged in clock tree. * tag 'stm32-dt-for-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: enable RTC on stm32429i-eval ARM: dts: stm32: enable RTC on stm32f469-disco ARM: dts: stm32: enable RTC on stm32f429-disco ARM: dts: stm32: Add RTC support for STM32F429 MCU ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f429 ARM: dts: stm32: Include auxiliary stm32fx clock definition ARM: dts: stm32: Add external I2S clock on stm32f429 MCU ARM: dts: stm32: enable ADC on stm32f429i-eval board ARM: dts: stm32: Add ADC support to stm32f429 ARM: dts: stm32: Add missing USART3 pin config to stm32f469-disco board ARM: dts: stm32: Fix memory size from 8MB to 16MB on stm32f469-disco board clk: stm32f4: Update DT bindings documentation Signed-off-by: Olof Johansson commit f638d8f15f26de54eb4290ae8a91807c1e2498ea Merge: 127e0ee 58a748f Author: Olof Johansson Date: Mon Jan 16 22:46:16 2017 -0800 Merge tag 'mvebu-dt64-4.11-1' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.11 (part 1) - Correct license text which was mangled when switching to dual license - Add SPI and I2C nodes on Armada 3700(driver support had been already merged) - Add support for the ethernet switch on the EspressoBin board (driver support not yet merged) * tag 'mvebu-dt64-4.11-1' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: Correct license text arm64: dts: marvell: Add I2C definitions for the Armada 3700 arm64: dts: marvell: Enable spi0 on the board Armada-3720-db arm64: dts: marvell: Add definition of SPI controller for Armada 3700 arm64: dts: marvell: Add ethernet switch definition for the ESPRESSObin Signed-off-by: Olof Johansson commit 8e60a94c0fbcd4cb28c2a1aeac1cfc3043f681aa Merge: 0e1c1c7 7b7db5a Author: Olof Johansson Date: Mon Jan 16 22:44:16 2017 -0800 Merge tag 'mvebu-dt-4.11-1' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.11 (part 1) - Add support for the ethernet switch on the Turris Omnia board - Clean up and improvement for ClearFog boards - Correct license text which was mangled when switching to dual license * tag 'mvebu-dt-4.11-1' of git://git.infradead.org/linux-mvebu: ARM: dts: turris-omnia: add support for ethernet switch ARM: dts: armada388-clearfog: move uart nodes ARM: dts: armada388-clearfog: move ethernet related nodes ARM: dts: armada388-clearfog: move I2C nodes ARM: dts: armada388-clearfog: move device specific pinctrl nodes ARM: dts: armada388-clearfog: add pro model DTS file ARM: dts: armada388-clearfog: add base model DTS file ARM: dts: armada388-clearfog: move rear button ARM: dts: armada388-clearfog: move SPI CS1 ARM: dts: armada388-clearfog: move second PCIe port ARM: dts: armada388-clearfog: move DSA switch ARM: dts: armada388-clearfog: split clearfog DTS file ARM: dts: armada388-clearfog: move sdhci pinctrl node to microsom ARM: dts: armada388-clearfog: move SPI flash into microsom ARM: dts: armada388-clearfog: fix SPI flash #size-cells ARM: dts: mvebu: Correct license text Signed-off-by: Olof Johansson commit 076b01d3f65305b90a5224aeee95a1bae304fa61 Merge: a121103 299d2f02 Author: Olof Johansson Date: Mon Jan 16 22:43:17 2017 -0800 Merge tag 'mvebu-defconfig64-4.11-1' of git://git.infradead.org/linux-mvebu into next/arm64 mvebu defconfig64 for 4.11 (part 1) Update arm64 defconfig by adding XORv2 for Marvell Armada 7K/8K * tag 'mvebu-defconfig64-4.11-1' of git://git.infradead.org/linux-mvebu: arm64: defconfig: enable XORv2 for Marvell Armada 7K/8K Signed-off-by: Olof Johansson commit d602ede676b57bf3ab2732ced687b1033a1778b6 Merge: 3f1d696 74b0ee7 Author: Olof Johansson Date: Mon Jan 16 22:41:22 2017 -0800 Merge tag 'samsung-defconfig-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Samsung defconfig update for v4.11: 1. Cleanup from old MACHs in s5pv210. 2. Enable IP_MULTICAST for libnss-mdns. * tag 'samsung-defconfig-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos_defconfig: Enable IP multicast ARM: s5pv210_defconfig: Remove old MACHs Signed-off-by: Olof Johansson commit 127e0ee0e521b23ba8b0fd9d2f0bbaac5acb5273 Merge: 7a7b197 e4e3811 Author: Olof Johansson Date: Mon Jan 16 22:31:07 2017 -0800 Merge tag 'samsung-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Samsung DeviceTree ARM64 update for v4.11: 1. Add bus frequency and voltage scalling on Exynos5433 TM2 device (along with necessary bus nodes and Platform Performance Monitoring Unit on Exynos5433). 2. Use macros for pinctrl settings on Exynos5433. This contains necessary header with bindings. 3. Minor cleanups in Exynos5433 DTSI and boards using it. 4. Create common DTSI betweem Exynos5433 TM2E and TM2E. 5. Add HDMI/TV to Exynos5433 TM2. * tag 'samsung-dt64-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Enable HDMI/TV path on Exynos5433-TM2 arm64: dts: exynos: Add HDMI node to Exynos5433 arm64: dts: exynos: Add DECON_TV node to Exynos5433 arm64: dts: exynos: Fix addresses in node names on Exynos5433 arm64: dts: exynos: Make TM2 and TM2E independent from each other arm64: dts: exynos: Fix wrong values for ldo23 and ldo25 on TM2/TM2E arm64: dts: exynos: Remove unsupported regulator-always-off property from TM2E arm64: dts: exynos: Comply to the samsung pinctrl naming convention in TM2 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos5433 pinctrl: dt-bindings: samsung: add drive strength macros for Exynos5433 arm64: dts: exynos: Add support of bus frequency using VDD_INT on Exynos5433 TM2 arm64: dts: exynos: Add bus nodes using VDD_INT for Exynos5433 arm64: dts: exynos: Add PPMU node to Exynos5433 Signed-off-by: Olof Johansson commit 0e1c1c7af4b480becb5d7fc666fa4becf3ccd72f Merge: 71c554e bca9085 Author: Olof Johansson Date: Mon Jan 16 22:30:21 2017 -0800 Merge tag 'samsung-dt-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DeviceTree update for v4.11: 1. Fixes for initial audio clocks configuration. 2. Enable sound on Odroid-X board. 3. Enable DMA for UART modules on Exynos5 SoCs. 4. Add CPU OPPs for Exynos4412 Prime (newer version of Exynos4412). This pulls necessary change in the clocks. 5. Remove Exynos4212. We do not have any mainline boards with it. This will simplify few bits later. * tag 'samsung-dt-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: remove Exynos4212 support (dead code) ARM: dts: exynos: Add CPU OPPs for Exynos4412 Prime clk: samsung: Add CPU clk configuration data for Exynos4412 Prime ARM: dts: exynos: Enable DMA support for UART modules on Exynos5 SoCs ARM: dts: exynos: Cleanup Odroid-X2 and enable sound on Odroid-X ARM: dts: exynos: Fix initial audio clocks configuration on Exynos4 boards ARM: dts: exynos: Correct clocks for Exynos4 I2S module Signed-off-by: Olof Johansson commit d2d08aba624899d159fbe5b0ed3a6915232e42c7 Merge: ddcb0a7 cda1a52 Author: Olof Johansson Date: Mon Jan 16 22:28:56 2017 -0800 Merge tag 'samsung-soc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung mach/soc update for v4.11. Mostly cleanups: 1. Removal of unused platform data in S3C24XX and S3C64xx as follow up of conversion to new DMA channel request API. 2. Adding const and __ro_after_init to various data in Samsung platforms. * tag 'samsung-soc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c64xx: Constify wake_irqs ARM: s3c24xx: Constify wake_irqs ARM: SAMSUNG: Constify array of wake irqs passed to samsung_sync_wakemask ARM: s3c64xx: Annotate external clock frequencies __ro_after_init ARM: s3c24xx: Constify few integer tables ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init ARM: EXYNOS: Constify list of retention registers ARM: s3c24xx: Drop unused struct s3c_audio_pdata entries ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields Signed-off-by: Olof Johansson commit 71c554ece79806f3c2755371c66d47b96f0a895f Merge: 2d19d35 2016ead Author: Olof Johansson Date: Mon Jan 16 22:28:12 2017 -0800 Merge tag 'sti-dt-for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt STi dts update: Enable High Quality Video Data Plane (HQVDP) DT entry Add DELTA V4L2 video decoder DT entry Disable unused fdma instances Fix sti-display-subsystem wrong clock parent's value Cleanup and update DT entries related to remoteproc * tag 'sti-dt-for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: Supply Mailbox properties to delta RProc ARM: dts: STiH407-family: Supply mailbox properties to GP0 RProc ARM: dts: STiH407-family: update dmu remoteproc node ARM: dts: STiH407-family: remove gp1 remoteproc node ARM: dts: STiH407-family: remove audio remoteproc node ARM: dts: STiH407-family: update gp0_reserved memory region ARM: dts: STiH410-family: fix wrong parent clock frequency ARM: dts: STiH410: add DELTA dt node ARM: dts: STiH407-family: disable fdma1 and fdma2 ARM: dts: STiH410: add hqvdp node ARM: dts: STiH410-B2120: enable sti-hda at board level Signed-off-by: Olof Johansson commit ddcb0a762b61e374cc9d0269da0d9abc44489bb4 Merge: 53f56d6 f3c0559 Author: Olof Johansson Date: Mon Jan 16 22:26:42 2017 -0800 Merge tag 'ux500-dev-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/soc Some two collected patches simplifying some Ux500 stuff. * tag 'ux500-dev-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: ux500: remove duplicated include from cpu-db8500.c ARM: ux500: simplify secondary boot Signed-off-by: Olof Johansson commit 2d19d35c835cd181ff8ea35eb5e4a9481bdaf440 Merge: baed3c5 7f0f546 Author: Olof Johansson Date: Mon Jan 16 22:25:07 2017 -0800 Merge tag 'socfpga_dts_for_v4.11_part_1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v4.11, part 1 - Adds FPGA manager bits - Enable I2C on Cyclone5 and Arria5 devkits - Adds LED support on C5/A5 devkits - Enables CAN on C5 devkit - Enables watchdog - Add NAND on Arria10 - Add the LTC2977 Power Monitor on Arria10 devkit * tag 'socfpga_dts_for_v4.11_part_1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: add missing compatible string for SDRAM controller ARM: dts: socfpga: add fpga region support on Arria10 ARM: dts: socfpga: add base fpga region and fpga bridges ARM: dts: socfpga: fpga manager data is 32 bits ARM: dts: socfpga: Add NAND device tree for Arria10 ARM: dts: socfpga: add fpga-manager node for Arria10 ARM: dts: socfpga: add the LTC2977 power monitor on Arria10 devkit ARM: dts: socfpga: enable watchdog timer on Arria5 and Arria10 ARM: dts: socfpga: enable CAN on Cyclone5 devkit ARM: dts: socfpga: Add Rohm DH2228FV DAC ARM: dts: socfpga: set desired i2c clock on Cyclone5 and Arria5 devkits ARM: dts: socfpga: enable GPIO and LEDs for Cyclone5 and Arria5 devkits Signed-off-by: Olof Johansson commit 3f1d69677159311874baa5f8928b879dc4bd6a7b Merge: 0a8c771 4fdf182 Author: Olof Johansson Date: Mon Jan 16 22:23:50 2017 -0800 Merge tag 'socfpga_defconfig_updates_for_v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/defconfig SoCFPGA defconfig updates for v4.11 - enables Marvell PHY support - enable MTD(I2C EEPROM), and NAND support - enable SPI, RTC and LED support - enables OF CONFIGFS to support DTS overlays - enables more FS options - enables A10 hwmon support * tag 'socfpga_defconfig_updates_for_v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga_defconfig: update defconfig for SoCFPGA Signed-off-by: Olof Johansson commit a811b420b6c13759540070c0e9541b7cd8569168 Author: Andy Gross Date: Mon Jan 16 23:24:15 2017 -0600 firmware: qcom_scm: Add set remote state API This patch adds a set remote state SCM API. This will be used by the Venus and GPU subsystems to set state on the remote processors. This work was based on two patch sets by Jordan Crouse and Stanimir Varbanov. Signed-off-by: Andy Gross drivers/firmware/qcom_scm-32.c | 18 ++++++++++++++++++ drivers/firmware/qcom_scm-64.c | 16 ++++++++++++++++ drivers/firmware/qcom_scm.c | 6 ++++++ drivers/firmware/qcom_scm.h | 2 ++ include/linux/qcom_scm.h | 4 +++- 5 files changed, 45 insertions(+), 1 deletion(-) commit 472cef345ca0879ef56ec593db5fb21afc87ed6c Author: Pramod Gurav Date: Wed May 4 14:12:03 2016 +0530 MAINTAINERS: Update the files to include the Qualcomm DMA folder Recently all qcom dma drivers were moved a separate directory. Update the files to include the same Signed-off-by: Pramod Gurav Signed-off-by: Andy Gross MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c5d8ccfec0e5356ca901b7fdf3c2361835e51725 Author: Linus Walleij Date: Thu Jan 12 08:08:55 2017 +0100 bus: qcom_ebi2: default y if ARCH_QCOM Since we want this external bus to be available on multi_v7 builds, set to default ARCH_QCOM so we get it selected whenever QCOM is enabled. Suggested-by: Stephen Boyd Signed-off-by: Linus Walleij Signed-off-by: Andy Gross drivers/bus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b58a2d31f946f09f507f8a9a59a3356e375c6782 Author: Andy Gross Date: Wed Jan 11 16:58:03 2017 -0600 firmware: qcom: scm: Mask APQ8064 core clk dependency This patch masks the core clk requirement for the APQ8064. Until the other peripherals correctly describe their clock dependencies or the bus driver is put in place to handle the RPM dependencies, this bit will remain masked. Signed-off-by: Andy Gross drivers/firmware/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e12799125074c67cd30bc3d7a5ff5e2f29ea1411 Author: Stanimir Varbanov Date: Tue Nov 22 19:03:09 2016 +0200 firmware: qcom: scm: Add empty functions to help compile testing This will help to compile testing drivers which depends on scm functions with COMPILE_TEST Kconfig option. Signed-off-by: Stanimir Varbanov Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross include/linux/qcom_scm.h | 50 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) commit 5b06ba2378e177fdb8f100adda6e55b205308202 Author: Archit Taneja Date: Wed Jan 11 12:22:27 2017 +0530 drm/bridge: adv7511: Initialize regulators Maintain a table of regulator names expected by ADV7511 and ADV7533. Use regulator_bulk_* api to configure these. Initialize and enable the regulators during probe itself. Controlling these dynamically is left for later. Reviewed-by: Laurent Pinchart Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484117547-26417-3-git-send-email-architt@codeaurora.org drivers/gpu/drm/bridge/adv7511/adv7511.h | 4 ++ drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 86 +++++++++++++++++++++++++--- 2 files changed, 81 insertions(+), 9 deletions(-) commit e9a7c0beb2361a44dbdb852f3cff99e08ddbe029 Author: Archit Taneja Date: Wed Jan 11 12:22:26 2017 +0530 dt-bindings: drm/bridge: adv7511: Add regulator bindings Add the regulator supply properties needed by ADV7511 and ADV7533. Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484117547-26417-2-git-send-email-architt@codeaurora.org .../devicetree/bindings/display/bridge/adi,adv7511.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b8128c42313e688bb23ef2b88f752beb28b281fc Merge: a3308d8 a29b623 Author: David S. Miller Date: Mon Jan 16 20:07:29 2017 -0500 Merge branch 'mvneta-xmit_more-bql' Marcin Wojtas says: ==================== mvneta xmit_more and bql support This is a delayed v2 of short patchset, which introduces xmit_more and BQL to mvneta driver. The only one change was added in xmit_more support - condition check preventing excessive descriptors concatenation before flushing in HW. Any comments or feedback would be welcome. Changelog: v1 -> v2: * Add checking condition that ensures too much descriptors are not concatenated before flushing in HW. ==================== Signed-off-by: David S. Miller commit a29b6235560a1ed10c8e1a73bfc616a66b802b90 Author: Marcin Wojtas Date: Mon Jan 16 18:08:32 2017 +0100 net: mvneta: add BQL support Tests showed that when whole bandwidth is consumed, the latency for various kind of traffic can reach high values. With saturated link (e.g. with iperf from target to host) simple ping could take significant amount of time. BQL proved to improve this situation when implemented in mvneta driver. Measurements of ping latency for 3 link speeds: Speed | Latency w/o BQL | Latency with BQL 10 | 7-14 ms | 3.5 ms 100 | 2-12 ms | 0.6 ms 1000 | often timeout | up to 2ms Decreasing latency as above result in sligt performance cost - 4kpps (-1.4%) when pushing 64B packets via two bridged interfaces of Armada 38x. For 1500B packets in the same setup, the mpstat tool showed +8% of CPU occupation (default affinity, second CPU idle). Even though this cost seems reasonable to take, considering other improvements. This commit adds byte queue limit mechanism for the mvneta driver. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 2a90f7e1d5d04e4f1060268e0b55a2c702bbd67a Author: Simon Guinot Date: Mon Jan 16 18:08:31 2017 +0100 net: mvneta: add xmit_more support Basing on xmit_more flag of the skb, TX descriptors can be concatenated before flushing. This commit delay Tx descriptor flush if the queue is running and if there is more skb's to send. A maximum allowed number of descriptors for flushing at once due to MVNETA_TXQ_UPDATE_REG(q) reqisters limitation, is 255. Because of that a new macro was added (MVNETA_TXQ_DEC_SENT_MASK) in order to ensure that concatenated amount of descriptor does not exceed that value. Signed-off-by: Simon Guinot Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 7c6094db591b320332441e5f169156a4255b2180 Author: Sebastian Andrzej Siewior Date: Wed Nov 2 17:30:02 2016 +0100 rcu: update: Make RCU_EXPEDITE_BOOT be the default RCU_EXPEDITE_BOOT should speed up the boot process by enforcing synchronize_rcu_expedited() instead of synchronize_rcu() during the boot process. There should be no reason why one does not want this and there is no need worry about real time latency at this point. Therefore make it default. Note that users wishing to avoid expediting entirely, for example when bringing up new hardware possibly having flaky IPIs, can use the rcu_normal boot parameter to override boot-time expediting. Signed-off-by: Sebastian Andrzej Siewior [ paulmck: Reworded commit log. ] Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett init/Kconfig | 13 ------------- kernel/rcu/update.c | 6 ++---- 2 files changed, 2 insertions(+), 17 deletions(-) commit d04ba0a2cbaa103e3a761201b4bab4a2404f416a Author: kbuild test robot Date: Tue Jan 17 07:47:56 2017 +0800 power: supply: max14656: fix platform_no_drv_owner.cocci warnings drivers/power/supply/max14656_charger_detector.c:317:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Alexander Kurz Signed-off-by: Fengguang Wu Signed-off-by: Sebastian Reichel drivers/power/supply/max14656_charger_detector.c | 1 - 1 file changed, 1 deletion(-) commit 8b2f63ab05eb233b2b396e133889ce3d1d30d944 Author: Paul E. McKenney Date: Wed Nov 2 14:12:05 2016 -0700 rcu: Abstract the dynticks snapshot operation This commit is the second step towards full abstraction of all accesses to the ->dynticks counter, implementing the previously open-coded atomic add of zero in a new rcu_dynticks_snap() function. This abstraction will ease changes o the ->dynticks counter operation. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 19 ++++++++++++++++--- kernel/rcu/tree_exp.h | 6 ++---- 2 files changed, 18 insertions(+), 7 deletions(-) commit e448e2d14905d3d45c07fcac5b6d652283ba55b0 Author: Gustavo A. R. Silva Date: Wed Jan 11 20:45:57 2017 -0600 power: supply: pcf50633-charger: Compress return logic into one line. Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sebastian Reichel drivers/power/supply/pcf50633-charger.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 33237fb8f01e525e2677ca7658bea11545446be8 Author: Gustavo A. R. Silva Date: Wed Jan 11 20:29:35 2017 -0600 power: supply: ab8500_btemp: Compress return logic into one line. Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_btemp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6563de9d6f1336157c9861bcd9864e0b47d65f9d Author: Paul E. McKenney Date: Wed Nov 2 13:33:57 2016 -0700 rcu: Abstract the dynticks momentary-idle operation This commit is the first step towards full abstraction of all accesses to the ->dynticks counter, implementing the previously open-coded atomic add of two in a new rcu_dynticks_momentary_idle() function. This abstraction will ease changes to the ->dynticks counter operation. Note that this commit gets rid of the smp_mb__before_atomic() and the smp_mb__after_atomic() calls that were previously present. The reason that this is OK from a memory-ordering perspective is that the atomic operation is now atomic_add_return(), which, as a value-returning atomic, guarantees full ordering. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/tree.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit c0d21f73ae44fd85102ec684b58d9e4f9e78d485 Merge: 9d60595 0b04087 Author: Sebastian Reichel Date: Mon Jan 16 23:22:53 2017 +0100 Merge branch 'psy-arm-at91-immutable' into psy-next commit 0b0408745e7ff24757cbfd571d69026c0ddb803c Author: Alexandre Belloni Date: Tue Oct 25 11:37:59 2016 +0200 power: reset: at91-poweroff: timely shutdown LPDDR memories LPDDR memories can only handle up to 400 uncontrolled power off. Ensure the proper power off sequence is used before shutting down the platform. Cc: # 4.4+ Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 2 +- drivers/power/reset/at91-poweroff.c | 54 +++++++++++++++++++++++++++++++- drivers/power/reset/at91-sama5d2_shdwc.c | 49 ++++++++++++++++++++++++++++- 3 files changed, 102 insertions(+), 3 deletions(-) commit e3f0a4017c2143b4b813df6a93e8cf79e3f76936 Author: Alexandre Belloni Date: Tue Oct 25 11:37:58 2016 +0200 ARM: at91: define LPDDR types The Atmel MPDDR controller support LPDDR2 and LPDDR3 memories, add their types. Cc: # 4.4+ Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel include/soc/at91/at91sam9_ddrsdr.h | 3 +++ 1 file changed, 3 insertions(+) commit 9d60595a069b1a71b33dabed8053b378c325cb4a Author: Alexander Kurz Date: Wed Oct 19 18:04:49 2016 +0200 power: supply: Add support for MAX14656 USB charger detector The MAX14656 USB charger detector, also known as "AL32" is used to detect the presence and capabilities of attached USB chargers. The device is attached via I2C plus one interrupt line to signalize events. The device can be found in LG smartphones like LS665 and LS770, compatible devices are present in 4th/5th generation Amazon Kindle readers referenced in source code packages as "Maxim AL32". The initial version of this driver has been extracted from LG source code package LGLS665_Android_Lollipop_LS665ZV3, enriched with information from the Kindle_src_4.1.3 source code package and adapted to the current power class sysfs interface. Non-Standard Apple chargers which the device may detect are mapped to the USB Battery Charging Specification Revision 1.2 class USB_DCP. Signed-off-by: Alexander Kurz Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 10 + drivers/power/supply/Makefile | 1 + drivers/power/supply/max14656_charger_detector.c | 326 +++++++++++++++++++++++ 3 files changed, 337 insertions(+) commit 0f36ba6185b13e32c2243e8e6cbd1e82801b5aa5 Author: Alexander Kurz Date: Wed Oct 19 18:04:48 2016 +0200 dt-bindings: power: supply: Add max14656_charger_detector Signed-off-by: Alexander Kurz Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power_supply/maxim,max14656.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 61274eff0ddee8f10deaa5f79085e981db52930a Author: Bird, Tim Date: Mon Oct 17 17:42:51 2016 -0700 power: supply: qcom_smbb: Add otg regulator for control of vbus Add a regulator to control the OTG chargepath switch. This is used by USB code to control VBUS direction - out for host mode on the OTG port, and in for charging mode. Signed-off-by: Tim Bird Acked-by: Bjorn Andersson Reviewed-by: Andy Gross [stephen.boyd@linaro.org: Fix supply name, constify ops, drop machine.h and of_regulator.h includes] Signed-off-by: Stephen Boyd Signed-off-by: Sebastian Reichel drivers/power/supply/qcom_smbb.c | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 3a3e11647315c1238ff9544e6d9c17396d7e48ec Author: Bird, Tim Date: Mon Oct 17 17:42:50 2016 -0700 dt-bindings: power: supply: Add otg regulator binding Add a binding for the regulator which controls the OTG chargepath switch. The OTG switch gets its power from pm8941_5vs1, and that should be expressed as a usb_otg_in-supply property in the DT node for the charger driver. The regulator name is "otg-vbus". Signed-off-by: Tim Bird Acked-by: Bjorn Andersson Reviewed-by: Andy Gross Acked-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/qcom_smbb.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 3ccb76c5dfe0d25c1d0168d5b726d0b43d19a485 Author: John Johansen Date: Mon Jan 16 13:21:27 2017 -0800 apparmor: fix undefined reference to `aa_g_hash_policy' The kernel build bot turned up a bad config combination when CONFIG_SECURITY_APPARMOR is y and CONFIG_SECURITY_APPARMOR_HASH is n, resulting in the build error security/built-in.o: In function `aa_unpack': (.text+0x841e2): undefined reference to `aa_g_hash_policy' Signed-off-by: John Johansen security/apparmor/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3308d8fd1f58c67aaae52d9468791c2082ab2c7 Author: Paul Blakey Date: Mon Jan 16 10:45:13 2017 +0200 net/sched: cls_flower: Disallow duplicate internal elements Flower currently allows having the same filter twice with the same priority. Actions (and statistics update) will always execute on the first inserted rule leaving the second rule unused. This patch disallows that. Signed-off-by: Paul Blakey Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit a50a05f497a2a6e772900ffe93246fb7243d86d8 Author: David Lebrun Date: Sun Jan 15 15:26:16 2017 +0100 ipv6: sr: add missing Kbuild export for header files Add missing IPv6-SR header files in include/uapi/linux/Kbuild. Also, prevent seg6_lwt_headroom() from being exported and add missing linux/types.h include. Signed-off-by: David Lebrun Signed-off-by: David S. Miller include/uapi/linux/Kbuild | 4 ++++ include/uapi/linux/seg6.h | 2 ++ include/uapi/linux/seg6_hmac.h | 1 + include/uapi/linux/seg6_iptunnel.h | 4 ++++ 4 files changed, 11 insertions(+) commit 2d071c643f1cd15a24172de4b5b7ae2adb93abbb Author: Daniel Borkmann Date: Sun Jan 15 01:34:25 2017 +0100 bpf, trace: make ctx access checks more robust Make sure that ctx cannot potentially be accessed oob by asserting explicitly that ctx access size into pt_regs for BPF_PROG_TYPE_KPROBE programs must be within limits. In case some 32bit archs have pt_regs not being a multiple of 8, then BPF_DW access could cause such access. BPF_PROG_TYPE_KPROBE progs don't have a ctx conversion function since there's no extra mapping needed. kprobe_prog_is_valid_access() didn't enforce sizeof(long) as the only allowed access size, since LLVM can generate non BPF_W/BPF_DW access to regs from time to time. For BPF_PROG_TYPE_TRACEPOINT we don't have a ctx conversion either, so add a BUILD_BUG_ON() check to make sure that BPF_DW access will not be a similar issue in future (ctx works on event buffer as opposed to pt_regs there). Fixes: 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 06b35d93af0a5904aa832f58733be84ddbfe2e04 Author: Piotr Luc Date: Tue Jan 10 18:34:02 2017 +0100 x86/cpufeature: Add AVX512_VPOPCNTDQ feature Vector population count instructions for dwords and qwords are going to be available in future Intel Xeon & Xeon Phi processors. Bit 14 of CPUID[level:0x07, ECX] indicates that the instructions are supported by a processor. The specification can be found in the Intel Software Developer Manual (SDM) and in the Instruction Set Extensions Programming Reference (ISE). Populate the feature bit and clear it when xsave is disabled. Signed-off-by: Piotr Luc Reviewed-by: Borislav Petkov Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Cc: Radim Krčmář Link: http://lkml.kernel.org/r/20170110173403.6010-2-piotr.luc@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/fpu/xstate.c | 1 + tools/arch/x86/include/asm/cpufeatures.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 019ec0032e821a7262995af0c81b242dc7e55c9f Author: Mahesh Bandewar Date: Fri Jan 13 15:48:30 2017 -0800 ipvlan: fix dev_id creation corner case. In the last patch da36e13cf65 ("ipvlan: improvise dev_id generation logic in IPvlan") I missed some part of Dave's suggestion and because of that the dev_id creation could fail in a corner case scenario. This would happen when more or less 64k devices have been already created and several have been deleted. If the devices that are still sticking around are the last n bits from the bitmap. So in this scenario even if lower bits are available, the dev_id search is so narrow that it always fails. Fixes: da36e13cf65 ("ipvlan: improvise dev_id generation logic in IPvlan") CC: David Miller CC: Eric Dumazet Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 3 +++ 1 file changed, 3 insertions(+) commit c634700f7eec3c0da46e299cd0a0ae8b594f9b55 Author: Edward Cree Date: Fri Jan 13 21:20:29 2017 +0000 sfc: get PIO buffer size from the NIC The 8000 series SFC NICs have 4K PIO buffers, rather than the 2K of the 7000 series. Rather than having a hard-coded PIO buffer size (ER_DZ_TX_PIOBUF_SIZE), read it from the GET_CAPABILITIES_V2 MCDI response. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 16 ++++++++++------ drivers/net/ethernet/sfc/nic.h | 2 ++ drivers/net/ethernet/sfc/tx.c | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) commit de1deff994286f464d5cad152d97830a5155f9ba Author: Edward Cree Date: Fri Jan 13 21:20:14 2017 +0000 sfc: allow PIO more often If an option descriptor has been sent on a queue but not followed by a packet, there will have been no completion event, so the read and write counts won't match and we'll think we can't do PIO. This combines with the fact that we have two TX queues (for en/disable checksum offload), and that both must be empty for PIO to happen. This patch adds a separate "packet_write_count" that tracks the most recent write_count we expect to see a completion event for; this excludes option descriptors but _includes_ PIO descriptors (even though they look like option descriptors). This is then used, rather than write_count, in efx_nic_tx_is_empty(). We only bother to maintain packet_write_count on EF10, since on Siena (a) there are no option descriptors and it always equals write_count, and (b) there's no PIO, so we don't need it anyway. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 5 +++++ drivers/net/ethernet/sfc/net_driver.h | 9 +++++++++ drivers/net/ethernet/sfc/nic.h | 17 ++++++++++++++--- drivers/net/ethernet/sfc/siena.c | 1 + drivers/net/ethernet/sfc/tx.c | 1 + 5 files changed, 30 insertions(+), 3 deletions(-) commit cdfb1a9f30aaf43cfcecbb6c4061cd3807a4e086 Author: Marcelo Ricardo Leitner Date: Fri Jan 13 18:31:15 2017 -0200 sctp: remove useless code from sctp_apply_peer_addr_params sctp_frag_point() doesn't store anything, and thus just calling it cannot do anything useful. sctp_apply_peer_addr_params is only called by sctp_setsockopt_peer_addr_params. When operating on an asoc, sctp_setsockopt_peer_addr_params will call sctp_apply_peer_addr_params once for the asoc, and then once for each transport this asoc has, meaning that the frag_point will be recomputed when updating the transports and calling it when updating the asoc is not necessary. IOW, no action is needed here and we can remove this call. Signed-off-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 1 - 1 file changed, 1 deletion(-) commit 11d05ac1dfb2e51e21c403f19790bf96809b2714 Author: Marcelo Ricardo Leitner Date: Fri Jan 13 18:27:33 2017 -0200 sctp: remove unused var from sctp_process_asconf Assigned but not used. Signed-off-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 2 -- 1 file changed, 2 deletions(-) commit 57b68ec2a7be9a7e9f8999850f8ee5baa49023e4 Author: Colin Ian King Date: Fri Jan 13 18:48:20 2017 +0000 flow dissector: check if arp_eth is null rather than arp arp is being checked instead of arp_eth to see if the call to __skb_header_pointer failed. Fix this by checking arp_eth is null instead of arp. Also fix to use length hlen rather than hlen - sizeof(_arp); thanks to Eric Dumazet for spotting this latter issue. CoverityScan CID#1396428 ("Logically dead code") on 2nd arp comparison (which should be arp_eth instead). Fixes: commit 55733350e5e8b70c5 ("flow disector: ARP support") Signed-off-by: Colin Ian King Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/flow_dissector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e89df813174d81abee8be8cabc047d69ef78c26d Author: Eric Dumazet Date: Fri Jan 13 09:11:22 2017 -0800 netlink: do not enter direct reclaim from netlink_trim() In commit d35c99ff77ecb ("netlink: do not enter direct reclaim from netlink_dump()") we made sure to not trigger expensive memory reclaim. Problem is that a bit later, netlink_trim() might be called and trigger memory reclaim. netlink_trim() should be best effort, and really as fast as possible. Under memory pressure, it is fine to not trim this skb. Signed-off-by: Eric Dumazet Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/netlink/af_netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3be0679b4a91930ca8d0c8a66b39058a698e70fe Author: Hariprasad Shenai Date: Fri Jan 13 21:55:26 2017 +0530 cxgb4: Shutdown adapter if firmware times out or errors out Perform an emergency shutdown of the adapter and stop it from continuing any further communication on the ports or DMA to the host. This is typically used when the adapter and/or firmware have crashed and we want to prevent any further accidental communication with the rest of the world. This will also force the port Link Status to go down -- if register writes work -- which should help our peers figure out that we're down. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 20 +++++++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 39 +++++++++++++++++++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 8 +++++ 4 files changed, 64 insertions(+), 4 deletions(-) commit 51c89e6a3bf68d544e29b234c2cef6ffb73277a1 Author: Arnd Bergmann Date: Fri Jan 13 14:46:19 2017 +0000 afs: Conditionalise a new unused variable The bulk readpages support introduced a harmless warning: fs/afs/file.c: In function 'afs_readpages_page_done': fs/afs/file.c:270:20: error: unused variable 'vnode' [-Werror=unused-variable] This adds an #ifdef to match the user of that variable. The user of the variable has to be conditional because it accesses a member of a struct that is also conditional. Fixes: 91b467e0a3f5 ("afs: Make afs_readpages() fetch data in bulk") Signed-off-by: Arnd Bergmann Signed-off-by: David Howells Signed-off-by: David S. Miller fs/afs/file.c | 2 ++ 1 file changed, 2 insertions(+) commit be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc Author: Yannick Brosseau Date: Fri Jan 13 13:25:27 2017 -0500 perf script: Also allow forcing reading of non-root owned files by root In 2059fc7a5a9e ("perf symbols: Allow forcing reading of non-root owned files by root") 'perf report' was added the option of forcing reading of non-root owned symbol file. This add the same behavior for perf script. Reported-by: Mark Drayton Signed-off-by: Yannick Brosseau Cc: Namhyung Kim Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/20170113182527.18625-1-scientist@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c64f99b1d030ce52acce53d83141d88f79e6362 Author: Michael Petlan Date: Fri Jan 13 10:06:52 2017 -0500 perf script: Fix man page about --dump-raw-trace option The "--dump-raw-script" is not a valid option, replace it with the valid one, "--dump-raw-trace" Signed-off-by: Michael Petlan Cc: Ingo Molnar Cc: Thomas Gleixner Fixes: 133dc4c39c57 ("perf: Rename 'perf trace' to 'perf script'") LPU-Reference: 728644547.14560155.1484320012612.JavaMail.zimbra@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7ee6595a5acec78963b3de5fbdd537d8aa53b92 Author: Soramichi AKIYAMA Date: Fri Jan 13 21:56:23 2017 +0900 tools lib subcmd: Fix missing member name This patch adds missing member names to struct initializations. Although in C99 for struct S {int x, int y} two init codes struct S s = {.x = (a), (b)} and struct S s = {.x = (a), .y = (b)} are the same, it is better to explicitly write .y (.argh in this patch) for readability and robustness against language/compiler evolutions. Signed-off-by: Soramichi Akiyama Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170113215623.32fb1ac2d862af0048c30fe6@m.soramichi.jp Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/parse-options.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2484c4c58fd1bc0d7711d294c530a1518da6a172 Author: David Carrillo-Cisneros Date: Thu Jan 12 13:01:59 2017 -0800 perf tools: Remove unneccessary feature-dwarf warning Don't warn for feature-dwarf==0 if user explicitily disabled DWARF by using NO_DWARF=1. Signed-off-by: David Carrillo-Cisneros Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170112210159.76143-1-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d02fc6bcd53721cf8588633409157c232f2418e0 Author: Andi Kleen Date: Tue Jan 3 07:08:23 2017 -0800 perf pmu: Factor out scale conversion code Move the scale factor parsing code to an own function to reuse it in an upcoming patch. v2: Return error in case strdup returns NULL. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170103150833.6694-2-andi@firstfloor.org [ Keep returning -ENOMEM when strdup() fails in perf_pmu__parse_scale()/convert_scale() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 62 ++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 28 deletions(-) commit 1fac9c5a6c2ad7096a9521e2c637cf0b28ee597b Author: Ivan Safonov Date: Thu Jan 12 12:16:57 2017 +0300 staging:r8188eu: remove unused rx_head member of struct recv_frame Value of rx_head member of struct recv_frame does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 1 - drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 - 2 files changed, 2 deletions(-) commit ee151399acda1d358f097655c5f0f47a8fb28b95 Author: Ivan Safonov Date: Thu Jan 12 12:16:56 2017 +0300 staging:r8188eu: remove unnecessary trace output in rtw_recv_indicatepkt() Trace output for each received packet in rtw_recv_indicatepkt() is redudant. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/recv_linux.c | 15 --------------- 1 file changed, 15 deletions(-) commit c5771c7ddd117f25b9ef61307a3bbf6a5be37fa8 Author: Ivan Safonov Date: Thu Jan 12 12:16:55 2017 +0300 staging:r8188eu: remove unused struct wifidirect_info and all corresponding code wifidirect_info structure is unused. Big amount of another definitions used only for wifidirect_info definition. Remove all. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_mlme.h | 177 --------------------------- drivers/staging/rtl8188eu/include/wifi.h | 84 ------------- 2 files changed, 261 deletions(-) commit a8ee720f1966210125ec111512e777cfbcb699ef Author: Ivan Safonov Date: Thu Jan 12 12:16:54 2017 +0300 staging:r8188eu: remove unused get_rxmem() get_rxmem() is not unused, remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 8 -------- 1 file changed, 8 deletions(-) commit 09ca478119604624b525f824c4e07fbef0923641 Author: Ivan Safonov Date: Thu Jan 12 12:16:53 2017 +0300 staging:r8188eu: remove unused EOR macro EOR macro is not unused, remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 2 -- 1 file changed, 2 deletions(-) commit 68b754e2cc133c354cb4690cd1ba8a60934b00b4 Author: Ivan Safonov Date: Thu Jan 12 12:16:52 2017 +0300 staging:r8188eu: remove unused WPA_(GET|PUT)_(BE|LE)_xx macro WPA_(GET|PUT)_(BE|LE)_xx macros are unused, remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_security.h | 29 ------------------------ 1 file changed, 29 deletions(-) commit 08efd9e701b7405e0b6d9afc4c7e5e5483caffcd Author: Ivan Safonov Date: Thu Jan 12 12:16:51 2017 +0300 staging:r8188eu: remove unused (GET|PUT)U32 macros (GET|PUT)U32 macros are unused, remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_security.h | 7 ------- 1 file changed, 7 deletions(-) commit 68108516d7a163e6cb444eca3d59113f834a26cf Author: Bogdan Purcareata Date: Fri Jan 13 00:01:56 2017 +0200 staging: android/ion: Use variable names in header Populate header function signatures with variable names as well, not just variable types. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_priv.h | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit d71f1be79569970046287af5bc2cfce9d5ab4c50 Author: Bogdan Purcareata Date: Fri Jan 13 00:01:55 2017 +0200 staging: android/ion: Align comment mark Fix missing space right before multiple line comment closing. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 250c23fc78252844fb35c2a054babbe78de96553 Author: Bogdan Purcareata Date: Fri Jan 13 00:01:54 2017 +0200 staging: android/ion: Don't use return in void function Return statements are superfluous in void functions, and checkpatch complains about them too. Remove offending return. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 1 - 1 file changed, 1 deletion(-) commit 34f973de38d51d5fe264644aced9c33afca7e8a5 Author: Bogdan Purcareata Date: Fri Jan 13 00:01:53 2017 +0200 staging: android/ion: Split function call Fix checkpatch error of line exceeding 80 characters. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d64d22745ad6f11032b8410413923b3cd9de9390 Author: Scott Matheina Date: Wed Jan 11 21:38:38 2017 -0600 staging:wilc1000:wilc_sdio.c Deleted un-needed blank lines Fixes checkpatch CHECK: Blank lines aren't necessary before a close brace '}' Please don't use multiple blank lines Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 3 --- 1 file changed, 3 deletions(-) commit 76889ddfcd9fa2228c28ca8c1b265f3a170a30da Author: Scott Matheina Date: Wed Jan 11 21:38:37 2017 -0600 staging:wilc1000:wilc_sdio.c Aligns code match open parenthesis Fixes checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 351e6c24398f21c93c2202f2752a325ea05fc4b9 Author: Scott Matheina Date: Wed Jan 11 21:38:36 2017 -0600 staging:wilc1000:wilc_debugfs.c Removes multiple blank lines Fixes checkpatch CHECK: Please don't use multiple blank lines Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_debugfs.c | 2 -- 1 file changed, 2 deletions(-) commit c4de5df5479329e92aa4e2f0aaa8b36fc8efef43 Author: Scott Matheina Date: Wed Jan 11 21:38:35 2017 -0600 staging:wilc1000:wilc_debugfs.c Aligns code to match open parenthesis Fixes checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36190caa4fd3db9bb15ee7e1b8c03d5ba4fc2054 Author: Scott Matheina Date: Wed Jan 11 21:38:34 2017 -0600 staging:wilc1000:linux_wlan.c Align code to match open parenthesis Fixes checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a8c48a262274dcfd384eba56e6372d368bc5a62 Author: Scott Matheina Date: Wed Jan 11 21:38:33 2017 -0600 staging:wilc1000:host_interface.c Added braces {} on else statemement Fixes checkpatch warning: braces {} should be used on all arms of this statement Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 045cb1c7b8adfc7ca369c5c66bf961c2c7f80f34 Author: Scott Matheina Date: Wed Jan 11 21:38:32 2017 -0600 staging:wlan-ng:cfg80211.c Aligned code with open parenthesis Fixed Alignment should match open parenthesis checkpatch CHECK. Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 686ef485d5a3ec735b60b35d31133692bfe98223 Author: Shyam Saini Date: Sun Jan 15 18:21:46 2017 +0530 staging: rtl8192e: rtl8192e: Remove NULL test before vfree vfree frees the virtually continuous block of memory beginning at addr. If addr is NULL, no operation is performed. So, NULL test is not needed before vfree. Signed-off-by: Shyam Saini Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 679da8ac44772d70fabf257270a0757efdb1a492 Author: Kartikey Singh Date: Sun Jan 15 17:33:45 2017 +0530 drivers: staging: rtl8188eu: include: wifi: Removed unnecessary defined macros Removed macros not in use. Signed-off-by: Kartikey Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/wifi.h | 17 ----------------- 1 file changed, 17 deletions(-) commit 5fbe4bfc62323fa9db28f933c5f392bf58bb7239 Author: Derek Robson Date: Sun Jan 15 20:16:38 2017 +1300 Drivers: staging: rtl8192e: style fix, octal file permissions Changed file permissions to octal. Found with checkpatch. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cf25326683cad5c347a36e37b422db1fd26a895f Author: Scott Matheina Date: Tue Jan 10 22:34:17 2017 -0600 staging:vt6656:mac.c Aligned to match open parenthesis Fixes checkpatch warning: Alignment should match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e996024f04638dc505f2c4f532af69ff5e8feced Author: Eric Salem Date: Tue Jan 10 22:48:51 2017 -0600 staging: wlan-ng: Fix sparse warnings about endianness Fixed sparse warnings about endianness. E.g.: warning: cast to restricted __le16 Signed-off-by: Eric Salem Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e017006022abfea5d2466cad936065f45763ad1 Author: Arnd Bergmann Date: Wed Jan 11 15:53:08 2017 +0100 staging: rtl: fix possible NULL pointer dereference gcc-7 detects that wlanhdr_to_ethhdr() in two drivers calls memcpy() with a destination argument that an earlier function call may have set to NULL: staging/rtl8188eu/core/rtw_recv.c: In function 'wlanhdr_to_ethhdr': staging/rtl8188eu/core/rtw_recv.c:1318:2: warning: argument 1 null where non-null expected [-Wnonnull] staging/rtl8712/rtl871x_recv.c: In function 'r8712_wlanhdr_to_ethhdr': staging/rtl8712/rtl871x_recv.c:649:2: warning: argument 1 null where non-null expected [-Wnonnull] I'm fixing this by adding a NULL pointer check and returning failure from the function, which is hopefully already handled properly. This seems to date back to when the drivers were originally added, so backporting the fix to stable seems appropriate. There are other related realtek drivers in the kernel, but none of them contain a function with a similar name or produce this warning. Cc: stable@vger.kernel.org Fixes: 1cc18a22b96b ("staging: r8188eu: Add files for new driver - part 5") Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 2 ++ drivers/staging/rtl8712/rtl871x_recv.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 20fecf37b20e206c8d3a24e6df06b41062708e06 Author: Javier Rodriguez Date: Wed Jan 11 22:59:06 2017 +0100 staging: rtl8192u: Removed multiple white lines. Remove one unnecessary white line. Signed-off-by: Javier Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8180_93cx6.h | 1 - 1 file changed, 1 deletion(-) commit a1dbeecdb65a31e24a16b2520d3e646eb9386cae Author: Javier Rodriguez Date: Wed Jan 11 22:59:05 2017 +0100 staging: rtl8192u: Add character '*' in all lines of the block comments. Correct code style error. Add a character in every line of the comment block. Signed-off-by: Javier Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8180_93cx6.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 503ec4bc36f4e5c4a5759134b93440a027309d5d Author: Derek Robson Date: Sun Jan 15 13:53:58 2017 +1300 Staging: media: davinci_vpfe: style fix, using octal file permissions Change file permissions to octal style. Found using checkpatch. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a8936d62c1cf97b44b9ec48d54d90723a461814 Author: David Wittman Date: Sat Jan 14 17:26:07 2017 -0600 staging: ks7010: Fix brace style issue in ks_wlan_net.c This change fixes a checkpatch error for "that open brace { should be on the previous line" as well as a related spacing warning. Signed-off-by: David Wittman Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3331f9cbddacf726dfd25d9d05a6e9aec23a97aa Author: Omri Arad Date: Sat Jan 14 18:58:02 2017 +0200 drivers: staging: rts5208: fix endianness handling 'cb' and 'sgb' were assigned __le values but were not marked as such, this fixes the following sparse warnings: drivers/staging/rts5208/rtsx_transport.c:220:34: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:220:34: expected unsigned int [unsigned] [usertype] drivers/staging/rts5208/rtsx_transport.c:220:34: got restricted __le32 [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:319:44: expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: got restricted __le64 [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:319:44: expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: got restricted __le64 [usertype] Signed-off-by: Omri Arad Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00e293b9efe4d595064b883f1e5a30fa72974662 Author: Philip Thiemann Date: Thu Jan 12 14:00:26 2017 +0100 staging: vme: vme_user.c: fix warning 'line over 80 characters' Removed checkpatch.pl warning 'line over 80 characters' by inserting a linebreak in the comment line 50. Signed-off-by: Philip Thiemann Signed-off-by: Fabian Arnold Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5a10380bfbbfe842b70e7d077d84058877616972 Author: Eric Salem Date: Tue Jan 10 19:38:35 2017 -0600 staging: most: hdm-usb: Fix mismatch between types used in sizeof operator Fixed mismatch between types used in sizeof operator. Signed-off-by: Eric Salem Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d3dfbd1dd34bd373140d43e4bc827c3c480d3a9 Author: Roman Sommer Date: Fri Jan 13 21:54:51 2017 +0100 staging: greybus: fix checkpatch unsigned warnings Fix checkpatch warnings for parameter type unsigned in greybus. Note that this patch does not fix all checkpatch warnings for the affected files. Signed-off-by: Christian Bewermeyer Signed-off-by: Roman Sommer Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 24 ++++++++++++------------ drivers/staging/greybus/loopback.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) commit a1f10771cad204313ed692f1288a0596ff3b553d Author: Abdul Rauf Date: Wed Jan 11 00:55:59 2017 +0000 staging: greybus: fix checkpatch braces not necessary warning Fix the following warnings: braces {} are not necessary for any arm of this statement Signed-off-by: Abdul Rauf Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cbd8733cfd4d3a15b02fe5c8986f35cd75ab66ef Author: Abdul Rauf Date: Wed Jan 11 01:29:36 2017 +0000 staging: greybus: loopback_test: fix checkpatch bad function definition error Fix the following Errors: Bad function definition - void abort() should probably be void abort(void) Signed-off-by: Abdul Rauf Acked-by: Viresh Kumar Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a8d852234b35ddfe6b28769967d538dc39b9517 Author: Derek Robson Date: Thu Jan 12 17:59:40 2017 +1300 Staging: greybus: style fix, permissions as octal Changed permissions to be in octal style. Found by checkpatch. Signed-off-by: Derek Robson Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 565af1cda2d35fa481a732b7405959263f47cc9f Author: Dan Carpenter Date: Sun Jan 15 11:14:07 2017 +0300 staging: lustre: ptlrpc: silence a shift wrapping warning "svcpt->scp_hist_seq" is a u64 so static checkers complain that 1U should be 1ULL. I looked at REQS_SEQ_SHIFT() a little and it seems to be capped by the number of CPUs online and the amount of memory, but I think it could go above 32 possibly. Signed-off-by: Dan Carpenter Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b5b1ac5c0b7e565ea5ef0031439bffedce12ff9 Author: Shyam Saini Date: Mon Jan 16 09:26:21 2017 +0530 sfc: Replace memset with eth_zero_addr Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero which makes the code clearer and also add header file linux/etherdevice.h Signed-off-by: Shyam Saini Acked-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10_sriov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39461ffdfc974147ad0f3cc0da397a999adc25b1 Merge: b0f2d7d 49def18 Author: Greg Kroah-Hartman Date: Mon Jan 16 17:01:44 2017 +0100 Merge 4.10-rc4 into char-misc-next We want the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 11cca3d12f03c670a6dd14004d40580918898760 Merge: a2d6a98 49def18 Author: Greg Kroah-Hartman Date: Mon Jan 16 16:57:54 2017 +0100 Merge 4.10-rc4 into tty-next We want the serial/tty fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit 2eee05020a0e7ee7c04422cbacdb07859e45dce6 Author: Johan Hovold Date: Fri Jan 13 13:21:08 2017 +0100 USB: serial: opticon: fix CTS retrieval at open The opticon driver used a control request at open to trigger a CTS status notification to be sent over the bulk-in pipe. When the driver was converted to using the generic read implementation, an inverted test prevented this request from being sent, something which could lead to TIOCMGET reporting an incorrect CTS state. Reported-by: Dan Carpenter Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read implementation") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39712e8bfa8d3aa6ce1e60fc9d62c9b076c17a30 Author: Johan Hovold Date: Thu Jan 12 14:56:23 2017 +0100 USB: serial: ti_usb_3410_5052: fix control-message error handling Make sure to detect and return an error on zero-length control-message transfers when reading from the device. This addresses a potential failure to detect an empty transmit buffer during close. Also remove a redundant check for short transfer when sending a command. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 1eac5c244f705182d1552a53e2f74e2775ed95d6 Author: Johan Hovold Date: Thu Jan 12 14:56:22 2017 +0100 USB: serial: ssu100: fix control-message error handling Make sure to detect short control-message transfers rather than continue with zero-initialised data when retrieving modem status and during device initialisation. Fixes: 52af95459939 ("USB: add USB serial ssu100 driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ssu100.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 5ed8d41023751bdd3546f2fe4118304357efe8d2 Author: Johan Hovold Date: Thu Jan 12 14:56:21 2017 +0100 USB: serial: spcp8x5: fix modem-status handling Make sure to detect short control transfers and return zero on success when retrieving the modem status. This fixes the TIOCMGET implementation which since e1ed212d8593 ("USB: spcp8x5: add proper modem-status support") has returned TIOCM_LE on successful retrieval, and avoids leaking bits from the stack on short transfers. This also fixes the carrier-detect implementation which since the above mentioned commit unconditionally has returned true. Fixes: e1ed212d8593 ("USB: spcp8x5: add proper modem-status support") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/spcp8x5.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8c34cb8ddfe808d557b51da983ff10c02793beb2 Author: Johan Hovold Date: Thu Jan 12 14:56:20 2017 +0100 USB: serial: quatech2: fix control-message error handling Make sure to detect short control-message transfers when fetching modem and line state in open and when retrieving registers. This specifically makes sure that an errno is returned to user space on errors in TIOCMGET instead of a zero bitmask. Also drop the unused getdevice function which also lacked appropriate error handling. Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/quatech2.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit b5fda434b13de8328c57421e31ac91d401c93b97 Author: Johan Hovold Date: Thu Jan 12 14:56:19 2017 +0100 USB: serial: pl2303: fix line-setting error handling Make sure to return an error on zero-length transfers when retrieving the line settings even if the driver currently ignores the return value. Also remove a redundant check for short transfer when setting the line settings. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/pl2303.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit cd8db057e93ddaacbec025b567490555d2bca280 Author: Johan Hovold Date: Thu Jan 12 14:56:18 2017 +0100 USB: serial: mos7840: fix control-message error handling Make sure to detect short transfers when reading a device register. The modem-status handling had sufficient error checks in place, but move handling of short transfers into the register accessor function itself for consistency. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/mos7840.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 0d130367abf582e7cbf60075c2a7ab53817b1d14 Author: Johan Hovold Date: Thu Jan 12 14:56:17 2017 +0100 USB: serial: mos7720: fix control-message error handling Make sure to log an error on short transfers when reading a device register. Also clear the provided buffer (which if often an uninitialised automatic variable) on errors as the driver currently does not bother to check for errors. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/mos7720.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 36356a669eddb32917fc4b5c2b9b8bf80ede69de Author: Johan Hovold Date: Thu Jan 12 14:56:16 2017 +0100 USB: serial: mct_u232: fix modem-status error handling Make sure to detect short control-message transfers so that errors are logged when reading the modem status at open. Note that while this also avoids initialising the modem status using uninitialised heap data, these bits could not leak to user space as they are currently not used. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/mct_u232.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 750acdd781cf7e97c8c60d2ff5053dd4b12bbc84 Author: Johan Hovold Date: Thu Jan 12 14:56:15 2017 +0100 USB: serial: iuu_phoenix: remove unused buffer from open Remove code that allocated but never used a buffer during open. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/iuu_phoenix.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 3c0e25d883d06a1fbd1ad35257e8abaa57befb37 Author: Johan Hovold Date: Thu Jan 12 14:56:14 2017 +0100 USB: serial: io_edgeport: fix descriptor error handling Make sure to detect short control-message transfers and log an error when reading incomplete manufacturer and boot descriptors. Note that the default all-zero descriptors will now be used after a short transfer is detected instead of partially initialised ones. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit e4457d9798adb96272468e93da663de9bd0a4198 Author: Johan Hovold Date: Thu Jan 12 14:56:13 2017 +0100 USB: serial: io_edgeport: fix epic-descriptor handling Use a dedicated buffer for the DMA transfer and make sure to detect short transfers to avoid parsing a corrupt descriptor. Fixes: 6e8cf7751f9f ("USB: add EPIC support to the io_edgeport driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit e3e574ad85a208cb179f33720bb5f12b453de33c Author: Johan Hovold Date: Thu Jan 12 14:56:12 2017 +0100 USB: serial: ftdi_sio: fix latency-timer error handling Make sure to detect short responses when reading the latency timer to avoid using stale buffer data. Note that no heap data would currently leak through sysfs as ASYNC_LOW_LATENCY is set by default. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 427c3a95e3e29e65f59d99aaf320d7506f3eed57 Author: Johan Hovold Date: Thu Jan 12 14:56:11 2017 +0100 USB: serial: ftdi_sio: fix modem-status error handling Make sure to detect short responses when fetching the modem status in order to avoid parsing uninitialised buffer data and having bits of it leak to user space. Note that we still allow for short 1-byte responses. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b631433b175f1002a31020e09bbfc2e5caecf290 Author: Johan Hovold Date: Thu Jan 12 14:56:10 2017 +0100 USB: serial: ark3116: fix open error handling Fix open error handling which failed to detect errors when reading the MSR and LSR registers, something which could lead to the shadow registers being initialised from errnos. Note that calling the generic close implementation is sufficient in the error paths as the interrupt urb has not yet been submitted and the register updates have not been made. Fixes: f4c1e8d597d1 ("USB: ark3116: Make existing functions 16450-aware and add close and release functions.") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 9fef37d7cf170522fb354d6d0ea6de09b9b16678 Author: Johan Hovold Date: Thu Jan 12 14:56:09 2017 +0100 USB: serial: ark3116: fix register-accessor error handling The current implementation failed to detect short transfers, something which could lead to bits of the uninitialised heap transfer buffer leaking to user space. Fixes: 149fc791a452 ("USB: ark3116: Setup some basic infrastructure for new ark3116 driver.") Fixes: f4c1e8d597d1 ("USB: ark3116: Make existing functions 16450-aware and add close and release functions.") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 8bf793883da213864efc50c274d2b38ec0ca58b2 Author: Pan Bian Date: Thu Dec 1 16:10:42 2016 +0800 drm/amdkfd: fix improper return value on error In function kfd_wait_on_events(), when the call to copy_from_user() fails, the value of return variable ret is 0. 0 indicates success, which is inconsistent with the execution status. This patch fixes the bug by assigning "-EFAULT" to ret when copy_from_user() returns an unexpected value. Signed-off-by: Pan Bian Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5593edfbfa30a049fca9abbd70a834d2888a4d9d Merge: 113ccc3 49def18 Author: Greg Kroah-Hartman Date: Mon Jan 16 15:05:45 2017 +0100 Merge 4.10-rc4 into driver-core-next We want the sysfs file revert and other fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman commit 770e96f30cc2e4a363dd8fae2e9028173b1f2af1 Author: Amelie Delaunay Date: Thu Jan 5 14:43:00 2017 +0100 ARM: configs: stm32: Add RTC support in STM32 defconfig This patch adds STM32 RTC support in stm32_defconfig file. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/configs/stm32_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit d99c66406a846748e26989759caa7e966c1804dd Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32429i-eval This patch enables RTC on stm32429i-eval with default LSE clock source. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit d1b89100fe2e1852e43687592ebf583fd59bbe32 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32f469-disco This patch enables RTC on stm32f469-disco with default LSE clock source. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 4 ++++ 1 file changed, 4 insertions(+) commit e1d27cca79016aaa0ebfe6b6c3a1e73251a21038 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: enable RTC on stm32f429-disco This patch enables RTC on stm32f429-disco with LSI as clock source because X2 crystal for LSE is not fitted by default. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429-disco.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit dd3feb755a4ac28f89913512c1ac1beab470391f Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: Add RTC support for STM32F429 MCU This patch adds STM32 RTC bindings for STM32F429. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8b9f4efd47a9ab75bb988944d5d784abba061224 Author: Amelie Delaunay Date: Mon Jan 16 14:29:00 2017 +0100 ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f429 This patch set HSE_RTC clock frequency to 1 MHz, as the clock supplied to the RTC must be 1 MHz. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 8b169cb27c8267cd344fd71c2067ea864dd4c2e7 Author: Arnd Bergmann Date: Mon Jan 16 14:27:57 2017 +0100 ALSA: mips: avoid potential uninitialized variable use MIPS allmodconfig results in this warning: sound/mips/hal2.c: In function 'hal2_gain_get': sound/mips/hal2.c:224:35: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized] sound/mips/hal2.c:223:35: error: 'l' may be used uninitialized in this function [-Werror=maybe-uninitialized] sound/mips/hal2.c: In function 'hal2_gain_put': sound/mips/hal2.c:260:13: error: 'new' may be used uninitialized in this function [-Werror=maybe-uninitialized] sound/mips/hal2.c:260:13: error: 'old' may be used uninitialized in this function [-Werror=maybe-uninitialized] Returning an error for all unexpected cases shuts up the warning Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/mips/hal2.c | 4 ++++ 1 file changed, 4 insertions(+) commit f131e3562ef0e0aa418eeb60a8fd562c5b9b0122 Author: Chris Wilson Date: Thu Dec 29 14:40:37 2016 +0000 drm/i915: Skip switch to kernel context if already done Some engines are never user or already sitting idle in the kernel context and for those we can skip flushing the current context for i915_gem_switch_to_kernel_context(). We used to perform this optimisation but that was removed for convenience of converting over to multiple timelines and handling the pending request queues. From the perspective of writing selftests, reducing the number of background operations on the engines makes defining assertions easier. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170114162334.10271-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 3 ++- drivers/gpu/drm/i915/i915_gem_context.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit 6ffb7d0756e34427a39f6ffdf861fe93b49fc0e8 Author: Chris Wilson Date: Sat Jan 14 16:23:33 2017 +0000 drm/i915: Construct a request even if the GPU is currently hung As we now have the ability to directly reset the GPU from the waiter (and so do not need to drop the lock in order to let the reset proceed) and also do not lose requests over a reset, we can now simply queue the request to occur after the reset rather than roundtripping to userspace (or worse failing with EIO). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170114162334.10271-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit 9734ad13c2321e8efc1fab4665d40d88e947c560 Author: Chris Wilson Date: Sun Jan 15 17:27:40 2017 +0000 drm/i915: Assert we do not attempt to reuse an allocated node i915_gem_gtt_reserve() and i915_gem_gtt_insert() can only work on unallocated nodes. Check that the callers complies. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170115172740.28995-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit 3fec7ec4450fee2f18fe20088209193999d8ff94 Author: Chris Wilson Date: Sun Jan 15 13:47:46 2017 +0000 drm/i915: Catch attempting to use the aliasing_gtt's drm_mm The aliasing_gtt is just that, an alias of the global GTT. We do not populate it directly, instead we always use the global GTT. Catch any attempt to incorrectly allocate ranges from the aliasing_gtt. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170115134746.29325-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f13f29f2c19d1845698480ea5b7f6c77abb2b8a Author: Chris Wilson Date: Fri Jan 13 21:43:35 2017 +0000 drm/i915: Flush the change in debugobject before reallocation When marking the debugobject as freed, be sure that write is flushed before another CPU may see it on a reallocation path. Only seen once in CI: [ 159.240873] WARNING: CPU: 3 PID: 6735 at lib/debugobjects.c:263 debug_print_object+0x87/0xb0 [ 159.240897] ODEBUG: init destroyed (active state 0) object type: i915_sw_fence hint: submit_notify+0x0/0x4c [i915] [ 159.240902] Modules linked in: snd_hda_intel i915 x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul snd_hda_codec_realtek crc32_pclmul snd_hda_codec_generic snd_hda_codec_hdmi ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm mei_me lpc_ich mei e1000e ptp pps_core [last unloaded: i915] [ 159.240913] CPU: 3 PID: 6735 Comm: gem_exec_nop Tainted: G U 4.10.0-rc3-CI-Trybot_479+ #1 [ 159.240913] Hardware name: LENOVO 10AGS00601/SHARKBAY, BIOS FBKT34AUS 04/24/2013 [ 159.240914] Call Trace: [ 159.240916] dump_stack+0x67/0x92 [ 159.240919] __warn+0xc6/0xe0 [ 159.240920] warn_slowpath_fmt+0x4a/0x50 [ 159.240921] debug_print_object+0x87/0xb0 [ 159.240935] ? __i915_request_wait_for_execute+0x1d0/0x1d0 [i915] [ 159.240936] __debug_object_init+0xb2/0x410 [ 159.240950] ? __i915_request_wait_for_execute+0x1d0/0x1d0 [i915] [ 159.240951] debug_object_init+0x16/0x20 [ 159.240962] __i915_sw_fence_init+0x29/0x60 [i915] [ 159.240975] i915_gem_request_alloc+0x1fb/0x450 [i915] [ 159.240987] i915_gem_do_execbuffer.isra.15+0x798/0x1b20 [i915] [ 159.241000] i915_gem_execbuffer2+0xc0/0x250 [i915] [ 159.241003] drm_ioctl+0x200/0x450 [ 159.241016] ? i915_gem_execbuffer+0x330/0x330 [i915] [ 159.241018] do_vfs_ioctl+0x90/0x6e0 [ 159.241020] ? trace_hardirqs_on_caller+0x122/0x1b0 [ 159.241021] SyS_ioctl+0x3c/0x70 [ 159.241023] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 159.241024] RIP: 0033:0x7f9bc4f41357 [ 159.241025] RSP: 002b:00007ffc6cd5c568 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 159.241026] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9bc4f41357 [ 159.241026] RDX: 00007ffc6cd5c640 RSI: 0000000040406469 RDI: 0000000000000003 [ 159.241027] RBP: 00007ffc6cd5c640 R08: 0000000000047508 R09: 0000000000000001 [ 159.241027] R10: 000b58552d323c3d R11: 0000000000000246 R12: 0000000040406469 [ 159.241028] R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000001 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170113214335.5829-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_sw_fence.c | 1 + 1 file changed, 1 insertion(+) commit a76f73dcd036d53616058aaeaf6986f57061dfa0 Author: Chris Wilson Date: Sat Jan 14 10:51:13 2017 +0000 drm/i915/dp: Silence compiler for missing prototype drivers/gpu/drm/i915/intel_dp.c:3063:6: warning: no previous prototype for ‘intel_dp_get_alpm_status’ [-Wmissing-prototypes] bool intel_dp_get_alpm_status(struct intel_dp *intel_dp) Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170114105113.1231-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dda35931ef2ee74faa535d17368b5a26daad143f Author: Chris Wilson Date: Sat Jan 14 10:51:12 2017 +0000 drm/i915: Use __printf markup to silence compiler drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘i915_error_vprintf’: drivers/gpu/drm/i915/i915_gpu_error.c:137:3: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] len = vsnprintf(NULL, 0, f, tmp); ^~~ drivers/gpu/drm/i915/i915_gpu_error.c:144:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] len = vsnprintf(e->buf + e->bytes, e->size - e->bytes, f, args); ^~~ Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170114105113.1231-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gpu_error.c | 1 + 1 file changed, 1 insertion(+) commit 2c85e0a96126d718faf198ad57624150d4ada5e6 Author: Johan Hovold Date: Tue Jan 10 12:05:41 2017 +0100 USB: serial: kl5kusb105: remove unused termios structure Remove unused termios structure from private data that was left by an earlier purge by commit b1cff285ae8d ("usb serial: Eliminate bogus ioctl code"). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/kl5kusb105.c | 11 ----------- 1 file changed, 11 deletions(-) commit c2a24bb1e4b9e94cce1270a332c659240e1426bc Author: Johan Hovold Date: Tue Jan 10 12:05:40 2017 +0100 USB: serial: kl5kusb105: clean up struct definition Drop redundant packed attribute from the port-settings struct which is already 1-byte aligned. Also replace __u8 with u8 for the field types as this is not a structure we share with user space. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/kl5kusb105.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2d11f28207c2f9c9aac56ac2f8440f7a99a40017 Author: Johan Hovold Date: Tue Jan 10 12:05:39 2017 +0100 USB: serial: kl5kusb105: remove dead code Remove dead and broken code that only served as a reminder to one day implement modem control. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/kl5kusb105.c | 76 +++++------------------------------------ 1 file changed, 8 insertions(+), 68 deletions(-) commit 0546579330f7280f9ab3aa19fae96142decd6926 Author: Johan Hovold Date: Tue Jan 10 12:05:38 2017 +0100 USB: serial: kl5kusb105: make logging less verbose Replace a couple of dev_info with dev_dbg and remove another. Also use the port device for logging, and include a radix prefix when logging the baudrate. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/kl5kusb105.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 726282aa6bbe627b3876afc27f88172e37b1d01d Author: Gilad Ben-Yossef Date: Mon Jan 16 13:17:56 2017 +0200 IPsec: do not ignore crypto err in ah6 input ah6 input processing uses the asynchronous hash crypto API which supplies an error code as part of the operation completion but the error code was being ignored. Treat a crypto API error indication as a verification failure. While a crypto API reported error would almost certainly result in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Steffen Klassert net/ipv6/ah6.c | 3 +++ 1 file changed, 3 insertions(+) commit ebd89a2d0675f1325c2be5b7576fd8cb7e8defd0 Author: Gilad Ben-Yossef Date: Mon Jan 16 13:17:55 2017 +0200 IPsec: do not ignore crypto err in ah4 input ah4 input processing uses the asynchronous hash crypto API which supplies an error code as part of the operation completion but the error code was being ignored. Treat a crypto API error indication as a verification failure. While a crypto API reported error would almost certainly result in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Steffen Klassert net/ipv4/ah4.c | 3 +++ 1 file changed, 3 insertions(+) commit 7c61b0d5e82bfe29b8dda55745afbf65b6ccc901 Author: Johan Hovold Date: Fri Jan 6 19:15:23 2017 +0100 USB: serial: ch341: change initial line-control settings Some CH340 devices appear unable to change the initial LCR settings, so set a sane 8N1 default during probe to enable basic support for such devices. Also drop a redundant LCR read during device initialisation. Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 448b6dc5a964c3eca96260138684de10a0e3d9b9 Author: Johan Hovold Date: Fri Jan 6 19:15:22 2017 +0100 USB: serial: ch341: rename LCR variable in set_termios Rename the line-control-register variable in set_termios to "lcr" and use u8 type to match the shadow register. Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e8024460354cc1b21e29c879338fd5c5021c8e7d Author: Johan Hovold Date: Fri Jan 6 19:15:21 2017 +0100 USB: serial: ch341: rename modem-status register Rename the shadow modem-status register currently named "line_status" to the less confusing "msr". Also rename the helper function used to parse the interrupt data. Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit beea33d4f94bdd816172f5f554cbabd12c16d909 Author: Johan Hovold Date: Fri Jan 6 19:15:20 2017 +0100 USB: serial: ch341: rename shadow modem-control register Rename the shadow modem-control register currently named "line_control" to the less confusing "mcr". Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 91e0efcd4c23d98479a2f44753a53bc3456bba97 Author: Johan Hovold Date: Fri Jan 6 19:15:19 2017 +0100 USB: serial: ch341: clean up control debug messages Clean up the control-transfer debug messages by dropping redundant information and unnecessary casts. Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a0467a967f347842b30739aae636c44980265265 Author: Johan Hovold Date: Fri Jan 6 19:15:17 2017 +0100 USB: serial: ch341: fix modem-status handling The modem-status register was read as part of device configuration at port_probe and then again at open (and reset-resume). During open (and reset-resume) the MSR was read before submitting the interrupt URB, something which could lead to an MSR-change going unnoticed when it races with open (reset-resume). Fix this by dropping the redundant reconfiguration of the port at every open, and only read the MSR after the interrupt URB has been submitted. Fixes: 664d5df92e88 ("USB: usb-serial ch341: support for DTR/RTS/CTS") Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 56e6d90797b4d8300e617a4f7b6ac216cf248041 Author: Sudip Mukherjee Date: Tue Jan 3 21:01:10 2017 +0000 USB: serial: cypress_m8: remove unused variable The variable havedata was only being set but never used afterwards. Signed-off-by: Sudip Mukherjee Signed-off-by: Johan Hovold drivers/usb/serial/cypress_m8.c | 5 ----- 1 file changed, 5 deletions(-) commit a8df2768c2ed38eb7da0f24f50a0e105f0ff7665 Author: Bhumika Goyal Date: Sun Jan 8 16:05:56 2017 +0530 drivers: phy: constify phy_ops structures Declare phy_ops structures as const as they are only passed as an argument to the function devm_phy_create. This argument is of type const struct phy_ops *, so phy_ops structures having this property can be declared as const. Done using Coccinelle: Signed-off-by: Bhumika Goyal Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-bcm-cygnus-pcie.c | 2 +- drivers/phy/phy-hi6220-usb.c | 2 +- drivers/phy/phy-mt65xx-usb3.c | 2 +- drivers/phy/phy-rcar-gen3-usb2.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 66adb88955e9549707a03bbc1f3d640557ee4d9f Author: Chanwoo Choi Date: Fri Dec 30 13:11:29 2016 +0900 phy: sun4i-usb: Replace the deprecated extcon API This patch replaces the deprecated extcon API as following: - extcon_set_cable_state_() -> extcon_set_state_sync() Cc: Kishon Vijay Abraham I Cc: Maxime Ripard Cc: Chen-Yu Tsai Acked-by: Chen-Yu Tsai Signed-off-by: Chanwoo Choi Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6f30a5b8eaa4b4421989ef1e788db30a1f2e142 Author: Chanwoo Choi Date: Fri Dec 30 13:11:28 2016 +0900 phy: rcar-gen3-usb2: Replace the deprecated extcon API This patch replaces the deprecated extcon API as following: - extcon_set_cable_state_() -> extcon_set_state_sync() Signed-off-by: Chanwoo Choi Acked-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rcar-gen3-usb2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 16c403614bcdb1227c217da54e5d6683adaddac8 Author: Icenowy Zheng Date: Tue Jan 3 23:25:31 2017 +0800 phy: sun4i-usb: add support for V3s USB PHY Allwinner V3s come with a USB PHY controller slightly different to other SoCs, with only one PHY. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 1 + drivers/phy/phy-sun4i-usb.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 3445be595b8b01d33d1610eba6f31a4d3e50b494 Author: Baolin Wang Date: Wed Dec 21 16:12:12 2016 +0800 phy: rockchip-inno-usb2: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set According to the documentation, we should set the EXTCON_USB when one SDP charger connector was reported. Signed-off-by: Baolin Wang Reviewed-by: Chanwoo Choi Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-inno-usb2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a47b66da0380dd1ebcf2fbfa5fc41c4b6af8a460 Merge: 1129d27 49def18 Author: Greg Kroah-Hartman Date: Mon Jan 16 11:57:53 2017 +0100 Merge 4.10-rc4 into usb-next We need the USB fixes in here to make merges easier/possible with the other sub-maintainer USB trees. Signed-off-by: Greg Kroah-Hartman commit 2287c63643f0f52d9d5452b9dc4079aec0889fe8 Author: Yazen Ghannam Date: Fri Jan 13 09:52:19 2017 -0600 EDAC, amd64: Save and return err code from probe_one_instance() We should save the return code from probe_one_instance() so that it can be returned from the module init function. Otherwise, we'll be returning the -ENOMEM from above. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1484322741-41884-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cb4ac949ea14416a2d57b7a343bc4b571074e3bd Author: Krzysztof Kozlowski Date: Sat Jan 14 14:36:40 2017 +0200 clk: samsung: Remove Exynos4415 driver (SoC not supported anymore) Support for Exynos4415 is going away because there are no internal nor external users. Since commit 46dcf0ff0de3 ("ARM: dts: exynos: Remove exynos4415.dtsi"), the platform cannot be instantiated so remove also the drivers. Signed-off-by: Krzysztof Kozlowski Acked-by: Kukjin Kim Signed-off-by: Sylwester Nawrocki .../devicetree/bindings/clock/exynos4415-clock.txt | 38 - drivers/clk/samsung/Makefile | 1 - drivers/clk/samsung/clk-exynos4415.c | 1022 -------------------- include/dt-bindings/clock/exynos4415.h | 360 ------- 4 files changed, 1421 deletions(-) commit f5c61277f67f03df334c4486397ecff54968971b Author: Arvind Yadav Date: Mon Jan 16 12:14:52 2017 +0530 EDAC, i82975x: Add ioremap_nocache() error handling If ioremap_nocache() fails, it will return NULL. Which will then cause a NULL-pointer dereference. Handle the returned value properly. Signed-off-by: Arvind Yadav Cc: "Arvind R." Cc: linux-edac Link: http://lkml.kernel.org/r/1484549092-11349-1-git-send-email-arvind.yadav.cs@gmail.com [ Boris: massage commit message and improve error message. ] Signed-off-by: Borislav Petkov drivers/edac/i82975x_edac.c | 4 ++++ 1 file changed, 4 insertions(+) commit e6bfa25deb5096c05a08f01e4d6a436dd331fa88 Author: John Johansen Date: Mon Jan 16 00:43:15 2017 -0800 apparmor: replace remaining BUG_ON() asserts with AA_BUG() AA_BUG() uses WARN and won't break the kernel like BUG_ON(). Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/audit.c | 2 +- security/apparmor/context.c | 4 ++-- security/apparmor/lsm.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 2c17cd3681eab6d5d380dcfd073b5ee8c3440e7e Author: John Johansen Date: Mon Jan 16 00:43:14 2017 -0800 apparmor: fix restricted endian type warnings for policy unpack Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e6e8bf418850d7958311a96ccfb594f2bcc8313e Author: John Johansen Date: Mon Jan 16 00:43:13 2017 -0800 apparmor: fix restricted endian type warnings for dfa unpack Signed-off-by: John Johansen security/apparmor/include/match.h | 6 +++--- security/apparmor/match.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) commit ca4bd5ae0ae4b7afffbd807d923ea76934512a82 Author: John Johansen Date: Mon Jan 16 00:43:11 2017 -0800 apparmor: add check for apparmor enabled in module parameters missing it Signed-off-by: John Johansen security/apparmor/lsm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d4669f0b036efd67ec2e00e0adc8f42214c1bdf8 Author: John Johansen Date: Mon Jan 16 00:43:10 2017 -0800 apparmor: add per cpu work buffers to avoid allocating buffers at every hook Signed-off-by: John Johansen security/apparmor/include/path.h | 53 ++++++++++++++++++++++++++++++++++++++++ security/apparmor/lsm.c | 51 +++++++++++++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 1 deletion(-) commit e3ea1ca59adaefa31935a6f8f06a9168ea0e57d2 Author: Tyler Hicks Date: Wed Mar 16 19:19:10 2016 -0500 apparmor: sysctl to enable unprivileged user ns AppArmor policy loading If this sysctl is set to non-zero and a process with CAP_MAC_ADMIN in the root namespace has created an AppArmor policy namespace, unprivileged processes will be able to change to a profile in the newly created AppArmor policy namespace and, if the profile allows CAP_MAC_ADMIN and appropriate file permissions, will be able to load policy in the respective policy namespace. Signed-off-by: Tyler Hicks Signed-off-by: John Johansen security/apparmor/lsm.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ security/apparmor/policy.c | 1 - 2 files changed, 47 insertions(+), 1 deletion(-) commit e025be0f26d5597b0a2bdfa65145a0171e77b614 Author: William Hua Date: Sun Jan 15 16:49:28 2017 -0800 apparmor: support querying extended trusted helper extra data Allow a profile to carry extra data that can be queried via userspace. This provides a means to store extra data in a profile that a trusted helper can extract and use from live policy. Signed-off-by: William Hua Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 139 +++++++++++++++++++++++++++++++++++++ security/apparmor/include/policy.h | 16 +++++ security/apparmor/lsm.c | 1 + security/apparmor/policy.c | 23 ++++++ security/apparmor/policy_unpack.c | 66 ++++++++++++++++++ 5 files changed, 245 insertions(+) commit 12eb87d50bfe234c3f964e9fb47bbd0135010c13 Author: John Johansen Date: Mon Jan 16 00:43:08 2017 -0800 apparmor: update cap audit to check SECURITY_CAP_NOAUDIT apparmor should be checking the SECURITY_CAP_NOAUDIT constant. Also in complain mode make it so apparmor can elect to log a message, informing of the check. Signed-off-by: John Johansen security/apparmor/capability.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 31f75bfecd9cef7d485b1cda3c6c38cc0b4a5c6c Author: John Johansen Date: Mon Jan 16 00:43:07 2017 -0800 apparmor: make computing policy hashes conditional on kernel parameter Allow turning off the computation of the policy hashes via the apparmor.hash_policy kernel parameter. Signed-off-by: John Johansen security/apparmor/lsm.c | 46 +++++++++++++++++++-------------------- security/apparmor/policy_unpack.c | 15 ++++++++----- 2 files changed, 32 insertions(+), 29 deletions(-) commit aa9a39ad8f60cc73e1bd2f18f0693bba6be8b067 Author: John Johansen Date: Mon Jan 16 00:43:06 2017 -0800 apparmor: convert change_profile to use fqname later to give better control Moving the use of fqname to later allows learning profiles to be based on the fqname request instead of just the hname. It also allows cleaning up some of the name parsing and lookup by allowing the use of the fqlookupn_profile() lib fn. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + security/apparmor/domain.c | 61 ++++++++++++-------------------------- security/apparmor/include/domain.h | 4 +-- security/apparmor/lsm.c | 12 ++++---- security/apparmor/procattr.c | 16 ---------- 5 files changed, 28 insertions(+), 66 deletions(-) commit c3e1e584ad3853b3f13ea4bd0aabd43e6c9b9fda Author: John Johansen Date: Mon Jan 16 00:43:05 2017 -0800 apparmor: fix change_hat debug output Signed-off-by: John Johansen security/apparmor/procattr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5ef50d014c59240c2cac38594377583c4e9ea4fa Author: John Johansen Date: Mon Jan 16 00:43:03 2017 -0800 apparmor: remove unused op parameter from simple_write_to_buffer() Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ef88a7ac55fdd3bf6ac3942b83aa29311b45339b Author: John Johansen Date: Mon Jan 16 00:43:02 2017 -0800 apparmor: change aad apparmor_audit_data macro to a fn macro The aad macro can replace aad strings when it is not intended to. Switch to a fn macro so it is only applied when intended. Also at the same time cleanup audit_data initialization by putting common boiler plate behind a macro, and dropping the gfp_t parameter which will become useless. Signed-off-by: John Johansen security/apparmor/audit.c | 42 ++++++++++++------------ security/apparmor/capability.c | 10 ++---- security/apparmor/domain.c | 13 ++++---- security/apparmor/file.c | 69 +++++++++++++++++++-------------------- security/apparmor/include/audit.h | 43 +++++++++++++++++------- security/apparmor/include/file.h | 2 +- security/apparmor/ipc.c | 18 ++++------ security/apparmor/lib.c | 8 ++--- security/apparmor/lsm.c | 12 +++---- security/apparmor/policy.c | 42 +++++++++++------------- security/apparmor/policy_unpack.c | 38 +++++++++++---------- security/apparmor/resource.c | 19 ++++------- 12 files changed, 155 insertions(+), 161 deletions(-) commit 47f6e5cc7355e4ff2fd7ace919aa9e291077c26b Author: John Johansen Date: Mon Jan 16 00:43:01 2017 -0800 apparmor: change op from int to const char * Having ops be an integer that is an index into an op name table is awkward and brittle. Every op change requires an edit for both the op constant and a string in the table. Instead switch to using const strings directly, eliminating the need for the table that needs to be kept in sync. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 +- security/apparmor/audit.c | 55 +------------------ security/apparmor/domain.c | 4 +- security/apparmor/file.c | 9 ++-- security/apparmor/include/audit.h | 108 ++++++++++++++++++------------------- security/apparmor/include/file.h | 9 ++-- security/apparmor/include/policy.h | 3 +- security/apparmor/lsm.c | 15 +++--- security/apparmor/policy.c | 7 +-- security/apparmor/procattr.c | 4 +- 10 files changed, 84 insertions(+), 134 deletions(-) commit 55a26ebf630b6bf1cb7ddf8882fdc81d58afeaa2 Author: John Johansen Date: Mon Jan 16 00:43:00 2017 -0800 apparmor: rename context abreviation cxt to the more standard ctx Signed-off-by: John Johansen security/apparmor/context.c | 100 ++++++++++++++++++------------------ security/apparmor/domain.c | 42 +++++++-------- security/apparmor/include/context.h | 78 ++++++++++++++-------------- security/apparmor/lsm.c | 72 +++++++++++++------------- security/apparmor/policy.c | 2 +- 5 files changed, 150 insertions(+), 144 deletions(-) commit a20aa95fbe1abb4c6f333a1f55e9fd15b01c7f12 Author: John Johansen Date: Mon Jan 16 00:42:59 2017 -0800 apparmor: fail task profile update if current_cred isn't real_cred Trying to update the task cred while the task current cred is not the real cred will result in an error at the cred layer. Avoid this by failing early and delaying the update. Signed-off-by: John Johansen security/apparmor/context.c | 3 +++ 1 file changed, 3 insertions(+) commit b7fd2c0340eacbee892425e9007647568b7f2a3c Author: John Johansen Date: Mon Jan 16 00:42:58 2017 -0800 apparmor: add per policy ns .load, .replace, .remove interface files Having per policy ns interface files helps with containers restoring policy. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 146 ++++++++++++++++++++++++++++----- security/apparmor/include/apparmorfs.h | 6 ++ 2 files changed, 130 insertions(+), 22 deletions(-) commit 12dd7171d645a6658326ba234e6d4fc57a73bf98 Author: John Johansen Date: Mon Jan 16 00:42:57 2017 -0800 apparmor: pass the subject profile into profile replace/remove This is just setup for new ns specific .load, .replace, .remove interface files. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 5 +++-- security/apparmor/include/policy.h | 7 ++++--- security/apparmor/policy.c | 25 ++++++++++++++----------- 3 files changed, 21 insertions(+), 16 deletions(-) commit 04dc715e24d0820bf8740e1a1135ed61fe162bc8 Author: John Johansen Date: Mon Jan 16 00:42:56 2017 -0800 apparmor: audit policy ns specified in policy load Verify that profiles in a load set specify the same policy ns and audit the name of the policy ns that policy is being loaded for. Signed-off-by: John Johansen security/apparmor/include/policy_unpack.h | 1 + security/apparmor/policy.c | 54 +++++++++++++++++++++++-------- security/apparmor/policy_unpack.c | 46 ++++++++++++++++++++------ 3 files changed, 77 insertions(+), 24 deletions(-) commit 5ac8c355ae0013d82b3a07b49aebeadfce9b6e52 Author: John Johansen Date: Mon Jan 16 00:42:55 2017 -0800 apparmor: allow introspecting the loaded policy pre internal transform Store loaded policy and allow introspecting it through apparmorfs. This has several uses from debugging, policy validation, and policy checkpoint and restore for containers. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 213 ++++++++++++++++++++++++------ security/apparmor/crypto.c | 39 +++++- security/apparmor/include/apparmorfs.h | 5 + security/apparmor/include/crypto.h | 5 + security/apparmor/include/policy.h | 5 +- security/apparmor/include/policy_unpack.h | 27 +++- security/apparmor/policy.c | 14 +- security/apparmor/policy_unpack.c | 28 +++- 8 files changed, 278 insertions(+), 58 deletions(-) commit fc1c9fd10a53a17abb3348adb2ec5d29813a0397 Author: John Johansen Date: Mon Jan 16 00:42:54 2017 -0800 apparmor: add ns name to the audit data for policy loads Signed-off-by: John Johansen security/apparmor/include/audit.h | 1 + security/apparmor/policy.c | 34 ++++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) commit 078c73c63fb2878689da334f112507639c72c14f Author: John Johansen Date: Mon Jan 16 00:42:52 2017 -0800 apparmor: add profile and ns params to aa_may_manage_policy() Policy management will be expanded beyond traditional unconfined root. This will require knowning the profile of the task doing the management and the ns view. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/policy.h | 2 +- security/apparmor/policy.c | 22 ++++++++++------------ 3 files changed, 12 insertions(+), 14 deletions(-) commit fd2a80438d736012129977bec779db093979057e Author: John Johansen Date: Mon Jan 16 00:42:51 2017 -0800 apparmor: add ns being viewed as a param to policy_admin_capable() Prepare for a tighter pairing of user namespaces and apparmor policy namespaces, by making the ns to be viewed available. Signed-off-by: John Johansen security/apparmor/include/policy.h | 2 +- security/apparmor/lsm.c | 12 ++++++------ security/apparmor/policy.c | 12 +++++++++--- 3 files changed, 16 insertions(+), 10 deletions(-) commit 2bd8dbbf22fe9eb2a99273436f815d49ceb23a8f Author: John Johansen Date: Mon Jan 16 00:42:50 2017 -0800 apparmor: add ns being viewed as a param to policy_view_capable() Prepare for a tighter pairing of user namespaces and apparmor policy namespaces, by making the ns to be viewed available and checking that the user namespace level is the same as the policy ns level. This strict pairing will be relaxed once true support of user namespaces lands. Signed-off-by: John Johansen security/apparmor/include/context.h | 6 ++++++ security/apparmor/include/policy.h | 4 +++- security/apparmor/lsm.c | 8 ++++---- security/apparmor/policy.c | 25 ++++++++++++++++++++++--- 4 files changed, 35 insertions(+), 8 deletions(-) commit a535ad57d0e6b959cd79914a1127caade36a9459 Author: Kailang Yang Date: Mon Jan 16 16:59:26 2017 +0800 ALSA: hda/realtek - New codec support of ALC1220 Add support for new codec of ALC1220. It's compatible with ALC882 & co. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 3 +++ 1 file changed, 3 insertions(+) commit a6f233003b1af70132619bca386dfae1862a45e8 Author: John Johansen Date: Mon Jan 16 00:42:49 2017 -0800 apparmor: allow specifying the profile doing the management Signed-off-by: John Johansen security/apparmor/policy.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 3e3e569539864d5812ecb03792dc183ebbf81476 Author: John Johansen Date: Mon Jan 16 00:42:48 2017 -0800 apparmor: allow introspecting the policy namespace name Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit b79473f2de3eb3320e2a145da8a2ea03c7331784 Author: John Johansen Date: Mon Jan 16 00:42:47 2017 -0800 apparmor: Make aa_remove_profile() callable from a different view This is prep work for fs operations being able to remove namespaces. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 3 ++- security/apparmor/include/policy.h | 2 +- security/apparmor/policy.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit ee2351e4b07cb7e3609f8661effe0382fb23646b Author: John Johansen Date: Mon Jan 16 00:42:46 2017 -0800 apparmor: track ns level so it can be used to help in view checks Signed-off-by: John Johansen security/apparmor/policy_ns.c | 1 + 1 file changed, 1 insertion(+) commit a71ada305801e940ff69c2c58489778760e5148b Author: John Johansen Date: Mon Jan 16 00:42:45 2017 -0800 apparmor: add special .null file used to "close" fds at exec Borrow the special null device file from selinux to "close" fds that don't have sufficient permissions at exec time. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 78 +++++++++++++++++++++++++++++++++- security/apparmor/include/apparmorfs.h | 2 + security/apparmor/include/policy_ns.h | 2 + 3 files changed, 81 insertions(+), 1 deletion(-) commit 34c426acb75cc21bdf84685e106db0c1a3565057 Author: John Johansen Date: Mon Jan 16 00:42:43 2017 -0800 apparmor: provide userspace flag indicating binfmt_elf_mmap change Commit 9f834ec18def ("binfmt_elf: switch to new creds when switching to new mm") changed when the creds are installed by the binfmt_elf handler. This affects which creds are used to mmap the executable into the address space. Which can have an affect on apparmor policy. Add a flag to apparmor at /sys/kernel/security/apparmor/features/domain/fix_binfmt_elf_mmap to make it possible to detect this semantic change so that the userspace tools and the regression test suite can correctly deal with the change. BugLink: http://bugs.launchpad.net/bugs/1630069 Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + 1 file changed, 1 insertion(+) commit 11c236b89d7c26d58c55d5613a858600a4d2ab3a Author: John Johansen Date: Mon Jan 16 00:42:42 2017 -0800 apparmor: add a default null dfa Instead of testing whether a given dfa exists in every code path, have a default null dfa that is used when loaded policy doesn't provide a dfa. This will let us get rid of special casing and avoid dereference bugs when special casing is missed. Signed-off-by: John Johansen security/apparmor/include/match.h | 5 +++++ security/apparmor/lsm.c | 7 +++++++ security/apparmor/match.c | 27 +++++++++++++++++++++++++++ security/apparmor/nulldfa.in | 1 + security/apparmor/policy.c | 2 ++ security/apparmor/policy_unpack.c | 6 ++++-- 6 files changed, 46 insertions(+), 2 deletions(-) commit 6604d4c1c1a65d3d1a6a56291d96516d1e9b7041 Author: John Johansen Date: Mon Jan 16 00:42:41 2017 -0800 apparmor: allow policydb to be used as the file dfa Newer policy will combine the file and policydb dfas, allowing for better optimizations. However to support older policy we need to keep the ability to address the "file" dfa separately. So dup the policydb as if it is the file dfa and set the appropriate start state. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 293a4886f93f1d4f01ef2642b81c2509a5376ce5 Author: John Johansen Date: Mon Jan 16 00:42:40 2017 -0800 apparmor: add get_dfa() fn The dfa is currently setup to be shared (has the basis of refcounting) but currently can't be because the count can't be increased. Signed-off-by: John Johansen security/apparmor/include/match.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 474d6b75106229025ab6b7bbabf2f9c246e928e1 Author: John Johansen Date: Mon Jan 16 00:42:39 2017 -0800 apparmor: prepare to support newer versions of policy Newer policy encodes more than just version in the version tag, so add masking to make sure the comparison remains correct. Note: this is fully compatible with older policy as it will never set the bits being masked out. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 10 ++++++++-- security/apparmor/policy_unpack.c | 25 +++++++++++++++++-------- 2 files changed, 25 insertions(+), 10 deletions(-) commit 5ebfb12822656beec5c56b362d44e4db81c8e1eb Author: John Johansen Date: Mon Jan 16 00:42:38 2017 -0800 apparmor: add support for force complain flag to support learning mode Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit abbf8734039fe57c72c999e37bd1c30d8aed1943 Author: John Johansen Date: Mon Jan 16 00:42:37 2017 -0800 apparmor: remove paranoid load switch Policy should always under go a full paranoid verification. Signed-off-by: John Johansen security/apparmor/lsm.c | 5 +++-- security/apparmor/policy_unpack.c | 21 +++++++-------------- 2 files changed, 10 insertions(+), 16 deletions(-) commit 181f7c977680dcd86eb71ad4b37239d2a385c3ad Author: John Johansen Date: Mon Jan 16 00:42:36 2017 -0800 apparmor: name null-XXX profiles after the executable When possible its better to name a learning profile after the missing profile in question. This allows for both more informative names and for profile reuse. Signed-off-by: John Johansen security/apparmor/domain.c | 8 +++--- security/apparmor/include/policy.h | 3 ++- security/apparmor/policy.c | 53 ++++++++++++++++++++++++++++---------- 3 files changed, 47 insertions(+), 17 deletions(-) commit 30b026a8d16bfa15bc24f4cca1604e47ac1a2f64 Author: John Johansen Date: Mon Jan 16 00:42:35 2017 -0800 apparmor: pass gfp_t parameter into profile allocation Signed-off-by: John Johansen security/apparmor/include/policy.h | 2 +- security/apparmor/policy.c | 11 ++++++----- security/apparmor/policy_ns.c | 2 +- security/apparmor/policy_unpack.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) commit 73688d1ed0b8f800f312f7bc9d583463858da861 Author: John Johansen Date: Mon Jan 16 00:42:34 2017 -0800 apparmor: refactor prepare_ns() and make usable from different views prepare_ns() will need to be called from alternate views, and namespaces will need to be created via different interfaces. So refactor and allow specifying the view ns. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 6 ++- security/apparmor/include/policy.h | 3 +- security/apparmor/include/policy_ns.h | 4 +- security/apparmor/policy.c | 6 ++- security/apparmor/policy_ns.c | 98 +++++++++++++++++++++++------------ 5 files changed, 79 insertions(+), 38 deletions(-) commit 5fd1b95fc9b96629d185f5fe3d9342fcff78eb30 Author: John Johansen Date: Mon Jan 16 00:42:32 2017 -0800 apparmor: update policy_destroy to use new debug asserts Signed-off-by: John Johansen security/apparmor/lib.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d102d895713c736fd13e21feaab38b52d8ab32ad Author: John Johansen Date: Mon Jan 16 00:42:31 2017 -0800 apparmor: pass gfp param into aa_policy_init() Signed-off-by: John Johansen security/apparmor/include/lib.h | 2 +- security/apparmor/lib.c | 8 ++++---- security/apparmor/policy.c | 2 +- security/apparmor/policy_ns.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit bbe4a7c8733c925b061dcce2d1af8926cefbe539 Author: John Johansen Date: Mon Jan 16 00:42:30 2017 -0800 apparmor: constify policy name and hname Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/lib.h | 4 ++-- security/apparmor/lib.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 6e474e3063eae9767f219d83cf91d8360f63be0c Author: John Johansen Date: Mon Jan 16 00:42:29 2017 -0800 apparmor: rename hname_tail to basename Rename to the shorter and more familiar shell cmd name Signed-off-by: John Johansen security/apparmor/include/lib.h | 4 ++-- security/apparmor/lib.c | 2 +- security/apparmor/policy.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit efeee83a7060c225fac5ac794e9c11183c267f81 Author: John Johansen Date: Mon Jan 16 00:42:28 2017 -0800 apparmor: rename mediated_filesystem() to path_mediated_fs() Rename to indicate the test is only about whether path mediation is used, not whether other types of mediation might be used. Signed-off-by: John Johansen security/apparmor/include/lib.h | 2 +- security/apparmor/lsm.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 680cd62e910d7b7e3c1fcde6ba67c6ca770c2286 Author: John Johansen Date: Mon Jan 16 00:42:27 2017 -0800 apparmor: add debug assert AA_BUG and Kconfig to control debug info Signed-off-by: John Johansen security/apparmor/Kconfig | 31 +++++++++++++++++++++++++++++-- security/apparmor/include/lib.h | 14 +++++++++++++- security/apparmor/lsm.c | 2 +- 3 files changed, 43 insertions(+), 4 deletions(-) commit 57e36bbd67bd1509f550311b162be78cadfe887b Author: John Johansen Date: Mon Jan 16 00:42:26 2017 -0800 apparmor: add macro for bug asserts to check that a lock is held Signed-off-by: John Johansen security/apparmor/include/lib.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 92b6d8eff55f8dca57ade26e1dde2c3b6acdae02 Author: John Johansen Date: Mon Jan 16 00:42:25 2017 -0800 apparmor: allow ns visibility question to consider subnses Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/policy_ns.h | 4 ++-- security/apparmor/policy_ns.c | 12 +++++++++--- security/apparmor/procattr.c | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) commit 31617ddfdd7764a5046f076247208aa324458069 Author: John Johansen Date: Mon Jan 16 00:42:24 2017 -0800 apparmor: add fn to lookup profiles by fqname Signed-off-by: John Johansen security/apparmor/include/policy.h | 2 ++ security/apparmor/include/policy_ns.h | 10 +++++----- security/apparmor/policy.c | 29 +++++++++++++++++++++++++++++ security/apparmor/policy_ns.c | 4 ++-- 4 files changed, 38 insertions(+), 7 deletions(-) commit 3b0aaf5866bf92a3e47627a02ed5e1be6d7cc110 Author: John Johansen Date: Mon Jan 16 00:42:23 2017 -0800 apparmor: add lib fn to find the "split" for fqnames Signed-off-by: John Johansen security/apparmor/include/lib.h | 2 ++ security/apparmor/lib.c | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit 9a2d40c12d00ead1b1a3ac8383d2d66e35674fdb Author: John Johansen Date: Mon Jan 16 00:42:22 2017 -0800 apparmor: add strn version of aa_find_ns Signed-off-by: John Johansen security/apparmor/include/policy_ns.h | 13 ++++++++++--- security/apparmor/policy_ns.c | 22 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 6 deletions(-) commit 1741e9eb8c15de0ba6598a342c51d0688cb569d2 Author: John Johansen Date: Mon Jan 16 00:42:21 2017 -0800 apparmor: add strn version of lookup_profile fn Signed-off-by: John Johansen security/apparmor/include/policy.h | 2 ++ security/apparmor/policy.c | 36 +++++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) commit 8399588a7f9def9195e577f988ad06f2a0ffb1af Author: John Johansen Date: Mon Jan 16 00:42:19 2017 -0800 apparmor: rename replacedby to proxy Proxy is shorter and a better fit than replaceby, so rename it. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 36 ++++++++++---------- security/apparmor/context.c | 2 +- security/apparmor/include/policy.h | 20 +++++------ security/apparmor/policy.c | 70 +++++++++++++++++++------------------- security/apparmor/policy_ns.c | 2 +- 5 files changed, 65 insertions(+), 65 deletions(-) commit d97d51d253e08e059bba40002407ec3d188feafb Author: John Johansen Date: Mon Jan 16 00:42:18 2017 -0800 apparmor: rename PFLAG_INVALID to PFLAG_STALE Invalid does not convey the meaning of the flag anymore so rename it. Signed-off-by: John Johansen security/apparmor/include/context.h | 2 +- security/apparmor/include/policy.h | 6 +++--- security/apparmor/policy.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 121d4a91e3c12ddfb167edafb9aa64cc5cc3a406 Author: John Johansen Date: Mon Jan 16 00:42:17 2017 -0800 apparmor: rename sid to secid Move to common terminology with other LSMs and kernel infrastucture Signed-off-by: John Johansen security/apparmor/Makefile | 2 +- security/apparmor/include/secid.h | 26 ++++++++++++++++++ security/apparmor/include/sid.h | 26 ------------------ security/apparmor/secid.c | 55 +++++++++++++++++++++++++++++++++++++++ security/apparmor/sid.c | 55 --------------------------------------- 5 files changed, 82 insertions(+), 82 deletions(-) commit 98849dff90e270af3b34889b9e08252544f40b5b Author: John Johansen Date: Mon Jan 16 00:42:16 2017 -0800 apparmor: rename namespace to ns to improve code line lengths Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 49 ++++++++++---------- security/apparmor/domain.c | 24 +++++----- security/apparmor/include/apparmorfs.h | 8 ++-- security/apparmor/include/policy.h | 8 ++-- security/apparmor/include/policy_ns.h | 43 +++++++++--------- security/apparmor/policy.c | 32 ++++++------- security/apparmor/policy_ns.c | 82 +++++++++++++++++----------------- security/apparmor/procattr.c | 4 +- 8 files changed, 122 insertions(+), 128 deletions(-) commit cff281f6861e72f1416927aaa0c10a08bb7b2d3f Author: John Johansen Date: Mon Jan 16 00:42:15 2017 -0800 apparmor: split apparmor policy namespaces code into its own file Policy namespaces will be diverging from profile management and expanding so put it in its own file. Signed-off-by: John Johansen security/apparmor/Makefile | 2 +- security/apparmor/apparmorfs.c | 1 + security/apparmor/audit.c | 1 + security/apparmor/domain.c | 1 + security/apparmor/include/policy.h | 112 +------------ security/apparmor/include/policy_ns.h | 137 ++++++++++++++++ security/apparmor/lsm.c | 1 + security/apparmor/policy.c | 298 ++-------------------------------- security/apparmor/policy_ns.c | 291 +++++++++++++++++++++++++++++++++ security/apparmor/procattr.c | 1 + 10 files changed, 454 insertions(+), 391 deletions(-) commit fe6bb31f590c9cd9c8d3ddbdfd4301f72db91718 Author: John Johansen Date: Mon Jan 16 00:42:14 2017 -0800 apparmor: split out shared policy_XXX fns to lib Signed-off-by: John Johansen security/apparmor/include/lib.h | 81 ++++++++++++++++++++++++ security/apparmor/include/policy.h | 13 ---- security/apparmor/lib.c | 52 ++++++++++++++++ security/apparmor/policy.c | 123 ++----------------------------------- 4 files changed, 137 insertions(+), 132 deletions(-) commit 12557dcba21b015f470076da6947e68bc70fff64 Author: John Johansen Date: Mon Jan 16 00:42:13 2017 -0800 apparmor: move lib definitions into separate lib include Signed-off-by: John Johansen security/apparmor/include/apparmor.h | 82 +------------------------------ security/apparmor/include/lib.h | 94 ++++++++++++++++++++++++++++++++++++ security/apparmor/include/policy.h | 1 + security/apparmor/lib.c | 2 +- security/apparmor/match.c | 2 +- 5 files changed, 99 insertions(+), 82 deletions(-) commit 3819a35fdb8f82428c2b5190f195c4e0b8c427bf Author: Florian Westphal Date: Fri Jan 13 14:55:14 2017 +0100 xfrm: fix possible null deref in xfrm_init_tempstate Dan reports following smatch warning: net/xfrm/xfrm_state.c:659 error: we previously assumed 'afinfo' could be null (see line 651) 649 struct xfrm_state_afinfo *afinfo = xfrm_state_afinfo_get_rcu(family); 651 if (afinfo) ... 658 } 659 afinfo->init_temprop(x, tmpl, daddr, saddr); I am resonably sure afinfo cannot be NULL here. xfrm_state4.c and state6.c are both part of ipv4/ipv6 (depends on CONFIG_XFRM, a boolean) but even if ipv6 is a module state6.c can't be removed (ipv6 lacks module_exit so it cannot be removed). The only callers for xfrm6_fini that leads to state backend unregister are error unwinding paths that can be called during ipv6 init function. So after ipv6 module is loaded successfully the state backend cannot go away anymore. The family value from policy lookup path is taken from dst_entry, so that should always be AF_INET(6). However, since this silences the warning and avoids readers of this code wondering about possible null deref it seems preferrable to be defensive and just add the old check back. Fixes: 711059b9752ad0 ("xfrm: add and use xfrm_state_afinfo_get_rcu") Reported-by: Dan Carpenter Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9437964885f84cd0c584e2d30ffbf7a5a84b77e4 Author: Daniel Borkmann Date: Sat Jan 14 01:48:24 2017 +0100 s390/bpf: remove redundant check for non-null image After we already allocated the jit.prg_buf image via bpf_jit_binary_alloc() and filled it out with instructions, jit.prg_buf cannot be NULL anymore. Thus, remove the unnecessary check. Tested on s390x with test_bpf module. Signed-off-by: Daniel Borkmann Cc: Michael Holzheu Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/net/bpf_jit_comp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 21665912dd722656dfc4481f82c73397c8f2d07f Author: Sebastian Ott Date: Thu Jan 12 18:53:56 2017 +0100 s390/cio: remove cmf related code relevant for 31 bit only This is a leftover from the 31 bit era to avoid 64 bit divisions. Get rid of it. Reported-by: Heiko Carstens Signed-off-by: Sebastian Ott Acked-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 89175cf766869307c4f57a7a5f63d2819e76c41b Author: Heiko Carstens Date: Wed Jan 11 09:14:52 2017 +0100 s390: provide sclp based boot console Use the early sclp code to provide a boot console. This boot console is available if the kernel parameter "earlyprintk" has been specified, just like it works for other architectures that also provide an early boot console. This makes debugging of early problems much easier, since now we finally have working console output even before memory detection is running. The boot console will be automatically disabled as soon as another console will be registered. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Documentation/admin-guide/kernel-parameters.txt | 5 +++- arch/s390/Kconfig.debug | 4 +++ arch/s390/include/asm/sclp.h | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/early_printk.c | 35 +++++++++++++++++++++++++ arch/s390/kernel/sclp.c | 25 +++++++++++------- 6 files changed, 61 insertions(+), 11 deletions(-) commit f0319748599183fa71a1e8792317385313ed946b Author: Heiko Carstens Date: Wed Jan 11 11:07:39 2017 +0100 s390/sclp: always stay within bounds of the early sccb Make sure the _sclp_print_lm function stays within bounds of the early sccb, even if the passed string is very long. If the string is too long, the remaining characters will be dropped. Suggested-by: Peter Oberparleiter Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/sclp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 742dc5773cf5bbb355e4b4dd61310d5f51556477 Author: Heiko Carstens Date: Wed Jan 11 09:14:45 2017 +0100 s390/sclp: make early sclp irq handler more robust Make the early sclp interrupt handler more robust: - disable all interrupt sub classes except for the service signal subclass - extend ctlreg0 union so it is easily possible to set the service signal subclass mask bit without using a magic number - disable lowcore protection before writing to it - make sure that all write accesses are done before the original content of control register 0 is restored, which could enable lowcore protection Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ctl_reg.h | 4 +++- arch/s390/kernel/sclp.c | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) commit 68cc795d1933285705ced6d841ef66c00ce98cbe Author: Heiko Carstens Date: Thu Dec 29 13:52:52 2016 +0100 s390/topology: make "topology=off" parameter work The "topology=off" kernel parameter is supposed to prevent the kernel to use hardware topology information to generate scheduling domains etc. For an unknown reason I implemented this in a very odd way back then: instead of simply clearing the MACHINE_HAS_TOPOLOGY flag within the lowcore I added a second variable which indicated that topology information should not be used. This is more than suboptimal since it partially doesn't work. For the fake NUMA case topology information is still considered and scheduling domains will be created based on this. To fix this and to simplify the code get rid of the extra variable and implement the "topology=off" case like it is done for other features. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 12 ++++++++++++ arch/s390/kernel/topology.c | 11 ++--------- 2 files changed, 14 insertions(+), 9 deletions(-) commit 970ba6ac6a59ff1f1579e472a97765adc50186f9 Author: Heiko Carstens Date: Mon Jan 2 09:59:40 2017 +0100 s390: use false/true when using bool Yet another trivial patch to reduce the noise that coccinelle generates. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/processor.c | 2 +- arch/s390/kernel/time.c | 2 +- drivers/s390/char/con3270.c | 2 +- drivers/s390/char/raw3270.c | 2 +- drivers/s390/crypto/zcrypt_api.c | 4 ++-- drivers/s390/virtio/virtio_ccw.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit 0b92515916799ca2711c7c46abccb96c275cc88a Author: Heiko Carstens Date: Mon Jan 2 08:51:02 2017 +0100 s390: remove couple of unneeded semicolons Remove a couple of unneeded semicolons. This is just to reduce the noise that the coccinelle static code checker generates. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/uaccess.h | 4 ++-- arch/s390/kernel/perf_cpum_cf_events.c | 2 +- arch/s390/kvm/priv.c | 2 +- arch/s390/kvm/vsie.c | 2 +- arch/s390/mm/extmem.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 496e59cc48e8bb4e612ecde507d8249abdc9e6e5 Author: Heiko Carstens Date: Mon Jan 2 08:15:07 2017 +0100 s390/topology: reduce number of printks Merge the seven printks within topology_init_early to a single one. With an early boot console this avoids printing six lines each containing only a single character. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/topology.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 00de54c803d5526a791112e653614656365c5578 Author: Heiko Carstens Date: Tue Dec 27 15:36:34 2016 +0100 s390/mem_detect: fix memory type of first block Fix a long-standing but currently irrelevant bug: the memory detection code performs a tprot instruction on address zero to figure out if the first memory chunk is readable or writable. Due to low address protection the result is "read-only". If the memory detection code would actually care, it would have to ignore the first memory increment, but it adds the memory increment to writable memory anyway. If memblock debugging is enabled this leads to an extra rather surprising call which registers memory. To avoid this get rid of the first misleading tprot call and simply assume that the first memory increment is writable. Otherwise we wouldn't have reached the memory detection code anyway. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/mem_detect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2ce2a956814b52c062d17422ebbf87ce4f0158d Author: Heiko Carstens Date: Tue Dec 27 15:14:26 2016 +0100 s390/mem_detect: add debugging output The s390 specific memory detection code does not call memblock_add, which would generate debug output if memblock=debug is specified on the kernel command line. Instead it directly calls memblock_add_range, which doesn't generate any debug output. To have a chance to debug early memblock related bugs add an s390 specific memblock_dbg call and a (missing) memblock_dump_all call. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/mem_detect.c | 3 +++ 1 file changed, 3 insertions(+) commit 7be5e359a7eaea6ebe761044f6994163f0dd8585 Author: Heiko Carstens Date: Tue Dec 27 14:47:42 2016 +0100 s390/setup: call memblock_reserve only for size > 0 reserve_initrd currently calls memblock_reserve even if the to be reserved size is zero. Even though the memblock core code can handle this correctly, it still yields confusing debug messages if memblock debugging is enabled. Therefore make sure to not call memblock_reserve with a size of zero. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) commit 5064cd35062be01cba4b3fa895bdbeb8a9759213 Author: Sebastian Ott Date: Sat Dec 17 15:35:39 2016 +0100 s390/pci: use proper endianness annotations Add proper annotation to the bar definition and use casts within the bus accessors. Also change the sequence in the accessors to do the shifts in the native byte order. No functional change. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_clp.h | 2 +- arch/s390/pci/pci.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 90b3baa232ea6938ab707e3db2e90609494e6c54 Author: Heiko Carstens Date: Tue Dec 20 16:08:05 2016 +0100 s390: proper type casts for csum_partial invocations Keep sparse and other static code checkers from emitting warnings like: arch/s390/kernel/ipl.c:1549:14: warning: incorrect type in assignment (different base types) arch/s390/kernel/ipl.c:1549:14: expected unsigned int [unsigned] csum arch/s390/kernel/ipl.c:1549:14: got restricted __wsum All usages in s390 code are ok. Therefore add proper casts. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 3 ++- arch/s390/kernel/os_info.c | 6 +++--- drivers/s390/char/zcore.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit dd695546603e8f984137d4dc806dd12e19b6bc27 Author: Corentin Labbe Date: Thu Dec 15 15:18:23 2016 +0100 s390/zcore: remove unneeded linux/miscdevice.h include drivers/s390/char/zcore.c does not contain any miscdevice so the inclusion of linux/miscdevice.h is uncessary. Signed-off-by: Corentin Labbe Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/zcore.c | 1 - 1 file changed, 1 deletion(-) commit 00851e6925a827362e3b84ead0c0cf3e86a31aec Author: Sebastian Ott Date: Tue Nov 8 17:50:40 2016 +0100 s390/cio: remove unused struct member Remove an unused member of struct channel subsystem. Signed-off-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/css.c | 1 - drivers/s390/cio/css.h | 1 - 2 files changed, 2 deletions(-) commit 64dfdd4b539f0d2e552e8b83aab119c8eafbbc83 Author: Sebastian Ott Date: Tue Oct 11 18:21:36 2016 +0200 s390/cio: export real cssid Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/css.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 15a2044d7f3c1ee16de92a45f035f3abbe1bb885 Author: Sebastian Ott Date: Tue Oct 25 14:05:08 2016 +0200 s390/cio: css initialization cleanup Simplify error handling during css initialization by moving the error handling code to setup_css (which now cleans up after itself). Also remove the odd special cleanup handling of the pseudo_subchannel. Signed-off-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/css.c | 103 ++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 56 deletions(-) commit 6c7012688bdc8c9349dc8f289d2da2dacba3928d Author: Sebastian Ott Date: Tue Oct 11 16:37:43 2016 +0200 s390/cio: css attribute cleanup Cleanup the code to handle the css device attribute. Move everything to an attribute group to let the driver core handle attribute creation and removal. Signed-off-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/css.c | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit e2e0de9b579d4772c2b86e6c9517723ad1e2b22a Author: Sebastian Ott Date: Fri Jun 17 19:45:23 2016 +0200 s390/cio: use cssid for pgid generation Obtain the real channel subsystem id and use that for the generation of a unique path group id. Note that this change does not affect the channel subsystem id as used in the user-visible naming of subchannels and friends. Signed-off-by: Sebastian Ott Reviewed-by: Dong Jia Shi Reviewed-by: Peter Oberparleiter Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/chsc.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/s390/cio/chsc.h | 2 ++ drivers/s390/cio/css.c | 6 ++++-- drivers/s390/cio/css.h | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) commit 98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5 Author: Sebastian Ott Date: Tue Nov 8 14:28:03 2016 +0100 s390/cio: clarify cssid usage Currently the cssid in various structures is used as the id of the respective channel subsystem. Sometimes however we call the index in the channel_subsystems array cssid. In some places the id is even used as the index. Provide a new define MAX_CSS_IDX and use it where appropriate. In addition to that provide a dummy function to find a channel subsystem by its id and a macro to iterate over the channel subsystems. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 13 +++++++------ drivers/s390/cio/chp.h | 2 +- drivers/s390/cio/css.c | 30 +++++++++++------------------- drivers/s390/cio/css.h | 10 ++++++++++ 4 files changed, 29 insertions(+), 26 deletions(-) commit 57c52ae75774c717eb7cd777b5438244ae6b380c Author: Heiko Carstens Date: Thu Dec 15 12:15:17 2016 +0100 s390/zcrypt: get rid of variable length arrays The variable length arrays used to specify clobbered memory within ap_nqap and ap_dqap would only work if the length would be known at compile time. This is not the case for both usages. Therefore simply use a full memory clobber and get rid of the old construct. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_asm.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 227374b1dd08cc052f36768a97a6e3ce628318fc Author: Heiko Carstens Date: Thu Dec 15 11:28:52 2016 +0100 s390/zcrypt: make structures static Get rid of these: drivers/s390/crypto/ap_card.c:140:20: warning: symbol 'ap_card_type' was not declared. Should it be static? drivers/s390/crypto/ap_queue.c:567:20: warning: symbol 'ap_queue_type' was not declared. Should it be static? Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_card.c | 2 +- drivers/s390/crypto/ap_queue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9fbd5a0931ed879f9f0a9768086da90aed6328e8 Author: Heiko Carstens Date: Thu Dec 15 11:05:13 2016 +0100 s390/cio: get rid of variable length array Use a flexible array instead. The size of the structure is not used within chsc_sstpi, therefore no change in semantics but one less sparse warning: drivers/s390/cio/chsc.c:1219:27: warning: Variable length array is used. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/cio/chsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 551f413434737a2a570af4555b4139898568ed57 Author: Heiko Carstens Date: Thu Dec 15 08:35:10 2016 +0100 s390/lib: improve memmove, memset and memcpy Improve the memmove implementation to save one instruction and use better label names. Also use better label names for the memset and memcpy implementations so everything looks consistent. Suggested-by: Jens Remus Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/lib/mem.S | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit e3850ecfc17ea8e23c02368a24fc23be129fb3b0 Author: Heiko Carstens Date: Wed Dec 14 13:45:07 2016 +0100 s390/cpumf: get rid of variable length array The stcctm5 inline assembly uses a variable length array to specify the memory that is written to. According to the gcc manual this trick only works if the length is known at compile time. This is not the the case for the stccm5 inline assembly. Therefore simply use a full memory clobber. As requested by Martin also move the output Q constraint operand to the input operands list, since all we want is that the compiler generates an instruction that may use the displacement field: in other words we only need the address of *val. That the inline assembly actually writes to an array starting at val is taken care of with the memory clobber. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8486adf0d755062611968ecc1632a13ebce71660 Author: Kees Cook Date: Fri Dec 16 17:04:13 2016 -0800 apparmor: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: John Johansen security/apparmor/file.c | 4 ++-- security/apparmor/lsm.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit dbeaa8c2a4bad2295b2383a79a9749e3638ccf01 Author: Dan Carpenter Date: Thu Jan 12 21:46:32 2017 +0300 stmmac: indent an if statement The break statement should be indented one more tab. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ecf9284c14614f9854dfa4c66f70d17c21182d1 Author: jpinto Date: Thu Jan 12 09:56:18 2017 +0000 synopsys: remove dwc_eth_qos driver This driver is no longer necessary since it was merged into stmmac. Acked-by: Lars Persson Signed-off-by: Joao Pinto Signed-off-by: David S. Miller MAINTAINERS | 7 - arch/arm/configs/multi_v7_defconfig | 3 +- drivers/net/ethernet/Kconfig | 1 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/synopsys/Kconfig | 27 - drivers/net/ethernet/synopsys/Makefile | 5 - drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2996 --------------------------- 7 files changed, 2 insertions(+), 3038 deletions(-) commit bfc2cf6f61fceac42235345081eb713329baa2a2 Author: Tejun Heo Date: Sun Jan 15 19:03:41 2017 -0500 cgroup: call subsys->*attach() only for subsystems which are actually affected by migration Currently, subsys->*attach() callbacks are called for all subsystems which are attached to the hierarchy on which the migration is taking place. With cgroup_migrate_prepare_dst() filtering out identity migrations, v1 hierarchies can avoid spurious ->*attach() callback invocations where the source and destination csses are identical; however, this isn't enough on v2 as only a subset of the attached controllers can be affected on controller enable/disable. While spurious ->*attach() invocations aren't critically broken, they're unnecessary overhead and can lead to temporary overcharges on certain controllers. Fix it by tracking which subsystems are affected by a migration and invoking ->*attach() callbacks only on those subsystems. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup/cgroup-internal.h | 5 ++++- kernel/cgroup/cgroup-v1.c | 2 +- kernel/cgroup/cgroup.c | 25 ++++++++++++++----------- 3 files changed, 19 insertions(+), 13 deletions(-) commit e595cd706982bff0211e6fafe5a108421e747fbc Author: Tejun Heo Date: Sun Jan 15 19:03:41 2017 -0500 cgroup: track migration context in cgroup_mgctx cgroup migration is performed in four steps - css_set preloading, addition of target tasks, actual migration, and clean up. A list named preloaded_csets is used to track the preloading. This is a bit too restricted and the code is already depending on the subtlety that all source css_sets appear before destination ones. Let's create struct cgroup_mgctx which keeps track of everything during migration. Currently, it has separate preload lists for source and destination csets and also embeds cgroup_taskset which is used during the actual migration. This moves struct cgroup_taskset definition to cgroup-internal.h. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup/cgroup-internal.h | 66 ++++++++++++++++-- kernel/cgroup/cgroup-v1.c | 10 +-- kernel/cgroup/cgroup.c | 144 ++++++++++++++++------------------------ 3 files changed, 122 insertions(+), 98 deletions(-) commit d8ebf5191d7fdf81ba34a7c3d726b99c34918030 Author: Tejun Heo Date: Sun Jan 15 19:03:40 2017 -0500 cgroup: cosmetic update to cgroup_taskset_add() cgroup_taskset_add() was using list_add_tail() when for source csets but list_move_tail() for destination. As the operations are gated by list_empty() test, list_move_tail() is equivalent to list_add_tail() here. Use list_add_tail() too for destination csets too. This doesn't cause any functional changes. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7969f5976a35b48ba4eb60aaad73535f1792019 Author: Arnd Bergmann Date: Wed Jan 11 14:36:16 2017 +0100 ahci: imx: fix building without hwmon or thermal When CONFIG_HWMON is disabled, we now get a link failure: ERROR: "devm_hwmon_device_register_with_groups" [drivers/ata/ahci_imx.ko] undefined! drivers/ata/ahci_imx.o: In function `imx_ahci_probe': ahci_imx.c:(.text.imx_ahci_probe+0x304): undefined reference to `devm_thermal_zone_of_sensor_register' This makes the code calling into the hwmon subsystem compile-time conditional, and adds a Kconfig dependency to avoid the corner case of having HWMON=m and AHCI_IMX=y, by forcing AHCI_IMX=m in this case. The thermal subsystem already has a check in its header, but that also doesn't cover the THERMAL=m case, so we need a somewhat complex Kconfig expression to handle all cases. Fixes: 54643a83b41a ("ahci: imx: Add imx53 SATA temperature sensor support") Signed-off-by: Arnd Bergmann Acked-by: Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/Kconfig | 1 + drivers/ata/ahci_imx.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 630a7fa0480bec63e0a300b8485642630340efcf Author: Lucas Stach Date: Sun Jan 15 15:23:05 2017 -0800 Input: synaptics-rmi4 - correctly swap clip values if axes are swapped The clip values need the same swapping as the maximum values if the sensor axes are swapped. Signed-off-by: Lucas Stach Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_2d_sensor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 13e360ac97e2a6386f9e26e02e20bce4b6e83415 Author: Nicholas Mc Guire Date: Sun Jan 15 15:19:27 2017 -0800 Input: cyapa - use msleep() for long delay ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 50ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Signed-off-by: Nicholas Mc Guire Signed-off-by: Dmitry Torokhov drivers/input/mouse/cyapa_gen3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd4c1b412d4dd094c2ec02be4f0ee41bcc386170 Author: Nicholas Mc Guire Date: Sun Jan 15 15:18:03 2017 -0800 Input: cyapa - use time based retry loop Using counter based retry loops for peripherals results in the delay being significantly overrun during high-load situations where delay functions tend to be vary imprecise and overrun there timeouts. So condition the termination on the actual condition of 2s for the re-calibration to have been successful. As this is a very long delay there is no advantage in using high-resolution timers thus switching this to msleep(). Signed-off-by: Nicholas Mc Guire Signed-off-by: Dmitry Torokhov drivers/input/mouse/cyapa_gen3.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit de901cc31d151c4c855346c29fb61eaf5ffac3ad Author: Akinobu Mita Date: Sun Jan 15 14:51:12 2017 -0800 Input: mpr121 - switch to device tree probe This driver currently only supports legacy platform data probe. This change adds device tree support and gets rid of platform data probe code since no one is actually using mpr121 platform data in the mainline. The device tree property parsing code is based on the work of atmel_captouch driver. Signed-off-by: Akinobu Mita Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/mpr121-touchkey.txt | 30 +++++ drivers/input/keyboard/mpr121_touchkey.c | 137 ++++++++++++++------- include/linux/i2c/mpr121_touchkey.h | 20 --- 3 files changed, 124 insertions(+), 63 deletions(-) commit 08fea55e37f58371bffc5336a59e55d1f155955a Author: Akinobu Mita Date: Sun Jan 15 14:44:30 2017 -0800 Input: mpr121 - handle multiple bits change of status register This driver reports input events on their interrupts which are triggered by the sensor's status register changes. But only single bit change is reported in the interrupt handler. So if there are multiple bits are changed at almost the same time, other press or release events are ignored. This fixes it by detecting all changed bits in the status register. Signed-off-by: Akinobu Mita Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 9723ddc8fe0d76ce41fe0dc16afb241ec7d0a29d Author: Akinobu Mita Date: Sun Jan 15 14:44:05 2017 -0800 Input: mpr121 - set missing event capability This driver reports misc scan input events on the sensor's status register changes. But the event capability for them was not set in the device initialization, so these events were ignored. This change adds the missing event capability. Signed-off-by: Akinobu Mita Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 1 + 1 file changed, 1 insertion(+) commit a4b1aeb72662c2a35740bdf2b7e2e19593dd5d48 Author: Akinobu Mita Date: Sun Jan 15 14:43:40 2017 -0800 Input: mpr121 - remove unused field in struct mpr121_touchkey Remove unused key_val field in struct mpr121_touchkey. Signed-off-by: Akinobu Mita Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 1 - 1 file changed, 1 deletion(-) commit 890fa16762c7b43677228014387a817380e6114d Author: Akinobu Mita Date: Sun Jan 15 14:43:15 2017 -0800 Input: mpr121 - annotate PM methods as __maybe_unused Instead of using #ifdef, let's mark suspend and resume methods as __maybe_unused to provide better compile coverage. Suggested-by: Dmitry Torokhov Signed-off-by: Akinobu Mita Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a7f6c1b63b863d29f126d9b163ad5b40008544b2 Author: Tetsuo Handa Date: Mon Nov 14 20:11:52 2016 +0900 AppArmor: Use GFP_KERNEL for __aa_kvmalloc(). Calling kmalloc(GFP_NOIO) with order == PAGE_ALLOC_COSTLY_ORDER is not recommended because it might fall into infinite retry loop without invoking the OOM killer. Since aa_dfa_unpack() is the only caller of kvzalloc() and aa_dfa_unpack() which is calling kvzalloc() via unpack_table() is doing kzalloc(GFP_KERNEL), it is safe to use GFP_KERNEL from __aa_kvmalloc(). Since aa_simple_write_to_buffer() is the only caller of kvmalloc() and aa_simple_write_to_buffer() is calling copy_from_user() which is GFP_KERNEL context (see memdup_user_nul()), it is safe to use GFP_KERNEL from __aa_kvmalloc(). Therefore, replace GFP_NOIO with GFP_KERNEL. Also, since we have vmalloc() fallback, add __GFP_NORETRY so that we don't invoke the OOM killer by kmalloc(GFP_KERNEL) with order == PAGE_ALLOC_COSTLY_ORDER. Signed-off-by: Tetsuo Handa Signed-off-by: John Johansen security/apparmor/lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bf1a2aac6c5ea30eca6d99791037a7b7abd8d76 Author: David Lechner Date: Wed Jan 11 11:52:51 2017 -0600 iio: adc: ti-ads7950: Change regulator matching string to "vref" This changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads7950.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b84f4ded44c77ead4e6e0abbb85e053c3dff5aa Author: David Lechner Date: Wed Jan 11 11:52:50 2017 -0600 iio: adc: ti-ads7950: Drop "ti-" prefix from module name This drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree). Tested working on LEGO MINDSTORMS EV3 with the following device tree node: adc@3 { compatible = "ti,ads7957"; reg = <3>; #io-channel-cells = <1>; spi-max-frequency = <10000000>; vref-supply = <&adc_ref>; }; Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0287c8d24bd70dc4f2d07829cfc1839deca76416 Author: David Lechner Date: Wed Jan 11 11:52:49 2017 -0600 DT/bindings: Add bindings for TI ADS7950 A/DC chips This adds device tree bindings for the TI ADS7950 family of A/DC chips. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 41438f1314b0f6f4d94edc56bb5bc77138445bb3 Author: Takashi Iwai Date: Thu Jan 12 17:13:21 2017 +0100 ALSA: hda - Make single_cmd option to stop the fallback mechanism HD-audio driver has a mechanism to fall back to the single cmd mode as a last resort if the CORB/RIRB communication goes wrong even after switching to the polling mode. The switching has worked in the past well, but Enrico Mioso reported that his system crashes when this happens. Although the actual cause of the crash isn't still fully analyzed yet, it'd be in anyway good to provide an option to turn off the fallback mode. Now this patch extends the behavior of the existing single_cmd option for that. Namely, - The option is changed from bool to bint. - As default, it is the mode allowing the fallback to single cmd. - Once when either true/false value is given to the option, the driver explicitly turns on/off the single cmd mode, but without the fallback. That is, if you want to disable the fallback, just pass single_cmd=0 option. Passing single_cmd=1 will keep working like before. Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.c | 4 ++++ sound/pci/hda/hda_controller.h | 1 + sound/pci/hda/hda_intel.c | 10 +++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) commit 7d025948e4982ee3fa741c0fa56385c8b4a7072d Author: Paul E. McKenney Date: Thu Nov 17 12:54:39 2016 -0800 torture: Enable DEBUG_OBJECTS_RCU_HEAD for Tiny RCU The RCU torture tests currently do not run any Tiny RCU scenarios for CONFIG_DEBUG_OBJECTS_RCU_HEAD=y. This is a hole in the test, given that someone might need this in real life and given that Tiny RCU uses different callback-handling code than does Tree RCU. This commit therefore enables this Kconfig option for scenario TINY02. Reported-by: "Ahmed, Iftekhar" Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4dbba591945dc301c302672adefba9e2ec08dc5 Author: Yang Shi Date: Thu Nov 10 13:06:39 2016 -0800 locktorture: Fix potential memory leak with rw lock test When running locktorture module with the below commands with kmemleak enabled: $ modprobe locktorture torture_type=rw_lock_irq $ rmmod locktorture The below kmemleak got caught: root@10:~# echo scan > /sys/kernel/debug/kmemleak [ 323.197029] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) root@10:~# cat /sys/kernel/debug/kmemleak unreferenced object 0xffffffc07592d500 (size 128): comm "modprobe", pid 368, jiffies 4294924118 (age 205.824s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 c3 7b 02 00 00 00 00 00 .........{...... 00 00 00 00 00 00 00 00 d7 9b 02 00 00 00 00 00 ................ backtrace: [] create_object+0x110/0x288 [] kmemleak_alloc+0x58/0xa0 [] __kmalloc+0x234/0x318 [] 0xffffff80006fa130 [] do_one_initcall+0x44/0x138 [] do_init_module+0x68/0x1cc [] load_module+0x1a68/0x22e0 [] SyS_finit_module+0xe0/0xf0 [] el0_svc_naked+0x24/0x28 [] 0xffffffffffffffff unreferenced object 0xffffffc07592d480 (size 128): comm "modprobe", pid 368, jiffies 4294924118 (age 205.824s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 3b 6f 01 00 00 00 00 00 ........;o...... 00 00 00 00 00 00 00 00 23 6a 01 00 00 00 00 00 ........#j...... backtrace: [] create_object+0x110/0x288 [] kmemleak_alloc+0x58/0xa0 [] __kmalloc+0x234/0x318 [] 0xffffff80006fa22c [] do_one_initcall+0x44/0x138 [] do_init_module+0x68/0x1cc [] load_module+0x1a68/0x22e0 [] SyS_finit_module+0xe0/0xf0 [] el0_svc_naked+0x24/0x28 [] 0xffffffffffffffff It is because cxt.lwsa and cxt.lrsa don't get freed in module_exit, so free them in lock_torture_cleanup() and free writer_tasks if reader_tasks is failed at memory allocation. Signed-off-by: Yang Shi Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/locking/locktorture.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b1c14a39adcf2237f31bcd0cd858bed5c54f2aee Author: Paul E. McKenney Date: Tue Nov 8 16:54:08 2016 -0800 torture: Update RCU test scenario documentation Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 33 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit c31db96f56bf11eb37cdbd38162c2391dc9b3d32 Author: Paul E. McKenney Date: Tue Nov 8 16:51:44 2016 -0800 torture: Run a couple scenarios with CONFIG_RCU_EQS_DEBUG This commit runs TREE04 and TREE08 with CONFIG_RCU_EQS_DEBUG=y, enabling dyntick-counter checking on those two tests. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE08 | 1 + 2 files changed, 2 insertions(+) commit 24e2f4de665a54d639e9e30e0806e45669742a01 Author: Paul E. McKenney Date: Tue Nov 8 16:40:57 2016 -0800 torture: Run one test with DEBUG_LOCK_ALLOC but not PROVE_LOCKING This commit sets CONFIG_DEBUG_LOCK_ALLOC but not CONFIG_PROVE_LOCKING for TREE08 in order to have at least one test with this configuration. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TREE08 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ad4b594b5d71d435ce1f8040416d993bfd83c273 Author: Paul E. McKenney Date: Tue Nov 8 16:35:03 2016 -0800 torture: Run at least one test with CONFIG_DEBUG_OBJECTS_RCU_HEAD This commit enables the CONFIG_DEBUG_OBJECTS_RCU_HEAD Kconfig option in TREE02 in order to do at least some testing with this enabled. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TREE02 | 1 + 1 file changed, 1 insertion(+) commit cdfc7f1ab5ce5534b9ba8e2b11d393a43b0f11bf Author: Paul E. McKenney Date: Tue Nov 8 16:31:51 2016 -0800 torture: Add tests without slow grace period setup/cleanup This commit moves CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP, CONFIG_RCU_TORTURE_TEST_SLOW_INIT, and CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT from CFcommon to all of the TREE scenarios other than TREE08 and TREE09 in order to do at least some testing without these Kconfig options set. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/CFcommon | 3 --- tools/testing/selftests/rcutorture/configs/rcu/TREE01 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE02 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE03 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE05 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE06 | 3 +++ tools/testing/selftests/rcutorture/configs/rcu/TREE07 | 3 +++ 8 files changed, 21 insertions(+), 3 deletions(-) commit 4faf185cee66a3d1384a687406c80a9dc4124e3c Author: Paul E. McKenney Date: Tue Nov 8 16:30:25 2016 -0800 torture: Add CONFIG_PROVE_RCU_REPEATEDLY=y for TINY02 This commit adds CONFIG_PROVE_RCU_REPEATEDLY=y, which has been untested for quite some time. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 1 + 1 file changed, 1 insertion(+) commit 963447e6b5390e4e3ee4f5a02528ff4467e94614 Author: Paul E. McKenney Date: Tue Nov 8 16:29:18 2016 -0800 torture: Add a check for CONFIG_RCU_STALL_COMMON for TINY01 This commit verifies coverage of testing with CONFIG_RCU_STALL_COMMON=n. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett tools/testing/selftests/rcutorture/configs/rcu/TINY01 | 1 + 1 file changed, 1 insertion(+) commit e3c50dfbbd6f10a60dba0d2d6eedde0616e2d1d4 Author: Paul E. McKenney Date: Fri Jan 6 15:14:11 2017 -0800 doc: Add rcutree.rcu_kick_kthreads to kernel-parameters.txt Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 4afac159c3ba412f49cb28291903fd01fcb25cbf Author: Paul E. McKenney Date: Sun Dec 18 13:46:45 2016 -0800 doc: Quick-Quiz answers are now inline Now that quick-quiz answers are inline, there is no separate section containing those answers. This commit therefore removes the dangling reference from the RCU data-structures design documentation. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Documentation/RCU/Design/Data-Structures/Data-Structures.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c8241f8553e888199283c75ab89ef6b092b2afd2 Author: Paul E. McKenney Date: Tue Dec 13 16:42:32 2016 -0800 doc: Update control-dependencies section of memory-barriers.txt This commit adds consistency to examples, formatting, and a couple of additional warnings. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Documentation/memory-barriers.txt | 70 +++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 32 deletions(-) commit 526914a0aee7c5cfc5b27e6cc2fe1fae15248d79 Author: Tetsuo Handa Date: Sat Nov 19 19:47:55 2016 +0900 doc: Fix RCU requirements typos Signed-off-by: Tetsuo Handa Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Documentation/RCU/Design/Requirements/Requirements.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e73c14ebc36bf2ba28784ff05133283003aaafdb Author: Paul E. McKenney Date: Tue Jun 28 19:52:01 2016 -0700 rcu: Design documentation for expedited grace periods This commit adds design documentation for expedited grace periods. This documentation is in HTML rather than the new documentation format because (1) I have prototype documentation already in HTML, and (2) Attempting to learn the new documentation format while creating the design documentation seems likely to result in neither happening in a timely fashion. Once the design documentation is complete, we can start a conversion effort. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett .../Design/Expedited-Grace-Periods/ExpRCUFlow.svg | 830 +++++++++++++++++++++ .../Expedited-Grace-Periods/ExpSchedFlow.svg | 826 ++++++++++++++++++++ .../Expedited-Grace-Periods.html | 626 ++++++++++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel0.svg | 275 +++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel1.svg | 275 +++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel2.svg | 287 +++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel3.svg | 323 ++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel4.svg | 323 ++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel5.svg | 335 +++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel6.svg | 335 +++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel7.svg | 347 +++++++++ .../RCU/Design/Expedited-Grace-Periods/Funnel8.svg | 311 ++++++++ 12 files changed, 5093 insertions(+) commit bb60b8b35a7350585dc4bc2847479cea47f139d4 Merge: ca4b5eb c88215d Author: David S. Miller Date: Sat Jan 14 12:02:15 2017 -0500 Merge tag 'mac80211-next-for-davem-2017-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== For 4.11, we seem to have more than in the past few releases: * socket owner support for connections, so when the wifi manager (e.g. wpa_supplicant) is killed, connections are torn down - wpa_supplicant is critical to managing certain operations, and can opt in to this where applicable * minstrel & minstrel_ht updates to be more efficient (time and space) * set wifi_acked/wifi_acked_valid for skb->destructor use in the kernel, which was already available to userspace * don't indicate new mesh peers that might be used if there's no room to add them * multicast-to-unicast support in mac80211, for better medium usage (since unicast frames can use *much* higher rates, by ~3 orders of magnitude) * add API to read channel (frequency) limitations from DT * add infrastructure to allow randomizing public action frames for MAC address privacy (still requires driver support) * many cleanups and small improvements/fixes across the board ==================== Signed-off-by: David S. Miller commit ca4b5eb88aa0da96ede750d8b894e7079612aa65 Author: Shyam Saini Date: Sat Jan 14 06:47:40 2017 +0530 cxgb4: Remove redundant memset before memcpy The region set by the call to memset, immediately overwritten by the subsequent call to memcpy and thus makes the memset redundant. Also remove the memset((&info, 0, sizeof(info)) on line 398 because info is memcpy()'ed to before being used in the loop and it isn't used outside of the loop. Signed-off-by: Shyam Saini Reviewed-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/sched.c | 5 ----- 1 file changed, 5 deletions(-) commit 47a8e3f6aebd4d6048572b3aeaef1dd51acb0d82 Author: Chris Wilson Date: Sat Jan 14 00:28:27 2017 +0000 drm/i915: Eliminate superfluous i915_ggtt_view_normal Since commit 058d88c4330f ("drm/i915: Track pinned VMA"), there is only one user of i915_ggtt_view_normal rodate. Just treat NULL as no special view in pin_to_display() like everywhere else. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ---- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 -- drivers/gpu/drm/i915/intel_overlay.c | 3 +-- 4 files changed, 2 insertions(+), 9 deletions(-) commit 7b92c047bae2210874d64ae8bbb56fbd18ab6731 Author: Chris Wilson Date: Sat Jan 14 00:28:26 2017 +0000 drm/i915: Eliminate superfluous i915_ggtt_view_rotated It is only being used to clear a struct and set the type, after which it is overwritten. Since we no longer check the unset bits of the union, skipping the clear is permissible. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 3 --- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - drivers/gpu/drm/i915/intel_display.c | 5 ++--- 3 files changed, 2 insertions(+), 7 deletions(-) commit 8bab1193c193fa1a695aa9bb881bb4cb0ea2ba85 Author: Chris Wilson Date: Sat Jan 14 00:28:25 2017 +0000 drm/i915: Convert i915_ggtt_view to use an anonymous union Reading the ggtt_views is much more pleasant without the extra characters from specifying the union (i.e. ggtt_view.partial rather than ggtt_view.params.partial). To make this work inside i915_vma_compare() with only a single memcmp requires us to ensure that there are no uninitialised bytes within each branch of the union (we make sure the structs are packed) and we need to store the size of each branch. v4: Rewrite changelog and add comments explaining the assert. Signed-off-by: Chris Wilson Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_debugfs.c | 20 ++++++++++---------- drivers/gpu/drm/i915/i915_gem.c | 8 ++++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ++++----- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_vma.c | 9 ++++----- drivers/gpu/drm/i915/i915_vma.h | 9 ++++++++- drivers/gpu/drm/i915/intel_display.c | 2 +- 7 files changed, 32 insertions(+), 27 deletions(-) commit 3bf4d5751943cb7692ae2e0c01e420ed20629d5d Author: Chris Wilson Date: Sat Jan 14 00:28:24 2017 +0000 drm/i915: Stop clearing i915_ggtt_view As we now use a compact memcmp in i915_vma_compare(), we can forgo clearing the entire view and only set the precise parameters used in this view. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 - 1 file changed, 1 deletion(-) commit 992e418dd945755fe947c8df7329e71e76b9e4f8 Author: Chris Wilson Date: Sat Jan 14 00:28:23 2017 +0000 drm/i915: Compact memcmp in i915_vma_compare() In preparation for the next patch to convert to using an anonymous union and leaving the excess bytes in the union uninitialised, we first need to make sure we do not compare using those uninitialised bytes. We also want to preserve the compactness of the code, avoiding a second call to memcmp or introducing a switch, so we take advantage of using the type as an encoded size (as well as a unique identifier for each type of view). v2: Add the rationale for why we encode size into ggtt_view.type as a comment before the memcmp() v3: Use a switch to also assert that no two i915_ggtt_view_type have the same value. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.h | 28 +++++++++++++++++++++------- drivers/gpu/drm/i915/i915_vma.h | 20 ++++++++++++++------ 2 files changed, 35 insertions(+), 13 deletions(-) commit 8d9046ad5d9b7e5ede7cdf566a190f136f239614 Author: Chris Wilson Date: Sat Jan 14 00:28:22 2017 +0000 drm/i915: Mark the ggtt_view structs as packed In the next few patches, we will depend upon there being no uninitialised bits inside the ggtt_view. To ensure this we add the __packed attribute and double check with a build bug that gcc hasn't expanded the struct to include some padding bytes. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7ff19c560fb279211670e0f5a06c8b3b594ecc2d Author: Chris Wilson Date: Sat Jan 14 00:28:21 2017 +0000 drm/i915: Name the anonymous structs inside i915_ggtt_view Naming this pair will become useful shortly... Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f21860bac05b609d71757338361d26209ff0759b Author: Ingo Molnar Date: Sat Jan 14 17:11:36 2017 +0100 locking/mutex, sched/wait: Fix the mutex_lock_io_nested() define Mike noticed this bogosity: > > +# define mutex_lock_nest_io(lock, nest_lock) mutex_io(lock) > ^^^^^^^^^^^^^^ typo This new locking API is not used yet, so this didn't trigger in testing. Fix it. Reported-by: Mike Galbraith Cc: Tejun Heo Cc: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Jens Axboe Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adilger.kernel@dilger.ca Cc: jack@suse.com Cc: kernel-team@fb.com Cc: mingbo@fb.com Cc: tytso@mit.edu Signed-off-by: Ingo Molnar include/linux/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15c606686541d49cc38465a3cfe25c23bff4395b Author: Linus Walleij Date: Fri Jan 13 16:02:09 2017 +0100 dmaengine: ste_dma40: indicate granularity on channels The ste_dma40 has burst level granularity on the residue registers, which is necessary for some clients to know, notably the UART. Before this patch we get this message: uart-pl011 80007000.uart: RX DMA disabled - no residue processing This patch fixes it. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 1 + 1 file changed, 1 insertion(+) commit 49873e99b7b5d59eef238199fd55f8345e860824 Author: Linus Walleij Date: Fri Jan 13 16:02:03 2017 +0100 dmaengine: ste_dma40: indicate directions on channels Since the introduction of the .directions flags, ste_dma40 was never patched to indicate which transfer directions it can manage. This causes a problem when trying to use the dmaengine for generic ALSA SoC DMA: ux500-msp-i2s.1: Failed to get DMA channel capabilities, falling back to period counting: -6 This patch fixes this issue by indicating the supported transfer directions for slave and memcpy channels. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e2eb179c0031b8cd172d8a7869451ff57184388b Author: Colin Ian King Date: Wed Jan 11 17:49:33 2017 +0000 iio: magnetometer: ak8974: remove redundant zero timeout check At the end of the delay loop timeout will always be zero and hence the check for !timeout will always be true. Remove the redundant check and the redundant return 0 at the end of the function. Fixes CoverityScan CID#1357168 ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8974.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a9c99c76f5b96d68f1d5a293d984c74896d3c024 Author: Enric Balletbo i Serra Date: Wed Jan 11 16:51:38 2017 +0100 iio: Documentation: Add proximity unit To follow iio guidelines Where possible we stick to the raw SI unit, so specify meters for proximity. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 53b36426d0505f26a28e12c2582e9d35c48864e4 Author: Lorenzo Bianconi Date: Tue Jan 10 22:55:19 2017 +0100 Documentation: dt: iio: add st_lsm6dsx sensor device binding Acked-by: Rob Herring Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/imu/st_lsm6dsx.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 290a6ce11d938be52634b3ce1bbc6b78be4d23c1 Author: Lorenzo Bianconi Date: Tue Jan 10 22:55:18 2017 +0100 iio: imu: add support to lsm6dsx driver Add support to STM LSM6DS3-LSM6DSM 6-axis (acc + gyro) Mems sensor http://www.st.com/resource/en/datasheet/lsm6ds3.pdf http://www.st.com/resource/en/datasheet/lsm6dsm.pdf - continuous mode support - i2c support - spi support - sw fifo mode support - supported devices: lsm6ds3, lsm6dsm Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/Kconfig | 1 + drivers/iio/imu/Makefile | 2 + drivers/iio/imu/st_lsm6dsx/Kconfig | 22 + drivers/iio/imu/st_lsm6dsx/Makefile | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 141 ++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 454 +++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 673 +++++++++++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 101 ++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 118 +++++ 9 files changed, 1517 insertions(+) commit adc8ec5ff183d09ae7a9d2dd31125401d302ba63 Author: Linus Walleij Date: Wed Jan 11 11:48:39 2017 +0100 iio: inkern: pass through raw values if no scaling When a consumer calls iio_read_channel_processed() the IIO core tries to apply scaling to the value, but if the channel only supports reading raw values, we should return that raw value to the cosumer instead of an error. This is what userspace is expected to do with sensors only providing raw values so the kernel should do the same, so as to avoid adding scaling boilerplate to drivers for hardware that actually return processed values from raw reads. A sensor not providing a scale, but providing a _raw attribute could be valid if for example the scale is the default of 1, but an offset needs to be applied to convert to the _processed form. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/inkern.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 23b19ec3377924eb8f303880102e056e9214ba72 Author: Ingo Molnar Date: Sat Jan 14 12:11:59 2017 +0100 locking/ww_mutex: Turn off __must_check for now With the ww_mutex inline wrappers gone there's a lot of dormant anti-patterns emerging in an x86 allyesconfig build: kernel/locking/test-ww_mutex.c:80:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] kernel/locking/test-ww_mutex.c:55:3: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] kernel/locking/test-ww_mutex.c:134:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] kernel/locking/test-ww_mutex.c:213:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] kernel/locking/test-ww_mutex.c:177:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] kernel/locking/test-ww_mutex.c:266:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:213:19: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] lib/locking-selftest.c:211:20: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/drm_modeset_lock.c:430:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c:70:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/vgem/vgem_fence.c:193:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/i915/i915_gem_batch_pool.c:125:4: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/i915/i915_gem_execbuffer.c:1302:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/radeon/radeon_prime.c:69:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] drivers/gpu/drm/nouveau/nouveau_prime.c:70:2: warning: ignoring return value of ‘ww_mutex_lock’, declared with attribute warn_unused_result [-Wunused-result] ... but we cannot just litter the kernel build log with such warnings. These need to be fixed separately - turn off the warning for now. Cc: Nicolai Hähnle Cc: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/ww_mutex.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 948b707df8d2493346f7a2979632ab5ae8b8abb6 Author: Manivannan Sadhasivam Date: Mon Jan 9 08:25:26 2017 +0530 iio:temperature: Add support for TI TMP007 sensor This patch adds support for TI TMP007 - 16 bit IR thermopile sensor with integrated Math engine. Sensor takes care of calculating the object temperature with the help of calibrated constants stored in non-volatile memory, thereby reducing the calculation overhead. Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/temperature/tmp007.txt | 27 ++ drivers/iio/temperature/Kconfig | 10 + drivers/iio/temperature/Makefile | 1 + drivers/iio/temperature/tmp007.c | 345 +++++++++++++++++++++ 4 files changed, 383 insertions(+) commit 3efb772c853f7bc31e38ec2b5270810ccb327e35 Author: Peter Zijlstra Date: Mon Nov 14 18:25:17 2016 +0100 locking/atomic, kref: Avoid more abuse Leak references by unbalanced get, instead of poking at kref implementation details. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/usb/mon/mon_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b1ffa06e59d44e7ef04132f24c791931fbb0106 Author: Peter Zijlstra Date: Mon Nov 14 17:35:56 2016 +0100 locking/atomic, kref: Use kref_get_unless_zero() more For some obscure reason apparmor thinks its needs to locally implement kref primitives that already exist. Stop doing this. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar security/apparmor/include/apparmor.h | 6 ------ security/apparmor/include/policy.h | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) commit bdfafc4ffdd24e491119d81f85ddc4393fa49803 Author: Peter Zijlstra Date: Mon Nov 14 17:34:19 2016 +0100 locking/atomic, kref: Kill kref_sub() By general sentiment kref_sub() is a bad interface, make it go away. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/block/drbd/drbd_main.c | 7 ++-- drivers/block/drbd/drbd_req.c | 31 ++++++------------ drivers/gpu/drm/ttm/ttm_bo.c | 59 +++++++++------------------------- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 4 +-- include/drm/ttm/ttm_bo_api.h | 15 +-------- include/linux/kref.h | 32 +++--------------- 6 files changed, 36 insertions(+), 112 deletions(-) commit 2c935bc57221cc2edc787c72ea0e2d30cdcd3d5e Author: Peter Zijlstra Date: Mon Nov 14 17:29:48 2016 +0100 locking/atomic, kref: Add kref_read() Since we need to change the implementation, stop exposing internals. Provide kref_read() to read the current reference count; typically used for debug messages. Kills two anti-patterns: atomic_read(&kref->refcount) kref->refcount.counter Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/block/drbd/drbd_req.c | 2 +- drivers/block/rbd.c | 8 +++--- drivers/block/virtio_blk.c | 2 +- drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- drivers/gpu/drm/drm_info.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 4 +-- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_object.h | 2 +- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 4 +-- drivers/gpu/drm/ttm/ttm_object.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_cm.h | 6 ++--- drivers/infiniband/hw/cxgb3/iwch_qp.c | 2 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 6 ++--- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 6 ++--- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 +-- drivers/misc/genwqe/card_dev.c | 2 +- drivers/misc/mei/debugfs.c | 2 +- drivers/pci/hotplug/pnv_php.c | 2 +- drivers/pci/slot.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_io.c | 8 +++--- drivers/scsi/cxgbi/libcxgbi.h | 4 +-- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_els.c | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 40 ++++++++++++++-------------- drivers/scsi/lpfc/lpfc_init.c | 3 +-- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +-- drivers/staging/android/ion/ion.c | 2 +- drivers/staging/comedi/comedi_buf.c | 2 +- drivers/target/target_core_pr.c | 10 +++---- drivers/target/tcm_fc/tfc_sess.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- fs/exofs/sys.c | 2 +- fs/ocfs2/cluster/netdebug.c | 2 +- fs/ocfs2/cluster/tcp.c | 2 +- fs/ocfs2/dlm/dlmdebug.c | 12 ++++----- fs/ocfs2/dlm/dlmdomain.c | 2 +- fs/ocfs2/dlm/dlmmaster.c | 8 +++--- fs/ocfs2/dlm/dlmunlock.c | 2 +- include/drm/drm_framebuffer.h | 2 +- include/drm/ttm/ttm_bo_driver.h | 4 +-- include/linux/kref.h | 5 ++++ include/linux/sunrpc/cache.h | 2 +- include/net/bluetooth/hci_core.h | 4 +-- net/bluetooth/6lowpan.c | 2 +- net/bluetooth/a2mp.c | 4 +-- net/bluetooth/amp.c | 4 +-- net/bluetooth/l2cap_core.c | 4 +-- net/ceph/messenger.c | 4 +-- net/ceph/osd_client.c | 10 +++---- net/sunrpc/cache.c | 2 +- net/sunrpc/svc_xprt.c | 6 ++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 +-- 56 files changed, 121 insertions(+), 117 deletions(-) commit 1e24edca0557dba6486d39d3c24c288475432bcf Author: Peter Zijlstra Date: Mon Nov 14 17:12:23 2016 +0100 locking/atomic, kref: Add KREF_INIT() Since we need to change the implementation, stop exposing internals. Provide KREF_INIT() to allow static initialization of struct kref. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/block/drbd/drbd_bitmap.c | 2 +- fs/fuse/fuse_i.h | 2 +- include/linux/kref.h | 2 ++ init/version.c | 4 +--- kernel/pid.c | 4 +--- 5 files changed, 6 insertions(+), 8 deletions(-) commit 2b0b211134a65401ed874ce0d5d48844f4f6f341 Author: Chris Wilson Date: Thu Dec 1 11:47:11 2016 +0000 locking/ww_mutex: Add ww_mutex to tools/testing/selftests Add the minimal test running (modprobe test-ww_mutex) to the kselftests CI framework. Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-9-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar tools/testing/selftests/locking/ww_mutex.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2a0c11282881875dc44f166a20eedf0d866dd0ef Author: Chris Wilson Date: Thu Dec 1 11:47:10 2016 +0000 locking/ww_mutex: Add kselftests for ww_mutex stress Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-8-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 254 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) commit d1b42b800e5d09dcee52812b4396aca3a3696ba9 Author: Chris Wilson Date: Thu Dec 1 11:47:09 2016 +0000 locking/ww_mutex: Add kselftests for resolving ww_mutex cyclic deadlocks Check that ww_mutexes can detect cyclic deadlocks (generalised ABBA cycles) and resolve them by lock reordering. Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-7-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 115 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit 70207686e492fb97c11d88ae7d8ebce7d2d080aa Author: Chris Wilson Date: Thu Dec 1 11:47:08 2016 +0000 locking/ww_mutex: Add kselftests for ww_mutex ABBA deadlock detection Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-6-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 98 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit c22fb3807fd0a3bdd98c13c4d2190ab064e6c09d Author: Chris Wilson Date: Thu Dec 1 11:47:07 2016 +0000 locking/ww_mutex: Add kselftests for ww_mutex AA deadlock detection Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-5-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f2a5fec17395f259d54daa8833d81b00cceb15c3 Author: Chris Wilson Date: Thu Dec 1 11:47:06 2016 +0000 locking/ww_mutex: Begin kselftests for ww_mutex Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-4-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/Makefile | 1 + kernel/locking/test-ww_mutex.c | 140 +++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 12 ++++ 3 files changed, 153 insertions(+) commit 0186a6cbdc6287fde65858e5d9c714dc167b8ace Author: Chris Wilson Date: Thu Dec 1 11:47:05 2016 +0000 locking/ww_mutex: Add ww_mutex to locktorture test Although ww_mutexes degenerate into mutexes, it would be useful to torture the deadlock handling between multiple ww_mutexes in addition to torturing the regular mutexes. Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161201114711.28697-3-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/locktorture.c | 73 ++++++++++++++++++++++ .../selftests/rcutorture/configs/lock/CFLIST | 1 + .../selftests/rcutorture/configs/lock/LOCK07 | 6 ++ .../selftests/rcutorture/configs/lock/LOCK07.boot | 1 + 4 files changed, 81 insertions(+) commit af2e859edd477fa1ea3d1d106f41a595cff3d162 Author: Chris Wilson Date: Thu Dec 1 11:47:04 2016 +0000 locking/ww_mutex: Fix compilation of __WW_MUTEX_INITIALIZER From conflicting macro parameters, passing the wrong name to __MUTEX_INITIALIZER and a stray '\', #define __WW_MUTEX_INITIALIZER was very unhappy. One unnecessary change was to choose to pass &ww_class instead of implicitly taking the address of the class within the macro. Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 1b375dc30710 ("mutex: Move ww_mutex definitions to ww_mutex.h") Link: http://lkml.kernel.org/r/20161201114711.28697-2-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar include/linux/ww_mutex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e3d6223d2093a8903c8f570a06284453ee59944 Author: Peter Zijlstra Date: Fri Dec 9 09:30:11 2016 +0100 math64, timers: Fix 32bit mul_u64_u32_shr() and friends It turns out that while GCC-4.4 manages to generate 32x32->64 mult instructions for the 32bit mul_u64_u32_shr() code, any GCC after that fails horribly. Fix this by providing an explicit mul_u32_u32() function which can be architcture provided. Reported-by: Chris Metcalf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Chris Metcalf [for tile] Cc: Christopher S. Hall Cc: David Gibson Cc: John Stultz Cc: Laurent Vivier Cc: Liav Rehana Cc: Linus Torvalds Cc: Parit Bhargava Cc: Peter Zijlstra Cc: Richard Cochran Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161209083011.GD15765@worktop.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/tile/include/asm/Kbuild | 1 - arch/tile/include/asm/div64.h | 14 ++++++++++++++ arch/x86/include/asm/div64.h | 11 +++++++++++ include/linux/math64.h | 26 ++++++++++++++++++-------- 4 files changed, 43 insertions(+), 9 deletions(-) commit 6fa7aa50b2c48400bbd045daf3a2498882eb0596 Author: Tejun Heo Date: Fri Oct 28 12:58:12 2016 -0400 fs/jbd2, locking/mutex, sched/wait: Use mutex_lock_io() for journal->j_checkpoint_mutex When an ext4 fs is bogged down by a lot of metadata IOs (in the reported case, it was deletion of millions of files, but any massive amount of journal writes would do), after the journal is filled up, tasks which try to access the filesystem and aren't currently performing the journal writes end up waiting in __jbd2_log_wait_for_space() for journal->j_checkpoint_mutex. Because those mutex sleeps aren't marked as iowait, this condition can lead to misleadingly low iowait and /proc/stat:procs_blocked. While iowait propagation is far from strict, this condition can be triggered fairly easily and annotating these sleeps correctly helps initial diagnosis quite a bit. Use the new mutex_lock_io() for journal->j_checkpoint_mutex so that these sleeps are properly marked as iowait. Reported-by: Mingbo Wan Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Andreas Dilger Cc: Andrew Morton Cc: Jan Kara Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Theodore Ts'o Cc: Thomas Gleixner Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/1477673892-28940-5-git-send-email-tj@kernel.org Signed-off-by: Ingo Molnar fs/jbd2/commit.c | 2 +- fs/jbd2/journal.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 1460cb65a10f6c7a6e3a1c76513338861a0a43b6 Author: Tejun Heo Date: Fri Oct 28 12:58:11 2016 -0400 locking/mutex, sched/wait: Add mutex_lock_io() We sometimes end up propagating IO blocking through mutexes; however, because there currently is no way of annotating mutex sleeps as iowait, there are cases where iowait and /proc/stat:procs_blocked report misleading numbers obscuring the actual state of the system. This patch adds mutex_lock_io() so that mutex sleeps can be marked as iowait in those cases. Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adilger.kernel@dilger.ca Cc: jack@suse.com Cc: kernel-team@fb.com Cc: mingbo@fb.com Cc: tytso@mit.edu Link: http://lkml.kernel.org/r/1477673892-28940-4-git-send-email-tj@kernel.org Signed-off-by: Ingo Molnar include/linux/mutex.h | 4 ++++ kernel/locking/mutex.c | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 10ab56434f2f633a51e432ee8b7c29e12438e163 Author: Tejun Heo Date: Fri Oct 28 12:58:10 2016 -0400 sched/core: Separate out io_schedule_prepare() and io_schedule_finish() Now that IO schedule accounting is done inside __schedule(), io_schedule() can be split into three steps - prep, schedule, and finish - where the schedule part doesn't need any special annotation. This allows marking a sleep as iowait by simply wrapping an existing blocking function with io_schedule_prepare() and io_schedule_finish(). Because task_struct->in_iowait is single bit, the caller of io_schedule_prepare() needs to record and the pass its state to io_schedule_finish() to be safe regarding nesting. While this isn't the prettiest, these functions are mostly gonna be used by core functions and we don't want to use more space for ->in_iowait. While at it, as it's simple to do now, reimplement io_schedule() without unnecessarily going through io_schedule_timeout(). Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adilger.kernel@dilger.ca Cc: jack@suse.com Cc: kernel-team@fb.com Cc: mingbo@fb.com Cc: tytso@mit.edu Link: http://lkml.kernel.org/r/1477673892-28940-3-git-send-email-tj@kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 8 +++----- kernel/sched/core.c | 33 ++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 10 deletions(-) commit e33a9bba85a869b85fd0a7f16e21a5ec8977e325 Author: Tejun Heo Date: Wed Dec 7 15:48:41 2016 -0500 sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler For an interface to support blocking for IOs, it must call io_schedule() instead of schedule(). This makes it tedious to add IO blocking to existing interfaces as the switching between schedule() and io_schedule() is often buried deep. As we already have a way to mark the task as IO scheduling, this can be made easier by separating out io_schedule() into multiple steps so that IO schedule preparation can be performed before invoking a blocking interface and the actual accounting happens inside the scheduler. io_schedule_timeout() does the following three things prior to calling schedule_timeout(). 1. Mark the task as scheduling for IO. 2. Flush out plugged IOs. 3. Account the IO scheduling. done close to the actual scheduling. This patch moves #3 into the scheduler so that later patches can separate out preparation and finish steps from io_schedule(). Patch-originally-by: Peter Zijlstra Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adilger.kernel@dilger.ca Cc: akpm@linux-foundation.org Cc: axboe@kernel.dk Cc: jack@suse.com Cc: kernel-team@fb.com Cc: mingbo@fb.com Cc: tytso@mit.edu Link: http://lkml.kernel.org/r/20161207204841.GA22296@htj.duckdns.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 7 deletions(-) commit b8fd8423697b9ec729c5bb91737faad84ae19985 Author: Dietmar Eggemann Date: Wed Jan 11 11:29:47 2017 +0000 sched/fair: Explain why MIN_SHARES isn't scaled in calc_cfs_shares() Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paul Turner Cc: Peter Zijlstra Cc: Samuel Thibault Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e9a4d858-bcf3-36b9-e3a9-449953e34569@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 89ee048f3cc796db6f26906c6bef4edf0bee70fd Author: Vincent Guittot Date: Wed Dec 21 16:50:26 2016 +0100 sched/core: Fix group_entity's share update The update of the share of a cfs_rq is done when its load_avg is updated but before the group_entity's load_avg has been updated for the past time slot. This generates wrong load_avg accounting which can be significant when small tasks are involved in the scheduling. Let take the example of a task a that is dequeued of its task group A: root (cfs_rq) \ (se) A (cfs_rq) \ (se) a Task "a" was the only task in task group A which becomes idle when a is dequeued. We have the sequence: - dequeue_entity a->se - update_load_avg(a->se) - dequeue_entity_load_avg(A->cfs_rq, a->se) - update_cfs_shares(A->cfs_rq) A->cfs_rq->load.weight == 0 A->se->load.weight is updated with the new share (0 in this case) - dequeue_entity A->se - update_load_avg(A->se) but its weight is now null so the last time slot (up to a tick) will be accounted with a weight of 0 instead of its real weight during the time slot. The last time slot will be accounted as an idle one whereas it was a running one. If the running time of task a is short enough that no tick happens when it runs, all running time of group entity A->se will be accounted as idle time. Instead, we should update the share of a cfs_rq (in fact the weight of its group entity) only after having updated the load_avg of the group_entity. update_cfs_shares() now takes the sched_entity as a parameter instead of the cfs_rq, and the weight of the group_entity is updated only once its load_avg has been synced with current time. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: pjt@google.com Link: http://lkml.kernel.org/r/1482335426-7664-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) commit da9647e076d440190fff4b4ee0f4b829dd6e8c4f Author: Peter Zijlstra Date: Wed Dec 21 09:05:02 2016 +0100 sched/completions: Fix complete_all() semantics Documentation/scheduler/completion.txt says this about complete_all(): "calls complete_all() to signal all current and future waiters." Which doesn't strictly match the current semantics. Currently complete_all() is equivalent to UINT_MAX/2 complete() invocations, which is distinctly less than 'all current and future waiters' (enumerable vs innumerable), although it has worked in practice. However, Dmitry had a weird case where it might matter, so change completions to use saturation semantics for complete()/complete_all(). Once done hits UINT_MAX (and complete_all() sets it there) it will never again be decremented. Requested-by: Dmitry Torokhov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: der.herr@hofr.at Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/completion.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 59f8c2989283bbd3df9fcfb22494d84f4852e536 Author: Tommaso Cucinotta Date: Wed Oct 26 11:17:17 2016 +0200 sched/deadline: Show leftover runtime and abs deadline in /proc/*/sched This patch allows for reading the current (leftover) runtime and absolute deadline of a SCHED_DEADLINE task through /proc/*/sched (entries dl.runtime and dl.deadline), while debugging/testing. Signed-off-by: Tommaso Cucinotta Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juri Lelli Reviewed-by: Luca Abeni Acked-by: Daniel Bistrot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar Documentation/scheduler/sched-deadline.txt | 6 ++++++ kernel/sched/debug.c | 4 ++++ 2 files changed, 10 insertions(+) commit 5680d8094ffa9e5cfc81afdd865027ee6417c263 Author: Peter Zijlstra Date: Thu Dec 15 13:36:17 2016 +0100 sched/clock: Provide better clock continuity When switching between the unstable and stable variants it is currently possible that clock discontinuities occur. And while these will mostly be 'small', attempt to do better. As observed on my IVB-EP, the sched_clock() is ~1.5s ahead of the ktime_get_ns() based timeline at the point of switchover (sched_clock_init_late()) after SMP bringup. Equally, when the TSC is later found to be unstable -- typically because SMM tries to hide its SMI latencies by mucking with the TSC -- we want to avoid large jumps. Since the clocksource watchdog reports the issue after the fact we cannot exactly fix up time, but since SMI latencies are typically small (~10ns range), the discontinuity is mainly due to drift between sched_clock() and ktime_get_ns() (which on my desktop is ~79s over 24days). I dislike this patch because it adds overhead to the good case in favour of dealing with badness. But given the widespread failure of TSC stability this is worth it. Note that in case the TSC makes drastic jumps after SMP bringup we're still hosed. There's just not much we can do in that case without stupid overhead. If we were to somehow expose tsc_clocksource_reliable (which is hard because this code is also used on ia64 and parisc) we could avoid some of the newly introduced overhead. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/clock.c | 99 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 34 deletions(-) commit 9881b024b7d7671f6a014091bc96506b89081802 Author: Peter Zijlstra Date: Thu Dec 15 13:35:52 2016 +0100 sched/clock: Delay switching sched_clock to stable Currently we switch to the stable sched_clock if we guess the TSC is usable, and then switch back to the unstable path if it turns out TSC isn't stable during SMP bringup after all. Delay switching to the stable path until after SMP bringup is complete. This way we'll avoid switching during the time we detect the worst of the TSC offences. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 5 +++++ init/main.c | 1 - kernel/sched/clock.c | 50 ++++++++++++++++++++++---------------------------- kernel/sched/core.c | 4 ++++ 4 files changed, 31 insertions(+), 29 deletions(-) commit 555570d744f8150d3fce6083f144026cd1e63627 Author: Peter Zijlstra Date: Thu Dec 15 13:21:58 2016 +0100 sched/clock: Update static_key usage sched_clock was still using the deprecated static_key interface. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/clock.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 12907fbb1a691807bb0420a27126e15934cb7954 Author: Thomas Gleixner Date: Thu Dec 15 11:44:28 2016 +0100 sched/clock, clocksource: Add optional cs::mark_unstable() method PeterZ reported that we'd fail to mark the TSC unstable when the clocksource watchdog finds it unsuitable. Allow a clocksource to run a custom action when its being marked unstable and hook up the TSC unstable code. Reported-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/tsc.c | 11 +++++++++++ include/linux/clocksource.h | 3 +++ kernel/time/clocksource.c | 4 ++++ 3 files changed, 18 insertions(+) commit cb42c9a3ebbbb23448c3f9a25417fae6309b1a92 Author: Matt Fleming Date: Wed Sep 21 14:38:13 2016 +0100 sched/core: Add debugging code to catch missing update_rq_clock() calls There's no diagnostic checks for figuring out when we've accidentally missed update_rq_clock() calls. Let's add some by piggybacking on the rq_*pin_lock() wrappers. The idea behind the diagnostic checks is that upon pining rq lock the rq clock should be updated, via update_rq_clock(), before anybody reads the clock with rq_clock() or rq_clock_task(). The exception to this rule is when updates have explicitly been disabled with the rq_clock_skip_update() optimisation. There are some functions that only unpin the rq lock in order to grab some other lock and avoid deadlock. In that case we don't need to update the clock again and the previous diagnostic state can be carried over in rq_repin_lock() by saving the state in the rq_flags context. Since this patch adds a new clock update flag and some already exist in rq::clock_skip_update, that field has now been renamed. An attempt has been made to keep the flag manipulation code small and fast since it's used in the heart of the __schedule() fast path. For the !CONFIG_SCHED_DEBUG case the only object code change (other than addresses) is the following change to reset RQCF_ACT_SKIP inside of __schedule(), - c7 83 38 09 00 00 00 movl $0x0,0x938(%rbx) - 00 00 00 + 83 a3 38 09 00 00 fc andl $0xfffffffc,0x938(%rbx) Suggested-by: Peter Zijlstra Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Jan Kara Cc: Linus Torvalds Cc: Luca Abeni Cc: Mel Gorman Cc: Mike Galbraith Cc: Mike Galbraith Cc: Petr Mladek Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yuyang Du Link: http://lkml.kernel.org/r/20160921133813.31976-8-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/core.c | 11 +++++--- kernel/sched/sched.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 10 deletions(-) commit 2fb8d36787affe26f3536c3d8ec094995a48037d Author: Peter Zijlstra Date: Mon Oct 3 16:44:25 2016 +0200 sched/core: Add missing update_rq_clock() call in set_user_nice() Address this rq-clock update bug: WARNING: CPU: 30 PID: 195 at ../kernel/sched/sched.h:797 set_next_entity() rq->clock_update_flags < RQCF_ACT_SKIP Call Trace: dump_stack() __warn() warn_slowpath_fmt() set_next_entity() ? _raw_spin_lock() set_curr_task_fair() set_user_nice.part.85() set_user_nice() create_worker() worker_thread() kthread() ret_from_fork() Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 3bed5e2166a5e433bf62162f3cd3c5174d335934 Author: Peter Zijlstra Date: Mon Oct 3 16:35:32 2016 +0200 sched/core: Add missing update_rq_clock() call for task_hot() Add the update_rq_clock() call at the top of the callstack instead of at the bottom where we find it missing, this to aid later effort to minimize the number of update_rq_lock() calls. WARNING: CPU: 30 PID: 194 at ../kernel/sched/sched.h:797 assert_clock_updated() rq->clock_update_flags < RQCF_ACT_SKIP Call Trace: dump_stack() __warn() warn_slowpath_fmt() assert_clock_updated.isra.63.part.64() can_migrate_task() load_balance() pick_next_task_fair() __schedule() schedule() worker_thread() kthread() Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 ++ 1 file changed, 2 insertions(+) commit 80f5c1b84baa8180c3c27b7e227429712cd967b6 Author: Peter Zijlstra Date: Mon Oct 3 16:28:37 2016 +0200 sched/core: Add missing update_rq_clock() in detach_task_cfs_rq() Instead of adding the update_rq_clock() all the way at the bottom of the callstack, add one at the top, this to aid later effort to minimize update_rq_lock() calls. WARNING: CPU: 0 PID: 1 at ../kernel/sched/sched.h:797 detach_task_cfs_rq() rq->clock_update_flags < RQCF_ACT_SKIP Call Trace: dump_stack() __warn() warn_slowpath_fmt() detach_task_cfs_rq() switched_from_fair() __sched_setscheduler() _sched_setscheduler() sched_set_stop_task() cpu_stop_create() __smpboot_create_thread.part.2() smpboot_register_percpu_thread_cpumask() cpu_stop_init() do_one_initcall() ? print_cpu_info() kernel_init_freeable() ? rest_init() kernel_init() ret_from_fork() Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 4126bad6717336abe5d666440ae15555563ca53f Author: Peter Zijlstra Date: Mon Oct 3 16:20:59 2016 +0200 sched/core: Add missing update_rq_clock() in post_init_entity_util_avg() Address this rq-clock update bug: WARNING: CPU: 0 PID: 0 at ../kernel/sched/sched.h:797 post_init_entity_util_avg() rq->clock_update_flags < RQCF_ACT_SKIP Call Trace: __warn() post_init_entity_util_avg() wake_up_new_task() _do_fork() kernel_thread() rest_init() start_kernel() Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + kernel/sched/fair.c | 1 + 2 files changed, 2 insertions(+) commit 46f69fa33712ad12ccaa723e46ed5929ee93589b Author: Matt Fleming Date: Wed Sep 21 14:38:12 2016 +0100 sched/fair: Push rq lock pin/unpin into idle_balance() Future patches will emit warnings if rq_clock() is called before update_rq_clock() inside a rq_pin_lock()/rq_unpin_lock() pair. Since there is only one caller of idle_balance() we can push the unpin/repin there. Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Jan Kara Cc: Linus Torvalds Cc: Luca Abeni Cc: Mel Gorman Cc: Mike Galbraith Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yuyang Du Link: http://lkml.kernel.org/r/20160921133813.31976-7-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/fair.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 92509b732baf14c59ca702307270cfaa3a585ae7 Author: Matt Fleming Date: Wed Sep 21 14:38:11 2016 +0100 sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock rq_clock() is called from sched_info_{depart,arrive}() after resetting RQCF_ACT_SKIP but prior to a call to update_rq_clock(). In preparation for pending patches that check whether the rq clock has been updated inside of a pin context before rq_clock() is called, move the reset of rq->clock_skip_update immediately before unpinning the rq lock. This will avoid the new warnings which check if update_rq_clock() is being actively skipped. Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Jan Kara Cc: Linus Torvalds Cc: Luca Abeni Cc: Mel Gorman Cc: Mike Galbraith Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yuyang Du Link: http://lkml.kernel.org/r/20160921133813.31976-6-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d8ac897137a230ec351269f6378017f2decca512 Author: Matt Fleming Date: Wed Sep 21 14:38:10 2016 +0100 sched/core: Add wrappers for lockdep_(un)pin_lock() In preparation for adding diagnostic checks to catch missing calls to update_rq_clock(), provide wrappers for (re)pinning and unpinning rq->lock. Because the pending diagnostic checks allow state to be maintained in rq_flags across pin contexts, swap the 'struct pin_cookie' arguments for 'struct rq_flags *'. Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Jan Kara Cc: Linus Torvalds Cc: Luca Abeni Cc: Mel Gorman Cc: Mike Galbraith Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yuyang Du Link: http://lkml.kernel.org/r/20160921133813.31976-5-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/core.c | 80 ++++++++++++++++++++++++------------------------ kernel/sched/deadline.c | 10 +++--- kernel/sched/fair.c | 6 ++-- kernel/sched/idle_task.c | 2 +- kernel/sched/rt.c | 6 ++-- kernel/sched/sched.h | 31 ++++++++++++++----- kernel/sched/stop_task.c | 2 +- 7 files changed, 76 insertions(+), 61 deletions(-) commit 27bd57aa81d976211e1b2ddbc85bec06bddeb7e3 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:40 2016 +0100 locking/ww_mutex/Documentation: Update the design document Document the invariants we maintain for the wait list of ww_mutexes. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-13-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar Documentation/locking/ww-mutex-design.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 977625a693283dbb35b2a3f674bc0237f7347348 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:39 2016 +0100 locking/mutex: Initialize mutex_waiter::ww_ctx with poison when debugging Help catch cases where mutex_lock is used directly on w/w mutexes, which otherwise result in the w/w tasks reading uninitialized data. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-12-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar include/linux/poison.h | 1 + kernel/locking/mutex.c | 4 ++++ 2 files changed, 5 insertions(+) commit c516df978df1471793aaa4809b390ecd40fa93c2 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:38 2016 +0100 locking/ww_mutex: Optimize ww-mutexes by yielding to other waiters from optimistic spin Lock stealing is less beneficial for w/w mutexes since we may just end up backing off if we stole from a thread with an earlier acquire stamp that already holds another w/w mutex that we also need. So don't spin optimistically unless we are sure that there is no other waiter that might cause us to back off. Median timings taken of a contention-heavy GPU workload: Before: real 0m52.946s user 0m7.272s sys 1m55.964s After: real 0m53.086s user 0m7.360s sys 1m46.204s This particular workload still spends 20%-25% of CPU in mutex_spin_on_owner according to perf, but my attempts to further reduce this spinning based on various heuristics all lead to an increase in measured wall time despite the decrease in sys time. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-11-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 78 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 26 deletions(-) commit 25f13b4040b68dfc5a2a22e7234894e718e3f4c5 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:37 2016 +0100 locking/ww_mutex: Re-check ww->ctx in the inner optimistic spin loop In the following scenario, thread #1 should back off its attempt to lock ww1 and unlock ww2 (assuming the acquire context stamps are ordered accordingly). Thread #0 Thread #1 --------- --------- successfully lock ww2 set ww1->base.owner attempt to lock ww1 confirm ww1->ctx == NULL enter mutex_spin_on_owner set ww1->ctx What was likely to happen previously is: attempt to lock ww2 refuse to spin because ww2->ctx != NULL schedule() detect thread #0 is off CPU stop optimistic spin return -EDEADLK unlock ww2 wakeup thread #0 lock ww2 Now, we are more likely to see: detect ww1->ctx != NULL stop optimistic spin return -EDEADLK unlock ww2 successfully lock ww2 ... because thread #1 will stop its optimistic spin as soon as possible. The whole scenario is quite unlikely, since it requires thread #1 to get between thread #0 setting the owner and setting the ctx. But since we're idling here anyway, the additional check is basically free. Found by inspection. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-10-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) commit 427b18207a87f6306bd53a74e03dbe17392b0045 Author: Peter Zijlstra Date: Fri Dec 23 10:36:00 2016 +0100 locking/mutex: Improve inlining Instead of inlining __mutex_lock_common() 5 times, once for each {state,ww} variant. Reduce this to two, ww and !ww. Then add __always_inline to mutex_optimistic_spin(), so that that will get inlined all 4 remaining times, for all {waiter,ww} variants. text data bss dec hex filename 6301 0 0 6301 189d defconfig-build/kernel/locking/mutex.o 4053 0 0 4053 fd5 defconfig-build/kernel/locking/mutex.o 4257 0 0 4257 10a1 defconfig-build/kernel/locking/mutex.o This reduces total text size and better separates the ww and !ww mutex code generation. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 85 ++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 41 deletions(-) commit 659cf9f5824a12e6b50785e4e9cf1adf8a3adbd0 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:36 2016 +0100 locking/ww_mutex: Optimize ww-mutexes by waking at most one waiter for backoff when acquiring the lock The wait list is sorted by stamp order, and the only waiting task that may have to back off is the first waiter with a context. The regular slow path does not have to wake any other tasks at all, since all other waiters that would have to back off were either woken up when the waiter was added to the list, or detected the condition before they added themselves. Median timings taken of a contention-heavy GPU workload: Without this series: real 0m59.900s user 0m7.516s sys 2m16.076s With changes up to and including this patch: real 0m52.946s user 0m7.272s sys 1m55.964s Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-9-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 59 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 19 deletions(-) commit 200b1874401555e9b36010aa318e75cf57005f36 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:35 2016 +0100 locking/ww_mutex: Notify waiters that have to back off while adding tasks to wait list While adding our task as a waiter, detect if another task should back off because of us. With this patch, we establish the invariant that the wait list contains at most one (sleeping) waiter with ww_ctx->acquired > 0, and this waiter will be the first waiter with a context. Since only waiters with ww_ctx->acquired > 0 have to back off, this allows us to be much more economical with wakeups. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-8-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 6baa5c60a97d7f1a37a4b5ab5fb3a450e56e8b06 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:34 2016 +0100 locking/ww_mutex: Add waiters in stamp order Add regular waiters in stamp order. Keep adding waiters that have no context in FIFO order and take care not to starve them. While adding our task as a waiter, back off if we detect that there is a waiter with a lower stamp in front of us. Make sure to call lock_contended even when we back off early. For w/w mutexes, being first in the wait list is only stable when taking the lock without a context. Therefore, the purpose of the first flag is split into two: 'first' remains to indicate whether we want to spin optimistically, while 'handoff' indicates that we should be prepared to accept a handoff. For w/w locking with a context, we always accept handoffs after the first schedule(), to handle the following sequence of events: 1. Task #0 unlocks and hands off to Task #2 which is first in line 2. Task #1 adds itself in front of Task #2 3. Task #2 wakes up and must accept the handoff even though it is no longer first in line Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-7-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar include/linux/mutex.h | 3 ++ kernel/locking/mutex.c | 76 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 72 insertions(+), 7 deletions(-) commit c5470b22d1833241cae996d23a8a346ff8ec4d58 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:33 2016 +0100 locking/ww_mutex: Remove the __ww_mutex_lock*() inline wrappers Keep the documentation in the header file since there is no good place for it in mutex.c: there are two rather different implementations with different EXPORT_SYMBOLs for each function. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-6-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar include/linux/ww_mutex.h | 18 ++++-------------- kernel/locking/mutex.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 22 deletions(-) commit ea9e0fb8fe1bdfca81bd76052a5cce70bb053430 Author: Nicolai Hähnle Date: Wed Dec 21 19:46:32 2016 +0100 locking/ww_mutex: Set use_ww_ctx even when locking without a context We will add a new field to struct mutex_waiter. This field must be initialized for all waiters if any waiter uses the ww_use_ctx path. So there is a trade-off: Keep ww_mutex locking without a context on the faster non-use_ww_ctx path, at the cost of adding the initialization to all mutex locks (including non-ww_mutexes), or avoid the additional cost for non-ww_mutex locks, at the cost of adding additional checks to the use_ww_ctx path. We take the latter choice. It may be worth eliminating the users of ww_mutex_lock(lock, NULL), but there are a lot of them. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-5-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar include/linux/ww_mutex.h | 11 ++--------- kernel/locking/mutex.c | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 21 deletions(-) commit 3822da3ed0676e01f83fe0518c333c8e9ba249bf Author: Nicolai Hähnle Date: Wed Dec 21 19:46:31 2016 +0100 locking/ww_mutex: Extract stamp comparison to __ww_mutex_stamp_after() The function will be re-used in subsequent patches. Signed-off-by: Nicolai Hähnle Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chris Wilson Cc: Andrew Morton Cc: Daniel Vetter Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/1482346000-9927-4-git-send-email-nhaehnle@gmail.com Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e274795ea7b7caa0fd74ef651594382a69e2a951 Author: Peter Zijlstra Date: Wed Jan 11 14:17:48 2017 +0100 locking/mutex: Fix mutex handoff While reviewing the ww_mutex patches, I noticed that it was still possible to (incorrectly) succeed for (incorrect) code like: mutex_lock(&a); mutex_lock(&a); This was possible if the second mutex_lock() would block (as expected) but then receive a spurious wakeup. At that point it would find itself at the front of the queue, request a handoff and instantly claim ownership and continue, since owner would point to itself. Avoid this scenario and simplify the code by introducing a third low bit to signal handoff pickup. So once we request handoff, unlock clears the handoff bit and sets the pickup bit along with the new owner. This also removes the need for the .handoff argument to __mutex_trylock(), since that becomes superfluous with PICKUP. In order to guarantee enough low bits, ensure task_struct alignment is at least L1_CACHE_BYTES (which seems a good ideal regardless). Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 9d659ae14b54 ("locking/mutex: Add lock handoff to avoid starvation") Signed-off-by: Ingo Molnar include/linux/mutex.h | 2 +- kernel/fork.c | 6 ++- kernel/locking/mutex.c | 108 ++++++++++++++++++++++++------------------------- 3 files changed, 57 insertions(+), 59 deletions(-) commit 52b94129f274937e4c25dd17b76697664a3c43c9 Author: Davidlohr Bueso Date: Wed Jan 11 07:22:26 2017 -0800 locking/percpu-rwsem: Replace waitqueue with rcuwait The use of any kind of wait queue is an overkill for pcpu-rwsems. While one option would be to use the less heavy simple (swait) flavor, this is still too much for what pcpu-rwsems needs. For one, we do not care about any sort of queuing in that the only (rare) time writers (and readers, for that matter) are queued is when trying to acquire the regular contended rw_sem. There cannot be any further queuing as writers are serialized by the rw_sem in the first place. Given that percpu_down_write() must not be called after exit_notify(), we can replace the bulky waitqueue with rcuwait such that a writer can wait for its turn to take the lock. As such, we can avoid the queue handling and locking overhead. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1484148146-14210-3-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 8 ++++---- kernel/locking/percpu-rwsem.c | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) commit 8f95c90ceb541a38ac16fec48c05142ef1450c25 Author: Davidlohr Bueso Date: Wed Jan 11 07:22:25 2017 -0800 sched/wait, RCU: Introduce rcuwait machinery rcuwait provides support for (single) RCU-safe task wait/wake functionality, with the caveat that it must not be called after exit_notify(), such that we avoid racing with rcu delayed_put_task_struct callbacks, task_struct being rcu unaware in this context -- for which we similarly have task_rcu_dereference() magic, but with different return semantics, which can conflict with the wakeup side. The interfaces are quite straightforward: rcuwait_wait_event() rcuwait_wake_up() More details are in the comments, but it's perhaps worth mentioning at least, that users must provide proper serialization when waiting on a condition, and avoid corrupting a concurrent waiter. Also care must be taken between the task and the condition for when calling the wakeup -- we cannot miss wakeups. When porting users, this is for example, a given when using waitqueues in that everything is done under the q->lock. As such, it can remove sources of non preemptable unbounded work for realtime. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1484148146-14210-2-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar include/linux/rcuwait.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/exit.c | 30 +++++++++++++++++++++++ 2 files changed, 93 insertions(+) commit 642fa448ae6b3a4e5e8737054a094173405b7643 Author: Davidlohr Bueso Date: Tue Jan 3 13:43:14 2017 -0800 sched/core: Remove set_task_state() This is a nasty interface and setting the state of a foreign task must not be done. As of the following commit: be628be0956 ("bcache: Make gc wakeup sane, remove set_task_state()") ... everyone in the kernel calls set_task_state() with current, allowing the helper to be removed. However, as the comment indicates, it is still around for those archs where computing current is more expensive than using a pointer, at least in theory. An important arch that is affected is arm64, however this has been addressed now [1] and performance is up to par making no difference with either calls. Of all the callers, if any, it's the locking bits that would care most about this -- ie: we end up passing a tsk pointer to a lot of the lock slowpath, and setting ->state on that. The following numbers are based on two tests: a custom ad-hoc microbenchmark that just measures latencies (for ~65 million calls) between get_task_state() vs get_current_state(). Secondly for a higher overview, an unlink microbenchmark was used, which pounds on a single file with open, close,unlink combos with increasing thread counts (up to 4x ncpus). While the workload is quite unrealistic, it does contend a lot on the inode mutex or now rwsem. [1] https://lkml.kernel.org/r/1483468021-8237-1-git-send-email-mark.rutland@arm.com == 1. x86-64 == Avg runtime set_task_state(): 601 msecs Avg runtime set_current_state(): 552 msecs vanilla dirty Hmean unlink1-processes-2 36089.26 ( 0.00%) 38977.33 ( 8.00%) Hmean unlink1-processes-5 28555.01 ( 0.00%) 29832.55 ( 4.28%) Hmean unlink1-processes-8 37323.75 ( 0.00%) 44974.57 ( 20.50%) Hmean unlink1-processes-12 43571.88 ( 0.00%) 44283.01 ( 1.63%) Hmean unlink1-processes-21 34431.52 ( 0.00%) 38284.45 ( 11.19%) Hmean unlink1-processes-30 34813.26 ( 0.00%) 37975.17 ( 9.08%) Hmean unlink1-processes-48 37048.90 ( 0.00%) 39862.78 ( 7.59%) Hmean unlink1-processes-79 35630.01 ( 0.00%) 36855.30 ( 3.44%) Hmean unlink1-processes-110 36115.85 ( 0.00%) 39843.91 ( 10.32%) Hmean unlink1-processes-141 32546.96 ( 0.00%) 35418.52 ( 8.82%) Hmean unlink1-processes-172 34674.79 ( 0.00%) 36899.21 ( 6.42%) Hmean unlink1-processes-203 37303.11 ( 0.00%) 36393.04 ( -2.44%) Hmean unlink1-processes-224 35712.13 ( 0.00%) 36685.96 ( 2.73%) == 2. ppc64le == Avg runtime set_task_state(): 938 msecs Avg runtime set_current_state: 940 msecs vanilla dirty Hmean unlink1-processes-2 19269.19 ( 0.00%) 30704.50 ( 59.35%) Hmean unlink1-processes-5 20106.15 ( 0.00%) 21804.15 ( 8.45%) Hmean unlink1-processes-8 17496.97 ( 0.00%) 17243.28 ( -1.45%) Hmean unlink1-processes-12 14224.15 ( 0.00%) 17240.21 ( 21.20%) Hmean unlink1-processes-21 14155.66 ( 0.00%) 15681.23 ( 10.78%) Hmean unlink1-processes-30 14450.70 ( 0.00%) 15995.83 ( 10.69%) Hmean unlink1-processes-48 16945.57 ( 0.00%) 16370.42 ( -3.39%) Hmean unlink1-processes-79 15788.39 ( 0.00%) 14639.27 ( -7.28%) Hmean unlink1-processes-110 14268.48 ( 0.00%) 14377.40 ( 0.76%) Hmean unlink1-processes-141 14023.65 ( 0.00%) 16271.69 ( 16.03%) Hmean unlink1-processes-172 13417.62 ( 0.00%) 16067.55 ( 19.75%) Hmean unlink1-processes-203 15293.08 ( 0.00%) 15440.40 ( 0.96%) Hmean unlink1-processes-234 13719.32 ( 0.00%) 16190.74 ( 18.01%) Hmean unlink1-processes-265 16400.97 ( 0.00%) 16115.22 ( -1.74%) Hmean unlink1-processes-296 14388.60 ( 0.00%) 16216.13 ( 12.70%) Hmean unlink1-processes-320 15771.85 ( 0.00%) 15905.96 ( 0.85%) x86-64 (known to be fast for get_current()/this_cpu_read_stable() caching) and ppc64 (with paca) show similar improvements in the unlink microbenches. The small delta for ppc64 (2ms), does not represent the gains on the unlink runs. In the case of x86, there was a decent amount of variation in the latency runs, but always within a 20 to 50ms increase), ppc was more constant. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: mark.rutland@arm.com Link: http://lkml.kernel.org/r/1483479794-14013-5-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar arch/um/drivers/random.c | 2 +- drivers/md/dm-bufio.c | 2 +- drivers/md/dm-crypt.c | 4 ++-- drivers/md/persistent-data/dm-block-manager.c | 4 ++-- .../staging/lustre/lnet/libcfs/linux/linux-debug.c | 2 +- drivers/tty/tty_ldsem.c | 10 ++++---- include/linux/sched.h | 27 +--------------------- kernel/exit.c | 4 ++-- kernel/locking/mutex.c | 8 +++---- kernel/locking/rwsem-spinlock.c | 8 +++---- kernel/locking/rwsem-xadd.c | 4 ++-- kernel/locking/semaphore.c | 2 +- 12 files changed, 26 insertions(+), 51 deletions(-) commit d269a8b8c57523a2e328c1ff44fe791e13df3d37 Author: Davidlohr Bueso Date: Tue Jan 3 13:43:13 2017 -0800 kernel/locking: Compute 'current' directly This patch effectively replaces the tsk pointer dereference (which is obviously == current), to directly use get_current() macro. This is to make the removal of setting foreign task states smoother and painfully obvious. Performance win on some archs such as x86-64 and ppc64. On a microbenchmark that calls set_task_state() vs set_current_state() and an inode rwsem pounding benchmark doing unlink: == 1. x86-64 == Avg runtime set_task_state(): 601 msecs Avg runtime set_current_state(): 552 msecs vanilla dirty Hmean unlink1-processes-2 36089.26 ( 0.00%) 38977.33 ( 8.00%) Hmean unlink1-processes-5 28555.01 ( 0.00%) 29832.55 ( 4.28%) Hmean unlink1-processes-8 37323.75 ( 0.00%) 44974.57 ( 20.50%) Hmean unlink1-processes-12 43571.88 ( 0.00%) 44283.01 ( 1.63%) Hmean unlink1-processes-21 34431.52 ( 0.00%) 38284.45 ( 11.19%) Hmean unlink1-processes-30 34813.26 ( 0.00%) 37975.17 ( 9.08%) Hmean unlink1-processes-48 37048.90 ( 0.00%) 39862.78 ( 7.59%) Hmean unlink1-processes-79 35630.01 ( 0.00%) 36855.30 ( 3.44%) Hmean unlink1-processes-110 36115.85 ( 0.00%) 39843.91 ( 10.32%) Hmean unlink1-processes-141 32546.96 ( 0.00%) 35418.52 ( 8.82%) Hmean unlink1-processes-172 34674.79 ( 0.00%) 36899.21 ( 6.42%) Hmean unlink1-processes-203 37303.11 ( 0.00%) 36393.04 ( -2.44%) Hmean unlink1-processes-224 35712.13 ( 0.00%) 36685.96 ( 2.73%) == 2. ppc64le == Avg runtime set_task_state(): 938 msecs Avg runtime set_current_state: 940 msecs vanilla dirty Hmean unlink1-processes-2 19269.19 ( 0.00%) 30704.50 ( 59.35%) Hmean unlink1-processes-5 20106.15 ( 0.00%) 21804.15 ( 8.45%) Hmean unlink1-processes-8 17496.97 ( 0.00%) 17243.28 ( -1.45%) Hmean unlink1-processes-12 14224.15 ( 0.00%) 17240.21 ( 21.20%) Hmean unlink1-processes-21 14155.66 ( 0.00%) 15681.23 ( 10.78%) Hmean unlink1-processes-30 14450.70 ( 0.00%) 15995.83 ( 10.69%) Hmean unlink1-processes-48 16945.57 ( 0.00%) 16370.42 ( -3.39%) Hmean unlink1-processes-79 15788.39 ( 0.00%) 14639.27 ( -7.28%) Hmean unlink1-processes-110 14268.48 ( 0.00%) 14377.40 ( 0.76%) Hmean unlink1-processes-141 14023.65 ( 0.00%) 16271.69 ( 16.03%) Hmean unlink1-processes-172 13417.62 ( 0.00%) 16067.55 ( 19.75%) Hmean unlink1-processes-203 15293.08 ( 0.00%) 15440.40 ( 0.96%) Hmean unlink1-processes-234 13719.32 ( 0.00%) 16190.74 ( 18.01%) Hmean unlink1-processes-265 16400.97 ( 0.00%) 16115.22 ( -1.74%) Hmean unlink1-processes-296 14388.60 ( 0.00%) 16216.13 ( 12.70%) Hmean unlink1-processes-320 15771.85 ( 0.00%) 15905.96 ( 0.85%) Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: mark.rutland@arm.com Link: http://lkml.kernel.org/r/1483479794-14013-4-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 19 +++++++++---------- kernel/locking/rwsem-spinlock.c | 18 +++++++----------- kernel/locking/rwsem-xadd.c | 7 +++---- kernel/locking/semaphore.c | 7 +++---- 4 files changed, 22 insertions(+), 29 deletions(-) commit 5376f2e722026e91cb46384bda8d8b3e9f88217c Author: Davidlohr Bueso Date: Tue Jan 3 13:43:12 2017 -0800 drivers/tty: Compute 'current' directly This patch effectively replaces the tsk pointer dereference (which is obviously == current), to directly use get_current() macro. This is to make the removal of setting foreign task states smoother and painfully obvious. Performance win on some archs such as x86-64 and ppc64 -- arm64 is no longer an issue. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: mark.rutland@arm.com Link: http://lkml.kernel.org/r/1483479794-14013-3-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar drivers/tty/tty_ldsem.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 0039962a1473f07fd5c8355bd8264be1eb87eb3e Author: Davidlohr Bueso Date: Tue Jan 3 13:43:11 2017 -0800 kernel/exit: Compute 'current' directly This patch effectively replaces the tsk pointer dereference (which is obviously == current), to directly use get_current() macro. In this case, do_exit() always passes current to exit_mm(), hence we can simply get rid of the argument. This is also a performance win on some archs such as x86-64 and ppc64 -- arm64 is no longer an issue. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: mark.rutland@arm.com Link: http://lkml.kernel.org/r/1483479794-14013-2-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/exit.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c8d7dabf8f91fadd265e6eb87afb201d14ea299b Author: Frederic Weisbecker Date: Thu Jan 5 18:11:50 2017 +0100 sched/cputime: Rename vtime_account_user() to vtime_flush() CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y used to accumulate user time and account it on ticks and context switches only through the vtime_account_user() function. Now this model has been generalized on the 3 archs for all kind of cputime (system, irq, ...) and all the cputime flushing happens under vtime_account_user(). So let's rename this function to better reflect its new role. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Acked-by: Martin Schwidefsky Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-11-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 2 +- arch/powerpc/kernel/time.c | 6 ++---- arch/s390/kernel/vtime.c | 2 +- include/linux/kernel_stat.h | 2 +- include/linux/vtime.h | 7 +++++-- kernel/sched/cputime.c | 4 +--- 6 files changed, 11 insertions(+), 12 deletions(-) commit b7394a5f4ce9542666cc68422c3594ea854adc2c Author: Martin Schwidefsky Date: Thu Jan 5 18:11:49 2017 +0100 sched/cputime, s390: Implement delayed accounting of system time The account_system_time() function is called with a cputime that occurred while running in the kernel. The function detects which context the CPU is currently running in and accounts the time to the correct bucket. This forces the arch code to account the cputime for hardirq and softirq immediately. Such accounting function can be costly and perform unwelcome divisions and multiplications, among others. The arch code can delay the accounting for system time. For s390 the accounting is done once per timer tick and for each task switch. Signed-off-by: Martin Schwidefsky Signed-off-by: Frederic Weisbecker [ Rebase against latest linus tree and move account_system_index_scaled(). ] Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-10-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/s390/include/asm/lowcore.h | 65 +++++++++--------- arch/s390/include/asm/processor.h | 3 + arch/s390/kernel/vtime.c | 136 ++++++++++++++++++++++++-------------- 3 files changed, 125 insertions(+), 79 deletions(-) commit 7dd582305d19fd178bb42ecd1666285ecfb1657a Author: Frederic Weisbecker Date: Thu Jan 5 18:11:48 2017 +0100 sched/cputime, ia64: Accumulate cputime and account only on tick/task switch Currently CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y accounts the cputime on any context boundary: irq entry/exit, guest entry/exit, context switch, etc... Calling functions such as account_system_time(), account_user_time() and such can be costly, especially if they are called on many fastpath such as twice per IRQ. Those functions do more than just accounting to kcpustat and task cputime. Depending on the config, some subsystems can perform unpleasant multiplications and divisions, among other things. So lets accumulate the cputime instead and delay the accounting on ticks and context switches only. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-9-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/include/asm/thread_info.h | 6 ++++ arch/ia64/kernel/time.c | 62 ++++++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 15 deletions(-) commit a19ff1a2cc9227f82e97836a8ee3e593f622eaf9 Author: Frederic Weisbecker Date: Thu Jan 5 18:11:47 2017 +0100 sched/cputime, powerpc/vtime: Accumulate cputime and account only on tick/task switch Currently CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y accounts the cputime on any context boundary: irq entry/exit, guest entry/exit, context switch, etc... Calling functions such as account_system_time(), account_user_time() and such can be costly, especially if they are called on many fastpath such as twice per IRQ. Those functions do more than just accounting to kcpustat and task cputime. Depending on the config, some subsystems can perform unpleasant multiplications and divisions, among other things. So lets accumulate the cputime instead and delay the accounting on ticks and context switches only. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-8-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/kernel/time.c | 120 +++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 43 deletions(-) commit f828c3d0aebab130a19d36336b50afa3414fa0bc Author: Frederic Weisbecker Date: Thu Jan 5 18:11:46 2017 +0100 sched/cputime, powerpc: Migrate stolen_time field to the accounting structure That in order to gather all cputime accumulation to the same place. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-7-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/include/asm/paca.h | 1 - arch/powerpc/kernel/time.c | 6 +++--- arch/powerpc/xmon/xmon.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 8c8b73c4811f2b5e458a7418dca07d2ef85c7db1 Author: Frederic Weisbecker Date: Thu Jan 5 18:11:45 2017 +0100 sched/cputime, powerpc: Prepare accounting structure for cputime flush on tick In order to prepare for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y to delay cputime accounting to the tick, provide finegrained accumulators to powerpc in order to store the cputime until flushing. While at it, normalize the name of several fields according to common cputime naming. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-6-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/include/asm/accounting.h | 14 +++++++++++--- arch/powerpc/kernel/asm-offsets.c | 8 ++++---- arch/powerpc/kernel/time.c | 31 ++++++++++++++++--------------- arch/powerpc/xmon/xmon.c | 6 +++--- 4 files changed, 34 insertions(+), 25 deletions(-) commit 1213699ab426608ff1925ab263dd6925102bb92a Author: Frederic Weisbecker Date: Thu Jan 5 18:11:44 2017 +0100 sched/cputime: Export account_guest_time() In order to prepare for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y to delay cputime accounting to the tick, let's allow archs to account cputime directly to gtime. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-5-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/kernel_stat.h | 1 + kernel/sched/cputime.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit c31cc6a5187e8b09ccee34f81728a90f80e872e7 Author: Frederic Weisbecker Date: Thu Jan 5 18:11:43 2017 +0100 sched/cputime: Allow accounting system time using cpustat index In order to prepare for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y to delay cputime accounting to the tick, let's provide APIs to account system time to precise contexts: hardirq, softirq, pure system, ... Inspired-by: Martin Schwidefsky Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/kernel_stat.h | 2 ++ kernel/sched/cputime.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 8388d21468e7e7656867b67ab2ec98a78c9ad799 Author: Frederic Weisbecker Date: Thu Jan 5 18:11:42 2017 +0100 sched/cputime, ia64: Fix incorrect start cputime assignment on task switch On task switch we must initialize the current cputime of the next task using the value of the previous task which got freshly updated. But we are confusing that with doing the opposite, which should result in incorrect cputime accounting. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90d08ba2b9b4be4aeca6a5b5a4b09fbcde30194d Author: Frederic Weisbecker Date: Thu Jan 5 18:11:41 2017 +0100 sched/cputime, powerpc32: Fix stale scaled stime on context switch On context switch with powerpc32, the cputime is accumulated in the thread_info struct. So the switching-in task must move forward its start time snapshot to the current time in order to later compute the delta spent in system mode. This is what we do for the normal cputime by initializing the starttime field to the value of the previous task's starttime which got freshly updated. But we are missing the update of the scaled cputime start time. As a result we may be accounting too much scaled cputime later. Fix this by initializing the scaled cputime the same way we do for normal cputime. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar arch/powerpc/kernel/time.c | 1 + 1 file changed, 1 insertion(+) commit aef591cd3d1ddccb268f64c836d38382007373c1 Author: Waiman Long Date: Thu Jan 12 15:27:58 2017 -0500 locking/spinlocks/x86, paravirt: Remove paravirt_ticketlocks_enabled This is a follow-up of commit: cfd8983f03c7b2 ("x86, locking/spinlocks: Remove ticket (spin)lock implementation") The static_key structure 'paravirt_ticketlocks_enabled' is now removed as it is no longer used. As a result, the init functions kvm_spinlock_init_jump() and xen_init_spinlocks_jump() are also removed. A simple build and boot test was done to verify it. Signed-off-by: Waiman Long Reviewed-by: Boris Ostrovsky Cc: Alok Kataria Cc: Chris Wright Cc: Jeremy Fitzhardinge Cc: Juergen Gross Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rusty Russell Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1484252878-1962-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/spinlock.h | 3 --- arch/x86/kernel/kvm.c | 14 -------------- arch/x86/kernel/paravirt-spinlocks.c | 3 --- arch/x86/xen/spinlock.c | 19 ------------------- 4 files changed, 39 deletions(-) commit 1753187e288aacabfa8d61e4465f234fd80599fe Author: Takashi Sakamoto Date: Fri Jan 13 20:30:22 2017 +0900 ALSA: oxfw: enclose identifiers referred by single function for scs1x feature Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-scs1x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 81a71176740624ef3b1bff50c51e7b4aa187353d Author: Mike Travis Date: Fri Jan 13 09:21:12 2017 -0600 x86/platform/UV: Fix 2 socket config problem A UV4 chassis with only 2 sockets configured can unexpectedly target the wrong UV hub. Fix the problem by limiting the minimum size of a partition to 4 sockets even if only 2 are configured. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170113152111.313888353@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit eee5715efd8c268724b14c956de6af5d4931f470 Author: Mike Travis Date: Fri Jan 13 09:21:11 2017 -0600 x86/platform/UV: Fix panic with missing UVsystab support Fix the panic where KEXEC'd kernel does not have access to EFI runtime mappings. This may cause the extended UVsystab to not be available. The solution is to revert to non-UV mode and continue with limited capabilities. Signed-off-by: Mike Travis Reviewed-by: Russ Anderson Reviewed-by: Alex Thorlton Acked-by: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170113152111.118886202@asylum.americas.sgi.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 5b485629ba0d5d027880769ff467c587b24b4bde Author: Masami Hiramatsu Date: Sun Jan 8 23:58:09 2017 +0900 kprobes, extable: Identify kprobes trampolines as kernel text area Improve __kernel_text_address()/kernel_text_address() to return true if the given address is on a kprobe's instruction slot trampoline. This can help stacktraces to determine the address is on a text area or not. To implement this atomically in is_kprobe_*_slot(), also change the insn_cache page list to an RCU list. This changes timings a bit (it delays page freeing to the RCU garbage collection phase), but none of that is in the hot path. Note: this change can add small overhead to stack unwinders because it adds 2 additional checks to __kernel_text_address(). However, the impact should be very small, because kprobe_insn_pages list has 1 entry per 256 probes(on x86, on arm/arm64 it will be 1024 probes), and kprobe_optinsn_pages has 1 entry per 32 probes(on x86). In most use cases, the number of kprobe events may be less than 20, which means that is_kprobe_*_slot() will check just one entry. Tested-by: Josh Poimboeuf Signed-off-by: Masami Hiramatsu Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Ananth N Mavinakayanahalli Cc: Andrew Morton Cc: Andrey Konovalov Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/148388747896.6869.6354262871751682264.stgit@devbox [ Improved the changelog and coding style. ] Signed-off-by: Ingo Molnar include/linux/kprobes.h | 30 +++++++++++++++++++- kernel/extable.c | 9 +++++- kernel/kprobes.c | 73 ++++++++++++++++++++++++++++++++++++------------- 3 files changed, 91 insertions(+), 21 deletions(-) commit de1c2540aa4f7796f31acf5432597bb0eb086250 Author: Andy Shevchenko Date: Fri Jan 13 18:43:55 2017 +0200 x86/platform/intel-mid: Enable RTC on Intel Merrifield Intel Merrifield has legacy RTC in contrast to the rest on Intel MID platforms. Set legacy RTC flag explicitly in architecture initialization code and allocate interrupt for it. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170113164355.66161-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/mrfld.c | 1 + arch/x86/platform/intel-mid/sfi.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit a665ece8b471de45bc19af05d52a1eaa5bc06dca Author: Andy Shevchenko Date: Thu Jan 12 13:23:31 2017 +0200 x86/platform/intel: Remove PMIC GPIO block support Moorestown support was removed by commit: 1a8359e411eb ("x86/mid: Remove Intel Moorestown") Remove this leftover. Signed-off-by: Andy Shevchenko Cc: Darren Hart Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: platform-driver-x86@vger.kernel.org Link: http://lkml.kernel.org/r/20170112112331.93236-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/sfi.c | 1 - drivers/platform/x86/Kconfig | 7 - drivers/platform/x86/Makefile | 1 - drivers/platform/x86/intel_pmic_gpio.c | 326 --------------------------------- include/linux/intel_pmic_gpio.h | 15 -- 5 files changed, 350 deletions(-) commit f750e82e7fcba219a0b401d75a58d9fbd956744c Author: Ganesh Goudar Date: Fri Jan 13 14:46:40 2017 +0530 cxgb4: Fix misleading packet/frame count stats. Do not count pause frames as part of general TX/RX frame counters. Based on the original work of Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 18 ++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) commit 4b89aa3c16f9e59fafea6d87b68b9585a7a63589 Merge: 718e14b 2f59384 Author: David S. Miller Date: Fri Jan 13 23:21:31 2017 -0500 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Misc. updates for net-next. Miscellaneous updates including firmware spec update, ethtool -p blinking LED support, RDMA SRIOV config callback, and minor fixes. v2: Dropped the DCBX RoCE app TLV patch until the ETH_P_IBOE RDMA patch is merged. ==================== Signed-off-by: David S. Miller commit 2f5938467bd7f34e59a1d6d3809f5970f62e194b Author: Michael Chan Date: Fri Jan 13 01:32:04 2017 -0500 bnxt_en: Add the ulp_sriov_cfg hooks for bnxt_re RDMA driver. Add the ulp_sriov_cfg callbacks when the number of VFs is changing. This allows the RDMA driver to provision RDMA resources for the VFs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ad2cbeed74bd1e89ac4ba14288158ec7eb167da Author: Michael Chan Date: Fri Jan 13 01:32:03 2017 -0500 bnxt_en: Add support for ethtool -p. Add LED blinking code to support ethtool -p on the PF. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 40 +++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 17 +++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 44 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 23 ++++++++++++ 4 files changed, 123 insertions(+), 1 deletion(-) commit f183886c0d798ca3cf0a51e8cab3c1902fbd1e8b Author: Michael Chan Date: Fri Jan 13 01:32:02 2017 -0500 bnxt_en: Update to firmware interface spec to 1.6.1. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 261 +++++++++++++++++++++++--- 1 file changed, 237 insertions(+), 24 deletions(-) commit 341138c3e6afa8e77f9f3e773d72b37022dbcee8 Author: Michael Chan Date: Fri Jan 13 01:32:01 2017 -0500 bnxt_en: Clear TPA flags when BNXT_FLAG_NO_AGG_RINGS is set. Commit bdbd1eb59c56 ("bnxt_en: Handle no aggregation ring gracefully.") introduced the BNXT_FLAG_NO_AGG_RINGS flag. For consistency, bnxt_set_tpa_flags() should also clear TPA flags when there are no aggregation rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) commit b742995445fbac874f5fe19ce2afc76c7a6ac2cf Author: Michael Chan Date: Fri Jan 13 01:32:00 2017 -0500 bnxt_en: Fix compiler warnings when CONFIG_RFS_ACCEL is not defined. CC [M] drivers/net/ethernet/broadcom/bnxt/bnxt.o drivers/net/ethernet/broadcom/bnxt/bnxt.c:4947:21: warning: ‘bnxt_get_max_func_rss_ctxs’ defined but not used [-Wunused-function] static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp) ^ CC [M] drivers/net/ethernet/broadcom/bnxt/bnxt.o drivers/net/ethernet/broadcom/bnxt/bnxt.c:4956:21: warning: ‘bnxt_get_max_func_vnics’ defined but not used [-Wunused-function] static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp) ^ Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) commit 718e14bb292a2e16b506133d191886110417df51 Merge: 7410191 94bdc97 Author: David S. Miller Date: Fri Jan 13 22:37:18 2017 -0500 Merge branch 'tcp-RACK-fast-recovery' Yuchung Cheng says: ==================== tcp: RACK fast recovery The patch set enables RACK loss detection (draft-ietf-tcpm-rack-01) to trigger fast recovery with a reordering timer. Previously RACK has been running in auxiliary mode where it is used to detect packet losses once the recovery has triggered by other algorithms (e.g., FACK). By inspecting packet timestamps, RACK can start ACK-driven repairs timely. A few similar heuristics are no longer needed and are either removed or disabled to reduce the complexity of the Linux TCP loss recovery engine: 1. FACK (Forward Acknowledgement) 2. Early Retransmit (RFC5827) 3. thin_dupack (fast recovery on single DUPACK for thin-streams) 4. NCR (Non-Congestion Robustness RFC4653) (RFC4653) 5. Forward Retransmit After this change, Linux's loss recovery algorithms consist of 1. Conventional DUPACK threshold approach (RFC6675) 2. RACK and Tail Loss Probe (draft-ietf-tcpm-rack-01) 3. RTO plus F-RTO extension (RFC5682) The patch set has been tested on Google servers extensively and presented in several IETF meetings. The data suggests that RACK successfully improves recovery performance: https://www.ietf.org/proceedings/97/slides/slides-97-tcpm-draft-ietf-tcpm-rack-01.pdf https://www.ietf.org/proceedings/96/slides/slides-96-tcpm-3.pdf ==================== Signed-off-by: David S. Miller commit 94bdc9785a1136cef6a982b042719783978e8a26 Author: Yuchung Cheng Date: Thu Jan 12 22:11:42 2017 -0800 tcp: disable fack by default This patch disables FACK by default as RACK is the successor of FACK (inspired by the insights behind FACK). FACK[1] in Linux works as follows: a packet P is deemed lost, if packet Q of higher sequence is s/acked and P and Q are distant by at least dupthresh number of packets in sequence space. FACK is more aggressive than the IETF recommened recovery for SACK (RFC3517 A Conservative Selective Acknowledgment (SACK)-based Loss Recovery Algorithm for TCP), because a single SACK may trigger fast recovery. This obviously won't work well with reordering so FACK is dynamically disabled upon detecting reordering. RACK supersedes FACK by using time distance instead of sequence distance. On reordering, RACK waits for a quarter of RTT receiving a single SACK before starting recovery. (the timer can be made more adaptive in the future by measuring reordering distance in time, but currently RTT/4 seem to work well.) Once the recovery starts, RACK behaves almost like FACK because it reduces the reodering window to 1ms, so it fast retransmits quickly. In addition RACK can detect loss retransmission as it does not care about the packet sequences (being repeated or not), which is extremely useful when the connection is going through a traffic policer. Google server experiments indicate that disabling FACK after enabling RACK has negligible impact on the overall loss recovery performance with more reordering events detected. But we still keep the FACK implementation for backup if RACK has bugs that needs to be disabled. [1] M. Mathis, J. Mahdavi, "Forward Acknowledgment: Refining TCP Congestion Control," In Proceedings of SIGCOMM '96, August 1996. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4a7f6009441144783e5925551c72e3f2e1b0839b Author: Yuchung Cheng Date: Thu Jan 12 22:11:41 2017 -0800 tcp: remove thin_dupack feature Thin stream DUPACK is to start fast recovery on only one DUPACK provided the connection is a thin stream (i.e., low inflight). But this older feature is now subsumed with RACK. If a connection receives only a single DUPACK, RACK would arm a reordering timer and soon starts fast recovery instead of timeout if no further ACKs are received. The socket option (THIN_DUPACK) is kept as a nop for compatibility. Note that this patch does not change another thin-stream feature which enables linear RTO. Although it might be good to generalize that in the future (i.e., linear RTO for the first say 3 retries). Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 12 ------------ include/linux/tcp.h | 2 +- net/ipv4/sysctl_net_ipv4.c | 7 ------- net/ipv4/tcp.c | 6 ++---- net/ipv4/tcp_input.c | 13 ------------- 5 files changed, 3 insertions(+), 37 deletions(-) commit ac229dca7e4e582114e1ec9765fda0915aa58468 Author: Yuchung Cheng Date: Thu Jan 12 22:11:40 2017 -0800 tcp: remove RFC4653 NCR This patch removes the (partial) implementation of the aggressive limited transmit in RFC4653 TCP Non-Congestion Robustness (NCR). NCR is a mitigation to the problem created by the dynamic DUPACK threshold. With the current adaptive DUPACK threshold (tp->reordering) could cause timeouts by preventing fast recovery. For example, if the last packet of a cwnd burst was reordered, the threshold will be set to the size of cwnd. But if next application burst is smaller than threshold and has drops instead of reorderings, the sender would not trigger fast recovery but instead resorts to a timeout recovery. NCR mitigates this issue by checking the number of DUPACKs against the current flight size additionally. The techniqueue is similar to the early retransmit RFC. With RACK loss detection, this mitigation is not needed, because RACK does not use DUPACK threshold to detect losses. RACK arms a reordering timer to fire at most a quarter RTT later to start fast recovery. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 15 --------------- 1 file changed, 15 deletions(-) commit bec41a11dd3dc8c54f766b4f494140ca92ba7c10 Author: Yuchung Cheng Date: Thu Jan 12 22:11:39 2017 -0800 tcp: remove early retransmit This patch removes the support of RFC5827 early retransmit (i.e., fast recovery on small inflight with <3 dupacks) because it is subsumed by the new RACK loss detection. More specifically when RACK receives DUPACKs, it'll arm a reordering timer to start fast recovery after a quarter of (min)RTT, hence it covers the early retransmit except RACK does not limit itself to specific inflight or dupack numbers. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 19 +++-------- include/linux/tcp.h | 3 +- include/net/tcp.h | 19 ----------- net/ipv4/inet_diag.c | 1 - net/ipv4/tcp.c | 3 -- net/ipv4/tcp_input.c | 60 ++-------------------------------- net/ipv4/tcp_ipv4.c | 1 - net/ipv4/tcp_metrics.c | 1 - net/ipv4/tcp_minisocks.c | 1 - net/ipv4/tcp_output.c | 11 +++---- net/ipv4/tcp_timer.c | 3 -- net/ipv6/tcp_ipv6.c | 1 - 12 files changed, 12 insertions(+), 111 deletions(-) commit 840a3cbe89694fad75578856976f180e852e69aa Author: Yuchung Cheng Date: Thu Jan 12 22:11:38 2017 -0800 tcp: remove forward retransmit feature Forward retransmit is an esoteric feature in RFC3517 (condition(3) in the NextSeg()). Basically if a packet is not considered lost by the current criteria (# of dupacks etc), but the congestion window has room for more packets, then retransmit this packet. However it actually conflicts with the rest of recovery design. For example, when reordering is detected we want to be conservative in retransmitting packets but forward-retransmit feature would break that to force more retransmission. Also the implementation is fairly complicated inside the retransmission logic inducing extra iterations in the write queue. With RACK losses are being detected timely and this heuristic is no longer necessary. There this patch removes the feature. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 1 - net/ipv4/tcp_input.c | 5 ----- net/ipv4/tcp_output.c | 61 +++------------------------------------------------ 3 files changed, 3 insertions(+), 64 deletions(-) commit 89fe18e44f7ee5ab1c90d0dff5835acee7751427 Author: Yuchung Cheng Date: Thu Jan 12 22:11:37 2017 -0800 tcp: extend F-RTO to catch more spurious timeouts Current F-RTO reverts cwnd reset whenever a never-retransmitted packet was (s)acked. The timeout can be declared spurious because the packets acknoledged with this ACK was transmitted before the timeout, so clearly not all the packets are lost to reset the cwnd. This nice detection does not really depend F-RTO internals. This patch applies the detection universally. On Google servers this change detected 20% more spurious timeouts. Suggested-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit a0370b3f3f2cfb8b424b04c0545414abaa53f5ee Author: Yuchung Cheng Date: Thu Jan 12 22:11:36 2017 -0800 tcp: enable RACK loss detection to trigger recovery This patch changes two things: 1. Start fast recovery with RACK in addition to other heuristics (e.g., DUPACK threshold, FACK). Prior to this change RACK is enabled to detect losses only after the recovery has started by other algorithms. 2. Disable TCP early retransmit. RACK subsumes the early retransmit with the new reordering timer feature. A latter patch in this series removes the early retransmit code. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 11 ++++------- net/ipv4/tcp_input.c | 29 +++++++++++++++++++++-------- net/ipv4/tcp_recovery.c | 16 ++++++++++------ 3 files changed, 35 insertions(+), 21 deletions(-) commit 98e36d449cc681f1bb2ce2230243f7f977a7da1b Author: Yuchung Cheng Date: Thu Jan 12 22:11:35 2017 -0800 tcp: check undo conditions before detecting losses Currently RACK would mark loss before the undo operations in TCP loss recovery. This could incorrectly identify real losses as spurious. For example a sender first experiences a delay spike and then eventually some packets were lost due to buffer overrun. In this case, the sender should perform fast recovery b/c not all the packets were lost. But the sender may first trigger a (spurious) RTO and reset cwnd to 1. The following ACKs may used to mark real losses by tcp_rack_mark_lost. Then in tcp_process_loss this ACK could trigger F-RTO undo condition and unmark real losses and revert the cwnd reduction. If there are no more ACKs coming back, eventually the sender would timeout again instead of performing fast recovery. The patch fixes this incorrect process by always performing the undo checks before detecting losses. Fixes: 4f41b1c58a32 ("tcp: use RACK to detect losses") Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 1d0833df594390876647c54c2c88069d29059665 Author: Yuchung Cheng Date: Thu Jan 12 22:11:34 2017 -0800 tcp: use sequence to break TS ties for RACK loss detection The packets inside a jumbo skb (e.g., TSO) share the same skb timestamp, even though they are sent sequentially on the wire. Since RACK is based on time, it can not detect some packets inside the same skb are lost. However, we can leverage the packet sequence numbers as extended timestamps to detect losses. Therefore, when RACK timestamp is identical to skb's timestamp (i.e., one of the packets of the skb is acked or sacked), we use the sequence numbers of the acked and unacked packets to break ties. We can use the same sequence logic to advance RACK xmit time as well to detect more losses and avoid timeout. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 1 + include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 5 +++-- net/ipv4/tcp_recovery.c | 17 ++++++++++++++--- 4 files changed, 19 insertions(+), 6 deletions(-) commit 57dde7f70de34d4251f291c9eac7ad920aaf56b2 Author: Yuchung Cheng Date: Thu Jan 12 22:11:33 2017 -0800 tcp: add reordering timer in RACK loss detection This patch makes RACK install a reordering timer when it suspects some packets might be lost, but wants to delay the decision a little bit to accomodate reordering. It does not create a new timer but instead repurposes the existing RTO timer, because both are meant to retransmit packets. Specifically it arms a timer ICSK_TIME_REO_TIMEOUT when the RACK timing check fails. The wait time is set to RACK.RTT + RACK.reo_wnd - (NOW - Packet.xmit_time) + fudge This translates to expecting a packet (Packet) should take (RACK.RTT + RACK.reo_wnd + fudge) to deliver after it was sent. When there are multiple packets that need a timer, we use one timer with the maximum timeout. Therefore the timer conservatively uses the maximum window to expire N packets by one timeout, instead of N timeouts to expire N packets sent at different times. The fudge factor is 2 jiffies to ensure when the timer fires, all the suspected packets would exceed the deadline and be marked lost by tcp_rack_detect_loss(). It has to be at least 1 jiffy because the clock may tick between calling icsk_reset_xmit_timer(timeout) and actually hang the timer. The next jiffy is to lower-bound the timeout to 2 jiffies when reo_wnd is < 1ms. When the reordering timer fires (tcp_rack_reo_timeout): If we aren't in Recovery we'll enter fast recovery and force fast retransmit. This is very similar to the early retransmit (RFC5827) except RACK is not constrained to only enter recovery for small outstanding flights. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_connection_sock.h | 4 ++- include/net/tcp.h | 4 +++ net/ipv4/inet_diag.c | 1 + net/ipv4/tcp_input.c | 6 ++-- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 3 +- net/ipv4/tcp_recovery.c | 57 +++++++++++++++++++++++++++++++++----- net/ipv4/tcp_timer.c | 3 ++ net/ipv6/tcp_ipv6.c | 1 + 9 files changed, 68 insertions(+), 12 deletions(-) commit deed7be78f512d003c6290da0a781479b31b3d74 Author: Yuchung Cheng Date: Thu Jan 12 22:11:32 2017 -0800 tcp: record most recent RTT in RACK loss detection Record the most recent RTT in RACK. It is often identical to the "ca_rtt_us" values in tcp_clean_rtx_queue. But when the packet has been retransmitted, RACK choses to believe the ACK is for the (latest) retransmitted packet if the RTT is over minimum RTT. This requires passing the arrival time of the most recent ACK to RACK routines. The timestamp is now recorded in the "ack_time" in tcp_sacktag_state during the ACK processing. This patch does not change the RACK algorithm itself. It only adds the RTT variable to prepare the next main patch. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 1 + include/net/tcp.h | 7 ++++--- net/ipv4/tcp_input.c | 36 ++++++++++++++++++++++-------------- net/ipv4/tcp_recovery.c | 41 +++++++++++++++++++++++------------------ 4 files changed, 50 insertions(+), 35 deletions(-) commit e636f8b0104d6622aaaed6aa5ef17dfbf165bc51 Author: Yuchung Cheng Date: Thu Jan 12 22:11:31 2017 -0800 tcp: new helper for RACK to detect loss Create a new helper tcp_rack_detect_loss to prepare the upcoming RACK reordering timer patch. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 3 +-- net/ipv4/tcp_input.c | 12 ++++++++---- net/ipv4/tcp_recovery.c | 22 +++++++++++++--------- 3 files changed, 22 insertions(+), 15 deletions(-) commit db8da6bb574e1692cb86624317c572b0b9306560 Author: Yuchung Cheng Date: Thu Jan 12 22:11:30 2017 -0800 tcp: new helper function for RACK loss detection Create a new helper tcp_rack_mark_skb_lost to prepare the upcoming RACK reordering timer support. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 7410191afcaca3a49bb29bfb5e15f81d7b336984 Author: Satanand Burla Date: Thu Jan 12 16:18:22 2017 -0800 liquidio: use fallback for selecting txq Remove assignment to ndo_select_queue so that fallback is used for selecting txq. Also remove the now-useless function that used to be assigned to ndo_select_queue. Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 20 -------------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 21 --------------------- 2 files changed, 41 deletions(-) commit 98fc3c6fa5cfda703e7be1af50fba82c168251de Author: Vivien Didelot Date: Thu Jan 12 18:07:16 2017 -0500 net: dsa: mv88e6xxx: add EEPROM support to 6390 The Marvell 6352 chip has a 8-bit address/16-bit data EEPROM access. The Marvell 6390 chip has a 16-bit address/8-bit data EEPROM access. This patch implements the 8-bit data EEPROM access in the mv88e6xxx driver and adds its support to chips of the 6390 family. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 14 ++++++ drivers/net/dsa/mv88e6xxx/global2.c | 93 ++++++++++++++++++++++++++++++++++- drivers/net/dsa/mv88e6xxx/global2.h | 21 ++++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 4 files changed, 128 insertions(+), 1 deletion(-) commit 5a45a4c5c3f5e36a03770deb102ca6ba256ff3d7 Author: Kees Cook Date: Fri Jan 13 14:09:35 2017 -0800 gcc-plugins: consolidate on PASS_INFO macro Now that PASS_INFO() exists, use it in the other existing gcc plugins, instead of always open coding the same thing. Based on updates to the grsecurity/PaX gcc plugins. Signed-off-by: Kees Cook scripts/gcc-plugins/cyc_complexity_plugin.c | 6 +----- scripts/gcc-plugins/latent_entropy_plugin.c | 8 ++------ scripts/gcc-plugins/sancov_plugin.c | 8 ++------ 3 files changed, 5 insertions(+), 17 deletions(-) commit 3a52153975f7e2cda90ad36f3a63104610da657f Author: Srinivas Kandagatla Date: Wed Jan 4 13:35:02 2017 +0000 arm64: dts: db820c: add support to volume up key This patch adds support to volume-up key found on the board. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross .../arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi | 12 ++++++++++++ arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) commit b4dba947656f9acf6ce0838a613dad74221f8d1f Author: Ivan T. Ivanov Date: Wed Jan 4 13:35:00 2017 +0000 arm64: dts: apq8016-sbc: Limit MPP4 high state to 1.8V 96Boards specs require all GPIO signals to be at 1.8V. Limit MPP4, which is PIN28 on J8, to 1.8V(L5). Signed-off-by: Ivan T. Ivanov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f953d999d261acd1b99aa821c9342bbe93e7ec25 Author: Ivan T. Ivanov Date: Wed Jan 4 13:34:59 2017 +0000 arm64: dts: apq8016-sbc: Add Volume Up key device node VOL/ZOOM+ button on DB410c is connected to SoC GPIO 104. Add support for it. Signed-off-by: Ivan T. Ivanov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) commit 70151ff46c9f4453e00776cd6167c56b6719c68f Author: Srinivas Kandagatla Date: Wed Jan 4 13:34:58 2017 +0000 arm64: dts: apq8016-sbc: add support to hdmi audio via adv7533 This patch adds support to hdmi audio via adv7533. Signed-off-by: Srinivas Kandagatla Tested-by: Archit Taneja Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 227c35835ac1bd40600d77c58cb83fa340234c97 Author: Srinivas Kandagatla Date: Wed Jan 4 13:34:57 2017 +0000 arm64: dts: db820c: fix gpio pinctrl name correctly Fix typo in node name to reflect the correct pin name. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88106096cbf8b89e3712accafe673afbbd3cdbd3 Author: Bjorn Andersson Date: Fri Nov 18 22:42:32 2016 -0800 ARM: dts: msm8916: Add and enable wcnss node Add the wcnss remoteproc node the SMD edge and the wcnss ctrl, bluetooth and wifi nodes specified and enable this on db410c. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 4 ++ arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 13 ++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 73 +++++++++++++++++++++++++++++- 3 files changed, 89 insertions(+), 1 deletion(-) commit 702956a187b85512165b9bcd86eeb1fec8f2a084 Author: spjoshi@codeaurora.org Date: Fri Oct 28 17:14:23 2016 -0700 arm64: dts: msm8996: Add SCM DT node Add SCM DT node to enable SCM functionality on MSM8996. Signed-off-by: Sarangdhar Joshi Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit a402a354dc114cf1ed61b89854763ceb4bda7179 Author: Georgi Djakov Date: Thu Apr 14 17:34:49 2016 +0300 arm64: dts: qcom: msm8916: Use fixed factor xo clock The rpmcc driver is providing the XO clock, which is the parent of almost all clocks. But during boot, this driver may probe later and leave most of the clocks without parent. The common clock framework currently reports invalid rate for orphan clocks and this may confuse drivers. To resolve this, use fixed clocks registration until we have some support to deal with the this issue. Removing the generic rpmcc compatible is enough to switch back to fixed factor XO clock. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cbb59af7ecf183b1761a178835e1c771167fa28 Author: Xing Zheng Date: Tue Jan 10 14:15:29 2017 +0800 arm64: dts: rockchip: add rockchip,grf property for RK3399 PMUCRU/CRU The structure rockchip_clk_provider needs to refer the GRF regmap in somewhere, if the CRU node has not "rockchip,grf" property, calling syscon_regmap_lookup_by_phandle will return an invalid GRF regmap, and the MUXGRF type clock will be not supported. Therefore, we need to add them. Signed-off-by: Xing Zheng Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 1a0abcd634dc3caf0d15cb8625e3f43d77b37031 Author: Xing Zheng Date: Tue Jan 10 14:15:30 2017 +0800 dt-bindings: clk: add rockchip,grf property for RK3399 Add support for rockchip,grf property which is used for GRF muxes on RK3399. Signed-off-by: Xing Zheng Reviewed-by: Douglas Anderson Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/clock/rockchip,rk3399-cru.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit e96165a30f0dc2f02f9578a02c8feb9fbb428802 Author: Linus Walleij Date: Tue Jan 10 10:55:21 2017 +0100 ARM: defconfig: qcom: add APQ8060 DragonBoard devices This default-enables the devices found on the APQ8060 DragonBoard in the qcom_defconfig: - EBI2 bus - SMSC911x ethernet - LEDs class and PM8058 LEDs driver, trigger and heartbeat trigger (so we get heartbeat on the board by default) - IIO framework, including the HRTimer trigger, KXSD9 accelerometer, MPU3050 gyroscope, AK8975 magnetometer and BMP085 pressure sensor Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit a0f9419c7f213e80eba0e444d270b7d0bf600b4a Author: Srinivas Kandagatla Date: Wed Jan 4 13:35:33 2017 +0000 ARM: qcom_defconfig: enable thermal sensors This patch enables thermal sensors and QFPROM support for qcom platforms. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 05eeee7dee716ea3a1da9d0ff23e6ea98e25316c Author: Srinivas Kandagatla Date: Wed Jan 4 13:35:32 2017 +0000 ARM: qcom_defconfig: add ahci configs This patch enables configs required to get SATA functionality working on IFC6410 board. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 15ee5c8c2af8daf4aef61a2e5b896accf16e1452 Author: Srinivas Kandagatla Date: Wed Jan 4 13:35:31 2017 +0000 ARM: qcom_defconfig: add pcie and atl1c ethernet configs IFC6410 board has PCIE based ATL1C ethernet controller, so enable related configs. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 55729edd767091af8728ee890b60fd2e740666af Author: Srinivas Kandagatla Date: Wed Jan 4 13:35:30 2017 +0000 ARM: qcom_defconfig: add usb related configs Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 2ec8258fe4d039ce312a1e59ba4b8419ad96d808 Author: Georgi Djakov Date: Thu Nov 17 17:20:26 2016 +0200 ARM: qcom_defconfig: Enable RPM/RPM-SMD clocks Enable support for clocks, controlled by the RPM processor on Qualcomm platforms. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 6ba1f9e1772f3ff9dc18e81fc01fa97c059b1d06 Author: Nagaraju, Vathsala Date: Fri Jan 6 22:02:32 2017 +0530 drm/i915/psr: report live PSR2 State Reports live state of PSR2 form PSR2_STATUS register. bit field 31:28 gives the live state of PSR2. It can be used to check if system is in deep sleep, selective update or selective update standby. During video play back, we can use this to check if system is entering SU mode or not. when system is in idle state, DEEP_SLEEP(8) must be entered. When video playback is happening, system must be in SLEEP(3 / selective update) or SU_STANDBY( 6 / selective update standby) v2: (Rodrigo) - Remove EDP_PSR2_STATUS_TG_ON=a ,instead use ARRAY_SIZE Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483720352-24761-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 25 insertions(+) commit 18b9bf3ee5a4fcce8b284a1bd4ddb593f1397daa Author: Nagaraju, Vathsala Date: Thu Jan 12 03:58:30 2017 +0530 drm/i915/psr: enable psr2 for y cordinate panels Psr2 is enabled only for y cordinate panels.Once GTC (global time code) is implemented,this restriction is removed so that psr2 can work on panels without y cordinate support. v2: (Rodrigo) - Move the check to intel_psr_match_conditions v3: (Rodrigo) - add return false v4: rebase Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484173710-3138-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/intel_psr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6433226b0f51cdd9f08e23fa8b0c376088c33357 Author: Nagaraju, Vathsala Date: Fri Jan 13 06:01:24 2017 +0530 drm/i915/psr: set PSR_MASK bits for deep sleep Program EDP_PSR_DEBUG_CTL (PSR_MASK) to enable system to go to deep sleep while in psr2.PSR2_STATUS bit 31:28 should report value 8 , if system enters deep sleep state. Also, EDP_FRAMES_BEFORE_SU_ENTRY is set 1 , if not set, flickering is observed on psr2 panel. v2: (Ilia Mirkin) - Remove duplicate bit definition 25:27 v3: rebase v4: rebase v5: rebase Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Jim Bride Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484267484-21843-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_reg.h | 10 +++++++--- drivers/gpu/drm/i915/intel_psr.c | 30 ++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 13 deletions(-) commit d86f0482cd03c70482f2061bc320520b4e8de5ce Author: Nagaraju, Vathsala Date: Fri Jan 13 00:31:31 2017 +0530 drm/i915/psr: set CHICKEN_TRANS for psr2 As per bpsec, CHICKEN_TRANS_EDP bit 12 ,15 must be programmed in psr2 enable sequence. bit 12 : Program Transcoder EDP VSC DIP header with a valid setting for PSR2 and Set CHICKEN_TRANS_EDP(0x420cc) bit 12 for programmable header packet. bit 15 : Set CHICKEN_TRANS_EDP(0x420cc) bit 15 if Y coordinate is supported v2: (Rodrigo) - move CHICKEN_TRANS_EDP bit set logic right after setup_vsc v3:(Rodrigo) - initialize chicken_trans to CHICKEN_TRANS_BIT12 instead of 0 v4:(chris wilson) - use BIT(12), remove CHICKEN_TRANS_BIT12 - remove unnecessary comments - update commit message v5: - rename bit 12 PSR2_VSC_ENABLE_PROG_HEADER - rename bit 15 PSR2_ADD_VERTICAL_LINE_COUNT v6:(Rodrigo) - remove TRANS_EDP=3, use cpu_transcoder Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: vathsala nagaraju Signed-off-by: Patil Deepti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484247691-20930-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_psr.c | 7 +++++++ 2 files changed, 13 insertions(+) commit 7a5c275fd82185e98969d3370d55b5b5473fc3ba Author: Ivan T. Ivanov Date: Wed Jan 11 17:50:21 2017 +0200 ARM: dts: qcom: Add apq8064 CoreSight components Add initial set of CoreSight components found on Qualcomm apq8064 based platforms, including the IFC6410 board. Signed-off-by: Ivan T. Ivanov Acked-by: Mathieu Poirier Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 190 +++++++++++++++++++++++++++++++++++- 1 file changed, 186 insertions(+), 4 deletions(-) commit d724d6ba8645d199be36b69250fbf26cf52daa62 Author: Linus Walleij Date: Thu Jan 5 16:13:36 2017 +0100 ARM: dts: Add gyro and accel to APQ8060 Dragonboard This adds the MPU-3050 gyroscope and the KXSD9 accelerometer to the Qualcomm APQ8060 Dragonboard. The KXSD9 is mounted beyond the MPU-3050 and appear as a subdevice beyond it. We set up the required GPIO and interrupt lines to make the devices work. Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 97fdcaacfc8faf27034a77c7273da9ea8577747d Author: Linus Walleij Date: Thu Jan 5 16:13:35 2017 +0100 ARM: dts: reference PM8058 as IRQ parent Some nodes are referencing the pm8058_gpio as IRQ parent, but the HW IRQ offset they are supplying is actually that for the parent to that controller: the PM8058 itself. Since that is the proper parent, reference it directly. We can switch this to the pm8058_gpio and the proper offset once we have fixed the SSBI GPIO driver to properly deal with the hierarchical IRQ domain and get proper local offset translation. Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 86e06f026bce857f059645f883749cfcb9c29a6e Author: Linus Walleij Date: Thu Jan 5 16:13:34 2017 +0100 ARM: dts: rename MSM8660/APQ8060 pmicintc to pm8058 The name "pmicintc" is ambiguous: there is a second power management IC named PM8901 on these systems, and it is also an interrupt controller. To make things clear, just name the node alias "pm8058", this in unambigous and has all information we need. Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 2 +- arch/arm/boot/dts/qcom-msm8660-surf.dts | 2 +- arch/arm/boot/dts/qcom-msm8660.dtsi | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) commit fc0dd86644f1a46b42d99803fb15d96f7d64fe1e Author: Srinivas Kandagatla Date: Wed Jan 4 13:34:13 2017 +0000 ARM: dts: sd-600eval: enable 1.8v regulator on LS expansion This patch enables 1.8v regulator on LS expansion, which should be always on according to 96boards spec. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit efd63c13a2b1357e74910b90d22444570ddc554f Author: Srinivas Kandagatla Date: Wed Jan 4 13:34:12 2017 +0000 ARM: dts: sd-600eval: add hdmi support Signed-off-by: Srinivas Kandagatla Reviewed-by: Archit Taneja Signed-off-by: Andy Gross .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit ec65428fdd0c6d3cd88b5219fdccfc1f71b96e6a Author: Srinivas Kandagatla Date: Wed Jan 4 13:34:11 2017 +0000 ARM: dts: move hdmi pinctrl out of board file. This patch moves hdmi pinctrl defination from board file to soc level pinctrl file. If not this pinctrl setup will be duplicated across all the apq8064 based board files. Signed-off-by: Srinivas Kandagatla Reviewed-by: Archit Taneja Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 22 ---------------------- arch/arm/boot/dts/qcom-apq8064-pins.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/qcom-apq8064.dtsi | 2 ++ 3 files changed, 21 insertions(+), 22 deletions(-) commit 2bde88801543fc83782e44da791b8c77b3f68a3c Author: Bjorn Andersson Date: Wed Dec 21 03:49:39 2016 -0800 ARM: dts: qcom: sd600eval: Enable riva-pil Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 340a16defca81b1da3384af39c3a745cdce6f311 Author: Bjorn Andersson Date: Wed Dec 21 03:49:38 2016 -0800 ARM: dts: qcom: sd600-eval: pm8921_s2 regulator properties Add the missing properties for pm8921 smps2. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 59c25fdeb2f7bbb6077b39992541b8acd9bc313d Author: Bjorn Andersson Date: Wed Dec 21 03:49:37 2016 -0800 ARM: dts: qcom: apq8064-sony-yuga: Enable riva-pil Cc: John Stultz Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit f9a8aaeda669070f2c59732d17ed9677c14835a5 Author: Bjorn Andersson Date: Wed Dec 21 03:49:36 2016 -0800 ARM: dts: qcom: apq8064: Add riva-pil node Add nodes for the Riva PIL, IRIS RF module, BT and WiFI services exposed by the Riva firmware and the related memory reserve. Also provides pinctrl nodes for devices enabling the riva-pil. Cc: John Stultz Signed-off-by: Bjorn Andersson Tested-by: John Stultz Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-pins.dtsi | 18 +++++++++ arch/arm/boot/dts/qcom-apq8064.dtsi | 69 +++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 1 deletion(-) commit 4123366a5538f4bd005bf4e081f3bed9b760cbba Author: Srinivas Kandagatla Date: Tue Nov 15 12:01:52 2016 +0000 ARM: dts: apq8064: add support to pm8821 Signed-off-by: Srinivas Kandagatla Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 06dbf468a2c42bf6c327a8eaf11ecb3ea96196f9 Author: Stephen Boyd Date: Wed Nov 9 17:13:57 2016 -0800 arm: dts: qcom: Fix ipq board clock rates The ipq board has these rates as 25MHz, and not 19.2 and 27. I copy/pasted from other boards that have those rates but forgot to fix the rates here. Fixes: 30fc4212d541 ("arm: dts: qcom: Add more board clocks") Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 57f6db651bd439c66e1f1655dcb441bb3a6b5af0 Author: Stephen Boyd Date: Thu Oct 27 16:23:06 2016 -0700 ARM: dts: msm8974: Remove "unused" reserved region sources for msm8974, this isn't actually a reserved region. Instead it's marked as "unused" for reserved regions. Let's remove it so we get back a good chunk of memory. Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit 6f04d7c53e84181eecb763e3676b37a839bc40da Author: Bjorn Andersson Date: Mon Aug 22 22:57:46 2016 -0700 ARM: dts: msm8974: Add ADSP PIL node Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 3028cbab945ae04be02045ba71812863723d9453 Author: Bjorn Andersson Date: Mon Aug 22 22:57:45 2016 -0700 ARM: dts: msm8974: Add ADSP smp2p and smd nodes Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 769907ae6e6c2871c2ba4f578814d86fbfbe8d91 Author: Bjorn Andersson Date: Mon Mar 28 18:32:36 2016 -0700 ARM: dts: qcom: msm8974: Add USB gadget nodes Add the necessary nodes for USB gadget on MSM8974 and enable these for Honami. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross .../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 8 +++++ arch/arm/boot/dts/qcom-msm8974.dtsi | 39 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit 43d8808b0820df056e7cfc7cc374d5a20fd37546 Author: W. Trevor King Date: Thu Jan 12 14:24:27 2017 -0800 Documentation: cpuset: Fix 'cpuset.tasks' -> 'tasks' This looks like it was accidentally caught up in e21a05cb (doc: cpuset: Update the cpuset flag file, 2010-02-24). While I'm touching the line, also fix the posessive "cpusets" -> "cpuset's". Signed-off-by: W. Trevor King Signed-off-by: Jonathan Corbet Documentation/cgroup-v1/cpusets.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e57ae44a584f6d574b45d40a036b8c7ddd5d0feb Author: Sanjeev Date: Wed Jan 11 02:28:40 2017 +0800 Doc: clarify that GPL is GPL v2, not v2+ ... and a minor missing period at EOL Signed-off-by: Sanjeev Gupta Signed-off-by: Jonathan Corbet Documentation/admin-guide/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ada5f446bbe504ddf5a374cae65b39108db86867 Author: Gabriel Krisman Bertazi Date: Mon Jan 9 18:11:57 2017 -0200 kernel-doc: properly document array arguments of function Documentation for array parameters passed in a function, like the first argument in the function below, weren't getting exported in the rst format, although they work fine for html and pdf formats: void drm_clflush_pages(struct page * pages[], unsigned long num_pages) That's because the string key to store the description in the parameterdescs dictionary doesn't have the [] suffix. This cleans up the suffix from the key before accessing the dictionary. Signed-off-by: Gabriel Krisman Bertazi Fixes: c0d1b6ee780a ("kernel-doc: produce RestructuredText output") Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff58fa7f556c1d87061e4a91ed875d5f8aa9571f Author: Sebastian Andrzej Siewior Date: Thu Dec 22 17:19:34 2016 +0100 Documentation: Update CPU hotplug and move it to core-api The current CPU hotplug is outdated. During the update to what we currently have I rewrote it partly and moved to sphinx format. Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Rusty Russell Cc: Srivatsa Vaddagiri Cc: Ashok Raj Cc: Joel Schopp Cc: linux-doc@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jonathan Corbet Documentation/core-api/cpu_hotplug.rst | 372 +++++++++++++++++++++++++++ Documentation/core-api/index.rst | 1 + Documentation/cpu-hotplug.txt | 452 --------------------------------- 3 files changed, 373 insertions(+), 452 deletions(-) commit 4fe0395550aeb6709ea5332f46de3644aef7d328 Author: Christoph Hellwig Date: Mon Jan 9 21:37:40 2017 +0100 PCI/MSI: Remove pci_enable_msi_{exact,range}() All multi-MSI allocations are now done through pci_irq_alloc_vectors(), so remove the old pci_enable_msi_range() and pci_enable_msi_exact() interfaces. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Documentation/PCI/MSI-HOWTO.txt | 6 ++---- drivers/pci/msi.c | 26 +++++++++----------------- include/linux/pci.h | 16 ++-------------- 3 files changed, 13 insertions(+), 35 deletions(-) commit e75377404726be171d66c154f8ea1e6cf840811d Author: Tom Lendacky Date: Fri Jan 13 09:05:53 2017 +0100 amd-xgbe: Update PCI support to use new IRQ functions Some of the PCI MSI/MSI-X functions have been deprecated and it is recommended to use the new pci_alloc_irq_vectors() function. Convert the code over to use the new function. Also, modify the way in which the IRQs are requested - try for multiple MSI-X/MSI first, then a single MSI/legacy interrupt. Signed-off-by: Tom Lendacky Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 128 +++++++++---------------------- drivers/net/ethernet/amd/xgbe/xgbe.h | 8 +- 2 files changed, 41 insertions(+), 95 deletions(-) commit 0ae20595e334edb0ccd4a421bcf299c762299a09 Author: Thierry Reding Date: Thu Jan 12 17:07:42 2017 +0100 rtc: tegra: Sort includes alphabetically The ordering of includes is currently completely arbitrary, making it impossible to decide where to put new includes. Remove the dilemma by sort the include list alphabetically. Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 224763ef7249d8c4ab4c3af6ec067b1ddc2d1fe9 Author: Arnd Bergmann Date: Fri Jan 13 16:32:52 2017 +0100 rtc: stm32: fix building without CONFIG_OF The new driver has a stray #ifdef in it that causes a build error: drivers/rtc/rtc-stm32.c:718:21: error: 'stm32_rtc_of_match' undeclared here (not in a function); did you mean 'stm32_rtc_pm_ops'? As the #ifdef serves no purpose here, let's just remove it. Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 2 -- 1 file changed, 2 deletions(-) commit 0404abb221d16fa9c56139bf83929f034a2007f3 Author: Arnd Bergmann Date: Fri Jan 13 16:32:51 2017 +0100 rtc: stm32: remove __exit annotation on remove callback The remove function can be called at runtime for a manual 'unbind' operation and must not be left out from a built-in driver, as kbuild complains: `stm32_rtc_remove' referenced in section `.data.stm32_rtc_driver' of drivers/rtc/rtc-stm32.o: defined in discarded section `.exit.text' of drivers/rtc/rtc-stm32.o This removes the extraneous annotation. Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0325701a34f96ecc2502228d07f046d479b8d328 Author: Chris Wilson Date: Wed Jan 11 21:09:26 2017 +0000 drm/i915: Assert that we have allocated the drm_mm_node upon pinning We currently check after the slow path that the vma is bound correctly, but we don't currently check after the fast path. This is important in case we accidentally take the fast path and leave the vma misplaced. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170111210937.29252-27-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 1 + drivers/gpu/drm/i915/i915_vma.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 0c7eeda1af05693fbecd021eeab37477aa49c162 Author: Chris Wilson Date: Wed Jan 11 21:09:25 2017 +0000 drm/i915: Move i915_ppgtt_close() into i915_gem_gtt.c Move it alongside its ppgtt counterparts, in order to make it available for the ppgtt selftests. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170111210937.29252-26-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_context.c | 21 --------------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 3 files changed, 22 insertions(+), 21 deletions(-) commit 9dd9dd894ab895b874c80ce94cc6ab77ef2049df Author: Heiko Stuebner Date: Fri Jan 13 17:32:55 2017 +0100 clk: rockchip: use clock ids for memory controller parts on rk3066/rk3188 Add the newly added clock ids to the clock entries of the rk3066/rk3188 clock driver. We won't be needing them in the kernel for a bit yet but as they're used in the new u-boot ddr setup code/dts we should make sure the clock ids stay identical and do not differ. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3188.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5d032d39846bd63fdcfc15dc6c89784f1e6c1dc Author: Jacob Chen Date: Tue Jan 10 19:59:18 2017 +0800 clk: rockchip: use rk3288 isp_in clock ids Reference the newly added isp clock-ids in the clock-tree. Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fc505089c84a22ddb1d652267204b3bf4a75d76 Merge: 8118fe4 4688708 Author: Heiko Stuebner Date: Fri Jan 13 17:13:33 2017 +0100 Merge branch 'v4.11-shared/clkids' into v4.11-clk/next commit 46887082713ec27a72dd2ff1b1fd21349363dad9 Author: Heiko Stuebner Date: Fri Jan 13 17:10:02 2017 +0100 clk: rockchip: add clock ids for memory controller parts on rk3066/rk3188 Add clock ids for the upctl and publ controllers used for ddr control. Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3188-cru-common.h | 2 ++ 1 file changed, 2 insertions(+) commit e8e8dd6d20fa55ff974460ad742fcbf35b301062 Author: Christoph Hellwig Date: Mon Jan 9 21:37:38 2017 +0100 [media] cobalt: use pci_irq_allocate_vectors() Simplify the interrupt setup by using the new PCI layer helpers. Despite using pci_enable_msi_range(), this driver was only requesting a single MSI vector anyway. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/media/pci/cobalt/cobalt-driver.c | 8 ++------ drivers/media/pci/cobalt/cobalt-driver.h | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) commit 537e18b22876c10d9ed294fd7c81cb61c2b5279e Merge: 46daed6 0e4e499 Author: Linus Walleij Date: Fri Jan 13 16:43:17 2017 +0100 Merge tag 'sh-pfc-for-v4.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.11 - Add bias handling for non-GPIO pins for R-Car H3, - Add drive-strength and bias handling for R-Car M3-W, - Add CAN, CAN FD, MSIOF, and HSCIF pin groups for R-Car M3-W, - Add SDHI voltage switching for R-Car M2-N. commit 6547653050f1cddf62d1615a1cca196838ab0018 Author: Jacob Chen Date: Tue Jan 10 19:59:17 2017 +0800 clk: rockchip: add rk3288 isp_in clock ids Add clock-ids for the isp block of the rk3288. Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3288-cru.h | 1 + 1 file changed, 1 insertion(+) commit 7fcef92db8ba7fe667df6513f6ff7f9913816749 Author: Daniel Kurtz Date: Fri Jan 13 10:30:05 2017 +0800 arm64: dts: mt8173: Fix cpu_thermal cooling-maps contributions According to [0], the contribution field for each cooling-device express their relative power efficiency. Higher weights express higher power efficiency. Weighting is relative such that if each cooling device has a weight of 1 they are considered equal. This is particularly useful in heterogeneous systems where two cooling devices may perform the same kind of compute, but with different efficiency. [0] Documentation/thermal/power_allocator.txt According to Mediatek IC designer, the power efficiency ratio between the LITTLE core cluster (cooling-device cpu0) and big core cluster (cooling-device cpu1) is around 3:1 (3072:1024). Signed-off-by: Daniel Kurtz Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc6634ac0e5380aeb1063275a2e9a583d41b2306 Author: Bibby Hsieh Date: Thu Aug 4 10:57:18 2016 +0800 arm64: dts: mt8173: add mmsel clocks for 4K support To support HDMI 4K resolution, mmsys need clcok mm_sel to be 400MHz. The board .dts file should override the clock rate property with the higher VENCPLL frequency the board supports HDMI 4K resolution. Signed-off-by: Bibby Hsieh Reviewed-by: Daniel Kurtz Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 46daed6ebd4bf357f77d231075f1b001f8707b48 Author: Thierry Reding Date: Thu Jan 12 17:03:34 2017 +0100 pinctrl: Initialize pinctrl_dev.node The struct pinctrl_dev's node field is not properly set up, which means the .prev and .next fields will be NULL. That's not something that the linked list code can deal with, so extra care must be taken when using these fields. An example of this is introduced in commit 3429fb3cda34 ("pinctrl: Fix panic when pinctrl devices with hogs are unregistered") where list_del() is made conditional on the pinctrl device being part of the pinctrl device list. This is to ensure that list_del() won't crash upon encountering a NULL pointer in .prev and/or .next. After initializing the list head there's no need to jump through these extra hoops and list_del() will work unconditionally. This is because the initialized list head points to itself and therefore the .prev and .next fields can be properly dereferenced. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 950b0d91dc108f54bccca5a2f75bb46f2df63d29 Author: Tony Lindgren Date: Wed Jan 11 14:13:34 2017 -0800 pinctrl: core: Fix regression caused by delayed work for hogs Commit df61b366af26 ("pinctrl: core: Use delayed work for hogs") caused a regression at least with sh-pfc that is also a GPIO controller as noted by Geert Uytterhoeven . As the original pinctrl_register() has issues calling pin controller driver functions early before the controller has finished registering, we can't just revert commit df61b366af26. That would break the drivers using GENERIC_PINCTRL_GROUPS or GENERIC_PINMUX_FUNCTIONS. So let's fix the issue with the following steps as a single patch: 1. Revert the late_init parts of commit df61b366af26. The late_init clearly won't work and we have to just give up on fixing pinctrl_register() for GENERIC_PINCTRL_GROUPS and GENERIC_PINMUX_FUNCTIONS. 2. Split pinctrl_register() into two parts By splitting pinctrl_register() into pinctrl_init_controller() and pinctrl_create_and_start() we have better control over when it's safe to call pinctrl_create(). 3. Introduce a new pinctrl_register_and_init() function As suggested by Linus Walleij , we can just introduce a new function for the controllers that need pinctrl_create() called later. 4. Convert the four known problem cases to use new function Let's convert pinctrl-imx, pinctrl-single, sh-pfc and ti-iodelay to use the new function to fix the issues. The rest of the drivers can be converted later. Let's also update Documentation/pinctrl.txt accordingly because of the known issues with pinctrl_register(). Fixes: df61b366af26 ("pinctrl: core: Use delayed work for hogs") Reported-by: Geert Uytterhoeven Cc: Gary Bisson Signed-off-by: Tony Lindgren Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Documentation/pinctrl.txt | 4 +- drivers/pinctrl/core.c | 201 ++++++++++++++++++++++---------- drivers/pinctrl/core.h | 2 - drivers/pinctrl/freescale/pinctrl-imx.c | 8 +- drivers/pinctrl/pinctrl-single.c | 5 +- drivers/pinctrl/sh-pfc/pinctrl.c | 4 +- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 5 +- include/linux/pinctrl/pinctrl.h | 15 +++ 8 files changed, 165 insertions(+), 79 deletions(-) commit 301501d3b5eb3e86be01f2584321c9c8f4b9b98b Author: Zhiyong Tao Date: Fri Jan 13 16:42:56 2017 +0800 arm: dts: mt2701: Add auxadc device node. Add auxadc device node for MT2701. Signed-off-by: Zhiyong Tao Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701-evb.dts | 4 ++++ arch/arm/boot/dts/mt2701.dtsi | 9 +++++++++ 2 files changed, 13 insertions(+) commit 111758b738cc9190521f75d65cb7987b230fede4 Author: Xiaolei Li Date: Fri Jan 13 16:42:55 2017 +0800 arm: dts: mt2701: Add nand device node Add mt2701 nand device node, include nfi and bch ecc. Signed-off-by: Xiaolei Li Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 159f5ae739c89c50881740900724cc8a91a8ef2c Author: Leilk Liu Date: Fri Jan 13 16:42:53 2017 +0800 arm: dts: mt2701: Add spi device node Add spi device node for MT2701. Signed-off-by: Leilk Liu Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701-evb.dts | 50 ++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/mt2701.dtsi | 39 +++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit f3cba0f49c7ce4955741793f6b96e1e237eb2ba2 Author: Honghui Zhang Date: Wed Jun 8 17:51:01 2016 +0800 ARM: dts: mt2701: add iommu/smi dtsi node for mt2701 Add the dtsi node of iommu and smi for mt2701. Signed-off-by: Honghui Zhang Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 571b95894d70bbdfa032fd31e99e130c86c2a783 Author: John Crispin Date: Tue Dec 20 20:04:34 2016 +0100 ARM: dts: mediatek: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623-evb.dts | 2 +- arch/arm/boot/dts/mt7623.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9f3746aff970b0155380dc892db7054736fb6554 Author: James Liao Date: Wed Dec 28 13:46:46 2016 +0800 arm: dts: mt2701: Add power domain controller device node Add power domain controller node (scpsys) for MT2701. Signed-off-by: James Liao Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f235c7e7a75325f28a33559a71f25a0eca6112db Author: James Liao Date: Wed Dec 28 13:46:45 2016 +0800 arm: dts: mt2701: Add subsystem clock controller device nodes Add MT2701 subsystem clock controllers, inlcude mmsys, imgsys, vdecsys, hifsys, ethsys and bdpsys. Signed-off-by: James Liao Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 42e4d6d5d495447d1c98b1ea8eec38017878c840 Author: James Liao Date: Wed Dec 28 13:46:44 2016 +0800 arm: dts: mt2701: Sort DT nodes by register address This patch rearrange MT2701 DT nodes to keep them in ascending order. Signed-off-by: James Liao [mb: fix pio unit address and order] Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 3b6e9da8abc0f178a2d1f8d49909f29374a48dd8 Author: David Lechner Date: Thu Jan 5 12:54:19 2017 -0600 ARM: dts: da850: Add ti,da830-uart compatible for serial ports TI DA8xx/OMAPL13x/AM17xx/AM18xx SoCs have extra UART registers beyond the standard 8250 registers, so we need a new compatible string to indicate this. Also, at least one of these registers uses the full 32 bits, so we need to specify reg-io-width in addition to reg-shift. "ns16550a" is left in the compatible specification since it does work as long as the bootloader configures the SoC UART power management registers. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit cd59102779aca33e50967bdb6147334fb298d7ad Author: Mohammed Shafi Shajakhan Date: Thu Jan 12 13:02:22 2017 +0200 ath10k: fix tx legacy rate reporting Tx legacy rate is reported 10 fold, as below iw dev wlan#N station dump | grep "tx bitrate" tx bitrate: 240.0 MBit/s This is because by mistake we multiply by the hardware reported rate twice by 10, fix this. Fixes: cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4") Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c486dc571a370ec58aefc9cc93937945403ef351 Author: Mohammed Shafi Shajakhan Date: Thu Jan 12 13:02:21 2017 +0200 ath10k: fix wifi connectivity and warning in rx with channel 169 In countries where basic operation of channel 169 is allowed, this fixes the below WARN_ON_ONCE in Rx and fixes the station connectivity failure in channel 169 as the packet is dropped in the driver as the current check limits to channel 165. As of now all the packets beyond channel 165 is dropped, fix this by extending the range to channel 169. Call trace: drivers/net/wireless/ath/ath10k/wmi.c:1505 ath10k_wmi_event_mgmt_rx+0x278/0x440 [ath10k_core]() Call Trace: [] ? printk+0x2d/0x2f [] warn_slowpath_common+0x72/0xa0 [] ? ath10k_wmi_event_mgmt_rx+0x278/0x440 [] ? ath10k_wmi_event_mgmt_rx+0x278/0x440 [] warn_slowpath_null+0x22/0x30 [] ath10k_wmi_event_mgmt_rx+0x278/0x440 [] ? ath10k_pci_sleep+0x8b/0xb0 [ath10k_pci] [] ath10k_wmi_10_2_op_rx+0xf3/0x3b0 [] ath10k_wmi_process_rx+0x1e/0x60 [] ath10k_htc_rx_completion_handler+0x347/0x4d0 [ath10k_core] [] ? ath10k_ce_completed_recv_next+0x53/0x70 [ath10k_pci] [] ath10k_pci_ce_recv_data+0x171/0x1d0 [ath10k_pci] [] ? ath10k_pci_write32+0x39/0x80 [ath10k_pci] [] ath10k_ce_per_engine_service+0x5c/0xa0 [ath10k_pci] [] ath10k_ce_per_engine_service_any+0x5f/0x70 [ath10k_pci] [] ? local_bh_enable_ip+0x90/0x90 [] ath10k_pci_tasklet+0x1b/0x50 [ath10k_pci] Fixes: 34c30b0a5e97 ("ath10k: enable advertising support for channel 169, 5Ghz") Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1077ec472df43414dafaec126498ff3fc669a471 Author: Christian Lamparter Date: Thu Jan 12 13:02:23 2017 +0200 ath9k: move RELAY and DEBUG_FS to ATH9K[_HTC]_DEBUGFS Currently, the common ath9k_common module needs to have a dependency on RELAY and DEBUG_FS in order to built. This is usually not a problem. But for RAM and FLASH starved AR71XX devices, every little bit counts. This patch adds a new symbol CONFIG_ATH9K_COMMON_DEBUG which makes it possible to drop the RELAY and DEBUG_FS dependency there and move it to ATH_(HTC)_DEBUGFS. Note: The shared FFT/spectral code (which is the only user of the relayfs in ath9k*) needs DEBUG_FS to export the relayfs interface to dump the data to userspace. So it makes no sense to have the functions compiled in, if DEBUG_FS is not there. Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/Kconfig | 9 ++++++-- drivers/net/wireless/ath/ath9k/Makefile | 5 +++-- drivers/net/wireless/ath/ath9k/common-debug.h | 27 ++++++++++++++++++++++++ drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- drivers/net/wireless/ath/ath9k/common-spectral.h | 23 ++++++++++++++++++++ drivers/net/wireless/ath/ath9k/eeprom_4k.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- 8 files changed, 64 insertions(+), 8 deletions(-) commit c1e3330f22bc3c53e6a2c4282dd5a1dc6e6bcca1 Author: Christian Lamparter Date: Mon Dec 5 22:52:45 2016 +0100 ath10k: add accounting for the extended peer statistics The 10.4 firmware adds extended peer information to the firmware's statistics payload. This additional info is stored as a separate data field and the elements are stored in their own "peers_extd" list. These elements can pile up in the same way as the peer information elements. This is because the ath10k_wmi_10_4_op_pull_fw_stats() function tries to pull the same amount (num_peer_stats) for every statistic data unit. Fixes: 4a49ae94a448faa ("ath10k: fix 10.4 extended peer stats update") Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bc1efd739b610a9cda31b82971b7a1e64a6144d1 Author: Sebastian Gottschall Date: Thu Jan 12 13:02:12 2017 +0200 ath10k: add VHT160 support This patch adds full VHT160 support for QCA9984 chipsets Tested on Netgear R7800. 80+80 is possible, but disabled so far since it seems to contain glitches like missing vht station flags (this may be firmware or mac80211 related). Signed-off-by: Sebastian Gottschall [kvalo@qca.qualcomm.com: refactoring and fix few warnings] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 7 ++++++- drivers/net/wireless/ath/ath10k/mac.c | 35 +++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 + drivers/net/wireless/ath/ath10k/wmi-tlv.h | 1 + drivers/net/wireless/ath/ath10k/wmi.c | 9 +++++++- drivers/net/wireless/ath/ath10k/wmi.h | 27 ++++++++++++++++++++++-- 6 files changed, 74 insertions(+), 6 deletions(-) commit 06efdbe70f9c3bf98e6baacb80b6bac416a6818a Author: Kalle Valo Date: Thu Jan 12 13:02:11 2017 +0200 ath10k: refactor ath10k_peer_assoc_h_phymode() When adding VHT160 support to ath10k_peer_assoc_h_phymode() the VHT mode selection code becomes too complex. Simplify it by refactoring the vht part to a separate function. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit fa5ce3d1928c441c3d241c34a00c07c8f5880b1a Author: Robert Richter Date: Fri Jan 13 14:12:09 2017 +0100 arm64: errata: Provide macro for major and minor cpu revisions Definition of cpu ranges are hard to read if the cpu variant is not zero. Provide MIDR_CPU_VAR_REV() macro to describe the full hardware revision of a cpu including variant and (minor) revision. Signed-off-by: Robert Richter Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 3 +++ arch/arm64/kernel/cpu_errata.c | 15 +++++++++------ arch/arm64/kernel/cpufeature.c | 8 +++----- 3 files changed, 15 insertions(+), 11 deletions(-) commit eac8017f0c4719d30f89d1a247de7bfbf6d0da4f Author: Miles Chen Date: Fri Jan 13 13:59:35 2017 +0800 arm64: mm: use phys_addr_t instead of unsigned long in __map_memblock Cosmetic change to use phys_addr_t instead of unsigned long for the return value of __pa_symbol(). Acked-by: Catalin Marinas Acked-by: Mark Rutland Signed-off-by: Miles Chen Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59cf70be5b7c6e3370f669976e3778104f4327ca Author: Shawn Lin Date: Fri Dec 16 17:42:37 2016 +0800 arm64: dts: rockchip: add aspm-no-l0s for rk3399 Per the discussion of bug fix[1], we now actually leaves the default clock choice for pcie phy is derived from 24MHz OSC to guarantee the least BER. So let's add aspm-no-l0s here and folks could delete this property from their dts. [1] https://patchwork.kernel.org/patch/9470519/ Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 1 file changed, 1 insertion(+) commit 87170961f31294dd213e0427bc7cea3283d91b84 Author: Gonglei \(Arei\) Date: Fri Jan 13 17:34:16 2017 +0800 crypto: virtio - adjust priority of algorithm Some hardware accelerators (like intel aesni or the s390 cpacf functions) have lower priorities than virtio crypto, and those drivers are faster than the same in the host via virtio. So let's lower the priority of virtio-crypto's algorithm, make it's higher than software implementations but lower than the hardware ones. Suggested-by: Christian Borntraeger Signed-off-by: Gonglei Acked-by: Christian Borntraeger Signed-off-by: Herbert Xu drivers/crypto/virtio/virtio_crypto_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 658fa754cd0700e8e96d61898f0953c4514859c6 Author: Ard Biesheuvel Date: Fri Jan 13 08:33:26 2017 +0000 crypto: arm/aes - avoid reserved 'tt' mnemonic in asm code The ARMv8-M architecture introduces 'tt' and 'ttt' instructions, which means we can no longer use 'tt' as a register alias on recent versions of binutils for ARM. So replace the alias with 'ttab'. Fixes: 81edb4262975 ("crypto: arm/aes - replace scalar AES cipher") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-cipher-core.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0ff1436fb2e3da085f7177d03ce4362c45b75d57 Author: Shannon Nelson Date: Thu Jan 12 10:52:49 2017 -0800 hwrng: n2 - update version info Signed-off-by: Shannon Nelson Signed-off-by: Herbert Xu drivers/char/hw_random/n2-drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 07e25d43be8502bd8ab6122c4f6449ebf30e98f7 Author: Shannon Nelson Date: Thu Jan 12 10:52:48 2017 -0800 hwrng: n2 - support new hardware register layout Add the new register layout constants and the requisite logic for using them. Signed-off-by: Shannon Nelson Signed-off-by: Herbert Xu drivers/char/hw_random/n2-drv.c | 144 +++++++++++++++++++++++++++++----------- drivers/char/hw_random/n2rng.h | 36 +++++++--- 2 files changed, 134 insertions(+), 46 deletions(-) commit becbc4940ad8e8ff560e1ceee33d9bb4fe4c9225 Author: Shannon Nelson Date: Thu Jan 12 10:52:47 2017 -0800 hwrng: n2 - add device data descriptions Since we're going to need to keep track of more than just one attribute of the hardware, we'll change the use of the data field from the match struct from a single flag to a struct pointer. This patch adds the struct template and initial descriptions. Signed-off-by: Shannon Nelson Signed-off-by: Herbert Xu drivers/char/hw_random/n2-drv.c | 47 ++++++++++++++++++++++++++++++++++------- drivers/char/hw_random/n2rng.h | 15 +++++++++++++ 2 files changed, 54 insertions(+), 8 deletions(-) commit db602a7f940a71870c17e39bcbe4e4d7a4a8273e Author: Shannon Nelson Date: Thu Jan 12 10:52:46 2017 -0800 hwrng: n2 - limit error spewage when self-test fails If the self-test fails, it probably won't actually suddenly start working. Currently, this causes an endless spew of error messages on the console and in the logs, so this patch adds a limiter to the test. Reported-by: Sowmini Varadhan Signed-off-by: Shannon Nelson Signed-off-by: Herbert Xu drivers/char/hw_random/n2-drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit de0f96d7724f4ce3b48af10a0ea29150f6ddd5ba Author: Wei Yongjun Date: Thu Jan 12 15:03:21 2017 +0000 crypto: mediatek - make symbol of_crypto_id static Fixes the following sparse warning: drivers/crypto/mediatek/mtk-platform.c:585:27: warning: symbol 'of_crypto_id' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21c8e72037fb163b87b101724438259bc7651975 Author: Ard Biesheuvel Date: Thu Jan 12 13:40:39 2017 +0000 crypto: testmgr - use calculated count for number of test vectors When working on AES in CCM mode for ARM, my code passed the internal tcrypt test before I had even bothered to implement the AES-192 and AES-256 code paths, which is strange because the tcrypt does contain AES-192 and AES-256 test vectors for CCM. As it turned out, the define AES_CCM_ENC_TEST_VECTORS was out of sync with the actual number of test vectors, causing only the AES-128 ones to be executed. So get rid of the defines, and wrap the test vector references in a macro that calculates the number of vectors automatically. The following test vector counts were out of sync with the respective defines: BF_CTR_ENC_TEST_VECTORS 2 -> 3 BF_CTR_DEC_TEST_VECTORS 2 -> 3 TF_CTR_ENC_TEST_VECTORS 2 -> 3 TF_CTR_DEC_TEST_VECTORS 2 -> 3 SERPENT_CTR_ENC_TEST_VECTORS 2 -> 3 SERPENT_CTR_DEC_TEST_VECTORS 2 -> 3 AES_CCM_ENC_TEST_VECTORS 8 -> 14 AES_CCM_DEC_TEST_VECTORS 7 -> 17 AES_CCM_4309_ENC_TEST_VECTORS 7 -> 23 AES_CCM_4309_DEC_TEST_VECTORS 10 -> 23 CAMELLIA_CTR_ENC_TEST_VECTORS 2 -> 3 CAMELLIA_CTR_DEC_TEST_VECTORS 2 -> 3 Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.c | 1033 +++++++++++------------------------------------------- crypto/testmgr.h | 272 +------------- 2 files changed, 204 insertions(+), 1101 deletions(-) commit cc477bf645736739e69d31fdf715281ef0dd5f9b Author: Ard Biesheuvel Date: Wed Jan 11 16:41:54 2017 +0000 crypto: arm/aes - replace bit-sliced OpenSSL NEON code This replaces the unwieldy generated implementation of bit-sliced AES in CBC/CTR/XTS modes that originated in the OpenSSL project with a new version that is heavily based on the OpenSSL implementation, but has a number of advantages over the old version: - it does not rely on the scalar AES cipher that also originated in the OpenSSL project and contains redundant lookup tables and key schedule generation routines (which we already have in crypto/aes_generic.) - it uses the same expanded key schedule for encryption and decryption, reducing the size of the per-key data structure by 1696 bytes - it adds an implementation of AES in ECB mode, which can be wrapped by other generic chaining mode implementations - it moves the handling of corner cases that are non critical to performance to the glue layer written in C - it was written directly in assembler rather than generated from a Perl script Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 1 + arch/arm/crypto/Makefile | 7 +- arch/arm/crypto/aes-armv4.S | 1089 --------------- arch/arm/crypto/aes-neonbs-core.S | 1021 ++++++++++++++ arch/arm/crypto/aes-neonbs-glue.c | 405 ++++++ arch/arm/crypto/aes_glue.h | 19 - arch/arm/crypto/aesbs-core.S_shipped | 2548 ---------------------------------- arch/arm/crypto/aesbs-glue.c | 367 ----- arch/arm/crypto/bsaes-armv7.pl | 2471 --------------------------------- 9 files changed, 1429 insertions(+), 6499 deletions(-) commit c88215d7050f065afaed33e9599c2ef4e5e6ee22 Author: Jouni Malinen Date: Fri Jan 13 01:12:22 2017 +0200 cfg80211: Fix documentation for connect result The function documentation for cfg80211_connect_bss() and cfg80211_connect_result() was still claiming that they are used only for a success case while these functions can now be used to report both success and various failure cases. The actual use cases were already described in the connect() documentation. Update the function specific comments to note the failure cases and also describe how the special status == -1 case is used in cfg80211_connect_bss() to indicate a connection timeout based on the internal implementation in cfg80211_connect_timeout(). Signed-off-by: Jouni Malinen [use tabs for indentation] Signed-off-by: Johannes Berg include/net/cfg80211.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 3093ebbeabcdddc9a982950052f2151df43c7aa2 Author: Purushottam Kushwaha Date: Fri Jan 13 01:12:21 2017 +0200 cfg80211: Specify the reason for connect timeout This enhances the connect timeout API to also carry the reason for the timeout. These reason codes for the connect time out are represented by enum nl80211_timeout_reason and are passed to user space through a new attribute NL80211_ATTR_TIMEOUT_REASON (u32). Signed-off-by: Purushottam Kushwaha Signed-off-by: Jouni Malinen [keep gfp_t argument last] Signed-off-by: Johannes Berg include/net/cfg80211.h | 18 ++++++++++++++---- include/uapi/linux/nl80211.h | 21 +++++++++++++++++++++ net/wireless/core.h | 4 +++- net/wireless/mlme.c | 3 ++- net/wireless/nl80211.c | 9 +++++++-- net/wireless/nl80211.h | 4 +++- net/wireless/sme.c | 39 +++++++++++++++++++++++++++------------ net/wireless/util.c | 2 +- 8 files changed, 78 insertions(+), 22 deletions(-) commit bf95ecdba93b98d27ac219e79f773f2074b4ca47 Author: vamsi krishna Date: Fri Jan 13 01:12:20 2017 +0200 cfg80211: Add support to sched scan to report better BSSs Enhance sched scan to support option of finding a better BSS while in connected state. Firmware scans the medium and reports when it finds a known BSS which has better RSSI than the current connected BSS. New attributes to specify the relative RSSI (compared to the current BSS) are added to the sched scan to implement this. Signed-off-by: vamsi krishna Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg include/net/cfg80211.h | 36 +++++++++++++++++++++++++----------- include/uapi/linux/nl80211.h | 30 ++++++++++++++++++++++++++++++ net/wireless/nl80211.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 11 deletions(-) commit ab5bb2d51ba8da4add4612b529968446cdb504b1 Author: vamsi krishna Date: Fri Jan 13 01:12:19 2017 +0200 cfg80211: Add support for randomizing TA of Public Action frames Add support to use a random local address (Address 2 = TA in transmit and the same address in receive functionality) for Public Action frames in order to improve privacy of WLAN clients. Applications fill the random transmit address in the frame buffer in the NL80211_CMD_FRAME command. This can be used only with the drivers that indicate support for random local address by setting the new NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA and/or NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED in ext_features. The driver needs to configure receive behavior to accept frames to the specified random address during the time the frame exchange is pending and such frames need to be acknowledged similarly to frames sent to the local permanent address when this random address functionality is not used. Signed-off-by: vamsi krishna Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 6 ++++++ net/wireless/mlme.c | 21 +++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) commit 10b2eb6949ece992a1dd58edb28e01f05e5bf004 Author: Johannes Berg Date: Fri Jan 13 09:31:32 2017 +0100 wext: uninline stream addition functions With 78, 111 and 85 bytes respectively (on x86-64), the functions iwe_stream_add_event(), iwe_stream_add_point() and iwe_stream_add_value() really shouldn't be inlines. It appears that at least my compiler already decided the same, and created a single instance of each one of them for each file using it, but that's still a number of instances in the system overall, which this reduces. Signed-off-by: Johannes Berg include/net/iw_handler.h | 67 +++++------------------------------------------- net/wireless/wext-core.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 60 deletions(-) commit 102c5ce082f557405a0f71ad5a8920f9df50cd9e Author: Jack Wang Date: Mon Jan 2 13:22:05 2017 +0100 RDMA/cma: use cached port state when bind loopback Signed-off-by: Jack Wang Reviewed-by: Michael Wang Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 93b1f29de71f3bd3b88ec8a2c2874c3847cd38bc Author: Jack Wang Date: Mon Jan 2 13:20:44 2017 +0100 RDMA/cma: resolve to first active ib port When we try to resolve a dest addr, if we don't give src addr, cma core will try to resolve to our source ib device automatically. The current logic only checks if a given port has the same subnet_prefix as our dest, which is not enough if we use default well known subnet_prefix on our active port, as it will be the same as the subnet_prefix on inactive ports and we might match against an inactive port by accident. To resolve this, we should also check if port is active before we resolve it as a suitable src address for a given dest. Signed-off-by: Jack Wang Reviewed-by: Michael Wang Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9e2c3f1c7f3edc6bdd83dab601418ac6c3b6df73 Author: Jack Wang Date: Mon Jan 2 13:19:24 2017 +0100 RDMA/core: export ib_get_cached_port_state Export function for rdma_cm, patch for rdma_cm to follow. Signed-off-by: Jack Wang Reviewed-by: Michael Wang Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 18 ++++++++++++++++++ include/rdma/ib_cache.h | 13 +++++++++++++ 2 files changed, 31 insertions(+) commit aaaca121c7cf9217ab81d9db0a04835d52aabebe Author: Jack Wang Date: Mon Jan 2 13:17:36 2017 +0100 RDMA/core: add port state cache We need a port state cache in ib_core, later we will use in rdma_cm. Signed-off-by: Jack Wang Reviewed-by: Michael Wang Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 10 +++++++++- include/rdma/ib_verbs.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit 4e64350f42e2ce153bdffd9fe1741333f5a41e57 Author: Amelie Delaunay Date: Wed Jan 11 14:46:43 2017 +0100 rtc: add STM32 RTC driver This patch adds support for the STM32 RTC. Signed-off-by: Amelie Delaunay Reviewed-by: Mathieu Poirier Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-stm32.c | 727 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 739 insertions(+) commit 340c93c0a32acc916bb7655926398b8591e0a30b Author: Nagaraju, Vathsala Date: Mon Jan 2 17:00:58 2017 +0530 drm/i915/psr: enable ALPM for psr2 As per edp1.4 spec , alpm is required for psr2 operation as it's used for all psr2 main link power down management and alpm enable bit must be set for psr2 operation. Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: vathsala nagaraju Signed-off-by: Patil Deepti Reviewed-by: Jim Bride Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483356663-32668-6-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_psr.c | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) commit f40c484b78a3f9d4e469a11e7c6047ea6cb6f3b6 Author: Nagaraju, Vathsala Date: Wed Jan 11 20:44:33 2017 +0530 drm/i915/psr: disable aux_frame_sync on psr2 exit Screen freeze observed if AUX_FRAME_SYNC is not disabled on psr2 exit.AUX_FRAME_SYNC needed for psr2 is enabled during psr2 entry. It must be disabled on psr2 exit. v2: rebase Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484147673-2044-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/intel_psr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3fcb0ca1d8dbfdc4759f5816e39443cfe0f298f7 Author: Nagaraju, Vathsala Date: Thu Jan 12 23:30:59 2017 +0530 drm/i915/psr: fix blank screen issue for psr2 Psr1 and psr2 are mutually exclusive,ie when psr2 is enabled, psr1 should be disabled.When psr2 is exited , bit 31 of reg PSR2_CTL must be set to 0 but currently bit 31 of SRD_CTL (psr1 control register)is set to 0. Also ,PSR2_IDLE state is looked up from SRD_STATUS(psr1 register) instead of PSR2_STATUS register, which has wrong data, resulting in blankscreen. hsw_enable_source is split into hsw_enable_source_psr1 and hsw_enable_source_psr2 for easier code review and maintenance, as suggested by rodrigo and jim. v2: (Rodrigo) - Rename hsw_enable_source_psr* to intel_enable_source_psr* v3: (Rodrigo) - In hsw_psr_disable , 1) for psr active case, handle psr2 followed by psr1. 2) psr inactive case, handle psr2 followed by psr1 v4:(Rodrigo) - move psr2 restriction(32X20) to match_conditions function returning false and fully blocking PSR to a new patch before this one. v5: in source_psr2, removed val = EDP_PSR_ENABLE Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484244059-9201-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_reg.h | 3 + drivers/gpu/drm/i915/intel_psr.c | 122 +++++++++++++++++++++++++++++---------- 2 files changed, 95 insertions(+), 30 deletions(-) commit 7c60930500b5b48e12ef6b9d332b300f3e9a8354 Author: Amelie Delaunay Date: Thu Jan 5 14:43:23 2017 +0100 dt-bindings: document the STM32 RTC bindings This patch adds documentation of device tree bindings for the STM32 RTC. Signed-off-by: Amelie Delaunay Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/st,stm32-rtc.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 92c2f4a904dacf6b395c4d75348d203cb63730e3 Author: Ladislav Michl Date: Mon Jan 9 14:05:54 2017 +0100 ARM: dts: omap3-igep: Remove NAND partition table FDT harcoded partition table does not match that one in historical TI's 2.6.37 kernel and non legacy kernels even use different ECC scheme, yet noone complained, so remove it altogether. Also, UBI volumes instead of partitions are used since u-boot-2016.09. Signed-off-by: Ladislav Michl Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-igep.dtsi | 21 --------------------- 1 file changed, 21 deletions(-) commit 52349a2abff1a675ac51077e7bfc60054872245d Author: Grygorii Strashko Date: Thu Jan 12 11:14:29 2017 -0600 ARM: dts: am57xx-beagle-x15: implement errata "Ethernet RGMII2 Limited to 10/100 Mbps" According to errata i880 description the speed of Ethernet port 1 on AM572x SoCs rev 1.1 should be limited to 10/100Mbps, because RGMII2 Switching Characteristics are not compatible with 1000 Mbps operation [1]. The issue is fixed with Rev 2.0 silicon. Hence, rework Beagle-X15 and Begale-X15-revb1 to use phy-handle instead of phy_id and apply corresponding limitation to the Ethernet Phy 1. [1] http://www.ti.com/lit/er/sprz429j/sprz429j.pdf Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 14 ++++++++++++-- arch/arm/boot/dts/am57xx-beagle-x15-revb1.dts | 5 +++++ arch/arm/boot/dts/am57xx-beagle-x15.dts | 5 +++++ 3 files changed, 22 insertions(+), 2 deletions(-) commit c554a6d8fe5cd899486247ef5f9d3dc4d693685e Author: Teresa Remmet Date: Mon Jan 9 09:37:30 2017 +0100 ARM: dts: am335x-phycore-som: Remove partition tables As the bootloader passes the NAND and the SPI flash partition tables there is no need to keep them in the kernel device tree. Removed them. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 58 ------------------------------- 1 file changed, 58 deletions(-) commit fad51b08b7e0937b8b753de00eecf7ea88a2b2ff Author: Grygorii Strashko Date: Fri Jan 6 14:55:43 2017 -0600 ARM: dts: dra72-evm-revc: enable irqs for dp83867 eth phys TI DRA72-EVM Rev C has two DP83867 ethernet phys which support IRQ generation in case of phy/link status changes. The INT/PWDN lines from both DP83867 phys are wired to DRA7 gpio6.16, so reflect the same in DT. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra72-evm-revc.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d680414d0f421563a9746c29d82e6794a604cf0c Author: Tony Lindgren Date: Thu Jan 5 11:15:45 2017 -0800 ARM: dts: Configure BeagleBone peripheral USB VBUS irq This prevents having to poll peripheral USB port cable status. Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-bone-common.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 89d5dcc48c08b4669a503e99e5f8dc7b5bcd2242 Author: Arnd Bergmann Date: Wed Jan 11 14:40:52 2017 +0100 clk: stm32f4: avoid uninitialized variable access The failure path in the newly added function tries to free an uninitialized pointer: drivers/clk/clk-stm32f4.c: In function 'stm32f4_rcc_init': drivers/clk/clk-stm32f4.c:1106:4: error: 'gate' may be used uninitialized in this function [-Werror=maybe-uninitialized] I'm adding an initialization to NULL here to make the kfree() succeed, and I'm also rearranging the cleanup so that the same kfree() is used for any error path, making the function slightly more robust against newly introduced bugs in the error handling. Fixes: daf2d117cbca ("clk: stm32f4: Add lcd-tft clock") Signed-off-by: Arnd Bergmann Acked-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit c5c4d3a3f4a8c830cb514eb469a1025df2df0379 Author: David Daney Date: Wed Jan 11 11:22:11 2017 -0800 PCI: thunder-pem: Add support for cn81xx and cn83xx SoCs The pci-thunder-pem driver was initially developed for cn88xx SoCs. The cn81xx and cn83xx members of the same family of SoCs have a slightly different configuration of interrupt resources in the PEM hardware, which prevents the INTA legacy interrupt source from functioning with the current driver. There are two fixes required: 1) Don't fixup the PME interrupt on the newer SoCs as it already has the proper value. 2) Report MSI-X Capability Table Size of 2 for the newer SoCs, so the core MSI-X code doesn't inadvertently clobber the INTA machinery that happens to reside immediately following the table. Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-thunder-pem.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 717ac5ce13020920fa3975f290281395b6407900 Author: Eric Dumazet Date: Thu Jan 12 08:50:10 2017 -0800 ipv6: sr: static percpu allocation for hmac_ring Current allocations are not NUMA aware, and lack proper cleanup in case of error. It is perfectly fine to use static per cpu allocations for 256 bytes per cpu. Signed-off-by: Eric Dumazet Cc: David Lebrun Acked-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_hmac.c | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) commit 8fb472c09b9df478a062eacc7841448e40fc3c17 Author: Nikolay Aleksandrov Date: Thu Jan 12 15:53:33 2017 +0100 ipmr: improve hash scalability Recently we started using ipmr with thousands of entries and easily hit soft lockups on smaller devices. The reason is that the hash function uses the high order bits from the src and dst, but those don't change in many common cases, also the hash table is only 64 elements so with thousands it doesn't scale at all. This patch migrates the hash table to rhashtable, and in particular the rhl interface which allows for duplicate elements to be chained because of the MFC_PROXY support (*,G; *,*,oif cases) which allows for multiple duplicate entries to be added with different interfaces (IMO wrong, but it's been in for a long time). And here are some results from tests I've run in a VM: mr_table size (default, allocated for all namespaces): Before After 49304 bytes 2400 bytes Add 65000 routes (the diff is much larger on smaller devices): Before After 1m42s 58s Forwarding 256 byte packets with 65000 routes (test done in a VM): Before After 3 Mbps / ~1465 pps 122 Mbps / ~59000 pps As a bonus we no longer see the soft lockups on smaller devices which showed up even with 2000 entries before. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 57 ++++++++--- net/ipv4/ipmr.c | 255 +++++++++++++++++++++++++++---------------------- 2 files changed, 182 insertions(+), 130 deletions(-) commit afc9595ea4770f0157ae06fb3acedff703e169b6 Author: Shawn Lin Date: Thu Jan 12 09:53:17 2017 +0800 PCI: rockchip: Disable RC's ASPM L0s based on DT "aspm-no-l0s" Rockchip's RC produces a 100MHz reference clock but there are two methods for the PHY to generate it: (1) Use the system PLL to generate a 100MHz clock. The PHY will relock it, filter signal noise, and output the reference clock. ASPM L0s works correctly, but circuit noise issues make it difficult to pass the TX compatibility test. (2) Share the SoC's 24MHZ crystal oscillator with the PHY and force the PHY's PLL to generate 100MHz internally. In this case, exit from ASPM L0s sometimes fails due to a design error in the RC receiver circuit. Even if we use extended-synch, the PHY sometimes fails to relock the bits from FTS, which will hang the system. We want the flexibility to use both clocking methods, so add a DT property, "aspm-no-l0s". If that's present, disable L0s to avoid the issues with case (2). [bhelgaas: changelog] Reported-by: Jeffy Chen Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Rob Herring Documentation/devicetree/bindings/pci/rockchip-pcie.txt | 2 ++ drivers/pci/host/pcie-rockchip.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit c1ce1560a1ae1a58505c26bc0e46ce1aee982d54 Author: Eric Dumazet Date: Wed Jan 11 18:10:37 2017 -0800 secure_seq: fix sparse errors Fixes following warnings : net/core/secure_seq.c:125:28: warning: incorrect type in argument 1 (different base types) net/core/secure_seq.c:125:28: expected unsigned int const [unsigned] [usertype] a net/core/secure_seq.c:125:28: got restricted __be32 [usertype] saddr net/core/secure_seq.c:125:35: warning: incorrect type in argument 2 (different base types) net/core/secure_seq.c:125:35: expected unsigned int const [unsigned] [usertype] b net/core/secure_seq.c:125:35: got restricted __be32 [usertype] daddr net/core/secure_seq.c:125:43: warning: cast from restricted __be16 net/core/secure_seq.c:125:61: warning: restricted __be16 degrades to integer Fixes: 7cd23e5300c1 ("secure_seq: use SipHash in place of MD5") Signed-off-by: Eric Dumazet Reviewed-by: Jason A. Donenfeld Signed-off-by: David S. Miller net/core/secure_seq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a8ac1a55d0859cf8f53db3275ad4a6480868e80c Author: Prasad Kanneganti Date: Wed Jan 11 17:40:27 2017 -0800 liquidio VF: reduce load time of module Reduce the load time of the VF driver by decreasing the wait time between iterations of the loop that polls for a mailbox response from the PF. Also change the wait time units from jiffies to milliseconds. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 5 +++-- drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit a4dbf7cf17a537c0788819bfe575b2067f0310bc Author: Chris Wilson Date: Thu Jan 12 16:45:59 2017 +0000 drm/i915: Fix up kerneldoc parameters for i915_gem_gtt_*() Parameter: good. Parameter - bad. One day I'll learn the syntax. Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper") Fixes: e007b19d7ba7 ("drm/i915: Use the MRU stack search after evicting") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170112164559.27232-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_gtt.c | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 53762ba810398c11efaf65f9a45d992125e86dcf Author: Zhou Wang Date: Wed Jan 4 15:00:06 2017 +0800 PCI/ACPI: Fix bus range comparison in pci_mcfg_lookup() The configuration data provided by an MCFG entry, i.e., PCI segment and bus range, may span multiple host bridges. pci_mcfg_lookup() previously required an exact match of the host bridge starting bus and the MCFG starting bus, which made the following configuration fail: MCFG region: segment: 0 bus range: 0x00-0xff host bridge segment: 0 bus range: 0x20-0x4f Relax the bus range check in pci_mcfg_lookup() so we can use any MCFG entry that contains the required bus range, as we do in pci_mmconfig_lookup(). [bhelgaas: changelog] Signed-off-by: Zhou Wang Signed-off-by: Bjorn Helgaas Reviewed-by: Tomasz Nowicki Acked-by: Lorenzo Pieralisi drivers/acpi/pci_mcfg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cb2336b5965d95d03e46d145d5e11aea4eaab0ad Author: Felix Manlunas Date: Wed Jan 11 17:09:02 2017 -0800 liquidio: remove unnecessary code Remove code that's no longer needed. It used to serve a purpose, which was to fix a link-related bug. For a while now, the NIC firmware has had a more elegant fix for that bug. Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit b65b09aa79086f0f2aa8935eae410f87495b8c04 Author: Joe Perches Date: Wed Jan 11 14:52:20 2017 -0800 tilepro: Fix non-void return from void function commit bc1f44709cf2 ("net: make ndo_get_stats64 a void function") mistakenly used a return value for this void conversion. Fix it. Signed-off-by: Joe Perches cc: stephen hemminger Signed-off-by: David S. Miller drivers/net/ethernet/tile/tilepro.c | 4 ---- 1 file changed, 4 deletions(-) commit 72d13c15fcc99788775a9f846805cbe4e6f1a164 Merge: 37c9782 52aab18 Author: David S. Miller Date: Thu Jan 12 15:05:10 2017 -0500 Merge branch 'mdio-gpio-next' Florian Fainelli says: ==================== net: mdio-gpio: Use modern GPIO helpers This patch series modernizes the mdio-gpio and makes it switch to the latest and greatest API for manipulating GPIO lines, thus allowing some simplifications in the driver. ==================== Signed-off-by: David S. Miller commit 52aab18ef54ba9e71444b1d289a4a78ea374423b Author: Guenter Roeck Date: Wed Jan 11 12:59:51 2017 -0800 net: mdio-gpio: Use gpio subsystem to handle low-active pins gpiod functions support handling low-active pins, so we can move thos code out of this driver into the gpio subsystem and simplify the code a bit. Signed-off-by: Guenter Roeck Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-gpio.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 7e5fbd1e0700f1bdb94508f84ec2aeb01eed7b12 Author: Guenter Roeck Date: Wed Jan 11 12:59:50 2017 -0800 net: mdio-gpio: Convert to use gpiod functions where possible Using gpiod functions lets us use functionality which is not available with gpio functions. There is no gpiod function to match devm_gpio_request_one, so leave it in place and use gpio_to_desc() to convert absolute pin numbers to gpio descriptors. Signed-off-by: Guenter Roeck Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-gpio.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 08d9665cfed37b51766284ca2f9b6e4f3ccd6959 Author: Guenter Roeck Date: Wed Jan 11 12:59:49 2017 -0800 net: mdio-gpio: Use devm_gpio_request_one instead of devm_gpio_request Using devm_gpio_request_one lets us request gpio pins with initial state in one go. Signed-off-by: Guenter Roeck Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-gpio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 27d41d29c7f093f6f77843624fbb080c1b4a8b9c Author: Feras Daoud Date: Wed Dec 28 14:47:28 2016 +0200 IB/ipoib: Change list_del to list_del_init in the tx object Since ipoib_cm_tx_start function and ipoib_cm_tx_reap function belong to different work queues, they can run in parallel. In this case if ipoib_cm_tx_reap calls list_del and release the lock, ipoib_cm_tx_start may acquire it and call list_del_init on the already deleted object. Changing list_del to list_del_init in ipoib_cm_tx_reap fixes the problem. Fixes: 839fcaba355a ("IPoIB: Connected mode experimental support") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c586071d1dc8227a7182179b8e50ee92cc43f6d2 Author: Feras Daoud Date: Wed Dec 28 14:47:27 2016 +0200 IB/ipoib: Replace list_del of the neigh->list with list_del_init In order to resolve a situation where a few process delete the same list element in sequence and cause panic, list_del is replaced with list_del_init. In this case if the first process that calls list_del releases the lock before acquiring it again, other processes who can acquire the lock will call list_del_init. Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13ee429a0271b997f57b22ee67d40fc601f0b220 Author: Feras Daoud Date: Wed Dec 28 14:47:26 2016 +0200 IB/ipoib: Use debug prints instead of warnings in RNR WC status If a receive request has not been posted to the work queue, the incoming message is rejected and the peer will receive a receiver-not-ready (RNR) error. In IPoIB, IB_WC_RNR_RETRY_EXC_ERR error is part of the life cycle therefore ipoib_cm_handle_tx_wc function will print to debug instead of warnings. Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d32b9a81d7c9bf111536b547a60b50c8dd7fccd1 Author: Feras Daoud Date: Wed Dec 28 14:47:25 2016 +0200 IB/ipoib: Add detailed error message to dev_queue_xmit call Add a detailed return code to dev_queue_xmit function when calling to requeue packet via __skb_dequeue. Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 7 ++++--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++++--- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 ++++-- 3 files changed, 13 insertions(+), 8 deletions(-) commit 89a3987ab7a923c047c6dec008e60ad6f41fac22 Author: Feras Daoud Date: Wed Dec 28 14:47:24 2016 +0200 IB/ipoib: rtnl_unlock can not come after free_netdev The ipoib_vlan_add function calls rtnl_unlock after free_netdev, rtnl_unlock not only releases the lock, but also calls netdev_run_todo. The latter function browses the net_todo_list array and completes the unregistration of all its net_device instances. If we call free_netdev before rtnl_unlock, then netdev_run_todo call over the freed device causes panic. To fix, move rtnl_unlock call before free_netdev call. Fixes: 9baa0b036410 ("IB/ipoib: Add rtnl_link_ops support") Cc: Or Gerlitz Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a0007f28304cb9fc87809c86abb80ec71317f20 Author: Feras Daoud Date: Wed Dec 28 14:47:23 2016 +0200 IB/ipoib: Fix deadlock between rmmod and set_mode When calling set_mode from sys/fs, the call flow locks the sys/fs lock first and then tries to lock rtnl_lock (when calling ipoib_set_mod). On the other hand, the rmmod call flow takes the rtnl_lock first (when calling unregister_netdev) and then tries to take the sys/fs lock. Deadlock a->b, b->a. The problem starts when ipoib_set_mod frees it's rtnl_lck and tries to get it after that. set_mod: [] ? check_preempt_curr+0x6d/0x90 [] __mutex_lock_slowpath+0x13e/0x180 [] ? __rtnl_unlock+0x15/0x20 [] mutex_lock+0x2b/0x50 [] rtnl_lock+0x15/0x20 [] ipoib_set_mode+0x97/0x160 [ib_ipoib] [] set_mode+0x3b/0x80 [ib_ipoib] [] dev_attr_store+0x20/0x30 [] sysfs_write_file+0xe5/0x170 [] vfs_write+0xb8/0x1a0 [] sys_write+0x51/0x90 [] system_call_fastpath+0x16/0x1b rmmod: [] ? put_dec+0x10c/0x110 [] ? number+0x2ee/0x320 [] schedule_timeout+0x215/0x2e0 [] ? vsnprintf+0x484/0x5f0 [] ? string+0x40/0x100 [] wait_for_common+0x123/0x180 [] ? default_wake_function+0x0/0x20 [] ? ifind_fast+0x5e/0xb0 [] wait_for_completion+0x1d/0x20 [] sysfs_addrm_finish+0x228/0x270 [] sysfs_remove_dir+0xa3/0xf0 [] kobject_del+0x16/0x40 [] device_del+0x184/0x1e0 [] netdev_unregister_kobject+0xab/0xc0 [] rollback_registered+0xae/0x130 [] unregister_netdevice+0x22/0x70 [] unregister_netdev+0x1e/0x30 [] ipoib_remove_one+0xe0/0x120 [ib_ipoib] [] ib_unregister_device+0x4f/0x100 [ib_core] [] mlx4_ib_remove+0x41/0x180 [mlx4_ib] [] mlx4_remove_device+0x71/0x90 [mlx4_core] Fixes: 862096a8bbf8 ("IB/ipoib: Add more rtnl_link_ops callbacks") Cc: # v3.6+ Cc: Or Gerlitz Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 12 +++++++----- drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 ++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 1c3098cdb05207e740715857df7b0998e372f527 Author: Feras Daoud Date: Wed Dec 28 14:47:22 2016 +0200 IB/ipoib: Fix deadlock over vlan_mutex This patch fixes Deadlock while executing ipoib_vlan_delete. The function takes the vlan_rwsem semaphore and calls unregister_netdevice. The later function calls ipoib_mcast_stop_thread that cause workqueue flush. When the queue has one of the ipoib_ib_dev_flush_xxx events, a deadlock occur because these events also tries to catch the same vlan_rwsem semaphore. To fix, unregister_netdevice should be called after releasing the semaphore. Fixes: cbbe1efa4972 ("IPoIB: Fix deadlock between ipoib_open() and child interface create") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 80b5b35aba62232521b31440f0a3cf6caa033849 Author: Feras Daoud Date: Wed Dec 28 14:47:21 2016 +0200 IB/ipoib: Set device connection mode only when needed When changing the connection mode, the ipoib_set_mode function did not check if the previous connection mode equals to the new one. This commit adds the required check and return 0 if the new mode equals to the previous one. Fixes: 839fcaba355a ("IPoIB: Connected mode experimental support") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 29da686dff757968fbf5a9bb5246070ddf602664 Author: Feras Daoud Date: Wed Dec 28 14:47:20 2016 +0200 IB/ipoib: When given an invalid UD MTU, give debug msg In datagram mode, the IB UD (Unreliable Datagram) transport is used so the MTU of the interface is equal to the IB L2 MTU minus the IPoIB encapsulation header. Any request to change the MTU value above the maximum range will change the MTU to the max allowed, but will not show any warning message. An ipoib_warn is issued in such cases, letting the user know that even though the value is legal, it can't be currently applied. Signed-off-by: Feras Daoud Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 66d228a2bf03b163ddaeca5f24f1ff89a84ad668 Author: Jon Hunter Date: Wed Jan 11 17:44:25 2017 +0000 regulator: core: Don't use regulators as supplies until the parent is bound When regulators are successfully registered, we check to see if the regulator is a supply for any other registered regulator and if so add the new regulator as the supply for the existing regulator(s). Some devices, such as Power Management ICs, may register a series of regulators when probed and there are cases where one of the regulators may fail to register and defer the probing of the parent device. In this case any successfully registered regulators would be unregistered so that they can be re-registered at some time later when the probe is attempted again. However, if one of the regulators that was registered was added as a supply to another registered regulator (that did not belong to the same parent device), then this supply regulator was unregister again because the parent device is probe deferred, then a regulator could be holding an invalid reference to a supply regulator that has been unregistered. This will lead to a system crash if that regulator is then used. Although it would be possible to check when unregistering a regulator if any other regulator in the system is using it as a supply, it still may not be possible to remove it as a supply if this other regulator is in use. Therefore, fix this by preventing any regulator from adding another regulator as a supply if the parent device for the supply regulator has not been bound and if the parent device for the supply and the regulator are different. This will allow a parent device that is registering regulators to be probe deferred and ensure that none of the regulators it has registered are used as supplies for any other regulator from another device. Signed-off-by: Jon Hunter Signed-off-by: Mark Brown drivers/regulator/core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 969f751036fd3cbe15e84aa56d055e54ddb96e7c Author: Nicholas Mc Guire Date: Thu Jan 12 11:47:45 2017 +0100 ASoC: rt5660: use msleep() for long delay ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. For this large delay msleep() is preferable. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 2b26dd4c1fc5 ("ASoC: rt5660: add rt5660 codec driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5660.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4281fcc02ed9f902dfa52d3635ac7f04b1a7341f Author: Nicholas Mc Guire Date: Thu Jan 12 11:48:11 2017 +0100 ASoC: rt5660: remove double const Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL() already which is called by SOC_ENUM_SINGLE_DECL() here. Fixes: commit 2b26dd4c1fc5 ("ASoC: rt5660: add rt5660 codec driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8abab35f9a58e15b1f90a1371da69a207e40fc3b Author: Charles Keepax Date: Thu Jan 12 11:38:15 2017 +0000 ASoC: Fixup some small kernel-doc typos Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-ac97.c | 2 +- sound/soc/soc-core.c | 2 +- sound/soc/soc-ops.c | 2 +- sound/soc/soc-topology.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 2cf8e2dfdf88363476f23bc600745250b94dbbed Author: Charles Keepax Date: Thu Jan 12 11:17:39 2017 +0000 regmap: Fixup the kernel-doc comments on functions/structures Most of the kernel-doc comments in regmap don't actually generate correctly. This patch fixes up a few common issues, corrects some typos and adds some missing argument descriptions. The most common issues being using a : after the function name which causes the short description to not render correctly and not separating the long and short descriptions of the function. There are quite a few instances of arguments not being described or given the wrong name as well. This patch doesn't fixup functions/structures that are currently missing descriptions. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regcache.c | 20 +++---- drivers/base/regmap/regmap-irq.c | 62 ++++++++++--------- drivers/base/regmap/regmap.c | 125 +++++++++++++++++++++------------------ include/linux/regmap.h | 115 ++++++++++++++++++++--------------- 4 files changed, 179 insertions(+), 143 deletions(-) commit eae39b5f4269260d5d8b35133ba0f4c5e2895b71 Author: Nicholas Mc Guire Date: Thu Jan 12 14:15:03 2017 +0100 ASoC: rt5659: drop double const Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL() already which is called by SOC_ENUM_SINGLE_DECL() as well as the double const by calls to SOC_VALUE_ENUM_SINGLE_DECL() via SOC_VALUE_ENUM_DOUBLE_DECL). Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 86 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) commit db287ec5cb58e765e19c9de0e26411fc64c65de3 Author: ssh10 Date: Sat Dec 24 21:50:06 2016 +0530 RDMA/ocrdma: Replace BUG() with BUG_ON() Replace BUG() with BUG_ON() using coccinelle Signed-off-by: Shyam Saini Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit b462b06eb6b4b8006fc384ac9e8fe6b3d35b0c05 Author: ssh10 Date: Sat Dec 24 07:14:35 2016 +0530 RDMA/cxgb4: Use AF_INET for sin_family field Elsewhere the sin_family field holds a value with a name of the form AF_..., so it seems reasonable to do so here as well. Also the values of PF_INET and AF_INET are the same. The semantic patch that makes this change is as follows: // @@ struct sockaddr_in sip; @@ ( sip.sin_family == - PF_INET + AF_INET | sip.sin_family != - PF_INET + AF_INET | sip.sin_family = - PF_INET + AF_INET ) // Signed-off-by: Shyam Saini Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55efcfcd7776165b294f8b5cd6e05ca00ec89b7c Author: Jason Gunthorpe Date: Thu Dec 22 18:07:52 2016 -0700 RDMA/core: Fix incorrect structure packing for booleans The RDMA core uses ib_pack() to convert from unpacked CPU structs to on-the-wire bitpacked structs. This process requires that 1 bit fields are declared as u8 in the unpacked struct, otherwise the packing process does not read the value properly and the packed result is wired to 0. Several places wrongly used int. Crucially this means the kernel has never, set reversible correctly in the path record request. It has always asked for irreversible paths even if the ULP requests otherwise. When the kernel is used with a SM that supports this feature, it completely breaks communication management if reversible paths are not properly requested. The only reason this ever worked is because opensm ignores the reversible bit. Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/rdma/ib_sa.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0230f088adcf537a60df9d80dce5b71059946dfe Author: Nicholas Mc Guire Date: Thu Jan 12 14:14:41 2017 +0100 ASoC: rt5659: declare rt5659_i2c_driver static Declar rt5659_i2c_driver, which is only being passed to module_i2c_driver(rt5659_i2c_driver), static. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11b4ad9631d99df8a8f5ab175eab78d5850e92fe Author: Nicholas Mc Guire Date: Thu Jan 12 14:14:20 2017 +0100 ASoC: rt5659: use msleep() for long delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. For this large delay msleep() is preferable. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df15856132bc837b512caa36d2227d2350cf64d8 Author: Amrani, Ram Date: Thu Dec 22 14:52:24 2016 +0200 RDMA/qedr: restructure functions that create/destroy QPs Simplify function and sub-function flow of QP creation and destruction. This also serves as a preparation for SRQ and iWARP support. Signed-off-by: Ram Amrani Reviewed-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 549 ++++++++++++++++--------------------- 1 file changed, 236 insertions(+), 313 deletions(-) commit 4a312c9c825adf74c0026c98fed4ab59ce190863 Author: Nicholas Mc Guire Date: Thu Jan 12 13:09:41 2017 +0100 ASoC: rt5640: use msleep() for long delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 70/80ms delays here passing the "min" value to msleep(). This reduces the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 246693ba7b0b ("ASoC: rt5640: change widget sequence for depop") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f92f5ce01ee6a6a86cbfc4e3b0d18529c302b1ea Author: Suzuki K Poulose Date: Thu Jan 12 16:37:28 2017 +0000 arm64: Advertise support for Rounding double multiply instructions ARM v8.1 extensions include support for rounding double multiply add/subtract instructions to the A64 SIMD instructions set. Let the userspace know about it via a HWCAP bit. Cc: Mark Rutland Cc: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + 3 files changed, 3 insertions(+) commit 21976853fcb0bb8a507264a0cf2f44db29ecca82 Author: Chris Wilson Date: Thu Jan 12 11:21:08 2017 +0000 drm/i915: Expand ggtt_view parameters for debugfs When dumping the VMA, include the parameters of the different GGTT views so that we can distinguish them. v2: Contract output and add MISSING_CASE for any unknown types. v3: Show both stride and offset for rotated planes. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170112112108.31632-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit fcd46e53449c4d659ffbedcd2823ea2f73e39927 Author: Chris Wilson Date: Thu Jan 12 13:04:31 2017 +0000 drm/i915: Declare i915_gem_object_create_internal() as taking phys_addr_t size The internal object is a collection of struct pages and so is intrinsically linked to the available physical memory on the machine, and not an arbitrary type from the uabi. Use phys_addr_t so the link between size and memory consumption is clear, and then double check that we don't overflow the maximum object size. v2: Also assert that size is not zero - a mistake I made a few times while writing selftests. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170112130431.1844-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_internal.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 7c3f86b6dc51b38ee30aaac00cdf39d20b2e7b38 Author: Chris Wilson Date: Thu Jan 12 11:00:49 2017 +0000 drm/i915: Invalidate the guc ggtt TLB upon insertion Move the GuC invalidation of its ggtt TLB to where we perform the ggtt modification rather than proliferate it into all the callers of the insert (which may or may not in fact have to do the insertion). v2: Just do the guc invalidate unconditionally, (afaict) it has no impact without the guc loaded on gen8+ v3: Conditionally invalidate the guc - just in case that register has not been validated for other modes. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniel Vetter Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170112110050.25333-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 78 +++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++ drivers/gpu/drm/i915/i915_guc_submission.c | 3 -- drivers/gpu/drm/i915/intel_guc_loader.c | 7 +-- drivers/gpu/drm/i915/intel_lrc.c | 6 --- 5 files changed, 57 insertions(+), 40 deletions(-) commit bb75f33cf0f8f332dd69e9c1966a8eb0769ee38b Author: Geliang Tang Date: Tue Dec 20 22:02:12 2016 +0800 RDMA/qib: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Reviewed-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Acked-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_user_sdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e8f4eb3bfaf4ddb8765cf11c24cadfb1f20e714a Author: Cao jin Date: Mon Dec 19 14:46:36 2016 +0800 RDMA/hfi1: drop pci_link_reset() In AER recovery, pci_error_handlers.link_reset() is never called, drop it now. Signed-off-by: Cao jin Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pcie.c | 10 ---------- 1 file changed, 10 deletions(-) commit 850d08721aa10de0cce98fc695bd1ca775dea92e Author: Cao jin Date: Mon Dec 19 14:46:35 2016 +0800 RDMA/qib: drop qib_pci_link_reset() In AER recovery, pci_error_handlers.link_reset() is never called, drop it now. Signed-off-by: Cao jin Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_pcie.c | 8 -------- 1 file changed, 8 deletions(-) commit 7f6856b789ff13ccfd317c936e4b161c0bbd88a3 Author: Kees Cook Date: Fri Dec 16 17:05:42 2016 -0800 RDMA/i40iw: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 128 +++++++++++++++---------------- drivers/infiniband/hw/i40iw/i40iw_uk.c | 34 ++++---- 2 files changed, 80 insertions(+), 82 deletions(-) commit 6554c9f7f7499ee8229e0bdf0e873d9b7a93405d Author: Kees Cook Date: Fri Dec 16 17:03:16 2016 -0800 RDMA/nes: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1abee99eafab67fb1c98f9ecfc43cd5735384a86 Author: Ard Biesheuvel Date: Wed Jan 11 16:41:55 2017 +0000 crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64 This is a reimplementation of the NEON version of the bit-sliced AES algorithm. This code is heavily based on Andy Polyakov's OpenSSL version for ARM, which is also available in the kernel. This is an alternative for the existing NEON implementation for arm64 authored by me, which suffers from poor performance due to its reliance on the pathologically slow four register variant of the tbl/tbx NEON instruction. This version is about ~30% (*) faster than the generic C code, but only in cases where the input can be 8x interleaved (this is a fundamental property of bit slicing). For this reason, only the chaining modes ECB, XTS and CTR are implemented. (The significance of ECB is that it could potentially be used by other chaining modes) * Measured on Cortex-A57. Note that this is still an order of magnitude slower than the implementations that use the dedicated AES instructions introduced in ARMv8, but those are part of an optional extension, and so it is good to have a fallback. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 7 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/aes-neonbs-core.S | 963 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/aes-neonbs-glue.c | 420 ++++++++++++++++ 4 files changed, 1393 insertions(+) commit 81edb42629758bacdf813dd5e4542ae26e3ad73a Author: Ard Biesheuvel Date: Wed Jan 11 16:41:53 2017 +0000 crypto: arm/aes - replace scalar AES cipher This replaces the scalar AES cipher that originates in the OpenSSL project with a new implementation that is ~15% (*) faster (on modern cores), and reuses the lookup tables and the key schedule generation routines from the generic C implementation (which is usually compiled in anyway due to networking and other subsystems depending on it). Note that the bit sliced NEON code for AES still depends on the scalar cipher that this patch replaces, so it is not removed entirely yet. * On Cortex-A57, the performance increases from 17.0 to 14.9 cycles per byte for 128-bit keys. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 20 +---- arch/arm/crypto/Makefile | 4 +- arch/arm/crypto/aes-cipher-core.S | 179 ++++++++++++++++++++++++++++++++++++++ arch/arm/crypto/aes-cipher-glue.c | 74 ++++++++++++++++ arch/arm/crypto/aes_glue.c | 98 --------------------- 5 files changed, 256 insertions(+), 119 deletions(-) commit bed593c0e852f5c1efd3ca4e984fd744c51cf6ee Author: Ard Biesheuvel Date: Wed Jan 11 16:41:52 2017 +0000 crypto: arm64/aes - add scalar implementation This adds a scalar implementation of AES, based on the precomputed tables that are exposed by the generic AES code. Since rotates are cheap on arm64, this implementation only uses the 4 core tables (of 1 KB each), and avoids the prerotated ones, reducing the D-cache footprint by 75%. On Cortex-A57, this code manages 13.0 cycles per byte, which is ~34% faster than the generic C code. (Note that this is still >13x slower than the code that uses the optional ARMv8 Crypto Extensions, which manages <1 cycles per byte.) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 4 ++ arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/aes-cipher-core.S | 127 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/aes-cipher-glue.c | 69 ++++++++++++++++++++ 4 files changed, 203 insertions(+) commit 293614ce3eda94a3c9b38d5c18fdc06eb1397221 Author: Ard Biesheuvel Date: Wed Jan 11 16:41:51 2017 +0000 crypto: arm64/aes-blk - expose AES-CTR as synchronous cipher as well In addition to wrapping the AES-CTR cipher into the async SIMD wrapper, which exposes it as an async skcipher that defers processing to process context, expose our AES-CTR implementation directly as a synchronous cipher as well, but with a lower priority. This makes the AES-CTR transform usable in places where synchronous transforms are required, such as the MAC802.11 encryption code, which executes in sotfirq context, where SIMD processing is allowed on arm64. Users of the async transform will keep the existing behavior. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit afaf712e99a7e52e2520335ddefee6a9d84a6db5 Author: Ard Biesheuvel Date: Wed Jan 11 16:41:50 2017 +0000 crypto: arm/chacha20 - implement NEON version based on SSE3 code This is a straight port to ARM/NEON of the x86 SSE3 implementation of the ChaCha20 stream cipher. It uses the new skcipher walksize attribute to process the input in strides of 4x the block size. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 6 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/chacha20-neon-core.S | 523 +++++++++++++++++++++++++++++++++++ arch/arm/crypto/chacha20-neon-glue.c | 128 +++++++++ 4 files changed, 659 insertions(+) commit b7171ce9eb523fd90e38f2d138d1b6ed2ff3eafd Author: Ard Biesheuvel Date: Wed Jan 11 16:41:49 2017 +0000 crypto: arm64/chacha20 - implement NEON version based on SSE3 code This is a straight port to arm64/NEON of the x86 SSE3 implementation of the ChaCha20 stream cipher. It uses the new skcipher walksize attribute to process the input in strides of 4x the block size. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 6 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/chacha20-neon-core.S | 450 +++++++++++++++++++++++++++++++++ arch/arm64/crypto/chacha20-neon-glue.c | 127 ++++++++++ 4 files changed, 586 insertions(+) commit 41e05324fde983b1342f86239868f1959f6032a5 Author: Arnd Bergmann Date: Wed Jan 11 14:55:20 2017 +0100 crypto: mediatek - fix format string for 64-bit builds After I enabled COMPILE_TEST for non-ARM targets, I ran into these warnings: crypto/mediatek/mtk-aes.c: In function 'mtk_aes_info_map': crypto/mediatek/mtk-aes.c:224:28: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=] dev_err(cryp->dev, "dma %d bytes error\n", sizeof(*info)); crypto/mediatek/mtk-sha.c:344:28: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=] crypto/mediatek/mtk-sha.c:550:21: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=] The correct format for size_t is %zu, so use that in all three cases. Fixes: 785e5c616c84 ("crypto: mediatek - Add crypto driver support for some MediaTek chips") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 2 +- drivers/crypto/mediatek/mtk-sha.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7dee9f618790d0b723b29c46da10bffc7974a772 Author: Arnd Bergmann Date: Wed Jan 11 14:50:19 2017 +0100 crypto: mediatek - remove ARM dependencies Building the mediatek driver on an older ARM architecture results in a harmless warning: warning: (ARCH_OMAP2PLUS_TYPICAL && CRYPTO_DEV_MEDIATEK) selects NEON which has unmet direct dependencies (VFPv3 && CPU_V7) We could add an explicit dependency on CPU_V7, but it seems nicer to open up the build to additional configurations. This replaces the ARM optimized algorithm selection with the normal one that all other drivers use, and that in turn lets us relax the dependency on ARM and drop a number of the unrelated 'select' statements. Obviously a real user would still select those other optimized drivers as a fallback, but as there is no strict dependency, we can leave that up to the user. Fixes: 785e5c616c84 ("crypto: mediatek - Add crypto driver support for some MediaTek chips") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b8fbe71f7535d4dfeed0bb8d924107dc58d502e2 Author: Herbert Xu Date: Wed Jan 11 20:28:06 2017 +0800 crypto: x86/chacha20 - Manually align stack buffer The kernel on x86-64 cannot use gcc attribute align to align to a 16-byte boundary. This patch reverts to the old way of aligning it by hand. Fixes: 9ae433bc79f9 ("crypto: chacha20 - convert generic and...") Signed-off-by: Herbert Xu Reviewed-by: Ard Biesheuvel arch/x86/crypto/chacha20_glue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e93acd6f6778825a4e0b5a1a9b70324bf901d516 Author: Andrew Lutomirski Date: Tue Jan 10 15:24:46 2017 -0800 crypto: testmgr - Allocate only the required output size for hash tests There are some hashes (e.g. sha224) that have some internal trickery to make sure that only the correct number of output bytes are generated. If something goes wrong, they could potentially overrun the output buffer. Make the test more robust by allocating only enough space for the correct output size so that memory debugging will catch the error if the output is overrun. Tested by intentionally breaking sha224 to output all 256 internally-generated bits while running on KASAN. Cc: Ard Biesheuvel Cc: Herbert Xu Signed-off-by: Andy Lutomirski Signed-off-by: Herbert Xu crypto/testmgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f283148a0774e9b2de5ae4b42bb7dff50410f8cc Author: Colin Ian King Date: Tue Jan 3 13:21:22 2017 +0000 crypto: mediatek - don't return garbage err on successful return In the case where keylen <= bs mtk_sha_setkey returns an uninitialized return value in err. Fix this by returning 0 instead of err. Issue detected by static analysis with cppcheck. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 012ef70336a0dfb33ebe30cd80ec86aa1fe61f79 Author: Javier Martinez Canillas Date: Mon Jan 2 14:06:59 2017 -0300 crypto: picoxcell - Remove spacc_is_compatible() wrapper function The function is used to check either the platform device ID name or the OF node's compatible (depending how the device was registered) to know which device type was registered. But the driver is for a DT-only platform and so there's no need for this level of indirection since the devices can only be registered via OF. Suggested-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Acked-by: Jamie Iles Signed-off-by: Herbert Xu drivers/crypto/picoxcell_crypto.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 6b2be1ddbc427922231be712677d4fec37e9772a Author: Javier Martinez Canillas Date: Mon Jan 2 14:06:58 2017 -0300 crypto: picoxcell - Remove platform device ID table This driver is only used in the picoxcell platform and this is DT-only. So only a OF device ID table is needed and there's no need to have a platform device ID table. This patch removes the unneeded table. Suggested-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Acked-by: Jamie Iles Signed-off-by: Herbert Xu drivers/crypto/picoxcell_crypto.c | 7 ------- 1 file changed, 7 deletions(-) commit 4f44d86df083c3bc91d2fc315fc133c514d26a0d Author: Javier Martinez Canillas Date: Mon Jan 2 14:06:57 2017 -0300 crypto: picoxcell - Allow driver to build COMPILE_TEST is enabled Driver only has runtime but no build time dependency with ARCH_PICOXCELL. So it can be built for testing purposes if COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Suggested-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Acked-by: Jamie Iles Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8c34b949d8c9f61e099e00f22770e400adf2b76 Author: Gideon Israel Dsouza Date: Sat Dec 31 21:26:23 2016 +0530 crypto: Replaced gcc specific attributes with macros from compiler.h Continuing from this commit: 52f5684c8e1e ("kernel: use macros from compiler.h instead of __attribute__((...))") I submitted 4 total patches. They are part of task I've taken up to increase compiler portability in the kernel. I've cleaned up the subsystems under /kernel /mm /block and /security, this patch targets /crypto. There is which provides macros for various gcc specific constructs. Eg: __weak for __attribute__((weak)). I've cleaned all instances of gcc specific attributes with the right macros for the crypto subsystem. I had to make one additional change into compiler-gcc.h for the case when one wants to use this: __attribute__((aligned) and not specify an alignment factor. From the gcc docs, this will result in the largest alignment for that data type on the target machine so I've named the macro __aligned_largest. Please advise if another name is more appropriate. Signed-off-by: Gideon Israel Dsouza Signed-off-by: Herbert Xu crypto/ablkcipher.c | 5 +++-- crypto/acompress.c | 3 ++- crypto/aead.c | 3 ++- crypto/ahash.c | 3 ++- crypto/akcipher.c | 3 ++- crypto/blkcipher.c | 7 ++++--- crypto/cts.c | 5 +++-- crypto/kpp.c | 3 ++- crypto/pcbc.c | 3 ++- crypto/rng.c | 3 ++- crypto/scompress.c | 3 ++- crypto/shash.c | 9 +++++---- crypto/skcipher.c | 3 ++- include/linux/compiler-gcc.h | 1 + 14 files changed, 34 insertions(+), 20 deletions(-) commit d2110224a66779fc2c833d2c16caa73e2e23591e Author: Eric Biggers Date: Fri Dec 30 14:12:00 2016 -0600 crypto: testmgr - use kmemdup instead of kmalloc+memcpy It's recommended to use kmemdup instead of kmalloc followed by memcpy. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2016ead446b98c42dffd9b6c03ce813e5cb3b810 Author: Patrice Chotard Date: Thu Jan 12 14:19:39 2017 +0100 ARM: dts: STiH407-family: Supply Mailbox properties to delta RProc Signed-off-by: Lee Jones Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit eea6b611de9b8b838020a8e939eb728a07e48774 Author: Patrice Chotard Date: Thu Jan 12 14:17:35 2017 +0100 ARM: dts: STiH407-family: Supply mailbox properties to GP0 RProc Signed-off-by: Loic Pallardy Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 2196cb86f9554d6bbc100d27f46055009546ec89 Author: Patrice Chotard Date: Thu Jan 12 14:15:21 2017 +0100 ARM: dts: STiH407-family: update dmu remoteproc node Rename dmu_reserved to delta_reserved Rename st231_dmu to st231_delta Update the delta_reserved memory region start address Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f0e3ed1c0b849b7449e272f5e8ecd5566a652ce0 Author: Patrice Chotard Date: Thu Jan 12 14:11:58 2017 +0100 ARM: dts: STiH407-family: remove gp1 remoteproc node This node is unused, remove it Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 19 ------------------- 1 file changed, 19 deletions(-) commit 5eac80e8cd13133c95f3456b1634f26a75ba6068 Author: Patrice Chotard Date: Thu Jan 12 12:02:35 2017 +0100 ARM: dts: STiH407-family: remove audio remoteproc node This node is unused, remove it Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 16 ---------------- 1 file changed, 16 deletions(-) commit 04f0d55f905011ad94aa3079ec9ab74a6e083e58 Author: Patrice Chotard Date: Thu Jan 12 11:59:01 2017 +0100 ARM: dts: STiH407-family: update gp0_reserved memory region Update the start address of gp0_reserved memory region and enable it Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b9ec866d223f38eb0bf2a7c836e10031ee17f7af Author: Patrice Chotard Date: Fri Jan 6 14:30:21 2017 +0100 ARM: dts: STiH410-family: fix wrong parent clock frequency The clock parent was lower than child clock which is not correct. In some use case, it leads to division by zero. Signed-off-by: Gabriel Fernandez arch/arm/boot/dts/stih410.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b005ebf945e936cacd317a51500cb01033e86aec Author: Hugues Fruchet Date: Mon Dec 5 18:11:00 2016 +0100 ARM: dts: STiH410: add DELTA dt node This patch adds DT node for STMicroelectronics DELTA V4L2 video decoder Signed-off-by: Hugues Fruchet arch/arm/boot/dts/stih410.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b32a2297f4b520b1737c3090b20243860f4fe8ca Author: Patrice Chotard Date: Thu Dec 8 17:04:44 2016 +0100 ARM: dts: STiH407-family: disable fdma1 and fdma2 Only fdma0 instance is used for audio, so disable the 2 others instances. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 241a687853b988cb00cfd362824bf3fad180dd0e Author: Patrice Chotard Date: Wed Dec 7 10:51:31 2016 +0100 ARM: dts: STiH410: add hqvdp node Enable High Quality Video Data Plane which is an hardware IP dedicated to video rendering. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih410.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3a2f5a59a695a73e0cde9a61e0feae5fa730e936 Author: Stephen Smalley Date: Tue Jan 10 12:28:32 2017 -0500 security,selinux,smack: kill security_task_wait hook As reported by yangshukui, a permission denial from security_task_wait() can lead to a soft lockup in zap_pid_ns_processes() since it only expects sys_wait4() to return 0 or -ECHILD. Further, security_task_wait() can in general lead to zombies; in the absence of some way to automatically reparent a child process upon a denial, the hook is not useful. Remove the security hook and its implementations in SELinux and Smack. Smack already removed its check from its hook. Reported-by: yangshukui Signed-off-by: Stephen Smalley Acked-by: Casey Schaufler Acked-by: Oleg Nesterov Signed-off-by: Paul Moore include/linux/lsm_hooks.h | 7 ------- include/linux/security.h | 6 ------ kernel/exit.c | 19 ++----------------- security/security.c | 6 ------ security/selinux/hooks.c | 7 ------- security/smack/smack_lsm.c | 20 -------------------- 6 files changed, 2 insertions(+), 63 deletions(-) commit b4ba35c75a0671a06b978b6386b54148efddf39f Author: Stephen Smalley Date: Wed Jan 11 16:33:54 2017 -0500 selinux: drop unused socket security classes Several of the extended socket classes introduced by commit da69a5306ab92e07 ("selinux: support distinctions among all network address families") are never used because sockets can never be created with the associated address family. Remove these unused socket security classes. The removed classes are bridge_socket for PF_BRIDGE, ib_socket for PF_IB, and mpls_socket for PF_MPLS. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 6 ------ security/selinux/include/classmap.h | 6 ------ 2 files changed, 12 deletions(-) commit 37c9782c7306efcc831f7c989c0b7ab040956089 Author: Wei Yongjun Date: Thu Jan 12 13:43:47 2017 +0000 cdc-ether: usbnet_cdc_zte_status() can be static Fixes the following sparse warning: drivers/net/usb/cdc_ether.c:469:6: warning: symbol 'usbnet_cdc_zte_status' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e7d2fddba5a3e9243fc461027511a350f88c23b Author: Daniel Vetter Date: Tue Dec 27 11:49:25 2016 +0100 drm/tegra: Stop using drm_framebuffer_unregister_private This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But Tegra is using drm_framebuffer_remove and a free-standing FB, so this is redundant. One caveat here is that the failure path in the init code still manually cleaned up the fb. I presume that was an oversight and changed it over to drm_framebuffer_remove too. Cc: Thierry Reding Reviewed-by: Archit Taneja Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-5-git-send-email-daniel.vetter@ffwll.ch Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-2-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/tegra/fb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7f332fc1f0f053799aeda587cefbc67b5ecd72c5 Author: Takeshi Kihara Date: Wed Jan 11 11:11:17 2017 +0100 arm64: Add support for DMA_ATTR_SKIP_CPU_SYNC attribute to swiotlb This patch adds support for DMA_ATTR_SKIP_CPU_SYNC attribute for dma_{un}map_{page,sg} functions family to swiotlb. DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of the CPU cache for the given buffer assuming that it has been already transferred to 'device' domain. Ported from IOMMU .{un}map_{sg,page} ops. Acked-by: Laurent Pinchart Reviewed-by: Robin Murphy Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4d7b9dc1f36a99423a6171d393040165fb135530 Author: Sowmini Varadhan Date: Thu Jan 12 05:10:11 2017 -0800 tools: psock_lib: harden socket filter used by psock tests The filter added by sock_setfilter is intended to only permit packets matching the pattern set up by create_payload(), but we only check the ip_len, and a single test-character in the IP packet to ensure this condition. Harden the filter by adding additional constraints so that we only permit UDP/IPv4 packets that meet the ip_len and test-character requirements. Include the bpf_asm src as a comment, in case this needs to be enhanced in the future Signed-off-by: Sowmini Varadhan Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/net/psock_lib.h | 39 +++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) commit ec6d06efb0bac6cd92846e42d1afe5b98b57e7c2 Author: Laura Abbott Date: Tue Jan 10 13:35:50 2017 -0800 arm64: Add support for CONFIG_DEBUG_VIRTUAL x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys calls. The goal is to catch users who are calling virt_to_phys on non-linear addresses immediately. This inclues callers using virt_to_phys on image addresses instead of __pa_symbol. As features such as CONFIG_VMAP_STACK get enabled for arm64, this becomes increasingly important. Add checks to catch bad virt_to_phys usage. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + arch/arm64/include/asm/memory.h | 31 ++++++++++++++++++++++++++++--- arch/arm64/mm/Makefile | 2 ++ arch/arm64/mm/physaddr.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) commit 2077be6783b5936c3daa838d8addbb635667927f Author: Laura Abbott Date: Tue Jan 10 13:35:49 2017 -0800 arm64: Use __pa_symbol for kernel symbols __pa_symbol is technically the marcro that should be used for kernel symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL which will do bounds checking. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/include/asm/kvm_mmu.h | 4 ++-- arch/arm64/include/asm/memory.h | 1 + arch/arm64/include/asm/mmu_context.h | 6 +++--- arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/acpi_parking_protocol.c | 3 ++- arch/arm64/kernel/cpu-reset.h | 2 +- arch/arm64/kernel/cpufeature.c | 3 ++- arch/arm64/kernel/hibernate.c | 20 +++++-------------- arch/arm64/kernel/insn.c | 2 +- arch/arm64/kernel/psci.c | 3 ++- arch/arm64/kernel/setup.c | 9 +++++---- arch/arm64/kernel/smp_spin_table.c | 3 ++- arch/arm64/kernel/vdso.c | 8 ++++++-- arch/arm64/mm/init.c | 12 ++++++----- arch/arm64/mm/kasan_init.c | 22 ++++++++++++++------- arch/arm64/mm/mmu.c | 33 ++++++++++++++++++++----------- 16 files changed, 76 insertions(+), 57 deletions(-) commit 869dcfd10dfe59484cf14acddf264656d5ee94ea Author: Laura Abbott Date: Tue Jan 10 13:35:48 2017 -0800 arm64: Add cast for virt_to_pfn virt_to_pfn lacks a cast at the top level. Don't rely on __virt_to_phys and explicitly cast to unsigned long. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e22eb616f861a25e3123d1221bad61f8f132913 Author: Laura Abbott Date: Tue Jan 10 13:35:47 2017 -0800 arm64: Move some macros under #ifndef __ASSEMBLY__ Several macros for various x_to_y exist outside the bounds of an __ASSEMBLY__ guard. Move them in preparation for support for CONFIG_DEBUG_VIRTUAL. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 79471b10d67a52f5b3744d2e14c06437a65746f2 Author: Wei Yongjun Date: Thu Jan 12 14:39:28 2017 +0000 lwt_bpf: bpf_lwt_prog_cmp() can be static Fixes the following sparse warning: net/core/lwt_bpf.c:355:5: warning: symbol 'bpf_lwt_prog_cmp' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/lwt_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42d1a731ffee44b16c06df371ffdbb14135c11e3 Merge: 4aa8a47 1a08e3d Author: Will Deacon Date: Thu Jan 12 15:04:29 2017 +0000 Merge branch 'aarch64/for-next/debug-virtual' into aarch64/for-next/core Merge core DEBUG_VIRTUAL changes from Laura Abbott. Later arm and arm64 support depends on these. * aarch64/for-next/debug-virtual: drivers: firmware: psci: Use __pa_symbol for kernel symbol mm/usercopy: Switch to using lm_alias mm/kasan: Switch to using __pa_symbol and lm_alias kexec: Switch to __pa_symbol mm: Introduce lm_alias mm/cma: Cleanup highmem check lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL commit 5df285f6a9221ef5584eff234ea2848370067923 Merge: fcefa42 e48b9ea Author: David S. Miller Date: Thu Jan 12 10:02:45 2017 -0500 Merge branch 's390-qeth-next' Ursula Braun says: ==================== s390: qeth patches yesterday I came up with 13 qeth patches. Since you have not been happy with the 13th patch, I want to make sure that at least the remaining 12 qeth patches can be applied to net-next. Here is the resend of them. ==================== Signed-off-by: David S. Miller commit e48b9eaaa29a0a7d5da2df136b07eefa0180d584 Author: Ursula Braun Date: Thu Jan 12 15:48:43 2017 +0100 s390/qeth: fix retrieval of vipa and proxy-arp addresses qeth devices in layer3 mode need a separate handling of vipa and proxy-arp addresses. vipa and proxy-arp addresses processed by qeth can be read from userspace. Introduced with commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") the retrieval of vipa and proxy-arp addresses is broken, if more than one vipa or proxy-arp address are set. The qeth code used local variable "int i" for 2 different purposes. This patch now spends 2 separate local variables of type "int". While touching these functions hash_for_each_safe() is converted to hash_for_each(), since there is no removal of hash entries. Signed-off-by: Ursula Braun Reviewed-by: Julian Wiedmann Reference-ID: RQM 3524 Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_sys.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 1034051045d125579ab1e8fcd5a724eeb0e70149 Author: Julian Wiedmann Date: Thu Jan 12 15:48:42 2017 +0100 s390/qeth: issue STARTLAN as first IPA command STARTLAN needs to be the first IPA command after MPC initialization completes. So move the qeth_send_startlan() call from the layer disciplines into the core path, right after the MPC handshake. While at it, replace the magic LAN OFFLINE return code with the existing enum. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 21 +++++++++++++++++---- drivers/s390/net/qeth_l2_main.c | 15 --------------- drivers/s390/net/qeth_l3_main.c | 15 --------------- 4 files changed, 17 insertions(+), 35 deletions(-) commit ac988d78dc998ec1ce909d2f2ddf0f81e88e54d5 Author: Julian Wiedmann Date: Thu Jan 12 15:48:41 2017 +0100 s390/qeth: shuffle MAC management functions around Move all MAC utility functions in one place, and drop the forward declarations. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 129 ++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 66 deletions(-) commit 979d79292af327a12e913ef17f29b85428d0ba0f Author: Julian Wiedmann Date: Thu Jan 12 15:48:40 2017 +0100 s390/qeth: extract qeth_l2_remove_mac() This matches qeth_l2_write_mac(). Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 754e0b8d92e5ba24a711d51b5fdbbd211e2fdd24 Author: Julian Wiedmann Date: Thu Jan 12 15:48:39 2017 +0100 s390/qeth: consolidate errno translation Consolidate errno handling for MAC management: Instead of doing this in every caller, do it in one place. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Suggested-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 4b764d1de395090662fd0291968d5ded523f07e4 Author: Julian Wiedmann Date: Thu Jan 12 15:48:38 2017 +0100 s390/qeth: don't convert return code twice qeth_l2_send_groupmac() already translates the return code, so calling qeth_setdel_makerc() a second time only produces garbage. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c07cbf2e209198526e059b9e6bb538b18875a19d Author: Julian Wiedmann Date: Thu Jan 12 15:48:37 2017 +0100 s390/qeth: drop qeth_l2_del_all_macs() parameter The only caller passes del = 0, so remove both the parameter and the code that handles != 0. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit c2a7ee2a3beebc1d870c6ba20acf94383d7978f9 Author: Julian Wiedmann Date: Thu Jan 12 15:48:36 2017 +0100 s390/qeth: Remove QETH_IP_HEADER_SIZE Remove unused define QETH_IP_HEADER_SIZE. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 -- 1 file changed, 2 deletions(-) commit dadc08c7e01907be1116293aa72641a5f560ea4a Author: Julian Wiedmann Date: Thu Jan 12 15:48:35 2017 +0100 s390/qeth: Allow reading hsuid in state DOWN Accessing the current hsuid via card->options.hsuid is perfectly fine, even when the card is DOWN. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_sys.c | 3 --- 1 file changed, 3 deletions(-) commit dae84c8e2a88fab45ff943675410b6c9c0d96a15 Author: Thomas Richter Date: Thu Jan 12 15:48:34 2017 +0100 s390/qeth: display warning for OSA3 RX/TX checksum offloading When RX/TX checksum offloading is turned on and the adapter is an OSA 3 card in layer 3 mode, the checksum offloading is only performed when both peers use different adapters. If both peers share an OSA 3 card, communication is a memory copy and checksum offloading is not performed. This patch adds a warning to inform the administrator. OSA 3 in layer 2 mode does not offer the RX/TX checksum offload feature. Signed-off-by: Thomas Richter Reviewed-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9d8e6dc0fdee06e3eaf779a52530f4b8be6966f Author: Thomas Richter Date: Thu Jan 12 15:48:33 2017 +0100 s390/qeth: test RX/TX checksum offload reply Turning on receive and/or transmit checksum offload support on the OSA card requires 2 commands: 1. start command which replies with available features 2. enable command to turn on selected features. The current version does not check the reply of the start command and simply uses the returned value to enable offload features. When the start command returns zero, this leads to a situation where no checksum offload is turned on by the hardware. Even worse no error indication is returned. The Linux kernel assumes the OSA card performs RX/TX checksum offload, but the hardware does not perform any checksum verification at all. This patch checks the return of the start and enable command responses from the hardware and turns off checksum offloading if the commands fails or does not respond with the correct bit setting. Signed-off-by: Thomas Richter Reviewed-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 13 +++++++++++++ drivers/s390/net/qeth_core_mpc.h | 10 ++++++++++ 2 files changed, 23 insertions(+) commit c9475369bd2bce788796aa313036faecb9725194 Author: Thomas Richter Date: Thu Jan 12 15:48:32 2017 +0100 s390/qeth: rework RX/TX checksum offload Rework the RX/TX checksum offloading command sequence to use the provided function call back mechanims to return card data to the device driver. Signed-off-by: Thomas Richter Reviewed-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 - drivers/s390/net/qeth_core_main.c | 96 ++++++++++++++++++++++++++------------- drivers/s390/net/qeth_core_mpc.h | 7 +++ 3 files changed, 72 insertions(+), 33 deletions(-) commit fcefa42f603c47d6d49cca6f823695c317b19f7a Merge: f811b43 62c7989 Author: David S. Miller Date: Thu Jan 12 10:00:31 2017 -0500 Merge branch 'bpf-cb-access' Daniel Borkmann says: ==================== More flexible BPF cb access This patch improves BPF's cb access by allowing b/h/w/dw access variants on it. For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit 62c7989b24dbd348c2507ee6458ebf5637d6ddb5 Author: Daniel Borkmann Date: Thu Jan 12 11:51:33 2017 +0100 bpf: allow b/h/w/dw access for bpf's cb in ctx When structs are used to store temporary state in cb[] buffer that is used with programs and among tail calls, then the generated code will not always access the buffer in bpf_w chunks. We can ease programming of it and let this act more natural by allowing for aligned b/h/w/dw sized access for cb[] ctx member. Various test cases are attached as well for the selftest suite. Potentially, this can also be reused for other program types to pass data around. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 8 +- net/core/filter.c | 41 ++- tools/testing/selftests/bpf/test_verifier.c | 442 +++++++++++++++++++++++++++- 3 files changed, 478 insertions(+), 13 deletions(-) commit 6b8cc1d11ef75c5b9c530b3d0d148f3c2dd25f93 Author: Daniel Borkmann Date: Thu Jan 12 11:51:32 2017 +0100 bpf: pass original insn directly to convert_ctx_access Currently, when calling convert_ctx_access() callback for the various program types, we pass in insn->dst_reg, insn->src_reg, insn->off from the original instruction. This information is needed to rewrite the instruction that is based on the user ctx structure into a kernel representation for the ctx. As we'd like to allow access size beyond just BPF_W, we'd need also insn->code for that in order to decode the original access size. Given that, lets just pass insn directly to the convert_ctx_access() callback and work on that to not clutter the callback with even more arguments we need to pass when everything is already contained in insn. So lets go through that once, no functional change. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 7 ++- kernel/bpf/verifier.c | 3 +- kernel/trace/bpf_trace.c | 15 ++--- net/core/filter.c | 139 +++++++++++++++++++++++++---------------------- 4 files changed, 87 insertions(+), 77 deletions(-) commit cc75c577806a53893122829d91cb122b51643a2d Author: Xinming Hu Date: Wed Dec 14 19:40:51 2016 +0530 mwifiex: get rid of global save_adapter and sdio_work This patch moves sdio_work to card structure, in this way we can get adapter structure in the work, so save_adapter won't be needed. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 39 ++++++++++++++++------------- drivers/net/wireless/marvell/mwifiex/sdio.h | 3 +++ 2 files changed, 24 insertions(+), 18 deletions(-) commit a7513a4fa9193714b1b02aaa8836af743ccd938d Author: Xinming Hu Date: Wed Dec 14 19:40:50 2016 +0530 mwifiex: get rid of __mwifiex_sdio_remove helper __mwifiex_sdio_remove helper is not needed after our enhancements in SDIO card reset. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c742e623e9415d3e1e5af00470ae5086fa6dd233 Author: Xinming Hu Date: Wed Dec 14 19:40:49 2016 +0530 mwifiex: sdio card reset enhancement Commit b4336a282db8 ("mwifiex: sdio: reset adapter using mmc_hw_reset") introduces a simple sdio card reset solution based on card remove and re-probe. This solution has proved to be vulnerable, as card and adapter structures are not protected, concurrent access will result in kernel panic issues. Let's reuse PCIe FLR's functions for SDIO reset to avoid freeing and reallocating adapter and card structures. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 73 +++++++++++++---------------- drivers/net/wireless/marvell/mwifiex/sdio.h | 3 -- 2 files changed, 33 insertions(+), 43 deletions(-) commit ec750f1082d7cc08ac6d0173e6e377d568c5b2b5 Author: Xinming Hu Date: Wed Dec 14 19:40:48 2016 +0530 mwifiex: cleanup in PCIe flr code path adapter and card variables don't get freed during PCIe function level reset. "adapter->ext_scan" variable need not be re-initialized. fw_name and tx_buf_size initialization is moved to pcie specific code so that mwifiex_reinit_sw() can be used by SDIO. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 9 --------- drivers/net/wireless/marvell/mwifiex/pcie.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 10 deletions(-) commit 8750ab6236b0f54db4be6406bb2a4a71f908f049 Author: Xinming Hu Date: Wed Dec 14 19:40:47 2016 +0530 mwifiex: get rid of mwifiex_do_flr wrapper This patch gets rid of mwifiex_do_flr. We will call mwifiex_shutdown_sw() and mwifiex_reinit_sw() directly. These two general purpose functions will be useful for sdio card reset handler. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 31 +++++------------------------ drivers/net/wireless/marvell/mwifiex/main.h | 3 ++- drivers/net/wireless/marvell/mwifiex/pcie.c | 4 ++-- 3 files changed, 9 insertions(+), 29 deletions(-) commit c0e6aa42682311611a7bfa40f7c8a91452eb030f Author: Amitkumar Karwar Date: Thu Dec 1 18:38:20 2016 +0530 mwifiex: use module_*_driver helper macros After user_rmmod global flag removal, *_init_module() and *_cleanup_module() have become just a wrapper functions. We will get rid of them with the help of module_*_driver() macros. For pcie, existing ".init_if" handler has same name as what module_pcie_driver() macro will create. Let's rename it to avoid conflict. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 47 ++++------------------------- drivers/net/wireless/marvell/mwifiex/sdio.c | 29 +----------------- drivers/net/wireless/marvell/mwifiex/usb.c | 35 +-------------------- 3 files changed, 8 insertions(+), 103 deletions(-) commit f811b436522d3b9c05302f1785aba61829938a54 Merge: 038c35a 143c017 Author: David S. Miller Date: Thu Jan 12 09:47:01 2017 -0500 Merge branch 'smc-fixes' Ursula Braun says: ==================== net/smc: fix typo and clc-bug I received 2 bug reports for my new AF_SMC-code. Here are the fixes for them. ==================== Signed-off-by: David S. Miller commit 143c017108f8a695e4e1c1f5ec57ee89be9cad70 Author: Ursula Braun Date: Thu Jan 12 14:57:15 2017 +0100 smc: ETH_ALEN as memcpy length for mac addresses When creating an SMC connection, there is a CLC (connection layer control) handshake to prepare for RDMA traffic. The corresponding code is part of commit 0cfdd8f92cac ("smc: connection and link group creation"). Mac addresses to be exchanged in the handshake are copied with a wrong length of 12 instead of 6 bytes. Following code overwrites the wrongly copied code, but nevertheless the correct length should already be used for the preceding mac address copying. Use ETH_ALEN for the memcpy length with mac addresses. Signed-off-by: Ursula Braun Fixes: 0cfdd8f92cac ("smc: connection and link group creation") Reported-by: Dan Carpenter Signed-off-by: David S. Miller net/smc/smc_clc.c | 10 ++++------ net/smc/smc_ib.h | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) commit 526735ddc0ae8c7a7751e9ad3a57ae76cd3c35d5 Author: Ursula Braun Date: Thu Jan 12 14:57:14 2017 +0100 net: fix AF_SMC related typo When introducing the new socket family AF_SMC in commit ac7138746e14 ("smc: establish new socket family"), a typo in af_family_clock_key_strings has slipped in. This patch repairs it. Signed-off-by: Ursula Braun Fixes: ac7138746e14 ("smc: establish new socket family") Reported-by: Andrew Morton Signed-off-by: David S. Miller net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 045f0c1b5e26818e28a401e623a581dfbd6b371e Author: Xinming Hu Date: Wed Nov 30 20:22:17 2016 +0530 mwifiex: get rid of global user_rmmod flag bus.remove() callback function is called when user removes this module from kernel space or ejects the card from the slot. The driver handles these 2 cases differently. Few commands (FUNC_SHUTDOWN etc.) are sent to the firmware only for module unload case. The variable 'user_rmmod' is used to distinguish between these two scenarios. This patch checks hardware status and get rid of global variable user_rmmod. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 23 ++++++++++++----------- drivers/net/wireless/marvell/mwifiex/sdio.c | 27 ++++----------------------- drivers/net/wireless/marvell/mwifiex/usb.c | 6 +----- 3 files changed, 17 insertions(+), 39 deletions(-) commit 90ff71f9557591218b5fce1ce7b67afd4cf83894 Author: Xinming Hu Date: Wed Nov 30 20:22:16 2016 +0530 mwifiex: code rearrangement in pcie.c and sdio.c Next patch in this series is going to use mwifiex_read_reg() in remove handlers. The changes here are prerequisites to avoid forward declarations. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 73 +++--- drivers/net/wireless/marvell/mwifiex/sdio.c | 336 ++++++++++++++-------------- 2 files changed, 201 insertions(+), 208 deletions(-) commit 3860e5e39532050c010a0c61c3a980f4a7d4542c Author: Ganapathi Bhat Date: Wed Nov 16 18:39:09 2016 +0530 mwifiex: move pcie_work and related variables inside card Currently pcie_work and related variables are global. It may create problem while supporting multiple devices simultaneously. Let's move it inside card structure so that separate instance will be created/ cancelled in init/teardown threads of each connected devices. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 23 ++++++++++++----------- drivers/net/wireless/marvell/mwifiex/pcie.h | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) commit 41efaf5824e7cb16c54bbec1273d86d80cdac283 Author: Xinming Hu Date: Wed Nov 16 18:39:08 2016 +0530 mwifiex: wait firmware dump complete during card remove process Wait for firmware dump complete in card remove function. For sdio interface, there are two diffenrent cases, card reset trigger sdio_work and firmware dump trigger sdio_work. Do code rearrangement for distinguish between these two cases. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 6 +++++- drivers/net/wireless/marvell/mwifiex/sdio.c | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) commit d27121fca12957036077ef56ee0146c99b8a92f7 Author: Xinming Hu Date: Wed Nov 16 18:39:07 2016 +0530 mwifiex: get rid of drv_info* adapter variables We can avoid drv_info_dump and drv_info_size adapter variables. This info can be passed to mwifiex_upload_device_dump() as parameters Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 42 ++++++++++++----------------- drivers/net/wireless/marvell/mwifiex/main.h | 7 +++-- drivers/net/wireless/marvell/mwifiex/pcie.c | 7 +++-- drivers/net/wireless/marvell/mwifiex/sdio.c | 6 +++-- 4 files changed, 29 insertions(+), 33 deletions(-) commit fb45bd0c6d6b25536e03290d9e0449b3e4c35e45 Author: Xinming Hu Date: Wed Nov 16 18:39:06 2016 +0530 mwifiex: do not free firmware dump memory in shutdown_drv mwifiex_upload_device_dump() already takes care of freeing firmware dump memory. Doing the same thing in mwifiex_shutdown_drv() is redundant. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/init.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 5bf15e3fb85d8c3957afc35a572ee5476f491c12 Author: Xinming Hu Date: Wed Nov 16 18:39:05 2016 +0530 mwifiex: don't wait for main_process in shutdown_drv main_process is not expected to be running when shutdown_drv function is called. currently we wait for main_process completion in the function. Actually the caller has already made sure main_process is completed by performing below actions. (1) disable interrupts in if_ops->disable_int. (2) set adapter->surprise_removed = true, main_process wont be queued. (3) mwifiex_terminate_workqueue(adapter), wait for workqueue to be completed. This patch removes redundant wait code and takes care of related cleanup. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/init.c | 19 ++-------- drivers/net/wireless/marvell/mwifiex/main.c | 55 ++++++++++------------------- drivers/net/wireless/marvell/mwifiex/main.h | 5 +-- drivers/net/wireless/marvell/mwifiex/util.c | 15 -------- 4 files changed, 22 insertions(+), 72 deletions(-) commit 1d4258db3e0bf14d4c782028ab7be721fb6619ba Author: Maarten Lankhorst Date: Thu Jan 12 10:43:45 2017 +0100 drm/i915: Remove useless casts to intel_plane_state The visible member used to be in intel_plane_state->visible, but has been moved to drm_plane_state->visible. In the conversion some casts were left in that are now useless. to_intel_plane_state(x)->base.visible is the same as x->visible, so use the latter to clear up the code a little. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1484214225-30328-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ drivers/gpu/drm/i915/intel_fbc.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 038c35a86d213c69faf7aa9500ab9001c3774e15 Author: Ganesh Goudar Date: Thu Jan 12 12:23:21 2017 +0530 cxgb4: Initialize mbox lock and list for mgmt dev Initialize mbox lock and list for mgmt dev to avoid NULL pointer dereference when cxgb_set_vf_mac is called. And also allocate memory for private data while allocating mgmt netdev. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 738b35ccee1bcd7cf4af147edd76e7880533ad9f Author: Florian Fainelli Date: Wed Jan 11 21:13:02 2017 -0800 net: core: Make netif_wake_subqueue a wrapper netif_wake_subqueue() is duplicating the same thing that netif_tx_wake_queue() does, so make it call it directly after looking up the queue from the index. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/netdevice.h | 14 +++++++++++++- net/core/dev.c | 22 ---------------------- 2 files changed, 13 insertions(+), 23 deletions(-) commit df2105749a8a0b7f7da8b2fb0b9cee1b3008586b Author: Michel Thierry Date: Wed Jan 11 20:18:09 2017 -0800 drm/i915: Update i915_reset parameter for kerneldoc Since commit c033666a94b57 ("drm/i915: Store a i915 backpointer from engine, and use it") i915_reset receives dev_priv, but the kerneldoc was not updated. Signed-off-by: Michel Thierry Reviewed-by: Mika Kuoppala Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170112041817.1102-3-michel.thierry@intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87c390b67bdf8aa64c30b0e84cfc83d8753e0909 Author: Michel Thierry Date: Wed Jan 11 20:18:08 2017 -0800 drm/i915: Keep i915_handle_error kerneldoc parameters together And before the function description. Tidy up from commit 14bb2c11796d70b ("drm/i915: Fix a buch of kerneldoc warnings"), all others kerneldoc blocks look ok. Cc: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Signed-off-by: Michel Thierry Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170112041817.1102-2-michel.thierry@intel.com drivers/gpu/drm/i915/i915_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8726f2faa371514fba2f594d799db95203dfeee0 Author: Francisco Jerez Date: Thu Jan 12 12:44:54 2017 +0200 drm/i915: Remove WaDisableLSQCROPERFforOCL KBL workaround. The WaDisableLSQCROPERFforOCL workaround has the side effect of disabling an L3SQ optimization that has huge performance implications and is unlikely to be necessary for the correct functioning of usual graphic workloads. Userspace is free to re-enable the workaround on demand, and is generally in a better position to determine whether the workaround is necessary than the DRM is (e.g. only during the execution of compute kernels that rely on both L3 fences and HDC R/W requests). The same workaround seems to apply to BDW (at least to production stepping G1) and SKL as well (the internal workaround database claims that it does for all steppings, while the BSpec workaround table only mentions pre-production steppings), but the DRM doesn't do anything beyond whitelisting the L3SQCREG4 register so userspace can enable it when it sees fit. Do the same on KBL platforms. Improves performance of the GFXBench4 gl_manhattan31 benchmark by 60%, and gl_4 (AKA car chase) by 14% on a KBL GT2 running Mesa master -- This is followed by a regression of 35% and 10% respectively for the same benchmarks and platform caused by my recent patch series switching userspace to use the dataport constant cache instead of the sampler to implement uniform pull constant loads, which caused us to hit more heavily the L3 cache (and on platforms other than KBL had the opposite effect of improving performance of the same two benchmarks). The overall effect on KBL of this change combined with the recent userspace change is respectively 4.6% and 2.6%. SynMark2 OglShMapPcf was affected by the constant cache changes (though it improved as it did on other platforms rather than regressing), but is not significantly affected by this patch (with statistical significance of 5% and sample size 20). v2: Drop some more code to avoid unused variable warning. Fixes: 738fa1b3123f ("drm/i915/kbl: Add WaDisableLSQCROPERFforOCL") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99256 Signed-off-by: Francisco Jerez Cc: Matthew Auld Cc: Eero Tamminen Cc: Jani Nikula Cc: Mika Kuoppala Cc: beignet@lists.freedesktop.org Cc: # v4.7+ Reviewed-by: Mika Kuoppala [Removed double Fixes tag] Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1484217894-20505-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_lrc.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 -------- 2 files changed, 18 deletions(-) commit f3c05596344fa09074220513583bc5d6ff2d5c43 Author: Wei Yongjun Date: Tue Jul 19 11:27:09 2016 +0000 ARM: ux500: remove duplicated include from cpu-db8500.c Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij arch/arm/mach-ux500/cpu-db8500.c | 1 - 1 file changed, 1 deletion(-) commit 9e634cae725680905098747f6d972525daaf857e Author: Linus Walleij Date: Thu Jun 2 16:10:06 2016 +0200 ARM: ux500: simplify secondary boot Inline the wakeup_secondary() static function, and keep the backupram remapping around: it is reused when resuming from suspend so no point in remapping it every time. Signed-off-by: Linus Walleij arch/arm/mach-ux500/platsmp.c | 45 ++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit 4aa8a472c33f4024381ade56bef008a9c566366a Author: Suzuki K Poulose Date: Mon Jan 9 17:28:32 2017 +0000 arm64: Documentation - Expose CPU feature registers Documentation for the infrastructure to expose CPU feature register by emulating MRS. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Dave Martin Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/cpu-feature-registers.txt | 240 ++++++++++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 4 + 2 files changed, 244 insertions(+) commit 77c97b4ee21290f5f083173d957843b615abbff2 Author: Suzuki K Poulose Date: Mon Jan 9 17:28:31 2017 +0000 arm64: cpufeature: Expose CPUID registers by emulation This patch adds the hook for emulating MRS instruction to export the 'user visible' value of supported system registers. We emulate only the following id space for system registers: Op0=3, Op1=0, CRn=0, CRm=[0, 4-7] The rest will fall back to SIGILL. This capability is also advertised via a new HWCAP_CPUID. Cc: Catalin Marinas Cc: Mark Rutland Cc: Will Deacon Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose [will: add missing static keyword to enable_mrs_emulation] Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++ arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 101 ++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 1 + 4 files changed, 107 insertions(+) commit f43e5407e4184ef0e5a31272f80ca893cb5ee24c Author: Takashi Iwai Date: Thu Jan 5 17:30:12 2017 +0100 ALSA: usb: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/6fire/midi.c | 4 ++-- sound/usb/bcd2000/bcd2000.c | 4 ++-- sound/usb/caiaq/midi.c | 4 ++-- sound/usb/line6/midi.c | 4 ++-- sound/usb/midi.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit 57eb67994a9d117ea81d1580a9163733e26a1fc3 Author: Takashi Iwai Date: Thu Jan 5 17:29:54 2017 +0100 ALSA: firewire: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_midi.c | 4 ++-- sound/firewire/dice/dice-midi.c | 4 ++-- sound/firewire/digi00x/digi00x-midi.c | 8 ++++---- sound/firewire/fireworks/fireworks_midi.c | 4 ++-- sound/firewire/oxfw/oxfw-midi.c | 4 ++-- sound/firewire/oxfw/oxfw-scs1x.c | 4 ++-- sound/firewire/tascam/tascam-midi.c | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) commit 485885b9d0474ac374297e637f479c22930bb593 Author: Takashi Iwai Date: Thu Jan 5 17:29:31 2017 +0100 ALSA: pci: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/ca0106/ca_midi.c | 4 ++-- sound/pci/cs4281.c | 4 ++-- sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- sound/pci/echoaudio/midi.c | 4 ++-- sound/pci/emu10k1/emu10k1x.c | 4 ++-- sound/pci/emu10k1/emumpu401.c | 4 ++-- sound/pci/ens1370.c | 4 ++-- sound/pci/ice1712/ice1724.c | 4 ++-- sound/pci/rme9652/hdsp.c | 4 ++-- sound/pci/rme9652/hdspm.c | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) commit 9021b2b8fd8f352abfc9470249eca9b36356a155 Author: Takashi Iwai Date: Thu Jan 5 17:29:07 2017 +0100 ALSA: isa: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/snd_wavefront.h | 4 ++-- sound/isa/gus/gus_uart.c | 4 ++-- sound/isa/msnd/msnd_midi.c | 2 +- sound/isa/sb/sb8_midi.c | 4 ++-- sound/isa/wavefront/wavefront_midi.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) commit c36f486d7bc71d41ec6b9521574136a280c17803 Author: Takashi Iwai Date: Thu Jan 5 17:28:39 2017 +0100 ALSA: drivers: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/drivers/mpu401/mpu401_uart.c | 4 ++-- sound/drivers/mtpav.c | 4 ++-- sound/drivers/mts64.c | 4 ++-- sound/drivers/portman2x4.c | 4 ++-- sound/drivers/serial-u16550.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit c62a57004abd819d93772377ea6b4b4fe8412770 Author: Takashi Iwai Date: Thu Jan 5 17:27:17 2017 +0100 ALSA: seq: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_virmidi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ba79b853289289052b4c4c2c68de4418cd8c57d Author: Takashi Iwai Date: Thu Jan 5 17:01:14 2017 +0100 ALSA: rawmidi: Add const to snd_rawmidi_ops Make snd_rawmidi_substream.ops to be a const pointer to be safer and allow more optimization. The patches to constify each rawmidi ops will follow. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/rawmidi.h | 4 ++-- sound/core/rawmidi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d748c9810be2d6a570aad0390463c9ac4336b161 Author: Russell King Date: Wed Jan 11 10:16:58 2017 +0000 rtc: armada38x: make struct rtc_class_ops const Armada38x wants to modify its rtc_class_ops to remove the interrupt handling when there is no usable interrupt, but this means we leave function pointers in writable memory. Since rtc_class_ops is small, arrange to have two instances, one for when we have interrupts, and one for when we have none, both marked const. This allows the compiler to place them in read-only memory, which is better than placing them in __ro_after_init. Thanks to Bhumika Goyal for pointing out that the structure was writable and submitting a patch to add __ro_after_init. Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-armada38x.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 714ee339ff90df37a41485497aca27b2421803f5 Author: Colin Ian King Date: Wed Jan 11 16:32:16 2017 +0200 ath9k: fix spelling mistake: "meaurement" -> "measurement" Trivial fix to spelling mistake in ath_err message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50f3818196f5d6a87867772b40637af1d51e11f3 Author: Mark Rutland Date: Wed Jan 11 16:32:15 2017 +0200 ath9k: ar9003_mac: kill off ACCESS_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some new features (e.g. KTSAN / Kernel Thread Sanitizer), it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, for some files (including the ath9k ar9003 mac driver), this mangles the formatting. As a preparatory step, this patch converts the driver to use {READ,WRITE}_ONCE() without said mangling. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Cc: ath9k-devel@qca.qualcomm.com Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org Cc: netdev@vger.kernel.org Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_mac.c | 92 ++++++++++++++--------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit d5a3a76a9cb814b377d12fe4ebe5cff20b63f390 Author: Mark Rutland Date: Wed Jan 11 16:32:14 2017 +0200 ath9k: ar9002_mac: kill off ACCESS_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some new features (e.g. KTSAN / Kernel Thread Sanitizer), it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, for some files (including the ath9k ar9002 mac driver), this mangles the formatting. As a preparatory step, this patch converts the driver to use {READ,WRITE}_ONCE() without said mangling. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Cc: ath9k-devel@qca.qualcomm.com Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org Cc: netdev@vger.kernel.org Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9002_mac.c | 64 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit a70e1d6fd6b5e1a81fa6171600942bee34f5128f Author: Felix Fietkau Date: Wed Jan 11 16:32:13 2017 +0200 ath5k: drop bogus warning on drv_set_key with unsupported cipher Simply return -EOPNOTSUPP instead. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath5k/mac80211-ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b59eb96181e7fe4abe844985362882aeb39a0593 Author: Bhumika Goyal Date: Wed Jan 11 16:32:12 2017 +0200 wil6210: constify cfg80211_ops structures cfg80211_ops structures are only passed as an argument to the function wiphy_new. This argument is of type const, so cfg80211_ops strutures having this property can be declared as const. Done using Coccinelle @r1 disable optional_qualifier @ identifier i; position p; @@ static struct cfg80211_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ wiphy_new(&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct cfg80211_ops i; File size before: text data bss dec hex filename 18133 6632 0 24765 60bd wireless/ath/wil6210/cfg80211.o File size after: text data bss dec hex filename 18933 5832 0 24765 60bd wireless/ath/wil6210/cfg80211.o Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83796f2652bc31170eee5563e37c6af92db41de9 Author: Michał Winiarski Date: Wed Jan 11 16:17:39 2017 +0100 drm/i915/guc: Make sure vma containing firmware is GuC mappable Since commit 4741da925fa3 ("drm/i915/guc: Assert that all GGTT offsets used by the GuC are mappable"), we're asserting that GuC firmware is in the GuC mappable range. Except we're not pinning the object with bias, which means it's possible to trigger this assert. Let's add a proper bias. Fixes: 4741da925fa3 ("drm/i915/guc: Assert that all GGTT offsets used by the GuC are mappable") Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Tested-by: Tomi Sarvela Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170111151739.28965-1-michal.winiarski@intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d48b62ceeea2c229c637efda0c1a846dd33cf26a Author: Erik Stromdahl Date: Wed Jan 11 16:32:10 2017 +0200 ath10k: htc: simplified credit distribution Simplified transmit credit distribution code somewhat. Since the WMI control service will get assigned all credits there is no need for having a credit_allocation array in struct ath10k_htc. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htc.c | 29 +++++------------------------ drivers/net/wireless/ath/ath10k/htc.h | 1 - 2 files changed, 5 insertions(+), 25 deletions(-) commit a2d6a987bfe4a2e344fae9d255200072eb082427 Author: David Lechner Date: Thu Jan 5 12:54:18 2017 -0600 serial: 8250: Add new port type for TI DA8xx/66AK2x This adds a new UART port type for TI DA8xx/OMAPL13x/AM17xx/AM18xx/66AK2x. These SoCs have standard 8250 registers plus some extra non-standard registers. The UART will not function unless the non-standard Power and Emulation Management Register (PWREMU_MGMT) is configured correctly. This is currently handled in arch/arm/mach-davinci/serial.c for non-device-tree boards. Making this part of the UART driver will allow UART to work on device-tree boards as well and the mach code can eventually be removed. Signed-off-by: David Lechner Acked-by: Sekhar Nori Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 1 + drivers/tty/serial/8250/8250_port.c | 22 ++++++++++++++++++++++ include/uapi/linux/serial_core.h | 3 ++- include/uapi/linux/serial_reg.h | 8 ++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) commit 7bc7441e4da3868042d01eed8a1f61625d35a356 Author: Erik Stromdahl Date: Wed Jan 11 16:32:09 2017 +0200 ath10k: htc: removal of unused struct members Removed tx_credits_per_max_message and tx_credit_size from struct ath10k_htc_ep since they are not used anywhere in the code. They are just written, never read. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htc.c | 6 ------ drivers/net/wireless/ath/ath10k/htc.h | 2 -- 2 files changed, 8 deletions(-) commit b2ae93e0580c8d08c6a84e9188068c0e74930112 Author: David Lechner Date: Thu Jan 5 12:54:17 2017 -0600 doc: DT: Add ti,da830-uart to serial/8250 bindings This adds the ti,da830-uart compatible string to serial 8250 UART bindings. Signed-off-by: David Lechner Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 1 + 1 file changed, 1 insertion(+) commit 194588930c5d603e574b7ecae1b55a6a774bdbe5 Author: Jean Delvare Date: Mon Dec 19 10:59:42 2016 +0100 serial: 8250_mid: make option visible Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. This is even more problematic when said option selects other options. You end up with several device drivers forcibly built into the kernel. In this specific case, drivers 8250_mid, virt-dma, hsu_dma and hsu_dma_pci end up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_MID visible. Signed-off-by: Jean Delvare Fixes: 1fc969c75986 ("serial: 8250_mid: make module available only on X86") Cc: Andy Shevchenko Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dce22df190011db408cd25430f1b19f6dec4e94f Author: Jean Delvare Date: Mon Dec 19 10:58:53 2016 +0100 serial: 8250_lpss: make option visible Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. This is even more problematic when said option selects other options. You end up with several device drivers forcibly built into the kernel. In this specific case, drivers 8250_lpss, dw_dmac_core and dw_dmac_pci end up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_LPSS visible. Signed-off-by: Jean Delvare Fixes: a13e19cf3dc1 ("serial: 8250_lpss: split LPSS driver to separate module") Cc: Andy Shevchenko Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e8c710e20c6e5d4546396c08bb7ac28a06ed18 Author: Jean Delvare Date: Mon Dec 19 10:58:29 2016 +0100 serial: 8250_pci: make option visible Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. In this specific case, driver 8250_pci ends up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_PCI visible. Signed-off-by: Jean Delvare Cc: Andy Shevchenko Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 699a11ba7ec869b006623182881f2f1f5b4aea53 Author: Alexey Brodkin Date: Tue Jan 10 18:11:29 2017 +0300 serial: 8250_port: Remove dangerous pr_debug() With CONFIG_DYNAMIC_DEBUG if dyndbg enables debug output in 8250_port.c deadlock happens inevitably on UART IRQ handling. That's the problematic execution path: ---------------------------->8------------------------ UART IRQ: serial8250_interrupt() -> serial8250_handle_irq(): lock "port->lock" -> pr_debug() -> serial8250_console_write(): bump in locked "port->lock". OR (if above pr_debug() gets removed): serial8250_tx_chars() -> pr_debug() -> serial8250_console_write(): bump in locked "port->lock". ---------------------------->8------------------------ So let's get rid of those not that much useful debug entries. Discussed problem could be easily reproduced with QEMU for x86_64. As well as this fix could be mimicked with muting of dynamic debug for the problematic lines as simple as: ---------------------------->8------------------------ dyndbg="+p; file 8250_port.c line 1756 -p; file 8250_port.c line 1822 -p" ---------------------------->8------------------------ Signed-off-by: Alexey Brodkin Cc: Jiri Slaby Cc: Peter Hurley Cc: Phillip Raffeck Cc: Anton Wuerfel Cc: "Matwey V. Kornilov" Cc: Yegor Yefremov Cc: Thor Thayer Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 4 ---- 1 file changed, 4 deletions(-) commit 1a5c2d1de7d35f5eb9793266237903348989502b Author: Christophe JAILLET Date: Mon Jan 9 01:26:37 2017 +0100 tty: goldfish: Fix a parameter of a call to free_irq 'request_irq()' and 'free_irq()' should be called with the same dev_id. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/tty/goldfish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b7e8e8e8fc6a9f1f0372d1ffb271ecfdaf0285a Author: Fabio Estevam Date: Sat Jan 7 19:29:13 2017 -0200 serial: imx: Allow passing 'rst-gpios' for rs485 mode According to Documentation/devicetree/bindings/serial/serial.txt the generic 'rts-gpios' property can be used to specify the GPIO for RTS functionality. Currently it is not possible to use the imx UART port in rs485 mode when the 'rts-gpios' property is passed in the device tree. The imx uart driver only checks for the presence of the built-in RTS pin, via 'uart-has-rtscts' property and disable the rs485 flag if this property is absent. So fix this logic by also checking if RTS pin has been passed via GPIO. Tested on a imx6dl based board. Signed-off-by: Fabio Estevam Tested-by: Clemens Gruber Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3f08087826950de4688da0aea4e4f64f536fcdd6 Author: Andy Shevchenko Date: Thu Jan 5 23:46:20 2017 +0200 serial: 8250_lpss: avoid potential kernel crash when remove This is a follow up to the commit a9b01b5823f7 ("serial: 8250_mid fix calltrace when hotplug 8250 serial controller") in which the kernel crash was described for another 8250 based driver. It appears that we have the very same issue in 8250_lpss. Fix it by unregistering serial driver first. Cc: Liwei Song Signed-off-by: Andy Shevchenko Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abe81f3b8ed2996e1712d26d38ff6b73f582c616 Author: Javier Martinez Canillas Date: Mon Jan 2 11:57:20 2017 -0300 tty: serial: msm: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/tty/serial/msm_serial.ko | grep alias $ After this patch: $ modinfo drivers/tty/serial/msm_serial.ko | grep alias alias: of:N*T*Cqcom,msm-uartdmC* alias: of:N*T*Cqcom,msm-uartdm alias: of:N*T*Cqcom,msm-uartC* alias: of:N*T*Cqcom,msm-uart Signed-off-by: Javier Martinez Canillas Acked-by: Bjorn Andersson Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 1 + 1 file changed, 1 insertion(+) commit 9c4b60fe5313c125b1bf68ef04b0010512c27f2d Author: Matwey V. Kornilov Date: Thu Dec 29 21:48:51 2016 +0300 serial: 8250: moxa: Store num_ports in brd When struct moxa8250_board is allocated, then num_ports should be initialized in order to use it later in moxa8250_remove. Signed-off-by: Matwey V. Kornilov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_moxa.c | 1 + 1 file changed, 1 insertion(+) commit 6def047c29b94cd7de8ffaec567060fb610ef2d2 Author: Ji-Ze Hong (Peter Hong) Date: Fri Dec 23 09:41:20 2016 +0800 serial: 8250_fintek: Add resource check for Fintek F81504/508/512 Add resource type check for Fintek F81504/508/512, BAR3/4/5 must be IORESOURCE_IO. Fintek is trying to make F81504/508/512 works on MMIO interface, but it's still in progress. We found some issue when the experiment IC when the BAR3/4/5 is IORESOURCE_MEM. It'll cause wrong operation with IO resource. So we'll add the resource check for this. Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 732dbf3a6104a3abfcfcd066dcaf89e5054ce009 Author: Felix Fietkau Date: Thu Dec 22 08:31:34 2016 +0100 serial: do not accept sysrq characters via serial port many embedded boards have a disconnected TTL level serial which can generate some garbage that can lead to spurious false sysrq detects. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 2 +- lib/Kconfig.debug | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 552df698e9e88b580039ca715e1b5ad34b6e130b Author: John Crispin Date: Tue Dec 20 20:01:45 2016 +0100 tty: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/lantiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec84aa0a920192df56624961cb146947d7d9e11e Author: Martin Blumenstingl Date: Sun Dec 11 21:42:23 2016 +0100 tty: serial: lantiq: implement earlycon support This allows enabling earlycon for devices with a Lantiq serial console by splitting lqasc_serial_port_write() from lqasc_console_write() and re-using the new function for earlycon's write callback. The kernel-parameter name matches the driver name ("lantiq"), similar to how other drivers implement this. Signed-off-by: Martin Blumenstingl Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 6 ++++ drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/lantiq.c | 38 ++++++++++++++++++++----- 3 files changed, 38 insertions(+), 7 deletions(-) commit 2aaa957361f9b84fb72ce0124ebb1e5835235ba8 Author: Christophe JAILLET Date: Sun Dec 18 07:38:11 2016 +0100 serial: pic32_uart: Fix 'request_irq' and 'free_irq' inconsistancy 'request_irq' and 'free_irq' should have the same 'dev_id'. Here one uses 'port', and the other one uses 'sport'. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pic32_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba3d6f8f10c3897e0edde3069beb0bfbe81783a6 Author: Marek Szyprowski Date: Fri Dec 16 10:56:53 2016 +0100 serial: samsung: Simplify DMA engine initialization code dma_request_slave_channel_compat() requires filter function and mask, which are not needed on device tree based platforms, so simplify the code by calling the more appropriate dma_request_chan() function. This additionally gives us proper error handling, because the new function returns error codes instead of NULL on failure. Signed-off-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 17 ++++++----------- drivers/tty/serial/samsung.h | 4 ---- 2 files changed, 6 insertions(+), 15 deletions(-) commit f87fa71e6fb0fa7bade9c3f3bb3f49325e76a90a Author: Wolfgang Ocker Date: Mon Dec 12 08:21:01 2016 +0100 serial: mxs-auart: support CMSPAR termios cflag If CMSPAR is set in the c_cflag of termios, "stick" parity is enabled. Tested on an i.MX28 system Signed-off-by: Wolfgang Ocker Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 3 +++ 1 file changed, 3 insertions(+) commit 11652fc7b7e381a8d886ae1393e00512b71fe17d Author: Alexander Shiyan Date: Mon Dec 5 14:05:19 2016 +0300 serial: max310x: Add support for newer silicon revisions New IC MAX14830 has 0xB4 silicon revision ID. This patch adds support for such ICs. Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54a44d54be3a7394ebea42bbffd67819e0f3f89a Author: Nikita Yushchenko Date: Sun Dec 4 18:49:28 2016 +0300 tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_timer_func() that calls lpuart_copy_rx_to_tty() that acquires same lock. To fix, move Rx DMA stopping out of lock, as it already is in other places in the same file. While at it, also make Rx DMA start/stop code to look the same is in other places in the same file. Signed-off-by: Nikita Yushchenko Tested-by: Stefan Agner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 623ac1d4a52f279d9379bae61ae1eb37c5767f96 Author: Pan Bian Date: Sat Dec 3 18:40:25 2016 +0800 tty: serial: sh-sci: set error code when kasprintf fails When the call to kasprintf() returns a NULL pointer, function sci_request_irq() frees the preallocated memory and returns 0 is returned. Because 0 means no error, the caller of sci_request_irq() will keep going, and the freed memory may be used or freed again. To avoid the above issue, this patch assigns "-ENOMEM" to the return variable ret. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188691 Signed-off-by: Pan Bian Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d53628882255481b710641dd0118fbd80af6e983 Author: Bjorn Andersson Date: Wed Jan 11 16:32:21 2017 +0200 wcn36xx: Don't use the destroyed hal_mutex ieee80211_unregister_hw() might invoke operations to stop the interface, that uses the hal_mutex. So don't destroy it until after we're done using it. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 43efa3c0f241e04862be8e6a68ff765d36cde1ba Author: Bjorn Andersson Date: Wed Jan 11 16:32:20 2017 +0200 wcn36xx: Implement print_reg indication Some firmware versions sends a "print register indication", handle this by printing out the content. Cc: Nicolas Dechesne Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/hal.h | 16 ++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 886039036c2004154f03c963c65cb94bdc300a92 Author: Bjorn Andersson Date: Wed Jan 11 16:32:19 2017 +0200 wcn36xx: Implement firmware assisted scan Using the software based channel scan mechanism from mac80211 keeps us offline for 10-15 second, we should instead issue a start_scan/end_scan on each channel reducing this time. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 64 +++++++++++++++++++++++++----- drivers/net/wireless/ath/wcn36xx/smd.c | 8 ++-- drivers/net/wireless/ath/wcn36xx/smd.h | 4 +- drivers/net/wireless/ath/wcn36xx/txrx.c | 19 ++++++--- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 9 +++++ 5 files changed, 81 insertions(+), 23 deletions(-) commit f303a931106580acebca909b635347a37269ba9f Author: Bjorn Andersson Date: Wed Jan 11 16:32:18 2017 +0200 wcn36xx: Transition driver to SMD client The wcn36xx wifi driver follows the life cycle of the WLAN_CTRL SMD channel, as such it should be a SMD client. This patch makes this transition, now that we have the necessary frameworks available. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/Kconfig | 2 + drivers/net/wireless/ath/wcn36xx/dxe.c | 16 +++--- drivers/net/wireless/ath/wcn36xx/main.c | 79 ++++++++++++++++++++---------- drivers/net/wireless/ath/wcn36xx/smd.c | 31 +++++------- drivers/net/wireless/ath/wcn36xx/smd.h | 5 ++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 21 +++----- 6 files changed, 88 insertions(+), 66 deletions(-) commit 6c0b2e833f1439ebcbd7258b655623c1aef23ffb Author: Bjorn Andersson Date: Wed Jan 11 16:32:17 2017 +0200 soc: qcom: smem_state: Fix include for ERR_PTR() The correct include file for getting errno constants and ERR_PTR() is linux/err.h, rather than linux/errno.h, so fix the include. Fixes: e8b123e60084 ("soc: qcom: smem_state: Add stubs for disabled smem_state") Acked-by: Andy Gross Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo include/linux/soc/qcom/smem_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17ee33072af1f320a617a2447fa9548de41d5698 Author: Suman Anna Date: Wed Jan 11 19:22:17 2017 -0600 Documentation: dt: reset: Revise typos in TI syscon reset example Fix couple of typos in the example given in the TI syscon reset binding. The ti,reset-bits used for DSP0 are corrected to match the values that will be used in the actual DT node. Signed-off-by: Suman Anna Signed-off-by: Philipp Zabel Documentation/devicetree/bindings/reset/ti-syscon-reset.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1013258814bd396964cfcedc8fc590c9098266b3 Author: Bhumika Goyal Date: Mon Jan 9 22:23:55 2017 +0530 reset: constify reset_control_ops structures Declare reset_control_ops structures as const as they are only stored in the ops field of a reset_controller_dev structure. This field is of type const struct reset_control_ops *, so reset_control_ops structures having this property can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct reset_control_ops i@p={...}; @ok1@ identifier r1.i; position p; struct ti_syscon_reset_data data; @@ data.rcdev.ops=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct reset_control_ops i; File size before: drivers/reset/reset-ti-syscon.o text data bss dec hex filename 1329 240 0 1569 621 drivers/reset/reset-ti-syscon.o File size after: drivers/reset/reset-ti-syscon.o text data bss dec hex filename 1377 192 0 1569 621 drivers/reset/reset-ti-syscon.o Signed-off-by: Bhumika Goyal Signed-off-by: Philipp Zabel drivers/reset/reset-ti-syscon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2384d62385aea91d7ec1589287b6daa41af1ed8b Author: Daniel Vetter Date: Tue Dec 27 11:49:22 2016 +0100 drm/cma-helper: Stop using drm_framebuffer_unregister_private This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But cma helpers are using drm_framebuffer_remove and a free-standing fb, so this is rendundant. Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-2-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_cma_helper.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b77bc10bba410637dfe25396e9784f5dc43ab817 Author: Daniel Vetter Date: Tue Dec 27 11:49:24 2016 +0100 drm/omap: Stop using drm_framebuffer_unregister_private This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But omapdrm is using drm_framebuffer_remove and a free-standing fb, so this is rendundant. Cc: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-4-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7e53c284ec7e056e2f94faba623c6c2759552464 Author: Benjamin Gaignard Date: Thu Jan 12 09:57:36 2017 +0100 drm: fix MMU dependencies DRM_VM and DRM_LEGACY shouldn't be selected if MMU isn't set. Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC") Signed-off-by: Benjamin Gaignard Cc: Arnd Bergmann Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484211456-5759-1-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5c5d57a949cd0a17254581f848562c7076166f9 Author: Daniel Vetter Date: Tue Dec 27 11:49:21 2016 +0100 drm/msm: Stop using drm_framebuffer_unregister_private This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But msm is using drm_framebuffer_remove and a free-standing fb, so this is rendundant. Cc: Rob Clark Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/msm/msm_fbdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3995d3f40bdb5f53e32890c66d2b995ddc10fbf7 Author: Quentin Schulz Date: Fri Dec 9 12:04:19 2016 +0100 ARM: dts: sun8i: reference-design: use AXP223 DTSI Previously, the sun8i tablets used everything declared in AXP221 DTSI while they have an AXP223 PMIC. This corrects that so the sun8i tablets can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cc6f5a715cf9f7d5ca8fd2bde62130fcfd90b94 Author: Johannes Berg Date: Wed Oct 19 15:02:32 2016 +0200 mac80211: set wifi_acked[_valid] bits for transmitted SKBs There may be situations in which the in-kernel originator of an SKB cares about its wifi transmission status. To have that, set the wifi_acked[_valid] bits before freeing/orphaning the SKB if the destructor is set. The originator can then use it in there. Signed-off-by: Johannes Berg net/mac80211/status.c | 5 +++++ 1 file changed, 5 insertions(+) commit cef0acd4d7d4811d2d19cd0195031bf0dfe41249 Author: David Spinadel Date: Mon Nov 21 16:58:40 2016 +0200 mac80211: Add RX flag to indicate ICV stripped Add a flag that indicates that the WEP ICV was stripped from an RX packet, allowing the device to not transfer that if it's already checked. Signed-off-by: David Spinadel Signed-off-by: Johannes Berg include/net/mac80211.h | 5 ++++- net/mac80211/wep.c | 3 ++- net/mac80211/wpa.c | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 93be2b74279c15c2844684b1a027fdc71dd5d9bf Author: Arnd Bergmann Date: Wed Jan 11 15:35:25 2017 +0100 wext: handle NULL extra data in iwe_stream_add_point better gcc-7 complains that wl3501_cs passes NULL into a function that then uses the argument as the input for memcpy: drivers/net/wireless/wl3501_cs.c: In function 'wl3501_get_scan': include/net/iw_handler.h:559:3: error: argument 2 null where non-null expected [-Werror=nonnull] memcpy(stream + point_len, extra, iwe->u.data.length); This works fine here because iwe->u.data.length is guaranteed to be 0 and the memcpy doesn't actually have an effect. Making the length check explicit avoids the warning and should have no other effect here. Also check the pointer itself, since otherwise we get warnings elsewhere in the code. Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg include/net/iw_handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 73a9b73a076e30fa74bc9efc955abadf8f02cc81 Author: Quentin Schulz Date: Fri Dec 9 12:04:18 2016 +0100 ARM: dts: sun8i: parrot: use AXP223 DTSI Previously, the Allwinner Parrot R16 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Allwinner Parrot R16 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r16-parrot.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd48e8ed3bfdee879ce60508230bed7fb2ca5fa8 Author: Libin Yang Date: Thu Jan 12 16:04:54 2017 +0800 ALSA: Documentation about HDA DP MST pin init and connection Add the documentation about HD-audio DP MST: 1. pin initialization 2. device entry connection list Reviewed-by: Takashi Iwai Signed-off-by: Libin Yang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484208294-8637-4-git-send-email-libin.yang@intel.com Documentation/sound/hd-audio/dp-mst.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a13792cfe0e2f290b96deb50c62b1ef0a00b5327 Author: Quentin Schulz Date: Fri Dec 9 12:04:17 2016 +0100 ARM: dts: sun8i: sina33: use AXP223 DTSI Previously, the Sinlinx SinA33 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Sinlinx SinA33 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9152085defb6426ce8f9989ca27e4450daefbd89 Author: Libin Yang Date: Thu Jan 12 16:04:53 2017 +0800 ALSA: hda - add DP MST audio support This patch adds the DP MST audio support on i915 platform and it will enable dyn_pcm_assign feature. DP MST supports several device entry on the same port and each device entry can map to one pcm stream. For example, on i915, there are 3 pins, and each pin has 3 device entries. This means there should be 3x3 pcms. However, there is only 3 pipe lines in i915. This means 3 pcms are actived at most at the same moment. We will create 5 pcms (pin number + dev entry num - 1) in this case. For the details, please refer commit a76056f2e57e ("ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug") Each device entry is a virtual pin. It is described by pin_nid and dev_id in struct hdmi_spec_per_pin. Reviewed-by: Takashi Iwai Signed-off-by: Libin Yang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484208294-8637-3-git-send-email-libin.yang@intel.com sound/pci/hda/hda_codec.c | 4 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 197 insertions(+), 52 deletions(-) commit 13800f397ee3b4996f316b9caa8482cb90edef0d Author: Libin Yang Date: Thu Jan 12 16:04:52 2017 +0800 ALSA: hda - add DP mst verb support Add snd_hda_get_dev_select() and snd_hda_set_dev_select() functions for DP MST audio support. Reviewed-by: Takashi Iwai Signed-off-by: Libin Yang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484208294-8637-2-git-send-email-libin.yang@intel.com sound/pci/hda/hda_codec.c | 72 ++++++++++++++++++++++++++++++++++++++++++++--- sound/pci/hda/hda_codec.h | 3 ++ 2 files changed, 71 insertions(+), 4 deletions(-) commit 9c890b33dffc4fe5afabfa154fd81db0477b0ccb Author: Quentin Schulz Date: Fri Dec 9 12:04:16 2016 +0100 ARM: dts: sun8i: a33-olinuxino: use AXP223 DTSI Previously, the Olimex A33-OlinuXino used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Olimex A33-OlinuXino can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdae59f85658fe4fc6fef94b87946af5988ce0f4 Author: Quentin Schulz Date: Fri Dec 9 12:04:15 2016 +0100 ARM: dts: add DTSI for AXP223 The AXP223 shares most of its logic with the AXP221 but it has some differences for the VBUS driver. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/axp223.dtsi | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 46116a5059ace25e9856160618db63218fd8fc3d Author: Quentin Schulz Date: Fri Dec 9 12:04:12 2016 +0100 dt-bindings: power: axp20x-usb: add axp223 compatible This adds the "x-powers,axp223-usb-power-supply" to the list of compatibles for AXP20X VBUS power supply driver. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/power/supply/axp20x_usb_power.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 7880b43bdfc9580700ee4568c75c383a5bcdd2ca Author: Al Viro Date: Thu Jan 12 04:01:17 2017 -0500 9p: constify ->d_name handling Signed-off-by: Al Viro fs/9p/fid.c | 10 +++++----- fs/9p/vfs_inode.c | 10 +++++----- fs/9p/vfs_inode_dotl.c | 20 ++++++++++---------- include/net/9p/9p.h | 8 ++++---- include/net/9p/client.h | 18 +++++++++--------- net/9p/client.c | 18 +++++++++--------- 6 files changed, 42 insertions(+), 42 deletions(-) commit 6e03f66c001790d6ca853c68a56c87460bc86467 Author: Andy Shevchenko Date: Tue Jan 10 18:43:54 2017 +0200 locking/jump_labels: Update bug_at() boot message First of all, %*ph specifier allows to dump data in hex format using the pointer to a buffer. This is suitable to use here. Besides that Thomas suggested to move it to critical level and replace __FILE__ by explicit mention of "jumplabel". Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170110164354.47372-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/jump_label.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c19a5f35e315837170ee337eed21c7087ea94192 Author: Arnd Bergmann Date: Wed Jan 11 15:49:04 2017 +0100 x86/e820/32: Fix e820_search_gap() error handling on x86-32 GCC correctly points out that on 32-bit kernels, e820_search_gap() not finding a start now leads to pci_mem_start ('gapstart') being set to an uninitialized value: arch/x86/kernel/e820.c: In function 'e820_setup_gap': arch/x86/kernel/e820.c:641:16: error: 'gapstart' may be used uninitialized in this function [-Werror=maybe-uninitialized] This restores the behavior from before this cleanup: b4ed1d15b453 ("x86/e820: Make e820_search_gap() static and remove unused variables") ... defaulting to address 0x10000000 if nothing was found. Signed-off-by: Arnd Bergmann Cc: Dan Williams Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: Wei Yang Fixes: b4ed1d15b453 ("x86/e820: Make e820_search_gap() static and remove unused variables") Link: http://lkml.kernel.org/r/20170111144926.695369-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 34869776c76b0aa3bb882ec8a4b6f1ebb6d6f937 Author: Zhenyu Wang Date: Mon Jan 9 21:14:53 2017 +0800 drm/i915: check ppgtt validity when init reg state Check if ppgtt is valid for context when init reg state. For gvt context which has no i915 allocated ppgtt, failed to check that would cause kernel null ptr reference error. v2: remove !48bit ppgtt case as we'll always update before submit (Chris) Signed-off-by: Zhenyu Wang Reviewed-by: Chris Wilson Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170109131453.3943-1-zhenyuw@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 75437bb304b20a2b350b9a8e9f9238d5e24e12ba Author: Pan Xinhui Date: Tue Jan 10 02:56:46 2017 -0500 locking/pvqspinlock: Don't wait if vCPU is preempted If prev node is not in running state or its vCPU is preempted, we can give up our vCPU slices in pv_wait_node() ASAP. Signed-off-by: Pan Xinhui Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: longman@redhat.com Link: http://lkml.kernel.org/r/1484035006-6787-1-git-send-email-xinhui.pan@linux.vnet.ibm.com [ Fixed typos in the changelog, removed ugly linebreak from the code. ] Signed-off-by: Ingo Molnar kernel/locking/qspinlock_paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 607904c357c61adf20b8fd18af765e501d61a385 Author: Waiman Long Date: Mon Jan 9 10:26:52 2017 -0500 locking/spinlocks: Remove the unused spin_lock_bh_nested() API The spin_lock_bh_nested() API is defined but is not used anywhere in the kernel. So all spin_lock_bh_nested() and related APIs are now removed. Signed-off-by: Waiman Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1483975612-16447-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/spinlock.h | 8 -------- include/linux/spinlock_api_smp.h | 2 -- include/linux/spinlock_api_up.h | 1 - kernel/locking/spinlock.c | 8 -------- 4 files changed, 19 deletions(-) commit f913f3a655cb4c37129bb36c9f175071e1fbdc29 Merge: ad5013d 675f52b Author: Ingo Molnar Date: Thu Jan 12 09:23:25 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170111' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Add more triggers to switch the output file (perf.data.TIMESTAMP). Now, in addition to switching to a different output file when receiving a SIGUSR2, one can also specify file size and time based triggers: perf record -a --switch-output=signal is equivalent to what we had before: perf record -a --switch-output While we can also ask for the file to be "sliced" by size, taking into account that that will happen only when we get woken up by the kernel, i.e. one has to take into account the --mmap-pages (the size of the perf mmap ring buffer): perf record -a --switch-output=2G will break the perf.data output into multiple files limited to 2GB of samples, right when generating the output. For time based samples, alert() will be used, so to have 1 minute limited perf.data output files: perf record -a --switch-output=1m (Jiri Olsa) - Remove the need to use -e only for syscalls and --event only for tracepoints/HW/SW/etc events, i.e. now one can use: perf trace -e nanosleep,futex,sched:sched_switch ./workload or: perf trace --event nanosleep,futex,sched:sched_switch ./workload And have it tracing raw_syscalls:sys_{enter,exit} for the nanosleep and futex syscalls, formatting those as strace does while also tracing sched:sched_switch, ordering it all into one strace like output. Using '!' as the first character in the -e/--event argument remains a way to negate the list of syscalls, i.e. all syscalls except for the ones specified, doesn't affect the other kinds of events. E.g: [root@jouet ~] # perf trace -e sched:sched_switch,nanosleep usleep 1 0.000 ( 0.028 ms): usleep/28150 nanosleep(rqtp: 0x7ffe4201b9f0) ... 0.028 ( ): sched:sched_switch:usleep:28150 [120] S ==> swapper/0:0 [120]) 0.000 ( 0.065 ms): usleep/28150 ... [continued]: nanosleep()) = 0 [root@jouet ~]# (Arnaldo Carvalho de Melo) - 'perf kallsyms' toy tool to look for extended symbol information on the running kernel and demonstrate the machine/thread/symbol APIs for use in other tools, such as 'perf probe' (Arnaldo Carvalho de Melo) Infrastructure improvements: - Add missing linux/kernel.h include to subcmd.h (Arnaldo Carvalho de Melo) tools: Sync x86's vmx.h with the kernel - Create libdir directory before installing libperf-jvmti.so (Laura Abbott) - Fix typo in perf_evlist__start_workload() (Soramichi Akiyama) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 4cf0662888026d5c1b62ed3fa8dc048a2ff2e124 Merge: c821f6a a121103 Author: Herbert Xu Date: Thu Jan 12 16:10:00 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Merging 4.10-rc3 so that the cryptodev tree builds on ARM64. commit f869a6ecf254194d96f82c71f528a2bcc048d44b Author: Andrey Grodzovsky Date: Fri Jan 6 15:39:40 2017 -0500 drm/atomic: Add target_vblank support in atomic helpers (v2) Allows usage of the new page_flip_target hook for drivers implementing the atomic path. Provides default atomic helper for the new hook. v2: Update code sharing logic between exsiting and the new flip hooks. Improve kerneldoc. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483735180-4173-1-git-send-email-Andrey.Grodzovsky@amd.com drivers/gpu/drm/drm_atomic_helper.c | 133 ++++++++++++++++++++++++++++++------ include/drm/drm_atomic_helper.h | 6 ++ include/drm/drm_crtc.h | 9 +++ 3 files changed, 127 insertions(+), 21 deletions(-) commit a7522cd938f9ba6dee85c5fafd66ded022437326 Author: Colin Ian King Date: Sat Nov 12 17:33:29 2016 +0000 amdkfd: fix spelling mistake in kfd_ioctl_dbg_unrgesiter Trivial fix to spelling mistake, rename kfd_ioctl_dbg_unrgesiter to kfd_ioctl_dbg_unregister Signed-off-by: Colin Ian King Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16ee20619f636abc4c72b4215f5cb9cf2f3e1b5b Author: Chris Wilson Date: Wed Jan 11 18:15:16 2017 +0000 drm/i915: Detect vma reserved for execbuf in evict-for-node The vma->exec_list is still the only means we have for both reserving an object in execbuf, and for constructing the eviction list. So during the construction of the eviction list, we must treat anything already on the exec_list as being pinned. Yes, this sharing of two semantically different lists will be fixed! But in the meantime, we have the issue that this is tripping up CI since we started using i915_gem_gtt_reserve_node() + i915_gem_evict_for_node() from the regular execbuf reservation path in commit 606fec956c0e ("drm/i915: Prefer random replacement before eviction search"): [ 108.424063] kernel BUG at drivers/gpu/drm/i915/i915_vma.h:254! [ 108.424072] invalid opcode: 0000 [#1] PREEMPT SMP [ 108.424079] Modules linked in: snd_hda_intel i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core mei_me snd_pcm lpc_ich mei sdhci_pci sdhci mmc_core e1000e ptp pps_core [last unloaded: i915] [ 108.424132] CPU: 1 PID: 6865 Comm: gem_cs_tlb Tainted: G U 4.10.0-rc3-CI-CI_DRM_2049+ #1 [ 108.424143] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013 [ 108.424154] task: ffff88012ae22600 task.stack: ffffc90000a14000 [ 108.424220] RIP: 0010:i915_gem_evict_for_node+0x237/0x410 [i915] [ 108.424229] RSP: 0018:ffffc90000a17a58 EFLAGS: 00010202 [ 108.424237] RAX: 0000000000005871 RBX: ffff88012d1ad778 RCX: 0000000000000000 [ 108.424246] RDX: 000000007ffff000 RSI: ffffc90000a17a68 RDI: ffff880127e694d8 [ 108.424255] RBP: ffffc90000a17aa0 R08: ffffc90000a17a68 R09: 0000000000000000 [ 108.424264] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000080000000 [ 108.424273] R13: ffffc90000a17a68 R14: ffff880127e694d8 R15: ffffffffa0387330 [ 108.424283] FS: 00007f8236e3d8c0(0000) GS:ffff880137c40000(0000) knlGS:0000000000000000 [ 108.424293] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 108.424305] CR2: 00007f82347a2000 CR3: 000000012c866000 CR4: 00000000000006e0 [ 108.424317] Call Trace: [ 108.424368] i915_gem_gtt_reserve+0x67/0x80 [i915] [ 108.424424] __i915_vma_do_pin+0x248/0x620 [i915] [ 108.424487] ? __i915_vma_do_pin+0x162/0x620 [i915] [ 108.424540] i915_gem_execbuffer_reserve_vma.isra.8+0x153/0x1f0 [i915] [ 108.424591] i915_gem_execbuffer_reserve.isra.9+0x40e/0x440 [i915] [ 108.424643] i915_gem_do_execbuffer.isra.15+0x6d9/0x1b20 [i915] [ 108.424696] i915_gem_execbuffer2+0xc0/0x250 [i915] [ 108.424712] drm_ioctl+0x200/0x450 [ 108.424760] ? i915_gem_execbuffer+0x330/0x330 [i915] [ 108.424776] do_vfs_ioctl+0x90/0x6e0 [ 108.424789] ? up_read+0x1a/0x40 [ 108.424800] ? trace_hardirqs_on_caller+0x122/0x1b0 [ 108.424813] SyS_ioctl+0x3c/0x70 [ 108.424828] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 108.424839] RIP: 0033:0x7f8235867357 [ 108.424848] RSP: 002b:00007ffdc14504c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 108.424866] RAX: ffffffffffffffda RBX: 00007ffdc1450600 RCX: 00007f8235867357 [ 108.424878] RDX: 00007ffdc14505a0 RSI: 0000000040406469 RDI: 0000000000000003 [ 108.424890] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000022 [ 108.424903] R10: 0000000000000007 R11: 0000000000000246 R12: 0000000000000002 [ 108.424915] R13: 0000000000419101 R14: 00007ffdc1450600 R15: 00007ffdc14505f0 [ 108.424928] Code: 45 b8 8b 4d c0 4c 89 f2 48 89 de ff d0 49 8b 07 4c 8b 45 b8 48 85 c0 75 dd 65 ff 0d d4 a1 c8 5f 0f 84 47 01 00 00 e9 0d fe ff ff <0f> 0b 45 31 f6 4c 8b 65 c8 49 8b 04 24 4d 39 ec 49 8d 9c 24 28 [ 108.425055] RIP: i915_gem_evict_for_node+0x237/0x410 [i915] RSP: ffffc90000a17a58 Fixes: 172ae5b4c8c1 ("drm/i915: Fix i915_gem_evict_for_vma (soft-pinning)") Fixes: 606fec956c0e ("drm/i915: Prefer random replacement before eviction search") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170111182132.19174-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_evict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c0f83f328fcb48da03401e1ecb2b34492671a9a Author: Christoph Hellwig Date: Wed Jan 11 14:26:52 2017 +0100 scsi: qla4xxx: remove two unused MSI-X related #defines Spotted while preparing qla2xxx changes as the symbols exist in both drivers (sigh..). Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_def.h | 3 --- 1 file changed, 3 deletions(-) commit 1e668f4e7921e8c82838cf5f95ff4a2d5c852efc Author: Josef Bacik Date: Wed Jan 11 15:41:40 2017 -0500 MAINTAINERS: Update maintainer entry for NBD The old maintainers email is bouncing and I've rewritten most of this driver in the recent months. Also add linux-block to the mailinglist and remove the old tree, I will send patches through the linux-block tree. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8a5b12247fe18f7fed801ad262a7ab190e1f848 Author: Jens Axboe Date: Tue Dec 13 09:24:51 2016 -0700 blk-mq: make mq_ops a const pointer We never change it, make that clear. Signed-off-by: Jens Axboe Reviewed-by: Bart Van Assche block/blk-mq.c | 2 +- include/linux/blk-mq.h | 2 +- include/linux/blkdev.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 729204ef49ec00b788ce23deb9eb922a5769f55d Author: Ming Lei Date: Sat Dec 17 18:49:09 2016 +0800 block: relax check on sg gap If the last bvec of the 1st bio and the 1st bvec of the next bio are physically contigious, and the latter can be merged to last segment of the 1st bio, we should think they don't violate sg gap(or virt boundary) limit. Both Vitaly and Dexuan reported lots of unmergeable small bios are observed when running mkfs on Hyper-V virtual storage, and performance becomes quite low. This patch fixes that performance issue. The same issue should exist on NVMe, since it sets virt boundary too. Reported-by: Vitaly Kuznetsov Reported-by: Dexuan Cui Tested-by: Dexuan Cui Cc: Keith Busch Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/blkdev.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 1661f2e21c8bbf922dcb76faf2126a33ffe4cddb Author: Vlastimil Babka Date: Wed Jan 4 11:19:31 2017 +0100 floppy: replace wrong kmalloc(GFP_USER) with GFP_KERNEL The raw_cmd_copyin() function does a kmalloc() with GFP_USER, although the allocated structure is obviously not mapped to userspace, just copied from/to. In this case GFP_KERNEL is more appropriate, so let's use it, although in the current implementation this does not manifest as any error. Reported-by: Matthew Wilcox Signed-off-by: Vlastimil Babka Signed-off-by: Jiri Kosina drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0df5bef739601f18bffc0d256ae451f239a826bd Author: Uma Krishnan Date: Wed Jan 11 19:20:03 2017 -0600 scsi: cxlflash: Cancel scheduled workers before stopping AFU When processing an AFU asynchronous interrupt, if the action results in an operation that requires off level processing (a link reset for example), the worker thread is scheduled. In the meantime a reset event (i.e.: EEH) could unmap the AFU to recover. This results in an Oops when the worker thread tries to access the AFU mapping. [c000000f17e03b90] d000000007cd5978 cxlflash_worker_thread+0x268/0x550 [c000000f17e03c40] c00000000011883c process_one_work+0x1dc/0x680 [c000000f17e03ce0] c000000000118e80 worker_thread+0x1a0/0x520 [c000000f17e03d80] c000000000126174 kthread+0xf4/0x100 [c000000f17e03e30] c00000000000a47c ret_from_kernel_thread+0x5c/0xe0 In an effort to avoid this, a mapcount was introduced in commit b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") but due to the race condition described above, this solution is incomplete. In order to fully resolve this problem and to simplify things, this commit removes the mapcount solution. Instead, the scheduled worker thread is cancelled after interrupts have been disabled and prior to the mapping being freed. Fixes: b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 -- drivers/scsi/cxlflash/main.c | 34 ++++++---------------------------- 2 files changed, 6 insertions(+), 30 deletions(-) commit fb67d44dfbdf85d984b9b40284e90636a3a7b21d Author: Matthew R. Ochs Date: Wed Jan 11 19:19:47 2017 -0600 scsi: cxlflash: Cleanup prints The usage of prints within the cxlflash driver is inconsistent. This hinders debug and makes the driver source and log output appear sloppy. The following cleanups help unify the prints within cxlflash: - move all prints to dev-* where possible - transition all hex prints to lowercase - standardize variable prints in debug output - derive pointers in a consistent manner - change int to bool where appropriate - remove superfluous data from prints and print statements that do not make sense Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Reviewed-by: Andrew Donnellan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/lunmgt.c | 31 ++-- drivers/scsi/cxlflash/main.c | 319 ++++++++++++++++++-------------------- drivers/scsi/cxlflash/superpipe.c | 165 ++++++++++---------- drivers/scsi/cxlflash/vlun.c | 169 ++++++++++---------- 4 files changed, 346 insertions(+), 338 deletions(-) commit 696d0b0c715360ce28fedd3c8b009d3771a5ddeb Author: Matthew R. Ochs Date: Wed Jan 11 19:19:33 2017 -0600 scsi: cxlflash: Support SQ Command Mode The SISLite specification outlines a new queuing model to improve over the MMIO-based IOARRIN model that exists today. This new model uses a submission queue that exists in host memory and is shared with the device. Each entry in the queue is an IOARCB that describes a transfer request. When requests are submitted, IOARCBs ('current' position tracked in host software) are populated and the submission queue tail pointer is then updated via MMIO to make the device aware of the requests. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 30 +++++++++++- drivers/scsi/cxlflash/main.c | 98 ++++++++++++++++++++++++++++++++++++-- drivers/scsi/cxlflash/sislite.h | 19 +++++++- drivers/scsi/cxlflash/superpipe.c | 18 +++++-- include/uapi/scsi/cxlflash_ioctl.h | 1 + 5 files changed, 153 insertions(+), 13 deletions(-) commit 9c7d1ee5f13a7130f6d3df307ec010e9e003fa98 Author: Matthew R. Ochs Date: Wed Jan 11 19:19:08 2017 -0600 scsi: cxlflash: Refactor context reset to share reset logic As staging for supporting hardware with different context reset registers but a similar reset procedure, refactor the existing context reset routine to move the reset logic to a common routine. This will allow hardware with a different reset register to leverage existing code. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 73eba2be9203c0eef37df6939ebba4d34227f284 Author: Subhash Jadavani Date: Tue Jan 10 16:48:25 2017 -0800 scsi: ufs: fix arguments order some trace calls Colin Ian King reported that with commit 7ff5ab473633 ("scsi: ufs: add tracing support") static analysis is reporting that we may have swapped arguments on calls to: trace_ufshcd_runtime_resume, trace_ufshcd_runtime_suspend, trace_ufshcd_system_suspend, trace_ufshcd_system_resume, and trace_ufshcd_init Where: hba->uic_link_state is passed to dev_state hba->curr_dev_pwr_mode is passed to link_state This wasn't intentional so it's a bug. This change fixed this bug. Reported-by: Colin Ian King Signed-off-by: Subhash Jadavani Acked-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2e48e3491189c40dc9ea9d4a53412d2b66c87555 Author: Christoph Hellwig Date: Fri Nov 18 07:02:38 2016 +0100 scsi: vmw_pvscsi: switch to pci_alloc_irq_vectors And simplify the interrupt handler by splitting the INTx case that needs to deal with shared interrupts into a separate helper. [mkp: typo fixage] Signed-off-by: Christoph Hellwig Acked-by: Jim Gill Signed-off-by: Martin K. Petersen drivers/scsi/vmw_pvscsi.c | 104 +++++++++++++++++----------------------------- drivers/scsi/vmw_pvscsi.h | 5 --- 2 files changed, 38 insertions(+), 71 deletions(-) commit b907f2d5194c2636623415d89cfb91d692af0629 Author: Theodore Ts'o Date: Wed Jan 11 22:14:49 2017 -0500 ext4: avoid calling ext4_mark_inode_dirty() under unneeded semaphores There is no need to call ext4_mark_inode_dirty while holding xattr_sem or i_data_sem, so where it's easy to avoid it, move it out from the critical region. Signed-off-by: Theodore Ts'o fs/ext4/inline.c | 9 +++------ fs/ext4/inode.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) commit c755e251357a0cee0679081f08c3f4ba797a8009 Author: Theodore Ts'o Date: Wed Jan 11 21:50:46 2017 -0500 ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea() The xattr_sem deadlock problems fixed in commit 2e81a4eeedca: "ext4: avoid deadlock when expanding inode size" didn't include the use of xattr_sem in fs/ext4/inline.c. With the addition of project quota which added a new extra inode field, this exposed deadlocks in the inline_data code similar to the ones fixed by 2e81a4eeedca. The deadlock can be reproduced via: dmesg -n 7 mke2fs -t ext4 -O inline_data -Fq -I 256 /dev/vdc 32768 mount -t ext4 -o debug_want_extra_isize=24 /dev/vdc /vdc mkdir /vdc/a umount /vdc mount -t ext4 /dev/vdc /vdc echo foo > /vdc/a/foo and looks like this: [ 11.158815] [ 11.160276] ============================================= [ 11.161960] [ INFO: possible recursive locking detected ] [ 11.161960] 4.10.0-rc3-00015-g011b30a8a3cf #160 Tainted: G W [ 11.161960] --------------------------------------------- [ 11.161960] bash/2519 is trying to acquire lock: [ 11.161960] (&ei->xattr_sem){++++..}, at: [] ext4_expand_extra_isize_ea+0x3d/0x4cd [ 11.161960] [ 11.161960] but task is already holding lock: [ 11.161960] (&ei->xattr_sem){++++..}, at: [] ext4_try_add_inline_entry+0x3a/0x152 [ 11.161960] [ 11.161960] other info that might help us debug this: [ 11.161960] Possible unsafe locking scenario: [ 11.161960] [ 11.161960] CPU0 [ 11.161960] ---- [ 11.161960] lock(&ei->xattr_sem); [ 11.161960] lock(&ei->xattr_sem); [ 11.161960] [ 11.161960] *** DEADLOCK *** [ 11.161960] [ 11.161960] May be due to missing lock nesting notation [ 11.161960] [ 11.161960] 4 locks held by bash/2519: [ 11.161960] #0: (sb_writers#3){.+.+.+}, at: [] mnt_want_write+0x1e/0x3e [ 11.161960] #1: (&type->i_mutex_dir_key){++++++}, at: [] path_openat+0x338/0x67a [ 11.161960] #2: (jbd2_handle){++++..}, at: [] start_this_handle+0x582/0x622 [ 11.161960] #3: (&ei->xattr_sem){++++..}, at: [] ext4_try_add_inline_entry+0x3a/0x152 [ 11.161960] [ 11.161960] stack backtrace: [ 11.161960] CPU: 0 PID: 2519 Comm: bash Tainted: G W 4.10.0-rc3-00015-g011b30a8a3cf #160 [ 11.161960] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1 04/01/2014 [ 11.161960] Call Trace: [ 11.161960] dump_stack+0x72/0xa3 [ 11.161960] __lock_acquire+0xb7c/0xcb9 [ 11.161960] ? kvm_clock_read+0x1f/0x29 [ 11.161960] ? __lock_is_held+0x36/0x66 [ 11.161960] ? __lock_is_held+0x36/0x66 [ 11.161960] lock_acquire+0x106/0x18a [ 11.161960] ? ext4_expand_extra_isize_ea+0x3d/0x4cd [ 11.161960] down_write+0x39/0x72 [ 11.161960] ? ext4_expand_extra_isize_ea+0x3d/0x4cd [ 11.161960] ext4_expand_extra_isize_ea+0x3d/0x4cd [ 11.161960] ? _raw_read_unlock+0x22/0x2c [ 11.161960] ? jbd2_journal_extend+0x1e2/0x262 [ 11.161960] ? __ext4_journal_get_write_access+0x3d/0x60 [ 11.161960] ext4_mark_inode_dirty+0x17d/0x26d [ 11.161960] ? ext4_add_dirent_to_inline.isra.12+0xa5/0xb2 [ 11.161960] ext4_add_dirent_to_inline.isra.12+0xa5/0xb2 [ 11.161960] ext4_try_add_inline_entry+0x69/0x152 [ 11.161960] ext4_add_entry+0xa3/0x848 [ 11.161960] ? __brelse+0x14/0x2f [ 11.161960] ? _raw_spin_unlock_irqrestore+0x44/0x4f [ 11.161960] ext4_add_nondir+0x17/0x5b [ 11.161960] ext4_create+0xcf/0x133 [ 11.161960] ? ext4_mknod+0x12f/0x12f [ 11.161960] lookup_open+0x39e/0x3fb [ 11.161960] ? __wake_up+0x1a/0x40 [ 11.161960] ? lock_acquire+0x11e/0x18a [ 11.161960] path_openat+0x35c/0x67a [ 11.161960] ? sched_clock_cpu+0xd7/0xf2 [ 11.161960] do_filp_open+0x36/0x7c [ 11.161960] ? _raw_spin_unlock+0x22/0x2c [ 11.161960] ? __alloc_fd+0x169/0x173 [ 11.161960] do_sys_open+0x59/0xcc [ 11.161960] SyS_open+0x1d/0x1f [ 11.161960] do_int80_syscall_32+0x4f/0x61 [ 11.161960] entry_INT80_32+0x2f/0x2f [ 11.161960] EIP: 0xb76ad469 [ 11.161960] EFLAGS: 00000286 CPU: 0 [ 11.161960] EAX: ffffffda EBX: 08168ac8 ECX: 00008241 EDX: 000001b6 [ 11.161960] ESI: b75e46bc EDI: b7755000 EBP: bfbdb108 ESP: bfbdafc0 [ 11.161960] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b Cc: stable@vger.kernel.org # 3.10 (requires 2e81a4eeedca as a prereq) Reported-by: George Spelvin Signed-off-by: Theodore Ts'o fs/ext4/inline.c | 66 ++++++++++++++++++++++++++------------------------------ fs/ext4/xattr.c | 30 +++++++++++--------------- fs/ext4/xattr.h | 32 +++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 54 deletions(-) commit 178478921b6e5c7d59d2f94114855d0aed25384b Author: Chris Lapa Date: Wed Jan 11 12:44:48 2017 +1100 power: supply: bq27xxx: adds device tree binding documentation. The bq27xxx binding is a standard i2c style binding, however the deprecated compatible fields and different revisions warrant its own documentation. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/bq27xxx.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8835cae5f2abd7f7a3143afe357f416aff5517a4 Author: Chris Lapa Date: Wed Jan 11 12:44:47 2017 +1100 power: supply: bq27xxx: adds specific support for bq27520-g4 revision. This commit adds the BQ27520G4 chip definition to specifically match the bq27520-G4 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 39 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 42 insertions(+) commit 825e915ba2e811b91a034ac6290cd172387c5447 Author: Chris Lapa Date: Wed Jan 11 12:44:46 2017 +1100 power: supply: bq27xxx: adds specific support for bq27520-g3 revision. This commit adds the BQ27520G3 chip definition to specifically match the bq27520-G3 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 42 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 45 insertions(+) commit a5deb9a93040a4a221ef8a67c88ecd72cd1f3625 Author: Chris Lapa Date: Wed Jan 11 12:44:45 2017 +1100 power: supply: bq27xxx: adds specific support for bq27520-g2 revision. This commit adds the BQ27520G2 chip definition to specifically match the bq27520-G2 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 43 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 46 insertions(+) commit 68f2a813eb25bd0ef72453aeef9b1ce156157d14 Author: Chris Lapa Date: Wed Jan 11 12:44:44 2017 +1100 power: supply: bq27xxx: adds specific support for bq27520-g1 revision. This commit adds the BQ27520G1 chip definition to specifically match the bq27520-G1 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 42 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 45 insertions(+) commit 71375aa7d6a7392d4968f6a562b437cb4958f956 Author: Chris Lapa Date: Wed Jan 11 12:44:43 2017 +1100 power: supply: bq27xxx: adds specific support for bq27510-g3 revision. This commit adds the BQ27510G3 chip definition to specifically match the bq27510-G3 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Tested-by: Chris Lapa Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 39 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 42 insertions(+) commit 698a2bf5fc31d85d428a2ae495775b61381a495e Author: Chris Lapa Date: Wed Jan 11 12:44:42 2017 +1100 power: supply: bq27xxx: adds specific support for bq27510-g2 revision. This commit adds the BQ27510G2 chip definition to specifically match the bq27510-G2 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 43 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 46 insertions(+) commit bd28177f3ec8367fbb3c56cfcf1c1a46e3fe240a Author: Chris Lapa Date: Wed Jan 11 12:44:41 2017 +1100 power: supply: bq27xxx: adds specific support for bq27510-g1 revision. This commit adds the BQ27510G1 chip definition to specifically match the bq27510-G1 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 43 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 46 insertions(+) commit 32833635b0fe9bf71bbf867d1c3abfb5b006bf29 Author: Chris Lapa Date: Wed Jan 11 12:44:40 2017 +1100 power: supply: bq27xxx: adds specific support for bq27500/1 revision. This commit adds the BQ27500 chip definition to specifically match the bq27500/1 functionality as described in the datasheet. Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 42 ++++++++++++++++++++++++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ include/linux/power/bq27xxx_battery.h | 1 + 3 files changed, 45 insertions(+) commit 6da6e4bdd383d8efdf50da6d0933a16ad3a590f6 Author: Chris Lapa Date: Wed Jan 11 12:44:39 2017 +1100 power: supply: bq27xxx: rename BQ27510 allow for deprecation in future. The BQ2751X definition exists only to satisfy backwards compatibility. Signed-off-by: Chris Lapa Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 8 ++++---- drivers/power/supply/bq27xxx_battery_i2c.c | 4 ++-- include/linux/power/bq27xxx_battery.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 818e3012c2eac4885bf7278c5144a14186d742d2 Author: Chris Lapa Date: Wed Jan 11 12:44:38 2017 +1100 power: supply: bq27xxx: rename BQ27500 allow for deprecation in future. The BQ2750X definition exists only to satisfy backwards compatibility. Signed-off-by: Chris Lapa Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 8 ++++---- drivers/power/supply/bq27xxx_battery_i2c.c | 2 +- include/linux/power/bq27xxx_battery.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 15df6d98ec3b40775918fc6ef73d7f1c2d0cf870 Author: Michal Suchanek Date: Tue Jan 10 18:48:12 2017 +0100 power: supply: axp20x_usb_power: fix warning on 64bit Casting of_device_get_match_data return value to int causes warning on 64bit architectures. ../drivers/power/supply/axp20x_usb_power.c: In function 'axp20x_usb_power_probe': ../drivers/power/supply/axp20x_usb_power.c:297:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Fixes: 0dcc70ca8644 ("power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible") Signed-off-by: Michal Suchanek Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_usb_power.c | 5 +++-- include/linux/mfd/axp20x.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit c7821d0f3d81ef91aff037cef4e23c56bab30d26 Author: Andrew Duggan Date: Thu Jan 5 09:49:00 2017 +0100 HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmi Signed-off-by: Andrew Duggan Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-rmi.c | 1 + 3 files changed, 3 insertions(+) commit 279967a65b320d174a507498aea7d44db3fee7f4 Author: Andrew Duggan Date: Thu Jan 5 09:48:59 2017 +0100 HID: rmi: Handle all Synaptics touchpads using hid-rmi With the addition of HID and F12 support in the synaptics-rmi4 driver touchpads which had been using the hid-multitouch driver can now be support by the synaptics-rmi4 via hid-rmi. The advantage is that additional data can be reported from the RMI registers which is not available in the Microsoft Precision Touchpad collection. Signed-off-by: Andrew Duggan Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0b2c7a897378f11e86c0b3d426bf678b759c6a8d Author: Andrew Duggan Date: Thu Jan 5 09:48:58 2017 +0100 HID: rmi: Make hid-rmi a transport driver for synaptics-rmi4 The Synaptics RMI4 driver provides support for RMI4 devices. Instead of duplicating the RMI4 processing code, make hid-rmi a transport driver and register it with the Synaptics RMI4 core. Signed-off-by: Andrew Duggan Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 5 + drivers/hid/hid-rmi.c | 974 ++++++++------------------------------------------ 2 files changed, 146 insertions(+), 833 deletions(-) commit fe6cc17f89b2bf044f61d7cc6a45b51ccf86d853 Author: Marcel Hasler Date: Sat Jan 7 12:11:07 2017 +0100 HID: hid-mf: add force feedback support for Mayflash DolphinBar and GameCube The Mayflash DolphinBar and GameCube adapters have been tested and confirmed to work using the hid-mf driver. Signed-off-by: Marcel Hasler Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-mf.c | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) commit c7fc50aa6fcae8ed4aeb8e22e751cab3949c20d6 Author: Marcel Hasler Date: Sat Jan 7 12:10:37 2017 +0100 HID: add device ID for updated Mayflash/Dragonrise GameCube adapter The Mayflash GameCube adapter has received a firmware update which, among other things, changes the device's PID. It also fixes enumeration, therefore the updated firmware no longer requires HID_QUIRK_MULTI_INPUT. Signed-off-by: Marcel Hasler Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 ++- drivers/hid/usbhid/hid-quirks.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 171d87aca0da1fab6a15b96ad8e298216a5951b0 Author: Robert Richter Date: Wed Jan 11 18:04:32 2017 +0100 net: thunderx: Make hfunc variable const type in nicvf_set_rxfh() >From struct ethtool_ops: int (*set_rxfh)(struct net_device *, const u32 *indir, const u8 *key, const u8 hfunc); Change function arg of hfunc to const type. V2: Fixed indentation. Signed-off-by: Robert Richter Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60dce04b81424940a3183c8e7e81e1234a27e906 Author: Wei Yongjun Date: Wed Jan 11 16:32:51 2017 +0000 net: thunderx: Fix error return code in nicvf_open() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 712c31853440 ("net: thunderx: Program LMAC credits based on MTU") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b40296fc73f58f98b595164d52d9bfe99216efa6 Author: Wei Yongjun Date: Wed Jan 11 16:16:12 2017 +0000 sfc: efx_get_phys_port_id() can be static Fixes the following sparse warning: drivers/net/ethernet/sfc/efx.c:2337:5: warning: symbol 'efx_get_phys_port_id' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dadf17334f3820e2f8c561011706b6fb99bf9860 Author: Randy Dunlap Date: Wed Dec 28 08:25:04 2016 -0800 PCI/MSI: Fix msi_capability_init() kernel-doc warnings Fix kernel-doc warnings in pci/msi.c: ..//drivers/pci/msi.c:623: warning: No description found for parameter 'affd' ..//drivers/pci/msi.c:623: warning: Excess function parameter 'affinity' description in 'msi_capability_init' Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas drivers/pci/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66e5c5ffc7a5e4d36d136ce4fd8bdb4e92ecec7b Author: Daniel Keller Date: Tue Jan 10 20:39:31 2017 +0100 HID: multitouch: enable Surface 4 Type Cover Pro (non-JP) to report multitouch data Nearly identical to the patch "multitouch: enable the Surface 4 Type Cover Pro (JP) to report multitouch data" We can now remove the support of the Surface 4 Type Cover Pro (not JP versions) from hid-microsoft so it can properly report multi touch from the touchpad. Signed-off-by: Daniel Keller Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 4 ---- drivers/hid/hid-ids.h | 2 -- drivers/hid/hid-microsoft.c | 4 ---- drivers/hid/usbhid/hid-quirks.c | 2 -- 4 files changed, 12 deletions(-) commit caf3f562e1161a86bd48a4c4c33af89d3693c658 Author: Fabio Estevam Date: Tue Dec 27 12:40:43 2016 -0200 PCI: imx6: Remove redundant "Link never came up" message When a PCI card is not connected, the following messages are seen on mx6: imx6q-pcie 1ffc000.pcie: phy link never came up imx6q-pcie 1ffc000.pcie: Link never came up The first one comes from the pcie-designware.c core file, so remove the redundant one from the imx6 driver. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/host/pci-imx6.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1acf8bca9cdb2443a8707ff0afc3aadbfb5669f4 Author: Bhumika Goyal Date: Mon Dec 26 21:06:35 2016 +0530 PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init ibm_apci_table_attr is not modified after being initialized by ibm_acpiphp_init(). It is passed as an argument to the functions sysfs_{remove/create}_bin_file(), but both the arguments are const. Add __ro_after_init to its declaration. [bhelgaas: changelog] Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas Reviewed-by: Kees Cook drivers/pci/hotplug/acpiphp_ibm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63d182abd71cb47cee4adb8dd2afd71d987794d5 Author: Rahul Krishnan Date: Sat Dec 24 15:08:00 2016 +0530 PCI: rpadlpar: Remove unnecessary return statement Remove unnecessary return statement using spatch tool. Signed-off-by: Rahul Krishnan Signed-off-by: Bjorn Helgaas Reviewed-by: Tyrel Datwyler drivers/pci/hotplug/rpadlpar_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 670e9875eb14b112fa6a206a65c776a4fb347eb1 Author: Theodore Ts'o Date: Wed Jan 11 15:32:22 2017 -0500 ext4: add debug_want_extra_isize mount option In order to test the inode extra isize expansion code, it is useful to be able to easily create file systems that have inodes with extra isize values smaller than the current desired value. Signed-off-by: Theodore Ts'o fs/ext4/super.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 675f52b23743f396c585fc9d135435be37f320d8 Author: Arnaldo Carvalho de Melo Date: Tue Jan 10 16:41:39 2017 -0300 tools: Sync x86's vmx.h with the kernel To pick the changes from: 1b07304c587d ("KVM: nVMX: support descriptor table exits") That adds entries to VMX_EXIT_REASONS, that is used by tools/perf/arch/x86/util/kvm-stat.c. This also picks the changes in: 1dc35dacc16b ("KVM: nVMX: check host CR3 on vmentry and vmexit") But these are not used in 'perf kvm stat', do it just to silence the kernel/tools file cache coherency detector: $ make -C tools/perf make: Entering directory '/home/acme/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Ladi Prosek Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-56uowkk8t5zje49a42asffcy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/uapi/asm/vmx.h | 5 +++++ 1 file changed, 5 insertions(+) commit bfacbe3bf2443c805aec4c04ecb558d03d0d3ebc Author: Jiri Olsa Date: Mon Jan 9 10:52:00 2017 +0100 perf record: Add switch-output time option argument It's now possible to specify the threshold time for perf.data like: $ perf record --switch-output=30s ... Once it's reached, the current data are dumped in to the perf.data. file and session does on. $ perf record --switch-output=30s ... [ perf record: dump data: Woken up 44 times ] [ perf record: Dump perf.data.2017010213043746 ] ... The time is expected to be a number with appended unit character - s/m/h/d. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Acked-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1483955520-29063-7-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/builtin-record.c | 44 ++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) commit 0c5824498e8bd5b7d30dc03448cd89efaee4bead Author: Jiri Olsa Date: Mon Jan 9 10:51:59 2017 +0100 perf record: Add switch-output size warning Adding switch-output size warning if the requested size of lower than the wakeup ring buffer size. $ perf record --switch-output=1K ls WARNING: switch-output data size lower than wakeup kernel buffer size (258K) expect bigger perf.data sizes ... Signed-off-by: Jiri Olsa Suggested-and-Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1483955520-29063-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 21 +++++++++++++++++++++ tools/perf/util/evlist.c | 2 +- tools/perf/util/evlist.h | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) commit dc0c6127c231d4d264570497a916fa19740c915b Author: Jiri Olsa Date: Mon Jan 9 10:51:58 2017 +0100 perf record: Add switch-output size option argument It's now possible to specify the threshold size for perf.data like: $ perf record --switch-output=2G ... Once it's reached, the current data are dumped in to the perf.data. file and session does on. $ perf record --switch-output=2G ... [ perf record: dump data: Woken up 7244 times ] [ perf record: Dump perf.data.2017010214093746 ] ... The size is expected to be a number with appended unit character - B/K/M/G. Signed-off-by: Jiri Olsa Acked-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1483955520-29063-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 12 +++++- tools/perf/builtin-record.c | 67 +++++++++++++++++++++++++------- 2 files changed, 63 insertions(+), 16 deletions(-) commit cb4e1ebb6a398ff5b0067034b0d16566af4d78e8 Author: Jiri Olsa Date: Mon Jan 9 10:51:57 2017 +0100 perf record: Change switch-output option to take optional argument Next patches will add --switch-output option arguments, changing the option to allow that and adding its default value to 'signal'. Signed-off-by: Jiri Olsa Acked-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1483955520-29063-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 1b43b70484a9617de5fe2c12e64bea006010ac1c Author: Jiri Olsa Date: Mon Jan 9 10:51:56 2017 +0100 perf record: Add struct switch_output Next patches will add more --switch-output option arguments, so preparing the data holder. Signed-off-by: Jiri Olsa Acked-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1483955520-29063-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 9808143ba2e54818a3cf445d9b69b3f5f15451ee Author: Jiri Olsa Date: Mon Jan 9 10:51:55 2017 +0100 perf tools: Add unit_number__scnprintf function Add unit_number__scnprintf function to display size units and use it in -m option info message. Before: $ perf record -m 10M ls rounding mmap pages size to 16777216 bytes (4096 pages) ... After: $ perf record -m 10M ls rounding mmap pages size to 16M (4096 pages) ... Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1483955520-29063-2-git-send-email-jolsa@kernel.org [ Rename it to unit_number__scnprintf for consistency ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 ++++ tools/perf/tests/tests.h | 1 + tools/perf/tests/unit_number__scnprintf.c | 37 +++++++++++++++++++++++++++++++ tools/perf/util/evlist.c | 8 +++++-- tools/perf/util/util.c | 13 +++++++++++ tools/perf/util/util.h | 1 + 7 files changed, 63 insertions(+), 2 deletions(-) commit e978be9ea2990f1af60fe10eadd2312a6250e0b8 Author: Soramichi Akiyama Date: Tue Jan 10 10:41:00 2017 -0300 perf evlist: Fix typo in perf_evlist__start_workload() This patch fixes a typo: s/enable to/unable to/ Signed-off-by: Soramichi AKIYAMA Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: bcf3145fbeb1 ("perf evlist: Enhance perf_evlist__start_workload()") Link: http://lkml.kernel.org/r/20170110200006.e1f7a766b4faf1f107ae2e1b@m.soramichi.jp [ Wasn't applying, fixed it up by hand, added Fixes: tag ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 017037ff3d0b11842012878a546fe2df47822259 Author: Arnaldo Carvalho de Melo Date: Mon Jan 9 17:26:26 2017 -0300 perf trace: Allow specifying list of syscalls and events in -e/--expr/--event Makes it easier to specify both events and syscalls (to be formatter strace-like), i.e. previously one would have to do: # perf trace -e nanosleep --event sched:sched_switch usleep 1 Now it is possible to do: # perf trace -e nanosleep,sched:sched_switch usleep 1 0.000 ( 0.021 ms): usleep/17962 nanosleep(rqtp: 0x7ffdedd61ec0) ... 0.021 ( ): sched:sched_switch:usleep:17962 [120] S ==> swapper/1:0 [120]) 0.000 ( 0.066 ms): usleep/17962 ... [continued]: nanosleep()) = 0 # The old style --expr and using both -e and --event continues to work. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ieg6bakub4657l9e6afn85r4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-trace.txt | 8 +-- tools/perf/builtin-trace.c | 120 ++++++++++++++++++++++++-------- 2 files changed, 96 insertions(+), 32 deletions(-) commit 355637717d575f14169954c3ed31536d45778f08 Author: Arnaldo Carvalho de Melo Date: Thu Jan 5 15:33:32 2017 -0300 perf kallsyms: Introduce tool to look for extended symbol information on the running kernel Its similar to doing grep on a /proc/kallsyms, but it also shows extra information like the path to the kernel module and the unrelocated addresses in it, to help in diagnosing problems. It is also helps demonstrate the use of the symbols routines so that tool writers can use them more effectively. Using it: $ perf kallsyms e1000_xmit_frame netif_rx usb_stor_set_xfer_buf e1000_xmit_frame: [e1000e] /lib/modules/4.9.0+/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko 0xffffffffc046fc10-0xffffffffc0470bb0 (0x19c80-0x1ac20) netif_rx: [kernel] [kernel.kallsyms] 0xffffffff916f03a0-0xffffffff916f0410 (0xffffffff916f03a0-0xffffffff916f0410) usb_stor_set_xfer_buf: [usb_storage] /lib/modules/4.9.0+/kernel/drivers/usb/storage/usb-storage.ko 0xffffffffc057aea0-0xffffffffc057af19 (0xf10-0xf89) $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-79bk9pakujn4l4vq0f90klv3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/Documentation/perf-kallsyms.txt | 24 +++++++++++ tools/perf/builtin-help.c | 2 +- tools/perf/builtin-kallsyms.c | 67 ++++++++++++++++++++++++++++++ tools/perf/builtin.h | 1 + tools/perf/command-list.txt | 1 + tools/perf/perf.c | 1 + 7 files changed, 96 insertions(+), 1 deletion(-) commit 7d132caaf9392853ad637c8e6e53333cbeb99aa5 Author: Arnaldo Carvalho de Melo Date: Thu Jan 5 15:31:48 2017 -0300 perf machine: Add a kallsyms loading constructor To reduce the boilerplate for searching for functions in the running kernel and modules. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-93iqzayafpaxaguoiwjqezgz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 19 +++++++++++++++++++ tools/perf/util/machine.h | 1 + 2 files changed, 20 insertions(+) commit d5f805c09620dadc1a7806fbd46189d183f6c395 Author: Arnaldo Carvalho de Melo Date: Thu Jan 5 12:44:05 2017 -0300 tools lib subcmd: Add missing linux/kernel.h include to subcmd.h As it was getting the BUILD_BUG_ON_ZERO() definition by luck. Cc: Jiri Olsa Cc: Wang Nan Cc: Josh Poimboeuf Cc: Namhyung Kim Link: http://lkml.kernel.org/n/tip-dh71o31ar72ajck8o2x4aoae@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/parse-options.h | 1 + 1 file changed, 1 insertion(+) commit cd7f355ac4067177e0a45e7331d11472bd7fd7ca Author: Laura Abbott Date: Fri Jan 6 14:18:08 2017 -0800 perf jvmti: Create libdir directory before installing libperf-jvmti.so The install command for libperf-jvmti.so does not check if libdir exists before installing. This means that when the install command is run: install libperf-jvmti.so '/tmp/test_root/usr/lib64'; libperf-jvmti.so will get installed to /usr/lib64 as a file and break further installation. Fix this by ensuring the directory gets created first. See https://bugzilla.redhat.com/show_bug.cgi?id=1410296 Signed-off-by: Laura Abbott Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Fixes: d4dfdf00d43e ("perf jvmti: Plug compilation into perf build") Link: http://lkml.kernel.org/r/1483741088-13543-1-git-send-email-labbott@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 1 + 1 file changed, 1 insertion(+) commit 02ac5d1487115d160fab4c3e61b7edc20a945af9 Merge: 265592a ba836a6 Author: David S. Miller Date: Wed Jan 11 14:43:39 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller commit 8267b07526cabe2e2afc834a138ece8644af87ed Author: Harunobu Kurokawa Date: Wed Dec 21 03:37:06 2016 +0900 PCI: rcar: Add compatible string for r8a7796 Add support for r8a7796. Signed-off-by: Harunobu Kurokawa Signed-off-by: Yoshihiro Kaneko Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Acked-by: Simon Horman Acked-by: Rob Herring Documentation/devicetree/bindings/pci/rcar-pci.txt | 1 + 1 file changed, 1 insertion(+) commit e94888d23736cec51ba851f6e798d0eeb9ef5f41 Author: Harunobu Kurokawa Date: Fri Dec 16 12:50:04 2016 +0100 PCI: rcar: Return -ENODEV from host bridge probe when no card present R-Car PCIe does not support hotplug so it is appropriate to treat the absence of a PCIe card as an -ENODEV error. Signed-off-by: Harunobu Kurokawa [simon: updated changelog] Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 013dd3d5e1835c2cfa9c824e61465b61509afa54 Author: Shawn Lin Date: Mon Dec 12 19:50:07 2016 +0800 PCI: rockchip: Add system PM support Add system PM support for Rockchip's RC. For pre S3, the EP is configured into D3 state which guarantees the link state should be in L1. So we could send PME_Turn_Off message to the EP and wait for its ACK to make the link state into L2 or L3 without the aux-supply. This could help save more power which I think should be very important for mobile devices. As note that there is a 5s timeout for RC to wait for the PMA_ACK after sending PME_Turn_Off. Technically it should depend on the hierarchy of devices but seems PCIe core framework doesn't handle the L2/3 for S3 at all. So that means we should presume to set a default value for PME_ACK. From the bug report[1], we could find a statement that Microsoft Windows versions typically wait for 5 seconds. So we are prone to take 5s for this timeout here. [1] https://lists.launchpad.net/kernel-packages/msg123315.html Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris drivers/pci/host/pcie-rockchip.c | 106 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit 9d65f902ddcaf2f37ef58b937650805d697cfcd2 Author: Patrice Chotard Date: Wed Dec 7 10:49:51 2016 +0100 ARM: dts: STiH410-B2120: enable sti-hda at board level As sti-hda is only available on STiH410-B2120, disable it in STiH410.dtsi and enable it at board level. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih410-b2120.dts | 6 ++++++ arch/arm/boot/dts/stih410.dtsi | 1 + 2 files changed, 7 insertions(+) commit 3e91293ffccafe30daa7310526bbfbc287e0c0fd Author: Shuah Khan Date: Thu Jan 5 14:11:00 2017 -0700 selftests: x86 protection_keys remove dead code Remove commented out calls to pkey_get(). Signed-off-by: Shuah Khan tools/testing/selftests/x86/protection_keys.c | 10 ---------- 1 file changed, 10 deletions(-) commit fbb02ed8a14f54d0d07975025757e861e680e3be Author: Shuah Khan Date: Thu Jan 5 14:03:39 2017 -0700 selftests: x86 protection_keys fix unused variable compile warnings Fix unused variable compile warnings in protection_keys.c Signed-off-by: Shuah Khan tools/testing/selftests/x86/protection_keys.c | 5 ----- 1 file changed, 5 deletions(-) commit a33f9d8e02edef6c2d9cfdf0b79a743d12468438 Author: Shuah Khan Date: Thu Jan 5 13:58:54 2017 -0700 selftests: ipc add missing generated file to .gitignore Add missing generated file msgque to .gitignore Signed-off-by: Shuah Khan tools/testing/selftests/ipc/.gitignore | 1 + 1 file changed, 1 insertion(+) commit be7b89eef7b7fe647eee071a5bb44d6d853f92eb Author: Shuah Khan Date: Thu Jan 5 14:01:03 2017 -0700 selftests: gpio add .gitignore for generated files Add .gitignore for generated files Signed-off-by: Shuah Khan tools/testing/selftests/gpio/.gitignore | 1 + 1 file changed, 1 insertion(+) commit fd056f05b9fcba35b77ec5b20e553cc48884c11c Author: Rainer Hochecker Date: Wed Jan 4 19:38:55 2017 +0100 drm: add fourcc codes for 16bit R and RG This adds fourcc codes for 16bit planes required for DRM buffer export to mesa. Signed-off-by: Rainer Hochecker Link: http://patchwork.freedesktop.org/patch/msgid/20170104183855.3852-1-fernetmenta@kodi.tv Reviewed-by: Ville Syrjälä Acked-by: Christian König Signed-off-by: Ville Syrjälä include/uapi/drm/drm_fourcc.h | 7 +++++++ 1 file changed, 7 insertions(+) commit bca9085e0ae93253bc93ce218c85ac7d7e7f1831 Author: Marek Szyprowski Date: Wed Jan 11 08:44:28 2017 +0100 ARM: dts: exynos: remove Exynos4212 support (dead code) There are no Exynos4212 based boards in mainline, so there is no need to keep additional files for SoCs, which are never used. This patch removes support for Exynos4212 SoCs and moves previously shared Exynos4412 definitions to a single file to simplify future maintenance. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4212.dtsi | 133 ---- arch/arm/boot/dts/exynos4412-pinctrl.dtsi | 984 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 575 ++++++++++++++++- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 984 ------------------------------ arch/arm/boot/dts/exynos4x12.dtsi | 594 ------------------ 5 files changed, 1554 insertions(+), 1716 deletions(-) commit f0c379a1cc294fdc6b925f01249477960edc3b90 Author: Arnd Bergmann Date: Wed Jan 11 14:33:35 2017 +0100 drm: add more MMU dependencies Many DRM drivers only work with an MMU, and after the patch to enable core DRM support without MMU, we already had one fixup for many of them. The etnaviv, armada and msm drivers were missed and have the same problem: warning: (DRM_ETNAVIV) selects IOMMU_SUPPORT which has unmet direct dependencies (MMU) warning: (DRM_I915 && DRM_MSM && DRM_ETNAVIV) selects SHMEM which has unmet direct dependencies (MMU) drivers/gpu/drm/armada/armada_gem.o: In function `armada_gem_vm_fault': armada_gem.c:(.text.armada_gem_vm_fault+0x14): undefined reference to `vm_insert_pfn' arch/arm/mm/dma-mapping.c: In function '__iommu_alloc_remap': arch/arm/mm/dma-mapping.c:1390:4: error: 'VM_ARM_DMA_CONSISTENT' undeclared (first use in this function) arch/arm/mm/dma-mapping.c:1456:31: error: 'atomic_pool' undeclared (first use in this function); did you mean 'atomic_xor'? Fixes: 011cda589938 ("drm: fix compilations issues introduced by "drm: allow to use mmuless SoC"") Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC") Signed-off-by: Arnd Bergmann Acked-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170111133357.3664191-2-arnd@arndb.de drivers/gpu/drm/armada/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/gpu/drm/msm/Kconfig | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 8bc57e7f11971665b4a7886305dffcd27213d718 Author: Bhumika Goyal Date: Thu Jan 5 22:25:05 2017 +0530 rtc: constify rtc_class_ops structures Declare rtc_class_ops structures as const as they are only passed as an argument to the function devm_rtc_device_register. This argument is of type const struct rtc_class_ops *, so rtc_class_ops structures having this property can be declared const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct rtc_class_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ devm_rtc_device_register(...,&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct rtc_class_ops i; Signed-off-by: Bhumika Goyal Signed-off-by: Alexandre Belloni drivers/rtc/rtc-au1xxx.c | 2 +- drivers/rtc/rtc-bfin.c | 2 +- drivers/rtc/rtc-dm355evm.c | 2 +- drivers/rtc/rtc-imxdi.c | 2 +- drivers/rtc/rtc-ls1x.c | 2 +- drivers/rtc/rtc-mxc.c | 2 +- drivers/rtc/rtc-sh.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit a734cc9ba37188f074f8b81125db05ca00d71d00 Author: Martin Kaiser Date: Tue Jan 3 19:51:25 2017 +0100 Documentation: dt: rtc-imxdi: security violation interrupt Document the DryIce security violation interrupt. Signed-off-by: Martin Kaiser Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fef1eeb1a787653aa3fa028be1d898609bf69094 Author: Martin Kaiser Date: Tue Jan 3 19:49:50 2017 +0100 rtc: imxdi: use the security violation interrupt The DryIce chipset has a dedicated security violation interrupt that is triggered for security violations (if configured to do so). According to the publicly available imx258 reference manual, irq 56 is used for this interrupt. If an irq number is provided for the security violation interrupt, install the same handler that we're already using for the "normal" interrupt. imxdi->irq is used only in the probe function, make it a local variable. Signed-off-by: Martin Kaiser Signed-off-by: Alexandre Belloni drivers/rtc/rtc-imxdi.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 644d4c366b28faaee5d21dc1575a8b9b95a73cac Author: Emil Bartczak Date: Sun Dec 25 23:07:43 2016 +0100 rtc: mcp795: add alarm support. This patch adds alarm support. This allows to configure the chip to generate an interrupt when the alarm matches current time value. Alarm can be programmed up to one year in the future and is accurate to the second. Signed-off-by: Emil Bartczak Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mcp795.c | 171 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) commit 72877b51d0c5abf21646723f8347c5acf8fb8a45 Author: Emil Bartczak Date: Sun Dec 25 23:07:42 2016 +0100 rtc: mcp795: Add support for weekday. This patch adds support for saving/loading weekday value from the chip. Signed-off-by: Emil Bartczak Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mcp795.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 844a3073c9896dd252810e388c2fd881efb22d66 Author: Gregory CLEMENT Date: Wed Dec 21 11:28:16 2016 +0100 rtc: armada38x: Follow the new recommendation for errata implementation According to RES-3124064: The device supports CPU write and read access to the RTC time register. However, due to this restriction, read and write from/to internal RTC register may fail. Workaround: General setup: 1. Configure the RTC Mbus Bridge Timing Control register (offset 0x184A0) to value 0xFD4D4FFF Write RTC WRCLK Period to its maximum value (0x3FF) Write RTC WRCLK setup to 0x29 Write RTC WRCLK High Time to 0x53 (default value) Write RTC Read Output Delay to its maximum value (0x1F) Mbus - Read All Byte Enable to 0x1 (default value) 2. Configure the RTC Test Configuration Register (offset 0xA381C) bit3 to '1' (Reserved, Marvell internal) For any RTC register read operation: 1. Read the requested register 100 times. 2. Find the result that appears most frequently and use this result as the correct value. For any RTC register write operation: 1. Issue two dummy writes of 0x0 to the RTC Status register (offset 0xA3800). 2. Write the time to the RTC Time register (offset 0xA380C). This patch is based on the work of Shaker Daibes Signed-off-by: Gregory CLEMENT Signed-off-by: Alexandre Belloni drivers/rtc/rtc-armada38x.c | 117 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 23 deletions(-) commit e4e381133241a27d732e78be09973b89a193eaf7 Author: Andrzej Hajda Date: Wed Jan 11 09:31:40 2017 +0100 arm64: dts: exynos: Enable HDMI/TV path on Exynos5433-TM2 TV path consist of following interconnected components: - DECON_TV - display controller, - HDMI - video signal converter RGB / HDMI, - MHL - video signal converter HDMI / MHL, - DDC - i2c slave device for EDID reading (on hsi2c_11 bus). Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Tested-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit cb872bd936b7f7f0e07a077a3fd7ae7fe7dddadd Author: Andrzej Hajda Date: Wed Jan 11 09:31:39 2017 +0100 arm64: dts: exynos: Add HDMI node to Exynos5433 HDMI converts RGB/I80 signal from DECON_TV to HDMI/TMDS video stream. Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Tested-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit e80deee0a5434f29e5e8b4c020fe7960781025d9 Author: Andrzej Hajda Date: Wed Jan 11 09:31:38 2017 +0100 arm64: dts: exynos: Add DECON_TV node to Exynos5433 DECON_TV is 2nd display controller on Exynos5433, used in HDMI path or 2nd DSI path. Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Tested-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 46a049dae771b95e77ac6c823330f4a60f600236 Author: Arnd Bergmann Date: Wed Jan 11 14:39:44 2017 +0100 ALSA: hda/ca0132 - fix possible NULL pointer use gcc-7 caught what it considers a NULL pointer dereference: sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop': sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull] This is plausible from looking at the function, as we compare 'reply' to NULL earlier in it. I have not tried to analyze if there are constraints that make it impossible to hit the bug, but adding another NULL check in the end kills the warning and makes the function more robust. Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 3 +++ 1 file changed, 3 insertions(+) commit a0a74270efaa1f312bfe579ae13dfd55222d7b5b Author: Julia Lawall Date: Wed Jan 11 17:09:51 2017 +0100 video: fbdev: wm8505fb 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. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @rw@ declarer name DEVICE_ATTR; identifier x,x_show,x_store; @@ DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store); @script:ocaml@ x << rw.x; x_show << rw.x_show; x_store << rw.x_store; @@ if not (x^"_show" = x_show && x^"_store" = x_store) then Coccilib.include_match false @@ declarer name DEVICE_ATTR_RW; identifier rw.x,rw.x_show,rw.x_store; @@ - DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store); + DEVICE_ATTR_RW(x); // Signed-off-by: Julia Lawall Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/wm8505fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3accfd70e166af4956a686ffcdf414702c0a13e Author: Hans de Goede Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: simplefb: Separate clk / regulator get and enable steps Currently when a simplefb needs both clocks and regulators and one of the regulators returns -EPROBE_DEFER when we try to get it, we end up disabling the clocks. This causes the screen to go blank; and in some cases my cause hardware state to be lost resulting in the framebuffer not working at all. This commit splits the get and enable steps and only enables clocks and regulators after successfully getting all of them, fixing the disabling of the clocks which were left enabled by the firmware setting up the simplefb. Signed-off-by: Hans de Goede Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/simplefb.c | 56 ++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 16 deletions(-) commit 8aac7f34369726d1a158788ae8aff3002d5eb528 Author: Takashi Iwai Date: Wed Jan 11 17:09:50 2017 +0100 fbcon: Fix vc attr at deinit fbcon can deal with vc_hi_font_mask (the upper 256 chars) and adjust the vc attrs dynamically when vc_hi_font_mask is changed at fbcon_init(). When the vc_hi_font_mask is set, it remaps the attrs in the existing console buffer with one bit shift up (for 9 bits), while it remaps with one bit shift down (for 8 bits) when the value is cleared. It works fine as long as the font gets updated after fbcon was initialized. However, we hit a bizarre problem when the console is switched to another fb driver (typically from vesafb or efifb to drmfb). At switching to the new fb driver, we temporarily rebind the console to the dummy console, then rebind to the new driver. During the switching, we leave the modified attrs as is. Thus, the new fbcon takes over the old buffer as if it were to contain 8 bits chars (although the attrs are still shifted for 9 bits), and effectively this results in the yellow color texts instead of the original white color, as found in the bugzilla entry below. An easy fix for this is to re-adjust the attrs before leaving the fbcon at con_deinit callback. Since the code to adjust the attrs is already present in the current fbcon code, in this patch, we simply factor out the relevant code, and call it from fbcon_deinit(). Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000619 Signed-off-by: Takashi Iwai Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/fbcon.c | 67 ++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 27 deletions(-) commit dc312120b771fe6e4c4e753a73fd61e10de6d7b3 Author: Martin Kaiser Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: imxfb: always allocate 256 entries for the color map The current code calculates the number of color map entries as 1 << info->var.bits_per_pixel. For 32bpp modes, 1 << 32 is 0 when written to an int variable. As a consequence, the subsequent copying of the default (non-empty) color map into our newly allocated color map fails and imxfb's probe function returns an error. On both imx1 and imx21 platforms, the color map is used only for modes with <= 8bpp. By allocating 256 entries for the color map, we're on the safe side. Signed-off-by: Martin Kaiser Acked-by: Sascha Hauer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/imxfb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d67fa87de05ff11758d505aa5b5143ae978f4d16 Author: Bhumika Goyal Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: maxinefb: add __initdata to maxinefb_fix The object maxinefb_fix of type fb_fix_screeninfo is never referenced after initialization by maxinefb_init. In the init function, the object and one of its fields is only stored into another variable. So, the object and its fields are never referenced anywhere after initialization and therefore add __initdata to its declaration. Signed-off-by: Bhumika Goyal Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/maxinefb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a641261e999842bee7326b2d0e84bf2214f03022 Author: Kees Cook Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: matroxfb: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/matrox/matroxfb_DAC1064.c | 10 ++++++++-- drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) commit 6895aff47170894fb7ea169664ee707d730c1f1a Author: Kees Cook Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: sh_mobile_lcdcfb: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cbbd86075a7e32b6e67f77d374b9bb53841ab1c7 Author: Martin Kaiser Date: Wed Jan 11 17:09:50 2017 +0100 video: fbdev: imxfb: remove the macros for initializing the DMACR The current definitions of DMACR_HM() and DMACR_TM() are correct only for imx1, they're wrong for imx21. The macros are meant for legacy board files only, they're not applicable for boards using device tree. At the moment, there are no boards using these macros. So it should be safe to drop them rather than making them work for both imx1 and imx21, which would require a change in the platform data struct. Signed-off-by: Martin Kaiser Acked-by: Uwe Kleine-König Signed-off-by: Bartlomiej Zolnierkiewicz include/linux/platform_data/video-imxfb.h | 4 ---- 1 file changed, 4 deletions(-) commit 265592a1dfc31ecab02a960721a1f137e50afb17 Merge: 380043b 99d3132 Author: David S. Miller Date: Wed Jan 11 11:02:48 2017 -0500 Merge branch 'cls_flower-ARP' Simon Horman says: ==================== net/sched: cls_flower: Support matching ARP Add support for support matching on ARP operation, and hardware and protocol addresses for Ethernet hardware and IPv4 protocol addresses. Changes since RFC: * None other than dropping RFC designation after positive feedback from Jiri ==================== Signed-off-by: David S. Miller commit 99d31326cbe6951872af5c8a6bc2679388a4d9ef Author: Simon Horman Date: Wed Jan 11 14:05:43 2017 +0100 net/sched: cls_flower: Support matching on ARP Support matching on ARP operation, and hardware and protocol addresses for Ethernet hardware and IPv4 protocol addresses. Example usage: tc qdisc add dev eth0 ingress tc filter add dev eth0 protocol arp parent ffff: flower indev eth0 \ arp_op request arp_sip 10.0.0.1 action drop tc filter add dev eth0 protocol rarp parent ffff: flower indev eth0 \ arp_op reply arp_tha 52:54:3f:00:00:00/24 action drop Signed-off-by: Simon Horman Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 11 ++++++++++ net/sched/cls_flower.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 55733350e5e8b70c5e54a30dbf98148c695f21f5 Author: Simon Horman Date: Wed Jan 11 14:05:42 2017 +0100 flow disector: ARP support Allow dissection of (R)ARP operation hardware and protocol addresses for Ethernet hardware and IPv4 protocol addresses. There are currently no users of FLOW_DISSECTOR_KEY_ARP. A follow-up patch will allow FLOW_DISSECTOR_KEY_ARP to be used by the flower classifier. Signed-off-by: Simon Horman Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/flow_dissector.h | 19 +++++++++++++++ net/core/flow_dissector.c | 57 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit 25dc3bbc55a695ae7a007c17df74810a49904a8d Author: Fabio Estevam Date: Mon Jan 9 17:30:02 2017 -0200 serial: fsl-imx-uart.txt: Remove generic property 'uart-has-rtscts' is a generic serial property and it is described at Documentation/devicetree/bindings/serial/serial.txt, so remove it from the specific fsl-imx-uart binding documentation. While at it, add a note pointing to the serial.txt file, which contains the complete list of generic serial bindings. Signed-off-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 380043b9dee4579174027f45d4554459d6bb4c38 Author: Keerthy Date: Wed Jan 11 09:03:29 2017 +0530 net: netcp: correct netcp_get_stats function signature Commit: bc1f44709cf2 - net: make ndo_get_stats64 a void function and Commit: 6a8162e99ef3 - net: netcp: store network statistics in 64 bits. The commit 6a8162e99ef3 adds ndo_get_stats64 function as per old signature which causes compilation error: drivers/net/ethernet/ti/netcp_core.c:1951:28: error: initialization from incompatible pointer type .ndo_get_stats64 = netcp_get_stats, Hence correct netcp_get_stats function signature as per the latest definition. Signed-off-by: Keerthy Fixes: 6a8162e99ef344fc ("net: netcp: store network statistics in 64 bits") Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f0d50460753d1444e681dc59352773f120846912 Author: Russell King Date: Tue Jan 10 22:53:28 2017 +0000 gpio: mvebu: fix warning when building on 64-bit Casting a pointer to an int is not portable, and provokes a compiler warning. Cast to unsigned long instead to avoid the warning. drivers/gpio/gpio-mvebu.c: In function 'mvebu_gpio_probe': drivers/gpio/gpio-mvebu.c:662:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] soc_variant = (int) match->data; ^ This will be needed when building gpio-mvebu for Armada 7k/8k ARM64 SoCs. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 054ccdef8b2850be3aee8cbd49000e6d61f837b2 Author: Steve Longerbeam Date: Tue Jan 10 11:29:51 2017 -0800 gpio: pca953x: Add optional reset gpio control Add optional reset-gpios pin control. If present, de-assert the specified reset gpio pin to bring the chip out of reset. v2: - Specify that reset signal to PCA953x chip is active low, in binding doc. - reorder includes in gpio-pca953x.c. - remove dev_err() on devm_gpiod_get_optional() error return. Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Steve Longerbeam Reviewed-by: Andy Shevchenko Reviewed-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ drivers/gpio/gpio-pca953x.c | 9 +++++++++ 2 files changed, 13 insertions(+) commit 566088d1d2a09aab3d96ce577881afe5520281a4 Author: Marek Vasut Date: Tue Jan 10 22:32:22 2017 +0100 devicetree: Add Fujitsu Ltd. vendor prefix The vendor prefix for Fujitsu is used in the tree, but it's still missing from the documentation, so add it. Fujitsu Ltd. is a japanese ICT company, http://www.fujitsu.com Signed-off-by: Marek Vasut Cc: Rob Herring Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 56d9e4a76039afd504919cc5ec329fb0ce35812f Author: Icenowy Zheng Date: Tue Jan 3 23:16:27 2017 +0800 pinctrl: sunxi: add driver for V3s SoC V3s SoC features only a pin controller (for the lack of CPUs part). Add a driver for this controller. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c | 321 ++++++++++++++++++++++++++++++ 3 files changed, 326 insertions(+) commit 3d301cb938c158f2e4b23cf7c176e3816c86dfbb Author: Shuah Khan Date: Thu Jan 5 14:32:36 2017 -0700 gpio: tools: add .gitignore for generated files Add .gitignore for generated files. Signed-off-by: Shuah Khan [Dropped include dir] Signed-off-by: Linus Walleij tools/gpio/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit fb505747c06b8894bccb18457fd11bad047384f4 Author: Stephen Boyd Date: Mon Jan 9 11:47:44 2017 -0800 gpio: Remove impossible checks on container_of() result container_of() does pointer math on the pointer that's passed in. If it were to return a NULL pointer the value passed in would need to be perfectly offset from 0 to make that so. Remove these checks because they don't make sense. Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fe02e1ccaf004072b3ee17c43270cd97a62b522e Merge: 9f91484 592050b Author: David S. Miller Date: Wed Jan 11 09:55:55 2017 -0500 Merge branch 'dsa-phys_port_name' Florian Fainelli says: ==================== net: dsa: Implement ndo_get_phys_port_name() This patch series implements ndo_get_phys_port_name() so we can revert ndo_get_phys_id() which was (ab)used in the DSA layer. ==================== Signed-off-by: David S. Miller commit 592050b2541407d033da18226d3644644832d082 Author: Florian Fainelli Date: Tue Jan 10 12:32:37 2017 -0800 Revert "net: dsa: Implement ndo_get_phys_port_id" This reverts commit 3a543ef479868e36c95935de320608a7e41466ca ("net: dsa: Implement ndo_get_phys_port_id") since it misuses the purpose of ndo_get_phys_port_id(). We have ndo_get_phys_port_name() to do the correct thing for us now. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/dsa/slave.c | 10 ---------- 1 file changed, 10 deletions(-) commit 44bb765cf07ab6622e6fdf4bce546b43bd20faee Author: Florian Fainelli Date: Tue Jan 10 12:32:36 2017 -0800 net: dsa: Implement ndo_get_phys_port_name() Return the physical port number of a DSA created network device using ndo_get_phys_port_name(). Signed-off-by: Florian Fainelli Tested-by: Vivien Didelot Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/dsa/slave.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c781c978e784c50dcd7cb312fe17f5281923f55b Author: Chris Wilson Date: Wed Jan 11 14:08:58 2017 +0000 drm/i915: Add a sanity check that no request is submitted in the middle It is an error to start a new request on the same timeline (ringbuffer) as the current one before the current is submitted. If there are two requests emitting to the ringbuffer at the same time, the operation is undefined. We can catch this by checking for the timeline having a later seqno than ours when we come to submit our request. Currently we have this check at the end of __i915_add_request, but having an early check as well isolates a failure in the caller versus a failure in sealing the request (i.e. from inside __i915_add_request itself). For example, CI is currently tripping over this late assertion on ctg/ilk: [ 100.329399] [IGT] gem_cs_tlb: starting subtest basic-default [ 100.336333] ------------[ cut here ]------------ [ 100.336341] kernel BUG at drivers/gpu/drm/i915/i915_gem_request.c:908! [ 100.336347] invalid opcode: 0000 [#1] PREEMPT SMP [ 100.336351] Modules linked in: snd_hda_intel i915 snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm coretemp mei_me lpc_ich mei e1000e ptp pps_core [last unloaded: i915] [ 100.336373] CPU: 0 PID: 6308 Comm: gem_cs_tlb Tainted: G U 4.10.0-rc3-CI-CI_DRM_2045+ #1 [ 100.336380] Hardware name: LENOVO 7465CTO/7465CTO, BIOS 6DET44WW (2.08 ) 04/22/2009 [ 100.336386] task: ffff88012b738040 task.stack: ffffc90000560000 [ 100.336441] RIP: 0010:__i915_add_request+0x4aa/0x510 [i915] [ 100.336445] RSP: 0018:ffffc90000563ac0 EFLAGS: 00010212 [ 100.336451] RAX: 0000000000005d52 RBX: ffff880133bb84c0 RCX: 0000000000000001 [ 100.336456] RDX: 0000000080000001 RSI: ffff88012b738860 RDI: 00000000ffffffff [ 100.336461] RBP: ffffc90000563b00 R08: ffff880133bb8780 R09: 0000000000000000 [ 100.336466] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88012f53d950 [ 100.336472] R13: ffff88012a2b0af8 R14: ffff88012a5b0008 R15: ffff88012f53d960 [ 100.336477] FS: 00007f0d19da38c0(0000) GS:ffff88013bc00000(0000) knlGS:0000000000000000 [ 100.336483] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 100.336488] CR2: 00007f0d17706000 CR3: 000000012aa3e000 CR4: 00000000000406f0 [ 100.336496] Call Trace: [ 100.336527] i915_gem_switch_to_kernel_context+0x131/0x1b0 [i915] [ 100.336559] i915_gem_evict_vm+0x202/0x2b0 [i915] [ 100.336590] i915_gem_execbuffer_reserve.isra.9+0x3ae/0x440 [i915] [ 100.336623] i915_gem_do_execbuffer.isra.15+0x6d9/0x1b20 [i915] [ 100.336656] i915_gem_execbuffer2+0xc0/0x250 [i915] [ 100.336666] drm_ioctl+0x200/0x450 [ 100.336697] ? i915_gem_execbuffer+0x330/0x330 [i915] [ 100.336708] do_vfs_ioctl+0x90/0x6e0 [ 100.336716] ? up_read+0x1a/0x40 [ 100.336723] ? trace_hardirqs_on_caller+0x122/0x1b0 [ 100.336730] SyS_ioctl+0x3c/0x70 [ 100.336738] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 100.336745] RIP: 0033:0x7f0d187cb357 [ 100.336750] RSP: 002b:00007ffe0b2f7c28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 100.336761] RAX: ffffffffffffffda RBX: 00007ffe0b2f7d60 RCX: 00007f0d187cb357 [ 100.336768] RDX: 00007ffe0b2f7d00 RSI: 0000000040406469 RDI: 0000000000000003 [ 100.336775] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000022 [ 100.336782] R10: 0000000000000007 R11: 0000000000000246 R12: 0000000000000002 [ 100.336789] R13: 0000000000419101 R14: 00007ffe0b2f7d60 R15: 00007ffe0b2f7d50 [ 100.336797] Code: 5f 74 1e e9 d4 fb ff ff e8 bc 1e 9c e0 e9 ae fb ff ff 4c 89 e7 e8 77 22 fd ff e9 88 fd ff ff 0f 0b e8 a3 1e 9c e0 e9 b1 fb ff ff <0f> 0b 0f 0b e8 fd af ab e0 85 c0 75 c2 48 c7 c2 80 2c 71 a0 be [ 100.336877] RIP: __i915_add_request+0x4aa/0x510 [i915] RSP: ffffc90000563ac0 [ 100.336886] ---[ end trace 22b36545479e5eb7 ]--- Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170111140858.1922-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9f91484f6fcc28f9b5ebe11755e7488e39ea75e4 Author: Vivien Didelot Date: Mon Jan 9 18:13:51 2017 -0500 net: dsa: make "label" property optional for dsa2 In the new DTS bindings for DSA (dsa2), the "ethernet" and "link" phandles are respectively mandatory and exclusive to CPU port and DSA link device tree nodes. Simplify dsa2.c a bit by checking the presence of such phandle instead of checking the redundant "label" property. Then the Linux philosophy for Ethernet switch ports is to expose them to userspace as standard NICs by default. Thus use the standard enumerated "eth%d" device name if no "label" property is provided for a user port. This allows to save DTS files from subjective net device names. If one wants to rename an interface, udev rules can be used as usual. Of course the current behavior is unchanged, and the optional "label" property for user ports has precedence over the enumerated name. Signed-off-by: Vivien Didelot Acked-by: Uwe Kleine-König Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/dsa.txt | 20 ++++++++----------- net/dsa/dsa2.c | 24 ++++------------------- 2 files changed, 12 insertions(+), 32 deletions(-) commit 1a08e3d9e0ac4577ba89dbdb38f593fe050f88fc Author: Laura Abbott Date: Tue Jan 10 13:35:46 2017 -0800 drivers: firmware: psci: Use __pa_symbol for kernel symbol __pa_symbol is technically the macro that should be used for kernel symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL which will do bounds checking. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon drivers/firmware/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f6236aa1c48e06b10a2fe0386ac4114b438622 Author: Laura Abbott Date: Tue Jan 10 13:35:45 2017 -0800 mm/usercopy: Switch to using lm_alias The usercopy checking code currently calls __va(__pa(...)) to check for aliases on symbols. Switch to using lm_alias instead. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Acked-by: Kees Cook Signed-off-by: Laura Abbott Signed-off-by: Will Deacon mm/usercopy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c6a84a3f4558a6115fef1b59343c7ae56b3abc3 Author: Laura Abbott Date: Tue Jan 10 13:35:44 2017 -0800 mm/kasan: Switch to using __pa_symbol and lm_alias __pa_symbol is the correct API to find the physical address of symbols. Switch to it to allow for debugging APIs to work correctly. Other functions such as p*d_populate may call __pa internally. Ensure that the address passed is in the linear region by calling lm_alias. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon mm/kasan/kasan_init.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit b6e92aa81038ce57d298a87b4c44285a1d456c3e Author: Laura Abbott Date: Tue Jan 10 13:35:43 2017 -0800 kexec: Switch to __pa_symbol __pa_symbol is the correct api to get the physical address of kernel symbols. Switch to it to allow for better debug checking. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Acked-by: "Eric W. Biederman" Signed-off-by: Laura Abbott Signed-off-by: Will Deacon kernel/kexec_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 568c5fe5a54f2654f5a4c599c45b8a62ed9a2013 Author: Laura Abbott Date: Tue Jan 10 13:35:42 2017 -0800 mm: Introduce lm_alias Certain architectures may have the kernel image mapped separately to alias the linear map. Introduce a macro lm_alias to translate a kernel image symbol into its linear alias. This is used in part with work to add CONFIG_DEBUG_VIRTUAL support for arm64. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon include/linux/mm.h | 4 ++++ 1 file changed, 4 insertions(+) commit 2dece445b6dbdaa3d94f38ef44aa1b63bc2a6bb9 Author: Laura Abbott Date: Tue Jan 10 13:35:41 2017 -0800 mm/cma: Cleanup highmem check 6b101e2a3ce4 ("mm/CMA: fix boot regression due to physical address of high_memory") added checks to use __pa_nodebug on x86 since CONFIG_DEBUG_VIRTUAL complains about high_memory not being linearlly mapped. arm64 is now getting support for CONFIG_DEBUG_VIRTUAL as well. Rather than add an explosion of arches to the #ifdef, switch to an alternate method to calculate the physical start of highmem using the page before highmem starts. This avoids the need for the #ifdef and extra __pa_nodebug calls. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon mm/cma.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit fa5b6ec9e5274aeae2326e25995506a953e5f878 Author: Laura Abbott Date: Tue Jan 10 13:35:40 2017 -0800 lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL DEBUG_VIRTUAL currently depends on DEBUG_KERNEL && X86. arm64 is getting the same support. Rather than add a list of architectures, switch this to ARCH_HAS_DEBUG_VIRTUAL and let architectures select it as appropriate. Acked-by: Ingo Molnar Reviewed-by: Mark Rutland Tested-by: Mark Rutland Suggested-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/x86/Kconfig | 1 + lib/Kconfig.debug | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 3775dac1bc385e8d7bfdbc68e8478e4b2bae1955 Author: Dan Carpenter Date: Sat Jan 7 09:32:15 2017 +0300 pinctrl/amd: white space cleanups in amd_gpio_dbg_show() We accidentally deleted two tabs from the first line, but even with that fixed the conditions were not really kernel style. Put the && at the end of the line so we can align the condition clauses. Also add spaces around the "+" operator. Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6e8b66c1b7aeb95cff643f358299cf1c5c630abb Author: Fabio Estevam Date: Thu Jan 5 22:55:43 2017 -0200 pinctrl: imx7d-pinctrl: Fix a typo Fix a typo in "Peripherals". Signed-off-by: Fabio Estevam Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2104d12d11206b9477df13898c87aa19ad57a680 Author: Bjorn Andersson Date: Thu Jan 5 08:07:55 2017 -0800 pinctrl: Drop error prints on kzalloc() failure Upon failing kzalloc() will print an error message in the log, so there's no need for additional printouts. Also standardizes the "!ptr" vs "ptr == NULL" while I'm touching those lines. Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 476e3e1d0555a9170e050a9708f883814ce79354 Author: David Lechner Date: Thu Jan 5 17:43:41 2017 -0600 pinctrl: da850-pupd: Add to module device table This adds the pintrol-da850-pupd driver to the module device table so that udev will automatically bind the driver to the device. Signed-off-by: David Lechner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-da850-pupd.c | 1 + 1 file changed, 1 insertion(+) commit 0612413fbeedd4602e66e221bbe70dcd2b925ee8 Author: Andy Shevchenko Date: Tue Jan 10 22:11:39 2017 +0200 pinctrl: baytrail: Convert to use devm_*() This simplifies error handling and allows us to drop error path handlers completely. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 7acec26cec5aa75e0dc54da1fb0b1f8acf575273 Author: Jorge Ramirez-Ortiz Date: Mon Jan 9 15:25:49 2017 +0100 cfg80211: wext does not need to set monitor channel in managed mode There is not a valid reason to attempt setting the monitor channel while in managed mode. Since this code path only deals with this mode, remove the code block. Johannes: I'll note that the comment indicated it was for backward compatibility, but the code wasn't functional since switching the monitor channel isn't supported (any more?) when in managed mode, as that mode owns the channel configuration. Additionally, since monitor can't be done on a managed mode interface, this would only have had any effect to start with if a separate monitor interface is present, in which case it's better to change the channel through that anyway, if even possible. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Johannes Berg net/wireless/wext-sme.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit f25c3aa9085e9625f3dcc20152dd780d01a54c5a Author: Mika Westerberg Date: Tue Jan 10 17:31:57 2017 +0300 pinctrl: intel: Convert to use devm_gpiochip_add_data() This simplifies error handling and allows us to drop intel_pinctrl_remove() completely. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-broxton.c | 1 - drivers/pinctrl/intel/pinctrl-intel.c | 23 ++++------------------- drivers/pinctrl/intel/pinctrl-intel.h | 2 -- drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 1 - 4 files changed, 4 insertions(+), 23 deletions(-) commit 606fec956c0e8c53bbad19c918e43147daa76429 Author: Chris Wilson Date: Wed Jan 11 11:23:12 2017 +0000 drm/i915: Prefer random replacement before eviction search Performing an eviction search can be very, very slow especially for a range restricted replacement. For example, a workload like gem_concurrent_blit will populate the entire GTT and then cause aperture thrashing. Since the GTT is a mix of active and inactive tiny objects, we have to search through almost 400k objects before finding anything inside the mappable region, and as this search is required before every operation performance falls off a cliff. Instead of performing the full search, we do a trial replacement of the node at a random location fitting the specified restrictions. We lose the strict LRU property of the GTT in exchange for avoiding the slow search (several orders of runtime improvement for gem_concurrent_blit 4KiB-global-gtt, e.g. from 5000s to 20s). The loss of LRU replacement is (later) mitigated firstly by only doing replacement if we find no freespace and secondly by execbuf doing a PIN_NONBLOCK search first before it starts thrashing (i.e. the random replacement will only occur from the already inactive set of objects). v2: Ascii-art, and check preconditionst v3: Rephrase final sentence in comment to explain why we don't bother with if (i915_is_ggtt(vm)) for preferring random replacement. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170111112312.31493-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 59 ++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit 625d988acc28f3fe1d44f3798426561c17387a59 Author: Chris Wilson Date: Wed Jan 11 11:23:11 2017 +0000 drm/i915: Extract reserving space in the GTT to a helper Extract drm_mm_reserve_node + calling i915_gem_evict_for_node into its own routine so that it can be shared rather than duplicated. v2: Kerneldoc Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: igvt-g-dev@lists.01.org Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170111112312.31493-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 ++-- drivers/gpu/drm/i915/i915_gem_evict.c | 33 +++++++++++---------- drivers/gpu/drm/i915/i915_gem_gtt.c | 52 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 5 ++++ drivers/gpu/drm/i915/i915_gem_stolen.c | 7 ++--- drivers/gpu/drm/i915/i915_trace.h | 16 +++++------ drivers/gpu/drm/i915/i915_vgpu.c | 33 ++++++++------------- drivers/gpu/drm/i915/i915_vma.c | 16 ++++------- 8 files changed, 106 insertions(+), 61 deletions(-) commit e007b19d7ba7424735fd4f17a355b145ae153e4c Author: Chris Wilson Date: Wed Jan 11 11:23:10 2017 +0000 drm/i915: Use the MRU stack search after evicting When we evict from the GTT to make room for an object, the hole we create is put onto the MRU stack inside the drm_mm range manager. On the next search pass, we can speed up a PIN_HIGH allocation by referencing that stack for the new hole. v2: Pull together the 3 identical implements (ahem, a couple were outdated) into a common routine for allocating a node and evicting as necessary. v3: Detect invalid calls to i915_gem_gtt_insert() v4: kerneldoc Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170111112312.31493-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/aperture_gm.c | 33 +++------ drivers/gpu/drm/i915/i915_gem_gtt.c | 121 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_gem_gtt.h | 5 ++ drivers/gpu/drm/i915/i915_vma.c | 40 ++--------- 4 files changed, 119 insertions(+), 80 deletions(-) commit 6cc7fbdf8d931eefa2d0aabf0d2840e94ba09ae5 Author: Alexandre Belloni Date: Tue Sep 27 12:37:15 2016 +0200 ARM: at91: pm: remove useless extern definition at91_ramc_base is local to pm.c, remove its definition in pm.h Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 2 +- arch/arm/mach-at91/pm.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit fc1e65c3a858fe9a454da9e9fd180834ed089cbd Author: Harunobu Kurokawa Date: Wed Jan 11 04:32:43 2017 +0000 ASoC: ak4642: Replace mdelay function to msleep Replace mdelay to msleep to avoid busy loop on ak4642_lout_event(). Otherwise, sometimes playback doesn't work correctly when pulseaudio was used. Signed-off-by: Harunobu Kurokawa Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4642.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e567c35f4909b6e752f63412ed6038c4d9aa9ede Author: Andy Shevchenko Date: Tue Jan 3 19:01:18 2017 +0200 gpiolib: Update documentation of struct acpi_gpio_info It seems the code had been changed, but description left untouched. Update description of the struct acpi_gpio_info and relative comments accordingly. Fixes: commit 52044723cd27 ("ACPI / gpio: Add irq_type when a GPIO is used as an interrupt") Cc: Christophe RICARD Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 5 ++--- drivers/gpio/gpiolib.h | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5e4e6fb3ff31b44d94ffcc34ae4f3af476104863 Author: Andy Shevchenko Date: Tue Jan 3 19:01:17 2017 +0200 gpiolib: Switch to for_each_set_bit() The macro for_each_set_bit() effectively looks up to the next set bit in array of bits. Instead of open coding that switch to for_each_set_bit() in gpio_chip_set_multiple(). While here, make gpio_chip_set_multiple() non-destructive against its parameters. We are safe since all callers, i.e. gpiod_set_array_value_complex(), handle that already. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit bb5b06750f1d9b2d632d942d8a72b35a4dd930b9 Author: Keerthy Date: Wed Jan 4 13:56:28 2017 +0530 gpio: davinci: Remove redundant members davinci_gpio_controller stuct davinci_gpio_controller struct has set_data, in_data, clr_data members that are assigned and never used. Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 3 --- include/linux/platform_data/gpio-davinci.h | 3 --- 2 files changed, 6 deletions(-) commit 113ccc38378b6f0b24c0993040c6044e35163a51 Author: Luis R. Rodriguez Date: Fri Dec 16 03:10:36 2016 -0800 firmware: revamp firmware documentation Understanding this code is getting out of control without any notes. Give the firmware_class driver a much needed documentation love, and while at it convert it to the new sphinx documentation format. v2: typos and small fixes Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/firmware/built-in-fw.rst | 38 ++++ Documentation/driver-api/firmware/core.rst | 16 ++ .../driver-api/firmware/direct-fs-lookup.rst | 30 ++++ .../driver-api/firmware/fallback-mechanisms.rst | 195 +++++++++++++++++++++ .../driver-api/firmware/firmware_cache.rst | 51 ++++++ .../driver-api/firmware/fw_search_path.rst | 26 +++ Documentation/driver-api/firmware/index.rst | 16 ++ Documentation/driver-api/firmware/introduction.rst | 27 +++ Documentation/driver-api/firmware/lookup-order.rst | 18 ++ .../driver-api/firmware/request_firmware.rst | 56 ++++++ Documentation/driver-api/index.rst | 1 + Documentation/firmware_class/README | 128 -------------- 12 files changed, 474 insertions(+), 128 deletions(-) commit 880444e214cfd293a2e8cc4bd3505f7ffa6ce33a Author: Luis R. Rodriguez Date: Fri Dec 16 03:10:35 2016 -0800 selftests: firmware: send expected errors to /dev/null Error that we expect should not be spilled to stdout. Without this we get: ./fw_filesystem.sh: line 58: printf: write error: Invalid argument ./fw_filesystem.sh: line 63: printf: write error: No such device ./fw_filesystem.sh: line 69: echo: write error: No such file or directory ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works With it: ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_filesystem.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f5786313f091a19eff934d1074642906c71c0c66 Author: Luis R. Rodriguez Date: Fri Dec 16 03:10:34 2016 -0800 selftests: firmware: only modprobe if driver is missing No need to load test_firmware if its already there. Also use a more generic form to recommend what is required to be built. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_filesystem.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 8a18f4284ec94ec56189e7f14495359d3b892a52 Author: Chen Yu Date: Wed Dec 21 17:24:55 2016 +0800 platform: Print the resource range if device failed to claim Sometimes we have the following error message: platform MSFT0101:00: failed to claim resource 1 acpi MSFT0101:00: platform device creation failed: -16 But there is not enough information to figure out which resource range failed to claim. Thus print the resource range at first-place thus /proc/iomem or ioports should tell us who already claimed this resource, then the driver bug or incorrect resource assignment which is running into this conflict can be diagnosed: platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff] acpi MSFT0101:00: platform device creation failed: -16 Suggested-by: Len Brown Reported-by: Wendy Wang Signed-off-by: Chen Yu Reviewed-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0244a8df15d8caee8831872b6fc97b676cb15bd Author: Jason A. Donenfeld Date: Thu Dec 15 19:55:54 2016 +0100 kref: prefer atomic_inc_not_zero to atomic_add_unless On most platforms, there exists this ifdef: #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) This makes this patch functionally useless. However, on PPC, there is actually an explicit definition of atomic_inc_not_zero with its own assembly that is slightly more optimized than atomic_add_unless. So, this patch changes kref to use atomic_inc_not_zero instead, for PPC and any future platforms that might provide an explicit implementation. This also puts this usage of kref more in line with a verbatim reading of the examples in Paul McKenney's paper [1] in the section titled "2.4 Atomic Counting With Check and Release Memory Barrier", which uses atomic_inc_not_zero. [1] http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2167.pdf Signed-off-by: Jason A. Donenfeld Reviewed-by: Thomas Hellstrom Reviewed-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman include/linux/kref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e41746b0dd51f353630112558835aa62c1eb883e Author: Jakub Kicinski Date: Wed Dec 14 15:33:39 2016 +0000 debugfs: improve formatting of debugfs_real_fops() Type of debugfs_real_fops() is longer than parameters and the name, so there is no way to break the declaration nicely. We have to go over 80 characters. Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman include/linux/debugfs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b0f2d7d546d37697d3f50753904f6f0c549b62bc Author: Martyn Welch Date: Sat Dec 10 23:10:41 2016 +0000 VME: Remove node entry from vme_driver The vme_driver structure currently has a "node" entry. This entry is never used and it's intended purpose has been lost to the mists of time. Remove the entry from vme_driver to avoid confusion. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman include/linux/vme.h | 1 - 1 file changed, 1 deletion(-) commit e1873a479a4ac536661ad951a4b10fe1b26cec7b Author: Cao jin Date: Mon Dec 19 15:23:56 2016 +0800 genwqe: drop .link_reset() In AER recovery, pci_error_handlers.link_reset() is never called, drop it now. Signed-off-by: Cao jin Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_base.c | 1 - 1 file changed, 1 deletion(-) commit 3755584a91c1cb1e50dd24a456e2953fbd276adf Author: Baoyou Xie Date: Fri Jan 6 17:16:04 2017 +0800 soc: zte: pm_domains: Add support for zx296718 This patch introduces the power domain driver of zx296718 which belongs to zte's zx2967 family. Signed-off-by: Baoyou Xie Reviewed-by: Jun Nie Signed-off-by: Shawn Guo drivers/soc/zte/Makefile | 1 + drivers/soc/zte/zx296718_pm_domains.c | 182 ++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) commit 4c2c2e39713b8cfbb73d304c830e883f5b2ad9ec Author: Baoyou Xie Date: Fri Jan 6 17:16:03 2017 +0800 soc: zte: pm_domains: Prepare for supporting ARMv8 zx2967 family The ARMv8 zx2967 family (296718, 296716 etc) uses different value for controlling the power domain on/off registers, Choose the value depending on the compatible. Multiple domains are prepared for the family, this patch prepares the common functions. Signed-off-by: Baoyou Xie Signed-off-by: Shawn Guo drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/zte/Kconfig | 13 ++++ drivers/soc/zte/Makefile | 4 + drivers/soc/zte/zx2967_pm_domains.c | 143 ++++++++++++++++++++++++++++++++++++ drivers/soc/zte/zx2967_pm_domains.h | 44 +++++++++++ 6 files changed, 206 insertions(+) commit eea1d99b900fe19dce3042dac555c270221be147 Author: Baoyou Xie Date: Fri Jan 6 17:16:02 2017 +0800 soc: zte: Add header for PM domains specifiers This patch adds header with values used for ZTE 2967 SoC's power domain driver. Signed-off-by: Baoyou Xie Signed-off-by: Shawn Guo include/dt-bindings/soc/zte,pm_domains.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 15e2dcd675e4f4b63aa8a0cd9fabe3b356135c85 Author: Baoyou Xie Date: Fri Jan 6 17:16:01 2017 +0800 MAINTAINERS: add zx2967 SoC drivers to ARM ZTE architecture Add the ZTE SoC drivers as maintained by ARM ZTE architecture maintainers, as they're parts of the core IP. By the way, this patch adds the maintainer for ARM ZTE architecture to Baoyou Xie. Signed-off-by: Baoyou Xie Signed-off-by: Shawn Guo MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 4a4cd0ccd47a455dc6e2750ede68364a07605d7a Author: Baoyou Xie Date: Fri Jan 6 17:16:00 2017 +0800 dt-bindings: zte: add bindings document for zx2967 power domain controller This patch adds device tree bindings document for ZTE zx2967 family power domain controller. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Signed-off-by: Shawn Guo .../devicetree/bindings/soc/zte/pd-2967xx.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 95b8c64afad824014178df6b396c6ba0f4b1b80a Author: Chris Wilson Date: Tue Jan 10 14:40:31 2017 +0000 drm: Fix error handling in drm_mm eviction kselftest drivers/gpu/drm/selftests/test-drm_mm.c:1277 evict_everything() warn: calling list_del() inside list_for_each The list_del() inside the error handling in the eviction loop is overkill. We have to undo the eviction scan to return the drm_mm back to a recoverable state, so have to iterate over the full list, but we only want to report the error once and once we have an error we can return early. Reported-by: Dan Carpenter Fixes: 560b32842912 ("drm: kselftest for drm_mm and eviction") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170110144031.7609-1-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/test-drm_mm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit f2cfa58b136e4b06a9b9db7af5ef62fbb5992f62 Author: Max Bires Date: Tue Jan 3 08:18:07 2017 -0800 char: lack of bool string made CONFIG_DEVPORT always on Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This esnured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible. Signed-off-by: Max Bires Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/char/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 223e4b93e61f7538681632bfb19edd4f27a0c319 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:53 2017 -0500 scsi: megaraid_sas: driver version upgrade Upgrade driver version. Signed-off-by: Sasikumar Chandrasekaran 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 ede7c3ce82dc4001bbab33dddebab8c089f309e0 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:52 2017 -0500 scsi: megaraid_sas: Implement the PD Map support for SAS3.5 Generic Megaraid Controllers Update Linux driver to use new pdTargetId field for JBOD target ID Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 105 +++++++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_base.c | 3 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 ++ drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 +- 4 files changed, 89 insertions(+), 28 deletions(-) commit b71b49c209facf8fec3778142ae5e45bb6ca4afc Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:51 2017 -0500 scsi: megaraid_sas: ldio_outstanding variable is not decremented in completion path ldio outstanding variable needs to be decremented in io completion path for iMR dual queue depth Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3e5eadb1a881bea2e3fa41f5ae7cdbfa36222d37 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:50 2017 -0500 scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth Large SEQ IO workload should sent as non fast path commands Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 8 +++++ drivers/scsi/megaraid/megaraid_sas_base.c | 48 +++++++++++++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_fp.c | 7 +++++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 16 ++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 5 files changed, 74 insertions(+), 7 deletions(-) commit 9581ebebbe351d99579e8701e238c2771ccdae93 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:49 2017 -0500 scsi: megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities The Megaraid driver has to support the SAS3.5 Generic Megaraid Controllers Firmware functionality. Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 53 ++++++++++++++--------------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 19 ++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 3 files changed, 37 insertions(+), 36 deletions(-) commit d889344e4e59eb962894ab3b64042dc37a2d8b39 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:48 2017 -0500 scsi: megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid Controllers SAS3.5 Generic Megaraid Controllers FW will support new dynamic RaidMap to have different sizes for different number of supported VDs. Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 7 + drivers/scsi/megaraid/megaraid_sas_base.c | 60 ++++-- drivers/scsi/megaraid/megaraid_sas_fp.c | 301 ++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 225 ++++++++++++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 240 ++++++++++++++++++---- 5 files changed, 695 insertions(+), 138 deletions(-) commit 69c337c0f8d74d71e085efa8869be9fc51e5962b Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:47 2017 -0500 scsi: megaraid_sas: SAS3.5 Generic Megaraid Controllers Fast Path for RAID 1/10 Writes To improve RAID 1/10 Write performance, OS drivers need to issue the required Write IOs as Fast Path IOs (after the appropriate checks allowing Fast Path to be used) to the appropriate physical drives (translated from the OS logical IO) and wait for all Write IOs to complete. Design: A write IO on RAID volume will be examined if it can be sent in Fast Path based on IO size and starting LBA and ending LBA falling on to a Physical Drive boundary. If the underlying RAID volume is a RAID 1/10, driver issues two fast path write IOs one for each corresponding physical drive after computing the corresponding start LBA for each physical drive. Both write IOs will have the same payload and are posted to HW such that replies land in the same reply queue. If there are no resources available for sending two IOs, driver will send the original IO from SCSI layer to RAID volume through the Firmware. Based on PCI bandwidth and write payload, every second this feature is enabled/disabled. When both IOs are completed by HW, the resources will be released and SCSI IO completion handler will be called. Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_fp.c | 31 ++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 335 ++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.h | 15 +- 4 files changed, 329 insertions(+), 53 deletions(-) commit fdd84e2514b0157219720cf8f3f55757938a39cd Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:46 2017 -0500 scsi: megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing Detect sequential Write IOs and pass the hint that it is part of sequential stream to help HBA Firmware do the Full Stripe Writes. For read IOs on certain RAID volumes like Read Ahead volumes,this will help driver to send it to Firmware even if the IOs can potentially be sent to hardware directly (called fast path) bypassing firmware. Design: 8 streams are maintained per RAID volume as per the combined firmware/driver design. When there is no stream detected the LRU stream is used for next potential stream and LRU/MRU map is updated to make this as MRU stream. Every time a stream is detected the MRU map is updated to make the current stream as MRU stream. Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 43 +++++++- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 165 +++++++++++++++++++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 117 +++++++++++++++++++- 5 files changed, 297 insertions(+), 31 deletions(-) commit 45d446038c7b93c40b2fe5ba0e95380f19e0493e Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:45 2017 -0500 scsi: megaraid_sas: EEDP Escape Mode Support for SAS3.5 Generic Megaraid Controllers An UNMAP command on a PI formatted device will leave the Logical Block Application Tag and Logical Block Reference Tag as all F's (for those LBAs that are unmapped). To avoid IO errors if those LBAs are subsequently read before they are written with valid tag fields, the MPI SCSI IO requests need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6] appropriately. A value of 2 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF for PI types 1 and 2. A value of 3 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF and the Logical Block Reference Tag is 0xFFFFFFFF for PI type 3. Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 ++ 2 files changed, 3 insertions(+) commit 2493c67e518c772a573c3b1ad02e7ced5b53f6ca Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:44 2017 -0500 scsi: megaraid_sas: 128 MSIX Support SAS3.5 Generic Megaraid based Controllers will have the support for 128 MSI-X vectors, resulting in the need to support 128 reply queues Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 25 ++++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) commit 45f4f2eb3da3cbff02c3d77c784c81320c733056 Author: Sasikumar Chandrasekaran Date: Tue Jan 10 18:20:43 2017 -0500 scsi: megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers This patch contains new pci device ids for SAS3.5 Generic Megaraid Controllers Signed-off-by: Sasikumar Chandrasekaran Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 12 +++++++++--- drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 30 ++++++++++++++++++++++------- 3 files changed, 45 insertions(+), 11 deletions(-) commit 47069a81b6312380f163f711ff879bd7a9d0da2a Author: Hanjun Guo Date: Tue Jan 10 20:16:43 2017 +0800 scsi: remove useless acpi functions in the header file commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the header file, do it now. Signed-off-by: Hanjun Guo Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi.h | 10 ---------- 1 file changed, 10 deletions(-) commit 93fdd5ac64bbe80dac6416f048405362d7ef0945 Author: Tomas Winkler Date: Thu Jan 5 10:45:12 2017 +0200 scsi: ufs: refactor device descriptor reading Pull device descriptor reading out of ufs quirk so it can be used also for other purposes. Revamp the fixup setup: 1. Rename ufs_device_info to ufs_dev_desc as very similar name ufs_dev_info is already in use. 2. Make the handlers static as they are not used out of the ufshdc.c file. [mkp: applied by hand] Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 12 ++++++++++++ drivers/scsi/ufs/ufs_quirks.h | 28 ++++++---------------------- drivers/scsi/ufs/ufshcd.c | 40 +++++++++++++++++++--------------------- 3 files changed, 37 insertions(+), 43 deletions(-) commit d79713f911918e43576338e33396c7f889f5d272 Author: Tomas Winkler Date: Thu Jan 5 10:45:11 2017 +0200 scsi: ufs: ufshcd_get_max_icc_level fix endianity handling Reading big endian value from a buffer requires explicit cast. Fix sparse warning: drivers/scsi/ufs/ufshcd.c:4825:24: warning: cast to restricted __be16 Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8209b6d54e7e2f8b305da831c78629b65d144f91 Author: Tomas Winkler Date: Thu Jan 5 10:45:10 2017 +0200 scsi: ufs: unexport descritpor reading functions Unexport ufshcd_read_device_desc and ufshcd_read_string_desc there is no really possibility to calling them directly outside of UFS context. Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 9 ++++----- drivers/scsi/ufs/ufshcd.h | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) commit 26cf9155bf6b7deeaafe8fc8f233fca5e5398c92 Author: Tomas Winkler Date: Thu Jan 5 10:45:09 2017 +0200 scsi: ufs: ufshcd_query_descriptor_retry should be static Fix the following compilation warning: drivers/scsi/ufs/ufshcd.c:2076:5: warning: no previous prototype for ufshcd_query_descriptor_retry [-Wmissing-prototypes] Also do not export the function, it should not be used out of ufs context. Signed-off-by: Tomas Winkler Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a505e58252715bbc18a0ee1abae23615fe2586db Author: Sowmini Varadhan Date: Tue Jan 10 07:47:15 2017 -0800 packet: pdiag_put_ring() should return TX_RING info for TPACKET_V3 Commit 7f953ab2ba46 ("af_packet: TX_RING support for TPACKET_V3") now makes it possible to use TX_RING with TPACKET_V3, so make the the relevant information available via 'ss -e -a --packet' Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/packet/diag.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3bf003335ba356aac5a43e28640159d4ae8a2a60 Author: Tobias Klauser Date: Tue Jan 10 15:02:16 2017 +0100 bpf: Make unnecessarily global functions static Make the functions __local_list_pop_free(), __local_list_pop_pending(), bpf_common_lru_populate() and bpf_percpu_lru_populate() static as they are not used outide of bpf_lru_list.c This fixes the following GCC warnings when building with 'W=1': kernel/bpf/bpf_lru_list.c:363:22: warning: no previous prototype for ‘__local_list_pop_free’ [-Wmissing-prototypes] kernel/bpf/bpf_lru_list.c:376:22: warning: no previous prototype for ‘__local_list_pop_pending’ [-Wmissing-prototypes] kernel/bpf/bpf_lru_list.c:560:6: warning: no previous prototype for ‘bpf_common_lru_populate’ [-Wmissing-prototypes] kernel/bpf/bpf_lru_list.c:577:6: warning: no previous prototype for ‘bpf_percpu_lru_populate’ [-Wmissing-prototypes] Cc: Martin KaFai Lau Signed-off-by: Tobias Klauser Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/bpf_lru_list.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit a5ef01aaac245d37edf113d65b0c146e96d841d1 Author: Tobias Klauser Date: Tue Jan 10 15:02:07 2017 +0100 bpf: Remove unused but set variable in __bpf_lru_list_shrink_inactive() Remove the unused but set variable 'first_node' in __bpf_lru_list_shrink_inactive() to fix the following GCC warning when building with 'W=1': kernel/bpf/bpf_lru_list.c:216:41: warning: variable ‘first_node’ set but not used [-Wunused-but-set-variable] Cc: Martin KaFai Lau Signed-off-by: Tobias Klauser Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/bpf_lru_list.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit da36e13cf653541e385a8d2ec2637fff6ea3461a Author: Mahesh Bandewar Date: Mon Jan 9 15:05:54 2017 -0800 ipvlan: improvise dev_id generation logic in IPvlan The patch 009146d117b ("ipvlan: assign unique dev-id for each slave device.") used ida_simple_get() to generate dev_ids assigned to the slave devices. However (Eric has pointed out that) there is a shortcoming with that approach as it always uses the first available ID. This becomes a problem when a slave gets deleted and a new slave gets added. The ID gets reassigned causing the new slave to get the same link-local address. This side-effect is undesirable. This patch adds a per-port variable that keeps track of the IDs assigned and used as the stat-base for the IDR api. This base will be wrapped around when it reaches the MAX (0xFFFE) value possibly on a busy system where slaves are added and deleted routinely. Fixes: 009146d117b ("ipvlan: assign unique dev-id for each slave device.") Signed-off-by: Mahesh Bandewar CC: Eric Dumazet CC: David Miller Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 1 + drivers/net/ipvlan/ipvlan_main.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 372e2db7210df7c45ead46429aeb1443ba148060 Author: Miroslav Benes Date: Fri Jan 6 15:00:45 2017 +0100 livepatch: doc: remove the limitation for schedule() patching The Limitations section of the documentation describes the impossibility to livepatch anything that is inlined to __schedule() function. This had been true till 4.9 kernel came. Thanks to commit 0100301bfdf5 ("sched/x86: Rewrite the switch_to() code") from Brian Gerst there is __switch_to_asm function now (implemented in assembly) called properly from context_switch(). RIP is thus saved on the stack and a task would return to proper version of __schedule() et al. functions. Of course __switch_to_asm() is not patchable for the reason described in the section. But there is no __fentry__ call and I cannot imagine a reason to do it anyway. Therefore, remove the paragraphs from the section. Signed-off-by: Miroslav Benes Reviewed-by: Petr Mladek Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina Documentation/livepatch/livepatch.txt | 19 ------------------- 1 file changed, 19 deletions(-) commit 8d4973a1c01d4b38871fbc6631e1fdd20e6c9e90 Author: Kees Cook Date: Tue Jan 10 16:48:03 2017 -0800 gcc-plugins: add PASS_INFO and build_const_char_string() This updates the GCC plugins gcc-common.h from PaX Team to include more helpers and header files, specifically adds the PASS_INFO() macro to make plugin declarations nicer and a helper for proper const string building. Signed-off-by: Kees Cook scripts/gcc-plugins/gcc-common.h | 55 ++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 11 deletions(-) commit acf45d11050abd751dcec986ab121cb2367dcbba Author: Nagaraju, Vathsala Date: Tue Jan 10 12:32:26 2017 +0530 drm/i915/psr: disable psr2 for resolution greater than 32X20 PSR2 is restricted to work with panel resolutions upto 3200x2000, move the check to intel_psr_match_conditions and fully block psr. Cc: Rodrigo Vivi Cc: Jim Bride Suggested-by: Rodrigo Vivi Signed-off-by: Vathsala Nagaraju Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1484031746-20874-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/intel_psr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 97da2ef449c44f4fffe02c2a9db6dec706cfa918 Author: Nagaraju, Vathsala Date: Mon Jan 2 17:00:55 2017 +0530 drm/i915/psr: program vsc header for psr2 Function hsw_psr_setup handles vsc header setup for psr1 and skl_psr_setup_vsc handles vsc header setup for psr2. Setup VSC header in function skl_psr_setup_vsc for psr2 support, as per edp 1.4 spec, table 6-11:VSC SDP HEADER Extension for psr2 operation. v2: (Jani) - Initialize variables to 0 - intel_dp_get_y_cord_status and intel_dp_get_y_cord_status made static - Correct indentation for continuation lines - Change DP_PSR_Y_COORDINATE to DP_PSR2_SU_Y_COORDINATE_REQUIRED - Change DPRX_FEATURE_ENUMERATION_LIST to DP_DPRX_* - Change VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED to DP_VSC_* Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Jim Bride Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483356663-32668-3-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_dp.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) commit d0ce9062912062fd1f6fafd35e89aef1b852511b Author: Nagaraju, Vathsala Date: Mon Jan 2 17:00:54 2017 +0530 drm : adds Y-coordinate and Colorimetry Format PSR2 vsc revision number hb2( as per table 6-11)is updated to 4 or 5 based on Y cordinate and Colorimetry Format as below 04h = 3D stereo + PSR/PSR2 + Y-coordinate. 05h = -3D stereo- + PSR/PSR2 + Y-coordinate + Pixel Encoding/Colorimetry Format indication. A DP Source device is allowed to indicate the pixel encoding/colorimetry format to the DP Sink device with VSC SDP only when the DP Sink device supports it ( i.e.,VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED bit in the DPRX_FEATURE_ENUMERATION_LIST register (DPCD Address 02210h, bit 3; is set to 1). v2: (Jani) - Change DP_PSR_Y_COORDINATE to DP_PSR2_SU_Y_COORDINATE_REQUIRED. - Add DP_PSR2_SU_GRANULARITY_REQUIRED. - Change DPRX_FEATURE_ENUMERATION_LIST to DP_DPRX. - Add GTC_CAP and AV_SYNC_CAP, other bits in DPRX_FEATURE_ENUMERATION_LIST. v3: (Jani) - Add support for bits 7:4 and 1 as per DP v1.4 for DPRX_FEATURE_ENUMERATION_LIST. Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Vathsala Nagaraju Signed-off-by: Patil Deepti Reviewed-by: Jani Nikula Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483356663-32668-2-git-send-email-vathsala.nagaraju@intel.com include/drm/drm_dp_helper.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 8a792e9afbce84a0fdaf213fe42bb97382487094 Author: Afzal Mohammed Date: Sat Jan 7 17:48:10 2017 +0100 ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM REMAP_VECTORS_TO_RAM depends on DRAM_BASE, but since DRAM_BASE is a hex, REMAP_VECTORS_TO_RAM could never get enabled. Also depending on DRAM_BASE is redundant as whenever REMAP_VECTORS_TO_RAM makes itself available to Kconfig, DRAM_BASE also is available as the Kconfig gets sourced on !MMU. Signed-off-by: Afzal Mohammed Reviewed-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/Kconfig-nommu | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 79964a1c2972ca7ecc231e2d2ac7593a1af73f63 Author: Benjamin Gaignard Date: Mon Dec 12 09:31:18 2016 +0100 ARM: 8633/1: nommu: allow mmap when !CONFIG_MMU commit ab6494f0c96f ("nommu: Add noMMU support to the DMA API") have add CONFIG_MMU compilation flag but that prohibit to use dma_mmap_wc() when the platform doesn't have MMU. This patch call vm_iomap_memory() in noMMU case to test if addresses are correct and set vma->vm_flags rather than all return an error. Signed-off-by: Benjamin Gaignard Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 3 +++ 1 file changed, 3 insertions(+) commit 00a19f3e25c0c40e0ec77f52d4841d23ad269169 Author: Rabin Vincent Date: Tue Nov 8 09:21:19 2016 +0100 ARM: 8627/1: avoid cache flushing in flush_dcache_page() When the data cache is PIPT or VIPT non-aliasing, and cache operations are broadcast by the hardware, we can always postpone the flush in flush_dcache_page(). A similar change was done for ARM64 in commit b5b6c9e9149d ("arm64: Avoid cache flushing in flush_dcache_page()"). Reviewed-by: Catalin Marinas Signed-off-by: Rabin Vincent Signed-off-by: Russell King arch/arm/mm/flush.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bd97abc0d04930d0369411824d437f19e72e13cc Author: Martin Blumenstingl Date: Sat Dec 3 00:08:49 2016 +0100 ARM64: dts: meson-gxm: add SCPI configuration for GXM This adds the SCPI DVFS clock index and configures the CPU cores accordingly. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 47961f1353b8195cb258ee3068d0969ef87acd20 Author: Martin Blumenstingl Date: Sat Dec 3 00:08:48 2016 +0100 ARM64: dts: meson-gx: move the SCPI and SRAM nodes to meson-gx SCPI and SRAM are identical on GXBB and GXL. Moving the corresponding nodes to meson-gx adds support for the thermal sensor on GXL based devices. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Neil Armstrong [khilman: add scpi_clocks label] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 45 +++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 57 ----------------------------- 2 files changed, 45 insertions(+), 57 deletions(-) commit c5540a0195ec65e2ab9fcc4bde958db2cc66550c Author: Bart Van Assche Date: Tue Jan 10 11:15:54 2017 -0800 IB/rxe: Fix an skb leak Additionally, make it easier to detect skb leaks by issuing a warning if a leak occurs. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Cc: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 839f5ac0d806970a102117be03ef05272c50d20e Author: Bart Van Assche Date: Tue Jan 10 11:15:53 2017 -0800 IB/rxe: Remove a pointless indirection layer Neither rxe->ifc_ops nor any of the function pointers in struct struct rxe_ifc_ops ever change. Hence remove the rxe->ifc_ops indirection mechanism. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe.c | 2 +- drivers/infiniband/sw/rxe/rxe_loc.h | 20 ++++++++++++++-- drivers/infiniband/sw/rxe/rxe_mcast.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_net.c | 43 +++++++++++------------------------ drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++---- drivers/infiniband/sw/rxe/rxe_verbs.h | 22 ------------------ 8 files changed, 42 insertions(+), 67 deletions(-) commit ab17654476a11a1ed7d89f1104e2acdb7ed1c9ed Author: Bart Van Assche Date: Tue Jan 10 11:15:52 2017 -0800 IB/rxe: Fix reference leaks in memory key invalidation code Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 1 + drivers/infiniband/sw/rxe/rxe_resp.c | 1 + 2 files changed, 2 insertions(+) commit b3a459961014b14c267544c327db033669493295 Author: Bart Van Assche Date: Tue Jan 10 11:15:51 2017 -0800 IB/rxe: Fix a MR reference leak in check_rkey() Avoid that calling check_rkey() for mem->state == RXE_MEM_STATE_FREE triggers an MR reference leak. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 18d3451c0d7e23d155db37b9ec1a8886c114a5d3 Author: Bart Van Assche Date: Tue Jan 10 11:15:50 2017 -0800 IB/rxe: Generate a completion for all failed work requests Change do_complete() such that an error completion is not only generated if a QP is in the error state but also if a work request failed. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 11 ++++++++++- drivers/infiniband/sw/rxe/rxe_loc.h | 1 + drivers/infiniband/sw/rxe/rxe_req.c | 18 +++++++----------- drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- 4 files changed, 20 insertions(+), 14 deletions(-) commit 723ec9ae2adfe638d4e2bbc44dd3974ac974a6c6 Author: Bart Van Assche Date: Tue Jan 10 11:15:49 2017 -0800 IB/rxe: Introduce functions for queue draining This change makes the code easier to read and avoids that code is duplicated. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 63 +++++++++++++----------------------- drivers/infiniband/sw/rxe/rxe_resp.c | 28 ++++++++-------- 2 files changed, 38 insertions(+), 53 deletions(-) commit 642c7cbcaf2ffc1e27f67eda3dc47347ac5aff37 Author: Bart Van Assche Date: Tue Jan 10 11:15:48 2017 -0800 IB/rxe: Add a runtime check in alloc_index() Since index values equal to or above 'range' can trigger memory corruption, complain if index >= range. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 1 + 1 file changed, 1 insertion(+) commit 43553b47c3124e7f4a9f115cff9db513b35a5e0a Author: Bart Van Assche Date: Tue Jan 10 11:15:47 2017 -0800 IB/rxe: Issue warnings once It is strongly recommended to report kernel warnings once instead of every time a condition is hit. Hence change WARN_ON() into WARN_ON_ONCE() / BUILD_BUG_ON() as appropriate. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 2 +- drivers/infiniband/sw/rxe/rxe_mr.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_resp.c | 11 ++++++----- 3 files changed, 10 insertions(+), 9 deletions(-) commit 32404fb76408e873d79d0723fda3207b18d235ad Author: Bart Van Assche Date: Tue Jan 10 11:15:46 2017 -0800 IB/rxe: Let the compiler check the type of the cleanup functions Change the argument type of these functions from void * into struct rxe_pool_entry *. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_cq.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_loc.h | 8 ++++---- drivers/infiniband/sw/rxe/rxe_mcast.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_mr.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_pool.h | 6 ++++-- drivers/infiniband/sw/rxe/rxe_qp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) commit 046ef24d256bccc3767eb6feef1dbe07338fc5c5 Author: Bart Van Assche Date: Tue Jan 10 11:15:45 2017 -0800 IB/rxe: Enable type checking on SKB_TO_PKT() and PKT_TO_SKB() arguments Let the compiler check the type of the arguments passed to SKB_TO_PKT() and PKT_TO_SKB(). Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_hdr.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 967335ab906d8bfba09bf179ecfbada927861eb9 Author: Bart Van Assche Date: Tue Jan 10 11:15:44 2017 -0800 IB/rxe: Remove superfluous casts Casting a pointer to 'void *' explicitly is not necessary in C code. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 175f1244c199f589d23f54fcc3e178fe24d80b7a Author: Bart Van Assche Date: Tue Jan 10 11:15:43 2017 -0800 IB/rxe: Remove an unused variable and an unused argument The variable 'av' is not used so remove it. Since that change removes the last user of the 'wqe' argument, remove that argument too. Signed-off-by: Bart Van Assche Cc: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c8b82182cb35c256cc0417c1d31a8421d7c87736 Author: Bart Van Assche Date: Tue Jan 10 11:15:42 2017 -0800 IB/rxe: Remove an unused function Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 7 ------- 1 file changed, 7 deletions(-) commit 2bec3baded4ff46f51c1810e0dd8dfda55f05451 Author: Bart Van Assche Date: Tue Jan 10 11:15:41 2017 -0800 IB/rxe: Constify the pool name Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 2 +- drivers/infiniband/sw/rxe/rxe_pool.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8d8f08372091ae3ea92930ebd0d2c33e8bc199c5 Author: Bart Van Assche Date: Tue Jan 10 11:15:40 2017 -0800 IB/rxe: Suppress sparse warnings Avoid that sparse complains about using 0 as a pointer, about missing function declarations and also avoid that sparse complains about endianness. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_recv.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit e30eca0e69cb888125b081c96ca761e958fcb5b4 Author: Jonathan Cameron Date: Sun Jan 8 19:52:25 2017 +0000 iio:adc:qcom-spmi-vadc: use div64_s64 instead of direct 64 bit division. Another one of these that we missed previously which prevents test builds of this driver on 32 bit platforms as it gives an undefined __divdi3 warning. Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-vadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f51455d442c0fa97e4600960f19bf23b66f0b386 Author: Chris Wilson Date: Tue Jan 10 14:47:34 2017 +0000 drm/i915: Replace 4096 with PAGE_SIZE or I915_GTT_PAGE_SIZE Start converting over from the byte count to its semantic macro, either we want to allocate the size of a physical page in main memory or we want the size of a virtual page in the GTT. 4096 could mean either, but PAGE_SIZE and I915_GTT_PAGE_SIZE are explicit and should help improve code comprehension and future changes. In the future, we may want to use variable GTT page sizes and so have the challenge of knowing which hardcoded values were used to represent a physical page vs the virtual page. v2: Look for a few more 4096s to convert, discover IS_ALIGNED(). v3: 4096ul paranoia, make fence alignment a distinct value of 4096, keep bdw stolen w/a as 4096 until we know better. v4: Add asserts that i915_vma_insert() start/end are aligned to GTT page sizes. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170110144734.26052-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_evict.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 ++--- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_fence_reg.h | 2 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 ++++- drivers/gpu/drm/i915/i915_gem_render_state.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_stolen.c | 5 +++-- drivers/gpu/drm/i915/i915_gem_tiling.c | 13 ++++++++----- drivers/gpu/drm/i915/i915_vma.c | 21 ++++++++++++++------- drivers/gpu/drm/i915/intel_lrc.c | 5 +++-- drivers/gpu/drm/i915/intel_lrc.h | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++++----- 15 files changed, 62 insertions(+), 45 deletions(-) commit 2a20d6f8582d6783bd2e2ef9c7536f1b8a6c2fbe Author: Chris Wilson Date: Tue Jan 10 17:22:46 2017 +0000 drm/i915: Rename i915_gem_engine_cleanup() to engine_set_wedged() It has been some time since i915_gem_engine_cleanup was only called from the module unload path, and now it is only called when the GPU is wedged. Mika complained that the name is confusing, especially in light of the existence of i915_gem_cleanup_engines(). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cd9442f66dc116089c5ac6257cf51652d8112bd Author: Chris Wilson Date: Tue Jan 10 17:22:45 2017 +0000 drm/i915: Mark all incomplete requests as -EIO when wedged Similarly to a normal reset, after we mark the GPU as wedged (completely fubar and no more requests can be executed), set the error status on all the in flight requests. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3c1b284759876785e31335d0f2278bfd507a1862 Author: Chris Wilson Date: Tue Jan 10 17:22:44 2017 +0000 drm/i915: Set an error status for a resubmitted request Let userspace know if its request was resubmitted due to it being executed at the time of a global reset. In this case, the reset was for a guilty request on another engine, and this request was an innocent victim that will be re-executed upon restarting. However, since it was running at the time of the reset, we can not guarantee that it suffered no ill-effects from the reset (e.g. some context state may be lost, or some self-modifying fragment shaders will be restarted from the final state not their initial state), to let userspace know that it has been corrupted set a special value on the fence->error, -EAGAIN. If the request does hang on resubmission, the error will be overwritten with -EIO. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+) commit c0d5f32c5043e8568ffdbcff60dfba26f408fa10 Author: Chris Wilson Date: Tue Jan 10 17:22:43 2017 +0000 drm/i915: Set guilty-flag on fence after detecting a hang The struct dma_fence carries a status field exposed to userspace by sync_file. This is inspected after the fence is signaled and can convey whether or not the request completed successfully, or in our case if we detected a hang during the request (signaled via -EIO in SYNC_IOC_FILE_INFO). v2: Mark all cancelled requests as failed. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) commit 2edc6e0df1c15c0cc665a8aa61dcf2c540e90a70 Author: Chris Wilson Date: Tue Jan 10 17:22:42 2017 +0000 drm/i915: Consolidate reset_request() Always reset the requests of the guilty context, including the hung request that we tell the hardware to skip. This should help if the reprogram fails entirely, but more importantly makes the guilty path more uniform (and simplifies the subsequent patch to tweak the cancelled requests). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 874bcd00f520cac297aefade201c4efc07fc8d17 Author: Corentin Labbe Date: Thu Dec 15 20:36:33 2016 +0100 apm-emulation: move APM_MINOR_DEV to include/linux/miscdevice.h This patch move the define for APM_MINOR_DEV to include/linux/miscdevice.h It is better that all minor number definitions are in the same place. Signed-off-by: Corentin Labbe Signed-off-by: Greg Kroah-Hartman drivers/char/apm-emulation.c | 7 ------- include/linux/miscdevice.h | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) commit 8681d5b04f812d9cc5cde72bbbb5081f8f1c9728 Author: Corentin Labbe Date: Thu Dec 15 15:53:23 2016 +0100 ds1302: remove unneeded linux/miscdevice.h include drivers/char/ds1302.c does not use any miscdevice so the inclusion of linux/miscdevice.h is unnecessary. This patch remove this inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Greg Kroah-Hartman drivers/char/ds1302.c | 1 - 1 file changed, 1 deletion(-) commit f17c941cbcdccc4fef49a10622ce2ffd2321a143 Author: Corentin Labbe Date: Thu Dec 15 15:40:33 2016 +0100 mmtimer: add member name to the miscdevice declaration Since the struct miscdevice have many members, it is dangerous to init it without members name relying only on member order. This patch add member name to the init declaration. Signed-off-by: Corentin Labbe Signed-off-by: Greg Kroah-Hartman drivers/char/mmtimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 816c9311f1144a03da1fdc4feb2f6b0d3299fca0 Author: Dan Carpenter Date: Mon Jan 9 11:20:16 2017 +0300 misc: mic: double free on ioctl error path This function only has one caller. Freeing "vdev" here leads to a use after free bug. There are several other error paths in this function but this is the only one which frees "vdev". It looks like the kfree() can be safely removed. Fixes: 61e9c905df78 ("misc: mic: Enable VOP host side functionality") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/vop/vop_vringh.c | 1 - 1 file changed, 1 deletion(-) commit ddc5c9a37be4517270453ce909d3dfcc8de58230 Author: Pan Bian Date: Sat Dec 3 17:29:28 2016 +0800 misc: set error code when devm_kstrdup fails In function sram_reserve_regions(), the value of return variable ret should be negative on failures. However, the value of ret may be 0 even if the call to devm_kstrdup() returns a NULL pointer. This patch explicitly assigns "-ENOMEM" to ret on the path that devm_kstrdup() fails. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188651 Signed-off-by: Pan Bian Signed-off-by: Greg Kroah-Hartman drivers/misc/sram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d77044d142e960f7b5f814a91ecb8bcf86aa552c Author: K. Y. Srinivasan Date: Thu Dec 22 16:54:03 2016 -0800 Drivers: hv: util: Backup: Fix a rescind processing issue VSS may use a char device to support the communication between the user level daemon and the driver. When the VSS channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new VSS offer from the host. Implement this logic. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_snapshot.c | 4 ++++ 1 file changed, 4 insertions(+) commit 20951c7535b5e6af46bc37b7142105f716df739c Author: K. Y. Srinivasan Date: Thu Dec 22 16:54:02 2016 -0800 Drivers: hv: util: Fcopy: Fix a rescind processing issue Fcopy may use a char device to support the communication between the user level daemon and the driver. When the Fcopy channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new Fcopy offer from the host. Implement this logic. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_fcopy.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5a66fecbf6aa528e375cbebccb1061cc58d80c84 Author: K. Y. Srinivasan Date: Thu Dec 22 16:54:01 2016 -0800 Drivers: hv: util: kvp: Fix a rescind processing issue KVP may use a char device to support the communication between the user level daemon and the driver. When the KVP channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new KVP offer from the host. Implement this logic. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_kvp.c | 4 ++++ 1 file changed, 4 insertions(+) commit ccb61f8a99e6c29df4fb96a65dad4fad740d5be9 Author: K. Y. Srinivasan Date: Thu Dec 22 16:54:00 2016 -0800 Drivers: hv: vmbus: Fix a rescind handling bug The host can rescind a channel that has been offered to the guest and once the channel is rescinded, the host does not respond to any requests on that channel. Deal with the case where the guest may be blocked waiting for a response from the host. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 18 ++++++++++++++++++ drivers/hv/channel_mgmt.c | 25 +++++++++++++++++++++++++ include/linux/hyperv.h | 1 + 3 files changed, 44 insertions(+) commit 523b94087078f7f5ac10b7d9cd04277927031c39 Author: Vitaly Kuznetsov Date: Wed Dec 7 14:53:12 2016 -0800 hv: make CPU offlining prevention fine-grained Since commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors") cpu offlining was disabled. It is still true that we can't offline CPUs which have VMBus channels bound to them but we may have 'free' CPUs (e.v. we booted with maxcpus= parameter and onlined CPUs after VMBus was initialized), these CPUs may be disabled without issues. In future, we may even allow closing CPUs which have only sub-channels assinged to them by closing these sub-channels. All devices will continue to work. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 31 +++++++++++++++++++++++++++++++ drivers/hv/vmbus_drv.c | 9 ++++----- 2 files changed, 35 insertions(+), 5 deletions(-) commit 76d36ab79820430f73c584673aef10ba2446fced Author: Vitaly Kuznetsov Date: Wed Dec 7 14:53:11 2016 -0800 hv: switch to cpuhp state machine for synic init/cleanup To make it possible to online/offline CPUs switch to cpuhp infrastructure for doing hv_synic_init()/hv_synic_cleanup(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 15 +++++++-------- drivers/hv/hyperv_vmbus.h | 4 ++-- drivers/hv/vmbus_drv.c | 19 +++++++++++-------- 3 files changed, 20 insertions(+), 18 deletions(-) commit e7e97dd8b77ee7366f2f8c70a033bf5fa05ec2e0 Author: K. Y. Srinivasan Date: Wed Dec 7 01:16:28 2016 -0800 Drivers: hv: vmbus: Prevent sending data on a rescinded channel After the channel is rescinded, the host does not read from the rescinded channel. Fail writes to a channel that has already been rescinded. If we permit writes on a rescinded channel, since the host will not respond we will have situations where we will be unable to unload vmbus drivers that cannot have any outstanding requests to the host at the point they are unoaded. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 56ef6718a1d8d77745033c5291e025ce18504159 Author: Vitaly Kuznetsov Date: Wed Dec 7 01:16:27 2016 -0800 hv: don't reset hv_context.tsc_page on crash It may happen that secondary CPUs are still alive and resetting hv_context.tsc_page will cause a consequent crash in read_hv_clock_tsc() as we don't check for it being not NULL there. It is safe as we're not freeing this page anyways. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3c7630d35009e6635e5b58d62de554fd5b6db5df Author: Vitaly Kuznetsov Date: Wed Dec 7 01:16:26 2016 -0800 hv: init percpu_list in hv_synic_alloc() Initializing hv_context.percpu_list in hv_synic_alloc() helps to prevent a crash in percpu_channel_enq() when not all CPUs were online during initialization and it naturally belongs there. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 421b8f20d3c381b215f988b42428f56fc3b82405 Author: Vitaly Kuznetsov Date: Wed Dec 7 01:16:25 2016 -0800 hv: allocate synic pages for all present CPUs It may happen that not all CPUs are online when we do hv_synic_alloc() and in case more CPUs come online later we may try accessing these allocated structures. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0bb03924f1a80e7f65900e36c8e6b3dc167c5f8 Author: Vitaly Kuznetsov Date: Wed Dec 7 01:16:24 2016 -0800 Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg() DoS protection conditions were altered in WS2016 and now it's easy to get -EAGAIN returned from vmbus_post_msg() (e.g. when we try changing MTU on a netvsc device in a loop). All vmbus_post_msg() callers don't retry the operation and we usually end up with a non-functional device or crash. While host's DoS protection conditions are unknown to me my tests show that it can take up to 10 seconds before the message is sent so doing udelay() is not an option, we really need to sleep. Almost all vmbus_post_msg() callers are ready to sleep but there is one special case: vmbus_initiate_unload() which can be called from interrupt/NMI context and we can't sleep there. I'm also not sure about the lonely vmbus_send_tl_connect_request() which has no in-tree users but its external users are most likely waiting for the host to reply so sleeping there is also appropriate. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 17 +++++++++-------- drivers/hv/channel_mgmt.c | 10 ++++++---- drivers/hv/connection.c | 17 ++++++++++++----- drivers/hv/hyperv_vmbus.h | 2 +- 4 files changed, 28 insertions(+), 18 deletions(-) commit 292ccbd3c419763f3b1bcd2816f53bd27d14be23 Author: Jonathan Cameron Date: Fri Dec 30 18:25:50 2016 +0000 iio:adc:qcom-spmi-vadc silence a long constant warning. It is meant to be long and is only added to an s64. Signed-off-by: Jonathan Cameron Cc: Rama Krishna Phani A Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-vadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bd72d84f6bc4dcdcc2b5d98881a9da536925b48 Author: Jonathan Cameron Date: Fri Dec 30 18:25:49 2016 +0000 iio:adc:qcom-spmi-vadc : fix undefined __divdi3 A simple do_div call works here as all the signed 64 bit is actually small and unsigned at this point, and the numerator is u32. Introduce a temporary u64 variable to avoid type comparison warnings on some architectures. Signed-off-by: Jonathan Cameron Reported-by: kbuild test robot Cc: Rama Krishna Phani A Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-vadc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c3b2fdd0ea7ee5c01c1f0d572a32aec89c0373a4 Author: Andreas Klinger Date: Thu Jan 5 18:51:57 2017 +0100 iio: adc: hx711: Add IIO driver for AVIA HX711 This is the IIO driver for AVIA HX711 ADC which is mostly used in weighting cells. The protocol is quite simple and using GPIOs: One GPIO is used as clock (SCK) while another GPIO is read (DOUT) The raw value read from the chip is delivered. To get a weight one needs to subtract the zero offset and scale it. Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 19 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/hx711.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 552 insertions(+) commit ff1293f67734da68e23fecb6ecdae7112b8c43f9 Author: Andreas Klinger Date: Thu Jan 5 18:51:36 2017 +0100 iio: adc: hx711: Add DT binding for avia,hx711 Add DT bindings for avia,hx711 Add vendor avia to vendor list Signed-off-by: Andreas Klinger Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/avia-hx711.txt | 18 ++++++++++++++++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 19 insertions(+) commit fa2849e9649b5180ffc4cb3c3b005261c403093a Author: Hans de Goede Date: Wed Dec 14 14:55:25 2016 +0100 iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications For some reason the axp288_adc driver was modifying the AXP288_ADC_TS_PIN_CTRL register, changing bits 0-1 depending on whether the GP_ADC channel or another channel was written. These bits control when a bias current is send to the TS_PIN, the GP_ADC has its own pin and a separate bit in another register to control the bias current. Not only does changing when to enable the TS_PIN bias current (always or only when sampling) when reading the GP_ADC make no sense at all, the code is modifying these bits is writing the entire register, assuming that all the other bits have their default value. So if the firmware has configured a different bias-current for either pin, then that change gets clobbered by the write, likewise if the firmware has set bit 2 to indicate that the battery has no thermal sensor, this will get clobbered by the write. This commit fixes all this, by simply removing all writes to the AXP288_ADC_TS_PIN_CTRL register, they are not needed to read the GP_ADC pin, and can actually be harmful. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Jonathan Cameron drivers/iio/adc/axp288_adc.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) commit 06fc41daae224731e5537a239ab464e5ae2fe762 Author: Scott Matheina Date: Tue Jan 3 19:50:24 2017 -0600 staging:iio:addac:adt7316 Fixes Alignment should match open parenthesis Fixes style issue where Alignment doesn't match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f0d7daf53972da0004f7a5a4d938c85333db300 Author: Javier Martinez Canillas Date: Mon Jan 2 09:45:45 2017 -0300 iio: adc: imx25-gcq: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/iio/adc/fsl-imx25-gcq.ko | grep alias $ After this patch: $ modinfo drivers/iio/adc/fsl-imx25-gcq.ko | grep alias alias: of:N*T*Cfsl,imx25-gcqC* alias: of:N*T*Cfsl,imx25-gcq Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/adc/fsl-imx25-gcq.c | 1 + 1 file changed, 1 insertion(+) commit 33dd94cb972175249258329c4aaffddcc82c2005 Author: Jonathan Cameron Date: Mon Jan 2 19:28:34 2017 +0000 iio:buffer.h - split into buffer.h and buffer_impl.h buffer.h supplies everything needed for devices using buffers. buffer_impl.h supplies access to the internals as needed to write a buffer implementation. This was really motivated by the mess that turned up in the kernel-doc documentation pulled in by the new sphinx docs. It made it clear that our logical separations in headers were generally terrible. The buffer case was easy to sort out without greatly effecting drivers so here it is. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/buffer/industrialio-buffer-cb.c | 2 +- drivers/iio/buffer/kfifo_buf.c | 1 + drivers/iio/industrialio-buffer.c | 1 + drivers/iio/industrialio-core.c | 1 + include/linux/iio/buffer.h | 156 +-------------------------- include/linux/iio/buffer_impl.h | 162 ++++++++++++++++++++++++++++ 6 files changed, 167 insertions(+), 156 deletions(-) commit c56b7d80e376a00d3a29e7854359116f68ce66c5 Author: Jonathan Cameron Date: Mon Jan 2 19:28:33 2017 +0000 iio:dummy: Stop enabling timestamp by default. It's bad practice and only done in this fake driver + it breaks my attempt to take struct buffer opaque. Not worth an access function as it shouldn't be done anyway. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/dummy/iio_simple_dummy_buffer.c | 3 --- 1 file changed, 3 deletions(-) commit 2b827ad54111439b919605da90e122ecda88bad6 Author: Jonathan Cameron Date: Mon Jan 2 19:28:32 2017 +0000 iio:buffer: Push implementation of iio_device_attach_buffer into .c file This is a precursor to the splitting of buffer.h into parts relevant to buffer implementation vs those for devices using buffers. struct buffer is about to become opaque as far as the header is concerned. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-buffer.c | 16 ++++++++++++++++ include/linux/iio/buffer.h | 16 ++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) commit 19a5a8a5dceeaea03aac6883541b4ec9ed42a833 Author: Jonathan Cameron Date: Mon Jan 2 19:28:31 2017 +0000 iio:buffer.h include pushdown into buffer implementations These were only getting access to the internals of struct iio_dev via the include of iio.h within buffer.h. This should always have been explicitly included by the buffer implementations themselves. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/buffer/industrialio-buffer-cb.c | 1 + drivers/iio/buffer/kfifo_buf.c | 1 + 2 files changed, 2 insertions(+) commit 8abd5ba53962854c3a1c21d04fa6fdba54cc0ee1 Author: Jonathan Cameron Date: Mon Jan 2 19:28:30 2017 +0000 iio:kfifo_buf header include push down. As a precursor to splitting buffer.h, lets make sure all drivers include the relevant headers rather than relying on picking them up from kfifo_buf.h. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/accel/ssp_accel_sensor.c | 1 + drivers/iio/adc/ina2xx-adc.c | 2 ++ drivers/iio/buffer/kfifo_buf.c | 1 + drivers/iio/common/ssp_sensors/ssp_iio.c | 1 + drivers/iio/dummy/iio_simple_dummy_buffer.c | 1 + drivers/iio/gyro/ssp_gyro_sensor.c | 1 + drivers/staging/iio/meter/ade7758_ring.c | 1 + include/linux/iio/kfifo_buf.h | 5 ++--- 8 files changed, 10 insertions(+), 3 deletions(-) commit d4ad4f4b721ad76e28b73e32b8602c011e281893 Author: Jonathan Cameron Date: Mon Jan 2 19:28:29 2017 +0000 iio:buffer:iio_push_to_buffers_with_timestamp fix kernel-doc. Wrong start of kernel doc comment /* -> /** Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen include/linux/iio/buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 315a19eca0e7cbae1bef7f43b36fdcfc33f248f6 Author: Jonathan Cameron Date: Mon Jan 2 19:28:28 2017 +0000 iio:buffers: Push some docs down into the .c file. Ancient legacy of me doing it wrong which it is nice to clear up whilst we are here. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-buffer.c | 5 +++++ include/linux/iio/buffer.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit c2bf8d5f3262b3942bf923ef3b86d6ebe590821d Author: Jonathan Cameron Date: Mon Jan 2 19:28:27 2017 +0000 iio:buffer: Stop exporting iio_scan_mask_query Nothing uses it outside of core code. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-buffer.c | 27 +++++++++++++-------------- include/linux/iio/buffer.h | 3 --- 2 files changed, 13 insertions(+), 17 deletions(-) commit 9f4667776c138df33c4107fcd8811aa9cb6cdcbe Author: Jonathan Cameron Date: Mon Jan 2 19:28:26 2017 +0000 iio:buffer: Introduced a function to assign the buffer specific attrs. This is a necessary step in taking the buffer implementation opaque. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/accel/bmc150-accel-core.c | 3 ++- drivers/iio/industrialio-buffer.c | 12 ++++++++++++ include/linux/iio/buffer.h | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 263cf5e6577a779cc3311c5290325ef3917de2ea Author: Jonathan Cameron Date: Mon Jan 2 19:28:25 2017 +0000 iio:buffer.h Reformat structure comments to be inline. This should make it easier to see how the structure is split into public and private parts - reflected in the generated documentation. Deliberately use /* instead of /** for the private elements to avoid warnings when kernel-doc script runs. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen include/linux/iio/buffer.h | 100 ++++++++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 37 deletions(-) commit 78c9981f6132cb600d545007c91e300021b7caf3 Author: Jonathan Cameron Date: Mon Jan 2 19:28:24 2017 +0000 iio:buffer: Stop exporting iio_update_demux Nothing outside of indiustrialio-buffer.c should be using this. Requires a large amount of juggling of functions to avoid a forward definition. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-buffer.c | 260 +++++++++++++++++++------------------- include/linux/iio/buffer.h | 2 - 2 files changed, 129 insertions(+), 133 deletions(-) commit 762227721fe6225be5b6d233ef681aea5871f5f3 Author: Linus Walleij Date: Thu Jan 5 14:32:33 2017 +0100 iio: accel: st_accel: handle deprecated bindings The earlier deployed LIS3LV02DL driver had already defined a few DT bindings that need to be supported by the new more generic driver and listed as compatible but deprecated bindings in the documentation. After this we can start to activate the new driver with the old systems where applicable. As part of this enablement: make us depend on the old drivers not being in use so we don't get a kernel with two competing drivers. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/lis302.txt | 2 +- Documentation/devicetree/bindings/iio/st-sensors.txt | 2 ++ drivers/iio/accel/Kconfig | 2 ++ drivers/iio/accel/st_accel_i2c.c | 5 +++++ drivers/iio/accel/st_accel_spi.c | 9 +++++++++ 5 files changed, 19 insertions(+), 1 deletion(-) commit de28c99d71d91251713b67c545fa05b2b5e0d232 Author: Prasad Kanneganti Date: Mon Jan 9 14:42:40 2017 -0800 liquidio: store the L4 hash of rx packets in skb Store the L4 hash of received packets in the skb; the hash is computed in the NIC firmware. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 18 ++++++++++++++++-- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 16 +++++++++++++++- drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 2 ++ 3 files changed, 33 insertions(+), 3 deletions(-) commit 5bd36a6f02522e62db8da67534e9779bdec41d27 Merge: 79f664e 0d71a84 Author: David S. Miller Date: Tue Jan 10 14:16:18 2017 -0500 Merge branch 'sfc-physical-port-ids' Edward Cree says: ==================== sfc: physical port ids This series brings our handling of ndo_get_phys_port_id and related interfaces into line with the behaviour of other drivers. ==================== Signed-off-by: David S. Miller commit 0d71a84c7448a9666a99e0aa1293cecc095f2e5d Author: Bert Kenward Date: Tue Jan 10 16:24:31 2017 +0000 sfc: stop setting dev_port Setting dev_port changes the device names allocated by systemd. Any devices with a dev_port >0 will (in default distro configurations) have a suffix of "d" appended. This is not something done by other drivers, and causes confusion for users. Fixes: 8be41320f346 ("sfc: Add code to export port_num in netdev->dev_port") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 -- 1 file changed, 2 deletions(-) commit ac019f08953278a280cb30849c3ebab9a7df31de Author: Bert Kenward Date: Tue Jan 10 16:23:56 2017 +0000 sfc: implement ndo_get_phys_port_name Output is of the form p. Note that the port numbers don't necessarily map one-to-one to physical cages, partly because of 4x10G port modes on QSFP+ and partly because of hw/fw implementation details. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 08a7b29be9734adab7f64a7675764a39ab7d29e1 Author: Bert Kenward Date: Tue Jan 10 16:23:33 2017 +0000 sfc: support ndo_get_phys_port_id even when !CONFIG_SFC_SRIOV There's no good reason why this should be an SRIOV-only thing. Thus, also move it out of SRIOV-specific files. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 17 ++++++++++++++++- drivers/net/ethernet/sfc/ef10_sriov.c | 14 -------------- drivers/net/ethernet/sfc/ef10_sriov.h | 3 --- drivers/net/ethernet/sfc/efx.c | 13 ++++++++++++- drivers/net/ethernet/sfc/net_driver.h | 5 +++-- drivers/net/ethernet/sfc/sriov.c | 11 ----------- drivers/net/ethernet/sfc/sriov.h | 3 --- 7 files changed, 31 insertions(+), 35 deletions(-) commit 69ae543969abeba48e04dd93277684c8c0895f3b Author: Selvin Xavier Date: Mon Dec 19 11:28:46 2016 -0800 RDMA: Adding ethertype ETH_P_IBOE Update the if_ether.h with the ethertype for Infiniband over Ethernet packets. Also, removing the occurances of 0x8915 from infiniband vendor drivers. Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 6 +----- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 ++- drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 5 ----- drivers/infiniband/hw/qedr/qedr_cm.c | 2 +- drivers/infiniband/hw/qedr/qedr_cm.h | 1 - drivers/infiniband/hw/usnic/usnic_common_pkt_hdr.h | 1 - drivers/infiniband/hw/usnic/usnic_fwd.h | 3 ++- include/uapi/linux/if_ether.h | 1 + 9 files changed, 9 insertions(+), 17 deletions(-) commit d61b23daf0c6b5e0615b3b900c333d7dbd07816f Author: Lars-Peter Clausen Date: Tue Jan 10 19:41:39 2017 +0100 ASoC: mpc5200_psc_ac97: Remove unused DAI ID defines The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. This also means the mpc5200_psc_ac97.h file no longer has any content and can be removed. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown sound/soc/fsl/efika-audio-fabric.c | 1 - sound/soc/fsl/mpc5200_psc_ac97.c | 1 - sound/soc/fsl/mpc5200_psc_ac97.h | 13 ------------- 3 files changed, 15 deletions(-) commit df5d5a934b38dd06ee5193586a0814314eeb9379 Author: Andrzej Hajda Date: Tue Jan 10 10:30:48 2017 +0100 arm64: dts: exynos: Fix addresses in node names on Exynos5433 Address should not contain 0x prefix. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 79f664edc1cf51a87d6681514ec89b6da5fef8e1 Author: Timur Tabi Date: Mon Jan 9 12:03:12 2017 -0600 net: qcom/emac: add ethtool support Add support for some ethtool methods: get/set link settings, get/set message level, get statistics, get link status, get ring params, get pause params, and restart autonegotiation. The code to collect the hardware statistics is moved into its own function so that it can be used by "get statistics" method. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/Makefile | 2 +- drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 185 ++++++++++++++++++++++ drivers/net/ethernet/qualcomm/emac/emac.c | 52 +++--- drivers/net/ethernet/qualcomm/emac/emac.h | 3 + 4 files changed, 221 insertions(+), 21 deletions(-) commit dfa5def56f61ab872768c4759968b7b7ce286e77 Author: Jörg Krause Date: Sun Jan 8 20:40:48 2017 +0100 ASoC: wm8731: Adjust clk definitions so that simple card can work When trying to use simple card with wm8962 the following probe error happens: wm8731 0-001a: simple-card: set_sysclk error In simple-card.c the snd_soc_dai_set_sysclk() function is called with clk_id as 0, which is an invalid clock for wm8731. Adjust the clocks source definitions in wm8731.h so that the simple card driver can work successfully Signed-off-by: Jörg Krause Signed-off-by: Mark Brown sound/soc/codecs/wm8731.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2cb904f074bc7e90be475488872a82270e9bae7 Author: Jörg Krause Date: Mon Jan 9 21:36:38 2017 +0100 ARM: dts: sun7i: Add wifi dt node on Banana Pro The Banana Pro has an AMPAK AP6181 WiFi+Bluetooth module. The WiFi part is a BCM43362 IC connected to MMC3 of the A20 SoC via SDIO. The IC also takes a power enable signal via GPIO. This commit adds a device-tree node to power it up, so the mmc subsys can scan it, and enables the mmc controller which is connected to it. As the wifi enable pin of the AP6181 module is not really a regulator, switch the mmc3 node to the mmc-pwrseq framework for controlling it. This more accurately reflectes how the hardware actually works. Signed-off-by: Jörg Krause Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-bananapro.dts | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 0183c256f390958895d6dace4594024cb731a7f4 Author: Marcus Cooper Date: Tue Dec 20 11:40:38 2016 +0100 ARM: dts: sun6i: Add SPDIF to the Mele I7 Enable the S/PDIF transmitter that is present on the Mele I7. Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31-i7.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d62d8fcace15f3786aa9f456fcb0633a6735a2b0 Author: Icenowy Zheng Date: Sun Jan 8 00:13:18 2017 +0800 devicetree: bindings: Add vendor prefix for Shenzhen Xunlong Software Shenzhen Xunlong Software CO.,Limited is a SBC vendor, which produces the "Orange Pi" series of SBCs. Add a vendor prefix for it. This prefix is already used in many Allwinner H3 boards. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 282d45ba4788f98e3cf056cfadb9875db7d3b7f6 Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:42 2016 +0800 ARM: dts: sun8i-h3: orange-pi-pc: Enable audio codec The Orange Pi PC routes the LINEOUT pins to the audio out jack on the board. The onboard microphone is routed to MIC1, with MBIAS providing power. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 20d5c4e93978d01d68b18d9df9fb55cb57098d7f Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:41 2016 +0800 ARM: dts: sun8i-h3: Add device nodes for audio codec and its analog controls Now that we support the audio codec found on the Allwinner H3 SoC, add device nodes for it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit bd85e90c66bfa0a60b6610e647a2c9871146da53 Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:39 2016 +0800 ARM: dts: sun8i-a23: q8-tablet: Enable internal audio codec The A23 Q8 tablets have an internal mono speaker w/ external amp which has a shutdown control tied to a GPIO pin. Both the speaker amp and the headphone jack are tied to the HP output pins. While the speaker is mono, the headset jack is stereo. Unfortunately the driver does not support automatic switching of this. In addition, the headset is DC coupled, or "direct drive" enabled. The headset's microphone is tied to MIC2 with HBIAS providing power. A separate internal microphone is tied to MIC1 with MBIAS providing power. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit ad2151c5427f36e556af6db551d387cf1d5787db Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:38 2016 +0800 ARM: dts: sun8i-a23: Add device node for internal audio codec Now that we have a device tree binding and driver for the A23's internal audio codec, add a device node for it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7f5d64f369f482df8005dd076bd6b2c94493247c Author: Chen-Yu Tsai Date: Fri Nov 25 20:34:37 2016 +0800 ARM: dts: sun8i: Add codec analog path controls node in PRCM for A23/A33 On the A23/A33, the internal codec's analog path controls are located in the PRCM node. Add a sub-device node to the PRCM for it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit e3f5f5a8fbbb8fab7a8226238162b38fe1c7b86e Author: Emmanuel Vadot Date: Mon Nov 21 17:49:11 2016 +0100 ARM: dts: sunxi: Enable UEXT related nodes for Olimex A20 SOM EVB UEXT are Universal EXTension connector from Olimex. They embed i2c, spi and uart pins along power in one connector and are found on most, if not all, Olimex boards. The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on those two connectors. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 1647fe31882a105cef4c99770e4ec8ea47c5c653 Author: Jörg Krause Date: Wed Jan 4 15:22:50 2017 +0100 ARM: dts: sun7i: Enable audio codec on Banana Pro This commit enables the on-chip audio codec present on the A20 SoC on the Banana Pro board. Signed-off-by: Jörg Krause Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-bananapro.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 9bbe3559b73b7710f1d198ae693373ef16c48c41 Author: Emmanuel Vadot Date: Tue Dec 27 11:28:07 2016 +0100 ARM: dts: sunxi: Add num-cs for A20 spi nodes The spi0 controller on the A20 have up to 4 CS (Chip Select) while the others three only have 1. Add the num-cs property to each node. The current driver doesn't read this property but this is useful for downstream user of DTS (FreeBSD for example). Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit b43776d65a33b460925604a27fb9360af08c55ce Author: Emmanuel Vadot Date: Tue Dec 27 11:22:38 2016 +0100 ARM: dts: sunxi: Use axp209.dtsi for Olinuxino Lime2 Use axp209.dtsi in sun7i-a20-olinuxino-lime2.dts and correct some regulators. DCDC2 is used for vdd-cpu so it should never be bellow 1V and above 1.4V DCDC3 is used for VDD_INT so same as above. LD01 is used for the RTC, and should have a typical value of 1.3V LD02 is used for AVCC and should have a typical value of 3.0V LD03/4 are used for Port-E/Port-G Power pin, and the schematics recommands to set them to 2.8V as they can be used for CSI0/1. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 90 ++++++++++++------------- 1 file changed, 42 insertions(+), 48 deletions(-) commit 53e32e703270356cc75c20338bc7ed0f36f8aa8e Author: Icenowy Zheng Date: Thu Dec 22 04:02:35 2016 +0800 ARM: dts: sun5i: add support for Lichee Pi One board Lichee Pi One is a low-cost Allwinner A13-based development board, with an AXP209 PMU, a USB2.0 OTG port, a USB2.0 host port (or an onboard RTL8723BU Wi-Fi card), optional headers for LCD and CSI, two GPIO headers and two MicroSD card slots (connected to mmc0 and mmc2, both bootable). Add support for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun5i-a13-licheepi-one.dts | 224 +++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) commit 3e60eb446d2c3cd5c34829e49d1d3799a233b618 Author: Icenowy Zheng Date: Thu Dec 22 04:02:33 2016 +0800 dt-bindings: add vendor prefix for Lichee Pi Lichee Pi is a new "Pi"-named development board series. Currently available device, Lichee Pi One, is by only one person as night job, so the device series name is chosen to be the vendor prefix. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e6c5bfeaf2eebeb4a7720ec5ced25fc9fbac3115 Author: Icenowy Zheng Date: Thu Dec 22 04:02:34 2016 +0800 ARM: dts: sun5i: add a pinctrl node for 4bit mmc2 Some board only use 4bit mode of mmc2. Add a pinctrl node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit ccb4e689ab8ad86f32a733de9b3afd52bfcc84a5 Author: Marcus Cooper Date: Tue Dec 20 16:55:42 2016 +0100 ARM: dts: sun4i: A1000: add axp209 regulator nodes This patch adds the regulator nodes for the axp209 by including the axp209 dtsi. DCDC2 is used as the cpu power supply. This patch also references it from the cpu node. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 63b31ba2404883b675faa925a358da0bf4832c16 Author: Marcus Cooper Date: Tue Dec 20 11:40:37 2016 +0100 ARM: dts: sun6i: Add the SPDIF block to the A31 Add the SPDIF transceiver controller block to the A31 dtsi. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5f396b1d391aec855c89d0fc13c08181fc1d7150 Author: Marcus Cooper Date: Tue Dec 20 11:40:36 2016 +0100 ARM: dts: sun6i: Add SPDIF TX pin to the A31 Add the SPDIF TX pin to the A31 dtsi. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit ecdf526224c79a5e5b414981befb1b0affdba2da Author: Marcus Cooper Date: Tue Dec 20 11:23:44 2016 +0100 ARM: dts: sun6i: Mele I7: Enable internal audio codec The Mele I7 has an audio jack for the SoC's internal codec. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31-i7.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit b5fa16b62042382a72e09d2a463fe41914f62b96 Author: Icenowy Zheng Date: Tue Dec 20 13:58:26 2016 +0800 ARM: dts: sun8i: add a delay after reset xr819 on Orange Pi Zero XR819 seems to need a delay after its reset line to be deasserted, otherwise it may not respond MMC commands correctly, and fail to initialize. Add a 200ms delay in the mmc-pwrseq. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 1 + 1 file changed, 1 insertion(+) commit 03749eb88e635ad67818827adde8e5eea7b64571 Author: Icenowy Zheng Date: Fri Dec 16 02:27:54 2016 +0800 ARM: dts: sun8i: add opp-v2 table for A33 An operating point table is needed for the cpu frequency adjusting to work. The operating point table is converted from the common value in extracted script.fex from many A33 board/tablets. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 90f6e8f4a32d7b69c260403c45fd58b34ff68b2b Author: Icenowy Zheng Date: Tue Dec 13 23:22:51 2016 +0800 ARM: dts: sun8i: set cpu-supply in reference tablet DTSI All reference design A33 tablets uses DCDC2 of AXP223 as the power supply of the Cortex-A7 cores. Set the cpu-supply in the DTSI of sun8i reference tablets. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 7d1be43fe08969da84567ebb55f779e32aaf4229 Author: Icenowy Zheng Date: Tue Dec 13 23:22:49 2016 +0800 ARM: dts: sun8i: add a cpu0 label to cpu@0 node on A23/33 A "cpu0" label is needed on cpu@0 for cpufreq-dt to work. Add such a label, in order to prepare for cpufreq support of A23/33. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 054e52fb6043f5cbb403cdab5852f3592ff7685a Author: Icenowy Zheng Date: Fri Dec 2 23:05:13 2016 +0800 ARM: dts: sunxi: add support for Orange Pi Zero board Orange Pi Zero is a board that came with the new Allwinner H2+ SoC and a SDIO Wi-Fi chip by Allwinner (XR819). Add a device tree file for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 159 ++++++++++++++++++++++ 2 files changed, 160 insertions(+) commit b67379a6ac02f25a5b4ae940e3479e442aa19111 Author: Chen-Yu Tsai Date: Thu Nov 24 19:29:08 2016 +0800 ARM: dts: sun6i: hummingbird: Enable USB OTG The A31 Hummingbird has a mini USB OTG port, and uses GPIO pins from the SoC for ID pin and VBUS detection and VBUS control. The PMIC can also do VBUS detection and control. Here we prefer to use the PMIC's DRIVEVBUS function to control VBUS for USB OTG, as that is the hardware default. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 80ee72e7e9acee39e66db4037a2235f23236ab94 Author: Chen-Yu Tsai Date: Thu Nov 17 17:34:38 2016 +0800 ARM: dts: sunxi: Explicitly enable pull-ups for MMC pins In the past, all the MMC pins had allwinner,pull = ; which was actually a no-op. We were relying on U-boot to set the bias pull up for us. These properties were removed as part of the fix up to actually support no bias on the pins. During the transition some boards experienced regular MMC time-outs during normal operation, while others completely failed to initialize the SD card. Given that MMC starts in open-drain mode and the pull-ups are required, it's best to enable it for all the pin settings. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 1 + arch/arm/boot/dts/sun5i.dtsi | 1 + arch/arm/boot/dts/sun6i-a31.dtsi | 4 ++++ arch/arm/boot/dts/sun7i-a20.dtsi | 2 ++ arch/arm/boot/dts/sun8i-a23-a33.dtsi | 3 +++ arch/arm/boot/dts/sun8i-a83t.dtsi | 1 + arch/arm/boot/dts/sun8i-h3.dtsi | 3 +++ arch/arm/boot/dts/sun9i-a80.dtsi | 3 +++ 8 files changed, 18 insertions(+) commit 7896dfb0a6180beb51bf34b32c9427984cb052c4 Author: Parav Pandit Date: Tue Jan 10 17:51:48 2017 +0000 rdmacg: Fixed uninitialized current resource usage Fixed warning reported by kbuild test robot. When reading current resource usage value, when no resources are allocated, its possible that it can report a uninitialized value for current resource usage. This fix avoids it by initializing it to zero as no resource is allocated. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo kernel/cgroup/rdma.c | 2 ++ 1 file changed, 2 insertions(+) commit 20c56e595cd781b5305562c9bf8289d8d5e47c63 Author: Hans Ragas Date: Tue Jan 10 17:42:34 2017 +0000 cgroup: Add missing cgroup-v2 PID controller documentation. Signed-off-by: Hans Ragas Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 83a1e53f392075e291a90746241dce45c6f9429a Author: Seung-Woo Kim Date: Mon Dec 12 17:35:26 2016 +0900 Smack: ignore private inode for file functions The access to fd from anon_inode is always failed because there is no set xattr operations. So this patch fixes to ignore private inode including anon_inode for file functions. It was only ignored for smack_file_receive() to share dma-buf fd, but dma-buf has other functions like ioctl and mmap. Reference: https://lkml.org/lkml/2015/4/17/16 Signed-off-by: Seung-Woo Kim Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 805b65a80bed029572c6462cc4be0a260e1482e9 Author: Rafal Krypa Date: Fri Dec 9 14:03:04 2016 +0100 Smack: fix d_instantiate logic for sockfs and pipefs Since 4b936885a (v2.6.32) all inodes on sockfs and pipefs are disconnected. It caused filesystem specific code in smack_d_instantiate to be skipped, because all inodes on those pseudo filesystems were treated as root inodes. As a result all sockfs inodes had the Smack label set to floor. In most cases access checks for sockets use socket_smack data so the inode label is not important. But there are special cases that were broken. One example would be calling fcntl with F_SETOWN command on a socket fd. Now smack_d_instantiate expects all pipefs and sockfs inodes to be disconnected and has the logic in appropriate place. Signed-off-by: Rafal Krypa Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c9d238a18baa92600ba015d6d6c2cde53f55c572 Author: Himanshu Shukla Date: Wed Nov 23 11:59:45 2016 +0530 SMACK: Use smk_tskacc() instead of smk_access() for proper logging smack_file_open() is first checking the capability of calling subject, this check will skip the SMACK logging for success case. Use smk_tskacc() for proper logging and SMACK access check. Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 348dc288d4bf4c0272a46a80f97748f36916601b Author: Vishal Goel Date: Wed Nov 23 10:45:31 2016 +0530 Smack: Traverse the smack_known_list using list_for_each_entry_rcu macro In smack_from_secattr function,"smack_known_list" is being traversed using list_for_each_entry macro, although it is a rcu protected structure. So it should be traversed using "list_for_each_entry_rcu" macro to fetch the rcu protected entry. Signed-off-by: Vishal Goel Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d4f673a6988f57e6f6ccd1a3b79eee171545e08 Author: Himanshu Shukla Date: Wed Nov 23 11:59:19 2016 +0530 SMACK: Free the i_security blob in inode using RCU There is race condition issue while freeing the i_security blob in SMACK module. There is existing condition where i_security can be freed while inode_permission is called from path lookup on second CPU. There has been observed the page fault with such condition. VFS code and Selinux module takes care of this condition by freeing the inode and i_security field using RCU via call_rcu(). But in SMACK directly the i_secuirty blob is being freed. Use call_rcu() to fix this race condition issue. Signed-off-by: Himanshu Shukla Signed-off-by: Vishal Goel Signed-off-by: Casey Schaufler security/smack/smack.h | 1 + security/smack/smack_lsm.c | 32 ++++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) commit d54a197964e7eb636a0c64fb0dbdd67759eb71f2 Author: Himanshu Shukla Date: Wed Nov 23 11:58:48 2016 +0530 SMACK: Delete list_head repeated initialization smk_copy_rules() and smk_copy_relabel() are initializing list_head though they have been initialized already in new_task_smack() function. Delete repeated initialization. Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 4 ---- 1 file changed, 4 deletions(-) commit 2e962e2fec5c35b91e3b541e2b8373504bf91e27 Author: Vishal Goel Date: Wed Nov 23 10:46:57 2016 +0530 SMACK: Add new lock for adding entry in smack master list "smk_set_access()" function adds a new rule entry in subject label specific list(rule_list) and in global rule list(smack_rule_list) both. Mutex lock (rule_lock) is used to avoid simultaneous updates. But this lock is subject label specific lock. If 2 processes tries to add different rules(i.e with different subject labels) simultaneously, then both the processes can take the "rule_lock" respectively. So it will cause a problem while adding entries in master rule list. Now a new mutex lock(smack_master_list_lock) has been taken to add entry in smack_rule_list to avoid simultaneous updates of different rules. Signed-off-by: Vishal Goel Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smackfs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0c96d1f5328e834048480e4696e6867992115c33 Author: Vishal Goel Date: Wed Nov 23 10:32:54 2016 +0530 Smack: Fix the issue of wrong SMACK label update in socket bind fail case Fix the issue of wrong SMACK label (SMACK64IPIN) update when a second bind call is made to same IP address & port, but with different SMACK label (SMACK64IPIN) by second instance of server. In this case server returns with "Bind:Address already in use" error but before returning, SMACK label is updated in SMACK port-label mapping list inside smack_socket_bind() hook To fix this issue a new check has been added in smk_ipv6_port_label() function before updating the existing port entry. It checks whether the socket for matching port entry is closed or not. If it is closed then it means port is not bound and it is safe to update the existing port entry else return if port is still getting used. For checking whether socket is closed or not, one more field "smk_can_reuse" has been added in the "smk_port_label" structure. This field will be set to '1' in "smack_sk_free_security()" function which is called to free the socket security blob when the socket is being closed. In this function, port entry is searched in the SMACK port-label mapping list for the closing socket. If entry is found then "smk_can_reuse" field is set to '1'.Initially "smk_can_reuse" field is set to '0' in smk_ipv6_port_label() function after creating a new entry in the list which indicates that socket is in use. Signed-off-by: Vishal Goel Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack.h | 1 + security/smack/smack_lsm.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) commit 9d44c97384fdc04585c5d5c985fe88ba7285b5ac Author: Vishal Goel Date: Wed Nov 23 10:31:59 2016 +0530 Smack: Fix the issue of permission denied error in ipv6 hook Permission denied error comes when 2 IPv6 servers are running and client tries to connect one of them. Scenario is that both servers are using same IP and port but different protocols(Udp and tcp). They are using different SMACK64IPIN labels.Tcp server is using "test" and udp server is using "test-in". When we try to run tcp client with SMACK64IPOUT label as "test", then connection denied error comes. It should not happen since both tcp server and client labels are same.This happens because there is no check for protocol in smk_ipv6_port_label() function while searching for the earlier port entry. It checks whether there is an existing port entry on the basis of port only. So it updates the earlier port entry in the list. Due to which smack label gets changed for earlier entry in the "smk_ipv6_port_list" list and permission denied error comes. Now a check is added for socket type also.Now if 2 processes use same port but different protocols (tcp or udp), then 2 different port entries will be added in the list. Similarly while checking smack access in smk_ipv6_port_check() function, port entry is searched on the basis of both port and protocol. Signed-off-by: Vishal Goel Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack.h | 1 + security/smack/smack_lsm.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3c7ce3427106f0fa2d8593f9fd8f82c494215782 Author: Vishal Goel Date: Wed Nov 23 10:31:08 2016 +0530 SMACK: Add the rcu synchronization mechanism in ipv6 hooks Add the rcu synchronization mechanism for accessing smk_ipv6_port_list in smack IPv6 hooks. Access to the port list is vulnerable to a race condition issue,it does not apply proper synchronization methods while working on critical section. It is possible that when one thread is reading the list, at the same time another thread is modifying the same port list, which can cause the major problems. To ensure proper synchronization between two threads, rcu mechanism has been applied while accessing and modifying the port list. RCU will also not affect the performance, as there are more accesses than modification where RCU is most effective synchronization mechanism. Signed-off-by: Vishal Goel Signed-off-by: Himanshu Shukla Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit fa83b7936e9799d9cd96a26fbcba22d2baa7ae11 Author: Leon Romanovsky Date: Sun Sep 4 14:30:35 2016 +0300 RDMA/core: Unify style of IOCTL commands MAD and HFI1 have different naming convention, this patch simplifies and unifies their defines and names. As part of cleanup, the HFI1 _NUM() macro and command indexes were removed (controversial). This will cause intentional (and arguably unnecessary) breakage to the PSM user space library. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/rdma_user_ioctl.h | 98 ++++++++++++++----------------------- 1 file changed, 38 insertions(+), 60 deletions(-) commit 10b31e792e5862ad9e232d7aa2c65e7b7e46bc39 Author: Leon Romanovsky Date: Sun Sep 4 14:30:34 2016 +0300 RDMA/core: Rename RDMA magic number Rename RDMA magic number to better describe IOCTLs. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/rdma_user_ioctl.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 8edec0b55a47d667031d078f29f7a23f0a11122f Author: Leon Romanovsky Date: Sun Sep 4 14:30:33 2016 +0300 RDMA/core: Move HFI1 IOCTL declarations to common file Move HFI1 IOCTL declarations to rdma_user_ioctl.h file. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/hfi/hfi1_user.h | 55 ------------------------------------- include/uapi/rdma/rdma_user_ioctl.h | 54 ++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 55 deletions(-) commit 38e8b671bf04af09fc8de74ea857f920285bd211 Author: Leon Romanovsky Date: Sun Sep 4 14:30:32 2016 +0300 RDMA/hfi1: Avoid redeclaration error Move hfi1 ioctl definitions to a new header which can be included by both the hfi1 and qib drivers to avoid a duplicate enum definition as shown in this build error for qib: CC [M] drivers/infiniband/hw/qib/qib_sysfs.o In file included from ./include/uapi/rdma/rdma_user_ioctl.h:39:0, from include/uapi/rdma/ib_user_mad.h:38, from include/rdma/ib_mad.h:43, from include/rdma/ib_pma.h:38, from drivers/infiniband/hw/qib/qib_mad.h:37, from drivers/infiniband/hw/qib/qib_init.c:49: ./include/uapi/rdma/hfi/hfi1_user.h:370:2: error: redeclaration of enumerator ‘ur_rcvhdrtail’ ur_rcvhdrtail = 0, Move hfi1 structures to separate file to avoid this failure. The actual move of the ioctl definitions comes in a follow on patch. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/hfi/Kbuild | 1 + include/uapi/rdma/hfi/hfi1_ioctl.h | 173 +++++++++++++++++++++++++++++++++++++ include/uapi/rdma/hfi/hfi1_user.h | 120 +------------------------ 3 files changed, 175 insertions(+), 119 deletions(-) commit 06393bc39e2fdcd9ca281401f25fa3b834bca799 Author: Leon Romanovsky Date: Sun Sep 4 14:30:31 2016 +0300 RDMA/core: Move legacy MAD IOCTL declarations to common file Move legacy MAD IOCTL declarations to rdma_user_ioctl.h file. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/ib_user_mad.h | 10 ---------- include/uapi/rdma/rdma_user_ioctl.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) commit 843debb889c7a95c7f591acaed185734694b0ff7 Author: Leon Romanovsky Date: Sun Sep 4 14:30:30 2016 +0300 RDMA/core: Commonize RDMA IOCTL declarations location This patch provides one common file (rdma_user_ioctl.h) for all RDMA UAPI IOCTLs. Signed-off-by: Matan Barak Signed-off-by: Haggai Eran Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/hfi/hfi1_user.h | 2 +- include/uapi/rdma/ib_user_mad.h | 4 +--- include/uapi/rdma/rdma_user_ioctl.h | 43 +++++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) commit c72eeabd0ca8291e6e8d9ec3bb93c70125445a5d Author: Alexander Koch Date: Fri Jan 6 11:38:17 2017 +0100 hwmon: (adc128d818) Preserve operation mode Preserve chip operation mode if no mode is specified via devicetree. This enables operation when chip configuration is done by BIOS/ROMMON. Signed-off-by: Alexander Koch Acked-by: Michael Hornung Signed-off-by: Guenter Roeck drivers/hwmon/adc128d818.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fe4fbdbcddeaab58a4f9b5297f28b8a4babf6f1f Author: Suzuki K Poulose Date: Mon Jan 9 17:28:30 2017 +0000 arm64: cpufeature: Track user visible fields Track the user visible fields of a CPU feature register. This will be used for exposing the value to the userspace. All the user visible fields of a feature register will be passed on as it is, while the others would be filled with their respective safe value. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 11 ++ arch/arm64/kernel/cpufeature.c | 193 +++++++++++++++++++----------------- arch/arm64/kernel/traps.c | 2 +- 3 files changed, 113 insertions(+), 93 deletions(-) commit 4e1796c892136f9a020f629da39076afd6b50429 Author: Alexander Koch Date: Fri Jan 6 11:38:16 2017 +0100 hwmon: (adc128d818) Support operation modes 1-3 Add support for operation modes 1-3 of the ADC128D818 (see datasheet sec. 8.4.1). These differ in the number and type of the available input signals, requiring the driver to selectively hide sysfs nodes according to the operation mode configured via devicetree. Signed-off-by: Alexander Koch Acked-by: Michael Hornung Signed-off-by: Guenter Roeck drivers/hwmon/adc128d818.c | 126 +++++++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 40 deletions(-) commit 8c2dcbd2c4443bad0b4242fb62baa47b260b8f79 Author: Suzuki K Poulose Date: Mon Jan 9 17:28:29 2017 +0000 arm64: Add helper to decode register from instruction Add a helper to extract the register field from a given instruction. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 2 ++ arch/arm64/kernel/insn.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit c9ee0f98662a6e358b5f2969755c938ce9c3a63a Author: Suzuki K Poulose Date: Mon Jan 9 17:28:28 2017 +0000 arm64: cpufeature: Define helpers for sys_reg id Define helper macros to extract op0, op1, CRn, CRm & op2 for a given sys_reg id. While at it remove the explicit masking only used for Op0. Cc: Catalin Marinas Cc: Mark Rutland Cc: Will Deacon Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 156e0d57f8bc9a4c0f09f4f79af7b51c6d7d0600 Author: Suzuki K Poulose Date: Mon Jan 9 17:28:27 2017 +0000 arm64: cpufeature: Document the rules of safe value for features Document the rules for choosing the safe value for different types of features. Cc: Dave Martin Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit eab43e88734f4ef8cb5ec40827bf784400ed8ffc Author: Suzuki K Poulose Date: Mon Jan 9 17:28:26 2017 +0000 arm64: cpufeature: Cleanup feature bit tables This patch does the following clean ups : 1) All undescribed fields of a register are now treated as 'strict' with a safe value of 0. Hence we could leave an empty table for describing registers which are RAZ. 2) ID_AA64DFR1_EL1 is RAZ and should use the table for RAZ register. 3) ftr_generic32 is used to represent a register with a 32bit feature value. Rename this to ftr_singl32 to make it more obvious. Since we don't have a 64bit singe feature register, kill ftr_generic. Based on a patch by Mark Rutland. Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 564279ff6f1f4c5eba95f4addd6acd7b1531a653 Author: Mark Rutland Date: Mon Jan 9 17:28:25 2017 +0000 arm64: cpufeature: remove explicit RAZ fields We currently have some RAZ fields described explicitly in our arm64_ftr_bits arrays. These are inconsistently commented, grouped, and/or applied, and maintaining these is error-prone. Luckily, we don't need these at all. We'll never need to inspect RAZ fields to determine feature support, and init_cpu_ftr_reg() will ensure that any bits without a corresponding arm64_ftr_bits entry are treated as RES0 with strict matching requirements. In check_update_ftr_reg() we'll then compare these bits from the relevant cpuinfo_arm64 structures, and need not store them in a arm64_ftr_reg. This patch removes the unnecessary arm64_ftr_bits entries for RES0 bits. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 15 --------------- 1 file changed, 15 deletions(-) commit b389d7997acb9c95331322c54ebf45a3bb97ff7b Author: Mark Rutland Date: Mon Jan 9 17:28:24 2017 +0000 arm64: cpufeature: treat unknown fields as RES0 Any fields not defined in an arm64_ftr_bits entry are propagated to the system-wide register value in init_cpu_ftr_reg(), and while we require that these strictly match for the sanity checks, we don't update them in update_cpu_ftr_reg(). Generally, the lack of an arm64_ftr_bits entry indicates that the bits are currently RES0 (as is the case for the upper 32 bits of all supposedly 32-bit registers). A better default would be to use zero for the system-wide value of unallocated bits, making all register checking consistent, and allowing for subsequent simplifications to the arm64_ftr_bits arrays. This patch updates init_cpu_ftr_reg() to treat unallocated bits as RES0 for the purpose of the system-wide safe value. These bits will still be sanity checked with strict match requirements, as is currently the case. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a45923c27de4a101e846795d76420936b62bb659 Author: Alexander Koch Date: Fri Jan 6 11:38:15 2017 +0100 hwmon: (adc128d818) Implement mode selection via dt Implement operation mode selection using the optional 'ti,mode' devicetree property (see [1]). The ADC128D818 supports four operation modes differing in the number and type of input readings (see datasheet, sec. 8.4.1), of which mode 0 is the default. We only add handling of the 'ti,mode' property here, the driver still supports nothing else than the default mode 0. [1] Documentation/devicetree/bindings/hwmon/adc128d818.txt Signed-off-by: Alexander Koch Acked-by: Michael Hornung Signed-off-by: Guenter Roeck drivers/hwmon/adc128d818.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit bbcf37d73c2d3b4fa1a5781c992289b9a90c1480 Author: Alexander Koch Date: Fri Jan 6 11:38:14 2017 +0100 devicetree: hwmon: Add bindings for ADC128D818 Add bindings documentation for the ADC128D818 driver, featuring default I2C properties along with the optional 'mode' property for chip operation mode selection (see datasheet, sec. 8.4.1). Signed-off-by: Alexander Koch Acked-by: Michael Hornung Acked-by: Rob Herring [groeck: Fixed whitespace error] Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/adc128d818.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 24333ac26d01aab4cee8e1c137c34b97ab294b19 Author: Jeroen De Wachter Date: Mon Jan 9 18:55:00 2017 +0100 hwmon: (tmp401) use smb word operations instead of 2 smb byte operations tmp401 separately read/wrote high and low bytes of temperature values while the hardware supports reading/writing those values in one operation. Driver has been modified to use word operations where possible. Tested with a tmp432 sensor on a mips64 platform. Signed-off-by: Jeroen De Wachter Signed-off-by: Guenter Roeck drivers/hwmon/tmp401.c | 49 ++++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) commit 87cdfa9d60f4f40e6d71b04b10b36d9df3c89282 Author: Guenter Roeck Date: Tue Dec 27 14:15:07 2016 -0800 hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes Writes into limit attributes can overflow due to multplications and additions with unbound input values. Writing into fan limit attributes can result in a crash with a division by zero if very large values are written and the fan divider is larger than 1. Signed-off-by: Guenter Roeck drivers/hwmon/gl520sm.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit f80e868cb92aa68b775c1aee434b440475f62d61 Author: Guenter Roeck Date: Tue Dec 27 14:15:06 2016 -0800 hwmon: (gl518sm) Fix overflows seen when writing into limit attributes Writes into limit attributes can overflow due to additions and multiplications with unchecked parameters. Signed-off-by: Guenter Roeck drivers/hwmon/gl518sm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 07cc189d160ba962c5d9078453929ffac0e739f3 Author: Guenter Roeck Date: Tue Dec 27 14:15:05 2016 -0800 hwmon: (dme1737) Fix overflows seen when writing into limit attributes Writes into voltage limit, temperature limit, temperature hysteresis, and temperature zone attributes can overflow due to unclamped parameters to multiplications, additions, and subtractions. Cc: Juerg Haefliger Signed-off-by: Guenter Roeck drivers/hwmon/dme1737.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 18ff854e8e30a275af9f4e7c15776d23429ae737 Author: Scott Matheina Date: Mon Jan 9 22:42:53 2017 -0600 staging:vt6656:main_usb.c Removed un-needed blank lines Fixed the following checkpatch warnings by deleting blank lines Blank lines aren't necessary before a close brace '}' Blank lines aren't necessary after an open brace '{' Please don't use multiple blank lines Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 4 ---- 1 file changed, 4 deletions(-) commit c6bf6d2d202bc5972252744d82a927585f41049f Author: Scott Matheina Date: Mon Jan 9 22:42:52 2017 -0600 staging:vt6656:main_usb.c Aligned code to match open parenthesis Fixed Alignment should match open parenthesis from checkpatch Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 59 ++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 28 deletions(-) commit 0ef48913354eb22dd5e5c908d34a6690eca6e1b2 Author: Scott Matheina Date: Mon Jan 9 22:42:51 2017 -0600 staging:vt6656:mac.c Aligned code to match open parenthesis Fixed Alignment should match open parenthesis checkpatch CHECK Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/mac.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 5e38e15e689b3c3251cca9c2977f550ace1b5ccb Author: Scott Matheina Date: Mon Jan 9 22:42:50 2017 -0600 staging:vt6656:key.c Aligned code with open parenthesis Fixed Alignment should match open parenthesis checkpatch CHECK Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/key.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b33050d0699560e4933be693e4956f917728c97d Author: Stefan Wahren Date: Sun Jan 8 18:15:18 2017 +0000 staging: vc04_services: Fix space issues This fixes the space coding styles issues complained by checkpatch. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 14 +++++++------- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- .../vc04_services/interface/vchiq_arm/vchiq_kern_lib.c | 6 +++--- .../staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) commit f306ed07d1b5ac2a97173db3a05b3acb4203d251 Author: Stefan Wahren Date: Sun Jan 8 18:15:17 2017 +0000 staging: vc04_services: Fix indentation This should fix the indentation issues found by checkpatch. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../interface/vchiq_arm/vchiq_2835_arm.c | 42 +++++++++++----------- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 +-- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 2 +- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 24 ++++++------- .../interface/vchiq_arm/vchiq_kern_lib.c | 8 ++--- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 22 ++++++------ 6 files changed, 52 insertions(+), 50 deletions(-) commit 946d61ace1f42661c3b85c303a34469bdec770cd Author: Stefan Wahren Date: Sun Jan 8 18:15:16 2017 +0000 staging: vc04_services: Drop vchiq_2835.h There is no need for a vchiq_2835.h with its 2 local defines. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_2835.h | 42 ---------------------- .../interface/vchiq_arm/vchiq_2835_arm.c | 5 ++- 2 files changed, 4 insertions(+), 43 deletions(-) commit 698c4eba862fd9f1ed430cc9c62aab7247698fa8 Author: Stefan Wahren Date: Sun Jan 8 18:15:15 2017 +0000 staging: vc04_services: Improve readability of kthread names This patch tries to make the kernel thread names of vchiq a little bit more self explaining and look closer to the existing ones: slot handler: VCHIQ-%d -> vchiq-slot/%d recycle thread: VCHIQr-%d -> vchiq-recy/%d sync thread: VCHIQs-%d -> vhciq-sync/%d keep-alive thread: VCHIQka-%d -> vchiq-keep/%d Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 364d26f1509537aa334e4e8d022212c9f26511c0 Author: Stefan Wahren Date: Sun Jan 8 18:15:14 2017 +0000 staging: vc04_services: Use preferred kernel types This patch fixes issues reported by checkpatch.pl about preferred kernel types. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 +++++----- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit 943166738272224ed7f1a0d9f74761af8c3e7814 Author: Stefan Wahren Date: Sun Jan 8 18:15:13 2017 +0000 staging: vchiq_core: make local spinlock static The quota_spinlock is only local. So make it static. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b19dae1d2fcbcd557547dd05dc5ef77e829e817b Author: Stefan Wahren Date: Sun Jan 8 18:15:11 2017 +0000 staging: vchiq_core: remove unused variable type This variable is assigned a value, but never used. So remove it. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 -- 1 file changed, 2 deletions(-) commit c5520ee07466a733860bb6bbba35b76ef1a176c7 Author: Stefan Wahren Date: Sun Jan 8 18:15:12 2017 +0000 staging: vc04_services: make local functions static The functions vchiq_dump_shared_state() and vchiq_is_connected() are only used locally. So make them static. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c98a5a0f1ced92505875091407d8fae0eab3aac6 Author: Stefan Wahren Date: Sun Jan 8 18:15:10 2017 +0000 staging: vchiq_arm: remove vchiq_platform_check_resume This function is never used, so we could remove it. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 46 ---------------------- 1 file changed, 46 deletions(-) commit 8bfea03410c33372e881eea95bfa3311d172999c Author: Yamanappagouda Patil Date: Sat Jan 7 20:25:42 2017 +0530 staging: rtl8188eu: fixed 'braces are not necessary for single statement blocks'. Fixed checkpatch.pl warnings in rtl8188eu module core folder files. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +++++--------- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_recv.c | 9 ++++----- 4 files changed, 13 insertions(+), 18 deletions(-) commit 1dfcda6fe7edf7eaaa0b884601bfc342eece619c Author: Scott Matheina Date: Mon Jan 9 20:23:27 2017 -0600 staging:sm750fb:ddk750_chip.c removes un-necessary blank lines Fixes checkpatch warning - Please don't use multiple blank lines Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 3 --- 1 file changed, 3 deletions(-) commit 87f0f086c640c1f54d39a5276825b837c33cee64 Author: Scott Matheina Date: Mon Jan 9 20:23:26 2017 -0600 staging:sm750fb:ddk750_chip.c Adds braces to last arm of statement Fixes absence of braces on last arm of statement, identified by checkpatch Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3dd312b464a12fca1849e549a869ac211fbad4c8 Author: Scott Matheina Date: Mon Jan 9 20:10:00 2017 -0600 staging:rtl8192u:r819xU_cmdpkt.c Removes un-necessary blank lines Fixes checkpatch.pl warning - Blank lines aren't necessary before a close brace '}' & Please don't use multiple blank lines Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_cmdpkt.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 5b2696c1210721848f74632daf19d36c760923a3 Author: Scott Matheina Date: Mon Jan 9 20:09:59 2017 -0600 staging:rtl8192u:r819xU_cmdpkt.c Fix Alignment should match open parenthesis Fixes Alignment should match open parenthesis in checkpatch Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_cmdpkt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 08a36974c0100f97b73da2d64cf7ae415dd382c5 Author: Emmanuil Chatzipetru Date: Sun Jan 8 14:37:07 2017 +0100 staging: olpc_dcon: olpc_dcon_xo_1_5: Remove multiple blank lines. This issue is caught by checkpatch.pl and is related to the following warning: - CHECK: Please don't use multiple blank lines Signed-off-by: Emmanuil Chatzipetru Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 1 - 1 file changed, 1 deletion(-) commit 8862ce68a8e0a38a0ad93fadb1ae50e35e740e71 Author: Emmanuil Chatzipetru Date: Sun Jan 8 14:37:06 2017 +0100 staging: olpc_dcon: olpc_dcon: Fix spaces between operator and variables. This issue is caught by checkpatch.pl and is related to the following warning: - CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Emmanuil Chatzipetru Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c7faa54091e8036c814f84aaf69045138ec9b6 Author: Emmanuil Chatzipetru Date: Sun Jan 8 14:37:05 2017 +0100 staging: olpc_dcon: olpc_dcon_xo_1_5: Remove redundant return statement. dcon_was_irq(); should return a boolean value if PMIO_Rx50[6] is either set or unset, which is evaluated in the first return statement. Therefore, the following return statement is redundant and thus, removed. Signed-off-by: Emmanuil Chatzipetru Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5f6791ec5a0498a2ae562e410b91a2dc8b885962 Author: Emmanuil Chatzipetru Date: Sun Jan 8 14:37:04 2017 +0100 staging: olpc_dcon: olpc_dcon: Fix open parenthesis alignment. This issue is caught by checkpatch.pl and is related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cee9ba1c30d05171edf9db9374e28481896cea34 Author: Abdul Rauf Date: Sun Jan 8 02:45:59 2017 +0000 staging: sm750fb: fix checkpatch 80 characters warning Fix the following warnings: line over 80 characters Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c7c5722d16fe73e1f8b0905e8bbda5f8f6e2c53b Author: Abdul Rauf Date: Sun Jan 8 02:45:22 2017 +0000 staging: sm750fb: fix checkpatch multiple blank lines check Fix the following checks: Please don't use multiple blank lines Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 1 - 1 file changed, 1 deletion(-) commit 9c1852b459f04f6309e40d1d167512b0a5598529 Merge: 9b41da8 7ce7d89 Author: Mark Brown Date: Tue Jan 10 16:39:52 2017 +0000 Merge tag 'v4.10-rc1' into asoc-samsung Linux 4.10-rc1 commit 5dc6f89da13cdcf85996455b8e8618fe81de5a4b Author: Cheah Kok Cheong Date: Sat Jan 7 19:13:12 2017 +0800 Staging: comedi: comedi_fops: Remove unused stat.h header Unused after commit 6e3029397698 ("staging: comedi: comedi_fops: coding style fixes") - Fixed coding style in comedi_fops.c Symbolic to octal permission. Anyway it's included in module.h Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) commit 38d14bdbe74d644f98f203ffcfe68ccc12a9fb35 Author: Cheah Kok Cheong Date: Sat Jan 7 19:13:11 2017 +0800 Staging: comedi: comedi_fops: Remove unused vmalloc.h header Unused after commit d18431325be0 ("staging: comedi: deprecate loading firmware with comedi_config"). Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) commit 7bfe956c78b07d072df6b78b82417a11dff52bb7 Author: Cheah Kok Cheong Date: Sat Jan 7 19:13:10 2017 +0800 Staging: comedi: comedi_fops: Remove redundant init.h header After commit 0fd972a7d91d ("module: relocate module_init from init.h to module.h"), including module.h will do and init.h is also thrown in. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) commit 79adc3577e6d3c03e0ccf6b9f5a4731207ca1ea7 Author: Cheah Kok Cheong Date: Sat Jan 7 19:13:09 2017 +0800 Staging: comedi: comedi_fops: Remove unused kmod.h header Unused after commit f30f2c2d417b ("staging: comedi: remove check for CONFIG_KMOD"). Anyway it's included in module.h Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) commit aa72f35ea6f250aacdea5d14094bd323837c1d51 Author: Ian Abbott Date: Wed Jan 4 10:55:47 2017 +0000 staging: comedi: daqboard2000: use pci_id_table 'driver_data' The driver's COMEDI "auto-attach" handler `db2k_auto_attach()` calls `db2k_find_boardinfo()` to find an element of our board information array `db2k_boardtypes[]` that matches the probed PCI device. The driver's PCI device table matches several boards in the DaqBoard/2000 series that match a single PCI vendor and device ID combination. `db2k_find_boardinfo()` uses the probed PCI device's subvendor and subdevice IDs to find the matching board information, returning `NULL` for no match. Change the driver's PCI device table `db2k_pci_table[]` to match supported PCI vendor, device, subvendor and subdevice IDs, and set the `.driver_data` member of each element to the index of the matching element of `db2k_boardtypes[]`. That index gets passed through to the COMEDI auto-attach handler `db2k_auto_attach()`. Use it to index directly into `db2k_boardtypes[]` instead of calling `db2k_find_boardinfo()` to find the match. Use array index designators in the initializer of `db2k_boardtypes[]`. Use enumerated constants defined by new type `enum db2k_boardids` to name the board type indices. The `id` member of `struct db2k_boardtype` is no longer used, so remove it. Also remove the subdevice ID macros `DB2K_SUBSYSTEM_IDS2` and `DB2K_SUBSYSTEM_IDS4` as the subdevice IDs are now specified as numbers in the PCI device table. Remove `db2k_find_boardinfo()` as it is no longer used. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 46 ++++++++++----------------- 1 file changed, 16 insertions(+), 30 deletions(-) commit 41ab27de8fe79e201223a63beed1c4c9f572175b Author: Ian Abbott Date: Wed Jan 4 10:55:46 2017 +0000 staging: comedi: daqboard2000: change COMEDI device names The COMEDI device name strings are currently set to "ids2" for the DaqBoard/2000, and to "ids4" for the DaqBoard/2001. Change them to "daqboard2000" and "daqboard2001" respectively. (The COMEDI driver name string is also "daqboard2000".) Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca685dc914ad5e3591cef794064fdd9810fa3bc2 Author: Ian Abbott Date: Wed Jan 4 10:55:45 2017 +0000 staging: comedi: daqboard2000: support 4 AO channels The driver supports DaqBoard/2000 and DaqBoard/2001. DaqBoard/2000 has 2 AO channels, but DaqBoard/2001 has 4 AO channels. The driver currently only supports 2 AO channels, but supporting 4 channels is just a case of setting the `n_chan` member of the COMEDI subdevice to 4 instead of 2. Add a new boolean flag member `has_2_ao` to `struct db2k_boardtype` to be set to `true` if the board only has 2 AO channels. Set this to `true` in the element of `db2k_boardtypes[]` that corresponds to the DaqBoard/2000. Use it in `db2k_auto_attach()` to initialize the number of AO channels to 2 or 4, as appropriate. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 54e22bbf11ca88e7263909ea68df7da0477685b0 Author: Ian Abbott Date: Wed Jan 4 10:55:44 2017 +0000 staging: comedi: daqboard2000: use designated initializers Replace the undesignated initializers for each element of `db2k_boardtypes[]` with an equivalent designated initializer for ease of future maintenance. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 852d3f917a62ade15791cfdacb310d7a73bce034 Author: Ian Abbott Date: Wed Jan 4 10:55:43 2017 +0000 staging: comedi: daqboard2000: use shorter, consistent prefix Use a consistent prefix of `db2k_` or `DB2K_` for identifiers. The existing prefixes `DAQBOARD2000_` and `daqboard2000_` are a bit on the lengthy side. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 214 ++++++++++++-------------- 1 file changed, 100 insertions(+), 114 deletions(-) commit 1c5a6eab8b2e20862000d11aecf2f3a46931f3f8 Author: Ian Abbott Date: Wed Jan 4 10:55:42 2017 +0000 staging: comedi: daqboard2000: remove unused 'card' member The `card` member of `struct daqboard2000_private` and the enumerated constant `card_daqboard_2000` are not used. Remove them. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 3 --- 1 file changed, 3 deletions(-) commit fba4e898b9c8b1eeca2fef4f159e571ce959a2be Author: Ian Abbott Date: Wed Jan 4 10:55:41 2017 +0000 staging: comedi: daqboard2000: check CPLD status before writing firmware data According to an old GPL'ed driver at , The CPLD status register can be checked to make sure that it is ready to accept the next 16-bit word of FPGA firmware data, but that doesn't work on older versions of the CPLD, where a simple delay should be used between successive writes. The current version of the Comedi driver just uses a delay between successive writes. Change it to check for the newer CPLD in the `daqboard2000_load_firmware()`, and change the firmware word writing function `daqboard2000_write_cpld()` to wait for the status bit (`DB2K_CPLD_STATUS_TXREADY`, previously called `DB2K_CPLD_TXDONE`) to be set for newer CPLD, or just delay for older CPLD. Return an error if it times out waiting for the status bit. The wait for the `DB2K_CPLD_STATUS_TXREADY` status bit to be set is performed by new function `daqboard2000_wait_cpld_txready()`, which returns 0 if the status bit is set within 100 microseconds, or `-ETIMEDOUT` if not. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 41 ++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 7 deletions(-) commit f8d7b3b2f921ca5194a239a13b29b31bcfccd303 Author: Ian Abbott Date: Wed Jan 4 10:55:40 2017 +0000 staging: comedi: daqboard2000: check result of FPGA programming According to an old, GPL'ed Linux driver at , after programming the FPGA, the General Purpose Input (USERI) of the PLX PCI-9080 should go high shortly after a valid FPGA bitstream has been loaded. Add a new function `daqboard2000_wait_fpga_programmed()` to wait for that, performing up to 200 checks over a 20 ms period (this is loosely based on `pollFPGADone()` in the above-mentioned old driver). Return 0 if the FPGA appears to have loaded successfully, or `-ETIMEDOUT` if it runs out of checks. Call it from the firmware loading callback `daqboard2000_load_firmware()` after writing the firmware to the FPGA to check it is programmed successfully. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7680a227293676eec528e4ef966769e65275d697 Author: Ian Abbott Date: Wed Jan 4 10:55:39 2017 +0000 staging: comedi: daqboard2000: change daqboard2000_write_cpld() return value `daqboard2000_write_cpld()` currently returns 1 on success, or 0 on failure. Change it to return 0 on success, or `-EIO` on failure. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 90bc9cb34bc211a87aefab3c4392969311648087 Author: Ian Abbott Date: Wed Jan 4 10:55:38 2017 +0000 staging: comedi: daqboard2000: replace daqboard2000_poll_cpld() `daqboard2000_poll_cpld()` waits for a specified status bit in the CPLD status register to be set, giving up after 50 tries over a period of about 5 milliseconds. It returns 1 if the status bit is set, otherwise 0. It is only ever called to check the "INIT" status bit. Replace it with new function `daqboard2000_wait_cpld_init()`, which returns 0 if the "INIT" status bit becomes set within 50 tries, or `-ETIMEDOUT` if not set within 50 tries. The firmware loading callback `daqboard2000_load_firmware()` may return the error result from `daqboard2000_wait_cpld_init()` if it has used up all its firmware loading attempts and that was the last error. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 33 +++++++++++++++------------ 1 file changed, 18 insertions(+), 15 deletions(-) commit 7cff0b776a7a5d60b9323ece37619ef95e92d12e Author: Ian Abbott Date: Wed Jan 4 10:55:37 2017 +0000 staging: comedi: daqboard2000: check firmware length Firmware files for DAQBoard/2000 have a header, which is skipped, followed by a sequence of FPGA configuration bytes to be programmed in pairs. The FPGA configuration bytes start with the sequence 0xff, 0x20. Make the firmware loading callback function `daqboard2000_load_firmware()` return an error `-EINVAL` if the FPGA start sequence is not found, or the remaining length is not a multiple of 2. The firmware loading callback tries to program the FPGA up to 3 times until it succeeds or it has tried too many times. Currently, it searches for the FPGA start sequence in the firmware data each time through the retry loop. Change it to adjust the start position and length before entering the loop. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 3bc3a8239009d6eac56e5076ea5e3eef2b61cd9b Author: Ian Abbott Date: Wed Jan 4 10:55:36 2017 +0000 staging: comedi: daqboard2000: use type 'u16' for CPLD data and status The CPLD status and data registers used to load firmware are 16 bits wide. Use the type `u16` to represent data and status values instead of `int`. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1736bcf3c53fee7331279060556fa60b6e9f4b2d Author: Ian Abbott Date: Wed Jan 4 10:55:35 2017 +0000 staging: comedi: daqboard2000: define macros for CPLD registers The Daqboard/2000 uses a write-only data register and a read-only status register in a pre-programmed CPLD device to program the main firmware on the board. Both registers are at offset 0x1000 from PCI BAR 2. Define macros for the register offsets. Rename the existing macros for the status register values for consistency. (Two status bits are defined, but the driver code only seems to use one of them.) Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 1d7f14dd927a05777532abd0962b40e728ae1d67 Author: Ian Abbott Date: Wed Jan 4 10:55:34 2017 +0000 staging: comedi: daqboard2000: use macros from "plx9080.h" The Daqboard/2000 uses a PLX PCI-9080 chip to interface with the PCI bus. The "daqboard2000" driver uses the PCI-9080 "CNTRL" register to perform various tasks, but defines its own macros for the register values. Use the macros from "plx9080.h" instead. The various functions that change the CNTRL register just wiggle individual bits up and down, but they ignore the current register value - the old macros defined the full value to be written to the register. Change them to read and modify the register value. Also remove a read of the CNTRL register in `daqboard2000_auto_attach()` where the value is just thrown away, as it seems to serve no purpose there (such as flushing PCI writes). Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/daqboard2000.c | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 168400d0e93e5d08c16bec538335ab1c906a43a3 Author: Markus Buettner Date: Mon Jan 9 17:43:31 2017 +0100 staging: wlan-ng: remove unnecessary blank lines checkpatch.pl complained about two unnecessary blank lines after an opening '{' in prism2mib.c. Those were removed in order to get rid of those warnings. There are more issues pointed out by checkpatch.pl. Those require additional work to be done. Signed-off-by: Markus Buettner Signed-off-by: Artur Wasinger Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mib.c | 2 -- 1 file changed, 2 deletions(-) commit f4535f4eaedd3ac0982f6e6708a008b866069a50 Author: Derek Robson Date: Mon Jan 9 17:35:57 2017 +1300 Staging: speakup: style fix, octal file permissions Changed file permission to octal style, Can't use __ATTR_RW() as the handler is in standard format. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 05a157403cb09ac32f70d77532e923fbfb39eb03 Author: Aditya Shankar Date: Mon Jan 9 11:42:15 2017 +0530 staging: wilc1000: Connect to highest RSSI value for required SSID Connect to the highest rssi with the required SSID in the shadow table if the connection criteria is based only on the SSID. For the first matching SSID, an index to the table is saved. Later the index is updated if matching SSID has a higher RSSI value than the last saved index. However if decision is made based on BSSID, there is only one match in the table and corresponding index is used. changes in v2: initialize sel_bssi_idx to UINT_MAX. Combine two checks for identifying sel_bssi_idx value for a SSID. Signed-off-by: Aditya Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 246ee524a2846fc0f32b8ac9d846bc93e38851e8 Author: Tomeu Vizoso Date: Tue Jan 10 14:43:05 2017 +0100 drm/i915: Put "cooked" vlank counters in frame CRC lines Use drm_accurate_vblank_count so we have the full 32 bit to represent the frame counter and userspace has a simpler way of knowing when the counter wraps around. Signed-off-by: Tomeu Vizoso Reviewed-by: Emil Velikov Reviewed-by: Robert Foss Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170110134305.26326-3-tomeu.vizoso@collabora.com drivers/gpu/drm/i915/i915_irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c6b709d96cb99777d06c35142e9c3d0dfd8ddb6 Author: Tomeu Vizoso Date: Tue Jan 10 14:43:04 2017 +0100 drm/i915: Use new CRC debugfs API The core provides now an ABI to userspace for generation of frame CRCs, so implement the ->set_crc_source() callback and reuse as much code as possible with the previous ABI implementation. When handling the pageflip interrupt, we skip 1 or 2 frames depending on the HW because they contain wrong values. For the legacy ABI for generating frame CRCs, this was done in userspace but now that we have a generic ABI it's better if it's not exposed by the kernel. v2: - Leave the legacy implementation in place as the ABI implementation in the core is incompatible with it. v3: - Use the "cooked" vblank counter so we have a whole 32 bits. - Make sure we don't mess with the state of the legacy CRC capture ABI implementation. v4: - Keep use of get_vblank_counter as in the legacy code, will be changed in a followup commit. v5: - Skip first frame or two as it's known that they contain wrong data. - A few fixes suggested by Emil Velikov. v6: - Rework programming of the HW registers to preserve previous behavior. v7: - Address whitespace issue. - Added a comment on why in the implementation of the new ABI we skip the 1st or 2nd frames. v9: - Add stub for intel_crtc_set_crc_source. v12: - Rebased. - Remove stub for intel_crtc_set_crc_source and instead set the callback to NULL (Jani Nikula). v15: - Rebased. Signed-off-by: Tomeu Vizoso Reviewed-by: Emil Velikov Reviewed-by: Robert Foss irq Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170110134305.26326-2-tomeu.vizoso@collabora.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 77 ++++++++++++++++++---------- drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 6 +++ drivers/gpu/drm/i915/intel_pipe_crc.c | 94 ++++++++++++++++++++++++++++++----- 5 files changed, 142 insertions(+), 37 deletions(-) commit f631a9704833b291cb88c6dda4230a2e68354eb6 Author: Abdul Rauf Date: Tue Jan 10 01:12:05 2017 +0000 staging: unisys: fix checkpatch block comments warning Fix the following warnings: Block comments should align the * on each line Signed-off-by: Abdul Rauf Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 134 +++++++++++++++---------------- 1 file changed, 67 insertions(+), 67 deletions(-) commit dca71b0fba23a54660ce4e4e4de9edb73bf2d1f7 Author: Derek Robson Date: Sun Jan 8 11:08:22 2017 +1300 Staging: unisys: visorbus: visorchipset.c: style fix Changed file permissions to octal sytle. Found using checkpatch. Acked-by: David Kershner Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3d76e80c7bc8a9619ddcd30f7b7f1c28ae1b154 Author: Derek Robson Date: Sun Jan 8 11:08:01 2017 +1300 Staging: unisys: visorbus: visorbus_main.c: fixed style Changed file permissions to octal sytle. Found using checkpatch. Acked-by: David Kershner Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9eedb509af8096fd81e8d33bb270d84fa6d09722 Author: Tim Sell Date: Mon Jan 9 13:02:27 2017 -0500 staging: unisys: remove redundant unlocks of visornic_devdata.priv_lock These redundant unlocks of visornic_devdata.priv_lock would result in the RHEL 7.2 guests hanging during service partition recovery testing. __Testing__ * An scp of a large file was started from a remote host TO the RHEL 7.2 Linux guest. * During the scp transfer, s-Par service partition recovery was forced twice. After each occasion, I verified that the guest recovered completely (all s-Par guest devices), and that the file transfer resumed. * Within the RHEL 7.2 guest environment, copied the large file to another location in the local filesystem. * During the copy, s-Par service partition recovery was again forced twice. After each occasion, I verified that the guest recovered completely (all s-Par guest devices), and that the copy resumed. * An scp of the new copy of the large file was started FROM the RHEL 7.2 guest to a remote host. * During the scp transfer, s-Par service partition recovery was forced twice. After each occasion, I verified that the guest recovered completely (all s-Par guest devices), and that the file transfer resumed. * Used cmp to verify that the large file had successfully survived the round-trip without becoming corrupted. Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 -- 1 file changed, 2 deletions(-) commit ef44146cb7ae0975f0516b469b58a7d91264d1fc Author: David Binder Date: Mon Jan 9 13:02:26 2017 -0500 staging: unisys: visornic: Remove errant -EIO returns Remove errant -EIOs that prevent us from calling either netif_start_queue() or napi_disable(). Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6219e4933329f71b05dd08e00baad04d78640ba5 Author: David Binder Date: Mon Jan 9 13:02:25 2017 -0500 staging: unisys: visornic: Reorder logic in visornic_enable_with_timeout() Moves the call to napi_enable() before the call to init_rcv_bufs(), ensuring that messages are not put into the receive queue until the guest is ready to receive interrupts. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4b3d7b6d84938be9b4c4b1656ebd424e5645d1ca Author: David Binder Date: Mon Jan 9 13:02:24 2017 -0500 staging: unisys: visorbus: Remove duplicate invocation of init_rcv_bufs() Removes the invocation to init_rcv_bufs() in visornic_resume() because that function is already called in visornic_enable_with_timeout(). Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 -- 1 file changed, 2 deletions(-) commit 046f93dc727ab390bf951e52236debd710e58a7d Author: David Kershner Date: Mon Jan 9 13:02:23 2017 -0500 staging: unisys: visorbus: Replace parser_param_start with parser_name_get Replace the general CONTROLVM string parser setup which only handled the name string with a specific name string retrieval function. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 53 ++++++++------------------ 1 file changed, 15 insertions(+), 38 deletions(-) commit 396e36c9ace54d07e870c63fcfe6ef5cd6a22088 Author: Tim Sell Date: Mon Jan 9 13:02:22 2017 -0500 staging: unisys: visorbus: relocate error-check from isr to registration It just makes more sense to do the NULL-pointer check when the function is called to enable interrupts, rather than on *every* interrupt. Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit db2003f52471dee030ce81fc7dffc317b4304379 Author: David Kershner Date: Mon Jan 9 13:02:21 2017 -0500 staging: unisys: visorbus: Remove unused enum members Visorchipset used to parse CONTROLVM messages with a variety of string information. All but the name string have been removed, but the code to handle this information remained. This patch removes the other values and handlers. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 9c1e67f941019907034d7e5584c891603cce2d8e Author: Parav Pandit Date: Tue Jan 10 00:02:15 2017 +0000 rdmacg: Added documentation for rdmacg Added documentation for v1 and v2 version describing high level design and usage examples on using rdma controller. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo Documentation/cgroup-v1/rdma.txt | 109 +++++++++++++++++++++++++++++++++++++++ Documentation/cgroup-v2.txt | 38 ++++++++++++++ 2 files changed, 147 insertions(+) commit 43579b5f2c79d747d8294bd233db41c954e2dc4a Author: Parav Pandit Date: Tue Jan 10 00:02:14 2017 +0000 IB/core: added support to use rdma cgroup controller Added support APIs for IB core to register/unregister every IB/RDMA device with rdma cgroup for tracking rdma resources. IB core registers with rdma cgroup controller. Added support APIs for uverbs layer to make use of rdma controller. Added uverbs layer to perform resource charge/uncharge functionality. Added support during query_device uverb operation to ensure it returns resource limits by honoring rdma cgroup configured limits. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo drivers/infiniband/core/Makefile | 1 + drivers/infiniband/core/cgroup.c | 62 +++++++++++++++++++++ drivers/infiniband/core/core_priv.h | 30 ++++++++++ drivers/infiniband/core/device.c | 10 ++++ drivers/infiniband/core/uverbs_cmd.c | 102 ++++++++++++++++++++++++++++++++-- drivers/infiniband/core/uverbs_main.c | 20 +++++++ include/rdma/ib_verbs.h | 14 +++++ 7 files changed, 233 insertions(+), 6 deletions(-) commit 39d3e7584a686541a3295ff1624d341e669e1afc Author: Parav Pandit Date: Tue Jan 10 00:02:13 2017 +0000 rdmacg: Added rdma cgroup controller Added rdma cgroup controller that does accounting, limit enforcement on rdma/IB resources. Added rdma cgroup header file which defines its APIs to perform charging/uncharging functionality. It also defined APIs for RDMA/IB stack for device registration. Devices which are registered will participate in controller functions of accounting and limit enforcements. It define rdmacg_device structure to bind IB stack and RDMA cgroup controller. RDMA resources are tracked using resource pool. Resource pool is per device, per cgroup entity which allows setting up accounting limits on per device basis. Currently resources are defined by the RDMA cgroup. Resource pool is created/destroyed dynamically whenever charging/uncharging occurs respectively and whenever user configuration is done. Its a tradeoff of memory vs little more code space that creates resource pool object whenever necessary, instead of creating them during cgroup creation and device registration time. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo include/linux/cgroup_rdma.h | 53 ++++ include/linux/cgroup_subsys.h | 4 + init/Kconfig | 10 + kernel/cgroup/Makefile | 1 + kernel/cgroup/rdma.c | 617 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 685 insertions(+) commit 7e11aabd48eb00240b280bf927cba9198664dcf6 Author: Bartlomiej Zolnierkiewicz Date: Fri Dec 30 15:01:18 2016 +0100 ata: add Atari Falcon PATA controller driver Add Atari Falcon PATA controller driver. The major difference when compared to legacy IDE's falconide host driver is that we are using polled PIO mode and thus avoiding the need for STDMA locking magic altogether. Tested under ARAnyM emulator. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/Kconfig | 9 +++ drivers/ata/Makefile | 1 + drivers/ata/pata_falcon.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+) commit 989e0aac1a801e9e9580632c9fd448a7aaca596a Author: Bartlomiej Zolnierkiewicz Date: Fri Dec 30 15:01:17 2016 +0100 ata: pass queued command to ->sff_data_xfer method For Atari Falcon PATA support we need to check the current command in its ->sff_data_xfer method. Update core code and all users accordingly. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/libata-sff.c | 29 +++++++++++++++-------------- drivers/ata/pata_at91.c | 6 +++--- drivers/ata/pata_bf54x.c | 7 ++++--- drivers/ata/pata_ep93xx.c | 4 ++-- drivers/ata/pata_ixp4xx_cf.c | 4 ++-- drivers/ata/pata_legacy.c | 15 +++++++++------ drivers/ata/pata_octeon_cf.c | 12 ++++++------ drivers/ata/pata_pcmcia.c | 6 +++--- drivers/ata/pata_samsung_cf.c | 4 ++-- drivers/ata/sata_rcar.c | 4 ++-- include/linux/libata.h | 8 ++++---- 11 files changed, 52 insertions(+), 47 deletions(-) commit 7563f625469e9488fcd23cb64f9a6d61f1758f47 Author: Bartlomiej Zolnierkiewicz Date: Fri Dec 30 15:01:16 2016 +0100 ata: allow subsystem to be used on m68k arch When libata was merged m68k lacked IOMAP support. This has not been true for a long time now so allow subsystem to be used on m68k. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a234f7395c9301a5048cb2daa4c86f15c6f02de8 Author: Christoph Hellwig Date: Tue Jan 10 17:04:32 2017 +0100 libata: switch to dynamic allocation instead of ata_scsi_rbuf Note of the emulated commands in the pageout/pagein path, so just do a GFP_NOIO dynamic allocation. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 122 ++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 86 deletions(-) commit 05adb1850aaa88d3d4cc40a531752816899cc1bf Merge: 957870f 282d0a3 Author: Daniel Vetter Date: Tue Jan 10 17:03:46 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Pull in latest drm-next from Dave Airlie to get at all the drm-misc goodies, specifically: - dma_fence error state handling rework (Chris needs that for error recovery) - crc support locking changes (Tomeu's i915 crc patches need that). Signed-off-by: Daniel Vetter commit 1129d270cbfbb7e2b1ec3dede4a13930bdd10e41 Author: Mateusz Berezecki Date: Wed Dec 21 09:19:14 2016 -0800 USB: Increase usbfs transfer limit Promote a variable keeping track of USB transfer memory usage to a wider data type and allow for higher bandwidth transfers from a large number of USB devices connected to a single host. Signed-off-by: Mateusz Berezecki Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) commit 444d930998f87ce2b5803866ecd171fdbd2c85ec Author: Krzysztof Opasiak Date: Tue Dec 20 20:53:14 2016 +0100 tools: usb: usbip: Update README Update README file: - remove outdated parts - clarify terminology and general structure - add some description of vUDC Signed-off-by: Krzysztof Opasiak Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/README | 57 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) commit 68bd6fc3cfa98ef253e17307ccafd8ef907b5556 Author: Krzysztof Kozlowski Date: Sat Jan 7 10:41:41 2017 +0200 usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths Returning from for_each_available_child_of_node() loop requires cleaning up node refcount. Error paths lacked it so for example in case of deferred probe, the refcount of phy node was left increased. Fixes: 6d40500ac9b6 ("usb: ehci/ohci-exynos: Fix of_node_put() for child when getting PHYs") Signed-off-by: Krzysztof Kozlowski Acked-by: Alan Stern Reviewed-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-exynos.c | 2 ++ 1 file changed, 2 insertions(+) commit 3f6026b1dcb3c8ee71198c485a72ac674c6890dd Author: Krzysztof Kozlowski Date: Sat Jan 7 10:41:40 2017 +0200 usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths Returning from for_each_available_child_of_node() loop requires cleaning up node refcount. Error paths lacked it so for example in case of deferred probe, the refcount of phy node was left increased. Fixes: 6d40500ac9b6 ("usb: ehci/ohci-exynos: Fix of_node_put() for child when getting PHYs") Signed-off-by: Krzysztof Kozlowski Acked-by: Alan Stern Reviewed-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-exynos.c | 2 ++ 1 file changed, 2 insertions(+) commit 808cf33d4817c730008de9b2736b357708a3d7f6 Author: John Crispin Date: Tue Dec 20 19:08:58 2016 +0100 usb: make the MTK XHCI driver compile for older MIPS SoCs The MIPS based MT7621 shares the same XHCI core as the newer generation of ARM based SoCs. The driver works out of the box and we only need to make it buildable in Kconfig. Signed-off-by: John Crispin Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9038a038754cb8983657f2da177c3e6a0ee561fa Author: Colin Ian King Date: Wed Dec 28 16:52:41 2016 +0000 usb: renesas_usbhs: mod_host: fix typo: "connecte" -> "connected" trivial fix to typo in dev_dbg message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf2b419aa19498913c7175ba0fb1becd9b946b3b Author: Aaro Koskinen Date: Mon Jan 2 22:53:55 2017 +0200 USB: ohci-omap: defer probe if PHY is missing Defer probe if PHY is missing. E.g. on Nokia 770 several modules needs to be loaded to get the PHY going and ohci-omap should wait for those. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-omap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a52d3ec54a62c6e5e2fb177e45a1976fbd8eb287 Author: Krzysztof Opasiak Date: Mon Dec 12 19:55:45 2016 +0100 tools: usb: usbip: Add simple script to show how to setup vUDC Add some simple script which creates a USB gadget using ConfigFS and then exports it using vUDC. This may be useful for people who just started playing with USB/IP and vUDC as it shows exact steps how to setup all stuff. Signed-off-by: Krzysztof Opasiak Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/vudc/vudc_server_example.sh | 107 ++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit a0c0b0e945cad4d6b2871469883fbbc316afcd44 Author: Christoph Hellwig Date: Tue Jan 10 09:41:47 2017 +0100 libata: don't call ata_scsi_rbuf_fill for command without a response buffer No need to copy a zeroed buffer to the caller if the command is defined to not have a response in the SCSI spec. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 8fc6c0657bf852766f08d389c5c3378a032b3de7 Author: Christoph Hellwig Date: Tue Jan 10 09:41:46 2017 +0100 libata: call ->scsi_done from ata_scsi_simulate We always need to call ->scsi_done after we've finished emulating a command, so do it in a single place at the end of ata_scsi_simulate. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 506db3609cdf30b0ff661e8e38e95e91c54fbb82 Author: Christoph Hellwig Date: Tue Jan 10 09:41:45 2017 +0100 libata: remove the done callback from ata_scsi_args It's always the scsi_done callback, and we can get at that easily in the place where ->done is called. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f0a37d12f51a51d61f68dd30123f2b1927b56bb6 Author: Christoph Hellwig Date: Tue Jan 10 09:41:44 2017 +0100 libata: move struct ata_scsi_args to libata-scsi.c It's only used in libata-scsi.c, so move it closer to the users. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 7 +++++++ drivers/ata/libata.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) commit aa18da8b7ec57f6ff255634746aed6266a01b315 Author: Christoph Hellwig Date: Tue Jan 10 09:41:43 2017 +0100 libata: avoid global response buffer in atapi_qc_complete We only need to look at 4 bytes of the inquiry response for ATAPI devices. Instead of using the global ata_scsi_rbuf just use a a stack buffer. Also factor the fixup into it's own little helper function to make it more readable. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) commit 957870f9341201b176e41eb5fa8a750b13e501aa Author: Chris Wilson Date: Tue Jan 10 12:10:45 2017 +0000 drm/i915: Split out i915_gem_object_set_tiling() Expose an interface for changing the tiling and stride on an object, that includes the complexity of checking for conflicting bindings and fence registers. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110121045.27144-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_object.h | 3 + drivers/gpu/drm/i915/i915_gem_tiling.c | 237 +++++++++++++++++---------------- 2 files changed, 127 insertions(+), 113 deletions(-) commit 111dbcab3d5baf5ef7a377471dbd10c23484f11d Author: Chris Wilson Date: Tue Jan 10 12:10:44 2017 +0000 drm/i915: Include ioctl in set-tiling and get-tiling function names Make it clear that these functions are the user entry points for the tiling/fence registers. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170110121045.27144-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 8 ++++---- drivers/gpu/drm/i915/i915_gem_tiling.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) commit 21dd0ece34c2a07432a1cd0bbcb4815ce2b49173 Author: Peter Rosin Date: Tue Jan 10 14:18:33 2017 +0100 ARM: dts: at91: add devicetree for the Axentia TSE-850 The Axentia TSE-850 is a SAMA5D3-based device designed to generate FM subcarrier signals. Signed-off-by: Peter Rosin Acked-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/arm/axentia.txt | 19 ++ MAINTAINERS | 8 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/at91-linea.dtsi | 49 ++++ arch/arm/boot/dts/at91-tse850-3.dts | 274 ++++++++++++++++++++++ 5 files changed, 351 insertions(+) commit f46b1d47d4a14ddf0f935283c7c0bd0d446c54b0 Author: Peter Rosin Date: Tue Jan 10 14:18:34 2017 +0100 ARM: sama5_defconfig: add support for the Axentia TSE-850 board The Axentia TSE-850 is a SAMA5D3-based device designed to generate FM subcarrier signals. Signed-off-by: Peter Rosin Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/configs/sama5_defconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ee194289502a6901cc77dc9a893bf2afd351ac5e Author: Boris Brezillon Date: Mon Nov 28 16:17:56 2016 +0100 memory/atmel-ebi: Fix ns <-> cycles conversions at91sam9_ebi_get_config() is incorrectly converting timings in clock cycles into timings in nanoseconds by multiplying the cycle values by the clk rate instead of the clk period. at91sam9_ebi_xslate_config() has the same problem for the tdf_ns -> tdf_cycles conversion. Signed-off-by: Boris Brezillon Reported-by: Chris Leahy Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver") Cc: Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 5347d806558bb77d35c26113049cc14b40089b78 Author: Wenyou Yang Date: Mon Nov 21 13:14:42 2016 +0800 ARM: dts: at91: add dts file for sama5d36ek CMP board The sama5d36ek CMP board is the variant of sama5d3xek board. It is equipped with the low-power DDR2 SDRAM, PMIC ACT8865 and some power rail. Its main purpose is used to measure the power consumption. The difference of the sama5d36ek CMP dts from sama5d36ek dts is listed as below. 1. The USB host nodes are removed, that is, the USB host is disabled. 2. The gpio_keys node is added to wake up from the sleep. 3. The LCD isn't supported due to the pins for LCD are conflicted with gpio_keys. 4. The adc0 node support the pinctrl sleep state to fix the over consumption on VDDANA. As said in errata, "When the USB host ports are used in high speed mode (EHCI), it is not possible to suspend the ports if no device is attached on each port. This leads to increased power consumption even if the system is in a low power mode." That is why the the USB host is disabled. Signed-off-by: Wenyou Yang Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sama5d36ek_cmp.dts | 87 ++++++++++ arch/arm/boot/dts/sama5d3xcm_cmp.dtsi | 201 +++++++++++++++++++++++ arch/arm/boot/dts/sama5d3xmb_cmp.dtsi | 301 ++++++++++++++++++++++++++++++++++ 4 files changed, 590 insertions(+) commit 6c1652af61f0a2e5f210ffd3a067fcce8a7c5ecc Author: Alex Date: Sun Dec 4 16:03:56 2016 +0200 ARM: dts: at91: sama5d2: add ssc0 definition The sama5d2 SoC has Synchronous Serial Controller which provides synchronous communication link with external devices. It's generally used in audio and telecom applications such as I2S, Short Frame Sync, Long Frame Sync. Signed-off-by: Alex Gershgorin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 89a236d68a35539fa985b9a0a8454e41091cc8c5 Author: Nicolas Ferre Date: Thu Dec 1 11:49:49 2016 +0100 ARM: dts: at91: sama5d2 Xplained: use DMA for UART3 Use DMA for UART3 as we have enough channels and to show how to specify DMA use with serial nodes. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 ++ 1 file changed, 2 insertions(+) commit f72d20fed99ff5b12a24f5a96403dbc072bf7230 Author: Nicolas Ferre Date: Thu Dec 1 11:49:48 2016 +0100 ARM: dts: at91: sama5d2: move UART3 to DMA1 Now that DMA1 is defined, use it to distribute channel usage among the two controllers. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22eb6cc2221357fbbc6d2b358bd55f5e0ce3062e Author: Nicolas Ferre Date: Thu Dec 1 11:49:47 2016 +0100 ARM: dts: at91: add dma1 definition to sama5d2 The sama5d2 SoC has a second DMA controller and can be used just like DMA0. By default both DMA controllers are configured as "Secure" in MATRIX_SPSELR so we can use whichever we want in a "single Secure World" configuration. Surprisingly the DMA1 has a lower address than DMA0. To avoid confusion place it after DMA0 node anyway. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0d98013de89ad48e799d9fe04d2913b5acd4c1b2 Author: Nicolas Ferre Date: Wed Nov 30 18:36:30 2016 +0100 ARM: dts: at91: sama5d4 Xplained: enable UART1 node with DMA Enable UART1 and use DMA configuration with it. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d4_xplained.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit e60f79113871864739ce7ce537b3be98a3229d52 Author: Nicolas Ferre Date: Wed Nov 30 18:36:29 2016 +0100 ARM: dts: at91: sama5d4: change DMA allocation for secure peripherals Some peripherals are "Programmable Secure" but left as "Secure" by default. If tried to be connected to Non-Secure DMA controller, the possibility to leak secure data is prevented so using these peripherals with DMA1 is not possible with this default configuration (MATRIX_SPSELR registers setup by bootloader). Move them to DMA0 which is an "Always-Secure" DMA controller. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d4.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1c1d369408186e00c0f8f335561e9de49ea93981 Author: Peter Rosin Date: Thu Nov 10 08:46:40 2016 +0100 ARM: dts: at91: sama5d3_uart: fix reg sizes to match documentation The new size (0x100) also matches the size given in sama5d3.dtsi Documentation reference: section 43.6 "Universal Asynchronous Receiver Transmitter (UART) User Interface", table 43-4 "Register Mapping" in [1]. [1] Atmel-11121F-ATARM-SAMA5D3-Series-Datasheet_02-Feb-16 Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d3_uart.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f31deaadff0d81a4963b5d816c1ae4a67296aa0c Author: Will Deacon Date: Thu Sep 22 11:23:07 2016 +0100 arm64: cpufeature: Don't enforce system-wide SPE capability The statistical profiling extension (SPE) is an optional feature of ARMv8.1 and is unlikely to be supported by all of the CPUs in a heterogeneous system. This patch updates the cpufeature checks so that such systems are not tainted as unsupported. Acked-by: Mark Rutland Reviewed-by: Suzuki Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/kernel/cpufeature.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit b20d1ba3cf4b99dc47ea3e1102399e4728386783 Author: Will Deacon Date: Mon Jul 25 16:17:52 2016 +0100 arm64: cpufeature: allow for version discrepancy in PMU implementations Perf already supports multiple PMU instances for heterogeneous systems, so there's no need to be strict in the cpufeature checking, particularly as the PMU extension is optional in the architecture. Acked-by: Mark Rutland Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fff2fd1a9e4be3267f8ace2b4d7d80da13d1f0d9 Author: Marek Szyprowski Date: Mon Jan 9 13:03:56 2017 +0100 iommu/exynos: Properly release device from the default domain in ->remove IOMMU core doesn't detach device from the default domain before calling ->iommu_remove_device, so check that and do the proper cleanup or warn if device is still attached to non-default domain. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0bd5a0c77ad49ce5cf631bbe5616b6625ff50d96 Author: Marek Szyprowski Date: Mon Jan 9 13:03:55 2017 +0100 iommu/exynos: Ensure that SYSMMU is added only once to its master device This patch prepares Exynos IOMMU driver for deferred probing support. Once it gets added, of_xlate() callback might be called more than once for the same SYSMMU controller and master device (for example it happens when masters device driver fails with EPROBE_DEFER). This patch adds a check, which ensures that SYSMMU controller is added to its master device (owner) only once. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0d6d3da46ac5949ab5d373fdecf4b4e85a04731c Author: Marek Szyprowski Date: Mon Jan 9 13:03:54 2017 +0100 iommu/exynos: Fix warnings from DMA-debug Add a simple checks for dma_map_single() return value to make DMA-debug checker happly. Exynos IOMMU on Samsung Exynos SoCs always use device, which has linear DMA mapping ops (dma address is equal to physical memory address), so no failures are returned from dma_map_single(). Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ec5d241b5f8b2d5f002070fd8fdbf71b6664bacb Author: Marek Szyprowski Date: Mon Jan 9 13:03:53 2017 +0100 iommu/exynos: Improve page fault debug message Add master device name to default IOMMU fault message to make easier to find which device triggered the fault. While at it, move printing some information (like page table base and first level entry addresses) to dev_dbg(), because those are typically not very useful for typical device driver user/developer not equipped with hardware debugging tools. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 99e8ccd3837a1028c98559d3c19e8b796eb9906c Author: Rafael J. Wysocki Date: Tue Jan 10 14:57:28 2017 +0100 iommu/amd: Fix error code path in early_amd_iommu_init() Prevent early_amd_iommu_init() from leaking memory mapped via acpi_get_table() if check_ivrs_checksum() returns an error. Signed-off-by: Rafael J. Wysocki Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8b06e3fddddaae1a87ed479edcb8b3d85caecc7 Author: James Morse Date: Mon Jan 9 18:14:02 2017 +0000 arm64: Remove useless UAO IPI and describe how this gets enabled Since its introduction, the UAO enable call was broken, and useless. commit 2a6dcb2b5f3e ("arm64: cpufeature: Schedule enable() calls instead of calling them via IPI"), fixed the framework so that these calls are scheduled, so that they can modify PSTATE. Now it is just useless. Remove it. UAO is enabled by the code patching which causes get_user() and friends to use the 'ldtr' family of instructions. This relies on the PSTATE.UAO bit being set to match addr_limit, which we do in uao_thread_switch() called via __switch_to(). All that is needed to enable UAO is patch the code, and call schedule(). __apply_alternatives_multi_stop() calls stop_machine() when it modifies the kernel text to enable the alternatives, (including the UAO code in uao_thread_switch()). Once stop_machine() has finished __switch_to() is called to reschedule the original task, this causes PSTATE.UAO to be set appropriately. An explicit enable() call is not needed. Reported-by: Vladimir Murzin Signed-off-by: James Morse arch/arm64/include/asm/processor.h | 1 - arch/arm64/kernel/cpufeature.c | 5 ++++- arch/arm64/mm/fault.c | 14 -------------- 3 files changed, 4 insertions(+), 16 deletions(-) commit 510224c2b10aba2149c0d24595be98f2254c641a Author: Mark Rutland Date: Mon Jan 9 14:31:55 2017 +0000 arm64: head.S: fix up stale comments In commit 23c8a500c24d02dd ("arm64: kernel: use ordinary return/argument register for el2_setup()"), we stopped using w20 as a global stash of the boot mode flag, and instead pass this around in w0 as a function parameter. Unfortunately, we missed a couple of comments, which still refer to the old convention of using w20/x20. This patch fixes up the comments to describe the code as it currently works. Signed-off-by: Mark Rutland Acked-by: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 117f5727ae058de03e2407f5fe566e715d143596 Author: Mark Rutland Date: Mon Jan 9 14:13:36 2017 +0000 arm64: add missing printk newlines A few printk calls in arm64 omit a trailing newline, even though there is no subsequent KERN_CONT printk associated with them, and we actually want a newline. This can result in unrelated lines being appended, rather than appearing on a new line. Additionally, timestamp prefixes may appear in-line. This makes the logs harder to read than necessary. Avoid this by adding a trailing newline. These were found with a shortlist generated by: $ git grep 'pr\(intk\|_.*\)(.*)' -- arch/arm64 | grep -v pr_fmt | grep -v '\\n"' Signed-off-by: Mark Rutland CC: James Morse Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/hibernate.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9c6a3af003c06ef1efc5e243cdbab1be4cb90753 Author: Hauke Mehrtens Date: Tue Jan 3 18:04:27 2017 +0100 spi: make falcon-spi bool Falcon spi accesses some ebu functions which are not exported and can not be accessed when build as module. Make this module bool instead. Signed-off-by: Hauke Mehrtens Acked-by: Thomas Langer Signed-off-by: Mark Brown drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96241bae08f63e40dad8f3764e332858b27ba23c Author: Kuninori Morimoto Date: Mon Dec 19 07:37:37 2016 +0000 ASoC: remove snd_soc_platform_trigger() No one is using snd_soc_platform_trigger(). Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 3 --- sound/soc/soc-pcm.c | 9 --------- 2 files changed, 12 deletions(-) commit 0e81eb77f5f81be9a3fd4a080eba9abfb6e54a3a Author: Joel Stanley Date: Thu Jan 5 15:55:42 2017 +1100 ARM: configs: Update Aspeed with new drivers We have upstream support for ftgmac100 ethernet with NCSI, GPIO, pinmux, and IPMI BT. Enable these for both g4 and g5 platforms. Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 38 ++++++++++++++++++++++++++++++++---- arch/arm/configs/aspeed_g5_defconfig | 38 +++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 5 deletions(-) commit 8201c1fad4f4d5b2952255af11189ec676ebf340 Author: Chris Wilson Date: Tue Jan 10 09:56:33 2017 +0000 drm/i915: Clip the partial view against the object not vma The VMA is later clipped against the vm_area_struct before insertion of the faulting PTE so we are free to create the partial view as we desire. If we use the object as the extents rather than the area, this partial can then be used for other areas. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170110095633.6612-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2d4281bb93046fc97fb8ad5dc17ea291a1fb38e2 Author: Chris Wilson Date: Tue Jan 10 09:56:32 2017 +0000 drm/i915: Extract compute_partial_view() In order to reuse the partial view for selftesting, extract the common function for computing the view. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170110095633.6612-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 47 ++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 43c08c1c1ae576a1517b31c9e3b615104c5ff131 Author: Andrew Jeffery Date: Tue Aug 30 17:25:54 2016 +0930 ARM: aspeed: Select pinctrl drivers Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/mach-aspeed/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 8f4b326d663b92e1c2a53a6857bef42e91aea5a6 Author: Joel Fernandes Date: Wed Dec 21 14:44:46 2016 -0800 arm64: Don't trace __switch_to if function graph tracer is enabled Function graph tracer shows negative time (wrap around) when tracing __switch_to if the nosleep-time trace option is enabled. Time compensation for nosleep-time is done by an ftrace probe on sched_switch. This doesn't work well for the following events (with letters representing timestamps): A - sched switch probe called for task T switch out B - __switch_to calltime is recorded C - sched_switch probe called for task T switch in D - __switch_to rettime is recorded If C - A > D - B, then we end up over compensating for the time spent in __switch_to giving rise to negative times in the trace output. On x86, __switch_to is not traced if function graph tracer is enabled. Do the same for arm64 as well. Cc: Todd Kjos Cc: Steven Rostedt Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Joel Fernandes Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d82a56bc5bf820b7c65d8130b44c0bc101b546c Author: Fabian Frederick Date: Fri Jan 6 21:54:43 2017 +0100 udf: check partition reference in udf_read_inode() We were checking block number without checking partition. sbi->s_partmaps[iloc->partitionReferenceNum] could lead to bad memory access. See udf_nfs_get_inode() path for instance. Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 23bcda112f77da278898841615c7530c3e91a537 Author: Fabian Frederick Date: Fri Jan 6 21:54:41 2017 +0100 udf: atomically read inode size See i_size_read() comments in include/linux/fs.h Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/lowlevel.c | 2 +- fs/udf/super.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 8f9bafbb92c0308cf8d33536803c822e14bed4d7 Author: Joel Stanley Date: Wed Jan 4 17:01:28 2017 +1100 ARM: dts: aspeed: Add Romulus BMC platform Romulus is an OpenPower machine with an ast2500 BMC. It has NCSI networking and 512MB of RAM. Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 45 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 34ea5c9de39bd6ae23d373af9fd0c276e5585519 Author: Joel Stanley Date: Wed Jan 4 16:30:34 2017 +1100 ARM: dts: aspeed: Add ftgmac100 to g4 and g5 platforms Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-ast2500-evb.dts | 14 ++++++++++++++ arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 9 +++++++++ arch/arm/boot/dts/aspeed-g4.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/aspeed-g5.dtsi | 16 ++++++++++++++++ 4 files changed, 55 insertions(+) commit 9b08d4506cf838d6bc9eac2b5db5482e5cf0ad18 Author: Cyril Bur Date: Tue Dec 13 14:39:38 2016 +1100 ARM: dts: aspeed: Correct palmetto device tree Palmettos have 512MB of memory as opposed to the previously thought 256MB. Update the device trees accordingly. We run the uart at 115200. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e53a7f1b998dc84cc840554d55140ea2a0e330fc Author: Cyril Bur Date: Tue Dec 13 15:14:15 2016 +1100 ARM: dts: aspeed: Reserve framebuffer memory When used as a BMC, the host expects to be able to use 16MB of framebuffer memory at the top of RAM. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2039f90d136cd5248affb87a780b2ddaae337567 Author: Andrew Jeffery Date: Tue Dec 6 14:53:48 2016 +1100 ARM: dts: aspeed-g5: Add gpio controller to devicetree Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g5.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b590c8d2eed5748dfe52c4fc13df6cadb1b56d58 Author: Andrew Jeffery Date: Tue Dec 6 14:53:47 2016 +1100 ARM: dts: aspeed-g5: Add syscon and pin controller nodes The pin controller's child nodes expose the functions currently implemented in the g5 pin controller driver. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g5.dtsi | 816 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 816 insertions(+) commit cec822f89ec19b181dc02e2a0c6441d107d8b4d9 Author: Andrew Jeffery Date: Tue Dec 6 14:53:46 2016 +1100 ARM: dts: aspeed-g5: Add LPC Controller node Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g5.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit daf042580a0dacd894a3825dd6f048364fd66770 Author: Andrew Jeffery Date: Tue Dec 6 14:53:45 2016 +1100 ARM: dts: aspeed-g5: Add SoC Display Controller node Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g5.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 09955007b2f643e07cc5fa21a34da6cec97bb7a1 Author: Andrew Jeffery Date: Tue Dec 6 14:53:44 2016 +1100 ARM: dts: aspeed-g4: Add gpio controller to devicetree Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d90722795e9b1db5844f8aadbf88e02dbeb7cabb Author: Andrew Jeffery Date: Tue Dec 6 14:53:43 2016 +1100 ARM: dts: aspeed-g4: Add syscon and pin controller nodes The pin controller's child nodes expose the functions currently implemented in the the g4 pin controller driver. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 750 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 750 insertions(+) commit 54bb60d53114b83473ba1c622be4cca9533b9827 Author: Fabian Frederick Date: Fri Jan 6 21:53:57 2017 +0100 udf: merge module informations in super.c Move all module attributes at the end of one file like other FS. Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 4 ---- fs/udf/super.c | 9 ++++++--- 2 files changed, 6 insertions(+), 7 deletions(-) commit b31c9ed99ed17f9572ee8babf2e89f1f002a7cce Author: Fabian Frederick Date: Fri Jan 6 21:53:56 2017 +0100 udf: remove next_epos from udf_update_extent_cache() udf_update_extent_cache() is only called from inode_bmap() with 1 for next_epos Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit cb5e497c0eafa6c593934f725bf48742f0e472b0 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:00 2016 +0100 ARM: dts: stm32: Include auxiliary stm32fx clock definition This patch include auxiliary clock definition (clocks which are not derived from system clock. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 1 + 1 file changed, 1 insertion(+) commit c22188d40b7b17c7cb892dfe0920278b0ecb004a Author: Gabriel Fernandez Date: Tue Dec 13 15:20:00 2016 +0100 ARM: dts: stm32: Add external I2S clock on stm32f429 MCU This patch adds an external I2S clock in the DT. The I2S clock could be derived from an external I2S clock or by I2S pll. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0bacd39be9d433bbbfee3fbb1dcf53cc8cf8f0e3 Author: Fabrice GASNIER Date: Mon Jan 9 14:08:32 2017 +0100 ARM: dts: stm32: enable ADC on stm32f429i-eval board Enable analog to digital converter on stm32f429i-eval board. It has on-board potentimeter wired to ADC3 in8 analog pin and uses fixed regulator to provide reference voltage. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3604ef9c8154d25908edde6afc664e54ab754fab Author: Fabrice GASNIER Date: Fri Dec 2 14:57:00 2016 +0100 ARM: dts: stm32: Add ADC support to stm32f429 Add ADC support & pinctrl analog phandle (adc3_in8) to stm32f429. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 6084ce05de366384929f55dadb509ec00fefedd3 Author: Bruno Meirelles Herrera Date: Fri Nov 18 16:10:00 2016 +0100 ARM: dts: stm32: Add missing USART3 pin config to stm32f469-disco board This patch adds USART3 pin configuration on PB10/PA11 pins for STM32F469I-DISCO board. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 13 +++++++++++++ arch/arm/boot/dts/stm32f469-disco.dts | 2 ++ 2 files changed, 15 insertions(+) commit 6d6122c218c1ec809eb99c2f39a1d118050930b7 Author: Bruno Herrera Date: Fri Nov 18 15:58:00 2016 +0100 ARM: dts: stm32: Fix memory size from 8MB to 16MB on stm32f469-disco board This patch fix memory size to support 16MB of external SDRAM. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ed0fbd7e3187cc24a47565afcf7fc1f46684755 Author: Fabian Frederick Date: Fri Jan 6 21:53:54 2017 +0100 udf: Factor out trimming of crtime Factor out trimming of crtime field. Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit be20fe159d000ca6d8ce0b7b10f8787d879490ab Author: Gabriel Fernandez Date: Tue Dec 13 15:20:00 2016 +0100 clk: stm32f4: Update DT bindings documentation Creation of dt include file for specific stm32f4 clocks. These specific clocks are not derived from system clock (SYSCLOCK) We should use index 1 to use these clocks in DT. e.g. <&rcc 1 CLK_LSI> Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring .../devicetree/bindings/clock/st,stm32-rcc.txt | 17 ++++++++++ include/dt-bindings/clock/stm32fx-clock.h | 39 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit d50c4dd5279b6a2b3ae2c66435ec5c9825b7cff3 Author: Fabian Frederick Date: Fri Jan 6 21:53:53 2017 +0100 udf: remove empty condition loc & 0x02 is empty since first git version in 2005 in udf_add_extendedattr() Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/misc.c | 2 -- 1 file changed, 2 deletions(-) commit bbc9abd239917b838d82d580be843395ceb9c36b Author: Fabian Frederick Date: Fri Jan 6 21:53:52 2017 +0100 udf: remove unneeded line break Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 02d4ca49fa222021988b2791c8efefd70d3228ac Author: Fabian Frederick Date: Fri Jan 6 21:53:51 2017 +0100 udf: merge bh free Merge all bh free at one place. Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 3cc6f8444a9d9e4a167c575e4da7b6c6d626501a Author: Fabian Frederick Date: Fri Jan 6 21:53:50 2017 +0100 udf: use pointer for kernel_long_ad argument Having struct kernel_long_ad laarr[EXTENT_MERGE_SIZE] in all function arguments could be understood as by-value parameter. Use kernel_long_ad pointer for functions depending on inode_getblk() Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 75f271380d49798cc313174e9976aabc5197c93e Author: Fabian Frederick Date: Fri Jan 6 21:53:49 2017 +0100 udf: use __packed instead of __attribute__ ((packed)) defined in linux/compiler-gcc.h Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/ecma_167.h | 98 +++++++++++++++++++++++++++---------------------------- fs/udf/osta_udf.h | 34 +++++++++---------- 2 files changed, 66 insertions(+), 66 deletions(-) commit fc36ec76f3f6a6578086b5c045322805df0b9d83 Author: Bhumika Goyal Date: Mon Jan 9 23:24:53 2017 +0530 drm/exynos: constify exynos_drm_crtc_ops structures Declare exynos_drm_crtc_ops structures as const as they are only passed as an argument to the function exynos_drm_crtc_create. This argument is of type const struct exynos_drm_crtc_ops *, so exynos_drm_crtc_ops structures having this property can be declared const. Done using Coccinelle: @r disable optional_qualifier@ identifier i; position p; @@ static struct exynos_drm_crtc_ops i@p={...}; @ok@ position p; identifier r.i; @@ exynos_drm_crtc_create(...,&i@p,...) @bad@ position p!={r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ +const struct exynos_drm_crtc_ops i; File size before: text data bss dec hex filename 5008 280 0 5288 14a8 exynos/exynos5433_drm_decon.o File size after: text data bss dec hex filename 5120 176 0 5296 14b0 exynos/exynos5433_drm_decon.o Signed-off-by: Bhumika Goyal Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483984493-25284-1-git-send-email-bhumirks@gmail.com drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a87bd7d5b64075af87345ae42f3984c56bddb6 Author: Gabriel Krisman Bertazi Date: Mon Jan 9 19:56:49 2017 -0200 drm: Move drm_clflush prototypes to drm_cache header file Continue to clean up drmP.h by moving the cache flushing functions into it's own header file. Compile-tested only Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170109215649.6860-2-krisman@collabora.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/vgem/vgem_drv.h | 1 + include/drm/drmP.h | 5 ----- include/drm/drm_cache.h | 4 ++++ 4 files changed, 6 insertions(+), 5 deletions(-) commit f0e36723a68dfd959168c73bfa7ca6fa426eadf5 Author: Gabriel Krisman Bertazi Date: Mon Jan 9 19:56:48 2017 -0200 drm: Document drm_cache interface Notice that this uncovers an issue with the kernel-doc handling of array arguments, causing the first parameter of drm_clflush_pages() to not show up in the rst-generated page. A proposed fix is under review in linux-doc: Changes since v1: - Add section to drm-mm.rst. - Fix kernel-doc style issues. - s/memory/kernel memory/. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170109215649.6860-1-krisman@collabora.co.uk Documentation/gpu/drm-mm.rst | 6 ++++++ drivers/gpu/drm/drm_cache.c | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 75cda62d9ca2cd3fab0412d438fcd1bfa0580b3d Author: Florian Westphal Date: Mon Jan 9 14:20:49 2017 +0100 xfrm: state: simplify rcu_read_unlock handling in two spots Instead of: if (foo) { unlock(); return bar(); } unlock(); do: unlock(); if (foo) return bar(); This is ok because rcu protected structure is only dereferenced before the conditional. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 711059b9752ad09ae6bcd4be8e48d30e5db483d8 Author: Florian Westphal Date: Mon Jan 9 14:20:48 2017 +0100 xfrm: add and use xfrm_state_afinfo_get_rcu xfrm_init_tempstate is always called from within rcu read side section. We can thus use a simpler function that doesn't call rcu_read_lock again. While at it, also make xfrm_init_tempstate return value void, the return value was never tested. A followup patch will replace remaining callers of xfrm_state_get_afinfo with xfrm_state_afinfo_get_rcu variant and then remove the 'old' get_afinfo interface. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/xfrm/xfrm_state.c | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) commit af5d27c4e12b804c065c0e7c87507fea5683dab4 Author: Florian Westphal Date: Mon Jan 9 14:20:47 2017 +0100 xfrm: remove xfrm_state_put_afinfo commit 44abdc3047aecafc141dfbaf1ed ("xfrm: replace rwlock on xfrm_state_afinfo with rcu") made xfrm_state_put_afinfo equivalent to rcu_read_unlock. Use spatch to replace it with direct calls to rcu_read_unlock: @@ struct xfrm_state_afinfo *a; @@ - xfrm_state_put_afinfo(a); + rcu_read_unlock(); old: text data bss dec hex filename 22570 72 424 23066 5a1a xfrm_state.o 1612 0 0 1612 64c xfrm_output.o new: 22554 72 424 23050 5a0a xfrm_state.o 1596 0 0 1596 63c xfrm_output.o Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 - net/xfrm/xfrm_output.c | 8 +++----- net/xfrm/xfrm_state.c | 31 +++++++++++++------------------ 3 files changed, 16 insertions(+), 24 deletions(-) commit 423826a7b104724a16676a75d597a35d3bdb18b8 Author: Florian Westphal Date: Mon Jan 9 14:20:46 2017 +0100 xfrm: avoid rcu sparse warning xfrm/xfrm_state.c:1973:21: error: incompatible types in comparison expression (different address spaces) Harmless, but lets fix it to reduce the noise. While at it, get rid of unneeded NULL check, its never hit: net/ipv4/xfrm4_state.c: xfrm_state_register_afinfo(&xfrm4_state_afinfo); net/ipv6/xfrm6_state.c: return xfrm_state_register_afinfo(&xfrm6_state_afinfo); net/ipv6/xfrm6_state.c: xfrm_state_unregister_afinfo(&xfrm6_state_afinfo); ... are the only callsites. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 961a9c0a4a9783e47f8cb76134b2303c4872380b Author: Florian Westphal Date: Mon Jan 9 14:20:45 2017 +0100 xfrm: remove unused function Has been ifdef'd out for more than 10 years, remove it. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/ipv4/xfrm4_state.c | 8 -------- 1 file changed, 8 deletions(-) commit 5280bc3ed7b0160d5f771cb903e4ab2e7fb9a208 Author: Kevin Hilman Date: Mon Jan 9 12:55:28 2017 -0800 ARM: dts: davinci: da850-lcdk: enable VPIF Enable VPIF for video captpure and configure input channel 0, used for composite input. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8922306e25fff3a19c075d6148df34fe0404d48a Author: Kevin Hilman Date: Mon Jan 9 12:55:27 2017 -0800 ARM: dts: davinci: da850-evm: enable VPIF Enable VPIF node for video capture, and configure ports. EVM board uses channel 0 for composite input and channel 1 S-Video input. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 6afa43a4bcad712e7e52466bb9ba6a10ede1797d Author: Kevin Hilman Date: Mon Jan 9 12:55:26 2017 -0800 ARM: dts: davinci: da850: VPIF: add node and muxing Add VPIF node and pins to da850 SoC. VPIF has two input channels which can be described using the standard DT ports and endpoints. Signed-off-by: Kevin Hilman [nsekhar@ti.com: drop stray newline, typo fixes in commit message] Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 322128e90777543c6633f88f2251cf19ae77bbe7 Author: David Lechner Date: Mon Jan 9 10:11:39 2017 -0600 ARM: davinci_all_defconfig: Enable PWM modules This enables PWM and the TI ECAP and EHRWPM modules. These are used on LEGO MINDSTORMS EV3. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 73a40d793cb656f26d674a4348e1f29fb840501d Author: David Lechner Date: Mon Jan 9 10:11:38 2017 -0600 ARM: davinci_all_defconfig: enable DA8xx pinconf This enables the DA8xx pinconf driver by default. It is needed by LEGO MINDSTORMS EV3. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 254e0931f5b98119cc87208308213024b8c4da9c Author: Michel Thierry Date: Mon Jan 9 16:51:35 2017 +0200 drm/i915/glk: Convert a few more IS_BROXTON() to IS_GEN9_LP() Commit cc3f90f0633c ("drm/i915/glk: Reuse broxton code for geminilake") missed a few of occurences of IS_BROXTON() that should have been coverted to IS_GEN9_LP(). v2: Cite the right commit. (Ander) Fixes: cc3f90f0633c ("drm/i915/glk: Reuse broxton code for geminilake") Cc: Rodrigo Vivi Cc: Ander Conselvan de Oliveira Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Michel Thierry Signed-off-by: Tomasz Lis Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Tomasz Lis (v1) Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483973495-15138-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_sysfs.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit b9fd799e408f992060cb3e03150479661eb7a14d Author: Rodrigo Vivi Date: Fri Dec 16 17:42:25 2016 +0200 drm/i915/glk: Add missing bits to allow runtime pm suspend on GLK. Besides having the DMC firmware in place and loaded let's handle runtime suspend and dc9 as we do for Broxton. Cc: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1481902946-18593-2-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dbb28b5c3d3cb945a63030fab8d3894cf335ce19 Author: Anusha Srivatsa Date: Fri Dec 16 17:42:24 2016 +0200 drm/i915/DMC/GLK: Load DMC on GLK This patch loads the DMC on GLK. There is a single firmware image for all steppings on a GLK. Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1481902946-18593-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_csr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 91d4e0aa923e13ef832e9d793b6d080b6318f2d9 Author: Chris Wilson Date: Mon Jan 9 16:16:13 2017 +0000 drm/i915: Move ggtt fence/alignment to i915_gem_tiling.c Rename i915_gem_get_ggtt_size() and i915_gem_get_ggtt_alignment() to i915_gem_fence_size() and i915_gem_fence_alignment() respectively to better match usage. Similarly move the pair of functions into i915_gem_tiling.c next to the fence restrictions. Suggested-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-6-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 10 ++-- drivers/gpu/drm/i915/i915_gem.c | 69 --------------------------- drivers/gpu/drm/i915/i915_gem_tiling.c | 85 ++++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/i915_vma.c | 12 ++--- 4 files changed, 88 insertions(+), 88 deletions(-) commit cea84d16c3da717e99ea43108ca50bcc72ff50a1 Author: Chris Wilson Date: Mon Jan 9 16:16:12 2017 +0000 drm/i915: Remove the rounding down of the gen4+ fence region Restricting the fence to the end of the previous tile-row breaks access to the final portion of the object. On gen2/3 we employed lazy fencing to pad out the fence with scratch page to provide access to the tail, and now we also pad out the object on gen4+ we can apply the same fix. Fixes: af1a7301c7cf ("drm/i915: Only fence tiled region of object.") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence_reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 944397f04f24eaf05125896dcb601c0e1c917879 Author: Chris Wilson Date: Mon Jan 9 16:16:11 2017 +0000 drm/i915: Store required fence size/alignment for GGTT vma The fence size/alignment is a combination of the vma size plus object tiling parameters. Those parameters are rarely changed, making the fence size/alignemnt roughly constant for the lifetime of the VMA. We can simplify subsequent calculations by precalculating the size/alignment required for GGTT vma taking fencing into account (with an update if we do change the tiling or stride). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 7 ++-- drivers/gpu/drm/i915/i915_gem.c | 27 +++++--------- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 20 +++++----- drivers/gpu/drm/i915/i915_gem_tiling.c | 36 ++++++++++-------- drivers/gpu/drm/i915/i915_vma.c | 61 +++++++++++++++---------------- drivers/gpu/drm/i915/i915_vma.h | 3 ++ 6 files changed, 73 insertions(+), 81 deletions(-) commit 0d4e8f1dbcab9cf68fec951e7e5dbb6d5d8e3425 Author: Chris Wilson Date: Mon Jan 9 16:16:10 2017 +0000 drm/i915: Replace WARNs in fence register writes with extensive asserts All of these conditions are prechecked by i915_tiling_ok() before we allow setting the tiling/stride on the object and so we should never fail asserting those conditions before writing the register. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence_reg.c | 50 ++++++++++++++----------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit 5b30694b474d00f8588fa367f9562d8f2e4c7075 Author: Chris Wilson Date: Mon Jan 9 16:16:09 2017 +0000 drm/i915: Align GGTT sizes to a fence tile row Ensure the view occupies the full tile row so that reads/writes into the VMA do not escape (via fenced detiling) into neighbouring objects - we will pad the object with scratch pages to satisfy the fence. This applies the lazy-tiling we employed on gen2/3 to gen4+. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 +++-- drivers/gpu/drm/i915/i915_gem.c | 27 +++++++++++++++++++-------- drivers/gpu/drm/i915/i915_gem_tiling.c | 18 +++++++++--------- drivers/gpu/drm/i915/i915_vma.c | 10 ++++++++-- 4 files changed, 39 insertions(+), 21 deletions(-) commit 6649a0b6501d78042fd0fffaaefab1aeee27e75d Author: Chris Wilson Date: Mon Jan 9 16:16:08 2017 +0000 drm/i915: Extract tile_row_size for fencing Computing the tile row size of a tiled object (for use with fence registers) is repeated, so extract it to a common helper. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 7 +------ drivers/gpu/drm/i915/i915_gem_fence_reg.c | 6 ++---- drivers/gpu/drm/i915/i915_gem_object.h | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 10 deletions(-) commit b1980ff0c335eedbba10ea99a2a9feebb79642f8 Author: Kuninori Morimoto Date: Tue Jan 10 07:41:28 2017 +0000 arm64: dts: h3ulcb: follow sound CTU/MIX supports commit 5bcd74e8a30d9259 ("arm64: dts: r8a7795: add sound MIX support") commit 5be5ee41d011f26b ("arm64: dts: r8a7795: add sound CTU support") added MIX/CTU support, and it updated clocks on SoC level. Thus, h3ulcb should be updated Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 2 ++ 1 file changed, 2 insertions(+) commit d4cd158176c385a885b6f6e62dd268963233fab1 Author: Andrey Smirnov Date: Mon Jan 9 23:35:55 2017 -0800 ARM: dts: vf610-zii-dev: Add .dts file for rev. C Add .dts file for rev. C of the board by factoring out commonalities into a shared include file (vf610-zii-dev-rev-b-c.dtsi) and deriving revision specific file from it (vf610-zii-dev-rev-b.dts and vf610-zii-dev-reb-c.dts). Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: Sascha Hauer Cc: Stefan Agner Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: andrew@lunn.ch Cc: Vivien Didelot Cc: Nikita Yushchenko Cc: cphealy@gmail.com Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 315 +---------------------- arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 414 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/vf610-zii-dev.dtsi | 383 +++++++++++++++++++++++++++ 4 files changed, 813 insertions(+), 302 deletions(-) commit 73f2e6593b83ef513d6273e5fe78d03b9c120e09 Author: Andrey Smirnov Date: Mon Jan 9 23:35:54 2017 -0800 ARM: dts: vf610-zii-dev-rev-b: Remove leftover PWM pingroup Remove pwm0grp since it is: a) Not referenced anywhere in the DTS file (unlike Tower board it is based on, this board does not use/expose FTM0) b) Configures PTB2 and PTB3 in a way that contradicts pinctrl-mdio-mux Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: Sascha Hauer Cc: Stefan Agner Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: andrew@lunn.ch Cc: Vivien Didelot Cc: cphealy@gmail.com Tested-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 9 --------- 1 file changed, 9 deletions(-) commit b8aa8453918ebfd93d78de56c2afd4b735e02e27 Author: Mickaël Salaün Date: Thu Dec 22 00:32:25 2016 +0100 security: Fix inode_getattr documentation Replace arguments @mnt and @dentry with @path. Signed-off-by: Mickaël Salaün Acked-by: Serge Hallyn Signed-off-by: James Morris include/linux/lsm_hooks.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5df4eb453cbdad34ea55c0ce984a376b33442aa1 Author: M'boumba Cedric Madianga Date: Thu Jan 5 09:09:40 2017 +0100 dmaengine: stm32-dma: Add error messages if xlate fails This patch adds some error messages when a slave device fails to request a channel. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit ebb7fe2100e8d181c7c3911801444965384ba147 Author: Andy Shevchenko Date: Mon Jan 2 17:26:21 2017 +0200 dmaengine: dw: pci: remove LPE Audio DMA ID LPE Audio driver should take care of DMA IPs by itself. Keeping an ID like this in dw_dma_pci.c is anyway wrong since that block has two DMA controllers under one ID (like MFD device). That's also why I didn't include LPE Audio ID for Intel Merrifield previously. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b6f0ec3621d73bc2976a4f2ee2bf9d02ecfd16b6 Author: Emese Revfy Date: Tue Jan 3 16:01:40 2017 -0800 scsi: esas2r: Fix format string type mistakes This adds the missing __printf attribute which allows compile time format string checking (and will be used by the coming initify gcc plugin). Additionally, this fixes the warnings exposed by the attribute. Signed-off-by: Emese Revfy [kees: split scsi/acpi, merged attr and fix, new commit messages] Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/esas2r/esas2r_ioctl.c | 2 +- drivers/scsi/esas2r/esas2r_log.h | 4 ++-- drivers/scsi/esas2r/esas2r_main.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit eab5c1503b604216e352151618cd78d5806dee1a Author: Christoph Hellwig Date: Fri Nov 18 07:28:16 2016 +0100 scsi: pmcraid: switch to pci_alloc_irq_vectors Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 92 ++++++++++++++++++++++---------------------------- drivers/scsi/pmcraid.h | 1 - 2 files changed, 41 insertions(+), 52 deletions(-) commit 984dc46c5715fec4329861f93f30c76b8d680e8d Author: Christoph Hellwig Date: Sun Jan 8 10:41:15 2017 +0100 scsi: bfa: remove bfa_fcs_mod_s Just call the functions directly instead of obsfucating the call chain. This was in reply to a patch from Kees Cook to constify the function pointer struct bfa_fcs_mod_s, but it turns out there is no reason to have this indirection at all. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfa_fcs.c | 181 ++++++++++++--------------------------------- drivers/scsi/bfa/bfa_fcs.h | 4 - 2 files changed, 46 insertions(+), 139 deletions(-) commit 577419f70463378c224d4b92e31b22c2877c4389 Author: Colin Ian King Date: Thu Dec 29 22:20:38 2016 +0000 scsi: qla2xxx: rename {vendor|hba}_indentifer to {vendor|hba}_identifer Rename the vendor_indentifer and hba_indentifer fields to correct spelling. Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 4 ++-- drivers/scsi/qla2xxx/qla_gs.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 44a8f954449c604b7b0a73a0316a8c4ed3487784 Author: Nicolas Iooss Date: Mon Dec 26 14:23:10 2016 +0100 scsi: qla2xxx: make msix_entries const msix_entries and qla82xx_msix_entries arrays are never modified in drivers/scsi/qla2xxx/qla_isr.c. Move their contents to read-only data. Signed-off-by: Nicolas Iooss Reviewed-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2e8f619adaaa1b31c3739640beb0bd72ac87f4d Author: Nicolas Iooss Date: Mon Dec 26 14:23:09 2016 +0100 scsi: qla2xxx: silence -Wformat-security warning qla24xx_enable_msix() calls scnprintf() with a non-literal format string. This makes clang report -Wformat-security warnings when compiling this function: drivers/scsi/qla2xxx/qla_isr.c:3083:7: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] msix_entries[i].name); ^~~~~~~~~~~~~~~~~~~~ drivers/scsi/qla2xxx/qla_isr.c:3083:7: note: treat the string as an argument to avoid this msix_entries[i].name); ^ "%s", drivers/scsi/qla2xxx/qla_isr.c:3119:7: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] msix_entries[QLA_ATIO_VECTOR].name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/qla2xxx/qla_isr.c:3119:7: note: treat the string as an argument to avoid this msix_entries[QLA_ATIO_VECTOR].name); ^ "%s", Even though msix_entries[...].name are initialized as literal strings with no % character and are never modified, introduce a "%s" format parameter in order to silence this -Wformat-security warning and make clang able to detect at compile time real bugs related to string formatting. [mkp: typo] Signed-off-by: Nicolas Iooss Reviewed-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4675ac39b5dd5ff08dd8cb2be9ddd3cba778aa39 Author: Al Viro Date: Mon Jan 9 22:29:15 2017 -0500 namei.c: split unlazy_walk() In all but one case, the last two arguments are NULL and 0 resp.; almost everyone just wants to switch nameidata to non-RCU mode. The only exception is lookup_fast(), where we have a child dentry we want to legitimize as well. Split these two cases. Signed-off-by: Al Viro fs/namei.c | 105 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 39 deletions(-) commit a89f833737e6c75df0091ccf6c767b94745463c1 Author: Al Viro Date: Mon Jan 9 22:25:28 2017 -0500 namei.c: fold the check for DCACHE_OP_REVALIDATE into d_revalidate() Signed-off-by: Al Viro fs/namei.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit 15f422c892f9b4cc5e27764f454c97df2afcca3d Author: Milo Kim Date: Wed Jan 4 13:55:53 2017 +0900 ARM: dts: imx6: Support Savageboard quad Use common board file and support SATA interface additionally. Specify the dtb file for i.MX6 build. Reviewed-by: Fabio Estevam Signed-off-by: Milo Kim Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-savageboard.dts | 55 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 7c9a5670451bf6336c21b71829df4157462f9022 Author: Milo Kim Date: Wed Jan 4 16:04:36 2017 +0900 ARM: dts: imx6: Support Savageboard dual Common savageboard DT file is used for board support. Add the vendor name and specify the dtb file for i.MX6Q build. Reviewed-by: Fabio Estevam Signed-off-by: Milo Kim Acked-by: Rob Herring Signed-off-by: Shawn Guo .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6dl-savageboard.dts | 51 ++++++++++++++++++++++ 3 files changed, 53 insertions(+) commit 4a9c1f7cb44c171edada9a6543482dc896b30f8c Author: Milo Kim Date: Wed Jan 4 13:55:51 2017 +0900 ARM: dts: imx6: Add Savageboard common file * Memory memblock for DDR3 1GB * Regulator 3.3V for panel and backlight. * Display Enable HDMI and LVDS panel. Savageboard supports AVIC TM097TDH02 panel which is compatible with Hannstar HSD100PXN1, so reuse it. * Clock The commit d28be499c45e6 ("ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously") is applied to support LVDS and HDMI output at the same time. * Pinmux Support eMMC, ethernet, gpio key for power button, I2C, PWM, SD card and UART. * Others Enable ethernet, UART1 debug, USB host, USDHC3 for microSD card and USDHC4 for built-in eMMC storage. Reviewed-by: Fabio Estevam Signed-off-by: Milo Kim Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-savageboard.dtsi | 255 +++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) commit baed3c599a8f837e4b267da5aec805f33c65a6cf Merge: d01300a 1edcd36 Author: Olof Johansson Date: Mon Jan 9 19:19:49 2017 -0800 Merge tag 'sunxi-generic-pinconf-for-4.10' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Allwinner conversion to generic pin muxing properties Here is a list of patches that converts the current DT to the generic pin control and muxing properties, now that the pinctrl driver supports it. * tag 'sunxi-generic-pinconf-for-4.10' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: sunxi: Convert pinctrl nodes to generic bindings ARM: sunxi: Remove useless allwinner,pull property ARM: sunxi: Remove useless allwinner,drive property Signed-off-by: Olof Johansson commit d01300a62ca20af873f1f84a9de22d85878d5a1f Merge: 70c6420 0c5987d Author: Olof Johansson Date: Mon Jan 9 19:18:45 2017 -0800 Merge tag 'oxnas-arm-soc-dt-for-4.11' of https://github.com/OXNAS/linux into next/dt - Add dt-bindings includes for OX820 and OX810SE dtsi - Replace reset and clock magic numbers for OX820 and OX810SE * tag 'oxnas-arm-soc-dt-for-4.11' of https://github.com/OXNAS/linux: ARM: dts: OX820: Update with dt-bindings includes ARM: dts: OX810: Update with dt-bindings includes Signed-off-by: Olof Johansson commit 53f56d6e239afb4a30ac8adbd31297ab55b357c8 Merge: a121103 70def3e Author: Olof Johansson Date: Mon Jan 9 19:17:06 2017 -0800 Merge tag 'renesas-soc-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM Based SoC Updates for v4.11 * Allow booting secondary CPU cores in debug mode * tag 'renesas-soc-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Remove unused rcar_gen2_read_mode_pins() ARM: shmobile: r8a7791: Allow booting secondary CPU cores in debug mode ARM: shmobile: apmu: Allow booting secondary CPU cores in debug mode ARM: shmobile: apmu: Add debug resource reset for secondary CPU boot ARM: shmobile: apmu: Add more register documentation Signed-off-by: Olof Johansson commit 70c6420cad2b9da0f1b52e3a26c566717e2c6291 Merge: a121103 654450b Author: Olof Johansson Date: Mon Jan 9 19:15:54 2017 -0800 Merge tag 'renesas-dt-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Updates for v4.11 * Add da9063 PMIC device node for system restart to gose board * Add device node for PRR to SoCs where it was missing * Move RST node before SYSC node where it was incorrectly placed * Use Gen 2 fallback bindings for I2C, IIC, MSIOf and USB2 phy * Use SoC-specific compat string for MMCIF where it was missing * tag 'renesas-dt-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (25 commits) ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for msiof nodes ARM: dts: r8a7792: Use R-Car Gen 2 fallback binding for msiof nodes ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for msiof nodes ARM: dts: r8a7794: Use R-Car Gen 2 fallback binding for iic nodes ARM: dts: r8a7793: Use R-Car Gen 2 fallback binding for iic nodes ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for iic nodes ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for iic nodes ARM: dts: r8a7794: Use R-Car Gen 2 fallback binding for i2c nodes ARM: dts: r8a7793: Use R-Car Gen 2 fallback binding for i2c nodes ARM: dts: r8a7792: Use R-Car Gen 2 fallback binding for i2c nodes ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for i2c nodes ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for i2c nodes ARM: dts: r8a7778: Use R-Car Gen 1 fallback binding for i2c nodes ARM: dts: r8a7779: Use R-Car Gen 1 fallback binding for i2c nodes ARM: dts: r8a7794: Use renesas,rcar-gen2-usb-phy fallback binding ARM: dts: r8a7791: Use renesas,rcar-gen2-usb-phy fallback binding ARM: dts: r8a7790: Use renesas,rcar-gen2-usb-phy fallback binding ARM: dts: gose: Add da9063 PMIC device node for system restart ARM: dts: sh73a0: Use SoC-specific compat string for mmcif ARM: dts: r8a7778: Use SoC-specific compat string for mmcif ... Signed-off-by: Olof Johansson commit 7a7b1978b197162bca0854e60728423f9227ac3e Merge: a121103 b2b9443b Author: Olof Johansson Date: Mon Jan 9 19:14:09 2017 -0800 Merge tag 'renesas-arm64-dt-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Renesas ARM64 Based SoC DT Updates for v4.11 * Add PWM, and sound MIX and CTU support to r8a7795 SoC * Add CAN, CAN FD and all MSIOF nodes to r8a7796 SoC * Use Gen 3 fallback binding for i2c, msiof, PCIE and USB2 phy * Enable Ethernet and 4 GiB memory on r8a7796/salvator-x board * Add r8a7796/salvator-x board part number to bindings * tag 'renesas-arm64-dt-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: r8a7795: Add PWM support arm64: dts: r8a7796: Use R-Car Gen 3 fallback binding for msiof nodes arm64: dts: r8a7796: salvator-x: Enable EthernetAVB arm64: dts: renesas: r8a7796: Add EthernetAVB instance arm64: dts: r8a7796: salvator-x: Update memory node to 4 GiB map arm64: dts: r8a7796: Use R-Car Gen 3 fallback binding for i2c nodes arm64: dts: r8a7795: Use R-Car Gen 3 fallback binding for i2c nodes arm64: dts: r8a7795: Use Gen 3 fallback compat string for PCIE arm64: dts: r8a7795: add sound MIX support arm64: dts: r8a7795: add sound CTU support arm64: dts: r8a7795: Use renesas,rcar-gen3-usb2-phy fallback binding arm64: renesas: r8a7796/salvator-x: Add board part number to DT bindings arm64: dts: r8a7796: Add CAN FD support arm64: dts: r8a7796: Add CAN support arm64: dts: r8a7796: Add CAN external clock support arm64: dts: r8a7796: Add all MSIOF nodes Signed-off-by: Olof Johansson commit 0a8c771b95ca8a4811d2d23f96c29e987920b299 Merge: 94417e5 e37278d Author: Olof Johansson Date: Mon Jan 9 19:12:55 2017 -0800 Merge tag 'renesas-defconfig-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig Renesas ARM Based SoC Defconfig Updates for v4.11 Enable: * Recently added Enable r8a774[35] SoCs * CMA for DMA to allow use of VIN with large frame sizes * CONFIG_VIDEO_ADV7604 to allow use of HDMI input * tag 'renesas-defconfig-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: multi_v7_defconfig: Enable r8a774[35] SoCs ARM: shmobile: defconfig: Enable r8a774[35] SoCs ARM: shmobile: defconfig: Enable CMA for DMA ARM: shmobile: defconfig: Enable CONFIG_VIDEO_ADV7604 Signed-off-by: Olof Johansson commit 0f7a4bcbe51dfb7c39c39089486448ab0aac6c77 Author: Jia Hongtao Date: Wed Jan 4 10:36:25 2017 +0800 arm64: dts: ls1046a: Add TMU device tree support Also add nodes and properties for thermal management support. Signed-off-by: Jia Hongtao Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 80 ++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 94417e5659ebe9c6062dec3261aa3a032547f75b Author: Linus Walleij Date: Tue Dec 27 13:05:30 2016 +0100 ARM: defconfig: pxa: cut MPU3050 input driver The PXA defconfig compiles the legacy MPU3050 driver as a module, but the device does not appear in device trees nor board files, so remove this from the defconfig assuming it was a mistake to add it in the first place. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/pxa_defconfig | 1 - 1 file changed, 1 deletion(-) commit 1b1fe1d9732711bb6881422cc21b45c428c26baa Author: Linus Walleij Date: Tue Dec 27 13:05:29 2016 +0100 ARM: defconfig: tegra: switch to MPU3050 IIO driver The Tegra is currently configured to use the old input driver for the MPU-3050. Switch to the new IIO driver. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/tegra_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b0c9f5e562a4e76c7c8b83b3102b53daedf2fdd Author: Linus Walleij Date: Tue Dec 27 13:05:28 2016 +0100 ARM: defconfig: replace MPU3050 driver on multi_v7 The multi_v7 config enable the MPU3050 gyro input driver, but there is now a dedicated IIO gyro driver for the same component, which is the right subsystem to handle this. Replace it in the defconfig. As we want the full IIO featureset and as other v7 systems will likely enjoy using IIO for their sensor work (such as the Android-to-IIO userspace HAL), we take this opportunity to turn on the standard sensor HRtimer triggering. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ff90e93867b2841badd33a419d86be0c08c538ca Author: Andy Gross Date: Mon Jan 2 14:35:05 2017 -0600 ARM: multi_v7_defconfig: enable Qualcomm RPMCC This patch enables the Qualcomm RPM based Clock Controller present on A-family boards. Signed-off-by: Andy Gross Acked-by: Bjorn Andersson Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 042f6d98261d8edc225237acaeb627aeadbf54ad Author: Fabio Estevam Date: Tue Jan 3 17:12:31 2017 -0200 ARM: dts: imx53-qsb: Provide the TVE DAC regulators On imx53-qsb the TVE DAC regulator comes from: - LDO7 on the board with the Dialog DA9052 PMIC - VDAC on the board with the MC34708 PMIC Pass them in the 'dac-supply' node. While at it, remove the 'regulator-always-on/regulator-boot-on' properties as the TVE driver will properly handle it. Tested on a imx53-qsb board with a Dialog DA9052 PMIC. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsb.dts | 5 ++++- arch/arm/boot/dts/imx53-qsrb.dts | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit a4e31f26842e3a81f5798985b30224673c112501 Author: Lukasz Majewski Date: Tue Jan 3 11:46:21 2017 +0100 ARM: dts: imx6q: Add mccmon6 board support This patch provides support for Liebherr's Monitor 6 board (abverrated as mccmon6) to Linux kernel. Signed-off-by: Lukasz Majewski Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-mccmon6.dts | 473 ++++++++++++++++++++++++++++++++++++ 2 files changed, 474 insertions(+) commit 653e9b17f94b5f30cd41ece05a7284642ad1bb4f Author: Lukasz Majewski Date: Tue Jan 3 11:46:20 2017 +0100 Doc: devicetree: bindings: Add vendor prefix entry - lwn This patch adds entry for LWN - the Liebherr-Werk Nenzing GmbH company to vendor-prefixes.txt file. Signed-off-by: Lukasz Majewski Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e839a448814584e73a79c1fa76caace2ef42e0ee Author: Chris Lapa Date: Mon Jan 9 11:47:35 2017 +1100 power: supply: bq27xxx: move overtemp tests to a switch statement. This is done for readability as the upcoming commits will add a lot of cases. tested: no Signed-off-by: Chris Lapa Acked-by: Pali Rohár Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 13283626c889fd5c03b485d54c924b795aca1c1e Author: Alexandre Belloni Date: Tue Jan 3 11:27:13 2017 +0100 ARM: dts: imx/vf: Correct license text The license text has been mangled at some point then copy pasted across multiple files. Restore it to what it should be. Note that this is not intended as a license change. Reviewed-by: Heiko Schocher Acked-by: Marcel Ziswiler Acked-by: Uwe Kleine-König Acked-by: Afzal Mohammed Acked-by: Michael Trimarchi Acked-by: Stefan Agner Signed-off-by: Alexandre Belloni Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-aristainetos2_4.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-aristainetos2_7.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-cubox-i.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-hummingboard.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-icore.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-nit6xlite.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-nitrogen6x.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-sabrelite.dts | 10 +++++----- arch/arm/boot/dts/imx6dl-ts4900.dts | 10 +++++----- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 10 +++++----- arch/arm/boot/dts/imx6q-b450v3.dts | 10 +++++----- arch/arm/boot/dts/imx6q-b650v3.dts | 10 +++++----- arch/arm/boot/dts/imx6q-b850v3.dts | 10 +++++----- arch/arm/boot/dts/imx6q-ba16.dtsi | 10 +++++----- arch/arm/boot/dts/imx6q-bx50v3.dtsi | 10 +++++----- arch/arm/boot/dts/imx6q-cm-fx6.dts | 10 +++++----- arch/arm/boot/dts/imx6q-cubox-i.dts | 10 +++++----- arch/arm/boot/dts/imx6q-h100.dts | 10 +++++----- arch/arm/boot/dts/imx6q-hummingboard.dts | 10 +++++----- arch/arm/boot/dts/imx6q-icore-rqs.dts | 10 +++++----- arch/arm/boot/dts/imx6q-icore.dts | 10 +++++----- arch/arm/boot/dts/imx6q-marsboard.dts | 10 +++++----- arch/arm/boot/dts/imx6q-nitrogen6_max.dts | 10 +++++----- arch/arm/boot/dts/imx6q-nitrogen6_som2.dts | 10 +++++----- arch/arm/boot/dts/imx6q-nitrogen6x.dts | 10 +++++----- arch/arm/boot/dts/imx6q-sabrelite.dts | 10 +++++----- arch/arm/boot/dts/imx6q-ts4900.dts | 10 +++++----- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-icore.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-microsom.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 10 +++++----- arch/arm/boot/dts/imx6qdl-ts4900.dtsi | 10 +++++----- arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 10 +++++----- arch/arm/boot/dts/imx6sx-sdb-sai.dts | 10 +++++----- arch/arm/boot/dts/imx6ul-geam-kit.dts | 10 +++++----- arch/arm/boot/dts/imx6ul-geam.dtsi | 10 +++++----- arch/arm/boot/dts/imx6ul-liteboard.dts | 10 +++++----- arch/arm/boot/dts/imx6ul-litesom.dtsi | 10 +++++----- arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 10 +++++----- arch/arm/boot/dts/imx6ull-14x14-evk.dts | 10 +++++----- arch/arm/boot/dts/imx6ull.dtsi | 10 +++++----- arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 10 +++++----- arch/arm/boot/dts/vf-colibri.dtsi | 10 +++++----- arch/arm/boot/dts/vf500-colibri-eval-v3.dts | 10 +++++----- arch/arm/boot/dts/vf500-colibri.dtsi | 10 +++++----- arch/arm/boot/dts/vf500.dtsi | 10 +++++----- arch/arm/boot/dts/vf610-colibri-eval-v3.dts | 10 +++++----- arch/arm/boot/dts/vf610-colibri.dtsi | 10 +++++----- arch/arm/boot/dts/vf610-twr.dts | 10 +++++----- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 10 +++++----- arch/arm/boot/dts/vf610.dtsi | 10 +++++----- arch/arm/boot/dts/vf610m4-colibri.dts | 10 +++++----- arch/arm/boot/dts/vf610m4-cosmic.dts | 10 +++++----- arch/arm/boot/dts/vf610m4.dtsi | 10 +++++----- arch/arm/boot/dts/vfxxx.dtsi | 10 +++++----- 66 files changed, 330 insertions(+), 330 deletions(-) commit ba3213602d2824de358564ff391293f351ba1b1c Author: Harninder Rai Date: Tue Jan 3 15:27:31 2017 +0530 arm64: dts: Add support for FSL's LS1012A SoC LS1012A features an advanced 64-bit ARM v8 CortexA53 processor with 32 KB of parity protected L1-I cache, 32 KB of ECC protected L1-D cache, as well as 256 KB of ECC protected L2 cache. Features summary One 64-bit ARM-v8 Cortex-A53 core with the following capabilities - Arranged as a cluster of one core supporting a 256 KB L2 cache with ECC protection - Speed up to 800 MHz - Parity-protected 32 KB L1 instruction cache and 32 KB L1 data cache - Neon SIMD engine - ARM v8 cryptography extensions One 16-bit DDR3L SDRAM memory controller ARM core-link CCI-400 cache coherent interconnect Cryptography acceleration (SEC) One Configurable x3 SerDes One PCI Express Gen2 controller, supporting x1 operation One serial ATA (SATA Gen 3.0) controller One USB 3.0/2.0 controller with integrated PHY Following levels of DTSI/DTS files have been created for the LS1012A SoC family: - fsl-ls1012a.dtsi: DTS-Include file for FSL LS1012A SoC. - fsl-ls1012a-frdm.dts: DTS file for FSL LS1012A FRDM board. - fsl-ls1012a-qds.dts: DTS file for FSL LS1012A QDS board. - fsl-ls1012a-rdb.dts: DTS file for FSL LS1012A RDB board. Signed-off-by: Harninder Rai Signed-off-by: Bhaskar Upadhaya Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 3 + arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts | 115 ++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 128 +++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 59 +++++ arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 247 +++++++++++++++++++++ 5 files changed, 552 insertions(+) commit f082bbff3b1dcabae4e26a480f76b71e8e64f3df Author: Martin Kaiser Date: Tue Jan 3 19:50:57 2017 +0100 ARM: dts: imx25.dtsi: DryIce security violation interrupt The DryIce block on i.MX25 chipset uses two interrupts: A normal and a security violation interrupt. Add the security violation interrupt to the list, it is optional. Signed-off-by: Martin Kaiser Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cbad9fa5fe5fe119575acd2ed0a0e374339029b Author: Milo Kim Date: Fri Dec 9 15:28:32 2016 +0900 dt-bindings: power: supply: Update TPS65217 properties Add interrupt specifiers for USB and AC charger input. Interrupt numbers are from the datasheet. Fix wrong property for compatible string. Signed-off-by: Milo Kim Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/tps65217_charger.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8686439de09073ed5cba5d768fcba3eb658fd35a Author: Bai Ping Date: Thu Nov 17 09:08:19 2016 +0800 ARM: dts: imx: Add ocotp node for imx6ul Add ocotp node for i.MX6UL SOC. Signed-off-by: Bai Ping Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 545643fddb4d15b5a8608856bd01ee158b1ec446 Merge: 5508124 318fa46 Author: Stephen Boyd Date: Mon Jan 9 16:45:06 2017 -0800 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk/samsung: exynos542x: mark some clocks as critical commit 5508124cccb8bd7bebe7552022f7082e37dc6e50 Author: Akinobu Mita Date: Sun Jan 1 03:04:36 2017 +0900 clk: cdce925: add support for CDCE913, CDCE937, and CDCE949 The CDCE925 is a member of the CDCE(L)9xx programmable clock generator family. There are also CDCE913, CDCE937, CDCE949 which have different number of PLLs and outputs. The clk-cdce925 driver supports only CDCE925 in the family. This adds support for the CDCE913, CDCE937, CDCE949, too. Signed-off-by: Akinobu Mita Acked-by: Rob Herring Cc: Mike Looijmans Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/ti,cdce925.txt | 15 ++- drivers/clk/Kconfig | 11 ++- drivers/clk/clk-cdce925.c | 108 ++++++++++++++++----- 3 files changed, 100 insertions(+), 34 deletions(-) commit 8e18d065899e57f2065cea2d34249b966c631338 Author: Zoran Markovic Date: Thu Dec 22 20:54:44 2016 -0800 clk: mdm9615: Add EBI2 clock Add definition of EBI2 clock used by MDM9615 NAND controller. Cc: Andy Gross Cc: David Brown Cc: Michael Turquette Cc: Stephen Boyd Cc: Rob Herring Cc: Mark Rutland Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Zoran Markovic Acked-by: Neil Armstrong [sboyd@codeaurora.org: ebi2_clk halt bit is 24 not 23] Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-mdm9615.c | 30 ++++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-mdm9615.h | 2 ++ 2 files changed, 32 insertions(+) commit e3dcb74991b792cb9eecae7cd5227b436f8e69ce Author: Vesa Jääskeläinen Date: Fri Dec 23 13:15:59 2016 +0200 rtc: tps65910: use 'unsigned int' instead of 'unsigned' in arguments Fixes checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Vesa Jääskeläinen Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps65910.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aecb57da7ae9df1f9c2eb11788888b135ddc0203 Author: Vesa Jääskeläinen Date: Fri Dec 23 13:15:58 2016 +0200 rtc: tps65910: Add RTC calibration support Texas Instrument's TPS65910 has support for compensating RTC crystal inaccuracies. When enabled every hour RTC counter value will be compensated with two's complement value. Signed-off-by: Vesa Jääskeläinen Acked-by: Lee Jones Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps65910.c | 143 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/tps65910.h | 1 + 2 files changed, 144 insertions(+) commit 5c48ea1ebc50f962ebc76111c35e2b4cf431bf6e Author: Masahiro Yamada Date: Mon Dec 26 11:34:33 2016 +0900 clk: uniphier: remove unneeded #include This include was needed to suppress build error when this driver was initially merged because did not include at that time. (developers' headache across sub-systems) The root cause has been fixed by commit adf08d481b52 ("regmap: include from include/linux/regmap.h"), so this line can be dropped now. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-cpugear.c | 1 - 1 file changed, 1 deletion(-) commit 0c70ffc5f300e7c3a1a76ca0530860574afc890b Author: Thomas Petazzoni Date: Thu Dec 22 13:08:14 2016 +0100 clk: mvebu: adjust AP806 CPU clock frequencies to production chip This commit adjusts the list of possible "Sample At Reset" values that define the CPU clock frequency of the AP806 (part of Marvell Armada 7K/8K) to the values that have been validated with the production chip. Earlier values were preliminary. Signed-off-by: Thomas Petazzoni Signed-off-by: Stephen Boyd drivers/clk/mvebu/ap806-system-controller.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit a2d6ef3a230dd48ad8c7d605784eb7814018361e Merge: e2d7933 d374e6f Author: Stephen Boyd Date: Mon Jan 9 16:26:30 2017 -0800 Merge branch 'clk-hi3660' into clk-next * clk-hi3660: clk: hisilicon: Add clock driver for hi3660 SoC dt-bindings: Document the hi3660 clock bindings commit d374e6fd50880c949cdfa649f6f0c7ed2321f896 Author: Zhangfei Gao Date: Thu Dec 29 10:33:25 2016 +0800 clk: hisilicon: Add clock driver for hi3660 SoC Add clock drivers for hi3660 SoC, this driver controls the SoC registers to supply different clocks to different IPs in the SoC. Signed-off-by: Zhangfei Gao [sboyd@codeaurora.org: Simplify probe with function pointer] Signed-off-by: Stephen Boyd drivers/clk/hisilicon/Kconfig | 7 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/hisilicon/clk-hi3660.c | 567 +++++++++++++++++++++++++++++++ include/dt-bindings/clock/hi3660-clock.h | 194 +++++++++++ 4 files changed, 769 insertions(+) commit 70c497deb456761232ccd973b8d3d3948138e2cf Author: Zhangfei Gao Date: Thu Dec 29 10:33:24 2016 +0800 dt-bindings: Document the hi3660 clock bindings Add DT bindings documentation for hi3660 SoC clock. Signed-off-by: Zhangfei Gao Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/hi3660-clock.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e2d793330875d60e2c81de7a75b6bba159fef70a Author: Geert Uytterhoeven Date: Wed Jan 4 11:12:33 2017 +0100 clk: clk-conf: Do not print error messages if EPROBE_DEFER EPROBE_DEFER is not an error, hence printing an error message like clk: couldn't get clock 0 for /soc/display@feb00000 may confuse the user. Suppress error messages in case of probe deferral to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Javier Martinez Canillas Reviewed-by: Marek Vasut Signed-off-by: Stephen Boyd drivers/clk/clk-conf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 67bcc2c5f1da8c5bb58e72354274ea5c59a3950a Author: Sudeep Holla Date: Fri Jan 6 12:34:30 2017 +0000 clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled Currently we add the virtual cpufreq device unconditionally even when the SCPI DVFS clock provider node is disabled. This will cause cpufreq driver to throw errors when it gets initailised on boot/modprobe and also when the CPUs are hot-plugged back in. This patch fixes the issue by adding the virtual cpufreq device only if the SCPI DVFS clock provider is available and registered. Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device") Reported-by: Michał Zegan Cc: Neil Armstrong Signed-off-by: Sudeep Holla Tested-by: Michał Zegan Signed-off-by: Stephen Boyd drivers/clk/clk-scpi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4263499a6e05c42c47c8e22c23575bc79ab62ddf Author: Avaneesh Kumar Dwivedi Date: Thu Dec 15 17:51:30 2016 +0530 clk: qcom: Add GCC_MSS_RESET support Add support to use reset control framework for resetting MSS with hexagon v56 1.5.0. Signed-off-by: Avaneesh Kumar Dwivedi Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 1 + include/dt-bindings/clock/qcom,gcc-msm8996.h | 1 + 2 files changed, 2 insertions(+) commit edc6da239a1ac7ed1c657b1421c7c714a99db4d9 Author: Jun Nie Date: Fri Dec 16 15:26:47 2016 +0800 clk: zte: add audio clocks for zx296718 The audio related clock support is missing from the existing zx296718 clock driver. Let's add it, so that the upstream ZX SPDIF driver can work for HDMI audio support. Signed-off-by: Jun Nie Signed-off-by: Shawn Guo [sboyd@codeaurora.org: Staticize some more structures] Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 127 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/zte/clk.c | 127 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/zte/clk.h | 21 +++++++ 3 files changed, 275 insertions(+) commit 699902760538eb37cc53725323b57924d1f0f1ff Author: Shawn Guo Date: Fri Dec 16 15:26:46 2016 +0800 dt-bindings: zx296718-clk: add compatible for audio clock controller It adds the compatible string for zx296718 audio clock controller. Signed-off-by: Shawn Guo Acked-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/zx296718-clk.txt | 3 +++ 1 file changed, 3 insertions(+) commit 26f6b0b771b6629188e121f6f0380f3835b23272 Author: Shawn Guo Date: Fri Dec 16 15:26:45 2016 +0800 clk: zx296718: do not panic on failure Instead of using panic, we should give an error message and return error code when of_clk_add_hw_provider() call fails. Since we have error prompt for failures, the "init over" pr_info output isn't really necessary but becomes a debug noise. So let's clean it up along the way. Signed-off-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit ed784c532a3d0959db488f40a96c5127f63d42dc Author: Nicholas Mc Guire Date: Mon Dec 12 08:40:09 2016 +0100 clk: wm831x: fix usleep_range with bad range The delay here is not in atomic context and does not seem critical with respect to precision, but usleep_range(min,max) with min==max results in giving the timer subsystem no room to optimize uncritical delays. Fix this by setting the range to 2000,3000 us. Fixes: commit f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver") Signed-off-by: Nicholas Mc Guire Acked-by: Charles Keepax Signed-off-by: Stephen Boyd drivers/clk/clk-wm831x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c77cbdd11b688fa0d1fbb140473dad4bc47cf5e6 Author: Nikita Yushchenko Date: Mon Dec 19 11:12:09 2016 +0300 clk: imx: pllv3: support fractional multiplier on vf610 PLL1/PLL2 On vf610, PLL1 and PLL2 have registers to configure fractional part of frequency multiplier. This patch adds support for these registers. This fixes "fast system clock" issue on boards where bootloader sets fractional multiplier for PLL1. Suggested-by: Andrey Smirnov CC: Chris Healy Signed-off-by: Nikita Yushchenko Tested-by: Andrey Smirnov Signed-off-by: Stephen Boyd drivers/clk/imx/clk-pllv3.c | 99 +++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/imx/clk-vf610.c | 4 +- drivers/clk/imx/clk.h | 1 + 3 files changed, 102 insertions(+), 2 deletions(-) commit 6205406cf6f282d622f31de25036e6d1ab3a2ff5 Author: Jose Abreu Date: Mon Dec 12 11:08:55 2016 +0000 clk/axs10x: Clear init field in driver probe Init field must be cleared in driver probe as this structure is not dinamically allocated. If not, wrong flags can be passed to core. Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Stephen Boyd Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org Fixes: 923587aafc2c ("clk/axs10x: Add I2S PLL clock driver") Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/040cc9afdfa0e95ce7a01c406ff427ef7dc0c0fd.1481540717.git.joabreu@synopsys.com drivers/clk/axs10x/i2s_pll_clock.c | 1 + 1 file changed, 1 insertion(+) commit 2df2b82b7ec2a10f9b4d455cd33659c490990f02 Merge: 0c744ea 685dc94 844ca23 395717e 3868f13 Author: Stephen Boyd Date: Mon Jan 9 16:06:11 2017 -0800 Merge branches 'clk-qcom-rpm8974', 'clk-stm32f4', 'clk-ipq4019' and 'clk-fixes' into clk-next * clk-qcom-rpm8974: clk: qcom: smd-rpmcc: Add msm8974 clocks * clk-stm32f4: clk: stm32f4: SDIO & 48Mhz clock management for STM32F469 board clk: stm32f4: Add SAI clocks clk: stm32f4: Add I2S clock clk: stm32f4: Add lcd-tft clock clk: stm32f4: Add post divisor for I2S & SAI PLLs clk: stm32f4: Add PLL_I2S & PLL_SAI for STM32F429/469 boards clk: stm32f4: Update DT bindings documentation * clk-ipq4019: clk: qcom: ipq4019: Add the cpu clock frequency change notifier clk: qcom: ipq4019: Add all the frequencies for apss cpu clk: qcom: ipq4019: correct sdcc frequency and parent name clk: qcom: ipq4019: Add the nodes for pcnoc clk: qcom: ipq4019: Add the apss cpu pll divider clock node clk: qcom: ipq4019: remove fixed clocks and add pll clocks * clk-fixes: clk: stm32f4: Use CLK_OF_DECLARE_DRIVER initialization method clk: renesas: mstp: Support 8-bit registers for r7s72100 commit 3a89eaa65db68bf53bf92dedc60084f810e1779a Author: Vivien Didelot Date: Mon Jan 9 16:49:26 2017 -0500 net: dsa: select NET_SWITCHDEV The support for DSA Ethernet switch chips depends on TCP/IP networking, thus explicit that HAVE_NET_DSA depends on INET. DSA uses SWITCHDEV, thus select it instead of depending on it. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Tested-by: Randy Dunlap Signed-off-by: David S. Miller net/dsa/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f1be6cdaf57ce918828b6cff6ff2b4ea87be7f62 Author: Andy Shevchenko Date: Sat Jan 7 14:34:57 2017 +0200 x86/platform/intel-mid: Make intel_scu_device_register() static There is no need anymore to have intel_scu_device_register() exported. Annotate it with static keyword. While here, rename to intel_scu_ipc_device_register() to use same pattern for all SFI enumerated device register helpers. Signed-off-by: Andy Shevchenko Link: http://lkml.kernel.org/r/20170107123457.53033-1-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel-mid.h | 1 - arch/x86/platform/intel-mid/sfi.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit bda65b4255ac983ce36a6c0ea6a7794f8e8fcc86 Merge: b369e7f f502d83 Author: David S. Miller Date: Mon Jan 9 17:09:31 2017 -0500 Merge tag 'mlx5-4kuar-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5 4K UAR The following series of patches optimizes the usage of the UAR area which is contained within the BAR 0-1. Previous versions of the firmware and the driver assumed each system page contains a single UAR. This patch set will query the firmware for a new capability that if published, means that the firmware can support UARs of fixed 4K regardless of system page size. In the case of powerpc, where page size equals 64KB, this means we can utilize 16 UARs per system page. Since user space processes by default consume eight UARs per context this means that with this change a process will need a single system page to fulfill that requirement and in fact make use of more UARs which is better in terms of performance. In addition to optimizing user-space processes, we introduce an allocator that can be used by kernel consumers to allocate blue flame registers (which are areas within a UAR that are used to write doorbells). This provides further optimization on using the UAR area since the Ethernet driver makes use of a single blue flame register per system page and now it will use two blue flame registers per 4K. The series also makes changes to naming conventions and now the terms used in the driver code match the terms used in the PRM (programmers reference manual). Thus, what used to be called UUAR (micro UAR) is now called BFREG (blue flame register). In order to support compatibility between different versions of library/driver/firmware, the library has now means to notify the kernel driver that it supports the new scheme and the kernel can notify the library if it supports this extension. So mixed versions of libraries can run concurrently without any issues. ==================== Signed-off-by: David S. Miller commit b369e7fd41f7cdbe2488cb736ef4f958bb94b5e2 Author: Eric Dumazet Date: Mon Jan 9 10:29:27 2017 -0800 tcp: make TCP_INFO more consistent tcp_get_info() has to lock the socket, so lets lock it for an extended critical section, so that various fields have consistent values. This solves an annoying issue that some applications reported when multiple counters are updated during one particular rx/rx event, and TCP_INFO was called from another cpu. Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 282d0a35c8c42c3ac4dd86a7e408ed1b30db4897 Merge: 5c37daf a009e97 Author: Dave Airlie Date: Tue Jan 10 08:06:56 2017 +1000 Merge tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc into drm-next Back to regular -misc pulls with reasonable sizes: - dma_fence error clarification (Chris) - drm_crtc_from_index helper (Shawn), pile more patches on the m-l to roll this out to drivers - mmu-less support for fbdev helpers from Benjamin - piles of kerneldoc work - some polish for crc support from Tomeu and Benjamin - odd misc stuff all over * tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc: (48 commits) dma-fence: Introduce drm_fence_set_error() helper dma-fence: Wrap querying the fence->status dma-fence: Clear fence->status during dma_fence_init() drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" drm: Change the return type of the unload hook to void drm: add more document for drm_crtc_from_index() drm: remove useless parameters from drm_pick_cmdline_mode function drm: crc: Call wake_up_interruptible() each time there is a new CRC entry drm: allow to use mmuless SoC drm: compile drm_vm.c only when needed fbmem: add a default get_fb_unmapped_area function drm: crc: Wait for a frame before returning from open() drm: Move locking into drm_debugfs_crtc_crc_add drm/imx: imx-tve: Remove unused variable Revert "drm: nouveau: fix build when LEDS_CLASS=m" drm: Add kernel-doc for drm_crtc_commit_get/put drm/atomic: Fix outdated comment. drm: reference count event->completion gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap drm: Document deprecated load/unload hook ... commit 5c37daf5dd2e63090abba4ea200b56176f6e4781 Merge: 3806a27 5d799ac Author: Dave Airlie Date: Tue Jan 10 08:02:09 2017 +1000 Merge tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel into drm-next More 4.11 stuff, holidays edition (i.e. not much): - docs and cleanups for shared dpll code (Ander) - some kerneldoc work (Chris) - fbc by default on gen9+ too, yeah! (Paulo) - fixes, polish and other small things all over gem code (Chris) - and a few small things on top Plus a backmerge, because Dave was enjoying time off too. * tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel: (275 commits) drm/i915: Update DRIVER_DATE to 20170109 drm/i915: Drain freed objects for mmap space exhaustion drm/i915: Purge loose pages if we run out of DMA remap space drm/i915: Fix phys pwrite for struct_mutex-less operation drm/i915: Simplify testing for am-I-the-kernel-context? drm/i915: Use range_overflows() drm/i915: Use fixed-sized types for stolen drm/i915: Use phys_addr_t for the address of stolen memory drm/i915: Consolidate checks for memcpy-from-wc support drm/i915: Only skip requests once a context is banned drm/i915: Move a few more utility macros to i915_utils.h drm/i915: Clear ret before unbinding in i915_gem_evict_something() drm/i915/guc: Exclude the upper end of the Global GTT for the GuC drm/i915: Move a few utility macros into a separate header drm/i915/execlists: Reorder execlists register enabling drm/i915: Assert that we do create the deferred context drm/i915: Assert all timeline requests are gone before fini drm/i915: Revoke fenced GTT mmapings across GPU reset drm/i915: enable FBC on gen9+ too drm/i915: actually drive the BDW reserved IDs ... commit c22e5c125b7a00fdd177e0caba4f432eb66c8a73 Merge: f3a3e24 39f19ebb Author: David S. Miller Date: Mon Jan 9 16:56:28 2017 -0500 Merge branch 'bpf-verifier-improvements' Alexei Starovoitov says: ==================== bpf: verifier improvements A number of bpf verifier improvements from Gianluca. See individual patches for details. ==================== Signed-off-by: David S. Miller commit 39f19ebbf57b403695f7b5f9cf322fe1ddb5d7fb Author: Alexei Starovoitov Date: Mon Jan 9 10:19:50 2017 -0800 bpf: rename ARG_PTR_TO_STACK since ARG_PTR_TO_STACK is no longer just pointer to stack rename it to ARG_PTR_TO_MEM and adjust comment. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 12 ++++++------ kernel/bpf/helpers.c | 4 ++-- kernel/bpf/verifier.c | 28 ++++++++++++++-------------- kernel/trace/bpf_trace.c | 20 ++++++++++---------- net/core/filter.c | 40 ++++++++++++++++++++-------------------- 5 files changed, 52 insertions(+), 52 deletions(-) commit 06c1c049721a995dee2829ad13b24aaf5d7c5cce Author: Gianluca Borello Date: Mon Jan 9 10:19:49 2017 -0800 bpf: allow helpers access to variable memory Currently, helpers that read and write from/to the stack can do so using a pair of arguments of type ARG_PTR_TO_STACK and ARG_CONST_STACK_SIZE. ARG_CONST_STACK_SIZE accepts a constant register of type CONST_IMM, so that the verifier can safely check the memory access. However, requiring the argument to be a constant can be limiting in some circumstances. Since the current logic keeps track of the minimum and maximum value of a register throughout the simulated execution, ARG_CONST_STACK_SIZE can be changed to also accept an UNKNOWN_VALUE register in case its boundaries have been set and the range doesn't cause invalid memory accesses. One common situation when this is useful: int len; char buf[BUFSIZE]; /* BUFSIZE is 128 */ if (some_condition) len = 42; else len = 84; some_helper(..., buf, len & (BUFSIZE - 1)); The compiler can often decide to assign the constant values 42 or 48 into a variable on the stack, instead of keeping it in a register. When the variable is then read back from stack into the register in order to be passed to the helper, the verifier will not be able to recognize the register as constant (the verifier is not currently tracking all constant writes into memory), and the program won't be valid. However, by allowing the helper to accept an UNKNOWN_VALUE register, this program will work because the bitwise AND operation will set the range of possible values for the UNKNOWN_VALUE register to [0, BUFSIZE), so the verifier can guarantee the helper call will be safe (assuming the argument is of type ARG_CONST_STACK_SIZE_OR_ZERO, otherwise one more check against 0 would be needed). Custom ranges can be set not only with ALU operations, but also by explicitly comparing the UNKNOWN_VALUE register with constants. Another very common example happens when intercepting system call arguments and accessing user-provided data of variable size using bpf_probe_read(). One can load at runtime the user-provided length in an UNKNOWN_VALUE register, and then read that exact amount of data up to a compile-time determined limit in order to fit into the proper local storage allocated on the stack, without having to guess a suboptimal access size at compile time. Also, in case the helpers accepting the UNKNOWN_VALUE register operate in raw mode, disable the raw mode so that the program is required to initialize all memory, since there is no guarantee the helper will fill it completely, leaving possibilities for data leak (just relevant when the memory used by the helper is the stack, not when using a pointer to map element value or packet). In other words, ARG_PTR_TO_RAW_STACK will be treated as ARG_PTR_TO_STACK. Signed-off-by: Gianluca Borello Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 74 ++++- tools/testing/selftests/bpf/test_verifier.c | 410 ++++++++++++++++++++++++++++ 2 files changed, 474 insertions(+), 10 deletions(-) commit f0318d01b694485af9678a4e120328ae3555be6d Author: Gianluca Borello Date: Mon Jan 9 10:19:48 2017 -0800 bpf: allow adjusted map element values to spill commit 484611357c19 ("bpf: allow access into map value arrays") introduces the ability to do pointer math inside a map element value via the PTR_TO_MAP_VALUE_ADJ register type. The current support doesn't handle the case where a PTR_TO_MAP_VALUE_ADJ is spilled into the stack, limiting several use cases, especially when generating bpf code from a compiler. Handle this case by explicitly enabling the register type PTR_TO_MAP_VALUE_ADJ to be spilled. Also, make sure that min_value and max_value are reset just for BPF_LDX operations that don't result in a restore of a spilled register from stack. Signed-off-by: Gianluca Borello Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 21 +++++++++---- tools/testing/selftests/bpf/test_verifier.c | 46 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 5 deletions(-) commit 5722569bb9c3bd922c4f10b5b2912fe88c255312 Author: Gianluca Borello Date: Mon Jan 9 10:19:47 2017 -0800 bpf: allow helpers access to map element values Enable helpers to directly access a map element value by passing a register type PTR_TO_MAP_VALUE (or PTR_TO_MAP_VALUE_ADJ) to helper arguments ARG_PTR_TO_STACK or ARG_PTR_TO_RAW_STACK. This enables several use cases. For example, a typical tracing program might want to capture pathnames passed to sys_open() with: struct trace_data { char pathname[PATHLEN]; }; SEC("kprobe/sys_open") void bpf_sys_open(struct pt_regs *ctx) { struct trace_data data; bpf_probe_read(data.pathname, sizeof(data.pathname), ctx->di); /* consume data.pathname, for example via * bpf_trace_printk() or bpf_perf_event_output() */ } Such a program could easily hit the stack limit in case PATHLEN needs to be large or more local variables need to exist, both of which are quite common scenarios. Allowing direct helper access to map element values, one could do: struct bpf_map_def SEC("maps") scratch_map = { .type = BPF_MAP_TYPE_PERCPU_ARRAY, .key_size = sizeof(u32), .value_size = sizeof(struct trace_data), .max_entries = 1, }; SEC("kprobe/sys_open") int bpf_sys_open(struct pt_regs *ctx) { int id = 0; struct trace_data *p = bpf_map_lookup_elem(&scratch_map, &id); if (!p) return; bpf_probe_read(p->pathname, sizeof(p->pathname), ctx->di); /* consume p->pathname, for example via * bpf_trace_printk() or bpf_perf_event_output() */ } And wouldn't risk exhausting the stack. Code changes are loosely modeled after commit 6841de8b0d03 ("bpf: allow helpers access the packet directly"). Unlike with PTR_TO_PACKET, these changes just work with ARG_PTR_TO_STACK and ARG_PTR_TO_RAW_STACK (not ARG_PTR_TO_MAP_KEY, ARG_PTR_TO_MAP_VALUE, ...): adding those would be trivial, but since there is not currently a use case for that, it's reasonable to limit the set of changes. Also, add new tests to make sure accesses to map element values from helpers never go out of boundary, even when adjusted. Signed-off-by: Gianluca Borello Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 9 +- tools/testing/selftests/bpf/test_verifier.c | 491 ++++++++++++++++++++++++++++ 2 files changed, 498 insertions(+), 2 deletions(-) commit dbcfe5f76dd5266b8f308b5a8f9ef52f74b2d6e7 Author: Gianluca Borello Date: Mon Jan 9 10:19:46 2017 -0800 bpf: split check_mem_access logic for map values Move the logic to check memory accesses to a PTR_TO_MAP_VALUE_ADJ from check_mem_access() to a separate helper check_map_access_adj(). This enables to use those checks in other parts of the verifier as well, where boundaries on PTR_TO_MAP_VALUE_ADJ might need to be checked, for example when checking helper function arguments. The same thing is already happening for other types such as PTR_TO_PACKET and its check_packet_access() helper. The code has been copied verbatim, with the only difference of removing the "off += reg->max_value" statement and moving the sum into the call statement to check_map_access(), as that was only needed due to the earlier common check_map_access() call. Signed-off-by: Gianluca Borello Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 88 ++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 39 deletions(-) commit f3a3e248f3f7cd9a4bed334022704d7e7fc781bf Merge: c8584b3 f16a7dd Author: David S. Miller Date: Mon Jan 9 16:07:41 2017 -0500 Merge branch 'net-smc' Ursula Braun says: ==================== net/smc: Shared Memory Communications - RDMA here is now V4 of the SMC-R patches having processed your feedback from end of November. The most important change is the replacement of sysfs by a generic netlink solution in patch 04. And I tried to get rid of the __packed attributes. There are still a few usages left due to SMC-R protocol defined structures. V4 changes: The order of patches 03 and 04 for pnet table management and SMC IB-client establishing has been exchanged, since pnet table management is now built on top of smc_ib_devices. Patch 01: Use EXPORT_SYMBOL_GPL(). Patch 02: Define "use_fallback" as bool. Get rid of useless smc_sock fields clearing in smc_sock_alloc(), since sk_alloc() clears out the memory. Patch 03: Postpone smc_ib_remember_port_attr() call till ib_device is mentioned in the pnet table. Patch 04: Replace sysfs-usage by a generic netlink approach for pnet table configuration. Change layout of pnet table entries to reference net_device and ib_device instead of dealing with names of net_devices and ib_devices. Patch 05: Adapt "use_fallback" usages to new type bool. Get rid of useless smc_sock fields clearing in smc_sock_alloc() Avoid __packed where possible. Check if clc responses are not too big. Patch 09: Postpone smc_setup_per_ibdev till the first connection with this ib_device is really created. Patch 11: Get rid of __packed usage. V3 changes: Patch 05: Remove unneeded DEFINE_WAIT Patch 06: Improve synchronization of link group creation Patch 07: Rename peer_rmbe_len into peer_rmbe_size to be more consistent Patch 09: Avoid calls of ib_get_memory_region with IB_ACCESS_LOCAL_WRITE, use new default local_dma_lkey from protection domain as lkey instead. Remove no longer needed function smc_ib_dereg_memory_region(). Patch 14: Switch to state ACTIVE only if still in state INIT. Return 0 for recvmsg invoked in a socket closing state. Allow getname call in state APPCLOSEWAIT1 Do not trigger destruction of a socket-in-error queued in accept queue. During cleanup of accept queue, make sure sockets are destructed, and sockets in fallback mode are handled appropriately. When freeing sndbufs/rmbs, remove them from their list and free the entry. Use add_wait_queue() and remove_wait_queue() in close wait functions. If actively closing a socket in state for PEERFINCLOSEWAIT, keep this state. If passively closing a socket while bytes are to be received, move to state APPCLOSEWAIT1. If actively aborting a socket, skip sending the close_abort flag, since RDMA communication is no longer possible. When terminating a link group, do not schedule link group freeing a 2nd time, since already done when unregistering the last remaining connection. Patch 15: Introduce smc_diag module for monitoring SMC protocol sockets. This replaces the old patch 0015 dealing with procfs. V2 changes: Patch 0002: Add SMC versions for family key strings in net/core/sock.c. Patch 0006: initialize rb_tree. Patch 0007: Get rid of unneeded use of xchg() in smc_sndbuf_unuse() and smc_rmb_unuse(). Patch 0008: Correct error checking logic for ib_function calls. Define struct smc_link field wr_tx_id as atomic_long_t. Use "do_div" instead of "%" to be architecture-independent. Patch 0009: Correct error checking logic for ib_function calls. Patch 0011: Remove xchg() calls in cursor handling. Use atomic64_t for cursor overlays on 64-bit architectures. If not available, use plain u64 and add locking for cursor reading and writing. Implement smc_curs_add() without modulo operator "%". Patch 0012: Remove xchg() calls in cursor handling. Implement smc_tx_rdma_writes() without module operator "%". Patch 0013: Remove xchg() calls in cursor handling. Patch 0014: Return type bool in smc_wr_tx_has_pending(). Remove unneeded semicolon in smc_close_shutdown_write(). Call smc_close_active() in non-fallback case only. Get rid of duplicate schedule of sock_put_work(). Take nested sock_lock in smc_listen_work(). Start close stream_wait in case of prepared sends only. Patch 0015: Remove unneeded socket ref_count in smc_proc_seq_show(). Take lock before list_empty check in smc_proc_sock_list_del(). These patches are the initial part of the implementation of the "Shared Memory Communications-RDMA" (SMC-R) protocol as defined in RFC7609 [1]. While SMC-R does not aim to replace TCP, it taps a wealth of existing data center TCP socket applications to become more efficient without the need for rewriting them. SMC-R uses RDMA over Converged Ethernet (RoCE) to save CPU consumption. For instance, when running 10 parallel connections with uperf, we measured a decrease of 60% in CPU consumption with SMC-R compared to TCP/IP (with throughput and latency comparable; measured on x86_64 with the same RoCE card and port). SMC-R does not require an RDMA communication manager (RDMA CM). SMC-R inherits TCP qualities such as reliable connections, host-based firewall packet filtering (on connection establishment) and unmodified application of communication encryption such as TLS (transport layer security) or SSL (secure sockets layer). Since original TCP is used to establish SMC-R connections, load balancers and packet inspection based on TCP/IP connection establishment continue to work for SMC-R. On the other hand, using SMC-R implies: - either involving a preload library when invoking the unchanged TCP-application or slightly modifying the source by simply changing the socket family in the socket() call - accepting extra overhead and latency in connection establishment due to SMC Connection Layer Control (CLC) handshake - explicit coupling of RoCE ports with Ethernet ports - not routable as currently built on RoCE V1 - bypassing of packet-based networking features - filtering (netfilter) - sniffing (libpcap, packet sockets, (E)BPF) - traffic control (scheduling, shaping) - bypassing of IP-header based socket options - bypassing of memory buffer (pressure) management - unusable together with IPsec Overview of the SMC-R Protocol described in informational RFC 7609 SMC-R is an open protocol that provides RDMA capabilities over RoCE transparently for applications exploiting TCP sockets. A new socket protocol family PF_SMC is introduced. There are no changes required to applications using the sockets API for TCP stream sockets other than the specification of the new socket family AF_SMC. Unmodified applications can be used by means of a dynamic preload shared library which rewrites the socket API call socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) into socket(AF_SMC, SOCK_STREAM, IPPROTO_TCP). SMC-R re-uses the address family AF_INET for all addressing purposes around struct sockaddr. SMC-R system architecture layers: +=============================================================================+ | | unmodified TCP application | | native SMC application +--------------------------------------+ | | dynamic preload shared library | +=============================================================================+ | SMC socket | +-----------------------------------------------------------------------------+ | | TCP socket (for connection establishment and fallback) | | IB verbs +--------------------------------------------------------+ | | IP | +--------------------+--------------------------------------------------------+ | RoCE device driver | some network device driver | +=============================================================================+ Terms: A link group is determined by an ordered peer pair of TCP client and TCP server (IP addresses and subnet). Reversed client server roles cause an own link group. A link is a logical point-to-point connection based on an infiniband reliable connected queue pair (RC-QP) between two RoCE ports (MACs and GIDs) of a peer pair. A link group can have 1..8 links for failover and load balancing. This initial Linux implementation always has 1 link per link group. Each link group on a peer can have 1..255 remote memory buffers (RMBs). If more RMBs are needed, a peer can open another link group (this initial Linux implementation) or fall back to TCP. Each RMB has its own particular size and its own (R)DMA mapping and credentials (rtoken consisting of rkey and RDMA "virtual address"). This initial Linux implementation uses physically contiguous memory for RMBs but we are working towards scattered memory because of memory fragmentation. Each RMB has 1..255 RMB elements (RMBEs) of equal size to provide multiplexing of connections within an RMB. An RMBE is the RDMA Write destination organized as wrapping ring buffer for data transmit of a particular connection in one direction (duplex by means of mirror symmetry as with TCP). This initial Linux implementation always has 1 RMBE per RMB and thus an individual RMB for each connection. SMC-R connection establishment with subsequent data transfer: CLIENT SERVER TCP three-way handshake: regular TCP SYN --------------------------------------------------------> regular TCP SYN ACK <-------------------------------------------------------- regular TCP ACK --------------------------------------------------------> SMC Connection Layer Control (CLC) handshake exchanges RDMA credentials between peers: via above TCP connection: SMC CLC Proposal --------------------------------------------------------> via above TCP connection: SMC CLC Accept <-------------------------------------------------------- via above TCP connection: SMC CLC Confirm --------------------------------------------------------> SMC Link Layer Control (LLC) (only once per link, i.e. 1st conn. of link group): RoCE RC-QP: SMC LLC Confirm Link <======================================================== RoCE RC-QP: SMC LLC Confirm Link response ========================================================> SMC data transmission (incl. SMC Connection Data Control (CDC) message): RoCE RC-QP: RDMA Write ========================================================> RoCE RC-QP: SMC CDC message (flow control) ========================================================> ... RoCE RC-QP: RDMA Write <======================================================== RoCE RC-QP: SMC CDC message (flow control) <======================================================== ... Data flow within an established connection: +---------------------------------------------------------------------------- | SENDER | sendmsg() | | | | produces into sndbuf [sender's process context] | v | +--------+ | | sndbuf | [ring buffer] | +--------+ | | | | consumes from sndbuf and produces into receiver's RMBE [any context] | | by sending RDMA Write followed by SMC CDC message over RoCE RC-QP | | +----|----------------------------------------------------------------------- | +----|----------------------------------------------------------------------- | v RECEIVER | +------+ | | RMBE | [ring buffer, can have size different from sender's sndbuf] | | | [RMBE represents rcvbuf, no further de-coupling as on sender side] | +------+ | | | | consumes from RMBE [receiver's process context] | v | recvmsg() +---------------------------------------------------------------------------- Flow control ("cursor" updates) by means of SMC CDC messages: SENDER RECEIVER sends updates via CDC-------------+ sends updates via CDC on consuming from sndbuf | on consuming from RMBE and producing into RMBE | by means of recvmsg() | | | | +-----------------------------------|------------+ | | +--v-------------------------+ +--v-----------------------+ | receiver's consumer cursor | | sender's producer cursor----+ +----------------|-----------+ +--------------------------+ | | | | receiver's RMBE | | +--------------------------+ | | | | | +--------------------------------+ | | | | | | | v | | | +------------| | |-------------+////////////| | |//RDMA data written by////| | |////sender that is////////| | |/available to be consumed/| | |///////// +---------------| | |----------+^ | | | | | | | +-----------------+ | | +--------------------------+ Sending updates of the producer cursor is immediate for low latency; something like Nagle's algorithm (absence of TCP_NODELAY) is optional and currently not part of this initial Linux implementation. Sending updates of the consumer cursor is conditional to avoid the silly window syndrome. Normal connection termination: Normal connection termination starts transitioning from socket state ACTIVE via either "Active Close" or "Passive Close". shutdown rdwr +-----------------+ or close, +-------------->| INIT / CLOSED |<-------------+ send PeerCon|nClosed +-----------------+ | PeerConnClosed | | | received | connection | established | | V | +----------------+ +-----------------+ +----------------+ |AppFinCloseWait | | ACTIVE | |PeerFinCloseWait| +----------------+ +-----------------+ +----------------+ | | | | | Active Close: | |Passive Close: | | close or | |PeerConnClosed or | | shutdown wr or| |PeerDoneWriting | | shutdown rdwr | |received | | V V | PeerConnClo|sed +--------------+ +-------------+ | close or received +--<----|PeerCloseWait1| |AppCloseWait1|--->----+ shutdown rdwr, | +--------------+ +-------------+ | send | PeerDoneWri|ting | shutdown wr, | PeerConnClosed | received | send Pee|rDoneWriting | | V V | | +--------------+ +-------------+ | +--<----|PeerCloseWait2| |AppCloseWait2|--->----+ +--------------+ +-------------+ In state CLOSED, the socket can be destructed only, once the application has issued a close(). Abnormal connection termination: +-----------------+ +-------------->| INIT / CLOSED |<-------------+ | +-----------------+ | | | | +-----------------------+ | | | Any state | | PeerConnAbo|rt | (before setting | | send received | | PeerConnClosed | | PeerConnAbort | | indicator in | | | | peer's RMBE) | | | +-----------------------+ | | | | | | Active Abort: | | Passive Abort: | | problem, | | PeerConnAbort | | send | | received, | | PeerConnAbort,| | ECONNRESET | | ECONNABORTED | | | | V V | | +--------------+ +--------------+ | +-------|PeerAbortWait | | ProcessAbort |------+ +--------------+ +--------------+ Implementation notes beyond RFC 7609: A PNET table in sysfs provides the mapping between network device names and RoCE Infiniband device names for the transparent switch of data communication. A PNET table can contain an arbitrary number of PNETIDs. Each PNETID contains exactly one (Ethernet) network device name and one or more RoCE Infiniband device names. Each device name can only exist in at most one PNETID (no overlapping). This initial Linux implementation allows at most one RoCE Infiniband device name per PNETID. After a new TCP connection is established, the network device name used for egress traffic with the TCP connection's local source IP address is used as key to lookup the unique PNETID, and the RoCE Infiniband device of this PNETID is used to switch data communication from TCP to RDMA during SMC CLC handshake. Problem determination: A protocol dissector is available with upstream wireshark for formatting SMC-R related RoCE LAN traffic. [https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=epan/dissectors/packet-smcr.c] We are working on enhancing the Linux implementation to cover: - Improve default socket closing asynchronicity - Address corner cases with many parallel connections - Tracing - Integrated load balancing and fail-over within a link group - Splice and sendpage support - IPv6 addressing support - Keepalive, Cork - Namespaces support - Urgent data - More socket options - Diagnostics - Statistics support - SNMP support References: [1] SMC-R Informational RFC: http://www.rfc-editor.org/info/rfc7609 ==================== Signed-off-by: David S. Miller commit f16a7dd5cf27eeda187425c9c7d96802a549f9c4 Author: Ursula Braun Date: Mon Jan 9 16:55:26 2017 +0100 smc: netlink interface for SMC sockets Support for SMC socket monitoring via netlink sockets of protocol NETLINK_SOCK_DIAG. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller include/net/smc.h | 20 ++++ include/net/sock.h | 3 + include/uapi/linux/netlink.h | 1 + include/uapi/linux/smc_diag.h | 85 +++++++++++++++++ net/smc/Kconfig | 9 ++ net/smc/Makefile | 1 + net/smc/af_smc.c | 43 ++++++++- net/smc/smc.h | 2 + net/smc/smc_close.c | 1 + net/smc/smc_diag.c | 215 ++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 379 insertions(+), 1 deletion(-) commit b38d732477e4211351b2680e805d944f66bceec9 Author: Ursula Braun Date: Mon Jan 9 16:55:25 2017 +0100 smc: socket closing and linkgroup cleanup smc_shutdown() and smc_release() handling delayed linkgroup cleanup for linkgroups without connections Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 127 ++++++++++++--- net/smc/smc.h | 18 +++ net/smc/smc_cdc.c | 23 ++- net/smc/smc_cdc.h | 1 + net/smc/smc_close.c | 441 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_close.h | 28 ++++ net/smc/smc_core.c | 7 +- net/smc/smc_tx.c | 8 + net/smc/smc_wr.c | 47 ++++-- net/smc/smc_wr.h | 2 + 11 files changed, 668 insertions(+), 36 deletions(-) commit 952310ccf2d861966cfb8706f16d5e4eb585edb7 Author: Ursula Braun Date: Mon Jan 9 16:55:24 2017 +0100 smc: receive data from RMBE move RMBE data into user space buffer and update managing cursors Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 7 +- net/smc/smc.h | 4 + net/smc/smc_cdc.c | 6 +- net/smc/smc_core.c | 10 +++ net/smc/smc_rx.c | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_rx.h | 23 ++++++ net/smc/smc_tx.c | 37 +++++++++ net/smc/smc_tx.h | 1 + 9 files changed, 304 insertions(+), 3 deletions(-) commit e6727f39004bd95725342b3b343a14c7d59df07f Author: Ursula Braun Date: Mon Jan 9 16:55:23 2017 +0100 smc: send data (through RDMA) copy data to kernel send buffer, and trigger RDMA write Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 13 +- net/smc/smc.h | 1 + net/smc/smc_cdc.c | 7 +- net/smc/smc_tx.c | 438 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_tx.h | 34 +++++ 6 files changed, 491 insertions(+), 4 deletions(-) commit 5f08318f617b05b6ee389d8bd174c7af921ebf19 Author: Ursula Braun Date: Mon Jan 9 16:55:22 2017 +0100 smc: connection data control (CDC) send and receive CDC messages (via IB message send and CQE) Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 1 + net/smc/af_smc.c | 9 ++ net/smc/smc.h | 97 +++++++++++++++++++ net/smc/smc_cdc.c | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_cdc.h | 217 +++++++++++++++++++++++++++++++++++++++++ net/smc/smc_core.c | 9 ++ net/smc/smc_wr.c | 19 ++++ net/smc/smc_wr.h | 9 ++ 8 files changed, 641 insertions(+) commit 9bf9abead28abaf11d0776b6e0c5d34b6525e846 Author: Ursula Braun Date: Mon Jan 9 16:55:21 2017 +0100 smc: link layer control (LLC) send and receive LLC messages CONFIRM_LINK (via IB message send and CQE) Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 94 ++++++++++++++++++++++++++++++- net/smc/smc_clc.h | 2 + net/smc/smc_core.c | 8 +++ net/smc/smc_core.h | 6 ++ net/smc/smc_llc.c | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.h | 63 +++++++++++++++++++++ 7 files changed, 330 insertions(+), 3 deletions(-) commit bd4ad57718cc86d2972a20f9791cd079996a4dd6 Author: Ursula Braun Date: Mon Jan 9 16:55:20 2017 +0100 smc: initialize IB transport incl. PD, MR, QP, CQ, event, WR Prepare the link for RDMA transport: Create a queue pair (QP) and move it into the state Ready-To-Receive (RTR). Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 34 ++++++-- net/smc/smc.h | 1 + net/smc/smc_clc.c | 10 ++- net/smc/smc_core.c | 76 ++++++++++++++++++ net/smc/smc_core.h | 18 +++++ net/smc/smc_ib.c | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_ib.h | 13 +++ net/smc/smc_wr.c | 2 + 8 files changed, 374 insertions(+), 9 deletions(-) commit f38ba179c6ca94ebeb0ac6a0956c4ea533151ad8 Author: Ursula Braun Date: Mon Jan 9 16:55:19 2017 +0100 smc: work request (WR) base for use by LLC and CDC The base containers for RDMA transport are work requests and completion queue entries processed through Infiniband verbs: * allocate and initialize these areas * map these areas to DMA * implement the basic communication consisting of work request posting and receival of completion queue events Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/smc.h | 5 + net/smc/smc_core.c | 11 ++ net/smc/smc_core.h | 30 +++ net/smc/smc_ib.c | 73 +++++++ net/smc/smc_ib.h | 11 ++ net/smc/smc_wr.c | 564 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_wr.h | 95 +++++++++ 8 files changed, 790 insertions(+), 1 deletion(-) commit cd6851f30386e5e04b5c2253f8e1647ba0ebcd31 Author: Ursula Braun Date: Mon Jan 9 16:55:18 2017 +0100 smc: remote memory buffers (RMBs) * allocate data RMB memory for sending and receiving * size depends on the maximum socket send and receive buffers * allocated RMBs are kept during life time of the owning link group * map the allocated RMBs to DMA Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 29 ++++++- net/smc/smc.h | 45 +++++++++++ net/smc/smc_clc.c | 6 +- net/smc/smc_core.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++- net/smc/smc_core.h | 21 +++++ net/smc/smc_ib.c | 19 +++++ net/smc/smc_ib.h | 5 ++ 7 files changed, 342 insertions(+), 7 deletions(-) commit 0cfdd8f92cac01afbb12e4500514036a2b78756b Author: Ursula Braun Date: Mon Jan 9 16:55:17 2017 +0100 smc: connection and link group creation * create smc_connection for SMC-sockets * determine suitable link group for a connection * create a new link group if necessary Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 102 ++++++++++++++-- net/smc/smc.h | 36 ++++++ net/smc/smc_clc.c | 38 +++++- net/smc/smc_clc.h | 2 +- net/smc/smc_core.c | 336 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_core.h | 106 +++++++++++++++++ 7 files changed, 605 insertions(+), 17 deletions(-) commit a046d57da19f812216f393e7c535f5858f793ac3 Author: Ursula Braun Date: Mon Jan 9 16:55:16 2017 +0100 smc: CLC handshake (incl. preparation steps) * CLC (Connection Layer Control) handshake Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 464 ++++++++++++++++++++++++++++++++++++++++++++++++++---- net/smc/smc.h | 22 +++ net/smc/smc_clc.c | 252 +++++++++++++++++++++++++++++ net/smc/smc_clc.h | 114 ++++++++++++++ 5 files changed, 822 insertions(+), 32 deletions(-) commit 6812baabf24d5c299c13223366a23c269408f4d0 Author: Thomas Richter Date: Mon Jan 9 16:55:15 2017 +0100 smc: establish pnet table management Connection creation with SMC-R starts through an internal TCP-connection. The Ethernet interface for this TCP-connection is not restricted to the Ethernet interface of a RoCE device. Any existing Ethernet interface belonging to the same physical net can be used, as long as there is a defined relation between the Ethernet interface and some RoCE devices. This relation is defined with the help of an identification string called "Physical Net ID" or short "pnet ID". Information about defined pnet IDs and their related Ethernet interfaces and RoCE devices is stored in the SMC-R pnet table. A pnet table entry consists of the identifying pnet ID and the associated network and IB device. This patch adds pnet table configuration support using the generic netlink message interface referring to network and IB device by their names. Commands exist to add, delete, and display pnet table entries, and to flush or display the entire pnet table. There are cross-checks to verify whether the ethernet interfaces or infiniband devices really exist in the system. If either device is not available, the pnet ID entry is not created. Loss of network devices and IB devices is also monitored; a pnet ID entry is removed when an associated network or IB device is removed. Signed-off-by: Thomas Richter Signed-off-by: Ursula Braun Signed-off-by: David S. Miller include/uapi/linux/smc.h | 35 ++++ net/smc/Makefile | 2 +- net/smc/af_smc.c | 11 +- net/smc/smc_ib.c | 2 + net/smc/smc_pnet.c | 534 +++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_pnet.h | 23 ++ 6 files changed, 604 insertions(+), 3 deletions(-) commit a4cf0443c4143b19e42389a1674b5b65224544ce Author: Ursula Braun Date: Mon Jan 9 16:55:14 2017 +0100 smc: introduce SMC as an IB-client * create a list of SMC IB-devices Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Makefile | 2 +- net/smc/af_smc.c | 10 ++++ net/smc/smc.h | 6 +++ net/smc/smc_ib.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_ib.h | 40 ++++++++++++++++ 5 files changed, 200 insertions(+), 1 deletion(-) commit ac7138746e14137a451f8539614cdd349153e0c0 Author: Ursula Braun Date: Mon Jan 9 16:55:13 2017 +0100 smc: establish new socket family * enable smc module loading and unloading * register new socket family * basic smc socket creation and deletion * use backing TCP socket to run CLC (Connection Layer Control) handshake of SMC protocol * Setup for infiniband traffic is implemented in follow-on patches. For now fallback to TCP socket is always used. Signed-off-by: Ursula Braun Reviewed-by: Utz Bacher Signed-off-by: David S. Miller MAINTAINERS | 7 + include/linux/socket.h | 7 +- net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 6 +- net/smc/Kconfig | 11 + net/smc/Makefile | 2 + net/smc/af_smc.c | 620 +++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc.h | 37 +++ 9 files changed, 688 insertions(+), 4 deletions(-) commit 4b9d07a44015a0e940448fa3885b894349e8b162 Author: Ursula Braun Date: Mon Jan 9 16:55:12 2017 +0100 net: introduce keepalive function in struct proto Direct call of tcp_set_keepalive() function from protocol-agnostic sock_setsockopt() function in net/core/sock.c violates network layering. And newly introduced protocol (SMC-R) will need its own keepalive function. Therefore, add "keepalive" function pointer to "struct proto", and call it from sock_setsockopt() via this pointer. Signed-off-by: Ursula Braun Reviewed-by: Utz Bacher Signed-off-by: David S. Miller include/net/sock.h | 1 + net/core/sock.c | 7 ++----- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_timer.c | 1 + net/ipv6/tcp_ipv6.c | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) commit c8584b3fdf7429ed2a830dd1f7435bbf45122afa Merge: 9f2f27a 267e1d5 Author: David S. Miller Date: Mon Jan 9 15:55:18 2017 -0500 Merge branch 'sh_eth-wol' Niklas Söderlund says: ==================== sh_eth: add wake-on-lan support via magic packet This series adds support for Wake-on-Lan using Magic Packet for a few models of the sh_eth driver. Patch 1/6 fix a naming error, patch 2/6 adds generic support to control and support WoL while patches 3/6 - 6/6 enable different models. Based ontop of net-next master. Changes since v2. - Fix bookkeeping for "active_count" and "event_count" reported in /sys/kernel/debug/wakeup_sources. Thanks Geert for noticing this. - Add new patch 1/6 which corrects the name of ECMR_MPDE bit, suggested by Sergei. - s/sh7743/sh7734/ in patch 5/6. Thanks Geert for spotting this. - Spelling improvements suggested by Sergei and Geert. - Add Tested-by to 3/6 and 4/6. Changes since v1. - Split generic WoL functionality and device enablement to different patches. - Enable more devices then Gen2 after feedback from Geert and datasheets. - Do not set mdp->irq_enabled = false and remove specific MagicPacket interrupt clearing, instead let sh_eth_error() clear the interrupt as for other EMAC interrupts, thanks Sergei for the suggestion. - Use the original return logic in sh_eth_resume(). - Moved sh_eth_private variable *clk to top of data structure to avoid possible gaps due to alignment restrictions. - Make wol_enabled in sh_eth_private part of the already existing bitfield instead of a bool. - Do not initiate mdp->wol_enabled to 0, the struct is kzalloc'ed so it's already set to 0. ==================== Signed-off-by: David S. Miller commit 267e1d5c7473cdb264c3153bf2adeb9d0c4bcae3 Author: Niklas Söderlund Date: Mon Jan 9 16:34:09 2017 +0100 sh_eth: enable wake-on-lan for sh7763 This is based on public datasheet for sh7763 which shows it has the same behavior and registers for WoL as other versions of sh_eth. Signed-off-by: Niklas Söderlund Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 1 + 1 file changed, 1 insertion(+) commit 159c2a90442c6d5ad0b3d085e348979cd9a0ac1b Author: Niklas Söderlund Date: Mon Jan 9 16:34:08 2017 +0100 sh_eth: enable wake-on-lan for sh7734 This is based on public datasheet for sh7734 which shows it has the same behavior and registers for WoL as other versions of sh_eth. Signed-off-by: Niklas Söderlund Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 1 + 1 file changed, 1 insertion(+) commit 33017e240f489b6353e33f2630f2c5cbd2ad1d13 Author: Niklas Söderlund Date: Mon Jan 9 16:34:07 2017 +0100 sh_eth: enable wake-on-lan for r8a7740/armadillo Geert Uytterhoeven reported WoL worked on his Armadillo board. Signed-off-by: Niklas Söderlund Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 1 + 1 file changed, 1 insertion(+) commit e410d86d4aa79a1a37231af6aacd93b2c4395c46 Author: Niklas Söderlund Date: Mon Jan 9 16:34:06 2017 +0100 sh_eth: enable wake-on-lan for R-Car Gen2 devices Tested on Gen2 r8a7791/Koelsch. Signed-off-by: Niklas Söderlund Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d8981d029da9d230955dabe596dbb30e7971b7b9 Author: Niklas Söderlund Date: Mon Jan 9 16:34:05 2017 +0100 sh_eth: add generic wake-on-lan support via magic packet Add generic functionality to support Wake-on-LAN using MagicPacket which are supported by at least a few versions of sh_eth. Only add functionality for WoL, no specific sh_eth versions are marked to support WoL yet. WoL is enabled in the suspend callback by setting MagicPacket detection and disabling all interrupts expect MagicPacket. In the resume path the driver needs to reset the hardware to rearm the WoL logic, this prevents the driver from simply restoring the registers and to take advantage of that sh_eth was not suspended to reduce resume time. To reset the hardware the driver closes and reopens the device just like it would do in a normal suspend/resume scenario without WoL enabled, but it both closes and opens the device in the resume callback since the device needs to be open for WoL to work. One quirk needed for WoL is that the module clock needs to be prevented from being switched off by Runtime PM. To keep the clock alive the suspend callback need to call clk_enable() directly to increase the usage count of the clock. Then when Runtime PM decreases the clock usage count it won't reach 0 and be switched off. Signed-off-by: Niklas Söderlund Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 114 +++++++++++++++++++++++++++++++--- drivers/net/ethernet/renesas/sh_eth.h | 3 + 2 files changed, 109 insertions(+), 8 deletions(-) commit 6dcf45e514974a1ff10755015b5e06746a033e5f Author: Niklas Söderlund Date: Mon Jan 9 16:34:04 2017 +0100 sh_eth: use correct name for ECMR_MPDE bit This bit was wrongly named due to a typo, Sergei checked the SH7734/63 manuals and this bit should be named MPDE. Suggested-by: Sergei Shtylyov Signed-off-by: Niklas Söderlund Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f2f27a9a518cdcd724bd360a1e25a10e7cd2f82 Merge: aaa9c10 7ba91ec Author: David S. Miller Date: Mon Jan 9 15:49:13 2017 -0500 Merge branch 'icmp-reply-optimize' Jesper Dangaard Brouer says: ==================== net: optimize ICMP-reply code path This patchset is optimizing the ICMP-reply code path, for ICMP packets that gets rate limited. A remote party can easily trigger this code path by sending packets to port number with no listening service. Generally the patchset moves the sysctl_icmp_msgs_per_sec ratelimit checking to earlier in the code path and removes an allocation. Use-case: The specific case I experienced this being a bottleneck is, sending UDP packets to a port with no listener, which obviously result in kernel replying with ICMP Destination Unreachable (type:3), Port Unreachable (code:3), which cause the bottleneck. After Eric and Paolo optimized the UDP socket code, the kernels PPS processing capabilities is lower for no-listen ports, than normal UDP sockets. This is bad for capacity planning when restarting a service. UDP no-listen benchmark 8xCPUs using pktgen_sample04_many_flows.sh: Baseline: 6.6 Mpps Patch: 14.7 Mpps Driver mlx5 at 50Gbit/s. ==================== Signed-off-by: David S. Miller commit 7ba91ecb16824f74ba4fcbc4e88cd4d24a839b25 Author: Jesper Dangaard Brouer Date: Mon Jan 9 16:04:14 2017 +0100 net: for rate-limited ICMP replies save one atomic operation It is possible to avoid the atomic operation in icmp{v6,}_xmit_lock, by checking the sysctl_icmp_msgs_per_sec ratelimit before these calls, as pointed out by Eric Dumazet, but the BH disabled state must be correct. The icmp_global_allow() call states it must be called with BH disabled. This protection was given by the calls icmp_xmit_lock and icmpv6_xmit_lock. Thus, split out local_bh_disable/enable from these functions and maintain it explicitly at callers. Suggested-by: Eric Dumazet Signed-off-by: Jesper Dangaard Brouer Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/icmp.c | 34 +++++++++++++++++++++------------- net/ipv6/icmp.c | 25 ++++++++++++++++--------- 2 files changed, 37 insertions(+), 22 deletions(-) commit c0303efeab7391ec51c337e0ac5740860ad01fe7 Author: Jesper Dangaard Brouer Date: Mon Jan 9 16:04:09 2017 +0100 net: reduce cycles spend on ICMP replies that gets rate limited This patch split the global and per (inet)peer ICMP-reply limiter code, and moves the global limit check to earlier in the packet processing path. Thus, avoid spending cycles on ICMP replies that gets limited/suppressed anyhow. The global ICMP rate limiter icmp_global_allow() is a good solution, it just happens too late in the process. The kernel goes through the full route lookup (return path) for the ICMP message, before taking the rate limit decision of not sending the ICMP reply. Details: The kernels global rate limiter for ICMP messages got added in commit 4cdf507d5452 ("icmp: add a global rate limitation"). It is a token bucket limiter with a global lock. It brilliantly avoids locking congestion by only updating when 20ms (HZ/50) were elapsed. It can then avoids taking lock when credit is exhausted (when under pressure) and time constraint for refill is not yet meet. Signed-off-by: Jesper Dangaard Brouer Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/icmp.c | 71 ++++++++++++++++++++++++++++++++++++++------------------- net/ipv6/icmp.c | 49 +++++++++++++++++++++++++++------------ 2 files changed, 82 insertions(+), 38 deletions(-) commit 8d9ba388f35b3c681975a6b3f6ba60bb42c98f8d Author: Jesper Dangaard Brouer Date: Mon Jan 9 16:04:04 2017 +0100 Revert "icmp: avoid allocating large struct on stack" This reverts commit 9a99d4a50cb8 ("icmp: avoid allocating large struct on stack"), because struct icmp_bxm no really a large struct, and allocating and free of this small 112 bytes hurts performance. Fixes: 9a99d4a50cb8 ("icmp: avoid allocating large struct on stack") Signed-off-by: Jesper Dangaard Brouer Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/icmp.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit aaa9c1071da4cb231fca0774b01ee5792aa60f8a Merge: 7351788 341f741 Author: David S. Miller Date: Mon Jan 9 15:47:52 2017 -0500 Merge tag 'rxrpc-rewrite-20170109' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== afs: Refcount afs_call struct These patches provide some tracepoints for AFS and fix a potential leak by adding refcounting to the afs_call struct. The patches are: (1) Add some tracepoints for logging incoming calls and monitoring notifications from AF_RXRPC and data reception. (2) Get rid of afs_wait_mode as it didn't turn out to be as useful as initially expected. It can be brought back later if needed. This clears some stuff out that I don't then need to fix up in (4). (3) Allow listen(..., 0) to be used to disable listening. This makes shutting down the AFS cache manager server in the kernel much easier and the accounting simpler as we can then be sure that (a) all preallocated afs_call structs are relesed and (b) no new incoming calls are going to be started. For the moment, listening cannot be reenabled. (4) Add refcounting to the afs_call struct to fix a potential multiple release detected by static checking and add a tracepoint to follow the lifecycle of afs_call objects. ==================== Signed-off-by: David S. Miller commit 73517885fc1afcecca804ef9a839e2b6fca7387c Merge: 1940075 a82f67a Author: David S. Miller Date: Mon Jan 9 15:44:57 2017 -0500 Merge branch 'dsa_swqitch_ops-const' Florian Fainelli says: ==================== net: dsa: Make dsa_switch_ops const This patch series allows us to annotate dsa_switch_ops with a const qualifier. ==================== Signed-off-by: David S. Miller commit a82f67afe8e297834bedafa529941d9d0808caf8 Author: Florian Fainelli Date: Sun Jan 8 14:52:08 2017 -0800 net: dsa: Make dsa_switch_ops const Now that we have properly encapsulated and made drivers utilize exported functions, we can switch dsa_switch_ops to be a annotated with const. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/bcm_sf2.c | 2 +- drivers/net/dsa/mv88e6060.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 4 ++-- net/dsa/dsa.c | 10 +++++----- net/dsa/hwmon.c | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) commit ab3d408d3f40f939d46a32b1c24aa2833a13b846 Author: Florian Fainelli Date: Sun Jan 8 14:52:07 2017 -0800 net: dsa: Encapsulate legacy switch drivers into dsa_switch_driver In preparation for making struct dsa_switch_ops const, encapsulate it within a dsa_switch_driver which has a list pointer and a pointer to dsa_switch_ops. This allows us to take the list_head pointer out of dsa_switch_ops, which is written to by {un,}register_switch_driver. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6060.c | 8 ++++++-- drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++++-- include/net/dsa.h | 11 +++++++---- net/dsa/dsa.c | 12 +++++++----- 4 files changed, 26 insertions(+), 13 deletions(-) commit 73095cb1881e6da77e2ed711deaf954bdfdde71e Author: Florian Fainelli Date: Sun Jan 8 14:52:06 2017 -0800 net: dsa: bcm_sf2: Declare our own dsa_switch_ops Utilize the b53 exported functions to fill our bcm_sf2_ops structure, also making it clear what we utilize and what we specifically override. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 55 ++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit 3117455dd6c16dae13ad7425384bed045e98e63d Author: Florian Fainelli Date: Sun Jan 8 14:52:05 2017 -0800 net: dsa: b53: Export most operations to other drivers In preparation for making dsa_switch_ops const, export b53 operations utilized by other drivers such as bcm_sf2. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 79 +++++++++++++++++++++++----------------- drivers/net/dsa/b53/b53_priv.h | 33 +++++++++++++++++ 2 files changed, 79 insertions(+), 33 deletions(-) commit 1940075b5c2fbc83b8d39e75587cb0ad2d297415 Merge: bb1d303 62e04b7 Author: David S. Miller Date: Mon Jan 9 15:40:57 2017 -0500 Merge branch 'sh_eth-csum' Sergei Shtylyov says: ==================== sh_eth: "intgelligent checksum" related cleanups Here's a set of 2 patches against DaveM's 'net.git' repo, as they are based on a couple patches merged there recently; however, the patches are destined for 'net-next.git' (once 'net.git' gets merged there next time). I'm cleaning up the "intelligent checksum" related code (however, the driver only disables this feature for now, theres's no proper offload supprt yet). ==================== Signed-off-by: David S. Miller commit 62e04b7e0e3c2926bdcbcced9feb22478258d0c3 Author: Sergei Shtylyov Date: Sat Jan 7 00:03:37 2017 +0300 sh_eth: rename 'sh_eth_cpu_data::hw_crc' The 'struct sh_eth_cpu_data' field indicating the "intelligent checksum" support was misnamed 'hw_crc' -- rename it to 'hw_checksum'. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 12 ++++++------ drivers/net/ethernet/renesas/sh_eth.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 2e653ff0758ae8e47499d588666eb77f6a0fc755 Author: Sergei Shtylyov Date: Sat Jan 7 00:02:52 2017 +0300 sh_eth: get rid of 'sh_eth_cpu_data::shift_rd0' After checking all the available manuals, I have enough information to conclude that the 'shift_rd0' flag is only relevant for the Ether cores supporting so called "intelligent checksum" (and hence having CSMR) which is indicated by the 'hw_crc' flag. Since all the relevant SoCs now have both these flags set, we can at last get rid of the former flag... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 5 +---- drivers/net/ethernet/renesas/sh_eth.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) commit bb1d3034449ed08e2ffbf5813a5ad9fa30475359 Merge: 3b647be 811a919 Author: David S. Miller Date: Mon Jan 9 15:39:11 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit da095587e6be858efd41490762cb952dffd6107a Author: David S. Miller Date: Mon Jan 9 15:27:59 2017 -0500 Revert "ide: Fix interface autodetection in legacy IDE driver (trial #2)" This reverts commit b2ae75052a8c1611b2030fa49ba1c6b6439fa04f. The inverse logic is intentional, and this change even breaks booting on some systems. Signed-off-by: David S. Miller drivers/ide/ide-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75640e79005239020dbd81aa08c2a703893d24c1 Author: Yegor Yefremov Date: Sat Jan 7 22:14:45 2017 +0100 Documentation: display: fix wrong documentation paths Signed-off-by: Yegor Yefremov Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/arm,pl11x.txt | 2 +- Documentation/devicetree/bindings/display/bridge/analogix_dp.txt | 2 +- Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt | 2 +- Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt | 2 +- Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt | 2 +- Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt | 2 +- Documentation/devicetree/bindings/display/imx/ldb.txt | 2 +- Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt | 2 +- Documentation/devicetree/bindings/display/msm/dsi.txt | 2 +- Documentation/devicetree/bindings/display/msm/edp.txt | 2 +- Documentation/devicetree/bindings/display/msm/hdmi.txt | 2 +- Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt | 2 +- Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt | 2 +- .../devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt | 2 +- Documentation/devicetree/bindings/display/tilcdc/panel.txt | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) commit 261c73f3f6ce0f64ad7da46fd69600f57eec1c11 Author: XuYing Date: Sat Jan 7 19:04:27 2017 +0800 of: remove redundant memset in overlay memset in of_build_overlay_info is redundant, the ovinfo has been zeroed in of_fill_overlay_info when error. Signed-off-by: YiPing Xu Signed-off-by: Rob Herring drivers/of/overlay.c | 1 - 1 file changed, 1 deletion(-) commit 3b647be2bfcd95d6d0feba245ccc3966c73ccc52 Merge: 3a7f75e d825612 Author: David S. Miller Date: Mon Jan 9 14:54:30 2017 -0500 Merge branch 'dwmac-dwc-qos-eth' Joao Pinto says: ==================== adding new glue driver dwmac-dwc-qos-eth This patch set contains the porting of the synopsys/dwc_eth_qos.c driver to the stmmac structure. This operation resulted in the creation of a new platform glue driver called dwmac-dwc-qos-eth which was based in the dwc_eth_qos as is. dwmac-dwc-qos-eth inherited dwc_eth_qos DT bindings, to assure that current and old users can continue to use it as before. We can see this driver as being deprecated, since all new development will be done in stmmac. Please check each patch for implementation details. ==================== Tested-by: Niklas Cassel Reviewed-by: Lars Persson Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller commit d8256121a91a653682070092b9f105d0c45bd48b Author: jpinto Date: Mon Jan 9 12:35:10 2017 +0000 stmmac: adding new glue driver dwmac-dwc-qos-eth This patch adds a new glue driver called dwmac-dwc-qos-eth which was based in the dwc_eth_qos as is. To assure retro-compatibility a slight tweak was also added to stmmac_platform. Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Reviewed-by: Lars Persson Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller .../bindings/net/snps,dwc-qos-ethernet.txt | 3 + drivers/net/ethernet/stmicro/stmmac/Kconfig | 9 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 202 +++++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 15 +- 5 files changed, 227 insertions(+), 3 deletions(-) commit f573c0b9c4e02691cf87736bd0824fd37ec02e65 Author: jpinto Date: Mon Jan 9 12:35:09 2017 +0000 stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure This patch moves stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to the plat_stmmacenet_data structure. It also moves these platform variables initialization to stmmac_platform. This was done for two reasons: a) If PCI is used, platform related code is being executed in stmmac_main resulting in warnings that have no sense and conceptually was not right b) stmmac as a synopsys reference ethernet driver stack will be hosting more and more drivers to its structure like synopsys/dwc_eth_qos.c. These drivers have their own DT bindings that are not compatible with stmmac's. One of the most important are the clock names, and so they need to be parsed in the glue logic and initialized there, and that is the main reason why the clocks were passed to the platform structure. Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Reviewed-by: Lars Persson Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 5 -- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 82 ++++------------------ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 47 +++++++++++++ include/linux/stmmac.h | 5 ++ 6 files changed, 70 insertions(+), 75 deletions(-) commit b4b7b772e8b018286482d8d1fba7804ceac56a64 Author: jpinto Date: Mon Jan 9 12:35:08 2017 +0000 stmmac: adding DT parameter for LPI tx clock gating This patch adds a new parameter to the stmmac DT: snps,en-tx-lpi-clockgating. It was ported from synopsys/dwc_eth_qos.c and it is useful if lpi tx clock gating is needed by stmmac users also. Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Reviewed-by: Lars Persson Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/common.h | 3 ++- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 5 ++++- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 6 +++++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++ include/linux/stmmac.h | 1 + 8 files changed, 20 insertions(+), 4 deletions(-) commit 3a7f75e532420edb375b8d0a1526c3c1b777c1f6 Author: Tobias Regnery Date: Mon Jan 9 13:15:55 2017 +0100 alx: add feature flag for rx checksumming The code to handle rx checksumming was in the driver since its introduction but for reasons unknown the feature flag was left out. Now it is possible to enable this feature with ethtool. Tested on my AR8161 ethernet card, there are no regressions observed in netperf if this feature is enabled. Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 1 + 1 file changed, 1 insertion(+) commit 19426bdedb72b965db0ebf2106e95e9eeb3b5935 Author: Chen-Yu Tsai Date: Sun Jan 8 02:57:06 2017 +0800 ASoC: sun4i-codec: Add "Right Mixer" to "Line Out Mono Diff." route The mono differential output for "Line Out" downmixes the stereo audio from the mixer, instead of just taking the left channel. Add a route from the "Right Mixer" to "Line Out Source Playback Route" through the "Mono Differential" path, so DAPM doesn't shut down everything if the left channel is muted. Fixes: 0f909f98d7cb ("ASoC: sun4i-codec: Add support for A31 Line Out playback") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 1 + 1 file changed, 1 insertion(+) commit 512656008a458a750bf4a55ec99e2621f47a9b06 Merge: 07e0e04 c008b33 Author: David S. Miller Date: Mon Jan 9 14:36:58 2017 -0500 Merge branch 'act_csum-sctp' Davide Caratti says: ==================== net/sched: act_csum: add support for SCTP checksum This series extends current act_csum functionality to allow computation of SCTP checksums. Patch 1 ensures LIBCRC32C will be selected if NET_ACT_CSUM is selected. Patch 2 extends act_csum to handle IPPROTO_SCTP protocol in IPv4/IPv6 header, and eventually compute the CRC32c value. v2: - style fix in tc_csum.h - avoid nested if statement in act_csum.c ==================== Signed-off-by: David S. Miller commit c008b33f3ef0915dfb57432dba1fa0ce34fdcc29 Author: Davide Caratti Date: Mon Jan 9 11:24:21 2017 +0100 net/sched: act_csum: compute crc32c on SCTP packets modify act_csum to compute crc32c on IPv4/IPv6 packets having SCTP in their payload, and extend UAPI definitions accordingly. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_csum.h | 3 ++- net/sched/act_csum.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) commit ab9d226e3e2a8aeca426701b735194bc35179c2d Author: Davide Caratti Date: Mon Jan 9 11:24:20 2017 +0100 net/sched: Kconfig: select LIBCRC32C if NET_ACT_CSUM is selected LIBCRC32C is needed to compute crc32c on SCTP packets. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller net/sched/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 07e0e0467eb07ba3941c32b5493c4ba87b973959 Merge: f89d21b e915ac6 Author: David S. Miller Date: Mon Jan 9 14:35:15 2017 -0500 Merge branch 'mlxsw-small-driver-update' Jiri Pirko says: ==================== mlxsw: small driver update This patchset contains various small "non-net" fixes and enhancements. ==================== Signed-off-by: David S. Miller commit e915ac68d9c543f8f51446853106c69056acd872 Author: Yotam Gigi Date: Mon Jan 9 11:25:48 2017 +0100 mlxsw: spectrum: Change ENOTSUPP to EOPNOTSUPP As ENOTSUPP is specific to NFS, change the return error value to EOPNOTSUPP in various places in the mlxsw driver. Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 136f1445780063273614077f38c0ceddeedd2494 Author: Yotam Gigi Date: Mon Jan 9 11:25:47 2017 +0100 mlxsw: spectrum: Fix order of commands in port remove function Fix the order of the free directives to match the port init function Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65acb5d0827c8a05022e77eced63cdc8616ba43a Author: Yotam Gigi Date: Mon Jan 9 11:25:46 2017 +0100 mlxsw: spectrum: Make the add_matchall_tc_entry symmetric Currently, the mlxsw spectrum driver only supports offloading the matchall classifier together with the mirred action. To allow more matchall tc offloads, make the code symmetric so that it can be easily extended later on for other actions. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 91 ++++++++++++++------------ 1 file changed, 48 insertions(+), 43 deletions(-) commit 169852718f217659811858562aaaa1de3abbcf58 Author: Elad Raz Date: Mon Jan 9 11:25:45 2017 +0100 mlxsw: cmd: Fix API name comments for event-queues Probably some copy-paste error from "int_msix" that caused "int_" prefix to appear in the comments for all "eq_" APIs. Signed-off-by: Elad Raz Acked-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 36ca68bf9919299c95ff80e7cf3c217f4c250cbe Author: Elad Raz Date: Mon Jan 9 11:25:44 2017 +0100 mlxsw: Fix mlxsw_i2c_write return value The "err" variable is been checked, return always 0. Signed-off-by: Elad Raz Acked-by: Ido Schimmel Acked-by: Vadim Pasternak 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 102ecc471b9d2f41f10c586f077a0d8e853335f8 Author: Gao Pan Date: Wed Jan 4 17:38:16 2017 +0800 spi: fsl-lpspi: fix indentation error This patch fixes the indentation error in spi-fsl-lpspi.c. Signed-off-by: Gao Pan Signed-off-by: Mark Brown drivers/spi/spi-fsl-lpspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10611e1b0b7ab2a82dd7838e5e928fa1501d353c Author: Kuninori Morimoto Date: Mon Dec 19 07:37:18 2016 +0000 ASoC: remove .bespoke_trigger from snd_soc_platform_driver No existing platform is using .bespoke_trigger. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 -- sound/soc/soc-pcm.c | 7 ------- 2 files changed, 9 deletions(-) commit fcff45f8e092c17d324028fb6f632fde98983f17 Author: Kuninori Morimoto Date: Mon Dec 19 07:36:58 2016 +0000 ASoC: remove .delay from snd_soc_platform_driver No existing platform is using .delay. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 7 ------- sound/soc/soc-pcm.c | 7 ------- 2 files changed, 14 deletions(-) commit f89d21b9c310d43ad8513a3fe345b7677ee7ead7 Author: Ivan Khoronzhuk Date: Sun Jan 8 22:12:27 2017 +0200 net: ethernet: ti: cpsw: extend limits for cpsw_get/set_ringparam Allow to set number of descs close to possible values. In case of minimum limit it's equal to number of channels to be able to set at least one desc per channel. For maximum limit leave enough descs number for tx channels. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 58fa118f3de45481df2ac2b8b41e8114cae2574d Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Sun Jan 8 18:49:46 2017 +0200 cls_u32: don't bother explicitly initializing ->divisor to zero This struct member is already initialized to zero upon root_ht's allocation via kzalloc(). Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Signed-off-by: David S. Miller net/sched/cls_u32.c | 1 - 1 file changed, 1 deletion(-) commit 17650f22cd059b3d653c03b5534e4a2a18cb02bd Merge: eafea73 fe62d05 Author: David S. Miller Date: Mon Jan 9 13:58:58 2017 -0500 Merge branch 'siphash' Jason A. Donenfeld says: ==================== Introduce The SipHash PRF This patch series introduces SipHash into the kernel. SipHash is a cryptographically secure PRF, which serves a variety of functions, and is introduced in patch #1. The following patch #2 introduces HalfSipHash, an optimization suitable for hash tables only. Finally, the last two patches in this series show two usages of the introduced siphash function family. It is expected that after this initial introduction, other usages will follow. Please read the extensive descriptions in patch #1 and patch #2 of what these functions do and the various levels of assurances. They're products of intense cryptographic research, and I believe they're suitable for the uses outlined herein. The use of SipHash is not limited to the networking subsystem -- indeed I would like to use it in other places too in the kernel. But after discussing with a few on this list and at Linus' suggestion, the initial import of these functions is coming through the networking tree. After these are merged, it will then be easier to expand use elsewhere. Changes v2->v3: - hsiphash keys now simply use an unsigned long, in order to avoid a cluttered ifdef and make it a bit more clear what's happening. - A typo in the documentation has been fixed. - The documentation has been augmented with an example relating to struct packing and passing. - The net_secret variable is now __read_mostly. Hopefully this is the last of the required revisions, and v3 can be merged into net-next. ==================== Signed-off-by: David S. Miller commit fe62d05b295bde037fa324767674540907c89362 Author: Jason A. Donenfeld Date: Sun Jan 8 13:54:03 2017 +0100 syncookies: use SipHash in place of SHA1 SHA1 is slower and less secure than SipHash, and so replacing syncookie generation with SipHash makes natural sense. Some BSDs have been doing this for several years in fact. The speedup should be similar -- and even more impressive -- to the speedup from the sequence number fix in this series. Signed-off-by: Jason A. Donenfeld Cc: Eric Dumazet Cc: David Miller Signed-off-by: David S. Miller net/ipv4/syncookies.c | 21 +++++---------------- net/ipv6/syncookies.c | 41 +++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 38 deletions(-) commit 7cd23e5300c1b95903859a8bdc084e79be66ce16 Author: Jason A. Donenfeld Date: Sun Jan 8 13:54:02 2017 +0100 secure_seq: use SipHash in place of MD5 This gives a clear speed and security improvement. Siphash is both faster and is more solid crypto than the aging MD5. Rather than manually filling MD5 buffers, for IPv6, we simply create a layout by a simple anonymous struct, for which gcc generates rather efficient code. For IPv4, we pass the values directly to the short input convenience functions. 64-bit x86_64: [ 1.683628] secure_tcpv6_sequence_number_md5# cycles: 99563527 [ 1.717350] secure_tcp_sequence_number_md5# cycles: 92890502 [ 1.741968] secure_tcpv6_sequence_number_siphash# cycles: 67825362 [ 1.762048] secure_tcp_sequence_number_siphash# cycles: 67485526 32-bit x86: [ 1.600012] secure_tcpv6_sequence_number_md5# cycles: 103227892 [ 1.634219] secure_tcp_sequence_number_md5# cycles: 94732544 [ 1.669102] secure_tcpv6_sequence_number_siphash# cycles: 96299384 [ 1.700165] secure_tcp_sequence_number_siphash# cycles: 86015473 Signed-off-by: Jason A. Donenfeld Cc: Andi Kleen Cc: David Miller Cc: David Laight Cc: Tom Herbert Cc: Hannes Frederic Sowa Cc: Eric Dumazet Signed-off-by: David S. Miller net/core/secure_seq.c | 145 ++++++++++++++++++++++---------------------------- 1 file changed, 63 insertions(+), 82 deletions(-) commit 1ae2324f732c9c4e2fa4ebd885fa1001b70d52e1 Author: Jason A. Donenfeld Date: Sun Jan 8 13:54:01 2017 +0100 siphash: implement HalfSipHash1-3 for hash tables HalfSipHash, or hsiphash, is a shortened version of SipHash, which generates 32-bit outputs using a weaker 64-bit key. It has *much* lower security margins, and shouldn't be used for anything too sensitive, but it could be used as a hashtable key function replacement, if the output is never exposed, and if the security requirement is not too high. The goal is to make this something that performance-critical jhash users would be willing to use. On 64-bit machines, HalfSipHash1-3 is slower than SipHash1-3, so we alias SipHash1-3 to HalfSipHash1-3 on those systems. 64-bit x86_64: [ 0.509409] test_siphash: SipHash2-4 cycles: 4049181 [ 0.510650] test_siphash: SipHash1-3 cycles: 2512884 [ 0.512205] test_siphash: HalfSipHash1-3 cycles: 3429920 [ 0.512904] test_siphash: JenkinsHash cycles: 978267 So, we map hsiphash() -> SipHash1-3 32-bit x86: [ 0.509868] test_siphash: SipHash2-4 cycles: 14812892 [ 0.513601] test_siphash: SipHash1-3 cycles: 9510710 [ 0.515263] test_siphash: HalfSipHash1-3 cycles: 3856157 [ 0.515952] test_siphash: JenkinsHash cycles: 1148567 So, we map hsiphash() -> HalfSipHash1-3 hsiphash() is roughly 3 times slower than jhash(), but comes with a considerable security improvement. Signed-off-by: Jason A. Donenfeld Reviewed-by: Jean-Philippe Aumasson Signed-off-by: David S. Miller Documentation/siphash.txt | 75 +++++++++++ include/linux/siphash.h | 57 +++++++- lib/siphash.c | 321 +++++++++++++++++++++++++++++++++++++++++++++- lib/test_siphash.c | 98 +++++++++++++- 4 files changed, 546 insertions(+), 5 deletions(-) commit 2c956a60778cbb6a27e0c7a8a52a91378c90e1d1 Author: Jason A. Donenfeld Date: Sun Jan 8 13:54:00 2017 +0100 siphash: add cryptographically secure PRF SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first usage: There are a variety of attacks known as "hashtable poisoning" in which an attacker forms some data such that the hash of that data will be the same, and then preceeds to fill up all entries of a hashbucket. This is a realistic and well-known denial-of-service vector. Currently hashtables use jhash, which is fast but not secure, and some kind of rotating key scheme (or none at all, which isn't good). SipHash is meant as a replacement for jhash in these cases. There are a modicum of places in the kernel that are vulnerable to hashtable poisoning attacks, either via userspace vectors or network vectors, and there's not a reliable mechanism inside the kernel at the moment to fix it. The first step toward fixing these issues is actually getting a secure primitive into the kernel for developers to use. Then we can, bit by bit, port things over to it as deemed appropriate. While SipHash is extremely fast for a cryptographically secure function, it is likely a bit slower than the insecure jhash, and so replacements will be evaluated on a case-by-case basis based on whether or not the difference in speed is negligible and whether or not the current jhash usage poses a real security risk. For the second usage: A few places in the kernel are using MD5 or SHA1 for creating secure sequence numbers, syn cookies, port numbers, or fast random numbers. SipHash is a faster and more fitting, and more secure replacement for MD5 in those situations. Replacing MD5 and SHA1 with SipHash for these uses is obvious and straight-forward, and so is submitted along with this patch series. There shouldn't be much of a debate over its efficacy. Dozens of languages are already using this internally for their hash tables and PRFs. Some of the BSDs already use this in their kernels. SipHash is a widely known high-speed solution to a widely known set of problems, and it's time we catch-up. Signed-off-by: Jason A. Donenfeld Reviewed-by: Jean-Philippe Aumasson Cc: Linus Torvalds Cc: Eric Biggers Cc: David Laight Cc: Eric Dumazet Signed-off-by: David S. Miller Documentation/siphash.txt | 100 ++++++++++++++++++++ MAINTAINERS | 7 ++ include/linux/siphash.h | 85 +++++++++++++++++ lib/Kconfig.debug | 6 +- lib/Makefile | 5 +- lib/siphash.c | 232 ++++++++++++++++++++++++++++++++++++++++++++++ lib/test_siphash.c | 131 ++++++++++++++++++++++++++ 7 files changed, 561 insertions(+), 5 deletions(-) commit 200d0177b4623cf218239ad7a21466459c174bff Author: Andy Shevchenko Date: Tue Jan 3 19:00:20 2017 +0200 gpio: devres: Use global array of gpio suffixes We have already a global array of possible GPIO suffixes. Use it here instead of another copy of them. Unfortunately this will not reduce the memory footprint, though allows to easy maintain list in only one place. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/devres.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit eafea7390e597f766927d1ba7459f3904b0b9194 Author: David Ahern Date: Sat Jan 7 20:04:23 2017 -0800 net: ipv4: remove disable of bottom half in inet_rtm_getroute Nothing about the route lookup requires bottom half to be disabled. Remove the local_bh_disable ... local_bh_enable around ip_route_input. This appears to be a vestige of days gone by as it has been there since the beginning of git time. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 2 -- 1 file changed, 2 deletions(-) commit 003910ebc83bcac2ea543dbc6dfff2bc4fa67789 Author: Nishanth Menon Date: Thu Jan 5 10:54:14 2017 -0800 pinctrl: Introduce TI IOdelay configuration driver SoC family such as DRA7 family of processors have, in addition to the regular muxing of pins (as done by pinctrl-single), a separate hardware module called IODelay which is also expected to be configured. The "IODelay" module has it's own register space that is independent of the control module and the padconf register area. With recent changes to the pinctrl framework, we can now support this hardware with a reasonably minimal driver by using #pinctrl-cells, GENERIC_PINCTRL_GROUPS and GENERIC_PINMUX_FUNCTIONS. It is advocated strongly in TI's official documentation considering the existing design of the DRA7 family of processors during mux or IODelay reconfiguration, there is a potential for a significant glitch which may cause functional impairment to certain hardware. It is hence recommended to do as little of muxing as absolutely necessary without I/O isolation (which can only be done in initial stages of bootloader). NOTE: with the system wide I/O isolation scheme present in DRA7 SoC family, it is not reasonable to do stop all I/O operations for every such pad configuration scheme. So, we will let it glitch when used in this mode. Even with the above limitation, certain functionality such as MMC has mandatory need for IODelay reconfiguration requirements, depending on speed of transfer. In these cases, with careful examination of usecase involved, the expected glitch can be controlled such that it does not impact functionality. In short, IODelay module support as a padconf driver being introduced here is not expected to do SoC wide I/O Isolation and is meant for a limited subset of IODelay configuration requirements that need to be dynamic and whose glitchy behavior will not cause functionality failure for that interface. IMPORTANT NOTE: we take the approach of keeping LOCK_BITs cleared to 0x0 at all times, even when configuring Manual IO Timing Modes. This is done by eliminating the LOCK_BIT=1 setting from Step of the Manual IO timing Mode configuration procedure. This option leaves the CFG_* registers unprotected from unintended writes to the CTRL_CORE_PAD_* registers while Manual IO Timing Modes are configured. This approach is taken to allow for a generic driver to exist in kernel world that has to be used carefully in required usecases. Signed-off-by: Nishanth Menon Signed-off-by: Lokesh Vutla [tony@atomide.com: updated to use generic pinctrl functions, added binding documentation, updated comments] Acked-by: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/ti,iodelay.txt | 47 + drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/ti/Kconfig | 10 + drivers/pinctrl/ti/Makefile | 1 + drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 944 +++++++++++++++++++++ 6 files changed, 1004 insertions(+) commit 92c2b671848e7816455ba5374e98913d920f3257 Author: Tony Lindgren Date: Fri Dec 30 10:37:31 2016 -0800 pinctrl: core: Make dt_free_map optional If the pin controller driver is using devm_kzalloc, there may not be anything to do for dt_free_map. Let's make it optional to avoid unncessary boilerplate code. Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 3 --- drivers/pinctrl/devicetree.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) commit f502d834950a28e02651bb7e2cc7111ddd352644 Author: Eli Cohen Date: Tue Jan 3 23:55:28 2017 +0200 net/mlx5: Activate support for 4K UARs Activate 4K UAR support for firmware versions that support it. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 30aa60b3bd12bd79b5324b7b595bd3446ab24b52 Author: Eli Cohen Date: Tue Jan 3 23:55:27 2017 +0200 IB/mlx5: Support 4k UAR for libmlx5 Add fields to structs to convey to kernel an indication whether the library supports multi UARs per page and return to the library the size of a UAR based on the queried value. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 21 +++++++- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 ++-- .../net/ethernet/mellanox/mlx5/core/en_common.c | 12 +---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 ++++---- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 56 ---------------------- include/linux/mlx5/cq.h | 2 +- include/linux/mlx5/driver.h | 12 ----- include/uapi/rdma/mlx5-abi.h | 7 +++ 9 files changed, 42 insertions(+), 100 deletions(-) commit b037c29a8056b8e896c4e084ba7cc30d6a1f165f Author: Eli Cohen Date: Tue Jan 3 23:55:26 2017 +0200 IB/mlx5: Allow future extension of libmlx5 input data Current check requests that new fields in struct mlx5_ib_alloc_ucontext_req_v2 that are not known to the driver be zero. This was introduced so new libraries passing additional information to the kernel through struct mlx5_ib_alloc_ucontext_req_v2 will be notified by old kernels that do not support their request by failing the operation. This schecme is problematic since it requires libmlx5 to issue the requests with descending input size for struct mlx5_ib_alloc_ucontext_req_v2. To avoid this, we require that new features that will obey the following rules: If the feature requires one or more fields in the response and the at least one of the fields can be encoded such that a zero value means the kernel ignored the request then this field will provide the indication to the library. If no response is required or if zero is a valid response, a new field should be added that indicates to the library whether its request was processed. Fixes: b368d7cb8ceb ('IB/mlx5: Add hca_core_clock_offset to udata in init_ucontext') Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/cq.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 201 ++++++++++++++++++++++------------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 15 ++- drivers/infiniband/hw/mlx5/qp.c | 133 ++++++++++------------- include/linux/mlx5/device.h | 12 ++- include/linux/mlx5/driver.h | 12 +-- 6 files changed, 209 insertions(+), 166 deletions(-) commit 5fe9dec0d045437e48f112b8fa705197bd7bc3c0 Author: Eli Cohen Date: Tue Jan 3 23:55:25 2017 +0200 IB/mlx5: Use blue flame register allocator in mlx5_ib Make use of the blue flame registers allocator at mlx5_ib. Since blue flame was not really supported we remove all the code that is related to blue flame and we let all consumers to use the same blue flame register. Once blue flame is supported we will add the code. As part of this patch we also move the definition of struct mlx5_bf to mlx5_ib.h as it is only used by mlx5_ib. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/cq.c | 8 +- drivers/infiniband/hw/mlx5/main.c | 28 +++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 11 ++- drivers/infiniband/hw/mlx5/qp.c | 73 +++------------- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 16 +--- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 114 ------------------------- include/linux/mlx5/cq.h | 3 +- include/linux/mlx5/doorbell.h | 6 +- include/linux/mlx5/driver.h | 19 ----- 10 files changed, 59 insertions(+), 221 deletions(-) commit 0118717583cda6f4f36092853ad0345e8150b286 Author: Eli Cohen Date: Tue Jan 3 23:55:24 2017 +0200 net/mlx5: Add interface to get reference to a UAR A reference to a UAR is required to generate CQ or EQ doorbells. Since CQ or EQ doorbells can all be generated using the same UAR area without any effect on performance, we are just getting a reference to any available UAR, If one is not available we allocate it but we don't waste the blue flame registers it can provide and we will use them for subsequent allocations. We get a reference to such UAR and put in mlx5_priv so any kernel consumer can make use of it. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 14 ++++------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 22 ++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 32 ++++++++++++++++++++++++++ include/linux/mlx5/driver.h | 5 +++- 4 files changed, 59 insertions(+), 14 deletions(-) commit 2956b338b729dcce90f9fa5e799df71908f09701 Author: Masanari Iida Date: Thu Jan 5 23:43:07 2017 +0900 bus:qcom : Fix typo in qcom,ebi2.txt This patch fix 2 spelling typos found in qcom,ebi2.txt Signed-off-by: Masanari Iida Reviewed-by: Linus Walleij Signed-off-by: Rob Herring Documentation/devicetree/bindings/bus/qcom,ebi2.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b0c06e0b660ed175dbdd93a591476041403e54b Author: Philippe Reynes Date: Sat Jan 7 23:18:07 2017 +0100 net: intel: e100: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/intel/e100.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8a43379fc61910aa620e405fb0b81adddc2ca84d Author: Philippe Reynes Date: Sat Jan 7 22:37:29 2017 +0100 net: ibm: ibmvnic: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 9ce8c2dfceaec82e3cde57934b6cc69d24c42e95 Author: Philippe Reynes Date: Sat Jan 7 22:35:13 2017 +0100 net: ibm: ibmveth: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit e4ccf764488adbd072e78f416ef0b5bd0044c899 Author: Philippe Reynes Date: Sat Jan 7 22:32:27 2017 +0100 net: ibm: emac: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 70 ++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit cecf62d6c618e4ede77b83101e2484188b7af7e1 Author: Philippe Reynes Date: Sat Jan 7 17:47:47 2017 +0100 net: ibm: ehea: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ehea/ehea_ethtool.c | 51 ++++++++++++++++------------ 1 file changed, 30 insertions(+), 21 deletions(-) commit 1e9116327e1dbbf33fcb539c977ff39e1c680e6c Author: yuan linyu Date: Sat Jan 7 17:18:31 2017 +0800 net: change init_inodecache() return void sock_init() call it but not check it's return value, so change it to void return and add an internal BUG_ON() check. Signed-off-by: yuan linyu Signed-off-by: David S. Miller net/socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ec23189049651b16dc2ffab35a4371dc1f491aca Author: Willem de Bruijn Date: Mon Jan 2 17:19:46 2017 -0500 xtables: extend matches and targets with .usersize In matches and targets that define a kernel-only tail to their xt_match and xt_target data structs, add a field .usersize that specifies up to where data is to be shared with userspace. Performed a search for comment "Used internally by the kernel" to find relevant matches and targets. Manually inspected the structs to derive a valid offsetof. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_limit.c | 1 + net/ipv4/netfilter/ipt_CLUSTERIP.c | 1 + net/ipv6/netfilter/ip6t_NPT.c | 2 ++ net/netfilter/xt_CT.c | 3 +++ net/netfilter/xt_RATEEST.c | 1 + net/netfilter/xt_TEE.c | 2 ++ net/netfilter/xt_bpf.c | 2 ++ net/netfilter/xt_cgroup.c | 1 + net/netfilter/xt_connlimit.c | 1 + net/netfilter/xt_hashlimit.c | 4 ++++ net/netfilter/xt_limit.c | 2 ++ net/netfilter/xt_quota.c | 1 + net/netfilter/xt_rateest.c | 1 + net/netfilter/xt_string.c | 1 + 14 files changed, 23 insertions(+) commit 4915f7bbc402071539ec0cb8c75aad878c982402 Author: Willem de Bruijn Date: Mon Jan 2 17:19:45 2017 -0500 xtables: use match, target and data copy_to_user helpers in compat Convert compat to copying entries, matches and targets one by one, using the xt_match_to_user and xt_target_to_user helper functions. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit b5040f6c33a51e6e1fddab75baf0f45d4943cde4 Author: Willem de Bruijn Date: Mon Jan 2 17:19:44 2017 -0500 ebtables: use match, target and data copy_to_user helpers Convert ebtables to copying entries, matches and targets one by one. The solution is analogous to that of generic xt_(match|target)_to_user helpers, but is applied to different structs. Convert existing helpers ebt_make_XXXname helpers that overwrite fields of an already copy_to_user'd struct with ebt_XXX_to_user helpers that copy all relevant fields of the struct from scratch. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 78 +++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 31 deletions(-) commit 244b531bee2bdcfcd35ca2fff9cc7d073b3aa060 Author: Willem de Bruijn Date: Mon Jan 2 17:19:43 2017 -0500 arptables: use match, target and data copy_to_user helpers Convert arptables to copying entries, matches and targets one by one, using the xt_match_to_user and xt_target_to_user helper functions. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit e47ddb2c4691fd2bd8d25745ecb6848408899757 Author: Willem de Bruijn Date: Mon Jan 2 17:19:42 2017 -0500 ip6tables: use match, target and data copy_to_user helpers Convert ip6tables to copying entries, matches and targets one by one, using the xt_match_to_user and xt_target_to_user helper functions. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/ip6_tables.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit f77bc5b23fb1af51fc0faa8a479dea8969eb5079 Author: Willem de Bruijn Date: Mon Jan 2 17:19:41 2017 -0500 iptables: use match, target and data copy_to_user helpers Convert iptables to copying entries, matches and targets one by one, using the xt_match_to_user and xt_target_to_user helper functions. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ip_tables.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit f32815d21d4d8287336fb9cef4d2d9e0866214c2 Author: Willem de Bruijn Date: Mon Jan 2 17:19:40 2017 -0500 xtables: add xt_match, xt_target and data copy_to_user functions xt_entry_target, xt_entry_match and their private data may contain kernel data. Introduce helper functions xt_match_to_user, xt_target_to_user and xt_data_to_user that copy only the expected fields. These replace existing logic that calls copy_to_user on entire structs, then overwrites select fields. Private data is defined in xt_match and xt_target. All matches and targets that maintain kernel data store this at the tail of their private structure. Extend xt_match and xt_target with .usersize to limit how many bytes of data are copied. The remainder is cleared. If compatsize is specified, usersize can only safely be used if all fields up to usersize use platform-independent types. Otherwise, the compat_to_user callback must be defined. This patch does not yet enable the support logic. Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/x_tables.h | 9 +++++++ net/netfilter/x_tables.c | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 24f56ea66df78693cf588d00abf3cd22a4dec51d Author: Scott Wood Date: Wed Jan 4 13:03:49 2017 +0200 dt-bindings: qman: Remove pool channel node No device tree has these, nor does any driver look for them. Signed-off-by: Scott Wood Signed-off-by: Rob Herring .../devicetree/bindings/soc/fsl/qman-portals.txt | 20 -------------------- 1 file changed, 20 deletions(-) commit c13215dd2aacb147474a9e960289c9207bcb44d6 Author: Yegor Yefremov Date: Fri Dec 30 09:05:33 2016 +0100 Documentation: panel-dpi: fix path to display-timing.txt Signed-off-by: Yegor Yefremov Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/panel/panel-dpi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b536c0012d63fc34a2332aff5c6ee79da927a0f Author: Uwe Kleine-König Date: Tue Dec 20 22:20:05 2016 +0100 devicetree: bindings: clk: mvebu: fix description for sata1 on Armada XP SATA Host 0 clock is (as correctly documented) id 15/sata0. Signed-off-by: Uwe Kleine-König Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bb61d14b98bbdd515603604c9167db06f1f2eb2 Author: Stuart Yoder Date: Thu Dec 15 18:16:13 2016 -0600 Docs: dt: Be explicit and consistent in reference to IOMMU specifiers The generic IOMMU binding says that the meaning of an 'IOMMU specifier' is defined by the binding of a specific SMMU. The ARM SMMU binding never explicitly uses the term 'specifier' at all. Update implicit references to use the explicit term. In the iommu-map binding change references to iommu-specifier to "IOMMU specifier" so we are 100% consistent everywhere with terminology and capitalization. Signed-off-by: Stuart Yoder Acked-by: Mark Rutland Signed-off-by: Rob Herring Documentation/devicetree/bindings/iommu/arm,smmu.txt | 10 +++++----- Documentation/devicetree/bindings/pci/pci-iommu.txt | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) commit 33ec224045b70b213f0d0f280dc7e543d71a4763 Author: Yegor Yefremov Date: Thu Dec 15 16:56:10 2016 +0100 Documentation: ehci-omap: remove the unnecessary newline Signed-off-by: Yegor Yefremov Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/ehci-omap.txt | 1 - 1 file changed, 1 deletion(-) commit b5ee3daf6efc9fe1096b9e66439c4de7e306b741 Author: Yegor Yefremov Date: Thu Dec 15 16:56:09 2016 +0100 Documentation: omap-usb-host: fix OMAP OHCI/EHCI file names OMAP related files are actually named ehci-omap.txt and ohci-omap3.txt. Also add full path to ohci-omap3.txt. Signed-off-by: Yegor Yefremov Signed-off-by: Rob Herring Documentation/devicetree/bindings/mfd/omap-usb-host.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1aa54840657fe822b026ab56b75088e08c92362 Author: Guilherme G. Piccoli Date: Mon Dec 5 11:59:16 2016 -0200 of/irq: improve error report on irq discovery process failure On PowerPC machines some PCI slots might not have level triggered interrupts capability (also know as level signaled interrupts), leading of_irq_parse_pci() to complain by presenting error messages on the kernel log - in this case, the properties "interrupt-map" and "interrupt-map-mask" are not present on device's node in the device tree. This patch introduces a different message for this specific case, and also reduces its level from error to warning. Besides, we warn (once) that possibly some PCI slots on the system have no level triggered interrupts available. We changed some error return codes too on function of_irq_parse_raw() in order other failure's cases can be presented in a more precise way. Before this patch, when an adapter was plugged in a slot without level interrupts capabilitiy on PowerPC, we saw a generic error message like this: [54.239] pci 002d:70:00.0: of_irq_parse_pci() failed with rc=-22 Now, with this applied, we see the following specific message: [16.154] pci 0014:60:00.1: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available Finally, we standardize the error path in of_irq_parse_raw() by always taking the fail path instead of returning directly from the loop. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Rob Herring drivers/of/irq.c | 19 ++++++++++++------- drivers/of/of_pci_irq.c | 10 +++++++++- 2 files changed, 21 insertions(+), 8 deletions(-) commit a009e975da5c7d42a7f5eaadc54946eb5f76c9af Author: Chris Wilson Date: Wed Jan 4 14:12:22 2017 +0000 dma-fence: Introduce drm_fence_set_error() helper The dma_fence.error field (formerly known as dma_fence.status) is an optional field that may be set by drivers before calling dma_fence_signal(). The field can be used to indicate that the fence was completed in err rather than with success, and is visible to other consumers of the fence and to userspace via sync_file. This patch renames the field from status to error so that its meaning is hopefully more clear (and distinct from dma_fence_get_status() which is a composite between the error state and signal state) and adds a helper that validates the preconditions of when it is suitable to adjust the error field. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-3-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 2 +- include/linux/dma-fence.h | 30 +++++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-) commit fb1b8b117531f217e7d332bdc5cbdf8ebb077ea5 Author: Geert Uytterhoeven Date: Mon Jan 9 15:49:28 2017 +0100 libata-eh: Use switch() instead of sparse array for protocol strings Replace the sparse 256-pointer array for looking up protocol strings by a switch() statement to reduce kernel size. According to bloat-o-meter, this saves 910 bytes on m68k (32-bit), and 1892 bytes on arm64 (64-bit). Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/libata-eh.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 900fde06cb9d27625fec4f5cabd7f5462adc79fb Author: Gary Tierney Date: Mon Jan 9 10:07:32 2017 -0500 selinux: default to security isid in sel_make_bools() if no sid is found Use SECINITSID_SECURITY as the default SID for booleans which don't have a matching SID returned from security_genfs_sid(), also update the error message to a warning which matches this. This prevents the policy failing to load (and consequently the system failing to boot) when there is no default genfscon statement matched for the selinuxfs in the new policy. Signed-off-by: Gary Tierney Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/selinuxfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4262fb51c9f53e0c623663216e6a5d1872a45824 Author: Gary Tierney Date: Mon Jan 9 10:07:31 2017 -0500 selinux: log errors when loading new policy Adds error logging to the code paths which can fail when loading a new policy in sel_write_load(). If the policy fails to be loaded from userspace then a warning message is printed, whereas if a failure occurs after loading policy from userspace an error message will be printed with details on where policy loading failed (recreating one of /classes/, /policy_capabilities/, /booleans/ in the SELinux fs). Also, if sel_make_bools() fails to obtain an SID for an entry in /booleans/* an error will be printed indicating the path of the boolean. Signed-off-by: Gary Tierney Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/selinuxfs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit b21507e272627c434e8dd74e8d51fd8245281b59 Author: Stephen Smalley Date: Mon Jan 9 10:07:31 2017 -0500 proc,security: move restriction on writing /proc/pid/attr nodes to proc Processes can only alter their own security attributes via /proc/pid/attr nodes. This is presently enforced by each individual security module and is also imposed by the Linux credentials implementation, which only allows a task to alter its own credentials. Move the check enforcing this restriction from the individual security modules to proc_pid_attr_write() before calling the security hook, and drop the unnecessary task argument to the security hook since it can only ever be the current task. Signed-off-by: Stephen Smalley Acked-by: Casey Schaufler Acked-by: John Johansen Signed-off-by: Paul Moore fs/proc/base.c | 13 +++++++++---- include/linux/lsm_hooks.h | 3 +-- include/linux/security.h | 4 ++-- security/apparmor/lsm.c | 7 ++----- security/security.c | 4 ++-- security/selinux/hooks.c | 13 +------------ security/smack/smack_lsm.c | 11 +---------- 7 files changed, 18 insertions(+), 37 deletions(-) commit be0554c9bf9f7cc96f5205df8f8bd3573b74320e Author: Stephen Smalley Date: Mon Jan 9 10:07:31 2017 -0500 selinux: clean up cred usage and simplify SELinux was sometimes using the task "objective" credentials when it could/should use the "subjective" credentials. This was sometimes hidden by the fact that we were unnecessarily passing around pointers to the current task, making it appear as if the task could be something other than current, so eliminate all such passing of current. Inline various permission checking helper functions that can be reduced to a single avc_has_perm() call. Since the credentials infrastructure only allows a task to alter its own credentials, we can always assume that current must be the same as the target task in selinux_setprocattr after the check. We likely should move this check from selinux_setprocattr() to proc_pid_attr_write() and drop the task argument to the security hook altogether; it can only serve to confuse things. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 294 +++++++++++++++----------------------- security/selinux/include/objsec.h | 10 ++ security/selinux/selinuxfs.c | 73 +++++----- 3 files changed, 166 insertions(+), 211 deletions(-) commit 01593d3299a1cfdb5e08acf95f63ec59dd674906 Author: Stephen Smalley Date: Mon Jan 9 10:07:31 2017 -0500 selinux: allow context mounts on tmpfs, ramfs, devpts within user namespaces commit aad82892af261b9903cc11c55be3ecf5f0b0b4f8 ("selinux: Add support for unprivileged mounts from user namespaces") prohibited any use of context mount options within non-init user namespaces. However, this breaks use of context mount options for tmpfs mounts within user namespaces, which are being used by Docker/runc. There is no reason to block such usage for tmpfs, ramfs or devpts. Exempt these filesystem types from this restriction. Before: sh$ userns_child_exec -p -m -U -M '0 1000 1' -G '0 1000 1' bash sh# mount -t tmpfs -o context=system_u:object_r:user_tmp_t:s0:c13 none /tmp mount: tmpfs is write-protected, mounting read-only mount: cannot mount tmpfs read-only After: sh$ userns_child_exec -p -m -U -M '0 1000 1' -G '0 1000 1' bash sh# mount -t tmpfs -o context=system_u:object_r:user_tmp_t:s0:c13 none /tmp sh# ls -Zd /tmp unconfined_u:object_r:user_tmp_t:s0:c13 /tmp Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ef37979a2cfa3905adbf0c2a681ce16c0aaea92d Author: Stephen Smalley Date: Mon Jan 9 10:07:31 2017 -0500 selinux: handle ICMPv6 consistently with ICMP commit 79c8b348f215 ("selinux: support distinctions among all network address families") mapped datagram ICMP sockets to the new icmp_socket security class, but left ICMPv6 sockets unchanged. This change fixes that oversight to handle both kinds of sockets consistently. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643 Author: Yongqin Liu Date: Mon Jan 9 10:07:30 2017 -0500 selinux: add security in-core xattr support for tracefs Since kernel 4.1 ftrace is supported as a new separate filesystem. It gets automatically mounted by the kernel under the old path /sys/kernel/debug/tracing. Because it lives now on a separate filesystem SELinux needs to be updated to also support setting SELinux labels on tracefs inodes. This is required for compatibility in Android when moving to Linux 4.1 or newer. Signed-off-by: Yongqin Liu Signed-off-by: William Roberts Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 1 + 1 file changed, 1 insertion(+) commit da69a5306ab92e07224da54aafee8b1dccf024f6 Author: Stephen Smalley Date: Mon Jan 9 10:07:30 2017 -0500 selinux: support distinctions among all network address families Extend SELinux to support distinctions among all network address families implemented by the kernel by defining new socket security classes and mapping to them. Otherwise, many sockets are mapped to the generic socket class and are indistinguishable in policy. This has come up previously with regard to selectively allowing access to bluetooth sockets, and more recently with regard to selectively allowing access to AF_ALG sockets. Guido Trentalancia submitted a patch that took a similar approach to add only support for distinguishing AF_ALG sockets, but this generalizes his approach to handle all address families implemented by the kernel. Socket security classes are also added for ICMP and SCTP sockets. Socket security classes were not defined for AF_* values that are reserved but unimplemented in the kernel, e.g. AF_NETBEUI, AF_SECURITY, AF_ASH, AF_ECONET, AF_SNA, AF_WANPIPE. Backward compatibility is provided by only enabling the finer-grained socket classes if a new policy capability is set in the policy; older policies will behave as before. The legacy redhat1 policy capability that was only ever used in testing within Fedora for ptrace_child is reclaimed for this purpose; as far as I can tell, this policy capability is not enabled in any supported distro policy. Add a pair of conditional compilation guards to detect when new AF_* values are added so that we can update SELinux accordingly rather than having to belatedly update it long after new address families are introduced. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 73 +++++++++++++++++++++++++++++++++++++ security/selinux/include/classmap.h | 68 ++++++++++++++++++++++++++++++++++ security/selinux/include/security.h | 3 +- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/services.c | 3 ++ 5 files changed, 147 insertions(+), 2 deletions(-) commit d83bb5a46dedc39a1226272bec4eb47867ba25d4 Author: Maxime Ripard Date: Sun Jan 8 22:31:17 2017 +0100 pinctrl: sunxi: Remove old sun5i pinctrl drivers Now that we have a common pinctrl driver for all the sun5i SoCs, we can remove the old, separate drivers. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 11 - drivers/pinctrl/sunxi/Makefile | 3 - drivers/pinctrl/sunxi/pinctrl-gr8.c | 536 ---------------------- drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c | 685 ----------------------------- drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c | 403 ----------------- 5 files changed, 1638 deletions(-) commit 9e65a37872174bd3615b16fa556377ebf5a3f0cd Author: Matthew Auld Date: Tue Dec 13 16:05:12 2016 +0000 drm/i915: don't open code the pdpe/pml4e clearing Now that it's obvious what the helpers do, we can simplify the code somewhat by using them when clearing the pdpe/pml4e with the relevant scratch entry. Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Michał Winiarski Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161213160512.7008-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 5684310760536867cf89efc3162dd2e057fed2ac Author: Matthew Auld Date: Tue Dec 13 16:05:11 2016 +0000 drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ The function name gen8_setup_page_directory_pointer is misleading, and only serves to confuse the reader, it's not setting up a pdp, but rather encoding a specific pml4e with a given pdp. Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5c693b2b8ae4ec51f0890b7a1368425f8898f0bb Author: Matthew Auld Date: Tue Dec 13 16:05:10 2016 +0000 drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ The function name gen8_setup_page_directory is misleading, and only serves to confuse the reader, it's not setting up a pd, but rather encoding a specific pdpe with a given pd. Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 858f559f3dab00fda3fca4f187a315d5c9220fad Author: Maxime Ripard Date: Sun Jan 8 22:31:16 2017 +0100 pinctrl: sunxi: Add common sun5i pinctrl driver The sun5i SoCs (A10s, A13, GR8) are all based on the same die fit in different packages. Hence, the pins and functions available are just the based on the same set, each SoC having a different subset. Introduce a common pinctrl driver that supports multiple variants to allow to put as much as we can in common. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 3 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun5i.c | 756 ++++++++++++++++++++++++++++++++++ drivers/pinctrl/sunxi/pinctrl-sunxi.h | 4 + 4 files changed, 764 insertions(+) commit 578db85f6777efedfc5b47a34f5b6576caa29eac Author: Maxime Ripard Date: Sun Jan 8 22:31:15 2017 +0100 pinctrl: sunxi: Add pinctrl variants Some SoCs are either supposed to be pin compatible (A10 and A20 for example), or are just repackaged versions of the same die (A10s, A13, GR8). In those case, having a full blown pinctrl driver just introduces duplication in both data size and maintainance effort. Add a variant option to both pins and functions to be able to limit the pins and functions described only to a subset of the SoC we support with a given driver. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 77 ++++++++++++++++++++++++++--------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 26 +++++++++++- 2 files changed, 81 insertions(+), 22 deletions(-) commit d6c99f4bf093a58d3ab47caaec74b81f18bc4e3f Author: Chris Wilson Date: Wed Jan 4 14:12:21 2017 +0000 dma-fence: Wrap querying the fence->status The fence->status is an optional field that is only valid once the fence has been signaled. (Driver may fill the fence->status with an error code prior to calling dma_fence_signal().) Given the restriction upon its validity, wrap querying of the fence->status into a helper dma_fence_get_status(). Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-2-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 25 +++++++++++++++++++++++++ drivers/dma-buf/sync_debug.c | 17 ++++++++--------- drivers/dma-buf/sync_file.c | 6 ++---- include/linux/dma-fence.h | 24 ++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 13 deletions(-) commit 83dd1376fd92f33bdeca9e83d479534a4e7f870b Author: Chris Wilson Date: Wed Jan 4 14:12:20 2017 +0000 dma-fence: Clear fence->status during dma_fence_init() As the fence->status is an optional field that may be set before dma_fence_signal() is called to convey that the fence completed with an error, we have to ensure that it is always set to zero on initialisation so that the typical use (i.e. unset) always flags a successful completion. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 1 + 1 file changed, 1 insertion(+) commit 21e7fbe7db2a983c046a05f12419d88c554a0f5a Author: Jim Mattson Date: Thu Dec 22 15:49:55 2016 -0800 kvm: nVMX: Reorder error checks for emulated VMXON Checks on the operand to VMXON are performed after the check for legacy mode operation and the #GP checks, according to the pseudo-code in Intel's SDM. Signed-off-by: Jim Mattson Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d82d12b39132e820b9ac4aa058ccc733db98917 Author: Paolo Bonzini Date: Sun Dec 18 21:43:41 2016 +0100 KVM: lapic: do not scan IRR when delivering an interrupt On interrupt delivery the PPR can only grow (except for auto-EOI), so it is impossible that non-auto-EOI interrupt delivery results in KVM_REQ_EVENT. We can therefore use __apic_update_ppr. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 26fbbee5815e9352187ac18f0aa53534f62567ff Author: Paolo Bonzini Date: Sun Dec 18 13:54:58 2016 +0100 KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on PPR update On PPR update, we set KVM_REQ_EVENT unconditionally anytime PPR is lowered. But we can take into account IRR here already. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b3c045d33218fe291b04d30e24b6eab0431987e6 Author: Paolo Bonzini Date: Sun Dec 18 21:47:54 2016 +0100 KVM: lapic: remove unnecessary KVM_REQ_EVENT on PPR update PPR needs to be updated whenever on every IRR read because we may have missed TPR writes that _increased_ PPR. However, these writes need not generate KVM_REQ_EVENT, because either KVM_REQ_EVENT has been set already in __apic_accept_irq, or we are going to process the interrupt right away. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit eb90f3417a0cc4880e979ccc84e41890d410ea5b Author: Paolo Bonzini Date: Sun Dec 18 14:02:21 2016 +0100 KVM: vmx: speed up TPR below threshold vmexits Since we're already in VCPU context, all we have to do here is recompute the PPR value. That will in turn generate a KVM_REQ_EVENT if necessary. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 6 ++++++ arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/vmx.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) commit 0f1e261ead16ce09169bf2d223d4c8803576f85e Author: Paolo Bonzini Date: Sat Dec 17 16:05:19 2016 +0100 KVM: x86: add VCPU stat for KVM_REQ_EVENT processing This statistic can be useful to estimate the cost of an IRQ injection scenario, by comparing it with irq_injections. For example the stat shows that sti;hlt triggers more KVM_REQ_EVENT than sti;nop. Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 2 ++ 2 files changed, 3 insertions(+) commit 0f89b207b04a1a399e19d35293658e3a571da3d7 Author: Tom Lendacky Date: Wed Dec 14 14:59:23 2016 -0500 kvm: svm: Use the hardware provided GPA instead of page walk When a guest causes a NPF which requires emulation, KVM sometimes walks the guest page tables to translate the GVA to a GPA. This is unnecessary most of the time on AMD hardware since the hardware provides the GPA in EXITINFO2. The only exception cases involve string operations involving rep or operations that use two memory locations. With rep, the GPA will only be the value of the initial NPF and with dual memory locations we won't know which memory address was translated into EXITINFO2. Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Signed-off-by: Brijesh Singh Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_emulate.h | 1 + arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/emulate.c | 20 +++++++++++++---- arch/x86/kvm/svm.c | 2 ++ arch/x86/kvm/x86.c | 45 +++++++++++++++++++++++++++++--------- 5 files changed, 57 insertions(+), 14 deletions(-) commit 5bd5db385b3e13c702365574c0b7350c6ea45e84 Author: Radim Krčmář Date: Thu Dec 15 18:06:48 2016 +0100 KVM: x86: allow hotplug of VCPU with APIC ID over 0xff LAPIC after reset is in xAPIC mode, which poses a problem for hotplug of VCPUs with high APIC ID, because reset VCPU is waiting for INIT/SIPI, but there is no way to uniquely address it using xAPIC. From many possible options, we chose the one that also works on real hardware: accepting interrupts addressed to LAPIC's x2APIC ID even in xAPIC mode. KVM intentionally differs from real hardware, because real hardware (Knights Landing) does just "x2apic_id & 0xff" to decide whether to accept the interrupt in xAPIC mode and it can deliver one interrupt to more than one physical destination, e.g. 0x123 to 0x123 and 0x23. Fixes: 682f732ecf73 ("KVM: x86: bump MAX_VCPUS to 288") Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit b4535b58ae0df8b7cf0fe92a0c23aa3cf862e3cc Author: Radim Krčmář Date: Thu Dec 15 18:06:47 2016 +0100 KVM: x86: make interrupt delivery fast and slow path behave the same Slow path tried to prevent IPIs from x2APIC VCPUs from being delivered to xAPIC VCPUs and vice-versa. Make slow path behave like fast path, which never distinguished that. Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 6e50043912d9c9c119e3c9c5378869d019df70a9 Author: Radim Krčmář Date: Thu Dec 15 18:06:46 2016 +0100 KVM: x86: replace kvm_apic_id with kvm_{x,x2}apic_id There were three calls sites: - recalculate_apic_map and kvm_apic_match_physical_addr, where it would only complicate implementation of x2APIC hotplug; - in apic_debug, where it was still somewhat preserved, but keeping the old function just for apic_debug was not worth it Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 31 ++++++++++++++++++++++--------- arch/x86/kvm/lapic.h | 11 ----------- 2 files changed, 22 insertions(+), 20 deletions(-) commit f98a3efb284a7950745d6c95be489193e6d4c657 Author: Radim Krčmář Date: Thu Dec 15 18:06:45 2016 +0100 KVM: x86: use delivery to self in hyperv synic Interrupt to self can be sent without knowing the APIC ID. Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63dbe14d39b0505e3260bed92e5f4905f49c09d9 Author: Junaid Shahid Date: Tue Dec 6 16:46:17 2016 -0800 kvm: x86: mmu: Update documentation for fast page fault mechanism Add a brief description of the lockless access tracking mechanism to the documentation of fast page faults in locking.txt. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/locking.txt | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit f160c7b7bb322bf079a5bb4dd34c58f17553f193 Author: Junaid Shahid Date: Tue Dec 6 16:46:16 2016 -0800 kvm: x86: mmu: Lockless access tracking for Intel CPUs without EPT A bits. This change implements lockless access tracking for Intel CPUs without EPT A bits. This is achieved by marking the PTEs as not-present (but not completely clearing them) when clear_flush_young() is called after marking the pages as accessed. When an EPT Violation is generated as a result of the VM accessing those pages, the PTEs are restored to their original values. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 +- arch/x86/include/asm/vmx.h | 9 +- arch/x86/kvm/mmu.c | 279 ++++++++++++++++++++++++++++++---------- arch/x86/kvm/vmx.c | 26 ++-- arch/x86/kvm/x86.c | 2 +- 5 files changed, 239 insertions(+), 80 deletions(-) commit 37f0e8fe6b10ee2ab52576caa721ee1282de74a6 Author: Junaid Shahid Date: Tue Dec 6 16:46:15 2016 -0800 kvm: x86: mmu: Do not use bit 63 for tracking special SPTEs MMIO SPTEs currently set both bits 62 and 63 to distinguish them as special PTEs. However, bit 63 is used as the SVE bit in Intel EPT PTEs. The SVE bit is ignored for misconfigured PTEs but not necessarily for not-Present PTEs. Since MMIO SPTEs use an EPT misconfiguration, so using bit 63 for them is acceptable. However, the upcoming fast access tracking feature adds another type of special tracking PTE, which uses not-Present PTEs and hence should not set bit 63. In order to use common bits to distinguish both type of special PTEs, we now use only bit 62 as the special bit. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 7 +++++++ arch/x86/include/asm/vmx.h | 9 +++++++-- arch/x86/kvm/vmx.c | 6 +++--- 3 files changed, 17 insertions(+), 5 deletions(-) commit f39a058d0ea2f58b9c69cfcf7c93184f33302c98 Author: Junaid Shahid Date: Tue Dec 6 16:46:14 2016 -0800 kvm: x86: mmu: Introduce a no-tracking version of mmu_spte_update mmu_spte_update() tracks changes in the accessed/dirty state of the SPTE being updated and calls kvm_set_pfn_accessed/dirty appropriately. However, in some cases (e.g. when aging the SPTE), this shouldn't be done. mmu_spte_update_no_track() is introduced for use in such cases. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 83ef6c8155c0ecb4c1a7e6bfbe425c85f7cb676d Author: Junaid Shahid Date: Tue Dec 6 16:46:13 2016 -0800 kvm: x86: mmu: Refactor accessed/dirty checks in mmu_spte_update/clear This simplifies mmu_spte_update() a little bit. The checks for clearing of accessed and dirty bits are refactored into separate functions, which are used inside both mmu_spte_update() and mmu_spte_clear_track_bits(), as well as kvm_test_age_rmapp(). The new helper functions handle both the case when A/D bits are supported in hardware and the case when they are not. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 66 +++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 35 deletions(-) commit 97dceba29a6acbb28d16c8c5757ae9f4e1e482ea Author: Junaid Shahid Date: Tue Dec 6 16:46:12 2016 -0800 kvm: x86: mmu: Fast Page Fault path retries This change adds retries into the Fast Page Fault path. Without the retries, the code still works, but if a retry does end up being needed, then it will result in a second page fault for the same memory access, which will cause much more overhead compared to just retrying within the original fault. This would be especially useful with the upcoming fast access tracking change, as that would make it more likely for retries to be needed (e.g. due to read and write faults happening on different CPUs at the same time). Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 124 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 51 deletions(-) commit ea4114bcd3a8c84f0eb0b52e56d348c27ddede2e Author: Junaid Shahid Date: Tue Dec 6 16:46:11 2016 -0800 kvm: x86: mmu: Rename spte_is_locklessly_modifiable() This change renames spte_is_locklessly_modifiable() to spte_can_locklessly_be_made_writable() to distinguish it from other forms of lockless modifications. The full set of lockless modifications is covered by spte_has_volatile_bits(). Signed-off-by: Junaid Shahid Reviewed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 27959a4415a5a00881a7b9353ab9b1274da2ca47 Author: Junaid Shahid Date: Tue Dec 6 16:46:10 2016 -0800 kvm: x86: mmu: Use symbolic constants for EPT Violation Exit Qualifications This change adds some symbolic constants for VM Exit Qualifications related to EPT Violations and updates handle_ept_violation() to use these constants instead of hard-coded numbers. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/include/asm/vmx.h | 16 ++++++++++++++++ arch/x86/kvm/vmx.c | 22 ++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) commit 114df303a7eeae8b50ebf68229b7e647714a9bea Author: David Matlack Date: Mon Dec 19 13:58:25 2016 -0800 kvm: x86: reduce collisions in mmu_page_hash When using two-dimensional paging, the mmu_page_hash (which provides lookups for existing kvm_mmu_page structs), becomes imbalanced; with too many collisions in buckets 0 and 512. This has been seen to cause mmu_lock to be held for multiple milliseconds in kvm_mmu_get_page on VMs with a large amount of RAM mapped with 4K pages. The current hash function uses the lower 10 bits of gfn to index into mmu_page_hash. When doing shadow paging, gfn is the address of the guest page table being shadow. These tables are 4K-aligned, which makes the low bits of gfn a good hash. However, with two-dimensional paging, no guest page tables are being shadowed, so gfn is the base address that is mapped by the table. Thus page tables (level=1) have a 2MB aligned gfn, page directories (level=2) have a 1GB aligned gfn, etc. This means hashes will only differ in their 10th bit. hash_64() provides a better hash. For example, on a VM with ~200G (99458 direct=1 kvm_mmu_page structs): hash max_mmu_page_hash_collisions -------------------------------------------- low 10 bits 49847 hash_64 105 perfect 97 While we're changing the hash, increase the table size by 4x to better support large VMs (further reduces number of collisions in 200G VM to 29). Note that hash_64() does not provide a good distribution prior to commit ef703f49a6c5 ("Eliminate bad hash multipliers from hash_32() and hash_64()"). Signed-off-by: David Matlack Change-Id: I5aa6b13c834722813c6cca46b8b1ed6f53368ade Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit f3414bc77419463c0d81eaa2cea7ee4ccb447c7d Author: David Matlack Date: Tue Dec 20 15:25:57 2016 -0800 kvm: x86: export maximum number of mmu_page_hash collisions Report the maximum number of mmu_page_hash collisions as a per-VM stat. This will make it easy to identify problems with the mmu_page_hash in the future. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c | 25 +++++++++++++++++-------- arch/x86/kvm/x86.c | 2 ++ 3 files changed, 20 insertions(+), 8 deletions(-) commit 826da32140dada1467f4216410525511393317e8 Author: Radim Krčmář Date: Fri Dec 16 16:10:06 2016 +0100 KVM: x86: simplify conditions with split/kernel irqchip Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/irq_comm.c | 2 +- arch/x86/kvm/x86.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8231f50d9853274ed104aac86b6b6263ca666c4d Author: Radim Krčmář Date: Fri Dec 16 16:10:05 2016 +0100 KVM: x86: prevent setup of invalid routes The check in kvm_set_pic_irq() and kvm_set_ioapic_irq() was just a temporary measure until the code improved enough for us to do this. This changes APIC in a case when KVM_SET_GSI_ROUTING is called to set up pic and ioapic routes before KVM_CREATE_IRQCHIP. Those rules would get overwritten by KVM_CREATE_IRQCHIP at best, so it is pointless to allow it. Userspaces hopefully noticed that things don't work if they do that and don't do that. Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/irq_comm.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit e5dc48777dcc898210e2f16d80d44718db38cdc3 Author: Radim Krčmář Date: Fri Dec 16 16:10:04 2016 +0100 KVM: x86: refactor pic setup in kvm_set_routing_entry Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/irq_comm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 099413664c71fcf9d0099eba4f8a4dd59653d5a3 Author: Radim Krčmář Date: Fri Dec 16 16:10:03 2016 +0100 KVM: x86: make pic setup code look like ioapic setup We don't treat kvm->arch.vpic specially anymore, so the setup can look like ioapic. This gets a bit more information out of return values. Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8259.c | 16 +++++++++++----- arch/x86/kvm/irq.h | 4 ++-- arch/x86/kvm/x86.c | 30 +++++++++++++++--------------- 3 files changed, 28 insertions(+), 22 deletions(-) commit 49776faf93f8074bb4990beac04781a9507d3650 Author: Radim Krčmář Date: Fri Dec 16 16:10:02 2016 +0100 KVM: x86: decouple irqchip_in_kernel() and pic_irqchip() irqchip_in_kernel() tried to save a bit by reusing pic_irqchip(), but it just complicated the code. Add a separate state for the irqchip mode. Reviewed-by: David Hildenbrand [Used Paolo's version of condition in irqchip_in_kernel().] Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 8 +++++++- arch/x86/kvm/irq.h | 15 ++++++++------- arch/x86/kvm/x86.c | 5 +++-- 3 files changed, 18 insertions(+), 10 deletions(-) commit 35e6eaa3df55822d0cb1df3bf08e6cb816737131 Author: Radim Krčmář Date: Fri Dec 16 16:10:01 2016 +0100 KVM: x86: don't allow kernel irqchip with split irqchip Split irqchip cannot be created after creating the kernel irqchip, but we forgot to restrict the other way. This is an API change. Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e297b7343d04afc78329915348d00e1028d8c193 Author: Fabrice GASNIER Date: Fri Dec 2 14:57:00 2016 +0100 ARM: configs: stm32: enable ADC driver ADC driver depends on REGULATOR and IIO that are not yet selected. Current hardware boards (like stm32f429i-eval) is using fixed regulators. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/configs/stm32_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 368e5fbdfc60732643f34f538823ed4bc8829827 Author: Andy Shevchenko Date: Mon Jan 9 00:49:22 2017 +0200 ata: sata_mv: Convert to devm_ioremap_resource() Convert to devm_ioremap_resource() which provides more consistent error handling. Note that devm_ioremap_resource() provides its own error messages. Signed-off-by: Andy Shevchenko Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 0fe4618d3b22d0ae44a4e650526466cf570ff8a5 Merge: 88af4bb 064c3db Author: Tejun Heo Date: Mon Jan 9 07:38:25 2017 -0500 Merge branch 'for-4.10-fixes' into for-4.11 commit 2e7ee33615f75531ae83607e024babde724e3e94 Author: David Lechner Date: Thu Jan 5 22:33:47 2017 -0600 ARM: davinci_all_defconfig: enable pwm-beeper This enables the pwm-beeper module. This is used by the speaker on LEGO MINDSTORMS EV3. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 3d63a47a380a873408dad10ca62bd8299b2208f1 Author: Marek Szyprowski Date: Mon Jan 9 11:36:10 2017 +0100 spi: s3c64xx: Don't request/release DMA channels for each SPI transfer Requesting a DMA channel might be a time consuming operation, so there is no need to acquire and release DMA channel for each SPI transfer. DMA channels can be requested during driver probe and kept all the time, also because there are no shared nor dynamically allocated channels on Samsung S3C/S5P/Exynos platforms. While moving dma_requrest_slave_channel calls, lets switch to dma_request_slave_channel_reason(), which returns error codes on failure, which can be properly propagated to the caller (this for example defers SPI probe when DMA controller is not yet available). Signed-off-by: Marek Szyprowski Reviewed-by: Andi Shyti Tested-by: Andi Shyti Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 57 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit 5c47e3cfd4f9d12e9f594d99118c1381c163ff98 Merge: fafd679 7ce7d89 Author: Mark Brown Date: Mon Jan 9 12:20:41 2017 +0000 Merge tag 'v4.10-rc1' into spi-s3c64xx Linux 4.10-rc1 commit bd2522b168847106c1885f0319a2833bdf88bf9a Author: Andrzej Zaborowski Date: Fri Jan 6 16:33:43 2017 -0500 cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT Disconnect or deauthenticate when the owning socket is closed if this flag is supplied to CMD_CONNECT or CMD_ASSOCIATE. This may be used to ensure userspace daemon doesn't leave an unmanaged connection behind. In some situations it would be possible to account for that, to some degree, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg include/net/cfg80211.h | 7 +++++++ include/uapi/linux/nl80211.h | 2 ++ net/wireless/core.c | 3 +++ net/wireless/core.h | 1 + net/wireless/mlme.c | 5 +++++ net/wireless/nl80211.c | 26 +++++++++++++++++++++++++- net/wireless/sme.c | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 76 insertions(+), 1 deletion(-) commit 4ef8c1c93f848e360754f10eb2e7134c872b6597 Author: Johannes Berg Date: Mon Jan 9 11:10:42 2017 +0100 cfg80211: size various nl80211 messages correctly Ilan reported that sometimes nl80211 messages weren't working if the frames being transported got very large, which was really a problem for userspace-to-kernel messages, but prompted me to look at the code. Upon review, I found various places where variable-length data is transported in an nl80211 message but the message isn't allocated taking that into account. This shouldn't cause any problems since the frames aren't really that long, apart in one place where two (possibly very long frames) might not fit. Fix all the places (that I found) that get variable length data from the driver and put it into a message to take the length of the variable data into account. The 100 there is just a safe constant for the remaining message overhead (it's usually around 50 for most messages.) Signed-off-by: Johannes Berg net/wireless/nl80211.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e21ab17904ff5c56bd6d6d062824ca584a42d89f Author: Jose Abreu Date: Tue Dec 27 14:00:54 2016 +0000 ASoC: dwc: Enable 24 bit sample size in PIO mode Sample size of 24 bits use in reality 32 bits for storage. We can safelly enable this sample size and treat the data as 32 bits. Tested in a x86_64 platform and in ARC AXS101 SDP platform. Signed-off-by: Jose Abreu Signed-off-by: Mark Brown sound/soc/dwc/designware_pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit e2f748e06db389d9fd51413df23ff8d3615a47db Author: Jose Abreu Date: Tue Dec 27 14:00:53 2016 +0000 ASoC: dwc: Add record capability in PIO mode Up until now PIO mode offered only playback support. With this patch we add support for record mode. The PCM was refactored so that we could reuse the existing infrastructure without many changes. We have support for 16 and 32 bits of sample size using only 2 channels. Tested in a x86_64 platform and in ARC AXS101 SDP platform. Signed-off-by: Jose Abreu Signed-off-by: Mark Brown sound/soc/dwc/designware_i2s.c | 9 +++- sound/soc/dwc/designware_pcm.c | 97 +++++++++++++++++++++++++++++++++--------- sound/soc/dwc/local.h | 9 +++- 3 files changed, 92 insertions(+), 23 deletions(-) commit da369d0ab58cb21371f84a144084a16df7800783 Author: Bard Liao Date: Tue Dec 27 12:05:06 2016 +0800 ASoC: rt5645: set high voltage for capless power The default capless power mode is low voltage mode. We should set it to high voltage mode to get fair headphone performance. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e70002c80d4de20a5c61c16ecd4f40a48be3efcf Author: Phil Reid Date: Fri Jan 6 17:35:13 2017 +0800 spi: dw: Make debugfs use bus num and make irq name unique Instead of using device name it was suggested that bus number was more appropriate to differentiate debugfs names. Also reduce buffer size to more realistic 32 bytes instead of 128. When request_irq is called the bus number may not be assigned. Therefore the irq name was not unique when dynamic bus number was being used. As per most of the spi drivers use the device name instead. No other use of dws->name could be found so it was removed. Signed-off-by: Phil Reid Signed-off-by: Mark Brown drivers/spi/spi-dw.c | 8 ++++---- drivers/spi/spi-dw.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) commit 341f741f04beceebcb30daa12ae2e5e52e64e532 Author: David Howells Date: Thu Jan 5 10:38:36 2017 +0000 afs: Refcount the afs_call struct A static checker warning occurs in the AFS filesystem: fs/afs/cmservice.c:155 SRXAFSCB_CallBack() error: dereferencing freed memory 'call' due to the reply being sent before we access the server it points to. The act of sending the reply causes the call to be freed if an error occurs (but not if it doesn't). On top of this, the lifetime handling of afs_call structs is fragile because they get passed around through workqueues without any sort of refcounting. Deal with the issues by: (1) Fix the maybe/maybe not nature of the reply sending functions with regards to whether they release the call struct. (2) Refcount the afs_call struct and sort out places that need to get/put references. (3) Pass a ref through the work queue and release (or pass on) that ref in the work function. Care has to be taken because a work queue may already own a ref to the call. (4) Do the cleaning up in the put function only. (5) Simplify module cleanup by always incrementing afs_outstanding_calls whenever a call is allocated. (6) Set the backlog to 0 with kernel_listen() at the beginning of the process of closing the socket to prevent new incoming calls from occurring and to remove the contribution of preallocated calls from afs_outstanding_calls before we wait on it. A tracepoint is also added to monitor the afs_call refcount and lifetime. Reported-by: Dan Carpenter Signed-off-by: David Howells Fixes: 08e0e7c82eea: "[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC." fs/afs/cmservice.c | 41 ++++++------ fs/afs/internal.h | 9 ++- fs/afs/rxrpc.c | 153 ++++++++++++++++++++++++++++----------------- include/trace/events/afs.h | 75 ++++++++++++++++++++++ 4 files changed, 199 insertions(+), 79 deletions(-) commit 210f035316f545e6f507e7d61e191495ba983e27 Author: David Howells Date: Thu Jan 5 10:38:36 2017 +0000 rxrpc: Allow listen(sock, 0) to be used to disable listening Allow listen() with a backlog of 0 to be used to disable listening on an AF_RXRPC socket. This also releases any preallocation, thereby making it easier for a kernel service to account for all allocated call structures when shutting down the service. The socket cannot thereafter have listening reenabled, but must rather be closed and reopened. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 8 ++++++++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_accept.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) commit 56ff9c837778ba2cf76f29c966856a9341e5939d Author: David Howells Date: Thu Jan 5 10:38:36 2017 +0000 afs: Kill afs_wait_mode The afs_wait_mode struct isn't really necessary. Client calls only use one of a choice of two (synchronous or the asynchronous) and incoming calls don't use the wait at all. Replace with a boolean parameter. Signed-off-by: David Howells fs/afs/callback.c | 2 +- fs/afs/fsclient.c | 80 +++++++++++++++++++++++++++--------------------------- fs/afs/internal.h | 68 ++++++++++++---------------------------------- fs/afs/rxrpc.c | 51 ++++++++-------------------------- fs/afs/vlclient.c | 8 +++--- fs/afs/vlocation.c | 4 +-- fs/afs/vnode.c | 26 +++++++++--------- 7 files changed, 90 insertions(+), 149 deletions(-) commit 914122c389d091a02f7b5476209af715e77ccb73 Author: Frederic Weisbecker Date: Thu Dec 29 17:45:49 2016 +0100 x86/apic: Implement set_state_oneshot_stopped() callback When clock_event_device::set_state_oneshot_stopped() is not implemented, hrtimer_cancel() can't stop the clock when there is no more timer in the queue. So the ghost of the freshly cancelled hrtimer haunts us back later with an extra interrupt: -0 [002] d..2 2248.557659: hrtimer_cancel: hrtimer=ffff88021fa92d80 -0 [002] d.h1 2249.303659: local_timer_entry: vector=239 So let's implement this missing callback for the lapic clock. This consist in calling its set_state_shutdown() callback. There don't seem to be a lighter way to stop the clock. Simply writing 0 to APIC_TMICT won't be enough to stop the clock and avoid the extra interrupt, as opposed to what is specified in the specs. We must also mask the timer interrupt in the device. Signed-off-by: Frederic Weisbecker Cc: Borislav Petkov Reviewed-by: Wanpeng Li Reviewed-by: Viresh Kumar Link: http://lkml.kernel.org/r/1483029949-6925-1-git-send-email-fweisbec@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 9b8e34e211b15af429b72388a8f2b3b1823d172e Author: Michał Kępień Date: Fri Jan 6 07:07:47 2017 +0100 rfkill: Add rfkill-any LED trigger Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, which may be useful on laptops with a single "radio LED" and multiple radio transmitters. The trigger is meant to turn a LED on whenever there is at least one radio transmitter active and turn it off otherwise. Signed-off-by: Michał Kępień Signed-off-by: Johannes Berg net/rfkill/core.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) commit 011cda589938e56eb93685dee8ead0bb0506f9e2 Author: Benjamin Gaignard Date: Sat Jan 7 12:39:11 2017 +0100 drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" Removing MMU configuration flag from DRM make few automatic build failed when they answer yes to all flags. Add asm/vga.h file on Blackfin architecture to not broke compilation. Signed-off-by: Benjamin Gaignard Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC") Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483789151-6603-1-git-send-email-benjamin.gaignard@linaro.org arch/blackfin/include/asm/vga.h | 1 + drivers/gpu/drm/Kconfig | 4 ++-- drivers/gpu/drm/ast/Kconfig | 2 +- drivers/gpu/drm/bochs/Kconfig | 2 +- drivers/gpu/drm/cirrus/Kconfig | 2 +- drivers/gpu/drm/gma500/Kconfig | 2 +- drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 +- drivers/gpu/drm/mgag200/Kconfig | 2 +- drivers/gpu/drm/nouveau/Kconfig | 2 +- drivers/gpu/drm/qxl/Kconfig | 2 +- drivers/gpu/drm/virtio/Kconfig | 2 +- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- 12 files changed, 13 insertions(+), 12 deletions(-) commit 11b3c20bdd15d17382068be569740de1dccb173d Author: Gabriel Krisman Bertazi Date: Fri Jan 6 15:57:31 2017 -0200 drm: Change the return type of the unload hook to void The integer returned by the unload hook is ignored by the drm core, so let's make it void. This patch was created using the following Coccinelle semantic script (except for the declaration and comment in drm_drv.h): Compile-tested only. // @ get_name @ struct drm_driver drv; identifier fn; @@ drv.unload = fn; @ replace_type @ identifier get_name.fn; @@ - int + void fn (...) { ... } @ remove_return_param @ identifier get_name.fn; @@ void fn (...) { <... if (...) return - ... ; ...> } @ drop_final_return @ identifier get_name.fn; @@ void fn (...) { ... - return 0; } // Suggested-by: Daniel Vetter Signed-off-by: Gabriel Krisman Bertazi Acked-by: Christian König . Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170106175731.29196-1-krisman@collabora.co.uk drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++--- drivers/gpu/drm/ast/ast_drv.h | 2 +- drivers/gpu/drm/ast/ast_main.c | 3 +-- drivers/gpu/drm/bochs/bochs_drv.c | 3 +-- drivers/gpu/drm/cirrus/cirrus_drv.h | 2 +- drivers/gpu/drm/cirrus/cirrus_main.c | 5 ++--- drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +--- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- drivers/gpu/drm/gma500/psb_drv.c | 3 +-- drivers/gpu/drm/mga/mga_dma.c | 4 +--- drivers/gpu/drm/mga/mga_drv.h | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 2 +- drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +-- drivers/gpu/drm/omapdrm/omap_drv.c | 4 +--- drivers/gpu/drm/qxl/qxl_drv.h | 2 +- drivers/gpu/drm/qxl/qxl_kms.c | 5 ++--- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 5 ++--- drivers/gpu/drm/savage/savage_bci.c | 4 +--- drivers/gpu/drm/savage/savage_drv.h | 2 +- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +--- drivers/gpu/drm/sis/sis_drv.c | 4 +--- drivers/gpu/drm/tegra/drm.c | 6 ++---- drivers/gpu/drm/udl/udl_drv.h | 2 +- drivers/gpu/drm/udl/udl_main.c | 3 +-- drivers/gpu/drm/via/via_drv.h | 2 +- drivers/gpu/drm/via/via_map.c | 4 +--- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_kms.c | 3 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +--- include/drm/drm_drv.h | 5 +---- 33 files changed, 39 insertions(+), 73 deletions(-) commit 931c670d209b64a6033c1a2857ff309eee88f9c8 Author: Shawn Guo Date: Sat Jan 7 16:52:11 2017 +0800 drm: add more document for drm_crtc_from_index() Add a bit more document for function drm_crtc_from_index() to cross link it with drm_crtc_from_index(), and explain that the function is useful in vblank code. While at it, add cross link comment for drm_plane_from_index() as well. Signed-off-by: Shawn Guo Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483779131-19935-1-git-send-email-shawnguo@kernel.org drivers/gpu/drm/drm_crtc.c | 5 ++++- drivers/gpu/drm/drm_plane.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit a09759e82f2d60823027e9d3391bbea40f919604 Author: Vincent Abriou Date: Fri Jan 6 17:44:43 2017 +0100 drm: remove useless parameters from drm_pick_cmdline_mode function drm_pick_cmdline_mode width and height parameters are useless. Just remove them. Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Vincent Abriou Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483721084-20278-2-git-send-email-vincent.abriou@st.com drivers/gpu/drm/drm_fb_helper.c | 7 +++---- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- include/drm/drm_fb_helper.h | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) commit 1527058736fad60e37ca6103f0de39ca045c5fc5 Author: Zhangfei Gao Date: Tue Dec 6 09:51:32 2016 +0800 reset: hisilicon: add reset-hi3660 Add hi3660 reset driver Example of dts usage: iomcu_rst: iomcu_rst_controller { compatible = "hisilicon,hi3660-reset"; hisi,rst-syscon = <&iomcu>; #reset-cells = <2>; }; i2c0: i2c@..... { ... resets = <&iomcu_rst 0x20 3>; /* offset: 0x20; bit: 3 */ ... }; Signed-off-by: Zhangfei Gao Signed-off-by: Philipp Zabel drivers/reset/hisilicon/Kconfig | 7 ++ drivers/reset/hisilicon/Makefile | 1 + drivers/reset/hisilicon/reset-hi3660.c | 126 +++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) commit 836e235495838760f1b8458f462c76404fb7b140 Author: Zhangfei Gao Date: Fri Dec 9 10:11:44 2016 +0800 dt-bindings: Document the hi3660 reset bindings Add DT bindings documentation for hi3660 SoC reset controller. Signed-off-by: Zhangfei Gao Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../bindings/reset/hisilicon,hi3660-reset.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 5987b4bf512101137fa60c5c0ccac3db51541221 Author: Jiancheng Xue Date: Wed Nov 30 09:03:32 2016 +0800 reset: ti_syscon: fix a ti_syscon_reset_status issue If STATUS_SET was not set, ti_syscon_reset_status would always return 0 no matter whether the status_bit was set or not. Signed-off-by: Jiancheng Xue Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver") Signed-off-by: Philipp Zabel drivers/reset/reset-ti-syscon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e8d7f13b6d5a93b3d2cf9a4ceaaf923809fd5ac Author: David Howells Date: Thu Jan 5 10:38:34 2017 +0000 afs: Add some tracepoints Add three tracepoints to the AFS filesystem: (1) The afs_recv_data tracepoint logs data segments that are extracted from the data received from the peer through afs_extract_data(). (2) The afs_notify_call tracepoint logs notification from AF_RXRPC of data coming in to an asynchronous call. (3) The afs_cb_call tracepoint logs incoming calls that have had their operation ID extracted and mapped into a supported cache manager service call. To make (3) work, the name strings in the afs_call_type struct objects have to be annotated with __tracepoint_string. This is done with the CM_NAME() macro. Further, the AFS call state enum needs a name so that it can be used to declare parameter types. Signed-off-by: David Howells fs/afs/cmservice.c | 22 ++++++--- fs/afs/internal.h | 21 +++++---- fs/afs/main.c | 1 + fs/afs/rxrpc.c | 6 +++ include/trace/events/afs.h | 109 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 144 insertions(+), 15 deletions(-) commit 5d799acdd057e4f10fdd09ade22028c83f829f3e Author: Daniel Vetter Date: Mon Jan 9 10:12:02 2017 +0100 drm/i915: Update DRIVER_DATE to 20170109 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c40045a5b47d97e7ca397c84d716302ce65fa4f Merge: 9b9cefd a121103 Author: Greg Kroah-Hartman Date: Mon Jan 9 07:58:34 2017 +0100 Merge 4.10-rc3 into staging-next We want the IIO and staging driver fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman commit 209a7fb2104f2724f651870306c65f86850ee953 Author: Al Viro Date: Mon Jan 9 01:35:39 2017 -0500 lookup_fast(): clean up the logics around the fallback to non-rcu mode Signed-off-by: Al Viro fs/namei.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 916cafdc95843fb9af5fd5f83ca499d75473d107 Author: Mathias Svensson Date: Fri Jan 6 13:32:39 2017 -0800 samples/seccomp: fix 64-bit comparison macros There were some bugs in the JNE64 and JLT64 comparision macros. This fixes them, improves comments, and cleans up the file while we are at it. Reported-by: Stephen Röttger Signed-off-by: Mathias Svensson Signed-off-by: Kees Cook Cc: stable@vger.kernel.org Signed-off-by: James Morris samples/seccomp/bpf-helper.h | 125 +++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 53 deletions(-) commit ad1633a151df9869a222bd99ba04643dc2e0052b Author: Al Viro Date: Sun Jan 8 22:35:31 2017 -0500 namei: fold unlazy_link() into its sole caller Signed-off-by: Al Viro fs/namei.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit 03e916fa8b5577d85471452a3d0c5738aa658dae Author: Roman Pen Date: Sun Jan 8 21:00:35 2017 -0500 ext4: do not polute the extents cache while shifting extents Inside ext4_ext_shift_extents() function ext4_find_extent() is called without EXT4_EX_NOCACHE flag, which should prevent cache population. This leads to oudated offsets in the extents tree and wrong blocks afterwards. Patch fixes the problem providing EXT4_EX_NOCACHE flag for each ext4_find_extents() call inside ext4_ext_shift_extents function. Fixes: 331573febb6a2 Signed-off-by: Roman Pen Signed-off-by: Theodore Ts'o Cc: Namjae Jeon Cc: Andreas Dilger Cc: stable@vger.kernel.org fs/ext4/extents.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2a9b8cba62c0741109c33a2be700ff3d7703a7c2 Author: Roman Pen Date: Sun Jan 8 20:59:35 2017 -0500 ext4: Include forgotten start block on fallocate insert range While doing 'insert range' start block should be also shifted right. The bug can be easily reproduced by the following test: ptr = malloc(4096); assert(ptr); fd = open("./ext4.file", O_CREAT | O_TRUNC | O_RDWR, 0600); assert(fd >= 0); rc = fallocate(fd, 0, 0, 8192); assert(rc == 0); for (i = 0; i < 2048; i++) *((unsigned short *)ptr + i) = 0xbeef; rc = pwrite(fd, ptr, 4096, 0); assert(rc == 4096); rc = pwrite(fd, ptr, 4096, 4096); assert(rc == 4096); for (block = 2; block < 1000; block++) { rc = fallocate(fd, FALLOC_FL_INSERT_RANGE, 4096, 4096); assert(rc == 0); for (i = 0; i < 2048; i++) *((unsigned short *)ptr + i) = block; rc = pwrite(fd, ptr, 4096, 4096); assert(rc == 4096); } Because start block is not included in the range the hole appears at the wrong offset (just after the desired offset) and the following pwrite() overwrites already existent block, keeping hole untouched. Simple way to verify wrong behaviour is to check zeroed blocks after the test: $ hexdump ./ext4.file | grep '0000 0000' The root cause of the bug is a wrong range (start, stop], where start should be inclusive, i.e. [start, stop]. This patch fixes the problem by including start into the range. But not to break left shift (range collapse) stop points to the beginning of the a block, not to the end. The other not obvious change is an iterator check on validness in a main loop. Because iterator is unsigned the following corner case should be considered with care: insert a block at 0 offset, when stop variables overflows and never becomes less than start, which is 0. To handle this special case iterator is set to NULL to indicate that end of the loop is reached. Fixes: 331573febb6a2 Signed-off-by: Roman Pen Signed-off-by: Theodore Ts'o Cc: Namjae Jeon Cc: Andreas Dilger Cc: stable@vger.kernel.org fs/ext4/extents.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 4289e60cb056ccae4311197d8a4a798aca0f8e55 Merge: 29b84f2 bc31c90 Author: David S. Miller Date: Sun Jan 8 20:59:03 2017 -0500 Merge branch 'tc-skb-diet' Willem de Bruijn says: ==================== convert tc_verd to integer bitfields The skb tc_verd field takes up two bytes but uses far fewer bits. Convert the remaining use cases to bitfields that fit in existing holes (depending on config options) and potentially save the two bytes in struct sk_buff. This patchset is based on an earlier set by Florian Westphal and its discussion (http://www.spinics.net/lists/netdev/msg329181.html). Patches 1 and 2 are low hanging fruit: removing the last traces of data that are no longer stored in tc_verd. Patches 3 and 4 convert tc_verd to individual bitfields (5 bits). Patch 5 reduces TC_AT to a single bitfield, as AT_STACK is not valid here (unlike in the case of TC_FROM). Patch 6 changes TC_FROM to two bitfields with clearly defined purpose. It may be possible to reduce storage further after this initial round. If tc_skip_classify is set only by IFB, testing skb_iif may suffice. The L2 header pushing/popping logic can perhaps be shared with AF_PACKET, which currently not pkt_type for the same purpose. Changes: RFC -> v1 - (patch 3): remove no longer needed label in tfc_action_exec - (patch 5): set tc_at_ingress at the same points as existing SET_TC_AT calls Tested ingress mirred + netem + ifb: ip link set dev ifb0 up tc qdisc add dev eth0 ingress tc filter add dev eth0 parent ffff: \ u32 match ip dport 8000 0xffff \ action mirred egress redirect dev ifb0 tc qdisc add dev ifb0 root netem delay 1000ms nc -u -l 8000 & ssh $otherhost nc -u $host 8000 Tested egress mirred: ip link add veth1 type veth peer name veth2 ip link set dev veth1 up ip link set dev veth2 up tcpdump -n -i veth2 udp and dst port 8000 & tc qdisc add dev eth0 root handle 1: prio tc filter add dev eth0 parent 1:0 \ u32 match ip dport 8000 0xffff \ action mirred egress redirect dev veth1 tc qdisc add dev veth1 root netem delay 1000ms nc -u $otherhost 8000 Tested ingress mirred: ip link add veth1 type veth peer name veth2 ip link add veth3 type veth peer name veth4 ip netns add ns0 ip netns add ns1 for i in 1 2 3 4; do \ NS=ns$((${i}%2)); \ ip link set dev veth${i} netns ${NS}; \ ip netns exec ${NS} \ ip addr add dev veth${i} 192.168.1.${i}/24; \ ip netns exec ${NS} \ ip link set dev veth${i} up; \ done ip netns exec ns0 tc qdisc add dev veth2 ingress ip netns exec ns0 \ tc filter add dev veth2 parent ffff: \ u32 match ip dport 8000 0xffff \ action mirred ingress redirect dev veth4 ip netns exec ns0 \ tcpdump -n -i veth4 udp and dst port 8000 & ip netns exec ns1 \ nc -u 192.168.1.2 8000 ==================== Signed-off-by: David S. Miller commit bc31c905e946b5c55df5d2938335e78ffb3157ca Author: Willem de Bruijn Date: Sat Jan 7 17:06:38 2017 -0500 net-tc: convert tc_from to tc_from_ingress and tc_redirected The tc_from field fulfills two roles. It encodes whether a packet was redirected by an act_mirred device and, if so, whether act_mirred was called on ingress or egress. Split it into separate fields. The information is needed by the special IFB loop, where packets are taken out of the normal path by act_mirred, forwarded to IFB, then reinjected at their original location (ingress or egress) by IFB. The IFB device cannot use skb->tc_at_ingress, because that may have been overwritten as the packet travels from act_mirred to ifb_xmit, when it passes through tc_classify on the IFB egress path. Cache this value in skb->tc_from_ingress. That field is valid only if a packet arriving at ifb_xmit came from act_mirred. Other packets can be crafted to reach ifb_xmit. These must be dropped. Set tc_redirected on redirection and drop all packets that do not have this bit set. Both fields are set only on cloned skbs in tc actions, so original packet sources do not have to clear the bit when reusing packets (notably, pktgen and octeon). Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/ifb.c | 13 +++++-------- include/linux/skbuff.h | 5 ++++- include/net/sch_generic.h | 2 +- include/uapi/linux/pkt_cls.h | 6 ------ net/sched/act_mirred.c | 6 ++++-- net/sched/sch_netem.c | 2 +- 6 files changed, 15 insertions(+), 19 deletions(-) commit 8dc07fdbf2054f157e8333f940a1ad728916c786 Author: Willem de Bruijn Date: Sat Jan 7 17:06:37 2017 -0500 net-tc: convert tc_at to tc_at_ingress Field tc_at is used only within tc actions to distinguish ingress from egress processing. A single bit is sufficient for this purpose. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/linux/skbuff.h | 3 ++- include/net/sch_generic.h | 3 +-- net/core/dev.c | 8 +++----- net/sched/act_mirred.c | 12 ++++++------ 4 files changed, 12 insertions(+), 14 deletions(-) commit a5135bcfba7345031df45e02cd150a45add47cf8 Author: Willem de Bruijn Date: Sat Jan 7 17:06:36 2017 -0500 net-tc: convert tc_verd to integer bitfields Extract the remaining two fields from tc_verd and remove the __u16 completely. TC_AT and TC_FROM are converted to equivalent two-bit integer fields tc_at and tc_from. Where possible, use existing helper skb_at_tc_ingress when reading tc_at. Introduce helper skb_reset_tc to clear fields. Not documenting tc_from and tc_at, because they will be replaced with single bit fields in follow-on patches. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/ifb.c | 7 +++---- drivers/staging/octeon/ethernet-tx.c | 5 ++--- include/linux/skbuff.h | 6 ++---- include/net/sch_generic.h | 10 +++++++++- include/uapi/linux/pkt_cls.h | 31 ------------------------------- net/core/dev.c | 10 ++++------ net/core/pktgen.c | 4 +--- net/core/skbuff.c | 3 --- net/sched/act_ife.c | 7 +++---- net/sched/act_mirred.c | 9 ++++----- net/sched/sch_netem.c | 2 +- 11 files changed, 29 insertions(+), 65 deletions(-) commit e7246e122aaa99ebbb8ad7da80f35a20577bd8af Author: Willem de Bruijn Date: Sat Jan 7 17:06:35 2017 -0500 net-tc: extract skip classify bit from tc_verd Packets sent by the IFB device skip subsequent tc classification. A single bit governs this state. Move it out of tc_verd in anticipation of removing that __u16 completely. The new bitfield tc_skip_classify temporarily uses one bit of a hole, until tc_verd is removed completely in a follow-up patch. Remove the bit hole comment. It could be 2, 3, 4 or 5 bits long. With that many options, little value in documenting it. Introduce a helper function to deduplicate the logic in the two sites that check this bit. The field tc_skip_classify is set only in IFB on skbs cloned in act_mirred, so original packet sources do not have to clear the bit when reusing packets (notably, pktgen and octeon). Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/ifb.c | 2 +- include/linux/skbuff.h | 5 ++++- include/net/sch_generic.h | 11 +++++++++++ include/uapi/linux/pkt_cls.h | 6 ------ net/core/dev.c | 10 +++------- net/sched/act_api.c | 11 ++++------- 6 files changed, 23 insertions(+), 22 deletions(-) commit d6264071ce7d100a2b7c1f295167796ab5178caf Author: Willem de Bruijn Date: Sat Jan 7 17:06:34 2017 -0500 net-tc: make MAX_RECLASSIFY_LOOP local This field is no longer kept in tc_verd. Remove it from the global definition of that struct. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 5 ----- net/sched/sch_api.c | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) commit aec745e2c520bf2d046684a284dac11c25d8e717 Author: Willem de Bruijn Date: Sat Jan 7 17:06:33 2017 -0500 net-tc: remove unused tc_verd fields Remove the last reference to tc_verd's munge and redirect ttl bits. These fields are no longer used. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 7 ------- 1 file changed, 7 deletions(-) commit 56735be05353b085a0862ca4c4943628df3420ca Merge: a121103 a5d431e Author: Theodore Ts'o Date: Sun Jan 8 20:57:35 2017 -0500 Merge branch 'fscrypt' into d commit 86d6cda68f371744a28003cb32b51aaf231b7ca5 Author: Chanwoo Choi Date: Sat Jan 7 05:17:36 2017 +0900 extcon: Modify the name of EXTCON_USB_HOST connector This patch renames the EXTCON_USB_HOST by using '-' char because the name of all external connector use the '-' char instead of '_' char. - "USB_HOST" -> "USB-HOST" Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c5f0e076833c407cca372c663d47499ae4dab45 Author: Chanwoo Choi Date: Mon Jan 2 13:03:03 2017 +0900 extcon: Add new EXTCON_CHG_USB_PD type for USB Power Delivery This patch adds the new EXTCON_CHG_USB_PD for USB PD (Power Delivery)[1]. The USB Power Delivery specification specifies that USB cable provides the increased power more than 7.5W to device with larger power demand. The EXTCON_CHG_USB_PD has the EXTCON_TYPE_CHG and EXTCON_TYPE_USB type. [1] https://en.wikipedia.org/wiki/USB#PD Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 1 + 2 files changed, 6 insertions(+) commit 62a37443e93bbae74410cb72aa9d7e15a1da0b98 Author: Baolin Wang Date: Tue Jan 3 13:50:54 2017 +0800 extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST charger connector. These names don't mean much and no guide to tell users how to use it, thus try to add documentation to make them clear. Suggested-by: NeilBrown Signed-off-by: Baolin Wang [cw00.choi: Use the 'connector' expression instead of 'cable'] Signed-off-by: Chanwoo Choi include/linux/extcon.h | 4 ++++ 1 file changed, 4 insertions(+) commit bcb7440e76a96c8a244bd683142a38f7d5cecb93 Author: Peter Chen Date: Wed Jan 4 15:19:51 2017 +0800 extcon: usb-gpio: Add pinctrl operation during system PM At some systems, the pinctrl setting will be lost or needs to set as "sleep" state to save power consumption. So, we need to configure pinctrl as "sleep" state when system enters suspend, and as "default" state after system resumes. In this way, the pinctrl value can be recovered as "default" state after resuming. Signed-off-by: Peter Chen Signed-off-by: Chanwoo Choi drivers/extcon/extcon-usb-gpio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e6cf046543763878614d51e8283abd40d5e5327e Author: Chanwoo Choi Date: Mon Dec 26 20:37:38 2016 +0900 extcon: Move defintion of struct extcon_dev to driver/extcon directory This patch moves the 'struct extcon_dev' of extcon subsystem to driver/extcon/extcon.h header file because the struct extcon_dev have to be handled by extcon API to guarantee the consistency of strcut extcon_dev. If external drivers are able to touch the struct extcon_dev directly, it might cause the critical and unknown problem. Signed-off-by: Chanwoo Choi drivers/extcon/devres.c | 2 +- drivers/extcon/extcon.c | 3 ++- drivers/extcon/extcon.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/extcon.h | 57 +-------------------------------------------- 4 files changed, 66 insertions(+), 58 deletions(-) commit 6e3a7e89ff1a13d6e09f63ce9eff4ad3fad7b544 Author: Chanwoo Choi Date: Mon Dec 26 20:47:13 2016 +0900 extcon: adc-jack: Use the internal data instead of using struct extcon_dev This patch uses the internal dev instance instead of using the field of struct extcon_dev because the core structure (extcon_dev) of extcon have to be touched by only extcon core driver. Signed-off-by: Chanwoo Choi drivers/extcon/extcon-adc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f556bdb9f2e3794722c0d9186db9799b35071c4 Author: David Cohen Date: Wed Dec 21 12:20:25 2016 +0100 extcon: int3496: Add Intel INT3496 ACPI device extcon driver Add an extcon driver for USB OTG ports controlled by an Intel INT3496 ACPI device (e.g. Baytrail, Cherrytrail devices). Signed-off-by: David Cohen [hdgoede@redhat.com: Port to current kernel, cleanup, submit upstream] [hdgoede@redhat.com: Add Documentation/extcon/intel-int3496.txt] Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi Documentation/extcon/intel-int3496.txt | 22 ++++ drivers/extcon/Kconfig | 10 ++ drivers/extcon/Makefile | 1 + drivers/extcon/extcon-intel-int3496.c | 179 +++++++++++++++++++++++++++++++++ 4 files changed, 212 insertions(+) commit 5298b8365832e13158e41e205a31a9505eef4c94 Author: Baolin Wang Date: Wed Dec 21 15:51:26 2016 +0900 extcon: axp288: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set According to the documentation, we should set the EXTCON_USB when one SDP charger connector was reported. Signed-off-by: Baolin Wang Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit db6228612ce297949621a62e9d2331ee55016778 Author: Baolin Wang Date: Wed Dec 21 14:10:47 2016 +0800 extcon: Add documentation for EXTCON_CHG_USB_* and EXTCON_USB_* Current there is both "EXTCON_USB" and "EXTCON_CHG_USB_SDP" which both seem to suggest a standard downstream port. But there is no documentation describing how these relate. Thus add documentation to describe EXTCON_CHG_USB_SDP should always appear together with EXTCON_USB, and EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST. Signed-off-by: Baolin Wang Signed-off-by: Chanwoo Choi include/linux/extcon.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 01b4c9a1ae07a25d208cad0da7dd288007a22984 Author: Chanwoo Choi Date: Mon Dec 19 21:02:33 2016 +0900 extcon: Remove potential problem when calling extcon_register_notifier() This patch removes the potential problem of extcon_register_notifier() when edev parameter is NULL. When edev is NULL, this function returns the first extcon device which includes the sepecific external connector of second paramter. But, it don't guarantee the same operation in all cases. To remove this confusion and potential problem, this patch fixes it. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit dd3a55fc688b835b25fc73a16f17a75b6059858d Author: Hans de Goede Date: Mon Dec 19 01:13:13 2016 +0100 extcon: axp288: Fix the module not auto-loading Add a MODULE_DEVICE_TABLE to fix the module not auto-loading. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 7 +++++++ 1 file changed, 7 insertions(+) commit be1749528ea847c4a969b499fad8c4f98c44fac1 Author: Hans de Goede Date: Mon Dec 19 01:13:12 2016 +0100 extcon: axp288: Remove unnecessary irq?_en register writes Setting the irq_enable bits is taken care of by the irq chip when we request the irqs and the driver should not be meddling with the irq?_en registers itself. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 5757aca10146061befd168dab37fb0db1ccd8f73 Author: Hans de Goede Date: Mon Dec 19 01:13:11 2016 +0100 extcon: axp288: Use vbus-valid instead of -present to determine cable presence The vbus-present bit in the power status register also gets set to 1 when a usb-host cable (id-pin shorted to ground) is plugged in and a 5v boost converter is supplying 5v to the otg usb bus. This causes a "disconnect or unknown or ID event" warning in dmesg as well as the extcon device to report the last detected charger cable type as being connected even though none is connected. This commit switches to checking the vbus-valid bit instead, which is only 1 when both vbus is present and the vbus-path is enabled in the vbus-path control register (the vbus-path gets disabled when a usb-host cable is detected, to avoid the pmic drawing power from the 5v boost converter). Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d2199ea340d158587b09e2ab95908c210fd4742 Author: Hans de Goede Date: Mon Dec 19 01:13:09 2016 +0100 extcon: axp288: Fix possibly reporting 2 cables in state true When the charger type changes from e.g. SDP to CDP, without Vbus being seen as low in between axp288_handle_chrg_det_event would set the state for the new cable type to true, without clearing the state of the previous cable type to false. This commit fixes this and also gets rid of the function local static cable variable, properly storing all drv state in the axp288_extcon_info struct. Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3fe1e0e2ab509863c1e9809a085508d8bce3e079 Author: Hans de Goede Date: Mon Dec 19 01:13:08 2016 +0100 extcon: axp288: Simplify axp288_handle_chrg_det_event axp288_handle_chrg_det_event only gets called on change interrupts (so not that often), extcon_set_state_sync() checks itself if there are any actual changes before notifying listeners, and gpiod_set_value is not really expensive either. So we can simply always do both on each interrupt removing a bunch of somewhat magic looking code from axp288_handle_chrg_det_event. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 1490d157e0759b12913cc0d3b734a03bbcb8cb61 Author: Hans de Goede Date: Mon Dec 19 01:13:07 2016 +0100 extcon: axp288: Remove usb_phy notification code The usb_phy based intel-usb-phy code never got merged into the mainline kernel, so the devm_usb_get_phy() call will always fail, blocking the driver from loading. Since new drivers should use the generic-phy framework, not the old-style usb_phy stuff, keeping this around is not useful. Therefor this patch removes the usb_phy notification bits, which together with the patch to remove the platform_data dependency, makes this driver actually successfully probe on systems with an axp288 pmic. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 12 ------------ 1 file changed, 12 deletions(-) commit 768842413997c3c946a716427b78cc308a4fdae0 Author: Hans de Goede Date: Mon Dec 19 01:13:06 2016 +0100 extcon: axp288: Remove dependency on non-existing platform_data When the extcon_axp288 driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However such another driver was never merged, so the extcon_axp288 as merged upstream has never worked, its probe method simply always returns -ENODEV. This commit drops the dependency on the pdata always being there, instead it treats not having pdata as the pdata having a NULL gpio_mux_control, something which the code was already prepared to handle. Note that the code for controlling the mux_control gpio is left in place, as this may be necessary to allow the axp288 pmic to properly detect the charger type (instead of assuming 500mA max charge current) on some tablets. This will make it easier for future patches to add support for this gpio by getting the gpio info from somewhere. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 9fe172b9be532acc23e35ba693700383ab775e66 Author: Roger Quadros Date: Thu Dec 8 10:45:31 2016 +0200 extcon: palmas: Check the parent instance to prevent the NULL extcon-palmas must be child of palmas and expects parent's drvdata to be valid. Check for non NULL parent drvdata and fail if it is NULL. Not doing so will result in a NULL pointer dereference later in the probe() parent drvdata is NULL (e.g. misplaced extcon-palmas node in device tree). Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 5 +++++ 1 file changed, 5 insertions(+) commit af57fa4de24654aa4b2ee648dcd14a3e31bce3a6 Author: Srikant Ritolia Date: Wed Dec 7 17:29:39 2016 +0530 extcon: Restructure multi-line comments to follow codingstyle Aligning all block comments in extcon subsystem as per linux coding style. Found using checkpatch.pl script. Signed-off-by: Srikant Ritolia Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max14577.c | 6 ++++-- drivers/extcon/extcon-max77693.c | 12 ++++++++---- drivers/extcon/extcon-max77843.c | 24 ++++++++++++++++-------- drivers/extcon/extcon-rt8973a.c | 6 ++++-- drivers/extcon/extcon-sm5502.c | 6 ++++-- 5 files changed, 36 insertions(+), 18 deletions(-) commit e7d9dd5ab15fa6d895929176592d6946bf329cf8 Author: Pan Bian Date: Sat Dec 3 16:56:49 2016 +0800 extcon: Return error code on failure Function get_zeroed_page() returns a NULL pointer if there is no enough memory. In function extcon_sync(), it returns 0 if the call to get_zeroed_page() fails. The return value 0 indicates success in the context, which is incosistent with the execution status. This patch fixes the bug by returning -ENOMEM. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188611 Signed-off-by: Pan Bian Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a522bf2d4f788306443d36b26b54f0aedcdfdbe Author: Peter Foley Date: Sun Nov 27 21:37:20 2016 -0500 extcon: adc-jack: Fix incompatible pointer type warning This patch fixes the incompatible warning of extcon-adc-jack.c driver when calling devm_extcon_dev_allocate(). Signed-off-by: Peter Foley [cw00.choi: Modify the patch title and descritpion] Signed-off-by: Chanwoo Choi include/linux/extcon/extcon-adc-jack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c467a106f4c93a05b359b6732bb2161d74a29ae Author: Charles Keepax Date: Fri Nov 25 13:44:36 2016 +0000 extcon: arizona: Simplify micd_pol_gpio handling Currently we handle both old style GPIO and new style GPIOD differently simplify this slightly by converting the old style GPIO to a GPIOD and just using that from then on. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 3806a271bf4be375f304e492148edb2507181158 Merge: a121103 9b8b75d Author: Dave Airlie Date: Mon Jan 9 09:55:57 2017 +1000 Merge tag 'drm-misc-next-2016-12-30' of git://anongit.freedesktop.org/git/drm-misc into drm-next First -misc pull for 4.11: - drm_mm rework + lots of selftests (Chris Wilson) - new connector_list locking+iterators - plenty of kerneldoc updates - format handling rework from Ville - atomic helper changes from Maarten for better plane corner-case handling in drivers, plus the i915 legacy cursor patch that needs this - bridge cleanup from Laurent - plus plenty of small stuff all over - also contains a merge of the 4.10 docs tree so that we could apply the dma-buf kerneldoc patches It's a lot more than usual, but due to the merge window blackout it also covers about 4 weeks, so all in line again on a per-week basis. The more annoying part with no pull request for 4 weeks is managing cross-tree work. The -intel pull request I'll follow up with does conflict quite a bit with -misc here. Longer-term (if drm-misc keeps growing) a drm-next-queued to accept pull request for the next merge window during this time might be useful. I'd also like to backmerge -rc2+this into drm-intel next week, we have quite a pile of patches waiting for the stuff in here. * tag 'drm-misc-next-2016-12-30' of git://anongit.freedesktop.org/git/drm-misc: (126 commits) drm: Add kerneldoc markup for new @scan parameters in drm_mm drm/mm: Document locking rules drm: Use drm_mm_insert_node_in_range_generic() for everyone drm: Apply range restriction after color adjustment when allocation drm: Wrap drm_mm_node.hole_follows drm: Apply tight eviction scanning to color_adjust drm: Simplify drm_mm scan-list manipulation drm: Optimise power-of-two alignments in drm_mm_scan_add_block() drm: Compute tight evictions for drm_mm_scan drm: Fix application of color vs range restriction when scanning drm_mm drm: Unconditionally do the range check in drm_mm_scan_add_block() drm: Rename prev_node to hole in drm_mm_scan_add_block() drm: Fix O= out-of-tree builds for selftests drm: Extract struct drm_mm_scan from struct drm_mm drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan() drm: Simplify drm_mm_clean() drm: Detect overflow in drm_mm_reserve_node() drm: Fix kerneldoc for drm_mm_scan_remove_block() drm: Promote drm_mm alignment to u64 drm: kselftest for drm_mm and restricted color eviction ... commit 29b84f20e2c59317db133d5dab96bbf500714227 Author: Florian Fainelli Date: Fri Jan 6 22:27:59 2017 -0800 mdio: Demote print from info to debug in mdio_device_register While it is useful to know which MDIO device is being registered, demote the dev_info() to a dev_dbg(). Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5944701df90d9577658e2354cc27c4ceaeca30fe Author: stephen hemminger Date: Fri Jan 6 19:12:53 2017 -0800 net: remove useless memset's in drivers get_stats64 In dev_get_stats() the statistic structure storage has already been zeroed. Therefore network drivers do not need to call memset() again. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 1 - drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- drivers/net/ethernet/intel/e1000e/netdev.c | 1 - 3 files changed, 4 deletions(-) commit bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221 Author: stephen hemminger Date: Fri Jan 6 19:12:52 2017 -0800 net: make ndo_get_stats64 a void function The network device operation for reading statistics is only called in one place, and it ignores the return value. Having a structure return value is potentially confusing because some future driver could incorrectly assume that the return value was used. Fix all drivers with ndo_get_stats64 to have a void function. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 10 ++++------ drivers/net/dummy.c | 5 ++--- drivers/net/ethernet/alacritech/slicoss.c | 6 ++---- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++++------ drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 6 ++---- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 +--- drivers/net/ethernet/atheros/alx/main.c | 6 ++---- drivers/net/ethernet/broadcom/b44.c | 5 ++--- drivers/net/ethernet/broadcom/bnx2.c | 5 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++---- drivers/net/ethernet/broadcom/tg3.c | 8 +++----- drivers/net/ethernet/brocade/bna/bnad.c | 6 ++---- drivers/net/ethernet/calxeda/xgmac.c | 5 ++--- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 ++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++---- drivers/net/ethernet/cisco/enic/enic_main.c | 8 +++----- drivers/net/ethernet/ec_bhf.c | 4 +--- drivers/net/ethernet/emulex/benet/be_main.c | 5 ++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 ++---- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 6 ++---- drivers/net/ethernet/ibm/ehea/ehea_main.c | 5 ++--- drivers/net/ethernet/intel/e1000e/e1000.h | 4 ++-- drivers/net/ethernet/intel/e1000e/netdev.c | 5 ++--- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 ++---- drivers/net/ethernet/intel/i40e/i40e.h | 5 ++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ++++++------------ drivers/net/ethernet/intel/igb/igb_main.c | 10 ++++------ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++++--- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 ++---- drivers/net/ethernet/marvell/mvneta.c | 4 +--- drivers/net/ethernet/marvell/mvpp2.c | 4 +--- drivers/net/ethernet/marvell/sky2.c | 6 ++---- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++---- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 +--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +--- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 3 +-- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 9 ++++----- drivers/net/ethernet/neterion/vxge/vxge-main.c | 4 +--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 ++---- drivers/net/ethernet/nvidia/forcedeth.c | 4 +--- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 10 ++++------ drivers/net/ethernet/qlogic/qede/qede_main.c | 7 ++----- drivers/net/ethernet/qualcomm/emac/emac.c | 6 ++---- drivers/net/ethernet/realtek/8139too.c | 9 +++------ drivers/net/ethernet/realtek/r8169.c | 4 +--- drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 8 ++------ drivers/net/ethernet/sfc/efx.c | 6 ++---- drivers/net/ethernet/sfc/falcon/efx.c | 6 ++---- drivers/net/ethernet/sun/niu.c | 6 ++---- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 4 +--- drivers/net/ethernet/tile/tilepro.c | 4 ++-- drivers/net/ethernet/via/via-rhine.c | 8 +++----- drivers/net/fjes/fjes_main.c | 7 ++----- drivers/net/hyperv/netvsc_drv.c | 6 ++---- drivers/net/ifb.c | 6 ++---- drivers/net/ipvlan/ipvlan_main.c | 5 ++--- drivers/net/loopback.c | 5 ++--- drivers/net/macsec.c | 8 +++----- drivers/net/macvlan.c | 5 ++--- drivers/net/nlmon.c | 4 +--- drivers/net/ppp/ppp_generic.c | 4 +--- drivers/net/slip/slip.c | 3 +-- drivers/net/team/team.c | 3 +-- drivers/net/tun.c | 3 +-- drivers/net/veth.c | 6 ++---- drivers/net/virtio_net.c | 6 ++---- drivers/net/vmxnet3/vmxnet3_ethtool.c | 4 +--- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- drivers/net/vrf.c | 5 ++--- drivers/net/xen-netfront.c | 6 ++---- drivers/staging/netlogic/xlr_net.c | 10 +--------- include/linux/netdevice.h | 8 ++++---- include/net/ip_tunnels.h | 4 ++-- net/8021q/vlan_dev.c | 5 ++--- net/bridge/br_device.c | 6 ++---- net/ipv4/ip_tunnel_core.c | 6 ++---- net/l2tp/l2tp_eth.c | 6 ++---- net/mac80211/iface.c | 4 +--- net/openvswitch/vport-internal_dev.c | 4 +--- net/sched/sch_teql.c | 5 ++--- 82 files changed, 166 insertions(+), 309 deletions(-) commit 63c64de7be1f762b8c6c224f2994cf5769b542ae Merge: dc33da5 0035ddf Author: David S. Miller Date: Sun Jan 8 17:19:48 2017 -0500 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2017-01-08 This series contains updates to fm10k only. Ngai-Mint changes the driver to use the MAC pointer in the fm10k_mac_info structure for fm10k_get_host_state_generic(). Fixed a race condition where the mailbox interrupt request bits can be cleared before being handled causing certain mailbox messages from the PF to be untreated and the PF will enter in some inactive state. Jake removes the typecast of u8 to char, and the extra variable that was created for the typecast. Bumps the driver version. Added back the receive descriptor timestamp value so that applications built on top of the IES API can function properly. Cleaned up the debug statistics flag, since debug statistics were removed and the flag was missed in the removal. Scott limits the DMA sync for CPU to the actual length of the packet, instead of the entire buffer, since the DMA sync occurs every time a packet is received. ==================== Signed-off-by: David S. Miller commit dc33da59ff887985db559d0b116ca8b98f63651e Author: David Ahern Date: Fri Jan 6 17:39:58 2017 -0800 net: ipv4: Remove flow arg from ip_mkroute_input fl4 arg is not used; remove it. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9f09eaeae28a0c67b8fc2b5acb411a5d4fd8cc80 Author: David Ahern Date: Fri Jan 6 17:39:06 2017 -0800 net: ipmr: Remove nowait arg to ipmr_get_route ipmr_get_route has 1 caller and the nowait arg is 0. Remove the arg and simplify ipmr_get_route accordingly. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/mroute.h | 2 +- net/ipv4/ipmr.c | 7 +------ net/ipv4/route.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) commit 60889869147e3dcd62032005a85eb7693bf828d8 Author: Derek Chickles Date: Fri Jan 6 17:16:12 2017 -0800 liquidio: simplify octeon_flush_iq() Because every call to octeon_flush_iq() has a hardcoded 1 for the pending_thresh argument, simplify that function by removing that argument. This avoids one atomic read as well. Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 +- .../net/ethernet/cavium/liquidio/request_manager.c | 49 +++++++++++----------- 4 files changed, 27 insertions(+), 28 deletions(-) commit 0035ddf4399ca9a86c593a25fcf1bcd09b042f10 Author: Jacob Keller Date: Fri Nov 18 09:45:39 2016 -0800 fm10k: remove FM10K_FLAG_DEBUG_STATS The debug statistics were removed due to complications with the ethtool statistics API which are not possible to resolve without a new statistics interface. The flag was left behind, but we no longer need it. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 1 - 1 file changed, 1 deletion(-) commit b5db29f08afc063b49178b23c9e221434000e9ba Author: Jacob Keller Date: Fri Nov 18 09:45:38 2016 -0800 fm10k: report the receive timestamp in FM10K_CB(skb)->tstamp This was accidentally removed when we defeatured the full 1588 Clock support. We need to report the Rx descriptor timestamp value so that applications built on top of the IES API can function properly. Additionally, remove the FM10K_FLAG_RX_TS_ENABLED, as it is not used now that 1588 functionality has been removed. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 5 ++--- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) commit 881571c12fed1bacf100b13fb2ac528faf57390c Author: Scott Peterson Date: Thu Nov 3 16:09:41 2016 -0700 fm10k: Limit dma sync of RX buffers to actual packet size On packet RX, we perform a dma sync for cpu before passing the packet up. Here we limit that sync to the actual length of the incoming packet, rather than always syncing the entire buffer. Signed-off-by: Scott Peterson Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6721f2dad51164fe9da7b3c2f8156529d716b888 Author: Jacob Keller Date: Thu Nov 3 16:05:47 2016 -0700 fm10k: bump version number Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0524955177c3e5cea89ceec56ad9d538530fe4f Author: Ngai-Mint Kwan Date: Wed Nov 2 16:44:47 2016 -0700 fm10k: do not clear global mailbox interrupt bits Partially revert commit 5e93cbadd3e9 ("fm10k: Reset mailbox global interrupts", 2016-06-07) The register bits related to this commit are now solely being handled by the IES API. Recent changes in the IES API will allow an automatic recovery from improper handling of these bits. Signed-off-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 4 ---- 1 file changed, 4 deletions(-) commit 2f3fc1e6200309ccf87f61dea56e57e563c4f800 Author: Ngai-Mint Kwan Date: Wed Nov 2 16:44:46 2016 -0700 fm10k: request reset when mbx->state changes Multiple IES API resets can cause a race condition where the mailbox interrupt request bits can be cleared before being handled. This can leave certain mailbox messages from the PF to be untreated and the PF will enter in some inactive state. If this situation occurs, the IES API will initiate a mailbox version reset which, then, trigger a mailbox state change. Once this mailbox transition occurs (from OPEN to CONNECT state), a request for reset will be returned. This ensures that PF will undergo a reset whenever IES API encounters an unknown global mailbox interrupt event or whenever the IES API terminates. Signed-off-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 10 +++++++--- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) commit aee243334461f83f3cb2e8c19e9a6cdedd35ee4b Author: Jacob Keller Date: Wed Nov 2 16:44:45 2016 -0700 fm10k: remove extraneous variable definition in fm10k_ethtool.c We don't need to typecast a u8 * into a char *, so just remove the extra variable. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 50bfaee50c005b707e9eee2ffb0bbb69b8efbf53 Author: Ngai-Mint Kwan Date: Wed Nov 2 16:44:44 2016 -0700 fm10k-shared: use mac-> instead of hw->mac. Since a pointer "mac" to fm10k_mac_info structure exists, use it to access the contents of its members. Signed-off-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6d51b68611e98f05042ada662aed5dbe3279c1e Author: Eli Cohen Date: Tue Jan 3 23:55:23 2017 +0200 net/mlx5: Introduce blue flame register allocator Here is an implementation of an allocator that allocates blue flame registers. A blue flame register is used for generating send doorbells. A blue flame register can be used to generate either a regular doorbell or a blue flame doorbell where the data to be sent is written to the device's I/O memory hence saving the need to read the data from memory. For blue flame kind of doorbells to succeed, the blue flame register need to be mapped as write combining. The user can specify what kind of send doorbells she wishes to use. If she requested write combining mapping but that failed, the allocator will fall back to non write combining mapping and will indicate that to the user. Subsequent patches in this series will make use of this allocator. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/uar.c | 235 ++++++++++++++++++++++++++ include/linux/mlx5/device.h | 2 + include/linux/mlx5/driver.h | 37 ++++ include/linux/mlx5/mlx5_ifc.h | 7 +- 4 files changed, 279 insertions(+), 2 deletions(-) commit 0b80c14f009758cefeed0edff4f9141957964211 Author: Eli Cohen Date: Tue Jan 3 23:55:22 2017 +0200 IB/mlx5: Fix retrieval of index to first hi class bfreg First the function retrieving the index of the first hi latency class blue flame register. High latency class bfregs are located right above medium latency class bfregs. Fixes: c1be5232d21d ('IB/mlx5: Fix micro UAR allocator') Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/qp.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 2f5ff26478adaff5ed9b7ad4079d6a710b5f27e7 Author: Eli Cohen Date: Tue Jan 3 23:55:21 2017 +0200 mlx5: Fix naming convention with respect to UARs This establishes a solid naming conventions for UARs. A UAR (User Access Region) can have size identical to a system page or can be fixed 4KB depending on a value queried by firmware. Each UAR always has 4 blue flame register which are used to post doorbell to send queue. In addition, a UAR has section used for posting doorbells to CQs or EQs. In this patch we change names to reflect this conventions. Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/cq.c | 6 +- drivers/infiniband/hw/mlx5/main.c | 80 +++++------ drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +- drivers/infiniband/hw/mlx5/qp.c | 176 ++++++++++++------------- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 90 ++++++------- include/linux/mlx5/device.h | 9 +- include/linux/mlx5/driver.h | 14 +- include/uapi/rdma/mlx5-abi.h | 12 +- 10 files changed, 206 insertions(+), 203 deletions(-) commit f4044dac63e952ac1137b6df02b233d37696e2f5 Author: Eli Cohen Date: Tue Jan 3 23:55:20 2017 +0200 IB/mlx5: Fix error handling order in create_kernel_qp Make sure order of cleanup is exactly the opposite of initialization. Fixes: 9603b61de1ee ('mlx5: Move pci device handling from mlx5_ib to mlx5_core') Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de8d6e02efbdb259c67832ccf027d7ace9b91d5d Author: Eli Cohen Date: Tue Jan 3 23:55:19 2017 +0200 IB/mlx5: Fix kernel to user leak prevention logic The logic was broken as it failed to update the response length for architectures with PAGE_SIZE larger than 4kB. As a result further extension of the ucontext response struct would fail. Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to user-space') Signed-off-by: Eli Cohen Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a5d431eff2e0bb22156897435aa277ddc96074f7 Author: Eric Biggers Date: Thu Jan 5 13:51:18 2017 -0800 fscrypt: make fscrypt_operations.key_prefix a string There was an unnecessary amount of complexity around requesting the filesystem-specific key prefix. It was unclear why; perhaps it was envisioned that different instances of the same filesystem type could use different key prefixes, or that key prefixes could be binary. However, neither of those things were implemented or really make sense at all. So simplify the code by making key_prefix a const char *. Signed-off-by: Eric Biggers Reviewed-by: Richard Weinberger Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 31 +++++++++++-------------------- fs/ext4/ext4.h | 11 ----------- fs/ext4/super.c | 13 +------------ fs/f2fs/f2fs.h | 9 --------- fs/f2fs/super.c | 14 +------------- fs/ubifs/crypto.c | 11 +---------- include/linux/fscrypto.h | 2 +- 7 files changed, 15 insertions(+), 76 deletions(-) commit f099d616dd689d27b08dec95d0b6f1f302cf8ec4 Author: Eric Biggers Date: Thu Jan 5 12:01:30 2017 -0800 fscrypt: remove unused 'mode' member of fscrypt_ctx Nothing reads or writes fscrypt_ctx.mode, and it doesn't belong there because a fscrypt_ctx is not tied to a specific encryption mode. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o include/linux/fscrypto.h | 1 - 1 file changed, 1 deletion(-) commit 173b8439e1ba362007315868928bf9d26e5cc5a6 Author: Theodore Ts'o Date: Wed Dec 28 00:22:52 2016 -0500 ext4: don't allow encrypted operations without keys While we allow deletes without the key, the following should not be permitted: # cd /vdc/encrypted-dir-without-key # ls -l total 4 -rw-r--r-- 1 root root 0 Dec 27 22:35 6,LKNRJsp209FbXoSvJWzB -rw-r--r-- 1 root root 286 Dec 27 22:35 uRJ5vJh9gE7vcomYMqTAyD # mv uRJ5vJh9gE7vcomYMqTAyD 6,LKNRJsp209FbXoSvJWzB Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 111427f6eb5a5d9ce22f8a90780ac1c18113091a Author: Vivien Didelot Date: Fri Jan 6 16:42:00 2017 -0500 net: dsa: move HWMON support to its own file Isolate the HWMON support in DSA in its own file. Currently only the legacy DSA code is concerned. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/Makefile | 1 + net/dsa/dsa.c | 131 +---------------------------------------------- net/dsa/dsa_priv.h | 9 ++++ net/dsa/hwmon.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 159 insertions(+), 129 deletions(-) commit 82e4869da38069232b62013b2f77c9d73fc97147 Merge: b14ad90 b361da8 Author: David S. Miller Date: Sat Jan 7 21:03:51 2017 -0500 Merge branch 'netcp-next' Murali Karicheri says: ==================== netcp: enhancements and minor fixes This series is for net-next. This propagates enhancements and minor bug fixes from internal version of the driver to keep the upstream in sync. Please review and apply if this looks good. Tested on all of K2HK/E/L boards with nfs rootfs. Test logs below K2HK-EVM: http://pastebin.ubuntu.com/23754106/ k2L-EVM: http://pastebin.ubuntu.com/23754143/ K2E-EVM: http://pastebin.ubuntu.com/23754159/ History: v1 - dropped 1/10 amd 2/10 of v0 based on comments from Rob as it needs more work before submission v0 - Initial version ==================== Signed-off-by: David S. Miller commit b361da837392e7fc13189f223b12385de728be12 Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:46 2017 -0500 net: netcp: ale: add proper ale entry mask bits for netcp switch ALE For NetCP NU Switch ALE, some of the mask bits are different than defaults used in the driver. Add a new macro DEFINE_ALE_FIELD1 that use a configurable mask bits and use it in the driver. These bits are set to correct values by using the new variables added to cpsw_ale structure and re-used in the macros. The parameter nu_switch_ale is configured by the caller driver to indicate the ALE is for that switch and is used in the ALE driver to do customization as needed. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ale.c | 99 ++++++++++++++++++++++++++++++-------- drivers/net/ethernet/ti/cpsw_ale.h | 4 ++ 2 files changed, 84 insertions(+), 19 deletions(-) commit 7938a0d75fd64ce419b1cdf16aa182fa0fd1acd6 Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:45 2017 -0500 net: netcp: ale: use ale_status to size the ale table ALE h/w on newer version of NetCP (K2E/L/G) does provide a ALE_STATUS register for the size of the ALE Table implemented in h/w. Currently for example we set ALE Table size to 1024 for NetCP ALE on K2E even though the ALE Status/Documentation shows it has 8192 entries. So take advantage of this register to read the size of ALE table supported and use that value in the driver for the newer version of NetCP ALE. For NetCP lite, ALE Table size is much less (64) and indicated by a size of zero in ALE_STATUS. So use that as a default for now. While at it, also fix the ale table size on 10G switch to 2048 per User guide http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ale.c | 31 ++++++++++++++++++++++++++++++- drivers/net/ethernet/ti/netcp_ethss.c | 4 +--- 2 files changed, 31 insertions(+), 4 deletions(-) commit ca47130a744b47495cfaa0f29f3f8d4c85079cba Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:44 2017 -0500 net: netcp: ale: update to support unknown vlan controls for NU switch In NU Ethernet switch used on some of the Keystone SoCs, there is separate UNKNOWNVLAN register for membership, unreg mcast flood, reg mcast flood and force untag egress bits in ALE. So control for these fields require different address offset, shift and size of field. As this ALE has the same version number as ALE in CPSW found on other SoCs, customization based on version number is not possible. So use a configuration parameter, nu_switch_ale, to identify the ALE ALE found in NU Switch. Different treatment is needed for NU Switch ALE due to difference in the ale table bits, separate unknown vlan registers etc. The register information available in ale_controls, needs to be updated to support the netcp NU switch h/w. So it is not constant array any more since it needs to be updated based on ALE type. The header of the file is also updated to indicate it supports N port switch ALE, not just 3 port. The version mask is 3 bits in NU Switch ALE vs 8 bits on other ALE types. While at it, change the debug print to info print so that ALE version gets displayed in boot log. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ale.c | 50 +++++++++++++++++++++++++++++++---- drivers/net/ethernet/ti/cpsw_ale.h | 13 ++++++++- drivers/net/ethernet/ti/netcp_ethss.c | 5 +++- 3 files changed, 61 insertions(+), 7 deletions(-) commit 4cd85a61d2185a79389cd5e52c02223db9062559 Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:43 2017 -0500 net: netcp: use hw capability to remove FCS word from rx packets Some of the newer Ethernet switch hw (such as that on k2e/l/g) can strip the Etherenet FCS from packet at the port 0 egress of the switch. So use this capability instead of doing it in software. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp.h | 2 ++ drivers/net/ethernet/ti/netcp_core.c | 8 ++++++-- drivers/net/ethernet/ti/netcp_ethss.c | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) commit 0cead3a6a1abd1f1656e302d876e985aadf8d8d2 Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:42 2017 -0500 net: netcp: ethss: get phy-handle only if link interface is MAC-to-PHY Currently to parse phy-handle, driver doesn't check if the interface is MAC to PHY. This patch add this check for all MAC to PHY interface types supported by the driver. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6a8162e99ef344fcffe14c9a4d1061493c4a81a4 Author: Michael Scherban Date: Fri Jan 6 15:37:41 2017 -0500 net: netcp: store network statistics in 64 bits Previously the network statistics were stored in 32 bit variable which can cause some stats to roll over after several minutes of high traffic. This implements 64 bit storage so larger numbers can be stored. Signed-off-by: Michael Scherban Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp.h | 18 ++++++++++ drivers/net/ethernet/ti/netcp_core.c | 68 +++++++++++++++++++++++++++++------- 2 files changed, 74 insertions(+), 12 deletions(-) commit aa255101f7e92b621736856386f87f7b418874a6 Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:40 2017 -0500 net: netcp: remove the redundant memmov() The psdata is populated with command data by netcp modules to the tail of the buffer and set_words() copy the same to the front of the psdata. So remove the redundant memmov function call. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69d707d034b6078f0b5998f80e5883c8243b205c Author: Karicheri, Muralidharan Date: Fri Jan 6 15:37:39 2017 -0500 net: netcp: extract eflag from desc for rx_hook handling Extract the eflag bits from the received desc and pass it down the rx_hook chain to be available for netcp modules. Also the psdata and epib data has to be inspected by the netcp modules. So the desc can be freed only after returning from the rx_hook. So move knav_pool_desc_put() after the rx_hook processing. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp.h | 1 + drivers/net/ethernet/ti/netcp_core.c | 20 +++++++++++++++++--- include/linux/soc/ti/knav_dma.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) commit b14ad90c9926d841b0478107ae25fa9fb46936d2 Merge: 350a471 c40d888 Author: David S. Miller Date: Sat Jan 7 20:48:16 2017 -0500 Merge branch 'cpsw-cpdma-DDR' Grygorii Strashko says: ==================== net: ethernet: ti: cpsw: support placing CPDMA descriptors into DDR This series intended to add support for placing CPDMA descriptors into DDR by introducing new module parameter "descs_pool_size" to specify size of descriptor's pool. The "descs_pool_size" defines total number of CPDMA CPPI descriptors to be used for both ingress/egress packets processing. If not specified - the default value 256 will be used which will allow to place descriptor's pool into the internal CPPI RAM. In addition, added ability to re-split CPDMA pool of descriptors between RX and TX path via ethtool '-G' command wich will allow to configure and fix number of descriptors used by RX and TX path, which, then, will be split between RX/TX channels proportionally depending on number of RX/TX channels and its weight. This allows significantly to reduce UDP packets drop rate for bandwidth >301 Mbits/sec (am57x). Before enabling this feature, the am437x SoC has to be fixed as it's proved that it's not working when CPDMA descriptors placed in DDR. So, the patch 1 fixes this issue. ==================== Signed-off-by: David S. Miller commit c40d8883a28ece32d753d96e77f05e5e9a7c4415 Author: Grygorii Strashko Date: Fri Jan 6 14:07:35 2017 -0600 Documentation: DT: net: cpsw: remove no_bd_ram property Even if no_bd_ram property is described in TI CPSW bindings the support for it has never been introduced in CPSW driver, so there are no real users of it. Hence, remove no_bd_ram property from documentation and DT files. Cc: 'Rob Herring ' Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/cpsw.txt | 3 --- arch/arm/boot/dts/am33xx.dtsi | 1 - arch/arm/boot/dts/am4372.dtsi | 1 - arch/arm/boot/dts/dm814x.dtsi | 1 - arch/arm/boot/dts/dra7.dtsi | 1 - 5 files changed, 7 deletions(-) commit be034fc14015c7fcabe62317d156e98b508a759b Author: Grygorii Strashko Date: Fri Jan 6 14:07:34 2017 -0600 net: ethernet: ti: cpsw: add support for ringparam configuration The CPDMA uses one pool of descriptors for both RX and TX which by default split between all channels proportionally depending on total number of CPDMA channels and number of TX and RX channels. As result, more descriptors will be consumed by TX path if there are more TX channels and there is no way now to dedicate more descriptors for RX path. So, add the ability to re-split CPDMA pool of descriptors between RX and TX path via ethtool '-G' command wich will allow to configure and fix number of descriptors used by RX and TX path, which, then, will be split between RX/TX channels proportionally depending on RX/TX channels number and weight. ethtool '-G' command will accept only number of RX entries and rest of descriptors will be arranged for TX automatically. Command: ethtool -G rx defaults and limitations: - minimum number of rx descriptors is 10% of total number of descriptors in CPDMA pool - maximum number of rx descriptors is 90% of total number of descriptors in CPDMA pool - by default, descriptors will be split equally between RX/TX path - any values passed in "tx" parameter will be ignored Usage: # ethtool -g eth0 Pre-set maximums: RX: 7372 RX Mini: 0 RX Jumbo: 0 TX: 0 Current hardware settings: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 # ethtool -G eth0 rx 7372 # ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 7372 RX Mini: 0 RX Jumbo: 0 TX: 0 Current hardware settings: RX: 7372 RX Mini: 0 RX Jumbo: 0 TX: 820 Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 86 +++++++++++++++++++++++++++++++++ drivers/net/ethernet/ti/davinci_cpdma.c | 40 ++++++++++++--- drivers/net/ethernet/ti/davinci_cpdma.h | 4 ++ 3 files changed, 122 insertions(+), 8 deletions(-) commit 90225bf0ba35ab43d1e9825c22f3810826c8bfe8 Author: Grygorii Strashko Date: Fri Jan 6 14:07:33 2017 -0600 net: ethernet: ti: cpsw: add support for descs pool size configuration The CPSW CPDMA can process buffer descriptors placed as in internal CPPI RAM as in DDR. This patch adds support in CPSW and CPDMA for descs_pool_size mudule parameter, which defines total number of CPDMA CPPI descriptors to be used for both ingress/egress packets processing: - memory size, required for CPDMA descriptor pool, is calculated basing on number of descriptors specified by user in descs_pool_size and CPDMA descriptor size and allocated from coherent memory (CMA area); - CPDMA descriptor pool will be allocated in DDR if pool memory size > internal CPPI RAM or use internal CPPI RAM otherwise; - if descs_pool_size not specified in DT - the default value 256 will be used which will allow to place CPDMA descriptors pool into the internal CPPI RAM (current default behaviour); - CPDMA will ignore descs_pool_size if descs_pool_size = 0 for backward comaptiobility with davinci_emac. descs_pool_size is boot time setting and can't be changed once CPSW/CPDMA is initialized. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 12 +++++++++--- drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++++++++++++ drivers/net/ethernet/ti/davinci_cpdma.h | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) commit 7f3b490aaacd789ebc0e26e47b7706547afd0438 Author: Grygorii Strashko Date: Fri Jan 6 14:07:32 2017 -0600 net: ethernet: ti: cpdma: use devm_ioremap Use devm_ioremap() and simplify the code. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5fcc40a90064822d31328ced3e3e69bc7d6cfe27 Author: Grygorii Strashko Date: Fri Jan 6 14:07:31 2017 -0600 net: ethernet: ti: cpdma: minimize number of parameters in cpdma_desc_pool_create/destroy() Update cpdma_desc_pool_create/destroy() to accept only one parameter struct cpdma_ctlr*, as this structure contains all required information for pool creation/destruction. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 62 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 32 deletions(-) commit 12a303e3b8136a89f0864a577a69f6a40b65fbe5 Author: Grygorii Strashko Date: Fri Jan 6 14:07:30 2017 -0600 net: ethernet: ti: cpdma: fix desc re-queuing The currently processing cpdma descriptor with EOQ flag set may contain two values in Next Descriptor Pointer field: - valid pointer: means CPDMA missed addition of new desc in queue; - null: no more descriptors in queue. In the later case, it's not required to write to HDP register, but now CPDMA does it. Hence, add additional check for Next Descriptor Pointer != null in cpdma_chan_process() function before writing in HDP register. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6c83ccf3c534214e0aeb167a70391864da9b1fc Author: Grygorii Strashko Date: Fri Jan 6 14:07:29 2017 -0600 net: ethernet: ti: cpdma: am437x: allow descs to be plased in ddr It's observed that cpsw/cpdma is not working properly when CPPI descriptors are placed in DDR instead of internal CPPI RAM on am437x SoC: - rx/tx silently stops processing packets; - or - after boot it's working for sometime, but stuck once Network load is increased (ping is working, but iperf is not). (The same issue has not been reproduced on am335x and am57xx). It seems that write to HDP register processed faster by interconnect than writing of descriptor memory buffer in DDR, which is probably caused by store buffer / write buffer differences as these functions are implemented differently across devices. So, to fix this i come up with two minimal, required changes: 1) all accesses to the channel register HDP/CP/RXFREE registers should be done using sync IO accessors readl()/writel(), because all previous memory writes writes have to be completed before starting channel (write to HDP) or completing desc processing. 2) the change 1 only doesn't work on am437x and additional reading of desc's field is required right after the new descriptor was filled with data and before pointer on it will be stored in prev_desc->hw_next field or HDP register. In addition, to above changes this patch eliminates all relaxed ordering I/O accessors in this driver as suggested by David Miller to avoid such kind of issues in the future, but with one exception - relaxed IO accessors will still be used to fill desc in cpdma_chan_submit(), which is safe as there is read barrier at the end of write sequence, and because sync IO accessors usage here will affect on net performance. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) commit 94b00aee437d83968b46addd75f28d073a38eac2 Author: Suman Anna Date: Sat Jan 7 12:34:32 2017 -0800 ARM: configs: keystone: Enable Generic on-chip SRAM driver All the Keystone 2 SoCs have an on-chip RAM called the MultiCore Shared Memory (MSM) RAM managed by the Multicore Shared Memory Controller (MSMC) that provides faster access compared to normal DDR. This patch enables the Generic on-chip SRAM driver that manages this memory in software. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/configs/keystone_defconfig | 1 + 1 file changed, 1 insertion(+) commit b3511c9e525b328effe519ce9e915b80a43eca7d Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2g: Reserve MSM RAM for boot monitor The Keystone 2 boot monitor uses 32 KB of the MSM RAM @ 0x0c0f7000 on 66AK2G SoCs, so add a reserved child node for the same. This address is aligned to the values used within the latest boot monitor firmware [1] as of commit cf8b431e8b3b ("soc: Move load address to end of MSMC"). [1] git://git.ti.com/processor-firmware/ks2-boot-monitor.git Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 88bd8224917340127545e504a4d4744636222326 Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2e: Reserve MSM RAM for boot monitor The Keystone 2 boot monitor uses 32 KB of the MSM RAM @ 0x0c1f0000 on 66AK2E SoCs, so add a reserved child node for the same. This address is aligned to the values used within the latest boot monitor firmware [1] as of commit cf8b431e8b3b ("soc: Move load address to end of MSMC"). [1] git://git.ti.com/processor-firmware/ks2-boot-monitor.git Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 82d76b6a203c2b36629969d177d456104f5d3451 Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2l: Reserve MSM RAM for boot monitor The Keystone 2 boot monitor uses 32 KB of the MSM RAM @ 0x0c1f8000 on 66AK2L SoCs, so add a reserved child node for the same. This address is aligned to the values used within the latest boot monitor firmware [1] as of commit cf8b431e8b3b ("soc: Move load address to end of MSMC"). [1] git://git.ti.com/processor-firmware/ks2-boot-monitor.git Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2l.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 2e54ecb66229cb91861be236ce58eff823f4bdd1 Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2hk: Reserve MSM RAM for boot monitor The Keystone 2 boot monitor uses 32 KB of the MSM RAM @ 0x0c5f0000 on 66AK2H SoCs, so add a reserved child node for the same. This address is aligned to the values used within the latest boot monitor firmware [1] as of commit cf8b431e8b3b ("soc: Move load address to end of MSMC"). [1] git://git.ti.com/processor-firmware/ks2-boot-monitor.git Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2hk.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit b6f922ab524fb4b2cfedd5c426bf007106cb4c76 Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2g: Add MSM RAM node Add the RAM managed by the Multicore Shared Memory Controller (MSMC) as a mmio-sram node. The 66AK2G SoCs have 1 MB of such memory. Any specific MSM memory range needed by a software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 75eaf87241521c1c94a3ffb150459332d0e924ae Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2e: Add MSM RAM node Add the RAM managed by the Multicire Shared Memory Controller (MSMC) as a mmio-sram node. The 66AK2E SoCs have 2 MB of such memory. Any specific MSM memory range needed by a software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit d29db5a159d50762fb71504262985f75353f48f6 Author: Suman Anna Date: Sat Jan 7 12:33:08 2017 -0800 ARM: dts: keystone-k2l: Add MSM RAM node Add the RAM managed by the Multicore Shared Memory Controller (MSMC) as a mmio-sram node. The 66AK2L SoCs have 2 MB of such memory. Any specific MSM memory range needed by a software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2l.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit b4d15ba8e7d23b9bfd859f414977d081ef0eed68 Author: Suman Anna Date: Sat Jan 7 12:33:07 2017 -0800 ARM: dts: keystone-k2hk: Add MSM RAM node Add the RAM managed by the Multicore Shared Memory Controller (MSMC) as a mmio-sram node. The 66AK2H SoCs have 6 MB of such memory. Any specific MSM memory range needed by a software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2hk.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 17be2a2905a6ec9aa27cd59521495e2f490d2af0 Author: Eva Rachel Retuya Date: Sat Jan 7 19:10:23 2017 +0800 staging: iio: ad7606: replace range/range_available with corresponding scale Eliminate the non-standard attributes in_voltage_range and in_voltage_range_available. Implement in_voltage_scale_available in place of these attributes and update the SCALE accordingly. The array scale_avail is introduced to hold the available scale values. Signed-off-by: Eva Rachel Retuya Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7606.c | 79 ++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 40 deletions(-) commit 04e917305d6a82a18c73047adfe2273718013ee8 Author: rishabh hardas Date: Sat Jan 7 16:21:36 2017 +0530 iio:trigger: Fix coding style in iio-trig-bfin-timer.c by aligning parameters with opening bracket. Fixes a warning flagged by checkpatch.pl Signed-off-by: rishabh hardas Signed-off-by: Jonathan Cameron drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b9cefd00faa9e533059ec92ea3b1b4a00f3596d Author: Emil Gedda Date: Thu Jan 5 19:49:38 2017 +0100 staging: gdm724x: cleanup long lines to conform to kernel coding style Refactor code to remove multi-line derefs and code duplication Signed-off-by: Emil Gedda Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 8943880eff435a48365862999081b29fc5023824 Author: Scott Matheina Date: Thu Jan 5 18:25:18 2017 -0600 staging:rtl8188eu:rtw_ap.c remove unnecessary braces Removed unnecessary braces Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 106 ++++++++++++++++---------------- 1 file changed, 53 insertions(+), 53 deletions(-) commit 759fc3c1e9b65116b31fd28f1ddab112d55b8776 Author: Baruch Nissenbaum Date: Fri Jan 6 14:16:45 2017 +0200 Staging: vt6656: Align lines to match open parenthesis fixing checkpatch.pl check: Alignment should match open parenthesis Signed-off-by: Baruch Nissenbaum Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 945cd472601f066a16f0ea3c5952048b5c9ed981 Author: Scott Matheina Date: Thu Jan 5 18:25:19 2017 -0600 staging:rtl8188eu:core Fixes Alignment should match opening brace Fixed style issue: Alignment should match open brace Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 38 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 015ae42838d25428cd5c5e779cf72872aba10416 Author: Scott Matheina Date: Fri Jan 6 20:14:31 2017 -0600 staging:rtl8712 Aligned code with open parenthesis Aligned code with open parenthesis to fix a checkpatch warning Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d04ac5412f66eac3baa8562f3c7e3ef2b3fd7c0 Author: Scott Matheina Date: Fri Jan 6 20:14:30 2017 -0600 staging:rtl8712: Removed unnecessary parentheses Removed unnecessary parentheses identified by checkpatch Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdfb95c4baab7ce58cb40dae71003a457b359772 Author: Greg Kroah-Hartman Date: Thu Jan 5 18:39:12 2017 +0100 staging: greybus: remove timesync protocol support While the timesync protocol was a great idea, it never ended up getting implemented by any known hardware devices. It's also a bit "interesting" in how it ties into the platform controller. So, just remove it for now. It's not needed, no one uses it, and it's a stumbling block in getting the greybus core code merged out of the staging tree. If anyone wants it in the future, reverting this patch is a great place to start from. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johan Hovold Reviewed-by: Alex Elder Acked-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/arche_platform.h | 2 - drivers/staging/greybus/control.c | 50 - drivers/staging/greybus/control.h | 7 - drivers/staging/greybus/core.c | 11 - drivers/staging/greybus/es2.c | 132 --- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/greybus_protocols.h | 47 - drivers/staging/greybus/greybus_trace.h | 28 - drivers/staging/greybus/hd.h | 7 - drivers/staging/greybus/interface.c | 56 +- drivers/staging/greybus/interface.h | 5 - drivers/staging/greybus/svc.c | 87 -- drivers/staging/greybus/svc.h | 7 - drivers/staging/greybus/timesync.c | 1357 --------------------------- drivers/staging/greybus/timesync.h | 45 - drivers/staging/greybus/timesync_platform.c | 82 -- 17 files changed, 3 insertions(+), 1925 deletions(-) commit 9e6612ebe595c365d5e3df68df37b4d764e54d45 Author: Axel Haslam Date: Fri Jan 6 10:40:54 2017 +0100 ARM: dts: da850-lcdk: Enable ohci for omapl138 lcdk Enable the usb1 controller (ohci) and phy for the lcdk board Signed-off-by: Axel Haslam Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit fa4fabff6a95a5f10c9363e5461d49780151004c Author: Axel Haslam Date: Fri Jan 6 10:40:53 2017 +0100 ARM: dts: da850: Add usb device node Add the usb1 device node for the da850 soc. This will allow boards to use the usb1 port when booting through DT. Signed-off-by: Axel Haslam Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 350a47189c7ab5fdc2e3af855585b99514114d72 Merge: 780e982 c5fdae0 Author: David S. Miller Date: Fri Jan 6 22:18:57 2017 -0500 Merge branch 'l2tp-cleanup-socket-lookup-code' Guillaume Nault says: ==================== l2tp: cleanup socket lookup code in l2tp_ip and l2tp_ip6 First three patches remove redundant tests and add missing "const" qualifiers. Fourth patch splits the conditionals found in __l2tp_ip*_bind_lookup(), to make these functions easier to review. In the process, I found that some corner cases were still not handled properly. So I've added the missing tests in this patch too, because they're pretty simple and the whole "if" statements are modified anyway. I expect it to be easier to review this way. If not, I can split up patch #4, post the missing tests separately to -net, and later repost this series as pure cleanup. Just let me know. ==================== Signed-off-by: David S. Miller commit c5fdae044030f753c9e6a3efa8db28fe00f8fdad Author: Guillaume Nault Date: Fri Jan 6 20:03:57 2017 +0100 l2tp: rework socket comparison in __l2tp_ip*_bind_lookup() Split conditions, so that each test becomes clearer. Also, for l2tp_ip, check if "laddr" is 0. This prevents a socket from binding to the unspecified address when other sockets are already bound using the same device (if any), connection ID and namespace. Same thing for l2tp_ip6: add ipv6_addr_any(laddr) and ipv6_addr_any(raddr) tests to ensure that an IPv6 unspecified address passed as parameter is properly treated a wildcard. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 24 +++++++++++++++++------- net/l2tp/l2tp_ip6.c | 25 ++++++++++++++++++------- 2 files changed, 35 insertions(+), 14 deletions(-) commit 986f7cbc510e29c33b7c8c1701a902a752159425 Author: Guillaume Nault Date: Fri Jan 6 20:03:56 2017 +0100 l2tp: remove useless NULL check in __l2tp_ip*_bind_lookup() If "l2tp" was NULL, that'd mean "sk" is NULL too. This can't happen since "sk" is returned by sk_for_each_bound(). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 3 --- net/l2tp/l2tp_ip6.c | 3 --- 2 files changed, 6 deletions(-) commit bb39b0bdc8c62e97ceedb9a5dadea0f098431d8b Author: Guillaume Nault Date: Fri Jan 6 20:03:55 2017 +0100 l2tp: make __l2tp_ip*_bind_lookup() parameters 'const' Add const qualifier wherever possible for __l2tp_ip_bind_lookup() and __l2tp_ip6_bind_lookup(). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 4 ++-- net/l2tp/l2tp_ip6.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 8cf2f704534147ce84c4df951887c1d49fe9350c Author: Guillaume Nault Date: Fri Jan 6 20:03:54 2017 +0100 l2tp: remove redundant addr_len check in l2tp_ip_bind() addr_len's value has already been verified at this point. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b63f5e84826b3e1ae81e051a6a7c5a94b657aecb Author: Bob Peterson Date: Fri Jan 6 22:14:28 2017 -0500 GFS2: Wake up io waiters whenever a flush is done Before this patch, if a process called function gfs2_log_reserve to reserve some journal blocks, but the journal not enough blocks were free, it would call io_schedule. However, in the log flush daemon, it woke up the waiters only if an gfs2_ail_flush was no longer required. This resulted in situations where processes would wait forever because the number of blocks required was so high that it pushed the journal into a perpetual state of flush being required. This patch changes the logd daemon so that it wakes up io waiters every time the log is actually flushed. Signed-off-by: Bob Peterson fs/gfs2/log.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 780e982905bef61d13496d9af5310bf4af3a64d3 Author: santosh.shilimkar@oracle.com Date: Fri Jan 6 10:44:15 2017 -0800 RDS: validate the requested traces user input against max supported Larger than supported value can lead to array read/write overflow. Reported-by: Colin Ian King Signed-off-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/af_rds.c | 3 +++ 1 file changed, 3 insertions(+) commit 1c966c5d26fec8bd71c42867e09d8da8aa721e58 Merge: a838631 91b467e Author: David S. Miller Date: Fri Jan 6 21:52:20 2017 -0500 Merge tag 'rxrpc-rewrite-20170106' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== afs: Implement bulk read This pair of patches implements bulk data reading from an AFS server. ==================== Signed-off-by: David S. Miller commit a83863174a6137fb3e03f279c9dcdba9e35315d0 Author: Xin Long Date: Fri Jan 6 22:18:33 2017 +0800 sctp: prepare asoc stream for stream reconf sctp stream reconf, described in RFC 6525, needs a structure to save per stream information in assoc, like stream state. In the future, sctp stream scheduler also needs it to save some stream scheduler params and queues. This patchset is to prepare the stream array in assoc for stream reconf. It defines sctp_stream that includes stream arrays inside to replace ssnmap. Note that we use different structures for IN and OUT streams, as the members in per OUT stream will get more and more different from per IN stream. v1->v2: - put these patches into a smaller group. v2->v3: - define sctp_stream to contain stream arrays, and create stream.c to put stream-related functions. - merge 3 patches into 1, as new sctp_stream has the same name with before. Signed-off-by: Xin Long Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 1 - include/net/sctp/structs.h | 76 +++++++++++---------------- net/sctp/Makefile | 2 +- net/sctp/associola.c | 13 +++-- net/sctp/objcnt.c | 2 - net/sctp/sm_make_chunk.c | 10 ++-- net/sctp/sm_statefuns.c | 3 +- net/sctp/ssnmap.c | 125 --------------------------------------------- net/sctp/stream.c | 85 ++++++++++++++++++++++++++++++ net/sctp/ulpqueue.c | 36 ++++++------- 10 files changed, 147 insertions(+), 206 deletions(-) commit df560056d960a3e164c179d89770d5a51b798537 Author: Eric Garver Date: Thu Jan 5 20:22:36 2017 -0500 udp: inuse checks can quit early for reuseport UDP lib inuse checks will walk the entire hash bucket to check if the portaddr is in use. In the case of reuseport we can stop searching when we find a matching reuseport. On a 16-core VM a test program that spawns 16 threads that each bind to 1024 sockets (one per 10ms) takes 1m45s. With this change it takes 11s. Also add a cond_resched() when the port is not specified. Signed-off-by: Eric Garver Signed-off-by: David S. Miller net/ipv4/udp.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 40d9f82750044f846005d2ac4eec65e39c1c0f7c Author: Stephen Boyd Date: Wed Dec 7 14:33:23 2016 -0800 timekeeping: Remove unused timekeeping_{get,set}_tai_offset() The last caller to timekeeping_set_tai_offset() was in commit 0b5154fb9040 (timekeeping: Simplify tai updating from do_adjtimex, 2013-03-22) and the last caller to timekeeping_get_tai_offset() was in commit 76f4108892d9 (hrtimer: Cleanup hrtimer accessors to the timekepeing state, 2014-07-16). Remove these unused functions now that we handle TAI offsets differently. Cc: John Stultz Signed-off-by: Stephen Boyd Signed-off-by: John Stultz kernel/time/timekeeping.c | 39 +-------------------------------------- kernel/time/timekeeping.h | 2 -- 2 files changed, 1 insertion(+), 40 deletions(-) commit 89eb9835b2657a902adb8d5e31f721a8004726b5 Author: Ganesh Goudar Date: Fri Jan 6 16:52:10 2017 +0530 cxgb4: Add port description for new cards. Add port description for 25G and 100G cards, and also change few port descriptions in compliance with the new naming convention. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 5e78f7fd3743d430c44402268cbeddab8eeb3af8 Author: Ganesh Goudar Date: Fri Jan 6 16:51:46 2017 +0530 cxgb4/cxgb4vf: Display 25G and 100G link speed Add support to report 25G and 100G links, which was missed as part of commit "eb97ad99f9ed". Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 20 +++++++++++++------- drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 21 ++++++++++++--------- 2 files changed, 25 insertions(+), 16 deletions(-) commit c5e7099137c0da4275551f5df8bd2a2b3cae449b Merge: c7b371e 76ed5a8 Author: David S. Miller Date: Fri Jan 6 16:05:37 2017 -0500 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2017-01-06 This series contains updates/fixes to igb and e1000e. Joe fixes indentation and improper line wrapping in igb. David Singleton fixes an issue in e1000e where in systemd, where things are done in parallel and can create a condition where e1000_shutdown is called after e1000_close, hitting BUG_ON assert in free_msi_irqs. Cao Jin fixes a code comment on the wakeup status register. Also fixes a possible NULL pointer dereference by using igb_adapter->io_addr instead of e1000_hw->hw_addr in igb_configure_tx_ring(). Chris Arges works around a firmware issue, which can cause probe of i210 NIC to fail, so zero the page select register during igb_get_phy_id() to workaround the issue. Aaron Sierra adds also a check for this issue during the initialization of PHY parameters to ensure that this same issue happens after probe. Todd fixes a possible race condition in close/suspend by extending the rtnl_lock() to protect the call to netif_device_detach() and igb_clear_interrupt_scheme(). Also adds i211 to a known i210/i211 workaround. Hannu Lounento fixes inverted logic on a debug statement. ==================== Signed-off-by: David S. Miller commit c7b371e34c0b9ed9e23271608448f89e6d66ba0a Author: David Ahern Date: Thu Jan 5 19:33:59 2017 -0800 net: ipv4: make fib_select_default static fib_select_default has a single caller within the same file. Make it static. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 1 - net/ipv4/fib_semantics.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 0c8d803f397a65adfffd3aa01f52555389f33239 Author: David Ahern Date: Thu Jan 5 19:32:46 2017 -0800 net: ipv4: Simplify rt_fill_info rt_fill_info has only 1 caller and both of the last 2 args -- nowait and flags -- are hardcoded to 0. Given that remove them as input arguments and simplify rt_fill_info accordingly. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 4055ae5e6d00e09ff4206843638323d1d5dfd85d Author: Hariprasad Shenai Date: Fri Jan 6 08:47:20 2017 +0530 cxgb4: Synchronize access to mailbox The issue comes when there are multiple threads attempting to use the mailbox facility at the same time. When DCB operations and interface up/down is run in a loop for every 0.1 sec, we observed mailbox collisions. And out of the two commands one would fail with the present code, since we don't queue the second command. To overcome the above issue, added a queue to access the mailbox. Whenever a mailbox command is issued add it to the queue. If its at the head issue the mailbox command, else wait for the existing command to complete. Usually command takes less than a milli-second to complete. Also timeout from the loop, if the command under execution takes long time to run. In reality, the number of mailbox access collisions is going to be very rare since no one runs such abusive script. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 8 ++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 ++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 59 ++++++++++++++++++++++++- 3 files changed, 69 insertions(+), 1 deletion(-) commit 4b92ea81cca38e4b5fd200607fba3d8a2263a3f9 Author: Florian Fainelli Date: Thu Jan 5 11:08:58 2017 -0800 net: dsa: b53: Utilize common helpers for u64/MAC Utilize the two functions recently introduced: u64_to_ether() and ether_to_u64() instead of our own versions. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/b53/b53_priv.h | 24 +++--------------------- 2 files changed, 4 insertions(+), 22 deletions(-) commit 7558828adebe675179f6a489c7e04082828bf524 Author: Vivien Didelot Date: Thu Jan 5 12:28:41 2017 -0500 net: dsa: remove version string The dsa_driver_version string is irrelevant and has not been bumped since its introduction about 9 years ago. Kill it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa.c | 5 ----- net/dsa/dsa_priv.h | 1 - net/dsa/slave.c | 1 - 3 files changed, 7 deletions(-) commit 026b471bfc995ba1429ca45b9157457fb8602f8e Author: Weilin Chang Date: Wed Jan 4 16:18:50 2017 -0800 liquidio: fix wrong information about channels reported to ethtool Information reported to ethtool about channels is sometimes wrong for PF, and always wrong for VF. Fix them by getting the information from the right fields from the right structs. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 88af4bbd8f6983378c3098ca3e26c4e48434fe69 Author: Uwe Kleine-König Date: Tue Dec 20 22:15:22 2016 +0100 ata: sata_mv: fix module license specification The header allows GPL v2 only, so declare "GPL v2" for MODULE_LICENSE Signed-off-by: Uwe Kleine-König Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f784ad3d79e5be062b19dc36c53413daffeecc5c Author: Mahesh Bandewar Date: Wed Jan 4 15:01:01 2017 -0800 ipv6: do not send RTM_DELADDR for tentative addresses RTM_NEWADDR notification is sent when IFA_F_TENTATIVE is cleared from the address. So if the address is added and deleted before DAD probes completes, the RTM_DELADDR will be sent for which there was no RTM_NEWADDR causing asymmetry in notification. However if the same logic is used while sending RTM_DELADDR notification, this asymmetry can be avoided. Signed-off-by: Mahesh Bandewar CC: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/addrconf.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 54643a83b41a2bff90a0615799686b37a1109404 Author: Csaba Kertesz Date: Tue Oct 25 22:08:07 2016 +0200 ahci: imx: Add imx53 SATA temperature sensor support Add a hwmon entry to get the temperature from the die of imx53 SATA. The original patch was made by Richard Zhu for kernel 2.6.x: ENGR00134041-MX53-Add-the-SATA-AHCI-temperature-monitor.patch Signed-off-by: Fabien Lahoudere Signed-off-by: Tejun Heo drivers/ata/ahci_imx.c | 195 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) commit 90028b07a74ddcbaac1c5aee038a7108ae279b2e Author: Prasad Kanneganti Date: Wed Jan 4 11:31:55 2017 -0800 liquidio VF: fix incorrect struct being used The VF driver is using the wrong struct when sending commands to the NIC firmware, sometimes causing adverse effects in the firmware. The right struct is the one that the PF is using, so make the VF use that as well. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1dd5581354547641ef6e19e6a90727a985b1be87 Author: David Lechner Date: Fri Jan 6 11:07:01 2017 -0800 ARM: dts: keystone: Add "ti,da830-uart" compatible string The TI Keystone SoCs have extra UART registers beyond the standard 8250 registers, so we need a new compatible string to indicate this. Also, at least one of these registers uses the full 32 bits, so we need to specify reg-io-width in addition to reg-shift. "ns16550a" is left in the compatible specification since it does work as long as the bootloader configures the SoC UART power management registers. Signed-off-by: David Lechner Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 2 +- arch/arm/boot/dts/keystone-k2l.dtsi | 4 ++-- arch/arm/boot/dts/keystone.dtsi | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 6e03f653e318ac8d248a945082174b39733489f5 Author: Murali Karicheri Date: Fri Jan 6 11:05:45 2017 -0800 soc: ti: knav: cleanup includes and sort header files This patch cleanup the code to remove unnecessary header files and also sort the header files. Signed-off-by: Murali Karicheri Signed-off-by: WingMan Kwok Signed-off-by: Sekhar Nori Signed-off-by: Santosh Shilimkar drivers/soc/ti/knav_qmss_acc.c | 15 +++------------ drivers/soc/ti/knav_qmss_queue.c | 25 ++++++++----------------- 2 files changed, 11 insertions(+), 29 deletions(-) commit 4ee34aae41082491aeb014d28abd6b19ac1c92c0 Author: Murali Karicheri Date: Fri Jan 6 11:05:45 2017 -0800 soc: ti: knav_dma: fix typos in trace message This patch fixes some typos in the trace message Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori Signed-off-by: Santosh Shilimkar drivers/soc/ti/knav_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa142ed77099e9a614980022b3f94efc67417775 Author: Andy Shevchenko Date: Thu Jan 5 14:19:01 2017 -0800 Input: intel-mid-touch - remove driver The Moorestown support was removed by commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Remove this leftover. Signed-off-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 12 - drivers/input/touchscreen/Makefile | 1 - drivers/input/touchscreen/intel-mid-touch.c | 654 ---------------------------- 3 files changed, 667 deletions(-) commit 0eeecf60394928b48806b081d4bea1a18db9318c Author: Aniroop Mathur Date: Wed Jan 4 10:57:51 2017 -0800 Input: edt_ft5x06 - change msleep to usleep_range for small msecs msleep(1~20) may not do what the caller intends, and will often sleep longer (~20 ms actual sleep for any value given in the 1~20ms range). This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, retry logic, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: Aniroop Mathur Acked-by: Simon Budig Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c01b5e7464f0cf20936d7467c7528163c4e2782d Author: Cameron Gutman Date: Tue Jan 3 22:40:38 2017 -0800 Input: xpad - don't depend on endpoint order The order of endpoints is well defined on official Xbox pads, but we have found at least one 3rd-party pad that doesn't follow the standard ("Titanfall 2 Xbox One controller" 0e6f:0165). Fortunately, we get lucky with this specific pad because it uses endpoint addresses that differ only by direction. We know that there are other pads out where this is not true, so let's go ahead and fix this. Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit a8c34e27fb1ece928ec728bfe596aa6ca0b1928a Author: Pavel Rojtberg Date: Fri May 27 16:26:33 2016 -0700 Input: xpad - simplify error condition in init_output Replace first goto with simple returns as we really are just returning one error code. Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4f88476c75429ba9ab71c428b4cd2f67575bc9c1 Author: Daniel Tobias Date: Fri May 27 16:25:32 2016 -0700 Input: xpad - move reporting xbox one home button to common function xbox one was the only device that has a *_process_buttons routine. Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 52 ++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit c02fc1d9e5d9f093296e43e13ec7f35f140784bd Author: Daniel Tobias Date: Fri May 27 16:25:10 2016 -0700 Input: xpad - correctly sort vendor id's Signed-off-by: Daniel Tobias Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e360e72e715f228e426edf0fc99ffa34027ab0ad Author: Rafał Miłecki Date: Thu Dec 29 20:13:13 2016 +0100 spi: bcm53xx: (re)license code to the GPL v2 My intention was to release this code under GPL v2 license. For some reason my initial commit 0fc6a323e191 ("spi: bcm53xx: driver for SPI controller on Broadcom bcma SoC") totally missed licensing info. MODULE_LICENSE was later added by Axel specifying "GNU Public License v2 or later". This patch clarifies situation by adding a proper header (with Copyright line) and adjusting MODULE_LICENSE. It should be acked by every driver contributor. Signed-off-by: Rafał Miłecki Acked-by: Nicholas Mc Guire Reviewed-by: Jingoo Han Acked-by: Jingoo Han Acked-by: Joe Perches Acked-by: Axel Lin Acked-by: Vaishali Thakkar Signed-off-by: Mark Brown drivers/spi/spi-bcm53xx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8452a7639464a716b2b4051bd74cce1bdbeefbce Merge: 1448099 09a8bf8 Author: Mark Brown Date: Fri Jan 6 18:17:24 2017 +0000 Merge branch 'topic/hda-ext-decouple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 09a8bf812c662c833621f19955a1d3fa495801bc Author: Jeeja KP Date: Mon Jan 2 12:44:28 2017 +0530 ALSA: hda: check stream decoupled register state Check stream decoupled register value with requested value before decoupling/coupling the stream. Signed-off-by: Jeeja KP Acked-by: Takashi Iwai Signed-off-by: Mark Brown sound/hda/ext/hdac_ext_stream.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1448099dd3d55546057cdda0493a6493c007b9fd Author: Jeeja KP Date: Mon Jan 2 09:50:03 2017 +0530 ASoC: Intel: bxtn: Use DSP poll API to poll FW status Use the optimized dsp_register_poll API to poll the DSP firmware status register rather than open coding it. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) commit 9cc8f9fe0f9e84771f2872f8939d37414ef9d58d Author: Jeeja KP Date: Mon Jan 2 09:50:02 2017 +0530 ASoC: Intel: Common: Update dsp register poll implementation Poll implementation is not quite accurate, especially for smaller values of timeout or timeout values close to the actual timeout needed Use jiffies to set the timeout value and time_before() to get the accurate time. So update the dsp register poll implementation to provide accurate timeout using jiffies. Signed-off-by: Jayachandran B Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-dsp.c | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit eee0e16f8c3cf31fbbae4a88e51d25abebbaf147 Author: Jeeja KP Date: Mon Jan 2 09:50:04 2017 +0530 ASoC: Intel: Skylake: Clean up manifest info Instead of passing the topology manifest info directly to IPC library, define the manifest info in topology and use this in IPC Library. This will remove the dependency on topology interface definition with IPC library. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 25 ++++++++--------- sound/soc/intel/skylake/skl-sst-dsp.h | 4 +-- sound/soc/intel/skylake/skl-sst-ipc.h | 5 ++-- sound/soc/intel/skylake/skl-topology.c | 41 +++++++++++++--------------- sound/soc/intel/skylake/skl-topology.h | 13 +++++++++ sound/soc/intel/skylake/skl-tplg-interface.h | 12 -------- 6 files changed, 48 insertions(+), 52 deletions(-) commit 66459c5a50a787c474b734b586328f7111ab6df0 Author: Jiada Wang Date: Fri Jan 6 04:22:18 2017 -0800 spi: imx: adjust watermark level according to transfer length Previously DMA watermark level is configured to fifosize/2, DMA mode can be used only when transfer length can be divided by 'watermark level * bpw', which makes DMA mode not pratical. This patch adjusts watermark level to largest number (no bigger than fifosize/2) which can divide 'tranfer length / bpw' for each transfer. Signed-off-by: Jiada Wang Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit af813a6fd8740537bfa5801768e90cc95d9262a3 Author: Charles Keepax Date: Fri Jan 6 14:24:41 2017 +0000 ASoC: wm_adsp: Add mechanism to preload firmware on a core As requirements to bring up audio paths are continuous getting tighter and the DSP download to most ADSP devices happens over an external bus it can become an important factor in the path bring up time. As such sometimes it is a reasonable trade off to download the firmware ahead of when it will be required and take a small hit on power consumption for keeping the core powered up. This "preloading" adds an additional control for each DSP core "DSPx Preload Switch" that when set to true will power up the DSP core and download the firmware currently selected in the "DSPx Firmware" control. Whilst the core is preloaded the current firmware can not be changed and the CODEC will be kept powered up and SYSCLK held on. Although future improvements may allow the SYSCLK to be powered down as well because the hardware only requires SYSCLK whilst the download is actually taking place, but this is not covered in this series. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.h | 1 + sound/soc/codecs/cs47l24.c | 3 +++ sound/soc/codecs/wm5102.c | 2 ++ sound/soc/codecs/wm5110.c | 5 +++++ sound/soc/codecs/wm_adsp.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- sound/soc/codecs/wm_adsp.h | 11 +++++++++++ 6 files changed, 66 insertions(+), 1 deletion(-) commit 8118fe40d4a4a6767ff4e8f612950ef24da590c5 Author: Douglas Anderson Date: Fri Jan 6 08:31:01 2017 -0800 clk: rockchip: Remove useless init of "grf" to -EPROBE_DEFER When we used to defer setting the "grf" member to rockchip_clk_get_grf() it was important to init the "grf" member to an error value in rockchip_clk_init(). With recent changes, we now set "grf" right in rockchip_clk_init() (two lines below the place where we initted it). That makes the old init useless. Get rid of it. Fixes: 6f339dc2719e ("clk: rockchip: lookup General Register Files in rockchip_clk_init") Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk.c | 1 - 1 file changed, 1 deletion(-) commit 57b6bfcf66d197003d7b72f3f85207a3dd7ade04 Author: Tony Lindgren Date: Thu Jan 5 13:41:01 2017 -0800 MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer Aaro has been doing a great job making sure mach-omap1 stays working with the mainline kernel. So let's add Aaro as omap1 co-maintainer to the MAINTAINERS file. Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren MAINTAINERS | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit b42a13d9181e1dee58dcbf2f7c8d5625a49cb6f5 Author: Chris Wilson Date: Fri Jan 6 15:22:40 2017 +0000 drm/i915: Drain freed objects for mmap space exhaustion As we now use a deferred free queue for objects, simply retiring the active objects is not enough to immediately free them and recover their mmap space - we must now also drain the freed object list. Fixes: fbbd37b36fa5 ("drm/i915: Move object release to a freelist + worker" Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Link: http://patchwork.freedesktop.org/patch/msgid/20170106152240.5793-3-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 91b467e0a3f5fa861265eda94640b7d4c0290551 Author: David Howells Date: Thu Jan 5 10:38:35 2017 +0000 afs: Make afs_readpages() fetch data in bulk Make afs_readpages() use afs_vnode_fetch_data()'s new ability to take a list of pages and do a bulk fetch. Signed-off-by: David Howells fs/afs/file.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/afs/volume.c | 1 + 2 files changed, 130 insertions(+), 2 deletions(-) commit 196ee9cd2d04728d0ec0038a2856b86142615b11 Author: David Howells Date: Thu Jan 5 10:38:34 2017 +0000 afs: Make afs_fs_fetch_data() take a list of pages Make afs_fs_fetch_data() take a list of pages for bulk data transfer. This will allow afs_readpages() to be made more efficient. Signed-off-by: David Howells fs/afs/file.c | 37 ++++++++++++++--- fs/afs/fsclient.c | 117 +++++++++++++++++++++++++++++++++++------------------- fs/afs/internal.h | 21 +++++++++- fs/afs/vnode.c | 6 +-- fs/afs/write.c | 19 +++++++-- 5 files changed, 145 insertions(+), 55 deletions(-) commit f62280efe8934a1275fd148ef302d1afec8cd3df Author: Tony Lindgren Date: Thu Jan 5 11:17:30 2017 -0800 ARM: dts: Fix compatible for ti81xx uarts for 8250 When using 8250_omap driver, we need to specify the right compatible value for the UART to work on dm814x and dm816x. Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm814x.dtsi | 6 +++--- arch/arm/boot/dts/dm816x.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1aa09df0854efe16b7a80358a18f0a0bebafd246 Author: Tony Lindgren Date: Thu Jan 5 11:10:40 2017 -0800 ARM: dts: Fix am335x and dm814x scm syscon to probe children Without these changes children of the scn syscon won't probe. Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 3 ++- arch/arm/boot/dts/dm814x.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 6e613ebf4405fc09e2a8c16ed193b47f80a3cbed Author: Tony Lindgren Date: Thu Jan 5 11:08:20 2017 -0800 ARM: OMAP2+: Fix init for multiple quirks for the same SoC It's possible that there are multiple quirks that need to be initialized for the same SoC. Fix the issue by not returning on the first match. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pdata-quirks.c | 1 - 1 file changed, 1 deletion(-) commit 1a292fa53d06e53000296ba76c6984a43e1e828c Author: Chris Wilson Date: Fri Jan 6 15:22:39 2017 +0000 drm/i915: Purge loose pages if we run out of DMA remap space If the DMA remap fails, one cause can be that we have too many objects pinned in a small remapping table, such as swiotlb. (DMA remapping does not trigger the shrinker by itself on its normal failure paths.) So try purging all other objects (using i915_gem_shrink_all(), sparing our own pages as we have yet to assign them to the obj->pages) and try again. If there are no pages to reclaim (and consequently no pages to unmap), the shrinker will report 0 and we fail with -ENOSPC as before. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152240.5793-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit d97556c8012015901a3ce77f46960078139cd79d Author: Tony Lindgren Date: Thu Jan 5 11:07:18 2017 -0800 ARM: dts: Fix omap3 off mode pull defines We need to also have OFFPULLUDENABLE bit set to use the off mode pull values. Otherwise the line is pulled down internally if no external pull exists. This is has some documentation at: http://processors.wiki.ti.com/index.php/Optimizing_OMAP35x_and_AM/DM37x_OFF_mode_PAD_configuration Note that the value is still glitchy during off mode transitions as documented in spz319f.pdf "Advisory 1.45". It's best to use external pulls instead of relying on the internal ones for off mode and even then anything pulled up will get driven down momentarily on off mode restore for GPIO banks other than bank1. Signed-off-by: Tony Lindgren include/dt-bindings/pinctrl/omap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10466d2a59b23aa6d5ecd5310296c8cdb6458dac Author: Chris Wilson Date: Fri Jan 6 15:22:38 2017 +0000 drm/i915: Fix phys pwrite for struct_mutex-less operation Since commit fe115628d567 ("drm/i915: Implement pwrite without struct-mutex") the lowlevel pwrite calls are now called without the protection of struct_mutex, but pwrite_phys was still asserting that it held the struct_mutex and later tried to drop and relock it. Fixes: fe115628d567 ("drm/i915: Implement pwrite without struct-mutex") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Link: http://patchwork.freedesktop.org/patch/msgid/20170106152240.5793-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) commit f7f01ffbca7771fffee7ab1e97c48c4c1c8974f0 Author: Tony Lindgren Date: Thu Jan 5 08:37:03 2017 -0800 ARM: dts: omap5-igep0050: Allow bootloader to configure USB Ethernet MAC This is slightly different wiring compared to omap5-uevm or pandaboard: /sys/bus/usb/devices/3-2 hub /sys/bus/usb/devices/3-2.3 7500 Cc: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-igep0050.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e13a22a406f20322651b8c0847f4210bdef246d1 Author: Tony Lindgren Date: Thu Jan 5 08:37:02 2017 -0800 ARM: dts: omap5-uevm: Allow bootloader to configure USB Ethernet MAC Note that with 9730 the wiring is different compared to 9514 found on beagleboard xm for example. On beagleboard xm we have: /sys/bus/usb/devices/1-2 hub /sys/bus/usb/devices/1-2.1 9514 While on omap5-uevm we have: /sys/bus/usb/devices/1-2 hub /sys/bus/usb/devices/1-3 9730 Cc: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-uevm.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 879a29e32c2db499b9b4b118466373cba7c276e0 Author: Tony Lindgren Date: Thu Jan 5 08:37:01 2017 -0800 ARM: dts: pandaboard: Allow bootloader to configure USB Ethernet MAC Inspired by a patch for beagleboard xm by Laurent Pinchart , similar patch also works for pandaboard. The only difference is that the hub is address 1 instead of 2. Cc: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-panda-common.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 055d31de7158469ad075f09d7dcc894304e487c4 Author: Laurent Pinchart Date: Fri Dec 2 23:11:37 2016 +0200 ARM: omap3: beagleboard-xm: dt: Add ethernet to the device tree The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, connected to port 2 of the OMAP EHCI controller. The board however has no EEPROM to store the ethernet MAC address, which is programmed by the boot loader. To allow Linux to use the same MAC address as the boot loader (or for that matter any fixed MAC address), we need a node in the device tree for the ethernet controller that the boot loader can update at runtime with a local-mac-address property. Add it, along with an alias for the ethernet controller to let the boot loader locate it easily. Signed-off-by: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-beagle-xm.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit de2518201e526f4491e5856b9818f5c18684a6a7 Author: Michał Kępień Date: Thu Jan 5 15:14:01 2017 +0100 ata: ahci_xgene: free structure returned by acpi_get_object_info() acpi_get_object_info() allocates the returned structure, which the caller has to free when the call succeeds. Free it when appropriate. Fixes: c9802a4be661 ("ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.") Signed-off-by: Michał Kępień Signed-off-by: Tejun Heo drivers/ata/ahci_xgene.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 36cc9fd9ce0fd0e4654890aa347d258616aef5fa Author: Sarangdhar Joshi Date: Thu Jan 5 14:00:15 2017 -0800 soc: ti: wkup_m3_ipc: Drop wait from wkup_m3_rproc_boot_thread The function wkup_m3_rproc_boot_thread waits for asynchronous firmware loading to parse the resource table before calling rproc_boot(). However, as the resource table parsing has been moved to rproc_boot(), there's no need to wait for the asynchronous firmware loading completion. So, drop this. CC: Dave Gerlach CC: Bjorn Andersson Tested-by: Suman Anna Signed-off-by: Sarangdhar Joshi Signed-off-by: Tony Lindgren drivers/soc/ti/wkup_m3_ipc.c | 2 -- 1 file changed, 2 deletions(-) commit 2874d5ee6c06ab72f2729968926b3d5ef8fca897 Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:49 2017 +0100 libata: Protect DMA core code by #ifdef CONFIG_HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/libata.ko] undefined! To fix this, protect the DMA code by #ifdef CONFIG_HAS_DMA, and provide dummies of ata_sg_clean() and ata_sg_setup() for the !CONFIG_HAS_DMA case. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 61 +++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 26 deletions(-) commit 6cf32ed9eee2d34db441ba6ebad3ec2d67952688 Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:48 2017 +0100 libata: Make ata_sg_clean() static again Commit 70e6ad0c6d1e6cb9 ("[PATCH] libata: prepare ata_sg_clean() for invocation from EH") made ata_sg_clean() global, but no user outside libata-core.c has ever materialized. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 2 +- drivers/ata/libata.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit b16a0168c41f9379476b5b5585071319078c542d Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:47 2017 +0100 ata: AHCI and other non-SFF native drivers should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/libahci_platform.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/ata/libahci.ko] undefined! Add a block dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 7bc7ab1e63dfe004931502f90ce7020e375623da Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:46 2017 +0100 ata: ATA_BMDMA should depend on HAS_DMA If NO_DMA=y: ERROR: "dmam_alloc_coherent" [drivers/ata/libata.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2a736e0585e585c2566b5119af8381910a170e44 Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:45 2017 +0100 ata: SATA_HIGHBANK should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/sata_highbank.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 62989cebd367a1aae1e009e1a5b1ec046a4c8fdc Author: Geert Uytterhoeven Date: Tue Jan 3 19:09:44 2017 +0100 ata: SATA_MV should depend on HAS_DMA If NO_DMA=y: ERROR: "dma_pool_alloc" [drivers/ata/sata_mv.ko] undefined! ERROR: "dmam_pool_create" [drivers/ata/sata_mv.ko] undefined! ERROR: "dma_pool_free" [drivers/ata/sata_mv.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tejun Heo drivers/ata/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 984ff29f74c0c130b43f0c5b0fe0fbca5de0fddc Author: Chris Wilson Date: Fri Jan 6 15:20:13 2017 +0000 drm/i915: Simplify testing for am-I-the-kernel-context? The kernel context (dev_priv->kernel_context) is unique in that it is not associated with any user filp - it is the only one with ctx->file_priv == NULL. This is a simpler test than comparing it against dev_priv->kernel_context which involves some pointer dancing. In checking that this is true, we notice that the gvt context is allocating itself a i915_hw_ppgtt it doesn't use and not flagging that its file_priv should be invalid. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 13 ++++++++++++- drivers/gpu/drm/i915/i915_gem_context.h | 5 +++++ drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) commit e8f9ae9b5062b43b6cb3dd6e45107c8edf25f1d0 Author: Chris Wilson Date: Fri Jan 6 15:20:12 2017 +0000 drm/i915: Use range_overflows() Replace a few more open-coded overflow checks with the macro. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 3 ++- drivers/gpu/drm/i915/intel_bios.c | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) commit edd1f2fe11ff77ab2a3169b9359e2ba69541a2f2 Author: Chris Wilson Date: Fri Jan 6 15:20:11 2017 +0000 drm/i915: Use fixed-sized types for stolen Stolen memory is a hardware resource of known size, so use an accurate fixed integer type rather than the ambiguous variable size_t. This was motivated by the next patch spotting inconsistencies in our types. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-3-chris@chris-wilson.co.uk drivers/char/agp/intel-gtt.c | 6 ++++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++--- drivers/gpu/drm/i915/i915_gem_gtt.h | 13 +++++++------ drivers/gpu/drm/i915/i915_gem_stolen.c | 20 ++++++++++---------- include/drm/intel-gtt.h | 6 ++++-- 5 files changed, 30 insertions(+), 23 deletions(-) commit 46fad808b1b73c3f7c0b88016dcc6fb4cd549b27 Author: Chris Wilson Date: Fri Jan 6 15:20:10 2017 +0000 drm/i915: Use phys_addr_t for the address of stolen memory Though we know the hw is limited to keeping stolen memory inside the first 4GiB, it is clearer to the reader that we are handling physical address if we use phys_addr_t to refer to the base of stolen memory. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 49 ++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 24 deletions(-) commit c4d3ae6852bd9f024611d2e8722736ca553e1e43 Author: Chris Wilson Date: Fri Jan 6 15:20:09 2017 +0000 drm/i915: Consolidate checks for memcpy-from-wc support In order to silence sparse: ../drivers/gpu/drm/i915/i915_gpu_error.c:200:39: warning: Using plain integer as NULL pointer add a helper to check whether we have sse4.1 and that the desired alignment is valid for acceleration. v2: Explain the macros and split the two use cases between i915_has_memcpy_from_wc() and i915_can_memcpy_from_wc(). Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 16 ++++++++++++++++ drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) commit eca90a3b3226fcecb4b3bbf4b0b6ff72422674bc Author: Alexander Alemayhu Date: Thu Jan 5 22:11:50 2017 +0100 EDAC: Fix typos in enum mem_type comments s/labed/labeled/ s/differenciate/differentiate/ Signed-off-by: Alexander Alemayhu Cc: linux-edac Link: http://lkml.kernel.org/r/20170105211150.24003-1-alexander@alemayhu.com Signed-off-by: Borislav Petkov include/linux/edac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 628ea92f0928c72d5ab88785e794ab4059f3f17d Author: Ben Dooks Date: Wed Jun 8 18:35:56 2016 +0100 EDAC: Make dev_attr_sdram_scrub_rate static The dev_attr_sdram_scrub_rate is not declared in a header or used anywhere else, so make it static to fix the following warning: drivers/edac/edac_mc_sysfs.c:816:1: warning: symbol 'dev_attr_sdram_scrub_rate' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Mauro Carvalho Chehab Cc: linux-edac Link: http://lkml.kernel.org/r/1465407356-7357-1-git-send-email-ben.dooks@codethink.co.uk Signed-off-by: Borislav Petkov drivers/edac/edac_mc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f547425fd9fbcb42b177ec7eec46bd4d7d4ae45 Author: Benjamin Gaignard Date: Fri Jan 6 10:15:03 2017 +0100 drm: crc: Call wake_up_interruptible() each time there is a new CRC entry Each time new data has being added in CRC list inform reader by calling wake_up_interruptible(). This should avoid to do it in all drivers. Signed-off-by: Benjamin Gaignard Cc: Tomeu Vizoso Cc: Daniel Vetter Reviewed-by: Tomeu Vizoso Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483694104-25627-1-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/drm_debugfs_crc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1ae0d5af347df224a6e76334683f13a96d915a44 Author: Arvind Yadav Date: Wed Dec 21 11:00:12 2016 +0530 drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache Here, If devm_ioremap_nocache will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_vtg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d10c54a83e214348a2f4d59b103047dc230343c Author: Vincent Abriou Date: Tue Jan 3 16:06:48 2017 +0100 drm/sti: remove deprecated sti_vtac.c file stih416 chip family is no more supported in Linux v4.9. It is then useless to keep sti_vtac.c file since it not used at all for the stih407/10 chip family supported by sti driver. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/Makefile | 1 - drivers/gpu/drm/sti/sti_drv.c | 1 - drivers/gpu/drm/sti/sti_drv.h | 1 - drivers/gpu/drm/sti/sti_vtac.c | 223 ----------------------------------------- 4 files changed, 226 deletions(-) commit 8953e9ee0ce5ff466c900ba70fd582ac0d4155cc Author: Vincent Abriou Date: Wed Jan 4 13:06:51 2017 +0100 drm/sti: create fbdev at binding Do not wait for a hot plug event to create fbdev. Cc: Tomi Valkeinen Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_drv.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit a69e466b0666d611e7bacd4f2c17e10d0b8b9c47 Author: Vincent Abriou Date: Tue Nov 15 15:33:34 2016 +0100 drm/sti: update fps debugfs entries This update allows to have a clearer fps log trace by adding information about plane size and plane pixel format. Signed-off-by: Vincent Abriou drivers/gpu/drm/sti/sti_plane.c | 17 +++++++++++++---- drivers/gpu/drm/sti/sti_plane.h | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) commit 97120776f7cd54c4d75f47d770f238674f8c8192 Author: Fabien DESSENNE Date: Mon Dec 5 16:09:33 2016 +0100 drm/sti: do not post HQVDP command if no update Do not process update requests with unmodified parameters. Since the HQVDP command queue is limited to 2, we shall take care of not posting unneeded commands, which would abusively fill the command queue leading to frame update skip. This typically happens when the driver is called with legacy (non-atomic) IOCTL : in that case atomic_update() is called multiple times with the same parameters. Signed-off-by: Fabien Dessenne Acked-by: Benjamin Gaignard drivers/gpu/drm/sti/sti_hqvdp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 49fb560a7bf5cd3d351c5a9ac945d9dc09b15d4e Author: Fabien DESSENNE Date: Mon Dec 5 16:09:32 2016 +0100 drm/sti: load XP70 firmware only once When a plane is enabled, after having been disabled, do not reload XP70 firmware again, but only register VTG again Signed-off-by: Fabien Dessenne Acked-by: Benjamin Gaignard drivers/gpu/drm/sti/sti_hqvdp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit dd841870d0f5d170175b25083365e4e3024c2d3b Author: Arnaud Pouliquen Date: Fri Sep 30 17:17:00 2016 +0200 drm/sti: allow audio playback on HDMI even if disabled. This fix allows to play audio while HDMI is disconnected. When HDMI is disable, audio configuration is stored and samples are dropped (by HDMI IP). When HDMI is enabled, audio HDMI configuration is applied and samples are outputted on HDMI wire. Signed-off-by: Arnaud Pouliquen Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_hdmi.c | 205 ++++++++++++++++++++--------------------- 1 file changed, 101 insertions(+), 104 deletions(-) commit 83089bb9a30df1ecd9a6dab006f7b005232e9c07 Author: Andi Shyti Date: Fri Jan 6 22:43:47 2017 +0900 arm64: dts: exynos: Make TM2 and TM2E independent from each other Currently TM2E dts includes TM2 but there are some differences between the two boards and TM2 has some properties that TM2E doesn't have. That's why it's important to keep the two dts files independent and put all the commonalities in a tm2-common.dtsi file. At the current status the only two differences between the two dts files (besides the board name) are ldo31 and ldo38. Signed-off-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 1118 ++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 1106 +------------------ arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 2 +- 3 files changed, 1128 insertions(+), 1098 deletions(-) commit 2f3e77392099f0bf617ea72df495867a35a60054 Author: Chanwoo Choi Date: Fri Jan 6 22:43:46 2017 +0900 arm64: dts: exynos: Fix wrong values for ldo23 and ldo25 on TM2/TM2E This patch fixes wrong values assigned to ldo23 and ldo25 on both TM2 and TM2E. Fixes: 01e5d2352152 ("arm64: dts: exynos: Add dts file for Exynos5433-based TM2 board") Signed-off-by: Chanwoo Choi Reviewed-by: Javier Martinez Canillas Signed-off-by: Andi Shyti Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 6 +++--- arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 7021b60073f8059e1ec8aa140eb5fdfc017d0041 Author: Grant Grundler Date: Thu Jan 5 11:07:04 2017 -0800 HID: remove use of DRIVER_LICENSE Local "#define DRIVER_LICENSE" obfuscates which license is used in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative when the string is hard coded in MODULE_LICENSE. Signed-off-by: Grant Grundler Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 +-- drivers/hid/usbhid/hid-core.c | 3 +-- drivers/hid/usbhid/usbkbd.c | 3 +-- drivers/hid/usbhid/usbmouse.c | 3 +-- drivers/hid/wacom.h | 1 - drivers/hid/wacom_sys.c | 2 +- 6 files changed, 5 insertions(+), 10 deletions(-) commit e691ac2f75b69bee743f0370d79454ba4429b175 Author: Rafał Miłecki Date: Wed Jan 4 18:58:31 2017 +0100 cfg80211: support ieee80211-freq-limit DT property This patch adds a helper for reading that new property and applying limitations of supported channels specified this way. It is used with devices that normally support a wide wireless band but in a given config are limited to some part of it (usually due to board design). For example a dual-band chipset may be able to support one band only because of used antennas. It's also common that tri-band routers have separated radios for lower and higher part of 5 GHz band and it may be impossible to say which is which without a DT info. Signed-off-by: Rafał Miłecki [add new function to documentation, fix link] Signed-off-by: Johannes Berg Documentation/80211/cfg80211.rst | 3 + include/net/cfg80211.h | 28 ++++++++ net/wireless/Makefile | 1 + net/wireless/of.c | 138 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+) commit 4787cfa08476d4193c35d958f564f643bb6ae234 Author: Rafał Miłecki Date: Wed Jan 4 18:58:30 2017 +0100 cfg80211: move function checking range fit to util.c It is needed for another cfg80211 helper that will be out of reg.c so move it to common util.c file and make it non-static. Signed-off-by: Rafał Miłecki Signed-off-by: Johannes Berg net/wireless/core.h | 3 +++ net/wireless/reg.c | 27 +++++++-------------------- net/wireless/util.c | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 20 deletions(-) commit b330b25eaabda00d74e47566d9200907da381896 Author: Rafał Miłecki Date: Wed Jan 4 18:58:29 2017 +0100 dt-bindings: document common IEEE 802.11 frequency limit property This new file should be used for properties that apply to all wireless devices. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Signed-off-by: Johannes Berg .../devicetree/bindings/net/wireless/ieee80211.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 76ed5a8f47476e4984cc8c0c1bc4cee62650f7fd Author: Hannu Lounento Date: Mon Jan 2 18:26:06 2017 +0100 igb: Fix hw_dbg logging in igb_update_flash_i210 Fix an if statement with hw_dbg lines where the logic was inverted with regards to the corresponding return value used in the if statement. Signed-off-by: Hannu Lounento Signed-off-by: Peter Senna Tschudin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_i210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bc8c230e2a993b49244f9457499f17283da9ec7 Author: Todd Fujinaka Date: Mon Nov 28 09:09:57 2016 -0800 igb: add i211 to i210 PHY workaround i210 and i211 share the same PHY but have different PCI IDs. Don't forget i211 for any i210 workarounds. Signed-off-by: Todd Fujinaka Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9474933caf21a4cb5147223dca1551f527aaac36 Author: Todd Fujinaka Date: Tue Nov 15 08:54:26 2016 -0800 igb: close/suspend race in netif_device_detach Similar to ixgbe, when an interface is part of a namespace it is possible that igb_close() may be called while __igb_shutdown() is running which ends up in a double free WARN and/or a BUG in free_msi_irqs(). Extend the rtnl_lock() to protect the call to netif_device_detach() and igb_clear_interrupt_scheme() in __igb_shutdown() and check for netif_device_present() to avoid calling igb_clear_interrupt_scheme() a second time in igb_close(). Also extend the rtnl lock in igb_resume() to netif_device_attach(). Signed-off-by: Todd Fujinaka Acked-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 69b97cf6dbce7403845a28bbc75d57f5be7b12ac Author: Guilherme G Piccoli Date: Thu Nov 10 16:46:43 2016 -0200 igb: re-assign hw address pointer on reset after PCI error Whenever the igb driver detects the result of a read operation returns a value composed only by F's (like 0xFFFFFFFF), it will detach the net_device, clear the hw_addr pointer and warn to the user that adapter's link is lost - those steps happen on igb_rd32(). In case a PCI error happens on Power architecture, there's a recovery mechanism called EEH, that will reset the PCI slot and call driver's handlers to reset the adapter and network functionality as well. We observed that once hw_addr is NULL after the error is detected on igb_rd32(), it's never assigned back, so in the process of resetting the network functionality we got a NULL pointer dereference in both igb_configure_tx_ring() and igb_configure_rx_ring(). In order to avoid such bug, this patch re-assigns the hw_addr value in the slot_reset handler. Reported-by: Anthony H Thai Reported-by: Harsha Thyagaraja Signed-off-by: Guilherme G Piccoli Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 182785335447957409282ca745aa5bc3968facee Author: Aaron Sierra Date: Tue Nov 29 10:03:56 2016 -0600 igb: reset the PHY before reading the PHY ID Several people have reported firmware leaving the I210/I211 PHY's page select register set to something other than the default of zero. This causes the first accesses, PHY_IDx register reads, to access something else, resulting in device probe failure: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k igb: Copyright (c) 2007-2014 Intel Corporation. igb: probe of 0000:01:00.0 failed with error -2 This problem began for them after a previous patch I submitted was applied: commit 2a3cdead8b408351fa1e3079b220fa331480ffbc Author: Aaron Sierra Date: Tue Nov 3 12:37:09 2015 -0600 igb: Remove GS40G specific defines/functions I personally experienced this problem after attempting to PXE boot from I210 devices using this firmware: Intel(R) Boot Agent GE v1.5.78 Copyright (C) 1997-2014, Intel Corporation Resetting the PHY before reading from it, ensures the page select register is in its default state and doesn't make assumptions about the PHY's register set before the PHY has been probed. Cc: Matwey V. Kornilov Cc: Chris Arges Cc: Jochen Henneberg Signed-off-by: Aaron Sierra Tested-by: Matwey V. Kornilov Tested-by: Chris J Arges Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_82575.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 629823b872402451b42462414da08dddd0e2c93d Author: Cao jin Date: Tue Nov 8 15:06:20 2016 +0800 igb: use igb_adapter->io_addr instead of e1000_hw->hw_addr When running as guest, under certain condition, it will oops as following. writel() in igb_configure_tx_ring() results in oops, because hw->hw_addr is NULL. While other register access won't oops kernel because they use wr32/rd32 which have a defense against NULL pointer. [ 141.225449] pcieport 0000:00:1c.0: AER: Multiple Uncorrected (Fatal) error received: id=0101 [ 141.225523] igb 0000:01:00.1: PCIe Bus Error: severity=Uncorrected (Fatal), type=Unaccessible, id=0101(Unregistered Agent ID) [ 141.299442] igb 0000:01:00.1: broadcast error_detected message [ 141.300539] igb 0000:01:00.0 enp1s0f0: PCIe link lost, device now detached [ 141.351019] igb 0000:01:00.1 enp1s0f1: PCIe link lost, device now detached [ 143.465904] pcieport 0000:00:1c.0: Root Port link has been reset [ 143.465994] igb 0000:01:00.1: broadcast slot_reset message [ 143.466039] igb 0000:01:00.0: enabling device (0000 -> 0002) [ 144.389078] igb 0000:01:00.1: enabling device (0000 -> 0002) [ 145.312078] igb 0000:01:00.1: broadcast resume message [ 145.322211] BUG: unable to handle kernel paging request at 0000000000003818 [ 145.361275] IP: [] igb_configure_tx_ring+0x14d/0x280 [igb] [ 145.400048] PGD 0 [ 145.438007] Oops: 0002 [#1] SMP A similar issue & solution could be found at: http://patchwork.ozlabs.org/patch/689592/ Signed-off-by: Cao jin Acked-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e684f59d760a2c7c716bb60190783546e2d08a1 Author: Chris J Arges Date: Wed Nov 2 09:13:42 2016 -0500 igb: Workaround for igb i210 firmware issue Sometimes firmware may not properly initialize I347AT4_PAGE_SELECT causing the probe of an igb i210 NIC to fail. This patch adds an addition zeroing of this register during igb_get_phy_id to workaround this issue. Thanks for Jochen Henneberg for the idea and original patch. Signed-off-by: Chris J Arges Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_phy.c | 4 ++++ 1 file changed, 4 insertions(+) commit c4f9b6e5783c06b0b798091a4dd81c23c7ecfbe7 Author: Cao jin Date: Wed Nov 2 15:20:15 2016 +0800 igb: correct register comments Signed-off-by: Cao jin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e54d9d063fa239c95c21548c5267f0ef419ff56 Author: khalidm Date: Mon Oct 17 09:51:08 2016 -0700 e1000e: driver trying to free already-free irq During systemd reboot sequence network driver interface is shutdown by e1000_close. The PCI driver interface is shut by e1000_shutdown. The e1000_shutdown checks for netif_running status, if still up it brings down driver. But it disables msi outside of this if statement, regardless of netif status. All this is OK when e1000_close happens after shutdown. However, by default, everything in systemd is done in parallel. This creates a conditions where e1000_shutdown is called after e1000_close, therefore hitting BUG_ON assert in free_msi_irqs. CC: xe-kernel@external.cisco.com Signed-off-by: khalidm Signed-off-by: David Singleton Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 030ec9e68239a8b7851701edc29de5745fe15024 Author: Joe Perches Date: Mon Sep 26 20:46:25 2016 -0700 igb: Realign bad indentation Statements should start on tabstops. Use a single statement and test instead of multiple tests. Signed-off-by: Joe Perches Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_mac.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 62a0d98a188cc4ebd8ea54b37d274ec20465e464 Author: Benjamin Gaignard Date: Wed Jan 4 10:12:57 2017 +0100 drm: allow to use mmuless SoC Some SoC without MMU have display driver where a drm/kms driver could be implemented. Before doing such kind of thing drm/kms must allow to use mmuless devices. This patch propose to remove MMU configuration flag and add a cma helper function to help implementing mmuless display driver version 4: - add documentation about drm_gem_cma_get_unmapped_area() - stub it MMU case Signed-off-by: Benjamin Gaignard [danvet: Use recommended struct member references in kernel-doc.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483521177-21794-4-git-send-email-benjamin.gaignard@linaro.org Documentation/gpu/drm-mm.rst | 11 ++++++ drivers/gpu/drm/Kconfig | 4 +- drivers/gpu/drm/drm_gem_cma_helper.c | 71 ++++++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 17 +++++++++ 4 files changed, 101 insertions(+), 2 deletions(-) commit 99c48e1e38f0aeaa107ad67c8d91f6c9d9d567a9 Author: Benjamin Gaignard Date: Wed Jan 4 10:12:56 2017 +0100 drm: compile drm_vm.c only when needed drm_vm.c functions are only need for DRM_LEGACY and DRM_NOUVEAU. Use a new DRM_VM to define when drm_vm.c in needed. stub drm_legacy_vma_flush() to avoid compilation issues version 4: - a "config DRM_VM" in Kconfig Signed-off-by: Benjamin Gaignard [danvet: Fix conflict.] Signed-off-by: Daniel Vetter drivers/gpu/drm/Kconfig | 5 +++++ drivers/gpu/drm/Makefile | 3 ++- drivers/gpu/drm/drm_legacy.h | 7 +++++++ drivers/gpu/drm/nouveau/Kconfig | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) commit 82f42e4cc164ed486c9e2b1b74e65b176830d947 Author: Benjamin Gaignard Date: Wed Jan 4 10:12:55 2017 +0100 fbmem: add a default get_fb_unmapped_area function Allow generic frame-buffer to provide a default get_fb_unmapped_area function if specific devices need it. Usually this function is defined in architecture directories but define it here may limit code duplication especially for all ARM platforms without MMU. version 5: - set get_unmapped_area field if FB_PROVIDE_GET_FB_UNMAPPED_AREA is defined version 4: - introdude a configuration flag to be independent of architecture Signed-off-by: Benjamin Gaignard Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483521177-21794-2-git-send-email-benjamin.gaignard@linaro.org drivers/video/fbdev/Kconfig | 8 ++++++++ drivers/video/fbdev/core/fbmem.c | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 19f0f3021e7532a1056886e3ddf524f9847e4f15 Author: Heiko Stuebner Date: Thu Nov 17 00:03:04 2016 +0100 ARM: rockchip: drop rk3288 jtag/mmc switch handling We moved that functionality to a more generic place where it can also be used for other socs, so drop it from architecture code. Signed-off-by: Heiko Stuebner Reviewed-by: Douglas Anderson Reviewed-by: Shawn Lin arch/arm/mach-rockchip/rockchip.c | 12 ------------ 1 file changed, 12 deletions(-) commit 4c58063d4258f6beb4fd5647db6b58f49e337c8f Author: Heiko Stuebner Date: Thu Nov 17 00:03:03 2016 +0100 soc: rockchip: add driver handling grf setup The General Register Files are an area of registers containing a lot of single-bit settings for numerous components as well full components like usbphy control. Therefore all used components are accessed via the syscon provided by the grf nodes or from the sub-devices created through the simple-mfd created from the grf node. Some settings are not used by anything but will need to be set up according to expectations on the kernel side. Best example is the force_jtag setting, which defaults to on and results in the soc switching the pin-outputs between jtag and sdmmc automatically depending on the card-detect status. This conflicts heavily with how the dw_mmc driver expects to do its work and also with the clock-controller, which has most likely deactivated the jtag clock due to it being unused. So far the handling of this setting was living in the mach-rockchip code for the arm32-based rk3288 but that of course doesn't work for arm64 socs and would also look ugly for further arm32 socs. Also always disabling this setting is quite specific to linux and its subsystems, other operating systems might prefer other settings, so that the bootloader cannot really set a sane default for all. So introduce a top-level driver for the grf that handles these settings that need to be a certain way but nobody cares about. Other needed settings might surface in the future and can then be added here, but only as a last option. Ideally general GRF settings should be handled in the driver needing them. Signed-off-by: Heiko Stuebner Reviewed-by: Douglas Anderson drivers/soc/rockchip/Kconfig | 10 ++++ drivers/soc/rockchip/Makefile | 1 + drivers/soc/rockchip/grf.c | 134 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+) commit 2c257ce6ab6f10807fcccbc0491b3b3e12328e9e Author: Heiko Stuebner Date: Thu Nov 17 00:03:02 2016 +0100 dt-bindings: add used but undocumented rockchip grf compatible values There are some more General Register Files used in devicetree files already, but as of now undocumented in the binding document, fix that. Signed-off-by: Heiko Stuebner Reviewed-by: Douglas Anderson Acked-by: Rob Herring Reviewed-by: Shawn Lin Documentation/devicetree/bindings/soc/rockchip/grf.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 7c294e00264119c74f69e4033da08cb135cfc8af Author: Krzysztof Kozlowski Date: Fri Jan 6 09:02:52 2017 +0200 arm64: dts: exynos: Remove unsupported regulator-always-off property from TM2E The regulator property 'regulator-always-off' is not documented and not supported. Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 1 - 1 file changed, 1 deletion(-) commit 712fa1777207c2f2703a6eb618a9699099cbe37b Author: Shawn Lin Date: Fri Dec 16 17:42:36 2016 +0800 arm64: dts: rockchip: add max-link-speed for rk3399 Per the errata of TRM, rk3399 won't support gen2 from now on, so let's set max-link-speed to 1 in order not to doing training for gen2. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 1 file changed, 1 insertion(+) commit b3b73b8e6df685ba61476b256f98eff1d650c199 Author: Florian Westphal Date: Thu Jan 5 13:23:58 2017 +0100 xfrm: state: do not acquire lock in get_mtu helpers Once flow cache gets removed the mtu initialisation happens for every skb that gets an xfrm attached, so this lock starts to show up in perf. It is not obvious why this lock is required -- the caller holds reference on the state struct, type->destructor is only called from the state gc worker (all state structs on gc list must have refcount 0). xfrm_init_state already has been called (else private data accessed by type->get_mtu() would not be set up). So just remove the lock -- the race on the state (DEAD?) doesn't matter (could change right after dropping the lock too). Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7f0f5460d46867a8f980683136a054cff1357780 Author: Dinh Nguyen Date: Tue Dec 20 00:01:48 2016 -0600 ARM: dts: socfpga: add missing compatible string for SDRAM controller Add "altr,sdr-ctl" to the SDRAM controller node. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 984442b72c23981510762518696a82d564d71a97 Author: Dinh Nguyen Date: Mon Dec 19 23:21:27 2016 -0600 ARM: dts: socfpga: add fpga region support on Arria10 Add the base FPGA region for DT overlay support in FPGA programming. Signed-off-by: Alan Tull Signed-off-by: Matthew Gerlach Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7c8e5afd68733d0747c4ac2b5de58c54fb19763e Author: Alan Tull Date: Fri Feb 26 14:21:04 2016 -0600 ARM: dts: socfpga: add base fpga region and fpga bridges Add h2f and lwh2f bridges. Add base FPGA Region to support DT overlays for FPGA programming. Add l3regs. Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen --- v2: removed fpga-bridges, ranges, and reset-names arch/arm/boot/dts/socfpga.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 12bf98b91f7aa8a9a526309aba645ccdcc470cab Author: Dou Liyang Date: Thu Jan 5 17:54:43 2017 +0800 x86/apic: Fix typos in comments s/ID/IDs/ s/inr_logical_cpuidi/nr_logical_cpuids/ s/generic_processor_info()/__generic_processor_info()/ Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1483610083-24314-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1e620f9b23e598ab936ece12233e98e97930b692 Author: Boris Ostrovsky Date: Thu Dec 8 11:44:31 2016 -0500 x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C The new Xen PVH entry point requires page tables to be setup by the kernel since it is entered with paging disabled. Pull the common code out of head_32.S so that mk_early_pgtbl_32() can be invoked from both the new Xen entry point and the existing startup_32() code. Convert resulting common code to C. Signed-off-by: Boris Ostrovsky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: matt@codeblueprint.co.uk Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1481215471-9639-1-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_32.h | 32 ++++++++++ arch/x86/kernel/head32.c | 62 +++++++++++++++++++ arch/x86/kernel/head_32.S | 121 +++----------------------------------- 3 files changed, 101 insertions(+), 114 deletions(-) commit ecc7ea5dd1409d4e6dfba2f0ff0ee1c6ccd855bd Author: Andy Shevchenko Date: Thu Jan 5 18:17:17 2017 +0200 x86/platform/intel-mid: Enable GPIO keys on Merrifield The Merrifield firmware provides 3 descriptions of buttons connected to GPIO. Append them to the list of supported GPIO keys. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170105161717.115261-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/platform_gpio_keys.c | 3 +++ 1 file changed, 3 insertions(+) commit a01b3391b542aaaed539f9d9d6d0d4d6502ab9c6 Author: Andy Shevchenko Date: Thu Jan 5 15:02:35 2017 +0200 x86/platform/intel-mid: Get rid of duplication of IPC handler There is no other device handler than ipc_device_handler() and sfi.c already has a handler for IPC devices. Replace a pointer to custom handler by a flag. Due to this change adjust sfi_handle_ipc_dev() to handle it instead of ipc_device_handler(). Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170105130235.177792-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel-mid.h | 4 +- arch/x86/platform/intel-mid/device_libs/Makefile | 1 - .../platform/intel-mid/device_libs/platform_ipc.c | 59 ---------------------- .../platform/intel-mid/device_libs/platform_ipc.h | 18 ------- .../intel-mid/device_libs/platform_msic_audio.c | 3 +- .../intel-mid/device_libs/platform_msic_battery.c | 3 +- .../intel-mid/device_libs/platform_msic_gpio.c | 3 +- .../intel-mid/device_libs/platform_msic_ocd.c | 3 +- .../device_libs/platform_msic_power_btn.c | 3 +- .../intel-mid/device_libs/platform_msic_thermal.c | 3 +- arch/x86/platform/intel-mid/sfi.c | 55 ++++++++++++-------- 11 files changed, 40 insertions(+), 115 deletions(-) commit 4b5b61eaf8b70838750a1e6dc80ecd044c8f4b3f Author: Andy Shevchenko Date: Thu Jan 5 15:02:34 2017 +0200 x86/platform/intel-mid: Remove Moorestown code The Moorestown support code was removed by: a8359e411eb ("x86/mid: Remove Intel Moorestown"). Remove this leftover as well. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170105130235.177792-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/Makefile | 1 - .../platform/intel-mid/device_libs/platform_ipc.c | 9 ---- .../intel-mid/device_libs/platform_pmic_gpio.c | 54 ---------------------- 3 files changed, 64 deletions(-) commit d74b9db5e8e0f877468b9047a0927bd92dc54dea Author: Andi Shyti Date: Fri Dec 30 13:14:21 2016 +0900 arm64: dts: exynos: Comply to the samsung pinctrl naming convention in TM2 Change the PIN() macro definition so that it can use the macros from pinctrl/samsung.h header file. Signed-off-by: Andi Shyti Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 25 +- arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 254 ++++++++++----------- 2 files changed, 133 insertions(+), 146 deletions(-) commit 4c50383e87472f8abb607ede597e6e6625120854 Author: Andi Shyti Date: Fri Dec 30 13:14:20 2016 +0900 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos5433 Use the macros defined in include/dt-bindings/pinctrl/samsung.h instead of hardcoded values. Signed-off-by: Andi Shyti Reviewed-by: Chanwoo Choi Acked-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 348 +++++++++++---------- 1 file changed, 175 insertions(+), 173 deletions(-) commit 7f0f6c9eb136f91898558c1e349c32b1fbbd936e Merge: 295b8c5 eba7e6c Author: Krzysztof Kozlowski Date: Fri Jan 6 08:52:00 2017 +0200 Merge branch 'for-v4.11/pinctrl-macros' into next/dt64 Merge the dt-bindings header with necessary defines before they could be used in DTS. commit eba7e6c6e528e621f1388d0084e320fe370eea4b Author: Andi Shyti Date: Fri Dec 30 13:14:19 2016 +0900 pinctrl: dt-bindings: samsung: add drive strength macros for Exynos5433 Commit 5db7e3bb87df ("pinctrl: dt-bindings: samsung: Add header with values used for configuration") has added a header file for defining the pinctrl values in order to avoid hardcoded settings in the Exynos DTS related files. Extend samsung.h to the Exynos5433 for drive strength values which are strictly related to the particular SoC and may defer from others. Signed-off-by: Andi Shyti Reviewed-by: Chanwoo Choi Acked-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski include/dt-bindings/pinctrl/samsung.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 352e5fd105982a9ea47d00c7256d6a2b7bb44d89 Author: James Smart Date: Fri Dec 30 06:57:47 2016 -0800 scsi: lpfc: Reinstate lpfc_soft_wwn parameter The lpfc 11.2.0.4 patch set deprecated, by removing, the lpfc_soft_wwn parameter support. This patch reinstates support, but adds a warning in the enablement of the feature that indicates Broadcom (Emulex) does not support the feature. Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 4 + drivers/scsi/lpfc/lpfc_attr.c | 223 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_init.c | 16 ++- 3 files changed, 240 insertions(+), 3 deletions(-) commit af5179a405c0df36413ea6bb838cf45abc1a6189 Author: Andy Shevchenko Date: Thu Jan 5 13:38:06 2017 +0200 power: supply: remove Intel Moorestown battery support The Moorestown support was removed by commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Remove this leftover. Signed-off-by: Andy Shevchenko Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 7 - drivers/power/supply/Makefile | 1 - drivers/power/supply/intel_mid_battery.c | 795 ------------------------------- 3 files changed, 803 deletions(-) commit da7b66e720dcfb6754d6e3310a7ef315009b13db Author: John Garry Date: Tue Jan 3 20:24:50 2017 +0800 scsi: hisi_sas: lock sensitive region in hisi_sas_slot_abort() When we call hisi_sas_slot_task_free() we should grab the hisi_hba.lock, as hisi_sas_slot_task_free() accesses common hisi_hba elements. Function hisi_sas_slot_abort() is missing this, so add it. Signed-off-by: John Garry Reviewed-by: Zhangfei Gao Tested-by: Hanjun Guo Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 64d63187325884b96f684f1d839ec5d5ce231b92 Author: John Garry Date: Tue Jan 3 20:24:49 2017 +0800 scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt There is a bug in the current driver in that certain hisi_hba and port structure elements which we access when servicing the CQ interrupt do not use thread-safe accesses; these include hisi_sas_port linked-list of active slots (hisi_sas_port.entry), bitmap of currently allocated IPTT (in hisi_hba.slot_index_tags), and completion queue read pointer. As a solution, lock these elements with the hisi_hba.lock. Signed-off-by: John Garry Reviewed-by: Xiang Chen Reviewed-by: Zhangfei Gao Tested-by: Hanjun Guo Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 ++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 ++ 2 files changed, 4 insertions(+) commit d177c408113e5d8b664b2ae34e5cd7b27c686a12 Author: John Garry Date: Tue Jan 3 20:24:48 2017 +0800 scsi: hisi_sas: service v2 hw CQ ISR with tasklet Currently the all the slot processing for the completion queue is done in ISR context. It is judged that the slot processing can take a long time, especially when a SATA NCQ completes (upto 32 slots). So, as a solution, defer the bulk of the ISR processing to tasklet context. Each CQ will have its down tasklet. Signed-off-by: John Garry Reviewed-by: Xiang Chen Reviewed-by: Zhangfei Gao Tested-by: Hanjun Guo Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) commit ab3dabb3e8cf077850f20610f73a0def1fed10cb Author: Javier Martinez Canillas Date: Mon Jan 2 11:04:58 2017 -0300 scsi: ufs-qcom: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/scsi/ufs/ufs-qcom.ko | grep alias $ After this patch: $ modinfo drivers/scsi/ufs/ufs-qcom.ko | grep alias alias: of:N*T*Cqcom,ufshcC* alias: of:N*T*Cqcom,ufshc Signed-off-by: Javier Martinez Canillas Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 1 + 1 file changed, 1 insertion(+) commit ff8e20c66249210563aaea5382b08c94933f720d Author: Dolev Raviv Date: Thu Dec 22 18:42:18 2016 -0800 scsi: ufs: Improve fatal error logs Errors such as UIC error, illegal OCS values, and others may require more information for debugging. Such information could be hibern8 events, events sequences, recoverable errors, error history, and more. This patch improves tracking of important errors and events in debug level to be enabled when debugging a such issues. It includes: * UIC error history * Successful hibern8 events * Successful command after hibern8 exit * Clk-freq info * Failed device command * Infrastructure for dumping host controller debug information Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 203 ++++++++++++++++++++++++++++++++++++---------- drivers/scsi/ufs/ufshcd.h | 47 +++++++++++ 2 files changed, 208 insertions(+), 42 deletions(-) commit 1a07f2d96eb9085396cbfb2d6d42d4003aa2934a Author: Lee Susman Date: Thu Dec 22 18:42:03 2016 -0800 scsi: ufs: add trace event for ufs commands Use the ftrace infrastructure to conditionally trace ufs command events. New trace event is created, which samples the following ufs command data: - device name - optional identification string - task tag - doorbell register - number of transfer bytes - interrupt status register - request start LBA - command opcode Currently we only fully trace read(10) and write(10) commands. All other commands which pass through ufshcd_send_command() will be printed with "-1" in the lba and transfer_len fields. Usage: echo 1 > /sys/kernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 42 +++++++++++++++++++++++++++++++++++++++++- include/trace/events/ufs.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) commit 911a0771b6fa7bac5eae753c17c87ecb77c77283 Author: subhashj@codeaurora.org Date: Thu Dec 22 18:41:48 2016 -0800 scsi: ufs: add time profiling support This patch adds the profiling support for some of the time critical operations like hibern8 enter/exit, clock gating & clock scaling. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 24 ++++++++++++++++++++++++ include/trace/events/ufs.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit d2aebb9b269b3e094b2d2d03121c3863b683a25b Author: subhashj@codeaurora.org Date: Thu Dec 22 18:41:33 2016 -0800 scsi: ufs: fix setting init power mode Immediately after successful UFS link startup, UFS link power mode would be in PWM-G1, 1-lane, SLOW-AUTO mode. But currently we are doing few of the DME local/peer attributes access before setting the "hba->pwr_info" to default power mode. If we are doing link startup as part of error recovery then old power mode might be set to FAST mode and doing DME peer access (after link startup but before updating "hba->pwr_info" to default power mode) unintentionally tries to switch from FAST to FAST_AUTO mode (if UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE quirk is enabled). Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4e768e7645ec4ffa92ee163643777b261ae97142 Author: subhashj@codeaurora.org Date: Thu Dec 22 18:41:22 2016 -0800 scsi: ufs: add capability to keep auto bkops always enabled UFS device requires to perform bkops (back ground operations) periodically but host can control (via auto-bkops parameter of device) when device can perform bkops based on its performance requirements. In general, host would like to enable the device's auto-bkops only when it's not doing any regular data transfer but sometimes device may not behave properly if host keeps the auto-bkops disabled. This change adds the capability to let the device auto-bkops always enabled except suspend. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 33 ++++++++++++++++++++++----------- drivers/scsi/ufs/ufshcd.h | 13 +++++++++++++ 2 files changed, 35 insertions(+), 11 deletions(-) commit 0c8f75869ed8941fcbf21643fced7bc652f68f14 Author: subhashj@codeaurora.org Date: Thu Dec 22 18:41:11 2016 -0800 scsi: ufs: set default UFS power management level UFS device and link can be put in multiple different low power modes hence UFS driver supports multiple different low power modes. This change sets the default UFS power management level which should put the link hibernate state and device in sleep state. This default power management level gives good power savings with relatively less enter/exit latencies. Reviewed-by: Yaniv Gardi Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 09690d5a6ae1b7e4cb5ac429c311b99d09352c12 Author: subhashj@codeaurora.org Date: Thu Dec 22 18:41:00 2016 -0800 scsi: ufs: provide sysfs attribute to select the PM level This patch provides the sysfs attribute to choose the power management level for UFS runtime and system suspend. Reviewed-by: Sujit Reddy Thumma Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshcd.h | 2 + 2 files changed, 146 insertions(+) commit fcb0c4b08a18fe35c3adc594d3edc8e335ff7960 Author: Sahitya Tummala Date: Thu Dec 22 18:40:50 2016 -0800 scsi: ufs: Add sysfs node to dynamically control clock scaling Provide an option to enable/disable clock scaling during runtime. Write 1/0 to "clkscale_enable" sysfs node to enable/disable clock scaling. Signed-off-by: Sahitya Tummala Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 95 +++++++++++++++++++++++++++++++++++++++-------- drivers/scsi/ufs/ufshcd.h | 4 +- 2 files changed, 82 insertions(+), 17 deletions(-) commit b427411abb3d61c234cb7dd58bc9b9f92c0fd8cb Author: Sahitya Tummala Date: Thu Dec 22 18:40:39 2016 -0800 scsi: ufs: Add sysfs node to dynamically control clock gating Provide an option to enable/disable clock gating during runtime. Write 1 or 0 to "clkgate_enable" sysfs node to enable/disable clock gating. Signed-off-by: Sahitya Tummala Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++- drivers/scsi/ufs/ufshcd.h | 4 ++++ 2 files changed, 51 insertions(+), 1 deletion(-) commit e7d38257a40f880c6625fac33956d5e99dcd63a6 Author: Dolev Raviv Date: Thu Dec 22 18:40:07 2016 -0800 scsi: ufs: fix multiple ufs spec violation When a command to a W-LU is timed out via scsi, error handling will treat it as any other LU and send commands such as START_STOP with wrong format or task abort. Those commands are illegal for W-LU according to the UFS spec. To solve it, when an error is recognized those steps are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 7ff5ab4736333431311a4cbbfb574b155758b08c Author: subhashj@codeaurora.org Date: Thu Dec 22 18:39:51 2016 -0800 scsi: ufs: add tracing support This change adds the ftrace support for following: 1. UFS initialization time 2. Clock gating states 3. Clock scaling states 4. Power management APIs latency 5. BKOPs enable/disable Usage: echo 1 > /sys/kernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 85 ++++++++++++++++++--- include/trace/events/ufs.h | 185 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 258 insertions(+), 12 deletions(-) commit 66cc820f9cbf12f1c6c84fb7392847b7fa5e76c4 Author: Dolev Raviv Date: Thu Dec 22 18:39:42 2016 -0800 scsi: ufs: dump debug info during failures Inserts driver dumps for UFS Host Controller registers, Transfer Requests and Task Management Requests. The dumps will occur on driver initialization failure, ufshcd_abort() and on error handling path. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshci.h | 3 ++ 2 files changed, 132 insertions(+) commit 4e552c8cb5bc9137e67e035bab8df6dddbca7384 Author: Andi Shyti Date: Thu Jan 5 11:34:12 2017 +0900 leds: add LED_ON brightness as boolean value Some devices do not handle the led brightness or simply don't care about it. Conceptually said devices want to just switch on or off the led. It is useless in this case to have a 255 range of brightness, while just having an LED_ON and LED_OFF improves the boolean meaning of the led status. Signed-off-by: Andi Shyti Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski include/linux/leds.h | 1 + 1 file changed, 1 insertion(+) commit e64b8cc72bf9958efd4f38e55d2980c95e0ce679 Author: Rafał Miłecki Date: Tue Dec 6 09:32:03 2016 +0100 DT: leds: Improve examples by adding some context During my work on some new LED trigger I tried adding example similar to the existing ones which received following comment from Rob: > It's not really clear in the example this is an LED node as it is > incomplete. Keeping that in mind I suggest adding context for the existing example entries in hope to make documentation more clear. Signed-off-by: Rafał Miłecki Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/leds/common.txt | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) commit f57e8384c5d2417fd8707c577d8e622fc1570b6c Author: Icenowy Zheng Date: Wed Nov 23 00:59:02 2016 +0800 arm64: dts: enable the MUSB controller of Pine64 in host-only mode A64 has a MUSB controller wired to the USB PHY 0, which is connected to the upper USB Type-A port of Pine64. As the port is a Type-A female port, enable it in host-only mode in the device tree, which makes devices with USB Type-A male port can work on this port (which is originally designed by Pine64 team). Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 972a3ecdf27f3ebdd1ce0dccd1b548ef3c04b8ed Author: Icenowy Zheng Date: Wed Nov 23 00:59:01 2016 +0800 arm64: dts: add MUSB node to Allwinner A64 dtsi Allwinner A64 SoC has a MUSB controller like the one in A33, so add a node for it, just use the compatible of A33 MUSB. Host mode is tested to work properly on Pine64 and will be added into the device tree of Pine64 in next patch. Peripheral mode is also tested on Pine64, by changing dr_mode property of usb_otg node and use a non-standard USB Type-A to Type-A cable. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d49f9dbc8f0c4521fa56477d051a3bd1158f2595 Author: Icenowy Zheng Date: Tue Nov 22 23:58:31 2016 +0800 arm64: dts: allwinner: enable EHCI1, OHCI1 and USB PHY nodes in Pine64 Pine64 have two USB Type-A ports, which are wired to the two ports of A64 USB PHY, and the lower port is the EHCI/OHCI1 port. Enable the necessary nodes to enable the lower USB port to work. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ac93c09cdbaf1229c21f67a5db1c3c6df7d503e5 Author: Icenowy Zheng Date: Tue Nov 22 23:58:30 2016 +0800 arm64: dts: allwinner: sort the nodes in sun50i-a64-pine64.dts In this dts file, uart0 node is put before i2c1. Move the uart0 node to the end to satisfy alphebetical order. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a004ee350177ece3c059831ea49293d62aea7ca6 Author: Icenowy Zheng Date: Tue Nov 22 23:58:29 2016 +0800 arm64: dts: allwinner: add USB1-related nodes of Allwinner A64 Allwinner A64 have two HCI USB controllers, a OTG controller and a USB PHY device which have two ports. One of the port is wired to both a HCI USB controller and the OTG controller, which is currently not supported. The another one is only wired to a HCI controller, and the device node of OHCI/EHCI controller of the port can be added now. Also the A64 USB PHY device node is also added for the HCI controllers to work. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 7ec73b7e36d0bf165cea77770a490fcdf4418e93 Author: Chris Wilson Date: Thu Jan 5 17:00:59 2017 +0000 drm/i915: Only skip requests once a context is banned If we skip before banning, we have an inconsistent interface between execbuf still queueing valid request but those requests already queued being cancelled. If we only cancel the pending requests once we stop accepting new requests, the user interface is more consistent. Reported-by: Tvrtko Ursulin Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: # v4.9+ Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105170059.344-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit b7163936bd99dab90a71c2496295f62f2b4874ab Author: Chris Wilson Date: Thu Jan 5 16:41:48 2017 +0000 drm/i915: Move a few more utility macros to i915_utils.h Now that we have split out a header file for simple macros (that maybe we can promote into a core header), move a few macros across from i915_drv.h Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170105164148.26875-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_drv.h | 20 -------------------- drivers/gpu/drm/i915/i915_utils.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) commit 210af2a5f12403a8968d6014742886cc7e9823b4 Author: Corey Minyard Date: Thu Jan 5 10:52:10 2017 -0600 ipmi: make ipmi_usr_hndl const It's only function pointers. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_devintf.c | 2 +- drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- drivers/char/ipmi/ipmi_watchdog.c | 2 +- include/linux/ipmi.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 08f6cd01fe77712fda512472346647021a8a3c25 Author: Rami Rosen Date: Sun Dec 18 21:11:54 2016 +0200 Documentation: Fix a typo in IPMI.txt. This patch fixes a trivial type in IPMI.txt. Signed-off-by: Rami Rosen Signed-off-by: Corey Minyard Documentation/IPMI.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f07b352021483a3a38f081dc284928400a9c1d2c Author: Bob Peterson Date: Thu Jan 5 16:01:45 2017 -0500 GFS2: Made logd daemon take into account log demand Before this patch, the logd daemon only tried to flush things when the log blocks pinned exceeded a certain threshold. But when we're deleting very large files, it may require a huge number of journal blocks, and that, in turn, may exceed the threshold. This patch factors that into account. Signed-off-by: Bob Peterson fs/gfs2/incore.h | 1 + fs/gfs2/log.c | 9 +++++++-- fs/gfs2/ops_fstype.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) commit 02bbd9802da76dcfa422e1a9e9336253ecab4b6f Author: Greg Kroah-Hartman Date: Thu Jan 5 21:59:37 2017 +0100 staging: i4l: delete the whole thing It's now 2017, and a new LTS kernel has been chosen, so let's do what we said we would do in the TODO file and delete this code. If it's still needed, and a maintainer steps up to take it over, we will easily revert it. Cc: Arnd Bergmann Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/i4l/Documentation/README.act2000 | 104 -- drivers/staging/i4l/Documentation/README.icn | 148 -- drivers/staging/i4l/Documentation/README.pcbit | 40 - drivers/staging/i4l/Documentation/README.sc | 281 ---- drivers/staging/i4l/Kconfig | 13 - drivers/staging/i4l/Makefile | 5 - drivers/staging/i4l/TODO | 3 - drivers/staging/i4l/act2000/Kconfig | 9 - drivers/staging/i4l/act2000/Makefile | 9 - drivers/staging/i4l/act2000/act2000.h | 202 --- drivers/staging/i4l/act2000/act2000_isa.c | 444 ------ drivers/staging/i4l/act2000/act2000_isa.h | 136 -- drivers/staging/i4l/act2000/capi.c | 1187 --------------- drivers/staging/i4l/act2000/capi.h | 357 ----- drivers/staging/i4l/act2000/module.c | 816 ----------- drivers/staging/i4l/icn/Kconfig | 12 - drivers/staging/i4l/icn/Makefile | 5 - drivers/staging/i4l/icn/icn.c | 1696 ---------------------- drivers/staging/i4l/icn/icn.h | 252 ---- drivers/staging/i4l/pcbit/Kconfig | 10 - drivers/staging/i4l/pcbit/Makefile | 9 - drivers/staging/i4l/pcbit/callbacks.c | 345 ----- drivers/staging/i4l/pcbit/callbacks.h | 44 - drivers/staging/i4l/pcbit/capi.c | 646 -------- drivers/staging/i4l/pcbit/capi.h | 81 -- drivers/staging/i4l/pcbit/drv.c | 1070 -------------- drivers/staging/i4l/pcbit/edss1.c | 310 ---- drivers/staging/i4l/pcbit/edss1.h | 99 -- drivers/staging/i4l/pcbit/layer2.c | 710 --------- drivers/staging/i4l/pcbit/layer2.h | 281 ---- drivers/staging/i4l/pcbit/module.c | 125 -- drivers/staging/i4l/pcbit/pcbit.h | 177 --- 34 files changed, 9629 deletions(-) commit a8ba798bc8ec663cf02e80b0dd770324de9bafd9 Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:52 2016 +0800 selftests: enable O and KBUILD_OUTPUT Enable O and KBUILD_OUTPUT for kselftest. User could compile kselftest to another directory by passing O or KBUILD_OUTPUT. And O is high priority than KBUILD_OUTPUT. Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 36 ++++++++++++++++------ tools/testing/selftests/exec/Makefile | 13 ++++---- tools/testing/selftests/ftrace/Makefile | 2 +- tools/testing/selftests/futex/Makefile | 21 ++++++++++--- tools/testing/selftests/kcmp/Makefile | 2 +- tools/testing/selftests/lib.mk | 19 +++++++++--- tools/testing/selftests/powerpc/Makefile | 15 +++++---- .../testing/selftests/powerpc/benchmarks/Makefile | 6 ++-- tools/testing/selftests/powerpc/copyloops/Makefile | 8 ++--- tools/testing/selftests/powerpc/dscr/Makefile | 2 +- tools/testing/selftests/powerpc/math/Makefile | 12 ++++---- tools/testing/selftests/powerpc/mm/Makefile | 6 ++-- tools/testing/selftests/powerpc/pmu/Makefile | 16 +++++----- tools/testing/selftests/powerpc/pmu/ebb/Makefile | 4 +-- .../selftests/powerpc/switch_endian/Makefile | 8 ++--- tools/testing/selftests/powerpc/tm/Makefile | 6 ++-- tools/testing/selftests/vm/Makefile | 4 +-- tools/testing/selftests/x86/Makefile | 17 +++++----- 18 files changed, 122 insertions(+), 75 deletions(-) commit 80d443e8876602be2c130f79c4de81e12e2a700d Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:51 2016 +0800 selftests: add EXTRA_CLEAN for clean target Some testcases need the clean extra data after running. This patch introduce the "EXTRA_CLEAN" variable to address this requirement. After KBUILD_OUTPUT is enabled in later patch, it will be easy to decide to if we need do the cleanup in the KBUILD_OUTPUT path(if the testcase ran immediately after compiled). Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/exec/Makefile | 19 +++++++++---------- tools/testing/selftests/ftrace/Makefile | 4 +--- tools/testing/selftests/kcmp/Makefile | 4 ++-- tools/testing/selftests/lib.mk | 2 +- .../testing/selftests/powerpc/switch_endian/Makefile | 5 ++--- tools/testing/selftests/pstore/Makefile | 4 +--- tools/testing/selftests/zram/Makefile | 3 +-- 7 files changed, 17 insertions(+), 24 deletions(-) commit 5a2d4a5763c96a19170f81f2c4bb3cc9515f854a Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:50 2016 +0800 selftests: remove CROSS_COMPILE in dedicated Makefile After previous clean up patches, memfd and timers could get CROSS_COMPILE from tools/testing/selftest/lib.mk. There is no need to preserve these definition. So, this patch remove them. Acked-by: Michael Ellerman Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/memfd/Makefile | 1 - tools/testing/selftests/timers/Makefile | 1 - 2 files changed, 2 deletions(-) commit 7d758af257bc40a8a599a0aaa4768b30fb463e9c Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:49 2016 +0800 selftests: add default rules for c source file There are difference rules for compiling c source file in different testcases. In order to enable KBUILD_OUTPUT support in later patch, this patch introduce the default rules in "tools/testing/selftest/lib.mk" and remove the existing rules in each testcase. Acked-by: Michael Ellerman Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/exec/Makefile | 2 -- tools/testing/selftests/lib.mk | 3 +++ tools/testing/selftests/mount/Makefile | 3 --- tools/testing/selftests/net/Makefile | 2 -- tools/testing/selftests/size/Makefile | 4 +--- tools/testing/selftests/vm/Makefile | 17 ++++++----------- 6 files changed, 10 insertions(+), 21 deletions(-) commit 5fe59799352b2e2e2dfcf84585c6d780d6effb0e Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:48 2016 +0800 selftests: remove useless TEST_DIRS The TEST_DIRS was introduced in Commit e8c1d7cdf137 ("selftests: copy TEST_DIRS to INSTALL_PATH") for coping a whole directory in ftrace. After rsync(with -a) is introduced by Commit 900d65ee11aa ("selftests: change install command to rsync"). Rsync could handle the directory without the definition of TEST_DIRS. This patch simply replace TEST_DIRS with TEST_FILES in ftrace and remove the TEST_DIRS in tools/testing/selftest/lib.mk Acked-by: Michael Ellerman Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/Makefile | 2 +- tools/testing/selftests/lib.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 88baa78d1f318e57c7cccbfe55d485befd1ce696 Author: bamvor.zhangjian@huawei.com Date: Tue Nov 29 19:55:47 2016 +0800 selftests: remove duplicated all and clean target Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to indicate the test program, extended test program and test files. It is easy to understand the purpose of these files. But mix of compiled and uncompiled files lead to duplicated "all" and "clean" targets. In order to remove the duplicated targets, introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled objects. Also, the later patch will make use of TEST_GEN_XXX to redirect these files to output directory indicated by KBUILD_OUTPUT or O. And add this changes to "Contributing new tests(details)" of Documentation/kselftest.txt. Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan Documentation/kselftest.txt | 12 +++++++++++ tools/testing/selftests/bpf/Makefile | 10 ++------- tools/testing/selftests/breakpoints/Makefile | 10 +++------ tools/testing/selftests/capabilities/Makefile | 11 ++-------- tools/testing/selftests/efivarfs/Makefile | 8 +------- tools/testing/selftests/exec/Makefile | 10 ++++----- tools/testing/selftests/futex/functional/Makefile | 12 +++-------- tools/testing/selftests/ipc/Makefile | 7 +------ tools/testing/selftests/kcmp/Makefile | 6 ++---- tools/testing/selftests/lib.mk | 18 ++++++++++++---- tools/testing/selftests/membarrier/Makefile | 6 +----- tools/testing/selftests/memfd/Makefile | 14 +++---------- tools/testing/selftests/mount/Makefile | 6 ++---- tools/testing/selftests/mqueue/Makefile | 6 +----- tools/testing/selftests/net/Makefile | 13 ++++-------- tools/testing/selftests/nsfs/Makefile | 9 +------- tools/testing/selftests/powerpc/alignment/Makefile | 9 ++------ .../testing/selftests/powerpc/benchmarks/Makefile | 11 +++------- .../selftests/powerpc/context_switch/Makefile | 9 ++------ tools/testing/selftests/powerpc/copyloops/Makefile | 11 +++------- tools/testing/selftests/powerpc/dscr/Makefile | 13 ++++-------- tools/testing/selftests/powerpc/math/Makefile | 13 ++++-------- tools/testing/selftests/powerpc/mm/Makefile | 12 ++++------- tools/testing/selftests/powerpc/pmu/Makefile | 12 +++++------ tools/testing/selftests/powerpc/pmu/ebb/Makefile | 11 +++------- .../testing/selftests/powerpc/primitives/Makefile | 9 ++------ .../testing/selftests/powerpc/stringloops/Makefile | 9 ++------ .../selftests/powerpc/switch_endian/Makefile | 8 +++----- tools/testing/selftests/powerpc/syscalls/Makefile | 9 ++------ tools/testing/selftests/powerpc/tm/Makefile | 11 +++------- tools/testing/selftests/powerpc/vphn/Makefile | 10 +++------ tools/testing/selftests/ptrace/Makefile | 8 +------- tools/testing/selftests/seccomp/Makefile | 6 +----- tools/testing/selftests/sigaltstack/Makefile | 5 +---- tools/testing/selftests/size/Makefile | 6 +----- tools/testing/selftests/timers/Makefile | 9 ++------ tools/testing/selftests/vm/Makefile | 24 +++++++++------------- 37 files changed, 118 insertions(+), 255 deletions(-) commit c1878f7a89efbbe1ac0082d09b2928782a6ceba1 Author: Sowmini Varadhan Date: Thu Jan 5 11:06:22 2017 -0800 tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback. Packets from any/all interfaces may be queued up on the PF_PACKET socket before it is bound to the loopback interface by psock_tpacket, and when these are passed up by the kernel, they could interfere with the Rx tests. Avoid interference from spurious packet by blocking Rx until the socket filter has been set up, and the packet has been bound to the desired (lo) interface. The effective sequence is socket(PF_PACKET, SOCK_RAW, 0); set up ring Invoke SO_ATTACH_FILTER bind to sll_protocol set to ETH_P_ALL, sll_ifindex for lo After this sequence, the only packets that will be passed up are those received on loopback that pass the attached filter. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller tools/testing/selftests/net/psock_tpacket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad02c4f547826167a709dab8a89a1caefd2c1f50 Author: Soheil Hassas Yeganeh Date: Wed Jan 4 11:19:34 2017 -0500 tcp: provide timestamps for partial writes For TCP sockets, TX timestamps are only captured when the user data is successfully and fully written to the socket. In many cases, however, TCP writes can be partial for which no timestamp is collected. Collect timestamps whenever any user data is (fully or partially) copied into the socket. Pass tcp_write_queue_tail to tcp_tx_timestamp instead of the local skb pointer since it can be set to NULL on the error path. Note that tcp_write_queue_tail can be NULL, even if bytes have been copied to the socket. This is because acknowledgements are being processed in tcp_sendmsg(), and by the time tcp_tx_timestamp is called tcp_write_queue_tail can be NULL. For such cases, this patch does not collect any timestamps (i.e., it is best-effort). This patch is written with suggestions from Willem de Bruijn and Eric Dumazet. Change-log V1 -> V2: - Use sockc.tsflags instead of sk->sk_tsflags. - Use the same code path for normal writes and errors. Signed-off-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Cc: Willem de Bruijn Cc: Eric Dumazet Cc: Neal Cardwell Cc: Martin KaFai Lau Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/tcp.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 2fcf5cc3be06126f9aa2430ca6d739c8b3c5aaf5 Author: Bob Peterson Date: Fri Dec 16 08:01:28 2016 -0600 GFS2: Limit number of transaction blocks requested for truncates This patch limits the number of transaction blocks requested during file truncates. If we have very large multi-terabyte files, and want to delete or truncate them, they might span so many resource groups that we overflow the journal blocks, and cause an assert failure. By limiting the number of blocks in the transaction, we prevent this overflow and give other running processes time to do transactions. The limiting factor I chose is sd_log_thresh2 which is currently set to 4/5ths of the journal. This same ratio is used in function gfs2_ail_flush_reqd to determine when a log flush is required. If we make the maximum value less than this, we can get into a infinite hang whereby the log stops moving because the number of used blocks is less than the threshold and the iterative loop needs more, but since we're under the threshold, the log daemon never starts any IO on the log. Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 457c005aaf022bd06a0b835bbbbd35854e98f6c1 Author: Eric S. Stone Date: Thu Jan 5 00:22:15 2017 -0800 staging: gdm724x: update HCI structs with new bitwise types Update the driver's HCI structs and associated endian-converter functions with new driver-specific bitwise types. The new types encourage correct endian-handling within the driver by triggering sparse warnings when mixing with other types. The driver's endian-converters provide correct and warning-free conversions. Driver-specific bitwise types are used instead of the standard endian-specific types because the attached device can be of either endian. This is also why the driver has its own endian-conversion functions, which consider endianness of both the cpu and the attached device. Introducing the new types to the converters fixes the sparse warnings: CHECK drivers/staging/gdm724x/gdm_endian.c drivers/staging/gdm724x/gdm_endian.c:28:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:28:24: expected unsigned short drivers/staging/gdm724x/gdm_endian.c:28:24: got restricted __le16 [usertype] drivers/staging/gdm724x/gdm_endian.c:30:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:30:24: expected unsigned short drivers/staging/gdm724x/gdm_endian.c:30:24: got restricted __be16 [usertype] drivers/staging/gdm724x/gdm_endian.c:36:24: warning: cast to restricted __le16 drivers/staging/gdm724x/gdm_endian.c:38:24: warning: cast to restricted __be16 drivers/staging/gdm724x/gdm_endian.c:44:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:44:24: expected unsigned int drivers/staging/gdm724x/gdm_endian.c:44:24: got restricted __le32 [usertype] drivers/staging/gdm724x/gdm_endian.c:46:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:46:24: expected unsigned int drivers/staging/gdm724x/gdm_endian.c:46:24: got restricted __be32 [usertype] drivers/staging/gdm724x/gdm_endian.c:52:24: warning: cast to restricted __le32 drivers/staging/gdm724x/gdm_endian.c:54:24: warning: cast to restricted __be32 Signed-off-by: Eric S. Stone Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_endian.c | 24 +++++++++---------- drivers/staging/gdm724x/gdm_endian.h | 15 ++++++++---- drivers/staging/gdm724x/hci_packet.h | 46 ++++++++++++++++++------------------ 3 files changed, 46 insertions(+), 39 deletions(-) commit 64cd405ac9b94e99ce5544fbc156690ae867ae3a Author: Ivan Safonov Date: Wed Jan 4 17:22:17 2017 +0700 staging:r8188eu: eleminate recovery attemp using skb_clone after netdev_alloc_skb fail It is wrong to create new skb using skb_clone instead netdev_alloc_skb, because buffer data will be changed later. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 80c96e08c416b477d8338e5ddc40f47a94068fe0 Author: Ivan Safonov Date: Wed Jan 4 17:22:18 2017 +0700 staging:r8188eu: remove unused WIFI_MP_*STATE and WIFI_MP_CTX* definitions fw_state member of struct mlme_priv never obtain WIFI_MP_STATE value, so code only for (fw_state == WIFI_MP_STATE) is dead. Remove it, WIFI_MP_*STATE and WIFI_MP_CTX* definitions. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 -- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 5 --- drivers/staging/rtl8188eu/core/rtw_recv.c | 42 +------------------------- drivers/staging/rtl8188eu/core/rtw_xmit.c | 2 +- drivers/staging/rtl8188eu/include/rtw_mlme.h | 8 ----- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 8 +---- 6 files changed, 3 insertions(+), 65 deletions(-) commit c3747e003fba6542ea4c87decbda4fa0dfbad281 Author: Ivan Safonov Date: Wed Jan 4 17:22:16 2017 +0700 staging:r8188eu: remove (NDEV|ADPT)_(FMT|ARG) definitions (NDEV|ADPT)_(FMT|ARG) definitions does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 4 ---- 1 file changed, 4 deletions(-) commit e84741a93841cefc7e069d530bdc0ed3b00e382a Author: Ivan Safonov Date: Wed Jan 4 17:22:15 2017 +0700 staging:r8188eu: remove rtw_update_mem_stat definition rtw_update_mem_stat definition does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 1 - 1 file changed, 1 deletion(-) commit c27fb88256fcc51b0136e86c4392c86f590c6daa Author: Ivan Safonov Date: Wed Jan 4 17:22:14 2017 +0700 staging:r8188eu: remove RTW_STATUS_CODE() RTW_STATUS_CODE() does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 2 -- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 12 ------------ 2 files changed, 14 deletions(-) commit 746fb137c1d30fdc690df3df80bf12ff0dcc4fd2 Author: David Binder Date: Tue Jan 3 16:01:15 2017 -0500 staging: unisys: visorbus: visorchipset.c: Don't check for more than PAGE_SIZE length Since a sysfs entry is allocated 1 page of memory (4096 bytes) by default, there is no need to enforce this limit in the driver. This patch corrects visorbus/visorchipset.c. Signed-off-by: David Binder Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7a41385e68da3c63899f3e22b6bdc513e59a1703 Author: David Binder Date: Tue Jan 3 16:01:16 2017 -0500 staging: unisys: visorbus: Don't check for more than PAGE_SIZE length in visorbus Since a sysfs entry is allocated 1 page of memory (4096 bytes) by default, there is no need to enforce this limit in the driver. This patch corrects visorbus/visorbus_main.c. Reported-by: Greg Kroah-Hartman Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 401579c22ccbcb54244494069973e64b1fe980d2 Author: Galo Navarro Date: Tue Jan 3 23:12:09 2017 +0100 staging: rtl8188eu: fix incorrect ERROR tags from logs Several lifecycle events in the rtl8188eu driver are logged using the DBG_88E_LEVEL macro from rtw_debug.h, which is tagged as ERROR regardless of the actual level. Below are dmesg excerpts after loading and unloading the module, the messages are misleading as there was no error. [517434.916239] usbcore: registered new interface driver r8188eu [517435.680653] R8188EU: ERROR indicate disassoc [517437.122606] R8188EU: ERROR assoc success [517797.735611] usbcore: deregistering interface driver r8188eu [517797.736069] R8188EU: ERROR indicate disassoc Remove the ERROR prefix from the logs. After the patch, logs are: [517949.873976] usbcore: registered new interface driver r8188eu [517950.592845] R8188EU: indicate disassoc [517951.993973] R8188EU: assoc success [521778.784448] usbcore: deregistering interface driver r8188eu [521778.784838] R8188EU: indicate disassoc Signed-off-by: Galo Navarro Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbe50fc4320788d3407ed55900fc0a63e172ad6f Author: Ramiro Oliveira Date: Tue Jan 3 14:43:40 2017 +0000 staging: most: change dma_buf variable to __le16 dma_buf is being cast to __le16 *, but it was defined as u16 *. sparse reported this error as: drivers/staging/most/hdm-usb/hdm_usb.c:158:16: warning: cast to restricted __le16 This patch changes dma_buf from u16 to __le16. Signed-off-by: Ramiro Oliveira Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37e65dc184c7258bb94997a5d2865fcb81a066af Merge: 5e6eb45 3e018da Author: David S. Miller Date: Thu Jan 5 12:43:28 2017 -0500 Merge tag 'rxrpc-rewrite-20170105' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Update tracing and proc interfaces This set of patches fixes and extends tracing: (1) Fix the handling of enum-to-string translations so that external tracing tools can make use of it by using TRACE_DEFINE_ENUM. (2) Extend a couple of tracepoints to export some extra available information and add three new tracepoints to allow monitoring of received DATA packets, call disconnection and improper/implicit call termination. and adds a bit more procfs-exported information: (3) Show a call's hard-ACK cursors in /proc/net/rxrpc_calls. ==================== Signed-off-by: David S. Miller commit c887e69d908fb1575bb6f861c0f4f2c1fb61eef1 Author: Scott Matheina Date: Tue Jan 3 19:50:24 2017 -0600 staging:iio:addac Fixes Alignment should match open parenthesis Fixes style issue where Alignment doesn't match open parenthesis Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/addac/adt7316-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ee5a460a34fe0ddf9738aedea991b329e3da189 Author: Gustavo A. R. Silva Date: Wed Jan 4 21:14:36 2017 -0800 Staging: lustre: lustre: lmv: Compress return logic into one line. Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 58 ++++++++--------------------- 1 file changed, 16 insertions(+), 42 deletions(-) commit e1d71498327165ef5b975ddf3dc209205c6173c6 Author: Luca Ceresoli Date: Wed Jan 4 17:55:47 2017 +0100 staging: rtl8188eu: remove unused function _linked_rx_signal_strehgth_display Not referenced anymore since commit 9fe7b29c6cc1 ("staging: rtl8188eu: remove unused field bRxRSSIDisplay in struct adapter"). Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Ivan Safonov Cc: devel@driverdev.osuosl.org Signed-off-by: Luca Ceresoli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 8f95a51e6149c604de1f1deed3aeb832f531faa9 Author: Linus Walleij Date: Thu Jan 5 14:54:00 2017 +0100 ARM: defconfig: omap2plus: switch LIS3LV02DL driver The OMAP2 plus defconfig lists the LIS3LC02D MISC driver but there is nowadays a proper IIO driver for this accelerometer. Switch the config to the new driver. The IIO software triggers are helpful when using these devices without a dedicated IRQ line, so activate those too. Signed-off-by: Linus Walleij Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4d94b4a239eec860701f0d2e07123a0ed5283a22 Author: Aaro Koskinen Date: Mon Jan 2 22:57:05 2017 +0200 ARM: OMAP1: USB: delete redundant CPU class checks Delete redundant CPU class checks. This code is only used on OMAP1 nowadays. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren arch/arm/mach-omap1/usb.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit bde49e5928c5135047749363f40387dad5aa51bf Author: Aaro Koskinen Date: Mon Jan 2 22:57:04 2017 +0200 ARM: OMAP1: USB: make omap_otg_init() static Make omap_otg_init() static. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren arch/arm/mach-omap1/include/mach/usb.h | 2 -- arch/arm/mach-omap1/usb.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 7e600cadda94fff4f984ffa6fff7b5438e518c05 Author: Aaro Koskinen Date: Mon Jan 2 22:57:03 2017 +0200 ARM: OMAP1: USB: tidy up logging output KERN_CONT/pr_cont is now required to continue log messages, use that. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren arch/arm/mach-omap1/usb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 588bfea9108a6226958d7c0e6c5542e6dcc649d2 Author: Emmanuil Chatzipetru Date: Wed Jan 4 17:08:19 2017 +0100 staging: greybus: log: Fix line over 80 characters. Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: WARNING: line over 80 characters This is done by dropping a redundant cast and by replacing the format specifier in dev_err(); to "%zu" instead of "%d", in order to silence the warnings of the compiler. Also, while at it, drop the redundant cast in the comparison as well to maintain consistency. Signed-off-by: Emmanuil Chatzipetru Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8a983614ca956fbf6329be22214de2c1fc47ea1e Author: Emmanuil Chatzipetru Date: Wed Jan 4 17:08:18 2017 +0100 staging: greybus: audio_topology: Fix spaces between operator and string Fix coding style issue caught by checkpatch.pl related to the following warning: - "CHECK: spaces preferred around that '*' (ctx:VxV) " Signed-off-by: Emmanuil Chatzipetru Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6220da0e4d761ede3076186a9319333e5bc4d50 Author: Teresa Remmet Date: Thu Jan 5 15:50:51 2017 +0100 ARM: dts: am335x-wega: Update ethernet phy node Update ethernet phy1 node to use phy-handle now. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-wega.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit cf9d092e2ec345ef40adaf8a9f07f728bc40c484 Author: Teresa Remmet Date: Thu Jan 5 15:50:50 2017 +0100 ARM: dts: am335x-phycore-som: Update ethernet phy node Update ethernet phy0 node to use phy-handle now. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 18175c385281ef2fdb3ef8c39a4dcb14c2470a0e Author: Teresa Remmet Date: Thu Jan 5 15:50:49 2017 +0100 ARM: dts: am335x-wega: Set USB0 mode to otg Set USB0 to otg mode (default) and not fix to peripheral. As it can be used in host mode also. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-wega.dtsi | 1 - 1 file changed, 1 deletion(-) commit 1fe61439c9470e1978f28cd3984740686bfcdc2c Author: Teresa Remmet Date: Thu Jan 5 15:50:48 2017 +0100 ARM: dts: am335x-phycore-som: Add i2c temp sensor Include the i2c temperature sensor which is optionaly mounted on the phyCORE-AM335x-R2 module. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 7f103dc05308ad11b6233cf369b850d13fb655b5 Author: Teresa Remmet Date: Thu Jan 5 15:50:47 2017 +0100 ARM: dts: am335x-phycore-som: Update compatible string for spi nor As we may have different SPI NOR flashes with 8MB populated on phyCORE-AM335x SOM, set the "jedec,spi-nor" SPI Flash compatible string. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2ae7efefb32324bb95fb4485269bff99ca603ed Author: Mark Jackson Date: Thu Dec 15 10:52:13 2016 +0000 ARM: dts: Update Nanobone dts file to add external FRAM chip From v4.2+ the GPMC code has been changed to reset all the bootloader GPMC settings when the kernel starts. As such, this DTS file now needs the external FRAM defined. Signed-off-by: Mark Jackson Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-nano.dts | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 7afa44e0e8dbf80e28e4f5aeaecf5ab6e5487f0d Author: Laurent Pinchart Date: Wed Dec 14 00:37:33 2016 +0200 ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static The omapdss_find_dss_of_node() function isn't used outside of its compilation unit, make it static. Signed-off-by: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/mach-omap2/display.c | 2 +- arch/arm/mach-omap2/display.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 8635cb2c2b1100fa42f27234344f1f31ff53e783 Author: Laurent Pinchart Date: Wed Dec 14 00:37:32 2016 +0200 ARM: OMAP2+: Remove unused omap_display_init() function The omap_display_init() function is unused, remove it. Signed-off-by: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/mach-omap2/display.c | 256 ------------------------------------------ arch/arm/mach-omap2/display.h | 5 - 2 files changed, 261 deletions(-) commit 1a8eca7fa8cad9e4da8a772b7da93584bbda910e Author: Sekhar Nori Date: Tue Dec 13 16:59:47 2016 +0530 ARM: dts: dra72-evm: drop NAND support For the existing IOdelay configuration via U-Boot, NAND is not supported on dra72-evm (both Rev B and Rev C). Disable it. Commit 46cfc8945887 ("ARM: dts: dra72-evm: Remove pinmux configurations for erratum i869") has already removed pinmuxing for NAND making it unusable. Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra72-evm-common.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0c8a507fd291850005899f23f7fda28d057a5fee Author: Kishon Vijay Abraham I Date: Tue Dec 13 16:59:46 2016 +0530 ARM: dts: dra7-evm: add pinmux configuration for mmc1/2 Add pinmux configuration for SD card slot and eMMC device found on TI's DRA74x EVM. Only the default modes are supported. For higher speed modes (UHS and HS200) to function, we need full fledged IODelay support in kernel. IODelay support is yet to be added. Signed-off-by: Kishon Vijay Abraham I [nsekhar@ti.com: rebase to mainline/master, use IOPAD() macro, update commit message] Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit d888e9d7833715e1122ba7641469b80398cec7e4 Author: Sekhar Nori Date: Tue Dec 13 16:59:45 2016 +0530 ARM: dts: dra7-evm: Remove pinmux configurations for erratum i869 Pinmuxing for DRA7x/AM57x family of processors need to be done in IO isolation as part of initial bootloader executed from SRAM. This is done as part of iodelay configuration sequence and is required due to the limitations introduced by erratum ID: i869[1] (IO Glitches can occur when changing IO settings) and elaborated in the Technical Reference Manual[2] 18.4.6.1.7 Isolation Requirements. Only peripheral that is permitted for dynamic pin mux configuration is MMC and DCAN. MMC is permitted to change to accommodate the requirements for varied speeds (which require IO-delay support in kernel as well). DCAN is a result of i893[1] (DCAN initialization sequence). DCAN pinmux is retained in this patch. MMC pinmux is missing from the dra7-evm.dts file and the board is relying on configuration done by bootloader. A subsequent patch will add MMC pinmux configuration. A side-effect of this patch is that NAND support is removed. NAND pins clash with VOUT3 on DRA7-EVM. U-Boot selects VOUT3 over NAND as per TI EVM application needs. [1] http://www.ti.com/lit/pdf/sprz429 [2] http://www.ti.com/lit/pdf/sprui30 Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 267 +---------------------------------------- 1 file changed, 6 insertions(+), 261 deletions(-) commit ca244a83ecc7f0a9242ee2116e622cb6d7ec2a90 Author: Marcin Niestroj Date: Fri Dec 9 12:33:27 2016 +0100 ARM: dts: am335x-chilisom: Wakeup from RTC-only state by power on event On chiliSOM TPS65217 nWAKEUP pin is connected to AM335x internal RTC EXT_WAKEUP input. In RTC-only state TPS65217 is notifying about power on events (such as power buton presses) by setting nWAKEUP output low. After that it waits 5s for proper device boot. Currently it doesn't happen, as the processor doesn't listen for such events. Consequently TPS65217 changes state from SLEEP (RTC-only state) to OFF. Enable EXT_WAKEUP input of AM335x's RTC, so the processor can properly detect power on events and recover immediately from RTC-only states, without powering off RTC and losing time. Signed-off-by: Marcin Niestroj Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-chilisom.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 121dfbb2a2ef1c5f49e15c38ccc47ff0beb59446 Author: Chris Wilson Date: Thu Jan 5 15:59:40 2017 +0000 drm/i915: Clear ret before unbinding in i915_gem_evict_something() Missed when rebasing patches, I failed to set ret to zero before starting the unbind loop (which depends upon ret being zero). Reported-by: Matthew Auld Fixes: 9332f3b1b99a ("drm/i915: Combine loops within i915_gem_evict_something") Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170105155940.10033-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld Cc: # v4.9+ drivers/gpu/drm/i915/i915_gem_evict.c | 1 + 1 file changed, 1 insertion(+) commit 5e6eb456983c994a8e582127a300b6552e5a1768 Author: Volodymyr Bendiuga Date: Thu Jan 5 11:10:13 2017 +0100 net:dsa: check for EPROBE_DEFER from dsa_dst_parse() Since there can be multiple dsa switches stacked together but not all of devicetree nodes available at the time of calling dsa_dst_parse(), EPROBE_DEFER can be returned by it. When this happens, only the last dsa switch has to be deleted by dsa_dst_del_ds(), but not the whole list, because next time linux cames back to this function it will try to add only the last dsa switch which returned EPROBE_DEFER. Signed-off-by: Volodymyr Bendiuga Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 56b46b4378f08fe519398df4da14ea2e7c9ae52c Author: Volodymyr Bendiuga Date: Thu Jan 5 10:44:18 2017 +0100 net:mv88e6xxx: use g2 interrupt for 6097 chip This chip needs MV88E6XXX_FLAG_G2_INT Signed-off-by: Volodymyr Bendiuga Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 1 file changed, 1 insertion(+) commit 60f9b5e8068babbace0d239765f07a538505ed5a Author: Tobias Klauser Date: Thu Jan 5 10:41:36 2017 +0100 net: xilinx: emaclite: Remove xemaclite_remove_ndev() xemaclite_remove_ndev() is a simple wrapper around free_netdev() checking for NULL before the call. All possible paths calling it are guaranteed to pass a non-NULL argument, so rather call free_netdev() directly. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_emaclite.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit aa884a26a135f0870ca1f52f276deeb58da79fee Author: Tobias Klauser Date: Thu Jan 5 09:16:27 2017 +0100 net: ethoc: Remove unused members from struct ethoc The io_region_size and dma_alloc members of struct ethoc are only written but never read, so they might as well be removed. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 7 ------- 1 file changed, 7 deletions(-) commit 3429fb3cda34f28ca2942ccc4fa7a7865b3ed978 Author: Jon Hunter Date: Thu Jan 5 15:52:55 2017 +0000 pinctrl: Fix panic when pinctrl devices with hogs are unregistered Commit df61b366af26 ('pinctrl: core: Use delayed work for hogs') deferred part of the registration for pinctrl devices if the pinctrl device has hogs. This introduced a window where if the pinctrl device with hogs was sucessfully registered, but then unregistered again (which could be caused by parent device being probe deferred) before the delayed work has chanced to run, then this will cause a kernel panic to occur because: 1. The 'pctldev->p' has not yet been initialised and when unregistering the pinctrl device we only check to see if it is an error value, but now it could also be NULL. 2. The pinctrl device may not have been added to the 'pinctrldev_list' list and we don't check to see if it was added before removing. Fix up the above by checking to see if the 'pctldev->p' pointer is an error value or NULL before putting the pinctrl device and verifying that the pinctrl device is present in 'pinctrldev_list' before removing. Fixes: df61b366af26 ('pinctrl: core: Use delayed work for hogs') Signed-off-by: Jon Hunter Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f585a15cb094606f0bdfb8926826e0ca27f64af6 Author: Pavel Machek Date: Tue Oct 11 10:12:43 2016 +0200 ARM: dts: n900: cleanup Fix GPIO comment to be consistent with rest of file and add comment what tpa6130 is. Signed-off-by: Pavel Machek Reviewed-By: Sebastian Reichel Reviewed-By: Pali Rohár Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-n900.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76eb75be79b52a3c6ae1fd840083fa1a04458c1c Merge: 57ea884 e02003b Author: David S. Miller Date: Thu Jan 5 11:03:07 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 921282360b9c9bf34c75cd18bb90f298c4f4ebc8 Author: Takashi Sakamoto Date: Thu Jan 5 21:48:12 2017 +0900 ALSA: firewire-tascam: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-hwdep.c | 17 ++++++------ sound/firewire/tascam/tascam-midi.c | 26 +++++++++--------- sound/firewire/tascam/tascam-pcm.c | 52 +++++++++++++++++------------------- 3 files changed, 45 insertions(+), 50 deletions(-) commit a4e86cba09c9e2bb64af018544a7aed4a6a1b538 Author: Takashi Sakamoto Date: Thu Jan 5 21:48:11 2017 +0900 ALSA: firewire-digi00x: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-hwdep.c | 17 ++++++----- sound/firewire/digi00x/digi00x-midi.c | 52 ++++++++++++++++------------------ sound/firewire/digi00x/digi00x-pcm.c | 52 ++++++++++++++++------------------ 3 files changed, 57 insertions(+), 64 deletions(-) commit fcbe08d469bd3778e691e3b0f156d51f8b1ba2e4 Author: Takashi Sakamoto Date: Thu Jan 5 21:48:10 2017 +0900 ALSA: dice: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-midi.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 39feaf2d0a2e1844a7d4c26ac1fac66176a15515 Author: Takashi Sakamoto Date: Thu Jan 5 21:48:09 2017 +0900 ALSA: oxfw: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-midi.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 7cdc887a00d79a1553009eb7afd308882e4b74d5 Author: Takashi Sakamoto Date: Thu Jan 5 21:48:08 2017 +0900 ALSA: fireworks: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_hwdep.c | 19 ++++++----- sound/firewire/fireworks/fireworks_midi.c | 26 +++++++-------- sound/firewire/fireworks/fireworks_pcm.c | 52 ++++++++++++++---------------- 3 files changed, 46 insertions(+), 51 deletions(-) commit 4780f774f99129f1650d250e346d5bfba98d9f4f Author: Takashi Sakamoto Date: Thu Jan 5 21:48:07 2017 +0900 ALSA: bebob: enclose identifiers referred by single function Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_hwdep.c | 17 ++++++------- sound/firewire/bebob/bebob_midi.c | 26 +++++++++---------- sound/firewire/bebob/bebob_pcm.c | 51 +++++++++++++++++++------------------- 3 files changed, 45 insertions(+), 49 deletions(-) commit db9309a526e5bb1418626d9b0d74f561230e0d10 Author: Chris Wilson Date: Thu Jan 5 15:30:23 2017 +0000 drm/i915/guc: Exclude the upper end of the Global GTT for the GuC The GuC uses a special mapping for the upper end of the Global GTT, similar to the way it uses a special mapping for the lower end, so exclude it from our drm_mm to prevent us using it. v2: Rename to reflect that it is unmappable similar to the region at the bottom of the GGTT, and couple it into the assertion that we don't feed unmappable addresses to the GuC. Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Daniele Ceraolo Spurio Reviewed-by: Arkadiusz Hiler Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 10 ++++++++++ drivers/gpu/drm/i915/i915_guc_reg.h | 3 +++ drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 14 insertions(+) commit 40b326eefe0ae89fa7e8b272f51382c55563e179 Author: Chris Wilson Date: Thu Jan 5 15:30:22 2017 +0000 drm/i915: Move a few utility macros into a separate header In order to defeat some circular dependencies between headers to allow use of e.g. range_overflows() in a header, move the simple independent macros into their own header. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 13 +----------- drivers/gpu/drm/i915/i915_gem.c | 4 ---- drivers/gpu/drm/i915/i915_utils.h | 44 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 16 deletions(-) commit f3b8f9126a9f3312636780fe83b923f3f63137fb Author: Chris Wilson Date: Thu Jan 5 15:30:21 2017 +0000 drm/i915/execlists: Reorder execlists register enabling Empirically we restart following a GPU reset more successfully if we call lrc_init_hws() (which contains a posting read) last. (The failure mode that was observed was that breadcrumb writes into the HWS from the recovered requests went astray leading to the context-switch maintaining forward progress, but the requests not being retired/completed.) For clarity, lrc_init_hws() is inlined (and the unused function then removed). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 56f6e0a7e7b09adb553339f9075696e918b96587 Author: Chris Wilson Date: Thu Jan 5 15:30:20 2017 +0000 drm/i915: Assert that we do create the deferred context In order to convince static analyzers that the allocation function returns an error or sets ce->state, assert that it is set afterwards. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit d51dafaf07bf78ff0db4f2c238287dd9ccf42c08 Author: Chris Wilson Date: Thu Jan 5 15:30:19 2017 +0000 drm/i915: Assert all timeline requests are gone before fini During i915_gem_timeline_fini(), assert that all the timeline's request are completed and removed from the timeline. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_timeline.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit e9284603d857c3bf9e0c598251cd9370b7227550 Author: Elaine Zhang Date: Fri Dec 23 11:47:52 2016 +0800 soc: rockchip: power-domain: add power domain support for rk3328 The rk3328 uses the newly introduced support for power-domain control in hiword-mask registers. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/soc/rockchip/pm_domains.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 825681c8690820247a4e33b468a41533770a6f94 Author: Elaine Zhang Date: Fri Dec 23 11:47:51 2016 +0800 dt-bindings: add binding for rk3328 power domains Add binding documentation for the power domains found on Rockchip RK3328 SoCs. But RK3328 SoC just support idle, not support pd. Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | 3 +++ 1 file changed, 3 insertions(+) commit 170d04c3f7f102d4fbcf4e26c219bc3e34df7953 Merge: 79bb17c 9540480 Author: Heiko Stuebner Date: Thu Jan 5 14:32:42 2017 +0100 Merge branch 'v4.11-shared/pdids' into v4.11-armsoc/drivers commit 9540480b71f5aa85f445554849e63d4103c959b8 Author: Elaine Zhang Date: Fri Dec 23 11:47:50 2016 +0800 dt-bindings: power: add RK3328 SoCs header for idle-request According to a description from TRM, add all the idle request. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/power/rk3328-power.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 79bb17ce8edb3141339b5882e372d0ec7346217c Author: Elaine Zhang Date: Fri Dec 23 11:47:52 2016 +0800 soc: rockchip: power-domain: Support domain control in hiword-registers New Rockchips SoCs may have their power-domain control in registers using a writemask-based access scheme (upper 16bit being the write mask). So add a DOMAIN_M type and handle this case accordingly. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/soc/rockchip/pm_domains.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 0e377f3b9ae936aefe5aaca4c2e2546d57b63df7 Author: Song Hongyan Date: Thu Jan 5 18:24:04 2017 +0800 iio: Add gravity sensor support Gravity sensor is a soft sensor, which derives value from standard accelerometer device by filtering out the acceleration which is not caused by gravity. Gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Typically, this sensor is used to determine the device's relative orientation in space. The units and the coordinate system is the same as the one used by the acceleration sensor. When a device is at rest, the output of the gravity sensor should be identical to that of the accelerometer. More information can be found in: http://www.usb.org/developers/hidpage/HUTRR59_-_Usages_for_Wearables.pdf Gravity sensor and accelerometer have similar channels and share channel usage ids. So the most of the code for accel_3d can be reused. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/accel/hid-sensor-accel-3d.c | 74 +++++++++++++++++++++++++++------ include/linux/hid-sensor-ids.h | 3 ++ 2 files changed, 64 insertions(+), 13 deletions(-) commit 571299d099dcce0ff32c76e70e32e0ba01e55adc Author: Song Hongyan Date: Thu Jan 5 18:24:03 2017 +0800 iio: Add channel for Gravity Add new channel types support for gravity sensor. Gravity sensor provides an application-level or physical collection that identifies a device that measures exclusively the force of Earth's gravity along any number of axes. More information can be found in: http://www.usb.org/developers/hidpage/HUTRR59_-_Usages_for_Wearables.pdf Signed-off-by: Song Hongyan Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 10 ++++++++++ drivers/iio/industrialio-core.c | 1 + include/uapi/linux/iio/types.h | 1 + tools/iio/iio_event_monitor.c | 2 ++ 4 files changed, 14 insertions(+) commit 7b7db5ab33d2292d9b037cda0c41a795b094d940 Author: Uwe Kleine-König Date: Tue Jan 3 20:35:01 2017 +0100 ARM: dts: turris-omnia: add support for ethernet switch The Turris Omnia features a Marvell MV88E6176 ethernet switch. Add it to the dts. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Tested-by: Andreas Färber Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 58 +++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) commit ed51e7902c51ceda11f6f64dde1f9ae6fc131368 Author: Russell King Date: Mon Jan 2 15:27:32 2017 +0000 ARM: dts: armada388-clearfog: move uart nodes Move the uart nodes over to use the label form to reference the serial devices, rather than replicating the device node path. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 14 +++++++------- arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) commit a14c2338948d8a076a57b709ea7a32fbf16ab367 Author: Russell King Date: Mon Jan 2 15:27:26 2017 +0000 ARM: dts: armada388-clearfog: move ethernet related nodes Move the ethernet, buffer manager, and mdio nodes over to use label form to reference the devices rather than replicating the device path. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 44 +++++++------ .../arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 76 +++++++++++----------- 2 files changed, 60 insertions(+), 60 deletions(-) commit aa09b30f1bfbd48e156e0a26e0739bada7b74bb8 Author: Russell King Date: Mon Jan 2 15:27:21 2017 +0000 ARM: dts: armada388-clearfog: move I2C nodes Move the I2C nodes over to use the label form to reference the I2C controllers, rather than replicating the device node path. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 245 ++++++++++++++--------------- 1 file changed, 120 insertions(+), 125 deletions(-) commit fce54ee273ef3676541a254001021972797ee35d Author: Russell King Date: Mon Jan 2 15:27:16 2017 +0000 ARM: dts: armada388-clearfog: move device specific pinctrl nodes Move the device specific pinctrl nodes over to use the label form to reference the pin mux controller, rather than replicating the device node path. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 50 +++++++++++----------- .../arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 27 ++++++------ 2 files changed, 38 insertions(+), 39 deletions(-) commit 712032aa65ae19a613488f8ce956e575cc5e1486 Author: Russell King Date: Mon Jan 2 14:59:22 2017 +0000 ARM: dts: armada388-clearfog: add pro model DTS file Add the DTS file to describe the clearfog pro model - we update the platform name and compatible string compared to the original version. The original version remains for compatibility for the time being as the name of the file has become established, and the machine name and/or compatible may be used by userspace. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-388-clearfog-pro.dts | 55 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit beb9ab5e51287d0731b204caf20f1c05b917774f Author: Russell King Date: Mon Jan 2 14:59:17 2017 +0000 ARM: dts: armada388-clearfog: add base model DTS file Add the DTS file to describe the clearfog base model. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-388-clearfog-base.dts | 109 +++++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 571800487837263e914ef68681e4ad6a57d49c7f Author: youling257 Date: Wed Jan 4 15:44:53 2017 -0600 ASoC: Intel: bytcr_rt5640: quirks for Insyde devices There are literally dozens of Insyde devices with a different name but with the same audio routing. Use a generic quirk to match on vendor name only to avoid recurring edits of the same thing. Signed-off-by: youling257 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3db5e3e707ebb9ab0ce3a2dcd924ed2ea525d770 Author: Johannes Berg Date: Thu Jan 5 13:37:28 2017 +0100 wireless: move IEEE80211_NUM_ACS to ieee80211.h This constant isn't really specific to mac80211, so move it "up" a level to ieee80211.h Signed-off-by: Johannes Berg include/linux/ieee80211.h | 2 ++ include/net/mac80211.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit fe3511ad8a1cf63721f5f3e64996e16006e1d7d2 Author: Elaine Zhang Date: Thu Dec 29 10:45:11 2016 +0800 clk: rockchip: add clock controller for rk3328 Add the clock tree definition for the new rk3328 SoC. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3328.c | 895 ++++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 18 + 3 files changed, 914 insertions(+) commit 80691c8f08b3b516df8833817dfdf15cfa1b9067 Author: Lars-Peter Clausen Date: Thu Jan 5 13:07:27 2017 +0100 ASoC: pxa2xx-ac97: Remove unused DAI ID defines The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. This also means the pxa2xx-ac97.h file no longer has any content and can be removed. Signed-off-by: Lars-Peter Clausen Acked-by: Robert Jarzmik Tested-by: Robert Jarzmik (for mioa701_wm9713) Signed-off-by: Mark Brown sound/soc/pxa/e740_wm9705.c | 3 --- sound/soc/pxa/e750_wm9705.c | 2 -- sound/soc/pxa/e800_wm9712.c | 2 -- sound/soc/pxa/em-x270.c | 2 -- sound/soc/pxa/mioa701_wm9713.c | 1 - sound/soc/pxa/palm27x.c | 2 -- sound/soc/pxa/pxa2xx-ac97.c | 2 -- sound/soc/pxa/pxa2xx-ac97.h | 17 ----------------- sound/soc/pxa/tosa.c | 2 -- sound/soc/pxa/zylonite.c | 1 - 10 files changed, 34 deletions(-) commit 4cc4b72c136a45aeccd86f66b0859b148b47d881 Author: Geliang Tang Date: Tue Dec 20 22:02:13 2016 +0800 netfilter: xt_connlimit: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connlimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf6e007eef83476c5d541453d84e08b07befe124 Author: Davide Caratti Date: Mon Jan 2 13:29:41 2017 +0100 netfilter: conntrack: validate SCTP crc32c in PREROUTING implement sctp_error to let nf_conntrack_in validate crc32c on the packet transport header. Assign skb->ip_summed to CHECKSUM_UNNECESSARY and return NF_ACCEPT in case of successful validation; otherwise, return -NF_ACCEPT to let netfilter skip connection tracking, like other protocols do. Besides preventing corrupted packets from matching conntrack entries, this fixes functionality of REJECT target: it was not generating any ICMP upon reception of SCTP packets, because it was computing RFC 1624 checksum on the packet and systematically mismatching crc32c in the SCTP header. Signed-off-by: Davide Caratti Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 300ae149468f440a2629fa8b33d0ce1e860d479f Author: Davide Caratti Date: Mon Jan 2 13:29:40 2017 +0100 netfilter: select LIBCRC32C together with SCTP conntrack nf_conntrack needs to compute crc32c when dealing with SCTP packets. Moreover, NF_NAT_PROTO_SCTP (currently selecting LIBCRC32C) can be enabled only if conntrack support for SCTP is enabled. Therefore, move enabling of kernel support for crc32c so that it is selected when NF_CT_PROTO_SCTP=y. Signed-off-by: Davide Caratti Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Pablo Neira Ayuso net/netfilter/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ed6bf47623fbcceb9a1187159a80c20f2874fcc Author: Dinh Nguyen Date: Mon Dec 19 22:34:00 2016 -0600 ARM: dts: socfpga: fpga manager data is 32 bits Adjust regs property for the FPGA manager data register to properly reflect that it is a single 32 bit register. Signed-off-by: Dalon Westergreen Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f549af06e9b64a47b5ad6a45701d1b39330ddb48 Author: Graham Moore Date: Tue Jul 7 09:58:36 2015 -0500 ARM: dts: socfpga: Add NAND device tree for Arria10 Add socfpga_arria10_socdk_nand.dts board file for supporting NAND. Signed-off-by: Graham Moore Signed-off-by: Dinh Nguyen --- v2: move nand dts node to socfpga_arria10.dtsi arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/socfpga_arria10.dtsi | 13 ++++++++++ arch/arm/boot/dts/socfpga_arria10_socdk_nand.dts | 31 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) commit b51af0bad8273dea6461c00b810866881cf73490 Author: Elaine Zhang Date: Thu Dec 29 10:45:09 2016 +0800 dt-bindings: add bindings for rk3328 clock controller Add devicetree bindings for Rockchip cru which found on Rockchip SoCs. Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Heiko Stuebner .../bindings/clock/rockchip,rk3328-cru.txt | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit c867e4e71068452844d9390c32ae2119dcb760e7 Merge: 7bed924 6cc1aef Author: Heiko Stuebner Date: Thu Jan 5 13:06:50 2017 +0100 Merge branch 'v4.11-shared/clkids' into v4.11-clk/next commit 6cc1aef0ad0daea0c6ba5432a8a6fe1c30661e4c Author: Elaine Zhang Date: Thu Dec 29 10:45:08 2016 +0800 clk: rockchip: add dt-binding header for rk3328 Add the dt-bindings header for the rk3328, that gets shared between the clock controller and the clock references in the dts. Add softreset ID for rk3328. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3328-cru.h | 400 +++++++++++++++++++++++++++++++++ 1 file changed, 400 insertions(+) commit 343884c87e5a928193796415280269e723f951c7 Author: Arend Van Spriel Date: Wed Jan 4 10:53:37 2017 +0000 cfg80211: only pass sband to set_mandatory_flags_band() The supported band structure contains the band is applies to so no need to pass it separately. Also added a default case to the switch for completeness. The current code base does not call this function with NUM_NL80211_BANDS but kept that case statement although default case would cover that. Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f7590b2677b3815d584971ff478c9a75bc66026 Merge: 0c744ea 4dcd19b Author: Bartlomiej Zolnierkiewicz Date: Thu Jan 5 12:40:26 2017 +0100 Merge tag 'fbdev-v4.10-rc2' of git://github.com/bzolnier/linux into fbdev-for-next fbdev fixes for v4.10-rc2: - bring fbdev subsystem back into Maintained mode - add missing devm_ioremap() error checking to cobalt_lcdfb driver commit 3e018daf045f3803c3ebe89dbb48318f24ffb790 Author: David Howells Date: Thu Jan 5 10:38:33 2017 +0000 rxrpc: Show a call's hard-ACK cursors in /proc/net/rxrpc_calls Show a call's hard-ACK cursors in /proc/net/rxrpc_calls so that a call's progress can be more easily monitored. Signed-off-by: David Howells net/rxrpc/proc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b1d9f7fde0bb6c143a9a5b9246ea191e28f2c364 Author: David Howells Date: Thu Jan 5 10:38:34 2017 +0000 rxrpc: Add some more tracing Add the following extra tracing information: (1) Modify the rxrpc_transmit tracepoint to record the Tx window size as this is varied by the slow-start algorithm. (2) Modify the rxrpc_rx_ack tracepoint to record more information from received ACK packets. (3) Add an rxrpc_rx_data tracepoint to record the information in DATA packets. (4) Add an rxrpc_disconnect_call tracepoint to record call disconnection, including the reason the call was disconnected. (5) Add an rxrpc_improper_term tracepoint to record implicit termination of a call by a client either by starting a new call on a particular connection channel without first transmitting the final ACK for the previous call. Signed-off-by: David Howells include/trace/events/rxrpc.h | 94 +++++++++++++++++++++++++++++++++++++++++--- net/rxrpc/conn_object.c | 1 + net/rxrpc/input.c | 6 ++- 3 files changed, 95 insertions(+), 6 deletions(-) commit b54a134a7de461f804cf0e28331d0a43ee82fb13 Author: David Howells Date: Thu Jan 5 10:38:33 2017 +0000 rxrpc: Fix handling of enums-to-string translation in tracing Fix the way enum values are translated into strings in AF_RXRPC tracepoints. The problem with just doing a lookup in a normal flat array of strings or chars is that external tracing infrastructure can't find it. Rather, TRACE_DEFINE_ENUM must be used. Also sort the enums and string tables to make it easier to keep them in order so that a future patch to __print_symbolic() can be optimised to try a direct lookup into the table first before iterating over it. A couple of _proto() macro calls are removed because they refered to tables that got moved to the tracing infrastructure. The relevant data can be found by way of tracing. Signed-off-by: David Howells include/trace/events/rxrpc.h | 424 ++++++++++++++++++++++++++++++++++++++++--- net/rxrpc/ar-internal.h | 194 -------------------- net/rxrpc/call_object.c | 18 -- net/rxrpc/conn_client.c | 8 - net/rxrpc/input.c | 10 - net/rxrpc/misc.c | 151 --------------- 6 files changed, 403 insertions(+), 402 deletions(-) commit e8fa5671183c80342d520ad81d14fa79a9d4a680 Author: Tomeu Vizoso Date: Mon Jan 2 13:59:10 2017 +0100 drm: crc: Wait for a frame before returning from open() Don't return from the open() call on the crc/data file until the HW has produced a first frame, as there's great variability in when the HW is able to do that and userspace shouldn't have to guess when this specific HW is ready to start giving frame CRCs. Signed-off-by: Tomeu Vizoso Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170102125912.22305-3-tomeu.vizoso@collabora.com drivers/gpu/drm/drm_debugfs_crc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 1aa81be3af121636824e40eec737706e62c9da0c Author: Tomeu Vizoso Date: Mon Jan 2 13:59:09 2017 +0100 drm: Move locking into drm_debugfs_crtc_crc_add There's no reason any more for callers of this function to take the lock themselves, so just move the lock to the function to avoid confusion and bugs when more callers are contributed. Signed-off-by: Tomeu Vizoso Reviewed-by: Emil Velikov Reviewed-by: Robert Foss Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170102125912.22305-2-tomeu.vizoso@collabora.com drivers/gpu/drm/drm_debugfs_crc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 88017bd06e74c82dd0b953e3766ec0d1e3c8d63c Author: Fabio Estevam Date: Wed Jan 4 13:44:56 2017 -0200 drm/imx: imx-tve: Remove unused variable 'ret' is never used in tve_enable/tve_disable(), so just remove it. Signed-off-by: Fabio Estevam Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483544696-32707-1-git-send-email-fabio.estevam@nxp.com drivers/gpu/drm/imx/imx-tve.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6606021401032919c559a829a5d273ba1741b434 Author: Andy Lutomirski Date: Mon Dec 26 19:20:50 2016 -0800 selftests/x86: Add a selftest for SYSRET to noncanonical addresses SYSRET to a noncanonical address will blow up on Intel CPUs. Linux needs to prevent this from happening in two major cases, and the criteria will become more complicated when support for larger virtual address spaces is added. A fast-path SYSCALL will fall through to the following instruction using SYSRET without any particular checking. To prevent fall-through to a noncanonical address, Linux prevents the highest canonical page from being mapped. This test case checks a variety of possible maximum addresses to make sure that either we can't map code there or that SYSCALL fall-through works. A slow-path system call can return anywhere. Linux needs to make sure that, if the return address is non-canonical, it won't use SYSRET. This test cases causes sigreturn() to return to a variety of addresses (with RCX == RIP) and makes sure that nothing explodes. Some of this code comes from Kirill Shutemov. Kirill reported the following output with 5-level paging enabled: [RUN] sigreturn to 0x800000000000 [OK] Got SIGSEGV at RIP=0x800000000000 [RUN] sigreturn to 0x1000000000000 [OK] Got SIGSEGV at RIP=0x1000000000000 [RUN] sigreturn to 0x2000000000000 [OK] Got SIGSEGV at RIP=0x2000000000000 [RUN] sigreturn to 0x4000000000000 [OK] Got SIGSEGV at RIP=0x4000000000000 [RUN] sigreturn to 0x8000000000000 [OK] Got SIGSEGV at RIP=0x8000000000000 [RUN] sigreturn to 0x10000000000000 [OK] Got SIGSEGV at RIP=0x10000000000000 [RUN] sigreturn to 0x20000000000000 [OK] Got SIGSEGV at RIP=0x20000000000000 [RUN] sigreturn to 0x40000000000000 [OK] Got SIGSEGV at RIP=0x40000000000000 [RUN] sigreturn to 0x80000000000000 [OK] Got SIGSEGV at RIP=0x80000000000000 [RUN] sigreturn to 0x100000000000000 [OK] Got SIGSEGV at RIP=0x100000000000000 [RUN] sigreturn to 0x200000000000000 [OK] Got SIGSEGV at RIP=0x200000000000000 [RUN] sigreturn to 0x400000000000000 [OK] Got SIGSEGV at RIP=0x400000000000000 [RUN] sigreturn to 0x800000000000000 [OK] Got SIGSEGV at RIP=0x800000000000000 [RUN] sigreturn to 0x1000000000000000 [OK] Got SIGSEGV at RIP=0x1000000000000000 [RUN] sigreturn to 0x2000000000000000 [OK] Got SIGSEGV at RIP=0x2000000000000000 [RUN] sigreturn to 0x4000000000000000 [OK] Got SIGSEGV at RIP=0x4000000000000000 [RUN] sigreturn to 0x8000000000000000 [OK] Got SIGSEGV at RIP=0x8000000000000000 [RUN] Trying a SYSCALL that falls through to 0x7fffffffe000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x7ffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x800000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0xfffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x1000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x1fffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x2000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x3fffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x4000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x7fffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x8000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0xffffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x10000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x1ffffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x20000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x3ffffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x40000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x7ffffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x80000000000000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0xfffffffffff000 [OK] We survived [RUN] Trying a SYSCALL that falls through to 0x100000000000000 [OK] mremap to 0xfffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x1fffffffffff000 [OK] mremap to 0x1ffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x200000000000000 [OK] mremap to 0x1fffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x3fffffffffff000 [OK] mremap to 0x3ffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x400000000000000 [OK] mremap to 0x3fffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x7fffffffffff000 [OK] mremap to 0x7ffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x800000000000000 [OK] mremap to 0x7fffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0xffffffffffff000 [OK] mremap to 0xfffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x1000000000000000 [OK] mremap to 0xffffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x1ffffffffffff000 [OK] mremap to 0x1fffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x2000000000000000 [OK] mremap to 0x1ffffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x3ffffffffffff000 [OK] mremap to 0x3fffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x4000000000000000 [OK] mremap to 0x3ffffffffffff000 failed [RUN] Trying a SYSCALL that falls through to 0x7ffffffffffff000 [OK] mremap to 0x7fffffffffffe000 failed [RUN] Trying a SYSCALL that falls through to 0x8000000000000000 [OK] mremap to 0x7ffffffffffff000 failed Signed-off-by: Andy Lutomirski Acked-by: Kirill A. Shutemov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e70bd9a3f90657ba47b755100a20475d038fa26b.1482808435.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/sysret_rip.c | 195 +++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 1 deletion(-) commit 00bd61757821e46e78300635450a657e250b6146 Author: Daniel Vetter Date: Thu Jan 5 08:59:17 2017 +0100 Revert "drm: nouveau: fix build when LEDS_CLASS=m" This reverts commit a5ad0fd8524e5144512a5c25eda5a5d6fd55fda8. It results in kconfing complaining about recursive depencies: drivers/usb/Kconfig:39:error: recursive dependency detected! For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/input/mouse/Kconfig:187: symbol MOUSE_APPLETOUCH depends on INPUT For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/input/Kconfig:8: symbol INPUT is selected by VT For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/tty/Kconfig:12: symbol VT is selected by FB_STI For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/video/fbdev/Kconfig:678: symbol FB_STI depends on FB For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/Kconfig:72: symbol DRM_KMS_FB_HELPER is selected by DRM_KMS_CMA_HELPER For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/Kconfig:128: symbol DRM_KMS_CMA_HELPER is selected by DRM_HDLCD For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/arm/Kconfig:6: symbol DRM_HDLCD depends on COMMON_CLK For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/clk/Kconfig:9: symbol COMMON_CLK is selected by X86_INTEL_QUARK For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" arch/x86/Kconfig:554: symbol X86_INTEL_QUARK depends on X86_PLATFORM_DEVICES For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/platform/x86/Kconfig:5: symbol X86_PLATFORM_DEVICES is selected by DRM_NOUVEAU For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/nouveau/Kconfig:1: symbol DRM_NOUVEAU depends on LEDS_CLASS For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/leds/Kconfig:16: symbol LEDS_CLASS is selected by ATH9K_HTC For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/net/wireless/ath/ath9k/Kconfig:158: symbol ATH9K_HTC depends on USB warning: (DRM_NOUVEAU && DRM_I915 && DRM_GMA500) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && +BACKLIGHT_CLASS_DEVICE && INPUT) And there's apparently a better patch available already. Signed-off-by: Daniel Vetter drivers/gpu/drm/nouveau/Kconfig | 1 - 1 file changed, 1 deletion(-) commit c4158ff536439619fa342810cc575ae2c809f03f Author: Daniel Bristot de Oliveira Date: Wed Jan 4 12:20:33 2017 +0100 x86/irq, trace: Add __irq_entry annotation to x86's platform IRQ handlers This patch adds the __irq_entry annotation to the default x86 platform IRQ handlers. ftrace's function_graph tracer uses the __irq_entry annotation to notify the entry and return of IRQ handlers. For example, before the patch: 354549.667252 | 3) d..1 | default_idle_call() { 354549.667252 | 3) d..1 | arch_cpu_idle() { 354549.667253 | 3) d..1 | default_idle() { 354549.696886 | 3) d..1 | smp_trace_reschedule_interrupt() { 354549.696886 | 3) d..1 | irq_enter() { 354549.696886 | 3) d..1 | rcu_irq_enter() { After the patch: 366416.254476 | 3) d..1 | arch_cpu_idle() { 366416.254476 | 3) d..1 | default_idle() { 366416.261566 | 3) d..1 ==========> | 366416.261566 | 3) d..1 | smp_trace_reschedule_interrupt() { 366416.261566 | 3) d..1 | irq_enter() { 366416.261566 | 3) d..1 | rcu_irq_enter() { KASAN also uses this annotation. The smp_apic_timer_interrupt() was already annotated. Signed-off-by: Daniel Bristot de Oliveira Acked-by: Steven Rostedt (VMware) Cc: Aaron Lu Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov Cc: Claudio Fontana Cc: Denys Vlasenko Cc: Dou Liyang Cc: Gu Zheng Cc: Hidehiro Kawai Cc: Linus Torvalds Cc: Nicolai Stange Cc: Peter Zijlstra (Intel) Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tony Luck Cc: Wanpeng Li Cc: linux-edac@vger.kernel.org Link: http://lkml.kernel.org/r/059fdf437c2f0c09b13c18c8fe4e69999d3ffe69.1483528431.git.bristot@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 8 ++++---- arch/x86/kernel/apic/vector.c | 2 +- arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 ++-- arch/x86/kernel/cpu/mcheck/therm_throt.c | 6 ++++-- arch/x86/kernel/cpu/mcheck/threshold.c | 4 ++-- arch/x86/kernel/irq.c | 4 ++-- arch/x86/kernel/irq_work.c | 5 +++-- arch/x86/kernel/smp.c | 15 +++++++++------ 8 files changed, 27 insertions(+), 21 deletions(-) commit b3ba3f6fab873a8d757fbcd9f83c3f69e369cddf Author: Daniel Vetter Date: Wed Dec 21 14:03:35 2016 +0100 drm: Add kernel-doc for drm_crtc_commit_get/put I was lazy, rectify that! Also align with drm_atomic_state_get/put for ocd. v2: Git add helps. Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161221130335.5321-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 9 ++------- include/drm/drm_atomic.h | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 8 deletions(-) commit ad4d05329df5e9825cac3132e12453a6c12915b8 Author: Jan Kara Date: Mon Jan 2 14:30:31 2017 +0100 udf: Make stat on symlink report symlink length as st_size UDF encodes symlinks in a more complex fashion and thus i_size of a symlink does not match the lenght of a string returned by readlink(2). This confuses some applications (see bug 191241) and may be considered a violation of POSIX. Fix the problem by reading the link into page cache in response to stat(2) call and report the length of the decoded path. Signed-off-by: Jan Kara fs/udf/inode.c | 2 +- fs/udf/namei.c | 2 +- fs/udf/symlink.c | 30 ++++++++++++++++++++++++++++++ fs/udf/udfdecl.h | 1 + 4 files changed, 33 insertions(+), 2 deletions(-) commit 364757e4682c0a046dc7da20d359a9a37dfff703 Author: Cao jin Date: Mon Dec 19 14:20:29 2016 +0800 scsi: qla4xxx: comments correction Signed-off-by: Cao jin Acked-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 703e747a6b6fa51afa6632b6963569c654062de6 Author: Colin Ian King Date: Fri Dec 16 14:10:43 2016 +0000 scsi: qedi: return via va_end to match corresponding va_start Although on most systems va_end is a no-op, it is good practice to use va_end on the function return path, especially since the va_start documenation states: "Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function." Found with static analysis by CoverityScan, CIDs 1389477-1389479 Signed-off-by: Colin Ian King Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_dbg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a5c1be7005e2992e3ae2ffa4e510e9bd4c2922e8 Author: Jitendra Bhivare Date: Tue Dec 13 15:56:06 2016 +0530 scsi: be2iscsi: Update driver version Version 11.2.1.0 Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fa7db2111dfcacfd4c986a5eb4d9568386154f4 Author: Ketan Mukadam Date: Tue Dec 13 15:56:05 2016 +0530 scsi: be2iscsi: Add warning message for unsupported adapter Add a warning message to indicate obsolete/unsupported BE2 Adapter Family devices Signed-off-by: Ketan Mukadam Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 2 ++ drivers/scsi/be2iscsi/be_mgmt.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit dd940972f36779577701f20965847e9b56b79a0e Author: Jitendra Bhivare Date: Tue Dec 13 15:56:04 2016 +0530 scsi: be2iscsi: Reinit SGL handle, CID tables after TPE After TPE recovery, CID table needs to be repopulated as per CIDs in WRBQ creation responses. SGL handles table needs to be recreated for posting and its indices need to be resetted. This is achieved by calling beiscsi_cleanup_port when disabling and beiscsi_init_port in enabling port. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 61 ++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 41 deletions(-) commit 413f365657a8b9669bd0ba3628e9fde9ce63604e Author: Jitendra Bhivare Date: Tue Dec 13 15:56:03 2016 +0530 scsi: be2iscsi: Add checks to validate CID alloc/free Set CID slot to 0xffff to indicate empty. Check if connection already exists in conn_table before binding. Check if endpoint already NULL before putting back CID. Break ep->conn link in free_ep to ignore completions after freeing. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 163 ++++++++++++++++++++------------------- drivers/scsi/be2iscsi/be_main.c | 7 +- drivers/scsi/be2iscsi/be_main.h | 1 + 3 files changed, 87 insertions(+), 84 deletions(-) commit 29e80b7ce36ffcc3efd6062d87ddaf6c6f43a542 Author: Jitendra Bhivare Date: Tue Dec 13 15:56:02 2016 +0530 scsi: be2iscsi: Remove wq_name from beiscsi_hba wq_name is used only to set WQ name when its being allocated. Remove it from beiscsi_hba structure and define locally. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 9 +++++---- drivers/scsi/be2iscsi/be_main.h | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) commit fa1261c4b683828f1b012267aff5b9322fd9ab71 Author: Jitendra Bhivare Date: Tue Dec 13 15:56:01 2016 +0530 scsi: be2iscsi: Remove unused struct members Fix errors reported in static analysis. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 3 -- drivers/scsi/be2iscsi/be_cmds.c | 8 +++--- drivers/scsi/be2iscsi/be_cmds.h | 17 ++++++------ drivers/scsi/be2iscsi/be_iscsi.c | 2 +- drivers/scsi/be2iscsi/be_main.c | 24 +++------------- drivers/scsi/be2iscsi/be_main.h | 22 --------------- drivers/scsi/be2iscsi/be_mgmt.c | 9 ++---- drivers/scsi/be2iscsi/be_mgmt.h | 60 ---------------------------------------- 8 files changed, 21 insertions(+), 124 deletions(-) commit b7d98ca7fb476e9f9382445b3a2b973e6c0de3ab Author: Jitendra Bhivare Date: Tue Dec 13 15:56:00 2016 +0530 scsi: be2iscsi: Remove redundant receive buffers posting This duplicate code got added during manual merging. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 8 -------- 1 file changed, 8 deletions(-) commit d7401055480d80599b6813fdf556d519ced4d71e Author: Jitendra Bhivare Date: Tue Dec 13 15:55:59 2016 +0530 scsi: be2iscsi: Fix iSCSI cmd cleanup IOCTL Prepare the IOCTL with appropriate sizes of buffers of V0 and V1. Set missing chute number in V1 IOCTL. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 33 ++++++++++++++++++--------------- drivers/scsi/be2iscsi/be_main.c | 3 +-- 2 files changed, 19 insertions(+), 17 deletions(-) commit 3f7f62ee5b10de42b3ff1a33599fde4a2094960a Author: Jitendra Bhivare Date: Tue Dec 13 15:55:58 2016 +0530 scsi: be2iscsi: Add checks to validate completions Added check in beiscsi_process_cq for pio_handle. pio_handle is cleared in beiscsi_put_wrb_handle. This catches any case where task gets cleaned up just before completion. Use back_lock before accessing pio_handle. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 392b7d2f122210da594671606321223167a5a85c Author: Jitendra Bhivare Date: Tue Dec 13 15:55:57 2016 +0530 scsi: be2iscsi: Set WRB invalid bit for SkyHawk invalid bit in WRB indicates to FW that IO was invalidated before WRB was fetched from host memory. For SkyHawk, this invalid bit in WRB is at a different offset. Use amap_iscsi_wrb_v2 to mark invalid bit for SkyHawk. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 19 ++++++++++++++----- drivers/scsi/be2iscsi/be_main.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) commit faa0a22d54230ae9658c419e495fc1a469e191f3 Author: Jitendra Bhivare Date: Tue Dec 13 15:55:56 2016 +0530 scsi: be2iscsi: Take iscsi_task ref in abort handler Hold the reference of iscsi_task till invalidation completes. This prevents use of ICD when invalidation of that ICD is being processed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 45 +++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 26 deletions(-) commit 987132167f4bfb132cd56601f77d2bd5ba9cff4a Author: Jitendra Bhivare Date: Tue Dec 13 15:55:55 2016 +0530 scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset System crashes when sg_reset is executed in a loop. CPU: 13 PID: 7073 Comm: sg_reset Tainted: G E 4.8.0-rc1+ #4 RIP: 0010:[] [] beiscsi_eh_device_reset+0x160/0x520 [be2iscsi] Call Trace: [] ? scsi_host_alloc_command+0x47/0xc0 [] scsi_try_bus_device_reset+0x2a/0x50 [] scsi_ioctl_reset+0x13e/0x260 [] scsi_ioctl+0x137/0x3d0 [] sg_ioctl+0x572/0xc20 [sg] [] do_vfs_ioctl+0xa7/0x5d0 The accesses to beiscsi_io_task is being protected in device reset handler with frwd_lock but the freeing of task can happen under back_lock. Hold the reference of iscsi_task till invalidation completes. This prevents use of ICD when invalidation of that ICD is being processed. Use frwd_lock for iscsi_tasks looping and back_lock to access beiscsi_io_task structures. Rewrite mgmt_invalidation_icds to handle allocation and freeing of IOCTL buffer in one place. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 121 +++++++++++++++++----------------------- drivers/scsi/be2iscsi/be_mgmt.c | 107 ++++++++++++++++++++--------------- drivers/scsi/be2iscsi/be_mgmt.h | 8 +-- 3 files changed, 114 insertions(+), 122 deletions(-) commit f3505013779646704f81b41c011ab089b26c3f3e Author: Jitendra Bhivare Date: Tue Dec 13 15:55:54 2016 +0530 scsi: be2iscsi: Fix use of invalidate command table req Remove shared structure inv_tbl in phba for all sessions to post invalidation IOCTL. Always allocate and then free the table after use in reset handler. Abort handler needs just one instance so define it on stack. Add checks for BE_INVLDT_CMD_TBL_SZ to not exceed invalidation command table size in IOCTL. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 85 ++++++++++++++++++++++++----------------- drivers/scsi/be2iscsi/be_main.h | 16 ++++---- drivers/scsi/be2iscsi/be_mgmt.c | 12 +++--- drivers/scsi/be2iscsi/be_mgmt.h | 40 +++++++++---------- 4 files changed, 83 insertions(+), 70 deletions(-) commit 19099dc393f3ca1fd9690f914e50278cf2aee78a Author: Dan Carpenter Date: Fri Dec 16 12:35:39 2016 +0300 scsi: dpt_i2o: double free if adpt_i2o_online_hba() fails There are two places where adpt_i2o_online_hba() is called. Both callers call adpt_i2o_delete_hba(pHba) if adpt_i2o_online_hba() fails and since we also free it here that causes a double free bug. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/dpt_i2o.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e0075478ca7c58c6ad6630310aaa3f64a25dcf31 Author: Corentin Labbe Date: Thu Dec 15 15:12:16 2016 +0100 scsi: mptlan: Remove linux/miscdevice.h from mptlan.h This patch remove linux/miscdevice.h from mptlan.h since mptlan.h does not contain any miscdevice. The only user of it is mptctl.c which already include linux/miscdevice.h So no need to include it twice. Signed-off-by: Corentin Labbe Signed-off-by: Martin K. Petersen drivers/message/fusion/mptlan.h | 1 - 1 file changed, 1 deletion(-) commit 5f5fca6db3d3e6a2c1a2ae92cbecee50e1242a3a Author: Kees Cook Date: Fri Dec 16 17:05:30 2016 -0800 scsi: cciss: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/block/cciss.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 93380123fbb5357d3ea6935efc9226df3c59099d Author: Kees Cook Date: Fri Dec 16 17:04:49 2016 -0800 scsi: hpsa: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 4b089d18ed979d91424355b117070f2520f85aeb Author: James Smart Date: Mon Dec 19 15:07:31 2016 -0800 scsi: lpfc: lpfc version change to 11.2.0.4 lpfc version change to 11.2.0.4 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b3b3bdb83b4ad51252d21bb13596db879e51850 Author: James Smart Date: Mon Dec 19 15:07:30 2016 -0800 scsi: lpfc: Add missing memory barrier On loosely ordered memory systems (PPC for example), the WQE elements were being updated in memory, but not necessarily flushed before the separate doorbell was written to hw which would cause hw to dma the WQE element. Thus, the hardware occasionally received partially updated WQE data. Add the memory barrier after updating the WQE memory. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 2 ++ 1 file changed, 2 insertions(+) commit 2f07784f05c23b322863274e801c31aa64e46c71 Author: James Smart Date: Mon Dec 19 15:07:29 2016 -0800 scsi: lpfc: Correct oops on vport port resets Correct oops on vport port resets. Incorrect WQE type, thus the clearing code actually overstepped the WQE. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f2bf460cf5ef989f0a593d05932460326376d5f6 Author: James Smart Date: Mon Dec 19 15:07:27 2016 -0800 scsi: lpfc: Deprecate lpfc_prot_sg_seg_cnt parameter Deprecate lpfc_prot_sg_seg_cnt parameter. Eliminates driver from unnecessarily limiting DIF s/g list length. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi/lpfc/lpfc_attr.c | 10 ---------- 2 files changed, 11 deletions(-) commit b5749fe182a0fa1c39ea1b33c0691d436f269195 Author: James Smart Date: Mon Dec 19 15:07:26 2016 -0800 scsi: lpfc: Fix Xlane dynamic LUN set for LUN priority. Fix Xlane dynamic LUN set for LUN priority. Dynamic changing of the priority was not getting reflected on the LUN. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 23 +++++++++++++++-------- drivers/scsi/lpfc/lpfc_crtn.h | 7 ++++--- drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++++++------ 3 files changed, 31 insertions(+), 17 deletions(-) commit 104450eb08ca662e6b1d02da11aca9598e978f3e Author: James Smart Date: Mon Dec 19 15:07:25 2016 -0800 scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort FCoE VPort enable-disable does not bring up the VPort. VPI structure needed to be initialized before being re-registered. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_vport.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6c9231f604c2575be24c96d38deb70f145172f92 Author: James Smart Date: Mon Dec 19 15:07:24 2016 -0800 scsi: lpfc: Correct host name in symbolic_name field Correct host name in symbolic_name field of nameserver registrations Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e6c6acc0e0223ddaf867628d420ee196349c6fae Author: James Smart Date: Mon Dec 19 15:07:23 2016 -0800 scsi: lpfc: Correct issue leading to oops during link reset Correct issue leading to oops during link reset. Missing vport pointer. [mkp: fixed typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+) commit 8c6a6f4076984ab15c33c2a52a10b681359f5a2a Author: James Smart Date: Mon Dec 19 15:07:22 2016 -0800 scsi: lpfc: Deprecate lpfc_soft_wwn parameter Deprecate lpfc_soft_wwn parameter. No longer allow override of hw-assigned wwns Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 4 - drivers/scsi/lpfc/lpfc_attr.c | 216 ------------------------------------------ drivers/scsi/lpfc/lpfc_init.c | 16 +--- 3 files changed, 3 insertions(+), 233 deletions(-) commit b2fd103b05feabbc86db726ae121da94639892d7 Author: James Smart Date: Mon Dec 19 15:07:21 2016 -0800 scsi: lpfc: Correct error in setting OS Driver Version with FW Correct error in setting OS Driver Version with FW. Prior length was too short. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e0165f20447c8ca1d367725ee94d8ec9f38ca275 Author: James Smart Date: Mon Dec 19 15:07:20 2016 -0800 scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload Clear the VendorVersion in the PLOGI/PLOGI ACC payload Vendor version info may have been set on fabric login. Before sending PLOGI payloads, ensure that it's cleared. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 6 ++++++ drivers/scsi/lpfc/lpfc_hw.h | 6 ++++++ 2 files changed, 12 insertions(+) commit 40630f462824ee24bc00d692865c86c3828094e0 Author: Long Li Date: Wed Dec 14 18:46:03 2016 -0800 scsi: storvsc: properly set residual data length on errors On I/O errors, the Windows driver doesn't set data_transfer_length on error conditions other than SRB_STATUS_DATA_OVERRUN. In these cases we need to set data_transfer_length to 0, indicating there is no data transferred. On SRB_STATUS_DATA_OVERRUN, data_transfer_length is set by the Windows driver to the actual data transferred. Reported-by: Shiva Krishna Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit bba5dc332ec2d3a685cb4dae668c793f6a3713a3 Author: Long Li Date: Wed Dec 14 18:46:02 2016 -0800 scsi: storvsc: properly handle SRB_ERROR when sense message is present When sense message is present on error, we should pass along to the upper layer to decide how to deal with the error. This patch fixes connectivity issues with Fiber Channel devices. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3cd6d3d9b1abab8dcdf0800224ce26daac24eea2 Author: Long Li Date: Wed Dec 14 18:46:01 2016 -0800 scsi: storvsc: use tagged SRB requests if supported by the device Properly set SRB flags when hosting device supports tagged queuing. This patch improves the performance on Fiber Channel disks. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d86adf482b843b3a58a9ec3b7c1ccdbf7c705db1 Author: K. Y. Srinivasan Date: Wed Dec 14 18:46:00 2016 -0800 scsi: storvsc: Enable multi-queue support Enable multi-q support. We will allocate the outgoing channel using the following policy: 1. We will make every effort to pick a channel that is in the same NUMA node that is initiating the I/O 2. The mapping between the guest CPU and the outgoing channel is persistent. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 113 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 110 insertions(+), 3 deletions(-) commit 977965283526dd2e887331365da19b05c909a966 Author: K. Y. Srinivasan Date: Wed Dec 14 18:45:59 2016 -0800 scsi: storvsc: Remove the restriction on max segment size Remove the artificially imposed restriction on max segment size. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 -- 1 file changed, 2 deletions(-) commit f64dad2628bdf62eac7ac145a6e31430376b65e4 Author: K. Y. Srinivasan Date: Wed Dec 14 18:45:58 2016 -0800 scsi: storvsc: Enable tracking of queue depth Enable tracking of queue depth. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 1 + 1 file changed, 1 insertion(+) commit 57ea884b0dcf1e59661955919976ef138ec9cdb0 Author: Daniel Borkmann Date: Thu Jan 5 02:34:28 2017 +0100 packet: fix panic in __packet_set_timestamp on tpacket_v3 in tx mode When TX timestamping is in use with TPACKET_V3's TX ring, then we'll hit the BUG() in __packet_set_timestamp() when ring buffer slot is returned to user space via tpacket_destruct_skb(). This is due to v3 being assumed as unreachable here, but since 7f953ab2ba46 ("af_packet: TX_RING support for TPACKET_V3") it's not anymore. Fix it by filling the timestamp back into the ring slot. Fixes: 7f953ab2ba46 ("af_packet: TX_RING support for TPACKET_V3") Signed-off-by: Daniel Borkmann Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller net/packet/af_packet.c | 3 +++ 1 file changed, 3 insertions(+) commit e9ca038a94f5a41c0689c5f441fd9c5a567e6f39 Author: Bob Moore Date: Wed Dec 28 15:30:02 2016 +0800 ACPICA: Update version to 20161222 ACPICA commit 0d5a056877c2e37e0bfce8d262cec339dc8d55fd ACPICA commit 5bea13a9e1eb2a0da99600d181afbc5fa075a9eb Version 20161222 Link: https://github.com/acpica/acpica/commit/0d5a0568 Link: https://github.com/acpica/acpica/commit/5bea13a9 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b506235770fdb9796dd7bc806e5303bcac3b3fd Author: Bob Moore Date: Wed Dec 28 15:29:56 2016 +0800 ACPICA: Parser: Update parse info table for some operators ACPICA commit b90e39948954ff400cff1a3f8effddb67f15460b Operand for deref_of should not have been a term_arg, should be super_name. Rename NAME_OR_REF to SIMPLENAME. Link: https://github.com/acpica/acpica/commit/b90e3994 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acopcode.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9a947291374dbf377c4110f2387f3386d88cf5b0 Author: Bob Moore Date: Wed Dec 28 15:29:49 2016 +0800 ACPICA: Fix a problem with recent extra support for control method invocations ACPICA commit b7dae343fbb8c392999a66f5e08be5744a5d07e2 This change fixes a problem with the recent support that enables control method invocations as Target operands to many ASL operators. Eliminates errors similar to: Needed type [Reference], found [Processor] Link: https://github.com/acpica/acpica/commit/b7dae343 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psargs.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit ce87e09dd88c61f9088768a7708828423549725c Author: Bob Moore Date: Wed Dec 28 15:29:43 2016 +0800 ACPICA: Parser: Allow method invocations as target operands ACPICA commit a6cca7a4786cdbfd29cea67e84b5b01a8ae6ff1c Method invocations as target operands are allowed as target operands in the ASL grammar. This change implements support for this. Method must return a reference for this to work properly at runtime, however. Link: https://github.com/acpica/acpica/commit/a6cca7a4 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psargs.c | 86 ++++++++++++++++++++++++------------------ drivers/acpi/acpica/psloop.c | 4 ++ drivers/acpi/acpica/psobject.c | 10 ++++- drivers/acpi/acpica/pstree.c | 10 +++-- 4 files changed, 69 insertions(+), 41 deletions(-) commit 74e30f96ad21a338f9492325bc73c452049c2548 Author: Bob Moore Date: Tue Jan 3 13:30:41 2017 +0800 ACPICA: Fix for implicit result conversion for the ToXXX functions ACPICA commit e1342c9f2dde37a67e916099658b65984ef8a434 Implicit result conversion was incorrectly disabled for the following functions: FromBCD ToBCD ToDecimalString ToHexString ToInteger ToBuffer Link: https://github.com/acpica/acpica/commit/e1342c9f Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acopcode.h | 14 +++++++------- drivers/acpi/acpica/amlcode.h | 20 +++++++++++++++++--- drivers/acpi/acpica/exconvrt.c | 1 - drivers/acpi/acpica/exresop.c | 1 - 4 files changed, 24 insertions(+), 12 deletions(-) commit f8a892815fee8766518c64bcbc95557d16410ba2 Author: Dinh Nguyen Date: Sat Dec 17 22:45:03 2016 -0600 ARM: dts: socfpga: add fpga-manager node for Arria10 Add the FPGA manger DTS entry for Arria10. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3e2c972ca3204c73a777c7cfe91cc00c4dd1a7d3 Author: Dinh Nguyen Date: Sat Dec 17 21:42:32 2016 -0600 ARM: dts: socfpga: add the LTC2977 power monitor on Arria10 devkit Add the I2C LTC 2977 power monitor that is on the Arria10 devkit. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit a0c7807c3e8a303a6d9d492d55754ad1a1612dd7 Author: Dinh Nguyen Date: Fri Dec 16 17:15:00 2016 -0600 ARM: dts: socfpga: enable watchdog timer on Arria5 and Arria10 Enable the watchdog for Arria5 and Arria10. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 4 ++++ arch/arm/boot/dts/socfpga_arria5.dtsi | 4 ++++ 2 files changed, 8 insertions(+) commit a7f9dac38c0c500aaaf5335d904c5a48584f0eeb Author: Dinh Nguyen Date: Fri Dec 16 16:55:44 2016 -0600 ARM: dts: socfpga: enable CAN on Cyclone5 devkit Enable the CAN node on the Cyclone5 devkit. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit c4fb689307fbb12284efa9f8c95de60bec728964 Author: Dinh Nguyen Date: Thu Dec 15 23:30:03 2016 -0600 ARM: dts: socfpga: Add Rohm DH2228FV DAC Enable the SPI node and add the Rohm DH2228FV DAC. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4d3e72b1198bff5de939379d23c20d90e632b287 Author: Dinh Nguyen Date: Tue Dec 13 16:52:11 2016 -0600 ARM: dts: socfpga: set desired i2c clock on Cyclone5 and Arria5 devkits The I2C LCD display on the Cyclone5 and Arria5 devkits is only capable of the standard 100 kHz clock. Set the "clock-frequency" of the I2C node to be 100000. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria5_socdk.dts | 8 ++++++++ arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 8 ++++++++ 2 files changed, 16 insertions(+) commit 55b0f44cc2895460c7a244384b08e9d744894de8 Author: Dinh Nguyen Date: Mon Dec 12 22:02:44 2016 -0600 ARM: dts: socfpga: enable GPIO and LEDs for Cyclone5 and Arria5 devkits Enable all the GPIO ports and define the GPIO-based leds on the Cyclone5 and Arria5 devkits. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria5_socdk.dts | 35 ++++++++++++++++++++++++++++ arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 31 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 666b5d1e9f8762300a410f9548b6e370d71dd382 Author: Fabien Lahoudere Date: Tue Dec 20 09:42:44 2016 +0100 rtc: rx8010: change lock mechanism Remove spinlock and use the "rtc->ops_lock" from RTC subsystem instead. spin_lock_irqsave() is not needed here because we do not have hard IRQs. This patch fixes the following issue: root@GE004097290448 b850v3:~# hwclock --systohc root@GE004097290448 b850v3:~# hwclock --systohc root@GE004097290448 b850v3:~# hwclock --systohc root@GE004097290448 b850v3:~# hwclock --systohc root@GE004097290448 b850v3:~# hwclock --systohc [ 82.108175] BUG: spinlock wrong CPU on CPU#0, hwclock/855 [ 82.113660] lock: 0xedb4899c, .magic: dead4ead, .owner: hwclock/855, .owner_cpu: 1 [ 82.121329] CPU: 0 PID: 855 Comm: hwclock Not tainted 4.8.0-00042-g09d5410-dirty #20 [ 82.129078] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 82.135609] Backtrace: [ 82.138090] [<8010d378>] (dump_backtrace) from [<8010d5c0>] (show_stack+0x20/0x24) [ 82.145664] r7:ec936000 r6:600a0013 r5:00000000 r4:81031680 [ 82.151402] [<8010d5a0>] (show_stack) from [<80401518>] (dump_stack+0xb4/0xe8) [ 82.158636] [<80401464>] (dump_stack) from [<8017b8b0>] (spin_dump+0x84/0xcc) [ 82.165775] r10:00000000 r9:ec936000 r8:81056090 r7:600a0013 r6:edb4899c r5:edb4899c [ 82.173691] r4:e5033e00 r3:00000000 [ 82.177308] [<8017b82c>] (spin_dump) from [<8017bcb0>] (do_raw_spin_unlock+0x108/0x130) [ 82.185314] r5:edb4899c r4:edb4899c [ 82.188938] [<8017bba8>] (do_raw_spin_unlock) from [<8094b93c>] (_raw_spin_unlock_irqrestore+0x34/0x54) [ 82.198333] r5:edb4899c r4:600a0013 [ 82.201953] [<8094b908>] (_raw_spin_unlock_irqrestore) from [<8065b090>] (rx8010_set_time+0x14c/0x188) [ 82.211261] r5:00000020 r4:edb48990 [ 82.214882] [<8065af44>] (rx8010_set_time) from [<80653fe4>] (rtc_set_time+0x70/0x104) [ 82.222801] r7:00000051 r6:edb39da0 r5:edb39c00 r4:ec937e8c [ 82.228535] [<80653f74>] (rtc_set_time) from [<80655774>] (rtc_dev_ioctl+0x3c4/0x674) [ 82.236368] r7:00000051 r6:7ecf1b74 r5:00000000 r4:edb39c00 [ 82.242106] [<806553b0>] (rtc_dev_ioctl) from [<80284034>] (do_vfs_ioctl+0xa4/0xa6c) [ 82.249851] r8:00000003 r7:80284a40 r6:ed1e9c80 r5:edb44e60 r4:7ecf1b74 [ 82.256642] [<80283f90>] (do_vfs_ioctl) from [<80284a40>] (SyS_ioctl+0x44/0x6c) [ 82.263953] r10:00000000 r9:ec936000 r8:7ecf1b74 r7:4024700a r6:ed1e9c80 r5:00000003 [ 82.271869] r4:ed1e9c80 [ 82.274432] [<802849fc>] (SyS_ioctl) from [<80108520>] (ret_fast_syscall+0x0/0x1c) [ 82.282005] r9:ec936000 r8:801086c4 r7:00000036 r6:00000000 r5:00000003 r4:0008e1bc root@GE004097290448 b850v3:~# Message from syslogd@GE004097290448 at Dec 3 11:17:08 ... kernel:[ 82.108175] BUG: spinlock wrong CPU on CPU#0, hwclock/855 Message from syslogd@GE004097290448 at Dec 3 11:17:08 ... kernel:[ 82.113660] lock: 0xedb4899c, .magic: dead4ead, .owner: hwclock/855, .owner_cpu: 1 hwclock --systohc root@GE004097290448 b850v3:~# Signed-off-by: Fabien Lahoudere Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit df31175bb4d372b99410034a8ac23ae5526f49d2 Author: Paolo Bonzini Date: Mon Jan 2 16:22:27 2017 +0100 kernel-doc: make highlights more homogenous for the various backends $type_struct_full and friends are only used by the restructuredText backend, because it needs to separate enum/struct/typedef/union from the name of the type. However, $type_struct is *also* used by the rST backend. This is confusing. This patch replaces $type_struct's use in the rST backend with a new $type_fallback; it modifies $type_struct so that it can be used in the rST backend; and creates regular expressions like $type_struct for enum/typedef/union, for use in all backends. Note that, compared to $type_*_full, in the new regexes $1 includes both the "kind" and the name (before, $1 was pretty much a constant). Signed-off-by: Paolo Bonzini Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 68 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 18 deletions(-) commit 5267dd354bcd267f76d0f97193fe8a93899f8986 Author: Paolo Bonzini Date: Mon Jan 2 16:22:26 2017 +0100 kernel-doc: make member highlighting available in all backends Note that, in order to produce the correct Docbook markup, the "." or "->" must be separated from the member name in the regex's captured fields. For consistency, this change is applied to $type_member and $type_member_func too, not just to $type_member_xml. List mode only prints the struct name, to avoid any undesired change in the operation of docproc. Signed-off-by: Paolo Bonzini Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit fc6d7af89fa968c378d4437d7905ccd76efa6af4 Author: Paolo Bonzini Date: Mon Jan 2 16:22:25 2017 +0100 kernel-doc: include parameter type in docbook output The restructuredText output includes both the parameter type and the name for functions and function-typed members. Do the same for docbook. Signed-off-by: Paolo Bonzini Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b1aaa546b52baf7cdc97961e9ba445a26948c1af Author: Paolo Bonzini Date: Mon Jan 2 16:22:24 2017 +0100 kernel-doc: strip attributes even if they have an argument An inline function can have an attribute, as in include/linux/log2.h, and kernel-doc handles this already for simple cases. However, some attributes have arguments (e.g. the "target" attribute). Handle those too. Furthermore, attributes could be at the beginning of a function declaration, before the return type. To correctly handle this case, you need to strip spaces after the attributes; otherwise, dump_function is left confused. Signed-off-by: Paolo Bonzini Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 02a4f4fe522c29bcd4a61e094f7fe8d64f00ee06 Author: Paolo Bonzini Date: Mon Jan 2 16:22:23 2017 +0100 kernel-doc: cleanup parameter type in function-typed arguments A prototype like /** * foo - sample definition * @bar: a parameter */ int foo(int (*bar)(int x, int y)); is currently producing .. c:function:: int foo (int (*bar) (int x, int y) sample definition **Parameters** ``int (*)(int x, int y) bar`` a parameter Collapse the spaces so that the output is nicer. Signed-off-by: Paolo Bonzini Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet scripts/kernel-doc | 1 + 1 file changed, 1 insertion(+) commit f2c1a053ceedec87aa355fafe60db1af27d7d830 Author: Sanjeev Date: Sat Dec 24 16:27:31 2016 +0800 Doc: clarify source of jitter in USB1.1, and USB2.0 Even though the jitter due to USB1.1 may be 1ms, NTP can reduce its effect significantly. And USB2.0 reduces this anyway. Signed-off-by: Sanjeev Gupta Signed-off-by: Jonathan Corbet Documentation/pps/pps.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fe4c56c98c1338c0b8b69d08ccf5694bf8e1dcaf Author: Sanjeev Date: Sat Dec 24 16:27:30 2016 +0800 Doc: Typos in documentation No semantic changes. The next patch in this series will do the actual changes to sync with NTP current best practices Signed-off-by: Sanjeev Gupta Signed-off-by: Jonathan Corbet Documentation/pps/pps.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1235e18b502610becb99a1b6971a2afbbe02fa5 Author: Sanjeev Date: Sat Dec 24 16:27:29 2016 +0800 Doc: Correct PPS doc to reflect code location timepps.h , as well as PPS sample test utilities, are no longer in the kernel tree. Update documentation to point to new locations. Signed-off-by: Sanjeev Gupta Signed-off-by: Jonathan Corbet Documentation/pps/pps.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0a4cbc53d7986967503c1fc6450110fbf1db3b4b Author: Colin Ian King Date: Wed Dec 28 21:51:37 2016 +0000 Documentation: fix spelling mistakes of "Celcius" -- > "Celsius" Signed-off-by: Colin Ian King Acked-by: Guenter Roeck Signed-off-by: Jonathan Corbet Documentation/hwmon/ds1621 | 8 ++++---- Documentation/thermal/nouveau_thermal | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 843e4d1ed9e5c4a5d7e42adf0a2ab078f8978946 Author: Shilpasri G Bhat Date: Fri Dec 16 16:47:42 2016 +0530 Note that the POWER[89] processors are supported. Documentation: cpufreq: Update supported powernv processors Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar Signed-off-by: Jonathan Corbet Documentation/cpu-freq/user-guide.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5952758101fb55844957a8d4fe88402d9827cfb4 Author: Andrew Lunn Date: Wed Jan 4 19:56:24 2017 +0100 dsa: mv88e6xxx: Optimise atu_get Lookup in the ATU can be performed starting from a given MAC address. This is faster than starting with the first possible MAC address and iterating all entries. Entries are returned in numeric order. So if the MAC address returned is bigger than what we are searching for, we know it is not in the ATU. Using the benchmark provided by Volodymyr Bendiuga , https://www.spinics.net/lists/netdev/msg411550.html on an Marvell Armada 370 RD, the test to add a number of static fdb entries went from 1.616531 seconds to 0.312052 seconds. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 5 ++-- include/linux/etherdevice.h | 60 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) commit fb9a33ae6ba7eb6c22a2f37e4be7a96bf55da14d Author: Linus Walleij Date: Mon Dec 26 21:18:55 2016 +0100 power: supply: gpio_charger: switch to using GPIO descriptors The GPIO charger is using a mix of the legacy GPIO interface and which is not the modern way to use GPIOs. Refactor like this: - Use a GPIO descriptor for the GPIO line used to monitor the charger. - Fetch the descriptor with devm_gpiod_get() as the first method. - If this fails and we are *not* using device tree, then start looking to see if we can use platform data instead. - After looking up and requesting a GPIO number with the legacy API, convert it to a descriptor. This way we can later isolate and drop the legacy code as more platforms move over to using descriptors. Cc: Dmitry Eremin-Solenikov Cc: Heiko Stuebner Cc: Lars-Peter Clausen Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 84 ++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 34 deletions(-) commit c56ca24a01ee88e53d2ecf4c070653b6ef45968f Author: Colin Ian King Date: Wed Dec 28 21:59:26 2016 +0000 power: supply: fix spelling mistake: supply: "Celcius" -> "Celsius" trivial fix to spelling mistake in comments in the headers Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_btemp.c | 6 +++--- drivers/power/supply/bq24190_charger.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit e3e774186d2c011680516b5c65d8197a2b489555 Author: Colin Ian King Date: Thu Dec 29 15:23:12 2016 +0000 power: supply: wm97xx_battery: remove redundant 2nd null check on pdata pdata is being null checked twice, the 2nd check is redundant code and can be removed. Fixes CoverityScan CID 1392340 "Logically dead code" Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/wm97xx_battery.c | 5 ----- 1 file changed, 5 deletions(-) commit 1169735dc26c2c9a8e94efc5f66c2c95ce4fce14 Author: Hans de Goede Date: Thu Dec 22 13:00:11 2016 +0100 power: supply: axp288_fuel_gauge: Remove unnecessary irq?_en register writes Setting the irq_enable bits is taken care of by the irq chip when we request the irqs and the driver should not be meddling with the irq?_en registers itself. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit de4fb05142aa97d0cd7195059767517ada47e948 Author: Peter Rosin Date: Wed Dec 21 22:29:53 2016 +0100 power: supply: bq24735: bring down the noise level If there is no ti,ac-detect-gpios configured, it is normal to have failed reads of the options register. So, hold back on the log spamming. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbff4c8eaa85dca221f07c1d9669a1d58658199b Author: Peter Rosin Date: Wed Dec 21 22:29:52 2016 +0100 power: supply: bq24735: allow polling even if there is no ac-detect gpio It is possible to verify AC adapter presence via a register read, without any physical connection to the ACOK pin on the charger. Allow this. Signed-off-by: Peter Rosin Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 4 ++-- drivers/power/supply/bq24735-charger.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 577b1f06e22057e9cdc14b1ee5bd25435c71ff0f Author: Hans de Goede Date: Wed Dec 21 18:28:23 2016 +0100 power: supply: axp288_charger: Use one notifier_block per extcon cable Prior to this commit the code was using 1 notifier_block for all types of charger cable, this is incorrect as the notifier_block becomes part of a linked-list and now the same notifier_block is part of 3 linked lists. This commit fixes this by using a separate nb per extcon cable. Note this happened to work fine sofar because axp288_charger was the only listener, so when added to each of the 3 notifier chains, the next pointer in the nb would be set to 0, so we've 3 heads pointing to the same nb, with its next pointing to NULL. But as soon as we mix in a second extcon consumer things will go boom. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 41 +++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 7def63ca9cb2ba89a80669dd0bef0e8edfae25d4 Author: Hans de Goede Date: Wed Dec 21 15:36:57 2016 +0100 power: supply: axp288_charger: Fix the module not auto-loading Add a MODULE_DEVICE_TABLE to fix the module not auto-loading. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 620874c2df596e51922916a0b61cd1b1e5b8504a Author: Hans de Goede Date: Wed Dec 21 15:36:56 2016 +0100 power: supply: axp288_charger: Remove unnecessary irq?_en register writes Setting the irq_enable bits is taken care of by the irq chip when we request the irqs and the driver should not be meddling with the irq?_en registers itself. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit 8cffbe47e5986465a485290791f8dff7c2b0db3c Author: Hans de Goede Date: Wed Dec 21 15:36:55 2016 +0100 power: supply: axp288_charger: Fix wrong regmap_update_bits To set a bit to 1 one needs to pass the mask for the bit to set as second argument into regmap_update_bits, not "1". Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c5bcb8c576c5ce85f19cc71a7c936ade5210f88 Author: Hans de Goede Date: Wed Dec 21 15:36:54 2016 +0100 power: supply: axp288_charger: Get and process initial hardware-state Do not wait for an extcon notification before processing the cable states, instead queue the otg / cable work on probe to make sure we immediately process the initial hardware state. Note this also requiree moving the getting of the USB_HOST cable state from the extcon notifier to the workqueue function. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit bcd39ba7327e806190761aeefa953099e68ebe24 Author: Hans de Goede Date: Wed Dec 21 15:36:53 2016 +0100 power: supply: axp288_charger: Some minor cleanups Remove info->health, info->present and info->online caching, as no code is reading the cached values. Remove if (changed) check before calling power_supply_changed(), we return early from axp288_charger_extcon_evt_worker if nothing has changed, so the check is not needed. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 71851a63af60cb98cb877e52776b2700e868683b Author: Hans de Goede Date: Wed Dec 21 15:36:52 2016 +0100 power: supply: axp288_charger: Handle charger type changing without disconnect Deal with the charger type changing without a vbus-disconnect being reported in between the 2 charger type states: -Do not return from axp288_charger_extcon_evt_worker early in this case (track old_chg_type) -Make calling axp288_charger_enable_charger with the same value as before a nop, to avoid the need for the caller to check this -Do no do a dev_err when axp288_charger_enable_charger returns an error, axp288_charger_enable_charger already returns an error itself -Disable the charger before changing the charge-current setting (nop if vbus was seen as disconnected before the change) Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 7508f44129ca3dc749d057fa8c6f7164d85153db Author: Hans de Goede Date: Wed Dec 21 15:36:51 2016 +0100 power: supply: axp288_charger: Actually get and use the USB_HOST extcon device Nothing was setting info->otg.cable, so the extcon_get_cable_state_ calls on it would always return -EINVAL. This commit fixes this by actually setting info->otg.cable using the new extcon_get_extcon_dev_by_cable_id function. This commit also makes failing to register the extcon notifier for the USB_HOST cable an error rather then a warning, because we MUST have this notfier to properly disable the VBUS path when in host mode so that we're not drawing current from the 5V boost converter which is supplying power to the otg port when in host mode. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit d96e07350ab912420f4edc39017660591b0d177c Author: Hans de Goede Date: Wed Dec 21 15:36:50 2016 +0100 power: supply: axp288_charger: Move init_hw_regs call before supply registration Move the charger_init_hw_regs() above the power_supply_register call, the axp288_charger_usb_set_property() uses axp288_chrg_info.max_cv and .max_cc which get set by charger_init_hw_regs(). Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 42e2008a66a7e17ca0c4382ff676a9cfe7a633bd Author: Hans de Goede Date: Wed Dec 21 15:36:49 2016 +0100 power: supply: axp288_charger: Register extcon notifers after power_supply The extcon notifier work calls power_supply_changed on the power_supply we register, so the extcon notifiers should be registered after we register the power_supply. While touching this code anyways, refactor the code for the 3 cable types into a loop to avoid code repetition. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 42 +++++++++++++---------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit e3668e37f9078ccc1e938b9ddfc112877bbcf60a Author: Hans de Goede Date: Wed Dec 21 15:36:48 2016 +0100 power: supply: axp288_charger: Use devm_power_supply_register Use devm_power_supply_register instead of power_supply_register, this avoids the need to do manual cleanup and results in quite a nice code cleanup. Note it may seem excessive to add a "struct device *dev" helper local variable for the 1 time it is used in this patch, but future patches in this series also use it. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit 8bb17b6c83281b32adb063aa1baca2d531731edb Merge: feb583e 888f974 Author: Sebastian Reichel Date: Wed Jan 4 22:01:42 2017 +0100 Merge branch 'psy-mfd-axp288-immutable' into psy-next commit feb583e37f8a8cd474401b0ec25e8a8217a7efff Author: Nicolas Saenz Julienne Date: Tue Dec 20 16:31:13 2016 +0100 power: supply: add sbs-charger driver This adds support for sbs-charger compilant chips as defined here: http://sbs-forum.org/specs/sbc110.pdf This was tested on a arm board connected to an LTC4100 battery charger chip. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 6 + drivers/power/supply/Makefile | 1 + drivers/power/supply/sbs-charger.c | 274 +++++++++++++++++++++++++++++++++++++ 3 files changed, 281 insertions(+) commit 63219a2fe4653b0936daa0058bad2a65be12efa0 Author: Nicolas Saenz Julienne Date: Tue Dec 20 16:31:14 2016 +0100 dt-bindings: power: supply: sbs-charger bindings Adds device tree documentation for SBS charger compilant devices as defined here: http://sbs-forum.org/specs/sbc110.pdf Signed-off-by: Nicolas Saenz Julienne Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/sbs_sbs-charger.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit a7d143d42b3d88862e49a67716187c556fb4624b Author: Peter Rosin Date: Tue Dec 20 12:33:02 2016 +0100 power: supply: bq24735: always check for AC adapter presence in probe So what if there is a status_gpio specified? bq24735_charger_is_present() do have a working fallback for the case of no status_gpio. Simplify this by not special casing setups w/o status_gpio, folding two consecutive if-blocks in the process. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a07bea32c612bf32b7f36c0eb0b1e2f5c444183e Author: Peter Rosin Date: Tue Dec 20 12:33:01 2016 +0100 power: supply: bq24735: configure the charger as part of enabling it During probe, it makes no sense to take care to first not issue any i2c commands to verify if the connected part really is a bq24735, to later simply fail the probe in the next step when trying to configure the charger. So, delay configuration of the charging parameters until the charger is accessible (i.e. when the AC adapter is present) as part of enabling the charging. This also fixes the rather serious issue that the charging parameters are lost when the AC adapter is disconnected. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 2e66585ca255df195278a50143e0bccf26d735d6 Author: Peter Rosin Date: Tue Dec 20 12:33:00 2016 +0100 power: supply: bq24735: move down bq24735_{en,dis}able_charging bq24735_enable_charging() needs to call bq24735_config_charging(), which is something to change later, this is just a preparatory patch. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 5b903a1555e1d5b6e12ede53d5d8dc86fef94a03 Author: Milo Kim Date: Sun Dec 18 11:54:32 2016 +0900 power: supply: tps65217: Use generic charger name "tps65217-charger" is more appropriate name because the driver supports not only AC but also USB charger. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 757620c4e4fe6df40168228654de49cf94e21f7a Author: Milo Kim Date: Sun Dec 18 11:54:31 2016 +0900 power: supply: tps65217: Use generic name for get_property() Rename it as tps65217_charger_get_property(). Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit da50b3a584ffd273de76f8a72fcb151d6296a2dc Author: Milo Kim Date: Sun Dec 18 11:54:30 2016 +0900 power: supply: tps65217: Use generic name for power supply property Replace 'ac_props' with 'charger_props'. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3967d1f91cb80675712ca1222dc05c43432dc9c0 Author: Milo Kim Date: Sun Dec 18 11:54:29 2016 +0900 power: supply: tps65217: Use generic name for power supply structure Replace 'ac' of tps65217_charger structure with 'psy'. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3c2e58a6d7db00eb795618023546af46b356d9ac Author: Milo Kim Date: Sun Dec 18 11:54:28 2016 +0900 power: supply: tps65217: Use generic name for charger online This driver supports AC and USB chargers. Generic name is preferred. Replace 'ac_online' with 'online'. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 20a7e173c2a3604c418242f3e60ca36a28108816 Author: Milo Kim Date: Sun Dec 18 11:54:27 2016 +0900 power: supply: tps65217: Support USB charger interrupt TPS65217 has two charger interrupts - AC and USB power status change. Interrupt number in the TPS65217 driver data: IRQ number is only used on requesting the interrupt, so no need to keep it inside the driver data. Interrupt handler: Check not only AC but also USB charger status. In both cases, enable charging operation. Interrupt request: If an interrupt number is invalid, then use legacy polling thread. Otherwise, create IRQ threads to handle AC and USB charger event. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 52 ++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 9ef0bf1184a6dfb6d6dca1feca4c28d0d8da519c Author: Milo Kim Date: Sun Dec 18 11:54:26 2016 +0900 power: supply: tps65217: Use 'poll_task' on unloading the module Use the task_struct variable for running polling thread. If polling task is activated, then use it to stop running thread. This is a preceding step of supporting two interrupts of TPS65217 charger, so checking single IRQ number is not appropriate when the module is removed. Signed-off-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit bdca5d9e6b9ab0082a2aeb810941d78f10b75e63 Author: Chanwoo Choi Date: Wed Nov 30 14:57:32 2016 +0900 power: supply: qcom_smbb: Replace the deprecated extcon API This patch replaces the deprecated extcon API as following: - extcon_set_cable_state_() -> extcon_set_state_sync() Signed-off-by: Chanwoo Choi Signed-off-by: Sebastian Reichel drivers/power/supply/qcom_smbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c31480348fcfba76c351dbeea97f93622a3029ce Author: Chanwoo Choi Date: Wed Nov 30 14:57:31 2016 +0900 power: supply: axp288_charger: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 51 +++++++++-------------------------- 1 file changed, 13 insertions(+), 38 deletions(-) commit a50b0dbbaf49521cc47a0bcfd20a6f658258541c Author: Srikant Ritolia Date: Thu Dec 8 14:42:37 2016 +0530 power: supply: max8997_charger: Using device managed API and remove OOM print Use managed resource function devm_power_supply_register instead of power_supply_register to simplify the error path by allowing unregistering to happen automatically on error and remove. Removing max8997_battery_remove function also as it is now redundant. Also removing out of memory printk message after kzalloc as there is already enough information on failure. Signed-off-by: Srikant Ritolia Signed-off-by: Sebastian Reichel drivers/power/supply/max8997_charger.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 50111d3f886ac95cb76aefb6ceb0d1b6e78eefc0 Author: Quentin Schulz Date: Fri Dec 9 12:04:13 2016 +0100 power: supply: axp20x_usb_power: add 100mA max current limit for AXP223 The X-Powers AXP223 shares most of its behaviour with the AXP221 PMIC but allows the VBUS power supply max current to be set to 100mA (like the AXP209 PMIC). This basically adds a new compatible to the VBUS power supply driver and adds a check on the compatible when setting current max limit. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_usb_power.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ac88bebedae47ce2254f003d7a07dca14ca0c3eb Author: Quentin Schulz Date: Fri Dec 9 12:04:12 2016 +0100 dt-bindings: power: supply: axp20x_usb_power: add axp223 compatible This adds the "x-powers,axp223-usb-power-supply" to the list of compatibles for AXP20X VBUS power supply driver. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/axp20x_usb_power.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 5c3ff59b4e7ab1375169dd131d41c317bae84b82 Author: Quentin Schulz Date: Fri Dec 9 12:04:11 2016 +0100 power: supply: axp20x_usb_power: set min voltage and max current from sysfs AXP20X and AXP22X PMICs allow setting the min voltage and max current of VBUS power supply. This adds entries in sysfs to allow to do so. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_usb_power.c | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 0dcc70ca8644083b610a831173b114cbc67db3ec Author: Quentin Schulz Date: Fri Dec 9 12:04:09 2016 +0100 power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible This replaces calls to of_device_is_compatible to check data field of of_device_id matched when probing the driver. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_usb_power.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit bf383fea1fdde944839c8aca6a19d338feea715b Author: Peter Rosin Date: Thu Dec 15 10:28:46 2016 +0100 power: supply: bq24735-charger: optionally poll the ac-detect gpio If the ac-detect gpio does not support interrupts, provide a fallback to poll the gpio at a configurable interval. Signed-off-by: Peter Rosin Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/ti,bq24735.txt | 2 + drivers/power/supply/bq24735-charger.c | 49 +++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) commit 248efcf00602f0282587999bcc221a872bd72530 Author: Hans de Goede Date: Wed Dec 14 17:38:52 2016 +0100 power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time In order for the MSB -> LSB latching to work correctly we must read the 2 8 bit registers of a 12 bit value in one consecutive read. This fixes voltage_ocv reporting inconsistent values on my tablet. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 40 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) commit 4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258 Author: Hans de Goede Date: Wed Dec 14 17:38:51 2016 +0100 power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a time In order for the MSB -> LSB latching to work correctly we must read the 2 8 bit registers of a 15 bit value in one consecutive read. This fixes charge_full reporting 3498768 on some reads and 3354624 one other reads on my tablet (for the 3354624 value the raw LSB is 0x00). Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 63 +++++++++++++++++--------------- 1 file changed, 34 insertions(+), 29 deletions(-) commit 6f074bc878dc9b00c0df0bf3a8cb1d9e294cd881 Author: Hans de Goede Date: Wed Dec 14 17:38:50 2016 +0100 power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error If reading the register fails, return the actual error code, instead of the uninitialized val variable; Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 94c7073fe32a3254ac6bd3d194aa5ea230fed5c4 Author: Peter Rosin Date: Fri Dec 16 10:44:00 2016 +0100 dt-bindings: power: supply: bq24735: reverse the polarity of ac-detect The ACOK pin on the bq24735 is active-high, of course meaning that when AC is OK the pin is high. However, all Tegra dts files have incorrectly specified active-high even though the signal is inverted on the Tegra boards. This has worked since the Linux driver has also inverted the meaning of the GPIO. Fix this situation by simply specifying in the bindings what everybody else agrees on; that the ti,ac-detect-gpios is active on AC adapter absence. Signed-off-by: Peter Rosin Acked-by: Jon Hunter Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d0ddcba9e9dea9b5d43782da096489b15ffca99f Author: Peter Rosin Date: Wed Dec 14 00:56:43 2016 +0100 power: supply: bq24735-charger: simplify register update to stop charging Providing value bits outside of the mask is pointless. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 888f97435a856c2c5c6ca0b3337b68d595b5639e Author: Hans de Goede Date: Wed Dec 14 17:38:53 2016 +0100 power: supply: axp288_fuel_gauge: Drop platform_data dependency When the axp288_faul_gauge driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However the battery-data-framework which should provide that data never got merged, resulting in x86 tablets / laptops with an axp288 having no working battery monitor, as before this commit the driver would simply return -ENODEV if there is no platform data. This commit removes the dependency on the platform_data instead checking that the firmware has initialized the fuel-gauge and reading the info back from the pmic. What is missing from the read-back info is the table to map raw adc values to temperature, so this commit drops the temperature and temperature limits properties. The min voltage, charge design and model name info is also missing. Note that none of these are really important for userspace to have. All other functionality is preserved and actually made available by this commit. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=88471 Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 405 +++---------------------------- include/linux/mfd/axp20x.h | 22 -- 2 files changed, 33 insertions(+), 394 deletions(-) commit eac53b3664f592713655f5de59dc44bdd0cfc0bd Author: Hans de Goede Date: Wed Dec 21 15:36:47 2016 +0100 power: supply: axp288_charger: Drop platform_data dependency When the axp288_charger driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However the battery-data-framework which should provide that data never got merged, so the axp288_charger as merged upstream has never worked, its probe method simply always returns -ENODEV. This commit removes the dependency on the platform_data instead reading back the charging current and charging voltage that the firmware has set and using those values as the maximum values the user may set. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 88 ++++++++++++----------------------- include/linux/mfd/axp20x.h | 7 --- 2 files changed, 30 insertions(+), 65 deletions(-) commit d556f21cb0f8b66f2e7956244c1a739ee6401579 Author: Hans de Goede Date: Wed Dec 21 15:36:46 2016 +0100 power: supply: axp288_charger: Make charger_init_hw_regs propagate i2c errors Make charger_init_hw_regs propagate i2c errors, instead of only warning about them and then ignoring them. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 62 ++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 20 deletions(-) commit 49b2fd6ea63d7fe9c81f00e6d0117827db1d30c6 Author: Jonathan Cameron Date: Sun Jan 1 12:32:45 2017 +0000 docs: IIO documentation sphinx conversion This is a manual conversion of the existing DocBook documentation for IIO. The intent is not to substantially change any of the content in this patch, but to give a base to build upon. Signed-off-by: Jonathan Cameron Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/iio.tmpl | 697 --------------------- Documentation/driver-api/iio/buffers.rst | 125 ++++ Documentation/driver-api/iio/core.rst | 182 ++++++ Documentation/driver-api/iio/index.rst | 17 + Documentation/driver-api/iio/intro.rst | 33 + Documentation/driver-api/iio/triggered-buffers.rst | 69 ++ Documentation/driver-api/iio/triggers.rst | 80 +++ Documentation/driver-api/index.rst | 1 + 9 files changed, 508 insertions(+), 698 deletions(-) commit 30965eeab5c873ca7af410506e6f0965074bf702 Author: Geliang Tang Date: Sat Dec 24 23:45:06 2016 +0800 of: drop duplicate headers Drop duplicate headers string.h and of_platform.h. Signed-off-by: Geliang Tang Signed-off-by: Rob Herring drivers/of/overlay.c | 1 - drivers/of/resolver.c | 1 - drivers/of/unittest.c | 1 - 3 files changed, 3 deletions(-) commit a3b398e6f2f169f09e60ba99745ca444d7de693e Author: Smitha T Murthy Date: Wed Dec 21 11:14:31 2016 +0530 of: reserved_mem: set dma_ops for devices using reserved mem For some IPs, there may be virtual child devices created and for them its necessary to set the dma_ops if it's using reserved memory else it will call the dummy dma_ops during buffer operations for the child devices which will lead to memory mapping failure. Signed-off-by: Smitha T Murthy Signed-off-by: Pankaj Dubey Acked-by: Marek Szyprowski Signed-off-by: Rob Herring drivers/of/of_reserved_mem.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8eb9f2f9e4468e0fb86c2c06606a0ad03dd1a043 Author: Arjun V Date: Wed Jan 4 19:04:20 2017 +0530 cxgb4: Support compressed error vector for T6 t6fw-1.15.15.0 enabled compressed error vector in cpl_rx_pkt for T6. Updating driver to take care of these changes. Signed-off-by: Santosh Rastapur Signed-off-by: Arjun V Signed-off-by: Hariprasad Shenai Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 5 +++++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 16 ++++++++++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 7 +++++++ drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 15 +++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 4 ++++ 5 files changed, 45 insertions(+), 2 deletions(-) commit cee3548db1c38fab7622d0ae04718fdefc4f8240 Merge: 009146d 9b39f05 Author: David S. Miller Date: Wed Jan 4 13:47:55 2017 -0500 Merge branch 'sh_eth-intrs-cleanup' Sergei Shtylyov says: ==================== sh_eth: E-MAC interrupt handler cleanups Here's a set of 3 patches against DaveM's 'net-next.git' repo. I'm cleaning up the E-MAC interrupt handling with the main goal of factoring out the E-MAC interrupt handler into a separate function. [1/3] sh_eth: handle only enabled E-MAC interrupts [2/3] sh_eth: no need for *else* after *goto* [3/3] sh_eth: factor out sh_eth_emac_interrupt() ==================== Signed-off-by: David S. Miller commit 9b39f05ce8e0cf2857c37b72c0b3b92e6a026ed5 Author: Sergei Shtylyov Date: Wed Jan 4 15:11:21 2017 +0300 sh_eth: factor out sh_eth_emac_interrupt() The E-MAC interrupt (EESR.ECI) is not always caused by an error condition, so it really shouldn't be handled by sh_eth_error(). Factor out the E-MAC interrupt handler, sh_eth_emac_interrupt(), removing the ECI bit from the EESR's values throughout the driver... Update Cogent Embedded's copyright and clean up the whitespace in Renesas' copyright, while at it... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 102 +++++++++++++++++----------------- drivers/net/ethernet/renesas/sh_eth.h | 2 +- 2 files changed, 53 insertions(+), 51 deletions(-) commit 1940f240769ada7efe9d459991fe5dd80db3771a Author: Sergei Shtylyov Date: Wed Jan 4 15:10:50 2017 +0300 sh_eth: no need for *else* after *goto* Well, checkpatch.pl complains about *else* after *return* and *break* but not after *goto*... and it probably should have complained about the code in sh_eth_error(). Win couple LoCs by removing that *else*. :-) Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4063469971af9611648382559c2d399cce03ae67 Author: Sergei Shtylyov Date: Wed Jan 4 15:10:21 2017 +0300 sh_eth: handle only enabled E-MAC interrupts The driver should only handle the enabled E-MAC interrupts, like it does for the E-DMAC interrupts since commit 3893b27345ac ("sh_eth: workaround for spurious ECI interrupt"), so mask ECSR with ECSIPR when reading it in sh_eth_error(). Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1ed35d9179bc42c5ac7b86548cfae589be17b3e Author: Chris Wilson Date: Wed Jan 4 14:51:10 2017 +0000 drm/i915: Revoke fenced GTT mmapings across GPU reset The fence registers are clobbered by a GPU reset. If there is concurrent user access to a fenced region via a GTT mmaping, the access will not be fenced during the reset (until we restore the fences afterwards). In order to prevent invalid access during the reset, before we clobber the fences first we must invalidate the GTT mmapings. Access to the mmap will then be forced to fault in the page, and in handling the fault, i915_gem_fault() will take the struct_mutex and wait upon the reset to complete. v2: Fix up commentary. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99274 Testcase: igt/gem_mmap_gtt/hang Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170104145110.1486-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_drv.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 4 +++- drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 24 ++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) commit 25014521603f70225c1e6fa232839614f7b4f692 Author: Andy Shevchenko Date: Mon Jan 2 13:47:31 2017 +0200 spi: pxa2xx-pci: Enable DMA for Intel Merrifield SPI controller on Intel Merrifield is backed by DMA engine. Add necessary bits to support it. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-pci.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 63971c5682bf89e15083733dcd7b4610e789e843 Author: Andy Shevchenko Date: Mon Jan 2 13:44:29 2017 +0200 spi: pxa2xx: fix indentation of the comments in header Just for sake of readability fix the indentation of the comments in pxa2xx_ssp.h header file. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown include/linux/pxa2xx_ssp.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 009146d117b9b816193fce0f1ed75f015a398721 Author: Mahesh Bandewar Date: Tue Jan 3 12:47:16 2017 -0800 ipvlan: assign unique dev-id for each slave device. IPvlan setup uses one mac-address (of master). The IPv6 link-local addresses are derived using the mac-address on the link. Lack of dev-ids makes these link-local addresses same for all slaves including that of master device. dev-ids are necessary to add differentiation when L2 address is shared. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 1 + drivers/net/ipvlan/ipvlan_main.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit a896eee3349e4e7f35a83f3b1a93c2e048d976b9 Author: Vivien Didelot Date: Tue Jan 3 14:31:49 2017 -0500 net: dsa: remove out label in dsa_switch_setup_one The "out" label in dsa_switch_setup_one() is useless, thus remove it. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit 9feb16ae0b2d5246e20a8dd9049441780e59c2a1 Author: Prasad Kanneganti Date: Tue Jan 3 11:27:33 2017 -0800 liquidio: remove PTP support in 23XX adapters liquidio driver incorrectly indicates that PTP is supported in 23XX adapters; this patch fixes that. PTP is supported in 66XX and 68XX adapters, and the driver correctly indicates that. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ac4340fc3ce0e0b1cb627b05d6dcbd473544d7b3 Author: David S. Miller Date: Wed Jan 4 13:24:19 2017 -0500 net: Assert at build time the assumptions we make about the CMSG header. It must always be the case that CMSG_ALIGN(sizeof(hdr)) == sizeof(hdr). Otherwise there are missing adjustments in the various calculations that parse and build these things. Signed-off-by: David S. Miller net/compat.c | 3 +++ net/socket.c | 2 ++ 2 files changed, 5 insertions(+) commit 1ff8cebf49ed9e9ca2ae44b5c4176aef9c21af9c Author: yuan linyu Date: Tue Jan 3 20:42:17 2017 +0800 scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct {compat_}cmsghdr)) sizeof(struct cmsghdr) and sizeof(struct compat_cmsghdr) already aligned. remove use CMSG_ALIGN(sizeof(struct cmsghdr)) and CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)) keep code consistent. Signed-off-by: yuan linyu Signed-off-by: David S. Miller include/linux/socket.h | 6 +++--- net/compat.c | 14 ++++++-------- net/core/scm.c | 2 +- net/ipv4/ip_sockglue.c | 2 +- net/rxrpc/sendmsg.c | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) commit e7ad4a73364c21f40963a35631b285b60fa3198c Author: Geert Uytterhoeven Date: Wed Jan 4 11:15:08 2017 +0100 spi: sh-msiof: Remove useless memory allocation failure message Printing an error on memory allocation failure is unnecessary. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ffcfae3823751c72b615b57f700e563667002d09 Author: Geert Uytterhoeven Date: Wed Jan 4 11:15:07 2017 +0100 spi: rspi: Remove useless memory allocation failure message Printing an error on memory allocation failure is unnecessary. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ed3c177d960bb5881b945ca6f784868126bb90db Author: Takashi Iwai Date: Wed Jan 4 12:34:14 2017 +0100 ALSA: vx: Don't try to update capture stream before running The update of stream costs significantly, and we should avoid it unless the stream really has started. Check pipe->running flag instead of pipe->prepared. Signed-off-by: Takashi Iwai sound/drivers/vx/vx_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 874e1f6fad9a5184b67f4cee37c1335cd2cc5677 Author: Takashi Iwai Date: Wed Jan 4 12:19:15 2017 +0100 ALSA: vx: Fix possible transfer overflow The pseudo DMA transfer codes in VX222 and VX-pocket driver have a slight bug where they check the buffer boundary wrongly, and may overflow. Also, the zero sample count might be handled badly for the playback (although it shouldn't happen in theory). This patch addresses these issues. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=141541 Signed-off-by: Takashi Iwai sound/drivers/vx/vx_pcm.c | 6 ++++-- sound/pci/vx222/vx222_ops.c | 12 ++++++------ sound/pcmcia/vx/vxp_ops.c | 12 ++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) commit 6f05afcbb031722ec1eff77dde188ff2edf8940e Author: Rob Herring Date: Wed Jan 4 10:45:20 2017 -0600 scripts/dtc: Update to upstream version 0931cea3ba20 Sync to upstream dtc commit 0931cea3ba20 ("dtc: fdtdump: check fdt if not in scanning mode"). In particular, this pulls in dtc overlay support. This adds the following commits from upstream: f88865469b65 dtc: Fix memory leak in character literal parsing 00fbb8696b66 Rename boot_info 1ef86ad2c24f dtc: Clean up /dts-v1/ and /plugin/ handling in grammar e3c769aa9c16 dtc: Don't always generate __symbols__ for plugins c96cb3c0169e tests: Don't use -@ on plugin de/recompile tests 66381538ce24 tests: Remove "suppression of fixups" tests ba765b273f0f tests: Clarify dtc overlay tests 6ea8cd944fcd tests: More thorough tests of libfdt overlay application without dtc 7d8ef6e1db97 tests: Correct fdt handling of overlays without fixups and base trees without symbols b4dc0ed8b127 tests: Fix double expansion bugs in test code 3ea879dc0c8f tests: Split overlay tests into those with do/don't exercise dtc plugin generation 47b4d66a2f11 tests: Test auto-alias generation on base tree, not overlay 72e1ad811523 tests: Make overlay/plugin tests unconditional e7b3c3b5951b tests: Add overlay tests 9637e3f772a9 tests: Add check_path test 20f29d8d41f6 dtc: Plugin and fixup support a2c92cac53f8 dtc: Document the dynamic plugin internals 8f70ac39801d checks: Pass boot_info instead of root node ea10f953878f libfdt: add missing errors to fdt_strerror() daa75e8fa594 libfdt: fix fdt_stringlist_search() e28eff5b787a libfdt: fix fdt_stringlist_count() ae97c7722840 tests: overlay: Rename the device tree blobs to be more explicit 96162d2bd9cb tests: overlay: Add test suffix to the compiled blobs 5ce8634733b7 libfdt: Add fdt_overlay_apply to the exported symbols 804a9db90ad2 fdt: strerr: Remove spurious BADOVERLAY e8c3a1a493fa tests: overlay: Move back the bad fixup tests 7a72d89d3f81 libfdt: overlay: Fix symbols and fixups nodes condition cabbaa972cdd libfdt: overlay: Report a bad overlay for mismatching local fixups deb0a5c1aeaa libfdt: Add BADPHANDLE error string 7b7a6be9ba15 libfdt: Don't use 'index' as a local variable name aea8860d831e tests: Add tests cases for the overlay code 0cdd06c5135b libfdt: Add overlay application function 39240cc865cf libfdt: Extend the reach of FDT_ERR_BADPHANDLE 4aa3a6f5e6d9 libfdt: Add new errors for the overlay code 6d1832c9e64b dtc: Remove "home page" link 45fd440a9561 Fix some typing errors in libfdt.h and livetree.c a59be4939c13 Merge tag 'v1.4.2' a34bb721caca dtc: Fix assorted problems in the testcases for the -a option 874f40588d3e Implement the -a option to pad dtb aligned ec02b34c05be dtc: Makefile improvements for release uploading 1ed45d40a137 dtc: Bump version to 1.4.2 36fd7331fb11 libfdt: simplify fdt_del_mem_rsv() d877364e4a0f libfdt: Add fdt_setprop_inplace_namelen_partial 3e9037aaad44 libfdt: Add fdt_getprop_namelen_w 84e0e1346c68 libfdt: Add max phandle retrieval function d29126c90acb libfdt: Add iterator over properties 902d0f0953d0 libfdt: Add a subnodes iterator macro c539075ba8ba fdtput.c: Fix memory leak. f79ddb83e185 fdtget.c: Fix memory leak 1074ee54b63f convert-dtsv0-lexer.l: fix memory leak e24d39a024e6 fdtdump.c: make sure size_t argument to memchr is always unsigned. 44a59713cf05 Remove unused srcpos_dump() function cb9241ae3453 DTC: Fix memory leak on flatname. 1ee0ae24ea09 Simplify check field and macro names 9d97527a8621 Remove property check functions 2e709d158e11 Remove tree check functions c4cb12e193e3 Alter grammar to allow multiple /dts-v1/ tags d71d25d76012 Use xasprintf() in srcpos 9dc404958e9c util: Add xasprintf portable asprintf variant beef80b8b55f Correct a missing space in a fdt_header cast 68d43cec1253 Correct line lengths in libfdt.h b0dbceafd49a Correct space-after-tab in libfdt.h Signed-off-by: Rob Herring scripts/dtc/checks.c | 349 ++++++++-------- scripts/dtc/dtc-lexer.l | 21 +- scripts/dtc/dtc-lexer.lex.c_shipped | 650 +++++++++++++++--------------- scripts/dtc/dtc-parser.tab.c_shipped | 752 ++++++++++++++++++----------------- scripts/dtc/dtc-parser.tab.h_shipped | 54 +-- scripts/dtc/dtc-parser.y | 34 +- scripts/dtc/dtc.c | 69 +++- scripts/dtc/dtc.h | 39 +- scripts/dtc/flattree.c | 41 +- scripts/dtc/fstree.c | 5 +- scripts/dtc/libfdt/Makefile.libfdt | 2 +- scripts/dtc/libfdt/fdt_ro.c | 30 +- scripts/dtc/libfdt/fdt_rw.c | 6 +- scripts/dtc/libfdt/fdt_strerror.c | 6 + scripts/dtc/libfdt/fdt_wip.c | 29 +- scripts/dtc/libfdt/libfdt.h | 210 ++++++++-- scripts/dtc/libfdt/libfdt_env.h | 1 + scripts/dtc/livetree.c | 299 +++++++++++++- scripts/dtc/srcpos.c | 35 +- scripts/dtc/srcpos.h | 1 - scripts/dtc/treesource.c | 14 +- scripts/dtc/util.c | 30 ++ scripts/dtc/util.h | 1 + scripts/dtc/version_gen.h | 2 +- 24 files changed, 1661 insertions(+), 1019 deletions(-) commit fd7d6c5c8f3e46bf168c8560c842285c13ab7dd7 Author: Paulo Zanoni Date: Fri Dec 23 10:23:58 2016 -0200 drm/i915: enable FBC on gen9+ too Gen9+ platforms have been seeing a lot of screen flickerings and underruns, so I never felt comfortable in enabling FBC on these platforms since I didn't want to throw yet another feature on top of the already complex problem. We now have code that automatically disables FBC if we ever get an underrun, and the screen flickerings seem to be mostly gone, so it may be a good time to try to finally enable FBC by default on the newer platforms. Besides, BDW FBC has been working fine over the year, which gives me a little more confidence now. For a little more information, please refer to commit a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW"). v2: Enable not only on SKL, but for everything new (Daniel). v3: Rebase after the intel_sanitize_fbc_option() change. v4: New rebase after 8 months, drop expired R-B tags. Signed-off-by: Paulo Zanoni Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482495839-27041-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_fbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98b2f01c8dfc8922a2af1fe82a1c40cac4911634 Author: Paulo Zanoni Date: Tue Jan 3 18:04:20 2017 -0200 drm/i915: actually drive the BDW reserved IDs Back in 2014, commit fb7023e0e248 ("drm/i915: BDW: Adding Reserved PCI IDs.") added the reserved PCI IDs in order to try to make sure we had working drivers in case we ever released products using these IDs (since we had instances of this type of problem in the past). The problem is that the patch only touched the macros used by early-quirks.c and by the user space components that rely on i915_pciids.h, it didn't touch the macros used by i915_pci.c. So we correctly handled the stolen memory for these theoretical IDs, but we didn't actually drive the devices from i915.ko. So this patch fixes the original commit by actually making i915.ko drive these IDs, which was the goal. There's no information on what would be the GT count on these IDs, so we just go with the safer intel_broadwell_info, at the risk of ignoring a possibly inexistent BSD2_RING. I did some checking, and it seems that these IDs are driven by intel-gpu-tools, xf86-video-intel and libdrm (since they contain old copies of i915_pciids.h), but they are not checked by mesa. The alternative to this patch would be to just assume we're actually never going to use these IDs, and then remove them from our ID lists and make sure our user space components sync the latest i915_pciids.h copy. I'm fine with either approaches, as long as we make sure that every component tries to drive the same list of PCI IDs. Fixes: fb7023e0e248 ("drm/i915: BDW: Adding Reserved PCI IDs.") Cc: Rodrigo Vivi Cc: Ben Widawsky Cc: Jani Nikula Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483473860-17644-3-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) commit 0784bc624ae9be4269f8129572ee164ca680ca7c Author: Paulo Zanoni Date: Tue Jan 3 18:04:19 2017 -0200 drm/i915: more .is_mobile cleanups for BDW Commit 8d9c20e1d1e3 ("drm/i915: Remove .is_mobile field from platform struct") removed mobile vs desktop differences for HSW+, but forgot the Broadwell reserved IDs, so do it now. It's interesting to notice that these IDs are used by early-quirks.c but are *not* used by i915_pci.c. Cc: Carlos Santa Cc: Rodrigo Vivi Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483473860-17644-2-git-send-email-paulo.r.zanoni@intel.com include/drm/i915_pciids.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7fbd995ce4241e98d30859405504c3fb279c4ccb Author: Paulo Zanoni Date: Tue Jan 3 18:04:18 2017 -0200 drm/i915: fix INTEL_BDW_IDS definition Remove duplicated IDs from the list. Currently, this definition is only used by early-quirks.c. From my understanding of the code, having duplicated IDs shouldn't be causing any bugs. Fixes: 8d9c20e1d1e3 ("drm/i915: Remove .is_mobile field from platform struct") Cc: Carlos Santa Cc: Rodrigo Vivi Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1483473860-17644-1-git-send-email-paulo.r.zanoni@intel.com include/drm/i915_pciids.h | 2 -- 1 file changed, 2 deletions(-) commit 76fede2fa79d0d02f6874f023a39b8bd5f52e297 Author: Maarten Lankhorst Date: Wed Jan 4 12:34:00 2017 +0100 drm/atomic: Fix outdated comment. Commit 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") adds reference counting to atomic state, but didn't update the comments in drm_atomic_(nonblocking_)commit. Clarify lifetime a bit more. Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Cc: # v4.10-rc1+ Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/7acd1c78-ea86-7776-d98d-c846186e4b88@linux.intel.com drivers/gpu/drm/drm_atomic.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit eba484b51b8c1346759785d40fa4d6ec5590b705 Author: Geliang Tang Date: Mon Dec 19 22:46:58 2016 +0800 iommu/iova: Use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 80317c2cb40085a3dcf80015bc39fbac40e2092a Author: Bard Liao Date: Wed Jan 4 13:14:12 2017 +0800 ASoC: rt5640: move DAC2 Power to rt5640_dapm_widgets "DAC L2 Power" and "DAC R2 Power" are used by both rt5639 and rt5640. But it was defined in rt5640_specific_dapm_widgets[]. Move them to rt5640_dapm_widgets will let both rt5639 and rt5640 can use it. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 42f7f3c4811b3149253ecf2e133832c969884466 Author: Jarkko Nikula Date: Tue Dec 27 22:12:16 2016 +0200 drm/omap: panel-sony-acx565akm.c: Add MODULE_ALIAS Add module alias for Sony ACX565AKM LCD panel. This makes it probe on Nokia N900 when panel driver is built as a module. Signed-off-by: Jarkko Nikula Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 + 1 file changed, 1 insertion(+) commit 7e6d80ddb29d7254cbf699075fc4f752f10cacc6 Author: H. Nikolaus Schaller Date: Mon Dec 26 20:23:19 2016 +0100 drm/omap: dsi: fix compile errors when enabling debug prints dsi.c compile fails if PRINT_VERBOSE_VM_TIMINGS is enabled, as the video timings were not converted in the code behind that ifdef. Note that PRINT_VERBOSE_VM_TIMINGS has to be enabled by hand, there's no config option for it. Signed-off-by: H. Nikolaus Schaller Acked-by: Peter Ujfalusi [tomi.valkeinen@ti.com: fixed the patch description] Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit bb82250fc45631bcac52af22328cb7c4dda3b763 Author: Javier Martinez Canillas Date: Mon Jan 2 13:03:27 2017 -0300 backlight: da9052: Fix module autoload The driver has a platform device ID table with multiple device entries, each setting a different register address in its driver_data to control the WLED brightness. But the driver doesn't export these as aliases with MODULE_DEVICE_TABLE() when the driver is built as a module, instead it just has a single alias using MODULE_ALIAS("platform:da9052-backlight"). That is clearly wrong since there isn't a "da9052-backlight" in the platform device ID table, so if that device name is used, the device won't even match the driver. So instead of having a wrong alias, export the ones in the dev ID table. Before this patch: $ modinfo drivers/video/backlight/da9052_bl.ko | grep alias alias: platform:da9052-backlight After this patch: $ modinfo drivers/video/backlight/da9052_bl.ko | grep alias alias: platform:da9052-wled3 alias: platform:da9052-wled2 alias: platform:da9052-wled1 Signed-off-by: Javier Martinez Canillas Acked-by: Adam Thomson Acked-by: Jingoo Han Signed-off-by: Lee Jones drivers/video/backlight/da9052_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1b81294575098d989be1f2f6bb628091ceaa87b Author: Peter Ujfalusi Date: Tue Nov 22 15:41:23 2016 +0200 backlight: pwm_bl: Check the PWM state for initial backlight power state If the PWM is not enabled the backlight initially should not be enabled either if we have booted with DT and there is a phandle pointing to the backlight node. The patch extends the checks to decide if we should keep the backlight off initially. Signed-off-by: Peter Ujfalusi Acked-by: Philipp Zabel Reviewed-by: Thierry Reding Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7613c922315e308a6486d802abed2eb74443dffd Author: Peter Ujfalusi Date: Tue Nov 22 15:41:22 2016 +0200 backlight: pwm_bl: Move the checks for initial power state to a separate function Move the checks to select the initial state for the backlight to a new function and document the checks we are doing. With the separate function it is going to be easier to fix or improve the initial power state configuration later and it is easier to read the code. Signed-off-by: Peter Ujfalusi Reviewed-by: Philipp Zabel Reviewed-by: Thierry Reding Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 56 ++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 19 deletions(-) commit 0eb3fba8c68275f0122f65f7316efaaf86448016 Author: Alexey Khoroshilov Date: Sat Jul 9 01:19:51 2016 +0300 backlight: adp5520: Fix error handling in adp5520_bl_probe() If adp5520_bl_setup() fails, sysfs group left unremoved. By the way, fix overcomplicated assignement of error code. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Michael Hennerich Signed-off-by: Lee Jones drivers/video/backlight/adp5520_bl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit cc21942bce652d1a92dae85b785378256e1df1f7 Author: Uwe Kleine-König Date: Wed Jul 6 19:33:05 2016 +0200 backlight: lcd: Fix race condition during register Once device_register is called for a device its attributes might be accessed. As the callbacks of a lcd device's attributes make use of the lcd_ops, the respective member must be setup before calling device_register. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones drivers/video/backlight/lcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef426c103892eed94a9bb0ee59c2d0e6eac5179f Merge: a402eae 9b8b75d Author: Daniel Vetter Date: Wed Jan 4 11:41:10 2017 +0100 Merge tag 'drm-misc-next-2016-12-30' of git://anongit.freedesktop.org/git/drm-misc into drm-intel-next-queued Directly merge drm-misc into drm-intel since Dave is on vacation and we need the various drm-misc patches (fb format rework, drm mm fixes, selftest framework and others). Also pulled back -rc2 in first to resync with drm-intel-fixes and make sure I can reuse the exact rerere solutions from drm-tip for safety, and because I'm lazy. Signed-off-by: Daniel Vetter commit b8e98db0dc64516ab66a6354f7b50c768df3185c Author: Russell King Date: Mon Jan 2 14:59:12 2017 +0000 ARM: dts: armada388-clearfog: move rear button Move the rear button support into the clearfog pro support file. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 18 ++++++++++++++++++ arch/arm/boot/dts/armada-388-clearfog.dtsi | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) commit 869fe59cd194c2b0799bc9bb4c0b2de184dea0a9 Author: Russell King Date: Mon Jan 2 14:59:07 2017 +0000 ARM: dts: armada388-clearfog: move SPI CS1 Move the SPI CS1 configuration to the clearfog .dts file as this is only present on pro models. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 14 ++++++++++++++ arch/arm/boot/dts/armada-388-clearfog.dtsi | 10 ++-------- 2 files changed, 16 insertions(+), 8 deletions(-) commit 54f0ec0a3d4861a4ea7c8fce6f7ca1aeb0089375 Author: Russell King Date: Mon Jan 2 14:59:02 2017 +0000 ARM: dts: armada388-clearfog: move second PCIe port Move the second PCIe port to the clearfog .dts file as this is only present on the pro models. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 51 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/armada-388-clearfog.dtsi | 28 ++-------------- 2 files changed, 54 insertions(+), 25 deletions(-) commit d5bd63358595dc0171ec848bf1e7969d11ad8837 Author: Russell King Date: Mon Jan 2 14:58:57 2017 +0000 ARM: dts: armada388-clearfog: move DSA switch Move the DSA switch configuration to the clearfog .dts file as this is only present on the pro models. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 75 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/armada-388-clearfog.dtsi | 69 --------------------------- 2 files changed, 75 insertions(+), 69 deletions(-) commit 76138f94a3532564d1ba56dca98ee89d78dcf7d0 Author: Russell King Date: Mon Jan 2 14:58:52 2017 +0000 ARM: dts: armada388-clearfog: split clearfog DTS file There are two versions of the clearfog - a base and a pro model. The base model has an additional PHY on eth1, replacing the DSA switch on the pro model. MPP assignments are slightly different. The base model also omits the second PCIe, and footprint for a PIC microcontroller. In order to cater for these differences, move all the existing clearfog support to a dtsi file before starting to modify it, to make the following changes more clear. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 378 +------------------------ arch/arm/boot/dts/armada-388-clearfog.dtsi | 425 +++++++++++++++++++++++++++++ 2 files changed, 427 insertions(+), 376 deletions(-) commit 77fb9c04a8afb650526ef9e45a09516c0ec1318c Author: Russell King Date: Mon Jan 2 14:58:46 2017 +0000 ARM: dts: armada388-clearfog: move sdhci pinctrl node to microsom Move the SDHCI pinctrl node to the microsom file - the microsom can have optional eMMC support which uses these same pinctrl settings, so it is sensible to have these here. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 8 +------- arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 7 +++++++ 2 files changed, 8 insertions(+), 7 deletions(-) commit 744771fc982a0670f4828f36504ba71f83b074d9 Author: Russell King Date: Mon Jan 2 14:58:41 2017 +0000 ARM: dts: armada388-clearfog: move SPI flash into microsom The optional SPI flash is fitted to the microsom, not the clearfog board, so it should be specified in the microsom DTS include file. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 14 ++------------ arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) commit 2cd367356a76fff5de652c68d6b6541d329ad5f6 Author: Russell King Date: Mon Jan 2 14:55:32 2017 +0000 ARM: dts: armada388-clearfog: fix SPI flash #size-cells The SPI flash #size-cells is specified in the binding documentation to have value 1, but we were setting it to zero. This wasn't causing any problem as we do not list any partitions, but it's worth specifying correctly if we're going to specify it at all. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a402eae64d0ad12b1c4a411f250d6c161e67f623 Merge: 7800fb6 0c744ea Author: Daniel Vetter Date: Wed Jan 4 11:34:01 2017 +0100 Merge tag 'v4.10-rc2' into drm-intel-next-queued Backmerge Linux 4.10-rc2 to resync with our -fixes cherry-picks. I've done the backmerge directly because Dave is on vacation. Signed-off-by: Daniel Vetter commit ab949d519601880fd46e8bc1445d6a453bf2dc09 Author: Takashi Iwai Date: Mon Jan 2 11:37:04 2017 +0100 ALSA: hda - Fix deadlock of controller device lock at unbinding Imre Deak reported a deadlock of HD-audio driver at unbinding while it's still in probing. Since we probe the codecs asynchronously in a work, the codec driver probe may still be kicked off while the controller itself is being unbound. And, azx_remove() tries to process all pending tasks via cancel_work_sync() for fixing the other races (see commit [0b8c82190c12: ALSA: hda - Cancel probe work instead of flush at remove]), now we may meet a bizarre deadlock: Unbind snd_hda_intel via sysfs: device_release_driver() -> device_lock(snd_hda_intel) -> azx_remove() -> cancel_work_sync(azx_probe_work) azx_probe_work(): codec driver probe() -> __driver_attach() -> device_lock(snd_hda_intel) This deadlock is caused by the fact that both device_release_driver() and driver_probe_device() take both the device and its parent locks at the same time. The codec device sets the controller device as its parent, and this lock is taken before the probe() callback is called, while the controller remove() callback gets called also with the same lock. In this patch, as an ugly workaround, we unlock the controller device temporarily during cancel_work_sync() call. The race against another bind call should be still suppressed by the parent's device lock. Reported-by: Imre Deak Fixes: 0b8c82190c12 ("ALSA: hda - Cancel probe work instead of flush at remove") Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 24835e442f289813aa568d142a755672a740503c Author: Daniel Vetter Date: Wed Dec 21 11:23:30 2016 +0100 drm: reference count event->completion When writing the generic nonblocking commit code I assumed that through clever lifetime management I can assure that the completion (stored in drm_crtc_commit) only gets freed after it is completed. And that worked. I also wanted to make nonblocking helpers resilient against driver bugs, by having timeouts everywhere. And that worked too. Unfortunately taking boths things together results in oopses :( Well, at least sometimes: What seems to happen is that the drm event hangs around forever stuck in limbo land. The nonblocking helpers eventually time out, move on and release it. Now the bug I tested all this against is drivers that just entirely fail to deliver the vblank events like they should, and in those cases the event is simply leaked. But what seems to happen, at least sometimes, on i915 is that the event is set up correctly, but somohow the vblank fails to fire in time. Which means the event isn't leaked, it's still there waiting for eventually a vblank to fire. That tends to happen when re-enabling the pipe, and then the trap springs and the kernel oopses. The correct fix here is simply to refcount the crtc commit to make sure that the event sticks around even for drivers which only sometimes fail to deliver vblanks for some arbitrary reasons. Since crtc commits are already refcounted that's easy to do. References: https://bugs.freedesktop.org/show_bug.cgi?id=96781 Cc: Jim Rees Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Jani Nikula Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161221102331.31033-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 11 +++++++++++ drivers/gpu/drm/drm_fops.c | 2 +- include/drm/drmP.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) commit 7800fb69ddf3a13d2055009c87eacf7f46f907c8 Author: Daniel Vetter Date: Mon Dec 19 09:24:23 2016 +0100 drm/i915: Update comment that sets I915_MODE_FLAG_INHERITED The code was moved, but the comment not updated. It confused me. Fixes: 7f4c62840cc4 ("drm/i915: Assign hwmode after encoder state readout") Cc: Maarten Lankhorst Cc: Patrik Jakobsson Cc: Ville Syrjälä Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161219082423.27798-6-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_display.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 0c5987d3e3c5bf7fb861230ee6d2a0f17a1dcd3b Author: Neil Armstrong Date: Wed Jan 4 09:24:30 2017 +0100 ARM: dts: OX820: Update with dt-bindings includes Add OX820 dt-bindings includes files for clocks and resets, replace resets numbers by human readable defines. Signed-off-by: Neil Armstrong arch/arm/boot/dts/ox820.dtsi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ed4d903d2f5431e30d32104693b8761a56aa8980 Author: Neil Armstrong Date: Fri Sep 9 12:24:07 2016 +0200 ARM: dts: OX810: Update with dt-bindings includes Add OX810SE dt-bindings includes files for clocks and resets, replace resets numbers by human readable defines. Signed-off-by: Neil Armstrong arch/arm/boot/dts/ox810se.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4b0ea93f250afc6c1128e201b0a8a115ae613e47 Author: Arvind Yadav Date: Tue Jan 3 17:00:27 2017 +0530 gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Here, pci_iomap can fail, handle this case and return -ENOMEM. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++ 1 file changed, 2 insertions(+) commit b2b9443beee5017ebdb3f2be9ef472c73d260481 Author: Laurent Pinchart Date: Sat Nov 19 05:28:07 2016 +0200 arm64: dts: r8a7795: Add PWM support Add the 7 PWM channels to the r8a7795 device tree, in the disabled state. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 569265002782503d40fb32a45a950f2ac42af353 Author: Gabriel Krisman Bertazi Date: Mon Jan 2 12:20:08 2017 -0200 drm: Document deprecated load/unload hook v2: - Replace discouraged with deprecated - Link to new initialization/teardown functions Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170102142008.22174-3-krisman@collabora.co.uk include/drm/drm_drv.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit a5ad0fd8524e5144512a5c25eda5a5d6fd55fda8 Author: Randy Dunlap Date: Sun Jan 1 16:20:53 2017 -0800 drm: nouveau: fix build when LEDS_CLASS=m Fix build errors in nouveau driver when CONFIG_LEDS_CLASS=m and CONFIG_DRM_NOUVEAU=y. If LEDS_CLASS is enabled, DRM_NOUVEAU is restricted to the same kconfig value as LEDS_CLASS. drivers/built-in.o: In function `nouveau_do_suspend': nouveau_drm.c:(.text+0x2030b1): undefined reference to `nouveau_led_suspend' drivers/built-in.o: In function `nouveau_do_resume': nouveau_drm.c:(.text+0x2034ca): undefined reference to `nouveau_led_resume' drivers/built-in.o: In function `nouveau_drm_unload': nouveau_drm.c:(.text+0x203a15): undefined reference to `nouveau_led_fini' drivers/built-in.o: In function `nouveau_drm_load': nouveau_drm.c:(.text+0x204423): undefined reference to `nouveau_led_init' BTW, this line in Kbuild: nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o does nothing when CONFIG_LEDS_CLASS=m and CONFIG_DRM_NOUVEAU=y. Signed-off-by: Randy Dunlap Reported-by: kbuild test robot Cc: Martin Peres Cc: Ben Skeggs Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/029a1ec5-48ac-a3ce-3106-430e0f2584bb@infradead.org drivers/gpu/drm/nouveau/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0cf1725676a97fc8b4dd88794ea0acc1325b4fb7 Author: Marek Vasut Date: Tue Aug 2 15:10:47 2016 +0200 mtd: spi-nor: cqspi: Fix build on arches missing readsl/writesl The x86-64 and some other architectures are missing readsl/writesl functions, so this driver won't build on them. Use a more portable ioread32_rep()/iowrite32_rep() instead. Signed-off-by: Marek Vasut Cc: Alan Tull Cc: Brian Norris Cc: David Woodhouse Cc: Dinh Nguyen Cc: Graham Moore Cc: Vignesh R Cc: Yves Vandervennet Suggested-by: Stefan Roese Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 2 +- drivers/mtd/spi-nor/cadence-quadspi.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 8c0216f377406c7613b67bd18755889026284192 Author: Thierry Reding Date: Wed Jan 4 09:40:54 2017 +0100 pwm: Remove .can_sleep from struct pwm_chip All PWM devices have been marked as "might sleep" since v4.5, there is no longer a need to differentiate on a per-chip basis. Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-hlcdc.c | 1 - drivers/pwm/pwm-atmel.c | 1 - drivers/pwm/pwm-bcm-kona.c | 1 - drivers/pwm/pwm-berlin.c | 1 - drivers/pwm/pwm-brcmstb.c | 1 - drivers/pwm/pwm-fsl-ftm.c | 1 - drivers/pwm/pwm-imx.c | 1 - drivers/pwm/pwm-lp3943.c | 1 - drivers/pwm/pwm-mxs.c | 2 +- drivers/pwm/pwm-pca9685.c | 1 - drivers/pwm/pwm-sti.c | 1 - drivers/pwm/pwm-sun4i.c | 1 - drivers/pwm/pwm-twl-led.c | 1 - drivers/pwm/pwm-twl.c | 1 - drivers/staging/greybus/pwm.c | 1 - include/linux/pwm.h | 3 --- 16 files changed, 1 insertion(+), 18 deletions(-) commit fe2858c8c6d167df33a839591ebe63ea05a69d06 Author: Thierry Reding Date: Wed Jan 4 09:39:52 2017 +0100 pwm: Remove pwm_can_sleep() The last user of this function has been removed, so it is no longer needed. Signed-off-by: Thierry Reding drivers/pwm/core.c | 12 ------------ include/linux/pwm.h | 7 ------- 2 files changed, 19 deletions(-) commit 247bde13b91aad0e27446eb356420052c474e4c3 Author: Thierry Reding Date: Wed Jan 4 09:37:56 2017 +0100 leds: pwm: Remove atomic code paths PWM devices have all been marked as "might sleep" since v4.5. It no longer makes sense to keep the alternative code paths around because it is effectively dead code. Signed-off-by: Thierry Reding drivers/leds/leds-pwm.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 28f1f9b26cee161ddd3985b3eb78e3ffada08dda Author: Kailang Yang Date: Wed Jan 4 14:49:07 2017 +0800 ALSA: hda/realtek - Add new codec ID ALC299 ALC299 was similar as ALC225. Add headset support for ALC299. ALC3271 was for Dell rename. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 327bc443416d5aeb37e27704b2d91d2f86b8c621 Author: Laurent Pinchart Date: Sat Nov 19 05:28:05 2016 +0200 drm/panel: Constify device node argument to of_drm_find_panel() The argument is never modified by the function, make it const. Signed-off-by: Laurent Pinchart Signed-off-by: Thierry Reding drivers/gpu/drm/drm_panel.c | 2 +- include/drm/drm_panel.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 5ec71dd7f1b63da20fefebabf1e66cb530b9eb4d Author: Johannes Berg Date: Wed Jan 4 08:24:49 2017 +0100 cfg80211: sysfs: use wiphy_name() Instead of open-coding dev_name(), use the wiphy_name() inline to make the code easier to understand. While at it, clean up some coding style. Signed-off-by: Johannes Berg net/wireless/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1365e547c6bb6b6b137bc40a189675503baa037b Author: Alexander Alemayhu Date: Tue Jan 3 17:13:20 2017 +0100 xfrm: trivial typos o s/descentant/descendant o s/workarbound/workaround Signed-off-by: Alexander Alemayhu Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 2 +- net/xfrm/xfrm_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2f96c035fbd143695eec5b465c98bcc52732626e Author: Matthew Wilcox Date: Wed Dec 21 09:47:06 2016 -0800 thermal: convert devfreq_cooling to use an IDA thermal devfreq cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: Matthew Wilcox Signed-off-by: Zhang Rui drivers/thermal/devfreq_cooling.c | 53 +++++++-------------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) commit ae606089621ef0349402cfcbeca33a82abbd0fd0 Author: Matthew Wilcox Date: Wed Dec 21 09:47:05 2016 -0800 thermal: convert cpu_cooling to use an IDA thermal cpu cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. The cooling_cpufreq_lock was being used to protect cpufreq_dev_count as well as the IDR. Rather than keep the mutex to protect a single integer, I expanded the scope of cooling_list_lock to also cover cpufreq_dev_count. We could also convert cpufreq_dev_count into an atomic. Signed-off-by: Matthew Wilcox Signed-off-by: Zhang Rui drivers/thermal/cpu_cooling.c | 63 ++++++++----------------------------------- 1 file changed, 11 insertions(+), 52 deletions(-) commit 7a6639dca61bf14e3aad8fd31d1f16ed0acf0a60 Author: Matthew Wilcox Date: Wed Dec 21 09:47:04 2016 -0800 thermal: convert clock cooling to use an IDA thermal clock cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: Matthew Wilcox Signed-off-by: Zhang Rui drivers/thermal/clock_cooling.c | 50 +++++++---------------------------------- 1 file changed, 8 insertions(+), 42 deletions(-) commit b31ef8285b19ec5563274c574fcfe7a5993125ce Author: Matthew Wilcox Date: Wed Dec 21 09:47:03 2016 -0800 thermal core: convert ID allocation to IDA The thermal core does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: Matthew Wilcox Signed-off-by: Zhang Rui drivers/thermal/thermal_core.c | 75 +++++++++++++++--------------------------- include/linux/thermal.h | 4 +-- 2 files changed, 28 insertions(+), 51 deletions(-) commit 4fdf18242408cc0b32b3a1a06510376bf609fa60 Author: Dinh Nguyen Date: Wed Dec 14 04:25:54 2016 -0600 ARM: socfpga_defconfig: update defconfig for SoCFPGA MARVELL_PHY - support for the Marvell PHY that is on most of the devkits EEPROM_AT24 - support for I2C EEPROMs on the devkits GPIO_ALTERA - support for Altera's GPIO driver NAND - support for the Denali NAND controller along with MTD subsystem SPI_DESIGNWARE - support for SPI that is on SoCFPGA SPI_DW_MMIO - support for the memory-mapped io interface for the DW SPI core OF_CONFIGFS - SoCFPGA makes use of DT overlays using configfs, enable it GPIO_ALTERA_A10SR - support for the newly added Altera HWMON driver LEDS - support for the GPIO LEDs on the SoCFPGA devkits RTC - support for the DS1307 RTC JFFS2_FS - support for the JFFS2 filesystem NFS_V4 - supports for v4 NFS FUNCTION_TRACER - supports debug function tracing Signed-off-by: Dinh Nguyen arch/arm/configs/socfpga_defconfig | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit ec2507d2a3060a970fa314556891828cfd60093e Author: Yotam Gigi Date: Tue Jan 3 19:20:24 2017 +0200 net/sched: cls_matchall: Fix error path Fix several error paths in matchall: - Release reference to actions in case the hardware fails offloading (relevant to skip_sw only) - Fix error path in case tcf_exts initialization/validation fail Fixes: bf3994d2ed31 ("net/sched: introduce Match-all classifier") Signed-off-by: Yotam Gigi Signed-off-by: David S. Miller net/sched/cls_matchall.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 9ea28a369198463714a06a124f7ce494c466e8bc Author: Robert Nelson Date: Tue Dec 27 11:58:37 2016 -0600 ARM: dts: Add am335x-bonegreen-wireless SeeedStudio BeagleBone Green Wireless (BBGW) is an expansion of the SeeedStudio Green (BBG) with the Ethernet replaced by a TI wl1835 wireless module. This board can be indentified by the GW1x value after A335BNLT (BBB) in the at24 eeprom: GW1x [aa 55 33 ee 41 33 33 35 42 4e 4c 54 47 57 31 41 |.U3.A335BNLTGW1A|] http://beagleboard.org/green-wireless http://wiki.seeed.cc/BeagleBone_Green_Wireless/ firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware wl18xx mac address: Stored in at24 eeprom at address 5-16: hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom | cut -b 5-16 Signed-off-by: Robert Nelson CC: Tony Lindgren CC: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-bonegreen-wireless.dts | 126 ++++++++++++++++++++++++ 2 files changed, 127 insertions(+) commit a0c2b618914005b2367e23c9f522c2fac12cef60 Author: Robert Nelson Date: Tue Dec 27 11:58:36 2016 -0600 ARM: dts: Move most of am335x-bonegreen.dts to am335x-bonegreen-common.dtsi This is going to be shared with the SeeedStudio BeagleBone Green Wireless Signed-off-by: Robert Nelson CC: Tony Lindgren CC: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-bonegreen-common.dtsi | 44 ++++++++++++++++++++++++++ arch/arm/boot/dts/am335x-bonegreen.dts | 38 +--------------------- 2 files changed, 45 insertions(+), 37 deletions(-) commit 096fe8726e5df2975ed29e1ecd881fa54c80878b Author: Jon Mason Date: Mon Dec 5 18:12:22 2016 -0500 arm64: dts: NS2: add support for XMC form factor The BCM958712DxXMC board is a smaller form factor typically used as controller boards for switches. This smaller board has less devices pinned out, so only a few need be populated in the device tree. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/Makefile | 2 +- arch/arm64/boot/dts/broadcom/ns2-xmc.dts | 191 +++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+), 1 deletion(-) commit 0cc878d678444392ca2a31350f89f489593ef5bb Author: Jon Mason Date: Mon Dec 5 18:12:21 2016 -0500 arm64: dts: NS2: reserve memory for Nitro firmware Nitro firmware is loaded into memory by the bootloader at a specific location. Set this memory range aside to prevent the kernel from using it. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 2f5cb59c079f0e1f5af00bb4c9fe40f9053ad121 Author: Jon Mason Date: Mon Nov 28 14:31:31 2016 -0500 arm64: dts: NS2: enable PAXC on NS2 SVK This enables the PAXC based PCIe root complex on NS2 SVK. The PAXC based root complex is connected to internally emulated PCIe endpoints Signed-off-by: Ray Jui Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2-svk.dts | 4 ++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) commit 177232d22de5c179aab552052e72a811ed83afe8 Author: Jon Mason Date: Mon Nov 28 14:31:30 2016 -0500 arm64: dts: NS2: enable GICv2m for PAXB/PAXC interfaces PAXB and PAXC PCIe interfaces on NS2 have been using the iProc event queue to handle MSI. With the gicv2m support ready, we should now switch to gicv2m for MSI handling Signed-off-by: Ray Jui Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 104 ++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 24 deletions(-) commit 6f63db82d6df51f6990e972b2240c3c99c3e1fb1 Merge: a88eb6b 07eea57 Author: David S. Miller Date: Tue Jan 3 16:23:01 2017 -0500 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2017-01-03 This series contains updates to ixgbe and ixgbevf only. Emil fixes ixgbe to use the NVM settings for FEC, so do not override the settings. Fixed the indirection table for x550, where newer devices can support up to 64 RSS queues. Extends the rtnl_lock() to protect the call to netif_device_detach() and ixgbe_clear_interrupt_scheme() to avoid against a double free WARN and/or a BUG in free_msi_irqs(). Fixed AER error handling by making sure that the driver frees the IRQs in ixgbe_io_error_detected() when responding to a PCIe AER error, and to restore them when the interface recovers. Tony updates the driver to report the driver version to the firmware using the host interface command for x550 devices. Fixed the PHY reset check for x550em_ext_t PHY type. Fixed bounds checking for x540 devices to ensure the index is valid for the LED function. Fixed the BaseT adapters which support 100Mb capability and were not reporting the capability. Ken Cox adds a missing check for the trusted bit before trying to set the MACVLAN MAC address. Yusuke Suzuki fixes an issue with 82599 and x540 devices where receive timestamps were not working becase the bitwise operation for RX_HWSTAMP falg was incorrect. Don ensures that x553 KR/KX devices correctly advertise link speeds. Adds the mailbox message to allow for VF promiscuous mode support. Mark fixes two issues with EEPROM access, where the semaphore was not being held until the entire response was read and the acquiring/releasing of the semaphore is slow. Cleaned up firmware version method and functions which are no longer used. Added new interfaces for firmware commands to access some new PHYs. v2: fixed tab indentation in patch 12 and mis-spelled words in patch 15 based on feedback from Sergei Shtylyov and Rami Rosen. ==================== Signed-off-by: David S. Miller commit 07eea570acccbc0f9402357d652868571fdbb2b9 Author: Don Skidmore Date: Thu Dec 15 21:18:32 2016 -0500 ixgbe: Add PF support for VF promiscuous mode This patch extends the xcast mailbox message to include support for unicast promiscuous mode. To allow a VF to enter this mode the PF must be in promiscuous mode. A later patch will add the support needed in the VF driver (ixgbevf) Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 47 ++++++++++++++++++++++---- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++ 4 files changed, 45 insertions(+), 6 deletions(-) commit 41e544cdad0bd669600825d8de73c8f420640bf9 Author: Don Skidmore Date: Thu Dec 15 21:18:31 2016 -0500 ixgbevf: Add support for VF promiscuous mode This patch extends the mailbox message to allow for VF promiscuous mode support. Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 1 + drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 15 +++++++++++++- drivers/net/ethernet/intel/ixgbevf/mbx.h | 1 + drivers/net/ethernet/intel/ixgbevf/vf.c | 24 +++++++++++++++++++---- 4 files changed, 36 insertions(+), 5 deletions(-) commit b3eb4e1860f3595431f74064870c36da295a9fbe Author: Mark Rustad Date: Wed Dec 14 11:02:16 2016 -0800 ixgbe: Implement support for firmware-controlled PHYs Implement support for devices that have firmware-controlled PHYs. Signed-off-by: Mark Rustad Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 + drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 9 + drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 153 ++++++++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 64 ++++ drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 3 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 7 + drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 408 ++++++++++++++++++++++- 7 files changed, 642 insertions(+), 6 deletions(-) commit 12c78ef0982201463f87494bedf289c094b24853 Author: Mark Rustad Date: Wed Dec 14 11:02:11 2016 -0800 ixgbe: Implement firmware interface to access some PHYs Implement new interface for firmware commands to access some PHYs. Signed-off-by: Mark Rustad Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 66 +++++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 45 +++++++++++++++++ 3 files changed, 113 insertions(+) commit d2a10ae72ed61759638ec06927bc9850c278d310 Author: Mark Rustad Date: Wed Dec 14 11:02:06 2016 -0800 ixgbe: Remove unused firmware version functions and method The firmware version method and functions are not used anywhere, so remove them all. Signed-off-by: Mark Rustad Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 34 -------------------------- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 4 --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 - drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 1 - drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +-- 7 files changed, 1 insertion(+), 46 deletions(-) commit 3efa9ed260ce838976eb9177bae7249caf7a2aa1 Author: Mark Rustad Date: Wed Dec 14 11:02:00 2016 -0800 ixgbe: Fix issues with EEPROM access There are two problems with EEPROM access. One is that it needs to hold the semaphore until the entire response is read or else the response can be corrupted by other firmware accesses. The second problem is that acquiring and releasing the semaphore is slow, so it should be taken and released once when multiple EEPROM accesses will be done. Both of these issues can be solved by adding a new function, ixgbe_hic_unlocked, to issue firmware commands that will assume that the caller has acquired the needed semaphore. Signed-off-by: Mark Rustad Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 97 ++++++++++++++++--------- drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 75 +++++++------------ 3 files changed, 91 insertions(+), 82 deletions(-) commit 54f6d4c42451dbd2cc7e0f0bd8fc3eddcab511fe Author: Don Skidmore Date: Tue Dec 13 20:34:51 2016 -0500 ixgbe: Configure advertised speeds correctly for KR/KX backplane This patch ensures that the advertised link speeds are configured for X553 KR/KX backplane. Without this patch the link remains at 1G when resuming from low power after being downshifted by LPLU. Signed-off-by: Don Skidmore Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 26403b7fde65ecfc74f5571e3cfa602dc9b3d6cb Author: Emil Tantilov Date: Wed Nov 23 11:24:08 2016 -0800 ixgbevf: restore hw_addr on resume or error Restore adapter->hw.hw_addr after handling an error, or a resume operation to make sure we can access the registers. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +++ 1 file changed, 3 insertions(+) commit aeb4c73100be8aade8a1189b50bd226b709ca8bb Author: Yusuke Suzuki Date: Mon Nov 21 06:48:45 2016 +0000 ixgbe: Fix incorrect bitwise operations of PTP Rx timestamp flags Rx timestamp does not work on 82599 and X540 because bitwise operation of RX_HWTSTAMP flags is incorrect and ixgbe_ptp_rx_hwtstamp() is never called. This patch fixes it to enable Rx timestamp on 82599 and X540. Without this fix: ptp4l[278.730]: selected /dev/ptp8 as PTP clock ptp4l[278.733]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[278.733]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[278.834]: port 1: received SYNC without timestamp ptp4l[278.835]: port 1: new foreign master 1c3947.fffe.60f9cc-1 ptp4l[279.834]: port 1: received SYNC without timestamp ptp4l[280.834]: port 1: received SYNC without timestamp ptp4l[281.834]: port 1: received SYNC without timestamp ptp4l[282.834]: port 1: received SYNC without timestamp ptp4l[282.835]: selected best master clock 1c3947.fffe.60f9cc ptp4l[282.835]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[283.834]: port 1: received SYNC without timestamp With this fix: ptp4l[239.154]: selected /dev/ptp8 as PTP clock ptp4l[239.157]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[239.157]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[240.989]: port 1: new foreign master 1c3947.fffe.60f9cc-1 ptp4l[244.989]: selected best master clock 1c3947.fffe.60f9cc ptp4l[244.989]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[246.977]: master offset -899583339542096 s0 freq +0 path delay 16222 ptp4l[247.977]: master offset -899583339617265 s1 freq -75169 path delay 16177 ptp4l[248.977]: master offset -130 s2 freq -75299 path delay 16177 ptp4l[248.977]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[249.977]: master offset -9 s2 freq -75217 path delay 16177 ptp4l[250.977]: master offset 88 s2 freq -75123 path delay 16132 Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices") Signed-off-by: Yusuke Suzuki Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b19cf6eea9e2a497e6475fd02c0703f0b3a6d083 Author: Emil Tantilov Date: Wed Nov 16 11:25:34 2016 -0800 ixgbevf: fix AER error handling Make sure that we free the IRQs in ixgbevf_io_error_detected() when responding to an PCIe AER error and also restore them when the interface recovers from it. Previously it was possible to trigger BUG_ON() check in free_msix_irqs() in the case where we call ixgbevf_remove() after a failed recovery from AER error because the interrupts were not freed. Also moved the down and free functions into ixgbevf_close_suspend() same as with ixgbe. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 43 +++++++++++++---------- 1 file changed, 25 insertions(+), 18 deletions(-) commit 126db13fa0e6d05c9f94e0125f61e773bd5ab079 Author: Emil Tantilov Date: Wed Nov 16 09:48:02 2016 -0800 ixgbe: fix AER error handling Make sure that we free the IRQs in ixgbe_io_error_detected() when responding to an PCIe AER error and also restore them when the interface recovers from it. Previously it was possible to trigger BUG_ON() check in free_msix_irqs() in the case where we call ixgbe_remove() after a failed recovery from AER error because the interrupts were not freed. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a9d2d53a788a9c5bc8a7d1b4ea7857b68e221357 Author: Ken Cox Date: Tue Nov 15 13:00:37 2016 -0600 ixgbe: test for trust in macvlan adjustments for VF There are two methods for setting mac addresses in a Macvlan, that differentiate themselves in the function macvlan_set_mac_Address. If the macvlan mode is passthru, then we use the dev_set_mac_address method, otherwise we use the dev_uc api via macvlan_sync_addresses. The latter method (which would stem from using any non-passthru mode, like bridge, or vepa), calls down into the driver in a path that terminates in ixgbevf_set_uc_addr_vf, which sends a IXGBE_VF_SET_MACVLAN message, which causes the pf to spawn the noted error message. This occurs because it appears that the guest is trying to delete the mac address of the macvlan before adding another. The other path in macvlan_set_mac_address uses dev_set_mac_address, which calls into ixgbevf_set_mac which uses the IXGBE_VF_SET_MAC_ADDR to the pf to set the macvlan mac address. The discrepancy here is in the handlers. The handler function for IXGBE_VF_SET_MAC_ADDR (ixgbe_set_vf_mac_addr) has a check for the vfinfo[].trusted bit to allow the operation if the vf is trusted. In comparison, the IXGBE_VF_SET_MACVLAN message handler (ixgbe_set_vf_macvlan_msg) has no such check of the trusted bit. Signed-off-by: Ken Cox Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2dad7b2775ea030c898fe4946971edd25af237d1 Author: Emil Tantilov Date: Fri Nov 11 10:12:51 2016 -0800 ixgbevf: handle race between close and suspend on shutdown When an interface is part of a namespace it is possible that ixgbevf_close() may be called while ixgbevf_suspend() is running which ends up in a double free WARN and/or a BUG in free_msi_irqs() To handle this situation we extend the rtnl_lock() to protect the call to netif_device_detach() and check for !netif_device_present() to avoid entering close while in suspend. Also added rtnl locks to ixgbevf_queue_reset_subtask(). CC: Alexander Duyck Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f7f37e7ff2b9b7eff7fbd035569cab35896869a3 Author: Emil Tantilov Date: Fri Nov 11 10:07:47 2016 -0800 ixgbe: handle close/suspend race with netif_device_detach/present When an interface is part of a namespace it is possible that ixgbe_close() may be called while __ixgbe_shutdown() is running which ends up in a double free WARN and/or a BUG in free_msi_irqs(). To handle this situation we extend the rtnl_lock() to protect the call to netif_device_detach() and ixgbe_clear_interrupt_scheme() in __ixgbe_shutdown() and check for netif_device_present() to avoid clearing the interrupts second time in ixgbe_close(); Also extend the rtnl lock in ixgbe_resume() to netif_device_attach(). Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit f215266470dfe86196a31fe0725a86cea77f9a18 Author: Tony Nguyen Date: Thu Nov 10 16:00:33 2016 -0800 ixgbe: Fix reporting of 100Mb capability BaseT adapters that are capable of supporting 100Mb are not reporting this capability. This patch corrects the reporting so that 100Mb is shown as supported on those adapters. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f0d646b720d541309b11e190db58086f446f41e Author: Tony Nguyen Date: Thu Nov 10 09:57:29 2016 -0800 ixgbe: Reduce I2C retry count on X550 devices A retry count of 10 is likely to run into problems on X550 devices that have to detect and reset unresponsive CS4227 devices. So, reduce the I2C retry count to 3 for X550 and above. This should avoid any possible regressions in existing devices. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 910c9c0f59567ec204924d88ca04337bb04f17d9 Author: Tony Nguyen Date: Wed Nov 9 10:48:48 2016 -0800 ixgbe: Add bounds check for x540 LED functions This is an extension of commit 003287e0f087 ("ixgbevf: Correct parameter sent to LED function"); add bounds checking to x540 functions to ensure the index is valid. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2bf1a87b903bd81b1448a1cef73de59fb6c4d340 Author: Emil Tantilov Date: Fri Nov 4 14:03:03 2016 -0700 ixgbe: add mask for 64 RSS queues The indirection table was reported incorrectly for X550 and newer where we can support up to 64 RSS queues. Reported-by Krishneil Singh Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5c092749e304d8b49567be633d5be31393538e3b Author: Tony Nguyen Date: Mon Oct 31 12:11:58 2016 -0700 ixgbe: Fix check for ixgbe_phy_x550em_ext_t reset The generic PHY reset check we had previously is not sufficient for the ixgbe_phy_x550em_ext_t PHY type. Check 1.CC02.0 instead - same as ixgbe_init_ext_t_x550(). Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit cb8e051446ae554aae38163d3421edc793221784 Author: Tony Nguyen Date: Wed Oct 26 16:25:18 2016 -0700 ixgbe: Report driver version to firmware for x550 devices Some x550 devices require the driver version reported to its firmware; this patch sends the driver version string to the firmware through the host interface command for x550 devices. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 7 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 3 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 14 +++++- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 58 ++++++++++++++++++++++++- 5 files changed, 80 insertions(+), 7 deletions(-) commit 1fe954b2097bb907b4578e6a74e4c1d23785a601 Author: Emil Tantilov Date: Wed Sep 28 16:01:48 2016 -0700 ixgbe: do not disable FEC from the driver FEC is configured by the NVM and the driver should not be overriding it. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 -- 1 file changed, 2 deletions(-) commit 5390974f981907cd02d1cb48145b03471279877a Author: Rodrigo Vivi Date: Tue Jan 3 11:27:52 2017 -0800 drm/i915: Update SKL SRV GT4 pci ids reference. No functional changes. Apparently spec has been changed the valid table showing 0x192A as Server GT4 while 0x193A is Server GT4e. Libdrm and Mesa already have this right. So let's fix the ref here. Cc: Ben Widawsky Signed-off-by: Rodrigo Vivi Reviewed-by: Ben Widawsky Link: http://patchwork.freedesktop.org/patch/msgid/1483471672-10450-1-git-send-email-rodrigo.vivi@intel.com include/drm/i915_pciids.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87eb832ae9748fab00588b98c2e33e89de065438 Author: Mika Westerberg Date: Mon Nov 28 15:06:26 2016 +0300 mfd: lpc_ich: Add support for Intel Apollo Lake SoC Intel Apollo Lake SoC exposes serial SPI flash through the LPC device. The SPI flash host controller is not discoverable through PCI config cycles because P2SB (function 0 of the device 13) is hidden by the BIOS. We unhide the device briefly in order to read BAR 0 of the SPI host controller. Signed-off-by: Mika Westerberg Acked-by: Lee Jones Acked-by: Marek Vasut Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit ff00d7a32a1b88b772981a13fc198e0d29300666 Author: Mika Westerberg Date: Mon Nov 28 15:06:25 2016 +0300 mfd: lpc_ich: Add support for SPI serial flash host controller Many Intel CPUs including Haswell, Broadwell and Baytrail have SPI serial flash host controller as part of the LPC device. This will populate an MFD cell suitable for the SPI host controller driver if we know that the LPC device has one. Signed-off-by: Mika Westerberg Acked-by: Lee Jones Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 92 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/lpc_ich.h | 3 ++ 2 files changed, 95 insertions(+) commit 8afda8b26d01ee26a60ef2f0284a7f01a5ed96f8 Author: Mika Westerberg Date: Mon Nov 28 15:06:24 2016 +0300 spi-nor: Add support for Intel SPI serial flash controller Add support for the SPI serial flash host controller found on many Intel CPUs including Baytrail and Braswell. The SPI serial flash controller is used to access BIOS and other platform specific information. By default the driver exposes a single read-only MTD device but with a module parameter "writeable=1" the MTD device can be made read-write which makes it possible to upgrade BIOS directly from Linux. Signed-off-by: Mika Westerberg Acked-by: Cyrille Pitchen Signed-off-by: Lee Jones Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/platform_data/intel-spi.h | 31 ++ 7 files changed, 999 insertions(+) commit 7b73305160f11b633e9801b2c6b83d5b0cb867cc Author: Jean Delvare Date: Fri Dec 16 18:45:21 2016 +0100 module: Drop redundant declaration of struct module Struct module is already declared at the beginning of the file, no need to declare it again. Signed-off-by: Jean Delvare Fixes: 93c2e105f6bc ("module: Optimize __module_address() using a latched RB-tree") Cc: Peter Zijlstra (Intel) Cc: Jessica Yu Cc: Rusty Russell Signed-off-by: Jessica Yu include/linux/module.h | 2 -- 1 file changed, 2 deletions(-) commit a88eb6becfa86fd0a05daed27957f5fcfff9f0e0 Merge: aa276dd 365ad35 Author: David S. Miller Date: Tue Jan 3 11:13:06 2017 -0500 Merge branch 'tipc-link-starvation' Jon Maloy says: ==================== tipc: improve interaction socket-link We fix a very real starvation problem that may occur when a link encounters send buffer congestion. At the same time we make the interaction between the socket and link layer simpler and more consistent. ==================== Signed-off-by: David S. Miller commit 365ad353c2564bba8835290061308ba825166b3a Author: Jon Paul Maloy Date: Tue Jan 3 10:55:11 2017 -0500 tipc: reduce risk of user starvation during link congestion The socket code currently handles link congestion by either blocking and trying to send again when the congestion has abated, or just returning to the user with -EAGAIN and let him re-try later. This mechanism is prone to starvation, because the wakeup algorithm is non-atomic. During the time the link issues a wakeup signal, until the socket wakes up and re-attempts sending, other senders may have come in between and occupied the free buffer space in the link. This in turn may lead to a socket having to make many send attempts before it is successful. In extremely loaded systems we have observed latency times of several seconds before a low-priority socket is able to send out a message. In this commit, we simplify this mechanism and reduce the risk of the described scenario happening. When a message is attempted sent via a congested link, we now let it be added to the link's backlog queue anyway, thus permitting an oversubscription of one message per source socket. We still create a wakeup item and return an error code, hence instructing the sender to block or stop sending. Only when enough space has been freed up in the link's backlog queue do we issue a wakeup event that allows the sender to continue with the next message, if any. The fact that a socket now can consider a message sent even when the link returns a congestion code means that the sending socket code can be simplified. Also, since this is a good opportunity to get rid of the obsolete 'mtu change' condition in the three socket send functions, we now choose to refactor those functions completely. Signed-off-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 6 +- net/tipc/link.c | 75 +++++------- net/tipc/msg.h | 2 - net/tipc/node.c | 15 +-- net/tipc/socket.c | 347 ++++++++++++++++++++++++------------------------------ 5 files changed, 194 insertions(+), 251 deletions(-) commit 4d8642d896c53966d32d5e343c3620813dd0e7c8 Author: Jon Paul Maloy Date: Tue Jan 3 10:55:10 2017 -0500 tipc: modify struct tipc_plist to be more versatile During multicast reception we currently use a simple linked list with push/pop semantics to store port numbers. We now see a need for a more generic list for storing values of type u32. We therefore make some modifications to this list, while replacing the prefix 'tipc_plist_' with 'u32_'. We also add a couple of new functions which will come to use in the next commits. Acked-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 100 ++++++++++++++++++++++++++++++++++++-------------- net/tipc/name_table.h | 21 ++++------- net/tipc/socket.c | 8 ++-- 3 files changed, 83 insertions(+), 46 deletions(-) commit 8c44e1af16b2983b3df93117cd0ca40638998ce3 Author: Jon Paul Maloy Date: Tue Jan 3 10:55:09 2017 -0500 tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() functions The functions tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() are very similar. The latter function is also called from two locations, and there will be more in the coming commits, which will all need to test on different conditions. Instead of making yet another duplicates of the function, we now introduce a new macro tipc_wait_for_cond() where the wakeup condition can be stated as an argument to the call. This macro replaces all current and future uses of the two functions, which can now be eliminated. Acked-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 108 +++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 59 deletions(-) commit 6b8b810f2c9a11e65bcd7674b1593cda503a7a6b Author: Luca Ceresoli Date: Fri Dec 30 00:01:06 2016 +0100 staging: rtl8188eu: remove unused members from struct recv_priv Since commit da25a8ec6b2d ("staging: rtl8188eu: remove unused debugging functions") is_signal_dbg is never set to true, so the code under if (adapter->recvpriv.is_signal_dbg) is dead. Remove the variable and the dead code. The signal_strength_dbg was referenced only in the code that is being removed, so remove it as well. Also fix coding style issues in the touched lines. Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Ivan Safonov Cc: devel@driverdev.osuosl.org Signed-off-by: Luca Ceresoli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 75 +++++++++++++++------------- drivers/staging/rtl8188eu/include/rtw_recv.h | 2 - 2 files changed, 39 insertions(+), 38 deletions(-) commit 24f0b6fe52d21b5c59c4e948daae2234a39a25b2 Author: Alexandre Belloni Date: Tue Dec 27 22:36:42 2016 +0100 ARM: dts: mvebu: Correct license text The license text has been mangled at some point then copy pasted across multiple files. Restore it to what it should be. Note that this is not intended as a license change. Acked-by: Florian Fainelli Acked-by: Stefan Roese Acked-by: Uwe Kleine-König Acked-by: Rafał Miłecki Acked-by: Sebastian Hesselbarth Signed-off-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-db.dts | 10 +++++----- arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 10 +++++----- arch/arm/boot/dts/armada-370-mirabox.dts | 10 +++++----- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 10 +++++----- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 10 +++++----- arch/arm/boot/dts/armada-370-rd.dts | 10 +++++----- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 10 +++++----- arch/arm/boot/dts/armada-370-xp.dtsi | 10 +++++----- arch/arm/boot/dts/armada-370.dtsi | 10 +++++----- arch/arm/boot/dts/armada-375-db.dts | 10 +++++----- arch/arm/boot/dts/armada-375.dtsi | 10 +++++----- arch/arm/boot/dts/armada-380.dtsi | 10 +++++----- arch/arm/boot/dts/armada-385.dtsi | 10 +++++----- arch/arm/boot/dts/armada-388-clearfog.dts | 10 +++++----- arch/arm/boot/dts/armada-388-db.dts | 10 +++++----- arch/arm/boot/dts/armada-388-rd.dts | 10 +++++----- arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 10 +++++----- arch/arm/boot/dts/armada-38x.dtsi | 10 +++++----- arch/arm/boot/dts/armada-390-db.dts | 10 +++++----- arch/arm/boot/dts/armada-390.dtsi | 10 +++++----- arch/arm/boot/dts/armada-395.dtsi | 10 +++++----- arch/arm/boot/dts/armada-398-db.dts | 10 +++++----- arch/arm/boot/dts/armada-398.dtsi | 10 +++++----- arch/arm/boot/dts/armada-39x.dtsi | 10 +++++----- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-db.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-gp.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-matrix.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 10 +++++----- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 10 +++++----- arch/arm/boot/dts/armada-xp-mv78460.dtsi | 10 +++++----- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 10 +++++----- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 10 +++++----- arch/arm/boot/dts/armada-xp.dtsi | 10 +++++----- arch/arm/boot/dts/dove-cm-a510.dtsi | 10 +++++----- arch/arm/boot/dts/dove-sbc-a510.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-6282.dtsi | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-duo-6281.dtsi | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-lsqvl.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-lsvl.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-lswsxl.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-lswvl.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation-lswxl.dts | 10 +++++----- arch/arm/boot/dts/kirkwood-linkstation.dtsi | 10 +++++----- arch/arm/boot/dts/mvebu-linkstation-fan.dtsi | 10 +++++----- arch/arm/boot/dts/mvebu-linkstation-gpio-simple.dtsi | 10 +++++----- arch/arm/boot/dts/orion5x-kuroboxpro.dts | 10 +++++----- arch/arm/boot/dts/orion5x-linkstation-lsgl.dts | 10 +++++----- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 10 +++++----- arch/arm/boot/dts/orion5x-linkstation.dtsi | 10 +++++----- arch/arm/boot/dts/orion5x-lschl.dts | 10 +++++----- arch/arm/boot/dts/orion5x-lswsgl.dts | 10 +++++----- 54 files changed, 270 insertions(+), 270 deletions(-) commit aa276dd7b3fcc04b4a9c056a496d69271b7da8da Merge: e7072f6 fe878ca Author: David S. Miller Date: Tue Jan 3 11:00:28 2017 -0500 Merge branch 'TPACKET_V3-TX_RING-support' Sowmini Varadhan says: ==================== TPACKET_V3 TX_RING support This patch series allows an application to use a single PF_PACKET descriptor and leverage the best implementations of TX_RING and RX_RING that exist today. Patch 1 adds the kernel/Documentation changes for TX_RING support and patch2 adds the associated test case in selftests. Changes since v2: additional sanity checks for setsockopt input for TX_RING/TPACKET_V3. Refactored psock_tpacket.c test code to avoid code duplication from V2. ==================== Signed-off-by: David S. Miller commit fe878cad38d389cf5dbcce501951b2269d6d02bf Author: Sowmini Varadhan Date: Tue Jan 3 06:31:48 2017 -0800 tools: test case for TPACKET_V3/TX_RING support Add a test case and sample code for (TPACKET_V3, PACKET_TX_RING) Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller tools/testing/selftests/net/psock_tpacket.c | 91 +++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 17 deletions(-) commit 7f953ab2ba46e8649537942c0a64668ca2ce5cc5 Author: Sowmini Varadhan Date: Tue Jan 3 06:31:47 2017 -0800 af_packet: TX_RING support for TPACKET_V3 Although TPACKET_V3 Rx has some benefits over TPACKET_V2 Rx, *_v3 does not currently have TX_RING support. As a result an application that wants the best perf for Tx and Rx (e.g. to handle request/response transacations) ends up needing 2 sockets, one with *_v2 for Tx and another with *_v3 for Rx. This patch enables TPACKET_V2 compatible Tx features in TPACKET_V3 so that an application can use a single descriptor to get the benefits of _v3 RX_RING and _v2 TX_RING. An application may do a block-send by first filling up multiple frames in the Tx ring and then triggering a transmit. This patch only support fixed size Tx frames for TPACKET_V3, and requires that tp_next_offset must be zero. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller Documentation/networking/packet_mmap.txt | 9 ++++++-- net/packet/af_packet.c | 39 ++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 11 deletions(-) commit e7072f6669860c4918ced4acf6a7e482023bd40f Author: Edward Cree Date: Tue Jan 3 15:46:15 2017 +0000 sfc-falcon: declare module version (same as ethtool drvinfo version) Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon/efx.c | 1 + 1 file changed, 1 insertion(+) commit 14077e9ed3cf0dd1b11cf021ac7b153b68e5ac3f Author: Edward Cree Date: Tue Jan 3 15:46:00 2017 +0000 sfc: declare module version (same as ethtool drvinfo version) Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 1 + 1 file changed, 1 insertion(+) commit 9fe7b29c6cc1e4adbc2b3d6b8452ff5278ee4fba Author: Luca Ceresoli Date: Fri Dec 30 00:01:04 2016 +0100 staging: rtl8188eu: remove unused field bRxRSSIDisplay in struct adapter Since commit da25a8ec6b2d ("staging: rtl8188eu: remove unused debugging functions") this field is never set set to any nonzero value, so it is actually always zero. It is also used only once, as a boolean inside an if(). This means the code under that if() is dead code, so remove it as well. Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Ivan Safonov Cc: devel@driverdev.osuosl.org Signed-off-by: Luca Ceresoli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 --- drivers/staging/rtl8188eu/include/drv_types.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 -- 3 files changed, 6 deletions(-) commit 7d2af82cc5f571341fc835eca3f958ec559bbef8 Author: Yamanappagouda Patil Date: Thu Dec 22 22:32:13 2016 +0530 staging: rtl8188eu: In core directory, fixed 'missing a balnk line after declarations' warnings. Fixed checkpatch.pl warnings in rtl8188eu/core directory. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 ++++ drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 5 ++++- drivers/staging/rtl8188eu/core/rtw_led.c | 1 + drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +++ drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 10 +++++++++- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 1 + drivers/staging/rtl8188eu/core/rtw_recv.c | 9 ++++++++- drivers/staging/rtl8188eu/core/rtw_security.c | 18 ++++++++++++++++++ drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 1 + drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 3 +++ drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +++ 11 files changed, 55 insertions(+), 3 deletions(-) commit 37ad17a4b48ca727e7fe7916e3821948efb8f0c6 Author: Yamanappagouda Patil Date: Thu Dec 22 22:19:12 2016 +0530 staging: rtl8188eu: Fixed 'Missing a blank line after declarations' warnings. Fixed checkpatch.pl 'Missing a blank line after declarations' in rtl8188eu module. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 7 ++++++- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 2 +- drivers/staging/rtl8188eu/os_dep/rtw_android.c | 1 + drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) commit ce02320224f79bb456bf260764658b2af73a9741 Author: Jannik Becher Date: Tue Dec 20 18:59:50 2016 +0100 staging: rtl8712: used a better macro Fixed a sparse warning. Using be16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16b8852fa3210644d87c474083572bbaa92e8f31 Author: Jannik Becher Date: Tue Dec 20 18:59:49 2016 +0100 staging: rtl8712: changed u16 to __be16 Fixed sparse warning. Just changed u16 to __be16 and typecasts. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 56384ad6d0e6296cd9572c4936c62479f5b7997b Author: Jannik Becher Date: Tue Dec 20 18:59:48 2016 +0100 staging: rtl8712: changed cast to __le16 Fixed sparse warning. Changed u16 to __le16 Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 78a9bc730401e5416fefdf168c9f54dd63635c94 Author: Jannik Becher Date: Tue Dec 20 18:59:47 2016 +0100 staging: rtl8712: changed u32 to __le32 Fixed sparse warnings. Deleted cpu_to_le32() for enum. I'm not sure why it was there. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_event.h | 2 +- drivers/staging/rtl8712/rtl871x_mlme.c | 15 +++++++-------- drivers/staging/rtl8712/wlan_bssdef.h | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) commit 502c80744fcac6b16f28699469c70db499fe2f69 Author: Jannik Becher Date: Tue Dec 20 18:59:46 2016 +0100 staging: rtl8712: fixed little endian problem Fixed a sparse warning. Using function le16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6839bc81478f2d7936615e4ba3d0bf599a85b720 Author: Jannik Becher Date: Tue Dec 20 18:59:45 2016 +0100 staging: rtl8712: changed uint to __le32 Fixed a sparse warning. Just changed uint to __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_ops_linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b596f548347210ef70c3de75666c74293a968d1e Author: Jannik Becher Date: Tue Dec 20 18:59:44 2016 +0100 staging: rtl8712: changed u32 to __le32 Fixed sparse warning. Just changed u32 to __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_ops.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit aa2e04bcdd4ada9f7a209c964e5e4a41d67ce8f8 Author: Jannik Becher Date: Tue Dec 20 18:59:43 2016 +0100 staging: rtl8712: changed typecast to __le Fixed sparse warning. Changed uint to __le16 and __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/hal_init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3d7164c3790adfb34472c42e6290748b03e1d1d0 Author: Jannik Becher Date: Tue Dec 20 18:59:42 2016 +0100 staging: rtl8712: changed GetFrameSubType macro Fixed a sparse warning. GetFrameSubType and GetFrameType should cast to __le16. Furthermore GetFramSubType should use le16_to_cpu instead of cpu_to_le16. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_security.c | 4 ++-- drivers/staging/rtl8712/wifi.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit dd9161483f420c2ead89f8514956b7717d4ea504 Author: Jannik Becher Date: Tue Dec 20 18:59:41 2016 +0100 staging: rtl8712: casted variables to __le32 Fixed a sparse warning. Casting __le32 variables to the right type. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_security.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bcb91a5cfe57cf1f20db212cfbe1add98885c36e Author: Jannik Becher Date: Tue Dec 20 18:59:40 2016 +0100 staging: rtl8712: changed function argument to __le32 Fixed a sparse warning "cast to restricted __le32". Function argument is of type __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- drivers/staging/rtl8712/rtl8712_event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e8cd841beecde542e6a1aad91bcbfa07281a6d10 Author: Jannik Becher Date: Tue Dec 20 18:59:39 2016 +0100 staging: rtl8712: changed variables to __le32 Fixed sparse warning "cast to restricted __le32". Changed struct tx_desc members to __le32 and pcmdbuf to __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmd.c | 5 +++-- drivers/staging/rtl8712/rtl8712_xmit.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 8c3af8f0debea81d87505a03c7ef0b479d8599fd Author: Jannik Becher Date: Tue Dec 20 18:59:38 2016 +0100 staging: rtl8712: changed struct members to __le32 Fixed sparse warning "cast to restricted __le32". struct sitesurvey_parm uses little endian members. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1f8bb58ec522150d2ac816e809279ca5d21ed93b Author: Rahul Krishnan Date: Fri Dec 23 15:29:46 2016 +0530 staging: xgifb: This patch removes the unnecessary return statement using spatch This patch removes unnecessary return statement using spatch tool Signed-off-by: Rahul Krishnan Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fc800c590985ca16d6d4673c0723cbb870bd9a74 Author: Colin Ian King Date: Thu Dec 29 15:42:27 2016 +0000 staging: r8188eu: fix spelling mistake on xmitframe_coalsece trivial fix to spelling mistake of function name in debuf message, should be xmitframe_coalesce instead of xmitframe_coalsece. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94500d5667386119c27725fe314f6882f68580a9 Author: Mike Kofron Date: Thu Dec 29 16:35:48 2016 -0500 staging: wilc1000: Fix endian sparse warning drivers/staging/wilc1000/linux_wlan.c:995:18: warning: restricted __be16 degrades to integer Signed-off-by: Mike Kofron Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dad03cdb0c229c9767c1e95f99fcd874dddc02b Author: Tobias Heineken Date: Wed Dec 21 15:35:34 2016 +0100 Staging: vt6656: checkpatch: fix identifier name in wcmd.h This is a patch to the wcmd.h file that fixes up two identifier name warnings found by the checkpatch.pl tool at lines 54 and 56 Signed-off-by: Tobias Heineken Signed-off-by: Florian Schleicher CC: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/wcmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e588e3afb5780005605c7f4e3dc4ca61c8dbaec Author: Jannik Becher Date: Sun Dec 18 07:53:45 2016 +0100 staging: rtl8712: changed struct members to __le32 Fixed sparse warning "cast to restricted __le32". struct recv_stat and struct phy_stat have always little endian members. Signed-off-by: Jannik Becher Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 209ec69ab3cd81f1577c5af39f7b07a168cd28bc Author: Ralf Baechle Date: Mon Dec 26 19:57:52 2016 +0100 MIPS: zboot: Consolidate compiler flag filtering. Al Viro noticed that we were using two different methods to filter out flags from KBUILD_CFLAGS. Signed-off-by: Ralf Baechle Reported-by: Al Viro arch/mips/boot/compressed/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08d90c81b714482dceb5323d14f6617bcf55ee61 Author: Colin Ian King Date: Thu Dec 22 23:52:58 2016 +0000 MIPS: ralink: Fix incorrect assignment on ralink_soc ralink_soc sould be assigned to RT3883_SOC, replace incorrect comparision with assignment. Signed-off-by: Colin Ian King Fixes: 418d29c87061 ("MIPS: ralink: Unify SoC id handling") Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14903/ Signed-off-by: Ralf Baechle arch/mips/ralink/rt3883.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48ed33c1b3737eb1324c1ae023a8eeccad60cef9 Author: Paul Burton Date: Fri Aug 19 18:13:36 2016 +0100 MIPS: sc-mips: L2 cache is inclusive of L1 dcache for CM3 In systems with CM3 & higher, the L2 cache is inclusive of the L1 dcache. Indicate this such that cpu_has_inclusive_pcaches evaluates true and we avoid some unnecessary cache ops during DMA cache maintenance. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14018/ Signed-off-by: Ralf Baechle arch/mips/mm/sc-mips.c | 1 + 1 file changed, 1 insertion(+) commit d66f99bc46925831236cf2335fcc6087d34e2195 Author: Paul Burton Date: Fri Aug 19 18:13:35 2016 +0100 MIPS: c-r4k: Treat physically indexed dcaches as not aliasing Physically indexed caches cannot suffer from virtual aliasing, so clear the MIPS_CACHE_ALIASES bit in order to ensure we don't do extra work avoiding aliasing that cannot happen. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14017/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 4 ++++ 1 file changed, 4 insertions(+) commit 819da1ead13621edd4f05df730651cf5b623de7e Author: Paul Burton Date: Fri Aug 19 18:13:34 2016 +0100 MIPS: c-r4k: Treat I6400 dcache as though physically indexed The L1 data cache in I6400 CPUs is indexed by physical address bits if an entry for the address is present in the DTLB early enough in the pipelined execution of a memory access instruction. If an entry is not present then it's indexed by virtual address bits, but hardware will check in a later pipeline stage when a DTLB entry has been created whether the virtual address bits used match the physical address bits, and if not will transparently restart the memory access instruction. This means that although it isn't always physically indexed, it appears so to software & we can treat the I6400 L1 data cache as being physically indexed in order to avoid considering aliasing. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14016/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d0a99d6afd80d375fcfea26467eb5b219b9f9d4 Author: Kelvin Cheung Date: Fri Aug 12 18:56:03 2016 +0800 MIPS: Loongson1B: Change the OSC clock name This patch changes the OSC clock name to "osc_clk" as expected by all clock users. Signed-off-by: Kelvin Cheung Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13903/ Signed-off-by: Ralf Baechle arch/mips/loongson32/common/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8b3b0c94ac282628f0668d1366239a3fa72dc9d Author: Paul Burton Date: Fri Sep 2 15:18:21 2016 +0100 MIPS: Netlogic: Fix assembler warning from smpboot.S The netlogic platform can be built for either MIPS32 or MIPS64, and when built for MIPS32 (as by nlm_xlr_defconfig) the use of the dla pseudo-instruction leads to warnings such as the following from recent versions of the GNU assembler: arch/mips/netlogic/common/smpboot.S: Assembler messages: arch/mips/netlogic/common/smpboot.S:62: Warning: dla used to load 32-bit register; recommend using la instead arch/mips/netlogic/common/smpboot.S:63: Warning: dla used to load 32-bit register; recommend using la instead Avoid these warnings by using the PTR_LA macro to make use of the appropriate la or dla pseudo-instruction for the build. Signed-off-by: Paul Burton Fixes: 66d29985fab8 ("MIPS: Netlogic: Merge some of XLR/XLP wakup code") Cc: James Hogan Cc: Jayachandran C Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14185/ Signed-off-by: Ralf Baechle arch/mips/netlogic/common/smpboot.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f44374f14c388d1170404d2206d4ff760d018212 Author: Paul Burton Date: Mon Nov 7 11:14:16 2016 +0000 MIPS: Export {copy, clear}_page functions alongside their definitions Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocations for the copy_page & clear_page functions to be alongside their definitions. With this change there are no longer any symbols exported from mips_ksyms.c so remove the file. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14515/ Signed-off-by: Ralf Baechle arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/mips_ksyms.c | 24 ------------------------ arch/mips/mm/page-funcs.S | 3 +++ arch/mips/mm/page.c | 2 ++ 4 files changed, 6 insertions(+), 25 deletions(-) commit 62730c957164007b2b6e9d0d4a0b7c6b742815e5 Author: Emmanuil Chatzipetru Date: Thu Dec 22 16:22:03 2016 +0100 staging: greybus: svc_watchdog: replace printk() with pr_err() Fix coding style issue caught by checkpatch.pl related to the following warning: - "WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ." Signed-off-by: Emmanuil Chatzipetru Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28cf203524de9fef49b39f2a922d5206b206b665 Author: Emmanuil Chatzipetru Date: Thu Dec 22 16:22:02 2016 +0100 staging: greybus: svc_watchdog: Fix spaces on a single definition statement Fix coding style issue caught by checkpatch.pl related to the following warning: - "CHECK: spaces preferred around that '*' (ctx:VxV) " Signed-off-by: Emmanuil Chatzipetru Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6da8086375c316c8bddc6c6fdfe62dee513e6ee1 Author: Jérémy Lefaure Date: Fri Dec 16 19:33:02 2016 -0500 staging: greybus: arche-apb-ctrl: fix unused warnings on resume/suspend When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use arche_apb_ctrl_resume and arche_apb_ctrl_suspend functions: drivers/staging/greybus/arche-apb-ctrl.c:478:12: warning: ‘arche_apb_ctrl_resume’ defined but not used [-Wunused-function] static int arche_apb_ctrl_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging/greybus/arche-apb-ctrl.c:464:12: warning: ‘arche_apb_ctrl_suspend’ defined but not used [-Wunused-function] static int arche_apb_ctrl_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ Adding __maybe_unused to the declaration of these functions removes the warnings. Signed-off-by: Jérémy Lefaure Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f05a88a39c5b5f226e08e626998bb920723b7d85 Author: Jason Hrycay Date: Tue Dec 20 14:49:27 2016 -0600 staging: greybus: add host device function pointer checks Add sanity checks for cport_quiesce and cport_clear before invoking the callbacks as these function pointers are not required during the host device registration. This follows the logic implemented elsewhere for various other function pointers. Signed-off-by: Jason Hrycay Reviewed-by: Bryan O'Donoghue Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a072a72da96f8fedda3312686456c18c34ca179a Author: Bryan O'Donoghue Date: Thu Dec 22 00:37:28 2016 +0000 staging: greybus: loopback: use gb_loopback_async_wait_all don't spin Currently the greybus-loopback thread logic spins around waiting for send_count == iteration_max which on real hardware doesn't make a difference to us but in simulation is excruciatingly slow, anti-social and bad manners. Use the existing gb_loopback_async_wait_all() function to gate continuing when the send_count == iteration_max and go to sleep until there's something worthwhile to-do. Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit af1550cce0b55a9c6fa37a84301bd893bdf6997e Author: Afonso Bordado Date: Tue Dec 20 13:55:08 2016 +0000 staging: emxx_udc: Fix CamelCase variable name Changes from CamelCase to a kernel format Signed-off-by: Afonso Bordado Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e026bfabbe479245aba4892863853ef44f8e981 Author: Afonso Bordado Date: Tue Dec 20 13:55:07 2016 +0000 staging: emxx_udc: Remove unecessary temporary variable This improves code readability. Signed-off-by: Afonso Bordado Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 86e2ba1c4527b708cae31fd9062a8d4bf4b964a6 Author: Afonso Bordado Date: Tue Dec 20 13:55:06 2016 +0000 staging: emxx_udc: Rename CamelCase variable The new name complies with the kernel styling guidelines and is more descriptive. Signed-off-by: Afonso Bordado Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 34e89dd1861660d9cc6cfa63ddd54b0b7bc03b72 Author: Afonso Bordado Date: Tue Dec 20 13:55:05 2016 +0000 staging: emxx_udc: Fix CamelCase function name Change EP0_out_PIO to use the kernel convention. Signed-off-by: Afonso Bordado Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f3445067d5f78fb8d1970b02610f85c2f377ea4 Author: Arnd Bergmann Date: Fri Dec 16 10:09:39 2016 +0100 staging: emxx_udc: remove incorrect __init annotations The probe function is not marked __init, but some other functions are. This leads to a warning on older compilers (e.g. gcc-4.3), and can cause executing freed memory when built with those compilers: WARNING: drivers/staging/emxx_udc/emxx_udc.o(.text+0x2d78): Section mismatch in reference from the function nbu2ss_drv_probe() to the function .init.text:nbu2ss_drv_contest_init() This removes the annotations. Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 299d2f0238ec75bd13cc8c69a4cd6dbb9e7837be Author: Thomas Petazzoni Date: Thu Dec 22 16:24:18 2016 +0100 arm64: defconfig: enable XORv2 for Marvell Armada 7K/8K This commit enables the XORv2 DMA driver, which is used on the ARM64 Marvell Armada 7K and 8K platforms. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 576a2f0c5c6d64648d2ba68a4edbbe61863e12e2 Author: Paul Burton Date: Mon Nov 7 11:14:15 2016 +0000 MIPS: Export memcpy & memset functions alongside their definitions Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocations for the memcpy & memset functions & variants thereof to be alongside their definitions. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14514/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/octeon-memcpy.S | 5 +++++ arch/mips/kernel/mips_ksyms.c | 24 ------------------------ arch/mips/lib/memcpy.S | 9 +++++++++ arch/mips/lib/memset.S | 5 +++++ 4 files changed, 19 insertions(+), 24 deletions(-) commit d6cb671589757ec3d20e5e0886505cdad327b1b3 Author: Paul Burton Date: Mon Nov 7 11:14:14 2016 +0000 MIPS: Export string functions alongside their definitions Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocations for the strlen*, strnlen* & strncpy* functions to be alongside their definitions. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14513/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips_ksyms.c | 24 ------------------------ arch/mips/lib/strlen_user.S | 2 ++ arch/mips/lib/strncpy_user.S | 5 +++++ arch/mips/lib/strnlen_user.S | 3 +++ 4 files changed, 10 insertions(+), 24 deletions(-) commit 231300423a5486cbd9e102d741190428b2783ab2 Author: Paul Burton Date: Mon Nov 7 11:14:13 2016 +0000 MIPS: Export csum functions alongside their definitions Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocations for the csum_partial_* functions to be alongside their definitions. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14512/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips_ksyms.c | 8 -------- arch/mips/lib/csum_partial.S | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) commit aa4089e6ce54b5a7aaf5a0e8afb442395cca8503 Author: Paul Burton Date: Mon Nov 7 11:14:12 2016 +0000 MIPS: Export invalid_pte_table alongside its definition It's unclear to me why this wasn't always the case, but move the EXPORT_SYMBOL invocation for invalid_pte_table to be alongside its definition. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14511/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips_ksyms.c | 2 -- arch/mips/mm/init.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 827456e71036681039e2c89f58e29f950ef3eb05 Author: Paul Burton Date: Mon Nov 7 11:48:04 2016 +0000 MIPS: Export _mcount alongside its definition Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocation for _mcount to be alongside its definition. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14525/ Signed-off-by: Ralf Baechle arch/mips/kernel/mcount.S | 3 +++ arch/mips/kernel/mips_ksyms.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) commit 29830c124d834c4ce0133aaf8ca85f045f9e758c Author: Paul Burton Date: Mon Nov 7 11:14:10 2016 +0000 MIPS: Export _save_fp & _save_msa alongside their definitions Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocations for _save_fp & _save_msa to be alongside their definitions. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14509/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips_ksyms.c | 8 -------- arch/mips/kernel/r2300_switch.S | 2 ++ arch/mips/kernel/r4k_switch.S | 3 +++ 3 files changed, 5 insertions(+), 8 deletions(-) commit 08889582b8aa0bbc01a1e5a0033b9f98d2e11caa Author: Paul Burton Date: Mon Nov 7 11:14:09 2016 +0000 MIPS: End asm function prologue macros with .insn When building a kernel targeting a microMIPS ISA, recent GNU linkers will fail the link if they cannot determine that the target of a branch or jump is microMIPS code, with errors such as the following: mips-img-linux-gnu-ld: arch/mips/built-in.o: .text+0x542c: Unsupported jump between ISA modes; consider recompiling with interlinking enabled. mips-img-linux-gnu-ld: final link failed: Bad value or: ./arch/mips/include/asm/uaccess.h:1017: warning: JALX to a non-word-aligned address Placing anything other than an instruction at the start of a function written in assembly appears to trigger such errors. In order to prepare for allowing us to follow function prologue macros with an EXPORT_SYMBOL invocation, end the prologue macros (LEAD, NESTED & FEXPORT) with a .insn directive. This ensures that the start of the function is marked as code, which always makes sense for functions & safely prevents us from hitting the link errors described above. Signed-off-by: Paul Burton Reviewed-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14508/ Signed-off-by: Ralf Baechle arch/mips/include/asm/asm.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2c0e57eaef3c2b233e42faf4e9db18ee8fd37734 Author: Paul Burton Date: Mon Nov 7 11:14:08 2016 +0000 MIPS: tlbex: Clear ISA bit when writing to handle_tlb{l,m,s} When generating TLB exception handling code we write to memory reserved at the handle_tlbl, handle_tlbm & handle_tlbs symbols. Up until now the ISA bit has always been clear simply because the assembly code reserving the space for those functions places no instructions in them. In preparation for marking all LEAF functions as containing code, explicitly clear the ISA bit when calculating the addresses at which to write TLB exception handling code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14507/ Signed-off-by: Ralf Baechle arch/mips/mm/tlbex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 858e2b2310cac0dff1df8eea7d16b6ad7ef2c2b5 Author: Paul Burton Date: Mon Nov 7 11:14:07 2016 +0000 MIPS: Use generic asm/export.h Include export.h in the list of generic headers used by the MIPS architecture for use by later patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14506/ Signed-off-by: Ralf Baechle arch/mips/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit de96ec2a77c6d06a423c2c495bb4a2f4299f3d9e Author: Paul Burton Date: Fri Sep 23 16:38:27 2016 +0100 OF: Prevent unaligned access in of_alias_scan() When allocating a struct alias_prop, of_alias_scan() only requested that it be aligned on a 4 byte boundary. The struct contains pointers which leads to us attempting 64 bit writes on 64 bit systems, and if the CPU doesn't support unaligned memory accesses then this causes problems - for example on some MIPS64r2 CPUs including the "mips64r2-generic" QEMU emulated CPU it will trigger an address error exception. Fix this by requesting alignment for the struct alias_prop allocation matching that which the compiler expects, using the __alignof__ keyword. Signed-off-by: Paul Burton Acked-by: Rob Herring Reviewed-by: Grant Likely Cc: Frank Rowand Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14306/ Signed-off-by: Ralf Baechle drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c01918068ecc673dcea265e71ad95f949f28e2d Author: Ralf Baechle Date: Wed Dec 21 03:32:50 2016 +0100 MIPS: IRQ: Remove useless i8259_of_init() prototype. Signed-off-by: Ralf Baechle arch/mips/include/asm/i8259.h | 1 - 1 file changed, 1 deletion(-) commit cd854fc6f18f0c231f11f2c42167a07e3b265c72 Author: Marcin Nowakowski Date: Tue Dec 13 10:48:30 2016 +0100 MIPS: uprobes: Remove __weak attribute from arch_uprobe_copy_ixol. Arch-specific implementation of arch_uprobe_copy_ixol is expected to override the weak implementation in generic code. As currently both implementations are marked as weak, it is up to the linker to chose one. Remove the __weak attribute from MIPS code to make sure the correct version is used. Fixes: 40e084a506eb ("MIPS: Add uprobes support.") Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14660/ Signed-off-by: Ralf Baechle arch/mips/kernel/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c48568b3692f1a56cbf1935e4eea835e6b185b1 Author: John Crispin Date: Tue Dec 20 19:12:46 2016 +0100 MIPS: ralink: Cosmetic change to prom_init(). Over the years the code has been changed various times leading to argc/argv being defined in a different function to where we actually use the variables. Clean this up by moving them to prom_init_cmdline(). Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14902/ Signed-off-by: Ralf Baechle arch/mips/ralink/prom.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 07724712bf22aec5fe44e5d399f115755f436721 Author: John Crispin Date: Tue Dec 20 19:12:45 2016 +0100 MIPS: ralink: Add missing symbol for highmem support. MT7621 has highmem. this was previously not working as the required symbol was not selected in the Kconfig file. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14901/ Signed-off-by: Ralf Baechle arch/mips/ralink/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 80e6321abc859955331c78c93e442e72b942c5c1 Author: John Crispin Date: Tue Dec 20 19:12:44 2016 +0100 MIPS: ralink: Add missing clk_round_rate(). As we dont use the common clock api yet we need to add this stub to allow building drivers that use the API. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14900/ Signed-off-by: Ralf Baechle arch/mips/ralink/clk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 58181a117d353427127a2e7afc7cf1ab44759828 Author: John Crispin Date: Tue Dec 20 19:12:43 2016 +0100 MIPS: ralink: Fix a typo in the pinmux setup. There is a typo inside the pinmux setup code. The function is really called utif and not util. This was recently discovered when people were trying to make the UTIF interface work. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14899/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 16eccef68f21b729d18573a36eef41053a5f35bd Author: John Crispin Date: Tue Dec 20 19:12:42 2016 +0100 MIPS: ralink: Add missing pinmux. The mt7620 has a pin that can be used to generate an external reference clock. The pinmux setup was missing the definition of said pin. This patch adds it. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14898/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ralink/mt7620.h | 7 ++++++- arch/mips/ralink/mt7620.c | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit 2517caf19dbfac3b39f2db5500c5fd03c4370e81 Author: John Crispin Date: Tue Dec 20 19:12:41 2016 +0100 MIPS: ralink: Add missing I2C and I2S clocks. This patch adds two additional clocks required by the audio interface of the SoCs. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14897/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 5 +++++ arch/mips/ralink/rt288x.c | 1 + arch/mips/ralink/rt305x.c | 2 ++ arch/mips/ralink/rt3883.c | 2 ++ 4 files changed, 10 insertions(+) commit 4f79ddec04229c966326d90cc3cfd414401dea22 Author: John Crispin Date: Tue Dec 20 19:12:40 2016 +0100 MIPS: ralink: MT7621 does not set its SoC type. The code does not set the SoC type properly. This went unnoticed until now as the SoC does not share any of the driver code with the other SoCs, until we made the mmc driver work. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14896/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef462f3b64e9fb0c8e1cd5d60f5bd7f13ac2156d Author: Justin Chen Date: Wed Dec 7 17:16:26 2016 -0800 MIPS: Add cacheinfo support Add cacheinfo support for MIPS architectures. Use information from the cpuinfo_mips struct to populate the cacheinfo struct. This allows an architecture agnostic approach, however this also means if cache information is not properly populated within the cpuinfo_mips struct, there is nothing we can do. (I.E. c-r3k.c) Signed-off-by: Justin Chen Cc: f.fainelli@gmail.com Cc: linux-mips@linux-mips.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/14650/ Signed-off-by: Ralf Baechle arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/cacheinfo.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) commit 0014dea6b71ae3e0384c3358f632b4728c3d432e Author: Marcin Nowakowski Date: Wed Nov 23 14:43:52 2016 +0100 MIPS: generic/kexec: add support for a DTB passed in a separate buffer Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14615/ Signed-off-by: Ralf Baechle arch/mips/generic/Makefile | 1 + arch/mips/generic/kexec.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 856b0f591e951a234d6642cc466023df182eb51c Author: Marcin Nowakowski Date: Wed Nov 23 14:43:51 2016 +0100 MIPS: kexec: add debug info about the new kexec'ed image Print details of the new kexec image loaded. Based on the original code from commit 221f2c770e10d ("arm64/kexec: Add pr_debug output") Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14614/ Signed-off-by: Ralf Baechle arch/mips/kernel/machine_kexec.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a8f108d70c74d83574c157648383eb2e4285a190 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:50 2016 +0100 MIPS: kexec: Do not reserve invalid crashkernel memory on boot Do not reserve memory for the crashkernel if the commandline argument points to a wrong location. This can happen if the location is specified wrong or if the same commandline is reused when starting the crashkernel - in the latter case the reserved memory would point to the location from which the crashkernel is executing. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14612/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 5 +++++ 1 file changed, 5 insertions(+) commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:49 2016 +0100 MIPS: fix mem=X@Y commandline processing When a memory offset is specified through the commandline, add the memory in range PHYS_OFFSET:Y as reserved memory area. Otherwise the bootmem allocator is initialised with low page equal to min_low_pfn = PHYS_OFFSET, and in free_all_bootmem will process pages starting from min_low_pfn instead of PFN(Y). Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14613/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c9fff362261d68cc35053a76afea85f1277ac66 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:48 2016 +0100 MIPS: relocate: Optionally relocate the DTB If the DTB is located in the target memory area for the relocated kernel it needs to be relocated as well before kernel relocation takes place. After copying the DTB use the new plat_fdt_relocated() API from the relocated kernel to ensure the relocated kernel updates any information that it may have cached about the location of the DTB. plat_fdt_relocated is declared as a weak symbol so that platforms that do not require it do not need to implement the method. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14616/ Signed-off-by: Ralf Baechle arch/mips/kernel/relocate.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 0063fdede69b2cc6f861aab0641f7e25f451def9 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:47 2016 +0100 MIPS: platform: Allow for DTB to be moved during kernel relocation Add plat_fdt_relocated(void*) API to allow the kernel relocation code to update platform's information about the DTB location if the DTB had to be moved due to being placed in a location used by the relocated kernel. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14611/ Signed-off-by: Ralf Baechle arch/mips/generic/init.c | 13 +++++++++++++ arch/mips/include/asm/bootinfo.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) commit 73346081cac18732a959be580a90abc707dea52a Author: Marcin Nowakowski Date: Wed Nov 23 14:43:46 2016 +0100 MIPS: Use early_init_fdt_reserve_self to protect DTB location early_init_fdt_reserve_self is used to tell the boot memory allocator that a memory is occupied by the DTB, so add it in the MIPS init code to ensure information about the DTB is added to the boot memory array. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14610/ Signed-off-by: Ralf Baechle arch/mips/kernel/prom.c | 7 +++++++ arch/mips/kernel/setup.c | 4 ++++ 2 files changed, 11 insertions(+) commit d9b5b658210f28ed9f70c757d553e679d76e2986 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:45 2016 +0100 MIPS: init: Ensure bootmem does not corrupt reserved memory Current init code initialises bootmem allocator with all of the low memory that it assumes is available, but does not check for reserved memory block, which can lead to corruption of data that may be stored there. Move bootmem's allocation map to a location that does not cross any reserved regions Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14609/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) commit e89ef66d7682f031f026eee6bba03c8c2248d2a9 Author: Marcin Nowakowski Date: Wed Nov 23 14:43:44 2016 +0100 MIPS: init: Ensure reserved memory regions are not added to bootmem Memories managed through boot_mem_map are generally expected to define non-crossing areas. However, if part of a larger memory block is marked as reserved, it would still be added to bootmem allocator as an available block and could end up being overwritten by the allocator. Prevent this by explicitly marking the memory as reserved it if exists in the range used by bootmem allocator. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14608/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 269aa43aad0f96673478fe2446abe54d7ad42e8f Author: Marcin Nowakowski Date: Wed Nov 23 14:43:43 2016 +0100 MIPS: Do not request resources for crashkernel if one isn't defined When KEXEC is enabled but crashkernel details are not passed through the kernel commandline unnecessary resources are requested (start==end==0) Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14607/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit 39a3cb27c123df8e8461291cc9e86f1ac3f0ea06 Author: Marcin Nowakowski Date: Mon Nov 21 11:23:39 2016 +0100 MIPS: elfcore: add correct copy_regs implementations MIPS does not currently define ELF_CORE_COPY_REGS macros and as a result the generic implementation is used. The generic version attempts to do directly map (struct pt_regs) into (elf_gregset_t), which isn't correct for MIPS platforms and also triggers a BUG() at runtime in include/linux/elfcore.h:16 (BUG_ON(sizeof(*elfregs) != sizeof(*regs))) [ralf@linux-mips.org: Add semicolons to the macro definitions as I do not apply https://patchwork.linux-mips.org/patch/14588/ for now.] Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14586/ Signed-off-by: Ralf Baechle arch/mips/include/asm/elf.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 08c941bf6ec523d666a78f86e3d696ed45dfb6e5 Author: Marcin Nowakowski Date: Mon Nov 21 11:23:38 2016 +0100 MIPS: Move register dump routines out of ptrace code Current register dump methods for MIPS are implemented inside ptrace methods, but there will be other uses in the kernel for them, so keep them separately in process.c and use those definitions for ptrace instead. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14587/ Signed-off-by: Ralf Baechle arch/mips/include/asm/elf.h | 3 +++ arch/mips/kernel/process.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ arch/mips/kernel/ptrace.c | 34 ++-------------------------------- 3 files changed, 49 insertions(+), 32 deletions(-) commit bff323d5653cf0ad83391b5a5f4ec7cc32acad1a Author: Marcin Nowakowski Date: Fri Dec 2 09:58:29 2016 +0100 MIPS: Kconfig: Fix indentation for kexec-related entries Kconfig entries are not aligned properly, so remove incorrect whitespace. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14631/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c83c2eed67e578576acf08611bfb630bd199714b Author: Marcin Nowakowski Date: Fri Dec 2 09:58:28 2016 +0100 MIPS: kexec: remove SMP_DUMP SMP_DUMP has been added as a new IPI signal when kexec support was added for Cavium Octeon CPUs ('commit 7aa1c8f47e7e ("MIPS: kdump: Add support")'. However, the new signal doesn't appear to ever have a proper handler added (octeon_message_functions[] array has an empty handler for it), and generic IPI handlers now trigger a BUG() on unhandled signal. As the method is unused remove it completely and replace its only invocation with a smp_call_function(). [ralf@linux-mips.org: Renumber SMP_ASK_C0COUNT to avoid numbering gaps.] Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14630/ Signed-off-by: Ralf Baechle arch/mips/include/asm/smp.h | 8 +------- arch/mips/kernel/crash.c | 2 +- arch/mips/kernel/smp.c | 17 ----------------- 3 files changed, 2 insertions(+), 25 deletions(-) commit 109c32ffd89d64dd99a775f2f50443bee38b63e9 Author: Matt Redfearn Date: Thu Nov 24 17:32:45 2016 +0000 MIPS: Add support for ARCH_MMAP_RND_{COMPAT_}BITS arch_mmap_rnd() uses hard-coded limits of 16MB for the randomisation of mmap within 32bit processes and 256MB in 64bit processes. Since v4.4 other arches support tuning this value in /proc/sys/vm/mmap_rnd_bits. Add support for this to MIPS. Set the minimum(default) number of bits randomisation for 32bit to 8 - which with 4k pagesize is unchanged from the current 16MB total randomness. The minimum(default) for 64bit is 12bits, again with 4k pagesize this is the same as the current 256MB. This patch is necessary for MIPS32 to pass the Android CTS tests, with the number of random bits set to 15. Signed-off-by: Matt Redfearn Reviewed-by: Kees Cook Cc: Paul Gortmaker Cc: Daniel Cashman Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14617/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 16 ++++++++++++++++ arch/mips/mm/mmap.c | 10 +++++----- 2 files changed, 21 insertions(+), 5 deletions(-) commit d9ae4f18c0d2a4781c1338e6ca0f21a1e96cdb03 Author: Hauke Mehrtens Date: Wed Nov 30 23:58:08 2016 +0100 MIPS: Lantiq: Activate more drivers in default configuration This activates the following functionalities: * SMP support (used on xRX200) * PCI support * NAND driver * PHY driver * UART * Watchdog * USB 2.0 controller These driver are driving different IP cores found on the supported SoCs. Signed-off-by: Hauke Mehrtens Acked-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14628/ Signed-off-by: Ralf Baechle arch/mips/configs/xway_defconfig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 16190b3639375baa887cfb2c35d3f4edb17902bc Author: Hauke Mehrtens Date: Wed Nov 30 23:58:07 2016 +0100 MIPS: lantiq: Refresh default configuration Just generate a configuration based on this default configuration and store it again. This removed some old configuration options. Signed-off-by: Hauke Mehrtens Acked-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14629/ Signed-off-by: Ralf Baechle arch/mips/configs/xway_defconfig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 3ec754410cb3e931a6c4920b1a150f21a94a2bf4 Author: Tobias Wolf Date: Wed Nov 23 10:40:07 2016 +0100 of: Add check to of_scan_flat_dt() before accessing initial_boot_params An empty __dtb_start to __dtb_end section might result in initial_boot_params being null for arch/mips/ralink. This showed that the boot process hangs indefinitely in of_scan_flat_dt(). Signed-off-by: Tobias Wolf Cc: Sergei Shtylyov Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14605/ Signed-off-by: Ralf Baechle drivers/of/fdt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 02564fc89d3d92a8d4fa6e11c348000b70e9568d Author: Tobias Wolf Date: Tue Dec 13 11:46:41 2016 +0100 ralink: Introduce fw_passed_dtb to arch/mips/ralink This patch adds fw_passed_dtb to arch/mips/ralink to support CONFIG_MIPS_RAW_APPENDED_DTB. Furthermore it adds a check that __dtb_start is not the same address as __dtb_end. Signed-off-by: Tobias Wolf Acked-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14662/ Signed-off-by: Ralf Baechle arch/mips/ralink/of.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 5e73ad3ffcebc72bce9a662d3e59f0cc9fb3f4ef Author: Yang Ling Date: Sun Dec 4 23:05:40 2016 +0800 MIPS: Loongson1: Add watchdog support for Loongson1 board The patch adds watchdog support for Loongson1 board. Signed-off-by: Yang Ling Cc: keguang.zhang@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14644/ Signed-off-by: Ralf Baechle arch/mips/configs/loongson1b_defconfig | 4 ++++ arch/mips/configs/loongson1c_defconfig | 4 ++++ arch/mips/include/asm/mach-loongson32/platform.h | 9 +++++---- arch/mips/loongson32/common/platform.c | 16 ++++++++++++++++ arch/mips/loongson32/ls1b/board.c | 7 ++++--- arch/mips/loongson32/ls1c/board.c | 7 ++++--- 6 files changed, 37 insertions(+), 10 deletions(-) commit e31e4505b2c944c4e4c30e5ed983966537c4632f Author: Yang Ling Date: Sun Dec 4 22:57:03 2016 +0800 MIPS: Loongson1: Remove several redundant RTC-related macros Move the RTC-related macros to regs-rtc.h. Signed-off-by: Yang Ling Cc: keguang.zhang@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14642/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-loongson32/loongson1.h | 7 +++--- arch/mips/include/asm/mach-loongson32/regs-rtc.h | 23 +++++++++++++++++++ arch/mips/loongson32/common/platform.c | 27 +++++++++-------------- 3 files changed, 38 insertions(+), 19 deletions(-) commit 3ae34beb5ec9b04769708daf40cd5fff85cc537f Author: Paul Burton Date: Mon Oct 17 15:34:38 2016 +0100 MIPS: Remove RESTORE_ALL_AND_RET The RESTORE_ALL_AND_RET macro is never used. Remove the dead code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14411/ Signed-off-by: Ralf Baechle arch/mips/include/asm/stackframe.h | 8 -------- 1 file changed, 8 deletions(-) commit 9eaa9a82e5d6be2234482c3468ed56143c713729 Author: Paul Burton Date: Mon Oct 17 15:34:37 2016 +0100 MIPS: Allow pre-r6 emulation on SMP MIPSr6 kernels There's no reason for the pre-r6 instruction emulation code to be limited to uniprocessor kernels. We already emulate atomic memory access instructions in a way that works for SMP systems, and nothing else should be affected. Remove the artificial limitation, allowing pre-r6 instruction emulation to be used with SMP kernels. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14410/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b4b82399c4557666d348bed1aefc21c999e79a1 Author: Paul Burton Date: Mon Oct 17 15:34:36 2016 +0100 MIPS: Cleanup LLBit handling in switch_to Commit 7c151d3d5d7a ("MIPS: Make use of the ERETNC instruction on MIPS R6") began clearing LLBit during context switches, but did so on all systems where it is writable for unclear reasons & did so from a macro with "software_ll_bit" in its name, which is intended to operate on the ll_bit variable used by ll/sc emulation for old CPUs. We do now need to clear LLBit on MIPSr6 systems where we'll use eretnc to return to userland, but we don't need to do so on MIPSr5 systems with a writable LLBit. Move the clear to its own appropriately named macro, do it only for MIPSr6 systems & comment about why. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14409/ Signed-off-by: Ralf Baechle arch/mips/include/asm/switch_to.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit e11124d8ffcdf893d64e0b29624fd88e0ae4ceac Author: Paul Burton Date: Mon Oct 17 15:34:35 2016 +0100 MIPS: Remove r2_emul_return from struct thread_info The r2_emul_return field in struct thread_info was used in order to take an alternate codepath when returning to userland, which (besides not implementing certain features) effectively used the eretnc instruction in place of eret. The difference is that eretnc doesn't clear LLBit, and therefore doesn't cause a linked load & store sequence to fail due to emulation like eret would. The reason eret would usually be used to clear LLBit is so that after context switching we ensure that a load performed by one task doesn't influence another task. However commit 7c151d3d5d7a ("MIPS: Make use of the ERETNC instruction on MIPS R6") which introduced the r2_emul_return field and conditional use of eretnc also for some reason began explicitly clearing LLBit during context switches - despite retaining the use of eret for everything but returns from the pre-r6 instruction emulation code. As LLBit is cleared upon context switches anyway, simplify this by using eretnc unconditionally for MIPSr6 kernels. This allows us to remove the 4 byte r2_emul_return boolean from struct thread_info, simplify the return to user code in entry.S and avoid the overhead of tracking & checking state which we don't need. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14408/ Signed-off-by: Ralf Baechle arch/mips/include/asm/stackframe.h | 4 ++++ arch/mips/include/asm/thread_info.h | 1 - arch/mips/kernel/asm-offsets.c | 1 - arch/mips/kernel/entry.S | 18 ------------------ arch/mips/kernel/traps.c | 2 -- 5 files changed, 4 insertions(+), 22 deletions(-) commit daa10170da271ed82b34c39a5f10f993569eec79 Author: Rahul Bedarkar Date: Fri Oct 14 11:25:55 2016 +0530 MIPS: DTS: img: add device tree for Marduk board Add support for Imagination Technologies' Marduk board which is based on Pistachio SoC. It is also known as Creator Ci40. Marduk is legacy name and will be there for decades. Documentation for this board can be found on https://docs.creatordev.io/ci40/ This patch adds initial support for board with following peripherals: * PWM based heartbeat LED * GPIO based buttons * SPI NOR flash on SPI1 * UART0 and UART1 * SD card * Ethernet * USB * PWM * ADC * I2C Signed-off-by: Rahul Bedarkar Acked-by: Rob Herring Acked-by: James Hartley Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14394/ Signed-off-by: Ralf Baechle .../bindings/mips/img/pistachio-marduk.txt | 10 ++ MAINTAINERS | 6 + arch/mips/boot/dts/img/Makefile | 9 ++ arch/mips/boot/dts/img/pistachio_marduk.dts | 163 +++++++++++++++++++++ 4 files changed, 188 insertions(+) commit d774a5896e7dd2add2e352ab328ec8d41f7cb68b Author: Rahul Bedarkar Date: Fri Oct 14 11:25:54 2016 +0530 MIPS: DTS: Add base device tree for Pistachio SoC Add support for the base Device Tree for Imagination Technologies' Pistachio SoC. This commit supports the following peripherals: * Clocks * Pinctrl and GPIO * UART * SPI * I2C * PWM * ADC * Watchdog * Ethernet * MMC * DMA engine * Crypto * I2S * SPDIF * Internal DAC * Timer * USB * IR * Interrupt Controller Signed-off-by: Rahul Bedarkar Acked-by: James Hartley Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14393/ Signed-off-by: Ralf Baechle MAINTAINERS | 2 +- arch/mips/boot/dts/img/pistachio.dtsi | 924 ++++++++++++++++++++++++++++++++++ 2 files changed, 925 insertions(+), 1 deletion(-) commit 35e6de38858f59b6b65dcfeaf700b5d06fc2b93d Author: Paul Burton Date: Mon Oct 17 16:01:07 2016 +0100 MIPS: traps: Ensure L1 & L2 ECC checking match for CM3 systems On systems with CM3, we must ensure that the L1 & L2 ECC enables are set to the same value. This is presumed by the hardware & cache corruption can occur when it is not the case. Support enabling & disabling the L2 ECC checking on CM3 systems where this is controlled via a GCR, and ensure that it matches the state of L1 ECC checking. Remove I6400 from the switch statement it will no longer hit, and which was incorrect since the L2 ECC enable bit isn't in the CP0 ErrCtl register. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14413/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 7 +++++ arch/mips/kernel/traps.c | 63 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 67 insertions(+), 3 deletions(-) commit d65e5677ad5b3a49c43f60ec07644dc1f87bbd2e Author: Leonid Yegoshin Date: Thu Aug 25 10:37:38 2016 -0700 MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix MIPS instructions MULTU, MADDU and MSUBU emulation requires registers HI/LO to be converted to signed 32bits before 64bit sign extension on MIPS64. Bug was found on running MIPS32 R2 test application on MIPS64 R6 kernel. Fixes: b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6") Signed-off-by: Leonid Yegoshin Reported-by: Nikola.Veljkovic@imgtec.com Cc: paul.burton@imgtec.com Cc: yamada.masahiro@socionext.com Cc: akpm@linux-foundation.org Cc: andrea.gelmini@gelma.net Cc: macro@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14043/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-r2-to-r6-emul.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1d79bf0e908202e3141c37d0ad89020ea93ad38a Author: Kelvin Cheung Date: Tue Aug 9 18:52:59 2016 +0800 MIPS: Loongson1B: Modify DEFAULT_MEMSIZE This patch changes DEFAULT_MEMSIZE to 64MB which is the memory size of latest EVB. Signed-off-by: Kelvin Cheung Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13856/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-loongson32/loongson1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c11621256c6f020944573daf3ea5963f37978abd Author: Kelvin Cheung Date: Tue Aug 9 16:23:11 2016 +0800 MIPS: Loongson1C: Remove ARCH_WANT_OPTIONAL_GPIOLIB This patch removes ARCH_WANT_OPTIONAL_GPIOLIB due to upstream changes. Signed-off-by: Kelvin Cheung Acked-by: Linus Walleij Cc: Yang Ling Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13855/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 51ad4ace97ed5a4e96e60684281066b758e1de8b Author: Florian Fainelli Date: Mon Oct 31 14:17:36 2016 -0700 MIPS: BMIPS: Migrate interrupts during bmips_cpu_disable While we properly disabled the per-CPU timer interrupt, we also need to make sure that all interrupts that can possibly have this CPU in their smp_affinity mask also have a chance to see this interrupt migrated to a CPU not being taken offline. [ralf@linux-mips.org: Fix merge conflict.] Fixes: 230b6ff57552 ("MIPS: BMIPS: Mask off timer IRQs when hot-unplugging a CPU") Signed-off-by: Florian Fainelli Cc: cernekee@gmail.com Cc: jaedon.shin@gmail.com Cc: justinpopo6@gmail.com Cc: tglx@linutronix.de Cc: marc.zyngier@arm.com Cc: jason@lakedaemon.net Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14488/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-bmips.c | 1 + 1 file changed, 1 insertion(+) commit 60067341105d9795f2cf5bd8a19adee34824f1b1 Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:43 2016 +0000 MIPS: xilfpga: Update defconfig Update defconfig to enable emaclite, i2c and temp sensor on the xilfpga platform Signed-off-by: Zubair Lutfullah Kakakhel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14595/ Signed-off-by: Ralf Baechle arch/mips/configs/xilfpga_defconfig | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit beb6e9b368dc59c55d5d4cf9a1e5a613521f1cfe Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:42 2016 +0000 MIPS: xilfpga: Add DT node for AXI emaclite The xilfpga platform has a Xilinx AXI emaclite block. Add the DT node to use it. Signed-off-by: Zubair Lutfullah Kakakhel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14596/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit da621d5022886311d6634b8995c9b9fc9d9b7d36 Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:41 2016 +0000 MIPS: xilfpga: Add DT node for AXI I2C The xilfpga platform has an AXI I2C Bus master with a temperature sensor connected to it. Add the device tree node to use them. Signed-off-by: Zubair Lutfullah Kakakhel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14594/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1e73f967474efc793a9d6a5c27f35e9b619b2db9 Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:40 2016 +0000 MIPS: xilfpga: Update DT node and specify uart irq Update the DT node with the UART irq Signed-off-by: Zubair Lutfullah Kakakhel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14593/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 3 +++ 1 file changed, 3 insertions(+) commit 79a93295339c1983efcecb466e17edd786a9c556 Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:39 2016 +0000 MIPS: xilfpga: Use Xilinx Interrupt Controller IRQs from peripherals such as i2c/uart/ethernet come via the AXI Interrupt controller. Select it in Kconfig for xilfpga and add the DT node Signed-off-by: Zubair Lutfullah Kakakhel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14592/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 35b258dc24f07d061513d5edba723faf6bf8b387 Author: Zubair Lutfullah Kakakhel Date: Tue Nov 22 17:52:38 2016 +0000 MIPS: xilfpga: Use irqchip instead of the legacy way This prepares the code to use the Xilinx Interrupt Controller driver in drivers/irqchip/irq-xilinx-intc.c Signed-off-by: Zubair Lutfullah Kakakhel Cc: Zubair.Kakakhel@imgtec.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14591/ Signed-off-by: Ralf Baechle arch/mips/xilfpga/intc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 20d6f0c3e2832e98400cacf986aee9b6eeca65df Author: Christophe JAILLET Date: Sun Oct 30 09:25:46 2016 +0100 MIPS: ath79: Fix error handling 'clk_register_fixed_rate()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET Acked-by: Aban Bedel Cc: antonynpavlov@gmail.com Cc: hackpascal@gmail.com Cc: amitoj1606@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14464/ Signed-off-by: Ralf Baechle arch/mips/ath79/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b0093f3a4acc7f393f102e7e064f70efc3375b9 Author: Matt Redfearn Date: Fri Nov 4 09:28:58 2016 +0000 MIPS: SMP-CPS: Don't BUG if a CPU fails to start If there is no online CPU within a core which could receive the IPI to start another VP in that core, a BUG() is triggered. Instead print a warning and gracefully handle the failure such that the system remains usable, albeit without the requested secondary CPU. Signed-off-by: Matt Redfearn Cc: Masahiro Yamada Cc: James Hogan Cc: Paul Burton Cc: Qais Yousef Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14504/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5892d6a60341d50e1765a86fba0976c747f4fb19 Author: Matt Redfearn Date: Fri Nov 4 09:28:57 2016 +0000 MIPS: SMP: Remove cpu_callin_map The previous commit made cpu_callin_map redundant, since it is no longer used to signal secondary CPUs starting, or going offline. Remove it now. Signed-off-by: Matt Redfearn Cc: Sebastian Andrzej Siewior Cc: Qais Yousef Cc: Masahiro Yamada Cc: Huacai Chen Cc: Kevin Cernekee Cc: Thomas Gleixner Cc: Andrew Morton Cc: James Hogan Cc: Paul Burton Cc: Florian Fainelli Cc: Anna-Maria Gleixner Cc: Adam Buchbinder Cc: Yang Shi Cc: David Daney Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14503/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/smp.c | 1 - arch/mips/include/asm/smp.h | 2 -- arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/kernel/smp.c | 2 -- arch/mips/loongson64/loongson-3/smp.c | 1 - 6 files changed, 8 deletions(-) commit a00eeede507c975087b7b8df8cf2c9f88ba285de Author: Matt Redfearn Date: Fri Nov 4 09:28:56 2016 +0000 MIPS: SMP: Use a completion event to signal CPU up If a secondary CPU failed to start, for any reason, the CPU requesting the secondary to start would get stuck in the loop waiting for the secondary to be present in the cpu_callin_map. Rather than that, use a completion event to signal that the secondary CPU has started and is waiting to synchronise counters. Since the CPU presence will no longer be marked in cpu_callin_map, remove the redundant test from arch_cpu_idle_dead(). Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: Jiri Slaby Cc: Paul Gortmaker Cc: Chris Metcalf Cc: Thomas Gleixner Cc: Qais Yousef Cc: James Hogan Cc: Paul Burton Cc: Marcin Nowakowski Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14502/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 4 +--- arch/mips/kernel/smp.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) commit 9799270affc53414da96e77e454a5616b39cdab0 Author: Paul Burton Date: Mon Nov 7 11:30:41 2016 +0000 MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds Code in arch/mips/netlogic/common/irq.c which handles the XLP PIC fails to build in XLR configurations due to cpu_is_xlp9xx not being defined, leading to the following build failure: arch/mips/netlogic/common/irq.c: In function ‘xlp_of_pic_init’: arch/mips/netlogic/common/irq.c:298:2: error: implicit declaration of function ‘cpu_is_xlp9xx’ [-Werror=implicit-function-declaration] if (cpu_is_xlp9xx()) { ^ Although the code was conditional upon CONFIG_OF which is indirectly selected by CONFIG_NLM_XLP_BOARD but not CONFIG_NLM_XLR_BOARD, the failing XLR with CONFIG_OF configuration can be configured manually or by randconfig. Fix the build failure by making the affected XLP PIC code conditional upon CONFIG_CPU_XLP which is used to guard the inclusion of asm/netlogic/xlp-hal/xlp.h that provides the required cpu_is_xlp9xx function. [ralf@linux-mips.org: Fixed up as per Jayachandran's suggestion.] Signed-off-by: Paul Burton Cc: Jayachandran C Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14524/ Signed-off-by: Ralf Baechle arch/mips/netlogic/common/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 225844c59f12e1bad446ef3c2584915aae32c04a Author: Paul Burton Date: Mon Nov 7 11:28:12 2016 +0000 MIPS: Remove unused HIGHMEM_DEBUG macro We have a HIGHMEM_DEBUG macro defined in asm/highmem.h with a comment stating that it should be removed for production, and no users... Kill it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14523/ Signed-off-by: Ralf Baechle arch/mips/include/asm/highmem.h | 3 --- 1 file changed, 3 deletions(-) commit 44079d3509aee89c58f3e4fd929fa53ab2299019 Author: Matt Redfearn Date: Thu Nov 10 10:02:13 2016 +0000 MIPS: Use Makefile.postlink to insert relocations into vmlinux When relocatable support for MIPS was merged, there was no support for an architecture to add a postlink step for vmlinux. This meant that only invoking a target within the boot directory, such as uImage, caused the relocations to be inserted into vmlinux. Building just the vmlinux target would result in a relocatable kernel with no relocation information present. Commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile") recified this situation, so MIPS can now define a postlink step to add relocation information into vmlinux, and remove the additional steps tacked onto boot targets. Signed-off-by: Matt Redfearn Tested-by: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14554/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 12 ------------ arch/mips/Makefile.postlink | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 12 deletions(-) commit 096a0de427ea333f56f0ee00328cff2a2731bcf1 Author: Paul Burton Date: Mon Nov 7 15:07:07 2016 +0000 MIPS: Handle microMIPS jumps in the same way as MIPS32/MIPS64 jumps is_jump_ins() checks for plain jump ("j") instructions since commit e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") but that commit didn't make the same change to the microMIPS code, leaving it inconsistent with the MIPS32/MIPS64 code. Handle the microMIPS encoding of the jump instruction too such that it behaves consistently. Signed-off-by: Paul Burton Fixes: e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") Cc: Tony Wu Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14533/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit bb9bc4689b9c635714fbcd5d335bad9934a7ebfc Author: Paul Burton Date: Mon Nov 7 15:07:06 2016 +0000 MIPS: Calculate microMIPS ra properly when unwinding the stack get_frame_info() calculates the offset of the return address within a stack frame simply by dividing a the bottom 16 bits of the instruction, treated as a signed integer, by the size of a long. Whilst this works for MIPS32 & MIPS64 ISAs where the sw or sd instructions are used, it's incorrect for microMIPS where encodings differ. The result is that we typically completely fail to unwind the stack on microMIPS. Fix this by adjusting is_ra_save_ins() to calculate the return address offset, and take into account the various different encodings there in the same place as we consider whether an instruction is storing the ra/$31 register. With this we are now able to unwind the stack for kernels targetting the microMIPS ISA, for example we can produce: Call Trace: [<80109e1f>] show_stack+0x63/0x7c [<8011ea17>] __warn+0x9b/0xac [<8011ea45>] warn_slowpath_fmt+0x1d/0x20 [<8013fe53>] register_console+0x43/0x314 [<8067c58d>] of_setup_earlycon+0x1dd/0x1ec [<8067f63f>] early_init_dt_scan_chosen_stdout+0xe7/0xf8 [<8066c115>] do_early_param+0x75/0xac [<801302f9>] parse_args+0x1dd/0x308 [<8066c459>] parse_early_options+0x25/0x28 [<8066c48b>] parse_early_param+0x2f/0x38 [<8066e8cf>] setup_arch+0x113/0x488 [<8066c4f3>] start_kernel+0x57/0x328 ---[ end trace 0000000000000000 ]--- Whereas previously we only produced: Call Trace: [<80109e1f>] show_stack+0x63/0x7c ---[ end trace 0000000000000000 ]--- Signed-off-by: Paul Burton Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14532/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 83 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 20 deletions(-) commit 67c75057709a6d85c681c78b9b2f9b71191f01a2 Author: Paul Burton Date: Mon Nov 7 15:07:05 2016 +0000 MIPS: Fix is_jump_ins() handling of 16b microMIPS instructions is_jump_ins() checks 16b instruction fields without verifying that the instruction is indeed 16b, as is done by is_ra_save_ins() & is_sp_move_ins(). Add the appropriate check. Signed-off-by: Paul Burton Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14531/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b6c7a324df37bf05ef7a2c1580683cf10d082d97 Author: Paul Burton Date: Mon Nov 7 15:07:04 2016 +0000 MIPS: Fix get_frame_info() handling of microMIPS function size get_frame_info() is meant to iterate over up to the first 128 instructions within a function, but for microMIPS kernels it will not reach that many instructions unless the function is 512 bytes long since we calculate the maximum number of instructions to check by dividing the function length by the 4 byte size of a union mips_instruction. In microMIPS kernels this won't do since instructions are variable length. Fix this by instead checking whether the pointer to the current instruction has reached the end of the function, and use max_insns as a simple constant to check the number of iterations against. Signed-off-by: Paul Burton Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14530/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a3552dace7d1d0cabf573e88fc3025cb90c4a601 Author: Paul Burton Date: Mon Nov 7 15:07:03 2016 +0000 MIPS: Prevent unaligned accesses during stack unwinding During stack unwinding we call a number of functions to determine what type of instruction we're looking at. The union mips_instruction pointer provided to them may be pointing at a 2 byte, but not 4 byte, aligned address & we thus cannot directly access the 4 byte wide members of the union mips_instruction. To avoid this is_ra_save_ins() copies the required half-words of the microMIPS instruction to a correctly aligned union mips_instruction on the stack, which it can then access safely. The is_jump_ins() & is_sp_move_ins() functions do not correctly perform this temporary copy, and instead attempt to directly dereference 4 byte fields which may be misaligned and lead to an address exception. Fix this by copying the instruction halfwords to a temporary union mips_instruction in get_frame_info() such that we can provide a 4 byte aligned union mips_instruction to the is_*_ins() functions and they do not need to deal with misalignment themselves. Signed-off-by: Paul Burton Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14529/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 70 +++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit ccaf7caf2c73c6db920772bf08bf1d47b2170634 Author: Paul Burton Date: Mon Nov 7 15:07:02 2016 +0000 MIPS: Clear ISA bit correctly in get_frame_info() get_frame_info() can be called in microMIPS kernels with the ISA bit already clear. For example this happens when unwind_stack_by_address() is called because we begin with a PC that has the ISA bit set & subtract the (odd) offset from the preceding symbol (which does not have the ISA bit set). Since get_frame_info() unconditionally subtracts 1 from the PC in microMIPS kernels it incorrectly misaligns the address it then attempts to access code at, leading to an address error exception. Fix this by using msk_isa16_mode() to clear the ISA bit, which allows get_frame_info() to function regardless of whether it is provided with a PC that has the ISA bit set or not. Signed-off-by: Paul Burton Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Cc: # v3.10+ Patchwork: https://patchwork.linux-mips.org/patch/14528/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ca0c40c38c3bd9be82601cc5623ea4cc8addc236 Author: Paul Burton Date: Mon Oct 17 15:56:21 2016 +0100 MIPS: Use generic asm/unaligned.h The MIPS-specific asm/unaligned.h provides nothing that the generic version doesn't - it simply uses MIPS-specific endianness macros in place of generic ones & lacks support for CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. Remove it & switch to using the generic version to remove duplication. Signed-off-by: Paul Burton Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14412/ Signed-off-by: Ralf Baechle arch/mips/include/asm/Kbuild | 1 + arch/mips/include/asm/unaligned.h | 28 ---------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) commit 3f00f4d8f083bc61005d0a1ef592b149f5c88bbd Author: Paul Burton Date: Mon Nov 7 11:52:19 2016 +0000 MIPS: Ensure bss section ends on a long-aligned address When clearing the .bss section in kernel_entry we do so using LONG_S instructions, and branch whilst the current write address doesn't equal the end of the .bss section minus the size of a long integer. The .bss section always begins at a long-aligned address and we always increment the write pointer by the size of a long integer - we therefore rely upon the .bss section ending at a long-aligned address. If this is not the case then the long-aligned write address can never be equal to the non-long-aligned end address & we will continue to increment past the end of the .bss section, attempting to zero the rest of memory. Despite this requirement that .bss end at a long-aligned address we pass 0 as the end alignment requirement to the BSS_SECTION macro and thus don't guarantee any particular alignment, allowing us to hit the error condition described above. Fix this by instead passing 8 bytes as the end alignment argument to the BSS_SECTION macro, ensuring that the end of the .bss section is always at least long-aligned. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14526/ Signed-off-by: Ralf Baechle arch/mips/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cc709d7d4f013f51d38ceb2e3c8c82d230cf457 Author: Steven J. Hill Date: Fri Dec 9 02:36:22 2016 -0600 MIPS: Relocatable: Provide plat_post_relocation hook This hook provides the platform the chance to perform any required setup before the boot processor switches to the relocated kernel. The relocated kernel has been copied and fixed up ready for execution at this point. Secondary CPUs may wish to switch to it early. There is also the opportunity for the platform to abort jumping to the relocated kernel if there is anything wrong with the chosen offset. Signed-off-by: Matt Redfearn Signed-off-by: Steven J. Hill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14651/ Signed-off-by: Ralf Baechle arch/mips/kernel/relocate.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3ff72be4c9ce269c5b7adff9b0f912a2df3cb987 Author: Steven J. Hill Date: Tue Dec 13 14:25:37 2016 -0600 MIPS: Octeon: Enable KASLR This patch enables KASLR for Octeon systems. The SMP startup code is such that the secondaries monitor the volatile variable 'octeon_processor_relocated_kernel_entry' for any non-zero value. The 'plat_post_relocation hook' is used to set that value to the kernel entry point of the relocated kernel. The secondary CPUs will then jusmp to the new kernel, perform their initialization again and begin waiting for the boot CPU to start them via the relocated loop 'octeon_spin_wait_boot'. Inspired by Steven's code from Cavium. Signed-off-by: Matt Redfearn Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14669/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 3 ++- arch/mips/cavium-octeon/smp.c | 20 ++++++++++++++++++-- .../asm/mach-cavium-octeon/kernel-entry-init.h | 15 +++++++++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) commit 126c1113bf3e6facdd5562064043b9e8fa8c9bf1 Author: Steven J. Hill Date: Tue Nov 22 13:44:20 2016 -0600 MIPS: Octeon: Add plat_get_fdt() function for Cavium platforms. Add in the function needed for Octeon platforms to support KASLR. Signed-off-by: Steven J. Hill Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/setup.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 715e20eb41cc8b48f92d959da2faaac61d110349 Author: Steven J. Hill Date: Tue Nov 22 13:44:10 2016 -0600 MIPS: Octeon: Add fw_init_cmdline() for Cavium platforms. Add platform-specific kernel command line processing for Octeon. Signed-off-by: Steven J. Hill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14599/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/setup.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3cc3434fd6307d06b53b98ce83e76bf9807689b9 Author: Matt Redfearn Date: Mon Dec 19 14:21:00 2016 +0000 MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK Since do_IRQ is now invoked on a separate IRQ stack, we select HAVE_IRQ_EXIT_ON_IRQ_STACK so that softirq's may be invoked directly from irq_exit(), rather than requiring do_softirq_own_stack. Signed-off-by: Matt Redfearn Acked-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14744/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dda45f701c9d7ad4ac0bb446e3a96f6df9a468d9 Author: Matt Redfearn Date: Mon Dec 19 14:20:59 2016 +0000 MIPS: Switch to the irq_stack in interrupts When enterring interrupt context via handle_int or except_vec_vi, switch to the irq_stack of the current CPU if it is not already in use. The current stack pointer is masked with the thread size and compared to the base or the irq stack. If it does not match then the stack pointer is set to the top of that stack, otherwise this is a nested irq being handled on the irq stack so the stack pointer should be left as it was. The in-use stack pointer is placed in the callee saved register s1. It will be saved to the stack when plat_irq_dispatch is invoked and can be restored once control returns here. Signed-off-by: Matt Redfearn Acked-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14743/ Signed-off-by: Ralf Baechle arch/mips/kernel/genex.S | 81 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 5 deletions(-) commit 510d86362a27577f5ee23f46cfb354ad49731e61 Author: Matt Redfearn Date: Mon Dec 19 14:20:58 2016 +0000 MIPS: Only change $28 to thread_info if coming from user mode The SAVE_SOME macro is used to save the execution context on all exceptions. If an exception occurs while executing user code, the stack is switched to the kernel's stack for the current task, and register $28 is switched to point to the current_thread_info, which is at the bottom of the stack region. If the exception occurs while executing kernel code, the stack is left, and this change ensures that register $28 is not updated. This is the correct behaviour when the kernel can be executing on the separate irq stack, because the thread_info will not be at the base of it. With this change, register $28 is only switched to it's kernel conventional usage of the currrent thread info pointer at the point at which execution enters kernel space. Doing it on every exception was redundant, but OK without an IRQ stack, but will be erroneous once that is introduced. Signed-off-by: Matt Redfearn Acked-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14742/ Signed-off-by: Ralf Baechle arch/mips/include/asm/stackframe.h | 7 +++++++ 1 file changed, 7 insertions(+) commit d42d8d106b0275b027c1e8992c42aecf933436ea Author: Matt Redfearn Date: Mon Dec 19 14:20:57 2016 +0000 MIPS: Stack unwinding while on IRQ stack Within unwind stack, check if the stack pointer being unwound is within the CPU's irq_stack and if so use that page rather than the task's stack page. Signed-off-by: Matt Redfearn Acked-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: Adam Buchbinder Cc: Maciej W. Rozycki Cc: Marcin Nowakowski Cc: Chris Metcalf Cc: James Hogan Cc: Paul Burton Cc: Jiri Slaby Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14741/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit fe8bd18ffea5327344d4ec2bf11f47951212abd0 Author: Matt Redfearn Date: Mon Dec 19 14:20:56 2016 +0000 MIPS: Introduce irq_stack Allocate a per-cpu irq stack for use within interrupt handlers. Also add a utility function on_irq_stack to determine if a given stack pointer is within the irq stack for that cpu. Signed-off-by: Matt Redfearn Acked-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: Paolo Bonzini Cc: Chris Metcalf Cc: Petr Mladek Cc: James Hogan Cc: Paul Burton Cc: Aaron Tomlin Cc: Andrew Morton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14740/ Signed-off-by: Ralf Baechle arch/mips/include/asm/irq.h | 12 ++++++++++++ arch/mips/kernel/asm-offsets.c | 1 + arch/mips/kernel/irq.c | 11 +++++++++++ 3 files changed, 24 insertions(+) commit ae2f5e5ed04a17c1aa1f0a3714c725e12c21d2a9 Author: Ralf Baechle Date: Thu Dec 15 12:39:22 2016 +0100 MIPS: IP22: Fix build error due to binutils 2.25 uselessnes. Fix the following build error with binutils 2.25. CC arch/mips/mm/sc-ip22.o {standard input}: Assembler messages: {standard input}:132: Error: number (0x9000000080000000) larger than 32 bits {standard input}:159: Error: number (0x9000000080000000) larger than 32 bits {standard input}:200: Error: number (0x9000000080000000) larger than 32 bits scripts/Makefile.build:293: recipe for target 'arch/mips/mm/sc-ip22.o' failed make[1]: *** [arch/mips/mm/sc-ip22.o] Error 1 MIPS has used .set mips3 to temporarily switch the assembler to 64 bit mode in 64 bit kernels virtually forever. Binutils 2.25 broke this behavious partially by happily accepting 64 bit instructions in .set mips3 mode but puking on 64 bit constants when generating 32 bit ELF. Binutils 2.26 restored the old behaviour again. Fix build with binutils 2.25 by open coding the offending dli $1, 0x9000000080000000 as li $1, 0x9000 dsll $1, $1, 48 which is ugly be the only thing that will build on all binutils vintages. Signed-off-by: Ralf Baechle Cc: stable@vger.kernel.org arch/mips/mm/sc-ip22.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f9f1c8db1c37253805eaa32265e1e1af3ae7d0a4 Author: Ralf Baechle Date: Thu Dec 15 12:27:21 2016 +0100 MIPS: IP22: Reformat inline assembler code to modern standards. Signed-off-by: Ralf Baechle arch/mips/mm/sc-ip22.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit e4c64e6f3dd38cb902c9a304a1fa6c1bdd0da67c Author: Paul Bolle Date: Fri Nov 25 13:36:18 2016 +0100 MIPS: Zboot: Don't use $(LINUXINCLUDE) twice The make variables KBUILD_CFLAGS and KBUILD_AFLAGS both contain $(LINUXINCLUDE). But the build already picks up $(LINUXINCLUDE) from scripts/Makefile.lib. The net effect is that the (long) list of include directories is used twice. This is harmless but pointless. So stop using $(LINUXINCLUDE) twice. Signed-off-by: Paul Bolle Cc: Masahiro Yamada Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14622/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2cec11d871814cd65702ccd3591232ee9f185360 Author: Geert Uytterhoeven Date: Wed Dec 7 10:05:15 2016 +0100 MIPS: TXx9: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuations, to fix user-visible breakage, - Drop superfluous casts (u64 has been unsigned long long on all architectures for many years). On rbtx4927, this restores the kernel output like: -TX4927 SDRAMC -- - CR0:0000007e00000544 - TR:32800030e +TX4927 SDRAMC -- CR0:0000007e00000544 TR:32800030e and: -PCIC -- PCICLK: -Internal(33.3MHz) - +PCIC -- PCICLK:Internal(33.3MHz) Fixes: 4bcc595ccd80decb ("printk: reinstate KERN_CONT for printing continuation lines") Signed-off-by: Geert Uytterhoeven Reviewed-by: Atsushi Nemoto Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14646/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-tx4927.c | 22 +++++++++++----------- arch/mips/pci/pci-tx4938.c | 30 +++++++++++++++--------------- arch/mips/pci/pci-tx4939.c | 10 +++++----- arch/mips/txx9/generic/pci.c | 28 +++++++++++++--------------- arch/mips/txx9/generic/setup_tx3927.c | 6 +++--- arch/mips/txx9/generic/setup_tx4927.c | 20 +++++++++----------- arch/mips/txx9/generic/setup_tx4938.c | 28 +++++++++++++--------------- arch/mips/txx9/generic/setup_tx4939.c | 8 ++++---- arch/mips/txx9/generic/smsc_fdc37m81x.c | 17 +++++++---------- arch/mips/txx9/jmr3927/prom.c | 2 +- arch/mips/txx9/jmr3927/setup.c | 11 +++++------ arch/mips/txx9/rbtx4938/setup.c | 14 +++++++------- 12 files changed, 93 insertions(+), 103 deletions(-) commit 2b58a76e2fd6c8064c5049c4dda1f4c329a33478 Author: Aaro Koskinen Date: Sun Nov 27 02:30:51 2016 +0200 MIPS: Octeon: Kill cvmx_helper_link_autoconf() Kill cvmx_helper_link_autoconf(). Nobody uses this function. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14626/ Signed-off-by: Ralf Baechle .../cavium-octeon/executive/cvmx-helper-rgmii.c | 3 +- .../cavium-octeon/executive/cvmx-helper-sgmii.c | 3 +- .../mips/cavium-octeon/executive/cvmx-helper-spi.c | 3 +- .../cavium-octeon/executive/cvmx-helper-xaui.c | 3 +- arch/mips/cavium-octeon/executive/cvmx-helper.c | 47 +--------------------- arch/mips/include/asm/octeon/cvmx-helper-rgmii.h | 3 +- arch/mips/include/asm/octeon/cvmx-helper-sgmii.h | 3 +- arch/mips/include/asm/octeon/cvmx-helper-spi.h | 3 +- arch/mips/include/asm/octeon/cvmx-helper-xaui.h | 3 +- arch/mips/include/asm/octeon/cvmx-helper.h | 14 +------ 10 files changed, 10 insertions(+), 75 deletions(-) commit 3c2b02397893c40ce46e2297ba980fbc40d908b0 Author: Julia Lawall Date: Sat Oct 29 21:36:59 2016 +0200 MIPS: TXx9: 7segled: use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_WO for write only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @wo@ declarer name DEVICE_ATTR; identifier x,x_store; @@ DEVICE_ATTR(x, \(0200\|S_IWUSR\), NULL, x_store); @script:ocaml@ x << wo.x; x_store << wo.x_store; @@ if not (x^"_store" = x_store) then Coccilib.include_match false @@ declarer name DEVICE_ATTR_WO; identifier wo.x,wo.x_store; @@ - DEVICE_ATTR(x, \(0200\|S_IWUSR\), NULL, x_store); + DEVICE_ATTR_WO(x); // Signed-off-by: Julia Lawall Cc: kernel-janitors@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14463/ Signed-off-by: Ralf Baechle arch/mips/txx9/generic/7segled.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ccebb88aea1329221e1063906f4846b532a57fb5 Author: Maarten ter Huurne Date: Mon Oct 31 15:19:55 2016 +0100 MIPS: zboot: Add "uzImage.bin" target uzImage.bin is vmlinuz.bin wrapped in a legacy U-Boot image. Since the extraction code is inside the image, it does not depend on the boot loader to extract the kernel. Signed-off-by: Maarten ter Huurne Cc: Alban Bedel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14473/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 4 ++++ arch/mips/boot/compressed/Makefile | 4 ++++ 2 files changed, 8 insertions(+) commit eeee8b1776db53fabd3b668155208ff6b09e3f07 Author: Aaron Moore Date: Sun Dec 18 00:48:32 2016 -0500 staging: vc04_services: Fix bracing on single statement blocks Fix coding style issue caught by checkpatch.pl relating to braces on single statement blocks. This issue was corrected in 3 locations. Signed-off-by: Aaron Moore Reviewed-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit c322160ac5e3617d7d9b57c25b585e71fc2dcb88 Author: Mike Kofron Date: Fri Dec 9 11:21:01 2016 -0500 staging: vc04_services: Fix NULL ptr sparse warnings In calls to queue_message() in vchiq_core.c, the "void *context" parameter is set as 0 rather than NULL. This patch amends each call to use the proper NULL pointer. The following sparse warnings are fixed: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1623:23: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1976:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2075:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2095:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2907:39: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2929:39: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3059:72: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3860:31: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3870:31: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3880:31: warning: Using plain integer as NULL pointer Signed-off-by: Mike Kofron Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7048e25483085d29ab88392fe5014924ad12028e Author: Manoj Sawai Date: Mon Dec 12 19:29:51 2016 +0000 Staging: ks7010: ks7010_sdio.h: Trailing whitespace Removed trailing whitespace. Signed-off-by: Manoj Sawai Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64d94cd3c4c18fa45366c67d9ede1be3db7e6fa3 Author: Manoj Sawai Date: Mon Dec 12 19:29:50 2016 +0000 Staging: ks7010: ks7010_sdio.h: Complex macro not in parentheses Fixed coding style error. Complex macro not inside parentheses. Signed-off-by: Manoj Sawai Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8315388d98ef94ca85b9b5b2e2239feb85abfe1c Author: Tobias Heineken Date: Thu Dec 22 14:55:14 2016 +0100 Staging: skein: checkpatch: fix comment aligning in skein_base.c This is a patch to the skein_base.c file that fixes up a comment aligning warning found by the checkpatch.pl tool at line 2 Signed-off-by: Tobias Heineken Signed-off-by: Florian Schleicher CC: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman drivers/staging/skein/skein_base.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6b5f707c949af3a1b8b3b70cba3c585bb5313012 Author: Scott Matheina Date: Tue Dec 20 20:42:19 2016 -0600 staging: fbtft: fix code alignment with open parenthesis These changes where identified by checkpatch.pl as needed changes to align the code with the linux development coding style. The several lines of text where aligned with the precending parenthesis. Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_agm1264k-fl.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 58a748f7dc29d8a7bb74c6cbba6a82425dbba5cc Author: Alexandre Belloni Date: Tue Dec 27 22:36:50 2016 +0100 ARM64: dts: marvell: Correct license text The license text has been mangled at some point then copy pasted across multiple files. Restore it to what it should be. Note that this is not intended as a license change. Signed-off-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-371x.dtsi | 10 +++++----- arch/arm64/boot/dts/marvell/armada-3720-db.dts | 10 +++++----- arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 10 +++++----- arch/arm64/boot/dts/marvell/armada-372x.dtsi | 10 +++++----- arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 10 +++++----- 5 files changed, 25 insertions(+), 25 deletions(-) commit c7d7ea67d32f7bbd2fa83c3e041973d0e8680080 Author: Romain Perier Date: Thu Dec 1 12:04:39 2016 +0100 arm64: dts: marvell: Add I2C definitions for the Armada 3700 The Armada 3700 has two i2c bus interface units, this commit adds the definitions of the corresponding device nodes. It also enables the node on the development board for this SoC. Signed-off-by: Romain Perier Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 4 ++++ arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) commit bc35739354583053e4a3835f2991d0d52798b87f Author: Romain Perier Date: Thu Dec 8 15:58:47 2016 +0100 arm64: dts: marvell: Enable spi0 on the board Armada-3720-db This commit enables the device node spi0 on the official development board for the Marvell Armada 3700. It also adds sub-node for the 128Mb SPI-NOR present on the board. Signed-off-by: Romain Perier Tested-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e09dfa8fa57aac3f66581b8f5c7fa43d152eaa4f Author: Romain Perier Date: Thu Dec 8 15:58:46 2016 +0100 arm64: dts: marvell: Add definition of SPI controller for Armada 3700 Armada 3700 SoC has an SPI Controller, this commit adds the definition of the SPI device node at the SoC level. Signed-off-by: Romain Perier Tested-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1708ebc9636a249e104b83c6d105f15244825281 Author: Nikolay Aleksandrov Date: Tue Jan 3 12:13:39 2017 +0100 ipmr, ip6mr: add RTNH_F_UNRESOLVED flag to unresolved cache entries While working with ipmr, we noticed that it is impossible to determine if an entry is actually unresolved or its IIF interface has disappeared (e.g. virtual interface got deleted). These entries look almost identical to user-space when dumping or receiving notifications. So in order to recognize them add a new RTNH_F_UNRESOLVED flag which is set when sending an unresolved cache entry to user-space. Suggested-by: Roopa Prabhu Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 1 + net/ipv4/ipmr.c | 4 +++- net/ipv6/ip6mr.c | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) commit f0c05e876212afdf2b7e39da99d5c928f0dbbd56 Author: Romain Perier Date: Wed Dec 21 10:00:45 2016 +0100 arm64: dts: marvell: Add ethernet switch definition for the ESPRESSObin This defines and enables the Marvell ethernet switch MVE886341 on the Marvell ESPRESSObin board. Signed-off-by: Romain Perier Signed-off-by: Gregory CLEMENT .../boot/dts/marvell/armada-3720-espressobin.dts | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 07b76ba9f827ffe8faebe78a98c96174a2538078 Author: Volodymyr Bendiuga Date: Tue Jan 3 10:49:09 2017 +0100 dsa:mv88e6xxx: allow address 0x1 in smi_init Some devices, such as the mv88e6097 do have ADDR[0] external and so it is possible to configure the device to use SMI address 0x1. Remove the restriction, as there are boards using this address. Signed-off-by: Volodymyr Bendiuga Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ---- 1 file changed, 4 deletions(-) commit 28fa4f308e44aeea41d2a69604f5e15dcf2aa93f Author: Philippe Reynes Date: Mon Jan 2 23:49:15 2017 +0100 net: freescale: dpaa: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 303b0d4be12bee6a50de74f70d611ab0e65c2129 Merge: 0a0a8d6 3289025 Author: David S. Miller Date: Tue Jan 3 09:45:44 2017 -0500 Merge branch 'for_4.11/net-next/rds_v3' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux Santosh Shilimkar says: ==================== net: RDS updates v2->v3: - Re-based against latest net-next head. - Dropped a user visible change after discussing with David Miller. It needs some more work to fully support old/new tools matrix. - Addressed Dave's comment about bool usage in patch "RDS: IB: track and log active side..." v1->v2: Re-aligned indentation in patch 'RDS: mark few internal functions..." Series consist of: - RDMA transport fixes for map failure, listen sequence, handler panic and composite message notification. - Couple of sparse fixes. - Message logging improvements for bind failure, use once mr semantics and connection remote address, active end point. - Performance improvement for RDMA transport by reducing the post send pressure on the queue and spreading the CQ vectors. - Useful statistics for socket send/recv usage and receive cache usage. - Additional RDS CMSG used by application to track the RDS message stages for certain type of traffic to find out latency spots. Can be enabled/disabled per socket. ==================== Signed-off-by: David S. Miller commit c7591a266aebfafc8afc1f2939bed2e76dcff55a Author: Fernando Apesteguia Date: Sun Dec 11 20:13:05 2016 +0100 staging: dgnc: update TODO file Remove reference to checkpatch warnings since its output is now clean. Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/TODO | 1 - 1 file changed, 1 deletion(-) commit 298afff08c82ff8c6de0253ffe76ad34adb99f0f Author: Scott Matheina Date: Wed Dec 21 20:44:55 2016 -0600 staging: fixed spelling error in TODO file for dgnc driver fixed a missing letter in the TODO file 'unneeded' Signed-off-by: Scott Matheina Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e4b5cd641056ca58836502cde1613eb6a375f2a Author: Cheah Kok Cheong Date: Fri Dec 30 19:27:41 2016 +0800 Staging: comedi: proc: Warn if unable to create proc entry The proc entry is not essential for the comedi system as evident by the support for !CONFIG_PROC_FS. So for failure to create, just warn and continue loading. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6bd68e29b6fd6043fee89b056f791a394d89a57f Author: Cheah Kok Cheong Date: Fri Dec 30 19:27:17 2016 +0800 Staging: comedi: proc: Add module owner Since this is a loadable kernel module, add module ownership to follow LKM semantics. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/proc.c | 1 + 1 file changed, 1 insertion(+) commit ec0bff06bb096651d147e7d4f6769ac2896235cc Author: Cheah Kok Cheong Date: Fri Dec 30 19:26:50 2016 +0800 Staging: comedi: proc: Add __init prefix Add __init prefix so that symbol will be discarded after module loading. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f52f319cd3f85bca9bf325f3505b3d76b82c644 Author: Cheah Kok Cheong Date: Fri Dec 30 19:26:24 2016 +0800 Staging: comedi: proc: Change file permission to read only As there's no write operation, change to read only. Was inadvertantly switched to 0644 in commit 1f817b86d5e6 ("comedi: Don't use create_proc_read_entry()"). Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 Author: Cheah Kok Cheong Date: Fri Dec 30 19:25:52 2016 +0800 Staging: comedi: comedi_fops: Avoid orphaned proc entry Move comedi_proc_init to the end to avoid orphaned proc entry if module loading failed. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3358a0ca2152ac8f3f34df48feeb09dba599eccd Author: Cheah Kok Cheong Date: Thu Dec 22 03:13:19 2016 +0800 Staging: comedi: comedidev.h: Drop old style zero-length array According to Documentation/Changes, the minimum gcc version required to compile the kernel is 3.2 (this is probably outdated too). Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedidev.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 3c4a2d9e25eb090cbba7a4d1e3a91f2044324e17 Author: Saber Rezvani Date: Fri Dec 16 23:50:04 2016 +0330 staging: comedi: ni_670x: using the BIT(x) macro Fix the checkpatch.pl issue: CHECK: Prefer using the BIT macro replacing bit shifting on 1 with the BIT(x) macro. Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_670x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f2ee91256cbada0ee4192516a189a088766df3c Author: Saber Rezvani Date: Fri Dec 16 23:36:20 2016 +0330 staging: comedi: ni_at_ao: using the BIT(x) macro Fix the checkpatch.pl issue: CHECK: Prefer using the BIT macro replacing bit shifting on 1 with the BIT(x) macro. Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_at_ao.c | 62 +++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit db30e33f4a333e52cab9279cd000576f98a23451 Author: Saber Rezvani Date: Fri Dec 16 22:45:16 2016 +0330 staging: comedi: cb_pcidas64: use preferred kernel type u32 Fix the checkpatch.pl issue: CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 38 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 9e23afed3579cfb1d533a55f41f69c6d67f669c6 Author: Saber Rezvani Date: Fri Dec 16 22:45:15 2016 +0330 staging: comedi: cb_pcidas64: use preferred kernel type u16 Fix the checkpatch.pl issue: CHECK: Prefer kernel type 'u16' over 'uint16_t' Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 58 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 7afd6d2179346bdfbd087d39325668d5bc09aa81 Author: Saber Rezvani Date: Fri Dec 16 22:45:14 2016 +0330 staging: comedi: cb_pcidas64: use preferred kernel type u8 Fix the checkpatch.pl issue: CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Saber Rezvani Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 9fe3b628e6ab208bf2f46a4dff54de9cb4ee1f9d Author: Ian Abbott Date: Thu Dec 15 13:19:51 2016 +0000 staging: comedi: comedidev.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedidev.h | 47 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 22 deletions(-) commit 1016d5a6c20f094ac688b4709ce198413b3f3019 Author: Ian Abbott Date: Thu Dec 15 13:19:50 2016 +0000 staging: comedi: comedi_usb.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_usb.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 514871ef43e31e59fb3520c246b74c16600a0078 Author: Ian Abbott Date: Thu Dec 15 13:19:49 2016 +0000 staging: comedi: comedi_pcmcia.[ch]: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_pcmcia.c | 3 ++- drivers/staging/comedi/comedi_pcmcia.h | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) commit 751922da902c4a4b2861f8ec8d0c3ee9178de9ff Author: Ian Abbott Date: Thu Dec 15 13:19:48 2016 +0000 staging: comedi: comedi_internal.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_internal.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7885bc8389eb92927957232cf06aad6b3907a395 Author: Ian Abbott Date: Thu Dec 15 13:19:47 2016 +0000 staging: comedi: comedi_compat32.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_compat32.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bef966264b39c4396b4f5a2b2d8293b907231b1b Author: Ian Abbott Date: Thu Dec 15 13:19:46 2016 +0000 staging: comedi: ni_tio_internal.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_tio_internal.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d83889a87b6a822682003175fc83ee16ee81e78b Author: Ian Abbott Date: Thu Dec 15 13:19:45 2016 +0000 staging: comedi: ni_tio.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_tio.h | 42 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 13938181e25bb297ef2885ec02d8046b2ef20924 Author: Ian Abbott Date: Thu Dec 15 13:19:44 2016 +0000 staging: comedi: ni_labpc.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_labpc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22d3c2ca8263b16cff031c03924d847e73826f17 Author: Ian Abbott Date: Thu Dec 15 13:19:43 2016 +0000 staging: comedi: mite.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/mite.h | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) commit 81735efcc9859d7705096de8d094865a1c130216 Author: Ian Abbott Date: Thu Dec 15 13:19:42 2016 +0000 staging: comedi: comedi_isadma.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/comedi_isadma.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 00b298544c45cd86faa28cd39b00b035ec6f5f70 Author: Ian Abbott Date: Thu Dec 15 13:19:41 2016 +0000 staging: comedi: comedi_8254.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/comedi_8254.h | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit cf9781131b9c6f8e8cbbc36a4b04ffefd117be63 Author: Ian Abbott Date: Thu Dec 15 13:19:40 2016 +0000 staging: comedi: addi_watchdog.h: add identifiers to function parameters Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/addi_watchdog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9f363c014166bba1b172c0fa824d395d4e299c0 Author: Piotr Gregor Date: Wed Dec 14 13:42:11 2016 +0000 drivers: staging: comedi: fix function prototypes Add names of parameters to function prototypes in comedi PCI. Checkpatch reports now no errors. Signed-off-by: Piotr Gregor Reviewed-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_pci.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 5a30502c869e81dc0e577eecde097d9090f08734 Author: Matthew Smith Date: Fri Dec 16 17:16:47 2016 +0000 staging: nvec: fix indent issue in nvec_power.c Fixes "WARNING: Statements should start on a tabstop" from checkpatch.pl Signed-off-by: Matthew Smith Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aacd178373413163d051d75c0fcabe65bcc74cea Author: Jaewon Kim Date: Fri Dec 9 14:05:30 2016 +0900 staging: android: ion: return -ENOMEM in ion_cma_heap allocation failure Initial Commit 349c9e138551 ("gpu: ion: add CMA heap") returns -1 in allocation failure. The returned value is passed up to userspace through ioctl. So user can misunderstand error reason as -EPERM(1) rather than -ENOMEM(12). This patch simply changed this to return -ENOMEM. Signed-off-by: Jaewon Kim Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_cma_heap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e795491822c4c5bbb2c0d016676f5648d78cacb0 Author: David Kershner Date: Thu Dec 22 11:09:07 2016 -0500 staging: unisys: visorbus: my_device_destroy add error handling Add the proper error handling to my_device_destroy so it can be send back up the stack for further error reporting. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 40fc79f9b43718f13d71767368caa411641f42e6 Author: David Kershner Date: Thu Dec 22 11:09:06 2016 -0500 staging: unisys: visorbus: my_device_changestate add error handling The function my_device_changestate was not returning errors up the stack. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 300ed61251db466121a500bc85c720b7d709e6f5 Author: David Kershner Date: Thu Dec 22 11:09:05 2016 -0500 staging: unisys: visorbus: Add err handling for function save_crash_message The function save_crash_message returns an error, don't ignore it, respond appropriately and send it up. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ad2a7d65b126693d73a015722c438701fbf4b4ad Author: David Kershner Date: Thu Dec 22 11:09:04 2016 -0500 staging: unisys: visorbus: my_device_create add error handling Add proper error handling to the function my_device_create and propagate the error message up the stack. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 44 ++++++++++++++------------ 1 file changed, 24 insertions(+), 20 deletions(-) commit 6008a071d2c41ffe63d7a1d29ab7ca8558579bb6 Author: Bryan Thompson Date: Thu Dec 22 11:09:03 2016 -0500 staging: unisys: visorhba: Remove unused MAX_BUF define Remove the MAX_BUF define and associated comments. Signed-off-by: Bryan Thompson Reviewed-by: Tim Sell Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 5d501ef44057b1593b13e60964391cc1396f241f Author: David Binder Date: Thu Dec 22 11:09:02 2016 -0500 staging: unisys: visorbus: Convert references to /proc to /sys Removes references to visorchipset in the /proc filesystem, and replaces them with references to the /sys filesystem. Also removes reference to the visorchipset driver, and replaces it with a reference to plain visorchipset (since it is no longer a standalone driver). Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 22da2c123174e810cf448eec4f926eb3e8d82d97 Author: Erik Arfvidson Date: Thu Dec 22 11:09:01 2016 -0500 staging: unisys: visorbus: controlvmchannel.h remove unused pound defines This patch removes unused pound defines in controlvmchannel.h. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 22 ---------------------- 1 file changed, 22 deletions(-) commit 3e4273db10ee7bd1000a088f4c647cb993fc009c Author: David Binder Date: Thu Dec 22 11:09:00 2016 -0500 staging: unisys: visorbus: Remove unneeded checks for valid variable addr The 'retry' variable created in handle_command() is statically allocated, and its address is never set to NULL. Therefore conditionals to verify the validity of the retry variable's address are unnecessary. Reported-by: Greg Kroah-Hartman Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 36309d3b105c650eb0398afd1675df30fb570e5d Author: David Binder Date: Thu Dec 22 11:08:59 2016 -0500 staging: unisys: visorbus: Use switch statement instead of conditionals Control flow is now directed using a switch statement, triggered by the enum crash_obj_type function parameter, instead of a set of conditional statements. Reported-by: Greg Kroah-Hartman Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 98f9ed9ecb5780f654ecf54b7c27bfff9a38962c Author: Sameer Wadgaonkar Date: Thu Dec 22 11:08:58 2016 -0500 staging: unisys: visorbus: shorten error message defines This patch shortens a few error message defines by removing ERROR from the define. Reported-by: Greg Kroah-Hartman Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 65 +++++++++++----------- drivers/staging/unisys/visorbus/visorchipset.c | 41 +++++++------- 2 files changed, 52 insertions(+), 54 deletions(-) commit e3e0293ca9b948e83948f0514796370c9cc49a09 Author: Geliang Tang Date: Tue Dec 20 21:56:55 2016 +0800 staging: lustre: osc: use rb_entry_safe Use rb_entry_safe() instead of container_of() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 69eb1a0dbfde3132022a063492ddd0f162b650a7 Author: Tabrez khan Date: Fri Dec 16 19:59:31 2016 +0530 staging : lustre : Remove braces from single-line body. Remove unnecessary braces {} for single while statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 364139d3b01c2d30c07dddfb493573927d04e31d Author: Ben Evans Date: Sat Dec 10 13:05:58 2016 -0500 staging: lustre: obdclass: style cleanup for obdo related functions Change the style of lustre_get_wire_obdo and lustre_set_wire_obdo to conform to linux kernel standard. Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: http://review.whamcloud.com/16917 Reviewed-on: http://review.whamcloud.com/19266 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obdo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2e69d1ceb75f094c5a4e47bd6abdb6feafee07e6 Author: Ben Evans Date: Sat Dec 10 13:05:57 2016 -0500 staging: lustre: obdclass: Create a header for obdo related functions Remove all obdo related functions from lustre_idl.h Create lustre_odbo.h. Include where appropriate. Make the functions lustre_get_wire_obdo and lustre_set_wire_obdo to not be inlined functions. Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: http://review.whamcloud.com/16917 Reviewed-on: http://review.whamcloud.com/19266 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 46 ------------------ .../staging/lustre/lustre/include/lustre_obdo.h | 54 ++++++++++++++++++++++ drivers/staging/lustre/lustre/obdclass/obdo.c | 53 +++++++++++++++++++++ drivers/staging/lustre/lustre/osc/osc_io.c | 2 + drivers/staging/lustre/lustre/osc/osc_request.c | 1 + 5 files changed, 110 insertions(+), 46 deletions(-) commit 4091af4a09488039049d5bf91221983bdcd5107a Author: Quentin Lambert Date: Thu Dec 8 21:38:27 2016 +0100 staging: lustre: Fix variable type declaration after refactoring A recent clean-up declared och_flags as a int rather than fmode_t. This lead to the following sparse warning: drivers/staging/lustre/lustre/llite/file.c:106:30: warning: restricted fmode_t degrades to integer This patch fixes this issue. Fixes: 0a1200991234f7 ("staging: lustre: cleanup lustre_lib.h") Signed-off-by: Quentin Lambert Acked-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efd6271be19425233ed819cda5daaa69cc832d41 Author: James Simmons Date: Wed Dec 7 17:55:17 2016 -0500 staging: lustre: lnet: make brw_inject_one_error() static It's not used anywhere outside of brw_test.c file. Highlighted by sparse. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ddcd16f54b43e421001624483d7a9a1d6523c18 Author: Jinshan Xiong Date: Wed Dec 7 17:49:12 2016 -0500 staging: lustre: osc: handle osc eviction correctly Cleanup everything if an OSC is being evicted. Group lock is not well supported yet. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/14989 Reviewed-by: John L. Hammond Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 3 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 25 ++++----- .../staging/lustre/lustre/osc/osc_cl_internal.h | 11 ++-- drivers/staging/lustre/lustre/osc/osc_internal.h | 2 + drivers/staging/lustre/lustre/osc/osc_io.c | 60 +++++++++++++++++----- drivers/staging/lustre/lustre/osc/osc_object.c | 19 +++++++ drivers/staging/lustre/lustre/osc/osc_request.c | 42 ++++++++++++--- 7 files changed, 124 insertions(+), 38 deletions(-) commit 1a43fbc399f93f33020fe545d24c68f9a39470c8 Author: Oleg Drokin Date: Wed Dec 7 17:41:34 2016 -0500 staging/lustre/ptlrpc: Move nrs_conf_fifo extern to a header This avoids having an extern definition in a C file which is bad, and also silences sparse complaint as well. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/nrs.c | 3 --- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit a6b73b7f8e53bc15454169cf9688862bb55b3085 Author: Oleg Drokin Date: Wed Dec 7 17:41:33 2016 -0500 staging/lustre: Move lov_read_and_clear_async_rc declaration Move it to obd.h, so that it's included from both the users and the actual definition, making sure they never get out of sync. This also silences a sparse warning. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 3 +++ drivers/staging/lustre/lustre/llite/vvp_internal.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 30d758ce8f29d210bced4ed20fc57630bda4e283 Author: Oleg Drokin Date: Wed Dec 7 17:41:32 2016 -0500 staging/lustre: Declare lu_context/session_tags_default Make the declaration in a header, not as an extern in a C file, that is frowned upon. This also makes sparse a little bit more happy. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 3 +++ drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) commit f62427b8590519ca6f9dd783c58927caef319200 Author: Oleg Drokin Date: Wed Dec 7 17:41:31 2016 -0500 staging/lustre/osc: extern declare osc_caches in a header This avoids frowned upon extern in the C file, and also shuts down a sparse warning of drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static? Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_internal.h | 2 ++ drivers/staging/lustre/lustre/osc/osc_request.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit d445048b4af949311657fd7cc1bbe104954beb38 Author: Oleg Drokin Date: Wed Dec 7 17:41:30 2016 -0500 staging/lustre/lov: make lov_lsm_alloc() static It's not used anywhere outside of this file. Highlighted by sparse. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6c77da5ff8dd9326fd170759b18b62b5347a0c4 Author: Oleg Drokin Date: Wed Dec 7 17:41:29 2016 -0500 staging/lustre/llite: mark ll_io_init() static It's not used anywhere out of this file. Highlighted by sparse. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1bca45860b5419f396d9cb60a603dcd59ee2ff5 Author: Oleg Drokin Date: Wed Dec 7 17:41:28 2016 -0500 staging/lustre/ldlm: Correct itree_overlap_cb return type As per interval_search() prototype, the callback should return enum, not int. This fixes correspondign sparse warning. Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c13990e35b9f053857d4ad83bf0f58e612ec414 Author: Oleg Drokin Date: Wed Dec 7 17:41:27 2016 -0500 staging/lustre/llite: move root_squash from sysfs to debugfs root_squash control got accidentally moved to sysfs instead of debugfs, and the write side of it was also broken expecting a userspace buffer. It contains both uid and gid values in a single file, so debugfs is a clear place for it. Reported-by: Al Viro Fixes: c948390f10ccc "fix inconsistencies of root squash feature" Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/lproc_llite.c | 27 +++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) commit 2fd2434c3f47da8f861b3ce43b6b2d3eb2b55ac6 Author: Kees Cook Date: Fri Dec 16 17:00:45 2016 -0800 staging: lustre: ldlm: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bf0230ea11a48ba004f3f504fc813e264233679 Author: Ander Conselvan de Oliveira Date: Mon Jan 2 15:54:41 2017 +0200 drm/i915: Initialize num_scalers for skl and glk too After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms. Fixes: 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init") Cc: Nabendu Maiti Cc: Chris Wilson (v2) Cc: Ander Conselvan de Oliveira Cc: Ander Conselvan de Oliveira Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ander Conselvan de Oliveira Tested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1483365281-10569-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_device_info.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 949a358418aae397d7cf1622aa6515eca766b9e7 Author: Liping Zhang Date: Sun Dec 25 19:58:59 2016 +0800 netfilter: nft_ct: add average bytes per packet support Similar to xt_connbytes, user can match how many average bytes per packet a connection has transferred so far. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_ct.c | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 237bab6611c607a9e63d50164609923feb8b83b3 Author: Liping Zhang Date: Sun Dec 25 19:58:58 2016 +0800 netfilter: nf_tables: add missing descriptions in nft_ct_keys We missed to add descriptions about NFT_CT_LABELS, NFT_CT_PKTS and NFT_CT_BYTES, now add it. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 3 +++ 1 file changed, 3 insertions(+) commit 9700ba805b4f58d26c4621ad6ba6b0e632e7a04b Author: Florian Westphal Date: Tue Dec 20 21:57:03 2016 +0100 netfilter: nat: merge udp and udplite helpers udplite nat was copied from udp nat, they are virtually 100% identical. Not really surprising given udplite is just udp with partial csum coverage. old: text data bss dec hex filename 11606 1457 210 13273 33d9 nf_nat.ko 330 0 2 332 14c nf_nat_proto_udp.o 276 0 2 278 116 nf_nat_proto_udplite.o new: text data bss dec hex filename 11598 1457 210 13265 33d1 nf_nat.ko 640 0 4 644 284 nf_nat_proto_udp.o Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/Makefile | 1 - net/netfilter/nf_nat_proto_udp.c | 78 ++++++++++++++++++++++++++++++------ net/netfilter/nf_nat_proto_udplite.c | 73 --------------------------------- 3 files changed, 66 insertions(+), 86 deletions(-) commit e4781421e883340b796da5a724bda7226817990b Author: Florian Westphal Date: Tue Dec 20 21:57:02 2016 +0100 netfilter: merge udp and udplite conntrack helpers udplite was copied from udp, they are virtually 100% identical. This adds udplite tracker to udp instead, removes udplite module, and then makes the udplite tracker builtin. udplite will then simply re-use udp timeout settings. It makes little sense to add separate sysctls, nowadays we have fine-grained timeout policy support via the CT target. old: text data bss dec hex filename 1633 672 0 2305 901 nf_conntrack_proto_udp.o 1756 672 0 2428 97c nf_conntrack_proto_udplite.o 69526 17937 268 87731 156b3 nf_conntrack.ko new: text data bss dec hex filename 2442 1184 0 3626 e2a nf_conntrack_proto_udp.o 68565 17721 268 86554 1521a nf_conntrack.ko Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 1 + include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 1 + include/net/netns/conntrack.h | 16 -- net/netfilter/Makefile | 1 - net/netfilter/nf_conntrack_proto_udp.c | 123 ++++++++++ net/netfilter/nf_conntrack_proto_udplite.c | 324 ------------------------- 6 files changed, 125 insertions(+), 341 deletions(-) commit c9efef7bd91ff131dc87838372c5dd40b3de9099 Author: Chris Wilson Date: Mon Jan 2 15:28:45 2017 +0000 drm/i915: Update comment in vlv_set_rps_idle() Ville explained that the wakelock was being acquired during set-idle in order to flush the voltage change from the punit. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170102152845.32352-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 337ccfce2332ecd37a793afb72da4250ed59a866 Merge: b0e159f 6b7e95d Author: Takashi Iwai Date: Tue Jan 3 11:39:30 2017 +0100 Merge branch 'for-linus' into for-next commit b0e159fe34f76abf4ae23a6c799f43b8c520695b Author: Takashi Sakamoto Date: Tue Jan 3 12:44:43 2017 +0900 ALSA: dice: ensure transmission speed for transmitted packets As of kernel 4.10, ALSA dice driver is expected to be used in default speed. In most cases, it's S400. While, IEEE 1394 specification describes the other speed such as S800. According to 'TCD30XX User Guide', its link layer controller supports several transmission speed up to S800[0]. In Dice software interface, transmission speed in output direction can be configured by asynchronous transaction to 'TX_SPEED' offset in its address space. S800 may be available. This commit improves configuration of transmission unit before starting packet streaming for this purpose. The value of 'max_speed' in 'fw_device' data structure has available maximum speed decided in bus arbitration, thus it's within capacity of the unit. [0] TCD3xx User Guide - TCAT 1394 LLC, Revision 0.9.0-41360 (TC Applied Technologies, May 6 2015) http://www.tctechnologies.tc/index.php/support/support-hardware/dice-iii-detailed-documentation Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-interface.h | 1 + sound/firewire/dice/dice-stream.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 03abd33a11e3598dffbc821b2826ffc5fb6e980f Author: Takashi Sakamoto Date: Tue Jan 3 11:36:08 2017 +0900 ALSA: oxfw: add support for Mackie Onyx 1640i As of kernel 4.10, ALSA OXFW driver has no entry for Onyx 1640i produced by Mackie (Loud Technologies). This commit supplement it. I note that there're two models produced by Mackie (Loud Technologies), which have the same name 'Onyx 1640i'. The former model based on OXFW970, the latter model based on Dice. This is probably due to low quality of communication of OXFW series. Additionally, the tester reports his or her experiences to get unexpected result at higher sampling transmission frequency as 88.2/96.0 kHz. We didn't have further investigation yet[0]. $ ./linux-firewire-utils/src/crpp < config_rom ROM header and bus information block ----------------------------------------------------------------- 400 042525ce bus_info_length 4, crc_length 37, crc 9678 404 31333934 bus_name "1394" 408 20ff5003 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 5 (64) 40c 000ff205 company_id 000ff2 | 410 00000fcf device_id 0500000fcf | EUI-64 000ff20500000fcf root directory ----------------------------------------------------------------- 414 0006c1b7 directory_length 6, crc 49591 418 03000ff2 vendor 41c 8100000a --> descriptor leaf at 444 420 17001640 model 424 81000011 --> descriptor leaf at 468 428 0c0083c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430 unit directory at 430 ----------------------------------------------------------------- 430 00040b97 directory_length 4, crc 2967 434 1200a02d specifier id: 1394 TA 438 13010001 version: AV/C 43c 17001640 model 440 81000010 --> descriptor leaf at 480 descriptor leaf at 444 ----------------------------------------------------------------- 444 0008a886 leaf_length 8, crc 43142 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 4c6f7564 "Loud" 454 20546563 " Tec" 458 686e6f6c "hnol" 45c 6f676965 "ogie" 460 7320496e "s In" 464 632e0000 "c." descriptor leaf at 468 ----------------------------------------------------------------- 468 00059fcf leaf_length 5, crc 40911 46c 00000000 textual descriptor 470 00000000 minimal ASCII 474 4f6e7978 "Onyx" 478 20313634 " 164" 47c 30690000 "0i" descriptor leaf at 480 ----------------------------------------------------------------- 480 00059fcf leaf_length 5, crc 40911 484 00000000 textual descriptor 488 00000000 minimal ASCII 48c 4f6e7978 "Onyx" 490 20313634 " 164" 494 30690000 "0i" [0]: [FFADO-user] Mackie 1640i issues (finer details) https://sourceforge.net/p/ffado/mailman/message/35229260/ Tested-by: Seth O'Bannion Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 1 + sound/firewire/oxfw/oxfw.c | 1 + 2 files changed, 2 insertions(+) commit bae3fdce06146ea98c86f4659aa3ca7bced8588e Author: Michal Wajdeczko Date: Tue Dec 20 11:55:31 2016 +0000 drm/i915/guc: Make intel_guc_recv static. This function is only used by intel_guc_send() and it doesn't need to be exposed outside of intel_uc.o file. Also when defined as static, compiler will generate smaller code. Additionally let it take guc param instead dev_priv to match function name. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Arkadiusz Hiler Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161220115531.76120-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 8 +++++--- drivers/gpu/drm/i915/intel_uc.h | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) commit a17f0cb5b9eaf8212b396d2381cf7594cd5315c7 Author: Steve Kenton Date: Mon Jan 2 13:25:34 2017 -0500 fs/udf: make #ifdef UDF_PREALLOCATE unconditional Signed-off-by: Steve Kenton Signed-off-by: Jan Kara fs/udf/inode.c | 2 -- fs/udf/udfdecl.h | 1 - 2 files changed, 3 deletions(-) commit 88b50ce3ab5af60c85905784c938a35c967addf4 Author: Deepa Dinamani Date: Mon Jan 2 19:20:55 2017 -0800 fs: udf: Replace CURRENT_TIME with current_time() CURRENT_TIME is not y2038 safe. CURRENT_TIME macro is also not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Logical Volume Integrity format is described to have the same timestamp format for "Recording Date and time" as the other [a,c,m]timestamps. The function udf_time_to_disk_format() does this conversion. Hence the timestamp is passed directly to the function and not truncated. This is as per Arnd's suggestion on the thread. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Signed-off-by: Deepa Dinamani Reviewed-by: Jan Kara Reviewed-by: Arnd Bergmann Signed-off-by: Jan Kara fs/udf/super.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 70def3e53694a65c5583fb5f411491a5074bab18 Author: Geert Uytterhoeven Date: Mon Dec 5 11:39:41 2016 +0100 ARM: shmobile: rcar-gen2: Remove unused rcar_gen2_read_mode_pins() After 1. commit 9f5ce39ddb8f68b3 ("ARM: shmobile: rcar-gen2: Obtain extal frequency from DT"), 2. commit 80951f04c3f92533 ("ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver"), 3. and handling of debug resource reset, there are no more users of rcar_gen2_read_mode_pins() left. Remove the function and its support definitions. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/rcar-gen2.h | 2 -- arch/arm/mach-shmobile/setup-rcar-gen2.c | 18 ------------------ 2 files changed, 20 deletions(-) commit 367ed998fa3e04d8bde42f431e880cd3e5922095 Author: Geert Uytterhoeven Date: Mon Dec 5 11:39:40 2016 +0100 ARM: shmobile: r8a7791: Allow booting secondary CPU cores in debug mode Now debug resource reset is handled properly, allow booting secondary CPU cores when hardware debug mode is enabled (MD21=1, SW8-4=OFF on koelsch) on legacy r8a7791. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/smp-r8a7791.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit d03c8f78d03af2a46127537dd1daa67164e53c09 Author: Geert Uytterhoeven Date: Mon Dec 5 11:39:39 2016 +0100 ARM: shmobile: apmu: Allow booting secondary CPU cores in debug mode Now debug resource reset is handled properly, allow booting secondary CPU cores when hardware debug mode is enabled (MD21=1) on SoCs using the "renesas,apmu" enable method. Signed-off-by: Geert Uytterhoeven Tested-by: Hiep Cao Minh Signed-off-by: Simon Horman arch/arm/mach-shmobile/platsmp-apmu.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 10f778a97845e8b10af8878af99c9cfe6c31baf9 Author: Geert Uytterhoeven Date: Mon Dec 5 11:39:38 2016 +0100 ARM: shmobile: apmu: Add debug resource reset for secondary CPU boot In debug mode (MD21=1), reset requests derived from power-shutoff to the AP-system CPU cores must be enabled before the AP-system CPU cores resume from power-shutoff for the first time. Else resume may fail, causing the system to hang during boot. As setting these bits is a no-op in normal mode, there's no need to check the actual state of MD21 first. Inspired by CPU-specific patches in the BSP by Hisashi Nakamura . Signed-off-by: Geert Uytterhoeven Tested-by: Hiep Cao Minh Signed-off-by: Simon Horman arch/arm/mach-shmobile/platsmp-apmu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 460d4117a4714f3e9ae600974df03632139728ec Author: Geert Uytterhoeven Date: Mon Dec 5 11:39:37 2016 +0100 ARM: shmobile: apmu: Add more register documentation Signed-off-by: Geert Uytterhoeven Tested-by: Hiep Cao Minh Signed-off-by: Simon Horman arch/arm/mach-shmobile/platsmp-apmu.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 654450baf2afba86cf328e1849ccac61ec4630af Author: Simon Horman Date: Tue Dec 20 11:32:39 2016 +0100 ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for msiof nodes Use recently added R-Car Gen 2 fallback binding for msiof nodes in DT for r8a7790 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7790 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 50a15093c6f1bf5f89b9954075b27b52c0322beb Author: Simon Horman Date: Tue Dec 20 11:32:38 2016 +0100 ARM: dts: r8a7792: Use R-Car Gen 2 fallback binding for msiof nodes Use recently added R-Car Gen 2 fallback binding for msiof nodes in DT for r8a7792 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7792 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7792.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fdda1f9e23f17effe32fd349aefab665b58b8d64 Author: Simon Horman Date: Tue Dec 20 11:32:37 2016 +0100 ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for msiof nodes Use recently added R-Car Gen 2 fallback binding for msiof nodes in DT for r8a7791 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7791 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 40a99dbb99b1a50c11b95578d7300e5756e7662f Author: Simon Horman Date: Tue Dec 13 12:45:59 2016 +0100 ARM: dts: r8a7794: Use R-Car Gen 2 fallback binding for iic nodes Use recently added R-Car Gen 2 fallback binding for iic nodes in DT for r8a7794 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7794 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 21b3f9862943acd6ec92ad02d36ffdfe353e6b66 Author: Simon Horman Date: Tue Dec 13 12:45:58 2016 +0100 ARM: dts: r8a7793: Use R-Car Gen 2 fallback binding for iic nodes Use recently added R-Car Gen 2 fallback binding for iic nodes in DT for r8a7793 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7793 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8d76bf8a6a6b3201b309faa623842ba3ec426b7a Author: Simon Horman Date: Tue Dec 13 12:45:57 2016 +0100 ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for iic nodes Use recently added R-Car Gen 2 fallback binding for iic nodes in DT for r8a7791 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7791 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b8075eea36546f55aca0d645561b6713d9ae562e Author: Simon Horman Date: Tue Dec 13 12:45:56 2016 +0100 ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for iic nodes Use recently added R-Car Gen 2 fallback binding for iic nodes in DT for r8a7790 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7790 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5e6173897c03f13366edefca98dd4712d3ddb0d4 Author: Simon Horman Date: Tue Dec 13 12:45:53 2016 +0100 ARM: dts: r8a7794: Use R-Car Gen 2 fallback binding for i2c nodes Use recently added R-Car Gen 2 fallback binding for i2c nodes in DT for r8a7794 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7794 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b3bb35a862007712aa277bfa94bdf80be67772da Author: Simon Horman Date: Tue Dec 13 12:45:52 2016 +0100 ARM: dts: r8a7793: Use R-Car Gen 2 fallback binding for i2c nodes Use recently added R-Car Gen 2 fallback binding for i2c nodes in DT for r8a7793 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7793 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cfcb93b33f35879cfe06add3859fd869e3d1c9e2 Author: Simon Horman Date: Tue Dec 13 12:45:51 2016 +0100 ARM: dts: r8a7792: Use R-Car Gen 2 fallback binding for i2c nodes Use recently added R-Car Gen 2 fallback binding for i2c nodes in DT for r8a7792 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7792 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7792.dtsi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit c7407ca7ef61ff91cfa3c130de59061171102cf3 Author: Simon Horman Date: Tue Dec 13 12:45:50 2016 +0100 ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for i2c nodes Use recently added R-Car Gen 2 fallback binding for i2c nodes in DT for r8a7791 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7791 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 82f8bfbef9864f6165b7741e251bf74827079604 Author: Simon Horman Date: Tue Dec 13 12:45:49 2016 +0100 ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for i2c nodes Use recently added R-Car Gen 2 fallback binding for i2c nodes in DT for r8a7790 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7790 and the fallback binding for R-Car Gen 2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eb6f2adfa5ad2b3494d9c751b1e1a21356ad7b62 Author: Simon Horman Date: Tue Dec 13 12:45:48 2016 +0100 ARM: dts: r8a7778: Use R-Car Gen 1 fallback binding for i2c nodes Use recently added R-Car Gen 1 fallback binding for i2c nodes in DT for r8a7778 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7778 and the fallback binding for R-Car Gen 1. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7778.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 137d27f10f638781d5487b44302c2a2ee5d12655 Author: Simon Horman Date: Tue Dec 13 12:45:47 2016 +0100 ARM: dts: r8a7779: Use R-Car Gen 1 fallback binding for i2c nodes Use recently added R-Car Gen 1 fallback binding for i2c nodes in DT for r8a7779 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7779 and the fallback binding for R-Car Gen 1. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7779.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f81c163b38bedd95c75ab45929d190106166db11 Author: Simon Horman Date: Thu Dec 1 15:25:53 2016 +0100 ARM: dts: r8a7794: Use renesas,rcar-gen2-usb-phy fallback binding A fallback binding for the Renesas R-Car Gen2 PHY driver was added by commit 7777cb8ba08d ("phy: rcar-gen2: add fallback binding"). This patch makes use of this binding in the DT for the r8a7794 SoC. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c39a6e76db7e1bc87b95f3dae7f7e4405f2854eb Author: Simon Horman Date: Thu Dec 1 15:25:52 2016 +0100 ARM: dts: r8a7791: Use renesas,rcar-gen2-usb-phy fallback binding A fallback binding for the Renesas R-Car Gen2 PHY driver was added by commit 7777cb8ba08d ("phy: rcar-gen2: add fallback binding"). This patch makes use of this binding in the DT for the r8a7791 SoC. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b0922c55e17b11e41f27c7730804623414bcf19 Author: Simon Horman Date: Thu Dec 1 15:25:51 2016 +0100 ARM: dts: r8a7790: Use renesas,rcar-gen2-usb-phy fallback binding A fallback binding for the Renesas R-Car Gen2 PHY driver was added by commit 7777cb8ba08d ("phy: rcar-gen2: add fallback binding"). This patch makes use of this binding in the DT for the r8a7790 SoC. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c20839a36132462496f939b0d13afee009c9a547 Author: Geert Uytterhoeven Date: Thu Nov 17 19:37:46 2016 +0100 ARM: dts: gose: Add da9063 PMIC device node for system restart Enable i2c6, and add a device node for the da9063 PMIC, with subnodes for rtc and wdt. Regulator support is not yet included. This allows the system to be restarted when the watchdog timer times out, or when a system restart is requested. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5ff43b37ce967ffbcc4a93c76a9b270e441a72e6 Author: Simon Horman Date: Thu Nov 24 21:15:14 2016 +0100 ARM: dts: sh73a0: Use SoC-specific compat string for mmcif Use the SoC-specific compat string for mmcif in DT for the sh73a0 SoC. This is in keeping with the use of compat strings for mmcif for other Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm/boot/dts/sh73a0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9be04fe05ee0a727471be10e1ec7c76d879b103 Author: Simon Horman Date: Thu Nov 24 21:15:13 2016 +0100 ARM: dts: r8a7778: Use SoC-specific compat string for mmcif Use the SoC-specific compat string for mmcif in DT for the r8a7778 SoC. This is in keeping with the use of compat strings for mmcif for other Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7778.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b0161743e194ab558143fdeea03243e35a5297f Author: Simon Horman Date: Thu Nov 24 21:15:12 2016 +0100 ARM: dts: r8a73a4: Use SoC-specific compat string for mmcif Use the SoC-specific compat string for mmcif in DT for the r8a73a4 SoC. This is in keeping with the use of compat strings for mmcif for other Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm/boot/dts/r8a73a4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8916c7b58319fa27eae25c0c9b9a4cd68b9b30bd Author: Geert Uytterhoeven Date: Fri Nov 18 11:37:43 2016 +0100 ARM: dts: r8a7745: Add device node for PRR Add a device node for the Product Register, which provides SoC product and revision information. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 11d4407e939e74e89a29df88b1557b59ece9e9f9 Author: Geert Uytterhoeven Date: Fri Nov 18 11:37:42 2016 +0100 ARM: dts: r8a7743: Add device node for PRR Add a device node for the Product Register, which provides SoC product and revision information. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 13ae6ac495846b54ad47d71075bbaf9d8224d356 Author: Geert Uytterhoeven Date: Fri Nov 18 11:24:23 2016 +0100 ARM: dts: r8a7745: Move RST node before SYSC node To preserve both alphabetical (label) and numerical ordering (unit address). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a97f1dfb7f6eec1998d51e7335e265be5c6314a1 Author: Geert Uytterhoeven Date: Fri Nov 18 11:24:22 2016 +0100 ARM: dts: r8a7743: Move RST node before SYSC node To preserve both alphabetical (label) and numerical ordering (unit address). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e37278d83e348eb53029452e65892780359b6bea Author: Simon Horman Date: Tue Dec 6 14:32:53 2016 +0100 ARM: multi_v7_defconfig: Enable r8a774[35] SoCs Enable recently added r8a7743 (RZ/G1M) and r8a7745 (RZ/G1E) SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit d234e29dae04b224a63e39bc29938fa77819b3f1 Author: Simon Horman Date: Tue Dec 6 14:32:52 2016 +0100 ARM: shmobile: defconfig: Enable r8a774[35] SoCs Enable recently added r8a7743 (RZ/G1M) and r8a7745 (RZ/G1E) SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm/configs/shmobile_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 77af670a7698bbc4dc9fd8bbd553b33bfb16b68a Author: Niklas Söderlund Date: Fri Nov 18 16:00:45 2016 +0100 ARM: shmobile: defconfig: Enable CMA for DMA To be able to use VIN with larger frame sizes CMA memory are needed for DMA. If this is not enabled trying to capture large frames can result in errors such as: rcar-vin e6ef0000.video: dma_alloc_coherent of size 8388608 failed A CMA area of 64MB are needed for v4l2-compliance to pass on all formats on the largest possible frame size of 2048x2048. Signed-off-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 1682a9c5694d228041dc7ff59f49427c83920675 Author: Niklas Söderlund Date: Fri Nov 18 16:00:44 2016 +0100 ARM: shmobile: defconfig: Enable CONFIG_VIDEO_ADV7604 The adv7612 is used on Gen2 boards (Lager, Koelsch and Gose) for HDMI input. Enable support for this chip in shmobile_defconfig. Signed-off-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 1 + 1 file changed, 1 insertion(+) commit 8b51f97138ca22b6ae728a434215a05b7e5bbc63 Author: Simon Horman Date: Tue Dec 20 11:32:36 2016 +0100 arm64: dts: r8a7796: Use R-Car Gen 3 fallback binding for msiof nodes Use recently added R-Car Gen 3 fallback binding for msiof nodes in DT for r8a7796 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7796 and the fallback binding for R-Car Gen 3. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7796.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit dc36965a890515753671628cdf25365ee45e6206 Author: Laurent Pinchart Date: Thu Dec 15 17:24:04 2016 +0100 arm64: dts: r8a7796: salvator-x: Enable EthernetAVB Signed-off-by: Laurent Pinchart [geert: Add pinctrl] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 8e8b9eaef8fb05d9707087ea82c1c928317ac9f8 Author: Laurent Pinchart Date: Tue Sep 6 11:25:51 2016 +0300 arm64: dts: renesas: r8a7796: Add EthernetAVB instance Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit d78fcc47e6814605eb90cd4ab1d79f9609ff32a4 Author: Takeshi Kihara Date: Thu Dec 15 16:31:29 2016 +0100 arm64: dts: r8a7796: salvator-x: Update memory node to 4 GiB map This patch updates memory region: - After changes, the new map of the Salvator-X board on R8A7796 SoC Bank0: 2GiB RAM : 0x000048000000 -> 0x000bfffffff Bank1: 2GiB RAM : 0x000600000000 -> 0x0067fffffff - Before changes, the old map looked like this: Bank0: 2GiB RAM : 0x000048000000 -> 0x000bfffffff Signed-off-by: Takeshi Kihara [geert: Correct size of old map] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 5553e2196229501346f262a9ebdc4e4ed74ff45c Author: Simon Horman Date: Tue Dec 13 12:45:55 2016 +0100 arm64: dts: r8a7796: Use R-Car Gen 3 fallback binding for i2c nodes Use recently added R-Car Gen 3 fallback binding for i2c nodes in DT for r8a7796 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7796 and the fallback binding for R-Car Gen 3. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7796.dtsi | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit d8ebefc9ace7c9810fd433e6ff18559e7c2f228a Author: Simon Horman Date: Tue Dec 13 12:45:54 2016 +0100 arm64: dts: r8a7795: Use R-Car Gen 3 fallback binding for i2c nodes Use recently added R-Car Gen 3 fallback binding for i2c nodes in DT for r8a7795 SoC. This has no run-time effect for the current driver as the initialisation sequence is the same for the SoC-specific binding for r8a7795 and the fallback binding for R-Car Gen 3. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795.dtsi | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit fb04f4b8bd7ecf337a8cbebe176e0bbdd954ba31 Author: Simon Horman Date: Thu Dec 8 16:29:29 2016 +0100 arm64: dts: r8a7795: Use Gen 3 fallback compat string for PCIE Use recently added en 3 fallback compat string for PCIE in r8a7795 DT. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ad5805f3aa07c6eb6ef2578ee9b5f8ca9b0c28f2 Author: Kuninori Morimoto Date: Tue Dec 6 03:54:58 2016 +0000 arm64: dts: r8a7795: add sound MIX support This patch adds MIX (= Mixer) support. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 1 + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 7 +++++++ 2 files changed, 8 insertions(+) commit c9293d784d32c868e83079bb6d1e26f316c4148d Author: Kuninori Morimoto Date: Tue Dec 6 03:54:21 2016 +0000 arm64: dts: r8a7795: add sound CTU support This patch adds CTU (= Channel Transfer Unit) support which is needed to sound mixing. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 1 + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 6695092b34a3edd69b617e86bf34236ee8f2dbad Author: Simon Horman Date: Thu Dec 1 15:25:54 2016 +0100 arm64: dts: r8a7795: Use renesas,rcar-gen3-usb2-phy fallback binding A fallback binding for the Renesas R-Car Gen3 for USB2.0 PHY driver was added by commit cde7bc367f09 ("phy: rcar-gen3-usb2: add fallback binding"). This patch makes use of this binding in the DT for the r8a7795 SoC. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6be91f865660d56081fe67e969a4adf71c24cada Author: Geert Uytterhoeven Date: Wed Aug 31 11:17:34 2016 +0200 arm64: renesas: r8a7796/salvator-x: Add board part number to DT bindings Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4176d7c7c03ed23d8335465f309b44519fb6ad5 Author: Chris Paterson Date: Thu Nov 24 16:13:41 2016 +0000 arm64: dts: r8a7796: Add CAN FD support Adds CAN FD controller node for r8a7796. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Acked-by: Marc Kleine-Budde Acked-by: Rob Herring Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 909c1625241515aa2a5027a24e17d77b54e8ce4b Author: Chris Paterson Date: Thu Nov 24 16:13:40 2016 +0000 arm64: dts: r8a7796: Add CAN support Adds CAN controller nodes for r8a7796. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Acked-by: Marc Kleine-Budde Acked-by: Rob Herring Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 8a6de0453954095c269efc5054da53c73bfc8298 Author: Chris Paterson Date: Thu Nov 24 16:13:39 2016 +0000 arm64: dts: r8a7796: Add CAN external clock support Adds external CAN clock node for r8a7796. This clock can be used as fCAN clock of CAN and CAN FD controller. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Acked-by: Marc Kleine-Budde Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 80fab06e258da76232356d8a0b390d4bc25e6917 Author: Geert Uytterhoeven Date: Mon Nov 21 18:26:53 2016 +0100 arm64: dts: r8a7796: Add all MSIOF nodes Add the device nodes for all MSIOF SPI controllers. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit b631436ec4af4c71937d533bc5cd27716b542c92 Author: Bartosz Golaszewski Date: Fri Nov 25 10:13:02 2016 +0100 ARM: davinci_all_defconfig: enable dumb vga-dac drm bridge This enables the dumb-vga-dac driver by default for davinci boards. The driver is needed for tilcdc support on da850-lcdk board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6ac4c1ad2eda7f0e8475c85b2647b4b6eabfcc7b Author: Linus Walleij Date: Tue Jan 3 09:18:58 2017 +0100 pinctrl: amd: fix compilation warning 3bfd44306c65 ("pinctrl: amd: Add support for additional GPIO") created the following warning: drivers/pinctrl/pinctrl-amd.c: In function 'amd_gpio_dbg_show': drivers/pinctrl/pinctrl-amd.c:210:3: warning: 'pin_num' may be used uninitialized in this function [-Wmaybe-uninitialized] for (; i < pin_num; i++) { ^ drivers/pinctrl/pinctrl-amd.c:172:21: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized] unsigned int bank, i, pin_num; ^ Fix this by adding a guarding default case for illegal bank numbers. Cc: S-k Shyam-sundar Cc: Nehal Shah Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 3 +++ 1 file changed, 3 insertions(+) commit 3fd6d6ad73af90522321451a2d10b0a8967d47d1 Author: Gary Bisson Date: Mon Jan 2 19:20:22 2017 +0100 pinctrl: imx: use generic pinmux helpers for managing functions Now using function_desc structure instead of imx_pmx_func. Also leveraging generic functions to retrieve functions count/name/groups. The imx_free_funcs function can be removed since it is now handled by the core driver during unregister. Signed-off-by: Gary Bisson Signed-off-by: Linus Walleij drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx.c | 96 ++++++--------------------------- drivers/pinctrl/freescale/pinctrl-imx.h | 14 ----- 3 files changed, 18 insertions(+), 94 deletions(-) commit e566fc11ea76ec10a42fc92c5561ace4479770dd Author: Gary Bisson Date: Mon Jan 2 19:20:21 2017 +0100 pinctrl: imx: use generic pinctrl helpers for managing groups Now using group_desc structure instead of imx_pin_group. Also leveraging generic functions to retrieve groups count/name/pins. The imx_free_pingroups function can be removed since it is now handled by the core driver during unregister. Finally the device tree parsing is moved after the pinctrl driver registration since this latter initializes the radix trees. Signed-off-by: Gary Bisson Signed-off-by: Linus Walleij drivers/pinctrl/freescale/Kconfig | 1 + drivers/pinctrl/freescale/pinctrl-imx.c | 190 +++++++++++--------------------- drivers/pinctrl/freescale/pinctrl-imx.h | 19 +--- 3 files changed, 69 insertions(+), 141 deletions(-) commit 824e4d954dfbf7ccb22340d4b56db64f9378d846 Author: Linus Walleij Date: Mon Jan 2 09:42:28 2017 +0100 pinctrl: qcom: msm8660: rename some SDC1->SDC4 These four pins are for SDC4, not SDC1. They are grouped for SDC4 later in the file so this must be a typo. Reviewed-by: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm8660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 571aec4df5b72a80f80d1e524da8fbd7ff525c98 Author: Tony Lindgren Date: Tue Dec 27 09:20:03 2016 -0800 pinctrl: single: Use generic pinmux helpers for managing functions We can now drop the driver specific code for managing functions. Signed-off-by: Tony Lindgren [Replaces GENERIC_PINMUX with GENERIC_PINMUX_FUNCTIONS] Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-single.c | 134 ++++++--------------------------------- 2 files changed, 19 insertions(+), 117 deletions(-) commit caeb774ea3b1bc25dc2f24681c27543aba6ca7ae Author: Tony Lindgren Date: Tue Dec 27 09:20:02 2016 -0800 pinctrl: single: Use generic pinctrl helpers for managing groups We can now drop the driver specific code for managing groups. Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-single.c | 156 +++------------------------------------ 2 files changed, 12 insertions(+), 146 deletions(-) commit a76edc89b100e4fefb2a5c00cd8cd557437659e7 Author: Tony Lindgren Date: Tue Dec 27 09:20:01 2016 -0800 pinctrl: core: Add generic pinctrl functions for managing groups We can add generic helpers for function handling for cases where the pin controller driver does not need to use static arrays. Signed-off-by: Tony Lindgren [Renamed the Kconfig item and moved things around] Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 4 ++ drivers/pinctrl/core.c | 4 ++ drivers/pinctrl/core.h | 6 ++ drivers/pinctrl/pinmux.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/pinctrl/pinmux.h | 56 +++++++++++++++ 5 files changed, 243 insertions(+) commit c033a718f615b6b3ddc83ce3e0a217c30bd09cb5 Author: Linus Walleij Date: Fri Dec 30 15:04:43 2016 +0100 pinctrl: stricten up generic group code Rename the symbol PINCTRL_GENERIC to PINCTRL_GENERIC_GROUPS since it all pertains to groups. Replace everywhere. ifdef out the radix tree and the struct when not using the generic groups. Cc: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/core.c | 6 ++++-- drivers/pinctrl/core.h | 32 +++++++++++++++++--------------- 3 files changed, 22 insertions(+), 18 deletions(-) commit c7059c5ac70aea194b07b2d811df433eb0ca81b5 Author: Tony Lindgren Date: Tue Dec 27 09:20:00 2016 -0800 pinctrl: core: Add generic pinctrl functions for managing groups We can add generic helpers for pin group handling for cases where the pin controller driver does not need to use static arrays. Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 3 + drivers/pinctrl/core.c | 178 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/pinctrl/core.h | 47 +++++++++++++ 3 files changed, 228 insertions(+) commit 2d22e5b006d1c37dc4df012bd13b75e581fa6aa2 Author: Linus Walleij Date: Fri Dec 30 14:44:18 2016 +0100 pinctrl: add some comments to the hog/late init code It confused me a bit so it may confuse others. Make it crystal clear what is going on here for any future readers. Cc: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 99e4f67508e1dd51e21ebae2150c6e4f4eae068b Author: Tony Lindgren Date: Tue Dec 27 09:19:59 2016 -0800 pinctrl: core: Use delayed work for hogs Having the pin control framework call pin controller functions before it's probe has finished is not nice as the pin controller device driver does not yet have struct pinctrl_dev handle. Let's fix this issue by adding deferred work for late init. This is needed to be able to add pinctrl generic helper functions that expect to know struct pinctrl_dev handle. Note that we now need to call create_pinctrl() directly as we don't want to add the pin controller to the list of controllers until the hogs are claimed. We also need to pass the pinctrl_dev to the device tree parser functions as they otherwise won't find the right controller at this point. Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 90 ++++++++++++++++++++++++++++---------------- drivers/pinctrl/core.h | 2 + drivers/pinctrl/devicetree.c | 28 +++++++++++--- drivers/pinctrl/devicetree.h | 12 +++++- 4 files changed, 93 insertions(+), 39 deletions(-) commit eb2e2a816834cab13311d627844d77bb22bb5787 Author: Baoyou Xie Date: Fri Dec 2 13:52:36 2016 +0800 arm64: dts: zx: support cpu-freq for zx296718 This patch adds the CPU clock phandle in CPU's node and uses operating-points-v2 to register operating points. So it can be used by cpufreq-dt driver. Signed-off-by: Baoyou Xie Acked-by: Viresh Kumar Reviewed-by: Jun Nie Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718.dtsi | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit cbc3ad1317010b538401165c3679b9d2df4edbc9 Author: Jagan Teki Date: Mon Jan 2 14:40:20 2017 +0100 ARM: dts: imx6ul: Add Engicam Is.IoT MX6UL initial support Is.IoT MX6UL modules are system on module solutions manufactured by Engicam for IOT connectivity applications with following characteristics: CPU NXP i.MX6UL (G2) Cortex-A7@528 MHz RAM Up to 512 MB LvDDR3@800MT/s NAND 256MB (option) eMMC 4GB (option) LCD 18 bit parallel BT 2.1+EDR,Bluetooth 3.0, Bluetooth 4.1 (Bluetooth low energy) WLAN IEEE 802.11 b/g/n (single stream n) Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6ul-isiot.dts | 119 +++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) commit 84ebdaa25569dbc8f17c541c13754e14dca4a5de Author: Jagan Teki Date: Mon Jan 2 14:40:19 2017 +0100 ARM: dts: imx6q-icore-rqs: Update model to support Dual SOM Engicam i.CoreM6 Dual and Quad SOM's use same dts file, hence update model name to add Dual and also added full mode decsription. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-icore-rqs.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a9caba55a61b7cd9995d4ecc57f844342cdfbcf Author: Jagan Teki Date: Mon Jan 2 14:40:18 2017 +0100 ARM: dts: imx6dl: Add Engicam i.CoreM6 DualLite/Solo RQS initial support i.CoreM6 DualLite/Solo modules are system on module solutions manufactured by Engicam with following characteristics: CPU NXP i.MX6 DL, 800MHz RAM 1GB, 32, 64 bit, DDR3-800/1066 NAND SLC,512MB Power supply Single 5V MAX LCD RES FULLHD and more info at http://www.engicam.com/en/products/embedded/som/standard/i-core-rqs-m6s-dl-d-q Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6dl-icore-rqs.dts | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit c1cbd60fe071e88c12b5227cf9321b0d7c573253 Author: Fabio Estevam Date: Sat Dec 31 15:15:59 2016 -0200 ARM: imx_v6_v7_defconfig: Select wireless extensions option Select CONFIG_CFG80211_WEXT so that wireless can work out of the box when using userspace tools such as 'iwconfig'. Generated by manually selecting CONFIG_CFG80211_WEXT and then running: make savedefconfig cp defconfig arch/arm/configs/imx_v6_v7_defconfig , which results in additional cleanup. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c05f0f2e50662927cdec0052a4eb71a1a4b2587 Author: Meng Yi Date: Tue Dec 20 14:03:07 2016 +0800 arm64: dts: ls2080a-rdb: remove disable status of pca9547 pca9547 won't probed since its status property is disabled. while there are devices connected to it, we need remove status property to let ds3232 and adt7461 probed correctly. Signed-off-by: Meng Yi Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts | 1 - 1 file changed, 1 deletion(-) commit 27958ccdf29e9971732e02494b48be54b0691269 Author: Fabio Estevam Date: Fri Dec 30 16:42:58 2016 -0200 ARM: dts: imx: Remove unexistant property Property 'anatop-enable-bit' does not exist, so just remove it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 1 - arch/arm/boot/dts/imx7s.dtsi | 1 - 2 files changed, 2 deletions(-) commit 5fdb98dcfb0221f488dd238570933fd3dcfae031 Author: Fabio Estevam Date: Fri Dec 30 09:33:33 2016 -0200 ARM: mach-mx27_3ds: Remove camera support Since commit 6b879edf75b316 ("[media] staging/media: remove deprecated mx2 driver") the mx2 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx27_3ds.c | 107 -------------------------------------- 1 file changed, 107 deletions(-) commit 790e383dd7ab8fdb4d2a0591294a5f3c41efedb1 Author: Fabio Estevam Date: Fri Dec 30 09:33:32 2016 -0200 ARM: mach-pcm037: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-pcm037.c | 115 ---------------------------------------- 1 file changed, 115 deletions(-) commit cc7969a189b1b975ca5ce914cf8bb9925b6a838d Author: Fabio Estevam Date: Fri Dec 30 09:33:31 2016 -0200 ARM: mach-mx35_3ds: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx35_3ds.c | 103 -------------------------------------- 1 file changed, 103 deletions(-) commit 9eba4b8e595496f2fb429d7c045fdbcff43511f0 Author: Fabio Estevam Date: Fri Dec 30 09:33:30 2016 -0200 ARM: mx31moboard-smartbot: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mx31moboard-smartbot.c | 74 -------------------------------- 1 file changed, 74 deletions(-) commit a20bb25fa2dcbb53ca2956b3cd78366f350af8ae Author: Fabio Estevam Date: Fri Dec 30 09:33:29 2016 -0200 ARM: mx31moboard-marxbot: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mx31moboard-marxbot.c | 92 --------------------------------- 1 file changed, 92 deletions(-) commit 7b239307db60011afe9e9799fd420b58584defb1 Author: Fabio Estevam Date: Fri Dec 30 09:33:28 2016 -0200 ARM: mach-mx31_3ds: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Tested-by: Magnus Lilja Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31_3ds.c | 160 -------------------------------------- 1 file changed, 160 deletions(-) commit 88b00d2d78ad0581aa36944a69279d83d660c4f3 Author: Kevin Hilman Date: Wed Dec 7 11:31:35 2016 -0800 ARM: davinci_all_defconfig: enable video capture as modules Enable media support and V4L2 capture, along with video decoders used on da850 platforms. Tested on da850-lcdk. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 276b0046ff7765c1d42ed48c67b4b5f3b50ea461 Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:51 2016 +0100 dmaengine: stm32-dma: Add max_burst support This patch sets the max_burst value supported by the STM32 DMA Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 2 ++ 1 file changed, 2 insertions(+) commit dc808675104b920f2be1ac4bf1e9aa57680f0699 Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:50 2016 +0100 dmaengine: stm32-dma: Add synchronization support Implement the new device_synchronize() callback to allow proper synchronization when stopping a channel. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2b12c5580e0a4c0ffd513d1522dd39b2464fb207 Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:48 2016 +0100 dmaengine: stm32-dma: Fix residue computation issue in cyclic mode This patch resolves the residue computation issue detected in cyclic mode. Now, in cyclic mode, we increment next_sg variable as soon as a period is transferred instead of after pushing a new sg request. Then, we take into account that after transferring a complete buffer, the next_sg variable is equal to 0. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 8d1b76f031ce60c50d03674e6d1db0c5e5f55945 Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:47 2016 +0100 dmaengine: stm32-dma: Rework starting transfer management This patch reworks the way to manage transfer starting. Now, starting DMA is only allowed when the channel is not busy. Then, stm32_dma_start_transfer is declared as void. At least, after each transfer completion, we start the next transfer if a new descriptor as been queued in the issued list during an ongoing transfer. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 16545502d70641af0fc4d2cc0b2789cf27d9ca9d Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:45 2016 +0100 dt-bindings: stm32-dma: Fix typo regarding DMA client binding Only four cells are required for dma client binding not five. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/stm32-dma.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ddf9bd4089b549ff7be3f4d0dbf19d4b9267d679 Author: M'boumba Cedric Madianga Date: Tue Dec 13 14:40:44 2016 +0100 dmaengine: stm32-dma: Fix typo in Kconfig As STM32 DMA driver is only used as buit-in driver, it couldn't be used as module. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57707a9a7780fab426b8ae9b4c7b65b912a748b3 Author: Bob Moore Date: Wed Dec 28 15:29:28 2016 +0800 ACPICA: Resources: Not a valid resource if buffer length too long ACPICA commit 9f76de2d249b18804e35fb55d14b1c2604d627a1 ACPICA commit b2e89d72ef1e9deefd63c3fd1dee90f893575b3a ACPICA commit 23b5bbe6d78afd3c5abf3adb91a1b098a3000b2e The declared buffer length must be the same as the length of the byte initializer list, otherwise not a valid resource descriptor. Link: https://github.com/acpica/acpica/commit/9f76de2d Link: https://github.com/acpica/acpica/commit/b2e89d72 Link: https://github.com/acpica/acpica/commit/23b5bbe6 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utresrc.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7225d0467c59e55566df396d6ecd5baf26ef3d9b Author: Bob Moore Date: Wed Dec 28 15:29:22 2016 +0800 ACPICA: Utilities: Update debug output ACPICA commit 082b5b3ee31f74735e166858eeda025288604a5a Enhancement of miscellaneous debug output. Link: https://github.com/acpica/acpica/commit/082b5b3e Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utdecode.c | 4 ++-- drivers/acpi/acpica/utdelete.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit a654b8ca6d28736995de767ba62e801fd806a3b2 Author: David E. Box Date: Wed Dec 28 15:29:17 2016 +0800 ACPICA: Disassembler: Add Switch/Case disassembly support ACPICA commit 0f6cc80e8af519a3c31184367b0a9be7a399cf53 iasl compiles Switch/Case statements into a single iteration While loop with If/Else statements. This patch adds support to recognize this generated compiler output and disassemble it back to the original Switch statement. Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/0f6cc80e Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 55333089390909f3aee73764836bc85ba18e6b4e Author: Lv Zheng Date: Wed Dec 28 15:29:10 2016 +0800 ACPICA: EFI: Add efihello demo application ACPICA commit 3fcc59f4755607dd066ac8ef869f0aa95e871b84 This patch adds a demo EFI application for stdin/stdout testing. This utility can be used to narrow down root causes of porting issues. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/3fcc59f4 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0822d4f4f8db98c4619e6136fc375d4324eff788 Author: Lv Zheng Date: Wed Dec 28 15:29:03 2016 +0800 ACPICA: MSVC: Fix MSVC6 build issues ACPICA commit fa0680030a2969e1085563da633713e1c321637c Build environment has changed because of new improvements: 1. New files are split 2. New inclusion order This patch updates MSVC project files accordingly. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/fa068003 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23741569dc31052c786621db276779e0ed431e62 Author: Colin Ian King Date: Wed Dec 28 15:28:56 2016 +0800 ACPICA: Linux-specific header: Add support for s390x compilation ACPICA commit ecac9504e32d3b501c8cb021afb253b4a83fc82f Adds s390x as a 64-bit architecture. Link: https://github.com/acpica/acpica/commit/ecac9504 Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/platform/aclinux.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0fc5e8f4e4b33ddfa1d1d673fcd420d6e13eb076 Author: Lv Zheng Date: Wed Dec 28 15:28:49 2016 +0800 ACPICA: Hardware: Add sleep register hooks ACPICA commit ba665dc8e20d9f7730466a659564dd6c557a6cbc In Linux, para-virtualization implmentation hooks critical register writes to prevent real hardware operations. This increases divergences when the sleep registers are cracked in Linux resident ACPICA. This patch tries to introduce a single OSL to reduce the divergences. Link: https://github.com/acpica/acpica/commit/ba665dc8 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwesleep.c | 35 ++++++++++------------ drivers/acpi/acpica/hwsleep.c | 11 +++---- drivers/acpi/osl.c | 27 +++++++++++++++-- include/acpi/acexcep.h | 9 ++---- include/acpi/acpiosxf.h | 4 +++ .../acpi/os_specific/service_layers/osunixxf.c | 22 ++++++++++++++ 6 files changed, 76 insertions(+), 32 deletions(-) commit fcfb45531d7ef71a19caaa0a983611ca57ec04fe Author: Bob Moore Date: Wed Dec 28 15:28:43 2016 +0800 ACPICA: Macro header: Fix some typos in comments ACPICA commit efc97d1d209947d6990ec81a192c6b2589d3e368 No functional change. Link: https://github.com/acpica/acpica/commit/efc97d1 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acmacros.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 04cf05379972644209a94dc524d619e4936ad9c8 Author: Lv Zheng Date: Wed Dec 28 15:28:36 2016 +0800 ACPICA: Hardware: Sort access bit width algorithm ACPICA commit 365b321a31cb701957c055cae2d2161577147252 GAS can be in register or register region format, so we need to improve our "register" format detection code in order not to regress. Such detection may be still experimental, and is generated according to the current known facts. Link: https://github.com/acpica/acpica/commit/365b321a Link: https://bugzilla.kernel.org/show_bug.cgi?id=151501 Reported-and-tested-by: Andrey Skvortsov Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwregs.c | 79 ++++++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 22 deletions(-) commit cc573b97c89e5262d5404bc515a4c1e7eb364fff Author: Lv Zheng Date: Wed Dec 28 15:28:29 2016 +0800 ACPICA: Utilities: Add power of two rounding support ACPICA commit cbb0294649cbd7e8bd6107e4329461a6a7a0d967 This patch adds power of two rounding support up to 32 bits. The result of the shift operations rearching to the boundary of the cpu word is unpredicatable, so 64-bit roundings are not supported in order to make sure no rounded shift-overs. This support may not be performance friendly, so the APIs might be overridden by the hosts implementations with ACPI_USE_NATIVE_BIT_FINDER defined. Link: https://github.com/acpica/acpica/commit/cbb02946 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acmacros.h | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit dc4c7376657573a73e75df2d7b094ae40a859f98 Author: Lv Zheng Date: Wed Dec 28 15:28:23 2016 +0800 ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write() ACPICA commit 1ecab20bbe69a176dfb6da7210fe77aa6b3ad680 This patch adds access_width/bit_offset support in acpi_hw_write(). Link: https://github.com/acpica/acpica/commit/1ecab20b Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwregs.c | 62 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 9 deletions(-) commit 123a1577b79f3eef104dc58c6ff281d5e3317d1f Author: Lv Zheng Date: Wed Dec 28 15:28:14 2016 +0800 ACPICA: Hardware: Remove bit_offset masking support ACPICA commit bc7c5291865e099ce01f345d0265f0eba6997e23 This linuxized ACPICA commit is a back port result of the following Linux commit: Commit c3bc26d4b4e36f0dc458eea8b1f722d8a8d9addd Subject: ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in acpi_hw_read() The commit was in ACPICA and Linux upstream, after reversion and re-integration, it is designed not to do bit_offset masking (bit_offset is only used to determine the boundary of the register) inside of the ACPICA APIs, but let the callers to do that as: 1. Register can have different masking schemes (W1C, W0C); 2. Normally a mask value will be provided for region format GAS. So actually the callers are the only ones having the knowledge of masking the register values. Suggested by Bob Moore, Fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/bc7c5291 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwregs.c | 14 -------------- 1 file changed, 14 deletions(-) commit 703ecd220d57247360f64ae0c5a08d1f2355794a Author: Lv Zheng Date: Wed Dec 28 15:28:07 2016 +0800 ACPICA: Debugger: Rename debugger OSL names ACPICA commit e76eb8b36ace880e4d475880db1128a206e57b6f This linuxized ACPICA commit is a back port result of the following linux commit: Commit: f8d31489629c125806ce4bf587c0c5c284d6d113 Subject: ACPICA: Debugger: Convert some mechanisms to OSPM specific During the back porting, it is requested by ACPICA to use expected OSL names. Suggested by Bob Moore, Fixed by Lv Zheng. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/e76eb8b3 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbxface.c | 4 ++-- include/acpi/acpiosxf.h | 8 ++++---- include/acpi/platform/aclinux.h | 4 ++-- include/acpi/platform/aclinuxex.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) commit 3289025aedc018f8fd9d0e37fb9efa0c6d531ffa Author: Santosh Shilimkar Date: Mon Jul 4 22:35:15 2016 -0700 RDS: add receive message trace used by application Socket option to tap receive path latency in various stages in nano seconds. It can be enabled on selective sockets using using SO_RDS_MSG_RXPATH_LATENCY socket option. RDS will return the data to application with RDS_CMSG_RXPATH_LATENCY in defined format. Scope is left to add more trace points for future without need of change in the interface. Reviewed-by: Sowmini Varadhan Signed-off-by: Santosh Shilimkar include/uapi/linux/rds.h | 33 +++++++++++++++++++++++++++++++++ net/rds/af_rds.c | 28 ++++++++++++++++++++++++++++ net/rds/ib_recv.c | 4 ++++ net/rds/rds.h | 10 ++++++++++ net/rds/recv.c | 32 +++++++++++++++++++++++++++++--- net/rds/tcp_recv.c | 5 +++++ 6 files changed, 109 insertions(+), 3 deletions(-) commit f9fb69adb6c7acca60977a4db5a5f95b8e66c041 Author: Avinash Repaka Date: Mon Feb 29 15:30:57 2016 -0800 RDS: make message size limit compliant with spec RDS support max message size as 1M but the code doesn't check this in all cases. Patch fixes it for RDMA & non-RDMA and RDS MR size and its enforced irrespective of underlying transport. Signed-off-by: Avinash Repaka Signed-off-by: Santosh Shilimkar net/rds/rdma.c | 9 ++++++++- net/rds/rds.h | 3 +++ net/rds/send.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) commit 192a798f52998a643cef84fce0204be56666b0bf Author: Venkat Venkatsubra Date: Sat Jul 9 17:36:20 2016 -0700 RDS: add stat for socket recv memory usage Tracks the receive side memory added to scokets and removed from sockets. Signed-off-by: Venkat Venkatsubra Signed-off-by: Santosh Shilimkar net/rds/rds.h | 3 +++ net/rds/recv.c | 4 ++++ 2 files changed, 7 insertions(+) commit cf657269d311d575eb196c7045579b3443631b8b Author: Santosh Shilimkar Date: Thu Sep 29 11:07:11 2016 -0700 RDS: IB: fix panic due to handlers running post teardown Shutdown code reaping loop takes care of emptying the CQ's before they being destroyed. And once tasklets are killed, the hanlders are not expected to run. But because of core tasklet code issues, tasklet handler could still run even after tasklet_kill, RDS IB shutdown code already reaps the CQs before freeing cq/qp resources so as such the handlers have nothing left to do post shutdown. On other hand any handler running after teardown and trying to access already freed qp/cq resources causes issues Patch fixes this race by makes sure that handlers returns without any action post teardown. Reviewed-by: Wengang Signed-off-by: Santosh Shilimkar net/rds/ib.h | 1 + net/rds/ib_cm.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 941f8d55f6d613a460a5e080d25a38509f45eb75 Author: Santosh Shilimkar Date: Thu Feb 18 20:06:47 2016 -0800 RDS: RDMA: Fix the composite message user notification When application sends an RDS RDMA composite message consist of RDMA transfer to be followed up by non RDMA payload, it expect to be notified *only* when the full message gets delivered. RDS RDMA notification doesn't behave this way though. Thanks to Venkat for debug and root casuing the issue where only first part of the message(RDMA) was successfully delivered but remainder payload delivery failed. In that case, application should not be notified with a false positive of message delivery success. Fix this case by making sure the user gets notified only after the full message delivery. Reviewed-by: Venkat Venkatsubra Signed-off-by: Santosh Shilimkar net/rds/ib_send.c | 25 +++++++++++++++---------- net/rds/rdma.c | 10 ++++++++++ net/rds/rds.h | 1 + net/rds/send.c | 4 +++- 4 files changed, 29 insertions(+), 11 deletions(-) commit be2f76eacc278c272f26d46e4168efe5a55f5383 Author: Santosh Shilimkar Date: Mon Jul 4 16:16:36 2016 -0700 RDS: IB: Add vector spreading for cqs Based on available device vectors, allocate cqs accordingly to get better spread of completion vectors which helps performace great deal.. Signed-off-by: Santosh Shilimkar net/rds/ib.c | 11 +++++++++++ net/rds/ib.h | 5 +++++ net/rds/ib_cm.c | 40 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 3 deletions(-) commit 09b2b8f52895addd9bf28dc5ac98ff5cc750cf9a Author: Santosh Shilimkar Date: Sat Jul 9 17:14:02 2016 -0700 RDS: IB: add few useful cache stasts Tracks the ib receive cache total, incoming and frag allocations. Signed-off-by: Santosh Shilimkar net/rds/ib.h | 7 +++++++ net/rds/ib_recv.c | 6 ++++++ net/rds/ib_stats.c | 2 ++ 3 files changed, 15 insertions(+) commit 581d53c91cbf7b31415a9ed5e9a8b89d6af609b3 Author: Santosh Shilimkar Date: Sat Jul 9 18:31:38 2016 -0700 RDS: IB: track and log active side endpoint in connection Useful to know the active and passive end points in a RDS IB connection. Signed-off-by: Santosh Shilimkar net/rds/ib.h | 3 +++ net/rds/ib_cm.c | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit c536a068870a08fb7b35482e701a6b72e294b493 Author: Santosh Shilimkar Date: Sun Jul 3 19:14:10 2016 -0700 RDS: RDMA: silence the use_once mr log flood In absence of extension headers, message log will keep flooding the console. As such even without use_once we can clean up the MRs so its not really an error case message so make it debug message Signed-off-by: Santosh Shilimkar net/rds/rdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 56012459310a1dbcc55c2dbf5500a9f7571402cb Author: Santosh Shilimkar Date: Tue Mar 8 09:19:01 2016 -0800 RDS: IB: split the mr registration and invalidation path MR invalidation in RDS is done in background thread and not in data path like registration. So break the dependency between them which helps to remove the performance bottleneck. Signed-off-by: Santosh Shilimkar net/rds/ib.h | 4 +++- net/rds/ib_cm.c | 9 +++++++-- net/rds/ib_frmr.c | 11 ++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) commit 584a8279a44a800dea5a5c1e9d53a002e03016b4 Author: Santosh Shilimkar Date: Mon Jul 4 17:04:37 2016 -0700 RDS: RDMA: return appropriate error on rdma map failures The first message to a remote node should prompt a new connection even if it is RDMA operation. For RDMA operation the MR mapping can fail because connections is not yet up. Since the connection establishment is asynchronous, we make sure the map failure because of unavailable connection reach to the user by appropriate error code. Before returning to the user, lets trigger the connection so that its ready for the next retry. Signed-off-by: Santosh Shilimkar net/rds/send.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 8d5d8a5fd7f9337b2eff689df14ff3ae617f3ae6 Author: Qing Huang Date: Mon Jul 4 16:29:13 2016 -0700 RDS: RDMA: start rdma listening after init This prevents RDS from handling incoming rdma packets before RDS completes initializing its recv/send components. Signed-off-by: Qing Huang Signed-off-by: Santosh Shilimkar net/rds/rdma_transport.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 3e56c2f856d7aba6a03feea834d68f9c05f7d0b6 Author: Santosh Shilimkar Date: Sun Dec 4 16:25:43 2016 -0800 RDS: RDMA: fix the ib_map_mr_sg_zbva() argument Fixes warning: Using plain integer as NULL pointer Signed-off-by: Santosh Shilimkar net/rds/ib_frmr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fab8688d7185a1fe01ee9e0930fc59c0f161ee93 Author: Santosh Shilimkar Date: Mon Jul 4 15:31:21 2016 -0700 RDS: IB: make the transport retry count smallest Transport retry is not much useful since it indicate packet loss in fabric so its better to failover fast rather than longer retry. Signed-off-by: Santosh Shilimkar net/rds/ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff3f19a2f608ee406331e8c7b60d7376e75c2157 Author: Santosh Shilimkar Date: Mon Mar 14 07:43:55 2016 -0700 RDS: IB: include faddr in connection log Also use pr_* for it. Signed-off-by: Santosh Shilimkar net/rds/ib_cm.c | 19 +++++++++---------- net/rds/ib_recv.c | 4 ++-- net/rds/ib_send.c | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) commit bb7897631d2379ec198635cc24bf1e8c629d0bda Author: Santosh Shilimkar Date: Sun Dec 4 16:41:29 2016 -0800 RDS: mark few internal functions static to make sparse build happy Fixes below warnings: warning: symbol 'rds_send_probe' was not declared. Should it be static? warning: symbol 'rds_send_ping' was not declared. Should it be static? warning: symbol 'rds_tcp_accept_one_path' was not declared. Should it be static? warning: symbol 'rds_walk_conn_path_info' was not declared. Should it be static? Signed-off-by: Santosh Shilimkar net/rds/connection.c | 10 +++++----- net/rds/send.c | 4 ++-- net/rds/tcp_listen.c | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) commit f69b22e65ecfcb3648304e0e32a1df6f0d421375 Author: Santosh Shilimkar Date: Wed Nov 4 13:42:39 2015 -0800 RDS: log the address on bind failure It's useful to know the IP address when RDS fails to bind a connection. Thus, adding it to the error message. Orabug: 21894138 Reviewed-by: Wei Lin Guay Signed-off-by: Santosh Shilimkar net/rds/bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a0a8d6b0e88d947d7ab3198b325e31f677bebc2 Author: Philippe Reynes Date: Mon Jan 2 20:47:27 2017 +0100 net: fealnx: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/fealnx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9da12b6454c4a762077fc33b56bdfd49acdae3ae Author: Philippe Reynes Date: Mon Jan 2 19:53:11 2017 +0100 net: faraday: ftmac100: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftmac100.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit fd90095db59612de89da3439032fb3944cccea80 Author: Philippe Reynes Date: Mon Jan 2 17:42:14 2017 +0100 net: emulex: benet: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_ethtool.c | 73 ++++++++++++-------------- 1 file changed, 34 insertions(+), 39 deletions(-) commit 88c513d478def1d40593481de45f0d73108edc5c Author: Philippe Reynes Date: Sun Jan 1 20:52:12 2017 +0100 net: dlink: sundance: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/dlink/sundance.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9022255006cd9cbf6be78954ed6217372b885f6a Author: Philippe Reynes Date: Sun Jan 1 20:49:26 2017 +0100 net: dlink: dl2k: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. The previous implementation of set_settings was modifying the value of speed and duplex, but with the new API, it's not possible. The structure ethtool_link_ksettings is defined as const. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/dlink/dl2k.c | 71 ++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 30 deletions(-) commit 453e5f3dfc35668b590b528e9cefc2c84fd6bd81 Author: Philippe Reynes Date: Sun Jan 1 20:47:01 2017 +0100 net: dec: winbond-840: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/winbond-840.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 6711a87a9b43331356dd12cb7bd9788ae434b67a Author: Philippe Reynes Date: Sun Jan 1 19:11:06 2017 +0100 net: dec: uli526x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/uli526x.c | 41 +++++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 41a65f7040d1a65557b3ba42fe4105e209a66ad8 Author: Philippe Reynes Date: Sun Jan 1 19:05:38 2017 +0100 net: dec: de2104x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de2104x.c | 91 ++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 40 deletions(-) commit e938ed150f1ed9410ff50d19ac32efdd26c77903 Author: Philippe Reynes Date: Sun Jan 1 19:02:46 2017 +0100 net: sfc: falcon: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon/efx.c | 2 +- drivers/net/ethernet/sfc/falcon/ethtool.c | 29 +++++++++-------- drivers/net/ethernet/sfc/falcon/mdio_10g.c | 44 ++++++++++++++++---------- drivers/net/ethernet/sfc/falcon/mdio_10g.h | 3 +- drivers/net/ethernet/sfc/falcon/net_driver.h | 12 +++---- drivers/net/ethernet/sfc/falcon/qt202x_phy.c | 9 +++--- drivers/net/ethernet/sfc/falcon/tenxpress.c | 22 ++++++------- drivers/net/ethernet/sfc/falcon/txc43128_phy.c | 9 +++--- 8 files changed, 74 insertions(+), 56 deletions(-) commit 8e4881aa1d5d2f9c7ebfd0fe5e138f0cc345832c Author: Philippe Reynes Date: Sun Jan 1 19:02:45 2017 +0100 net: mdio: add mdio45_ethtool_ksettings_get There is a function in mdio for the old ethtool api gset. We add a new function mdio45_ethtool_ksettings_get for the new ethtool api glinksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/mdio.c | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mdio.h | 21 ++++++ 2 files changed, 199 insertions(+) commit 977509f7c5c6fb992ffcdf4291051af343b91645 Author: Bjorn Helgaas Date: Mon Jan 2 14:04:24 2017 -0600 PCI: Apply _HPX settings only to relevant devices Previously we didn't check the type of device before trying to apply Type 1 (PCI-X) or Type 2 (PCIe) Setting Records from _HPX. We don't support PCI-X Setting Records, so this was harmless, but the warning was useless. We do support PCIe Setting Records, and we didn't check whether a device was PCIe before applying settings. I don't think anything bad happened on non-PCIe devices because pcie_capability_clear_and_set_word(), pcie_cap_has_lnkctl(), etc., would fail before doing any harm. But it's ugly to depend on those internals. Check the device type before attempting to apply Type 1 and Type 2 Setting Records (Type 0 records are applicable to PCI, PCI-X, and PCIe devices). A side benefit is that this prevents useless "not supported" warnings when a BIOS supplies a Type 1 (PCI-X) Setting Record and we try to apply it to every single device: pci 0000:00:00.0: PCI-X settings not supported After this patch, we'll get the warning only when a BIOS supplies a Type 1 record and we have a PCI-X device to which it should be applied. Link: https://bugzilla.kernel.org/show_bug.cgi?id=187731 Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 0f0861e31e3c59ca4bc1ec59d99260cfca79740e Author: Christophe JAILLET Date: Fri Nov 18 19:18:47 2016 +0100 drm/sun4i: Fix a return value in case of error If 'sun4i_backend_drm_format_to_layer()' does not return 0, then 'val' is left unmodified. As it is not initialized either, the return value can be anything. It is likely that returning the error code was expected here. As the only caller of 'sun4i_backend_update_layer_formats()' does not check the return value, this fix is purely theorical. Signed-off-by: Christophe JAILLET Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11937f69b65b08d3184b1ebc864668be4b6c5427 Author: Quentin Schulz Date: Tue Dec 13 15:33:30 2016 +0100 ARM: sunxi: Add CONFIG_THERMAL_OF This enables CONFIG_THERMAL_OF by default for sunxi_defconfig. It is required to get Allwinner SoCs' temperature from the GPADC driver. The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. The first four channels can be used either for the ADC or the touchscreen and the fifth channel is used for the thermal sensor. The thermal sensor requires the IP to be in touchscreen mode to return correct values. Therefore, if the user is continuously reading the ADC channel(s), the thermal framework in which the thermal sensor is registered will switch the IP in touchscreen mode to get a temperature value and requires a delay of 100ms (because of the mode switching), then the ADC will switch back to ADC mode and requires also a delay of 100ms. If the ADC readings are critical to user and the SoC temperature is not, the GPADC driver is capable of not registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. In most use cases, the SoC temperature is more critical (for cpu throttling for example or activating cooling devices) than ADC readings, thus it is now enabled by default. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) commit 16fa9629c4eac40083899d904057df993a2eb06e Author: Icenowy Zheng Date: Fri Dec 2 23:05:12 2016 +0800 ARM: sunxi: add support for H2+ SoC Allwinner H2+ is a quad-core Cortex-A7 SoC. It is very like H3, that they share the same SoC ID (0x1680), and H3 memory maps as well as drivers works well on the SoC. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/arm/sunxi/README | 4 ++++ Documentation/devicetree/bindings/arm/sunxi.txt | 1 + arch/arm/mach-sunxi/sunxi.c | 1 + 3 files changed, 6 insertions(+) commit 70421257c068b91476e70cade15fca68045d0693 Author: Marcus Cooper Date: Tue Dec 20 11:44:46 2016 +0100 clk: sunxi-ng: A31: Fix spdif clock register As the SPDIF was rarely documented on the earlier Allwinner SoCs it was assumed that it had a similar clock register to the one described in the H3 User Manual. However this is not the case and it looks to shares the same setup as the I2S clock registers. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb021cda2ccf45ee9470bf0f8c55323ad1c761ae Author: Icenowy Zheng Date: Tue Dec 13 23:22:48 2016 +0800 clk: sunxi-ng: set the parent rate when adjustin CPUX clock on A33 The CPUX clock on A33, which is for the Cortex-A7 cores, is designed to be changeable by changing the rate of PLL_CPUX. Add CLK_SET_RATE_PARENT flag to this clock. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 790d929b540661945d1c70652ffb602c5c06ad85 Author: Icenowy Zheng Date: Tue Dec 13 23:22:47 2016 +0800 clk: sunxi-ng: fix PLL_CPUX adjusting on A33 When adjusting PLL_CPUX on A33, the PLL is temporarily driven too high, and the system hangs. Add a notifier to avoid this situation by temporarily switching to a known stable 24 MHz oscillator. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a43c96427e713bea94e9ef50e8be1f493afc0691 Author: Ondrej Jirman Date: Fri Nov 25 01:28:47 2016 +0100 clk: sunxi-ng: fix PLL_CPUX adjusting on H3 When adjusting PLL_CPUX on H3, the PLL is temporarily driven too high, and the system becomes unstable (oopses or hangs). Add a notifier to avoid this situation by temporarily switching to a known stable 24 MHz oscillator. Signed-off-by: Ondrej Jirman Tested-by: Lutz Sammer Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 525dfa2cdce4f5ab76251b5e57ebabf4f2dfc40c Merge: 85eb018 aa8e08d Author: David S. Miller Date: Mon Jan 2 15:51:21 2017 -0500 Merge branch 'mlx5-odp' Saeed Mahameed says: ==================== Mellanox mlx5 core and ODP updates 2017-01-01 The following eleven patches mainly come from Artemy Kovalyov who expanded mlx5 on-demand-paging (ODP) support. In addition there are three cleanup patches which don't change any functionality, but are needed to align codebase prior accepting other patches. Memory region (MR) in IB can be huge and ODP (on-demand paging) technique allows to use unpinned memory, which can be consumed and released on demand. This allows to applications do not pin down the underlying physical pages of the address space, and save from them need to track the validity of the mappings. Rather, the HCA requests the latest translations from the OS when pages are not present, and the OS invalidates translations which are no longer valid due to either non-present pages or mapping changes. In existing ODP implementation applications is needed to register memory buffers for communication, though registered memory regions need not have valid mappings at registration time. This patch set performs the following steps to expand current ODP implementation: 1. It refactors UMR to support large regions, by introducing generic function to perform HCA translation table modifications. This function supports both atomic and process contexts and is not limited by number of modified entries. This function allows to enable reallocated memory regions of arbitrary size, so adding MR cache buckets to support up to 16GB MRs. 2. It changes page fault event format and refactor page faults logic together with addition of atomic support. 3. It prepares mlx5 core code to support implicit registration with simplified and relaxed semantics. Implicit ODP semantics allows to applications provide special memory key that represents their complete address space. Thus all IO accesses referencing to this key (with proper access rights associated with the key) wouldn't need not register any virtual address range. Thanks, Artemy, Ilya and Leon v1->v2: - Don't use 'inline' in .c files ==================== Signed-off-by: David S. Miller commit aa8e08d2f523501c40b0e70f1c4ecacb97195931 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:48 2017 +0200 IB/mlx5: Improve MR check Add "type" field to mlx5_core MKEY struct. Check whether page fault happens on MKEY corresponding to MR. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/mr.c | 5 +++++ drivers/infiniband/hw/mlx5/odp.c | 9 +++++++-- include/linux/mlx5/driver.h | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 17d2f88f92ce39b348f125f6b2e6eeb6b0906ac7 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:47 2017 +0200 IB/mlx5: Add ODP atomics support Handle ODP atomic operations. When initiator of RDMA atomic operation use ODP MR to provide source data handle pagefault properly. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/odp.c | 88 +++++++++++++++++++++++----------------- include/linux/mlx5/mlx5_ifc.h | 2 +- include/linux/mlx5/qp.h | 18 ++++++++ 3 files changed, 69 insertions(+), 39 deletions(-) commit d9aaed838765e28234cb700c7d1ac975cadf28c9 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:46 2017 +0200 {net,IB}/mlx5: Refactor page fault handling * Update page fault event according to last specification. * Separate code path for page fault EQ, completion EQ and async EQ. * Move page fault handling work queue from mlx5_ib static variable into mlx5_core page fault EQ. * Allocate memory to store ODP event dynamically as the events arrive, since in atomic context - use mempool. * Make mlx5_ib page fault handler run in process context. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 14 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 49 +--- drivers/infiniband/hw/mlx5/odp.c | 300 ++++++++------------- drivers/infiniband/hw/mlx5/qp.c | 26 -- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 33 +++ drivers/net/ethernet/mellanox/mlx5/core/eq.c | 290 +++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 21 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/qp.c | 108 -------- include/linux/mlx5/device.h | 6 +- include/linux/mlx5/driver.h | 97 ++++++- include/linux/mlx5/qp.h | 44 --- 12 files changed, 522 insertions(+), 468 deletions(-) commit 223cdc72429079aaf72511d2677b5d6584866313 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:45 2017 +0200 net/mlx5: Update PAGE_FAULT_RESUME layout Update PAGE_FAULT_RESUME command layout. Three bit fields describing page fault: rdma, rdma_write, req_res gave 8 possible combinations, while only a few were legal. Now they are interpreted as three-bit type field, where former legal combinations turns into corresponding types and unused were added as new types. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/qp.c | 10 ++-------- include/linux/mlx5/mlx5_ifc.h | 9 ++++----- 2 files changed, 6 insertions(+), 13 deletions(-) commit 7d0cc6edcc7011133c45f62a7796a98b8cb5da0f Author: Artemy Kovalyov Date: Mon Jan 2 11:37:44 2017 +0200 IB/mlx5: Add MR cache for large UMR regions In this change we turn mlx5_ib_update_mtt() into generic mlx5_ib_update_xlt() to perfrom HCA translation table modifiactions supporting both atomic and process contexts and not limited by number of modified entries. Using this function we increase preallocated MRs up to 16GB. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 14 +- drivers/infiniband/hw/mlx5/mem.c | 32 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 15 +- drivers/infiniband/hw/mlx5/mr.c | 386 ++++++++++--------------- drivers/infiniband/hw/mlx5/odp.c | 19 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 ++ include/linux/mlx5/driver.h | 2 +- 7 files changed, 240 insertions(+), 248 deletions(-) commit c438fde1c288a754aa5d22e3668f03a1dde18335 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:43 2017 +0200 IB/mlx5: Add support for big MRs Make use of extended UMR translation offset. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 8 +++++--- drivers/infiniband/hw/mlx5/odp.c | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) commit 3161625589c1d7c54e949d462f4d0c327664881a Author: Artemy Kovalyov Date: Mon Jan 2 11:37:42 2017 +0200 IB/mlx5: Refactor UMR post send format * Update struct mlx5_wqe_umr_ctrl_seg. * Currenlty UMR send_flags aim only certain use cases: enabled/disable cached MR, modifying XLT for ODP. By making flags independent make UMR more flexible allowing arbitrary manipulations. * Since different UMR formats have different entry sizes UMR request should receive exact size of translation table update instead of number of entries. Rename field npages to xlt_size in struct mlx5_umr_wr and update relevant code accordingly. * Add support of length64 bit. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/mlx5_ib.h | 24 ++-- drivers/infiniband/hw/mlx5/mr.c | 50 +++++---- drivers/infiniband/hw/mlx5/odp.c | 3 +- drivers/infiniband/hw/mlx5/qp.c | 128 +++++++++------------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- include/linux/mlx5/qp.h | 14 ++- 6 files changed, 103 insertions(+), 118 deletions(-) commit bcda1aca7712539439d53dd5351c6223e03bf6e1 Author: Artemy Kovalyov Date: Mon Jan 2 11:37:41 2017 +0200 net/mlx5: Support new MR features This patch adds the following items to IFC file. 1. MLX5_MKC_ACCESS_MODE_KSM enum value for creating KSM memory keys. KSM access mode used when indirect MKey associated with fixed memory size entries. 2. null_mkey field that is used to indicate non-present KLM/KSM entries, where it causes the device to generate page fault event when trying to access it. 3. struct mlx5_ifc_cmd_hca_cap_bits capability bits indicating related value/field is supported: * fixed_buffer_size - MLX5_MKC_ACCESS_MODE_KSM * umr_extended_translation_offset - translation_offset_42_16 in UMR ctrl segment * null_mkey - null_mkey in QUERY_SPECIAL_CONTEXTS Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/mlx5_ifc.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d5ea2df9cefa9c81a66021b5bb89562d02bbc2f7 Author: Binoy Jayan Date: Mon Jan 2 11:37:40 2017 +0200 IB/mlx5: Add helper mlx5_ib_post_send_wait Clean up the following common code (to post a list of work requests to the send queue of the specified QP) at various places and add a helper function 'mlx5_ib_post_send_wait' to implement the same. - Initialize 'mlx5_ib_umr_context' on stack - Assign "mlx5_umr_wr:wr:wr_cqe to umr_context.cqe - Acquire the semaphore - call ib_post_send with a single ib_send_wr - wait_for_completion() - Check for umr_context.status - Release the semaphore Signed-off-by: Binoy Jayan Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/mr.c | 115 +++++++++++----------------------------- 1 file changed, 32 insertions(+), 83 deletions(-) commit 9f885201f274072c32a65f4a324da405d5980efd Author: Leon Romanovsky Date: Mon Jan 2 11:37:39 2017 +0200 IB/mlx5: Reorder code in query device command The order of features exposed by private mlx5-abi.h file is CQE zipping, packet pacing and multi-packet WQE. The internal order implemented in mlx5_ib_query_device() is multi-packet WQE, CQE zipping and packet pacing. Such difference hurts code readability, so let's sync, while mlx5-abi.h (exposed to userspace) is the primary order. This commit doesn't change any functionality. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7b13558f242747db90e52fdc510441a2ed0bafba Author: Max Gurtovoy Date: Mon Jan 2 11:37:38 2017 +0200 net/mlx5: Fix offset naming for reserved fields in hca_cap_bits Fix offset for reserved fields. Fixes: 7486216b3a0b ("{net,IB}/mlx5: mlx5_ifc updates") Fixes: b4ff3a36d3e4 ("net/mlx5: Use offset based reserved field names in the IFC header file") Fixes: 7d5e14237a55 ("net/mlx5: Update mlx5_ifc hardware features") Signed-off-by: Max Gurtovoy Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/mlx5_ifc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5bbdcbbb396196f1c94110ad7a041e90de95c4c2 Author: Theodore Ts'o Date: Mon Jan 2 15:12:17 2017 -0500 fscrypt: make test_dummy_encryption require a keyring key Currently, the test_dummy_encryption ext4 mount option, which exists only to test encrypted I/O paths with xfstests, overrides all per-inode encryption keys with a fixed key. This change minimizes test_dummy_encryption-specific code path changes by supplying a fake context for directories which are not encrypted for use when creating new directories, files, or symlinks. This allows us to properly exercise the keyring lookup, derivation, and context inheritance code paths. Before mounting a file system using test_dummy_encryption, userspace must execute the following shell commands: mode='\x00\x00\x00\x00' raw="$(printf ""\\\\x%02x"" $(seq 0 63))" if lscpu | grep "Byte Order" | grep -q Little ; then size='\x40\x00\x00\x00' else size='\x00\x00\x00\x40' fi key="${mode}${raw}${size}" keyctl new_session echo -n -e "${key}" | keyctl padd logon fscrypt:4242424242424242 @s Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 15 ++++++--------- fs/crypto/policy.c | 22 +++++++--------------- 2 files changed, 13 insertions(+), 24 deletions(-) commit 85eb018fec29eae60d20f6d04af854308ffb3a05 Merge: 31b95c9 e16e558 Author: David S. Miller Date: Mon Jan 2 15:23:34 2017 -0500 Merge tag 'wireless-drivers-next-for-davem-2017-01-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 The most notable change here is the inclusion of airtime fairness scheduling to ath9k. It prevents slow clients from hogging all the airtime and unfairly slowing down faster clients. Otherwise smaller changes and cleanup. Major changes: ath9k * cleanup eeprom endian handling * add airtime fairness scheduling ath10k * fix issues for new QCA9377 firmware version * support dev_coredump() for firmware crash dump * enable channel 169 on 5 GHz band ==================== Signed-off-by: David S. Miller commit 295b8c5915e31517a04b5f3883a62460b36fe8b9 Author: Chanwoo Choi Date: Thu Dec 8 13:58:11 2016 +0900 arm64: dts: exynos: Add support of bus frequency using VDD_INT on Exynos5433 TM2 This patch adds the bus Device-tree nodes for INT (Internal) block and enables the bus frequency scaling. Signed-off-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit ce23eb93b8ef9f9cb8993d3633bca525042b4cab Author: Chanwoo Choi Date: Thu Dec 8 13:58:10 2016 +0900 arm64: dts: exynos: Add bus nodes using VDD_INT for Exynos5433 This patch adds the AMBA AXI bus nodes using VDD_INT for Exynos5433 SoC. Following list specify the detailed correlation between sub-block and clock: - CLK_ACLK_G2D_{400|266} : Bus clock for G2D (2D graphic engine) - CLK_ACLK_MSCL_400 : Bus clock for MSCL (Memory to memory Scaler) - CLK_ACLK_GSCL_333 : Bus clock for GSCL (General Scaler) - CLK_SCLK_JPEG_MSCL : Bus clock for JPEG - CLK_ACLK_MFC_400 : Bus clock for MFC (Multi Format Codec) - CLK_ACLK_HEVC_400 : Bus clock for HEVC (High Efficient Video Codec) - CLK_ACLK_BUS0_400 : NoC's (Network On Chip) bus clock for PERIC/PERIS/FSYS/MSCL - CLK_ACLK_BUS1_400 : NoC's bus clock for MFC/HEVC/G3D - CLK_ACLK_BUS2_400 : NoC's bus clock for GSCL/DISP/G2D/CAM0/CAM1/ISP Signed-off-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-bus.dtsi | 197 +++++++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 + 2 files changed, 198 insertions(+) commit 7774f4e237d5786339219705851060441eb95839 Author: Chanwoo Choi Date: Thu Dec 8 13:58:09 2016 +0900 arm64: dts: exynos: Add PPMU node to Exynos5433 This patch adds PPMU (Platform Performance Monitoring Unit) Device-tree node to measure the utilization of each IP in Exynos SoC. - PPMU_D{0|1}_CPU are used to measure the utilization of MIF (Memory Interface) block with VDD_MIF power source. - PPMU_D{0|1}_GENERAL are used to measure the utilization of INT(Internal) block with VDD_INT power source. Signed-off-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 53e678d75e7c22b251c6981ff8364b5c42c5eac4 Author: Peter A. Bigot Date: Sat Dec 24 07:22:44 2016 -0600 hwmon: (sht21) Add Electronic Identification Code retrieval Expose the per-chip unique identifier so it can be used to identify the sensor producing the measurements. Signed-off-by: Peter A. Bigot Signed-off-by: Guenter Roeck Documentation/hwmon/sht21 | 5 +-- drivers/hwmon/sht21.c | 92 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 93 insertions(+), 4 deletions(-) commit 5343aed12f262c87372c4f20b744756837240dc9 Author: Julia Lawall Date: Thu Dec 22 13:05:35 2016 +0100 hwmon: (tmp401) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/tmp401.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit d013f7f5b7977e605a9515912075e6d008a80184 Author: Julia Lawall Date: Thu Dec 22 13:05:34 2016 +0100 hwmon: (fam15h_power) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/fam15h_power.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 1d05303cc94eefee9f0de0a0e919fcc9ffd0c687 Author: Julia Lawall Date: Thu Dec 22 13:05:33 2016 +0100 hwmon: (adt7475) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adt7475.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 2f2dbea6ebd7042bdd7dc06c8f9a1635b2f14116 Author: Julia Lawall Date: Thu Dec 22 13:05:32 2016 +0100 hwmon: (lm95234) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm95234.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1fc673769f9e078bddf213331dc934f21b3181a8 Author: Julia Lawall Date: Thu Dec 22 13:05:31 2016 +0100 hwmon: (max6650) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) commit 4cd0183dcf2a9be3338acda63fc4b745f6ef587e Author: Julia Lawall Date: Thu Dec 22 13:05:30 2016 +0100 hwmon: (emc2103) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/emc2103.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 14c05198bc74ab7e57ade977f653c15e0da77530 Author: Julia Lawall Date: Thu Dec 22 13:05:29 2016 +0100 hwmon: (lm83) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm83.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41919a55cf589510df505b0e583651ff406cd99c Author: Julia Lawall Date: Thu Dec 22 13:05:28 2016 +0100 hwmon: (adm1025) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adm1025.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4318ad77628816a9e61515638fe7abfc943c9d0a Author: Julia Lawall Date: Thu Dec 22 13:05:27 2016 +0100 hwmon: (k8temp) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/k8temp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3776c835293d19d94c44ba40b8d64bbc8c3632c1 Author: Julia Lawall Date: Thu Dec 22 13:05:26 2016 +0100 hwmon: (sch5627) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/sch5627.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eabb6f159b56a12673eafd2d7685126a008fcde8 Author: Julia Lawall Date: Thu Dec 22 13:05:25 2016 +0100 hwmon: (lm78) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm78.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit e33110d0f69e00b67ddd9d6bf393d9af0380af80 Author: Julia Lawall Date: Thu Dec 22 13:05:24 2016 +0100 hwmon: (pc87360) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/pc87360.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 93d72ac3b68f3696ed5aa8d08ea044d7518d6699 Author: Julia Lawall Date: Thu Dec 22 13:05:23 2016 +0100 hwmon: (nct6775) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e57959a6d5d7c29f5273343024d936344f7a6a23 Author: Julia Lawall Date: Thu Dec 22 13:05:22 2016 +0100 hwmon: (lm90) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ddc64ae839500fd7db791af0d7c92323305a3d42 Author: Julia Lawall Date: Thu Dec 22 13:05:21 2016 +0100 hwmon: (it87) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit fd5ddb813c019e9ab95913daf25db7a10fbe5f5d Author: Julia Lawall Date: Thu Dec 22 13:05:20 2016 +0100 hwmon: (dme1737) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/dme1737.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0c36d72e57dfdc7bb7a3c39411a675d85f8e672c Author: Julia Lawall Date: Thu Dec 22 13:05:19 2016 +0100 hwmon: (k10temp) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d5034db6cc1935b1fc8836f887bec034c5e0550e Author: Julia Lawall Date: Thu Dec 22 13:05:18 2016 +0100 hwmon: (vt8231) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/vt8231.c | 59 ++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 28 deletions(-) commit 329beb71fd666017c057b2682aeab7fc04c01a63 Author: Julia Lawall Date: Thu Dec 22 13:05:17 2016 +0100 hwmon: (w83793) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83793.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8258e49019a59f1a24bc19bab19b4286802a9076 Author: Julia Lawall Date: Thu Dec 22 13:05:16 2016 +0100 hwmon: (f71805f) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/f71805f.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a81b67dacb0a1d8858c7ec9edf4c04d8ce45bfec Author: Julia Lawall Date: Thu Dec 22 13:05:15 2016 +0100 hwmon: (pc87427) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/pc87427.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d0ec428d5311e3b72bff117e657dd53e3533962 Author: Julia Lawall Date: Thu Dec 22 13:05:14 2016 +0100 hwmon: (w83791d) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83791d.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 7fe6d2b90340ca77648d5d5aa3d9e7f97566efb8 Author: Julia Lawall Date: Thu Dec 22 13:05:13 2016 +0100 hwmon: (w83792d) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83792d.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b80b814b5e9424aa9263f7252b7dc3c01063f9e0 Author: Julia Lawall Date: Thu Dec 22 13:05:12 2016 +0100 hwmon: (w83781d) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83781d.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 8dfcdfc1e0cfdbc7645be6ddbfcca8cc57ee53e3 Author: Julia Lawall Date: Thu Dec 22 13:05:11 2016 +0100 hwmon: (w83627hf) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83627hf.c | 53 +++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-) commit 9bbacbfe0e78738d57350677054bf977e711376a Author: Julia Lawall Date: Thu Dec 22 13:05:10 2016 +0100 hwmon: (w83627ehf) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/w83627ehf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8b2bd7aefa79021b15fa5e79b1676e170370aad2 Author: Julia Lawall Date: Thu Dec 22 13:05:09 2016 +0100 hwmon: (via686a) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/via686a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1664d7fd62d1299cbe10a1ff4929a3d1a47cf087 Author: Julia Lawall Date: Thu Dec 22 13:05:08 2016 +0100 hwmon: (via-cputemp) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/via-cputemp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2d1c4cf1052f0c46233e81f30ea9874d6f3dcae0 Author: Julia Lawall Date: Thu Dec 22 13:05:07 2016 +0100 hwmon: (smsc47m192) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/smsc47m192.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 83aa233e5dc26a397361471d9cb99e86b8f0bd84 Author: Julia Lawall Date: Thu Dec 22 13:05:06 2016 +0100 hwmon: (smsc47m1) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/smsc47m1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit feaf8bd49ce08bec6aca2be94d16d8bc4811528d Author: Julia Lawall Date: Thu Dec 22 13:05:05 2016 +0100 hwmon: (sis5595) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/sis5595.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit af3d387f49e5ea5b4d11e315e0140aac6dd176b8 Author: Julia Lawall Date: Thu Dec 22 13:05:04 2016 +0100 hwmon: (sht15) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/sht15.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 309c675e62d140d46806ca3e6b29f4549076d0d6 Author: Julia Lawall Date: Thu Dec 22 13:05:03 2016 +0100 hwmon: (pcf8591) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/pcf8591.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit d0688f6ccdcdf17e709c7986b81ff6b2d63d1db8 Author: Julia Lawall Date: Thu Dec 22 13:05:02 2016 +0100 hwmon: (nsa320) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/nsa320-hwmon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1f856175e44bc2b8c5c961854abe80fb6c106229 Author: Julia Lawall Date: Thu Dec 22 13:05:01 2016 +0100 hwmon: (nct6683) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/nct6683.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 5c2f0dd5705a33b4a3256934dae83727c120fd50 Author: Julia Lawall Date: Thu Dec 22 13:05:00 2016 +0100 hwmon: (mcp3021) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/mcp3021.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 918b405699d7f121be6e963de7655fd1416ba2d2 Author: Julia Lawall Date: Thu Dec 22 13:04:59 2016 +0100 hwmon: (mc13783-adc) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/mc13783-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a93c843bbfbd1a010adcd9bc156b0362edabc0d2 Author: Julia Lawall Date: Thu Dec 22 13:04:58 2016 +0100 hwmon: (max197) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/max197.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 23eb359dd62224d971d0c70d11f57822560ce323 Author: Julia Lawall Date: Thu Dec 22 13:04:57 2016 +0100 hwmon: (max1619) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/max1619.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17c45c4d06ae3d77515a883e57e7e23154c239ae Author: Julia Lawall Date: Thu Dec 22 13:04:56 2016 +0100 hwmon: (max1111) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/max1111.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce847a3320abbda9a12235a63eb1b3bbb759e58d Author: Julia Lawall Date: Thu Dec 22 13:04:55 2016 +0100 hwmon: (lm93) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm93.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit 3dba95dfd47d42b09193a24c3c6f74a9a1f8c004 Author: Julia Lawall Date: Thu Dec 22 13:04:54 2016 +0100 hwmon: (lm92) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Update description] Signed-off-by: Guenter Roeck drivers/hwmon/lm92.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 07a366cc55490ac4bdb2e732e6ccb76e1da9ef14 Author: Julia Lawall Date: Thu Dec 22 13:04:53 2016 +0100 hwmon: (lm87) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm87.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit d0ed69d55b79d81495f7ad4a0f6927fb412ce7fc Author: Julia Lawall Date: Thu Dec 22 13:04:52 2016 +0100 hwmon: (lm85) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Update description] Signed-off-by: Guenter Roeck drivers/hwmon/lm85.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1547690d48701531c11e72f1e3360285cce76ed9 Author: Julia Lawall Date: Thu Dec 22 13:04:51 2016 +0100 hwmon: (lm80) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm80.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89cb4af87cc5d776e9cb042e44b4184419d9cee4 Author: Julia Lawall Date: Thu Dec 22 13:04:50 2016 +0100 hwmon: (lm70) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm70.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc7a3265890f562746d726c4794753182347be06 Author: Julia Lawall Date: Thu Dec 22 13:04:49 2016 +0100 hwmon: (lm63) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/lm63.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit abf04402b65d3fc1fe472080573bc3fefec27a30 Author: Julia Lawall Date: Thu Dec 22 13:04:48 2016 +0100 hwmon: (jz4740) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/jz4740-hwmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3edf03b3c132f8dc28b1651a46071aca6dce1c8b Author: Julia Lawall Date: Thu Dec 22 13:04:47 2016 +0100 hwmon: (i5k_amb) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/i5k_amb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3eb52cfdf5d3b04ffb6cfcd6a7506f5b2b27b0bf Author: Julia Lawall Date: Thu Dec 22 13:04:46 2016 +0100 hwmon: (i5500_temp) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/i5500_temp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2ab0c6c55e6d2525282e7e3e2f62032847834342 Author: Julia Lawall Date: Thu Dec 22 13:04:45 2016 +0100 hwmon: (core) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c490c63e9505a3956b3a9c09b3abc638992426e8 Author: Julia Lawall Date: Thu Dec 22 13:04:44 2016 +0100 hwmon: (gpio-fan) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 54 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) commit 2579b7ff0804929b798c4040c703f24a01df192a Author: Julia Lawall Date: Thu Dec 22 13:04:43 2016 +0100 hwmon: (gl520sm) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/gl520sm.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 251f65cde829fdc351132328a27d9466237e96ef Author: Julia Lawall Date: Thu Dec 22 13:04:42 2016 +0100 hwmon: (g762) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/g762.c | 86 +++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 44 deletions(-) commit 92a4873d532d579070ddd304bae3fe13e8810493 Author: Julia Lawall Date: Thu Dec 22 13:04:41 2016 +0100 hwmon: (g760a) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/g760a.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e34e885b9e32d7c78dd4d4f60616f1026ae0061e Author: Julia Lawall Date: Thu Dec 22 13:04:40 2016 +0100 hwmon: (fschmd) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/fschmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2620e7fa3be6c582ca64f0941987b0b86e974de Author: Julia Lawall Date: Thu Dec 22 13:04:39 2016 +0100 hwmon: (f71882fg) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/f71882fg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 345d52fa37132b8fa281e77a18835515037fa877 Author: Julia Lawall Date: Thu Dec 22 13:04:38 2016 +0100 hwmon: (ds1621) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/ds1621.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0acf2a5f2a630754120a9951976ea5bf3f7b6d8f Author: Julia Lawall Date: Thu Dec 22 13:04:37 2016 +0100 hwmon: (atxp1) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/atxp1.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 82e73f7f9538773705dfd8b019760884a695653f Author: Julia Lawall Date: Thu Dec 22 13:04:36 2016 +0100 hwmon: (asb100) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/asb100.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit ac8e35b251607ec2669d40ac77e7436d3c97bb7f Author: Julia Lawall Date: Thu Dec 22 13:04:35 2016 +0100 hwmon: (adt7x10) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adt7x10.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 808fc6c2c3f3fe5ddeb3f2cb9ca7634ba3f4a2c0 Author: Julia Lawall Date: Thu Dec 22 13:04:34 2016 +0100 hwmon: (adt7470) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adt7470.c | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit b57511165fd08c257f69751a00fdb944deac0d8a Author: Julia Lawall Date: Thu Dec 22 13:04:33 2016 +0100 hwmon: (adm9240) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adm9240.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit bfb6b1732a2c3212ab1088adf26444783367cb28 Author: Julia Lawall Date: Thu Dec 22 13:04:32 2016 +0100 hwmon: (adm1031) 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. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adm1031.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 6d3c213d9da04d1a3e5a06d81dbd62b28f905a16 Author: Julia Lawall Date: Thu Dec 22 13:04:31 2016 +0100 hwmon: (adm1026) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its size. Signed-off-by: Julia Lawall Signed-off-by: Guenter Roeck Signed-off-by: Julia Lawall [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/adm1026.c | 128 +++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 62 deletions(-) commit 6b41013d6ee4e7fb63eddcc59be12032cf9c9bdb Author: Julia Lawall Date: Thu Dec 22 13:04:30 2016 +0100 hwmon: (adm1021) use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall [groeck: Updated comment] Signed-off-by: Guenter Roeck drivers/hwmon/adm1021.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9bb2d47d744dcb33ca896a023ee8fffc0bdbb3cf Author: Michael Walle Date: Thu Dec 15 18:38:17 2016 +0100 hwmon: (adt7411) add min, max and alarm attributes This patch adds support for the min, max and alarm attributes of the voltage and temperature channels. Additionally, the temp2_fault attribute is supported which indicates a fault of the external temperature diode. Signed-off-by: Michael Walle Signed-off-by: Guenter Roeck drivers/hwmon/adt7411.c | 361 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 316 insertions(+), 45 deletions(-) commit 5da99328f2595d2b376fcd2a87974b658f396da8 Author: Corentin LABBE Date: Thu Dec 15 19:08:14 2016 +0100 hwmon: (sch56xx) Remove unneeded linux/miscdevice.h include drivers/hwmon/sch56xx-common.c does not contain any miscdevice so the inclusion of linux/miscdevice.h is uncessary. Signed-off-by: Corentin Labbe Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/sch56xx-common.c | 1 - 1 file changed, 1 deletion(-) commit fbb5850bd3c13a7a804c2f47dbd9eeb05e4e4b4a Author: Robert Nelson Date: Tue Dec 27 11:58:35 2016 -0600 ARM: dts: Add am335x-boneblack-wireless BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with the Ethernet replaced by a TI wl1835 wireless module. This board can be indentified by the BWAx value after A335BNLT (BBB) in the at24 eeprom: BWAx [aa 55 33 ee 41 33 33 35 42 4e 4c 54 42 57 41 35 |.U3.A335BNLTBWA5|] http://beagleboard.org/black-wireless https://github.com/beagleboard/beaglebone-black-wireless firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address Signed-off-by: Robert Nelson CC: Tony Lindgren Acked-by: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblack-wireless.dts | 109 ++++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 2876cc4a773c85dd3a3da3a28b1d4e9d99fb73c8 Author: Robert Nelson Date: Tue Dec 27 11:58:34 2016 -0600 ARM: dts: Move most of am335x-boneblack.dts to am335x-boneblack-common.dtsi This is going to be shared with the BeagleBone Black Wireless Signed-off-by: Robert Nelson CC: Tony Lindgren CC: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack-common.dtsi | 163 +++++++++++++++++++++++++ arch/arm/boot/dts/am335x-boneblack.dts | 155 +---------------------- 2 files changed, 164 insertions(+), 154 deletions(-) commit 31b95c9bdc20663a20b3261303c2a5fc34aae133 Author: Niklas Cassel Date: Fri Dec 30 13:56:46 2016 +0100 net: stmmac: remove unused duplicate property snps,axi_all For core revision 3.x Address-Aligned Beats is available in two registers. The DT property snps,aal was created for AAL in the DMA bus register, which is a read/write bit. The DT property snps,axi_all was created for AXI_AAL in the AXI bus mode register, which is a read only bit that reflects the value of AAL in the DMA bus register. Since the value of snps,axi_all is never used in the driver, and since the property was created for a bit that is read only, it should be safe to remove the property. Acked-by: Giuseppe Cavallaro Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 - include/linux/stmmac.h | 1 - 3 files changed, 3 deletions(-) commit e9e79d5395b2e60a03811073e0aedfbd7fa0bc57 Author: Andy Yan Date: Sat Oct 22 20:54:55 2016 +0800 ARM: dts: rockchip: use pin constants to describe gpios Use macros to describe gpios will make the dts easier to read and write. All the modifications done with sed: sed -i -e 's/ 0 GPIO_ACTIVE_/ RK_PA0 GPIO_ACTIVE_/' arch/arm/boot/dts/rk* sed -i -e 's/ 1 GPIO_ACTIVE_/ RK_PA1 GPIO_ACTIVE_/' arch/arm/boot/dts/rk* sed -i -e 's/ 2 GPIO_ACTIVE_/ RK_PA2 GPIO_ACTIVE_/' arch/arm/boot/dts/rk* ....... ....... sed -i -e 's/ 30 GPIO_ACTIVE_/ RK_PD6 GPIO_ACTIVE_/' arch/arm/boot/dts/rk* sed -i -e 's/ 31 GPIO_ACTIVE_/ RK_PD7 GPIO_ACTIVE_/' arch/arm/boot/dts/rk* Tested with: for i in dts-old/*dtb; do scripts/dtc/dtx_diff $i dts-new/$(basename $i); done Signed-off-by: Andy Yan [also adapted the gpio interrupts] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3036-evb.dts | 2 +- arch/arm/boot/dts/rk3036-kylin.dts | 12 +++++------ arch/arm/boot/dts/rk3066a-bqcurie2.dts | 8 +++---- arch/arm/boot/dts/rk3066a-marsboard.dts | 6 +++--- arch/arm/boot/dts/rk3066a-mk808.dts | 10 ++++----- arch/arm/boot/dts/rk3066a-rayeager.dts | 18 ++++++++-------- arch/arm/boot/dts/rk3188-px3-evb.dts | 10 ++++----- arch/arm/boot/dts/rk3188-radxarock.dts | 20 ++++++++--------- arch/arm/boot/dts/rk3229-evb.dts | 2 +- arch/arm/boot/dts/rk3288-evb-act8846.dts | 6 +++--- arch/arm/boot/dts/rk3288-evb-rk808.dts | 2 +- arch/arm/boot/dts/rk3288-evb.dtsi | 14 ++++++------ arch/arm/boot/dts/rk3288-fennec.dts | 6 +++--- arch/arm/boot/dts/rk3288-firefly-beta.dts | 2 +- arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi | 2 +- arch/arm/boot/dts/rk3288-firefly-reload.dts | 26 +++++++++++------------ arch/arm/boot/dts/rk3288-firefly.dts | 2 +- arch/arm/boot/dts/rk3288-firefly.dtsi | 18 ++++++++-------- arch/arm/boot/dts/rk3288-miqi.dts | 8 +++---- arch/arm/boot/dts/rk3288-popmetal.dts | 8 +++---- arch/arm/boot/dts/rk3288-r89.dts | 14 ++++++------ arch/arm/boot/dts/rk3288-rock2-som.dtsi | 4 ++-- arch/arm/boot/dts/rk3288-rock2-square.dts | 14 ++++++------ arch/arm/boot/dts/rk3288-veyron-analog-audio.dtsi | 8 +++---- arch/arm/boot/dts/rk3288-veyron-brain.dts | 8 +++---- arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 14 ++++++------ arch/arm/boot/dts/rk3288-veyron-jaq.dts | 14 ++++++------ arch/arm/boot/dts/rk3288-veyron-jerry.dts | 12 +++++------ arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 +++--- arch/arm/boot/dts/rk3288-veyron-minnie.dts | 18 ++++++++-------- arch/arm/boot/dts/rk3288-veyron-pinky.dts | 4 ++-- arch/arm/boot/dts/rk3288-veyron-sdmmc.dtsi | 2 +- arch/arm/boot/dts/rk3288-veyron-speedy.dts | 10 ++++----- arch/arm/boot/dts/rk3288-veyron.dtsi | 10 ++++----- 34 files changed, 160 insertions(+), 160 deletions(-) commit 0af13f7063a6ffc94c905ffc8c5f324f91e5843a Author: Elaine Zhang Date: Wed Dec 7 10:17:45 2016 +0800 ARM: dts: rockchip: add qos node for rk3288 when pd power on/off, the qos regs need to save and restore. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 84 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 4eb45558909e922757555ed65362c4701885d8a5 Author: Andy Yan Date: Sat Oct 22 20:59:04 2016 +0800 arm64: dts: rockchip: use pin constants to describe gpios Use macros to describe gpios will make the dts easier to read and write. Signed-off-by: Andy Yan [converted interrupt-gpios and new rk3399-evb backlight] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi | 10 +++++----- arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 10 +++++----- arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 14 +++++++------- arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 10 +++++----- arch/arm64/boot/dts/rockchip/rk3368-r88.dts | 16 ++++++++-------- arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 8 ++++---- 6 files changed, 34 insertions(+), 34 deletions(-) commit b5d1c57299734f5b54035ef2e61706b83041f20c Author: William wu Date: Wed Dec 21 18:41:05 2016 +0800 arm64: dts: rockchip: add u2phy clock for ehci and ohci of rk3399 We found that the suspend process was blocked when it run into ehci/ohci module due to clk-480m of usb2-phy was disabled. The root cause is that usb2-phy suspended earlier than ehci/ohci (usb2-phy will be auto suspended if no devices plug-in). and the clk-480m provided by it was disabled if no module used. However, some suspend process related ehci/ohci are base on this clock, so we should refer it into ehci/ohci driver to prevent this case. The u2phy clock flow like this: === u2phy ________________ | | |-----> UTMI_CLK ---------> | EHCI | OSC_24M ---|---> PHY_PLL----|----| |________^_______| |-----> 480M_CLK ---|G|---> | USBPHY_480M_SRC| ----> USBPHY_480M for SoC | | GRF === Signed-off-by: William wu Signed-off-by: Xing Zheng Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 8742466a43c9dea57684012175e146f0db3eec3b Author: Brian Norris Date: Thu Dec 1 18:27:27 2016 -0800 arm64: dts: rockchip: add rk3399 eDP HPD pinctrl We haven't enabled eDP support yet, but we might as well describe the pin now. Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 647cea2e68420fa73efb97c908cdf0c852c22cec Author: Brian Norris Date: Thu Dec 1 18:27:26 2016 -0800 arm64: dts: rockchip: add rk3399 thermal_zones phandle We're going to need to amend this table in board files. Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bed92460d910c75f0d722f1240d2dc1d466d884 Author: Elaine Zhang Date: Thu Dec 29 10:45:10 2016 +0800 clk: rockchip: add new pll-type for rk3328 The rk3328's pll and clock are similar with rk3036's, it different with pll_mode_mask, the rk3328 soc pll mode only one bit(rk3036 soc have two bits) so these should be independent and separate from the series of rk3328s. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-pll.c | 16 +++++++++++++--- drivers/clk/rockchip/clk.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) commit 4d3e84f9962800fb355e1c10e57e998ae574efa2 Author: Heiko Stuebner Date: Tue Dec 27 00:58:23 2016 +0100 clk: rockchip: describe aclk_vcodec using the new muxgrf type on rk3288 With the newly introduced clk type for muxes in the grf we now can describe some missing clocks, like the aclk_vcodec that selects between aclk_vdpu and aclk_vepu based on a bit set in the general register files. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit cb1d9f6ddaa436f2dce2710740b7a3546700949c Author: Heiko Stuebner Date: Tue Dec 27 00:00:38 2016 +0100 clk: rockchip: add a clock-type for muxes based in the grf Rockchip socs often have some tiny number of muxes not controlled from the core clock controller but through bits set in the general register files. Add a clock-type that can control these as well, so that we don't need to work around them being absent. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-muxgrf.c | 102 ++++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.c | 7 +++ drivers/clk/rockchip/clk.h | 21 ++++++++ 4 files changed, 131 insertions(+) commit 23c4cfbdab494568600ae6073a2bf02be4b10f4e Author: Jani Nikula Date: Wed Dec 28 13:06:26 2016 +0200 drm/edid: constify edid quirk list No reason not to be const. Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1482923186-22430-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c74eeaf16b8901b9bdb1901e1a8533a2281845a Author: Nabendu Maiti Date: Tue Nov 29 11:23:14 2016 +0530 drm/i915: Move number of scalers initialization to runtime init In future patches, we require greater flexibility in describing the number of scalers available on each CRTC. To ease that transition we move the current assignment to intel_device_info. Scaler structure initialisation is done if scaler is available on the CRTC. Gen9 check is not required as on depending upon numbers of scalers we initialize scalers or return without doing anything in skl_init_scalers. v3: Changed skl_init_scaler to intel_crtc_init_scalers v2: Added Chris's comments. Signed-off-by: Nabendu Maiti Reviewed-by: Chris Wilson (v2) Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1480398794-22741-1-git-send-email-nabendu.bikash.maiti@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_device_info.c | 3 +++ drivers/gpu/drm/i915/intel_display.c | 30 +++++++++++++----------------- 3 files changed, 17 insertions(+), 17 deletions(-) commit 5299a92a3b98b91b7230662b8b9b6c64bcf8cae6 Author: Nicolas Iooss Date: Thu Dec 22 11:09:10 2016 +0100 HID: intel-ish-hid: format 32-bit integers with %X In ishtp_hid_probe(), use %04X instead of %04hX to format __u32 values, in order to silent a format error reported by clang: drivers/hid/intel-ish-hid/ishtp-hid.c:212:3: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] hid->vendor, hid->product); ^~~~~~~~~~~ drivers/hid/intel-ish-hid/ishtp-hid.c:212:16: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] hid->vendor, hid->product); ^~~~~~~~~~~~ Signed-off-by: Nicolas Iooss Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aae34fa314d7dedfe756ab81787df7944de0df6 Author: Nicolas Iooss Date: Thu Dec 22 11:09:09 2016 +0100 HID: intel-ish-hid: add printf attribute to print_log() Structure ishtp_device contains a logging function, print_log(), which formats some of its parameters using vsnprintf(). Add a __printf attribute to this function field (and to ish_event_tracer()) in order to detect at compile time issues related to the printf-like formatting. While at it, make format parameter a const pointer as print_log() is not supposed to modify it. Signed-off-by: Nicolas Iooss Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 ++- drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 7c93931e4cee25315173ec40b8a52a02d070f852 Author: Bartosz Golaszewski Date: Tue Dec 13 11:09:19 2016 +0100 ARM: dts: da850: specify the maximum pixel clock rate for tilcdc At maximum CPU frequency of 300 MHz the maximum pixel clock frequency is 37.5 MHz[1]. We must filter out any mode for which the calculated pixel clock rate would exceed this value. Specify the max-pixelclock property for the display node for da850-lcdk. [1] http://www.ti.com/lit/ds/symlink/am1808.pdf (SPRS653E, revised March 2014, table 6-110) Signed-off-by: Bartosz Golaszewski [nsekhar@ti.com: commit message update] Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 1 + 1 file changed, 1 insertion(+) commit c982534433b490030b84782e5a46c1c339dd09e0 Author: Bartosz Golaszewski Date: Tue Dec 13 11:09:18 2016 +0100 ARM: dts: da850-lcdk: add the vga-bridge node Add the vga-bridge node to the board DT together with corresponding ports and vga connector. This allows to retrieve the edid info from the display automatically. Reviewed-by: Tomi Valkeinen Signed-off-by: Bartosz Golaszewski Reviewed-by: Laurent Pinchart Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit b7f98864de216dc450e6d535c67bd3d7680df2a3 Author: Rafał Miłecki Date: Mon Jan 2 08:28:29 2017 +0100 cfg80211: fix example REG_RULE usage in Documentation It's just an example, but lets make it look more real to don't confuse people about possible REG_RULE usage. Channels are 20 MHz wide, so start and end frequencies are 10 MHz away from the center one. Signed-off-by: Rafał Miłecki Signed-off-by: Johannes Berg Documentation/networking/regulatory.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b4c7a3023a29f78881e08cd9ba8c3f0ee198c10b Author: Rafał Miłecki Date: Mon Jan 2 08:28:28 2017 +0100 cfg80211: update wireless-regdb repo url in Documentation It's maintained by Seth Forshe for a long time now. Signed-off-by: Rafał Miłecki Cc: Seth Forshee Signed-off-by: Johannes Berg Documentation/networking/regulatory.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1f7de04c72a66c68250ac0a31dc26a70ddb855e Author: Bartosz Golaszewski Date: Tue Dec 13 11:09:15 2016 +0100 ARM: dts: da850: rename the display node label The tilcdc node name is 'display' as per the ePAPR 1.1 recommendation. The label is also 'display', but change it to 'lcdc' to make it clear what the underlying hardware is. Reviewed-by: Tomi Valkeinen Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57629915d568c522ac1422df7bba4bee5b5c7a7c Author: Ilan peer Date: Mon Dec 26 18:17:36 2016 +0200 mac80211: Fix addition of mesh configuration element The code was setting the capabilities byte to zero, after it was already properly set previously. Fix it. The bug was found while debugging hwsim mesh tests failures that happened since the commit mentioned below. Fixes: 76f43b4c0a93 ("mac80211: Remove invalid flag operations in mesh TSF synchronization") Signed-off-by: Ilan Peer Reviewed-by: Masashi Honma Signed-off-by: Johannes Berg net/mac80211/mesh.c | 2 -- 1 file changed, 2 deletions(-) commit e3d9e1eb5ebd8d91bb43bfe1dfeaf6d10dc882cb Author: Bartosz Golaszewski Date: Mon Dec 19 10:53:54 2016 +0100 ARM: dts: da850-lcdk: add gpio-keys Add a gpio-keys node for two user buttons present on the board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 430d7dd448f48f54e79614ca237f44cd543f73da Author: Bartosz Golaszewski Date: Mon Dec 19 10:58:11 2016 +0100 bus: da850-mstpri: fix my e-mail address I noticed my e-mail address is wrong in this one. This patch fixes it. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori drivers/bus/da8xx-mstpri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00eb3630a98ad09acf5ac5365a7b66cba61d9676 Author: Vladimir Zapolskiy Date: Sat Dec 24 07:43:54 2016 +0200 ARM: dts: imx: remove obsoleted property fsl,spi-num-chipselects Since commit b36581df7e78 ("spi: imx: Using existing properties for chipselects") the device tree property 'fsl,spi-num-chipselects' is unused and it is already marked as obsolete in device tree binding documentation. Remove the property from the existing DTS files to avoid its reoccurence on copying. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx1-ads.dts | 1 - arch/arm/boot/dts/imx27-apf27dev.dts | 2 -- arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts | 1 - arch/arm/boot/dts/imx27-pdk.dts | 1 - arch/arm/boot/dts/imx27-phytec-phycard-s-som.dtsi | 1 - arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 1 - arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 1 - arch/arm/boot/dts/imx50-evk.dts | 1 - arch/arm/boot/dts/imx51-apf51dev.dts | 2 -- arch/arm/boot/dts/imx51-babbage.dts | 1 - arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi | 1 - arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 1 - arch/arm/boot/dts/imx53-smd.dts | 1 - arch/arm/boot/dts/imx53-tqma53.dtsi | 2 -- arch/arm/boot/dts/imx53-tx53.dtsi | 1 - arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi | 1 - arch/arm/boot/dts/imx6dl-aristainetos_4.dts | 1 - arch/arm/boot/dts/imx6q-ba16.dtsi | 1 - arch/arm/boot/dts/imx6q-bx50v3.dtsi | 1 - arch/arm/boot/dts/imx6q-cm-fx6.dts | 1 - arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 1 - arch/arm/boot/dts/imx6q-evi.dts | 3 --- arch/arm/boot/dts/imx6q-gw5400-a.dts | 1 - arch/arm/boot/dts/imx6q-marsboard.dts | 1 - arch/arm/boot/dts/imx6q-novena.dts | 1 - arch/arm/boot/dts/imx6qdl-apalis.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-apf6dev.dtsi | 1 - arch/arm/boot/dts/imx6qdl-aristainetos.dtsi | 1 - arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 3 --- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 1 - arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi | 1 - arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 1 - arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 1 - arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 1 - arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 1 - arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 1 - arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 1 - arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 1 - arch/arm/boot/dts/imx6qdl-rex.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 1 - arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 1 - arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 1 - arch/arm/boot/dts/imx6qdl-ts4900.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-tx6.dtsi | 1 - arch/arm/boot/dts/imx6sl-evk.dts | 1 - arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 1 - arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 1 - arch/arm/boot/dts/imx7d-sdb.dts | 1 - 48 files changed, 58 deletions(-) commit b40881738f098e1be5c32e89c2691b688fc00875 Author: Bartosz Golaszewski Date: Wed Dec 7 16:22:18 2016 +0100 ARM: davinci: da850: fix da850_set_pll0rate() This function is confusing - its second argument is an index to the freq table, not the requested clock rate in Hz, but it's used as the set_rate callback for the pll0 clock. It leads to an oops when the caller doesn't know the internals and passes the rate in Hz as argument instead of the cpufreq index since this argument isn't bounds checked either. Fix it by iterating over the array of supported frequencies and selecting a one that matches or returning -EINVAL for unsupported rates. Also: update the davinci cpufreq driver. It's the only user of this clock and currently it passes the cpufreq table index to clk_set_rate(), which is confusing. Make it pass the requested clock rate in Hz. Signed-off-by: Bartosz Golaszewski Acked-by: Viresh Kumar [nsekhar@ti.com: commit headline update] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da850.c | 22 ++++++++++++++++++---- drivers/cpufreq/davinci-cpufreq.c | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) commit 0a5011673af0fe995a3e448d3479a027a4082ddf Author: Bartosz Golaszewski Date: Wed Dec 7 16:22:17 2016 +0100 ARM: davinci: da850: coding style fix Fix alignment of the clock lookup table entries. Signed-off-by: Bartosz Golaszewski [nsekhar@ti.com: commit headline update] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da850.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e45ac1f0f86cea43cc501963cd9e65df4939b5b Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:13 2016 +0200 drm/i915: Move intel_atomic_get_shared_dpll_state() to intel_dpll_mgr.c The function intel_atomic_get_shared_dpll_state() is only called from intel_dpll_mgr.c and it concerns the same data structures as the other functions in that file, so move it there and make it static. Signed-off-by: Ander Conselvan de Oliveira Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-8-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_atomic.c | 31 ------------------------------- drivers/gpu/drm/i915/intel_dpll_mgr.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 -- 3 files changed, 31 insertions(+), 33 deletions(-) commit 27767d68a9ffa848f6f8ba0411122c54262d9e9e Author: Jörg Krause Date: Tue Dec 20 16:35:16 2016 +0100 ARM: dts: imx28: Add simple-card support Add simple-card support to SAIF0 and SAIF1. Signed-off-by: Jörg Krause Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 4541d31e2ab547fa0eea8ce22d3593d0f4cce1fd Author: Daniel Vetter Date: Mon Jan 2 09:17:26 2017 +0100 drm/bridge: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... Cc: Archit Taneja Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Archit Taneja [danvet: Remove spurious hunk that Archit spotted.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-13-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_bridge.c | 27 ++++++++++++--------------- include/drm/drm_bridge.h | 42 ++++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 33 deletions(-) commit 9690e915a65528b146444f2eb2aa0181f940591c Author: Arnd Bergmann Date: Fri Dec 16 10:05:08 2016 +0100 ARM: imx: remove unused device definitions I stumbled over these during build testing, they are evidently not referenced anywhere any more. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo arch/arm/mach-imx/devices/platform-flexcan.c | 9 --------- arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c | 10 ---------- 2 files changed, 19 deletions(-) commit 2bc7b91a69854a297e7774a308bd3f86bd6d8e22 Author: Fabio Estevam Date: Mon Dec 5 17:28:39 2016 -0200 ARM: dts: imx6sx-udoo-neo: Pass the 'phy-reset-duration' property imx6sx-udoo-neo has a KSZ8091 Ethernet PHY, which requires the reset signal to be low for at least 10ms. Pass the 'phy-reset-duration' property to reflect such requirement. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 1 + 1 file changed, 1 insertion(+) commit b0b09f62648a704f0d29502a3768f5e9444ba3cd Author: Gary Bisson Date: Fri Dec 2 10:08:39 2016 +0100 ARM: dts: boundary: remove hardcoded LVDS bus format The bus format is therefore retrieved from the connected panel information. Signed-off-by: Gary Bisson Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ---- arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 -- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 2 -- 5 files changed, 12 deletions(-) commit 1eac1e3dd4c341b1f9b45d67679d092188b29d34 Author: Christopher Spinrath Date: Wed Nov 23 01:07:57 2016 +0100 ARM: dts: imx6q-cm-fx6: enable S/PDIF support Enable the S/PDIF transceiver present on the cm-fx6 module. Signed-off-by: Christopher Spinrath Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-cm-fx6.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5051bff33102bc8a6497c11671297f1698a5a56e Author: Tim Harvey Date: Wed Nov 16 11:40:45 2016 -0800 ARM: dts: imx: ventana: add LTC3676 PMIC support All of the Gateworks Ventana boards based on the IMX6 SoC except for the GW54xx use the LTC3676 PMIC. Add a device-tree node with interrupt support for this PMIC. Additionally remove the simple-bus notation in the regulator nodes and any fixed regulators that are provided by the PMIC. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 132 ++++++++++++++++++++------- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 165 ++++++++++++++++++++++++---------- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 163 +++++++++++++++++++++++---------- arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 132 +++++++++++++++++++++------ arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 130 +++++++++++++++++++++------ arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 98 ++++++++++++++++++-- 6 files changed, 630 insertions(+), 190 deletions(-) commit b0a5c46d6f1d0521bbbca9631da51b3fe1dc89e3 Author: Tim Harvey Date: Wed Nov 16 08:26:40 2016 -0800 ARM: dts: imx: add SPI to GW54xx The GW54xx revision E adds SPI via an off-board connector. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit d447dd884af380d245207e6ce99a5fb8cba41b7c Author: Fabio Estevam Date: Wed Nov 16 13:15:38 2016 -0200 ARM: dts: imx: Adjust CPU nodes Make CPU nodes consistent throughout the i.MX dts files, which also matches the description from ePAPR spec. This also fixes the following W=1 warning in some cases: Warning (unit_address_vs_reg): Node /cpus/cpu@0 has a unit name, but no reg property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx1.dtsi | 3 ++- arch/arm/boot/dts/imx23.dtsi | 5 +++-- arch/arm/boot/dts/imx25.dtsi | 5 +++-- arch/arm/boot/dts/imx27.dtsi | 1 + arch/arm/boot/dts/imx28.dtsi | 5 +++-- arch/arm/boot/dts/imx31.dtsi | 5 +++-- arch/arm/boot/dts/imx35.dtsi | 5 +++-- 7 files changed, 18 insertions(+), 11 deletions(-) commit 156ae09245c4c49c8eb4a0898411ee260966331d Author: Shawn Guo Date: Thu Dec 15 22:03:37 2016 +0800 dmaengine: zx: fix residue calculation The dma residue is defined as the free space to end of transfer buffer, which could be multiple segments chained together. So the residue calculation in zx_dma_tx_status() works for both slave_sg and cyclic case. But unfortunately, the 'index' is wrong. It should plus one, because the current segment is already occupied and shouldn't be counted into free space. This fixes the HDMI audio noise issue we see on ZX296718 with SPDIF interface. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Vinod Koul drivers/dma/zx_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc318d64f3d91e15babac00e08354b1beb650b57 Author: Shawn Guo Date: Thu Dec 15 22:03:36 2016 +0800 dmaengine: zx: set DMA_CYCLIC cap_mask bit The zx_dma driver supports cyclic transfer mode. Let's set DMA_CYCLIC cap_mask bit to make that clear, and avoid unnecessary failure when clients request channel via dma_request_chan_by_mask() with DMA_CYCLIC bit set in mask. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Vinod Koul drivers/dma/zx_dma.c | 1 + 1 file changed, 1 insertion(+) commit 253f9f4412e0113fd83471e9a3b1aa9f85ce87c3 Author: Shawn Guo Date: Thu Dec 15 22:03:35 2016 +0800 dmaengine: zx: rename zx296702_dma.c to zx_dma.c ZTE ZX dma driver is not ZX296702 specific. It works for not only ZX296702 but also other ZTE ZX family platforms like ZX296718. Let's rename the file to reflect that. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Vinod Koul drivers/dma/Kconfig | 4 +- drivers/dma/Makefile | 2 +- drivers/dma/zx296702_dma.c | 950 --------------------------------------------- drivers/dma/zx_dma.c | 950 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 953 insertions(+), 953 deletions(-) commit adee40b265d7568296e218f079f478197ffa15bf Author: Magnus Lilja Date: Wed Dec 21 22:13:58 2016 +0100 dmaengine: ipu: Make sure the interrupt routine checks all interrupts. Commit 3d8cc00073d6 ("dmaengine: ipu: Consolidate duplicated irq handlers") consolidated the two interrupts routines into one, but the remaining interrupt routine only checks the status of the error interrupts, not the normal interrupts. This patch fixes that problem (tested on i.MX31 PDK board). Fixes: 3d8cc00073d6 ("dmaengine: ipu: Consolidate duplicated irq handlers") Cc: Vinod Koul Cc: # 4.1.x Signed-off-by: Magnus Lilja Signed-off-by: Vinod Koul drivers/dma/ipu/ipu_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4c5cd695fdeab96584b850415beb355f1509c19 Author: Amit Kumar Date: Tue Dec 20 19:07:35 2016 +0530 dmaengine: qcom_hidma: Wrong domain name in the email address cudeaurora.org is used in place of codeaurora.org in the contact field. Signed-off-by: Amit Kumar Signed-off-by: Vinod Koul Documentation/ABI/testing/sysfs-platform-hidma | 2 +- Documentation/ABI/testing/sysfs-platform-hidma-mgmt | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) commit adc064cd9f6ee7a8b426955e6a28191abc9d0e8e Author: Matthew Wilcox Date: Thu Dec 15 08:57:51 2016 -0800 dmaengine: Convert ID allocation to an IDA dmaengine currently uses an IDR to allocate DMA IDs, but it only needs to know whether IDs are in use or not; the ID to pointer functionality of the IDR is unused. That means it can use the more space-efficient IDA. Signed-off-by: Matthew Wilcox Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 4b64e1a40c095f82ea6fbf4a0c11143532bb85a5 Merge: 6b6bbb5 ce74292 Author: David S. Miller Date: Sun Jan 1 21:02:21 2017 -0500 Merge branch 'qed-driver-updates' Yuval Mintz says: ==================== qed*: Driver updates The more interesting changes in this series include: - Restructuring of the qede files - qede_main.c has grown big and this series splits it into 3 parts [patches #2 and #3]. - Some significant changes in the API through which RSS indirection table gets configured [#8]. - Support for ndo_set_vf_trust() [#9] which would regulate which VFs are allowed to use promisc/multi-promisc mode. It also contains various minor changes to qed/qede, as well as non-functional changes [#1, #12] to complement other changes. ==================== Signed-off-by: David S. Miller commit ce742922acdc4219509bf5b57e0a073990abfa28 Author: Mintz, Yuval Date: Sun Jan 1 13:57:11 2017 +0200 qed*: Advance driver versions to 8.10.10.20. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1fe582ecade714e90e71c67c32edb7b5b809d651 Author: Ram Amrani Date: Sun Jan 1 13:57:10 2017 +0200 qed: Conserve RDMA resources when !QEDR If qedr isn't part of the kernel then don't allocate RDMA resources for it in qed. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8806787609dea02c333b187f94c1556798ac8897 Author: Mintz, Yuval Date: Sun Jan 1 13:57:09 2017 +0200 qed: Support Multicast on Tx-switching Currently multicast traffic wouldn't be routed internally to listener; Instead it would only be sent to network via the physical carrier. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f990c82c385b1d9ce6acadb668df313c693cf48f Author: Mintz, Yuval Date: Sun Jan 1 13:57:08 2017 +0200 qed*: Add support for ndo_set_vf_trust Trusted VFs would be allowed to receive promiscuous and multicast promiscuous data. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 128 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 9 ++ drivers/net/ethernet/qlogic/qede/qede_filter.c | 20 ++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 11 +++ include/linux/qed/qed_iov_if.h | 2 + 5 files changed, 162 insertions(+), 8 deletions(-) commit f29ffdb65ff0eaf95d2a2b80f0dee3fbd5a64772 Author: Mintz, Yuval Date: Sun Jan 1 13:57:07 2017 +0200 qed*: RSS indirection based on queue-handles A step toward having qede agnostic to the queue configurations in firmware/hardware - let the RSS indirections use queue handles instead of actual queue indices. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 232 +++++++++++++++--------- drivers/net/ethernet/qlogic/qed/qed_l2.h | 28 +-- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 82 +++++---- drivers/net/ethernet/qlogic/qed/qed_vf.c | 12 +- drivers/net/ethernet/qlogic/qede/qede.h | 6 +- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 77 ++++---- drivers/net/ethernet/qlogic/qede/qede_filter.c | 92 ++++++++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 126 +++++-------- include/linux/qed/qed_eth_if.h | 2 +- 9 files changed, 392 insertions(+), 265 deletions(-) commit 04e0fd006a9a670f557815b29ea89ffdac667c4d Author: Mintz, Yuval Date: Sun Jan 1 13:57:06 2017 +0200 qede: Remove unnecessary datapath dereference Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ca547bdb00e3b162e8ed2889161b93eba9def0b Author: Manish Chopra Date: Sun Jan 1 13:57:05 2017 +0200 qede - mark SKB as encapsulated When driver receives a recognized encapsulated packet it needs to set the skb->encapsulation field as well. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_fp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e3eef7ee0201dbe5f4fc011b58d26228b57736ce Author: Mintz, Yuval Date: Sun Jan 1 13:57:04 2017 +0200 qede: Postpone reallocation until NAPI end During Rx flow driver allocates a replacement buffer each time it consumes an Rx buffer. Failing to do so, it would consume the currently processed buffer and re-post it on the ring. As a result, the Rx ring is always completely full [from driver POV]. We now allow the Rx ring to shorten by doing the re-allocations at the end of the NAPI run. The only limitation is that we still want to make sure each time we reallocate that we'd still have sufficient elements in the Rx ring to guarantee that FW would be able to post additional data and trigger an interrupt. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 7 +++++-- drivers/net/ethernet/qlogic/qede/qede_fp.c | 23 +++++++++++++++++++---- drivers/net/ethernet/qlogic/qede/qede_main.c | 3 ++- 3 files changed, 26 insertions(+), 7 deletions(-) commit e1d32acbcbd35af5264acc70ff03bf8da9e447a8 Author: Mintz, Yuval Date: Sun Jan 1 13:57:03 2017 +0200 qed*: Change maximal number of queues Today qede requests contexts that would suffice for 64 'whole' combined queues [192 meant for 64 rx, tx and xdp tx queues], but registers netdev and limits the number of queues based on information received by qed. In turn, qed doesn't take context into account when informing qede how many queues it can support. This would lead to a configuration problem in case user tries configuring >64 combined queues to interface [or >96 in case xdp isn't enabled]. Since we don't have a mangement firware that actually provides so many interrupt lines to a single device we're currently safe but that's about to change soon. The new maximum is hence changed: - For RoCE devices, the limit would remain 64. - For non-RoCE devices, the limit might be higher [depending on the actual configuration of the device]. qed would start enforcing that limit in both scenarios. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 32 ++++++++++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed_main.c | 11 ++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 3 files changed, 37 insertions(+), 8 deletions(-) commit aed284c7f0d9d33ce34fadade605b33e8683b7ed Author: Mintz, Yuval Date: Sun Jan 1 13:57:02 2017 +0200 qede: Split filtering logic to its own file This takes the various filtering logic of the driver and moves them into their own dedicated file - qede_filter.c. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/Makefile | 2 +- drivers/net/ethernet/qlogic/qede/qede.h | 22 + drivers/net/ethernet/qlogic/qede/qede_filter.c | 687 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 654 ----------------------- 4 files changed, 710 insertions(+), 655 deletions(-) commit cdda926d4098690de0d74ad6e7bb51bf4d7a4104 Author: Mintz, Yuval Date: Sun Jan 1 13:57:01 2017 +0200 qede: Break datapath logic into its own file This adds a new file qede_fp.c and relocates the datapath-related logic into it [from qede_main.c]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/Makefile | 2 +- drivers/net/ethernet/qlogic/qede/qede.h | 11 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 1674 ++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 1636 ------------------------- 4 files changed, 1686 insertions(+), 1637 deletions(-) commit e8f1cb507d01205e03f69809af4347ed8ec9db5b Author: Mintz, Yuval Date: Sun Jan 1 13:57:00 2017 +0200 qed*: Update to dual-license Since the submission of the qedr driver, there's inconsistency in the licensing of the various qed/qede files - some are GPLv2 and some are dual-license. Since qedr requires dual-license and it's dependent on both, we're updating the licensing of all qed/qede source files. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_dev.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_hw.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_hw.h | 32 ++++++++++++++++--- .../net/ethernet/qlogic/qed/qed_init_fw_funcs.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_init_ops.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_int.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_int.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_iscsi.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_l2.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_l2.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 31 +++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 31 +++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_main.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_ooo.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_ooo.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_roce.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_selftest.c | 32 +++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sp.h | 34 +++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_spq.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_vf.c | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_vf.h | 32 ++++++++++++++++--- drivers/net/ethernet/qlogic/qede/qede.h | 37 ++++++++++++++++++---- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 37 ++++++++++++++++++---- drivers/net/ethernet/qlogic/qede/qede_main.c | 37 ++++++++++++++++++---- drivers/net/ethernet/qlogic/qede/qede_roce.c | 2 +- include/linux/qed/common_hsi.h | 33 ++++++++++++++++--- include/linux/qed/eth_common.h | 32 ++++++++++++++++--- include/linux/qed/iscsi_common.h | 32 ++++++++++++++++--- include/linux/qed/qed_chain.h | 34 +++++++++++++++++--- include/linux/qed/qed_eth_if.h | 32 ++++++++++++++++--- include/linux/qed/qed_if.h | 35 ++++++++++++++++---- include/linux/qed/qed_iov_if.h | 32 ++++++++++++++++--- include/linux/qed/qed_iscsi_if.h | 32 ++++++++++++++++--- include/linux/qed/qed_ll2_if.h | 31 +++++++++++++++--- include/linux/qed/qed_roce_if.h | 2 +- include/linux/qed/qede_roce.h | 2 +- include/linux/qed/rdma_common.h | 32 ++++++++++++++++--- include/linux/qed/roce_common.h | 32 ++++++++++++++++--- include/linux/qed/storage_common.h | 32 ++++++++++++++++--- include/linux/qed/tcp_common.h | 32 ++++++++++++++++--- 56 files changed, 1449 insertions(+), 223 deletions(-) commit 58ae74683ae2c07cd717a91799edb50231061938 Author: Richard Weinberger Date: Mon Dec 19 12:25:32 2016 +0100 fscrypt: factor out bio specific functions That way we can get rid of the direct dependency on CONFIG_BLOCK. Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Reported-by: Arnd Bergmann Reported-by: Randy Dunlap Reviewed-by: Eric Biggers Reviewed-by: Christoph Hellwig Reviewed-by: David Gstir Signed-off-by: Richard Weinberger Signed-off-by: Theodore Ts'o fs/crypto/Kconfig | 1 - fs/crypto/Makefile | 1 + fs/crypto/bio.c | 145 ++++++++++++++++++++++++++++++++++++++++ fs/crypto/crypto.c | 157 +++++--------------------------------------- fs/crypto/fscrypt_private.h | 16 ++++- include/linux/fscrypto.h | 11 ++-- 6 files changed, 184 insertions(+), 147 deletions(-) commit e16e558e83ed848f5dac3931dc7549d7a3090f7e Author: Colin Ian King Date: Fri Dec 30 14:50:27 2016 +0000 rtlwifi: fix spelling mistake: "encrypiton" -> "encryption" 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/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a60db8e70313a63e1fa10b9687ed549f6e85cdff Author: Colin Ian King Date: Thu Dec 29 20:14:00 2016 +0000 wlcore: fix spelling mistake in wl1271_warning trivial fix to spelling mistake of function name in wl1271_warning, should be dynamic_ps_timeout instead of dyanmic_ps_timeout. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50913e32c6cf8f76f5a47365b025e26fcff87595 Merge: ad334bb 34c30b0 Author: Kalle Valo Date: Sun Jan 1 20:48:37 2017 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.11. Major changes: ath9k * cleanup eeprom endian handling * add airtime fairness scheduling ath10k * fix issues for new QCA9377 firmware version * support dev_coredump() for firmware crash dump * enable channel 169 on 5 GHz band commit 32bcad4b7f33f79847e6d4757e9cf26c6980bac6 Author: Simon Wunderlich Date: Thu Dec 15 18:13:23 2016 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efee590e4a3fa7b66f78aa06eff33f59570ca96d Author: Eric Biggers Date: Mon Dec 5 11:12:48 2016 -0800 fscrypt: pass up error codes from ->get_context() It was possible for the ->get_context() operation to fail with a specific error code, which was then not returned to the caller of FS_IOC_SET_ENCRYPTION_POLICY or FS_IOC_GET_ENCRYPTION_POLICY. Make sure to pass through these error codes. Also reorganize the code so that ->get_context() only needs to be called one time when setting an encryption policy, and handle contexts of unrecognized sizes more appropriately. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 54 +++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) commit 868e1bc64d04294b76f1c0eedb79e0742be441c7 Author: Eric Biggers Date: Mon Dec 5 11:12:47 2016 -0800 fscrypt: remove user-triggerable warning messages Several warning messages were not rate limited and were user-triggerable from FS_IOC_SET_ENCRYPTION_POLICY. These shouldn't really have been there in the first place, but either way they aren't as useful now that the error codes have been improved. So just remove them. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 8488cd96ff88966ccb076e4f3654f59d84ba686d Author: Eric Biggers Date: Mon Dec 5 11:12:46 2016 -0800 fscrypt: use EEXIST when file already uses different policy As part of an effort to clean up fscrypt-related error codes, make FS_IOC_SET_ENCRYPTION_POLICY fail with EEXIST when the file already uses a different encryption policy. This is more descriptive than EINVAL, which was ambiguous with some of the other error cases. I am not aware of any users who might be relying on the previous error code of EINVAL, which was never documented anywhere. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dffd0cfa06d4ed83bb3ae8eb067989ceec5d18e1 Author: Eric Biggers Date: Mon Dec 5 11:12:45 2016 -0800 fscrypt: use ENOTDIR when setting encryption policy on nondirectory As part of an effort to clean up fscrypt-related error codes, make FS_IOC_SET_ENCRYPTION_POLICY fail with ENOTDIR when the file descriptor does not refer to a directory. This is more descriptive than EINVAL, which was ambiguous with some of the other error cases. I am not aware of any users who might be relying on the previous error code of EINVAL, which was never documented anywhere, and in some buggy kernels did not exist at all as the S_ISDIR() check was missing. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54475f531bb8d7078f63c159e5e0615d486c498c Author: Eric Biggers Date: Mon Dec 5 11:12:44 2016 -0800 fscrypt: use ENOKEY when file cannot be created w/o key As part of an effort to clean up fscrypt-related error codes, make attempting to create a file in an encrypted directory that hasn't been "unlocked" fail with ENOKEY. Previously, several error codes were used for this case, including ENOENT, EACCES, and EPERM, and they were not consistent between and within filesystems. ENOKEY is a better choice because it expresses that the failure is due to lacking the encryption key. It also matches the error code returned when trying to open an encrypted regular file without the key. I am not aware of any users who might be relying on the previous inconsistent error codes, which were never documented anywhere. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 4 ++-- fs/ext4/ialloc.c | 2 +- fs/ext4/namei.c | 4 +++- fs/f2fs/dir.c | 5 ++++- fs/f2fs/namei.c | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) commit 7762681a3ada5fca6017e75ea7f9cdac08fc50b9 Author: Marcus Cooper Date: Tue Dec 20 15:49:14 2016 +0100 ASoC: sun4i-spdif: Add quirks to the spdif driver It has been seen that some newer SoCs have a different TX FIFO address and we already have the difference with the A31 requiring a reset. Add a quirks structure so that these can be managed easily. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit 96e53c41e1f81c9e9d1ce38d3f28b95668b71dcf Author: Marcus Cooper Date: Tue Dec 20 15:49:13 2016 +0100 ASoC: sun4i-spdif: remove legacy dapm components The dapm components are now handled by the ALSA SoC SPDIF DIT driver so can be removed. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 8 -------- 1 file changed, 8 deletions(-) commit 85798e153e6c3834ab2d69ee9d4db7d85f13809d Author: Romain Perier Date: Wed Dec 21 11:10:29 2016 +0100 spi: armada-3700: Coding style fixes The following warning are reported by checkpatch.pl: CHECK: Alignment should match open parenthesis +static void a3700_spi_transfer_setup(struct spi_device *spi, + struct spi_transfer *xfer) WARNING: Missing a blank line after declarations + u32 data = le32_to_cpu(val); + memcpy(a3700_spi->rx_buf, &data, 4); total: 0 errors, 1 warnings, 1 checks, 923 lines checked Signed-off-by: Romain Perier Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cfd6693c06324174ceeac7aed570a0df67db7c4f Author: Romain Perier Date: Wed Dec 21 11:10:30 2016 +0100 spi: armada-3700: Replaced raw values for nbits by the SPI macros Currently, function a3700_spi_pin_mode_set() configures the SPI transfer mode according to the value passed as second argument. This value is detected using the raw values from a switch case. This commit replaces these raw values by the corresponding macro constants in linux/spi/spi.h Signed-off-by: Romain Perier Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03303da5243f394f5cc5e530a8bc9f26ad2c79cb Author: Peter Ujfalusi Date: Fri Dec 23 11:21:11 2016 +0200 ASoC: tlv320aic3x: Add delay after power on and register sync When the codec is powered on, it's registers are in reset state as the power off will do a soft reset of the codec. After the register sync we need to add delay to remove the pop-noise on stream start. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 78d759daceaf0a7058f37c4142bdca9948b6d987 Author: Rafał Miłecki Date: Thu Dec 29 17:27:55 2016 +0100 spi: bcm53xx: set of_node to let DT specify device(s) Setting of_node of master's dev seems to be a common way of letting it work nicely with DT. This allows specifying device there instead of hardcoding one in the driver code. This was successfully tested with commit 1b47b98acce2 ("ARM: BCM5301X: Add DT entry for SPI controller and NOR flash") Signed-off-by: Rafał Miłecki Signed-off-by: Mark Brown drivers/spi/spi-bcm53xx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 9b41da80e09128574f09bed8dc5a5fc6f72a8239 Author: Marek Szyprowski Date: Thu Dec 29 12:34:07 2016 +0100 ASoC: samsung: i2s: Provide I2S device for registered clocks This patch adds pointer to I2S device to clk_register_* functions. This in the future allow clock framework to ensure proper runtime state of the I2S device during all operations on the clocks provided by I2S module. Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afa99da863e8e00efd8ce2f8840ed31d50abb889 Author: Marek Szyprowski Date: Thu Dec 29 12:34:06 2016 +0100 ASoC: samsung: i2s: Let runtime PM operations to control op_clk too This patch adds handling of parent operational clock to runtime PM callbacks. This way it is ensured that when I2S module is in runtime suspended state, all its parent clocks are disabled and unprepared. Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 5 +++++ 1 file changed, 5 insertions(+) commit e7e52dfc68a2160570c7ec51415e391961160edb Author: Marek Szyprowski Date: Thu Dec 29 12:34:05 2016 +0100 ASoC: samsung: i2s: Move saving and restoring regs to runtime pm operations This patch moves saving and restoring I2S registers to runtime PM operations, what prepares the driver to operate with audio power domain. When support for audio power domain is enabled and the domain is being turned off, the I2S module will loose its context (registers), so runtime callbacks have to handle it. System sleep suspend/resume operation are implemented on top of runtime PM operations with generic pm_runtime_force_suspend/resume helpers. Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit dc938ddb56283a0b71d987e7ecd4be90390985d6 Author: Marek Szyprowski Date: Thu Dec 29 12:34:04 2016 +0100 ASoC: samsung: i2s: Ensure proper runtime PM state of I2S device This patch adds calls to pm_runtime_get/put to ensure that any access to I2S registers is done with proper (active) runtime PM state of I2S device. Till now the driver enabled runtime PM, but didn't manage the state during driver operation. The driver worked fine only because the runtime PM callbacks managed device clock, which was enabled all the time because of the additional enable call in the driver's probe function. Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 54 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 8 deletions(-) commit be2c92eb64023e294d6bb9232578963670bb121b Author: Marek Szyprowski Date: Thu Dec 29 12:34:03 2016 +0100 ASoC: samsung: i2s: Remove virtual device for secondary DAI For some unknown (maybe historical?) reasons support for secondary I2S DAI was implemented by adding additional virtual platform device, which was then probed again with the main I2S driver. This pattern is really hard to follow and provides no benefits, so lets remove this hack and register both DAIs during linear probe of Exynos I2S controller driver. Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 102 ++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 76 deletions(-) commit 279e4af7b4bebc6a5bf2d0e5b3209f3dcea94a19 Author: Jaedon Shin Date: Fri Dec 30 15:30:00 2016 +0900 spi: bcm-qspi: Enable the driver on BMIPS_GENERIC The Broadcom BCM7XXX ARM and MIPS based SoCs share a similar hardware block for SPI. Signed-off-by: Jaedon Shin Acked-by: Florian Fainelli Signed-off-by: Mark Brown drivers/spi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b257c1a45e9967ad84f9c5d40e657074d979ce70 Author: Matt Ranostay Date: Wed Dec 28 21:13:06 2016 -0800 iio: pulsedlight-lidar-lite-v2: add lidar-lite-v3 property Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 ++ 1 file changed, 2 insertions(+) commit 9b27c270d40335d407072815172f27293e63decb Author: Matt Ranostay Date: Wed Dec 28 21:13:05 2016 -0800 devicetree: add Garmin vendor prefix Cc: Rob Herring Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit fe88d122e6aeb86b3bffc76a997ce439cb6f031a Author: Chris Wilson Date: Sat Dec 31 11:20:12 2016 +0000 drm/i915: Drop kerneldoc markup from non-kerneldoc enum drrs_refresh_rate_type DRRS is not yet kerneldoc despite the allusion prior to enum drrs_refresh_rate_type. Drop the '**' to avoid the warnings from make htmldocs. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161231112012.29263-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6095868a271d18d0144d26828c5b8c7de390ff5c Author: Chris Wilson Date: Sat Dec 31 11:20:11 2016 +0000 drm/i915: Complete kerneldoc for struct i915_gem_context The existing kerneldoc was outdated, so time for a refresh. v2: Use single line kdoc, mention functions for manipulation Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161231112012.29263-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 99 +---------- drivers/gpu/drm/i915/i915_gem.c | 26 +-- drivers/gpu/drm/i915/i915_gem_context.c | 33 ++-- drivers/gpu/drm/i915/i915_gem_context.h | 272 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 7 files changed, 301 insertions(+), 135 deletions(-) commit a73c7a4427386a22d4fe48e8539a8d0ce9c54c35 Author: Chris Wilson Date: Sat Dec 31 11:20:10 2016 +0000 drm/i915: Fix kerneldoc for i915_gem_object_pin_map() Parameter - no. Parameter: yes. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161231112012.29263-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a5580a2a69ae0681805638d1f5c66f544bd9c2a Author: Chris Wilson Date: Sat Dec 31 11:20:09 2016 +0000 drm/i915: Move assert of page pin vs bind count into i915_vma_unbind The read of the page pin count and the bind count are unordered, presenting races in the assert and it firing off incorrectly. Prevent this by restricting the assert to the vma bind/unbind routines where we have local cpu ordering between the two. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161231112012.29263-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_vma.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 6b6bbb5922a4b1d4b58125a572da91010295fba3 Author: Thomas Preisner Date: Fri Dec 30 03:37:54 2016 +0100 net: 3com: typhoon: typhoon_init_one: make return values more specific In some cases the return value of a failing function is not being used and the function typhoon_init_one() returns another negative error code instead. Signed-off-by: Thomas Preisner Signed-off-by: Milan Stephan Signed-off-by: David S. Miller drivers/net/ethernet/3com/typhoon.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 107fded7bf616ad6f46823d98b8ed6405d7adf2d Author: Thomas Preisner Date: Fri Dec 30 03:37:53 2016 +0100 net: 3com: typhoon: typhoon_init_one: fix incorrect return values In a few cases the err-variable is not set to a negative error code if a function call in typhoon_init_one() fails and thus 0 is returned instead. It may be better to set err to the appropriate negative error code before returning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188841 Reported-by: Pan Bian Signed-off-by: Thomas Preisner Signed-off-by: Milan Stephan Signed-off-by: David S. Miller drivers/net/ethernet/3com/typhoon.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7bb387c5ab12aeac3d5eea28686489ff46b53ca9 Author: David Ahern Date: Thu Dec 29 15:39:37 2016 -0800 net: Allow IP_MULTICAST_IF to set index to L3 slave IP_MULTICAST_IF fails if sk_bound_dev_if is already set and the new index does not match it. e.g., ntpd[15381]: setsockopt IP_MULTICAST_IF 192.168.1.23 fails: Invalid argument Relax the check in setsockopt to allow setting mc_index to an L3 slave if sk_bound_dev_if points to an L3 master. Make a similar change for IPv6. In this case change the device lookup to take the rcu_read_lock avoiding a refcnt. The rcu lock is also needed for the lookup of a potential L3 master device. This really only silences a setsockopt failure since uses of mc_index are secondary to sk_bound_dev_if if it is set. In both cases, if either index is an L3 slave or master, lookups are directed to the same FIB table so relaxing the check at setsockopt time causes no harm. Patch is based on a suggested change by Darwin for a problem noted in their code base. Suggested-by: Darwin Dingel Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 7 ++++++- net/ipv6/ipv6_sockglue.c | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) commit f792e3503ff40b73996a0a4428374e9fa5d03fd1 Author: Colin Ian King Date: Wed Dec 28 17:40:23 2016 +0000 iio: Documentation: fix spelling mistake: "deactived" -> "deactivated" trivial fix to spelling mistake in iio documentation Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a18636ebbac06783180873cb8bcec115323ffc2 Author: Scott Matheina Date: Sun Dec 25 13:56:42 2016 -0600 staging:iio:adt7316: Fix braces not present on all arms of if else statement Adds braces to second arm of if else statement. Signed-off-by: Scott Matheina Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 83b0b397b909bea2fb0db1fb4e1b35403a61f2a1 Author: Peter Meerwald-Stadler Date: Tue Dec 20 17:38:10 2016 +0100 iio: dummy: No semicolon at end of function definition Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/dummy/iio_simple_dummy.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2cc5b0df86dc2e8b3fa0309d145e6ab5f529eff7 Author: Michael Hennerich Date: Mon Dec 19 13:10:39 2016 +0100 iio: dac: ad5593r: Add ACPI support This patch adds the ACPI/PNP ID. The AD5592/3 driver core is already designed around the unified device property API. Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5593r.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b0570bcee39a313aea693612d061d6417ab06a2e Author: Michael Hennerich Date: Mon Dec 19 13:10:38 2016 +0100 iio: dac: ad5592r: Add ACPI support This patch adds the ACPI/PNP ID. The AD5592/3 driver core is already designed around the unified device property API. Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5592r.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8afa505c123068bd75c4d0ca42d362942a69ef15 Author: Linus Walleij Date: Sun Dec 18 22:56:05 2016 +0100 iio: light: add driver for Capella CM3605 This adds a driver for the Capella Microsystems CM3605 Ambient Light Sensor and proximity sensor. This is a pretty simple entirely analog device that is interfaced with the target system using the POUT (proximity out) and AOUT (ambient light out) signals. The POUT signal is a simple high/low signal that indicates whether an object is in proximity, most typically used to detect a face in front of a mobile device. The signal requires that an infrared LED is mounted next to the device, making IR light reflect off the object in proximity and triggering the POUT signal. We grab a GPIO pin to handle the POUT signal as an interrupt line and register this as an event channel for the sensor. Since the proximity sensor requires an IR LED, we add a LED trigger named "cm3605" so that the infrared LED can just associate with this trigger to be sure it is always on when the proximity sensor needs it. The AOUT is an analog voltage between 0 and 1550 mV that indicate the LUX value in the ambient light: this is orthogonal to the proximity sensor functionality. Since this analog voltage needs to be converted into a digital value, the driver grabs an IIO channel named "aout" associated with the device. This patch created a combined ALS and proximity sensor driver. The former supports raw reads of the LUX value and the latter will generate proximity events. To integrate this properly with Linux we also add a supply regulator for the VDD pin (driving both functions) and add device tree bindings to define the RSET resistor that in turn configures the luminosity range of the ALS sensor. Since the sensor needs to be on more or less constantly, we restrict the power management to system suspend/resume: we disable the IR LED and disable the regulator for VDD on suspend and take them back up on resume. Tests: cd /sys/bus/iio/devices/iio:device1 cat in_illuminance_raw 304 (hold hand over sensor) cat in_illuminance_raw 17 iio_event_monitor cm3605 Found IIO device with name cm3605 with device number 1 (hold hand over sensor) Event: time: 2444842301447, type: proximity, channel: 0, evtype: thresh, direction: falling (remove hand over sensor) Event: time: 2445583440706, type: proximity, channel: 0, evtype: thresh, direction: rising Cc: Capella Microsystems Cc: Kevin Tsai Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/light/Kconfig | 10 ++ drivers/iio/light/Makefile | 1 + drivers/iio/light/cm3605.c | 330 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 341 insertions(+) commit 170df593a4e4b2750fe1a141bda5174c66206f3e Author: Linus Walleij Date: Sun Dec 18 22:55:55 2016 +0100 iio: light: add DT bindings for Capella CM3605 This adds device tree bindings for the Capella Microsystems CM3605 ambient light sensor and short range proximity sensor. Cc: devicetree@vger.kernel.org Cc: Capella Microsystems Cc: Kevin Tsai Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/light/cm3605.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 578f8d77089290a7c67989fe48ad9304f8b88e8f Author: Kweh, Hock Leong Date: Thu Dec 15 13:48:21 2016 -0800 iio: light: hid-sensor-als: Add duplicate IIO_LIGHT channel There is one light sensor type defined in the sensor hub specification, which has one Illuminance field. It doesn't distinguish between ambient light sensor or color sensor. Currently it is presented as IIO_INTENSITY channel. There are some user spaces specifically looking for IIO_LIGHT channel. To satisfy such user spaces this change also add a duplicate IIO_LIGHT channel. The units of measurement of Illuminance field is Lux, so it is still compatible to IIO ABI. Signed-off-by: Kweh, Hock Leong Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/light/hid-sensor-als.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 421242aab39ebf45c34eb668b267f3861c8bcab2 Author: Daniel Vetter Date: Thu Dec 29 21:48:34 2016 +0100 drm/cma-helpers: Use recommened kerneldoc for struct member refs I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... v2: Review from Laurent: - Move misplaced doc change to the right patch. - Remove "DRM driver's", it's redundant. - Spotted 3 more places where where we could add prose reference with a real one. Cc: Laurent Pinchart Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-14-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_cma_helper.c | 26 +++++++++++++------------- drivers/gpu/drm/drm_gem_cma_helper.c | 22 +++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) commit b112481bb327c0fc7c65767b71b87a033688a892 Author: Daniel Vetter Date: Thu Dec 29 21:48:31 2016 +0100 drm/cma-helper: simplify setup for drivers with ->dirty callbacks If we store the fb funcs pointer, we can remove a bit of boilerplate. Also remove the _fbdev_ in the example code, since the fb_funcs->dirty callback has nothing to do with fbdev. It's a KMS feature, only used by the fbdev deferred_io support to implement flushing/upload. Cc: Noralf Trønnes Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart [danvet: Move the misplaced kerneldoc change from a later patch to this one here.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-11-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_cma_helper.c | 60 +++++++++++++------------------------ include/drm/drm_fb_cma_helper.h | 5 +--- 2 files changed, 22 insertions(+), 43 deletions(-) commit 7357f89954b6d005df6ab8929759e78d7d9a80f9 Author: Daniel Vetter Date: Fri Dec 30 17:38:52 2016 +0100 drm/armada: Fix compile fail I reported the include issue for tracepoints a while ago, but nothing seems to have happened. Now it bit us, since the drm_mm_print conversion was broken for armada. Fix it, so I can re-enable armada in the drm-misc build configs. v2: Rebase just the compile fix on top of Chris' build fix. Cc: Russell King Cc: Chris Wilson Acked: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483115932-19584-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/armada/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 433e404f07bee649e46b7f3cd951bc05b0150b3a Author: Chris Wilson Date: Fri Dec 30 14:55:10 2016 +0000 drm/armada: s/drm_mm_dump_table/drm_mm_print/ Missed rename during v2 of b5c3714fe878 ("drm/mm: Convert to drm_printer") Reported-by: kbuild test robot Fixes: b5c3714fe878 ("drm/mm: Convert to drm_printer") Signed-off-by: Chris Wilson Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161230145510.12951-1-chris@chris-wilson.co.uk drivers/gpu/drm/armada/armada_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80b7a2e2498bcffb1a79980dfbeb7a1275577b28 Author: Bartlomiej Zolnierkiewicz Date: Thu Dec 29 14:36:51 2016 +0100 ARM: dts: exynos: Add CPU OPPs for Exynos4412 Prime Add CPU operating points for Exynos4412 Prime (it supports additional 1704MHz & 1600MHz OPPs and 1500MHz OPP is just a regular non-turbo OPP on this SoC). Also update relevant cooling maps to account for new OPPs. ODROID-X2/U2/U3 boards use Exynos4412 Prime SoC version so update their board files accordingly. Based on Hardkernel's kernel for ODROID-X2/U2/U3 boards. Cc: Doug Anderson Cc: Andreas Faerber Cc: Thomas Abraham Cc: Tobias Jakobi Cc: Ben Gamari Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 +-- arch/arm/boot/dts/exynos4412-odroidu3.dts | 5 +-- arch/arm/boot/dts/exynos4412-odroidx2.dts | 1 + arch/arm/boot/dts/exynos4412-prime.dtsi | 41 +++++++++++++++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 2 +- 5 files changed, 48 insertions(+), 5 deletions(-) commit 5fab38e93200307f08b7fc9e585a72dc7b35e27d Merge: 3590312 c369596 Author: Krzysztof Kozlowski Date: Fri Dec 30 16:44:05 2016 +0200 Merge tag 'clk-v4.11-exynos4-pll' of git://linuxtv.org/snawrocki/samsung into next/dt Addition of the CPU clock configuration data for Exynos4412 Prime SoC variant. commit 6098909cf2d0f9dda63aed3b6651d91f7ce6a473 Author: Chris Wilson Date: Fri Dec 30 14:16:39 2016 +0000 drm: Avoid NULL dereference of drm_device.dev For a virtual device, drm_device.dev is NULL, so becareful not to dereference it unconditionally in core code such as drm_dev_register(). Fixes: 75f6dfe3e652 ("drm: Deduplicate driver initialization message") Signed-off-by: Chris Wilson Cc: Gabriel Krisman Bertazi Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161230141639.10487-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ad334bbb07b07e2873942571b0c9f3c34571bd47 Author: Colin Ian King Date: Fri Dec 23 00:43:22 2016 +0000 brcmfmac: fix spelling mistakes on "Ivalid" Trivial fixes to spelling mistake "Ivalid" to "Invalid" in brcmf_err error messages. Signed-off-by: Colin Ian King Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b1fc7680a0f86be1d6f6bdf1143b3746e6b8d74 Author: Colin Ian King Date: Thu Dec 29 16:00:29 2016 +0000 rtlwifi: fix spelling mistake: "contry" -> "country" trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40b368af4b750863b2cb66a3a9513241db2f0793 Author: Ping-Ke Shih Date: Wed Dec 28 15:40:04 2016 -0600 rtlwifi: Fix alignment issues The addresses of Wlan NIC registers are natural alignment, but some drivers have bugs. These are evident on platforms that need natural alignment to access registers. This change contains the following: 1. Function _rtl8821ae_dbi_read() is used to read one byte from DBI, thus it should use rtl_read_byte(). 2. Register 0x4C7 of 8192ee is single byte. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Stable Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 26eb994d52399a4767be30ccc2a7d68a0f34cadc Author: Bhumika Goyal Date: Sun Dec 18 04:27:24 2016 +0530 libertas: constify cfg80211_ops structures cfg80211_ops structures are only passed as an argument to the function wiphy_new. This argument is of type const, so cfg80211_ops strutures having this property can be declared as const. Done using Coccinelle @r1 disable optional_qualifier @ identifier i; position p; @@ static struct cfg80211_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ wiphy_new(&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct cfg80211_ops i; File size before: text data bss dec hex filename 21225 1954 16 23195 5a9b wireless/marvell/libertas/cfg.o File size after: text data bss dec hex filename 22041 1154 16 23211 5aab wireless/marvell/libertas/cfg.o Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c93ac39da006457fc5b9b74f1505624dd509bf68 Author: Larry Finger Date: Thu Dec 15 12:23:10 2016 -0600 rtlwifi: Remove some redundant code The symbol DBG_EMERG is no longer used and is removed. In a number of places, the code has redundant messages. For example, if the failure for the firmware to run is logged, it is not necessary to log that the firmware has been started. In addition, extraneous braces are removed. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/debug.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 6 +----- .../net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 6 +----- drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 10 ++-------- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 19 ++----------------- .../wireless/realtek/rtlwifi/rtl8723com/fw_common.c | 9 +-------- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 16 +++------------- 7 files changed, 11 insertions(+), 57 deletions(-) commit 02527a73beb344f8f7fff39c04e29a94127b8ee8 Author: Larry Finger Date: Thu Dec 15 12:23:09 2016 -0600 rtlwifi: rtl8188ee: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 34 +++++++--------------- .../net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 31 ++++++++------------ .../net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 25 ++++++++-------- .../net/wireless/realtek/rtlwifi/rtl8188ee/rf.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 8 ++--- 5 files changed, 38 insertions(+), 63 deletions(-) commit 0fc30e9350befdc1b5c8367d208fb7e2d68c0031 Author: Larry Finger Date: Thu Dec 15 12:23:08 2016 -0600 rtlwifi: rtl8192c-common: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 34 +++++++--------------- .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 14 ++++----- 2 files changed, 17 insertions(+), 31 deletions(-) commit e40a005652ad55860300e36cd6a463c870c9dbcc Author: Larry Finger Date: Thu Dec 15 12:23:07 2016 -0600 rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 37 ++++++++-------------- .../net/wireless/realtek/rtlwifi/rtl8192ce/led.c | 7 ++-- .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.c | 15 ++++----- .../net/wireless/realtek/rtlwifi/rtl8192ce/rf.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 8 ++--- 5 files changed, 28 insertions(+), 42 deletions(-) commit c38af3f06af4780c3b245a67a89d991bdd36a1e0 Author: Larry Finger Date: Thu Dec 15 12:23:06 2016 -0600 rtlwifi: rtl8192cu: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 33 ++++++++-------------- .../net/wireless/realtek/rtlwifi/rtl8192cu/led.c | 8 +++--- .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c | 12 +++----- .../net/wireless/realtek/rtlwifi/rtl8192cu/phy.c | 15 +++++----- .../net/wireless/realtek/rtlwifi/rtl8192cu/rf.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 5 ++-- 6 files changed, 29 insertions(+), 47 deletions(-) commit b8c79f454880708119e39264a89705e10961d3fd Author: Larry Finger Date: Thu Dec 15 12:23:05 2016 -0600 rtlwifi: rtl8192de: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 22 ++++++-------- .../net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 35 ++++++++-------------- .../net/wireless/realtek/rtlwifi/rtl8192de/led.c | 8 ++--- .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 35 ++++++++++------------ .../net/wireless/realtek/rtlwifi/rtl8192de/rf.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 8 ++--- 6 files changed, 46 insertions(+), 65 deletions(-) commit 2d15acac23542ffe7b89ef65f80903ec33625899 Author: Larry Finger Date: Thu Dec 15 12:23:04 2016 -0600 rtlwifi: rtl8192se: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192se/fw.c | 46 ++++++++-------------- .../net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 41 ++++++++----------- .../net/wireless/realtek/rtlwifi/rtl8192se/led.c | 8 ++-- .../net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 39 ++++++++---------- .../net/wireless/realtek/rtlwifi/rtl8192se/rf.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 8 ++-- 6 files changed, 57 insertions(+), 88 deletions(-) commit c7532b87653b91c1d5623e9dc147cccb8709769a Author: Larry Finger Date: Thu Dec 15 12:23:03 2016 -0600 rtlwifi: rtl8723-common: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c | 17 +++++++---------- .../wireless/realtek/rtlwifi/rtl8723com/phy_common.c | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) commit a44f59d60365a7236601911b529566f1428227d4 Author: Larry Finger Date: Thu Dec 15 12:23:02 2016 -0600 rtlwifi: rtl8192ee: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 21 +++++++----------- .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 11 ++++------ .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 25 +++++++++++----------- .../net/wireless/realtek/rtlwifi/rtl8192ee/rf.c | 3 +-- .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 8 +++---- 5 files changed, 28 insertions(+), 40 deletions(-) commit a67005bc46d93f40e00d54a0c14c6a4e50e245ca Author: Larry Finger Date: Thu Dec 15 12:23:01 2016 -0600 rtlwifi: rtl8723ae: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.c | 11 +++++------ drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 19 +++++++------------ .../net/wireless/realtek/rtlwifi/rtl8723ae/led.c | 8 ++++---- .../net/wireless/realtek/rtlwifi/rtl8723ae/phy.c | 21 ++++++++++----------- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 8 +++----- 6 files changed, 30 insertions(+), 40 deletions(-) commit 4e2b4378f9d79737b0694df1e6cbd0c6f26c2a27 Author: Larry Finger Date: Thu Dec 15 12:23:00 2016 -0600 rtlwifi: rtl8723be: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 11 +++++------ drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 16 ++++++---------- .../net/wireless/realtek/rtlwifi/rtl8723be/led.c | 8 ++++---- .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 21 ++++++++++----------- drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 8 +++----- 6 files changed, 29 insertions(+), 38 deletions(-) commit 004a1e167905bf664c81dfdb195f1b8917cc3649 Author: Larry Finger Date: Thu Dec 15 12:22:59 2016 -0600 rtlwifi: rtl8821ae: Remove all instances of DBG_EMERG This is a step toward eliminating the RT_TRACE macros. Those calls that have DBG_EMERG as the level are always logged, and they represent error conditions, thus they are replaced with pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 12 +++--- .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 15 +++---- .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 46 +++++++++------------- .../net/wireless/realtek/rtlwifi/rtl8821ae/rf.c | 5 +-- .../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 14 +++---- 6 files changed, 37 insertions(+), 58 deletions(-) commit b03d968b66440652f8cfd73b163cc9ccd50afd7d Author: Larry Finger Date: Thu Dec 15 12:22:58 2016 -0600 rtlwifi: Remove RT_TRACE messages that use DBG_EMERG These messages are always logged and represent error conditions, thus we can use pr_err(). Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 15 ++++----- drivers/net/wireless/realtek/rtlwifi/cam.c | 14 +++------ drivers/net/wireless/realtek/rtlwifi/core.c | 21 +++++-------- drivers/net/wireless/realtek/rtlwifi/efuse.c | 3 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 36 ++++++++-------------- drivers/net/wireless/realtek/rtlwifi/ps.c | 3 +- drivers/net/wireless/realtek/rtlwifi/rc.c | 3 +- drivers/net/wireless/realtek/rtlwifi/usb.c | 46 +++++++++------------------- 8 files changed, 49 insertions(+), 92 deletions(-) commit 531940f9644da798f04382aeb5e8929295dfde61 Author: Larry Finger Date: Thu Dec 15 12:22:57 2016 -0600 rtlwifi: Replace local debug macro RT_ASSERT This macro can be replaced with WARN_ONCE. In addition to using a standard debugging macro for these critical errors, we also get a stack dump. In rtl8821ae/hw.c, a senseless comment was removed, and an incorrect indentation was fixed. This patch also fixes two places in each of rtl8192ee, rtl8723be, and rtl8821ae where the logical condition was incorrect. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/debug.h | 14 -------------- drivers/net/wireless/realtek/rtlwifi/pci.c | 12 ++++++------ drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 10 +++++----- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 8 ++++---- .../wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 6 +++--- .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 14 +++++++------- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 10 +++++----- drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 14 +++++++------- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 15 +++++++++------ drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c | 10 +++++----- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 12 ++++++------ drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 14 +++++++------- .../wireless/realtek/rtlwifi/rtl8723com/phy_common.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 16 ++++++++-------- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 20 ++++++++++++-------- drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +- 38 files changed, 133 insertions(+), 140 deletions(-) commit a51c158bf0f7cab3bd593586801a1a8b51c7c741 Author: Gary Bisson Date: Fri Dec 2 17:35:19 2016 +0100 pinctrl: imx: use radix trees for groups and functions This change is inspired from the pinctrl-single architecture. The problem with current implementation is that it isn't possible to add/remove functions and/or groups dynamically. The radix tree offers an easy way to do so. The intent is to offer a follow-up patch later that will enable the use of pinctrl nodes in dt-overlays. Signed-off-by: Gary Bisson Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 164 +++++++++++++++++++++++++++----- drivers/pinctrl/freescale/pinctrl-imx.h | 5 +- 2 files changed, 141 insertions(+), 28 deletions(-) commit b28742be4709929ac6f25ae1f7256e61ed0817a0 Author: Gary Bisson Date: Fri Dec 2 17:35:18 2016 +0100 pinctrl: imx: remove const qualifier of imx_pinctrl_soc_info Otherwise can't dynamically update fields such as ngroups which can change over time (with a dt-overlay for instance). Signed-off-by: Gary Bisson Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 059a6e630bb9ee21ff6955d699471bcf2b4b96ab Author: Colin Ian King Date: Fri Dec 23 00:47:14 2016 +0000 pinctrl: single: fix spelling mistakes on "Ivalid" Trivial fixe to spelling mistake "Ivalid" to "Invalid" in dev_err error message. Signed-off-by: Colin Ian King Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 824387b2f6a1a177bf518a61ebbf861ae058f45d Author: Daniel Vetter Date: Thu Dec 29 21:48:30 2016 +0100 drm/atomic-helpers: Remove outdated comment We forgot to clean this up when adding connector refcounting. Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-10-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 5 ----- 1 file changed, 5 deletions(-) commit 5edbfc474c928dcfb37adc6c9f8ef708323c856d Author: Daniel Vetter Date: Thu Dec 29 21:48:29 2016 +0100 drm/rect: Fix formatting of example code Drive-by polish. Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-9-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_rect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f5a8d8774bbb81c64073c1e29ce29cfa3d044f83 Author: Daniel Vetter Date: Thu Dec 29 21:48:28 2016 +0100 drm/doc: Update styleguide The new cool is &struct foo (kernel-doc now copes with linebreaks), and structure members should be referenced using &foo.bar. Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-8-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/introduction.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 347e89034a3b70123d0481712883c03cc704eb68 Author: Daniel Vetter Date: Thu Dec 29 21:48:27 2016 +0100 drm: Nuke connector_list locking assert I've forgotten to remove this when revamping the connector_list locking. Cc: seanpaul@chromium.org Reviewed-by: David Herrmann Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-7-git-send-email-daniel.vetter@ffwll.ch include/drm/drm_connector.h | 6 +----- include/drm/drm_crtc.h | 14 -------------- 2 files changed, 1 insertion(+), 19 deletions(-) commit ea0dd85a75f15174cc2bf75f805e378391995931 Author: Daniel Vetter Date: Thu Dec 29 21:48:26 2016 +0100 drm/doc: use preferred struct reference in kernel-doc sed -e 's/\( \* .*\)struct &\([_a-z]*\)/\1\&struct \2/' -i Originally I wasnt a friend of this style because I thought a line-break between the "&struct" and "foo" part would break it. But a quick test shows that " * &struct \n * foo\n" works pefectly well with current kernel-doc. So time to mass-apply these changes! Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-6-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 6 +++--- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++---- drivers/gpu/drm/drm_auth.c | 8 ++++---- drivers/gpu/drm/drm_bridge.c | 4 ++-- drivers/gpu/drm/drm_color_mgmt.c | 4 ++-- drivers/gpu/drm/drm_connector.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 14 +++++++------- drivers/gpu/drm/drm_drv.c | 10 +++++----- drivers/gpu/drm/drm_dumb_buffers.c | 2 +- drivers/gpu/drm/drm_encoder.c | 4 ++-- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 6 +++--- drivers/gpu/drm/drm_irq.c | 2 +- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/drm_probe_helper.c | 2 +- drivers/gpu/drm/drm_property.c | 2 +- drivers/gpu/drm/drm_simple_kms_helper.c | 2 +- include/drm/drm_atomic.h | 2 +- include/drm/drm_auth.h | 2 +- include/drm/drm_bridge.h | 8 ++++---- include/drm/drm_connector.h | 10 +++++----- include/drm/drm_crtc.h | 8 ++++---- include/drm/drm_fb_helper.h | 2 +- include/drm/drm_framebuffer.h | 6 +++--- include/drm/drm_irq.h | 4 ++-- include/drm/drm_mode_config.h | 10 +++++----- include/drm/drm_modeset_helper_vtables.h | 2 +- include/drm/drm_plane.h | 4 ++-- include/drm/drm_print.h | 4 ++-- include/drm/drm_simple_kms_helper.h | 8 ++++---- 31 files changed, 76 insertions(+), 76 deletions(-) commit e9b4d7b56f293ed4de9ff7d16759d33492f83180 Author: Daniel Vetter Date: Thu Dec 29 21:48:25 2016 +0100 dma-buf: Use recommended structure member reference I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Cc: Sumit Semwal Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-5-git-send-email-daniel.vetter@ffwll.ch drivers/dma-buf/dma-buf.c | 5 ++--- include/linux/dma-buf.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) commit c7d1c77781f468c639867d324d4e490139cd4c7f Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:57 2016 +0100 rt2x00: add mutex to synchronize config and link tuner Do not perform mac80211 config and link_tuner at the same time, this can possibly result in wrong RF or BBP configuration. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++++ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 5 +++++ drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 5 +++++ 4 files changed, 15 insertions(+) commit f641d3b536e559dd2bae9245ec2e7d86cdf623fd Author: Daniel Vetter Date: Thu Dec 29 21:48:24 2016 +0100 dma-buf: use preferred struct reference in kernel-doc sed -e 's/\( \* .*\)struct &\([_a-z]*\)/\1\&struct \2/' -i Originally I wasnt a friend of this style because I thought a line-break between the "&struct" and "foo" part would break it. But a quick test shows that " * &struct \n * foo\n" works pefectly well with current kernel-doc. So time to mass-apply these changes! Cc: Sumit Semwal Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-4-git-send-email-daniel.vetter@ffwll.ch drivers/dma-buf/dma-buf.c | 6 +++--- include/linux/dma-buf.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 05fc03217e08b90bff1ff22792d5f86dd32f15a6 Author: Daniel Vetter Date: Thu Dec 29 21:48:23 2016 +0100 drm/mm: Some doc polish Added some boilerplate for the structs, documented members where they are relevant and plenty of markup for hyperlinks all over. And a few small wording polish. Note that the intro needs some more love after the DRM_MM_INSERT_* patch from Chris has landed. v2: Spelling fixes (Chris). v3: Use &struct foo instead of &foo structure (Chris). Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-3-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-mm.rst | 2 +- drivers/gpu/drm/drm_mm.c | 41 +++++++++++---------- include/drm/drm_mm.h | 84 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 89 insertions(+), 38 deletions(-) commit a8182863438232dce79f76cc511d752a219ff33a Author: Daniel Vetter Date: Thu Dec 29 21:48:21 2016 +0100 drm/docs: Small cleanup in drm-uapi.rst - Remove the outdated hunk about driver documentation which somehow got misplaced here in the split-up. - Collect all the testing&validation stuff together and give the CRC section a heading for prettier output. Cc: Tomeu Vizoso Cc: Jani Nikula Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-1-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit c821f6ab2e47946f35ee2f30781c5185e5d07f65 Author: Ard Biesheuvel Date: Thu Dec 29 14:09:08 2016 +0000 crypto: skcipher - introduce walksize attribute for SIMD algos In some cases, SIMD algorithms can only perform optimally when allowed to operate on multiple input blocks in parallel. This is especially true for bit slicing algorithms, which typically take the same amount of time processing a single block or 8 blocks in parallel. However, other SIMD algorithms may benefit as well from bigger strides. So add a walksize attribute to the skcipher algorithm definition, and wire it up to the skcipher walk API. To avoid confusion between the skcipher and AEAD attributes, rename the skcipher_walk chunksize attribute to 'stride', and set it from the walksize (in the skcipher case) or from the chunksize (in the AEAD case). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/skcipher.c | 20 ++++++++++++-------- include/crypto/internal/skcipher.h | 2 +- include/crypto/skcipher.h | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 9 deletions(-) commit d79b5d0bbf2e3aded13b0542160bde48e95d3d44 Author: Gonglei \(Arei\) Date: Tue Dec 27 14:49:07 2016 +0800 crypto: virtio - support crypto engine framework crypto engine was introduced since 'commit 735d37b5424b ("crypto: engine - Introduce the block request crypto engine framework")' which uses work queue to realize the asynchronous processing for ablk_cipher and ahash. For virtio-crypto device, I register an engine for each data virtqueue so that we can use the capability of multiple data queues in future. Cc: Baolin Wang Cc: Herbert Xu Cc: Michael S. Tsirkin Signed-off-by: Gonglei Signed-off-by: Herbert Xu drivers/crypto/virtio/Kconfig | 1 + drivers/crypto/virtio/virtio_crypto_algs.c | 52 ++++++++++++------- drivers/crypto/virtio/virtio_crypto_common.h | 16 ++++++ drivers/crypto/virtio/virtio_crypto_core.c | 74 ++++++++++++++++++++++++++-- 4 files changed, 121 insertions(+), 22 deletions(-) commit 1043c5146877ea48e4c8569a1c7931e1bfb6acb5 Author: Xin Zeng Date: Thu Dec 22 15:01:02 2016 +0000 crypto: qat - increase number of supported devices The unsigned long type for init_status and start_status in service_hndl are not long enough to represent more than 64 acceleration devices. Use an array instead. Signed-off-by: Xin Zeng Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_cfg_common.h | 1 + drivers/crypto/qat/qat_common/adf_common_drv.h | 4 ++-- drivers/crypto/qat/qat_common/adf_init.c | 28 +++++++++++++++----------- 3 files changed, 19 insertions(+), 14 deletions(-) commit 21aad0b6ca4d203b2486dfbf97921a2ecd768bcc Author: Pablo Marcos Oltra Date: Thu Dec 22 15:00:34 2016 +0000 crypto: qat - modify format of dev top level debugfs entries Remove leading zeros in pci function number to be consistent with output from lspci. Signed-off-by: Pablo Marcos Oltra Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_c3xxx/adf_drv.c | 2 +- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 2 +- drivers/crypto/qat/qat_c62x/adf_drv.c | 2 +- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 2 +- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 2 +- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 841d6d10b38a2508c640ce7784bad825e2d76fe8 Author: Giovanni Cabiddu Date: Thu Dec 22 15:00:24 2016 +0000 crypto: qat - zero esram only for DH85x devices Zero embedded ram in DH85x devices. This is not needed for newer generations as it is done by HW. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_hal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f78ce870a4da0cf4db265ec4fd31eb4fb7f9c57 Author: Giovanni Cabiddu Date: Thu Dec 22 15:00:12 2016 +0000 crypto: qat - fix bar discovery for c62x Some accelerators of the c62x series have only two bars. This patch skips BAR0 if the accelerator does not have it. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_c62x/adf_drv.c | 2 +- drivers/crypto/qat/qat_common/adf_accel_devices.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit ac6d9a2cec195a7778e013f405cfb86c1dd244a7 Author: Giovanni Cabiddu Date: Thu Dec 22 14:59:40 2016 +0000 crypto: qat - replace hardcoded BIT(0) in vf_isr Replace BIT(0) macro with proper definition in pf2vf path Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_vf_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aebeff888256a8c6915c8f264746aa721487183c Author: Ahsan Atta Date: Thu Dec 22 14:59:24 2016 +0000 crypto: qat - fix comments describing adf_disable_sriov() Signed-off-by: Ahsan Atta Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_sriov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a3b1abedf265fe524dd19be39c85ba8af5e2bc6 Author: Ahsan Atta Date: Thu Dec 22 14:58:23 2016 +0000 crypto: qat - fix indentation Signed-off-by: Ahsan Atta Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_dev_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b834ff86a61c236282e68890c17316f6928eebad Author: Gabriel Krisman Bertazi Date: Fri Dec 30 12:50:49 2016 +0100 drm: Update TTM initialization documentation ttm_global_reference was renamed to drm_global_reference. This updates the documentation to reflect that. While we are there, document the drm_global_reference API and update the initialization interface documentation. Signed-off-by: Gabriel Krisman Bertazi [danvet: Keep the warning, ttm docs are still massively inadequate.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161228143216.26821-7-krisman@collabora.co.uk Documentation/gpu/drm-mm.rst | 27 +++++++++++++++++---------- drivers/gpu/drm/drm_global.c | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 10 deletions(-) commit 5bbf92d3eb01cb5adcf613e2532dc918172c598f Author: Gabriel Krisman Bertazi Date: Wed Dec 28 12:32:14 2016 -0200 drm: Export drm_ioctl_permit to kernel-doc drm_ioctl_permit is exported but missed a kernel-doc style documentation. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161228143216.26821-5-krisman@collabora.co.uk drivers/gpu/drm/drm_ioctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8caead148a45764bf4adb33220271d0266b85fe5 Author: Gabriel Krisman Bertazi Date: Wed Dec 28 12:32:13 2016 -0200 drm: Drop unused forward declaration of drm_version Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161228143216.26821-4-krisman@collabora.co.uk drivers/gpu/drm/drm_ioctl.c | 3 --- 1 file changed, 3 deletions(-) commit 75f6dfe3e652e1adef8cc1b073c89f3e22103a8f Author: Gabriel Krisman Bertazi Date: Wed Dec 28 12:32:11 2016 -0200 drm: Deduplicate driver initialization message Several DRM drivers print the same initialization message right after drm_dev_register, so move that to common code. The exception is i915, which uses its own register handle, so let it keep its own message. Notice that this was tested only with Exynos, but looks simple enough for the other drivers. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161228143216.26821-2-krisman@collabora.co.uk drivers/gpu/drm/armada/armada_drv.c | 6 ------ drivers/gpu/drm/drm_drv.c | 7 +++++++ drivers/gpu/drm/drm_pci.c | 4 ---- drivers/gpu/drm/drm_platform.c | 4 ---- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 ---- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ---- drivers/gpu/drm/tegra/drm.c | 4 ---- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 4 ---- 8 files changed, 7 insertions(+), 30 deletions(-) commit 31369c323ba0dc839d8a4e5a5727adc76814959c Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:56 2016 +0100 rt2800: replace msleep() with usleep_range() on channel switch msleep(1) can sleep much more time then requested 1ms, this is not good on channel switch, which we want to be performed fast (i.e. to make scan faster). Replace msleep() with usleep_range(), which has much smaller maximum sleeping time boundary. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eb79a8fe94c8a16687112e0a3abcce8225447f6f Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:55 2016 +0100 rt2800: replace mdelay by usleep on vco calibration. This procedure can sleep, hence mdelay is not needed. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d96324703ffa0d690c49f8eed1d48ad2a97762c8 Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:54 2016 +0100 rt2x00: merge agc and vco works with link tuner We need to perform different actions (AGC and VCO calibrations and VGC tuning) periodically at different intervals. We don't need separate works for those, we can use link tuner work and just check for proper interval on it. This fixes performing AGC and VCO calibration when scanning on STA mode. We need to be on-channel to perform those calibrations. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 -- drivers/net/wireless/ralink/rt2x00/rt2x00lib.h | 31 +----- drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 127 ++++++------------------ 3 files changed, 36 insertions(+), 128 deletions(-) commit 24d42ef3b152b83831a2d876eea4f1d5ae1d6d85 Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:53 2016 +0100 rt2800: perform VCO recalibration for RF5592 chip Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ 1 file changed, 2 insertions(+) commit bc0077053948cdc4705a7b190459904c7c0fe086 Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:52 2016 +0100 rt2800: warn if doing VCO recalibration for unknow RF chip Since we reset TX_PIN_CFG register, we have to finish recalibration. Warn if this is not possible. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 8845254112ac139445bc039952ddcc43b2b122da Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:51 2016 +0100 rt2800: rename adjust_freq_offset function We have different modes of adjusting freq offset on different chips. Call current adjustment similarly like vendor driver - mode1 . Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8f03a7c6e7f959edd22e35158fbb9a4087962fae Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:50 2016 +0100 rt2800: set MAX_PSDU len according to remote STAs capabilities MAX_LEN_CFG_MAX_PSDU specify maximum transmitted by HW AMPDU length (0 - 8kB, 1 - 16kB, 2 - 32kB, 3 - 64kB). Set this option according to remote stations capabilities (based on HT ampdu_factor). However limit the value based our hardware TX capabilities as some chips can not send more than 16kB (factor 1). Limit for all chips is currently 32kB (factor 2), but perhaps for some chips this could be increased to 64kB by setting drv_data->max_psdu to 3. Since MAX_LEN_CFG_MAX_PSDU is global setting, on multi stations modes (AP, IBSS, mesh) we limit according to less capable remote STA. We can not set bigger value to speed up communication with some stations and do not break communication with slow stations. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 45 ++++++++++++++++++++++++-- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 +- 5 files changed, 47 insertions(+), 7 deletions(-) commit a51b89698ccc93c7e274eb71377fae49c4593ab2 Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:49 2016 +0100 rt2800: set minimum MPDU and PSDU lengths to sane values Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e49abb19d1bf6c8f062f4fd824075e4fcdc7fb3d Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:48 2016 +0100 rt2800: don't set ht parameters for non-aggregated frames Do not set ampdu_density and ba_size for frames without AMPDU bit i.e. frames that will not be aggregated to AMPDU. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a08b98196a36469700e74ec571c9fc27602de379 Author: Stanislaw Gruszka Date: Mon Dec 19 11:52:47 2016 +0100 rt2800: make rx ampdu_factor depend on number of rx chains Initalize max ampdu_factor supported by us based on rx chains, vendor driver do the same. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fef293b8a9850cfa124a53c1d8878d355010403 Author: Andrew Lutomirski Date: Mon Dec 12 12:55:55 2016 -0800 orinoco: Use shash instead of ahash for MIC calculations Eric Biggers pointed out that the orinoco driver pointed scatterlists at the stack. Fix it by switching from ahash to shash. The result should be simpler, faster, and more correct. Cc: stable@vger.kernel.org # 4.9 only Reported-by: Eric Biggers Signed-off-by: Andy Lutomirski Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/mic.c | 44 +++++++++++++++---------- drivers/net/wireless/intersil/orinoco/mic.h | 3 +- drivers/net/wireless/intersil/orinoco/orinoco.h | 4 +-- 3 files changed, 30 insertions(+), 21 deletions(-) commit 7f0d874036f07ceb394979f83a6411baed513aa9 Author: Marcin Niestroj Date: Mon Dec 12 17:58:43 2016 +0100 iio: st_pressure: Export sampling frequency for lps25h and lps331ap Both devices are using the same iio_chan_spec to define which settings are exported with sysfs. Both are properly configured to set/get sampling frequency for pressure and temperature. They also properly export available sampling frequencies. The only missing thing is sampling_frequency sysfs file, which allows to set/get this property from userspace. Add sampling frequency to iio channel info mask, so sampling_frequency file is properly exported using sysfs. Signed-off-by: Marcin Niestroj Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b211d48abaa0e12e6e6177c0316ff55d11fdfce Author: Marcin Niestroj Date: Mon Dec 12 17:58:42 2016 +0100 iio: st_pressure: Fix data sign Datasheet of each device (lps331ap, lps25h, lps001wp, lps22hb) says that the pressure and temperature data is a 2's complement. I'm sending this the slow way, as negative pressures on these are pretty unusual and the nature of the fixing of multiple device introduction patches will make it hard to apply to older kernels - Jonathan. Fixes: 217494e5b780 ("iio:pressure: Add STMicroelectronics pressures driver") Fixes: 2f5effcbd097 ("iio: pressure-core: st: Expand and rename LPS331AP's channel descriptor") Fixes: 7885a8ce6800 ("iio: pressure: st: Add support for new LPS001WP pressure sensor") Fixes: e039e2f5b4da ("iio:st_pressure:initial lps22hb sensor support") Signed-off-by: Marcin Niestroj Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c705a6b3aa7804d7bc6660183f51e510c61dc807 Author: Dan Carpenter Date: Wed Dec 7 14:21:22 2016 +0300 adm80211: return an error if adm8211_alloc_rings() fails We accidentally return success when adm8211_alloc_rings() fails but we should preserve the error code. Fixes: cc0b88cf5ecf ("[PATCH] Add adm8211 802.11b wireless driver") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/admtek/adm8211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae3cf476450674dcba4239f144d310c472a08b5d Author: Johannes Berg Date: Wed Dec 7 07:36:46 2016 +0100 iwlegacy: make il3945_mac_ops __ro_after_init There's no need for this to be only __read_mostly, since it's only written in a single way depending on the module parameter, so that can be moved into the module's __init function, and the ops can be __ro_after_init. This is a little bit safer since it means the ops can't be overwritten (accidentally or otherwise), which would otherwise cause an arbitrary function or bad pointer to be called. Signed-off-by: Johannes Berg Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/3945-mac.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d7864cf2123503b83880d4b8d5786cb5641d64d8 Author: Amitkumar Karwar Date: Fri Dec 16 12:55:45 2016 +0530 mwifiex: Enable dynamic bandwidth signalling Enable dynamic bandwidth signalling by setting the corresponding bit in MAC control register. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 1 + drivers/net/wireless/marvell/mwifiex/init.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit b82dd3bdf1a18bcd8da9291f71754670a0199e9f Author: Amitkumar Karwar Date: Fri Dec 16 12:55:44 2016 +0530 mwifiex: change width of MAC control variable Firmware has started making use of reserved field. Accordingly change curr_pkt_filter from u16 to u32. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 18 ++++++++---------- drivers/net/wireless/marvell/mwifiex/main.h | 2 +- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) commit 74c8719b8ee0922593a5cbec0bd6127d86d8a2f4 Author: Amitkumar Karwar Date: Thu Dec 1 19:23:31 2016 +0530 mwifiex: sdio: fix use after free issue for save_adapter If we have sdio work requests received when sdio card reset is happening, we may end up accessing older save_adapter pointer later which is already freed during card reset. This patch solves the problem by cancelling those pending requests. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e82dfa00da407eee80acbd6297003eb5ce913fcc Author: Chris Wilson Date: Thu Dec 29 13:37:29 2016 +0000 drm: Reduce verbosity level for drm_core_init() debug message Currently at the end of drm_core_init() we print [ 0.735185] [drm] Initialized which does not provide any user information and is only a breadcrumb for developers, so reduce it from info to debug. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161229133729.32673-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48df6336d770a5a1fcc83bef9f1d541600983b5f Author: Shawn Guo Date: Thu Dec 29 20:41:30 2016 +0800 drm: rockchip: use crtc helper drm_crtc_from_index() Function rockchip_crtc_from_pipe() does the exactly same thing as what crtc helper drm_crtc_from_index() provides. Use the helper to save some code. Signed-off-by: Shawn Guo Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483015290-16660-4-git-send-email-shawnguo@kernel.org drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit ac620ba3d09bc96eca203658ad2e145adf911ac3 Author: Shawn Guo Date: Thu Dec 29 20:41:29 2016 +0800 drm: zte: use crtc helper drm_crtc_from_index() Function zx_find_crtc() does the exactly same thing as what crtc helper drm_crtc_from_index() provides. Use the helper to save some code. Signed-off-by: Shawn Guo Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483015290-16660-3-git-send-email-shawnguo@kernel.org drivers/gpu/drm/zte/zx_vou.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 6d1b81d8e25d81b4ed4363fa3e7d70aa563b7112 Author: Shawn Guo Date: Thu Dec 29 20:41:28 2016 +0800 drm: add crtc helper drm_crtc_from_index() It adds a crtc helper drm_crtc_from_index() to find the registered CRTC with a given index, just like drm_plane_from_index(). Signed-off-by: Shawn Guo Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483015290-16660-2-git-send-email-shawnguo@kernel.org drivers/gpu/drm/drm_crtc.c | 20 ++++++++++++++++++++ include/drm/drm_crtc.h | 1 + 2 files changed, 21 insertions(+) commit b5c3714fe8789745521d8351d75049b9c6a0d26b Author: Daniel Vetter Date: Thu Dec 29 12:09:24 2016 +0100 drm/mm: Convert to drm_printer Including all drivers. I thought about keeping small compat functions to avoid having to change all drivers. But I really like the drm_printer idea, so figured spreading it more widely is a good thing. v2: Review from Chris: - Natural argument order and better name for drm_mm_print. - show_mm() macro in the selftest. Cc: Rob Clark Cc: Russell King Cc: Alex Deucher Cc: Christian König Cc: Lucas Stach Cc: Tomi Valkeinen Cc: Thierry Reding Cc: Jyri Sarha Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483009764-8281-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 3 +- drivers/gpu/drm/armada/armada_debugfs.c | 6 +-- drivers/gpu/drm/drm_mm.c | 67 +++++----------------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 10 +++-- drivers/gpu/drm/msm/msm_debugfs.c | 6 ++- drivers/gpu/drm/omapdrm/omap_debugfs.c | 6 ++- drivers/gpu/drm/qxl/qxl_ttm.c | 6 +-- drivers/gpu/drm/radeon/radeon_ttm.c | 6 +-- drivers/gpu/drm/selftests/test-drm_mm.c | 12 +++-- drivers/gpu/drm/tegra/drm.c | 5 ++- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +- drivers/gpu/drm/ttm/ttm_bo_manager.c | 3 +- include/drm/drm_mm.h | 9 +--- 15 files changed, 62 insertions(+), 90 deletions(-) commit 3d387d923c18afbacef8f14ccaa2ace2a297df74 Author: Daniel Vetter Date: Wed Dec 28 17:42:09 2016 +0100 drm/printer: add debug printer Useful for dumping lots of data into dmesg, e.g. drm_mm. v2: Fixup export_symbol line, I misplaced a hunk (Chris). Cc: Rob Clark Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482943330-11592-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_print.c | 6 ++++++ include/drm/drm_print.h | 20 ++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit c7bff8902dd583bd5de325eb48dc643ecaa0bb35 Author: Marcin Niestroj Date: Thu Dec 8 15:22:56 2016 +0100 Documentation: DT: Add bmi160 imu binding This adds documentation for Bosch BMI160 Inertial Measurement Unit device-tree bindings. Signed-off-by: Marcin Niestroj Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/imu/bmi160.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 75eadb8fe05edb351b748c9a1675b341bb1b1b28 Author: Marcin Niestroj Date: Thu Dec 8 15:22:55 2016 +0100 iio: bmi160: Add of device table for spi From now on we can add bmi160 device to device-tree by specifying compatible string. Signed-off-by: Marcin Niestroj Signed-off-by: Jonathan Cameron drivers/iio/imu/bmi160/bmi160_spi.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 968bdbf8f3e4f4e60420fb4643fed06c9d78418c Author: Marcin Niestroj Date: Thu Dec 8 15:22:54 2016 +0100 iio: bmi160: Add of device table for i2c From now on we can add bmi160 device to device-tree by specifying compatible string. Signed-off-by: Marcin Niestroj Signed-off-by: Jonathan Cameron drivers/iio/imu/bmi160/bmi160_i2c.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 34c30b0a5e97e3f9e1e166f56654a1261b722611 Author: Mohammed Shafi Shajakhan Date: Tue Dec 27 20:53:35 2016 +0530 ath10k: enable advertising support for channel 169, 5Ghz Enable advertising support for channel 169, 5Ghz so that based on the regulatory domain(country code) this channel shall be active for use. For example in countries like India this channel shall be available for use with latest regulatory updates Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit a7773b5db155fb5ccdbd381d778c08bea35dab31 Author: Mohammed Shafi Shajakhan Date: Tue Dec 27 19:02:35 2016 +0530 ath10k: Remove passing unused argument for ath10k_mac_tx 'ath10k_mac_tx' does not seems to use the per station table entry pointer 'sta' (struct ieee80211_sta), hence remove passing this unused argument Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d2e202c06ca42d353d95df12437740921a6d05b5 Author: Ryan Hsu Date: Thu Dec 22 15:02:37 2016 -0800 ath10k: ignore configuring the incorrect board_id With command to get board_id from otp, in the case of following boot get otp board id result 0x00000000 board_id 0 chip_id 0 boot using board name 'bus=pci,bmi-chip-id=0,bmi-board-id=0" ... failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=0 from ath10k/QCA6174/hw3.0/board-2.bin The invalid board_id=0 will be used as index to search in the board-2.bin. Ignore the case with board_id=0, as it means the otp is not carrying the board id information. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d679fa1b3c8997e3a371da3cca08c44a38054c34 Author: Ryan Hsu Date: Thu Dec 22 14:31:46 2016 -0800 ath10k: recal the txpower when removing interface The txpower is being recalculated when adding interface to make sure txpower won't overshoot the spec, and when removing the interface, the txpower should again to be recalculated to restore the correct value from the active interface list. Following is one of the scenario vdev0 is created as STA and connected: txpower:23 vdev1 is created as P2P_DEVICE for control interface: txpower:0 vdev2 is created as p2p go/gc interface: txpower is 21 So the vdev2@txpower:21 will be set to firmware when vdev2 is created. When we tear down the vdev2, the txpower needs to be recalculated to re-set it to vdev0@txpower:23 as vdev0/vdev1 are the active interface. ath10k_pci mac vdev 0 peer create 8c:fd:f0:01:62:98 ath10k_pci mac vdev_id 0 txpower 23 ... (adding interface) ath10k_pci mac vdev create 2 (add interface) type 1 subtype 3 ath10k_pci mac vdev_id 2 txpower 21 ath10k_pci mac txpower 21 ... (removing interface) ath10k_pci mac vdev 2 delete (remove interface) ath10k_pci vdev 1 txpower 0 ath10k_pci vdev 0 txpower 23 ath10k_pci mac txpower 23 Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) commit 727000e6af34748552d13069ce52de2ad3d6c271 Author: Arun Khandavalli Date: Wed Dec 21 14:19:21 2016 +0200 ath10k: support dev_coredump for crash dump Whenever firmware crashes, and both CONFIG_ATH10K_DEBUGFS and CONFIG_ALLOW_DEV_COREDUMP are enabled, dump information about the crash via a devcoredump device. Dump can be read from userspace for further analysis from: /sys/class/devcoredump/devcd*/data As until now we have provided the firmware crash dump file via fw_crash_dump debugfs keep it still available but deprecate and a warning print that the user should switch to using dev_coredump. Future improvement would be not to depend on CONFIG_ATH10K_DEBUGFS, as there might be systems which want to get the firmware crash dump but not enable debugfs. How to handle memory consumption is also something which needs to be taken into account. Signed-off-by: Arun Khandavalli [kvalo@qca.qualcomm.com: rebase, fixes, improve commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 6 +++++ drivers/net/wireless/ath/ath10k/debug.c | 43 ++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath10k/debug.h | 8 ++++++ 3 files changed, 54 insertions(+), 3 deletions(-) commit 88407beb1b1462f706a1950a355fd086e1c450b6 Author: Ryan Hsu Date: Tue Dec 13 14:55:19 2016 -0800 ath10k: fix incorrect txpower set by P2P_DEVICE interface Ath10k reports the phy capability that supports P2P_DEVICE interface. When we use the P2P supported wpa_supplicant to start connection, it'll create two interfaces, one is wlan0 (vdev_id=0) and one is P2P_DEVICE p2p-dev-wlan0 which is for p2p control channel (vdev_id=1). ath10k_pci mac vdev create 0 (add interface) type 2 subtype 0 ath10k_add_interface: vdev_id: 0, txpower: 0, bss_power: 0 ... ath10k_pci mac vdev create 1 (add interface) type 2 subtype 1 ath10k_add_interface: vdev_id: 1, txpower: 0, bss_power: 0 And the txpower in per vif bss_conf will only be set to valid tx power when the interface is assigned with channel_ctx. But this P2P_DEVICE interface will never be used for any connection, so that the uninitialized bss_conf.txpower=0 is assinged to the arvif->txpower when interface created. Since the txpower configuration is firmware per physical interface. So the smallest txpower of all vifs will be the one limit the tx power of the physical device, that causing the low txpower issue on other active interfaces. wlan0: Limiting TX power to 21 (24 - 3) dBm ath10k_pci mac vdev_id 0 txpower 21 ath10k_mac_txpower_recalc: vdev_id: 1, txpower: 0 ath10k_mac_txpower_recalc: vdev_id: 0, txpower: 21 ath10k_pci mac txpower 0 This issue only happens when we use the wpa_supplicant that supports P2P or if we use the iw tool to create the control P2P_DEVICE interface. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 097e46d2ae90265d1afe141ba6208ba598b79e01 Author: Christian Lamparter Date: Thu Dec 29 16:12:09 2016 +0200 ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats() ath10k_wmi_tlv_op_pull_fw_stats() uses tb = ath10k_wmi_tlv_parse_alloc(...) function, which allocates memory. If any of the three error-paths are taken, this tb needs to be freed. Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit b1eb8fabc83becdcc3b813f1fe6194f610fe7e9b Author: Vladimir Zapolskiy Date: Sun Dec 25 02:59:28 2016 +0200 pinctrl: simplify check for pin request conflicts This is a non-functional change, which deletes code duplication in two of four if-if branches by reordering the checks. Functional identity of the code change can be shown by running through the whole truth table of boolean arguments. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij drivers/pinctrl/pinmux.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) commit a79fead50f06886311f37777d03b20b058749ce1 Author: Geert Uytterhoeven Date: Mon Dec 19 19:21:34 2016 +0100 gpio: of: Add support for multiple GPIOs in a single GPIO hog When listing multiple GPIOs in the "gpios" property of a GPIO hog, only the first GPIO is affected. The user is left clueless about the dysfunctioning of the other GPIOs specified. Fix this by adding and documenting support for specifying multiple GPIOs in a single GPIO hog. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio.txt | 8 +++---- drivers/gpio/gpiolib-of.c | 31 ++++++++++++++++--------- 2 files changed, 24 insertions(+), 15 deletions(-) commit baddc7ca446c18c68a0c8b298fd9920bf049efce Author: John Crispin Date: Tue Dec 20 19:57:55 2016 +0100 gpio: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Signed-off-by: Linus Walleij drivers/gpio/devres.c | 2 +- drivers/gpio/gpio-mm-lantiq.c | 2 +- drivers/gpio/gpio-stp-xway.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 55e409502e02aeca224efa4cae69d2480879744b Author: John Crispin Date: Tue Dec 20 19:55:41 2016 +0100 pinctrl: update my email address This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt7623.c | 2 +- drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h | 2 +- drivers/pinctrl/pinctrl-falcon.c | 2 +- drivers/pinctrl/pinctrl-lantiq.c | 2 +- drivers/pinctrl/pinctrl-lantiq.h | 2 +- drivers/pinctrl/pinctrl-xway.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 704ae20696128266cf81cf51ecdbeb4c182e9f79 Author: Christophe JAILLET Date: Tue Dec 20 06:41:22 2016 +0100 pinctrl: sirf: atlas7: Improve code layout Add some tab in order to improve indentation. Signed-off-by: Christophe JAILLET Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7af355e6715b325d8af29822f4c3dbecd7eeebec Author: Christophe JAILLET Date: Tue Dec 20 06:40:43 2016 +0100 pinctrl: sirf: atlas7: Add missing 'of_node_put()' Reference to 'sys2pci_np' should be dropped in all cases here, not only in error handling path. Signed-off-by: Christophe JAILLET Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c32c22eea0c47e13cffd6b5f7eedd7a6b6f2c18f Author: Gabriel Fernandez Date: Wed Dec 14 15:24:16 2016 +0100 pinctrl: stm32: activate strict mux mode This activates strict mode muxing for the STM32 pin controllers, as these do not allow GPIO and functions to use the same pin simultaneously. Signed-off-by: Gabriel Fernandez Acked-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 1 + 1 file changed, 1 insertion(+) commit 0e028b49d27caf5476974f4fe421295e65403dae Author: Andreas Klinger Date: Wed Dec 14 00:08:27 2016 +0100 pinctrl: fix DT bindings for marvell,kirkwood-pinctrl On Marvell mv88f6180 mpp pins range from 0 to 19 as well as from 35 to 44. This is already fixed in commit: 9573e7923007961799beff38bc5c5a7635634eef This is the documentation change for above commit. Signed-off-by: Andreas Klinger Signed-off-by: Linus Walleij .../bindings/pinctrl/marvell,kirkwood-pinctrl.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f50b79f096a7533e9b13638c06dfa759de070f56 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:12 2016 +0200 drm/i915: Add dpll entrypoint for dumping hw state Remove the IS_PLATFORM() macros from intel_dump_pipe_config() and split that logic in platform specific implementations inside the dpll code, accessed through a platform independent interface. v2: Rebase. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-7-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 34 +-------------- drivers/gpu/drm/i915/intel_dpll_mgr.c | 79 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dpll_mgr.h | 3 ++ 3 files changed, 83 insertions(+), 33 deletions(-) commit 294591cfbd2b185ac51fa2b1768a333fa6782011 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:11 2016 +0200 drm/i915: Update kerneldoc for intel_dpll_mgr.c The documentation for most of the non-static members and structs were missing. Fix that. v2: Fix typos (Durga) v3: Rebase. Fix make docs warnings. Document more. v4: capitilize CRTC; say that the prepare hook is a nop if the DPLL is already enabled; link to struct intel_dpll_hw_state from @hw_state field in struct intel_shared_dpll_state; reorganize DPLL flags; link intel_shared_dpll_state to other structs and functions. (Daniel) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-6-git-send-email-ander.conselvan.de.oliveira@intel.com Documentation/gpu/i915.rst | 12 +++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 91 ++++++++++++++++++-- drivers/gpu/drm/i915/intel_dpll_mgr.h | 154 ++++++++++++++++++++++++++++++---- 3 files changed, 237 insertions(+), 20 deletions(-) commit eac6176cbdcbcdb1de80de0716a0b2300da56a93 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:10 2016 +0200 drm/i915: Rename intel_shared_dpll->mode_set() to prepare() The hook is called from intel_prepare_shared_dpll(). The name doesn't make sense after all the changes to modeset code. So just call it prepare. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Durgadoss R Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-5-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_dpll_mgr.c | 8 ++++---- drivers/gpu/drm/i915/intel_dpll_mgr.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 2c42e5351445955b8697213d067fba2bb6187c88 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:09 2016 +0200 drm/i915: Rename intel_shared_dpll_config to intel_shared_dpll_state Struct intel_shared_dpll_config is used to hold the state of the DPLL in the "atomic" sense, so call it state like everything else atomic. v2: Rebase Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-4-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 12 +++--- drivers/gpu/drm/i915/intel_atomic.c | 6 +-- drivers/gpu/drm/i915/intel_ddi.c | 10 ++--- drivers/gpu/drm/i915/intel_display.c | 22 +++++------ drivers/gpu/drm/i915/intel_dpll_mgr.c | 72 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_dpll_mgr.h | 4 +- drivers/gpu/drm/i915/intel_drv.h | 4 +- 7 files changed, 65 insertions(+), 65 deletions(-) commit 3c0fb58820ac8b5f80aa0000790ba359c0e37e41 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:08 2016 +0200 drm/i915: Rename intel_shared_dpll_commit() to _swap_state() The function intel_shared_dpll_commit() performs the equivalent of drm_atomic_helper_swap_state() for the shared dpll state, which is not handled by the helpers. So make it do a full swap of the state and rename it for consistency. v2: Fix typo in the commit message. (Durga) v3: Rebase. v4: Swap the states instead of just renaming the function. (Daniel) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Durgadoss R (v2) Reviewed-by: Daniel Vetter (v3) Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-3-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_dpll_mgr.c | 7 ++++++- drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit a1c414ee82d908571bab5f9fb8fd2aed3ed27b57 Author: Ander Conselvan de Oliveira Date: Thu Dec 29 17:22:07 2016 +0200 drm/i915: Introduce intel_release_shared_dpll() While the details of getting a shared dpll are wrapped by intel_get_shared_dpll(), the release was still hand rolled into the modeset code. Fix that by creating an entry point for releasing the pll and move that code there. v2: Take old_dpll from crtc->state instead of crtc_state. (CI) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483024933-3726-2-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 6 +---- drivers/gpu/drm/i915/intel_dpll_mgr.c | 41 +++++++++++++++-------------------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 11 +++------- 3 files changed, 22 insertions(+), 36 deletions(-) commit 15d3afcc051f74d04a285c08594629172a1a9131 Author: Felix Manlunas Date: Thu Dec 29 17:04:47 2016 -0800 liquidio: optimize reads from Octeon PCI console Reads from Octeon PCI console are inefficient because before each read operation, a dynamic mapping to Octeon DRAM is set up. This patch replaces the repeated setup of a dynamic mapping with a one-time setup of a static mapping. Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller .../net/ethernet/cavium/liquidio/octeon_config.h | 10 +++------- .../net/ethernet/cavium/liquidio/octeon_console.c | 10 ++++++++++ .../net/ethernet/cavium/liquidio/octeon_device.h | 6 ++++++ .../net/ethernet/cavium/liquidio/octeon_mem_ops.c | 21 ++++++++++++++++++++- 4 files changed, 39 insertions(+), 8 deletions(-) commit 3a543ef479868e36c95935de320608a7e41466ca Author: Florian Fainelli Date: Thu Dec 29 14:20:56 2016 -0800 net: dsa: Implement ndo_get_phys_port_id Implement ndo_get_phys_port_id() by returning the physical port number of the switch this per-port DSA created network interface corresponds to. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3d48b53fb2ae37158e700ffef3f45461ff15c965 Author: Matthias Tafelmeier Date: Thu Dec 29 21:37:21 2016 +0100 net: dev_weight: TX/RX orthogonality Oftenly, introducing side effects on packet processing on the other half of the stack by adjusting one of TX/RX via sysctl is not desirable. There are cases of demand for asymmetric, orthogonal configurability. This holds true especially for nodes where RPS for RFS usage on top is configured and therefore use the 'old dev_weight'. This is quite a common base configuration setup nowadays, even with NICs of superior processing support (e.g. aRFS). A good example use case are nodes acting as noSQL data bases with a large number of tiny requests and rather fewer but large packets as responses. It's affordable to have large budget and rx dev_weights for the requests. But as a side effect having this large a number on TX processed in one run can overwhelm drivers. This patch therefore introduces an independent configurability via sysctl to userland. Signed-off-by: Matthias Tafelmeier Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 21 +++++++++++++++++++++ include/linux/netdevice.h | 4 ++++ net/core/dev.c | 8 ++++++-- net/core/sysctl_net_core.c | 31 ++++++++++++++++++++++++++++++- net/sched/sch_generic.c | 2 +- 5 files changed, 62 insertions(+), 4 deletions(-) commit afbb167415843ef23546f5bfaf2a06c86750c2f0 Author: jpinto Date: Thu Dec 29 17:10:27 2016 +0000 stmmac: adding EEE to GMAC4 This patch adds Energy Efficiency Ethernet to GMAC4. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 12 +++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 59 +++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit bfd2e4b8734d34632f00391994b89c558dcb7d4e Author: Marcelo Ricardo Leitner Date: Thu Dec 29 15:53:28 2016 -0200 sctp: refactor sctp_datamsg_from_user This patch refactors sctp_datamsg_from_user() in an attempt to make it better to read and avoid code duplication for handling the last fragment. It also avoids doing division and remaining operations. Even though, it should still operate similarly as before this patch. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/chunk.c | 107 +++++++++++++++++-------------------------------------- 1 file changed, 32 insertions(+), 75 deletions(-) commit 5e4585315b0eb3876f16e85217e9380f37f0dd2c Merge: ae7cd93 3f0d80b Author: David S. Miller Date: Thu Dec 29 14:37:25 2016 -0500 Merge branch 'bnxt_en-updates' Michael Chan says: ==================== bnxt_en: updates for net-next. This patch series for net-next contains cleanups, new features and minor fixes. The driver specific busy polling code is removed to use busy polling support in core networking. Hardware RFS support is enhanced with added ipv6 flows support and VF support. A new scheme to allocate TX rings from the firmware is implemented for newer chips and firmware. Plus some misc. cleanups, minor fixes, and to add the maintainer entry. Please review. ==================== Signed-off-by: David S. Miller commit 3f0d80b6d228f11117244a16d2e17ea684b540f5 Author: Michael Chan Date: Thu Dec 29 12:13:44 2016 -0500 MAINTAINERS: Add bnxt_en maintainer info. Signed-off-by: Michael Chan Signed-off-by: David S. Miller MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit bdbd1eb59c565c56a74d21076e2ae8706de00ecd Author: Michael Chan Date: Thu Dec 29 12:13:43 2016 -0500 bnxt_en: Handle no aggregation ring gracefully. The current code assumes that we will always have at least 2 rx rings, 1 will be used as an aggregation ring for TPA and jumbo page placements. However, it is possible, especially on a VF, that there is only 1 rx ring available. In this scenario, the current code will fail to initialize. To handle it, we need to properly set up only 1 ring without aggregation. Set a new flag BNXT_FLAG_NO_AGG_RINGS for this condition and add logic to set up the chip to place RX data linearly into a single buffer per packet. 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 | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) commit 486b5c22ea1d35e00e90dd79a32a9ee530b18915 Author: Michael Chan Date: Thu Dec 29 12:13:42 2016 -0500 bnxt_en: Set default completion ring for async events. With the added support for the bnxt_re RDMA driver, both drivers can be allocating completion rings in any order. The firmware does not know which completion ring should be receiving async events. Add an extra step to tell firmware the completion ring number for receiving async events after bnxt_en allocates the completion rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 391be5c2736456f032fe0265031ecfe17aee84a0 Author: Michael Chan Date: Thu Dec 29 12:13:41 2016 -0500 bnxt_en: Implement new scheme to reserve tx rings. In order to properly support TX rate limiting in SRIOV VF functions or NPAR functions, firmware needs better control over tx ring allocations. The new scheme requires the driver to reserve the number of tx rings and to query to see if the requested number of tx rings is reserved. The driver will use the new scheme when the firmware interface spec is 1.6.1 or newer. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 59 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 15 ++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 10 +++- 4 files changed, 83 insertions(+), 3 deletions(-) commit dda0e7465f040ed814d4a5c98c6bf042e59cba69 Author: Michael Chan Date: Thu Dec 29 12:13:40 2016 -0500 bnxt_en: Add IPV6 hardware RFS support. Accept ipv6 flows in .ndo_rx_flow_steer() and support ETHTOOL_GRXCLSRULE ipv6 flows. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 32 +++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 53 +++++++++++++++++------ 2 files changed, 66 insertions(+), 19 deletions(-) commit 8427af811a2fcbbf0c71a4b1f904f2442abdcf39 Author: Michael Chan Date: Thu Dec 29 12:13:39 2016 -0500 bnxt_en: Assign additional vnics to VFs. Assign additional vnics to VFs whenever possible so that NTUPLE can be supported on the VFs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ae10ae740ad2befd92b6f5b2ab39220bce6e5da2 Author: Michael Chan Date: Thu Dec 29 12:13:38 2016 -0500 bnxt_en: Add new hardware RFS mode. The existing hardware RFS mode uses one hardware RSS context block per ring just to calculate the RSS hash. This is very wasteful and prevents VF functions from using it. The new hardware mode shares the same hardware RSS context for RSS placement and RFS steering. This allows VFs to enable RFS. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) commit 8079e8f107bf02e1e5ece89239dd2fb475a4735f Author: Michael Chan Date: Thu Dec 29 12:13:37 2016 -0500 bnxt_en: Refactor code that determines RFS capability. Add function bnxt_rfs_supported() that determines if the chip supports RFS. Refactor the existing function bnxt_rfs_capable() that determines if run-time conditions support RFS. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 38 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) commit 8fdefd63c203d9b2955d679704f4ed92bf40752c Author: Michael Chan Date: Thu Dec 29 12:13:36 2016 -0500 bnxt_en: Add function to get vnic capability. The new vnic RSS capability will enhance NTUPLE support, to be added in subsequent patches. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 22 +++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 34 +++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) commit 5910906ca9ee32943f67db24917f78a9ad1087db Author: Michael Chan Date: Thu Dec 29 12:13:35 2016 -0500 bnxt_en: Refactor TPA code path. Call tcp_gro_complete() in the common code path instead of the chip- specific method. The newer 5731x method is missing the call. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68515a186cf8a8f97956eaea5829277752399f58 Author: Michael Chan Date: Thu Dec 29 12:13:34 2016 -0500 bnxt_en: Fix and clarify link_info->advertising. The advertising field is closely related to the auto_link_speeds field. The former is the user setting while the latter is the firmware setting. Both should be u16. We should use the advertising field in bnxt_get_link_ksettings because the auto_link_speeds field may not be updated with the latest from the firmware yet. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 9d8bc09766f1a229b2d204c713a1cfc6c7fa1bb1 Author: Michael Chan Date: Thu Dec 29 12:13:33 2016 -0500 bnxt_en: Improve the IRQ disable sequence during shutdown. The IRQ is disabled by writing to the completion ring doorbell. This should be done before the hardware completion ring is freed for correctness. The current code disables IRQs after all the completion rings are freed. Fix it by calling bnxt_disable_int_sync() before freeing the completion rings. Rearrange the code to avoid forward declaration. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 89 ++++++++++++++++--------------- 1 file changed, 46 insertions(+), 43 deletions(-) commit e7b9569102995ebc26821789628eef45bd9840d8 Author: Michael Chan Date: Thu Dec 29 12:13:32 2016 -0500 bnxt_en: Use napi_complete_done() For better busy polling and GRO support. Do not re-arm IRQ if napi_complete_done() returns false. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b356a2e729cec145a648d22ba5686357c009da25 Author: Michael Chan Date: Thu Dec 29 12:13:31 2016 -0500 bnxt_en: Remove busy poll logic in the driver. Use native NAPI polling instead. The next patch will complete the work by switching to use napi_complete_done() Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 53 +---------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 99 ------------------------------- 2 files changed, 3 insertions(+), 149 deletions(-) commit 3a11c0e1f1394e9d871dd8e68f9ce01d7c96e28d Author: Colin Ian King Date: Thu Dec 29 10:13:43 2016 -0800 Input: synaptics-rmi4 - remove redundant null check on rmi_dev rmi_dev is currently being dereferenced before it null checked, however, after deeper inspecting, rmi_dev can never be null, so just remove this redundant check. Fixes CoverityScan CID 1391218 ("Dereference before null check") Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f03.c | 3 --- 1 file changed, 3 deletions(-) commit 0c54fe74db73499637315d6b3d83a7adbc6f32aa Author: Colin Ian King Date: Tue Dec 20 13:23:30 2016 -0800 Input: synaptics-rmi4 - check for non zero version logically dead code version is a u8, the check for version > 0 means that version can only be zero, so the subsequent check for version != 0 is never true and hence is redudant code and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f34.c | 2 -- 1 file changed, 2 deletions(-) commit b29c139a15b627cd3db803332c89f0ea1b94fc7b Author: Dmitry Torokhov Date: Tue Dec 27 11:42:28 2016 -0800 Input: synaptics-rmi4 - use Kconfig "if" to express dependency There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4 support, we can guard all of them at once with "if RMI4_CORE". Also use tabs for F03 indentation. Reviewed-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 25e77388e1ab63e11e21d94a994eca227472aeed Author: Bjorn Helgaas Date: Thu Dec 29 11:27:52 2016 -0600 PCI: Remove res_to_dev_res() debug message Remove res_to_dev_res() debug message. This is printed from a lookup function. If the message is important, it should be printed from the caller with more context. Signed-off-by: Bjorn Helgaas Acked-by: Yinghai Lu drivers/pci/setup-bus.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit ae7cd93e20a135cf6e2021de92b37f2988aec1de Author: Colin Ian King Date: Wed Dec 28 17:31:20 2016 +0000 drivers: atm: eni: rename macro DAUGTHER_ID to fix spelling mistake Rename DAUGTHER_ID to DAUGHTER_ID to fix spelling mistake Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/eni.c | 2 +- drivers/atm/midway.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit de8499cee59465cfa6135591d665a065539d456b Author: Dave Jones Date: Wed Dec 28 11:53:18 2016 -0500 ipv6: remove unnecessary inet6_sk check np is already assigned in the variable declaration of ping_v6_sendmsg. At this point, we have already dereferenced np several times, so the NULL check is also redundant. Suggested-by: Eric Dumazet Signed-off-by: Dave Jones Signed-off-by: David S. Miller net/ipv6/ping.c | 7 ------- 1 file changed, 7 deletions(-) commit 9eb12474787d32a968b5b01ecbf83acd2d230b25 Author: jpinto Date: Wed Dec 28 12:57:48 2016 +0000 stmmac: enable rx queues When the hardware is synthesized with multiple queues, all queues are disabled for default. This patch adds the rx queues configuration. This patch was successfully tested in a Synopsys QoS Reference design. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 5 +++++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 8 +++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 12 +++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 5 +++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 26 +++++++++++++++++++++++ 5 files changed, 56 insertions(+) commit fee83d097b1620530f23bf6063f4ea251ba9c8c7 Author: Haishuang Yan Date: Wed Dec 28 17:52:33 2016 +0800 ipv4: Namespaceify tcp_max_syn_backlog knob Different namespace application might require different maximal number of remembered connection requests. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/request_sock.h | 4 +--- net/core/request_sock.c | 2 -- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp.c | 2 -- net/ipv4/tcp_input.c | 4 ++-- net/ipv4/tcp_ipv4.c | 7 +++++-- 7 files changed, 16 insertions(+), 18 deletions(-) commit 1946e672c173559155a3e210fe95dbf8b7b8ddf7 Author: Haishuang Yan Date: Wed Dec 28 17:52:32 2016 +0800 ipv4: Namespaceify tcp_tw_recycle and tcp_max_tw_buckets knob Different namespace application might require fast recycling TIME-WAIT sockets independently of the host. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/inet_timewait_sock.h | 13 +------------ include/net/netns/ipv4.h | 11 +++++++++++ include/net/tcp.h | 1 - net/ipv4/af_inet.c | 2 -- net/ipv4/inet_timewait_sock.c | 3 +-- net/ipv4/proc.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 28 ++++++++++++++-------------- net/ipv4/tcp.c | 3 ++- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c | 12 ++++++++---- net/ipv4/tcp_minisocks.c | 14 +++++--------- net/ipv6/tcp_ipv6.c | 7 ++++--- 12 files changed, 48 insertions(+), 50 deletions(-) commit 801822d1beea4f11a38df991b420ca917f6a917b Author: Shyam Saini Date: Sat Dec 24 00:44:58 2016 +0530 net: Use kmemdup instead of kmalloc and memcpy when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini Signed-off-by: David S. Miller drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5671e8c19c8cb4dd432e54f5bc5e2e9a9bac894b Author: Joe Perches Date: Wed Dec 21 19:54:53 2016 -0800 fddi: skfp: Use more common logging styles Several macros use non-standard styles where format and arguments are not verified. Convert these to a more typical fmt, ##__VA_ARGS__ use so format and arguments match as appropriate. Miscellanea: o Fix format and argument mismatches o Realign and reindent misindented block o Strip newlines from formats and add to macro defines o Coalesce a few consecutive logging uses to more simple single uses Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/fddi/skfp/cfm.c | 22 ++++---- drivers/net/fddi/skfp/drvfbi.c | 4 +- drivers/net/fddi/skfp/ecm.c | 34 ++++++------ drivers/net/fddi/skfp/ess.c | 66 ++++++++++++------------ drivers/net/fddi/skfp/fplustm.c | 24 ++++----- drivers/net/fddi/skfp/h/cmtdef.h | 67 +++++++++++++----------- drivers/net/fddi/skfp/hwmtm.c | 2 +- drivers/net/fddi/skfp/pcmplc.c | 83 +++++++++++++++-------------- drivers/net/fddi/skfp/pmf.c | 4 +- drivers/net/fddi/skfp/rmt.c | 40 +++++++------- drivers/net/fddi/skfp/smt.c | 109 +++++++++++++++++++-------------------- drivers/net/fddi/skfp/srf.c | 14 +++-- 12 files changed, 232 insertions(+), 237 deletions(-) commit 5dbc6530939126cd61cb6c2e6d7b0a95741aaee6 Author: Joe Perches Date: Wed Dec 21 16:41:52 2016 -0800 skfp: hwmtm: Use proper logging macros, correct mismatches Logging macros should allow format and argument validation. The DB_TX, DB_RX, and DB_GEN macros did not. Update the macros and uses and add no_printk validation to the previously compiled away #ifndef DEBUG variants. Done with coccinelle and some typing. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/fddi/skfp/h/hwmtm.h | 24 ++++-- drivers/net/fddi/skfp/hwmtm.c | 176 ++++++++++++++++++++-------------------- 2 files changed, 106 insertions(+), 94 deletions(-) commit a5b16dfa5bc30034aaa7f74efe9ef54e7db79df6 Author: Marek Szyprowski Date: Fri Nov 25 10:39:54 2016 +0100 clk: samsung: exynos-audss: Replace syscore PM with platform device PM Exynos AUDSS clock driver has been already converted to platform driver, so remove the dependency on the syscore ops - the last remaining non-platform driver feature. Platform device's system sleep PM provides all needed infrastructure for replacing syscore-based PM, so do it now. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos-audss.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 0cda91181211280dd2fca88f71919efa54feadaf Author: Chanwoo Choi Date: Thu Dec 8 13:58:07 2016 +0900 clk: samsung: exynos5433: Set NoC (Network On Chip) clocks as critical The ACLK_BUS0/1/2 are used for NoC (Network on Chip). If NoC's clocks are disabled, the system halt happens. Following clocks must be always enabled: - CLK_ACLK_BUS0_400 : NoC's bus clock for PERIC/PERIS/FSYS/MSCL, - CLK_ACLK_BUS1_400 : NoC's bus clock for MFC/HEVC/G3D, - CLK_ACLK_BUS2_400 : NoC's bus clock for GSCL/DISP/G2D/CAM0/CAM1/ISP. This patch also adds the CLK_SET_RATE_PARENT flag to the CLK_SCLK_JPEG_MSCL because this clock should be used for bus frequency scaling. This clock need to be changed on the fly with CLK_SET_RATE_PARENT flag. Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c369596f895be88d09f4165b223fa31c64aaefd4 Author: Bartlomiej Zolnierkiewicz Date: Thu Dec 29 14:36:50 2016 +0100 clk: samsung: Add CPU clk configuration data for Exynos4412 Prime Add cpu clock configuration data for Exynos4412 Prime SoC (it supports additional PLL rates & CPU frequencies). Based on Hardkernel's kernel for ODROID-X2/U2/U3 boards. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3590312f4773d3a3b3040c4a615bb79aada68a4c Author: Marek Szyprowski Date: Mon Dec 19 11:00:48 2016 +0100 ARM: dts: exynos: Enable DMA support for UART modules on Exynos5 SoCs UART modules can use DMA for offloading data transfers and reducing interrupts, so enable this feature for Exynos5 boards. Tested on Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid XU3 (Exynos5422) boards. Signed-off-by: Marek Szyprowski Tested-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250.dtsi | 8 ++++++++ arch/arm/boot/dts/exynos5410.dtsi | 8 ++++++++ arch/arm/boot/dts/exynos5420.dtsi | 8 ++++++++ 3 files changed, 24 insertions(+) commit 74b0ee7579f279dae053053008d29f10f3890c07 Author: Robie Basak Date: Mon Dec 19 00:56:37 2016 +0000 ARM: exynos_defconfig: Enable IP multicast Prior to Nikolay's commit dcd87999d, libnss-mdns (eg. to resolve "foo.local" on the LAN using mDNS) worked without CONFIG_IP_MULTICAST defined, but dcd87999d caused it to stop working without having CONFIG_IP_MULTICAST defined explicitly. Since exynos_defconfig did not previously define CONFIG_IP_MULTICAST, mDNS used to work for users building with just exynos_defconfig, but stopped working from dcd87999d. Define CONFIG_IP_MULTICAST explicitly in exynos_defconfig as it appears essential anyway. Signed-off-by: Robie Basak Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+) commit cda1a52dab50340728e46601e6c9da9fc4beaf1f Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:38 2016 +0200 ARM: s3c64xx: Constify wake_irqs samsung_sync_wakemask() accepts pointer to const data so wake_irqs can be made const to increase safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-s3c64xx/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7264ebd92e20194ed26424a72cda6ab1e9bee655 Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:37 2016 +0200 ARM: s3c24xx: Constify wake_irqs samsung_sync_wakemask() accepts pointer to const data so wake_irqs can be made const to increase safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-s3c24xx/pm-s3c2412.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9060a4172f7562498802f6dc60869515cda34c76 Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:36 2016 +0200 ARM: SAMSUNG: Constify array of wake irqs passed to samsung_sync_wakemask The samsung_sync_wakemask() iterates over passed array of wake irqs but does not modify it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/plat-samsung/include/plat/wakeup-mask.h | 2 +- arch/arm/plat-samsung/wakeup-mask.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 552146b0c20d8265f7c570251c86fc4ec44959ee Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:35 2016 +0200 ARM: s3c64xx: Annotate external clock frequencies __ro_after_init The xtal_f and xusbxti_f static variables are modified only through __init accessors (like s3c64xx_set_xtal_freq()). Later these variables are used only in read-only way so we can mark them __ro_after_init to increase code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-s3c64xx/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f3c7bfd738803915787bc8a6db663faa599e29f8 Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:34 2016 +0200 ARM: s3c24xx: Constify few integer tables These arrays are not modified so they can be made const. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-s3c24xx/bast-irq.c | 4 ++-- arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 731d97c236833c2179ce6fe7a5eb32c46f71df27 Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:33 2016 +0200 ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init The pointers to __iomem sysram and exynos_pm_data are set only during initcalls. Later the pointers itself are used only in read-only way so we can mark them __ro_after_init to increase code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-exynos/exynos.c | 4 ++-- arch/arm/mach-exynos/mcpm-exynos.c | 2 +- arch/arm/mach-exynos/suspend.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit b4765037fc8c392027e604cf05771f0ac2790303 Author: Krzysztof Kozlowski Date: Sat Dec 10 15:47:32 2016 +0200 ARM: EXYNOS: Constify list of retention registers The list of retention registers (release_ret_regs field of struct exynos_pm_data and arrays with values) are not modified and can be made const to improve the const safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/mach-exynos/suspend.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8617690174041dfe959b6ad71f1ff93ef4bea5d3 Author: Bartosz Markowski Date: Thu Dec 15 11:23:24 2016 +0200 ath10k: add debug trace to rts/cts set function Align it with the cts protection call. Signed-off-by: Bartosz Markowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 3 +++ 1 file changed, 3 insertions(+) commit 7cfe0455ee1218add152e986b89b4bb8dbeafcdd Author: Bartosz Markowski Date: Thu Dec 15 11:23:24 2016 +0200 ath10k: set CTS protection VDEV param only if VDEV is up The cts protection vdev parameter, in new QCA9377 TF2.0 firmware, requires bss peer to be created for the STATION vdev type. bss peer is being allocated by the firmware after vdev_start/_up commands. mac80211 may call the cts protection setup at any time, so the we needs to track the situation and defer the cts configuration to prevent firmware asserts, like below: [00]: 0x05020001 0x000015B3 0x0099ACE2 0x00955B31 [04]: 0x0099ACE2 0x00060730 0x00000004 0x00000000 [08]: 0x0044C754 0x00412C10 0x00000000 0x00409C54 [12]: 0x00000009 0x00000000 0x00952F6C 0x00952F77 [16]: 0x00952CC4 0x00910712 0x00000000 0x00000000 [20]: 0x4099ACE2 0x0040E858 0x00421254 0x004127F4 [24]: 0x8099B9B2 0x0040E8B8 0x00000000 0xC099ACE2 [28]: 0x800B75CB 0x0040E8F8 0x00000007 0x00005008 [32]: 0x809B048A 0x0040E958 0x00000010 0x00433B10 [36]: 0x809AFBBC 0x0040E9A8 0x0042BB74 0x0042BBBC [40]: 0x8091D252 0x0040E9C8 0x0042BBBC 0x00000001 [44]: 0x809FFA45 0x0040EA78 0x0043D3E4 0x0042C2C8 [48]: 0x809FCEF4 0x0040EA98 0x0043D3E4 0x00000001 [52]: 0x80911210 0x0040EAE8 0x00000010 0x004041D0 [56]: 0x80911154 0x0040EB28 0x00400000 0x00000000 Signed-off-by: Bartosz Markowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 51 +++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) commit 35bac90abf5e5de9c3675c9828b427839362cf03 Author: Bartosz Markowski Date: Thu Dec 15 11:23:23 2016 +0200 ath10k: decrease num of peers support The correct number for QCA9377 chip is 33 VDEVs. This impacts also QCA6174 chip and it's max VDEV number. Signed-off-by: Bartosz Markowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b08b5b53a1ed2bd7a883f8fd29232c8f03604671 Author: Bartosz Markowski Date: Thu Dec 15 11:23:22 2016 +0200 ath10k: override CE5 config for QCA9377 Similarly to QCA6174, QCA9377 requires the CE5 configuration to be available for other feature. Use the ath10k_pci_override_ce_config() for it as well. This is required for TF2.0 firmware. Previous FW revisions were working fine without this patch. Fixes: a70587b3389a ("ath10k: configure copy engine 5 for HTT messages") Signed-off-by: Bartosz Markowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77cf13ad57315736bcd79f3cff9b2284218e0be6 Author: Bartosz Markowski Date: Thu Dec 15 11:23:22 2016 +0200 ath10k: fix IRAM banks number for QCA9377 QCA9377 firmware shall alloc 4 IRAM banks Signed-off-by: Bartosz Markowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae774e2c68d19da7a8e982889a5a1684cac93c78 Author: Daniel Vetter Date: Thu Dec 29 11:44:35 2016 +0100 drm/doc: link style-guide to doc-guide Our style guide should only be the delta compared to the overall one. Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1483008275-29383-1-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/introduction.rst | 2 ++ 1 file changed, 2 insertions(+) commit 6bfebd863b2b831dc5b098fd6e04732f8dc22935 Author: Sylwester Nawrocki Date: Thu Nov 10 16:17:56 2016 +0100 ARM: s3c24xx: Drop unused struct s3c_audio_pdata entries The s3c24xx-iis driver is now converted to use the dma_slave_map API and the samsung-ac97 driver got removed from the tree so remove the unused platform data structure instances. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/plat-samsung/devs.c | 19 ------------------- 1 file changed, 19 deletions(-) commit b70ff8779a3c2777778e3ee9abb6bde661f8b531 Author: Sylwester Nawrocki Date: Thu Nov 10 16:17:55 2016 +0100 ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c64xx/dev-audio.c | 19 ------------------- 1 file changed, 19 deletions(-) commit b77b7565a6d11611c3f179941d2b95c2d72939dc Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:51:56 2016 -0200 sctp: add pr_debug for tracking asocs not found This pr_debug may help identify why the system is generating some Aborts. It's not something a sysadmin would be expected to use. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/input.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 3ea35d3406d31a7389c2a299e28168c52040843a Author: Gao Feng Date: Wed Dec 28 16:47:42 2016 +0800 driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx There are three functions which would invoke the ipvlan_count_rx. They are ipvlan_process_multicast, ipvlan_rcv_frame, and ipvlan_nf_input. The former two functions already use the ipvlan directly before ipvlan_count_rx, and ipvlan_nf_input gets the ipvlan from ipvl_addr->master, it is not possible to be NULL too. So the ipvlan pointer check is unnecessary in ipvlan_count_rx. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 3 --- 1 file changed, 3 deletions(-) commit 8667398277afe5312ac6e70589c4c661545179c7 Author: Gao Feng Date: Wed Dec 28 16:46:51 2016 +0800 driver: ipvlan: Define common functions to decrease duplicated codes used to add or del IP address There are some duplicated codes in ipvlan_add_addr6/4 and ipvlan_del_addr6/4. Now define two common functions ipvlan_add_addr and ipvlan_del_addr to decrease the duplicated codes. It could be helful to maintain the codes. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 68 +++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 39 deletions(-) commit c4907c6ebb184f5038e6227d9a3e23076ee5db63 Merge: 8f18e4d 509e7a3 Author: David S. Miller Date: Wed Dec 28 14:06:32 2016 -0500 Merge branch 'sctp-cleanups' Marcelo Ricardo Leitner says: ==================== SCTP cleanups Some cleanups/simplifications I've been collecting. Resending now with net-next open. ==================== Signed-off-by: David S. Miller commit 509e7a311f0423bce6d3e1705ba0a470ffe770dc Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:26:35 2016 -0200 sctp: sctp_chunk_length_valid should return bool Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 66b91d2cd0344c417194596ef6e387e52be69e57 Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:26:34 2016 -0200 sctp: remove return value from sctp_packet_init/config There is no reason to use this cascading. It doesn't add anything. Let's remove it and simplify. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 7 +++---- net/sctp/output.c | 14 +++++--------- net/sctp/sm_statefuns.c | 5 +++-- 3 files changed, 11 insertions(+), 15 deletions(-) commit 0630c56e40b0bcca299d3b4c20ffcfddbe6a0218 Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:26:33 2016 -0200 sctp: simplify addr copy Make it a bit easier to read. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/ipv6.c | 16 +++++++--------- net/sctp/protocol.c | 18 +++++++----------- 2 files changed, 14 insertions(+), 20 deletions(-) commit 1ff0156167dfb625c2e82aefded6b4cf245476ce Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:26:32 2016 -0200 sctp: reduce indent level in sctp_sf_shut_8_4_5 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit eab59075d3cd7f3535aa2dbbc19a198dfee58892 Author: Marcelo Ricardo Leitner Date: Wed Dec 28 09:26:31 2016 -0200 sctp: reduce indent level at sctp_sf_tabort_8_4_8 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit d1ad1b1483654ece16a3653592084c94a2bc1268 Author: Krzysztof Kozlowski Date: Sun Nov 20 21:24:55 2016 +0200 ARM: s5pv210_defconfig: Remove old MACHs Remove non-existing MACH symbols from S5PV210 defconfig. Signed-off-by: Krzysztof Kozlowski arch/arm/configs/s5pv210_defconfig | 4 ---- 1 file changed, 4 deletions(-) commit 287dad02e6590b00e4d8d5219993a2dca752b800 Author: Markus Reichl Date: Mon Nov 28 13:48:06 2016 +0100 ARM: dts: exynos: Cleanup Odroid-X2 and enable sound on Odroid-X Odroid-X2 differs from Odroid-X only in RAM and prime CPU. Remove doubled nodes from exynos4412-odroidx2.dts and move sound node to exynos4412-odroidx.dts to enable sound on both boards. Signed-off-by: Markus Reichl Reviewed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-odroidx.dts | 13 +++++++++++++ arch/arm/boot/dts/exynos4412-odroidx2.dts | 24 ------------------------ 2 files changed, 13 insertions(+), 24 deletions(-) commit f3a3a3bf7103faa0c6bd16a26caef0118fc58163 Author: Marek Szyprowski Date: Fri Dec 9 08:22:11 2016 +0100 ARM: dts: exynos: Fix initial audio clocks configuration on Exynos4 boards Move assigned clocks properties from sound node to audio subsystem clock controller node. This way clocks topology and rates are set just after probing audio clocks controller. Leaving those properties under sound node doesn't guarantee to configure them before they are being used (for example i2s hardware module can be probed in parallel and it also require proper audio clocks configuration). Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-itop-elite.dts | 21 ++++++++++----------- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) commit 087ce39cdf4b0a95344ae18676017aacfe51b954 Author: Marek Szyprowski Date: Fri Dec 9 08:22:10 2016 +0100 ARM: dts: exynos: Correct clocks for Exynos4 I2S module "iis", "i2s_opclk0" and "i2s_opclk1" are standard clocks for Exynos4 I2S hardware module, so they should be defined in .dtsi file not in the random board .dts file. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 6 ++++-- arch/arm/boot/dts/exynos4412-itop-elite.dts | 4 ---- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) commit 823ff161fe51179cc9ad1a3f6c7e4532901e0444 Author: Gabriele Mazzotta Date: Sat Dec 24 19:50:01 2016 +0100 ALSA: hda - Fix click noises on Samsung Ativ Book 8 The Samsung Ativ Book 8 makes a loud click noise on boot, shutdown and when the audio card enters or exits power saving states. All these noises disappear applying ALC269_FIXUP_NO_SHUTUP. In addition to that, fix the loud click noise that the laptop makes when inserting or removing the headphone jack by automuting via amp instead of pinctl. Signed-off-by: Gabriele Mazzotta Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 972aa2c708703c21f14eb958b37e82aae2530e44 Author: Gabriele Mazzotta Date: Sat Dec 24 19:50:00 2016 +0100 ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE Setting shutup when the action is HDA_FIXUP_ACT_PRE_PROBE might not have the desired effect since it could be overridden by another more generic shutup function. Prevent this by setting the more specific shutup function on HDA_FIXUP_ACT_PROBE. Signed-off-by: Gabriele Mazzotta Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c623c2409b105c3960d60f450ccc0b37d8cb89a Author: Geliang Tang Date: Sat Dec 24 23:28:34 2016 +0800 ALSA: mixart: fix a comment typo Fix a comment typo in mixart.h. Signed-off-by: Geliang Tang Signed-off-by: Takashi Iwai sound/pci/mixart/mixart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eff682d765b496ce2f9727bb1e001ec77b21453 Author: Jussi Laako Date: Sat Dec 17 23:51:41 2016 +0200 ALSA: usb-audio: Support both DSD LE/BE Amanero firmware versions Add DSD support for both little endian (DSD_U32_LE) and big endian (DSD_U32_BE) version of the Amanero firmware. Signed-off-by: Jussi Laako Signed-off-by: Takashi Iwai sound/usb/quirks.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f93a1c9e5e6a8ce05391708157af5bfd71fe6c21 Author: Kees Cook Date: Fri Dec 16 16:59:44 2016 -0800 ALSA: synth: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/synth/emux/emux_seq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fe4cb86cdea781e969f37b9aa9db95577ff485f2 Author: Jérémy Lefaure Date: Fri Dec 16 19:25:27 2016 -0500 ALSA: cs5535audio: fix unused warnings on resume/suspend When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use snd_cs5535audio_resume and snd_cs5535audio_suspend functions: sound/pci/cs5535audio/cs5535audio_pm.c:77:12: warning: ‘snd_cs5535audio_resume’ defined but not used [-Wunused-function] static int snd_cs5535audio_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ sound/pci/cs5535audio/cs5535audio_pm.c:58:12: warning: ‘snd_cs5535audio_suspend’ defined but not used [-Wunused-function] static int snd_cs5535audio_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~ Adding __maybe_unused to the declaration of these functions removes the warnings. Signed-off-by: Jérémy Lefaure Signed-off-by: Takashi Iwai sound/pci/cs5535audio/cs5535audio_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 364ac45655f10217d3fadc013347fde49f870f39 Author: Bartosz Golaszewski Date: Tue Dec 20 12:28:20 2016 +0100 gpio: mockup: coding style fixes Fix whitespace errors and arrange local variables for better readability. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit ad6d8004fa29a8958381b60215e32d1e903b0492 Author: Bartosz Golaszewski Date: Tue Dec 20 12:28:19 2016 +0100 gpio: mockup: dynamically allocate memory for chip name Currently the chip name buffer is allocated on the stack and the address of the buffer is passed to the gpio framework. It's invalid after probe() returns, so the sysfs label attribute displays garbage. Use devm_kasprintf() for each string instead. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit e53c60289dfaba57fd8bf108406b94a71bb9bac1 Author: Bartosz Golaszewski Date: Tue Dec 20 12:28:18 2016 +0100 gpio: mockup: make pins_name_start static This variable is not used outside this module. Make it static. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b8b75de4cb379187c481a5332a12429f31c0887 Author: Chris Wilson Date: Wed Dec 28 10:51:20 2016 +0000 drm: Add kerneldoc markup for new @scan parameters in drm_mm A couple of parameters slipped through the kerneldoc net. Reported-by: kbuild test robot Signed-off-by: Chris Wilson Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161228105120.14500-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 2 ++ 1 file changed, 2 insertions(+) commit 1c9bd1ede83cb391db2af481c73b01b63ab41e96 Author: Daniel Vetter Date: Tue Dec 27 11:10:57 2016 +0100 drm/mm: Document locking rules Drivers need to take care. Motivated by a discussion between Mark and Rob on dri-devel. Cc: Mark yao Cc: Rob Clark Reviewed-by: Chris Wilson [danvet: s/alloc|freeing/modifications/ per Chris' suggestion.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482833457-29592-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mm.c | 5 +++++ 1 file changed, 5 insertions(+) commit adb040b86bc290d3d8a339ad8e91c96a9f506095 Author: Chris Wilson Date: Thu Dec 22 08:36:39 2016 +0000 drm: Use drm_mm_insert_node_in_range_generic() for everyone Remove a superfluous helper as drm_mm_insert_node is equivalent to insert_node_in_range with a range of [0, U64_MAX]. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-37-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 166 ++++------------------------------------------- include/drm/drm_mm.h | 90 +++++++++++++++---------- 2 files changed, 67 insertions(+), 189 deletions(-) commit 3db93756b501e5f0a3951c79cfa9ed43c26d3455 Author: Chris Wilson Date: Thu Dec 22 08:36:38 2016 +0000 drm: Apply range restriction after color adjustment when allocation mm->color_adjust() compares the hole with its neighbouring nodes. They only abutt before we restrict the hole, so we have to apply color_adjust before we apply the range restriction. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-36-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 3f85fb3462dc1c87a9353eb38714468d46248b2e Author: Chris Wilson Date: Thu Dec 22 08:36:37 2016 +0000 drm: Wrap drm_mm_node.hole_follows Insulate users from changes to the internal hole tracking within struct drm_mm_node by using an accessor for hole_follows. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen [danvet: resolve conflicts in i915_vma.c] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_mm.c | 12 ++++++------ drivers/gpu/drm/i915/i915_vma.c | 4 ++-- drivers/gpu/drm/selftests/test-drm_mm.c | 18 ++++++++++-------- include/drm/drm_mm.h | 22 +++++++++++++++++++--- 4 files changed, 37 insertions(+), 19 deletions(-) commit 3bfd44306c65d073008b9ca8f062249f35576b61 Author: Shah, Nehal-bakulchandra Date: Tue Dec 6 12:17:48 2016 +0530 pinctrl: amd: Add support for additional GPIO This patch adds support for new Bank and adds IRQCHIP_SKIP_SET_WAKE flag. Reviewed-by: S-k, Shyam-sundar Signed-off-by: Nehal Shah Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 25 +++++++++++++++---------- drivers/pinctrl/pinctrl-amd.h | 8 +++++--- 2 files changed, 20 insertions(+), 13 deletions(-) commit 3fa489dabea9a1cb0656e2da90354f7c4e53f890 Author: Chris Wilson Date: Thu Dec 22 08:36:36 2016 +0000 drm: Apply tight eviction scanning to color_adjust Using mm->color_adjust makes the eviction scanner much tricker since we don't know the actual neighbours of the target hole until after it is created (after scanning is complete). To work out whether we need to evict the neighbours because they impact upon the hole, we have to then check the hole afterwards - requiring an extra step in the user of the eviction scanner when they apply color_adjust. v2: Massage kerneldoc. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-34-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 76 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_evict.c | 7 +++ drivers/gpu/drm/selftests/test-drm_mm.c | 20 ++++++++- include/drm/drm_mm.h | 1 + 4 files changed, 77 insertions(+), 27 deletions(-) commit f29051f12f33078b81ac710bee9ebd7a85ee1849 Author: Chris Wilson Date: Thu Dec 22 08:36:35 2016 +0000 drm: Simplify drm_mm scan-list manipulation Since we mandate a strict reverse-order of drm_mm_scan_remove_block() after drm_mm_scan_add_block() we can further simplify the list manipulations when generating the temporary scan-hole. v2: Highlight the games being played with the lists to track the scan holes without allocation. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-33-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 35 ++++++++++++++++++----------------- include/drm/drm_mm.h | 7 +------ 2 files changed, 19 insertions(+), 23 deletions(-) commit 4741da925fa3e5acdd4da154f4803dad383e882f Author: Chris Wilson Date: Sat Dec 24 19:31:46 2016 +0000 drm/i915/guc: Assert that all GGTT offsets used by the GuC are mappable Add an assertion to the plain i915_ggtt_offset() to double check that any offset we hand to the GuC is outside of its unmappable ranges. Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/20161224193146.4402-1-chris@chris-wilson.co.uk Reviewed-by: Daniele Ceraolo Spurio drivers/gpu/drm/i915/i915_guc_submission.c | 14 +++++++------- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++--- drivers/gpu/drm/i915/intel_uc.h | 9 +++++++++ 3 files changed, 19 insertions(+), 10 deletions(-) commit 9a956b1548794033d5b893d6d6fcc00b197cfc9b Author: Chris Wilson Date: Thu Dec 22 08:36:34 2016 +0000 drm: Optimise power-of-two alignments in drm_mm_scan_add_block() For power-of-two alignments, we can avoid the 64bit divide and do a simple bitwise add instead. v2: s/alignment_mask/remainder_mask/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-32-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 9 ++++++++- include/drm/drm_mm.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 0b04d474a611e2831d142e246422a03a10998ae1 Author: Chris Wilson Date: Thu Dec 22 08:36:33 2016 +0000 drm: Compute tight evictions for drm_mm_scan Compute the minimal required hole during scan and only evict those nodes that overlap. This enables us to reduce the number of nodes we need to evict to the bare minimum. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-31-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 60 +++++++++++++++++++++++++++------ drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 3 +- drivers/gpu/drm/selftests/test-drm_mm.c | 10 +++--- include/drm/drm_mm.h | 22 ++++++------ 5 files changed, 71 insertions(+), 26 deletions(-) commit 268c6498fba2f6555d215408ae4de3ca1a08fb77 Author: Chris Wilson Date: Thu Dec 22 08:36:32 2016 +0000 drm: Fix application of color vs range restriction when scanning drm_mm The range restriction should be applied after the color adjustment, or else we may inadvertently apply the color adjustment to the restricted hole (and not against its neighbours). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-30-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 2c4b389518fbe552188928aadcd3815d5116a05c Author: Chris Wilson Date: Thu Dec 22 08:36:31 2016 +0000 drm: Unconditionally do the range check in drm_mm_scan_add_block() Doing the check is trivial (low cost in comparison to overall eviction) and helps simplify the code. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-29-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 53 +++-------------------------------- drivers/gpu/drm/i915/i915_gem_evict.c | 10 ++----- include/drm/drm_mm.h | 33 ++++++++++++++++++---- 3 files changed, 34 insertions(+), 62 deletions(-) commit 4a6c156f56beaaf83102c8b29baeef070c697093 Author: Chris Wilson Date: Thu Dec 22 08:36:30 2016 +0000 drm: Rename prev_node to hole in drm_mm_scan_add_block() Acknowledging that we were building up the hole was more useful to me when reading the code, than knowing the relationship between this node and the previous node. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-28-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 25a7bb18346f94eef9125d54e3b010ae97d03635 Author: Daniel Vetter Date: Wed Dec 28 10:41:17 2016 +0100 drm: Fix O= out-of-tree builds for selftests Kbuild really doesn't like non-recursive Makefiles, but they do work as long as you build without O= Reported-by: kbuild test robot Fixes: 50f0033d1a0f ("drm: Add some kselftests for the DRM range manager (struct drm_mm)") Cc: Chris Wilson Cc: Christian König Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482918077-30027-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/selftests/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 5386e5d1f8b7305e447b781f7ac02649f7a4d055 Author: Herbert Xu Date: Wed Dec 28 17:39:26 2016 +0800 Revert "crypto: arm64/ARM: NEON accelerated ChaCha20" This patch reverts the following commits: 8621caa0d45e731f2e9f5889ff5bb384fcd6e059 8096667273477e735b0072b11a6d617ccee45e5f I should not have applied them because they had already been obsoleted by a subsequent patch series. They also cause a build failure because of the subsequent commit 9ae433bc79f9. Fixes: 9ae433bc79f ("crypto: chacha20 - convert generic and...") Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 6 - arch/arm/crypto/Makefile | 2 - arch/arm/crypto/chacha20-neon-core.S | 523 --------------------------------- arch/arm/crypto/chacha20-neon-glue.c | 136 --------- arch/arm64/crypto/Kconfig | 6 - arch/arm64/crypto/Makefile | 3 - arch/arm64/crypto/chacha20-neon-core.S | 480 ------------------------------ arch/arm64/crypto/chacha20-neon-glue.c | 131 --------- 8 files changed, 1287 deletions(-) commit b4ed1d15b453c86b4b9362128bd7a0ecd95a105c Author: Wei Yang Date: Sun Dec 25 14:35:51 2016 +0000 x86/e820: Make e820_search_gap() static and remove unused variables e820_search_gap() is just used locally now and the 'start_addr' and 'end_addr' parameters are fixed values. Also, 'gapstart' is not checked in this function anymore. So make the function static and remove those unused variables. Signed-off-by: Wei Yang Acked-by: Yinghai Lu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Link: http://lkml.kernel.org/r/1482676551-11411-1-git-send-email-richard.weiyang@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/e820.h | 2 -- arch/x86/kernel/e820.c | 16 +++++----------- 2 files changed, 5 insertions(+), 13 deletions(-) commit 2d65472bcb3f2e1f305529655bb06054dc9e2804 Author: Geert Uytterhoeven Date: Thu Dec 8 18:32:28 2016 +0100 gpio: rcar: Fine-grained Runtime PM support Currently gpio modules are runtime-resumed at probe time. This means the gpio module will be active all the time (except during system suspend, if not configured as a wake-up source). While an R-Car Gen2 gpio module retains pins configured for output at the requested level while put in standby mode, gpio register cannot be accessed while suspended. Unfortunately pm_runtime_get_sync() cannot be called from all contexts where gpio register access is needed. Hence move the Runtime PM handling from probe/remove time to gpio request/free time, which is probably the best we can do. On r8a7791/koelsch, gpio modules 0, 1, 3, and 4 are now suspended during normal use (gpio2 is used for LEDs and regulators, gpio5 for keys, gpio6 for SD-Card CD & WP, gpio7 for keys and regulators). Signed-off-by: Geert Uytterhoeven [Niklas: s/gpio_to_priv(chip)/gpiochip_get_data(chip)/] Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 47bd38a31adcd5b92f5e11919a101a310305dbb1 Author: Niklas Söderlund Date: Thu Dec 8 18:32:27 2016 +0100 gpio: rcar: set IRQ chip parent_device This enables Runtime PM handling for interrupts. By setting the parent_device in struct irq_chip genirq will call the pm_runtime_get/put APIs when an IRQ is requested/freed. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 1 + 1 file changed, 1 insertion(+) commit b75dd8722e1779767a018009ab6550de33a9136e Author: Andrew Jeffery Date: Tue Dec 20 18:05:51 2016 +1030 pinctrl: aspeed: Fix kerneldoc return descriptions Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f1337856dd88858bf58bd062306ccbfb63303085 Author: Andrew Jeffery Date: Tue Dec 20 18:05:50 2016 +1030 pinctrl: aspeed-g5: Add mux configuration for all pins The patch introducing the g5 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms and the AST2500 evaluation board. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver. Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 17 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 1478 +++++++++++++++++++- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 3 files changed, 1488 insertions(+), 8 deletions(-) commit 6d329f14a75f3858a1254abca8b94d4fab556a9a Author: Andrew Jeffery Date: Tue Dec 20 18:05:49 2016 +1030 pinctrl: aspeed-g4: Add mux configuration for all pins The patch introducing the g4 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver. Cc: Timothy Pearson Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 19 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 1097 +++++++++++++++++++- 2 files changed, 1096 insertions(+), 20 deletions(-) commit 7d29ed88acbbf00e2056634bd4c0172d55d2568c Author: Andrew Jeffery Date: Tue Dec 20 18:05:48 2016 +1030 pinctrl: aspeed: Read and write bits in LPC and GFX controllers The System Control Unit IP block in the Aspeed SoCs is typically where the pinmux configuration is found, but not always. A number of pins depend on state in one of LPC Host Control (LHC) or SoC Display Controller (GFX) IP blocks, so the Aspeed pinmux drivers should have the means to adjust these as necessary. We use syscon to cast a regmap over the GFX and LPC blocks, which is used as an arbitration layer between the relevant driver and the pinctrl subsystem. The regmaps are then exposed to the SoC-specific pinctrl drivers by phandles in the devicetree, and are selected during a mux request by querying a new 'ip' member in struct aspeed_sig_desc. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 80 ++++++++-- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 18 +-- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 48 ++++-- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 161 +++++++++++++-------- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 32 ++-- 5 files changed, 242 insertions(+), 97 deletions(-) commit c95b0fec3cff0ba584fd2f9e71fd9001ad15381a Author: Andrew Jeffery Date: Tue Dec 20 18:05:47 2016 +1030 pinctrl: aspeed: dt: Fix compatibles for the System Control Unit Reference the SoC-specific compatible string in the examples as required. Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 395717ee0d010a172c17c9e27a9483388d0f8e4c Author: Abhishek Sahu Date: Thu Dec 22 20:10:54 2016 +0530 clk: qcom: ipq4019: Add the cpu clock frequency change notifier The current driver code gives the crash or gets hang while switching the CPU frequency some time. The APSS CPU Clock divider is not glitch free so it the APPS clock need to be switched for stable clock during the change. This patch adds the frequency change notifier for APSS CPU clock. It changes the parent of this clock to stable PLL FEPLL500 for PRE_RATE_CHANGE event. This event will be generated before actual clock set operations. The clock set operation will again change its corresponding parent by getting the same from frequency table. Signed-off-by: Abhishek Sahu [sboyd@codeaurora.org: Indent less in probe] Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit f63bb4f442d6c7929e58d671d1f46e122c441884 Author: Aniroop Mathur Date: Tue Dec 27 13:22:42 2016 -0800 Input: bma150 - switch to using usleep_range instead of msleep msleep (1~20) may not do what the caller intends, and will often sleep longer. (~20 ms actual sleep for any value given in the 1~20ms range) This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: Aniroop Mathur Acked by: Albert Zhang Signed-off-by: Dmitry Torokhov drivers/input/misc/bma150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b4632f048415263669676dda20fd5d811c3d3e4 Author: Geliang Tang Date: Sat Dec 24 23:28:35 2016 +0800 cgroup: fix a comment typo Fix a comment typo in cgroup.h. Signed-off-by: Geliang Tang Signed-off-by: Tejun Heo include/linux/cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0aed7c74f0bf6c643103f3a10ff988b7ee6545a Author: Tejun Heo Date: Tue Dec 27 14:49:09 2016 -0500 cgroup: fix RCU related sparse warnings kn->priv which is a void * is used as a RCU pointer by cgroup. When dereferencing it, it was passing kn->priv to rcu_derefreence() without casting it into a RCU pointer triggering address space mismatch warning from sparse. Fix them. Signed-off-by: Tejun Heo Reported-by: Fengguang Wu Acked-by: Acked-by: Zefan Li kernel/cgroup/cgroup-v1.c | 2 +- kernel/cgroup/cgroup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dcfe149b9f45aaf89bb95e8b314210da626417d9 Author: Tejun Heo Date: Tue Dec 27 14:49:09 2016 -0500 cgroup: move namespace code to kernel/cgroup/namespace.c get/put_css_set() get exposed in cgroup-internal.h in the process. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/Makefile | 2 +- kernel/cgroup/cgroup-internal.h | 32 ++++++++ kernel/cgroup/cgroup.c | 175 +--------------------------------------- kernel/cgroup/namespace.c | 155 +++++++++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+), 175 deletions(-) commit d62beb7f3dc6b45f9b9d381897e05fe8ba286d8a Author: Tejun Heo Date: Tue Dec 27 14:49:08 2016 -0500 cgroup: rename functions for consistency Now that v1 functions are separated out, rename some functions for consistency. cgroup_dfl_base_files -> cgroup_base_files cgroup_legacy_base_files -> cgroup1_base_files cgroup_ssid_no_v1() -> cgroup1_ssid_disabled() cgroup_pidlist_destroy_all -> cgroup1_pidlist_destroy_all() cgroup_release_agent() -> cgroup1_release_agent() check_for_release() -> cgroup1_check_for_release() Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/cgroup-internal.h | 10 +++++----- kernel/cgroup/cgroup-v1.c | 14 +++++++------- kernel/cgroup/cgroup.c | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 1592c9b223749d59b933ebbfe37f1a8833d7a6cf Author: Tejun Heo Date: Tue Dec 27 14:49:08 2016 -0500 cgroup: move v1 mount functions to kernel/cgroup/cgroup-v1.c Now that the v1 mount code is split into separate functions, move them to kernel/cgroup/cgroup-v1.c along with the mount option handling code. As this puts all v1-only kernfs_syscall_ops in cgroup-v1.c, move cgroup1_kf_syscall_ops to cgroup-v1.c too. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/cgroup-internal.h | 28 ++- kernel/cgroup/cgroup-v1.c | 381 ++++++++++++++++++++++++++++++++++++- kernel/cgroup/cgroup.c | 410 +--------------------------------------- 3 files changed, 413 insertions(+), 406 deletions(-) commit fa069904dd38c2d8e121a3c7e37f8daaddb6dafa Author: Tejun Heo Date: Tue Dec 27 14:49:07 2016 -0500 cgroup: separate out cgroup1_kf_syscall_ops Currently, cgroup_kf_syscall_ops is shared by v1 and v2 and the specific methods test the version and take different actions. Split out v1 functions and put them in cgroup1_kf_syscall_ops and remove the now unnecessary explicit branches in specific methods. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/cgroup-internal.h | 4 ++-- kernel/cgroup/cgroup-v1.c | 11 ++--------- kernel/cgroup/cgroup.c | 40 ++++++++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 25 deletions(-) commit 633feee310de6b6c3191011140b88fe772f560cf Author: Tejun Heo Date: Tue Dec 27 14:49:07 2016 -0500 cgroup: refactor mount path and clearly distinguish v1 and v2 paths While sharing some mechanisms, the mount paths of v1 and v2 are substantially different. Their implementations were mixed in cgroup_mount(). This patch splits them out so that they're easier to follow and organize. This patch causes one functional change - the WARN_ON(new_sb) gets lost. This is because the actual mounting gets moved to cgroup_do_mount() and thus @new_sb is no longer accessible by default to cgroup1_mount(). While we can add it as an explicit out parameter to cgroup_do_mount(), this part of code hasn't changed and the warning hasn't triggered for quite a while. Dropping it should be fine. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/cgroup.c | 140 ++++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 61 deletions(-) commit 0a268dbd7932c78896f5a45c8a492b31729db6c0 Author: Tejun Heo Date: Tue Dec 27 14:49:06 2016 -0500 cgroup: move cgroup v1 specific code to kernel/cgroup/cgroup-v1.c cgroup.c is getting too unwieldy. Let's move out cgroup v1 specific code along with the debug controller into kernel/cgroup/cgroup-v1.c. v2: cgroup_mutex and css_set_lock made available in cgroup-internal.h regardless of CONFIG_PROVE_RCU. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup/Makefile | 2 +- kernel/cgroup/cgroup-internal.h | 103 ++++ kernel/cgroup/cgroup-v1.c | 1027 +++++++++++++++++++++++++++++++++++ kernel/cgroup/cgroup.c | 1140 ++------------------------------------- 4 files changed, 1164 insertions(+), 1108 deletions(-) commit 201af4c0fab02876ef0311e7f7b4083aa138930c Author: Tejun Heo Date: Tue Dec 27 14:49:05 2016 -0500 cgroup: move cgroup files under kernel/cgroup/ They're growing to be too many and planned to get split further. Move them under their own directory. kernel/cgroup.c -> kernel/cgroup/cgroup.c kernel/cgroup_freezer.c -> kernel/cgroup/freezer.c kernel/cgroup_pids.c -> kernel/cgroup/pids.c kernel/cpuset.c -> kernel/cgroup/cpuset.c Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/Makefile | 5 +- kernel/cgroup.c | 6705 ----------------------------------------------- kernel/cgroup/Makefile | 5 + kernel/cgroup/cgroup.c | 6705 +++++++++++++++++++++++++++++++++++++++++++++++ kernel/cgroup/cpuset.c | 2752 +++++++++++++++++++ kernel/cgroup/freezer.c | 481 ++++ kernel/cgroup/pids.c | 348 +++ kernel/cgroup_freezer.c | 481 ---- kernel/cgroup_pids.c | 348 --- kernel/cpuset.c | 2752 ------------------- 10 files changed, 10292 insertions(+), 10290 deletions(-) commit 5f617ebbdf10abd49312a89e3b894b927c7367f5 Author: Tejun Heo Date: Tue Dec 27 14:49:05 2016 -0500 cgroup: reorder css_set fields Reorder css_set fields so that they're roughly in the order of how hot they are. The rough order is 1. the actual csses 2. reference counter and the default cgroup pointer. 3. task lists and iterations 4. fields used during merge including css_set lookup 5. the rest Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li include/linux/cgroup-defs.h | 54 ++++++++++++++++++++++----------------------- kernel/cgroup.c | 13 ++++++----- 2 files changed, 35 insertions(+), 32 deletions(-) commit 2fae98634334e256b67241970526ddfadc77db2b Author: Tejun Heo Date: Tue Dec 27 14:49:05 2016 -0500 cgroup: remove cgroup_pid_fry() and friends cgroup_pid_fry() was added to mangle cgroup.procs pid listing order on v2 to make it clear that the output is not sorted. Now that v2 now uses a separate "cgroup.procs" read method, this is no longer used. Remove it. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup.c | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) commit b4b90a8e86f2539a028d68077b45e8511dd2adb0 Author: Tejun Heo Date: Tue Dec 27 14:49:04 2016 -0500 cgroup: reimplement reading "cgroup.procs" on cgroup v2 On v1, "tasks" and "cgroup.procs" are expected to be sorted which makes the implementation expensive and unnecessarily complicated involving result cache management. v2 doesn't have the sorting requirement, so it can just iterate and print processes one by one. seq_files are either read sequentially or reset to position zero, so the implementation doesn't even need to worry about seeking. This keeps the css_task_iter across multiple read(2) calls and migrations of new processes always append won't miss processes which are newly migrated in before each read(2). Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li kernel/cgroup.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 5 deletions(-) commit e90cbebc3fa5caea4c8bfeb0d0157a0cee53efc7 Author: Tejun Heo Date: Tue Dec 27 14:49:03 2016 -0500 cgroup add cftype->open/release() callbacks Pipe the newly added kernfs->open/release() callbacks through cftype. While at it, as cleanup operations now can be performed from ->release() instead of ->seq_stop(), make the latter optional. Signed-off-by: Tejun Heo Acked-by: Acked-by: Zefan Li include/linux/cgroup-defs.h | 3 +++ kernel/cgroup.c | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 0e67db2f9fe91937e798e3d7d22c50a8438187e1 Author: Tejun Heo Date: Tue Dec 27 14:49:03 2016 -0500 kernfs: add kernfs_ops->open/release() callbacks Add ->open/release() methods to kernfs_ops. ->open() is called when the file is opened and ->release() when the file is either released or severed. These callbacks can be used, for example, to manage persistent caching objects over multiple seq_file iterations. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman Acked-by: Acked-by: Zefan Li fs/kernfs/dir.c | 2 +- fs/kernfs/file.c | 51 +++++++++++++++++++++++++++++++++++++++------ fs/kernfs/kernfs-internal.h | 2 +- include/linux/kernfs.h | 10 +++++++++ 4 files changed, 57 insertions(+), 8 deletions(-) commit a1d82aff5df760d933b6ea3a03805dbc2bd73eb8 Author: Tejun Heo Date: Tue Dec 27 14:49:02 2016 -0500 kernfs: make kernfs_open_file->mmapped a bitfield More kernfs_open_file->mutex synchronized flags are planned to be added. Convert ->mmapped to a bitfield in preparation. While at it, make kernfs_fop_mmap() use "true" instead of "1" on ->mmapped. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman Acked-by: Acked-by: Zefan Li fs/kernfs/file.c | 2 +- include/linux/kernfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 40eca140c404505c09773d1c6685d818cb55ab1a Author: Antti Palosaari Date: Sun Feb 14 00:41:06 2016 -0200 [media] mn88473: add DVB-T2 PLP support Adds PLP ID filtering for DVB-T2. It is untested as I don't have any signal having PLP ID other than 0. There is only 2 extra registers, 0x32 and 0x36 on bank2, that are programmed for DVB-T2 but not for DVB-T and all the rest are programmed similarly - so it is likely PLP. Pridvorov reported successfully testing it in Russia with m-PLP streams, on both Vladivostok and Moskow. Tested-by: "Придворов Андрей (Pridvorov Andrey)" Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88473.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9a71e277888b39b8f0e8364813ec1ba58a5a4371 Author: Chris Wilson Date: Thu Dec 22 08:36:29 2016 +0000 drm: Extract struct drm_mm_scan from struct drm_mm The scan state occupies a large proportion of the struct drm_mm and is rarely used and only contains temporary state. That makes it suitable to moving to its struct and onto the stack of the callers. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen [danvet: Fix up etnaviv to compile, was missing a BUG_ON.] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_mm.c | 124 ++++++++++++++++++-------------- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 9 +-- drivers/gpu/drm/i915/i915_gem_evict.c | 19 +++-- drivers/gpu/drm/selftests/test-drm_mm.c | 45 ++++++------ include/drm/drm_mm.h | 43 +++++++---- 5 files changed, 139 insertions(+), 101 deletions(-) commit 6259a56ba0e1c3a15954e22ea531e810944518cb Author: Chris Wilson Date: Thu Dec 22 08:36:28 2016 +0000 drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan() A simple assert to ensure that we don't overflow start + size when initialising the drm_mm, or its scanner. In future, we may want to switch to tracking the value of ranges (rather than size) so that we can cover the full u64, for example like resource tracking. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-26-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ac9bb7b7d33f6be9e333b24786a774145cc8c59e Author: Chris Wilson Date: Thu Dec 22 08:36:27 2016 +0000 drm: Simplify drm_mm_clean() Since commit ea7b1dd44867 ("drm: mm: track free areas implicitly"), to test whether there are any nodes allocated within the range manager, we merely have to ask whether the node_list is empty. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-25-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 19 +------------------ include/drm/drm_mm.h | 14 +++++++++++++- 2 files changed, 14 insertions(+), 19 deletions(-) commit c820186d5b3b213c5a627c45e5db386bb739af25 Author: Chris Wilson Date: Thu Dec 22 08:36:26 2016 +0000 drm: Detect overflow in drm_mm_reserve_node() Protect ourselves from a caller passing in node.start + node.size that will overflow and trick us into reserving that node. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-24-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ba004e39b1997bb32150961eef4a5cd02ba3edec Author: Chris Wilson Date: Thu Dec 22 08:36:25 2016 +0000 drm: Fix kerneldoc for drm_mm_scan_remove_block() The nodes must be removed in the *reverse* order. This is correct in the overview, but backwards in the function description. Whilst here add Intel's copyright statement and tweak some formatting. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-23-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 34 ++++++++++++++++++---------------- include/drm/drm_mm.h | 19 +++++++++++++------ 2 files changed, 31 insertions(+), 22 deletions(-) commit 7173320758e5dfcd7a47a51d3fe2b21c43d9633c Author: Chris Wilson Date: Thu Dec 22 08:36:24 2016 +0000 drm: Promote drm_mm alignment to u64 In places (e.g. i915.ko), the alignment is exported to userspace as u64 and there now exists hardware for which we can indeed utilize a u64 alignment. As such, we need to keep 64bit integers throughout when handling alignment. Testcase: igt/drm_mm/align64 Testcase: igt/gem_exec_alignment Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Christian König Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-22-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 37 +++++++++++++++------------------ drivers/gpu/drm/selftests/test-drm_mm.c | 4 ++-- include/drm/drm_mm.h | 16 +++++++------- 3 files changed, 27 insertions(+), 30 deletions(-) commit d1bac3a78111c82befc8c8fc185b2d90a64ed4b6 Author: Chris Wilson Date: Thu Dec 22 08:36:22 2016 +0000 drm: kselftest for drm_mm and restricted color eviction Check that after applying the driver's color adjustment, restricted eviction scanning finds a suitable hole. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-20-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 116 ++++++++++++++++++++++++++- 2 files changed, 113 insertions(+), 4 deletions(-) commit c1b702c9a54316362b3c82e2fa36371ae6f4ab53 Author: Chris Wilson Date: Thu Dec 22 08:36:21 2016 +0000 drm: kselftest for drm_mm and color eviction Check that after applying the driver's color adjustment, eviction scanning finds a suitable hole. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-19-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 156 +++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) commit 4c2ba55b5c76835e826564f8623c36a5bfe0d3a9 Author: Chris Wilson Date: Thu Dec 22 08:36:20 2016 +0000 drm: kselftest for drm_mm and color adjustment Check that after applying the driver's color adjustment, fitting of the node and its alignment are still correct. v2: s/no_color_touching/separate_adjacent_colors/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-18-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 183 +++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) commit 05ab3c2eec74507712cd5f2b027c7c8b9a66f190 Author: Chris Wilson Date: Thu Dec 22 08:36:19 2016 +0000 drm: kselftest for drm_mm and top-down allocation Check that if we request top-down allocation from drm_mm_insert_node() we receive the next available hole from the top. v2: Flip sign on conditional assert. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-17-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 119 +++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) commit 0e483254e578e106d66f4881d86e8364c8752a16 Author: Chris Wilson Date: Thu Dec 22 08:36:18 2016 +0000 drm: kselftest for drm_mm and range restricted eviction Check that we add arbitrary blocks to a restrited eviction scanner in order to find the first minimal hole that matches our request. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-16-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 113 ++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 4 deletions(-) commit 560b32842912f9271ea47879f9b374693b724721 Author: Chris Wilson Date: Thu Dec 22 08:36:17 2016 +0000 drm: kselftest for drm_mm and eviction Check that we add arbitrary blocks to the eviction scanner in order to find the first minimal hole that matches our request. v2: Refactor out some common eviction code for later Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-15-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 337 +++++++++++++++++++++++++++ 2 files changed, 338 insertions(+) commit 9b26f2ed29f862f89e68acbc2e75b640b59288f1 Author: Chris Wilson Date: Thu Dec 22 08:36:16 2016 +0000 drm: kselftest for drm_mm and alignment Check that we can request alignment to any power-of-two or prime using a plain drm_mm_node_insert(), and also handle a reasonable selection of primes. v2: Exercise all allocation flags Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-14-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 3 + drivers/gpu/drm/selftests/test-drm_mm.c | 103 +++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) commit 2fba0de0a9eca81edb737025fece986d4dafa94a Author: Chris Wilson Date: Thu Dec 22 08:36:15 2016 +0000 drm: kselftest for drm_mm_insert_node_in_range() Exercise drm_mm_insert_node_in_range(), check that we only allocate from the specified range. v2: Use all allocation flags v3: Don't pass in invalid ranges - these will be asserted later. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-13-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 269 +++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) commit 2bd966d106e34e2daedad8eb109d48825ba8b655 Author: Chris Wilson Date: Thu Dec 22 08:36:14 2016 +0000 drm: kselftest for drm_mm_replace_node() Reuse drm_mm_insert_node() with a temporary node to exercise drm_mm_replace_node(). We use the previous test in order to exercise the various lists following replacement. v2: Check that we copy across the important (user) details of the node. The internal details (such as lists and hole tracking) we hope to detect errors by exercise. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-12-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 65 +++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 6 deletions(-) commit 7886692a58045c5e6953c2efb742bb389d31484d Author: Chris Wilson Date: Thu Dec 22 08:36:13 2016 +0000 drm: kselftest for drm_mm_insert_node() Exercise drm_mm_insert_node(), check that we can't overfill a range and that the lists are correct after reserving/removing. v2: Extract helpers for the repeated tests v3: Iterate over all allocation flags Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-11-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 234 +++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) commit 900537dc388940f7f0c775e65fbf070f0d8eba9c Author: Chris Wilson Date: Thu Dec 22 08:36:12 2016 +0000 drm: kselftest for drm_mm_reserve_node() Exercise drm_mm_reserve_node(), check that we can't reserve an already occupied range and that the lists are correct after reserving/removing. v2: Check for invalid node reservation. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-10-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 275 +++++++++++++++++++++++++++ 2 files changed, 276 insertions(+) commit 06df8ac682e6a00e6e32d105208953ca5323cc82 Author: Chris Wilson Date: Thu Dec 22 08:36:11 2016 +0000 drm: kselftest for drm_mm_debug() Simple test to just exercise calling the debug dumper on the drm_mm. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-9-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 393b50f30566ba596bcd3e94ce6d59af4f184025 Author: Chris Wilson Date: Thu Dec 22 08:36:10 2016 +0000 drm: kselftest for drm_mm_init() Simple first test to just exercise initialisation of struct drm_mm. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-8-chris@chris-wilson.co.uk drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 114 +++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit 50f0033d1a0f3a8e9eed09ab68067fbb57b0669d Author: Chris Wilson Date: Thu Dec 22 08:36:09 2016 +0000 drm: Add some kselftests for the DRM range manager (struct drm_mm) First we introduce a smattering of infrastructure for writing selftests. The idea is that we have a test module that exercises a particular portion of the exported API, and that module provides a set of tests that can either be run as an ensemble via kselftest or individually via an igt harness (in this case igt/drm_mm). To accommodate selecting individual tests, we export a boolean parameter to control selection of each test - that is hidden inside a bunch of reusable boilerplate macros to keep writing the tests simple. v2: Choose a random random_seed unless one is specified by the user. v3: More parameters to control max_iterations and max_prime of the tests. Testcase: igt/drm_mm Signed-off-by: Chris Wilson Acked-by: Christian König Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-7-chris@chris-wilson.co.uk drivers/gpu/drm/Kconfig | 15 ++++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/selftests/drm_mm_selftests.h | 8 ++ drivers/gpu/drm/selftests/drm_selftest.c | 109 ++++++++++++++++++++++++++ drivers/gpu/drm/selftests/drm_selftest.h | 41 ++++++++++ drivers/gpu/drm/selftests/test-drm_mm.c | 58 ++++++++++++++ tools/testing/selftests/drivers/gpu/drm_mm.sh | 15 ++++ 7 files changed, 247 insertions(+) commit a33d42dd03352d2e9d3d2c00bfa435c7a5ebab25 Author: Chris Wilson Date: Thu Dec 22 08:36:08 2016 +0000 drm: Add a simple generator of random permutations When testing, we want a random but yet reproducible order in which to process elements. Here we create an array which is a random (using the Tausworthe PRNG) permutation of the order in which to execute. Note these are simple helpers intended to be merged upstream in lib/ v2: Tidier code by David Herrmann v3: Add reminder that this code is intended to be temporary, with at least the bulk of the prandom changes going to lib/ Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: David Herrmann Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-6-chris@chris-wilson.co.uk drivers/gpu/drm/Kconfig | 4 ++++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/lib/drm_random.c | 41 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/lib/drm_random.h | 25 ++++++++++++++++++++++++ 4 files changed, 71 insertions(+) commit cf4a7207b1cb4a3c3fe3aa11a83c9d673722a7f5 Author: Chris Wilson Date: Thu Dec 22 14:45:14 2016 +0000 lib: Add a simple prime number generator Prime numbers are interesting for testing components that use multiplies and divides, such as testing DRM's struct drm_mm alignment computations. v2: Move to lib/, add selftest v3: Fix initial constants (exclude 0/1 from being primes) v4: More RCU markup to keep 0day/sparse happy v5: Fix RCU unwind on module exit, add to kselftests v6: Tidy computation of bitmap size v7: for_each_prime_number_from() v8: Compose small-primes using BIT() for easier verification v9: Move rcu dance entirely into callers. v10: Improve quote for Betrand's Postulate (aka Chebyshev's theorem) Signed-off-by: Chris Wilson Cc: Lukas Wunner Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222144514.3911-1-chris@chris-wilson.co.uk include/linux/prime_numbers.h | 37 ++++ lib/Kconfig | 7 + lib/Makefile | 2 + lib/prime_numbers.c | 314 +++++++++++++++++++++++++++ tools/testing/selftests/lib/prime_numbers.sh | 15 ++ 5 files changed, 375 insertions(+) commit b3ee963fe41d0034cf8b6aff1f0cc9c91bf8d478 Author: Chris Wilson Date: Thu Dec 22 08:36:06 2016 +0000 drm: Compile time enabling for asserts in drm_mm Use CONFIG_DRM_DEBUG_MM to conditionally enable the internal and validation checking using BUG_ON. Ideally these paths should all be exercised by CI selftests (with the asserts enabled). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-4-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-4-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 45 +++++++++++++++++++++++---------------------- include/drm/drm_mm.h | 8 +++++++- 2 files changed, 30 insertions(+), 23 deletions(-) commit 2bc98c86517b08304b5008f427b751c08659b100 Author: Chris Wilson Date: Thu Dec 22 08:36:05 2016 +0000 drm: Use drm_mm_nodes() as shorthand for the list of nodes under struct drm_mm Fairly commonly we want to inspect the node list on the struct drm_mm, which is buried within an embedded node. Bring it to the surface with a bit of syntatic sugar. Note this was intended to be split from commit ad579002c8ec ("drm: Add drm_mm_for_each_node_safe()") before being applied, but my timing sucks. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-3-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 8 ++++---- include/drm/drm_mm.h | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) commit 0e4e4999aac16641f47699e8929693b83a7a4d64 Author: Ulrich Hecht Date: Wed Dec 7 17:44:46 2016 +0100 pinctrl: sh-pfc: r8a7796: Add HSCIF pins, groups, and functions Signed-off-by: Ulrich Hecht [geert: Fix hscif2_clk_[bc]_mux[] and hscif4_ctrl_mux[]] Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 283 +++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) commit aa6931f135d293cf6b0d527360845ff38455bc72 Author: Simon Horman Date: Thu Dec 1 14:21:07 2016 +0100 pinctrl: sh-pfc: r8a7793: Implement voltage switching for SDHI Voltage switching is the same as on the r8a7791. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 1 + 1 file changed, 1 insertion(+) commit 4753231cc94683903135b9ca6d71eaab79f81349 Author: Takeshi Kihara Date: Wed Mar 16 12:22:06 2016 +0900 pinctrl: sh-pfc: r8a7796: Add MSIOF pins, groups and functions This patch adds MSIOF{0,1,2,3} pins, groups and functions to R8A7796 SoC. Signed-off-by: Takeshi Kihara [geert: Correct MSIOF3 SS1_E/SS2_E pins] Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 913 +++++++++++++++++++++++++++++++++++ 1 file changed, 913 insertions(+) commit 3dc93dcea67c967308db8ba00bac1334cf43a083 Author: Chris Paterson Date: Tue Nov 22 13:49:03 2016 +0000 pinctrl: sh-pfc: r8a7796: Add CAN FD support This patch adds CAN FD[0-1] pinmux support to r8a7796 SoC. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit cf75341accab1a90895936cff380c38f6d0777f5 Author: Chris Paterson Date: Tue Nov 22 13:49:02 2016 +0000 pinctrl: sh-pfc: r8a7796: Add CAN support This patch adds CAN[0-1] pinmux support to r8a7796 SoC. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 4c2fb44d60b92c4e3e744f49767da23f4eaf1b98 Author: Niklas Söderlund Date: Thu Nov 17 16:26:31 2016 +0100 pinctrl: sh-pfc: r8a7795: Support none GPIO pins bias setting There are pins on the r8a7795 which are not part of a GPIO bank nor can be muxed between different functions. They do however allow for the bias to be configured. Add those pins to the list of pins and to the bias configuration array. The pins can now be referred to in DT by function names and their bias setting set. Signed-off-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 450 +++++++++++++++++++---------------- 1 file changed, 249 insertions(+), 201 deletions(-) commit 2d40bd24274d257796291804a82a0b07564a11f1 Author: Niklas Söderlund Date: Thu Nov 17 16:09:20 2016 +0100 pinctrl: sh-pfc: r8a7796: Add bias pinconf support Implements pull-up and pull-down. On this SoC there is no simple mapping of GP pins to bias register bits, so we need a table. Signed-off-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 354 +++++++++++++++++++++++++++++++---- 1 file changed, 315 insertions(+), 39 deletions(-) commit 9e35d6fa825c02bdd00c24cb32299355702130bd Author: Niklas Söderlund Date: Thu Nov 17 16:09:19 2016 +0100 pinctrl: sh-pfc: r8a7796: Add drive strength support Define the drive strength registers for the R8A7796. Add pins which are not part of a GPIO bank nor can be muxed between different functions but which still allow for their drive-strength to be configured. Signed-off-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 359 +++++++++++++++++++++++++++++++++-- 1 file changed, 347 insertions(+), 12 deletions(-) commit e6bdf28eff475a026b922abe78ae710e7179bdf7 Author: Hiromitsu Yamasaki Date: Tue Mar 15 16:07:29 2016 +0900 clk: renesas: r8a7796: Add MSIOF controller clocks This patch adds MSIOF{0,1,2,3} clocks for R8A7796 SoC. Signed-off-by: Hiromitsu Yamasaki Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0ece46c24f5fdc29fc17bfb019a4e64ebe0d6b56 Author: Chris Paterson Date: Tue Nov 22 13:46:02 2016 +0000 clk: renesas: r8a7796: Add CAN FD peripheral clock Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 9e620beecdf40303c950f344806730093e5d08ae Author: Chris Paterson Date: Tue Nov 22 13:46:01 2016 +0000 clk: renesas: r8a7796: Add CANFD clock Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit e00d20c99d39a554bb90de853f33afeffa7ce2e1 Author: Chris Paterson Date: Tue Nov 22 13:46:00 2016 +0000 clk: renesas: r8a7796: Add CAN peripheral clock Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit fb91a661d99f460f2ea4c7f23ed47f56863ca1d1 Author: Ryder Lee Date: Mon Dec 19 10:20:45 2016 +0800 crypto: mediatek - add DT bindings documentation Add DT bindings documentation for the crypto driver Signed-off-by: Ryder Lee Acked-by: Rob Herring Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/mediatek-crypto.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 785e5c616c849ec3615b3e86427f736315008b75 Author: Ryder Lee Date: Mon Dec 19 10:20:44 2016 +0800 crypto: mediatek - Add crypto driver support for some MediaTek chips This adds support for the MediaTek hardware accelerator on mt7623/mt2701/mt8521p SoC. This driver currently implement: - SHA1 and SHA2 family(HMAC) hash algorithms. - AES block cipher in CBC/ECB mode with 128/196/256 bits keys. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 17 + drivers/crypto/Makefile | 1 + drivers/crypto/mediatek/Makefile | 2 + drivers/crypto/mediatek/mtk-aes.c | 765 +++++++++++++++++ drivers/crypto/mediatek/mtk-platform.c | 604 ++++++++++++++ drivers/crypto/mediatek/mtk-platform.h | 238 ++++++ drivers/crypto/mediatek/mtk-regs.h | 194 +++++ drivers/crypto/mediatek/mtk-sha.c | 1437 ++++++++++++++++++++++++++++++++ 8 files changed, 3258 insertions(+) commit 6207119444595d287b1e9e83a2066c17209698f3 Author: Jiri Slaby Date: Thu Dec 15 14:31:01 2016 +0100 crypto: algif_hash - avoid zero-sized array With this reproducer: struct sockaddr_alg alg = { .salg_family = 0x26, .salg_type = "hash", .salg_feat = 0xf, .salg_mask = 0x5, .salg_name = "digest_null", }; int sock, sock2; sock = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(sock, (struct sockaddr *)&alg, sizeof(alg)); sock2 = accept(sock, NULL, NULL); setsockopt(sock, SOL_ALG, ALG_SET_KEY, "\x9b\xca", 2); accept(sock2, NULL, NULL); ==== 8< ======== 8< ======== 8< ======== 8< ==== one can immediatelly see an UBSAN warning: UBSAN: Undefined behaviour in crypto/algif_hash.c:187:7 variable length array bound value 0 <= 0 CPU: 0 PID: 15949 Comm: syz-executor Tainted: G E 4.4.30-0-default #1 ... Call Trace: ... [] ? __ubsan_handle_vla_bound_not_positive+0x13d/0x188 [] ? __ubsan_handle_out_of_bounds+0x1bc/0x1bc [] ? hash_accept+0x5bd/0x7d0 [algif_hash] [] ? hash_accept_nokey+0x3f/0x51 [algif_hash] [] ? hash_accept_parent_nokey+0x4a0/0x4a0 [algif_hash] [] ? SyS_accept+0x2b/0x40 It is a correct warning, as hash state is propagated to accept as zero, but creating a zero-length variable array is not allowed in C. Fix this as proposed by Herbert -- do "?: 1" on that site. No sizeof or similar happens in the code there, so we just allocate one byte even though we do not use the array. Signed-off-by: Jiri Slaby Cc: Herbert Xu Cc: "David S. Miller" (maintainer:CRYPTO API) Reported-by: Sasha Levin Signed-off-by: Herbert Xu crypto/algif_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 422ef504590ac71625129b0f93604ef73f1fc9fc Author: Corentin LABBE Date: Thu Dec 15 10:59:43 2016 +0100 crypto: bfin_crc - Remove unneeded linux/miscdevice.h include bfin_crc.h driver does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/bfin_crc.h | 1 - 1 file changed, 1 deletion(-) commit 862d64c9d303b14e2abe6bedaa17a44e27148f46 Author: Corentin LABBE Date: Thu Dec 15 10:59:42 2016 +0100 crypto: bfin_crc - Fix format printing warning bfin_crc.c print some u32 as unsigned long ans so gcc complains about it. This patch remove the long print qualifier. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/bfin_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 079840bd13f793b915f6c8e44452eeb4a0aba8ba Author: Corentin LABBE Date: Tue Dec 13 15:51:14 2016 +0100 hwrng: core - remove unused PFX macro This patch remove the unused PFX macro. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 1 - 1 file changed, 1 deletion(-) commit fd50d71f94fb1c8614098949db068cd4c8dbb91d Author: Corentin LABBE Date: Tue Dec 13 15:51:13 2016 +0100 hwrng: core - Move hwrng miscdev minor number to include/linux/miscdevice.h This patch move the define for hwrng's miscdev minor number to include/linux/miscdevice.h. It's better that all minor number are in the same place. Rename it to HWRNG_MINOR (from RNG_MISCDEV_MINOR) in he process since no other miscdev define have MISCDEV in their name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 3 +-- include/linux/miscdevice.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit affdec58dafcf1cd7ff1dfaf2e4539b5532d0e84 Author: Corentin LABBE Date: Tue Dec 13 15:51:12 2016 +0100 hwrng: core - Replace asm/uaccess.h by linux/uaccess.h This patch fix the checkpatch warning about asm/uaccess.h. In the same time, we sort the headers in alphabetical order. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit dd8014830d2b1fdf5328978ada706df3ec180c21 Author: Corentin LABBE Date: Tue Dec 13 15:51:11 2016 +0100 hwrng: core - Rewrite the header checkpatch have lot of complaint about header. Furthermore, the header have some offtopic/useless information. This patch rewrite a proper header. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) commit 2a971e3b248775f808950bdc0ac75f12a2853eff Author: Corentin LABBE Date: Tue Dec 13 15:51:10 2016 +0100 hwrng: core - rewrite better comparison to NULL This patch fix the checkpatch warning "Comparison to NULL could be written "!ptr" Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6bc17d90e62d16828d1a2113b54cfa4e04582fb6 Author: Corentin LABBE Date: Tue Dec 13 15:51:09 2016 +0100 hwrng: core - do not use multiple blank lines This patch fix the checkpatch warning "Please don't use multiple blank lines" Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 5 ----- 1 file changed, 5 deletions(-) commit 50fb57042402c819d247ac4231b80b0da86e2fd7 Author: Ilya Lesokhin Date: Tue Dec 13 16:32:06 2016 +0200 crypto: aesni-intel - RFC4106 can zero copy when !PageHighMem In the common case of !PageHighMem we can do zero copy crypto even if sg crosses a pages boundary. Signed-off-by: Ilya Lesokhin Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_glue.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f262c770644fb7685f8e091b7070dfab286bfc5b Author: Corentin LABBE Date: Tue Dec 13 15:30:59 2016 +0100 crypto: drivers - bring back alphabetical order of Makefile THe major content of drivers/crypto/Makefile is sorted, only recent addition break this sort. This patch bring back this alphabetical sorting. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9ae433bc79f97bae221d53bb1a8e21415ea58625 Author: Ard Biesheuvel Date: Fri Dec 9 14:33:51 2016 +0000 crypto: chacha20 - convert generic and x86 versions to skcipher This converts the ChaCha20 code from a blkcipher to a skcipher, which is now the preferred way to implement symmetric block and stream ciphers. This ports the generic and x86 versions at the same time because the latter reuses routines of the former. Note that the skcipher_walk() API guarantees that all presented blocks except the final one are a multiple of the chunk size, so we can simplify the encrypt() routine somewhat. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/x86/crypto/chacha20_glue.c | 69 +++++++++++++++++--------------------- crypto/chacha20_generic.c | 73 +++++++++++++++++------------------------ include/crypto/chacha20.h | 6 ++-- 3 files changed, 64 insertions(+), 84 deletions(-) commit 8096667273477e735b0072b11a6d617ccee45e5f Author: Ard Biesheuvel Date: Thu Dec 8 14:28:59 2016 +0000 crypto: arm/chacha20 - implement NEON version based on SSE3 code This is a straight port to ARM/NEON of the x86 SSE3 implementation of the ChaCha20 stream cipher. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 6 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/chacha20-neon-core.S | 523 +++++++++++++++++++++++++++++++++++ arch/arm/crypto/chacha20-neon-glue.c | 136 +++++++++ 4 files changed, 667 insertions(+) commit 8621caa0d45e731f2e9f5889ff5bb384fcd6e059 Author: Ard Biesheuvel Date: Thu Dec 8 14:28:58 2016 +0000 crypto: arm64/chacha20 - implement NEON version based on SSE3 code This is a straight port to arm64/NEON of the x86 SSE3 implementation of the ChaCha20 stream cipher. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 6 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/chacha20-neon-core.S | 480 +++++++++++++++++++++++++++++++++ arch/arm64/crypto/chacha20-neon-glue.c | 131 +++++++++ 4 files changed, 620 insertions(+) commit 0bfd4a01a6605849d7c282c37503292469fab0be Author: Dhinakaran Pandiyan Date: Thu Dec 22 00:50:43 2016 -0800 drm: Get atomic property value even if DRIVER_ATOMIC is not set i915 does not set DRIVER_ATOMIC by default yet but uses atomic_check and atomic_commit. drm_object_property_get_value() does not read the correct value of atomic properties if DRIVER_ATOMIC is not set. Checking whether the driver uses atomic modeset is a better check instead as the property values are tracked in the state structures. v2: Included header Cc: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482396643-32456-2-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a743d7582db9aba0e7078d6386bdad2756309dba Author: Dhinakaran Pandiyan Date: Thu Dec 22 00:50:42 2016 -0800 drm: Wrap the check for atomic_commit implementation This check is useful for drivers that do not have DRIVER_ATOMIC set but have atomic modesetting internally implemented. Wrap the check into a function since this is used in many places and as a bonus, the function name helps to document what the check is for. v2: Change return type to bool (Ville) Move the function drm_atomic.h (Daniel) Fixed comment marker for documentation Suggested-by: Daniel Vetter Cc: Daniel Vetter Cc: Ben Skeggs Signed-off-by: Dhinakaran Pandiyan [danvet: Move back to drmP.h because include hell.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482396643-32456-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_fb_helper.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_display.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 ++- include/drm/drmP.h | 13 +++++++++++++ include/drm/drm_atomic.h | 1 - 6 files changed, 24 insertions(+), 10 deletions(-) commit 4038a2a37e3595c299aecdaa20cb01ceb9c78303 Merge: 61ff6e9 b8e2df1 Author: Al Viro Date: Mon Dec 26 21:38:34 2016 -0500 Merge branches 'sendmsg.misc' and 'sendmsg.ncpfs' into work.sendmsg commit b8e2df1f812add27bfdb1e9d4fdf1051cc51fe1b Author: Al Viro Date: Sat Jan 9 22:12:55 2016 -0500 ncpfs: switch to sock_sendmsg() Signed-off-by: Al Viro fs/ncpfs/sock.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit 2cebcc78fab5f56c9a9795fc49546d2436491312 Author: Al Viro Date: Sat Jan 9 22:01:58 2016 -0500 ncpfs: don't mess with manually advancing iovec on send just keep iov_iter in req Signed-off-by: Al Viro fs/ncpfs/sock.c | 69 ++++++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) commit 4b4fbad37f70f1dca26e060cf8dc71371b01899c Author: Al Viro Date: Sat Jan 9 21:12:37 2016 -0500 ncpfs: sendmsg does *not* bugger iovec these days Signed-off-by: Al Viro fs/ncpfs/sock.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 61ff6e9b452d6158e0fd659c6d987f47cfcfbd7b Author: Al Viro Date: Sat Jan 9 20:55:45 2016 -0500 ceph_tcp_sendpage(): use ITER_BVEC sendmsg Signed-off-by: Al Viro net/ceph/messenger.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 39c6aceae961776a11a3767553b0e295fc9d413b Author: Al Viro Date: Sat Jan 9 20:36:51 2016 -0500 afs_send_pages(): use ITER_BVEC Signed-off-by: Al Viro fs/afs/rxrpc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit be6e4d66f01335827d734ee9bde79862ed8a235b Author: Al Viro Date: Sun Nov 15 15:05:32 2015 -0500 rds: remove dead code Signed-off-by: Al Viro net/rds/page.c | 29 ----------------------------- net/rds/rds.h | 7 ------- 2 files changed, 36 deletions(-) commit 100803a84d3cb84bd3ee36e8ec4274019ad667ac Author: Al Viro Date: Sun Nov 15 00:12:48 2015 -0500 ceph: switch to sock_recvmsg() ... and use ITER_BVEC instead of playing with kmap() Signed-off-by: Al Viro net/ceph/messenger.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 3995d1610713c1a62af687872e460c3dca82d17c Author: Al Viro Date: Sun Dec 21 03:53:10 2014 -0500 usbip_recv(): switch to sock_recvmsg() Signed-off-by: Al Viro drivers/usb/usbip/usbip_common.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit 4113e47b3d0931879d75dc5ad7c4c294651b3c1d Author: Al Viro Date: Sun Dec 21 02:14:47 2014 -0500 iscsi_target: deal with short writes on the tx side Signed-off-by: Al Viro drivers/target/iscsi/iscsi_target_util.c | 64 ++++++++++++-------------------- 1 file changed, 24 insertions(+), 40 deletions(-) commit c9f2b6aeb92286f15ffc80d2ba16bc24e530f560 Author: Al Viro Date: Thu Nov 12 05:09:35 2015 -0500 [nbd] pass iov_iter to nbd_xmit() ... and don't mess with kmap() - just use BVEC_ITER for those parts. Signed-off-by: Al Viro drivers/block/nbd.c | 66 ++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 39 deletions(-) commit c1696cab700588f8493df7b51e096abf5bfb1d40 Author: Al Viro Date: Thu Nov 12 04:51:19 2015 -0500 [nbd] switch sock_xmit() to sock_{send,recv}msg() Step 1 - don't reinintialize ->msg_iter on each iteration. Signed-off-by: Al Viro drivers/block/nbd.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 79ab80beb792fc56141ca9bc5675b2109b729955 Author: Al Viro Date: Wed Dec 10 17:06:38 2014 -0500 [drbd] use sock_sendmsg() ... and keep ->msg_iter through the loop Signed-off-by: Al Viro drivers/block/drbd/drbd_main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b2ae75052a8c1611b2030fa49ba1c6b6439fa04f Author: lramos.prof@yahoo.com.br Date: Tue Oct 11 22:12:45 2016 -0300 ide: Fix interface autodetection in legacy IDE driver (trial #2) This humble patch was sent one or two months before, and had no actions, except for a colleague reply which friendly pointed out some formatting problems (which were solved in a second message). It relates to an old code, the legacy IDE driver, but the bug it addresses is real. The code, although rarely used, is still there to be compiled if one chooses to do so (like me). Also, the fix has a very low risk of present collateral effects IMHO. It is already compiled and tested in some embedded machines. So, again IMHO, it is worth be fixed. This email is a second trial with it. I hope it can help the one or two guys out there which are still running the legacy IDE driver and haven't noticed the former email. Fixes: 20df429dd667 ("ide-generic: handle probing of legacy io-ports v5") Signed-off-by: Luiz Carlos Ramos Signed-off-by: David S. Miller drivers/ide/ide-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd361f5de2b338218c276d17a510701a16075deb Merge: c739c0a 7ce7d89 Author: Mauro Carvalho Chehab Date: Mon Dec 26 14:11:35 2016 -0200 Merge tag 'v4.10-rc1' into patchwork Linux 4.10-rc1 * tag 'v4.10-rc1': (11427 commits) Linux 4.10-rc1 powerpc: Fix build warning on 32-bit PPC avoid spurious "may be used uninitialized" warning mm: add PageWaiters indicating tasks are waiting for a page bit mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked ktime: Get rid of ktime_equal() ktime: Cleanup ktime_set() usage ktime: Get rid of the union clocksource: Use a plain u64 instead of cycle_t irqchip/armada-xp: Consolidate hotplug state space irqchip/gic: Consolidate hotplug state space coresight/etm3/4x: Consolidate hotplug state space cpu/hotplug: Cleanup state names cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions staging/lustre/libcfs: Convert to hotplug state machine scsi/bnx2i: Convert to hotplug state machine scsi/bnx2fc: Convert to hotplug state machine cpu/hotplug: Prevent overwriting of callbacks x86/msr: Remove bogus cleanup from the error path bus: arm-ccn: Prevent hotplug callback leak ... commit f061ff077e657b27d7e24e31b1da484b2376348d Author: Daniel Vetter Date: Mon Dec 26 16:48:25 2016 +0100 drm/i915: Update DRIVER_DATE to 20161226 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1edcd36fcb48fe841bcc62eda36c105037d9583c Author: Maxime Ripard Date: Fri Sep 23 14:28:10 2016 +0300 ARM: sunxi: Convert pinctrl nodes to generic bindings Now that we can handle the generic pinctrl bindings, convert our DT to it. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Reviewed-by: Linus Walleij arch/arm/boot/dts/sun4i-a10-a1000.dts | 8 +- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 2 +- arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 12 +- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 12 +- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 28 +-- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 4 +- arch/arm/boot/dts/sun4i-a10-hackberry.dts | 8 +- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 14 +- arch/arm/boot/dts/sun4i-a10-inet1.dts | 20 +- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 12 +- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 26 +-- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 8 +- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 10 +- arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 2 +- arch/arm/boot/dts/sun4i-a10-mk802.dts | 12 +- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 22 +-- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 14 +- arch/arm/boot/dts/sun4i-a10-pcduino2.dts | 4 +- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 24 +-- arch/arm/boot/dts/sun4i-a10.dtsi | 120 ++++++------ arch/arm/boot/dts/sun5i-a10s-auxtek-t003.dts | 16 +- arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 24 +-- arch/arm/boot/dts/sun5i-a10s-mk802.dts | 14 +- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +-- arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts | 16 +- arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 16 +- arch/arm/boot/dts/sun5i-a10s.dtsi | 30 +-- .../boot/dts/sun5i-a13-empire-electronix-d709.dts | 20 +- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 18 +- arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 32 ++-- arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 30 +-- arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 10 +- arch/arm/boot/dts/sun5i-a13.dtsi | 18 +- arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 8 +- arch/arm/boot/dts/sun5i-gr8-evb.dts | 16 +- arch/arm/boot/dts/sun5i-gr8.dtsi | 84 ++++----- arch/arm/boot/dts/sun5i-r8-chip.dts | 20 +- .../boot/dts/sun5i-reference-design-tablet.dtsi | 26 +-- arch/arm/boot/dts/sun5i.dtsi | 56 +++--- arch/arm/boot/dts/sun6i-a31-app4-evb1.dts | 4 +- arch/arm/boot/dts/sun6i-a31-colombus.dts | 18 +- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 18 +- arch/arm/boot/dts/sun6i-a31-i7.dts | 14 +- arch/arm/boot/dts/sun6i-a31-m9.dts | 14 +- arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 14 +- arch/arm/boot/dts/sun6i-a31.dtsi | 76 ++++---- arch/arm/boot/dts/sun6i-a31s-primo81.dts | 16 +- arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 10 +- arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 22 +-- .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 8 +- .../boot/dts/sun6i-reference-design-tablet.dtsi | 12 +- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 20 +- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 20 +- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 26 +-- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 +- arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 26 +-- arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 16 +- arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 18 +- arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 6 +- arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 24 +-- arch/arm/boot/dts/sun7i-a20-m3.dts | 4 +- arch/arm/boot/dts/sun7i-a20-mk808c.dts | 8 +- arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 24 +-- arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 22 +-- .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 4 +- arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 26 +-- arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 24 +-- arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 34 ++-- arch/arm/boot/dts/sun7i-a20-orangepi.dts | 28 +-- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 18 +- arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 16 +- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 18 +- arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 10 +- arch/arm/boot/dts/sun7i-a20.dtsi | 204 ++++++++++----------- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 78 ++++---- arch/arm/boot/dts/sun8i-a23-evb.dts | 6 +- .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 6 +- .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 6 +- arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | 8 +- arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 12 +- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 10 +- arch/arm/boot/dts/sun8i-a33.dtsi | 4 +- arch/arm/boot/dts/sun8i-a83t.dtsi | 16 +- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 12 +- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 12 +- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 18 +- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 12 +- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 12 +- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 4 +- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 12 +- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 8 +- arch/arm/boot/dts/sun8i-h3.dtsi | 78 ++++---- arch/arm/boot/dts/sun8i-q8-common.dtsi | 8 +- arch/arm/boot/dts/sun8i-r16-parrot.dts | 28 +-- .../boot/dts/sun8i-reference-design-tablet.dtsi | 20 +- arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 18 +- arch/arm/boot/dts/sun9i-a80-optimus.dts | 30 +-- arch/arm/boot/dts/sun9i-a80.dtsi | 50 ++--- arch/arm/boot/dts/sunxi-common-regulators.dtsi | 16 +- 99 files changed, 1081 insertions(+), 1081 deletions(-) commit 119c366aeae35e2322d3e31a7ac0d23679252777 Author: Maxime Ripard Date: Fri Sep 23 00:09:58 2016 +0300 ARM: sunxi: Remove useless allwinner,pull property The allwinner,pull property set to NO_PULL was really considered our default (and wasn't even changing the default value in the code). Remove these properties to make it obvious that we do not set anything in such a case. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Reviewed-by: Linus Walleij arch/arm/boot/dts/sun4i-a10-a1000.dts | 2 -- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 1 - arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 4 --- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 1 - arch/arm/boot/dts/sun4i-a10-hackberry.dts | 2 -- arch/arm/boot/dts/sun4i-a10-inet1.dts | 2 -- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 2 -- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 1 - arch/arm/boot/dts/sun4i-a10-mk802.dts | 3 -- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 2 -- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 2 -- arch/arm/boot/dts/sun4i-a10-pcduino2.dts | 1 - arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 3 -- arch/arm/boot/dts/sun4i-a10.dtsi | 24 -------------- arch/arm/boot/dts/sun5i-a10s-auxtek-t003.dts | 1 - arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 2 -- arch/arm/boot/dts/sun5i-a10s-mk802.dts | 2 -- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 2 -- arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts | 2 -- arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 2 -- arch/arm/boot/dts/sun5i-a10s.dtsi | 7 ---- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 1 - arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 3 -- arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 2 -- arch/arm/boot/dts/sun5i-a13.dtsi | 3 -- arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 -- arch/arm/boot/dts/sun5i-gr8-evb.dts | 4 --- arch/arm/boot/dts/sun5i-gr8.dtsi | 19 ----------- arch/arm/boot/dts/sun5i-r8-chip.dts | 3 -- .../boot/dts/sun5i-reference-design-tablet.dtsi | 2 -- arch/arm/boot/dts/sun5i.dtsi | 10 ------ arch/arm/boot/dts/sun6i-a31-app4-evb1.dts | 1 - arch/arm/boot/dts/sun6i-a31-colombus.dts | 1 - arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 -- arch/arm/boot/dts/sun6i-a31-i7.dts | 2 -- arch/arm/boot/dts/sun6i-a31-m9.dts | 2 -- arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 2 -- arch/arm/boot/dts/sun6i-a31.dtsi | 14 -------- arch/arm/boot/dts/sun6i-a31s-primo81.dts | 1 - arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 1 - arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 3 -- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 3 -- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 2 -- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 5 --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 1 - arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 ---- arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 4 --- arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 4 --- arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 1 - arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 -- arch/arm/boot/dts/sun7i-a20-m3.dts | 1 - arch/arm/boot/dts/sun7i-a20-mk808c.dts | 2 -- arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 4 --- arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 2 -- .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 1 - arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 3 -- arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 1 - arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 4 --- arch/arm/boot/dts/sun7i-a20-orangepi.dts | 4 --- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 3 -- arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 2 -- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 3 -- arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 1 - arch/arm/boot/dts/sun7i-a20.dtsi | 37 ---------------------- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 12 ------- .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 1 - .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 1 - arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | 1 - arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 3 -- arch/arm/boot/dts/sun8i-a33.dtsi | 1 - arch/arm/boot/dts/sun8i-a83t.dtsi | 3 -- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 3 -- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 4 --- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 1 - arch/arm/boot/dts/sun8i-h3.dtsi | 14 -------- arch/arm/boot/dts/sun8i-r16-parrot.dts | 3 -- .../boot/dts/sun8i-reference-design-tablet.dtsi | 2 -- arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 2 -- arch/arm/boot/dts/sun9i-a80-optimus.dts | 5 --- arch/arm/boot/dts/sun9i-a80.dtsi | 7 ---- arch/arm/boot/dts/sunxi-common-regulators.dtsi | 4 --- 85 files changed, 321 deletions(-) commit d312f6fb806db074e8fad95d6f8f2cb89cb07350 Author: Maxime Ripard Date: Fri Sep 23 00:08:38 2016 +0300 ARM: sunxi: Remove useless allwinner,drive property The allwinner,drive property set to 10mA was really considered as our default. Remove all those properties entirely to make that obvious. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Reviewed-by: Linus Walleij arch/arm/boot/dts/sun4i-a10-a1000.dts | 2 -- arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 2 -- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 1 - arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 6 ---- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 1 - arch/arm/boot/dts/sun4i-a10-hackberry.dts | 2 -- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 2 -- arch/arm/boot/dts/sun4i-a10-inet1.dts | 4 --- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 2 -- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 3 -- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 2 -- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 2 -- arch/arm/boot/dts/sun4i-a10-mk802.dts | 3 -- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 3 -- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 3 -- arch/arm/boot/dts/sun4i-a10-pcduino2.dts | 1 - arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 5 --- arch/arm/boot/dts/sun4i-a10.dtsi | 25 --------------- arch/arm/boot/dts/sun5i-a10s-auxtek-t003.dts | 1 - arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 3 -- arch/arm/boot/dts/sun5i-a10s-mk802.dts | 3 -- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 4 --- arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts | 2 -- arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 3 -- arch/arm/boot/dts/sun5i-a10s.dtsi | 6 ---- .../boot/dts/sun5i-a13-empire-electronix-d709.dts | 3 -- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 3 -- arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 5 --- arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 4 --- arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 1 - arch/arm/boot/dts/sun5i-a13.dtsi | 3 -- arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 -- arch/arm/boot/dts/sun5i-gr8-evb.dts | 4 --- arch/arm/boot/dts/sun5i-gr8.dtsi | 19 ------------ arch/arm/boot/dts/sun5i-r8-chip.dts | 4 --- .../boot/dts/sun5i-reference-design-tablet.dtsi | 5 --- arch/arm/boot/dts/sun5i.dtsi | 9 ------ arch/arm/boot/dts/sun6i-a31-app4-evb1.dts | 1 - arch/arm/boot/dts/sun6i-a31-colombus.dts | 3 -- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 3 -- arch/arm/boot/dts/sun6i-a31-i7.dts | 3 -- arch/arm/boot/dts/sun6i-a31-m9.dts | 3 -- arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 3 -- arch/arm/boot/dts/sun6i-a31.dtsi | 8 ----- arch/arm/boot/dts/sun6i-a31s-primo81.dts | 3 -- arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 -- arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 4 --- .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 1 - .../boot/dts/sun6i-reference-design-tablet.dtsi | 2 -- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 4 --- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 4 --- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 6 ---- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 2 -- arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 ---- arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 4 --- arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 4 --- arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 4 --- arch/arm/boot/dts/sun7i-a20-m3.dts | 1 - arch/arm/boot/dts/sun7i-a20-mk808c.dts | 2 -- arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 4 --- arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 3 -- .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 1 - arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 4 --- arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 3 -- arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 7 ----- arch/arm/boot/dts/sun7i-a20-orangepi.dts | 6 ---- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 4 --- arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 3 -- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 4 --- arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 2 -- arch/arm/boot/dts/sun7i-a20.dtsi | 36 ---------------------- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 9 ------ arch/arm/boot/dts/sun8i-a23-evb.dts | 1 - .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 1 - .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 1 - arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 3 -- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 1 - arch/arm/boot/dts/sun8i-a33.dtsi | 1 - arch/arm/boot/dts/sun8i-a83t.dtsi | 2 -- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 3 -- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 4 --- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 3 -- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 1 - arch/arm/boot/dts/sun8i-h3.dtsi | 12 -------- arch/arm/boot/dts/sun8i-q8-common.dtsi | 1 - arch/arm/boot/dts/sun8i-r16-parrot.dts | 5 --- .../boot/dts/sun8i-reference-design-tablet.dtsi | 4 --- arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 3 -- arch/arm/boot/dts/sun9i-a80-optimus.dts | 6 ---- arch/arm/boot/dts/sun9i-a80.dtsi | 4 --- arch/arm/boot/dts/sunxi-common-regulators.dtsi | 4 --- 94 files changed, 381 deletions(-) commit feef2a7cb93e532bde3c7682ec7b1bce99cc8be5 Author: Daniele Ceraolo Spurio Date: Fri Dec 23 15:56:22 2016 -0800 drm/i915: re-use computed offset bias for context pin The context has to obey the same offset requirements as the ring, so we can re-use the same bias value we computed for the ring instead of unconditionally using GUC_WOPCM_TOP. Suggested-by: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1482537382-28584-2-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d3ef1af6fdb67705d4569ac4b6ee11d91f6ab794 Author: Daniele Ceraolo Spurio Date: Fri Dec 23 15:56:21 2016 -0800 drm/i915: request ring to be pinned above GUC_WOPCM_TOP GuC will validate the ring offset and fail if it is in the [0, GUC_WOPCM_TOP) range. The bias is conditionally applied only if GuC loading is enabled (we can't check for guc submission enabled as in other cases because HuC loading requires this fix). Note that the default context is processed before enable_guc_loading is sanitized, so we might still apply the bias to its ring even if it is not needed. v2: compute the value during ctx init and pass it to intel_ring_pin (Chris), updated commit message Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Anusha Srivatsa Cc: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/1482537382-28584-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_context.c | 9 +++++++++ drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 11 +++++++---- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) commit 00c25e3f40083a6d5f1111955baccd287ee49258 Author: Chris Wilson Date: Fri Dec 23 14:58:04 2016 +0000 drm/i915: Prevent timeline updates whilst performing reset As the fence may be signaled concurrently from an interrupt on another device, it is possible for the list of requests on the timeline to be modified as we walk it. Take both (the context's timeline and the global timeline) locks to prevent such modifications. Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 07e19ea4f743bb204ed63a2f2f1235811a2e942a Author: Chris Wilson Date: Fri Dec 23 14:57:59 2016 +0000 drm/i915: Assert that the partial VMA fits within the object When creating a partial VMA assert that it first fits with the parent object, and that if it covers the whole of the parent a normal view was created instead. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8bfc478fa455b4908f745df368355b415460c60e Author: Chris Wilson Date: Fri Dec 23 14:57:58 2016 +0000 drm/i915: Silence allocation failure during sg_trim() As trimming the sg table is merely an optimisation that gracefully fails if we cannot allocate a new table, we do not need to report the failure either. Fixes: 0c40ce130e38 ("drm/i915: Trim the object sg table") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5facdf9644f4490520e0489a0252e8feaba3744 Author: Chris Wilson Date: Fri Dec 23 14:57:57 2016 +0000 drm/i915: Don't clflush before release phys object When we teardown the backing storage for the phys object, we copy from the coherent contiguous block back to the shmemfs object, clflushing as we go. Trying to clflush the invalid sg beforehand just oops and would be redundant (due to it already being coherent, and clflushed afterwards). Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bdeb978506a7cf59ee75ed61a7b6a3506d03a1e4 Author: Chris Wilson Date: Fri Dec 23 14:57:56 2016 +0000 drm/i915: Repeat flush of idle work during suspend The idle work handler is self-arming - if it detects that it needs to run again it will queue itself from its work handler. Take greater care when trying to drain the idle work, and double check that it is flushed. The free worker has a similar issue where it is armed by an RCU task which may be running concurrently with us. This should hopefully help with the sporadic WARN_ON(dev_priv->gt.awake) from i915_gem_suspend. v2: Reuse drain_freed_objects. v3: Don't try to flush the freed objects from the shrinker, as it may be underneath the struct_mutex already. v4: do while and comment upon the excess rcu_barrier in drain_freed_objects Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 3 +-- drivers/gpu/drm/i915/i915_drv.h | 13 +++++++++++++ drivers/gpu/drm/i915/i915_gem.c | 10 ++++++++-- 4 files changed, 23 insertions(+), 5 deletions(-) commit 28f412e02b15be73669d9882f8041d8e8b54f197 Author: Chris Wilson Date: Fri Dec 23 14:57:55 2016 +0000 drm/i915: Break after walking all GGTT vma in bump_inactive_ggtt Since commit db6c2b4151f2 ("drm/i915: Store the vma in an rbtree under the object") the vma are once again sorted into GGTT first, then ppGTT so that the typical case of walking the GGTT vma can stop as soon as we find a non-ppGTT. Apply that optimisation. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c5cfcc301f64e098e98b3723bcf50982222fa4a Author: Ville Syrjälä Date: Thu Dec 22 21:52:22 2016 +0200 drm/i915: Kill the 830 MI_OVERLAY_OFF workaround Now that we're disabling L2 clock gating MI_OVERLAY_OFF actually works on 830, so let's use it. v2: Nuke the unused dev_priv variable Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161222195222.9618-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit e840fd31085220cdeabbeaab13d515e5b6aef004 Author: Hans de Goede Date: Thu Dec 1 21:29:13 2016 +0100 drm/i915/dsi: Move disable pll call outside of clear_device_ready() On enable intel_dsi_enable() directly calls intel_enable_dsi_pll(), make intel_dsi_disable() also directly call intel_disable_dsi_pll(), rather then hiding the call in intel_dsi_clear_device_ready(), no functional changes. Signed-off-by: Hans de Goede Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20161201202925.12220-7-hdegoede@redhat.com drivers/gpu/drm/i915/intel_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce2e87b4ce9a6c14b3f60756b58a6b5c77e083bd Author: Vincente Tsou Date: Thu Dec 22 13:23:13 2016 -0500 drm/915: Parsing the missed out DTD fields from the VBT The upper bits of the vsync width, vsync offset and hsync width were not parsed from the VBT. Parse these fields in this patch. V2: Renamed lvds dvo timing structure members and code identation fix (Jani's review comments) V3: Corrected commit message, used "from the VBT" Signed-off-by: Vincente Tsou Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1482430993-3265-1-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_bios.c | 8 +++++--- drivers/gpu/drm/i915/intel_vbt_defs.h | 12 +++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) commit 8fdded8215f460c0d56193a08fd15a8ef4dae70c Author: Ville Syrjälä Date: Wed Dec 7 19:28:12 2016 +0200 drm/i915: Disable L2 cache clock gating on 830 when using the overlay BSpec says: "Overlay Clock Gating Must be Disabled: Overlay & L2 Cache clock gating must be disabled in order to prevent device hangs when turning off overlay.SW must turn off Ovrunit clock gating (6200h) and L2 Cache clock gating (C8h)." We only turned off the overlay clock gating (due to lack of docs I presume). After a bit of experimentation it looks like the the magic C8h register lives in the PCI config space of device 0, and the magic bit appears to be bit 2. Or at the very least this eliminates the GPU death after MI_OVERLAY_OFF. L2 clock gating seems to save ~80mW, so let's keep it on unless we need to actually use the overlay. Also let's move the OVRUNIT clock gating to the same place since we can, and 845 supposedly doesn't need it. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-11-git-send-email-ville.syrjala@linux.intel.com Acked-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_overlay.c | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 2 -- 3 files changed, 34 insertions(+), 2 deletions(-) commit 39ccc04e7435f7348fbe28a4e375214a950645d8 Author: Ville Syrjälä Date: Wed Dec 7 19:28:11 2016 +0200 drm/i915: Use primary plane->state for overlay ckey setup Extract the primary plane pixel format via plane state when setting up the overlay colorkey. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 2daac462fdc1dd7ea0348ff7726695a87dfe521e Author: Ville Syrjälä Date: Wed Dec 7 19:28:10 2016 +0200 drm/i915: Reorganize overlay filter coeffs into a nicer form Use two-dimensional arrays and named initializers to make the overlay filter coefficient tables easier to parse for humans. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-9-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 64 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 28 deletions(-) commit 7039a6dc17a9ae73dcf38fe16e9e78dedbfb26e0 Author: Ville Syrjälä Date: Wed Dec 7 19:28:09 2016 +0200 drm/i915: Simplify SWIDTHSW calculation The formula in Bspec for computing the overlay SWIDTHSW is overly obfuscated. Simplify the formula to something that's easily parsed by humans. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-8-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 949d8cf8017c03ac20a153070730ea9e35f4f1d5 Author: Ville Syrjälä Date: Wed Dec 7 19:28:08 2016 +0200 drm/i915: Kill intel_panel_fitter_pipe() Check pipe config gmch_pfit.control instead of using intel_panel_fitter_pipe() to figure out if the pipe for the overlay is using the panel fitter. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-7-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) commit 73699147e08d3bf55a9440be412fe195a747313c Author: Ville Syrjälä Date: Wed Dec 7 19:28:07 2016 +0200 drm/i915: Use pipe_src_w in overlay code Replace the use of crtc->mode.h/vdisplay with the more appropriate config->pipe_src_w/h. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-6-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 58d09ebdb4edf5d3ab3a2aee851ab0168bc83ec6 Author: Ville Syrjälä Date: Wed Dec 7 19:28:06 2016 +0200 drm/i915: Fix the overlay frontbuffer tracking Do the overlay frontbuffer tracking properly so that it matches the state of the overlay on/off/continue requests. One slight problem is that intel_frontbuffer_flip_complete() may get delayed by an arbitrarily liong time due to the fact that the overlay code likes to bail out when a signal occurs. So the flip may not get completed until the ioctl is restarted. But fixing that would require bigger surgery, so I decided to ignore it for now. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 64 +++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 23 deletions(-) commit 4a15cdbbc55463e55a7cdcf33f84ccc742ca9c29 Author: Ville Syrjälä Date: Wed Dec 7 19:28:03 2016 +0200 drm/i915: Fix oops in overlay due to frontbuffer tracking The vma will be NULL if the overlay was previously off, so dereferencing it will oops. Check for NULL before doing that. Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Joonas Lahtinen Fixes: 9b3b7841b86d ("drm/i915/overlay: Use VMA as the primary tracker for images") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecd9caa0522db5a6b03ac8858c42067ef9d8323b Author: Ville Syrjälä Date: Wed Dec 7 17:56:47 2016 +0000 drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff The i915_gem_active stuff doesn't like a NULL ->retire hook, but the overlay code can set it to NULL. That obviously ends up oopsing. Fix it by introducing a new helper to assign the retirement callback that will switch out the NULL function pointer with i915_gem_retire_noop. Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Joonas Lahtinen Fixes: 0d9bdd886f29 ("drm/i915: Convert intel_overlay to request tracking") Signed-off-by: Ville Syrjälä Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161207175647.10018-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.h | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_overlay.c | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) commit 330afdb1df0f3fb48583105493a8f4f8d9e3af36 Author: Ville Syrjälä Date: Wed Dec 21 16:45:47 2016 +0200 drm/i915: Initialize overlay->last_flip properly Initialize overlay->last_flip properly instead of leaving it zeroed. Cc: stable@vger.kernel.org Cc: Chris Wilson Fixes: 0d9bdd886f29 ("drm/i915: Convert intel_overlay to request tracking") Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161221144547.27319-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_overlay.c | 2 ++ 1 file changed, 2 insertions(+) commit aca1ebf491518910df156f3dab6a66306bb52e28 Author: Ville Syrjälä Date: Tue Dec 20 17:39:02 2016 +0200 drm/i915: Move the min_pixclk[] handling to the end of readout Trying to determine the pixel rate of the pipe can't be done until we know the clock, which means it can't be done until the encoder .get_config() hooks have been called. So let's move the min_pixclk[] stuff to the end of intel_modeset_readout_hw_state() when we actually have gathered all the required infromation. Cc: Maarten Lankhorst Cc: Mika Kahola Cc: Ander Conselvan de Oliveira Fixes: 565602d7501a ("drm/i915: Do not acquire crtc state to check clock during modeset, v4.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161220153902.15621-1-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 5d5ab2d26f32bdaa5872b938658e0bf8d341bc4c Author: Ville Syrjälä Date: Tue Dec 20 18:51:17 2016 +0200 drm/i915: Force VDD off on the new power seqeuencer before starting to use it Apparently some VLV BIOSen like to leave the VDD force bit enabled even for power seqeuncers that aren't properly hooked up to any port. That will result in a imbalance in the AUX power domain refcount when we stat to use said power sequencer as edp_panel_vdd_on() will not grab the power domain reference if it sees that the VDD is already on. To fix this let's make sure we turn off the VDD force bit when we initialize the power sequencer registers. That is, unless it's being done from the init path since there we are actually initializing the registers for the current power sequencer and we don't want to turn VDD off needlessly as that would require waiting for the power cycle delay before we turn it back on. This fixes the following kind of warnings: WARNING: CPU: 0 PID: 123 at ../drivers/gpu/drm/i915/intel_runtime_pm.c:1455 intel_display_power_put+0x13a/0x170 [i915]() WARN_ON(!power_domains->domain_use_count[domain]) ... v2: Fix typos in comment (David) Cc: stable@vger.kernel.org Cc: Matwey V. Kornilov Tested-by: Matwey V. Kornilov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98695 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161220165117.24801-1-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit a98d9c1d7e9bb08648e40abe604374825e57f8ff Author: Imre Deak Date: Wed Dec 21 12:17:24 2016 +0200 drm/i915/ddi: Rely on VBT DDI port info for eDP detection There is at least one APL based system using port A in DP mode (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A unconditionally as eDP which is incorrect in this case. Fix this by relying on the VBT DDI port 'internal port' flag instead on all ports on DDI platforms. For now chicken out from using VBT for port A before GEN9. v2: - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani) - Use the DDI port info on all DDI platforms starting from port B. Cc: Ville Syrjälä Cc: Jani Nikula Cc: David Weinehall Reviewed-by: Ville Syrjälä (v1) Reviewed-by: David Weinehall Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1482315444-24750-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 4 ++++ drivers/gpu/drm/i915/intel_dp.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) commit 108109444ff64fb1a2976174ec23e9e2117b5709 Author: Elaine Wang Date: Mon Dec 19 18:19:05 2016 +0800 drm/i915: Check num_pipes before initializing audio component when num_pipes is zero, it indicates there is no display and HDMI audio doesn't exist. v2: Move the check from caller to callee for consistency. Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Signed-off-by: Elaine Wang Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1482142746-21663-1-git-send-email-elaine.wang@intel.com drivers/gpu/drm/i915/intel_audio.c | 3 +++ 1 file changed, 3 insertions(+) commit 844ca23f5b2e9db925aa5fe0daa5d1d887dba84d Author: Gabriel Fernandez Date: Tue Dec 13 15:20:18 2016 +0100 clk: stm32f4: SDIO & 48Mhz clock management for STM32F469 board In the stm32f469 soc, the 48Mhz clock could be derived from pll-q or from pll-sai-p. The SDIO clock could be also derived from 48Mhz or from sys clock. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 49 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) commit 62710c121b262fb8fe26d50179ab407e421969ed Author: Gabriel Fernandez Date: Tue Dec 13 15:20:17 2016 +0100 clk: stm32f4: Add SAI clocks This patch introduces SAI clocks for stm32f4 socs. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 12696bac3ac256f4baa730b3a7b6712c602ea578 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:16 2016 +0100 clk: stm32f4: Add I2S clock This patch introduces I2S clock for stm32f4 soc. The I2S clock could be derived from an external clock or from pll-i2s Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit daf2d117cbca8913b02643aff36ec8763f7d8198 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:15 2016 +0100 clk: stm32f4: Add lcd-tft clock This patch introduces lcd-tft clock for stm32f4 soc. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 517633ef630eba33950abd600dfab6c573d3cc22 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:14 2016 +0100 clk: stm32f4: Add post divisor for I2S & SAI PLLs This patch adds post dividers of I2S & SAI PLLs. These dividers are managed by a dedicated register (RCC_DCKCFGR). The PLL should be off before a set rate. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 83135ad3c517f2b4b59321886efe19e6c6cff54a Author: Gabriel Fernandez Date: Tue Dec 13 15:20:13 2016 +0100 clk: stm32f4: Add PLL_I2S & PLL_SAI for STM32F429/469 boards This patch introduces PLL_I2S and PLL_SAI. Vco clock of these PLLs can be modify by DT (only n multiplicator, m divider is still fixed by the boot-loader). Each PLL has 3 dividers. PLL should be off when we modify the rate. Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring [sboyd@codeaurora.org: Mark stm32f4_pll_div_ops static] Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 351 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 334 insertions(+), 17 deletions(-) commit f8b5036361412a27c07a4ac9c3a4b80678cbd1e1 Author: Gabriel Fernandez Date: Tue Dec 13 15:20:12 2016 +0100 clk: stm32f4: Update DT bindings documentation Creation of dt include file for specific stm32f4 clocks. These specific clocks are not derived from system clock (SYSCLOCK) We should use index 1 to use these clocks in DT. e.g. <&rcc 1 CLK_LSI> Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st,stm32-rcc.txt | 17 ++++++++++ include/dt-bindings/clock/stm32fx-clock.h | 39 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 685dc94b7d8f791199edde3fb9d2a006bc5375fa Author: Bjorn Andersson Date: Fri Nov 18 08:33:25 2016 -0800 clk: qcom: smd-rpmcc: Add msm8974 clocks This adds all RPM based clocks for msm8974, except cxo and gfx3d_clk_src. Tested-by: Georgi Djakov Signed-off-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 + drivers/clk/qcom/clk-smd-rpm.c | 71 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,rpmcc.h | 40 +++++++++++- 3 files changed, 110 insertions(+), 2 deletions(-) commit 86c654d41a52e3d17e9bc2c2ba37f3c963e66a4a Author: Abhishek Sahu Date: Fri Nov 25 21:11:32 2016 +0530 clk: qcom: ipq4019: Add all the frequencies for apss cpu The APSS CPU clock does not contain all the frequencies in its frequency table so this patch adds the same. Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit b52a0c2c11401a8f39b4fcb0b59baf0059902a98 Author: Abhishek Sahu Date: Fri Nov 25 21:11:31 2016 +0530 clk: qcom: ipq4019: correct sdcc frequency and parent name 1. The parent for sdcc clock is sdccpll. 2. The frequency value was wrong so modified the same. Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c1a96935f782c516af585e47020c3e214efd861 Author: Abhishek Sahu Date: Fri Nov 25 21:11:30 2016 +0530 clk: qcom: ipq4019: Add the nodes for pcnoc The current ipq4019 clock driver does not have the node for PCNOC so this patch adds and registers the PCNOC clock nodes. This PCNOC clock is critical and should not be turned off so setting CRITICAL flag also. Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 39 ++++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-ipq4019.h | 1 + 2 files changed, 40 insertions(+) commit d83dcacea185da4f664c909e4c04034336b463ab Author: Abhishek Sahu Date: Fri Nov 25 21:11:29 2016 +0530 clk: qcom: ipq4019: Add the apss cpu pll divider clock node The current ipq4019 clock driver does not have support for all the frequency supported by APSS CPU. APSS CPU frequency is provided with APSS CPU PLL divider which divides down the VCO frequency. This divider is nonlinear and specific to IPQ4019 so the standard divider code cannot be used for this. Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 132 +++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-ipq4019.h | 1 + 2 files changed, 133 insertions(+) commit 4577aa01a5d12737c6f8109013651c97535a79b5 Author: Abhishek Sahu Date: Fri Nov 25 21:11:28 2016 +0530 clk: qcom: ipq4019: remove fixed clocks and add pll clocks The current ipq4019 clock driver registered the PLL clocks and dividers as fixed clock. These fixed clock needs to be removed from driver probe function and same need to be registered with clock framework. These PLL clocks should be programmed only once and the same are being programmed already by the boot loader so the set rate operation is not required for these clocks. Only the rate can be calculated by clock operations in clock driver file so this patch adds the same. The PLL takes the reference clock from XO and generates the intermediate VCO frequency. This VCO frequency will be divided down by different PLL internal dividers. Some of the PLL internal dividers are fixed while other are programmable. Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 254 +++++++++++++++++++++++++-- include/dt-bindings/clock/qcom,gcc-ipq4019.h | 9 + 2 files changed, 252 insertions(+), 11 deletions(-) commit 093d680a482f5c840f9e290ac2a678a9132d5a92 Author: Deepak M Date: Thu Dec 15 14:31:32 2016 +0530 drm/i915/glk: Add new bit fields in MIPI CTRL register v2: Addressed Jani's Review comments (renamed bit field macros) Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481792500-30863-2-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eb6f771b498956aa03170586a94f9f8bf2cc41d3 Author: Rodrigo Vivi Date: Mon Dec 19 13:55:08 2016 -0800 drm/i915: Remove useless VLV_FEATURE Macro. This macro got useless after commit 8d9c20e1d1e38 "drm/i915: Remove .is_mobile field from platform struct" that removed is_mobile split from VLV definition. Also this was never reused on any following platform. So let's clean up a bit here. Cc: Carlos Santa Cc: Daniel Vetter Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1482184508-18346-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 3c6b29b2df12fe5783b17fbf73bc2d53e385cdbd Author: Paulo Zanoni Date: Thu Dec 15 11:23:55 2016 -0200 drm/i915: fully apply WaSkipStolenMemoryFirstPage Don't even tell the mm allocator to handle the first page of stolen on the affected platforms. This means that we won't inherit the FB in case the BIOS decides to put it at the start of stolen. But the BIOS should not be putting it at the start of stolen since it's going to get corrupted. I suppose the bug here is that some pixels at the very top of the screen will be corrupted, so it's not exactly easy to notice. We have confirmation that the first page of stolen does actually get corrupted, so I really think we should do this in order to avoid any possible future headaches, even if that means losing BIOS framebuffer inheritance. Let's not use the HW in a way it's not supposed to be used. Notice that now ggtt->stolen_usable_size won't reflect the ending address of the stolen usable range anymore, so we have to fix the places that rely on this. To simplify, we'll just use U64_MAX. v2: don't even put the first page on the mm (Chris) v3: drm_mm_init() takes size instead of end as argument (Ville) v4: add a comment explaining the reserved ranges (Chris) use 0 for start and U64_MAX for end when possible (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94605 Cc: Chris Wilson Signed-off-by: Paulo Zanoni Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481808235-27607-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_gem_gtt.h | 10 +++++++++- drivers/gpu/drm/i915/i915_gem_stolen.c | 36 ++++++++++++---------------------- drivers/gpu/drm/i915/intel_fbc.c | 2 +- 3 files changed, 22 insertions(+), 26 deletions(-) commit d43537610470d8829ebd17cd7842f47176e35ebd Author: Paulo Zanoni Date: Wed Dec 14 12:55:37 2016 -0200 drm/i915: skip the first 4k of stolen memory on everything >= gen8 BSpec got updated and this workaround is now listed as standard required programming for all subsequent projects. This is confirmed to fix Skylake screen flickering issues (probably caused by the fact that we initialized a ring in the first page of stolen, but I didn't 100% confirm this theory). v2: this is the patch that fixes the screen flickering, document it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94605 Cc: stable@vger.kernel.org Tested-by: Dominik Klementowski Signed-off-by: Paulo Zanoni Acked-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481727338-9901-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_gem_stolen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c2dc6cc946aa8463e1e7676c8f82334c1dc8a01c Author: Chris Wilson Date: Mon Dec 19 12:43:46 2016 +0000 drm/i915: Add a test that we terminate the trimmed sgtable as expected In commit 0c40ce130e38 ("drm/i915: Trim the object sg table"), we expect to copy exactly orig_st->nents across and allocate the table thusly. The copy loop should therefore end with the new_sg being NULL. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161219124346.550-2-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+) commit d766ef53006c2c38a7fe2bef0904105a793383f2 Author: Chris Wilson Date: Mon Dec 19 12:43:45 2016 +0000 drm/i915: Fallback to single PAGE_SIZE segments for DMA remapping If we at first do not succeed with attempting to remap our physical pages using a coalesced scattergather list, try again with one scattergather entry per page. This should help with swiotlb as it uses a limited buffer size and only searches for contiguous chunks within its buffer aligned up to the next boundary - i.e. we may prematurely cause a failure as we are unable to utilize the unused space between large chunks and trigger an error such as: i915 0000:00:02.0: swiotlb buffer is full (sz: 1630208 bytes) Reported-by: Juergen Gross Tested-by: Juergen Gross Fixes: 871dfbd67d4e ("drm/i915: Allow compaction upto SWIOTLB max segment size") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Imre Deak Cc: Link: http://patchwork.freedesktop.org/patch/msgid/20161219124346.550-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit d8567862dc049df67fbbf081a9c27aee8031f6c8 Author: Chris Wilson Date: Tue Dec 20 10:40:03 2016 +0000 drm/i915/breadcrumbs: s/container_of/rb_entry/ In keeping with commit f802cf7e0986 ("drm/i915/debugfs: use rb_entry()"), convert the primary user of the rbtrees over to using rb_entry rather than the equivalent container_of. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161220104003.8044-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_breadcrumbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f802cf7e0986d3767b23922c2fa585fdb1bd8abc Author: Geliang Tang Date: Mon Dec 19 22:43:49 2016 +0800 drm/i915/debugfs: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/62ce937ae9a341421942b4418515610d055fa653.1482158544.git.geliangtang@gmail.com drivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b854982b273134e4ff02c61a74e70e1b1876286 Author: Johannes Berg Date: Mon Dec 19 09:51:11 2016 +0100 Revert "rfkill: Add rfkill-any LED trigger" This reverts commit 73f4f76a196d7adb11a1e192bd8024fe0bc83910. As Mike reported, and I should've seen in review, we can't call the new LED functions, which acquire the mutex, from places like rfkill_set_sw_state() that are documented to be callable from any context the user likes to use. For Mike's case it led to a deadlock, but other scenarios are possible. Reported-by: Михаил Кринкин Signed-off-by: Johannes Berg net/rfkill/core.c | 75 +------------------------------------------------------ 1 file changed, 1 insertion(+), 74 deletions(-) commit 5af7edc5859abf7b38e3158bf078db831ec28853 Author: Rodrigo Vivi Date: Mon Dec 19 11:05:47 2016 -0800 drm/i915: Simplify gem stolen initialization. Let's take usage of IS_LP to simplify the gem stolen initialization as suggest by Tvrtko. Also assume that all new LP platforms follows the chv+ and others bdw+. v2: Remove the wrong commit message about bxt and glk. (Ander) Cc: Ander Conselvan de Oliveira Cc: Imre Deak Cc: Mika Kuoppala Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1482174347-24911-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9244f858d74131352305e417515b90c0d4b24e0e Author: Rodrigo Vivi Date: Sun Dec 18 13:36:27 2016 -0800 drm/i915: Rename get stolen functions for LP platforms chv+ gen8 is used for both Broadwell and Cherryview but this function here is only Cherryview and all next atom LP platforms. So let's rename it to avoid confusion as suggested by Ville. Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1482096988-400-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_stolen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8727dc090284de5e30006034dc732245c5259501 Author: Rodrigo Vivi Date: Sun Dec 18 13:36:26 2016 -0800 drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp. Valleyview/Baytrail (gen7_lp) and Cherryview/Braswell (gen8_lp) are both Atom platforms like Broxton/Apollolake and Geminilake. So let's expand this is_lp back to these platforms and create the IS_LP(dev_priv) so we can start simplifying a bit our if/else for platform lists. Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1482096988-400-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 2 ++ 2 files changed, 3 insertions(+) commit f79f26921ee12c6fc14d0df61b1eb27a5070b959 Author: Maarten Lankhorst Date: Mon Dec 12 11:34:55 2016 +0100 drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3. Do something similar to vc4, only allow updating the cursor state in-place through a fastpath when the watermarks are unaffected. This will allow cursor movement to be smooth, but changing cursor size or showing/hiding cursor will still fall back so watermarks can be updated. Only moving and changing fb is allowed. Changes since v1: - Set page flip to always_unused for trybot. - Copy fence correctly, ignore plane_state->state, should be NULL. - Check crtc_state for !active and modeset, go to slowpath if the case. Changes since v2: - Make error handling work correctly. (Matthew Auld) Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/a8e4cb00-5171-14e5-bbe3-dadb654ff296@linux.intel.com drivers/gpu/drm/i915/intel_atomic_plane.c | 47 +++++++---- drivers/gpu/drm/i915/intel_display.c | 132 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 2 + 3 files changed, 163 insertions(+), 18 deletions(-) commit f2b0feeb2e1f33fa6f050935e84d99c714bdb73d Author: Maarten Lankhorst Date: Thu Dec 8 14:45:28 2016 +0100 drm/atomic: Remove drm_atomic_helper_framebuffer_changed. This function is now completely unused, zap it. Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481204729-9058-6-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 35 ----------------------------------- include/drm/drm_atomic_helper.h | 3 --- 2 files changed, 38 deletions(-) commit a3fbb53f45fd208ec65e8a80a07f5d4ea11b0f69 Author: Maarten Lankhorst Date: Thu Dec 8 14:45:27 2016 +0100 drm/atomic: Wait for vblank whenever a plane is added to state. There's 2 reasons for doing a vblank wait: - To fulfill uabi expectations, but the legacy ioctls are ill-defined enough that we really only need this when we do send out an event. - To make sure we don't tear down mappings before the scanout engine stops accessing it. The later is problematic with the current code since e.g. rotation might need a different mapping than normal orientation. And rotation is a plane property, and not on the fb. Hence we need to remove this optimization. Signed-off-by: Maarten Lankhorst [danvet: Completely new commit message.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481204729-9058-5-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 671a911bb9aea07360cb253e98acb4b7e6fbdd07 Author: Geliang Tang Date: Mon Dec 19 22:40:25 2016 +0800 regmap: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Mark Brown drivers/base/regmap/regcache-rbtree.c | 7 +++---- drivers/base/regmap/regmap.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) commit bdc571464c49740ce56c56e108d60f825336eb89 Author: Maarten Lankhorst Date: Thu Dec 15 12:51:42 2016 +0100 drm/atomic: Clean up wait_for_vblanks, v2. Stop relying on a per crtc_state last_vblank_count, we shouldn't touch crtc_state after commit. Move it to atomic_state->crtcs. Also stop re-using new_crtc_state->enable, we can now simply set a bitmask with crtc_crtc_mask. Changes since v1: - Keep last_vblank_count in __drm_crtc_state. Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/8e4759a4-24d3-3f80-bd1a-1e7a9c83b612@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 28 ++++++++++++++-------------- include/drm/drm_atomic.h | 1 + include/drm/drm_crtc.h | 5 ----- 3 files changed, 15 insertions(+), 19 deletions(-) commit 0532be078a207d7dd6ad26ebd0834e258acc4ee7 Author: Maarten Lankhorst Date: Mon Dec 19 12:08:16 2016 +0100 drm/atomic: Unconditionally call prepare_fb. Atomic drivers may set properties like rotation on the same fb, which may require a call to prepare_fb even when framebuffer stays identical. Instead of handling all the special cases in the core, let the driver decide when prepare_fb and cleanup_fb are noops. This is a revert of: commit fcc60b413d14dd06ddbd79ec50e83c4fb2a097ba Author: Keith Packard Date: Sat Jun 4 01:16:22 2016 -0700 drm: Don't prepare or cleanup unchanging frame buffers [v3] The original commit mentions that this prevents waiting in i915 on all previous rendering during cursor updates, but there are better ways to fix this. Signed-off-by: Maarten Lankhorst Acked-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/6d82f9b6-9d16-91d1-d176-4a37b09afc44@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 9 --------- 1 file changed, 9 deletions(-) commit 23e291c2e4c84a40a4b3de8539dec95bfda214f1 Author: Brian Norris Date: Fri Dec 16 16:59:16 2016 -0800 spi: rockchip: support "sleep" pin configuration In the pattern of many other devices, support a system-sleep pin configuration. Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Tested-by: Caesar Wang Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-rockchip.txt | 7 +++++++ drivers/spi/spi-rockchip.c | 5 +++++ 2 files changed, 12 insertions(+) commit 9f2bdb006a7e432726434aabf67a9cc0b62d266b Author: Ville Syrjälä Date: Wed Dec 14 20:00:23 2016 +0200 drm/i915: Prevent PPS stealing from a normal DP port on VLV/CHV VLV apparently gets upset if the PPS for a pipe currently driving an external DP port gets used for VDD stuff on another eDP port. The DP port falls over and fails to retrain when this happens, leaving the user staring at a black screen. Let's fix it by also tracking which pipe is driving which DP/eDP port. We'll track this under intel_dp so that we'll share the protection of the pps_mutex alongside the pps_pipe tracking, since the two things are intimately related. I had plans to reduce the protection of pps_mutex to cover only eDP ports, but with this we can't do that. Well, for for VLV/CHV at least. For other platforms it should still be possible, which would allow AUX communication to occur in parallel for multiple DP ports. v2: Drop stray crap from a comment (Imre) Grab pps_mutex when clearing active_pipe Fix a typo in the commit message v3: Make vlv_active_pipe() static Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1481738423-29738-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 152 +++++++++++++++++++++++++++------------ drivers/gpu/drm/i915/intel_drv.h | 6 ++ 2 files changed, 111 insertions(+), 47 deletions(-) commit bf51997c91e097e552ce219f38c1520e4039b637 Author: Chris Wilson Date: Mon Dec 19 10:13:57 2016 +0000 drm/i915: Drop mutex after successful kref_put_mutex() The kref_put_mutex() returns with the mutex held after freeing the object - so we must remember to drop it... Fixes: 69df05e11ab8 ("drm/i915: Simplify releasing context reference") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161219101357.28140-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4fed0231994b27b3896bc63885ac66d02fff625b Author: Yuta Kobayashi Date: Mon Dec 19 02:36:45 2016 +0000 HID: multitouch: enable the Surface 4 Type Cover Pro (JP) to report multitouch data Since commit 8fe89ef076fa1 ("HID: multitouch: enable the Surface 3 Type Cover to report multitouch data"), the TypeCover can be properly handled by hid-multitouch and don't require any special quirk in the kernel. Remove the support of the Surface 4 Type Cover Pro (JP) from hid-microsoft so it can properly report multitouch from the touchpad. Signed-off-by: Yuta Kobayashi Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 -- drivers/hid/hid-ids.h | 1 - drivers/hid/hid-microsoft.c | 2 -- drivers/hid/usbhid/hid-quirks.c | 1 - 4 files changed, 6 deletions(-) commit 938d0071573c5f83da87cc607bebea1e5b4e52b6 Author: Corentin Labbe Date: Thu Dec 15 16:27:11 2016 +0100 HID: intel-ish-hid: Remove unneeded linux/miscdevice.h include hid/intel-ish-hid does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 - drivers/hid/intel-ish-hid/ishtp/hbm.c | 1 - drivers/hid/intel-ish-hid/ishtp/init.c | 1 - 3 files changed, 3 deletions(-) commit b766922e65356df38a57b09afab6c3d7bf7e024d Author: Kamalesh Babulal Date: Fri Dec 16 11:44:24 2016 +0530 powerpc/livepatch: Remove klp_write_module_reloc() stub commit 425595a7fc20 ("livepatch: reuse module loader code to write relocations") offloads livepatch module relocation write to arch specific module loader code. Remove unused klp_write_module_reloc() function stub. Signed-off-by: Kamalesh Babulal Acked-by: Balbir Singh Reviewed-by: Petr Mladek Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina arch/powerpc/include/asm/livepatch.h | 7 ------- 1 file changed, 7 deletions(-) commit 2f1fed12c65383ca4d760cc6141da265afcaa439 Merge: 2cf026a 2f95bc6 Author: Tomi Valkeinen Date: Mon Dec 19 11:35:03 2016 +0200 Merge omapdrm work from Laurent omapdrm IRQ rework, fixed vblank count and timestamp, cleanups. commit 2f95bc6d324a93b2411bcc5defe4d4414c45f325 Author: Laurent Pinchart Date: Mon Dec 12 11:28:47 2016 +0200 drm: omapdrm: Perform initialization/cleanup at probe/remove time The drm driver .load() operation is prone to race conditions as it initializes the driver after registering the device nodes. Its usage is deprecated, inline it in the probe function and call drm_dev_alloc() and drm_dev_register() explicitly. For consistency inline the .unload() handler in the remove function as well. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_connector.c | 2 - drivers/gpu/drm/omapdrm/omap_drv.c | 211 +++++++++++++++---------------- 2 files changed, 105 insertions(+), 108 deletions(-) commit e57e17cc40d3297fbb279c6c0e9613bdc81ef893 Author: Laurent Pinchart Date: Wed Dec 14 12:41:24 2016 +0200 drm: Move vblank cleanup from unregister to release Calling drm_vblank_cleanup() in drm_dev_unregister() causes issues with drivers that have moved away from the .load() and .unload() midlayer. Those drivers call drm_dev_unregister() as the first operation at unbind time, before shutting down the device. This results in warnings due to drm_vblank_cleanup() being called with vblank interrupts still active, and then to vblank events being sent after cleanup. Fix the problem by moving vblank cleanup from drm_dev_unregister() to drm_dev_release() that is guaranteed to be called after drivers shut down the device. Suggested-by: Daniel Vetter Signed-off-by: Laurent Pinchart Tested-by: Tomi Valkeinen Reviewed-by: Lucas Stach drivers/gpu/drm/drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d501b12999eb9cdfc488127fabaf794171dd9bbf Author: Laurent Pinchart Date: Mon Dec 12 11:57:24 2016 +0200 drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures By linking the sizeof to a variable type the code will be less prone to bugs due to future type changes of variables. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 3 +-- drivers/gpu/drm/omapdrm/omap_connector.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_encoder.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) commit 84e1d4578fe9de486b367cc22a405f4a299ab17c Author: Laurent Pinchart Date: Tue Apr 19 03:07:59 2016 +0300 drm: omapdrm: Remove global variables Move the list of pending IRQ wait instances to the omap_drm_private structure and the wait queue head to the IRQ wait structure. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 3 ++- drivers/gpu/drm/omapdrm/omap_irq.c | 42 ++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 21 deletions(-) commit 80f91bffb784940fca9ac56b97ac0c3101f6e806 Author: Laurent Pinchart Date: Tue Apr 19 02:47:02 2016 +0300 drm: omapdrm: Simplify IRQ wait implementation Now that the IRQ list is used for IRQ wait only we can merge omap_drm_irq and omap_irq_wait and simplify the implementation. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 17 +------ drivers/gpu/drm/omapdrm/omap_irq.c | 94 ++++++++++++++------------------------ 2 files changed, 37 insertions(+), 74 deletions(-) commit ca52d2f33bbb5bbac0bd85c5ea50c0e85a416ebc Author: Laurent Pinchart Date: Wed May 27 19:15:22 2015 +0300 drm: omapdrm: Inline the pipe2vbl function The function is only used in omap_irq.c and is just a wrapper around dispc_mgr_get_vsync_irq(). Remove it and call the dispc function directly. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 7 ------- drivers/gpu/drm/omapdrm/omap_drv.h | 1 - drivers/gpu/drm/omapdrm/omap_irq.c | 6 +++--- 3 files changed, 3 insertions(+), 11 deletions(-) commit 156548175cdf9536d733bbde8b3c092ac92c3aec Author: Laurent Pinchart Date: Tue Apr 19 02:20:46 2016 +0300 drm: omapdrm: Don't call DISPC power handling in IRQ wait functions The IRQ wait functions are called from the DSS enable and disable operations only, where the DISPC is guaranteed to be enabled. There's no need for manual DISPC power management there. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_irq.c | 4 ---- 1 file changed, 4 deletions(-) commit 5d9f5b33399cc57d04ceed05f011d6fe4136675a Author: Laurent Pinchart Date: Mon Jun 6 03:55:52 2016 +0300 drm: omapdrm: Remove unused parameter from omap_drm_irq handler The only omap_drm_irq handler doesn't use the irqstatus parameter passed to the function. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_irq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit da06a922cf612c72e62a0bb655e9b40318ece35a Author: Laurent Pinchart Date: Tue Apr 19 01:09:31 2016 +0300 drm: omapdrm: Don't expose the omap_irq_(un)register() functions The IRQ registration functions are not used outside of their compilation unit, make them static. As the __omap_irq_(un)register() functions are only called by their omap_irq_(un)register() counterparts, merge them together. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 4 ---- drivers/gpu/drm/omapdrm/omap_irq.c | 23 +++++------------------ 2 files changed, 5 insertions(+), 22 deletions(-) commit 14389a374b12347eecdc98a3082921ef68cad179 Author: Laurent Pinchart Date: Tue Apr 19 01:43:03 2016 +0300 drm: omapdrm: Keep vblank interrupt enabled while CRTC is active Instead of going through a complicated private IRQ registration mechanism, handle the vblank interrupt activation with the standard drm_crtc_vblank_get() and drm_crtc_vblank_put() mechanism. This will let the DRM core keep the vblank interrupt enabled as long as needed to update the frame counter. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 79 ++++++++++++++++--------------------- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/omapdrm/omap_irq.c | 4 +- 3 files changed, 37 insertions(+), 47 deletions(-) commit d173d3dc5e41af969c1b230a3a6357e51b9baaeb Author: Laurent Pinchart Date: Tue Apr 19 01:31:21 2016 +0300 drm: omapdrm: Use a spinlock to protect the CRTC pending flag The CRTC pending flag will need to be accessed atomically in the vblank interrupt handler, memory barriers won't be enough to protect it. Use a spinlock instead. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 577d3983c87a1bf47c4e761df3ba2b9c36229c8e Author: Laurent Pinchart Date: Tue Apr 19 01:15:11 2016 +0300 drm: omapdrm: Prevent processing the same event multiple times The vblank interrupt is disabled after one occurrence, preventing the atomic update event from being processed twice. However, this also prevents the software frame counter from being updated correctly that would require vblank interrupts to be kept enabled while the CRTC is active. In preparation for vblank interrupt fixes, make sure that the atomic update event will be processed once only when the vblank interrupt will be kept enabled. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 03af8157aac6db1d0a84747dec64b9f5a241ed62 Author: Laurent Pinchart Date: Mon Apr 18 03:09:48 2016 +0300 drm: omapdrm: Check the CRTC software state at enable/disable time The omapdrm DSS manager enable/disable operations check the DSS manager state to avoid double enabling/disabling. Check the CRTC software state instead to decrease the dependency of the DRM layer to the DSS layer. The dispc_mgr_is_enabled() function then be turned into a static function, but needs to be moved up in its compilation unit to avoid a forward declaration. Add a WARN_ON to catch double enable or disable that should be prevented by the DRM core and would be a clear sign of a bug. The warning should eventually be removed. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 27 +++++++++++++-------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 6 +++--- 3 files changed, 16 insertions(+), 18 deletions(-) commit dadf4659d0608e034b6633f30300c2eff2dafb4c Author: Laurent Pinchart Date: Mon Jun 6 04:25:04 2016 +0300 drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs The DRM core supports skipping plane update for inactive CRTCs for hardware that don't need it or can't cope with it. That's our case, and the driver already skips flushing planes on inactice CRTCs. We can't remove the check from the driver, as active CRTCs are disabled at the hardware level when an atomic flush is performed if a mode set is pending. There's however no need to forward the plane commit calls to the driver, so use the DRM core infrastructure to skip them with a detailed comment to explain why the check must still be kept in the driver. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 8 +++++++- drivers/gpu/drm/omapdrm/omap_drv.c | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) commit f933a3a93b2d74a255643b326316eee392fa1b80 Author: Laurent Pinchart Date: Mon Apr 18 02:54:31 2016 +0300 drm: omapdrm: Replace DSS manager state check with omapdrm CRTC state Instead of conditioning planes update based on the DSS manager hardware state, use the enabled field newly added to the omap_crtc structure. This reduces the dependency from the DRM layer to the DSS layer. The enabled field is a transitory measure, the implementation should use the CRTC atomic state instead. However, given that CRTCs are currently not enabled/disabled through their .enable() and .disable() operations but through a convoluted code paths starting at the associated encoder operations, there is not clear guarantee that the atomic state always matches the hardware state. This will be refactored later, at which point the enabled field will be removed. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 6b5538d4ecb7679d7dc6b45f2f4db3e6958d8fe5 Author: Laurent Pinchart Date: Thu May 28 01:05:20 2015 +0300 drm: omapdrm: Handle OCP error IRQ directly Instead of going through a complicated registration mechanism, just call the OCP error IRQ handler directly from the main IRQ handler. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 1 - drivers/gpu/drm/omapdrm/omap_irq.c | 28 ++++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) commit e0519af75d6eabf1876cf6af0c60704f97ab82b3 Author: Laurent Pinchart Date: Thu May 28 00:21:29 2015 +0300 drm: omapdrm: Handle CRTC error IRQs directly Instead of going through a complicated registration mechanism, just expose the CRTC error IRQ function and call it directly from the main IRQ handler. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 12 ++---------- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/omapdrm/omap_irq.c | 8 ++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) commit 728ae8dd696a483355b593487eba73f4c64f1152 Author: Laurent Pinchart Date: Thu May 28 00:21:29 2015 +0300 drm: omapdrm: Handle FIFO underflow IRQs internally As the FIFO underflow IRQ handler just prints an error message to the kernel log, simplify the code by not registering one IRQ handler per plane but print the messages directly from the main IRQ handler. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 4 +-- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_irq.c | 67 ++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/omapdrm/omap_plane.c | 24 ------------- 4 files changed, 67 insertions(+), 30 deletions(-) commit a078a3ddc7209474e8dd827743390e9ed4bc6881 Author: Laurent Pinchart Date: Sat Mar 26 20:02:49 2016 +0200 drm: omapdrm: fb: Turn framebuffer creation error messages into debug Don't print userspace parameters validation failures as error messages to avoid giving userspace the ability to flood the kernel log. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6941e3d12b3284ea5b8d32b7023221700cad5f49 Author: Laurent Pinchart Date: Sat Mar 26 20:01:13 2016 +0200 drm: omapdrm: fb: Simplify mode command checks when creating framebuffer The hardware requires all planes to have an identical pitch in number of pixels. Given that all supported formats use the same number of bytes per pixel in all planes, framebuffer creation checks can be simplified. The implementations assumes that no format use more than two planes which is true with the existing hardware. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fb.c | 50 ++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit a39c94e8138f4708b92245a7021ad4d40376360f Author: Laurent Pinchart Date: Sat Mar 26 19:51:57 2016 +0200 drm: omapdrm: fb: Simplify objects lookup when creating framebuffer Merge the single-user objects_lookup inline function into its caller, allowing reuse of the error code path. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 25 ------------------------- drivers/gpu/drm/omapdrm/omap_fb.c | 29 ++++++++++++++++++----------- 2 files changed, 18 insertions(+), 36 deletions(-) commit c9028b39597fbdcdac96641e12cc656a27c137c1 Author: Laurent Pinchart Date: Tue Jun 7 00:45:35 2016 +0300 drm: omapdrm: fb: Use format information provided by the DRM core The driver stores in a custom structure named format several pieces of information about the format that are available in the DRM core. Remove them and get the information from the DRM core instead. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fb.c | 91 ++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 45 deletions(-) commit 4d20dfc053c7e0b2d155cbc6cb0817717753e2b5 Author: Laurent Pinchart Date: Sat Mar 26 19:24:01 2016 +0200 drm: omapdrm: fb: Limit number of planes per framebuffer to two The only multi-planar format supported by the driver is NV12, there will thus never be more than two planes per framebuffer. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef6503e8919430bb05bae2155b29fb62bcdf87b3 Author: Laurent Pinchart Date: Wed Dec 7 22:21:37 2016 +0200 drm: Kbuild: add omap_drm.h to the installed headers The header defines the userspace API exported by the omapdrm driver, install it to make the definitions available to userpace. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen include/uapi/drm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 1a9027770f3d93b78f7031af79597f9659db5d70 Author: Dmitry Torokhov Date: Mon Dec 12 14:33:37 2016 -0800 Input: i8042 - force synchronous probing of PNP drivers We rely on the result of scanning PNP bus for keyboard and mouse devices to decide whether we should continue initialization of i8042 driver or not, so the probes can not be asynchronous. Also, it is not a good idea to unbind either of the PNP devices while i8042 is running, so let's disable bind/unbind for the PNP drivers through sysfs and rely on i8042 cleaning after itself properly. User can still unbind and rebind entire i8042 and that will take care of PNP drivers as well. Reviewed-by: Luis R. Rodriguez Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit f73e73999d39a274adb8b342d7d8e722ffcf92d5 Author: Chris Wilson Date: Sun Dec 18 15:37:24 2016 +0000 drm/i915: Swap if(enable_execlists) in i915_gem_request_alloc for a vfunc A fairly trivial move of a matching pair of routines (for preparing a request for construction) onto an engine vfunc. The ulterior motive is to be able to create a mock request implementation. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 5 +---- drivers/gpu/drm/i915/intel_lrc.c | 4 +++- drivers/gpu/drm/i915/intel_lrc.h | 2 -- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +++- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +-- 5 files changed, 8 insertions(+), 10 deletions(-) commit 2947e4080f22b63b46dbbb95e838396b58a9914b Author: Chris Wilson Date: Sun Dec 18 15:37:23 2016 +0000 drm/i915/execlists: Request the kernel context be pinned high PIN_HIGH is an expensive operation (in comparison to allocating from the hole stack) unsuitable for frequent use (such as switching between contexts). However, the kernel context should be pinned just once for the lifetime of the driver, and here it is appropriate to keep it out of the mappable range (in order to maximise mappable space for users). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 70ffe9956c5cf328380053c803b783df711e8024 Author: Chris Wilson Date: Sun Dec 18 15:37:22 2016 +0000 drm/i915: Mark the shadow gvt context as closed As the shadow gvt is not user accessible and does not have an associated vm, we can mark it as closed during its construction. This saves leaking the internal knowledge of i915_gem_context into gvt/. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/scheduler.c | 10 +--------- drivers/gpu/drm/i915/i915_gem_context.c | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) commit 69df05e11ab8c10e57bb5aaaa3e6d3d1b251b333 Author: Chris Wilson Date: Sun Dec 18 15:37:21 2016 +0000 drm/i915: Simplify releasing context reference A few users only take the struct_mutex in order to release a reference to a context. We can expose a kref_put_mutex() wrapper in order to simplify these users, and optimise taking of the mutex to the final unref. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 7 +++++++ drivers/gpu/drm/i915/i915_perf.c | 16 ++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) commit e8a9c58fcd9a5081f71f57f370af1347ed6a310b Author: Chris Wilson Date: Sun Dec 18 15:37:20 2016 +0000 drm/i915: Unify active context tracking between legacy/execlists/guc The requests conversion introduced a nasty bug where we could generate a new request in the middle of constructing a request if we needed to idle the system in order to evict space for a context. The request to idle would be executed (and waited upon) before the current one, creating a minor havoc in the seqno accounting, as we will consider the current request to already be completed (prior to deferred seqno assignment) but ring->last_retired_head would have been updated and still could allow us to overwrite the current request before execution. We also employed two different mechanisms to track the active context until it was switched out. The legacy method allowed for waiting upon an active context (it could forcibly evict any vma, including context's), but the execlists method took a step backwards by pinning the vma for the entire active lifespan of the context (the only way to evict was to idle the entire GPU, not individual contexts). However, to circumvent the tricky issue of locking (i.e. we cannot take struct_mutex at the time of i915_gem_request_submit(), where we would want to move the previous context onto the active tracker and unpin it), we take the execlists approach and keep the contexts pinned until retirement. The benefit of the execlists approach, more important for execlists than legacy, was the reduction in work in pinning the context for each request - as the context was kept pinned until idle, it could short circuit the pinning for all active contexts. We introduce new engine vfuncs to pin and unpin the context respectively. The context is pinned at the start of the request, and only unpinned when the following request is retired (this ensures that the context is idle and coherent in main memory before we unpin it). We move the engine->last_context tracking into the retirement itself (rather than during request submission) in order to allow the submission to be reordered or unwound without undue difficultly. And finally an ulterior motive for unifying context handling was to prepare for mock requests. v2: Rename to last_retired_context, split out legacy_context tracking for MI_SET_CONTEXT. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 4 -- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 110 +++++------------------------ drivers/gpu/drm/i915/i915_gem_request.c | 38 ++++++---- drivers/gpu/drm/i915/i915_gem_request.h | 11 --- drivers/gpu/drm/i915/i915_guc_submission.c | 11 --- drivers/gpu/drm/i915/i915_perf.c | 18 ++--- drivers/gpu/drm/i915/intel_display.c | 3 +- drivers/gpu/drm/i915/intel_engine_cs.c | 21 +++++- drivers/gpu/drm/i915/intel_lrc.c | 62 ++++++---------- drivers/gpu/drm/i915/intel_lrc.h | 5 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 58 +++++++++------ drivers/gpu/drm/i915/intel_ringbuffer.h | 23 +++++- 14 files changed, 151 insertions(+), 217 deletions(-) commit ef11c01db405b49d96a0ab2689807ea33ae85dd6 Author: Chris Wilson Date: Sun Dec 18 15:37:19 2016 +0000 drm/i915: Move intel_lrc_context_pin() to avoid the forward declaration Just a simple move to avoid a forward declaration, though the diff likes to present itself as a move of intel_logical_ring_alloc_request_extras() in the opposite direction. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 132 +++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 67 deletions(-) commit 81147b07f27600925fb7af1390686830abbc6034 Author: Chris Wilson Date: Sun Dec 18 15:37:18 2016 +0000 drm/i915: Add a reminder that i915_vma_move_to_active() requires struct_mutex i915_vma_move_to_active() requires the struct_mutex for serialisation with retirement, so mark it up with lockdep_assert_held(). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + 1 file changed, 1 insertion(+) commit 2fa70bb9b5642211c521910d23e8b6c8d425fb89 Author: Kees Cook Date: Fri Dec 16 17:04:42 2016 -0800 drm/nouveau: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161217010442.GA140619@beast drivers/gpu/drm/nouveau/nouveau_ttm.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 5ca16d8efa669a7b57b85d9d6aa49b001ba79afb Author: Kees Cook Date: Fri Dec 16 17:04:02 2016 -0800 drm/vmwgfx: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161217010402.GA140546@beast drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4e98c378a137def586b3ffc8ac5a5852da2e0538 Author: Kees Cook Date: Fri Dec 16 17:00:11 2016 -0800 drm/ttm: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161217010011.GA140300@beast drivers/gpu/drm/ttm/ttm_bo_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c92f723705718b05e4e79a217317616f08b40127 Author: Kees Cook Date: Fri Dec 16 16:59:29 2016 -0800 drm/ttm: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161217005929.GA140260@beast drivers/gpu/drm/virtio/virtgpu_ttm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9118c0b7a6d451004753bf529bfa505e3207f9bc Author: Peter Meerwald-Stadler Date: Fri Dec 16 14:25:01 2016 +0100 drm/hisilicon: Fix spelling of clock in hisi-ade.txt Signed-off-by: Peter Meerwald-Stadler Cc: Xinliang Liu Cc: Xinwei Kong Cc: trivial@kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481894701-4613-1-git-send-email-pmeerw@pmeerw.net Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 188f78825de7b43593ae26cb86fecdf9ce5a4ac8 Author: Peter Meerwald-Stadler Date: Fri Dec 16 14:24:23 2016 +0100 drm: Fix spelling of clock in drm_connector.h Signed-off-by: Peter Meerwald-Stadler Cc: Daniel Vetter Cc: Jani Nikula Cc: trivial@kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481894663-4570-1-git-send-email-pmeerw@pmeerw.net include/drm/drm_connector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91eefc05f0ac71902906b2058360e61bd25137fe Author: Daniel Vetter Date: Wed Dec 14 00:08:10 2016 +0100 drm: Tighten locking in drm_mode_getconnector - Modeset state needs mode_config->connection mutex, that covers figuring out the encoder, and reading properties (since in the atomic case those need to look at connector->state). - Don't hold any locks for stuff that's invariant (i.e. possible connectors). - Same for connector lookup and unref, those don't need any locks. - And finally the probe stuff is only protected by mode_config->mutex. While at it updated the kerneldoc for these fields in drm_connector and add docs explaining what's protected by which locks. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-10-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 92 ++++++++++++++++++++--------------------- include/drm/drm_connector.h | 23 +++++++++-- 2 files changed, 63 insertions(+), 52 deletions(-) commit e73ab00e9a0f1731f34d0620a9c55f5c30c4ad4e Author: Daniel Vetter Date: Sun Dec 18 14:35:45 2016 +0100 drm: prevent double-(un)registration for connectors If we're unlucky then the registration from a hotplugged connector might race with the final registration step on driver load. And since MST topology discover is asynchronous that's even somewhat likely. v2: Also update the kerneldoc for @registered! v3: Review from Chris: - Improve kerneldoc for late_register/early_unregister callbacks. - Use mutex_destroy. Reviewed-by: Chris Wilson Cc: Chris Wilson Reviewed-by: Sean Paul Reported-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161218133545.2106-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 20 +++++++++++++++----- include/drm/drm_connector.h | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) commit 2ab8c5f8c0358010a19e82656fa4826a6a51d1e0 Author: Daniel Vetter Date: Wed Dec 14 00:08:08 2016 +0100 drm: Clean up connectors by unreferencing them Only static connectors should be left at this point, and we should be able to clean them out by simply dropping that last reference still around from drm_connector_init. If that leaves anything behind then we have a driver bug. Doing the final cleanup this way also allows us to use drm_connector_iter, removing the very last place where we walk connector_list explicitly in drm core&helpers. Reviewed-by: Harry Wentland Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-8-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mode_config.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit c36a3254f7857f1ad9badbe3578ccc92be541a8e Author: Daniel Vetter Date: Thu Dec 15 16:58:43 2016 +0100 drm: Convert all helpers to drm_connector_list_iter Mostly nothing special (except making sure that really all error paths and friends call iter_put). v2: Don't forget the raw connector_list walking in drm_helper_move_panel_connectors_to_head. That one unfortunately can't be converted to the iterator helpers, but since it's just some list splicing best to just wrap the entire thing up in one critical section. v3: Bail out after iter_put (Harry). Cc: Harry Wentland Reviewed-by: Harry Wentland Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161215155843.13408-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 39 ++++++++++++++++++++-------- drivers/gpu/drm/drm_crtc_helper.c | 49 ++++++++++++++++++++++++++++-------- drivers/gpu/drm/drm_fb_helper.c | 12 ++++++--- drivers/gpu/drm/drm_modeset_helper.c | 2 ++ drivers/gpu/drm/drm_plane_helper.c | 5 +++- drivers/gpu/drm/drm_probe_helper.c | 18 ++++++++----- 6 files changed, 92 insertions(+), 33 deletions(-) commit 613051dac40da1751ab269572766d3348d45a197 Author: Daniel Vetter Date: Wed Dec 14 00:08:06 2016 +0100 drm: locking&new iterators for connector_list The requirements for connector_list locking are a bit tricky: - We need to be able to jump over zombie conectors (i.e. with refcount == 0, but not yet removed from the list). If instead we require that there's no zombies on the list then the final kref_put must happen under the list protection lock, which means that locking context leaks all over the place. Not pretty - better to deal with zombies and wrap the locking just around the list_del in the destructor. - When we walk the list we must _not_ hold the connector list lock. We walk the connector list at an absolutely massive amounts of places, if all those places can't ever call drm_connector_unreference the code would get unecessarily complicated. - connector_list needs it own lock, again too many places that walk it that we could reuse e.g. mode_config.mutex without resulting in inversions. - Lots of code uses these loops to look-up a connector, i.e. they want to be able to call drm_connector_reference. But on the other hand we want connectors to stay on that list until they're dead (i.e. connector_list can't hold a full reference), which means despite the "can't hold lock for the loop body" rule we need to make sure a connector doesn't suddenly become a zombie. At first Dave&I discussed various horror-show approaches using srcu, but turns out it's fairly easy: - For the loop body we always hold an additional reference to the current connector. That means it can't zombify, and it also means it'll stay on the list, which means we can use it as our iterator to find the next connector. - When we try to find the next connector we only have to jump over zombies. To make sure we don't chase bad pointers that entire loop is protected with the new connect_list_lock spinlock. And because we know that we're starting out with a non-zombie (need to drop our reference for the old connector only after we have our new one), we're guranteed to still be on the connector_list and either find the next non-zombie or complete the iteration. - Only downside is that we need to make sure that the temporary reference for the loop body doesn't leak. iter_get/put() functions + lockdep make sure that's the case. - To avoid a flag day the new iterator macro has an _iter postfix. We can rename it back once all the users of the unsafe version are gone (there's about 100 list walkers for the connector_list). For now this patch only converts all the list walking in the core, leaving helpers and drivers for later patches. The nice thing is that we can now finally remove 2 FIXME comments from the register/unregister functions. v2: - use irqsafe spinlocks, so that we can use this in drm_state_dump too. - nuke drm_modeset_lock_all from drm_connector_init, now entirely cargo-culted nonsense. v3: - do {} while (!kref_get_unless_zero), makes for a tidier loop (Dave). - pretty kerneldoc - add EXPORT_SYMBOL, helpers&drivers are supposed to use this. v4: Change lockdep annotations to only check whether we release the iter fake lock again (i.e. make sure that iter_put is called), but not check any locking dependecies itself. That seams to require a recursive read lock in trylock mode. Cc: Dave Airlie Cc: Chris Wilson Reviewed-by: Chris Wilson Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 14 ++++- drivers/gpu/drm/drm_connector.c | 116 ++++++++++++++++++++++++++++++++------ drivers/gpu/drm/drm_encoder.c | 6 +- drivers/gpu/drm/drm_mode_config.c | 34 +++++------ include/drm/drm_connector.h | 38 +++++++++++++ include/drm/drm_mode_config.h | 12 +++- 6 files changed, 177 insertions(+), 43 deletions(-) commit 15092c7a3cddb495649363a403f242edd2aaa6a5 Author: Daniel Vetter Date: Wed Dec 14 00:08:05 2016 +0100 drm: Drop locking cargo-cult from drm_mode_config_init This is single-threaded setup code, no need for locks. And anyway, all properties need to be set up before the driver is registered anyway, they can't be hot-added. Reviewed-by: Sean Paul Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-5-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mode_config.c | 2 -- 1 file changed, 2 deletions(-) commit 2babdc850cc4f58753b7fb5332a57b513e3313cb Author: Daniel Vetter Date: Wed Dec 14 00:08:04 2016 +0100 drm/radeon|amdgpu: Remove redundant num_connectors check The list walk will shortcircuit anyway. Cc: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-4-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 ++---- drivers/gpu/drm/radeon/radeon_irq_kms.c | 12 ++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) commit 5bc9cb4dfbe8fcae02f8421e3102c78681f53b8c Author: Daniel Vetter Date: Wed Dec 14 00:08:03 2016 +0100 drm: Move atomic debugfs functions into drm_crtc_internal.h This is not driver interface stuff. Fixes: 6559c901cb48 ("drm/atomic: add debugfs file to dump out atomic state") Cc: Rob Clark Cc: Sean Paul Cc: Daniel Vetter Cc: Jani Nikula Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-3-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc_internal.h | 6 ++++++ drivers/gpu/drm/drm_debugfs.c | 1 + include/drm/drm_atomic.h | 6 ------ 3 files changed, 7 insertions(+), 6 deletions(-) commit 25a9939c09eae246173d06e0478f0e131d83b55c Author: Daniel Vetter Date: Wed Dec 14 00:08:02 2016 +0100 drm/irq: drm_legacy_ prefix for legacy ioctls Spotted while auditing our ioctl table. Also nuke the not-really-kerneldoc comments, we don't document internals and definitely don't want to mislead people with the old dragons. I think with this all the legacy ioctls now have proper drm_legacy_ prefixes. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-2-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_internal.h | 8 ++++---- drivers/gpu/drm/drm_ioctl.c | 4 ++-- drivers/gpu/drm/drm_irq.c | 30 ++++-------------------------- 3 files changed, 10 insertions(+), 32 deletions(-) commit 6e15174ecd7ace10f1f996d4bc28b583987fcbac Author: Laurent Pinchart Date: Tue Nov 29 20:55:44 2016 +0200 drm: bridge: Detach all bridges in a chain at encoder cleanup time Instead of detaching only the bridge directly connected to the encoder, detach all bridges in the chain. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/drm_encoder.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4a878c03d56214a3dcf1a014e17c93bcdc587668 Author: Laurent Pinchart Date: Mon Nov 28 18:32:05 2016 +0200 drm: bridge: Detach bridge from encoder at encoder cleanup time Most drivers that use bridges forgot to detach them at cleanup time. Instead of fixing them one by one, detach the bridge in the core drm_encoder_cleanup() function. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/drm_bridge.c | 13 ++----------- drivers/gpu/drm/drm_crtc_internal.h | 3 +++ drivers/gpu/drm/drm_encoder.c | 3 +++ drivers/gpu/drm/drm_simple_kms_helper.c | 17 ----------------- drivers/gpu/drm/imx/imx-ldb.c | 2 -- drivers/gpu/drm/imx/parallel-display.c | 2 -- include/drm/drm_bridge.h | 1 - include/drm/drm_simple_kms_helper.h | 2 -- 8 files changed, 8 insertions(+), 35 deletions(-) commit 3bb80f249525c059572d4bc89ac77ac2e511bcbe Author: Laurent Pinchart Date: Mon Nov 28 17:59:08 2016 +0200 drm: bridge: Link encoder and bridge in core code Instead of linking encoders and bridges in every driver (and getting it wrong half of the time, as many drivers forget to set the drm_bridge encoder pointer), do so in core code. The drm_bridge_attach() function needs the encoder and optional previous bridge to perform that task, update all the callers. Signed-off-by: Laurent Pinchart Acked-by: Stefan Agner # For DCU Acked-by: Boris Brezillon # For atmel-hlcdc Acked-by: Vincent Abriou # For STI Acked-by: Maxime Ripard # For sun4i Acked-by: Xinliang Liu # For hisilicon Acked-by: Jyri Sarha # For tilcdc Reviewed-by: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/arc/arcpgu_hdmi.c | 5 +-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 4 +- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +- drivers/gpu/drm/bridge/dw-hdmi.c | 3 +- drivers/gpu/drm/drm_bridge.c | 46 ++++++++++++++++------ drivers/gpu/drm/drm_simple_kms_helper.c | 4 +- drivers/gpu/drm/exynos/exynos_dp.c | 5 +-- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 6 +-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 5 +-- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 5 +-- drivers/gpu/drm/imx/imx-ldb.c | 6 +-- drivers/gpu/drm/imx/parallel-display.c | 4 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 8 ++-- drivers/gpu/drm/mediatek/mtk_dsi.c | 24 ++--------- drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 +++--- drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 +++++--- drivers/gpu/drm/msm/edp/edp_bridge.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c | 5 +-- drivers/gpu/drm/sti/sti_dvo.c | 3 +- drivers/gpu/drm/sti/sti_hda.c | 3 +- drivers/gpu/drm/sti/sti_hdmi.c | 3 +- drivers/gpu/drm/sun4i/sun4i_rgb.c | 13 +++--- drivers/gpu/drm/tilcdc/tilcdc_external.c | 4 +- include/drm/drm_bridge.h | 3 +- 25 files changed, 85 insertions(+), 110 deletions(-) commit 2407d1dc04789bfb2f39d248644981d2233feb0e Author: Laurent Pinchart Date: Mon Nov 28 21:03:49 2016 +0200 drm: Fix compilation warning caused by static inline forward declaration The drm_crtc_mask() function used in is a static inline defined in . If the first header is included in a compilation unit without the second one, the following compilation warning will be issued. In file included from /drivers/gpu/drm/drm_bridge.c:29:0: /include/drm/drm_encoder.h:192:95: warning: ‘drm_crtc_mask’ used but never defined static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc); Fix this by including the header defining the function instead of using a forward declaration. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-3-git-send-email-laurent.pinchart+renesas@ideasonboard.com include/drm/drm_encoder.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9338203c4f03ffe323b67f0b2fa17b9811fa9bb6 Author: Laurent Pinchart Date: Mon Nov 28 20:51:09 2016 +0200 drm: Don't include in used to define most of the in-kernel KMS API. It has now been split into separate files for each object type, but still includes most other KMS headers to avoid breaking driver compilation. As a step towards fixing that problem, remove the inclusion of from and include it instead where appropriate. Also remove the forward declarations of the drm_encoder and drm_encoder_helper_funcs structures from as they're not needed in the header. now has to include and contain a forward declaration of struct drm_encoder in order to allow including it as the first header in a compilation unit. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Reviewed-by: Sinclair Yeh # For vmwgfx Reviewed-by: Alex Deucher Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + drivers/gpu/drm/ast/ast_drv.h | 1 + drivers/gpu/drm/bochs/bochs.h | 1 + drivers/gpu/drm/cirrus/cirrus_drv.h | 1 + drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_crtc_helper.c | 1 + drivers/gpu/drm/drm_edid.c | 1 + drivers/gpu/drm/drm_mode_config.c | 1 + drivers/gpu/drm/drm_of.c | 1 + drivers/gpu/drm/drm_plane_helper.c | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 2 ++ drivers/gpu/drm/gma500/psb_intel_drv.h | 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_connector.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 1 + drivers/gpu/drm/radeon/radeon_mode.h | 1 + drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 1 + drivers/gpu/drm/shmobile/shmob_drm_crtc.h | 1 + drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 2 ++ drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + include/drm/drm_crtc.h | 3 --- include/drm/drm_encoder.h | 3 +++ include/drm/drm_encoder_slave.h | 1 + include/drm/drm_modeset_helper_vtables.h | 1 + 27 files changed, 30 insertions(+), 3 deletions(-) commit 966d5bf5eb90f2a8c158f6d971ad0a4f836aad9c Author: Matthew Auld Date: Tue Dec 13 20:32:22 2016 +0000 drm/i915: convert to using range_overflows Convert some of the obvious hand-rolled ranged overflow sanity checks to our shiny new range_overflows macro. Cc: Joonas Lahtinen Cc: Chris Wilson Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-4-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 6 ++---- drivers/gpu/drm/i915/i915_vma.c | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) commit 86e61735710902535ebd00decc035f5e129a377e Author: Matthew Auld Date: Tue Dec 13 20:32:21 2016 +0000 drm/i915: introduce range_overflows utility macros In a number places we hand-roll the overflow sanity check for ranges, so roll that into single macro, conceived by Chris, along with its typed variant. Cc: Joonas Lahtinen Cc: Chris Wilson Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-3-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7a0499a4b8c2e6850256b1d86c87d2deddce99b0 Author: Matthew Auld Date: Tue Dec 13 20:32:20 2016 +0000 drm/i915: move vma sanity checking into i915_vma_bind If we move the sanity checking from gen8_alloc_va_range_3lvl and gen6_alloc_va_range into i915_vma_bind, we will increase our coverage to now both callbacks. We also convert each WARN_ON over to a GEM_WARN_ON. Cc: Joonas Lahtinen Cc: Chris Wilson Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-2-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ------------ drivers/gpu/drm/i915/i915_vma.c | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) commit 17cfde60a1c4a475319990128b019666870e2afb Author: Matthew Auld Date: Tue Dec 13 20:32:19 2016 +0000 drm/i915: introduce GEM_WARN_ON In a similar spirit to GEM_BUG_ON we now also have GEM_WARN_ON, with the simple goal of expressing warnings which are truly insane, and so are only really useful for CI where we have some abusive tests. v2: - use BUILD_BUG_ON_INVALID for !DEBUG_GEM - clarify commit message Cc: Joonas Lahtinen Cc: Chris Wilson Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.h | 2 ++ 1 file changed, 2 insertions(+) commit b44f97fd78ce252c543674c46c45e67a1b0c5d90 Author: Chris Wilson Date: Fri Dec 16 07:46:40 2016 +0000 drm/i915: Simplify i915_gtt_color_adjust() If we remember that node_list is a circular list containing the fake head_node, we can use a simple list_next_entry() and skip the NULL check for the allocated check against the head_node. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161216074718.32500-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d038fc7e4fff14d6b026130007faef35cbf5e956 Author: Tvrtko Ursulin Date: Fri Dec 16 13:18:42 2016 +0000 drm/i915: Fix use after free in logical_render_ring_init Commit 3b3f1650b1ca ("drm/i915: Allocate intel_engine_cs structure only for the enabled engines") introduced the dynanically allocated engine instances and created an potential use after free scenario in logical_render_ring_init where lrc_destroy_wa_ctx_obj could be called after the engine instance has been freed. This can only happen during engine setup/init error handling which luckily does not happen ever in practice. Fix is to not call lrc_destroy_wa_ctx_obj since it would have already been executed from the preceding engine cleanup. Signed-off-by: Tvrtko Ursulin Reported-by: Dan Carpenter Fixes: 3b3f1650b1ca ("drm/i915: Allocate intel_engine_cs structure only for the enabled engines") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Jani Nikula Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481894322-2145-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 45b186f111f1623b257d183920cd4aab16a1acd5 Author: Chris Wilson Date: Fri Dec 16 07:46:42 2016 +0000 drm: Constify the drm_mm API Mark up the pointers as constant through the API where appropriate. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161216074718.32500-5-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- include/drm/drm_mm.h | 27 +++++++++++++-------------- 3 files changed, 26 insertions(+), 27 deletions(-) commit ad579002c8ec429930721c5bb8bd763e6c0c6286 Author: Chris Wilson Date: Fri Dec 16 07:46:41 2016 +0000 drm: Add drm_mm_for_each_node_safe() A complement to drm_mm_for_each_node(), wraps list_for_each_entry_safe() for walking the list of nodes safe against removal. Note from Joonas: "Most of the diff is about __drm_mm_nodes(mm), which could be split into own patch and keep the R-b's." But I don't feel like insisting on the resend. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen [danvet: Add note.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161216074718.32500-4-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 9 ++++----- include/drm/drm_mm.h | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) commit e77a8be9a0a7f2c10151967e3c72c5afcbd41117 Author: Arend Van Spriel Date: Fri Dec 16 12:15:54 2016 +0000 nl80211: better describe field in struct nl80211_bss_select_rssi_adjust The two fields in struct nl80211_bss_select_rssi_adjust did not state their type or unit. Adding documentation. Reported-by: Jouni Malinen Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 505a2e882bfae6627c84586edb276485df05c2ef Author: Arend Van Spriel Date: Fri Dec 16 11:21:54 2016 +0000 nl80211: rework {sched_,}scan event related functions A couple of functions used with scan events were named with term "send" although they were only preparing the the event message so renamed those. Also remove nl80211_send_sched_scan_results() in favor of just calling nl80211_send_sched_scan() with the right value. Signed-off-by: Arend van Spriel [mention nl80211_send_sched_scan_results() in the commit log] Signed-off-by: Johannes Berg net/wireless/nl80211.c | 34 ++++++++-------------------------- net/wireless/nl80211.h | 6 ++---- net/wireless/scan.c | 9 +++++---- 3 files changed, 15 insertions(+), 34 deletions(-) commit ac29a8f41740186aee601de99c729530e37ca77c Author: Adam Thomson Date: Fri Dec 16 11:05:02 2016 +0000 ASoC: da7218: Set DAI output pin high impedance when not in use For TDM mode, the I2S data out line can be shared between mutliple codecs. In this scenario, only the active codec should be using the line, and all others should be high impedance. However, currently in the driver this configuration isn't set when capture is inactive, and the line remains driven. This patch updates the AIF_OUT widget to set the DAI output pin of the device as high impedance when not in use. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0cc059abac0dc687dc714f3ec2c8d8a134132f56 Author: Dan Carpenter Date: Fri Dec 16 12:33:59 2016 +0300 spi: armada-3700: Remove unnecessary condition We checked that "a3700_spi->wait_mask & cause" was set at the beginning of the function so we don't need to check again here. Signed-off-by: Dan Carpenter Acked-by: Romain Perier Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 15a43cbf4736a3932e6259fa7d6e47558f6222b0 Author: Nicholas Mc Guire Date: Fri Dec 16 02:59:38 2016 +0100 drm/i915: relax uncritical udelay_range() udelay_range(1, 2) is inefficient and as discussions with Jani Nikula unnecessary here. This replaces this tight setting with a relaxed delay of min=20 and max=50 which helps the hrtimer subsystem optimize timer handling. Fixes: commit be4fc046bed3 ("drm/i915: add VLV DSI PLL Calculations") Link: http://lkml.org/lkml/2016/12/15/147 Signed-off-by: Nicholas Mc Guire Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481853578-19834-1-git-send-email-hofrat@osadl.org drivers/gpu/drm/i915/intel_dsi_pll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0a7b35ce2e7a8744ff2b7689f09bd4f5e00e77f1 Author: Nicholas Mc Guire Date: Fri Dec 16 02:59:20 2016 +0100 drm/i915: relax uncritical udelay_range() settings udelay_range(2, 3) is inefficient and as discussions with Jani Nikula unnecessary here. This replaces this tight setting with a relaxed delay of min=20 and max=50. which helps the hrtimer subsystem optimize timer handling. Link: http://lkml.org/lkml/2016/12/15/127 Fixes: commit 37ab0810c9b7 ("drm/i915/bxt: DSI enable for BXT") Signed-off-by: Nicholas Mc Guire Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481853560-19795-1-git-send-email-hofrat@osadl.org drivers/gpu/drm/i915/intel_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6b4122c93f43c3f7b5787ca20fa3ac458f50d05 Author: Arnd Bergmann Date: Fri Dec 16 09:44:08 2016 +0100 rfkill: hide unused goto label A cleanup introduced a harmless warning in some configurations: net/rfkill/core.c: In function 'rfkill_init': net/rfkill/core.c:1350:1: warning: label 'error_input' defined but not used [-Wunused-label] This adds another #ifdef around the label to match that around the caller. Fixes: 6124c53edeea ("rfkill: Cleanup error handling in rfkill_init()") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg net/rfkill/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 776594d528073983ce462f7cb03b51e36894923c Author: Michal Wajdeczko Date: Thu Dec 15 19:53:21 2016 +0000 drm/i915: Fix inconsistent naming of i915_guc_client parameter We usually use 'client' as identifier for the i915_guc_client. For unknown reason, few functions were using 'gc' name. Signed-off-by: Michal Wajdeczko Reviewed-by: Joonas Lahtinen [joonas.lahtinen@linux.intel.com: Split two lines over 80] Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161215195321.63804-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 66 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 32 deletions(-) commit 56e3d1cd05cc7b24cfcae8714b0661bf607aaba3 Author: Jason A. Donenfeld Date: Thu Dec 15 06:01:10 2016 +0100 kref: prefer atomic_inc_not_zero to atomic_add_unless On most platforms, there exists this ifdef: #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) This makes this patch functionally useless. However, on PPC, there is actually an explicit definition of atomic_inc_not_zero with its own assembly that is slightly more optimized than atomic_add_unless. So, this patch changes kref to use atomic_inc_not_zero instead, for PPC and any future platforms that might provide an explicit implementation. This also puts this usage of kref more in line with a verbatim reading of the examples in Paul McKenney's paper [1] in the section titled "2.4 Atomic Counting With Check and Release Memory Barrier", which uses atomic_inc_not_zero. [1] http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2167.pdf Signed-off-by: Jason A. Donenfeld Reviewed-by: Thomas Hellstrom Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161215050110.3241-1-Jason@zx2c4.com include/linux/kref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14d37564fa3dc4e5d4c6828afcd26ac14e6796c5 Author: Dan Carpenter Date: Wed Dec 14 08:02:03 2016 -0600 GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next This patch fixes a place where function gfs2_glock_iter_next can reference an invalid error pointer. Signed-off-by: Dan Carpenter Signed-off-by: Bob Peterson fs/gfs2/glock.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit c02f39ac00a66a75e55f84acdd7939cb37709085 Author: Ville Syrjälä Date: Thu Dec 15 19:01:28 2016 +0200 drm: Fix kernel docs for drm_helper_mode_fill_fb_struct() drm_modeset_helper.c:74: warning: No description found for parameter 'dev' Cc: Laurent Pinchart Cc: Alex Deucher Fixes: a3f913ca9892 ("drm: Pass 'dev' to drm_helper_mode_fill_fb_struct()") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161215170128.23972-1-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher Reviewed-by: Laurent Pinchart drivers/gpu/drm/drm_modeset_helper.c | 1 + 1 file changed, 1 insertion(+) commit c2e51ac3d0542440d5b2b8b52ff2ad00751af4da Author: Geert Uytterhoeven Date: Mon Sep 12 22:50:41 2016 +0200 spi: core: Extract of_spi_parse_dt() Extract the parsing of SPI slave-specific properties into its own function, so it can be reused later for SPI slave controllers. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi.c | 60 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 24 deletions(-) commit 99b04f4c4051f71bc0665a66e11b8fbed17c8958 Author: Kuninori Morimoto Date: Thu Dec 15 08:41:38 2016 +0000 ASoC: add Component level pcm_new/pcm_free In current ALSA SoC, Platform only has pcm_new/pcm_free feature, but it should be supported on Component level. This patch adds it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 6 ++++++ sound/soc/soc-core.c | 21 +++++++++++++++++++++ sound/soc/soc-pcm.c | 32 +++++++++++++++++++++++--------- 3 files changed, 50 insertions(+), 9 deletions(-) commit 98cf9965c09fc3fe6d8bd9760dba1dec53e387cc Author: Richard Fitzgerald Date: Thu Dec 15 14:43:49 2016 +0000 regulator: arizona-micsupp: Use SoC component pin control functions The name of a codec pin can have an optional prefix string, which is defined by the SoC machine driver. The snd_soc_dapm_x_pin functions take the fully-specified name including the prefix and so the existing code would fail to find the pin if the audio machine driver had added a prefix. Switch to using the snd_soc_component_x_pin equivalent functions that take a specified SoC component and automatically add the name prefix to the provided pin name. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 98856d5ad89c4bb13544b1f1367a4d8355296a2d Author: Corentin Labbe Date: Thu Dec 15 16:19:43 2016 +0100 ASoC: wm0010: Remove unneeded linux/miscdevice.h include sound/soc/codecs/wm0010.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Acked-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 1 - 1 file changed, 1 deletion(-) commit df3b5733496f7c375fcb200a5a82b7d89d75cfd1 Author: Corentin Labbe Date: Thu Dec 15 16:23:02 2016 +0100 ASoC: rt5677: Remove unneeded linux/miscdevice.h include sound/soc/codecs/rt5677-spi.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Mark Brown sound/soc/codecs/rt5677-spi.c | 1 - 1 file changed, 1 deletion(-) commit e98aa526b4c5eb322b1334b1d7f7051851ed037c Author: Corentin Labbe Date: Thu Dec 15 16:23:01 2016 +0100 ASoC: rt5514-spi: Remove unneeded linux/miscdevice.h include sound/soc/codecs/rt5514-spi.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 1 - 1 file changed, 1 deletion(-) commit d9a5bb2d7fda57bc21ea919e087f6f01dc3d006c Author: Maarten Lankhorst Date: Thu Dec 15 15:29:42 2016 +0100 drm/atomic: Delete wrong comment. drm_atomic_state_put is called unconditionally, so TEST_ONLY is no different from commit. Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481812185-19098-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 4 ---- 1 file changed, 4 deletions(-) commit 20c9ca4fda321ca2a2fbd3be53d2d271f74f7b97 Author: Thierry Reding Date: Thu Dec 15 12:36:02 2016 +0100 drm: Fix typo in drm_event_reserve_init() kerneldoc drm_event_reserve_init_locked() is the correct function to call when already holding the dev->event_lock lock. Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161215113602.27966-1-thierry.reding@gmail.com drivers/gpu/drm/drm_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffb9c3698d18eeb6c25f02d92e5234625416b1fa Author: Ville Syrjälä Date: Thu Dec 15 16:29:27 2016 +0200 drm/cma: Fix compile fail due to fomat->format typo Apparently my arm .config had reverted to CMA=n at some point, so I failed to notice that I typoed the code. Fix it up so that the cma helper will compile again. Reported-by: kbuild test robot Cc: Laurent Pinchart Fixes: ca984a998ad3 ("drm/fb_cma_helper: Replace drm_format_info() with fb->format") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161215142927.20761-1-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c2a769de7955ff81818b49d388dd771bf6ae29d Author: Marcelo Tosatti Date: Wed Dec 14 15:08:37 2016 -0200 Documentation, x86, resctrl: Recommend locking for resctrlfs Concurrent write or read/write access from applications to the resctrlfs directory can result in incorrect readouts or setups. Recommend a standard locking scheme for applications to use. Signed-off-by: Marcelo Tosatti Cc: Fenghua Yu Link: http://lkml.kernel.org/r/20161214170835.GA16924@amt.cnet Signed-off-by: Thomas Gleixner Documentation/x86/intel_rdt_ui.txt | 114 +++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 2bf0d26706f899e124a2b340dc0529386bb2b235 Author: Tvrtko Ursulin Date: Tue Dec 13 14:37:27 2016 +0000 drm/i915: Optimise VMA lookup slightly Cast VM pointers before substraction to save the compiler doing a smart one which includes multiplication. v2: Only keep the first optimisation and prettify it. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481639847-9214-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_vma.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 604788ae480dae8dc21ff976b0daae0d436c4be7 Author: Ville Syrjälä Date: Fri Nov 18 21:53:11 2016 +0200 drm: Eliminate the useless "non-RGB fb" debug message No point in spamming the log whenever a non-RGB fb is being constructed. And since there's nothing to do anymore that fb->bits_per_pixel and fb->depth are gone, we can just kill off this entire piece of code. Cc: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-36-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/drm_modeset_helper.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit dbd4d5761e1f06fd86abe0b256e049b501cea059 Author: Ville Syrjälä Date: Fri Nov 18 21:53:10 2016 +0200 drm: Replace 'format->format' comparisons to just 'format' comparisons Rather than compare the format u32s of two format infos, we can direclty compare the format info pointers themselves. Noramlly all the ->format pointers all point to somwehere in the big array, so this is a valid way to test for equality. Also drivers may want to point ->format at a private format info struct instead (eg. for special compressed formats with extra planes), so just comparing the pixel format values wouldn't necessaritly even work. But comparing the pointers will also take care of that case. @@ struct drm_framebuffer *a; struct drm_framebuffer *b; @@ ( - a->format->format != b->format->format + a->format != b->format | - a->format->format == b->format->format + a->format == b->format ) @@ struct drm_plane_state *a; struct drm_plane_state *b; @@ ( - a->fb->format->format != b->fb->format->format + a->fb->format != b->fb->format | - a->fb->format->format == b->fb->format->format + a->fb->format == b->fb->format ) @@ struct drm_crtc *crtc; struct drm_framebuffer *x; @@ ( - crtc->primary->fb->format->format != x->format->format + crtc->primary->fb->format != x->format | - x->format->format != crtc->primary->fb->format->format + x->format != crtc->primary->fb->format ) @@ struct drm_mode_set *set; @@ - set->fb->format->format != set->crtc->primary->fb->format->format + set->fb->format != set->crtc->primary->fb->format Cc: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-35-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 3 +-- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/imx/ipuv3-plane.c | 6 +++--- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) commit 438b74a5497c36d6d59baded434002e30267cabe Author: Ville Syrjälä Date: Wed Dec 14 23:32:55 2016 +0200 drm: Nuke fb->pixel_format Replace uses of fb->pixel_format with fb->format->format. Less duplicated information is a good thing. Note that coccinelle failed to eliminate the "/* fourcc format */" comment from drm_framebuffer.h, so I had to do that part manually. @@ struct drm_framebuffer *FB; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ i9xx_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ ironlake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ skylake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *a; struct drm_framebuffer b; @@ ( - a->pixel_format + a->format->format | - b.pixel_format + b.format->format ) @@ struct drm_plane_state *a; struct drm_plane_state b; @@ ( - a->fb->pixel_format + a->fb->format->format | - b.fb->pixel_format + b.fb->format->format ) @@ struct drm_crtc *CRTC; @@ ( - CRTC->primary->fb->pixel_format + CRTC->primary->fb->format->format | - CRTC->primary->state->fb->pixel_format + CRTC->primary->state->fb->format->format ) @@ struct drm_mode_set *set; @@ ( - set->fb->pixel_format + set->fb->format->format | - set->crtc->primary->fb->pixel_format + set->crtc->primary->fb->format->format ) @@ @@ struct drm_framebuffer { ... - uint32_t pixel_format; ... }; v2: Fix commit message (Laurent) Rebase due to earlier removal of many fb->pixel_format uses, including the 'fb->format = drm_format_info(fb->format->format);' snafu v3: Adjusted the semantic patch a bit and regenerated due to code changes Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher (v1) Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +-- drivers/gpu/drm/arc/arcpgu_crtc.c | 2 +- drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 8 +++--- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/armada/armada_overlay.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 18 ++++++------- drivers/gpu/drm/drm_atomic.c | 6 ++--- drivers/gpu/drm/drm_crtc.c | 4 +-- drivers/gpu/drm/drm_crtc_helper.c | 4 +-- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_modeset_helper.c | 1 - drivers/gpu/drm/drm_plane.c | 6 ++--- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 8 +++--- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 4 +-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 6 ++--- drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- drivers/gpu/drm/i915/intel_atomic_plane.c | 4 +-- drivers/gpu/drm/i915/intel_display.c | 33 +++++++++++------------- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 10 ++++---- drivers/gpu/drm/i915/intel_sprite.c | 12 ++++----- drivers/gpu/drm/imx/ipuv3-plane.c | 34 ++++++++++++------------- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +- drivers/gpu/drm/meson/meson_plane.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 8 +++--- drivers/gpu/drm/nouveau/nv50_display.c | 4 +-- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/radeon/atombios_crtc.c | 8 +++--- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +-- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 18 ++++++------- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 6 ++--- drivers/gpu/drm/shmobile/shmob_drm_plane.c | 4 +-- drivers/gpu/drm/sti/sti_gdp.c | 8 +++--- drivers/gpu/drm/sti/sti_hqvdp.c | 2 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 3 ++- drivers/gpu/drm/tegra/dc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 4 +-- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- drivers/gpu/drm/zte/zx_plane.c | 2 +- include/drm/drm_framebuffer.h | 4 --- 54 files changed, 145 insertions(+), 151 deletions(-) commit 272725c7db4da1fd3229d944fc76d2e98e3a144e Author: Ville Syrjälä Date: Wed Dec 14 23:32:20 2016 +0200 drm: Nuke fb->bits_per_pixel Replace uses of fb->bits_per_pixel with fb->format->cpp[0]*8. Less duplicated information is a good thing. Note that I didn't put parens around the cpp*8 in the below cocci script, on account of not wanting spurious parens all over the place. Instead I did the unsafe way, and tried to look over the entire diff to spot if any dangerous expressions were produced. I didn't see any. There are some cases where previously the code did X*bpp/8, so the division happened after the multiplication. Those are now just X*cpp so the division effectively happens before the multiplication, but that is perfectly fine since bpp is always a multiple of 8. @@ struct drm_framebuffer *FB; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - FB->bits_per_pixel = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ i9xx_get_initial_plane_config(...) { ... - FB->bits_per_pixel = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ ironlake_get_initial_plane_config(...) { ... - FB->bits_per_pixel = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ skylake_get_initial_plane_config(...) { ... - FB->bits_per_pixel = E; ... } @@ struct drm_framebuffer FB; expression E; @@ ( - E * FB.bits_per_pixel / 8 + E * FB.format->cpp[0] | - FB.bits_per_pixel / 8 + FB.format->cpp[0] | - E * FB.bits_per_pixel >> 3 + E * FB.format->cpp[0] | - FB.bits_per_pixel >> 3 + FB.format->cpp[0] | - (FB.bits_per_pixel + 7) / 8 + FB.format->cpp[0] | - FB.bits_per_pixel + FB.format->cpp[0] * 8 | - FB.format->cpp[0] * 8 != 8 + FB.format->cpp[0] != 1 ) @@ struct drm_framebuffer *FB; expression E; @@ ( - E * FB->bits_per_pixel / 8 + E * FB->format->cpp[0] | - FB->bits_per_pixel / 8 + FB->format->cpp[0] | - E * FB->bits_per_pixel >> 3 + E * FB->format->cpp[0] | - FB->bits_per_pixel >> 3 + FB->format->cpp[0] | - (FB->bits_per_pixel + 7) / 8 + FB->format->cpp[0] | - FB->bits_per_pixel + FB->format->cpp[0] * 8 | - FB->format->cpp[0] * 8 != 8 + FB->format->cpp[0] != 1 ) @@ struct drm_plane_state *state; expression E; @@ ( - E * state->fb->bits_per_pixel / 8 + E * state->fb->format->cpp[0] | - state->fb->bits_per_pixel / 8 + state->fb->format->cpp[0] | - E * state->fb->bits_per_pixel >> 3 + E * state->fb->format->cpp[0] | - state->fb->bits_per_pixel >> 3 + state->fb->format->cpp[0] | - (state->fb->bits_per_pixel + 7) / 8 + state->fb->format->cpp[0] | - state->fb->bits_per_pixel + state->fb->format->cpp[0] * 8 | - state->fb->format->cpp[0] * 8 != 8 + state->fb->format->cpp[0] != 1 ) @@ @@ - (8 * 8) + 8 * 8 @@ struct drm_framebuffer FB; @@ - (FB.format->cpp[0]) + FB.format->cpp[0] @@ struct drm_framebuffer *FB; @@ - (FB->format->cpp[0]) + FB->format->cpp[0] @@ @@ struct drm_framebuffer { ... - int bits_per_pixel; ... }; v2: Clean up the 'cpp*8 != 8' and '(8 * 8)' cases (Laurent) v3: Adjusted the semantic patch a bit and regenerated due to code changes Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Reviewed-by: Alex Deucher (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1481751140-18352-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/ast/ast_fb.c | 2 +- drivers/gpu/drm/ast/ast_mode.c | 9 +++++---- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +- drivers/gpu/drm/cirrus/cirrus_mode.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 8 ++++---- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_modeset_helper.c | 3 --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++-- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 6 +++--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 4 ++-- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/gma500/gma_display.c | 4 ++-- drivers/gpu/drm/gma500/mdfld_intel_display.c | 6 +++--- drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 ++-- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 6 +++--- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 11 ++++------- drivers/gpu/drm/i915/intel_fbdev.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/qxl/qxl_draw.c | 2 +- drivers/gpu/drm/radeon/atombios_crtc.c | 11 ++++++----- drivers/gpu/drm/radeon/r100.c | 4 ++-- drivers/gpu/drm/radeon/radeon_display.c | 6 +++--- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 14 +++++++------- drivers/gpu/drm/tegra/dc.c | 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/udl/udl_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_fb.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 +- include/drm/drm_framebuffer.h | 7 ------- 44 files changed, 90 insertions(+), 101 deletions(-) commit b00c600e91531df00aaa551049382416c4db745d Author: Ville Syrjälä Date: Wed Dec 14 23:31:35 2016 +0200 drm: Nuke fb->depth Replace uses of fb->depth with fb->format->depth. Less duplicate information is a good thing. @@ struct drm_framebuffer *fb; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - fb->depth = E; ... } @@ struct nouveau_framebuffer *fb; @@ - fb->base.depth + fb->base.format->depth @@ struct drm_framebuffer fb; @@ - fb.depth + fb.format->depth @@ struct drm_framebuffer *fb; @@ - fb->depth + fb->format->depth @@ struct drm_framebuffer fb; @@ - (fb.format->depth) + fb.format->depth @@ struct drm_framebuffer *fb; @@ - (fb->format->depth) + fb->format->depth @@ @@ struct drm_framebuffer { ... - unsigned int depth; ... }; v2: Drop the vmw stuff (Daniel) Rerun spatch due to code changes Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Reviewed-by: Alex Deucher Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- drivers/gpu/drm/armada/armada_fbdev.c | 3 ++- drivers/gpu/drm/ast/ast_fb.c | 2 +- drivers/gpu/drm/bochs/bochs_fbdev.c | 2 +- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 4 ++-- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_modeset_helper.c | 2 -- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/gma500/accel_2d.c | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/gma500/gma_display.c | 2 +- drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 +- drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 6 +++--- drivers/gpu/drm/msm/msm_fbdev.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 12 ++++++------ drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 ++- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/qxl/qxl_fb.c | 5 +++-- drivers/gpu/drm/radeon/radeon_fb.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 5 +++-- drivers/gpu/drm/tegra/drm.c | 3 ++- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/udl/udl_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_fb.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 5 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 5 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +- include/drm/drm_framebuffer.h | 6 ------ 36 files changed, 56 insertions(+), 57 deletions(-) commit 145fcb115052c31f9aa5bed0ae9f9c4dd51b49ae Author: Ville Syrjälä Date: Fri Nov 18 21:53:06 2016 +0200 drm/i915: Use drm_framebuffer_plane_{width,height}() where possible Replace drm_format_plane_{width,height}() usage with drm_framebuffer_plane_{width,height}() to avoid the lookup of the format info. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-31-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8f8f6a6c3cbe14406780a90e89d7d8742493913c Author: Ville Syrjälä Date: Fri Nov 18 21:53:05 2016 +0200 drm: Add drm_framebuffer_plane_{width,height}() Add variants of drm_format_plane_{width,height}() that take an entire fb object instead of just the format. These should be more efficent as they can just look up the format info from the fb->format pointer rather than having to look it up (using a linear search based on the format). Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_framebuffer.c | 44 +++++++++++++++++++++++++++++++++++++++ include/drm/drm_framebuffer.h | 6 ++++++ 2 files changed, 50 insertions(+) commit 801c8fe8319582e424f44d07e8e511b1bf41cb35 Author: Ville Syrjälä Date: Fri Nov 18 21:53:04 2016 +0200 drm/i915: Store a pointer to the pixel format info for fbc Rather than store the pixel format and look up the format info as needed, let's just store a pointer to the format info directly and speed up our lookups. Cc: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-29-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/intel_fbc.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 9857ecbe516954fb563f15f5353937796c8cfb53 Author: Ville Syrjälä Date: Fri Nov 18 21:53:03 2016 +0200 drm/nouveau: Use fb->format rather than drm_format_info() Let's use the pointer to the format information cached under drm_framebuffer rather than look it up manually. Cc: Ben Skeggs Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-28-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/nouveau/nv50_display.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit ca984a998ad3a3b6bf8bf0d89861a6537551aaf2 Author: Ville Syrjälä Date: Fri Nov 18 21:53:02 2016 +0200 drm/fb_cma_helper: Replace drm_format_info() with fb->format Get the format information via the neat fb->format pointer rather than doing a linear search over all the format info structures. Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-27-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_fb_cma_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 353c859899635ea911f6476a0194c7a32c0c09c2 Author: Ville Syrjälä Date: Wed Dec 14 23:30:57 2016 +0200 drm: Replace drm_format_plane_cpp() with fb->format->cpp[] Replace drm_format_plane_cpp(fb->pixel_format) with just fb->format->cpp[]. Avoids the expensive format info lookup. @@ struct drm_framebuffer *a; struct drm_framebuffer b; expression E; @@ ( - drm_format_plane_cpp(a->pixel_format, E) + a->format->cpp[E] | - drm_format_plane_cpp(b.pixel_format, E) + b.format->cpp[E] ) @@ struct drm_plane_state *a; struct drm_plane_state b; expression E; @@ ( - drm_format_plane_cpp(a->fb->pixel_format, E) + a->fb->format->cpp[E] | - drm_format_plane_cpp(b.fb->pixel_format, E) + b.fb->format->cpp[E] ) @@ struct drm_framebuffer *a; identifier T; expression E; @@ T = a->pixel_format <+... - drm_format_plane_cpp(T, E) + a->format->cpp[E] ...+> @@ struct drm_framebuffer b; identifier T; expression E; @@ T = b.pixel_format <+... - drm_format_plane_cpp(T, E) + b.format->cpp[E] ...+> v2: Rerun spatch due to code changes Cc: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1481751057-18123-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +- drivers/gpu/drm/armada/armada_crtc.c | 3 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 16 +++++----- drivers/gpu/drm/i915/intel_pm.c | 42 ++++++++++++------------- drivers/gpu/drm/i915/intel_sprite.c | 2 +- drivers/gpu/drm/imx/ipuv3-plane.c | 6 ++-- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 +-- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- drivers/gpu/drm/zte/zx_plane.c | 2 +- 15 files changed, 45 insertions(+), 46 deletions(-) commit 8305494e1ee938c96e15361b01fe15c3f4fc0d76 Author: Ville Syrjälä Date: Fri Nov 18 21:53:00 2016 +0200 drm/i915: Eliminate the ugly 'fb?:' constructs from the ilk/skl wm code Don't access plane_state->fb until we know the plane to be visible. It it's visible, it will have an fb, and thus we don't have to consider the NULL fb case. Makes the code look nicer. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-25-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_pm.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit bcb0b461454c9cb3b5804cf75bacaadb52348864 Author: Ville Syrjälä Date: Wed Dec 14 23:30:22 2016 +0200 drm: Replace drm_format_num_planes() with fb->format->num_planes Replace drm_format_num_planes(fb->pixel_format) with just fb->format->num_planes. Avoids the expensive format info lookup. @@ struct drm_framebuffer *a; struct drm_framebuffer b; @@ ( - drm_format_num_planes(a->pixel_format) + a->format->num_planes | - drm_format_num_planes(b.pixel_format) + b.format->num_planes ) @@ struct drm_plane_state *a; struct drm_plane_state b; @@ ( - drm_format_num_planes(a->fb->pixel_format) + a->fb->format->num_planes | - drm_format_num_planes(b.fb->pixel_format) + b.fb->format->num_planes ) @@ struct drm_framebuffer *a; identifier T; @@ T = a->pixel_format <+... - drm_format_num_planes(T) + a->format->num_planes ...+> @@ struct drm_framebuffer b; identifier T; @@ T = b.pixel_format <+... - drm_format_num_planes(T) + b.format->num_planes ...+> v2: Rerun spatch due to code changes Cc: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1481751022-18015-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/arm/malidp_planes.c | 2 +- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/armada/armada_overlay.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 8 ++++---- drivers/gpu/drm/omapdrm/omap_fb.c | 8 ++++---- drivers/gpu/drm/tegra/dc.c | 4 ++-- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) commit 570cec3244447f21f5b24c3a75151b4166e30d95 Author: Ville Syrjälä Date: Fri Nov 18 21:52:58 2016 +0200 drm: Reject fbs w/o format info in drm_framebuffer_init() Any framebuffer that doesn't have proper format information when drm_framebuffer_init() is called is a bug. Let's warn and return an error to avoid oopsing the kernel later due to dereferencing the NULL fb->format pointer. Cc: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-23-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/drm_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f3f4763c1ba9348984ed67aa60a16c86a9dab1c Author: Ville Syrjälä Date: Fri Nov 18 21:52:57 2016 +0200 drm/i915: Populate fb->format early for inherited fbs Make sure the framebuffer format info is available as early as possible for fbs we inherit from the BIOS. This will allow us to use the fb as if it was fully formed before we register it. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-22-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) commit e14c23c647abfc1fed96a55ba376cd9675a54098 Author: Ville Syrjälä Date: Fri Nov 18 21:52:55 2016 +0200 drm: Store a pointer to drm_format_info under drm_framebuffer To avoid having to look up the format information struct every time, let's just store a pointer to it under drm_framebuffer. v2: Don't populate the fb->format pointer in drm_framebuffer_init(). instead we'll treat a NULL format as an error later Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-20-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/drm_modeset_helper.c | 1 + include/drm/drm_framebuffer.h | 4 ++++ 2 files changed, 5 insertions(+) commit 95bce76015819e546528c13fe25d31771427c9d5 Author: Ville Syrjälä Date: Fri Nov 18 21:52:54 2016 +0200 drm: Populate fb->dev from drm_helper_mode_fill_fb_struct() Populating fb->dev before drm_framebuffer_init() allows us to use fb->dev already while validating the framebuffer. Let's have drm_helper_mode_fill_fb_struct() do that for us. Also make drm_framebuffer_init() warn us if a different device pointer is passed to it than was passed to drm_helper_mode_fill_fb_struct(). v2: Reject fbs with invalid fb->dev (Laurent) Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Reviewed-by: Alex Deucher (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-19-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_framebuffer.c | 5 ++++- drivers/gpu/drm/drm_modeset_helper.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit d2e9f5fcc646d3b2e41cfef79b3c8e720d28e230 Author: Ville Syrjälä Date: Fri Nov 18 21:52:53 2016 +0200 drm/i915: Set fb->dev early on for inherited fbs We want the fbs inherited from the BIOS to be more or less fully working prior to actually registering them. This will allow us to just pass the fb to various helper function instead of having to pass all the different parameters separately. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-18-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d020467a1c2f79a3efa3eeefcebdfdda2c1c625 Author: Ville Syrjälä Date: Fri Nov 18 21:52:52 2016 +0200 drm/virtio: Call drm_helper_mode_fill_fb_struct() before drm_framebuffer_init() We want framebuffers to be mostly useable already before drm_framebuffer_init() get called, and so we will start demanding that all the interesting format/size/etc. information be filled in before drm_framebuffer_init(). drm_helper_mode_fill_fb_struct() will do that for us, so let's make sure it gets called before drm_framebuffer_init(). Cc: Dave Airlie Cc: Gerd Hoffmann Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-17-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/virtio/virtgpu_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5360943f05722e4e2a95ce3b9f4661d3e74f8aba Author: Ville Syrjälä Date: Fri Nov 18 21:52:51 2016 +0200 drm/qxl: Call drm_helper_mode_fill_fb_struct() before drm_framebuffer_init() We want framebuffers to be mostly useable already before drm_framebuffer_init() is called, and so we will start demanding that all the interesting format/size/etc. information be filled in before drm_framebuffer_init(). drm_helper_mode_fill_fb_struct() will do that for us, so let's make sure it gets called before drm_framebuffer_init(). Cc: Dave Airlie Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-16-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4e4e9893964684397dec517debe77cb7e405a6c Author: Jeeja KP Date: Thu Dec 8 13:41:15 2016 +0530 ASoC: Intel: Skylake: Removed unused skl_get_format() Removed the unused function skl_get_format as the format is calculated directly using the HDA core API. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit ad036bdee57ab2287535fe53864bb5154e101991 Author: Jeeja KP Date: Thu Dec 8 13:41:13 2016 +0530 ASoC: Intel: Skylake: Add helper function to setup host/link dma This patch adds helper function to configure the host/link DMA when the DMA is in decoupled mode. Next patch adds the usage of this helper routines for configuring DMA in Mixer event handler. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 74 ++++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-topology.h | 4 ++ 2 files changed, 78 insertions(+) commit bb704a737cecc1c4c9f1b0251aa79d8276308ccc Author: Jeeja KP Date: Thu Dec 8 13:41:14 2016 +0530 ASoC: Intel: Skylake: Configure DMA in PRE_PMD handler of Mixer If system is suspended when PCM was paused/stopped, restart doesn't configure DMA as it is we are in Pause state and results in IO error eventually. Configure host/link DMA before initializing DSP Gateway copier module instead of DAI prepare(). So moved DMA configuration to mixer PRE_PMD widget handler instead of DAI prepare. This uses previously added new API to do the configuration and removes old DAI prepare code. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 50 +--------------------------------- sound/soc/intel/skylake/skl-topology.c | 19 +++++++++++++ 2 files changed, 20 insertions(+), 49 deletions(-) commit 12c3be0e720fe8c4e0f456fd25a6dcc8b254606c Author: Jeeja KP Date: Thu Dec 8 13:41:12 2016 +0530 ASoC: Intel: Skylake: Update link_index and format in pipe params To configure Host/Link DMA, additionally link index and format are required based on the hw params. So added these parameters in the pipe params and in hw_params the pipe params are updated. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 8 ++++++++ sound/soc/intel/skylake/skl-topology.c | 2 ++ sound/soc/intel/skylake/skl-topology.h | 2 ++ 3 files changed, 12 insertions(+) commit ca8c7f233fa2c40e2a23f982dc33d947f28ad207 Author: Peter Rosin Date: Tue Dec 6 20:22:37 2016 +0100 ASoC: atmel: tse850: rely on the ssc to register as a cpu dai by itself This breaks devicetree compatibility, but in this case that is ok. All affected units are either on my desk, or running an even older version of the driver that is not compatible with the upstreamed version anyway (and when these other units are eventually updated, they will get a fresh dtb as well, so that is not a significant problem either). All of that is of course assuming that noone else has managed to build something that can use this driver, but that seems extremely improbable. Signed-off-by: Peter Rosin Acked-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/axentia,tse850-pcm5142.txt | 11 ++++++++--- sound/soc/atmel/tse850-pcm5142.c | 23 +++------------------- 2 files changed, 11 insertions(+), 23 deletions(-) commit e8314d7d53c8b050aac2828a5de5f28a997b468b Author: Peter Rosin Date: Tue Dec 6 20:22:36 2016 +0100 misc: atmel-ssc: register as sound DAI if #sound-dai-cells is present The SSC is currently not usable with the ASoC simple-audio-card, as every SSC audio user has to build a platform driver that may do as little as calling atmel_ssc_set_audio/atmel_ssc_put_audio (which allocates the SSC and registers a DAI with the ASoC subsystem). So, have that happen automatically, if the #sound-dai-cells property is present in devicetree, which it has to be anyway for simple audio card to work. Signed-off-by: Peter Rosin Acked-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Mark Brown .../devicetree/bindings/misc/atmel-ssc.txt | 2 + drivers/misc/atmel-ssc.c | 50 ++++++++++++++++++++++ include/linux/atmel-ssc.h | 1 + 3 files changed, 53 insertions(+) commit a3f913ca98925d7e5bae725e9b2b38408215a695 Author: Ville Syrjälä Date: Wed Dec 14 22:48:59 2016 +0200 drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() Pass the drm_device to drm_helper_mode_fill_fb_struct() so that we can populate fb->dev early. Will make it easier to use the fb before we register it. @@ identifier fb, mode_cmd; @@ void drm_helper_mode_fill_fb_struct( + struct drm_device *dev, struct drm_framebuffer *fb, const struct drm_mode_fb_cmd2 *mode_cmd ); @@ identifier fb, mode_cmd; @@ void drm_helper_mode_fill_fb_struct( + struct drm_device *dev, struct drm_framebuffer *fb, const struct drm_mode_fb_cmd2 *mode_cmd ) { ... } @@ function func; identifier dev; expression E1, E2; @@ func(struct drm_device *dev, ...) { ... drm_helper_mode_fill_fb_struct( + dev, E1, E2); ... } @@ expression E1, E2; @@ drm_helper_mode_fill_fb_struct( + dev, E1, E2); v2: Rerun spatch due to code changes Signed-off-by: Ville Syrjälä Reviewed-by: Laurent Pinchart Reviewed-by: Alex Deucher Link: http://patchwork.freedesktop.org/patch/msgid/1481748539-18283-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/ast/ast_main.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_main.c | 2 +- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_modeset_helper.c | 3 ++- drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/qxl/qxl_display.c | 2 +- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/udl/udl_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++-- include/drm/drm_modeset_helper.h | 3 ++- 24 files changed, 27 insertions(+), 25 deletions(-) commit af4b654f9fa87cf66a06f4841074b6738ed58606 Author: Alexander Shiyan Date: Tue Dec 13 13:56:19 2016 +0300 ASoC: wm8753: Add control to allow swapping HiFi DAC channels This patch adds a control to allow swapping HiFi DAC Left/Right channels. Signed-off-by: Alexander Shiyan Signed-off-by: Mark Brown sound/soc/codecs/wm8753.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 409c69be433b819c924a8d1c457a835bc6d51700 Author: Krzysztof Kozlowski Date: Sat Dec 10 11:51:11 2016 +0200 ASoC: samsung: Remove tests of member address The driver was checking for non-NULL address of struct's members: - s3c_audio_pdata->type (union), - s3c_audio_pdata->type.i2s (embedded struct). This is pointless as these will be always non-NULL. The 's3c_audio_pdata' is always initialized in static memory so it will be zeroed. Additionally the 'type' member was an union with only one member. It is safe to reorganize the structures to get rid of useless union and checks for addresses to fix the coccinelle warning: >> sound/soc/samsung/i2s.c:1270:2-4: ERROR: test of a variable/field address Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Mark Brown arch/arm/mach-s3c64xx/dev-audio.c | 4 +--- include/linux/platform_data/asoc-s3c.h | 6 ++---- sound/soc/samsung/i2s.c | 10 ++-------- 3 files changed, 5 insertions(+), 15 deletions(-) commit 0223f500aa39a2b6df00af212da736232705be3e Author: Fabian Frederick Date: Fri Dec 9 19:13:26 2016 +0100 ASoC: samsung: add GPIOLIB dependency Both SND_SOC_SMARTQ and SND_SOC_SAMSUNG_TM2_WM5110 use gpio/consumer.h This patch adds GPIOLIB || COMPILE_TEST to Kconfig entries to fix runtime dependency. See commit 638f958baeaf ("extcon: Allow compile test of GPIO consumers if !GPIOLIB") for similar problem and explanations. Reviewed-by: Krzysztof Kozlowski Reported-by: Krzysztof Kozlowski Signed-off-by: Fabian Frederick Signed-off-by: Mark Brown sound/soc/samsung/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 5d079fdc12ffe1f939890035f5172374b5c0f2be Author: Fabian Frederick Date: Fri Dec 9 19:12:50 2016 +0100 ASoC: samsung: include gpio consumer.h Fix the following build errors on X86_32 !GPIOLIB sound/soc/samsung/tm2_wm5110.c:220:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] sound/soc/samsung/tm2_wm5110.c:438:24: error: implicit declaration of function 'devm_gpiod_get' [-Werror=implicit-function-declaration] Reviewed-by: Krzysztof Kozlowski Signed-off-by: Fabian Frederick Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 1 + 1 file changed, 1 insertion(+) commit c7f87f96e384b7ecc41a6c0c8c397e095284ede0 Author: Axel Lin Date: Fri Dec 9 16:56:24 2016 +0800 ASoC: rt5665: Make SND_SOC_RT5665 entry sort in Kconfig and Makefile Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 10 +++++----- sound/soc/codecs/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 6c2494f385958f5d8cdb5cb26507b7f47d498502 Author: Vinod Koul Date: Thu Dec 8 23:01:37 2016 +0530 ASoC: zx296702-i2s: remove unused ‘format’ In zx_i2s_hw_params(), 'format' is initialized and assigned bits based on params_format, but never used. So remove it. sound/soc/zte/zx296702-i2s.c: In function ‘zx_i2s_hw_params’: sound/soc/zte/zx296702-i2s.c:228:21: warning: variable ‘format’ set but not used [-Wunused-but-set-variable] unsigned long val, format; Signed-off-by: Vinod Koul Acked-by: Jun Nie Signed-off-by: Mark Brown sound/soc/zte/zx-i2s.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e85a709974db40779f5942ed81e9262c62179863 Author: Vinod Koul Date: Thu Dec 8 23:01:36 2016 +0530 ASoC: samsung: smdk_wm8580: remove unused ‘bfs’ In smdk_hw_params(), 'bfs' is initialized and assigned bits based on params_width, but never used. We could have removed the whole switch case but then driver might be relying on checking bits, so I have kept the case for now. sound/soc/samsung/smdk_wm8580.c: In function ‘smdk_hw_params’: sound/soc/samsung/smdk_wm8580.c:35:6: warning: variable ‘bfs’ set but not used [-Wunused-but-set-variable] int bfs, rfs, ret; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8580.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7d7c80f3f335e5148e3f744534a0576e638cf581 Author: Vinod Koul Date: Thu Dec 8 23:01:35 2016 +0530 ASoC: Intel: sst: remove unused ‘ret_val’ In sst_media_close(), 'ret_val' is initialized and assigned as return value of stream ops close but never used. So remove it. ound/soc/intel/atom/sst-mfld-platform-pcm.c: In function ‘sst_media_close’: sound/soc/intel/atom/sst-mfld-platform-pcm.c:360:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable] int ret_val = 0, str_id; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst-mfld-platform-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfe48dffc80e530d5e61efcbf03637493c5ffc0e Author: Vinod Koul Date: Thu Dec 8 23:01:34 2016 +0530 ASoC: img: remove unused ‘format’ In img_prl_out_hw_params(), 'format' is initialized but never used. So remove it. sound/soc/img/img-parallel-out.c: In function ‘img_prl_out_hw_params’: sound/soc/img/img-parallel-out.c:126:19: warning: variable ‘format’ set but not used [-Wunused-but-set-variable] snd_pcm_format_t format; Cc: Damien.Horsley Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/img/img-parallel-out.c | 2 -- 1 file changed, 2 deletions(-) commit fc25914631d623880b5fc3abf067bcb3e8c6b4d4 Author: Vinod Koul Date: Thu Dec 8 23:01:33 2016 +0530 ASoC: pcm3168a: remove unused ‘format’ In pcm3168a_hw_params(), 'format' is initialized but never used. sound/soc/codecs/pcm3168a.c: In function ‘pcm3168a_hw_params’: sound/soc/codecs/pcm3168a.c:405:19: warning: variable ‘format’ set but not used [-Wunused-but-set-variable] snd_pcm_format_t format; Cc: Damien.Horsley Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 2 -- 1 file changed, 2 deletions(-) commit 9fe78b2888ad8bf52536658835c794483e4ac8da Author: Vinod Koul Date: Thu Dec 8 23:01:32 2016 +0530 ASoC: max9867: remove unused ‘ret’ In max9867_dai_set_fmt(), 'ret' is initialized as return value of regmap_raw_write() but never checked, so remove this and assignement. sound/soc/codecs/max9867.c: In function ‘max9867_dai_set_fmt’: sound/soc/codecs/max9867.c:312:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1d00734806d6125269d0acf1b88aa6f7c7402ba2 Author: Vinod Koul Date: Thu Dec 8 23:01:31 2016 +0530 ASoC: adau17x1: remove unused ‘ret’ In adau17x1_pll_event(), 'ret' is initialized as return value of regmap_raw_write() but never checked, so remove this and assignement. sound/soc/codecs/adau17x1.c: In function ‘adau17x1_pll_event’: sound/soc/codecs/adau17x1.c:68:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; Cc: Lars-Peter Clausen Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/adau17x1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 30cd849771b56b2b71fe7ec5f090b86513a14b6d Author: Vinod Koul Date: Thu Dec 8 23:01:30 2016 +0530 ASoC: AMD: remove unused ‘dma_buffer’ In acp_dma_hw_params(), 'dma_buffer' is initialized, but not used. So remove it. sound/soc/amd/acp-pcm-dma.c: In function ‘acp_dma_hw_params’: sound/soc/amd/acp-pcm-dma.c:673:25: warning: variable ‘dma_buffer’ set but not used [-Wunused-but-set-variable] struct snd_dma_buffer *dma_buffer; Cc: Maruthi Bayyavarapu Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 3 --- 1 file changed, 3 deletions(-) commit 1c445a42c48754bb5f821478517ef1b9f861217a Author: Vinod Koul Date: Thu Dec 8 23:01:29 2016 +0530 ASoC: max98090: remove superflous check for 'micbias' In max98090_probe(), code checks for micbias being out of range. The 'micbias' variable in unsigned and checked against M98090_MBVSEL_2V2 which is zero, so remove this check. sound/soc/codecs/max98090.c: In function ‘max98090_probe’: sound/soc/codecs/max98090.c:2459:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] } else if (micbias < M98090_MBVSEL_2V2 || micbias > M98090_MBVSEL_2V8) { Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d56923da8f92dee0b557d3a8d6a3639deec35637 Author: Vinod Koul Date: Thu Dec 8 23:01:28 2016 +0530 ASoC: hdac_hdmi: remove unused 'dai_map' In hdac_hdmi_playback_cleanup(), a variable 'dai_map' is initialized but not used. Also while removing this two mare variables 'edev' and 'hdmi' become unused, so remove all these as well. sound/soc/codecs/hdac_hdmi.c: In function ‘hdac_hdmi_playback_cleanup’: sound/soc/codecs/hdac_hdmi.c:470:32: warning: variable ‘dai_map’ set but not used [-Wunused-but-set-variable] struct hdac_hdmi_dai_pin_map *dai_map; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 5 ----- 1 file changed, 5 deletions(-) commit fd34045567991dc77a50163c5d0e465b423df962 Author: Vinod Koul Date: Thu Dec 8 23:01:27 2016 +0530 ASoC: topology: remove unused 'err' In soc_tplg_pcm_elems_load, a variable 'err' is initialized but not used. It is assigned return values for pcm_new_ver() but never checked, so remove it. sound/soc/soc-topology.c: In function ‘soc_tplg_pcm_elems_load’: sound/soc/soc-topology.c:1865:9: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] int i, err; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/soc-topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee9292e859bec2bd8b79b7d14bc352e9ea5d7257 Author: Vinod Koul Date: Thu Dec 8 23:01:25 2016 +0530 ASoC: Intel: sst: remove unused 'msg_high' In process_fw_async_msg(), a variable 'msg_high' is initialized but not used. So remove it. sound/soc/intel/atom/sst/sst_ipc.c: In function ‘process_fw_async_msg’: sound/soc/intel/atom/sst/sst_ipc.c:263:24: warning: variable ‘msg_high’ set but not used [-Wunused-but-set-variable] union ipc_header_high msg_high; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_ipc.c | 2 -- 1 file changed, 2 deletions(-) commit cf90c8245bb0d528a8046b4bfa4f223320c9dbb0 Author: Vinod Koul Date: Thu Dec 8 23:01:26 2016 +0530 ASoC: Intel: sst: remove unused 'ops' In sst_free_stream(), a variable 'ops' is initialized but not used. So remove it. sound/soc/intel/atom/sst/sst_stream.c: In function ‘sst_free_stream’: sound/soc/intel/atom/sst/sst_stream.c:397:24: warning: variable ‘ops’ set but not used [-Wunused-but-set-variable] struct intel_sst_ops *ops; Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_stream.c | 2 -- 1 file changed, 2 deletions(-) commit 547cafa3efc3f12101cafd454e651c9a5a8feae4 Author: Vinod Koul Date: Thu Dec 8 23:01:24 2016 +0530 ASoC: Intel: Skylake: remove unused 'ret' In skl_tplg_mixer_dapm_post_pmd_event(), a variable 'ret' is initialized but not used. We don't check return of skl_delete_pipe, so remove the assignment as well, so remove this variable. sound/soc/intel/skylake/skl-topology.c: In function ‘skl_tplg_mixer_dapm_post_pmd_event’: sound/soc/intel/skylake/skl-topology.c:976:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret = 0; ^ Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38252e9ef68936f104a5791740f4ca2f81510a33 Author: Thomas Huehn Date: Wed Dec 14 20:47:03 2016 +0100 mac80211: minstrel: avoid port control frames for sampling Makes connections more reliable Signed-off-by: Thomas Huehn Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.c | 5 +++++ 1 file changed, 5 insertions(+) commit 73b16589b859130eb8b49882e71c7cd1caa5986d Author: Felix Fietkau Date: Wed Dec 14 20:47:02 2016 +0100 mac80211: minstrel_ht: remove obsolete #if for >= 3 streams This was added during early development when 3x3 hardware was not very common yet. This is completely unnecessary now. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 4cae4cd10d058eb4057e20cb72e82fe76ae739af Author: Felix Fietkau Date: Wed Dec 14 20:47:01 2016 +0100 mac80211: minstrel: make prob_ewma u16 instead of u32 Saves about 1.2 KiB memory per station Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f0bc9c61bae9c74ffcf5dbdbd241cbf0ec3a44e Author: Felix Fietkau Date: Wed Dec 14 20:47:00 2016 +0100 mac80211: minstrel: store probability variance instead of standard deviation This avoids the costly int_sqrt calls in the statistics update and moves it to the debugfs code instead. This also fixes an overflow in the previous standard deviation calculation. Signed-off-by: Thomas Huehn Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.c | 8 ++++---- net/mac80211/rc80211_minstrel.h | 25 ++++++++++++++----------- net/mac80211/rc80211_minstrel_debugfs.c | 8 ++++++-- net/mac80211/rc80211_minstrel_ht_debugfs.c | 8 ++++++-- 4 files changed, 30 insertions(+), 19 deletions(-) commit 0217eefa64509d63fbe8d1205310bafb2355cf4d Author: Felix Fietkau Date: Wed Dec 14 20:46:59 2016 +0100 mac80211: minstrel: reduce MINSTREL_SCALE The loss of a bit of extra precision does not hurt the calculation, 12 bits is still enough to calculate probabilities well. Reducing the scale makes it easier to avoid overflows Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1109dc392ea0248f7bfca3537011aa7afaa05cee Author: Felix Fietkau Date: Wed Dec 14 20:46:58 2016 +0100 mac80211: minstrel: remove cur_prob from debugfs This field is redundant, because it is simply last success divided by last attempt count. Removing it from the rate stats struct saves about 1.2 KiB per HT station. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.c | 10 ++++++---- net/mac80211/rc80211_minstrel.h | 2 -- net/mac80211/rc80211_minstrel_debugfs.c | 16 ++++++---------- net/mac80211/rc80211_minstrel_ht_debugfs.c | 16 ++++++---------- 4 files changed, 18 insertions(+), 26 deletions(-) commit 95cd470c75a8822d35fa82a1b276d47da37229d1 Author: Felix Fietkau Date: Wed Dec 14 20:46:57 2016 +0100 mac80211: check for MCS in ieee80211_duration before fetching chanctx Makes the code a bit more efficient Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 70550df2d354f13ae0544f12aa14b79f094f0de2 Author: Felix Fietkau Date: Wed Dec 14 20:46:56 2016 +0100 mac80211: minstrel_ht: make att_hist and succ_hist u32 instead of u64 They are only used for debugging purposes and take a very long time to overflow. Visibly reduces the size of the per-sta rate control data. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 782dda00ab8e9485ddc2a1fb8d8681dcc5136283 Author: Felix Fietkau Date: Wed Dec 14 20:46:55 2016 +0100 mac80211: minstrel_ht: move short preamble check out of get_rate Test short preamble support in minstrel_ht_update_caps instead of looking at the per-packet flag. Makes the code more efficient. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 41d085835d3d2258633d8959e717198e31d3862e Author: Felix Fietkau Date: Wed Dec 14 20:46:54 2016 +0100 mac80211: minstrel_ht: move supported bitrate mask out of group data Improves dcache footprint by ensuring that fewer cache lines need to be touched. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 30 +++++++++++++++--------------- net/mac80211/rc80211_minstrel_ht.h | 6 +++--- net/mac80211/rc80211_minstrel_ht_debugfs.c | 8 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-) commit 0c2e384267b815fb784c415a90de7bdd78da0b66 Author: Koen Vandeputte Date: Wed Dec 14 17:28:59 2016 +0100 mac80211: only alloc mem if a station doesn't exist yet This speeds up the function in case a station already exists by avoiding calling an expensive kzalloc just to free it again after the next check. Signed-off-by: Koen Vandeputte Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2289b3e11f39148f5146de5708d266eacd934a22 Author: Caesar Wang Date: Sat Dec 10 10:49:19 2016 +0800 drm/bridge: analogix_dp: set the DPCD600 during disabling PSR It looks like the BOE panel FW didn't ack the DPCD600 signal from the host device, this will cause the panel to hang on the startup display. The root cause is that we use the fast link mode when we enter and exit PSR, the issue is gone if we switch from the fast link to main link mode. Signed-off-by: Caesar Wang Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481338159-7189-1-git-send-email-wxt@rock-chips.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 02a9e08d7374f1bb680cd44a2f124793f4e7d6e7 Author: Mohammed Shafi Shajakhan Date: Wed Dec 7 10:30:32 2016 +0530 ath10k: Avoid potential page alloc BUG_ON in tx free path 'ath10k_htt_tx_free_cont_txbuf' and 'ath10k_htt_tx_free_cont_frag_desc' have NULL pointer checks to avoid crash if they are called twice but this is as of now not sufficient as these pointers are not assigned to NULL once the contiguous DMA memory allocation is freed, fix this. Though this may not be hit with the explicity check of state variable 'tx_mem_allocated' check, good to have this addressed as well. Below BUG_ON is hit when the above scenario is simulated with kernel debugging enabled page:f6d09a00 count:0 mapcount:-127 mapping: (null) index:0x0 flags: 0x40000000() page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) ------------[ cut here ]------------ kernel BUG at ./include/linux/mm.h:445! invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC EIP is at put_page_testzero.part.88+0xd/0xf Call Trace: [] __free_pages+0x3c/0x40 [] free_pages+0x3e/0x50 [] dma_generic_free_coherent+0x24/0x30 [] ath10k_htt_tx_free_cont_txbuf+0xf8/0x140 [] ath10k_htt_tx_destroy+0x29/0xa0 [] ath10k_core_destroy+0x60/0x80 [ath10k_core] [] ath10k_pci_remove+0x79/0xa0 [ath10k_pci] [] pci_device_remove+0x38/0xb0 [] __device_release_driver+0x72/0x100 [] driver_detach+0x97/0xa0 [] bus_remove_driver+0x40/0x80 [] driver_unregister+0x2a/0x60 [] pci_unregister_driver+0x18/0x70 [] ath10k_pci_exit+0xd/0x2be [ath10k_pci] [] SyS_delete_module+0x158/0x210 [] ? __might_fault+0x41/0xa0 [] ? __might_fault+0x8b/0xa0 [] do_fast_syscall_32+0x9b/0x1c0 [] sysenter_past_esp+0x45/0x74 Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_tx.c | 2 ++ 1 file changed, 2 insertions(+) commit 5c4607ebaabed2e9b414593a83c0ff97c6966f12 Author: Toke Høiland-Jørgensen Date: Mon Dec 5 13:27:38 2016 +0200 ath9k: Turn ath_txq_lock/unlock() into static inlines. These are one-line functions that just call spin_lock/unlock_bh(); turn them into static inlines to avoid the function call overhead. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ath9k.h | 11 +++++++++-- drivers/net/wireless/ath/ath9k/xmit.c | 12 ------------ 2 files changed, 9 insertions(+), 14 deletions(-) commit 63fefa050477b0974ab34f650e21a7cfc3b02d96 Author: Toke Høiland-Jørgensen Date: Mon Dec 5 13:27:37 2016 +0200 ath9k: Introduce airtime fairness scheduling between stations This reworks the ath9k driver to schedule transmissions to connected stations in a way that enforces airtime fairness between them. It accomplishes this by measuring the time spent transmitting to or receiving from a station at TX and RX completion, and accounting this to a per-station, per-QoS level airtime deficit. Then, an FQ-CoDel based deficit scheduler is employed at packet dequeue time, to control which station gets the next transmission opportunity. Airtime fairness can significantly improve the efficiency of the network when station rates vary. The following throughput values are from a simple three-station test scenario, where two stations operate at the highest HT20 rate, and one station at the lowest, and the scheduler is employed at the access point: Before / After Fast station 1: 19.17 / 25.09 Mbps Fast station 2: 19.83 / 25.21 Mbps Slow station: 2.58 / 1.77 Mbps Total: 41.58 / 52.07 Mbps The benefit of airtime fairness goes up the more stations are present. In a 30-station test with one station artificially limited to 1 Mbps, we have seen aggregate throughput go from 2.14 to 17.76 Mbps. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ath9k.h | 25 +++- drivers/net/wireless/ath/ath9k/channel.c | 14 ++- drivers/net/wireless/ath/ath9k/debug.c | 3 + drivers/net/wireless/ath/ath9k/debug.h | 13 +++ drivers/net/wireless/ath/ath9k/debug_sta.c | 54 +++++++++ drivers/net/wireless/ath/ath9k/init.c | 2 + drivers/net/wireless/ath/ath9k/main.c | 6 +- drivers/net/wireless/ath/ath9k/recv.c | 65 +++++++++++ drivers/net/wireless/ath/ath9k/xmit.c | 177 +++++++++++++++++++++-------- 9 files changed, 303 insertions(+), 56 deletions(-) commit 4bca5303eb55d3876e719367290c08b11c70cf78 Author: Martin Blumenstingl Date: Mon Dec 5 13:27:37 2016 +0200 ath9k: define all EEPROM fields in Little Endian format The ar9300_eeprom logic is already using only 8-bit (endian neutral), __le16 and __le32 fields to state explicitly how the values should be interpreted. All other EEPROM implementations (4k, 9287 and def) were using u16 and u32 fields with additional logic to swap the values (read from the original EEPROM) so they match the current CPUs endianness. The EEPROM format defaults to "all values are Little Endian", indicated by the absence of the AR5416_EEPMISC_BIG_ENDIAN in the u8 EEPMISC register. If we detect that the EEPROM indicates Big Endian mode (AR5416_EEPMISC_BIG_ENDIAN is set in the EEPMISC register) then we'll swap the values to convert them into Little Endian. This is done by activating the EEPMISC based logic in ath9k_hw_nvram_swap_data even if AH_NO_EEP_SWAP is set (this makes ath9k behave like the FreeBSD driver, which also does not have a flag to enable swapping based on the AR5416_EEPMISC_BIG_ENDIAN bit). Before this logic was only used to enable swapping when "current CPU endianness != EEPROM endianness". After changing all relevant fields to __le16 and __le32 sparse was used to check that all code which reads any of these fields uses le{16,32}_to_cpu. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 27 ++----- drivers/net/wireless/ath/ath9k/eeprom.h | 75 ++++++++++-------- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 94 +++++++++------------- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 98 ++++++++++------------- drivers/net/wireless/ath/ath9k/eeprom_def.c | 114 ++++++++++++--------------- 5 files changed, 174 insertions(+), 234 deletions(-) commit 68fbe792916cdf6c96def64c1bc50a39443a136a Author: Martin Blumenstingl Date: Mon Dec 5 13:27:36 2016 +0200 ath9k: Make the EEPROM swapping check use the eepmisc register There are two ways of swapping the EEPROM data in the ath9k driver: 1) swab16 based on the first two EEPROM "magic" bytes (same for all EEPROM formats) 2) field and EEPROM format specific swab16/swab32 (different for eeprom_def, eeprom_4k and eeprom_9287) The result of the first check was used to also enable the second swap. This behavior seems incorrect, since the data may only be byte-swapped (afterwards the data could be in the correct endianness). Thus we introduce a separate check based on the "eepmisc" register (which is part of the EEPROM data). When bit 0 is set, then the EEPROM format specific values are in "big endian". This is also done by the FreeBSD kernel, see [0] for example. This allows us to parse EEPROMs with the "correct" magic bytes but swapped EEPROM format specific values. These EEPROMs (mostly found in lantiq and broadcom based big endian MIPS based devices) only worked due to platform specific "hacks" which swapped the EEPROM so the magic was inverted, which also enabled the format specific swapping. With this patch the old behavior is still supported, but neither recommended nor needed anymore. [0] https://github.com/freebsd/freebsd/blob/50719b56d9ce8d7d4beb53b16e9edb2e9a4a7a18/sys/dev/ath/ath_hal/ah_eeprom_9287.c#L351 Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 57 ++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 16 deletions(-) commit 9bff7428d55a5fbc3b6e8d3ba725040cadd71a59 Author: Martin Blumenstingl Date: Mon Dec 5 13:27:35 2016 +0200 ath9k: consistently use get_eeprom_rev(ah) The AR5416_VER_MASK macro does the same as get_eeprom_rev, except that one has to know the actual EEPROM type (and providing a reference to that in a variable named "eep"). Additionally the eeprom_*.c implementations used the same shifting logic multiple times to get the eeprom revision which was also unnecessary duplication of get_eeprom_rev. Also use the AR5416_EEP_VER_MINOR_MASK macro where needed and introduce a similar macro (AR5416_EEP_VER_MAJOR_MASK) for the major version. Finally drop AR9287_EEP_VER_MINOR_MASK since it simply duplicates the already defined AR5416_EEP_VER_MINOR_MASK. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.h | 4 +-- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 32 ++++++++++------------ drivers/net/wireless/ath/ath9k/eeprom_9287.c | 19 +++++++------ drivers/net/wireless/ath/ath9k/eeprom_def.c | 41 +++++++++++++++------------- drivers/net/wireless/ath/ath9k/xmit.c | 3 +- 5 files changed, 52 insertions(+), 47 deletions(-) commit 7d7dc5386836dd973eaef48b11c4e77368dd07a4 Author: Martin Blumenstingl Date: Mon Dec 5 13:27:34 2016 +0200 ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev get_eeprom(ah, EEP_MINOR_REV) and get_eeprom_rev(ah) are both doing the same thing: returning the EEPROM revision (12 lowest bits). Make the code consistent by using get_eeprom_rev(ah) everywhere. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 +- drivers/net/wireless/ath/ath9k/ar9002_hw.c | 6 ++---- drivers/net/wireless/ath/ath9k/eeprom.h | 1 - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 5 ----- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 6 +----- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 -- 6 files changed, 4 insertions(+), 18 deletions(-) commit d8ec2e2a63e8136fc7d687cf75bcd034d9615c24 Author: Martin Blumenstingl Date: Mon Dec 5 13:27:34 2016 +0200 ath9k: Add an eeprom_ops callback for retrieving the eepmisc value This allows deciding if we have to swap the EEPROM data (so it matches the system's native endianness) even if no byte-swapping (swab16, based on the first two bytes in the EEPROM) is needed. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 8 +++++++- drivers/net/wireless/ath/ath9k/eeprom.h | 1 + drivers/net/wireless/ath/ath9k/eeprom_4k.c | 8 +++++++- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 8 +++++++- drivers/net/wireless/ath/ath9k/eeprom_def.c | 8 +++++++- 5 files changed, 29 insertions(+), 4 deletions(-) commit 291478b7b3c020210bcabd78a0348c0c381a362c Author: Martin Blumenstingl Date: Mon Dec 5 13:27:33 2016 +0200 ath9k: indicate that the AR9003 EEPROM template values are little endian The eepMisc field was not set explicitly. The default value of 0 means that the values in the EEPROM (template) should be interpreted as little endian. However, this is not clear until comparing the AR9003 code with the other EEPROM formats. To make the code easier to understand we explicitly state that the values are little endian - there are no functional changes with this patch. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 +++++----- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 81a834e3483c1bc7ae15825e4d0110932586a927 Author: Martin Blumenstingl Date: Mon Dec 5 13:27:32 2016 +0200 ath9k: Add a #define for the EEPROM "eepmisc" endianness bit This replaces a magic number with a named #define. Additionally it removes two "eeprom format" specific #defines for the "big endianness" bit which are the same on all eeprom formats. Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 3 ++- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 1 - drivers/net/wireless/ath/ath9k/eeprom.h | 4 +++- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) commit 89670affa2a62c4868a2dd8a4195a1a2ec58cb27 Author: Steve Grubb Date: Wed Dec 14 16:00:13 2016 -0500 audit: Make AUDIT_ANOM_ABEND event normalized The audit event specification asks for certain fields to exist in all events. Running 'ausearch -m anom_abend -sv yes' returns no events. This patch adds the result field so that the AUDIT_ANOM_ABEND event conforms to the rules. Signed-off-by: Steve Grubb Signed-off-by: Paul Moore kernel/auditsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c397d01e43493dd087f9cd926cd1fcf508a8019 Author: Steve Grubb Date: Wed Dec 14 15:59:46 2016 -0500 audit: Make AUDIT_KERNEL event conform to the specification The AUDIT_KERNEL event is not following name=value format. This causes some information to get lost. The event has been reformatted to follow the convention. Additionally the audit_enabled value was added for troubleshooting purposes. The following is an example of the new event: type=KERNEL audit(1480621249.833:1): state=initialized audit_enabled=0 res=1 Signed-off-by: Steve Grubb [PM: commit tweaks to make checkpatch.pl happy] Signed-off-by: Paul Moore kernel/audit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d92df868a56cac7804967f67a038a90a90591fed Author: Ville Syrjälä Date: Fri Nov 18 21:52:47 2016 +0200 drm/nouveau: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Ben Skeggs Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-12-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/nouveau/dispnv04/crtc.c | 5 +++-- drivers/gpu/drm/nouveau/dispnv04/dfp.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit bdcb2f91069337b3d577d69c15dbd1f5b8f683e8 Author: Ville Syrjälä Date: Fri Nov 18 21:52:46 2016 +0200 drm/nouveau: Fix crtc->primary->fb vs. drm_fb fail So it looks like the code is trying to pick between the passed in fb and crtc->primary->fb based on that funky 'bool atomic'. But later it will mix uses of both drm_fb (which was picked by the aforementioned logic) and crtc->primary->fb. So looks like a bug to me. Let's make it use drm_fb only. Cc: Ben Skeggs Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-11-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59477fa90bfecc324708270f0867c2b4a9103956 Author: Ville Syrjälä Date: Fri Nov 18 21:52:45 2016 +0200 drm/arm: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my ppor coccinelle skills later. In some places the local variable was already there, just not used consistently. Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Brian Starkey Acked-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 18 ++++++++++-------- drivers/gpu/drm/arm/malidp_planes.c | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) commit 81852b6abcdfce80ce60294c7910ac85e83105ba Author: Ville Syrjälä Date: Fri Nov 18 21:52:44 2016 +0200 drm/arcpgu: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my ppor coccinelle skills later. Cc: Alexey Brodkin Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-9-git-send-email-ville.syrjala@linux.intel.com Acked-by: Alexey Brodkin drivers/gpu/drm/arc/arcpgu_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93aac5c038288a78cbb70fbcaba17c131eab365d Author: Ville Syrjälä Date: Fri Nov 18 21:52:43 2016 +0200 drm/cirrus: Add some local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Dave Airlie Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-8-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/cirrus/cirrus_mode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 515601950d1cade109553f48708584e6d5d3d173 Author: Ville Syrjälä Date: Fri Nov 18 21:52:42 2016 +0200 drm/gma500: Add some local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Patrik Jakobsson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-7-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/gma500/gma_display.c | 13 +++++++------ drivers/gpu/drm/gma500/mdfld_intel_display.c | 15 ++++++++------- drivers/gpu/drm/gma500/oaktrail_crtc.c | 13 +++++++------ 3 files changed, 22 insertions(+), 19 deletions(-) commit 7445283a3ef7ae8a5e2eb42864e1e57a814b8439 Author: Ville Syrjälä Date: Fri Nov 18 21:52:41 2016 +0200 drm/ast: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Dave Airlie Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-6-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/ast/ast_mode.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 72952757b82e79f3217b9d289e3d5af9c985b8a5 Author: Ville Syrjälä Date: Fri Nov 18 21:52:40 2016 +0200 drm/mgag200: Add local 'fb' variable Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Dave Airlie Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/mgag200/mgag200_mode.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3a6176e7febb6a7b67fb15d99481795941b9e707 Author: Ville Syrjälä Date: Fri Nov 18 21:52:39 2016 +0200 drm/radeon: Use DIV_ROUND_UP() Use DIV_ROUND_UP() instead of hand rolling it. Just a drive-by change. Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-4-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 489f32677751b97252c1788c8702da40584364be Author: Ville Syrjälä Date: Fri Nov 18 21:52:38 2016 +0200 drm/radeon: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/radeon/r100.c | 10 ++++++++-- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) commit 1967b34d5afbbf788adbc572ec7de269467566f3 Author: Ville Syrjälä Date: Fri Nov 18 21:52:37 2016 +0200 drm/i915: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my poor coccinelle skills later. While at it switch over to using the pixel format rather than depth+bpp. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_overlay.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 2ee7dc497e348eecbb82adbb1ea9e9a7e29fe921 Author: Paulo Zanoni Date: Tue Dec 13 18:57:44 2016 -0200 drm/i915: disable PSR by default on HSW/BDW We've been ignoring the poor bugzilla reporters that say PSR causes system lockups and all other sorts of problems. The earliest bug report is from April, so I think we can use the "revert the offending commit if no fixes are presented within 8 months" rule here. Fixes: 9b58e352b463 ("drm/i915: Enable PSR by default on Haswell and Broadwell.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97602 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97515 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96736 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96704 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96569 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95176 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94985 Cc: # v4.6+ Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: Paulo Zanoni Acked-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481662664-18986-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_psr.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 91829a9a25cc931b76b01aa091a52e0edd649a72 Author: Felix Fietkau Date: Fri Dec 9 20:48:53 2016 +0100 spi: spi-ath79: use gpio_set_value_cansleep for GPIO chip select Signed-off-by: Felix Fietkau Signed-off-by: Mark Brown drivers/spi/spi-ath79.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22c76326bff810d220fffdbaab949d09e2564067 Author: Felix Fietkau Date: Fri Dec 9 20:48:52 2016 +0100 spi: spi-ath79: support multiple internal chip select lines Several devices with multiple flash chips use the internal chip select lines. Don't assume that chip select 1 and above are GPIO lines. Signed-off-by: Felix Fietkau Signed-off-by: Mark Brown drivers/spi/spi-ath79.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit cc4a7ffe02c95f537541c91e9842e3710decae6e Author: Geert Uytterhoeven Date: Wed Dec 14 12:20:55 2016 +0100 spi: fsl-lpspi: Pre-initialize ret in fsl_lpspi_transfer_one_msg() With gcc 4.1.2: drivers/spi/spi-fsl-lpspi.c: In function ‘fsl_lpspi_transfer_one_msg’: drivers/spi/spi-fsl-lpspi.c:369: warning: ‘ret’ may be used uninitialized in this function If the message contains no transfers, the function will set the message's status to an uninitialized value, and will return that uninitialized value. While __spi_validate() should have been called in all paths leading to this, and thus have rejected such messages, we better pre-initialize ret to be safe for future modifications (spi_transfer_one_message() also does this). Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-fsl-lpspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a798711314b54cbd4fe224e24db92c306a8d8c Author: Mika Kuoppala Date: Wed Dec 14 14:26:20 2016 +0200 drm/i915: Fix setting of boost freq tunable For limiting the max frequency of gpu, the max freq tunable is not enough to hard limit the max gap. We now have also per client boost max freq. When this tunable was introduced, it was mistakenly made read only. Allow user to gain control by setting it writable. Fixes: 29ecd78d3b79 ("drm/i915: Define a separate variable and control for RPS waitboost frequency") Cc: # v4.9+ Cc: Chris Wilson Cc: Mika Kuoppala Cc: Daniel Vetter Cc: Jani Nikula Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1481718380-9170-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eebfdbff2f857fbb7d730e338e3ad37b684bd5d Author: Jani Nikula Date: Tue Dec 13 13:10:59 2016 +0200 drm/i915: simplify check for I915G/I945G in bit 6 swizzling detection Commit c9c4b6f6c283 ("drm/i915: fix swizzle detection for gen3") added a complicated check for I915G/I945G. Pineview and other gen3 devices match IS_MOBILE() anyway. Simplify. Cc: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481627459-488-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_gem_fence_reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a1f761a5929aae167f9d36ff810c7113b032e1cd Author: Bartosz Golaszewski Date: Tue Dec 13 11:09:17 2016 +0100 drm: bridge: add support for TI ths8135 THS8135 is a configurable video DAC, but no configuration is actually necessary to make it work. For now use the dumb-vga-dac driver to support it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Laurent Pinchart Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481623759-12786-4-git-send-email-bgolaszewski@baylibre.com drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 + 1 file changed, 1 insertion(+) commit 2e644be30fcc08c736f66b60f4898d274d4873ab Author: Bartosz Golaszewski Date: Tue Dec 13 11:09:16 2016 +0100 drm: bridge: add DT bindings for TI ths8135 THS8135 is a configurable video DAC. Add DT bindings for this chip. Signed-off-by: Bartosz Golaszewski Reviewed-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1481623759-12786-3-git-send-email-bgolaszewski@baylibre.com .../bindings/display/bridge/ti,ths8135.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 2dd85aeb5bc99e3763dd192cdb95ff405a102c8a Author: Daniel Vetter Date: Tue Dec 13 20:54:14 2016 +0100 drm/i915: tune down the fast link training vs boot fail It's been unfixed since a while and no one is immediately working on this. And we have the FIXME already. And now also a task in the DP team's backlog. Cc: Linus Torvalds Cc: stable@vger.kernel.org Cc: Ville Syrjälä References: https://lists.freedesktop.org/archives/intel-gfx/2016-July/101951.html Acked-by: Ville Syrjälä [danvet: Adjust comment per Ville's feedback.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213195414.28923-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4085743834cb7dc4bdfb4f9639e28a3bb476585 Author: Daniel Vetter Date: Tue Dec 13 18:54:49 2016 +0100 drm/fsl: don't use drm_put_dev fsl is already fully demidlayered in the probe function, but for convenience stuck with drm_put_dev. Call the unregister/unref parts separately, to make sure this driver works correct. v2: Rebase. Cc: Lucas Stach Cc: Stefan Agner Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213175449.24525-1-daniel.vetter@ffwll.ch drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e89e50ac35d9126907a436dabe70f9a8311b9981 Author: Dan Carpenter Date: Tue Dec 13 15:23:32 2016 +0300 drm: mxsfb: drm_dev_alloc() returns error pointers We should be checking for IS_ERR() instead of NULL because drm_dev_alloc() returns error pointers. Fixes: 45d59d704080 ("drm: Add new driver for MXSFB controller") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213122332.GA7519@elgon.mountain drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 010f5b9f0d44f73943e0b63d7f4362af227ae2ea Merge: de7b6be 2cf026a Author: Daniel Vetter Date: Tue Dec 13 22:23:18 2016 +0100 Merge tag 'drm-for-v4.10' of git://people.freedesktop.org/~airlied/linux into drm-misc-next Main pull request for drm for 4.10 kernel - resync drm-misc with full 4.10 state (2 new drivers) so that we can start pulling in all the refactorings for 4.11! Signed-off-by: Daniel Vetter commit de7b6be7f3009fef47a2ca0df237a055147b6d25 Author: Daniel Stone Date: Tue Dec 13 18:19:12 2016 +0000 drm: Use atomic state for FB in legacy ioctls If atomic state is available, use this to read the current plane in GetCrtc/GetPlane, rather than the legacy points. Signed-off-by: Daniel Stone Cc: Daniel Vetter Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161213181912.92904-1-daniels@collabora.com drivers/gpu/drm/drm_crtc.c | 5 ++++- drivers/gpu/drm/drm_plane.c | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit af913418261d6d3e7a29f06cf35f04610ead667c Author: Kristian H. Kristensen Date: Tue Dec 13 11:27:52 2016 -0800 drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define We need to define DRM_FORMAT_MOD_VENDOR_NONE for the fourcc_mod_code() macro to work correctly. Signed-off-by: Kristian H. Kristensen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481657272-25975-1-git-send-email-hoegsberg@google.com include/uapi/drm/drm_fourcc.h | 1 + 1 file changed, 1 insertion(+) commit ecdfcebb4cb89bd755e6fa41c09a541539d2f285 Author: Daniel Vetter Date: Thu Dec 8 12:07:36 2016 +0100 drm/etnaviv: Use drm_dev_unref, not drm_put_dev drm_put_dev is the old midlayer-broken device cleanup function, but etnaviv has a proper unbind function which first unregisters and then drops the final reference. No functional change since drm_dev_unregister happens to be idempotent. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161208110739.24417-1-daniel.vetter@ffwll.ch drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae9d2daecf086958a41ad216152ec208d70ba325 Author: Daniel Vetter Date: Thu Dec 8 12:07:38 2016 +0100 drm/mediatek: don't use drm_put_dev fsl is already fully demidlayered in the probe function, but for convenience stuck with drm_put_dev. Call the unregister/unref parts separately, to make sure this driver works correct. Cc: Philipp Zabel Cc: CK Hu Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161208110739.24417-3-daniel.vetter@ffwll.ch drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3bed7f4dd3c9047557d7b64bb155bc79afa26e96 Author: Mika Kahola Date: Tue Dec 13 10:02:49 2016 +0200 drm/i915: clean up Hz to PWM for i965 Unify function structure as any other *_hz_to_pwm() functions are structured. Signed-off-by: Mika Kahola Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481616169-16210-4-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_panel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a318b4c4ea9aa9ad6279286f7989ce4a75d5fd76 Author: Mika Kahola Date: Tue Dec 13 10:02:48 2016 +0200 drm/i915: Intel panel downclock cleanup Let's switch to use dev_priv instead of dev when calling intel_find_panel_downclock() function. Signed-off-by: Mika Kahola Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481616169-16210-3-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_panel.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1650be744d1b4bbd806ce0e80453ad090a7065c6 Author: Mika Kahola Date: Tue Dec 13 10:02:47 2016 +0200 drm/i915: Intel panel detection cleanup Let's switch to use private dev_priv instead of dev when detecting intel panels. Signed-off-by: Mika Kahola Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481616169-16210-2-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_lvds.c | 4 ++-- drivers/gpu/drm/i915/intel_panel.c | 4 +--- 4 files changed, 6 insertions(+), 7 deletions(-) commit 445cd452fe5187e676eef02c917c9e5f837c749e Author: Masashi Honma Date: Thu Dec 8 10:15:51 2016 +0900 mac80211: Use appropriate name for functions and messages These functions drifts TSF timers, not TBTT. Signed-off-by: Masashi Honma Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/mesh.c | 2 +- net/mac80211/mesh.h | 2 +- net/mac80211/mesh_sync.c | 16 ++++++++-------- net/mac80211/tx.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) commit 76f43b4c0a9337af22827d78de4f2b8fd5328489 Author: Masashi Honma Date: Thu Dec 8 10:15:50 2016 +0900 mac80211: Remove invalid flag operations in mesh TSF synchronization mesh_sync_offset_adjust_tbtt() implements Extensible synchronization framework ([1] 13.13.2 Extensible synchronization framework). It shall not operate the flag "TBTT Adjusting subfield" ([1] 8.4.2.100.8 Mesh Capability), since it is used only for MBCA ([1] 13.13.4 Mesh beacon collision avoidance, see 13.13.4.4.3 TBTT scanning and adjustment procedures for detail). So this patch remove the flag operations. [1] IEEE Std 802.11 2012 Signed-off-by: Masashi Honma [remove adjusting_tbtt entirely, since it's now unused] Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 - net/mac80211/mesh.c | 3 --- net/mac80211/mesh_sync.c | 11 ----------- 3 files changed, 15 deletions(-) commit 73f4f76a196d7adb11a1e192bd8024fe0bc83910 Author: Michał Kępień Date: Thu Dec 8 08:30:52 2016 +0100 rfkill: Add rfkill-any LED trigger Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, which may be useful on laptops with a single "radio LED" and multiple radio transmitters. The trigger is meant to turn a LED on whenever there is at least one radio transmitter active and turn it off otherwise. This requires taking rfkill_global_mutex before calling rfkill_set_block() in rfkill_resume(): since __rfkill_any_led_trigger_event() is called from rfkill_set_block() unconditionally, each caller of the latter needs to take care of locking rfkill_global_mutex. Signed-off-by: Michał Kępień Signed-off-by: Johannes Berg net/rfkill/core.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 6124c53edeeaac4394755ebb38c522bc4eef1460 Author: Michał Kępień Date: Thu Dec 8 08:30:51 2016 +0100 rfkill: Cleanup error handling in rfkill_init() Use a separate label per error condition in rfkill_init() to make it a bit cleaner and easier to extend. Signed-off-by: Michał Kępień Signed-off-by: Johannes Berg net/rfkill/core.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 4a5eccaa93505cd186939a01d7c115568b1881a6 Author: Ben Greear Date: Mon Dec 5 10:58:30 2016 -0800 mac80211: Show pending txqlen in debugfs. Could be useful for debugging memory consumption issues, and perhaps power-save as well. Signed-off-by: Ben Greear Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 11197d006bcfabf0173a7820a163fcaac420d10e Author: Masashi Honma Date: Wed Nov 30 09:06:04 2016 +0900 mac80211: Suppress NEW_PEER_CANDIDATE event if no room Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if the found peer does not have any room to accept other peer. This causes continuous connection trials. Signed-off-by: Masashi Honma Signed-off-by: Johannes Berg net/mac80211/mesh_plink.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ebceec860fc370b2f4c23e95c51daa932e047913 Author: Michael Braun Date: Tue Nov 22 11:52:18 2016 +0100 mac80211: multicast to unicast conversion Add the ability for an AP (and associated VLANs) to perform multicast-to-unicast conversion for ARP, IPv4 and IPv6 frames (possibly within 802.1Q). If enabled, such frames are to be sent to each station separately, with the DA replaced by their own MAC address rather than the group address. Note that this may break certain expectations of the receiver, such as the ability to drop unicast IP packets received within multicast L2 frames, or the ability to not send ICMP destination unreachable messages for packets received in L2 multicast (which is required, but the receiver can't tell the difference if this new option is enabled.) This also doesn't implement the 802.11 DMS (directed multicast service). Signed-off-by: Michael Braun [use true/false, rename label to the correct "multicast", use __be16 for ethertype and network order for constants] Signed-off-by: Johannes Berg net/mac80211/cfg.c | 12 +++++ net/mac80211/debugfs_netdev.c | 3 ++ net/mac80211/ieee80211_i.h | 1 + net/mac80211/tx.c | 122 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 137 insertions(+), 1 deletion(-) commit ab7257251cc63eef5fa6702c3c616c6e2524d777 Author: Kirtika Ruchandani Date: Wed Nov 23 20:46:27 2016 -0800 mac80211: Remove unused 'beaconint_us' variable Commit 4a733ef1bea7 (mac80211: remove PM-QoS listener) removed all use of 'beaconint_us' from ieee80211_recalc_ps() but left the variable intact. Compiling with W=1 gives the following warning, fix it. net/mac80211/mlme.c: In function ‘ieee80211_recalc_ps’: net/mac80211/mlme.c:1481:7: warning: variable ‘beaconint_us’ set but not used [-Wunused-but-set-variable] iee80211_tu_to_usec has no side-effects and is safe to remove. Fixes: 4a733ef1bea7 ("mac80211: remove PM-QoS listener") Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/mlme.c | 4 ---- 1 file changed, 4 deletions(-) commit 148f284b23061b6de4024423a6606437cc427f1c Author: Kirtika Ruchandani Date: Wed Nov 23 20:46:14 2016 -0800 mac80211: Remove unused 'sband' and 'local' variables Commit b1bce14a7954 (mac80211: update opmode when adding new station) refactored ieee80211_vht_handle_opmode into __ieee80211_vht_handle_opmode and ieee80211_vht_handle_opmode leaving a set but unused variable (sband) in the former. Compiling with W=1 gives the following warning, fix it. net/mac80211/vht.c: In function ‘__ieee80211_vht_handle_opmode’: net/mac80211/vht.c:424:35: warning: variable ‘sband’ set but not used [-Wunused-but-set-variable] Remove 'struct ieee80211_local* local' as well, it was only used to set sband. This is a harmless warning, and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: b1bce14a7954 ("mac80211: update opmode when adding new station") Cc: Marek Kwaczynski Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/vht.c | 4 ---- 1 file changed, 4 deletions(-) commit cd5861bde0299fd5189a6b9e0d1e31e205064fc6 Author: Kirtika Ruchandani Date: Wed Nov 23 20:45:49 2016 -0800 mac80211: Remove unused 'len' variable Commit 633e27132625 (mac80211: split sched scan IEs) introduced the len variable to keep track of the return value of ieee80211_build_preq_ies() but did not use it. Compiling with W=1 gives the following warning, fix it. net/mac80211/scan.c: In function ‘__ieee80211_request_sched_scan_start’: net/mac80211/scan.c:1123:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] This is a harmless warning and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: 633e27132625 ("mac80211: split sched scan IEs") Cc: David Spinadel Cc: Alexander Bondar Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/scan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b7f2405c6bd8ae0125a974308f649637cdc81f80 Author: Kirtika Ruchandani Date: Wed Nov 23 20:45:36 2016 -0800 mac80211: Remove unused 'i' variable Commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations) introduced ieee80211_vif_use_reserved_switch() with a counter variable 'i' that is set but not used. Compiling with W=1 gives the following warning, fix it. net/mac80211/chan.c: In function ‘ieee80211_vif_use_reserved_switch’: net/mac80211/chan.c:1273:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] This is a harmless warning, and is only being fixed to reduce the noise obtained with W=1 in the kernel. Fixes: 5bcae31d9 ("mac80211: implement multi-vif in-place reservations") Cc: Michal Kazior Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/chan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fb803becb1180d3f940a634f073981e0b72d7030 Author: Kirtika Ruchandani Date: Mon Nov 21 22:54:16 2016 -0800 mac80211: Remove unused 'struct rate_control_ref' variable Commit 3b17fbf87d5d introduced sta_get_expected_throughput() leaving variable 'struct rate_control_ref* ref' set but unused. Compiling with W=1 gives the following warning, fix it. net/mac80211/sta_info.c: In function ‘sta_set_sinfo’: net/mac80211/sta_info.c:2052:27: warning: variable ‘ref’ set but not used [-Wunused-but-set-variable] Fixes: 3b17fbf87d5d ("mac80211: mesh: Add support for HW RC implementation") Cc: Johannes Berg Cc: Maxim Altshul Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 4 ---- 1 file changed, 4 deletions(-) commit 872684b1f7de40b95dac51245f3aad208528a6c3 Author: Kirtika Ruchandani Date: Mon Nov 21 22:04:46 2016 -0800 mac80211: Remove unused 'rates_idx' variable Commit f027c2aca0cf introduced 'rates_idx' in ieee80211_tx_status_noskb but did not use it. Compiling with W=1 gives the following warning, fix it. mac80211/status.c: In function ‘ieee80211_tx_status_noskb’: mac80211/status.c:636:6: warning: variable ‘rates_idx’ set but not used [-Wunused-but-set-variable] This is a harmless warning, and is only being fixed to reduce the noise generated with W=1. Fixes: f027c2aca0cf ("mac80211: add ieee80211_tx_status_noskb") Cc: Johannes Berg Cc: Felix Fietkau Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/status.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 99cd25810e326c62f5a51fa6f0dd1e848060680f Author: Kirtika Ruchandani Date: Mon Nov 21 21:44:24 2016 -0800 mac80211: Remove unused 'struct ieee80211_rx_status' ptr Commit 554891e63a29 introduced 'struct ieee80211_rx_status' in ieee80211_rx_h_defragment but did not use it. Compiling with W=1 gives the following warning, fix it. net/mac80211/rx.c: In function ‘ieee80211_rx_h_defragment’: net/mac80211/rx.c:1911:30: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Fixes: 554891e63a29 ("mac80211: move packet flags into packet") Cc: Johannes Berg Cc: John W. Linville Signed-off-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/rx.c | 4 ---- 1 file changed, 4 deletions(-) commit b528414ca3b7b57f4f81b7ff207e6f8ffde89d2e Author: Michael Braun Date: Mon Oct 31 14:40:59 2016 +0100 nl80211: multicast_to_unicast can be changed while IFF_UP There is no need to prevent toggling multicast_to_unicast while interface is already up. This change simplifies reconfiguration from hostapd. Signed-off-by: Michael Braun Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 --- 1 file changed, 3 deletions(-) commit 5a88de5342f3090d8292132a392094034d85d101 Author: Arend Van Spriel Date: Thu Nov 17 09:02:40 2016 +0000 nl80211: check NL80211_ATTR_SCHED_SCAN_INTERVAL only once The presence of the NL80211_ATTR_SCHED_SCAN_INTERVAL attribute was checked in nl80211_parse_sched_scan() and nl80211_parse_sched_scan_plans() which might be a bit redundant so removing one. Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/nl80211.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 543b921b475ad2e1897d5e7784437af238b33705 Author: Arend Van Spriel Date: Thu Nov 17 12:48:53 2016 +0000 cfg80211: get rid of name indirection trick for ieee80211_get_channel() The comment on the name indirection suggested an issue but turned out to be untrue. Digging in older kernel version showed issue with ipw2x00 but that is no longer true so get rid on the name indirection. Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/htt_rx.c | 3 +-- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- include/net/cfg80211.h | 17 +++-------------- net/wireless/util.c | 5 ++--- 4 files changed, 7 insertions(+), 20 deletions(-) commit 74204f8fa117e7d0fa1d1a7a57c3c97df83ad418 Author: Johannes Berg Date: Tue Dec 13 09:38:25 2016 +0100 rfkill: simplify rfkill_set_hw_state() slightly Simplify the two conditions gating the schedule_work() into a single one and get rid of the additional exit point from the function in doing so. Signed-off-by: Johannes Berg net/rfkill/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c1617abc48a062aed9a146a1009f1977d0da168d Author: Manasi Navare Date: Fri Dec 9 16:22:50 2016 -0800 drm/i915: Move all the DP compliance data to a separate struct This patch does not change anything functionally, just cleans up the DP compliance related variables and stores them all together in a separate struct intel_dp_compliance. There is another struct intel_dp_compliance_data to store all the test data. This makes it easy to reset the compliance variables through a memset instead of individual resetting. v2: * Removed functional changes for EDID (Jani Nikula) Reviewed-by: Jani Nikula Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481329371-16306-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++----- drivers/gpu/drm/i915/intel_dp.c | 24 ++++++++++-------------- drivers/gpu/drm/i915/intel_drv.h | 14 +++++++++++--- 3 files changed, 26 insertions(+), 22 deletions(-) commit fdb14d335f8c3724fcc5f4db8e1a8fe634ca0afc Author: Manasi Navare Date: Thu Dec 8 19:05:12 2016 -0800 drm/i915: Find fallback link rate/lane count If link training fails, then we need to fallback to lower link rate first and if link training fails at RBR, then fallback to lower lane count. This function finds the next lower link rate/lane count value after link training failure and limits the max link_rate and lane_count values to these fallback values. v7: * Remove unnecessary intializations and remove redundant call to intel_dp_common_rates (Jani Nikula) v6: * Cap the max link rate and lane count to the max values obtained during fallback link training (Daniel Vetter) v5: * Start the fallback at the lane count value passed not the max lane count (Jani Nikula) v4: * Remove the redundant variable link_train_failed v3: * Remove fallback_link_rate_index variable, just obtain that using the helper intel_dp_link_rate_index (Jani Nikula) v2: Squash the patch that returns the link rate index (Jani Nikula) Acked-by: Tony Cheng Acked-by: Harry Wentland Cc: Ville Syrjala Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481252712-12925-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 40 insertions(+) commit f482984acb101d351a49ab0ec51c75dbf094a51d Author: Manasi Navare Date: Mon Dec 5 16:27:36 2016 -0800 drm/i915: Compute sink's max lane count/link BW at Hotplug Sink's capabilities are advertised through DPCD registers and get updated only on hotplug. So they should be computed only once in the long pulse handler and saved off in intel_dp structure for the use later. For this reason two new fields max_sink_lane_count and max_sink_link_bw are added to intel_dp structure. This also simplifies the fallback link rate/lane count logic to handle link training failure. In that case, the max_sink_link_bw and max_sink_lane_count can be reccomputed to match the fallback values lowering the sink capabilities due to link train failure. Cc: Ville Syrjala Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480984058-552-3-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 10 ++++++++-- drivers/gpu/drm/i915/intel_drv.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 213e08ad60baca3676d6633ca91e523735eed474 Author: Jani Nikula Date: Mon Dec 5 09:30:34 2016 +0200 drm/i915/bxt: add bxt dsi gpio element support Request the GPIO by index through the consumer API. For now, use a quick hack to store the already requested ones, simply because I have no idea whether this actually works or not, and I have no way to test it. v2 by Mika: switch *NULL* to *"panel"* when requesting gpio for MIPI/DSI panel. Signed-off-by: Jani Nikula Signed-off-by: Mika Kahola Link: http://patchwork.freedesktop.org/patch/msgid/1480923034-21916-1-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 38 +++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) commit e7e21c72b178e963f3c990cb839d86f568999916 Author: Daniel Vetter Date: Fri Dec 9 22:50:55 2016 +0100 dma-buf: Final bits of doc polish - Put all the remaing bits of the old doc into suitable places in the new sphinx world. - Also document the poll support, we forgot to do that. - Delete dma-buf-sharing.txt. v2: Don't forget to update MAINTAINERS. Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Cc: Sumit Semwal Signed-off-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20161209215055.3492-1-daniel.vetter@ffwll.ch Documentation/dma-buf-sharing.txt | 47 ----------------------------------- Documentation/driver-api/dma-buf.rst | 48 ++++++++++++++++++++++++++++++++++++ MAINTAINERS | 2 +- drivers/dma-buf/dma-buf.c | 22 +++++++++++++++++ 4 files changed, 71 insertions(+), 48 deletions(-) commit 0959a1683d78270bab6381d498707fb8655ae11c Author: Daniel Vetter Date: Fri Dec 9 19:53:08 2016 +0100 dma-buf: Update cpu access documentation - Again move the information relevant for driver writers next to the callbacks. - Put the overview and userspace interface documentation into a DOC: section within the code. - Remove the text that mmap needs to be coherent - since the DMA_BUF_IOCTL_SYNC landed that's no longer the case. But keep the text that for pte zapping exporters need to adjust the address space. - Add a FIXME that kmap and the new begin/end stuff used by the SYNC ioctl don't really mix correctly. That's something I just realized while doing this doc rework. - Augment function and structure docs like usual. Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Cc: Sumit Semwal Signed-off-by: Daniel Vetter Signed-off-by: Sumit Semwal [sumits: fix cosmetic issues] Link: http://patchwork.freedesktop.org/patch/msgid/20161209185309.1682-5-daniel.vetter@ffwll.ch Documentation/dma-buf-sharing.txt | 213 ----------------------------------- Documentation/driver-api/dma-buf.rst | 6 + drivers/dma-buf/dma-buf.c | 122 ++++++++++++++++++++ include/linux/dma-buf.h | 91 +++++++++++++-- 4 files changed, 211 insertions(+), 221 deletions(-) commit 2904a8c1311f02896635fd35744262413a0b2726 Author: Daniel Vetter Date: Fri Dec 9 19:53:07 2016 +0100 dma-buf: Reorganize device dma access docs - Put the initial overview for dma-buf into dma-buf.rst. - Put all the comments about detailed semantics into the right kernel-doc comment for functions or ops structure member. - To allow that detail, switch the reworked kerneldoc to inline style for dma_buf_ops. - Tie everything together into a much more streamlined overview comment, relying on the hyperlinks for all the details. - Also sprinkle some links into the kerneldoc for dma_buf and dma_buf_attachment to tie it all together. Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Cc: Sumit Semwal Signed-off-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20161209185309.1682-4-daniel.vetter@ffwll.ch Documentation/dma-buf-sharing.txt | 222 ----------------------------------- Documentation/driver-api/dma-buf.rst | 38 ++++++ drivers/dma-buf/dma-buf.c | 64 +++++++++- drivers/dma-buf/sync_file.c | 1 - include/linux/dma-buf.h | 133 +++++++++++++++++---- 5 files changed, 207 insertions(+), 251 deletions(-) commit 24a367348a017555f982a9ee137070a7a821fa97 Author: Daniel Vetter Date: Fri Dec 9 19:53:06 2016 +0100 dma-buf: Update kerneldoc for sync_file_create This was missed when adding a dma_fence_get call. While at it also remove the kerneldoc for the static inline helper - no point documenting internals down to every detail. Fixes: 30cd85dd6edc ("dma-buf/sync_file: hold reference to fence when creating sync_file") Cc: Gustavo Padovan Cc: Sean Paul Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Cc: Sumit Semwal Signed-off-by: Daniel Vetter Reviewed-by: Gustavo Padovan Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20161209185309.1682-3-daniel.vetter@ffwll.ch drivers/dma-buf/sync_file.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c24889167583c2e7fbd1a9e12ef508c8405f6fd4 Merge: 38bf57f 868c97a Author: Daniel Vetter Date: Tue Dec 13 10:36:39 2016 +0100 Merge tag 'docs-4.10' of git://git.lwn.net/linux into drm-misc-next Backmerge the docs-next branch from Jon into drm-misc so that we can apply the dma-buf documentation cleanup patches. Git found a conflict where there was none because both drm-misc and docs had identical patches to clean up file rename issues in the rst include directives. Signed-off-by: Daniel Vetter commit 38bf57fa7b671f2bf7530888aa8199450265c5c8 Author: Daniel Vetter Date: Fri Dec 9 15:19:38 2016 +0100 drm/hisilicon: Don't set drm_device->platformdev It's deprecated and only should be used by drivers which still use drm_platform_init, not by anyone else. And indeed it's entirely unused and can be nuked. This required a bit more fudging, but I guess kirin_dc_ops really wants to operate on the platform_device, not something else. Also bonus points for implementing abstraction, and then storing the vfunc in a global variable. v2: Don't break the build soooo badly :( Note that the cleanup function is a bit confused: ade_data was never set as drvdata, and calling drm_crtc_cleanup directly is a bug - this is called indirectly through drm_mode_config_cleanup, which calls into crtc->destroy, which already has the call to drm_crtc_cleanup. Which means we can just nuke it. Note this is the 2nd attempt after the first one failed and had to be reverted again in commit 9cd2e854d61ccfa51686f3ed7b0c917708fc641f Author: Daniel Vetter Date: Wed Aug 17 13:59:40 2016 +0200 Revert "drm/hisilicon: Don't set drm_device->platformdev" Cc: Xinliang Liu Cc: Xinwei Kong Cc: Archit Taneja Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161209141944.22121-1-daniel.vetter@ffwll.ch drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 11 +++-------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 8 +++----- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 ++-- 3 files changed, 8 insertions(+), 15 deletions(-) commit 731035fe8e32de31d3f390370349e843caf1e6b8 Author: Tomeu Vizoso Date: Mon Dec 12 13:29:48 2016 +0100 drm/i915/debugfs: Move out pipe CRC code In preparation to using a generic API in the DRM core for continuous CRC generation, move the related code out of i915_debugfs.c into a new file. Eventually, only the Intel-specific code will remain in this new file. v2: Rebased. v6: Rebased. v7: Fix whitespace issue. v9: Have intel_display_crc_init accept a drm_i915_private instead. v12: Rebased. Signed-off-by: Tomeu Vizoso Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481545788-18194-1-git-send-email-tomeu.vizoso@collabora.com drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 882 +------------------------------ drivers/gpu/drm/i915/intel_drv.h | 5 + drivers/gpu/drm/i915/intel_pipe_crc.c | 939 ++++++++++++++++++++++++++++++++++ 4 files changed, 949 insertions(+), 879 deletions(-) commit fdd5b877e9ebc2029e1373b4a3cd057329a9ab7a Author: Daniel Vetter Date: Sat Dec 10 22:52:54 2016 +0100 drm: Enforce BKL-less ioctls for modern drivers With the last round of changes all ioctls called by modern drivers now have their own locking. Everything else is only allowed for legacy drivers and hence the lack of locking doesn't matter. One exception is nouveau, due to the DRIVER_KMS_LEGACY_CONTEXT flag. But that only works its magic on the context and bufs ioctls. And drm_bufs.c is protected with dev->struct_mutex, and drm_context.c by the same and dev->ctxlist_mutex. That should be all safe, and we can finally mandata drm-bkl-less ioctls for everyone! Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161210215255.7765-3-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dcf727ab5d1702abc9510a1a91afbd671e410b52 Author: Daniel Vetter Date: Sat Dec 10 22:52:53 2016 +0100 drm: setclientcap doesn't need the drm BKL It only updates per-file feature flags. And all the ioctl which change behaviour depending upon these flags (they're all kms features) do _not_ hold the BKL. Therefor this is pure cargo-cult and can be removed. Note that there's a risk that the ioctl will behave inconsistently when userspace is racing with itself, but that's ok. The only thing it's not allowed to do is oops the kernel, and from an audit all places are safe. v2: Clarify that the inconsistency is only when userspace races (Chris). Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161210215255.7765-2-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5acc614ac47465fee6375a9af4740f618830762d Author: Daniel Vetter Date: Sat Dec 10 22:52:52 2016 +0100 drm: Protect master->unique with dev->master_mutex No one looks at the major/minor versions except the unique/busid stuff. If we protect that with the master_mutex (since it also affects the unique of each master, oh well) we can mark these two IOCTL with DRM_UNLOCKED. While doing this I realized that the comment for the magic_map is outdated, I've forgotten to update it in: commit d2b34ee62b409a03c6fe43c07b779983be51d017 Author: Daniel Vetter Date: Fri Jun 17 09:33:21 2016 +0200 drm: Protect authmagic with master_mutex Cc: Chris Wilson Cc: Emil Velikov Reviewed-by: Chris Wilson Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161210215255.7765-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_ioctl.c | 12 +++++++++--- include/drm/drm_auth.h | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) commit b9fb2a21ac8058965a6b3fcae736cfa7f411d6eb Author: Daniel Vetter Date: Wed Nov 9 13:36:36 2016 +0100 drm_fourcc: Document linear modifier Not setting the fb modifiers flag is something different from setting the fb modifiers to 0 (which means explicitly linear). We kinda failed to document that properly. Spotted by Kristian. Cc: hoegsberg@google.com Reviewed-by: Kristian H. Kristensen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1478694996-4200-1-git-send-email-daniel.vetter@ffwll.ch include/uapi/drm/drm_fourcc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit add033793c9efa7b0a8ecd2fa192fe85aa8b0854 Author: Vidya Srinivas Date: Thu Dec 8 11:26:18 2016 +0200 drm/i915: Parse panel backlight controller from VBT Currently the backlight controller is taken as 0. It needs to derive value from the VBT. Adding the necessary changes. v2 by Jani: - drop obsolete comments, drop redundant initialization (Bob) - merge debug logging into one Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Reviewed-by: Bob Paauwe Tested-by: Bob Paauwe Tested-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481189178-426-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 6 ++++-- drivers/gpu/drm/i915/intel_panel.c | 17 +++-------------- 3 files changed, 8 insertions(+), 16 deletions(-) commit 7155b057c61e55eed27bf478ac9b8034c4c97582 Author: Chris Wilson Date: Fri Dec 9 15:05:55 2016 +0000 drm/i915: Retire before attempting to evict from the active lists Some object retain an extra pin whilst they are active (e.g. contexts). This excludes them from being considered for eviction unless we idle the GPU. If before we look at the active list, we retire beforehand we can hopefully remove a few excess pins and reduce the amount of searching required. v2: Similar principle applies to evict_for_vma Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161209150555.602-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_evict.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit dbb4351bab0a8440f6b02895c142bce6c30b7097 Author: Chris Wilson Date: Wed Dec 7 13:34:11 2016 +0000 drm/i915: Reorder phys backing storage release In commit a4f5ea64f0a8 ("drm/i915: Refactor object page API"), I reordered the object->pages teardown to be more friendly wrt to a separate obj->mm.lock. However, I overlooked the phys object and left it with a dangling use-after-free of its phys_handle. Move the allocation of the phys handle to get_pages and it release to put_pages to prevent the invalid access and to improve symmetry. v2: Add commentary about always aligning to page size. Testcase: igt/drv_selftest/objects Reported-by: Ville Syrjälä Fixes: a4f5ea64f0a8 ("drm/i915: Refactor object page API") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161207133411.8028-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 53 ++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit 697cc9c8a2c39a42188840e35e212230a240f9e4 Author: Daniel Vetter Date: Sun Dec 11 20:20:19 2016 +0100 drm: Simplify GETRESOURCES ioctl Looping twice when we can do it once is silly. Also use a consistent style. Note that there's a good race with the connector list walking, since that is no longer protected by mode_config.mutex. But that's for a later patch to fix. v2: Actually try to not blow up, somehow I lost the hunk that checks we don't copy too much. Noticed by Chris. v3: - squash all drm_mode_getresources cleanups into one - use consistent style for walking objects (Chris) v4: - Use u64_to_user_ptr (Chris) - Don't forget to copy the last connector (Chris) v5: Chris was right ... Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161211192019.29603-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mode_config.c | 111 ++++++++++++++------------------------ 1 file changed, 39 insertions(+), 72 deletions(-) commit 122020af856181c24fe45903e43e3cc987c175f7 Author: Chris Wilson Date: Tue Nov 15 15:46:42 2016 +0000 dma-buf: Provide wrappers for reservation's lock Joonas complained that writing ww_mutex_lock(&resv->lock, ctx) was too intrusive compared to reservation_object_lock(resv, ctx); Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Joonas Lahtinen Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161115154642.31850-1-chris@chris-wilson.co.uk include/linux/reservation.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit f8611c00d9abcf964a288a3f8f13dd18ff4f6512 Author: Nizam Haider Date: Wed Dec 7 23:14:47 2016 +0530 Staging: iio: impedance-analyzer: ad5933: fix wrong comments according to datasheet complete control register is of 2 bytes. http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf Signed-off-by: Nizam Haider Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c271eea7b8a08fdc5334e247fbc6a9c560bc15f Author: Rama Krishna Phani A Date: Fri Dec 9 20:31:50 2016 +0530 iio: adc: spmi-vadc: Changes to support different scaling Several ADC channels are supported in PMIC which can be used to measure voltage, temperature, current etc. Different scaling can be applied on the obtained voltage to report in physical units. Scaling functionality can be different per channel. Add scaling support per channel. Every channel present in adc has an unique conversion formula for obtained voltage. Add support to report in Raw as well as in processed format. Scaling is applied when processed read is requested and is not applied when a Raw read is requested. Signed-off-by: Rama Krishna Phani A Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-vadc.c | 435 +++++++++++++++++++++++++++++---------- 1 file changed, 327 insertions(+), 108 deletions(-) commit ba71704af4a0aae0d9e5812dbdd7bca95e181b14 Author: Rama Krishna Phani A Date: Fri Dec 9 20:31:49 2016 +0530 iio: adc: spmi-vadc: Update function for generic voltage conversion Several channels are supported in ADC of PMIC which can be used to measure voltage, temperature, current etc., Hardware provides readings for all channels in adc code. That adc code needs to be converted to voltage. Logic for conversion of adc code to voltage is common for all ADC channels(voltage, temperature, current .,etc). Implement separate function for generic conversion logic. Signed-off-by: Rama Krishna Phani A Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-vadc.c | 52 +++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 7e3eb599236db605413b4e047692dab9b600d6c6 Author: Nagaraju, Vathsala Date: Fri Dec 9 23:42:09 2016 +0530 drm/i915/psr: report psr2 hw enabled from psr2_ctl For PSR2 , as per spec, PSR2_CTL bit 31 to be set. for psr1, bit 31 in SRD_CTL to be set. Reporting "HW Enabled & Active bit" status for psr2 from SRD_CTL gives wrong status. Cc: Rodrigo Vivi Cc: Jim Bride Signed-off-by: vathsala nagaraju Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1481307129-29354-1-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 16d98b31f807756269106f9a71b1a3dc0d19c629 Author: Robert Bragg Date: Wed Dec 7 21:40:33 2016 +0000 drm/i915/perf: More documentation hooked to i915.rst This adds a 'Perf' section to i915.rst with the following sub sections: - Overview - Comparison with Core Perf - i915 Driver Entry Points - i915 Perf Stream - i915 Perf Observation Architecture Stream - All i915 Perf Internals v2: section headers in i915.rst (Daniel Vetter) missing symbol docs + other fixups (Matthew Auld) Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161207214033.3581-1-robert@sixbynine.org Documentation/gpu/i915.rst | 91 +++++++++ drivers/gpu/drm/i915/i915_drv.h | 151 +++++++++++--- drivers/gpu/drm/i915/i915_perf.c | 412 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 598 insertions(+), 56 deletions(-) commit b3b8e99984a4eace91bc097e8f8cec71441cae16 Author: Imre Deak Date: Mon Dec 5 18:27:38 2016 +0200 drm/i915/gen9: Fix PCODE polling during SAGV disabling According to the previous patch, it's possible atm that we call intel_do_sagv_disable() only once during the 1ms period and time out if that call fails. As opposed to this the spec says that we need to keep retrying this request for a 1ms duration, so let's do this similarly to the CDCLK change notification request. v4-5: - Rebased on the reply_mask, reply change. v6: - Remove w/s change. (Lyude) - Rebased on the timeout_base argument change. Cc: Lyude Cc: Ville Syrjälä Cc: Chris Wilson Fixes: 656d1b89e5ff ("drm/i915/skl: Add support for the SAGV, fix underrun hangs") Signed-off-by: Imre Deak Reviewed-by: Lyude (v4) Link: http://patchwork.freedesktop.org/patch/msgid/1480955258-26311-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_pm.c | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) commit a0b8a1fe34430c3a82258e8cb45f5968bdf31afd Author: Imre Deak Date: Mon Dec 5 18:27:37 2016 +0200 drm/i915/gen9: Fix PCODE polling during CDCLK change notification commit 848496e5902833600f7992f4faa82dc1546051ba Author: Ville Syrjälä Date: Wed Jul 13 16:32:03 2016 +0300 drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request on SKL increased the timeout to match the spec, but we still see a timeout on at least one SKL. A CDCLK change request following the failed one will succeed nevertheless. I could reproduce this problem easily by running kms_pipe_crc_basic in a loop. In all failure cases _wait_for() was pre-empted for >3ms and so in the worst case - when the pre-emption happened right after calculating timeout__ in _wait_for() - we called skl_cdclk_wait_for_pcu_ready() only once which failed and so _wait_for() timed out. As opposed to this the spec says to keep retrying the request for at most a 3ms period. To fix this send the first request explicitly to guarantee that there is 3ms between the first and last request. Though this matches the spec, I noticed that in rare cases this can still time out if we sent only a few requests (in the worst case 2) _and_ PCODE is busy for some reason even after a previous request and a 3ms delay. To work around this retry the polling with pre-emption disabled to maximize the number of requests. Also increase the timeout to 10ms to account for interrupts that could reduce the number of requests. With this change I couldn't trigger the problem. v2: - Use 1ms poll period instead of 10us. (Chris) v3: - Poll with pre-emption disabled to increase the number of request attempts. (Ville, Chris) - Factor out a helper to poll, it's also needed by the next patch. v4: - Pass reply_mask, reply to skl_pcode_request(), instead of assuming the reply is generic. (Ville) v5: - List the request specific timeout values as code comment. (Ville) v6: - Try the poll first with preemption enabled. - Add code comment about first request being queued by PCODE. (Art) - Add timeout_base_ms argument. (Ville) v7: - Clarify code comment about first queued request. (Chris) Cc: Ville Syrjälä Cc: Chris Wilson Cc: Art Runyan Cc: # v4.2- : 3b2c171 : drm/i915: Wait up to 3ms Cc: # v4.2- Fixes: 5d96d8afcfbb ("drm/i915/skl: Deinit/init the display at suspend/resume") Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97929 Testcase: igt/kms_pipe_crc_basic/suspend-read-crc-pipe-B Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480955258-26311-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_display.c | 31 +++++---------- drivers/gpu/drm/i915/intel_pm.c | 75 ++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 21 deletions(-) commit 7da0e124af76c79927f0d7abcc58d58d0fd7072f Author: Maarten Lankhorst Date: Thu Dec 8 14:45:24 2016 +0100 drm/atomic: Use active instead of enable in wait_for_vblanks. When DPMS was introduced to atomic, vblanks only worked when the crtc was enabled and active. wait_for_vblanks were not converted to check for crtc_state->active, which may cause an attempt for vblank_get to fail. This is probably harmless, but convert from enable to active anyway. Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481204729-9058-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87a6752c43f28363b0fd330874dec20249292d2f Author: Tvrtko Ursulin Date: Tue Dec 6 19:04:13 2016 +0000 drm/i915: Use DRM_DEV_ERROR in i915_driver_load Now that it is available we don't have to open code a similar error message ourselves. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481051053-29783-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d82faafd81fe1cf2a11cbc94b05d9fd22e651d49 Author: Daniel Vetter Date: Thu Dec 8 11:28:47 2016 +0100 drm: Update drm_device docs about embedding. It's supported now! Spotted while reviewing Chris' patch to add a release hook. Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161208102847.3063-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_drv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4e8048f80aa0ab1e05cb4d866922811996f28da4 Author: Tvrtko Ursulin Date: Tue Dec 6 10:50:20 2016 +0000 drm/i915: Shrink pipe config checker Replace INTEL_ERR_OR_DBG_KMS macro with an intel_err_or_dbg_kms function to shrink the code and rodata strings. text data bss dec hex filename 1271480 41831 2016 1315327 1411ff i915.ko.0 1265160 41831 2016 1309007 13f94f i915.ko.2 Total of ~6 KiB saving across text and strings. v2: * Annotate the function for printf-style checking. * Rename to pipe_config_err. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481021420-5783-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 17 deletions(-) commit 991914274bdde1e0de28cadc8eca4c736ec3fd07 Author: Joonas Lahtinen Date: Wed Dec 7 16:22:39 2016 +0200 drm/i915: Catch non-existent registers in find_fw_domain Add WARN_ON to find_fw_domain to registers related to uninitialized hardware. v2: - Print the uninitialized domains and register (Chris) Cc: Imre Deak Cc: Wang Elaine Cc: Chris Wilson Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1481120559-17413-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 73f67aa8cc3c0ab7299f2fc81049a7d8d934fef8 Author: Jani Nikula Date: Wed Dec 7 22:48:09 2016 +0200 drm/i915: distinguish G33 and Pineview from each other Pineview deserves to use its own platform enum (which was already added, unused, previously). IS_G33() no longer matches Pineview, and gets replaced by IS_G33() || IS_PINEVIEW() or equivalent. Pineview is no longer an outlier among platform definitions. Cc: Ville Syrjälä Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481143689-19672-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 8 +++++--- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 5 +++-- drivers/gpu/drm/i915/i915_gem_stolen.c | 4 ++-- drivers/gpu/drm/i915/i915_pci.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 5 +++-- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 8 files changed, 17 insertions(+), 14 deletions(-) commit ccc24b39a6fa3b0ba6b4310c10d7e0288ec8db10 Author: Mahesh Kumar Date: Thu Dec 1 21:19:38 2016 +0530 drm/i915: Add intel_atomic_get_existing_crtc_state function This patch Adds a function to extract intel_crtc_state from the atomic_state, if not available it returns NULL. v2 (from Paulo): - Fix white space problem detected by checkpatch. Signed-off-by: Mahesh Kumar Reviewed-by: Paulo Zanoni Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-7-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_drv.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b95320bdf2d891011da9c5ec85dcb114483856a6 Author: Mahesh Kumar Date: Thu Dec 1 21:19:37 2016 +0530 drm/i915/skl+: change WM calc to fixed point 16.16 This patch changes Watermak calculation to fixed point calculation. Problem with current calculation is during plane_blocks_per_line calculation we divide intermediate blocks with min_scanlines and takes floor of the result because of integer operation. hence we end-up assigning less blocks than required. Which leads to flickers. Changes since V1: - Add fixed point data type as per Paulo's review Changes since V2: - use fixed_point instead of fp_16_16 Changes since V3: - rebase Changes since V4 (from Paulo): - My original renaming suggestion was misunderstood, so implement it - Simplify fixed_16_16_to_u32 implementation - Fix indentation Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-6-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.h | 84 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 69 +++++++++++++++++++-------------- 2 files changed, 124 insertions(+), 29 deletions(-) commit 4b7b2331885a1ab348178f3faf9dc6a4dccae01a Author: Mahesh Kumar Date: Thu Dec 1 21:19:35 2016 +0530 drm/i915/kbl: IPC workaround for kabylake Display Workarounds #1141 IPC (Isoch Priority Control) may cause underflows. KBL WA: When IPC is enabled, watermark latency values must be increased by 4us across all levels. This brings level 0 up to 6us. Changes since V1: - Add Workaround number in commit & code Changes since V2 (from Paulo): - Bikeshed the WA tag so it looks like the others Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-4-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 1 file changed, 4 insertions(+) commit a3a8986cb22aafd83681b7e783ca6d4963712989 Author: Mahesh Kumar Date: Thu Dec 1 21:19:34 2016 +0530 drm/i915/bxt: IPC WA for Broxton Display Workarounds #1135 If IPC is enabled in BXT, display underruns are observed. WA: The Line Time programmed in the WM_LINETIME register should be half of the actual calculated Line Time. Programmed Line Time = 1/2*Calculated Line Time Changes since V1: - Add Workaround number in commit & code Changes since V2 (from Paulo): - Bikeshed white space and make the WA tag look like the others Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-3-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 13 +++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) commit ef8a4fb479d3791cc40a1adb72d4b5ec655fddaf Author: Mahesh Kumar Date: Thu Dec 1 21:19:33 2016 +0530 drm/i915/skl: Add variables to check x_tile and y_tile This patch adds variable to check for X_tiled & y_tiled planes, instead of always checking against framebuffer-modifiers. Changes: - Created separate patch as per Paulo's comment - Added x_tiled variable as well Changes since V2: - Incorporate Paulo's comments - Rebase Changes since V3 (from Paulo): - Bikeshed indentation Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-2-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit b2b45fcd921e864a5e9bbc7aa55dee96d5e11c06 Author: Hans de Goede Date: Thu Dec 1 21:29:09 2016 +0100 drm/i915/dsi: Fix chv_exec_gpio disabling the GPIOs it is setting Set the CHV_GPIO_GPIOEN bit when updating GPIOs from chv_exec_gpio. Fixes: a0a6d4ffd2ad ("drm/i915/dsi: add support for gpio elements on CHV") Cc: stable@vger.kernel.org Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161201202925.12220-3-hdegoede@redhat.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2b8208ac93be2783edc627fc02d9ca50cc479923 Author: Hans de Goede Date: Fri Dec 2 16:01:28 2016 +0100 drm/i915/dsi: Fix swapping of MIPI_SEQ_DEASSERT_RESET / MIPI_SEQ_ASSERT_RESET Looking at the ADF code from the Android kernel sources for a cherrytrail tablet I noticed that it is calling the MIPI_SEQ_ASSERT_RESET sequence from the panel prepare hook. Until commit b1cb1bd29189 ("drm/i915/dsi: update reset and power sequences in panel prepare/unprepare hooks") the mainline i915 code was doing the same. That commits effectively swaps the calling of MIPI_SEQ_ASSERT_RESET / MIPI_SEQ_DEASSERT_RESET. Looking at the naming of the sequences that is the right thing to do, but the problem is, that the old mainline code and the ADF code was actually calling the right sequence (tested on a cube iwork8 air tablet), and the swapping of the calling breaks things. This breakage was likely not noticed in testing because on cherrytrail, currently chv_exec_gpio ends up disabling the gpio pins rather then setting them (this is fixed in the next patch in this patch-set). This commit fixes the swapping by fixing MIPI_SEQ_ASSERT/DEASSERT_RESET's places in the enum defining them, so that their (new) names match their actual use. Changes in v2: -Add a comment to the enum explaining that the assert/reassert names are swapped in the spec Fixes: b1cb1bd29189 ("drm/i915/dsi: update reset and power sequences...") Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Hans de Goede Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20161202150128.29871-1-hdegoede@redhat.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_bios.h | 12 +++++++++--- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit 7708550ce5794d76dce5be608a9a91353c1bb98b Author: Robert Bragg Date: Thu Dec 1 17:21:52 2016 +0000 drm/i915/perf: use DRM_DEBUG for userspace issues Avoid using DRM_ERROR for conditions userspace can trigger with a bad config when opening a stream or from not reading data in a timely fashion (whereby the OA buffer fills up). These conditions are tested by i-g-t which treats error messages as failures if using the test runner. This wasn't an issue while the i915-perf igt tests were being run in isolation. One message relating to seeing a spurious zeroed report was changed to use DRM_NOTE instead of DRM_ERROR. Ideally this warning shouldn't be seen, but it's not a serious problem if it is. Considering that the tail margin mechanism is only a heuristic it's possible we might see this from time to time. Signed-off-by: Robert Bragg Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161201172152.10893-1-robert@sixbynine.org drivers/gpu/drm/i915/i915_perf.c | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 467a14d935c6d95b94e4197bf63e264eab4c5d06 Author: Ville Syrjälä Date: Mon Dec 5 16:13:28 2016 +0200 drm/i915: Protect DSPARB registers with a spinlock Each DSPARB register can house bits for two separate pipes, hence we must protect the registers during reprogramming so that parallel FIFO reconfigurations happening simultaneosly on multiple pipes won't corrupt each others values. We'll use a new spinlock for this instead of the wm_mutex since we'll have to move the DSPARB programming to happen from the vblank evade critical section, and we can't use mutexes in there. v2: Document why we use a spinlock instead of a mutex (Maarten) Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480947208-18468-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ 3 files changed, 10 insertions(+) commit 06bcd84873da324a69505cb489f61da2832d87cb Author: Jani Nikula Date: Wed Nov 30 17:43:06 2016 +0200 drm/i915: use platform enum instead of duplicating PCI ID if possible Duplicating the PCI ID for IS_FOO checks is redundant for a bunch of platforms. Simplify. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/4f79321aca2e003a627ba8b6809af3716b7c25c9.1480520526.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f69c11aeb872e51bf3900a6c0c8397f9ddb9f5bc Author: Jani Nikula Date: Wed Nov 30 17:43:05 2016 +0200 drm/i915: give G45 and GM45 their own platform enums Distinguish them better. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/987709804bc8fe55475e7481fcee03e7b86b1ba3.1480520526.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 8 +++++--- drivers/gpu/drm/i915/i915_pci.c | 4 ++-- drivers/gpu/drm/i915/intel_device_info.c | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) commit 2a307c2e91b9478a2a06c09ffcbfc00851c7be26 Author: Jani Nikula Date: Wed Nov 30 17:43:04 2016 +0200 drm/i915: add some more "i" in platform names for consistency Consistency FTW. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/9ab811dc06570bd3fc05a917ade1bdc9bb805a75.1480520526.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- drivers/gpu/drm/i915/intel_i2c.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) commit c0f86832e3fd0d125f22bf26040d24837d0412db Author: Jani Nikula Date: Wed Dec 7 12:13:04 2016 +0200 drm/i915: rename BROADWATER and CRESTLINE to I965G and I965GM, respectively Add more consistency to our naming. Pineview remains the outlier. Keep using code names for gen5+. v2: rebased Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1481105584-23033-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 8 ++++---- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_internal.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 4 ++-- drivers/gpu/drm/i915/intel_device_info.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_pm.c | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) commit a5ce929bc3ca3057588fadecc2305f17378ce8ab Author: Jani Nikula Date: Wed Nov 30 17:43:02 2016 +0200 drm/i915: keep intel device info structs in gen based order Move G33 and Pineview higher up in the list. Add a couple of blank lines for OCD while at it. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/ef4cc8e6ddf592c8c2769b84d4b88a5422d46ea5.1480520526.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_pci.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 2e0d26f866189f9035e379411e72fcedec678571 Author: Jani Nikula Date: Thu Dec 1 14:49:55 2016 +0200 drm/i915: replace platform flags with a platform enum The platform flags in device info are (mostly) mutually exclusive. Replace the flags with an enum. Add the platform enum also for platforms that previously didn't have a flag, and give them codename logging in dmesg. Pineview remains an exception, the platform being G33 for that. v2: Sort enum by gen and date v3: rebase on geminilake enabling Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480596595-3278-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 80 +++++++++++++++++++------------- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/gpu/drm/i915/i915_pci.c | 57 +++++++++++++---------- drivers/gpu/drm/i915/intel_device_info.c | 41 +++++++++++++++- 5 files changed, 122 insertions(+), 58 deletions(-) commit c499af5a692fa39644ce7979b4dea5db794df78b Author: Arkadiusz Hiler Date: Mon Dec 5 17:04:29 2016 +0100 drm/i915/guc: Drop comment on fwif autogeneration The firmware interface file was initially partially autogenerated, but this is no longer the case. It was never updated automatically, and a lot manual changes were introduced since. >From now on any changes to the firmware interface will be managed by hand, which gives us flexibility when it comes to structure reuse (HuC/GuC) and naming conventions. Cc: Anusha Srivatsa Cc: Jeff Mcgee Cc: Sagar A. Kamble Signed-off-by: Arkadiusz Hiler Reviewed-by: Jeff McGee Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1480953869-25267-1-git-send-email-arkadiusz.hiler@intel.com drivers/gpu/drm/i915/intel_guc_fwif.h | 9 --------- 1 file changed, 9 deletions(-) commit 70821af60b21cd15892350935c510c769ce80eee Author: Michel Thierry Date: Mon Dec 5 17:57:04 2016 -0800 drm/i915: Keep has_* in alphabetical order As it already says in the comment block... Signed-off-by: Michel Thierry Reviewed-by: Michał Winiarski Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161206015704.12654-1-michel.thierry@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e1d0e604e0e6bd32a55c5c2780ef0687a86c4b6 Author: Michel Thierry Date: Mon Dec 5 17:57:03 2016 -0800 drm/i915: Advertise ppgtt support type in platform definition Instead of being hidden in sanitize_enable_ppgtt. It also seems to be the place to do so nowadays. Signed-off-by: Michel Thierry Reviewed-by: Michał Winiarski Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_gem_gtt.c | 7 +++---- drivers/gpu/drm/i915/i915_pci.c | 11 +++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) commit d637c17832bd020c27b3c29c0bd27275d1af9132 Author: Chris Wilson Date: Tue Dec 6 12:40:51 2016 +0000 drm/i915: Use memcpy_from_wc for GPU error capture On all platforms we now always read the contents of buffers via the GTT, i.e. using WC cpu access. Reads are slow, but they can be accelerated with an internal read buffer using sse4.1 (movntqda). This is our i915_memcpy_from_wc() routine which also checks for sse4.1 support and so we can fallback to using a regular slow memcpy if we need to. When compressing the pages, the reads are currently done inside zlib's fill_window() routine and so we must copy the page into a temporary which is then already inside the CPU cache and fast for zlib's compression. When not compressing the pages, we don't need a temporary and can just use the accelerated read from WC into the destination. v2: Use zstream locals to reduce diff and allocate the additional temporary storage only if sse4.1 is supported. v3: Use length=0 for the sse4.1 support check Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161206124051.17040-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gpu_error.c | 50 ++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 13 deletions(-) commit 4cfa20c8345f04f0aa3ab5e33aa4487bbbcd8d9e Author: Matthew Auld Date: Fri Dec 2 18:47:50 2016 +0000 drm/i915: allow GEM_BUG_ON expr checking with !DEBUG_GEM Use BUILD_BUG_ON_INVALID(expr) in GEM_BUG_ON when building without DEBUG_GEM. This means the compiler can now check the validity of expr without generating any code, in turn preventing us from inadvertently breaking the build when DEBUG_GEM is not enabled. Cc: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161202184750.3843-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0798cff46bb2fc9ac24d5d465216db235a8f11f6 Author: Chris Wilson Date: Mon Dec 5 14:29:41 2016 +0000 drm/i915/execlists: Use list_safe_reset_next() instead of opencoding list.h provides a macro for updating the next element in a safe list-iter, so let's use it so that it is hopefully clearer to the reader about the unusual behaviour, and also easier to grep. Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdb821ca44d753594ff65df4b7cfe05c5d908719 Author: Chris Wilson Date: Mon Dec 5 14:29:40 2016 +0000 drm/i915: Enable swfence debugobject support for i915.ko Only once the debugobject symbols are exported can we enable support for debugging swfences when i915 is built as a module. Requires commit 2617fdca3f68 ("lib/debugobjects: export for use in modules") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 778e23a9e05b7a59e9dbd3f9d9c9395f2f977fc7 Author: Chris Wilson Date: Mon Dec 5 14:29:39 2016 +0000 drm/i915: Implement local atomic_state_free callback As we use debugobjects to track the lifetime of fences within our atomic state, we ideally want to mark those objects as freed along with their containers. This merits us hookin into config->funcs->atomic_state_free for this purpose. This allows us to enable debugobjects for sw-fences without triggering known issues. Fixes: fc1584059d6c ("drm/i915: Integrate i915_sw_fence with debugobjects") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7d1d9aea3ee0e3aa285431c0fcfb05be8f6ec5f4 Author: Chris Wilson Date: Mon Dec 5 14:29:38 2016 +0000 drm/i915: Tidy i915_gem_valid_gtt_space() We can replace a couple of tests with an assertion that the passed in node is already allocated (as matches the existing call convention) and by a small bit of refactoring we can bring the line lengths to under 80cols. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 172ae5b4c8c104af56804bf2406014849ed6fa37 Author: Chris Wilson Date: Mon Dec 5 14:29:37 2016 +0000 drm/i915: Fix i915_gem_evict_for_vma (soft-pinning) Soft-pinning depends upon being able to check for availabilty of an interval and evict overlapping object from a drm_mm range manager very quickly. Currently it uses a linear list, and so performance is dire and not suitable as a general replacement. Worse, the current code will oops if it tries to evict an active buffer. It also helps if the routine reports the correct error codes as expected by its callers and emits a tracepoint upon use. For posterity since the wrong patch was pushed (i.e. that missed these key points and had known bugs), this is the changelog that should have been on commit 506a8e87d8d2 ("drm/i915: Add soft-pinning API for execbuffer"): Userspace can pass in an offset that it presumes the object is located at. The kernel will then do its utmost to fit the object into that location. The assumption is that userspace is handling its own object locations (for example along with full-ppgtt) and that the kernel will rarely have to make space for the user's requests. This extends the DRM_IOCTL_I915_GEM_EXECBUFFER2 to do the following: * if the user supplies a virtual address via the execobject->offset *and* sets the EXEC_OBJECT_PINNED flag in execobject->flags, then that object is placed at that offset in the address space selected by the context specifier in execbuffer. * the location must be aligned to the GTT page size, 4096 bytes * as the object is placed exactly as specified, it may be used by this execbuffer call without relocations pointing to it It may fail to do so if: * EINVAL is returned if the object does not have a 4096 byte aligned address * the object conflicts with another pinned object (either pinned by hardware in that address space, e.g. scanouts in the aliasing ppgtt) or within the same batch. EBUSY is returned if the location is pinned by hardware EINVAL is returned if the location is already in use by the batch * EINVAL is returned if the object conflicts with its own alignment (as meets the hardware requirements) or if the placement of the object does not fit within the address space All other execbuffer errors apply. Presence of this execbuf extension may be queried by passing I915_PARAM_HAS_EXEC_SOFTPIN to DRM_IOCTL_I915_GETPARAM and checking for a reported value of 1 (or greater). v2: Combine the hole/adjusted-hole ENOSPC checks v3: More color, more splitting, more blurb. Fixes: 506a8e87d8d2 ("drm/i915: Add soft-pinning API for execbuffer") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_gem_evict.c | 104 ++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/i915_trace.h | 28 ++++++++ drivers/gpu/drm/i915/i915_vma.c | 2 +- 5 files changed, 111 insertions(+), 27 deletions(-) commit 85fd4f58d7efb7bb7ec577eb00dc2c3f2457a452 Author: Chris Wilson Date: Mon Dec 5 14:29:36 2016 +0000 drm/i915: Mark all non-vma being inserted into the address spaces We need to distinguish between full i915_vma structs and simple drm_mm_nodes when considering eviction (i.e. we must be careful not to treat a mere drm_mm_node as a much larger i915_vma causing memory corruption, if we are lucky). To do this, color these not-a-vma with -1 (I915_COLOR_UNEVICTABLE). v2...v200: New name for -1. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/aperture_gm.c | 7 +++++-- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 3 ++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 11 ++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) commit 721d484563e1a51ada760089c490cbc47e909756 Author: Hans de Goede Date: Fri Dec 2 15:29:04 2016 +0100 drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating On my Cherrytrail CUBE iwork8 Air tablet PIPE-A would get stuck on loading i915 at boot 1 out of every 3 boots, resulting in a non functional LCD. Once the i915 driver has successfully loaded, the panel can be disabled / enabled without hitting this issue. The getting stuck is caused by vlv_init_display_clock_gating() clearing the DPOUNIT_CLOCK_GATE_DISABLE bit in DSPCLK_GATE_D when called from chv_pipe_power_well_ops.enable() on driver load, while a pipe is enabled driving the DSI LCD by the BIOS. Clearing this bit while DSI is in use is a known issue and intel_dsi_pre_enable() / intel_dsi_post_disable() already set / clear it as appropriate. This commit modifies vlv_init_display_clock_gating() to leave the DPOUNIT_CLOCK_GATE_DISABLE bit alone fixing the pipe getting stuck. Changes in v2: -Replace PIPE-A with "a pipe" or "the pipe" in the commit msg and comment Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97330 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161202142904.25613-1-hdegoede@redhat.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_runtime_pm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e339d67eeb0270d6520eb299655fec573409159c Author: Ville Syrjälä Date: Mon Nov 28 19:37:17 2016 +0200 drm/i915: Pass crtc state to vlv_compute_wm_level() Rather than accessing crtc->config in vlv_compute_wm_level() let's pass in the crtc state explicitly. One step closer to atomic. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-16-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit fa292a4be9914a4f0dbfe9b2f8f1f8b5af942dc3 Author: Ville Syrjälä Date: Mon Nov 28 19:37:16 2016 +0200 drm/i915: Clean up vlv_program_watermarks() Add small helpers to make the intent of the staggered enable/disable sequence in vlv_program_watermarks() easier on the eyes. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-15-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 44 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 18 deletions(-) commit 50f4caef8679f51d29f0238e7efa5daf64472b36 Author: Ville Syrjälä Date: Mon Nov 28 19:37:15 2016 +0200 drm/i915: Write all DDL registers in one go We'll want to decouple the vlv/chv wm register reprogramming from any single pipe. So let's just write all the DDL registers in one go. We already write all the wm registers anyway since the bits are sprinkled all over the place and so writing them for just a single pipe would have been too messy anyway. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-14-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 6fe6a7ffd380d4a28c0086ec74751e9e738c01ed Author: Ville Syrjälä Date: Mon Nov 28 19:37:14 2016 +0200 drm/i915: Zero out HOWM registers before writing new WM/HOWM register values On VLV/CHV some of the watermark values are split across two registers: low order bits in one, and high order bits in another. So we may not be able to update a single watermark value atomically, and thus we must be careful that we don't temporarily introduce out of bounds values during the reprogramming. To prevent this we can simply zero out all the high order bits initially, then we update the low order bits, and finally we update the high order bits with the final value. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-13-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 11a85d6ab11440c87ff22bcdaa3b97dd5748ae14 Author: Ville Syrjälä Date: Mon Nov 28 19:37:12 2016 +0200 drm/i915: Skip vblank wait if cxsr was already off Before we attempt to turn any planes on or off we must first exit csxr. That's due to cxsr effectively making the plane enable bits read-only. Currently we achieve that with a vblank wait right after toggling the cxsr enable bit. We do the vblank wait even if cxsr was already off, which seems wasteful, so let's try to only do it when absolutely necessary. We could start tracking the cxsr state fully somewhere, but for now it seems easiest to just have intel_set_memory_cxsr() return the previous cxsr state. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-11-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 10 ++++------ drivers/gpu/drm/i915/intel_pm.c | 31 ++++++++++++++++++++++++------- 3 files changed, 29 insertions(+), 14 deletions(-) commit 3d90e649fa3da5c6e5cb72700584689eb6260082 Author: Ville Syrjälä Date: Mon Nov 28 19:37:11 2016 +0200 drm/i915: Protect cxsr state with wm_mutex Let's protect the cxsr state with the wm_mutex, since it might get poked from multiple places if there's a parallel plane update happening with a pipe getting enable/disabled. It's still pretty racy for the old platforms, but for vlv/chv it should work, I think. If not, we'll improve it later anyway. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 2 -- drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) commit 7c951c0025d10b1a568fd27754dc4b6384a50f2e Author: Ville Syrjälä Date: Mon Nov 28 19:37:10 2016 +0200 drm/i915: Pass around dev_priv in vlv wm functions Passing dev_priv instead of dev is the future. Let's make the vlv/chv wm functions respect that idea. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-9-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 26cca0e5f32418a03c1c87bd5d5813612052b1c3 Author: Ville Syrjälä Date: Mon Nov 28 19:37:09 2016 +0200 drm/i915: Introduce vlv_invert_wm_value() Add a small helper to do invert the vlv/chv values. Less fragile perhaps, and let's us clearly mark all overlarge wateramarks as disabled (by just making them all USHRT_MAX). Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-8-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 1b31389cd0e61480950ac366d76a335066af19e2 Author: Ville Syrjälä Date: Mon Nov 28 19:37:08 2016 +0200 drm/i915: Organize vlv/chv watermarks by plane_id Store the vlv/chv watermark values in straight up arrays indexed by enum plane_id. Avoids a lot of useless checks for the plane type when we don't have to think which structure member we need to access. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-7-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.h | 16 ++- drivers/gpu/drm/i915/intel_pm.c | 209 ++++++++++++++++------------------------ 2 files changed, 92 insertions(+), 133 deletions(-) commit 6b6b3eeffb0089c987a2ad66f2050d397dea6241 Author: Ville Syrjälä Date: Mon Nov 28 19:37:07 2016 +0200 drm/i915: Remove duplicated wm setup for vlv and chv The code for vlv and chv wm latency/function pointer setup is identical. Drop one of the copies. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-6-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 50a9dd3f24e1478ce143bf2876b0680f2038c503 Author: Ville Syrjälä Date: Mon Nov 28 19:37:06 2016 +0200 drm/i915: Clean up VLV/CHV maxfifo watermark setup Let's compute the maxfifo watermarks using max() instead of min(). Can't even recall why I did it the other way originally. Anyways using max() avoids having to initialize the watermarks to the max value first. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 1be4d3793d5a93daddcd9be657c429b38ad750a3 Author: Ville Syrjälä Date: Mon Nov 28 19:37:05 2016 +0200 drm/i915: Fix the level 0 max_wm hack on VLV/CHV The watermark should never exceed the FIFO size, so we need to check against the current FIFO size instead of the theoretical maximum when we clamp the level 0 watermark. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddd2b792cc942adfc31288dabf5d22886c31193f Author: Ville Syrjälä Date: Mon Nov 28 19:37:04 2016 +0200 drm/i915: Use the ilk_disable_lp_wm() return value ilk_disable_lp_wm() will tell us whether the LP1+ watermarks were disabled or not, and hence whether we need to for the vblank wait or not. Let's use that information to eliminate some useless vblank waits. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3125d39fe62eff2895f75671b07ae972bb2d8124 Author: Ville Syrjälä Date: Mon Nov 28 19:37:03 2016 +0200 drm/i915: Drop the nop intel_update_watermarks() call from haswell_crtc_enable() HSW+ all use the .initial_watermarks() hook, so there's no point in calling intel_update_watermarks() from HSW+ specific code. We'll still hang on to the .initial_watermarks NULL check since theoretically if the memory latencies are not populated we would not populate the function pointer either. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 22a2c8e0457f5d66db0819a49beb8c119d8f7a97 Author: Dhinakaran Pandiyan Date: Tue Nov 15 12:59:06 2016 -0800 drm/i915: Validate mode against max. link data rate for DP MST Not validating the mode rate against max. link rate results in not pruning invalid modes. For e.g, a HBR2 5.4 Gbps 2-lane configuration does not support 4k@60Hz. But, we do not reject this mode. So, make use of the helpers in intel_dp to validate mode data rate against max. link data rate of a configuration. v3: Renamed local variables again for consistency (Manasi) v2: Renamed mode data rate local variable to be more explanatory. Signed-off-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1479243546-17189-1-git-send-email-dhinakaran.pandiyan@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) commit fd81c44eba9ca1e78d0601f37b5d7819df522aa7 Author: Dhinakaran Pandiyan Date: Mon Nov 14 13:50:20 2016 -0800 drm/i915: Fix DP link rate math We store DP link rates as link clock frequencies in kHz, just like all other clock values. But, DP link rates in the DP Spec. are expressed in Gbps/lane, which seems to have led to some confusion. E.g., for HBR2 Max. data rate = 5.4 Gbps/lane x 4 lane x 8/10 x 1/8 = 2160000 kBps where, 8/10 is for channel encoding and 1/8 is for bit to Byte conversion Using link clock frequency, like we do Max. data rate = 540000 kHz * 4 lanes = 2160000 kSymbols/s Because, each symbol has 8 bit of data, this is 2160000 kBps and there is no need to account for channel encoding here. But, currently we do 540000 kHz * 4 lanes * (8/10) = 1728000 kBps Similarly, while computing the required link bandwidth for a mode, there is a mysterious 1/10 term. This should simply be pixel_clock kHz * (bpp/8) to give the final result in kBps v2: Changed to DIV_ROUND_UP() and comment changes (Ville) Signed-off-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1479160220-17794-1-git-send-email-dhinakaran.pandiyan@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 3c30c7f7b09a0eec58cb43f96705877f66975057 Author: Imre Deak Date: Fri Dec 2 18:35:41 2016 +0200 drm/i915: Add I2C and DP-AUX char devices to debug kconfig These char devices exposing the driver's I2C and DP-AUX adapters for user space tools are useful to debug display output related issues. Enable them with the rest of additional driver debug options. Suggested-by: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480696541-13697-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) commit d15697de60db5570532fdedb8e13b2251d65b8e3 Author: Alexey Khoroshilov Date: Sat Dec 3 00:52:46 2016 +0300 adm80211: add checks for dma mapping errors The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Kalle Valo drivers/net/wireless/admtek/adm8211.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit e54a8c4b5753d1c427c8fec7f9e43e7c22ec00cc Author: Dan Carpenter Date: Wed Nov 30 22:21:56 2016 +0300 mwifiex: clean up some messy indenting These lines were indented one tab extra. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93cd6fa6806cb3455e8231578840afb031606352 Merge: ce6612d f03ee46 Author: Daniel Vetter Date: Mon Dec 5 09:52:17 2016 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Resync, and we need all the fancy new drm_mm stuff to implement more efficient evict algorithms for softpin. Signed-off-by: Daniel Vetter commit ce6612d6844701a5b5a162f201103240c07abd9e Author: Daniel Vetter Date: Mon Dec 5 09:25:26 2016 +0100 drm/i915: Update DRIVER_DATE to 20161205 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29e90cd79f523e6cfbccf4d2b106bebaaac9cdcc Author: Brian Masney Date: Sat Dec 3 21:19:29 2016 -0500 staging: iio: isl29028: made alignment of #defines consistent The alignment of the #defines at the top of the file is not consistent. This changes all of the defines to use consistent alignment to improve the code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) commit 58f643669e872b9293603bd4ae19df796cb4b78a Author: Brian Masney Date: Sat Dec 3 21:19:27 2016 -0500 staging: iio: isl29028: remove chip test and defaults from isl29028_chip_init() isl29028_chip_init() contains the device driver defaults and two I2C calls that detect the presence of the chip. This patch moves these into isl29028_probe() so that this function can be used by the power management runtinme in a followup patch. This patch also renames isl29028_chip_init() to isl29028_chip_init_and_power_on(). Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit f40531d1e7848cf49f323f91a653d16caac27431 Author: Brian Masney Date: Sat Dec 3 21:19:25 2016 -0500 staging: iio: isl29028: remove nested if statements There are two callers to the function isl29028_set_als_ir_mode() and both instances use a nested if statement to only change the chip state if it is not in the proper mode. This patch moves this check into the isl29028_set_als_ir_mode() function to remove the nested if statements. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 91ca1a8c584f55857b1f6ab20a1d3a1ce7a559bb Author: Pan Bian Date: Sat Dec 3 21:44:30 2016 +0800 staging: iio: cdc: fix improper return value At the end of function ad7150_write_event_config(), directly returns 0. As a result, the errors will be ignored by the callers. It may be better to return variable "ret". Signed-off-by: Pan Bian Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db4e5376d058af8924fafd0520a0942d92538d0e Author: Pan Bian Date: Sat Dec 3 17:24:17 2016 +0800 iio: light: fix improper return value In function cm3232_reg_init(), it returns 0 even if the last call to i2c_smbus_write_byte_data() returns a negative value (indicates error). As a result, the return value may be inconsistent with the execution status, and the caller of cm3232_reg_init() will not be able to detect the error. This patch fixes the bug. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188641 Signed-off-by: Pan Bian Signed-off-by: Jonathan Cameron drivers/iio/light/cm3232.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67351df7f134d2f0de9a8602e9351f59b7fd64b0 Author: Amit Kumar Kushwaha Date: Wed Nov 30 15:24:10 2016 +0000 staging: iio: replace symbolic permission This patch fixes the following checkpatch.pl warning in ad7150.c WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred Occured during build. Signed-off-by: Amit Kushwaha Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a96cd0f901eecd9589477cc2cd46bdb4f1f3e49a Author: Srinivas Pandruvada Date: Mon Nov 28 14:41:16 2016 -0800 iio: accel: hid-sensor-accel-3d: Add timestamp Added timestamp channel. With this change, each sample has a timestamp. This timestamp can be from the sensor hub when present or local kernel timestamp. HID sensors can send timestamp with input data using usage id HID_USAGE_SENSOR_TIME_TIMESTAMP. This timestamp value is converted to nano seconds before pushing this sample to the iio core. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/accel/hid-sensor-accel-3d.c | 32 ++++++++++++++----- .../iio/common/hid-sensors/hid-sensor-attributes.c | 36 +++++++++++++++++++--- include/linux/hid-sensor-hub.h | 4 +++ include/linux/hid-sensor-ids.h | 1 + 4 files changed, 60 insertions(+), 13 deletions(-) commit 902c4b2446d468cc6e4940db1aa72ee4d144dd35 Author: David Lechner Date: Mon Nov 28 10:58:15 2016 -0600 iio: adc: New driver for TI ADS7950 chips This adds a new driver for the TI ADS7950 family of ADC chips. These communicate using SPI and come in 8/10/12-bit and 4/8/12/16 channel varieties. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 13 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-ads7950.c | 490 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 504 insertions(+) commit 071cf2494361fd856f1a6781f9c554da67e35e3c Author: Aniroop Mathur Date: Sat Nov 26 09:17:26 2016 +0530 IIO: Change msleep to usleep_range for small msecs msleep(1~20) may not do what the caller intends, and will often sleep longer. (~20 ms actual sleep for any value given in the 1~20ms range) This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, data reading time, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: Aniroop Mathur Signed-off-by: Jonathan Cameron drivers/iio/adc/exynos_adc.c | 2 +- drivers/iio/pressure/bmp280-core.c | 14 +++++++------- drivers/staging/iio/meter/ade7753.c | 2 +- drivers/staging/iio/meter/ade7753.h | 2 +- drivers/staging/iio/meter/ade7754.c | 2 +- drivers/staging/iio/meter/ade7754.h | 2 +- drivers/staging/iio/meter/ade7758.h | 2 +- drivers/staging/iio/meter/ade7758_core.c | 2 +- drivers/staging/iio/meter/ade7759.c | 2 +- drivers/staging/iio/meter/ade7759.h | 2 +- drivers/staging/iio/meter/ade7854.c | 2 +- drivers/staging/iio/meter/ade7854.h | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) commit 160d95870c8a44480fad49dc09fa4f0cc04e7098 Author: Reto Schneider Date: Mon Oct 12 01:44:51 2015 +0200 iio: adis16203: Fix copyright year The copyright year can not be in the future. Signed-off-by: Reto Schneider Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58401bd40b3db269fffb02c0bdcbf3ecb43a63cf Author: Reto Schneider Date: Sun Nov 20 22:11:24 2016 +0100 iio: adis1620x: Fix mixed up device descriptions The module descriptions for the ADIS 16201, 16203 and 16209 drivers do not match the actual function of the devices. Update them accordingly to fix this. Signed-off-by: Reto Schneider Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201_core.c | 4 ++-- drivers/staging/iio/accel/adis16203_core.c | 4 ++-- drivers/staging/iio/accel/adis16209_core.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 32b28076801cadf67eb8fce9aba09a9f08ef9c99 Author: Martin Kepplinger Date: Mon Nov 21 20:53:54 2016 +0100 iio: accel: mma8452: define unsigned return values where appropriate smatch warned: sval_binop_signed: invalid divide LLONG_MIN/-1 and this fixes it. It's actually good to have, in order to avoid accidental checking for negative return values here. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25fc503e2dca093b63e335e4b4ec2226df947601 Author: Shrirang Bagul Date: Thu Nov 24 17:07:54 2016 +0800 iio: humidity: Support acpi probe for hts211 Support driver probe by reading unique HID on systems based on ACPI instead of DT compatible strings. Signed-off-by: Shrirang Bagul Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_i2c.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9d317724cfeb9b64acf57028183e307bea39e4e6 Author: Shrirang Bagul Date: Thu Nov 24 13:33:45 2016 +0800 iio: st_pressure: Support i2c probe using acpi Compatible strings are not available on ACPI based systems. This patch adds support to use DSDT information read from platform BIOS instead for probing st pressure sensors. Signed-off-by: Shrirang Bagul Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure.h | 8 ++++++ drivers/iio/pressure/st_pressure_i2c.c | 51 +++++++++++++++++++++++++--------- 2 files changed, 46 insertions(+), 13 deletions(-) commit 89a2a93f3bf1e0d3168d454fe7fa207be981cb83 Author: Shrirang Bagul Date: Thu Nov 24 13:33:44 2016 +0800 iio: st_accel: Support sensor i2c probe using acpi Add support to probe st_accel sensors on i2c bus using ACPI. Compatible strings are not avaialable on ACPI based systems. Signed-off-by: Shrirang Bagul Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel.h | 18 ++++++++++ drivers/iio/accel/st_accel_i2c.c | 73 +++++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 24 deletions(-) commit 3dc59262f76241b342316bbac8b5ffe138995b2d Author: Shrirang Bagul Date: Thu Nov 24 13:33:43 2016 +0800 iio: st_sensors: match sensors using ACPI handle Add support to match st sensors using information passed from ACPI DST tables. Signed-off-by: Shrirang Bagul Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_i2c.c | 20 ++++++++++++++++++++ include/linux/iio/common/st_sensors_i2c.h | 9 +++++++++ 2 files changed, 29 insertions(+) commit 01a551971c0fb1739dbe61f60105323a1f8827ad Author: Rodrigo Vivi Date: Thu Nov 17 11:17:36 2016 -0800 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C. According to Bspec we need to "Poll for PORT_REF_DW3_A grc_done == 1b" only on ports B and C initialization sequence when copying rcomp from port A. So let's follow the spec and only poll for that case and not on every port A initialization. v2: Also remove the grc_done check from bxt_ddi_phy_is_enabled() otherwise it might believe it is disabled and force it to re program. Cc: Imre Deak Cc: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1479410256-25735-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dpio_phy.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit e9c9882556fc92f053f81195f75845ec362a9050 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:57 2016 +0200 drm/i915/glk: Configure number of sprite planes properly Geminilake has 4 planes (3 sprites) per pipe. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-10-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_device_info.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b817c440c1e854f547ba481bec5608f9d9709bcf Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:56 2016 +0200 drm/i915/glk: Implement core display init/uninit sequence for geminilake The sequence is pretty much the same as broxton, except that bspec requires the AUX domains to be enabled. But since those can't be enabled before the phys are initialized, we just use the same sequence as broxton. v2: Don't manually enable AUX domains. (Ander) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-9-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09d093869feb09f098ac7bd28a8dbadccff79216 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:55 2016 +0200 drm/i915/glk: Allow dotclock up to 2 * cdclk on geminilake Geminilake has double wide pipes so it can output two pixels per CD clock. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-8-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 89b3c3c7ee9d9be319b90af3d52f00feba04f1d8 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:54 2016 +0200 drm/i915/glk: Reuse broxton's cdclk code for GLK Geminilake has the same register layout, reference clock and programming sequence as broxton. The difference is that it doesn't support the 1.5 divider and has different ratios, but a lot of code can be shared between the two platforms. v2: Rebase (s/broxton/bxt). v3: Fix vco calculation in glk_de_pll_vco(). Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-7-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 73 ++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 8 deletions(-) commit f7044dd904d7a97967af097515da272fa89b00e9 Author: Madhav Chauhan Date: Fri Dec 2 10:23:53 2016 +0200 drm/i915/glk: Update Port PLL enable sequence for Geminilkae Add steps for enabling and disabling Port PLL as per bspec. Signed-off-by: Madhav Chauhan Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-6-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 51b3ee35affa3695bd89f6c6cdb22cd65aff5155 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:52 2016 +0200 drm/i915/glk: Set DCC delay range 2 in PLL enable sequence Follow the PLL enable sequence updated in bspec, which requires the DCC delay range 2 bit to be set. v2: Moved from DDI init sequence to PLL enable. v3: Don't read value from GRP register. (Rodrido) Cc: Rodrigo Vivi Signed-off-by: Ander Conselvan De Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-5-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 6 ++++++ 2 files changed, 21 insertions(+) commit 0a116ce895e7ee2831c6304df246c40a33bcf454 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:51 2016 +0200 drm/i915/glk: Implement Geminilake DDI init sequence Implement the DDI initsequence and add information about the different phys in GLK. v2: Rebase on the move of phys to be power wells. v3: Rebase on addition of struct bxt_ddi_phy_info. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-4-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 +- drivers/gpu/drm/i915/i915_reg.h | 17 +++-- drivers/gpu/drm/i915/intel_dpio_phy.c | 114 +++++++++++++++++++++++++++----- drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 39 +++++++++++ 5 files changed, 155 insertions(+), 24 deletions(-) commit 0d03926de530057a15fe1ef735cb7f88716833cd Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:50 2016 +0200 drm/i915/glk: Add power wells for Geminilake Geminilake has power wells are similar to SKL, but with the misc IO well being split into separate AUX IO wells. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-3-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_reg.h | 6 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 114 +++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 3 deletions(-) commit cc3f90f0633c5f08044ba898e3fbf942d2e26cb3 Author: Ander Conselvan de Oliveira Date: Fri Dec 2 10:23:49 2016 +0200 drm/i915/glk: Reuse broxton code for geminilake Geminilake is mostly backwards compatible with broxton, so change most of the IS_BROXTON() checks to IS_GEN9_LP(). Differences between the platforms will be implemented in follow-up patches. v2: Don't reuse broxton's path in intel_update_max_cdclk(). Don't set plane count as in broxton. v3: Rebase v4: Include the check intel_bios_is_port_hpd_inverted(). Commit message. v5: Leave i915_dmc_info() out; glk's csr version != bxt's. (Rodrigo) v6: Rebase. v7: Convert a few mode IS_BROXTON() occurances in pps, ddi, dsi and pll code. (Rodrigo) v8: Squash a couple of DDI patches with more conversions. (Rodrigo) Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1480667037-11215-2-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- drivers/gpu/drm/i915/i915_irq.c | 10 +++++----- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 26 +++++++++++++------------- drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- drivers/gpu/drm/i915/intel_dp.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/intel_dpio_phy.c | 1 - drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +- drivers/gpu/drm/i915/intel_dsi.c | 30 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_dsi_pll.c | 12 ++++++------ drivers/gpu/drm/i915/intel_hdmi.c | 6 +++--- drivers/gpu/drm/i915/intel_i2c.c | 4 ++-- drivers/gpu/drm/i915/intel_mocs.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 6 +++--- drivers/gpu/drm/i915/intel_runtime_pm.c | 6 +++--- 18 files changed, 84 insertions(+), 85 deletions(-) commit 8bf41b7298b3b20de3f4a4e70ab58042648f963e Author: Imre Deak Date: Mon Nov 28 17:29:27 2016 +0200 drm/i915/gen6+: Clear upper data byte during PCODE write The spec calls for the upper data byte to be cleared before most of the PCODE write commands, for others like IPS control it doesn't say anything about this byte. Let's clear it in case it's clobbered somehow, especially that there are places where we only do a PCODE write without a preceding PCODE read. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480346969-16121-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_pm.c | 1 + 1 file changed, 1 insertion(+) commit f55d23be11ed15f493957246f3b81fc530e79d70 Author: Libin Yang Date: Thu Dec 1 13:17:19 2016 +0800 drm/i915/audio: extend audio sync rate support for DP MST Remove the type judgement in i915_audio_component_sync_audio_rate(). Audio rate sync is necessary for all i915 digital audio now. Signed-off-by: Libin Yang Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480569439-54252-2-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/intel_audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 31613268c0a6f7abdb0c19487a084249bcf203ba Author: Libin Yang Date: Thu Dec 1 13:17:18 2016 +0800 drm/i915/audio: extend get_saved_enc() to support more scenarios In initialization, audio driver will call functions get_eld() and etc. But at that time, audio driver may not know whether it is DP MST or not. In the original function get_saved_enc(), if it is DP MST, it requires to set the pipe to the correct value, otherwise, pipe to be -1. Although audio driver can get the knowledge whether it is in DP MST mode or not by reading the codec register. It will drop performance each time before it calls the get_eld and other similar functions. As gfx driver can easily know whether it is in DP MST mode or not. Let's extend the get_saved_enc() function to handle the situation that audio driver still sends the device id info even it is in DP SST mode and return the correct intel_encoder instead of panic. Signed-off-by: Libin Yang Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480569439-54252-1-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/intel_audio.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit a9a251c2aea5aaeb004eac4e6c2b86383347ce9f Author: Matthew Auld Date: Fri Dec 2 10:24:11 2016 +0000 drm/i915: make i915_suspend_switcheroo static Looks like this was missed when unexporting, so let's keep sparse happy. Cc: Tvrtko Ursulin Fixes: 7f26cb88014a ("drm/i915: Unexport VGA switcheroo functions") Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161202102411.19831-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ea8b4a8ef80626dce698041577321662d9d47a Author: Tvrtko Ursulin Date: Fri Dec 2 08:43:53 2016 +0000 drm/i915: Fix kerneldoc for intel_guc_fini Recent refactoring forgot to update this one. Signed-off-by: Tvrtko Ursulin Fixes: bf9e8429ab97 ("drm/i915: Make various init functions take dev_priv") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480668233-25372-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93de056babc5f0e3df04f0c3cf29e54204d0e65d Author: Ander Conselvan de Oliveira Date: Tue Nov 29 13:48:47 2016 +0200 drm/i915: Fix intel_psr_init() kerneldoc In commit c39055b072f8 ("drm/i915: Pass dev_priv to intel_setup_outputs()"), I forgot to update the kerneldoc for intel_psr_init() init, leading to warnings when building the documentation: drivers/gpu/drm/i915/intel_psr.c:822: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/intel_psr.c:822: warning: Excess function parameter 'dev' description in 'intel_psr_init' Fixes: c39055b072f8 ("drm/i915: Pass dev_priv to intel_setup_outputs()") Cc: Ander Conselvan de Oliveira Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1480420127-11382-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 192aa18142b28fdcb63b12984e02466ced382a54 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:45 2016 +0000 drm/i915: Make intel_pm_setup take dev_priv Function actually wants dev_priv so give it to it. v2: Commit message. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1480601805-14391-2-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) commit af6dc7425b359519cdc9399b19029a037827dd21 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:44 2016 +0000 drm/i915: Make i915_save/restore_state and intel_i2c_reset take dev_priv dev_priv is more appropriate since it is used much more in these. v2: Commit message and keep the local pdev variable. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_suspend.c | 16 +++++++--------- drivers/gpu/drm/i915/intel_i2c.c | 8 +++----- 4 files changed, 15 insertions(+), 19 deletions(-) commit 12ff05e750dff5ae098e8b2803363d9707214735 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:43 2016 +0000 drm/i915: Make i915_destroy_error_state take dev_priv Since it does not need dev at all. Also change the stored pointer in struct i915_error_state_file_priv to i915. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_gpu_error.c | 5 ++--- drivers/gpu/drm/i915/i915_sysfs.c | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) commit 401964465f04f3c01dd7ddfe6b5149bc33eaa509 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:42 2016 +0000 drm/i915: Make gmbus setup take dev_priv Simplify the code by passing the right argument in. v2: Commit message. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_i2c.c | 8 +++----- 4 files changed, 8 insertions(+), 10 deletions(-) commit 7f26cb88014a748d03ecc0dcb6a5876f311b823d Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:41 2016 +0000 drm/i915: Unexport VGA switcheroo functions They are only used in i915_drv.c so a forward declaration is enough. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 5 ++++- drivers/gpu/drm/i915/i915_drv.h | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) commit da5f53bf3c3ad5ffcb88b2892a9c02ece2ad140f Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:40 2016 +0000 drm/i915: dev_priv cleanup in bridge/bar/mmio init code dev_priv is more appropriate for these so converting saves some lines of source. v2: Commit message and keep the pdev local variable. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 45 ++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) commit cb15d9f8c30c868f6117d96b6fa58129785026f6 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:39 2016 +0000 drm/i915: More GEM init dev_priv cleanup Simplifies the code to pass the right parameter in. v2: Commit message. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 8 ++++---- drivers/gpu/drm/i915/i915_drv.h | 8 ++++---- drivers/gpu/drm/i915/i915_gem.c | 10 +++------- drivers/gpu/drm/i915/i915_gem_context.c | 5 ++--- 4 files changed, 13 insertions(+), 18 deletions(-) commit bf9e8429ab9747f584e692bad52a7a9f1787a4da Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:38 2016 +0000 drm/i915: Make various init functions take dev_priv Like GEM init, GUC init, MOCS init and context creation. Enables them to lose dev_priv locals. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 31 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_drv.h | 10 ++++----- drivers/gpu/drm/i915/i915_gem.c | 28 ++++++++++++------------- drivers/gpu/drm/i915/i915_gem_context.c | 31 +++++++++++++--------------- drivers/gpu/drm/i915/i915_guc_submission.c | 10 ++++----- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++--- drivers/gpu/drm/i915/intel_guc_loader.c | 33 ++++++++++++++---------------- drivers/gpu/drm/i915/intel_lrc.h | 2 +- drivers/gpu/drm/i915/intel_mocs.c | 5 ++--- drivers/gpu/drm/i915/intel_mocs.h | 2 +- drivers/gpu/drm/i915/intel_uc.h | 10 ++++----- 11 files changed, 77 insertions(+), 90 deletions(-) commit 12d79d78287cdc5323b4a589a2ca2ec16c5063fc Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:37 2016 +0000 drm/i915: Make GEM object create and create from data take dev_priv Makes all GEM object constructors consistent. v2: Fix compilation in GVT code. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen (v1) drivers/gpu/drm/i915/gvt/cmd_parser.c | 5 ++--- drivers/gpu/drm/i915/i915_drv.h | 9 +++++---- drivers/gpu/drm/i915/i915_gem.c | 20 ++++++++++---------- drivers/gpu/drm/i915/i915_gem_context.c | 5 +++-- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 5 +++-- drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++-- 12 files changed, 32 insertions(+), 30 deletions(-) commit 187685cb909881822f4eeaa5acdf80e25d7d1489 Author: Tvrtko Ursulin Date: Thu Dec 1 14:16:36 2016 +0000 drm/i915: Make GEM object alloc/free and stolen created take dev_priv Where it is more appropriate and also to be consistent with the direction of the driver. v2: Leave out object alloc/free inlining. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_gem.c | 5 ++--- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/i915_gem_internal.c | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 21 +++++++++------------ drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 3 +-- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 12 files changed, 24 insertions(+), 29 deletions(-) commit 908764f6d0bd1ba496cb8da33b9b98297ed27351 Author: Imre Deak Date: Tue Nov 29 21:40:29 2016 +0200 drm/i915/lspcon: Enable AUX interrupts for resume time initialization For LSPCON initialization during system resume we need AUX functionality, but we call the corresponding encoder reset hook with all interrupts disabled. Without interrupts we'll do a poll-wait for AUX transfer completions, which adds a significant delay if the transfers timeout/need to be retried for some reason. Fix this by enabling interrupts before calling the reset hooks. Note that while this will enable AUX interrupts it will keep HPD interrupts disabled, in a similar way to the init time output setup code. This issue existed since LSPCON support was added. v2: - Rebased on drm-tip. Cc: Shashank Sharma Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Tested-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/1480448429-27739-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3e4274f86e73388025c1507c10e1a785eae44488 Author: Ander Conselvan de Oliveira Date: Thu Nov 10 17:23:09 2016 +0200 drm/i915/glk: Add a IS_GEN9_LP() macro Broxton and Geminilake are both gen9lp platforms. To avoid adding IS_GEMINILAKE() checks everywhere alongside the IS_BROXTON() ones, add a IS_GEN9_LP() macro. v2: Rename macro parameter to dev_priv. (Joonas) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_pci.c | 1 + 2 files changed, 4 insertions(+) commit 8363e3c3947d0e22955f94a6a87e4f17ce5087b4 Author: Ander Conselvan de Oliveira Date: Thu Nov 10 17:23:08 2016 +0200 drm/i915/glk: Add Geminilake PCI IDs v2: Add new 0x3185 ID. (Joonas) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1478791400-21756-4-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 4 ++++ 2 files changed, 5 insertions(+) commit c22097fa47697f2f8fa1407ad012d3b987621e6a Author: Ander Conselvan de Oliveira Date: Mon Nov 14 16:25:26 2016 +0200 drm/i915/glk: Introduce Geminilake platform definition Geminilake is an Intel® Processor containing Intel® HD Graphics following Broxton. Let's start by adding the platform definition. PCI IDs and plaform specific code will follow. v2: Rebase (don't allow dev to be used with the new macro). v3: Update ddb size. (Matt) Rebase on s/preliminary_hw/alpha/ Cc: Matt Roper Cc: Rodrigo Vivi Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1479133526-32389-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 7 +++++++ 2 files changed, 9 insertions(+) commit 80fa66b6ad2befc11c93d9b74208110eaeaa6d41 Author: Rodrigo Vivi Date: Thu Dec 1 11:33:16 2016 +0200 drm/i915: Create a common GEN9_LP_FEATURE. The following LP platform inherits a lot of this platform So let's simplify here to re-use this later. v2: Keep ddb_size out of the new macro. v3: Rebase (has_decoupled_mmio). (Imre) Signed-off-by: Rodrigo Vivi Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1480584796-19466-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_pci.c | 47 ++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit cd8bddc4ab535009a3cdf700a14f10d75eda899c Author: Chris Wilson Date: Wed Nov 30 16:46:49 2016 +0000 drm/i915/perf: Treat u64 in uabi as a normal integer Forgo marking up the u64 integer representing a user pointer as this just annoys sparse. The conversion from u64 to a user pointer is managed by u64_to_user_ptr(). Fixes: eec688e1420d ("drm/i915: Add i915 perf infrastructure") Signed-off-by: Chris Wilson Cc: Robert Bragg Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161130164649.26809-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld include/uapi/drm/i915_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4881a48a85ccb8b100fb7cd4f4791f35b0a3f49 Author: Daniel Vetter Date: Wed Nov 30 12:01:31 2016 +0100 drm/i915: Remove dummy i915_kick_out_firmware_fb Since commit 44adece57e2604cec8527a499b48e4d584ab53b8 Author: Daniel Vetter Date: Wed Aug 10 18:52:34 2016 +0200 drm/fb-helper: Add a dummy remove_conflicting_framebuffers the drm helpers take care of this for us. Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161130110131.25668-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_drv.c | 7 ------- 1 file changed, 7 deletions(-) commit 6a259b1f8a9e99b1ed114f8bf8b0cfccee130e54 Author: Ville Syrjälä Date: Tue Nov 29 16:13:57 2016 +0200 drm/i915: Initialize dev_priv->atomic_cdclk_freq at init time Looks like we're only initializing dev_priv->atomic_cdclk_freq at resume and commit times, not at init time. Let's do that as well. We're now hitting the 'WARN_ON(intel_state->cdclk == 0)' in hsw_compute_linetime_wm() on account of populating intel_state->cdclk from dev_priv->atomic_cdclk_freq. Previously we were mispopulating intel_state->cdclk with dev_priv->cdclk_freq which always had a proper value at init time and hence the WARN_ON() didn't trigger. Cc: stable@vger.kernel.org Cc: Matthew Auld Reported-by: Matthew Auld Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98902 Fixes: e0ca7a6be38c ("drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1480428837-4207-1-git-send-email-ville.syrjala@linux.intel.com Tested-by: Matthew Auld Reviewed-by: Matthew Auld drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) commit 34ba5a80f249cd465d138705da138a82b4fe7e67 Author: Chris Wilson Date: Tue Nov 29 12:10:24 2016 +0000 drm/i915/guc: Split hw submission for replay after GPU reset Something I missed before sending off the partial series was that the non-scheduler guc reset path was broken (in the full series, this is pushed to the execlists reset handler). The issue is that after a reset, we have to refill the GuC workqueues, which we do by resubmitting the requests. However, if we already have submitted them, the fences within them have already been used and triggering them again is an error. Instead, just repopulate the guc workqueue. [ 115.858560] [IGT] gem_busy: starting subtest hang-render [ 135.839867] [drm] GPU HANG: ecode 9:0:0xe757fefe, in gem_busy [1716], reason: Hang on render ring, action: reset [ 135.839902] drm/i915: Resetting chip after gpu hang [ 135.839957] [drm] RC6 on [ 135.858351] ------------[ cut here ]------------ [ 135.858357] WARNING: CPU: 2 PID: 45 at drivers/gpu/drm/i915/i915_sw_fence.c:108 i915_sw_fence_complete+0x25/0x30 [ 135.858357] Modules linked in: rfcomm bnep binfmt_misc nls_iso8859_1 input_leds snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core btusb btrtl snd_hwdep snd_pcm 8250_dw snd_seq_midi hid_lenovo snd_seq_midi_event snd_rawmidi iwlwifi x86_pkg_temp_thermal coretemp snd_seq crct10dif_pclmul snd_seq_device hci_uart snd_timer crc32_pclmul ghash_clmulni_intel idma64 aesni_intel virt_dma btbcm snd btqca aes_x86_64 btintel lrw cfg80211 bluetooth gf128mul glue_helper ablk_helper cryptd soundcore intel_lpss_pci intel_pch_thermal intel_lpss_acpi intel_lpss acpi_als mfd_core kfifo_buf acpi_pad industrialio autofs4 hid_plantronics usbhid dm_mirror dm_region_hash dm_log sdhci_pci ahci sdhci libahci i2c_hid hid [ 135.858389] CPU: 2 PID: 45 Comm: kworker/2:1 Tainted: G W 4.9.0-rc4+ #238 [ 135.858389] Hardware name: /NUC6i3SYB, BIOS SYSKLi35.86A.0024.2015.1027.2142 10/27/2015 [ 135.858392] Workqueue: events_long i915_hangcheck_elapsed [ 135.858394] ffffc900001bf9b8 ffffffff812bb238 0000000000000000 0000000000000000 [ 135.858396] ffffc900001bf9f8 ffffffff8104f621 0000006c00000000 ffff8808296137f8 [ 135.858398] 0000000000000a00 ffff8808457a0000 ffff880845764e60 ffff880845760000 [ 135.858399] Call Trace: [ 135.858403] [] dump_stack+0x4d/0x65 [ 135.858405] [] __warn+0xc1/0xe0 [ 135.858406] [] warn_slowpath_null+0x18/0x20 [ 135.858408] [] i915_sw_fence_complete+0x25/0x30 [ 135.858410] [] i915_sw_fence_commit+0xd/0x30 [ 135.858412] [] __i915_gem_request_submit+0xe1/0xf0 [ 135.858413] [] i915_gem_request_submit+0x28/0x40 [ 135.858415] [] i915_guc_submit+0x47/0x210 [ 135.858417] [] i915_guc_submission_enable+0x468/0x540 [ 135.858419] [] intel_guc_setup+0x715/0x810 [ 135.858421] [] i915_gem_init_hw+0x114/0x2a0 [ 135.858423] [] i915_reset+0xe8/0x120 [ 135.858424] [] i915_reset_and_wakeup+0x157/0x180 [ 135.858426] [] i915_handle_error+0x1ab/0x230 [ 135.858428] [] ? scnprintf+0x4d/0x90 [ 135.858430] [] i915_hangcheck_elapsed+0x275/0x3d0 [ 135.858432] [] process_one_work+0x12f/0x410 [ 135.858433] [] worker_thread+0x43/0x4d0 [ 135.858435] [] ? process_one_work+0x410/0x410 [ 135.858436] [] ? process_one_work+0x410/0x410 [ 135.858438] [] kthread+0xd4/0xf0 [ 135.858440] [] ? kthread_park+0x60/0x60 v2: Only resubmit submitted requests v3: Don't forget the pending requests have reserved space. Fixes: d55ac5bf97c6 ("drm/i915: Defer transfer onto execution timeline to actual hw submission") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 37 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 4d357af49918e21dde6ecfb9b2f431fe0ab3eff8 Author: Chris Wilson Date: Tue Nov 29 12:10:23 2016 +0000 drm/i915/guc: Keep the execbuf client allocated across reset In order to avoid some complexity in trying to reconstruct the workqueues across reset, remember them instead. The issue comes when we have to handle a reset between request allocation and submission, the request has reserved space in the wq, but is not in any list so we fail to restore the reserved space. By keeping the execbuf client intact across the reset, we also keep the reservations. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 84 +++++++++++++++++++----------- 1 file changed, 53 insertions(+), 31 deletions(-) commit 597bdc8bb2e8a8318d9c19bc285a95532a9ffe52 Author: Chris Wilson Date: Tue Nov 29 12:10:22 2016 +0000 drm/i915/guc: Initialise doorbell cookie to matching value Set the initial value of the doorbell cookie from the client. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357248bfe592f8a34be5fb76bb8154710403785e Author: Chris Wilson Date: Tue Nov 29 12:10:21 2016 +0000 drm/i915/guc: Rename client->cookie to match use The client->cookie is a shadow of the doorbell->cookie value, so rename it to indicate its association with the doorbell, like the doorbell id and offset. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 6 +++--- drivers/gpu/drm/i915/intel_uc.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 334636c67e86afff9334b64e942bad80bbdf869f Author: Chris Wilson Date: Tue Nov 29 12:10:20 2016 +0000 drm/i915: Trim i915_guc_info() stack usage i915_guc_info() (part of debugfs output) tries to avoid holding struct_mutex for a long period by copying onto the stack. This causes a warning that the stack frame is massive, so stop doing that. We can even forgo holding the struct_mutex here as that doesn't serialise the values being read (and the lists used exist for the device lifetime). v2: Skip printing anything if guc->execbuf_client is disabled (avoids potential NULL dereference). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_debugfs.c | 46 ++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 26 deletions(-) commit 7f9e77545b92bcb894b8e2be5646535e8ba8da9e Author: Libin Yang Date: Mon Nov 28 20:07:07 2016 +0800 drm/i915: enable dp mst audio This patch adds support for DP MST audio in i915. Enable audio codec when DP MST is enabled if has_audio flag is set. Disable audio codec when DP MST is disabled if has_audio flag is set. Another separated patches to support DP MST audio will be implemented in audio driver. This patch is ported from commit 3708d5e082c3 ("drm/i915: start adding dp mst audio") And because commit 3708d5e082c3 ("drm/i915: start adding dp mst audio") breaks MST multi-monitor setups on some platforms, the orignal patch is reverted by commit be754b101f70 ("Revert "drm/i915: start adding dp mst audio"") As the multi-monitor setups issue is fixed, let's port the patch and enable the dp mst audio. Signed-off-by: Libin Yang Cc: Lyude Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480334827-112273-3-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/intel_dp_mst.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9935f7fa2854355203e3976762eecfb218079aac Author: Libin Yang Date: Mon Nov 28 20:07:06 2016 +0800 drm/i915: abstract ddi being audio enabled Prepare for using the same code for judging ddi being audio enabled. No functional changes. Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Libin Yang Reviewed-by: Lyude Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480334827-112273-2-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/intel_ddi.c | 20 +++++++++++++++----- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 17 insertions(+), 5 deletions(-) commit 9a148a96fc3a654ddcf142a7ab7db37b972ba5d8 Author: Libin Yang Date: Mon Nov 28 20:07:05 2016 +0800 drm/i915/debugfs: add dp mst info Add the DP MST info dump in debugfs. Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Libin Yang Reviewed-by: Lyude Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1480334827-112273-1-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit c6385c947f4d1526d823a16ea25daa93d2897997 Author: Chris Wilson Date: Tue Nov 29 12:42:05 2016 +0000 drm/i915: Fix tracepoint compilation drivers/gpu/drm/i915/./i915_trace.h: In function ‘trace_event_raw_event_i915_gem_evict’: drivers/gpu/drm/i915/./i915_trace.h:409:24: error: ‘struct i915_address_space’ has no member named ‘dev’ __entry->dev = vm->dev->primary->index; A couple of macros missed in the s/vm->dev/vm->i915/ conversion. Fixes: 49d73912cbfc ("drm/i915: Convert vm->dev backpointer to vm->i915") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129124205.19351-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- drivers/gpu/drm/i915/i915_trace.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) commit 24603935830b2bb2a8536ea1b68d49a9f82451fe Author: Chris Wilson Date: Wed Nov 23 15:07:14 2016 +0000 drm/i915/perf: Wrap 64bit divides in do_div() Just a couple of naked 64bit divides causing link errors on 32bit builds, with: ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined! v2: do_div() is only u64/u32, we need a u32/u64! v3: div_u64() == u64/u32, div64_u64() == u64/u64 Reported-by: kbuild test robot Fixes: d79651522e89 ("drm/i915: Enable i915 perf stream for Haswell OA unit") Signed-off-by: Chris Wilson Cc: Robert Bragg Link: http://patchwork.freedesktop.org/patch/msgid/20161123150714.24449-1-chris@chris-wilson.co.uk Reviewed-by: Robert Bragg drivers/gpu/drm/i915/i915_perf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 49d73912cbfcaa3eba109a44ee71200c12fa27ef Author: Chris Wilson Date: Tue Nov 29 09:50:08 2016 +0000 drm/i915: Convert vm->dev backpointer to vm->i915 99% of the time we access i915_address_space->dev we want the i915 device and not the drm device, so let's store the drm_i915_private backpointer instead. The only real complication here are the inlines in i915_vma.h where drm_i915_private is not yet defined and so we have to choose an alternate path for our asserts. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161129095008.32622-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 12 ++--- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 8 +-- drivers/gpu/drm/i915/i915_gem_gtt.c | 87 +++++++++++++++---------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 10 ++-- drivers/gpu/drm/i915/i915_vma.h | 6 +-- drivers/gpu/drm/i915/intel_display.c | 5 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- 10 files changed, 67 insertions(+), 69 deletions(-) commit 3aaa8aba9f414a24106015fa4b5fb099755af033 Author: Jérémy Lefaure Date: Mon Nov 28 18:43:19 2016 -0500 drm/i915: fix compilation warnings on maybe uninitialized pointers Two warnings are produced by gcc (tested with gcc 6.2.1): drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’: drivers/gpu/drm/i915/intel_csr.c:400:5: error: ‘fw’ is used uninitialized in this function [-Werror=uninitialized] if (fw) ^ and In file included from drivers/gpu/drm/i915/i915_drv.h:47:0, from drivers/gpu/drm/i915/intel_guc_loader.c:30: drivers/gpu/drm/i915/intel_guc_loader.c: In function ‘intel_guc_init’: ./include/drm/drmP.h:228:2: error: ‘fw’ may be used uninitialized in this function -Werror=maybe-uninitialized] drm_printk(KERN_DEBUG, DRM_UT_DRIVER, fmt, ##__VA_ARGS__) ^~~~~~~~~~ drivers/gpu/drm/i915/intel_guc_loader.c:595:25: note: ‘fw’ was declared here const struct firmware *fw; ^~ When CONFIG_DRM_I915_WERROR is set, those warnings break the build. Initializing fw pointer to NULL in both cases removes the warnings. Signed-off-by: Jérémy Lefaure Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161128234319.20800-1-jeremy.lefaure@lse.epita.fr drivers/gpu/drm/i915/intel_csr.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a18dbba8f01ffae229d00517994f84e7bfad4c49 Author: Zhi Wang Date: Tue Nov 29 14:55:16 2016 +0800 drm/i915: Move the release of PT page to the upper caller a PT page will be released if it doesn't contain any meaningful mappings during PPGTT page table shrinking. The PT entry in the upper level will be set to a scratch entry. Normally this works nicely, but in virtualization world, the PPGTT page table is tracked by hypervisor. Releasing the PT page before modifying the upper level PT entry would cause extra efforts. As the tracked page has been returned to OS before losing track from hypervisor, it could be written in any pattern. Hypervisor has to recognize if a page is still being used as a PT page by validating these writing patterns. It's complicated. Better let the guest modify the PT entry in upper level PT first, then release the PT page. Reviewed-by: Chris Wilson Reviewed-by: Michał Winiarski Cc: Michał Winiarski Cc: Michel Thierry Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhenyu Wang Cc: Zhiyuan Lv Signed-off-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/122697/msgid/1479728666-25333-1-git-send-email-zhi.a.wang@intel.com Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480402516-22275-1-git-send-email-zhi.a.wang@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit ddbb271aea87fc6004d3c8bcdb0710e980c7ec85 Author: Matthew Auld Date: Mon Nov 28 10:36:48 2016 +0000 drm/i915: drop the struct_mutex when wedged or trying to reset We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged or a reset is in progress we bail early but never seem to actually release the lock. Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") Cc: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161128103648.9235-1-matthew.auld@intel.com Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Cc: # v4.7+ drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70cd14761d8aeb5db19a410a0a85155e88bb8ad0 Author: Chris Wilson Date: Mon Nov 28 14:36:49 2016 +0000 Revert "drm/i915/execlists: Use a local lock for dfs_link access" This reverts commit 27745e829a5c ("drm/i915/execlists: Use a local lock for dfs_link access") as the struct_mutex was required to prevent concurrent retiring and freeing, now restored in the previous patch. Signed-off-by: Chris Wilson Cc: David Weinehall Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161128143649.4289-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 92117f0bce64268b841261774e45462cc7ff80af Author: Chris Wilson Date: Mon Nov 28 14:36:48 2016 +0000 drm/i915: Move priority bumping for flips earlier David found another issue with priority bumping from mmioflips, where we are accessing the requests concurrently to them being retired and freed. Whilst we are skipping the dependency if has been submitted, that is not sufficient to stop the dependency from disappearing if another thread retires that request. To prevent we can either employ the struct_mutex (or a request mutex in the future) to serialise retiring before it is freed. Alternatively, we need to keep the dependencies alive using RCU whilst they are being accessed via the DFS. [ 1746.698111] general protection fault: 0000 [#1] PREEMPT SMP [ 1746.698305] Modules linked in: snd_hda_intel snd_hda_codec snd_hwdep x86_pkg_temp_thermal snd_hda_core coretemp crct10dif_pclmul crc32_pclmul snd_pcm ghash_clmulni_intel mei_me mei i915 e1000e ptp pps_core i2c_hid [ 1746.698750] CPU: 1 PID: 6716 Comm: kworker/u8:2 Not tainted 4.9.0-rc6-CI-Nightly_816+ #1 [ 1746.698871] Hardware name: GIGABYTE GB-BKi7A-7500/MFLP7AP-00, BIOS F1 07/27/2016 [ 1746.699125] Workqueue: events_unbound intel_mmio_flip_work_func [i915] [ 1746.699266] task: ffff880260a5e800 task.stack: ffffc90000f6c000 [ 1746.699361] RIP: 0010:[] [] execlists_schedule+0x8d/0x300 [i915] [ 1746.699632] RSP: 0018:ffffc90000f6fcd8 EFLAGS: 00010206 [ 1746.699724] RAX: dead0000000000f8 RBX: ffff8801f64b2bf0 RCX: ffff8801f64b2c10 [ 1746.699842] RDX: dead000000000100 RSI: 0000000000000000 RDI: ffff8801f64b0458 [ 1746.699972] RBP: ffffc90000f6fd68 R08: ffff88026488dc00 R09: 0000000000000002 [ 1746.700090] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000400 [ 1746.700195] R13: ffffc90000f6fcf0 R14: ffff88020955aa40 R15: ffff88020955aa68 [ 1746.700307] FS: 0000000000000000(0000) GS:ffff88026dc80000(0000) knlGS:0000000000000000 [ 1746.700435] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1746.700532] CR2: 0000000002a69e90 CR3: 0000000002c07000 CR4: 00000000003406e0 [ 1746.700635] Stack: [ 1746.700682] ffff880260a5e880 ffffc90000f6fd50 ffffffff810af69a ffffc90000f6fd28 [ 1746.700827] ffff88020955a628 ffff8801e1eaebf0 0000000000000020 0000000000000000 [ 1746.700947] 00000196af1edc96 ffff88025dfa4000 ffff8801f0b030a8 ffffc90000f6fcf0 [ 1746.701071] Call Trace: [ 1746.701117] [] ? dequeue_entity+0x25a/0xb50 [ 1746.701260] [] fence_set_priority+0x7e/0x80 [i915] [ 1746.701406] [] i915_gem_object_wait_priority+0x85/0x160 [i915] [ 1746.701599] [] intel_mmio_flip_work_func+0x47/0x2b0 [i915] [ 1746.701717] [] process_one_work+0x14d/0x470 [ 1746.701809] [] worker_thread+0x43/0x4e0 [ 1746.701888] [] ? process_one_work+0x470/0x470 [ 1746.701969] [] ? process_one_work+0x470/0x470 [ 1746.702072] [] kthread+0xc5/0xe0 [ 1746.702152] [] ? _raw_spin_unlock_irq+0x9/0x10 [ 1746.702234] [] ? kthread_park+0x60/0x60 [ 1746.702318] [] ret_from_fork+0x22/0x30 [ 1746.702387] Code: 89 42 08 48 8b 45 88 48 89 55 c0 4c 89 6d c8 4c 8d 70 d8 4d 8d 7e 28 4d 39 ef 74 72 49 8b 1e 48 8b 13 48 39 d3 48 8d 42 f8 74 3e <48> 8b 10 8b 52 38 41 39 d4 7e 26 48 8b 50 30 48 8b 78 28 48 8d [ 1746.702921] RIP [] execlists_schedule+0x8d/0x300 [i915] Nov 25 21:42:54 kbl-gbbki7 kernel: [ 1746.703027] RSP Fixes: 27745e829a5c ("drm/i915/execlists: Use a local lock for dfs_link access") Fixes: 9a151987d709 ("drm/i915: Add execution priority boosting for mmioflips") Signed-off-by: Chris Wilson Cc: David Weinehall Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161128143649.4289-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d6faaf65e8f20be8b8c8af8ca50e88769a1d193 Author: Arkadiusz Hiler Date: Fri Nov 25 18:59:37 2016 +0100 drm/i915/guc: Remove spurious include Cc: Chris Wilson Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-6-git-send-email-arkadiusz.hiler@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 1 - 1 file changed, 1 deletion(-) commit 413e8fdb6ae7ef074cb0393adada2658217ec48d Author: Arkadiusz Hiler Date: Fri Nov 25 18:59:36 2016 +0100 drm/i915/guc: Init send_mutex in intel_uc_init_early() send_mutex is used to serialise communication with GuC via intel_guc_send(). Since functions that utilize it are no longer limited to submission, initialization should be handled as a part of general setup. v2: move initialization to *_early() Cc: Chris Wilson Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-5-git-send-email-arkadiusz.hiler@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_guc_submission.c | 1 - drivers/gpu/drm/i915/intel_uc.c | 5 +++++ drivers/gpu/drm/i915/intel_uc.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) commit 2d803c2de09ececa77395e48193fa51c4a2f8def Author: Arkadiusz Hiler Date: Fri Nov 25 18:59:35 2016 +0100 drm/i915/guc: Move guc_{send,recv}() to intel_uc.c guc_send(), guc_recv() and related functions were introduced in the i915_guc_submission.c and their scope was limited only to that file. Those are not submission specific though. This patch moves moves them to intel_uc.c with intel_ prefix added. v2: rename intel_guc_log_* functions and clean up intel_guc_send usages Cc: Chris Wilson Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-4-git-send-email-arkadiusz.hiler@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_guc_submission.c | 147 ++++------------------------- drivers/gpu/drm/i915/intel_uc.c | 135 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 8 ++ 4 files changed, 163 insertions(+), 130 deletions(-) commit a80bc45ff0cf9398484b836fc60d5e144970dc6d Author: Arkadiusz Hiler Date: Fri Nov 25 18:59:34 2016 +0100 drm/i915/guc: Drop guc2host/host2guc from names To facilitate code reorganization we are renaming everything that contains guc2host or host2guc. host2guc_action() and host2guc_action_response() become guc_send() and guc_recv() respectively. Other host2guc_*() functions become simply guc_*(). Other entities are renamed basing on context they appear in: - HOST2GUC_ACTIONS_& become INTEL_GUC_ACTION_* - HOST2GUC_{INTERRUPT,TRIGGER} become GUC_SEND_{INTERRUPT,TRIGGER} - GUC2HOST_STATUS_* become INTEL_GUC_STATUS_* - GUC2HOST_MSG_* become INTEL_GUC_RECV_MSG_* - action_lock becomes send_mutex v2: drop unnecessary backslashes and use BIT() instead of '<<' v3: shortened enum names and INTEL_GUC_STATUS_* Cc: Chris Wilson Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-3-git-send-email-arkadiusz.hiler@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_reg.h | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 91 +++++++++++++++--------------- drivers/gpu/drm/i915/i915_irq.c | 4 +- drivers/gpu/drm/i915/intel_guc_fwif.h | 46 +++++++-------- drivers/gpu/drm/i915/intel_uc.h | 6 +- 5 files changed, 75 insertions(+), 76 deletions(-) commit 8c4f24f95c682352d20c0e7bf1878e390787a7eb Author: Arkadiusz Hiler Date: Fri Nov 25 18:59:33 2016 +0100 drm/i915: Rename intel_guc.h to intel_uc.h GuC is not the only one micro controller we have. There are also HuC and DMC. Making the file more general will help with code organization. Cc: Chris Wilson Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-2-git-send-email-arkadiusz.hiler@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_guc.h | 192 ----------------------------- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- drivers/gpu/drm/i915/intel_uc.h | 192 +++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+), 195 deletions(-) commit a3f79ca63b9bcf5a527b886953092bfd65e78940 Author: Ander Conselvan de Oliveira Date: Thu Nov 24 15:23:27 2016 +0200 drm/i915: Don't sanitize has_decoupled_mmio if platform is not broxton The check in __intel_uncore_early_sanitize() to disable decoupled mmio would disable it for every platform that is not broxton. While that's not a problem now since only broxton supports that, simply setting .has_decoupled_mmio in a new platform's device info wouldn't suffice. So avoid future confusion and change the workaround to only change the value of has_decoupled_mmio for broxton. v2: git add compile fix. (Ander) Cc: Praveen Paneri Cc: Tvrtko Ursulin Cc: Imre Deak Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1479993807-29353-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_uncore.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit c39055b072f8b1c403aa7967e8efbb1a1a59b348 Author: Ander Conselvan de Oliveira Date: Wed Nov 23 16:21:44 2016 +0200 drm/i915: Pass dev_priv to intel_setup_outputs() Pass dev_priv to intel_setup_outputs() and functions called by it, since those are all intel i915 specific functions. Also, in the majority of the functions dev_priv is used more often than dev. In the rare cases where there are a few calls back into drm core, a local dev variable was added. v2: Don't convert dev to &dev_priv->drm in intel_dsi_init. (Ville) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479910904-11005-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_crt.c | 7 +- drivers/gpu/drm/i915/intel_ddi.c | 5 +- drivers/gpu/drm/i915/intel_display.c | 120 ++++++++++++++++------------------- drivers/gpu/drm/i915/intel_dp.c | 8 +-- drivers/gpu/drm/i915/intel_drv.h | 22 ++++--- drivers/gpu/drm/i915/intel_dsi.c | 4 +- drivers/gpu/drm/i915/intel_dvo.c | 9 ++- drivers/gpu/drm/i915/intel_hdmi.c | 8 +-- drivers/gpu/drm/i915/intel_lvds.c | 4 +- drivers/gpu/drm/i915/intel_psr.c | 4 +- drivers/gpu/drm/i915/intel_sdvo.c | 19 +++--- drivers/gpu/drm/i915/intel_tv.c | 4 +- 14 files changed, 105 insertions(+), 115 deletions(-) commit fc1584059d6c438b1febafa1c207ae1d3c6643e8 Author: Chris Wilson Date: Fri Nov 25 13:17:18 2016 +0000 drm/i915: Integrate i915_sw_fence with debugobjects Add the tracking required to enable debugobjects for fences to improve error detection in BAT. The debugobject interface lets us track the lifetime and phases of the fences even while being embedded into larger structs, i.e. to check they are not used after they have been released. v2: Don't populate the stubs, debugobjects checks for a NULL pointer and treats it equivalently. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161125131718.20978-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 13 +++ drivers/gpu/drm/i915/i915_gem_request.c | 9 ++ drivers/gpu/drm/i915/i915_sw_fence.c | 140 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_sw_fence.h | 6 ++ 4 files changed, 161 insertions(+), 7 deletions(-) commit 48bc2a4a427ad81578f887d71d45794619a77211 Author: Chris Wilson Date: Fri Nov 25 13:17:17 2016 +0000 drm/i915: Hold a reference on the request for its fence chain Currently, we have an active reference for the request until it is retired. Though it cannot be retired before it has been executed by hardware, the request may be completed before we have finished processing the execute fence, i.e. we may continue to process that fence as we free the request. Fixes: 5590af3e115a ("drm/i915: Drive request submission through fence callbacks") Fixes: 23902e49c999 ("drm/i915: Split request submit/execute phase into two") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161125131718.20978-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 34 ++++++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_sw_fence.h | 5 +++++ 2 files changed, 32 insertions(+), 7 deletions(-) commit 1618bdb89b5d8b47edf42d9c6ea96ecf001ad625 Author: Chris Wilson Date: Fri Nov 25 13:17:16 2016 +0000 drm/i915: Assert no external observers when unwind a failed request alloc Before we return the request back to the kmem_cache after a failed i915_gem_request_alloc(), we should assert that it has not been added to any global state tracking. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161125131718.20978-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4ffd6e0cfe1816fced8ab8d2612e1edde81aac2a Author: Chris Wilson Date: Fri Nov 25 13:17:15 2016 +0000 drm/i915: Add is-completed assert to request retire entrypoint While we will check that the request is completed prior to being retired, by placing an assert that the request is complete at the entrypoint of the function we can more clearly document the function's preconditions. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161125131718.20978-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ 1 file changed, 2 insertions(+) commit 312c3c47ef769f1d3f2a0d4e5db78a6d16fe0b26 Author: Chris Wilson Date: Thu Nov 24 14:47:50 2016 +0000 drm/i915/debugfs: Update pageflip information Show the last submitted seqno to the engine, not the overall next seqno, as this is more pertinent information when inspecting the pageflip and whether the CS or display engine stalled. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161124144750.2610-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c266edb4c98e929ea8871525fa2c7bd2483e05f Author: Joonas Lahtinen Date: Thu Nov 24 14:47:49 2016 +0000 drm/i915: Rename i915_gem_timeline.next_seqno to .seqno Rename i915_gem_timeline member 'next_seqno' into 'seqno' as the variable is pre-increment. We've already had two bugs due to the confusing name, second is fixed as follow-up patch. Cc: Chris Wilson Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161124144750.2610-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_request.c | 14 +++++++------- drivers/gpu/drm/i915/i915_gem_timeline.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit 60abfbb86a8d51576f90c5adcbb4f547a2952782 Author: Libin Yang Date: Fri Nov 11 16:46:28 2016 +0800 drm/i915/audio: fix hdmi audio noise issue Some monitors will have noise or even no sound after applying the patch 6014ac12. In patch 6014ac12, it will reset the cts value to 0 for HDMI. However, we need to disable Enable CTS or M Prog bit. This is the initial setting after HW reset. Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset") Signed-off-by: Libin Yang Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1478853988-139842-1-git-send-email-libin.yang@intel.com drivers/gpu/drm/i915/intel_audio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 41736a8e3331a67445b271e73be39536c498659e Author: Chris Wilson Date: Thu Nov 24 12:58:51 2016 +0000 drm/i915: Use the precomputed value for whether to enable command parsing As i915.enable_cmd_parser is an unsafe option, make it read-only at runtime. Now that it is constant, we can use the value determined during initialisation as to whether we need the cmdparser at execbuffer time. v2: Remove the inline for its single user, it is clear enough (and shorter) without! Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161124125851.6615-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 23 +---------------------- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_params.c | 6 +++--- drivers/gpu/drm/i915/i915_params.h | 2 +- 5 files changed, 6 insertions(+), 28 deletions(-) commit 9607ae79710afb453173b90d5bf564788a6e09b1 Author: Chris Wilson Date: Thu Nov 24 09:47:52 2016 +0000 drm/i915/debugfs: Increment return value of gt.next_seqno The i915_next_seqno read value is to be the next seqno used by the kernel. However, in the conversion to atomics ops for gt.next_seqno, in commit 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during request allocation"), this was changed from a post-increment to a pre-increment. This increment was missed from the value reported by debugfs, so in effect it was reporting the current seqno (last assigned), not the next seqno. Fixes: 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during request allocation") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81209 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161124094752.19129-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 007873b30b9001348c0dfc96deb9db220a3be116 Author: Matthew Auld Date: Wed Nov 23 23:02:27 2016 +0000 drm/i915: kick out cmd_parser specific structs from i915_drv.h No sense in keeping the cmd_descriptor and cmd_table structs in i915_drv.h, now that they are no longer referenced externally. Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1479942147-9837-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/i915_cmd_parser.c | 96 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 96 ---------------------------------- 2 files changed, 96 insertions(+), 96 deletions(-) commit e3f51ece02f877d2ce9619aa8d5919db56f39582 Author: Matthew Auld Date: Mon Nov 14 22:39:34 2016 +0000 drm/i915: cleanup use of INSTR_CLIENT_MASK Doing cmd_header >> 29 to extract our 3-bit client value where we know cmd_header is a u32 shouldn't then also require the use of a mask. So remove the redundant operation and get rid of INSTR_CLIENT_MASK now that there are no longer any users. Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1479163174-29686-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/i915_cmd_parser.c | 6 +++--- drivers/gpu/drm/i915/i915_reg.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit 30576a2c462d9658508c3de67601aa565f973064 Author: Chris Wilson Date: Thu Nov 24 09:34:01 2016 +0000 drm/i915/debugfs: Drop i915_hws_info i915_hws_info() has not been kept upto date (missing new engines) and so I consider it to be unused. HWS is included in the error state, which would be an avenue to retrieving it if required in future (possibly via i915_engine_info). As it is currently oopsing with an rpm testcase, just remove it. Fixes: 3b3f1650b1ca ("drm/i915: Allocate intel_engine_cs structure only for the enabled engines") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98838 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161124093401.18852-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_debugfs.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit ac2402882f122307e01faee7d948e90a363ed575 Author: Maarten Lankhorst Date: Wed Nov 23 15:57:00 2016 +0100 drm/i915: Remove all ->config dereferences from intel_hdmi, v2. In all cases we can now obtain the relevant crtc_state/conn_state from the relevant callbacks, which means all the ->config accesses can be removed and the code cleaned up. Changes since v1: - cstate -> crtc_state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/8b02a6b4-606a-e43a-b357-ad17f491525b@linux.intel.com [mlankhorst: Reinstate missing comment] Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_ddi.c | 9 +- drivers/gpu/drm/i915/intel_drv.h | 4 +- drivers/gpu/drm/i915/intel_hdmi.c | 170 +++++++++++++++++++------------------- 3 files changed, 93 insertions(+), 90 deletions(-) commit 9780aad59cf40db6a2ded69f91b11ba366dbd8cf Author: Ville Syrjälä Date: Mon Nov 14 18:35:11 2016 +0200 drm/i915: Simplify error handling in intel_modeset_all_pipes() No need for the extra break statements and whatnot, just return the error directly. And tighten the scope of the local variables while at it. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479141311-11904-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8d96561a0a31974fec33bd3f3853d6211b7ab738 Author: Ville Syrjälä Date: Mon Nov 14 18:35:10 2016 +0200 drm/i915: Protect dev_priv->atomic_cdclk_freq with all the crtc locks A modeset on one pipe can update dev_priv->atomic_cdclk_freq without actually touching the hardware, in which case we won't force a modeset on all the pipes, and thus won't lock any of the other pipes either. That means a parallel plane update on another pipe could be looking at a stale dev_priv->atomic_cdcdlk_freq and thus fail to notice when the plane configuration is invalid, or potentially reject a valid update. To overcome this we must protect writes to atomic_cdclk_freq with all the crtc locks, and thus for reads any single crtc lock will be sufficient protection. Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479141311-11904-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 9 +++++++- drivers/gpu/drm/i915/intel_display.c | 41 +++++++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 6 deletions(-) commit e0ca7a6be38ce603d26df5707c22e53870a623e0 Author: Ville Syrjälä Date: Mon Nov 14 18:35:09 2016 +0200 drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things When we end up not recomputing the cdclk, we need to populate intel_state->cdclk with the "atomic_cdclk_freq" instead of the current cdclk_freq. When no pipes are active, the actual cdclk_freq may be lower than what the configuration of the planes and pipes would require from the point of view of the software state. This fixes bogus WARNS from skl_max_scale() which is trying to check the plane software state against the cdclk frequency. So any time it got called during DPMS off for instance, we might have tripped the warn if the current mode would have required a higher than minimum cdclk. v2: Drop the dev_cdclk stuff (Maarten) Cc: Maarten Lankhorst Cc: Mika Kahola Cc: bruno.pagani@ens-lyon.org Cc: Daniel J Blueman Cc: Paul Bolle Cc: Joseph Yasi Tested-by: Paul Bolle Tested-by: Joseph Yasi (v1) Cc: stable@vger.kernel.org Fixes: 1a617b77658e ("drm/i915: Keep track of the cdclk as if all crtc's were active.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98214 Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1479141311-11904-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 812b1d2fe527c3c68d04f379aef850dd02db5945 Author: Bob Paauwe Date: Mon Nov 21 14:24:06 2016 -0800 drm/i915/bxt: Correct dual-link MIPI port control. For BXT, there is only one bit that enables/disables dual-link mode and not different bits depending on which pipe is being used. Signed-off-by: Bob Paauwe Link: http://patchwork.freedesktop.org/patch/msgid/1479767046-3964-1-git-send-email-bob.j.paauwe@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 49845a231587f1d233a93208c117b5205619f85f Author: Ville Syrjälä Date: Tue Nov 22 18:02:01 2016 +0200 drm/i915: Use enum plane_id in VLV/CHV wm code Let's try not to abuse plane->plane for sprites on VLV/CHV and instead use plane->id. Since out watermark structures aren't entirely plane type agnostic (for now) and start indexing sprites from 0 we'll add a small helper to convert between the two bases. Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-7-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 73 ++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 37 deletions(-) commit 83c04a62a187283d9e1473d062cd1cd25ee60e2e Author: Ville Syrjälä Date: Tue Nov 22 18:02:00 2016 +0200 drm/i915: Use enum plane_id in VLV/CHV sprite code Use intel_plane->id to derive the VLV/CHV sprite register offsets instead of abusing plane->plane which is really meant to for primary planes only. v2: Convert assert_sprites_disabled() over as well v3: Rename the reg macro parameter to 'plane_id' as well (Paulo) Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-6-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 58 +++++++++++++++------------- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 74 ++++++++++++++++++------------------ 3 files changed, 70 insertions(+), 64 deletions(-) commit 8e816bb496763182d5733ef955ac8ca7334480f6 Author: Ville Syrjälä Date: Tue Nov 22 18:01:59 2016 +0200 drm/i915: Use enum plane_id in SKL plane code Replace the intel_plane->plane and hardcoded 0 usage in the SKL plane code with intel_plane->id. This should make the SKL "primary" and "sprite" code virtually identical, so the next logical step would likely be dropping one of the copies. Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-5-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 31 +++++++++++++------------- drivers/gpu/drm/i915/intel_sprite.c | 42 ++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 36 deletions(-) commit d5cdfdf54ea5bcc454a2804301ae5342db0ff0c3 Author: Ville Syrjälä Date: Tue Nov 22 18:01:58 2016 +0200 drm/i915: Use enum plane_id in SKL wm code Nuke skl_wm_plane_id() and just use the new intel_plane->id. v2: Convert skl_write_plane_wm() as well v3: Convert skl_pipe_wm_get_hw_state() correctly v4: Rebase due to changes in the wm code Drop the cursor FIXME from the total data rate calc (Paulo) Use the "[PLANE:%d:%s]" format in debug print (Paulo) Cc: Matt Roper Cc: Paulo Zanoni Cc: Maarten Lankhorst Cc: Lyude Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Lyude drivers/gpu/drm/i915/intel_pm.c | 180 +++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 103 deletions(-) commit d97d7b48b644378349f2566dd83739e0be3ba410 Author: Ville Syrjälä Date: Tue Nov 22 18:01:57 2016 +0200 drm/i915: Add crtc->plane_ids_mask Add a mask of which planes are available for each pipe. This doesn't quite work for old platforms with dynamic plane<->pipe assignment, but as we don't support that sort of stuff (yet) we can get away with it. The main use I have for this is the for_each_plane_id_on_crtc() macro for iterating over all possible planes on the crtc. I suppose we could not add the mask, and instead iterate by comparing intel_plane->pipe but then we'd need a local intel_plane variable which is just unnecessary clutter in some cases. But I'm not hung up on this, so if people prefer the other option I could be convinced to use it. v2: Use BIT() in the iterator macro too (Paulo) Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/intel_display.c | 3 +++ drivers/gpu/drm/i915/intel_drv.h | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) commit b14e5848c01de9a297d8fa2999ad324d45afb536 Author: Ville Syrjälä Date: Tue Nov 22 18:01:56 2016 +0200 drm/i915: Add per-pipe plane identifier As I told people in [1] we really should not be confusing enum plane as a per-pipe plane identifier. Looks like that happened nonetheless, so let's fix it up by splitting the two into two enums. We'll also want something we just directly pass to various register offset macros and whatnot on SKL+. So let's make this new thing work for that. Currently we pass intel_plane->plane for the "sprites" and just a hardcoded zero for the "primary" planes. We want to get rid of that hardocoding so that we can share the same code for all planes (apart from the legacy cursor of course). [1] https://lists.freedesktop.org/archives/intel-gfx/2015-September/076082.html Cc: Matt Roper Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 28 +++++++++++++++++++++------- drivers/gpu/drm/i915/intel_display.c | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_sprite.c | 1 + 4 files changed, 26 insertions(+), 8 deletions(-) commit d9348dec902ff36e0f1b25ccf1f4be25fc1ac409 Author: Ville Syrjälä Date: Tue Nov 22 22:21:53 2016 +0200 drm/i915: Make skl_write_{plane,cursor}_wm() static Someone forgot to make skl_write_{plane,cursor}_wm() static when removing the prototypes from the header. Sparse isn't pleased. Cc: Maarten Lankhorst Cc: Lyude Cc: Matt Roper Fixes: e62929b3f628 ("drm/i915/gen9+: Program watermarks as a separate step during evasion, v3.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479846113-24745-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Lyude Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 793b61ea9f9972be0836a9a15d0d6a520daaf124 Author: Tvrtko Ursulin Date: Wed Nov 23 10:49:15 2016 +0000 drm/i915: i915_gem_alloc_context_obj can be static It has only one call site from the same file. v2: Also rename it to alloc_context_obj. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1479898155-21014-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_context.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) commit e853ab7ca3f6c88cbef18fbc6f6ba6a031d9ac14 Author: Tvrtko Ursulin Date: Wed Nov 23 10:20:21 2016 +0000 drm/i915/guc: Remove unused intel_guc_fw struct member Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1479896421-20611-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_guc.h | 1 - drivers/gpu/drm/i915/intel_guc_loader.c | 1 - 2 files changed, 2 deletions(-) commit 902488004658ca3d8ee023875e3ac3a7965a8bc9 Author: Imre Deak Date: Mon Nov 21 21:15:07 2016 +0200 drm/i915/lspcon: Remove unused force change mode parameter All callers asked for a forced change but the function ignored this parameter. It doesn't seem to be necessary to force the change in any case so let's just remove the parameter. Cc: Shashank Sharma Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1479755707-29596-5-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_lspcon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 357c0ae9198ad7f526f229c4f33921e8e3a3e9a0 Author: Imre Deak Date: Mon Nov 21 21:15:06 2016 +0200 drm/i915/lspcon: Wait for expected LSPCON mode to settle Some LSPCON adaptors may return an incorrect LSPCON mode right after waking from DP Sleep state. This is the case at least for the ParadTech PS175 adaptor, both when waking because of exiting the DP Sleep to active state, or due to any other AUX CH transfer. We can determine the current expected mode based on whether the DPCD area is accessible, since according to the LSPCON spec this area is only accesible in PCON mode. This wait will avoid us trying to change the mode, while the current expected mode hasn't settled yet and start link training before the adaptor thinks it's in PCON mode after waking from DP Sleep state. Cc: Shashank Sharma Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1479755707-29596-4-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 5 +++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_lspcon.c | 70 ++++++++++++++++++++++++++++++++----- 3 files changed, 68 insertions(+), 8 deletions(-) commit dd75f6dd2e7d5de544e8aa8b75d1e50308cd8561 Author: Imre Deak Date: Mon Nov 21 21:15:05 2016 +0200 drm/i915/lspcon: Add dp_to_lspcon helper() We need to get to LSPCON in the next patch, so factor out the helper for it. While at it also remove the redundant GEN9 check. Cc: Shashank Sharma Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1479755707-29596-3-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 7 +++---- drivers/gpu/drm/i915/intel_drv.h | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) commit f2b667b658f998d4bba12ca0204c01f34fdb0321 Author: Imre Deak Date: Mon Nov 21 21:15:04 2016 +0200 drm/i915/lspcon: Ensure AUX CH is awake while in DP Sleep state Some LSPCON adaptors won't properly wake up in response to an AUX request after the adaptor was placed to a DP Sink Sleep state (via writing 0x2 to DP_SET_POWER). Based on the DP 1.4 specification 5.2.5, the sink may place the AUX CH into a low-power state while in Sleep state, but should wake it up in response to an AUX request within 1-20ms (answering with AUX defers while waking it up). As opposed to this at least the ParadTech PS175 adaptor won't fully wake in response to the first I2C-over-AUX access and will occasionally ignore the offset in I2C messages. This can result in accessing the DDC register at offset 0 regardless of the specified offset and the LSPCON detection failing. To fix this do an initial dummy read from the DPCD area. The PS175 will defer this access until it's fully woken (taking ~150ms) making sure the following I2C-over-AUX accesses will work correctly. Cc: Shashank Sharma Cc: Ville Syrjälä Cc: Jani Nikula Reference: https://bugs.freedesktop.org/show_bug.cgi?id=98353 Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1479755707-29596-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_lspcon.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 20e4933c478a1ca694b38fa4ac44d99e659941f5 Author: Chris Wilson Date: Tue Nov 22 14:41:21 2016 +0000 drm/i915: Stop the machine as we install the wedged submit_request handler In order to prevent a race between the old callback submitting an incomplete request and i915_gem_set_wedged() installing its nop handler, we must ensure that the swap occurs when the machine is idle (stop_machine). v2: move context lost from out of BKL. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161122144121.7379-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 3dcf93f7f23a61e867a5ccadaf651cb2d29229fd Author: Chris Wilson Date: Tue Nov 22 14:41:20 2016 +0000 drm/i915: Complete requests in nop_submit_request Since the submit/execute split in commit d55ac5bf97c6 ("drm/i915: Defer transfer onto execution timeline to actual hw submission") the global seqno advance was deferred until the submit_request callback. After wedging the GPU, we were installing a nop_submit_request handler (to avoid waking up the dead hw) but I had missed converting this over to the new scheme. Under the new scheme, we have to explicitly call i915_gem_submit_request() from the submit_request handler to mark the request as on the hardware. If we don't the request is always pending, and any waiter will continue to wait indefinitely and hangcheck will not be able to resolve the lockup. References: https://bugs.freedesktop.org/show_bug.cgi?id=98748 Testcase: igt/gem_eio/in-flight Fixes: d55ac5bf97c6 ("drm/i915: Defer transfer onto execution timeline to actual hw submission") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161122144121.7379-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) commit c2a126a46d4c843e9e56b7cad6a14b3791ffab47 Author: Chris Wilson Date: Tue Nov 22 14:41:19 2016 +0000 drm/i915: Disable hangcheck when wedged If the gpu reset fails and the machine is terminally wedged, further hangchecks achieve nothing but noise. Disable them, with a corollary that we re-enable hangchecking after a successful GPU reset in case the user is artificially bringing the machine back to life through the debug interface. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161122144121.7379-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_hangcheck.c | 3 +++ 2 files changed, 5 insertions(+) commit d9e9da64c4a762493c5ac24b3b2bbc43c2754786 Author: Chris Wilson Date: Tue Nov 22 14:41:18 2016 +0000 drm/i915: Don't deref context->file_priv ERR_PTR upon reset When a user context is closed, it's file_priv backpointer is replaced by ERR_PTR(-EBADF); be careful not to chase this invalid pointer after a hang and a GPU reset. Signed-off-by: Chris Wilson Fixes: b083a0870c79 ("drm/i915: Add per client max context ban limit") Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161122144121.7379-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 7abbd8d670bb928366aa94332a173aa3d394ebfe Author: Robert Bragg Date: Mon Nov 7 19:49:57 2016 +0000 drm/i915: Add a kerneldoc summary for i915_perf.c In particular this tries to capture for posterity some of the early challenges we had with using the core perf infrastructure in case we ever want to revisit adapting perf for device metrics. Cc: Chris Wilson Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-12-robert@sixbynine.org drivers/gpu/drm/i915/i915_perf.c | 163 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) commit c8a9483fb829ca38e9791372d89a0f1a6bb8baed Author: Robert Bragg Date: Mon Nov 7 19:49:56 2016 +0000 drm/i915: Add more Haswell OA metric sets This adds 'compute', 'compute extended', 'memory reads', 'memory writes' and 'sampler balance' metric sets for Haswell. The code is auto generated from an XML description of metric sets, currently maintained in gputop, ref: https://github.com/rib/gputop > gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-11-robert@sixbynine.org drivers/gpu/drm/i915/i915_oa_hsw.c | 559 ++++++++++++++++++++++++++++++++++++- 1 file changed, 558 insertions(+), 1 deletion(-) commit 00319ba0434a99de12cb7241c136b5ef4aeaada7 Author: Robert Bragg Date: Mon Nov 7 19:49:55 2016 +0000 drm/i915: add dev.i915.oa_max_sample_rate sysctl The maximum OA sampling frequency is now configurable via a dev.i915.oa_max_sample_rate sysctl parameter. Following the precedent set by perf's similar kernel.perf_event_max_sample_rate the default maximum rate is 100000Hz Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-10-robert@sixbynine.org drivers/gpu/drm/i915/i915_perf.c | 61 ++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 11 deletions(-) commit ccdf6341ed36e403b2c12d3ef6cb50e9f8e6bdcc Author: Robert Bragg Date: Mon Nov 7 19:49:54 2016 +0000 drm/i915: Add dev.i915.perf_stream_paranoid sysctl option Consistent with the kernel.perf_event_paranoid sysctl option that can allow non-root users to access system wide cpu metrics, this can optionally allow non-root users to access system wide OA counter metrics from Gen graphics hardware. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-9-robert@sixbynine.org drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 50 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) commit 442b8c06fc7230772a663a00feeb5ebc61652d6d Author: Robert Bragg Date: Mon Nov 7 19:49:53 2016 +0000 drm/i915: advertise available metrics via sysfs Each metric set is given a sysfs entry like: /sys/class/drm/card0/metrics//id This allows userspace to enumerate the specific sets that are available for the current system. The 'id' file contains an unsigned integer that can be used to open the associated metric set via DRM_IOCTL_I915_PERF_OPEN. The is a globally unique ID for a specific OA unit register configuration that can be reliably used by userspace as a key to lookup corresponding counter meta data and normalization equations. The guid registry is currently maintained as part of gputop along with the XML metric set descriptions and code generation scripts, ref: https://github.com/rib/gputop > gputop-data/guids.xml > scripts/update-guids.py > gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml SYSFS=1 WHITELIST=RenderBasic Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-8-robert@sixbynine.org drivers/gpu/drm/i915/i915_drv.c | 5 ++++ drivers/gpu/drm/i915/i915_drv.h | 4 +++ drivers/gpu/drm/i915/i915_oa_hsw.c | 51 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_hsw.h | 4 +++ drivers/gpu/drm/i915/i915_perf.c | 52 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+) commit d79651522e89c4ffa8992b48dfe449f0c583f809 Author: Robert Bragg Date: Mon Nov 7 19:49:52 2016 +0000 drm/i915: Enable i915 perf stream for Haswell OA unit Gen graphics hardware can be set up to periodically write snapshots of performance counters into a circular buffer via its Observation Architecture and this patch exposes that capability to userspace via the i915 perf interface. v2: Make sure to initialize ->specific_ctx_id when opening, without relying on _pin_notify hook, in case ctx already pinned. v3: Revert back to pinning ctx upfront when opening stream, removing need to hook in to pinning and to update OACONTROL on the fly. Signed-off-by: Robert Bragg Signed-off-by: Zhenyu Wang Cc: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-7-robert@sixbynine.org drivers/gpu/drm/i915/i915_drv.h | 66 ++- drivers/gpu/drm/i915/i915_perf.c | 1036 +++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 338 +++++++++++++ include/uapi/drm/i915_drm.h | 71 ++- 4 files changed, 1482 insertions(+), 29 deletions(-) commit 8a3003dd93e2db2e7c8edc316e2978f750ca0dc2 Author: Robert Bragg Date: Mon Nov 7 19:49:51 2016 +0000 drm/i915: Add 'render basic' Haswell OA unit config Adds a static OA unit, MUX + B Counter configuration for basic render metrics on Haswell. This is auto generated from an XML description of metric sets, currently maintained in gputop, ref: https://github.com/rib/gputop > gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml SYSFS=0 WHITELIST=RenderBasic Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-6-robert@sixbynine.org drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 14 ++++ drivers/gpu/drm/i915/i915_oa_hsw.c | 144 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_hsw.h | 34 +++++++++ 4 files changed, 194 insertions(+), 1 deletion(-) commit 10ff401df041e57afc2b1619cd252b86d0ae5f30 Author: Robert Bragg Date: Tue Nov 8 12:51:48 2016 +0000 drm/i915: don't whitelist oacontrol in cmd parser Being able to program OACONTROL from a non-privileged batch buffer is not sufficient to be able to configure the OA unit. This was originally allowed to help enable Mesa to expose OA counters via the INTEL_performance_query extension, but the current implementation based on programming OACONTROL via a batch buffer isn't able to report useable data without a more complete OA unit configuration. Mesa handles the possibility that writes to OACONTROL may not be allowed and so only advertises the extension after explicitly testing that a write to OACONTROL succeeds. Based on this; removing OACONTROL from the whitelist should be ok for userspace. Removing this simplifies adding a new kernel api for configuring the OA unit without needing to consider the possibility that userspace might trample on OACONTROL state which we'd like to start managing within the kernel instead. In particular running any Mesa based GL application currently results in clearing OACONTROL when initializing which would disable the capturing of metrics. v2: This bumps the command parser version from 8 to 9, as the change is visible to userspace. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161108125148.25007-1-robert@sixbynine.org drivers/gpu/drm/i915/i915_cmd_parser.c | 42 ++++------------------------------ 1 file changed, 5 insertions(+), 37 deletions(-) commit 9bbeaedb664a6d3e1cfbe6b0c2f07bf667512456 Author: Robert Bragg Date: Mon Nov 7 19:49:49 2016 +0000 drm/i915: return EACCES for check_cmd() failures check_cmd() is checking whether a command adheres to certain restrictions that ensure it's safe to execute within a privileged batch buffer. Returning false implies a privilege problem, not that the command is invalid. The distinction makes the difference between allowing the buffer to be executed as an unprivileged batch buffer or returning an EINVAL error to userspace without executing anything. In a case where userspace may want to test whether it can successfully write to a register that needs privileges the distinction may be important and an EINVAL error may be considered fatal. In particular this is currently true for Mesa, which includes a test for whether OACONTROL can be written too, but Mesa treats any error when flushing a batch buffer as fatal, calling exit(1). As it is currently Mesa can gracefully handle a failure to write to OACONTROL if the command parser is disabled, but if we were to remove OACONTROL from the parser's whitelist then the returned EINVAL would break Mesa applications as they attempt an OACONTROL write. This bumps the command parser version from 7 to 8, as the change is visible to userspace. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-4-robert@sixbynine.org drivers/gpu/drm/i915/i915_cmd_parser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a941795a3aead3765d6f9e12dc1828fe06ba3d5d Author: Robert Bragg Date: Mon Nov 7 19:49:48 2016 +0000 drm/i915: rename OACONTROL GEN7_OACONTROL OACONTROL changes quite a bit for gen8, with some bits split out into a per-context OACTXCONTROL register. Rename now before adding more gen7 OA registers Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-3-robert@sixbynine.org drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit eec688e1420da584afb36ffa5f0cad75f53cf286 Author: Robert Bragg Date: Mon Nov 7 19:49:47 2016 +0000 drm/i915: Add i915 perf infrastructure Adds base i915 perf infrastructure for Gen performance metrics. This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64 properties to configure a stream of metrics and returns a new fd usable with standard VFS system calls including read() to read typed and sized records; ioctl() to enable or disable capture and poll() to wait for data. A stream is opened something like: uint64_t properties[] = { /* Single context sampling */ DRM_I915_PERF_PROP_CTX_HANDLE, ctx_handle, /* Include OA reports in samples */ DRM_I915_PERF_PROP_SAMPLE_OA, true, /* OA unit configuration */ DRM_I915_PERF_PROP_OA_METRICS_SET, metrics_set_id, DRM_I915_PERF_PROP_OA_FORMAT, report_format, DRM_I915_PERF_PROP_OA_EXPONENT, period_exponent, }; struct drm_i915_perf_open_param parm = { .flags = I915_PERF_FLAG_FD_CLOEXEC | I915_PERF_FLAG_FD_NONBLOCK | I915_PERF_FLAG_DISABLED, .properties_ptr = (uint64_t)properties, .num_properties = sizeof(properties) / 16, }; int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, ¶m); Records read all start with a common { type, size } header with DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records contain an extensible number of fields and it's the DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that determine what's included in every sample. No specific streams are supported yet so any attempt to open a stream will return an error. v2: use i915_gem_context_get() - Chris Wilson v3: update read() interface to avoid passing state struct - Chris Wilson fix some rebase fallout, with i915-perf init/deinit v4: s/DRM_IORW/DRM_IOW/ - Emil Velikov Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-2-robert@sixbynine.org drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_drv.c | 4 + drivers/gpu/drm/i915/i915_drv.h | 91 ++++++++ drivers/gpu/drm/i915/i915_perf.c | 449 +++++++++++++++++++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 67 ++++++ 5 files changed, 614 insertions(+) commit bc1d53c64773e89175766e8c77cc96aa0763de4a Author: Mika Kuoppala Date: Wed Nov 16 17:20:34 2016 +0200 drm/i915: Wipe hang stats as an embedded struct Bannable property, banned status, guilty and active counts are properties of i915_gem_context. Make them so. v2: rebase Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1479309634-28574-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_drv.h | 31 ++++++++++-------------------- drivers/gpu/drm/i915/i915_gem.c | 25 ++++++++++-------------- drivers/gpu/drm/i915/i915_gem_context.c | 12 +++++------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +--- drivers/gpu/drm/i915/i915_gem_request.c | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 6 files changed, 29 insertions(+), 49 deletions(-) commit b083a0870c7937e131762f8b702afa6bac8d08f4 Author: Mika Kuoppala Date: Fri Nov 18 15:10:47 2016 +0200 drm/i915: Add per client max context ban limit If we have a bad client submitting unfavourably across different contexts, creating new ones, the per context scoring of badness doesn't remove the root cause, the offending client. To counter, keep track of per client context bans. Deny access if client is responsible for more than 3 context bans in it's lifetime. v2: move ban check to context create ioctl (Chris) v3: add commentary about hangs needed to reach client ban (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++++ drivers/gpu/drm/i915/i915_gem.c | 14 ++++++++++++++ drivers/gpu/drm/i915/i915_gem_context.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_gpu_error.c | 10 ++++++---- 4 files changed, 43 insertions(+), 4 deletions(-) commit 841021713a4d700059774e0d3c77ec6c538daae2 Author: Mika Kuoppala Date: Wed Nov 16 17:20:32 2016 +0200 drm/i915: Add bannable context parameter Now when driver has per context scoring of 'hanging badness' and also subsequent hangs during short windows are allowed, if there is progress made in between, it does not make sense to expose a ban timing window as a context parameter anymore. Let the scoring be the sole indicator for ban policy and substitute ban period context parameter as a boolean to get/set context bannable property. v2: allow non root to opt into being banned (Chris) Cc: Chris Wilson Suggested-by: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 13 +++---------- drivers/gpu/drm/i915/i915_gem.c | 10 +--------- drivers/gpu/drm/i915/i915_gem_context.c | 23 ++++++++++++++--------- drivers/gpu/drm/i915/i915_gpu_error.c | 5 +++-- include/uapi/drm/i915_drm.h | 1 + 5 files changed, 22 insertions(+), 30 deletions(-) commit e5e1fc47eac842daeccc2dd125437f43e0271032 Author: Mika Kuoppala Date: Wed Nov 16 17:20:31 2016 +0200 drm/i915: Use request retirement as context progress As hangcheck score was removed, the active decay of score was removed also. This removed feature for hangcheck to detect if the gpu client was accidentally or maliciously causing intermittent hangs. Reinstate the scoring as a per context property, so that if one context starts to act unfavourably, ban it. v2: ban_period_secs as a gate to score check (Chris) v3: decay in proper spot. scores as tunables (Chris) Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 5 ++++ drivers/gpu/drm/i915/i915_gem.c | 44 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_request.c | 4 +++ 3 files changed, 39 insertions(+), 14 deletions(-) commit 3fe3b030bd2d7a51c12aa6fe0e5178b9f1a726ec Author: Mika Kuoppala Date: Fri Nov 18 15:09:04 2016 +0200 drm/i915: Decouple hang detection from hangcheck period Hangcheck state accumulation has gained more steps along the years, like head movement and more recently the subunit inactivity check. As the subunit sampling is only done if the previous state check showed inactivity, we have added more stages (and time) to reach a hang verdict. Asymmetric engine states led to different actual weight of 'one hangcheck unit' and it was demonstrated in some hangs that due to difference in stages, simpler engines were accused falsely of a hang as their scoring was much more quicker to accumulate above the hang treshold. To completely decouple the hangcheck guilty score from the hangcheck period, convert hangcheck score to a rough period of inactivity measurement. As these are tracked as jiffies, they are meaningful also across reset boundaries. This makes finding a guilty engine more accurate across multi engine activity scenarios, especially across asymmetric engines. We lose the ability to detect cross batch malicious attempts to hinder the progress. Plan is to move this functionality to be part of context banning which is more natural fit, later in the series. v2: use time_before macros (Chris) reinstate the pardoning of moving engine after hc (Chris) v3: avoid global state for per engine stall detection (Chris) v4: take timeline last retirement into account (Chris) v5: do debug print on pardoning, split out retirement timestamp (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 17 +++-- drivers/gpu/drm/i915/i915_drv.h | 6 +- drivers/gpu/drm/i915/i915_gem.c | 8 ++- drivers/gpu/drm/i915/i915_gpu_error.c | 46 ++++---------- drivers/gpu/drm/i915/intel_hangcheck.c | 108 +++++++++++++++----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 40 +++++++++--- 6 files changed, 117 insertions(+), 108 deletions(-) commit 6e16d028e441b0b2c141aaecb39f4838cd2964b5 Author: Mika Kuoppala Date: Wed Nov 16 17:20:29 2016 +0200 drm/i915: Split up hangcheck phases In order to simplify hangcheck state keeping, split hangcheck per engine loop in three phases: state load, action, state save. Add few more hangcheck actions to separate between seqno, head and subunit movements. This helps to gather all the hangcheck actions under a single switch umbrella. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gpu_error.c | 8 +- drivers/gpu/drm/i915/intel_hangcheck.c | 241 ++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +- 3 files changed, 146 insertions(+), 107 deletions(-) commit b2251c082044969df965a42bd08754d2fedd333a Author: Mika Kuoppala Date: Wed Nov 16 11:33:26 2016 +0200 drm/i915: Add more keywords to firmware loading message To find out what firmware we actually loaded (from dmesg) the explicit 'dmc' and 'firmware' are missing from the info printout. Add them. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1479288806-17355-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58415918d4432d22f4ff9d3b2e2e8959cfb716cb Author: A.Sunil Kamath Date: Sun Nov 20 23:20:26 2016 +0530 drm/i915: Use num_scalers instead of SKL_NUM_SCALERS in debugfs Better to use num_scaler itself while printing scaler_info. This fixes a bug of printing information for the missing second scaler on pipe C for SKL platform. Signed-off-by: A.Sunil Kamath Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1479664226-22307-1-git-send-email-sunil.kamath@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 381744f8062239c3e08b9c79f8f7941c521d46c2 Author: Chris Wilson Date: Mon Nov 21 11:07:59 2016 +0000 drm/i915: Add a warning on shutdown if signal threads still active When unloading the module, it is expected that we have finished executing all requests and so the signal threads should be idle. Add a warning in case there are any residual requests in the signaler rbtrees at that point. v2: We can also warn if there are any waiters Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20161121110759.22896-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b84cf5363c2a529d154edca1f09402ac8df9995c Author: Chris Wilson Date: Mon Nov 21 11:31:09 2016 +0000 drm/i915: Use user, not driver, DRM_DEBUG for 2 context ioctls For user actions, such as the context ioctls, we prefer to use DRM_DEBUG rather than DRM_DEBUG_DRIVER as currently used. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161121113109.1976-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)